From d2a068a6a1d278de1e242309daa7086267ffb643 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 2 Jul 2024 14:55:59 +0800 Subject: [PATCH 001/144] update API for `Azure.Core.Experimental` (#44830) --- .../api/Azure.Core.Experimental.net461.cs | 17 ----------------- .../api/Azure.Core.Experimental.net6.0.cs | 17 ----------------- .../Azure.Core.Experimental.netstandard2.0.cs | 17 ----------------- 3 files changed, 51 deletions(-) diff --git a/sdk/core/Azure.Core.Experimental/api/Azure.Core.Experimental.net461.cs b/sdk/core/Azure.Core.Experimental/api/Azure.Core.Experimental.net461.cs index ca000285dea88..68a0cd71a1195 100644 --- a/sdk/core/Azure.Core.Experimental/api/Azure.Core.Experimental.net461.cs +++ b/sdk/core/Azure.Core.Experimental/api/Azure.Core.Experimental.net461.cs @@ -132,16 +132,6 @@ public partial interface ISupportsProofOfPossession Azure.Core.AccessToken GetToken(Azure.Core.PopTokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken); System.Threading.Tasks.ValueTask GetTokenAsync(Azure.Core.PopTokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken); } - public partial class LruCache : System.Collections.Generic.IEnumerable>, System.Collections.IEnumerable where TKey : notnull - { - public LruCache(int capacity) { } - public int Count { get { throw null; } } - public int TotalLength { get { throw null; } } - public void AddOrUpdate(TKey key, TValue? val, int length) { } - public System.Collections.Generic.IEnumerator> GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - public bool TryGet(TKey key, out TValue? value) { throw null; } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct PopTokenRequestContext { @@ -167,13 +157,6 @@ public partial class ProvisionableTemplateAttribute : System.Attribute public ProvisionableTemplateAttribute(string resourceName) { } public string ResourceName { get { throw null; } } } - public abstract partial class SchemaValidator - { - protected SchemaValidator() { } - public abstract string GenerateSchema(System.Type dataType); - public abstract bool TryValidate(object data, System.Type dataType, string schemaDefinition, out System.Collections.Generic.IEnumerable validationErrors); - public virtual void Validate(object data, System.Type dataType, string schemaDefinition) { } - } } namespace Azure.Core.Pipeline { diff --git a/sdk/core/Azure.Core.Experimental/api/Azure.Core.Experimental.net6.0.cs b/sdk/core/Azure.Core.Experimental/api/Azure.Core.Experimental.net6.0.cs index ca000285dea88..68a0cd71a1195 100644 --- a/sdk/core/Azure.Core.Experimental/api/Azure.Core.Experimental.net6.0.cs +++ b/sdk/core/Azure.Core.Experimental/api/Azure.Core.Experimental.net6.0.cs @@ -132,16 +132,6 @@ public partial interface ISupportsProofOfPossession Azure.Core.AccessToken GetToken(Azure.Core.PopTokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken); System.Threading.Tasks.ValueTask GetTokenAsync(Azure.Core.PopTokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken); } - public partial class LruCache : System.Collections.Generic.IEnumerable>, System.Collections.IEnumerable where TKey : notnull - { - public LruCache(int capacity) { } - public int Count { get { throw null; } } - public int TotalLength { get { throw null; } } - public void AddOrUpdate(TKey key, TValue? val, int length) { } - public System.Collections.Generic.IEnumerator> GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - public bool TryGet(TKey key, out TValue? value) { throw null; } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct PopTokenRequestContext { @@ -167,13 +157,6 @@ public partial class ProvisionableTemplateAttribute : System.Attribute public ProvisionableTemplateAttribute(string resourceName) { } public string ResourceName { get { throw null; } } } - public abstract partial class SchemaValidator - { - protected SchemaValidator() { } - public abstract string GenerateSchema(System.Type dataType); - public abstract bool TryValidate(object data, System.Type dataType, string schemaDefinition, out System.Collections.Generic.IEnumerable validationErrors); - public virtual void Validate(object data, System.Type dataType, string schemaDefinition) { } - } } namespace Azure.Core.Pipeline { diff --git a/sdk/core/Azure.Core.Experimental/api/Azure.Core.Experimental.netstandard2.0.cs b/sdk/core/Azure.Core.Experimental/api/Azure.Core.Experimental.netstandard2.0.cs index ca000285dea88..68a0cd71a1195 100644 --- a/sdk/core/Azure.Core.Experimental/api/Azure.Core.Experimental.netstandard2.0.cs +++ b/sdk/core/Azure.Core.Experimental/api/Azure.Core.Experimental.netstandard2.0.cs @@ -132,16 +132,6 @@ public partial interface ISupportsProofOfPossession Azure.Core.AccessToken GetToken(Azure.Core.PopTokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken); System.Threading.Tasks.ValueTask GetTokenAsync(Azure.Core.PopTokenRequestContext requestContext, System.Threading.CancellationToken cancellationToken); } - public partial class LruCache : System.Collections.Generic.IEnumerable>, System.Collections.IEnumerable where TKey : notnull - { - public LruCache(int capacity) { } - public int Count { get { throw null; } } - public int TotalLength { get { throw null; } } - public void AddOrUpdate(TKey key, TValue? val, int length) { } - public System.Collections.Generic.IEnumerator> GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - public bool TryGet(TKey key, out TValue? value) { throw null; } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct PopTokenRequestContext { @@ -167,13 +157,6 @@ public partial class ProvisionableTemplateAttribute : System.Attribute public ProvisionableTemplateAttribute(string resourceName) { } public string ResourceName { get { throw null; } } } - public abstract partial class SchemaValidator - { - protected SchemaValidator() { } - public abstract string GenerateSchema(System.Type dataType); - public abstract bool TryValidate(object data, System.Type dataType, string schemaDefinition, out System.Collections.Generic.IEnumerable validationErrors); - public virtual void Validate(object data, System.Type dataType, string schemaDefinition) { } - } } namespace Azure.Core.Pipeline { From 309e96e956cbd3ef2a022527cda2922cce7e5935 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 2 Jul 2024 04:16:14 -0400 Subject: [PATCH 002/144] Update AutoRest C# version to 3.0.0-beta.20240701.2 (#44832) * Update Generator Version 3.0.0-beta.20240701.2 * Update SDK codes de_he_2 * Update SDK codes ad_co_0 * Update SDK codes mi_pu_4 * Update SDK codes pu_sq_5 * Update SDK codes he_me_3 * Update SDK codes co_de_1 * mitigate breaking changes --------- Co-authored-by: Wei Hu --- eng/Packages.Data.props | 2 +- eng/emitter-package-lock.json | 16 ++++++++-------- eng/emitter-package.json | 2 +- ...ourceManager.AgFoodPlatform.netstandard2.0.cs | 2 +- .../Generated/ArmAgFoodPlatformModelFactory.cs | 6 +++--- .../src/Generated/ExtensionData.Serialization.cs | 6 +++--- .../src/Generated/ExtensionData.cs | 6 +++--- .../src/autorest.md | 1 + .../Models/BotChannelSite.Serialization.cs | 6 +++--- .../Models/DirectLineSite.Serialization.cs | 6 +++--- .../Models/WebChatSite.Serialization.cs | 6 +++--- .../ConsumptionBudgetData.Serialization.cs | 6 +++--- .../ConsumptionCreditSummary.Serialization.cs | 6 +++--- .../ConsumptionEventSummary.Serialization.cs | 6 +++--- ...nsumptionLegacyChargeSummary.Serialization.cs | 6 +++--- .../ConsumptionLotSummary.Serialization.cs | 6 +++--- ...nsumptionModernChargeSummary.Serialization.cs | 6 +++--- .../ConsumptionTagsResult.Serialization.cs | 6 +++--- .../Models/UnknownChargeSummary.Serialization.cs | 6 +++--- ...CassandraClusterPublicStatus.Serialization.cs | 6 +++--- .../src/autorest.md | 1 + .../src/autorest.md | 1 + .../src/autorest.md | 1 + .../src/autorest.md | 1 + .../src/autorest.md | 1 + .../src/autorest.md | 1 + .../src/autorest.md | 1 + .../Models/SearchMetadata.Serialization.cs | 6 +++--- .../StorageInsightData.Serialization.cs | 6 +++--- .../src/autorest.md | 1 + .../Azure.ResourceManager.Search/src/autorest.md | 1 + .../src/autorest.md | 1 + 32 files changed, 73 insertions(+), 62 deletions(-) diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index c4d703ea49782..08e715b098970 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -222,7 +222,7 @@ All should have PrivateAssets="All" set so they don't become package dependencies --> - + diff --git a/eng/emitter-package-lock.json b/eng/emitter-package-lock.json index a8dc5b369e2ce..fbfb2984ee22c 100644 --- a/eng/emitter-package-lock.json +++ b/eng/emitter-package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20240701.1" + "@azure-tools/typespec-csharp": "0.2.0-beta.20240701.2" }, "devDependencies": { "@azure-tools/typespec-autorest": "0.43.0", @@ -22,9 +22,9 @@ } }, "node_modules/@autorest/csharp": { - "version": "3.0.0-beta.20240701.1", - "resolved": "https://registry.npmjs.org/@autorest/csharp/-/csharp-3.0.0-beta.20240701.1.tgz", - "integrity": "sha512-ouoCZ1j0XtLSgTm8fFwxOCf2Ad+e4p+q7pRhiHt8Zr5JKWyupwl1GULu+cGC8VtjbZYayy6ovRkLZOKaq7NdlQ==" + "version": "3.0.0-beta.20240701.2", + "resolved": "https://registry.npmjs.org/@autorest/csharp/-/csharp-3.0.0-beta.20240701.2.tgz", + "integrity": "sha512-7lgsJPvRM4tx0z6qeCPe2OxBEZ8qhwmRnNZUX/0BH8N9geKYMSiqfHep8eBR+RGLWxdnqa3NZWiR97xUV4VAww==" }, "node_modules/@azure-tools/typespec-autorest": { "version": "0.43.0", @@ -117,11 +117,11 @@ } }, "node_modules/@azure-tools/typespec-csharp": { - "version": "0.2.0-beta.20240701.1", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-csharp/-/typespec-csharp-0.2.0-beta.20240701.1.tgz", - "integrity": "sha512-ptniTQC3MpfbUfN6aUCW9sEcx3D61l0W3DnTgJPj54HWS0eGI6EDcHoVsD69a4zop9qechv7XnLyQeG07cKAtA==", + "version": "0.2.0-beta.20240701.2", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-csharp/-/typespec-csharp-0.2.0-beta.20240701.2.tgz", + "integrity": "sha512-9yt9gie9MRUjcZ2yTTOF4RPpGQRvOrVorQ3BVbpV2sJJFtCt9oMQOZnxE0KIqLvpTPwmm8H2+xuPIBHj2G/r1g==", "dependencies": { - "@autorest/csharp": "3.0.0-beta.20240701.1", + "@autorest/csharp": "3.0.0-beta.20240701.2", "json-serialize-refs": "0.1.0-0" }, "peerDependencies": { diff --git a/eng/emitter-package.json b/eng/emitter-package.json index 41ff125278ff5..b5878ee800c25 100644 --- a/eng/emitter-package.json +++ b/eng/emitter-package.json @@ -1,7 +1,7 @@ { "main": "dist/src/index.js", "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20240701.1" + "@azure-tools/typespec-csharp": "0.2.0-beta.20240701.2" }, "devDependencies": { "@azure-tools/typespec-autorest": "0.43.0", diff --git a/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/api/Azure.ResourceManager.AgFoodPlatform.netstandard2.0.cs b/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/api/Azure.ResourceManager.AgFoodPlatform.netstandard2.0.cs index 05515c0e3ba30..4da950c09dd99 100644 --- a/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/api/Azure.ResourceManager.AgFoodPlatform.netstandard2.0.cs +++ b/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/api/Azure.ResourceManager.AgFoodPlatform.netstandard2.0.cs @@ -371,7 +371,7 @@ public static partial class ArmAgFoodPlatformModelFactory public static Azure.ResourceManager.AgFoodPlatform.Models.ArmAsyncOperation ArmAsyncOperation(string status = null) { throw null; } public static Azure.ResourceManager.AgFoodPlatform.Models.CheckNameAvailabilityResponse CheckNameAvailabilityResponse(bool? nameAvailable = default(bool?), Azure.ResourceManager.AgFoodPlatform.Models.CheckNameAvailabilityReason? reason = default(Azure.ResourceManager.AgFoodPlatform.Models.CheckNameAvailabilityReason?), string message = null) { throw null; } public static Azure.ResourceManager.AgFoodPlatform.Models.DetailedInformation DetailedInformation(string apiName = null, System.Collections.Generic.IEnumerable customParameters = null, System.Collections.Generic.IEnumerable platformParameters = null, Azure.ResourceManager.AgFoodPlatform.Models.UnitSystemsInfo unitsSupported = null, System.Collections.Generic.IEnumerable apiInputParameters = null) { throw null; } - public static Azure.ResourceManager.AgFoodPlatform.ExtensionData ExtensionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? eTag = default(Azure.ETag?), string extensionId = null, string extensionCategory = null, string installedExtensionVersion = null, string extensionAuthLink = null, string extensionApiDocsLink = null) { throw null; } + public static Azure.ResourceManager.AgFoodPlatform.ExtensionData ExtensionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? etag = default(Azure.ETag?), string extensionId = null, string extensionCategory = null, string installedExtensionVersion = null, string extensionAuthLink = null, string extensionApiDocsLink = null) { throw null; } public static Azure.ResourceManager.AgFoodPlatform.FarmBeatData FarmBeatData(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 tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, System.Uri instanceUri = null, Azure.ResourceManager.AgFoodPlatform.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.AgFoodPlatform.Models.ProvisioningState?), Azure.ResourceManager.AgFoodPlatform.Models.SensorIntegration sensorIntegration = null, Azure.ResourceManager.AgFoodPlatform.Models.PublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.AgFoodPlatform.Models.PublicNetworkAccess?), Azure.ResourceManager.AgFoodPlatform.AgFoodPlatformPrivateEndpointConnectionData privateEndpointConnections = null) { throw null; } public static Azure.ResourceManager.AgFoodPlatform.FarmBeatsExtensionData FarmBeatsExtensionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string targetResourceType = null, string farmBeatsExtensionId = null, string farmBeatsExtensionName = null, string farmBeatsExtensionVersion = null, string publisherId = null, string description = null, string extensionCategory = null, string extensionAuthLink = null, string extensionApiDocsLink = null, System.Collections.Generic.IEnumerable detailedInformation = null) { throw null; } public static Azure.ResourceManager.AgFoodPlatform.Models.SensorIntegration SensorIntegration(string enabled = null, Azure.ResourceManager.AgFoodPlatform.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.AgFoodPlatform.Models.ProvisioningState?), Azure.ResponseError provisioningInfoError = null) { throw null; } diff --git a/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/src/Generated/ArmAgFoodPlatformModelFactory.cs b/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/src/Generated/ArmAgFoodPlatformModelFactory.cs index 35dfc54e03651..1859d03e19bc7 100644 --- a/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/src/Generated/ArmAgFoodPlatformModelFactory.cs +++ b/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/src/Generated/ArmAgFoodPlatformModelFactory.cs @@ -21,21 +21,21 @@ public static partial class ArmAgFoodPlatformModelFactory /// The name. /// The resourceType. /// The systemData. - /// The ETag value to implement optimistic concurrency. + /// The ETag value to implement optimistic concurrency. /// Extension Id. /// Extension category. e.g. weather/sensor/satellite. /// Installed extension version. /// Extension auth link. /// Extension api docs link. /// A new instance for mocking. - public static ExtensionData ExtensionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ETag? eTag = null, string extensionId = null, string extensionCategory = null, string installedExtensionVersion = null, string extensionAuthLink = null, string extensionApiDocsLink = null) + public static ExtensionData ExtensionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ETag? etag = null, string extensionId = null, string extensionCategory = null, string installedExtensionVersion = null, string extensionAuthLink = null, string extensionApiDocsLink = null) { return new ExtensionData( id, name, resourceType, systemData, - eTag, + etag, extensionId, extensionCategory, installedExtensionVersion, diff --git a/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/src/Generated/ExtensionData.Serialization.cs b/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/src/Generated/ExtensionData.Serialization.cs index 57b7401e11204..6006b6fe2520f 100644 --- a/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/src/Generated/ExtensionData.Serialization.cs +++ b/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/src/Generated/ExtensionData.Serialization.cs @@ -118,7 +118,7 @@ internal static ExtensionData DeserializeExtensionData(JsonElement element, Mode { return null; } - ETag? eTag = default; + ETag? etag = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -138,7 +138,7 @@ internal static ExtensionData DeserializeExtensionData(JsonElement element, Mode { continue; } - eTag = new ETag(property.Value.GetString()); + etag = new ETag(property.Value.GetString()); continue; } if (property.NameEquals("id"u8)) @@ -213,7 +213,7 @@ internal static ExtensionData DeserializeExtensionData(JsonElement element, Mode name, type, systemData, - eTag, + etag, extensionId, extensionCategory, installedExtensionVersion, diff --git a/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/src/Generated/ExtensionData.cs b/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/src/Generated/ExtensionData.cs index 967ce7ea6a4f9..b5ec812aa4b84 100644 --- a/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/src/Generated/ExtensionData.cs +++ b/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/src/Generated/ExtensionData.cs @@ -60,16 +60,16 @@ public ExtensionData() /// The name. /// The resourceType. /// The systemData. - /// The ETag value to implement optimistic concurrency. + /// The ETag value to implement optimistic concurrency. /// Extension Id. /// Extension category. e.g. weather/sensor/satellite. /// Installed extension version. /// Extension auth link. /// Extension api docs link. /// Keeps track of any properties unknown to the library. - internal ExtensionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ETag? eTag, string extensionId, string extensionCategory, string installedExtensionVersion, string extensionAuthLink, string extensionApiDocsLink, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ExtensionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ETag? etag, string extensionId, string extensionCategory, string installedExtensionVersion, string extensionAuthLink, string extensionApiDocsLink, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { - ETag = eTag; + ETag = etag; ExtensionId = extensionId; ExtensionCategory = extensionCategory; InstalledExtensionVersion = installedExtensionVersion; diff --git a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/autorest.md b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/autorest.md index 32968abef495a..7b7c3465829eb 100644 --- a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/autorest.md +++ b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/autorest.md @@ -84,6 +84,7 @@ acronym-mapping: SSO: Sso URI: Uri Etag: ETag|etag + ETag: ETag|eTag request-path-to-parent: /subscriptions/{subscriptionId}/providers/Microsoft.AppConfiguration/deletedConfigurationStores: /subscriptions/{subscriptionId}/providers/Microsoft.AppConfiguration/locations/{location}/deletedConfigurationStores/{configStoreName} diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/BotChannelSite.Serialization.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/BotChannelSite.Serialization.cs index 4452060336317..44ddf18d2158b 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/BotChannelSite.Serialization.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/BotChannelSite.Serialization.cs @@ -176,7 +176,7 @@ internal static BotChannelSite DeserializeBotChannelSite(JsonElement element, Mo bool? isDetailedLoggingEnabled = default; bool? isBlockUserUploadEnabled = default; bool? isNoStorageEnabled = default; - ETag? eTag = default; + ETag? etag = default; string appId = default; bool? isV1Enabled = default; bool? isV3Enabled = default; @@ -274,7 +274,7 @@ internal static BotChannelSite DeserializeBotChannelSite(JsonElement element, Mo { continue; } - eTag = new ETag(property.Value.GetString()); + etag = new ETag(property.Value.GetString()); continue; } if (property.NameEquals("appId"u8)) @@ -359,7 +359,7 @@ internal static BotChannelSite DeserializeBotChannelSite(JsonElement element, Mo isDetailedLoggingEnabled, isBlockUserUploadEnabled, isNoStorageEnabled, - eTag, + etag, appId, isV1Enabled, isV3Enabled, diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/DirectLineSite.Serialization.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/DirectLineSite.Serialization.cs index 9b2e917285758..23eab9dd946e7 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/DirectLineSite.Serialization.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/DirectLineSite.Serialization.cs @@ -176,7 +176,7 @@ internal static DirectLineSite DeserializeDirectLineSite(JsonElement element, Mo bool? isDetailedLoggingEnabled = default; bool? isBlockUserUploadEnabled = default; bool? isNoStorageEnabled = default; - ETag? eTag = default; + ETag? etag = default; string appId = default; bool? isV1Enabled = default; bool? isV3Enabled = default; @@ -274,7 +274,7 @@ internal static DirectLineSite DeserializeDirectLineSite(JsonElement element, Mo { continue; } - eTag = new ETag(property.Value.GetString()); + etag = new ETag(property.Value.GetString()); continue; } if (property.NameEquals("appId"u8)) @@ -359,7 +359,7 @@ internal static DirectLineSite DeserializeDirectLineSite(JsonElement element, Mo isDetailedLoggingEnabled, isBlockUserUploadEnabled, isNoStorageEnabled, - eTag, + etag, appId, isV1Enabled, isV3Enabled, diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/WebChatSite.Serialization.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/WebChatSite.Serialization.cs index 7ea0de4290de8..f928f6a41c39d 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/WebChatSite.Serialization.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/WebChatSite.Serialization.cs @@ -176,7 +176,7 @@ internal static WebChatSite DeserializeWebChatSite(JsonElement element, ModelRea bool? isDetailedLoggingEnabled = default; bool? isBlockUserUploadEnabled = default; bool? isNoStorageEnabled = default; - ETag? eTag = default; + ETag? etag = default; string appId = default; bool? isV1Enabled = default; bool? isV3Enabled = default; @@ -274,7 +274,7 @@ internal static WebChatSite DeserializeWebChatSite(JsonElement element, ModelRea { continue; } - eTag = new ETag(property.Value.GetString()); + etag = new ETag(property.Value.GetString()); continue; } if (property.NameEquals("appId"u8)) @@ -359,7 +359,7 @@ internal static WebChatSite DeserializeWebChatSite(JsonElement element, ModelRea isDetailedLoggingEnabled, isBlockUserUploadEnabled, isNoStorageEnabled, - eTag, + etag, appId, isV1Enabled, isV3Enabled, diff --git a/sdk/consumption/Azure.ResourceManager.Consumption/src/Generated/ConsumptionBudgetData.Serialization.cs b/sdk/consumption/Azure.ResourceManager.Consumption/src/Generated/ConsumptionBudgetData.Serialization.cs index e0324c266f161..15a4607a619f8 100644 --- a/sdk/consumption/Azure.ResourceManager.Consumption/src/Generated/ConsumptionBudgetData.Serialization.cs +++ b/sdk/consumption/Azure.ResourceManager.Consumption/src/Generated/ConsumptionBudgetData.Serialization.cs @@ -140,7 +140,7 @@ internal static ConsumptionBudgetData DeserializeConsumptionBudgetData(JsonEleme { return null; } - ETag? eTag = default; + ETag? etag = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -163,7 +163,7 @@ internal static ConsumptionBudgetData DeserializeConsumptionBudgetData(JsonEleme { continue; } - eTag = new ETag(property.Value.GetString()); + etag = new ETag(property.Value.GetString()); continue; } if (property.NameEquals("id"u8)) @@ -298,7 +298,7 @@ internal static ConsumptionBudgetData DeserializeConsumptionBudgetData(JsonEleme currentSpend, notifications ?? new ChangeTrackingDictionary(), forecastSpend, - eTag, + etag, serializedAdditionalRawData); } diff --git a/sdk/consumption/Azure.ResourceManager.Consumption/src/Generated/Models/ConsumptionCreditSummary.Serialization.cs b/sdk/consumption/Azure.ResourceManager.Consumption/src/Generated/Models/ConsumptionCreditSummary.Serialization.cs index 534f4068cd1fc..489c2567a0127 100644 --- a/sdk/consumption/Azure.ResourceManager.Consumption/src/Generated/Models/ConsumptionCreditSummary.Serialization.cs +++ b/sdk/consumption/Azure.ResourceManager.Consumption/src/Generated/Models/ConsumptionCreditSummary.Serialization.cs @@ -128,7 +128,7 @@ internal static ConsumptionCreditSummary DeserializeConsumptionCreditSummary(Jso { return null; } - ETag? eTag = default; + ETag? etag = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -150,7 +150,7 @@ internal static ConsumptionCreditSummary DeserializeConsumptionCreditSummary(Jso { continue; } - eTag = new ETag(property.Value.GetString()); + etag = new ETag(property.Value.GetString()); continue; } if (property.NameEquals("id"u8)) @@ -262,7 +262,7 @@ internal static ConsumptionCreditSummary DeserializeConsumptionCreditSummary(Jso creditCurrency, billingCurrency, reseller, - eTag, + etag, serializedAdditionalRawData); } diff --git a/sdk/consumption/Azure.ResourceManager.Consumption/src/Generated/Models/ConsumptionEventSummary.Serialization.cs b/sdk/consumption/Azure.ResourceManager.Consumption/src/Generated/Models/ConsumptionEventSummary.Serialization.cs index 2d1ea9774052f..e13f2870fecbd 100644 --- a/sdk/consumption/Azure.ResourceManager.Consumption/src/Generated/Models/ConsumptionEventSummary.Serialization.cs +++ b/sdk/consumption/Azure.ResourceManager.Consumption/src/Generated/Models/ConsumptionEventSummary.Serialization.cs @@ -203,7 +203,7 @@ internal static ConsumptionEventSummary DeserializeConsumptionEventSummary(JsonE { return null; } - ETag? eTag = default; + ETag? etag = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -240,7 +240,7 @@ internal static ConsumptionEventSummary DeserializeConsumptionEventSummary(JsonE { continue; } - eTag = new ETag(property.Value.GetString()); + etag = new ETag(property.Value.GetString()); continue; } if (property.NameEquals("id"u8)) @@ -486,7 +486,7 @@ internal static ConsumptionEventSummary DeserializeConsumptionEventSummary(JsonE adjustmentsInBillingCurrency, chargesInBillingCurrency, closedBalanceInBillingCurrency, - eTag, + etag, serializedAdditionalRawData); } diff --git a/sdk/consumption/Azure.ResourceManager.Consumption/src/Generated/Models/ConsumptionLegacyChargeSummary.Serialization.cs b/sdk/consumption/Azure.ResourceManager.Consumption/src/Generated/Models/ConsumptionLegacyChargeSummary.Serialization.cs index 0f0ee5b635860..7581c8e87c8fc 100644 --- a/sdk/consumption/Azure.ResourceManager.Consumption/src/Generated/Models/ConsumptionLegacyChargeSummary.Serialization.cs +++ b/sdk/consumption/Azure.ResourceManager.Consumption/src/Generated/Models/ConsumptionLegacyChargeSummary.Serialization.cs @@ -131,7 +131,7 @@ internal static ConsumptionLegacyChargeSummary DeserializeConsumptionLegacyCharg return null; } ChargeSummaryKind kind = default; - ETag? eTag = default; + ETag? etag = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -158,7 +158,7 @@ internal static ConsumptionLegacyChargeSummary DeserializeConsumptionLegacyCharg { continue; } - eTag = new ETag(property.Value.GetString()); + etag = new ETag(property.Value.GetString()); continue; } if (property.NameEquals("id"u8)) @@ -256,7 +256,7 @@ internal static ConsumptionLegacyChargeSummary DeserializeConsumptionLegacyCharg type, systemData, kind, - eTag, + etag, serializedAdditionalRawData, billingPeriodId, usageStart, diff --git a/sdk/consumption/Azure.ResourceManager.Consumption/src/Generated/Models/ConsumptionLotSummary.Serialization.cs b/sdk/consumption/Azure.ResourceManager.Consumption/src/Generated/Models/ConsumptionLotSummary.Serialization.cs index 12a4c55a884f3..943b48c7e39e3 100644 --- a/sdk/consumption/Azure.ResourceManager.Consumption/src/Generated/Models/ConsumptionLotSummary.Serialization.cs +++ b/sdk/consumption/Azure.ResourceManager.Consumption/src/Generated/Models/ConsumptionLotSummary.Serialization.cs @@ -158,7 +158,7 @@ internal static ConsumptionLotSummary DeserializeConsumptionLotSummary(JsonEleme { return null; } - ETag? eTag = default; + ETag? etag = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -186,7 +186,7 @@ internal static ConsumptionLotSummary DeserializeConsumptionLotSummary(JsonEleme { continue; } - eTag = new ETag(property.Value.GetString()); + etag = new ETag(property.Value.GetString()); continue; } if (property.NameEquals("id"u8)) @@ -354,7 +354,7 @@ internal static ConsumptionLotSummary DeserializeConsumptionLotSummary(JsonEleme originalAmountInBillingCurrency, closedBalanceInBillingCurrency, reseller, - eTag, + etag, serializedAdditionalRawData); } diff --git a/sdk/consumption/Azure.ResourceManager.Consumption/src/Generated/Models/ConsumptionModernChargeSummary.Serialization.cs b/sdk/consumption/Azure.ResourceManager.Consumption/src/Generated/Models/ConsumptionModernChargeSummary.Serialization.cs index aac97ded9e4ec..c6b9b431d7897 100644 --- a/sdk/consumption/Azure.ResourceManager.Consumption/src/Generated/Models/ConsumptionModernChargeSummary.Serialization.cs +++ b/sdk/consumption/Azure.ResourceManager.Consumption/src/Generated/Models/ConsumptionModernChargeSummary.Serialization.cs @@ -151,7 +151,7 @@ internal static ConsumptionModernChargeSummary DeserializeConsumptionModernCharg return null; } ChargeSummaryKind kind = default; - ETag? eTag = default; + ETag? etag = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -182,7 +182,7 @@ internal static ConsumptionModernChargeSummary DeserializeConsumptionModernCharg { continue; } - eTag = new ETag(property.Value.GetString()); + etag = new ETag(property.Value.GetString()); continue; } if (property.NameEquals("id"u8)) @@ -304,7 +304,7 @@ internal static ConsumptionModernChargeSummary DeserializeConsumptionModernCharg type, systemData, kind, - eTag, + etag, serializedAdditionalRawData, billingPeriodId, usageStart, diff --git a/sdk/consumption/Azure.ResourceManager.Consumption/src/Generated/Models/ConsumptionTagsResult.Serialization.cs b/sdk/consumption/Azure.ResourceManager.Consumption/src/Generated/Models/ConsumptionTagsResult.Serialization.cs index 8e0bbdd83f4b2..ff809f7646c9c 100644 --- a/sdk/consumption/Azure.ResourceManager.Consumption/src/Generated/Models/ConsumptionTagsResult.Serialization.cs +++ b/sdk/consumption/Azure.ResourceManager.Consumption/src/Generated/Models/ConsumptionTagsResult.Serialization.cs @@ -113,7 +113,7 @@ internal static ConsumptionTagsResult DeserializeConsumptionTagsResult(JsonEleme { return null; } - ETag? eTag = default; + ETag? etag = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -131,7 +131,7 @@ internal static ConsumptionTagsResult DeserializeConsumptionTagsResult(JsonEleme { continue; } - eTag = new ETag(property.Value.GetString()); + etag = new ETag(property.Value.GetString()); continue; } if (property.NameEquals("id"u8)) @@ -208,7 +208,7 @@ internal static ConsumptionTagsResult DeserializeConsumptionTagsResult(JsonEleme tags ?? new ChangeTrackingList(), nextLink, previousLink, - eTag, + etag, serializedAdditionalRawData); } diff --git a/sdk/consumption/Azure.ResourceManager.Consumption/src/Generated/Models/UnknownChargeSummary.Serialization.cs b/sdk/consumption/Azure.ResourceManager.Consumption/src/Generated/Models/UnknownChargeSummary.Serialization.cs index ccb43364b9ce2..f8634c991afcb 100644 --- a/sdk/consumption/Azure.ResourceManager.Consumption/src/Generated/Models/UnknownChargeSummary.Serialization.cs +++ b/sdk/consumption/Azure.ResourceManager.Consumption/src/Generated/Models/UnknownChargeSummary.Serialization.cs @@ -93,7 +93,7 @@ internal static UnknownChargeSummary DeserializeUnknownChargeSummary(JsonElement return null; } ChargeSummaryKind kind = "Unknown"; - ETag? eTag = default; + ETag? etag = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -113,7 +113,7 @@ internal static UnknownChargeSummary DeserializeUnknownChargeSummary(JsonElement { continue; } - eTag = new ETag(property.Value.GetString()); + etag = new ETag(property.Value.GetString()); continue; } if (property.NameEquals("id"u8)) @@ -152,7 +152,7 @@ internal static UnknownChargeSummary DeserializeUnknownChargeSummary(JsonElement type, systemData, kind, - eTag, + etag, serializedAdditionalRawData); } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterPublicStatus.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterPublicStatus.Serialization.cs index ea2a20c8203de..4ea42e176a787 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterPublicStatus.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/Models/CassandraClusterPublicStatus.Serialization.cs @@ -106,7 +106,7 @@ internal static CassandraClusterPublicStatus DeserializeCassandraClusterPublicSt { return null; } - ETag? eTag = default; + ETag? etag = default; CassandraReaperStatus reaperStatus = default; IReadOnlyList connectionErrors = default; IReadOnlyList errors = default; @@ -121,7 +121,7 @@ internal static CassandraClusterPublicStatus DeserializeCassandraClusterPublicSt { continue; } - eTag = new ETag(property.Value.GetString()); + etag = new ETag(property.Value.GetString()); continue; } if (property.NameEquals("reaperStatus"u8)) @@ -182,7 +182,7 @@ internal static CassandraClusterPublicStatus DeserializeCassandraClusterPublicSt } serializedAdditionalRawData = rawDataDictionary; return new CassandraClusterPublicStatus( - eTag, + etag, reaperStatus, connectionErrors ?? new ChangeTrackingList(), errors ?? new ChangeTrackingList(), diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/autorest.md b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/autorest.md index b3cabc77f5b95..80521e0391e4e 100644 --- a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/autorest.md +++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/autorest.md @@ -64,6 +64,7 @@ acronym-mapping: SSO: Sso URI: Uri Etag: ETag|etag + ETag: ETag|eTag request-path-to-resource-name: /providers/Microsoft.CostManagement/views/{viewName}: TenantsCostManagementViews diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/autorest.md b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/autorest.md index 024a8c2f085ab..566adc8411ee8 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/autorest.md +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/autorest.md @@ -59,6 +59,7 @@ acronym-mapping: URI: Uri MWS: Mws Etag: ETag|etag + ETag: ETag|eTag Db: DB|db CMK: Cmk ASC: Asc diff --git a/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/autorest.md b/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/autorest.md index 0881df0056b24..96de46e2826b7 100644 --- a/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/autorest.md +++ b/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/autorest.md @@ -49,6 +49,7 @@ acronym-mapping: SSO: Sso URI: Uri Etag: ETag|etag + ETag: ETag|eTag PIN: Pin request-path-is-non-resource: diff --git a/sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate/src/autorest.md b/sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate/src/autorest.md index efff2c34459f8..1c3cdd26e4a96 100644 --- a/sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate/src/autorest.md +++ b/sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate/src/autorest.md @@ -90,6 +90,7 @@ acronym-mapping: SSO: Sso URI: Uri Etag: ETag|etag + ETag: ETag|eTag directive: - remove-operation: Accounts_Head # Not supported yet diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/autorest.md b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/autorest.md index 313330e1566bb..2b14f1ef8a219 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/autorest.md +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/autorest.md @@ -63,6 +63,7 @@ acronym-mapping: SSO: Sso URI: Uri Etag: ETag|etag + ETag: ETag|eTag prepend-rp-prefix: - TlsVersion diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/autorest.md b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/autorest.md index d281eddbfb0e9..c60c7c87c5b33 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/autorest.md +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/autorest.md @@ -77,6 +77,7 @@ acronym-mapping: SSO: Sso URI: Uri Etag: ETag|etag + ETag: ETag|eTag operations-to-lro-api-version-override: Fleets_CreateOrUpdate: "2016-03-30" diff --git a/sdk/marketplace/Azure.ResourceManager.Marketplace/src/autorest.md b/sdk/marketplace/Azure.ResourceManager.Marketplace/src/autorest.md index 64173eb13d734..b262196edc6a7 100644 --- a/sdk/marketplace/Azure.ResourceManager.Marketplace/src/autorest.md +++ b/sdk/marketplace/Azure.ResourceManager.Marketplace/src/autorest.md @@ -124,6 +124,7 @@ acronym-mapping: SSO: Sso URI: Uri Etag: ETag|etag + ETag: ETag|eTag directive: - from: Marketplace.json diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/SearchMetadata.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/SearchMetadata.Serialization.cs index f6135b6fd7da9..eebcfa328cd8b 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/SearchMetadata.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/Models/SearchMetadata.Serialization.cs @@ -170,7 +170,7 @@ internal static SearchMetadata DeserializeSearchMetadata(JsonElement element, Mo string status = default; DateTimeOffset? startTime = default; DateTimeOffset? lastUpdated = default; - ETag? eTag = default; + ETag? etag = default; IReadOnlyList sort = default; long? requestTime = default; string aggregatedValueField = default; @@ -258,7 +258,7 @@ internal static SearchMetadata DeserializeSearchMetadata(JsonElement element, Mo { continue; } - eTag = new ETag(property.Value.GetString()); + etag = new ETag(property.Value.GetString()); continue; } if (property.NameEquals("sort"u8)) @@ -337,7 +337,7 @@ internal static SearchMetadata DeserializeSearchMetadata(JsonElement element, Mo status, startTime, lastUpdated, - eTag, + etag, sort ?? new ChangeTrackingList(), requestTime, aggregatedValueField, diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/StorageInsightData.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/StorageInsightData.Serialization.cs index 5a6df3138238a..0c2d733647ebc 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/StorageInsightData.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/StorageInsightData.Serialization.cs @@ -137,7 +137,7 @@ internal static StorageInsightData DeserializeStorageInsightData(JsonElement ele { return null; } - ETag? eTag = default; + ETag? etag = default; IDictionary tags = default; ResourceIdentifier id = default; string name = default; @@ -157,7 +157,7 @@ internal static StorageInsightData DeserializeStorageInsightData(JsonElement ele { continue; } - eTag = new ETag(property.Value.GetString()); + etag = new ETag(property.Value.GetString()); continue; } if (property.NameEquals("tags"u8)) @@ -267,7 +267,7 @@ internal static StorageInsightData DeserializeStorageInsightData(JsonElement ele name, type, systemData, - eTag, + etag, tags ?? new ChangeTrackingDictionary(), containers ?? new ChangeTrackingList(), tables ?? new ChangeTrackingList(), diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/autorest.md b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/autorest.md index e792c812d588b..9b29b8157fcab 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/autorest.md +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/autorest.md @@ -326,6 +326,7 @@ acronym-mapping: SSO: Sso URI: Uri Etag: ETag|etag + ETag: ETag|eTag IaaSVM: IaasVm Iaasvm: IaasVm Sqldb: SqlDB diff --git a/sdk/search/Azure.ResourceManager.Search/src/autorest.md b/sdk/search/Azure.ResourceManager.Search/src/autorest.md index 9b1276200d443..18933445ada52 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/autorest.md +++ b/sdk/search/Azure.ResourceManager.Search/src/autorest.md @@ -92,6 +92,7 @@ acronym-mapping: SSO: Sso URI: Uri Etag: ETag|etag + ETag: ETag|eTag NSP: Nsp|nsp override-operation-name: diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/autorest.md b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/autorest.md index ea6cb9835811c..a897795fec590 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/autorest.md +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/autorest.md @@ -342,6 +342,7 @@ acronym-mapping: SSO: Sso URI: Uri Etag: ETag|etag + ETag: ETag|eTag IoT: Iot TLS: Tls VA: VulnerabilityAssessment From 0ac8bb6f894a3fb48415ffe99c2364fb8a21920e Mon Sep 17 00:00:00 2001 From: wiboris <54044985+wiboris@users.noreply.github.com> Date: Tue, 2 Jul 2024 11:07:38 -0700 Subject: [PATCH 003/144] Azure.Compute.Batch inital checkin (#44524) * inital checkin of azure.compute.batch --------- Co-authored-by: Jesse Squire --- .github/CODEOWNERS | 2 +- .vscode/cspell.json | 7 +- .../Azure.Compute.Batch.sln | 40 + sdk/batch/Azure.Compute.Batch/CHANGELOG.md | 13 + .../Azure.Compute.Batch/Directory.Build.props | 6 + sdk/batch/Azure.Compute.Batch/README.md | 308 + .../api/Azure.Compute.Batch.netstandard2.0.cs | 3255 +++ sdk/batch/Azure.Compute.Batch/assets.json | 6 + .../Azure.Compute.Batch/samples/README.md | 15 + .../samples/Sample1_CreatePool_Job_Task.md | 104 + .../src/Azure.Compute.Batch.csproj | 20 + .../src/Custom/BatchClientCustom.cs | 608 + .../Custom/BatchNamedKeyCredentialPolicy.cs | 207 + .../src/Custom/Constants.cs | 36 + .../src/Custom/Models/BatchFileProperties.cs | 57 + .../Models/BatchJobScheduleUpdateContent.cs | 17 + .../Custom/Models/BatchJobUpdateContent.cs | 17 + .../BatchPoolReplaceContent.Serialization.cs | 158 + .../Custom/Models/BatchPoolUpdateContent.cs | 17 + .../src/Generated/AccessScope.cs | 48 + .../Generated/AffinityInfo.Serialization.cs | 135 + .../src/Generated/AffinityInfo.cs | 78 + .../src/Generated/AllocationState.cs | 54 + ...thenticationTokenSettings.Serialization.cs | 152 + .../Generated/AuthenticationTokenSettings.cs | 69 + .../Generated/AutoScaleRun.Serialization.cs | 161 + .../src/Generated/AutoScaleRun.cs | 80 + .../AutoScaleRunError.Serialization.cs | 174 + .../src/Generated/AutoScaleRunError.cs | 74 + .../src/Generated/AutoUserScope.cs | 51 + .../AutoUserSpecification.Serialization.cs | 157 + .../src/Generated/AutoUserSpecification.cs | 69 + .../AutomaticOsUpgradePolicy.Serialization.cs | 187 + .../src/Generated/AutomaticOsUpgradePolicy.cs | 77 + ...obFileSystemConfiguration.Serialization.cs | 207 + .../AzureBlobFileSystemConfiguration.cs | 105 + ...ureFileShareConfiguration.Serialization.cs | 176 + .../Generated/AzureFileShareConfiguration.cs | 100 + .../BatchApplication.Serialization.cs | 161 + .../src/Generated/BatchApplication.cs | 90 + ...plicationPackageReference.Serialization.cs | 146 + .../BatchApplicationPackageReference.cs | 79 + ...atchAutoPoolSpecification.Serialization.cs | 176 + .../Generated/BatchAutoPoolSpecification.cs | 87 + .../src/Generated/BatchClient.cs | 11701 +++++++++ .../src/Generated/BatchClientOptions.cs | 37 + .../src/Generated/BatchError.Serialization.cs | 175 + .../src/Generated/BatchError.cs | 84 + .../BatchErrorDetail.Serialization.cs | 149 + .../src/Generated/BatchErrorDetail.cs | 69 + .../BatchErrorMessage.Serialization.cs | 149 + .../src/Generated/BatchErrorMessage.cs | 69 + .../src/Generated/BatchJob.Serialization.cs | 541 + .../src/Generated/BatchJob.cs | 177 + .../src/Generated/BatchJobAction.cs | 54 + .../BatchJobConstraints.Serialization.cs | 157 + .../src/Generated/BatchJobConstraints.cs | 69 + .../BatchJobCreateContent.Serialization.cs | 386 + .../src/Generated/BatchJobCreateContent.cs | 140 + .../BatchJobDisableContent.Serialization.cs | 135 + .../src/Generated/BatchJobDisableContent.cs | 72 + .../BatchJobExecutionInfo.Serialization.cs | 193 + .../src/Generated/BatchJobExecutionInfo.cs | 88 + .../BatchJobManagerTask.Serialization.cs | 390 + .../src/Generated/BatchJobManagerTask.cs | 180 + ...chJobNetworkConfiguration.Serialization.cs | 135 + .../Generated/BatchJobNetworkConfiguration.cs | 75 + ...ationAndReleaseTaskStatus.Serialization.cs | 196 + ...BatchJobPreparationAndReleaseTaskStatus.cs | 81 + .../BatchJobPreparationTask.Serialization.cs | 281 + .../src/Generated/BatchJobPreparationTask.cs | 136 + ...parationTaskExecutionInfo.Serialization.cs | 275 + .../BatchJobPreparationTaskExecutionInfo.cs | 119 + .../Generated/BatchJobPreparationTaskState.cs | 51 + .../BatchJobReleaseTask.Serialization.cs | 265 + .../src/Generated/BatchJobReleaseTask.cs | 122 + ...bReleaseTaskExecutionInfo.Serialization.cs | 250 + .../BatchJobReleaseTaskExecutionInfo.cs | 109 + .../src/Generated/BatchJobReleaseTaskState.cs | 51 + .../BatchJobSchedule.Serialization.cs | 355 + .../src/Generated/BatchJobSchedule.cs | 135 + ...hJobScheduleConfiguration.Serialization.cs | 187 + .../BatchJobScheduleConfiguration.cs | 80 + ...hJobScheduleCreateContent.Serialization.cs | 193 + .../BatchJobScheduleCreateContent.cs | 98 + ...hJobScheduleExecutionInfo.Serialization.cs | 172 + .../BatchJobScheduleExecutionInfo.cs | 76 + .../src/Generated/BatchJobScheduleState.cs | 60 + ...atchJobScheduleStatistics.Serialization.cs | 254 + .../Generated/BatchJobScheduleStatistics.cs | 153 + ...hJobScheduleUpdateContent.Serialization.cs | 182 + .../BatchJobScheduleUpdateContent.cs | 74 + .../BatchJobSchedulingError.Serialization.cs | 182 + .../src/Generated/BatchJobSchedulingError.cs | 85 + .../BatchJobSpecification.Serialization.cs | 377 + .../src/Generated/BatchJobSpecification.cs | 133 + .../src/Generated/BatchJobState.cs | 66 + .../BatchJobStatistics.Serialization.cs | 254 + .../src/Generated/BatchJobStatistics.cs | 153 + .../BatchJobTerminateContent.Serialization.cs | 138 + .../src/Generated/BatchJobTerminateContent.cs | 65 + .../BatchJobUpdateContent.Serialization.cs | 250 + .../src/Generated/BatchJobUpdateContent.cs | 90 + .../src/Generated/BatchNode.Serialization.cs | 480 + .../src/Generated/BatchNode.cs | 151 + .../BatchNodeAgentInfo.Serialization.cs | 143 + .../src/Generated/BatchNodeAgentInfo.cs | 84 + .../Generated/BatchNodeCommunicationMode.cs | 54 + .../BatchNodeCounts.Serialization.cs | 263 + .../src/Generated/BatchNodeCounts.cs | 156 + .../Generated/BatchNodeDeallocationOption.cs | 57 + ...eDisableSchedulingContent.Serialization.cs | 142 + .../BatchNodeDisableSchedulingContent.cs | 65 + .../BatchNodeDisableSchedulingOption.cs | 54 + ...NodeEndpointConfiguration.Serialization.cs | 145 + .../BatchNodeEndpointConfiguration.cs | 76 + .../Generated/BatchNodeError.Serialization.cs | 174 + .../src/Generated/BatchNodeError.cs | 74 + .../Generated/BatchNodeFile.Serialization.cs | 179 + .../src/Generated/BatchNodeFile.cs | 77 + .../src/Generated/BatchNodeFillType.cs | 51 + ...atchNodeIdentityReference.Serialization.cs | 138 + .../Generated/BatchNodeIdentityReference.cs | 68 + .../Generated/BatchNodeInfo.Serialization.cs | 200 + .../src/Generated/BatchNodeInfo.cs | 85 + ...odePlacementConfiguration.Serialization.cs | 142 + .../BatchNodePlacementConfiguration.cs | 69 + .../Generated/BatchNodePlacementPolicyType.cs | 51 + .../BatchNodeRebootContent.Serialization.cs | 142 + .../src/Generated/BatchNodeRebootContent.cs | 65 + .../src/Generated/BatchNodeRebootOption.cs | 57 + ...chNodeRemoteLoginSettings.Serialization.cs | 143 + .../Generated/BatchNodeRemoteLoginSettings.cs | 81 + .../BatchNodeRemoveContent.Serialization.cs | 175 + .../src/Generated/BatchNodeRemoveContent.cs | 84 + .../src/Generated/BatchNodeState.cs | 87 + ...atchNodeUserCreateContent.Serialization.cs | 193 + .../Generated/BatchNodeUserCreateContent.cs | 91 + ...atchNodeUserUpdateContent.Serialization.cs | 164 + .../Generated/BatchNodeUserUpdateContent.cs | 73 + .../BatchNodeVMExtension.Serialization.cs | 168 + .../src/Generated/BatchNodeVMExtension.cs | 73 + .../src/Generated/BatchPool.Serialization.cs | 757 + .../src/Generated/BatchPool.cs | 215 + .../BatchPoolCreateContent.Serialization.cs | 509 + .../src/Generated/BatchPoolCreateContent.cs | 167 + ...oolEnableAutoScaleContent.Serialization.cs | 153 + .../BatchPoolEnableAutoScaleContent.cs | 69 + ...PoolEndpointConfiguration.Serialization.cs | 145 + .../BatchPoolEndpointConfiguration.cs | 76 + ...lEvaluateAutoScaleContent.Serialization.cs | 135 + .../BatchPoolEvaluateAutoScaleContent.cs | 75 + .../BatchPoolIdentity.Serialization.cs | 160 + .../src/Generated/BatchPoolIdentity.cs | 77 + .../src/Generated/BatchPoolIdentityType.cs | 51 + .../Generated/BatchPoolInfo.Serialization.cs | 153 + .../src/Generated/BatchPoolInfo.cs | 69 + .../src/Generated/BatchPoolLifetimeOption.cs | 51 + .../BatchPoolNodeCounts.Serialization.cs | 165 + .../src/Generated/BatchPoolNodeCounts.cs | 83 + .../BatchPoolReplaceContent.Serialization.cs | 60 + .../src/Generated/BatchPoolReplaceContent.cs | 91 + .../BatchPoolResizeContent.Serialization.cs | 187 + .../src/Generated/BatchPoolResizeContent.cs | 77 + ...tchPoolResourceStatistics.Serialization.cs | 245 + .../Generated/BatchPoolResourceStatistics.cs | 144 + .../BatchPoolSpecification.Serialization.cs | 485 + .../src/Generated/BatchPoolSpecification.cs | 159 + .../src/Generated/BatchPoolState.cs | 51 + .../BatchPoolStatistics.Serialization.cs | 187 + .../src/Generated/BatchPoolStatistics.cs | 95 + .../BatchPoolUpdateContent.Serialization.cs | 207 + .../src/Generated/BatchPoolUpdateContent.cs | 79 + .../BatchPoolUsageMetrics.Serialization.cs | 173 + .../src/Generated/BatchPoolUsageMetrics.cs | 100 + .../BatchPoolUsageStatistics.Serialization.cs | 151 + .../src/Generated/BatchPoolUsageStatistics.cs | 84 + .../Generated/BatchStartTask.Serialization.cs | 253 + .../src/Generated/BatchStartTask.cs | 115 + .../BatchStartTaskInfo.Serialization.cs | 251 + .../src/Generated/BatchStartTaskInfo.cs | 108 + .../src/Generated/BatchStartTaskState.cs | 51 + .../Generated/BatchSubtask.Serialization.cs | 320 + .../src/Generated/BatchSubtask.cs | 109 + .../src/Generated/BatchSubtaskState.cs | 54 + .../BatchSupportedImage.Serialization.cs | 206 + .../src/Generated/BatchSupportedImage.cs | 106 + .../src/Generated/BatchTask.Serialization.cs | 580 + .../src/Generated/BatchTask.cs | 183 + ...chTaskAddCollectionResult.Serialization.cs | 152 + .../Generated/BatchTaskAddCollectionResult.cs | 66 + .../BatchTaskAddResult.Serialization.cs | 202 + .../src/Generated/BatchTaskAddResult.cs | 97 + .../src/Generated/BatchTaskAddStatus.cs | 54 + .../BatchTaskConstraints.Serialization.cs | 172 + .../src/Generated/BatchTaskConstraints.cs | 73 + ...askContainerExecutionInfo.Serialization.cs | 160 + .../BatchTaskContainerExecutionInfo.cs | 73 + ...atchTaskContainerSettings.Serialization.cs | 176 + .../Generated/BatchTaskContainerSettings.cs | 87 + .../BatchTaskCounts.Serialization.cs | 173 + .../src/Generated/BatchTaskCounts.cs | 96 + .../BatchTaskCountsResult.Serialization.cs | 143 + .../src/Generated/BatchTaskCountsResult.cs | 82 + .../BatchTaskCreateContent.Serialization.cs | 406 + .../src/Generated/BatchTaskCreateContent.cs | 142 + .../BatchTaskDependencies.Serialization.cs | 177 + .../src/Generated/BatchTaskDependencies.cs | 75 + .../BatchTaskExecutionInfo.Serialization.cs | 274 + .../src/Generated/BatchTaskExecutionInfo.cs | 110 + .../src/Generated/BatchTaskExecutionResult.cs | 51 + .../BatchTaskFailureInfo.Serialization.cs | 182 + .../src/Generated/BatchTaskFailureInfo.cs | 85 + .../Generated/BatchTaskGroup.Serialization.cs | 145 + .../src/Generated/BatchTaskGroup.cs | 76 + .../BatchTaskIdRange.Serialization.cs | 143 + .../src/Generated/BatchTaskIdRange.cs | 81 + .../Generated/BatchTaskInfo.Serialization.cs | 205 + .../src/Generated/BatchTaskInfo.cs | 92 + ...BatchTaskSchedulingPolicy.Serialization.cs | 135 + .../Generated/BatchTaskSchedulingPolicy.cs | 72 + .../BatchTaskSlotCounts.Serialization.cs | 173 + .../src/Generated/BatchTaskSlotCounts.cs | 96 + .../src/Generated/BatchTaskState.cs | 57 + .../BatchTaskStatistics.Serialization.cs | 227 + .../src/Generated/BatchTaskStatistics.cs | 135 + .../src/Generated/CachingType.cs | 54 + .../CifsMountConfiguration.Serialization.cs | 176 + .../src/Generated/CifsMountConfiguration.cs | 100 + .../ComputeBatchClientBuilderExtensions.cs | 35 + .../src/Generated/ComputeBatchModelFactory.cs | 1400 ++ .../ContainerConfiguration.Serialization.cs | 185 + .../src/Generated/ContainerConfiguration.cs | 82 + ...ontainerRegistryReference.Serialization.cs | 175 + .../Generated/ContainerRegistryReference.cs | 77 + .../src/Generated/ContainerType.cs | 51 + .../Generated/ContainerWorkingDirectory.cs | 51 + .../src/Generated/DataDisk.Serialization.cs | 173 + .../src/Generated/DataDisk.cs | 90 + .../src/Generated/DependencyAction.cs | 51 + .../src/Generated/DiffDiskPlacement.cs | 48 + .../DiffDiskSettings.Serialization.cs | 142 + .../src/Generated/DiffDiskSettings.cs | 68 + .../src/Generated/DisableBatchJobOption.cs | 54 + ...skEncryptionConfiguration.Serialization.cs | 152 + .../Generated/DiskEncryptionConfiguration.cs | 70 + .../src/Generated/DiskEncryptionTarget.cs | 51 + .../src/Generated/Docs/BatchClient.xml | 19681 +++++++++++++++ .../Generated/DynamicVNetAssignmentScope.cs | 51 + .../src/Generated/ElevationLevel.cs | 51 + .../EnvironmentSetting.Serialization.cs | 146 + .../src/Generated/EnvironmentSetting.cs | 79 + .../src/Generated/ErrorCategory.cs | 51 + .../ExitCodeMapping.Serialization.cs | 143 + .../src/Generated/ExitCodeMapping.cs | 84 + .../ExitCodeRangeMapping.Serialization.cs | 151 + .../src/Generated/ExitCodeRangeMapping.cs | 90 + .../Generated/ExitConditions.Serialization.cs | 228 + .../src/Generated/ExitConditions.cs | 83 + .../Generated/ExitOptions.Serialization.cs | 157 + .../src/Generated/ExitOptions.cs | 69 + .../Generated/FileProperties.Serialization.cs | 186 + .../src/Generated/FileProperties.cs | 90 + .../src/Generated/HttpHeader.Serialization.cs | 146 + .../src/Generated/HttpHeader.cs | 79 + .../Generated/ImageReference.Serialization.cs | 200 + .../src/Generated/ImageReference.cs | 89 + .../src/Generated/ImageVerificationType.cs | 51 + .../InboundEndpoint.Serialization.cs | 182 + .../src/Generated/InboundEndpoint.cs | 107 + .../src/Generated/InboundEndpointProtocol.cs | 51 + .../Generated/InboundNatPool.Serialization.cs | 199 + .../src/Generated/InboundNatPool.cs | 107 + .../InstanceViewStatus.Serialization.cs | 196 + .../src/Generated/InstanceViewStatus.cs | 81 + .../src/Generated/Internal/Argument.cs | 129 + .../Internal/ChangeTrackingDictionary.cs | 167 + .../Generated/Internal/ChangeTrackingList.cs | 153 + .../Internal/ModelSerializationExtensions.cs | 398 + .../src/Generated/Internal/Optional.cs | 51 + .../Internal/Utf8JsonRequestContent.cs | 55 + .../Generated/IpAddressProvisioningType.cs | 54 + .../LinuxUserConfiguration.Serialization.cs | 168 + .../src/Generated/LinuxUserConfiguration.cs | 73 + .../src/Generated/LoginMode.cs | 51 + .../Generated/ManagedDisk.Serialization.cs | 135 + .../src/Generated/ManagedDisk.cs | 72 + .../Generated/MetadataItem.Serialization.cs | 143 + .../src/Generated/MetadataItem.cs | 85 + .../MountConfiguration.Serialization.cs | 187 + .../src/Generated/MountConfiguration.cs | 77 + .../MultiInstanceSettings.Serialization.cs | 175 + .../src/Generated/MultiInstanceSettings.cs | 89 + .../Generated/NameValuePair.Serialization.cs | 149 + .../src/Generated/NameValuePair.cs | 69 + .../NetworkConfiguration.Serialization.cs | 204 + .../src/Generated/NetworkConfiguration.cs | 81 + .../NetworkSecurityGroupRule.Serialization.cs | 176 + .../src/Generated/NetworkSecurityGroupRule.cs | 92 + .../NetworkSecurityGroupRuleAccess.cs | 51 + .../NfsMountConfiguration.Serialization.cs | 154 + .../src/Generated/NfsMountConfiguration.cs | 86 + .../src/Generated/OSDisk.Serialization.cs | 208 + .../src/Generated/OSDisk.cs | 81 + .../src/Generated/OSType.cs | 51 + .../src/Generated/OnAllBatchTasksComplete.cs | 51 + .../src/Generated/OnBatchTaskFailure.cs | 51 + .../src/Generated/OutputFile.Serialization.cs | 151 + .../src/Generated/OutputFile.cs | 89 + ...eBlobContainerDestination.Serialization.cs | 186 + .../OutputFileBlobContainerDestination.cs | 88 + .../OutputFileDestination.Serialization.cs | 142 + .../src/Generated/OutputFileDestination.cs | 65 + .../Generated/OutputFileUploadCondition.cs | 54 + .../OutputFileUploadConfig.Serialization.cs | 135 + .../src/Generated/OutputFileUploadConfig.cs | 75 + ...licIpAddressConfiguration.Serialization.cs | 167 + .../Generated/PublicIpAddressConfiguration.cs | 70 + .../Generated/RecentBatchJob.Serialization.cs | 149 + .../src/Generated/RecentBatchJob.cs | 69 + .../Generated/ResizeError.Serialization.cs | 174 + .../src/Generated/ResizeError.cs | 74 + .../Generated/ResourceFile.Serialization.cs | 216 + .../src/Generated/ResourceFile.cs | 89 + .../RollingUpgradePolicy.Serialization.cs | 240 + .../src/Generated/RollingUpgradePolicy.cs | 89 + .../src/Generated/SchedulingState.cs | 51 + .../SecurityProfile.Serialization.cs | 151 + .../src/Generated/SecurityProfile.cs | 87 + .../src/Generated/SecurityTypes.cs | 48 + .../ServiceArtifactReference.Serialization.cs | 135 + .../src/Generated/ServiceArtifactReference.cs | 78 + .../src/Generated/StatusLevelTypes.cs | 54 + .../src/Generated/StorageAccountType.cs | 54 + .../Generated/UefiSettings.Serialization.cs | 157 + .../src/Generated/UefiSettings.cs | 69 + .../src/Generated/UpgradeMode.cs | 54 + .../Generated/UpgradePolicy.Serialization.cs | 165 + .../src/Generated/UpgradePolicy.cs | 80 + ...adBatchServiceLogsContent.Serialization.cs | 173 + .../UploadBatchServiceLogsContent.cs | 89 + ...oadBatchServiceLogsResult.Serialization.cs | 143 + .../Generated/UploadBatchServiceLogsResult.cs | 81 + .../Generated/UserAccount.Serialization.cs | 194 + .../src/Generated/UserAccount.cs | 97 + .../UserAssignedIdentity.Serialization.cs | 157 + .../src/Generated/UserAssignedIdentity.cs | 83 + .../Generated/UserIdentity.Serialization.cs | 153 + .../src/Generated/UserIdentity.cs | 69 + .../Generated/VMExtension.Serialization.cs | 279 + .../src/Generated/VMExtension.cs | 116 + .../VMExtensionInstanceView.Serialization.cs | 188 + .../src/Generated/VMExtensionInstanceView.cs | 75 + ...rtualMachineConfiguration.Serialization.cs | 322 + .../Generated/VirtualMachineConfiguration.cs | 147 + .../VirtualMachineInfo.Serialization.cs | 153 + .../src/Generated/VirtualMachineInfo.cs | 69 + .../WindowsConfiguration.Serialization.cs | 142 + .../src/Generated/WindowsConfiguration.cs | 65 + .../WindowsUserConfiguration.Serialization.cs | 142 + .../src/Generated/WindowsUserConfiguration.cs | 65 + .../src/GlobalSuppressions.cs | 13 + .../src/Properties/AssemblyInfo.cs | 11 + .../tests/Azure.Compute.Batch.Tests.csproj | 27 + .../Generated/Samples/Samples_BatchClient.cs | 20363 ++++++++++++++++ .../tests/Infrastructure/BatchLiveTestBase.cs | 117 + .../BatchLiveTestEnvironment.cs | 21 + .../tests/Infrastructure/PoolFixture.cs | 107 + .../tests/Infrastructure/TestUtilities.cs | 108 + .../Infrastructure/WindowsPoolFixture.cs | 68 + .../BatchApplicationsIntegrationTests.cs | 52 + .../Integration/BatchJobIntegrationTests.cs | 173 + .../BatchJobScheduleIntegrationTests.cs | 288 + .../Integration/BatchNodeIntegrationTests.cs | 255 + .../Integration/BatchPoolIntegrationTests.cs | 308 + .../Integration/BatchTaskIntegrationTests.cs | 282 + .../tests/Integration/FileIntegrationTests.cs | 186 + .../tests/Integration/MiscIntegrationTests.cs | 48 + .../tests/Snippets/ReadMeSnippets.cs | 202 + .../Snippets/Sample1_CreatePool_Job_Task.cs | 108 + .../Azure.Compute.Batch/tsp-location.yaml | 3 + sdk/batch/ci.data.yml | 49 + sdk/batch/ci.mgmt.yml | 1 + sdk/batch/ci.yml | 18 +- sdk/batch/service.projects | 28 + sdk/batch/test-resources.json | 53 +- sdk/batch/tests.yml | 11 + 387 files changed, 105771 insertions(+), 14 deletions(-) create mode 100644 sdk/batch/Azure.Compute.Batch/Azure.Compute.Batch.sln create mode 100644 sdk/batch/Azure.Compute.Batch/CHANGELOG.md create mode 100644 sdk/batch/Azure.Compute.Batch/Directory.Build.props create mode 100644 sdk/batch/Azure.Compute.Batch/README.md create mode 100644 sdk/batch/Azure.Compute.Batch/api/Azure.Compute.Batch.netstandard2.0.cs create mode 100644 sdk/batch/Azure.Compute.Batch/assets.json create mode 100644 sdk/batch/Azure.Compute.Batch/samples/README.md create mode 100644 sdk/batch/Azure.Compute.Batch/samples/Sample1_CreatePool_Job_Task.md create mode 100644 sdk/batch/Azure.Compute.Batch/src/Azure.Compute.Batch.csproj create mode 100644 sdk/batch/Azure.Compute.Batch/src/Custom/BatchClientCustom.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Custom/BatchNamedKeyCredentialPolicy.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Custom/Constants.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Custom/Models/BatchFileProperties.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Custom/Models/BatchJobScheduleUpdateContent.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Custom/Models/BatchJobUpdateContent.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Custom/Models/BatchPoolReplaceContent.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Custom/Models/BatchPoolUpdateContent.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/AccessScope.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/AffinityInfo.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/AffinityInfo.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/AllocationState.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/AuthenticationTokenSettings.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/AuthenticationTokenSettings.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/AutoScaleRun.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/AutoScaleRun.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/AutoScaleRunError.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/AutoScaleRunError.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/AutoUserScope.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/AutoUserSpecification.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/AutoUserSpecification.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/AutomaticOsUpgradePolicy.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/AutomaticOsUpgradePolicy.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/AzureBlobFileSystemConfiguration.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/AzureBlobFileSystemConfiguration.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/AzureFileShareConfiguration.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/AzureFileShareConfiguration.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchApplication.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchApplication.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchApplicationPackageReference.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchApplicationPackageReference.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchAutoPoolSpecification.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchAutoPoolSpecification.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchClient.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchClientOptions.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchError.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchError.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchErrorDetail.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchErrorDetail.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchErrorMessage.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchErrorMessage.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJob.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJob.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobAction.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobConstraints.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobConstraints.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobCreateContent.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobCreateContent.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobDisableContent.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobDisableContent.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobExecutionInfo.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobExecutionInfo.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobManagerTask.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobManagerTask.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobNetworkConfiguration.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobNetworkConfiguration.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobPreparationAndReleaseTaskStatus.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobPreparationAndReleaseTaskStatus.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobPreparationTask.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobPreparationTask.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobPreparationTaskExecutionInfo.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobPreparationTaskExecutionInfo.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobPreparationTaskState.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobReleaseTask.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobReleaseTask.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobReleaseTaskExecutionInfo.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobReleaseTaskExecutionInfo.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobReleaseTaskState.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobSchedule.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobSchedule.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleConfiguration.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleConfiguration.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleCreateContent.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleCreateContent.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleExecutionInfo.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleExecutionInfo.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleState.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleStatistics.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleStatistics.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleUpdateContent.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleUpdateContent.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobSchedulingError.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobSchedulingError.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobSpecification.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobSpecification.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobState.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobStatistics.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobStatistics.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobTerminateContent.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobTerminateContent.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobUpdateContent.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobUpdateContent.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNode.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNode.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeAgentInfo.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeAgentInfo.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeCommunicationMode.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeCounts.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeCounts.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeDeallocationOption.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeDisableSchedulingContent.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeDisableSchedulingContent.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeDisableSchedulingOption.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeEndpointConfiguration.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeEndpointConfiguration.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeError.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeError.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeFile.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeFile.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeFillType.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeIdentityReference.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeIdentityReference.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeInfo.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeInfo.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodePlacementConfiguration.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodePlacementConfiguration.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodePlacementPolicyType.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeRebootContent.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeRebootContent.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeRebootOption.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeRemoteLoginSettings.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeRemoteLoginSettings.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeRemoveContent.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeRemoveContent.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeState.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeUserCreateContent.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeUserCreateContent.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeUserUpdateContent.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeUserUpdateContent.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeVMExtension.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeVMExtension.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchPool.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchPool.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolCreateContent.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolCreateContent.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolEnableAutoScaleContent.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolEnableAutoScaleContent.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolEndpointConfiguration.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolEndpointConfiguration.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolEvaluateAutoScaleContent.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolEvaluateAutoScaleContent.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolIdentity.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolIdentity.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolIdentityType.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolInfo.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolInfo.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolLifetimeOption.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolNodeCounts.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolNodeCounts.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolReplaceContent.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolReplaceContent.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolResizeContent.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolResizeContent.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolResourceStatistics.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolResourceStatistics.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolSpecification.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolSpecification.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolState.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolStatistics.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolStatistics.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolUpdateContent.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolUpdateContent.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolUsageMetrics.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolUsageMetrics.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolUsageStatistics.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolUsageStatistics.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchStartTask.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchStartTask.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchStartTaskInfo.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchStartTaskInfo.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchStartTaskState.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchSubtask.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchSubtask.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchSubtaskState.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchSupportedImage.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchSupportedImage.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTask.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTask.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskAddCollectionResult.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskAddCollectionResult.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskAddResult.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskAddResult.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskAddStatus.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskConstraints.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskConstraints.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskContainerExecutionInfo.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskContainerExecutionInfo.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskContainerSettings.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskContainerSettings.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskCounts.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskCounts.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskCountsResult.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskCountsResult.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskCreateContent.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskCreateContent.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskDependencies.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskDependencies.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskExecutionInfo.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskExecutionInfo.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskExecutionResult.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskFailureInfo.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskFailureInfo.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskGroup.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskGroup.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskIdRange.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskIdRange.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskInfo.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskInfo.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskSchedulingPolicy.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskSchedulingPolicy.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskSlotCounts.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskSlotCounts.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskState.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskStatistics.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskStatistics.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/CachingType.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/CifsMountConfiguration.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/CifsMountConfiguration.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/ComputeBatchClientBuilderExtensions.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/ComputeBatchModelFactory.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/ContainerConfiguration.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/ContainerConfiguration.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/ContainerRegistryReference.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/ContainerRegistryReference.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/ContainerType.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/ContainerWorkingDirectory.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/DataDisk.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/DataDisk.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/DependencyAction.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/DiffDiskPlacement.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/DiffDiskSettings.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/DiffDiskSettings.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/DisableBatchJobOption.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/DiskEncryptionConfiguration.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/DiskEncryptionConfiguration.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/DiskEncryptionTarget.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/Docs/BatchClient.xml create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/DynamicVNetAssignmentScope.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/ElevationLevel.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/EnvironmentSetting.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/EnvironmentSetting.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/ErrorCategory.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/ExitCodeMapping.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/ExitCodeMapping.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/ExitCodeRangeMapping.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/ExitCodeRangeMapping.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/ExitConditions.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/ExitConditions.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/ExitOptions.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/ExitOptions.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/FileProperties.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/FileProperties.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/HttpHeader.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/HttpHeader.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/ImageReference.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/ImageReference.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/ImageVerificationType.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/InboundEndpoint.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/InboundEndpoint.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/InboundEndpointProtocol.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/InboundNatPool.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/InboundNatPool.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/InstanceViewStatus.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/InstanceViewStatus.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/Internal/Argument.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/Internal/ChangeTrackingDictionary.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/Internal/ChangeTrackingList.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/Internal/ModelSerializationExtensions.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/Internal/Optional.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/Internal/Utf8JsonRequestContent.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/IpAddressProvisioningType.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/LinuxUserConfiguration.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/LinuxUserConfiguration.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/LoginMode.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/ManagedDisk.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/ManagedDisk.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/MetadataItem.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/MetadataItem.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/MountConfiguration.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/MountConfiguration.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/MultiInstanceSettings.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/MultiInstanceSettings.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/NameValuePair.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/NameValuePair.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/NetworkConfiguration.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/NetworkConfiguration.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/NetworkSecurityGroupRule.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/NetworkSecurityGroupRule.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/NetworkSecurityGroupRuleAccess.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/NfsMountConfiguration.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/NfsMountConfiguration.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/OSDisk.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/OSDisk.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/OSType.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/OnAllBatchTasksComplete.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/OnBatchTaskFailure.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/OutputFile.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/OutputFile.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/OutputFileBlobContainerDestination.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/OutputFileBlobContainerDestination.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/OutputFileDestination.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/OutputFileDestination.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/OutputFileUploadCondition.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/OutputFileUploadConfig.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/OutputFileUploadConfig.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/PublicIpAddressConfiguration.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/PublicIpAddressConfiguration.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/RecentBatchJob.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/RecentBatchJob.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/ResizeError.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/ResizeError.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/ResourceFile.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/ResourceFile.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/RollingUpgradePolicy.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/RollingUpgradePolicy.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/SchedulingState.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/SecurityProfile.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/SecurityProfile.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/SecurityTypes.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/ServiceArtifactReference.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/ServiceArtifactReference.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/StatusLevelTypes.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/StorageAccountType.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/UefiSettings.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/UefiSettings.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/UpgradeMode.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/UpgradePolicy.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/UpgradePolicy.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/UploadBatchServiceLogsContent.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/UploadBatchServiceLogsContent.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/UploadBatchServiceLogsResult.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/UploadBatchServiceLogsResult.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/UserAccount.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/UserAccount.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/UserAssignedIdentity.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/UserAssignedIdentity.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/UserIdentity.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/UserIdentity.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/VMExtension.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/VMExtension.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/VMExtensionInstanceView.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/VMExtensionInstanceView.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/VirtualMachineConfiguration.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/VirtualMachineConfiguration.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/VirtualMachineInfo.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/VirtualMachineInfo.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/WindowsConfiguration.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/WindowsConfiguration.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/WindowsUserConfiguration.Serialization.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Generated/WindowsUserConfiguration.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/GlobalSuppressions.cs create mode 100644 sdk/batch/Azure.Compute.Batch/src/Properties/AssemblyInfo.cs create mode 100644 sdk/batch/Azure.Compute.Batch/tests/Azure.Compute.Batch.Tests.csproj create mode 100644 sdk/batch/Azure.Compute.Batch/tests/Generated/Samples/Samples_BatchClient.cs create mode 100644 sdk/batch/Azure.Compute.Batch/tests/Infrastructure/BatchLiveTestBase.cs create mode 100644 sdk/batch/Azure.Compute.Batch/tests/Infrastructure/BatchLiveTestEnvironment.cs create mode 100644 sdk/batch/Azure.Compute.Batch/tests/Infrastructure/PoolFixture.cs create mode 100644 sdk/batch/Azure.Compute.Batch/tests/Infrastructure/TestUtilities.cs create mode 100644 sdk/batch/Azure.Compute.Batch/tests/Infrastructure/WindowsPoolFixture.cs create mode 100644 sdk/batch/Azure.Compute.Batch/tests/Integration/BatchApplicationsIntegrationTests.cs create mode 100644 sdk/batch/Azure.Compute.Batch/tests/Integration/BatchJobIntegrationTests.cs create mode 100644 sdk/batch/Azure.Compute.Batch/tests/Integration/BatchJobScheduleIntegrationTests.cs create mode 100644 sdk/batch/Azure.Compute.Batch/tests/Integration/BatchNodeIntegrationTests.cs create mode 100644 sdk/batch/Azure.Compute.Batch/tests/Integration/BatchPoolIntegrationTests.cs create mode 100644 sdk/batch/Azure.Compute.Batch/tests/Integration/BatchTaskIntegrationTests.cs create mode 100644 sdk/batch/Azure.Compute.Batch/tests/Integration/FileIntegrationTests.cs create mode 100644 sdk/batch/Azure.Compute.Batch/tests/Integration/MiscIntegrationTests.cs create mode 100644 sdk/batch/Azure.Compute.Batch/tests/Snippets/ReadMeSnippets.cs create mode 100644 sdk/batch/Azure.Compute.Batch/tests/Snippets/Sample1_CreatePool_Job_Task.cs create mode 100644 sdk/batch/Azure.Compute.Batch/tsp-location.yaml create mode 100644 sdk/batch/ci.data.yml create mode 100644 sdk/batch/tests.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 8a21ce69953a8..a124b2e554c63 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -157,7 +157,7 @@ # ServiceOwners: @rpsqrd @edyoung # PRLabel: %Batch -/sdk/batch/ @wiboris @dpwatrous +/sdk/batch/ @wiboris @dpwatrous @wanghoppe @skapur12 @cRui861 # ServiceLabel: %Batch # ServiceOwners: @wiboris @dpwatrous diff --git a/.vscode/cspell.json b/.vscode/cspell.json index ea400c192b54f..6a867c8d4cc9c 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -217,7 +217,12 @@ { "filename": "**/sdk/batch/**/*.cs", "words": [ - "cifs" + "cifs", + "ocpdate", + "Reimage", + "Reimaging", + "reimaging", + "SSDLRS" ] }, { diff --git a/sdk/batch/Azure.Compute.Batch/Azure.Compute.Batch.sln b/sdk/batch/Azure.Compute.Batch/Azure.Compute.Batch.sln new file mode 100644 index 0000000000000..a3e8637bffca0 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/Azure.Compute.Batch.sln @@ -0,0 +1,40 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.10.35004.147 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Core.TestFramework", "..\..\core\Azure.Core.TestFramework\src\Azure.Core.TestFramework.csproj", "{ECC730C1-4AEA-420C-916A-66B19B79E4DC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Compute.Batch", "src\Azure.Compute.Batch.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Compute.Batch.Tests", "tests\Azure.Compute.Batch.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.Batch", "..\Azure.ResourceManager.Batch\src\Azure.ResourceManager.Batch.csproj", "{589967E4-EA4A-4CC2-9C4B-AA0F659F4B56}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Release|Any CPU.Build.0 = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.Build.0 = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU + {589967E4-EA4A-4CC2-9C4B-AA0F659F4B56}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {589967E4-EA4A-4CC2-9C4B-AA0F659F4B56}.Release|Any CPU.ActiveCfg = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE} + EndGlobalSection +EndGlobal diff --git a/sdk/batch/Azure.Compute.Batch/CHANGELOG.md b/sdk/batch/Azure.Compute.Batch/CHANGELOG.md new file mode 100644 index 0000000000000..1cf622ded57f4 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/CHANGELOG.md @@ -0,0 +1,13 @@ +# Release History + +## 1.0.0-beta.1 (2024-06-01) + +### Features Added + +New design of track 2 initial commit. This package, `Azure.Compute.Batch`, replaces `Microsoft.Azure.Batch`. + +This package follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities. + +This package is a Public Preview version, so expect incompatible changes in subsequent releases as we improve the product. To provide feedback, submit an issue in our [Azure SDK for .NET GitHub repo](https://github.com/Azure/azure-sdk-for-net/issues). + +> NOTE: For more information about unified authentication, please refer to [Microsoft Azure Identity documentation for .NET](https://docs.microsoft.com//dotnet/api/overview/azure/identity-readme?view=azure-dotnet). diff --git a/sdk/batch/Azure.Compute.Batch/Directory.Build.props b/sdk/batch/Azure.Compute.Batch/Directory.Build.props new file mode 100644 index 0000000000000..63bd836ad44b7 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/batch/Azure.Compute.Batch/README.md b/sdk/batch/Azure.Compute.Batch/README.md new file mode 100644 index 0000000000000..1cafcccf5f0e1 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/README.md @@ -0,0 +1,308 @@ +# Azure Batch client library for .NET + +Azure Batch allows users to run large-scale parallel and high-performance computing (HPC) batch jobs efficiently in Azure. + +Use the client library for to: + +* Create and manage Batch jobs and tasks +* View and perform operations on nodes in a Batch pool + + [Source code](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/batch/Azure.Compute.Batch/src) | [Package (NuGet)](https://www.nuget.org/packages) | [API reference documentation](https://learn.microsoft.com/dotnet/api/overview/azure/batch?view=azure-dotnet) | [Product documentation](https://learn.microsoft.com/azure/batch/) + +## Getting started + +### Install the package + +Install the client library for .NET with [NuGet](https://www.nuget.org/ ): + +```dotnetcli +dotnet add package Azure.Compute.Batch --prerelease +``` + +### Prerequisites + +- An Azure account with an active subscription. If you don't have one, [create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F). + +- A Batch account with a linked Azure Storage account. You can create the accounts by using any of the following methods: [Azure CLI](https://learn.microsoft.com/azure/batch/quick-create-cli) | [Azure portal](https://learn.microsoft.com/azure/batch/quick-create-portal) | [Bicep](https://learn.microsoft.com/azure/batch/quick-create-bicep) | [ARM template](https://learn.microsoft.com/azure/batch/quick-create-template) | [Terraform](https://learn.microsoft.com/azure/batch/quick-create-terraform). + +- [Visual Studio 2019](https://www.visualstudio.com/vs) or later, or the [.NET SDK](https://dotnet.microsoft.com/download/dotnet) version 6.0 or later. + +### Authenticate the client + +Batch account access supports two methods of authentication: Shared Key and Microsoft Entra ID. + +We strongly recommend using Microsoft Entra ID for Batch account authentication. Some Batch capabilities require this method of authentication, including many of the security-related features discussed here. The service API authentication mechanism for a Batch account can be restricted to only Microsoft Entra ID using the [allowedAuthenticationModes](https://learn.microsoft.com/rest/api/batchmanagement/batch-account/create?view=rest-batchmanagement-2024-02-01&tabs=HTTP) property. When this property is set, API calls using Shared Key authentication will be rejected. + +#### Authenticate using Microsoft Entra ID + +Azure Batch provides integration with Microsoft Entra ID for identity-based authentication of requests. With Azure AD, you can use role-based access control (RBAC) to grant access to your Azure Batch resources to users, groups, or applications. The [Azure Identity library](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/identity/Azure.Identity/README.md) provides easy Microsoft Entra ID support for authentication. + + +```C# Snippet:Batch_Readme_EntraIDCredential +var credential = new DefaultAzureCredential(); +BatchClient _batchClient = new BatchClient( +new Uri("https://.eastus.batch.azure.com"), credential); +``` + +#### Authenticate using Shared Key + +You can also use Shared Key authentication to sign into your Batch account. This method uses your Batch account access keys to authenticate Azure commands for the Batch service. You can find your batch account shared keys in the portal under the "keys" section or you can run the following [CLI command](https://learn.microsoft.com/cli/azure/batch/account/keys?view=azure-cli-latest) + +```bash +az batch account keys list --name --resource-group +``` + +```C# Snippet:Batch_Readme_AzureNameKeyCredential +var credential = new AzureNamedKeyCredential("", "BatchAccountKey"); +BatchClient _batchClient = new BatchClient( + new Uri("https://.eastus.batch.azure.com"), + credential); +``` + +## Key concepts + +[Azure Batch Overview](https://learn.microsoft.com/azure/batch/batch-technical-overview) + +### Thread safety + +We guarantee that all client instance methods are thread-safe and independent of each other ([guideline](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-service-methods-thread-safety)). This ensures that the recommendation of reusing client instances is always safe, even across threads. + +### Additional concepts + +[Client options](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#configuring-service-clients-using-clientoptions) | +[Accessing the response](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#accessing-http-response-details-using-responset) | +[Long-running operations](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#consuming-long-running-operations-using-operationt) | +[Handling failures](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#reporting-errors-requestfailedexception) | +[Diagnostics](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/Diagnostics.md) | +[Mocking](https://learn.microsoft.com/dotnet/azure/sdk/unit-testing-mocking?tabs=csharp) | +[Client lifetime](https://devblogs.microsoft.com/azure-sdk/lifetime-management-and-thread-safety-guarantees-of-azure-sdk-net-clients/) + + +## Examples + +The Azure.Compute.Batch package supports synchronous and asynchronous APIs. + +The following section provides several synchronous code snippets covering some of the most common Azure Batch related tasks: + +* [Create a pool](#create-a-pool) +* [Retrieve a pool](#retrieve-a-pool) +* [List pools ](#list-pools) +* [Retrieve a node](#retrieve-a-node) +* [List nodes](#list-nodes) +* [Create a job](#create-a-job) +* [Retrieve a job](#retrieve-a-job) +* [List jobs](#list-jobss) +* [Create a task](#create-a-task) +* [Retrieve a task](#retrieve-a-task) +* [Retrieve an output file from a task](#retrieve-an-output-file-from-a-task) + +### Create a Pool + +In an Azure Batch workflow, a compute node (or node) is a virtual machine that processes a portion of your application's workload. A pool is a collection of these nodes for your application to runs on. For more information see [Nodes and pools in Azure Batch](https://learn.microsoft.com/azure/batch/nodes-and-pools). + +Use the `CreatePool` method with a `BatchPoolCreateContent` instance to create a `BatchPool`. + +```C# Snippet:Batch_Readme_PoolCreation +BatchClient _batchClient = new BatchClient( +new Uri("https://.eastus.batch.azure.com"), new DefaultAzureCredential()); + +string poolID = "HelloWorldPool"; + +ImageReference imageReference = new ImageReference() +{ + Publisher = "MicrosoftWindowsServer", + Offer = "WindowsServer", + Sku = "2019-datacenter-smalldisk", + Version = "latest" +}; + +VirtualMachineConfiguration virtualMachineConfiguration = new VirtualMachineConfiguration(imageReference, "batch.node.windows amd64"); + +BatchPoolCreateContent batchPoolCreateOptions = new BatchPoolCreateContent( +poolID, "STANDARD_D1_v2") +{ + VirtualMachineConfiguration = virtualMachineConfiguration, + TargetDedicatedNodes = 2, +}; + +// create pool +_batchClient.CreatePool(batchPoolCreateOptions); +``` + +### Retrieve a Pool + +`GetPool` can be used to retrieve created pools + +```C# Snippet:Batch_Readme_PoolRetreival +BatchClient _batchClient = new BatchClient( +new Uri("https://.eastus.batch.azure.com"), new DefaultAzureCredential()); + +BatchPool batchPool = _batchClient.GetPool("poolID"); + +Console.WriteLine(batchPool.Id); +Console.WriteLine(batchPool.Url); +Console.WriteLine(batchPool.AllocationState); +``` + +### List Pools + +`GetPools` can be used to list all pools under the Batch account + +```C# Snippet:Batch_Readme_ListPools +BatchClient _batchClient = new BatchClient( +new Uri("https://.eastus.batch.azure.com"), new DefaultAzureCredential()); + +foreach (BatchPool item in _batchClient.GetPools()) +{ + Console.WriteLine(item.Id); +} +``` + +### Retrieve a Node + +A node is an Azure virtual machine (VM) that is dedicated to processing a portion of your application's workload. The size of a node determines the number of CPU cores, memory capacity, and local file system size that is allocated to the node. For more information see [Nodes and pools in Azure Batch](https://learn.microsoft.com/azure/batch/nodes-and-pools). + +`GetNode` can be used to retrieve an allocated `BatchNode` from a pool. + +```C# Snippet:Batch_Readme_NodeRetreival +BatchClient _batchClient = new BatchClient( +new Uri("https://.eastus.batch.azure.com"), new DefaultAzureCredential()); + +BatchNode batchNode = _batchClient.GetNode("", ""); +Console.WriteLine(batchNode.Id); +Console.WriteLine(batchNode.Url); +Console.WriteLine(batchNode.State); +``` + +### List Nodes + +`GetNodes` can be used to list all `BatchNode` allocated under a pool + +```C# Snippet:Batch_Readme_ListNodes +BatchClient _batchClient = new BatchClient( +new Uri("https://.eastus.batch.azure.com"), new DefaultAzureCredential()); + +foreach (BatchNode item in _batchClient.GetNodes("poolID")) +{ + Console.WriteLine(item.Id); +} +``` + +### Create a Job +A job is a collection of tasks. It manages how computation is performed by its tasks on the compute nodes in a pool. + +A job specifies the pool in which the work is to be run. You can create a new pool for each job, or use one pool for many jobs. You can create a pool for each job that is associated with a job schedule, or one pool for all jobs that are associated with a job schedule. For more information see [Jobs and tasks in Azure Batch](https://learn.microsoft.com/azure/batch/jobs-and-tasks). + +Use the `CreateJob` method with a `BatchJobCreateContent` instance to create a `BatchJob`. + +```C# Snippet:Batch_Readme_JobCreation +BatchClient _batchClient = new BatchClient( +new Uri("https://.eastus.batch.azure.com"), new DefaultAzureCredential()); + +_batchClient.CreateJob(new BatchJobCreateContent("jobId", new BatchPoolInfo() { PoolId = "poolName" })); +``` + +### Retrieve a job + +`GetJob` can be used to retrieve a created `BatchJob` + +```C# Snippet:Batch_Readme_JobRetreival +BatchClient _batchClient = new BatchClient( +new Uri("https://.eastus.batch.azure.com"), new DefaultAzureCredential()); + +BatchJob batchJob = _batchClient.GetJob("jobID"); +Console.WriteLine(batchJob.Id); +Console.WriteLine(batchJob.State); +``` + +### List jobs + +`GetJobs` can be used to list all `BatchJob` allocated under a Batch Account + +```C# Snippet:Batch_Readme_ListJobs +BatchClient _batchClient = new BatchClient( +new Uri("https://.eastus.batch.azure.com"), new DefaultAzureCredential()); + +foreach (BatchJob item in _batchClient.GetJobs()) +{ + Console.WriteLine(item.Id); +} +``` + +### Create a task + +A task is a unit of computation that is associated with a job. It runs on a node. Tasks are assigned to a node for execution, or are queued until a node becomes free. Put simply, a task runs one or more programs or scripts on a compute node to perform the work you need done. For more information see [Jobs and tasks in Azure Batch](https://learn.microsoft.com/azure/batch/jobs-and-tasks). + +Use the `CreateTask` method with a `BatchTaskCreateContent` instance to create a `BatchTask`. + +```C# Snippet:Batch_Readme_TaskCreation +BatchClient _batchClient = new BatchClient( +new Uri("https://.eastus.batch.azure.com"), new DefaultAzureCredential()); + +_batchClient.CreateTask("jobId", new BatchTaskCreateContent("taskId", $"echo Hello world")); +``` + +### Retrieve a task + +`GetTask` can be used to retrieve a created `BatchTask` + +```C# Snippet:Batch_Readme_TaskRetreival +BatchClient _batchClient = new BatchClient( +new Uri("https://.eastus.batch.azure.com"), new DefaultAzureCredential()); + +BatchTask batchTask = _batchClient.GetTask("", ""); +Console.WriteLine(batchTask.Id); +Console.WriteLine(batchTask.State); +``` + +### Retrieve an output file from a task + +In Azure Batch, each task has a working directory under which it can create files and directories. This working directory can be used for storing the program that is run by the task, the data that it processes, and the output of the processing it performs. All files and directories of a task are owned by the task user. + +The Batch service exposes a portion of the file system on a node as the root directory. This root directory is located on the temporary storage drive of the VM, not directly on the OS drive. + +Tasks can access the root directory by referencing the AZ_BATCH_NODE_ROOT_DIR environment variable. For more information see [Files and directories in Azure Batch](https://learn.microsoft.com/azure/batch/files-and-directories). + + +`GetTasks` can be used to list all `BatchTask` allocated under a `BatchJob`. `GetTaskFile` can be used to retrive files from a `BatchTask` + +```C# Snippet:Batch_Readme_ListTasks +BatchClient _batchClient = new BatchClient( +new Uri("https://.eastus.batch.azure.com"), new DefaultAzureCredential()); + +var completedTasks = _batchClient.GetTasks("jobId", filter: "state eq 'completed'"); +foreach (BatchTask t in completedTasks) +{ + var outputFileName = t.ExecutionInfo.ExitCode == 0 ? "stdout.txt" : "stderr.txt"; + + Console.WriteLine("Task {0} exited with code {1}. Output ({2}):", + t.Id, t.ExecutionInfo.ExitCode, outputFileName); + + BinaryData fileContents = _batchClient.GetTaskFile("jobId", t.Id, outputFileName); + using (var reader = new StreamReader(fileContents.ToStream())) + { + Console.WriteLine(reader.ReadLine()); + } +} +``` + +## Troubleshooting + +Please see [Troubleshooting common batch issues](https://learn.microsoft.com/troubleshoot/azure/hpc/batch/welcome-hpc-batch). + +## Next steps + +View more https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/batch/Azure.Compute.Batch/samples here for common usages of the Batch client library: [Batch Samples](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/batch/Azure.Compute.Batch/samples). + +## Contributing + +This project welcomes contributions and suggestions. +Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. +For details, visit [Contributor License Agreements](https://opensource.microsoft.com/cla/). + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). +Simply follow the instructions provided by the bot. +You will only need to do this once across all repos using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. \ No newline at end of file diff --git a/sdk/batch/Azure.Compute.Batch/api/Azure.Compute.Batch.netstandard2.0.cs b/sdk/batch/Azure.Compute.Batch/api/Azure.Compute.Batch.netstandard2.0.cs new file mode 100644 index 0000000000000..1d2de51fc632a --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/api/Azure.Compute.Batch.netstandard2.0.cs @@ -0,0 +1,3255 @@ +namespace Azure.Compute.Batch +{ + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AccessScope : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AccessScope(string value) { throw null; } + public static Azure.Compute.Batch.AccessScope Job { get { throw null; } } + public bool Equals(Azure.Compute.Batch.AccessScope 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.Compute.Batch.AccessScope left, Azure.Compute.Batch.AccessScope right) { throw null; } + public static implicit operator Azure.Compute.Batch.AccessScope (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.AccessScope left, Azure.Compute.Batch.AccessScope right) { throw null; } + public override string ToString() { throw null; } + } + public partial class AffinityInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AffinityInfo(string affinityId) { } + public string AffinityId { get { throw null; } set { } } + Azure.Compute.Batch.AffinityInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.AffinityInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AllocationState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AllocationState(string value) { throw null; } + public static Azure.Compute.Batch.AllocationState Resizing { get { throw null; } } + public static Azure.Compute.Batch.AllocationState Steady { get { throw null; } } + public static Azure.Compute.Batch.AllocationState Stopping { get { throw null; } } + public bool Equals(Azure.Compute.Batch.AllocationState 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.Compute.Batch.AllocationState left, Azure.Compute.Batch.AllocationState right) { throw null; } + public static implicit operator Azure.Compute.Batch.AllocationState (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.AllocationState left, Azure.Compute.Batch.AllocationState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class AuthenticationTokenSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AuthenticationTokenSettings() { } + public System.Collections.Generic.IList Access { get { throw null; } } + Azure.Compute.Batch.AuthenticationTokenSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.AuthenticationTokenSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AutomaticOsUpgradePolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AutomaticOsUpgradePolicy() { } + public bool? DisableAutomaticRollback { get { throw null; } set { } } + public bool? EnableAutomaticOsUpgrade { get { throw null; } set { } } + public bool? OsRollingUpgradeDeferral { get { throw null; } set { } } + public bool? UseRollingUpgradePolicy { get { throw null; } set { } } + Azure.Compute.Batch.AutomaticOsUpgradePolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.AutomaticOsUpgradePolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AutoScaleRun : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AutoScaleRun() { } + public Azure.Compute.Batch.AutoScaleRunError Error { get { throw null; } } + public string Results { get { throw null; } } + public System.DateTimeOffset Timestamp { get { throw null; } } + Azure.Compute.Batch.AutoScaleRun System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.AutoScaleRun System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AutoScaleRunError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AutoScaleRunError() { } + public string Code { get { throw null; } } + public string Message { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Values { get { throw null; } } + Azure.Compute.Batch.AutoScaleRunError System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.AutoScaleRunError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AutoUserScope : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AutoUserScope(string value) { throw null; } + public static Azure.Compute.Batch.AutoUserScope Pool { get { throw null; } } + public static Azure.Compute.Batch.AutoUserScope Task { get { throw null; } } + public bool Equals(Azure.Compute.Batch.AutoUserScope 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.Compute.Batch.AutoUserScope left, Azure.Compute.Batch.AutoUserScope right) { throw null; } + public static implicit operator Azure.Compute.Batch.AutoUserScope (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.AutoUserScope left, Azure.Compute.Batch.AutoUserScope right) { throw null; } + public override string ToString() { throw null; } + } + public partial class AutoUserSpecification : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AutoUserSpecification() { } + public Azure.Compute.Batch.ElevationLevel? ElevationLevel { get { throw null; } set { } } + public Azure.Compute.Batch.AutoUserScope? Scope { get { throw null; } set { } } + Azure.Compute.Batch.AutoUserSpecification System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.AutoUserSpecification System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AzureBlobFileSystemConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AzureBlobFileSystemConfiguration(string accountName, string containerName, string relativeMountPath) { } + public string AccountKey { get { throw null; } set { } } + public string AccountName { get { throw null; } set { } } + public string BlobfuseOptions { get { throw null; } set { } } + public string ContainerName { get { throw null; } set { } } + public Azure.Compute.Batch.BatchNodeIdentityReference IdentityReference { get { throw null; } set { } } + public string RelativeMountPath { get { throw null; } set { } } + public string SasKey { get { throw null; } set { } } + Azure.Compute.Batch.AzureBlobFileSystemConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.AzureBlobFileSystemConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AzureFileShareConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AzureFileShareConfiguration(string accountName, string azureFileUrl, string accountKey, string relativeMountPath) { } + public string AccountKey { get { throw null; } set { } } + public string AccountName { get { throw null; } set { } } + public string AzureFileUrl { get { throw null; } set { } } + public string MountOptions { get { throw null; } set { } } + public string RelativeMountPath { get { throw null; } set { } } + Azure.Compute.Batch.AzureFileShareConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.AzureFileShareConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchApplication : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchApplication() { } + public string DisplayName { get { throw null; } } + public string Id { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Versions { get { throw null; } } + Azure.Compute.Batch.BatchApplication System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchApplication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchApplicationPackageReference : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchApplicationPackageReference(string applicationId) { } + public string ApplicationId { get { throw null; } set { } } + public string Version { get { throw null; } set { } } + Azure.Compute.Batch.BatchApplicationPackageReference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchApplicationPackageReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchAutoPoolSpecification : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchAutoPoolSpecification(Azure.Compute.Batch.BatchPoolLifetimeOption poolLifetimeOption) { } + public string AutoPoolIdPrefix { get { throw null; } set { } } + public bool? KeepAlive { get { throw null; } set { } } + public Azure.Compute.Batch.BatchPoolSpecification Pool { get { throw null; } set { } } + public Azure.Compute.Batch.BatchPoolLifetimeOption PoolLifetimeOption { get { throw null; } set { } } + Azure.Compute.Batch.BatchAutoPoolSpecification System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchAutoPoolSpecification System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchClient + { + protected BatchClient() { } + public BatchClient(System.Uri endpoint, Azure.AzureNamedKeyCredential credential) { } + public BatchClient(System.Uri endpoint, Azure.AzureNamedKeyCredential credential, Azure.Compute.Batch.BatchClientOptions options) { } + public BatchClient(System.Uri endpoint, Azure.Core.TokenCredential credential) { } + public BatchClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.Compute.Batch.BatchClientOptions options) { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.Response CreateJob(Azure.Compute.Batch.BatchJobCreateContent job, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateJob(Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task CreateJobAsync(Azure.Compute.Batch.BatchJobCreateContent job, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CreateJobAsync(Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response CreateJobSchedule(Azure.Compute.Batch.BatchJobScheduleCreateContent jobSchedule, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateJobSchedule(Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task CreateJobScheduleAsync(Azure.Compute.Batch.BatchJobScheduleCreateContent jobSchedule, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CreateJobScheduleAsync(Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response CreateNodeUser(string poolId, string nodeId, Azure.Compute.Batch.BatchNodeUserCreateContent user, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateNodeUser(string poolId, string nodeId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task CreateNodeUserAsync(string poolId, string nodeId, Azure.Compute.Batch.BatchNodeUserCreateContent user, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CreateNodeUserAsync(string poolId, string nodeId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response CreatePool(Azure.Compute.Batch.BatchPoolCreateContent pool, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreatePool(Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task CreatePoolAsync(Azure.Compute.Batch.BatchPoolCreateContent pool, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CreatePoolAsync(Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response CreateTask(string jobId, Azure.Compute.Batch.BatchTaskCreateContent task, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateTask(string jobId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task CreateTaskAsync(string jobId, Azure.Compute.Batch.BatchTaskCreateContent task, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CreateTaskAsync(string jobId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response CreateTaskCollection(string jobId, Azure.Compute.Batch.BatchTaskGroup taskCollection, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateTaskCollection(string jobId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> CreateTaskCollectionAsync(string jobId, Azure.Compute.Batch.BatchTaskGroup taskCollection, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CreateTaskCollectionAsync(string jobId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response DeleteJob(string jobId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteJobAsync(string jobId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response DeleteJobSchedule(string jobScheduleId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteJobScheduleAsync(string jobScheduleId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response DeleteNodeFile(string poolId, string nodeId, string filePath, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), bool? recursive = default(bool?), Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteNodeFileAsync(string poolId, string nodeId, string filePath, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), bool? recursive = default(bool?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response DeleteNodeUser(string poolId, string nodeId, string userName, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteNodeUserAsync(string poolId, string nodeId, string userName, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response DeletePool(string poolId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeletePoolAsync(string poolId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response DeleteTask(string jobId, string taskId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteTaskAsync(string jobId, string taskId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response DeleteTaskFile(string jobId, string taskId, string filePath, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), bool? recursive = default(bool?), Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteTaskFileAsync(string jobId, string taskId, string filePath, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), bool? recursive = default(bool?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response DisableJob(string jobId, Azure.Compute.Batch.BatchJobDisableContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response DisableJob(string jobId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DisableJobAsync(string jobId, Azure.Compute.Batch.BatchJobDisableContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DisableJobAsync(string jobId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response DisableJobSchedule(string jobScheduleId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DisableJobScheduleAsync(string jobScheduleId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response DisableNodeScheduling(string poolId, string nodeId, Azure.Compute.Batch.BatchNodeDisableSchedulingContent parameters = null, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response DisableNodeScheduling(string poolId, string nodeId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DisableNodeSchedulingAsync(string poolId, string nodeId, Azure.Compute.Batch.BatchNodeDisableSchedulingContent parameters = null, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DisableNodeSchedulingAsync(string poolId, string nodeId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response DisablePoolAutoScale(string poolId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DisablePoolAutoScaleAsync(string poolId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response EnableJob(string jobId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task EnableJobAsync(string jobId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response EnableJobSchedule(string jobScheduleId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task EnableJobScheduleAsync(string jobScheduleId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response EnableNodeScheduling(string poolId, string nodeId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task EnableNodeSchedulingAsync(string poolId, string nodeId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response EnablePoolAutoScale(string poolId, Azure.Compute.Batch.BatchPoolEnableAutoScaleContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response EnablePoolAutoScale(string poolId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task EnablePoolAutoScaleAsync(string poolId, Azure.Compute.Batch.BatchPoolEnableAutoScaleContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task EnablePoolAutoScaleAsync(string poolId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response EvaluatePoolAutoScale(string poolId, Azure.Compute.Batch.BatchPoolEvaluateAutoScaleContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response EvaluatePoolAutoScale(string poolId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> EvaluatePoolAutoScaleAsync(string poolId, Azure.Compute.Batch.BatchPoolEvaluateAutoScaleContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task EvaluatePoolAutoScaleAsync(string poolId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetApplication(string applicationId, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetApplication(string applicationId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetApplicationAsync(string applicationId, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetApplicationAsync(string applicationId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetApplications(int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetApplications(int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetApplicationsAsync(int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetApplicationsAsync(int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetJob(string jobId, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, System.Collections.Generic.IEnumerable select, System.Collections.Generic.IEnumerable expand, Azure.RequestConditions requestConditions, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetJob(string jobId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable select = null, System.Collections.Generic.IEnumerable expand = null, Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetJobAsync(string jobId, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, System.Collections.Generic.IEnumerable select, System.Collections.Generic.IEnumerable expand, Azure.RequestConditions requestConditions, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetJobAsync(string jobId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable select = null, System.Collections.Generic.IEnumerable expand = null, Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetJobPreparationAndReleaseTaskStatuses(string jobId, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, string filter, System.Collections.Generic.IEnumerable select, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetJobPreparationAndReleaseTaskStatuses(string jobId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), string filter = null, System.Collections.Generic.IEnumerable select = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetJobPreparationAndReleaseTaskStatusesAsync(string jobId, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, string filter, System.Collections.Generic.IEnumerable select, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetJobPreparationAndReleaseTaskStatusesAsync(string jobId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), string filter = null, System.Collections.Generic.IEnumerable select = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetJobs(int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, string filter, System.Collections.Generic.IEnumerable select, System.Collections.Generic.IEnumerable expand, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetJobs(int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), string filter = null, System.Collections.Generic.IEnumerable select = null, System.Collections.Generic.IEnumerable expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetJobsAsync(int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, string filter, System.Collections.Generic.IEnumerable select, System.Collections.Generic.IEnumerable expand, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetJobsAsync(int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), string filter = null, System.Collections.Generic.IEnumerable select = null, System.Collections.Generic.IEnumerable expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetJobSchedule(string jobScheduleId, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, System.Collections.Generic.IEnumerable select, System.Collections.Generic.IEnumerable expand, Azure.RequestConditions requestConditions, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetJobSchedule(string jobScheduleId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable select = null, System.Collections.Generic.IEnumerable expand = null, Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetJobScheduleAsync(string jobScheduleId, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, System.Collections.Generic.IEnumerable select, System.Collections.Generic.IEnumerable expand, Azure.RequestConditions requestConditions, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetJobScheduleAsync(string jobScheduleId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable select = null, System.Collections.Generic.IEnumerable expand = null, Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetJobSchedules(int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, string filter, System.Collections.Generic.IEnumerable select, System.Collections.Generic.IEnumerable expand, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetJobSchedules(int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), string filter = null, System.Collections.Generic.IEnumerable select = null, System.Collections.Generic.IEnumerable expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetJobSchedulesAsync(int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, string filter, System.Collections.Generic.IEnumerable select, System.Collections.Generic.IEnumerable expand, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetJobSchedulesAsync(int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), string filter = null, System.Collections.Generic.IEnumerable select = null, System.Collections.Generic.IEnumerable expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetJobsFromSchedules(string jobScheduleId, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, string filter, System.Collections.Generic.IEnumerable select, System.Collections.Generic.IEnumerable expand, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetJobsFromSchedules(string jobScheduleId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), string filter = null, System.Collections.Generic.IEnumerable select = null, System.Collections.Generic.IEnumerable expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetJobsFromSchedulesAsync(string jobScheduleId, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, string filter, System.Collections.Generic.IEnumerable select, System.Collections.Generic.IEnumerable expand, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetJobsFromSchedulesAsync(string jobScheduleId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), string filter = null, System.Collections.Generic.IEnumerable select = null, System.Collections.Generic.IEnumerable expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetJobTaskCounts(string jobId, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetJobTaskCounts(string jobId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetJobTaskCountsAsync(string jobId, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetJobTaskCountsAsync(string jobId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetNode(string poolId, string nodeId, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, System.Collections.Generic.IEnumerable select, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetNode(string poolId, string nodeId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable select = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetNodeAsync(string poolId, string nodeId, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, System.Collections.Generic.IEnumerable select, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetNodeAsync(string poolId, string nodeId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable select = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetNodeExtension(string poolId, string nodeId, string extensionName, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, System.Collections.Generic.IEnumerable select, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetNodeExtension(string poolId, string nodeId, string extensionName, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable select = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetNodeExtensionAsync(string poolId, string nodeId, string extensionName, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, System.Collections.Generic.IEnumerable select, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetNodeExtensionAsync(string poolId, string nodeId, string extensionName, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable select = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetNodeExtensions(string poolId, string nodeId, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, System.Collections.Generic.IEnumerable select, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetNodeExtensions(string poolId, string nodeId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), System.Collections.Generic.IEnumerable select = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetNodeExtensionsAsync(string poolId, string nodeId, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, System.Collections.Generic.IEnumerable select, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetNodeExtensionsAsync(string poolId, string nodeId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), System.Collections.Generic.IEnumerable select = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetNodeFile(string poolId, string nodeId, string filePath, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, string ocpRange, Azure.RequestConditions requestConditions, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetNodeFile(string poolId, string nodeId, string filePath, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), string ocpRange = null, Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetNodeFileAsync(string poolId, string nodeId, string filePath, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, string ocpRange, Azure.RequestConditions requestConditions, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetNodeFileAsync(string poolId, string nodeId, string filePath, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), string ocpRange = null, Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetNodeFileProperties(string poolId, string nodeId, string filePath, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetNodeFilePropertiesAsync(string poolId, string nodeId, string filePath, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetNodeFiles(string poolId, string nodeId, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, string filter, bool? recursive, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetNodeFiles(string poolId, string nodeId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), string filter = null, bool? recursive = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetNodeFilesAsync(string poolId, string nodeId, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, string filter, bool? recursive, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetNodeFilesAsync(string poolId, string nodeId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), string filter = null, bool? recursive = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetNodeRemoteLoginSettings(string poolId, string nodeId, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetNodeRemoteLoginSettings(string poolId, string nodeId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetNodeRemoteLoginSettingsAsync(string poolId, string nodeId, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetNodeRemoteLoginSettingsAsync(string poolId, string nodeId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetNodes(string poolId, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, string filter, System.Collections.Generic.IEnumerable select, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetNodes(string poolId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), string filter = null, System.Collections.Generic.IEnumerable select = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetNodesAsync(string poolId, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, string filter, System.Collections.Generic.IEnumerable select, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetNodesAsync(string poolId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), string filter = null, System.Collections.Generic.IEnumerable select = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetPool(string poolId, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, System.Collections.Generic.IEnumerable select, System.Collections.Generic.IEnumerable expand, Azure.RequestConditions requestConditions, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetPool(string poolId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable select = null, System.Collections.Generic.IEnumerable expand = null, Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetPoolAsync(string poolId, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, System.Collections.Generic.IEnumerable select, System.Collections.Generic.IEnumerable expand, Azure.RequestConditions requestConditions, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetPoolAsync(string poolId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable select = null, System.Collections.Generic.IEnumerable expand = null, Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetPoolNodeCounts(int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, string filter, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetPoolNodeCounts(int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetPoolNodeCountsAsync(int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, string filter, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetPoolNodeCountsAsync(int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetPools(int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, string filter, System.Collections.Generic.IEnumerable select, System.Collections.Generic.IEnumerable expand, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetPools(int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), string filter = null, System.Collections.Generic.IEnumerable select = null, System.Collections.Generic.IEnumerable expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetPoolsAsync(int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, string filter, System.Collections.Generic.IEnumerable select, System.Collections.Generic.IEnumerable expand, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetPoolsAsync(int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), string filter = null, System.Collections.Generic.IEnumerable select = null, System.Collections.Generic.IEnumerable expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetPoolUsageMetrics(int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, System.DateTimeOffset? starttime, System.DateTimeOffset? endtime, string filter, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetPoolUsageMetrics(int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), System.DateTimeOffset? starttime = default(System.DateTimeOffset?), System.DateTimeOffset? endtime = default(System.DateTimeOffset?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetPoolUsageMetricsAsync(int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, System.DateTimeOffset? starttime, System.DateTimeOffset? endtime, string filter, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetPoolUsageMetricsAsync(int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), System.DateTimeOffset? starttime = default(System.DateTimeOffset?), System.DateTimeOffset? endtime = default(System.DateTimeOffset?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetSubTasks(string jobId, string taskId, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, System.Collections.Generic.IEnumerable select, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetSubTasks(string jobId, string taskId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable select = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetSubTasksAsync(string jobId, string taskId, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, System.Collections.Generic.IEnumerable select, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetSubTasksAsync(string jobId, string taskId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable select = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetSupportedImages(int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, string filter, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetSupportedImages(int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetSupportedImagesAsync(int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, string filter, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetSupportedImagesAsync(int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetTask(string jobId, string taskId, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, System.Collections.Generic.IEnumerable select, System.Collections.Generic.IEnumerable expand, Azure.RequestConditions requestConditions, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetTask(string jobId, string taskId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable select = null, System.Collections.Generic.IEnumerable expand = null, Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetTaskAsync(string jobId, string taskId, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, System.Collections.Generic.IEnumerable select, System.Collections.Generic.IEnumerable expand, Azure.RequestConditions requestConditions, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetTaskAsync(string jobId, string taskId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable select = null, System.Collections.Generic.IEnumerable expand = null, Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetTaskFile(string jobId, string taskId, string filePath, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, string ocpRange, Azure.RequestConditions requestConditions, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetTaskFile(string jobId, string taskId, string filePath, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), string ocpRange = null, Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetTaskFileAsync(string jobId, string taskId, string filePath, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, string ocpRange, Azure.RequestConditions requestConditions, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetTaskFileAsync(string jobId, string taskId, string filePath, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), string ocpRange = null, Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetTaskFileProperties(string jobId, string taskId, string filePath, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetTaskFilePropertiesAsync(string jobId, string taskId, string filePath, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetTaskFiles(string jobId, string taskId, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, string filter, bool? recursive, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetTaskFiles(string jobId, string taskId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), string filter = null, bool? recursive = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetTaskFilesAsync(string jobId, string taskId, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, string filter, bool? recursive, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetTaskFilesAsync(string jobId, string taskId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), string filter = null, bool? recursive = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetTasks(string jobId, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, string filter, System.Collections.Generic.IEnumerable select, System.Collections.Generic.IEnumerable expand, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetTasks(string jobId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), string filter = null, System.Collections.Generic.IEnumerable select = null, System.Collections.Generic.IEnumerable expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetTasksAsync(string jobId, int? timeOutInSeconds, System.DateTimeOffset? ocpdate, int? maxresults, string filter, System.Collections.Generic.IEnumerable select, System.Collections.Generic.IEnumerable expand, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetTasksAsync(string jobId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), int? maxresults = default(int?), string filter = null, System.Collections.Generic.IEnumerable select = null, System.Collections.Generic.IEnumerable expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response JobScheduleExists(string jobScheduleId, int? timeOut = default(int?), System.DateTimeOffset? ocpDate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> JobScheduleExistsAsync(string jobScheduleId, int? timeOut = default(int?), System.DateTimeOffset? ocpDate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response PoolExists(string poolId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> PoolExistsAsync(string poolId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response ReactivateTask(string jobId, string taskId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task ReactivateTaskAsync(string jobId, string taskId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response RebootNode(string poolId, string nodeId, Azure.Compute.Batch.BatchNodeRebootContent parameters = null, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RebootNode(string poolId, string nodeId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task RebootNodeAsync(string poolId, string nodeId, Azure.Compute.Batch.BatchNodeRebootContent parameters = null, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task RebootNodeAsync(string poolId, string nodeId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response RemoveNodes(string poolId, Azure.Compute.Batch.BatchNodeRemoveContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveNodes(string poolId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task RemoveNodesAsync(string poolId, Azure.Compute.Batch.BatchNodeRemoveContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task RemoveNodesAsync(string poolId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response ReplaceJob(string jobId, Azure.Compute.Batch.BatchJob job, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ReplaceJob(string jobId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task ReplaceJobAsync(string jobId, Azure.Compute.Batch.BatchJob job, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ReplaceJobAsync(string jobId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response ReplaceJobSchedule(string jobScheduleId, Azure.Compute.Batch.BatchJobSchedule jobSchedule, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ReplaceJobSchedule(string jobScheduleId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task ReplaceJobScheduleAsync(string jobScheduleId, Azure.Compute.Batch.BatchJobSchedule jobSchedule, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ReplaceJobScheduleAsync(string jobScheduleId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response ReplaceNodeUser(string poolId, string nodeId, string userName, Azure.Compute.Batch.BatchNodeUserUpdateContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ReplaceNodeUser(string poolId, string nodeId, string userName, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task ReplaceNodeUserAsync(string poolId, string nodeId, string userName, Azure.Compute.Batch.BatchNodeUserUpdateContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ReplaceNodeUserAsync(string poolId, string nodeId, string userName, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response ReplacePoolProperties(string poolId, Azure.Compute.Batch.BatchPoolReplaceContent pool, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ReplacePoolProperties(string poolId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task ReplacePoolPropertiesAsync(string poolId, Azure.Compute.Batch.BatchPoolReplaceContent pool, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ReplacePoolPropertiesAsync(string poolId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response ReplaceTask(string jobId, string taskId, Azure.Compute.Batch.BatchTask task, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ReplaceTask(string jobId, string taskId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task ReplaceTaskAsync(string jobId, string taskId, Azure.Compute.Batch.BatchTask task, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ReplaceTaskAsync(string jobId, string taskId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response ResizePool(string poolId, Azure.Compute.Batch.BatchPoolResizeContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ResizePool(string poolId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task ResizePoolAsync(string poolId, Azure.Compute.Batch.BatchPoolResizeContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ResizePoolAsync(string poolId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response StopPoolResize(string poolId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task StopPoolResizeAsync(string poolId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response TerminateJob(string jobId, Azure.Compute.Batch.BatchJobTerminateContent parameters = null, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response TerminateJob(string jobId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task TerminateJobAsync(string jobId, Azure.Compute.Batch.BatchJobTerminateContent parameters = null, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task TerminateJobAsync(string jobId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response TerminateJobSchedule(string jobScheduleId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task TerminateJobScheduleAsync(string jobScheduleId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response TerminateTask(string jobId, string taskId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task TerminateTaskAsync(string jobId, string taskId, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response UpdateJob(string jobId, Azure.Compute.Batch.BatchJobUpdateContent job, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response UpdateJob(string jobId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task UpdateJobAsync(string jobId, Azure.Compute.Batch.BatchJobUpdateContent job, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task UpdateJobAsync(string jobId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response UpdateJobSchedule(string jobScheduleId, Azure.Compute.Batch.BatchJobScheduleUpdateContent jobSchedule, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response UpdateJobSchedule(string jobScheduleId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task UpdateJobScheduleAsync(string jobScheduleId, Azure.Compute.Batch.BatchJobScheduleUpdateContent jobSchedule, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task UpdateJobScheduleAsync(string jobScheduleId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response UpdatePool(string poolId, Azure.Compute.Batch.BatchPoolUpdateContent pool, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response UpdatePool(string poolId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task UpdatePoolAsync(string poolId, Azure.Compute.Batch.BatchPoolUpdateContent pool, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task UpdatePoolAsync(string poolId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response UploadNodeLogs(string poolId, string nodeId, Azure.Compute.Batch.UploadBatchServiceLogsContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response UploadNodeLogs(string poolId, string nodeId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> UploadNodeLogsAsync(string poolId, string nodeId, Azure.Compute.Batch.UploadBatchServiceLogsContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task UploadNodeLogsAsync(string poolId, string nodeId, Azure.Core.RequestContent content, int? timeOutInSeconds = default(int?), System.DateTimeOffset? ocpdate = default(System.DateTimeOffset?), Azure.RequestContext context = null) { throw null; } + } + public partial class BatchClientOptions : Azure.Core.ClientOptions + { + public BatchClientOptions(Azure.Compute.Batch.BatchClientOptions.ServiceVersion version = Azure.Compute.Batch.BatchClientOptions.ServiceVersion.V2024_02_01_19_0) { } + public enum ServiceVersion + { + V2024_02_01_19_0 = 1, + } + } + public partial class BatchError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchError() { } + public string Code { get { throw null; } } + public Azure.Compute.Batch.BatchErrorMessage Message { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Values { get { throw null; } } + Azure.Compute.Batch.BatchError System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchErrorDetail : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchErrorDetail() { } + public string Key { get { throw null; } } + public string Value { get { throw null; } } + Azure.Compute.Batch.BatchErrorDetail System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchErrorDetail System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchErrorMessage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchErrorMessage() { } + public string Lang { get { throw null; } } + public string Value { get { throw null; } } + Azure.Compute.Batch.BatchErrorMessage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchErrorMessage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchFileProperties + { + internal BatchFileProperties() { } + public System.DateTime CreationTime { get { throw null; } } + public string FileUrl { get { throw null; } } + public bool IsDirectory { get { throw null; } } + public string Mode { get { throw null; } } + } + public partial class BatchJob : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchJob(Azure.Compute.Batch.BatchPoolInfo poolInfo) { } + public bool? AllowTaskPreemption { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList CommonEnvironmentSettings { get { throw null; } } + public Azure.Compute.Batch.BatchJobConstraints Constraints { get { throw null; } set { } } + public System.DateTimeOffset? CreationTime { get { throw null; } } + public string DisplayName { get { throw null; } } + public string ETag { get { throw null; } } + public Azure.Compute.Batch.BatchJobExecutionInfo ExecutionInfo { get { throw null; } } + public string Id { get { throw null; } } + public Azure.Compute.Batch.BatchJobManagerTask JobManagerTask { get { throw null; } } + public Azure.Compute.Batch.BatchJobPreparationTask JobPreparationTask { get { throw null; } } + public Azure.Compute.Batch.BatchJobReleaseTask JobReleaseTask { get { throw null; } } + public System.DateTimeOffset? LastModified { get { throw null; } } + public int? MaxParallelTasks { get { throw null; } set { } } + public System.Collections.Generic.IList Metadata { get { throw null; } } + public Azure.Compute.Batch.BatchJobNetworkConfiguration NetworkConfiguration { get { throw null; } } + public Azure.Compute.Batch.OnAllBatchTasksComplete? OnAllTasksComplete { get { throw null; } set { } } + public Azure.Compute.Batch.OnBatchTaskFailure? OnTaskFailure { get { throw null; } } + public Azure.Compute.Batch.BatchPoolInfo PoolInfo { get { throw null; } set { } } + public Azure.Compute.Batch.BatchJobState? PreviousState { get { throw null; } } + public System.DateTimeOffset? PreviousStateTransitionTime { get { throw null; } } + public int? Priority { get { throw null; } set { } } + public Azure.Compute.Batch.BatchJobState? State { get { throw null; } } + public System.DateTimeOffset? StateTransitionTime { get { throw null; } } + public Azure.Compute.Batch.BatchJobStatistics Stats { get { throw null; } } + public string Url { get { throw null; } } + public bool? UsesTaskDependencies { get { throw null; } } + Azure.Compute.Batch.BatchJob System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchJob System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BatchJobAction : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BatchJobAction(string value) { throw null; } + public static Azure.Compute.Batch.BatchJobAction Disable { get { throw null; } } + public static Azure.Compute.Batch.BatchJobAction None { get { throw null; } } + public static Azure.Compute.Batch.BatchJobAction Terminate { get { throw null; } } + public bool Equals(Azure.Compute.Batch.BatchJobAction 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.Compute.Batch.BatchJobAction left, Azure.Compute.Batch.BatchJobAction right) { throw null; } + public static implicit operator Azure.Compute.Batch.BatchJobAction (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.BatchJobAction left, Azure.Compute.Batch.BatchJobAction right) { throw null; } + public override string ToString() { throw null; } + } + public partial class BatchJobConstraints : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchJobConstraints() { } + public int? MaxTaskRetryCount { get { throw null; } set { } } + public System.TimeSpan? MaxWallClockTime { get { throw null; } set { } } + Azure.Compute.Batch.BatchJobConstraints System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchJobConstraints System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchJobCreateContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchJobCreateContent(string id, Azure.Compute.Batch.BatchPoolInfo poolInfo) { } + public bool? AllowTaskPreemption { get { throw null; } set { } } + public System.Collections.Generic.IList CommonEnvironmentSettings { get { throw null; } } + public Azure.Compute.Batch.BatchJobConstraints Constraints { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } + public string Id { get { throw null; } } + public Azure.Compute.Batch.BatchJobManagerTask JobManagerTask { get { throw null; } set { } } + public Azure.Compute.Batch.BatchJobPreparationTask JobPreparationTask { get { throw null; } set { } } + public Azure.Compute.Batch.BatchJobReleaseTask JobReleaseTask { get { throw null; } set { } } + public int? MaxParallelTasks { get { throw null; } set { } } + public System.Collections.Generic.IList Metadata { get { throw null; } } + public Azure.Compute.Batch.BatchJobNetworkConfiguration NetworkConfiguration { get { throw null; } set { } } + public Azure.Compute.Batch.OnAllBatchTasksComplete? OnAllTasksComplete { get { throw null; } set { } } + public Azure.Compute.Batch.OnBatchTaskFailure? OnTaskFailure { get { throw null; } set { } } + public Azure.Compute.Batch.BatchPoolInfo PoolInfo { get { throw null; } } + public int? Priority { get { throw null; } set { } } + public bool? UsesTaskDependencies { get { throw null; } set { } } + Azure.Compute.Batch.BatchJobCreateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchJobCreateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchJobDisableContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchJobDisableContent(Azure.Compute.Batch.DisableBatchJobOption disableTasks) { } + public Azure.Compute.Batch.DisableBatchJobOption DisableTasks { get { throw null; } } + Azure.Compute.Batch.BatchJobDisableContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchJobDisableContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchJobExecutionInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchJobExecutionInfo() { } + public System.DateTimeOffset? EndTime { get { throw null; } } + public string PoolId { get { throw null; } } + public Azure.Compute.Batch.BatchJobSchedulingError SchedulingError { get { throw null; } } + public System.DateTimeOffset StartTime { get { throw null; } } + public string TerminationReason { get { throw null; } } + Azure.Compute.Batch.BatchJobExecutionInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchJobExecutionInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchJobManagerTask : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchJobManagerTask(string id, string commandLine) { } + public bool? AllowLowPriorityNode { get { throw null; } set { } } + public System.Collections.Generic.IList ApplicationPackageReferences { get { throw null; } } + public Azure.Compute.Batch.AuthenticationTokenSettings AuthenticationTokenSettings { get { throw null; } set { } } + public string CommandLine { get { throw null; } set { } } + public Azure.Compute.Batch.BatchTaskConstraints Constraints { get { throw null; } set { } } + public Azure.Compute.Batch.BatchTaskContainerSettings ContainerSettings { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } + public System.Collections.Generic.IList EnvironmentSettings { get { throw null; } } + public string Id { get { throw null; } set { } } + public bool? KillJobOnCompletion { get { throw null; } set { } } + public System.Collections.Generic.IList OutputFiles { get { throw null; } } + public int? RequiredSlots { get { throw null; } set { } } + public System.Collections.Generic.IList ResourceFiles { get { throw null; } } + public bool? RunExclusive { get { throw null; } set { } } + public Azure.Compute.Batch.UserIdentity UserIdentity { get { throw null; } set { } } + Azure.Compute.Batch.BatchJobManagerTask System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchJobManagerTask System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchJobNetworkConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchJobNetworkConfiguration(string subnetId) { } + public string SubnetId { get { throw null; } set { } } + Azure.Compute.Batch.BatchJobNetworkConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchJobNetworkConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchJobPreparationAndReleaseTaskStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchJobPreparationAndReleaseTaskStatus() { } + public Azure.Compute.Batch.BatchJobPreparationTaskExecutionInfo JobPreparationTaskExecutionInfo { get { throw null; } } + public Azure.Compute.Batch.BatchJobReleaseTaskExecutionInfo JobReleaseTaskExecutionInfo { get { throw null; } } + public string NodeId { get { throw null; } } + public string NodeUrl { get { throw null; } } + public string PoolId { get { throw null; } } + Azure.Compute.Batch.BatchJobPreparationAndReleaseTaskStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchJobPreparationAndReleaseTaskStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchJobPreparationTask : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchJobPreparationTask(string commandLine) { } + public string CommandLine { get { throw null; } set { } } + public Azure.Compute.Batch.BatchTaskConstraints Constraints { get { throw null; } set { } } + public Azure.Compute.Batch.BatchTaskContainerSettings ContainerSettings { get { throw null; } set { } } + public System.Collections.Generic.IList EnvironmentSettings { get { throw null; } } + public string Id { get { throw null; } set { } } + public bool? RerunOnNodeRebootAfterSuccess { get { throw null; } set { } } + public System.Collections.Generic.IList ResourceFiles { get { throw null; } } + public Azure.Compute.Batch.UserIdentity UserIdentity { get { throw null; } set { } } + public bool? WaitForSuccess { get { throw null; } set { } } + Azure.Compute.Batch.BatchJobPreparationTask System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchJobPreparationTask System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchJobPreparationTaskExecutionInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchJobPreparationTaskExecutionInfo() { } + public Azure.Compute.Batch.BatchTaskContainerExecutionInfo ContainerInfo { get { throw null; } } + public System.DateTimeOffset? EndTime { get { throw null; } } + public int? ExitCode { get { throw null; } } + public Azure.Compute.Batch.BatchTaskFailureInfo FailureInfo { get { throw null; } } + public System.DateTimeOffset? LastRetryTime { get { throw null; } } + public Azure.Compute.Batch.BatchTaskExecutionResult? Result { get { throw null; } } + public int RetryCount { get { throw null; } } + public System.DateTimeOffset StartTime { get { throw null; } } + public Azure.Compute.Batch.BatchJobPreparationTaskState State { get { throw null; } } + public string TaskRootDirectory { get { throw null; } } + public string TaskRootDirectoryUrl { get { throw null; } } + Azure.Compute.Batch.BatchJobPreparationTaskExecutionInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchJobPreparationTaskExecutionInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BatchJobPreparationTaskState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BatchJobPreparationTaskState(string value) { throw null; } + public static Azure.Compute.Batch.BatchJobPreparationTaskState Completed { get { throw null; } } + public static Azure.Compute.Batch.BatchJobPreparationTaskState Running { get { throw null; } } + public bool Equals(Azure.Compute.Batch.BatchJobPreparationTaskState 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.Compute.Batch.BatchJobPreparationTaskState left, Azure.Compute.Batch.BatchJobPreparationTaskState right) { throw null; } + public static implicit operator Azure.Compute.Batch.BatchJobPreparationTaskState (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.BatchJobPreparationTaskState left, Azure.Compute.Batch.BatchJobPreparationTaskState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class BatchJobReleaseTask : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchJobReleaseTask(string commandLine) { } + public string CommandLine { get { throw null; } set { } } + public Azure.Compute.Batch.BatchTaskContainerSettings ContainerSettings { get { throw null; } set { } } + public System.Collections.Generic.IList EnvironmentSettings { get { throw null; } } + public string Id { get { throw null; } set { } } + public System.TimeSpan? MaxWallClockTime { get { throw null; } set { } } + public System.Collections.Generic.IList ResourceFiles { get { throw null; } } + public System.TimeSpan? RetentionTime { get { throw null; } set { } } + public Azure.Compute.Batch.UserIdentity UserIdentity { get { throw null; } set { } } + Azure.Compute.Batch.BatchJobReleaseTask System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchJobReleaseTask System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchJobReleaseTaskExecutionInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchJobReleaseTaskExecutionInfo() { } + public Azure.Compute.Batch.BatchTaskContainerExecutionInfo ContainerInfo { get { throw null; } } + public System.DateTimeOffset? EndTime { get { throw null; } } + public int? ExitCode { get { throw null; } } + public Azure.Compute.Batch.BatchTaskFailureInfo FailureInfo { get { throw null; } } + public Azure.Compute.Batch.BatchTaskExecutionResult? Result { get { throw null; } } + public System.DateTimeOffset StartTime { get { throw null; } } + public Azure.Compute.Batch.BatchJobReleaseTaskState State { get { throw null; } } + public string TaskRootDirectory { get { throw null; } } + public string TaskRootDirectoryUrl { get { throw null; } } + Azure.Compute.Batch.BatchJobReleaseTaskExecutionInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchJobReleaseTaskExecutionInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BatchJobReleaseTaskState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BatchJobReleaseTaskState(string value) { throw null; } + public static Azure.Compute.Batch.BatchJobReleaseTaskState Completed { get { throw null; } } + public static Azure.Compute.Batch.BatchJobReleaseTaskState Running { get { throw null; } } + public bool Equals(Azure.Compute.Batch.BatchJobReleaseTaskState 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.Compute.Batch.BatchJobReleaseTaskState left, Azure.Compute.Batch.BatchJobReleaseTaskState right) { throw null; } + public static implicit operator Azure.Compute.Batch.BatchJobReleaseTaskState (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.BatchJobReleaseTaskState left, Azure.Compute.Batch.BatchJobReleaseTaskState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class BatchJobSchedule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchJobSchedule(Azure.Compute.Batch.BatchJobSpecification jobSpecification) { } + public System.DateTimeOffset? CreationTime { get { throw null; } } + public string DisplayName { get { throw null; } } + public string ETag { get { throw null; } } + public Azure.Compute.Batch.BatchJobScheduleExecutionInfo ExecutionInfo { get { throw null; } } + public string Id { get { throw null; } } + public Azure.Compute.Batch.BatchJobSpecification JobSpecification { get { throw null; } set { } } + public System.DateTimeOffset? LastModified { get { throw null; } } + public System.Collections.Generic.IList Metadata { get { throw null; } } + public Azure.Compute.Batch.BatchJobScheduleState? PreviousState { get { throw null; } } + public System.DateTimeOffset? PreviousStateTransitionTime { get { throw null; } } + public Azure.Compute.Batch.BatchJobScheduleConfiguration Schedule { get { throw null; } set { } } + public Azure.Compute.Batch.BatchJobScheduleState? State { get { throw null; } } + public System.DateTimeOffset? StateTransitionTime { get { throw null; } } + public Azure.Compute.Batch.BatchJobScheduleStatistics Stats { get { throw null; } } + public string Url { get { throw null; } } + Azure.Compute.Batch.BatchJobSchedule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchJobSchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchJobScheduleConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchJobScheduleConfiguration() { } + public System.DateTimeOffset? DoNotRunAfter { get { throw null; } set { } } + public System.DateTimeOffset? DoNotRunUntil { get { throw null; } set { } } + public System.TimeSpan? RecurrenceInterval { get { throw null; } set { } } + public System.TimeSpan? StartWindow { get { throw null; } set { } } + Azure.Compute.Batch.BatchJobScheduleConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchJobScheduleConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchJobScheduleCreateContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchJobScheduleCreateContent(string id, Azure.Compute.Batch.BatchJobScheduleConfiguration schedule, Azure.Compute.Batch.BatchJobSpecification jobSpecification) { } + public string DisplayName { get { throw null; } set { } } + public string Id { get { throw null; } } + public Azure.Compute.Batch.BatchJobSpecification JobSpecification { get { throw null; } } + public System.Collections.Generic.IList Metadata { get { throw null; } } + public Azure.Compute.Batch.BatchJobScheduleConfiguration Schedule { get { throw null; } } + Azure.Compute.Batch.BatchJobScheduleCreateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchJobScheduleCreateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchJobScheduleExecutionInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchJobScheduleExecutionInfo() { } + public System.DateTimeOffset? EndTime { get { throw null; } } + public System.DateTimeOffset? NextRunTime { get { throw null; } } + public Azure.Compute.Batch.RecentBatchJob RecentJob { get { throw null; } } + Azure.Compute.Batch.BatchJobScheduleExecutionInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchJobScheduleExecutionInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BatchJobScheduleState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BatchJobScheduleState(string value) { throw null; } + public static Azure.Compute.Batch.BatchJobScheduleState Active { get { throw null; } } + public static Azure.Compute.Batch.BatchJobScheduleState Completed { get { throw null; } } + public static Azure.Compute.Batch.BatchJobScheduleState Deleting { get { throw null; } } + public static Azure.Compute.Batch.BatchJobScheduleState Disabled { get { throw null; } } + public static Azure.Compute.Batch.BatchJobScheduleState Terminating { get { throw null; } } + public bool Equals(Azure.Compute.Batch.BatchJobScheduleState 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.Compute.Batch.BatchJobScheduleState left, Azure.Compute.Batch.BatchJobScheduleState right) { throw null; } + public static implicit operator Azure.Compute.Batch.BatchJobScheduleState (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.BatchJobScheduleState left, Azure.Compute.Batch.BatchJobScheduleState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class BatchJobScheduleStatistics : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchJobScheduleStatistics() { } + public System.TimeSpan KernelCpuTime { get { throw null; } } + public System.DateTimeOffset LastUpdateTime { get { throw null; } } + public long NumFailedTasks { get { throw null; } } + public long NumSucceededTasks { get { throw null; } } + public long NumTaskRetries { get { throw null; } } + public float ReadIOGiB { get { throw null; } } + public long ReadIOps { get { throw null; } } + public System.DateTimeOffset StartTime { get { throw null; } } + public string Url { get { throw null; } } + public System.TimeSpan UserCpuTime { get { throw null; } } + public System.TimeSpan WaitTime { get { throw null; } } + public System.TimeSpan WallClockTime { get { throw null; } } + public float WriteIOGiB { get { throw null; } } + public long WriteIOps { get { throw null; } } + Azure.Compute.Batch.BatchJobScheduleStatistics System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchJobScheduleStatistics System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchJobScheduleUpdateContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchJobScheduleUpdateContent() { } + public Azure.Compute.Batch.BatchJobSpecification JobSpecification { get { throw null; } set { } } + public System.Collections.Generic.IList Metadata { get { throw null; } } + public Azure.Compute.Batch.BatchJobScheduleConfiguration Schedule { get { throw null; } set { } } + Azure.Compute.Batch.BatchJobScheduleUpdateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchJobScheduleUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchJobSchedulingError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchJobSchedulingError() { } + public Azure.Compute.Batch.ErrorCategory Category { get { throw null; } } + public string Code { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Details { get { throw null; } } + public string Message { get { throw null; } } + Azure.Compute.Batch.BatchJobSchedulingError System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchJobSchedulingError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchJobSpecification : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchJobSpecification(Azure.Compute.Batch.BatchPoolInfo poolInfo) { } + public bool? AllowTaskPreemption { get { throw null; } set { } } + public System.Collections.Generic.IList CommonEnvironmentSettings { get { throw null; } } + public Azure.Compute.Batch.BatchJobConstraints Constraints { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } + public Azure.Compute.Batch.BatchJobManagerTask JobManagerTask { get { throw null; } set { } } + public Azure.Compute.Batch.BatchJobPreparationTask JobPreparationTask { get { throw null; } set { } } + public Azure.Compute.Batch.BatchJobReleaseTask JobReleaseTask { get { throw null; } set { } } + public int? MaxParallelTasks { get { throw null; } set { } } + public System.Collections.Generic.IList Metadata { get { throw null; } } + public Azure.Compute.Batch.BatchJobNetworkConfiguration NetworkConfiguration { get { throw null; } set { } } + public Azure.Compute.Batch.OnAllBatchTasksComplete? OnAllTasksComplete { get { throw null; } set { } } + public Azure.Compute.Batch.OnBatchTaskFailure? OnTaskFailure { get { throw null; } set { } } + public Azure.Compute.Batch.BatchPoolInfo PoolInfo { get { throw null; } set { } } + public int? Priority { get { throw null; } set { } } + public bool? UsesTaskDependencies { get { throw null; } set { } } + Azure.Compute.Batch.BatchJobSpecification System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchJobSpecification System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BatchJobState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BatchJobState(string value) { throw null; } + public static Azure.Compute.Batch.BatchJobState Active { get { throw null; } } + public static Azure.Compute.Batch.BatchJobState Completed { get { throw null; } } + public static Azure.Compute.Batch.BatchJobState Deleting { get { throw null; } } + public static Azure.Compute.Batch.BatchJobState Disabled { get { throw null; } } + public static Azure.Compute.Batch.BatchJobState Disabling { get { throw null; } } + public static Azure.Compute.Batch.BatchJobState Enabling { get { throw null; } } + public static Azure.Compute.Batch.BatchJobState Terminating { get { throw null; } } + public bool Equals(Azure.Compute.Batch.BatchJobState 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.Compute.Batch.BatchJobState left, Azure.Compute.Batch.BatchJobState right) { throw null; } + public static implicit operator Azure.Compute.Batch.BatchJobState (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.BatchJobState left, Azure.Compute.Batch.BatchJobState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class BatchJobStatistics : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchJobStatistics() { } + public System.TimeSpan KernelCpuTime { get { throw null; } } + public System.DateTimeOffset LastUpdateTime { get { throw null; } } + public long NumFailedTasks { get { throw null; } } + public long NumSucceededTasks { get { throw null; } } + public long NumTaskRetries { get { throw null; } } + public float ReadIOGiB { get { throw null; } } + public long ReadIOps { get { throw null; } } + public System.DateTimeOffset StartTime { get { throw null; } } + public string Url { get { throw null; } } + public System.TimeSpan UserCpuTime { get { throw null; } } + public System.TimeSpan WaitTime { get { throw null; } } + public System.TimeSpan WallClockTime { get { throw null; } } + public float WriteIOGiB { get { throw null; } } + public long WriteIOps { get { throw null; } } + Azure.Compute.Batch.BatchJobStatistics System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchJobStatistics System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchJobTerminateContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchJobTerminateContent() { } + public string TerminationReason { get { throw null; } set { } } + Azure.Compute.Batch.BatchJobTerminateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchJobTerminateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchJobUpdateContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchJobUpdateContent() { } + public bool? AllowTaskPreemption { get { throw null; } set { } } + public Azure.Compute.Batch.BatchJobConstraints Constraints { get { throw null; } set { } } + public int? MaxParallelTasks { get { throw null; } set { } } + public System.Collections.Generic.IList Metadata { get { throw null; } } + public Azure.Compute.Batch.OnAllBatchTasksComplete? OnAllTasksComplete { get { throw null; } set { } } + public Azure.Compute.Batch.BatchPoolInfo PoolInfo { get { throw null; } set { } } + public int? Priority { get { throw null; } set { } } + Azure.Compute.Batch.BatchJobUpdateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchJobUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchNode : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchNode() { } + public string AffinityId { get { throw null; } } + public System.DateTimeOffset? AllocationTime { get { throw null; } } + public Azure.Compute.Batch.BatchNodeEndpointConfiguration EndpointConfiguration { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public string Id { get { throw null; } } + public string IpAddress { get { throw null; } } + public bool? IsDedicated { get { throw null; } } + public System.DateTimeOffset? LastBootTime { get { throw null; } } + public Azure.Compute.Batch.BatchNodeAgentInfo NodeAgentInfo { get { throw null; } } + public System.Collections.Generic.IReadOnlyList RecentTasks { get { throw null; } } + public int? RunningTasksCount { get { throw null; } } + public int? RunningTaskSlotsCount { get { throw null; } } + public Azure.Compute.Batch.SchedulingState? SchedulingState { get { throw null; } } + public Azure.Compute.Batch.BatchStartTask StartTask { get { throw null; } } + public Azure.Compute.Batch.BatchStartTaskInfo StartTaskInfo { get { throw null; } } + public Azure.Compute.Batch.BatchNodeState? State { get { throw null; } } + public System.DateTimeOffset? StateTransitionTime { get { throw null; } } + public int? TotalTasksRun { get { throw null; } } + public int? TotalTasksSucceeded { get { throw null; } } + public string Url { get { throw null; } } + public Azure.Compute.Batch.VirtualMachineInfo VirtualMachineInfo { get { throw null; } } + public string VmSize { get { throw null; } } + Azure.Compute.Batch.BatchNode System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchNode System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchNodeAgentInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchNodeAgentInfo() { } + public System.DateTimeOffset LastUpdateTime { get { throw null; } } + public string Version { get { throw null; } } + Azure.Compute.Batch.BatchNodeAgentInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchNodeAgentInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BatchNodeCommunicationMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BatchNodeCommunicationMode(string value) { throw null; } + public static Azure.Compute.Batch.BatchNodeCommunicationMode Classic { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeCommunicationMode Default { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeCommunicationMode Simplified { get { throw null; } } + public bool Equals(Azure.Compute.Batch.BatchNodeCommunicationMode 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.Compute.Batch.BatchNodeCommunicationMode left, Azure.Compute.Batch.BatchNodeCommunicationMode right) { throw null; } + public static implicit operator Azure.Compute.Batch.BatchNodeCommunicationMode (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.BatchNodeCommunicationMode left, Azure.Compute.Batch.BatchNodeCommunicationMode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class BatchNodeCounts : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchNodeCounts() { } + public int Creating { get { throw null; } } + public int Idle { get { throw null; } } + public int LeavingPool { get { throw null; } } + public int Offline { get { throw null; } } + public int Preempted { get { throw null; } } + public int Rebooting { get { throw null; } } + public int Reimaging { get { throw null; } } + public int Running { get { throw null; } } + public int Starting { get { throw null; } } + public int StartTaskFailed { get { throw null; } } + public int Total { get { throw null; } } + public int Unknown { get { throw null; } } + public int Unusable { get { throw null; } } + public int UpgradingOs { get { throw null; } } + public int WaitingForStartTask { get { throw null; } } + Azure.Compute.Batch.BatchNodeCounts System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchNodeCounts System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BatchNodeDeallocationOption : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BatchNodeDeallocationOption(string value) { throw null; } + public static Azure.Compute.Batch.BatchNodeDeallocationOption Requeue { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeDeallocationOption RetainedData { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeDeallocationOption TaskCompletion { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeDeallocationOption Terminate { get { throw null; } } + public bool Equals(Azure.Compute.Batch.BatchNodeDeallocationOption 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.Compute.Batch.BatchNodeDeallocationOption left, Azure.Compute.Batch.BatchNodeDeallocationOption right) { throw null; } + public static implicit operator Azure.Compute.Batch.BatchNodeDeallocationOption (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.BatchNodeDeallocationOption left, Azure.Compute.Batch.BatchNodeDeallocationOption right) { throw null; } + public override string ToString() { throw null; } + } + public partial class BatchNodeDisableSchedulingContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchNodeDisableSchedulingContent() { } + public Azure.Compute.Batch.BatchNodeDisableSchedulingOption? NodeDisableSchedulingOption { get { throw null; } set { } } + Azure.Compute.Batch.BatchNodeDisableSchedulingContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchNodeDisableSchedulingContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BatchNodeDisableSchedulingOption : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BatchNodeDisableSchedulingOption(string value) { throw null; } + public static Azure.Compute.Batch.BatchNodeDisableSchedulingOption Requeue { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeDisableSchedulingOption TaskCompletion { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeDisableSchedulingOption Terminate { get { throw null; } } + public bool Equals(Azure.Compute.Batch.BatchNodeDisableSchedulingOption 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.Compute.Batch.BatchNodeDisableSchedulingOption left, Azure.Compute.Batch.BatchNodeDisableSchedulingOption right) { throw null; } + public static implicit operator Azure.Compute.Batch.BatchNodeDisableSchedulingOption (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.BatchNodeDisableSchedulingOption left, Azure.Compute.Batch.BatchNodeDisableSchedulingOption right) { throw null; } + public override string ToString() { throw null; } + } + public partial class BatchNodeEndpointConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchNodeEndpointConfiguration() { } + public System.Collections.Generic.IReadOnlyList InboundEndpoints { get { throw null; } } + Azure.Compute.Batch.BatchNodeEndpointConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchNodeEndpointConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchNodeError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchNodeError() { } + public string Code { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ErrorDetails { get { throw null; } } + public string Message { get { throw null; } } + Azure.Compute.Batch.BatchNodeError System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchNodeError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchNodeFile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchNodeFile() { } + public bool? IsDirectory { get { throw null; } } + public string Name { get { throw null; } } + public Azure.Compute.Batch.FileProperties Properties { get { throw null; } } + public string Url { get { throw null; } } + Azure.Compute.Batch.BatchNodeFile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchNodeFile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BatchNodeFillType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BatchNodeFillType(string value) { throw null; } + public static Azure.Compute.Batch.BatchNodeFillType Pack { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeFillType Spread { get { throw null; } } + public bool Equals(Azure.Compute.Batch.BatchNodeFillType 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.Compute.Batch.BatchNodeFillType left, Azure.Compute.Batch.BatchNodeFillType right) { throw null; } + public static implicit operator Azure.Compute.Batch.BatchNodeFillType (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.BatchNodeFillType left, Azure.Compute.Batch.BatchNodeFillType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class BatchNodeIdentityReference : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchNodeIdentityReference() { } + public string ResourceId { get { throw null; } set { } } + Azure.Compute.Batch.BatchNodeIdentityReference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchNodeIdentityReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchNodeInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchNodeInfo() { } + public string AffinityId { get { throw null; } } + public string NodeId { get { throw null; } } + public string NodeUrl { get { throw null; } } + public string PoolId { get { throw null; } } + public string TaskRootDirectory { get { throw null; } } + public string TaskRootDirectoryUrl { get { throw null; } } + Azure.Compute.Batch.BatchNodeInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchNodeInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchNodePlacementConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchNodePlacementConfiguration() { } + public Azure.Compute.Batch.BatchNodePlacementPolicyType? Policy { get { throw null; } set { } } + Azure.Compute.Batch.BatchNodePlacementConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchNodePlacementConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BatchNodePlacementPolicyType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BatchNodePlacementPolicyType(string value) { throw null; } + public static Azure.Compute.Batch.BatchNodePlacementPolicyType Regional { get { throw null; } } + public static Azure.Compute.Batch.BatchNodePlacementPolicyType Zonal { get { throw null; } } + public bool Equals(Azure.Compute.Batch.BatchNodePlacementPolicyType 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.Compute.Batch.BatchNodePlacementPolicyType left, Azure.Compute.Batch.BatchNodePlacementPolicyType right) { throw null; } + public static implicit operator Azure.Compute.Batch.BatchNodePlacementPolicyType (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.BatchNodePlacementPolicyType left, Azure.Compute.Batch.BatchNodePlacementPolicyType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class BatchNodeRebootContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchNodeRebootContent() { } + public Azure.Compute.Batch.BatchNodeRebootOption? NodeRebootOption { get { throw null; } set { } } + Azure.Compute.Batch.BatchNodeRebootContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchNodeRebootContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BatchNodeRebootOption : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BatchNodeRebootOption(string value) { throw null; } + public static Azure.Compute.Batch.BatchNodeRebootOption Requeue { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeRebootOption RetainedData { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeRebootOption TaskCompletion { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeRebootOption Terminate { get { throw null; } } + public bool Equals(Azure.Compute.Batch.BatchNodeRebootOption 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.Compute.Batch.BatchNodeRebootOption left, Azure.Compute.Batch.BatchNodeRebootOption right) { throw null; } + public static implicit operator Azure.Compute.Batch.BatchNodeRebootOption (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.BatchNodeRebootOption left, Azure.Compute.Batch.BatchNodeRebootOption right) { throw null; } + public override string ToString() { throw null; } + } + public partial class BatchNodeRemoteLoginSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchNodeRemoteLoginSettings() { } + public string RemoteLoginIpAddress { get { throw null; } } + public int RemoteLoginPort { get { throw null; } } + Azure.Compute.Batch.BatchNodeRemoteLoginSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchNodeRemoteLoginSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchNodeRemoveContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchNodeRemoveContent(System.Collections.Generic.IEnumerable nodeList) { } + public Azure.Compute.Batch.BatchNodeDeallocationOption? NodeDeallocationOption { get { throw null; } set { } } + public System.Collections.Generic.IList NodeList { get { throw null; } } + public System.TimeSpan? ResizeTimeout { get { throw null; } set { } } + Azure.Compute.Batch.BatchNodeRemoveContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchNodeRemoveContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BatchNodeState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BatchNodeState(string value) { throw null; } + public static Azure.Compute.Batch.BatchNodeState Creating { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeState Idle { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeState LeavingPool { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeState Offline { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeState Preempted { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeState Rebooting { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeState Reimaging { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeState Running { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeState Starting { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeState StartTaskFailed { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeState Unknown { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeState Unusable { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeState UpgradingOS { get { throw null; } } + public static Azure.Compute.Batch.BatchNodeState WaitingForStartTask { get { throw null; } } + public bool Equals(Azure.Compute.Batch.BatchNodeState 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.Compute.Batch.BatchNodeState left, Azure.Compute.Batch.BatchNodeState right) { throw null; } + public static implicit operator Azure.Compute.Batch.BatchNodeState (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.BatchNodeState left, Azure.Compute.Batch.BatchNodeState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class BatchNodeUserCreateContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchNodeUserCreateContent(string name) { } + public System.DateTimeOffset? ExpiryTime { get { throw null; } set { } } + public bool? IsAdmin { get { throw null; } set { } } + public string Name { get { throw null; } } + public string Password { get { throw null; } set { } } + public string SshPublicKey { get { throw null; } set { } } + Azure.Compute.Batch.BatchNodeUserCreateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchNodeUserCreateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchNodeUserUpdateContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchNodeUserUpdateContent() { } + public System.DateTimeOffset? ExpiryTime { get { throw null; } set { } } + public string Password { get { throw null; } set { } } + public string SshPublicKey { get { throw null; } set { } } + Azure.Compute.Batch.BatchNodeUserUpdateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchNodeUserUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchNodeVMExtension : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchNodeVMExtension() { } + public Azure.Compute.Batch.VMExtensionInstanceView InstanceView { get { throw null; } } + public string ProvisioningState { get { throw null; } } + public Azure.Compute.Batch.VMExtension VmExtension { get { throw null; } } + Azure.Compute.Batch.BatchNodeVMExtension System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchNodeVMExtension System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchPool : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchPool() { } + public Azure.Compute.Batch.AllocationState? AllocationState { get { throw null; } } + public System.DateTimeOffset? AllocationStateTransitionTime { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ApplicationPackageReferences { get { throw null; } } + public System.TimeSpan? AutoScaleEvaluationInterval { get { throw null; } } + public string AutoScaleFormula { get { throw null; } } + public Azure.Compute.Batch.AutoScaleRun AutoScaleRun { get { throw null; } } + public System.DateTimeOffset? CreationTime { get { throw null; } } + public int? CurrentDedicatedNodes { get { throw null; } } + public int? CurrentLowPriorityNodes { get { throw null; } } + public Azure.Compute.Batch.BatchNodeCommunicationMode? CurrentNodeCommunicationMode { get { throw null; } } + public string DisplayName { get { throw null; } } + public bool? EnableAutoScale { get { throw null; } } + public bool? EnableInterNodeCommunication { get { throw null; } } + public string ETag { get { throw null; } } + public string Id { get { throw null; } } + public Azure.Compute.Batch.BatchPoolIdentity Identity { get { throw null; } } + public System.DateTimeOffset? LastModified { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Metadata { get { throw null; } } + public System.Collections.Generic.IReadOnlyList MountConfiguration { get { throw null; } } + public Azure.Compute.Batch.NetworkConfiguration NetworkConfiguration { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ResizeErrors { get { throw null; } } + public System.TimeSpan? ResizeTimeout { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary ResourceTags { get { throw null; } } + public Azure.Compute.Batch.BatchStartTask StartTask { get { throw null; } } + public Azure.Compute.Batch.BatchPoolState? State { get { throw null; } } + public System.DateTimeOffset? StateTransitionTime { get { throw null; } } + public Azure.Compute.Batch.BatchPoolStatistics Stats { get { throw null; } } + public int? TargetDedicatedNodes { get { throw null; } } + public int? TargetLowPriorityNodes { get { throw null; } } + public Azure.Compute.Batch.BatchNodeCommunicationMode? TargetNodeCommunicationMode { get { throw null; } } + public Azure.Compute.Batch.BatchTaskSchedulingPolicy TaskSchedulingPolicy { get { throw null; } } + public int? TaskSlotsPerNode { get { throw null; } } + public Azure.Compute.Batch.UpgradePolicy UpgradePolicy { get { throw null; } } + public string Url { get { throw null; } } + public System.Collections.Generic.IReadOnlyList UserAccounts { get { throw null; } } + public Azure.Compute.Batch.VirtualMachineConfiguration VirtualMachineConfiguration { get { throw null; } } + public string VmSize { get { throw null; } } + Azure.Compute.Batch.BatchPool System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchPool System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchPoolCreateContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchPoolCreateContent(string id, string vmSize) { } + public System.Collections.Generic.IList ApplicationPackageReferences { get { throw null; } } + public System.TimeSpan? AutoScaleEvaluationInterval { get { throw null; } set { } } + public string AutoScaleFormula { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } + public bool? EnableAutoScale { get { throw null; } set { } } + public bool? EnableInterNodeCommunication { get { throw null; } set { } } + public string Id { get { throw null; } } + public System.Collections.Generic.IList Metadata { get { throw null; } } + public System.Collections.Generic.IList MountConfiguration { get { throw null; } } + public Azure.Compute.Batch.NetworkConfiguration NetworkConfiguration { get { throw null; } set { } } + public System.TimeSpan? ResizeTimeout { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ResourceTags { get { throw null; } } + public Azure.Compute.Batch.BatchStartTask StartTask { get { throw null; } set { } } + public int? TargetDedicatedNodes { get { throw null; } set { } } + public int? TargetLowPriorityNodes { get { throw null; } set { } } + public Azure.Compute.Batch.BatchNodeCommunicationMode? TargetNodeCommunicationMode { get { throw null; } set { } } + public Azure.Compute.Batch.BatchTaskSchedulingPolicy TaskSchedulingPolicy { get { throw null; } set { } } + public int? TaskSlotsPerNode { get { throw null; } set { } } + public Azure.Compute.Batch.UpgradePolicy UpgradePolicy { get { throw null; } set { } } + public System.Collections.Generic.IList UserAccounts { get { throw null; } } + public Azure.Compute.Batch.VirtualMachineConfiguration VirtualMachineConfiguration { get { throw null; } set { } } + public string VmSize { get { throw null; } } + Azure.Compute.Batch.BatchPoolCreateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchPoolCreateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchPoolEnableAutoScaleContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchPoolEnableAutoScaleContent() { } + public System.TimeSpan? AutoScaleEvaluationInterval { get { throw null; } set { } } + public string AutoScaleFormula { get { throw null; } set { } } + Azure.Compute.Batch.BatchPoolEnableAutoScaleContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchPoolEnableAutoScaleContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchPoolEndpointConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchPoolEndpointConfiguration(System.Collections.Generic.IEnumerable inboundNatPools) { } + public System.Collections.Generic.IList InboundNatPools { get { throw null; } } + Azure.Compute.Batch.BatchPoolEndpointConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchPoolEndpointConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchPoolEvaluateAutoScaleContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchPoolEvaluateAutoScaleContent(string autoScaleFormula) { } + public string AutoScaleFormula { get { throw null; } } + Azure.Compute.Batch.BatchPoolEvaluateAutoScaleContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchPoolEvaluateAutoScaleContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchPoolIdentity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchPoolIdentity() { } + public Azure.Compute.Batch.BatchPoolIdentityType Type { get { throw null; } } + public System.Collections.Generic.IReadOnlyList UserAssignedIdentities { get { throw null; } } + Azure.Compute.Batch.BatchPoolIdentity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchPoolIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BatchPoolIdentityType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BatchPoolIdentityType(string value) { throw null; } + public static Azure.Compute.Batch.BatchPoolIdentityType None { get { throw null; } } + public static Azure.Compute.Batch.BatchPoolIdentityType UserAssigned { get { throw null; } } + public bool Equals(Azure.Compute.Batch.BatchPoolIdentityType 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.Compute.Batch.BatchPoolIdentityType left, Azure.Compute.Batch.BatchPoolIdentityType right) { throw null; } + public static implicit operator Azure.Compute.Batch.BatchPoolIdentityType (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.BatchPoolIdentityType left, Azure.Compute.Batch.BatchPoolIdentityType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class BatchPoolInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchPoolInfo() { } + public Azure.Compute.Batch.BatchAutoPoolSpecification AutoPoolSpecification { get { throw null; } set { } } + public string PoolId { get { throw null; } set { } } + Azure.Compute.Batch.BatchPoolInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchPoolInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BatchPoolLifetimeOption : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BatchPoolLifetimeOption(string value) { throw null; } + public static Azure.Compute.Batch.BatchPoolLifetimeOption Job { get { throw null; } } + public static Azure.Compute.Batch.BatchPoolLifetimeOption JobSchedule { get { throw null; } } + public bool Equals(Azure.Compute.Batch.BatchPoolLifetimeOption 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.Compute.Batch.BatchPoolLifetimeOption left, Azure.Compute.Batch.BatchPoolLifetimeOption right) { throw null; } + public static implicit operator Azure.Compute.Batch.BatchPoolLifetimeOption (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.BatchPoolLifetimeOption left, Azure.Compute.Batch.BatchPoolLifetimeOption right) { throw null; } + public override string ToString() { throw null; } + } + public partial class BatchPoolNodeCounts : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchPoolNodeCounts() { } + public Azure.Compute.Batch.BatchNodeCounts Dedicated { get { throw null; } } + public Azure.Compute.Batch.BatchNodeCounts LowPriority { get { throw null; } } + public string PoolId { get { throw null; } } + Azure.Compute.Batch.BatchPoolNodeCounts System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchPoolNodeCounts System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchPoolReplaceContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchPoolReplaceContent(System.Collections.Generic.IEnumerable applicationPackageReferences, System.Collections.Generic.IEnumerable metadata) { } + public System.Collections.Generic.IList ApplicationPackageReferences { get { throw null; } } + public System.Collections.Generic.IList Metadata { get { throw null; } } + public Azure.Compute.Batch.BatchStartTask StartTask { get { throw null; } set { } } + public Azure.Compute.Batch.BatchNodeCommunicationMode? TargetNodeCommunicationMode { get { throw null; } set { } } + void global::System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchPoolReplaceContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.Compute.Batch.BatchPoolReplaceContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchPoolResizeContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchPoolResizeContent() { } + public Azure.Compute.Batch.BatchNodeDeallocationOption? NodeDeallocationOption { get { throw null; } set { } } + public System.TimeSpan? ResizeTimeout { get { throw null; } set { } } + public int? TargetDedicatedNodes { get { throw null; } set { } } + public int? TargetLowPriorityNodes { get { throw null; } set { } } + Azure.Compute.Batch.BatchPoolResizeContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchPoolResizeContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchPoolResourceStatistics : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchPoolResourceStatistics() { } + public float AvgCpuPercentage { get { throw null; } } + public float AvgDiskGiB { get { throw null; } } + public float AvgMemoryGiB { get { throw null; } } + public float DiskReadGiB { get { throw null; } } + public long DiskReadIOps { get { throw null; } } + public float DiskWriteGiB { get { throw null; } } + public long DiskWriteIOps { get { throw null; } } + public System.DateTimeOffset LastUpdateTime { get { throw null; } } + public float NetworkReadGiB { get { throw null; } } + public float NetworkWriteGiB { get { throw null; } } + public float PeakDiskGiB { get { throw null; } } + public float PeakMemoryGiB { get { throw null; } } + public System.DateTimeOffset StartTime { get { throw null; } } + Azure.Compute.Batch.BatchPoolResourceStatistics System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchPoolResourceStatistics System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchPoolSpecification : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchPoolSpecification(string vmSize) { } + public System.Collections.Generic.IList ApplicationPackageReferences { get { throw null; } } + public System.TimeSpan? AutoScaleEvaluationInterval { get { throw null; } set { } } + public string AutoScaleFormula { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } + public bool? EnableAutoScale { get { throw null; } set { } } + public bool? EnableInterNodeCommunication { get { throw null; } set { } } + public System.Collections.Generic.IList Metadata { get { throw null; } } + public System.Collections.Generic.IList MountConfiguration { get { throw null; } } + public Azure.Compute.Batch.NetworkConfiguration NetworkConfiguration { get { throw null; } set { } } + public System.TimeSpan? ResizeTimeout { get { throw null; } set { } } + public string ResourceTags { get { throw null; } set { } } + public Azure.Compute.Batch.BatchStartTask StartTask { get { throw null; } set { } } + public int? TargetDedicatedNodes { get { throw null; } set { } } + public int? TargetLowPriorityNodes { get { throw null; } set { } } + public Azure.Compute.Batch.BatchNodeCommunicationMode? TargetNodeCommunicationMode { get { throw null; } set { } } + public Azure.Compute.Batch.BatchTaskSchedulingPolicy TaskSchedulingPolicy { get { throw null; } set { } } + public int? TaskSlotsPerNode { get { throw null; } set { } } + public Azure.Compute.Batch.UpgradePolicy UpgradePolicy { get { throw null; } set { } } + public System.Collections.Generic.IList UserAccounts { get { throw null; } } + public Azure.Compute.Batch.VirtualMachineConfiguration VirtualMachineConfiguration { get { throw null; } set { } } + public string VmSize { get { throw null; } set { } } + Azure.Compute.Batch.BatchPoolSpecification System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchPoolSpecification System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BatchPoolState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BatchPoolState(string value) { throw null; } + public static Azure.Compute.Batch.BatchPoolState Active { get { throw null; } } + public static Azure.Compute.Batch.BatchPoolState Deleting { get { throw null; } } + public bool Equals(Azure.Compute.Batch.BatchPoolState 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.Compute.Batch.BatchPoolState left, Azure.Compute.Batch.BatchPoolState right) { throw null; } + public static implicit operator Azure.Compute.Batch.BatchPoolState (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.BatchPoolState left, Azure.Compute.Batch.BatchPoolState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class BatchPoolStatistics : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchPoolStatistics() { } + public System.DateTimeOffset LastUpdateTime { get { throw null; } } + public Azure.Compute.Batch.BatchPoolResourceStatistics ResourceStats { get { throw null; } } + public System.DateTimeOffset StartTime { get { throw null; } } + public string Url { get { throw null; } } + public Azure.Compute.Batch.BatchPoolUsageStatistics UsageStats { get { throw null; } } + Azure.Compute.Batch.BatchPoolStatistics System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchPoolStatistics System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchPoolUpdateContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchPoolUpdateContent() { } + public System.Collections.Generic.IList ApplicationPackageReferences { get { throw null; } } + public System.Collections.Generic.IList Metadata { get { throw null; } } + public Azure.Compute.Batch.BatchStartTask StartTask { get { throw null; } set { } } + public Azure.Compute.Batch.BatchNodeCommunicationMode? TargetNodeCommunicationMode { get { throw null; } set { } } + Azure.Compute.Batch.BatchPoolUpdateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchPoolUpdateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchPoolUsageMetrics : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchPoolUsageMetrics() { } + public System.DateTimeOffset EndTime { get { throw null; } } + public string PoolId { get { throw null; } } + public System.DateTimeOffset StartTime { get { throw null; } } + public float TotalCoreHours { get { throw null; } } + public string VmSize { get { throw null; } } + Azure.Compute.Batch.BatchPoolUsageMetrics System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchPoolUsageMetrics System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchPoolUsageStatistics : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchPoolUsageStatistics() { } + public System.TimeSpan DedicatedCoreTime { get { throw null; } } + public System.DateTimeOffset LastUpdateTime { get { throw null; } } + public System.DateTimeOffset StartTime { get { throw null; } } + Azure.Compute.Batch.BatchPoolUsageStatistics System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchPoolUsageStatistics System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchStartTask : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchStartTask(string commandLine) { } + public string CommandLine { get { throw null; } set { } } + public Azure.Compute.Batch.BatchTaskContainerSettings ContainerSettings { get { throw null; } set { } } + public System.Collections.Generic.IList EnvironmentSettings { get { throw null; } } + public int? MaxTaskRetryCount { get { throw null; } set { } } + public System.Collections.Generic.IList ResourceFiles { get { throw null; } } + public Azure.Compute.Batch.UserIdentity UserIdentity { get { throw null; } set { } } + public bool? WaitForSuccess { get { throw null; } set { } } + Azure.Compute.Batch.BatchStartTask System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchStartTask System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchStartTaskInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchStartTaskInfo() { } + public Azure.Compute.Batch.BatchTaskContainerExecutionInfo ContainerInfo { get { throw null; } } + public System.DateTimeOffset? EndTime { get { throw null; } } + public int? ExitCode { get { throw null; } } + public Azure.Compute.Batch.BatchTaskFailureInfo FailureInfo { get { throw null; } } + public System.DateTimeOffset? LastRetryTime { get { throw null; } } + public Azure.Compute.Batch.BatchTaskExecutionResult? Result { get { throw null; } } + public int RetryCount { get { throw null; } } + public System.DateTimeOffset StartTime { get { throw null; } } + public Azure.Compute.Batch.BatchStartTaskState State { get { throw null; } } + Azure.Compute.Batch.BatchStartTaskInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchStartTaskInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BatchStartTaskState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BatchStartTaskState(string value) { throw null; } + public static Azure.Compute.Batch.BatchStartTaskState Completed { get { throw null; } } + public static Azure.Compute.Batch.BatchStartTaskState Running { get { throw null; } } + public bool Equals(Azure.Compute.Batch.BatchStartTaskState 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.Compute.Batch.BatchStartTaskState left, Azure.Compute.Batch.BatchStartTaskState right) { throw null; } + public static implicit operator Azure.Compute.Batch.BatchStartTaskState (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.BatchStartTaskState left, Azure.Compute.Batch.BatchStartTaskState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class BatchSubtask : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchSubtask() { } + public Azure.Compute.Batch.BatchTaskContainerExecutionInfo ContainerInfo { get { throw null; } } + public System.DateTimeOffset? EndTime { get { throw null; } } + public int? ExitCode { get { throw null; } } + public Azure.Compute.Batch.BatchTaskFailureInfo FailureInfo { get { throw null; } } + public int? Id { get { throw null; } } + public Azure.Compute.Batch.BatchNodeInfo NodeInfo { get { throw null; } } + public Azure.Compute.Batch.BatchSubtaskState? PreviousState { get { throw null; } } + public System.DateTimeOffset? PreviousStateTransitionTime { get { throw null; } } + public Azure.Compute.Batch.BatchTaskExecutionResult? Result { get { throw null; } } + public System.DateTimeOffset? StartTime { get { throw null; } } + public Azure.Compute.Batch.BatchSubtaskState? State { get { throw null; } } + public System.DateTimeOffset? StateTransitionTime { get { throw null; } } + Azure.Compute.Batch.BatchSubtask System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchSubtask System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BatchSubtaskState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BatchSubtaskState(string value) { throw null; } + public static Azure.Compute.Batch.BatchSubtaskState Completed { get { throw null; } } + public static Azure.Compute.Batch.BatchSubtaskState Preparing { get { throw null; } } + public static Azure.Compute.Batch.BatchSubtaskState Running { get { throw null; } } + public bool Equals(Azure.Compute.Batch.BatchSubtaskState 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.Compute.Batch.BatchSubtaskState left, Azure.Compute.Batch.BatchSubtaskState right) { throw null; } + public static implicit operator Azure.Compute.Batch.BatchSubtaskState (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.BatchSubtaskState left, Azure.Compute.Batch.BatchSubtaskState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class BatchSupportedImage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchSupportedImage() { } + public System.DateTimeOffset? BatchSupportEndOfLife { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Capabilities { get { throw null; } } + public Azure.Compute.Batch.ImageReference ImageReference { get { throw null; } } + public string NodeAgentSkuId { get { throw null; } } + public Azure.Compute.Batch.OSType OsType { get { throw null; } } + public Azure.Compute.Batch.ImageVerificationType VerificationType { get { throw null; } } + Azure.Compute.Batch.BatchSupportedImage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchSupportedImage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchTask : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchTask() { } + public Azure.Compute.Batch.AffinityInfo AffinityInfo { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ApplicationPackageReferences { get { throw null; } } + public Azure.Compute.Batch.AuthenticationTokenSettings AuthenticationTokenSettings { get { throw null; } } + public string CommandLine { get { throw null; } } + public Azure.Compute.Batch.BatchTaskConstraints Constraints { get { throw null; } set { } } + public Azure.Compute.Batch.BatchTaskContainerSettings ContainerSettings { get { throw null; } } + public System.DateTimeOffset? CreationTime { get { throw null; } } + public Azure.Compute.Batch.BatchTaskDependencies DependsOn { get { throw null; } } + public string DisplayName { get { throw null; } } + public System.Collections.Generic.IReadOnlyList EnvironmentSettings { get { throw null; } } + public string ETag { get { throw null; } } + public Azure.Compute.Batch.BatchTaskExecutionInfo ExecutionInfo { get { throw null; } } + public Azure.Compute.Batch.ExitConditions ExitConditions { get { throw null; } } + public string Id { get { throw null; } } + public System.DateTimeOffset? LastModified { get { throw null; } } + public Azure.Compute.Batch.MultiInstanceSettings MultiInstanceSettings { get { throw null; } } + public Azure.Compute.Batch.BatchNodeInfo NodeInfo { get { throw null; } } + public System.Collections.Generic.IReadOnlyList OutputFiles { get { throw null; } } + public Azure.Compute.Batch.BatchTaskState? PreviousState { get { throw null; } } + public System.DateTimeOffset? PreviousStateTransitionTime { get { throw null; } } + public int? RequiredSlots { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ResourceFiles { get { throw null; } } + public Azure.Compute.Batch.BatchTaskState? State { get { throw null; } } + public System.DateTimeOffset? StateTransitionTime { get { throw null; } } + public Azure.Compute.Batch.BatchTaskStatistics Stats { get { throw null; } } + public string Url { get { throw null; } } + public Azure.Compute.Batch.UserIdentity UserIdentity { get { throw null; } } + Azure.Compute.Batch.BatchTask System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchTask System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchTaskAddCollectionResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchTaskAddCollectionResult() { } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + Azure.Compute.Batch.BatchTaskAddCollectionResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchTaskAddCollectionResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchTaskAddResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchTaskAddResult() { } + public Azure.Compute.Batch.BatchError Error { get { throw null; } } + public string ETag { get { throw null; } } + public System.DateTimeOffset? LastModified { get { throw null; } } + public string Location { get { throw null; } } + public Azure.Compute.Batch.BatchTaskAddStatus Status { get { throw null; } } + public string TaskId { get { throw null; } } + Azure.Compute.Batch.BatchTaskAddResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchTaskAddResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BatchTaskAddStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BatchTaskAddStatus(string value) { throw null; } + public static Azure.Compute.Batch.BatchTaskAddStatus ClientError { get { throw null; } } + public static Azure.Compute.Batch.BatchTaskAddStatus ServerError { get { throw null; } } + public static Azure.Compute.Batch.BatchTaskAddStatus Success { get { throw null; } } + public bool Equals(Azure.Compute.Batch.BatchTaskAddStatus 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.Compute.Batch.BatchTaskAddStatus left, Azure.Compute.Batch.BatchTaskAddStatus right) { throw null; } + public static implicit operator Azure.Compute.Batch.BatchTaskAddStatus (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.BatchTaskAddStatus left, Azure.Compute.Batch.BatchTaskAddStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class BatchTaskConstraints : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchTaskConstraints() { } + public int? MaxTaskRetryCount { get { throw null; } set { } } + public System.TimeSpan? MaxWallClockTime { get { throw null; } set { } } + public System.TimeSpan? RetentionTime { get { throw null; } set { } } + Azure.Compute.Batch.BatchTaskConstraints System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchTaskConstraints System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchTaskContainerExecutionInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchTaskContainerExecutionInfo() { } + public string ContainerId { get { throw null; } } + public string Error { get { throw null; } } + public string State { get { throw null; } } + Azure.Compute.Batch.BatchTaskContainerExecutionInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchTaskContainerExecutionInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchTaskContainerSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchTaskContainerSettings(string imageName) { } + public string ContainerRunOptions { get { throw null; } set { } } + public string ImageName { get { throw null; } set { } } + public Azure.Compute.Batch.ContainerRegistryReference Registry { get { throw null; } set { } } + public Azure.Compute.Batch.ContainerWorkingDirectory? WorkingDirectory { get { throw null; } set { } } + Azure.Compute.Batch.BatchTaskContainerSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchTaskContainerSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchTaskCounts : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchTaskCounts() { } + public int Active { get { throw null; } } + public int Completed { get { throw null; } } + public int Failed { get { throw null; } } + public int Running { get { throw null; } } + public int Succeeded { get { throw null; } } + Azure.Compute.Batch.BatchTaskCounts System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchTaskCounts System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchTaskCountsResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchTaskCountsResult() { } + public Azure.Compute.Batch.BatchTaskCounts TaskCounts { get { throw null; } } + public Azure.Compute.Batch.BatchTaskSlotCounts TaskSlotCounts { get { throw null; } } + Azure.Compute.Batch.BatchTaskCountsResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchTaskCountsResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchTaskCreateContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchTaskCreateContent(string id, string commandLine) { } + public Azure.Compute.Batch.AffinityInfo AffinityInfo { get { throw null; } set { } } + public System.Collections.Generic.IList ApplicationPackageReferences { get { throw null; } } + public Azure.Compute.Batch.AuthenticationTokenSettings AuthenticationTokenSettings { get { throw null; } set { } } + public string CommandLine { get { throw null; } } + public Azure.Compute.Batch.BatchTaskConstraints Constraints { get { throw null; } set { } } + public Azure.Compute.Batch.BatchTaskContainerSettings ContainerSettings { get { throw null; } set { } } + public Azure.Compute.Batch.BatchTaskDependencies DependsOn { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } + public System.Collections.Generic.IList EnvironmentSettings { get { throw null; } } + public Azure.Compute.Batch.ExitConditions ExitConditions { get { throw null; } set { } } + public string Id { get { throw null; } } + public Azure.Compute.Batch.MultiInstanceSettings MultiInstanceSettings { get { throw null; } set { } } + public System.Collections.Generic.IList OutputFiles { get { throw null; } } + public int? RequiredSlots { get { throw null; } set { } } + public System.Collections.Generic.IList ResourceFiles { get { throw null; } } + public Azure.Compute.Batch.UserIdentity UserIdentity { get { throw null; } set { } } + Azure.Compute.Batch.BatchTaskCreateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchTaskCreateContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchTaskDependencies : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchTaskDependencies() { } + public System.Collections.Generic.IList TaskIdRanges { get { throw null; } } + public System.Collections.Generic.IList TaskIds { get { throw null; } } + Azure.Compute.Batch.BatchTaskDependencies System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchTaskDependencies System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchTaskExecutionInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchTaskExecutionInfo() { } + public Azure.Compute.Batch.BatchTaskContainerExecutionInfo ContainerInfo { get { throw null; } } + public System.DateTimeOffset? EndTime { get { throw null; } } + public int? ExitCode { get { throw null; } } + public Azure.Compute.Batch.BatchTaskFailureInfo FailureInfo { get { throw null; } } + public System.DateTimeOffset? LastRequeueTime { get { throw null; } } + public System.DateTimeOffset? LastRetryTime { get { throw null; } } + public int RequeueCount { get { throw null; } } + public Azure.Compute.Batch.BatchTaskExecutionResult? Result { get { throw null; } } + public int RetryCount { get { throw null; } } + public System.DateTimeOffset? StartTime { get { throw null; } } + Azure.Compute.Batch.BatchTaskExecutionInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchTaskExecutionInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BatchTaskExecutionResult : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BatchTaskExecutionResult(string value) { throw null; } + public static Azure.Compute.Batch.BatchTaskExecutionResult Failure { get { throw null; } } + public static Azure.Compute.Batch.BatchTaskExecutionResult Success { get { throw null; } } + public bool Equals(Azure.Compute.Batch.BatchTaskExecutionResult 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.Compute.Batch.BatchTaskExecutionResult left, Azure.Compute.Batch.BatchTaskExecutionResult right) { throw null; } + public static implicit operator Azure.Compute.Batch.BatchTaskExecutionResult (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.BatchTaskExecutionResult left, Azure.Compute.Batch.BatchTaskExecutionResult right) { throw null; } + public override string ToString() { throw null; } + } + public partial class BatchTaskFailureInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchTaskFailureInfo() { } + public Azure.Compute.Batch.ErrorCategory Category { get { throw null; } } + public string Code { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Details { get { throw null; } } + public string Message { get { throw null; } } + Azure.Compute.Batch.BatchTaskFailureInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchTaskFailureInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchTaskGroup : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchTaskGroup(System.Collections.Generic.IEnumerable value) { } + public System.Collections.Generic.IList Value { get { throw null; } } + Azure.Compute.Batch.BatchTaskGroup System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchTaskGroup System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchTaskIdRange : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchTaskIdRange(int start, int end) { } + public int End { get { throw null; } set { } } + public int Start { get { throw null; } set { } } + Azure.Compute.Batch.BatchTaskIdRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchTaskIdRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchTaskInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchTaskInfo() { } + public Azure.Compute.Batch.BatchTaskExecutionInfo ExecutionInfo { get { throw null; } } + public string JobId { get { throw null; } } + public int? SubtaskId { get { throw null; } } + public string TaskId { get { throw null; } } + public Azure.Compute.Batch.BatchTaskState TaskState { get { throw null; } } + public string TaskUrl { get { throw null; } } + Azure.Compute.Batch.BatchTaskInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchTaskInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchTaskSchedulingPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BatchTaskSchedulingPolicy(Azure.Compute.Batch.BatchNodeFillType nodeFillType) { } + public Azure.Compute.Batch.BatchNodeFillType NodeFillType { get { throw null; } set { } } + Azure.Compute.Batch.BatchTaskSchedulingPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchTaskSchedulingPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BatchTaskSlotCounts : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchTaskSlotCounts() { } + public int Active { get { throw null; } } + public int Completed { get { throw null; } } + public int Failed { get { throw null; } } + public int Running { get { throw null; } } + public int Succeeded { get { throw null; } } + Azure.Compute.Batch.BatchTaskSlotCounts System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchTaskSlotCounts System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BatchTaskState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BatchTaskState(string value) { throw null; } + public static Azure.Compute.Batch.BatchTaskState Active { get { throw null; } } + public static Azure.Compute.Batch.BatchTaskState Completed { get { throw null; } } + public static Azure.Compute.Batch.BatchTaskState Preparing { get { throw null; } } + public static Azure.Compute.Batch.BatchTaskState Running { get { throw null; } } + public bool Equals(Azure.Compute.Batch.BatchTaskState 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.Compute.Batch.BatchTaskState left, Azure.Compute.Batch.BatchTaskState right) { throw null; } + public static implicit operator Azure.Compute.Batch.BatchTaskState (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.BatchTaskState left, Azure.Compute.Batch.BatchTaskState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class BatchTaskStatistics : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BatchTaskStatistics() { } + public System.TimeSpan KernelCpuTime { get { throw null; } } + public System.DateTimeOffset LastUpdateTime { get { throw null; } } + public float ReadIOGiB { get { throw null; } } + public long ReadIOps { get { throw null; } } + public System.DateTimeOffset StartTime { get { throw null; } } + public string Url { get { throw null; } } + public System.TimeSpan UserCpuTime { get { throw null; } } + public System.TimeSpan WaitTime { get { throw null; } } + public System.TimeSpan WallClockTime { get { throw null; } } + public float WriteIOGiB { get { throw null; } } + public long WriteIOps { get { throw null; } } + Azure.Compute.Batch.BatchTaskStatistics System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.BatchTaskStatistics System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CachingType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CachingType(string value) { throw null; } + public static Azure.Compute.Batch.CachingType None { get { throw null; } } + public static Azure.Compute.Batch.CachingType ReadOnly { get { throw null; } } + public static Azure.Compute.Batch.CachingType ReadWrite { get { throw null; } } + public bool Equals(Azure.Compute.Batch.CachingType 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.Compute.Batch.CachingType left, Azure.Compute.Batch.CachingType right) { throw null; } + public static implicit operator Azure.Compute.Batch.CachingType (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.CachingType left, Azure.Compute.Batch.CachingType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CifsMountConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CifsMountConfiguration(string username, string source, string relativeMountPath, string password) { } + public string MountOptions { get { throw null; } set { } } + public string Password { get { throw null; } set { } } + public string RelativeMountPath { get { throw null; } set { } } + public string Source { get { throw null; } set { } } + public string Username { get { throw null; } set { } } + Azure.Compute.Batch.CifsMountConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.CifsMountConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public static partial class ComputeBatchModelFactory + { + public static Azure.Compute.Batch.AutoScaleRun AutoScaleRun(System.DateTimeOffset timestamp = default(System.DateTimeOffset), string results = null, Azure.Compute.Batch.AutoScaleRunError error = null) { throw null; } + public static Azure.Compute.Batch.AutoScaleRunError AutoScaleRunError(string code = null, string message = null, System.Collections.Generic.IEnumerable values = null) { throw null; } + public static Azure.Compute.Batch.BatchApplication BatchApplication(string id = null, string displayName = null, System.Collections.Generic.IEnumerable versions = null) { throw null; } + public static Azure.Compute.Batch.BatchError BatchError(string code = null, Azure.Compute.Batch.BatchErrorMessage message = null, System.Collections.Generic.IEnumerable values = null) { throw null; } + public static Azure.Compute.Batch.BatchErrorDetail BatchErrorDetail(string key = null, string value = null) { throw null; } + public static Azure.Compute.Batch.BatchErrorMessage BatchErrorMessage(string lang = null, string value = null) { throw null; } + public static Azure.Compute.Batch.BatchJob BatchJob(string id = null, string displayName = null, bool? usesTaskDependencies = default(bool?), string url = null, string eTag = null, System.DateTimeOffset? lastModified = default(System.DateTimeOffset?), System.DateTimeOffset? creationTime = default(System.DateTimeOffset?), Azure.Compute.Batch.BatchJobState? state = default(Azure.Compute.Batch.BatchJobState?), System.DateTimeOffset? stateTransitionTime = default(System.DateTimeOffset?), Azure.Compute.Batch.BatchJobState? previousState = default(Azure.Compute.Batch.BatchJobState?), System.DateTimeOffset? previousStateTransitionTime = default(System.DateTimeOffset?), int? priority = default(int?), bool? allowTaskPreemption = default(bool?), int? maxParallelTasks = default(int?), Azure.Compute.Batch.BatchJobConstraints constraints = null, Azure.Compute.Batch.BatchJobManagerTask jobManagerTask = null, Azure.Compute.Batch.BatchJobPreparationTask jobPreparationTask = null, Azure.Compute.Batch.BatchJobReleaseTask jobReleaseTask = null, System.Collections.Generic.IEnumerable commonEnvironmentSettings = null, Azure.Compute.Batch.BatchPoolInfo poolInfo = null, Azure.Compute.Batch.OnAllBatchTasksComplete? onAllTasksComplete = default(Azure.Compute.Batch.OnAllBatchTasksComplete?), Azure.Compute.Batch.OnBatchTaskFailure? onTaskFailure = default(Azure.Compute.Batch.OnBatchTaskFailure?), Azure.Compute.Batch.BatchJobNetworkConfiguration networkConfiguration = null, System.Collections.Generic.IEnumerable metadata = null, Azure.Compute.Batch.BatchJobExecutionInfo executionInfo = null, Azure.Compute.Batch.BatchJobStatistics stats = null) { throw null; } + public static Azure.Compute.Batch.BatchJobCreateContent BatchJobCreateContent(string id = null, string displayName = null, bool? usesTaskDependencies = default(bool?), int? priority = default(int?), bool? allowTaskPreemption = default(bool?), int? maxParallelTasks = default(int?), Azure.Compute.Batch.BatchJobConstraints constraints = null, Azure.Compute.Batch.BatchJobManagerTask jobManagerTask = null, Azure.Compute.Batch.BatchJobPreparationTask jobPreparationTask = null, Azure.Compute.Batch.BatchJobReleaseTask jobReleaseTask = null, System.Collections.Generic.IEnumerable commonEnvironmentSettings = null, Azure.Compute.Batch.BatchPoolInfo poolInfo = null, Azure.Compute.Batch.OnAllBatchTasksComplete? onAllTasksComplete = default(Azure.Compute.Batch.OnAllBatchTasksComplete?), Azure.Compute.Batch.OnBatchTaskFailure? onTaskFailure = default(Azure.Compute.Batch.OnBatchTaskFailure?), Azure.Compute.Batch.BatchJobNetworkConfiguration networkConfiguration = null, System.Collections.Generic.IEnumerable metadata = null) { throw null; } + public static Azure.Compute.Batch.BatchJobExecutionInfo BatchJobExecutionInfo(System.DateTimeOffset startTime = default(System.DateTimeOffset), System.DateTimeOffset? endTime = default(System.DateTimeOffset?), string poolId = null, Azure.Compute.Batch.BatchJobSchedulingError schedulingError = null, string terminationReason = null) { throw null; } + public static Azure.Compute.Batch.BatchJobPreparationAndReleaseTaskStatus BatchJobPreparationAndReleaseTaskStatus(string poolId = null, string nodeId = null, string nodeUrl = null, Azure.Compute.Batch.BatchJobPreparationTaskExecutionInfo jobPreparationTaskExecutionInfo = null, Azure.Compute.Batch.BatchJobReleaseTaskExecutionInfo jobReleaseTaskExecutionInfo = null) { throw null; } + public static Azure.Compute.Batch.BatchJobPreparationTaskExecutionInfo BatchJobPreparationTaskExecutionInfo(System.DateTimeOffset startTime = default(System.DateTimeOffset), System.DateTimeOffset? endTime = default(System.DateTimeOffset?), Azure.Compute.Batch.BatchJobPreparationTaskState state = default(Azure.Compute.Batch.BatchJobPreparationTaskState), string taskRootDirectory = null, string taskRootDirectoryUrl = null, int? exitCode = default(int?), Azure.Compute.Batch.BatchTaskContainerExecutionInfo containerInfo = null, Azure.Compute.Batch.BatchTaskFailureInfo failureInfo = null, int retryCount = 0, System.DateTimeOffset? lastRetryTime = default(System.DateTimeOffset?), Azure.Compute.Batch.BatchTaskExecutionResult? result = default(Azure.Compute.Batch.BatchTaskExecutionResult?)) { throw null; } + public static Azure.Compute.Batch.BatchJobReleaseTaskExecutionInfo BatchJobReleaseTaskExecutionInfo(System.DateTimeOffset startTime = default(System.DateTimeOffset), System.DateTimeOffset? endTime = default(System.DateTimeOffset?), Azure.Compute.Batch.BatchJobReleaseTaskState state = default(Azure.Compute.Batch.BatchJobReleaseTaskState), string taskRootDirectory = null, string taskRootDirectoryUrl = null, int? exitCode = default(int?), Azure.Compute.Batch.BatchTaskContainerExecutionInfo containerInfo = null, Azure.Compute.Batch.BatchTaskFailureInfo failureInfo = null, Azure.Compute.Batch.BatchTaskExecutionResult? result = default(Azure.Compute.Batch.BatchTaskExecutionResult?)) { throw null; } + public static Azure.Compute.Batch.BatchJobSchedule BatchJobSchedule(string id = null, string displayName = null, string url = null, string eTag = null, System.DateTimeOffset? lastModified = default(System.DateTimeOffset?), System.DateTimeOffset? creationTime = default(System.DateTimeOffset?), Azure.Compute.Batch.BatchJobScheduleState? state = default(Azure.Compute.Batch.BatchJobScheduleState?), System.DateTimeOffset? stateTransitionTime = default(System.DateTimeOffset?), Azure.Compute.Batch.BatchJobScheduleState? previousState = default(Azure.Compute.Batch.BatchJobScheduleState?), System.DateTimeOffset? previousStateTransitionTime = default(System.DateTimeOffset?), Azure.Compute.Batch.BatchJobScheduleConfiguration schedule = null, Azure.Compute.Batch.BatchJobSpecification jobSpecification = null, Azure.Compute.Batch.BatchJobScheduleExecutionInfo executionInfo = null, System.Collections.Generic.IEnumerable metadata = null, Azure.Compute.Batch.BatchJobScheduleStatistics stats = null) { throw null; } + public static Azure.Compute.Batch.BatchJobScheduleCreateContent BatchJobScheduleCreateContent(string id = null, string displayName = null, Azure.Compute.Batch.BatchJobScheduleConfiguration schedule = null, Azure.Compute.Batch.BatchJobSpecification jobSpecification = null, System.Collections.Generic.IEnumerable metadata = null) { throw null; } + public static Azure.Compute.Batch.BatchJobScheduleExecutionInfo BatchJobScheduleExecutionInfo(System.DateTimeOffset? nextRunTime = default(System.DateTimeOffset?), Azure.Compute.Batch.RecentBatchJob recentJob = null, System.DateTimeOffset? endTime = default(System.DateTimeOffset?)) { throw null; } + public static Azure.Compute.Batch.BatchJobScheduleStatistics BatchJobScheduleStatistics(string url = null, System.DateTimeOffset startTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdateTime = default(System.DateTimeOffset), System.TimeSpan userCpuTime = default(System.TimeSpan), System.TimeSpan kernelCpuTime = default(System.TimeSpan), System.TimeSpan wallClockTime = default(System.TimeSpan), long readIOps = (long)0, long writeIOps = (long)0, float readIOGiB = 0f, float writeIOGiB = 0f, long numSucceededTasks = (long)0, long numFailedTasks = (long)0, long numTaskRetries = (long)0, System.TimeSpan waitTime = default(System.TimeSpan)) { throw null; } + public static Azure.Compute.Batch.BatchJobSchedulingError BatchJobSchedulingError(Azure.Compute.Batch.ErrorCategory category = default(Azure.Compute.Batch.ErrorCategory), string code = null, string message = null, System.Collections.Generic.IEnumerable details = null) { throw null; } + public static Azure.Compute.Batch.BatchJobStatistics BatchJobStatistics(string url = null, System.DateTimeOffset startTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdateTime = default(System.DateTimeOffset), System.TimeSpan userCpuTime = default(System.TimeSpan), System.TimeSpan kernelCpuTime = default(System.TimeSpan), System.TimeSpan wallClockTime = default(System.TimeSpan), long readIOps = (long)0, long writeIOps = (long)0, float readIOGiB = 0f, float writeIOGiB = 0f, long numSucceededTasks = (long)0, long numFailedTasks = (long)0, long numTaskRetries = (long)0, System.TimeSpan waitTime = default(System.TimeSpan)) { throw null; } + public static Azure.Compute.Batch.BatchNode BatchNode(string id = null, string url = null, Azure.Compute.Batch.BatchNodeState? state = default(Azure.Compute.Batch.BatchNodeState?), Azure.Compute.Batch.SchedulingState? schedulingState = default(Azure.Compute.Batch.SchedulingState?), System.DateTimeOffset? stateTransitionTime = default(System.DateTimeOffset?), System.DateTimeOffset? lastBootTime = default(System.DateTimeOffset?), System.DateTimeOffset? allocationTime = default(System.DateTimeOffset?), string ipAddress = null, string affinityId = null, string vmSize = null, int? totalTasksRun = default(int?), int? runningTasksCount = default(int?), int? runningTaskSlotsCount = default(int?), int? totalTasksSucceeded = default(int?), System.Collections.Generic.IEnumerable recentTasks = null, Azure.Compute.Batch.BatchStartTask startTask = null, Azure.Compute.Batch.BatchStartTaskInfo startTaskInfo = null, System.Collections.Generic.IEnumerable errors = null, bool? isDedicated = default(bool?), Azure.Compute.Batch.BatchNodeEndpointConfiguration endpointConfiguration = null, Azure.Compute.Batch.BatchNodeAgentInfo nodeAgentInfo = null, Azure.Compute.Batch.VirtualMachineInfo virtualMachineInfo = null) { throw null; } + public static Azure.Compute.Batch.BatchNodeAgentInfo BatchNodeAgentInfo(string version = null, System.DateTimeOffset lastUpdateTime = default(System.DateTimeOffset)) { throw null; } + public static Azure.Compute.Batch.BatchNodeCounts BatchNodeCounts(int creating = 0, int idle = 0, int offline = 0, int preempted = 0, int rebooting = 0, int reimaging = 0, int running = 0, int starting = 0, int startTaskFailed = 0, int leavingPool = 0, int unknown = 0, int unusable = 0, int waitingForStartTask = 0, int total = 0, int upgradingOs = 0) { throw null; } + public static Azure.Compute.Batch.BatchNodeEndpointConfiguration BatchNodeEndpointConfiguration(System.Collections.Generic.IEnumerable inboundEndpoints = null) { throw null; } + public static Azure.Compute.Batch.BatchNodeError BatchNodeError(string code = null, string message = null, System.Collections.Generic.IEnumerable errorDetails = null) { throw null; } + public static Azure.Compute.Batch.BatchNodeFile BatchNodeFile(string name = null, string url = null, bool? isDirectory = default(bool?), Azure.Compute.Batch.FileProperties properties = null) { throw null; } + public static Azure.Compute.Batch.BatchNodeInfo BatchNodeInfo(string affinityId = null, string nodeUrl = null, string poolId = null, string nodeId = null, string taskRootDirectory = null, string taskRootDirectoryUrl = null) { throw null; } + public static Azure.Compute.Batch.BatchNodeRemoteLoginSettings BatchNodeRemoteLoginSettings(string remoteLoginIpAddress = null, int remoteLoginPort = 0) { throw null; } + public static Azure.Compute.Batch.BatchNodeUserCreateContent BatchNodeUserCreateContent(string name = null, bool? isAdmin = default(bool?), System.DateTimeOffset? expiryTime = default(System.DateTimeOffset?), string password = null, string sshPublicKey = null) { throw null; } + public static Azure.Compute.Batch.BatchNodeVMExtension BatchNodeVMExtension(string provisioningState = null, Azure.Compute.Batch.VMExtension vmExtension = null, Azure.Compute.Batch.VMExtensionInstanceView instanceView = null) { throw null; } + public static Azure.Compute.Batch.BatchPool BatchPool(string id = null, string displayName = null, string url = null, string eTag = null, System.DateTimeOffset? lastModified = default(System.DateTimeOffset?), System.DateTimeOffset? creationTime = default(System.DateTimeOffset?), Azure.Compute.Batch.BatchPoolState? state = default(Azure.Compute.Batch.BatchPoolState?), System.DateTimeOffset? stateTransitionTime = default(System.DateTimeOffset?), Azure.Compute.Batch.AllocationState? allocationState = default(Azure.Compute.Batch.AllocationState?), System.DateTimeOffset? allocationStateTransitionTime = default(System.DateTimeOffset?), string vmSize = null, Azure.Compute.Batch.VirtualMachineConfiguration virtualMachineConfiguration = null, System.TimeSpan? resizeTimeout = default(System.TimeSpan?), System.Collections.Generic.IEnumerable resizeErrors = null, System.Collections.Generic.IReadOnlyDictionary resourceTags = null, int? currentDedicatedNodes = default(int?), int? currentLowPriorityNodes = default(int?), int? targetDedicatedNodes = default(int?), int? targetLowPriorityNodes = default(int?), bool? enableAutoScale = default(bool?), string autoScaleFormula = null, System.TimeSpan? autoScaleEvaluationInterval = default(System.TimeSpan?), Azure.Compute.Batch.AutoScaleRun autoScaleRun = null, bool? enableInterNodeCommunication = default(bool?), Azure.Compute.Batch.NetworkConfiguration networkConfiguration = null, Azure.Compute.Batch.BatchStartTask startTask = null, System.Collections.Generic.IEnumerable applicationPackageReferences = null, int? taskSlotsPerNode = default(int?), Azure.Compute.Batch.BatchTaskSchedulingPolicy taskSchedulingPolicy = null, System.Collections.Generic.IEnumerable userAccounts = null, System.Collections.Generic.IEnumerable metadata = null, Azure.Compute.Batch.BatchPoolStatistics stats = null, System.Collections.Generic.IEnumerable mountConfiguration = null, Azure.Compute.Batch.BatchPoolIdentity identity = null, Azure.Compute.Batch.BatchNodeCommunicationMode? targetNodeCommunicationMode = default(Azure.Compute.Batch.BatchNodeCommunicationMode?), Azure.Compute.Batch.BatchNodeCommunicationMode? currentNodeCommunicationMode = default(Azure.Compute.Batch.BatchNodeCommunicationMode?), Azure.Compute.Batch.UpgradePolicy upgradePolicy = null) { throw null; } + public static Azure.Compute.Batch.BatchPoolCreateContent BatchPoolCreateContent(string id = null, string displayName = null, string vmSize = null, Azure.Compute.Batch.VirtualMachineConfiguration virtualMachineConfiguration = null, System.TimeSpan? resizeTimeout = default(System.TimeSpan?), System.Collections.Generic.IDictionary resourceTags = null, int? targetDedicatedNodes = default(int?), int? targetLowPriorityNodes = default(int?), bool? enableAutoScale = default(bool?), string autoScaleFormula = null, System.TimeSpan? autoScaleEvaluationInterval = default(System.TimeSpan?), bool? enableInterNodeCommunication = default(bool?), Azure.Compute.Batch.NetworkConfiguration networkConfiguration = null, Azure.Compute.Batch.BatchStartTask startTask = null, System.Collections.Generic.IEnumerable applicationPackageReferences = null, int? taskSlotsPerNode = default(int?), Azure.Compute.Batch.BatchTaskSchedulingPolicy taskSchedulingPolicy = null, System.Collections.Generic.IEnumerable userAccounts = null, System.Collections.Generic.IEnumerable metadata = null, System.Collections.Generic.IEnumerable mountConfiguration = null, Azure.Compute.Batch.BatchNodeCommunicationMode? targetNodeCommunicationMode = default(Azure.Compute.Batch.BatchNodeCommunicationMode?), Azure.Compute.Batch.UpgradePolicy upgradePolicy = null) { throw null; } + public static Azure.Compute.Batch.BatchPoolIdentity BatchPoolIdentity(Azure.Compute.Batch.BatchPoolIdentityType type = default(Azure.Compute.Batch.BatchPoolIdentityType), System.Collections.Generic.IEnumerable userAssignedIdentities = null) { throw null; } + public static Azure.Compute.Batch.BatchPoolNodeCounts BatchPoolNodeCounts(string poolId = null, Azure.Compute.Batch.BatchNodeCounts dedicated = null, Azure.Compute.Batch.BatchNodeCounts lowPriority = null) { throw null; } + public static Azure.Compute.Batch.BatchPoolResourceStatistics BatchPoolResourceStatistics(System.DateTimeOffset startTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdateTime = default(System.DateTimeOffset), float avgCpuPercentage = 0f, float avgMemoryGiB = 0f, float peakMemoryGiB = 0f, float avgDiskGiB = 0f, float peakDiskGiB = 0f, long diskReadIOps = (long)0, long diskWriteIOps = (long)0, float diskReadGiB = 0f, float diskWriteGiB = 0f, float networkReadGiB = 0f, float networkWriteGiB = 0f) { throw null; } + public static Azure.Compute.Batch.BatchPoolStatistics BatchPoolStatistics(string url = null, System.DateTimeOffset startTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdateTime = default(System.DateTimeOffset), Azure.Compute.Batch.BatchPoolUsageStatistics usageStats = null, Azure.Compute.Batch.BatchPoolResourceStatistics resourceStats = null) { throw null; } + public static Azure.Compute.Batch.BatchPoolUsageMetrics BatchPoolUsageMetrics(string poolId = null, System.DateTimeOffset startTime = default(System.DateTimeOffset), System.DateTimeOffset endTime = default(System.DateTimeOffset), string vmSize = null, float totalCoreHours = 0f) { throw null; } + public static Azure.Compute.Batch.BatchPoolUsageStatistics BatchPoolUsageStatistics(System.DateTimeOffset startTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdateTime = default(System.DateTimeOffset), System.TimeSpan dedicatedCoreTime = default(System.TimeSpan)) { throw null; } + public static Azure.Compute.Batch.BatchStartTaskInfo BatchStartTaskInfo(Azure.Compute.Batch.BatchStartTaskState state = default(Azure.Compute.Batch.BatchStartTaskState), System.DateTimeOffset startTime = default(System.DateTimeOffset), System.DateTimeOffset? endTime = default(System.DateTimeOffset?), int? exitCode = default(int?), Azure.Compute.Batch.BatchTaskContainerExecutionInfo containerInfo = null, Azure.Compute.Batch.BatchTaskFailureInfo failureInfo = null, int retryCount = 0, System.DateTimeOffset? lastRetryTime = default(System.DateTimeOffset?), Azure.Compute.Batch.BatchTaskExecutionResult? result = default(Azure.Compute.Batch.BatchTaskExecutionResult?)) { throw null; } + public static Azure.Compute.Batch.BatchSubtask BatchSubtask(int? id = default(int?), Azure.Compute.Batch.BatchNodeInfo nodeInfo = null, System.DateTimeOffset? startTime = default(System.DateTimeOffset?), System.DateTimeOffset? endTime = default(System.DateTimeOffset?), int? exitCode = default(int?), Azure.Compute.Batch.BatchTaskContainerExecutionInfo containerInfo = null, Azure.Compute.Batch.BatchTaskFailureInfo failureInfo = null, Azure.Compute.Batch.BatchSubtaskState? state = default(Azure.Compute.Batch.BatchSubtaskState?), System.DateTimeOffset? stateTransitionTime = default(System.DateTimeOffset?), Azure.Compute.Batch.BatchSubtaskState? previousState = default(Azure.Compute.Batch.BatchSubtaskState?), System.DateTimeOffset? previousStateTransitionTime = default(System.DateTimeOffset?), Azure.Compute.Batch.BatchTaskExecutionResult? result = default(Azure.Compute.Batch.BatchTaskExecutionResult?)) { throw null; } + public static Azure.Compute.Batch.BatchSupportedImage BatchSupportedImage(string nodeAgentSkuId = null, Azure.Compute.Batch.ImageReference imageReference = null, Azure.Compute.Batch.OSType osType = default(Azure.Compute.Batch.OSType), System.Collections.Generic.IEnumerable capabilities = null, System.DateTimeOffset? batchSupportEndOfLife = default(System.DateTimeOffset?), Azure.Compute.Batch.ImageVerificationType verificationType = default(Azure.Compute.Batch.ImageVerificationType)) { throw null; } + public static Azure.Compute.Batch.BatchTask BatchTask(string id = null, string displayName = null, string url = null, string eTag = null, System.DateTimeOffset? lastModified = default(System.DateTimeOffset?), System.DateTimeOffset? creationTime = default(System.DateTimeOffset?), Azure.Compute.Batch.ExitConditions exitConditions = null, Azure.Compute.Batch.BatchTaskState? state = default(Azure.Compute.Batch.BatchTaskState?), System.DateTimeOffset? stateTransitionTime = default(System.DateTimeOffset?), Azure.Compute.Batch.BatchTaskState? previousState = default(Azure.Compute.Batch.BatchTaskState?), System.DateTimeOffset? previousStateTransitionTime = default(System.DateTimeOffset?), string commandLine = null, Azure.Compute.Batch.BatchTaskContainerSettings containerSettings = null, System.Collections.Generic.IEnumerable resourceFiles = null, System.Collections.Generic.IEnumerable outputFiles = null, System.Collections.Generic.IEnumerable environmentSettings = null, Azure.Compute.Batch.AffinityInfo affinityInfo = null, Azure.Compute.Batch.BatchTaskConstraints constraints = null, int? requiredSlots = default(int?), Azure.Compute.Batch.UserIdentity userIdentity = null, Azure.Compute.Batch.BatchTaskExecutionInfo executionInfo = null, Azure.Compute.Batch.BatchNodeInfo nodeInfo = null, Azure.Compute.Batch.MultiInstanceSettings multiInstanceSettings = null, Azure.Compute.Batch.BatchTaskStatistics stats = null, Azure.Compute.Batch.BatchTaskDependencies dependsOn = null, System.Collections.Generic.IEnumerable applicationPackageReferences = null, Azure.Compute.Batch.AuthenticationTokenSettings authenticationTokenSettings = null) { throw null; } + public static Azure.Compute.Batch.BatchTaskAddCollectionResult BatchTaskAddCollectionResult(System.Collections.Generic.IEnumerable value = null) { throw null; } + public static Azure.Compute.Batch.BatchTaskAddResult BatchTaskAddResult(Azure.Compute.Batch.BatchTaskAddStatus status = default(Azure.Compute.Batch.BatchTaskAddStatus), string taskId = null, string eTag = null, System.DateTimeOffset? lastModified = default(System.DateTimeOffset?), string location = null, Azure.Compute.Batch.BatchError error = null) { throw null; } + public static Azure.Compute.Batch.BatchTaskContainerExecutionInfo BatchTaskContainerExecutionInfo(string containerId = null, string state = null, string error = null) { throw null; } + public static Azure.Compute.Batch.BatchTaskCounts BatchTaskCounts(int active = 0, int running = 0, int completed = 0, int succeeded = 0, int failed = 0) { throw null; } + public static Azure.Compute.Batch.BatchTaskCountsResult BatchTaskCountsResult(Azure.Compute.Batch.BatchTaskCounts taskCounts = null, Azure.Compute.Batch.BatchTaskSlotCounts taskSlotCounts = null) { throw null; } + public static Azure.Compute.Batch.BatchTaskCreateContent BatchTaskCreateContent(string id = null, string displayName = null, Azure.Compute.Batch.ExitConditions exitConditions = null, string commandLine = null, Azure.Compute.Batch.BatchTaskContainerSettings containerSettings = null, System.Collections.Generic.IEnumerable resourceFiles = null, System.Collections.Generic.IEnumerable outputFiles = null, System.Collections.Generic.IEnumerable environmentSettings = null, Azure.Compute.Batch.AffinityInfo affinityInfo = null, Azure.Compute.Batch.BatchTaskConstraints constraints = null, int? requiredSlots = default(int?), Azure.Compute.Batch.UserIdentity userIdentity = null, Azure.Compute.Batch.MultiInstanceSettings multiInstanceSettings = null, Azure.Compute.Batch.BatchTaskDependencies dependsOn = null, System.Collections.Generic.IEnumerable applicationPackageReferences = null, Azure.Compute.Batch.AuthenticationTokenSettings authenticationTokenSettings = null) { throw null; } + public static Azure.Compute.Batch.BatchTaskExecutionInfo BatchTaskExecutionInfo(System.DateTimeOffset? startTime = default(System.DateTimeOffset?), System.DateTimeOffset? endTime = default(System.DateTimeOffset?), int? exitCode = default(int?), Azure.Compute.Batch.BatchTaskContainerExecutionInfo containerInfo = null, Azure.Compute.Batch.BatchTaskFailureInfo failureInfo = null, int retryCount = 0, System.DateTimeOffset? lastRetryTime = default(System.DateTimeOffset?), int requeueCount = 0, System.DateTimeOffset? lastRequeueTime = default(System.DateTimeOffset?), Azure.Compute.Batch.BatchTaskExecutionResult? result = default(Azure.Compute.Batch.BatchTaskExecutionResult?)) { throw null; } + public static Azure.Compute.Batch.BatchTaskFailureInfo BatchTaskFailureInfo(Azure.Compute.Batch.ErrorCategory category = default(Azure.Compute.Batch.ErrorCategory), string code = null, string message = null, System.Collections.Generic.IEnumerable details = null) { throw null; } + public static Azure.Compute.Batch.BatchTaskInfo BatchTaskInfo(string taskUrl = null, string jobId = null, string taskId = null, int? subtaskId = default(int?), Azure.Compute.Batch.BatchTaskState taskState = default(Azure.Compute.Batch.BatchTaskState), Azure.Compute.Batch.BatchTaskExecutionInfo executionInfo = null) { throw null; } + public static Azure.Compute.Batch.BatchTaskSlotCounts BatchTaskSlotCounts(int active = 0, int running = 0, int completed = 0, int succeeded = 0, int failed = 0) { throw null; } + public static Azure.Compute.Batch.BatchTaskStatistics BatchTaskStatistics(string url = null, System.DateTimeOffset startTime = default(System.DateTimeOffset), System.DateTimeOffset lastUpdateTime = default(System.DateTimeOffset), System.TimeSpan userCpuTime = default(System.TimeSpan), System.TimeSpan kernelCpuTime = default(System.TimeSpan), System.TimeSpan wallClockTime = default(System.TimeSpan), long readIOps = (long)0, long writeIOps = (long)0, float readIOGiB = 0f, float writeIOGiB = 0f, System.TimeSpan waitTime = default(System.TimeSpan)) { throw null; } + public static Azure.Compute.Batch.FileProperties FileProperties(System.DateTimeOffset? creationTime = default(System.DateTimeOffset?), System.DateTimeOffset lastModified = default(System.DateTimeOffset), long contentLength = (long)0, string contentType = null, string fileMode = null) { throw null; } + public static Azure.Compute.Batch.ImageReference ImageReference(string publisher = null, string offer = null, string sku = null, string version = null, string virtualMachineImageId = null, string exactVersion = null) { throw null; } + public static Azure.Compute.Batch.InboundEndpoint InboundEndpoint(string name = null, Azure.Compute.Batch.InboundEndpointProtocol protocol = default(Azure.Compute.Batch.InboundEndpointProtocol), string publicIpAddress = null, string publicFQDN = null, int frontendPort = 0, int backendPort = 0) { throw null; } + public static Azure.Compute.Batch.InstanceViewStatus InstanceViewStatus(string code = null, string displayStatus = null, Azure.Compute.Batch.StatusLevelTypes? level = default(Azure.Compute.Batch.StatusLevelTypes?), string message = null, System.DateTimeOffset? time = default(System.DateTimeOffset?)) { throw null; } + public static Azure.Compute.Batch.NameValuePair NameValuePair(string name = null, string value = null) { throw null; } + public static Azure.Compute.Batch.RecentBatchJob RecentBatchJob(string id = null, string url = null) { throw null; } + public static Azure.Compute.Batch.ResizeError ResizeError(string code = null, string message = null, System.Collections.Generic.IEnumerable values = null) { throw null; } + public static Azure.Compute.Batch.UploadBatchServiceLogsContent UploadBatchServiceLogsContent(string containerUrl = null, System.DateTimeOffset startTime = default(System.DateTimeOffset), System.DateTimeOffset? endTime = default(System.DateTimeOffset?), Azure.Compute.Batch.BatchNodeIdentityReference identityReference = null) { throw null; } + public static Azure.Compute.Batch.UploadBatchServiceLogsResult UploadBatchServiceLogsResult(string virtualDirectoryName = null, int numberOfFilesUploaded = 0) { throw null; } + public static Azure.Compute.Batch.UserAssignedIdentity UserAssignedIdentity(string resourceId = null, string clientId = null, string principalId = null) { throw null; } + public static Azure.Compute.Batch.VirtualMachineInfo VirtualMachineInfo(Azure.Compute.Batch.ImageReference imageReference = null, string scaleSetVmResourceId = null) { throw null; } + public static Azure.Compute.Batch.VMExtensionInstanceView VMExtensionInstanceView(string name = null, System.Collections.Generic.IEnumerable statuses = null, System.Collections.Generic.IEnumerable subStatuses = null) { throw null; } + } + public partial class ContainerConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ContainerConfiguration(Azure.Compute.Batch.ContainerType type) { } + public System.Collections.Generic.IList ContainerImageNames { get { throw null; } } + public System.Collections.Generic.IList ContainerRegistries { get { throw null; } } + public Azure.Compute.Batch.ContainerType Type { get { throw null; } set { } } + Azure.Compute.Batch.ContainerConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.ContainerConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ContainerRegistryReference : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ContainerRegistryReference() { } + public Azure.Compute.Batch.BatchNodeIdentityReference IdentityReference { get { throw null; } set { } } + public string Password { get { throw null; } set { } } + public string RegistryServer { get { throw null; } set { } } + public string Username { get { throw null; } set { } } + Azure.Compute.Batch.ContainerRegistryReference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.ContainerRegistryReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ContainerType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ContainerType(string value) { throw null; } + public static Azure.Compute.Batch.ContainerType CriCompatible { get { throw null; } } + public static Azure.Compute.Batch.ContainerType DockerCompatible { get { throw null; } } + public bool Equals(Azure.Compute.Batch.ContainerType 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.Compute.Batch.ContainerType left, Azure.Compute.Batch.ContainerType right) { throw null; } + public static implicit operator Azure.Compute.Batch.ContainerType (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.ContainerType left, Azure.Compute.Batch.ContainerType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ContainerWorkingDirectory : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ContainerWorkingDirectory(string value) { throw null; } + public static Azure.Compute.Batch.ContainerWorkingDirectory ContainerImageDefault { get { throw null; } } + public static Azure.Compute.Batch.ContainerWorkingDirectory TaskWorkingDirectory { get { throw null; } } + public bool Equals(Azure.Compute.Batch.ContainerWorkingDirectory 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.Compute.Batch.ContainerWorkingDirectory left, Azure.Compute.Batch.ContainerWorkingDirectory right) { throw null; } + public static implicit operator Azure.Compute.Batch.ContainerWorkingDirectory (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.ContainerWorkingDirectory left, Azure.Compute.Batch.ContainerWorkingDirectory right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DataDisk : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataDisk(int logicalUnitNumber, int diskSizeGb) { } + public Azure.Compute.Batch.CachingType? Caching { get { throw null; } set { } } + public int DiskSizeGb { get { throw null; } set { } } + public int LogicalUnitNumber { get { throw null; } set { } } + public Azure.Compute.Batch.StorageAccountType? StorageAccountType { get { throw null; } set { } } + Azure.Compute.Batch.DataDisk System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.DataDisk System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DependencyAction : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DependencyAction(string value) { throw null; } + public static Azure.Compute.Batch.DependencyAction Block { get { throw null; } } + public static Azure.Compute.Batch.DependencyAction Satisfy { get { throw null; } } + public bool Equals(Azure.Compute.Batch.DependencyAction 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.Compute.Batch.DependencyAction left, Azure.Compute.Batch.DependencyAction right) { throw null; } + public static implicit operator Azure.Compute.Batch.DependencyAction (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.DependencyAction left, Azure.Compute.Batch.DependencyAction right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DiffDiskPlacement : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DiffDiskPlacement(string value) { throw null; } + public static Azure.Compute.Batch.DiffDiskPlacement CacheDisk { get { throw null; } } + public bool Equals(Azure.Compute.Batch.DiffDiskPlacement 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.Compute.Batch.DiffDiskPlacement left, Azure.Compute.Batch.DiffDiskPlacement right) { throw null; } + public static implicit operator Azure.Compute.Batch.DiffDiskPlacement (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.DiffDiskPlacement left, Azure.Compute.Batch.DiffDiskPlacement right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DiffDiskSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DiffDiskSettings() { } + public Azure.Compute.Batch.DiffDiskPlacement? Placement { get { throw null; } set { } } + Azure.Compute.Batch.DiffDiskSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.DiffDiskSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DisableBatchJobOption : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DisableBatchJobOption(string value) { throw null; } + public static Azure.Compute.Batch.DisableBatchJobOption Requeue { get { throw null; } } + public static Azure.Compute.Batch.DisableBatchJobOption Terminate { get { throw null; } } + public static Azure.Compute.Batch.DisableBatchJobOption Wait { get { throw null; } } + public bool Equals(Azure.Compute.Batch.DisableBatchJobOption 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.Compute.Batch.DisableBatchJobOption left, Azure.Compute.Batch.DisableBatchJobOption right) { throw null; } + public static implicit operator Azure.Compute.Batch.DisableBatchJobOption (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.DisableBatchJobOption left, Azure.Compute.Batch.DisableBatchJobOption right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DiskEncryptionConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DiskEncryptionConfiguration() { } + public System.Collections.Generic.IList Targets { get { throw null; } } + Azure.Compute.Batch.DiskEncryptionConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.DiskEncryptionConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DiskEncryptionTarget : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DiskEncryptionTarget(string value) { throw null; } + public static Azure.Compute.Batch.DiskEncryptionTarget OsDisk { get { throw null; } } + public static Azure.Compute.Batch.DiskEncryptionTarget TemporaryDisk { get { throw null; } } + public bool Equals(Azure.Compute.Batch.DiskEncryptionTarget 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.Compute.Batch.DiskEncryptionTarget left, Azure.Compute.Batch.DiskEncryptionTarget right) { throw null; } + public static implicit operator Azure.Compute.Batch.DiskEncryptionTarget (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.DiskEncryptionTarget left, Azure.Compute.Batch.DiskEncryptionTarget right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DynamicVNetAssignmentScope : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DynamicVNetAssignmentScope(string value) { throw null; } + public static Azure.Compute.Batch.DynamicVNetAssignmentScope Job { get { throw null; } } + public static Azure.Compute.Batch.DynamicVNetAssignmentScope None { get { throw null; } } + public bool Equals(Azure.Compute.Batch.DynamicVNetAssignmentScope 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.Compute.Batch.DynamicVNetAssignmentScope left, Azure.Compute.Batch.DynamicVNetAssignmentScope right) { throw null; } + public static implicit operator Azure.Compute.Batch.DynamicVNetAssignmentScope (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.DynamicVNetAssignmentScope left, Azure.Compute.Batch.DynamicVNetAssignmentScope right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ElevationLevel : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ElevationLevel(string value) { throw null; } + public static Azure.Compute.Batch.ElevationLevel Admin { get { throw null; } } + public static Azure.Compute.Batch.ElevationLevel NonAdmin { get { throw null; } } + public bool Equals(Azure.Compute.Batch.ElevationLevel 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.Compute.Batch.ElevationLevel left, Azure.Compute.Batch.ElevationLevel right) { throw null; } + public static implicit operator Azure.Compute.Batch.ElevationLevel (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.ElevationLevel left, Azure.Compute.Batch.ElevationLevel right) { throw null; } + public override string ToString() { throw null; } + } + public partial class EnvironmentSetting : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EnvironmentSetting(string name) { } + public string Name { get { throw null; } set { } } + public string Value { get { throw null; } set { } } + Azure.Compute.Batch.EnvironmentSetting System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.EnvironmentSetting System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ErrorCategory : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ErrorCategory(string value) { throw null; } + public static Azure.Compute.Batch.ErrorCategory ServerError { get { throw null; } } + public static Azure.Compute.Batch.ErrorCategory UserError { get { throw null; } } + public bool Equals(Azure.Compute.Batch.ErrorCategory 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.Compute.Batch.ErrorCategory left, Azure.Compute.Batch.ErrorCategory right) { throw null; } + public static implicit operator Azure.Compute.Batch.ErrorCategory (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.ErrorCategory left, Azure.Compute.Batch.ErrorCategory right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ExitCodeMapping : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExitCodeMapping(int code, Azure.Compute.Batch.ExitOptions exitOptions) { } + public int Code { get { throw null; } set { } } + public Azure.Compute.Batch.ExitOptions ExitOptions { get { throw null; } set { } } + Azure.Compute.Batch.ExitCodeMapping System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.ExitCodeMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExitCodeRangeMapping : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExitCodeRangeMapping(int start, int end, Azure.Compute.Batch.ExitOptions exitOptions) { } + public int End { get { throw null; } set { } } + public Azure.Compute.Batch.ExitOptions ExitOptions { get { throw null; } set { } } + public int Start { get { throw null; } set { } } + Azure.Compute.Batch.ExitCodeRangeMapping System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.ExitCodeRangeMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExitConditions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExitConditions() { } + public Azure.Compute.Batch.ExitOptions Default { get { throw null; } set { } } + public System.Collections.Generic.IList ExitCodeRanges { get { throw null; } } + public System.Collections.Generic.IList ExitCodes { get { throw null; } } + public Azure.Compute.Batch.ExitOptions FileUploadError { get { throw null; } set { } } + public Azure.Compute.Batch.ExitOptions PreProcessingError { get { throw null; } set { } } + Azure.Compute.Batch.ExitConditions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.ExitConditions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExitOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExitOptions() { } + public Azure.Compute.Batch.DependencyAction? DependencyAction { get { throw null; } set { } } + public Azure.Compute.Batch.BatchJobAction? JobAction { get { throw null; } set { } } + Azure.Compute.Batch.ExitOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.ExitOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FileProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal FileProperties() { } + public long ContentLength { get { throw null; } } + public string ContentType { get { throw null; } } + public System.DateTimeOffset? CreationTime { get { throw null; } } + public string FileMode { get { throw null; } } + public System.DateTimeOffset LastModified { get { throw null; } } + Azure.Compute.Batch.FileProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.FileProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HttpHeader : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public HttpHeader(string name) { } + public string Name { get { throw null; } set { } } + public string Value { get { throw null; } set { } } + Azure.Compute.Batch.HttpHeader System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.HttpHeader System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ImageReference : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ImageReference() { } + public string ExactVersion { get { throw null; } } + public string Offer { get { throw null; } set { } } + public string Publisher { get { throw null; } set { } } + public string Sku { get { throw null; } set { } } + public string Version { get { throw null; } set { } } + public string VirtualMachineImageId { get { throw null; } set { } } + Azure.Compute.Batch.ImageReference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.ImageReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ImageVerificationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ImageVerificationType(string value) { throw null; } + public static Azure.Compute.Batch.ImageVerificationType Unverified { get { throw null; } } + public static Azure.Compute.Batch.ImageVerificationType Verified { get { throw null; } } + public bool Equals(Azure.Compute.Batch.ImageVerificationType 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.Compute.Batch.ImageVerificationType left, Azure.Compute.Batch.ImageVerificationType right) { throw null; } + public static implicit operator Azure.Compute.Batch.ImageVerificationType (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.ImageVerificationType left, Azure.Compute.Batch.ImageVerificationType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class InboundEndpoint : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal InboundEndpoint() { } + public int BackendPort { get { throw null; } } + public int FrontendPort { get { throw null; } } + public string Name { get { throw null; } } + public Azure.Compute.Batch.InboundEndpointProtocol Protocol { get { throw null; } } + public string PublicFQDN { get { throw null; } } + public string PublicIpAddress { get { throw null; } } + Azure.Compute.Batch.InboundEndpoint System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.InboundEndpoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct InboundEndpointProtocol : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public InboundEndpointProtocol(string value) { throw null; } + public static Azure.Compute.Batch.InboundEndpointProtocol Tcp { get { throw null; } } + public static Azure.Compute.Batch.InboundEndpointProtocol Udp { get { throw null; } } + public bool Equals(Azure.Compute.Batch.InboundEndpointProtocol 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.Compute.Batch.InboundEndpointProtocol left, Azure.Compute.Batch.InboundEndpointProtocol right) { throw null; } + public static implicit operator Azure.Compute.Batch.InboundEndpointProtocol (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.InboundEndpointProtocol left, Azure.Compute.Batch.InboundEndpointProtocol right) { throw null; } + public override string ToString() { throw null; } + } + public partial class InboundNatPool : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public InboundNatPool(string name, Azure.Compute.Batch.InboundEndpointProtocol protocol, int backendPort, int frontendPortRangeStart, int frontendPortRangeEnd) { } + public int BackendPort { get { throw null; } set { } } + public int FrontendPortRangeEnd { get { throw null; } set { } } + public int FrontendPortRangeStart { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public System.Collections.Generic.IList NetworkSecurityGroupRules { get { throw null; } } + public Azure.Compute.Batch.InboundEndpointProtocol Protocol { get { throw null; } set { } } + Azure.Compute.Batch.InboundNatPool System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.InboundNatPool System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class InstanceViewStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal InstanceViewStatus() { } + public string Code { get { throw null; } } + public string DisplayStatus { get { throw null; } } + public Azure.Compute.Batch.StatusLevelTypes? Level { get { throw null; } } + public string Message { get { throw null; } } + public System.DateTimeOffset? Time { get { throw null; } } + Azure.Compute.Batch.InstanceViewStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.InstanceViewStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct IpAddressProvisioningType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public IpAddressProvisioningType(string value) { throw null; } + public static Azure.Compute.Batch.IpAddressProvisioningType BatchManaged { get { throw null; } } + public static Azure.Compute.Batch.IpAddressProvisioningType NoPublicIpAddresses { get { throw null; } } + public static Azure.Compute.Batch.IpAddressProvisioningType UserManaged { get { throw null; } } + public bool Equals(Azure.Compute.Batch.IpAddressProvisioningType 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.Compute.Batch.IpAddressProvisioningType left, Azure.Compute.Batch.IpAddressProvisioningType right) { throw null; } + public static implicit operator Azure.Compute.Batch.IpAddressProvisioningType (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.IpAddressProvisioningType left, Azure.Compute.Batch.IpAddressProvisioningType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class LinuxUserConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public LinuxUserConfiguration() { } + public int? Gid { get { throw null; } set { } } + public string SshPrivateKey { get { throw null; } set { } } + public int? Uid { get { throw null; } set { } } + Azure.Compute.Batch.LinuxUserConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.LinuxUserConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct LoginMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public LoginMode(string value) { throw null; } + public static Azure.Compute.Batch.LoginMode Batch { get { throw null; } } + public static Azure.Compute.Batch.LoginMode Interactive { get { throw null; } } + public bool Equals(Azure.Compute.Batch.LoginMode 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.Compute.Batch.LoginMode left, Azure.Compute.Batch.LoginMode right) { throw null; } + public static implicit operator Azure.Compute.Batch.LoginMode (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.LoginMode left, Azure.Compute.Batch.LoginMode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ManagedDisk : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ManagedDisk(Azure.Compute.Batch.StorageAccountType storageAccountType) { } + public Azure.Compute.Batch.StorageAccountType StorageAccountType { get { throw null; } set { } } + Azure.Compute.Batch.ManagedDisk System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.ManagedDisk System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class MetadataItem : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MetadataItem(string name, string value) { } + public string Name { get { throw null; } set { } } + public string Value { get { throw null; } set { } } + Azure.Compute.Batch.MetadataItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.MetadataItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class MountConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MountConfiguration() { } + public Azure.Compute.Batch.AzureBlobFileSystemConfiguration AzureBlobFileSystemConfiguration { get { throw null; } set { } } + public Azure.Compute.Batch.AzureFileShareConfiguration AzureFileShareConfiguration { get { throw null; } set { } } + public Azure.Compute.Batch.CifsMountConfiguration CifsMountConfiguration { get { throw null; } set { } } + public Azure.Compute.Batch.NfsMountConfiguration NfsMountConfiguration { get { throw null; } set { } } + Azure.Compute.Batch.MountConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.MountConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class MultiInstanceSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MultiInstanceSettings(string coordinationCommandLine) { } + public System.Collections.Generic.IList CommonResourceFiles { get { throw null; } } + public string CoordinationCommandLine { get { throw null; } set { } } + public int? NumberOfInstances { get { throw null; } set { } } + Azure.Compute.Batch.MultiInstanceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.MultiInstanceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NameValuePair : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NameValuePair() { } + public string Name { get { throw null; } } + public string Value { get { throw null; } } + Azure.Compute.Batch.NameValuePair System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.NameValuePair System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NetworkConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NetworkConfiguration() { } + public Azure.Compute.Batch.DynamicVNetAssignmentScope? DynamicVNetAssignmentScope { get { throw null; } set { } } + public bool? EnableAcceleratedNetworking { get { throw null; } set { } } + public Azure.Compute.Batch.BatchPoolEndpointConfiguration EndpointConfiguration { get { throw null; } set { } } + public Azure.Compute.Batch.PublicIpAddressConfiguration PublicIpAddressConfiguration { get { throw null; } set { } } + public string SubnetId { get { throw null; } set { } } + Azure.Compute.Batch.NetworkConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.NetworkConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NetworkSecurityGroupRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NetworkSecurityGroupRule(int priority, Azure.Compute.Batch.NetworkSecurityGroupRuleAccess access, string sourceAddressPrefix) { } + public Azure.Compute.Batch.NetworkSecurityGroupRuleAccess Access { get { throw null; } set { } } + public int Priority { get { throw null; } set { } } + public string SourceAddressPrefix { get { throw null; } set { } } + public System.Collections.Generic.IList SourcePortRanges { get { throw null; } } + Azure.Compute.Batch.NetworkSecurityGroupRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.NetworkSecurityGroupRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NetworkSecurityGroupRuleAccess : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NetworkSecurityGroupRuleAccess(string value) { throw null; } + public static Azure.Compute.Batch.NetworkSecurityGroupRuleAccess Allow { get { throw null; } } + public static Azure.Compute.Batch.NetworkSecurityGroupRuleAccess Deny { get { throw null; } } + public bool Equals(Azure.Compute.Batch.NetworkSecurityGroupRuleAccess 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.Compute.Batch.NetworkSecurityGroupRuleAccess left, Azure.Compute.Batch.NetworkSecurityGroupRuleAccess right) { throw null; } + public static implicit operator Azure.Compute.Batch.NetworkSecurityGroupRuleAccess (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.NetworkSecurityGroupRuleAccess left, Azure.Compute.Batch.NetworkSecurityGroupRuleAccess right) { throw null; } + public override string ToString() { throw null; } + } + public partial class NfsMountConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NfsMountConfiguration(string source, string relativeMountPath) { } + public string MountOptions { get { throw null; } set { } } + public string RelativeMountPath { get { throw null; } set { } } + public string Source { get { throw null; } set { } } + Azure.Compute.Batch.NfsMountConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.NfsMountConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct OnAllBatchTasksComplete : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public OnAllBatchTasksComplete(string value) { throw null; } + public static Azure.Compute.Batch.OnAllBatchTasksComplete NoAction { get { throw null; } } + public static Azure.Compute.Batch.OnAllBatchTasksComplete TerminateJob { get { throw null; } } + public bool Equals(Azure.Compute.Batch.OnAllBatchTasksComplete 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.Compute.Batch.OnAllBatchTasksComplete left, Azure.Compute.Batch.OnAllBatchTasksComplete right) { throw null; } + public static implicit operator Azure.Compute.Batch.OnAllBatchTasksComplete (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.OnAllBatchTasksComplete left, Azure.Compute.Batch.OnAllBatchTasksComplete right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct OnBatchTaskFailure : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public OnBatchTaskFailure(string value) { throw null; } + public static Azure.Compute.Batch.OnBatchTaskFailure NoAction { get { throw null; } } + public static Azure.Compute.Batch.OnBatchTaskFailure PerformExitOptionsJobAction { get { throw null; } } + public bool Equals(Azure.Compute.Batch.OnBatchTaskFailure 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.Compute.Batch.OnBatchTaskFailure left, Azure.Compute.Batch.OnBatchTaskFailure right) { throw null; } + public static implicit operator Azure.Compute.Batch.OnBatchTaskFailure (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.OnBatchTaskFailure left, Azure.Compute.Batch.OnBatchTaskFailure right) { throw null; } + public override string ToString() { throw null; } + } + public partial class OSDisk : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OSDisk() { } + public Azure.Compute.Batch.CachingType? Caching { get { throw null; } set { } } + public int? DiskSizeGB { get { throw null; } set { } } + public Azure.Compute.Batch.DiffDiskSettings EphemeralOSDiskSettings { get { throw null; } set { } } + public Azure.Compute.Batch.ManagedDisk ManagedDisk { get { throw null; } set { } } + public bool? WriteAcceleratorEnabled { get { throw null; } set { } } + Azure.Compute.Batch.OSDisk System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.OSDisk System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct OSType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public OSType(string value) { throw null; } + public static Azure.Compute.Batch.OSType Linux { get { throw null; } } + public static Azure.Compute.Batch.OSType Windows { get { throw null; } } + public bool Equals(Azure.Compute.Batch.OSType 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.Compute.Batch.OSType left, Azure.Compute.Batch.OSType right) { throw null; } + public static implicit operator Azure.Compute.Batch.OSType (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.OSType left, Azure.Compute.Batch.OSType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class OutputFile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OutputFile(string filePattern, Azure.Compute.Batch.OutputFileDestination destination, Azure.Compute.Batch.OutputFileUploadConfig uploadOptions) { } + public Azure.Compute.Batch.OutputFileDestination Destination { get { throw null; } set { } } + public string FilePattern { get { throw null; } set { } } + public Azure.Compute.Batch.OutputFileUploadConfig UploadOptions { get { throw null; } set { } } + Azure.Compute.Batch.OutputFile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.OutputFile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class OutputFileBlobContainerDestination : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OutputFileBlobContainerDestination(string containerUrl) { } + public string ContainerUrl { get { throw null; } set { } } + public Azure.Compute.Batch.BatchNodeIdentityReference IdentityReference { get { throw null; } set { } } + public string Path { get { throw null; } set { } } + public System.Collections.Generic.IList UploadHeaders { get { throw null; } } + Azure.Compute.Batch.OutputFileBlobContainerDestination System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.OutputFileBlobContainerDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class OutputFileDestination : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OutputFileDestination() { } + public Azure.Compute.Batch.OutputFileBlobContainerDestination Container { get { throw null; } set { } } + Azure.Compute.Batch.OutputFileDestination System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.OutputFileDestination System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct OutputFileUploadCondition : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public OutputFileUploadCondition(string value) { throw null; } + public static Azure.Compute.Batch.OutputFileUploadCondition TaskCompletion { get { throw null; } } + public static Azure.Compute.Batch.OutputFileUploadCondition TaskFailure { get { throw null; } } + public static Azure.Compute.Batch.OutputFileUploadCondition TaskSuccess { get { throw null; } } + public bool Equals(Azure.Compute.Batch.OutputFileUploadCondition 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.Compute.Batch.OutputFileUploadCondition left, Azure.Compute.Batch.OutputFileUploadCondition right) { throw null; } + public static implicit operator Azure.Compute.Batch.OutputFileUploadCondition (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.OutputFileUploadCondition left, Azure.Compute.Batch.OutputFileUploadCondition right) { throw null; } + public override string ToString() { throw null; } + } + public partial class OutputFileUploadConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OutputFileUploadConfig(Azure.Compute.Batch.OutputFileUploadCondition uploadCondition) { } + public Azure.Compute.Batch.OutputFileUploadCondition UploadCondition { get { throw null; } set { } } + Azure.Compute.Batch.OutputFileUploadConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.OutputFileUploadConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PublicIpAddressConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PublicIpAddressConfiguration() { } + public System.Collections.Generic.IList IpAddressIds { get { throw null; } } + public Azure.Compute.Batch.IpAddressProvisioningType? IpAddressProvisioningType { get { throw null; } set { } } + Azure.Compute.Batch.PublicIpAddressConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.PublicIpAddressConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RecentBatchJob : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RecentBatchJob() { } + public string Id { get { throw null; } } + public string Url { get { throw null; } } + Azure.Compute.Batch.RecentBatchJob System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.RecentBatchJob System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ResizeError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ResizeError() { } + public string Code { get { throw null; } } + public string Message { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Values { get { throw null; } } + Azure.Compute.Batch.ResizeError System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.ResizeError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ResourceFile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceFile() { } + public string AutoStorageContainerName { get { throw null; } set { } } + public string BlobPrefix { get { throw null; } set { } } + public string FileMode { get { throw null; } set { } } + public string FilePath { get { throw null; } set { } } + public string HttpUrl { get { throw null; } set { } } + public Azure.Compute.Batch.BatchNodeIdentityReference IdentityReference { get { throw null; } set { } } + public string StorageContainerUrl { get { throw null; } set { } } + Azure.Compute.Batch.ResourceFile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.ResourceFile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RollingUpgradePolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RollingUpgradePolicy() { } + public bool? EnableCrossZoneUpgrade { get { throw null; } set { } } + public int? MaxBatchInstancePercent { get { throw null; } set { } } + public int? MaxUnhealthyInstancePercent { get { throw null; } set { } } + public int? MaxUnhealthyUpgradedInstancePercent { get { throw null; } set { } } + public System.TimeSpan? PauseTimeBetweenBatches { get { throw null; } set { } } + public bool? PrioritizeUnhealthyInstances { get { throw null; } set { } } + public bool? RollbackFailedInstancesOnPolicyBreach { get { throw null; } set { } } + Azure.Compute.Batch.RollingUpgradePolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.RollingUpgradePolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SchedulingState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SchedulingState(string value) { throw null; } + public static Azure.Compute.Batch.SchedulingState Disabled { get { throw null; } } + public static Azure.Compute.Batch.SchedulingState Enabled { get { throw null; } } + public bool Equals(Azure.Compute.Batch.SchedulingState 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.Compute.Batch.SchedulingState left, Azure.Compute.Batch.SchedulingState right) { throw null; } + public static implicit operator Azure.Compute.Batch.SchedulingState (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.SchedulingState left, Azure.Compute.Batch.SchedulingState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SecurityProfile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SecurityProfile(bool encryptionAtHost, Azure.Compute.Batch.SecurityTypes securityType, Azure.Compute.Batch.UefiSettings uefiSettings) { } + public bool EncryptionAtHost { get { throw null; } set { } } + public Azure.Compute.Batch.SecurityTypes SecurityType { get { throw null; } set { } } + public Azure.Compute.Batch.UefiSettings UefiSettings { get { throw null; } set { } } + Azure.Compute.Batch.SecurityProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.SecurityProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SecurityTypes : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SecurityTypes(string value) { throw null; } + public static Azure.Compute.Batch.SecurityTypes TrustedLaunch { get { throw null; } } + public bool Equals(Azure.Compute.Batch.SecurityTypes 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.Compute.Batch.SecurityTypes left, Azure.Compute.Batch.SecurityTypes right) { throw null; } + public static implicit operator Azure.Compute.Batch.SecurityTypes (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.SecurityTypes left, Azure.Compute.Batch.SecurityTypes right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ServiceArtifactReference : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ServiceArtifactReference(string id) { } + public string Id { get { throw null; } set { } } + Azure.Compute.Batch.ServiceArtifactReference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.ServiceArtifactReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct StatusLevelTypes : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public StatusLevelTypes(string value) { throw null; } + public static Azure.Compute.Batch.StatusLevelTypes Error { get { throw null; } } + public static Azure.Compute.Batch.StatusLevelTypes Info { get { throw null; } } + public static Azure.Compute.Batch.StatusLevelTypes Warning { get { throw null; } } + public bool Equals(Azure.Compute.Batch.StatusLevelTypes 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.Compute.Batch.StatusLevelTypes left, Azure.Compute.Batch.StatusLevelTypes right) { throw null; } + public static implicit operator Azure.Compute.Batch.StatusLevelTypes (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.StatusLevelTypes left, Azure.Compute.Batch.StatusLevelTypes right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct StorageAccountType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public StorageAccountType(string value) { throw null; } + public static Azure.Compute.Batch.StorageAccountType PremiumLRS { get { throw null; } } + public static Azure.Compute.Batch.StorageAccountType StandardLRS { get { throw null; } } + public static Azure.Compute.Batch.StorageAccountType StandardSSDLRS { get { throw null; } } + public bool Equals(Azure.Compute.Batch.StorageAccountType 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.Compute.Batch.StorageAccountType left, Azure.Compute.Batch.StorageAccountType right) { throw null; } + public static implicit operator Azure.Compute.Batch.StorageAccountType (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.StorageAccountType left, Azure.Compute.Batch.StorageAccountType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class UefiSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public UefiSettings() { } + public bool? SecureBootEnabled { get { throw null; } set { } } + public bool? VTpmEnabled { get { throw null; } set { } } + Azure.Compute.Batch.UefiSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.UefiSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct UpgradeMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public UpgradeMode(string value) { throw null; } + public static Azure.Compute.Batch.UpgradeMode Automatic { get { throw null; } } + public static Azure.Compute.Batch.UpgradeMode Manual { get { throw null; } } + public static Azure.Compute.Batch.UpgradeMode Rolling { get { throw null; } } + public bool Equals(Azure.Compute.Batch.UpgradeMode 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.Compute.Batch.UpgradeMode left, Azure.Compute.Batch.UpgradeMode right) { throw null; } + public static implicit operator Azure.Compute.Batch.UpgradeMode (string value) { throw null; } + public static bool operator !=(Azure.Compute.Batch.UpgradeMode left, Azure.Compute.Batch.UpgradeMode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class UpgradePolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public UpgradePolicy(Azure.Compute.Batch.UpgradeMode mode) { } + public Azure.Compute.Batch.AutomaticOsUpgradePolicy AutomaticOsUpgradePolicy { get { throw null; } set { } } + public Azure.Compute.Batch.UpgradeMode Mode { get { throw null; } set { } } + public Azure.Compute.Batch.RollingUpgradePolicy RollingUpgradePolicy { get { throw null; } set { } } + Azure.Compute.Batch.UpgradePolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.UpgradePolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class UploadBatchServiceLogsContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public UploadBatchServiceLogsContent(string containerUrl, System.DateTimeOffset startTime) { } + public string ContainerUrl { get { throw null; } } + public System.DateTimeOffset? EndTime { get { throw null; } set { } } + public Azure.Compute.Batch.BatchNodeIdentityReference IdentityReference { get { throw null; } set { } } + public System.DateTimeOffset StartTime { get { throw null; } } + Azure.Compute.Batch.UploadBatchServiceLogsContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.UploadBatchServiceLogsContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class UploadBatchServiceLogsResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal UploadBatchServiceLogsResult() { } + public int NumberOfFilesUploaded { get { throw null; } } + public string VirtualDirectoryName { get { throw null; } } + Azure.Compute.Batch.UploadBatchServiceLogsResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.UploadBatchServiceLogsResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class UserAccount : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public UserAccount(string name, string password) { } + public Azure.Compute.Batch.ElevationLevel? ElevationLevel { get { throw null; } set { } } + public Azure.Compute.Batch.LinuxUserConfiguration LinuxUserConfiguration { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public string Password { get { throw null; } set { } } + public Azure.Compute.Batch.WindowsUserConfiguration WindowsUserConfiguration { get { throw null; } set { } } + Azure.Compute.Batch.UserAccount System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.UserAccount System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class UserAssignedIdentity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal UserAssignedIdentity() { } + public string ClientId { get { throw null; } } + public string PrincipalId { get { throw null; } } + public string ResourceId { get { throw null; } } + Azure.Compute.Batch.UserAssignedIdentity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.UserAssignedIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class UserIdentity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public UserIdentity() { } + public Azure.Compute.Batch.AutoUserSpecification AutoUser { get { throw null; } set { } } + public string Username { get { throw null; } set { } } + Azure.Compute.Batch.UserIdentity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.UserIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class VirtualMachineConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VirtualMachineConfiguration(Azure.Compute.Batch.ImageReference imageReference, string nodeAgentSkuId) { } + public Azure.Compute.Batch.ContainerConfiguration ContainerConfiguration { get { throw null; } set { } } + public System.Collections.Generic.IList DataDisks { get { throw null; } } + public Azure.Compute.Batch.DiskEncryptionConfiguration DiskEncryptionConfiguration { get { throw null; } set { } } + public System.Collections.Generic.IList Extensions { get { throw null; } } + public Azure.Compute.Batch.ImageReference ImageReference { get { throw null; } set { } } + public string LicenseType { get { throw null; } set { } } + public string NodeAgentSkuId { get { throw null; } set { } } + public Azure.Compute.Batch.BatchNodePlacementConfiguration NodePlacementConfiguration { get { throw null; } set { } } + public Azure.Compute.Batch.OSDisk OsDisk { get { throw null; } set { } } + public Azure.Compute.Batch.SecurityProfile SecurityProfile { get { throw null; } set { } } + public Azure.Compute.Batch.ServiceArtifactReference ServiceArtifactReference { get { throw null; } set { } } + public Azure.Compute.Batch.WindowsConfiguration WindowsConfiguration { get { throw null; } set { } } + Azure.Compute.Batch.VirtualMachineConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.VirtualMachineConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class VirtualMachineInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal VirtualMachineInfo() { } + public Azure.Compute.Batch.ImageReference ImageReference { get { throw null; } } + public string ScaleSetVmResourceId { get { throw null; } } + Azure.Compute.Batch.VirtualMachineInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.VirtualMachineInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class VMExtension : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VMExtension(string name, string publisher, string type) { } + public bool? AutoUpgradeMinorVersion { get { throw null; } set { } } + public bool? EnableAutomaticUpgrade { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ProtectedSettings { get { throw null; } } + public System.Collections.Generic.IList ProvisionAfterExtensions { get { throw null; } } + public string Publisher { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Settings { get { throw null; } } + public string Type { get { throw null; } set { } } + public string TypeHandlerVersion { get { throw null; } set { } } + Azure.Compute.Batch.VMExtension System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.VMExtension System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class VMExtensionInstanceView : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal VMExtensionInstanceView() { } + public string Name { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Statuses { get { throw null; } } + public System.Collections.Generic.IReadOnlyList SubStatuses { get { throw null; } } + Azure.Compute.Batch.VMExtensionInstanceView System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.VMExtensionInstanceView System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WindowsConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WindowsConfiguration() { } + public bool? EnableAutomaticUpdates { get { throw null; } set { } } + Azure.Compute.Batch.WindowsConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.WindowsConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WindowsUserConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WindowsUserConfiguration() { } + public Azure.Compute.Batch.LoginMode? LoginMode { get { throw null; } set { } } + Azure.Compute.Batch.WindowsUserConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Compute.Batch.WindowsUserConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } +} +namespace Microsoft.Extensions.Azure +{ + public static partial class ComputeBatchClientBuilderExtensions + { + public static Azure.Core.Extensions.IAzureClientBuilder AddBatchClient(this TBuilder builder, System.Uri endpoint) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddBatchClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/assets.json b/sdk/batch/Azure.Compute.Batch/assets.json new file mode 100644 index 0000000000000..726e7ec7f9f89 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "net", + "TagPrefix": "net/batch/Azure.Compute.Batch", + "Tag": "net/batch/Azure.Compute.Batch_6533cf2dd7" +} diff --git a/sdk/batch/Azure.Compute.Batch/samples/README.md b/sdk/batch/Azure.Compute.Batch/samples/README.md new file mode 100644 index 0000000000000..2935760b753a5 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/samples/README.md @@ -0,0 +1,15 @@ +--- +page_type: sample +languages: +- csharp +products: +- azure +- azure-batch +name: Azure Batch samples for .NET +description: Samples for the Azure.Compute.Batch client library +--- + +# Azure Batch SDK Samples +Before starting, take a look at the Azure Batch [README](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/batch/Azure.Compute.Batch/README.md) for more information on how to create an Batch Account using the Azure portal/Azure CLI, and retrieving the designated endpoint and credential. + +- [Creating a Pool, Job, and Task](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/batch/Azure.Compute.Batch/samples/Sample1_CreatePool_Job_Task.md) diff --git a/sdk/batch/Azure.Compute.Batch/samples/Sample1_CreatePool_Job_Task.md b/sdk/batch/Azure.Compute.Batch/samples/Sample1_CreatePool_Job_Task.md new file mode 100644 index 0000000000000..5b9b06c750ecb --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/samples/Sample1_CreatePool_Job_Task.md @@ -0,0 +1,104 @@ +# Creating a Batch Pool, Job, and Tasks + +This sample demonstrates how to create a pool, job, and tasks for a Batch account. + +## Special note for Batch pools + +Both the **Azure.Compute.Batch** and the ARM-based **Azure.ResourceManager.Batch** libraries support the creating and managing of Batch Pools with the only difference being that **Azure.ResourceManager.Batch** supports creating [Batch Pools with Managed Identities](https://learn.microsoft.com/azure/batch/managed-identity-pools), for this reason creating pools via **Azure.ResourceManager.Batch** is considered a best practice. This example will use **Azure.ResourceManager.Batch** for pool creation and thus will need to create an `ArmClient` to do so. + +## Authenticating the Azure.ResourceManager `ArmClient` + +In order to create a Batch Pool from the Azure.ResourceManager.Batch library you will need to instantiate an Armclient. To create an authenticated client and start interacting with Microsoft Azure resources, see the [quickstart guide](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md). + +```C# Snippet:Batch_Sample01_CreateBatchMgmtClient +var credential = new DefaultAzureCredential(); +ArmClient _armClient = new ArmClient(credential); +``` + +### Pool creation + +Batch operations in the **Azure.Management.Batch** libraries are preformed from a BatchAccountResource instance, to get a BatchAccountResource instance you can query the armclient for the resource id of your Batch account. + +```C# Snippet:Batch_Sample01_GetBatchMgmtAccount +var batchAccountIdentifier = ResourceIdentifier.Parse("your-batch-account-resource-id"); +BatchAccountResource batchAccount = await _armClient.GetBatchAccountResource(batchAccountIdentifier).GetAsync(); +``` + +With the BatchAccountResource you can create a pool with the [batchAccount.GetBatchAccountPools().CreateOrUpdateAsync](https://learn.microsoft.com/dotnet/api/azure.resourcemanager.batch.batchaccountpoolcollection.createorupdateasync?view=azure-dotnet) command + +```C# Snippet:Batch_Sample01_PoolCreation +var poolName = "HelloWorldPool"; +var imageReference = new BatchImageReference() +{ + Publisher = "canonical", + Offer = "0001-com-ubuntu-server-jammy", + Sku = "22_04-lts", + Version = "latest" +}; +string nodeAgentSku = "batch.node.ubuntu 22.04"; + +ArmOperation armOperation = await batchAccount.GetBatchAccountPools().CreateOrUpdateAsync( + WaitUntil.Completed, poolName, new BatchAccountPoolData() + { + VmSize = "Standard_DS1_v2", + DeploymentConfiguration = new BatchDeploymentConfiguration() + { + VmConfiguration = new BatchVmConfiguration(imageReference, nodeAgentSku) + }, + ScaleSettings = new BatchAccountPoolScaleSettings() + { + FixedScale = new BatchAccountFixedScaleSettings() + { + TargetDedicatedNodes = 1 + } + } + }); +BatchAccountPoolResource pool = armOperation.Value; +``` + +## Authenticating the Azure.Compute.Batch `BatchClient` + +Creation of Batch jobs and tasks can only be preformed with the `Azure.Compute.Batch` library. A `BatchClient` instance is needed to preform Batch operations and can be created using [Microsoft Entra ID authtentication](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/identity/Azure.Identity/README.md) and the Batch account endpoint + +```C# Snippet:Batch_Sample01_CreateBatchClient +var credential = new DefaultAzureCredential(); +BatchClient _batchClient = new BatchClient( +new Uri("https://examplebatchaccount.eastus.batch.azure.com"), credential); +``` + +### Job creation + +Before we can create Batch Tasks, we first need to create a Job for the tasks to be associatd with, this can be done via the `CreateJobAsync` command. The basic elements needed are an id for job itself and the name of the pool that this job will run against. + +```C# Snippet:Batch_Sample01_CreateBatchJob +await _batchClient.CreateJobAsync(new BatchJobCreateContent("jobId", new BatchPoolInfo() { PoolId = "poolName" })); +``` + +### Task creation + +Batch tasks can be created from the BatchClient via the `CreateTaskAsync`. The basic elements needed are the name of the job the task will be assigned to, and id for the task itself, and a command to run. +```C# Snippet:Batch_Sample01_CreateBatchTask +await _batchClient.CreateTaskAsync("jobId", new BatchTaskCreateContent("taskId", $"echo Hello world")); +``` + + +### Task results + +Onces the tasks are complete `GetTasksAsync` cand be used to retrieve the `BatchTask` instance and `GetTaskFileAsync` can be used to get the output files + +```C# Snippet:Batch_Sample01_GetTasks +var completedTasks = _batchClient.GetTasksAsync("jobId", filter: "state eq 'completed'"); +await foreach (BatchTask t in completedTasks) +{ + var outputFileName = t.ExecutionInfo.ExitCode == 0 ? "stdout.txt" : "stderr.txt"; + + Console.WriteLine("Task {0} exited with code {1}. Output ({2}):", + t.Id, t.ExecutionInfo.ExitCode, outputFileName); + + BinaryData fileContents = await _batchClient.GetTaskFileAsync("jobId", t.Id, outputFileName); + using (var reader = new StreamReader(fileContents.ToStream())) + { + Console.WriteLine(await reader.ReadLineAsync()); + } +} +``` diff --git a/sdk/batch/Azure.Compute.Batch/src/Azure.Compute.Batch.csproj b/sdk/batch/Azure.Compute.Batch/src/Azure.Compute.Batch.csproj new file mode 100644 index 0000000000000..4b7ac983c5ab8 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Azure.Compute.Batch.csproj @@ -0,0 +1,20 @@ + + + This is the Azure.Compute.Batch client library, enabling the creation and management of Batch objects such as Pools, Jobs, and Tasks. For more information about Azure Batch, see https://learn.microsoft.com/azure/batch/batch-technical-overview + The Azure Batch client library + 1.0.0-beta.1 + Azure.Compute.Batch + $(RequiredTargetFrameworks) + true + + + + + + + + + + + + diff --git a/sdk/batch/Azure.Compute.Batch/src/Custom/BatchClientCustom.cs b/sdk/batch/Azure.Compute.Batch/src/Custom/BatchClientCustom.cs new file mode 100644 index 0000000000000..794b39965948e --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Custom/BatchClientCustom.cs @@ -0,0 +1,608 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Text; +using Azure.Core.Pipeline; +using Azure.Core; +using Azure.Compute.Batch.Custom; +using System.Threading.Tasks; +using static Azure.Core.HttpPipelineExtensions; +using System.Threading; +using System.Security.Cryptography; + +namespace Azure.Compute.Batch +{ + public partial class BatchClient + { + private readonly AzureNamedKeyCredential _namedKeyCredential; + + /// Initializes a new instance of BatchClient. + /// Batch account endpoint (for example: https://batchaccount.eastus2.batch.azure.com). + /// A credential used to authenticate to an Azure Service. + /// is null. + public BatchClient(Uri endpoint, AzureNamedKeyCredential credential) : this(endpoint, credential, new BatchClientOptions()) + { + } + + /// Initializes a new instance of BatchClient. + /// Batch account endpoint (for example: https://batchaccount.eastus2.batch.azure.com). + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + /// is null. + public BatchClient(Uri endpoint, AzureNamedKeyCredential credential, BatchClientOptions options) + { + Argument.AssertNotNull(credential, nameof(credential)); + options ??= new BatchClientOptions(); + + ClientDiagnostics = new ClientDiagnostics(options, true); + _namedKeyCredential = credential; + _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new BatchNamedKeyCredentialPolicy(credential) }, new ResponseClassifier()); + _endpoint = endpoint; + _apiVersion = options.Version; + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Gets basic properties of a Pool. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Pool to get. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task> PoolExistsAsync(string poolId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.PoolExists"); + scope.Start(); + try + { + using HttpMessage message = CreatePoolExistsRequest(poolId, timeOutInSeconds, ocpdate, requestConditions, context); + return await _pipeline.ProcessHeadAsBoolMessageAsync(message, ClientDiagnostics, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Gets basic properties of a Pool. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Pool to get. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response PoolExists(string poolId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.PoolExists"); + scope.Start(); + try + { + using HttpMessage message = CreatePoolExistsRequest(poolId, timeOutInSeconds, ocpdate, requestConditions, context); + return _pipeline.ProcessHeadAsBoolMessage(message, ClientDiagnostics, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Checks the specified Job Schedule exists. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Job Schedule which you want to check. + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task> JobScheduleExistsAsync(string jobScheduleId, int? timeOut = null, DateTimeOffset? ocpDate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobScheduleId, nameof(jobScheduleId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.JobScheduleExists"); + scope.Start(); + try + { + using HttpMessage message = CreateJobScheduleExistsRequest(jobScheduleId, timeOut, ocpDate, requestConditions, context); + return await _pipeline.ProcessHeadAsBoolMessageAsync(message, ClientDiagnostics, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Checks the specified Job Schedule exists. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Job Schedule which you want to check. + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response JobScheduleExists(string jobScheduleId, int? timeOut = null, DateTimeOffset? ocpDate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobScheduleId, nameof(jobScheduleId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.JobScheduleExists"); + scope.Start(); + try + { + using HttpMessage message = CreateJobScheduleExistsRequest(jobScheduleId, timeOut, ocpDate, requestConditions, context); + return _pipeline.ProcessHeadAsBoolMessage(message, ClientDiagnostics, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Gets the properties of the specified Task file. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Job that contains the Task. + /// The ID of the Task whose file you want to retrieve. + /// The path to the Task file that you want to get the content of. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task> GetTaskFilePropertiesAsync(string jobId, string taskId, string filePath, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + using var scope = ClientDiagnostics.CreateScope("BatchClient.GetTaskFileProperties"); + scope.Start(); + try + { + Response response = await GetTaskFilePropertiesInternalAsync(jobId, taskId, filePath, timeOutInSeconds, ocpdate, null, null).ConfigureAwait(false); + return Response.FromValue(BatchFileProperties.FromResponse(response), response); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Gets the properties of the specified Task file. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Job that contains the Task. + /// The ID of the Task whose file you want to retrieve. + /// The path to the Task file that you want to get the content of. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetTaskFileProperties(string jobId, string taskId, string filePath, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + using var scope = ClientDiagnostics.CreateScope("BatchClient.GetTaskFileProperties"); + scope.Start(); + try + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetTaskFilePropertiesInternal(jobId, taskId, filePath, timeOutInSeconds, ocpdate, null, context); + return Response.FromValue(BatchFileProperties.FromResponse(response), response); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Gets the properties of the specified Compute Node file. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node. + /// The path to the file or directory. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual async Task> GetNodeFilePropertiesAsync(string poolId, string nodeId, string filePath, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + using var scope = ClientDiagnostics.CreateScope("BatchClient.GetNodeFileProperties"); + scope.Start(); + try + { + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetNodeFilePropertiesInternalAsync(poolId, nodeId, filePath, timeOutInSeconds, ocpdate, null, context).ConfigureAwait(false); + return Response.FromValue(BatchFileProperties.FromResponse(response), response); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Gets the properties of the specified Compute Node file. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node. + /// The path to the file or directory. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual Response GetNodeFileProperties(string poolId, string nodeId, string filePath, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + using var scope = ClientDiagnostics.CreateScope("BatchClient.GetNodeFileProperties"); + scope.Start(); + try + { + Response response = GetNodeFilePropertiesInternal(poolId, nodeId, filePath, timeOutInSeconds, ocpdate, null, null); + return Response.FromValue(BatchFileProperties.FromResponse(response), response); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Updates the properties of the specified Pool. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Pool to get. + /// The pool properties to update. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task UpdatePoolAsync(string poolId, BatchPoolUpdateContent pool, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNull(pool, nameof(pool)); + + using RequestContent content = pool.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await UpdatePoolAsync(poolId, content, timeOutInSeconds, ocpdate, requestConditions, context).ConfigureAwait(false); + return response; + } + + /// + /// [Protocol Method] Updates the properties of the specified Pool. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Pool to get. + /// The pool properties to update. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response UpdatePool(string poolId, BatchPoolUpdateContent pool, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNull(pool, nameof(pool)); + + using RequestContent content = pool.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = UpdatePool(poolId, content, timeOutInSeconds, ocpdate, requestConditions, context); + return response; + } + + /// + /// [Protocol Method] Updates the properties of the specified Job. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Job whose properties you want to update. + /// The options to use for updating the Job.. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task UpdateJobAsync(string jobId, BatchJobUpdateContent job, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNull(job, nameof(job)); + + using RequestContent content = job.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await UpdateJobAsync(jobId, content, timeOutInSeconds, ocpdate, requestConditions, context).ConfigureAwait(false); + return response; + } + + /// + /// [Protocol Method] Updates the properties of the specified Job. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Job whose properties you want to update. + /// The options to use for updating the Job. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response UpdateJob(string jobId, BatchJobUpdateContent job, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNull(job, nameof(job)); + + using RequestContent content = job.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = UpdateJob(jobId, content, timeOutInSeconds, ocpdate, requestConditions, context); + return response; + } + + /// + /// [Protocol Method] Updates the properties of the specified Job Schedule. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Job Schedule to update. + /// The options to use for updating the Job Schedule. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task UpdateJobScheduleAsync(string jobScheduleId, BatchJobScheduleUpdateContent jobSchedule, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobScheduleId, nameof(jobScheduleId)); + Argument.AssertNotNull(jobSchedule, nameof(jobSchedule)); + + using RequestContent content = jobSchedule.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await UpdateJobScheduleAsync(jobScheduleId, content, timeOutInSeconds, ocpdate, requestConditions, context).ConfigureAwait(false); + return response; + } + + /// + /// [Protocol Method] Updates the properties of the specified Job Schedule. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Job Schedule to update. + /// The options to use for updating the Job Schedule. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response UpdateJobSchedule(string jobScheduleId, BatchJobScheduleUpdateContent jobSchedule, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobScheduleId, nameof(jobScheduleId)); + Argument.AssertNotNull(jobSchedule, nameof(jobSchedule)); + + using RequestContent content = jobSchedule.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = UpdateJobSchedule(jobScheduleId, content, timeOutInSeconds, ocpdate, requestConditions, context); + return response; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Custom/BatchNamedKeyCredentialPolicy.cs b/sdk/batch/Azure.Compute.Batch/src/Custom/BatchNamedKeyCredentialPolicy.cs new file mode 100644 index 0000000000000..1ae28452e339b --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Custom/BatchNamedKeyCredentialPolicy.cs @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Security.Cryptography; +using System.Linq; +using System.Net.Http.Headers; +using System.Text; +using Azure.Core.Pipeline; +using Azure.Core; +using System.Collections.Specialized; +using System.Threading.Tasks; + +namespace Azure.Compute.Batch.Custom +{ + /// + /// BatchNamedKeyCredential Policy + /// + internal class BatchNamedKeyCredentialPolicy : HttpPipelineSynchronousPolicy + { + /// + /// Batch Account name + /// + private string AccountName; + + /// + /// Batch Shared Key + /// + private byte[] AccountKey; + + /// + /// Create a new BatchNamedKeyCredentialPolicy + /// + /// BatchNamedKeyCredentialPolicy to authenticate requests. + public BatchNamedKeyCredentialPolicy(AzureNamedKeyCredential credentials) + { + var (name, key) = credentials; + AccountName = name; ; + SetAccountKey(key); + } + + /// + /// Update the Batch Account's access key. This intended to be used + /// when you've regenerated your Batch Account's access keys and want + /// to update long lived clients. + /// + /// A Batch Account access key. + public void SetAccountKey(string accountKey) => + AccountKey = Convert.FromBase64String(accountKey); + + /// + /// Sign the request using the shared key credentials. + /// + /// The message with the request to sign. + public override void OnSendingRequest(HttpMessage message) + { + base.OnSendingRequest(message); + + var date = DateTimeOffset.UtcNow.ToString("r", CultureInfo.InvariantCulture); + message.Request.Headers.SetValue(Constants.HeaderNames.OCPDate, date); + + var stringToSign = BuildStringToSign(message); + var signature = ComputeSasSignature(stringToSign); + + var key = new AuthenticationHeaderValue(Constants.HeaderNames.SharedKey, AccountName + ":" + signature).ToString(); + message.Request.Headers.SetValue(Constants.HeaderNames.Authorization, key); + } + + // If you change this method, make sure live tests are passing before merging PR. + private string BuildStringToSign(HttpMessage message) + { + // https://docs.microsoft.com/en-us/rest/api/Batchservices/authorize-with-shared-key + + message.Request.Headers.TryGetValue(Constants.HeaderNames.ContentEncoding, out var contentEncoding); + message.Request.Headers.TryGetValue(Constants.HeaderNames.ContentLanguage, out var contentLanguage); + message.Request.Headers.TryGetValue(Constants.HeaderNames.ContentMD5, out var contentMD5); + message.Request.Headers.TryGetValue(Constants.HeaderNames.ContentType, out var contentType); + message.Request.Headers.TryGetValue(Constants.HeaderNames.IfModifiedSince, out var ifModifiedSince); + message.Request.Headers.TryGetValue(Constants.HeaderNames.IfMatch, out var ifMatch); + message.Request.Headers.TryGetValue(Constants.HeaderNames.IfNoneMatch, out var ifNoneMatch); + message.Request.Headers.TryGetValue(Constants.HeaderNames.IfUnmodifiedSince, out var ifUnmodifiedSince); + message.Request.Headers.TryGetValue(Constants.HeaderNames.Range, out var range); + + string contentLengthString = string.Empty; + + if (message.Request.Content != null && message.Request.Content.TryComputeLength(out long contentLength)) + { + contentLengthString = contentLength.ToString(CultureInfo.InvariantCulture); + } + var uri = message.Request.Uri.ToUri(); + + var stringBuilder = new StringBuilder(uri.AbsolutePath.Length + 64); + stringBuilder.Append(message.Request.Method.ToString().ToUpperInvariant()).Append('\n'); + stringBuilder.Append(contentEncoding ?? "").Append('\n'); + stringBuilder.Append(contentLanguage ?? "").Append('\n'); + stringBuilder.Append(contentLengthString == "0" ? "" : contentLengthString ?? "").Append('\n'); + stringBuilder.Append(contentMD5 ?? "");// todo: fix base 64 VALUE + stringBuilder.Append('\n'); + stringBuilder.Append(contentType ?? "").Append('\n'); + stringBuilder.Append('\n'); + stringBuilder.Append(ifModifiedSince ?? "").Append('\n'); + stringBuilder.Append(ifMatch ?? "").Append('\n'); + stringBuilder.Append(ifNoneMatch ?? "").Append('\n'); + stringBuilder.Append(ifUnmodifiedSince ?? "").Append('\n'); + stringBuilder.Append(range ?? "").Append('\n'); + BuildCanonicalizedHeaders(stringBuilder, message); + BuildCanonicalizedResource(stringBuilder, uri); + return stringBuilder.ToString(); + } + + // If you change this method, make sure live tests are passing before merging PR. + private void BuildCanonicalizedHeaders(StringBuilder stringBuilder, HttpMessage message) + { + // Grab all the "ocp-*" headers, trim whitespace, lowercase, sort, + // and combine them with their values (separated by a colon). + var headers = new List(); + foreach (var header in message.Request.Headers) + { + if (header.Name.StartsWith(Constants.HeaderNames.OCPPrefix, StringComparison.OrdinalIgnoreCase)) + { + headers.Add(new HttpHeader(header.Name.ToLowerInvariant(), header.Value,null)); + } + } + + headers.Sort(static (x, y) => string.CompareOrdinal(x.Name, y.Name)); + + foreach (var header in headers) + { + stringBuilder + .Append(header.Name) + .Append(':') + .Append(header.Value) + .Append('\n'); + } + } + + // If you change this method, make sure live tests are passing before merging PR. + private void BuildCanonicalizedResource(StringBuilder stringBuilder, Uri resource) + { + // https://learn.microsoft.com/rest/api/batchservice/authenticate-requests-to-the-azure-batch-service + stringBuilder.Append('/'); + stringBuilder.Append(AccountName); + if (resource.AbsolutePath.Length > 0) + { + // Any portion of the CanonicalizedResource string that is derived from + // the resource's URI should be encoded exactly as it is in the URI. + // -- https://msdn.microsoft.com/library/azure/dd179428.aspx + stringBuilder.Append(resource.AbsolutePath);//EscapedPath() + } + else + { + // a slash is required to indicate the root path + stringBuilder.Append('/'); + } + string queryString = resource.Query; + var namedValueCollection = System.Web.HttpUtility.ParseQueryString(queryString); + IDictionary parameters = ToDictionary(namedValueCollection); + //System.Collections.Generic.IDictionary parameters = resource.Query.ToDictionary(; // Returns URL decoded values + if (parameters.Count > 0) + { + foreach (var name in parameters.Keys.OrderBy(key => key, StringComparer.Ordinal)) + { +#pragma warning disable CA1308 // Normalize strings to uppercase + stringBuilder.Append('\n').Append(name.ToLowerInvariant()).Append(':').Append(parameters[name]); +#pragma warning restore CA1308 // Normalize strings to uppercase + } + } + } + + /// + /// Generates a base-64 hash signature string for an HTTP request or + /// for a SAS. + /// + /// The message to sign. + /// The signed message. + private string ComputeSasSignature(string message) + { +#if NET6_0_OR_GREATER + return Convert.ToBase64String(HMACSHA256.HashData(AccountKeyValue, Encoding.UTF8.GetBytes(message))); +#else + return Convert.ToBase64String(new HMACSHA256(AccountKey).ComputeHash(Encoding.UTF8.GetBytes(message))); +#endif + } + + /// + /// A NameValueCollection extension method that converts to a dictionary. + /// + /// The collection to act on. + /// @this as an IDictionary<string,object> + private IDictionary ToDictionary(NameValueCollection collection) + { + var dict = new Dictionary(); + + if (collection != null) + { + foreach (string key in collection.AllKeys) + { + dict.Add(key, collection[key]); + } + } + + return dict; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Custom/Constants.cs b/sdk/batch/Azure.Compute.Batch/src/Custom/Constants.cs new file mode 100644 index 0000000000000..56c002fcc5810 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Custom/Constants.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Text; + +namespace Azure.Compute.Batch.Custom +{ + internal static class Constants + { + /// + /// Header Name constant values. + /// + internal static class HeaderNames + { + public const string OCPPrefix = "ocp-"; + public const string OCPDate = "ocp-date"; + public const string SharedKey = "SharedKey"; + public const string Authorization = "Authorization"; + public const string ContentEncoding = "Content-Encoding"; + public const string ContentLanguage = "Content-Language"; + public const string ContentLength = "Content-Length"; + public const string ContentMD5 = "Content-MD5"; + public const string ContentType = "Content-Type"; + public const string IfModifiedSince = "If-Modified-Since"; + public const string IfMatch = "If-Match"; + public const string IfNoneMatch = "If-None-Match"; + public const string IfUnmodifiedSince = "If-Unmodified-Since"; + public const string Range = "Range"; + public const string ContentRange = "Content-Range"; + public const string LastModified = "Last-Modified"; + public const string ETag = "ETag"; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Custom/Models/BatchFileProperties.cs b/sdk/batch/Azure.Compute.Batch/src/Custom/Models/BatchFileProperties.cs new file mode 100644 index 0000000000000..3d6d57cdef276 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Custom/Models/BatchFileProperties.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Text.Json; + +namespace Azure.Compute.Batch +{ + /// + /// Collection of header values that describe Batch File properties + /// + public partial class BatchFileProperties + { + internal BatchFileProperties(bool batchFileIsDirectory, string batchFileMode, string batchFileUrl, DateTime creationTime) + { + IsDirectory = batchFileIsDirectory; + Mode = batchFileMode; + FileUrl = batchFileUrl; + CreationTime = creationTime; + } + + /// Whether the object represents a directory. + public bool IsDirectory { get; } + + /// The file mode attribute in octal format. + public string Mode { get; } + + /// The URL of the file. + public string FileUrl { get; } + + /// The file creation time. + public DateTime CreationTime { get; } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchFileProperties FromResponse(Response response) + { + string isDirectoryStr = ""; + bool isDirectory = false; + string mode = ""; + string fileUrl = ""; + string creationTimeStr = ""; + + response.Headers.TryGetValue("ocp-creation-time", out creationTimeStr); + response.Headers.TryGetValue("ocp-batch-file-isdirectory", out isDirectoryStr); + response.Headers.TryGetValue("ocp-batch-file-url", out fileUrl); + response.Headers.TryGetValue("ocp-batch-file-mode", out mode); + + Boolean.TryParse(isDirectoryStr, out isDirectory); + DateTime creationTime = DateTime.Parse(creationTimeStr, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal); + + return new BatchFileProperties(isDirectory, mode, fileUrl, creationTime); + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Custom/Models/BatchJobScheduleUpdateContent.cs b/sdk/batch/Azure.Compute.Batch/src/Custom/Models/BatchJobScheduleUpdateContent.cs new file mode 100644 index 0000000000000..56a02005f7197 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Custom/Models/BatchJobScheduleUpdateContent.cs @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Parameters for updating an Azure Batch Job Schedule. + public partial class BatchJobScheduleUpdateContent + { + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Custom/Models/BatchJobUpdateContent.cs b/sdk/batch/Azure.Compute.Batch/src/Custom/Models/BatchJobUpdateContent.cs new file mode 100644 index 0000000000000..0736f1d9a894d --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Custom/Models/BatchJobUpdateContent.cs @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Parameters for updating an Azure Batch Job. + public partial class BatchJobUpdateContent + { + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Custom/Models/BatchPoolReplaceContent.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Custom/Models/BatchPoolReplaceContent.Serialization.cs new file mode 100644 index 0000000000000..7ca106d168fa0 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Custom/Models/BatchPoolReplaceContent.Serialization.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + /// + /// Customizing the Serialization of BatchPoolReplaceContent to handle the missing variable certificateReferences. This + /// is a work around will be removed in the next release + /// + public partial class BatchPoolReplaceContent : IUtf8JsonSerializable, IJsonModel + { + void global::Azure.Core.IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void global::System.ClientModel.Primitives.IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchPoolReplaceContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(StartTask)) + { + writer.WritePropertyName("startTask"u8); + writer.WriteObjectValue(StartTask, options); + } + writer.WritePropertyName("applicationPackageReferences"u8); + writer.WriteStartArray(); + foreach (var item in ApplicationPackageReferences) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + writer.WritePropertyName("metadata"u8); + writer.WriteStartArray(); + foreach (var item in Metadata) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + writer.WritePropertyName("certificateReferences"u8); + writer.WriteStartArray(); + writer.WriteEndArray(); + if (Optional.IsDefined(TargetNodeCommunicationMode)) + { + writer.WritePropertyName("targetNodeCommunicationMode"u8); + writer.WriteStringValue(TargetNodeCommunicationMode.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + + internal static BatchPoolReplaceContent DeserializeBatchPoolReplaceContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BatchStartTask startTask = default; + IList applicationPackageReferences = default; + IList metadata = default; + BatchNodeCommunicationMode? targetNodeCommunicationMode = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("startTask"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTask = BatchStartTask.DeserializeBatchStartTask(property.Value, options); + continue; + } + if (property.NameEquals("applicationPackageReferences"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BatchApplicationPackageReference.DeserializeBatchApplicationPackageReference(item, options)); + } + applicationPackageReferences = array; + continue; + } + if (property.NameEquals("metadata"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MetadataItem.DeserializeMetadataItem(item, options)); + } + metadata = array; + continue; + } + if (property.NameEquals("targetNodeCommunicationMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetNodeCommunicationMode = new BatchNodeCommunicationMode(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchPoolReplaceContent(startTask, applicationPackageReferences, metadata, targetNodeCommunicationMode, serializedAdditionalRawData); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchPoolReplaceContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchPoolReplaceContent(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Custom/Models/BatchPoolUpdateContent.cs b/sdk/batch/Azure.Compute.Batch/src/Custom/Models/BatchPoolUpdateContent.cs new file mode 100644 index 0000000000000..de446aa7a6265 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Custom/Models/BatchPoolUpdateContent.cs @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Parameters for updating an Azure Batch Pool. + public partial class BatchPoolUpdateContent + { + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/AccessScope.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/AccessScope.cs new file mode 100644 index 0000000000000..591142c765216 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/AccessScope.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Compute.Batch +{ + /// AccessScope enums. + public readonly partial struct AccessScope : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AccessScope(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string JobValue = "job"; + + /// Grants access to perform all operations on the Job containing the Task. + public static AccessScope Job { get; } = new AccessScope(JobValue); + /// Determines if two values are the same. + public static bool operator ==(AccessScope left, AccessScope right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AccessScope left, AccessScope right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AccessScope(string value) => new AccessScope(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AccessScope other && Equals(other); + /// + public bool Equals(AccessScope other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/AffinityInfo.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/AffinityInfo.Serialization.cs new file mode 100644 index 0000000000000..f2b549e739c0b --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/AffinityInfo.Serialization.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class AffinityInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AffinityInfo)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("affinityId"u8); + writer.WriteStringValue(AffinityId); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AffinityInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AffinityInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAffinityInfo(document.RootElement, options); + } + + internal static AffinityInfo DeserializeAffinityInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string affinityId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("affinityId"u8)) + { + affinityId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AffinityInfo(affinityId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AffinityInfo)} does not support writing '{options.Format}' format."); + } + } + + AffinityInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAffinityInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AffinityInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AffinityInfo FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAffinityInfo(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/AffinityInfo.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/AffinityInfo.cs new file mode 100644 index 0000000000000..340f6ac3f4eb0 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/AffinityInfo.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// + /// A locality hint that can be used by the Batch service to select a Compute Node + /// on which to start a Task. + /// + public partial class AffinityInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// An opaque string representing the location of a Compute Node or a Task that has run previously. You can pass the affinityId of a Node to indicate that this Task needs to run on that Compute Node. Note that this is just a soft affinity. If the target Compute Node is busy or unavailable at the time the Task is scheduled, then the Task will be scheduled elsewhere. + /// is null. + public AffinityInfo(string affinityId) + { + Argument.AssertNotNull(affinityId, nameof(affinityId)); + + AffinityId = affinityId; + } + + /// Initializes a new instance of . + /// An opaque string representing the location of a Compute Node or a Task that has run previously. You can pass the affinityId of a Node to indicate that this Task needs to run on that Compute Node. Note that this is just a soft affinity. If the target Compute Node is busy or unavailable at the time the Task is scheduled, then the Task will be scheduled elsewhere. + /// Keeps track of any properties unknown to the library. + internal AffinityInfo(string affinityId, IDictionary serializedAdditionalRawData) + { + AffinityId = affinityId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AffinityInfo() + { + } + + /// An opaque string representing the location of a Compute Node or a Task that has run previously. You can pass the affinityId of a Node to indicate that this Task needs to run on that Compute Node. Note that this is just a soft affinity. If the target Compute Node is busy or unavailable at the time the Task is scheduled, then the Task will be scheduled elsewhere. + public string AffinityId { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/AllocationState.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/AllocationState.cs new file mode 100644 index 0000000000000..cccd5ee47770b --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/AllocationState.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.Compute.Batch +{ + /// AllocationState enums. + public readonly partial struct AllocationState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AllocationState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SteadyValue = "steady"; + private const string ResizingValue = "resizing"; + private const string StoppingValue = "stopping"; + + /// The Pool is not resizing. There are no changes to the number of Compute Nodes in the Pool in progress. A Pool enters this state when it is created and when no operations are being performed on the Pool to change the number of Compute Nodes. + public static AllocationState Steady { get; } = new AllocationState(SteadyValue); + /// The Pool is resizing; that is, Compute Nodes are being added to or removed from the Pool. + public static AllocationState Resizing { get; } = new AllocationState(ResizingValue); + /// The Pool was resizing, but the user has requested that the resize be stopped, but the stop request has not yet been completed. + public static AllocationState Stopping { get; } = new AllocationState(StoppingValue); + /// Determines if two values are the same. + public static bool operator ==(AllocationState left, AllocationState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AllocationState left, AllocationState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AllocationState(string value) => new AllocationState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AllocationState other && Equals(other); + /// + public bool Equals(AllocationState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/AuthenticationTokenSettings.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/AuthenticationTokenSettings.Serialization.cs new file mode 100644 index 0000000000000..418b0c9f4ada9 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/AuthenticationTokenSettings.Serialization.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class AuthenticationTokenSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AuthenticationTokenSettings)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Access)) + { + writer.WritePropertyName("access"u8); + writer.WriteStartArray(); + foreach (var item in Access) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AuthenticationTokenSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AuthenticationTokenSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAuthenticationTokenSettings(document.RootElement, options); + } + + internal static AuthenticationTokenSettings DeserializeAuthenticationTokenSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList access = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("access"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new AccessScope(item.GetString())); + } + access = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AuthenticationTokenSettings(access ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AuthenticationTokenSettings)} does not support writing '{options.Format}' format."); + } + } + + AuthenticationTokenSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAuthenticationTokenSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AuthenticationTokenSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AuthenticationTokenSettings FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAuthenticationTokenSettings(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/AuthenticationTokenSettings.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/AuthenticationTokenSettings.cs new file mode 100644 index 0000000000000..400d876d185fa --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/AuthenticationTokenSettings.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// + /// The settings for an authentication token that the Task can use to perform Batch + /// service operations. + /// + public partial class AuthenticationTokenSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AuthenticationTokenSettings() + { + Access = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The Batch resources to which the token grants access. The authentication token grants access to a limited set of Batch service operations. Currently the only supported value for the access property is 'job', which grants access to all operations related to the Job which contains the Task. + /// Keeps track of any properties unknown to the library. + internal AuthenticationTokenSettings(IList access, IDictionary serializedAdditionalRawData) + { + Access = access; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The Batch resources to which the token grants access. The authentication token grants access to a limited set of Batch service operations. Currently the only supported value for the access property is 'job', which grants access to all operations related to the Job which contains the Task. + public IList Access { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/AutoScaleRun.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/AutoScaleRun.Serialization.cs new file mode 100644 index 0000000000000..48bc6352dae69 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/AutoScaleRun.Serialization.cs @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class AutoScaleRun : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutoScaleRun)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("timestamp"u8); + writer.WriteStringValue(Timestamp, "O"); + if (Optional.IsDefined(Results)) + { + writer.WritePropertyName("results"u8); + writer.WriteStringValue(Results); + } + if (Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + writer.WriteObjectValue(Error, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AutoScaleRun IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutoScaleRun)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutoScaleRun(document.RootElement, options); + } + + internal static AutoScaleRun DeserializeAutoScaleRun(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset timestamp = default; + string results = default; + AutoScaleRunError error = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("timestamp"u8)) + { + timestamp = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("results"u8)) + { + results = property.Value.GetString(); + continue; + } + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = AutoScaleRunError.DeserializeAutoScaleRunError(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AutoScaleRun(timestamp, results, error, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AutoScaleRun)} does not support writing '{options.Format}' format."); + } + } + + AutoScaleRun IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAutoScaleRun(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutoScaleRun)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AutoScaleRun FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAutoScaleRun(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/AutoScaleRun.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/AutoScaleRun.cs new file mode 100644 index 0000000000000..663ba502f78fc --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/AutoScaleRun.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// The results and errors from an execution of a Pool autoscale formula. + public partial class AutoScaleRun + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The time at which the autoscale formula was last evaluated. + internal AutoScaleRun(DateTimeOffset timestamp) + { + Timestamp = timestamp; + } + + /// Initializes a new instance of . + /// The time at which the autoscale formula was last evaluated. + /// The final values of all variables used in the evaluation of the autoscale formula. Each variable value is returned in the form $variable=value, and variables are separated by semicolons. + /// Details of the error encountered evaluating the autoscale formula on the Pool, if the evaluation was unsuccessful. + /// Keeps track of any properties unknown to the library. + internal AutoScaleRun(DateTimeOffset timestamp, string results, AutoScaleRunError error, IDictionary serializedAdditionalRawData) + { + Timestamp = timestamp; + Results = results; + Error = error; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AutoScaleRun() + { + } + + /// The time at which the autoscale formula was last evaluated. + public DateTimeOffset Timestamp { get; } + /// The final values of all variables used in the evaluation of the autoscale formula. Each variable value is returned in the form $variable=value, and variables are separated by semicolons. + public string Results { get; } + /// Details of the error encountered evaluating the autoscale formula on the Pool, if the evaluation was unsuccessful. + public AutoScaleRunError Error { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/AutoScaleRunError.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/AutoScaleRunError.Serialization.cs new file mode 100644 index 0000000000000..d8cb62f788ff7 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/AutoScaleRunError.Serialization.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class AutoScaleRunError : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutoScaleRunError)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + } + if (Optional.IsDefined(Message)) + { + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + } + if (Optional.IsCollectionDefined(Values)) + { + writer.WritePropertyName("values"u8); + writer.WriteStartArray(); + foreach (var item in Values) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AutoScaleRunError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutoScaleRunError)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutoScaleRunError(document.RootElement, options); + } + + internal static AutoScaleRunError DeserializeAutoScaleRunError(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string code = default; + string message = default; + IReadOnlyList values = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("values"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NameValuePair.DeserializeNameValuePair(item, options)); + } + values = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AutoScaleRunError(code, message, values ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AutoScaleRunError)} does not support writing '{options.Format}' format."); + } + } + + AutoScaleRunError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAutoScaleRunError(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutoScaleRunError)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AutoScaleRunError FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAutoScaleRunError(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/AutoScaleRunError.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/AutoScaleRunError.cs new file mode 100644 index 0000000000000..6d52456551fbd --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/AutoScaleRunError.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// An error that occurred when executing or evaluating a Pool autoscale formula. + public partial class AutoScaleRunError + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal AutoScaleRunError() + { + Values = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// An identifier for the autoscale error. Codes are invariant and are intended to be consumed programmatically. + /// A message describing the autoscale error, intended to be suitable for display in a user interface. + /// A list of additional error details related to the autoscale error. + /// Keeps track of any properties unknown to the library. + internal AutoScaleRunError(string code, string message, IReadOnlyList values, IDictionary serializedAdditionalRawData) + { + Code = code; + Message = message; + Values = values; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// An identifier for the autoscale error. Codes are invariant and are intended to be consumed programmatically. + public string Code { get; } + /// A message describing the autoscale error, intended to be suitable for display in a user interface. + public string Message { get; } + /// A list of additional error details related to the autoscale error. + public IReadOnlyList Values { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/AutoUserScope.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/AutoUserScope.cs new file mode 100644 index 0000000000000..26644a4af425d --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/AutoUserScope.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.Compute.Batch +{ + /// AutoUserScope enums. + public readonly partial struct AutoUserScope : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AutoUserScope(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TaskValue = "task"; + private const string PoolValue = "pool"; + + /// Specifies that the service should create a new user for the Task. + public static AutoUserScope Task { get; } = new AutoUserScope(TaskValue); + /// Specifies that the Task runs as the common auto user Account which is created on every Compute Node in a Pool. + public static AutoUserScope Pool { get; } = new AutoUserScope(PoolValue); + /// Determines if two values are the same. + public static bool operator ==(AutoUserScope left, AutoUserScope right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AutoUserScope left, AutoUserScope right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AutoUserScope(string value) => new AutoUserScope(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AutoUserScope other && Equals(other); + /// + public bool Equals(AutoUserScope other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/AutoUserSpecification.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/AutoUserSpecification.Serialization.cs new file mode 100644 index 0000000000000..17a5690247ce9 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/AutoUserSpecification.Serialization.cs @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class AutoUserSpecification : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutoUserSpecification)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Scope)) + { + writer.WritePropertyName("scope"u8); + writer.WriteStringValue(Scope.Value.ToString()); + } + if (Optional.IsDefined(ElevationLevel)) + { + writer.WritePropertyName("elevationLevel"u8); + writer.WriteStringValue(ElevationLevel.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AutoUserSpecification IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutoUserSpecification)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutoUserSpecification(document.RootElement, options); + } + + internal static AutoUserSpecification DeserializeAutoUserSpecification(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AutoUserScope? scope = default; + ElevationLevel? elevationLevel = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("scope"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scope = new AutoUserScope(property.Value.GetString()); + continue; + } + if (property.NameEquals("elevationLevel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + elevationLevel = new ElevationLevel(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AutoUserSpecification(scope, elevationLevel, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AutoUserSpecification)} does not support writing '{options.Format}' format."); + } + } + + AutoUserSpecification IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAutoUserSpecification(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutoUserSpecification)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AutoUserSpecification FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAutoUserSpecification(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/AutoUserSpecification.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/AutoUserSpecification.cs new file mode 100644 index 0000000000000..655ea827b2ca1 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/AutoUserSpecification.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Specifies the options for the auto user that runs an Azure Batch Task. + public partial class AutoUserSpecification + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AutoUserSpecification() + { + } + + /// Initializes a new instance of . + /// The scope for the auto user. The default value is pool. If the pool is running Windows, a value of Task should be specified if stricter isolation between tasks is required, such as if the task mutates the registry in a way which could impact other tasks. + /// The elevation level of the auto user. The default value is nonAdmin. + /// Keeps track of any properties unknown to the library. + internal AutoUserSpecification(AutoUserScope? scope, ElevationLevel? elevationLevel, IDictionary serializedAdditionalRawData) + { + Scope = scope; + ElevationLevel = elevationLevel; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The scope for the auto user. The default value is pool. If the pool is running Windows, a value of Task should be specified if stricter isolation between tasks is required, such as if the task mutates the registry in a way which could impact other tasks. + public AutoUserScope? Scope { get; set; } + /// The elevation level of the auto user. The default value is nonAdmin. + public ElevationLevel? ElevationLevel { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/AutomaticOsUpgradePolicy.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/AutomaticOsUpgradePolicy.Serialization.cs new file mode 100644 index 0000000000000..1c83efe2f9a70 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/AutomaticOsUpgradePolicy.Serialization.cs @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class AutomaticOsUpgradePolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutomaticOsUpgradePolicy)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(DisableAutomaticRollback)) + { + writer.WritePropertyName("disableAutomaticRollback"u8); + writer.WriteBooleanValue(DisableAutomaticRollback.Value); + } + if (Optional.IsDefined(EnableAutomaticOsUpgrade)) + { + writer.WritePropertyName("enableAutomaticOSUpgrade"u8); + writer.WriteBooleanValue(EnableAutomaticOsUpgrade.Value); + } + if (Optional.IsDefined(UseRollingUpgradePolicy)) + { + writer.WritePropertyName("useRollingUpgradePolicy"u8); + writer.WriteBooleanValue(UseRollingUpgradePolicy.Value); + } + if (Optional.IsDefined(OsRollingUpgradeDeferral)) + { + writer.WritePropertyName("osRollingUpgradeDeferral"u8); + writer.WriteBooleanValue(OsRollingUpgradeDeferral.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AutomaticOsUpgradePolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutomaticOsUpgradePolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutomaticOsUpgradePolicy(document.RootElement, options); + } + + internal static AutomaticOsUpgradePolicy DeserializeAutomaticOsUpgradePolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? disableAutomaticRollback = default; + bool? enableAutomaticOSUpgrade = default; + bool? useRollingUpgradePolicy = default; + bool? osRollingUpgradeDeferral = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("disableAutomaticRollback"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + disableAutomaticRollback = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("enableAutomaticOSUpgrade"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableAutomaticOSUpgrade = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("useRollingUpgradePolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useRollingUpgradePolicy = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("osRollingUpgradeDeferral"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + osRollingUpgradeDeferral = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AutomaticOsUpgradePolicy(disableAutomaticRollback, enableAutomaticOSUpgrade, useRollingUpgradePolicy, osRollingUpgradeDeferral, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AutomaticOsUpgradePolicy)} does not support writing '{options.Format}' format."); + } + } + + AutomaticOsUpgradePolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAutomaticOsUpgradePolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutomaticOsUpgradePolicy)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AutomaticOsUpgradePolicy FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAutomaticOsUpgradePolicy(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/AutomaticOsUpgradePolicy.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/AutomaticOsUpgradePolicy.cs new file mode 100644 index 0000000000000..a55f474ba013a --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/AutomaticOsUpgradePolicy.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// The configuration parameters used for performing automatic OS upgrade. + public partial class AutomaticOsUpgradePolicy + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AutomaticOsUpgradePolicy() + { + } + + /// Initializes a new instance of . + /// Whether OS image rollback feature should be disabled. + /// Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. <br /><br /> If this is set to true for Windows based pools, [WindowsConfiguration.enableAutomaticUpdates](https://learn.microsoft.com/en-us/rest/api/batchservice/pool/add?tabs=HTTP#windowsconfiguration) cannot be set to true. + /// Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Auto OS Upgrade will fallback to the default policy if no policy is defined on the VMSS. + /// Defer OS upgrades on the TVMs if they are running tasks. + /// Keeps track of any properties unknown to the library. + internal AutomaticOsUpgradePolicy(bool? disableAutomaticRollback, bool? enableAutomaticOsUpgrade, bool? useRollingUpgradePolicy, bool? osRollingUpgradeDeferral, IDictionary serializedAdditionalRawData) + { + DisableAutomaticRollback = disableAutomaticRollback; + EnableAutomaticOsUpgrade = enableAutomaticOsUpgrade; + UseRollingUpgradePolicy = useRollingUpgradePolicy; + OsRollingUpgradeDeferral = osRollingUpgradeDeferral; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Whether OS image rollback feature should be disabled. + public bool? DisableAutomaticRollback { get; set; } + /// Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. <br /><br /> If this is set to true for Windows based pools, [WindowsConfiguration.enableAutomaticUpdates](https://learn.microsoft.com/en-us/rest/api/batchservice/pool/add?tabs=HTTP#windowsconfiguration) cannot be set to true. + public bool? EnableAutomaticOsUpgrade { get; set; } + /// Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Auto OS Upgrade will fallback to the default policy if no policy is defined on the VMSS. + public bool? UseRollingUpgradePolicy { get; set; } + /// Defer OS upgrades on the TVMs if they are running tasks. + public bool? OsRollingUpgradeDeferral { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/AzureBlobFileSystemConfiguration.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/AzureBlobFileSystemConfiguration.Serialization.cs new file mode 100644 index 0000000000000..d7170869ed0bb --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/AzureBlobFileSystemConfiguration.Serialization.cs @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class AzureBlobFileSystemConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureBlobFileSystemConfiguration)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("accountName"u8); + writer.WriteStringValue(AccountName); + writer.WritePropertyName("containerName"u8); + writer.WriteStringValue(ContainerName); + if (Optional.IsDefined(AccountKey)) + { + writer.WritePropertyName("accountKey"u8); + writer.WriteStringValue(AccountKey); + } + if (Optional.IsDefined(SasKey)) + { + writer.WritePropertyName("sasKey"u8); + writer.WriteStringValue(SasKey); + } + if (Optional.IsDefined(BlobfuseOptions)) + { + writer.WritePropertyName("blobfuseOptions"u8); + writer.WriteStringValue(BlobfuseOptions); + } + writer.WritePropertyName("relativeMountPath"u8); + writer.WriteStringValue(RelativeMountPath); + if (Optional.IsDefined(IdentityReference)) + { + writer.WritePropertyName("identityReference"u8); + writer.WriteObjectValue(IdentityReference, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AzureBlobFileSystemConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureBlobFileSystemConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureBlobFileSystemConfiguration(document.RootElement, options); + } + + internal static AzureBlobFileSystemConfiguration DeserializeAzureBlobFileSystemConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string accountName = default; + string containerName = default; + string accountKey = default; + string sasKey = default; + string blobfuseOptions = default; + string relativeMountPath = default; + BatchNodeIdentityReference identityReference = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("accountName"u8)) + { + accountName = property.Value.GetString(); + continue; + } + if (property.NameEquals("containerName"u8)) + { + containerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("accountKey"u8)) + { + accountKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("sasKey"u8)) + { + sasKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("blobfuseOptions"u8)) + { + blobfuseOptions = property.Value.GetString(); + continue; + } + if (property.NameEquals("relativeMountPath"u8)) + { + relativeMountPath = property.Value.GetString(); + continue; + } + if (property.NameEquals("identityReference"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identityReference = BatchNodeIdentityReference.DeserializeBatchNodeIdentityReference(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureBlobFileSystemConfiguration( + accountName, + containerName, + accountKey, + sasKey, + blobfuseOptions, + relativeMountPath, + identityReference, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AzureBlobFileSystemConfiguration)} does not support writing '{options.Format}' format."); + } + } + + AzureBlobFileSystemConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAzureBlobFileSystemConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureBlobFileSystemConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AzureBlobFileSystemConfiguration FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAzureBlobFileSystemConfiguration(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/AzureBlobFileSystemConfiguration.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/AzureBlobFileSystemConfiguration.cs new file mode 100644 index 0000000000000..bf6bd8b45665c --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/AzureBlobFileSystemConfiguration.cs @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Information used to connect to an Azure Storage Container using Blobfuse. + public partial class AzureBlobFileSystemConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The Azure Storage Account name. + /// The Azure Blob Storage Container name. + /// The relative path on the compute node where the file system will be mounted. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. + /// , or is null. + public AzureBlobFileSystemConfiguration(string accountName, string containerName, string relativeMountPath) + { + Argument.AssertNotNull(accountName, nameof(accountName)); + Argument.AssertNotNull(containerName, nameof(containerName)); + Argument.AssertNotNull(relativeMountPath, nameof(relativeMountPath)); + + AccountName = accountName; + ContainerName = containerName; + RelativeMountPath = relativeMountPath; + } + + /// Initializes a new instance of . + /// The Azure Storage Account name. + /// The Azure Blob Storage Container name. + /// The Azure Storage Account key. This property is mutually exclusive with both sasKey and identity; exactly one must be specified. + /// The Azure Storage SAS token. This property is mutually exclusive with both accountKey and identity; exactly one must be specified. + /// Additional command line options to pass to the mount command. These are 'net use' options in Windows and 'mount' options in Linux. + /// The relative path on the compute node where the file system will be mounted. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. + /// The reference to the user assigned identity to use to access containerName. This property is mutually exclusive with both accountKey and sasKey; exactly one must be specified. + /// Keeps track of any properties unknown to the library. + internal AzureBlobFileSystemConfiguration(string accountName, string containerName, string accountKey, string sasKey, string blobfuseOptions, string relativeMountPath, BatchNodeIdentityReference identityReference, IDictionary serializedAdditionalRawData) + { + AccountName = accountName; + ContainerName = containerName; + AccountKey = accountKey; + SasKey = sasKey; + BlobfuseOptions = blobfuseOptions; + RelativeMountPath = relativeMountPath; + IdentityReference = identityReference; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AzureBlobFileSystemConfiguration() + { + } + + /// The Azure Storage Account name. + public string AccountName { get; set; } + /// The Azure Blob Storage Container name. + public string ContainerName { get; set; } + /// The Azure Storage Account key. This property is mutually exclusive with both sasKey and identity; exactly one must be specified. + public string AccountKey { get; set; } + /// The Azure Storage SAS token. This property is mutually exclusive with both accountKey and identity; exactly one must be specified. + public string SasKey { get; set; } + /// Additional command line options to pass to the mount command. These are 'net use' options in Windows and 'mount' options in Linux. + public string BlobfuseOptions { get; set; } + /// The relative path on the compute node where the file system will be mounted. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. + public string RelativeMountPath { get; set; } + /// The reference to the user assigned identity to use to access containerName. This property is mutually exclusive with both accountKey and sasKey; exactly one must be specified. + public BatchNodeIdentityReference IdentityReference { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/AzureFileShareConfiguration.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/AzureFileShareConfiguration.Serialization.cs new file mode 100644 index 0000000000000..62c45e62098fb --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/AzureFileShareConfiguration.Serialization.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class AzureFileShareConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureFileShareConfiguration)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("accountName"u8); + writer.WriteStringValue(AccountName); + writer.WritePropertyName("azureFileUrl"u8); + writer.WriteStringValue(AzureFileUrl); + writer.WritePropertyName("accountKey"u8); + writer.WriteStringValue(AccountKey); + writer.WritePropertyName("relativeMountPath"u8); + writer.WriteStringValue(RelativeMountPath); + if (Optional.IsDefined(MountOptions)) + { + writer.WritePropertyName("mountOptions"u8); + writer.WriteStringValue(MountOptions); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AzureFileShareConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureFileShareConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureFileShareConfiguration(document.RootElement, options); + } + + internal static AzureFileShareConfiguration DeserializeAzureFileShareConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string accountName = default; + string azureFileUrl = default; + string accountKey = default; + string relativeMountPath = default; + string mountOptions = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("accountName"u8)) + { + accountName = property.Value.GetString(); + continue; + } + if (property.NameEquals("azureFileUrl"u8)) + { + azureFileUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("accountKey"u8)) + { + accountKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("relativeMountPath"u8)) + { + relativeMountPath = property.Value.GetString(); + continue; + } + if (property.NameEquals("mountOptions"u8)) + { + mountOptions = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureFileShareConfiguration( + accountName, + azureFileUrl, + accountKey, + relativeMountPath, + mountOptions, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AzureFileShareConfiguration)} does not support writing '{options.Format}' format."); + } + } + + AzureFileShareConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAzureFileShareConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureFileShareConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AzureFileShareConfiguration FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAzureFileShareConfiguration(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/AzureFileShareConfiguration.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/AzureFileShareConfiguration.cs new file mode 100644 index 0000000000000..76049a45e4288 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/AzureFileShareConfiguration.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Information used to connect to an Azure Fileshare. + public partial class AzureFileShareConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The Azure Storage account name. + /// The Azure Files URL. This is of the form 'https://{account}.file.core.windows.net/'. + /// The Azure Storage account key. + /// The relative path on the compute node where the file system will be mounted. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. + /// , , or is null. + public AzureFileShareConfiguration(string accountName, string azureFileUrl, string accountKey, string relativeMountPath) + { + Argument.AssertNotNull(accountName, nameof(accountName)); + Argument.AssertNotNull(azureFileUrl, nameof(azureFileUrl)); + Argument.AssertNotNull(accountKey, nameof(accountKey)); + Argument.AssertNotNull(relativeMountPath, nameof(relativeMountPath)); + + AccountName = accountName; + AzureFileUrl = azureFileUrl; + AccountKey = accountKey; + RelativeMountPath = relativeMountPath; + } + + /// Initializes a new instance of . + /// The Azure Storage account name. + /// The Azure Files URL. This is of the form 'https://{account}.file.core.windows.net/'. + /// The Azure Storage account key. + /// The relative path on the compute node where the file system will be mounted. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. + /// Additional command line options to pass to the mount command. These are 'net use' options in Windows and 'mount' options in Linux. + /// Keeps track of any properties unknown to the library. + internal AzureFileShareConfiguration(string accountName, string azureFileUrl, string accountKey, string relativeMountPath, string mountOptions, IDictionary serializedAdditionalRawData) + { + AccountName = accountName; + AzureFileUrl = azureFileUrl; + AccountKey = accountKey; + RelativeMountPath = relativeMountPath; + MountOptions = mountOptions; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AzureFileShareConfiguration() + { + } + + /// The Azure Storage account name. + public string AccountName { get; set; } + /// The Azure Files URL. This is of the form 'https://{account}.file.core.windows.net/'. + public string AzureFileUrl { get; set; } + /// The Azure Storage account key. + public string AccountKey { get; set; } + /// The relative path on the compute node where the file system will be mounted. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. + public string RelativeMountPath { get; set; } + /// Additional command line options to pass to the mount command. These are 'net use' options in Windows and 'mount' options in Linux. + public string MountOptions { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchApplication.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchApplication.Serialization.cs new file mode 100644 index 0000000000000..ecc68700eb6c8 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchApplication.Serialization.cs @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchApplication : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchApplication)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + writer.WritePropertyName("versions"u8); + writer.WriteStartArray(); + foreach (var item in Versions) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchApplication IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchApplication)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchApplication(document.RootElement, options); + } + + internal static BatchApplication DeserializeBatchApplication(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + string displayName = default; + IReadOnlyList versions = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("versions"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + versions = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchApplication(id, displayName, versions, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchApplication)} does not support writing '{options.Format}' format."); + } + } + + BatchApplication IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchApplication(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchApplication)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchApplication FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchApplication(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchApplication.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchApplication.cs new file mode 100644 index 0000000000000..32618e1d98915 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchApplication.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Compute.Batch +{ + /// Contains information about an application in an Azure Batch Account. + public partial class BatchApplication + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// A string that uniquely identifies the application within the Account. + /// The display name for the application. + /// The list of available versions of the application. + /// , or is null. + internal BatchApplication(string id, string displayName, IEnumerable versions) + { + Argument.AssertNotNull(id, nameof(id)); + Argument.AssertNotNull(displayName, nameof(displayName)); + Argument.AssertNotNull(versions, nameof(versions)); + + Id = id; + DisplayName = displayName; + Versions = versions.ToList(); + } + + /// Initializes a new instance of . + /// A string that uniquely identifies the application within the Account. + /// The display name for the application. + /// The list of available versions of the application. + /// Keeps track of any properties unknown to the library. + internal BatchApplication(string id, string displayName, IReadOnlyList versions, IDictionary serializedAdditionalRawData) + { + Id = id; + DisplayName = displayName; + Versions = versions; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchApplication() + { + } + + /// A string that uniquely identifies the application within the Account. + public string Id { get; } + /// The display name for the application. + public string DisplayName { get; } + /// The list of available versions of the application. + public IReadOnlyList Versions { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchApplicationPackageReference.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchApplicationPackageReference.Serialization.cs new file mode 100644 index 0000000000000..3aae3911ba245 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchApplicationPackageReference.Serialization.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchApplicationPackageReference : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchApplicationPackageReference)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("applicationId"u8); + writer.WriteStringValue(ApplicationId); + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchApplicationPackageReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchApplicationPackageReference)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchApplicationPackageReference(document.RootElement, options); + } + + internal static BatchApplicationPackageReference DeserializeBatchApplicationPackageReference(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string applicationId = default; + string version = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("applicationId"u8)) + { + applicationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + version = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchApplicationPackageReference(applicationId, version, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchApplicationPackageReference)} does not support writing '{options.Format}' format."); + } + } + + BatchApplicationPackageReference IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchApplicationPackageReference(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchApplicationPackageReference)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchApplicationPackageReference FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchApplicationPackageReference(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchApplicationPackageReference.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchApplicationPackageReference.cs new file mode 100644 index 0000000000000..f7d288b197406 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchApplicationPackageReference.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// A reference to an Package to be deployed to Compute Nodes. + public partial class BatchApplicationPackageReference + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The ID of the application to deploy. When creating a pool, the package's application ID must be fully qualified (/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}). + /// is null. + public BatchApplicationPackageReference(string applicationId) + { + Argument.AssertNotNull(applicationId, nameof(applicationId)); + + ApplicationId = applicationId; + } + + /// Initializes a new instance of . + /// The ID of the application to deploy. When creating a pool, the package's application ID must be fully qualified (/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}). + /// The version of the application to deploy. If omitted, the default version is deployed. If this is omitted on a Pool, and no default version is specified for this application, the request fails with the error code InvalidApplicationPackageReferences and HTTP status code 409. If this is omitted on a Task, and no default version is specified for this application, the Task fails with a pre-processing error. + /// Keeps track of any properties unknown to the library. + internal BatchApplicationPackageReference(string applicationId, string version, IDictionary serializedAdditionalRawData) + { + ApplicationId = applicationId; + Version = version; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchApplicationPackageReference() + { + } + + /// The ID of the application to deploy. When creating a pool, the package's application ID must be fully qualified (/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}). + public string ApplicationId { get; set; } + /// The version of the application to deploy. If omitted, the default version is deployed. If this is omitted on a Pool, and no default version is specified for this application, the request fails with the error code InvalidApplicationPackageReferences and HTTP status code 409. If this is omitted on a Task, and no default version is specified for this application, the Task fails with a pre-processing error. + public string Version { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchAutoPoolSpecification.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchAutoPoolSpecification.Serialization.cs new file mode 100644 index 0000000000000..cde73fe116664 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchAutoPoolSpecification.Serialization.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchAutoPoolSpecification : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchAutoPoolSpecification)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(AutoPoolIdPrefix)) + { + writer.WritePropertyName("autoPoolIdPrefix"u8); + writer.WriteStringValue(AutoPoolIdPrefix); + } + writer.WritePropertyName("poolLifetimeOption"u8); + writer.WriteStringValue(PoolLifetimeOption.ToString()); + if (Optional.IsDefined(KeepAlive)) + { + writer.WritePropertyName("keepAlive"u8); + writer.WriteBooleanValue(KeepAlive.Value); + } + if (Optional.IsDefined(Pool)) + { + writer.WritePropertyName("pool"u8); + writer.WriteObjectValue(Pool, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchAutoPoolSpecification IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchAutoPoolSpecification)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchAutoPoolSpecification(document.RootElement, options); + } + + internal static BatchAutoPoolSpecification DeserializeBatchAutoPoolSpecification(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string autoPoolIdPrefix = default; + BatchPoolLifetimeOption poolLifetimeOption = default; + bool? keepAlive = default; + BatchPoolSpecification pool = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("autoPoolIdPrefix"u8)) + { + autoPoolIdPrefix = property.Value.GetString(); + continue; + } + if (property.NameEquals("poolLifetimeOption"u8)) + { + poolLifetimeOption = new BatchPoolLifetimeOption(property.Value.GetString()); + continue; + } + if (property.NameEquals("keepAlive"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + keepAlive = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("pool"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pool = BatchPoolSpecification.DeserializeBatchPoolSpecification(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchAutoPoolSpecification(autoPoolIdPrefix, poolLifetimeOption, keepAlive, pool, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchAutoPoolSpecification)} does not support writing '{options.Format}' format."); + } + } + + BatchAutoPoolSpecification IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchAutoPoolSpecification(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchAutoPoolSpecification)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchAutoPoolSpecification FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchAutoPoolSpecification(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchAutoPoolSpecification.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchAutoPoolSpecification.cs new file mode 100644 index 0000000000000..3b9554463013c --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchAutoPoolSpecification.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// + /// Specifies characteristics for a temporary 'auto pool'. The Batch service will + /// create this auto Pool when the Job is submitted. + /// + public partial class BatchAutoPoolSpecification + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The minimum lifetime of created auto Pools, and how multiple Jobs on a schedule are assigned to Pools. + public BatchAutoPoolSpecification(BatchPoolLifetimeOption poolLifetimeOption) + { + PoolLifetimeOption = poolLifetimeOption; + } + + /// Initializes a new instance of . + /// A prefix to be added to the unique identifier when a Pool is automatically created. The Batch service assigns each auto Pool a unique identifier on creation. To distinguish between Pools created for different purposes, you can specify this element to add a prefix to the ID that is assigned. The prefix can be up to 20 characters long. + /// The minimum lifetime of created auto Pools, and how multiple Jobs on a schedule are assigned to Pools. + /// Whether to keep an auto Pool alive after its lifetime expires. If false, the Batch service deletes the Pool once its lifetime (as determined by the poolLifetimeOption setting) expires; that is, when the Job or Job Schedule completes. If true, the Batch service does not delete the Pool automatically. It is up to the user to delete auto Pools created with this option. + /// The Pool specification for the auto Pool. + /// Keeps track of any properties unknown to the library. + internal BatchAutoPoolSpecification(string autoPoolIdPrefix, BatchPoolLifetimeOption poolLifetimeOption, bool? keepAlive, BatchPoolSpecification pool, IDictionary serializedAdditionalRawData) + { + AutoPoolIdPrefix = autoPoolIdPrefix; + PoolLifetimeOption = poolLifetimeOption; + KeepAlive = keepAlive; + Pool = pool; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchAutoPoolSpecification() + { + } + + /// A prefix to be added to the unique identifier when a Pool is automatically created. The Batch service assigns each auto Pool a unique identifier on creation. To distinguish between Pools created for different purposes, you can specify this element to add a prefix to the ID that is assigned. The prefix can be up to 20 characters long. + public string AutoPoolIdPrefix { get; set; } + /// The minimum lifetime of created auto Pools, and how multiple Jobs on a schedule are assigned to Pools. + public BatchPoolLifetimeOption PoolLifetimeOption { get; set; } + /// Whether to keep an auto Pool alive after its lifetime expires. If false, the Batch service deletes the Pool once its lifetime (as determined by the poolLifetimeOption setting) expires; that is, when the Job or Job Schedule completes. If true, the Batch service does not delete the Pool automatically. It is up to the user to delete auto Pools created with this option. + public bool? KeepAlive { get; set; } + /// The Pool specification for the auto Pool. + public BatchPoolSpecification Pool { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchClient.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchClient.cs new file mode 100644 index 0000000000000..47672eb0c12fb --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchClient.cs @@ -0,0 +1,11701 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Compute.Batch +{ + // Data plane generated client. + /// The Batch service client. + public partial class BatchClient + { + private static readonly string[] AuthorizationScopes = new string[] { "https://batch.core.windows.net//.default" }; + private readonly TokenCredential _tokenCredential; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline => _pipeline; + + /// Initializes a new instance of BatchClient for mocking. + protected BatchClient() + { + } + + /// Initializes a new instance of BatchClient. + /// Batch account endpoint (for example: https://batchaccount.eastus2.batch.azure.com). + /// A credential used to authenticate to an Azure Service. + /// or is null. + public BatchClient(Uri endpoint, TokenCredential credential) : this(endpoint, credential, new BatchClientOptions()) + { + } + + /// Initializes a new instance of BatchClient. + /// Batch account endpoint (for example: https://batchaccount.eastus2.batch.azure.com). + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + /// or is null. + public BatchClient(Uri endpoint, TokenCredential credential, BatchClientOptions options) + { + Argument.AssertNotNull(endpoint, nameof(endpoint)); + Argument.AssertNotNull(credential, nameof(credential)); + options ??= new BatchClientOptions(); + + ClientDiagnostics = new ClientDiagnostics(options, true); + _tokenCredential = credential; + _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes) }, new ResponseClassifier()); + _endpoint = endpoint; + _apiVersion = options.Version; + } + + /// Gets information about the specified Application. + /// The ID of the Application. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + /// This operation returns only Applications and versions that are available for + /// use on Compute Nodes; that is, that can be used in an Package reference. For + /// administrator information about Applications and versions that are not yet + /// available to Compute Nodes, use the Azure portal or the Azure Resource Manager + /// API. + /// + /// + public virtual async Task> GetApplicationAsync(string applicationId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationId, nameof(applicationId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetApplicationAsync(applicationId, timeOutInSeconds, ocpdate, context).ConfigureAwait(false); + return Response.FromValue(BatchApplication.FromResponse(response), response); + } + + /// Gets information about the specified Application. + /// The ID of the Application. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + /// This operation returns only Applications and versions that are available for + /// use on Compute Nodes; that is, that can be used in an Package reference. For + /// administrator information about Applications and versions that are not yet + /// available to Compute Nodes, use the Azure portal or the Azure Resource Manager + /// API. + /// + /// + public virtual Response GetApplication(string applicationId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationId, nameof(applicationId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetApplication(applicationId, timeOutInSeconds, ocpdate, context); + return Response.FromValue(BatchApplication.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets information about the specified Application. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Application. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetApplicationAsync(string applicationId, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestContext context) + { + Argument.AssertNotNullOrEmpty(applicationId, nameof(applicationId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.GetApplication"); + scope.Start(); + try + { + using HttpMessage message = CreateGetApplicationRequest(applicationId, timeOutInSeconds, ocpdate, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets information about the specified Application. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Application. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetApplication(string applicationId, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestContext context) + { + Argument.AssertNotNullOrEmpty(applicationId, nameof(applicationId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.GetApplication"); + scope.Start(); + try + { + using HttpMessage message = CreateGetApplicationRequest(applicationId, timeOutInSeconds, ocpdate, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Creates a Pool to the specified Account. + /// The Pool to be created. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// is null. + /// + /// When naming Pools, avoid including sensitive information such as user names or + /// secret project names. This information may appear in telemetry logs accessible + /// to Microsoft Support engineers. + /// + /// + public virtual async Task CreatePoolAsync(BatchPoolCreateContent pool, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(pool, nameof(pool)); + + using RequestContent content = pool.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await CreatePoolAsync(content, timeOutInSeconds, ocpdate, context).ConfigureAwait(false); + return response; + } + + /// Creates a Pool to the specified Account. + /// The Pool to be created. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// is null. + /// + /// When naming Pools, avoid including sensitive information such as user names or + /// secret project names. This information may appear in telemetry logs accessible + /// to Microsoft Support engineers. + /// + /// + public virtual Response CreatePool(BatchPoolCreateContent pool, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(pool, nameof(pool)); + + using RequestContent content = pool.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = CreatePool(content, timeOutInSeconds, ocpdate, context); + return response; + } + + /// + /// [Protocol Method] Creates a Pool to the specified Account. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task CreatePoolAsync(RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.CreatePool"); + scope.Start(); + try + { + using HttpMessage message = CreateCreatePoolRequest(content, timeOutInSeconds, ocpdate, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Creates a Pool to the specified Account. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response CreatePool(RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.CreatePool"); + scope.Start(); + try + { + using HttpMessage message = CreateCreatePoolRequest(content, timeOutInSeconds, ocpdate, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Deletes a Pool from the specified Account. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Pool to get. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task DeletePoolAsync(string poolId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.DeletePool"); + scope.Start(); + try + { + using HttpMessage message = CreateDeletePoolRequest(poolId, timeOutInSeconds, ocpdate, requestConditions, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Deletes a Pool from the specified Account. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Pool to get. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response DeletePool(string poolId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.DeletePool"); + scope.Start(); + try + { + using HttpMessage message = CreateDeletePoolRequest(poolId, timeOutInSeconds, ocpdate, requestConditions, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets information about the specified Pool. + /// The ID of the Pool to get. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// An OData $select clause. + /// An OData $expand clause. + /// The content to send as the request conditions of the request. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetPoolAsync(string poolId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, IEnumerable select = null, IEnumerable expand = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetPoolAsync(poolId, timeOutInSeconds, ocpdate, select, expand, requestConditions, context).ConfigureAwait(false); + return Response.FromValue(BatchPool.FromResponse(response), response); + } + + /// Gets information about the specified Pool. + /// The ID of the Pool to get. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// An OData $select clause. + /// An OData $expand clause. + /// The content to send as the request conditions of the request. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetPool(string poolId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, IEnumerable select = null, IEnumerable expand = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetPool(poolId, timeOutInSeconds, ocpdate, select, expand, requestConditions, context); + return Response.FromValue(BatchPool.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets information about the specified Pool. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Pool to get. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// An OData $select clause. + /// An OData $expand clause. + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetPoolAsync(string poolId, int? timeOutInSeconds, DateTimeOffset? ocpdate, IEnumerable select, IEnumerable expand, RequestConditions requestConditions, RequestContext context) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.GetPool"); + scope.Start(); + try + { + using HttpMessage message = CreateGetPoolRequest(poolId, timeOutInSeconds, ocpdate, select, expand, requestConditions, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets information about the specified Pool. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Pool to get. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// An OData $select clause. + /// An OData $expand clause. + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetPool(string poolId, int? timeOutInSeconds, DateTimeOffset? ocpdate, IEnumerable select, IEnumerable expand, RequestConditions requestConditions, RequestContext context) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.GetPool"); + scope.Start(); + try + { + using HttpMessage message = CreateGetPoolRequest(poolId, timeOutInSeconds, ocpdate, select, expand, requestConditions, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Updates the properties of the specified Pool. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Pool to get. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task UpdatePoolAsync(string poolId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.UpdatePool"); + scope.Start(); + try + { + using HttpMessage message = CreateUpdatePoolRequest(poolId, content, timeOutInSeconds, ocpdate, requestConditions, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Updates the properties of the specified Pool. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Pool to get. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response UpdatePool(string poolId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.UpdatePool"); + scope.Start(); + try + { + using HttpMessage message = CreateUpdatePoolRequest(poolId, content, timeOutInSeconds, ocpdate, requestConditions, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Disables automatic scaling for a Pool. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Pool on which to disable automatic scaling. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task DisablePoolAutoScaleAsync(string poolId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.DisablePoolAutoScale"); + scope.Start(); + try + { + using HttpMessage message = CreateDisablePoolAutoScaleRequest(poolId, timeOutInSeconds, ocpdate, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Disables automatic scaling for a Pool. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Pool on which to disable automatic scaling. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response DisablePoolAutoScale(string poolId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.DisablePoolAutoScale"); + scope.Start(); + try + { + using HttpMessage message = CreateDisablePoolAutoScaleRequest(poolId, timeOutInSeconds, ocpdate, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Enables automatic scaling for a Pool. + /// The ID of the Pool to get. + /// The options to use for enabling automatic scaling. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + /// You cannot enable automatic scaling on a Pool if a resize operation is in + /// progress on the Pool. If automatic scaling of the Pool is currently disabled, + /// you must specify a valid autoscale formula as part of the request. If automatic + /// scaling of the Pool is already enabled, you may specify a new autoscale formula + /// and/or a new evaluation interval. You cannot call this API for the same Pool + /// more than once every 30 seconds. + /// + /// + public virtual async Task EnablePoolAutoScaleAsync(string poolId, BatchPoolEnableAutoScaleContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNull(content, nameof(content)); + + using RequestContent content0 = content.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await EnablePoolAutoScaleAsync(poolId, content0, timeOutInSeconds, ocpdate, requestConditions, context).ConfigureAwait(false); + return response; + } + + /// Enables automatic scaling for a Pool. + /// The ID of the Pool to get. + /// The options to use for enabling automatic scaling. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + /// You cannot enable automatic scaling on a Pool if a resize operation is in + /// progress on the Pool. If automatic scaling of the Pool is currently disabled, + /// you must specify a valid autoscale formula as part of the request. If automatic + /// scaling of the Pool is already enabled, you may specify a new autoscale formula + /// and/or a new evaluation interval. You cannot call this API for the same Pool + /// more than once every 30 seconds. + /// + /// + public virtual Response EnablePoolAutoScale(string poolId, BatchPoolEnableAutoScaleContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNull(content, nameof(content)); + + using RequestContent content0 = content.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = EnablePoolAutoScale(poolId, content0, timeOutInSeconds, ocpdate, requestConditions, context); + return response; + } + + /// + /// [Protocol Method] Enables automatic scaling for a Pool. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Pool to get. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task EnablePoolAutoScaleAsync(string poolId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.EnablePoolAutoScale"); + scope.Start(); + try + { + using HttpMessage message = CreateEnablePoolAutoScaleRequest(poolId, content, timeOutInSeconds, ocpdate, requestConditions, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Enables automatic scaling for a Pool. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Pool to get. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response EnablePoolAutoScale(string poolId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.EnablePoolAutoScale"); + scope.Start(); + try + { + using HttpMessage message = CreateEnablePoolAutoScaleRequest(poolId, content, timeOutInSeconds, ocpdate, requestConditions, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the result of evaluating an automatic scaling formula on the Pool. + /// The ID of the Pool on which to evaluate the automatic scaling formula. + /// The options to use for evaluating the automatic scaling formula. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + /// This API is primarily for validating an autoscale formula, as it simply returns + /// the result without applying the formula to the Pool. The Pool must have auto + /// scaling enabled in order to evaluate a formula. + /// + /// + public virtual async Task> EvaluatePoolAutoScaleAsync(string poolId, BatchPoolEvaluateAutoScaleContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNull(content, nameof(content)); + + using RequestContent content0 = content.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await EvaluatePoolAutoScaleAsync(poolId, content0, timeOutInSeconds, ocpdate, context).ConfigureAwait(false); + return Response.FromValue(AutoScaleRun.FromResponse(response), response); + } + + /// Gets the result of evaluating an automatic scaling formula on the Pool. + /// The ID of the Pool on which to evaluate the automatic scaling formula. + /// The options to use for evaluating the automatic scaling formula. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + /// This API is primarily for validating an autoscale formula, as it simply returns + /// the result without applying the formula to the Pool. The Pool must have auto + /// scaling enabled in order to evaluate a formula. + /// + /// + public virtual Response EvaluatePoolAutoScale(string poolId, BatchPoolEvaluateAutoScaleContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNull(content, nameof(content)); + + using RequestContent content0 = content.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = EvaluatePoolAutoScale(poolId, content0, timeOutInSeconds, ocpdate, context); + return Response.FromValue(AutoScaleRun.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the result of evaluating an automatic scaling formula on the Pool. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Pool on which to evaluate the automatic scaling formula. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task EvaluatePoolAutoScaleAsync(string poolId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.EvaluatePoolAutoScale"); + scope.Start(); + try + { + using HttpMessage message = CreateEvaluatePoolAutoScaleRequest(poolId, content, timeOutInSeconds, ocpdate, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the result of evaluating an automatic scaling formula on the Pool. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Pool on which to evaluate the automatic scaling formula. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response EvaluatePoolAutoScale(string poolId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.EvaluatePoolAutoScale"); + scope.Start(); + try + { + using HttpMessage message = CreateEvaluatePoolAutoScaleRequest(poolId, content, timeOutInSeconds, ocpdate, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Changes the number of Compute Nodes that are assigned to a Pool. + /// The ID of the Pool to get. + /// The options to use for resizing the pool. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + /// You can only resize a Pool when its allocation state is steady. If the Pool is + /// already resizing, the request fails with status code 409. When you resize a + /// Pool, the Pool's allocation state changes from steady to resizing. You cannot + /// resize Pools which are configured for automatic scaling. If you try to do this, + /// the Batch service returns an error 409. If you resize a Pool downwards, the + /// Batch service chooses which Compute Nodes to remove. To remove specific Compute + /// Nodes, use the Pool remove Compute Nodes API instead. + /// + /// + public virtual async Task ResizePoolAsync(string poolId, BatchPoolResizeContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNull(content, nameof(content)); + + using RequestContent content0 = content.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await ResizePoolAsync(poolId, content0, timeOutInSeconds, ocpdate, requestConditions, context).ConfigureAwait(false); + return response; + } + + /// Changes the number of Compute Nodes that are assigned to a Pool. + /// The ID of the Pool to get. + /// The options to use for resizing the pool. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + /// You can only resize a Pool when its allocation state is steady. If the Pool is + /// already resizing, the request fails with status code 409. When you resize a + /// Pool, the Pool's allocation state changes from steady to resizing. You cannot + /// resize Pools which are configured for automatic scaling. If you try to do this, + /// the Batch service returns an error 409. If you resize a Pool downwards, the + /// Batch service chooses which Compute Nodes to remove. To remove specific Compute + /// Nodes, use the Pool remove Compute Nodes API instead. + /// + /// + public virtual Response ResizePool(string poolId, BatchPoolResizeContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNull(content, nameof(content)); + + using RequestContent content0 = content.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = ResizePool(poolId, content0, timeOutInSeconds, ocpdate, requestConditions, context); + return response; + } + + /// + /// [Protocol Method] Changes the number of Compute Nodes that are assigned to a Pool. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Pool to get. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task ResizePoolAsync(string poolId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.ResizePool"); + scope.Start(); + try + { + using HttpMessage message = CreateResizePoolRequest(poolId, content, timeOutInSeconds, ocpdate, requestConditions, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Changes the number of Compute Nodes that are assigned to a Pool. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Pool to get. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response ResizePool(string poolId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.ResizePool"); + scope.Start(); + try + { + using HttpMessage message = CreateResizePoolRequest(poolId, content, timeOutInSeconds, ocpdate, requestConditions, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Stops an ongoing resize operation on the Pool. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Pool to get. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task StopPoolResizeAsync(string poolId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.StopPoolResize"); + scope.Start(); + try + { + using HttpMessage message = CreateStopPoolResizeRequest(poolId, timeOutInSeconds, ocpdate, requestConditions, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Stops an ongoing resize operation on the Pool. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Pool to get. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response StopPoolResize(string poolId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.StopPoolResize"); + scope.Start(); + try + { + using HttpMessage message = CreateStopPoolResizeRequest(poolId, timeOutInSeconds, ocpdate, requestConditions, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Updates the properties of the specified Pool. + /// The ID of the Pool to update. + /// The options to use for replacing properties on the pool. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + /// This fully replaces all the updatable properties of the Pool. For example, if + /// the Pool has a StartTask associated with it and if StartTask is not specified + /// with this request, then the Batch service will remove the existing StartTask. + /// + /// + public virtual async Task ReplacePoolPropertiesAsync(string poolId, BatchPoolReplaceContent pool, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNull(pool, nameof(pool)); + + using RequestContent content = pool.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await ReplacePoolPropertiesAsync(poolId, content, timeOutInSeconds, ocpdate, context).ConfigureAwait(false); + return response; + } + + /// Updates the properties of the specified Pool. + /// The ID of the Pool to update. + /// The options to use for replacing properties on the pool. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + /// This fully replaces all the updatable properties of the Pool. For example, if + /// the Pool has a StartTask associated with it and if StartTask is not specified + /// with this request, then the Batch service will remove the existing StartTask. + /// + /// + public virtual Response ReplacePoolProperties(string poolId, BatchPoolReplaceContent pool, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNull(pool, nameof(pool)); + + using RequestContent content = pool.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = ReplacePoolProperties(poolId, content, timeOutInSeconds, ocpdate, context); + return response; + } + + /// + /// [Protocol Method] Updates the properties of the specified Pool. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Pool to update. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task ReplacePoolPropertiesAsync(string poolId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.ReplacePoolProperties"); + scope.Start(); + try + { + using HttpMessage message = CreateReplacePoolPropertiesRequest(poolId, content, timeOutInSeconds, ocpdate, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Updates the properties of the specified Pool. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Pool to update. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response ReplacePoolProperties(string poolId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.ReplacePoolProperties"); + scope.Start(); + try + { + using HttpMessage message = CreateReplacePoolPropertiesRequest(poolId, content, timeOutInSeconds, ocpdate, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Removes Compute Nodes from the specified Pool. + /// The ID of the Pool to get. + /// The options to use for removing the node. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + /// This operation can only run when the allocation state of the Pool is steady. + /// When this operation runs, the allocation state changes from steady to resizing. + /// Each request may remove up to 100 nodes. + /// + /// + public virtual async Task RemoveNodesAsync(string poolId, BatchNodeRemoveContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNull(content, nameof(content)); + + using RequestContent content0 = content.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await RemoveNodesAsync(poolId, content0, timeOutInSeconds, ocpdate, requestConditions, context).ConfigureAwait(false); + return response; + } + + /// Removes Compute Nodes from the specified Pool. + /// The ID of the Pool to get. + /// The options to use for removing the node. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + /// This operation can only run when the allocation state of the Pool is steady. + /// When this operation runs, the allocation state changes from steady to resizing. + /// Each request may remove up to 100 nodes. + /// + /// + public virtual Response RemoveNodes(string poolId, BatchNodeRemoveContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNull(content, nameof(content)); + + using RequestContent content0 = content.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = RemoveNodes(poolId, content0, timeOutInSeconds, ocpdate, requestConditions, context); + return response; + } + + /// + /// [Protocol Method] Removes Compute Nodes from the specified Pool. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Pool to get. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task RemoveNodesAsync(string poolId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.RemoveNodes"); + scope.Start(); + try + { + using HttpMessage message = CreateRemoveNodesRequest(poolId, content, timeOutInSeconds, ocpdate, requestConditions, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Removes Compute Nodes from the specified Pool. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Pool to get. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response RemoveNodes(string poolId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.RemoveNodes"); + scope.Start(); + try + { + using HttpMessage message = CreateRemoveNodesRequest(poolId, content, timeOutInSeconds, ocpdate, requestConditions, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Deletes a Job. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Job to delete. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task DeleteJobAsync(string jobId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.DeleteJob"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteJobRequest(jobId, timeOutInSeconds, ocpdate, requestConditions, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Deletes a Job. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Job to delete. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response DeleteJob(string jobId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.DeleteJob"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteJobRequest(jobId, timeOutInSeconds, ocpdate, requestConditions, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets information about the specified Job. + /// The ID of the Job. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// An OData $select clause. + /// An OData $expand clause. + /// The content to send as the request conditions of the request. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetJobAsync(string jobId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, IEnumerable select = null, IEnumerable expand = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetJobAsync(jobId, timeOutInSeconds, ocpdate, select, expand, requestConditions, context).ConfigureAwait(false); + return Response.FromValue(BatchJob.FromResponse(response), response); + } + + /// Gets information about the specified Job. + /// The ID of the Job. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// An OData $select clause. + /// An OData $expand clause. + /// The content to send as the request conditions of the request. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetJob(string jobId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, IEnumerable select = null, IEnumerable expand = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetJob(jobId, timeOutInSeconds, ocpdate, select, expand, requestConditions, context); + return Response.FromValue(BatchJob.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets information about the specified Job. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Job. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// An OData $select clause. + /// An OData $expand clause. + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetJobAsync(string jobId, int? timeOutInSeconds, DateTimeOffset? ocpdate, IEnumerable select, IEnumerable expand, RequestConditions requestConditions, RequestContext context) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.GetJob"); + scope.Start(); + try + { + using HttpMessage message = CreateGetJobRequest(jobId, timeOutInSeconds, ocpdate, select, expand, requestConditions, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets information about the specified Job. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Job. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// An OData $select clause. + /// An OData $expand clause. + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetJob(string jobId, int? timeOutInSeconds, DateTimeOffset? ocpdate, IEnumerable select, IEnumerable expand, RequestConditions requestConditions, RequestContext context) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.GetJob"); + scope.Start(); + try + { + using HttpMessage message = CreateGetJobRequest(jobId, timeOutInSeconds, ocpdate, select, expand, requestConditions, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Updates the properties of the specified Job. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Job whose properties you want to update. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task UpdateJobAsync(string jobId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.UpdateJob"); + scope.Start(); + try + { + using HttpMessage message = CreateUpdateJobRequest(jobId, content, timeOutInSeconds, ocpdate, requestConditions, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Updates the properties of the specified Job. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Job whose properties you want to update. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response UpdateJob(string jobId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.UpdateJob"); + scope.Start(); + try + { + using HttpMessage message = CreateUpdateJobRequest(jobId, content, timeOutInSeconds, ocpdate, requestConditions, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Updates the properties of the specified Job. + /// The ID of the Job whose properties you want to update. + /// A job with updated properties. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + /// This fully replaces all the updatable properties of the Job. For example, if + /// the Job has constraints associated with it and if constraints is not specified + /// with this request, then the Batch service will remove the existing constraints. + /// + /// + public virtual async Task ReplaceJobAsync(string jobId, BatchJob job, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNull(job, nameof(job)); + + using RequestContent content = job.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await ReplaceJobAsync(jobId, content, timeOutInSeconds, ocpdate, requestConditions, context).ConfigureAwait(false); + return response; + } + + /// Updates the properties of the specified Job. + /// The ID of the Job whose properties you want to update. + /// A job with updated properties. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + /// This fully replaces all the updatable properties of the Job. For example, if + /// the Job has constraints associated with it and if constraints is not specified + /// with this request, then the Batch service will remove the existing constraints. + /// + /// + public virtual Response ReplaceJob(string jobId, BatchJob job, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNull(job, nameof(job)); + + using RequestContent content = job.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = ReplaceJob(jobId, content, timeOutInSeconds, ocpdate, requestConditions, context); + return response; + } + + /// + /// [Protocol Method] Updates the properties of the specified Job. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Job whose properties you want to update. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task ReplaceJobAsync(string jobId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.ReplaceJob"); + scope.Start(); + try + { + using HttpMessage message = CreateReplaceJobRequest(jobId, content, timeOutInSeconds, ocpdate, requestConditions, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Updates the properties of the specified Job. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Job whose properties you want to update. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response ReplaceJob(string jobId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.ReplaceJob"); + scope.Start(); + try + { + using HttpMessage message = CreateReplaceJobRequest(jobId, content, timeOutInSeconds, ocpdate, requestConditions, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Disables the specified Job, preventing new Tasks from running. + /// The ID of the Job to disable. + /// The options to use for disabling the Job. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + /// The Batch Service immediately moves the Job to the disabling state. Batch then + /// uses the disableTasks parameter to determine what to do with the currently + /// running Tasks of the Job. The Job remains in the disabling state until the + /// disable operation is completed and all Tasks have been dealt with according to + /// the disableTasks option; the Job then moves to the disabled state. No new Tasks + /// are started under the Job until it moves back to active state. If you try to + /// disable a Job that is in any state other than active, disabling, or disabled, + /// the request fails with status code 409. + /// + /// + public virtual async Task DisableJobAsync(string jobId, BatchJobDisableContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNull(content, nameof(content)); + + using RequestContent content0 = content.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await DisableJobAsync(jobId, content0, timeOutInSeconds, ocpdate, requestConditions, context).ConfigureAwait(false); + return response; + } + + /// Disables the specified Job, preventing new Tasks from running. + /// The ID of the Job to disable. + /// The options to use for disabling the Job. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + /// The Batch Service immediately moves the Job to the disabling state. Batch then + /// uses the disableTasks parameter to determine what to do with the currently + /// running Tasks of the Job. The Job remains in the disabling state until the + /// disable operation is completed and all Tasks have been dealt with according to + /// the disableTasks option; the Job then moves to the disabled state. No new Tasks + /// are started under the Job until it moves back to active state. If you try to + /// disable a Job that is in any state other than active, disabling, or disabled, + /// the request fails with status code 409. + /// + /// + public virtual Response DisableJob(string jobId, BatchJobDisableContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNull(content, nameof(content)); + + using RequestContent content0 = content.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = DisableJob(jobId, content0, timeOutInSeconds, ocpdate, requestConditions, context); + return response; + } + + /// + /// [Protocol Method] Disables the specified Job, preventing new Tasks from running. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Job to disable. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task DisableJobAsync(string jobId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.DisableJob"); + scope.Start(); + try + { + using HttpMessage message = CreateDisableJobRequest(jobId, content, timeOutInSeconds, ocpdate, requestConditions, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Disables the specified Job, preventing new Tasks from running. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Job to disable. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response DisableJob(string jobId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.DisableJob"); + scope.Start(); + try + { + using HttpMessage message = CreateDisableJobRequest(jobId, content, timeOutInSeconds, ocpdate, requestConditions, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Enables the specified Job, allowing new Tasks to run. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Job to enable. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task EnableJobAsync(string jobId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.EnableJob"); + scope.Start(); + try + { + using HttpMessage message = CreateEnableJobRequest(jobId, timeOutInSeconds, ocpdate, requestConditions, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Enables the specified Job, allowing new Tasks to run. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Job to enable. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response EnableJob(string jobId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.EnableJob"); + scope.Start(); + try + { + using HttpMessage message = CreateEnableJobRequest(jobId, timeOutInSeconds, ocpdate, requestConditions, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Terminates the specified Job, marking it as completed. + /// The ID of the Job to terminate. + /// The options to use for terminating the Job. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + /// When a Terminate Job request is received, the Batch service sets the Job to the + /// terminating state. The Batch service then terminates any running Tasks + /// associated with the Job and runs any required Job release Tasks. Then the Job + /// moves into the completed state. If there are any Tasks in the Job in the active + /// state, they will remain in the active state. Once a Job is terminated, new + /// Tasks cannot be added and any remaining active Tasks will not be scheduled. + /// + /// + public virtual async Task TerminateJobAsync(string jobId, BatchJobTerminateContent parameters = null, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using RequestContent content = parameters?.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await TerminateJobAsync(jobId, content, timeOutInSeconds, ocpdate, requestConditions, context).ConfigureAwait(false); + return response; + } + + /// Terminates the specified Job, marking it as completed. + /// The ID of the Job to terminate. + /// The options to use for terminating the Job. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + /// When a Terminate Job request is received, the Batch service sets the Job to the + /// terminating state. The Batch service then terminates any running Tasks + /// associated with the Job and runs any required Job release Tasks. Then the Job + /// moves into the completed state. If there are any Tasks in the Job in the active + /// state, they will remain in the active state. Once a Job is terminated, new + /// Tasks cannot be added and any remaining active Tasks will not be scheduled. + /// + /// + public virtual Response TerminateJob(string jobId, BatchJobTerminateContent parameters = null, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using RequestContent content = parameters?.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = TerminateJob(jobId, content, timeOutInSeconds, ocpdate, requestConditions, context); + return response; + } + + /// + /// [Protocol Method] Terminates the specified Job, marking it as completed. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Job to terminate. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task TerminateJobAsync(string jobId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.TerminateJob"); + scope.Start(); + try + { + using HttpMessage message = CreateTerminateJobRequest(jobId, content, timeOutInSeconds, ocpdate, requestConditions, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Terminates the specified Job, marking it as completed. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Job to terminate. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response TerminateJob(string jobId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.TerminateJob"); + scope.Start(); + try + { + using HttpMessage message = CreateTerminateJobRequest(jobId, content, timeOutInSeconds, ocpdate, requestConditions, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Creates a Job to the specified Account. + /// The Job to be created. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// is null. + /// + /// The Batch service supports two ways to control the work done as part of a Job. + /// In the first approach, the user specifies a Job Manager Task. The Batch service + /// launches this Task when it is ready to start the Job. The Job Manager Task + /// controls all other Tasks that run under this Job, by using the Task APIs. In + /// the second approach, the user directly controls the execution of Tasks under an + /// active Job, by using the Task APIs. Also note: when naming Jobs, avoid + /// including sensitive information such as user names or secret project names. + /// This information may appear in telemetry logs accessible to Microsoft Support + /// engineers. + /// + /// + public virtual async Task CreateJobAsync(BatchJobCreateContent job, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(job, nameof(job)); + + using RequestContent content = job.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await CreateJobAsync(content, timeOutInSeconds, ocpdate, context).ConfigureAwait(false); + return response; + } + + /// Creates a Job to the specified Account. + /// The Job to be created. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// is null. + /// + /// The Batch service supports two ways to control the work done as part of a Job. + /// In the first approach, the user specifies a Job Manager Task. The Batch service + /// launches this Task when it is ready to start the Job. The Job Manager Task + /// controls all other Tasks that run under this Job, by using the Task APIs. In + /// the second approach, the user directly controls the execution of Tasks under an + /// active Job, by using the Task APIs. Also note: when naming Jobs, avoid + /// including sensitive information such as user names or secret project names. + /// This information may appear in telemetry logs accessible to Microsoft Support + /// engineers. + /// + /// + public virtual Response CreateJob(BatchJobCreateContent job, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(job, nameof(job)); + + using RequestContent content = job.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = CreateJob(content, timeOutInSeconds, ocpdate, context); + return response; + } + + /// + /// [Protocol Method] Creates a Job to the specified Account. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task CreateJobAsync(RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.CreateJob"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateJobRequest(content, timeOutInSeconds, ocpdate, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Creates a Job to the specified Account. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response CreateJob(RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.CreateJob"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateJobRequest(content, timeOutInSeconds, ocpdate, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the Task counts for the specified Job. + /// The ID of the Job. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + /// Task counts provide a count of the Tasks by active, running or completed Task + /// state, and a count of Tasks which succeeded or failed. Tasks in the preparing + /// state are counted as running. Note that the numbers returned may not always be + /// up to date. If you need exact task counts, use a list query. + /// + /// + public virtual async Task> GetJobTaskCountsAsync(string jobId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetJobTaskCountsAsync(jobId, timeOutInSeconds, ocpdate, context).ConfigureAwait(false); + return Response.FromValue(BatchTaskCountsResult.FromResponse(response), response); + } + + /// Gets the Task counts for the specified Job. + /// The ID of the Job. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + /// Task counts provide a count of the Tasks by active, running or completed Task + /// state, and a count of Tasks which succeeded or failed. Tasks in the preparing + /// state are counted as running. Note that the numbers returned may not always be + /// up to date. If you need exact task counts, use a list query. + /// + /// + public virtual Response GetJobTaskCounts(string jobId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetJobTaskCounts(jobId, timeOutInSeconds, ocpdate, context); + return Response.FromValue(BatchTaskCountsResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the Task counts for the specified Job. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Job. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetJobTaskCountsAsync(string jobId, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestContext context) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.GetJobTaskCounts"); + scope.Start(); + try + { + using HttpMessage message = CreateGetJobTaskCountsRequest(jobId, timeOutInSeconds, ocpdate, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the Task counts for the specified Job. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Job. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetJobTaskCounts(string jobId, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestContext context) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.GetJobTaskCounts"); + scope.Start(); + try + { + using HttpMessage message = CreateGetJobTaskCountsRequest(jobId, timeOutInSeconds, ocpdate, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Deletes a Job Schedule from the specified Account. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Job Schedule to delete. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task DeleteJobScheduleAsync(string jobScheduleId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobScheduleId, nameof(jobScheduleId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.DeleteJobSchedule"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteJobScheduleRequest(jobScheduleId, timeOutInSeconds, ocpdate, requestConditions, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Deletes a Job Schedule from the specified Account. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Job Schedule to delete. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response DeleteJobSchedule(string jobScheduleId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobScheduleId, nameof(jobScheduleId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.DeleteJobSchedule"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteJobScheduleRequest(jobScheduleId, timeOutInSeconds, ocpdate, requestConditions, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets information about the specified Job Schedule. + /// The ID of the Job Schedule to get. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// An OData $select clause. + /// An OData $expand clause. + /// The content to send as the request conditions of the request. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetJobScheduleAsync(string jobScheduleId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, IEnumerable select = null, IEnumerable expand = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobScheduleId, nameof(jobScheduleId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetJobScheduleAsync(jobScheduleId, timeOutInSeconds, ocpdate, select, expand, requestConditions, context).ConfigureAwait(false); + return Response.FromValue(BatchJobSchedule.FromResponse(response), response); + } + + /// Gets information about the specified Job Schedule. + /// The ID of the Job Schedule to get. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// An OData $select clause. + /// An OData $expand clause. + /// The content to send as the request conditions of the request. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetJobSchedule(string jobScheduleId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, IEnumerable select = null, IEnumerable expand = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobScheduleId, nameof(jobScheduleId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetJobSchedule(jobScheduleId, timeOutInSeconds, ocpdate, select, expand, requestConditions, context); + return Response.FromValue(BatchJobSchedule.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets information about the specified Job Schedule. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Job Schedule to get. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// An OData $select clause. + /// An OData $expand clause. + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetJobScheduleAsync(string jobScheduleId, int? timeOutInSeconds, DateTimeOffset? ocpdate, IEnumerable select, IEnumerable expand, RequestConditions requestConditions, RequestContext context) + { + Argument.AssertNotNullOrEmpty(jobScheduleId, nameof(jobScheduleId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.GetJobSchedule"); + scope.Start(); + try + { + using HttpMessage message = CreateGetJobScheduleRequest(jobScheduleId, timeOutInSeconds, ocpdate, select, expand, requestConditions, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets information about the specified Job Schedule. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Job Schedule to get. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// An OData $select clause. + /// An OData $expand clause. + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetJobSchedule(string jobScheduleId, int? timeOutInSeconds, DateTimeOffset? ocpdate, IEnumerable select, IEnumerable expand, RequestConditions requestConditions, RequestContext context) + { + Argument.AssertNotNullOrEmpty(jobScheduleId, nameof(jobScheduleId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.GetJobSchedule"); + scope.Start(); + try + { + using HttpMessage message = CreateGetJobScheduleRequest(jobScheduleId, timeOutInSeconds, ocpdate, select, expand, requestConditions, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Updates the properties of the specified Job Schedule. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Job Schedule to update. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task UpdateJobScheduleAsync(string jobScheduleId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobScheduleId, nameof(jobScheduleId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.UpdateJobSchedule"); + scope.Start(); + try + { + using HttpMessage message = CreateUpdateJobScheduleRequest(jobScheduleId, content, timeOutInSeconds, ocpdate, requestConditions, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Updates the properties of the specified Job Schedule. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Job Schedule to update. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response UpdateJobSchedule(string jobScheduleId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobScheduleId, nameof(jobScheduleId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.UpdateJobSchedule"); + scope.Start(); + try + { + using HttpMessage message = CreateUpdateJobScheduleRequest(jobScheduleId, content, timeOutInSeconds, ocpdate, requestConditions, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Updates the properties of the specified Job Schedule. + /// The ID of the Job Schedule to update. + /// A Job Schedule with updated properties. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + /// This fully replaces all the updatable properties of the Job Schedule. For + /// example, if the schedule property is not specified with this request, then the + /// Batch service will remove the existing schedule. Changes to a Job Schedule only + /// impact Jobs created by the schedule after the update has taken place; currently + /// running Jobs are unaffected. + /// + /// + public virtual async Task ReplaceJobScheduleAsync(string jobScheduleId, BatchJobSchedule jobSchedule, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobScheduleId, nameof(jobScheduleId)); + Argument.AssertNotNull(jobSchedule, nameof(jobSchedule)); + + using RequestContent content = jobSchedule.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await ReplaceJobScheduleAsync(jobScheduleId, content, timeOutInSeconds, ocpdate, requestConditions, context).ConfigureAwait(false); + return response; + } + + /// Updates the properties of the specified Job Schedule. + /// The ID of the Job Schedule to update. + /// A Job Schedule with updated properties. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + /// This fully replaces all the updatable properties of the Job Schedule. For + /// example, if the schedule property is not specified with this request, then the + /// Batch service will remove the existing schedule. Changes to a Job Schedule only + /// impact Jobs created by the schedule after the update has taken place; currently + /// running Jobs are unaffected. + /// + /// + public virtual Response ReplaceJobSchedule(string jobScheduleId, BatchJobSchedule jobSchedule, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobScheduleId, nameof(jobScheduleId)); + Argument.AssertNotNull(jobSchedule, nameof(jobSchedule)); + + using RequestContent content = jobSchedule.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = ReplaceJobSchedule(jobScheduleId, content, timeOutInSeconds, ocpdate, requestConditions, context); + return response; + } + + /// + /// [Protocol Method] Updates the properties of the specified Job Schedule. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Job Schedule to update. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task ReplaceJobScheduleAsync(string jobScheduleId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobScheduleId, nameof(jobScheduleId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.ReplaceJobSchedule"); + scope.Start(); + try + { + using HttpMessage message = CreateReplaceJobScheduleRequest(jobScheduleId, content, timeOutInSeconds, ocpdate, requestConditions, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Updates the properties of the specified Job Schedule. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Job Schedule to update. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response ReplaceJobSchedule(string jobScheduleId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobScheduleId, nameof(jobScheduleId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.ReplaceJobSchedule"); + scope.Start(); + try + { + using HttpMessage message = CreateReplaceJobScheduleRequest(jobScheduleId, content, timeOutInSeconds, ocpdate, requestConditions, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Disables a Job Schedule. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Job Schedule to disable. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task DisableJobScheduleAsync(string jobScheduleId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobScheduleId, nameof(jobScheduleId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.DisableJobSchedule"); + scope.Start(); + try + { + using HttpMessage message = CreateDisableJobScheduleRequest(jobScheduleId, timeOutInSeconds, ocpdate, requestConditions, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Disables a Job Schedule. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Job Schedule to disable. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response DisableJobSchedule(string jobScheduleId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobScheduleId, nameof(jobScheduleId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.DisableJobSchedule"); + scope.Start(); + try + { + using HttpMessage message = CreateDisableJobScheduleRequest(jobScheduleId, timeOutInSeconds, ocpdate, requestConditions, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Enables a Job Schedule. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Job Schedule to enable. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task EnableJobScheduleAsync(string jobScheduleId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobScheduleId, nameof(jobScheduleId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.EnableJobSchedule"); + scope.Start(); + try + { + using HttpMessage message = CreateEnableJobScheduleRequest(jobScheduleId, timeOutInSeconds, ocpdate, requestConditions, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Enables a Job Schedule. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Job Schedule to enable. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response EnableJobSchedule(string jobScheduleId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobScheduleId, nameof(jobScheduleId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.EnableJobSchedule"); + scope.Start(); + try + { + using HttpMessage message = CreateEnableJobScheduleRequest(jobScheduleId, timeOutInSeconds, ocpdate, requestConditions, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Terminates a Job Schedule. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Job Schedule to terminates. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task TerminateJobScheduleAsync(string jobScheduleId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobScheduleId, nameof(jobScheduleId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.TerminateJobSchedule"); + scope.Start(); + try + { + using HttpMessage message = CreateTerminateJobScheduleRequest(jobScheduleId, timeOutInSeconds, ocpdate, requestConditions, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Terminates a Job Schedule. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Job Schedule to terminates. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response TerminateJobSchedule(string jobScheduleId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobScheduleId, nameof(jobScheduleId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.TerminateJobSchedule"); + scope.Start(); + try + { + using HttpMessage message = CreateTerminateJobScheduleRequest(jobScheduleId, timeOutInSeconds, ocpdate, requestConditions, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Creates a Job Schedule to the specified Account. + /// The Job Schedule to be created. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// is null. + /// + public virtual async Task CreateJobScheduleAsync(BatchJobScheduleCreateContent jobSchedule, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(jobSchedule, nameof(jobSchedule)); + + using RequestContent content = jobSchedule.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await CreateJobScheduleAsync(content, timeOutInSeconds, ocpdate, context).ConfigureAwait(false); + return response; + } + + /// Creates a Job Schedule to the specified Account. + /// The Job Schedule to be created. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// is null. + /// + public virtual Response CreateJobSchedule(BatchJobScheduleCreateContent jobSchedule, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(jobSchedule, nameof(jobSchedule)); + + using RequestContent content = jobSchedule.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = CreateJobSchedule(content, timeOutInSeconds, ocpdate, context); + return response; + } + + /// + /// [Protocol Method] Creates a Job Schedule to the specified Account. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task CreateJobScheduleAsync(RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.CreateJobSchedule"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateJobScheduleRequest(content, timeOutInSeconds, ocpdate, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Creates a Job Schedule to the specified Account. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response CreateJobSchedule(RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.CreateJobSchedule"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateJobScheduleRequest(content, timeOutInSeconds, ocpdate, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Creates a Task to the specified Job. + /// The ID of the Job to which the Task is to be created. + /// The Task to be created. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + /// The maximum lifetime of a Task from addition to completion is 180 days. If a + /// Task has not completed within 180 days of being added it will be terminated by + /// the Batch service and left in whatever state it was in at that time. + /// + /// + public virtual async Task CreateTaskAsync(string jobId, BatchTaskCreateContent task, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNull(task, nameof(task)); + + using RequestContent content = task.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await CreateTaskAsync(jobId, content, timeOutInSeconds, ocpdate, context).ConfigureAwait(false); + return response; + } + + /// Creates a Task to the specified Job. + /// The ID of the Job to which the Task is to be created. + /// The Task to be created. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + /// The maximum lifetime of a Task from addition to completion is 180 days. If a + /// Task has not completed within 180 days of being added it will be terminated by + /// the Batch service and left in whatever state it was in at that time. + /// + /// + public virtual Response CreateTask(string jobId, BatchTaskCreateContent task, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNull(task, nameof(task)); + + using RequestContent content = task.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = CreateTask(jobId, content, timeOutInSeconds, ocpdate, context); + return response; + } + + /// + /// [Protocol Method] Creates a Task to the specified Job. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Job to which the Task is to be created. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task CreateTaskAsync(string jobId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.CreateTask"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateTaskRequest(jobId, content, timeOutInSeconds, ocpdate, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Creates a Task to the specified Job. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Job to which the Task is to be created. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response CreateTask(string jobId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.CreateTask"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateTaskRequest(jobId, content, timeOutInSeconds, ocpdate, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Adds a collection of Tasks to the specified Job. + /// The ID of the Job to which the Task collection is to be added. + /// The Tasks to be added. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + /// Note that each Task must have a unique ID. The Batch service may not return the + /// results for each Task in the same order the Tasks were submitted in this + /// request. If the server times out or the connection is closed during the + /// request, the request may have been partially or fully processed, or not at all. + /// In such cases, the user should re-issue the request. Note that it is up to the + /// user to correctly handle failures when re-issuing a request. For example, you + /// should use the same Task IDs during a retry so that if the prior operation + /// succeeded, the retry will not create extra Tasks unexpectedly. If the response + /// contains any Tasks which failed to add, a client can retry the request. In a + /// retry, it is most efficient to resubmit only Tasks that failed to add, and to + /// omit Tasks that were successfully added on the first attempt. The maximum + /// lifetime of a Task from addition to completion is 180 days. If a Task has not + /// completed within 180 days of being added it will be terminated by the Batch + /// service and left in whatever state it was in at that time. + /// + /// + public virtual async Task> CreateTaskCollectionAsync(string jobId, BatchTaskGroup taskCollection, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNull(taskCollection, nameof(taskCollection)); + + using RequestContent content = taskCollection.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await CreateTaskCollectionAsync(jobId, content, timeOutInSeconds, ocpdate, context).ConfigureAwait(false); + return Response.FromValue(BatchTaskAddCollectionResult.FromResponse(response), response); + } + + /// Adds a collection of Tasks to the specified Job. + /// The ID of the Job to which the Task collection is to be added. + /// The Tasks to be added. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + /// Note that each Task must have a unique ID. The Batch service may not return the + /// results for each Task in the same order the Tasks were submitted in this + /// request. If the server times out or the connection is closed during the + /// request, the request may have been partially or fully processed, or not at all. + /// In such cases, the user should re-issue the request. Note that it is up to the + /// user to correctly handle failures when re-issuing a request. For example, you + /// should use the same Task IDs during a retry so that if the prior operation + /// succeeded, the retry will not create extra Tasks unexpectedly. If the response + /// contains any Tasks which failed to add, a client can retry the request. In a + /// retry, it is most efficient to resubmit only Tasks that failed to add, and to + /// omit Tasks that were successfully added on the first attempt. The maximum + /// lifetime of a Task from addition to completion is 180 days. If a Task has not + /// completed within 180 days of being added it will be terminated by the Batch + /// service and left in whatever state it was in at that time. + /// + /// + public virtual Response CreateTaskCollection(string jobId, BatchTaskGroup taskCollection, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNull(taskCollection, nameof(taskCollection)); + + using RequestContent content = taskCollection.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = CreateTaskCollection(jobId, content, timeOutInSeconds, ocpdate, context); + return Response.FromValue(BatchTaskAddCollectionResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Adds a collection of Tasks to the specified Job. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Job to which the Task collection is to be added. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task CreateTaskCollectionAsync(string jobId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.CreateTaskCollection"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateTaskCollectionRequest(jobId, content, timeOutInSeconds, ocpdate, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Adds a collection of Tasks to the specified Job. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Job to which the Task collection is to be added. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response CreateTaskCollection(string jobId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.CreateTaskCollection"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateTaskCollectionRequest(jobId, content, timeOutInSeconds, ocpdate, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Deletes a Task from the specified Job. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Job from which to delete the Task. + /// The ID of the Task to delete. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task DeleteTaskAsync(string jobId, string taskId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.DeleteTask"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteTaskRequest(jobId, taskId, timeOutInSeconds, ocpdate, requestConditions, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Deletes a Task from the specified Job. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Job from which to delete the Task. + /// The ID of the Task to delete. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response DeleteTask(string jobId, string taskId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.DeleteTask"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteTaskRequest(jobId, taskId, timeOutInSeconds, ocpdate, requestConditions, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets information about the specified Task. + /// The ID of the Job that contains the Task. + /// The ID of the Task to get information about. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// An OData $select clause. + /// An OData $expand clause. + /// The content to send as the request conditions of the request. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + /// For multi-instance Tasks, information such as affinityId, executionInfo and + /// nodeInfo refer to the primary Task. Use the list subtasks API to retrieve + /// information about subtasks. + /// + /// + public virtual async Task> GetTaskAsync(string jobId, string taskId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, IEnumerable select = null, IEnumerable expand = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetTaskAsync(jobId, taskId, timeOutInSeconds, ocpdate, select, expand, requestConditions, context).ConfigureAwait(false); + return Response.FromValue(BatchTask.FromResponse(response), response); + } + + /// Gets information about the specified Task. + /// The ID of the Job that contains the Task. + /// The ID of the Task to get information about. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// An OData $select clause. + /// An OData $expand clause. + /// The content to send as the request conditions of the request. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + /// For multi-instance Tasks, information such as affinityId, executionInfo and + /// nodeInfo refer to the primary Task. Use the list subtasks API to retrieve + /// information about subtasks. + /// + /// + public virtual Response GetTask(string jobId, string taskId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, IEnumerable select = null, IEnumerable expand = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetTask(jobId, taskId, timeOutInSeconds, ocpdate, select, expand, requestConditions, context); + return Response.FromValue(BatchTask.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets information about the specified Task. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Job that contains the Task. + /// The ID of the Task to get information about. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// An OData $select clause. + /// An OData $expand clause. + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetTaskAsync(string jobId, string taskId, int? timeOutInSeconds, DateTimeOffset? ocpdate, IEnumerable select, IEnumerable expand, RequestConditions requestConditions, RequestContext context) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.GetTask"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTaskRequest(jobId, taskId, timeOutInSeconds, ocpdate, select, expand, requestConditions, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets information about the specified Task. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Job that contains the Task. + /// The ID of the Task to get information about. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// An OData $select clause. + /// An OData $expand clause. + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetTask(string jobId, string taskId, int? timeOutInSeconds, DateTimeOffset? ocpdate, IEnumerable select, IEnumerable expand, RequestConditions requestConditions, RequestContext context) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.GetTask"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTaskRequest(jobId, taskId, timeOutInSeconds, ocpdate, select, expand, requestConditions, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Updates the properties of the specified Task. + /// The ID of the Job containing the Task. + /// The ID of the Task to update. + /// The Task to update. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task ReplaceTaskAsync(string jobId, string taskId, BatchTask task, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + Argument.AssertNotNull(task, nameof(task)); + + using RequestContent content = task.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await ReplaceTaskAsync(jobId, taskId, content, timeOutInSeconds, ocpdate, requestConditions, context).ConfigureAwait(false); + return response; + } + + /// Updates the properties of the specified Task. + /// The ID of the Job containing the Task. + /// The ID of the Task to update. + /// The Task to update. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response ReplaceTask(string jobId, string taskId, BatchTask task, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + Argument.AssertNotNull(task, nameof(task)); + + using RequestContent content = task.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = ReplaceTask(jobId, taskId, content, timeOutInSeconds, ocpdate, requestConditions, context); + return response; + } + + /// + /// [Protocol Method] Updates the properties of the specified Task. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Job containing the Task. + /// The ID of the Task to update. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task ReplaceTaskAsync(string jobId, string taskId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.ReplaceTask"); + scope.Start(); + try + { + using HttpMessage message = CreateReplaceTaskRequest(jobId, taskId, content, timeOutInSeconds, ocpdate, requestConditions, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Updates the properties of the specified Task. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Job containing the Task. + /// The ID of the Task to update. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response ReplaceTask(string jobId, string taskId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.ReplaceTask"); + scope.Start(); + try + { + using HttpMessage message = CreateReplaceTaskRequest(jobId, taskId, content, timeOutInSeconds, ocpdate, requestConditions, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Terminates the specified Task. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Job containing the Task. + /// The ID of the Task to terminate. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task TerminateTaskAsync(string jobId, string taskId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.TerminateTask"); + scope.Start(); + try + { + using HttpMessage message = CreateTerminateTaskRequest(jobId, taskId, timeOutInSeconds, ocpdate, requestConditions, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Terminates the specified Task. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Job containing the Task. + /// The ID of the Task to terminate. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response TerminateTask(string jobId, string taskId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.TerminateTask"); + scope.Start(); + try + { + using HttpMessage message = CreateTerminateTaskRequest(jobId, taskId, timeOutInSeconds, ocpdate, requestConditions, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Reactivates a Task, allowing it to run again even if its retry count has been + /// exhausted. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Job containing the Task. + /// The ID of the Task to reactivate. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task ReactivateTaskAsync(string jobId, string taskId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.ReactivateTask"); + scope.Start(); + try + { + using HttpMessage message = CreateReactivateTaskRequest(jobId, taskId, timeOutInSeconds, ocpdate, requestConditions, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Reactivates a Task, allowing it to run again even if its retry count has been + /// exhausted. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Job containing the Task. + /// The ID of the Task to reactivate. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response ReactivateTask(string jobId, string taskId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.ReactivateTask"); + scope.Start(); + try + { + using HttpMessage message = CreateReactivateTaskRequest(jobId, taskId, timeOutInSeconds, ocpdate, requestConditions, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Deletes the specified Task file from the Compute Node where the Task ran. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Job that contains the Task. + /// The ID of the Task whose file you want to retrieve. + /// The path to the Task file that you want to get the content of. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// Whether to delete children of a directory. If the filePath parameter represents + /// a directory instead of a file, you can set recursive to true to delete the + /// directory and all of the files and subdirectories in it. If recursive is false + /// then the directory must be empty or deletion will fail. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task DeleteTaskFileAsync(string jobId, string taskId, string filePath, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, bool? recursive = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + Argument.AssertNotNullOrEmpty(filePath, nameof(filePath)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.DeleteTaskFile"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteTaskFileRequest(jobId, taskId, filePath, timeOutInSeconds, ocpdate, recursive, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Deletes the specified Task file from the Compute Node where the Task ran. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Job that contains the Task. + /// The ID of the Task whose file you want to retrieve. + /// The path to the Task file that you want to get the content of. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// Whether to delete children of a directory. If the filePath parameter represents + /// a directory instead of a file, you can set recursive to true to delete the + /// directory and all of the files and subdirectories in it. If recursive is false + /// then the directory must be empty or deletion will fail. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response DeleteTaskFile(string jobId, string taskId, string filePath, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, bool? recursive = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + Argument.AssertNotNullOrEmpty(filePath, nameof(filePath)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.DeleteTaskFile"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteTaskFileRequest(jobId, taskId, filePath, timeOutInSeconds, ocpdate, recursive, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Returns the content of the specified Task file. + /// The ID of the Job that contains the Task. + /// The ID of the Task whose file you want to retrieve. + /// The path to the Task file that you want to get the content of. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The byte range to be retrieved. The default is to retrieve the entire file. The + /// format is bytes=startRange-endRange. + /// + /// The content to send as the request conditions of the request. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetTaskFileAsync(string jobId, string taskId, string filePath, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, string ocpRange = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + Argument.AssertNotNullOrEmpty(filePath, nameof(filePath)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetTaskFileAsync(jobId, taskId, filePath, timeOutInSeconds, ocpdate, ocpRange, requestConditions, context).ConfigureAwait(false); + return Response.FromValue(response.Content, response); + } + + /// Returns the content of the specified Task file. + /// The ID of the Job that contains the Task. + /// The ID of the Task whose file you want to retrieve. + /// The path to the Task file that you want to get the content of. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The byte range to be retrieved. The default is to retrieve the entire file. The + /// format is bytes=startRange-endRange. + /// + /// The content to send as the request conditions of the request. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetTaskFile(string jobId, string taskId, string filePath, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, string ocpRange = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + Argument.AssertNotNullOrEmpty(filePath, nameof(filePath)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetTaskFile(jobId, taskId, filePath, timeOutInSeconds, ocpdate, ocpRange, requestConditions, context); + return Response.FromValue(response.Content, response); + } + + /// + /// [Protocol Method] Returns the content of the specified Task file. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Job that contains the Task. + /// The ID of the Task whose file you want to retrieve. + /// The path to the Task file that you want to get the content of. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The byte range to be retrieved. The default is to retrieve the entire file. The + /// format is bytes=startRange-endRange. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetTaskFileAsync(string jobId, string taskId, string filePath, int? timeOutInSeconds, DateTimeOffset? ocpdate, string ocpRange, RequestConditions requestConditions, RequestContext context) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + Argument.AssertNotNullOrEmpty(filePath, nameof(filePath)); + + if (requestConditions?.IfMatch is not null) + { + throw new ArgumentNullException(nameof(requestConditions), "Service does not support the If-Match header for this operation."); + } + if (requestConditions?.IfNoneMatch is not null) + { + throw new ArgumentNullException(nameof(requestConditions), "Service does not support the If-None-Match header for this operation."); + } + + using var scope = ClientDiagnostics.CreateScope("BatchClient.GetTaskFile"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTaskFileRequest(jobId, taskId, filePath, timeOutInSeconds, ocpdate, ocpRange, requestConditions, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Returns the content of the specified Task file. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Job that contains the Task. + /// The ID of the Task whose file you want to retrieve. + /// The path to the Task file that you want to get the content of. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The byte range to be retrieved. The default is to retrieve the entire file. The + /// format is bytes=startRange-endRange. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetTaskFile(string jobId, string taskId, string filePath, int? timeOutInSeconds, DateTimeOffset? ocpdate, string ocpRange, RequestConditions requestConditions, RequestContext context) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + Argument.AssertNotNullOrEmpty(filePath, nameof(filePath)); + + if (requestConditions?.IfMatch is not null) + { + throw new ArgumentNullException(nameof(requestConditions), "Service does not support the If-Match header for this operation."); + } + if (requestConditions?.IfNoneMatch is not null) + { + throw new ArgumentNullException(nameof(requestConditions), "Service does not support the If-None-Match header for this operation."); + } + + using var scope = ClientDiagnostics.CreateScope("BatchClient.GetTaskFile"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTaskFileRequest(jobId, taskId, filePath, timeOutInSeconds, ocpdate, ocpRange, requestConditions, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Gets the properties of the specified Task file. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Job that contains the Task. + /// The ID of the Task whose file you want to retrieve. + /// The path to the Task file that you want to get the content of. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual async Task GetTaskFilePropertiesInternalAsync(string jobId, string taskId, string filePath, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + Argument.AssertNotNullOrEmpty(filePath, nameof(filePath)); + + if (requestConditions?.IfMatch is not null) + { + throw new ArgumentNullException(nameof(requestConditions), "Service does not support the If-Match header for this operation."); + } + if (requestConditions?.IfNoneMatch is not null) + { + throw new ArgumentNullException(nameof(requestConditions), "Service does not support the If-None-Match header for this operation."); + } + + using var scope = ClientDiagnostics.CreateScope("BatchClient.GetTaskFilePropertiesInternal"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTaskFilePropertiesInternalRequest(jobId, taskId, filePath, timeOutInSeconds, ocpdate, requestConditions, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Gets the properties of the specified Task file. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Job that contains the Task. + /// The ID of the Task whose file you want to retrieve. + /// The path to the Task file that you want to get the content of. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual Response GetTaskFilePropertiesInternal(string jobId, string taskId, string filePath, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + Argument.AssertNotNullOrEmpty(filePath, nameof(filePath)); + + if (requestConditions?.IfMatch is not null) + { + throw new ArgumentNullException(nameof(requestConditions), "Service does not support the If-Match header for this operation."); + } + if (requestConditions?.IfNoneMatch is not null) + { + throw new ArgumentNullException(nameof(requestConditions), "Service does not support the If-None-Match header for this operation."); + } + + using var scope = ClientDiagnostics.CreateScope("BatchClient.GetTaskFilePropertiesInternal"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTaskFilePropertiesInternalRequest(jobId, taskId, filePath, timeOutInSeconds, ocpdate, requestConditions, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Adds a user Account to the specified Compute Node. + /// The ID of the Pool that contains the Compute Node. + /// The ID of the machine on which you want to create a user Account. + /// The options to use for creating the user. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + /// You can add a user Account to a Compute Node only when it is in the idle or + /// running state. + /// + /// + public virtual async Task CreateNodeUserAsync(string poolId, string nodeId, BatchNodeUserCreateContent user, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + Argument.AssertNotNull(user, nameof(user)); + + using RequestContent content = user.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await CreateNodeUserAsync(poolId, nodeId, content, timeOutInSeconds, ocpdate, context).ConfigureAwait(false); + return response; + } + + /// Adds a user Account to the specified Compute Node. + /// The ID of the Pool that contains the Compute Node. + /// The ID of the machine on which you want to create a user Account. + /// The options to use for creating the user. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + /// You can add a user Account to a Compute Node only when it is in the idle or + /// running state. + /// + /// + public virtual Response CreateNodeUser(string poolId, string nodeId, BatchNodeUserCreateContent user, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + Argument.AssertNotNull(user, nameof(user)); + + using RequestContent content = user.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = CreateNodeUser(poolId, nodeId, content, timeOutInSeconds, ocpdate, context); + return response; + } + + /// + /// [Protocol Method] Adds a user Account to the specified Compute Node. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Pool that contains the Compute Node. + /// The ID of the machine on which you want to create a user Account. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task CreateNodeUserAsync(string poolId, string nodeId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.CreateNodeUser"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateNodeUserRequest(poolId, nodeId, content, timeOutInSeconds, ocpdate, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Adds a user Account to the specified Compute Node. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Pool that contains the Compute Node. + /// The ID of the machine on which you want to create a user Account. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response CreateNodeUser(string poolId, string nodeId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.CreateNodeUser"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateNodeUserRequest(poolId, nodeId, content, timeOutInSeconds, ocpdate, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Deletes a user Account from the specified Compute Node. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Pool that contains the Compute Node. + /// The ID of the machine on which you want to delete a user Account. + /// The name of the user Account to delete. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task DeleteNodeUserAsync(string poolId, string nodeId, string userName, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + Argument.AssertNotNullOrEmpty(userName, nameof(userName)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.DeleteNodeUser"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteNodeUserRequest(poolId, nodeId, userName, timeOutInSeconds, ocpdate, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Deletes a user Account from the specified Compute Node. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Pool that contains the Compute Node. + /// The ID of the machine on which you want to delete a user Account. + /// The name of the user Account to delete. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response DeleteNodeUser(string poolId, string nodeId, string userName, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + Argument.AssertNotNullOrEmpty(userName, nameof(userName)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.DeleteNodeUser"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteNodeUserRequest(poolId, nodeId, userName, timeOutInSeconds, ocpdate, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Updates the password and expiration time of a user Account on the specified Compute Node. + /// The ID of the Pool that contains the Compute Node. + /// The ID of the machine on which you want to update a user Account. + /// The name of the user Account to update. + /// The options to use for updating the user. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + /// This operation replaces of all the updatable properties of the Account. For + /// example, if the expiryTime element is not specified, the current value is + /// replaced with the default value, not left unmodified. You can update a user + /// Account on a Compute Node only when it is in the idle or running state. + /// + /// + public virtual async Task ReplaceNodeUserAsync(string poolId, string nodeId, string userName, BatchNodeUserUpdateContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + Argument.AssertNotNullOrEmpty(userName, nameof(userName)); + Argument.AssertNotNull(content, nameof(content)); + + using RequestContent content0 = content.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await ReplaceNodeUserAsync(poolId, nodeId, userName, content0, timeOutInSeconds, ocpdate, context).ConfigureAwait(false); + return response; + } + + /// Updates the password and expiration time of a user Account on the specified Compute Node. + /// The ID of the Pool that contains the Compute Node. + /// The ID of the machine on which you want to update a user Account. + /// The name of the user Account to update. + /// The options to use for updating the user. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + /// This operation replaces of all the updatable properties of the Account. For + /// example, if the expiryTime element is not specified, the current value is + /// replaced with the default value, not left unmodified. You can update a user + /// Account on a Compute Node only when it is in the idle or running state. + /// + /// + public virtual Response ReplaceNodeUser(string poolId, string nodeId, string userName, BatchNodeUserUpdateContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + Argument.AssertNotNullOrEmpty(userName, nameof(userName)); + Argument.AssertNotNull(content, nameof(content)); + + using RequestContent content0 = content.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = ReplaceNodeUser(poolId, nodeId, userName, content0, timeOutInSeconds, ocpdate, context); + return response; + } + + /// + /// [Protocol Method] Updates the password and expiration time of a user Account on the specified Compute Node. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Pool that contains the Compute Node. + /// The ID of the machine on which you want to update a user Account. + /// The name of the user Account to update. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task ReplaceNodeUserAsync(string poolId, string nodeId, string userName, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + Argument.AssertNotNullOrEmpty(userName, nameof(userName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.ReplaceNodeUser"); + scope.Start(); + try + { + using HttpMessage message = CreateReplaceNodeUserRequest(poolId, nodeId, userName, content, timeOutInSeconds, ocpdate, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Updates the password and expiration time of a user Account on the specified Compute Node. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Pool that contains the Compute Node. + /// The ID of the machine on which you want to update a user Account. + /// The name of the user Account to update. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response ReplaceNodeUser(string poolId, string nodeId, string userName, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + Argument.AssertNotNullOrEmpty(userName, nameof(userName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.ReplaceNodeUser"); + scope.Start(); + try + { + using HttpMessage message = CreateReplaceNodeUserRequest(poolId, nodeId, userName, content, timeOutInSeconds, ocpdate, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets information about the specified Compute Node. + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node that you want to get information about. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// An OData $select clause. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetNodeAsync(string poolId, string nodeId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, IEnumerable select = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetNodeAsync(poolId, nodeId, timeOutInSeconds, ocpdate, select, context).ConfigureAwait(false); + return Response.FromValue(BatchNode.FromResponse(response), response); + } + + /// Gets information about the specified Compute Node. + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node that you want to get information about. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// An OData $select clause. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetNode(string poolId, string nodeId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, IEnumerable select = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetNode(poolId, nodeId, timeOutInSeconds, ocpdate, select, context); + return Response.FromValue(BatchNode.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets information about the specified Compute Node. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node that you want to get information about. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// An OData $select clause. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetNodeAsync(string poolId, string nodeId, int? timeOutInSeconds, DateTimeOffset? ocpdate, IEnumerable select, RequestContext context) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.GetNode"); + scope.Start(); + try + { + using HttpMessage message = CreateGetNodeRequest(poolId, nodeId, timeOutInSeconds, ocpdate, select, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets information about the specified Compute Node. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node that you want to get information about. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// An OData $select clause. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetNode(string poolId, string nodeId, int? timeOutInSeconds, DateTimeOffset? ocpdate, IEnumerable select, RequestContext context) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.GetNode"); + scope.Start(); + try + { + using HttpMessage message = CreateGetNodeRequest(poolId, nodeId, timeOutInSeconds, ocpdate, select, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Restarts the specified Compute Node. + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node that you want to restart. + /// The options to use for rebooting the Compute Node. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// You can restart a Compute Node only if it is in an idle or running state. + /// + public virtual async Task RebootNodeAsync(string poolId, string nodeId, BatchNodeRebootContent parameters = null, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + + using RequestContent content = parameters?.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await RebootNodeAsync(poolId, nodeId, content, timeOutInSeconds, ocpdate, context).ConfigureAwait(false); + return response; + } + + /// Restarts the specified Compute Node. + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node that you want to restart. + /// The options to use for rebooting the Compute Node. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// You can restart a Compute Node only if it is in an idle or running state. + /// + public virtual Response RebootNode(string poolId, string nodeId, BatchNodeRebootContent parameters = null, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + + using RequestContent content = parameters?.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = RebootNode(poolId, nodeId, content, timeOutInSeconds, ocpdate, context); + return response; + } + + /// + /// [Protocol Method] Restarts the specified Compute Node. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node that you want to restart. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task RebootNodeAsync(string poolId, string nodeId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.RebootNode"); + scope.Start(); + try + { + using HttpMessage message = CreateRebootNodeRequest(poolId, nodeId, content, timeOutInSeconds, ocpdate, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Restarts the specified Compute Node. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node that you want to restart. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response RebootNode(string poolId, string nodeId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.RebootNode"); + scope.Start(); + try + { + using HttpMessage message = CreateRebootNodeRequest(poolId, nodeId, content, timeOutInSeconds, ocpdate, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Disables Task scheduling on the specified Compute Node. + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node on which you want to disable Task scheduling. + /// The options to use for disabling scheduling on the Compute Node. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + /// You can disable Task scheduling on a Compute Node only if its current + /// scheduling state is enabled. + /// + /// + public virtual async Task DisableNodeSchedulingAsync(string poolId, string nodeId, BatchNodeDisableSchedulingContent parameters = null, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + + using RequestContent content = parameters?.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await DisableNodeSchedulingAsync(poolId, nodeId, content, timeOutInSeconds, ocpdate, context).ConfigureAwait(false); + return response; + } + + /// Disables Task scheduling on the specified Compute Node. + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node on which you want to disable Task scheduling. + /// The options to use for disabling scheduling on the Compute Node. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + /// You can disable Task scheduling on a Compute Node only if its current + /// scheduling state is enabled. + /// + /// + public virtual Response DisableNodeScheduling(string poolId, string nodeId, BatchNodeDisableSchedulingContent parameters = null, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + + using RequestContent content = parameters?.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = DisableNodeScheduling(poolId, nodeId, content, timeOutInSeconds, ocpdate, context); + return response; + } + + /// + /// [Protocol Method] Disables Task scheduling on the specified Compute Node. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node on which you want to disable Task scheduling. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task DisableNodeSchedulingAsync(string poolId, string nodeId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.DisableNodeScheduling"); + scope.Start(); + try + { + using HttpMessage message = CreateDisableNodeSchedulingRequest(poolId, nodeId, content, timeOutInSeconds, ocpdate, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Disables Task scheduling on the specified Compute Node. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node on which you want to disable Task scheduling. + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response DisableNodeScheduling(string poolId, string nodeId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.DisableNodeScheduling"); + scope.Start(); + try + { + using HttpMessage message = CreateDisableNodeSchedulingRequest(poolId, nodeId, content, timeOutInSeconds, ocpdate, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Enables Task scheduling on the specified Compute Node. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node on which you want to enable Task scheduling. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task EnableNodeSchedulingAsync(string poolId, string nodeId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.EnableNodeScheduling"); + scope.Start(); + try + { + using HttpMessage message = CreateEnableNodeSchedulingRequest(poolId, nodeId, timeOutInSeconds, ocpdate, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Enables Task scheduling on the specified Compute Node. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node on which you want to enable Task scheduling. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response EnableNodeScheduling(string poolId, string nodeId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.EnableNodeScheduling"); + scope.Start(); + try + { + using HttpMessage message = CreateEnableNodeSchedulingRequest(poolId, nodeId, timeOutInSeconds, ocpdate, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the settings required for remote login to a Compute Node. + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node for which to obtain the remote login settings. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + /// Before you can remotely login to a Compute Node using the remote login + /// settings, you must create a user Account on the Compute Node. This API can be + /// invoked only on Pools created with the virtual machine configuration property. + /// + /// + public virtual async Task> GetNodeRemoteLoginSettingsAsync(string poolId, string nodeId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetNodeRemoteLoginSettingsAsync(poolId, nodeId, timeOutInSeconds, ocpdate, context).ConfigureAwait(false); + return Response.FromValue(BatchNodeRemoteLoginSettings.FromResponse(response), response); + } + + /// Gets the settings required for remote login to a Compute Node. + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node for which to obtain the remote login settings. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + /// Before you can remotely login to a Compute Node using the remote login + /// settings, you must create a user Account on the Compute Node. This API can be + /// invoked only on Pools created with the virtual machine configuration property. + /// + /// + public virtual Response GetNodeRemoteLoginSettings(string poolId, string nodeId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetNodeRemoteLoginSettings(poolId, nodeId, timeOutInSeconds, ocpdate, context); + return Response.FromValue(BatchNodeRemoteLoginSettings.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the settings required for remote login to a Compute Node. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node for which to obtain the remote login settings. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetNodeRemoteLoginSettingsAsync(string poolId, string nodeId, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestContext context) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.GetNodeRemoteLoginSettings"); + scope.Start(); + try + { + using HttpMessage message = CreateGetNodeRemoteLoginSettingsRequest(poolId, nodeId, timeOutInSeconds, ocpdate, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the settings required for remote login to a Compute Node. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node for which to obtain the remote login settings. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetNodeRemoteLoginSettings(string poolId, string nodeId, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestContext context) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.GetNodeRemoteLoginSettings"); + scope.Start(); + try + { + using HttpMessage message = CreateGetNodeRemoteLoginSettingsRequest(poolId, nodeId, timeOutInSeconds, ocpdate, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Upload Azure Batch service log files from the specified Compute Node to Azure + /// Blob Storage. + /// + /// The ID of the Pool that contains the Compute Node. + /// + /// The ID of the Compute Node for which you want to get the Remote Desktop + /// Protocol file. + /// + /// The Azure Batch service log files upload options. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + /// This is for gathering Azure Batch service log files in an automated fashion + /// from Compute Nodes if you are experiencing an error and wish to escalate to + /// Azure support. The Azure Batch service log files should be shared with Azure + /// support to aid in debugging issues with the Batch service. + /// + /// + public virtual async Task> UploadNodeLogsAsync(string poolId, string nodeId, UploadBatchServiceLogsContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + Argument.AssertNotNull(content, nameof(content)); + + using RequestContent content0 = content.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await UploadNodeLogsAsync(poolId, nodeId, content0, timeOutInSeconds, ocpdate, context).ConfigureAwait(false); + return Response.FromValue(UploadBatchServiceLogsResult.FromResponse(response), response); + } + + /// + /// Upload Azure Batch service log files from the specified Compute Node to Azure + /// Blob Storage. + /// + /// The ID of the Pool that contains the Compute Node. + /// + /// The ID of the Compute Node for which you want to get the Remote Desktop + /// Protocol file. + /// + /// The Azure Batch service log files upload options. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + /// This is for gathering Azure Batch service log files in an automated fashion + /// from Compute Nodes if you are experiencing an error and wish to escalate to + /// Azure support. The Azure Batch service log files should be shared with Azure + /// support to aid in debugging issues with the Batch service. + /// + /// + public virtual Response UploadNodeLogs(string poolId, string nodeId, UploadBatchServiceLogsContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + Argument.AssertNotNull(content, nameof(content)); + + using RequestContent content0 = content.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = UploadNodeLogs(poolId, nodeId, content0, timeOutInSeconds, ocpdate, context); + return Response.FromValue(UploadBatchServiceLogsResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Upload Azure Batch service log files from the specified Compute Node to Azure + /// Blob Storage. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Pool that contains the Compute Node. + /// + /// The ID of the Compute Node for which you want to get the Remote Desktop + /// Protocol file. + /// + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task UploadNodeLogsAsync(string poolId, string nodeId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.UploadNodeLogs"); + scope.Start(); + try + { + using HttpMessage message = CreateUploadNodeLogsRequest(poolId, nodeId, content, timeOutInSeconds, ocpdate, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Upload Azure Batch service log files from the specified Compute Node to Azure + /// Blob Storage. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Pool that contains the Compute Node. + /// + /// The ID of the Compute Node for which you want to get the Remote Desktop + /// Protocol file. + /// + /// The content to send as the body of the request. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response UploadNodeLogs(string poolId, string nodeId, RequestContent content, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.UploadNodeLogs"); + scope.Start(); + try + { + using HttpMessage message = CreateUploadNodeLogsRequest(poolId, nodeId, content, timeOutInSeconds, ocpdate, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets information about the specified Compute Node Extension. + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node that contains the extensions. + /// The name of the Compute Node Extension that you want to get information about. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// An OData $select clause. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetNodeExtensionAsync(string poolId, string nodeId, string extensionName, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, IEnumerable select = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + Argument.AssertNotNullOrEmpty(extensionName, nameof(extensionName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetNodeExtensionAsync(poolId, nodeId, extensionName, timeOutInSeconds, ocpdate, select, context).ConfigureAwait(false); + return Response.FromValue(BatchNodeVMExtension.FromResponse(response), response); + } + + /// Gets information about the specified Compute Node Extension. + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node that contains the extensions. + /// The name of the Compute Node Extension that you want to get information about. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// An OData $select clause. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetNodeExtension(string poolId, string nodeId, string extensionName, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, IEnumerable select = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + Argument.AssertNotNullOrEmpty(extensionName, nameof(extensionName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetNodeExtension(poolId, nodeId, extensionName, timeOutInSeconds, ocpdate, select, context); + return Response.FromValue(BatchNodeVMExtension.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets information about the specified Compute Node Extension. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node that contains the extensions. + /// The name of the Compute Node Extension that you want to get information about. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// An OData $select clause. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetNodeExtensionAsync(string poolId, string nodeId, string extensionName, int? timeOutInSeconds, DateTimeOffset? ocpdate, IEnumerable select, RequestContext context) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + Argument.AssertNotNullOrEmpty(extensionName, nameof(extensionName)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.GetNodeExtension"); + scope.Start(); + try + { + using HttpMessage message = CreateGetNodeExtensionRequest(poolId, nodeId, extensionName, timeOutInSeconds, ocpdate, select, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets information about the specified Compute Node Extension. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node that contains the extensions. + /// The name of the Compute Node Extension that you want to get information about. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// An OData $select clause. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetNodeExtension(string poolId, string nodeId, string extensionName, int? timeOutInSeconds, DateTimeOffset? ocpdate, IEnumerable select, RequestContext context) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + Argument.AssertNotNullOrEmpty(extensionName, nameof(extensionName)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.GetNodeExtension"); + scope.Start(); + try + { + using HttpMessage message = CreateGetNodeExtensionRequest(poolId, nodeId, extensionName, timeOutInSeconds, ocpdate, select, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Deletes the specified file from the Compute Node. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node. + /// The path to the file or directory. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// Whether to delete children of a directory. If the filePath parameter represents + /// a directory instead of a file, you can set recursive to true to delete the + /// directory and all of the files and subdirectories in it. If recursive is false + /// then the directory must be empty or deletion will fail. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task DeleteNodeFileAsync(string poolId, string nodeId, string filePath, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, bool? recursive = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + Argument.AssertNotNullOrEmpty(filePath, nameof(filePath)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.DeleteNodeFile"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteNodeFileRequest(poolId, nodeId, filePath, timeOutInSeconds, ocpdate, recursive, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Deletes the specified file from the Compute Node. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node. + /// The path to the file or directory. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// Whether to delete children of a directory. If the filePath parameter represents + /// a directory instead of a file, you can set recursive to true to delete the + /// directory and all of the files and subdirectories in it. If recursive is false + /// then the directory must be empty or deletion will fail. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response DeleteNodeFile(string poolId, string nodeId, string filePath, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, bool? recursive = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + Argument.AssertNotNullOrEmpty(filePath, nameof(filePath)); + + using var scope = ClientDiagnostics.CreateScope("BatchClient.DeleteNodeFile"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteNodeFileRequest(poolId, nodeId, filePath, timeOutInSeconds, ocpdate, recursive, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Returns the content of the specified Compute Node file. + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node. + /// The path to the file or directory. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The byte range to be retrieved. The default is to retrieve the entire file. The + /// format is bytes=startRange-endRange. + /// + /// The content to send as the request conditions of the request. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetNodeFileAsync(string poolId, string nodeId, string filePath, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, string ocpRange = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + Argument.AssertNotNullOrEmpty(filePath, nameof(filePath)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetNodeFileAsync(poolId, nodeId, filePath, timeOutInSeconds, ocpdate, ocpRange, requestConditions, context).ConfigureAwait(false); + return Response.FromValue(response.Content, response); + } + + /// Returns the content of the specified Compute Node file. + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node. + /// The path to the file or directory. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The byte range to be retrieved. The default is to retrieve the entire file. The + /// format is bytes=startRange-endRange. + /// + /// The content to send as the request conditions of the request. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetNodeFile(string poolId, string nodeId, string filePath, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, string ocpRange = null, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + Argument.AssertNotNullOrEmpty(filePath, nameof(filePath)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetNodeFile(poolId, nodeId, filePath, timeOutInSeconds, ocpdate, ocpRange, requestConditions, context); + return Response.FromValue(response.Content, response); + } + + /// + /// [Protocol Method] Returns the content of the specified Compute Node file. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node. + /// The path to the file or directory. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The byte range to be retrieved. The default is to retrieve the entire file. The + /// format is bytes=startRange-endRange. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetNodeFileAsync(string poolId, string nodeId, string filePath, int? timeOutInSeconds, DateTimeOffset? ocpdate, string ocpRange, RequestConditions requestConditions, RequestContext context) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + Argument.AssertNotNullOrEmpty(filePath, nameof(filePath)); + + if (requestConditions?.IfMatch is not null) + { + throw new ArgumentNullException(nameof(requestConditions), "Service does not support the If-Match header for this operation."); + } + if (requestConditions?.IfNoneMatch is not null) + { + throw new ArgumentNullException(nameof(requestConditions), "Service does not support the If-None-Match header for this operation."); + } + + using var scope = ClientDiagnostics.CreateScope("BatchClient.GetNodeFile"); + scope.Start(); + try + { + using HttpMessage message = CreateGetNodeFileRequest(poolId, nodeId, filePath, timeOutInSeconds, ocpdate, ocpRange, requestConditions, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Returns the content of the specified Compute Node file. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node. + /// The path to the file or directory. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The byte range to be retrieved. The default is to retrieve the entire file. The + /// format is bytes=startRange-endRange. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetNodeFile(string poolId, string nodeId, string filePath, int? timeOutInSeconds, DateTimeOffset? ocpdate, string ocpRange, RequestConditions requestConditions, RequestContext context) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + Argument.AssertNotNullOrEmpty(filePath, nameof(filePath)); + + if (requestConditions?.IfMatch is not null) + { + throw new ArgumentNullException(nameof(requestConditions), "Service does not support the If-Match header for this operation."); + } + if (requestConditions?.IfNoneMatch is not null) + { + throw new ArgumentNullException(nameof(requestConditions), "Service does not support the If-None-Match header for this operation."); + } + + using var scope = ClientDiagnostics.CreateScope("BatchClient.GetNodeFile"); + scope.Start(); + try + { + using HttpMessage message = CreateGetNodeFileRequest(poolId, nodeId, filePath, timeOutInSeconds, ocpdate, ocpRange, requestConditions, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Gets the properties of the specified Compute Node file. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node. + /// The path to the file or directory. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual async Task GetNodeFilePropertiesInternalAsync(string poolId, string nodeId, string filePath, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + Argument.AssertNotNullOrEmpty(filePath, nameof(filePath)); + + if (requestConditions?.IfMatch is not null) + { + throw new ArgumentNullException(nameof(requestConditions), "Service does not support the If-Match header for this operation."); + } + if (requestConditions?.IfNoneMatch is not null) + { + throw new ArgumentNullException(nameof(requestConditions), "Service does not support the If-None-Match header for this operation."); + } + + using var scope = ClientDiagnostics.CreateScope("BatchClient.GetNodeFilePropertiesInternal"); + scope.Start(); + try + { + using HttpMessage message = CreateGetNodeFilePropertiesInternalRequest(poolId, nodeId, filePath, timeOutInSeconds, ocpdate, requestConditions, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Gets the properties of the specified Compute Node file. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node. + /// The path to the file or directory. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual Response GetNodeFilePropertiesInternal(string poolId, string nodeId, string filePath, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + Argument.AssertNotNullOrEmpty(filePath, nameof(filePath)); + + if (requestConditions?.IfMatch is not null) + { + throw new ArgumentNullException(nameof(requestConditions), "Service does not support the If-Match header for this operation."); + } + if (requestConditions?.IfNoneMatch is not null) + { + throw new ArgumentNullException(nameof(requestConditions), "Service does not support the If-None-Match header for this operation."); + } + + using var scope = ClientDiagnostics.CreateScope("BatchClient.GetNodeFilePropertiesInternal"); + scope.Start(); + try + { + using HttpMessage message = CreateGetNodeFilePropertiesInternalRequest(poolId, nodeId, filePath, timeOutInSeconds, ocpdate, requestConditions, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Lists all of the applications available in the specified Account. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// The cancellation token to use. + /// + /// This operation returns only Applications and versions that are available for + /// use on Compute Nodes; that is, that can be used in an Package reference. For + /// administrator information about applications and versions that are not yet + /// available to Compute Nodes, use the Azure portal or the Azure Resource Manager + /// API. + /// + /// + public virtual AsyncPageable GetApplicationsAsync(int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, int? maxresults = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetApplicationsRequest(timeOutInSeconds, ocpdate, maxresults, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetApplicationsNextPageRequest(nextLink, timeOutInSeconds, ocpdate, maxresults, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BatchApplication.DeserializeBatchApplication(e), ClientDiagnostics, _pipeline, "BatchClient.GetApplications", "value", "odata.nextLink", context); + } + + /// Lists all of the applications available in the specified Account. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// The cancellation token to use. + /// + /// This operation returns only Applications and versions that are available for + /// use on Compute Nodes; that is, that can be used in an Package reference. For + /// administrator information about applications and versions that are not yet + /// available to Compute Nodes, use the Azure portal or the Azure Resource Manager + /// API. + /// + /// + public virtual Pageable GetApplications(int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, int? maxresults = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetApplicationsRequest(timeOutInSeconds, ocpdate, maxresults, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetApplicationsNextPageRequest(nextLink, timeOutInSeconds, ocpdate, maxresults, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BatchApplication.DeserializeBatchApplication(e), ClientDiagnostics, _pipeline, "BatchClient.GetApplications", "value", "odata.nextLink", context); + } + + /// + /// [Protocol Method] Lists all of the applications available in the specified Account. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetApplicationsAsync(int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetApplicationsRequest(timeOutInSeconds, ocpdate, maxresults, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetApplicationsNextPageRequest(nextLink, timeOutInSeconds, ocpdate, maxresults, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "BatchClient.GetApplications", "value", "odata.nextLink", context); + } + + /// + /// [Protocol Method] Lists all of the applications available in the specified Account. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetApplications(int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetApplicationsRequest(timeOutInSeconds, ocpdate, maxresults, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetApplicationsNextPageRequest(nextLink, timeOutInSeconds, ocpdate, maxresults, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "BatchClient.GetApplications", "value", "odata.nextLink", context); + } + + /// + /// Lists the usage metrics, aggregated by Pool across individual time intervals, + /// for the specified Account. + /// + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// The earliest time from which to include metrics. This must be at least two and + /// a half hours before the current time. If not specified this defaults to the + /// start time of the last aggregation interval currently available. + /// + /// + /// The latest time from which to include metrics. This must be at least two hours + /// before the current time. If not specified this defaults to the end time of the + /// last aggregation interval currently available. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-account-usage-metrics. + /// + /// The cancellation token to use. + /// + /// If you do not specify a $filter clause including a poolId, the response + /// includes all Pools that existed in the Account in the time range of the + /// returned aggregation intervals. If you do not specify a $filter clause + /// including a startTime or endTime these filters default to the start and end + /// times of the last aggregation interval currently available; that is, only the + /// last aggregation interval is returned. + /// + /// + public virtual AsyncPageable GetPoolUsageMetricsAsync(int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, int? maxresults = null, DateTimeOffset? starttime = null, DateTimeOffset? endtime = null, string filter = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetPoolUsageMetricsRequest(timeOutInSeconds, ocpdate, maxresults, starttime, endtime, filter, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetPoolUsageMetricsNextPageRequest(nextLink, timeOutInSeconds, ocpdate, maxresults, starttime, endtime, filter, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BatchPoolUsageMetrics.DeserializeBatchPoolUsageMetrics(e), ClientDiagnostics, _pipeline, "BatchClient.GetPoolUsageMetrics", "value", "odata.nextLink", context); + } + + /// + /// Lists the usage metrics, aggregated by Pool across individual time intervals, + /// for the specified Account. + /// + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// The earliest time from which to include metrics. This must be at least two and + /// a half hours before the current time. If not specified this defaults to the + /// start time of the last aggregation interval currently available. + /// + /// + /// The latest time from which to include metrics. This must be at least two hours + /// before the current time. If not specified this defaults to the end time of the + /// last aggregation interval currently available. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-account-usage-metrics. + /// + /// The cancellation token to use. + /// + /// If you do not specify a $filter clause including a poolId, the response + /// includes all Pools that existed in the Account in the time range of the + /// returned aggregation intervals. If you do not specify a $filter clause + /// including a startTime or endTime these filters default to the start and end + /// times of the last aggregation interval currently available; that is, only the + /// last aggregation interval is returned. + /// + /// + public virtual Pageable GetPoolUsageMetrics(int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, int? maxresults = null, DateTimeOffset? starttime = null, DateTimeOffset? endtime = null, string filter = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetPoolUsageMetricsRequest(timeOutInSeconds, ocpdate, maxresults, starttime, endtime, filter, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetPoolUsageMetricsNextPageRequest(nextLink, timeOutInSeconds, ocpdate, maxresults, starttime, endtime, filter, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BatchPoolUsageMetrics.DeserializeBatchPoolUsageMetrics(e), ClientDiagnostics, _pipeline, "BatchClient.GetPoolUsageMetrics", "value", "odata.nextLink", context); + } + + /// + /// [Protocol Method] Lists the usage metrics, aggregated by Pool across individual time intervals, + /// for the specified Account. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// The earliest time from which to include metrics. This must be at least two and + /// a half hours before the current time. If not specified this defaults to the + /// start time of the last aggregation interval currently available. + /// + /// + /// The latest time from which to include metrics. This must be at least two hours + /// before the current time. If not specified this defaults to the end time of the + /// last aggregation interval currently available. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-account-usage-metrics. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetPoolUsageMetricsAsync(int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, DateTimeOffset? starttime, DateTimeOffset? endtime, string filter, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetPoolUsageMetricsRequest(timeOutInSeconds, ocpdate, maxresults, starttime, endtime, filter, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetPoolUsageMetricsNextPageRequest(nextLink, timeOutInSeconds, ocpdate, maxresults, starttime, endtime, filter, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "BatchClient.GetPoolUsageMetrics", "value", "odata.nextLink", context); + } + + /// + /// [Protocol Method] Lists the usage metrics, aggregated by Pool across individual time intervals, + /// for the specified Account. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// The earliest time from which to include metrics. This must be at least two and + /// a half hours before the current time. If not specified this defaults to the + /// start time of the last aggregation interval currently available. + /// + /// + /// The latest time from which to include metrics. This must be at least two hours + /// before the current time. If not specified this defaults to the end time of the + /// last aggregation interval currently available. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-account-usage-metrics. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetPoolUsageMetrics(int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, DateTimeOffset? starttime, DateTimeOffset? endtime, string filter, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetPoolUsageMetricsRequest(timeOutInSeconds, ocpdate, maxresults, starttime, endtime, filter, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetPoolUsageMetricsNextPageRequest(nextLink, timeOutInSeconds, ocpdate, maxresults, starttime, endtime, filter, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "BatchClient.GetPoolUsageMetrics", "value", "odata.nextLink", context); + } + + /// Lists all of the Pools in the specified Account. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-pools. + /// + /// An OData $select clause. + /// An OData $expand clause. + /// The cancellation token to use. + /// + public virtual AsyncPageable GetPoolsAsync(int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, int? maxresults = null, string filter = null, IEnumerable select = null, IEnumerable expand = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetPoolsRequest(timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetPoolsNextPageRequest(nextLink, timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BatchPool.DeserializeBatchPool(e), ClientDiagnostics, _pipeline, "BatchClient.GetPools", "value", "odata.nextLink", context); + } + + /// Lists all of the Pools in the specified Account. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-pools. + /// + /// An OData $select clause. + /// An OData $expand clause. + /// The cancellation token to use. + /// + public virtual Pageable GetPools(int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, int? maxresults = null, string filter = null, IEnumerable select = null, IEnumerable expand = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetPoolsRequest(timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetPoolsNextPageRequest(nextLink, timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BatchPool.DeserializeBatchPool(e), ClientDiagnostics, _pipeline, "BatchClient.GetPools", "value", "odata.nextLink", context); + } + + /// + /// [Protocol Method] Lists all of the Pools in the specified Account. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-pools. + /// + /// An OData $select clause. + /// An OData $expand clause. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetPoolsAsync(int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, IEnumerable select, IEnumerable expand, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetPoolsRequest(timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetPoolsNextPageRequest(nextLink, timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "BatchClient.GetPools", "value", "odata.nextLink", context); + } + + /// + /// [Protocol Method] Lists all of the Pools in the specified Account. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-pools. + /// + /// An OData $select clause. + /// An OData $expand clause. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetPools(int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, IEnumerable select, IEnumerable expand, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetPoolsRequest(timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetPoolsNextPageRequest(nextLink, timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "BatchClient.GetPools", "value", "odata.nextLink", context); + } + + /// Lists all Virtual Machine Images supported by the Azure Batch service. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-support-images. + /// + /// The cancellation token to use. + /// + public virtual AsyncPageable GetSupportedImagesAsync(int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, int? maxresults = null, string filter = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSupportedImagesRequest(timeOutInSeconds, ocpdate, maxresults, filter, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSupportedImagesNextPageRequest(nextLink, timeOutInSeconds, ocpdate, maxresults, filter, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BatchSupportedImage.DeserializeBatchSupportedImage(e), ClientDiagnostics, _pipeline, "BatchClient.GetSupportedImages", "value", "odata.nextLink", context); + } + + /// Lists all Virtual Machine Images supported by the Azure Batch service. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-support-images. + /// + /// The cancellation token to use. + /// + public virtual Pageable GetSupportedImages(int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, int? maxresults = null, string filter = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSupportedImagesRequest(timeOutInSeconds, ocpdate, maxresults, filter, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSupportedImagesNextPageRequest(nextLink, timeOutInSeconds, ocpdate, maxresults, filter, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BatchSupportedImage.DeserializeBatchSupportedImage(e), ClientDiagnostics, _pipeline, "BatchClient.GetSupportedImages", "value", "odata.nextLink", context); + } + + /// + /// [Protocol Method] Lists all Virtual Machine Images supported by the Azure Batch service. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-support-images. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetSupportedImagesAsync(int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSupportedImagesRequest(timeOutInSeconds, ocpdate, maxresults, filter, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSupportedImagesNextPageRequest(nextLink, timeOutInSeconds, ocpdate, maxresults, filter, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "BatchClient.GetSupportedImages", "value", "odata.nextLink", context); + } + + /// + /// [Protocol Method] Lists all Virtual Machine Images supported by the Azure Batch service. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-support-images. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetSupportedImages(int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSupportedImagesRequest(timeOutInSeconds, ocpdate, maxresults, filter, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSupportedImagesNextPageRequest(nextLink, timeOutInSeconds, ocpdate, maxresults, filter, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "BatchClient.GetSupportedImages", "value", "odata.nextLink", context); + } + + /// + /// Gets the number of Compute Nodes in each state, grouped by Pool. Note that the + /// numbers returned may not always be up to date. If you need exact node counts, + /// use a list query. + /// + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-support-images. + /// + /// The cancellation token to use. + /// + public virtual AsyncPageable GetPoolNodeCountsAsync(int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, int? maxresults = null, string filter = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetPoolNodeCountsRequest(timeOutInSeconds, ocpdate, maxresults, filter, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetPoolNodeCountsNextPageRequest(nextLink, timeOutInSeconds, ocpdate, maxresults, filter, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BatchPoolNodeCounts.DeserializeBatchPoolNodeCounts(e), ClientDiagnostics, _pipeline, "BatchClient.GetPoolNodeCounts", "value", "odata.nextLink", context); + } + + /// + /// Gets the number of Compute Nodes in each state, grouped by Pool. Note that the + /// numbers returned may not always be up to date. If you need exact node counts, + /// use a list query. + /// + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-support-images. + /// + /// The cancellation token to use. + /// + public virtual Pageable GetPoolNodeCounts(int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, int? maxresults = null, string filter = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetPoolNodeCountsRequest(timeOutInSeconds, ocpdate, maxresults, filter, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetPoolNodeCountsNextPageRequest(nextLink, timeOutInSeconds, ocpdate, maxresults, filter, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BatchPoolNodeCounts.DeserializeBatchPoolNodeCounts(e), ClientDiagnostics, _pipeline, "BatchClient.GetPoolNodeCounts", "value", "odata.nextLink", context); + } + + /// + /// [Protocol Method] Gets the number of Compute Nodes in each state, grouped by Pool. Note that the + /// numbers returned may not always be up to date. If you need exact node counts, + /// use a list query. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-support-images. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetPoolNodeCountsAsync(int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetPoolNodeCountsRequest(timeOutInSeconds, ocpdate, maxresults, filter, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetPoolNodeCountsNextPageRequest(nextLink, timeOutInSeconds, ocpdate, maxresults, filter, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "BatchClient.GetPoolNodeCounts", "value", "odata.nextLink", context); + } + + /// + /// [Protocol Method] Gets the number of Compute Nodes in each state, grouped by Pool. Note that the + /// numbers returned may not always be up to date. If you need exact node counts, + /// use a list query. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-support-images. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetPoolNodeCounts(int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetPoolNodeCountsRequest(timeOutInSeconds, ocpdate, maxresults, filter, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetPoolNodeCountsNextPageRequest(nextLink, timeOutInSeconds, ocpdate, maxresults, filter, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "BatchClient.GetPoolNodeCounts", "value", "odata.nextLink", context); + } + + /// Lists all of the Jobs in the specified Account. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-jobs. + /// + /// An OData $select clause. + /// An OData $expand clause. + /// The cancellation token to use. + /// + public virtual AsyncPageable GetJobsAsync(int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, int? maxresults = null, string filter = null, IEnumerable select = null, IEnumerable expand = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetJobsRequest(timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetJobsNextPageRequest(nextLink, timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BatchJob.DeserializeBatchJob(e), ClientDiagnostics, _pipeline, "BatchClient.GetJobs", "value", "odata.nextLink", context); + } + + /// Lists all of the Jobs in the specified Account. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-jobs. + /// + /// An OData $select clause. + /// An OData $expand clause. + /// The cancellation token to use. + /// + public virtual Pageable GetJobs(int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, int? maxresults = null, string filter = null, IEnumerable select = null, IEnumerable expand = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetJobsRequest(timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetJobsNextPageRequest(nextLink, timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BatchJob.DeserializeBatchJob(e), ClientDiagnostics, _pipeline, "BatchClient.GetJobs", "value", "odata.nextLink", context); + } + + /// + /// [Protocol Method] Lists all of the Jobs in the specified Account. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-jobs. + /// + /// An OData $select clause. + /// An OData $expand clause. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetJobsAsync(int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, IEnumerable select, IEnumerable expand, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetJobsRequest(timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetJobsNextPageRequest(nextLink, timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "BatchClient.GetJobs", "value", "odata.nextLink", context); + } + + /// + /// [Protocol Method] Lists all of the Jobs in the specified Account. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-jobs. + /// + /// An OData $select clause. + /// An OData $expand clause. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetJobs(int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, IEnumerable select, IEnumerable expand, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetJobsRequest(timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetJobsNextPageRequest(nextLink, timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "BatchClient.GetJobs", "value", "odata.nextLink", context); + } + + /// Lists the Jobs that have been created under the specified Job Schedule. + /// The ID of the Job Schedule from which you want to get a list of Jobs. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-jobs-in-a-job-schedule. + /// + /// An OData $select clause. + /// An OData $expand clause. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual AsyncPageable GetJobsFromSchedulesAsync(string jobScheduleId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, int? maxresults = null, string filter = null, IEnumerable select = null, IEnumerable expand = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobScheduleId, nameof(jobScheduleId)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetJobsFromSchedulesRequest(jobScheduleId, timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetJobsFromSchedulesNextPageRequest(nextLink, jobScheduleId, timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BatchJob.DeserializeBatchJob(e), ClientDiagnostics, _pipeline, "BatchClient.GetJobsFromSchedules", "value", "odata.nextLink", context); + } + + /// Lists the Jobs that have been created under the specified Job Schedule. + /// The ID of the Job Schedule from which you want to get a list of Jobs. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-jobs-in-a-job-schedule. + /// + /// An OData $select clause. + /// An OData $expand clause. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Pageable GetJobsFromSchedules(string jobScheduleId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, int? maxresults = null, string filter = null, IEnumerable select = null, IEnumerable expand = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobScheduleId, nameof(jobScheduleId)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetJobsFromSchedulesRequest(jobScheduleId, timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetJobsFromSchedulesNextPageRequest(nextLink, jobScheduleId, timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BatchJob.DeserializeBatchJob(e), ClientDiagnostics, _pipeline, "BatchClient.GetJobsFromSchedules", "value", "odata.nextLink", context); + } + + /// + /// [Protocol Method] Lists the Jobs that have been created under the specified Job Schedule. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Job Schedule from which you want to get a list of Jobs. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-jobs-in-a-job-schedule. + /// + /// An OData $select clause. + /// An OData $expand clause. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetJobsFromSchedulesAsync(string jobScheduleId, int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, IEnumerable select, IEnumerable expand, RequestContext context) + { + Argument.AssertNotNullOrEmpty(jobScheduleId, nameof(jobScheduleId)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetJobsFromSchedulesRequest(jobScheduleId, timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetJobsFromSchedulesNextPageRequest(nextLink, jobScheduleId, timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "BatchClient.GetJobsFromSchedules", "value", "odata.nextLink", context); + } + + /// + /// [Protocol Method] Lists the Jobs that have been created under the specified Job Schedule. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Job Schedule from which you want to get a list of Jobs. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-jobs-in-a-job-schedule. + /// + /// An OData $select clause. + /// An OData $expand clause. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetJobsFromSchedules(string jobScheduleId, int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, IEnumerable select, IEnumerable expand, RequestContext context) + { + Argument.AssertNotNullOrEmpty(jobScheduleId, nameof(jobScheduleId)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetJobsFromSchedulesRequest(jobScheduleId, timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetJobsFromSchedulesNextPageRequest(nextLink, jobScheduleId, timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "BatchClient.GetJobsFromSchedules", "value", "odata.nextLink", context); + } + + /// + /// Lists the execution status of the Job Preparation and Job Release Task for the + /// specified Job across the Compute Nodes where the Job has run. + /// + /// The ID of the Job. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-job-preparation-and-release-status. + /// + /// An OData $select clause. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + /// This API returns the Job Preparation and Job Release Task status on all Compute + /// Nodes that have run the Job Preparation or Job Release Task. This includes + /// Compute Nodes which have since been removed from the Pool. If this API is + /// invoked on a Job which has no Job Preparation or Job Release Task, the Batch + /// service returns HTTP status code 409 (Conflict) with an error code of + /// JobPreparationTaskNotSpecified. + /// + /// + public virtual AsyncPageable GetJobPreparationAndReleaseTaskStatusesAsync(string jobId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, int? maxresults = null, string filter = null, IEnumerable select = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetJobPreparationAndReleaseTaskStatusesRequest(jobId, timeOutInSeconds, ocpdate, maxresults, filter, select, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetJobPreparationAndReleaseTaskStatusesNextPageRequest(nextLink, jobId, timeOutInSeconds, ocpdate, maxresults, filter, select, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BatchJobPreparationAndReleaseTaskStatus.DeserializeBatchJobPreparationAndReleaseTaskStatus(e), ClientDiagnostics, _pipeline, "BatchClient.GetJobPreparationAndReleaseTaskStatuses", "value", "odata.nextLink", context); + } + + /// + /// Lists the execution status of the Job Preparation and Job Release Task for the + /// specified Job across the Compute Nodes where the Job has run. + /// + /// The ID of the Job. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-job-preparation-and-release-status. + /// + /// An OData $select clause. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + /// This API returns the Job Preparation and Job Release Task status on all Compute + /// Nodes that have run the Job Preparation or Job Release Task. This includes + /// Compute Nodes which have since been removed from the Pool. If this API is + /// invoked on a Job which has no Job Preparation or Job Release Task, the Batch + /// service returns HTTP status code 409 (Conflict) with an error code of + /// JobPreparationTaskNotSpecified. + /// + /// + public virtual Pageable GetJobPreparationAndReleaseTaskStatuses(string jobId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, int? maxresults = null, string filter = null, IEnumerable select = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetJobPreparationAndReleaseTaskStatusesRequest(jobId, timeOutInSeconds, ocpdate, maxresults, filter, select, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetJobPreparationAndReleaseTaskStatusesNextPageRequest(nextLink, jobId, timeOutInSeconds, ocpdate, maxresults, filter, select, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BatchJobPreparationAndReleaseTaskStatus.DeserializeBatchJobPreparationAndReleaseTaskStatus(e), ClientDiagnostics, _pipeline, "BatchClient.GetJobPreparationAndReleaseTaskStatuses", "value", "odata.nextLink", context); + } + + /// + /// [Protocol Method] Lists the execution status of the Job Preparation and Job Release Task for the + /// specified Job across the Compute Nodes where the Job has run. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Job. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-job-preparation-and-release-status. + /// + /// An OData $select clause. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetJobPreparationAndReleaseTaskStatusesAsync(string jobId, int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, IEnumerable select, RequestContext context) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetJobPreparationAndReleaseTaskStatusesRequest(jobId, timeOutInSeconds, ocpdate, maxresults, filter, select, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetJobPreparationAndReleaseTaskStatusesNextPageRequest(nextLink, jobId, timeOutInSeconds, ocpdate, maxresults, filter, select, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "BatchClient.GetJobPreparationAndReleaseTaskStatuses", "value", "odata.nextLink", context); + } + + /// + /// [Protocol Method] Lists the execution status of the Job Preparation and Job Release Task for the + /// specified Job across the Compute Nodes where the Job has run. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Job. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-job-preparation-and-release-status. + /// + /// An OData $select clause. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetJobPreparationAndReleaseTaskStatuses(string jobId, int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, IEnumerable select, RequestContext context) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetJobPreparationAndReleaseTaskStatusesRequest(jobId, timeOutInSeconds, ocpdate, maxresults, filter, select, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetJobPreparationAndReleaseTaskStatusesNextPageRequest(nextLink, jobId, timeOutInSeconds, ocpdate, maxresults, filter, select, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "BatchClient.GetJobPreparationAndReleaseTaskStatuses", "value", "odata.nextLink", context); + } + + /// Lists all of the Job Schedules in the specified Account. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-job-schedules. + /// + /// An OData $select clause. + /// An OData $expand clause. + /// The cancellation token to use. + /// + public virtual AsyncPageable GetJobSchedulesAsync(int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, int? maxresults = null, string filter = null, IEnumerable select = null, IEnumerable expand = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetJobSchedulesRequest(timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetJobSchedulesNextPageRequest(nextLink, timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BatchJobSchedule.DeserializeBatchJobSchedule(e), ClientDiagnostics, _pipeline, "BatchClient.GetJobSchedules", "value", "odata.nextLink", context); + } + + /// Lists all of the Job Schedules in the specified Account. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-job-schedules. + /// + /// An OData $select clause. + /// An OData $expand clause. + /// The cancellation token to use. + /// + public virtual Pageable GetJobSchedules(int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, int? maxresults = null, string filter = null, IEnumerable select = null, IEnumerable expand = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetJobSchedulesRequest(timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetJobSchedulesNextPageRequest(nextLink, timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BatchJobSchedule.DeserializeBatchJobSchedule(e), ClientDiagnostics, _pipeline, "BatchClient.GetJobSchedules", "value", "odata.nextLink", context); + } + + /// + /// [Protocol Method] Lists all of the Job Schedules in the specified Account. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-job-schedules. + /// + /// An OData $select clause. + /// An OData $expand clause. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetJobSchedulesAsync(int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, IEnumerable select, IEnumerable expand, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetJobSchedulesRequest(timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetJobSchedulesNextPageRequest(nextLink, timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "BatchClient.GetJobSchedules", "value", "odata.nextLink", context); + } + + /// + /// [Protocol Method] Lists all of the Job Schedules in the specified Account. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-job-schedules. + /// + /// An OData $select clause. + /// An OData $expand clause. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetJobSchedules(int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, IEnumerable select, IEnumerable expand, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetJobSchedulesRequest(timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetJobSchedulesNextPageRequest(nextLink, timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "BatchClient.GetJobSchedules", "value", "odata.nextLink", context); + } + + /// Lists all of the Tasks that are associated with the specified Job. + /// The ID of the Job. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-tasks. + /// + /// An OData $select clause. + /// An OData $expand clause. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + /// For multi-instance Tasks, information such as affinityId, executionInfo and + /// nodeInfo refer to the primary Task. Use the list subtasks API to retrieve + /// information about subtasks. + /// + /// + public virtual AsyncPageable GetTasksAsync(string jobId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, int? maxresults = null, string filter = null, IEnumerable select = null, IEnumerable expand = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTasksRequest(jobId, timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTasksNextPageRequest(nextLink, jobId, timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BatchTask.DeserializeBatchTask(e), ClientDiagnostics, _pipeline, "BatchClient.GetTasks", "value", "odata.nextLink", context); + } + + /// Lists all of the Tasks that are associated with the specified Job. + /// The ID of the Job. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-tasks. + /// + /// An OData $select clause. + /// An OData $expand clause. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + /// For multi-instance Tasks, information such as affinityId, executionInfo and + /// nodeInfo refer to the primary Task. Use the list subtasks API to retrieve + /// information about subtasks. + /// + /// + public virtual Pageable GetTasks(string jobId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, int? maxresults = null, string filter = null, IEnumerable select = null, IEnumerable expand = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTasksRequest(jobId, timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTasksNextPageRequest(nextLink, jobId, timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BatchTask.DeserializeBatchTask(e), ClientDiagnostics, _pipeline, "BatchClient.GetTasks", "value", "odata.nextLink", context); + } + + /// + /// [Protocol Method] Lists all of the Tasks that are associated with the specified Job. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Job. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-tasks. + /// + /// An OData $select clause. + /// An OData $expand clause. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetTasksAsync(string jobId, int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, IEnumerable select, IEnumerable expand, RequestContext context) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTasksRequest(jobId, timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTasksNextPageRequest(nextLink, jobId, timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "BatchClient.GetTasks", "value", "odata.nextLink", context); + } + + /// + /// [Protocol Method] Lists all of the Tasks that are associated with the specified Job. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Job. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-tasks. + /// + /// An OData $select clause. + /// An OData $expand clause. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetTasks(string jobId, int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, IEnumerable select, IEnumerable expand, RequestContext context) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTasksRequest(jobId, timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTasksNextPageRequest(nextLink, jobId, timeOutInSeconds, ocpdate, maxresults, filter, select, expand, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "BatchClient.GetTasks", "value", "odata.nextLink", context); + } + + /// + /// Lists all of the subtasks that are associated with the specified multi-instance + /// Task. + /// + /// The ID of the Job. + /// The ID of the Task. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// An OData $select clause. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// If the Task is not a multi-instance Task then this returns an empty collection. + /// + public virtual AsyncPageable GetSubTasksAsync(string jobId, string taskId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, IEnumerable select = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSubTasksRequest(jobId, taskId, timeOutInSeconds, ocpdate, select, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSubTasksNextPageRequest(nextLink, jobId, taskId, timeOutInSeconds, ocpdate, select, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BatchSubtask.DeserializeBatchSubtask(e), ClientDiagnostics, _pipeline, "BatchClient.GetSubTasks", "value", "odata.nextLink", context); + } + + /// + /// Lists all of the subtasks that are associated with the specified multi-instance + /// Task. + /// + /// The ID of the Job. + /// The ID of the Task. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// An OData $select clause. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// If the Task is not a multi-instance Task then this returns an empty collection. + /// + public virtual Pageable GetSubTasks(string jobId, string taskId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, IEnumerable select = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSubTasksRequest(jobId, taskId, timeOutInSeconds, ocpdate, select, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSubTasksNextPageRequest(nextLink, jobId, taskId, timeOutInSeconds, ocpdate, select, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BatchSubtask.DeserializeBatchSubtask(e), ClientDiagnostics, _pipeline, "BatchClient.GetSubTasks", "value", "odata.nextLink", context); + } + + /// + /// [Protocol Method] Lists all of the subtasks that are associated with the specified multi-instance + /// Task. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Job. + /// The ID of the Task. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// An OData $select clause. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetSubTasksAsync(string jobId, string taskId, int? timeOutInSeconds, DateTimeOffset? ocpdate, IEnumerable select, RequestContext context) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSubTasksRequest(jobId, taskId, timeOutInSeconds, ocpdate, select, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSubTasksNextPageRequest(nextLink, jobId, taskId, timeOutInSeconds, ocpdate, select, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "BatchClient.GetSubTasks", "value", "odata.nextLink", context); + } + + /// + /// [Protocol Method] Lists all of the subtasks that are associated with the specified multi-instance + /// Task. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Job. + /// The ID of the Task. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// An OData $select clause. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetSubTasks(string jobId, string taskId, int? timeOutInSeconds, DateTimeOffset? ocpdate, IEnumerable select, RequestContext context) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSubTasksRequest(jobId, taskId, timeOutInSeconds, ocpdate, select, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSubTasksNextPageRequest(nextLink, jobId, taskId, timeOutInSeconds, ocpdate, select, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "BatchClient.GetSubTasks", "value", "odata.nextLink", context); + } + + /// Lists the files in a Task's directory on its Compute Node. + /// The ID of the Job that contains the Task. + /// The ID of the Task whose files you want to list. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-task-files. + /// + /// + /// Whether to list children of the Task directory. This parameter can be used in + /// combination with the filter parameter to list specific type of files. + /// + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual AsyncPageable GetTaskFilesAsync(string jobId, string taskId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, int? maxresults = null, string filter = null, bool? recursive = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTaskFilesRequest(jobId, taskId, timeOutInSeconds, ocpdate, maxresults, filter, recursive, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTaskFilesNextPageRequest(nextLink, jobId, taskId, timeOutInSeconds, ocpdate, maxresults, filter, recursive, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BatchNodeFile.DeserializeBatchNodeFile(e), ClientDiagnostics, _pipeline, "BatchClient.GetTaskFiles", "value", "odata.nextLink", context); + } + + /// Lists the files in a Task's directory on its Compute Node. + /// The ID of the Job that contains the Task. + /// The ID of the Task whose files you want to list. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-task-files. + /// + /// + /// Whether to list children of the Task directory. This parameter can be used in + /// combination with the filter parameter to list specific type of files. + /// + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Pageable GetTaskFiles(string jobId, string taskId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, int? maxresults = null, string filter = null, bool? recursive = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTaskFilesRequest(jobId, taskId, timeOutInSeconds, ocpdate, maxresults, filter, recursive, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTaskFilesNextPageRequest(nextLink, jobId, taskId, timeOutInSeconds, ocpdate, maxresults, filter, recursive, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BatchNodeFile.DeserializeBatchNodeFile(e), ClientDiagnostics, _pipeline, "BatchClient.GetTaskFiles", "value", "odata.nextLink", context); + } + + /// + /// [Protocol Method] Lists the files in a Task's directory on its Compute Node. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Job that contains the Task. + /// The ID of the Task whose files you want to list. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-task-files. + /// + /// + /// Whether to list children of the Task directory. This parameter can be used in + /// combination with the filter parameter to list specific type of files. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetTaskFilesAsync(string jobId, string taskId, int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, bool? recursive, RequestContext context) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTaskFilesRequest(jobId, taskId, timeOutInSeconds, ocpdate, maxresults, filter, recursive, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTaskFilesNextPageRequest(nextLink, jobId, taskId, timeOutInSeconds, ocpdate, maxresults, filter, recursive, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "BatchClient.GetTaskFiles", "value", "odata.nextLink", context); + } + + /// + /// [Protocol Method] Lists the files in a Task's directory on its Compute Node. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Job that contains the Task. + /// The ID of the Task whose files you want to list. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-task-files. + /// + /// + /// Whether to list children of the Task directory. This parameter can be used in + /// combination with the filter parameter to list specific type of files. + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetTaskFiles(string jobId, string taskId, int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, bool? recursive, RequestContext context) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + Argument.AssertNotNullOrEmpty(taskId, nameof(taskId)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetTaskFilesRequest(jobId, taskId, timeOutInSeconds, ocpdate, maxresults, filter, recursive, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetTaskFilesNextPageRequest(nextLink, jobId, taskId, timeOutInSeconds, ocpdate, maxresults, filter, recursive, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "BatchClient.GetTaskFiles", "value", "odata.nextLink", context); + } + + /// Lists the Compute Nodes in the specified Pool. + /// The ID of the Pool from which you want to list Compute Nodes. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-nodes-in-a-pool. + /// + /// An OData $select clause. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual AsyncPageable GetNodesAsync(string poolId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, int? maxresults = null, string filter = null, IEnumerable select = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetNodesRequest(poolId, timeOutInSeconds, ocpdate, maxresults, filter, select, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetNodesNextPageRequest(nextLink, poolId, timeOutInSeconds, ocpdate, maxresults, filter, select, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BatchNode.DeserializeBatchNode(e), ClientDiagnostics, _pipeline, "BatchClient.GetNodes", "value", "odata.nextLink", context); + } + + /// Lists the Compute Nodes in the specified Pool. + /// The ID of the Pool from which you want to list Compute Nodes. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-nodes-in-a-pool. + /// + /// An OData $select clause. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Pageable GetNodes(string poolId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, int? maxresults = null, string filter = null, IEnumerable select = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetNodesRequest(poolId, timeOutInSeconds, ocpdate, maxresults, filter, select, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetNodesNextPageRequest(nextLink, poolId, timeOutInSeconds, ocpdate, maxresults, filter, select, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BatchNode.DeserializeBatchNode(e), ClientDiagnostics, _pipeline, "BatchClient.GetNodes", "value", "odata.nextLink", context); + } + + /// + /// [Protocol Method] Lists the Compute Nodes in the specified Pool. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Pool from which you want to list Compute Nodes. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-nodes-in-a-pool. + /// + /// An OData $select clause. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetNodesAsync(string poolId, int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, IEnumerable select, RequestContext context) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetNodesRequest(poolId, timeOutInSeconds, ocpdate, maxresults, filter, select, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetNodesNextPageRequest(nextLink, poolId, timeOutInSeconds, ocpdate, maxresults, filter, select, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "BatchClient.GetNodes", "value", "odata.nextLink", context); + } + + /// + /// [Protocol Method] Lists the Compute Nodes in the specified Pool. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Pool from which you want to list Compute Nodes. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-nodes-in-a-pool. + /// + /// An OData $select clause. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetNodes(string poolId, int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, IEnumerable select, RequestContext context) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetNodesRequest(poolId, timeOutInSeconds, ocpdate, maxresults, filter, select, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetNodesNextPageRequest(nextLink, poolId, timeOutInSeconds, ocpdate, maxresults, filter, select, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "BatchClient.GetNodes", "value", "odata.nextLink", context); + } + + /// Lists the Compute Nodes Extensions in the specified Pool. + /// The ID of the Pool that contains Compute Node. + /// The ID of the Compute Node that you want to list extensions. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// An OData $select clause. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual AsyncPageable GetNodeExtensionsAsync(string poolId, string nodeId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, int? maxresults = null, IEnumerable select = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetNodeExtensionsRequest(poolId, nodeId, timeOutInSeconds, ocpdate, maxresults, select, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetNodeExtensionsNextPageRequest(nextLink, poolId, nodeId, timeOutInSeconds, ocpdate, maxresults, select, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BatchNodeVMExtension.DeserializeBatchNodeVMExtension(e), ClientDiagnostics, _pipeline, "BatchClient.GetNodeExtensions", "value", "odata.nextLink", context); + } + + /// Lists the Compute Nodes Extensions in the specified Pool. + /// The ID of the Pool that contains Compute Node. + /// The ID of the Compute Node that you want to list extensions. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// An OData $select clause. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Pageable GetNodeExtensions(string poolId, string nodeId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, int? maxresults = null, IEnumerable select = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetNodeExtensionsRequest(poolId, nodeId, timeOutInSeconds, ocpdate, maxresults, select, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetNodeExtensionsNextPageRequest(nextLink, poolId, nodeId, timeOutInSeconds, ocpdate, maxresults, select, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BatchNodeVMExtension.DeserializeBatchNodeVMExtension(e), ClientDiagnostics, _pipeline, "BatchClient.GetNodeExtensions", "value", "odata.nextLink", context); + } + + /// + /// [Protocol Method] Lists the Compute Nodes Extensions in the specified Pool. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Pool that contains Compute Node. + /// The ID of the Compute Node that you want to list extensions. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// An OData $select clause. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetNodeExtensionsAsync(string poolId, string nodeId, int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, IEnumerable select, RequestContext context) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetNodeExtensionsRequest(poolId, nodeId, timeOutInSeconds, ocpdate, maxresults, select, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetNodeExtensionsNextPageRequest(nextLink, poolId, nodeId, timeOutInSeconds, ocpdate, maxresults, select, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "BatchClient.GetNodeExtensions", "value", "odata.nextLink", context); + } + + /// + /// [Protocol Method] Lists the Compute Nodes Extensions in the specified Pool. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Pool that contains Compute Node. + /// The ID of the Compute Node that you want to list extensions. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// An OData $select clause. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetNodeExtensions(string poolId, string nodeId, int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, IEnumerable select, RequestContext context) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetNodeExtensionsRequest(poolId, nodeId, timeOutInSeconds, ocpdate, maxresults, select, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetNodeExtensionsNextPageRequest(nextLink, poolId, nodeId, timeOutInSeconds, ocpdate, maxresults, select, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "BatchClient.GetNodeExtensions", "value", "odata.nextLink", context); + } + + /// Lists all of the files in Task directories on the specified Compute Node. + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node whose files you want to list. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-compute-node-files. + /// + /// Whether to list children of a directory. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual AsyncPageable GetNodeFilesAsync(string poolId, string nodeId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, int? maxresults = null, string filter = null, bool? recursive = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetNodeFilesRequest(poolId, nodeId, timeOutInSeconds, ocpdate, maxresults, filter, recursive, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetNodeFilesNextPageRequest(nextLink, poolId, nodeId, timeOutInSeconds, ocpdate, maxresults, filter, recursive, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BatchNodeFile.DeserializeBatchNodeFile(e), ClientDiagnostics, _pipeline, "BatchClient.GetNodeFiles", "value", "odata.nextLink", context); + } + + /// Lists all of the files in Task directories on the specified Compute Node. + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node whose files you want to list. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-compute-node-files. + /// + /// Whether to list children of a directory. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Pageable GetNodeFiles(string poolId, string nodeId, int? timeOutInSeconds = null, DateTimeOffset? ocpdate = null, int? maxresults = null, string filter = null, bool? recursive = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetNodeFilesRequest(poolId, nodeId, timeOutInSeconds, ocpdate, maxresults, filter, recursive, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetNodeFilesNextPageRequest(nextLink, poolId, nodeId, timeOutInSeconds, ocpdate, maxresults, filter, recursive, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BatchNodeFile.DeserializeBatchNodeFile(e), ClientDiagnostics, _pipeline, "BatchClient.GetNodeFiles", "value", "odata.nextLink", context); + } + + /// + /// [Protocol Method] Lists all of the files in Task directories on the specified Compute Node. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node whose files you want to list. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-compute-node-files. + /// + /// Whether to list children of a directory. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetNodeFilesAsync(string poolId, string nodeId, int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, bool? recursive, RequestContext context) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetNodeFilesRequest(poolId, nodeId, timeOutInSeconds, ocpdate, maxresults, filter, recursive, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetNodeFilesNextPageRequest(nextLink, poolId, nodeId, timeOutInSeconds, ocpdate, maxresults, filter, recursive, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "BatchClient.GetNodeFiles", "value", "odata.nextLink", context); + } + + /// + /// [Protocol Method] Lists all of the files in Task directories on the specified Compute Node. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The ID of the Pool that contains the Compute Node. + /// The ID of the Compute Node whose files you want to list. + /// The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.". + /// + /// The time the request was issued. Client libraries typically set this to the + /// current system clock time; set it explicitly if you are calling the REST API + /// directly. + /// + /// + /// The maximum number of items to return in the response. A maximum of 1000 + /// applications can be returned. + /// + /// + /// An OData $filter clause. For more information on constructing this filter, see + /// https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-compute-node-files. + /// + /// Whether to list children of a directory. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetNodeFiles(string poolId, string nodeId, int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, bool? recursive, RequestContext context) + { + Argument.AssertNotNullOrEmpty(poolId, nameof(poolId)); + Argument.AssertNotNullOrEmpty(nodeId, nameof(nodeId)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetNodeFilesRequest(poolId, nodeId, timeOutInSeconds, ocpdate, maxresults, filter, recursive, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetNodeFilesNextPageRequest(nextLink, poolId, nodeId, timeOutInSeconds, ocpdate, maxresults, filter, recursive, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "BatchClient.GetNodeFiles", "value", "odata.nextLink", context); + } + + internal HttpMessage CreateGetApplicationsRequest(int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/applications", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + if (maxresults != null) + { + uri.AppendQuery("maxresults", maxresults.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateGetApplicationRequest(string applicationId, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/applications/", false); + uri.AppendPath(applicationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateGetPoolUsageMetricsRequest(int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, DateTimeOffset? starttime, DateTimeOffset? endtime, string filter, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/poolusagemetrics", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + if (maxresults != null) + { + uri.AppendQuery("maxresults", maxresults.Value, true); + } + if (starttime != null) + { + uri.AppendQuery("startTime", starttime.Value, "O", true); + } + if (endtime != null) + { + uri.AppendQuery("endtime", endtime.Value, "O", true); + } + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateCreatePoolRequest(RequestContent content, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier201); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/pools", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + request.Headers.Add("Content-Type", "application/json; odata=minimalmetadata"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetPoolsRequest(int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, IEnumerable select, IEnumerable expand, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/pools", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + if (maxresults != null) + { + uri.AppendQuery("maxresults", maxresults.Value, true); + } + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (select != null && !(select is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined)) + { + uri.AppendQueryDelimited("$select", select, ",", true); + } + if (expand != null && !(expand is ChangeTrackingList changeTrackingList0 && changeTrackingList0.IsUndefined)) + { + uri.AppendQueryDelimited("$expand", expand, ",", true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateDeletePoolRequest(string poolId, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestConditions requestConditions, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/pools/", false); + uri.AppendPath(poolId, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + if (requestConditions != null) + { + request.Headers.Add(requestConditions, "R"); + } + return message; + } + + internal HttpMessage CreatePoolExistsRequest(string poolId, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestConditions requestConditions, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200404); + var request = message.Request; + request.Method = RequestMethod.Head; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/pools/", false); + uri.AppendPath(poolId, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + if (requestConditions != null) + { + request.Headers.Add(requestConditions, "R"); + } + return message; + } + + internal HttpMessage CreateGetPoolRequest(string poolId, int? timeOutInSeconds, DateTimeOffset? ocpdate, IEnumerable select, IEnumerable expand, RequestConditions requestConditions, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/pools/", false); + uri.AppendPath(poolId, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + if (select != null && !(select is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined)) + { + uri.AppendQueryDelimited("$select", select, ",", true); + } + if (expand != null && !(expand is ChangeTrackingList changeTrackingList0 && changeTrackingList0.IsUndefined)) + { + uri.AppendQueryDelimited("$expand", expand, ",", true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + if (requestConditions != null) + { + request.Headers.Add(requestConditions, "R"); + } + return message; + } + + internal HttpMessage CreateUpdatePoolRequest(string poolId, RequestContent content, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestConditions requestConditions, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/pools/", false); + uri.AppendPath(poolId, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + if (requestConditions != null) + { + request.Headers.Add(requestConditions, "R"); + } + request.Headers.Add("Content-Type", "application/json; odata=minimalmetadata"); + request.Content = content; + return message; + } + + internal HttpMessage CreateDisablePoolAutoScaleRequest(string poolId, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/pools/", false); + uri.AppendPath(poolId, true); + uri.AppendPath("/disableautoscale", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateEnablePoolAutoScaleRequest(string poolId, RequestContent content, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestConditions requestConditions, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/pools/", false); + uri.AppendPath(poolId, true); + uri.AppendPath("/enableautoscale", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + if (requestConditions != null) + { + request.Headers.Add(requestConditions, "R"); + } + request.Headers.Add("Content-Type", "application/json; odata=minimalmetadata"); + request.Content = content; + return message; + } + + internal HttpMessage CreateEvaluatePoolAutoScaleRequest(string poolId, RequestContent content, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/pools/", false); + uri.AppendPath(poolId, true); + uri.AppendPath("/evaluateautoscale", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + request.Headers.Add("Content-Type", "application/json; odata=minimalmetadata"); + request.Content = content; + return message; + } + + internal HttpMessage CreateResizePoolRequest(string poolId, RequestContent content, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestConditions requestConditions, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/pools/", false); + uri.AppendPath(poolId, true); + uri.AppendPath("/resize", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + if (requestConditions != null) + { + request.Headers.Add(requestConditions, "R"); + } + request.Headers.Add("Content-Type", "application/json; odata=minimalmetadata"); + request.Content = content; + return message; + } + + internal HttpMessage CreateStopPoolResizeRequest(string poolId, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestConditions requestConditions, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/pools/", false); + uri.AppendPath(poolId, true); + uri.AppendPath("/stopresize", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + if (requestConditions != null) + { + request.Headers.Add(requestConditions, "R"); + } + return message; + } + + internal HttpMessage CreateReplacePoolPropertiesRequest(string poolId, RequestContent content, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/pools/", false); + uri.AppendPath(poolId, true); + uri.AppendPath("/updateproperties", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + request.Headers.Add("Content-Type", "application/json; odata=minimalmetadata"); + request.Content = content; + return message; + } + + internal HttpMessage CreateRemoveNodesRequest(string poolId, RequestContent content, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestConditions requestConditions, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/pools/", false); + uri.AppendPath(poolId, true); + uri.AppendPath("/removenodes", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + if (requestConditions != null) + { + request.Headers.Add(requestConditions, "R"); + } + request.Headers.Add("Content-Type", "application/json; odata=minimalmetadata"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetSupportedImagesRequest(int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/supportedimages", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + if (maxresults != null) + { + uri.AppendQuery("maxresults", maxresults.Value, true); + } + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateGetPoolNodeCountsRequest(int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/nodecounts", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + if (maxresults != null) + { + uri.AppendQuery("maxresults", maxresults.Value, true); + } + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateDeleteJobRequest(string jobId, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestConditions requestConditions, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + if (requestConditions != null) + { + request.Headers.Add(requestConditions, "R"); + } + return message; + } + + internal HttpMessage CreateGetJobRequest(string jobId, int? timeOutInSeconds, DateTimeOffset? ocpdate, IEnumerable select, IEnumerable expand, RequestConditions requestConditions, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + if (select != null && !(select is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined)) + { + uri.AppendQueryDelimited("$select", select, ",", true); + } + if (expand != null && !(expand is ChangeTrackingList changeTrackingList0 && changeTrackingList0.IsUndefined)) + { + uri.AppendQueryDelimited("$expand", expand, ",", true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + if (requestConditions != null) + { + request.Headers.Add(requestConditions, "R"); + } + return message; + } + + internal HttpMessage CreateUpdateJobRequest(string jobId, RequestContent content, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestConditions requestConditions, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + if (requestConditions != null) + { + request.Headers.Add(requestConditions, "R"); + } + request.Headers.Add("Content-Type", "application/json; odata=minimalmetadata"); + request.Content = content; + return message; + } + + internal HttpMessage CreateReplaceJobRequest(string jobId, RequestContent content, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestConditions requestConditions, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + if (requestConditions != null) + { + request.Headers.Add(requestConditions, "R"); + } + request.Headers.Add("Content-Type", "application/json; odata=minimalmetadata"); + request.Content = content; + return message; + } + + internal HttpMessage CreateDisableJobRequest(string jobId, RequestContent content, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestConditions requestConditions, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendPath("/disable", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + if (requestConditions != null) + { + request.Headers.Add(requestConditions, "R"); + } + request.Headers.Add("Content-Type", "application/json; odata=minimalmetadata"); + request.Content = content; + return message; + } + + internal HttpMessage CreateEnableJobRequest(string jobId, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestConditions requestConditions, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendPath("/enable", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + if (requestConditions != null) + { + request.Headers.Add(requestConditions, "R"); + } + return message; + } + + internal HttpMessage CreateTerminateJobRequest(string jobId, RequestContent content, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestConditions requestConditions, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendPath("/terminate", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + if (requestConditions != null) + { + request.Headers.Add(requestConditions, "R"); + } + request.Headers.Add("Content-Type", "application/json; odata=minimalmetadata"); + request.Content = content; + return message; + } + + internal HttpMessage CreateCreateJobRequest(RequestContent content, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier201); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/jobs", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + request.Headers.Add("Content-Type", "application/json; odata=minimalmetadata"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetJobsRequest(int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, IEnumerable select, IEnumerable expand, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/jobs", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + if (maxresults != null) + { + uri.AppendQuery("maxresults", maxresults.Value, true); + } + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (select != null && !(select is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined)) + { + uri.AppendQueryDelimited("$select", select, ",", true); + } + if (expand != null && !(expand is ChangeTrackingList changeTrackingList0 && changeTrackingList0.IsUndefined)) + { + uri.AppendQueryDelimited("$expand", expand, ",", true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateGetJobsFromSchedulesRequest(string jobScheduleId, int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, IEnumerable select, IEnumerable expand, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/jobschedules/", false); + uri.AppendPath(jobScheduleId, true); + uri.AppendPath("/jobs", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + if (maxresults != null) + { + uri.AppendQuery("maxresults", maxresults.Value, true); + } + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (select != null && !(select is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined)) + { + uri.AppendQueryDelimited("$select", select, ",", true); + } + if (expand != null && !(expand is ChangeTrackingList changeTrackingList0 && changeTrackingList0.IsUndefined)) + { + uri.AppendQueryDelimited("$expand", expand, ",", true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateGetJobPreparationAndReleaseTaskStatusesRequest(string jobId, int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, IEnumerable select, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendPath("/jobpreparationandreleasetaskstatus", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + if (maxresults != null) + { + uri.AppendQuery("maxresults", maxresults.Value, true); + } + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (select != null && !(select is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined)) + { + uri.AppendQueryDelimited("$select", select, ",", true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateGetJobTaskCountsRequest(string jobId, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendPath("/taskcounts", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateJobScheduleExistsRequest(string jobScheduleId, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestConditions requestConditions, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200404); + var request = message.Request; + request.Method = RequestMethod.Head; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/jobschedules/", false); + uri.AppendPath(jobScheduleId, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + if (requestConditions != null) + { + request.Headers.Add(requestConditions, "R"); + } + return message; + } + + internal HttpMessage CreateDeleteJobScheduleRequest(string jobScheduleId, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestConditions requestConditions, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/jobschedules/", false); + uri.AppendPath(jobScheduleId, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + if (requestConditions != null) + { + request.Headers.Add(requestConditions, "R"); + } + return message; + } + + internal HttpMessage CreateGetJobScheduleRequest(string jobScheduleId, int? timeOutInSeconds, DateTimeOffset? ocpdate, IEnumerable select, IEnumerable expand, RequestConditions requestConditions, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/jobschedules/", false); + uri.AppendPath(jobScheduleId, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + if (select != null && !(select is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined)) + { + uri.AppendQueryDelimited("$select", select, ",", true); + } + if (expand != null && !(expand is ChangeTrackingList changeTrackingList0 && changeTrackingList0.IsUndefined)) + { + uri.AppendQueryDelimited("$expand", expand, ",", true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + if (requestConditions != null) + { + request.Headers.Add(requestConditions, "R"); + } + return message; + } + + internal HttpMessage CreateUpdateJobScheduleRequest(string jobScheduleId, RequestContent content, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestConditions requestConditions, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/jobschedules/", false); + uri.AppendPath(jobScheduleId, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + if (requestConditions != null) + { + request.Headers.Add(requestConditions, "R"); + } + request.Headers.Add("Content-Type", "application/json; odata=minimalmetadata"); + request.Content = content; + return message; + } + + internal HttpMessage CreateReplaceJobScheduleRequest(string jobScheduleId, RequestContent content, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestConditions requestConditions, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/jobschedules/", false); + uri.AppendPath(jobScheduleId, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + if (requestConditions != null) + { + request.Headers.Add(requestConditions, "R"); + } + request.Headers.Add("Content-Type", "application/json; odata=minimalmetadata"); + request.Content = content; + return message; + } + + internal HttpMessage CreateDisableJobScheduleRequest(string jobScheduleId, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestConditions requestConditions, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/jobschedules/", false); + uri.AppendPath(jobScheduleId, true); + uri.AppendPath("/disable", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + if (requestConditions != null) + { + request.Headers.Add(requestConditions, "R"); + } + return message; + } + + internal HttpMessage CreateEnableJobScheduleRequest(string jobScheduleId, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestConditions requestConditions, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/jobschedules/", false); + uri.AppendPath(jobScheduleId, true); + uri.AppendPath("/enable", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + if (requestConditions != null) + { + request.Headers.Add(requestConditions, "R"); + } + return message; + } + + internal HttpMessage CreateTerminateJobScheduleRequest(string jobScheduleId, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestConditions requestConditions, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/jobschedules/", false); + uri.AppendPath(jobScheduleId, true); + uri.AppendPath("/terminate", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + if (requestConditions != null) + { + request.Headers.Add(requestConditions, "R"); + } + return message; + } + + internal HttpMessage CreateCreateJobScheduleRequest(RequestContent content, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier201); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/jobschedules", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + request.Headers.Add("Content-Type", "application/json; odata=minimalmetadata"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetJobSchedulesRequest(int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, IEnumerable select, IEnumerable expand, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/jobschedules", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + if (maxresults != null) + { + uri.AppendQuery("maxresults", maxresults.Value, true); + } + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (select != null && !(select is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined)) + { + uri.AppendQueryDelimited("$select", select, ",", true); + } + if (expand != null && !(expand is ChangeTrackingList changeTrackingList0 && changeTrackingList0.IsUndefined)) + { + uri.AppendQueryDelimited("$expand", expand, ",", true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateCreateTaskRequest(string jobId, RequestContent content, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier201); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendPath("/tasks", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + request.Headers.Add("Content-Type", "application/json; odata=minimalmetadata"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetTasksRequest(string jobId, int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, IEnumerable select, IEnumerable expand, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendPath("/tasks", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + if (maxresults != null) + { + uri.AppendQuery("maxresults", maxresults.Value, true); + } + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (select != null && !(select is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined)) + { + uri.AppendQueryDelimited("$select", select, ",", true); + } + if (expand != null && !(expand is ChangeTrackingList changeTrackingList0 && changeTrackingList0.IsUndefined)) + { + uri.AppendQueryDelimited("$expand", expand, ",", true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateCreateTaskCollectionRequest(string jobId, RequestContent content, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendPath("/addtaskcollection", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + request.Headers.Add("Content-Type", "application/json; odata=minimalmetadata"); + request.Content = content; + return message; + } + + internal HttpMessage CreateDeleteTaskRequest(string jobId, string taskId, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestConditions requestConditions, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendPath("/tasks/", false); + uri.AppendPath(taskId, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + if (requestConditions != null) + { + request.Headers.Add(requestConditions, "R"); + } + return message; + } + + internal HttpMessage CreateGetTaskRequest(string jobId, string taskId, int? timeOutInSeconds, DateTimeOffset? ocpdate, IEnumerable select, IEnumerable expand, RequestConditions requestConditions, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendPath("/tasks/", false); + uri.AppendPath(taskId, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + if (select != null && !(select is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined)) + { + uri.AppendQueryDelimited("$select", select, ",", true); + } + if (expand != null && !(expand is ChangeTrackingList changeTrackingList0 && changeTrackingList0.IsUndefined)) + { + uri.AppendQueryDelimited("$expand", expand, ",", true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + if (requestConditions != null) + { + request.Headers.Add(requestConditions, "R"); + } + return message; + } + + internal HttpMessage CreateReplaceTaskRequest(string jobId, string taskId, RequestContent content, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestConditions requestConditions, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendPath("/tasks/", false); + uri.AppendPath(taskId, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + if (requestConditions != null) + { + request.Headers.Add(requestConditions, "R"); + } + request.Headers.Add("Content-Type", "application/json; odata=minimalmetadata"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetSubTasksRequest(string jobId, string taskId, int? timeOutInSeconds, DateTimeOffset? ocpdate, IEnumerable select, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendPath("/tasks/", false); + uri.AppendPath(taskId, true); + uri.AppendPath("/subtasksinfo", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + if (select != null && !(select is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined)) + { + uri.AppendQueryDelimited("$select", select, ",", true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateTerminateTaskRequest(string jobId, string taskId, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestConditions requestConditions, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendPath("/tasks/", false); + uri.AppendPath(taskId, true); + uri.AppendPath("/terminate", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + if (requestConditions != null) + { + request.Headers.Add(requestConditions, "R"); + } + return message; + } + + internal HttpMessage CreateReactivateTaskRequest(string jobId, string taskId, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestConditions requestConditions, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendPath("/tasks/", false); + uri.AppendPath(taskId, true); + uri.AppendPath("/reactivate", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + if (requestConditions != null) + { + request.Headers.Add(requestConditions, "R"); + } + return message; + } + + internal HttpMessage CreateDeleteTaskFileRequest(string jobId, string taskId, string filePath, int? timeOutInSeconds, DateTimeOffset? ocpdate, bool? recursive, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendPath("/tasks/", false); + uri.AppendPath(taskId, true); + uri.AppendPath("/files/", false); + uri.AppendPath(filePath, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + if (recursive != null) + { + uri.AppendQuery("recursive", recursive.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateGetTaskFileRequest(string jobId, string taskId, string filePath, int? timeOutInSeconds, DateTimeOffset? ocpdate, string ocpRange, RequestConditions requestConditions, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendPath("/tasks/", false); + uri.AppendPath(taskId, true); + uri.AppendPath("/files/", false); + uri.AppendPath(filePath, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/octet-stream"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + if (ocpRange != null) + { + request.Headers.Add("ocp-range", ocpRange); + } + if (requestConditions != null) + { + request.Headers.Add(requestConditions, "R"); + } + return message; + } + + internal HttpMessage CreateGetTaskFilePropertiesInternalRequest(string jobId, string taskId, string filePath, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestConditions requestConditions, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Head; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendPath("/tasks/", false); + uri.AppendPath(taskId, true); + uri.AppendPath("/files/", false); + uri.AppendPath(filePath, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + if (requestConditions != null) + { + request.Headers.Add(requestConditions, "R"); + } + return message; + } + + internal HttpMessage CreateGetTaskFilesRequest(string jobId, string taskId, int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, bool? recursive, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendPath("/tasks/", false); + uri.AppendPath(taskId, true); + uri.AppendPath("/files", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + if (maxresults != null) + { + uri.AppendQuery("maxresults", maxresults.Value, true); + } + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (recursive != null) + { + uri.AppendQuery("recursive", recursive.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateCreateNodeUserRequest(string poolId, string nodeId, RequestContent content, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier201); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/pools/", false); + uri.AppendPath(poolId, true); + uri.AppendPath("/nodes/", false); + uri.AppendPath(nodeId, true); + uri.AppendPath("/users", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + request.Headers.Add("Content-Type", "application/json; odata=minimalmetadata"); + request.Content = content; + return message; + } + + internal HttpMessage CreateDeleteNodeUserRequest(string poolId, string nodeId, string userName, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/pools/", false); + uri.AppendPath(poolId, true); + uri.AppendPath("/nodes/", false); + uri.AppendPath(nodeId, true); + uri.AppendPath("/users/", false); + uri.AppendPath(userName, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateReplaceNodeUserRequest(string poolId, string nodeId, string userName, RequestContent content, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/pools/", false); + uri.AppendPath(poolId, true); + uri.AppendPath("/nodes/", false); + uri.AppendPath(nodeId, true); + uri.AppendPath("/users/", false); + uri.AppendPath(userName, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + request.Headers.Add("Content-Type", "application/json; odata=minimalmetadata"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetNodeRequest(string poolId, string nodeId, int? timeOutInSeconds, DateTimeOffset? ocpdate, IEnumerable select, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/pools/", false); + uri.AppendPath(poolId, true); + uri.AppendPath("/nodes/", false); + uri.AppendPath(nodeId, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + if (select != null && !(select is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined)) + { + uri.AppendQueryDelimited("$select", select, ",", true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateRebootNodeRequest(string poolId, string nodeId, RequestContent content, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier202); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/pools/", false); + uri.AppendPath(poolId, true); + uri.AppendPath("/nodes/", false); + uri.AppendPath(nodeId, true); + uri.AppendPath("/reboot", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + request.Headers.Add("Content-Type", "application/json; odata=minimalmetadata"); + request.Content = content; + return message; + } + + internal HttpMessage CreateDisableNodeSchedulingRequest(string poolId, string nodeId, RequestContent content, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/pools/", false); + uri.AppendPath(poolId, true); + uri.AppendPath("/nodes/", false); + uri.AppendPath(nodeId, true); + uri.AppendPath("/disablescheduling", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + request.Headers.Add("Content-Type", "application/json; odata=minimalmetadata"); + request.Content = content; + return message; + } + + internal HttpMessage CreateEnableNodeSchedulingRequest(string poolId, string nodeId, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/pools/", false); + uri.AppendPath(poolId, true); + uri.AppendPath("/nodes/", false); + uri.AppendPath(nodeId, true); + uri.AppendPath("/enablescheduling", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateGetNodeRemoteLoginSettingsRequest(string poolId, string nodeId, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/pools/", false); + uri.AppendPath(poolId, true); + uri.AppendPath("/nodes/", false); + uri.AppendPath(nodeId, true); + uri.AppendPath("/remoteloginsettings", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateUploadNodeLogsRequest(string poolId, string nodeId, RequestContent content, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/pools/", false); + uri.AppendPath(poolId, true); + uri.AppendPath("/nodes/", false); + uri.AppendPath(nodeId, true); + uri.AppendPath("/uploadbatchservicelogs", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + request.Headers.Add("Content-Type", "application/json; odata=minimalmetadata"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetNodesRequest(string poolId, int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, IEnumerable select, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/pools/", false); + uri.AppendPath(poolId, true); + uri.AppendPath("/nodes", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + if (maxresults != null) + { + uri.AppendQuery("maxresults", maxresults.Value, true); + } + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (select != null && !(select is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined)) + { + uri.AppendQueryDelimited("$select", select, ",", true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateGetNodeExtensionRequest(string poolId, string nodeId, string extensionName, int? timeOutInSeconds, DateTimeOffset? ocpdate, IEnumerable select, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/pools/", false); + uri.AppendPath(poolId, true); + uri.AppendPath("/nodes/", false); + uri.AppendPath(nodeId, true); + uri.AppendPath("/extensions/", false); + uri.AppendPath(extensionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + if (select != null && !(select is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined)) + { + uri.AppendQueryDelimited("$select", select, ",", true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateGetNodeExtensionsRequest(string poolId, string nodeId, int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, IEnumerable select, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/pools/", false); + uri.AppendPath(poolId, true); + uri.AppendPath("/nodes/", false); + uri.AppendPath(nodeId, true); + uri.AppendPath("/extensions", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + if (maxresults != null) + { + uri.AppendQuery("maxresults", maxresults.Value, true); + } + if (select != null && !(select is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined)) + { + uri.AppendQueryDelimited("$select", select, ",", true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateDeleteNodeFileRequest(string poolId, string nodeId, string filePath, int? timeOutInSeconds, DateTimeOffset? ocpdate, bool? recursive, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/pools/", false); + uri.AppendPath(poolId, true); + uri.AppendPath("/nodes/", false); + uri.AppendPath(nodeId, true); + uri.AppendPath("/files/", false); + uri.AppendPath(filePath, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + if (recursive != null) + { + uri.AppendQuery("recursive", recursive.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateGetNodeFileRequest(string poolId, string nodeId, string filePath, int? timeOutInSeconds, DateTimeOffset? ocpdate, string ocpRange, RequestConditions requestConditions, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/pools/", false); + uri.AppendPath(poolId, true); + uri.AppendPath("/nodes/", false); + uri.AppendPath(nodeId, true); + uri.AppendPath("/files/", false); + uri.AppendPath(filePath, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/octet-stream"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + if (ocpRange != null) + { + request.Headers.Add("ocp-range", ocpRange); + } + if (requestConditions != null) + { + request.Headers.Add(requestConditions, "R"); + } + return message; + } + + internal HttpMessage CreateGetNodeFilePropertiesInternalRequest(string poolId, string nodeId, string filePath, int? timeOutInSeconds, DateTimeOffset? ocpdate, RequestConditions requestConditions, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Head; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/pools/", false); + uri.AppendPath(poolId, true); + uri.AppendPath("/nodes/", false); + uri.AppendPath(nodeId, true); + uri.AppendPath("/files/", false); + uri.AppendPath(filePath, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + if (requestConditions != null) + { + request.Headers.Add(requestConditions, "R"); + } + return message; + } + + internal HttpMessage CreateGetNodeFilesRequest(string poolId, string nodeId, int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, bool? recursive, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/pools/", false); + uri.AppendPath(poolId, true); + uri.AppendPath("/nodes/", false); + uri.AppendPath(nodeId, true); + uri.AppendPath("/files", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (timeOutInSeconds != null) + { + uri.AppendQuery("timeOut", timeOutInSeconds.Value, true); + } + if (maxresults != null) + { + uri.AppendQuery("maxresults", maxresults.Value, true); + } + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (recursive != null) + { + uri.AppendQuery("recursive", recursive.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateGetApplicationsNextPageRequest(string nextLink, int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateGetPoolUsageMetricsNextPageRequest(string nextLink, int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, DateTimeOffset? starttime, DateTimeOffset? endtime, string filter, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateGetPoolsNextPageRequest(string nextLink, int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, IEnumerable select, IEnumerable expand, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateGetSupportedImagesNextPageRequest(string nextLink, int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateGetPoolNodeCountsNextPageRequest(string nextLink, int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateGetJobsNextPageRequest(string nextLink, int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, IEnumerable select, IEnumerable expand, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateGetJobsFromSchedulesNextPageRequest(string nextLink, string jobScheduleId, int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, IEnumerable select, IEnumerable expand, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateGetJobPreparationAndReleaseTaskStatusesNextPageRequest(string nextLink, string jobId, int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, IEnumerable select, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateGetJobSchedulesNextPageRequest(string nextLink, int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, IEnumerable select, IEnumerable expand, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateGetTasksNextPageRequest(string nextLink, string jobId, int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, IEnumerable select, IEnumerable expand, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateGetSubTasksNextPageRequest(string nextLink, string jobId, string taskId, int? timeOutInSeconds, DateTimeOffset? ocpdate, IEnumerable select, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateGetTaskFilesNextPageRequest(string nextLink, string jobId, string taskId, int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, bool? recursive, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateGetNodesNextPageRequest(string nextLink, string poolId, int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, IEnumerable select, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateGetNodeExtensionsNextPageRequest(string nextLink, string poolId, string nodeId, int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, IEnumerable select, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + internal HttpMessage CreateGetNodeFilesNextPageRequest(string nextLink, string poolId, string nodeId, int? timeOutInSeconds, DateTimeOffset? ocpdate, int? maxresults, string filter, bool? recursive, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("client-request-id", message.Request.ClientRequestId); + request.Headers.Add("return-client-request-id", "true"); + if (ocpdate != null) + { + request.Headers.Add("ocp-date", ocpdate.Value, "R"); + } + return message; + } + + private static RequestContext DefaultRequestContext = new RequestContext(); + internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) + { + if (!cancellationToken.CanBeCanceled) + { + return DefaultRequestContext; + } + + return new RequestContext() { CancellationToken = cancellationToken }; + } + + private static ResponseClassifier _responseClassifier200; + private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); + private static ResponseClassifier _responseClassifier201; + private static ResponseClassifier ResponseClassifier201 => _responseClassifier201 ??= new StatusCodeClassifier(stackalloc ushort[] { 201 }); + private static ResponseClassifier _responseClassifier202; + private static ResponseClassifier ResponseClassifier202 => _responseClassifier202 ??= new StatusCodeClassifier(stackalloc ushort[] { 202 }); + private static ResponseClassifier _responseClassifier200404; + private static ResponseClassifier ResponseClassifier200404 => _responseClassifier200404 ??= new StatusCodeClassifier(stackalloc ushort[] { 200, 404 }); + private static ResponseClassifier _responseClassifier204; + private static ResponseClassifier ResponseClassifier204 => _responseClassifier204 ??= new StatusCodeClassifier(stackalloc ushort[] { 204 }); + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchClientOptions.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchClientOptions.cs new file mode 100644 index 0000000000000..eab2e5942414c --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchClientOptions.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + /// Client options for BatchClient. + public partial class BatchClientOptions : ClientOptions + { + private const ServiceVersion LatestVersion = ServiceVersion.V2024_02_01_19_0; + + /// The version of the service to use. + public enum ServiceVersion + { + /// Service version "2024-02-01.19.0". + V2024_02_01_19_0 = 1, + } + + internal string Version { get; } + + /// Initializes new instance of BatchClientOptions. + public BatchClientOptions(ServiceVersion version = LatestVersion) + { + Version = version switch + { + ServiceVersion.V2024_02_01_19_0 => "2024-02-01.19.0", + _ => throw new NotSupportedException() + }; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchError.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchError.Serialization.cs new file mode 100644 index 0000000000000..116c883bb17c8 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchError.Serialization.cs @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchError : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchError)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + if (Optional.IsDefined(Message)) + { + writer.WritePropertyName("message"u8); + writer.WriteObjectValue(Message, options); + } + if (Optional.IsCollectionDefined(Values)) + { + writer.WritePropertyName("values"u8); + writer.WriteStartArray(); + foreach (var item in Values) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchError)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchError(document.RootElement, options); + } + + internal static BatchError DeserializeBatchError(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string code = default; + BatchErrorMessage message = default; + IReadOnlyList values = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("message"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + message = BatchErrorMessage.DeserializeBatchErrorMessage(property.Value, options); + continue; + } + if (property.NameEquals("values"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BatchErrorDetail.DeserializeBatchErrorDetail(item, options)); + } + values = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchError(code, message, values ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchError)} does not support writing '{options.Format}' format."); + } + } + + BatchError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchError(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchError)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchError FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchError(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchError.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchError.cs new file mode 100644 index 0000000000000..e1d78423d0af2 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchError.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; + +namespace Azure.Compute.Batch +{ + /// An error response received from the Azure Batch service. + public partial class BatchError + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. + /// is null. + internal BatchError(string code) + { + Argument.AssertNotNull(code, nameof(code)); + + Code = code; + Values = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. + /// A message describing the error, intended to be suitable for display in a user interface. + /// A collection of key-value pairs containing additional details about the error. + /// Keeps track of any properties unknown to the library. + internal BatchError(string code, BatchErrorMessage message, IReadOnlyList values, IDictionary serializedAdditionalRawData) + { + Code = code; + Message = message; + Values = values; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchError() + { + } + + /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. + public string Code { get; } + /// A message describing the error, intended to be suitable for display in a user interface. + public BatchErrorMessage Message { get; } + /// A collection of key-value pairs containing additional details about the error. + public IReadOnlyList Values { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchErrorDetail.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchErrorDetail.Serialization.cs new file mode 100644 index 0000000000000..d00a4bf014bf3 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchErrorDetail.Serialization.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchErrorDetail : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchErrorDetail)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Key)) + { + writer.WritePropertyName("key"u8); + writer.WriteStringValue(Key); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchErrorDetail IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchErrorDetail)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchErrorDetail(document.RootElement, options); + } + + internal static BatchErrorDetail DeserializeBatchErrorDetail(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string key = default; + string value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("key"u8)) + { + key = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchErrorDetail(key, value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchErrorDetail)} does not support writing '{options.Format}' format."); + } + } + + BatchErrorDetail IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchErrorDetail(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchErrorDetail)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchErrorDetail FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchErrorDetail(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchErrorDetail.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchErrorDetail.cs new file mode 100644 index 0000000000000..693126eae63ec --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchErrorDetail.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// An item of additional information included in an Azure Batch error response. + public partial class BatchErrorDetail + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal BatchErrorDetail() + { + } + + /// Initializes a new instance of . + /// An identifier specifying the meaning of the Value property. + /// The additional information included with the error response. + /// Keeps track of any properties unknown to the library. + internal BatchErrorDetail(string key, string value, IDictionary serializedAdditionalRawData) + { + Key = key; + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// An identifier specifying the meaning of the Value property. + public string Key { get; } + /// The additional information included with the error response. + public string Value { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchErrorMessage.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchErrorMessage.Serialization.cs new file mode 100644 index 0000000000000..cb1c107a40ccc --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchErrorMessage.Serialization.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchErrorMessage : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchErrorMessage)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Lang)) + { + writer.WritePropertyName("lang"u8); + writer.WriteStringValue(Lang); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchErrorMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchErrorMessage)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchErrorMessage(document.RootElement, options); + } + + internal static BatchErrorMessage DeserializeBatchErrorMessage(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string lang = default; + string value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("lang"u8)) + { + lang = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchErrorMessage(lang, value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchErrorMessage)} does not support writing '{options.Format}' format."); + } + } + + BatchErrorMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchErrorMessage(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchErrorMessage)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchErrorMessage FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchErrorMessage(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchErrorMessage.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchErrorMessage.cs new file mode 100644 index 0000000000000..ce2f513f2ff6e --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchErrorMessage.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// An error message received in an Azure Batch error response. + public partial class BatchErrorMessage + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal BatchErrorMessage() + { + } + + /// Initializes a new instance of . + /// The language code of the error message. + /// The text of the message. + /// Keeps track of any properties unknown to the library. + internal BatchErrorMessage(string lang, string value, IDictionary serializedAdditionalRawData) + { + Lang = lang; + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The language code of the error message. + public string Lang { get; } + /// The text of the message. + public string Value { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJob.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJob.Serialization.cs new file mode 100644 index 0000000000000..70ba89ca2ada5 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJob.Serialization.cs @@ -0,0 +1,541 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchJob : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJob)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W" && Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (options.Format != "W" && Optional.IsDefined(UsesTaskDependencies)) + { + writer.WritePropertyName("usesTaskDependencies"u8); + writer.WriteBooleanValue(UsesTaskDependencies.Value); + } + if (options.Format != "W" && Optional.IsDefined(Url)) + { + writer.WritePropertyName("url"u8); + writer.WriteStringValue(Url); + } + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("eTag"u8); + writer.WriteStringValue(ETag); + } + if (options.Format != "W" && Optional.IsDefined(LastModified)) + { + writer.WritePropertyName("lastModified"u8); + writer.WriteStringValue(LastModified.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(CreationTime)) + { + writer.WritePropertyName("creationTime"u8); + writer.WriteStringValue(CreationTime.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(StateTransitionTime)) + { + writer.WritePropertyName("stateTransitionTime"u8); + writer.WriteStringValue(StateTransitionTime.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(PreviousState)) + { + writer.WritePropertyName("previousState"u8); + writer.WriteStringValue(PreviousState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(PreviousStateTransitionTime)) + { + writer.WritePropertyName("previousStateTransitionTime"u8); + writer.WriteStringValue(PreviousStateTransitionTime.Value, "O"); + } + if (Optional.IsDefined(Priority)) + { + writer.WritePropertyName("priority"u8); + writer.WriteNumberValue(Priority.Value); + } + if (Optional.IsDefined(AllowTaskPreemption)) + { + writer.WritePropertyName("allowTaskPreemption"u8); + writer.WriteBooleanValue(AllowTaskPreemption.Value); + } + if (Optional.IsDefined(MaxParallelTasks)) + { + writer.WritePropertyName("maxParallelTasks"u8); + writer.WriteNumberValue(MaxParallelTasks.Value); + } + if (Optional.IsDefined(Constraints)) + { + writer.WritePropertyName("constraints"u8); + writer.WriteObjectValue(Constraints, options); + } + if (options.Format != "W" && Optional.IsDefined(JobManagerTask)) + { + writer.WritePropertyName("jobManagerTask"u8); + writer.WriteObjectValue(JobManagerTask, options); + } + if (options.Format != "W" && Optional.IsDefined(JobPreparationTask)) + { + writer.WritePropertyName("jobPreparationTask"u8); + writer.WriteObjectValue(JobPreparationTask, options); + } + if (options.Format != "W" && Optional.IsDefined(JobReleaseTask)) + { + writer.WritePropertyName("jobReleaseTask"u8); + writer.WriteObjectValue(JobReleaseTask, options); + } + if (options.Format != "W" && Optional.IsCollectionDefined(CommonEnvironmentSettings)) + { + writer.WritePropertyName("commonEnvironmentSettings"u8); + writer.WriteStartArray(); + foreach (var item in CommonEnvironmentSettings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("poolInfo"u8); + writer.WriteObjectValue(PoolInfo, options); + if (Optional.IsDefined(OnAllTasksComplete)) + { + writer.WritePropertyName("onAllTasksComplete"u8); + writer.WriteStringValue(OnAllTasksComplete.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(OnTaskFailure)) + { + writer.WritePropertyName("onTaskFailure"u8); + writer.WriteStringValue(OnTaskFailure.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(NetworkConfiguration)) + { + writer.WritePropertyName("networkConfiguration"u8); + writer.WriteObjectValue(NetworkConfiguration, options); + } + if (Optional.IsCollectionDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); + writer.WriteStartArray(); + foreach (var item in Metadata) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(ExecutionInfo)) + { + writer.WritePropertyName("executionInfo"u8); + writer.WriteObjectValue(ExecutionInfo, options); + } + if (options.Format != "W" && Optional.IsDefined(Stats)) + { + writer.WritePropertyName("stats"u8); + writer.WriteObjectValue(Stats, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchJob IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJob)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchJob(document.RootElement, options); + } + + internal static BatchJob DeserializeBatchJob(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + string displayName = default; + bool? usesTaskDependencies = default; + string url = default; + string eTag = default; + DateTimeOffset? lastModified = default; + DateTimeOffset? creationTime = default; + BatchJobState? state = default; + DateTimeOffset? stateTransitionTime = default; + BatchJobState? previousState = default; + DateTimeOffset? previousStateTransitionTime = default; + int? priority = default; + bool? allowTaskPreemption = default; + int? maxParallelTasks = default; + BatchJobConstraints constraints = default; + BatchJobManagerTask jobManagerTask = default; + BatchJobPreparationTask jobPreparationTask = default; + BatchJobReleaseTask jobReleaseTask = default; + IReadOnlyList commonEnvironmentSettings = default; + BatchPoolInfo poolInfo = default; + OnAllBatchTasksComplete? onAllTasksComplete = default; + OnBatchTaskFailure? onTaskFailure = default; + BatchJobNetworkConfiguration networkConfiguration = default; + IList metadata = default; + BatchJobExecutionInfo executionInfo = default; + BatchJobStatistics stats = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("usesTaskDependencies"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + usesTaskDependencies = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("url"u8)) + { + url = property.Value.GetString(); + continue; + } + if (property.NameEquals("eTag"u8)) + { + eTag = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastModified"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastModified = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("creationTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + creationTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new BatchJobState(property.Value.GetString()); + continue; + } + if (property.NameEquals("stateTransitionTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + stateTransitionTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("previousState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + previousState = new BatchJobState(property.Value.GetString()); + continue; + } + if (property.NameEquals("previousStateTransitionTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + previousStateTransitionTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("priority"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + priority = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("allowTaskPreemption"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allowTaskPreemption = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("maxParallelTasks"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxParallelTasks = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("constraints"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + constraints = BatchJobConstraints.DeserializeBatchJobConstraints(property.Value, options); + continue; + } + if (property.NameEquals("jobManagerTask"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + jobManagerTask = BatchJobManagerTask.DeserializeBatchJobManagerTask(property.Value, options); + continue; + } + if (property.NameEquals("jobPreparationTask"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + jobPreparationTask = BatchJobPreparationTask.DeserializeBatchJobPreparationTask(property.Value, options); + continue; + } + if (property.NameEquals("jobReleaseTask"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + jobReleaseTask = BatchJobReleaseTask.DeserializeBatchJobReleaseTask(property.Value, options); + continue; + } + if (property.NameEquals("commonEnvironmentSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EnvironmentSetting.DeserializeEnvironmentSetting(item, options)); + } + commonEnvironmentSettings = array; + continue; + } + if (property.NameEquals("poolInfo"u8)) + { + poolInfo = BatchPoolInfo.DeserializeBatchPoolInfo(property.Value, options); + continue; + } + if (property.NameEquals("onAllTasksComplete"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onAllTasksComplete = new OnAllBatchTasksComplete(property.Value.GetString()); + continue; + } + if (property.NameEquals("onTaskFailure"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onTaskFailure = new OnBatchTaskFailure(property.Value.GetString()); + continue; + } + if (property.NameEquals("networkConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkConfiguration = BatchJobNetworkConfiguration.DeserializeBatchJobNetworkConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("metadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MetadataItem.DeserializeMetadataItem(item, options)); + } + metadata = array; + continue; + } + if (property.NameEquals("executionInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + executionInfo = BatchJobExecutionInfo.DeserializeBatchJobExecutionInfo(property.Value, options); + continue; + } + if (property.NameEquals("stats"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + stats = BatchJobStatistics.DeserializeBatchJobStatistics(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchJob( + id, + displayName, + usesTaskDependencies, + url, + eTag, + lastModified, + creationTime, + state, + stateTransitionTime, + previousState, + previousStateTransitionTime, + priority, + allowTaskPreemption, + maxParallelTasks, + constraints, + jobManagerTask, + jobPreparationTask, + jobReleaseTask, + commonEnvironmentSettings ?? new ChangeTrackingList(), + poolInfo, + onAllTasksComplete, + onTaskFailure, + networkConfiguration, + metadata ?? new ChangeTrackingList(), + executionInfo, + stats, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchJob)} does not support writing '{options.Format}' format."); + } + } + + BatchJob IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchJob(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchJob)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchJob FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchJob(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJob.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJob.cs new file mode 100644 index 0000000000000..b516fefc12923 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJob.cs @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// An Azure Batch Job. + public partial class BatchJob + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The Pool settings associated with the Job. + /// is null. + public BatchJob(BatchPoolInfo poolInfo) + { + Argument.AssertNotNull(poolInfo, nameof(poolInfo)); + + CommonEnvironmentSettings = new ChangeTrackingList(); + PoolInfo = poolInfo; + Metadata = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// A string that uniquely identifies the Job within the Account. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an Account that differ only by case). + /// The display name for the Job. + /// Whether Tasks in the Job can define dependencies on each other. The default is false. + /// The URL of the Job. + /// The ETag of the Job. This is an opaque string. You can use it to detect whether the Job has changed between requests. In particular, you can be pass the ETag when updating a Job to specify that your changes should take effect only if nobody else has modified the Job in the meantime. + /// The last modified time of the Job. This is the last time at which the Job level data, such as the Job state or priority, changed. It does not factor in task-level changes such as adding new Tasks or Tasks changing state. + /// The creation time of the Job. + /// The current state of the Job. + /// The time at which the Job entered its current state. + /// The previous state of the Job. This property is not set if the Job is in its initial Active state. + /// The time at which the Job entered its previous state. This property is not set if the Job is in its initial Active state. + /// The priority of the Job. Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0. + /// Whether Tasks in this job can be preempted by other high priority jobs. If the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job. You can update a job's allowTaskPreemption after it has been created using the update job API. + /// The maximum number of tasks that can be executed in parallel for the job. The value of maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default value is -1, which means there's no limit to the number of tasks that can be run at once. You can update a job's maxParallelTasks after it has been created using the update job API. + /// The execution constraints for the Job. + /// Details of a Job Manager Task to be launched when the Job is started. + /// The Job Preparation Task. The Job Preparation Task is a special Task run on each Compute Node before any other Task of the Job. + /// The Job Release Task. The Job Release Task is a special Task run at the end of the Job on each Compute Node that has run any other Task of the Job. + /// The list of common environment variable settings. These environment variables are set for all Tasks in the Job (including the Job Manager, Job Preparation and Job Release Tasks). Individual Tasks can override an environment setting specified here by specifying the same setting name with a different value. + /// The Pool settings associated with the Job. + /// The action the Batch service should take when all Tasks in the Job are in the completed state. The default is noaction. + /// The action the Batch service should take when any Task in the Job fails. A Task is considered to have failed if has a failureInfo. A failureInfo is set if the Task completes with a non-zero exit code after exhausting its retry count, or if there was an error starting the Task, for example due to a resource file download error. The default is noaction. + /// The network configuration for the Job. + /// A list of name-value pairs associated with the Job as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. + /// The execution information for the Job. + /// Resource usage statistics for the entire lifetime of the Job. This property is populated only if the CloudJob was retrieved with an expand clause including the 'stats' attribute; otherwise it is null. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes. + /// Keeps track of any properties unknown to the library. + internal BatchJob(string id, string displayName, bool? usesTaskDependencies, string url, string eTag, DateTimeOffset? lastModified, DateTimeOffset? creationTime, BatchJobState? state, DateTimeOffset? stateTransitionTime, BatchJobState? previousState, DateTimeOffset? previousStateTransitionTime, int? priority, bool? allowTaskPreemption, int? maxParallelTasks, BatchJobConstraints constraints, BatchJobManagerTask jobManagerTask, BatchJobPreparationTask jobPreparationTask, BatchJobReleaseTask jobReleaseTask, IReadOnlyList commonEnvironmentSettings, BatchPoolInfo poolInfo, OnAllBatchTasksComplete? onAllTasksComplete, OnBatchTaskFailure? onTaskFailure, BatchJobNetworkConfiguration networkConfiguration, IList metadata, BatchJobExecutionInfo executionInfo, BatchJobStatistics stats, IDictionary serializedAdditionalRawData) + { + Id = id; + DisplayName = displayName; + UsesTaskDependencies = usesTaskDependencies; + Url = url; + ETag = eTag; + LastModified = lastModified; + CreationTime = creationTime; + State = state; + StateTransitionTime = stateTransitionTime; + PreviousState = previousState; + PreviousStateTransitionTime = previousStateTransitionTime; + Priority = priority; + AllowTaskPreemption = allowTaskPreemption; + MaxParallelTasks = maxParallelTasks; + Constraints = constraints; + JobManagerTask = jobManagerTask; + JobPreparationTask = jobPreparationTask; + JobReleaseTask = jobReleaseTask; + CommonEnvironmentSettings = commonEnvironmentSettings; + PoolInfo = poolInfo; + OnAllTasksComplete = onAllTasksComplete; + OnTaskFailure = onTaskFailure; + NetworkConfiguration = networkConfiguration; + Metadata = metadata; + ExecutionInfo = executionInfo; + Stats = stats; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchJob() + { + } + + /// A string that uniquely identifies the Job within the Account. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an Account that differ only by case). + public string Id { get; } + /// The display name for the Job. + public string DisplayName { get; } + /// Whether Tasks in the Job can define dependencies on each other. The default is false. + public bool? UsesTaskDependencies { get; } + /// The URL of the Job. + public string Url { get; } + /// The ETag of the Job. This is an opaque string. You can use it to detect whether the Job has changed between requests. In particular, you can be pass the ETag when updating a Job to specify that your changes should take effect only if nobody else has modified the Job in the meantime. + public string ETag { get; } + /// The last modified time of the Job. This is the last time at which the Job level data, such as the Job state or priority, changed. It does not factor in task-level changes such as adding new Tasks or Tasks changing state. + public DateTimeOffset? LastModified { get; } + /// The creation time of the Job. + public DateTimeOffset? CreationTime { get; } + /// The current state of the Job. + public BatchJobState? State { get; } + /// The time at which the Job entered its current state. + public DateTimeOffset? StateTransitionTime { get; } + /// The previous state of the Job. This property is not set if the Job is in its initial Active state. + public BatchJobState? PreviousState { get; } + /// The time at which the Job entered its previous state. This property is not set if the Job is in its initial Active state. + public DateTimeOffset? PreviousStateTransitionTime { get; } + /// The priority of the Job. Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0. + public int? Priority { get; set; } + /// Whether Tasks in this job can be preempted by other high priority jobs. If the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job. You can update a job's allowTaskPreemption after it has been created using the update job API. + public bool? AllowTaskPreemption { get; set; } + /// The maximum number of tasks that can be executed in parallel for the job. The value of maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default value is -1, which means there's no limit to the number of tasks that can be run at once. You can update a job's maxParallelTasks after it has been created using the update job API. + public int? MaxParallelTasks { get; set; } + /// The execution constraints for the Job. + public BatchJobConstraints Constraints { get; set; } + /// Details of a Job Manager Task to be launched when the Job is started. + public BatchJobManagerTask JobManagerTask { get; } + /// The Job Preparation Task. The Job Preparation Task is a special Task run on each Compute Node before any other Task of the Job. + public BatchJobPreparationTask JobPreparationTask { get; } + /// The Job Release Task. The Job Release Task is a special Task run at the end of the Job on each Compute Node that has run any other Task of the Job. + public BatchJobReleaseTask JobReleaseTask { get; } + /// The list of common environment variable settings. These environment variables are set for all Tasks in the Job (including the Job Manager, Job Preparation and Job Release Tasks). Individual Tasks can override an environment setting specified here by specifying the same setting name with a different value. + public IReadOnlyList CommonEnvironmentSettings { get; } + /// The Pool settings associated with the Job. + public BatchPoolInfo PoolInfo { get; set; } + /// The action the Batch service should take when all Tasks in the Job are in the completed state. The default is noaction. + public OnAllBatchTasksComplete? OnAllTasksComplete { get; set; } + /// The action the Batch service should take when any Task in the Job fails. A Task is considered to have failed if has a failureInfo. A failureInfo is set if the Task completes with a non-zero exit code after exhausting its retry count, or if there was an error starting the Task, for example due to a resource file download error. The default is noaction. + public OnBatchTaskFailure? OnTaskFailure { get; } + /// The network configuration for the Job. + public BatchJobNetworkConfiguration NetworkConfiguration { get; } + /// A list of name-value pairs associated with the Job as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. + public IList Metadata { get; } + /// The execution information for the Job. + public BatchJobExecutionInfo ExecutionInfo { get; } + /// Resource usage statistics for the entire lifetime of the Job. This property is populated only if the CloudJob was retrieved with an expand clause including the 'stats' attribute; otherwise it is null. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes. + public BatchJobStatistics Stats { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobAction.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobAction.cs new file mode 100644 index 0000000000000..ae428683e8e81 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobAction.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.Compute.Batch +{ + /// BatchJobAction enums. + public readonly partial struct BatchJobAction : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BatchJobAction(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "none"; + private const string DisableValue = "disable"; + private const string TerminateValue = "terminate"; + + /// Take no action. + public static BatchJobAction None { get; } = new BatchJobAction(NoneValue); + /// Disable the Job. This is equivalent to calling the disable Job API, with a disableTasks value of requeue. + public static BatchJobAction Disable { get; } = new BatchJobAction(DisableValue); + /// Terminate the Job. The terminationReason in the Job's executionInfo is set to "TaskFailed". + public static BatchJobAction Terminate { get; } = new BatchJobAction(TerminateValue); + /// Determines if two values are the same. + public static bool operator ==(BatchJobAction left, BatchJobAction right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BatchJobAction left, BatchJobAction right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator BatchJobAction(string value) => new BatchJobAction(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BatchJobAction other && Equals(other); + /// + public bool Equals(BatchJobAction other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobConstraints.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobConstraints.Serialization.cs new file mode 100644 index 0000000000000..bfe4dceb06631 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobConstraints.Serialization.cs @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchJobConstraints : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobConstraints)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(MaxWallClockTime)) + { + writer.WritePropertyName("maxWallClockTime"u8); + writer.WriteStringValue(MaxWallClockTime.Value, "P"); + } + if (Optional.IsDefined(MaxTaskRetryCount)) + { + writer.WritePropertyName("maxTaskRetryCount"u8); + writer.WriteNumberValue(MaxTaskRetryCount.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchJobConstraints IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobConstraints)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchJobConstraints(document.RootElement, options); + } + + internal static BatchJobConstraints DeserializeBatchJobConstraints(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + TimeSpan? maxWallClockTime = default; + int? maxTaskRetryCount = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("maxWallClockTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxWallClockTime = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("maxTaskRetryCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxTaskRetryCount = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchJobConstraints(maxWallClockTime, maxTaskRetryCount, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchJobConstraints)} does not support writing '{options.Format}' format."); + } + } + + BatchJobConstraints IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchJobConstraints(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchJobConstraints)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchJobConstraints FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchJobConstraints(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobConstraints.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobConstraints.cs new file mode 100644 index 0000000000000..78592b83c7535 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobConstraints.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// The execution constraints for a Job. + public partial class BatchJobConstraints + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public BatchJobConstraints() + { + } + + /// Initializes a new instance of . + /// The maximum elapsed time that the Job may run, measured from the time the Job is created. If the Job does not complete within the time limit, the Batch service terminates it and any Tasks that are still running. In this case, the termination reason will be MaxWallClockTimeExpiry. If this property is not specified, there is no time limit on how long the Job may run. + /// The maximum number of times each Task may be retried. The Batch service retries a Task if its exit code is nonzero. Note that this value specifically controls the number of retries. The Batch service will try each Task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries a Task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry Tasks. If the maximum retry count is -1, the Batch service retries Tasks without limit. The default value is 0 (no retries). + /// Keeps track of any properties unknown to the library. + internal BatchJobConstraints(TimeSpan? maxWallClockTime, int? maxTaskRetryCount, IDictionary serializedAdditionalRawData) + { + MaxWallClockTime = maxWallClockTime; + MaxTaskRetryCount = maxTaskRetryCount; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The maximum elapsed time that the Job may run, measured from the time the Job is created. If the Job does not complete within the time limit, the Batch service terminates it and any Tasks that are still running. In this case, the termination reason will be MaxWallClockTimeExpiry. If this property is not specified, there is no time limit on how long the Job may run. + public TimeSpan? MaxWallClockTime { get; set; } + /// The maximum number of times each Task may be retried. The Batch service retries a Task if its exit code is nonzero. Note that this value specifically controls the number of retries. The Batch service will try each Task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries a Task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry Tasks. If the maximum retry count is -1, the Batch service retries Tasks without limit. The default value is 0 (no retries). + public int? MaxTaskRetryCount { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobCreateContent.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobCreateContent.Serialization.cs new file mode 100644 index 0000000000000..b091245b29d55 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobCreateContent.Serialization.cs @@ -0,0 +1,386 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchJobCreateContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobCreateContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsDefined(UsesTaskDependencies)) + { + writer.WritePropertyName("usesTaskDependencies"u8); + writer.WriteBooleanValue(UsesTaskDependencies.Value); + } + if (Optional.IsDefined(Priority)) + { + writer.WritePropertyName("priority"u8); + writer.WriteNumberValue(Priority.Value); + } + if (Optional.IsDefined(AllowTaskPreemption)) + { + writer.WritePropertyName("allowTaskPreemption"u8); + writer.WriteBooleanValue(AllowTaskPreemption.Value); + } + if (Optional.IsDefined(MaxParallelTasks)) + { + writer.WritePropertyName("maxParallelTasks"u8); + writer.WriteNumberValue(MaxParallelTasks.Value); + } + if (Optional.IsDefined(Constraints)) + { + writer.WritePropertyName("constraints"u8); + writer.WriteObjectValue(Constraints, options); + } + if (Optional.IsDefined(JobManagerTask)) + { + writer.WritePropertyName("jobManagerTask"u8); + writer.WriteObjectValue(JobManagerTask, options); + } + if (Optional.IsDefined(JobPreparationTask)) + { + writer.WritePropertyName("jobPreparationTask"u8); + writer.WriteObjectValue(JobPreparationTask, options); + } + if (Optional.IsDefined(JobReleaseTask)) + { + writer.WritePropertyName("jobReleaseTask"u8); + writer.WriteObjectValue(JobReleaseTask, options); + } + if (Optional.IsCollectionDefined(CommonEnvironmentSettings)) + { + writer.WritePropertyName("commonEnvironmentSettings"u8); + writer.WriteStartArray(); + foreach (var item in CommonEnvironmentSettings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("poolInfo"u8); + writer.WriteObjectValue(PoolInfo, options); + if (Optional.IsDefined(OnAllTasksComplete)) + { + writer.WritePropertyName("onAllTasksComplete"u8); + writer.WriteStringValue(OnAllTasksComplete.Value.ToString()); + } + if (Optional.IsDefined(OnTaskFailure)) + { + writer.WritePropertyName("onTaskFailure"u8); + writer.WriteStringValue(OnTaskFailure.Value.ToString()); + } + if (Optional.IsDefined(NetworkConfiguration)) + { + writer.WritePropertyName("networkConfiguration"u8); + writer.WriteObjectValue(NetworkConfiguration, options); + } + if (Optional.IsCollectionDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); + writer.WriteStartArray(); + foreach (var item in Metadata) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchJobCreateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobCreateContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchJobCreateContent(document.RootElement, options); + } + + internal static BatchJobCreateContent DeserializeBatchJobCreateContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + string displayName = default; + bool? usesTaskDependencies = default; + int? priority = default; + bool? allowTaskPreemption = default; + int? maxParallelTasks = default; + BatchJobConstraints constraints = default; + BatchJobManagerTask jobManagerTask = default; + BatchJobPreparationTask jobPreparationTask = default; + BatchJobReleaseTask jobReleaseTask = default; + IList commonEnvironmentSettings = default; + BatchPoolInfo poolInfo = default; + OnAllBatchTasksComplete? onAllTasksComplete = default; + OnBatchTaskFailure? onTaskFailure = default; + BatchJobNetworkConfiguration networkConfiguration = default; + IList metadata = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("usesTaskDependencies"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + usesTaskDependencies = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("priority"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + priority = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("allowTaskPreemption"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allowTaskPreemption = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("maxParallelTasks"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxParallelTasks = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("constraints"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + constraints = BatchJobConstraints.DeserializeBatchJobConstraints(property.Value, options); + continue; + } + if (property.NameEquals("jobManagerTask"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + jobManagerTask = BatchJobManagerTask.DeserializeBatchJobManagerTask(property.Value, options); + continue; + } + if (property.NameEquals("jobPreparationTask"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + jobPreparationTask = BatchJobPreparationTask.DeserializeBatchJobPreparationTask(property.Value, options); + continue; + } + if (property.NameEquals("jobReleaseTask"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + jobReleaseTask = BatchJobReleaseTask.DeserializeBatchJobReleaseTask(property.Value, options); + continue; + } + if (property.NameEquals("commonEnvironmentSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EnvironmentSetting.DeserializeEnvironmentSetting(item, options)); + } + commonEnvironmentSettings = array; + continue; + } + if (property.NameEquals("poolInfo"u8)) + { + poolInfo = BatchPoolInfo.DeserializeBatchPoolInfo(property.Value, options); + continue; + } + if (property.NameEquals("onAllTasksComplete"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onAllTasksComplete = new OnAllBatchTasksComplete(property.Value.GetString()); + continue; + } + if (property.NameEquals("onTaskFailure"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onTaskFailure = new OnBatchTaskFailure(property.Value.GetString()); + continue; + } + if (property.NameEquals("networkConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkConfiguration = BatchJobNetworkConfiguration.DeserializeBatchJobNetworkConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("metadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MetadataItem.DeserializeMetadataItem(item, options)); + } + metadata = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchJobCreateContent( + id, + displayName, + usesTaskDependencies, + priority, + allowTaskPreemption, + maxParallelTasks, + constraints, + jobManagerTask, + jobPreparationTask, + jobReleaseTask, + commonEnvironmentSettings ?? new ChangeTrackingList(), + poolInfo, + onAllTasksComplete, + onTaskFailure, + networkConfiguration, + metadata ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchJobCreateContent)} does not support writing '{options.Format}' format."); + } + } + + BatchJobCreateContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchJobCreateContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchJobCreateContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchJobCreateContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchJobCreateContent(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobCreateContent.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobCreateContent.cs new file mode 100644 index 0000000000000..ea1cd55c27ed0 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobCreateContent.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Parameters for creating an Azure Batch Job. + public partial class BatchJobCreateContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// A string that uniquely identifies the Job within the Account. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an Account that differ only by case). + /// The Pool on which the Batch service runs the Job's Tasks. + /// or is null. + public BatchJobCreateContent(string id, BatchPoolInfo poolInfo) + { + Argument.AssertNotNull(id, nameof(id)); + Argument.AssertNotNull(poolInfo, nameof(poolInfo)); + + Id = id; + CommonEnvironmentSettings = new ChangeTrackingList(); + PoolInfo = poolInfo; + Metadata = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// A string that uniquely identifies the Job within the Account. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an Account that differ only by case). + /// The display name for the Job. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. + /// Whether Tasks in the Job can define dependencies on each other. The default is false. + /// The priority of the Job. Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0. + /// Whether Tasks in this job can be preempted by other high priority jobs. If the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job. You can update a job's allowTaskPreemption after it has been created using the update job API. + /// The maximum number of tasks that can be executed in parallel for the job. The value of maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default value is -1, which means there's no limit to the number of tasks that can be run at once. You can update a job's maxParallelTasks after it has been created using the update job API. + /// The execution constraints for the Job. + /// Details of a Job Manager Task to be launched when the Job is started. If the Job does not specify a Job Manager Task, the user must explicitly add Tasks to the Job. If the Job does specify a Job Manager Task, the Batch service creates the Job Manager Task when the Job is created, and will try to schedule the Job Manager Task before scheduling other Tasks in the Job. The Job Manager Task's typical purpose is to control and/or monitor Job execution, for example by deciding what additional Tasks to run, determining when the work is complete, etc. (However, a Job Manager Task is not restricted to these activities - it is a fully-fledged Task in the system and perform whatever actions are required for the Job.) For example, a Job Manager Task might download a file specified as a parameter, analyze the contents of that file and submit additional Tasks based on those contents. + /// The Job Preparation Task. If a Job has a Job Preparation Task, the Batch service will run the Job Preparation Task on a Node before starting any Tasks of that Job on that Compute Node. + /// The Job Release Task. A Job Release Task cannot be specified without also specifying a Job Preparation Task for the Job. The Batch service runs the Job Release Task on the Nodes that have run the Job Preparation Task. The primary purpose of the Job Release Task is to undo changes to Compute Nodes made by the Job Preparation Task. Example activities include deleting local files, or shutting down services that were started as part of Job preparation. + /// The list of common environment variable settings. These environment variables are set for all Tasks in the Job (including the Job Manager, Job Preparation and Job Release Tasks). Individual Tasks can override an environment setting specified here by specifying the same setting name with a different value. + /// The Pool on which the Batch service runs the Job's Tasks. + /// The action the Batch service should take when all Tasks in the Job are in the completed state. Note that if a Job contains no Tasks, then all Tasks are considered complete. This option is therefore most commonly used with a Job Manager task; if you want to use automatic Job termination without a Job Manager, you should initially set onAllTasksComplete to noaction and update the Job properties to set onAllTasksComplete to terminatejob once you have finished adding Tasks. The default is noaction. + /// The action the Batch service should take when any Task in the Job fails. A Task is considered to have failed if has a failureInfo. A failureInfo is set if the Task completes with a non-zero exit code after exhausting its retry count, or if there was an error starting the Task, for example due to a resource file download error. The default is noaction. + /// The network configuration for the Job. + /// A list of name-value pairs associated with the Job as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. + /// Keeps track of any properties unknown to the library. + internal BatchJobCreateContent(string id, string displayName, bool? usesTaskDependencies, int? priority, bool? allowTaskPreemption, int? maxParallelTasks, BatchJobConstraints constraints, BatchJobManagerTask jobManagerTask, BatchJobPreparationTask jobPreparationTask, BatchJobReleaseTask jobReleaseTask, IList commonEnvironmentSettings, BatchPoolInfo poolInfo, OnAllBatchTasksComplete? onAllTasksComplete, OnBatchTaskFailure? onTaskFailure, BatchJobNetworkConfiguration networkConfiguration, IList metadata, IDictionary serializedAdditionalRawData) + { + Id = id; + DisplayName = displayName; + UsesTaskDependencies = usesTaskDependencies; + Priority = priority; + AllowTaskPreemption = allowTaskPreemption; + MaxParallelTasks = maxParallelTasks; + Constraints = constraints; + JobManagerTask = jobManagerTask; + JobPreparationTask = jobPreparationTask; + JobReleaseTask = jobReleaseTask; + CommonEnvironmentSettings = commonEnvironmentSettings; + PoolInfo = poolInfo; + OnAllTasksComplete = onAllTasksComplete; + OnTaskFailure = onTaskFailure; + NetworkConfiguration = networkConfiguration; + Metadata = metadata; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchJobCreateContent() + { + } + + /// A string that uniquely identifies the Job within the Account. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an Account that differ only by case). + public string Id { get; } + /// The display name for the Job. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. + public string DisplayName { get; set; } + /// Whether Tasks in the Job can define dependencies on each other. The default is false. + public bool? UsesTaskDependencies { get; set; } + /// The priority of the Job. Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0. + public int? Priority { get; set; } + /// Whether Tasks in this job can be preempted by other high priority jobs. If the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job. You can update a job's allowTaskPreemption after it has been created using the update job API. + public bool? AllowTaskPreemption { get; set; } + /// The maximum number of tasks that can be executed in parallel for the job. The value of maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default value is -1, which means there's no limit to the number of tasks that can be run at once. You can update a job's maxParallelTasks after it has been created using the update job API. + public int? MaxParallelTasks { get; set; } + /// The execution constraints for the Job. + public BatchJobConstraints Constraints { get; set; } + /// Details of a Job Manager Task to be launched when the Job is started. If the Job does not specify a Job Manager Task, the user must explicitly add Tasks to the Job. If the Job does specify a Job Manager Task, the Batch service creates the Job Manager Task when the Job is created, and will try to schedule the Job Manager Task before scheduling other Tasks in the Job. The Job Manager Task's typical purpose is to control and/or monitor Job execution, for example by deciding what additional Tasks to run, determining when the work is complete, etc. (However, a Job Manager Task is not restricted to these activities - it is a fully-fledged Task in the system and perform whatever actions are required for the Job.) For example, a Job Manager Task might download a file specified as a parameter, analyze the contents of that file and submit additional Tasks based on those contents. + public BatchJobManagerTask JobManagerTask { get; set; } + /// The Job Preparation Task. If a Job has a Job Preparation Task, the Batch service will run the Job Preparation Task on a Node before starting any Tasks of that Job on that Compute Node. + public BatchJobPreparationTask JobPreparationTask { get; set; } + /// The Job Release Task. A Job Release Task cannot be specified without also specifying a Job Preparation Task for the Job. The Batch service runs the Job Release Task on the Nodes that have run the Job Preparation Task. The primary purpose of the Job Release Task is to undo changes to Compute Nodes made by the Job Preparation Task. Example activities include deleting local files, or shutting down services that were started as part of Job preparation. + public BatchJobReleaseTask JobReleaseTask { get; set; } + /// The list of common environment variable settings. These environment variables are set for all Tasks in the Job (including the Job Manager, Job Preparation and Job Release Tasks). Individual Tasks can override an environment setting specified here by specifying the same setting name with a different value. + public IList CommonEnvironmentSettings { get; } + /// The Pool on which the Batch service runs the Job's Tasks. + public BatchPoolInfo PoolInfo { get; } + /// The action the Batch service should take when all Tasks in the Job are in the completed state. Note that if a Job contains no Tasks, then all Tasks are considered complete. This option is therefore most commonly used with a Job Manager task; if you want to use automatic Job termination without a Job Manager, you should initially set onAllTasksComplete to noaction and update the Job properties to set onAllTasksComplete to terminatejob once you have finished adding Tasks. The default is noaction. + public OnAllBatchTasksComplete? OnAllTasksComplete { get; set; } + /// The action the Batch service should take when any Task in the Job fails. A Task is considered to have failed if has a failureInfo. A failureInfo is set if the Task completes with a non-zero exit code after exhausting its retry count, or if there was an error starting the Task, for example due to a resource file download error. The default is noaction. + public OnBatchTaskFailure? OnTaskFailure { get; set; } + /// The network configuration for the Job. + public BatchJobNetworkConfiguration NetworkConfiguration { get; set; } + /// A list of name-value pairs associated with the Job as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. + public IList Metadata { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobDisableContent.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobDisableContent.Serialization.cs new file mode 100644 index 0000000000000..c9728fe091e73 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobDisableContent.Serialization.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchJobDisableContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobDisableContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("disableTasks"u8); + writer.WriteStringValue(DisableTasks.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchJobDisableContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobDisableContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchJobDisableContent(document.RootElement, options); + } + + internal static BatchJobDisableContent DeserializeBatchJobDisableContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DisableBatchJobOption disableTasks = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("disableTasks"u8)) + { + disableTasks = new DisableBatchJobOption(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchJobDisableContent(disableTasks, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchJobDisableContent)} does not support writing '{options.Format}' format."); + } + } + + BatchJobDisableContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchJobDisableContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchJobDisableContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchJobDisableContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchJobDisableContent(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobDisableContent.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobDisableContent.cs new file mode 100644 index 0000000000000..3ad54193906b3 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobDisableContent.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Parameters for disabling an Azure Batch Job. + public partial class BatchJobDisableContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// What to do with active Tasks associated with the Job. + public BatchJobDisableContent(DisableBatchJobOption disableTasks) + { + DisableTasks = disableTasks; + } + + /// Initializes a new instance of . + /// What to do with active Tasks associated with the Job. + /// Keeps track of any properties unknown to the library. + internal BatchJobDisableContent(DisableBatchJobOption disableTasks, IDictionary serializedAdditionalRawData) + { + DisableTasks = disableTasks; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchJobDisableContent() + { + } + + /// What to do with active Tasks associated with the Job. + public DisableBatchJobOption DisableTasks { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobExecutionInfo.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobExecutionInfo.Serialization.cs new file mode 100644 index 0000000000000..474ef422c50ed --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobExecutionInfo.Serialization.cs @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchJobExecutionInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobExecutionInfo)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartTime, "O"); + if (Optional.IsDefined(EndTime)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndTime.Value, "O"); + } + if (Optional.IsDefined(PoolId)) + { + writer.WritePropertyName("poolId"u8); + writer.WriteStringValue(PoolId); + } + if (Optional.IsDefined(SchedulingError)) + { + writer.WritePropertyName("schedulingError"u8); + writer.WriteObjectValue(SchedulingError, options); + } + if (Optional.IsDefined(TerminationReason)) + { + writer.WritePropertyName("terminateReason"u8); + writer.WriteStringValue(TerminationReason); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchJobExecutionInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobExecutionInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchJobExecutionInfo(document.RootElement, options); + } + + internal static BatchJobExecutionInfo DeserializeBatchJobExecutionInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset startTime = default; + DateTimeOffset? endTime = default; + string poolId = default; + BatchJobSchedulingError schedulingError = default; + string terminateReason = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("startTime"u8)) + { + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("poolId"u8)) + { + poolId = property.Value.GetString(); + continue; + } + if (property.NameEquals("schedulingError"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schedulingError = BatchJobSchedulingError.DeserializeBatchJobSchedulingError(property.Value, options); + continue; + } + if (property.NameEquals("terminateReason"u8)) + { + terminateReason = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchJobExecutionInfo( + startTime, + endTime, + poolId, + schedulingError, + terminateReason, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchJobExecutionInfo)} does not support writing '{options.Format}' format."); + } + } + + BatchJobExecutionInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchJobExecutionInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchJobExecutionInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchJobExecutionInfo FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchJobExecutionInfo(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobExecutionInfo.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobExecutionInfo.cs new file mode 100644 index 0000000000000..4e29e7fe37a7a --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobExecutionInfo.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Contains information about the execution of a Job in the Azure Batch service. + public partial class BatchJobExecutionInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The start time of the Job. This is the time at which the Job was created. + internal BatchJobExecutionInfo(DateTimeOffset startTime) + { + StartTime = startTime; + } + + /// Initializes a new instance of . + /// The start time of the Job. This is the time at which the Job was created. + /// The completion time of the Job. This property is set only if the Job is in the completed state. + /// The ID of the Pool to which this Job is assigned. This element contains the actual Pool where the Job is assigned. When you get Job details from the service, they also contain a poolInfo element, which contains the Pool configuration data from when the Job was added or updated. That poolInfo element may also contain a poolId element. If it does, the two IDs are the same. If it does not, it means the Job ran on an auto Pool, and this property contains the ID of that auto Pool. + /// Details of any error encountered by the service in starting the Job. This property is not set if there was no error starting the Job. + /// A string describing the reason the Job ended. This property is set only if the Job is in the completed state. If the Batch service terminates the Job, it sets the reason as follows: JMComplete - the Job Manager Task completed, and killJobOnCompletion was set to true. MaxWallClockTimeExpiry - the Job reached its maxWallClockTime constraint. TerminateJobSchedule - the Job ran as part of a schedule, and the schedule terminated. AllTasksComplete - the Job's onAllTasksComplete attribute is set to terminatejob, and all Tasks in the Job are complete. TaskFailed - the Job's onTaskFailure attribute is set to performExitOptionsJobAction, and a Task in the Job failed with an exit condition that specified a jobAction of terminatejob. Any other string is a user-defined reason specified in a call to the 'Terminate a Job' operation. + /// Keeps track of any properties unknown to the library. + internal BatchJobExecutionInfo(DateTimeOffset startTime, DateTimeOffset? endTime, string poolId, BatchJobSchedulingError schedulingError, string terminationReason, IDictionary serializedAdditionalRawData) + { + StartTime = startTime; + EndTime = endTime; + PoolId = poolId; + SchedulingError = schedulingError; + TerminationReason = terminationReason; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchJobExecutionInfo() + { + } + + /// The start time of the Job. This is the time at which the Job was created. + public DateTimeOffset StartTime { get; } + /// The completion time of the Job. This property is set only if the Job is in the completed state. + public DateTimeOffset? EndTime { get; } + /// The ID of the Pool to which this Job is assigned. This element contains the actual Pool where the Job is assigned. When you get Job details from the service, they also contain a poolInfo element, which contains the Pool configuration data from when the Job was added or updated. That poolInfo element may also contain a poolId element. If it does, the two IDs are the same. If it does not, it means the Job ran on an auto Pool, and this property contains the ID of that auto Pool. + public string PoolId { get; } + /// Details of any error encountered by the service in starting the Job. This property is not set if there was no error starting the Job. + public BatchJobSchedulingError SchedulingError { get; } + /// A string describing the reason the Job ended. This property is set only if the Job is in the completed state. If the Batch service terminates the Job, it sets the reason as follows: JMComplete - the Job Manager Task completed, and killJobOnCompletion was set to true. MaxWallClockTimeExpiry - the Job reached its maxWallClockTime constraint. TerminateJobSchedule - the Job ran as part of a schedule, and the schedule terminated. AllTasksComplete - the Job's onAllTasksComplete attribute is set to terminatejob, and all Tasks in the Job are complete. TaskFailed - the Job's onTaskFailure attribute is set to performExitOptionsJobAction, and a Task in the Job failed with an exit condition that specified a jobAction of terminatejob. Any other string is a user-defined reason specified in a call to the 'Terminate a Job' operation. + public string TerminationReason { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobManagerTask.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobManagerTask.Serialization.cs new file mode 100644 index 0000000000000..de8469b51cc05 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobManagerTask.Serialization.cs @@ -0,0 +1,390 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchJobManagerTask : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobManagerTask)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + writer.WritePropertyName("commandLine"u8); + writer.WriteStringValue(CommandLine); + if (Optional.IsDefined(ContainerSettings)) + { + writer.WritePropertyName("containerSettings"u8); + writer.WriteObjectValue(ContainerSettings, options); + } + if (Optional.IsCollectionDefined(ResourceFiles)) + { + writer.WritePropertyName("resourceFiles"u8); + writer.WriteStartArray(); + foreach (var item in ResourceFiles) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(OutputFiles)) + { + writer.WritePropertyName("outputFiles"u8); + writer.WriteStartArray(); + foreach (var item in OutputFiles) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(EnvironmentSettings)) + { + writer.WritePropertyName("environmentSettings"u8); + writer.WriteStartArray(); + foreach (var item in EnvironmentSettings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Constraints)) + { + writer.WritePropertyName("constraints"u8); + writer.WriteObjectValue(Constraints, options); + } + if (Optional.IsDefined(RequiredSlots)) + { + writer.WritePropertyName("requiredSlots"u8); + writer.WriteNumberValue(RequiredSlots.Value); + } + if (Optional.IsDefined(KillJobOnCompletion)) + { + writer.WritePropertyName("killJobOnCompletion"u8); + writer.WriteBooleanValue(KillJobOnCompletion.Value); + } + if (Optional.IsDefined(UserIdentity)) + { + writer.WritePropertyName("userIdentity"u8); + writer.WriteObjectValue(UserIdentity, options); + } + if (Optional.IsDefined(RunExclusive)) + { + writer.WritePropertyName("runExclusive"u8); + writer.WriteBooleanValue(RunExclusive.Value); + } + if (Optional.IsCollectionDefined(ApplicationPackageReferences)) + { + writer.WritePropertyName("applicationPackageReferences"u8); + writer.WriteStartArray(); + foreach (var item in ApplicationPackageReferences) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(AuthenticationTokenSettings)) + { + writer.WritePropertyName("authenticationTokenSettings"u8); + writer.WriteObjectValue(AuthenticationTokenSettings, options); + } + if (Optional.IsDefined(AllowLowPriorityNode)) + { + writer.WritePropertyName("allowLowPriorityNode"u8); + writer.WriteBooleanValue(AllowLowPriorityNode.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchJobManagerTask IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobManagerTask)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchJobManagerTask(document.RootElement, options); + } + + internal static BatchJobManagerTask DeserializeBatchJobManagerTask(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + string displayName = default; + string commandLine = default; + BatchTaskContainerSettings containerSettings = default; + IList resourceFiles = default; + IList outputFiles = default; + IList environmentSettings = default; + BatchTaskConstraints constraints = default; + int? requiredSlots = default; + bool? killJobOnCompletion = default; + UserIdentity userIdentity = default; + bool? runExclusive = default; + IList applicationPackageReferences = default; + AuthenticationTokenSettings authenticationTokenSettings = default; + bool? allowLowPriorityNode = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("commandLine"u8)) + { + commandLine = property.Value.GetString(); + continue; + } + if (property.NameEquals("containerSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + containerSettings = BatchTaskContainerSettings.DeserializeBatchTaskContainerSettings(property.Value, options); + continue; + } + if (property.NameEquals("resourceFiles"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceFile.DeserializeResourceFile(item, options)); + } + resourceFiles = array; + continue; + } + if (property.NameEquals("outputFiles"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(OutputFile.DeserializeOutputFile(item, options)); + } + outputFiles = array; + continue; + } + if (property.NameEquals("environmentSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EnvironmentSetting.DeserializeEnvironmentSetting(item, options)); + } + environmentSettings = array; + continue; + } + if (property.NameEquals("constraints"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + constraints = BatchTaskConstraints.DeserializeBatchTaskConstraints(property.Value, options); + continue; + } + if (property.NameEquals("requiredSlots"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + requiredSlots = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("killJobOnCompletion"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + killJobOnCompletion = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("userIdentity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userIdentity = UserIdentity.DeserializeUserIdentity(property.Value, options); + continue; + } + if (property.NameEquals("runExclusive"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + runExclusive = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("applicationPackageReferences"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BatchApplicationPackageReference.DeserializeBatchApplicationPackageReference(item, options)); + } + applicationPackageReferences = array; + continue; + } + if (property.NameEquals("authenticationTokenSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authenticationTokenSettings = AuthenticationTokenSettings.DeserializeAuthenticationTokenSettings(property.Value, options); + continue; + } + if (property.NameEquals("allowLowPriorityNode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allowLowPriorityNode = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchJobManagerTask( + id, + displayName, + commandLine, + containerSettings, + resourceFiles ?? new ChangeTrackingList(), + outputFiles ?? new ChangeTrackingList(), + environmentSettings ?? new ChangeTrackingList(), + constraints, + requiredSlots, + killJobOnCompletion, + userIdentity, + runExclusive, + applicationPackageReferences ?? new ChangeTrackingList(), + authenticationTokenSettings, + allowLowPriorityNode, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchJobManagerTask)} does not support writing '{options.Format}' format."); + } + } + + BatchJobManagerTask IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchJobManagerTask(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchJobManagerTask)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchJobManagerTask FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchJobManagerTask(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobManagerTask.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobManagerTask.cs new file mode 100644 index 0000000000000..7f679bb2fb593 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobManagerTask.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// + /// Specifies details of a Job Manager Task. + /// The Job Manager Task is automatically started when the Job is created. The + /// Batch service tries to schedule the Job Manager Task before any other Tasks in + /// the Job. When shrinking a Pool, the Batch service tries to preserve Nodes where + /// Job Manager Tasks are running for as long as possible (that is, Compute Nodes + /// running 'normal' Tasks are removed before Compute Nodes running Job Manager + /// Tasks). When a Job Manager Task fails and needs to be restarted, the system + /// tries to schedule it at the highest priority. If there are no idle Compute + /// Nodes available, the system may terminate one of the running Tasks in the Pool + /// and return it to the queue in order to make room for the Job Manager Task to + /// restart. Note that a Job Manager Task in one Job does not have priority over + /// Tasks in other Jobs. Across Jobs, only Job level priorities are observed. For + /// example, if a Job Manager in a priority 0 Job needs to be restarted, it will + /// not displace Tasks of a priority 1 Job. Batch will retry Tasks when a recovery + /// operation is triggered on a Node. Examples of recovery operations include (but + /// are not limited to) when an unhealthy Node is rebooted or a Compute Node + /// disappeared due to host failure. Retries due to recovery operations are + /// independent of and are not counted against the maxTaskRetryCount. Even if the + /// maxTaskRetryCount is 0, an internal retry due to a recovery operation may + /// occur. Because of this, all Tasks should be idempotent. This means Tasks need + /// to tolerate being interrupted and restarted without causing any corruption or + /// duplicate data. The best practice for long running Tasks is to use some form of + /// checkpointing. + /// + public partial class BatchJobManagerTask + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// A string that uniquely identifies the Job Manager Task within the Job. The ID can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters. + /// The command line of the Job Manager Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + /// or is null. + public BatchJobManagerTask(string id, string commandLine) + { + Argument.AssertNotNull(id, nameof(id)); + Argument.AssertNotNull(commandLine, nameof(commandLine)); + + Id = id; + CommandLine = commandLine; + ResourceFiles = new ChangeTrackingList(); + OutputFiles = new ChangeTrackingList(); + EnvironmentSettings = new ChangeTrackingList(); + ApplicationPackageReferences = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// A string that uniquely identifies the Job Manager Task within the Job. The ID can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters. + /// The display name of the Job Manager Task. It need not be unique and can contain any Unicode characters up to a maximum length of 1024. + /// The command line of the Job Manager Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + /// The settings for the container under which the Job Manager Task runs. If the Pool that will run this Task has containerConfiguration set, this must be set as well. If the Pool that will run this Task doesn't have containerConfiguration set, this must not be set. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. + /// A list of files that the Batch service will download to the Compute Node before running the command line. Files listed under this element are located in the Task's working directory. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. + /// A list of files that the Batch service will upload from the Compute Node after running the command line. For multi-instance Tasks, the files will only be uploaded from the Compute Node on which the primary Task is executed. + /// A list of environment variable settings for the Job Manager Task. + /// Constraints that apply to the Job Manager Task. + /// The number of scheduling slots that the Task requires to run. The default is 1. A Task can only be scheduled to run on a compute node if the node has enough free scheduling slots available. For multi-instance Tasks, this property is not supported and must not be specified. + /// Whether completion of the Job Manager Task signifies completion of the entire Job. If true, when the Job Manager Task completes, the Batch service marks the Job as complete. If any Tasks are still running at this time (other than Job Release), those Tasks are terminated. If false, the completion of the Job Manager Task does not affect the Job status. In this case, you should either use the onAllTasksComplete attribute to terminate the Job, or have a client or user terminate the Job explicitly. An example of this is if the Job Manager creates a set of Tasks but then takes no further role in their execution. The default value is true. If you are using the onAllTasksComplete and onTaskFailure attributes to control Job lifetime, and using the Job Manager Task only to create the Tasks for the Job (not to monitor progress), then it is important to set killJobOnCompletion to false. + /// The user identity under which the Job Manager Task runs. If omitted, the Task runs as a non-administrative user unique to the Task. + /// Whether the Job Manager Task requires exclusive use of the Compute Node where it runs. If true, no other Tasks will run on the same Node for as long as the Job Manager is running. If false, other Tasks can run simultaneously with the Job Manager on a Compute Node. The Job Manager Task counts normally against the Compute Node's concurrent Task limit, so this is only relevant if the Compute Node allows multiple concurrent Tasks. The default value is true. + /// + /// A list of Application Packages that the Batch service will deploy to the + /// Compute Node before running the command line.Application Packages are + /// downloaded and deployed to a shared directory, not the Task working + /// directory. Therefore, if a referenced Application Package is already + /// on the Compute Node, and is up to date, then it is not re-downloaded; + /// the existing copy on the Compute Node is used. If a referenced Application + /// Package cannot be installed, for example because the package has been deleted + /// or because download failed, the Task fails. + /// + /// The settings for an authentication token that the Task can use to perform Batch service operations. If this property is set, the Batch service provides the Task with an authentication token which can be used to authenticate Batch service operations without requiring an Account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the Task can carry out using the token depend on the settings. For example, a Task can request Job permissions in order to add other Tasks to the Job, or check the status of the Job or of other Tasks under the Job. + /// Whether the Job Manager Task may run on a Spot/Low-priority Compute Node. The default value is true. + /// Keeps track of any properties unknown to the library. + internal BatchJobManagerTask(string id, string displayName, string commandLine, BatchTaskContainerSettings containerSettings, IList resourceFiles, IList outputFiles, IList environmentSettings, BatchTaskConstraints constraints, int? requiredSlots, bool? killJobOnCompletion, UserIdentity userIdentity, bool? runExclusive, IList applicationPackageReferences, AuthenticationTokenSettings authenticationTokenSettings, bool? allowLowPriorityNode, IDictionary serializedAdditionalRawData) + { + Id = id; + DisplayName = displayName; + CommandLine = commandLine; + ContainerSettings = containerSettings; + ResourceFiles = resourceFiles; + OutputFiles = outputFiles; + EnvironmentSettings = environmentSettings; + Constraints = constraints; + RequiredSlots = requiredSlots; + KillJobOnCompletion = killJobOnCompletion; + UserIdentity = userIdentity; + RunExclusive = runExclusive; + ApplicationPackageReferences = applicationPackageReferences; + AuthenticationTokenSettings = authenticationTokenSettings; + AllowLowPriorityNode = allowLowPriorityNode; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchJobManagerTask() + { + } + + /// A string that uniquely identifies the Job Manager Task within the Job. The ID can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters. + public string Id { get; set; } + /// The display name of the Job Manager Task. It need not be unique and can contain any Unicode characters up to a maximum length of 1024. + public string DisplayName { get; set; } + /// The command line of the Job Manager Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + public string CommandLine { get; set; } + /// The settings for the container under which the Job Manager Task runs. If the Pool that will run this Task has containerConfiguration set, this must be set as well. If the Pool that will run this Task doesn't have containerConfiguration set, this must not be set. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. + public BatchTaskContainerSettings ContainerSettings { get; set; } + /// A list of files that the Batch service will download to the Compute Node before running the command line. Files listed under this element are located in the Task's working directory. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. + public IList ResourceFiles { get; } + /// A list of files that the Batch service will upload from the Compute Node after running the command line. For multi-instance Tasks, the files will only be uploaded from the Compute Node on which the primary Task is executed. + public IList OutputFiles { get; } + /// A list of environment variable settings for the Job Manager Task. + public IList EnvironmentSettings { get; } + /// Constraints that apply to the Job Manager Task. + public BatchTaskConstraints Constraints { get; set; } + /// The number of scheduling slots that the Task requires to run. The default is 1. A Task can only be scheduled to run on a compute node if the node has enough free scheduling slots available. For multi-instance Tasks, this property is not supported and must not be specified. + public int? RequiredSlots { get; set; } + /// Whether completion of the Job Manager Task signifies completion of the entire Job. If true, when the Job Manager Task completes, the Batch service marks the Job as complete. If any Tasks are still running at this time (other than Job Release), those Tasks are terminated. If false, the completion of the Job Manager Task does not affect the Job status. In this case, you should either use the onAllTasksComplete attribute to terminate the Job, or have a client or user terminate the Job explicitly. An example of this is if the Job Manager creates a set of Tasks but then takes no further role in their execution. The default value is true. If you are using the onAllTasksComplete and onTaskFailure attributes to control Job lifetime, and using the Job Manager Task only to create the Tasks for the Job (not to monitor progress), then it is important to set killJobOnCompletion to false. + public bool? KillJobOnCompletion { get; set; } + /// The user identity under which the Job Manager Task runs. If omitted, the Task runs as a non-administrative user unique to the Task. + public UserIdentity UserIdentity { get; set; } + /// Whether the Job Manager Task requires exclusive use of the Compute Node where it runs. If true, no other Tasks will run on the same Node for as long as the Job Manager is running. If false, other Tasks can run simultaneously with the Job Manager on a Compute Node. The Job Manager Task counts normally against the Compute Node's concurrent Task limit, so this is only relevant if the Compute Node allows multiple concurrent Tasks. The default value is true. + public bool? RunExclusive { get; set; } + /// + /// A list of Application Packages that the Batch service will deploy to the + /// Compute Node before running the command line.Application Packages are + /// downloaded and deployed to a shared directory, not the Task working + /// directory. Therefore, if a referenced Application Package is already + /// on the Compute Node, and is up to date, then it is not re-downloaded; + /// the existing copy on the Compute Node is used. If a referenced Application + /// Package cannot be installed, for example because the package has been deleted + /// or because download failed, the Task fails. + /// + public IList ApplicationPackageReferences { get; } + /// The settings for an authentication token that the Task can use to perform Batch service operations. If this property is set, the Batch service provides the Task with an authentication token which can be used to authenticate Batch service operations without requiring an Account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the Task can carry out using the token depend on the settings. For example, a Task can request Job permissions in order to add other Tasks to the Job, or check the status of the Job or of other Tasks under the Job. + public AuthenticationTokenSettings AuthenticationTokenSettings { get; set; } + /// Whether the Job Manager Task may run on a Spot/Low-priority Compute Node. The default value is true. + public bool? AllowLowPriorityNode { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobNetworkConfiguration.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobNetworkConfiguration.Serialization.cs new file mode 100644 index 0000000000000..9345163de4357 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobNetworkConfiguration.Serialization.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchJobNetworkConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobNetworkConfiguration)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("subnetId"u8); + writer.WriteStringValue(SubnetId); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchJobNetworkConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobNetworkConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchJobNetworkConfiguration(document.RootElement, options); + } + + internal static BatchJobNetworkConfiguration DeserializeBatchJobNetworkConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string subnetId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("subnetId"u8)) + { + subnetId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchJobNetworkConfiguration(subnetId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchJobNetworkConfiguration)} does not support writing '{options.Format}' format."); + } + } + + BatchJobNetworkConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchJobNetworkConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchJobNetworkConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchJobNetworkConfiguration FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchJobNetworkConfiguration(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobNetworkConfiguration.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobNetworkConfiguration.cs new file mode 100644 index 0000000000000..d6697158bf5e3 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobNetworkConfiguration.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// The network configuration for the Job. + public partial class BatchJobNetworkConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The ARM resource identifier of the virtual network subnet which Compute Nodes running Tasks from the Job will join for the duration of the Task. This will only work with a VirtualMachineConfiguration Pool. The virtual network must be in the same region and subscription as the Azure Batch Account. The specified subnet should have enough free IP addresses to accommodate the number of Compute Nodes which will run Tasks from the Job. This can be up to the number of Compute Nodes in the Pool. The 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for the specified VNet so that Azure Batch service can schedule Tasks on the Nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the Nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the Compute Nodes to unusable. This is of the form /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved system ports must be enabled for inbound communication from the Azure Batch service. For Pools created with a Virtual Machine configuration, enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for Windows. Port 443 is also required to be open for outbound connections for communications to Azure Storage. For more details see: https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + /// is null. + public BatchJobNetworkConfiguration(string subnetId) + { + Argument.AssertNotNull(subnetId, nameof(subnetId)); + + SubnetId = subnetId; + } + + /// Initializes a new instance of . + /// The ARM resource identifier of the virtual network subnet which Compute Nodes running Tasks from the Job will join for the duration of the Task. This will only work with a VirtualMachineConfiguration Pool. The virtual network must be in the same region and subscription as the Azure Batch Account. The specified subnet should have enough free IP addresses to accommodate the number of Compute Nodes which will run Tasks from the Job. This can be up to the number of Compute Nodes in the Pool. The 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for the specified VNet so that Azure Batch service can schedule Tasks on the Nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the Nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the Compute Nodes to unusable. This is of the form /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved system ports must be enabled for inbound communication from the Azure Batch service. For Pools created with a Virtual Machine configuration, enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for Windows. Port 443 is also required to be open for outbound connections for communications to Azure Storage. For more details see: https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + /// Keeps track of any properties unknown to the library. + internal BatchJobNetworkConfiguration(string subnetId, IDictionary serializedAdditionalRawData) + { + SubnetId = subnetId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchJobNetworkConfiguration() + { + } + + /// The ARM resource identifier of the virtual network subnet which Compute Nodes running Tasks from the Job will join for the duration of the Task. This will only work with a VirtualMachineConfiguration Pool. The virtual network must be in the same region and subscription as the Azure Batch Account. The specified subnet should have enough free IP addresses to accommodate the number of Compute Nodes which will run Tasks from the Job. This can be up to the number of Compute Nodes in the Pool. The 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for the specified VNet so that Azure Batch service can schedule Tasks on the Nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the Nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the Compute Nodes to unusable. This is of the form /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved system ports must be enabled for inbound communication from the Azure Batch service. For Pools created with a Virtual Machine configuration, enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for Windows. Port 443 is also required to be open for outbound connections for communications to Azure Storage. For more details see: https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + public string SubnetId { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobPreparationAndReleaseTaskStatus.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobPreparationAndReleaseTaskStatus.Serialization.cs new file mode 100644 index 0000000000000..ed82f3ea661e3 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobPreparationAndReleaseTaskStatus.Serialization.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchJobPreparationAndReleaseTaskStatus : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobPreparationAndReleaseTaskStatus)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(PoolId)) + { + writer.WritePropertyName("poolId"u8); + writer.WriteStringValue(PoolId); + } + if (Optional.IsDefined(NodeId)) + { + writer.WritePropertyName("nodeId"u8); + writer.WriteStringValue(NodeId); + } + if (Optional.IsDefined(NodeUrl)) + { + writer.WritePropertyName("nodeUrl"u8); + writer.WriteStringValue(NodeUrl); + } + if (Optional.IsDefined(JobPreparationTaskExecutionInfo)) + { + writer.WritePropertyName("jobPreparationTaskExecutionInfo"u8); + writer.WriteObjectValue(JobPreparationTaskExecutionInfo, options); + } + if (Optional.IsDefined(JobReleaseTaskExecutionInfo)) + { + writer.WritePropertyName("jobReleaseTaskExecutionInfo"u8); + writer.WriteObjectValue(JobReleaseTaskExecutionInfo, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchJobPreparationAndReleaseTaskStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobPreparationAndReleaseTaskStatus)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchJobPreparationAndReleaseTaskStatus(document.RootElement, options); + } + + internal static BatchJobPreparationAndReleaseTaskStatus DeserializeBatchJobPreparationAndReleaseTaskStatus(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string poolId = default; + string nodeId = default; + string nodeUrl = default; + BatchJobPreparationTaskExecutionInfo jobPreparationTaskExecutionInfo = default; + BatchJobReleaseTaskExecutionInfo jobReleaseTaskExecutionInfo = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("poolId"u8)) + { + poolId = property.Value.GetString(); + continue; + } + if (property.NameEquals("nodeId"u8)) + { + nodeId = property.Value.GetString(); + continue; + } + if (property.NameEquals("nodeUrl"u8)) + { + nodeUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("jobPreparationTaskExecutionInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + jobPreparationTaskExecutionInfo = BatchJobPreparationTaskExecutionInfo.DeserializeBatchJobPreparationTaskExecutionInfo(property.Value, options); + continue; + } + if (property.NameEquals("jobReleaseTaskExecutionInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + jobReleaseTaskExecutionInfo = BatchJobReleaseTaskExecutionInfo.DeserializeBatchJobReleaseTaskExecutionInfo(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchJobPreparationAndReleaseTaskStatus( + poolId, + nodeId, + nodeUrl, + jobPreparationTaskExecutionInfo, + jobReleaseTaskExecutionInfo, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchJobPreparationAndReleaseTaskStatus)} does not support writing '{options.Format}' format."); + } + } + + BatchJobPreparationAndReleaseTaskStatus IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchJobPreparationAndReleaseTaskStatus(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchJobPreparationAndReleaseTaskStatus)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchJobPreparationAndReleaseTaskStatus FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchJobPreparationAndReleaseTaskStatus(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobPreparationAndReleaseTaskStatus.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobPreparationAndReleaseTaskStatus.cs new file mode 100644 index 0000000000000..722bcb9a92d71 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobPreparationAndReleaseTaskStatus.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// The status of the Job Preparation and Job Release Tasks on a Compute Node. + public partial class BatchJobPreparationAndReleaseTaskStatus + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal BatchJobPreparationAndReleaseTaskStatus() + { + } + + /// Initializes a new instance of . + /// The ID of the Pool containing the Compute Node to which this entry refers. + /// The ID of the Compute Node to which this entry refers. + /// The URL of the Compute Node to which this entry refers. + /// Information about the execution status of the Job Preparation Task on this Compute Node. + /// Information about the execution status of the Job Release Task on this Compute Node. This property is set only if the Job Release Task has run on the Compute Node. + /// Keeps track of any properties unknown to the library. + internal BatchJobPreparationAndReleaseTaskStatus(string poolId, string nodeId, string nodeUrl, BatchJobPreparationTaskExecutionInfo jobPreparationTaskExecutionInfo, BatchJobReleaseTaskExecutionInfo jobReleaseTaskExecutionInfo, IDictionary serializedAdditionalRawData) + { + PoolId = poolId; + NodeId = nodeId; + NodeUrl = nodeUrl; + JobPreparationTaskExecutionInfo = jobPreparationTaskExecutionInfo; + JobReleaseTaskExecutionInfo = jobReleaseTaskExecutionInfo; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The ID of the Pool containing the Compute Node to which this entry refers. + public string PoolId { get; } + /// The ID of the Compute Node to which this entry refers. + public string NodeId { get; } + /// The URL of the Compute Node to which this entry refers. + public string NodeUrl { get; } + /// Information about the execution status of the Job Preparation Task on this Compute Node. + public BatchJobPreparationTaskExecutionInfo JobPreparationTaskExecutionInfo { get; } + /// Information about the execution status of the Job Release Task on this Compute Node. This property is set only if the Job Release Task has run on the Compute Node. + public BatchJobReleaseTaskExecutionInfo JobReleaseTaskExecutionInfo { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobPreparationTask.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobPreparationTask.Serialization.cs new file mode 100644 index 0000000000000..86bd6b822b3b6 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobPreparationTask.Serialization.cs @@ -0,0 +1,281 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchJobPreparationTask : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobPreparationTask)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + writer.WritePropertyName("commandLine"u8); + writer.WriteStringValue(CommandLine); + if (Optional.IsDefined(ContainerSettings)) + { + writer.WritePropertyName("containerSettings"u8); + writer.WriteObjectValue(ContainerSettings, options); + } + if (Optional.IsCollectionDefined(ResourceFiles)) + { + writer.WritePropertyName("resourceFiles"u8); + writer.WriteStartArray(); + foreach (var item in ResourceFiles) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(EnvironmentSettings)) + { + writer.WritePropertyName("environmentSettings"u8); + writer.WriteStartArray(); + foreach (var item in EnvironmentSettings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Constraints)) + { + writer.WritePropertyName("constraints"u8); + writer.WriteObjectValue(Constraints, options); + } + if (Optional.IsDefined(WaitForSuccess)) + { + writer.WritePropertyName("waitForSuccess"u8); + writer.WriteBooleanValue(WaitForSuccess.Value); + } + if (Optional.IsDefined(UserIdentity)) + { + writer.WritePropertyName("userIdentity"u8); + writer.WriteObjectValue(UserIdentity, options); + } + if (Optional.IsDefined(RerunOnNodeRebootAfterSuccess)) + { + writer.WritePropertyName("rerunOnNodeRebootAfterSuccess"u8); + writer.WriteBooleanValue(RerunOnNodeRebootAfterSuccess.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchJobPreparationTask IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobPreparationTask)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchJobPreparationTask(document.RootElement, options); + } + + internal static BatchJobPreparationTask DeserializeBatchJobPreparationTask(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + string commandLine = default; + BatchTaskContainerSettings containerSettings = default; + IList resourceFiles = default; + IList environmentSettings = default; + BatchTaskConstraints constraints = default; + bool? waitForSuccess = default; + UserIdentity userIdentity = default; + bool? rerunOnNodeRebootAfterSuccess = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("commandLine"u8)) + { + commandLine = property.Value.GetString(); + continue; + } + if (property.NameEquals("containerSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + containerSettings = BatchTaskContainerSettings.DeserializeBatchTaskContainerSettings(property.Value, options); + continue; + } + if (property.NameEquals("resourceFiles"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceFile.DeserializeResourceFile(item, options)); + } + resourceFiles = array; + continue; + } + if (property.NameEquals("environmentSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EnvironmentSetting.DeserializeEnvironmentSetting(item, options)); + } + environmentSettings = array; + continue; + } + if (property.NameEquals("constraints"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + constraints = BatchTaskConstraints.DeserializeBatchTaskConstraints(property.Value, options); + continue; + } + if (property.NameEquals("waitForSuccess"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + waitForSuccess = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("userIdentity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userIdentity = UserIdentity.DeserializeUserIdentity(property.Value, options); + continue; + } + if (property.NameEquals("rerunOnNodeRebootAfterSuccess"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + rerunOnNodeRebootAfterSuccess = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchJobPreparationTask( + id, + commandLine, + containerSettings, + resourceFiles ?? new ChangeTrackingList(), + environmentSettings ?? new ChangeTrackingList(), + constraints, + waitForSuccess, + userIdentity, + rerunOnNodeRebootAfterSuccess, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchJobPreparationTask)} does not support writing '{options.Format}' format."); + } + } + + BatchJobPreparationTask IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchJobPreparationTask(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchJobPreparationTask)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchJobPreparationTask FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchJobPreparationTask(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobPreparationTask.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobPreparationTask.cs new file mode 100644 index 0000000000000..ce02002b17a04 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobPreparationTask.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// + /// A Job Preparation Task to run before any Tasks of the Job on any given Compute Node. + /// You can use Job Preparation to prepare a Node to run Tasks for the Job. + /// Activities commonly performed in Job Preparation include: Downloading common + /// resource files used by all the Tasks in the Job. The Job Preparation Task can + /// download these common resource files to the shared location on the Node. + /// (AZ_BATCH_NODE_ROOT_DIR\shared), or starting a local service on the Node so + /// that all Tasks of that Job can communicate with it. If the Job Preparation Task + /// fails (that is, exhausts its retry count before exiting with exit code 0), + /// Batch will not run Tasks of this Job on the Node. The Compute Node remains + /// ineligible to run Tasks of this Job until it is reimaged. The Compute Node + /// remains active and can be used for other Jobs. The Job Preparation Task can run + /// multiple times on the same Node. Therefore, you should write the Job + /// Preparation Task to handle re-execution. If the Node is rebooted, the Job + /// Preparation Task is run again on the Compute Node before scheduling any other + /// Task of the Job, if rerunOnNodeRebootAfterSuccess is true or if the Job + /// Preparation Task did not previously complete. If the Node is reimaged, the Job + /// Preparation Task is run again before scheduling any Task of the Job. Batch will + /// retry Tasks when a recovery operation is triggered on a Node. Examples of + /// recovery operations include (but are not limited to) when an unhealthy Node is + /// rebooted or a Compute Node disappeared due to host failure. Retries due to + /// recovery operations are independent of and are not counted against the + /// maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an internal retry due to + /// a recovery operation may occur. Because of this, all Tasks should be + /// idempotent. This means Tasks need to tolerate being interrupted and restarted + /// without causing any corruption or duplicate data. The best practice for long + /// running Tasks is to use some form of checkpointing. + /// + public partial class BatchJobPreparationTask + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The command line of the Job Preparation Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + /// is null. + public BatchJobPreparationTask(string commandLine) + { + Argument.AssertNotNull(commandLine, nameof(commandLine)); + + CommandLine = commandLine; + ResourceFiles = new ChangeTrackingList(); + EnvironmentSettings = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// A string that uniquely identifies the Job Preparation Task within the Job. The ID can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters. If you do not specify this property, the Batch service assigns a default value of 'jobpreparation'. No other Task in the Job can have the same ID as the Job Preparation Task. If you try to submit a Task with the same id, the Batch service rejects the request with error code TaskIdSameAsJobPreparationTask; if you are calling the REST API directly, the HTTP status code is 409 (Conflict). + /// The command line of the Job Preparation Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + /// The settings for the container under which the Job Preparation Task runs. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. + /// A list of files that the Batch service will download to the Compute Node before running the command line. Files listed under this element are located in the Task's working directory. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. + /// A list of environment variable settings for the Job Preparation Task. + /// Constraints that apply to the Job Preparation Task. + /// Whether the Batch service should wait for the Job Preparation Task to complete successfully before scheduling any other Tasks of the Job on the Compute Node. A Job Preparation Task has completed successfully if it exits with exit code 0. If true and the Job Preparation Task fails on a Node, the Batch service retries the Job Preparation Task up to its maximum retry count (as specified in the constraints element). If the Task has still not completed successfully after all retries, then the Batch service will not schedule Tasks of the Job to the Node. The Node remains active and eligible to run Tasks of other Jobs. If false, the Batch service will not wait for the Job Preparation Task to complete. In this case, other Tasks of the Job can start executing on the Compute Node while the Job Preparation Task is still running; and even if the Job Preparation Task fails, new Tasks will continue to be scheduled on the Compute Node. The default value is true. + /// The user identity under which the Job Preparation Task runs. If omitted, the Task runs as a non-administrative user unique to the Task on Windows Compute Nodes, or a non-administrative user unique to the Pool on Linux Compute Nodes. + /// Whether the Batch service should rerun the Job Preparation Task after a Compute Node reboots. The Job Preparation Task is always rerun if a Compute Node is reimaged, or if the Job Preparation Task did not complete (e.g. because the reboot occurred while the Task was running). Therefore, you should always write a Job Preparation Task to be idempotent and to behave correctly if run multiple times. The default value is true. + /// Keeps track of any properties unknown to the library. + internal BatchJobPreparationTask(string id, string commandLine, BatchTaskContainerSettings containerSettings, IList resourceFiles, IList environmentSettings, BatchTaskConstraints constraints, bool? waitForSuccess, UserIdentity userIdentity, bool? rerunOnNodeRebootAfterSuccess, IDictionary serializedAdditionalRawData) + { + Id = id; + CommandLine = commandLine; + ContainerSettings = containerSettings; + ResourceFiles = resourceFiles; + EnvironmentSettings = environmentSettings; + Constraints = constraints; + WaitForSuccess = waitForSuccess; + UserIdentity = userIdentity; + RerunOnNodeRebootAfterSuccess = rerunOnNodeRebootAfterSuccess; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchJobPreparationTask() + { + } + + /// A string that uniquely identifies the Job Preparation Task within the Job. The ID can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters. If you do not specify this property, the Batch service assigns a default value of 'jobpreparation'. No other Task in the Job can have the same ID as the Job Preparation Task. If you try to submit a Task with the same id, the Batch service rejects the request with error code TaskIdSameAsJobPreparationTask; if you are calling the REST API directly, the HTTP status code is 409 (Conflict). + public string Id { get; set; } + /// The command line of the Job Preparation Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + public string CommandLine { get; set; } + /// The settings for the container under which the Job Preparation Task runs. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. + public BatchTaskContainerSettings ContainerSettings { get; set; } + /// A list of files that the Batch service will download to the Compute Node before running the command line. Files listed under this element are located in the Task's working directory. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. + public IList ResourceFiles { get; } + /// A list of environment variable settings for the Job Preparation Task. + public IList EnvironmentSettings { get; } + /// Constraints that apply to the Job Preparation Task. + public BatchTaskConstraints Constraints { get; set; } + /// Whether the Batch service should wait for the Job Preparation Task to complete successfully before scheduling any other Tasks of the Job on the Compute Node. A Job Preparation Task has completed successfully if it exits with exit code 0. If true and the Job Preparation Task fails on a Node, the Batch service retries the Job Preparation Task up to its maximum retry count (as specified in the constraints element). If the Task has still not completed successfully after all retries, then the Batch service will not schedule Tasks of the Job to the Node. The Node remains active and eligible to run Tasks of other Jobs. If false, the Batch service will not wait for the Job Preparation Task to complete. In this case, other Tasks of the Job can start executing on the Compute Node while the Job Preparation Task is still running; and even if the Job Preparation Task fails, new Tasks will continue to be scheduled on the Compute Node. The default value is true. + public bool? WaitForSuccess { get; set; } + /// The user identity under which the Job Preparation Task runs. If omitted, the Task runs as a non-administrative user unique to the Task on Windows Compute Nodes, or a non-administrative user unique to the Pool on Linux Compute Nodes. + public UserIdentity UserIdentity { get; set; } + /// Whether the Batch service should rerun the Job Preparation Task after a Compute Node reboots. The Job Preparation Task is always rerun if a Compute Node is reimaged, or if the Job Preparation Task did not complete (e.g. because the reboot occurred while the Task was running). Therefore, you should always write a Job Preparation Task to be idempotent and to behave correctly if run multiple times. The default value is true. + public bool? RerunOnNodeRebootAfterSuccess { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobPreparationTaskExecutionInfo.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobPreparationTaskExecutionInfo.Serialization.cs new file mode 100644 index 0000000000000..96e55f511fcb8 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobPreparationTaskExecutionInfo.Serialization.cs @@ -0,0 +1,275 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchJobPreparationTaskExecutionInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobPreparationTaskExecutionInfo)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartTime, "O"); + if (Optional.IsDefined(EndTime)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndTime.Value, "O"); + } + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.ToString()); + if (Optional.IsDefined(TaskRootDirectory)) + { + writer.WritePropertyName("taskRootDirectory"u8); + writer.WriteStringValue(TaskRootDirectory); + } + if (Optional.IsDefined(TaskRootDirectoryUrl)) + { + writer.WritePropertyName("taskRootDirectoryUrl"u8); + writer.WriteStringValue(TaskRootDirectoryUrl); + } + if (Optional.IsDefined(ExitCode)) + { + writer.WritePropertyName("exitCode"u8); + writer.WriteNumberValue(ExitCode.Value); + } + if (Optional.IsDefined(ContainerInfo)) + { + writer.WritePropertyName("containerInfo"u8); + writer.WriteObjectValue(ContainerInfo, options); + } + if (Optional.IsDefined(FailureInfo)) + { + writer.WritePropertyName("failureInfo"u8); + writer.WriteObjectValue(FailureInfo, options); + } + writer.WritePropertyName("retryCount"u8); + writer.WriteNumberValue(RetryCount); + if (Optional.IsDefined(LastRetryTime)) + { + writer.WritePropertyName("lastRetryTime"u8); + writer.WriteStringValue(LastRetryTime.Value, "O"); + } + if (Optional.IsDefined(Result)) + { + writer.WritePropertyName("result"u8); + writer.WriteStringValue(Result.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchJobPreparationTaskExecutionInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobPreparationTaskExecutionInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchJobPreparationTaskExecutionInfo(document.RootElement, options); + } + + internal static BatchJobPreparationTaskExecutionInfo DeserializeBatchJobPreparationTaskExecutionInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset startTime = default; + DateTimeOffset? endTime = default; + BatchJobPreparationTaskState state = default; + string taskRootDirectory = default; + string taskRootDirectoryUrl = default; + int? exitCode = default; + BatchTaskContainerExecutionInfo containerInfo = default; + BatchTaskFailureInfo failureInfo = default; + int retryCount = default; + DateTimeOffset? lastRetryTime = default; + BatchTaskExecutionResult? result = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("startTime"u8)) + { + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("state"u8)) + { + state = new BatchJobPreparationTaskState(property.Value.GetString()); + continue; + } + if (property.NameEquals("taskRootDirectory"u8)) + { + taskRootDirectory = property.Value.GetString(); + continue; + } + if (property.NameEquals("taskRootDirectoryUrl"u8)) + { + taskRootDirectoryUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("exitCode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + exitCode = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("containerInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + containerInfo = BatchTaskContainerExecutionInfo.DeserializeBatchTaskContainerExecutionInfo(property.Value, options); + continue; + } + if (property.NameEquals("failureInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + failureInfo = BatchTaskFailureInfo.DeserializeBatchTaskFailureInfo(property.Value, options); + continue; + } + if (property.NameEquals("retryCount"u8)) + { + retryCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("lastRetryTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastRetryTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("result"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + result = new BatchTaskExecutionResult(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchJobPreparationTaskExecutionInfo( + startTime, + endTime, + state, + taskRootDirectory, + taskRootDirectoryUrl, + exitCode, + containerInfo, + failureInfo, + retryCount, + lastRetryTime, + result, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchJobPreparationTaskExecutionInfo)} does not support writing '{options.Format}' format."); + } + } + + BatchJobPreparationTaskExecutionInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchJobPreparationTaskExecutionInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchJobPreparationTaskExecutionInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchJobPreparationTaskExecutionInfo FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchJobPreparationTaskExecutionInfo(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobPreparationTaskExecutionInfo.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobPreparationTaskExecutionInfo.cs new file mode 100644 index 0000000000000..8d65cf18954eb --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobPreparationTaskExecutionInfo.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// + /// Contains information about the execution of a Job Preparation Task on a Compute + /// Node. + /// + public partial class BatchJobPreparationTaskExecutionInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The time at which the Task started running. If the Task has been restarted or retried, this is the most recent time at which the Task started running. + /// The current state of the Job Preparation Task on the Compute Node. + /// The number of times the Task has been retried by the Batch service. Task application failures (non-zero exit code) are retried, pre-processing errors (the Task could not be run) and file upload errors are not retried. The Batch service will retry the Task up to the limit specified by the constraints. Task application failures (non-zero exit code) are retried, pre-processing errors (the Task could not be run) and file upload errors are not retried. The Batch service will retry the Task up to the limit specified by the constraints. + internal BatchJobPreparationTaskExecutionInfo(DateTimeOffset startTime, BatchJobPreparationTaskState state, int retryCount) + { + StartTime = startTime; + State = state; + RetryCount = retryCount; + } + + /// Initializes a new instance of . + /// The time at which the Task started running. If the Task has been restarted or retried, this is the most recent time at which the Task started running. + /// The time at which the Job Preparation Task completed. This property is set only if the Task is in the Completed state. + /// The current state of the Job Preparation Task on the Compute Node. + /// The root directory of the Job Preparation Task on the Compute Node. You can use this path to retrieve files created by the Task, such as log files. + /// The URL to the root directory of the Job Preparation Task on the Compute Node. + /// The exit code of the program specified on the Task command line. This parameter is returned only if the Task is in the completed state. The exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. Note that the exit code may also be generated by the Compute Node operating system, such as when a process is forcibly terminated. + /// Information about the container under which the Task is executing. This property is set only if the Task runs in a container context. + /// Information describing the Task failure, if any. This property is set only if the Task is in the completed state and encountered a failure. + /// The number of times the Task has been retried by the Batch service. Task application failures (non-zero exit code) are retried, pre-processing errors (the Task could not be run) and file upload errors are not retried. The Batch service will retry the Task up to the limit specified by the constraints. Task application failures (non-zero exit code) are retried, pre-processing errors (the Task could not be run) and file upload errors are not retried. The Batch service will retry the Task up to the limit specified by the constraints. + /// The most recent time at which a retry of the Job Preparation Task started running. This property is set only if the Task was retried (i.e. retryCount is nonzero). If present, this is typically the same as startTime, but may be different if the Task has been restarted for reasons other than retry; for example, if the Compute Node was rebooted during a retry, then the startTime is updated but the lastRetryTime is not. + /// The result of the Task execution. If the value is 'failed', then the details of the failure can be found in the failureInfo property. + /// Keeps track of any properties unknown to the library. + internal BatchJobPreparationTaskExecutionInfo(DateTimeOffset startTime, DateTimeOffset? endTime, BatchJobPreparationTaskState state, string taskRootDirectory, string taskRootDirectoryUrl, int? exitCode, BatchTaskContainerExecutionInfo containerInfo, BatchTaskFailureInfo failureInfo, int retryCount, DateTimeOffset? lastRetryTime, BatchTaskExecutionResult? result, IDictionary serializedAdditionalRawData) + { + StartTime = startTime; + EndTime = endTime; + State = state; + TaskRootDirectory = taskRootDirectory; + TaskRootDirectoryUrl = taskRootDirectoryUrl; + ExitCode = exitCode; + ContainerInfo = containerInfo; + FailureInfo = failureInfo; + RetryCount = retryCount; + LastRetryTime = lastRetryTime; + Result = result; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchJobPreparationTaskExecutionInfo() + { + } + + /// The time at which the Task started running. If the Task has been restarted or retried, this is the most recent time at which the Task started running. + public DateTimeOffset StartTime { get; } + /// The time at which the Job Preparation Task completed. This property is set only if the Task is in the Completed state. + public DateTimeOffset? EndTime { get; } + /// The current state of the Job Preparation Task on the Compute Node. + public BatchJobPreparationTaskState State { get; } + /// The root directory of the Job Preparation Task on the Compute Node. You can use this path to retrieve files created by the Task, such as log files. + public string TaskRootDirectory { get; } + /// The URL to the root directory of the Job Preparation Task on the Compute Node. + public string TaskRootDirectoryUrl { get; } + /// The exit code of the program specified on the Task command line. This parameter is returned only if the Task is in the completed state. The exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. Note that the exit code may also be generated by the Compute Node operating system, such as when a process is forcibly terminated. + public int? ExitCode { get; } + /// Information about the container under which the Task is executing. This property is set only if the Task runs in a container context. + public BatchTaskContainerExecutionInfo ContainerInfo { get; } + /// Information describing the Task failure, if any. This property is set only if the Task is in the completed state and encountered a failure. + public BatchTaskFailureInfo FailureInfo { get; } + /// The number of times the Task has been retried by the Batch service. Task application failures (non-zero exit code) are retried, pre-processing errors (the Task could not be run) and file upload errors are not retried. The Batch service will retry the Task up to the limit specified by the constraints. Task application failures (non-zero exit code) are retried, pre-processing errors (the Task could not be run) and file upload errors are not retried. The Batch service will retry the Task up to the limit specified by the constraints. + public int RetryCount { get; } + /// The most recent time at which a retry of the Job Preparation Task started running. This property is set only if the Task was retried (i.e. retryCount is nonzero). If present, this is typically the same as startTime, but may be different if the Task has been restarted for reasons other than retry; for example, if the Compute Node was rebooted during a retry, then the startTime is updated but the lastRetryTime is not. + public DateTimeOffset? LastRetryTime { get; } + /// The result of the Task execution. If the value is 'failed', then the details of the failure can be found in the failureInfo property. + public BatchTaskExecutionResult? Result { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobPreparationTaskState.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobPreparationTaskState.cs new file mode 100644 index 0000000000000..d056396afdb30 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobPreparationTaskState.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.Compute.Batch +{ + /// BatchJobPreparationTaskState enums. + public readonly partial struct BatchJobPreparationTaskState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BatchJobPreparationTaskState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string RunningValue = "running"; + private const string CompletedValue = "completed"; + + /// The Task is currently running (including retrying). + public static BatchJobPreparationTaskState Running { get; } = new BatchJobPreparationTaskState(RunningValue); + /// The Task has exited with exit code 0, or the Task has exhausted its retry limit, or the Batch service was unable to start the Task due to Task preparation errors (such as resource file download failures). + public static BatchJobPreparationTaskState Completed { get; } = new BatchJobPreparationTaskState(CompletedValue); + /// Determines if two values are the same. + public static bool operator ==(BatchJobPreparationTaskState left, BatchJobPreparationTaskState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BatchJobPreparationTaskState left, BatchJobPreparationTaskState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator BatchJobPreparationTaskState(string value) => new BatchJobPreparationTaskState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BatchJobPreparationTaskState other && Equals(other); + /// + public bool Equals(BatchJobPreparationTaskState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobReleaseTask.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobReleaseTask.Serialization.cs new file mode 100644 index 0000000000000..22d13533c3926 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobReleaseTask.Serialization.cs @@ -0,0 +1,265 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchJobReleaseTask : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobReleaseTask)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + writer.WritePropertyName("commandLine"u8); + writer.WriteStringValue(CommandLine); + if (Optional.IsDefined(ContainerSettings)) + { + writer.WritePropertyName("containerSettings"u8); + writer.WriteObjectValue(ContainerSettings, options); + } + if (Optional.IsCollectionDefined(ResourceFiles)) + { + writer.WritePropertyName("resourceFiles"u8); + writer.WriteStartArray(); + foreach (var item in ResourceFiles) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(EnvironmentSettings)) + { + writer.WritePropertyName("environmentSettings"u8); + writer.WriteStartArray(); + foreach (var item in EnvironmentSettings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(MaxWallClockTime)) + { + writer.WritePropertyName("maxWallClockTime"u8); + writer.WriteStringValue(MaxWallClockTime.Value, "P"); + } + if (Optional.IsDefined(RetentionTime)) + { + writer.WritePropertyName("retentionTime"u8); + writer.WriteStringValue(RetentionTime.Value, "P"); + } + if (Optional.IsDefined(UserIdentity)) + { + writer.WritePropertyName("userIdentity"u8); + writer.WriteObjectValue(UserIdentity, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchJobReleaseTask IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobReleaseTask)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchJobReleaseTask(document.RootElement, options); + } + + internal static BatchJobReleaseTask DeserializeBatchJobReleaseTask(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + string commandLine = default; + BatchTaskContainerSettings containerSettings = default; + IList resourceFiles = default; + IList environmentSettings = default; + TimeSpan? maxWallClockTime = default; + TimeSpan? retentionTime = default; + UserIdentity userIdentity = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("commandLine"u8)) + { + commandLine = property.Value.GetString(); + continue; + } + if (property.NameEquals("containerSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + containerSettings = BatchTaskContainerSettings.DeserializeBatchTaskContainerSettings(property.Value, options); + continue; + } + if (property.NameEquals("resourceFiles"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceFile.DeserializeResourceFile(item, options)); + } + resourceFiles = array; + continue; + } + if (property.NameEquals("environmentSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EnvironmentSetting.DeserializeEnvironmentSetting(item, options)); + } + environmentSettings = array; + continue; + } + if (property.NameEquals("maxWallClockTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxWallClockTime = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("retentionTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + retentionTime = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("userIdentity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userIdentity = UserIdentity.DeserializeUserIdentity(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchJobReleaseTask( + id, + commandLine, + containerSettings, + resourceFiles ?? new ChangeTrackingList(), + environmentSettings ?? new ChangeTrackingList(), + maxWallClockTime, + retentionTime, + userIdentity, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchJobReleaseTask)} does not support writing '{options.Format}' format."); + } + } + + BatchJobReleaseTask IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchJobReleaseTask(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchJobReleaseTask)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchJobReleaseTask FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchJobReleaseTask(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobReleaseTask.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobReleaseTask.cs new file mode 100644 index 0000000000000..acbf28a11f7d3 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobReleaseTask.cs @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// + /// A Job Release Task to run on Job completion on any Compute Node where the Job has run. + /// The Job Release Task runs when the Job ends, because of one of the following: + /// The user calls the Terminate Job API, or the Delete Job API while the Job is + /// still active, the Job's maximum wall clock time constraint is reached, and the + /// Job is still active, or the Job's Job Manager Task completed, and the Job is + /// configured to terminate when the Job Manager completes. The Job Release Task + /// runs on each Node where Tasks of the Job have run and the Job Preparation Task + /// ran and completed. If you reimage a Node after it has run the Job Preparation + /// Task, and the Job ends without any further Tasks of the Job running on that + /// Node (and hence the Job Preparation Task does not re-run), then the Job Release + /// Task does not run on that Compute Node. If a Node reboots while the Job Release + /// Task is still running, the Job Release Task runs again when the Compute Node + /// starts up. The Job is not marked as complete until all Job Release Tasks have + /// completed. The Job Release Task runs in the background. It does not occupy a + /// scheduling slot; that is, it does not count towards the taskSlotsPerNode limit + /// specified on the Pool. + /// + public partial class BatchJobReleaseTask + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The command line of the Job Release Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + /// is null. + public BatchJobReleaseTask(string commandLine) + { + Argument.AssertNotNull(commandLine, nameof(commandLine)); + + CommandLine = commandLine; + ResourceFiles = new ChangeTrackingList(); + EnvironmentSettings = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// A string that uniquely identifies the Job Release Task within the Job. The ID can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters. If you do not specify this property, the Batch service assigns a default value of 'jobrelease'. No other Task in the Job can have the same ID as the Job Release Task. If you try to submit a Task with the same id, the Batch service rejects the request with error code TaskIdSameAsJobReleaseTask; if you are calling the REST API directly, the HTTP status code is 409 (Conflict). + /// The command line of the Job Release Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + /// The settings for the container under which the Job Release Task runs. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. + /// A list of files that the Batch service will download to the Compute Node before running the command line. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. Files listed under this element are located in the Task's working directory. + /// A list of environment variable settings for the Job Release Task. + /// The maximum elapsed time that the Job Release Task may run on a given Compute Node, measured from the time the Task starts. If the Task does not complete within the time limit, the Batch service terminates it. The default value is 15 minutes. You may not specify a timeout longer than 15 minutes. If you do, the Batch service rejects it with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + /// The minimum time to retain the Task directory for the Job Release Task on the Compute Node. After this time, the Batch service may delete the Task directory and all its contents. The default is 7 days, i.e. the Task directory will be retained for 7 days unless the Compute Node is removed or the Job is deleted. + /// The user identity under which the Job Release Task runs. If omitted, the Task runs as a non-administrative user unique to the Task. + /// Keeps track of any properties unknown to the library. + internal BatchJobReleaseTask(string id, string commandLine, BatchTaskContainerSettings containerSettings, IList resourceFiles, IList environmentSettings, TimeSpan? maxWallClockTime, TimeSpan? retentionTime, UserIdentity userIdentity, IDictionary serializedAdditionalRawData) + { + Id = id; + CommandLine = commandLine; + ContainerSettings = containerSettings; + ResourceFiles = resourceFiles; + EnvironmentSettings = environmentSettings; + MaxWallClockTime = maxWallClockTime; + RetentionTime = retentionTime; + UserIdentity = userIdentity; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchJobReleaseTask() + { + } + + /// A string that uniquely identifies the Job Release Task within the Job. The ID can contain any combination of alphanumeric characters including hyphens and underscores and cannot contain more than 64 characters. If you do not specify this property, the Batch service assigns a default value of 'jobrelease'. No other Task in the Job can have the same ID as the Job Release Task. If you try to submit a Task with the same id, the Batch service rejects the request with error code TaskIdSameAsJobReleaseTask; if you are calling the REST API directly, the HTTP status code is 409 (Conflict). + public string Id { get; set; } + /// The command line of the Job Release Task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + public string CommandLine { get; set; } + /// The settings for the container under which the Job Release Task runs. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. + public BatchTaskContainerSettings ContainerSettings { get; set; } + /// A list of files that the Batch service will download to the Compute Node before running the command line. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. Files listed under this element are located in the Task's working directory. + public IList ResourceFiles { get; } + /// A list of environment variable settings for the Job Release Task. + public IList EnvironmentSettings { get; } + /// The maximum elapsed time that the Job Release Task may run on a given Compute Node, measured from the time the Task starts. If the Task does not complete within the time limit, the Batch service terminates it. The default value is 15 minutes. You may not specify a timeout longer than 15 minutes. If you do, the Batch service rejects it with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + public TimeSpan? MaxWallClockTime { get; set; } + /// The minimum time to retain the Task directory for the Job Release Task on the Compute Node. After this time, the Batch service may delete the Task directory and all its contents. The default is 7 days, i.e. the Task directory will be retained for 7 days unless the Compute Node is removed or the Job is deleted. + public TimeSpan? RetentionTime { get; set; } + /// The user identity under which the Job Release Task runs. If omitted, the Task runs as a non-administrative user unique to the Task. + public UserIdentity UserIdentity { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobReleaseTaskExecutionInfo.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobReleaseTaskExecutionInfo.Serialization.cs new file mode 100644 index 0000000000000..af2ca9be37313 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobReleaseTaskExecutionInfo.Serialization.cs @@ -0,0 +1,250 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchJobReleaseTaskExecutionInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobReleaseTaskExecutionInfo)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartTime, "O"); + if (Optional.IsDefined(EndTime)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndTime.Value, "O"); + } + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.ToString()); + if (Optional.IsDefined(TaskRootDirectory)) + { + writer.WritePropertyName("taskRootDirectory"u8); + writer.WriteStringValue(TaskRootDirectory); + } + if (Optional.IsDefined(TaskRootDirectoryUrl)) + { + writer.WritePropertyName("taskRootDirectoryUrl"u8); + writer.WriteStringValue(TaskRootDirectoryUrl); + } + if (Optional.IsDefined(ExitCode)) + { + writer.WritePropertyName("exitCode"u8); + writer.WriteNumberValue(ExitCode.Value); + } + if (Optional.IsDefined(ContainerInfo)) + { + writer.WritePropertyName("containerInfo"u8); + writer.WriteObjectValue(ContainerInfo, options); + } + if (Optional.IsDefined(FailureInfo)) + { + writer.WritePropertyName("failureInfo"u8); + writer.WriteObjectValue(FailureInfo, options); + } + if (Optional.IsDefined(Result)) + { + writer.WritePropertyName("result"u8); + writer.WriteStringValue(Result.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchJobReleaseTaskExecutionInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobReleaseTaskExecutionInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchJobReleaseTaskExecutionInfo(document.RootElement, options); + } + + internal static BatchJobReleaseTaskExecutionInfo DeserializeBatchJobReleaseTaskExecutionInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset startTime = default; + DateTimeOffset? endTime = default; + BatchJobReleaseTaskState state = default; + string taskRootDirectory = default; + string taskRootDirectoryUrl = default; + int? exitCode = default; + BatchTaskContainerExecutionInfo containerInfo = default; + BatchTaskFailureInfo failureInfo = default; + BatchTaskExecutionResult? result = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("startTime"u8)) + { + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("state"u8)) + { + state = new BatchJobReleaseTaskState(property.Value.GetString()); + continue; + } + if (property.NameEquals("taskRootDirectory"u8)) + { + taskRootDirectory = property.Value.GetString(); + continue; + } + if (property.NameEquals("taskRootDirectoryUrl"u8)) + { + taskRootDirectoryUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("exitCode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + exitCode = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("containerInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + containerInfo = BatchTaskContainerExecutionInfo.DeserializeBatchTaskContainerExecutionInfo(property.Value, options); + continue; + } + if (property.NameEquals("failureInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + failureInfo = BatchTaskFailureInfo.DeserializeBatchTaskFailureInfo(property.Value, options); + continue; + } + if (property.NameEquals("result"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + result = new BatchTaskExecutionResult(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchJobReleaseTaskExecutionInfo( + startTime, + endTime, + state, + taskRootDirectory, + taskRootDirectoryUrl, + exitCode, + containerInfo, + failureInfo, + result, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchJobReleaseTaskExecutionInfo)} does not support writing '{options.Format}' format."); + } + } + + BatchJobReleaseTaskExecutionInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchJobReleaseTaskExecutionInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchJobReleaseTaskExecutionInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchJobReleaseTaskExecutionInfo FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchJobReleaseTaskExecutionInfo(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobReleaseTaskExecutionInfo.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobReleaseTaskExecutionInfo.cs new file mode 100644 index 0000000000000..36edc24ff92a0 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobReleaseTaskExecutionInfo.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// + /// Contains information about the execution of a Job Release Task on a Compute + /// Node. + /// + public partial class BatchJobReleaseTaskExecutionInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The time at which the Task started running. If the Task has been restarted or retried, this is the most recent time at which the Task started running. + /// The current state of the Job Release Task on the Compute Node. + internal BatchJobReleaseTaskExecutionInfo(DateTimeOffset startTime, BatchJobReleaseTaskState state) + { + StartTime = startTime; + State = state; + } + + /// Initializes a new instance of . + /// The time at which the Task started running. If the Task has been restarted or retried, this is the most recent time at which the Task started running. + /// The time at which the Job Release Task completed. This property is set only if the Task is in the Completed state. + /// The current state of the Job Release Task on the Compute Node. + /// The root directory of the Job Release Task on the Compute Node. You can use this path to retrieve files created by the Task, such as log files. + /// The URL to the root directory of the Job Release Task on the Compute Node. + /// The exit code of the program specified on the Task command line. This parameter is returned only if the Task is in the completed state. The exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. Note that the exit code may also be generated by the Compute Node operating system, such as when a process is forcibly terminated. + /// Information about the container under which the Task is executing. This property is set only if the Task runs in a container context. + /// Information describing the Task failure, if any. This property is set only if the Task is in the completed state and encountered a failure. + /// The result of the Task execution. If the value is 'failed', then the details of the failure can be found in the failureInfo property. + /// Keeps track of any properties unknown to the library. + internal BatchJobReleaseTaskExecutionInfo(DateTimeOffset startTime, DateTimeOffset? endTime, BatchJobReleaseTaskState state, string taskRootDirectory, string taskRootDirectoryUrl, int? exitCode, BatchTaskContainerExecutionInfo containerInfo, BatchTaskFailureInfo failureInfo, BatchTaskExecutionResult? result, IDictionary serializedAdditionalRawData) + { + StartTime = startTime; + EndTime = endTime; + State = state; + TaskRootDirectory = taskRootDirectory; + TaskRootDirectoryUrl = taskRootDirectoryUrl; + ExitCode = exitCode; + ContainerInfo = containerInfo; + FailureInfo = failureInfo; + Result = result; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchJobReleaseTaskExecutionInfo() + { + } + + /// The time at which the Task started running. If the Task has been restarted or retried, this is the most recent time at which the Task started running. + public DateTimeOffset StartTime { get; } + /// The time at which the Job Release Task completed. This property is set only if the Task is in the Completed state. + public DateTimeOffset? EndTime { get; } + /// The current state of the Job Release Task on the Compute Node. + public BatchJobReleaseTaskState State { get; } + /// The root directory of the Job Release Task on the Compute Node. You can use this path to retrieve files created by the Task, such as log files. + public string TaskRootDirectory { get; } + /// The URL to the root directory of the Job Release Task on the Compute Node. + public string TaskRootDirectoryUrl { get; } + /// The exit code of the program specified on the Task command line. This parameter is returned only if the Task is in the completed state. The exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. Note that the exit code may also be generated by the Compute Node operating system, such as when a process is forcibly terminated. + public int? ExitCode { get; } + /// Information about the container under which the Task is executing. This property is set only if the Task runs in a container context. + public BatchTaskContainerExecutionInfo ContainerInfo { get; } + /// Information describing the Task failure, if any. This property is set only if the Task is in the completed state and encountered a failure. + public BatchTaskFailureInfo FailureInfo { get; } + /// The result of the Task execution. If the value is 'failed', then the details of the failure can be found in the failureInfo property. + public BatchTaskExecutionResult? Result { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobReleaseTaskState.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobReleaseTaskState.cs new file mode 100644 index 0000000000000..0ff562689f661 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobReleaseTaskState.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.Compute.Batch +{ + /// BatchJobReleaseTaskState enums. + public readonly partial struct BatchJobReleaseTaskState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BatchJobReleaseTaskState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string RunningValue = "running"; + private const string CompletedValue = "completed"; + + /// The Task is currently running (including retrying). + public static BatchJobReleaseTaskState Running { get; } = new BatchJobReleaseTaskState(RunningValue); + /// The Task has exited with exit code 0, or the Task has exhausted its retry limit, or the Batch service was unable to start the Task due to Task preparation errors (such as resource file download failures). + public static BatchJobReleaseTaskState Completed { get; } = new BatchJobReleaseTaskState(CompletedValue); + /// Determines if two values are the same. + public static bool operator ==(BatchJobReleaseTaskState left, BatchJobReleaseTaskState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BatchJobReleaseTaskState left, BatchJobReleaseTaskState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator BatchJobReleaseTaskState(string value) => new BatchJobReleaseTaskState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BatchJobReleaseTaskState other && Equals(other); + /// + public bool Equals(BatchJobReleaseTaskState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobSchedule.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobSchedule.Serialization.cs new file mode 100644 index 0000000000000..9ffbc11fee3dd --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobSchedule.Serialization.cs @@ -0,0 +1,355 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchJobSchedule : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobSchedule)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W" && Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (options.Format != "W" && Optional.IsDefined(Url)) + { + writer.WritePropertyName("url"u8); + writer.WriteStringValue(Url); + } + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("eTag"u8); + writer.WriteStringValue(ETag); + } + if (options.Format != "W" && Optional.IsDefined(LastModified)) + { + writer.WritePropertyName("lastModified"u8); + writer.WriteStringValue(LastModified.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(CreationTime)) + { + writer.WritePropertyName("creationTime"u8); + writer.WriteStringValue(CreationTime.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(StateTransitionTime)) + { + writer.WritePropertyName("stateTransitionTime"u8); + writer.WriteStringValue(StateTransitionTime.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(PreviousState)) + { + writer.WritePropertyName("previousState"u8); + writer.WriteStringValue(PreviousState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(PreviousStateTransitionTime)) + { + writer.WritePropertyName("previousStateTransitionTime"u8); + writer.WriteStringValue(PreviousStateTransitionTime.Value, "O"); + } + if (Optional.IsDefined(Schedule)) + { + writer.WritePropertyName("schedule"u8); + writer.WriteObjectValue(Schedule, options); + } + writer.WritePropertyName("jobSpecification"u8); + writer.WriteObjectValue(JobSpecification, options); + if (options.Format != "W" && Optional.IsDefined(ExecutionInfo)) + { + writer.WritePropertyName("executionInfo"u8); + writer.WriteObjectValue(ExecutionInfo, options); + } + if (Optional.IsCollectionDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); + writer.WriteStartArray(); + foreach (var item in Metadata) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(Stats)) + { + writer.WritePropertyName("stats"u8); + writer.WriteObjectValue(Stats, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchJobSchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobSchedule)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchJobSchedule(document.RootElement, options); + } + + internal static BatchJobSchedule DeserializeBatchJobSchedule(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + string displayName = default; + string url = default; + string eTag = default; + DateTimeOffset? lastModified = default; + DateTimeOffset? creationTime = default; + BatchJobScheduleState? state = default; + DateTimeOffset? stateTransitionTime = default; + BatchJobScheduleState? previousState = default; + DateTimeOffset? previousStateTransitionTime = default; + BatchJobScheduleConfiguration schedule = default; + BatchJobSpecification jobSpecification = default; + BatchJobScheduleExecutionInfo executionInfo = default; + IList metadata = default; + BatchJobScheduleStatistics stats = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("url"u8)) + { + url = property.Value.GetString(); + continue; + } + if (property.NameEquals("eTag"u8)) + { + eTag = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastModified"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastModified = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("creationTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + creationTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new BatchJobScheduleState(property.Value.GetString()); + continue; + } + if (property.NameEquals("stateTransitionTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + stateTransitionTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("previousState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + previousState = new BatchJobScheduleState(property.Value.GetString()); + continue; + } + if (property.NameEquals("previousStateTransitionTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + previousStateTransitionTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("schedule"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schedule = BatchJobScheduleConfiguration.DeserializeBatchJobScheduleConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("jobSpecification"u8)) + { + jobSpecification = BatchJobSpecification.DeserializeBatchJobSpecification(property.Value, options); + continue; + } + if (property.NameEquals("executionInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + executionInfo = BatchJobScheduleExecutionInfo.DeserializeBatchJobScheduleExecutionInfo(property.Value, options); + continue; + } + if (property.NameEquals("metadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MetadataItem.DeserializeMetadataItem(item, options)); + } + metadata = array; + continue; + } + if (property.NameEquals("stats"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + stats = BatchJobScheduleStatistics.DeserializeBatchJobScheduleStatistics(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchJobSchedule( + id, + displayName, + url, + eTag, + lastModified, + creationTime, + state, + stateTransitionTime, + previousState, + previousStateTransitionTime, + schedule, + jobSpecification, + executionInfo, + metadata ?? new ChangeTrackingList(), + stats, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchJobSchedule)} does not support writing '{options.Format}' format."); + } + } + + BatchJobSchedule IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchJobSchedule(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchJobSchedule)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchJobSchedule FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchJobSchedule(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobSchedule.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobSchedule.cs new file mode 100644 index 0000000000000..9dffba45d20ba --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobSchedule.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// + /// A Job Schedule that allows recurring Jobs by specifying when to run Jobs and a + /// specification used to create each Job. + /// + public partial class BatchJobSchedule + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The details of the Jobs to be created on this schedule. + /// is null. + public BatchJobSchedule(BatchJobSpecification jobSpecification) + { + Argument.AssertNotNull(jobSpecification, nameof(jobSpecification)); + + JobSpecification = jobSpecification; + Metadata = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// A string that uniquely identifies the schedule within the Account. + /// The display name for the schedule. + /// The URL of the Job Schedule. + /// The ETag of the Job Schedule. This is an opaque string. You can use it to detect whether the Job Schedule has changed between requests. In particular, you can be pass the ETag with an Update Job Schedule request to specify that your changes should take effect only if nobody else has modified the schedule in the meantime. + /// The last modified time of the Job Schedule. This is the last time at which the schedule level data, such as the Job specification or recurrence information, changed. It does not factor in job-level changes such as new Jobs being created or Jobs changing state. + /// The creation time of the Job Schedule. + /// The current state of the Job Schedule. + /// The time at which the Job Schedule entered the current state. + /// The previous state of the Job Schedule. This property is not present if the Job Schedule is in its initial active state. + /// The time at which the Job Schedule entered its previous state. This property is not present if the Job Schedule is in its initial active state. + /// The schedule according to which Jobs will be created. All times are fixed respective to UTC and are not impacted by daylight saving time. + /// The details of the Jobs to be created on this schedule. + /// Information about Jobs that have been and will be run under this schedule. + /// A list of name-value pairs associated with the schedule as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. + /// The lifetime resource usage statistics for the Job Schedule. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes. + /// Keeps track of any properties unknown to the library. + internal BatchJobSchedule(string id, string displayName, string url, string eTag, DateTimeOffset? lastModified, DateTimeOffset? creationTime, BatchJobScheduleState? state, DateTimeOffset? stateTransitionTime, BatchJobScheduleState? previousState, DateTimeOffset? previousStateTransitionTime, BatchJobScheduleConfiguration schedule, BatchJobSpecification jobSpecification, BatchJobScheduleExecutionInfo executionInfo, IList metadata, BatchJobScheduleStatistics stats, IDictionary serializedAdditionalRawData) + { + Id = id; + DisplayName = displayName; + Url = url; + ETag = eTag; + LastModified = lastModified; + CreationTime = creationTime; + State = state; + StateTransitionTime = stateTransitionTime; + PreviousState = previousState; + PreviousStateTransitionTime = previousStateTransitionTime; + Schedule = schedule; + JobSpecification = jobSpecification; + ExecutionInfo = executionInfo; + Metadata = metadata; + Stats = stats; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchJobSchedule() + { + } + + /// A string that uniquely identifies the schedule within the Account. + public string Id { get; } + /// The display name for the schedule. + public string DisplayName { get; } + /// The URL of the Job Schedule. + public string Url { get; } + /// The ETag of the Job Schedule. This is an opaque string. You can use it to detect whether the Job Schedule has changed between requests. In particular, you can be pass the ETag with an Update Job Schedule request to specify that your changes should take effect only if nobody else has modified the schedule in the meantime. + public string ETag { get; } + /// The last modified time of the Job Schedule. This is the last time at which the schedule level data, such as the Job specification or recurrence information, changed. It does not factor in job-level changes such as new Jobs being created or Jobs changing state. + public DateTimeOffset? LastModified { get; } + /// The creation time of the Job Schedule. + public DateTimeOffset? CreationTime { get; } + /// The current state of the Job Schedule. + public BatchJobScheduleState? State { get; } + /// The time at which the Job Schedule entered the current state. + public DateTimeOffset? StateTransitionTime { get; } + /// The previous state of the Job Schedule. This property is not present if the Job Schedule is in its initial active state. + public BatchJobScheduleState? PreviousState { get; } + /// The time at which the Job Schedule entered its previous state. This property is not present if the Job Schedule is in its initial active state. + public DateTimeOffset? PreviousStateTransitionTime { get; } + /// The schedule according to which Jobs will be created. All times are fixed respective to UTC and are not impacted by daylight saving time. + public BatchJobScheduleConfiguration Schedule { get; set; } + /// The details of the Jobs to be created on this schedule. + public BatchJobSpecification JobSpecification { get; set; } + /// Information about Jobs that have been and will be run under this schedule. + public BatchJobScheduleExecutionInfo ExecutionInfo { get; } + /// A list of name-value pairs associated with the schedule as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. + public IList Metadata { get; } + /// The lifetime resource usage statistics for the Job Schedule. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes. + public BatchJobScheduleStatistics Stats { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleConfiguration.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleConfiguration.Serialization.cs new file mode 100644 index 0000000000000..9565ce4d9fb8f --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleConfiguration.Serialization.cs @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchJobScheduleConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobScheduleConfiguration)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(DoNotRunUntil)) + { + writer.WritePropertyName("doNotRunUntil"u8); + writer.WriteStringValue(DoNotRunUntil.Value, "O"); + } + if (Optional.IsDefined(DoNotRunAfter)) + { + writer.WritePropertyName("doNotRunAfter"u8); + writer.WriteStringValue(DoNotRunAfter.Value, "O"); + } + if (Optional.IsDefined(StartWindow)) + { + writer.WritePropertyName("startWindow"u8); + writer.WriteStringValue(StartWindow.Value, "P"); + } + if (Optional.IsDefined(RecurrenceInterval)) + { + writer.WritePropertyName("recurrenceInterval"u8); + writer.WriteStringValue(RecurrenceInterval.Value, "P"); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchJobScheduleConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobScheduleConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchJobScheduleConfiguration(document.RootElement, options); + } + + internal static BatchJobScheduleConfiguration DeserializeBatchJobScheduleConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? doNotRunUntil = default; + DateTimeOffset? doNotRunAfter = default; + TimeSpan? startWindow = default; + TimeSpan? recurrenceInterval = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("doNotRunUntil"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + doNotRunUntil = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("doNotRunAfter"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + doNotRunAfter = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("startWindow"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startWindow = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("recurrenceInterval"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recurrenceInterval = property.Value.GetTimeSpan("P"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchJobScheduleConfiguration(doNotRunUntil, doNotRunAfter, startWindow, recurrenceInterval, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchJobScheduleConfiguration)} does not support writing '{options.Format}' format."); + } + } + + BatchJobScheduleConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchJobScheduleConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchJobScheduleConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchJobScheduleConfiguration FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchJobScheduleConfiguration(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleConfiguration.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleConfiguration.cs new file mode 100644 index 0000000000000..a3d035fef9de7 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleConfiguration.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// + /// The schedule according to which Jobs will be created. All times are fixed + /// respective to UTC and are not impacted by daylight saving time. + /// + public partial class BatchJobScheduleConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public BatchJobScheduleConfiguration() + { + } + + /// Initializes a new instance of . + /// The earliest time at which any Job may be created under this Job Schedule. If you do not specify a doNotRunUntil time, the schedule becomes ready to create Jobs immediately. + /// A time after which no Job will be created under this Job Schedule. The schedule will move to the completed state as soon as this deadline is past and there is no active Job under this Job Schedule. If you do not specify a doNotRunAfter time, and you are creating a recurring Job Schedule, the Job Schedule will remain active until you explicitly terminate it. + /// The time interval, starting from the time at which the schedule indicates a Job should be created, within which a Job must be created. If a Job is not created within the startWindow interval, then the 'opportunity' is lost; no Job will be created until the next recurrence of the schedule. If the schedule is recurring, and the startWindow is longer than the recurrence interval, then this is equivalent to an infinite startWindow, because the Job that is 'due' in one recurrenceInterval is not carried forward into the next recurrence interval. The default is infinite. The minimum value is 1 minute. If you specify a lower value, the Batch service rejects the schedule with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + /// The time interval between the start times of two successive Jobs under the Job Schedule. A Job Schedule can have at most one active Job under it at any given time. Because a Job Schedule can have at most one active Job under it at any given time, if it is time to create a new Job under a Job Schedule, but the previous Job is still running, the Batch service will not create the new Job until the previous Job finishes. If the previous Job does not finish within the startWindow period of the new recurrenceInterval, then no new Job will be scheduled for that interval. For recurring Jobs, you should normally specify a jobManagerTask in the jobSpecification. If you do not use jobManagerTask, you will need an external process to monitor when Jobs are created, add Tasks to the Jobs and terminate the Jobs ready for the next recurrence. The default is that the schedule does not recur: one Job is created, within the startWindow after the doNotRunUntil time, and the schedule is complete as soon as that Job finishes. The minimum value is 1 minute. If you specify a lower value, the Batch service rejects the schedule with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + /// Keeps track of any properties unknown to the library. + internal BatchJobScheduleConfiguration(DateTimeOffset? doNotRunUntil, DateTimeOffset? doNotRunAfter, TimeSpan? startWindow, TimeSpan? recurrenceInterval, IDictionary serializedAdditionalRawData) + { + DoNotRunUntil = doNotRunUntil; + DoNotRunAfter = doNotRunAfter; + StartWindow = startWindow; + RecurrenceInterval = recurrenceInterval; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The earliest time at which any Job may be created under this Job Schedule. If you do not specify a doNotRunUntil time, the schedule becomes ready to create Jobs immediately. + public DateTimeOffset? DoNotRunUntil { get; set; } + /// A time after which no Job will be created under this Job Schedule. The schedule will move to the completed state as soon as this deadline is past and there is no active Job under this Job Schedule. If you do not specify a doNotRunAfter time, and you are creating a recurring Job Schedule, the Job Schedule will remain active until you explicitly terminate it. + public DateTimeOffset? DoNotRunAfter { get; set; } + /// The time interval, starting from the time at which the schedule indicates a Job should be created, within which a Job must be created. If a Job is not created within the startWindow interval, then the 'opportunity' is lost; no Job will be created until the next recurrence of the schedule. If the schedule is recurring, and the startWindow is longer than the recurrence interval, then this is equivalent to an infinite startWindow, because the Job that is 'due' in one recurrenceInterval is not carried forward into the next recurrence interval. The default is infinite. The minimum value is 1 minute. If you specify a lower value, the Batch service rejects the schedule with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + public TimeSpan? StartWindow { get; set; } + /// The time interval between the start times of two successive Jobs under the Job Schedule. A Job Schedule can have at most one active Job under it at any given time. Because a Job Schedule can have at most one active Job under it at any given time, if it is time to create a new Job under a Job Schedule, but the previous Job is still running, the Batch service will not create the new Job until the previous Job finishes. If the previous Job does not finish within the startWindow period of the new recurrenceInterval, then no new Job will be scheduled for that interval. For recurring Jobs, you should normally specify a jobManagerTask in the jobSpecification. If you do not use jobManagerTask, you will need an external process to monitor when Jobs are created, add Tasks to the Jobs and terminate the Jobs ready for the next recurrence. The default is that the schedule does not recur: one Job is created, within the startWindow after the doNotRunUntil time, and the schedule is complete as soon as that Job finishes. The minimum value is 1 minute. If you specify a lower value, the Batch service rejects the schedule with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + public TimeSpan? RecurrenceInterval { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleCreateContent.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleCreateContent.Serialization.cs new file mode 100644 index 0000000000000..c92614a3fc9f3 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleCreateContent.Serialization.cs @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchJobScheduleCreateContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobScheduleCreateContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + writer.WritePropertyName("schedule"u8); + writer.WriteObjectValue(Schedule, options); + writer.WritePropertyName("jobSpecification"u8); + writer.WriteObjectValue(JobSpecification, options); + if (Optional.IsCollectionDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); + writer.WriteStartArray(); + foreach (var item in Metadata) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchJobScheduleCreateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobScheduleCreateContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchJobScheduleCreateContent(document.RootElement, options); + } + + internal static BatchJobScheduleCreateContent DeserializeBatchJobScheduleCreateContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + string displayName = default; + BatchJobScheduleConfiguration schedule = default; + BatchJobSpecification jobSpecification = default; + IList metadata = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("schedule"u8)) + { + schedule = BatchJobScheduleConfiguration.DeserializeBatchJobScheduleConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("jobSpecification"u8)) + { + jobSpecification = BatchJobSpecification.DeserializeBatchJobSpecification(property.Value, options); + continue; + } + if (property.NameEquals("metadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MetadataItem.DeserializeMetadataItem(item, options)); + } + metadata = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchJobScheduleCreateContent( + id, + displayName, + schedule, + jobSpecification, + metadata ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchJobScheduleCreateContent)} does not support writing '{options.Format}' format."); + } + } + + BatchJobScheduleCreateContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchJobScheduleCreateContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchJobScheduleCreateContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchJobScheduleCreateContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchJobScheduleCreateContent(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleCreateContent.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleCreateContent.cs new file mode 100644 index 0000000000000..624f65419a5e3 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleCreateContent.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Parameters for creating an Azure Batch Job Schedule. + public partial class BatchJobScheduleCreateContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// A string that uniquely identifies the schedule within the Account. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an Account that differ only by case). + /// The schedule according to which Jobs will be created. All times are fixed respective to UTC and are not impacted by daylight saving time. + /// The details of the Jobs to be created on this schedule. + /// , or is null. + public BatchJobScheduleCreateContent(string id, BatchJobScheduleConfiguration schedule, BatchJobSpecification jobSpecification) + { + Argument.AssertNotNull(id, nameof(id)); + Argument.AssertNotNull(schedule, nameof(schedule)); + Argument.AssertNotNull(jobSpecification, nameof(jobSpecification)); + + Id = id; + Schedule = schedule; + JobSpecification = jobSpecification; + Metadata = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// A string that uniquely identifies the schedule within the Account. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an Account that differ only by case). + /// The display name for the schedule. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. + /// The schedule according to which Jobs will be created. All times are fixed respective to UTC and are not impacted by daylight saving time. + /// The details of the Jobs to be created on this schedule. + /// A list of name-value pairs associated with the schedule as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. + /// Keeps track of any properties unknown to the library. + internal BatchJobScheduleCreateContent(string id, string displayName, BatchJobScheduleConfiguration schedule, BatchJobSpecification jobSpecification, IList metadata, IDictionary serializedAdditionalRawData) + { + Id = id; + DisplayName = displayName; + Schedule = schedule; + JobSpecification = jobSpecification; + Metadata = metadata; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchJobScheduleCreateContent() + { + } + + /// A string that uniquely identifies the schedule within the Account. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an Account that differ only by case). + public string Id { get; } + /// The display name for the schedule. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. + public string DisplayName { get; set; } + /// The schedule according to which Jobs will be created. All times are fixed respective to UTC and are not impacted by daylight saving time. + public BatchJobScheduleConfiguration Schedule { get; } + /// The details of the Jobs to be created on this schedule. + public BatchJobSpecification JobSpecification { get; } + /// A list of name-value pairs associated with the schedule as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. + public IList Metadata { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleExecutionInfo.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleExecutionInfo.Serialization.cs new file mode 100644 index 0000000000000..e467ae34e11d9 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleExecutionInfo.Serialization.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchJobScheduleExecutionInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobScheduleExecutionInfo)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(NextRunTime)) + { + writer.WritePropertyName("nextRunTime"u8); + writer.WriteStringValue(NextRunTime.Value, "O"); + } + if (Optional.IsDefined(RecentJob)) + { + writer.WritePropertyName("recentJob"u8); + writer.WriteObjectValue(RecentJob, options); + } + if (Optional.IsDefined(EndTime)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndTime.Value, "O"); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchJobScheduleExecutionInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobScheduleExecutionInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchJobScheduleExecutionInfo(document.RootElement, options); + } + + internal static BatchJobScheduleExecutionInfo DeserializeBatchJobScheduleExecutionInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? nextRunTime = default; + RecentBatchJob recentJob = default; + DateTimeOffset? endTime = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nextRunTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextRunTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("recentJob"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recentJob = RecentBatchJob.DeserializeRecentBatchJob(property.Value, options); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchJobScheduleExecutionInfo(nextRunTime, recentJob, endTime, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchJobScheduleExecutionInfo)} does not support writing '{options.Format}' format."); + } + } + + BatchJobScheduleExecutionInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchJobScheduleExecutionInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchJobScheduleExecutionInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchJobScheduleExecutionInfo FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchJobScheduleExecutionInfo(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleExecutionInfo.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleExecutionInfo.cs new file mode 100644 index 0000000000000..3a3bc92fb0a04 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleExecutionInfo.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// + /// Contains information about Jobs that have been and will be run under a Job + /// Schedule. + /// + public partial class BatchJobScheduleExecutionInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal BatchJobScheduleExecutionInfo() + { + } + + /// Initializes a new instance of . + /// The next time at which a Job will be created under this schedule. This property is meaningful only if the schedule is in the active state when the time comes around. For example, if the schedule is disabled, no Job will be created at nextRunTime unless the Job is enabled before then. + /// Information about the most recent Job under the Job Schedule. This property is present only if the at least one Job has run under the schedule. + /// The time at which the schedule ended. This property is set only if the Job Schedule is in the completed state. + /// Keeps track of any properties unknown to the library. + internal BatchJobScheduleExecutionInfo(DateTimeOffset? nextRunTime, RecentBatchJob recentJob, DateTimeOffset? endTime, IDictionary serializedAdditionalRawData) + { + NextRunTime = nextRunTime; + RecentJob = recentJob; + EndTime = endTime; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The next time at which a Job will be created under this schedule. This property is meaningful only if the schedule is in the active state when the time comes around. For example, if the schedule is disabled, no Job will be created at nextRunTime unless the Job is enabled before then. + public DateTimeOffset? NextRunTime { get; } + /// Information about the most recent Job under the Job Schedule. This property is present only if the at least one Job has run under the schedule. + public RecentBatchJob RecentJob { get; } + /// The time at which the schedule ended. This property is set only if the Job Schedule is in the completed state. + public DateTimeOffset? EndTime { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleState.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleState.cs new file mode 100644 index 0000000000000..1eb372222c112 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleState.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Compute.Batch +{ + /// BatchJobScheduleState enums. + public readonly partial struct BatchJobScheduleState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BatchJobScheduleState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ActiveValue = "active"; + private const string CompletedValue = "completed"; + private const string DisabledValue = "disabled"; + private const string TerminatingValue = "terminating"; + private const string DeletingValue = "deleting"; + + /// The Job Schedule is active and will create Jobs as per its schedule. + public static BatchJobScheduleState Active { get; } = new BatchJobScheduleState(ActiveValue); + /// The Job Schedule has terminated, either by reaching its end time or by the user terminating it explicitly. + public static BatchJobScheduleState Completed { get; } = new BatchJobScheduleState(CompletedValue); + /// The user has disabled the Job Schedule. The scheduler will not initiate any new Jobs will on this schedule, but any existing active Job will continue to run. + public static BatchJobScheduleState Disabled { get; } = new BatchJobScheduleState(DisabledValue); + /// The Job Schedule has no more work to do, or has been explicitly terminated by the user, but the termination operation is still in progress. The scheduler will not initiate any new Jobs for this Job Schedule, nor is any existing Job active. + public static BatchJobScheduleState Terminating { get; } = new BatchJobScheduleState(TerminatingValue); + /// The user has requested that the Job Schedule be deleted, but the delete operation is still in progress. The scheduler will not initiate any new Jobs for this Job Schedule, and will delete any existing Jobs and Tasks under the Job Schedule, including any active Job. The Job Schedule will be deleted when all Jobs and Tasks under the Job Schedule have been deleted. + public static BatchJobScheduleState Deleting { get; } = new BatchJobScheduleState(DeletingValue); + /// Determines if two values are the same. + public static bool operator ==(BatchJobScheduleState left, BatchJobScheduleState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BatchJobScheduleState left, BatchJobScheduleState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator BatchJobScheduleState(string value) => new BatchJobScheduleState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BatchJobScheduleState other && Equals(other); + /// + public bool Equals(BatchJobScheduleState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleStatistics.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleStatistics.Serialization.cs new file mode 100644 index 0000000000000..c5a3c95add21f --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleStatistics.Serialization.cs @@ -0,0 +1,254 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchJobScheduleStatistics : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobScheduleStatistics)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("url"u8); + writer.WriteStringValue(Url); + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartTime, "O"); + writer.WritePropertyName("lastUpdateTime"u8); + writer.WriteStringValue(LastUpdateTime, "O"); + writer.WritePropertyName("userCPUTime"u8); + writer.WriteStringValue(UserCpuTime, "P"); + writer.WritePropertyName("kernelCPUTime"u8); + writer.WriteStringValue(KernelCpuTime, "P"); + writer.WritePropertyName("wallClockTime"u8); + writer.WriteStringValue(WallClockTime, "P"); + writer.WritePropertyName("readIOps"u8); + writer.WriteNumberValue(ReadIOps); + writer.WritePropertyName("writeIOps"u8); + writer.WriteNumberValue(WriteIOps); + writer.WritePropertyName("readIOGiB"u8); + writer.WriteNumberValue(ReadIOGiB); + writer.WritePropertyName("writeIOGiB"u8); + writer.WriteNumberValue(WriteIOGiB); + writer.WritePropertyName("numSucceededTasks"u8); + writer.WriteNumberValue(NumSucceededTasks); + writer.WritePropertyName("numFailedTasks"u8); + writer.WriteNumberValue(NumFailedTasks); + writer.WritePropertyName("numTaskRetries"u8); + writer.WriteNumberValue(NumTaskRetries); + writer.WritePropertyName("waitTime"u8); + writer.WriteStringValue(WaitTime, "P"); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchJobScheduleStatistics IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobScheduleStatistics)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchJobScheduleStatistics(document.RootElement, options); + } + + internal static BatchJobScheduleStatistics DeserializeBatchJobScheduleStatistics(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string url = default; + DateTimeOffset startTime = default; + DateTimeOffset lastUpdateTime = default; + TimeSpan userCPUTime = default; + TimeSpan kernelCPUTime = default; + TimeSpan wallClockTime = default; + long readIOps = default; + long writeIOps = default; + float readIOGiB = default; + float writeIOGiB = default; + long numSucceededTasks = default; + long numFailedTasks = default; + long numTaskRetries = default; + TimeSpan waitTime = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("url"u8)) + { + url = property.Value.GetString(); + continue; + } + if (property.NameEquals("startTime"u8)) + { + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdateTime"u8)) + { + lastUpdateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("userCPUTime"u8)) + { + userCPUTime = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("kernelCPUTime"u8)) + { + kernelCPUTime = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("wallClockTime"u8)) + { + wallClockTime = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("readIOps"u8)) + { + readIOps = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("writeIOps"u8)) + { + writeIOps = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("readIOGiB"u8)) + { + readIOGiB = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("writeIOGiB"u8)) + { + writeIOGiB = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("numSucceededTasks"u8)) + { + numSucceededTasks = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("numFailedTasks"u8)) + { + numFailedTasks = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("numTaskRetries"u8)) + { + numTaskRetries = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("waitTime"u8)) + { + waitTime = property.Value.GetTimeSpan("P"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchJobScheduleStatistics( + url, + startTime, + lastUpdateTime, + userCPUTime, + kernelCPUTime, + wallClockTime, + readIOps, + writeIOps, + readIOGiB, + writeIOGiB, + numSucceededTasks, + numFailedTasks, + numTaskRetries, + waitTime, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchJobScheduleStatistics)} does not support writing '{options.Format}' format."); + } + } + + BatchJobScheduleStatistics IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchJobScheduleStatistics(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchJobScheduleStatistics)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchJobScheduleStatistics FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchJobScheduleStatistics(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleStatistics.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleStatistics.cs new file mode 100644 index 0000000000000..e5b81b22f7426 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleStatistics.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Resource usage statistics for a Job Schedule. + public partial class BatchJobScheduleStatistics + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The URL of the statistics. + /// The start time of the time range covered by the statistics. + /// The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime. + /// The total user mode CPU time (summed across all cores and all Compute Nodes) consumed by all Tasks in all Jobs created under the schedule. + /// The total kernel mode CPU time (summed across all cores and all Compute Nodes) consumed by all Tasks in all Jobs created under the schedule. + /// The total wall clock time of all the Tasks in all the Jobs created under the schedule. The wall clock time is the elapsed time from when the Task started running on a Compute Node to when it finished (or to the last time the statistics were updated, if the Task had not finished by then). If a Task was retried, this includes the wall clock time of all the Task retries. + /// The total number of disk read operations made by all Tasks in all Jobs created under the schedule. + /// The total number of disk write operations made by all Tasks in all Jobs created under the schedule. + /// The total gibibytes read from disk by all Tasks in all Jobs created under the schedule. + /// The total gibibytes written to disk by all Tasks in all Jobs created under the schedule. + /// The total number of Tasks successfully completed during the given time range in Jobs created under the schedule. A Task completes successfully if it returns exit code 0. + /// The total number of Tasks that failed during the given time range in Jobs created under the schedule. A Task fails if it exhausts its maximum retry count without returning exit code 0. + /// The total number of retries during the given time range on all Tasks in all Jobs created under the schedule. + /// The total wait time of all Tasks in all Jobs created under the schedule. The wait time for a Task is defined as the elapsed time between the creation of the Task and the start of Task execution. (If the Task is retried due to failures, the wait time is the time to the most recent Task execution.). This value is only reported in the Account lifetime statistics; it is not included in the Job statistics. + /// is null. + internal BatchJobScheduleStatistics(string url, DateTimeOffset startTime, DateTimeOffset lastUpdateTime, TimeSpan userCpuTime, TimeSpan kernelCpuTime, TimeSpan wallClockTime, long readIOps, long writeIOps, float readIOGiB, float writeIOGiB, long numSucceededTasks, long numFailedTasks, long numTaskRetries, TimeSpan waitTime) + { + Argument.AssertNotNull(url, nameof(url)); + + Url = url; + StartTime = startTime; + LastUpdateTime = lastUpdateTime; + UserCpuTime = userCpuTime; + KernelCpuTime = kernelCpuTime; + WallClockTime = wallClockTime; + ReadIOps = readIOps; + WriteIOps = writeIOps; + ReadIOGiB = readIOGiB; + WriteIOGiB = writeIOGiB; + NumSucceededTasks = numSucceededTasks; + NumFailedTasks = numFailedTasks; + NumTaskRetries = numTaskRetries; + WaitTime = waitTime; + } + + /// Initializes a new instance of . + /// The URL of the statistics. + /// The start time of the time range covered by the statistics. + /// The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime. + /// The total user mode CPU time (summed across all cores and all Compute Nodes) consumed by all Tasks in all Jobs created under the schedule. + /// The total kernel mode CPU time (summed across all cores and all Compute Nodes) consumed by all Tasks in all Jobs created under the schedule. + /// The total wall clock time of all the Tasks in all the Jobs created under the schedule. The wall clock time is the elapsed time from when the Task started running on a Compute Node to when it finished (or to the last time the statistics were updated, if the Task had not finished by then). If a Task was retried, this includes the wall clock time of all the Task retries. + /// The total number of disk read operations made by all Tasks in all Jobs created under the schedule. + /// The total number of disk write operations made by all Tasks in all Jobs created under the schedule. + /// The total gibibytes read from disk by all Tasks in all Jobs created under the schedule. + /// The total gibibytes written to disk by all Tasks in all Jobs created under the schedule. + /// The total number of Tasks successfully completed during the given time range in Jobs created under the schedule. A Task completes successfully if it returns exit code 0. + /// The total number of Tasks that failed during the given time range in Jobs created under the schedule. A Task fails if it exhausts its maximum retry count without returning exit code 0. + /// The total number of retries during the given time range on all Tasks in all Jobs created under the schedule. + /// The total wait time of all Tasks in all Jobs created under the schedule. The wait time for a Task is defined as the elapsed time between the creation of the Task and the start of Task execution. (If the Task is retried due to failures, the wait time is the time to the most recent Task execution.). This value is only reported in the Account lifetime statistics; it is not included in the Job statistics. + /// Keeps track of any properties unknown to the library. + internal BatchJobScheduleStatistics(string url, DateTimeOffset startTime, DateTimeOffset lastUpdateTime, TimeSpan userCpuTime, TimeSpan kernelCpuTime, TimeSpan wallClockTime, long readIOps, long writeIOps, float readIOGiB, float writeIOGiB, long numSucceededTasks, long numFailedTasks, long numTaskRetries, TimeSpan waitTime, IDictionary serializedAdditionalRawData) + { + Url = url; + StartTime = startTime; + LastUpdateTime = lastUpdateTime; + UserCpuTime = userCpuTime; + KernelCpuTime = kernelCpuTime; + WallClockTime = wallClockTime; + ReadIOps = readIOps; + WriteIOps = writeIOps; + ReadIOGiB = readIOGiB; + WriteIOGiB = writeIOGiB; + NumSucceededTasks = numSucceededTasks; + NumFailedTasks = numFailedTasks; + NumTaskRetries = numTaskRetries; + WaitTime = waitTime; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchJobScheduleStatistics() + { + } + + /// The URL of the statistics. + public string Url { get; } + /// The start time of the time range covered by the statistics. + public DateTimeOffset StartTime { get; } + /// The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime. + public DateTimeOffset LastUpdateTime { get; } + /// The total user mode CPU time (summed across all cores and all Compute Nodes) consumed by all Tasks in all Jobs created under the schedule. + public TimeSpan UserCpuTime { get; } + /// The total kernel mode CPU time (summed across all cores and all Compute Nodes) consumed by all Tasks in all Jobs created under the schedule. + public TimeSpan KernelCpuTime { get; } + /// The total wall clock time of all the Tasks in all the Jobs created under the schedule. The wall clock time is the elapsed time from when the Task started running on a Compute Node to when it finished (or to the last time the statistics were updated, if the Task had not finished by then). If a Task was retried, this includes the wall clock time of all the Task retries. + public TimeSpan WallClockTime { get; } + /// The total number of disk read operations made by all Tasks in all Jobs created under the schedule. + public long ReadIOps { get; } + /// The total number of disk write operations made by all Tasks in all Jobs created under the schedule. + public long WriteIOps { get; } + /// The total gibibytes read from disk by all Tasks in all Jobs created under the schedule. + public float ReadIOGiB { get; } + /// The total gibibytes written to disk by all Tasks in all Jobs created under the schedule. + public float WriteIOGiB { get; } + /// The total number of Tasks successfully completed during the given time range in Jobs created under the schedule. A Task completes successfully if it returns exit code 0. + public long NumSucceededTasks { get; } + /// The total number of Tasks that failed during the given time range in Jobs created under the schedule. A Task fails if it exhausts its maximum retry count without returning exit code 0. + public long NumFailedTasks { get; } + /// The total number of retries during the given time range on all Tasks in all Jobs created under the schedule. + public long NumTaskRetries { get; } + /// The total wait time of all Tasks in all Jobs created under the schedule. The wait time for a Task is defined as the elapsed time between the creation of the Task and the start of Task execution. (If the Task is retried due to failures, the wait time is the time to the most recent Task execution.). This value is only reported in the Account lifetime statistics; it is not included in the Job statistics. + public TimeSpan WaitTime { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleUpdateContent.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleUpdateContent.Serialization.cs new file mode 100644 index 0000000000000..eeea81dd97f28 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleUpdateContent.Serialization.cs @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchJobScheduleUpdateContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobScheduleUpdateContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Schedule)) + { + writer.WritePropertyName("schedule"u8); + writer.WriteObjectValue(Schedule, options); + } + if (Optional.IsDefined(JobSpecification)) + { + writer.WritePropertyName("jobSpecification"u8); + writer.WriteObjectValue(JobSpecification, options); + } + if (Optional.IsCollectionDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); + writer.WriteStartArray(); + foreach (var item in Metadata) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchJobScheduleUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobScheduleUpdateContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchJobScheduleUpdateContent(document.RootElement, options); + } + + internal static BatchJobScheduleUpdateContent DeserializeBatchJobScheduleUpdateContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BatchJobScheduleConfiguration schedule = default; + BatchJobSpecification jobSpecification = default; + IList metadata = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("schedule"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schedule = BatchJobScheduleConfiguration.DeserializeBatchJobScheduleConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("jobSpecification"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + jobSpecification = BatchJobSpecification.DeserializeBatchJobSpecification(property.Value, options); + continue; + } + if (property.NameEquals("metadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MetadataItem.DeserializeMetadataItem(item, options)); + } + metadata = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchJobScheduleUpdateContent(schedule, jobSpecification, metadata ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchJobScheduleUpdateContent)} does not support writing '{options.Format}' format."); + } + } + + BatchJobScheduleUpdateContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchJobScheduleUpdateContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchJobScheduleUpdateContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchJobScheduleUpdateContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchJobScheduleUpdateContent(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleUpdateContent.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleUpdateContent.cs new file mode 100644 index 0000000000000..6136aa6bbdc4f --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobScheduleUpdateContent.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Parameters for updating an Azure Batch Job Schedule. + public partial class BatchJobScheduleUpdateContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public BatchJobScheduleUpdateContent() + { + Metadata = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The schedule according to which Jobs will be created. All times are fixed respective to UTC and are not impacted by daylight saving time. If you do not specify this element, the existing schedule is left unchanged. + /// The details of the Jobs to be created on this schedule. Updates affect only Jobs that are started after the update has taken place. Any currently active Job continues with the older specification. + /// A list of name-value pairs associated with the Job Schedule as metadata. If you do not specify this element, existing metadata is left unchanged. + /// Keeps track of any properties unknown to the library. + internal BatchJobScheduleUpdateContent(BatchJobScheduleConfiguration schedule, BatchJobSpecification jobSpecification, IList metadata, IDictionary serializedAdditionalRawData) + { + Schedule = schedule; + JobSpecification = jobSpecification; + Metadata = metadata; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The schedule according to which Jobs will be created. All times are fixed respective to UTC and are not impacted by daylight saving time. If you do not specify this element, the existing schedule is left unchanged. + public BatchJobScheduleConfiguration Schedule { get; set; } + /// The details of the Jobs to be created on this schedule. Updates affect only Jobs that are started after the update has taken place. Any currently active Job continues with the older specification. + public BatchJobSpecification JobSpecification { get; set; } + /// A list of name-value pairs associated with the Job Schedule as metadata. If you do not specify this element, existing metadata is left unchanged. + public IList Metadata { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobSchedulingError.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobSchedulingError.Serialization.cs new file mode 100644 index 0000000000000..cf976b1262e65 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobSchedulingError.Serialization.cs @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchJobSchedulingError : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobSchedulingError)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category.ToString()); + if (Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + } + if (Optional.IsDefined(Message)) + { + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + } + if (Optional.IsCollectionDefined(Details)) + { + writer.WritePropertyName("details"u8); + writer.WriteStartArray(); + foreach (var item in Details) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchJobSchedulingError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobSchedulingError)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchJobSchedulingError(document.RootElement, options); + } + + internal static BatchJobSchedulingError DeserializeBatchJobSchedulingError(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ErrorCategory category = default; + string code = default; + string message = default; + IReadOnlyList details = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + category = new ErrorCategory(property.Value.GetString()); + continue; + } + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("details"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NameValuePair.DeserializeNameValuePair(item, options)); + } + details = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchJobSchedulingError(category, code, message, details ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchJobSchedulingError)} does not support writing '{options.Format}' format."); + } + } + + BatchJobSchedulingError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchJobSchedulingError(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchJobSchedulingError)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchJobSchedulingError FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchJobSchedulingError(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobSchedulingError.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobSchedulingError.cs new file mode 100644 index 0000000000000..e3913cde134b2 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobSchedulingError.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// An error encountered by the Batch service when scheduling a Job. + public partial class BatchJobSchedulingError + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The category of the Job scheduling error. + internal BatchJobSchedulingError(ErrorCategory category) + { + Category = category; + Details = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The category of the Job scheduling error. + /// An identifier for the Job scheduling error. Codes are invariant and are intended to be consumed programmatically. + /// A message describing the Job scheduling error, intended to be suitable for display in a user interface. + /// A list of additional error details related to the scheduling error. + /// Keeps track of any properties unknown to the library. + internal BatchJobSchedulingError(ErrorCategory category, string code, string message, IReadOnlyList details, IDictionary serializedAdditionalRawData) + { + Category = category; + Code = code; + Message = message; + Details = details; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchJobSchedulingError() + { + } + + /// The category of the Job scheduling error. + public ErrorCategory Category { get; } + /// An identifier for the Job scheduling error. Codes are invariant and are intended to be consumed programmatically. + public string Code { get; } + /// A message describing the Job scheduling error, intended to be suitable for display in a user interface. + public string Message { get; } + /// A list of additional error details related to the scheduling error. + public IReadOnlyList Details { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobSpecification.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobSpecification.Serialization.cs new file mode 100644 index 0000000000000..c55ac93bd1225 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobSpecification.Serialization.cs @@ -0,0 +1,377 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchJobSpecification : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobSpecification)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Priority)) + { + writer.WritePropertyName("priority"u8); + writer.WriteNumberValue(Priority.Value); + } + if (Optional.IsDefined(AllowTaskPreemption)) + { + writer.WritePropertyName("allowTaskPreemption"u8); + writer.WriteBooleanValue(AllowTaskPreemption.Value); + } + if (Optional.IsDefined(MaxParallelTasks)) + { + writer.WritePropertyName("maxParallelTasks"u8); + writer.WriteNumberValue(MaxParallelTasks.Value); + } + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsDefined(UsesTaskDependencies)) + { + writer.WritePropertyName("usesTaskDependencies"u8); + writer.WriteBooleanValue(UsesTaskDependencies.Value); + } + if (Optional.IsDefined(OnAllTasksComplete)) + { + writer.WritePropertyName("onAllTasksComplete"u8); + writer.WriteStringValue(OnAllTasksComplete.Value.ToString()); + } + if (Optional.IsDefined(OnTaskFailure)) + { + writer.WritePropertyName("onTaskFailure"u8); + writer.WriteStringValue(OnTaskFailure.Value.ToString()); + } + if (Optional.IsDefined(NetworkConfiguration)) + { + writer.WritePropertyName("networkConfiguration"u8); + writer.WriteObjectValue(NetworkConfiguration, options); + } + if (Optional.IsDefined(Constraints)) + { + writer.WritePropertyName("constraints"u8); + writer.WriteObjectValue(Constraints, options); + } + if (Optional.IsDefined(JobManagerTask)) + { + writer.WritePropertyName("jobManagerTask"u8); + writer.WriteObjectValue(JobManagerTask, options); + } + if (Optional.IsDefined(JobPreparationTask)) + { + writer.WritePropertyName("jobPreparationTask"u8); + writer.WriteObjectValue(JobPreparationTask, options); + } + if (Optional.IsDefined(JobReleaseTask)) + { + writer.WritePropertyName("jobReleaseTask"u8); + writer.WriteObjectValue(JobReleaseTask, options); + } + if (Optional.IsCollectionDefined(CommonEnvironmentSettings)) + { + writer.WritePropertyName("commonEnvironmentSettings"u8); + writer.WriteStartArray(); + foreach (var item in CommonEnvironmentSettings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("poolInfo"u8); + writer.WriteObjectValue(PoolInfo, options); + if (Optional.IsCollectionDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); + writer.WriteStartArray(); + foreach (var item in Metadata) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchJobSpecification IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobSpecification)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchJobSpecification(document.RootElement, options); + } + + internal static BatchJobSpecification DeserializeBatchJobSpecification(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? priority = default; + bool? allowTaskPreemption = default; + int? maxParallelTasks = default; + string displayName = default; + bool? usesTaskDependencies = default; + OnAllBatchTasksComplete? onAllTasksComplete = default; + OnBatchTaskFailure? onTaskFailure = default; + BatchJobNetworkConfiguration networkConfiguration = default; + BatchJobConstraints constraints = default; + BatchJobManagerTask jobManagerTask = default; + BatchJobPreparationTask jobPreparationTask = default; + BatchJobReleaseTask jobReleaseTask = default; + IList commonEnvironmentSettings = default; + BatchPoolInfo poolInfo = default; + IList metadata = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("priority"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + priority = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("allowTaskPreemption"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allowTaskPreemption = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("maxParallelTasks"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxParallelTasks = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("usesTaskDependencies"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + usesTaskDependencies = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("onAllTasksComplete"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onAllTasksComplete = new OnAllBatchTasksComplete(property.Value.GetString()); + continue; + } + if (property.NameEquals("onTaskFailure"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onTaskFailure = new OnBatchTaskFailure(property.Value.GetString()); + continue; + } + if (property.NameEquals("networkConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkConfiguration = BatchJobNetworkConfiguration.DeserializeBatchJobNetworkConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("constraints"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + constraints = BatchJobConstraints.DeserializeBatchJobConstraints(property.Value, options); + continue; + } + if (property.NameEquals("jobManagerTask"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + jobManagerTask = BatchJobManagerTask.DeserializeBatchJobManagerTask(property.Value, options); + continue; + } + if (property.NameEquals("jobPreparationTask"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + jobPreparationTask = BatchJobPreparationTask.DeserializeBatchJobPreparationTask(property.Value, options); + continue; + } + if (property.NameEquals("jobReleaseTask"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + jobReleaseTask = BatchJobReleaseTask.DeserializeBatchJobReleaseTask(property.Value, options); + continue; + } + if (property.NameEquals("commonEnvironmentSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EnvironmentSetting.DeserializeEnvironmentSetting(item, options)); + } + commonEnvironmentSettings = array; + continue; + } + if (property.NameEquals("poolInfo"u8)) + { + poolInfo = BatchPoolInfo.DeserializeBatchPoolInfo(property.Value, options); + continue; + } + if (property.NameEquals("metadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MetadataItem.DeserializeMetadataItem(item, options)); + } + metadata = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchJobSpecification( + priority, + allowTaskPreemption, + maxParallelTasks, + displayName, + usesTaskDependencies, + onAllTasksComplete, + onTaskFailure, + networkConfiguration, + constraints, + jobManagerTask, + jobPreparationTask, + jobReleaseTask, + commonEnvironmentSettings ?? new ChangeTrackingList(), + poolInfo, + metadata ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchJobSpecification)} does not support writing '{options.Format}' format."); + } + } + + BatchJobSpecification IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchJobSpecification(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchJobSpecification)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchJobSpecification FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchJobSpecification(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobSpecification.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobSpecification.cs new file mode 100644 index 0000000000000..692c7b69ba717 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobSpecification.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Specifies details of the Jobs to be created on a schedule. + public partial class BatchJobSpecification + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The Pool on which the Batch service runs the Tasks of Jobs created under this schedule. + /// is null. + public BatchJobSpecification(BatchPoolInfo poolInfo) + { + Argument.AssertNotNull(poolInfo, nameof(poolInfo)); + + CommonEnvironmentSettings = new ChangeTrackingList(); + PoolInfo = poolInfo; + Metadata = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The priority of Jobs created under this schedule. Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0. This priority is used as the default for all Jobs under the Job Schedule. You can update a Job's priority after it has been created using by using the update Job API. + /// Whether Tasks in this job can be preempted by other high priority jobs. If the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job. You can update a job's allowTaskPreemption after it has been created using the update job API. + /// The maximum number of tasks that can be executed in parallel for the job. The value of maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default value is -1, which means there's no limit to the number of tasks that can be run at once. You can update a job's maxParallelTasks after it has been created using the update job API. + /// The display name for Jobs created under this schedule. The name need not be unique and can contain any Unicode characters up to a maximum length of 1024. + /// Whether Tasks in the Job can define dependencies on each other. The default is false. + /// The action the Batch service should take when all Tasks in a Job created under this schedule are in the completed state. Note that if a Job contains no Tasks, then all Tasks are considered complete. This option is therefore most commonly used with a Job Manager task; if you want to use automatic Job termination without a Job Manager, you should initially set onAllTasksComplete to noaction and update the Job properties to set onAllTasksComplete to terminatejob once you have finished adding Tasks. The default is noaction. + /// The action the Batch service should take when any Task fails in a Job created under this schedule. A Task is considered to have failed if it have failed if has a failureInfo. A failureInfo is set if the Task completes with a non-zero exit code after exhausting its retry count, or if there was an error starting the Task, for example due to a resource file download error. The default is noaction. + /// The network configuration for the Job. + /// The execution constraints for Jobs created under this schedule. + /// The details of a Job Manager Task to be launched when a Job is started under this schedule. If the Job does not specify a Job Manager Task, the user must explicitly add Tasks to the Job using the Task API. If the Job does specify a Job Manager Task, the Batch service creates the Job Manager Task when the Job is created, and will try to schedule the Job Manager Task before scheduling other Tasks in the Job. + /// The Job Preparation Task for Jobs created under this schedule. If a Job has a Job Preparation Task, the Batch service will run the Job Preparation Task on a Node before starting any Tasks of that Job on that Compute Node. + /// The Job Release Task for Jobs created under this schedule. The primary purpose of the Job Release Task is to undo changes to Nodes made by the Job Preparation Task. Example activities include deleting local files, or shutting down services that were started as part of Job preparation. A Job Release Task cannot be specified without also specifying a Job Preparation Task for the Job. The Batch service runs the Job Release Task on the Compute Nodes that have run the Job Preparation Task. + /// A list of common environment variable settings. These environment variables are set for all Tasks in Jobs created under this schedule (including the Job Manager, Job Preparation and Job Release Tasks). Individual Tasks can override an environment setting specified here by specifying the same setting name with a different value. + /// The Pool on which the Batch service runs the Tasks of Jobs created under this schedule. + /// A list of name-value pairs associated with each Job created under this schedule as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. + /// Keeps track of any properties unknown to the library. + internal BatchJobSpecification(int? priority, bool? allowTaskPreemption, int? maxParallelTasks, string displayName, bool? usesTaskDependencies, OnAllBatchTasksComplete? onAllTasksComplete, OnBatchTaskFailure? onTaskFailure, BatchJobNetworkConfiguration networkConfiguration, BatchJobConstraints constraints, BatchJobManagerTask jobManagerTask, BatchJobPreparationTask jobPreparationTask, BatchJobReleaseTask jobReleaseTask, IList commonEnvironmentSettings, BatchPoolInfo poolInfo, IList metadata, IDictionary serializedAdditionalRawData) + { + Priority = priority; + AllowTaskPreemption = allowTaskPreemption; + MaxParallelTasks = maxParallelTasks; + DisplayName = displayName; + UsesTaskDependencies = usesTaskDependencies; + OnAllTasksComplete = onAllTasksComplete; + OnTaskFailure = onTaskFailure; + NetworkConfiguration = networkConfiguration; + Constraints = constraints; + JobManagerTask = jobManagerTask; + JobPreparationTask = jobPreparationTask; + JobReleaseTask = jobReleaseTask; + CommonEnvironmentSettings = commonEnvironmentSettings; + PoolInfo = poolInfo; + Metadata = metadata; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchJobSpecification() + { + } + + /// The priority of Jobs created under this schedule. Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0. This priority is used as the default for all Jobs under the Job Schedule. You can update a Job's priority after it has been created using by using the update Job API. + public int? Priority { get; set; } + /// Whether Tasks in this job can be preempted by other high priority jobs. If the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job. You can update a job's allowTaskPreemption after it has been created using the update job API. + public bool? AllowTaskPreemption { get; set; } + /// The maximum number of tasks that can be executed in parallel for the job. The value of maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default value is -1, which means there's no limit to the number of tasks that can be run at once. You can update a job's maxParallelTasks after it has been created using the update job API. + public int? MaxParallelTasks { get; set; } + /// The display name for Jobs created under this schedule. The name need not be unique and can contain any Unicode characters up to a maximum length of 1024. + public string DisplayName { get; set; } + /// Whether Tasks in the Job can define dependencies on each other. The default is false. + public bool? UsesTaskDependencies { get; set; } + /// The action the Batch service should take when all Tasks in a Job created under this schedule are in the completed state. Note that if a Job contains no Tasks, then all Tasks are considered complete. This option is therefore most commonly used with a Job Manager task; if you want to use automatic Job termination without a Job Manager, you should initially set onAllTasksComplete to noaction and update the Job properties to set onAllTasksComplete to terminatejob once you have finished adding Tasks. The default is noaction. + public OnAllBatchTasksComplete? OnAllTasksComplete { get; set; } + /// The action the Batch service should take when any Task fails in a Job created under this schedule. A Task is considered to have failed if it have failed if has a failureInfo. A failureInfo is set if the Task completes with a non-zero exit code after exhausting its retry count, or if there was an error starting the Task, for example due to a resource file download error. The default is noaction. + public OnBatchTaskFailure? OnTaskFailure { get; set; } + /// The network configuration for the Job. + public BatchJobNetworkConfiguration NetworkConfiguration { get; set; } + /// The execution constraints for Jobs created under this schedule. + public BatchJobConstraints Constraints { get; set; } + /// The details of a Job Manager Task to be launched when a Job is started under this schedule. If the Job does not specify a Job Manager Task, the user must explicitly add Tasks to the Job using the Task API. If the Job does specify a Job Manager Task, the Batch service creates the Job Manager Task when the Job is created, and will try to schedule the Job Manager Task before scheduling other Tasks in the Job. + public BatchJobManagerTask JobManagerTask { get; set; } + /// The Job Preparation Task for Jobs created under this schedule. If a Job has a Job Preparation Task, the Batch service will run the Job Preparation Task on a Node before starting any Tasks of that Job on that Compute Node. + public BatchJobPreparationTask JobPreparationTask { get; set; } + /// The Job Release Task for Jobs created under this schedule. The primary purpose of the Job Release Task is to undo changes to Nodes made by the Job Preparation Task. Example activities include deleting local files, or shutting down services that were started as part of Job preparation. A Job Release Task cannot be specified without also specifying a Job Preparation Task for the Job. The Batch service runs the Job Release Task on the Compute Nodes that have run the Job Preparation Task. + public BatchJobReleaseTask JobReleaseTask { get; set; } + /// A list of common environment variable settings. These environment variables are set for all Tasks in Jobs created under this schedule (including the Job Manager, Job Preparation and Job Release Tasks). Individual Tasks can override an environment setting specified here by specifying the same setting name with a different value. + public IList CommonEnvironmentSettings { get; } + /// The Pool on which the Batch service runs the Tasks of Jobs created under this schedule. + public BatchPoolInfo PoolInfo { get; set; } + /// A list of name-value pairs associated with each Job created under this schedule as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. + public IList Metadata { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobState.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobState.cs new file mode 100644 index 0000000000000..ecf2adaf87ca4 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobState.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Compute.Batch +{ + /// BatchJobState enums. + public readonly partial struct BatchJobState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BatchJobState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ActiveValue = "active"; + private const string DisablingValue = "disabling"; + private const string DisabledValue = "disabled"; + private const string EnablingValue = "enabling"; + private const string TerminatingValue = "terminating"; + private const string CompletedValue = "completed"; + private const string DeletingValue = "deleting"; + + /// The Job is available to have Tasks scheduled. + public static BatchJobState Active { get; } = new BatchJobState(ActiveValue); + /// A user has requested that the Job be disabled, but the disable operation is still in progress (for example, waiting for Tasks to terminate). + public static BatchJobState Disabling { get; } = new BatchJobState(DisablingValue); + /// A user has disabled the Job. No Tasks are running, and no new Tasks will be scheduled. + public static BatchJobState Disabled { get; } = new BatchJobState(DisabledValue); + /// A user has requested that the Job be enabled, but the enable operation is still in progress. + public static BatchJobState Enabling { get; } = new BatchJobState(EnablingValue); + /// The Job is about to complete, either because a Job Manager Task has completed or because the user has terminated the Job, but the terminate operation is still in progress (for example, because Job Release Tasks are running). + public static BatchJobState Terminating { get; } = new BatchJobState(TerminatingValue); + /// All Tasks have terminated, and the system will not accept any more Tasks or any further changes to the Job. + public static BatchJobState Completed { get; } = new BatchJobState(CompletedValue); + /// A user has requested that the Job be deleted, but the delete operation is still in progress (for example, because the system is still terminating running Tasks). + public static BatchJobState Deleting { get; } = new BatchJobState(DeletingValue); + /// Determines if two values are the same. + public static bool operator ==(BatchJobState left, BatchJobState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BatchJobState left, BatchJobState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator BatchJobState(string value) => new BatchJobState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BatchJobState other && Equals(other); + /// + public bool Equals(BatchJobState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobStatistics.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobStatistics.Serialization.cs new file mode 100644 index 0000000000000..27a9f31eaf0c0 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobStatistics.Serialization.cs @@ -0,0 +1,254 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchJobStatistics : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobStatistics)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("url"u8); + writer.WriteStringValue(Url); + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartTime, "O"); + writer.WritePropertyName("lastUpdateTime"u8); + writer.WriteStringValue(LastUpdateTime, "O"); + writer.WritePropertyName("userCPUTime"u8); + writer.WriteStringValue(UserCpuTime, "P"); + writer.WritePropertyName("kernelCPUTime"u8); + writer.WriteStringValue(KernelCpuTime, "P"); + writer.WritePropertyName("wallClockTime"u8); + writer.WriteStringValue(WallClockTime, "P"); + writer.WritePropertyName("readIOps"u8); + writer.WriteNumberValue(ReadIOps); + writer.WritePropertyName("writeIOps"u8); + writer.WriteNumberValue(WriteIOps); + writer.WritePropertyName("readIOGiB"u8); + writer.WriteNumberValue(ReadIOGiB); + writer.WritePropertyName("writeIOGiB"u8); + writer.WriteNumberValue(WriteIOGiB); + writer.WritePropertyName("numSucceededTasks"u8); + writer.WriteNumberValue(NumSucceededTasks); + writer.WritePropertyName("numFailedTasks"u8); + writer.WriteNumberValue(NumFailedTasks); + writer.WritePropertyName("numTaskRetries"u8); + writer.WriteNumberValue(NumTaskRetries); + writer.WritePropertyName("waitTime"u8); + writer.WriteStringValue(WaitTime, "P"); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchJobStatistics IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobStatistics)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchJobStatistics(document.RootElement, options); + } + + internal static BatchJobStatistics DeserializeBatchJobStatistics(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string url = default; + DateTimeOffset startTime = default; + DateTimeOffset lastUpdateTime = default; + TimeSpan userCPUTime = default; + TimeSpan kernelCPUTime = default; + TimeSpan wallClockTime = default; + long readIOps = default; + long writeIOps = default; + float readIOGiB = default; + float writeIOGiB = default; + long numSucceededTasks = default; + long numFailedTasks = default; + long numTaskRetries = default; + TimeSpan waitTime = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("url"u8)) + { + url = property.Value.GetString(); + continue; + } + if (property.NameEquals("startTime"u8)) + { + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdateTime"u8)) + { + lastUpdateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("userCPUTime"u8)) + { + userCPUTime = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("kernelCPUTime"u8)) + { + kernelCPUTime = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("wallClockTime"u8)) + { + wallClockTime = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("readIOps"u8)) + { + readIOps = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("writeIOps"u8)) + { + writeIOps = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("readIOGiB"u8)) + { + readIOGiB = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("writeIOGiB"u8)) + { + writeIOGiB = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("numSucceededTasks"u8)) + { + numSucceededTasks = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("numFailedTasks"u8)) + { + numFailedTasks = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("numTaskRetries"u8)) + { + numTaskRetries = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("waitTime"u8)) + { + waitTime = property.Value.GetTimeSpan("P"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchJobStatistics( + url, + startTime, + lastUpdateTime, + userCPUTime, + kernelCPUTime, + wallClockTime, + readIOps, + writeIOps, + readIOGiB, + writeIOGiB, + numSucceededTasks, + numFailedTasks, + numTaskRetries, + waitTime, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchJobStatistics)} does not support writing '{options.Format}' format."); + } + } + + BatchJobStatistics IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchJobStatistics(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchJobStatistics)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchJobStatistics FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchJobStatistics(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobStatistics.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobStatistics.cs new file mode 100644 index 0000000000000..ca6254790eee2 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobStatistics.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Resource usage statistics for a Job. + public partial class BatchJobStatistics + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The URL of the statistics. + /// The start time of the time range covered by the statistics. + /// The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime. + /// The total user mode CPU time (summed across all cores and all Compute Nodes) consumed by all Tasks in the Job. + /// The total kernel mode CPU time (summed across all cores and all Compute Nodes) consumed by all Tasks in the Job. + /// The total wall clock time of all Tasks in the Job. The wall clock time is the elapsed time from when the Task started running on a Compute Node to when it finished (or to the last time the statistics were updated, if the Task had not finished by then). If a Task was retried, this includes the wall clock time of all the Task retries. + /// The total number of disk read operations made by all Tasks in the Job. + /// The total number of disk write operations made by all Tasks in the Job. + /// The total amount of data in GiB read from disk by all Tasks in the Job. + /// The total amount of data in GiB written to disk by all Tasks in the Job. + /// The total number of Tasks successfully completed in the Job during the given time range. A Task completes successfully if it returns exit code 0. + /// The total number of Tasks in the Job that failed during the given time range. A Task fails if it exhausts its maximum retry count without returning exit code 0. + /// The total number of retries on all the Tasks in the Job during the given time range. + /// The total wait time of all Tasks in the Job. The wait time for a Task is defined as the elapsed time between the creation of the Task and the start of Task execution. (If the Task is retried due to failures, the wait time is the time to the most recent Task execution.) This value is only reported in the Account lifetime statistics; it is not included in the Job statistics. + /// is null. + internal BatchJobStatistics(string url, DateTimeOffset startTime, DateTimeOffset lastUpdateTime, TimeSpan userCpuTime, TimeSpan kernelCpuTime, TimeSpan wallClockTime, long readIOps, long writeIOps, float readIOGiB, float writeIOGiB, long numSucceededTasks, long numFailedTasks, long numTaskRetries, TimeSpan waitTime) + { + Argument.AssertNotNull(url, nameof(url)); + + Url = url; + StartTime = startTime; + LastUpdateTime = lastUpdateTime; + UserCpuTime = userCpuTime; + KernelCpuTime = kernelCpuTime; + WallClockTime = wallClockTime; + ReadIOps = readIOps; + WriteIOps = writeIOps; + ReadIOGiB = readIOGiB; + WriteIOGiB = writeIOGiB; + NumSucceededTasks = numSucceededTasks; + NumFailedTasks = numFailedTasks; + NumTaskRetries = numTaskRetries; + WaitTime = waitTime; + } + + /// Initializes a new instance of . + /// The URL of the statistics. + /// The start time of the time range covered by the statistics. + /// The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime. + /// The total user mode CPU time (summed across all cores and all Compute Nodes) consumed by all Tasks in the Job. + /// The total kernel mode CPU time (summed across all cores and all Compute Nodes) consumed by all Tasks in the Job. + /// The total wall clock time of all Tasks in the Job. The wall clock time is the elapsed time from when the Task started running on a Compute Node to when it finished (or to the last time the statistics were updated, if the Task had not finished by then). If a Task was retried, this includes the wall clock time of all the Task retries. + /// The total number of disk read operations made by all Tasks in the Job. + /// The total number of disk write operations made by all Tasks in the Job. + /// The total amount of data in GiB read from disk by all Tasks in the Job. + /// The total amount of data in GiB written to disk by all Tasks in the Job. + /// The total number of Tasks successfully completed in the Job during the given time range. A Task completes successfully if it returns exit code 0. + /// The total number of Tasks in the Job that failed during the given time range. A Task fails if it exhausts its maximum retry count without returning exit code 0. + /// The total number of retries on all the Tasks in the Job during the given time range. + /// The total wait time of all Tasks in the Job. The wait time for a Task is defined as the elapsed time between the creation of the Task and the start of Task execution. (If the Task is retried due to failures, the wait time is the time to the most recent Task execution.) This value is only reported in the Account lifetime statistics; it is not included in the Job statistics. + /// Keeps track of any properties unknown to the library. + internal BatchJobStatistics(string url, DateTimeOffset startTime, DateTimeOffset lastUpdateTime, TimeSpan userCpuTime, TimeSpan kernelCpuTime, TimeSpan wallClockTime, long readIOps, long writeIOps, float readIOGiB, float writeIOGiB, long numSucceededTasks, long numFailedTasks, long numTaskRetries, TimeSpan waitTime, IDictionary serializedAdditionalRawData) + { + Url = url; + StartTime = startTime; + LastUpdateTime = lastUpdateTime; + UserCpuTime = userCpuTime; + KernelCpuTime = kernelCpuTime; + WallClockTime = wallClockTime; + ReadIOps = readIOps; + WriteIOps = writeIOps; + ReadIOGiB = readIOGiB; + WriteIOGiB = writeIOGiB; + NumSucceededTasks = numSucceededTasks; + NumFailedTasks = numFailedTasks; + NumTaskRetries = numTaskRetries; + WaitTime = waitTime; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchJobStatistics() + { + } + + /// The URL of the statistics. + public string Url { get; } + /// The start time of the time range covered by the statistics. + public DateTimeOffset StartTime { get; } + /// The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime. + public DateTimeOffset LastUpdateTime { get; } + /// The total user mode CPU time (summed across all cores and all Compute Nodes) consumed by all Tasks in the Job. + public TimeSpan UserCpuTime { get; } + /// The total kernel mode CPU time (summed across all cores and all Compute Nodes) consumed by all Tasks in the Job. + public TimeSpan KernelCpuTime { get; } + /// The total wall clock time of all Tasks in the Job. The wall clock time is the elapsed time from when the Task started running on a Compute Node to when it finished (or to the last time the statistics were updated, if the Task had not finished by then). If a Task was retried, this includes the wall clock time of all the Task retries. + public TimeSpan WallClockTime { get; } + /// The total number of disk read operations made by all Tasks in the Job. + public long ReadIOps { get; } + /// The total number of disk write operations made by all Tasks in the Job. + public long WriteIOps { get; } + /// The total amount of data in GiB read from disk by all Tasks in the Job. + public float ReadIOGiB { get; } + /// The total amount of data in GiB written to disk by all Tasks in the Job. + public float WriteIOGiB { get; } + /// The total number of Tasks successfully completed in the Job during the given time range. A Task completes successfully if it returns exit code 0. + public long NumSucceededTasks { get; } + /// The total number of Tasks in the Job that failed during the given time range. A Task fails if it exhausts its maximum retry count without returning exit code 0. + public long NumFailedTasks { get; } + /// The total number of retries on all the Tasks in the Job during the given time range. + public long NumTaskRetries { get; } + /// The total wait time of all Tasks in the Job. The wait time for a Task is defined as the elapsed time between the creation of the Task and the start of Task execution. (If the Task is retried due to failures, the wait time is the time to the most recent Task execution.) This value is only reported in the Account lifetime statistics; it is not included in the Job statistics. + public TimeSpan WaitTime { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobTerminateContent.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobTerminateContent.Serialization.cs new file mode 100644 index 0000000000000..72f3d8bd44fa2 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobTerminateContent.Serialization.cs @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchJobTerminateContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobTerminateContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(TerminationReason)) + { + writer.WritePropertyName("terminateReason"u8); + writer.WriteStringValue(TerminationReason); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchJobTerminateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobTerminateContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchJobTerminateContent(document.RootElement, options); + } + + internal static BatchJobTerminateContent DeserializeBatchJobTerminateContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string terminateReason = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("terminateReason"u8)) + { + terminateReason = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchJobTerminateContent(terminateReason, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchJobTerminateContent)} does not support writing '{options.Format}' format."); + } + } + + BatchJobTerminateContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchJobTerminateContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchJobTerminateContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchJobTerminateContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchJobTerminateContent(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobTerminateContent.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobTerminateContent.cs new file mode 100644 index 0000000000000..537722bd26452 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobTerminateContent.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; + +namespace Azure.Compute.Batch +{ + /// Parameters for terminating an Azure Batch Job. + public partial class BatchJobTerminateContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public BatchJobTerminateContent() + { + } + + /// Initializes a new instance of . + /// The text you want to appear as the Job's TerminationReason. The default is 'UserTerminate'. + /// Keeps track of any properties unknown to the library. + internal BatchJobTerminateContent(string terminationReason, IDictionary serializedAdditionalRawData) + { + TerminationReason = terminationReason; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The text you want to appear as the Job's TerminationReason. The default is 'UserTerminate'. + public string TerminationReason { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobUpdateContent.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobUpdateContent.Serialization.cs new file mode 100644 index 0000000000000..6f849ee7b5853 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobUpdateContent.Serialization.cs @@ -0,0 +1,250 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchJobUpdateContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobUpdateContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Priority)) + { + writer.WritePropertyName("priority"u8); + writer.WriteNumberValue(Priority.Value); + } + if (Optional.IsDefined(AllowTaskPreemption)) + { + writer.WritePropertyName("allowTaskPreemption"u8); + writer.WriteBooleanValue(AllowTaskPreemption.Value); + } + if (Optional.IsDefined(MaxParallelTasks)) + { + writer.WritePropertyName("maxParallelTasks"u8); + writer.WriteNumberValue(MaxParallelTasks.Value); + } + if (Optional.IsDefined(Constraints)) + { + writer.WritePropertyName("constraints"u8); + writer.WriteObjectValue(Constraints, options); + } + if (Optional.IsDefined(PoolInfo)) + { + writer.WritePropertyName("poolInfo"u8); + writer.WriteObjectValue(PoolInfo, options); + } + if (Optional.IsDefined(OnAllTasksComplete)) + { + writer.WritePropertyName("onAllTasksComplete"u8); + writer.WriteStringValue(OnAllTasksComplete.Value.ToString()); + } + if (Optional.IsCollectionDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); + writer.WriteStartArray(); + foreach (var item in Metadata) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchJobUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchJobUpdateContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchJobUpdateContent(document.RootElement, options); + } + + internal static BatchJobUpdateContent DeserializeBatchJobUpdateContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? priority = default; + bool? allowTaskPreemption = default; + int? maxParallelTasks = default; + BatchJobConstraints constraints = default; + BatchPoolInfo poolInfo = default; + OnAllBatchTasksComplete? onAllTasksComplete = default; + IList metadata = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("priority"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + priority = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("allowTaskPreemption"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allowTaskPreemption = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("maxParallelTasks"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxParallelTasks = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("constraints"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + constraints = BatchJobConstraints.DeserializeBatchJobConstraints(property.Value, options); + continue; + } + if (property.NameEquals("poolInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + poolInfo = BatchPoolInfo.DeserializeBatchPoolInfo(property.Value, options); + continue; + } + if (property.NameEquals("onAllTasksComplete"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + onAllTasksComplete = new OnAllBatchTasksComplete(property.Value.GetString()); + continue; + } + if (property.NameEquals("metadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MetadataItem.DeserializeMetadataItem(item, options)); + } + metadata = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchJobUpdateContent( + priority, + allowTaskPreemption, + maxParallelTasks, + constraints, + poolInfo, + onAllTasksComplete, + metadata ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchJobUpdateContent)} does not support writing '{options.Format}' format."); + } + } + + BatchJobUpdateContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchJobUpdateContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchJobUpdateContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchJobUpdateContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchJobUpdateContent(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobUpdateContent.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobUpdateContent.cs new file mode 100644 index 0000000000000..5776641d88eaf --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchJobUpdateContent.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Parameters for updating an Azure Batch Job. + public partial class BatchJobUpdateContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public BatchJobUpdateContent() + { + Metadata = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The priority of the Job. Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. If omitted, the priority of the Job is left unchanged. + /// Whether Tasks in this job can be preempted by other high priority jobs. If the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job. You can update a job's allowTaskPreemption after it has been created using the update job API. + /// The maximum number of tasks that can be executed in parallel for the job. The value of maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default value is -1, which means there's no limit to the number of tasks that can be run at once. You can update a job's maxParallelTasks after it has been created using the update job API. + /// The execution constraints for the Job. If omitted, the existing execution constraints are left unchanged. + /// The Pool on which the Batch service runs the Job's Tasks. You may change the Pool for a Job only when the Job is disabled. The Patch Job call will fail if you include the poolInfo element and the Job is not disabled. If you specify an autoPoolSpecification in the poolInfo, only the keepAlive property of the autoPoolSpecification can be updated, and then only if the autoPoolSpecification has a poolLifetimeOption of Job (other job properties can be updated as normal). If omitted, the Job continues to run on its current Pool. + /// The action the Batch service should take when all Tasks in the Job are in the completed state. If omitted, the completion behavior is left unchanged. You may not change the value from terminatejob to noaction - that is, once you have engaged automatic Job termination, you cannot turn it off again. If you try to do this, the request fails with an 'invalid property value' error response; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + /// A list of name-value pairs associated with the Job as metadata. If omitted, the existing Job metadata is left unchanged. + /// Keeps track of any properties unknown to the library. + internal BatchJobUpdateContent(int? priority, bool? allowTaskPreemption, int? maxParallelTasks, BatchJobConstraints constraints, BatchPoolInfo poolInfo, OnAllBatchTasksComplete? onAllTasksComplete, IList metadata, IDictionary serializedAdditionalRawData) + { + Priority = priority; + AllowTaskPreemption = allowTaskPreemption; + MaxParallelTasks = maxParallelTasks; + Constraints = constraints; + PoolInfo = poolInfo; + OnAllTasksComplete = onAllTasksComplete; + Metadata = metadata; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The priority of the Job. Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. If omitted, the priority of the Job is left unchanged. + public int? Priority { get; set; } + /// Whether Tasks in this job can be preempted by other high priority jobs. If the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job. You can update a job's allowTaskPreemption after it has been created using the update job API. + public bool? AllowTaskPreemption { get; set; } + /// The maximum number of tasks that can be executed in parallel for the job. The value of maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default value is -1, which means there's no limit to the number of tasks that can be run at once. You can update a job's maxParallelTasks after it has been created using the update job API. + public int? MaxParallelTasks { get; set; } + /// The execution constraints for the Job. If omitted, the existing execution constraints are left unchanged. + public BatchJobConstraints Constraints { get; set; } + /// The Pool on which the Batch service runs the Job's Tasks. You may change the Pool for a Job only when the Job is disabled. The Patch Job call will fail if you include the poolInfo element and the Job is not disabled. If you specify an autoPoolSpecification in the poolInfo, only the keepAlive property of the autoPoolSpecification can be updated, and then only if the autoPoolSpecification has a poolLifetimeOption of Job (other job properties can be updated as normal). If omitted, the Job continues to run on its current Pool. + public BatchPoolInfo PoolInfo { get; set; } + /// The action the Batch service should take when all Tasks in the Job are in the completed state. If omitted, the completion behavior is left unchanged. You may not change the value from terminatejob to noaction - that is, once you have engaged automatic Job termination, you cannot turn it off again. If you try to do this, the request fails with an 'invalid property value' error response; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + public OnAllBatchTasksComplete? OnAllTasksComplete { get; set; } + /// A list of name-value pairs associated with the Job as metadata. If omitted, the existing Job metadata is left unchanged. + public IList Metadata { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNode.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNode.Serialization.cs new file mode 100644 index 0000000000000..f37cee7103fa6 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNode.Serialization.cs @@ -0,0 +1,480 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchNode : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchNode)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsDefined(Url)) + { + writer.WritePropertyName("url"u8); + writer.WriteStringValue(Url); + } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(SchedulingState)) + { + writer.WritePropertyName("schedulingState"u8); + writer.WriteStringValue(SchedulingState.Value.ToString()); + } + if (Optional.IsDefined(StateTransitionTime)) + { + writer.WritePropertyName("stateTransitionTime"u8); + writer.WriteStringValue(StateTransitionTime.Value, "O"); + } + if (Optional.IsDefined(LastBootTime)) + { + writer.WritePropertyName("lastBootTime"u8); + writer.WriteStringValue(LastBootTime.Value, "O"); + } + if (Optional.IsDefined(AllocationTime)) + { + writer.WritePropertyName("allocationTime"u8); + writer.WriteStringValue(AllocationTime.Value, "O"); + } + if (Optional.IsDefined(IpAddress)) + { + writer.WritePropertyName("ipAddress"u8); + writer.WriteStringValue(IpAddress); + } + if (Optional.IsDefined(AffinityId)) + { + writer.WritePropertyName("affinityId"u8); + writer.WriteStringValue(AffinityId); + } + if (Optional.IsDefined(VmSize)) + { + writer.WritePropertyName("vmSize"u8); + writer.WriteStringValue(VmSize); + } + if (Optional.IsDefined(TotalTasksRun)) + { + writer.WritePropertyName("totalTasksRun"u8); + writer.WriteNumberValue(TotalTasksRun.Value); + } + if (Optional.IsDefined(RunningTasksCount)) + { + writer.WritePropertyName("runningTasksCount"u8); + writer.WriteNumberValue(RunningTasksCount.Value); + } + if (Optional.IsDefined(RunningTaskSlotsCount)) + { + writer.WritePropertyName("runningTaskSlotsCount"u8); + writer.WriteNumberValue(RunningTaskSlotsCount.Value); + } + if (Optional.IsDefined(TotalTasksSucceeded)) + { + writer.WritePropertyName("totalTasksSucceeded"u8); + writer.WriteNumberValue(TotalTasksSucceeded.Value); + } + if (Optional.IsCollectionDefined(RecentTasks)) + { + writer.WritePropertyName("recentTasks"u8); + writer.WriteStartArray(); + foreach (var item in RecentTasks) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(StartTask)) + { + writer.WritePropertyName("startTask"u8); + writer.WriteObjectValue(StartTask, options); + } + if (Optional.IsDefined(StartTaskInfo)) + { + writer.WritePropertyName("startTaskInfo"u8); + writer.WriteObjectValue(StartTaskInfo, options); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(IsDedicated)) + { + writer.WritePropertyName("isDedicated"u8); + writer.WriteBooleanValue(IsDedicated.Value); + } + if (Optional.IsDefined(EndpointConfiguration)) + { + writer.WritePropertyName("endpointConfiguration"u8); + writer.WriteObjectValue(EndpointConfiguration, options); + } + if (Optional.IsDefined(NodeAgentInfo)) + { + writer.WritePropertyName("nodeAgentInfo"u8); + writer.WriteObjectValue(NodeAgentInfo, options); + } + if (Optional.IsDefined(VirtualMachineInfo)) + { + writer.WritePropertyName("virtualMachineInfo"u8); + writer.WriteObjectValue(VirtualMachineInfo, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchNode IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchNode)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchNode(document.RootElement, options); + } + + internal static BatchNode DeserializeBatchNode(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + string url = default; + BatchNodeState? state = default; + SchedulingState? schedulingState = default; + DateTimeOffset? stateTransitionTime = default; + DateTimeOffset? lastBootTime = default; + DateTimeOffset? allocationTime = default; + string ipAddress = default; + string affinityId = default; + string vmSize = default; + int? totalTasksRun = default; + int? runningTasksCount = default; + int? runningTaskSlotsCount = default; + int? totalTasksSucceeded = default; + IReadOnlyList recentTasks = default; + BatchStartTask startTask = default; + BatchStartTaskInfo startTaskInfo = default; + IReadOnlyList errors = default; + bool? isDedicated = default; + BatchNodeEndpointConfiguration endpointConfiguration = default; + BatchNodeAgentInfo nodeAgentInfo = default; + VirtualMachineInfo virtualMachineInfo = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("url"u8)) + { + url = property.Value.GetString(); + continue; + } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new BatchNodeState(property.Value.GetString()); + continue; + } + if (property.NameEquals("schedulingState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schedulingState = new SchedulingState(property.Value.GetString()); + continue; + } + if (property.NameEquals("stateTransitionTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + stateTransitionTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastBootTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastBootTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("allocationTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allocationTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("ipAddress"u8)) + { + ipAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("affinityId"u8)) + { + affinityId = property.Value.GetString(); + continue; + } + if (property.NameEquals("vmSize"u8)) + { + vmSize = property.Value.GetString(); + continue; + } + if (property.NameEquals("totalTasksRun"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + totalTasksRun = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("runningTasksCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + runningTasksCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("runningTaskSlotsCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + runningTaskSlotsCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("totalTasksSucceeded"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + totalTasksSucceeded = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("recentTasks"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BatchTaskInfo.DeserializeBatchTaskInfo(item, options)); + } + recentTasks = array; + continue; + } + if (property.NameEquals("startTask"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTask = BatchStartTask.DeserializeBatchStartTask(property.Value, options); + continue; + } + if (property.NameEquals("startTaskInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTaskInfo = BatchStartTaskInfo.DeserializeBatchStartTaskInfo(property.Value, options); + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BatchNodeError.DeserializeBatchNodeError(item, options)); + } + errors = array; + continue; + } + if (property.NameEquals("isDedicated"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isDedicated = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("endpointConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endpointConfiguration = BatchNodeEndpointConfiguration.DeserializeBatchNodeEndpointConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("nodeAgentInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nodeAgentInfo = BatchNodeAgentInfo.DeserializeBatchNodeAgentInfo(property.Value, options); + continue; + } + if (property.NameEquals("virtualMachineInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + virtualMachineInfo = VirtualMachineInfo.DeserializeVirtualMachineInfo(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchNode( + id, + url, + state, + schedulingState, + stateTransitionTime, + lastBootTime, + allocationTime, + ipAddress, + affinityId, + vmSize, + totalTasksRun, + runningTasksCount, + runningTaskSlotsCount, + totalTasksSucceeded, + recentTasks ?? new ChangeTrackingList(), + startTask, + startTaskInfo, + errors ?? new ChangeTrackingList(), + isDedicated, + endpointConfiguration, + nodeAgentInfo, + virtualMachineInfo, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchNode)} does not support writing '{options.Format}' format."); + } + } + + BatchNode IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchNode(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchNode)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchNode FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchNode(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNode.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNode.cs new file mode 100644 index 0000000000000..a1e4ac04664ee --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNode.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// A Compute Node in the Batch service. + public partial class BatchNode + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal BatchNode() + { + RecentTasks = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The ID of the Compute Node. Every Compute Node that is added to a Pool is assigned a unique ID. Whenever a Compute Node is removed from a Pool, all of its local files are deleted, and the ID is reclaimed and could be reused for new Compute Nodes. + /// The URL of the Compute Node. + /// The current state of the Compute Node. The Spot/Low-priority Compute Node has been preempted. Tasks which were running on the Compute Node when it was preempted will be rescheduled when another Compute Node becomes available. + /// Whether the Compute Node is available for Task scheduling. + /// The time at which the Compute Node entered its current state. + /// The last time at which the Compute Node was started. This property may not be present if the Compute Node state is unusable. + /// The time at which this Compute Node was allocated to the Pool. This is the time when the Compute Node was initially allocated and doesn't change once set. It is not updated when the Compute Node is service healed or preempted. + /// The IP address that other Nodes can use to communicate with this Compute Node. Every Compute Node that is added to a Pool is assigned a unique IP address. Whenever a Compute Node is removed from a Pool, all of its local files are deleted, and the IP address is reclaimed and could be reused for new Compute Nodes. + /// An identifier which can be passed when adding a Task to request that the Task be scheduled on this Compute Node. Note that this is just a soft affinity. If the target Compute Node is busy or unavailable at the time the Task is scheduled, then the Task will be scheduled elsewhere. + /// The size of the virtual machine hosting the Compute Node. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). + /// The total number of Job Tasks completed on the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start Tasks. + /// The total number of currently running Job Tasks on the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start Tasks. + /// The total number of scheduling slots used by currently running Job Tasks on the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start Tasks. + /// The total number of Job Tasks which completed successfully (with exitCode 0) on the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start Tasks. + /// A list of Tasks whose state has recently changed. This property is present only if at least one Task has run on this Compute Node since it was assigned to the Pool. + /// The Task specified to run on the Compute Node as it joins the Pool. + /// Runtime information about the execution of the StartTask on the Compute Node. + /// The list of errors that are currently being encountered by the Compute Node. + /// Whether this Compute Node is a dedicated Compute Node. If false, the Compute Node is a Spot/Low-priority Compute Node. + /// The endpoint configuration for the Compute Node. + /// Information about the Compute Node agent version and the time the Compute Node upgraded to a new version. + /// Info about the current state of the virtual machine. + /// Keeps track of any properties unknown to the library. + internal BatchNode(string id, string url, BatchNodeState? state, SchedulingState? schedulingState, DateTimeOffset? stateTransitionTime, DateTimeOffset? lastBootTime, DateTimeOffset? allocationTime, string ipAddress, string affinityId, string vmSize, int? totalTasksRun, int? runningTasksCount, int? runningTaskSlotsCount, int? totalTasksSucceeded, IReadOnlyList recentTasks, BatchStartTask startTask, BatchStartTaskInfo startTaskInfo, IReadOnlyList errors, bool? isDedicated, BatchNodeEndpointConfiguration endpointConfiguration, BatchNodeAgentInfo nodeAgentInfo, VirtualMachineInfo virtualMachineInfo, IDictionary serializedAdditionalRawData) + { + Id = id; + Url = url; + State = state; + SchedulingState = schedulingState; + StateTransitionTime = stateTransitionTime; + LastBootTime = lastBootTime; + AllocationTime = allocationTime; + IpAddress = ipAddress; + AffinityId = affinityId; + VmSize = vmSize; + TotalTasksRun = totalTasksRun; + RunningTasksCount = runningTasksCount; + RunningTaskSlotsCount = runningTaskSlotsCount; + TotalTasksSucceeded = totalTasksSucceeded; + RecentTasks = recentTasks; + StartTask = startTask; + StartTaskInfo = startTaskInfo; + Errors = errors; + IsDedicated = isDedicated; + EndpointConfiguration = endpointConfiguration; + NodeAgentInfo = nodeAgentInfo; + VirtualMachineInfo = virtualMachineInfo; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The ID of the Compute Node. Every Compute Node that is added to a Pool is assigned a unique ID. Whenever a Compute Node is removed from a Pool, all of its local files are deleted, and the ID is reclaimed and could be reused for new Compute Nodes. + public string Id { get; } + /// The URL of the Compute Node. + public string Url { get; } + /// The current state of the Compute Node. The Spot/Low-priority Compute Node has been preempted. Tasks which were running on the Compute Node when it was preempted will be rescheduled when another Compute Node becomes available. + public BatchNodeState? State { get; } + /// Whether the Compute Node is available for Task scheduling. + public SchedulingState? SchedulingState { get; } + /// The time at which the Compute Node entered its current state. + public DateTimeOffset? StateTransitionTime { get; } + /// The last time at which the Compute Node was started. This property may not be present if the Compute Node state is unusable. + public DateTimeOffset? LastBootTime { get; } + /// The time at which this Compute Node was allocated to the Pool. This is the time when the Compute Node was initially allocated and doesn't change once set. It is not updated when the Compute Node is service healed or preempted. + public DateTimeOffset? AllocationTime { get; } + /// The IP address that other Nodes can use to communicate with this Compute Node. Every Compute Node that is added to a Pool is assigned a unique IP address. Whenever a Compute Node is removed from a Pool, all of its local files are deleted, and the IP address is reclaimed and could be reused for new Compute Nodes. + public string IpAddress { get; } + /// An identifier which can be passed when adding a Task to request that the Task be scheduled on this Compute Node. Note that this is just a soft affinity. If the target Compute Node is busy or unavailable at the time the Task is scheduled, then the Task will be scheduled elsewhere. + public string AffinityId { get; } + /// The size of the virtual machine hosting the Compute Node. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). + public string VmSize { get; } + /// The total number of Job Tasks completed on the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start Tasks. + public int? TotalTasksRun { get; } + /// The total number of currently running Job Tasks on the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start Tasks. + public int? RunningTasksCount { get; } + /// The total number of scheduling slots used by currently running Job Tasks on the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start Tasks. + public int? RunningTaskSlotsCount { get; } + /// The total number of Job Tasks which completed successfully (with exitCode 0) on the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start Tasks. + public int? TotalTasksSucceeded { get; } + /// A list of Tasks whose state has recently changed. This property is present only if at least one Task has run on this Compute Node since it was assigned to the Pool. + public IReadOnlyList RecentTasks { get; } + /// The Task specified to run on the Compute Node as it joins the Pool. + public BatchStartTask StartTask { get; } + /// Runtime information about the execution of the StartTask on the Compute Node. + public BatchStartTaskInfo StartTaskInfo { get; } + /// The list of errors that are currently being encountered by the Compute Node. + public IReadOnlyList Errors { get; } + /// Whether this Compute Node is a dedicated Compute Node. If false, the Compute Node is a Spot/Low-priority Compute Node. + public bool? IsDedicated { get; } + /// The endpoint configuration for the Compute Node. + public BatchNodeEndpointConfiguration EndpointConfiguration { get; } + /// Information about the Compute Node agent version and the time the Compute Node upgraded to a new version. + public BatchNodeAgentInfo NodeAgentInfo { get; } + /// Info about the current state of the virtual machine. + public VirtualMachineInfo VirtualMachineInfo { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeAgentInfo.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeAgentInfo.Serialization.cs new file mode 100644 index 0000000000000..7ba74ff308f94 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeAgentInfo.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchNodeAgentInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchNodeAgentInfo)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + writer.WritePropertyName("lastUpdateTime"u8); + writer.WriteStringValue(LastUpdateTime, "O"); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchNodeAgentInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchNodeAgentInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchNodeAgentInfo(document.RootElement, options); + } + + internal static BatchNodeAgentInfo DeserializeBatchNodeAgentInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string version = default; + DateTimeOffset lastUpdateTime = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("version"u8)) + { + version = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastUpdateTime"u8)) + { + lastUpdateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchNodeAgentInfo(version, lastUpdateTime, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchNodeAgentInfo)} does not support writing '{options.Format}' format."); + } + } + + BatchNodeAgentInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchNodeAgentInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchNodeAgentInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchNodeAgentInfo FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchNodeAgentInfo(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeAgentInfo.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeAgentInfo.cs new file mode 100644 index 0000000000000..bcb1536e4afc9 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeAgentInfo.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; + +namespace Azure.Compute.Batch +{ + /// + /// The Batch Compute Node agent is a program that runs on each Compute Node in the + /// Pool and provides Batch capability on the Compute Node. + /// + public partial class BatchNodeAgentInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The version of the Batch Compute Node agent running on the Compute Node. This version number can be checked against the Compute Node agent release notes located at https://github.com/Azure/Batch/blob/master/changelogs/nodeagent/CHANGELOG.md. + /// The time when the Compute Node agent was updated on the Compute Node. This is the most recent time that the Compute Node agent was updated to a new version. + /// is null. + internal BatchNodeAgentInfo(string version, DateTimeOffset lastUpdateTime) + { + Argument.AssertNotNull(version, nameof(version)); + + Version = version; + LastUpdateTime = lastUpdateTime; + } + + /// Initializes a new instance of . + /// The version of the Batch Compute Node agent running on the Compute Node. This version number can be checked against the Compute Node agent release notes located at https://github.com/Azure/Batch/blob/master/changelogs/nodeagent/CHANGELOG.md. + /// The time when the Compute Node agent was updated on the Compute Node. This is the most recent time that the Compute Node agent was updated to a new version. + /// Keeps track of any properties unknown to the library. + internal BatchNodeAgentInfo(string version, DateTimeOffset lastUpdateTime, IDictionary serializedAdditionalRawData) + { + Version = version; + LastUpdateTime = lastUpdateTime; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchNodeAgentInfo() + { + } + + /// The version of the Batch Compute Node agent running on the Compute Node. This version number can be checked against the Compute Node agent release notes located at https://github.com/Azure/Batch/blob/master/changelogs/nodeagent/CHANGELOG.md. + public string Version { get; } + /// The time when the Compute Node agent was updated on the Compute Node. This is the most recent time that the Compute Node agent was updated to a new version. + public DateTimeOffset LastUpdateTime { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeCommunicationMode.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeCommunicationMode.cs new file mode 100644 index 0000000000000..f7c8c5882d2f9 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeCommunicationMode.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.Compute.Batch +{ + /// BatchNodeCommunicationMode enums. + public readonly partial struct BatchNodeCommunicationMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BatchNodeCommunicationMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DefaultValue = "default"; + private const string ClassicValue = "classic"; + private const string SimplifiedValue = "simplified"; + + /// The node communication mode is automatically set by the Batch service. + public static BatchNodeCommunicationMode Default { get; } = new BatchNodeCommunicationMode(DefaultValue); + /// Nodes using the classic communication mode require inbound TCP communication on ports 29876 and 29877 from the "BatchNodeManagement.{region}" service tag and outbound TCP communication on port 443 to the "Storage.region" and "BatchNodeManagement.{region}" service tags. + public static BatchNodeCommunicationMode Classic { get; } = new BatchNodeCommunicationMode(ClassicValue); + /// Nodes using the simplified communication mode require outbound TCP communication on port 443 to the "BatchNodeManagement.{region}" service tag. No open inbound ports are required. + public static BatchNodeCommunicationMode Simplified { get; } = new BatchNodeCommunicationMode(SimplifiedValue); + /// Determines if two values are the same. + public static bool operator ==(BatchNodeCommunicationMode left, BatchNodeCommunicationMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BatchNodeCommunicationMode left, BatchNodeCommunicationMode right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator BatchNodeCommunicationMode(string value) => new BatchNodeCommunicationMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BatchNodeCommunicationMode other && Equals(other); + /// + public bool Equals(BatchNodeCommunicationMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeCounts.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeCounts.Serialization.cs new file mode 100644 index 0000000000000..97f6bfb824bfe --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeCounts.Serialization.cs @@ -0,0 +1,263 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchNodeCounts : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchNodeCounts)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("creating"u8); + writer.WriteNumberValue(Creating); + writer.WritePropertyName("idle"u8); + writer.WriteNumberValue(Idle); + writer.WritePropertyName("offline"u8); + writer.WriteNumberValue(Offline); + writer.WritePropertyName("preempted"u8); + writer.WriteNumberValue(Preempted); + writer.WritePropertyName("rebooting"u8); + writer.WriteNumberValue(Rebooting); + writer.WritePropertyName("reimaging"u8); + writer.WriteNumberValue(Reimaging); + writer.WritePropertyName("running"u8); + writer.WriteNumberValue(Running); + writer.WritePropertyName("starting"u8); + writer.WriteNumberValue(Starting); + writer.WritePropertyName("startTaskFailed"u8); + writer.WriteNumberValue(StartTaskFailed); + writer.WritePropertyName("leavingPool"u8); + writer.WriteNumberValue(LeavingPool); + writer.WritePropertyName("unknown"u8); + writer.WriteNumberValue(Unknown); + writer.WritePropertyName("unusable"u8); + writer.WriteNumberValue(Unusable); + writer.WritePropertyName("waitingForStartTask"u8); + writer.WriteNumberValue(WaitingForStartTask); + writer.WritePropertyName("total"u8); + writer.WriteNumberValue(Total); + writer.WritePropertyName("upgradingOS"u8); + writer.WriteNumberValue(UpgradingOs); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchNodeCounts IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchNodeCounts)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchNodeCounts(document.RootElement, options); + } + + internal static BatchNodeCounts DeserializeBatchNodeCounts(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int creating = default; + int idle = default; + int offline = default; + int preempted = default; + int rebooting = default; + int reimaging = default; + int running = default; + int starting = default; + int startTaskFailed = default; + int leavingPool = default; + int unknown = default; + int unusable = default; + int waitingForStartTask = default; + int total = default; + int upgradingOS = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("creating"u8)) + { + creating = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("idle"u8)) + { + idle = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("offline"u8)) + { + offline = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("preempted"u8)) + { + preempted = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("rebooting"u8)) + { + rebooting = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("reimaging"u8)) + { + reimaging = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("running"u8)) + { + running = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("starting"u8)) + { + starting = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("startTaskFailed"u8)) + { + startTaskFailed = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("leavingPool"u8)) + { + leavingPool = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("unknown"u8)) + { + unknown = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("unusable"u8)) + { + unusable = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("waitingForStartTask"u8)) + { + waitingForStartTask = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("total"u8)) + { + total = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("upgradingOS"u8)) + { + upgradingOS = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchNodeCounts( + creating, + idle, + offline, + preempted, + rebooting, + reimaging, + running, + starting, + startTaskFailed, + leavingPool, + unknown, + unusable, + waitingForStartTask, + total, + upgradingOS, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchNodeCounts)} does not support writing '{options.Format}' format."); + } + } + + BatchNodeCounts IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchNodeCounts(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchNodeCounts)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchNodeCounts FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchNodeCounts(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeCounts.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeCounts.cs new file mode 100644 index 0000000000000..56ccd9fa23738 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeCounts.cs @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// The number of Compute Nodes in each Compute Node state. + public partial class BatchNodeCounts + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The number of Compute Nodes in the creating state. + /// The number of Compute Nodes in the idle state. + /// The number of Compute Nodes in the offline state. + /// The number of Compute Nodes in the preempted state. + /// The count of Compute Nodes in the rebooting state. + /// The number of Compute Nodes in the reimaging state. + /// The number of Compute Nodes in the running state. + /// The number of Compute Nodes in the starting state. + /// The number of Compute Nodes in the startTaskFailed state. + /// The number of Compute Nodes in the leavingPool state. + /// The number of Compute Nodes in the unknown state. + /// The number of Compute Nodes in the unusable state. + /// The number of Compute Nodes in the waitingForStartTask state. + /// The total number of Compute Nodes. + /// The number of Compute Nodes in the upgradingOS state. + internal BatchNodeCounts(int creating, int idle, int offline, int preempted, int rebooting, int reimaging, int running, int starting, int startTaskFailed, int leavingPool, int unknown, int unusable, int waitingForStartTask, int total, int upgradingOs) + { + Creating = creating; + Idle = idle; + Offline = offline; + Preempted = preempted; + Rebooting = rebooting; + Reimaging = reimaging; + Running = running; + Starting = starting; + StartTaskFailed = startTaskFailed; + LeavingPool = leavingPool; + Unknown = unknown; + Unusable = unusable; + WaitingForStartTask = waitingForStartTask; + Total = total; + UpgradingOs = upgradingOs; + } + + /// Initializes a new instance of . + /// The number of Compute Nodes in the creating state. + /// The number of Compute Nodes in the idle state. + /// The number of Compute Nodes in the offline state. + /// The number of Compute Nodes in the preempted state. + /// The count of Compute Nodes in the rebooting state. + /// The number of Compute Nodes in the reimaging state. + /// The number of Compute Nodes in the running state. + /// The number of Compute Nodes in the starting state. + /// The number of Compute Nodes in the startTaskFailed state. + /// The number of Compute Nodes in the leavingPool state. + /// The number of Compute Nodes in the unknown state. + /// The number of Compute Nodes in the unusable state. + /// The number of Compute Nodes in the waitingForStartTask state. + /// The total number of Compute Nodes. + /// The number of Compute Nodes in the upgradingOS state. + /// Keeps track of any properties unknown to the library. + internal BatchNodeCounts(int creating, int idle, int offline, int preempted, int rebooting, int reimaging, int running, int starting, int startTaskFailed, int leavingPool, int unknown, int unusable, int waitingForStartTask, int total, int upgradingOs, IDictionary serializedAdditionalRawData) + { + Creating = creating; + Idle = idle; + Offline = offline; + Preempted = preempted; + Rebooting = rebooting; + Reimaging = reimaging; + Running = running; + Starting = starting; + StartTaskFailed = startTaskFailed; + LeavingPool = leavingPool; + Unknown = unknown; + Unusable = unusable; + WaitingForStartTask = waitingForStartTask; + Total = total; + UpgradingOs = upgradingOs; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchNodeCounts() + { + } + + /// The number of Compute Nodes in the creating state. + public int Creating { get; } + /// The number of Compute Nodes in the idle state. + public int Idle { get; } + /// The number of Compute Nodes in the offline state. + public int Offline { get; } + /// The number of Compute Nodes in the preempted state. + public int Preempted { get; } + /// The count of Compute Nodes in the rebooting state. + public int Rebooting { get; } + /// The number of Compute Nodes in the reimaging state. + public int Reimaging { get; } + /// The number of Compute Nodes in the running state. + public int Running { get; } + /// The number of Compute Nodes in the starting state. + public int Starting { get; } + /// The number of Compute Nodes in the startTaskFailed state. + public int StartTaskFailed { get; } + /// The number of Compute Nodes in the leavingPool state. + public int LeavingPool { get; } + /// The number of Compute Nodes in the unknown state. + public int Unknown { get; } + /// The number of Compute Nodes in the unusable state. + public int Unusable { get; } + /// The number of Compute Nodes in the waitingForStartTask state. + public int WaitingForStartTask { get; } + /// The total number of Compute Nodes. + public int Total { get; } + /// The number of Compute Nodes in the upgradingOS state. + public int UpgradingOs { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeDeallocationOption.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeDeallocationOption.cs new file mode 100644 index 0000000000000..d964de36af4fd --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeDeallocationOption.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Compute.Batch +{ + /// BatchNodeDeallocationOption enums. + public readonly partial struct BatchNodeDeallocationOption : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BatchNodeDeallocationOption(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string RequeueValue = "requeue"; + private const string TerminateValue = "terminate"; + private const string TaskCompletionValue = "taskcompletion"; + private const string RetainedDataValue = "retaineddata"; + + /// Terminate running Task processes and requeue the Tasks. The Tasks will run again when a Compute Node is available. Remove Compute Nodes as soon as Tasks have been terminated. + public static BatchNodeDeallocationOption Requeue { get; } = new BatchNodeDeallocationOption(RequeueValue); + /// Terminate running Tasks. The Tasks will be completed with failureInfo indicating that they were terminated, and will not run again. Remove Compute Nodes as soon as Tasks have been terminated. + public static BatchNodeDeallocationOption Terminate { get; } = new BatchNodeDeallocationOption(TerminateValue); + /// Allow currently running Tasks to complete. Schedule no new Tasks while waiting. Remove Compute Nodes when all Tasks have completed. + public static BatchNodeDeallocationOption TaskCompletion { get; } = new BatchNodeDeallocationOption(TaskCompletionValue); + /// Allow currently running Tasks to complete, then wait for all Task data retention periods to expire. Schedule no new Tasks while waiting. Remove Compute Nodes when all Task retention periods have expired. + public static BatchNodeDeallocationOption RetainedData { get; } = new BatchNodeDeallocationOption(RetainedDataValue); + /// Determines if two values are the same. + public static bool operator ==(BatchNodeDeallocationOption left, BatchNodeDeallocationOption right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BatchNodeDeallocationOption left, BatchNodeDeallocationOption right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator BatchNodeDeallocationOption(string value) => new BatchNodeDeallocationOption(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BatchNodeDeallocationOption other && Equals(other); + /// + public bool Equals(BatchNodeDeallocationOption other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeDisableSchedulingContent.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeDisableSchedulingContent.Serialization.cs new file mode 100644 index 0000000000000..ef8420b187398 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeDisableSchedulingContent.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchNodeDisableSchedulingContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchNodeDisableSchedulingContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(NodeDisableSchedulingOption)) + { + writer.WritePropertyName("nodeDisableSchedulingOption"u8); + writer.WriteStringValue(NodeDisableSchedulingOption.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchNodeDisableSchedulingContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchNodeDisableSchedulingContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchNodeDisableSchedulingContent(document.RootElement, options); + } + + internal static BatchNodeDisableSchedulingContent DeserializeBatchNodeDisableSchedulingContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BatchNodeDisableSchedulingOption? nodeDisableSchedulingOption = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nodeDisableSchedulingOption"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nodeDisableSchedulingOption = new BatchNodeDisableSchedulingOption(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchNodeDisableSchedulingContent(nodeDisableSchedulingOption, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchNodeDisableSchedulingContent)} does not support writing '{options.Format}' format."); + } + } + + BatchNodeDisableSchedulingContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchNodeDisableSchedulingContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchNodeDisableSchedulingContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchNodeDisableSchedulingContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchNodeDisableSchedulingContent(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeDisableSchedulingContent.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeDisableSchedulingContent.cs new file mode 100644 index 0000000000000..bfbc6ff802903 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeDisableSchedulingContent.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; + +namespace Azure.Compute.Batch +{ + /// Parameters for disabling scheduling on an Azure Batch Compute Node. + public partial class BatchNodeDisableSchedulingContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public BatchNodeDisableSchedulingContent() + { + } + + /// Initializes a new instance of . + /// What to do with currently running Tasks when disabling Task scheduling on the Compute Node. The default value is requeue. + /// Keeps track of any properties unknown to the library. + internal BatchNodeDisableSchedulingContent(BatchNodeDisableSchedulingOption? nodeDisableSchedulingOption, IDictionary serializedAdditionalRawData) + { + NodeDisableSchedulingOption = nodeDisableSchedulingOption; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// What to do with currently running Tasks when disabling Task scheduling on the Compute Node. The default value is requeue. + public BatchNodeDisableSchedulingOption? NodeDisableSchedulingOption { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeDisableSchedulingOption.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeDisableSchedulingOption.cs new file mode 100644 index 0000000000000..b2d4cfdf66f80 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeDisableSchedulingOption.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.Compute.Batch +{ + /// BatchNodeDisableSchedulingOption enums. + public readonly partial struct BatchNodeDisableSchedulingOption : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BatchNodeDisableSchedulingOption(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string RequeueValue = "requeue"; + private const string TerminateValue = "terminate"; + private const string TaskCompletionValue = "taskcompletion"; + + /// Terminate running Task processes and requeue the Tasks. The Tasks may run again on other Compute Nodes, or when Task scheduling is re-enabled on this Compute Node. Enter offline state as soon as Tasks have been terminated. + public static BatchNodeDisableSchedulingOption Requeue { get; } = new BatchNodeDisableSchedulingOption(RequeueValue); + /// Terminate running Tasks. The Tasks will be completed with failureInfo indicating that they were terminated, and will not run again. Enter offline state as soon as Tasks have been terminated. + public static BatchNodeDisableSchedulingOption Terminate { get; } = new BatchNodeDisableSchedulingOption(TerminateValue); + /// Allow currently running Tasks to complete. Schedule no new Tasks while waiting. Enter offline state when all Tasks have completed. + public static BatchNodeDisableSchedulingOption TaskCompletion { get; } = new BatchNodeDisableSchedulingOption(TaskCompletionValue); + /// Determines if two values are the same. + public static bool operator ==(BatchNodeDisableSchedulingOption left, BatchNodeDisableSchedulingOption right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BatchNodeDisableSchedulingOption left, BatchNodeDisableSchedulingOption right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator BatchNodeDisableSchedulingOption(string value) => new BatchNodeDisableSchedulingOption(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BatchNodeDisableSchedulingOption other && Equals(other); + /// + public bool Equals(BatchNodeDisableSchedulingOption other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeEndpointConfiguration.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeEndpointConfiguration.Serialization.cs new file mode 100644 index 0000000000000..0afc6fc011764 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeEndpointConfiguration.Serialization.cs @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchNodeEndpointConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchNodeEndpointConfiguration)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("inboundEndpoints"u8); + writer.WriteStartArray(); + foreach (var item in InboundEndpoints) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchNodeEndpointConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchNodeEndpointConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchNodeEndpointConfiguration(document.RootElement, options); + } + + internal static BatchNodeEndpointConfiguration DeserializeBatchNodeEndpointConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList inboundEndpoints = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("inboundEndpoints"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(InboundEndpoint.DeserializeInboundEndpoint(item, options)); + } + inboundEndpoints = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchNodeEndpointConfiguration(inboundEndpoints, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchNodeEndpointConfiguration)} does not support writing '{options.Format}' format."); + } + } + + BatchNodeEndpointConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchNodeEndpointConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchNodeEndpointConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchNodeEndpointConfiguration FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchNodeEndpointConfiguration(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeEndpointConfiguration.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeEndpointConfiguration.cs new file mode 100644 index 0000000000000..a42143d4f1b97 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeEndpointConfiguration.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Compute.Batch +{ + /// The endpoint configuration for the Compute Node. + public partial class BatchNodeEndpointConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The list of inbound endpoints that are accessible on the Compute Node. + /// is null. + internal BatchNodeEndpointConfiguration(IEnumerable inboundEndpoints) + { + Argument.AssertNotNull(inboundEndpoints, nameof(inboundEndpoints)); + + InboundEndpoints = inboundEndpoints.ToList(); + } + + /// Initializes a new instance of . + /// The list of inbound endpoints that are accessible on the Compute Node. + /// Keeps track of any properties unknown to the library. + internal BatchNodeEndpointConfiguration(IReadOnlyList inboundEndpoints, IDictionary serializedAdditionalRawData) + { + InboundEndpoints = inboundEndpoints; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchNodeEndpointConfiguration() + { + } + + /// The list of inbound endpoints that are accessible on the Compute Node. + public IReadOnlyList InboundEndpoints { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeError.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeError.Serialization.cs new file mode 100644 index 0000000000000..c3c8b9f8c8eba --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeError.Serialization.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchNodeError : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchNodeError)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + } + if (Optional.IsDefined(Message)) + { + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + } + if (Optional.IsCollectionDefined(ErrorDetails)) + { + writer.WritePropertyName("errorDetails"u8); + writer.WriteStartArray(); + foreach (var item in ErrorDetails) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchNodeError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchNodeError)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchNodeError(document.RootElement, options); + } + + internal static BatchNodeError DeserializeBatchNodeError(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string code = default; + string message = default; + IReadOnlyList errorDetails = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("errorDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NameValuePair.DeserializeNameValuePair(item, options)); + } + errorDetails = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchNodeError(code, message, errorDetails ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchNodeError)} does not support writing '{options.Format}' format."); + } + } + + BatchNodeError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchNodeError(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchNodeError)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchNodeError FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchNodeError(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeError.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeError.cs new file mode 100644 index 0000000000000..b2b7ddff0a13c --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeError.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// An error encountered by a Compute Node. + public partial class BatchNodeError + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal BatchNodeError() + { + ErrorDetails = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// An identifier for the Compute Node error. Codes are invariant and are intended to be consumed programmatically. + /// A message describing the Compute Node error, intended to be suitable for display in a user interface. + /// The list of additional error details related to the Compute Node error. + /// Keeps track of any properties unknown to the library. + internal BatchNodeError(string code, string message, IReadOnlyList errorDetails, IDictionary serializedAdditionalRawData) + { + Code = code; + Message = message; + ErrorDetails = errorDetails; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// An identifier for the Compute Node error. Codes are invariant and are intended to be consumed programmatically. + public string Code { get; } + /// A message describing the Compute Node error, intended to be suitable for display in a user interface. + public string Message { get; } + /// The list of additional error details related to the Compute Node error. + public IReadOnlyList ErrorDetails { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeFile.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeFile.Serialization.cs new file mode 100644 index 0000000000000..16ea064af291e --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeFile.Serialization.cs @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchNodeFile : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchNodeFile)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Url)) + { + writer.WritePropertyName("url"u8); + writer.WriteStringValue(Url); + } + if (Optional.IsDefined(IsDirectory)) + { + writer.WritePropertyName("isDirectory"u8); + writer.WriteBooleanValue(IsDirectory.Value); + } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchNodeFile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchNodeFile)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchNodeFile(document.RootElement, options); + } + + internal static BatchNodeFile DeserializeBatchNodeFile(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string url = default; + bool? isDirectory = default; + FileProperties properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("url"u8)) + { + url = property.Value.GetString(); + continue; + } + if (property.NameEquals("isDirectory"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isDirectory = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = FileProperties.DeserializeFileProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchNodeFile(name, url, isDirectory, properties, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchNodeFile)} does not support writing '{options.Format}' format."); + } + } + + BatchNodeFile IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchNodeFile(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchNodeFile)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchNodeFile FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchNodeFile(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeFile.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeFile.cs new file mode 100644 index 0000000000000..8e04bac0ed493 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeFile.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Information about a file or directory on a Compute Node. + public partial class BatchNodeFile + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal BatchNodeFile() + { + } + + /// Initializes a new instance of . + /// The file path. + /// The URL of the file. + /// Whether the object represents a directory. + /// The file properties. + /// Keeps track of any properties unknown to the library. + internal BatchNodeFile(string name, string url, bool? isDirectory, FileProperties properties, IDictionary serializedAdditionalRawData) + { + Name = name; + Url = url; + IsDirectory = isDirectory; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The file path. + public string Name { get; } + /// The URL of the file. + public string Url { get; } + /// Whether the object represents a directory. + public bool? IsDirectory { get; } + /// The file properties. + public FileProperties Properties { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeFillType.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeFillType.cs new file mode 100644 index 0000000000000..9e8828d29c9a2 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeFillType.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.Compute.Batch +{ + /// BatchNodeFillType enums. + public readonly partial struct BatchNodeFillType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BatchNodeFillType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SpreadValue = "spread"; + private const string PackValue = "pack"; + + /// Tasks should be assigned evenly across all Compute Nodes in the Pool. + public static BatchNodeFillType Spread { get; } = new BatchNodeFillType(SpreadValue); + /// As many Tasks as possible (taskSlotsPerNode) should be assigned to each Compute Node in the Pool before any Tasks are assigned to the next Compute Node in the Pool. + public static BatchNodeFillType Pack { get; } = new BatchNodeFillType(PackValue); + /// Determines if two values are the same. + public static bool operator ==(BatchNodeFillType left, BatchNodeFillType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BatchNodeFillType left, BatchNodeFillType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator BatchNodeFillType(string value) => new BatchNodeFillType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BatchNodeFillType other && Equals(other); + /// + public bool Equals(BatchNodeFillType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeIdentityReference.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeIdentityReference.Serialization.cs new file mode 100644 index 0000000000000..2a9d604213552 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeIdentityReference.Serialization.cs @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchNodeIdentityReference : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchNodeIdentityReference)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(ResourceId)) + { + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchNodeIdentityReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchNodeIdentityReference)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchNodeIdentityReference(document.RootElement, options); + } + + internal static BatchNodeIdentityReference DeserializeBatchNodeIdentityReference(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string resourceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceId"u8)) + { + resourceId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchNodeIdentityReference(resourceId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchNodeIdentityReference)} does not support writing '{options.Format}' format."); + } + } + + BatchNodeIdentityReference IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchNodeIdentityReference(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchNodeIdentityReference)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchNodeIdentityReference FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchNodeIdentityReference(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeIdentityReference.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeIdentityReference.cs new file mode 100644 index 0000000000000..1c421ab9689c1 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeIdentityReference.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// + /// The reference to a user assigned identity associated with the Batch pool which + /// a compute node will use. + /// + public partial class BatchNodeIdentityReference + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public BatchNodeIdentityReference() + { + } + + /// Initializes a new instance of . + /// The ARM resource id of the user assigned identity. + /// Keeps track of any properties unknown to the library. + internal BatchNodeIdentityReference(string resourceId, IDictionary serializedAdditionalRawData) + { + ResourceId = resourceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The ARM resource id of the user assigned identity. + public string ResourceId { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeInfo.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeInfo.Serialization.cs new file mode 100644 index 0000000000000..e15bde2933332 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeInfo.Serialization.cs @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchNodeInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchNodeInfo)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(AffinityId)) + { + writer.WritePropertyName("affinityId"u8); + writer.WriteStringValue(AffinityId); + } + if (Optional.IsDefined(NodeUrl)) + { + writer.WritePropertyName("nodeUrl"u8); + writer.WriteStringValue(NodeUrl); + } + if (Optional.IsDefined(PoolId)) + { + writer.WritePropertyName("poolId"u8); + writer.WriteStringValue(PoolId); + } + if (Optional.IsDefined(NodeId)) + { + writer.WritePropertyName("nodeId"u8); + writer.WriteStringValue(NodeId); + } + if (Optional.IsDefined(TaskRootDirectory)) + { + writer.WritePropertyName("taskRootDirectory"u8); + writer.WriteStringValue(TaskRootDirectory); + } + if (Optional.IsDefined(TaskRootDirectoryUrl)) + { + writer.WritePropertyName("taskRootDirectoryUrl"u8); + writer.WriteStringValue(TaskRootDirectoryUrl); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchNodeInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchNodeInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchNodeInfo(document.RootElement, options); + } + + internal static BatchNodeInfo DeserializeBatchNodeInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string affinityId = default; + string nodeUrl = default; + string poolId = default; + string nodeId = default; + string taskRootDirectory = default; + string taskRootDirectoryUrl = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("affinityId"u8)) + { + affinityId = property.Value.GetString(); + continue; + } + if (property.NameEquals("nodeUrl"u8)) + { + nodeUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("poolId"u8)) + { + poolId = property.Value.GetString(); + continue; + } + if (property.NameEquals("nodeId"u8)) + { + nodeId = property.Value.GetString(); + continue; + } + if (property.NameEquals("taskRootDirectory"u8)) + { + taskRootDirectory = property.Value.GetString(); + continue; + } + if (property.NameEquals("taskRootDirectoryUrl"u8)) + { + taskRootDirectoryUrl = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchNodeInfo( + affinityId, + nodeUrl, + poolId, + nodeId, + taskRootDirectory, + taskRootDirectoryUrl, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchNodeInfo)} does not support writing '{options.Format}' format."); + } + } + + BatchNodeInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchNodeInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchNodeInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchNodeInfo FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchNodeInfo(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeInfo.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeInfo.cs new file mode 100644 index 0000000000000..d28ff8ede3162 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeInfo.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Information about the Compute Node on which a Task ran. + public partial class BatchNodeInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal BatchNodeInfo() + { + } + + /// Initializes a new instance of . + /// An identifier for the Node on which the Task ran, which can be passed when adding a Task to request that the Task be scheduled on this Compute Node. + /// The URL of the Compute Node on which the Task ran. + /// The ID of the Pool on which the Task ran. + /// The ID of the Compute Node on which the Task ran. + /// The root directory of the Task on the Compute Node. + /// The URL to the root directory of the Task on the Compute Node. + /// Keeps track of any properties unknown to the library. + internal BatchNodeInfo(string affinityId, string nodeUrl, string poolId, string nodeId, string taskRootDirectory, string taskRootDirectoryUrl, IDictionary serializedAdditionalRawData) + { + AffinityId = affinityId; + NodeUrl = nodeUrl; + PoolId = poolId; + NodeId = nodeId; + TaskRootDirectory = taskRootDirectory; + TaskRootDirectoryUrl = taskRootDirectoryUrl; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// An identifier for the Node on which the Task ran, which can be passed when adding a Task to request that the Task be scheduled on this Compute Node. + public string AffinityId { get; } + /// The URL of the Compute Node on which the Task ran. + public string NodeUrl { get; } + /// The ID of the Pool on which the Task ran. + public string PoolId { get; } + /// The ID of the Compute Node on which the Task ran. + public string NodeId { get; } + /// The root directory of the Task on the Compute Node. + public string TaskRootDirectory { get; } + /// The URL to the root directory of the Task on the Compute Node. + public string TaskRootDirectoryUrl { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodePlacementConfiguration.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodePlacementConfiguration.Serialization.cs new file mode 100644 index 0000000000000..cfb6cad983dd2 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodePlacementConfiguration.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchNodePlacementConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchNodePlacementConfiguration)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Policy)) + { + writer.WritePropertyName("policy"u8); + writer.WriteStringValue(Policy.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchNodePlacementConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchNodePlacementConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchNodePlacementConfiguration(document.RootElement, options); + } + + internal static BatchNodePlacementConfiguration DeserializeBatchNodePlacementConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BatchNodePlacementPolicyType? policy = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("policy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + policy = new BatchNodePlacementPolicyType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchNodePlacementConfiguration(policy, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchNodePlacementConfiguration)} does not support writing '{options.Format}' format."); + } + } + + BatchNodePlacementConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchNodePlacementConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchNodePlacementConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchNodePlacementConfiguration FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchNodePlacementConfiguration(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodePlacementConfiguration.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodePlacementConfiguration.cs new file mode 100644 index 0000000000000..450afff846fd3 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodePlacementConfiguration.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// + /// For regional placement, nodes in the pool will be allocated in the same region. + /// For zonal placement, nodes in the pool will be spread across different zones + /// with best effort balancing. + /// + public partial class BatchNodePlacementConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public BatchNodePlacementConfiguration() + { + } + + /// Initializes a new instance of . + /// Node placement Policy type on Batch Pools. Allocation policy used by Batch Service to provision the nodes. If not specified, Batch will use the regional policy. + /// Keeps track of any properties unknown to the library. + internal BatchNodePlacementConfiguration(BatchNodePlacementPolicyType? policy, IDictionary serializedAdditionalRawData) + { + Policy = policy; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Node placement Policy type on Batch Pools. Allocation policy used by Batch Service to provision the nodes. If not specified, Batch will use the regional policy. + public BatchNodePlacementPolicyType? Policy { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodePlacementPolicyType.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodePlacementPolicyType.cs new file mode 100644 index 0000000000000..453927bc7ef1a --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodePlacementPolicyType.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.Compute.Batch +{ + /// BatchNodePlacementPolicyType enums. + public readonly partial struct BatchNodePlacementPolicyType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BatchNodePlacementPolicyType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string RegionalValue = "regional"; + private const string ZonalValue = "zonal"; + + /// All nodes in the pool will be allocated in the same region. + public static BatchNodePlacementPolicyType Regional { get; } = new BatchNodePlacementPolicyType(RegionalValue); + /// Nodes in the pool will be spread across different availability zones with best effort balancing. + public static BatchNodePlacementPolicyType Zonal { get; } = new BatchNodePlacementPolicyType(ZonalValue); + /// Determines if two values are the same. + public static bool operator ==(BatchNodePlacementPolicyType left, BatchNodePlacementPolicyType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BatchNodePlacementPolicyType left, BatchNodePlacementPolicyType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator BatchNodePlacementPolicyType(string value) => new BatchNodePlacementPolicyType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BatchNodePlacementPolicyType other && Equals(other); + /// + public bool Equals(BatchNodePlacementPolicyType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeRebootContent.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeRebootContent.Serialization.cs new file mode 100644 index 0000000000000..73dc3dfeb3de4 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeRebootContent.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchNodeRebootContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchNodeRebootContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(NodeRebootOption)) + { + writer.WritePropertyName("nodeRebootOption"u8); + writer.WriteStringValue(NodeRebootOption.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchNodeRebootContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchNodeRebootContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchNodeRebootContent(document.RootElement, options); + } + + internal static BatchNodeRebootContent DeserializeBatchNodeRebootContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BatchNodeRebootOption? nodeRebootOption = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nodeRebootOption"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nodeRebootOption = new BatchNodeRebootOption(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchNodeRebootContent(nodeRebootOption, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchNodeRebootContent)} does not support writing '{options.Format}' format."); + } + } + + BatchNodeRebootContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchNodeRebootContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchNodeRebootContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchNodeRebootContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchNodeRebootContent(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeRebootContent.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeRebootContent.cs new file mode 100644 index 0000000000000..2202761043ae7 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeRebootContent.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; + +namespace Azure.Compute.Batch +{ + /// Parameters for rebooting an Azure Batch Compute Node. + public partial class BatchNodeRebootContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public BatchNodeRebootContent() + { + } + + /// Initializes a new instance of . + /// When to reboot the Compute Node and what to do with currently running Tasks. The default value is requeue. + /// Keeps track of any properties unknown to the library. + internal BatchNodeRebootContent(BatchNodeRebootOption? nodeRebootOption, IDictionary serializedAdditionalRawData) + { + NodeRebootOption = nodeRebootOption; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// When to reboot the Compute Node and what to do with currently running Tasks. The default value is requeue. + public BatchNodeRebootOption? NodeRebootOption { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeRebootOption.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeRebootOption.cs new file mode 100644 index 0000000000000..5a3f5538725e7 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeRebootOption.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Compute.Batch +{ + /// BatchNodeRebootOption enums. + public readonly partial struct BatchNodeRebootOption : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BatchNodeRebootOption(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string RequeueValue = "requeue"; + private const string TerminateValue = "terminate"; + private const string TaskCompletionValue = "taskcompletion"; + private const string RetainedDataValue = "retaineddata"; + + /// Terminate running Task processes and requeue the Tasks. The Tasks will run again when a Compute Node is available. Restart the Compute Node as soon as Tasks have been terminated. + public static BatchNodeRebootOption Requeue { get; } = new BatchNodeRebootOption(RequeueValue); + /// Terminate running Tasks. The Tasks will be completed with failureInfo indicating that they were terminated, and will not run again. Restart the Compute Node as soon as Tasks have been terminated. + public static BatchNodeRebootOption Terminate { get; } = new BatchNodeRebootOption(TerminateValue); + /// Allow currently running Tasks to complete. Schedule no new Tasks while waiting. Restart the Compute Node when all Tasks have completed. + public static BatchNodeRebootOption TaskCompletion { get; } = new BatchNodeRebootOption(TaskCompletionValue); + /// Allow currently running Tasks to complete, then wait for all Task data retention periods to expire. Schedule no new Tasks while waiting. Restart the Compute Node when all Task retention periods have expired. + public static BatchNodeRebootOption RetainedData { get; } = new BatchNodeRebootOption(RetainedDataValue); + /// Determines if two values are the same. + public static bool operator ==(BatchNodeRebootOption left, BatchNodeRebootOption right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BatchNodeRebootOption left, BatchNodeRebootOption right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator BatchNodeRebootOption(string value) => new BatchNodeRebootOption(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BatchNodeRebootOption other && Equals(other); + /// + public bool Equals(BatchNodeRebootOption other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeRemoteLoginSettings.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeRemoteLoginSettings.Serialization.cs new file mode 100644 index 0000000000000..f9aec5b2571b6 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeRemoteLoginSettings.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchNodeRemoteLoginSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchNodeRemoteLoginSettings)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("remoteLoginIPAddress"u8); + writer.WriteStringValue(RemoteLoginIpAddress); + writer.WritePropertyName("remoteLoginPort"u8); + writer.WriteNumberValue(RemoteLoginPort); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchNodeRemoteLoginSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchNodeRemoteLoginSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchNodeRemoteLoginSettings(document.RootElement, options); + } + + internal static BatchNodeRemoteLoginSettings DeserializeBatchNodeRemoteLoginSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string remoteLoginIPAddress = default; + int remoteLoginPort = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("remoteLoginIPAddress"u8)) + { + remoteLoginIPAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("remoteLoginPort"u8)) + { + remoteLoginPort = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchNodeRemoteLoginSettings(remoteLoginIPAddress, remoteLoginPort, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchNodeRemoteLoginSettings)} does not support writing '{options.Format}' format."); + } + } + + BatchNodeRemoteLoginSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchNodeRemoteLoginSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchNodeRemoteLoginSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchNodeRemoteLoginSettings FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchNodeRemoteLoginSettings(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeRemoteLoginSettings.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeRemoteLoginSettings.cs new file mode 100644 index 0000000000000..3b66830690ae8 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeRemoteLoginSettings.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// The remote login settings for a Compute Node. + public partial class BatchNodeRemoteLoginSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The IP address used for remote login to the Compute Node. + /// The port used for remote login to the Compute Node. + /// is null. + internal BatchNodeRemoteLoginSettings(string remoteLoginIpAddress, int remoteLoginPort) + { + Argument.AssertNotNull(remoteLoginIpAddress, nameof(remoteLoginIpAddress)); + + RemoteLoginIpAddress = remoteLoginIpAddress; + RemoteLoginPort = remoteLoginPort; + } + + /// Initializes a new instance of . + /// The IP address used for remote login to the Compute Node. + /// The port used for remote login to the Compute Node. + /// Keeps track of any properties unknown to the library. + internal BatchNodeRemoteLoginSettings(string remoteLoginIpAddress, int remoteLoginPort, IDictionary serializedAdditionalRawData) + { + RemoteLoginIpAddress = remoteLoginIpAddress; + RemoteLoginPort = remoteLoginPort; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchNodeRemoteLoginSettings() + { + } + + /// The IP address used for remote login to the Compute Node. + public string RemoteLoginIpAddress { get; } + /// The port used for remote login to the Compute Node. + public int RemoteLoginPort { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeRemoveContent.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeRemoveContent.Serialization.cs new file mode 100644 index 0000000000000..3828c539a2702 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeRemoveContent.Serialization.cs @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchNodeRemoveContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchNodeRemoveContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("nodeList"u8); + writer.WriteStartArray(); + foreach (var item in NodeList) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + if (Optional.IsDefined(ResizeTimeout)) + { + writer.WritePropertyName("resizeTimeout"u8); + writer.WriteStringValue(ResizeTimeout.Value, "P"); + } + if (Optional.IsDefined(NodeDeallocationOption)) + { + writer.WritePropertyName("nodeDeallocationOption"u8); + writer.WriteStringValue(NodeDeallocationOption.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchNodeRemoveContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchNodeRemoveContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchNodeRemoveContent(document.RootElement, options); + } + + internal static BatchNodeRemoveContent DeserializeBatchNodeRemoveContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList nodeList = default; + TimeSpan? resizeTimeout = default; + BatchNodeDeallocationOption? nodeDeallocationOption = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nodeList"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + nodeList = array; + continue; + } + if (property.NameEquals("resizeTimeout"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resizeTimeout = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("nodeDeallocationOption"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nodeDeallocationOption = new BatchNodeDeallocationOption(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchNodeRemoveContent(nodeList, resizeTimeout, nodeDeallocationOption, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchNodeRemoveContent)} does not support writing '{options.Format}' format."); + } + } + + BatchNodeRemoveContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchNodeRemoveContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchNodeRemoveContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchNodeRemoveContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchNodeRemoveContent(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeRemoveContent.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeRemoveContent.cs new file mode 100644 index 0000000000000..ba28ad62da22e --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeRemoveContent.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.Linq; + +namespace Azure.Compute.Batch +{ + /// Parameters for removing nodes from an Azure Batch Pool. + public partial class BatchNodeRemoveContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// A list containing the IDs of the Compute Nodes to be removed from the specified Pool. A maximum of 100 nodes may be removed per request. + /// is null. + public BatchNodeRemoveContent(IEnumerable nodeList) + { + Argument.AssertNotNull(nodeList, nameof(nodeList)); + + NodeList = nodeList.ToList(); + } + + /// Initializes a new instance of . + /// A list containing the IDs of the Compute Nodes to be removed from the specified Pool. A maximum of 100 nodes may be removed per request. + /// The timeout for removal of Compute Nodes to the Pool. The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + /// Determines what to do with a Compute Node and its running task(s) after it has been selected for deallocation. The default value is requeue. + /// Keeps track of any properties unknown to the library. + internal BatchNodeRemoveContent(IList nodeList, TimeSpan? resizeTimeout, BatchNodeDeallocationOption? nodeDeallocationOption, IDictionary serializedAdditionalRawData) + { + NodeList = nodeList; + ResizeTimeout = resizeTimeout; + NodeDeallocationOption = nodeDeallocationOption; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchNodeRemoveContent() + { + } + + /// A list containing the IDs of the Compute Nodes to be removed from the specified Pool. A maximum of 100 nodes may be removed per request. + public IList NodeList { get; } + /// The timeout for removal of Compute Nodes to the Pool. The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + public TimeSpan? ResizeTimeout { get; set; } + /// Determines what to do with a Compute Node and its running task(s) after it has been selected for deallocation. The default value is requeue. + public BatchNodeDeallocationOption? NodeDeallocationOption { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeState.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeState.cs new file mode 100644 index 0000000000000..df044faee43bb --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeState.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Compute.Batch +{ + /// BatchNodeState enums. + public readonly partial struct BatchNodeState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BatchNodeState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string IdleValue = "idle"; + private const string RebootingValue = "rebooting"; + private const string ReimagingValue = "reimaging"; + private const string RunningValue = "running"; + private const string UnusableValue = "unusable"; + private const string CreatingValue = "creating"; + private const string StartingValue = "starting"; + private const string WaitingForStartTaskValue = "waitingforstarttask"; + private const string StartTaskFailedValue = "starttaskfailed"; + private const string UnknownValue = "unknown"; + private const string LeavingPoolValue = "leavingpool"; + private const string OfflineValue = "offline"; + private const string PreemptedValue = "preempted"; + private const string UpgradingOSValue = "upgradingos"; + + /// The Compute Node is not currently running a Task. + public static BatchNodeState Idle { get; } = new BatchNodeState(IdleValue); + /// The Compute Node is rebooting. + public static BatchNodeState Rebooting { get; } = new BatchNodeState(RebootingValue); + /// The Compute Node is reimaging. + public static BatchNodeState Reimaging { get; } = new BatchNodeState(ReimagingValue); + /// The Compute Node is running one or more Tasks (other than a StartTask). + public static BatchNodeState Running { get; } = new BatchNodeState(RunningValue); + /// The Compute Node cannot be used for Task execution due to errors. + public static BatchNodeState Unusable { get; } = new BatchNodeState(UnusableValue); + /// The Batch service has obtained the underlying virtual machine from Azure Compute, but it has not yet started to join the Pool. + public static BatchNodeState Creating { get; } = new BatchNodeState(CreatingValue); + /// The Batch service is starting on the underlying virtual machine. + public static BatchNodeState Starting { get; } = new BatchNodeState(StartingValue); + /// The StartTask has started running on the Compute Node, but waitForSuccess is set and the StartTask has not yet completed. + public static BatchNodeState WaitingForStartTask { get; } = new BatchNodeState(WaitingForStartTaskValue); + /// The StartTask has failed on the Compute Node (and exhausted all retries), and waitForSuccess is set. The Compute Node is not usable for running Tasks. + public static BatchNodeState StartTaskFailed { get; } = new BatchNodeState(StartTaskFailedValue); + /// The Batch service has lost contact with the Compute Node, and does not know its true state. + public static BatchNodeState Unknown { get; } = new BatchNodeState(UnknownValue); + /// The Compute Node is leaving the Pool, either because the user explicitly removed it or because the Pool is resizing or autoscaling down. + public static BatchNodeState LeavingPool { get; } = new BatchNodeState(LeavingPoolValue); + /// The Compute Node is not currently running a Task, and scheduling of new Tasks to the Compute Node is disabled. + public static BatchNodeState Offline { get; } = new BatchNodeState(OfflineValue); + /// The Spot/Low-priority Compute Node has been preempted. Tasks which were running on the Compute Node when it was preempted will be rescheduled when another Compute Node becomes available. + public static BatchNodeState Preempted { get; } = new BatchNodeState(PreemptedValue); + /// The Compute Node is undergoing an OS upgrade operation. + public static BatchNodeState UpgradingOS { get; } = new BatchNodeState(UpgradingOSValue); + /// Determines if two values are the same. + public static bool operator ==(BatchNodeState left, BatchNodeState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BatchNodeState left, BatchNodeState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator BatchNodeState(string value) => new BatchNodeState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BatchNodeState other && Equals(other); + /// + public bool Equals(BatchNodeState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeUserCreateContent.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeUserCreateContent.Serialization.cs new file mode 100644 index 0000000000000..d48002248dba9 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeUserCreateContent.Serialization.cs @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchNodeUserCreateContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchNodeUserCreateContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (Optional.IsDefined(IsAdmin)) + { + writer.WritePropertyName("isAdmin"u8); + writer.WriteBooleanValue(IsAdmin.Value); + } + if (Optional.IsDefined(ExpiryTime)) + { + writer.WritePropertyName("expiryTime"u8); + writer.WriteStringValue(ExpiryTime.Value, "O"); + } + if (Optional.IsDefined(Password)) + { + writer.WritePropertyName("password"u8); + writer.WriteStringValue(Password); + } + if (Optional.IsDefined(SshPublicKey)) + { + writer.WritePropertyName("sshPublicKey"u8); + writer.WriteStringValue(SshPublicKey); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchNodeUserCreateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchNodeUserCreateContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchNodeUserCreateContent(document.RootElement, options); + } + + internal static BatchNodeUserCreateContent DeserializeBatchNodeUserCreateContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + bool? isAdmin = default; + DateTimeOffset? expiryTime = default; + string password = default; + string sshPublicKey = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("isAdmin"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isAdmin = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("expiryTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expiryTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("password"u8)) + { + password = property.Value.GetString(); + continue; + } + if (property.NameEquals("sshPublicKey"u8)) + { + sshPublicKey = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchNodeUserCreateContent( + name, + isAdmin, + expiryTime, + password, + sshPublicKey, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchNodeUserCreateContent)} does not support writing '{options.Format}' format."); + } + } + + BatchNodeUserCreateContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchNodeUserCreateContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchNodeUserCreateContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchNodeUserCreateContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchNodeUserCreateContent(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeUserCreateContent.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeUserCreateContent.cs new file mode 100644 index 0000000000000..0f9fbcc2b1583 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeUserCreateContent.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Parameters for creating a user account for RDP or SSH access on an Azure Batch Compute Node. + public partial class BatchNodeUserCreateContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The user name of the Account. + /// is null. + public BatchNodeUserCreateContent(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + } + + /// Initializes a new instance of . + /// The user name of the Account. + /// Whether the Account should be an administrator on the Compute Node. The default value is false. + /// The time at which the Account should expire. If omitted, the default is 1 day from the current time. For Linux Compute Nodes, the expiryTime has a precision up to a day. + /// The password of the Account. The password is required for Windows Compute Nodes (those created with 'virtualMachineConfiguration' using a Windows Image reference). For Linux Compute Nodes, the password can optionally be specified along with the sshPublicKey property. + /// The SSH public key that can be used for remote login to the Compute Node. The public key should be compatible with OpenSSH encoding and should be base 64 encoded. This property can be specified only for Linux Compute Nodes. If this is specified for a Windows Compute Node, then the Batch service rejects the request; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + /// Keeps track of any properties unknown to the library. + internal BatchNodeUserCreateContent(string name, bool? isAdmin, DateTimeOffset? expiryTime, string password, string sshPublicKey, IDictionary serializedAdditionalRawData) + { + Name = name; + IsAdmin = isAdmin; + ExpiryTime = expiryTime; + Password = password; + SshPublicKey = sshPublicKey; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchNodeUserCreateContent() + { + } + + /// The user name of the Account. + public string Name { get; } + /// Whether the Account should be an administrator on the Compute Node. The default value is false. + public bool? IsAdmin { get; set; } + /// The time at which the Account should expire. If omitted, the default is 1 day from the current time. For Linux Compute Nodes, the expiryTime has a precision up to a day. + public DateTimeOffset? ExpiryTime { get; set; } + /// The password of the Account. The password is required for Windows Compute Nodes (those created with 'virtualMachineConfiguration' using a Windows Image reference). For Linux Compute Nodes, the password can optionally be specified along with the sshPublicKey property. + public string Password { get; set; } + /// The SSH public key that can be used for remote login to the Compute Node. The public key should be compatible with OpenSSH encoding and should be base 64 encoded. This property can be specified only for Linux Compute Nodes. If this is specified for a Windows Compute Node, then the Batch service rejects the request; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + public string SshPublicKey { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeUserUpdateContent.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeUserUpdateContent.Serialization.cs new file mode 100644 index 0000000000000..e0bf13777869d --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeUserUpdateContent.Serialization.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchNodeUserUpdateContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchNodeUserUpdateContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Password)) + { + writer.WritePropertyName("password"u8); + writer.WriteStringValue(Password); + } + if (Optional.IsDefined(ExpiryTime)) + { + writer.WritePropertyName("expiryTime"u8); + writer.WriteStringValue(ExpiryTime.Value, "O"); + } + if (Optional.IsDefined(SshPublicKey)) + { + writer.WritePropertyName("sshPublicKey"u8); + writer.WriteStringValue(SshPublicKey); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchNodeUserUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchNodeUserUpdateContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchNodeUserUpdateContent(document.RootElement, options); + } + + internal static BatchNodeUserUpdateContent DeserializeBatchNodeUserUpdateContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string password = default; + DateTimeOffset? expiryTime = default; + string sshPublicKey = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("password"u8)) + { + password = property.Value.GetString(); + continue; + } + if (property.NameEquals("expiryTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expiryTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("sshPublicKey"u8)) + { + sshPublicKey = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchNodeUserUpdateContent(password, expiryTime, sshPublicKey, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchNodeUserUpdateContent)} does not support writing '{options.Format}' format."); + } + } + + BatchNodeUserUpdateContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchNodeUserUpdateContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchNodeUserUpdateContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchNodeUserUpdateContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchNodeUserUpdateContent(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeUserUpdateContent.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeUserUpdateContent.cs new file mode 100644 index 0000000000000..8ebac642c3d5c --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeUserUpdateContent.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Parameters for updating a user account for RDP or SSH access on an Azure Batch Compute Node. + public partial class BatchNodeUserUpdateContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public BatchNodeUserUpdateContent() + { + } + + /// Initializes a new instance of . + /// The password of the Account. The password is required for Windows Compute Nodes (those created with 'virtualMachineConfiguration' using a Windows Image reference). For Linux Compute Nodes, the password can optionally be specified along with the sshPublicKey property. If omitted, any existing password is removed. + /// The time at which the Account should expire. If omitted, the default is 1 day from the current time. For Linux Compute Nodes, the expiryTime has a precision up to a day. + /// The SSH public key that can be used for remote login to the Compute Node. The public key should be compatible with OpenSSH encoding and should be base 64 encoded. This property can be specified only for Linux Compute Nodes. If this is specified for a Windows Compute Node, then the Batch service rejects the request; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). If omitted, any existing SSH public key is removed. + /// Keeps track of any properties unknown to the library. + internal BatchNodeUserUpdateContent(string password, DateTimeOffset? expiryTime, string sshPublicKey, IDictionary serializedAdditionalRawData) + { + Password = password; + ExpiryTime = expiryTime; + SshPublicKey = sshPublicKey; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The password of the Account. The password is required for Windows Compute Nodes (those created with 'virtualMachineConfiguration' using a Windows Image reference). For Linux Compute Nodes, the password can optionally be specified along with the sshPublicKey property. If omitted, any existing password is removed. + public string Password { get; set; } + /// The time at which the Account should expire. If omitted, the default is 1 day from the current time. For Linux Compute Nodes, the expiryTime has a precision up to a day. + public DateTimeOffset? ExpiryTime { get; set; } + /// The SSH public key that can be used for remote login to the Compute Node. The public key should be compatible with OpenSSH encoding and should be base 64 encoded. This property can be specified only for Linux Compute Nodes. If this is specified for a Windows Compute Node, then the Batch service rejects the request; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). If omitted, any existing SSH public key is removed. + public string SshPublicKey { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeVMExtension.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeVMExtension.Serialization.cs new file mode 100644 index 0000000000000..fdf316f424931 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeVMExtension.Serialization.cs @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchNodeVMExtension : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchNodeVMExtension)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState); + } + if (Optional.IsDefined(VmExtension)) + { + writer.WritePropertyName("vmExtension"u8); + writer.WriteObjectValue(VmExtension, options); + } + if (Optional.IsDefined(InstanceView)) + { + writer.WritePropertyName("instanceView"u8); + writer.WriteObjectValue(InstanceView, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchNodeVMExtension IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchNodeVMExtension)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchNodeVMExtension(document.RootElement, options); + } + + internal static BatchNodeVMExtension DeserializeBatchNodeVMExtension(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string provisioningState = default; + VMExtension vmExtension = default; + VMExtensionInstanceView instanceView = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + provisioningState = property.Value.GetString(); + continue; + } + if (property.NameEquals("vmExtension"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + vmExtension = VMExtension.DeserializeVMExtension(property.Value, options); + continue; + } + if (property.NameEquals("instanceView"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + instanceView = VMExtensionInstanceView.DeserializeVMExtensionInstanceView(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchNodeVMExtension(provisioningState, vmExtension, instanceView, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchNodeVMExtension)} does not support writing '{options.Format}' format."); + } + } + + BatchNodeVMExtension IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchNodeVMExtension(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchNodeVMExtension)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchNodeVMExtension FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchNodeVMExtension(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeVMExtension.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeVMExtension.cs new file mode 100644 index 0000000000000..ef613ba1da9a8 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchNodeVMExtension.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// The configuration for virtual machine extension instance view. + public partial class BatchNodeVMExtension + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal BatchNodeVMExtension() + { + } + + /// Initializes a new instance of . + /// The provisioning state of the virtual machine extension. + /// The virtual machine extension. + /// The vm extension instance view. + /// Keeps track of any properties unknown to the library. + internal BatchNodeVMExtension(string provisioningState, VMExtension vmExtension, VMExtensionInstanceView instanceView, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + VmExtension = vmExtension; + InstanceView = instanceView; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The provisioning state of the virtual machine extension. + public string ProvisioningState { get; } + /// The virtual machine extension. + public VMExtension VmExtension { get; } + /// The vm extension instance view. + public VMExtensionInstanceView InstanceView { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPool.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPool.Serialization.cs new file mode 100644 index 0000000000000..c006448060f22 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPool.Serialization.cs @@ -0,0 +1,757 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchPool : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchPool)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W" && Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (options.Format != "W" && Optional.IsDefined(Url)) + { + writer.WritePropertyName("url"u8); + writer.WriteStringValue(Url); + } + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("eTag"u8); + writer.WriteStringValue(ETag); + } + if (options.Format != "W" && Optional.IsDefined(LastModified)) + { + writer.WritePropertyName("lastModified"u8); + writer.WriteStringValue(LastModified.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(CreationTime)) + { + writer.WritePropertyName("creationTime"u8); + writer.WriteStringValue(CreationTime.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(StateTransitionTime)) + { + writer.WritePropertyName("stateTransitionTime"u8); + writer.WriteStringValue(StateTransitionTime.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(AllocationState)) + { + writer.WritePropertyName("allocationState"u8); + writer.WriteStringValue(AllocationState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(AllocationStateTransitionTime)) + { + writer.WritePropertyName("allocationStateTransitionTime"u8); + writer.WriteStringValue(AllocationStateTransitionTime.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(VmSize)) + { + writer.WritePropertyName("vmSize"u8); + writer.WriteStringValue(VmSize); + } + if (options.Format != "W" && Optional.IsDefined(VirtualMachineConfiguration)) + { + writer.WritePropertyName("virtualMachineConfiguration"u8); + writer.WriteObjectValue(VirtualMachineConfiguration, options); + } + if (options.Format != "W" && Optional.IsDefined(ResizeTimeout)) + { + writer.WritePropertyName("resizeTimeout"u8); + writer.WriteStringValue(ResizeTimeout.Value, "P"); + } + if (options.Format != "W" && Optional.IsCollectionDefined(ResizeErrors)) + { + writer.WritePropertyName("resizeErrors"u8); + writer.WriteStartArray(); + foreach (var item in ResizeErrors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsCollectionDefined(ResourceTags)) + { + writer.WritePropertyName("resourceTags"u8); + writer.WriteStartObject(); + foreach (var item in ResourceTags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && Optional.IsDefined(CurrentDedicatedNodes)) + { + writer.WritePropertyName("currentDedicatedNodes"u8); + writer.WriteNumberValue(CurrentDedicatedNodes.Value); + } + if (options.Format != "W" && Optional.IsDefined(CurrentLowPriorityNodes)) + { + writer.WritePropertyName("currentLowPriorityNodes"u8); + writer.WriteNumberValue(CurrentLowPriorityNodes.Value); + } + if (options.Format != "W" && Optional.IsDefined(TargetDedicatedNodes)) + { + writer.WritePropertyName("targetDedicatedNodes"u8); + writer.WriteNumberValue(TargetDedicatedNodes.Value); + } + if (options.Format != "W" && Optional.IsDefined(TargetLowPriorityNodes)) + { + writer.WritePropertyName("targetLowPriorityNodes"u8); + writer.WriteNumberValue(TargetLowPriorityNodes.Value); + } + if (options.Format != "W" && Optional.IsDefined(EnableAutoScale)) + { + writer.WritePropertyName("enableAutoScale"u8); + writer.WriteBooleanValue(EnableAutoScale.Value); + } + if (options.Format != "W" && Optional.IsDefined(AutoScaleFormula)) + { + writer.WritePropertyName("autoScaleFormula"u8); + writer.WriteStringValue(AutoScaleFormula); + } + if (options.Format != "W" && Optional.IsDefined(AutoScaleEvaluationInterval)) + { + writer.WritePropertyName("autoScaleEvaluationInterval"u8); + writer.WriteStringValue(AutoScaleEvaluationInterval.Value, "P"); + } + if (options.Format != "W" && Optional.IsDefined(AutoScaleRun)) + { + writer.WritePropertyName("autoScaleRun"u8); + writer.WriteObjectValue(AutoScaleRun, options); + } + if (options.Format != "W" && Optional.IsDefined(EnableInterNodeCommunication)) + { + writer.WritePropertyName("enableInterNodeCommunication"u8); + writer.WriteBooleanValue(EnableInterNodeCommunication.Value); + } + if (options.Format != "W" && Optional.IsDefined(NetworkConfiguration)) + { + writer.WritePropertyName("networkConfiguration"u8); + writer.WriteObjectValue(NetworkConfiguration, options); + } + if (Optional.IsDefined(StartTask)) + { + writer.WritePropertyName("startTask"u8); + writer.WriteObjectValue(StartTask, options); + } + if (options.Format != "W" && Optional.IsCollectionDefined(ApplicationPackageReferences)) + { + writer.WritePropertyName("applicationPackageReferences"u8); + writer.WriteStartArray(); + foreach (var item in ApplicationPackageReferences) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(TaskSlotsPerNode)) + { + writer.WritePropertyName("taskSlotsPerNode"u8); + writer.WriteNumberValue(TaskSlotsPerNode.Value); + } + if (options.Format != "W" && Optional.IsDefined(TaskSchedulingPolicy)) + { + writer.WritePropertyName("taskSchedulingPolicy"u8); + writer.WriteObjectValue(TaskSchedulingPolicy, options); + } + if (options.Format != "W" && Optional.IsCollectionDefined(UserAccounts)) + { + writer.WritePropertyName("userAccounts"u8); + writer.WriteStartArray(); + foreach (var item in UserAccounts) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsCollectionDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); + writer.WriteStartArray(); + foreach (var item in Metadata) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(Stats)) + { + writer.WritePropertyName("stats"u8); + writer.WriteObjectValue(Stats, options); + } + if (options.Format != "W" && Optional.IsCollectionDefined(MountConfiguration)) + { + writer.WritePropertyName("mountConfiguration"u8); + writer.WriteStartArray(); + foreach (var item in MountConfiguration) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + writer.WriteObjectValue(Identity, options); + } + if (Optional.IsDefined(TargetNodeCommunicationMode)) + { + writer.WritePropertyName("targetNodeCommunicationMode"u8); + writer.WriteStringValue(TargetNodeCommunicationMode.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(CurrentNodeCommunicationMode)) + { + writer.WritePropertyName("currentNodeCommunicationMode"u8); + writer.WriteStringValue(CurrentNodeCommunicationMode.Value.ToString()); + } + if (Optional.IsDefined(UpgradePolicy)) + { + writer.WritePropertyName("upgradePolicy"u8); + writer.WriteObjectValue(UpgradePolicy, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchPool IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchPool)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchPool(document.RootElement, options); + } + + internal static BatchPool DeserializeBatchPool(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + string displayName = default; + string url = default; + string eTag = default; + DateTimeOffset? lastModified = default; + DateTimeOffset? creationTime = default; + BatchPoolState? state = default; + DateTimeOffset? stateTransitionTime = default; + AllocationState? allocationState = default; + DateTimeOffset? allocationStateTransitionTime = default; + string vmSize = default; + VirtualMachineConfiguration virtualMachineConfiguration = default; + TimeSpan? resizeTimeout = default; + IReadOnlyList resizeErrors = default; + IReadOnlyDictionary resourceTags = default; + int? currentDedicatedNodes = default; + int? currentLowPriorityNodes = default; + int? targetDedicatedNodes = default; + int? targetLowPriorityNodes = default; + bool? enableAutoScale = default; + string autoScaleFormula = default; + TimeSpan? autoScaleEvaluationInterval = default; + AutoScaleRun autoScaleRun = default; + bool? enableInterNodeCommunication = default; + NetworkConfiguration networkConfiguration = default; + BatchStartTask startTask = default; + IReadOnlyList applicationPackageReferences = default; + int? taskSlotsPerNode = default; + BatchTaskSchedulingPolicy taskSchedulingPolicy = default; + IReadOnlyList userAccounts = default; + IReadOnlyList metadata = default; + BatchPoolStatistics stats = default; + IReadOnlyList mountConfiguration = default; + BatchPoolIdentity identity = default; + BatchNodeCommunicationMode? targetNodeCommunicationMode = default; + BatchNodeCommunicationMode? currentNodeCommunicationMode = default; + UpgradePolicy upgradePolicy = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("url"u8)) + { + url = property.Value.GetString(); + continue; + } + if (property.NameEquals("eTag"u8)) + { + eTag = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastModified"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastModified = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("creationTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + creationTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new BatchPoolState(property.Value.GetString()); + continue; + } + if (property.NameEquals("stateTransitionTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + stateTransitionTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("allocationState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allocationState = new AllocationState(property.Value.GetString()); + continue; + } + if (property.NameEquals("allocationStateTransitionTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allocationStateTransitionTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("vmSize"u8)) + { + vmSize = property.Value.GetString(); + continue; + } + if (property.NameEquals("virtualMachineConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + virtualMachineConfiguration = VirtualMachineConfiguration.DeserializeVirtualMachineConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("resizeTimeout"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resizeTimeout = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("resizeErrors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResizeError.DeserializeResizeError(item, options)); + } + resizeErrors = array; + continue; + } + if (property.NameEquals("resourceTags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + resourceTags = dictionary; + continue; + } + if (property.NameEquals("currentDedicatedNodes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + currentDedicatedNodes = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("currentLowPriorityNodes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + currentLowPriorityNodes = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("targetDedicatedNodes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetDedicatedNodes = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("targetLowPriorityNodes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetLowPriorityNodes = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("enableAutoScale"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableAutoScale = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("autoScaleFormula"u8)) + { + autoScaleFormula = property.Value.GetString(); + continue; + } + if (property.NameEquals("autoScaleEvaluationInterval"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autoScaleEvaluationInterval = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("autoScaleRun"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autoScaleRun = AutoScaleRun.DeserializeAutoScaleRun(property.Value, options); + continue; + } + if (property.NameEquals("enableInterNodeCommunication"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableInterNodeCommunication = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("networkConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkConfiguration = NetworkConfiguration.DeserializeNetworkConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("startTask"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTask = BatchStartTask.DeserializeBatchStartTask(property.Value, options); + continue; + } + if (property.NameEquals("applicationPackageReferences"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BatchApplicationPackageReference.DeserializeBatchApplicationPackageReference(item, options)); + } + applicationPackageReferences = array; + continue; + } + if (property.NameEquals("taskSlotsPerNode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + taskSlotsPerNode = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("taskSchedulingPolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + taskSchedulingPolicy = BatchTaskSchedulingPolicy.DeserializeBatchTaskSchedulingPolicy(property.Value, options); + continue; + } + if (property.NameEquals("userAccounts"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(UserAccount.DeserializeUserAccount(item, options)); + } + userAccounts = array; + continue; + } + if (property.NameEquals("metadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MetadataItem.DeserializeMetadataItem(item, options)); + } + metadata = array; + continue; + } + if (property.NameEquals("stats"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + stats = BatchPoolStatistics.DeserializeBatchPoolStatistics(property.Value, options); + continue; + } + if (property.NameEquals("mountConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Batch.MountConfiguration.DeserializeMountConfiguration(item, options)); + } + mountConfiguration = array; + continue; + } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = BatchPoolIdentity.DeserializeBatchPoolIdentity(property.Value, options); + continue; + } + if (property.NameEquals("targetNodeCommunicationMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetNodeCommunicationMode = new BatchNodeCommunicationMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("currentNodeCommunicationMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + currentNodeCommunicationMode = new BatchNodeCommunicationMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("upgradePolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + upgradePolicy = UpgradePolicy.DeserializeUpgradePolicy(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchPool( + id, + displayName, + url, + eTag, + lastModified, + creationTime, + state, + stateTransitionTime, + allocationState, + allocationStateTransitionTime, + vmSize, + virtualMachineConfiguration, + resizeTimeout, + resizeErrors ?? new ChangeTrackingList(), + resourceTags ?? new ChangeTrackingDictionary(), + currentDedicatedNodes, + currentLowPriorityNodes, + targetDedicatedNodes, + targetLowPriorityNodes, + enableAutoScale, + autoScaleFormula, + autoScaleEvaluationInterval, + autoScaleRun, + enableInterNodeCommunication, + networkConfiguration, + startTask, + applicationPackageReferences ?? new ChangeTrackingList(), + taskSlotsPerNode, + taskSchedulingPolicy, + userAccounts ?? new ChangeTrackingList(), + metadata ?? new ChangeTrackingList(), + stats, + mountConfiguration ?? new ChangeTrackingList(), + identity, + targetNodeCommunicationMode, + currentNodeCommunicationMode, + upgradePolicy, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchPool)} does not support writing '{options.Format}' format."); + } + } + + BatchPool IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchPool(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchPool)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchPool FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchPool(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPool.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPool.cs new file mode 100644 index 0000000000000..4cbd3bee14783 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPool.cs @@ -0,0 +1,215 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// A Pool in the Azure Batch service. + public partial class BatchPool + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal BatchPool() + { + ResizeErrors = new ChangeTrackingList(); + ResourceTags = new ChangeTrackingDictionary(); + ApplicationPackageReferences = new ChangeTrackingList(); + UserAccounts = new ChangeTrackingList(); + Metadata = new ChangeTrackingList(); + MountConfiguration = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// A string that uniquely identifies the Pool within the Account. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an Account that differ only by case). + /// The display name for the Pool. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. + /// The URL of the Pool. + /// The ETag of the Pool. This is an opaque string. You can use it to detect whether the Pool has changed between requests. In particular, you can be pass the ETag when updating a Pool to specify that your changes should take effect only if nobody else has modified the Pool in the meantime. + /// The last modified time of the Pool. This is the last time at which the Pool level data, such as the targetDedicatedNodes or enableAutoscale settings, changed. It does not factor in node-level changes such as a Compute Node changing state. + /// The creation time of the Pool. + /// The current state of the Pool. + /// The time at which the Pool entered its current state. + /// Whether the Pool is resizing. + /// The time at which the Pool entered its current allocation state. + /// The size of virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). + /// The virtual machine configuration for the Pool. This property must be specified. + /// The timeout for allocation of Compute Nodes to the Pool. This is the timeout for the most recent resize operation. (The initial sizing when the Pool is created counts as a resize.) The default value is 15 minutes. + /// A list of errors encountered while performing the last resize on the Pool. This property is set only if one or more errors occurred during the last Pool resize, and only when the Pool allocationState is Steady. + /// The user-specified tags associated with the pool. The user-defined tags to be associated with the Azure Batch Pool. When specified, these tags are propagated to the backing Azure resources associated with the pool. This property can only be specified when the Batch account was created with the poolAllocationMode property set to 'UserSubscription'. + /// The number of dedicated Compute Nodes currently in the Pool. + /// The number of Spot/Low-priority Compute Nodes currently in the Pool. Spot/Low-priority Compute Nodes which have been preempted are included in this count. + /// The desired number of dedicated Compute Nodes in the Pool. + /// The desired number of Spot/Low-priority Compute Nodes in the Pool. + /// Whether the Pool size should automatically adjust over time. If false, at least one of targetDedicatedNodes and targetLowPriorityNodes must be specified. If true, the autoScaleFormula property is required and the Pool automatically resizes according to the formula. The default value is false. + /// A formula for the desired number of Compute Nodes in the Pool. This property is set only if the Pool automatically scales, i.e. enableAutoScale is true. + /// The time interval at which to automatically adjust the Pool size according to the autoscale formula. This property is set only if the Pool automatically scales, i.e. enableAutoScale is true. + /// The results and errors from the last execution of the autoscale formula. This property is set only if the Pool automatically scales, i.e. enableAutoScale is true. + /// Whether the Pool permits direct communication between Compute Nodes. This imposes restrictions on which Compute Nodes can be assigned to the Pool. Specifying this value can reduce the chance of the requested number of Compute Nodes to be allocated in the Pool. + /// The network configuration for the Pool. + /// A Task specified to run on each Compute Node as it joins the Pool. + /// The list of Packages to be installed on each Compute Node in the Pool. Changes to Package references affect all new Nodes joining the Pool, but do not affect Compute Nodes that are already in the Pool until they are rebooted or reimaged. There is a maximum of 10 Package references on any given Pool. + /// The number of task slots that can be used to run concurrent tasks on a single compute node in the pool. The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of the pool or 256. + /// How Tasks are distributed across Compute Nodes in a Pool. If not specified, the default is spread. + /// The list of user Accounts to be created on each Compute Node in the Pool. + /// A list of name-value pairs associated with the Pool as metadata. + /// Utilization and resource usage statistics for the entire lifetime of the Pool. This property is populated only if the CloudPool was retrieved with an expand clause including the 'stats' attribute; otherwise it is null. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes. + /// A list of file systems to mount on each node in the pool. This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. + /// The identity of the Batch pool, if configured. The list of user identities associated with the Batch pool. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// The desired node communication mode for the pool. If omitted, the default value is Default. + /// The current state of the pool communication mode. + /// The upgrade policy for the Pool. Describes an upgrade policy - automatic, manual, or rolling. + /// Keeps track of any properties unknown to the library. + internal BatchPool(string id, string displayName, string url, string eTag, DateTimeOffset? lastModified, DateTimeOffset? creationTime, BatchPoolState? state, DateTimeOffset? stateTransitionTime, AllocationState? allocationState, DateTimeOffset? allocationStateTransitionTime, string vmSize, VirtualMachineConfiguration virtualMachineConfiguration, TimeSpan? resizeTimeout, IReadOnlyList resizeErrors, IReadOnlyDictionary resourceTags, int? currentDedicatedNodes, int? currentLowPriorityNodes, int? targetDedicatedNodes, int? targetLowPriorityNodes, bool? enableAutoScale, string autoScaleFormula, TimeSpan? autoScaleEvaluationInterval, AutoScaleRun autoScaleRun, bool? enableInterNodeCommunication, NetworkConfiguration networkConfiguration, BatchStartTask startTask, IReadOnlyList applicationPackageReferences, int? taskSlotsPerNode, BatchTaskSchedulingPolicy taskSchedulingPolicy, IReadOnlyList userAccounts, IReadOnlyList metadata, BatchPoolStatistics stats, IReadOnlyList mountConfiguration, BatchPoolIdentity identity, BatchNodeCommunicationMode? targetNodeCommunicationMode, BatchNodeCommunicationMode? currentNodeCommunicationMode, UpgradePolicy upgradePolicy, IDictionary serializedAdditionalRawData) + { + Id = id; + DisplayName = displayName; + Url = url; + ETag = eTag; + LastModified = lastModified; + CreationTime = creationTime; + State = state; + StateTransitionTime = stateTransitionTime; + AllocationState = allocationState; + AllocationStateTransitionTime = allocationStateTransitionTime; + VmSize = vmSize; + VirtualMachineConfiguration = virtualMachineConfiguration; + ResizeTimeout = resizeTimeout; + ResizeErrors = resizeErrors; + ResourceTags = resourceTags; + CurrentDedicatedNodes = currentDedicatedNodes; + CurrentLowPriorityNodes = currentLowPriorityNodes; + TargetDedicatedNodes = targetDedicatedNodes; + TargetLowPriorityNodes = targetLowPriorityNodes; + EnableAutoScale = enableAutoScale; + AutoScaleFormula = autoScaleFormula; + AutoScaleEvaluationInterval = autoScaleEvaluationInterval; + AutoScaleRun = autoScaleRun; + EnableInterNodeCommunication = enableInterNodeCommunication; + NetworkConfiguration = networkConfiguration; + StartTask = startTask; + ApplicationPackageReferences = applicationPackageReferences; + TaskSlotsPerNode = taskSlotsPerNode; + TaskSchedulingPolicy = taskSchedulingPolicy; + UserAccounts = userAccounts; + Metadata = metadata; + Stats = stats; + MountConfiguration = mountConfiguration; + Identity = identity; + TargetNodeCommunicationMode = targetNodeCommunicationMode; + CurrentNodeCommunicationMode = currentNodeCommunicationMode; + UpgradePolicy = upgradePolicy; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// A string that uniquely identifies the Pool within the Account. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an Account that differ only by case). + public string Id { get; } + /// The display name for the Pool. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. + public string DisplayName { get; } + /// The URL of the Pool. + public string Url { get; } + /// The ETag of the Pool. This is an opaque string. You can use it to detect whether the Pool has changed between requests. In particular, you can be pass the ETag when updating a Pool to specify that your changes should take effect only if nobody else has modified the Pool in the meantime. + public string ETag { get; } + /// The last modified time of the Pool. This is the last time at which the Pool level data, such as the targetDedicatedNodes or enableAutoscale settings, changed. It does not factor in node-level changes such as a Compute Node changing state. + public DateTimeOffset? LastModified { get; } + /// The creation time of the Pool. + public DateTimeOffset? CreationTime { get; } + /// The current state of the Pool. + public BatchPoolState? State { get; } + /// The time at which the Pool entered its current state. + public DateTimeOffset? StateTransitionTime { get; } + /// Whether the Pool is resizing. + public AllocationState? AllocationState { get; } + /// The time at which the Pool entered its current allocation state. + public DateTimeOffset? AllocationStateTransitionTime { get; } + /// The size of virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). + public string VmSize { get; } + /// The virtual machine configuration for the Pool. This property must be specified. + public VirtualMachineConfiguration VirtualMachineConfiguration { get; } + /// The timeout for allocation of Compute Nodes to the Pool. This is the timeout for the most recent resize operation. (The initial sizing when the Pool is created counts as a resize.) The default value is 15 minutes. + public TimeSpan? ResizeTimeout { get; } + /// A list of errors encountered while performing the last resize on the Pool. This property is set only if one or more errors occurred during the last Pool resize, and only when the Pool allocationState is Steady. + public IReadOnlyList ResizeErrors { get; } + /// The user-specified tags associated with the pool. The user-defined tags to be associated with the Azure Batch Pool. When specified, these tags are propagated to the backing Azure resources associated with the pool. This property can only be specified when the Batch account was created with the poolAllocationMode property set to 'UserSubscription'. + public IReadOnlyDictionary ResourceTags { get; } + /// The number of dedicated Compute Nodes currently in the Pool. + public int? CurrentDedicatedNodes { get; } + /// The number of Spot/Low-priority Compute Nodes currently in the Pool. Spot/Low-priority Compute Nodes which have been preempted are included in this count. + public int? CurrentLowPriorityNodes { get; } + /// The desired number of dedicated Compute Nodes in the Pool. + public int? TargetDedicatedNodes { get; } + /// The desired number of Spot/Low-priority Compute Nodes in the Pool. + public int? TargetLowPriorityNodes { get; } + /// Whether the Pool size should automatically adjust over time. If false, at least one of targetDedicatedNodes and targetLowPriorityNodes must be specified. If true, the autoScaleFormula property is required and the Pool automatically resizes according to the formula. The default value is false. + public bool? EnableAutoScale { get; } + /// A formula for the desired number of Compute Nodes in the Pool. This property is set only if the Pool automatically scales, i.e. enableAutoScale is true. + public string AutoScaleFormula { get; } + /// The time interval at which to automatically adjust the Pool size according to the autoscale formula. This property is set only if the Pool automatically scales, i.e. enableAutoScale is true. + public TimeSpan? AutoScaleEvaluationInterval { get; } + /// The results and errors from the last execution of the autoscale formula. This property is set only if the Pool automatically scales, i.e. enableAutoScale is true. + public AutoScaleRun AutoScaleRun { get; } + /// Whether the Pool permits direct communication between Compute Nodes. This imposes restrictions on which Compute Nodes can be assigned to the Pool. Specifying this value can reduce the chance of the requested number of Compute Nodes to be allocated in the Pool. + public bool? EnableInterNodeCommunication { get; } + /// The network configuration for the Pool. + public NetworkConfiguration NetworkConfiguration { get; } + /// A Task specified to run on each Compute Node as it joins the Pool. + public BatchStartTask StartTask { get; } + /// The list of Packages to be installed on each Compute Node in the Pool. Changes to Package references affect all new Nodes joining the Pool, but do not affect Compute Nodes that are already in the Pool until they are rebooted or reimaged. There is a maximum of 10 Package references on any given Pool. + public IReadOnlyList ApplicationPackageReferences { get; } + /// The number of task slots that can be used to run concurrent tasks on a single compute node in the pool. The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of the pool or 256. + public int? TaskSlotsPerNode { get; } + /// How Tasks are distributed across Compute Nodes in a Pool. If not specified, the default is spread. + public BatchTaskSchedulingPolicy TaskSchedulingPolicy { get; } + /// The list of user Accounts to be created on each Compute Node in the Pool. + public IReadOnlyList UserAccounts { get; } + /// A list of name-value pairs associated with the Pool as metadata. + public IReadOnlyList Metadata { get; } + /// Utilization and resource usage statistics for the entire lifetime of the Pool. This property is populated only if the CloudPool was retrieved with an expand clause including the 'stats' attribute; otherwise it is null. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes. + public BatchPoolStatistics Stats { get; } + /// A list of file systems to mount on each node in the pool. This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. + public IReadOnlyList MountConfiguration { get; } + /// The identity of the Batch pool, if configured. The list of user identities associated with the Batch pool. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + public BatchPoolIdentity Identity { get; } + /// The desired node communication mode for the pool. If omitted, the default value is Default. + public BatchNodeCommunicationMode? TargetNodeCommunicationMode { get; } + /// The current state of the pool communication mode. + public BatchNodeCommunicationMode? CurrentNodeCommunicationMode { get; } + /// The upgrade policy for the Pool. Describes an upgrade policy - automatic, manual, or rolling. + public UpgradePolicy UpgradePolicy { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolCreateContent.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolCreateContent.Serialization.cs new file mode 100644 index 0000000000000..6b99fdb0fe630 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolCreateContent.Serialization.cs @@ -0,0 +1,509 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchPoolCreateContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchPoolCreateContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + writer.WritePropertyName("vmSize"u8); + writer.WriteStringValue(VmSize); + if (Optional.IsDefined(VirtualMachineConfiguration)) + { + writer.WritePropertyName("virtualMachineConfiguration"u8); + writer.WriteObjectValue(VirtualMachineConfiguration, options); + } + if (Optional.IsDefined(ResizeTimeout)) + { + writer.WritePropertyName("resizeTimeout"u8); + writer.WriteStringValue(ResizeTimeout.Value, "P"); + } + if (Optional.IsCollectionDefined(ResourceTags)) + { + writer.WritePropertyName("resourceTags"u8); + writer.WriteStartObject(); + foreach (var item in ResourceTags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(TargetDedicatedNodes)) + { + writer.WritePropertyName("targetDedicatedNodes"u8); + writer.WriteNumberValue(TargetDedicatedNodes.Value); + } + if (Optional.IsDefined(TargetLowPriorityNodes)) + { + writer.WritePropertyName("targetLowPriorityNodes"u8); + writer.WriteNumberValue(TargetLowPriorityNodes.Value); + } + if (Optional.IsDefined(EnableAutoScale)) + { + writer.WritePropertyName("enableAutoScale"u8); + writer.WriteBooleanValue(EnableAutoScale.Value); + } + if (Optional.IsDefined(AutoScaleFormula)) + { + writer.WritePropertyName("autoScaleFormula"u8); + writer.WriteStringValue(AutoScaleFormula); + } + if (Optional.IsDefined(AutoScaleEvaluationInterval)) + { + writer.WritePropertyName("autoScaleEvaluationInterval"u8); + writer.WriteStringValue(AutoScaleEvaluationInterval.Value, "P"); + } + if (Optional.IsDefined(EnableInterNodeCommunication)) + { + writer.WritePropertyName("enableInterNodeCommunication"u8); + writer.WriteBooleanValue(EnableInterNodeCommunication.Value); + } + if (Optional.IsDefined(NetworkConfiguration)) + { + writer.WritePropertyName("networkConfiguration"u8); + writer.WriteObjectValue(NetworkConfiguration, options); + } + if (Optional.IsDefined(StartTask)) + { + writer.WritePropertyName("startTask"u8); + writer.WriteObjectValue(StartTask, options); + } + if (Optional.IsCollectionDefined(ApplicationPackageReferences)) + { + writer.WritePropertyName("applicationPackageReferences"u8); + writer.WriteStartArray(); + foreach (var item in ApplicationPackageReferences) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(TaskSlotsPerNode)) + { + writer.WritePropertyName("taskSlotsPerNode"u8); + writer.WriteNumberValue(TaskSlotsPerNode.Value); + } + if (Optional.IsDefined(TaskSchedulingPolicy)) + { + writer.WritePropertyName("taskSchedulingPolicy"u8); + writer.WriteObjectValue(TaskSchedulingPolicy, options); + } + if (Optional.IsCollectionDefined(UserAccounts)) + { + writer.WritePropertyName("userAccounts"u8); + writer.WriteStartArray(); + foreach (var item in UserAccounts) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); + writer.WriteStartArray(); + foreach (var item in Metadata) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(MountConfiguration)) + { + writer.WritePropertyName("mountConfiguration"u8); + writer.WriteStartArray(); + foreach (var item in MountConfiguration) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(TargetNodeCommunicationMode)) + { + writer.WritePropertyName("targetNodeCommunicationMode"u8); + writer.WriteStringValue(TargetNodeCommunicationMode.Value.ToString()); + } + if (Optional.IsDefined(UpgradePolicy)) + { + writer.WritePropertyName("upgradePolicy"u8); + writer.WriteObjectValue(UpgradePolicy, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchPoolCreateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchPoolCreateContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchPoolCreateContent(document.RootElement, options); + } + + internal static BatchPoolCreateContent DeserializeBatchPoolCreateContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + string displayName = default; + string vmSize = default; + VirtualMachineConfiguration virtualMachineConfiguration = default; + TimeSpan? resizeTimeout = default; + IDictionary resourceTags = default; + int? targetDedicatedNodes = default; + int? targetLowPriorityNodes = default; + bool? enableAutoScale = default; + string autoScaleFormula = default; + TimeSpan? autoScaleEvaluationInterval = default; + bool? enableInterNodeCommunication = default; + NetworkConfiguration networkConfiguration = default; + BatchStartTask startTask = default; + IList applicationPackageReferences = default; + int? taskSlotsPerNode = default; + BatchTaskSchedulingPolicy taskSchedulingPolicy = default; + IList userAccounts = default; + IList metadata = default; + IList mountConfiguration = default; + BatchNodeCommunicationMode? targetNodeCommunicationMode = default; + UpgradePolicy upgradePolicy = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("vmSize"u8)) + { + vmSize = property.Value.GetString(); + continue; + } + if (property.NameEquals("virtualMachineConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + virtualMachineConfiguration = VirtualMachineConfiguration.DeserializeVirtualMachineConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("resizeTimeout"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resizeTimeout = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("resourceTags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + resourceTags = dictionary; + continue; + } + if (property.NameEquals("targetDedicatedNodes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetDedicatedNodes = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("targetLowPriorityNodes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetLowPriorityNodes = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("enableAutoScale"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableAutoScale = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("autoScaleFormula"u8)) + { + autoScaleFormula = property.Value.GetString(); + continue; + } + if (property.NameEquals("autoScaleEvaluationInterval"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autoScaleEvaluationInterval = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("enableInterNodeCommunication"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableInterNodeCommunication = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("networkConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkConfiguration = NetworkConfiguration.DeserializeNetworkConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("startTask"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTask = BatchStartTask.DeserializeBatchStartTask(property.Value, options); + continue; + } + if (property.NameEquals("applicationPackageReferences"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BatchApplicationPackageReference.DeserializeBatchApplicationPackageReference(item, options)); + } + applicationPackageReferences = array; + continue; + } + if (property.NameEquals("taskSlotsPerNode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + taskSlotsPerNode = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("taskSchedulingPolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + taskSchedulingPolicy = BatchTaskSchedulingPolicy.DeserializeBatchTaskSchedulingPolicy(property.Value, options); + continue; + } + if (property.NameEquals("userAccounts"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(UserAccount.DeserializeUserAccount(item, options)); + } + userAccounts = array; + continue; + } + if (property.NameEquals("metadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MetadataItem.DeserializeMetadataItem(item, options)); + } + metadata = array; + continue; + } + if (property.NameEquals("mountConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Batch.MountConfiguration.DeserializeMountConfiguration(item, options)); + } + mountConfiguration = array; + continue; + } + if (property.NameEquals("targetNodeCommunicationMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetNodeCommunicationMode = new BatchNodeCommunicationMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("upgradePolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + upgradePolicy = UpgradePolicy.DeserializeUpgradePolicy(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchPoolCreateContent( + id, + displayName, + vmSize, + virtualMachineConfiguration, + resizeTimeout, + resourceTags ?? new ChangeTrackingDictionary(), + targetDedicatedNodes, + targetLowPriorityNodes, + enableAutoScale, + autoScaleFormula, + autoScaleEvaluationInterval, + enableInterNodeCommunication, + networkConfiguration, + startTask, + applicationPackageReferences ?? new ChangeTrackingList(), + taskSlotsPerNode, + taskSchedulingPolicy, + userAccounts ?? new ChangeTrackingList(), + metadata ?? new ChangeTrackingList(), + mountConfiguration ?? new ChangeTrackingList(), + targetNodeCommunicationMode, + upgradePolicy, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchPoolCreateContent)} does not support writing '{options.Format}' format."); + } + } + + BatchPoolCreateContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchPoolCreateContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchPoolCreateContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchPoolCreateContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchPoolCreateContent(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolCreateContent.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolCreateContent.cs new file mode 100644 index 0000000000000..78653a2849d33 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolCreateContent.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Parameters for creating an Azure Batch Pool. + public partial class BatchPoolCreateContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// A string that uniquely identifies the Pool within the Account. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two Pool IDs within an Account that differ only by case). + /// The size of virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available VM sizes for Pools using Images from the Virtual Machines Marketplace (pools created with virtualMachineConfiguration), see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). + /// or is null. + public BatchPoolCreateContent(string id, string vmSize) + { + Argument.AssertNotNull(id, nameof(id)); + Argument.AssertNotNull(vmSize, nameof(vmSize)); + + Id = id; + VmSize = vmSize; + ResourceTags = new ChangeTrackingDictionary(); + ApplicationPackageReferences = new ChangeTrackingList(); + UserAccounts = new ChangeTrackingList(); + Metadata = new ChangeTrackingList(); + MountConfiguration = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// A string that uniquely identifies the Pool within the Account. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two Pool IDs within an Account that differ only by case). + /// The display name for the Pool. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. + /// The size of virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available VM sizes for Pools using Images from the Virtual Machines Marketplace (pools created with virtualMachineConfiguration), see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). + /// The virtual machine configuration for the Pool. This property must be specified. + /// The timeout for allocation of Compute Nodes to the Pool. This timeout applies only to manual scaling; it has no effect when enableAutoScale is set to true. The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + /// The user-specified tags associated with the pool. The user-defined tags to be associated with the Azure Batch Pool. When specified, these tags are propagated to the backing Azure resources associated with the pool. This property can only be specified when the Batch account was created with the poolAllocationMode property set to 'UserSubscription'. + /// The desired number of dedicated Compute Nodes in the Pool. This property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both. + /// The desired number of Spot/Low-priority Compute Nodes in the Pool. This property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both. + /// Whether the Pool size should automatically adjust over time. If false, at least one of targetDedicatedNodes and targetLowPriorityNodes must be specified. If true, the autoScaleFormula property is required and the Pool automatically resizes according to the formula. The default value is false. + /// A formula for the desired number of Compute Nodes in the Pool. This property must not be specified if enableAutoScale is set to false. It is required if enableAutoScale is set to true. The formula is checked for validity before the Pool is created. If the formula is not valid, the Batch service rejects the request with detailed error information. For more information about specifying this formula, see 'Automatically scale Compute Nodes in an Azure Batch Pool' (https://azure.microsoft.com/documentation/articles/batch-automatic-scaling/). + /// The time interval at which to automatically adjust the Pool size according to the autoscale formula. The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + /// Whether the Pool permits direct communication between Compute Nodes. Enabling inter-node communication limits the maximum size of the Pool due to deployment restrictions on the Compute Nodes of the Pool. This may result in the Pool not reaching its desired size. The default value is false. + /// The network configuration for the Pool. + /// A Task specified to run on each Compute Node as it joins the Pool. The Task runs when the Compute Node is added to the Pool or when the Compute Node is restarted. + /// The list of Packages to be installed on each Compute Node in the Pool. When creating a pool, the package's application ID must be fully qualified (/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}). Changes to Package references affect all new Nodes joining the Pool, but do not affect Compute Nodes that are already in the Pool until they are rebooted or reimaged. There is a maximum of 10 Package references on any given Pool. + /// The number of task slots that can be used to run concurrent tasks on a single compute node in the pool. The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of the pool or 256. + /// How Tasks are distributed across Compute Nodes in a Pool. If not specified, the default is spread. + /// The list of user Accounts to be created on each Compute Node in the Pool. + /// A list of name-value pairs associated with the Pool as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. + /// Mount storage using specified file system for the entire lifetime of the pool. Mount the storage using Azure fileshare, NFS, CIFS or Blobfuse based file system. + /// The desired node communication mode for the pool. If omitted, the default value is Default. + /// The upgrade policy for the Pool. Describes an upgrade policy - automatic, manual, or rolling. + /// Keeps track of any properties unknown to the library. + internal BatchPoolCreateContent(string id, string displayName, string vmSize, VirtualMachineConfiguration virtualMachineConfiguration, TimeSpan? resizeTimeout, IDictionary resourceTags, int? targetDedicatedNodes, int? targetLowPriorityNodes, bool? enableAutoScale, string autoScaleFormula, TimeSpan? autoScaleEvaluationInterval, bool? enableInterNodeCommunication, NetworkConfiguration networkConfiguration, BatchStartTask startTask, IList applicationPackageReferences, int? taskSlotsPerNode, BatchTaskSchedulingPolicy taskSchedulingPolicy, IList userAccounts, IList metadata, IList mountConfiguration, BatchNodeCommunicationMode? targetNodeCommunicationMode, UpgradePolicy upgradePolicy, IDictionary serializedAdditionalRawData) + { + Id = id; + DisplayName = displayName; + VmSize = vmSize; + VirtualMachineConfiguration = virtualMachineConfiguration; + ResizeTimeout = resizeTimeout; + ResourceTags = resourceTags; + TargetDedicatedNodes = targetDedicatedNodes; + TargetLowPriorityNodes = targetLowPriorityNodes; + EnableAutoScale = enableAutoScale; + AutoScaleFormula = autoScaleFormula; + AutoScaleEvaluationInterval = autoScaleEvaluationInterval; + EnableInterNodeCommunication = enableInterNodeCommunication; + NetworkConfiguration = networkConfiguration; + StartTask = startTask; + ApplicationPackageReferences = applicationPackageReferences; + TaskSlotsPerNode = taskSlotsPerNode; + TaskSchedulingPolicy = taskSchedulingPolicy; + UserAccounts = userAccounts; + Metadata = metadata; + MountConfiguration = mountConfiguration; + TargetNodeCommunicationMode = targetNodeCommunicationMode; + UpgradePolicy = upgradePolicy; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchPoolCreateContent() + { + } + + /// A string that uniquely identifies the Pool within the Account. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two Pool IDs within an Account that differ only by case). + public string Id { get; } + /// The display name for the Pool. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. + public string DisplayName { get; set; } + /// The size of virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available VM sizes for Pools using Images from the Virtual Machines Marketplace (pools created with virtualMachineConfiguration), see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). + public string VmSize { get; } + /// The virtual machine configuration for the Pool. This property must be specified. + public VirtualMachineConfiguration VirtualMachineConfiguration { get; set; } + /// The timeout for allocation of Compute Nodes to the Pool. This timeout applies only to manual scaling; it has no effect when enableAutoScale is set to true. The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + public TimeSpan? ResizeTimeout { get; set; } + /// The user-specified tags associated with the pool. The user-defined tags to be associated with the Azure Batch Pool. When specified, these tags are propagated to the backing Azure resources associated with the pool. This property can only be specified when the Batch account was created with the poolAllocationMode property set to 'UserSubscription'. + public IDictionary ResourceTags { get; } + /// The desired number of dedicated Compute Nodes in the Pool. This property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both. + public int? TargetDedicatedNodes { get; set; } + /// The desired number of Spot/Low-priority Compute Nodes in the Pool. This property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both. + public int? TargetLowPriorityNodes { get; set; } + /// Whether the Pool size should automatically adjust over time. If false, at least one of targetDedicatedNodes and targetLowPriorityNodes must be specified. If true, the autoScaleFormula property is required and the Pool automatically resizes according to the formula. The default value is false. + public bool? EnableAutoScale { get; set; } + /// A formula for the desired number of Compute Nodes in the Pool. This property must not be specified if enableAutoScale is set to false. It is required if enableAutoScale is set to true. The formula is checked for validity before the Pool is created. If the formula is not valid, the Batch service rejects the request with detailed error information. For more information about specifying this formula, see 'Automatically scale Compute Nodes in an Azure Batch Pool' (https://azure.microsoft.com/documentation/articles/batch-automatic-scaling/). + public string AutoScaleFormula { get; set; } + /// The time interval at which to automatically adjust the Pool size according to the autoscale formula. The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + public TimeSpan? AutoScaleEvaluationInterval { get; set; } + /// Whether the Pool permits direct communication between Compute Nodes. Enabling inter-node communication limits the maximum size of the Pool due to deployment restrictions on the Compute Nodes of the Pool. This may result in the Pool not reaching its desired size. The default value is false. + public bool? EnableInterNodeCommunication { get; set; } + /// The network configuration for the Pool. + public NetworkConfiguration NetworkConfiguration { get; set; } + /// A Task specified to run on each Compute Node as it joins the Pool. The Task runs when the Compute Node is added to the Pool or when the Compute Node is restarted. + public BatchStartTask StartTask { get; set; } + /// The list of Packages to be installed on each Compute Node in the Pool. When creating a pool, the package's application ID must be fully qualified (/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}). Changes to Package references affect all new Nodes joining the Pool, but do not affect Compute Nodes that are already in the Pool until they are rebooted or reimaged. There is a maximum of 10 Package references on any given Pool. + public IList ApplicationPackageReferences { get; } + /// The number of task slots that can be used to run concurrent tasks on a single compute node in the pool. The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of the pool or 256. + public int? TaskSlotsPerNode { get; set; } + /// How Tasks are distributed across Compute Nodes in a Pool. If not specified, the default is spread. + public BatchTaskSchedulingPolicy TaskSchedulingPolicy { get; set; } + /// The list of user Accounts to be created on each Compute Node in the Pool. + public IList UserAccounts { get; } + /// A list of name-value pairs associated with the Pool as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. + public IList Metadata { get; } + /// Mount storage using specified file system for the entire lifetime of the pool. Mount the storage using Azure fileshare, NFS, CIFS or Blobfuse based file system. + public IList MountConfiguration { get; } + /// The desired node communication mode for the pool. If omitted, the default value is Default. + public BatchNodeCommunicationMode? TargetNodeCommunicationMode { get; set; } + /// The upgrade policy for the Pool. Describes an upgrade policy - automatic, manual, or rolling. + public UpgradePolicy UpgradePolicy { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolEnableAutoScaleContent.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolEnableAutoScaleContent.Serialization.cs new file mode 100644 index 0000000000000..f4616dd380466 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolEnableAutoScaleContent.Serialization.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchPoolEnableAutoScaleContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchPoolEnableAutoScaleContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(AutoScaleFormula)) + { + writer.WritePropertyName("autoScaleFormula"u8); + writer.WriteStringValue(AutoScaleFormula); + } + if (Optional.IsDefined(AutoScaleEvaluationInterval)) + { + writer.WritePropertyName("autoScaleEvaluationInterval"u8); + writer.WriteStringValue(AutoScaleEvaluationInterval.Value, "P"); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchPoolEnableAutoScaleContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchPoolEnableAutoScaleContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchPoolEnableAutoScaleContent(document.RootElement, options); + } + + internal static BatchPoolEnableAutoScaleContent DeserializeBatchPoolEnableAutoScaleContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string autoScaleFormula = default; + TimeSpan? autoScaleEvaluationInterval = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("autoScaleFormula"u8)) + { + autoScaleFormula = property.Value.GetString(); + continue; + } + if (property.NameEquals("autoScaleEvaluationInterval"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autoScaleEvaluationInterval = property.Value.GetTimeSpan("P"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchPoolEnableAutoScaleContent(autoScaleFormula, autoScaleEvaluationInterval, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchPoolEnableAutoScaleContent)} does not support writing '{options.Format}' format."); + } + } + + BatchPoolEnableAutoScaleContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchPoolEnableAutoScaleContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchPoolEnableAutoScaleContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchPoolEnableAutoScaleContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchPoolEnableAutoScaleContent(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolEnableAutoScaleContent.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolEnableAutoScaleContent.cs new file mode 100644 index 0000000000000..13446bd47d3c2 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolEnableAutoScaleContent.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Parameters for enabling automatic scaling on an Azure Batch Pool. + public partial class BatchPoolEnableAutoScaleContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public BatchPoolEnableAutoScaleContent() + { + } + + /// Initializes a new instance of . + /// The formula for the desired number of Compute Nodes in the Pool. The formula is checked for validity before it is applied to the Pool. If the formula is not valid, the Batch service rejects the request with detailed error information. For more information about specifying this formula, see Automatically scale Compute Nodes in an Azure Batch Pool (https://azure.microsoft.com/en-us/documentation/articles/batch-automatic-scaling). + /// The time interval at which to automatically adjust the Pool size according to the autoscale formula. The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service rejects the request with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). If you specify a new interval, then the existing autoscale evaluation schedule will be stopped and a new autoscale evaluation schedule will be started, with its starting time being the time when this request was issued. + /// Keeps track of any properties unknown to the library. + internal BatchPoolEnableAutoScaleContent(string autoScaleFormula, TimeSpan? autoScaleEvaluationInterval, IDictionary serializedAdditionalRawData) + { + AutoScaleFormula = autoScaleFormula; + AutoScaleEvaluationInterval = autoScaleEvaluationInterval; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The formula for the desired number of Compute Nodes in the Pool. The formula is checked for validity before it is applied to the Pool. If the formula is not valid, the Batch service rejects the request with detailed error information. For more information about specifying this formula, see Automatically scale Compute Nodes in an Azure Batch Pool (https://azure.microsoft.com/en-us/documentation/articles/batch-automatic-scaling). + public string AutoScaleFormula { get; set; } + /// The time interval at which to automatically adjust the Pool size according to the autoscale formula. The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service rejects the request with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). If you specify a new interval, then the existing autoscale evaluation schedule will be stopped and a new autoscale evaluation schedule will be started, with its starting time being the time when this request was issued. + public TimeSpan? AutoScaleEvaluationInterval { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolEndpointConfiguration.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolEndpointConfiguration.Serialization.cs new file mode 100644 index 0000000000000..ad9474bedb9e9 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolEndpointConfiguration.Serialization.cs @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchPoolEndpointConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchPoolEndpointConfiguration)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("inboundNATPools"u8); + writer.WriteStartArray(); + foreach (var item in InboundNatPools) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchPoolEndpointConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchPoolEndpointConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchPoolEndpointConfiguration(document.RootElement, options); + } + + internal static BatchPoolEndpointConfiguration DeserializeBatchPoolEndpointConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList inboundNATPools = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("inboundNATPools"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(InboundNatPool.DeserializeInboundNatPool(item, options)); + } + inboundNATPools = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchPoolEndpointConfiguration(inboundNATPools, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchPoolEndpointConfiguration)} does not support writing '{options.Format}' format."); + } + } + + BatchPoolEndpointConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchPoolEndpointConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchPoolEndpointConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchPoolEndpointConfiguration FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchPoolEndpointConfiguration(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolEndpointConfiguration.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolEndpointConfiguration.cs new file mode 100644 index 0000000000000..0c8173fbeed5c --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolEndpointConfiguration.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Compute.Batch +{ + /// The endpoint configuration for a Pool. + public partial class BatchPoolEndpointConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// A list of inbound NAT Pools that can be used to address specific ports on an individual Compute Node externally. The maximum number of inbound NAT Pools per Batch Pool is 5. If the maximum number of inbound NAT Pools is exceeded the request fails with HTTP status code 400. This cannot be specified if the IPAddressProvisioningType is NoPublicIPAddresses. + /// is null. + public BatchPoolEndpointConfiguration(IEnumerable inboundNatPools) + { + Argument.AssertNotNull(inboundNatPools, nameof(inboundNatPools)); + + InboundNatPools = inboundNatPools.ToList(); + } + + /// Initializes a new instance of . + /// A list of inbound NAT Pools that can be used to address specific ports on an individual Compute Node externally. The maximum number of inbound NAT Pools per Batch Pool is 5. If the maximum number of inbound NAT Pools is exceeded the request fails with HTTP status code 400. This cannot be specified if the IPAddressProvisioningType is NoPublicIPAddresses. + /// Keeps track of any properties unknown to the library. + internal BatchPoolEndpointConfiguration(IList inboundNatPools, IDictionary serializedAdditionalRawData) + { + InboundNatPools = inboundNatPools; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchPoolEndpointConfiguration() + { + } + + /// A list of inbound NAT Pools that can be used to address specific ports on an individual Compute Node externally. The maximum number of inbound NAT Pools per Batch Pool is 5. If the maximum number of inbound NAT Pools is exceeded the request fails with HTTP status code 400. This cannot be specified if the IPAddressProvisioningType is NoPublicIPAddresses. + public IList InboundNatPools { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolEvaluateAutoScaleContent.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolEvaluateAutoScaleContent.Serialization.cs new file mode 100644 index 0000000000000..7f9ec19c737ee --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolEvaluateAutoScaleContent.Serialization.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchPoolEvaluateAutoScaleContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchPoolEvaluateAutoScaleContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("autoScaleFormula"u8); + writer.WriteStringValue(AutoScaleFormula); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchPoolEvaluateAutoScaleContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchPoolEvaluateAutoScaleContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchPoolEvaluateAutoScaleContent(document.RootElement, options); + } + + internal static BatchPoolEvaluateAutoScaleContent DeserializeBatchPoolEvaluateAutoScaleContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string autoScaleFormula = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("autoScaleFormula"u8)) + { + autoScaleFormula = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchPoolEvaluateAutoScaleContent(autoScaleFormula, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchPoolEvaluateAutoScaleContent)} does not support writing '{options.Format}' format."); + } + } + + BatchPoolEvaluateAutoScaleContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchPoolEvaluateAutoScaleContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchPoolEvaluateAutoScaleContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchPoolEvaluateAutoScaleContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchPoolEvaluateAutoScaleContent(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolEvaluateAutoScaleContent.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolEvaluateAutoScaleContent.cs new file mode 100644 index 0000000000000..b89f8e7df1cdc --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolEvaluateAutoScaleContent.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Parameters for evaluating an automatic scaling formula on an Azure Batch Pool. + public partial class BatchPoolEvaluateAutoScaleContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The formula for the desired number of Compute Nodes in the Pool. The formula is validated and its results calculated, but it is not applied to the Pool. To apply the formula to the Pool, 'Enable automatic scaling on a Pool'. For more information about specifying this formula, see Automatically scale Compute Nodes in an Azure Batch Pool (https://azure.microsoft.com/en-us/documentation/articles/batch-automatic-scaling). + /// is null. + public BatchPoolEvaluateAutoScaleContent(string autoScaleFormula) + { + Argument.AssertNotNull(autoScaleFormula, nameof(autoScaleFormula)); + + AutoScaleFormula = autoScaleFormula; + } + + /// Initializes a new instance of . + /// The formula for the desired number of Compute Nodes in the Pool. The formula is validated and its results calculated, but it is not applied to the Pool. To apply the formula to the Pool, 'Enable automatic scaling on a Pool'. For more information about specifying this formula, see Automatically scale Compute Nodes in an Azure Batch Pool (https://azure.microsoft.com/en-us/documentation/articles/batch-automatic-scaling). + /// Keeps track of any properties unknown to the library. + internal BatchPoolEvaluateAutoScaleContent(string autoScaleFormula, IDictionary serializedAdditionalRawData) + { + AutoScaleFormula = autoScaleFormula; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchPoolEvaluateAutoScaleContent() + { + } + + /// The formula for the desired number of Compute Nodes in the Pool. The formula is validated and its results calculated, but it is not applied to the Pool. To apply the formula to the Pool, 'Enable automatic scaling on a Pool'. For more information about specifying this formula, see Automatically scale Compute Nodes in an Azure Batch Pool (https://azure.microsoft.com/en-us/documentation/articles/batch-automatic-scaling). + public string AutoScaleFormula { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolIdentity.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolIdentity.Serialization.cs new file mode 100644 index 0000000000000..67f75f8105ea1 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolIdentity.Serialization.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchPoolIdentity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchPoolIdentity)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + if (Optional.IsCollectionDefined(UserAssignedIdentities)) + { + writer.WritePropertyName("userAssignedIdentities"u8); + writer.WriteStartArray(); + foreach (var item in UserAssignedIdentities) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchPoolIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchPoolIdentity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchPoolIdentity(document.RootElement, options); + } + + internal static BatchPoolIdentity DeserializeBatchPoolIdentity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BatchPoolIdentityType type = default; + IReadOnlyList userAssignedIdentities = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = new BatchPoolIdentityType(property.Value.GetString()); + continue; + } + if (property.NameEquals("userAssignedIdentities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(UserAssignedIdentity.DeserializeUserAssignedIdentity(item, options)); + } + userAssignedIdentities = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchPoolIdentity(type, userAssignedIdentities ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchPoolIdentity)} does not support writing '{options.Format}' format."); + } + } + + BatchPoolIdentity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchPoolIdentity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchPoolIdentity)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchPoolIdentity FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchPoolIdentity(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolIdentity.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolIdentity.cs new file mode 100644 index 0000000000000..4cf680eb1c409 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolIdentity.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// The identity of the Batch pool, if configured. + public partial class BatchPoolIdentity + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The identity of the Batch pool, if configured. The list of user identities associated with the Batch pool. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + internal BatchPoolIdentity(BatchPoolIdentityType type) + { + Type = type; + UserAssignedIdentities = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The identity of the Batch pool, if configured. The list of user identities associated with the Batch pool. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// The list of user identities associated with the Batch account. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// Keeps track of any properties unknown to the library. + internal BatchPoolIdentity(BatchPoolIdentityType type, IReadOnlyList userAssignedIdentities, IDictionary serializedAdditionalRawData) + { + Type = type; + UserAssignedIdentities = userAssignedIdentities; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchPoolIdentity() + { + } + + /// The identity of the Batch pool, if configured. The list of user identities associated with the Batch pool. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + public BatchPoolIdentityType Type { get; } + /// The list of user identities associated with the Batch account. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + public IReadOnlyList UserAssignedIdentities { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolIdentityType.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolIdentityType.cs new file mode 100644 index 0000000000000..b012636e4ab6e --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolIdentityType.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.Compute.Batch +{ + /// BatchPoolIdentityType enums. + public readonly partial struct BatchPoolIdentityType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BatchPoolIdentityType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UserAssignedValue = "UserAssigned"; + private const string NoneValue = "None"; + + /// Batch pool has user assigned identities with it. + public static BatchPoolIdentityType UserAssigned { get; } = new BatchPoolIdentityType(UserAssignedValue); + /// Batch pool has no identity associated with it. Setting `None` in update pool will remove existing identities. + public static BatchPoolIdentityType None { get; } = new BatchPoolIdentityType(NoneValue); + /// Determines if two values are the same. + public static bool operator ==(BatchPoolIdentityType left, BatchPoolIdentityType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BatchPoolIdentityType left, BatchPoolIdentityType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator BatchPoolIdentityType(string value) => new BatchPoolIdentityType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BatchPoolIdentityType other && Equals(other); + /// + public bool Equals(BatchPoolIdentityType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolInfo.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolInfo.Serialization.cs new file mode 100644 index 0000000000000..dd367f46c8d33 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolInfo.Serialization.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchPoolInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchPoolInfo)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(PoolId)) + { + writer.WritePropertyName("poolId"u8); + writer.WriteStringValue(PoolId); + } + if (Optional.IsDefined(AutoPoolSpecification)) + { + writer.WritePropertyName("autoPoolSpecification"u8); + writer.WriteObjectValue(AutoPoolSpecification, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchPoolInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchPoolInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchPoolInfo(document.RootElement, options); + } + + internal static BatchPoolInfo DeserializeBatchPoolInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string poolId = default; + BatchAutoPoolSpecification autoPoolSpecification = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("poolId"u8)) + { + poolId = property.Value.GetString(); + continue; + } + if (property.NameEquals("autoPoolSpecification"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autoPoolSpecification = BatchAutoPoolSpecification.DeserializeBatchAutoPoolSpecification(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchPoolInfo(poolId, autoPoolSpecification, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchPoolInfo)} does not support writing '{options.Format}' format."); + } + } + + BatchPoolInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchPoolInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchPoolInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchPoolInfo FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchPoolInfo(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolInfo.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolInfo.cs new file mode 100644 index 0000000000000..512e1f978ab1e --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolInfo.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Specifies how a Job should be assigned to a Pool. + public partial class BatchPoolInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public BatchPoolInfo() + { + } + + /// Initializes a new instance of . + /// The ID of an existing Pool. All the Tasks of the Job will run on the specified Pool. You must ensure that the Pool referenced by this property exists. If the Pool does not exist at the time the Batch service tries to schedule a Job, no Tasks for the Job will run until you create a Pool with that id. Note that the Batch service will not reject the Job request; it will simply not run Tasks until the Pool exists. You must specify either the Pool ID or the auto Pool specification, but not both. + /// Characteristics for a temporary 'auto pool'. The Batch service will create this auto Pool when the Job is submitted. If auto Pool creation fails, the Batch service moves the Job to a completed state, and the Pool creation error is set in the Job's scheduling error property. The Batch service manages the lifetime (both creation and, unless keepAlive is specified, deletion) of the auto Pool. Any user actions that affect the lifetime of the auto Pool while the Job is active will result in unexpected behavior. You must specify either the Pool ID or the auto Pool specification, but not both. + /// Keeps track of any properties unknown to the library. + internal BatchPoolInfo(string poolId, BatchAutoPoolSpecification autoPoolSpecification, IDictionary serializedAdditionalRawData) + { + PoolId = poolId; + AutoPoolSpecification = autoPoolSpecification; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The ID of an existing Pool. All the Tasks of the Job will run on the specified Pool. You must ensure that the Pool referenced by this property exists. If the Pool does not exist at the time the Batch service tries to schedule a Job, no Tasks for the Job will run until you create a Pool with that id. Note that the Batch service will not reject the Job request; it will simply not run Tasks until the Pool exists. You must specify either the Pool ID or the auto Pool specification, but not both. + public string PoolId { get; set; } + /// Characteristics for a temporary 'auto pool'. The Batch service will create this auto Pool when the Job is submitted. If auto Pool creation fails, the Batch service moves the Job to a completed state, and the Pool creation error is set in the Job's scheduling error property. The Batch service manages the lifetime (both creation and, unless keepAlive is specified, deletion) of the auto Pool. Any user actions that affect the lifetime of the auto Pool while the Job is active will result in unexpected behavior. You must specify either the Pool ID or the auto Pool specification, but not both. + public BatchAutoPoolSpecification AutoPoolSpecification { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolLifetimeOption.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolLifetimeOption.cs new file mode 100644 index 0000000000000..9e8f9741452ff --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolLifetimeOption.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.Compute.Batch +{ + /// BatchPoolLifetimeOption enums. + public readonly partial struct BatchPoolLifetimeOption : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BatchPoolLifetimeOption(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string JobScheduleValue = "jobschedule"; + private const string JobValue = "job"; + + /// The Pool exists for the lifetime of the Job Schedule. The Batch Service creates the Pool when it creates the first Job on the schedule. You may apply this option only to Job Schedules, not to Jobs. + public static BatchPoolLifetimeOption JobSchedule { get; } = new BatchPoolLifetimeOption(JobScheduleValue); + /// The Pool exists for the lifetime of the Job to which it is dedicated. The Batch service creates the Pool when it creates the Job. If the 'job' option is applied to a Job Schedule, the Batch service creates a new auto Pool for every Job created on the schedule. + public static BatchPoolLifetimeOption Job { get; } = new BatchPoolLifetimeOption(JobValue); + /// Determines if two values are the same. + public static bool operator ==(BatchPoolLifetimeOption left, BatchPoolLifetimeOption right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BatchPoolLifetimeOption left, BatchPoolLifetimeOption right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator BatchPoolLifetimeOption(string value) => new BatchPoolLifetimeOption(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BatchPoolLifetimeOption other && Equals(other); + /// + public bool Equals(BatchPoolLifetimeOption other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolNodeCounts.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolNodeCounts.Serialization.cs new file mode 100644 index 0000000000000..cb3ec6b4e8072 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolNodeCounts.Serialization.cs @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchPoolNodeCounts : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchPoolNodeCounts)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("poolId"u8); + writer.WriteStringValue(PoolId); + if (Optional.IsDefined(Dedicated)) + { + writer.WritePropertyName("dedicated"u8); + writer.WriteObjectValue(Dedicated, options); + } + if (Optional.IsDefined(LowPriority)) + { + writer.WritePropertyName("lowPriority"u8); + writer.WriteObjectValue(LowPriority, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchPoolNodeCounts IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchPoolNodeCounts)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchPoolNodeCounts(document.RootElement, options); + } + + internal static BatchPoolNodeCounts DeserializeBatchPoolNodeCounts(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string poolId = default; + BatchNodeCounts dedicated = default; + BatchNodeCounts lowPriority = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("poolId"u8)) + { + poolId = property.Value.GetString(); + continue; + } + if (property.NameEquals("dedicated"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dedicated = BatchNodeCounts.DeserializeBatchNodeCounts(property.Value, options); + continue; + } + if (property.NameEquals("lowPriority"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lowPriority = BatchNodeCounts.DeserializeBatchNodeCounts(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchPoolNodeCounts(poolId, dedicated, lowPriority, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchPoolNodeCounts)} does not support writing '{options.Format}' format."); + } + } + + BatchPoolNodeCounts IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchPoolNodeCounts(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchPoolNodeCounts)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchPoolNodeCounts FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchPoolNodeCounts(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolNodeCounts.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolNodeCounts.cs new file mode 100644 index 0000000000000..ffcf85b12f646 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolNodeCounts.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// The number of Compute Nodes in each state for a Pool. + public partial class BatchPoolNodeCounts + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The ID of the Pool. + /// is null. + internal BatchPoolNodeCounts(string poolId) + { + Argument.AssertNotNull(poolId, nameof(poolId)); + + PoolId = poolId; + } + + /// Initializes a new instance of . + /// The ID of the Pool. + /// The number of dedicated Compute Nodes in each state. + /// The number of Spot/Low-priority Compute Nodes in each state. + /// Keeps track of any properties unknown to the library. + internal BatchPoolNodeCounts(string poolId, BatchNodeCounts dedicated, BatchNodeCounts lowPriority, IDictionary serializedAdditionalRawData) + { + PoolId = poolId; + Dedicated = dedicated; + LowPriority = lowPriority; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchPoolNodeCounts() + { + } + + /// The ID of the Pool. + public string PoolId { get; } + /// The number of dedicated Compute Nodes in each state. + public BatchNodeCounts Dedicated { get; } + /// The number of Spot/Low-priority Compute Nodes in each state. + public BatchNodeCounts LowPriority { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolReplaceContent.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolReplaceContent.Serialization.cs new file mode 100644 index 0000000000000..c0746e2dcb459 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolReplaceContent.Serialization.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchPoolReplaceContent : IUtf8JsonSerializable, IJsonModel + { + BatchPoolReplaceContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchPoolReplaceContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchPoolReplaceContent(document.RootElement, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchPoolReplaceContent)} does not support writing '{options.Format}' format."); + } + } + + BatchPoolReplaceContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchPoolReplaceContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchPoolReplaceContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolReplaceContent.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolReplaceContent.cs new file mode 100644 index 0000000000000..15a93a07a92ab --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolReplaceContent.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Compute.Batch +{ + /// Parameters for replacing properties on an Azure Batch Pool. + public partial class BatchPoolReplaceContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The list of Application Packages to be installed on each Compute Node in the Pool. The list replaces any existing Application Package references on the Pool. Changes to Application Package references affect all new Compute Nodes joining the Pool, but do not affect Compute Nodes that are already in the Pool until they are rebooted or reimaged. There is a maximum of 10 Application Package references on any given Pool. If omitted, or if you specify an empty collection, any existing Application Packages references are removed from the Pool. A maximum of 10 references may be specified on a given Pool. + /// A list of name-value pairs associated with the Pool as metadata. This list replaces any existing metadata configured on the Pool. If omitted, or if you specify an empty collection, any existing metadata is removed from the Pool. + /// or is null. + public BatchPoolReplaceContent(IEnumerable applicationPackageReferences, IEnumerable metadata) + { + Argument.AssertNotNull(applicationPackageReferences, nameof(applicationPackageReferences)); + Argument.AssertNotNull(metadata, nameof(metadata)); + + ApplicationPackageReferences = applicationPackageReferences.ToList(); + Metadata = metadata.ToList(); + } + + /// Initializes a new instance of . + /// A Task to run on each Compute Node as it joins the Pool. The Task runs when the Compute Node is added to the Pool or when the Compute Node is restarted. If this element is present, it overwrites any existing StartTask. If omitted, any existing StartTask is removed from the Pool. + /// The list of Application Packages to be installed on each Compute Node in the Pool. The list replaces any existing Application Package references on the Pool. Changes to Application Package references affect all new Compute Nodes joining the Pool, but do not affect Compute Nodes that are already in the Pool until they are rebooted or reimaged. There is a maximum of 10 Application Package references on any given Pool. If omitted, or if you specify an empty collection, any existing Application Packages references are removed from the Pool. A maximum of 10 references may be specified on a given Pool. + /// A list of name-value pairs associated with the Pool as metadata. This list replaces any existing metadata configured on the Pool. If omitted, or if you specify an empty collection, any existing metadata is removed from the Pool. + /// The desired node communication mode for the pool. This setting replaces any existing targetNodeCommunication setting on the Pool. If omitted, the existing setting is default. + /// Keeps track of any properties unknown to the library. + internal BatchPoolReplaceContent(BatchStartTask startTask, IList applicationPackageReferences, IList metadata, BatchNodeCommunicationMode? targetNodeCommunicationMode, IDictionary serializedAdditionalRawData) + { + StartTask = startTask; + ApplicationPackageReferences = applicationPackageReferences; + Metadata = metadata; + TargetNodeCommunicationMode = targetNodeCommunicationMode; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchPoolReplaceContent() + { + } + + /// A Task to run on each Compute Node as it joins the Pool. The Task runs when the Compute Node is added to the Pool or when the Compute Node is restarted. If this element is present, it overwrites any existing StartTask. If omitted, any existing StartTask is removed from the Pool. + public BatchStartTask StartTask { get; set; } + /// The list of Application Packages to be installed on each Compute Node in the Pool. The list replaces any existing Application Package references on the Pool. Changes to Application Package references affect all new Compute Nodes joining the Pool, but do not affect Compute Nodes that are already in the Pool until they are rebooted or reimaged. There is a maximum of 10 Application Package references on any given Pool. If omitted, or if you specify an empty collection, any existing Application Packages references are removed from the Pool. A maximum of 10 references may be specified on a given Pool. + public IList ApplicationPackageReferences { get; } + /// A list of name-value pairs associated with the Pool as metadata. This list replaces any existing metadata configured on the Pool. If omitted, or if you specify an empty collection, any existing metadata is removed from the Pool. + public IList Metadata { get; } + /// The desired node communication mode for the pool. This setting replaces any existing targetNodeCommunication setting on the Pool. If omitted, the existing setting is default. + public BatchNodeCommunicationMode? TargetNodeCommunicationMode { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolResizeContent.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolResizeContent.Serialization.cs new file mode 100644 index 0000000000000..2a68d6fcb75a0 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolResizeContent.Serialization.cs @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchPoolResizeContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchPoolResizeContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(TargetDedicatedNodes)) + { + writer.WritePropertyName("targetDedicatedNodes"u8); + writer.WriteNumberValue(TargetDedicatedNodes.Value); + } + if (Optional.IsDefined(TargetLowPriorityNodes)) + { + writer.WritePropertyName("targetLowPriorityNodes"u8); + writer.WriteNumberValue(TargetLowPriorityNodes.Value); + } + if (Optional.IsDefined(ResizeTimeout)) + { + writer.WritePropertyName("resizeTimeout"u8); + writer.WriteStringValue(ResizeTimeout.Value, "P"); + } + if (Optional.IsDefined(NodeDeallocationOption)) + { + writer.WritePropertyName("nodeDeallocationOption"u8); + writer.WriteStringValue(NodeDeallocationOption.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchPoolResizeContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchPoolResizeContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchPoolResizeContent(document.RootElement, options); + } + + internal static BatchPoolResizeContent DeserializeBatchPoolResizeContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? targetDedicatedNodes = default; + int? targetLowPriorityNodes = default; + TimeSpan? resizeTimeout = default; + BatchNodeDeallocationOption? nodeDeallocationOption = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("targetDedicatedNodes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetDedicatedNodes = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("targetLowPriorityNodes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetLowPriorityNodes = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("resizeTimeout"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resizeTimeout = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("nodeDeallocationOption"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nodeDeallocationOption = new BatchNodeDeallocationOption(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchPoolResizeContent(targetDedicatedNodes, targetLowPriorityNodes, resizeTimeout, nodeDeallocationOption, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchPoolResizeContent)} does not support writing '{options.Format}' format."); + } + } + + BatchPoolResizeContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchPoolResizeContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchPoolResizeContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchPoolResizeContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchPoolResizeContent(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolResizeContent.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolResizeContent.cs new file mode 100644 index 0000000000000..2a85fe641ba47 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolResizeContent.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Parameters for changing the size of an Azure Batch Pool. + public partial class BatchPoolResizeContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public BatchPoolResizeContent() + { + } + + /// Initializes a new instance of . + /// The desired number of dedicated Compute Nodes in the Pool. + /// The desired number of Spot/Low-priority Compute Nodes in the Pool. + /// The timeout for allocation of Nodes to the Pool or removal of Compute Nodes from the Pool. The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + /// Determines what to do with a Compute Node and its running task(s) if the Pool size is decreasing. The default value is requeue. + /// Keeps track of any properties unknown to the library. + internal BatchPoolResizeContent(int? targetDedicatedNodes, int? targetLowPriorityNodes, TimeSpan? resizeTimeout, BatchNodeDeallocationOption? nodeDeallocationOption, IDictionary serializedAdditionalRawData) + { + TargetDedicatedNodes = targetDedicatedNodes; + TargetLowPriorityNodes = targetLowPriorityNodes; + ResizeTimeout = resizeTimeout; + NodeDeallocationOption = nodeDeallocationOption; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The desired number of dedicated Compute Nodes in the Pool. + public int? TargetDedicatedNodes { get; set; } + /// The desired number of Spot/Low-priority Compute Nodes in the Pool. + public int? TargetLowPriorityNodes { get; set; } + /// The timeout for allocation of Nodes to the Pool or removal of Compute Nodes from the Pool. The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + public TimeSpan? ResizeTimeout { get; set; } + /// Determines what to do with a Compute Node and its running task(s) if the Pool size is decreasing. The default value is requeue. + public BatchNodeDeallocationOption? NodeDeallocationOption { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolResourceStatistics.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolResourceStatistics.Serialization.cs new file mode 100644 index 0000000000000..061b3ac2b785e --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolResourceStatistics.Serialization.cs @@ -0,0 +1,245 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchPoolResourceStatistics : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchPoolResourceStatistics)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartTime, "O"); + writer.WritePropertyName("lastUpdateTime"u8); + writer.WriteStringValue(LastUpdateTime, "O"); + writer.WritePropertyName("avgCPUPercentage"u8); + writer.WriteNumberValue(AvgCpuPercentage); + writer.WritePropertyName("avgMemoryGiB"u8); + writer.WriteNumberValue(AvgMemoryGiB); + writer.WritePropertyName("peakMemoryGiB"u8); + writer.WriteNumberValue(PeakMemoryGiB); + writer.WritePropertyName("avgDiskGiB"u8); + writer.WriteNumberValue(AvgDiskGiB); + writer.WritePropertyName("peakDiskGiB"u8); + writer.WriteNumberValue(PeakDiskGiB); + writer.WritePropertyName("diskReadIOps"u8); + writer.WriteNumberValue(DiskReadIOps); + writer.WritePropertyName("diskWriteIOps"u8); + writer.WriteNumberValue(DiskWriteIOps); + writer.WritePropertyName("diskReadGiB"u8); + writer.WriteNumberValue(DiskReadGiB); + writer.WritePropertyName("diskWriteGiB"u8); + writer.WriteNumberValue(DiskWriteGiB); + writer.WritePropertyName("networkReadGiB"u8); + writer.WriteNumberValue(NetworkReadGiB); + writer.WritePropertyName("networkWriteGiB"u8); + writer.WriteNumberValue(NetworkWriteGiB); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchPoolResourceStatistics IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchPoolResourceStatistics)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchPoolResourceStatistics(document.RootElement, options); + } + + internal static BatchPoolResourceStatistics DeserializeBatchPoolResourceStatistics(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset startTime = default; + DateTimeOffset lastUpdateTime = default; + float avgCPUPercentage = default; + float avgMemoryGiB = default; + float peakMemoryGiB = default; + float avgDiskGiB = default; + float peakDiskGiB = default; + long diskReadIOps = default; + long diskWriteIOps = default; + float diskReadGiB = default; + float diskWriteGiB = default; + float networkReadGiB = default; + float networkWriteGiB = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("startTime"u8)) + { + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdateTime"u8)) + { + lastUpdateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("avgCPUPercentage"u8)) + { + avgCPUPercentage = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("avgMemoryGiB"u8)) + { + avgMemoryGiB = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("peakMemoryGiB"u8)) + { + peakMemoryGiB = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("avgDiskGiB"u8)) + { + avgDiskGiB = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("peakDiskGiB"u8)) + { + peakDiskGiB = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("diskReadIOps"u8)) + { + diskReadIOps = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("diskWriteIOps"u8)) + { + diskWriteIOps = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("diskReadGiB"u8)) + { + diskReadGiB = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("diskWriteGiB"u8)) + { + diskWriteGiB = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("networkReadGiB"u8)) + { + networkReadGiB = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("networkWriteGiB"u8)) + { + networkWriteGiB = property.Value.GetSingle(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchPoolResourceStatistics( + startTime, + lastUpdateTime, + avgCPUPercentage, + avgMemoryGiB, + peakMemoryGiB, + avgDiskGiB, + peakDiskGiB, + diskReadIOps, + diskWriteIOps, + diskReadGiB, + diskWriteGiB, + networkReadGiB, + networkWriteGiB, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchPoolResourceStatistics)} does not support writing '{options.Format}' format."); + } + } + + BatchPoolResourceStatistics IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchPoolResourceStatistics(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchPoolResourceStatistics)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchPoolResourceStatistics FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchPoolResourceStatistics(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolResourceStatistics.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolResourceStatistics.cs new file mode 100644 index 0000000000000..0fd446ceda9ea --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolResourceStatistics.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Statistics related to resource consumption by Compute Nodes in a Pool. + public partial class BatchPoolResourceStatistics + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The start time of the time range covered by the statistics. + /// The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime. + /// The average CPU usage across all Compute Nodes in the Pool (percentage per node). + /// The average memory usage in GiB across all Compute Nodes in the Pool. + /// The peak memory usage in GiB across all Compute Nodes in the Pool. + /// The average used disk space in GiB across all Compute Nodes in the Pool. + /// The peak used disk space in GiB across all Compute Nodes in the Pool. + /// The total number of disk read operations across all Compute Nodes in the Pool. + /// The total number of disk write operations across all Compute Nodes in the Pool. + /// The total amount of data in GiB of disk reads across all Compute Nodes in the Pool. + /// The total amount of data in GiB of disk writes across all Compute Nodes in the Pool. + /// The total amount of data in GiB of network reads across all Compute Nodes in the Pool. + /// The total amount of data in GiB of network writes across all Compute Nodes in the Pool. + internal BatchPoolResourceStatistics(DateTimeOffset startTime, DateTimeOffset lastUpdateTime, float avgCpuPercentage, float avgMemoryGiB, float peakMemoryGiB, float avgDiskGiB, float peakDiskGiB, long diskReadIOps, long diskWriteIOps, float diskReadGiB, float diskWriteGiB, float networkReadGiB, float networkWriteGiB) + { + StartTime = startTime; + LastUpdateTime = lastUpdateTime; + AvgCpuPercentage = avgCpuPercentage; + AvgMemoryGiB = avgMemoryGiB; + PeakMemoryGiB = peakMemoryGiB; + AvgDiskGiB = avgDiskGiB; + PeakDiskGiB = peakDiskGiB; + DiskReadIOps = diskReadIOps; + DiskWriteIOps = diskWriteIOps; + DiskReadGiB = diskReadGiB; + DiskWriteGiB = diskWriteGiB; + NetworkReadGiB = networkReadGiB; + NetworkWriteGiB = networkWriteGiB; + } + + /// Initializes a new instance of . + /// The start time of the time range covered by the statistics. + /// The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime. + /// The average CPU usage across all Compute Nodes in the Pool (percentage per node). + /// The average memory usage in GiB across all Compute Nodes in the Pool. + /// The peak memory usage in GiB across all Compute Nodes in the Pool. + /// The average used disk space in GiB across all Compute Nodes in the Pool. + /// The peak used disk space in GiB across all Compute Nodes in the Pool. + /// The total number of disk read operations across all Compute Nodes in the Pool. + /// The total number of disk write operations across all Compute Nodes in the Pool. + /// The total amount of data in GiB of disk reads across all Compute Nodes in the Pool. + /// The total amount of data in GiB of disk writes across all Compute Nodes in the Pool. + /// The total amount of data in GiB of network reads across all Compute Nodes in the Pool. + /// The total amount of data in GiB of network writes across all Compute Nodes in the Pool. + /// Keeps track of any properties unknown to the library. + internal BatchPoolResourceStatistics(DateTimeOffset startTime, DateTimeOffset lastUpdateTime, float avgCpuPercentage, float avgMemoryGiB, float peakMemoryGiB, float avgDiskGiB, float peakDiskGiB, long diskReadIOps, long diskWriteIOps, float diskReadGiB, float diskWriteGiB, float networkReadGiB, float networkWriteGiB, IDictionary serializedAdditionalRawData) + { + StartTime = startTime; + LastUpdateTime = lastUpdateTime; + AvgCpuPercentage = avgCpuPercentage; + AvgMemoryGiB = avgMemoryGiB; + PeakMemoryGiB = peakMemoryGiB; + AvgDiskGiB = avgDiskGiB; + PeakDiskGiB = peakDiskGiB; + DiskReadIOps = diskReadIOps; + DiskWriteIOps = diskWriteIOps; + DiskReadGiB = diskReadGiB; + DiskWriteGiB = diskWriteGiB; + NetworkReadGiB = networkReadGiB; + NetworkWriteGiB = networkWriteGiB; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchPoolResourceStatistics() + { + } + + /// The start time of the time range covered by the statistics. + public DateTimeOffset StartTime { get; } + /// The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime. + public DateTimeOffset LastUpdateTime { get; } + /// The average CPU usage across all Compute Nodes in the Pool (percentage per node). + public float AvgCpuPercentage { get; } + /// The average memory usage in GiB across all Compute Nodes in the Pool. + public float AvgMemoryGiB { get; } + /// The peak memory usage in GiB across all Compute Nodes in the Pool. + public float PeakMemoryGiB { get; } + /// The average used disk space in GiB across all Compute Nodes in the Pool. + public float AvgDiskGiB { get; } + /// The peak used disk space in GiB across all Compute Nodes in the Pool. + public float PeakDiskGiB { get; } + /// The total number of disk read operations across all Compute Nodes in the Pool. + public long DiskReadIOps { get; } + /// The total number of disk write operations across all Compute Nodes in the Pool. + public long DiskWriteIOps { get; } + /// The total amount of data in GiB of disk reads across all Compute Nodes in the Pool. + public float DiskReadGiB { get; } + /// The total amount of data in GiB of disk writes across all Compute Nodes in the Pool. + public float DiskWriteGiB { get; } + /// The total amount of data in GiB of network reads across all Compute Nodes in the Pool. + public float NetworkReadGiB { get; } + /// The total amount of data in GiB of network writes across all Compute Nodes in the Pool. + public float NetworkWriteGiB { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolSpecification.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolSpecification.Serialization.cs new file mode 100644 index 0000000000000..293379cd7d853 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolSpecification.Serialization.cs @@ -0,0 +1,485 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchPoolSpecification : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchPoolSpecification)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + writer.WritePropertyName("vmSize"u8); + writer.WriteStringValue(VmSize); + if (Optional.IsDefined(VirtualMachineConfiguration)) + { + writer.WritePropertyName("virtualMachineConfiguration"u8); + writer.WriteObjectValue(VirtualMachineConfiguration, options); + } + if (Optional.IsDefined(TaskSlotsPerNode)) + { + writer.WritePropertyName("taskSlotsPerNode"u8); + writer.WriteNumberValue(TaskSlotsPerNode.Value); + } + if (Optional.IsDefined(TaskSchedulingPolicy)) + { + writer.WritePropertyName("taskSchedulingPolicy"u8); + writer.WriteObjectValue(TaskSchedulingPolicy, options); + } + if (Optional.IsDefined(ResizeTimeout)) + { + writer.WritePropertyName("resizeTimeout"u8); + writer.WriteStringValue(ResizeTimeout.Value, "P"); + } + if (Optional.IsDefined(ResourceTags)) + { + writer.WritePropertyName("resourceTags"u8); + writer.WriteStringValue(ResourceTags); + } + if (Optional.IsDefined(TargetDedicatedNodes)) + { + writer.WritePropertyName("targetDedicatedNodes"u8); + writer.WriteNumberValue(TargetDedicatedNodes.Value); + } + if (Optional.IsDefined(TargetLowPriorityNodes)) + { + writer.WritePropertyName("targetLowPriorityNodes"u8); + writer.WriteNumberValue(TargetLowPriorityNodes.Value); + } + if (Optional.IsDefined(EnableAutoScale)) + { + writer.WritePropertyName("enableAutoScale"u8); + writer.WriteBooleanValue(EnableAutoScale.Value); + } + if (Optional.IsDefined(AutoScaleFormula)) + { + writer.WritePropertyName("autoScaleFormula"u8); + writer.WriteStringValue(AutoScaleFormula); + } + if (Optional.IsDefined(AutoScaleEvaluationInterval)) + { + writer.WritePropertyName("autoScaleEvaluationInterval"u8); + writer.WriteStringValue(AutoScaleEvaluationInterval.Value, "P"); + } + if (Optional.IsDefined(EnableInterNodeCommunication)) + { + writer.WritePropertyName("enableInterNodeCommunication"u8); + writer.WriteBooleanValue(EnableInterNodeCommunication.Value); + } + if (Optional.IsDefined(NetworkConfiguration)) + { + writer.WritePropertyName("networkConfiguration"u8); + writer.WriteObjectValue(NetworkConfiguration, options); + } + if (Optional.IsDefined(StartTask)) + { + writer.WritePropertyName("startTask"u8); + writer.WriteObjectValue(StartTask, options); + } + if (Optional.IsCollectionDefined(ApplicationPackageReferences)) + { + writer.WritePropertyName("applicationPackageReferences"u8); + writer.WriteStartArray(); + foreach (var item in ApplicationPackageReferences) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(UserAccounts)) + { + writer.WritePropertyName("userAccounts"u8); + writer.WriteStartArray(); + foreach (var item in UserAccounts) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); + writer.WriteStartArray(); + foreach (var item in Metadata) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(MountConfiguration)) + { + writer.WritePropertyName("mountConfiguration"u8); + writer.WriteStartArray(); + foreach (var item in MountConfiguration) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(TargetNodeCommunicationMode)) + { + writer.WritePropertyName("targetNodeCommunicationMode"u8); + writer.WriteStringValue(TargetNodeCommunicationMode.Value.ToString()); + } + if (Optional.IsDefined(UpgradePolicy)) + { + writer.WritePropertyName("upgradePolicy"u8); + writer.WriteObjectValue(UpgradePolicy, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchPoolSpecification IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchPoolSpecification)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchPoolSpecification(document.RootElement, options); + } + + internal static BatchPoolSpecification DeserializeBatchPoolSpecification(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string displayName = default; + string vmSize = default; + VirtualMachineConfiguration virtualMachineConfiguration = default; + int? taskSlotsPerNode = default; + BatchTaskSchedulingPolicy taskSchedulingPolicy = default; + TimeSpan? resizeTimeout = default; + string resourceTags = default; + int? targetDedicatedNodes = default; + int? targetLowPriorityNodes = default; + bool? enableAutoScale = default; + string autoScaleFormula = default; + TimeSpan? autoScaleEvaluationInterval = default; + bool? enableInterNodeCommunication = default; + NetworkConfiguration networkConfiguration = default; + BatchStartTask startTask = default; + IList applicationPackageReferences = default; + IList userAccounts = default; + IList metadata = default; + IList mountConfiguration = default; + BatchNodeCommunicationMode? targetNodeCommunicationMode = default; + UpgradePolicy upgradePolicy = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("vmSize"u8)) + { + vmSize = property.Value.GetString(); + continue; + } + if (property.NameEquals("virtualMachineConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + virtualMachineConfiguration = VirtualMachineConfiguration.DeserializeVirtualMachineConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("taskSlotsPerNode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + taskSlotsPerNode = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("taskSchedulingPolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + taskSchedulingPolicy = BatchTaskSchedulingPolicy.DeserializeBatchTaskSchedulingPolicy(property.Value, options); + continue; + } + if (property.NameEquals("resizeTimeout"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resizeTimeout = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("resourceTags"u8)) + { + resourceTags = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetDedicatedNodes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetDedicatedNodes = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("targetLowPriorityNodes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetLowPriorityNodes = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("enableAutoScale"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableAutoScale = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("autoScaleFormula"u8)) + { + autoScaleFormula = property.Value.GetString(); + continue; + } + if (property.NameEquals("autoScaleEvaluationInterval"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autoScaleEvaluationInterval = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("enableInterNodeCommunication"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableInterNodeCommunication = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("networkConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkConfiguration = NetworkConfiguration.DeserializeNetworkConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("startTask"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTask = BatchStartTask.DeserializeBatchStartTask(property.Value, options); + continue; + } + if (property.NameEquals("applicationPackageReferences"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BatchApplicationPackageReference.DeserializeBatchApplicationPackageReference(item, options)); + } + applicationPackageReferences = array; + continue; + } + if (property.NameEquals("userAccounts"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(UserAccount.DeserializeUserAccount(item, options)); + } + userAccounts = array; + continue; + } + if (property.NameEquals("metadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MetadataItem.DeserializeMetadataItem(item, options)); + } + metadata = array; + continue; + } + if (property.NameEquals("mountConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Batch.MountConfiguration.DeserializeMountConfiguration(item, options)); + } + mountConfiguration = array; + continue; + } + if (property.NameEquals("targetNodeCommunicationMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetNodeCommunicationMode = new BatchNodeCommunicationMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("upgradePolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + upgradePolicy = UpgradePolicy.DeserializeUpgradePolicy(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchPoolSpecification( + displayName, + vmSize, + virtualMachineConfiguration, + taskSlotsPerNode, + taskSchedulingPolicy, + resizeTimeout, + resourceTags, + targetDedicatedNodes, + targetLowPriorityNodes, + enableAutoScale, + autoScaleFormula, + autoScaleEvaluationInterval, + enableInterNodeCommunication, + networkConfiguration, + startTask, + applicationPackageReferences ?? new ChangeTrackingList(), + userAccounts ?? new ChangeTrackingList(), + metadata ?? new ChangeTrackingList(), + mountConfiguration ?? new ChangeTrackingList(), + targetNodeCommunicationMode, + upgradePolicy, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchPoolSpecification)} does not support writing '{options.Format}' format."); + } + } + + BatchPoolSpecification IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchPoolSpecification(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchPoolSpecification)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchPoolSpecification FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchPoolSpecification(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolSpecification.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolSpecification.cs new file mode 100644 index 0000000000000..758fe6016c02a --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolSpecification.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Specification for creating a new Pool. + public partial class BatchPoolSpecification + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The size of the virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). + /// is null. + public BatchPoolSpecification(string vmSize) + { + Argument.AssertNotNull(vmSize, nameof(vmSize)); + + VmSize = vmSize; + ApplicationPackageReferences = new ChangeTrackingList(); + UserAccounts = new ChangeTrackingList(); + Metadata = new ChangeTrackingList(); + MountConfiguration = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The display name for the Pool. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. + /// The size of the virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). + /// The virtual machine configuration for the Pool. This property must be specified if the Pool needs to be created with Azure IaaS VMs. If it is not specified then the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + /// The number of task slots that can be used to run concurrent tasks on a single compute node in the pool. The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of the pool or 256. + /// How Tasks are distributed across Compute Nodes in a Pool. If not specified, the default is spread. + /// The timeout for allocation of Compute Nodes to the Pool. This timeout applies only to manual scaling; it has no effect when enableAutoScale is set to true. The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service rejects the request with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + /// The user-specified tags associated with the pool.The user-defined tags to be associated with the Azure Batch Pool. When specified, these tags are propagated to the backing Azure resources associated with the pool. This property can only be specified when the Batch account was created with the poolAllocationMode property set to 'UserSubscription'. + /// The desired number of dedicated Compute Nodes in the Pool. This property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both. + /// The desired number of Spot/Low-priority Compute Nodes in the Pool. This property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both. + /// Whether the Pool size should automatically adjust over time. If false, at least one of targetDedicatedNodes and targetLowPriorityNodes must be specified. If true, the autoScaleFormula element is required. The Pool automatically resizes according to the formula. The default value is false. + /// The formula for the desired number of Compute Nodes in the Pool. This property must not be specified if enableAutoScale is set to false. It is required if enableAutoScale is set to true. The formula is checked for validity before the Pool is created. If the formula is not valid, the Batch service rejects the request with detailed error information. + /// The time interval at which to automatically adjust the Pool size according to the autoscale formula. The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service rejects the request with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + /// Whether the Pool permits direct communication between Compute Nodes. Enabling inter-node communication limits the maximum size of the Pool due to deployment restrictions on the Compute Nodes of the Pool. This may result in the Pool not reaching its desired size. The default value is false. + /// The network configuration for the Pool. + /// A Task to run on each Compute Node as it joins the Pool. The Task runs when the Compute Node is added to the Pool or when the Compute Node is restarted. + /// The list of Packages to be installed on each Compute Node in the Pool. When creating a pool, the package's application ID must be fully qualified (/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}). Changes to Package references affect all new Nodes joining the Pool, but do not affect Compute Nodes that are already in the Pool until they are rebooted or reimaged. There is a maximum of 10 Package references on any given Pool. + /// The list of user Accounts to be created on each Compute Node in the Pool. + /// A list of name-value pairs associated with the Pool as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. + /// A list of file systems to mount on each node in the pool. This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. + /// The desired node communication mode for the pool. If omitted, the default value is Default. + /// The upgrade policy for the Pool. Describes an upgrade policy - automatic, manual, or rolling. + /// Keeps track of any properties unknown to the library. + internal BatchPoolSpecification(string displayName, string vmSize, VirtualMachineConfiguration virtualMachineConfiguration, int? taskSlotsPerNode, BatchTaskSchedulingPolicy taskSchedulingPolicy, TimeSpan? resizeTimeout, string resourceTags, int? targetDedicatedNodes, int? targetLowPriorityNodes, bool? enableAutoScale, string autoScaleFormula, TimeSpan? autoScaleEvaluationInterval, bool? enableInterNodeCommunication, NetworkConfiguration networkConfiguration, BatchStartTask startTask, IList applicationPackageReferences, IList userAccounts, IList metadata, IList mountConfiguration, BatchNodeCommunicationMode? targetNodeCommunicationMode, UpgradePolicy upgradePolicy, IDictionary serializedAdditionalRawData) + { + DisplayName = displayName; + VmSize = vmSize; + VirtualMachineConfiguration = virtualMachineConfiguration; + TaskSlotsPerNode = taskSlotsPerNode; + TaskSchedulingPolicy = taskSchedulingPolicy; + ResizeTimeout = resizeTimeout; + ResourceTags = resourceTags; + TargetDedicatedNodes = targetDedicatedNodes; + TargetLowPriorityNodes = targetLowPriorityNodes; + EnableAutoScale = enableAutoScale; + AutoScaleFormula = autoScaleFormula; + AutoScaleEvaluationInterval = autoScaleEvaluationInterval; + EnableInterNodeCommunication = enableInterNodeCommunication; + NetworkConfiguration = networkConfiguration; + StartTask = startTask; + ApplicationPackageReferences = applicationPackageReferences; + UserAccounts = userAccounts; + Metadata = metadata; + MountConfiguration = mountConfiguration; + TargetNodeCommunicationMode = targetNodeCommunicationMode; + UpgradePolicy = upgradePolicy; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchPoolSpecification() + { + } + + /// The display name for the Pool. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. + public string DisplayName { get; set; } + /// The size of the virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). + public string VmSize { get; set; } + /// The virtual machine configuration for the Pool. This property must be specified if the Pool needs to be created with Azure IaaS VMs. If it is not specified then the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + public VirtualMachineConfiguration VirtualMachineConfiguration { get; set; } + /// The number of task slots that can be used to run concurrent tasks on a single compute node in the pool. The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of the pool or 256. + public int? TaskSlotsPerNode { get; set; } + /// How Tasks are distributed across Compute Nodes in a Pool. If not specified, the default is spread. + public BatchTaskSchedulingPolicy TaskSchedulingPolicy { get; set; } + /// The timeout for allocation of Compute Nodes to the Pool. This timeout applies only to manual scaling; it has no effect when enableAutoScale is set to true. The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service rejects the request with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + public TimeSpan? ResizeTimeout { get; set; } + /// The user-specified tags associated with the pool.The user-defined tags to be associated with the Azure Batch Pool. When specified, these tags are propagated to the backing Azure resources associated with the pool. This property can only be specified when the Batch account was created with the poolAllocationMode property set to 'UserSubscription'. + public string ResourceTags { get; set; } + /// The desired number of dedicated Compute Nodes in the Pool. This property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both. + public int? TargetDedicatedNodes { get; set; } + /// The desired number of Spot/Low-priority Compute Nodes in the Pool. This property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both. + public int? TargetLowPriorityNodes { get; set; } + /// Whether the Pool size should automatically adjust over time. If false, at least one of targetDedicatedNodes and targetLowPriorityNodes must be specified. If true, the autoScaleFormula element is required. The Pool automatically resizes according to the formula. The default value is false. + public bool? EnableAutoScale { get; set; } + /// The formula for the desired number of Compute Nodes in the Pool. This property must not be specified if enableAutoScale is set to false. It is required if enableAutoScale is set to true. The formula is checked for validity before the Pool is created. If the formula is not valid, the Batch service rejects the request with detailed error information. + public string AutoScaleFormula { get; set; } + /// The time interval at which to automatically adjust the Pool size according to the autoscale formula. The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service rejects the request with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + public TimeSpan? AutoScaleEvaluationInterval { get; set; } + /// Whether the Pool permits direct communication between Compute Nodes. Enabling inter-node communication limits the maximum size of the Pool due to deployment restrictions on the Compute Nodes of the Pool. This may result in the Pool not reaching its desired size. The default value is false. + public bool? EnableInterNodeCommunication { get; set; } + /// The network configuration for the Pool. + public NetworkConfiguration NetworkConfiguration { get; set; } + /// A Task to run on each Compute Node as it joins the Pool. The Task runs when the Compute Node is added to the Pool or when the Compute Node is restarted. + public BatchStartTask StartTask { get; set; } + /// The list of Packages to be installed on each Compute Node in the Pool. When creating a pool, the package's application ID must be fully qualified (/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}). Changes to Package references affect all new Nodes joining the Pool, but do not affect Compute Nodes that are already in the Pool until they are rebooted or reimaged. There is a maximum of 10 Package references on any given Pool. + public IList ApplicationPackageReferences { get; } + /// The list of user Accounts to be created on each Compute Node in the Pool. + public IList UserAccounts { get; } + /// A list of name-value pairs associated with the Pool as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. + public IList Metadata { get; } + /// A list of file systems to mount on each node in the pool. This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. + public IList MountConfiguration { get; } + /// The desired node communication mode for the pool. If omitted, the default value is Default. + public BatchNodeCommunicationMode? TargetNodeCommunicationMode { get; set; } + /// The upgrade policy for the Pool. Describes an upgrade policy - automatic, manual, or rolling. + public UpgradePolicy UpgradePolicy { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolState.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolState.cs new file mode 100644 index 0000000000000..b5d0cda8f3f7f --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolState.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.Compute.Batch +{ + /// BatchPoolState enums. + public readonly partial struct BatchPoolState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BatchPoolState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ActiveValue = "active"; + private const string DeletingValue = "deleting"; + + /// The Pool is available to run Tasks subject to the availability of Compute Nodes. + public static BatchPoolState Active { get; } = new BatchPoolState(ActiveValue); + /// The user has requested that the Pool be deleted, but the delete operation has not yet completed. + public static BatchPoolState Deleting { get; } = new BatchPoolState(DeletingValue); + /// Determines if two values are the same. + public static bool operator ==(BatchPoolState left, BatchPoolState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BatchPoolState left, BatchPoolState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator BatchPoolState(string value) => new BatchPoolState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BatchPoolState other && Equals(other); + /// + public bool Equals(BatchPoolState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolStatistics.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolStatistics.Serialization.cs new file mode 100644 index 0000000000000..8f3aaf2e74929 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolStatistics.Serialization.cs @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchPoolStatistics : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchPoolStatistics)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("url"u8); + writer.WriteStringValue(Url); + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartTime, "O"); + writer.WritePropertyName("lastUpdateTime"u8); + writer.WriteStringValue(LastUpdateTime, "O"); + if (Optional.IsDefined(UsageStats)) + { + writer.WritePropertyName("usageStats"u8); + writer.WriteObjectValue(UsageStats, options); + } + if (Optional.IsDefined(ResourceStats)) + { + writer.WritePropertyName("resourceStats"u8); + writer.WriteObjectValue(ResourceStats, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchPoolStatistics IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchPoolStatistics)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchPoolStatistics(document.RootElement, options); + } + + internal static BatchPoolStatistics DeserializeBatchPoolStatistics(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string url = default; + DateTimeOffset startTime = default; + DateTimeOffset lastUpdateTime = default; + BatchPoolUsageStatistics usageStats = default; + BatchPoolResourceStatistics resourceStats = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("url"u8)) + { + url = property.Value.GetString(); + continue; + } + if (property.NameEquals("startTime"u8)) + { + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdateTime"u8)) + { + lastUpdateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("usageStats"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + usageStats = BatchPoolUsageStatistics.DeserializeBatchPoolUsageStatistics(property.Value, options); + continue; + } + if (property.NameEquals("resourceStats"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceStats = BatchPoolResourceStatistics.DeserializeBatchPoolResourceStatistics(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchPoolStatistics( + url, + startTime, + lastUpdateTime, + usageStats, + resourceStats, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchPoolStatistics)} does not support writing '{options.Format}' format."); + } + } + + BatchPoolStatistics IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchPoolStatistics(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchPoolStatistics)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchPoolStatistics FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchPoolStatistics(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolStatistics.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolStatistics.cs new file mode 100644 index 0000000000000..ca9bdfab38e36 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolStatistics.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Contains utilization and resource usage statistics for the lifetime of a Pool. + public partial class BatchPoolStatistics + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The URL for the statistics. + /// The start time of the time range covered by the statistics. + /// The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime. + /// is null. + internal BatchPoolStatistics(string url, DateTimeOffset startTime, DateTimeOffset lastUpdateTime) + { + Argument.AssertNotNull(url, nameof(url)); + + Url = url; + StartTime = startTime; + LastUpdateTime = lastUpdateTime; + } + + /// Initializes a new instance of . + /// The URL for the statistics. + /// The start time of the time range covered by the statistics. + /// The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime. + /// Statistics related to Pool usage, such as the amount of core-time used. + /// Statistics related to resource consumption by Compute Nodes in the Pool. + /// Keeps track of any properties unknown to the library. + internal BatchPoolStatistics(string url, DateTimeOffset startTime, DateTimeOffset lastUpdateTime, BatchPoolUsageStatistics usageStats, BatchPoolResourceStatistics resourceStats, IDictionary serializedAdditionalRawData) + { + Url = url; + StartTime = startTime; + LastUpdateTime = lastUpdateTime; + UsageStats = usageStats; + ResourceStats = resourceStats; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchPoolStatistics() + { + } + + /// The URL for the statistics. + public string Url { get; } + /// The start time of the time range covered by the statistics. + public DateTimeOffset StartTime { get; } + /// The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime. + public DateTimeOffset LastUpdateTime { get; } + /// Statistics related to Pool usage, such as the amount of core-time used. + public BatchPoolUsageStatistics UsageStats { get; } + /// Statistics related to resource consumption by Compute Nodes in the Pool. + public BatchPoolResourceStatistics ResourceStats { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolUpdateContent.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolUpdateContent.Serialization.cs new file mode 100644 index 0000000000000..1bcfc367c703b --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolUpdateContent.Serialization.cs @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchPoolUpdateContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchPoolUpdateContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(StartTask)) + { + writer.WritePropertyName("startTask"u8); + writer.WriteObjectValue(StartTask, options); + } + if (Optional.IsCollectionDefined(ApplicationPackageReferences)) + { + writer.WritePropertyName("applicationPackageReferences"u8); + writer.WriteStartArray(); + foreach (var item in ApplicationPackageReferences) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); + writer.WriteStartArray(); + foreach (var item in Metadata) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(TargetNodeCommunicationMode)) + { + writer.WritePropertyName("targetNodeCommunicationMode"u8); + writer.WriteStringValue(TargetNodeCommunicationMode.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchPoolUpdateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchPoolUpdateContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchPoolUpdateContent(document.RootElement, options); + } + + internal static BatchPoolUpdateContent DeserializeBatchPoolUpdateContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BatchStartTask startTask = default; + IList applicationPackageReferences = default; + IList metadata = default; + BatchNodeCommunicationMode? targetNodeCommunicationMode = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("startTask"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTask = BatchStartTask.DeserializeBatchStartTask(property.Value, options); + continue; + } + if (property.NameEquals("applicationPackageReferences"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BatchApplicationPackageReference.DeserializeBatchApplicationPackageReference(item, options)); + } + applicationPackageReferences = array; + continue; + } + if (property.NameEquals("metadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MetadataItem.DeserializeMetadataItem(item, options)); + } + metadata = array; + continue; + } + if (property.NameEquals("targetNodeCommunicationMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetNodeCommunicationMode = new BatchNodeCommunicationMode(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchPoolUpdateContent(startTask, applicationPackageReferences ?? new ChangeTrackingList(), metadata ?? new ChangeTrackingList(), targetNodeCommunicationMode, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchPoolUpdateContent)} does not support writing '{options.Format}' format."); + } + } + + BatchPoolUpdateContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchPoolUpdateContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchPoolUpdateContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchPoolUpdateContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchPoolUpdateContent(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolUpdateContent.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolUpdateContent.cs new file mode 100644 index 0000000000000..1300eb052c5c8 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolUpdateContent.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Parameters for updating an Azure Batch Pool. + public partial class BatchPoolUpdateContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public BatchPoolUpdateContent() + { + ApplicationPackageReferences = new ChangeTrackingList(); + Metadata = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// A Task to run on each Compute Node as it joins the Pool. The Task runs when the Compute Node is added to the Pool or when the Compute Node is restarted. If this element is present, it overwrites any existing StartTask. If omitted, any existing StartTask is left unchanged. + /// A list of Packages to be installed on each Compute Node in the Pool. Changes to Package references affect all new Nodes joining the Pool, but do not affect Compute Nodes that are already in the Pool until they are rebooted or reimaged. If this element is present, it replaces any existing Package references. If you specify an empty collection, then all Package references are removed from the Pool. If omitted, any existing Package references are left unchanged. + /// A list of name-value pairs associated with the Pool as metadata. If this element is present, it replaces any existing metadata configured on the Pool. If you specify an empty collection, any metadata is removed from the Pool. If omitted, any existing metadata is left unchanged. + /// The desired node communication mode for the pool. If this element is present, it replaces the existing targetNodeCommunicationMode configured on the Pool. If omitted, any existing metadata is left unchanged. + /// Keeps track of any properties unknown to the library. + internal BatchPoolUpdateContent(BatchStartTask startTask, IList applicationPackageReferences, IList metadata, BatchNodeCommunicationMode? targetNodeCommunicationMode, IDictionary serializedAdditionalRawData) + { + StartTask = startTask; + ApplicationPackageReferences = applicationPackageReferences; + Metadata = metadata; + TargetNodeCommunicationMode = targetNodeCommunicationMode; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// A Task to run on each Compute Node as it joins the Pool. The Task runs when the Compute Node is added to the Pool or when the Compute Node is restarted. If this element is present, it overwrites any existing StartTask. If omitted, any existing StartTask is left unchanged. + public BatchStartTask StartTask { get; set; } + /// A list of Packages to be installed on each Compute Node in the Pool. Changes to Package references affect all new Nodes joining the Pool, but do not affect Compute Nodes that are already in the Pool until they are rebooted or reimaged. If this element is present, it replaces any existing Package references. If you specify an empty collection, then all Package references are removed from the Pool. If omitted, any existing Package references are left unchanged. + public IList ApplicationPackageReferences { get; } + /// A list of name-value pairs associated with the Pool as metadata. If this element is present, it replaces any existing metadata configured on the Pool. If you specify an empty collection, any metadata is removed from the Pool. If omitted, any existing metadata is left unchanged. + public IList Metadata { get; } + /// The desired node communication mode for the pool. If this element is present, it replaces the existing targetNodeCommunicationMode configured on the Pool. If omitted, any existing metadata is left unchanged. + public BatchNodeCommunicationMode? TargetNodeCommunicationMode { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolUsageMetrics.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolUsageMetrics.Serialization.cs new file mode 100644 index 0000000000000..baa7f92a088de --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolUsageMetrics.Serialization.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchPoolUsageMetrics : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchPoolUsageMetrics)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("poolId"u8); + writer.WriteStringValue(PoolId); + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartTime, "O"); + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndTime, "O"); + writer.WritePropertyName("vmSize"u8); + writer.WriteStringValue(VmSize); + writer.WritePropertyName("totalCoreHours"u8); + writer.WriteNumberValue(TotalCoreHours); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchPoolUsageMetrics IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchPoolUsageMetrics)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchPoolUsageMetrics(document.RootElement, options); + } + + internal static BatchPoolUsageMetrics DeserializeBatchPoolUsageMetrics(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string poolId = default; + DateTimeOffset startTime = default; + DateTimeOffset endTime = default; + string vmSize = default; + float totalCoreHours = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("poolId"u8)) + { + poolId = property.Value.GetString(); + continue; + } + if (property.NameEquals("startTime"u8)) + { + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("vmSize"u8)) + { + vmSize = property.Value.GetString(); + continue; + } + if (property.NameEquals("totalCoreHours"u8)) + { + totalCoreHours = property.Value.GetSingle(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchPoolUsageMetrics( + poolId, + startTime, + endTime, + vmSize, + totalCoreHours, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchPoolUsageMetrics)} does not support writing '{options.Format}' format."); + } + } + + BatchPoolUsageMetrics IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchPoolUsageMetrics(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchPoolUsageMetrics)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchPoolUsageMetrics FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchPoolUsageMetrics(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolUsageMetrics.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolUsageMetrics.cs new file mode 100644 index 0000000000000..c28463c079071 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolUsageMetrics.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Usage metrics for a Pool across an aggregation interval. + public partial class BatchPoolUsageMetrics + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The ID of the Pool whose metrics are aggregated in this entry. + /// The start time of the aggregation interval covered by this entry. + /// The end time of the aggregation interval covered by this entry. + /// The size of virtual machines in the Pool. All VMs in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). + /// The total core hours used in the Pool during this aggregation interval. + /// or is null. + internal BatchPoolUsageMetrics(string poolId, DateTimeOffset startTime, DateTimeOffset endTime, string vmSize, float totalCoreHours) + { + Argument.AssertNotNull(poolId, nameof(poolId)); + Argument.AssertNotNull(vmSize, nameof(vmSize)); + + PoolId = poolId; + StartTime = startTime; + EndTime = endTime; + VmSize = vmSize; + TotalCoreHours = totalCoreHours; + } + + /// Initializes a new instance of . + /// The ID of the Pool whose metrics are aggregated in this entry. + /// The start time of the aggregation interval covered by this entry. + /// The end time of the aggregation interval covered by this entry. + /// The size of virtual machines in the Pool. All VMs in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). + /// The total core hours used in the Pool during this aggregation interval. + /// Keeps track of any properties unknown to the library. + internal BatchPoolUsageMetrics(string poolId, DateTimeOffset startTime, DateTimeOffset endTime, string vmSize, float totalCoreHours, IDictionary serializedAdditionalRawData) + { + PoolId = poolId; + StartTime = startTime; + EndTime = endTime; + VmSize = vmSize; + TotalCoreHours = totalCoreHours; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchPoolUsageMetrics() + { + } + + /// The ID of the Pool whose metrics are aggregated in this entry. + public string PoolId { get; } + /// The start time of the aggregation interval covered by this entry. + public DateTimeOffset StartTime { get; } + /// The end time of the aggregation interval covered by this entry. + public DateTimeOffset EndTime { get; } + /// The size of virtual machines in the Pool. All VMs in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). + public string VmSize { get; } + /// The total core hours used in the Pool during this aggregation interval. + public float TotalCoreHours { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolUsageStatistics.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolUsageStatistics.Serialization.cs new file mode 100644 index 0000000000000..3643fcc75cebf --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolUsageStatistics.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchPoolUsageStatistics : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchPoolUsageStatistics)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartTime, "O"); + writer.WritePropertyName("lastUpdateTime"u8); + writer.WriteStringValue(LastUpdateTime, "O"); + writer.WritePropertyName("dedicatedCoreTime"u8); + writer.WriteStringValue(DedicatedCoreTime, "P"); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchPoolUsageStatistics IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchPoolUsageStatistics)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchPoolUsageStatistics(document.RootElement, options); + } + + internal static BatchPoolUsageStatistics DeserializeBatchPoolUsageStatistics(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset startTime = default; + DateTimeOffset lastUpdateTime = default; + TimeSpan dedicatedCoreTime = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("startTime"u8)) + { + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdateTime"u8)) + { + lastUpdateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("dedicatedCoreTime"u8)) + { + dedicatedCoreTime = property.Value.GetTimeSpan("P"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchPoolUsageStatistics(startTime, lastUpdateTime, dedicatedCoreTime, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchPoolUsageStatistics)} does not support writing '{options.Format}' format."); + } + } + + BatchPoolUsageStatistics IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchPoolUsageStatistics(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchPoolUsageStatistics)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchPoolUsageStatistics FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchPoolUsageStatistics(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolUsageStatistics.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolUsageStatistics.cs new file mode 100644 index 0000000000000..7912c9f525105 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchPoolUsageStatistics.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; + +namespace Azure.Compute.Batch +{ + /// Statistics related to Pool usage information. + public partial class BatchPoolUsageStatistics + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The start time of the time range covered by the statistics. + /// The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime. + /// The aggregated wall-clock time of the dedicated Compute Node cores being part of the Pool. + internal BatchPoolUsageStatistics(DateTimeOffset startTime, DateTimeOffset lastUpdateTime, TimeSpan dedicatedCoreTime) + { + StartTime = startTime; + LastUpdateTime = lastUpdateTime; + DedicatedCoreTime = dedicatedCoreTime; + } + + /// Initializes a new instance of . + /// The start time of the time range covered by the statistics. + /// The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime. + /// The aggregated wall-clock time of the dedicated Compute Node cores being part of the Pool. + /// Keeps track of any properties unknown to the library. + internal BatchPoolUsageStatistics(DateTimeOffset startTime, DateTimeOffset lastUpdateTime, TimeSpan dedicatedCoreTime, IDictionary serializedAdditionalRawData) + { + StartTime = startTime; + LastUpdateTime = lastUpdateTime; + DedicatedCoreTime = dedicatedCoreTime; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchPoolUsageStatistics() + { + } + + /// The start time of the time range covered by the statistics. + public DateTimeOffset StartTime { get; } + /// The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime. + public DateTimeOffset LastUpdateTime { get; } + /// The aggregated wall-clock time of the dedicated Compute Node cores being part of the Pool. + public TimeSpan DedicatedCoreTime { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchStartTask.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchStartTask.Serialization.cs new file mode 100644 index 0000000000000..d2d681b9cd1df --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchStartTask.Serialization.cs @@ -0,0 +1,253 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchStartTask : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchStartTask)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("commandLine"u8); + writer.WriteStringValue(CommandLine); + if (Optional.IsDefined(ContainerSettings)) + { + writer.WritePropertyName("containerSettings"u8); + writer.WriteObjectValue(ContainerSettings, options); + } + if (Optional.IsCollectionDefined(ResourceFiles)) + { + writer.WritePropertyName("resourceFiles"u8); + writer.WriteStartArray(); + foreach (var item in ResourceFiles) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(EnvironmentSettings)) + { + writer.WritePropertyName("environmentSettings"u8); + writer.WriteStartArray(); + foreach (var item in EnvironmentSettings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(UserIdentity)) + { + writer.WritePropertyName("userIdentity"u8); + writer.WriteObjectValue(UserIdentity, options); + } + if (Optional.IsDefined(MaxTaskRetryCount)) + { + writer.WritePropertyName("maxTaskRetryCount"u8); + writer.WriteNumberValue(MaxTaskRetryCount.Value); + } + if (Optional.IsDefined(WaitForSuccess)) + { + writer.WritePropertyName("waitForSuccess"u8); + writer.WriteBooleanValue(WaitForSuccess.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchStartTask IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchStartTask)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchStartTask(document.RootElement, options); + } + + internal static BatchStartTask DeserializeBatchStartTask(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string commandLine = default; + BatchTaskContainerSettings containerSettings = default; + IList resourceFiles = default; + IList environmentSettings = default; + UserIdentity userIdentity = default; + int? maxTaskRetryCount = default; + bool? waitForSuccess = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("commandLine"u8)) + { + commandLine = property.Value.GetString(); + continue; + } + if (property.NameEquals("containerSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + containerSettings = BatchTaskContainerSettings.DeserializeBatchTaskContainerSettings(property.Value, options); + continue; + } + if (property.NameEquals("resourceFiles"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceFile.DeserializeResourceFile(item, options)); + } + resourceFiles = array; + continue; + } + if (property.NameEquals("environmentSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EnvironmentSetting.DeserializeEnvironmentSetting(item, options)); + } + environmentSettings = array; + continue; + } + if (property.NameEquals("userIdentity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userIdentity = UserIdentity.DeserializeUserIdentity(property.Value, options); + continue; + } + if (property.NameEquals("maxTaskRetryCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxTaskRetryCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("waitForSuccess"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + waitForSuccess = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchStartTask( + commandLine, + containerSettings, + resourceFiles ?? new ChangeTrackingList(), + environmentSettings ?? new ChangeTrackingList(), + userIdentity, + maxTaskRetryCount, + waitForSuccess, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchStartTask)} does not support writing '{options.Format}' format."); + } + } + + BatchStartTask IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchStartTask(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchStartTask)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchStartTask FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchStartTask(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchStartTask.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchStartTask.cs new file mode 100644 index 0000000000000..d83549ff06989 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchStartTask.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// + /// Batch will retry Tasks when a recovery operation is triggered on a Node. + /// Examples of recovery operations include (but are not limited to) when an + /// unhealthy Node is rebooted or a Compute Node disappeared due to host failure. + /// Retries due to recovery operations are independent of and are not counted + /// against the maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an internal + /// retry due to a recovery operation may occur. Because of this, all Tasks should + /// be idempotent. This means Tasks need to tolerate being interrupted and + /// restarted without causing any corruption or duplicate data. The best practice + /// for long running Tasks is to use some form of checkpointing. In some cases the + /// StartTask may be re-run even though the Compute Node was not rebooted. Special + /// care should be taken to avoid StartTasks which create breakaway process or + /// install/launch services from the StartTask working directory, as this will + /// block Batch from being able to re-run the StartTask. + /// + public partial class BatchStartTask + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The command line of the StartTask. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + /// is null. + public BatchStartTask(string commandLine) + { + Argument.AssertNotNull(commandLine, nameof(commandLine)); + + CommandLine = commandLine; + ResourceFiles = new ChangeTrackingList(); + EnvironmentSettings = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The command line of the StartTask. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + /// The settings for the container under which the StartTask runs. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. + /// A list of files that the Batch service will download to the Compute Node before running the command line. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. Files listed under this element are located in the Task's working directory. + /// A list of environment variable settings for the StartTask. + /// The user identity under which the StartTask runs. If omitted, the Task runs as a non-administrative user unique to the Task. + /// The maximum number of times the Task may be retried. The Batch service retries a Task if its exit code is nonzero. Note that this value specifically controls the number of retries. The Batch service will try the Task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries the Task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry the Task. If the maximum retry count is -1, the Batch service retries the Task without limit, however this is not recommended for a start task or any task. The default value is 0 (no retries). + /// Whether the Batch service should wait for the StartTask to complete successfully (that is, to exit with exit code 0) before scheduling any Tasks on the Compute Node. If true and the StartTask fails on a Node, the Batch service retries the StartTask up to its maximum retry count (maxTaskRetryCount). If the Task has still not completed successfully after all retries, then the Batch service marks the Node unusable, and will not schedule Tasks to it. This condition can be detected via the Compute Node state and failure info details. If false, the Batch service will not wait for the StartTask to complete. In this case, other Tasks can start executing on the Compute Node while the StartTask is still running; and even if the StartTask fails, new Tasks will continue to be scheduled on the Compute Node. The default is true. + /// Keeps track of any properties unknown to the library. + internal BatchStartTask(string commandLine, BatchTaskContainerSettings containerSettings, IList resourceFiles, IList environmentSettings, UserIdentity userIdentity, int? maxTaskRetryCount, bool? waitForSuccess, IDictionary serializedAdditionalRawData) + { + CommandLine = commandLine; + ContainerSettings = containerSettings; + ResourceFiles = resourceFiles; + EnvironmentSettings = environmentSettings; + UserIdentity = userIdentity; + MaxTaskRetryCount = maxTaskRetryCount; + WaitForSuccess = waitForSuccess; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchStartTask() + { + } + + /// The command line of the StartTask. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + public string CommandLine { get; set; } + /// The settings for the container under which the StartTask runs. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. + public BatchTaskContainerSettings ContainerSettings { get; set; } + /// A list of files that the Batch service will download to the Compute Node before running the command line. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. Files listed under this element are located in the Task's working directory. + public IList ResourceFiles { get; } + /// A list of environment variable settings for the StartTask. + public IList EnvironmentSettings { get; } + /// The user identity under which the StartTask runs. If omitted, the Task runs as a non-administrative user unique to the Task. + public UserIdentity UserIdentity { get; set; } + /// The maximum number of times the Task may be retried. The Batch service retries a Task if its exit code is nonzero. Note that this value specifically controls the number of retries. The Batch service will try the Task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries the Task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry the Task. If the maximum retry count is -1, the Batch service retries the Task without limit, however this is not recommended for a start task or any task. The default value is 0 (no retries). + public int? MaxTaskRetryCount { get; set; } + /// Whether the Batch service should wait for the StartTask to complete successfully (that is, to exit with exit code 0) before scheduling any Tasks on the Compute Node. If true and the StartTask fails on a Node, the Batch service retries the StartTask up to its maximum retry count (maxTaskRetryCount). If the Task has still not completed successfully after all retries, then the Batch service marks the Node unusable, and will not schedule Tasks to it. This condition can be detected via the Compute Node state and failure info details. If false, the Batch service will not wait for the StartTask to complete. In this case, other Tasks can start executing on the Compute Node while the StartTask is still running; and even if the StartTask fails, new Tasks will continue to be scheduled on the Compute Node. The default is true. + public bool? WaitForSuccess { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchStartTaskInfo.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchStartTaskInfo.Serialization.cs new file mode 100644 index 0000000000000..6f0dd8e100dfc --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchStartTaskInfo.Serialization.cs @@ -0,0 +1,251 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchStartTaskInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchStartTaskInfo)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.ToString()); + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartTime, "O"); + if (Optional.IsDefined(EndTime)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndTime.Value, "O"); + } + if (Optional.IsDefined(ExitCode)) + { + writer.WritePropertyName("exitCode"u8); + writer.WriteNumberValue(ExitCode.Value); + } + if (Optional.IsDefined(ContainerInfo)) + { + writer.WritePropertyName("containerInfo"u8); + writer.WriteObjectValue(ContainerInfo, options); + } + if (Optional.IsDefined(FailureInfo)) + { + writer.WritePropertyName("failureInfo"u8); + writer.WriteObjectValue(FailureInfo, options); + } + writer.WritePropertyName("retryCount"u8); + writer.WriteNumberValue(RetryCount); + if (Optional.IsDefined(LastRetryTime)) + { + writer.WritePropertyName("lastRetryTime"u8); + writer.WriteStringValue(LastRetryTime.Value, "O"); + } + if (Optional.IsDefined(Result)) + { + writer.WritePropertyName("result"u8); + writer.WriteStringValue(Result.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchStartTaskInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchStartTaskInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchStartTaskInfo(document.RootElement, options); + } + + internal static BatchStartTaskInfo DeserializeBatchStartTaskInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BatchStartTaskState state = default; + DateTimeOffset startTime = default; + DateTimeOffset? endTime = default; + int? exitCode = default; + BatchTaskContainerExecutionInfo containerInfo = default; + BatchTaskFailureInfo failureInfo = default; + int retryCount = default; + DateTimeOffset? lastRetryTime = default; + BatchTaskExecutionResult? result = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("state"u8)) + { + state = new BatchStartTaskState(property.Value.GetString()); + continue; + } + if (property.NameEquals("startTime"u8)) + { + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("exitCode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + exitCode = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("containerInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + containerInfo = BatchTaskContainerExecutionInfo.DeserializeBatchTaskContainerExecutionInfo(property.Value, options); + continue; + } + if (property.NameEquals("failureInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + failureInfo = BatchTaskFailureInfo.DeserializeBatchTaskFailureInfo(property.Value, options); + continue; + } + if (property.NameEquals("retryCount"u8)) + { + retryCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("lastRetryTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastRetryTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("result"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + result = new BatchTaskExecutionResult(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchStartTaskInfo( + state, + startTime, + endTime, + exitCode, + containerInfo, + failureInfo, + retryCount, + lastRetryTime, + result, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchStartTaskInfo)} does not support writing '{options.Format}' format."); + } + } + + BatchStartTaskInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchStartTaskInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchStartTaskInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchStartTaskInfo FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchStartTaskInfo(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchStartTaskInfo.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchStartTaskInfo.cs new file mode 100644 index 0000000000000..d364c0c8160f7 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchStartTaskInfo.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Information about a StartTask running on a Compute Node. + public partial class BatchStartTaskInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The state of the StartTask on the Compute Node. + /// The time at which the StartTask started running. This value is reset every time the Task is restarted or retried (that is, this is the most recent time at which the StartTask started running). + /// The number of times the Task has been retried by the Batch service. Task application failures (non-zero exit code) are retried, pre-processing errors (the Task could not be run) and file upload errors are not retried. The Batch service will retry the Task up to the limit specified by the constraints. + internal BatchStartTaskInfo(BatchStartTaskState state, DateTimeOffset startTime, int retryCount) + { + State = state; + StartTime = startTime; + RetryCount = retryCount; + } + + /// Initializes a new instance of . + /// The state of the StartTask on the Compute Node. + /// The time at which the StartTask started running. This value is reset every time the Task is restarted or retried (that is, this is the most recent time at which the StartTask started running). + /// The time at which the StartTask stopped running. This is the end time of the most recent run of the StartTask, if that run has completed (even if that run failed and a retry is pending). This element is not present if the StartTask is currently running. + /// The exit code of the program specified on the StartTask command line. This property is set only if the StartTask is in the completed state. In general, the exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. However, if the Batch service terminates the StartTask (due to timeout, or user termination via the API) you may see an operating system-defined exit code. + /// Information about the container under which the Task is executing. This property is set only if the Task runs in a container context. + /// Information describing the Task failure, if any. This property is set only if the Task is in the completed state and encountered a failure. + /// The number of times the Task has been retried by the Batch service. Task application failures (non-zero exit code) are retried, pre-processing errors (the Task could not be run) and file upload errors are not retried. The Batch service will retry the Task up to the limit specified by the constraints. + /// The most recent time at which a retry of the Task started running. This element is present only if the Task was retried (i.e. retryCount is nonzero). If present, this is typically the same as startTime, but may be different if the Task has been restarted for reasons other than retry; for example, if the Compute Node was rebooted during a retry, then the startTime is updated but the lastRetryTime is not. + /// The result of the Task execution. If the value is 'failed', then the details of the failure can be found in the failureInfo property. + /// Keeps track of any properties unknown to the library. + internal BatchStartTaskInfo(BatchStartTaskState state, DateTimeOffset startTime, DateTimeOffset? endTime, int? exitCode, BatchTaskContainerExecutionInfo containerInfo, BatchTaskFailureInfo failureInfo, int retryCount, DateTimeOffset? lastRetryTime, BatchTaskExecutionResult? result, IDictionary serializedAdditionalRawData) + { + State = state; + StartTime = startTime; + EndTime = endTime; + ExitCode = exitCode; + ContainerInfo = containerInfo; + FailureInfo = failureInfo; + RetryCount = retryCount; + LastRetryTime = lastRetryTime; + Result = result; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchStartTaskInfo() + { + } + + /// The state of the StartTask on the Compute Node. + public BatchStartTaskState State { get; } + /// The time at which the StartTask started running. This value is reset every time the Task is restarted or retried (that is, this is the most recent time at which the StartTask started running). + public DateTimeOffset StartTime { get; } + /// The time at which the StartTask stopped running. This is the end time of the most recent run of the StartTask, if that run has completed (even if that run failed and a retry is pending). This element is not present if the StartTask is currently running. + public DateTimeOffset? EndTime { get; } + /// The exit code of the program specified on the StartTask command line. This property is set only if the StartTask is in the completed state. In general, the exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. However, if the Batch service terminates the StartTask (due to timeout, or user termination via the API) you may see an operating system-defined exit code. + public int? ExitCode { get; } + /// Information about the container under which the Task is executing. This property is set only if the Task runs in a container context. + public BatchTaskContainerExecutionInfo ContainerInfo { get; } + /// Information describing the Task failure, if any. This property is set only if the Task is in the completed state and encountered a failure. + public BatchTaskFailureInfo FailureInfo { get; } + /// The number of times the Task has been retried by the Batch service. Task application failures (non-zero exit code) are retried, pre-processing errors (the Task could not be run) and file upload errors are not retried. The Batch service will retry the Task up to the limit specified by the constraints. + public int RetryCount { get; } + /// The most recent time at which a retry of the Task started running. This element is present only if the Task was retried (i.e. retryCount is nonzero). If present, this is typically the same as startTime, but may be different if the Task has been restarted for reasons other than retry; for example, if the Compute Node was rebooted during a retry, then the startTime is updated but the lastRetryTime is not. + public DateTimeOffset? LastRetryTime { get; } + /// The result of the Task execution. If the value is 'failed', then the details of the failure can be found in the failureInfo property. + public BatchTaskExecutionResult? Result { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchStartTaskState.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchStartTaskState.cs new file mode 100644 index 0000000000000..7c53725b5905f --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchStartTaskState.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.Compute.Batch +{ + /// BatchStartTaskState enums. + public readonly partial struct BatchStartTaskState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BatchStartTaskState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string RunningValue = "running"; + private const string CompletedValue = "completed"; + + /// The StartTask is currently running. + public static BatchStartTaskState Running { get; } = new BatchStartTaskState(RunningValue); + /// The StartTask has exited with exit code 0, or the StartTask has failed and the retry limit has reached, or the StartTask process did not run due to Task preparation errors (such as resource file download failures). + public static BatchStartTaskState Completed { get; } = new BatchStartTaskState(CompletedValue); + /// Determines if two values are the same. + public static bool operator ==(BatchStartTaskState left, BatchStartTaskState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BatchStartTaskState left, BatchStartTaskState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator BatchStartTaskState(string value) => new BatchStartTaskState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BatchStartTaskState other && Equals(other); + /// + public bool Equals(BatchStartTaskState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchSubtask.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchSubtask.Serialization.cs new file mode 100644 index 0000000000000..a5fc546e0d6b1 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchSubtask.Serialization.cs @@ -0,0 +1,320 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchSubtask : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchSubtask)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteNumberValue(Id.Value); + } + if (Optional.IsDefined(NodeInfo)) + { + writer.WritePropertyName("nodeInfo"u8); + writer.WriteObjectValue(NodeInfo, options); + } + if (Optional.IsDefined(StartTime)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartTime.Value, "O"); + } + if (Optional.IsDefined(EndTime)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndTime.Value, "O"); + } + if (Optional.IsDefined(ExitCode)) + { + writer.WritePropertyName("exitCode"u8); + writer.WriteNumberValue(ExitCode.Value); + } + if (Optional.IsDefined(ContainerInfo)) + { + writer.WritePropertyName("containerInfo"u8); + writer.WriteObjectValue(ContainerInfo, options); + } + if (Optional.IsDefined(FailureInfo)) + { + writer.WritePropertyName("failureInfo"u8); + writer.WriteObjectValue(FailureInfo, options); + } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (Optional.IsDefined(StateTransitionTime)) + { + writer.WritePropertyName("stateTransitionTime"u8); + writer.WriteStringValue(StateTransitionTime.Value, "O"); + } + if (Optional.IsDefined(PreviousState)) + { + writer.WritePropertyName("previousState"u8); + writer.WriteStringValue(PreviousState.Value.ToString()); + } + if (Optional.IsDefined(PreviousStateTransitionTime)) + { + writer.WritePropertyName("previousStateTransitionTime"u8); + writer.WriteStringValue(PreviousStateTransitionTime.Value, "O"); + } + if (Optional.IsDefined(Result)) + { + writer.WritePropertyName("result"u8); + writer.WriteStringValue(Result.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchSubtask IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchSubtask)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchSubtask(document.RootElement, options); + } + + internal static BatchSubtask DeserializeBatchSubtask(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? id = default; + BatchNodeInfo nodeInfo = default; + DateTimeOffset? startTime = default; + DateTimeOffset? endTime = default; + int? exitCode = default; + BatchTaskContainerExecutionInfo containerInfo = default; + BatchTaskFailureInfo failureInfo = default; + BatchSubtaskState? state = default; + DateTimeOffset? stateTransitionTime = default; + BatchSubtaskState? previousState = default; + DateTimeOffset? previousStateTransitionTime = default; + BatchTaskExecutionResult? result = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("nodeInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nodeInfo = BatchNodeInfo.DeserializeBatchNodeInfo(property.Value, options); + continue; + } + if (property.NameEquals("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("exitCode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + exitCode = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("containerInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + containerInfo = BatchTaskContainerExecutionInfo.DeserializeBatchTaskContainerExecutionInfo(property.Value, options); + continue; + } + if (property.NameEquals("failureInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + failureInfo = BatchTaskFailureInfo.DeserializeBatchTaskFailureInfo(property.Value, options); + continue; + } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new BatchSubtaskState(property.Value.GetString()); + continue; + } + if (property.NameEquals("stateTransitionTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + stateTransitionTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("previousState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + previousState = new BatchSubtaskState(property.Value.GetString()); + continue; + } + if (property.NameEquals("previousStateTransitionTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + previousStateTransitionTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("result"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + result = new BatchTaskExecutionResult(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchSubtask( + id, + nodeInfo, + startTime, + endTime, + exitCode, + containerInfo, + failureInfo, + state, + stateTransitionTime, + previousState, + previousStateTransitionTime, + result, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchSubtask)} does not support writing '{options.Format}' format."); + } + } + + BatchSubtask IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchSubtask(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchSubtask)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchSubtask FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchSubtask(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchSubtask.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchSubtask.cs new file mode 100644 index 0000000000000..39c971bd37fbf --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchSubtask.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Information about an Azure Batch subtask. + public partial class BatchSubtask + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal BatchSubtask() + { + } + + /// Initializes a new instance of . + /// The ID of the subtask. + /// Information about the Compute Node on which the subtask ran. + /// The time at which the subtask started running. If the subtask has been restarted or retried, this is the most recent time at which the subtask started running. + /// The time at which the subtask completed. This property is set only if the subtask is in the Completed state. + /// The exit code of the program specified on the subtask command line. This property is set only if the subtask is in the completed state. In general, the exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. However, if the Batch service terminates the subtask (due to timeout, or user termination via the API) you may see an operating system-defined exit code. + /// Information about the container under which the Task is executing. This property is set only if the Task runs in a container context. + /// Information describing the Task failure, if any. This property is set only if the Task is in the completed state and encountered a failure. + /// The current state of the subtask. + /// The time at which the subtask entered its current state. + /// The previous state of the subtask. This property is not set if the subtask is in its initial running state. + /// The time at which the subtask entered its previous state. This property is not set if the subtask is in its initial running state. + /// The result of the Task execution. If the value is 'failed', then the details of the failure can be found in the failureInfo property. + /// Keeps track of any properties unknown to the library. + internal BatchSubtask(int? id, BatchNodeInfo nodeInfo, DateTimeOffset? startTime, DateTimeOffset? endTime, int? exitCode, BatchTaskContainerExecutionInfo containerInfo, BatchTaskFailureInfo failureInfo, BatchSubtaskState? state, DateTimeOffset? stateTransitionTime, BatchSubtaskState? previousState, DateTimeOffset? previousStateTransitionTime, BatchTaskExecutionResult? result, IDictionary serializedAdditionalRawData) + { + Id = id; + NodeInfo = nodeInfo; + StartTime = startTime; + EndTime = endTime; + ExitCode = exitCode; + ContainerInfo = containerInfo; + FailureInfo = failureInfo; + State = state; + StateTransitionTime = stateTransitionTime; + PreviousState = previousState; + PreviousStateTransitionTime = previousStateTransitionTime; + Result = result; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The ID of the subtask. + public int? Id { get; } + /// Information about the Compute Node on which the subtask ran. + public BatchNodeInfo NodeInfo { get; } + /// The time at which the subtask started running. If the subtask has been restarted or retried, this is the most recent time at which the subtask started running. + public DateTimeOffset? StartTime { get; } + /// The time at which the subtask completed. This property is set only if the subtask is in the Completed state. + public DateTimeOffset? EndTime { get; } + /// The exit code of the program specified on the subtask command line. This property is set only if the subtask is in the completed state. In general, the exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. However, if the Batch service terminates the subtask (due to timeout, or user termination via the API) you may see an operating system-defined exit code. + public int? ExitCode { get; } + /// Information about the container under which the Task is executing. This property is set only if the Task runs in a container context. + public BatchTaskContainerExecutionInfo ContainerInfo { get; } + /// Information describing the Task failure, if any. This property is set only if the Task is in the completed state and encountered a failure. + public BatchTaskFailureInfo FailureInfo { get; } + /// The current state of the subtask. + public BatchSubtaskState? State { get; } + /// The time at which the subtask entered its current state. + public DateTimeOffset? StateTransitionTime { get; } + /// The previous state of the subtask. This property is not set if the subtask is in its initial running state. + public BatchSubtaskState? PreviousState { get; } + /// The time at which the subtask entered its previous state. This property is not set if the subtask is in its initial running state. + public DateTimeOffset? PreviousStateTransitionTime { get; } + /// The result of the Task execution. If the value is 'failed', then the details of the failure can be found in the failureInfo property. + public BatchTaskExecutionResult? Result { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchSubtaskState.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchSubtaskState.cs new file mode 100644 index 0000000000000..5a0860a02c8ee --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchSubtaskState.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.Compute.Batch +{ + /// BatchSubtaskState enums. + public readonly partial struct BatchSubtaskState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BatchSubtaskState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PreparingValue = "preparing"; + private const string RunningValue = "running"; + private const string CompletedValue = "completed"; + + /// The Task has been assigned to a Compute Node, but is waiting for a required Job Preparation Task to complete on the Compute Node. If the Job Preparation Task succeeds, the Task will move to running. If the Job Preparation Task fails, the Task will return to active and will be eligible to be assigned to a different Compute Node. + public static BatchSubtaskState Preparing { get; } = new BatchSubtaskState(PreparingValue); + /// The Task is running on a Compute Node. This includes task-level preparation such as downloading resource files or deploying Packages specified on the Task - it does not necessarily mean that the Task command line has started executing. + public static BatchSubtaskState Running { get; } = new BatchSubtaskState(RunningValue); + /// The Task is no longer eligible to run, usually because the Task has finished successfully, or the Task has finished unsuccessfully and has exhausted its retry limit. A Task is also marked as completed if an error occurred launching the Task, or when the Task has been terminated. + public static BatchSubtaskState Completed { get; } = new BatchSubtaskState(CompletedValue); + /// Determines if two values are the same. + public static bool operator ==(BatchSubtaskState left, BatchSubtaskState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BatchSubtaskState left, BatchSubtaskState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator BatchSubtaskState(string value) => new BatchSubtaskState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BatchSubtaskState other && Equals(other); + /// + public bool Equals(BatchSubtaskState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchSupportedImage.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchSupportedImage.Serialization.cs new file mode 100644 index 0000000000000..18ce9f3f0a497 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchSupportedImage.Serialization.cs @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchSupportedImage : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchSupportedImage)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("nodeAgentSKUId"u8); + writer.WriteStringValue(NodeAgentSkuId); + writer.WritePropertyName("imageReference"u8); + writer.WriteObjectValue(ImageReference, options); + writer.WritePropertyName("osType"u8); + writer.WriteStringValue(OsType.ToString()); + if (Optional.IsCollectionDefined(Capabilities)) + { + writer.WritePropertyName("capabilities"u8); + writer.WriteStartArray(); + foreach (var item in Capabilities) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(BatchSupportEndOfLife)) + { + writer.WritePropertyName("batchSupportEndOfLife"u8); + writer.WriteStringValue(BatchSupportEndOfLife.Value, "O"); + } + writer.WritePropertyName("verificationType"u8); + writer.WriteStringValue(VerificationType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchSupportedImage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchSupportedImage)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchSupportedImage(document.RootElement, options); + } + + internal static BatchSupportedImage DeserializeBatchSupportedImage(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string nodeAgentSKUId = default; + ImageReference imageReference = default; + OSType osType = default; + IReadOnlyList capabilities = default; + DateTimeOffset? batchSupportEndOfLife = default; + ImageVerificationType verificationType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nodeAgentSKUId"u8)) + { + nodeAgentSKUId = property.Value.GetString(); + continue; + } + if (property.NameEquals("imageReference"u8)) + { + imageReference = ImageReference.DeserializeImageReference(property.Value, options); + continue; + } + if (property.NameEquals("osType"u8)) + { + osType = new OSType(property.Value.GetString()); + continue; + } + if (property.NameEquals("capabilities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + capabilities = array; + continue; + } + if (property.NameEquals("batchSupportEndOfLife"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + batchSupportEndOfLife = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("verificationType"u8)) + { + verificationType = new ImageVerificationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchSupportedImage( + nodeAgentSKUId, + imageReference, + osType, + capabilities ?? new ChangeTrackingList(), + batchSupportEndOfLife, + verificationType, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchSupportedImage)} does not support writing '{options.Format}' format."); + } + } + + BatchSupportedImage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchSupportedImage(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchSupportedImage)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchSupportedImage FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchSupportedImage(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchSupportedImage.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchSupportedImage.cs new file mode 100644 index 0000000000000..dcc24fa9d8e86 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchSupportedImage.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// + /// A reference to the Azure Virtual Machines Marketplace Image and additional + /// information about the Image. + /// + public partial class BatchSupportedImage + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The ID of the Compute Node agent SKU which the Image supports. + /// The reference to the Azure Virtual Machine's Marketplace Image. + /// The type of operating system (e.g. Windows or Linux) of the Image. + /// Whether the Azure Batch service actively verifies that the Image is compatible with the associated Compute Node agent SKU. + /// or is null. + internal BatchSupportedImage(string nodeAgentSkuId, ImageReference imageReference, OSType osType, ImageVerificationType verificationType) + { + Argument.AssertNotNull(nodeAgentSkuId, nameof(nodeAgentSkuId)); + Argument.AssertNotNull(imageReference, nameof(imageReference)); + + NodeAgentSkuId = nodeAgentSkuId; + ImageReference = imageReference; + OsType = osType; + Capabilities = new ChangeTrackingList(); + VerificationType = verificationType; + } + + /// Initializes a new instance of . + /// The ID of the Compute Node agent SKU which the Image supports. + /// The reference to the Azure Virtual Machine's Marketplace Image. + /// The type of operating system (e.g. Windows or Linux) of the Image. + /// The capabilities or features which the Image supports. Not every capability of the Image is listed. Capabilities in this list are considered of special interest and are generally related to integration with other features in the Azure Batch service. + /// The time when the Azure Batch service will stop accepting create Pool requests for the Image. + /// Whether the Azure Batch service actively verifies that the Image is compatible with the associated Compute Node agent SKU. + /// Keeps track of any properties unknown to the library. + internal BatchSupportedImage(string nodeAgentSkuId, ImageReference imageReference, OSType osType, IReadOnlyList capabilities, DateTimeOffset? batchSupportEndOfLife, ImageVerificationType verificationType, IDictionary serializedAdditionalRawData) + { + NodeAgentSkuId = nodeAgentSkuId; + ImageReference = imageReference; + OsType = osType; + Capabilities = capabilities; + BatchSupportEndOfLife = batchSupportEndOfLife; + VerificationType = verificationType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchSupportedImage() + { + } + + /// The ID of the Compute Node agent SKU which the Image supports. + public string NodeAgentSkuId { get; } + /// The reference to the Azure Virtual Machine's Marketplace Image. + public ImageReference ImageReference { get; } + /// The type of operating system (e.g. Windows or Linux) of the Image. + public OSType OsType { get; } + /// The capabilities or features which the Image supports. Not every capability of the Image is listed. Capabilities in this list are considered of special interest and are generally related to integration with other features in the Azure Batch service. + public IReadOnlyList Capabilities { get; } + /// The time when the Azure Batch service will stop accepting create Pool requests for the Image. + public DateTimeOffset? BatchSupportEndOfLife { get; } + /// Whether the Azure Batch service actively verifies that the Image is compatible with the associated Compute Node agent SKU. + public ImageVerificationType VerificationType { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTask.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTask.Serialization.cs new file mode 100644 index 0000000000000..1c82899a42e69 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTask.Serialization.cs @@ -0,0 +1,580 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchTask : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchTask)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W" && Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (options.Format != "W" && Optional.IsDefined(Url)) + { + writer.WritePropertyName("url"u8); + writer.WriteStringValue(Url); + } + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("eTag"u8); + writer.WriteStringValue(ETag); + } + if (options.Format != "W" && Optional.IsDefined(LastModified)) + { + writer.WritePropertyName("lastModified"u8); + writer.WriteStringValue(LastModified.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(CreationTime)) + { + writer.WritePropertyName("creationTime"u8); + writer.WriteStringValue(CreationTime.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(ExitConditions)) + { + writer.WritePropertyName("exitConditions"u8); + writer.WriteObjectValue(ExitConditions, options); + } + if (options.Format != "W" && Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(StateTransitionTime)) + { + writer.WritePropertyName("stateTransitionTime"u8); + writer.WriteStringValue(StateTransitionTime.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(PreviousState)) + { + writer.WritePropertyName("previousState"u8); + writer.WriteStringValue(PreviousState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(PreviousStateTransitionTime)) + { + writer.WritePropertyName("previousStateTransitionTime"u8); + writer.WriteStringValue(PreviousStateTransitionTime.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(CommandLine)) + { + writer.WritePropertyName("commandLine"u8); + writer.WriteStringValue(CommandLine); + } + if (options.Format != "W" && Optional.IsDefined(ContainerSettings)) + { + writer.WritePropertyName("containerSettings"u8); + writer.WriteObjectValue(ContainerSettings, options); + } + if (options.Format != "W" && Optional.IsCollectionDefined(ResourceFiles)) + { + writer.WritePropertyName("resourceFiles"u8); + writer.WriteStartArray(); + foreach (var item in ResourceFiles) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsCollectionDefined(OutputFiles)) + { + writer.WritePropertyName("outputFiles"u8); + writer.WriteStartArray(); + foreach (var item in OutputFiles) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsCollectionDefined(EnvironmentSettings)) + { + writer.WritePropertyName("environmentSettings"u8); + writer.WriteStartArray(); + foreach (var item in EnvironmentSettings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(AffinityInfo)) + { + writer.WritePropertyName("affinityInfo"u8); + writer.WriteObjectValue(AffinityInfo, options); + } + if (Optional.IsDefined(Constraints)) + { + writer.WritePropertyName("constraints"u8); + writer.WriteObjectValue(Constraints, options); + } + if (options.Format != "W" && Optional.IsDefined(RequiredSlots)) + { + writer.WritePropertyName("requiredSlots"u8); + writer.WriteNumberValue(RequiredSlots.Value); + } + if (options.Format != "W" && Optional.IsDefined(UserIdentity)) + { + writer.WritePropertyName("userIdentity"u8); + writer.WriteObjectValue(UserIdentity, options); + } + if (options.Format != "W" && Optional.IsDefined(ExecutionInfo)) + { + writer.WritePropertyName("executionInfo"u8); + writer.WriteObjectValue(ExecutionInfo, options); + } + if (options.Format != "W" && Optional.IsDefined(NodeInfo)) + { + writer.WritePropertyName("nodeInfo"u8); + writer.WriteObjectValue(NodeInfo, options); + } + if (options.Format != "W" && Optional.IsDefined(MultiInstanceSettings)) + { + writer.WritePropertyName("multiInstanceSettings"u8); + writer.WriteObjectValue(MultiInstanceSettings, options); + } + if (options.Format != "W" && Optional.IsDefined(Stats)) + { + writer.WritePropertyName("stats"u8); + writer.WriteObjectValue(Stats, options); + } + if (options.Format != "W" && Optional.IsDefined(DependsOn)) + { + writer.WritePropertyName("dependsOn"u8); + writer.WriteObjectValue(DependsOn, options); + } + if (options.Format != "W" && Optional.IsCollectionDefined(ApplicationPackageReferences)) + { + writer.WritePropertyName("applicationPackageReferences"u8); + writer.WriteStartArray(); + foreach (var item in ApplicationPackageReferences) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(AuthenticationTokenSettings)) + { + writer.WritePropertyName("authenticationTokenSettings"u8); + writer.WriteObjectValue(AuthenticationTokenSettings, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchTask IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchTask)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchTask(document.RootElement, options); + } + + internal static BatchTask DeserializeBatchTask(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + string displayName = default; + string url = default; + string eTag = default; + DateTimeOffset? lastModified = default; + DateTimeOffset? creationTime = default; + ExitConditions exitConditions = default; + BatchTaskState? state = default; + DateTimeOffset? stateTransitionTime = default; + BatchTaskState? previousState = default; + DateTimeOffset? previousStateTransitionTime = default; + string commandLine = default; + BatchTaskContainerSettings containerSettings = default; + IReadOnlyList resourceFiles = default; + IReadOnlyList outputFiles = default; + IReadOnlyList environmentSettings = default; + AffinityInfo affinityInfo = default; + BatchTaskConstraints constraints = default; + int? requiredSlots = default; + UserIdentity userIdentity = default; + BatchTaskExecutionInfo executionInfo = default; + BatchNodeInfo nodeInfo = default; + MultiInstanceSettings multiInstanceSettings = default; + BatchTaskStatistics stats = default; + BatchTaskDependencies dependsOn = default; + IReadOnlyList applicationPackageReferences = default; + AuthenticationTokenSettings authenticationTokenSettings = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("url"u8)) + { + url = property.Value.GetString(); + continue; + } + if (property.NameEquals("eTag"u8)) + { + eTag = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastModified"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastModified = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("creationTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + creationTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("exitConditions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + exitConditions = ExitConditions.DeserializeExitConditions(property.Value, options); + continue; + } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new BatchTaskState(property.Value.GetString()); + continue; + } + if (property.NameEquals("stateTransitionTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + stateTransitionTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("previousState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + previousState = new BatchTaskState(property.Value.GetString()); + continue; + } + if (property.NameEquals("previousStateTransitionTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + previousStateTransitionTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("commandLine"u8)) + { + commandLine = property.Value.GetString(); + continue; + } + if (property.NameEquals("containerSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + containerSettings = BatchTaskContainerSettings.DeserializeBatchTaskContainerSettings(property.Value, options); + continue; + } + if (property.NameEquals("resourceFiles"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceFile.DeserializeResourceFile(item, options)); + } + resourceFiles = array; + continue; + } + if (property.NameEquals("outputFiles"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(OutputFile.DeserializeOutputFile(item, options)); + } + outputFiles = array; + continue; + } + if (property.NameEquals("environmentSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EnvironmentSetting.DeserializeEnvironmentSetting(item, options)); + } + environmentSettings = array; + continue; + } + if (property.NameEquals("affinityInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + affinityInfo = AffinityInfo.DeserializeAffinityInfo(property.Value, options); + continue; + } + if (property.NameEquals("constraints"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + constraints = BatchTaskConstraints.DeserializeBatchTaskConstraints(property.Value, options); + continue; + } + if (property.NameEquals("requiredSlots"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + requiredSlots = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("userIdentity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userIdentity = UserIdentity.DeserializeUserIdentity(property.Value, options); + continue; + } + if (property.NameEquals("executionInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + executionInfo = BatchTaskExecutionInfo.DeserializeBatchTaskExecutionInfo(property.Value, options); + continue; + } + if (property.NameEquals("nodeInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nodeInfo = BatchNodeInfo.DeserializeBatchNodeInfo(property.Value, options); + continue; + } + if (property.NameEquals("multiInstanceSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + multiInstanceSettings = MultiInstanceSettings.DeserializeMultiInstanceSettings(property.Value, options); + continue; + } + if (property.NameEquals("stats"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + stats = BatchTaskStatistics.DeserializeBatchTaskStatistics(property.Value, options); + continue; + } + if (property.NameEquals("dependsOn"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dependsOn = BatchTaskDependencies.DeserializeBatchTaskDependencies(property.Value, options); + continue; + } + if (property.NameEquals("applicationPackageReferences"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BatchApplicationPackageReference.DeserializeBatchApplicationPackageReference(item, options)); + } + applicationPackageReferences = array; + continue; + } + if (property.NameEquals("authenticationTokenSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authenticationTokenSettings = AuthenticationTokenSettings.DeserializeAuthenticationTokenSettings(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchTask( + id, + displayName, + url, + eTag, + lastModified, + creationTime, + exitConditions, + state, + stateTransitionTime, + previousState, + previousStateTransitionTime, + commandLine, + containerSettings, + resourceFiles ?? new ChangeTrackingList(), + outputFiles ?? new ChangeTrackingList(), + environmentSettings ?? new ChangeTrackingList(), + affinityInfo, + constraints, + requiredSlots, + userIdentity, + executionInfo, + nodeInfo, + multiInstanceSettings, + stats, + dependsOn, + applicationPackageReferences ?? new ChangeTrackingList(), + authenticationTokenSettings, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchTask)} does not support writing '{options.Format}' format."); + } + } + + BatchTask IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchTask(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchTask)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchTask FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchTask(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTask.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTask.cs new file mode 100644 index 0000000000000..3f38ef61f36d9 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTask.cs @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// + /// Batch will retry Tasks when a recovery operation is triggered on a Node. + /// Examples of recovery operations include (but are not limited to) when an + /// unhealthy Node is rebooted or a Compute Node disappeared due to host failure. + /// Retries due to recovery operations are independent of and are not counted + /// against the maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an internal + /// retry due to a recovery operation may occur. Because of this, all Tasks should + /// be idempotent. This means Tasks need to tolerate being interrupted and + /// restarted without causing any corruption or duplicate data. The best practice + /// for long running Tasks is to use some form of checkpointing. + /// + public partial class BatchTask + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public BatchTask() + { + ResourceFiles = new ChangeTrackingList(); + OutputFiles = new ChangeTrackingList(); + EnvironmentSettings = new ChangeTrackingList(); + ApplicationPackageReferences = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// A string that uniquely identifies the Task within the Job. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. + /// A display name for the Task. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. + /// The URL of the Task. + /// The ETag of the Task. This is an opaque string. You can use it to detect whether the Task has changed between requests. In particular, you can be pass the ETag when updating a Task to specify that your changes should take effect only if nobody else has modified the Task in the meantime. + /// The last modified time of the Task. + /// The creation time of the Task. + /// How the Batch service should respond when the Task completes. + /// The current state of the Task. + /// The time at which the Task entered its current state. + /// The previous state of the Task. This property is not set if the Task is in its initial Active state. + /// The time at which the Task entered its previous state. This property is not set if the Task is in its initial Active state. + /// The command line of the Task. For multi-instance Tasks, the command line is executed as the primary Task, after the primary Task and all subtasks have finished executing the coordination command line. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + /// The settings for the container under which the Task runs. If the Pool that will run this Task has containerConfiguration set, this must be set as well. If the Pool that will run this Task doesn't have containerConfiguration set, this must not be set. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. + /// A list of files that the Batch service will download to the Compute Node before running the command line. For multi-instance Tasks, the resource files will only be downloaded to the Compute Node on which the primary Task is executed. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. + /// A list of files that the Batch service will upload from the Compute Node after running the command line. For multi-instance Tasks, the files will only be uploaded from the Compute Node on which the primary Task is executed. + /// A list of environment variable settings for the Task. + /// A locality hint that can be used by the Batch service to select a Compute Node on which to start the new Task. + /// The execution constraints that apply to this Task. + /// The number of scheduling slots that the Task requires to run. The default is 1. A Task can only be scheduled to run on a compute node if the node has enough free scheduling slots available. For multi-instance Tasks, this must be 1. + /// The user identity under which the Task runs. If omitted, the Task runs as a non-administrative user unique to the Task. + /// Information about the execution of the Task. + /// Information about the Compute Node on which the Task ran. + /// An object that indicates that the Task is a multi-instance Task, and contains information about how to run the multi-instance Task. + /// Resource usage statistics for the Task. + /// The Tasks that this Task depends on. This Task will not be scheduled until all Tasks that it depends on have completed successfully. If any of those Tasks fail and exhaust their retry counts, this Task will never be scheduled. + /// A list of Packages that the Batch service will deploy to the Compute Node before running the command line. Application packages are downloaded and deployed to a shared directory, not the Task working directory. Therefore, if a referenced package is already on the Node, and is up to date, then it is not re-downloaded; the existing copy on the Compute Node is used. If a referenced Package cannot be installed, for example because the package has been deleted or because download failed, the Task fails. + /// The settings for an authentication token that the Task can use to perform Batch service operations. If this property is set, the Batch service provides the Task with an authentication token which can be used to authenticate Batch service operations without requiring an Account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the Task can carry out using the token depend on the settings. For example, a Task can request Job permissions in order to add other Tasks to the Job, or check the status of the Job or of other Tasks under the Job. + /// Keeps track of any properties unknown to the library. + internal BatchTask(string id, string displayName, string url, string eTag, DateTimeOffset? lastModified, DateTimeOffset? creationTime, ExitConditions exitConditions, BatchTaskState? state, DateTimeOffset? stateTransitionTime, BatchTaskState? previousState, DateTimeOffset? previousStateTransitionTime, string commandLine, BatchTaskContainerSettings containerSettings, IReadOnlyList resourceFiles, IReadOnlyList outputFiles, IReadOnlyList environmentSettings, AffinityInfo affinityInfo, BatchTaskConstraints constraints, int? requiredSlots, UserIdentity userIdentity, BatchTaskExecutionInfo executionInfo, BatchNodeInfo nodeInfo, MultiInstanceSettings multiInstanceSettings, BatchTaskStatistics stats, BatchTaskDependencies dependsOn, IReadOnlyList applicationPackageReferences, AuthenticationTokenSettings authenticationTokenSettings, IDictionary serializedAdditionalRawData) + { + Id = id; + DisplayName = displayName; + Url = url; + ETag = eTag; + LastModified = lastModified; + CreationTime = creationTime; + ExitConditions = exitConditions; + State = state; + StateTransitionTime = stateTransitionTime; + PreviousState = previousState; + PreviousStateTransitionTime = previousStateTransitionTime; + CommandLine = commandLine; + ContainerSettings = containerSettings; + ResourceFiles = resourceFiles; + OutputFiles = outputFiles; + EnvironmentSettings = environmentSettings; + AffinityInfo = affinityInfo; + Constraints = constraints; + RequiredSlots = requiredSlots; + UserIdentity = userIdentity; + ExecutionInfo = executionInfo; + NodeInfo = nodeInfo; + MultiInstanceSettings = multiInstanceSettings; + Stats = stats; + DependsOn = dependsOn; + ApplicationPackageReferences = applicationPackageReferences; + AuthenticationTokenSettings = authenticationTokenSettings; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// A string that uniquely identifies the Task within the Job. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. + public string Id { get; } + /// A display name for the Task. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. + public string DisplayName { get; } + /// The URL of the Task. + public string Url { get; } + /// The ETag of the Task. This is an opaque string. You can use it to detect whether the Task has changed between requests. In particular, you can be pass the ETag when updating a Task to specify that your changes should take effect only if nobody else has modified the Task in the meantime. + public string ETag { get; } + /// The last modified time of the Task. + public DateTimeOffset? LastModified { get; } + /// The creation time of the Task. + public DateTimeOffset? CreationTime { get; } + /// How the Batch service should respond when the Task completes. + public ExitConditions ExitConditions { get; } + /// The current state of the Task. + public BatchTaskState? State { get; } + /// The time at which the Task entered its current state. + public DateTimeOffset? StateTransitionTime { get; } + /// The previous state of the Task. This property is not set if the Task is in its initial Active state. + public BatchTaskState? PreviousState { get; } + /// The time at which the Task entered its previous state. This property is not set if the Task is in its initial Active state. + public DateTimeOffset? PreviousStateTransitionTime { get; } + /// The command line of the Task. For multi-instance Tasks, the command line is executed as the primary Task, after the primary Task and all subtasks have finished executing the coordination command line. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + public string CommandLine { get; } + /// The settings for the container under which the Task runs. If the Pool that will run this Task has containerConfiguration set, this must be set as well. If the Pool that will run this Task doesn't have containerConfiguration set, this must not be set. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. + public BatchTaskContainerSettings ContainerSettings { get; } + /// A list of files that the Batch service will download to the Compute Node before running the command line. For multi-instance Tasks, the resource files will only be downloaded to the Compute Node on which the primary Task is executed. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. + public IReadOnlyList ResourceFiles { get; } + /// A list of files that the Batch service will upload from the Compute Node after running the command line. For multi-instance Tasks, the files will only be uploaded from the Compute Node on which the primary Task is executed. + public IReadOnlyList OutputFiles { get; } + /// A list of environment variable settings for the Task. + public IReadOnlyList EnvironmentSettings { get; } + /// A locality hint that can be used by the Batch service to select a Compute Node on which to start the new Task. + public AffinityInfo AffinityInfo { get; } + /// The execution constraints that apply to this Task. + public BatchTaskConstraints Constraints { get; set; } + /// The number of scheduling slots that the Task requires to run. The default is 1. A Task can only be scheduled to run on a compute node if the node has enough free scheduling slots available. For multi-instance Tasks, this must be 1. + public int? RequiredSlots { get; } + /// The user identity under which the Task runs. If omitted, the Task runs as a non-administrative user unique to the Task. + public UserIdentity UserIdentity { get; } + /// Information about the execution of the Task. + public BatchTaskExecutionInfo ExecutionInfo { get; } + /// Information about the Compute Node on which the Task ran. + public BatchNodeInfo NodeInfo { get; } + /// An object that indicates that the Task is a multi-instance Task, and contains information about how to run the multi-instance Task. + public MultiInstanceSettings MultiInstanceSettings { get; } + /// Resource usage statistics for the Task. + public BatchTaskStatistics Stats { get; } + /// The Tasks that this Task depends on. This Task will not be scheduled until all Tasks that it depends on have completed successfully. If any of those Tasks fail and exhaust their retry counts, this Task will never be scheduled. + public BatchTaskDependencies DependsOn { get; } + /// A list of Packages that the Batch service will deploy to the Compute Node before running the command line. Application packages are downloaded and deployed to a shared directory, not the Task working directory. Therefore, if a referenced package is already on the Node, and is up to date, then it is not re-downloaded; the existing copy on the Compute Node is used. If a referenced Package cannot be installed, for example because the package has been deleted or because download failed, the Task fails. + public IReadOnlyList ApplicationPackageReferences { get; } + /// The settings for an authentication token that the Task can use to perform Batch service operations. If this property is set, the Batch service provides the Task with an authentication token which can be used to authenticate Batch service operations without requiring an Account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the Task can carry out using the token depend on the settings. For example, a Task can request Job permissions in order to add other Tasks to the Job, or check the status of the Job or of other Tasks under the Job. + public AuthenticationTokenSettings AuthenticationTokenSettings { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskAddCollectionResult.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskAddCollectionResult.Serialization.cs new file mode 100644 index 0000000000000..68facdb5d556f --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskAddCollectionResult.Serialization.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchTaskAddCollectionResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchTaskAddCollectionResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchTaskAddCollectionResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchTaskAddCollectionResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchTaskAddCollectionResult(document.RootElement, options); + } + + internal static BatchTaskAddCollectionResult DeserializeBatchTaskAddCollectionResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BatchTaskAddResult.DeserializeBatchTaskAddResult(item, options)); + } + value = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchTaskAddCollectionResult(value ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchTaskAddCollectionResult)} does not support writing '{options.Format}' format."); + } + } + + BatchTaskAddCollectionResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchTaskAddCollectionResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchTaskAddCollectionResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchTaskAddCollectionResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchTaskAddCollectionResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskAddCollectionResult.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskAddCollectionResult.cs new file mode 100644 index 0000000000000..94824c7958c06 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskAddCollectionResult.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// The result of adding a collection of Tasks to a Job. + public partial class BatchTaskAddCollectionResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal BatchTaskAddCollectionResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The results of the add Task collection operation. + /// Keeps track of any properties unknown to the library. + internal BatchTaskAddCollectionResult(IReadOnlyList value, IDictionary serializedAdditionalRawData) + { + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The results of the add Task collection operation. + public IReadOnlyList Value { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskAddResult.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskAddResult.Serialization.cs new file mode 100644 index 0000000000000..b39d20c111bc2 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskAddResult.Serialization.cs @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchTaskAddResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchTaskAddResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + writer.WritePropertyName("taskId"u8); + writer.WriteStringValue(TaskId); + if (Optional.IsDefined(ETag)) + { + writer.WritePropertyName("eTag"u8); + writer.WriteStringValue(ETag); + } + if (Optional.IsDefined(LastModified)) + { + writer.WritePropertyName("lastModified"u8); + writer.WriteStringValue(LastModified.Value, "O"); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + } + if (Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + writer.WriteObjectValue(Error, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchTaskAddResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchTaskAddResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchTaskAddResult(document.RootElement, options); + } + + internal static BatchTaskAddResult DeserializeBatchTaskAddResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BatchTaskAddStatus status = default; + string taskId = default; + string eTag = default; + DateTimeOffset? lastModified = default; + string location = default; + BatchError error = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("status"u8)) + { + status = new BatchTaskAddStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("taskId"u8)) + { + taskId = property.Value.GetString(); + continue; + } + if (property.NameEquals("eTag"u8)) + { + eTag = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastModified"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastModified = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("location"u8)) + { + location = property.Value.GetString(); + continue; + } + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = BatchError.DeserializeBatchError(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchTaskAddResult( + status, + taskId, + eTag, + lastModified, + location, + error, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchTaskAddResult)} does not support writing '{options.Format}' format."); + } + } + + BatchTaskAddResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchTaskAddResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchTaskAddResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchTaskAddResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchTaskAddResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskAddResult.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskAddResult.cs new file mode 100644 index 0000000000000..2ac298b53fe29 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskAddResult.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Result for a single Task added as part of an add Task collection operation. + public partial class BatchTaskAddResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The status of the add Task request. + /// The ID of the Task for which this is the result. + /// is null. + internal BatchTaskAddResult(BatchTaskAddStatus status, string taskId) + { + Argument.AssertNotNull(taskId, nameof(taskId)); + + Status = status; + TaskId = taskId; + } + + /// Initializes a new instance of . + /// The status of the add Task request. + /// The ID of the Task for which this is the result. + /// The ETag of the Task, if the Task was successfully added. You can use this to detect whether the Task has changed between requests. In particular, you can be pass the ETag with an Update Task request to specify that your changes should take effect only if nobody else has modified the Job in the meantime. + /// The last modified time of the Task. + /// The URL of the Task, if the Task was successfully added. + /// The error encountered while attempting to add the Task. + /// Keeps track of any properties unknown to the library. + internal BatchTaskAddResult(BatchTaskAddStatus status, string taskId, string eTag, DateTimeOffset? lastModified, string location, BatchError error, IDictionary serializedAdditionalRawData) + { + Status = status; + TaskId = taskId; + ETag = eTag; + LastModified = lastModified; + Location = location; + Error = error; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchTaskAddResult() + { + } + + /// The status of the add Task request. + public BatchTaskAddStatus Status { get; } + /// The ID of the Task for which this is the result. + public string TaskId { get; } + /// The ETag of the Task, if the Task was successfully added. You can use this to detect whether the Task has changed between requests. In particular, you can be pass the ETag with an Update Task request to specify that your changes should take effect only if nobody else has modified the Job in the meantime. + public string ETag { get; } + /// The last modified time of the Task. + public DateTimeOffset? LastModified { get; } + /// The URL of the Task, if the Task was successfully added. + public string Location { get; } + /// The error encountered while attempting to add the Task. + public BatchError Error { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskAddStatus.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskAddStatus.cs new file mode 100644 index 0000000000000..4fb7f3b9382d7 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskAddStatus.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.Compute.Batch +{ + /// BatchTaskAddStatus enums. + public readonly partial struct BatchTaskAddStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BatchTaskAddStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SuccessValue = "success"; + private const string ClientErrorValue = "clienterror"; + private const string ServerErrorValue = "servererror"; + + /// The Task was added successfully. + public static BatchTaskAddStatus Success { get; } = new BatchTaskAddStatus(SuccessValue); + /// The Task failed to add due to a client error and should not be retried without modifying the request as appropriate. + public static BatchTaskAddStatus ClientError { get; } = new BatchTaskAddStatus(ClientErrorValue); + /// Task failed to add due to a server error and can be retried without modification. + public static BatchTaskAddStatus ServerError { get; } = new BatchTaskAddStatus(ServerErrorValue); + /// Determines if two values are the same. + public static bool operator ==(BatchTaskAddStatus left, BatchTaskAddStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BatchTaskAddStatus left, BatchTaskAddStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator BatchTaskAddStatus(string value) => new BatchTaskAddStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BatchTaskAddStatus other && Equals(other); + /// + public bool Equals(BatchTaskAddStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskConstraints.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskConstraints.Serialization.cs new file mode 100644 index 0000000000000..21a6503e72288 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskConstraints.Serialization.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchTaskConstraints : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchTaskConstraints)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(MaxWallClockTime)) + { + writer.WritePropertyName("maxWallClockTime"u8); + writer.WriteStringValue(MaxWallClockTime.Value, "P"); + } + if (Optional.IsDefined(RetentionTime)) + { + writer.WritePropertyName("retentionTime"u8); + writer.WriteStringValue(RetentionTime.Value, "P"); + } + if (Optional.IsDefined(MaxTaskRetryCount)) + { + writer.WritePropertyName("maxTaskRetryCount"u8); + writer.WriteNumberValue(MaxTaskRetryCount.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchTaskConstraints IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchTaskConstraints)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchTaskConstraints(document.RootElement, options); + } + + internal static BatchTaskConstraints DeserializeBatchTaskConstraints(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + TimeSpan? maxWallClockTime = default; + TimeSpan? retentionTime = default; + int? maxTaskRetryCount = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("maxWallClockTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxWallClockTime = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("retentionTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + retentionTime = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("maxTaskRetryCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxTaskRetryCount = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchTaskConstraints(maxWallClockTime, retentionTime, maxTaskRetryCount, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchTaskConstraints)} does not support writing '{options.Format}' format."); + } + } + + BatchTaskConstraints IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchTaskConstraints(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchTaskConstraints)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchTaskConstraints FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchTaskConstraints(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskConstraints.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskConstraints.cs new file mode 100644 index 0000000000000..1b6a133c6d6a9 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskConstraints.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Execution constraints to apply to a Task. + public partial class BatchTaskConstraints + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public BatchTaskConstraints() + { + } + + /// Initializes a new instance of . + /// The maximum elapsed time that the Task may run, measured from the time the Task starts. If the Task does not complete within the time limit, the Batch service terminates it. If this is not specified, there is no time limit on how long the Task may run. + /// The minimum time to retain the Task directory on the Compute Node where it ran, from the time it completes execution. After this time, the Batch service may delete the Task directory and all its contents. The default is 7 days, i.e. the Task directory will be retained for 7 days unless the Compute Node is removed or the Job is deleted. + /// The maximum number of times the Task may be retried. The Batch service retries a Task if its exit code is nonzero. Note that this value specifically controls the number of retries for the Task executable due to a nonzero exit code. The Batch service will try the Task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries the Task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry the Task after the first attempt. If the maximum retry count is -1, the Batch service retries the Task without limit, however this is not recommended for a start task or any task. The default value is 0 (no retries). + /// Keeps track of any properties unknown to the library. + internal BatchTaskConstraints(TimeSpan? maxWallClockTime, TimeSpan? retentionTime, int? maxTaskRetryCount, IDictionary serializedAdditionalRawData) + { + MaxWallClockTime = maxWallClockTime; + RetentionTime = retentionTime; + MaxTaskRetryCount = maxTaskRetryCount; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The maximum elapsed time that the Task may run, measured from the time the Task starts. If the Task does not complete within the time limit, the Batch service terminates it. If this is not specified, there is no time limit on how long the Task may run. + public TimeSpan? MaxWallClockTime { get; set; } + /// The minimum time to retain the Task directory on the Compute Node where it ran, from the time it completes execution. After this time, the Batch service may delete the Task directory and all its contents. The default is 7 days, i.e. the Task directory will be retained for 7 days unless the Compute Node is removed or the Job is deleted. + public TimeSpan? RetentionTime { get; set; } + /// The maximum number of times the Task may be retried. The Batch service retries a Task if its exit code is nonzero. Note that this value specifically controls the number of retries for the Task executable due to a nonzero exit code. The Batch service will try the Task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries the Task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry the Task after the first attempt. If the maximum retry count is -1, the Batch service retries the Task without limit, however this is not recommended for a start task or any task. The default value is 0 (no retries). + public int? MaxTaskRetryCount { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskContainerExecutionInfo.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskContainerExecutionInfo.Serialization.cs new file mode 100644 index 0000000000000..e3a1d872a7718 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskContainerExecutionInfo.Serialization.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchTaskContainerExecutionInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchTaskContainerExecutionInfo)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(ContainerId)) + { + writer.WritePropertyName("containerId"u8); + writer.WriteStringValue(ContainerId); + } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State); + } + if (Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + writer.WriteStringValue(Error); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchTaskContainerExecutionInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchTaskContainerExecutionInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchTaskContainerExecutionInfo(document.RootElement, options); + } + + internal static BatchTaskContainerExecutionInfo DeserializeBatchTaskContainerExecutionInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string containerId = default; + string state = default; + string error = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("containerId"u8)) + { + containerId = property.Value.GetString(); + continue; + } + if (property.NameEquals("state"u8)) + { + state = property.Value.GetString(); + continue; + } + if (property.NameEquals("error"u8)) + { + error = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchTaskContainerExecutionInfo(containerId, state, error, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchTaskContainerExecutionInfo)} does not support writing '{options.Format}' format."); + } + } + + BatchTaskContainerExecutionInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchTaskContainerExecutionInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchTaskContainerExecutionInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchTaskContainerExecutionInfo FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchTaskContainerExecutionInfo(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskContainerExecutionInfo.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskContainerExecutionInfo.cs new file mode 100644 index 0000000000000..183934684b86a --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskContainerExecutionInfo.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Contains information about the container which a Task is executing. + public partial class BatchTaskContainerExecutionInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal BatchTaskContainerExecutionInfo() + { + } + + /// Initializes a new instance of . + /// The ID of the container. + /// The state of the container. This is the state of the container according to the Docker service. It is equivalent to the status field returned by "docker inspect". + /// Detailed error information about the container. This is the detailed error string from the Docker service, if available. It is equivalent to the error field returned by "docker inspect". + /// Keeps track of any properties unknown to the library. + internal BatchTaskContainerExecutionInfo(string containerId, string state, string error, IDictionary serializedAdditionalRawData) + { + ContainerId = containerId; + State = state; + Error = error; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The ID of the container. + public string ContainerId { get; } + /// The state of the container. This is the state of the container according to the Docker service. It is equivalent to the status field returned by "docker inspect". + public string State { get; } + /// Detailed error information about the container. This is the detailed error string from the Docker service, if available. It is equivalent to the error field returned by "docker inspect". + public string Error { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskContainerSettings.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskContainerSettings.Serialization.cs new file mode 100644 index 0000000000000..df8670ff83d07 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskContainerSettings.Serialization.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchTaskContainerSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchTaskContainerSettings)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(ContainerRunOptions)) + { + writer.WritePropertyName("containerRunOptions"u8); + writer.WriteStringValue(ContainerRunOptions); + } + writer.WritePropertyName("imageName"u8); + writer.WriteStringValue(ImageName); + if (Optional.IsDefined(Registry)) + { + writer.WritePropertyName("registry"u8); + writer.WriteObjectValue(Registry, options); + } + if (Optional.IsDefined(WorkingDirectory)) + { + writer.WritePropertyName("workingDirectory"u8); + writer.WriteStringValue(WorkingDirectory.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchTaskContainerSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchTaskContainerSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchTaskContainerSettings(document.RootElement, options); + } + + internal static BatchTaskContainerSettings DeserializeBatchTaskContainerSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string containerRunOptions = default; + string imageName = default; + ContainerRegistryReference registry = default; + ContainerWorkingDirectory? workingDirectory = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("containerRunOptions"u8)) + { + containerRunOptions = property.Value.GetString(); + continue; + } + if (property.NameEquals("imageName"u8)) + { + imageName = property.Value.GetString(); + continue; + } + if (property.NameEquals("registry"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + registry = ContainerRegistryReference.DeserializeContainerRegistryReference(property.Value, options); + continue; + } + if (property.NameEquals("workingDirectory"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + workingDirectory = new ContainerWorkingDirectory(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchTaskContainerSettings(containerRunOptions, imageName, registry, workingDirectory, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchTaskContainerSettings)} does not support writing '{options.Format}' format."); + } + } + + BatchTaskContainerSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchTaskContainerSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchTaskContainerSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchTaskContainerSettings FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchTaskContainerSettings(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskContainerSettings.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskContainerSettings.cs new file mode 100644 index 0000000000000..9ecfdf09e22b8 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskContainerSettings.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// The container settings for a Task. + public partial class BatchTaskContainerSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The Image to use to create the container in which the Task will run. This is the full Image reference, as would be specified to "docker pull". If no tag is provided as part of the Image name, the tag ":latest" is used as a default. + /// is null. + public BatchTaskContainerSettings(string imageName) + { + Argument.AssertNotNull(imageName, nameof(imageName)); + + ImageName = imageName; + } + + /// Initializes a new instance of . + /// Additional options to the container create command. These additional options are supplied as arguments to the "docker create" command, in addition to those controlled by the Batch Service. + /// The Image to use to create the container in which the Task will run. This is the full Image reference, as would be specified to "docker pull". If no tag is provided as part of the Image name, the tag ":latest" is used as a default. + /// The private registry which contains the container Image. This setting can be omitted if was already provided at Pool creation. + /// The location of the container Task working directory. The default is 'taskWorkingDirectory'. + /// Keeps track of any properties unknown to the library. + internal BatchTaskContainerSettings(string containerRunOptions, string imageName, ContainerRegistryReference registry, ContainerWorkingDirectory? workingDirectory, IDictionary serializedAdditionalRawData) + { + ContainerRunOptions = containerRunOptions; + ImageName = imageName; + Registry = registry; + WorkingDirectory = workingDirectory; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchTaskContainerSettings() + { + } + + /// Additional options to the container create command. These additional options are supplied as arguments to the "docker create" command, in addition to those controlled by the Batch Service. + public string ContainerRunOptions { get; set; } + /// The Image to use to create the container in which the Task will run. This is the full Image reference, as would be specified to "docker pull". If no tag is provided as part of the Image name, the tag ":latest" is used as a default. + public string ImageName { get; set; } + /// The private registry which contains the container Image. This setting can be omitted if was already provided at Pool creation. + public ContainerRegistryReference Registry { get; set; } + /// The location of the container Task working directory. The default is 'taskWorkingDirectory'. + public ContainerWorkingDirectory? WorkingDirectory { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskCounts.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskCounts.Serialization.cs new file mode 100644 index 0000000000000..ac91cee387b9b --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskCounts.Serialization.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchTaskCounts : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchTaskCounts)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("active"u8); + writer.WriteNumberValue(Active); + writer.WritePropertyName("running"u8); + writer.WriteNumberValue(Running); + writer.WritePropertyName("completed"u8); + writer.WriteNumberValue(Completed); + writer.WritePropertyName("succeeded"u8); + writer.WriteNumberValue(Succeeded); + writer.WritePropertyName("failed"u8); + writer.WriteNumberValue(Failed); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchTaskCounts IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchTaskCounts)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchTaskCounts(document.RootElement, options); + } + + internal static BatchTaskCounts DeserializeBatchTaskCounts(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int active = default; + int running = default; + int completed = default; + int succeeded = default; + int failed = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("active"u8)) + { + active = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("running"u8)) + { + running = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("completed"u8)) + { + completed = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("succeeded"u8)) + { + succeeded = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("failed"u8)) + { + failed = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchTaskCounts( + active, + running, + completed, + succeeded, + failed, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchTaskCounts)} does not support writing '{options.Format}' format."); + } + } + + BatchTaskCounts IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchTaskCounts(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchTaskCounts)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchTaskCounts FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchTaskCounts(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskCounts.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskCounts.cs new file mode 100644 index 0000000000000..c5f9f3aa50999 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskCounts.cs @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// The Task counts for a Job. + public partial class BatchTaskCounts + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The number of Tasks in the active state. + /// The number of Tasks in the running or preparing state. + /// The number of Tasks in the completed state. + /// The number of Tasks which succeeded. A Task succeeds if its result (found in the executionInfo property) is 'success'. + /// The number of Tasks which failed. A Task fails if its result (found in the executionInfo property) is 'failure'. + internal BatchTaskCounts(int active, int running, int completed, int succeeded, int failed) + { + Active = active; + Running = running; + Completed = completed; + Succeeded = succeeded; + Failed = failed; + } + + /// Initializes a new instance of . + /// The number of Tasks in the active state. + /// The number of Tasks in the running or preparing state. + /// The number of Tasks in the completed state. + /// The number of Tasks which succeeded. A Task succeeds if its result (found in the executionInfo property) is 'success'. + /// The number of Tasks which failed. A Task fails if its result (found in the executionInfo property) is 'failure'. + /// Keeps track of any properties unknown to the library. + internal BatchTaskCounts(int active, int running, int completed, int succeeded, int failed, IDictionary serializedAdditionalRawData) + { + Active = active; + Running = running; + Completed = completed; + Succeeded = succeeded; + Failed = failed; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchTaskCounts() + { + } + + /// The number of Tasks in the active state. + public int Active { get; } + /// The number of Tasks in the running or preparing state. + public int Running { get; } + /// The number of Tasks in the completed state. + public int Completed { get; } + /// The number of Tasks which succeeded. A Task succeeds if its result (found in the executionInfo property) is 'success'. + public int Succeeded { get; } + /// The number of Tasks which failed. A Task fails if its result (found in the executionInfo property) is 'failure'. + public int Failed { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskCountsResult.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskCountsResult.Serialization.cs new file mode 100644 index 0000000000000..391729746f972 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskCountsResult.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchTaskCountsResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchTaskCountsResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("taskCounts"u8); + writer.WriteObjectValue(TaskCounts, options); + writer.WritePropertyName("taskSlotCounts"u8); + writer.WriteObjectValue(TaskSlotCounts, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchTaskCountsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchTaskCountsResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchTaskCountsResult(document.RootElement, options); + } + + internal static BatchTaskCountsResult DeserializeBatchTaskCountsResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BatchTaskCounts taskCounts = default; + BatchTaskSlotCounts taskSlotCounts = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("taskCounts"u8)) + { + taskCounts = BatchTaskCounts.DeserializeBatchTaskCounts(property.Value, options); + continue; + } + if (property.NameEquals("taskSlotCounts"u8)) + { + taskSlotCounts = BatchTaskSlotCounts.DeserializeBatchTaskSlotCounts(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchTaskCountsResult(taskCounts, taskSlotCounts, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchTaskCountsResult)} does not support writing '{options.Format}' format."); + } + } + + BatchTaskCountsResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchTaskCountsResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchTaskCountsResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchTaskCountsResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchTaskCountsResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskCountsResult.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskCountsResult.cs new file mode 100644 index 0000000000000..e65c44f712bc4 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskCountsResult.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// The Task and TaskSlot counts for a Job. + public partial class BatchTaskCountsResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The number of Tasks per state. + /// The number of TaskSlots required by Tasks per state. + /// or is null. + internal BatchTaskCountsResult(BatchTaskCounts taskCounts, BatchTaskSlotCounts taskSlotCounts) + { + Argument.AssertNotNull(taskCounts, nameof(taskCounts)); + Argument.AssertNotNull(taskSlotCounts, nameof(taskSlotCounts)); + + TaskCounts = taskCounts; + TaskSlotCounts = taskSlotCounts; + } + + /// Initializes a new instance of . + /// The number of Tasks per state. + /// The number of TaskSlots required by Tasks per state. + /// Keeps track of any properties unknown to the library. + internal BatchTaskCountsResult(BatchTaskCounts taskCounts, BatchTaskSlotCounts taskSlotCounts, IDictionary serializedAdditionalRawData) + { + TaskCounts = taskCounts; + TaskSlotCounts = taskSlotCounts; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchTaskCountsResult() + { + } + + /// The number of Tasks per state. + public BatchTaskCounts TaskCounts { get; } + /// The number of TaskSlots required by Tasks per state. + public BatchTaskSlotCounts TaskSlotCounts { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskCreateContent.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskCreateContent.Serialization.cs new file mode 100644 index 0000000000000..6481923dc5851 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskCreateContent.Serialization.cs @@ -0,0 +1,406 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchTaskCreateContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchTaskCreateContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsDefined(ExitConditions)) + { + writer.WritePropertyName("exitConditions"u8); + writer.WriteObjectValue(ExitConditions, options); + } + writer.WritePropertyName("commandLine"u8); + writer.WriteStringValue(CommandLine); + if (Optional.IsDefined(ContainerSettings)) + { + writer.WritePropertyName("containerSettings"u8); + writer.WriteObjectValue(ContainerSettings, options); + } + if (Optional.IsCollectionDefined(ResourceFiles)) + { + writer.WritePropertyName("resourceFiles"u8); + writer.WriteStartArray(); + foreach (var item in ResourceFiles) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(OutputFiles)) + { + writer.WritePropertyName("outputFiles"u8); + writer.WriteStartArray(); + foreach (var item in OutputFiles) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(EnvironmentSettings)) + { + writer.WritePropertyName("environmentSettings"u8); + writer.WriteStartArray(); + foreach (var item in EnvironmentSettings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(AffinityInfo)) + { + writer.WritePropertyName("affinityInfo"u8); + writer.WriteObjectValue(AffinityInfo, options); + } + if (Optional.IsDefined(Constraints)) + { + writer.WritePropertyName("constraints"u8); + writer.WriteObjectValue(Constraints, options); + } + if (Optional.IsDefined(RequiredSlots)) + { + writer.WritePropertyName("requiredSlots"u8); + writer.WriteNumberValue(RequiredSlots.Value); + } + if (Optional.IsDefined(UserIdentity)) + { + writer.WritePropertyName("userIdentity"u8); + writer.WriteObjectValue(UserIdentity, options); + } + if (Optional.IsDefined(MultiInstanceSettings)) + { + writer.WritePropertyName("multiInstanceSettings"u8); + writer.WriteObjectValue(MultiInstanceSettings, options); + } + if (Optional.IsDefined(DependsOn)) + { + writer.WritePropertyName("dependsOn"u8); + writer.WriteObjectValue(DependsOn, options); + } + if (Optional.IsCollectionDefined(ApplicationPackageReferences)) + { + writer.WritePropertyName("applicationPackageReferences"u8); + writer.WriteStartArray(); + foreach (var item in ApplicationPackageReferences) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(AuthenticationTokenSettings)) + { + writer.WritePropertyName("authenticationTokenSettings"u8); + writer.WriteObjectValue(AuthenticationTokenSettings, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchTaskCreateContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchTaskCreateContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchTaskCreateContent(document.RootElement, options); + } + + internal static BatchTaskCreateContent DeserializeBatchTaskCreateContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + string displayName = default; + ExitConditions exitConditions = default; + string commandLine = default; + BatchTaskContainerSettings containerSettings = default; + IList resourceFiles = default; + IList outputFiles = default; + IList environmentSettings = default; + AffinityInfo affinityInfo = default; + BatchTaskConstraints constraints = default; + int? requiredSlots = default; + UserIdentity userIdentity = default; + MultiInstanceSettings multiInstanceSettings = default; + BatchTaskDependencies dependsOn = default; + IList applicationPackageReferences = default; + AuthenticationTokenSettings authenticationTokenSettings = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("exitConditions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + exitConditions = ExitConditions.DeserializeExitConditions(property.Value, options); + continue; + } + if (property.NameEquals("commandLine"u8)) + { + commandLine = property.Value.GetString(); + continue; + } + if (property.NameEquals("containerSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + containerSettings = BatchTaskContainerSettings.DeserializeBatchTaskContainerSettings(property.Value, options); + continue; + } + if (property.NameEquals("resourceFiles"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceFile.DeserializeResourceFile(item, options)); + } + resourceFiles = array; + continue; + } + if (property.NameEquals("outputFiles"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(OutputFile.DeserializeOutputFile(item, options)); + } + outputFiles = array; + continue; + } + if (property.NameEquals("environmentSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EnvironmentSetting.DeserializeEnvironmentSetting(item, options)); + } + environmentSettings = array; + continue; + } + if (property.NameEquals("affinityInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + affinityInfo = AffinityInfo.DeserializeAffinityInfo(property.Value, options); + continue; + } + if (property.NameEquals("constraints"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + constraints = BatchTaskConstraints.DeserializeBatchTaskConstraints(property.Value, options); + continue; + } + if (property.NameEquals("requiredSlots"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + requiredSlots = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("userIdentity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userIdentity = UserIdentity.DeserializeUserIdentity(property.Value, options); + continue; + } + if (property.NameEquals("multiInstanceSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + multiInstanceSettings = MultiInstanceSettings.DeserializeMultiInstanceSettings(property.Value, options); + continue; + } + if (property.NameEquals("dependsOn"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dependsOn = BatchTaskDependencies.DeserializeBatchTaskDependencies(property.Value, options); + continue; + } + if (property.NameEquals("applicationPackageReferences"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BatchApplicationPackageReference.DeserializeBatchApplicationPackageReference(item, options)); + } + applicationPackageReferences = array; + continue; + } + if (property.NameEquals("authenticationTokenSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authenticationTokenSettings = AuthenticationTokenSettings.DeserializeAuthenticationTokenSettings(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchTaskCreateContent( + id, + displayName, + exitConditions, + commandLine, + containerSettings, + resourceFiles ?? new ChangeTrackingList(), + outputFiles ?? new ChangeTrackingList(), + environmentSettings ?? new ChangeTrackingList(), + affinityInfo, + constraints, + requiredSlots, + userIdentity, + multiInstanceSettings, + dependsOn, + applicationPackageReferences ?? new ChangeTrackingList(), + authenticationTokenSettings, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchTaskCreateContent)} does not support writing '{options.Format}' format."); + } + } + + BatchTaskCreateContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchTaskCreateContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchTaskCreateContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchTaskCreateContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchTaskCreateContent(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskCreateContent.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskCreateContent.cs new file mode 100644 index 0000000000000..88818560e6b85 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskCreateContent.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Parameters for creating an Azure Batch Task. + public partial class BatchTaskCreateContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// A string that uniquely identifies the Task within the Job. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within a Job that differ only by case). + /// The command line of the Task. For multi-instance Tasks, the command line is executed as the primary Task, after the primary Task and all subtasks have finished executing the coordination command line. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + /// or is null. + public BatchTaskCreateContent(string id, string commandLine) + { + Argument.AssertNotNull(id, nameof(id)); + Argument.AssertNotNull(commandLine, nameof(commandLine)); + + Id = id; + CommandLine = commandLine; + ResourceFiles = new ChangeTrackingList(); + OutputFiles = new ChangeTrackingList(); + EnvironmentSettings = new ChangeTrackingList(); + ApplicationPackageReferences = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// A string that uniquely identifies the Task within the Job. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within a Job that differ only by case). + /// A display name for the Task. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. + /// How the Batch service should respond when the Task completes. + /// The command line of the Task. For multi-instance Tasks, the command line is executed as the primary Task, after the primary Task and all subtasks have finished executing the coordination command line. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + /// The settings for the container under which the Task runs. If the Pool that will run this Task has containerConfiguration set, this must be set as well. If the Pool that will run this Task doesn't have containerConfiguration set, this must not be set. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. + /// A list of files that the Batch service will download to the Compute Node before running the command line. For multi-instance Tasks, the resource files will only be downloaded to the Compute Node on which the primary Task is executed. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. + /// A list of files that the Batch service will upload from the Compute Node after running the command line. For multi-instance Tasks, the files will only be uploaded from the Compute Node on which the primary Task is executed. + /// A list of environment variable settings for the Task. + /// A locality hint that can be used by the Batch service to select a Compute Node on which to start the new Task. + /// The execution constraints that apply to this Task. If you do not specify constraints, the maxTaskRetryCount is the maxTaskRetryCount specified for the Job, the maxWallClockTime is infinite, and the retentionTime is 7 days. + /// The number of scheduling slots that the Task required to run. The default is 1. A Task can only be scheduled to run on a compute node if the node has enough free scheduling slots available. For multi-instance Tasks, this must be 1. + /// The user identity under which the Task runs. If omitted, the Task runs as a non-administrative user unique to the Task. + /// An object that indicates that the Task is a multi-instance Task, and contains information about how to run the multi-instance Task. + /// The Tasks that this Task depends on. This Task will not be scheduled until all Tasks that it depends on have completed successfully. If any of those Tasks fail and exhaust their retry counts, this Task will never be scheduled. If the Job does not have usesTaskDependencies set to true, and this element is present, the request fails with error code TaskDependenciesNotSpecifiedOnJob. + /// A list of Packages that the Batch service will deploy to the Compute Node before running the command line. Application packages are downloaded and deployed to a shared directory, not the Task working directory. Therefore, if a referenced package is already on the Node, and is up to date, then it is not re-downloaded; the existing copy on the Compute Node is used. If a referenced Package cannot be installed, for example because the package has been deleted or because download failed, the Task fails. + /// The settings for an authentication token that the Task can use to perform Batch service operations. If this property is set, the Batch service provides the Task with an authentication token which can be used to authenticate Batch service operations without requiring an Account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the Task can carry out using the token depend on the settings. For example, a Task can request Job permissions in order to add other Tasks to the Job, or check the status of the Job or of other Tasks under the Job. + /// Keeps track of any properties unknown to the library. + internal BatchTaskCreateContent(string id, string displayName, ExitConditions exitConditions, string commandLine, BatchTaskContainerSettings containerSettings, IList resourceFiles, IList outputFiles, IList environmentSettings, AffinityInfo affinityInfo, BatchTaskConstraints constraints, int? requiredSlots, UserIdentity userIdentity, MultiInstanceSettings multiInstanceSettings, BatchTaskDependencies dependsOn, IList applicationPackageReferences, AuthenticationTokenSettings authenticationTokenSettings, IDictionary serializedAdditionalRawData) + { + Id = id; + DisplayName = displayName; + ExitConditions = exitConditions; + CommandLine = commandLine; + ContainerSettings = containerSettings; + ResourceFiles = resourceFiles; + OutputFiles = outputFiles; + EnvironmentSettings = environmentSettings; + AffinityInfo = affinityInfo; + Constraints = constraints; + RequiredSlots = requiredSlots; + UserIdentity = userIdentity; + MultiInstanceSettings = multiInstanceSettings; + DependsOn = dependsOn; + ApplicationPackageReferences = applicationPackageReferences; + AuthenticationTokenSettings = authenticationTokenSettings; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchTaskCreateContent() + { + } + + /// A string that uniquely identifies the Task within the Job. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within a Job that differ only by case). + public string Id { get; } + /// A display name for the Task. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. + public string DisplayName { get; set; } + /// How the Batch service should respond when the Task completes. + public ExitConditions ExitConditions { get; set; } + /// The command line of the Task. For multi-instance Tasks, the command line is executed as the primary Task, after the primary Task and all subtasks have finished executing the coordination command line. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + public string CommandLine { get; } + /// The settings for the container under which the Task runs. If the Pool that will run this Task has containerConfiguration set, this must be set as well. If the Pool that will run this Task doesn't have containerConfiguration set, this must not be set. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. + public BatchTaskContainerSettings ContainerSettings { get; set; } + /// A list of files that the Batch service will download to the Compute Node before running the command line. For multi-instance Tasks, the resource files will only be downloaded to the Compute Node on which the primary Task is executed. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. + public IList ResourceFiles { get; } + /// A list of files that the Batch service will upload from the Compute Node after running the command line. For multi-instance Tasks, the files will only be uploaded from the Compute Node on which the primary Task is executed. + public IList OutputFiles { get; } + /// A list of environment variable settings for the Task. + public IList EnvironmentSettings { get; } + /// A locality hint that can be used by the Batch service to select a Compute Node on which to start the new Task. + public AffinityInfo AffinityInfo { get; set; } + /// The execution constraints that apply to this Task. If you do not specify constraints, the maxTaskRetryCount is the maxTaskRetryCount specified for the Job, the maxWallClockTime is infinite, and the retentionTime is 7 days. + public BatchTaskConstraints Constraints { get; set; } + /// The number of scheduling slots that the Task required to run. The default is 1. A Task can only be scheduled to run on a compute node if the node has enough free scheduling slots available. For multi-instance Tasks, this must be 1. + public int? RequiredSlots { get; set; } + /// The user identity under which the Task runs. If omitted, the Task runs as a non-administrative user unique to the Task. + public UserIdentity UserIdentity { get; set; } + /// An object that indicates that the Task is a multi-instance Task, and contains information about how to run the multi-instance Task. + public MultiInstanceSettings MultiInstanceSettings { get; set; } + /// The Tasks that this Task depends on. This Task will not be scheduled until all Tasks that it depends on have completed successfully. If any of those Tasks fail and exhaust their retry counts, this Task will never be scheduled. If the Job does not have usesTaskDependencies set to true, and this element is present, the request fails with error code TaskDependenciesNotSpecifiedOnJob. + public BatchTaskDependencies DependsOn { get; set; } + /// A list of Packages that the Batch service will deploy to the Compute Node before running the command line. Application packages are downloaded and deployed to a shared directory, not the Task working directory. Therefore, if a referenced package is already on the Node, and is up to date, then it is not re-downloaded; the existing copy on the Compute Node is used. If a referenced Package cannot be installed, for example because the package has been deleted or because download failed, the Task fails. + public IList ApplicationPackageReferences { get; } + /// The settings for an authentication token that the Task can use to perform Batch service operations. If this property is set, the Batch service provides the Task with an authentication token which can be used to authenticate Batch service operations without requiring an Account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the Task can carry out using the token depend on the settings. For example, a Task can request Job permissions in order to add other Tasks to the Job, or check the status of the Job or of other Tasks under the Job. + public AuthenticationTokenSettings AuthenticationTokenSettings { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskDependencies.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskDependencies.Serialization.cs new file mode 100644 index 0000000000000..f60524791f391 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskDependencies.Serialization.cs @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchTaskDependencies : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchTaskDependencies)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(TaskIds)) + { + writer.WritePropertyName("taskIds"u8); + writer.WriteStartArray(); + foreach (var item in TaskIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(TaskIdRanges)) + { + writer.WritePropertyName("taskIdRanges"u8); + writer.WriteStartArray(); + foreach (var item in TaskIdRanges) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchTaskDependencies IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchTaskDependencies)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchTaskDependencies(document.RootElement, options); + } + + internal static BatchTaskDependencies DeserializeBatchTaskDependencies(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList taskIds = default; + IList taskIdRanges = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("taskIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + taskIds = array; + continue; + } + if (property.NameEquals("taskIdRanges"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BatchTaskIdRange.DeserializeBatchTaskIdRange(item, options)); + } + taskIdRanges = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchTaskDependencies(taskIds ?? new ChangeTrackingList(), taskIdRanges ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchTaskDependencies)} does not support writing '{options.Format}' format."); + } + } + + BatchTaskDependencies IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchTaskDependencies(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchTaskDependencies)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchTaskDependencies FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchTaskDependencies(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskDependencies.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskDependencies.cs new file mode 100644 index 0000000000000..a0038ba94fe9f --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskDependencies.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// + /// Specifies any dependencies of a Task. Any Task that is explicitly specified or + /// within a dependency range must complete before the dependant Task will be + /// scheduled. + /// + public partial class BatchTaskDependencies + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public BatchTaskDependencies() + { + TaskIds = new ChangeTrackingList(); + TaskIdRanges = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The list of Task IDs that this Task depends on. All Tasks in this list must complete successfully before the dependent Task can be scheduled. The taskIds collection is limited to 64000 characters total (i.e. the combined length of all Task IDs). If the taskIds collection exceeds the maximum length, the Add Task request fails with error code TaskDependencyListTooLong. In this case consider using Task ID ranges instead. + /// The list of Task ID ranges that this Task depends on. All Tasks in all ranges must complete successfully before the dependent Task can be scheduled. + /// Keeps track of any properties unknown to the library. + internal BatchTaskDependencies(IList taskIds, IList taskIdRanges, IDictionary serializedAdditionalRawData) + { + TaskIds = taskIds; + TaskIdRanges = taskIdRanges; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The list of Task IDs that this Task depends on. All Tasks in this list must complete successfully before the dependent Task can be scheduled. The taskIds collection is limited to 64000 characters total (i.e. the combined length of all Task IDs). If the taskIds collection exceeds the maximum length, the Add Task request fails with error code TaskDependencyListTooLong. In this case consider using Task ID ranges instead. + public IList TaskIds { get; } + /// The list of Task ID ranges that this Task depends on. All Tasks in all ranges must complete successfully before the dependent Task can be scheduled. + public IList TaskIdRanges { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskExecutionInfo.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskExecutionInfo.Serialization.cs new file mode 100644 index 0000000000000..37d904a938704 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskExecutionInfo.Serialization.cs @@ -0,0 +1,274 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchTaskExecutionInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchTaskExecutionInfo)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(StartTime)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartTime.Value, "O"); + } + if (Optional.IsDefined(EndTime)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndTime.Value, "O"); + } + if (Optional.IsDefined(ExitCode)) + { + writer.WritePropertyName("exitCode"u8); + writer.WriteNumberValue(ExitCode.Value); + } + if (Optional.IsDefined(ContainerInfo)) + { + writer.WritePropertyName("containerInfo"u8); + writer.WriteObjectValue(ContainerInfo, options); + } + if (Optional.IsDefined(FailureInfo)) + { + writer.WritePropertyName("failureInfo"u8); + writer.WriteObjectValue(FailureInfo, options); + } + writer.WritePropertyName("retryCount"u8); + writer.WriteNumberValue(RetryCount); + if (Optional.IsDefined(LastRetryTime)) + { + writer.WritePropertyName("lastRetryTime"u8); + writer.WriteStringValue(LastRetryTime.Value, "O"); + } + writer.WritePropertyName("requeueCount"u8); + writer.WriteNumberValue(RequeueCount); + if (Optional.IsDefined(LastRequeueTime)) + { + writer.WritePropertyName("lastRequeueTime"u8); + writer.WriteStringValue(LastRequeueTime.Value, "O"); + } + if (Optional.IsDefined(Result)) + { + writer.WritePropertyName("result"u8); + writer.WriteStringValue(Result.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchTaskExecutionInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchTaskExecutionInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchTaskExecutionInfo(document.RootElement, options); + } + + internal static BatchTaskExecutionInfo DeserializeBatchTaskExecutionInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? startTime = default; + DateTimeOffset? endTime = default; + int? exitCode = default; + BatchTaskContainerExecutionInfo containerInfo = default; + BatchTaskFailureInfo failureInfo = default; + int retryCount = default; + DateTimeOffset? lastRetryTime = default; + int requeueCount = default; + DateTimeOffset? lastRequeueTime = default; + BatchTaskExecutionResult? result = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("exitCode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + exitCode = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("containerInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + containerInfo = BatchTaskContainerExecutionInfo.DeserializeBatchTaskContainerExecutionInfo(property.Value, options); + continue; + } + if (property.NameEquals("failureInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + failureInfo = BatchTaskFailureInfo.DeserializeBatchTaskFailureInfo(property.Value, options); + continue; + } + if (property.NameEquals("retryCount"u8)) + { + retryCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("lastRetryTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastRetryTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("requeueCount"u8)) + { + requeueCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("lastRequeueTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastRequeueTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("result"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + result = new BatchTaskExecutionResult(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchTaskExecutionInfo( + startTime, + endTime, + exitCode, + containerInfo, + failureInfo, + retryCount, + lastRetryTime, + requeueCount, + lastRequeueTime, + result, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchTaskExecutionInfo)} does not support writing '{options.Format}' format."); + } + } + + BatchTaskExecutionInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchTaskExecutionInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchTaskExecutionInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchTaskExecutionInfo FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchTaskExecutionInfo(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskExecutionInfo.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskExecutionInfo.cs new file mode 100644 index 0000000000000..5f79f08c8d914 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskExecutionInfo.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Information about the execution of a Task. + public partial class BatchTaskExecutionInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The number of times the Task has been retried by the Batch service. Task application failures (non-zero exit code) are retried, pre-processing errors (the Task could not be run) and file upload errors are not retried. The Batch service will retry the Task up to the limit specified by the constraints. + /// The number of times the Task has been requeued by the Batch service as the result of a user request. When the user removes Compute Nodes from a Pool (by resizing/shrinking the pool) or when the Job is being disabled, the user can specify that running Tasks on the Compute Nodes be requeued for execution. This count tracks how many times the Task has been requeued for these reasons. + internal BatchTaskExecutionInfo(int retryCount, int requeueCount) + { + RetryCount = retryCount; + RequeueCount = requeueCount; + } + + /// Initializes a new instance of . + /// The time at which the Task started running. 'Running' corresponds to the running state, so if the Task specifies resource files or Packages, then the start time reflects the time at which the Task started downloading or deploying these. If the Task has been restarted or retried, this is the most recent time at which the Task started running. This property is present only for Tasks that are in the running or completed state. + /// The time at which the Task completed. This property is set only if the Task is in the Completed state. + /// The exit code of the program specified on the Task command line. This property is set only if the Task is in the completed state. In general, the exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. However, if the Batch service terminates the Task (due to timeout, or user termination via the API) you may see an operating system-defined exit code. + /// Information about the container under which the Task is executing. This property is set only if the Task runs in a container context. + /// Information describing the Task failure, if any. This property is set only if the Task is in the completed state and encountered a failure. + /// The number of times the Task has been retried by the Batch service. Task application failures (non-zero exit code) are retried, pre-processing errors (the Task could not be run) and file upload errors are not retried. The Batch service will retry the Task up to the limit specified by the constraints. + /// The most recent time at which a retry of the Task started running. This element is present only if the Task was retried (i.e. retryCount is nonzero). If present, this is typically the same as startTime, but may be different if the Task has been restarted for reasons other than retry; for example, if the Compute Node was rebooted during a retry, then the startTime is updated but the lastRetryTime is not. + /// The number of times the Task has been requeued by the Batch service as the result of a user request. When the user removes Compute Nodes from a Pool (by resizing/shrinking the pool) or when the Job is being disabled, the user can specify that running Tasks on the Compute Nodes be requeued for execution. This count tracks how many times the Task has been requeued for these reasons. + /// The most recent time at which the Task has been requeued by the Batch service as the result of a user request. This property is set only if the requeueCount is nonzero. + /// The result of the Task execution. If the value is 'failed', then the details of the failure can be found in the failureInfo property. + /// Keeps track of any properties unknown to the library. + internal BatchTaskExecutionInfo(DateTimeOffset? startTime, DateTimeOffset? endTime, int? exitCode, BatchTaskContainerExecutionInfo containerInfo, BatchTaskFailureInfo failureInfo, int retryCount, DateTimeOffset? lastRetryTime, int requeueCount, DateTimeOffset? lastRequeueTime, BatchTaskExecutionResult? result, IDictionary serializedAdditionalRawData) + { + StartTime = startTime; + EndTime = endTime; + ExitCode = exitCode; + ContainerInfo = containerInfo; + FailureInfo = failureInfo; + RetryCount = retryCount; + LastRetryTime = lastRetryTime; + RequeueCount = requeueCount; + LastRequeueTime = lastRequeueTime; + Result = result; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchTaskExecutionInfo() + { + } + + /// The time at which the Task started running. 'Running' corresponds to the running state, so if the Task specifies resource files or Packages, then the start time reflects the time at which the Task started downloading or deploying these. If the Task has been restarted or retried, this is the most recent time at which the Task started running. This property is present only for Tasks that are in the running or completed state. + public DateTimeOffset? StartTime { get; } + /// The time at which the Task completed. This property is set only if the Task is in the Completed state. + public DateTimeOffset? EndTime { get; } + /// The exit code of the program specified on the Task command line. This property is set only if the Task is in the completed state. In general, the exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. However, if the Batch service terminates the Task (due to timeout, or user termination via the API) you may see an operating system-defined exit code. + public int? ExitCode { get; } + /// Information about the container under which the Task is executing. This property is set only if the Task runs in a container context. + public BatchTaskContainerExecutionInfo ContainerInfo { get; } + /// Information describing the Task failure, if any. This property is set only if the Task is in the completed state and encountered a failure. + public BatchTaskFailureInfo FailureInfo { get; } + /// The number of times the Task has been retried by the Batch service. Task application failures (non-zero exit code) are retried, pre-processing errors (the Task could not be run) and file upload errors are not retried. The Batch service will retry the Task up to the limit specified by the constraints. + public int RetryCount { get; } + /// The most recent time at which a retry of the Task started running. This element is present only if the Task was retried (i.e. retryCount is nonzero). If present, this is typically the same as startTime, but may be different if the Task has been restarted for reasons other than retry; for example, if the Compute Node was rebooted during a retry, then the startTime is updated but the lastRetryTime is not. + public DateTimeOffset? LastRetryTime { get; } + /// The number of times the Task has been requeued by the Batch service as the result of a user request. When the user removes Compute Nodes from a Pool (by resizing/shrinking the pool) or when the Job is being disabled, the user can specify that running Tasks on the Compute Nodes be requeued for execution. This count tracks how many times the Task has been requeued for these reasons. + public int RequeueCount { get; } + /// The most recent time at which the Task has been requeued by the Batch service as the result of a user request. This property is set only if the requeueCount is nonzero. + public DateTimeOffset? LastRequeueTime { get; } + /// The result of the Task execution. If the value is 'failed', then the details of the failure can be found in the failureInfo property. + public BatchTaskExecutionResult? Result { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskExecutionResult.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskExecutionResult.cs new file mode 100644 index 0000000000000..2ae1bf318a0f1 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskExecutionResult.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.Compute.Batch +{ + /// BatchTaskExecutionResult enums. + public readonly partial struct BatchTaskExecutionResult : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BatchTaskExecutionResult(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SuccessValue = "success"; + private const string FailureValue = "failure"; + + /// The Task ran successfully. + public static BatchTaskExecutionResult Success { get; } = new BatchTaskExecutionResult(SuccessValue); + /// There was an error during processing of the Task. The failure may have occurred before the Task process was launched, while the Task process was executing, or after the Task process exited. + public static BatchTaskExecutionResult Failure { get; } = new BatchTaskExecutionResult(FailureValue); + /// Determines if two values are the same. + public static bool operator ==(BatchTaskExecutionResult left, BatchTaskExecutionResult right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BatchTaskExecutionResult left, BatchTaskExecutionResult right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator BatchTaskExecutionResult(string value) => new BatchTaskExecutionResult(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BatchTaskExecutionResult other && Equals(other); + /// + public bool Equals(BatchTaskExecutionResult other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskFailureInfo.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskFailureInfo.Serialization.cs new file mode 100644 index 0000000000000..2d5f3ce06d382 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskFailureInfo.Serialization.cs @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchTaskFailureInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchTaskFailureInfo)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category.ToString()); + if (Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + } + if (Optional.IsDefined(Message)) + { + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + } + if (Optional.IsCollectionDefined(Details)) + { + writer.WritePropertyName("details"u8); + writer.WriteStartArray(); + foreach (var item in Details) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchTaskFailureInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchTaskFailureInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchTaskFailureInfo(document.RootElement, options); + } + + internal static BatchTaskFailureInfo DeserializeBatchTaskFailureInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ErrorCategory category = default; + string code = default; + string message = default; + IReadOnlyList details = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category"u8)) + { + category = new ErrorCategory(property.Value.GetString()); + continue; + } + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("details"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NameValuePair.DeserializeNameValuePair(item, options)); + } + details = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchTaskFailureInfo(category, code, message, details ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchTaskFailureInfo)} does not support writing '{options.Format}' format."); + } + } + + BatchTaskFailureInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchTaskFailureInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchTaskFailureInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchTaskFailureInfo FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchTaskFailureInfo(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskFailureInfo.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskFailureInfo.cs new file mode 100644 index 0000000000000..870ca54a89eb9 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskFailureInfo.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Information about a Task failure. + public partial class BatchTaskFailureInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The category of the Task error. + internal BatchTaskFailureInfo(ErrorCategory category) + { + Category = category; + Details = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The category of the Task error. + /// An identifier for the Task error. Codes are invariant and are intended to be consumed programmatically. + /// A message describing the Task error, intended to be suitable for display in a user interface. + /// A list of additional details related to the error. + /// Keeps track of any properties unknown to the library. + internal BatchTaskFailureInfo(ErrorCategory category, string code, string message, IReadOnlyList details, IDictionary serializedAdditionalRawData) + { + Category = category; + Code = code; + Message = message; + Details = details; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchTaskFailureInfo() + { + } + + /// The category of the Task error. + public ErrorCategory Category { get; } + /// An identifier for the Task error. Codes are invariant and are intended to be consumed programmatically. + public string Code { get; } + /// A message describing the Task error, intended to be suitable for display in a user interface. + public string Message { get; } + /// A list of additional details related to the error. + public IReadOnlyList Details { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskGroup.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskGroup.Serialization.cs new file mode 100644 index 0000000000000..e6a413291e88b --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskGroup.Serialization.cs @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchTaskGroup : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchTaskGroup)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchTaskGroup IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchTaskGroup)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchTaskGroup(document.RootElement, options); + } + + internal static BatchTaskGroup DeserializeBatchTaskGroup(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BatchTaskCreateContent.DeserializeBatchTaskCreateContent(item, options)); + } + value = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchTaskGroup(value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchTaskGroup)} does not support writing '{options.Format}' format."); + } + } + + BatchTaskGroup IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchTaskGroup(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchTaskGroup)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchTaskGroup FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchTaskGroup(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskGroup.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskGroup.cs new file mode 100644 index 0000000000000..952152f88850e --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskGroup.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Compute.Batch +{ + /// A collection of Azure Batch Tasks to add. + public partial class BatchTaskGroup + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The collection of Tasks to add. The maximum count of Tasks is 100. The total serialized size of this collection must be less than 1MB. If it is greater than 1MB (for example if each Task has 100's of resource files or environment variables), the request will fail with code 'RequestBodyTooLarge' and should be retried again with fewer Tasks. + /// is null. + public BatchTaskGroup(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The collection of Tasks to add. The maximum count of Tasks is 100. The total serialized size of this collection must be less than 1MB. If it is greater than 1MB (for example if each Task has 100's of resource files or environment variables), the request will fail with code 'RequestBodyTooLarge' and should be retried again with fewer Tasks. + /// Keeps track of any properties unknown to the library. + internal BatchTaskGroup(IList value, IDictionary serializedAdditionalRawData) + { + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchTaskGroup() + { + } + + /// The collection of Tasks to add. The maximum count of Tasks is 100. The total serialized size of this collection must be less than 1MB. If it is greater than 1MB (for example if each Task has 100's of resource files or environment variables), the request will fail with code 'RequestBodyTooLarge' and should be retried again with fewer Tasks. + public IList Value { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskIdRange.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskIdRange.Serialization.cs new file mode 100644 index 0000000000000..939c14d5d8396 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskIdRange.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchTaskIdRange : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchTaskIdRange)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("start"u8); + writer.WriteNumberValue(Start); + writer.WritePropertyName("end"u8); + writer.WriteNumberValue(End); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchTaskIdRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchTaskIdRange)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchTaskIdRange(document.RootElement, options); + } + + internal static BatchTaskIdRange DeserializeBatchTaskIdRange(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int start = default; + int end = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("start"u8)) + { + start = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("end"u8)) + { + end = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchTaskIdRange(start, end, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchTaskIdRange)} does not support writing '{options.Format}' format."); + } + } + + BatchTaskIdRange IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchTaskIdRange(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchTaskIdRange)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchTaskIdRange FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchTaskIdRange(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskIdRange.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskIdRange.cs new file mode 100644 index 0000000000000..c0eb5a78bc418 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskIdRange.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// + /// The start and end of the range are inclusive. For example, if a range has start + /// 9 and end 12, then it represents Tasks '9', '10', '11' and '12'. + /// + public partial class BatchTaskIdRange + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The first Task ID in the range. + /// The last Task ID in the range. + public BatchTaskIdRange(int start, int end) + { + Start = start; + End = end; + } + + /// Initializes a new instance of . + /// The first Task ID in the range. + /// The last Task ID in the range. + /// Keeps track of any properties unknown to the library. + internal BatchTaskIdRange(int start, int end, IDictionary serializedAdditionalRawData) + { + Start = start; + End = end; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchTaskIdRange() + { + } + + /// The first Task ID in the range. + public int Start { get; set; } + /// The last Task ID in the range. + public int End { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskInfo.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskInfo.Serialization.cs new file mode 100644 index 0000000000000..ecc2b0cc77622 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskInfo.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchTaskInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchTaskInfo)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(TaskUrl)) + { + writer.WritePropertyName("taskUrl"u8); + writer.WriteStringValue(TaskUrl); + } + if (Optional.IsDefined(JobId)) + { + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); + } + if (Optional.IsDefined(TaskId)) + { + writer.WritePropertyName("taskId"u8); + writer.WriteStringValue(TaskId); + } + if (Optional.IsDefined(SubtaskId)) + { + writer.WritePropertyName("subtaskId"u8); + writer.WriteNumberValue(SubtaskId.Value); + } + writer.WritePropertyName("taskState"u8); + writer.WriteStringValue(TaskState.ToString()); + if (Optional.IsDefined(ExecutionInfo)) + { + writer.WritePropertyName("executionInfo"u8); + writer.WriteObjectValue(ExecutionInfo, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchTaskInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchTaskInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchTaskInfo(document.RootElement, options); + } + + internal static BatchTaskInfo DeserializeBatchTaskInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string taskUrl = default; + string jobId = default; + string taskId = default; + int? subtaskId = default; + BatchTaskState taskState = default; + BatchTaskExecutionInfo executionInfo = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("taskUrl"u8)) + { + taskUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("jobId"u8)) + { + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("taskId"u8)) + { + taskId = property.Value.GetString(); + continue; + } + if (property.NameEquals("subtaskId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subtaskId = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("taskState"u8)) + { + taskState = new BatchTaskState(property.Value.GetString()); + continue; + } + if (property.NameEquals("executionInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + executionInfo = BatchTaskExecutionInfo.DeserializeBatchTaskExecutionInfo(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchTaskInfo( + taskUrl, + jobId, + taskId, + subtaskId, + taskState, + executionInfo, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchTaskInfo)} does not support writing '{options.Format}' format."); + } + } + + BatchTaskInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchTaskInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchTaskInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchTaskInfo FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchTaskInfo(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskInfo.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskInfo.cs new file mode 100644 index 0000000000000..1302e69a62a5f --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskInfo.cs @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Information about a Task running on a Compute Node. + public partial class BatchTaskInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The current state of the Task. + internal BatchTaskInfo(BatchTaskState taskState) + { + TaskState = taskState; + } + + /// Initializes a new instance of . + /// The URL of the Task. + /// The ID of the Job to which the Task belongs. + /// The ID of the Task. + /// The ID of the subtask if the Task is a multi-instance Task. + /// The current state of the Task. + /// Information about the execution of the Task. + /// Keeps track of any properties unknown to the library. + internal BatchTaskInfo(string taskUrl, string jobId, string taskId, int? subtaskId, BatchTaskState taskState, BatchTaskExecutionInfo executionInfo, IDictionary serializedAdditionalRawData) + { + TaskUrl = taskUrl; + JobId = jobId; + TaskId = taskId; + SubtaskId = subtaskId; + TaskState = taskState; + ExecutionInfo = executionInfo; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchTaskInfo() + { + } + + /// The URL of the Task. + public string TaskUrl { get; } + /// The ID of the Job to which the Task belongs. + public string JobId { get; } + /// The ID of the Task. + public string TaskId { get; } + /// The ID of the subtask if the Task is a multi-instance Task. + public int? SubtaskId { get; } + /// The current state of the Task. + public BatchTaskState TaskState { get; } + /// Information about the execution of the Task. + public BatchTaskExecutionInfo ExecutionInfo { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskSchedulingPolicy.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskSchedulingPolicy.Serialization.cs new file mode 100644 index 0000000000000..418c684f12401 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskSchedulingPolicy.Serialization.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchTaskSchedulingPolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchTaskSchedulingPolicy)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("nodeFillType"u8); + writer.WriteStringValue(NodeFillType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchTaskSchedulingPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchTaskSchedulingPolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchTaskSchedulingPolicy(document.RootElement, options); + } + + internal static BatchTaskSchedulingPolicy DeserializeBatchTaskSchedulingPolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BatchNodeFillType nodeFillType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nodeFillType"u8)) + { + nodeFillType = new BatchNodeFillType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchTaskSchedulingPolicy(nodeFillType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchTaskSchedulingPolicy)} does not support writing '{options.Format}' format."); + } + } + + BatchTaskSchedulingPolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchTaskSchedulingPolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchTaskSchedulingPolicy)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchTaskSchedulingPolicy FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchTaskSchedulingPolicy(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskSchedulingPolicy.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskSchedulingPolicy.cs new file mode 100644 index 0000000000000..40078de0754f6 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskSchedulingPolicy.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Specifies how Tasks should be distributed across Compute Nodes. + public partial class BatchTaskSchedulingPolicy + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// How Tasks are distributed across Compute Nodes in a Pool. If not specified, the default is spread. + public BatchTaskSchedulingPolicy(BatchNodeFillType nodeFillType) + { + NodeFillType = nodeFillType; + } + + /// Initializes a new instance of . + /// How Tasks are distributed across Compute Nodes in a Pool. If not specified, the default is spread. + /// Keeps track of any properties unknown to the library. + internal BatchTaskSchedulingPolicy(BatchNodeFillType nodeFillType, IDictionary serializedAdditionalRawData) + { + NodeFillType = nodeFillType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchTaskSchedulingPolicy() + { + } + + /// How Tasks are distributed across Compute Nodes in a Pool. If not specified, the default is spread. + public BatchNodeFillType NodeFillType { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskSlotCounts.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskSlotCounts.Serialization.cs new file mode 100644 index 0000000000000..0ff4c5b62c720 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskSlotCounts.Serialization.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchTaskSlotCounts : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchTaskSlotCounts)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("active"u8); + writer.WriteNumberValue(Active); + writer.WritePropertyName("running"u8); + writer.WriteNumberValue(Running); + writer.WritePropertyName("completed"u8); + writer.WriteNumberValue(Completed); + writer.WritePropertyName("succeeded"u8); + writer.WriteNumberValue(Succeeded); + writer.WritePropertyName("failed"u8); + writer.WriteNumberValue(Failed); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchTaskSlotCounts IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchTaskSlotCounts)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchTaskSlotCounts(document.RootElement, options); + } + + internal static BatchTaskSlotCounts DeserializeBatchTaskSlotCounts(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int active = default; + int running = default; + int completed = default; + int succeeded = default; + int failed = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("active"u8)) + { + active = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("running"u8)) + { + running = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("completed"u8)) + { + completed = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("succeeded"u8)) + { + succeeded = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("failed"u8)) + { + failed = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchTaskSlotCounts( + active, + running, + completed, + succeeded, + failed, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchTaskSlotCounts)} does not support writing '{options.Format}' format."); + } + } + + BatchTaskSlotCounts IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchTaskSlotCounts(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchTaskSlotCounts)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchTaskSlotCounts FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchTaskSlotCounts(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskSlotCounts.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskSlotCounts.cs new file mode 100644 index 0000000000000..f413a24cb7410 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskSlotCounts.cs @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// The TaskSlot counts for a Job. + public partial class BatchTaskSlotCounts + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The number of TaskSlots for active Tasks. + /// The number of TaskSlots for running Tasks. + /// The number of TaskSlots for completed Tasks. + /// The number of TaskSlots for succeeded Tasks. + /// The number of TaskSlots for failed Tasks. + internal BatchTaskSlotCounts(int active, int running, int completed, int succeeded, int failed) + { + Active = active; + Running = running; + Completed = completed; + Succeeded = succeeded; + Failed = failed; + } + + /// Initializes a new instance of . + /// The number of TaskSlots for active Tasks. + /// The number of TaskSlots for running Tasks. + /// The number of TaskSlots for completed Tasks. + /// The number of TaskSlots for succeeded Tasks. + /// The number of TaskSlots for failed Tasks. + /// Keeps track of any properties unknown to the library. + internal BatchTaskSlotCounts(int active, int running, int completed, int succeeded, int failed, IDictionary serializedAdditionalRawData) + { + Active = active; + Running = running; + Completed = completed; + Succeeded = succeeded; + Failed = failed; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchTaskSlotCounts() + { + } + + /// The number of TaskSlots for active Tasks. + public int Active { get; } + /// The number of TaskSlots for running Tasks. + public int Running { get; } + /// The number of TaskSlots for completed Tasks. + public int Completed { get; } + /// The number of TaskSlots for succeeded Tasks. + public int Succeeded { get; } + /// The number of TaskSlots for failed Tasks. + public int Failed { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskState.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskState.cs new file mode 100644 index 0000000000000..4f8cd40a0bcac --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskState.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Compute.Batch +{ + /// BatchTaskState enums. + public readonly partial struct BatchTaskState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BatchTaskState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ActiveValue = "active"; + private const string PreparingValue = "preparing"; + private const string RunningValue = "running"; + private const string CompletedValue = "completed"; + + /// The Task is queued and able to run, but is not currently assigned to a Compute Node. A Task enters this state when it is created, when it is enabled after being disabled, or when it is awaiting a retry after a failed run. + public static BatchTaskState Active { get; } = new BatchTaskState(ActiveValue); + /// The Task has been assigned to a Compute Node, but is waiting for a required Job Preparation Task to complete on the Compute Node. If the Job Preparation Task succeeds, the Task will move to running. If the Job Preparation Task fails, the Task will return to active and will be eligible to be assigned to a different Compute Node. + public static BatchTaskState Preparing { get; } = new BatchTaskState(PreparingValue); + /// The Task is running on a Compute Node. This includes task-level preparation such as downloading resource files or deploying Packages specified on the Task - it does not necessarily mean that the Task command line has started executing. + public static BatchTaskState Running { get; } = new BatchTaskState(RunningValue); + /// The Task is no longer eligible to run, usually because the Task has finished successfully, or the Task has finished unsuccessfully and has exhausted its retry limit. A Task is also marked as completed if an error occurred launching the Task, or when the Task has been terminated. + public static BatchTaskState Completed { get; } = new BatchTaskState(CompletedValue); + /// Determines if two values are the same. + public static bool operator ==(BatchTaskState left, BatchTaskState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BatchTaskState left, BatchTaskState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator BatchTaskState(string value) => new BatchTaskState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BatchTaskState other && Equals(other); + /// + public bool Equals(BatchTaskState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskStatistics.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskStatistics.Serialization.cs new file mode 100644 index 0000000000000..550e7bb1eefef --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskStatistics.Serialization.cs @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class BatchTaskStatistics : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchTaskStatistics)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("url"u8); + writer.WriteStringValue(Url); + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartTime, "O"); + writer.WritePropertyName("lastUpdateTime"u8); + writer.WriteStringValue(LastUpdateTime, "O"); + writer.WritePropertyName("userCPUTime"u8); + writer.WriteStringValue(UserCpuTime, "P"); + writer.WritePropertyName("kernelCPUTime"u8); + writer.WriteStringValue(KernelCpuTime, "P"); + writer.WritePropertyName("wallClockTime"u8); + writer.WriteStringValue(WallClockTime, "P"); + writer.WritePropertyName("readIOps"u8); + writer.WriteNumberValue(ReadIOps); + writer.WritePropertyName("writeIOps"u8); + writer.WriteNumberValue(WriteIOps); + writer.WritePropertyName("readIOGiB"u8); + writer.WriteNumberValue(ReadIOGiB); + writer.WritePropertyName("writeIOGiB"u8); + writer.WriteNumberValue(WriteIOGiB); + writer.WritePropertyName("waitTime"u8); + writer.WriteStringValue(WaitTime, "P"); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + BatchTaskStatistics IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BatchTaskStatistics)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBatchTaskStatistics(document.RootElement, options); + } + + internal static BatchTaskStatistics DeserializeBatchTaskStatistics(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string url = default; + DateTimeOffset startTime = default; + DateTimeOffset lastUpdateTime = default; + TimeSpan userCPUTime = default; + TimeSpan kernelCPUTime = default; + TimeSpan wallClockTime = default; + long readIOps = default; + long writeIOps = default; + float readIOGiB = default; + float writeIOGiB = default; + TimeSpan waitTime = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("url"u8)) + { + url = property.Value.GetString(); + continue; + } + if (property.NameEquals("startTime"u8)) + { + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastUpdateTime"u8)) + { + lastUpdateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("userCPUTime"u8)) + { + userCPUTime = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("kernelCPUTime"u8)) + { + kernelCPUTime = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("wallClockTime"u8)) + { + wallClockTime = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("readIOps"u8)) + { + readIOps = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("writeIOps"u8)) + { + writeIOps = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("readIOGiB"u8)) + { + readIOGiB = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("writeIOGiB"u8)) + { + writeIOGiB = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("waitTime"u8)) + { + waitTime = property.Value.GetTimeSpan("P"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BatchTaskStatistics( + url, + startTime, + lastUpdateTime, + userCPUTime, + kernelCPUTime, + wallClockTime, + readIOps, + writeIOps, + readIOGiB, + writeIOGiB, + waitTime, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BatchTaskStatistics)} does not support writing '{options.Format}' format."); + } + } + + BatchTaskStatistics IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeBatchTaskStatistics(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BatchTaskStatistics)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static BatchTaskStatistics FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBatchTaskStatistics(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskStatistics.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskStatistics.cs new file mode 100644 index 0000000000000..59520d11e905f --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/BatchTaskStatistics.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Resource usage statistics for a Task. + public partial class BatchTaskStatistics + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The URL of the statistics. + /// The start time of the time range covered by the statistics. + /// The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime. + /// The total user mode CPU time (summed across all cores and all Compute Nodes) consumed by the Task. + /// The total kernel mode CPU time (summed across all cores and all Compute Nodes) consumed by the Task. + /// The total wall clock time of the Task. The wall clock time is the elapsed time from when the Task started running on a Compute Node to when it finished (or to the last time the statistics were updated, if the Task had not finished by then). If the Task was retried, this includes the wall clock time of all the Task retries. + /// The total number of disk read operations made by the Task. + /// The total number of disk write operations made by the Task. + /// The total gibibytes read from disk by the Task. + /// The total gibibytes written to disk by the Task. + /// The total wait time of the Task. The wait time for a Task is defined as the elapsed time between the creation of the Task and the start of Task execution. (If the Task is retried due to failures, the wait time is the time to the most recent Task execution.). + /// is null. + internal BatchTaskStatistics(string url, DateTimeOffset startTime, DateTimeOffset lastUpdateTime, TimeSpan userCpuTime, TimeSpan kernelCpuTime, TimeSpan wallClockTime, long readIOps, long writeIOps, float readIOGiB, float writeIOGiB, TimeSpan waitTime) + { + Argument.AssertNotNull(url, nameof(url)); + + Url = url; + StartTime = startTime; + LastUpdateTime = lastUpdateTime; + UserCpuTime = userCpuTime; + KernelCpuTime = kernelCpuTime; + WallClockTime = wallClockTime; + ReadIOps = readIOps; + WriteIOps = writeIOps; + ReadIOGiB = readIOGiB; + WriteIOGiB = writeIOGiB; + WaitTime = waitTime; + } + + /// Initializes a new instance of . + /// The URL of the statistics. + /// The start time of the time range covered by the statistics. + /// The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime. + /// The total user mode CPU time (summed across all cores and all Compute Nodes) consumed by the Task. + /// The total kernel mode CPU time (summed across all cores and all Compute Nodes) consumed by the Task. + /// The total wall clock time of the Task. The wall clock time is the elapsed time from when the Task started running on a Compute Node to when it finished (or to the last time the statistics were updated, if the Task had not finished by then). If the Task was retried, this includes the wall clock time of all the Task retries. + /// The total number of disk read operations made by the Task. + /// The total number of disk write operations made by the Task. + /// The total gibibytes read from disk by the Task. + /// The total gibibytes written to disk by the Task. + /// The total wait time of the Task. The wait time for a Task is defined as the elapsed time between the creation of the Task and the start of Task execution. (If the Task is retried due to failures, the wait time is the time to the most recent Task execution.). + /// Keeps track of any properties unknown to the library. + internal BatchTaskStatistics(string url, DateTimeOffset startTime, DateTimeOffset lastUpdateTime, TimeSpan userCpuTime, TimeSpan kernelCpuTime, TimeSpan wallClockTime, long readIOps, long writeIOps, float readIOGiB, float writeIOGiB, TimeSpan waitTime, IDictionary serializedAdditionalRawData) + { + Url = url; + StartTime = startTime; + LastUpdateTime = lastUpdateTime; + UserCpuTime = userCpuTime; + KernelCpuTime = kernelCpuTime; + WallClockTime = wallClockTime; + ReadIOps = readIOps; + WriteIOps = writeIOps; + ReadIOGiB = readIOGiB; + WriteIOGiB = writeIOGiB; + WaitTime = waitTime; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BatchTaskStatistics() + { + } + + /// The URL of the statistics. + public string Url { get; } + /// The start time of the time range covered by the statistics. + public DateTimeOffset StartTime { get; } + /// The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime. + public DateTimeOffset LastUpdateTime { get; } + /// The total user mode CPU time (summed across all cores and all Compute Nodes) consumed by the Task. + public TimeSpan UserCpuTime { get; } + /// The total kernel mode CPU time (summed across all cores and all Compute Nodes) consumed by the Task. + public TimeSpan KernelCpuTime { get; } + /// The total wall clock time of the Task. The wall clock time is the elapsed time from when the Task started running on a Compute Node to when it finished (or to the last time the statistics were updated, if the Task had not finished by then). If the Task was retried, this includes the wall clock time of all the Task retries. + public TimeSpan WallClockTime { get; } + /// The total number of disk read operations made by the Task. + public long ReadIOps { get; } + /// The total number of disk write operations made by the Task. + public long WriteIOps { get; } + /// The total gibibytes read from disk by the Task. + public float ReadIOGiB { get; } + /// The total gibibytes written to disk by the Task. + public float WriteIOGiB { get; } + /// The total wait time of the Task. The wait time for a Task is defined as the elapsed time between the creation of the Task and the start of Task execution. (If the Task is retried due to failures, the wait time is the time to the most recent Task execution.). + public TimeSpan WaitTime { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/CachingType.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/CachingType.cs new file mode 100644 index 0000000000000..e7ca976b8508b --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/CachingType.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.Compute.Batch +{ + /// CachingType enums. + public readonly partial struct CachingType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CachingType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "none"; + private const string ReadOnlyValue = "readonly"; + private const string ReadWriteValue = "readwrite"; + + /// The caching mode for the disk is not enabled. + public static CachingType None { get; } = new CachingType(NoneValue); + /// The caching mode for the disk is read only. + public static CachingType ReadOnly { get; } = new CachingType(ReadOnlyValue); + /// The caching mode for the disk is read and write. + public static CachingType ReadWrite { get; } = new CachingType(ReadWriteValue); + /// Determines if two values are the same. + public static bool operator ==(CachingType left, CachingType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CachingType left, CachingType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator CachingType(string value) => new CachingType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CachingType other && Equals(other); + /// + public bool Equals(CachingType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/CifsMountConfiguration.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/CifsMountConfiguration.Serialization.cs new file mode 100644 index 0000000000000..e7c24edf8cc06 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/CifsMountConfiguration.Serialization.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class CifsMountConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CifsMountConfiguration)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("username"u8); + writer.WriteStringValue(Username); + writer.WritePropertyName("source"u8); + writer.WriteStringValue(Source); + writer.WritePropertyName("relativeMountPath"u8); + writer.WriteStringValue(RelativeMountPath); + if (Optional.IsDefined(MountOptions)) + { + writer.WritePropertyName("mountOptions"u8); + writer.WriteStringValue(MountOptions); + } + writer.WritePropertyName("password"u8); + writer.WriteStringValue(Password); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + CifsMountConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CifsMountConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCifsMountConfiguration(document.RootElement, options); + } + + internal static CifsMountConfiguration DeserializeCifsMountConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string username = default; + string source = default; + string relativeMountPath = default; + string mountOptions = default; + string password = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("username"u8)) + { + username = property.Value.GetString(); + continue; + } + if (property.NameEquals("source"u8)) + { + source = property.Value.GetString(); + continue; + } + if (property.NameEquals("relativeMountPath"u8)) + { + relativeMountPath = property.Value.GetString(); + continue; + } + if (property.NameEquals("mountOptions"u8)) + { + mountOptions = property.Value.GetString(); + continue; + } + if (property.NameEquals("password"u8)) + { + password = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CifsMountConfiguration( + username, + source, + relativeMountPath, + mountOptions, + password, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CifsMountConfiguration)} does not support writing '{options.Format}' format."); + } + } + + CifsMountConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCifsMountConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CifsMountConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static CifsMountConfiguration FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCifsMountConfiguration(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/CifsMountConfiguration.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/CifsMountConfiguration.cs new file mode 100644 index 0000000000000..e980e98448462 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/CifsMountConfiguration.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Information used to connect to a CIFS file system. + public partial class CifsMountConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The user to use for authentication against the CIFS file system. + /// The URI of the file system to mount. + /// The relative path on the compute node where the file system will be mounted. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. + /// The password to use for authentication against the CIFS file system. + /// , , or is null. + public CifsMountConfiguration(string username, string source, string relativeMountPath, string password) + { + Argument.AssertNotNull(username, nameof(username)); + Argument.AssertNotNull(source, nameof(source)); + Argument.AssertNotNull(relativeMountPath, nameof(relativeMountPath)); + Argument.AssertNotNull(password, nameof(password)); + + Username = username; + Source = source; + RelativeMountPath = relativeMountPath; + Password = password; + } + + /// Initializes a new instance of . + /// The user to use for authentication against the CIFS file system. + /// The URI of the file system to mount. + /// The relative path on the compute node where the file system will be mounted. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. + /// Additional command line options to pass to the mount command. These are 'net use' options in Windows and 'mount' options in Linux. + /// The password to use for authentication against the CIFS file system. + /// Keeps track of any properties unknown to the library. + internal CifsMountConfiguration(string username, string source, string relativeMountPath, string mountOptions, string password, IDictionary serializedAdditionalRawData) + { + Username = username; + Source = source; + RelativeMountPath = relativeMountPath; + MountOptions = mountOptions; + Password = password; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CifsMountConfiguration() + { + } + + /// The user to use for authentication against the CIFS file system. + public string Username { get; set; } + /// The URI of the file system to mount. + public string Source { get; set; } + /// The relative path on the compute node where the file system will be mounted. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. + public string RelativeMountPath { get; set; } + /// Additional command line options to pass to the mount command. These are 'net use' options in Windows and 'mount' options in Linux. + public string MountOptions { get; set; } + /// The password to use for authentication against the CIFS file system. + public string Password { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/ComputeBatchClientBuilderExtensions.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/ComputeBatchClientBuilderExtensions.cs new file mode 100644 index 0000000000000..982156ace9ac0 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/ComputeBatchClientBuilderExtensions.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Compute.Batch; +using Azure.Core.Extensions; + +namespace Microsoft.Extensions.Azure +{ + /// Extension methods to add to client builder. + public static partial class ComputeBatchClientBuilderExtensions + { + /// Registers a instance. + /// The builder to register with. + /// Batch account endpoint (for example: https://batchaccount.eastus2.batch.azure.com). + public static IAzureClientBuilder AddBatchClient(this TBuilder builder, Uri endpoint) + where TBuilder : IAzureClientFactoryBuilderWithCredential + { + return builder.RegisterClientFactory((options, cred) => new BatchClient(endpoint, cred, options)); + } + + /// Registers a instance. + /// The builder to register with. + /// The configuration values. + public static IAzureClientBuilder AddBatchClient(this TBuilder builder, TConfiguration configuration) + where TBuilder : IAzureClientFactoryBuilderWithConfiguration + { + return builder.RegisterClientFactory(configuration); + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/ComputeBatchModelFactory.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/ComputeBatchModelFactory.cs new file mode 100644 index 0000000000000..740040cdfeaa7 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/ComputeBatchModelFactory.cs @@ -0,0 +1,1400 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Compute.Batch +{ + /// Model factory for models. + public static partial class ComputeBatchModelFactory + { + /// Initializes a new instance of . + /// A string that uniquely identifies the application within the Account. + /// The display name for the application. + /// The list of available versions of the application. + /// A new instance for mocking. + public static BatchApplication BatchApplication(string id = null, string displayName = null, IEnumerable versions = null) + { + versions ??= new List(); + + return new BatchApplication(id, displayName, versions?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The ID of the Pool whose metrics are aggregated in this entry. + /// The start time of the aggregation interval covered by this entry. + /// The end time of the aggregation interval covered by this entry. + /// The size of virtual machines in the Pool. All VMs in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). + /// The total core hours used in the Pool during this aggregation interval. + /// A new instance for mocking. + public static BatchPoolUsageMetrics BatchPoolUsageMetrics(string poolId = null, DateTimeOffset startTime = default, DateTimeOffset endTime = default, string vmSize = null, float totalCoreHours = default) + { + return new BatchPoolUsageMetrics( + poolId, + startTime, + endTime, + vmSize, + totalCoreHours, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// A string that uniquely identifies the Pool within the Account. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two Pool IDs within an Account that differ only by case). + /// The display name for the Pool. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. + /// The size of virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available VM sizes for Pools using Images from the Virtual Machines Marketplace (pools created with virtualMachineConfiguration), see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). + /// The virtual machine configuration for the Pool. This property must be specified. + /// The timeout for allocation of Compute Nodes to the Pool. This timeout applies only to manual scaling; it has no effect when enableAutoScale is set to true. The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + /// The user-specified tags associated with the pool. The user-defined tags to be associated with the Azure Batch Pool. When specified, these tags are propagated to the backing Azure resources associated with the pool. This property can only be specified when the Batch account was created with the poolAllocationMode property set to 'UserSubscription'. + /// The desired number of dedicated Compute Nodes in the Pool. This property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both. + /// The desired number of Spot/Low-priority Compute Nodes in the Pool. This property must not be specified if enableAutoScale is set to true. If enableAutoScale is set to false, then you must set either targetDedicatedNodes, targetLowPriorityNodes, or both. + /// Whether the Pool size should automatically adjust over time. If false, at least one of targetDedicatedNodes and targetLowPriorityNodes must be specified. If true, the autoScaleFormula property is required and the Pool automatically resizes according to the formula. The default value is false. + /// A formula for the desired number of Compute Nodes in the Pool. This property must not be specified if enableAutoScale is set to false. It is required if enableAutoScale is set to true. The formula is checked for validity before the Pool is created. If the formula is not valid, the Batch service rejects the request with detailed error information. For more information about specifying this formula, see 'Automatically scale Compute Nodes in an Azure Batch Pool' (https://azure.microsoft.com/documentation/articles/batch-automatic-scaling/). + /// The time interval at which to automatically adjust the Pool size according to the autoscale formula. The default value is 15 minutes. The minimum and maximum value are 5 minutes and 168 hours respectively. If you specify a value less than 5 minutes or greater than 168 hours, the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + /// Whether the Pool permits direct communication between Compute Nodes. Enabling inter-node communication limits the maximum size of the Pool due to deployment restrictions on the Compute Nodes of the Pool. This may result in the Pool not reaching its desired size. The default value is false. + /// The network configuration for the Pool. + /// A Task specified to run on each Compute Node as it joins the Pool. The Task runs when the Compute Node is added to the Pool or when the Compute Node is restarted. + /// The list of Packages to be installed on each Compute Node in the Pool. When creating a pool, the package's application ID must be fully qualified (/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}). Changes to Package references affect all new Nodes joining the Pool, but do not affect Compute Nodes that are already in the Pool until they are rebooted or reimaged. There is a maximum of 10 Package references on any given Pool. + /// The number of task slots that can be used to run concurrent tasks on a single compute node in the pool. The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of the pool or 256. + /// How Tasks are distributed across Compute Nodes in a Pool. If not specified, the default is spread. + /// The list of user Accounts to be created on each Compute Node in the Pool. + /// A list of name-value pairs associated with the Pool as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. + /// Mount storage using specified file system for the entire lifetime of the pool. Mount the storage using Azure fileshare, NFS, CIFS or Blobfuse based file system. + /// The desired node communication mode for the pool. If omitted, the default value is Default. + /// The upgrade policy for the Pool. Describes an upgrade policy - automatic, manual, or rolling. + /// A new instance for mocking. + public static BatchPoolCreateContent BatchPoolCreateContent(string id = null, string displayName = null, string vmSize = null, VirtualMachineConfiguration virtualMachineConfiguration = null, TimeSpan? resizeTimeout = null, IDictionary resourceTags = null, int? targetDedicatedNodes = null, int? targetLowPriorityNodes = null, bool? enableAutoScale = null, string autoScaleFormula = null, TimeSpan? autoScaleEvaluationInterval = null, bool? enableInterNodeCommunication = null, NetworkConfiguration networkConfiguration = null, BatchStartTask startTask = null, IEnumerable applicationPackageReferences = null, int? taskSlotsPerNode = null, BatchTaskSchedulingPolicy taskSchedulingPolicy = null, IEnumerable userAccounts = null, IEnumerable metadata = null, IEnumerable mountConfiguration = null, BatchNodeCommunicationMode? targetNodeCommunicationMode = null, UpgradePolicy upgradePolicy = null) + { + resourceTags ??= new Dictionary(); + applicationPackageReferences ??= new List(); + userAccounts ??= new List(); + metadata ??= new List(); + mountConfiguration ??= new List(); + + return new BatchPoolCreateContent( + id, + displayName, + vmSize, + virtualMachineConfiguration, + resizeTimeout, + resourceTags, + targetDedicatedNodes, + targetLowPriorityNodes, + enableAutoScale, + autoScaleFormula, + autoScaleEvaluationInterval, + enableInterNodeCommunication, + networkConfiguration, + startTask, + applicationPackageReferences?.ToList(), + taskSlotsPerNode, + taskSchedulingPolicy, + userAccounts?.ToList(), + metadata?.ToList(), + mountConfiguration?.ToList(), + targetNodeCommunicationMode, + upgradePolicy, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The publisher of the Azure Virtual Machines Marketplace Image. For example, Canonical or MicrosoftWindowsServer. + /// The offer type of the Azure Virtual Machines Marketplace Image. For example, UbuntuServer or WindowsServer. + /// The SKU of the Azure Virtual Machines Marketplace Image. For example, 18.04-LTS or 2019-Datacenter. + /// The version of the Azure Virtual Machines Marketplace Image. A value of 'latest' can be specified to select the latest version of an Image. If omitted, the default is 'latest'. + /// The ARM resource identifier of the Azure Compute Gallery Image. Compute Nodes in the Pool will be created using this Image Id. This is of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{VersionId} or /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName} for always defaulting to the latest image version. This property is mutually exclusive with other ImageReference properties. The Azure Compute Gallery Image must have replicas in the same region and must be in the same subscription as the Azure Batch account. If the image version is not specified in the imageId, the latest version will be used. For information about the firewall settings for the Batch Compute Node agent to communicate with the Batch service see https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + /// The specific version of the platform image or marketplace image used to create the node. This read-only field differs from 'version' only if the value specified for 'version' when the pool was created was 'latest'. + /// A new instance for mocking. + public static ImageReference ImageReference(string publisher = null, string offer = null, string sku = null, string version = null, string virtualMachineImageId = null, string exactVersion = null) + { + return new ImageReference( + publisher, + offer, + sku, + version, + virtualMachineImageId, + exactVersion, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// A string that uniquely identifies the Pool within the Account. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an Account that differ only by case). + /// The display name for the Pool. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. + /// The URL of the Pool. + /// The ETag of the Pool. This is an opaque string. You can use it to detect whether the Pool has changed between requests. In particular, you can be pass the ETag when updating a Pool to specify that your changes should take effect only if nobody else has modified the Pool in the meantime. + /// The last modified time of the Pool. This is the last time at which the Pool level data, such as the targetDedicatedNodes or enableAutoscale settings, changed. It does not factor in node-level changes such as a Compute Node changing state. + /// The creation time of the Pool. + /// The current state of the Pool. + /// The time at which the Pool entered its current state. + /// Whether the Pool is resizing. + /// The time at which the Pool entered its current allocation state. + /// The size of virtual machines in the Pool. All virtual machines in a Pool are the same size. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). + /// The virtual machine configuration for the Pool. This property must be specified. + /// The timeout for allocation of Compute Nodes to the Pool. This is the timeout for the most recent resize operation. (The initial sizing when the Pool is created counts as a resize.) The default value is 15 minutes. + /// A list of errors encountered while performing the last resize on the Pool. This property is set only if one or more errors occurred during the last Pool resize, and only when the Pool allocationState is Steady. + /// The user-specified tags associated with the pool. The user-defined tags to be associated with the Azure Batch Pool. When specified, these tags are propagated to the backing Azure resources associated with the pool. This property can only be specified when the Batch account was created with the poolAllocationMode property set to 'UserSubscription'. + /// The number of dedicated Compute Nodes currently in the Pool. + /// The number of Spot/Low-priority Compute Nodes currently in the Pool. Spot/Low-priority Compute Nodes which have been preempted are included in this count. + /// The desired number of dedicated Compute Nodes in the Pool. + /// The desired number of Spot/Low-priority Compute Nodes in the Pool. + /// Whether the Pool size should automatically adjust over time. If false, at least one of targetDedicatedNodes and targetLowPriorityNodes must be specified. If true, the autoScaleFormula property is required and the Pool automatically resizes according to the formula. The default value is false. + /// A formula for the desired number of Compute Nodes in the Pool. This property is set only if the Pool automatically scales, i.e. enableAutoScale is true. + /// The time interval at which to automatically adjust the Pool size according to the autoscale formula. This property is set only if the Pool automatically scales, i.e. enableAutoScale is true. + /// The results and errors from the last execution of the autoscale formula. This property is set only if the Pool automatically scales, i.e. enableAutoScale is true. + /// Whether the Pool permits direct communication between Compute Nodes. This imposes restrictions on which Compute Nodes can be assigned to the Pool. Specifying this value can reduce the chance of the requested number of Compute Nodes to be allocated in the Pool. + /// The network configuration for the Pool. + /// A Task specified to run on each Compute Node as it joins the Pool. + /// The list of Packages to be installed on each Compute Node in the Pool. Changes to Package references affect all new Nodes joining the Pool, but do not affect Compute Nodes that are already in the Pool until they are rebooted or reimaged. There is a maximum of 10 Package references on any given Pool. + /// The number of task slots that can be used to run concurrent tasks on a single compute node in the pool. The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of the pool or 256. + /// How Tasks are distributed across Compute Nodes in a Pool. If not specified, the default is spread. + /// The list of user Accounts to be created on each Compute Node in the Pool. + /// A list of name-value pairs associated with the Pool as metadata. + /// Utilization and resource usage statistics for the entire lifetime of the Pool. This property is populated only if the CloudPool was retrieved with an expand clause including the 'stats' attribute; otherwise it is null. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes. + /// A list of file systems to mount on each node in the pool. This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. + /// The identity of the Batch pool, if configured. The list of user identities associated with the Batch pool. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// The desired node communication mode for the pool. If omitted, the default value is Default. + /// The current state of the pool communication mode. + /// The upgrade policy for the Pool. Describes an upgrade policy - automatic, manual, or rolling. + /// A new instance for mocking. + public static BatchPool BatchPool(string id = null, string displayName = null, string url = null, string eTag = null, DateTimeOffset? lastModified = null, DateTimeOffset? creationTime = null, BatchPoolState? state = null, DateTimeOffset? stateTransitionTime = null, AllocationState? allocationState = null, DateTimeOffset? allocationStateTransitionTime = null, string vmSize = null, VirtualMachineConfiguration virtualMachineConfiguration = null, TimeSpan? resizeTimeout = null, IEnumerable resizeErrors = null, IReadOnlyDictionary resourceTags = null, int? currentDedicatedNodes = null, int? currentLowPriorityNodes = null, int? targetDedicatedNodes = null, int? targetLowPriorityNodes = null, bool? enableAutoScale = null, string autoScaleFormula = null, TimeSpan? autoScaleEvaluationInterval = null, AutoScaleRun autoScaleRun = null, bool? enableInterNodeCommunication = null, NetworkConfiguration networkConfiguration = null, BatchStartTask startTask = null, IEnumerable applicationPackageReferences = null, int? taskSlotsPerNode = null, BatchTaskSchedulingPolicy taskSchedulingPolicy = null, IEnumerable userAccounts = null, IEnumerable metadata = null, BatchPoolStatistics stats = null, IEnumerable mountConfiguration = null, BatchPoolIdentity identity = null, BatchNodeCommunicationMode? targetNodeCommunicationMode = null, BatchNodeCommunicationMode? currentNodeCommunicationMode = null, UpgradePolicy upgradePolicy = null) + { + resizeErrors ??= new List(); + resourceTags ??= new Dictionary(); + applicationPackageReferences ??= new List(); + userAccounts ??= new List(); + metadata ??= new List(); + mountConfiguration ??= new List(); + + return new BatchPool( + id, + displayName, + url, + eTag, + lastModified, + creationTime, + state, + stateTransitionTime, + allocationState, + allocationStateTransitionTime, + vmSize, + virtualMachineConfiguration, + resizeTimeout, + resizeErrors?.ToList(), + resourceTags, + currentDedicatedNodes, + currentLowPriorityNodes, + targetDedicatedNodes, + targetLowPriorityNodes, + enableAutoScale, + autoScaleFormula, + autoScaleEvaluationInterval, + autoScaleRun, + enableInterNodeCommunication, + networkConfiguration, + startTask, + applicationPackageReferences?.ToList(), + taskSlotsPerNode, + taskSchedulingPolicy, + userAccounts?.ToList(), + metadata?.ToList(), + stats, + mountConfiguration?.ToList(), + identity, + targetNodeCommunicationMode, + currentNodeCommunicationMode, + upgradePolicy, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// An identifier for the Pool resize error. Codes are invariant and are intended to be consumed programmatically. + /// A message describing the Pool resize error, intended to be suitable for display in a user interface. + /// A list of additional error details related to the Pool resize error. + /// A new instance for mocking. + public static ResizeError ResizeError(string code = null, string message = null, IEnumerable values = null) + { + values ??= new List(); + + return new ResizeError(code, message, values?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The name in the name-value pair. + /// The value in the name-value pair. + /// A new instance for mocking. + public static NameValuePair NameValuePair(string name = null, string value = null) + { + return new NameValuePair(name, value, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The time at which the autoscale formula was last evaluated. + /// The final values of all variables used in the evaluation of the autoscale formula. Each variable value is returned in the form $variable=value, and variables are separated by semicolons. + /// Details of the error encountered evaluating the autoscale formula on the Pool, if the evaluation was unsuccessful. + /// A new instance for mocking. + public static AutoScaleRun AutoScaleRun(DateTimeOffset timestamp = default, string results = null, AutoScaleRunError error = null) + { + return new AutoScaleRun(timestamp, results, error, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// An identifier for the autoscale error. Codes are invariant and are intended to be consumed programmatically. + /// A message describing the autoscale error, intended to be suitable for display in a user interface. + /// A list of additional error details related to the autoscale error. + /// A new instance for mocking. + public static AutoScaleRunError AutoScaleRunError(string code = null, string message = null, IEnumerable values = null) + { + values ??= new List(); + + return new AutoScaleRunError(code, message, values?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The URL for the statistics. + /// The start time of the time range covered by the statistics. + /// The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime. + /// Statistics related to Pool usage, such as the amount of core-time used. + /// Statistics related to resource consumption by Compute Nodes in the Pool. + /// A new instance for mocking. + public static BatchPoolStatistics BatchPoolStatistics(string url = null, DateTimeOffset startTime = default, DateTimeOffset lastUpdateTime = default, BatchPoolUsageStatistics usageStats = null, BatchPoolResourceStatistics resourceStats = null) + { + return new BatchPoolStatistics( + url, + startTime, + lastUpdateTime, + usageStats, + resourceStats, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The start time of the time range covered by the statistics. + /// The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime. + /// The aggregated wall-clock time of the dedicated Compute Node cores being part of the Pool. + /// A new instance for mocking. + public static BatchPoolUsageStatistics BatchPoolUsageStatistics(DateTimeOffset startTime = default, DateTimeOffset lastUpdateTime = default, TimeSpan dedicatedCoreTime = default) + { + return new BatchPoolUsageStatistics(startTime, lastUpdateTime, dedicatedCoreTime, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The start time of the time range covered by the statistics. + /// The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime. + /// The average CPU usage across all Compute Nodes in the Pool (percentage per node). + /// The average memory usage in GiB across all Compute Nodes in the Pool. + /// The peak memory usage in GiB across all Compute Nodes in the Pool. + /// The average used disk space in GiB across all Compute Nodes in the Pool. + /// The peak used disk space in GiB across all Compute Nodes in the Pool. + /// The total number of disk read operations across all Compute Nodes in the Pool. + /// The total number of disk write operations across all Compute Nodes in the Pool. + /// The total amount of data in GiB of disk reads across all Compute Nodes in the Pool. + /// The total amount of data in GiB of disk writes across all Compute Nodes in the Pool. + /// The total amount of data in GiB of network reads across all Compute Nodes in the Pool. + /// The total amount of data in GiB of network writes across all Compute Nodes in the Pool. + /// A new instance for mocking. + public static BatchPoolResourceStatistics BatchPoolResourceStatistics(DateTimeOffset startTime = default, DateTimeOffset lastUpdateTime = default, float avgCpuPercentage = default, float avgMemoryGiB = default, float peakMemoryGiB = default, float avgDiskGiB = default, float peakDiskGiB = default, long diskReadIOps = default, long diskWriteIOps = default, float diskReadGiB = default, float diskWriteGiB = default, float networkReadGiB = default, float networkWriteGiB = default) + { + return new BatchPoolResourceStatistics( + startTime, + lastUpdateTime, + avgCpuPercentage, + avgMemoryGiB, + peakMemoryGiB, + avgDiskGiB, + peakDiskGiB, + diskReadIOps, + diskWriteIOps, + diskReadGiB, + diskWriteGiB, + networkReadGiB, + networkWriteGiB, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The identity of the Batch pool, if configured. The list of user identities associated with the Batch pool. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// The list of user identities associated with the Batch account. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// A new instance for mocking. + public static BatchPoolIdentity BatchPoolIdentity(BatchPoolIdentityType type = default, IEnumerable userAssignedIdentities = null) + { + userAssignedIdentities ??= new List(); + + return new BatchPoolIdentity(type, userAssignedIdentities?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The ARM resource id of the user assigned identity. + /// The client id of the user assigned identity. + /// The principal id of the user assigned identity. + /// A new instance for mocking. + public static UserAssignedIdentity UserAssignedIdentity(string resourceId = null, string clientId = null, string principalId = null) + { + return new UserAssignedIdentity(resourceId, clientId, principalId, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The ID of the Compute Node agent SKU which the Image supports. + /// The reference to the Azure Virtual Machine's Marketplace Image. + /// The type of operating system (e.g. Windows or Linux) of the Image. + /// The capabilities or features which the Image supports. Not every capability of the Image is listed. Capabilities in this list are considered of special interest and are generally related to integration with other features in the Azure Batch service. + /// The time when the Azure Batch service will stop accepting create Pool requests for the Image. + /// Whether the Azure Batch service actively verifies that the Image is compatible with the associated Compute Node agent SKU. + /// A new instance for mocking. + public static BatchSupportedImage BatchSupportedImage(string nodeAgentSkuId = null, ImageReference imageReference = null, OSType osType = default, IEnumerable capabilities = null, DateTimeOffset? batchSupportEndOfLife = null, ImageVerificationType verificationType = default) + { + capabilities ??= new List(); + + return new BatchSupportedImage( + nodeAgentSkuId, + imageReference, + osType, + capabilities?.ToList(), + batchSupportEndOfLife, + verificationType, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The ID of the Pool. + /// The number of dedicated Compute Nodes in each state. + /// The number of Spot/Low-priority Compute Nodes in each state. + /// A new instance for mocking. + public static BatchPoolNodeCounts BatchPoolNodeCounts(string poolId = null, BatchNodeCounts dedicated = null, BatchNodeCounts lowPriority = null) + { + return new BatchPoolNodeCounts(poolId, dedicated, lowPriority, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The number of Compute Nodes in the creating state. + /// The number of Compute Nodes in the idle state. + /// The number of Compute Nodes in the offline state. + /// The number of Compute Nodes in the preempted state. + /// The count of Compute Nodes in the rebooting state. + /// The number of Compute Nodes in the reimaging state. + /// The number of Compute Nodes in the running state. + /// The number of Compute Nodes in the starting state. + /// The number of Compute Nodes in the startTaskFailed state. + /// The number of Compute Nodes in the leavingPool state. + /// The number of Compute Nodes in the unknown state. + /// The number of Compute Nodes in the unusable state. + /// The number of Compute Nodes in the waitingForStartTask state. + /// The total number of Compute Nodes. + /// The number of Compute Nodes in the upgradingOS state. + /// A new instance for mocking. + public static BatchNodeCounts BatchNodeCounts(int creating = default, int idle = default, int offline = default, int preempted = default, int rebooting = default, int reimaging = default, int running = default, int starting = default, int startTaskFailed = default, int leavingPool = default, int unknown = default, int unusable = default, int waitingForStartTask = default, int total = default, int upgradingOs = default) + { + return new BatchNodeCounts( + creating, + idle, + offline, + preempted, + rebooting, + reimaging, + running, + starting, + startTaskFailed, + leavingPool, + unknown, + unusable, + waitingForStartTask, + total, + upgradingOs, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// A string that uniquely identifies the Job within the Account. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an Account that differ only by case). + /// The display name for the Job. + /// Whether Tasks in the Job can define dependencies on each other. The default is false. + /// The URL of the Job. + /// The ETag of the Job. This is an opaque string. You can use it to detect whether the Job has changed between requests. In particular, you can be pass the ETag when updating a Job to specify that your changes should take effect only if nobody else has modified the Job in the meantime. + /// The last modified time of the Job. This is the last time at which the Job level data, such as the Job state or priority, changed. It does not factor in task-level changes such as adding new Tasks or Tasks changing state. + /// The creation time of the Job. + /// The current state of the Job. + /// The time at which the Job entered its current state. + /// The previous state of the Job. This property is not set if the Job is in its initial Active state. + /// The time at which the Job entered its previous state. This property is not set if the Job is in its initial Active state. + /// The priority of the Job. Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0. + /// Whether Tasks in this job can be preempted by other high priority jobs. If the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job. You can update a job's allowTaskPreemption after it has been created using the update job API. + /// The maximum number of tasks that can be executed in parallel for the job. The value of maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default value is -1, which means there's no limit to the number of tasks that can be run at once. You can update a job's maxParallelTasks after it has been created using the update job API. + /// The execution constraints for the Job. + /// Details of a Job Manager Task to be launched when the Job is started. + /// The Job Preparation Task. The Job Preparation Task is a special Task run on each Compute Node before any other Task of the Job. + /// The Job Release Task. The Job Release Task is a special Task run at the end of the Job on each Compute Node that has run any other Task of the Job. + /// The list of common environment variable settings. These environment variables are set for all Tasks in the Job (including the Job Manager, Job Preparation and Job Release Tasks). Individual Tasks can override an environment setting specified here by specifying the same setting name with a different value. + /// The Pool settings associated with the Job. + /// The action the Batch service should take when all Tasks in the Job are in the completed state. The default is noaction. + /// The action the Batch service should take when any Task in the Job fails. A Task is considered to have failed if has a failureInfo. A failureInfo is set if the Task completes with a non-zero exit code after exhausting its retry count, or if there was an error starting the Task, for example due to a resource file download error. The default is noaction. + /// The network configuration for the Job. + /// A list of name-value pairs associated with the Job as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. + /// The execution information for the Job. + /// Resource usage statistics for the entire lifetime of the Job. This property is populated only if the CloudJob was retrieved with an expand clause including the 'stats' attribute; otherwise it is null. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes. + /// A new instance for mocking. + public static BatchJob BatchJob(string id = null, string displayName = null, bool? usesTaskDependencies = null, string url = null, string eTag = null, DateTimeOffset? lastModified = null, DateTimeOffset? creationTime = null, BatchJobState? state = null, DateTimeOffset? stateTransitionTime = null, BatchJobState? previousState = null, DateTimeOffset? previousStateTransitionTime = null, int? priority = null, bool? allowTaskPreemption = null, int? maxParallelTasks = null, BatchJobConstraints constraints = null, BatchJobManagerTask jobManagerTask = null, BatchJobPreparationTask jobPreparationTask = null, BatchJobReleaseTask jobReleaseTask = null, IEnumerable commonEnvironmentSettings = null, BatchPoolInfo poolInfo = null, OnAllBatchTasksComplete? onAllTasksComplete = null, OnBatchTaskFailure? onTaskFailure = null, BatchJobNetworkConfiguration networkConfiguration = null, IEnumerable metadata = null, BatchJobExecutionInfo executionInfo = null, BatchJobStatistics stats = null) + { + commonEnvironmentSettings ??= new List(); + metadata ??= new List(); + + return new BatchJob( + id, + displayName, + usesTaskDependencies, + url, + eTag, + lastModified, + creationTime, + state, + stateTransitionTime, + previousState, + previousStateTransitionTime, + priority, + allowTaskPreemption, + maxParallelTasks, + constraints, + jobManagerTask, + jobPreparationTask, + jobReleaseTask, + commonEnvironmentSettings?.ToList(), + poolInfo, + onAllTasksComplete, + onTaskFailure, + networkConfiguration, + metadata?.ToList(), + executionInfo, + stats, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The start time of the Job. This is the time at which the Job was created. + /// The completion time of the Job. This property is set only if the Job is in the completed state. + /// The ID of the Pool to which this Job is assigned. This element contains the actual Pool where the Job is assigned. When you get Job details from the service, they also contain a poolInfo element, which contains the Pool configuration data from when the Job was added or updated. That poolInfo element may also contain a poolId element. If it does, the two IDs are the same. If it does not, it means the Job ran on an auto Pool, and this property contains the ID of that auto Pool. + /// Details of any error encountered by the service in starting the Job. This property is not set if there was no error starting the Job. + /// A string describing the reason the Job ended. This property is set only if the Job is in the completed state. If the Batch service terminates the Job, it sets the reason as follows: JMComplete - the Job Manager Task completed, and killJobOnCompletion was set to true. MaxWallClockTimeExpiry - the Job reached its maxWallClockTime constraint. TerminateJobSchedule - the Job ran as part of a schedule, and the schedule terminated. AllTasksComplete - the Job's onAllTasksComplete attribute is set to terminatejob, and all Tasks in the Job are complete. TaskFailed - the Job's onTaskFailure attribute is set to performExitOptionsJobAction, and a Task in the Job failed with an exit condition that specified a jobAction of terminatejob. Any other string is a user-defined reason specified in a call to the 'Terminate a Job' operation. + /// A new instance for mocking. + public static BatchJobExecutionInfo BatchJobExecutionInfo(DateTimeOffset startTime = default, DateTimeOffset? endTime = null, string poolId = null, BatchJobSchedulingError schedulingError = null, string terminationReason = null) + { + return new BatchJobExecutionInfo( + startTime, + endTime, + poolId, + schedulingError, + terminationReason, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The category of the Job scheduling error. + /// An identifier for the Job scheduling error. Codes are invariant and are intended to be consumed programmatically. + /// A message describing the Job scheduling error, intended to be suitable for display in a user interface. + /// A list of additional error details related to the scheduling error. + /// A new instance for mocking. + public static BatchJobSchedulingError BatchJobSchedulingError(ErrorCategory category = default, string code = null, string message = null, IEnumerable details = null) + { + details ??= new List(); + + return new BatchJobSchedulingError(category, code, message, details?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The URL of the statistics. + /// The start time of the time range covered by the statistics. + /// The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime. + /// The total user mode CPU time (summed across all cores and all Compute Nodes) consumed by all Tasks in the Job. + /// The total kernel mode CPU time (summed across all cores and all Compute Nodes) consumed by all Tasks in the Job. + /// The total wall clock time of all Tasks in the Job. The wall clock time is the elapsed time from when the Task started running on a Compute Node to when it finished (or to the last time the statistics were updated, if the Task had not finished by then). If a Task was retried, this includes the wall clock time of all the Task retries. + /// The total number of disk read operations made by all Tasks in the Job. + /// The total number of disk write operations made by all Tasks in the Job. + /// The total amount of data in GiB read from disk by all Tasks in the Job. + /// The total amount of data in GiB written to disk by all Tasks in the Job. + /// The total number of Tasks successfully completed in the Job during the given time range. A Task completes successfully if it returns exit code 0. + /// The total number of Tasks in the Job that failed during the given time range. A Task fails if it exhausts its maximum retry count without returning exit code 0. + /// The total number of retries on all the Tasks in the Job during the given time range. + /// The total wait time of all Tasks in the Job. The wait time for a Task is defined as the elapsed time between the creation of the Task and the start of Task execution. (If the Task is retried due to failures, the wait time is the time to the most recent Task execution.) This value is only reported in the Account lifetime statistics; it is not included in the Job statistics. + /// A new instance for mocking. + public static BatchJobStatistics BatchJobStatistics(string url = null, DateTimeOffset startTime = default, DateTimeOffset lastUpdateTime = default, TimeSpan userCpuTime = default, TimeSpan kernelCpuTime = default, TimeSpan wallClockTime = default, long readIOps = default, long writeIOps = default, float readIOGiB = default, float writeIOGiB = default, long numSucceededTasks = default, long numFailedTasks = default, long numTaskRetries = default, TimeSpan waitTime = default) + { + return new BatchJobStatistics( + url, + startTime, + lastUpdateTime, + userCpuTime, + kernelCpuTime, + wallClockTime, + readIOps, + writeIOps, + readIOGiB, + writeIOGiB, + numSucceededTasks, + numFailedTasks, + numTaskRetries, + waitTime, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// A string that uniquely identifies the Job within the Account. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an Account that differ only by case). + /// The display name for the Job. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. + /// Whether Tasks in the Job can define dependencies on each other. The default is false. + /// The priority of the Job. Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0. + /// Whether Tasks in this job can be preempted by other high priority jobs. If the value is set to True, other high priority jobs submitted to the system will take precedence and will be able requeue tasks from this job. You can update a job's allowTaskPreemption after it has been created using the update job API. + /// The maximum number of tasks that can be executed in parallel for the job. The value of maxParallelTasks must be -1 or greater than 0 if specified. If not specified, the default value is -1, which means there's no limit to the number of tasks that can be run at once. You can update a job's maxParallelTasks after it has been created using the update job API. + /// The execution constraints for the Job. + /// Details of a Job Manager Task to be launched when the Job is started. If the Job does not specify a Job Manager Task, the user must explicitly add Tasks to the Job. If the Job does specify a Job Manager Task, the Batch service creates the Job Manager Task when the Job is created, and will try to schedule the Job Manager Task before scheduling other Tasks in the Job. The Job Manager Task's typical purpose is to control and/or monitor Job execution, for example by deciding what additional Tasks to run, determining when the work is complete, etc. (However, a Job Manager Task is not restricted to these activities - it is a fully-fledged Task in the system and perform whatever actions are required for the Job.) For example, a Job Manager Task might download a file specified as a parameter, analyze the contents of that file and submit additional Tasks based on those contents. + /// The Job Preparation Task. If a Job has a Job Preparation Task, the Batch service will run the Job Preparation Task on a Node before starting any Tasks of that Job on that Compute Node. + /// The Job Release Task. A Job Release Task cannot be specified without also specifying a Job Preparation Task for the Job. The Batch service runs the Job Release Task on the Nodes that have run the Job Preparation Task. The primary purpose of the Job Release Task is to undo changes to Compute Nodes made by the Job Preparation Task. Example activities include deleting local files, or shutting down services that were started as part of Job preparation. + /// The list of common environment variable settings. These environment variables are set for all Tasks in the Job (including the Job Manager, Job Preparation and Job Release Tasks). Individual Tasks can override an environment setting specified here by specifying the same setting name with a different value. + /// The Pool on which the Batch service runs the Job's Tasks. + /// The action the Batch service should take when all Tasks in the Job are in the completed state. Note that if a Job contains no Tasks, then all Tasks are considered complete. This option is therefore most commonly used with a Job Manager task; if you want to use automatic Job termination without a Job Manager, you should initially set onAllTasksComplete to noaction and update the Job properties to set onAllTasksComplete to terminatejob once you have finished adding Tasks. The default is noaction. + /// The action the Batch service should take when any Task in the Job fails. A Task is considered to have failed if has a failureInfo. A failureInfo is set if the Task completes with a non-zero exit code after exhausting its retry count, or if there was an error starting the Task, for example due to a resource file download error. The default is noaction. + /// The network configuration for the Job. + /// A list of name-value pairs associated with the Job as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. + /// A new instance for mocking. + public static BatchJobCreateContent BatchJobCreateContent(string id = null, string displayName = null, bool? usesTaskDependencies = null, int? priority = null, bool? allowTaskPreemption = null, int? maxParallelTasks = null, BatchJobConstraints constraints = null, BatchJobManagerTask jobManagerTask = null, BatchJobPreparationTask jobPreparationTask = null, BatchJobReleaseTask jobReleaseTask = null, IEnumerable commonEnvironmentSettings = null, BatchPoolInfo poolInfo = null, OnAllBatchTasksComplete? onAllTasksComplete = null, OnBatchTaskFailure? onTaskFailure = null, BatchJobNetworkConfiguration networkConfiguration = null, IEnumerable metadata = null) + { + commonEnvironmentSettings ??= new List(); + metadata ??= new List(); + + return new BatchJobCreateContent( + id, + displayName, + usesTaskDependencies, + priority, + allowTaskPreemption, + maxParallelTasks, + constraints, + jobManagerTask, + jobPreparationTask, + jobReleaseTask, + commonEnvironmentSettings?.ToList(), + poolInfo, + onAllTasksComplete, + onTaskFailure, + networkConfiguration, + metadata?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The ID of the Pool containing the Compute Node to which this entry refers. + /// The ID of the Compute Node to which this entry refers. + /// The URL of the Compute Node to which this entry refers. + /// Information about the execution status of the Job Preparation Task on this Compute Node. + /// Information about the execution status of the Job Release Task on this Compute Node. This property is set only if the Job Release Task has run on the Compute Node. + /// A new instance for mocking. + public static BatchJobPreparationAndReleaseTaskStatus BatchJobPreparationAndReleaseTaskStatus(string poolId = null, string nodeId = null, string nodeUrl = null, BatchJobPreparationTaskExecutionInfo jobPreparationTaskExecutionInfo = null, BatchJobReleaseTaskExecutionInfo jobReleaseTaskExecutionInfo = null) + { + return new BatchJobPreparationAndReleaseTaskStatus( + poolId, + nodeId, + nodeUrl, + jobPreparationTaskExecutionInfo, + jobReleaseTaskExecutionInfo, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The time at which the Task started running. If the Task has been restarted or retried, this is the most recent time at which the Task started running. + /// The time at which the Job Preparation Task completed. This property is set only if the Task is in the Completed state. + /// The current state of the Job Preparation Task on the Compute Node. + /// The root directory of the Job Preparation Task on the Compute Node. You can use this path to retrieve files created by the Task, such as log files. + /// The URL to the root directory of the Job Preparation Task on the Compute Node. + /// The exit code of the program specified on the Task command line. This parameter is returned only if the Task is in the completed state. The exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. Note that the exit code may also be generated by the Compute Node operating system, such as when a process is forcibly terminated. + /// Information about the container under which the Task is executing. This property is set only if the Task runs in a container context. + /// Information describing the Task failure, if any. This property is set only if the Task is in the completed state and encountered a failure. + /// The number of times the Task has been retried by the Batch service. Task application failures (non-zero exit code) are retried, pre-processing errors (the Task could not be run) and file upload errors are not retried. The Batch service will retry the Task up to the limit specified by the constraints. Task application failures (non-zero exit code) are retried, pre-processing errors (the Task could not be run) and file upload errors are not retried. The Batch service will retry the Task up to the limit specified by the constraints. + /// The most recent time at which a retry of the Job Preparation Task started running. This property is set only if the Task was retried (i.e. retryCount is nonzero). If present, this is typically the same as startTime, but may be different if the Task has been restarted for reasons other than retry; for example, if the Compute Node was rebooted during a retry, then the startTime is updated but the lastRetryTime is not. + /// The result of the Task execution. If the value is 'failed', then the details of the failure can be found in the failureInfo property. + /// A new instance for mocking. + public static BatchJobPreparationTaskExecutionInfo BatchJobPreparationTaskExecutionInfo(DateTimeOffset startTime = default, DateTimeOffset? endTime = null, BatchJobPreparationTaskState state = default, string taskRootDirectory = null, string taskRootDirectoryUrl = null, int? exitCode = null, BatchTaskContainerExecutionInfo containerInfo = null, BatchTaskFailureInfo failureInfo = null, int retryCount = default, DateTimeOffset? lastRetryTime = null, BatchTaskExecutionResult? result = null) + { + return new BatchJobPreparationTaskExecutionInfo( + startTime, + endTime, + state, + taskRootDirectory, + taskRootDirectoryUrl, + exitCode, + containerInfo, + failureInfo, + retryCount, + lastRetryTime, + result, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The ID of the container. + /// The state of the container. This is the state of the container according to the Docker service. It is equivalent to the status field returned by "docker inspect". + /// Detailed error information about the container. This is the detailed error string from the Docker service, if available. It is equivalent to the error field returned by "docker inspect". + /// A new instance for mocking. + public static BatchTaskContainerExecutionInfo BatchTaskContainerExecutionInfo(string containerId = null, string state = null, string error = null) + { + return new BatchTaskContainerExecutionInfo(containerId, state, error, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The category of the Task error. + /// An identifier for the Task error. Codes are invariant and are intended to be consumed programmatically. + /// A message describing the Task error, intended to be suitable for display in a user interface. + /// A list of additional details related to the error. + /// A new instance for mocking. + public static BatchTaskFailureInfo BatchTaskFailureInfo(ErrorCategory category = default, string code = null, string message = null, IEnumerable details = null) + { + details ??= new List(); + + return new BatchTaskFailureInfo(category, code, message, details?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The time at which the Task started running. If the Task has been restarted or retried, this is the most recent time at which the Task started running. + /// The time at which the Job Release Task completed. This property is set only if the Task is in the Completed state. + /// The current state of the Job Release Task on the Compute Node. + /// The root directory of the Job Release Task on the Compute Node. You can use this path to retrieve files created by the Task, such as log files. + /// The URL to the root directory of the Job Release Task on the Compute Node. + /// The exit code of the program specified on the Task command line. This parameter is returned only if the Task is in the completed state. The exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. Note that the exit code may also be generated by the Compute Node operating system, such as when a process is forcibly terminated. + /// Information about the container under which the Task is executing. This property is set only if the Task runs in a container context. + /// Information describing the Task failure, if any. This property is set only if the Task is in the completed state and encountered a failure. + /// The result of the Task execution. If the value is 'failed', then the details of the failure can be found in the failureInfo property. + /// A new instance for mocking. + public static BatchJobReleaseTaskExecutionInfo BatchJobReleaseTaskExecutionInfo(DateTimeOffset startTime = default, DateTimeOffset? endTime = null, BatchJobReleaseTaskState state = default, string taskRootDirectory = null, string taskRootDirectoryUrl = null, int? exitCode = null, BatchTaskContainerExecutionInfo containerInfo = null, BatchTaskFailureInfo failureInfo = null, BatchTaskExecutionResult? result = null) + { + return new BatchJobReleaseTaskExecutionInfo( + startTime, + endTime, + state, + taskRootDirectory, + taskRootDirectoryUrl, + exitCode, + containerInfo, + failureInfo, + result, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The number of Tasks per state. + /// The number of TaskSlots required by Tasks per state. + /// A new instance for mocking. + public static BatchTaskCountsResult BatchTaskCountsResult(BatchTaskCounts taskCounts = null, BatchTaskSlotCounts taskSlotCounts = null) + { + return new BatchTaskCountsResult(taskCounts, taskSlotCounts, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The number of Tasks in the active state. + /// The number of Tasks in the running or preparing state. + /// The number of Tasks in the completed state. + /// The number of Tasks which succeeded. A Task succeeds if its result (found in the executionInfo property) is 'success'. + /// The number of Tasks which failed. A Task fails if its result (found in the executionInfo property) is 'failure'. + /// A new instance for mocking. + public static BatchTaskCounts BatchTaskCounts(int active = default, int running = default, int completed = default, int succeeded = default, int failed = default) + { + return new BatchTaskCounts( + active, + running, + completed, + succeeded, + failed, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The number of TaskSlots for active Tasks. + /// The number of TaskSlots for running Tasks. + /// The number of TaskSlots for completed Tasks. + /// The number of TaskSlots for succeeded Tasks. + /// The number of TaskSlots for failed Tasks. + /// A new instance for mocking. + public static BatchTaskSlotCounts BatchTaskSlotCounts(int active = default, int running = default, int completed = default, int succeeded = default, int failed = default) + { + return new BatchTaskSlotCounts( + active, + running, + completed, + succeeded, + failed, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// A string that uniquely identifies the schedule within the Account. + /// The display name for the schedule. + /// The URL of the Job Schedule. + /// The ETag of the Job Schedule. This is an opaque string. You can use it to detect whether the Job Schedule has changed between requests. In particular, you can be pass the ETag with an Update Job Schedule request to specify that your changes should take effect only if nobody else has modified the schedule in the meantime. + /// The last modified time of the Job Schedule. This is the last time at which the schedule level data, such as the Job specification or recurrence information, changed. It does not factor in job-level changes such as new Jobs being created or Jobs changing state. + /// The creation time of the Job Schedule. + /// The current state of the Job Schedule. + /// The time at which the Job Schedule entered the current state. + /// The previous state of the Job Schedule. This property is not present if the Job Schedule is in its initial active state. + /// The time at which the Job Schedule entered its previous state. This property is not present if the Job Schedule is in its initial active state. + /// The schedule according to which Jobs will be created. All times are fixed respective to UTC and are not impacted by daylight saving time. + /// The details of the Jobs to be created on this schedule. + /// Information about Jobs that have been and will be run under this schedule. + /// A list of name-value pairs associated with the schedule as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. + /// The lifetime resource usage statistics for the Job Schedule. The statistics may not be immediately available. The Batch service performs periodic roll-up of statistics. The typical delay is about 30 minutes. + /// A new instance for mocking. + public static BatchJobSchedule BatchJobSchedule(string id = null, string displayName = null, string url = null, string eTag = null, DateTimeOffset? lastModified = null, DateTimeOffset? creationTime = null, BatchJobScheduleState? state = null, DateTimeOffset? stateTransitionTime = null, BatchJobScheduleState? previousState = null, DateTimeOffset? previousStateTransitionTime = null, BatchJobScheduleConfiguration schedule = null, BatchJobSpecification jobSpecification = null, BatchJobScheduleExecutionInfo executionInfo = null, IEnumerable metadata = null, BatchJobScheduleStatistics stats = null) + { + metadata ??= new List(); + + return new BatchJobSchedule( + id, + displayName, + url, + eTag, + lastModified, + creationTime, + state, + stateTransitionTime, + previousState, + previousStateTransitionTime, + schedule, + jobSpecification, + executionInfo, + metadata?.ToList(), + stats, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The next time at which a Job will be created under this schedule. This property is meaningful only if the schedule is in the active state when the time comes around. For example, if the schedule is disabled, no Job will be created at nextRunTime unless the Job is enabled before then. + /// Information about the most recent Job under the Job Schedule. This property is present only if the at least one Job has run under the schedule. + /// The time at which the schedule ended. This property is set only if the Job Schedule is in the completed state. + /// A new instance for mocking. + public static BatchJobScheduleExecutionInfo BatchJobScheduleExecutionInfo(DateTimeOffset? nextRunTime = null, RecentBatchJob recentJob = null, DateTimeOffset? endTime = null) + { + return new BatchJobScheduleExecutionInfo(nextRunTime, recentJob, endTime, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The ID of the Job. + /// The URL of the Job. + /// A new instance for mocking. + public static RecentBatchJob RecentBatchJob(string id = null, string url = null) + { + return new RecentBatchJob(id, url, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The URL of the statistics. + /// The start time of the time range covered by the statistics. + /// The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime. + /// The total user mode CPU time (summed across all cores and all Compute Nodes) consumed by all Tasks in all Jobs created under the schedule. + /// The total kernel mode CPU time (summed across all cores and all Compute Nodes) consumed by all Tasks in all Jobs created under the schedule. + /// The total wall clock time of all the Tasks in all the Jobs created under the schedule. The wall clock time is the elapsed time from when the Task started running on a Compute Node to when it finished (or to the last time the statistics were updated, if the Task had not finished by then). If a Task was retried, this includes the wall clock time of all the Task retries. + /// The total number of disk read operations made by all Tasks in all Jobs created under the schedule. + /// The total number of disk write operations made by all Tasks in all Jobs created under the schedule. + /// The total gibibytes read from disk by all Tasks in all Jobs created under the schedule. + /// The total gibibytes written to disk by all Tasks in all Jobs created under the schedule. + /// The total number of Tasks successfully completed during the given time range in Jobs created under the schedule. A Task completes successfully if it returns exit code 0. + /// The total number of Tasks that failed during the given time range in Jobs created under the schedule. A Task fails if it exhausts its maximum retry count without returning exit code 0. + /// The total number of retries during the given time range on all Tasks in all Jobs created under the schedule. + /// The total wait time of all Tasks in all Jobs created under the schedule. The wait time for a Task is defined as the elapsed time between the creation of the Task and the start of Task execution. (If the Task is retried due to failures, the wait time is the time to the most recent Task execution.). This value is only reported in the Account lifetime statistics; it is not included in the Job statistics. + /// A new instance for mocking. + public static BatchJobScheduleStatistics BatchJobScheduleStatistics(string url = null, DateTimeOffset startTime = default, DateTimeOffset lastUpdateTime = default, TimeSpan userCpuTime = default, TimeSpan kernelCpuTime = default, TimeSpan wallClockTime = default, long readIOps = default, long writeIOps = default, float readIOGiB = default, float writeIOGiB = default, long numSucceededTasks = default, long numFailedTasks = default, long numTaskRetries = default, TimeSpan waitTime = default) + { + return new BatchJobScheduleStatistics( + url, + startTime, + lastUpdateTime, + userCpuTime, + kernelCpuTime, + wallClockTime, + readIOps, + writeIOps, + readIOGiB, + writeIOGiB, + numSucceededTasks, + numFailedTasks, + numTaskRetries, + waitTime, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// A string that uniquely identifies the schedule within the Account. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an Account that differ only by case). + /// The display name for the schedule. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. + /// The schedule according to which Jobs will be created. All times are fixed respective to UTC and are not impacted by daylight saving time. + /// The details of the Jobs to be created on this schedule. + /// A list of name-value pairs associated with the schedule as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. + /// A new instance for mocking. + public static BatchJobScheduleCreateContent BatchJobScheduleCreateContent(string id = null, string displayName = null, BatchJobScheduleConfiguration schedule = null, BatchJobSpecification jobSpecification = null, IEnumerable metadata = null) + { + metadata ??= new List(); + + return new BatchJobScheduleCreateContent( + id, + displayName, + schedule, + jobSpecification, + metadata?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// A string that uniquely identifies the Task within the Job. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within a Job that differ only by case). + /// A display name for the Task. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. + /// How the Batch service should respond when the Task completes. + /// The command line of the Task. For multi-instance Tasks, the command line is executed as the primary Task, after the primary Task and all subtasks have finished executing the coordination command line. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + /// The settings for the container under which the Task runs. If the Pool that will run this Task has containerConfiguration set, this must be set as well. If the Pool that will run this Task doesn't have containerConfiguration set, this must not be set. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. + /// A list of files that the Batch service will download to the Compute Node before running the command line. For multi-instance Tasks, the resource files will only be downloaded to the Compute Node on which the primary Task is executed. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. + /// A list of files that the Batch service will upload from the Compute Node after running the command line. For multi-instance Tasks, the files will only be uploaded from the Compute Node on which the primary Task is executed. + /// A list of environment variable settings for the Task. + /// A locality hint that can be used by the Batch service to select a Compute Node on which to start the new Task. + /// The execution constraints that apply to this Task. If you do not specify constraints, the maxTaskRetryCount is the maxTaskRetryCount specified for the Job, the maxWallClockTime is infinite, and the retentionTime is 7 days. + /// The number of scheduling slots that the Task required to run. The default is 1. A Task can only be scheduled to run on a compute node if the node has enough free scheduling slots available. For multi-instance Tasks, this must be 1. + /// The user identity under which the Task runs. If omitted, the Task runs as a non-administrative user unique to the Task. + /// An object that indicates that the Task is a multi-instance Task, and contains information about how to run the multi-instance Task. + /// The Tasks that this Task depends on. This Task will not be scheduled until all Tasks that it depends on have completed successfully. If any of those Tasks fail and exhaust their retry counts, this Task will never be scheduled. If the Job does not have usesTaskDependencies set to true, and this element is present, the request fails with error code TaskDependenciesNotSpecifiedOnJob. + /// A list of Packages that the Batch service will deploy to the Compute Node before running the command line. Application packages are downloaded and deployed to a shared directory, not the Task working directory. Therefore, if a referenced package is already on the Node, and is up to date, then it is not re-downloaded; the existing copy on the Compute Node is used. If a referenced Package cannot be installed, for example because the package has been deleted or because download failed, the Task fails. + /// The settings for an authentication token that the Task can use to perform Batch service operations. If this property is set, the Batch service provides the Task with an authentication token which can be used to authenticate Batch service operations without requiring an Account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the Task can carry out using the token depend on the settings. For example, a Task can request Job permissions in order to add other Tasks to the Job, or check the status of the Job or of other Tasks under the Job. + /// A new instance for mocking. + public static BatchTaskCreateContent BatchTaskCreateContent(string id = null, string displayName = null, ExitConditions exitConditions = null, string commandLine = null, BatchTaskContainerSettings containerSettings = null, IEnumerable resourceFiles = null, IEnumerable outputFiles = null, IEnumerable environmentSettings = null, AffinityInfo affinityInfo = null, BatchTaskConstraints constraints = null, int? requiredSlots = null, UserIdentity userIdentity = null, MultiInstanceSettings multiInstanceSettings = null, BatchTaskDependencies dependsOn = null, IEnumerable applicationPackageReferences = null, AuthenticationTokenSettings authenticationTokenSettings = null) + { + resourceFiles ??= new List(); + outputFiles ??= new List(); + environmentSettings ??= new List(); + applicationPackageReferences ??= new List(); + + return new BatchTaskCreateContent( + id, + displayName, + exitConditions, + commandLine, + containerSettings, + resourceFiles?.ToList(), + outputFiles?.ToList(), + environmentSettings?.ToList(), + affinityInfo, + constraints, + requiredSlots, + userIdentity, + multiInstanceSettings, + dependsOn, + applicationPackageReferences?.ToList(), + authenticationTokenSettings, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// A string that uniquely identifies the Task within the Job. The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. + /// A display name for the Task. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. + /// The URL of the Task. + /// The ETag of the Task. This is an opaque string. You can use it to detect whether the Task has changed between requests. In particular, you can be pass the ETag when updating a Task to specify that your changes should take effect only if nobody else has modified the Task in the meantime. + /// The last modified time of the Task. + /// The creation time of the Task. + /// How the Batch service should respond when the Task completes. + /// The current state of the Task. + /// The time at which the Task entered its current state. + /// The previous state of the Task. This property is not set if the Task is in its initial Active state. + /// The time at which the Task entered its previous state. This property is not set if the Task is in its initial Active state. + /// The command line of the Task. For multi-instance Tasks, the command line is executed as the primary Task, after the primary Task and all subtasks have finished executing the coordination command line. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + /// The settings for the container under which the Task runs. If the Pool that will run this Task has containerConfiguration set, this must be set as well. If the Pool that will run this Task doesn't have containerConfiguration set, this must not be set. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all Task environment variables are mapped into the container, and the Task command line is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. + /// A list of files that the Batch service will download to the Compute Node before running the command line. For multi-instance Tasks, the resource files will only be downloaded to the Compute Node on which the primary Task is executed. There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. + /// A list of files that the Batch service will upload from the Compute Node after running the command line. For multi-instance Tasks, the files will only be uploaded from the Compute Node on which the primary Task is executed. + /// A list of environment variable settings for the Task. + /// A locality hint that can be used by the Batch service to select a Compute Node on which to start the new Task. + /// The execution constraints that apply to this Task. + /// The number of scheduling slots that the Task requires to run. The default is 1. A Task can only be scheduled to run on a compute node if the node has enough free scheduling slots available. For multi-instance Tasks, this must be 1. + /// The user identity under which the Task runs. If omitted, the Task runs as a non-administrative user unique to the Task. + /// Information about the execution of the Task. + /// Information about the Compute Node on which the Task ran. + /// An object that indicates that the Task is a multi-instance Task, and contains information about how to run the multi-instance Task. + /// Resource usage statistics for the Task. + /// The Tasks that this Task depends on. This Task will not be scheduled until all Tasks that it depends on have completed successfully. If any of those Tasks fail and exhaust their retry counts, this Task will never be scheduled. + /// A list of Packages that the Batch service will deploy to the Compute Node before running the command line. Application packages are downloaded and deployed to a shared directory, not the Task working directory. Therefore, if a referenced package is already on the Node, and is up to date, then it is not re-downloaded; the existing copy on the Compute Node is used. If a referenced Package cannot be installed, for example because the package has been deleted or because download failed, the Task fails. + /// The settings for an authentication token that the Task can use to perform Batch service operations. If this property is set, the Batch service provides the Task with an authentication token which can be used to authenticate Batch service operations without requiring an Account access key. The token is provided via the AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the Task can carry out using the token depend on the settings. For example, a Task can request Job permissions in order to add other Tasks to the Job, or check the status of the Job or of other Tasks under the Job. + /// A new instance for mocking. + public static BatchTask BatchTask(string id = null, string displayName = null, string url = null, string eTag = null, DateTimeOffset? lastModified = null, DateTimeOffset? creationTime = null, ExitConditions exitConditions = null, BatchTaskState? state = null, DateTimeOffset? stateTransitionTime = null, BatchTaskState? previousState = null, DateTimeOffset? previousStateTransitionTime = null, string commandLine = null, BatchTaskContainerSettings containerSettings = null, IEnumerable resourceFiles = null, IEnumerable outputFiles = null, IEnumerable environmentSettings = null, AffinityInfo affinityInfo = null, BatchTaskConstraints constraints = null, int? requiredSlots = null, UserIdentity userIdentity = null, BatchTaskExecutionInfo executionInfo = null, BatchNodeInfo nodeInfo = null, MultiInstanceSettings multiInstanceSettings = null, BatchTaskStatistics stats = null, BatchTaskDependencies dependsOn = null, IEnumerable applicationPackageReferences = null, AuthenticationTokenSettings authenticationTokenSettings = null) + { + resourceFiles ??= new List(); + outputFiles ??= new List(); + environmentSettings ??= new List(); + applicationPackageReferences ??= new List(); + + return new BatchTask( + id, + displayName, + url, + eTag, + lastModified, + creationTime, + exitConditions, + state, + stateTransitionTime, + previousState, + previousStateTransitionTime, + commandLine, + containerSettings, + resourceFiles?.ToList(), + outputFiles?.ToList(), + environmentSettings?.ToList(), + affinityInfo, + constraints, + requiredSlots, + userIdentity, + executionInfo, + nodeInfo, + multiInstanceSettings, + stats, + dependsOn, + applicationPackageReferences?.ToList(), + authenticationTokenSettings, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The time at which the Task started running. 'Running' corresponds to the running state, so if the Task specifies resource files or Packages, then the start time reflects the time at which the Task started downloading or deploying these. If the Task has been restarted or retried, this is the most recent time at which the Task started running. This property is present only for Tasks that are in the running or completed state. + /// The time at which the Task completed. This property is set only if the Task is in the Completed state. + /// The exit code of the program specified on the Task command line. This property is set only if the Task is in the completed state. In general, the exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. However, if the Batch service terminates the Task (due to timeout, or user termination via the API) you may see an operating system-defined exit code. + /// Information about the container under which the Task is executing. This property is set only if the Task runs in a container context. + /// Information describing the Task failure, if any. This property is set only if the Task is in the completed state and encountered a failure. + /// The number of times the Task has been retried by the Batch service. Task application failures (non-zero exit code) are retried, pre-processing errors (the Task could not be run) and file upload errors are not retried. The Batch service will retry the Task up to the limit specified by the constraints. + /// The most recent time at which a retry of the Task started running. This element is present only if the Task was retried (i.e. retryCount is nonzero). If present, this is typically the same as startTime, but may be different if the Task has been restarted for reasons other than retry; for example, if the Compute Node was rebooted during a retry, then the startTime is updated but the lastRetryTime is not. + /// The number of times the Task has been requeued by the Batch service as the result of a user request. When the user removes Compute Nodes from a Pool (by resizing/shrinking the pool) or when the Job is being disabled, the user can specify that running Tasks on the Compute Nodes be requeued for execution. This count tracks how many times the Task has been requeued for these reasons. + /// The most recent time at which the Task has been requeued by the Batch service as the result of a user request. This property is set only if the requeueCount is nonzero. + /// The result of the Task execution. If the value is 'failed', then the details of the failure can be found in the failureInfo property. + /// A new instance for mocking. + public static BatchTaskExecutionInfo BatchTaskExecutionInfo(DateTimeOffset? startTime = null, DateTimeOffset? endTime = null, int? exitCode = null, BatchTaskContainerExecutionInfo containerInfo = null, BatchTaskFailureInfo failureInfo = null, int retryCount = default, DateTimeOffset? lastRetryTime = null, int requeueCount = default, DateTimeOffset? lastRequeueTime = null, BatchTaskExecutionResult? result = null) + { + return new BatchTaskExecutionInfo( + startTime, + endTime, + exitCode, + containerInfo, + failureInfo, + retryCount, + lastRetryTime, + requeueCount, + lastRequeueTime, + result, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// An identifier for the Node on which the Task ran, which can be passed when adding a Task to request that the Task be scheduled on this Compute Node. + /// The URL of the Compute Node on which the Task ran. + /// The ID of the Pool on which the Task ran. + /// The ID of the Compute Node on which the Task ran. + /// The root directory of the Task on the Compute Node. + /// The URL to the root directory of the Task on the Compute Node. + /// A new instance for mocking. + public static BatchNodeInfo BatchNodeInfo(string affinityId = null, string nodeUrl = null, string poolId = null, string nodeId = null, string taskRootDirectory = null, string taskRootDirectoryUrl = null) + { + return new BatchNodeInfo( + affinityId, + nodeUrl, + poolId, + nodeId, + taskRootDirectory, + taskRootDirectoryUrl, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The URL of the statistics. + /// The start time of the time range covered by the statistics. + /// The time at which the statistics were last updated. All statistics are limited to the range between startTime and lastUpdateTime. + /// The total user mode CPU time (summed across all cores and all Compute Nodes) consumed by the Task. + /// The total kernel mode CPU time (summed across all cores and all Compute Nodes) consumed by the Task. + /// The total wall clock time of the Task. The wall clock time is the elapsed time from when the Task started running on a Compute Node to when it finished (or to the last time the statistics were updated, if the Task had not finished by then). If the Task was retried, this includes the wall clock time of all the Task retries. + /// The total number of disk read operations made by the Task. + /// The total number of disk write operations made by the Task. + /// The total gibibytes read from disk by the Task. + /// The total gibibytes written to disk by the Task. + /// The total wait time of the Task. The wait time for a Task is defined as the elapsed time between the creation of the Task and the start of Task execution. (If the Task is retried due to failures, the wait time is the time to the most recent Task execution.). + /// A new instance for mocking. + public static BatchTaskStatistics BatchTaskStatistics(string url = null, DateTimeOffset startTime = default, DateTimeOffset lastUpdateTime = default, TimeSpan userCpuTime = default, TimeSpan kernelCpuTime = default, TimeSpan wallClockTime = default, long readIOps = default, long writeIOps = default, float readIOGiB = default, float writeIOGiB = default, TimeSpan waitTime = default) + { + return new BatchTaskStatistics( + url, + startTime, + lastUpdateTime, + userCpuTime, + kernelCpuTime, + wallClockTime, + readIOps, + writeIOps, + readIOGiB, + writeIOGiB, + waitTime, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The results of the add Task collection operation. + /// A new instance for mocking. + public static BatchTaskAddCollectionResult BatchTaskAddCollectionResult(IEnumerable value = null) + { + value ??= new List(); + + return new BatchTaskAddCollectionResult(value?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The status of the add Task request. + /// The ID of the Task for which this is the result. + /// The ETag of the Task, if the Task was successfully added. You can use this to detect whether the Task has changed between requests. In particular, you can be pass the ETag with an Update Task request to specify that your changes should take effect only if nobody else has modified the Job in the meantime. + /// The last modified time of the Task. + /// The URL of the Task, if the Task was successfully added. + /// The error encountered while attempting to add the Task. + /// A new instance for mocking. + public static BatchTaskAddResult BatchTaskAddResult(BatchTaskAddStatus status = default, string taskId = null, string eTag = null, DateTimeOffset? lastModified = null, string location = null, BatchError error = null) + { + return new BatchTaskAddResult( + status, + taskId, + eTag, + lastModified, + location, + error, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically. + /// A message describing the error, intended to be suitable for display in a user interface. + /// A collection of key-value pairs containing additional details about the error. + /// A new instance for mocking. + public static BatchError BatchError(string code = null, BatchErrorMessage message = null, IEnumerable values = null) + { + values ??= new List(); + + return new BatchError(code, message, values?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The language code of the error message. + /// The text of the message. + /// A new instance for mocking. + public static BatchErrorMessage BatchErrorMessage(string lang = null, string value = null) + { + return new BatchErrorMessage(lang, value, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// An identifier specifying the meaning of the Value property. + /// The additional information included with the error response. + /// A new instance for mocking. + public static BatchErrorDetail BatchErrorDetail(string key = null, string value = null) + { + return new BatchErrorDetail(key, value, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The ID of the subtask. + /// Information about the Compute Node on which the subtask ran. + /// The time at which the subtask started running. If the subtask has been restarted or retried, this is the most recent time at which the subtask started running. + /// The time at which the subtask completed. This property is set only if the subtask is in the Completed state. + /// The exit code of the program specified on the subtask command line. This property is set only if the subtask is in the completed state. In general, the exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. However, if the Batch service terminates the subtask (due to timeout, or user termination via the API) you may see an operating system-defined exit code. + /// Information about the container under which the Task is executing. This property is set only if the Task runs in a container context. + /// Information describing the Task failure, if any. This property is set only if the Task is in the completed state and encountered a failure. + /// The current state of the subtask. + /// The time at which the subtask entered its current state. + /// The previous state of the subtask. This property is not set if the subtask is in its initial running state. + /// The time at which the subtask entered its previous state. This property is not set if the subtask is in its initial running state. + /// The result of the Task execution. If the value is 'failed', then the details of the failure can be found in the failureInfo property. + /// A new instance for mocking. + public static BatchSubtask BatchSubtask(int? id = null, BatchNodeInfo nodeInfo = null, DateTimeOffset? startTime = null, DateTimeOffset? endTime = null, int? exitCode = null, BatchTaskContainerExecutionInfo containerInfo = null, BatchTaskFailureInfo failureInfo = null, BatchSubtaskState? state = null, DateTimeOffset? stateTransitionTime = null, BatchSubtaskState? previousState = null, DateTimeOffset? previousStateTransitionTime = null, BatchTaskExecutionResult? result = null) + { + return new BatchSubtask( + id, + nodeInfo, + startTime, + endTime, + exitCode, + containerInfo, + failureInfo, + state, + stateTransitionTime, + previousState, + previousStateTransitionTime, + result, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The file path. + /// The URL of the file. + /// Whether the object represents a directory. + /// The file properties. + /// A new instance for mocking. + public static BatchNodeFile BatchNodeFile(string name = null, string url = null, bool? isDirectory = null, FileProperties properties = null) + { + return new BatchNodeFile(name, url, isDirectory, properties, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The file creation time. The creation time is not returned for files on Linux Compute Nodes. + /// The time at which the file was last modified. + /// The length of the file. + /// The content type of the file. + /// The file mode attribute in octal format. The file mode is returned only for files on Linux Compute Nodes. + /// A new instance for mocking. + public static FileProperties FileProperties(DateTimeOffset? creationTime = null, DateTimeOffset lastModified = default, long contentLength = default, string contentType = null, string fileMode = null) + { + return new FileProperties( + creationTime, + lastModified, + contentLength, + contentType, + fileMode, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The user name of the Account. + /// Whether the Account should be an administrator on the Compute Node. The default value is false. + /// The time at which the Account should expire. If omitted, the default is 1 day from the current time. For Linux Compute Nodes, the expiryTime has a precision up to a day. + /// The password of the Account. The password is required for Windows Compute Nodes (those created with 'virtualMachineConfiguration' using a Windows Image reference). For Linux Compute Nodes, the password can optionally be specified along with the sshPublicKey property. + /// The SSH public key that can be used for remote login to the Compute Node. The public key should be compatible with OpenSSH encoding and should be base 64 encoded. This property can be specified only for Linux Compute Nodes. If this is specified for a Windows Compute Node, then the Batch service rejects the request; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + /// A new instance for mocking. + public static BatchNodeUserCreateContent BatchNodeUserCreateContent(string name = null, bool? isAdmin = null, DateTimeOffset? expiryTime = null, string password = null, string sshPublicKey = null) + { + return new BatchNodeUserCreateContent( + name, + isAdmin, + expiryTime, + password, + sshPublicKey, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The ID of the Compute Node. Every Compute Node that is added to a Pool is assigned a unique ID. Whenever a Compute Node is removed from a Pool, all of its local files are deleted, and the ID is reclaimed and could be reused for new Compute Nodes. + /// The URL of the Compute Node. + /// The current state of the Compute Node. The Spot/Low-priority Compute Node has been preempted. Tasks which were running on the Compute Node when it was preempted will be rescheduled when another Compute Node becomes available. + /// Whether the Compute Node is available for Task scheduling. + /// The time at which the Compute Node entered its current state. + /// The last time at which the Compute Node was started. This property may not be present if the Compute Node state is unusable. + /// The time at which this Compute Node was allocated to the Pool. This is the time when the Compute Node was initially allocated and doesn't change once set. It is not updated when the Compute Node is service healed or preempted. + /// The IP address that other Nodes can use to communicate with this Compute Node. Every Compute Node that is added to a Pool is assigned a unique IP address. Whenever a Compute Node is removed from a Pool, all of its local files are deleted, and the IP address is reclaimed and could be reused for new Compute Nodes. + /// An identifier which can be passed when adding a Task to request that the Task be scheduled on this Compute Node. Note that this is just a soft affinity. If the target Compute Node is busy or unavailable at the time the Task is scheduled, then the Task will be scheduled elsewhere. + /// The size of the virtual machine hosting the Compute Node. For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). + /// The total number of Job Tasks completed on the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start Tasks. + /// The total number of currently running Job Tasks on the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start Tasks. + /// The total number of scheduling slots used by currently running Job Tasks on the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start Tasks. + /// The total number of Job Tasks which completed successfully (with exitCode 0) on the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start Tasks. + /// A list of Tasks whose state has recently changed. This property is present only if at least one Task has run on this Compute Node since it was assigned to the Pool. + /// The Task specified to run on the Compute Node as it joins the Pool. + /// Runtime information about the execution of the StartTask on the Compute Node. + /// The list of errors that are currently being encountered by the Compute Node. + /// Whether this Compute Node is a dedicated Compute Node. If false, the Compute Node is a Spot/Low-priority Compute Node. + /// The endpoint configuration for the Compute Node. + /// Information about the Compute Node agent version and the time the Compute Node upgraded to a new version. + /// Info about the current state of the virtual machine. + /// A new instance for mocking. + public static BatchNode BatchNode(string id = null, string url = null, BatchNodeState? state = null, SchedulingState? schedulingState = null, DateTimeOffset? stateTransitionTime = null, DateTimeOffset? lastBootTime = null, DateTimeOffset? allocationTime = null, string ipAddress = null, string affinityId = null, string vmSize = null, int? totalTasksRun = null, int? runningTasksCount = null, int? runningTaskSlotsCount = null, int? totalTasksSucceeded = null, IEnumerable recentTasks = null, BatchStartTask startTask = null, BatchStartTaskInfo startTaskInfo = null, IEnumerable errors = null, bool? isDedicated = null, BatchNodeEndpointConfiguration endpointConfiguration = null, BatchNodeAgentInfo nodeAgentInfo = null, VirtualMachineInfo virtualMachineInfo = null) + { + recentTasks ??= new List(); + errors ??= new List(); + + return new BatchNode( + id, + url, + state, + schedulingState, + stateTransitionTime, + lastBootTime, + allocationTime, + ipAddress, + affinityId, + vmSize, + totalTasksRun, + runningTasksCount, + runningTaskSlotsCount, + totalTasksSucceeded, + recentTasks?.ToList(), + startTask, + startTaskInfo, + errors?.ToList(), + isDedicated, + endpointConfiguration, + nodeAgentInfo, + virtualMachineInfo, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The URL of the Task. + /// The ID of the Job to which the Task belongs. + /// The ID of the Task. + /// The ID of the subtask if the Task is a multi-instance Task. + /// The current state of the Task. + /// Information about the execution of the Task. + /// A new instance for mocking. + public static BatchTaskInfo BatchTaskInfo(string taskUrl = null, string jobId = null, string taskId = null, int? subtaskId = null, BatchTaskState taskState = default, BatchTaskExecutionInfo executionInfo = null) + { + return new BatchTaskInfo( + taskUrl, + jobId, + taskId, + subtaskId, + taskState, + executionInfo, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The state of the StartTask on the Compute Node. + /// The time at which the StartTask started running. This value is reset every time the Task is restarted or retried (that is, this is the most recent time at which the StartTask started running). + /// The time at which the StartTask stopped running. This is the end time of the most recent run of the StartTask, if that run has completed (even if that run failed and a retry is pending). This element is not present if the StartTask is currently running. + /// The exit code of the program specified on the StartTask command line. This property is set only if the StartTask is in the completed state. In general, the exit code for a process reflects the specific convention implemented by the application developer for that process. If you use the exit code value to make decisions in your code, be sure that you know the exit code convention used by the application process. However, if the Batch service terminates the StartTask (due to timeout, or user termination via the API) you may see an operating system-defined exit code. + /// Information about the container under which the Task is executing. This property is set only if the Task runs in a container context. + /// Information describing the Task failure, if any. This property is set only if the Task is in the completed state and encountered a failure. + /// The number of times the Task has been retried by the Batch service. Task application failures (non-zero exit code) are retried, pre-processing errors (the Task could not be run) and file upload errors are not retried. The Batch service will retry the Task up to the limit specified by the constraints. + /// The most recent time at which a retry of the Task started running. This element is present only if the Task was retried (i.e. retryCount is nonzero). If present, this is typically the same as startTime, but may be different if the Task has been restarted for reasons other than retry; for example, if the Compute Node was rebooted during a retry, then the startTime is updated but the lastRetryTime is not. + /// The result of the Task execution. If the value is 'failed', then the details of the failure can be found in the failureInfo property. + /// A new instance for mocking. + public static BatchStartTaskInfo BatchStartTaskInfo(BatchStartTaskState state = default, DateTimeOffset startTime = default, DateTimeOffset? endTime = null, int? exitCode = null, BatchTaskContainerExecutionInfo containerInfo = null, BatchTaskFailureInfo failureInfo = null, int retryCount = default, DateTimeOffset? lastRetryTime = null, BatchTaskExecutionResult? result = null) + { + return new BatchStartTaskInfo( + state, + startTime, + endTime, + exitCode, + containerInfo, + failureInfo, + retryCount, + lastRetryTime, + result, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// An identifier for the Compute Node error. Codes are invariant and are intended to be consumed programmatically. + /// A message describing the Compute Node error, intended to be suitable for display in a user interface. + /// The list of additional error details related to the Compute Node error. + /// A new instance for mocking. + public static BatchNodeError BatchNodeError(string code = null, string message = null, IEnumerable errorDetails = null) + { + errorDetails ??= new List(); + + return new BatchNodeError(code, message, errorDetails?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The list of inbound endpoints that are accessible on the Compute Node. + /// A new instance for mocking. + public static BatchNodeEndpointConfiguration BatchNodeEndpointConfiguration(IEnumerable inboundEndpoints = null) + { + inboundEndpoints ??= new List(); + + return new BatchNodeEndpointConfiguration(inboundEndpoints?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The name of the endpoint. + /// The protocol of the endpoint. + /// The public IP address of the Compute Node. + /// The public fully qualified domain name for the Compute Node. + /// The public port number of the endpoint. + /// The backend port number of the endpoint. + /// A new instance for mocking. + public static InboundEndpoint InboundEndpoint(string name = null, InboundEndpointProtocol protocol = default, string publicIpAddress = null, string publicFQDN = null, int frontendPort = default, int backendPort = default) + { + return new InboundEndpoint( + name, + protocol, + publicIpAddress, + publicFQDN, + frontendPort, + backendPort, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The version of the Batch Compute Node agent running on the Compute Node. This version number can be checked against the Compute Node agent release notes located at https://github.com/Azure/Batch/blob/master/changelogs/nodeagent/CHANGELOG.md. + /// The time when the Compute Node agent was updated on the Compute Node. This is the most recent time that the Compute Node agent was updated to a new version. + /// A new instance for mocking. + public static BatchNodeAgentInfo BatchNodeAgentInfo(string version = null, DateTimeOffset lastUpdateTime = default) + { + return new BatchNodeAgentInfo(version, lastUpdateTime, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The reference to the Azure Virtual Machine's Marketplace Image. + /// The resource ID of the Compute Node's current Virtual Machine Scale Set VM. Only defined if the Batch Account was created with its poolAllocationMode property set to 'UserSubscription'. + /// A new instance for mocking. + public static VirtualMachineInfo VirtualMachineInfo(ImageReference imageReference = null, string scaleSetVmResourceId = null) + { + return new VirtualMachineInfo(imageReference, scaleSetVmResourceId, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The IP address used for remote login to the Compute Node. + /// The port used for remote login to the Compute Node. + /// A new instance for mocking. + public static BatchNodeRemoteLoginSettings BatchNodeRemoteLoginSettings(string remoteLoginIpAddress = null, int remoteLoginPort = default) + { + return new BatchNodeRemoteLoginSettings(remoteLoginIpAddress, remoteLoginPort, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The URL of the container within Azure Blob Storage to which to upload the Batch Service log file(s). If a user assigned managed identity is not being used, the URL must include a Shared Access Signature (SAS) granting write permissions to the container. The SAS duration must allow enough time for the upload to finish. The start time for SAS is optional and recommended to not be specified. + /// The start of the time range from which to upload Batch Service log file(s). Any log file containing a log message in the time range will be uploaded. This means that the operation might retrieve more logs than have been requested since the entire log file is always uploaded, but the operation should not retrieve fewer logs than have been requested. + /// The end of the time range from which to upload Batch Service log file(s). Any log file containing a log message in the time range will be uploaded. This means that the operation might retrieve more logs than have been requested since the entire log file is always uploaded, but the operation should not retrieve fewer logs than have been requested. If omitted, the default is to upload all logs available after the startTime. + /// The reference to the user assigned identity to use to access Azure Blob Storage specified by containerUrl. The identity must have write access to the Azure Blob Storage container. + /// A new instance for mocking. + public static UploadBatchServiceLogsContent UploadBatchServiceLogsContent(string containerUrl = null, DateTimeOffset startTime = default, DateTimeOffset? endTime = null, BatchNodeIdentityReference identityReference = null) + { + return new UploadBatchServiceLogsContent(containerUrl, startTime, endTime, identityReference, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The virtual directory within Azure Blob Storage container to which the Batch Service log file(s) will be uploaded. The virtual directory name is part of the blob name for each log file uploaded, and it is built based poolId, nodeId and a unique identifier. + /// The number of log files which will be uploaded. + /// A new instance for mocking. + public static UploadBatchServiceLogsResult UploadBatchServiceLogsResult(string virtualDirectoryName = null, int numberOfFilesUploaded = default) + { + return new UploadBatchServiceLogsResult(virtualDirectoryName, numberOfFilesUploaded, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The provisioning state of the virtual machine extension. + /// The virtual machine extension. + /// The vm extension instance view. + /// A new instance for mocking. + public static BatchNodeVMExtension BatchNodeVMExtension(string provisioningState = null, VMExtension vmExtension = null, VMExtensionInstanceView instanceView = null) + { + return new BatchNodeVMExtension(provisioningState, vmExtension, instanceView, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The name of the vm extension instance view. + /// The resource status information. + /// The resource status information. + /// A new instance for mocking. + public static VMExtensionInstanceView VMExtensionInstanceView(string name = null, IEnumerable statuses = null, IEnumerable subStatuses = null) + { + statuses ??= new List(); + subStatuses ??= new List(); + + return new VMExtensionInstanceView(name, statuses?.ToList(), subStatuses?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The status code. + /// The localized label for the status. + /// Level code. + /// The detailed status message. + /// The time of the status. + /// A new instance for mocking. + public static InstanceViewStatus InstanceViewStatus(string code = null, string displayStatus = null, StatusLevelTypes? level = null, string message = null, DateTimeOffset? time = null) + { + return new InstanceViewStatus( + code, + displayStatus, + level, + message, + time, + serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/ContainerConfiguration.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/ContainerConfiguration.Serialization.cs new file mode 100644 index 0000000000000..d810361f3d8c2 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/ContainerConfiguration.Serialization.cs @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class ContainerConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerConfiguration)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + if (Optional.IsCollectionDefined(ContainerImageNames)) + { + writer.WritePropertyName("containerImageNames"u8); + writer.WriteStartArray(); + foreach (var item in ContainerImageNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ContainerRegistries)) + { + writer.WritePropertyName("containerRegistries"u8); + writer.WriteStartArray(); + foreach (var item in ContainerRegistries) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ContainerConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeContainerConfiguration(document.RootElement, options); + } + + internal static ContainerConfiguration DeserializeContainerConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ContainerType type = default; + IList containerImageNames = default; + IList containerRegistries = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = new ContainerType(property.Value.GetString()); + continue; + } + if (property.NameEquals("containerImageNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + containerImageNames = array; + continue; + } + if (property.NameEquals("containerRegistries"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ContainerRegistryReference.DeserializeContainerRegistryReference(item, options)); + } + containerRegistries = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ContainerConfiguration(type, containerImageNames ?? new ChangeTrackingList(), containerRegistries ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ContainerConfiguration)} does not support writing '{options.Format}' format."); + } + } + + ContainerConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeContainerConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ContainerConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ContainerConfiguration FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeContainerConfiguration(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/ContainerConfiguration.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/ContainerConfiguration.cs new file mode 100644 index 0000000000000..dbcc48aa2857b --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/ContainerConfiguration.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// The configuration for container-enabled Pools. + public partial class ContainerConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The container technology to be used. + public ContainerConfiguration(ContainerType type) + { + Type = type; + ContainerImageNames = new ChangeTrackingList(); + ContainerRegistries = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The container technology to be used. + /// The collection of container Image names. This is the full Image reference, as would be specified to "docker pull". An Image will be sourced from the default Docker registry unless the Image is fully qualified with an alternative registry. + /// Additional private registries from which containers can be pulled. If any Images must be downloaded from a private registry which requires credentials, then those credentials must be provided here. + /// Keeps track of any properties unknown to the library. + internal ContainerConfiguration(ContainerType type, IList containerImageNames, IList containerRegistries, IDictionary serializedAdditionalRawData) + { + Type = type; + ContainerImageNames = containerImageNames; + ContainerRegistries = containerRegistries; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ContainerConfiguration() + { + } + + /// The container technology to be used. + public ContainerType Type { get; set; } + /// The collection of container Image names. This is the full Image reference, as would be specified to "docker pull". An Image will be sourced from the default Docker registry unless the Image is fully qualified with an alternative registry. + public IList ContainerImageNames { get; } + /// Additional private registries from which containers can be pulled. If any Images must be downloaded from a private registry which requires credentials, then those credentials must be provided here. + public IList ContainerRegistries { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/ContainerRegistryReference.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/ContainerRegistryReference.Serialization.cs new file mode 100644 index 0000000000000..ccca2db026d5c --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/ContainerRegistryReference.Serialization.cs @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class ContainerRegistryReference : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerRegistryReference)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Username)) + { + writer.WritePropertyName("username"u8); + writer.WriteStringValue(Username); + } + if (Optional.IsDefined(Password)) + { + writer.WritePropertyName("password"u8); + writer.WriteStringValue(Password); + } + if (Optional.IsDefined(RegistryServer)) + { + writer.WritePropertyName("registryServer"u8); + writer.WriteStringValue(RegistryServer); + } + if (Optional.IsDefined(IdentityReference)) + { + writer.WritePropertyName("identityReference"u8); + writer.WriteObjectValue(IdentityReference, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ContainerRegistryReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerRegistryReference)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeContainerRegistryReference(document.RootElement, options); + } + + internal static ContainerRegistryReference DeserializeContainerRegistryReference(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string username = default; + string password = default; + string registryServer = default; + BatchNodeIdentityReference identityReference = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("username"u8)) + { + username = property.Value.GetString(); + continue; + } + if (property.NameEquals("password"u8)) + { + password = property.Value.GetString(); + continue; + } + if (property.NameEquals("registryServer"u8)) + { + registryServer = property.Value.GetString(); + continue; + } + if (property.NameEquals("identityReference"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identityReference = BatchNodeIdentityReference.DeserializeBatchNodeIdentityReference(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ContainerRegistryReference(username, password, registryServer, identityReference, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ContainerRegistryReference)} does not support writing '{options.Format}' format."); + } + } + + ContainerRegistryReference IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeContainerRegistryReference(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ContainerRegistryReference)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ContainerRegistryReference FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeContainerRegistryReference(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/ContainerRegistryReference.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/ContainerRegistryReference.cs new file mode 100644 index 0000000000000..3330be8fa2fdb --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/ContainerRegistryReference.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// A private container registry. + public partial class ContainerRegistryReference + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ContainerRegistryReference() + { + } + + /// Initializes a new instance of . + /// The user name to log into the registry server. + /// The password to log into the registry server. + /// The registry URL. If omitted, the default is "docker.io". + /// The reference to the user assigned identity to use to access an Azure Container Registry instead of username and password. + /// Keeps track of any properties unknown to the library. + internal ContainerRegistryReference(string username, string password, string registryServer, BatchNodeIdentityReference identityReference, IDictionary serializedAdditionalRawData) + { + Username = username; + Password = password; + RegistryServer = registryServer; + IdentityReference = identityReference; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The user name to log into the registry server. + public string Username { get; set; } + /// The password to log into the registry server. + public string Password { get; set; } + /// The registry URL. If omitted, the default is "docker.io". + public string RegistryServer { get; set; } + /// The reference to the user assigned identity to use to access an Azure Container Registry instead of username and password. + public BatchNodeIdentityReference IdentityReference { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/ContainerType.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/ContainerType.cs new file mode 100644 index 0000000000000..f6d2f71d63bb7 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/ContainerType.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.Compute.Batch +{ + /// ContainerType enums. + public readonly partial struct ContainerType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ContainerType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DockerCompatibleValue = "dockerCompatible"; + private const string CriCompatibleValue = "criCompatible"; + + /// A Docker compatible container technology will be used to launch the containers. + public static ContainerType DockerCompatible { get; } = new ContainerType(DockerCompatibleValue); + /// A CRI based technology will be used to launch the containers. + public static ContainerType CriCompatible { get; } = new ContainerType(CriCompatibleValue); + /// Determines if two values are the same. + public static bool operator ==(ContainerType left, ContainerType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ContainerType left, ContainerType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ContainerType(string value) => new ContainerType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ContainerType other && Equals(other); + /// + public bool Equals(ContainerType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/ContainerWorkingDirectory.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/ContainerWorkingDirectory.cs new file mode 100644 index 0000000000000..2cd79e32b9418 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/ContainerWorkingDirectory.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.Compute.Batch +{ + /// ContainerWorkingDirectory enums. + public readonly partial struct ContainerWorkingDirectory : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ContainerWorkingDirectory(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TaskWorkingDirectoryValue = "taskWorkingDirectory"; + private const string ContainerImageDefaultValue = "containerImageDefault"; + + /// Use the standard Batch service Task working directory, which will contain the Task Resource Files populated by Batch. + public static ContainerWorkingDirectory TaskWorkingDirectory { get; } = new ContainerWorkingDirectory(TaskWorkingDirectoryValue); + /// Use the working directory defined in the container Image. Beware that this directory will not contain the Resource Files downloaded by Batch. + public static ContainerWorkingDirectory ContainerImageDefault { get; } = new ContainerWorkingDirectory(ContainerImageDefaultValue); + /// Determines if two values are the same. + public static bool operator ==(ContainerWorkingDirectory left, ContainerWorkingDirectory right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ContainerWorkingDirectory left, ContainerWorkingDirectory right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ContainerWorkingDirectory(string value) => new ContainerWorkingDirectory(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ContainerWorkingDirectory other && Equals(other); + /// + public bool Equals(ContainerWorkingDirectory other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/DataDisk.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/DataDisk.Serialization.cs new file mode 100644 index 0000000000000..d6cbd406d7a78 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/DataDisk.Serialization.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class DataDisk : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataDisk)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("lun"u8); + writer.WriteNumberValue(LogicalUnitNumber); + if (Optional.IsDefined(Caching)) + { + writer.WritePropertyName("caching"u8); + writer.WriteStringValue(Caching.Value.ToString()); + } + writer.WritePropertyName("diskSizeGB"u8); + writer.WriteNumberValue(DiskSizeGb); + if (Optional.IsDefined(StorageAccountType)) + { + writer.WritePropertyName("storageAccountType"u8); + writer.WriteStringValue(StorageAccountType.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + DataDisk IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataDisk)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataDisk(document.RootElement, options); + } + + internal static DataDisk DeserializeDataDisk(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int lun = default; + CachingType? caching = default; + int diskSizeGB = default; + StorageAccountType? storageAccountType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("lun"u8)) + { + lun = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("caching"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + caching = new CachingType(property.Value.GetString()); + continue; + } + if (property.NameEquals("diskSizeGB"u8)) + { + diskSizeGB = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("storageAccountType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + storageAccountType = new StorageAccountType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataDisk(lun, caching, diskSizeGB, storageAccountType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataDisk)} does not support writing '{options.Format}' format."); + } + } + + DataDisk IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDataDisk(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataDisk)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DataDisk FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDataDisk(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/DataDisk.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/DataDisk.cs new file mode 100644 index 0000000000000..f18f0f94302ee --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/DataDisk.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// + /// Settings which will be used by the data disks associated to Compute Nodes in + /// the Pool. When using attached data disks, you need to mount and format the + /// disks from within a VM to use them. + /// + public partial class DataDisk + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The logical unit number. The logicalUnitNumber is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct logicalUnitNumber. The value must be between 0 and 63, inclusive. + /// The initial disk size in gigabytes. + public DataDisk(int logicalUnitNumber, int diskSizeGb) + { + LogicalUnitNumber = logicalUnitNumber; + DiskSizeGb = diskSizeGb; + } + + /// Initializes a new instance of . + /// The logical unit number. The logicalUnitNumber is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct logicalUnitNumber. The value must be between 0 and 63, inclusive. + /// The type of caching to be enabled for the data disks. The default value for caching is readwrite. For information about the caching options see: https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. + /// The initial disk size in gigabytes. + /// The storage Account type to be used for the data disk. If omitted, the default is "standard_lrs". + /// Keeps track of any properties unknown to the library. + internal DataDisk(int logicalUnitNumber, CachingType? caching, int diskSizeGb, StorageAccountType? storageAccountType, IDictionary serializedAdditionalRawData) + { + LogicalUnitNumber = logicalUnitNumber; + Caching = caching; + DiskSizeGb = diskSizeGb; + StorageAccountType = storageAccountType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DataDisk() + { + } + + /// The logical unit number. The logicalUnitNumber is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct logicalUnitNumber. The value must be between 0 and 63, inclusive. + public int LogicalUnitNumber { get; set; } + /// The type of caching to be enabled for the data disks. The default value for caching is readwrite. For information about the caching options see: https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. + public CachingType? Caching { get; set; } + /// The initial disk size in gigabytes. + public int DiskSizeGb { get; set; } + /// The storage Account type to be used for the data disk. If omitted, the default is "standard_lrs". + public StorageAccountType? StorageAccountType { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/DependencyAction.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/DependencyAction.cs new file mode 100644 index 0000000000000..ec433e39603f1 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/DependencyAction.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.Compute.Batch +{ + /// DependencyAction enums. + public readonly partial struct DependencyAction : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DependencyAction(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SatisfyValue = "satisfy"; + private const string BlockValue = "block"; + + /// Satisfy tasks waiting on this task; once all dependencies are satisfied, the task will be scheduled to run. + public static DependencyAction Satisfy { get; } = new DependencyAction(SatisfyValue); + /// Blocks tasks waiting on this task, preventing them from being scheduled. + public static DependencyAction Block { get; } = new DependencyAction(BlockValue); + /// Determines if two values are the same. + public static bool operator ==(DependencyAction left, DependencyAction right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DependencyAction left, DependencyAction right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DependencyAction(string value) => new DependencyAction(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DependencyAction other && Equals(other); + /// + public bool Equals(DependencyAction other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/DiffDiskPlacement.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/DiffDiskPlacement.cs new file mode 100644 index 0000000000000..b597aecabb49d --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/DiffDiskPlacement.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Compute.Batch +{ + /// AccessDiffDiskPlacementScope enums. + public readonly partial struct DiffDiskPlacement : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DiffDiskPlacement(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CacheDiskValue = "cachedisk"; + + /// The Ephemeral OS Disk is stored on the VM cache. + public static DiffDiskPlacement CacheDisk { get; } = new DiffDiskPlacement(CacheDiskValue); + /// Determines if two values are the same. + public static bool operator ==(DiffDiskPlacement left, DiffDiskPlacement right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DiffDiskPlacement left, DiffDiskPlacement right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DiffDiskPlacement(string value) => new DiffDiskPlacement(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DiffDiskPlacement other && Equals(other); + /// + public bool Equals(DiffDiskPlacement other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/DiffDiskSettings.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/DiffDiskSettings.Serialization.cs new file mode 100644 index 0000000000000..193f5964b6bd4 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/DiffDiskSettings.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class DiffDiskSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiffDiskSettings)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Placement)) + { + writer.WritePropertyName("placement"u8); + writer.WriteStringValue(Placement.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + DiffDiskSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiffDiskSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDiffDiskSettings(document.RootElement, options); + } + + internal static DiffDiskSettings DeserializeDiffDiskSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DiffDiskPlacement? placement = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("placement"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + placement = new DiffDiskPlacement(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DiffDiskSettings(placement, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DiffDiskSettings)} does not support writing '{options.Format}' format."); + } + } + + DiffDiskSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDiffDiskSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DiffDiskSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DiffDiskSettings FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDiffDiskSettings(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/DiffDiskSettings.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/DiffDiskSettings.cs new file mode 100644 index 0000000000000..03ec91b162edb --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/DiffDiskSettings.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// + /// Specifies the ephemeral Disk Settings for the operating system disk used by the + /// compute node (VM). + /// + public partial class DiffDiskSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DiffDiskSettings() + { + } + + /// Initializes a new instance of . + /// Specifies the ephemeral disk placement for operating system disk for all VMs in the pool. This property can be used by user in the request to choose the location e.g., cache disk space for Ephemeral OS disk provisioning. For more information on Ephemeral OS disk size requirements, please refer to Ephemeral OS disk size requirements for Windows VMs at https://docs.microsoft.com/en-us/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux VMs at https://docs.microsoft.com/en-us/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements. + /// Keeps track of any properties unknown to the library. + internal DiffDiskSettings(DiffDiskPlacement? placement, IDictionary serializedAdditionalRawData) + { + Placement = placement; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Specifies the ephemeral disk placement for operating system disk for all VMs in the pool. This property can be used by user in the request to choose the location e.g., cache disk space for Ephemeral OS disk provisioning. For more information on Ephemeral OS disk size requirements, please refer to Ephemeral OS disk size requirements for Windows VMs at https://docs.microsoft.com/en-us/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux VMs at https://docs.microsoft.com/en-us/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements. + public DiffDiskPlacement? Placement { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/DisableBatchJobOption.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/DisableBatchJobOption.cs new file mode 100644 index 0000000000000..f093bae2cffac --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/DisableBatchJobOption.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.Compute.Batch +{ + /// DisableBatchJobOption enums. + public readonly partial struct DisableBatchJobOption : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DisableBatchJobOption(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string RequeueValue = "requeue"; + private const string TerminateValue = "terminate"; + private const string WaitValue = "wait"; + + /// Terminate running Tasks and requeue them. The Tasks will run again when the Job is enabled. + public static DisableBatchJobOption Requeue { get; } = new DisableBatchJobOption(RequeueValue); + /// Terminate running Tasks. The Tasks will be completed with failureInfo indicating that they were terminated, and will not run again. + public static DisableBatchJobOption Terminate { get; } = new DisableBatchJobOption(TerminateValue); + /// Allow currently running Tasks to complete. + public static DisableBatchJobOption Wait { get; } = new DisableBatchJobOption(WaitValue); + /// Determines if two values are the same. + public static bool operator ==(DisableBatchJobOption left, DisableBatchJobOption right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DisableBatchJobOption left, DisableBatchJobOption right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DisableBatchJobOption(string value) => new DisableBatchJobOption(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DisableBatchJobOption other && Equals(other); + /// + public bool Equals(DisableBatchJobOption other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/DiskEncryptionConfiguration.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/DiskEncryptionConfiguration.Serialization.cs new file mode 100644 index 0000000000000..1719ed41f1880 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/DiskEncryptionConfiguration.Serialization.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class DiskEncryptionConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiskEncryptionConfiguration)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Targets)) + { + writer.WritePropertyName("targets"u8); + writer.WriteStartArray(); + foreach (var item in Targets) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + DiskEncryptionConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiskEncryptionConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDiskEncryptionConfiguration(document.RootElement, options); + } + + internal static DiskEncryptionConfiguration DeserializeDiskEncryptionConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList targets = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("targets"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new DiskEncryptionTarget(item.GetString())); + } + targets = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DiskEncryptionConfiguration(targets ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DiskEncryptionConfiguration)} does not support writing '{options.Format}' format."); + } + } + + DiskEncryptionConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDiskEncryptionConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DiskEncryptionConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DiskEncryptionConfiguration FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeDiskEncryptionConfiguration(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/DiskEncryptionConfiguration.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/DiskEncryptionConfiguration.cs new file mode 100644 index 0000000000000..1a8f6a27f6ca8 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/DiskEncryptionConfiguration.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// + /// The disk encryption configuration applied on compute nodes in the pool. + /// Disk encryption configuration is not supported on Linux pool created with + /// Azure Compute Gallery Image. + /// + public partial class DiskEncryptionConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DiskEncryptionConfiguration() + { + Targets = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The list of disk targets Batch Service will encrypt on the compute node. If omitted, no disks on the compute nodes in the pool will be encrypted. On Linux pool, only "TemporaryDisk" is supported; on Windows pool, "OsDisk" and "TemporaryDisk" must be specified. + /// Keeps track of any properties unknown to the library. + internal DiskEncryptionConfiguration(IList targets, IDictionary serializedAdditionalRawData) + { + Targets = targets; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The list of disk targets Batch Service will encrypt on the compute node. If omitted, no disks on the compute nodes in the pool will be encrypted. On Linux pool, only "TemporaryDisk" is supported; on Windows pool, "OsDisk" and "TemporaryDisk" must be specified. + public IList Targets { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/DiskEncryptionTarget.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/DiskEncryptionTarget.cs new file mode 100644 index 0000000000000..b0efb0eb417b7 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/DiskEncryptionTarget.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.Compute.Batch +{ + /// DiskEncryptionTarget enums. + public readonly partial struct DiskEncryptionTarget : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DiskEncryptionTarget(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string OsDiskValue = "osdisk"; + private const string TemporaryDiskValue = "temporarydisk"; + + /// The OS Disk on the compute node is encrypted. + public static DiskEncryptionTarget OsDisk { get; } = new DiskEncryptionTarget(OsDiskValue); + /// The temporary disk on the compute node is encrypted. On Linux this encryption applies to other partitions (such as those on mounted data disks) when encryption occurs at boot time. + public static DiskEncryptionTarget TemporaryDisk { get; } = new DiskEncryptionTarget(TemporaryDiskValue); + /// Determines if two values are the same. + public static bool operator ==(DiskEncryptionTarget left, DiskEncryptionTarget right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DiskEncryptionTarget left, DiskEncryptionTarget right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DiskEncryptionTarget(string value) => new DiskEncryptionTarget(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DiskEncryptionTarget other && Equals(other); + /// + public bool Equals(DiskEncryptionTarget other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/Docs/BatchClient.xml b/sdk/batch/Azure.Compute.Batch/src/Generated/Docs/BatchClient.xml new file mode 100644 index 0000000000000..d206035808744 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/Docs/BatchClient.xml @@ -0,0 +1,19681 @@ + + + + + +This sample shows how to call GetApplicationAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetApplicationAsync(""); +]]> +This sample shows how to call GetApplicationAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetApplicationAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +]]> + + + +This sample shows how to call GetApplication. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.GetApplication(""); +]]> +This sample shows how to call GetApplication with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.GetApplication("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +]]> + + + +This sample shows how to call GetApplicationAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetApplicationAsync("", null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("versions")[0].ToString()); +]]> +This sample shows how to call GetApplicationAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetApplicationAsync("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("versions")[0].ToString()); +]]> + + + +This sample shows how to call GetApplication and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.GetApplication("", null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("versions")[0].ToString()); +]]> +This sample shows how to call GetApplication with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.GetApplication("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("versions")[0].ToString()); +]]> + + + +This sample shows how to call CreatePoolAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchPoolCreateContent pool = new BatchPoolCreateContent("", ""); +Response response = await client.CreatePoolAsync(pool); +]]> +This sample shows how to call CreatePoolAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchPoolCreateContent pool = new BatchPoolCreateContent("", "") +{ + DisplayName = "", + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "", + Offer = "", + Sku = "", + Version = "", + VirtualMachineImageId = "", + }, "") + { + WindowsConfiguration = new WindowsConfiguration + { + EnableAutomaticUpdates = true, + }, + DataDisks = {new DataDisk(1234, 1234) + { + Caching = CachingType.None, + StorageAccountType = StorageAccountType.StandardLRS, + }}, + LicenseType = "", + ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) + { + ContainerImageNames = { "" }, + ContainerRegistries = {new ContainerRegistryReference + { + Username = "", + Password = "", + RegistryServer = "", + IdentityReference = new BatchNodeIdentityReference + { + ResourceId = "", + }, + }}, + }, + DiskEncryptionConfiguration = new DiskEncryptionConfiguration + { + Targets = { DiskEncryptionTarget.OsDisk }, + }, + NodePlacementConfiguration = new BatchNodePlacementConfiguration + { + Policy = BatchNodePlacementPolicyType.Regional, + }, + Extensions = {new VMExtension("", "", "") + { + TypeHandlerVersion = "", + AutoUpgradeMinorVersion = true, + EnableAutomaticUpgrade = true, + Settings = + { + ["key"] = "" + }, + ProtectedSettings = + { + ["key"] = "" + }, + ProvisionAfterExtensions = {""}, + }}, + OsDisk = new OSDisk + { + EphemeralOSDiskSettings = new DiffDiskSettings + { + Placement = DiffDiskPlacement.CacheDisk, + }, + Caching = CachingType.None, + DiskSizeGB = 1234, + ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), + WriteAcceleratorEnabled = true, + }, + SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings + { + SecureBootEnabled = true, + VTpmEnabled = true, + }), + ServiceArtifactReference = new ServiceArtifactReference(""), + }, + ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), + ResourceTags = + { + ["key"] = "" + }, + TargetDedicatedNodes = 1234, + TargetLowPriorityNodes = 1234, + EnableAutoScale = true, + AutoScaleFormula = "", + AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), + EnableInterNodeCommunication = true, + NetworkConfiguration = new NetworkConfiguration + { + SubnetId = "", + DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, + EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] + { + new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) + { + NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") + { + SourcePortRanges = {""}, + }}, + } + }), + PublicIpAddressConfiguration = new PublicIpAddressConfiguration + { + IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, + IpAddressIds = { "" }, + }, + EnableAcceleratedNetworking = true, + }, + StartTask = new BatchStartTask("") + { + ContainerSettings = new BatchTaskContainerSettings("") + { + ContainerRunOptions = "", + Registry = default, + WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, + }, + ResourceFiles = {new ResourceFile + { + AutoStorageContainerName = "", + StorageContainerUrl = "", + HttpUrl = "", + BlobPrefix = "", + FilePath = "", + FileMode = "", + IdentityReference = default, + }}, + EnvironmentSettings = {new EnvironmentSetting("") + { + Value = "", + }}, + UserIdentity = new UserIdentity + { + Username = "", + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + MaxTaskRetryCount = 1234, + WaitForSuccess = true, + }, + ApplicationPackageReferences = {new BatchApplicationPackageReference("") + { + Version = "", + }}, + TaskSlotsPerNode = 1234, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), + UserAccounts = {new UserAccount("", "") + { + ElevationLevel = ElevationLevel.NonAdmin, + LinuxUserConfiguration = new LinuxUserConfiguration + { + Uid = 1234, + Gid = 1234, + SshPrivateKey = "", + }, + WindowsUserConfiguration = new WindowsUserConfiguration + { + LoginMode = LoginMode.Batch, + }, + }}, + Metadata = { new MetadataItem("", "") }, + MountConfiguration = {new MountConfiguration + { + AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") + { + AccountKey = "", + SasKey = "", + BlobfuseOptions = "", + IdentityReference = default, + }, + NfsMountConfiguration = new NfsMountConfiguration("", "") + { + MountOptions = "", + }, + CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") + { + MountOptions = "", + }, + AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") + { + MountOptions = "", + }, + }}, + TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, + UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) + { + AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy + { + DisableAutomaticRollback = true, + EnableAutomaticOsUpgrade = true, + UseRollingUpgradePolicy = true, + OsRollingUpgradeDeferral = true, + }, + RollingUpgradePolicy = new RollingUpgradePolicy + { + EnableCrossZoneUpgrade = true, + MaxBatchInstancePercent = 1234, + MaxUnhealthyInstancePercent = 1234, + MaxUnhealthyUpgradedInstancePercent = 1234, + PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), + PrioritizeUnhealthyInstances = true, + RollbackFailedInstancesOnPolicyBreach = true, + }, + }, +}; +Response response = await client.CreatePoolAsync(pool, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +]]> + + + +This sample shows how to call CreatePool. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchPoolCreateContent pool = new BatchPoolCreateContent("", ""); +Response response = client.CreatePool(pool); +]]> +This sample shows how to call CreatePool with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchPoolCreateContent pool = new BatchPoolCreateContent("", "") +{ + DisplayName = "", + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "", + Offer = "", + Sku = "", + Version = "", + VirtualMachineImageId = "", + }, "") + { + WindowsConfiguration = new WindowsConfiguration + { + EnableAutomaticUpdates = true, + }, + DataDisks = {new DataDisk(1234, 1234) + { + Caching = CachingType.None, + StorageAccountType = StorageAccountType.StandardLRS, + }}, + LicenseType = "", + ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) + { + ContainerImageNames = { "" }, + ContainerRegistries = {new ContainerRegistryReference + { + Username = "", + Password = "", + RegistryServer = "", + IdentityReference = new BatchNodeIdentityReference + { + ResourceId = "", + }, + }}, + }, + DiskEncryptionConfiguration = new DiskEncryptionConfiguration + { + Targets = { DiskEncryptionTarget.OsDisk }, + }, + NodePlacementConfiguration = new BatchNodePlacementConfiguration + { + Policy = BatchNodePlacementPolicyType.Regional, + }, + Extensions = {new VMExtension("", "", "") + { + TypeHandlerVersion = "", + AutoUpgradeMinorVersion = true, + EnableAutomaticUpgrade = true, + Settings = + { + ["key"] = "" + }, + ProtectedSettings = + { + ["key"] = "" + }, + ProvisionAfterExtensions = {""}, + }}, + OsDisk = new OSDisk + { + EphemeralOSDiskSettings = new DiffDiskSettings + { + Placement = DiffDiskPlacement.CacheDisk, + }, + Caching = CachingType.None, + DiskSizeGB = 1234, + ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), + WriteAcceleratorEnabled = true, + }, + SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings + { + SecureBootEnabled = true, + VTpmEnabled = true, + }), + ServiceArtifactReference = new ServiceArtifactReference(""), + }, + ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), + ResourceTags = + { + ["key"] = "" + }, + TargetDedicatedNodes = 1234, + TargetLowPriorityNodes = 1234, + EnableAutoScale = true, + AutoScaleFormula = "", + AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), + EnableInterNodeCommunication = true, + NetworkConfiguration = new NetworkConfiguration + { + SubnetId = "", + DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, + EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] + { + new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) + { + NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") + { + SourcePortRanges = {""}, + }}, + } + }), + PublicIpAddressConfiguration = new PublicIpAddressConfiguration + { + IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, + IpAddressIds = { "" }, + }, + EnableAcceleratedNetworking = true, + }, + StartTask = new BatchStartTask("") + { + ContainerSettings = new BatchTaskContainerSettings("") + { + ContainerRunOptions = "", + Registry = default, + WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, + }, + ResourceFiles = {new ResourceFile + { + AutoStorageContainerName = "", + StorageContainerUrl = "", + HttpUrl = "", + BlobPrefix = "", + FilePath = "", + FileMode = "", + IdentityReference = default, + }}, + EnvironmentSettings = {new EnvironmentSetting("") + { + Value = "", + }}, + UserIdentity = new UserIdentity + { + Username = "", + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + MaxTaskRetryCount = 1234, + WaitForSuccess = true, + }, + ApplicationPackageReferences = {new BatchApplicationPackageReference("") + { + Version = "", + }}, + TaskSlotsPerNode = 1234, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), + UserAccounts = {new UserAccount("", "") + { + ElevationLevel = ElevationLevel.NonAdmin, + LinuxUserConfiguration = new LinuxUserConfiguration + { + Uid = 1234, + Gid = 1234, + SshPrivateKey = "", + }, + WindowsUserConfiguration = new WindowsUserConfiguration + { + LoginMode = LoginMode.Batch, + }, + }}, + Metadata = { new MetadataItem("", "") }, + MountConfiguration = {new MountConfiguration + { + AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") + { + AccountKey = "", + SasKey = "", + BlobfuseOptions = "", + IdentityReference = default, + }, + NfsMountConfiguration = new NfsMountConfiguration("", "") + { + MountOptions = "", + }, + CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") + { + MountOptions = "", + }, + AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") + { + MountOptions = "", + }, + }}, + TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, + UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) + { + AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy + { + DisableAutomaticRollback = true, + EnableAutomaticOsUpgrade = true, + UseRollingUpgradePolicy = true, + OsRollingUpgradeDeferral = true, + }, + RollingUpgradePolicy = new RollingUpgradePolicy + { + EnableCrossZoneUpgrade = true, + MaxBatchInstancePercent = 1234, + MaxUnhealthyInstancePercent = 1234, + MaxUnhealthyUpgradedInstancePercent = 1234, + PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), + PrioritizeUnhealthyInstances = true, + RollbackFailedInstancesOnPolicyBreach = true, + }, + }, +}; +Response response = client.CreatePool(pool, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +]]> + + + +This sample shows how to call CreatePoolAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + id = "", + vmSize = "", +}); +Response response = await client.CreatePoolAsync(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call CreatePoolAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + id = "", + displayName = "", + vmSize = "", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "", + offer = "", + sku = "", + version = "", + virtualMachineImageId = "", + }, + nodeAgentSKUId = "", + windowsConfiguration = new + { + enableAutomaticUpdates = true, + }, + dataDisks = new object[] + { + new + { + lun = 1234, + caching = "none", + diskSizeGB = 1234, + storageAccountType = "standard_lrs", + } + }, + licenseType = "", + containerConfiguration = new + { + type = "dockerCompatible", + containerImageNames = new object[] + { + "" + }, + containerRegistries = new object[] + { + new + { + username = "", + password = "", + registryServer = "", + identityReference = new + { + resourceId = "", + }, + } + }, + }, + diskEncryptionConfiguration = new + { + targets = new object[] + { + "osdisk" + }, + }, + nodePlacementConfiguration = new + { + policy = "regional", + }, + extensions = new object[] + { + new + { + name = "", + publisher = "", + type = "", + typeHandlerVersion = "", + autoUpgradeMinorVersion = true, + enableAutomaticUpgrade = true, + settings = new + { + key = "", + }, + protectedSettings = new + { + key = "", + }, + provisionAfterExtensions = new object[] + { + "" + }, + } + }, + osDisk = new + { + ephemeralOSDiskSettings = new + { + placement = "cachedisk", + }, + caching = "none", + diskSizeGB = 1234, + managedDisk = new + { + storageAccountType = "standard_lrs", + }, + writeAcceleratorEnabled = true, + }, + securityProfile = new + { + encryptionAtHost = true, + securityType = "trustedLaunch", + uefiSettings = new + { + secureBootEnabled = true, + vTpmEnabled = true, + }, + }, + serviceArtifactReference = new + { + id = "", + }, + }, + resizeTimeout = "PT1H23M45S", + resourceTags = new + { + key = "", + }, + targetDedicatedNodes = 1234, + targetLowPriorityNodes = 1234, + enableAutoScale = true, + autoScaleFormula = "", + autoScaleEvaluationInterval = "PT1H23M45S", + enableInterNodeCommunication = true, + networkConfiguration = new + { + subnetId = "", + dynamicVNetAssignmentScope = "none", + endpointConfiguration = new + { + inboundNATPools = new object[] + { + new + { + name = "", + protocol = "tcp", + backendPort = 1234, + frontendPortRangeStart = 1234, + frontendPortRangeEnd = 1234, + networkSecurityGroupRules = new object[] + { + new + { + priority = 1234, + access = "allow", + sourceAddressPrefix = "", + sourcePortRanges = new object[] + { + "" + }, + } + }, + } + }, + }, + publicIPAddressConfiguration = new + { + provision = "batchmanaged", + ipAddressIds = new object[] + { + "" + }, + }, + enableAcceleratedNetworking = true, + }, + startTask = new + { + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { + new + { + autoStorageContainerName = "", + storageContainerUrl = "", + httpUrl = "", + blobPrefix = "", + filePath = "", + fileMode = "", + } + }, + environmentSettings = new object[] + { + new + { + name = "", + value = "", + } + }, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + maxTaskRetryCount = 1234, + waitForSuccess = true, + }, + applicationPackageReferences = new object[] + { + new + { + applicationId = "", + version = "", + } + }, + taskSlotsPerNode = 1234, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + userAccounts = new object[] + { + new + { + name = "", + password = "", + elevationLevel = "nonadmin", + linuxUserConfiguration = new + { + uid = 1234, + gid = 1234, + sshPrivateKey = "", + }, + windowsUserConfiguration = new + { + loginMode = "batch", + }, + } + }, + metadata = new object[] + { + new + { + name = "", + value = "", + } + }, + mountConfiguration = new object[] + { + new + { + azureBlobFileSystemConfiguration = new + { + accountName = "", + containerName = "", + accountKey = "", + sasKey = "", + blobfuseOptions = "", + relativeMountPath = "", + }, + nfsMountConfiguration = new + { + source = "", + relativeMountPath = "", + mountOptions = "", + }, + cifsMountConfiguration = new + { + username = "", + source = "", + relativeMountPath = "", + mountOptions = "", + password = "", + }, + azureFileShareConfiguration = new + { + accountName = "", + azureFileUrl = "", + accountKey = "", + relativeMountPath = "", + mountOptions = "", + }, + } + }, + targetNodeCommunicationMode = "default", + upgradePolicy = new + { + mode = "automatic", + automaticOSUpgradePolicy = new + { + disableAutomaticRollback = true, + enableAutomaticOSUpgrade = true, + useRollingUpgradePolicy = true, + osRollingUpgradeDeferral = true, + }, + rollingUpgradePolicy = new + { + enableCrossZoneUpgrade = true, + maxBatchInstancePercent = 1234, + maxUnhealthyInstancePercent = 1234, + maxUnhealthyUpgradedInstancePercent = 1234, + pauseTimeBetweenBatches = "PT1H23M45S", + prioritizeUnhealthyInstances = true, + rollbackFailedInstancesOnPolicyBreach = true, + }, + }, +}); +Response response = await client.CreatePoolAsync(content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call CreatePool. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + id = "", + vmSize = "", +}); +Response response = client.CreatePool(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call CreatePool with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + id = "", + displayName = "", + vmSize = "", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "", + offer = "", + sku = "", + version = "", + virtualMachineImageId = "", + }, + nodeAgentSKUId = "", + windowsConfiguration = new + { + enableAutomaticUpdates = true, + }, + dataDisks = new object[] + { + new + { + lun = 1234, + caching = "none", + diskSizeGB = 1234, + storageAccountType = "standard_lrs", + } + }, + licenseType = "", + containerConfiguration = new + { + type = "dockerCompatible", + containerImageNames = new object[] + { + "" + }, + containerRegistries = new object[] + { + new + { + username = "", + password = "", + registryServer = "", + identityReference = new + { + resourceId = "", + }, + } + }, + }, + diskEncryptionConfiguration = new + { + targets = new object[] + { + "osdisk" + }, + }, + nodePlacementConfiguration = new + { + policy = "regional", + }, + extensions = new object[] + { + new + { + name = "", + publisher = "", + type = "", + typeHandlerVersion = "", + autoUpgradeMinorVersion = true, + enableAutomaticUpgrade = true, + settings = new + { + key = "", + }, + protectedSettings = new + { + key = "", + }, + provisionAfterExtensions = new object[] + { + "" + }, + } + }, + osDisk = new + { + ephemeralOSDiskSettings = new + { + placement = "cachedisk", + }, + caching = "none", + diskSizeGB = 1234, + managedDisk = new + { + storageAccountType = "standard_lrs", + }, + writeAcceleratorEnabled = true, + }, + securityProfile = new + { + encryptionAtHost = true, + securityType = "trustedLaunch", + uefiSettings = new + { + secureBootEnabled = true, + vTpmEnabled = true, + }, + }, + serviceArtifactReference = new + { + id = "", + }, + }, + resizeTimeout = "PT1H23M45S", + resourceTags = new + { + key = "", + }, + targetDedicatedNodes = 1234, + targetLowPriorityNodes = 1234, + enableAutoScale = true, + autoScaleFormula = "", + autoScaleEvaluationInterval = "PT1H23M45S", + enableInterNodeCommunication = true, + networkConfiguration = new + { + subnetId = "", + dynamicVNetAssignmentScope = "none", + endpointConfiguration = new + { + inboundNATPools = new object[] + { + new + { + name = "", + protocol = "tcp", + backendPort = 1234, + frontendPortRangeStart = 1234, + frontendPortRangeEnd = 1234, + networkSecurityGroupRules = new object[] + { + new + { + priority = 1234, + access = "allow", + sourceAddressPrefix = "", + sourcePortRanges = new object[] + { + "" + }, + } + }, + } + }, + }, + publicIPAddressConfiguration = new + { + provision = "batchmanaged", + ipAddressIds = new object[] + { + "" + }, + }, + enableAcceleratedNetworking = true, + }, + startTask = new + { + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { + new + { + autoStorageContainerName = "", + storageContainerUrl = "", + httpUrl = "", + blobPrefix = "", + filePath = "", + fileMode = "", + } + }, + environmentSettings = new object[] + { + new + { + name = "", + value = "", + } + }, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + maxTaskRetryCount = 1234, + waitForSuccess = true, + }, + applicationPackageReferences = new object[] + { + new + { + applicationId = "", + version = "", + } + }, + taskSlotsPerNode = 1234, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + userAccounts = new object[] + { + new + { + name = "", + password = "", + elevationLevel = "nonadmin", + linuxUserConfiguration = new + { + uid = 1234, + gid = 1234, + sshPrivateKey = "", + }, + windowsUserConfiguration = new + { + loginMode = "batch", + }, + } + }, + metadata = new object[] + { + new + { + name = "", + value = "", + } + }, + mountConfiguration = new object[] + { + new + { + azureBlobFileSystemConfiguration = new + { + accountName = "", + containerName = "", + accountKey = "", + sasKey = "", + blobfuseOptions = "", + relativeMountPath = "", + }, + nfsMountConfiguration = new + { + source = "", + relativeMountPath = "", + mountOptions = "", + }, + cifsMountConfiguration = new + { + username = "", + source = "", + relativeMountPath = "", + mountOptions = "", + password = "", + }, + azureFileShareConfiguration = new + { + accountName = "", + azureFileUrl = "", + accountKey = "", + relativeMountPath = "", + mountOptions = "", + }, + } + }, + targetNodeCommunicationMode = "default", + upgradePolicy = new + { + mode = "automatic", + automaticOSUpgradePolicy = new + { + disableAutomaticRollback = true, + enableAutomaticOSUpgrade = true, + useRollingUpgradePolicy = true, + osRollingUpgradeDeferral = true, + }, + rollingUpgradePolicy = new + { + enableCrossZoneUpgrade = true, + maxBatchInstancePercent = 1234, + maxUnhealthyInstancePercent = 1234, + maxUnhealthyUpgradedInstancePercent = 1234, + pauseTimeBetweenBatches = "PT1H23M45S", + prioritizeUnhealthyInstances = true, + rollbackFailedInstancesOnPolicyBreach = true, + }, + }, +}); +Response response = client.CreatePool(content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DeletePoolAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.DeletePoolAsync(""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeletePoolAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.DeletePoolAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DeletePool. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.DeletePool(""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeletePool with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.DeletePool("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetPoolAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetPoolAsync(""); +]]> +This sample shows how to call GetPoolAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetPoolAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), select: new string[] { "" }, expand: new string[] { "" }, requestConditions: null); +]]> + + + +This sample shows how to call GetPoolAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetPoolAsync("", null, null, null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetPoolAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetPoolAsync("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), new string[] { "" }, new string[] { "" }, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("url").ToString()); +Console.WriteLine(result.GetProperty("eTag").ToString()); +Console.WriteLine(result.GetProperty("lastModified").ToString()); +Console.WriteLine(result.GetProperty("creationTime").ToString()); +Console.WriteLine(result.GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); +Console.WriteLine(result.GetProperty("allocationState").ToString()); +Console.WriteLine(result.GetProperty("allocationStateTransitionTime").ToString()); +Console.WriteLine(result.GetProperty("vmSize").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("publisher").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("offer").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("sku").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("exactVersion").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("nodeAgentSKUId").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("windowsConfiguration").GetProperty("enableAutomaticUpdates").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("lun").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("caching").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("diskSizeGB").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("storageAccountType").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("licenseType").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerImageNames")[0].ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("username").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("password").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("registryServer").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("diskEncryptionConfiguration").GetProperty("targets")[0].ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("nodePlacementConfiguration").GetProperty("policy").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("publisher").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("typeHandlerVersion").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("autoUpgradeMinorVersion").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("enableAutomaticUpgrade").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("settings").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("protectedSettings").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("provisionAfterExtensions")[0].ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("ephemeralOSDiskSettings").GetProperty("placement").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("caching").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("managedDisk").GetProperty("storageAccountType").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("writeAcceleratorEnabled").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("encryptionAtHost").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("securityType").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("secureBootEnabled").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("vTpmEnabled").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("serviceArtifactReference").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("resizeTimeout").ToString()); +Console.WriteLine(result.GetProperty("resizeErrors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("resizeErrors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("resizeErrors")[0].GetProperty("values")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("resizeErrors")[0].GetProperty("values")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("resourceTags").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("currentDedicatedNodes").ToString()); +Console.WriteLine(result.GetProperty("currentLowPriorityNodes").ToString()); +Console.WriteLine(result.GetProperty("targetDedicatedNodes").ToString()); +Console.WriteLine(result.GetProperty("targetLowPriorityNodes").ToString()); +Console.WriteLine(result.GetProperty("enableAutoScale").ToString()); +Console.WriteLine(result.GetProperty("autoScaleFormula").ToString()); +Console.WriteLine(result.GetProperty("autoScaleEvaluationInterval").ToString()); +Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("timestamp").ToString()); +Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("results").ToString()); +Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("error").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("error").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("error").GetProperty("values")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("error").GetProperty("values")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("enableInterNodeCommunication").ToString()); +Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); +Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("dynamicVNetAssignmentScope").ToString()); +Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("protocol").ToString()); +Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("backendPort").ToString()); +Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeStart").ToString()); +Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeEnd").ToString()); +Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("priority").ToString()); +Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("access").ToString()); +Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourceAddressPrefix").ToString()); +Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourcePortRanges")[0].ToString()); +Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("provision").ToString()); +Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("ipAddressIds")[0].ToString()); +Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("enableAcceleratedNetworking").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("commandLine").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("username").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("maxTaskRetryCount").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("waitForSuccess").ToString()); +Console.WriteLine(result.GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); +Console.WriteLine(result.GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("taskSlotsPerNode").ToString()); +Console.WriteLine(result.GetProperty("taskSchedulingPolicy").GetProperty("nodeFillType").ToString()); +Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("password").ToString()); +Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("elevationLevel").ToString()); +Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("uid").ToString()); +Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("gid").ToString()); +Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("sshPrivateKey").ToString()); +Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("windowsUserConfiguration").GetProperty("loginMode").ToString()); +Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("url").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("lastUpdateTime").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("usageStats").GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("usageStats").GetProperty("lastUpdateTime").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("usageStats").GetProperty("dedicatedCoreTime").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("lastUpdateTime").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("avgCPUPercentage").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("avgMemoryGiB").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("peakMemoryGiB").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("avgDiskGiB").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("peakDiskGiB").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("diskReadIOps").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("diskWriteIOps").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("diskReadGiB").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("diskWriteGiB").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("networkReadGiB").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("networkWriteGiB").ToString()); +Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountName").ToString()); +Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("containerName").ToString()); +Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountKey").ToString()); +Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("sasKey").ToString()); +Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("blobfuseOptions").ToString()); +Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("relativeMountPath").ToString()); +Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("identityReference").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("relativeMountPath").ToString()); +Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("mountOptions").ToString()); +Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("username").ToString()); +Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("relativeMountPath").ToString()); +Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("mountOptions").ToString()); +Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("password").ToString()); +Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountName").ToString()); +Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("azureFileUrl").ToString()); +Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountKey").ToString()); +Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("relativeMountPath").ToString()); +Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("mountOptions").ToString()); +Console.WriteLine(result.GetProperty("identity").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("identity").GetProperty("userAssignedIdentities")[0].GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("identity").GetProperty("userAssignedIdentities")[0].GetProperty("clientId").ToString()); +Console.WriteLine(result.GetProperty("identity").GetProperty("userAssignedIdentities")[0].GetProperty("principalId").ToString()); +Console.WriteLine(result.GetProperty("targetNodeCommunicationMode").ToString()); +Console.WriteLine(result.GetProperty("currentNodeCommunicationMode").ToString()); +Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("mode").ToString()); +Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("disableAutomaticRollback").ToString()); +Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("enableAutomaticOSUpgrade").ToString()); +Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("useRollingUpgradePolicy").ToString()); +Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("osRollingUpgradeDeferral").ToString()); +Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("enableCrossZoneUpgrade").ToString()); +Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxBatchInstancePercent").ToString()); +Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyInstancePercent").ToString()); +Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyUpgradedInstancePercent").ToString()); +Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("pauseTimeBetweenBatches").ToString()); +Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("prioritizeUnhealthyInstances").ToString()); +Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("rollbackFailedInstancesOnPolicyBreach").ToString()); +]]> + + + +This sample shows how to call UpdatePoolAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.UpdatePoolAsync("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call UpdatePoolAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + startTask = new + { + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + registry = new + { + username = "", + password = "", + registryServer = "", + identityReference = new + { + resourceId = "", + }, + }, + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { + new + { + autoStorageContainerName = "", + storageContainerUrl = "", + httpUrl = "", + blobPrefix = "", + filePath = "", + fileMode = "", + } + }, + environmentSettings = new object[] + { + new + { + name = "", + value = "", + } + }, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + maxTaskRetryCount = 1234, + waitForSuccess = true, + }, + applicationPackageReferences = new object[] + { + new + { + applicationId = "", + version = "", + } + }, + metadata = new object[] + { + new + { + name = "", + value = "", + } + }, + targetNodeCommunicationMode = "default", +}); +Response response = await client.UpdatePoolAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call UpdatePool. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.UpdatePool("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call UpdatePool with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + startTask = new + { + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + registry = new + { + username = "", + password = "", + registryServer = "", + identityReference = new + { + resourceId = "", + }, + }, + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { + new + { + autoStorageContainerName = "", + storageContainerUrl = "", + httpUrl = "", + blobPrefix = "", + filePath = "", + fileMode = "", + } + }, + environmentSettings = new object[] + { + new + { + name = "", + value = "", + } + }, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + maxTaskRetryCount = 1234, + waitForSuccess = true, + }, + applicationPackageReferences = new object[] + { + new + { + applicationId = "", + version = "", + } + }, + metadata = new object[] + { + new + { + name = "", + value = "", + } + }, + targetNodeCommunicationMode = "default", +}); +Response response = client.UpdatePool("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DisablePoolAutoScaleAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.DisablePoolAutoScaleAsync(""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DisablePoolAutoScaleAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.DisablePoolAutoScaleAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DisablePoolAutoScale. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.DisablePoolAutoScale(""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DisablePoolAutoScale with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.DisablePoolAutoScale("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call EnablePoolAutoScaleAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchPoolEnableAutoScaleContent content = new BatchPoolEnableAutoScaleContent(); +Response response = await client.EnablePoolAutoScaleAsync("", content); +]]> +This sample shows how to call EnablePoolAutoScaleAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchPoolEnableAutoScaleContent content = new BatchPoolEnableAutoScaleContent +{ + AutoScaleFormula = "", + AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), +}; +Response response = await client.EnablePoolAutoScaleAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +]]> + + + +This sample shows how to call EnablePoolAutoScale. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchPoolEnableAutoScaleContent content = new BatchPoolEnableAutoScaleContent(); +Response response = client.EnablePoolAutoScale("", content); +]]> +This sample shows how to call EnablePoolAutoScale with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchPoolEnableAutoScaleContent content = new BatchPoolEnableAutoScaleContent +{ + AutoScaleFormula = "", + AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), +}; +Response response = client.EnablePoolAutoScale("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +]]> + + + +This sample shows how to call EnablePoolAutoScaleAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.EnablePoolAutoScaleAsync("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call EnablePoolAutoScaleAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + autoScaleFormula = "", + autoScaleEvaluationInterval = "PT1H23M45S", +}); +Response response = await client.EnablePoolAutoScaleAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call EnablePoolAutoScale. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.EnablePoolAutoScale("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call EnablePoolAutoScale with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + autoScaleFormula = "", + autoScaleEvaluationInterval = "PT1H23M45S", +}); +Response response = client.EnablePoolAutoScale("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call EvaluatePoolAutoScaleAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchPoolEvaluateAutoScaleContent content = new BatchPoolEvaluateAutoScaleContent(""); +Response response = await client.EvaluatePoolAutoScaleAsync("", content); +]]> +This sample shows how to call EvaluatePoolAutoScaleAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchPoolEvaluateAutoScaleContent content = new BatchPoolEvaluateAutoScaleContent(""); +Response response = await client.EvaluatePoolAutoScaleAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +]]> + + + +This sample shows how to call EvaluatePoolAutoScale. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchPoolEvaluateAutoScaleContent content = new BatchPoolEvaluateAutoScaleContent(""); +Response response = client.EvaluatePoolAutoScale("", content); +]]> +This sample shows how to call EvaluatePoolAutoScale with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchPoolEvaluateAutoScaleContent content = new BatchPoolEvaluateAutoScaleContent(""); +Response response = client.EvaluatePoolAutoScale("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +]]> + + + +This sample shows how to call EvaluatePoolAutoScaleAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + autoScaleFormula = "", +}); +Response response = await client.EvaluatePoolAutoScaleAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("timestamp").ToString()); +]]> +This sample shows how to call EvaluatePoolAutoScaleAsync with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + autoScaleFormula = "", +}); +Response response = await client.EvaluatePoolAutoScaleAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("timestamp").ToString()); +Console.WriteLine(result.GetProperty("results").ToString()); +Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("error").GetProperty("values")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("error").GetProperty("values")[0].GetProperty("value").ToString()); +]]> + + + +This sample shows how to call EvaluatePoolAutoScale and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + autoScaleFormula = "", +}); +Response response = client.EvaluatePoolAutoScale("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("timestamp").ToString()); +]]> +This sample shows how to call EvaluatePoolAutoScale with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + autoScaleFormula = "", +}); +Response response = client.EvaluatePoolAutoScale("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("timestamp").ToString()); +Console.WriteLine(result.GetProperty("results").ToString()); +Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("error").GetProperty("values")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("error").GetProperty("values")[0].GetProperty("value").ToString()); +]]> + + + +This sample shows how to call ResizePoolAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchPoolResizeContent content = new BatchPoolResizeContent(); +Response response = await client.ResizePoolAsync("", content); +]]> +This sample shows how to call ResizePoolAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchPoolResizeContent content = new BatchPoolResizeContent +{ + TargetDedicatedNodes = 1234, + TargetLowPriorityNodes = 1234, + ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), + NodeDeallocationOption = BatchNodeDeallocationOption.Requeue, +}; +Response response = await client.ResizePoolAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +]]> + + + +This sample shows how to call ResizePool. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchPoolResizeContent content = new BatchPoolResizeContent(); +Response response = client.ResizePool("", content); +]]> +This sample shows how to call ResizePool with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchPoolResizeContent content = new BatchPoolResizeContent +{ + TargetDedicatedNodes = 1234, + TargetLowPriorityNodes = 1234, + ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), + NodeDeallocationOption = BatchNodeDeallocationOption.Requeue, +}; +Response response = client.ResizePool("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +]]> + + + +This sample shows how to call ResizePoolAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.ResizePoolAsync("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call ResizePoolAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + targetDedicatedNodes = 1234, + targetLowPriorityNodes = 1234, + resizeTimeout = "PT1H23M45S", + nodeDeallocationOption = "requeue", +}); +Response response = await client.ResizePoolAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call ResizePool. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.ResizePool("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call ResizePool with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + targetDedicatedNodes = 1234, + targetLowPriorityNodes = 1234, + resizeTimeout = "PT1H23M45S", + nodeDeallocationOption = "requeue", +}); +Response response = client.ResizePool("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call StopPoolResizeAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.StopPoolResizeAsync(""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call StopPoolResizeAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.StopPoolResizeAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call StopPoolResize. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.StopPoolResize(""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call StopPoolResize with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.StopPoolResize("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call ReplacePoolPropertiesAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchPoolReplaceContent pool = new BatchPoolReplaceContent(new BatchApplicationPackageReference[] +{ + new BatchApplicationPackageReference("") +}, new MetadataItem[] +{ + new MetadataItem("", "") +}); +Response response = await client.ReplacePoolPropertiesAsync("", pool); +]]> +This sample shows how to call ReplacePoolPropertiesAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchPoolReplaceContent pool = new BatchPoolReplaceContent(new BatchApplicationPackageReference[] +{ + new BatchApplicationPackageReference("") + { + Version = "", + } +}, new MetadataItem[] +{ + new MetadataItem("", "") +}) +{ + StartTask = new BatchStartTask("") + { + ContainerSettings = new BatchTaskContainerSettings("") + { + ContainerRunOptions = "", + Registry = new ContainerRegistryReference + { + Username = "", + Password = "", + RegistryServer = "", + IdentityReference = new BatchNodeIdentityReference + { + ResourceId = "", + }, + }, + WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, + }, + ResourceFiles = {new ResourceFile + { + AutoStorageContainerName = "", + StorageContainerUrl = "", + HttpUrl = "", + BlobPrefix = "", + FilePath = "", + FileMode = "", + IdentityReference = default, + }}, + EnvironmentSettings = {new EnvironmentSetting("") + { + Value = "", + }}, + UserIdentity = new UserIdentity + { + Username = "", + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + MaxTaskRetryCount = 1234, + WaitForSuccess = true, + }, + TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, +}; +Response response = await client.ReplacePoolPropertiesAsync("", pool, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +]]> + + + +This sample shows how to call ReplacePoolProperties. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchPoolReplaceContent pool = new BatchPoolReplaceContent(new BatchApplicationPackageReference[] +{ + new BatchApplicationPackageReference("") +}, new MetadataItem[] +{ + new MetadataItem("", "") +}); +Response response = client.ReplacePoolProperties("", pool); +]]> +This sample shows how to call ReplacePoolProperties with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchPoolReplaceContent pool = new BatchPoolReplaceContent(new BatchApplicationPackageReference[] +{ + new BatchApplicationPackageReference("") + { + Version = "", + } +}, new MetadataItem[] +{ + new MetadataItem("", "") +}) +{ + StartTask = new BatchStartTask("") + { + ContainerSettings = new BatchTaskContainerSettings("") + { + ContainerRunOptions = "", + Registry = new ContainerRegistryReference + { + Username = "", + Password = "", + RegistryServer = "", + IdentityReference = new BatchNodeIdentityReference + { + ResourceId = "", + }, + }, + WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, + }, + ResourceFiles = {new ResourceFile + { + AutoStorageContainerName = "", + StorageContainerUrl = "", + HttpUrl = "", + BlobPrefix = "", + FilePath = "", + FileMode = "", + IdentityReference = default, + }}, + EnvironmentSettings = {new EnvironmentSetting("") + { + Value = "", + }}, + UserIdentity = new UserIdentity + { + Username = "", + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + MaxTaskRetryCount = 1234, + WaitForSuccess = true, + }, + TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, +}; +Response response = client.ReplacePoolProperties("", pool, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +]]> + + + +This sample shows how to call ReplacePoolPropertiesAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + applicationPackageReferences = new object[] + { + new + { + applicationId = "", + } + }, + metadata = new object[] + { + new + { + name = "", + value = "", + } + }, +}); +Response response = await client.ReplacePoolPropertiesAsync("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call ReplacePoolPropertiesAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + startTask = new + { + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + registry = new + { + username = "", + password = "", + registryServer = "", + identityReference = new + { + resourceId = "", + }, + }, + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { + new + { + autoStorageContainerName = "", + storageContainerUrl = "", + httpUrl = "", + blobPrefix = "", + filePath = "", + fileMode = "", + } + }, + environmentSettings = new object[] + { + new + { + name = "", + value = "", + } + }, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + maxTaskRetryCount = 1234, + waitForSuccess = true, + }, + applicationPackageReferences = new object[] + { + new + { + applicationId = "", + version = "", + } + }, + metadata = new object[] + { + new + { + name = "", + value = "", + } + }, + targetNodeCommunicationMode = "default", +}); +Response response = await client.ReplacePoolPropertiesAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call ReplacePoolProperties. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + applicationPackageReferences = new object[] + { + new + { + applicationId = "", + } + }, + metadata = new object[] + { + new + { + name = "", + value = "", + } + }, +}); +Response response = client.ReplacePoolProperties("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call ReplacePoolProperties with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + startTask = new + { + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + registry = new + { + username = "", + password = "", + registryServer = "", + identityReference = new + { + resourceId = "", + }, + }, + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { + new + { + autoStorageContainerName = "", + storageContainerUrl = "", + httpUrl = "", + blobPrefix = "", + filePath = "", + fileMode = "", + } + }, + environmentSettings = new object[] + { + new + { + name = "", + value = "", + } + }, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + maxTaskRetryCount = 1234, + waitForSuccess = true, + }, + applicationPackageReferences = new object[] + { + new + { + applicationId = "", + version = "", + } + }, + metadata = new object[] + { + new + { + name = "", + value = "", + } + }, + targetNodeCommunicationMode = "default", +}); +Response response = client.ReplacePoolProperties("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call RemoveNodesAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchNodeRemoveContent content = new BatchNodeRemoveContent(new string[] { "" }); +Response response = await client.RemoveNodesAsync("", content); +]]> +This sample shows how to call RemoveNodesAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchNodeRemoveContent content = new BatchNodeRemoveContent(new string[] { "" }) +{ + ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), + NodeDeallocationOption = BatchNodeDeallocationOption.Requeue, +}; +Response response = await client.RemoveNodesAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +]]> + + + +This sample shows how to call RemoveNodes. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchNodeRemoveContent content = new BatchNodeRemoveContent(new string[] { "" }); +Response response = client.RemoveNodes("", content); +]]> +This sample shows how to call RemoveNodes with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchNodeRemoveContent content = new BatchNodeRemoveContent(new string[] { "" }) +{ + ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), + NodeDeallocationOption = BatchNodeDeallocationOption.Requeue, +}; +Response response = client.RemoveNodes("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +]]> + + + +This sample shows how to call RemoveNodesAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + nodeList = new object[] + { + "" + }, +}); +Response response = await client.RemoveNodesAsync("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call RemoveNodesAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + nodeList = new object[] + { + "" + }, + resizeTimeout = "PT1H23M45S", + nodeDeallocationOption = "requeue", +}); +Response response = await client.RemoveNodesAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call RemoveNodes. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + nodeList = new object[] + { + "" + }, +}); +Response response = client.RemoveNodes("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call RemoveNodes with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + nodeList = new object[] + { + "" + }, + resizeTimeout = "PT1H23M45S", + nodeDeallocationOption = "requeue", +}); +Response response = client.RemoveNodes("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DeleteJobAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.DeleteJobAsync(""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteJobAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.DeleteJobAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DeleteJob. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.DeleteJob(""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteJob with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.DeleteJob("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetJobAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetJobAsync(""); +]]> +This sample shows how to call GetJobAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetJobAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), select: new string[] { "" }, expand: new string[] { "" }, requestConditions: null); +]]> + + + +This sample shows how to call GetJobAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetJobAsync("", null, null, null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("poolInfo").ToString()); +]]> +This sample shows how to call GetJobAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetJobAsync("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), new string[] { "" }, new string[] { "" }, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("usesTaskDependencies").ToString()); +Console.WriteLine(result.GetProperty("url").ToString()); +Console.WriteLine(result.GetProperty("eTag").ToString()); +Console.WriteLine(result.GetProperty("lastModified").ToString()); +Console.WriteLine(result.GetProperty("creationTime").ToString()); +Console.WriteLine(result.GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); +Console.WriteLine(result.GetProperty("previousState").ToString()); +Console.WriteLine(result.GetProperty("previousStateTransitionTime").ToString()); +Console.WriteLine(result.GetProperty("priority").ToString()); +Console.WriteLine(result.GetProperty("allowTaskPreemption").ToString()); +Console.WriteLine(result.GetProperty("maxParallelTasks").ToString()); +Console.WriteLine(result.GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); +Console.WriteLine(result.GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("commandLine").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("filePattern").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("path").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("containerUrl").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("identityReference").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("uploadOptions").GetProperty("uploadCondition").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("requiredSlots").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("killJobOnCompletion").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("username").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("runExclusive").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("authenticationTokenSettings").GetProperty("access")[0].ToString()); +Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("allowLowPriorityNode").ToString()); +Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("commandLine").ToString()); +Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); +Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); +Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); +Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); +Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); +Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); +Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); +Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); +Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); +Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); +Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); +Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); +Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); +Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); +Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); +Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("waitForSuccess").ToString()); +Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("username").ToString()); +Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); +Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); +Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("rerunOnNodeRebootAfterSuccess").ToString()); +Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("commandLine").ToString()); +Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); +Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); +Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); +Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); +Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); +Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); +Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); +Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); +Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); +Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); +Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); +Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); +Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("maxWallClockTime").ToString()); +Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("retentionTime").ToString()); +Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("username").ToString()); +Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); +Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); +Console.WriteLine(result.GetProperty("commonEnvironmentSettings")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("commonEnvironmentSettings")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("poolId").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("autoPoolIdPrefix").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("poolLifetimeOption").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("keepAlive").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("vmSize").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("publisher").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("offer").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("sku").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("exactVersion").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodeAgentSKUId").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("windowsConfiguration").GetProperty("enableAutomaticUpdates").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("lun").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("caching").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("diskSizeGB").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("storageAccountType").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("licenseType").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerImageNames")[0].ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("username").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("password").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("registryServer").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("diskEncryptionConfiguration").GetProperty("targets")[0].ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodePlacementConfiguration").GetProperty("policy").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("publisher").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("typeHandlerVersion").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("autoUpgradeMinorVersion").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("enableAutomaticUpgrade").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("settings").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("protectedSettings").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("provisionAfterExtensions")[0].ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("ephemeralOSDiskSettings").GetProperty("placement").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("caching").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("managedDisk").GetProperty("storageAccountType").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("writeAcceleratorEnabled").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("encryptionAtHost").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("securityType").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("secureBootEnabled").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("vTpmEnabled").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("serviceArtifactReference").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSlotsPerNode").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSchedulingPolicy").GetProperty("nodeFillType").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resizeTimeout").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resourceTags").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetDedicatedNodes").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetLowPriorityNodes").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableAutoScale").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleFormula").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleEvaluationInterval").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableInterNodeCommunication").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("dynamicVNetAssignmentScope").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("protocol").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("backendPort").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeStart").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeEnd").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("priority").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("access").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourceAddressPrefix").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourcePortRanges")[0].ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("provision").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("ipAddressIds")[0].ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("enableAcceleratedNetworking").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("commandLine").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("username").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("maxTaskRetryCount").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("waitForSuccess").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("password").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("elevationLevel").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("uid").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("gid").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("sshPrivateKey").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("windowsUserConfiguration").GetProperty("loginMode").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountName").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("containerName").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountKey").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("sasKey").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("blobfuseOptions").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("relativeMountPath").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("identityReference").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("relativeMountPath").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("mountOptions").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("username").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("relativeMountPath").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("mountOptions").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("password").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountName").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("azureFileUrl").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountKey").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("relativeMountPath").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("mountOptions").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetNodeCommunicationMode").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("mode").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("disableAutomaticRollback").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("enableAutomaticOSUpgrade").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("useRollingUpgradePolicy").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("osRollingUpgradeDeferral").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("enableCrossZoneUpgrade").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxBatchInstancePercent").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyInstancePercent").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyUpgradedInstancePercent").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("pauseTimeBetweenBatches").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("prioritizeUnhealthyInstances").ToString()); +Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("rollbackFailedInstancesOnPolicyBreach").ToString()); +Console.WriteLine(result.GetProperty("onAllTasksComplete").ToString()); +Console.WriteLine(result.GetProperty("onTaskFailure").ToString()); +Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); +Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("executionInfo").GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("executionInfo").GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("executionInfo").GetProperty("poolId").ToString()); +Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("details")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("details")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("executionInfo").GetProperty("terminateReason").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("url").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("lastUpdateTime").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("userCPUTime").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("kernelCPUTime").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("wallClockTime").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("readIOps").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOps").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("readIOGiB").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOGiB").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("numSucceededTasks").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("numFailedTasks").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("numTaskRetries").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("waitTime").ToString()); +]]> + + + +This sample shows how to call UpdateJobAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.UpdateJobAsync("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call UpdateJobAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + priority = 1234, + allowTaskPreemption = true, + maxParallelTasks = 1234, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + poolInfo = new + { + poolId = "", + autoPoolSpecification = new + { + autoPoolIdPrefix = "", + poolLifetimeOption = "jobschedule", + keepAlive = true, + pool = new + { + displayName = "", + vmSize = "", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "", + offer = "", + sku = "", + version = "", + virtualMachineImageId = "", + }, + nodeAgentSKUId = "", + windowsConfiguration = new + { + enableAutomaticUpdates = true, + }, + dataDisks = new object[] + { + new + { + lun = 1234, + caching = "none", + diskSizeGB = 1234, + storageAccountType = "standard_lrs", + } + }, + licenseType = "", + containerConfiguration = new + { + type = "dockerCompatible", + containerImageNames = new object[] + { + "" + }, + containerRegistries = new object[] + { + new + { + username = "", + password = "", + registryServer = "", + identityReference = new + { + resourceId = "", + }, + } + }, + }, + diskEncryptionConfiguration = new + { + targets = new object[] + { + "osdisk" + }, + }, + nodePlacementConfiguration = new + { + policy = "regional", + }, + extensions = new object[] + { + new + { + name = "", + publisher = "", + type = "", + typeHandlerVersion = "", + autoUpgradeMinorVersion = true, + enableAutomaticUpgrade = true, + settings = new + { + key = "", + }, + protectedSettings = new + { + key = "", + }, + provisionAfterExtensions = new object[] + { + "" + }, + } + }, + osDisk = new + { + ephemeralOSDiskSettings = new + { + placement = "cachedisk", + }, + caching = "none", + diskSizeGB = 1234, + managedDisk = new + { + storageAccountType = "standard_lrs", + }, + writeAcceleratorEnabled = true, + }, + securityProfile = new + { + encryptionAtHost = true, + securityType = "trustedLaunch", + uefiSettings = new + { + secureBootEnabled = true, + vTpmEnabled = true, + }, + }, + serviceArtifactReference = new + { + id = "", + }, + }, + taskSlotsPerNode = 1234, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + resizeTimeout = "PT1H23M45S", + resourceTags = "", + targetDedicatedNodes = 1234, + targetLowPriorityNodes = 1234, + enableAutoScale = true, + autoScaleFormula = "", + autoScaleEvaluationInterval = "PT1H23M45S", + enableInterNodeCommunication = true, + networkConfiguration = new + { + subnetId = "", + dynamicVNetAssignmentScope = "none", + endpointConfiguration = new + { + inboundNATPools = new object[] + { + new + { + name = "", + protocol = "tcp", + backendPort = 1234, + frontendPortRangeStart = 1234, + frontendPortRangeEnd = 1234, + networkSecurityGroupRules = new object[] + { + new + { + priority = 1234, + access = "allow", + sourceAddressPrefix = "", + sourcePortRanges = new object[] + { + "" + }, + } + }, + } + }, + }, + publicIPAddressConfiguration = new + { + provision = "batchmanaged", + ipAddressIds = new object[] + { + "" + }, + }, + enableAcceleratedNetworking = true, + }, + startTask = new + { + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { + new + { + autoStorageContainerName = "", + storageContainerUrl = "", + httpUrl = "", + blobPrefix = "", + filePath = "", + fileMode = "", + } + }, + environmentSettings = new object[] + { + new + { + name = "", + value = "", + } + }, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + maxTaskRetryCount = 1234, + waitForSuccess = true, + }, + applicationPackageReferences = new object[] + { + new + { + applicationId = "", + version = "", + } + }, + userAccounts = new object[] + { + new + { + name = "", + password = "", + elevationLevel = "nonadmin", + linuxUserConfiguration = new + { + uid = 1234, + gid = 1234, + sshPrivateKey = "", + }, + windowsUserConfiguration = new + { + loginMode = "batch", + }, + } + }, + metadata = new object[] + { + new + { + name = "", + value = "", + } + }, + mountConfiguration = new object[] + { + new + { + azureBlobFileSystemConfiguration = new + { + accountName = "", + containerName = "", + accountKey = "", + sasKey = "", + blobfuseOptions = "", + relativeMountPath = "", + }, + nfsMountConfiguration = new + { + source = "", + relativeMountPath = "", + mountOptions = "", + }, + cifsMountConfiguration = new + { + username = "", + source = "", + relativeMountPath = "", + mountOptions = "", + password = "", + }, + azureFileShareConfiguration = new + { + accountName = "", + azureFileUrl = "", + accountKey = "", + relativeMountPath = "", + mountOptions = "", + }, + } + }, + targetNodeCommunicationMode = "default", + upgradePolicy = new + { + mode = "automatic", + automaticOSUpgradePolicy = new + { + disableAutomaticRollback = true, + enableAutomaticOSUpgrade = true, + useRollingUpgradePolicy = true, + osRollingUpgradeDeferral = true, + }, + rollingUpgradePolicy = new + { + enableCrossZoneUpgrade = true, + maxBatchInstancePercent = 1234, + maxUnhealthyInstancePercent = 1234, + maxUnhealthyUpgradedInstancePercent = 1234, + pauseTimeBetweenBatches = "PT1H23M45S", + prioritizeUnhealthyInstances = true, + rollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, + }, + onAllTasksComplete = "noaction", + metadata = new object[] + { + null + }, +}); +Response response = await client.UpdateJobAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call UpdateJob. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.UpdateJob("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call UpdateJob with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + priority = 1234, + allowTaskPreemption = true, + maxParallelTasks = 1234, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + poolInfo = new + { + poolId = "", + autoPoolSpecification = new + { + autoPoolIdPrefix = "", + poolLifetimeOption = "jobschedule", + keepAlive = true, + pool = new + { + displayName = "", + vmSize = "", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "", + offer = "", + sku = "", + version = "", + virtualMachineImageId = "", + }, + nodeAgentSKUId = "", + windowsConfiguration = new + { + enableAutomaticUpdates = true, + }, + dataDisks = new object[] + { + new + { + lun = 1234, + caching = "none", + diskSizeGB = 1234, + storageAccountType = "standard_lrs", + } + }, + licenseType = "", + containerConfiguration = new + { + type = "dockerCompatible", + containerImageNames = new object[] + { + "" + }, + containerRegistries = new object[] + { + new + { + username = "", + password = "", + registryServer = "", + identityReference = new + { + resourceId = "", + }, + } + }, + }, + diskEncryptionConfiguration = new + { + targets = new object[] + { + "osdisk" + }, + }, + nodePlacementConfiguration = new + { + policy = "regional", + }, + extensions = new object[] + { + new + { + name = "", + publisher = "", + type = "", + typeHandlerVersion = "", + autoUpgradeMinorVersion = true, + enableAutomaticUpgrade = true, + settings = new + { + key = "", + }, + protectedSettings = new + { + key = "", + }, + provisionAfterExtensions = new object[] + { + "" + }, + } + }, + osDisk = new + { + ephemeralOSDiskSettings = new + { + placement = "cachedisk", + }, + caching = "none", + diskSizeGB = 1234, + managedDisk = new + { + storageAccountType = "standard_lrs", + }, + writeAcceleratorEnabled = true, + }, + securityProfile = new + { + encryptionAtHost = true, + securityType = "trustedLaunch", + uefiSettings = new + { + secureBootEnabled = true, + vTpmEnabled = true, + }, + }, + serviceArtifactReference = new + { + id = "", + }, + }, + taskSlotsPerNode = 1234, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + resizeTimeout = "PT1H23M45S", + resourceTags = "", + targetDedicatedNodes = 1234, + targetLowPriorityNodes = 1234, + enableAutoScale = true, + autoScaleFormula = "", + autoScaleEvaluationInterval = "PT1H23M45S", + enableInterNodeCommunication = true, + networkConfiguration = new + { + subnetId = "", + dynamicVNetAssignmentScope = "none", + endpointConfiguration = new + { + inboundNATPools = new object[] + { + new + { + name = "", + protocol = "tcp", + backendPort = 1234, + frontendPortRangeStart = 1234, + frontendPortRangeEnd = 1234, + networkSecurityGroupRules = new object[] + { + new + { + priority = 1234, + access = "allow", + sourceAddressPrefix = "", + sourcePortRanges = new object[] + { + "" + }, + } + }, + } + }, + }, + publicIPAddressConfiguration = new + { + provision = "batchmanaged", + ipAddressIds = new object[] + { + "" + }, + }, + enableAcceleratedNetworking = true, + }, + startTask = new + { + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { + new + { + autoStorageContainerName = "", + storageContainerUrl = "", + httpUrl = "", + blobPrefix = "", + filePath = "", + fileMode = "", + } + }, + environmentSettings = new object[] + { + new + { + name = "", + value = "", + } + }, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + maxTaskRetryCount = 1234, + waitForSuccess = true, + }, + applicationPackageReferences = new object[] + { + new + { + applicationId = "", + version = "", + } + }, + userAccounts = new object[] + { + new + { + name = "", + password = "", + elevationLevel = "nonadmin", + linuxUserConfiguration = new + { + uid = 1234, + gid = 1234, + sshPrivateKey = "", + }, + windowsUserConfiguration = new + { + loginMode = "batch", + }, + } + }, + metadata = new object[] + { + new + { + name = "", + value = "", + } + }, + mountConfiguration = new object[] + { + new + { + azureBlobFileSystemConfiguration = new + { + accountName = "", + containerName = "", + accountKey = "", + sasKey = "", + blobfuseOptions = "", + relativeMountPath = "", + }, + nfsMountConfiguration = new + { + source = "", + relativeMountPath = "", + mountOptions = "", + }, + cifsMountConfiguration = new + { + username = "", + source = "", + relativeMountPath = "", + mountOptions = "", + password = "", + }, + azureFileShareConfiguration = new + { + accountName = "", + azureFileUrl = "", + accountKey = "", + relativeMountPath = "", + mountOptions = "", + }, + } + }, + targetNodeCommunicationMode = "default", + upgradePolicy = new + { + mode = "automatic", + automaticOSUpgradePolicy = new + { + disableAutomaticRollback = true, + enableAutomaticOSUpgrade = true, + useRollingUpgradePolicy = true, + osRollingUpgradeDeferral = true, + }, + rollingUpgradePolicy = new + { + enableCrossZoneUpgrade = true, + maxBatchInstancePercent = 1234, + maxUnhealthyInstancePercent = 1234, + maxUnhealthyUpgradedInstancePercent = 1234, + pauseTimeBetweenBatches = "PT1H23M45S", + prioritizeUnhealthyInstances = true, + rollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, + }, + onAllTasksComplete = "noaction", + metadata = new object[] + { + null + }, +}); +Response response = client.UpdateJob("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call ReplaceJobAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchJob job = new BatchJob(new BatchPoolInfo()); +Response response = await client.ReplaceJobAsync("", job); +]]> +This sample shows how to call ReplaceJobAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchJob job = new BatchJob(new BatchPoolInfo +{ + PoolId = "", + AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.JobSchedule) + { + AutoPoolIdPrefix = "", + KeepAlive = true, + Pool = new BatchPoolSpecification("") + { + DisplayName = "", + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "", + Offer = "", + Sku = "", + Version = "", + VirtualMachineImageId = "", + }, "") + { + WindowsConfiguration = new WindowsConfiguration + { + EnableAutomaticUpdates = true, + }, + DataDisks = {new DataDisk(1234, 1234) + { + Caching = CachingType.None, + StorageAccountType = StorageAccountType.StandardLRS, + }}, + LicenseType = "", + ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) + { + ContainerImageNames = { "" }, + ContainerRegistries = {new ContainerRegistryReference + { + Username = "", + Password = "", + RegistryServer = "", + IdentityReference = new BatchNodeIdentityReference + { + ResourceId = "", + }, + }}, + }, + DiskEncryptionConfiguration = new DiskEncryptionConfiguration + { + Targets = { DiskEncryptionTarget.OsDisk }, + }, + NodePlacementConfiguration = new BatchNodePlacementConfiguration + { + Policy = BatchNodePlacementPolicyType.Regional, + }, + Extensions = {new VMExtension("", "", "") + { + TypeHandlerVersion = "", + AutoUpgradeMinorVersion = true, + EnableAutomaticUpgrade = true, + Settings = + { + ["key"] = "" + }, + ProtectedSettings = + { + ["key"] = "" + }, + ProvisionAfterExtensions = {""}, + }}, + OsDisk = new OSDisk + { + EphemeralOSDiskSettings = new DiffDiskSettings + { + Placement = DiffDiskPlacement.CacheDisk, + }, + Caching = CachingType.None, + DiskSizeGB = 1234, + ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), + WriteAcceleratorEnabled = true, + }, + SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings + { + SecureBootEnabled = true, + VTpmEnabled = true, + }), + ServiceArtifactReference = new ServiceArtifactReference(""), + }, + TaskSlotsPerNode = 1234, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), + ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), + ResourceTags = "", + TargetDedicatedNodes = 1234, + TargetLowPriorityNodes = 1234, + EnableAutoScale = true, + AutoScaleFormula = "", + AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), + EnableInterNodeCommunication = true, + NetworkConfiguration = new NetworkConfiguration + { + SubnetId = "", + DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, + EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] + { + new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) + { + NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") + { + SourcePortRanges = {""}, + }}, + } + }), + PublicIpAddressConfiguration = new PublicIpAddressConfiguration + { + IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, + IpAddressIds = { "" }, + }, + EnableAcceleratedNetworking = true, + }, + StartTask = new BatchStartTask("") + { + ContainerSettings = new BatchTaskContainerSettings("") + { + ContainerRunOptions = "", + Registry = default, + WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, + }, + ResourceFiles = {new ResourceFile + { + AutoStorageContainerName = "", + StorageContainerUrl = "", + HttpUrl = "", + BlobPrefix = "", + FilePath = "", + FileMode = "", + IdentityReference = default, + }}, + EnvironmentSettings = {new EnvironmentSetting("") + { + Value = "", + }}, + UserIdentity = new UserIdentity + { + Username = "", + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + MaxTaskRetryCount = 1234, + WaitForSuccess = true, + }, + ApplicationPackageReferences = {new BatchApplicationPackageReference("") + { + Version = "", + }}, + UserAccounts = {new UserAccount("", "") + { + ElevationLevel = ElevationLevel.NonAdmin, + LinuxUserConfiguration = new LinuxUserConfiguration + { + Uid = 1234, + Gid = 1234, + SshPrivateKey = "", + }, + WindowsUserConfiguration = new WindowsUserConfiguration + { + LoginMode = LoginMode.Batch, + }, + }}, + Metadata = { new MetadataItem("", "") }, + MountConfiguration = {new MountConfiguration + { + AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") + { + AccountKey = "", + SasKey = "", + BlobfuseOptions = "", + IdentityReference = default, + }, + NfsMountConfiguration = new NfsMountConfiguration("", "") + { + MountOptions = "", + }, + CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") + { + MountOptions = "", + }, + AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") + { + MountOptions = "", + }, + }}, + TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, + UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) + { + AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy + { + DisableAutomaticRollback = true, + EnableAutomaticOsUpgrade = true, + UseRollingUpgradePolicy = true, + OsRollingUpgradeDeferral = true, + }, + RollingUpgradePolicy = new RollingUpgradePolicy + { + EnableCrossZoneUpgrade = true, + MaxBatchInstancePercent = 1234, + MaxUnhealthyInstancePercent = 1234, + MaxUnhealthyUpgradedInstancePercent = 1234, + PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), + PrioritizeUnhealthyInstances = true, + RollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, +}) +{ + Priority = 1234, + AllowTaskPreemption = true, + MaxParallelTasks = 1234, + Constraints = new BatchJobConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, + OnAllTasksComplete = OnAllBatchTasksComplete.NoAction, + Metadata = { default }, +}; +Response response = await client.ReplaceJobAsync("", job, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +]]> + + + +This sample shows how to call ReplaceJob. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchJob job = new BatchJob(new BatchPoolInfo()); +Response response = client.ReplaceJob("", job); +]]> +This sample shows how to call ReplaceJob with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchJob job = new BatchJob(new BatchPoolInfo +{ + PoolId = "", + AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.JobSchedule) + { + AutoPoolIdPrefix = "", + KeepAlive = true, + Pool = new BatchPoolSpecification("") + { + DisplayName = "", + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "", + Offer = "", + Sku = "", + Version = "", + VirtualMachineImageId = "", + }, "") + { + WindowsConfiguration = new WindowsConfiguration + { + EnableAutomaticUpdates = true, + }, + DataDisks = {new DataDisk(1234, 1234) + { + Caching = CachingType.None, + StorageAccountType = StorageAccountType.StandardLRS, + }}, + LicenseType = "", + ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) + { + ContainerImageNames = { "" }, + ContainerRegistries = {new ContainerRegistryReference + { + Username = "", + Password = "", + RegistryServer = "", + IdentityReference = new BatchNodeIdentityReference + { + ResourceId = "", + }, + }}, + }, + DiskEncryptionConfiguration = new DiskEncryptionConfiguration + { + Targets = { DiskEncryptionTarget.OsDisk }, + }, + NodePlacementConfiguration = new BatchNodePlacementConfiguration + { + Policy = BatchNodePlacementPolicyType.Regional, + }, + Extensions = {new VMExtension("", "", "") + { + TypeHandlerVersion = "", + AutoUpgradeMinorVersion = true, + EnableAutomaticUpgrade = true, + Settings = + { + ["key"] = "" + }, + ProtectedSettings = + { + ["key"] = "" + }, + ProvisionAfterExtensions = {""}, + }}, + OsDisk = new OSDisk + { + EphemeralOSDiskSettings = new DiffDiskSettings + { + Placement = DiffDiskPlacement.CacheDisk, + }, + Caching = CachingType.None, + DiskSizeGB = 1234, + ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), + WriteAcceleratorEnabled = true, + }, + SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings + { + SecureBootEnabled = true, + VTpmEnabled = true, + }), + ServiceArtifactReference = new ServiceArtifactReference(""), + }, + TaskSlotsPerNode = 1234, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), + ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), + ResourceTags = "", + TargetDedicatedNodes = 1234, + TargetLowPriorityNodes = 1234, + EnableAutoScale = true, + AutoScaleFormula = "", + AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), + EnableInterNodeCommunication = true, + NetworkConfiguration = new NetworkConfiguration + { + SubnetId = "", + DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, + EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] + { + new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) + { + NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") + { + SourcePortRanges = {""}, + }}, + } + }), + PublicIpAddressConfiguration = new PublicIpAddressConfiguration + { + IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, + IpAddressIds = { "" }, + }, + EnableAcceleratedNetworking = true, + }, + StartTask = new BatchStartTask("") + { + ContainerSettings = new BatchTaskContainerSettings("") + { + ContainerRunOptions = "", + Registry = default, + WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, + }, + ResourceFiles = {new ResourceFile + { + AutoStorageContainerName = "", + StorageContainerUrl = "", + HttpUrl = "", + BlobPrefix = "", + FilePath = "", + FileMode = "", + IdentityReference = default, + }}, + EnvironmentSettings = {new EnvironmentSetting("") + { + Value = "", + }}, + UserIdentity = new UserIdentity + { + Username = "", + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + MaxTaskRetryCount = 1234, + WaitForSuccess = true, + }, + ApplicationPackageReferences = {new BatchApplicationPackageReference("") + { + Version = "", + }}, + UserAccounts = {new UserAccount("", "") + { + ElevationLevel = ElevationLevel.NonAdmin, + LinuxUserConfiguration = new LinuxUserConfiguration + { + Uid = 1234, + Gid = 1234, + SshPrivateKey = "", + }, + WindowsUserConfiguration = new WindowsUserConfiguration + { + LoginMode = LoginMode.Batch, + }, + }}, + Metadata = { new MetadataItem("", "") }, + MountConfiguration = {new MountConfiguration + { + AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") + { + AccountKey = "", + SasKey = "", + BlobfuseOptions = "", + IdentityReference = default, + }, + NfsMountConfiguration = new NfsMountConfiguration("", "") + { + MountOptions = "", + }, + CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") + { + MountOptions = "", + }, + AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") + { + MountOptions = "", + }, + }}, + TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, + UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) + { + AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy + { + DisableAutomaticRollback = true, + EnableAutomaticOsUpgrade = true, + UseRollingUpgradePolicy = true, + OsRollingUpgradeDeferral = true, + }, + RollingUpgradePolicy = new RollingUpgradePolicy + { + EnableCrossZoneUpgrade = true, + MaxBatchInstancePercent = 1234, + MaxUnhealthyInstancePercent = 1234, + MaxUnhealthyUpgradedInstancePercent = 1234, + PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), + PrioritizeUnhealthyInstances = true, + RollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, +}) +{ + Priority = 1234, + AllowTaskPreemption = true, + MaxParallelTasks = 1234, + Constraints = new BatchJobConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, + OnAllTasksComplete = OnAllBatchTasksComplete.NoAction, + Metadata = { default }, +}; +Response response = client.ReplaceJob("", job, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +]]> + + + +This sample shows how to call ReplaceJobAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + poolInfo = new object(), +}); +Response response = await client.ReplaceJobAsync("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call ReplaceJobAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + priority = 1234, + allowTaskPreemption = true, + maxParallelTasks = 1234, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + poolInfo = new + { + poolId = "", + autoPoolSpecification = new + { + autoPoolIdPrefix = "", + poolLifetimeOption = "jobschedule", + keepAlive = true, + pool = new + { + displayName = "", + vmSize = "", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "", + offer = "", + sku = "", + version = "", + virtualMachineImageId = "", + }, + nodeAgentSKUId = "", + windowsConfiguration = new + { + enableAutomaticUpdates = true, + }, + dataDisks = new object[] + { + new + { + lun = 1234, + caching = "none", + diskSizeGB = 1234, + storageAccountType = "standard_lrs", + } + }, + licenseType = "", + containerConfiguration = new + { + type = "dockerCompatible", + containerImageNames = new object[] + { + "" + }, + containerRegistries = new object[] + { + new + { + username = "", + password = "", + registryServer = "", + identityReference = new + { + resourceId = "", + }, + } + }, + }, + diskEncryptionConfiguration = new + { + targets = new object[] + { + "osdisk" + }, + }, + nodePlacementConfiguration = new + { + policy = "regional", + }, + extensions = new object[] + { + new + { + name = "", + publisher = "", + type = "", + typeHandlerVersion = "", + autoUpgradeMinorVersion = true, + enableAutomaticUpgrade = true, + settings = new + { + key = "", + }, + protectedSettings = new + { + key = "", + }, + provisionAfterExtensions = new object[] + { + "" + }, + } + }, + osDisk = new + { + ephemeralOSDiskSettings = new + { + placement = "cachedisk", + }, + caching = "none", + diskSizeGB = 1234, + managedDisk = new + { + storageAccountType = "standard_lrs", + }, + writeAcceleratorEnabled = true, + }, + securityProfile = new + { + encryptionAtHost = true, + securityType = "trustedLaunch", + uefiSettings = new + { + secureBootEnabled = true, + vTpmEnabled = true, + }, + }, + serviceArtifactReference = new + { + id = "", + }, + }, + taskSlotsPerNode = 1234, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + resizeTimeout = "PT1H23M45S", + resourceTags = "", + targetDedicatedNodes = 1234, + targetLowPriorityNodes = 1234, + enableAutoScale = true, + autoScaleFormula = "", + autoScaleEvaluationInterval = "PT1H23M45S", + enableInterNodeCommunication = true, + networkConfiguration = new + { + subnetId = "", + dynamicVNetAssignmentScope = "none", + endpointConfiguration = new + { + inboundNATPools = new object[] + { + new + { + name = "", + protocol = "tcp", + backendPort = 1234, + frontendPortRangeStart = 1234, + frontendPortRangeEnd = 1234, + networkSecurityGroupRules = new object[] + { + new + { + priority = 1234, + access = "allow", + sourceAddressPrefix = "", + sourcePortRanges = new object[] + { + "" + }, + } + }, + } + }, + }, + publicIPAddressConfiguration = new + { + provision = "batchmanaged", + ipAddressIds = new object[] + { + "" + }, + }, + enableAcceleratedNetworking = true, + }, + startTask = new + { + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { + new + { + autoStorageContainerName = "", + storageContainerUrl = "", + httpUrl = "", + blobPrefix = "", + filePath = "", + fileMode = "", + } + }, + environmentSettings = new object[] + { + new + { + name = "", + value = "", + } + }, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + maxTaskRetryCount = 1234, + waitForSuccess = true, + }, + applicationPackageReferences = new object[] + { + new + { + applicationId = "", + version = "", + } + }, + userAccounts = new object[] + { + new + { + name = "", + password = "", + elevationLevel = "nonadmin", + linuxUserConfiguration = new + { + uid = 1234, + gid = 1234, + sshPrivateKey = "", + }, + windowsUserConfiguration = new + { + loginMode = "batch", + }, + } + }, + metadata = new object[] + { + new + { + name = "", + value = "", + } + }, + mountConfiguration = new object[] + { + new + { + azureBlobFileSystemConfiguration = new + { + accountName = "", + containerName = "", + accountKey = "", + sasKey = "", + blobfuseOptions = "", + relativeMountPath = "", + }, + nfsMountConfiguration = new + { + source = "", + relativeMountPath = "", + mountOptions = "", + }, + cifsMountConfiguration = new + { + username = "", + source = "", + relativeMountPath = "", + mountOptions = "", + password = "", + }, + azureFileShareConfiguration = new + { + accountName = "", + azureFileUrl = "", + accountKey = "", + relativeMountPath = "", + mountOptions = "", + }, + } + }, + targetNodeCommunicationMode = "default", + upgradePolicy = new + { + mode = "automatic", + automaticOSUpgradePolicy = new + { + disableAutomaticRollback = true, + enableAutomaticOSUpgrade = true, + useRollingUpgradePolicy = true, + osRollingUpgradeDeferral = true, + }, + rollingUpgradePolicy = new + { + enableCrossZoneUpgrade = true, + maxBatchInstancePercent = 1234, + maxUnhealthyInstancePercent = 1234, + maxUnhealthyUpgradedInstancePercent = 1234, + pauseTimeBetweenBatches = "PT1H23M45S", + prioritizeUnhealthyInstances = true, + rollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, + }, + onAllTasksComplete = "noaction", + metadata = new object[] + { + null + }, +}); +Response response = await client.ReplaceJobAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call ReplaceJob. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + poolInfo = new object(), +}); +Response response = client.ReplaceJob("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call ReplaceJob with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + priority = 1234, + allowTaskPreemption = true, + maxParallelTasks = 1234, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + poolInfo = new + { + poolId = "", + autoPoolSpecification = new + { + autoPoolIdPrefix = "", + poolLifetimeOption = "jobschedule", + keepAlive = true, + pool = new + { + displayName = "", + vmSize = "", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "", + offer = "", + sku = "", + version = "", + virtualMachineImageId = "", + }, + nodeAgentSKUId = "", + windowsConfiguration = new + { + enableAutomaticUpdates = true, + }, + dataDisks = new object[] + { + new + { + lun = 1234, + caching = "none", + diskSizeGB = 1234, + storageAccountType = "standard_lrs", + } + }, + licenseType = "", + containerConfiguration = new + { + type = "dockerCompatible", + containerImageNames = new object[] + { + "" + }, + containerRegistries = new object[] + { + new + { + username = "", + password = "", + registryServer = "", + identityReference = new + { + resourceId = "", + }, + } + }, + }, + diskEncryptionConfiguration = new + { + targets = new object[] + { + "osdisk" + }, + }, + nodePlacementConfiguration = new + { + policy = "regional", + }, + extensions = new object[] + { + new + { + name = "", + publisher = "", + type = "", + typeHandlerVersion = "", + autoUpgradeMinorVersion = true, + enableAutomaticUpgrade = true, + settings = new + { + key = "", + }, + protectedSettings = new + { + key = "", + }, + provisionAfterExtensions = new object[] + { + "" + }, + } + }, + osDisk = new + { + ephemeralOSDiskSettings = new + { + placement = "cachedisk", + }, + caching = "none", + diskSizeGB = 1234, + managedDisk = new + { + storageAccountType = "standard_lrs", + }, + writeAcceleratorEnabled = true, + }, + securityProfile = new + { + encryptionAtHost = true, + securityType = "trustedLaunch", + uefiSettings = new + { + secureBootEnabled = true, + vTpmEnabled = true, + }, + }, + serviceArtifactReference = new + { + id = "", + }, + }, + taskSlotsPerNode = 1234, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + resizeTimeout = "PT1H23M45S", + resourceTags = "", + targetDedicatedNodes = 1234, + targetLowPriorityNodes = 1234, + enableAutoScale = true, + autoScaleFormula = "", + autoScaleEvaluationInterval = "PT1H23M45S", + enableInterNodeCommunication = true, + networkConfiguration = new + { + subnetId = "", + dynamicVNetAssignmentScope = "none", + endpointConfiguration = new + { + inboundNATPools = new object[] + { + new + { + name = "", + protocol = "tcp", + backendPort = 1234, + frontendPortRangeStart = 1234, + frontendPortRangeEnd = 1234, + networkSecurityGroupRules = new object[] + { + new + { + priority = 1234, + access = "allow", + sourceAddressPrefix = "", + sourcePortRanges = new object[] + { + "" + }, + } + }, + } + }, + }, + publicIPAddressConfiguration = new + { + provision = "batchmanaged", + ipAddressIds = new object[] + { + "" + }, + }, + enableAcceleratedNetworking = true, + }, + startTask = new + { + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { + new + { + autoStorageContainerName = "", + storageContainerUrl = "", + httpUrl = "", + blobPrefix = "", + filePath = "", + fileMode = "", + } + }, + environmentSettings = new object[] + { + new + { + name = "", + value = "", + } + }, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + maxTaskRetryCount = 1234, + waitForSuccess = true, + }, + applicationPackageReferences = new object[] + { + new + { + applicationId = "", + version = "", + } + }, + userAccounts = new object[] + { + new + { + name = "", + password = "", + elevationLevel = "nonadmin", + linuxUserConfiguration = new + { + uid = 1234, + gid = 1234, + sshPrivateKey = "", + }, + windowsUserConfiguration = new + { + loginMode = "batch", + }, + } + }, + metadata = new object[] + { + new + { + name = "", + value = "", + } + }, + mountConfiguration = new object[] + { + new + { + azureBlobFileSystemConfiguration = new + { + accountName = "", + containerName = "", + accountKey = "", + sasKey = "", + blobfuseOptions = "", + relativeMountPath = "", + }, + nfsMountConfiguration = new + { + source = "", + relativeMountPath = "", + mountOptions = "", + }, + cifsMountConfiguration = new + { + username = "", + source = "", + relativeMountPath = "", + mountOptions = "", + password = "", + }, + azureFileShareConfiguration = new + { + accountName = "", + azureFileUrl = "", + accountKey = "", + relativeMountPath = "", + mountOptions = "", + }, + } + }, + targetNodeCommunicationMode = "default", + upgradePolicy = new + { + mode = "automatic", + automaticOSUpgradePolicy = new + { + disableAutomaticRollback = true, + enableAutomaticOSUpgrade = true, + useRollingUpgradePolicy = true, + osRollingUpgradeDeferral = true, + }, + rollingUpgradePolicy = new + { + enableCrossZoneUpgrade = true, + maxBatchInstancePercent = 1234, + maxUnhealthyInstancePercent = 1234, + maxUnhealthyUpgradedInstancePercent = 1234, + pauseTimeBetweenBatches = "PT1H23M45S", + prioritizeUnhealthyInstances = true, + rollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, + }, + onAllTasksComplete = "noaction", + metadata = new object[] + { + null + }, +}); +Response response = client.ReplaceJob("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DisableJobAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchJobDisableContent content = new BatchJobDisableContent(DisableBatchJobOption.Requeue); +Response response = await client.DisableJobAsync("", content); +]]> +This sample shows how to call DisableJobAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchJobDisableContent content = new BatchJobDisableContent(DisableBatchJobOption.Requeue); +Response response = await client.DisableJobAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +]]> + + + +This sample shows how to call DisableJob. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchJobDisableContent content = new BatchJobDisableContent(DisableBatchJobOption.Requeue); +Response response = client.DisableJob("", content); +]]> +This sample shows how to call DisableJob with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchJobDisableContent content = new BatchJobDisableContent(DisableBatchJobOption.Requeue); +Response response = client.DisableJob("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +]]> + + + +This sample shows how to call DisableJobAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + disableTasks = "requeue", +}); +Response response = await client.DisableJobAsync("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DisableJobAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + disableTasks = "requeue", +}); +Response response = await client.DisableJobAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DisableJob. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + disableTasks = "requeue", +}); +Response response = client.DisableJob("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DisableJob with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + disableTasks = "requeue", +}); +Response response = client.DisableJob("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call EnableJobAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.EnableJobAsync(""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call EnableJobAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.EnableJobAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call EnableJob. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.EnableJob(""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call EnableJob with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.EnableJob("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call TerminateJobAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.TerminateJobAsync(""); +]]> +This sample shows how to call TerminateJobAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchJobTerminateContent parameters = new BatchJobTerminateContent +{ + TerminationReason = "", +}; +Response response = await client.TerminateJobAsync("", parameters: parameters, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +]]> + + + +This sample shows how to call TerminateJob. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.TerminateJob(""); +]]> +This sample shows how to call TerminateJob with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchJobTerminateContent parameters = new BatchJobTerminateContent +{ + TerminationReason = "", +}; +Response response = client.TerminateJob("", parameters: parameters, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +]]> + + + +This sample shows how to call TerminateJobAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = null; +Response response = await client.TerminateJobAsync("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call TerminateJobAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + terminateReason = "", +}); +Response response = await client.TerminateJobAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call TerminateJob. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = null; +Response response = client.TerminateJob("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call TerminateJob with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + terminateReason = "", +}); +Response response = client.TerminateJob("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call CreateJobAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchJobCreateContent job = new BatchJobCreateContent("", new BatchPoolInfo()); +Response response = await client.CreateJobAsync(job); +]]> +This sample shows how to call CreateJobAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchJobCreateContent job = new BatchJobCreateContent("", new BatchPoolInfo +{ + PoolId = "", + AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.JobSchedule) + { + AutoPoolIdPrefix = "", + KeepAlive = true, + Pool = new BatchPoolSpecification("") + { + DisplayName = "", + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "", + Offer = "", + Sku = "", + Version = "", + VirtualMachineImageId = "", + }, "") + { + WindowsConfiguration = new WindowsConfiguration + { + EnableAutomaticUpdates = true, + }, + DataDisks = {new DataDisk(1234, 1234) + { + Caching = CachingType.None, + StorageAccountType = StorageAccountType.StandardLRS, + }}, + LicenseType = "", + ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) + { + ContainerImageNames = { "" }, + ContainerRegistries = { default }, + }, + DiskEncryptionConfiguration = new DiskEncryptionConfiguration + { + Targets = { DiskEncryptionTarget.OsDisk }, + }, + NodePlacementConfiguration = new BatchNodePlacementConfiguration + { + Policy = BatchNodePlacementPolicyType.Regional, + }, + Extensions = {new VMExtension("", "", "") + { + TypeHandlerVersion = "", + AutoUpgradeMinorVersion = true, + EnableAutomaticUpgrade = true, + Settings = + { + ["key"] = "" + }, + ProtectedSettings = + { + ["key"] = "" + }, + ProvisionAfterExtensions = {""}, + }}, + OsDisk = new OSDisk + { + EphemeralOSDiskSettings = new DiffDiskSettings + { + Placement = DiffDiskPlacement.CacheDisk, + }, + Caching = CachingType.None, + DiskSizeGB = 1234, + ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), + WriteAcceleratorEnabled = true, + }, + SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings + { + SecureBootEnabled = true, + VTpmEnabled = true, + }), + ServiceArtifactReference = new ServiceArtifactReference(""), + }, + TaskSlotsPerNode = 1234, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), + ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), + ResourceTags = "", + TargetDedicatedNodes = 1234, + TargetLowPriorityNodes = 1234, + EnableAutoScale = true, + AutoScaleFormula = "", + AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), + EnableInterNodeCommunication = true, + NetworkConfiguration = new NetworkConfiguration + { + SubnetId = "", + DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, + EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] + { + new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) + { + NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") + { + SourcePortRanges = {""}, + }}, + } + }), + PublicIpAddressConfiguration = new PublicIpAddressConfiguration + { + IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, + IpAddressIds = { "" }, + }, + EnableAcceleratedNetworking = true, + }, + StartTask = new BatchStartTask("") + { + ContainerSettings = default, + ResourceFiles = { default }, + EnvironmentSettings = { default }, + UserIdentity = default, + MaxTaskRetryCount = 1234, + WaitForSuccess = true, + }, + ApplicationPackageReferences = { default }, + UserAccounts = {new UserAccount("", "") + { + ElevationLevel = ElevationLevel.NonAdmin, + LinuxUserConfiguration = new LinuxUserConfiguration + { + Uid = 1234, + Gid = 1234, + SshPrivateKey = "", + }, + WindowsUserConfiguration = new WindowsUserConfiguration + { + LoginMode = LoginMode.Batch, + }, + }}, + Metadata = { new MetadataItem("", "") }, + MountConfiguration = {new MountConfiguration + { + AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") + { + AccountKey = "", + SasKey = "", + BlobfuseOptions = "", + IdentityReference = default, + }, + NfsMountConfiguration = new NfsMountConfiguration("", "") + { + MountOptions = "", + }, + CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") + { + MountOptions = "", + }, + AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") + { + MountOptions = "", + }, + }}, + TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, + UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) + { + AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy + { + DisableAutomaticRollback = true, + EnableAutomaticOsUpgrade = true, + UseRollingUpgradePolicy = true, + OsRollingUpgradeDeferral = true, + }, + RollingUpgradePolicy = new RollingUpgradePolicy + { + EnableCrossZoneUpgrade = true, + MaxBatchInstancePercent = 1234, + MaxUnhealthyInstancePercent = 1234, + MaxUnhealthyUpgradedInstancePercent = 1234, + PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), + PrioritizeUnhealthyInstances = true, + RollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, +}) +{ + DisplayName = "", + UsesTaskDependencies = true, + Priority = 1234, + AllowTaskPreemption = true, + MaxParallelTasks = 1234, + Constraints = new BatchJobConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, + JobManagerTask = new BatchJobManagerTask("", "") + { + DisplayName = "", + ContainerSettings = new BatchTaskContainerSettings("") + { + ContainerRunOptions = "", + Registry = new ContainerRegistryReference + { + Username = "", + Password = "", + RegistryServer = "", + IdentityReference = new BatchNodeIdentityReference + { + ResourceId = "", + }, + }, + WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, + }, + ResourceFiles = {new ResourceFile + { + AutoStorageContainerName = "", + StorageContainerUrl = "", + HttpUrl = "", + BlobPrefix = "", + FilePath = "", + FileMode = "", + IdentityReference = default, + }}, + OutputFiles = {new OutputFile("", new OutputFileDestination + { + Container = new OutputFileBlobContainerDestination("") + { + Path = "", + IdentityReference = default, + UploadHeaders = {new HttpHeader("") + { + Value = "", + }}, + }, + }, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, + EnvironmentSettings = {new EnvironmentSetting("") + { + Value = "", + }}, + Constraints = new BatchTaskConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, + RequiredSlots = 1234, + KillJobOnCompletion = true, + UserIdentity = new UserIdentity + { + Username = "", + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + RunExclusive = true, + ApplicationPackageReferences = {new BatchApplicationPackageReference("") + { + Version = "", + }}, + AuthenticationTokenSettings = new AuthenticationTokenSettings + { + Access = { AccessScope.Job }, + }, + AllowLowPriorityNode = true, + }, + JobPreparationTask = new BatchJobPreparationTask("") + { + Id = "", + ContainerSettings = default, + ResourceFiles = { default }, + EnvironmentSettings = { default }, + Constraints = default, + WaitForSuccess = true, + UserIdentity = default, + RerunOnNodeRebootAfterSuccess = true, + }, + JobReleaseTask = new BatchJobReleaseTask("") + { + Id = "", + ContainerSettings = default, + ResourceFiles = { default }, + EnvironmentSettings = { default }, + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + UserIdentity = default, + }, + CommonEnvironmentSettings = { default }, + OnAllTasksComplete = OnAllBatchTasksComplete.NoAction, + OnTaskFailure = OnBatchTaskFailure.NoAction, + NetworkConfiguration = new BatchJobNetworkConfiguration(""), + Metadata = { default }, +}; +Response response = await client.CreateJobAsync(job, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +]]> + + + +This sample shows how to call CreateJob. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchJobCreateContent job = new BatchJobCreateContent("", new BatchPoolInfo()); +Response response = client.CreateJob(job); +]]> +This sample shows how to call CreateJob with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchJobCreateContent job = new BatchJobCreateContent("", new BatchPoolInfo +{ + PoolId = "", + AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.JobSchedule) + { + AutoPoolIdPrefix = "", + KeepAlive = true, + Pool = new BatchPoolSpecification("") + { + DisplayName = "", + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "", + Offer = "", + Sku = "", + Version = "", + VirtualMachineImageId = "", + }, "") + { + WindowsConfiguration = new WindowsConfiguration + { + EnableAutomaticUpdates = true, + }, + DataDisks = {new DataDisk(1234, 1234) + { + Caching = CachingType.None, + StorageAccountType = StorageAccountType.StandardLRS, + }}, + LicenseType = "", + ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) + { + ContainerImageNames = { "" }, + ContainerRegistries = { default }, + }, + DiskEncryptionConfiguration = new DiskEncryptionConfiguration + { + Targets = { DiskEncryptionTarget.OsDisk }, + }, + NodePlacementConfiguration = new BatchNodePlacementConfiguration + { + Policy = BatchNodePlacementPolicyType.Regional, + }, + Extensions = {new VMExtension("", "", "") + { + TypeHandlerVersion = "", + AutoUpgradeMinorVersion = true, + EnableAutomaticUpgrade = true, + Settings = + { + ["key"] = "" + }, + ProtectedSettings = + { + ["key"] = "" + }, + ProvisionAfterExtensions = {""}, + }}, + OsDisk = new OSDisk + { + EphemeralOSDiskSettings = new DiffDiskSettings + { + Placement = DiffDiskPlacement.CacheDisk, + }, + Caching = CachingType.None, + DiskSizeGB = 1234, + ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), + WriteAcceleratorEnabled = true, + }, + SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings + { + SecureBootEnabled = true, + VTpmEnabled = true, + }), + ServiceArtifactReference = new ServiceArtifactReference(""), + }, + TaskSlotsPerNode = 1234, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), + ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), + ResourceTags = "", + TargetDedicatedNodes = 1234, + TargetLowPriorityNodes = 1234, + EnableAutoScale = true, + AutoScaleFormula = "", + AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), + EnableInterNodeCommunication = true, + NetworkConfiguration = new NetworkConfiguration + { + SubnetId = "", + DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, + EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] + { + new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) + { + NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") + { + SourcePortRanges = {""}, + }}, + } + }), + PublicIpAddressConfiguration = new PublicIpAddressConfiguration + { + IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, + IpAddressIds = { "" }, + }, + EnableAcceleratedNetworking = true, + }, + StartTask = new BatchStartTask("") + { + ContainerSettings = default, + ResourceFiles = { default }, + EnvironmentSettings = { default }, + UserIdentity = default, + MaxTaskRetryCount = 1234, + WaitForSuccess = true, + }, + ApplicationPackageReferences = { default }, + UserAccounts = {new UserAccount("", "") + { + ElevationLevel = ElevationLevel.NonAdmin, + LinuxUserConfiguration = new LinuxUserConfiguration + { + Uid = 1234, + Gid = 1234, + SshPrivateKey = "", + }, + WindowsUserConfiguration = new WindowsUserConfiguration + { + LoginMode = LoginMode.Batch, + }, + }}, + Metadata = { new MetadataItem("", "") }, + MountConfiguration = {new MountConfiguration + { + AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") + { + AccountKey = "", + SasKey = "", + BlobfuseOptions = "", + IdentityReference = default, + }, + NfsMountConfiguration = new NfsMountConfiguration("", "") + { + MountOptions = "", + }, + CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") + { + MountOptions = "", + }, + AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") + { + MountOptions = "", + }, + }}, + TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, + UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) + { + AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy + { + DisableAutomaticRollback = true, + EnableAutomaticOsUpgrade = true, + UseRollingUpgradePolicy = true, + OsRollingUpgradeDeferral = true, + }, + RollingUpgradePolicy = new RollingUpgradePolicy + { + EnableCrossZoneUpgrade = true, + MaxBatchInstancePercent = 1234, + MaxUnhealthyInstancePercent = 1234, + MaxUnhealthyUpgradedInstancePercent = 1234, + PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), + PrioritizeUnhealthyInstances = true, + RollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, +}) +{ + DisplayName = "", + UsesTaskDependencies = true, + Priority = 1234, + AllowTaskPreemption = true, + MaxParallelTasks = 1234, + Constraints = new BatchJobConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, + JobManagerTask = new BatchJobManagerTask("", "") + { + DisplayName = "", + ContainerSettings = new BatchTaskContainerSettings("") + { + ContainerRunOptions = "", + Registry = new ContainerRegistryReference + { + Username = "", + Password = "", + RegistryServer = "", + IdentityReference = new BatchNodeIdentityReference + { + ResourceId = "", + }, + }, + WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, + }, + ResourceFiles = {new ResourceFile + { + AutoStorageContainerName = "", + StorageContainerUrl = "", + HttpUrl = "", + BlobPrefix = "", + FilePath = "", + FileMode = "", + IdentityReference = default, + }}, + OutputFiles = {new OutputFile("", new OutputFileDestination + { + Container = new OutputFileBlobContainerDestination("") + { + Path = "", + IdentityReference = default, + UploadHeaders = {new HttpHeader("") + { + Value = "", + }}, + }, + }, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, + EnvironmentSettings = {new EnvironmentSetting("") + { + Value = "", + }}, + Constraints = new BatchTaskConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, + RequiredSlots = 1234, + KillJobOnCompletion = true, + UserIdentity = new UserIdentity + { + Username = "", + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + RunExclusive = true, + ApplicationPackageReferences = {new BatchApplicationPackageReference("") + { + Version = "", + }}, + AuthenticationTokenSettings = new AuthenticationTokenSettings + { + Access = { AccessScope.Job }, + }, + AllowLowPriorityNode = true, + }, + JobPreparationTask = new BatchJobPreparationTask("") + { + Id = "", + ContainerSettings = default, + ResourceFiles = { default }, + EnvironmentSettings = { default }, + Constraints = default, + WaitForSuccess = true, + UserIdentity = default, + RerunOnNodeRebootAfterSuccess = true, + }, + JobReleaseTask = new BatchJobReleaseTask("") + { + Id = "", + ContainerSettings = default, + ResourceFiles = { default }, + EnvironmentSettings = { default }, + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + UserIdentity = default, + }, + CommonEnvironmentSettings = { default }, + OnAllTasksComplete = OnAllBatchTasksComplete.NoAction, + OnTaskFailure = OnBatchTaskFailure.NoAction, + NetworkConfiguration = new BatchJobNetworkConfiguration(""), + Metadata = { default }, +}; +Response response = client.CreateJob(job, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +]]> + + + +This sample shows how to call CreateJobAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + id = "", + poolInfo = new object(), +}); +Response response = await client.CreateJobAsync(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call CreateJobAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + id = "", + displayName = "", + usesTaskDependencies = true, + priority = 1234, + allowTaskPreemption = true, + maxParallelTasks = 1234, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + jobManagerTask = new + { + id = "", + displayName = "", + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + registry = new + { + username = "", + password = "", + registryServer = "", + identityReference = new + { + resourceId = "", + }, + }, + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { + new + { + autoStorageContainerName = "", + storageContainerUrl = "", + httpUrl = "", + blobPrefix = "", + filePath = "", + fileMode = "", + } + }, + outputFiles = new object[] + { + new + { + filePattern = "", + destination = new + { + container = new + { + path = "", + containerUrl = "", + uploadHeaders = new object[] + { + new + { + name = "", + value = "", + } + }, + }, + }, + uploadOptions = new + { + uploadCondition = "tasksuccess", + }, + } + }, + environmentSettings = new object[] + { + new + { + name = "", + value = "", + } + }, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + requiredSlots = 1234, + killJobOnCompletion = true, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + runExclusive = true, + applicationPackageReferences = new object[] + { + new + { + applicationId = "", + version = "", + } + }, + authenticationTokenSettings = new + { + access = new object[] + { + "job" + }, + }, + allowLowPriorityNode = true, + }, + jobPreparationTask = new + { + id = "", + commandLine = "", + resourceFiles = new object[] + { + null + }, + environmentSettings = new object[] + { + null + }, + waitForSuccess = true, + rerunOnNodeRebootAfterSuccess = true, + }, + jobReleaseTask = new + { + id = "", + commandLine = "", + resourceFiles = new object[] + { + null + }, + environmentSettings = new object[] + { + null + }, + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + }, + commonEnvironmentSettings = new object[] + { + null + }, + poolInfo = new + { + poolId = "", + autoPoolSpecification = new + { + autoPoolIdPrefix = "", + poolLifetimeOption = "jobschedule", + keepAlive = true, + pool = new + { + displayName = "", + vmSize = "", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "", + offer = "", + sku = "", + version = "", + virtualMachineImageId = "", + }, + nodeAgentSKUId = "", + windowsConfiguration = new + { + enableAutomaticUpdates = true, + }, + dataDisks = new object[] + { + new + { + lun = 1234, + caching = "none", + diskSizeGB = 1234, + storageAccountType = "standard_lrs", + } + }, + licenseType = "", + containerConfiguration = new + { + type = "dockerCompatible", + containerImageNames = new object[] + { + "" + }, + containerRegistries = new object[] + { + null + }, + }, + diskEncryptionConfiguration = new + { + targets = new object[] + { + "osdisk" + }, + }, + nodePlacementConfiguration = new + { + policy = "regional", + }, + extensions = new object[] + { + new + { + name = "", + publisher = "", + type = "", + typeHandlerVersion = "", + autoUpgradeMinorVersion = true, + enableAutomaticUpgrade = true, + settings = new + { + key = "", + }, + protectedSettings = new + { + key = "", + }, + provisionAfterExtensions = new object[] + { + "" + }, + } + }, + osDisk = new + { + ephemeralOSDiskSettings = new + { + placement = "cachedisk", + }, + caching = "none", + diskSizeGB = 1234, + managedDisk = new + { + storageAccountType = "standard_lrs", + }, + writeAcceleratorEnabled = true, + }, + securityProfile = new + { + encryptionAtHost = true, + securityType = "trustedLaunch", + uefiSettings = new + { + secureBootEnabled = true, + vTpmEnabled = true, + }, + }, + serviceArtifactReference = new + { + id = "", + }, + }, + taskSlotsPerNode = 1234, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + resizeTimeout = "PT1H23M45S", + resourceTags = "", + targetDedicatedNodes = 1234, + targetLowPriorityNodes = 1234, + enableAutoScale = true, + autoScaleFormula = "", + autoScaleEvaluationInterval = "PT1H23M45S", + enableInterNodeCommunication = true, + networkConfiguration = new + { + subnetId = "", + dynamicVNetAssignmentScope = "none", + endpointConfiguration = new + { + inboundNATPools = new object[] + { + new + { + name = "", + protocol = "tcp", + backendPort = 1234, + frontendPortRangeStart = 1234, + frontendPortRangeEnd = 1234, + networkSecurityGroupRules = new object[] + { + new + { + priority = 1234, + access = "allow", + sourceAddressPrefix = "", + sourcePortRanges = new object[] + { + "" + }, + } + }, + } + }, + }, + publicIPAddressConfiguration = new + { + provision = "batchmanaged", + ipAddressIds = new object[] + { + "" + }, + }, + enableAcceleratedNetworking = true, + }, + startTask = new + { + commandLine = "", + resourceFiles = new object[] + { + null + }, + environmentSettings = new object[] + { + null + }, + maxTaskRetryCount = 1234, + waitForSuccess = true, + }, + applicationPackageReferences = new object[] + { + null + }, + userAccounts = new object[] + { + new + { + name = "", + password = "", + elevationLevel = "nonadmin", + linuxUserConfiguration = new + { + uid = 1234, + gid = 1234, + sshPrivateKey = "", + }, + windowsUserConfiguration = new + { + loginMode = "batch", + }, + } + }, + metadata = new object[] + { + new + { + name = "", + value = "", + } + }, + mountConfiguration = new object[] + { + new + { + azureBlobFileSystemConfiguration = new + { + accountName = "", + containerName = "", + accountKey = "", + sasKey = "", + blobfuseOptions = "", + relativeMountPath = "", + }, + nfsMountConfiguration = new + { + source = "", + relativeMountPath = "", + mountOptions = "", + }, + cifsMountConfiguration = new + { + username = "", + source = "", + relativeMountPath = "", + mountOptions = "", + password = "", + }, + azureFileShareConfiguration = new + { + accountName = "", + azureFileUrl = "", + accountKey = "", + relativeMountPath = "", + mountOptions = "", + }, + } + }, + targetNodeCommunicationMode = "default", + upgradePolicy = new + { + mode = "automatic", + automaticOSUpgradePolicy = new + { + disableAutomaticRollback = true, + enableAutomaticOSUpgrade = true, + useRollingUpgradePolicy = true, + osRollingUpgradeDeferral = true, + }, + rollingUpgradePolicy = new + { + enableCrossZoneUpgrade = true, + maxBatchInstancePercent = 1234, + maxUnhealthyInstancePercent = 1234, + maxUnhealthyUpgradedInstancePercent = 1234, + pauseTimeBetweenBatches = "PT1H23M45S", + prioritizeUnhealthyInstances = true, + rollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, + }, + onAllTasksComplete = "noaction", + onTaskFailure = "noaction", + networkConfiguration = new + { + subnetId = "", + }, + metadata = new object[] + { + null + }, +}); +Response response = await client.CreateJobAsync(content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call CreateJob. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + id = "", + poolInfo = new object(), +}); +Response response = client.CreateJob(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call CreateJob with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + id = "", + displayName = "", + usesTaskDependencies = true, + priority = 1234, + allowTaskPreemption = true, + maxParallelTasks = 1234, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + jobManagerTask = new + { + id = "", + displayName = "", + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + registry = new + { + username = "", + password = "", + registryServer = "", + identityReference = new + { + resourceId = "", + }, + }, + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { + new + { + autoStorageContainerName = "", + storageContainerUrl = "", + httpUrl = "", + blobPrefix = "", + filePath = "", + fileMode = "", + } + }, + outputFiles = new object[] + { + new + { + filePattern = "", + destination = new + { + container = new + { + path = "", + containerUrl = "", + uploadHeaders = new object[] + { + new + { + name = "", + value = "", + } + }, + }, + }, + uploadOptions = new + { + uploadCondition = "tasksuccess", + }, + } + }, + environmentSettings = new object[] + { + new + { + name = "", + value = "", + } + }, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + requiredSlots = 1234, + killJobOnCompletion = true, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + runExclusive = true, + applicationPackageReferences = new object[] + { + new + { + applicationId = "", + version = "", + } + }, + authenticationTokenSettings = new + { + access = new object[] + { + "job" + }, + }, + allowLowPriorityNode = true, + }, + jobPreparationTask = new + { + id = "", + commandLine = "", + resourceFiles = new object[] + { + null + }, + environmentSettings = new object[] + { + null + }, + waitForSuccess = true, + rerunOnNodeRebootAfterSuccess = true, + }, + jobReleaseTask = new + { + id = "", + commandLine = "", + resourceFiles = new object[] + { + null + }, + environmentSettings = new object[] + { + null + }, + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + }, + commonEnvironmentSettings = new object[] + { + null + }, + poolInfo = new + { + poolId = "", + autoPoolSpecification = new + { + autoPoolIdPrefix = "", + poolLifetimeOption = "jobschedule", + keepAlive = true, + pool = new + { + displayName = "", + vmSize = "", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "", + offer = "", + sku = "", + version = "", + virtualMachineImageId = "", + }, + nodeAgentSKUId = "", + windowsConfiguration = new + { + enableAutomaticUpdates = true, + }, + dataDisks = new object[] + { + new + { + lun = 1234, + caching = "none", + diskSizeGB = 1234, + storageAccountType = "standard_lrs", + } + }, + licenseType = "", + containerConfiguration = new + { + type = "dockerCompatible", + containerImageNames = new object[] + { + "" + }, + containerRegistries = new object[] + { + null + }, + }, + diskEncryptionConfiguration = new + { + targets = new object[] + { + "osdisk" + }, + }, + nodePlacementConfiguration = new + { + policy = "regional", + }, + extensions = new object[] + { + new + { + name = "", + publisher = "", + type = "", + typeHandlerVersion = "", + autoUpgradeMinorVersion = true, + enableAutomaticUpgrade = true, + settings = new + { + key = "", + }, + protectedSettings = new + { + key = "", + }, + provisionAfterExtensions = new object[] + { + "" + }, + } + }, + osDisk = new + { + ephemeralOSDiskSettings = new + { + placement = "cachedisk", + }, + caching = "none", + diskSizeGB = 1234, + managedDisk = new + { + storageAccountType = "standard_lrs", + }, + writeAcceleratorEnabled = true, + }, + securityProfile = new + { + encryptionAtHost = true, + securityType = "trustedLaunch", + uefiSettings = new + { + secureBootEnabled = true, + vTpmEnabled = true, + }, + }, + serviceArtifactReference = new + { + id = "", + }, + }, + taskSlotsPerNode = 1234, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + resizeTimeout = "PT1H23M45S", + resourceTags = "", + targetDedicatedNodes = 1234, + targetLowPriorityNodes = 1234, + enableAutoScale = true, + autoScaleFormula = "", + autoScaleEvaluationInterval = "PT1H23M45S", + enableInterNodeCommunication = true, + networkConfiguration = new + { + subnetId = "", + dynamicVNetAssignmentScope = "none", + endpointConfiguration = new + { + inboundNATPools = new object[] + { + new + { + name = "", + protocol = "tcp", + backendPort = 1234, + frontendPortRangeStart = 1234, + frontendPortRangeEnd = 1234, + networkSecurityGroupRules = new object[] + { + new + { + priority = 1234, + access = "allow", + sourceAddressPrefix = "", + sourcePortRanges = new object[] + { + "" + }, + } + }, + } + }, + }, + publicIPAddressConfiguration = new + { + provision = "batchmanaged", + ipAddressIds = new object[] + { + "" + }, + }, + enableAcceleratedNetworking = true, + }, + startTask = new + { + commandLine = "", + resourceFiles = new object[] + { + null + }, + environmentSettings = new object[] + { + null + }, + maxTaskRetryCount = 1234, + waitForSuccess = true, + }, + applicationPackageReferences = new object[] + { + null + }, + userAccounts = new object[] + { + new + { + name = "", + password = "", + elevationLevel = "nonadmin", + linuxUserConfiguration = new + { + uid = 1234, + gid = 1234, + sshPrivateKey = "", + }, + windowsUserConfiguration = new + { + loginMode = "batch", + }, + } + }, + metadata = new object[] + { + new + { + name = "", + value = "", + } + }, + mountConfiguration = new object[] + { + new + { + azureBlobFileSystemConfiguration = new + { + accountName = "", + containerName = "", + accountKey = "", + sasKey = "", + blobfuseOptions = "", + relativeMountPath = "", + }, + nfsMountConfiguration = new + { + source = "", + relativeMountPath = "", + mountOptions = "", + }, + cifsMountConfiguration = new + { + username = "", + source = "", + relativeMountPath = "", + mountOptions = "", + password = "", + }, + azureFileShareConfiguration = new + { + accountName = "", + azureFileUrl = "", + accountKey = "", + relativeMountPath = "", + mountOptions = "", + }, + } + }, + targetNodeCommunicationMode = "default", + upgradePolicy = new + { + mode = "automatic", + automaticOSUpgradePolicy = new + { + disableAutomaticRollback = true, + enableAutomaticOSUpgrade = true, + useRollingUpgradePolicy = true, + osRollingUpgradeDeferral = true, + }, + rollingUpgradePolicy = new + { + enableCrossZoneUpgrade = true, + maxBatchInstancePercent = 1234, + maxUnhealthyInstancePercent = 1234, + maxUnhealthyUpgradedInstancePercent = 1234, + pauseTimeBetweenBatches = "PT1H23M45S", + prioritizeUnhealthyInstances = true, + rollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, + }, + onAllTasksComplete = "noaction", + onTaskFailure = "noaction", + networkConfiguration = new + { + subnetId = "", + }, + metadata = new object[] + { + null + }, +}); +Response response = client.CreateJob(content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetJobTaskCountsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetJobTaskCountsAsync(""); +]]> +This sample shows how to call GetJobTaskCountsAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetJobTaskCountsAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +]]> + + + +This sample shows how to call GetJobTaskCounts. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.GetJobTaskCounts(""); +]]> +This sample shows how to call GetJobTaskCounts with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.GetJobTaskCounts("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +]]> + + + +This sample shows how to call GetJobTaskCountsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetJobTaskCountsAsync("", null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("taskCounts").GetProperty("active").ToString()); +Console.WriteLine(result.GetProperty("taskCounts").GetProperty("running").ToString()); +Console.WriteLine(result.GetProperty("taskCounts").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("taskCounts").GetProperty("succeeded").ToString()); +Console.WriteLine(result.GetProperty("taskCounts").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("active").ToString()); +Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("running").ToString()); +Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("succeeded").ToString()); +Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("failed").ToString()); +]]> +This sample shows how to call GetJobTaskCountsAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetJobTaskCountsAsync("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("taskCounts").GetProperty("active").ToString()); +Console.WriteLine(result.GetProperty("taskCounts").GetProperty("running").ToString()); +Console.WriteLine(result.GetProperty("taskCounts").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("taskCounts").GetProperty("succeeded").ToString()); +Console.WriteLine(result.GetProperty("taskCounts").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("active").ToString()); +Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("running").ToString()); +Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("succeeded").ToString()); +Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("failed").ToString()); +]]> + + + +This sample shows how to call GetJobTaskCounts and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.GetJobTaskCounts("", null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("taskCounts").GetProperty("active").ToString()); +Console.WriteLine(result.GetProperty("taskCounts").GetProperty("running").ToString()); +Console.WriteLine(result.GetProperty("taskCounts").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("taskCounts").GetProperty("succeeded").ToString()); +Console.WriteLine(result.GetProperty("taskCounts").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("active").ToString()); +Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("running").ToString()); +Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("succeeded").ToString()); +Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("failed").ToString()); +]]> +This sample shows how to call GetJobTaskCounts with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.GetJobTaskCounts("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("taskCounts").GetProperty("active").ToString()); +Console.WriteLine(result.GetProperty("taskCounts").GetProperty("running").ToString()); +Console.WriteLine(result.GetProperty("taskCounts").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("taskCounts").GetProperty("succeeded").ToString()); +Console.WriteLine(result.GetProperty("taskCounts").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("active").ToString()); +Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("running").ToString()); +Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("succeeded").ToString()); +Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("failed").ToString()); +]]> + + + +This sample shows how to call DeleteJobScheduleAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.DeleteJobScheduleAsync(""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteJobScheduleAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.DeleteJobScheduleAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DeleteJobSchedule. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.DeleteJobSchedule(""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteJobSchedule with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.DeleteJobSchedule("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetJobScheduleAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetJobScheduleAsync(""); +]]> +This sample shows how to call GetJobScheduleAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetJobScheduleAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), select: new string[] { "" }, expand: new string[] { "" }, requestConditions: null); +]]> + + + +This sample shows how to call GetJobScheduleAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetJobScheduleAsync("", null, null, null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").ToString()); +]]> +This sample shows how to call GetJobScheduleAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetJobScheduleAsync("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), new string[] { "" }, new string[] { "" }, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("url").ToString()); +Console.WriteLine(result.GetProperty("eTag").ToString()); +Console.WriteLine(result.GetProperty("lastModified").ToString()); +Console.WriteLine(result.GetProperty("creationTime").ToString()); +Console.WriteLine(result.GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); +Console.WriteLine(result.GetProperty("previousState").ToString()); +Console.WriteLine(result.GetProperty("previousStateTransitionTime").ToString()); +Console.WriteLine(result.GetProperty("schedule").GetProperty("doNotRunUntil").ToString()); +Console.WriteLine(result.GetProperty("schedule").GetProperty("doNotRunAfter").ToString()); +Console.WriteLine(result.GetProperty("schedule").GetProperty("startWindow").ToString()); +Console.WriteLine(result.GetProperty("schedule").GetProperty("recurrenceInterval").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("priority").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("allowTaskPreemption").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("maxParallelTasks").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("usesTaskDependencies").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("onAllTasksComplete").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("onTaskFailure").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("commandLine").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("filePattern").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("path").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("containerUrl").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("identityReference").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("uploadOptions").GetProperty("uploadCondition").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("requiredSlots").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("killJobOnCompletion").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("username").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("runExclusive").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("authenticationTokenSettings").GetProperty("access")[0].ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("allowLowPriorityNode").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("commandLine").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("waitForSuccess").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("username").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("rerunOnNodeRebootAfterSuccess").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("commandLine").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("maxWallClockTime").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("retentionTime").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("username").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("commonEnvironmentSettings")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("commonEnvironmentSettings")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("poolId").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("autoPoolIdPrefix").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("poolLifetimeOption").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("keepAlive").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("vmSize").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("publisher").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("offer").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("sku").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("exactVersion").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodeAgentSKUId").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("windowsConfiguration").GetProperty("enableAutomaticUpdates").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("lun").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("caching").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("diskSizeGB").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("storageAccountType").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("licenseType").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerImageNames")[0].ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("username").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("password").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("registryServer").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("diskEncryptionConfiguration").GetProperty("targets")[0].ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodePlacementConfiguration").GetProperty("policy").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("publisher").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("typeHandlerVersion").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("autoUpgradeMinorVersion").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("enableAutomaticUpgrade").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("settings").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("protectedSettings").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("provisionAfterExtensions")[0].ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("ephemeralOSDiskSettings").GetProperty("placement").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("caching").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("managedDisk").GetProperty("storageAccountType").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("writeAcceleratorEnabled").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("encryptionAtHost").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("securityType").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("secureBootEnabled").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("vTpmEnabled").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("serviceArtifactReference").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSlotsPerNode").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSchedulingPolicy").GetProperty("nodeFillType").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resizeTimeout").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resourceTags").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetDedicatedNodes").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetLowPriorityNodes").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableAutoScale").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleFormula").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleEvaluationInterval").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableInterNodeCommunication").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("dynamicVNetAssignmentScope").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("protocol").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("backendPort").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeStart").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeEnd").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("priority").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("access").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourceAddressPrefix").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourcePortRanges")[0].ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("provision").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("ipAddressIds")[0].ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("enableAcceleratedNetworking").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("commandLine").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("username").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("maxTaskRetryCount").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("waitForSuccess").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("password").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("elevationLevel").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("uid").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("gid").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("sshPrivateKey").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("windowsUserConfiguration").GetProperty("loginMode").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountName").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("containerName").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountKey").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("sasKey").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("blobfuseOptions").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("relativeMountPath").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("identityReference").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("relativeMountPath").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("mountOptions").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("username").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("relativeMountPath").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("mountOptions").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("password").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountName").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("azureFileUrl").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountKey").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("relativeMountPath").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("mountOptions").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetNodeCommunicationMode").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("mode").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("disableAutomaticRollback").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("enableAutomaticOSUpgrade").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("useRollingUpgradePolicy").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("osRollingUpgradeDeferral").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("enableCrossZoneUpgrade").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxBatchInstancePercent").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyInstancePercent").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyUpgradedInstancePercent").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("pauseTimeBetweenBatches").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("prioritizeUnhealthyInstances").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("rollbackFailedInstancesOnPolicyBreach").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("metadata")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("metadata")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("executionInfo").GetProperty("nextRunTime").ToString()); +Console.WriteLine(result.GetProperty("executionInfo").GetProperty("recentJob").GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("executionInfo").GetProperty("recentJob").GetProperty("url").ToString()); +Console.WriteLine(result.GetProperty("executionInfo").GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("url").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("lastUpdateTime").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("userCPUTime").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("kernelCPUTime").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("wallClockTime").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("readIOps").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOps").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("readIOGiB").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOGiB").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("numSucceededTasks").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("numFailedTasks").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("numTaskRetries").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("waitTime").ToString()); +]]> + + + +This sample shows how to call UpdateJobScheduleAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.UpdateJobScheduleAsync("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call UpdateJobScheduleAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + schedule = new + { + doNotRunUntil = "2022-05-10T18:57:31.2311892Z", + doNotRunAfter = "2022-05-10T18:57:31.2311892Z", + startWindow = "PT1H23M45S", + recurrenceInterval = "PT1H23M45S", + }, + jobSpecification = new + { + priority = 1234, + allowTaskPreemption = true, + maxParallelTasks = 1234, + displayName = "", + usesTaskDependencies = true, + onAllTasksComplete = "noaction", + onTaskFailure = "noaction", + networkConfiguration = new + { + subnetId = "", + }, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + jobManagerTask = new + { + id = "", + displayName = "", + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + registry = new + { + username = "", + password = "", + registryServer = "", + identityReference = new + { + resourceId = "", + }, + }, + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { + new + { + autoStorageContainerName = "", + storageContainerUrl = "", + httpUrl = "", + blobPrefix = "", + filePath = "", + fileMode = "", + } + }, + outputFiles = new object[] + { + new + { + filePattern = "", + destination = new + { + container = new + { + path = "", + containerUrl = "", + uploadHeaders = new object[] + { + new + { + name = "", + value = "", + } + }, + }, + }, + uploadOptions = new + { + uploadCondition = "tasksuccess", + }, + } + }, + environmentSettings = new object[] + { + new + { + name = "", + value = "", + } + }, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + requiredSlots = 1234, + killJobOnCompletion = true, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + runExclusive = true, + applicationPackageReferences = new object[] + { + new + { + applicationId = "", + version = "", + } + }, + authenticationTokenSettings = new + { + access = new object[] + { + "job" + }, + }, + allowLowPriorityNode = true, + }, + jobPreparationTask = new + { + id = "", + commandLine = "", + resourceFiles = new object[] + { + null + }, + environmentSettings = new object[] + { + null + }, + waitForSuccess = true, + rerunOnNodeRebootAfterSuccess = true, + }, + jobReleaseTask = new + { + id = "", + commandLine = "", + resourceFiles = new object[] + { + null + }, + environmentSettings = new object[] + { + null + }, + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + }, + commonEnvironmentSettings = new object[] + { + null + }, + poolInfo = new + { + poolId = "", + autoPoolSpecification = new + { + autoPoolIdPrefix = "", + poolLifetimeOption = "jobschedule", + keepAlive = true, + pool = new + { + displayName = "", + vmSize = "", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "", + offer = "", + sku = "", + version = "", + virtualMachineImageId = "", + }, + nodeAgentSKUId = "", + windowsConfiguration = new + { + enableAutomaticUpdates = true, + }, + dataDisks = new object[] + { + new + { + lun = 1234, + caching = "none", + diskSizeGB = 1234, + storageAccountType = "standard_lrs", + } + }, + licenseType = "", + containerConfiguration = new + { + type = "dockerCompatible", + containerImageNames = new object[] + { + "" + }, + containerRegistries = new object[] + { + null + }, + }, + diskEncryptionConfiguration = new + { + targets = new object[] + { + "osdisk" + }, + }, + nodePlacementConfiguration = new + { + policy = "regional", + }, + extensions = new object[] + { + new + { + name = "", + publisher = "", + type = "", + typeHandlerVersion = "", + autoUpgradeMinorVersion = true, + enableAutomaticUpgrade = true, + settings = new + { + key = "", + }, + protectedSettings = new + { + key = "", + }, + provisionAfterExtensions = new object[] + { + "" + }, + } + }, + osDisk = new + { + ephemeralOSDiskSettings = new + { + placement = "cachedisk", + }, + caching = "none", + diskSizeGB = 1234, + managedDisk = new + { + storageAccountType = "standard_lrs", + }, + writeAcceleratorEnabled = true, + }, + securityProfile = new + { + encryptionAtHost = true, + securityType = "trustedLaunch", + uefiSettings = new + { + secureBootEnabled = true, + vTpmEnabled = true, + }, + }, + serviceArtifactReference = new + { + id = "", + }, + }, + taskSlotsPerNode = 1234, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + resizeTimeout = "PT1H23M45S", + resourceTags = "", + targetDedicatedNodes = 1234, + targetLowPriorityNodes = 1234, + enableAutoScale = true, + autoScaleFormula = "", + autoScaleEvaluationInterval = "PT1H23M45S", + enableInterNodeCommunication = true, + networkConfiguration = new + { + subnetId = "", + dynamicVNetAssignmentScope = "none", + endpointConfiguration = new + { + inboundNATPools = new object[] + { + new + { + name = "", + protocol = "tcp", + backendPort = 1234, + frontendPortRangeStart = 1234, + frontendPortRangeEnd = 1234, + networkSecurityGroupRules = new object[] + { + new + { + priority = 1234, + access = "allow", + sourceAddressPrefix = "", + sourcePortRanges = new object[] + { + "" + }, + } + }, + } + }, + }, + publicIPAddressConfiguration = new + { + provision = "batchmanaged", + ipAddressIds = new object[] + { + "" + }, + }, + enableAcceleratedNetworking = true, + }, + startTask = new + { + commandLine = "", + resourceFiles = new object[] + { + null + }, + environmentSettings = new object[] + { + null + }, + maxTaskRetryCount = 1234, + waitForSuccess = true, + }, + applicationPackageReferences = new object[] + { + null + }, + userAccounts = new object[] + { + new + { + name = "", + password = "", + elevationLevel = "nonadmin", + linuxUserConfiguration = new + { + uid = 1234, + gid = 1234, + sshPrivateKey = "", + }, + windowsUserConfiguration = new + { + loginMode = "batch", + }, + } + }, + metadata = new object[] + { + new + { + name = "", + value = "", + } + }, + mountConfiguration = new object[] + { + new + { + azureBlobFileSystemConfiguration = new + { + accountName = "", + containerName = "", + accountKey = "", + sasKey = "", + blobfuseOptions = "", + relativeMountPath = "", + }, + nfsMountConfiguration = new + { + source = "", + relativeMountPath = "", + mountOptions = "", + }, + cifsMountConfiguration = new + { + username = "", + source = "", + relativeMountPath = "", + mountOptions = "", + password = "", + }, + azureFileShareConfiguration = new + { + accountName = "", + azureFileUrl = "", + accountKey = "", + relativeMountPath = "", + mountOptions = "", + }, + } + }, + targetNodeCommunicationMode = "default", + upgradePolicy = new + { + mode = "automatic", + automaticOSUpgradePolicy = new + { + disableAutomaticRollback = true, + enableAutomaticOSUpgrade = true, + useRollingUpgradePolicy = true, + osRollingUpgradeDeferral = true, + }, + rollingUpgradePolicy = new + { + enableCrossZoneUpgrade = true, + maxBatchInstancePercent = 1234, + maxUnhealthyInstancePercent = 1234, + maxUnhealthyUpgradedInstancePercent = 1234, + pauseTimeBetweenBatches = "PT1H23M45S", + prioritizeUnhealthyInstances = true, + rollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, + }, + metadata = new object[] + { + null + }, + }, + metadata = new object[] + { + null + }, +}); +Response response = await client.UpdateJobScheduleAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call UpdateJobSchedule. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.UpdateJobSchedule("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call UpdateJobSchedule with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + schedule = new + { + doNotRunUntil = "2022-05-10T18:57:31.2311892Z", + doNotRunAfter = "2022-05-10T18:57:31.2311892Z", + startWindow = "PT1H23M45S", + recurrenceInterval = "PT1H23M45S", + }, + jobSpecification = new + { + priority = 1234, + allowTaskPreemption = true, + maxParallelTasks = 1234, + displayName = "", + usesTaskDependencies = true, + onAllTasksComplete = "noaction", + onTaskFailure = "noaction", + networkConfiguration = new + { + subnetId = "", + }, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + jobManagerTask = new + { + id = "", + displayName = "", + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + registry = new + { + username = "", + password = "", + registryServer = "", + identityReference = new + { + resourceId = "", + }, + }, + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { + new + { + autoStorageContainerName = "", + storageContainerUrl = "", + httpUrl = "", + blobPrefix = "", + filePath = "", + fileMode = "", + } + }, + outputFiles = new object[] + { + new + { + filePattern = "", + destination = new + { + container = new + { + path = "", + containerUrl = "", + uploadHeaders = new object[] + { + new + { + name = "", + value = "", + } + }, + }, + }, + uploadOptions = new + { + uploadCondition = "tasksuccess", + }, + } + }, + environmentSettings = new object[] + { + new + { + name = "", + value = "", + } + }, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + requiredSlots = 1234, + killJobOnCompletion = true, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + runExclusive = true, + applicationPackageReferences = new object[] + { + new + { + applicationId = "", + version = "", + } + }, + authenticationTokenSettings = new + { + access = new object[] + { + "job" + }, + }, + allowLowPriorityNode = true, + }, + jobPreparationTask = new + { + id = "", + commandLine = "", + resourceFiles = new object[] + { + null + }, + environmentSettings = new object[] + { + null + }, + waitForSuccess = true, + rerunOnNodeRebootAfterSuccess = true, + }, + jobReleaseTask = new + { + id = "", + commandLine = "", + resourceFiles = new object[] + { + null + }, + environmentSettings = new object[] + { + null + }, + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + }, + commonEnvironmentSettings = new object[] + { + null + }, + poolInfo = new + { + poolId = "", + autoPoolSpecification = new + { + autoPoolIdPrefix = "", + poolLifetimeOption = "jobschedule", + keepAlive = true, + pool = new + { + displayName = "", + vmSize = "", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "", + offer = "", + sku = "", + version = "", + virtualMachineImageId = "", + }, + nodeAgentSKUId = "", + windowsConfiguration = new + { + enableAutomaticUpdates = true, + }, + dataDisks = new object[] + { + new + { + lun = 1234, + caching = "none", + diskSizeGB = 1234, + storageAccountType = "standard_lrs", + } + }, + licenseType = "", + containerConfiguration = new + { + type = "dockerCompatible", + containerImageNames = new object[] + { + "" + }, + containerRegistries = new object[] + { + null + }, + }, + diskEncryptionConfiguration = new + { + targets = new object[] + { + "osdisk" + }, + }, + nodePlacementConfiguration = new + { + policy = "regional", + }, + extensions = new object[] + { + new + { + name = "", + publisher = "", + type = "", + typeHandlerVersion = "", + autoUpgradeMinorVersion = true, + enableAutomaticUpgrade = true, + settings = new + { + key = "", + }, + protectedSettings = new + { + key = "", + }, + provisionAfterExtensions = new object[] + { + "" + }, + } + }, + osDisk = new + { + ephemeralOSDiskSettings = new + { + placement = "cachedisk", + }, + caching = "none", + diskSizeGB = 1234, + managedDisk = new + { + storageAccountType = "standard_lrs", + }, + writeAcceleratorEnabled = true, + }, + securityProfile = new + { + encryptionAtHost = true, + securityType = "trustedLaunch", + uefiSettings = new + { + secureBootEnabled = true, + vTpmEnabled = true, + }, + }, + serviceArtifactReference = new + { + id = "", + }, + }, + taskSlotsPerNode = 1234, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + resizeTimeout = "PT1H23M45S", + resourceTags = "", + targetDedicatedNodes = 1234, + targetLowPriorityNodes = 1234, + enableAutoScale = true, + autoScaleFormula = "", + autoScaleEvaluationInterval = "PT1H23M45S", + enableInterNodeCommunication = true, + networkConfiguration = new + { + subnetId = "", + dynamicVNetAssignmentScope = "none", + endpointConfiguration = new + { + inboundNATPools = new object[] + { + new + { + name = "", + protocol = "tcp", + backendPort = 1234, + frontendPortRangeStart = 1234, + frontendPortRangeEnd = 1234, + networkSecurityGroupRules = new object[] + { + new + { + priority = 1234, + access = "allow", + sourceAddressPrefix = "", + sourcePortRanges = new object[] + { + "" + }, + } + }, + } + }, + }, + publicIPAddressConfiguration = new + { + provision = "batchmanaged", + ipAddressIds = new object[] + { + "" + }, + }, + enableAcceleratedNetworking = true, + }, + startTask = new + { + commandLine = "", + resourceFiles = new object[] + { + null + }, + environmentSettings = new object[] + { + null + }, + maxTaskRetryCount = 1234, + waitForSuccess = true, + }, + applicationPackageReferences = new object[] + { + null + }, + userAccounts = new object[] + { + new + { + name = "", + password = "", + elevationLevel = "nonadmin", + linuxUserConfiguration = new + { + uid = 1234, + gid = 1234, + sshPrivateKey = "", + }, + windowsUserConfiguration = new + { + loginMode = "batch", + }, + } + }, + metadata = new object[] + { + new + { + name = "", + value = "", + } + }, + mountConfiguration = new object[] + { + new + { + azureBlobFileSystemConfiguration = new + { + accountName = "", + containerName = "", + accountKey = "", + sasKey = "", + blobfuseOptions = "", + relativeMountPath = "", + }, + nfsMountConfiguration = new + { + source = "", + relativeMountPath = "", + mountOptions = "", + }, + cifsMountConfiguration = new + { + username = "", + source = "", + relativeMountPath = "", + mountOptions = "", + password = "", + }, + azureFileShareConfiguration = new + { + accountName = "", + azureFileUrl = "", + accountKey = "", + relativeMountPath = "", + mountOptions = "", + }, + } + }, + targetNodeCommunicationMode = "default", + upgradePolicy = new + { + mode = "automatic", + automaticOSUpgradePolicy = new + { + disableAutomaticRollback = true, + enableAutomaticOSUpgrade = true, + useRollingUpgradePolicy = true, + osRollingUpgradeDeferral = true, + }, + rollingUpgradePolicy = new + { + enableCrossZoneUpgrade = true, + maxBatchInstancePercent = 1234, + maxUnhealthyInstancePercent = 1234, + maxUnhealthyUpgradedInstancePercent = 1234, + pauseTimeBetweenBatches = "PT1H23M45S", + prioritizeUnhealthyInstances = true, + rollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, + }, + metadata = new object[] + { + null + }, + }, + metadata = new object[] + { + null + }, +}); +Response response = client.UpdateJobSchedule("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call ReplaceJobScheduleAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchJobSchedule jobSchedule = new BatchJobSchedule(new BatchJobSpecification(new BatchPoolInfo())); +Response response = await client.ReplaceJobScheduleAsync("", jobSchedule); +]]> +This sample shows how to call ReplaceJobScheduleAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchJobSchedule jobSchedule = new BatchJobSchedule(new BatchJobSpecification(new BatchPoolInfo +{ + PoolId = "", + AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.JobSchedule) + { + AutoPoolIdPrefix = "", + KeepAlive = true, + Pool = new BatchPoolSpecification("") + { + DisplayName = "", + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "", + Offer = "", + Sku = "", + Version = "", + VirtualMachineImageId = "", + }, "") + { + WindowsConfiguration = new WindowsConfiguration + { + EnableAutomaticUpdates = true, + }, + DataDisks = {new DataDisk(1234, 1234) + { + Caching = CachingType.None, + StorageAccountType = StorageAccountType.StandardLRS, + }}, + LicenseType = "", + ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) + { + ContainerImageNames = { "" }, + ContainerRegistries = { default }, + }, + DiskEncryptionConfiguration = new DiskEncryptionConfiguration + { + Targets = { DiskEncryptionTarget.OsDisk }, + }, + NodePlacementConfiguration = new BatchNodePlacementConfiguration + { + Policy = BatchNodePlacementPolicyType.Regional, + }, + Extensions = {new VMExtension("", "", "") + { + TypeHandlerVersion = "", + AutoUpgradeMinorVersion = true, + EnableAutomaticUpgrade = true, + Settings = + { + ["key"] = "" + }, + ProtectedSettings = + { + ["key"] = "" + }, + ProvisionAfterExtensions = {""}, + }}, + OsDisk = new OSDisk + { + EphemeralOSDiskSettings = new DiffDiskSettings + { + Placement = DiffDiskPlacement.CacheDisk, + }, + Caching = CachingType.None, + DiskSizeGB = 1234, + ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), + WriteAcceleratorEnabled = true, + }, + SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings + { + SecureBootEnabled = true, + VTpmEnabled = true, + }), + ServiceArtifactReference = new ServiceArtifactReference(""), + }, + TaskSlotsPerNode = 1234, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), + ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), + ResourceTags = "", + TargetDedicatedNodes = 1234, + TargetLowPriorityNodes = 1234, + EnableAutoScale = true, + AutoScaleFormula = "", + AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), + EnableInterNodeCommunication = true, + NetworkConfiguration = new NetworkConfiguration + { + SubnetId = "", + DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, + EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] + { + new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) + { + NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") + { + SourcePortRanges = {""}, + }}, + } + }), + PublicIpAddressConfiguration = new PublicIpAddressConfiguration + { + IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, + IpAddressIds = { "" }, + }, + EnableAcceleratedNetworking = true, + }, + StartTask = new BatchStartTask("") + { + ContainerSettings = default, + ResourceFiles = { default }, + EnvironmentSettings = { default }, + UserIdentity = default, + MaxTaskRetryCount = 1234, + WaitForSuccess = true, + }, + ApplicationPackageReferences = { default }, + UserAccounts = {new UserAccount("", "") + { + ElevationLevel = ElevationLevel.NonAdmin, + LinuxUserConfiguration = new LinuxUserConfiguration + { + Uid = 1234, + Gid = 1234, + SshPrivateKey = "", + }, + WindowsUserConfiguration = new WindowsUserConfiguration + { + LoginMode = LoginMode.Batch, + }, + }}, + Metadata = { new MetadataItem("", "") }, + MountConfiguration = {new MountConfiguration + { + AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") + { + AccountKey = "", + SasKey = "", + BlobfuseOptions = "", + IdentityReference = default, + }, + NfsMountConfiguration = new NfsMountConfiguration("", "") + { + MountOptions = "", + }, + CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") + { + MountOptions = "", + }, + AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") + { + MountOptions = "", + }, + }}, + TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, + UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) + { + AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy + { + DisableAutomaticRollback = true, + EnableAutomaticOsUpgrade = true, + UseRollingUpgradePolicy = true, + OsRollingUpgradeDeferral = true, + }, + RollingUpgradePolicy = new RollingUpgradePolicy + { + EnableCrossZoneUpgrade = true, + MaxBatchInstancePercent = 1234, + MaxUnhealthyInstancePercent = 1234, + MaxUnhealthyUpgradedInstancePercent = 1234, + PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), + PrioritizeUnhealthyInstances = true, + RollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, +}) +{ + Priority = 1234, + AllowTaskPreemption = true, + MaxParallelTasks = 1234, + DisplayName = "", + UsesTaskDependencies = true, + OnAllTasksComplete = OnAllBatchTasksComplete.NoAction, + OnTaskFailure = OnBatchTaskFailure.NoAction, + NetworkConfiguration = new BatchJobNetworkConfiguration(""), + Constraints = new BatchJobConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, + JobManagerTask = new BatchJobManagerTask("", "") + { + DisplayName = "", + ContainerSettings = new BatchTaskContainerSettings("") + { + ContainerRunOptions = "", + Registry = new ContainerRegistryReference + { + Username = "", + Password = "", + RegistryServer = "", + IdentityReference = new BatchNodeIdentityReference + { + ResourceId = "", + }, + }, + WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, + }, + ResourceFiles = {new ResourceFile + { + AutoStorageContainerName = "", + StorageContainerUrl = "", + HttpUrl = "", + BlobPrefix = "", + FilePath = "", + FileMode = "", + IdentityReference = default, + }}, + OutputFiles = {new OutputFile("", new OutputFileDestination + { + Container = new OutputFileBlobContainerDestination("") + { + Path = "", + IdentityReference = default, + UploadHeaders = {new HttpHeader("") + { + Value = "", + }}, + }, + }, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, + EnvironmentSettings = {new EnvironmentSetting("") + { + Value = "", + }}, + Constraints = new BatchTaskConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, + RequiredSlots = 1234, + KillJobOnCompletion = true, + UserIdentity = new UserIdentity + { + Username = "", + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + RunExclusive = true, + ApplicationPackageReferences = {new BatchApplicationPackageReference("") + { + Version = "", + }}, + AuthenticationTokenSettings = new AuthenticationTokenSettings + { + Access = { AccessScope.Job }, + }, + AllowLowPriorityNode = true, + }, + JobPreparationTask = new BatchJobPreparationTask("") + { + Id = "", + ContainerSettings = default, + ResourceFiles = { default }, + EnvironmentSettings = { default }, + Constraints = default, + WaitForSuccess = true, + UserIdentity = default, + RerunOnNodeRebootAfterSuccess = true, + }, + JobReleaseTask = new BatchJobReleaseTask("") + { + Id = "", + ContainerSettings = default, + ResourceFiles = { default }, + EnvironmentSettings = { default }, + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + UserIdentity = default, + }, + CommonEnvironmentSettings = { default }, + Metadata = { default }, +}) +{ + Schedule = new BatchJobScheduleConfiguration + { + DoNotRunUntil = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + DoNotRunAfter = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + StartWindow = XmlConvert.ToTimeSpan("PT1H23M45S"), + RecurrenceInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), + }, + Metadata = { default }, +}; +Response response = await client.ReplaceJobScheduleAsync("", jobSchedule, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +]]> + + + +This sample shows how to call ReplaceJobSchedule. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchJobSchedule jobSchedule = new BatchJobSchedule(new BatchJobSpecification(new BatchPoolInfo())); +Response response = client.ReplaceJobSchedule("", jobSchedule); +]]> +This sample shows how to call ReplaceJobSchedule with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchJobSchedule jobSchedule = new BatchJobSchedule(new BatchJobSpecification(new BatchPoolInfo +{ + PoolId = "", + AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.JobSchedule) + { + AutoPoolIdPrefix = "", + KeepAlive = true, + Pool = new BatchPoolSpecification("") + { + DisplayName = "", + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "", + Offer = "", + Sku = "", + Version = "", + VirtualMachineImageId = "", + }, "") + { + WindowsConfiguration = new WindowsConfiguration + { + EnableAutomaticUpdates = true, + }, + DataDisks = {new DataDisk(1234, 1234) + { + Caching = CachingType.None, + StorageAccountType = StorageAccountType.StandardLRS, + }}, + LicenseType = "", + ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) + { + ContainerImageNames = { "" }, + ContainerRegistries = { default }, + }, + DiskEncryptionConfiguration = new DiskEncryptionConfiguration + { + Targets = { DiskEncryptionTarget.OsDisk }, + }, + NodePlacementConfiguration = new BatchNodePlacementConfiguration + { + Policy = BatchNodePlacementPolicyType.Regional, + }, + Extensions = {new VMExtension("", "", "") + { + TypeHandlerVersion = "", + AutoUpgradeMinorVersion = true, + EnableAutomaticUpgrade = true, + Settings = + { + ["key"] = "" + }, + ProtectedSettings = + { + ["key"] = "" + }, + ProvisionAfterExtensions = {""}, + }}, + OsDisk = new OSDisk + { + EphemeralOSDiskSettings = new DiffDiskSettings + { + Placement = DiffDiskPlacement.CacheDisk, + }, + Caching = CachingType.None, + DiskSizeGB = 1234, + ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), + WriteAcceleratorEnabled = true, + }, + SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings + { + SecureBootEnabled = true, + VTpmEnabled = true, + }), + ServiceArtifactReference = new ServiceArtifactReference(""), + }, + TaskSlotsPerNode = 1234, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), + ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), + ResourceTags = "", + TargetDedicatedNodes = 1234, + TargetLowPriorityNodes = 1234, + EnableAutoScale = true, + AutoScaleFormula = "", + AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), + EnableInterNodeCommunication = true, + NetworkConfiguration = new NetworkConfiguration + { + SubnetId = "", + DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, + EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] + { + new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) + { + NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") + { + SourcePortRanges = {""}, + }}, + } + }), + PublicIpAddressConfiguration = new PublicIpAddressConfiguration + { + IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, + IpAddressIds = { "" }, + }, + EnableAcceleratedNetworking = true, + }, + StartTask = new BatchStartTask("") + { + ContainerSettings = default, + ResourceFiles = { default }, + EnvironmentSettings = { default }, + UserIdentity = default, + MaxTaskRetryCount = 1234, + WaitForSuccess = true, + }, + ApplicationPackageReferences = { default }, + UserAccounts = {new UserAccount("", "") + { + ElevationLevel = ElevationLevel.NonAdmin, + LinuxUserConfiguration = new LinuxUserConfiguration + { + Uid = 1234, + Gid = 1234, + SshPrivateKey = "", + }, + WindowsUserConfiguration = new WindowsUserConfiguration + { + LoginMode = LoginMode.Batch, + }, + }}, + Metadata = { new MetadataItem("", "") }, + MountConfiguration = {new MountConfiguration + { + AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") + { + AccountKey = "", + SasKey = "", + BlobfuseOptions = "", + IdentityReference = default, + }, + NfsMountConfiguration = new NfsMountConfiguration("", "") + { + MountOptions = "", + }, + CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") + { + MountOptions = "", + }, + AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") + { + MountOptions = "", + }, + }}, + TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, + UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) + { + AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy + { + DisableAutomaticRollback = true, + EnableAutomaticOsUpgrade = true, + UseRollingUpgradePolicy = true, + OsRollingUpgradeDeferral = true, + }, + RollingUpgradePolicy = new RollingUpgradePolicy + { + EnableCrossZoneUpgrade = true, + MaxBatchInstancePercent = 1234, + MaxUnhealthyInstancePercent = 1234, + MaxUnhealthyUpgradedInstancePercent = 1234, + PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), + PrioritizeUnhealthyInstances = true, + RollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, +}) +{ + Priority = 1234, + AllowTaskPreemption = true, + MaxParallelTasks = 1234, + DisplayName = "", + UsesTaskDependencies = true, + OnAllTasksComplete = OnAllBatchTasksComplete.NoAction, + OnTaskFailure = OnBatchTaskFailure.NoAction, + NetworkConfiguration = new BatchJobNetworkConfiguration(""), + Constraints = new BatchJobConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, + JobManagerTask = new BatchJobManagerTask("", "") + { + DisplayName = "", + ContainerSettings = new BatchTaskContainerSettings("") + { + ContainerRunOptions = "", + Registry = new ContainerRegistryReference + { + Username = "", + Password = "", + RegistryServer = "", + IdentityReference = new BatchNodeIdentityReference + { + ResourceId = "", + }, + }, + WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, + }, + ResourceFiles = {new ResourceFile + { + AutoStorageContainerName = "", + StorageContainerUrl = "", + HttpUrl = "", + BlobPrefix = "", + FilePath = "", + FileMode = "", + IdentityReference = default, + }}, + OutputFiles = {new OutputFile("", new OutputFileDestination + { + Container = new OutputFileBlobContainerDestination("") + { + Path = "", + IdentityReference = default, + UploadHeaders = {new HttpHeader("") + { + Value = "", + }}, + }, + }, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, + EnvironmentSettings = {new EnvironmentSetting("") + { + Value = "", + }}, + Constraints = new BatchTaskConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, + RequiredSlots = 1234, + KillJobOnCompletion = true, + UserIdentity = new UserIdentity + { + Username = "", + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + RunExclusive = true, + ApplicationPackageReferences = {new BatchApplicationPackageReference("") + { + Version = "", + }}, + AuthenticationTokenSettings = new AuthenticationTokenSettings + { + Access = { AccessScope.Job }, + }, + AllowLowPriorityNode = true, + }, + JobPreparationTask = new BatchJobPreparationTask("") + { + Id = "", + ContainerSettings = default, + ResourceFiles = { default }, + EnvironmentSettings = { default }, + Constraints = default, + WaitForSuccess = true, + UserIdentity = default, + RerunOnNodeRebootAfterSuccess = true, + }, + JobReleaseTask = new BatchJobReleaseTask("") + { + Id = "", + ContainerSettings = default, + ResourceFiles = { default }, + EnvironmentSettings = { default }, + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + UserIdentity = default, + }, + CommonEnvironmentSettings = { default }, + Metadata = { default }, +}) +{ + Schedule = new BatchJobScheduleConfiguration + { + DoNotRunUntil = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + DoNotRunAfter = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + StartWindow = XmlConvert.ToTimeSpan("PT1H23M45S"), + RecurrenceInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), + }, + Metadata = { default }, +}; +Response response = client.ReplaceJobSchedule("", jobSchedule, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +]]> + + + +This sample shows how to call ReplaceJobScheduleAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + jobSpecification = new + { + poolInfo = new object(), + }, +}); +Response response = await client.ReplaceJobScheduleAsync("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call ReplaceJobScheduleAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + schedule = new + { + doNotRunUntil = "2022-05-10T18:57:31.2311892Z", + doNotRunAfter = "2022-05-10T18:57:31.2311892Z", + startWindow = "PT1H23M45S", + recurrenceInterval = "PT1H23M45S", + }, + jobSpecification = new + { + priority = 1234, + allowTaskPreemption = true, + maxParallelTasks = 1234, + displayName = "", + usesTaskDependencies = true, + onAllTasksComplete = "noaction", + onTaskFailure = "noaction", + networkConfiguration = new + { + subnetId = "", + }, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + jobManagerTask = new + { + id = "", + displayName = "", + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + registry = new + { + username = "", + password = "", + registryServer = "", + identityReference = new + { + resourceId = "", + }, + }, + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { + new + { + autoStorageContainerName = "", + storageContainerUrl = "", + httpUrl = "", + blobPrefix = "", + filePath = "", + fileMode = "", + } + }, + outputFiles = new object[] + { + new + { + filePattern = "", + destination = new + { + container = new + { + path = "", + containerUrl = "", + uploadHeaders = new object[] + { + new + { + name = "", + value = "", + } + }, + }, + }, + uploadOptions = new + { + uploadCondition = "tasksuccess", + }, + } + }, + environmentSettings = new object[] + { + new + { + name = "", + value = "", + } + }, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + requiredSlots = 1234, + killJobOnCompletion = true, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + runExclusive = true, + applicationPackageReferences = new object[] + { + new + { + applicationId = "", + version = "", + } + }, + authenticationTokenSettings = new + { + access = new object[] + { + "job" + }, + }, + allowLowPriorityNode = true, + }, + jobPreparationTask = new + { + id = "", + commandLine = "", + resourceFiles = new object[] + { + null + }, + environmentSettings = new object[] + { + null + }, + waitForSuccess = true, + rerunOnNodeRebootAfterSuccess = true, + }, + jobReleaseTask = new + { + id = "", + commandLine = "", + resourceFiles = new object[] + { + null + }, + environmentSettings = new object[] + { + null + }, + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + }, + commonEnvironmentSettings = new object[] + { + null + }, + poolInfo = new + { + poolId = "", + autoPoolSpecification = new + { + autoPoolIdPrefix = "", + poolLifetimeOption = "jobschedule", + keepAlive = true, + pool = new + { + displayName = "", + vmSize = "", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "", + offer = "", + sku = "", + version = "", + virtualMachineImageId = "", + }, + nodeAgentSKUId = "", + windowsConfiguration = new + { + enableAutomaticUpdates = true, + }, + dataDisks = new object[] + { + new + { + lun = 1234, + caching = "none", + diskSizeGB = 1234, + storageAccountType = "standard_lrs", + } + }, + licenseType = "", + containerConfiguration = new + { + type = "dockerCompatible", + containerImageNames = new object[] + { + "" + }, + containerRegistries = new object[] + { + null + }, + }, + diskEncryptionConfiguration = new + { + targets = new object[] + { + "osdisk" + }, + }, + nodePlacementConfiguration = new + { + policy = "regional", + }, + extensions = new object[] + { + new + { + name = "", + publisher = "", + type = "", + typeHandlerVersion = "", + autoUpgradeMinorVersion = true, + enableAutomaticUpgrade = true, + settings = new + { + key = "", + }, + protectedSettings = new + { + key = "", + }, + provisionAfterExtensions = new object[] + { + "" + }, + } + }, + osDisk = new + { + ephemeralOSDiskSettings = new + { + placement = "cachedisk", + }, + caching = "none", + diskSizeGB = 1234, + managedDisk = new + { + storageAccountType = "standard_lrs", + }, + writeAcceleratorEnabled = true, + }, + securityProfile = new + { + encryptionAtHost = true, + securityType = "trustedLaunch", + uefiSettings = new + { + secureBootEnabled = true, + vTpmEnabled = true, + }, + }, + serviceArtifactReference = new + { + id = "", + }, + }, + taskSlotsPerNode = 1234, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + resizeTimeout = "PT1H23M45S", + resourceTags = "", + targetDedicatedNodes = 1234, + targetLowPriorityNodes = 1234, + enableAutoScale = true, + autoScaleFormula = "", + autoScaleEvaluationInterval = "PT1H23M45S", + enableInterNodeCommunication = true, + networkConfiguration = new + { + subnetId = "", + dynamicVNetAssignmentScope = "none", + endpointConfiguration = new + { + inboundNATPools = new object[] + { + new + { + name = "", + protocol = "tcp", + backendPort = 1234, + frontendPortRangeStart = 1234, + frontendPortRangeEnd = 1234, + networkSecurityGroupRules = new object[] + { + new + { + priority = 1234, + access = "allow", + sourceAddressPrefix = "", + sourcePortRanges = new object[] + { + "" + }, + } + }, + } + }, + }, + publicIPAddressConfiguration = new + { + provision = "batchmanaged", + ipAddressIds = new object[] + { + "" + }, + }, + enableAcceleratedNetworking = true, + }, + startTask = new + { + commandLine = "", + resourceFiles = new object[] + { + null + }, + environmentSettings = new object[] + { + null + }, + maxTaskRetryCount = 1234, + waitForSuccess = true, + }, + applicationPackageReferences = new object[] + { + null + }, + userAccounts = new object[] + { + new + { + name = "", + password = "", + elevationLevel = "nonadmin", + linuxUserConfiguration = new + { + uid = 1234, + gid = 1234, + sshPrivateKey = "", + }, + windowsUserConfiguration = new + { + loginMode = "batch", + }, + } + }, + metadata = new object[] + { + new + { + name = "", + value = "", + } + }, + mountConfiguration = new object[] + { + new + { + azureBlobFileSystemConfiguration = new + { + accountName = "", + containerName = "", + accountKey = "", + sasKey = "", + blobfuseOptions = "", + relativeMountPath = "", + }, + nfsMountConfiguration = new + { + source = "", + relativeMountPath = "", + mountOptions = "", + }, + cifsMountConfiguration = new + { + username = "", + source = "", + relativeMountPath = "", + mountOptions = "", + password = "", + }, + azureFileShareConfiguration = new + { + accountName = "", + azureFileUrl = "", + accountKey = "", + relativeMountPath = "", + mountOptions = "", + }, + } + }, + targetNodeCommunicationMode = "default", + upgradePolicy = new + { + mode = "automatic", + automaticOSUpgradePolicy = new + { + disableAutomaticRollback = true, + enableAutomaticOSUpgrade = true, + useRollingUpgradePolicy = true, + osRollingUpgradeDeferral = true, + }, + rollingUpgradePolicy = new + { + enableCrossZoneUpgrade = true, + maxBatchInstancePercent = 1234, + maxUnhealthyInstancePercent = 1234, + maxUnhealthyUpgradedInstancePercent = 1234, + pauseTimeBetweenBatches = "PT1H23M45S", + prioritizeUnhealthyInstances = true, + rollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, + }, + metadata = new object[] + { + null + }, + }, + metadata = new object[] + { + null + }, +}); +Response response = await client.ReplaceJobScheduleAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call ReplaceJobSchedule. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + jobSpecification = new + { + poolInfo = new object(), + }, +}); +Response response = client.ReplaceJobSchedule("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call ReplaceJobSchedule with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + schedule = new + { + doNotRunUntil = "2022-05-10T18:57:31.2311892Z", + doNotRunAfter = "2022-05-10T18:57:31.2311892Z", + startWindow = "PT1H23M45S", + recurrenceInterval = "PT1H23M45S", + }, + jobSpecification = new + { + priority = 1234, + allowTaskPreemption = true, + maxParallelTasks = 1234, + displayName = "", + usesTaskDependencies = true, + onAllTasksComplete = "noaction", + onTaskFailure = "noaction", + networkConfiguration = new + { + subnetId = "", + }, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + jobManagerTask = new + { + id = "", + displayName = "", + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + registry = new + { + username = "", + password = "", + registryServer = "", + identityReference = new + { + resourceId = "", + }, + }, + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { + new + { + autoStorageContainerName = "", + storageContainerUrl = "", + httpUrl = "", + blobPrefix = "", + filePath = "", + fileMode = "", + } + }, + outputFiles = new object[] + { + new + { + filePattern = "", + destination = new + { + container = new + { + path = "", + containerUrl = "", + uploadHeaders = new object[] + { + new + { + name = "", + value = "", + } + }, + }, + }, + uploadOptions = new + { + uploadCondition = "tasksuccess", + }, + } + }, + environmentSettings = new object[] + { + new + { + name = "", + value = "", + } + }, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + requiredSlots = 1234, + killJobOnCompletion = true, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + runExclusive = true, + applicationPackageReferences = new object[] + { + new + { + applicationId = "", + version = "", + } + }, + authenticationTokenSettings = new + { + access = new object[] + { + "job" + }, + }, + allowLowPriorityNode = true, + }, + jobPreparationTask = new + { + id = "", + commandLine = "", + resourceFiles = new object[] + { + null + }, + environmentSettings = new object[] + { + null + }, + waitForSuccess = true, + rerunOnNodeRebootAfterSuccess = true, + }, + jobReleaseTask = new + { + id = "", + commandLine = "", + resourceFiles = new object[] + { + null + }, + environmentSettings = new object[] + { + null + }, + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + }, + commonEnvironmentSettings = new object[] + { + null + }, + poolInfo = new + { + poolId = "", + autoPoolSpecification = new + { + autoPoolIdPrefix = "", + poolLifetimeOption = "jobschedule", + keepAlive = true, + pool = new + { + displayName = "", + vmSize = "", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "", + offer = "", + sku = "", + version = "", + virtualMachineImageId = "", + }, + nodeAgentSKUId = "", + windowsConfiguration = new + { + enableAutomaticUpdates = true, + }, + dataDisks = new object[] + { + new + { + lun = 1234, + caching = "none", + diskSizeGB = 1234, + storageAccountType = "standard_lrs", + } + }, + licenseType = "", + containerConfiguration = new + { + type = "dockerCompatible", + containerImageNames = new object[] + { + "" + }, + containerRegistries = new object[] + { + null + }, + }, + diskEncryptionConfiguration = new + { + targets = new object[] + { + "osdisk" + }, + }, + nodePlacementConfiguration = new + { + policy = "regional", + }, + extensions = new object[] + { + new + { + name = "", + publisher = "", + type = "", + typeHandlerVersion = "", + autoUpgradeMinorVersion = true, + enableAutomaticUpgrade = true, + settings = new + { + key = "", + }, + protectedSettings = new + { + key = "", + }, + provisionAfterExtensions = new object[] + { + "" + }, + } + }, + osDisk = new + { + ephemeralOSDiskSettings = new + { + placement = "cachedisk", + }, + caching = "none", + diskSizeGB = 1234, + managedDisk = new + { + storageAccountType = "standard_lrs", + }, + writeAcceleratorEnabled = true, + }, + securityProfile = new + { + encryptionAtHost = true, + securityType = "trustedLaunch", + uefiSettings = new + { + secureBootEnabled = true, + vTpmEnabled = true, + }, + }, + serviceArtifactReference = new + { + id = "", + }, + }, + taskSlotsPerNode = 1234, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + resizeTimeout = "PT1H23M45S", + resourceTags = "", + targetDedicatedNodes = 1234, + targetLowPriorityNodes = 1234, + enableAutoScale = true, + autoScaleFormula = "", + autoScaleEvaluationInterval = "PT1H23M45S", + enableInterNodeCommunication = true, + networkConfiguration = new + { + subnetId = "", + dynamicVNetAssignmentScope = "none", + endpointConfiguration = new + { + inboundNATPools = new object[] + { + new + { + name = "", + protocol = "tcp", + backendPort = 1234, + frontendPortRangeStart = 1234, + frontendPortRangeEnd = 1234, + networkSecurityGroupRules = new object[] + { + new + { + priority = 1234, + access = "allow", + sourceAddressPrefix = "", + sourcePortRanges = new object[] + { + "" + }, + } + }, + } + }, + }, + publicIPAddressConfiguration = new + { + provision = "batchmanaged", + ipAddressIds = new object[] + { + "" + }, + }, + enableAcceleratedNetworking = true, + }, + startTask = new + { + commandLine = "", + resourceFiles = new object[] + { + null + }, + environmentSettings = new object[] + { + null + }, + maxTaskRetryCount = 1234, + waitForSuccess = true, + }, + applicationPackageReferences = new object[] + { + null + }, + userAccounts = new object[] + { + new + { + name = "", + password = "", + elevationLevel = "nonadmin", + linuxUserConfiguration = new + { + uid = 1234, + gid = 1234, + sshPrivateKey = "", + }, + windowsUserConfiguration = new + { + loginMode = "batch", + }, + } + }, + metadata = new object[] + { + new + { + name = "", + value = "", + } + }, + mountConfiguration = new object[] + { + new + { + azureBlobFileSystemConfiguration = new + { + accountName = "", + containerName = "", + accountKey = "", + sasKey = "", + blobfuseOptions = "", + relativeMountPath = "", + }, + nfsMountConfiguration = new + { + source = "", + relativeMountPath = "", + mountOptions = "", + }, + cifsMountConfiguration = new + { + username = "", + source = "", + relativeMountPath = "", + mountOptions = "", + password = "", + }, + azureFileShareConfiguration = new + { + accountName = "", + azureFileUrl = "", + accountKey = "", + relativeMountPath = "", + mountOptions = "", + }, + } + }, + targetNodeCommunicationMode = "default", + upgradePolicy = new + { + mode = "automatic", + automaticOSUpgradePolicy = new + { + disableAutomaticRollback = true, + enableAutomaticOSUpgrade = true, + useRollingUpgradePolicy = true, + osRollingUpgradeDeferral = true, + }, + rollingUpgradePolicy = new + { + enableCrossZoneUpgrade = true, + maxBatchInstancePercent = 1234, + maxUnhealthyInstancePercent = 1234, + maxUnhealthyUpgradedInstancePercent = 1234, + pauseTimeBetweenBatches = "PT1H23M45S", + prioritizeUnhealthyInstances = true, + rollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, + }, + metadata = new object[] + { + null + }, + }, + metadata = new object[] + { + null + }, +}); +Response response = client.ReplaceJobSchedule("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DisableJobScheduleAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.DisableJobScheduleAsync(""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DisableJobScheduleAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.DisableJobScheduleAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DisableJobSchedule. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.DisableJobSchedule(""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DisableJobSchedule with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.DisableJobSchedule("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call EnableJobScheduleAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.EnableJobScheduleAsync(""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call EnableJobScheduleAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.EnableJobScheduleAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call EnableJobSchedule. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.EnableJobSchedule(""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call EnableJobSchedule with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.EnableJobSchedule("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call TerminateJobScheduleAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.TerminateJobScheduleAsync(""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call TerminateJobScheduleAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.TerminateJobScheduleAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call TerminateJobSchedule. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.TerminateJobSchedule(""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call TerminateJobSchedule with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.TerminateJobSchedule("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call CreateJobScheduleAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchJobScheduleCreateContent jobSchedule = new BatchJobScheduleCreateContent("", new BatchJobScheduleConfiguration(), new BatchJobSpecification(new BatchPoolInfo())); +Response response = await client.CreateJobScheduleAsync(jobSchedule); +]]> +This sample shows how to call CreateJobScheduleAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchJobScheduleCreateContent jobSchedule = new BatchJobScheduleCreateContent("", new BatchJobScheduleConfiguration +{ + DoNotRunUntil = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + DoNotRunAfter = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + StartWindow = XmlConvert.ToTimeSpan("PT1H23M45S"), + RecurrenceInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), +}, new BatchJobSpecification(new BatchPoolInfo +{ + PoolId = "", + AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.JobSchedule) + { + AutoPoolIdPrefix = "", + KeepAlive = true, + Pool = new BatchPoolSpecification("") + { + DisplayName = "", + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "", + Offer = "", + Sku = "", + Version = "", + VirtualMachineImageId = "", + }, "") + { + WindowsConfiguration = new WindowsConfiguration + { + EnableAutomaticUpdates = true, + }, + DataDisks = {new DataDisk(1234, 1234) + { + Caching = CachingType.None, + StorageAccountType = StorageAccountType.StandardLRS, + }}, + LicenseType = "", + ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) + { + ContainerImageNames = { "" }, + ContainerRegistries = { default }, + }, + DiskEncryptionConfiguration = new DiskEncryptionConfiguration + { + Targets = { DiskEncryptionTarget.OsDisk }, + }, + NodePlacementConfiguration = new BatchNodePlacementConfiguration + { + Policy = BatchNodePlacementPolicyType.Regional, + }, + Extensions = {new VMExtension("", "", "") + { + TypeHandlerVersion = "", + AutoUpgradeMinorVersion = true, + EnableAutomaticUpgrade = true, + Settings = + { + ["key"] = "" + }, + ProtectedSettings = + { + ["key"] = "" + }, + ProvisionAfterExtensions = {""}, + }}, + OsDisk = new OSDisk + { + EphemeralOSDiskSettings = new DiffDiskSettings + { + Placement = DiffDiskPlacement.CacheDisk, + }, + Caching = CachingType.None, + DiskSizeGB = 1234, + ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), + WriteAcceleratorEnabled = true, + }, + SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings + { + SecureBootEnabled = true, + VTpmEnabled = true, + }), + ServiceArtifactReference = new ServiceArtifactReference(""), + }, + TaskSlotsPerNode = 1234, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), + ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), + ResourceTags = "", + TargetDedicatedNodes = 1234, + TargetLowPriorityNodes = 1234, + EnableAutoScale = true, + AutoScaleFormula = "", + AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), + EnableInterNodeCommunication = true, + NetworkConfiguration = new NetworkConfiguration + { + SubnetId = "", + DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, + EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] + { + new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) + { + NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") + { + SourcePortRanges = {""}, + }}, + } + }), + PublicIpAddressConfiguration = new PublicIpAddressConfiguration + { + IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, + IpAddressIds = { "" }, + }, + EnableAcceleratedNetworking = true, + }, + StartTask = new BatchStartTask("") + { + ContainerSettings = default, + ResourceFiles = { default }, + EnvironmentSettings = { default }, + UserIdentity = default, + MaxTaskRetryCount = 1234, + WaitForSuccess = true, + }, + ApplicationPackageReferences = { default }, + UserAccounts = {new UserAccount("", "") + { + ElevationLevel = ElevationLevel.NonAdmin, + LinuxUserConfiguration = new LinuxUserConfiguration + { + Uid = 1234, + Gid = 1234, + SshPrivateKey = "", + }, + WindowsUserConfiguration = new WindowsUserConfiguration + { + LoginMode = LoginMode.Batch, + }, + }}, + Metadata = { new MetadataItem("", "") }, + MountConfiguration = {new MountConfiguration + { + AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") + { + AccountKey = "", + SasKey = "", + BlobfuseOptions = "", + IdentityReference = default, + }, + NfsMountConfiguration = new NfsMountConfiguration("", "") + { + MountOptions = "", + }, + CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") + { + MountOptions = "", + }, + AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") + { + MountOptions = "", + }, + }}, + TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, + UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) + { + AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy + { + DisableAutomaticRollback = true, + EnableAutomaticOsUpgrade = true, + UseRollingUpgradePolicy = true, + OsRollingUpgradeDeferral = true, + }, + RollingUpgradePolicy = new RollingUpgradePolicy + { + EnableCrossZoneUpgrade = true, + MaxBatchInstancePercent = 1234, + MaxUnhealthyInstancePercent = 1234, + MaxUnhealthyUpgradedInstancePercent = 1234, + PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), + PrioritizeUnhealthyInstances = true, + RollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, +}) +{ + Priority = 1234, + AllowTaskPreemption = true, + MaxParallelTasks = 1234, + DisplayName = "", + UsesTaskDependencies = true, + OnAllTasksComplete = OnAllBatchTasksComplete.NoAction, + OnTaskFailure = OnBatchTaskFailure.NoAction, + NetworkConfiguration = new BatchJobNetworkConfiguration(""), + Constraints = new BatchJobConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, + JobManagerTask = new BatchJobManagerTask("", "") + { + DisplayName = "", + ContainerSettings = new BatchTaskContainerSettings("") + { + ContainerRunOptions = "", + Registry = new ContainerRegistryReference + { + Username = "", + Password = "", + RegistryServer = "", + IdentityReference = new BatchNodeIdentityReference + { + ResourceId = "", + }, + }, + WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, + }, + ResourceFiles = {new ResourceFile + { + AutoStorageContainerName = "", + StorageContainerUrl = "", + HttpUrl = "", + BlobPrefix = "", + FilePath = "", + FileMode = "", + IdentityReference = default, + }}, + OutputFiles = {new OutputFile("", new OutputFileDestination + { + Container = new OutputFileBlobContainerDestination("") + { + Path = "", + IdentityReference = default, + UploadHeaders = {new HttpHeader("") + { + Value = "", + }}, + }, + }, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, + EnvironmentSettings = {new EnvironmentSetting("") + { + Value = "", + }}, + Constraints = new BatchTaskConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, + RequiredSlots = 1234, + KillJobOnCompletion = true, + UserIdentity = new UserIdentity + { + Username = "", + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + RunExclusive = true, + ApplicationPackageReferences = {new BatchApplicationPackageReference("") + { + Version = "", + }}, + AuthenticationTokenSettings = new AuthenticationTokenSettings + { + Access = { AccessScope.Job }, + }, + AllowLowPriorityNode = true, + }, + JobPreparationTask = new BatchJobPreparationTask("") + { + Id = "", + ContainerSettings = default, + ResourceFiles = { default }, + EnvironmentSettings = { default }, + Constraints = default, + WaitForSuccess = true, + UserIdentity = default, + RerunOnNodeRebootAfterSuccess = true, + }, + JobReleaseTask = new BatchJobReleaseTask("") + { + Id = "", + ContainerSettings = default, + ResourceFiles = { default }, + EnvironmentSettings = { default }, + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + UserIdentity = default, + }, + CommonEnvironmentSettings = { default }, + Metadata = { default }, +}) +{ + DisplayName = "", + Metadata = { default }, +}; +Response response = await client.CreateJobScheduleAsync(jobSchedule, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +]]> + + + +This sample shows how to call CreateJobSchedule. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchJobScheduleCreateContent jobSchedule = new BatchJobScheduleCreateContent("", new BatchJobScheduleConfiguration(), new BatchJobSpecification(new BatchPoolInfo())); +Response response = client.CreateJobSchedule(jobSchedule); +]]> +This sample shows how to call CreateJobSchedule with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchJobScheduleCreateContent jobSchedule = new BatchJobScheduleCreateContent("", new BatchJobScheduleConfiguration +{ + DoNotRunUntil = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + DoNotRunAfter = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + StartWindow = XmlConvert.ToTimeSpan("PT1H23M45S"), + RecurrenceInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), +}, new BatchJobSpecification(new BatchPoolInfo +{ + PoolId = "", + AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.JobSchedule) + { + AutoPoolIdPrefix = "", + KeepAlive = true, + Pool = new BatchPoolSpecification("") + { + DisplayName = "", + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "", + Offer = "", + Sku = "", + Version = "", + VirtualMachineImageId = "", + }, "") + { + WindowsConfiguration = new WindowsConfiguration + { + EnableAutomaticUpdates = true, + }, + DataDisks = {new DataDisk(1234, 1234) + { + Caching = CachingType.None, + StorageAccountType = StorageAccountType.StandardLRS, + }}, + LicenseType = "", + ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) + { + ContainerImageNames = { "" }, + ContainerRegistries = { default }, + }, + DiskEncryptionConfiguration = new DiskEncryptionConfiguration + { + Targets = { DiskEncryptionTarget.OsDisk }, + }, + NodePlacementConfiguration = new BatchNodePlacementConfiguration + { + Policy = BatchNodePlacementPolicyType.Regional, + }, + Extensions = {new VMExtension("", "", "") + { + TypeHandlerVersion = "", + AutoUpgradeMinorVersion = true, + EnableAutomaticUpgrade = true, + Settings = + { + ["key"] = "" + }, + ProtectedSettings = + { + ["key"] = "" + }, + ProvisionAfterExtensions = {""}, + }}, + OsDisk = new OSDisk + { + EphemeralOSDiskSettings = new DiffDiskSettings + { + Placement = DiffDiskPlacement.CacheDisk, + }, + Caching = CachingType.None, + DiskSizeGB = 1234, + ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), + WriteAcceleratorEnabled = true, + }, + SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings + { + SecureBootEnabled = true, + VTpmEnabled = true, + }), + ServiceArtifactReference = new ServiceArtifactReference(""), + }, + TaskSlotsPerNode = 1234, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), + ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), + ResourceTags = "", + TargetDedicatedNodes = 1234, + TargetLowPriorityNodes = 1234, + EnableAutoScale = true, + AutoScaleFormula = "", + AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), + EnableInterNodeCommunication = true, + NetworkConfiguration = new NetworkConfiguration + { + SubnetId = "", + DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, + EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] + { + new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) + { + NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") + { + SourcePortRanges = {""}, + }}, + } + }), + PublicIpAddressConfiguration = new PublicIpAddressConfiguration + { + IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, + IpAddressIds = { "" }, + }, + EnableAcceleratedNetworking = true, + }, + StartTask = new BatchStartTask("") + { + ContainerSettings = default, + ResourceFiles = { default }, + EnvironmentSettings = { default }, + UserIdentity = default, + MaxTaskRetryCount = 1234, + WaitForSuccess = true, + }, + ApplicationPackageReferences = { default }, + UserAccounts = {new UserAccount("", "") + { + ElevationLevel = ElevationLevel.NonAdmin, + LinuxUserConfiguration = new LinuxUserConfiguration + { + Uid = 1234, + Gid = 1234, + SshPrivateKey = "", + }, + WindowsUserConfiguration = new WindowsUserConfiguration + { + LoginMode = LoginMode.Batch, + }, + }}, + Metadata = { new MetadataItem("", "") }, + MountConfiguration = {new MountConfiguration + { + AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") + { + AccountKey = "", + SasKey = "", + BlobfuseOptions = "", + IdentityReference = default, + }, + NfsMountConfiguration = new NfsMountConfiguration("", "") + { + MountOptions = "", + }, + CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") + { + MountOptions = "", + }, + AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") + { + MountOptions = "", + }, + }}, + TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, + UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) + { + AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy + { + DisableAutomaticRollback = true, + EnableAutomaticOsUpgrade = true, + UseRollingUpgradePolicy = true, + OsRollingUpgradeDeferral = true, + }, + RollingUpgradePolicy = new RollingUpgradePolicy + { + EnableCrossZoneUpgrade = true, + MaxBatchInstancePercent = 1234, + MaxUnhealthyInstancePercent = 1234, + MaxUnhealthyUpgradedInstancePercent = 1234, + PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), + PrioritizeUnhealthyInstances = true, + RollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, +}) +{ + Priority = 1234, + AllowTaskPreemption = true, + MaxParallelTasks = 1234, + DisplayName = "", + UsesTaskDependencies = true, + OnAllTasksComplete = OnAllBatchTasksComplete.NoAction, + OnTaskFailure = OnBatchTaskFailure.NoAction, + NetworkConfiguration = new BatchJobNetworkConfiguration(""), + Constraints = new BatchJobConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, + JobManagerTask = new BatchJobManagerTask("", "") + { + DisplayName = "", + ContainerSettings = new BatchTaskContainerSettings("") + { + ContainerRunOptions = "", + Registry = new ContainerRegistryReference + { + Username = "", + Password = "", + RegistryServer = "", + IdentityReference = new BatchNodeIdentityReference + { + ResourceId = "", + }, + }, + WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, + }, + ResourceFiles = {new ResourceFile + { + AutoStorageContainerName = "", + StorageContainerUrl = "", + HttpUrl = "", + BlobPrefix = "", + FilePath = "", + FileMode = "", + IdentityReference = default, + }}, + OutputFiles = {new OutputFile("", new OutputFileDestination + { + Container = new OutputFileBlobContainerDestination("") + { + Path = "", + IdentityReference = default, + UploadHeaders = {new HttpHeader("") + { + Value = "", + }}, + }, + }, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, + EnvironmentSettings = {new EnvironmentSetting("") + { + Value = "", + }}, + Constraints = new BatchTaskConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, + RequiredSlots = 1234, + KillJobOnCompletion = true, + UserIdentity = new UserIdentity + { + Username = "", + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + RunExclusive = true, + ApplicationPackageReferences = {new BatchApplicationPackageReference("") + { + Version = "", + }}, + AuthenticationTokenSettings = new AuthenticationTokenSettings + { + Access = { AccessScope.Job }, + }, + AllowLowPriorityNode = true, + }, + JobPreparationTask = new BatchJobPreparationTask("") + { + Id = "", + ContainerSettings = default, + ResourceFiles = { default }, + EnvironmentSettings = { default }, + Constraints = default, + WaitForSuccess = true, + UserIdentity = default, + RerunOnNodeRebootAfterSuccess = true, + }, + JobReleaseTask = new BatchJobReleaseTask("") + { + Id = "", + ContainerSettings = default, + ResourceFiles = { default }, + EnvironmentSettings = { default }, + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + UserIdentity = default, + }, + CommonEnvironmentSettings = { default }, + Metadata = { default }, +}) +{ + DisplayName = "", + Metadata = { default }, +}; +Response response = client.CreateJobSchedule(jobSchedule, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +]]> + + + +This sample shows how to call CreateJobScheduleAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + id = "", + schedule = new object(), + jobSpecification = new + { + poolInfo = new object(), + }, +}); +Response response = await client.CreateJobScheduleAsync(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call CreateJobScheduleAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + id = "", + displayName = "", + schedule = new + { + doNotRunUntil = "2022-05-10T18:57:31.2311892Z", + doNotRunAfter = "2022-05-10T18:57:31.2311892Z", + startWindow = "PT1H23M45S", + recurrenceInterval = "PT1H23M45S", + }, + jobSpecification = new + { + priority = 1234, + allowTaskPreemption = true, + maxParallelTasks = 1234, + displayName = "", + usesTaskDependencies = true, + onAllTasksComplete = "noaction", + onTaskFailure = "noaction", + networkConfiguration = new + { + subnetId = "", + }, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + jobManagerTask = new + { + id = "", + displayName = "", + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + registry = new + { + username = "", + password = "", + registryServer = "", + identityReference = new + { + resourceId = "", + }, + }, + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { + new + { + autoStorageContainerName = "", + storageContainerUrl = "", + httpUrl = "", + blobPrefix = "", + filePath = "", + fileMode = "", + } + }, + outputFiles = new object[] + { + new + { + filePattern = "", + destination = new + { + container = new + { + path = "", + containerUrl = "", + uploadHeaders = new object[] + { + new + { + name = "", + value = "", + } + }, + }, + }, + uploadOptions = new + { + uploadCondition = "tasksuccess", + }, + } + }, + environmentSettings = new object[] + { + new + { + name = "", + value = "", + } + }, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + requiredSlots = 1234, + killJobOnCompletion = true, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + runExclusive = true, + applicationPackageReferences = new object[] + { + new + { + applicationId = "", + version = "", + } + }, + authenticationTokenSettings = new + { + access = new object[] + { + "job" + }, + }, + allowLowPriorityNode = true, + }, + jobPreparationTask = new + { + id = "", + commandLine = "", + resourceFiles = new object[] + { + null + }, + environmentSettings = new object[] + { + null + }, + waitForSuccess = true, + rerunOnNodeRebootAfterSuccess = true, + }, + jobReleaseTask = new + { + id = "", + commandLine = "", + resourceFiles = new object[] + { + null + }, + environmentSettings = new object[] + { + null + }, + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + }, + commonEnvironmentSettings = new object[] + { + null + }, + poolInfo = new + { + poolId = "", + autoPoolSpecification = new + { + autoPoolIdPrefix = "", + poolLifetimeOption = "jobschedule", + keepAlive = true, + pool = new + { + displayName = "", + vmSize = "", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "", + offer = "", + sku = "", + version = "", + virtualMachineImageId = "", + }, + nodeAgentSKUId = "", + windowsConfiguration = new + { + enableAutomaticUpdates = true, + }, + dataDisks = new object[] + { + new + { + lun = 1234, + caching = "none", + diskSizeGB = 1234, + storageAccountType = "standard_lrs", + } + }, + licenseType = "", + containerConfiguration = new + { + type = "dockerCompatible", + containerImageNames = new object[] + { + "" + }, + containerRegistries = new object[] + { + null + }, + }, + diskEncryptionConfiguration = new + { + targets = new object[] + { + "osdisk" + }, + }, + nodePlacementConfiguration = new + { + policy = "regional", + }, + extensions = new object[] + { + new + { + name = "", + publisher = "", + type = "", + typeHandlerVersion = "", + autoUpgradeMinorVersion = true, + enableAutomaticUpgrade = true, + settings = new + { + key = "", + }, + protectedSettings = new + { + key = "", + }, + provisionAfterExtensions = new object[] + { + "" + }, + } + }, + osDisk = new + { + ephemeralOSDiskSettings = new + { + placement = "cachedisk", + }, + caching = "none", + diskSizeGB = 1234, + managedDisk = new + { + storageAccountType = "standard_lrs", + }, + writeAcceleratorEnabled = true, + }, + securityProfile = new + { + encryptionAtHost = true, + securityType = "trustedLaunch", + uefiSettings = new + { + secureBootEnabled = true, + vTpmEnabled = true, + }, + }, + serviceArtifactReference = new + { + id = "", + }, + }, + taskSlotsPerNode = 1234, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + resizeTimeout = "PT1H23M45S", + resourceTags = "", + targetDedicatedNodes = 1234, + targetLowPriorityNodes = 1234, + enableAutoScale = true, + autoScaleFormula = "", + autoScaleEvaluationInterval = "PT1H23M45S", + enableInterNodeCommunication = true, + networkConfiguration = new + { + subnetId = "", + dynamicVNetAssignmentScope = "none", + endpointConfiguration = new + { + inboundNATPools = new object[] + { + new + { + name = "", + protocol = "tcp", + backendPort = 1234, + frontendPortRangeStart = 1234, + frontendPortRangeEnd = 1234, + networkSecurityGroupRules = new object[] + { + new + { + priority = 1234, + access = "allow", + sourceAddressPrefix = "", + sourcePortRanges = new object[] + { + "" + }, + } + }, + } + }, + }, + publicIPAddressConfiguration = new + { + provision = "batchmanaged", + ipAddressIds = new object[] + { + "" + }, + }, + enableAcceleratedNetworking = true, + }, + startTask = new + { + commandLine = "", + resourceFiles = new object[] + { + null + }, + environmentSettings = new object[] + { + null + }, + maxTaskRetryCount = 1234, + waitForSuccess = true, + }, + applicationPackageReferences = new object[] + { + null + }, + userAccounts = new object[] + { + new + { + name = "", + password = "", + elevationLevel = "nonadmin", + linuxUserConfiguration = new + { + uid = 1234, + gid = 1234, + sshPrivateKey = "", + }, + windowsUserConfiguration = new + { + loginMode = "batch", + }, + } + }, + metadata = new object[] + { + new + { + name = "", + value = "", + } + }, + mountConfiguration = new object[] + { + new + { + azureBlobFileSystemConfiguration = new + { + accountName = "", + containerName = "", + accountKey = "", + sasKey = "", + blobfuseOptions = "", + relativeMountPath = "", + }, + nfsMountConfiguration = new + { + source = "", + relativeMountPath = "", + mountOptions = "", + }, + cifsMountConfiguration = new + { + username = "", + source = "", + relativeMountPath = "", + mountOptions = "", + password = "", + }, + azureFileShareConfiguration = new + { + accountName = "", + azureFileUrl = "", + accountKey = "", + relativeMountPath = "", + mountOptions = "", + }, + } + }, + targetNodeCommunicationMode = "default", + upgradePolicy = new + { + mode = "automatic", + automaticOSUpgradePolicy = new + { + disableAutomaticRollback = true, + enableAutomaticOSUpgrade = true, + useRollingUpgradePolicy = true, + osRollingUpgradeDeferral = true, + }, + rollingUpgradePolicy = new + { + enableCrossZoneUpgrade = true, + maxBatchInstancePercent = 1234, + maxUnhealthyInstancePercent = 1234, + maxUnhealthyUpgradedInstancePercent = 1234, + pauseTimeBetweenBatches = "PT1H23M45S", + prioritizeUnhealthyInstances = true, + rollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, + }, + metadata = new object[] + { + null + }, + }, + metadata = new object[] + { + null + }, +}); +Response response = await client.CreateJobScheduleAsync(content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call CreateJobSchedule. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + id = "", + schedule = new object(), + jobSpecification = new + { + poolInfo = new object(), + }, +}); +Response response = client.CreateJobSchedule(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call CreateJobSchedule with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + id = "", + displayName = "", + schedule = new + { + doNotRunUntil = "2022-05-10T18:57:31.2311892Z", + doNotRunAfter = "2022-05-10T18:57:31.2311892Z", + startWindow = "PT1H23M45S", + recurrenceInterval = "PT1H23M45S", + }, + jobSpecification = new + { + priority = 1234, + allowTaskPreemption = true, + maxParallelTasks = 1234, + displayName = "", + usesTaskDependencies = true, + onAllTasksComplete = "noaction", + onTaskFailure = "noaction", + networkConfiguration = new + { + subnetId = "", + }, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + jobManagerTask = new + { + id = "", + displayName = "", + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + registry = new + { + username = "", + password = "", + registryServer = "", + identityReference = new + { + resourceId = "", + }, + }, + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { + new + { + autoStorageContainerName = "", + storageContainerUrl = "", + httpUrl = "", + blobPrefix = "", + filePath = "", + fileMode = "", + } + }, + outputFiles = new object[] + { + new + { + filePattern = "", + destination = new + { + container = new + { + path = "", + containerUrl = "", + uploadHeaders = new object[] + { + new + { + name = "", + value = "", + } + }, + }, + }, + uploadOptions = new + { + uploadCondition = "tasksuccess", + }, + } + }, + environmentSettings = new object[] + { + new + { + name = "", + value = "", + } + }, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + requiredSlots = 1234, + killJobOnCompletion = true, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + runExclusive = true, + applicationPackageReferences = new object[] + { + new + { + applicationId = "", + version = "", + } + }, + authenticationTokenSettings = new + { + access = new object[] + { + "job" + }, + }, + allowLowPriorityNode = true, + }, + jobPreparationTask = new + { + id = "", + commandLine = "", + resourceFiles = new object[] + { + null + }, + environmentSettings = new object[] + { + null + }, + waitForSuccess = true, + rerunOnNodeRebootAfterSuccess = true, + }, + jobReleaseTask = new + { + id = "", + commandLine = "", + resourceFiles = new object[] + { + null + }, + environmentSettings = new object[] + { + null + }, + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + }, + commonEnvironmentSettings = new object[] + { + null + }, + poolInfo = new + { + poolId = "", + autoPoolSpecification = new + { + autoPoolIdPrefix = "", + poolLifetimeOption = "jobschedule", + keepAlive = true, + pool = new + { + displayName = "", + vmSize = "", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "", + offer = "", + sku = "", + version = "", + virtualMachineImageId = "", + }, + nodeAgentSKUId = "", + windowsConfiguration = new + { + enableAutomaticUpdates = true, + }, + dataDisks = new object[] + { + new + { + lun = 1234, + caching = "none", + diskSizeGB = 1234, + storageAccountType = "standard_lrs", + } + }, + licenseType = "", + containerConfiguration = new + { + type = "dockerCompatible", + containerImageNames = new object[] + { + "" + }, + containerRegistries = new object[] + { + null + }, + }, + diskEncryptionConfiguration = new + { + targets = new object[] + { + "osdisk" + }, + }, + nodePlacementConfiguration = new + { + policy = "regional", + }, + extensions = new object[] + { + new + { + name = "", + publisher = "", + type = "", + typeHandlerVersion = "", + autoUpgradeMinorVersion = true, + enableAutomaticUpgrade = true, + settings = new + { + key = "", + }, + protectedSettings = new + { + key = "", + }, + provisionAfterExtensions = new object[] + { + "" + }, + } + }, + osDisk = new + { + ephemeralOSDiskSettings = new + { + placement = "cachedisk", + }, + caching = "none", + diskSizeGB = 1234, + managedDisk = new + { + storageAccountType = "standard_lrs", + }, + writeAcceleratorEnabled = true, + }, + securityProfile = new + { + encryptionAtHost = true, + securityType = "trustedLaunch", + uefiSettings = new + { + secureBootEnabled = true, + vTpmEnabled = true, + }, + }, + serviceArtifactReference = new + { + id = "", + }, + }, + taskSlotsPerNode = 1234, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + resizeTimeout = "PT1H23M45S", + resourceTags = "", + targetDedicatedNodes = 1234, + targetLowPriorityNodes = 1234, + enableAutoScale = true, + autoScaleFormula = "", + autoScaleEvaluationInterval = "PT1H23M45S", + enableInterNodeCommunication = true, + networkConfiguration = new + { + subnetId = "", + dynamicVNetAssignmentScope = "none", + endpointConfiguration = new + { + inboundNATPools = new object[] + { + new + { + name = "", + protocol = "tcp", + backendPort = 1234, + frontendPortRangeStart = 1234, + frontendPortRangeEnd = 1234, + networkSecurityGroupRules = new object[] + { + new + { + priority = 1234, + access = "allow", + sourceAddressPrefix = "", + sourcePortRanges = new object[] + { + "" + }, + } + }, + } + }, + }, + publicIPAddressConfiguration = new + { + provision = "batchmanaged", + ipAddressIds = new object[] + { + "" + }, + }, + enableAcceleratedNetworking = true, + }, + startTask = new + { + commandLine = "", + resourceFiles = new object[] + { + null + }, + environmentSettings = new object[] + { + null + }, + maxTaskRetryCount = 1234, + waitForSuccess = true, + }, + applicationPackageReferences = new object[] + { + null + }, + userAccounts = new object[] + { + new + { + name = "", + password = "", + elevationLevel = "nonadmin", + linuxUserConfiguration = new + { + uid = 1234, + gid = 1234, + sshPrivateKey = "", + }, + windowsUserConfiguration = new + { + loginMode = "batch", + }, + } + }, + metadata = new object[] + { + new + { + name = "", + value = "", + } + }, + mountConfiguration = new object[] + { + new + { + azureBlobFileSystemConfiguration = new + { + accountName = "", + containerName = "", + accountKey = "", + sasKey = "", + blobfuseOptions = "", + relativeMountPath = "", + }, + nfsMountConfiguration = new + { + source = "", + relativeMountPath = "", + mountOptions = "", + }, + cifsMountConfiguration = new + { + username = "", + source = "", + relativeMountPath = "", + mountOptions = "", + password = "", + }, + azureFileShareConfiguration = new + { + accountName = "", + azureFileUrl = "", + accountKey = "", + relativeMountPath = "", + mountOptions = "", + }, + } + }, + targetNodeCommunicationMode = "default", + upgradePolicy = new + { + mode = "automatic", + automaticOSUpgradePolicy = new + { + disableAutomaticRollback = true, + enableAutomaticOSUpgrade = true, + useRollingUpgradePolicy = true, + osRollingUpgradeDeferral = true, + }, + rollingUpgradePolicy = new + { + enableCrossZoneUpgrade = true, + maxBatchInstancePercent = 1234, + maxUnhealthyInstancePercent = 1234, + maxUnhealthyUpgradedInstancePercent = 1234, + pauseTimeBetweenBatches = "PT1H23M45S", + prioritizeUnhealthyInstances = true, + rollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, + }, + metadata = new object[] + { + null + }, + }, + metadata = new object[] + { + null + }, +}); +Response response = client.CreateJobSchedule(content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call CreateTaskAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchTaskCreateContent task = new BatchTaskCreateContent("", ""); +Response response = await client.CreateTaskAsync("", task); +]]> +This sample shows how to call CreateTaskAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchTaskCreateContent task = new BatchTaskCreateContent("", "") +{ + DisplayName = "", + ExitConditions = new ExitConditions + { + ExitCodes = {new ExitCodeMapping(1234, new ExitOptions + { + JobAction = BatchJobAction.None, + DependencyAction = DependencyAction.Satisfy, + })}, + ExitCodeRanges = { new ExitCodeRangeMapping(1234, 1234, default) }, + PreProcessingError = default, + FileUploadError = default, + Default = default, + }, + ContainerSettings = new BatchTaskContainerSettings("") + { + ContainerRunOptions = "", + Registry = new ContainerRegistryReference + { + Username = "", + Password = "", + RegistryServer = "", + IdentityReference = new BatchNodeIdentityReference + { + ResourceId = "", + }, + }, + WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, + }, + ResourceFiles = {new ResourceFile + { + AutoStorageContainerName = "", + StorageContainerUrl = "", + HttpUrl = "", + BlobPrefix = "", + FilePath = "", + FileMode = "", + IdentityReference = default, + }}, + OutputFiles = {new OutputFile("", new OutputFileDestination + { + Container = new OutputFileBlobContainerDestination("") + { + Path = "", + IdentityReference = default, + UploadHeaders = {new HttpHeader("") + { + Value = "", + }}, + }, + }, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, + EnvironmentSettings = {new EnvironmentSetting("") + { + Value = "", + }}, + AffinityInfo = new AffinityInfo(""), + Constraints = new BatchTaskConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, + RequiredSlots = 1234, + UserIdentity = new UserIdentity + { + Username = "", + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + MultiInstanceSettings = new MultiInstanceSettings("") + { + NumberOfInstances = 1234, + CommonResourceFiles = { default }, + }, + DependsOn = new BatchTaskDependencies + { + TaskIds = { "" }, + TaskIdRanges = { new BatchTaskIdRange(1234, 1234) }, + }, + ApplicationPackageReferences = {new BatchApplicationPackageReference("") + { + Version = "", + }}, + AuthenticationTokenSettings = new AuthenticationTokenSettings + { + Access = { AccessScope.Job }, + }, +}; +Response response = await client.CreateTaskAsync("", task, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +]]> + + + +This sample shows how to call CreateTask. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchTaskCreateContent task = new BatchTaskCreateContent("", ""); +Response response = client.CreateTask("", task); +]]> +This sample shows how to call CreateTask with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchTaskCreateContent task = new BatchTaskCreateContent("", "") +{ + DisplayName = "", + ExitConditions = new ExitConditions + { + ExitCodes = {new ExitCodeMapping(1234, new ExitOptions + { + JobAction = BatchJobAction.None, + DependencyAction = DependencyAction.Satisfy, + })}, + ExitCodeRanges = { new ExitCodeRangeMapping(1234, 1234, default) }, + PreProcessingError = default, + FileUploadError = default, + Default = default, + }, + ContainerSettings = new BatchTaskContainerSettings("") + { + ContainerRunOptions = "", + Registry = new ContainerRegistryReference + { + Username = "", + Password = "", + RegistryServer = "", + IdentityReference = new BatchNodeIdentityReference + { + ResourceId = "", + }, + }, + WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, + }, + ResourceFiles = {new ResourceFile + { + AutoStorageContainerName = "", + StorageContainerUrl = "", + HttpUrl = "", + BlobPrefix = "", + FilePath = "", + FileMode = "", + IdentityReference = default, + }}, + OutputFiles = {new OutputFile("", new OutputFileDestination + { + Container = new OutputFileBlobContainerDestination("") + { + Path = "", + IdentityReference = default, + UploadHeaders = {new HttpHeader("") + { + Value = "", + }}, + }, + }, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, + EnvironmentSettings = {new EnvironmentSetting("") + { + Value = "", + }}, + AffinityInfo = new AffinityInfo(""), + Constraints = new BatchTaskConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, + RequiredSlots = 1234, + UserIdentity = new UserIdentity + { + Username = "", + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + MultiInstanceSettings = new MultiInstanceSettings("") + { + NumberOfInstances = 1234, + CommonResourceFiles = { default }, + }, + DependsOn = new BatchTaskDependencies + { + TaskIds = { "" }, + TaskIdRanges = { new BatchTaskIdRange(1234, 1234) }, + }, + ApplicationPackageReferences = {new BatchApplicationPackageReference("") + { + Version = "", + }}, + AuthenticationTokenSettings = new AuthenticationTokenSettings + { + Access = { AccessScope.Job }, + }, +}; +Response response = client.CreateTask("", task, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +]]> + + + +This sample shows how to call CreateTaskAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + id = "", + commandLine = "", +}); +Response response = await client.CreateTaskAsync("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call CreateTaskAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + id = "", + displayName = "", + exitConditions = new Dictionary + { + ["exitCodes"] = new object[] + { + new + { + code = 1234, + exitOptions = new + { + jobAction = "none", + dependencyAction = "satisfy", + }, + } + }, + ["exitCodeRanges"] = new object[] + { + new + { + start = 1234, + end = 1234, + } + }, + ["preProcessingError"] = null, + ["fileUploadError"] = null, + ["default"] = null + }, + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + registry = new + { + username = "", + password = "", + registryServer = "", + identityReference = new + { + resourceId = "", + }, + }, + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { + new + { + autoStorageContainerName = "", + storageContainerUrl = "", + httpUrl = "", + blobPrefix = "", + filePath = "", + fileMode = "", + } + }, + outputFiles = new object[] + { + new + { + filePattern = "", + destination = new + { + container = new + { + path = "", + containerUrl = "", + uploadHeaders = new object[] + { + new + { + name = "", + value = "", + } + }, + }, + }, + uploadOptions = new + { + uploadCondition = "tasksuccess", + }, + } + }, + environmentSettings = new object[] + { + new + { + name = "", + value = "", + } + }, + affinityInfo = new + { + affinityId = "", + }, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + requiredSlots = 1234, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + multiInstanceSettings = new + { + numberOfInstances = 1234, + coordinationCommandLine = "", + commonResourceFiles = new object[] + { + null + }, + }, + dependsOn = new + { + taskIds = new object[] + { + "" + }, + taskIdRanges = new object[] + { + new + { + start = 1234, + end = 1234, + } + }, + }, + applicationPackageReferences = new object[] + { + new + { + applicationId = "", + version = "", + } + }, + authenticationTokenSettings = new + { + access = new object[] + { + "job" + }, + }, +}); +Response response = await client.CreateTaskAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call CreateTask. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + id = "", + commandLine = "", +}); +Response response = client.CreateTask("", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call CreateTask with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + id = "", + displayName = "", + exitConditions = new Dictionary + { + ["exitCodes"] = new object[] + { + new + { + code = 1234, + exitOptions = new + { + jobAction = "none", + dependencyAction = "satisfy", + }, + } + }, + ["exitCodeRanges"] = new object[] + { + new + { + start = 1234, + end = 1234, + } + }, + ["preProcessingError"] = null, + ["fileUploadError"] = null, + ["default"] = null + }, + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + registry = new + { + username = "", + password = "", + registryServer = "", + identityReference = new + { + resourceId = "", + }, + }, + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { + new + { + autoStorageContainerName = "", + storageContainerUrl = "", + httpUrl = "", + blobPrefix = "", + filePath = "", + fileMode = "", + } + }, + outputFiles = new object[] + { + new + { + filePattern = "", + destination = new + { + container = new + { + path = "", + containerUrl = "", + uploadHeaders = new object[] + { + new + { + name = "", + value = "", + } + }, + }, + }, + uploadOptions = new + { + uploadCondition = "tasksuccess", + }, + } + }, + environmentSettings = new object[] + { + new + { + name = "", + value = "", + } + }, + affinityInfo = new + { + affinityId = "", + }, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + requiredSlots = 1234, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + multiInstanceSettings = new + { + numberOfInstances = 1234, + coordinationCommandLine = "", + commonResourceFiles = new object[] + { + null + }, + }, + dependsOn = new + { + taskIds = new object[] + { + "" + }, + taskIdRanges = new object[] + { + new + { + start = 1234, + end = 1234, + } + }, + }, + applicationPackageReferences = new object[] + { + new + { + applicationId = "", + version = "", + } + }, + authenticationTokenSettings = new + { + access = new object[] + { + "job" + }, + }, +}); +Response response = client.CreateTask("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call CreateTaskCollectionAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchTaskGroup taskCollection = new BatchTaskGroup(new BatchTaskCreateContent[] +{ + new BatchTaskCreateContent("", "") +}); +Response response = await client.CreateTaskCollectionAsync("", taskCollection); +]]> +This sample shows how to call CreateTaskCollectionAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchTaskGroup taskCollection = new BatchTaskGroup(new BatchTaskCreateContent[] +{ + new BatchTaskCreateContent("", "") + { + DisplayName = "", + ExitConditions = new ExitConditions + { + ExitCodes = {new ExitCodeMapping(1234, new ExitOptions + { + JobAction = BatchJobAction.None, + DependencyAction = DependencyAction.Satisfy, + })}, + ExitCodeRanges = {new ExitCodeRangeMapping(1234, 1234, default)}, + PreProcessingError = default, + FileUploadError = default, + Default = default, + }, + ContainerSettings = new BatchTaskContainerSettings("") + { + ContainerRunOptions = "", + Registry = new ContainerRegistryReference + { + Username = "", + Password = "", + RegistryServer = "", + IdentityReference = new BatchNodeIdentityReference + { + ResourceId = "", + }, + }, + WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, + }, + ResourceFiles = {new ResourceFile + { + AutoStorageContainerName = "", + StorageContainerUrl = "", + HttpUrl = "", + BlobPrefix = "", + FilePath = "", + FileMode = "", + IdentityReference = default, + }}, + OutputFiles = {new OutputFile("", new OutputFileDestination + { + Container = new OutputFileBlobContainerDestination("") + { + Path = "", + IdentityReference = default, + UploadHeaders = {new HttpHeader("") + { + Value = "", + }}, + }, + }, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, + EnvironmentSettings = {new EnvironmentSetting("") + { + Value = "", + }}, + AffinityInfo = new AffinityInfo(""), + Constraints = new BatchTaskConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, + RequiredSlots = 1234, + UserIdentity = new UserIdentity + { + Username = "", + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + MultiInstanceSettings = new MultiInstanceSettings("") + { + NumberOfInstances = 1234, + CommonResourceFiles = {default}, + }, + DependsOn = new BatchTaskDependencies + { + TaskIds = {""}, + TaskIdRanges = {new BatchTaskIdRange(1234, 1234)}, + }, + ApplicationPackageReferences = {new BatchApplicationPackageReference("") + { + Version = "", + }}, + AuthenticationTokenSettings = new AuthenticationTokenSettings + { + Access = {AccessScope.Job}, + }, + } +}); +Response response = await client.CreateTaskCollectionAsync("", taskCollection, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +]]> + + + +This sample shows how to call CreateTaskCollection. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchTaskGroup taskCollection = new BatchTaskGroup(new BatchTaskCreateContent[] +{ + new BatchTaskCreateContent("", "") +}); +Response response = client.CreateTaskCollection("", taskCollection); +]]> +This sample shows how to call CreateTaskCollection with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchTaskGroup taskCollection = new BatchTaskGroup(new BatchTaskCreateContent[] +{ + new BatchTaskCreateContent("", "") + { + DisplayName = "", + ExitConditions = new ExitConditions + { + ExitCodes = {new ExitCodeMapping(1234, new ExitOptions + { + JobAction = BatchJobAction.None, + DependencyAction = DependencyAction.Satisfy, + })}, + ExitCodeRanges = {new ExitCodeRangeMapping(1234, 1234, default)}, + PreProcessingError = default, + FileUploadError = default, + Default = default, + }, + ContainerSettings = new BatchTaskContainerSettings("") + { + ContainerRunOptions = "", + Registry = new ContainerRegistryReference + { + Username = "", + Password = "", + RegistryServer = "", + IdentityReference = new BatchNodeIdentityReference + { + ResourceId = "", + }, + }, + WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, + }, + ResourceFiles = {new ResourceFile + { + AutoStorageContainerName = "", + StorageContainerUrl = "", + HttpUrl = "", + BlobPrefix = "", + FilePath = "", + FileMode = "", + IdentityReference = default, + }}, + OutputFiles = {new OutputFile("", new OutputFileDestination + { + Container = new OutputFileBlobContainerDestination("") + { + Path = "", + IdentityReference = default, + UploadHeaders = {new HttpHeader("") + { + Value = "", + }}, + }, + }, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, + EnvironmentSettings = {new EnvironmentSetting("") + { + Value = "", + }}, + AffinityInfo = new AffinityInfo(""), + Constraints = new BatchTaskConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, + RequiredSlots = 1234, + UserIdentity = new UserIdentity + { + Username = "", + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + MultiInstanceSettings = new MultiInstanceSettings("") + { + NumberOfInstances = 1234, + CommonResourceFiles = {default}, + }, + DependsOn = new BatchTaskDependencies + { + TaskIds = {""}, + TaskIdRanges = {new BatchTaskIdRange(1234, 1234)}, + }, + ApplicationPackageReferences = {new BatchApplicationPackageReference("") + { + Version = "", + }}, + AuthenticationTokenSettings = new AuthenticationTokenSettings + { + Access = {AccessScope.Job}, + }, + } +}); +Response response = client.CreateTaskCollection("", taskCollection, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +]]> + + + +This sample shows how to call CreateTaskCollectionAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + value = new object[] + { + new + { + id = "", + commandLine = "", + } + }, +}); +Response response = await client.CreateTaskCollectionAsync("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call CreateTaskCollectionAsync with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + value = new object[] + { + new + { + id = "", + displayName = "", + exitConditions = new Dictionary + { + ["exitCodes"] = new object[] + { + new + { + code = 1234, + exitOptions = new + { + jobAction = "none", + dependencyAction = "satisfy", + }, + } + }, + ["exitCodeRanges"] = new object[] + { + new + { + start = 1234, + end = 1234, + } + }, + ["preProcessingError"] = null, + ["fileUploadError"] = null, + ["default"] = null + }, + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + registry = new + { + username = "", + password = "", + registryServer = "", + identityReference = new + { + resourceId = "", + }, + }, + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { + new + { + autoStorageContainerName = "", + storageContainerUrl = "", + httpUrl = "", + blobPrefix = "", + filePath = "", + fileMode = "", + } + }, + outputFiles = new object[] + { + new + { + filePattern = "", + destination = new + { + container = new + { + path = "", + containerUrl = "", + uploadHeaders = new object[] + { + new + { + name = "", + value = "", + } + }, + }, + }, + uploadOptions = new + { + uploadCondition = "tasksuccess", + }, + } + }, + environmentSettings = new object[] + { + new + { + name = "", + value = "", + } + }, + affinityInfo = new + { + affinityId = "", + }, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + requiredSlots = 1234, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + multiInstanceSettings = new + { + numberOfInstances = 1234, + coordinationCommandLine = "", + commonResourceFiles = new object[] + { + null + }, + }, + dependsOn = new + { + taskIds = new object[] + { + "" + }, + taskIdRanges = new object[] + { + new + { + start = 1234, + end = 1234, + } + }, + }, + applicationPackageReferences = new object[] + { + new + { + applicationId = "", + version = "", + } + }, + authenticationTokenSettings = new + { + access = new object[] + { + "job" + }, + }, + } + }, +}); +Response response = await client.CreateTaskCollectionAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("taskId").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("eTag").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("lastModified").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("location").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("message").GetProperty("lang").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("message").GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("values")[0].GetProperty("key").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("values")[0].GetProperty("value").ToString()); +]]> + + + +This sample shows how to call CreateTaskCollection and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + value = new object[] + { + new + { + id = "", + commandLine = "", + } + }, +}); +Response response = client.CreateTaskCollection("", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call CreateTaskCollection with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + value = new object[] + { + new + { + id = "", + displayName = "", + exitConditions = new Dictionary + { + ["exitCodes"] = new object[] + { + new + { + code = 1234, + exitOptions = new + { + jobAction = "none", + dependencyAction = "satisfy", + }, + } + }, + ["exitCodeRanges"] = new object[] + { + new + { + start = 1234, + end = 1234, + } + }, + ["preProcessingError"] = null, + ["fileUploadError"] = null, + ["default"] = null + }, + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + registry = new + { + username = "", + password = "", + registryServer = "", + identityReference = new + { + resourceId = "", + }, + }, + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { + new + { + autoStorageContainerName = "", + storageContainerUrl = "", + httpUrl = "", + blobPrefix = "", + filePath = "", + fileMode = "", + } + }, + outputFiles = new object[] + { + new + { + filePattern = "", + destination = new + { + container = new + { + path = "", + containerUrl = "", + uploadHeaders = new object[] + { + new + { + name = "", + value = "", + } + }, + }, + }, + uploadOptions = new + { + uploadCondition = "tasksuccess", + }, + } + }, + environmentSettings = new object[] + { + new + { + name = "", + value = "", + } + }, + affinityInfo = new + { + affinityId = "", + }, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + requiredSlots = 1234, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + multiInstanceSettings = new + { + numberOfInstances = 1234, + coordinationCommandLine = "", + commonResourceFiles = new object[] + { + null + }, + }, + dependsOn = new + { + taskIds = new object[] + { + "" + }, + taskIdRanges = new object[] + { + new + { + start = 1234, + end = 1234, + } + }, + }, + applicationPackageReferences = new object[] + { + new + { + applicationId = "", + version = "", + } + }, + authenticationTokenSettings = new + { + access = new object[] + { + "job" + }, + }, + } + }, +}); +Response response = client.CreateTaskCollection("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("value")[0].GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("taskId").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("eTag").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("lastModified").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("location").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("message").GetProperty("lang").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("message").GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("values")[0].GetProperty("key").ToString()); +Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("values")[0].GetProperty("value").ToString()); +]]> + + + +This sample shows how to call DeleteTaskAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.DeleteTaskAsync("", ""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteTaskAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.DeleteTaskAsync("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DeleteTask. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.DeleteTask("", ""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteTask with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.DeleteTask("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetTaskAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetTaskAsync("", ""); +]]> +This sample shows how to call GetTaskAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetTaskAsync("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), select: new string[] { "" }, expand: new string[] { "" }, requestConditions: null); +]]> + + + +This sample shows how to call GetTaskAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetTaskAsync("", "", null, null, null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetTaskAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetTaskAsync("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), new string[] { "" }, new string[] { "" }, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("url").ToString()); +Console.WriteLine(result.GetProperty("eTag").ToString()); +Console.WriteLine(result.GetProperty("lastModified").ToString()); +Console.WriteLine(result.GetProperty("creationTime").ToString()); +Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodes")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodes")[0].GetProperty("exitOptions").GetProperty("jobAction").ToString()); +Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodes")[0].GetProperty("exitOptions").GetProperty("dependencyAction").ToString()); +Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodeRanges")[0].GetProperty("start").ToString()); +Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodeRanges")[0].GetProperty("end").ToString()); +Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodeRanges")[0].GetProperty("exitOptions").GetProperty("jobAction").ToString()); +Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodeRanges")[0].GetProperty("exitOptions").GetProperty("dependencyAction").ToString()); +Console.WriteLine(result.GetProperty("exitConditions").GetProperty("preProcessingError").GetProperty("jobAction").ToString()); +Console.WriteLine(result.GetProperty("exitConditions").GetProperty("preProcessingError").GetProperty("dependencyAction").ToString()); +Console.WriteLine(result.GetProperty("exitConditions").GetProperty("fileUploadError").GetProperty("jobAction").ToString()); +Console.WriteLine(result.GetProperty("exitConditions").GetProperty("fileUploadError").GetProperty("dependencyAction").ToString()); +Console.WriteLine(result.GetProperty("exitConditions").GetProperty("default").GetProperty("jobAction").ToString()); +Console.WriteLine(result.GetProperty("exitConditions").GetProperty("default").GetProperty("dependencyAction").ToString()); +Console.WriteLine(result.GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); +Console.WriteLine(result.GetProperty("previousState").ToString()); +Console.WriteLine(result.GetProperty("previousStateTransitionTime").ToString()); +Console.WriteLine(result.GetProperty("commandLine").ToString()); +Console.WriteLine(result.GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); +Console.WriteLine(result.GetProperty("containerSettings").GetProperty("imageName").ToString()); +Console.WriteLine(result.GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); +Console.WriteLine(result.GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); +Console.WriteLine(result.GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); +Console.WriteLine(result.GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); +Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); +Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); +Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); +Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); +Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); +Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); +Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("filePattern").ToString()); +Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("path").ToString()); +Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("containerUrl").ToString()); +Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("identityReference").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("uploadOptions").GetProperty("uploadCondition").ToString()); +Console.WriteLine(result.GetProperty("environmentSettings")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("environmentSettings")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("affinityInfo").GetProperty("affinityId").ToString()); +Console.WriteLine(result.GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); +Console.WriteLine(result.GetProperty("constraints").GetProperty("retentionTime").ToString()); +Console.WriteLine(result.GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); +Console.WriteLine(result.GetProperty("requiredSlots").ToString()); +Console.WriteLine(result.GetProperty("userIdentity").GetProperty("username").ToString()); +Console.WriteLine(result.GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); +Console.WriteLine(result.GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); +Console.WriteLine(result.GetProperty("executionInfo").GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("executionInfo").GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("executionInfo").GetProperty("exitCode").ToString()); +Console.WriteLine(result.GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("containerId").ToString()); +Console.WriteLine(result.GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("error").ToString()); +Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("executionInfo").GetProperty("retryCount").ToString()); +Console.WriteLine(result.GetProperty("executionInfo").GetProperty("lastRetryTime").ToString()); +Console.WriteLine(result.GetProperty("executionInfo").GetProperty("requeueCount").ToString()); +Console.WriteLine(result.GetProperty("executionInfo").GetProperty("lastRequeueTime").ToString()); +Console.WriteLine(result.GetProperty("executionInfo").GetProperty("result").ToString()); +Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("affinityId").ToString()); +Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("nodeUrl").ToString()); +Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("poolId").ToString()); +Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("nodeId").ToString()); +Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("taskRootDirectory").ToString()); +Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("taskRootDirectoryUrl").ToString()); +Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("numberOfInstances").ToString()); +Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("coordinationCommandLine").ToString()); +Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); +Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("storageContainerUrl").ToString()); +Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("httpUrl").ToString()); +Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("blobPrefix").ToString()); +Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("filePath").ToString()); +Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("fileMode").ToString()); +Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("url").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("lastUpdateTime").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("userCPUTime").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("kernelCPUTime").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("wallClockTime").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("readIOps").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOps").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("readIOGiB").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOGiB").ToString()); +Console.WriteLine(result.GetProperty("stats").GetProperty("waitTime").ToString()); +Console.WriteLine(result.GetProperty("dependsOn").GetProperty("taskIds")[0].ToString()); +Console.WriteLine(result.GetProperty("dependsOn").GetProperty("taskIdRanges")[0].GetProperty("start").ToString()); +Console.WriteLine(result.GetProperty("dependsOn").GetProperty("taskIdRanges")[0].GetProperty("end").ToString()); +Console.WriteLine(result.GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); +Console.WriteLine(result.GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("authenticationTokenSettings").GetProperty("access")[0].ToString()); +]]> + + + +This sample shows how to call ReplaceTaskAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchTask task = new BatchTask(); +Response response = await client.ReplaceTaskAsync("", "", task); +]]> +This sample shows how to call ReplaceTaskAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchTask task = new BatchTask +{ + Constraints = new BatchTaskConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, +}; +Response response = await client.ReplaceTaskAsync("", "", task, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +]]> + + + +This sample shows how to call ReplaceTask. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchTask task = new BatchTask(); +Response response = client.ReplaceTask("", "", task); +]]> +This sample shows how to call ReplaceTask with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchTask task = new BatchTask +{ + Constraints = new BatchTaskConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, +}; +Response response = client.ReplaceTask("", "", task, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); +]]> + + + +This sample shows how to call ReplaceTaskAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.ReplaceTaskAsync("", "", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call ReplaceTaskAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + constraints = new + { + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, +}); +Response response = await client.ReplaceTaskAsync("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call ReplaceTask. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.ReplaceTask("", "", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call ReplaceTask with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + constraints = new + { + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, +}); +Response response = client.ReplaceTask("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call TerminateTaskAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.TerminateTaskAsync("", ""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call TerminateTaskAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.TerminateTaskAsync("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call TerminateTask. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.TerminateTask("", ""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call TerminateTask with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.TerminateTask("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call ReactivateTaskAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.ReactivateTaskAsync("", ""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call ReactivateTaskAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.ReactivateTaskAsync("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call ReactivateTask. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.ReactivateTask("", ""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call ReactivateTask with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.ReactivateTask("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DeleteTaskFileAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.DeleteTaskFileAsync("", "", ""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteTaskFileAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.DeleteTaskFileAsync("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), recursive: true); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DeleteTaskFile. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.DeleteTaskFile("", "", ""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteTaskFile with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.DeleteTaskFile("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), recursive: true); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetTaskFileAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetTaskFileAsync("", "", ""); +]]> +This sample shows how to call GetTaskFileAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetTaskFileAsync("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), ocpRange: "", requestConditions: null); +]]> + + + +This sample shows how to call GetTaskFile. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.GetTaskFile("", "", ""); +]]> +This sample shows how to call GetTaskFile with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.GetTaskFile("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), ocpRange: "", requestConditions: null); +]]> + + + +This sample shows how to call GetTaskFileAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetTaskFileAsync("", "", "", null, null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetTaskFileAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetTaskFileAsync("", "", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), "", null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> + + + +This sample shows how to call GetTaskFile and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.GetTaskFile("", "", "", null, null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetTaskFile with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.GetTaskFile("", "", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), "", null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> + + + +This sample shows how to call CreateNodeUserAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchNodeUserCreateContent user = new BatchNodeUserCreateContent(""); +Response response = await client.CreateNodeUserAsync("", "", user); +]]> +This sample shows how to call CreateNodeUserAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchNodeUserCreateContent user = new BatchNodeUserCreateContent("") +{ + IsAdmin = true, + ExpiryTime = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + Password = "", + SshPublicKey = "", +}; +Response response = await client.CreateNodeUserAsync("", "", user, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +]]> + + + +This sample shows how to call CreateNodeUser. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchNodeUserCreateContent user = new BatchNodeUserCreateContent(""); +Response response = client.CreateNodeUser("", "", user); +]]> +This sample shows how to call CreateNodeUser with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchNodeUserCreateContent user = new BatchNodeUserCreateContent("") +{ + IsAdmin = true, + ExpiryTime = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + Password = "", + SshPublicKey = "", +}; +Response response = client.CreateNodeUser("", "", user, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +]]> + + + +This sample shows how to call CreateNodeUserAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + name = "", +}); +Response response = await client.CreateNodeUserAsync("", "", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call CreateNodeUserAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + name = "", + isAdmin = true, + expiryTime = "2022-05-10T18:57:31.2311892Z", + password = "", + sshPublicKey = "", +}); +Response response = await client.CreateNodeUserAsync("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call CreateNodeUser. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + name = "", +}); +Response response = client.CreateNodeUser("", "", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call CreateNodeUser with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + name = "", + isAdmin = true, + expiryTime = "2022-05-10T18:57:31.2311892Z", + password = "", + sshPublicKey = "", +}); +Response response = client.CreateNodeUser("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DeleteNodeUserAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.DeleteNodeUserAsync("", "", ""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteNodeUserAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.DeleteNodeUserAsync("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DeleteNodeUser. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.DeleteNodeUser("", "", ""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteNodeUser with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.DeleteNodeUser("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call ReplaceNodeUserAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchNodeUserUpdateContent content = new BatchNodeUserUpdateContent(); +Response response = await client.ReplaceNodeUserAsync("", "", "", content); +]]> +This sample shows how to call ReplaceNodeUserAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchNodeUserUpdateContent content = new BatchNodeUserUpdateContent +{ + Password = "", + ExpiryTime = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + SshPublicKey = "", +}; +Response response = await client.ReplaceNodeUserAsync("", "", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +]]> + + + +This sample shows how to call ReplaceNodeUser. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchNodeUserUpdateContent content = new BatchNodeUserUpdateContent(); +Response response = client.ReplaceNodeUser("", "", "", content); +]]> +This sample shows how to call ReplaceNodeUser with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchNodeUserUpdateContent content = new BatchNodeUserUpdateContent +{ + Password = "", + ExpiryTime = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + SshPublicKey = "", +}; +Response response = client.ReplaceNodeUser("", "", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +]]> + + + +This sample shows how to call ReplaceNodeUserAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.ReplaceNodeUserAsync("", "", "", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call ReplaceNodeUserAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + password = "", + expiryTime = "2022-05-10T18:57:31.2311892Z", + sshPublicKey = "", +}); +Response response = await client.ReplaceNodeUserAsync("", "", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call ReplaceNodeUser. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.ReplaceNodeUser("", "", "", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call ReplaceNodeUser with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + password = "", + expiryTime = "2022-05-10T18:57:31.2311892Z", + sshPublicKey = "", +}); +Response response = client.ReplaceNodeUser("", "", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetNodeAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetNodeAsync("", ""); +]]> +This sample shows how to call GetNodeAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetNodeAsync("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), select: new string[] { "" }); +]]> + + + +This sample shows how to call GetNodeAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetNodeAsync("", "", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetNodeAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetNodeAsync("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), new string[] { "" }, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("url").ToString()); +Console.WriteLine(result.GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("schedulingState").ToString()); +Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); +Console.WriteLine(result.GetProperty("lastBootTime").ToString()); +Console.WriteLine(result.GetProperty("allocationTime").ToString()); +Console.WriteLine(result.GetProperty("ipAddress").ToString()); +Console.WriteLine(result.GetProperty("affinityId").ToString()); +Console.WriteLine(result.GetProperty("vmSize").ToString()); +Console.WriteLine(result.GetProperty("totalTasksRun").ToString()); +Console.WriteLine(result.GetProperty("runningTasksCount").ToString()); +Console.WriteLine(result.GetProperty("runningTaskSlotsCount").ToString()); +Console.WriteLine(result.GetProperty("totalTasksSucceeded").ToString()); +Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("taskUrl").ToString()); +Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("jobId").ToString()); +Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("taskId").ToString()); +Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("subtaskId").ToString()); +Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("taskState").ToString()); +Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("exitCode").ToString()); +Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("containerId").ToString()); +Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("error").ToString()); +Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("retryCount").ToString()); +Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("lastRetryTime").ToString()); +Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("requeueCount").ToString()); +Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("lastRequeueTime").ToString()); +Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("result").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("commandLine").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("username").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("maxTaskRetryCount").ToString()); +Console.WriteLine(result.GetProperty("startTask").GetProperty("waitForSuccess").ToString()); +Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("endTime").ToString()); +Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("exitCode").ToString()); +Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("containerInfo").GetProperty("containerId").ToString()); +Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("containerInfo").GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("containerInfo").GetProperty("error").ToString()); +Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("retryCount").ToString()); +Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("lastRetryTime").ToString()); +Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("result").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("errorDetails")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("errors")[0].GetProperty("errorDetails")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("isDedicated").ToString()); +Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("protocol").ToString()); +Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("publicIPAddress").ToString()); +Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("publicFQDN").ToString()); +Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("frontendPort").ToString()); +Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("backendPort").ToString()); +Console.WriteLine(result.GetProperty("nodeAgentInfo").GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("nodeAgentInfo").GetProperty("lastUpdateTime").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("publisher").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("offer").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("sku").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("exactVersion").ToString()); +Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("scaleSetVmResourceId").ToString()); +]]> + + + +This sample shows how to call RebootNodeAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.RebootNodeAsync("", ""); +]]> +This sample shows how to call RebootNodeAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchNodeRebootContent parameters = new BatchNodeRebootContent +{ + NodeRebootOption = BatchNodeRebootOption.Requeue, +}; +Response response = await client.RebootNodeAsync("", "", parameters: parameters, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +]]> + + + +This sample shows how to call RebootNode. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.RebootNode("", ""); +]]> +This sample shows how to call RebootNode with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchNodeRebootContent parameters = new BatchNodeRebootContent +{ + NodeRebootOption = BatchNodeRebootOption.Requeue, +}; +Response response = client.RebootNode("", "", parameters: parameters, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +]]> + + + +This sample shows how to call RebootNodeAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = null; +Response response = await client.RebootNodeAsync("", "", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call RebootNodeAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + nodeRebootOption = "requeue", +}); +Response response = await client.RebootNodeAsync("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call RebootNode. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = null; +Response response = client.RebootNode("", "", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call RebootNode with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + nodeRebootOption = "requeue", +}); +Response response = client.RebootNode("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DisableNodeSchedulingAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.DisableNodeSchedulingAsync("", ""); +]]> +This sample shows how to call DisableNodeSchedulingAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchNodeDisableSchedulingContent parameters = new BatchNodeDisableSchedulingContent +{ + NodeDisableSchedulingOption = BatchNodeDisableSchedulingOption.Requeue, +}; +Response response = await client.DisableNodeSchedulingAsync("", "", parameters: parameters, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +]]> + + + +This sample shows how to call DisableNodeScheduling. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.DisableNodeScheduling("", ""); +]]> +This sample shows how to call DisableNodeScheduling with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +BatchNodeDisableSchedulingContent parameters = new BatchNodeDisableSchedulingContent +{ + NodeDisableSchedulingOption = BatchNodeDisableSchedulingOption.Requeue, +}; +Response response = client.DisableNodeScheduling("", "", parameters: parameters, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +]]> + + + +This sample shows how to call DisableNodeSchedulingAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = null; +Response response = await client.DisableNodeSchedulingAsync("", "", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DisableNodeSchedulingAsync with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + nodeDisableSchedulingOption = "requeue", +}); +Response response = await client.DisableNodeSchedulingAsync("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DisableNodeScheduling. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = null; +Response response = client.DisableNodeScheduling("", "", content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DisableNodeScheduling with all parameters and request content. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + nodeDisableSchedulingOption = "requeue", +}); +Response response = client.DisableNodeScheduling("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call EnableNodeSchedulingAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.EnableNodeSchedulingAsync("", ""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call EnableNodeSchedulingAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.EnableNodeSchedulingAsync("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call EnableNodeScheduling. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.EnableNodeScheduling("", ""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call EnableNodeScheduling with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.EnableNodeScheduling("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetNodeRemoteLoginSettingsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetNodeRemoteLoginSettingsAsync("", ""); +]]> +This sample shows how to call GetNodeRemoteLoginSettingsAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetNodeRemoteLoginSettingsAsync("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +]]> + + + +This sample shows how to call GetNodeRemoteLoginSettings. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.GetNodeRemoteLoginSettings("", ""); +]]> +This sample shows how to call GetNodeRemoteLoginSettings with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.GetNodeRemoteLoginSettings("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +]]> + + + +This sample shows how to call GetNodeRemoteLoginSettingsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetNodeRemoteLoginSettingsAsync("", "", null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("remoteLoginIPAddress").ToString()); +Console.WriteLine(result.GetProperty("remoteLoginPort").ToString()); +]]> +This sample shows how to call GetNodeRemoteLoginSettingsAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetNodeRemoteLoginSettingsAsync("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("remoteLoginIPAddress").ToString()); +Console.WriteLine(result.GetProperty("remoteLoginPort").ToString()); +]]> + + + +This sample shows how to call GetNodeRemoteLoginSettings and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.GetNodeRemoteLoginSettings("", "", null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("remoteLoginIPAddress").ToString()); +Console.WriteLine(result.GetProperty("remoteLoginPort").ToString()); +]]> +This sample shows how to call GetNodeRemoteLoginSettings with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.GetNodeRemoteLoginSettings("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("remoteLoginIPAddress").ToString()); +Console.WriteLine(result.GetProperty("remoteLoginPort").ToString()); +]]> + + + +This sample shows how to call UploadNodeLogsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +UploadBatchServiceLogsContent content = new UploadBatchServiceLogsContent("", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); +Response response = await client.UploadNodeLogsAsync("", "", content); +]]> +This sample shows how to call UploadNodeLogsAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +UploadBatchServiceLogsContent content = new UploadBatchServiceLogsContent("", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")) +{ + EndTime = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + IdentityReference = new BatchNodeIdentityReference + { + ResourceId = "", + }, +}; +Response response = await client.UploadNodeLogsAsync("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +]]> + + + +This sample shows how to call UploadNodeLogs. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +UploadBatchServiceLogsContent content = new UploadBatchServiceLogsContent("", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); +Response response = client.UploadNodeLogs("", "", content); +]]> +This sample shows how to call UploadNodeLogs with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +UploadBatchServiceLogsContent content = new UploadBatchServiceLogsContent("", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")) +{ + EndTime = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + IdentityReference = new BatchNodeIdentityReference + { + ResourceId = "", + }, +}; +Response response = client.UploadNodeLogs("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); +]]> + + + +This sample shows how to call UploadNodeLogsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + containerUrl = "", + startTime = "2022-05-10T18:57:31.2311892Z", +}); +Response response = await client.UploadNodeLogsAsync("", "", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("virtualDirectoryName").ToString()); +Console.WriteLine(result.GetProperty("numberOfFilesUploaded").ToString()); +]]> +This sample shows how to call UploadNodeLogsAsync with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + containerUrl = "", + startTime = "2022-05-10T18:57:31.2311892Z", + endTime = "2022-05-10T18:57:31.2311892Z", + identityReference = new + { + resourceId = "", + }, +}); +Response response = await client.UploadNodeLogsAsync("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("virtualDirectoryName").ToString()); +Console.WriteLine(result.GetProperty("numberOfFilesUploaded").ToString()); +]]> + + + +This sample shows how to call UploadNodeLogs and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + containerUrl = "", + startTime = "2022-05-10T18:57:31.2311892Z", +}); +Response response = client.UploadNodeLogs("", "", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("virtualDirectoryName").ToString()); +Console.WriteLine(result.GetProperty("numberOfFilesUploaded").ToString()); +]]> +This sample shows how to call UploadNodeLogs with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + containerUrl = "", + startTime = "2022-05-10T18:57:31.2311892Z", + endTime = "2022-05-10T18:57:31.2311892Z", + identityReference = new + { + resourceId = "", + }, +}); +Response response = client.UploadNodeLogs("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("virtualDirectoryName").ToString()); +Console.WriteLine(result.GetProperty("numberOfFilesUploaded").ToString()); +]]> + + + +This sample shows how to call GetNodeExtensionAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetNodeExtensionAsync("", "", ""); +]]> +This sample shows how to call GetNodeExtensionAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetNodeExtensionAsync("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), select: new string[] { "" }); +]]> + + + +This sample shows how to call GetNodeExtensionAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetNodeExtensionAsync("", "", "", null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetNodeExtensionAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetNodeExtensionAsync("", "", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), new string[] { "" }, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("provisioningState").ToString()); +Console.WriteLine(result.GetProperty("vmExtension").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("vmExtension").GetProperty("publisher").ToString()); +Console.WriteLine(result.GetProperty("vmExtension").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("vmExtension").GetProperty("typeHandlerVersion").ToString()); +Console.WriteLine(result.GetProperty("vmExtension").GetProperty("autoUpgradeMinorVersion").ToString()); +Console.WriteLine(result.GetProperty("vmExtension").GetProperty("enableAutomaticUpgrade").ToString()); +Console.WriteLine(result.GetProperty("vmExtension").GetProperty("settings").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("vmExtension").GetProperty("protectedSettings").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("vmExtension").GetProperty("provisionAfterExtensions")[0].ToString()); +Console.WriteLine(result.GetProperty("instanceView").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("displayStatus").ToString()); +Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("level").ToString()); +Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("time").ToString()); +Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("displayStatus").ToString()); +Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("level").ToString()); +Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("time").ToString()); +]]> + + + +This sample shows how to call DeleteNodeFileAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.DeleteNodeFileAsync("", "", ""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteNodeFileAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.DeleteNodeFileAsync("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), recursive: true); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DeleteNodeFile. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.DeleteNodeFile("", "", ""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteNodeFile with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.DeleteNodeFile("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), recursive: true); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetNodeFileAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetNodeFileAsync("", "", ""); +]]> +This sample shows how to call GetNodeFileAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetNodeFileAsync("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), ocpRange: "", requestConditions: null); +]]> + + + +This sample shows how to call GetNodeFile. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.GetNodeFile("", "", ""); +]]> +This sample shows how to call GetNodeFile with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.GetNodeFile("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), ocpRange: "", requestConditions: null); +]]> + + + +This sample shows how to call GetNodeFileAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetNodeFileAsync("", "", "", null, null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetNodeFileAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = await client.GetNodeFileAsync("", "", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), "", null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> + + + +This sample shows how to call GetNodeFile and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.GetNodeFile("", "", "", null, null, null, null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetNodeFile with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +Response response = client.GetNodeFile("", "", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), "", null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> + + + +This sample shows how to call GetApplicationsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BatchApplication item in client.GetApplicationsAsync()) +{ +} +]]> +This sample shows how to call GetApplicationsAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BatchApplication item in client.GetApplicationsAsync(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234)) +{ +} +]]> + + + +This sample shows how to call GetApplications. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +foreach (BatchApplication item in client.GetApplications()) +{ +} +]]> +This sample shows how to call GetApplications with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +foreach (BatchApplication item in client.GetApplications(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234)) +{ +} +]]> + + + +This sample shows how to call GetApplicationsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BinaryData item in client.GetApplicationsAsync(null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("versions")[0].ToString()); +} +]]> +This sample shows how to call GetApplicationsAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BinaryData item in client.GetApplicationsAsync(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("versions")[0].ToString()); +} +]]> + + + +This sample shows how to call GetApplications and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +foreach (BinaryData item in client.GetApplications(null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("versions")[0].ToString()); +} +]]> +This sample shows how to call GetApplications with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +foreach (BinaryData item in client.GetApplications(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("versions")[0].ToString()); +} +]]> + + + +This sample shows how to call GetPoolUsageMetricsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BatchPoolUsageMetrics item in client.GetPoolUsageMetricsAsync()) +{ +} +]]> +This sample shows how to call GetPoolUsageMetricsAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BatchPoolUsageMetrics item in client.GetPoolUsageMetricsAsync(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, starttime: DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), endtime: DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), filter: "")) +{ +} +]]> + + + +This sample shows how to call GetPoolUsageMetrics. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +foreach (BatchPoolUsageMetrics item in client.GetPoolUsageMetrics()) +{ +} +]]> +This sample shows how to call GetPoolUsageMetrics with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +foreach (BatchPoolUsageMetrics item in client.GetPoolUsageMetrics(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, starttime: DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), endtime: DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), filter: "")) +{ +} +]]> + + + +This sample shows how to call GetPoolUsageMetricsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BinaryData item in client.GetPoolUsageMetricsAsync(null, null, null, null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("poolId").ToString()); + Console.WriteLine(result.GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("vmSize").ToString()); + Console.WriteLine(result.GetProperty("totalCoreHours").ToString()); +} +]]> +This sample shows how to call GetPoolUsageMetricsAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BinaryData item in client.GetPoolUsageMetricsAsync(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("poolId").ToString()); + Console.WriteLine(result.GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("vmSize").ToString()); + Console.WriteLine(result.GetProperty("totalCoreHours").ToString()); +} +]]> + + + +This sample shows how to call GetPoolUsageMetrics and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +foreach (BinaryData item in client.GetPoolUsageMetrics(null, null, null, null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("poolId").ToString()); + Console.WriteLine(result.GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("vmSize").ToString()); + Console.WriteLine(result.GetProperty("totalCoreHours").ToString()); +} +]]> +This sample shows how to call GetPoolUsageMetrics with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +foreach (BinaryData item in client.GetPoolUsageMetrics(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("poolId").ToString()); + Console.WriteLine(result.GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("vmSize").ToString()); + Console.WriteLine(result.GetProperty("totalCoreHours").ToString()); +} +]]> + + + +This sample shows how to call GetPoolsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BatchPool item in client.GetPoolsAsync()) +{ +} +]]> +This sample shows how to call GetPoolsAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BatchPool item in client.GetPoolsAsync(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", select: new string[] { "" }, expand: new string[] { "" })) +{ +} +]]> + + + +This sample shows how to call GetPoolsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BinaryData item in client.GetPoolsAsync(null, null, null, null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); +} +]]> +This sample shows how to call GetPoolsAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BinaryData item in client.GetPoolsAsync(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", new string[] { "" }, new string[] { "" }, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result.GetProperty("lastModified").ToString()); + Console.WriteLine(result.GetProperty("creationTime").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); + Console.WriteLine(result.GetProperty("allocationState").ToString()); + Console.WriteLine(result.GetProperty("allocationStateTransitionTime").ToString()); + Console.WriteLine(result.GetProperty("vmSize").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("publisher").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("offer").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("sku").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("exactVersion").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("nodeAgentSKUId").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("windowsConfiguration").GetProperty("enableAutomaticUpdates").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("lun").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("caching").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("storageAccountType").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("licenseType").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerImageNames")[0].ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("diskEncryptionConfiguration").GetProperty("targets")[0].ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("nodePlacementConfiguration").GetProperty("policy").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("publisher").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("typeHandlerVersion").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("autoUpgradeMinorVersion").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("enableAutomaticUpgrade").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("settings").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("protectedSettings").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("provisionAfterExtensions")[0].ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("ephemeralOSDiskSettings").GetProperty("placement").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("caching").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("managedDisk").GetProperty("storageAccountType").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("writeAcceleratorEnabled").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("encryptionAtHost").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("securityType").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("secureBootEnabled").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("vTpmEnabled").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("serviceArtifactReference").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("resizeTimeout").ToString()); + Console.WriteLine(result.GetProperty("resizeErrors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("resizeErrors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("resizeErrors")[0].GetProperty("values")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("resizeErrors")[0].GetProperty("values")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("resourceTags").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("currentDedicatedNodes").ToString()); + Console.WriteLine(result.GetProperty("currentLowPriorityNodes").ToString()); + Console.WriteLine(result.GetProperty("targetDedicatedNodes").ToString()); + Console.WriteLine(result.GetProperty("targetLowPriorityNodes").ToString()); + Console.WriteLine(result.GetProperty("enableAutoScale").ToString()); + Console.WriteLine(result.GetProperty("autoScaleFormula").ToString()); + Console.WriteLine(result.GetProperty("autoScaleEvaluationInterval").ToString()); + Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("timestamp").ToString()); + Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("results").ToString()); + Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("error").GetProperty("values")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("error").GetProperty("values")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("enableInterNodeCommunication").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("dynamicVNetAssignmentScope").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("protocol").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("backendPort").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeStart").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeEnd").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("priority").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("access").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourceAddressPrefix").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourcePortRanges")[0].ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("provision").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("ipAddressIds")[0].ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("enableAcceleratedNetworking").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("waitForSuccess").ToString()); + Console.WriteLine(result.GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); + Console.WriteLine(result.GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("taskSlotsPerNode").ToString()); + Console.WriteLine(result.GetProperty("taskSchedulingPolicy").GetProperty("nodeFillType").ToString()); + Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("uid").ToString()); + Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("gid").ToString()); + Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("sshPrivateKey").ToString()); + Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("windowsUserConfiguration").GetProperty("loginMode").ToString()); + Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("lastUpdateTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("usageStats").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("usageStats").GetProperty("lastUpdateTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("usageStats").GetProperty("dedicatedCoreTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("lastUpdateTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("avgCPUPercentage").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("avgMemoryGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("peakMemoryGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("avgDiskGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("peakDiskGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("diskReadIOps").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("diskWriteIOps").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("diskReadGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("diskWriteGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("networkReadGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("networkWriteGiB").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountName").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("containerName").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountKey").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("sasKey").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("blobfuseOptions").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("mountOptions").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("mountOptions").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountName").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("azureFileUrl").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountKey").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("mountOptions").ToString()); + Console.WriteLine(result.GetProperty("identity").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("identity").GetProperty("userAssignedIdentities")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("identity").GetProperty("userAssignedIdentities")[0].GetProperty("clientId").ToString()); + Console.WriteLine(result.GetProperty("identity").GetProperty("userAssignedIdentities")[0].GetProperty("principalId").ToString()); + Console.WriteLine(result.GetProperty("targetNodeCommunicationMode").ToString()); + Console.WriteLine(result.GetProperty("currentNodeCommunicationMode").ToString()); + Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("mode").ToString()); + Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("disableAutomaticRollback").ToString()); + Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("enableAutomaticOSUpgrade").ToString()); + Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("useRollingUpgradePolicy").ToString()); + Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("osRollingUpgradeDeferral").ToString()); + Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("enableCrossZoneUpgrade").ToString()); + Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxBatchInstancePercent").ToString()); + Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyInstancePercent").ToString()); + Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyUpgradedInstancePercent").ToString()); + Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("pauseTimeBetweenBatches").ToString()); + Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("prioritizeUnhealthyInstances").ToString()); + Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("rollbackFailedInstancesOnPolicyBreach").ToString()); +} +]]> + + + +This sample shows how to call GetSupportedImagesAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BatchSupportedImage item in client.GetSupportedImagesAsync()) +{ +} +]]> +This sample shows how to call GetSupportedImagesAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BatchSupportedImage item in client.GetSupportedImagesAsync(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "")) +{ +} +]]> + + + +This sample shows how to call GetSupportedImages. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +foreach (BatchSupportedImage item in client.GetSupportedImages()) +{ +} +]]> +This sample shows how to call GetSupportedImages with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +foreach (BatchSupportedImage item in client.GetSupportedImages(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "")) +{ +} +]]> + + + +This sample shows how to call GetSupportedImagesAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BinaryData item in client.GetSupportedImagesAsync(null, null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("nodeAgentSKUId").ToString()); + Console.WriteLine(result.GetProperty("imageReference").ToString()); + Console.WriteLine(result.GetProperty("osType").ToString()); + Console.WriteLine(result.GetProperty("verificationType").ToString()); +} +]]> +This sample shows how to call GetSupportedImagesAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BinaryData item in client.GetSupportedImagesAsync(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("nodeAgentSKUId").ToString()); + Console.WriteLine(result.GetProperty("imageReference").GetProperty("publisher").ToString()); + Console.WriteLine(result.GetProperty("imageReference").GetProperty("offer").ToString()); + Console.WriteLine(result.GetProperty("imageReference").GetProperty("sku").ToString()); + Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); + Console.WriteLine(result.GetProperty("imageReference").GetProperty("exactVersion").ToString()); + Console.WriteLine(result.GetProperty("osType").ToString()); + Console.WriteLine(result.GetProperty("capabilities")[0].ToString()); + Console.WriteLine(result.GetProperty("batchSupportEndOfLife").ToString()); + Console.WriteLine(result.GetProperty("verificationType").ToString()); +} +]]> + + + +This sample shows how to call GetSupportedImages and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +foreach (BinaryData item in client.GetSupportedImages(null, null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("nodeAgentSKUId").ToString()); + Console.WriteLine(result.GetProperty("imageReference").ToString()); + Console.WriteLine(result.GetProperty("osType").ToString()); + Console.WriteLine(result.GetProperty("verificationType").ToString()); +} +]]> +This sample shows how to call GetSupportedImages with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +foreach (BinaryData item in client.GetSupportedImages(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("nodeAgentSKUId").ToString()); + Console.WriteLine(result.GetProperty("imageReference").GetProperty("publisher").ToString()); + Console.WriteLine(result.GetProperty("imageReference").GetProperty("offer").ToString()); + Console.WriteLine(result.GetProperty("imageReference").GetProperty("sku").ToString()); + Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); + Console.WriteLine(result.GetProperty("imageReference").GetProperty("exactVersion").ToString()); + Console.WriteLine(result.GetProperty("osType").ToString()); + Console.WriteLine(result.GetProperty("capabilities")[0].ToString()); + Console.WriteLine(result.GetProperty("batchSupportEndOfLife").ToString()); + Console.WriteLine(result.GetProperty("verificationType").ToString()); +} +]]> + + + +This sample shows how to call GetPoolNodeCountsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BatchPoolNodeCounts item in client.GetPoolNodeCountsAsync()) +{ +} +]]> +This sample shows how to call GetPoolNodeCountsAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BatchPoolNodeCounts item in client.GetPoolNodeCountsAsync(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "")) +{ +} +]]> + + + +This sample shows how to call GetPoolNodeCounts. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +foreach (BatchPoolNodeCounts item in client.GetPoolNodeCounts()) +{ +} +]]> +This sample shows how to call GetPoolNodeCounts with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +foreach (BatchPoolNodeCounts item in client.GetPoolNodeCounts(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "")) +{ +} +]]> + + + +This sample shows how to call GetPoolNodeCountsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BinaryData item in client.GetPoolNodeCountsAsync(null, null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("poolId").ToString()); +} +]]> +This sample shows how to call GetPoolNodeCountsAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BinaryData item in client.GetPoolNodeCountsAsync(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("poolId").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("creating").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("idle").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("offline").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("preempted").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("rebooting").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("reimaging").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("running").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("starting").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("startTaskFailed").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("leavingPool").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("unknown").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("unusable").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("waitingForStartTask").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("total").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("upgradingOS").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("creating").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("idle").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("offline").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("preempted").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("rebooting").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("reimaging").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("running").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("starting").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("startTaskFailed").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("leavingPool").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("unknown").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("unusable").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("waitingForStartTask").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("total").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("upgradingOS").ToString()); +} +]]> + + + +This sample shows how to call GetPoolNodeCounts and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +foreach (BinaryData item in client.GetPoolNodeCounts(null, null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("poolId").ToString()); +} +]]> +This sample shows how to call GetPoolNodeCounts with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +foreach (BinaryData item in client.GetPoolNodeCounts(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("poolId").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("creating").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("idle").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("offline").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("preempted").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("rebooting").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("reimaging").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("running").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("starting").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("startTaskFailed").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("leavingPool").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("unknown").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("unusable").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("waitingForStartTask").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("total").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("upgradingOS").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("creating").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("idle").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("offline").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("preempted").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("rebooting").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("reimaging").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("running").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("starting").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("startTaskFailed").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("leavingPool").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("unknown").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("unusable").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("waitingForStartTask").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("total").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("upgradingOS").ToString()); +} +]]> + + + +This sample shows how to call GetJobsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BatchJob item in client.GetJobsAsync()) +{ +} +]]> +This sample shows how to call GetJobsAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BatchJob item in client.GetJobsAsync(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", select: new string[] { "" }, expand: new string[] { "" })) +{ +} +]]> + + + +This sample shows how to call GetJobsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BinaryData item in client.GetJobsAsync(null, null, null, null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("poolInfo").ToString()); +} +]]> +This sample shows how to call GetJobsAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BinaryData item in client.GetJobsAsync(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", new string[] { "" }, new string[] { "" }, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("usesTaskDependencies").ToString()); + Console.WriteLine(result.GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result.GetProperty("lastModified").ToString()); + Console.WriteLine(result.GetProperty("creationTime").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); + Console.WriteLine(result.GetProperty("previousState").ToString()); + Console.WriteLine(result.GetProperty("previousStateTransitionTime").ToString()); + Console.WriteLine(result.GetProperty("priority").ToString()); + Console.WriteLine(result.GetProperty("allowTaskPreemption").ToString()); + Console.WriteLine(result.GetProperty("maxParallelTasks").ToString()); + Console.WriteLine(result.GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); + Console.WriteLine(result.GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("filePattern").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("path").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("uploadOptions").GetProperty("uploadCondition").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("requiredSlots").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("killJobOnCompletion").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("runExclusive").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("authenticationTokenSettings").GetProperty("access")[0].ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("allowLowPriorityNode").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("waitForSuccess").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("rerunOnNodeRebootAfterSuccess").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("maxWallClockTime").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("retentionTime").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("commonEnvironmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("commonEnvironmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("poolId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("autoPoolIdPrefix").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("poolLifetimeOption").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("keepAlive").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("vmSize").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("publisher").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("offer").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("sku").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("exactVersion").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodeAgentSKUId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("windowsConfiguration").GetProperty("enableAutomaticUpdates").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("lun").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("caching").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("storageAccountType").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("licenseType").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerImageNames")[0].ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("diskEncryptionConfiguration").GetProperty("targets")[0].ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodePlacementConfiguration").GetProperty("policy").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("publisher").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("typeHandlerVersion").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("autoUpgradeMinorVersion").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("enableAutomaticUpgrade").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("settings").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("protectedSettings").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("provisionAfterExtensions")[0].ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("ephemeralOSDiskSettings").GetProperty("placement").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("caching").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("managedDisk").GetProperty("storageAccountType").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("writeAcceleratorEnabled").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("encryptionAtHost").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("securityType").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("secureBootEnabled").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("vTpmEnabled").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("serviceArtifactReference").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSlotsPerNode").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSchedulingPolicy").GetProperty("nodeFillType").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resizeTimeout").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resourceTags").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetDedicatedNodes").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetLowPriorityNodes").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableAutoScale").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleFormula").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleEvaluationInterval").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableInterNodeCommunication").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("dynamicVNetAssignmentScope").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("protocol").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("backendPort").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeStart").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeEnd").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("priority").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("access").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourceAddressPrefix").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourcePortRanges")[0].ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("provision").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("ipAddressIds")[0].ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("enableAcceleratedNetworking").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("waitForSuccess").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("uid").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("gid").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("sshPrivateKey").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("windowsUserConfiguration").GetProperty("loginMode").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountName").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("containerName").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountKey").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("sasKey").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("blobfuseOptions").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("mountOptions").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("mountOptions").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountName").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("azureFileUrl").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountKey").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("mountOptions").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetNodeCommunicationMode").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("mode").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("disableAutomaticRollback").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("enableAutomaticOSUpgrade").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("useRollingUpgradePolicy").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("osRollingUpgradeDeferral").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("enableCrossZoneUpgrade").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxBatchInstancePercent").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyInstancePercent").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyUpgradedInstancePercent").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("pauseTimeBetweenBatches").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("prioritizeUnhealthyInstances").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("rollbackFailedInstancesOnPolicyBreach").ToString()); + Console.WriteLine(result.GetProperty("onAllTasksComplete").ToString()); + Console.WriteLine(result.GetProperty("onTaskFailure").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); + Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("poolId").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("details")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("details")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("terminateReason").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("lastUpdateTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("userCPUTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("kernelCPUTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("wallClockTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("readIOps").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOps").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("readIOGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("numSucceededTasks").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("numFailedTasks").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("numTaskRetries").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("waitTime").ToString()); +} +]]> + + + +This sample shows how to call GetJobsFromSchedulesAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BatchJob item in client.GetJobsFromSchedulesAsync("")) +{ +} +]]> +This sample shows how to call GetJobsFromSchedulesAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BatchJob item in client.GetJobsFromSchedulesAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", select: new string[] { "" }, expand: new string[] { "" })) +{ +} +]]> + + + +This sample shows how to call GetJobsFromSchedulesAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BinaryData item in client.GetJobsFromSchedulesAsync("", null, null, null, null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("poolInfo").ToString()); +} +]]> +This sample shows how to call GetJobsFromSchedulesAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BinaryData item in client.GetJobsFromSchedulesAsync("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", new string[] { "" }, new string[] { "" }, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("usesTaskDependencies").ToString()); + Console.WriteLine(result.GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result.GetProperty("lastModified").ToString()); + Console.WriteLine(result.GetProperty("creationTime").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); + Console.WriteLine(result.GetProperty("previousState").ToString()); + Console.WriteLine(result.GetProperty("previousStateTransitionTime").ToString()); + Console.WriteLine(result.GetProperty("priority").ToString()); + Console.WriteLine(result.GetProperty("allowTaskPreemption").ToString()); + Console.WriteLine(result.GetProperty("maxParallelTasks").ToString()); + Console.WriteLine(result.GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); + Console.WriteLine(result.GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("filePattern").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("path").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("uploadOptions").GetProperty("uploadCondition").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("requiredSlots").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("killJobOnCompletion").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("runExclusive").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("authenticationTokenSettings").GetProperty("access")[0].ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("allowLowPriorityNode").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("waitForSuccess").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("rerunOnNodeRebootAfterSuccess").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("maxWallClockTime").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("retentionTime").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("commonEnvironmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("commonEnvironmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("poolId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("autoPoolIdPrefix").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("poolLifetimeOption").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("keepAlive").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("vmSize").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("publisher").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("offer").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("sku").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("exactVersion").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodeAgentSKUId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("windowsConfiguration").GetProperty("enableAutomaticUpdates").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("lun").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("caching").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("storageAccountType").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("licenseType").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerImageNames")[0].ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("diskEncryptionConfiguration").GetProperty("targets")[0].ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodePlacementConfiguration").GetProperty("policy").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("publisher").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("typeHandlerVersion").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("autoUpgradeMinorVersion").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("enableAutomaticUpgrade").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("settings").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("protectedSettings").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("provisionAfterExtensions")[0].ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("ephemeralOSDiskSettings").GetProperty("placement").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("caching").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("managedDisk").GetProperty("storageAccountType").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("writeAcceleratorEnabled").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("encryptionAtHost").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("securityType").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("secureBootEnabled").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("vTpmEnabled").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("serviceArtifactReference").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSlotsPerNode").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSchedulingPolicy").GetProperty("nodeFillType").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resizeTimeout").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resourceTags").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetDedicatedNodes").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetLowPriorityNodes").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableAutoScale").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleFormula").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleEvaluationInterval").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableInterNodeCommunication").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("dynamicVNetAssignmentScope").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("protocol").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("backendPort").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeStart").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeEnd").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("priority").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("access").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourceAddressPrefix").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourcePortRanges")[0].ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("provision").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("ipAddressIds")[0].ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("enableAcceleratedNetworking").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("waitForSuccess").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("uid").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("gid").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("sshPrivateKey").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("windowsUserConfiguration").GetProperty("loginMode").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountName").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("containerName").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountKey").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("sasKey").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("blobfuseOptions").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("mountOptions").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("mountOptions").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountName").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("azureFileUrl").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountKey").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("mountOptions").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetNodeCommunicationMode").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("mode").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("disableAutomaticRollback").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("enableAutomaticOSUpgrade").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("useRollingUpgradePolicy").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("osRollingUpgradeDeferral").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("enableCrossZoneUpgrade").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxBatchInstancePercent").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyInstancePercent").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyUpgradedInstancePercent").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("pauseTimeBetweenBatches").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("prioritizeUnhealthyInstances").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("rollbackFailedInstancesOnPolicyBreach").ToString()); + Console.WriteLine(result.GetProperty("onAllTasksComplete").ToString()); + Console.WriteLine(result.GetProperty("onTaskFailure").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); + Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("poolId").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("details")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("details")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("terminateReason").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("lastUpdateTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("userCPUTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("kernelCPUTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("wallClockTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("readIOps").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOps").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("readIOGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("numSucceededTasks").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("numFailedTasks").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("numTaskRetries").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("waitTime").ToString()); +} +]]> + + + +This sample shows how to call GetJobPreparationAndReleaseTaskStatusesAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BatchJobPreparationAndReleaseTaskStatus item in client.GetJobPreparationAndReleaseTaskStatusesAsync("")) +{ +} +]]> +This sample shows how to call GetJobPreparationAndReleaseTaskStatusesAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BatchJobPreparationAndReleaseTaskStatus item in client.GetJobPreparationAndReleaseTaskStatusesAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", select: new string[] { "" })) +{ +} +]]> + + + +This sample shows how to call GetJobPreparationAndReleaseTaskStatusesAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BinaryData item in client.GetJobPreparationAndReleaseTaskStatusesAsync("", null, null, null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); +} +]]> +This sample shows how to call GetJobPreparationAndReleaseTaskStatusesAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BinaryData item in client.GetJobPreparationAndReleaseTaskStatusesAsync("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", new string[] { "" }, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("poolId").ToString()); + Console.WriteLine(result.GetProperty("nodeId").ToString()); + Console.WriteLine(result.GetProperty("nodeUrl").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("taskRootDirectory").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("taskRootDirectoryUrl").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("exitCode").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("containerInfo").GetProperty("containerId").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("containerInfo").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("containerInfo").GetProperty("error").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("failureInfo").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("failureInfo").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("failureInfo").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("retryCount").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("lastRetryTime").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("result").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("taskRootDirectory").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("taskRootDirectoryUrl").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("exitCode").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("containerInfo").GetProperty("containerId").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("containerInfo").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("containerInfo").GetProperty("error").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("failureInfo").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("failureInfo").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("failureInfo").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("result").ToString()); +} +]]> + + + +This sample shows how to call GetJobSchedulesAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BatchJobSchedule item in client.GetJobSchedulesAsync()) +{ +} +]]> +This sample shows how to call GetJobSchedulesAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BatchJobSchedule item in client.GetJobSchedulesAsync(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", select: new string[] { "" }, expand: new string[] { "" })) +{ +} +]]> + + + +This sample shows how to call GetJobSchedulesAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BinaryData item in client.GetJobSchedulesAsync(null, null, null, null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").ToString()); +} +]]> +This sample shows how to call GetJobSchedulesAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BinaryData item in client.GetJobSchedulesAsync(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", new string[] { "" }, new string[] { "" }, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result.GetProperty("lastModified").ToString()); + Console.WriteLine(result.GetProperty("creationTime").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); + Console.WriteLine(result.GetProperty("previousState").ToString()); + Console.WriteLine(result.GetProperty("previousStateTransitionTime").ToString()); + Console.WriteLine(result.GetProperty("schedule").GetProperty("doNotRunUntil").ToString()); + Console.WriteLine(result.GetProperty("schedule").GetProperty("doNotRunAfter").ToString()); + Console.WriteLine(result.GetProperty("schedule").GetProperty("startWindow").ToString()); + Console.WriteLine(result.GetProperty("schedule").GetProperty("recurrenceInterval").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("priority").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("allowTaskPreemption").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("maxParallelTasks").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("usesTaskDependencies").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("onAllTasksComplete").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("onTaskFailure").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("filePattern").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("path").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("uploadOptions").GetProperty("uploadCondition").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("requiredSlots").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("killJobOnCompletion").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("runExclusive").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("authenticationTokenSettings").GetProperty("access")[0].ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("allowLowPriorityNode").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("waitForSuccess").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("rerunOnNodeRebootAfterSuccess").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("maxWallClockTime").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("retentionTime").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("commonEnvironmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("commonEnvironmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("poolId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("autoPoolIdPrefix").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("poolLifetimeOption").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("keepAlive").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("vmSize").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("publisher").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("offer").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("sku").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("exactVersion").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodeAgentSKUId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("windowsConfiguration").GetProperty("enableAutomaticUpdates").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("lun").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("caching").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("storageAccountType").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("licenseType").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerImageNames")[0].ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("diskEncryptionConfiguration").GetProperty("targets")[0].ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodePlacementConfiguration").GetProperty("policy").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("publisher").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("typeHandlerVersion").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("autoUpgradeMinorVersion").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("enableAutomaticUpgrade").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("settings").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("protectedSettings").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("provisionAfterExtensions")[0].ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("ephemeralOSDiskSettings").GetProperty("placement").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("caching").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("managedDisk").GetProperty("storageAccountType").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("writeAcceleratorEnabled").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("encryptionAtHost").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("securityType").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("secureBootEnabled").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("vTpmEnabled").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("serviceArtifactReference").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSlotsPerNode").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSchedulingPolicy").GetProperty("nodeFillType").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resizeTimeout").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resourceTags").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetDedicatedNodes").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetLowPriorityNodes").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableAutoScale").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleFormula").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleEvaluationInterval").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableInterNodeCommunication").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("dynamicVNetAssignmentScope").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("protocol").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("backendPort").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeStart").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeEnd").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("priority").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("access").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourceAddressPrefix").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourcePortRanges")[0].ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("provision").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("ipAddressIds")[0].ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("enableAcceleratedNetworking").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("waitForSuccess").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("uid").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("gid").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("sshPrivateKey").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("windowsUserConfiguration").GetProperty("loginMode").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("containerName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountKey").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("sasKey").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("blobfuseOptions").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("mountOptions").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("mountOptions").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("azureFileUrl").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountKey").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("mountOptions").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetNodeCommunicationMode").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("mode").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("disableAutomaticRollback").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("enableAutomaticOSUpgrade").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("useRollingUpgradePolicy").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("osRollingUpgradeDeferral").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("enableCrossZoneUpgrade").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxBatchInstancePercent").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyInstancePercent").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyUpgradedInstancePercent").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("pauseTimeBetweenBatches").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("prioritizeUnhealthyInstances").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("rollbackFailedInstancesOnPolicyBreach").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("metadata")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("metadata")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("nextRunTime").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("recentJob").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("recentJob").GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("lastUpdateTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("userCPUTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("kernelCPUTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("wallClockTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("readIOps").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOps").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("readIOGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("numSucceededTasks").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("numFailedTasks").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("numTaskRetries").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("waitTime").ToString()); +} +]]> + + + +This sample shows how to call GetTasksAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BatchTask item in client.GetTasksAsync("")) +{ +} +]]> +This sample shows how to call GetTasksAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BatchTask item in client.GetTasksAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", select: new string[] { "" }, expand: new string[] { "" })) +{ +} +]]> + + + +This sample shows how to call GetTasksAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BinaryData item in client.GetTasksAsync("", null, null, null, null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); +} +]]> +This sample shows how to call GetTasksAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BinaryData item in client.GetTasksAsync("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", new string[] { "" }, new string[] { "" }, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result.GetProperty("lastModified").ToString()); + Console.WriteLine(result.GetProperty("creationTime").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodes")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodes")[0].GetProperty("exitOptions").GetProperty("jobAction").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodes")[0].GetProperty("exitOptions").GetProperty("dependencyAction").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodeRanges")[0].GetProperty("start").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodeRanges")[0].GetProperty("end").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodeRanges")[0].GetProperty("exitOptions").GetProperty("jobAction").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodeRanges")[0].GetProperty("exitOptions").GetProperty("dependencyAction").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("preProcessingError").GetProperty("jobAction").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("preProcessingError").GetProperty("dependencyAction").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("fileUploadError").GetProperty("jobAction").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("fileUploadError").GetProperty("dependencyAction").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("default").GetProperty("jobAction").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("default").GetProperty("dependencyAction").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); + Console.WriteLine(result.GetProperty("previousState").ToString()); + Console.WriteLine(result.GetProperty("previousStateTransitionTime").ToString()); + Console.WriteLine(result.GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("filePattern").ToString()); + Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("path").ToString()); + Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("uploadOptions").GetProperty("uploadCondition").ToString()); + Console.WriteLine(result.GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("affinityInfo").GetProperty("affinityId").ToString()); + Console.WriteLine(result.GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); + Console.WriteLine(result.GetProperty("constraints").GetProperty("retentionTime").ToString()); + Console.WriteLine(result.GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("requiredSlots").ToString()); + Console.WriteLine(result.GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("exitCode").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("containerId").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("error").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("retryCount").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("lastRetryTime").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("requeueCount").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("lastRequeueTime").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("result").ToString()); + Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("affinityId").ToString()); + Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("nodeUrl").ToString()); + Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("poolId").ToString()); + Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("nodeId").ToString()); + Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("taskRootDirectory").ToString()); + Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("taskRootDirectoryUrl").ToString()); + Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("numberOfInstances").ToString()); + Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("coordinationCommandLine").ToString()); + Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("lastUpdateTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("userCPUTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("kernelCPUTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("wallClockTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("readIOps").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOps").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("readIOGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("waitTime").ToString()); + Console.WriteLine(result.GetProperty("dependsOn").GetProperty("taskIds")[0].ToString()); + Console.WriteLine(result.GetProperty("dependsOn").GetProperty("taskIdRanges")[0].GetProperty("start").ToString()); + Console.WriteLine(result.GetProperty("dependsOn").GetProperty("taskIdRanges")[0].GetProperty("end").ToString()); + Console.WriteLine(result.GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); + Console.WriteLine(result.GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("authenticationTokenSettings").GetProperty("access")[0].ToString()); +} +]]> + + + +This sample shows how to call GetSubTasksAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BatchSubtask item in client.GetSubTasksAsync("", "")) +{ +} +]]> +This sample shows how to call GetSubTasksAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BatchSubtask item in client.GetSubTasksAsync("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), select: new string[] { "" })) +{ +} +]]> + + + +This sample shows how to call GetSubTasksAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BinaryData item in client.GetSubTasksAsync("", "", null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); +} +]]> +This sample shows how to call GetSubTasksAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BinaryData item in client.GetSubTasksAsync("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), new string[] { "" }, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("affinityId").ToString()); + Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("nodeUrl").ToString()); + Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("poolId").ToString()); + Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("nodeId").ToString()); + Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("taskRootDirectory").ToString()); + Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("taskRootDirectoryUrl").ToString()); + Console.WriteLine(result.GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("exitCode").ToString()); + Console.WriteLine(result.GetProperty("containerInfo").GetProperty("containerId").ToString()); + Console.WriteLine(result.GetProperty("containerInfo").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("containerInfo").GetProperty("error").ToString()); + Console.WriteLine(result.GetProperty("failureInfo").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("failureInfo").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("failureInfo").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("failureInfo").GetProperty("details")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("failureInfo").GetProperty("details")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); + Console.WriteLine(result.GetProperty("previousState").ToString()); + Console.WriteLine(result.GetProperty("previousStateTransitionTime").ToString()); + Console.WriteLine(result.GetProperty("result").ToString()); +} +]]> + + + +This sample shows how to call GetTaskFilesAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BatchNodeFile item in client.GetTaskFilesAsync("", "")) +{ +} +]]> +This sample shows how to call GetTaskFilesAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BatchNodeFile item in client.GetTaskFilesAsync("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", recursive: true)) +{ +} +]]> + + + +This sample shows how to call GetTaskFiles. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +foreach (BatchNodeFile item in client.GetTaskFiles("", "")) +{ +} +]]> +This sample shows how to call GetTaskFiles with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +foreach (BatchNodeFile item in client.GetTaskFiles("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", recursive: true)) +{ +} +]]> + + + +This sample shows how to call GetTaskFilesAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BinaryData item in client.GetTaskFilesAsync("", "", null, null, null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); +} +]]> +This sample shows how to call GetTaskFilesAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BinaryData item in client.GetTaskFilesAsync("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", true, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("isDirectory").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("creationTime").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("lastModified").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("contentLength").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("contentType").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("fileMode").ToString()); +} +]]> + + + +This sample shows how to call GetTaskFiles and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +foreach (BinaryData item in client.GetTaskFiles("", "", null, null, null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); +} +]]> +This sample shows how to call GetTaskFiles with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +foreach (BinaryData item in client.GetTaskFiles("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", true, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("isDirectory").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("creationTime").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("lastModified").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("contentLength").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("contentType").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("fileMode").ToString()); +} +]]> + + + +This sample shows how to call GetNodesAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BatchNode item in client.GetNodesAsync("")) +{ +} +]]> +This sample shows how to call GetNodesAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BatchNode item in client.GetNodesAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", select: new string[] { "" })) +{ +} +]]> + + + +This sample shows how to call GetNodesAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BinaryData item in client.GetNodesAsync("", null, null, null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); +} +]]> +This sample shows how to call GetNodesAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BinaryData item in client.GetNodesAsync("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", new string[] { "" }, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("schedulingState").ToString()); + Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); + Console.WriteLine(result.GetProperty("lastBootTime").ToString()); + Console.WriteLine(result.GetProperty("allocationTime").ToString()); + Console.WriteLine(result.GetProperty("ipAddress").ToString()); + Console.WriteLine(result.GetProperty("affinityId").ToString()); + Console.WriteLine(result.GetProperty("vmSize").ToString()); + Console.WriteLine(result.GetProperty("totalTasksRun").ToString()); + Console.WriteLine(result.GetProperty("runningTasksCount").ToString()); + Console.WriteLine(result.GetProperty("runningTaskSlotsCount").ToString()); + Console.WriteLine(result.GetProperty("totalTasksSucceeded").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("taskUrl").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("taskId").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("subtaskId").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("taskState").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("exitCode").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("containerId").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("error").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("retryCount").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("lastRetryTime").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("requeueCount").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("lastRequeueTime").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("result").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("waitForSuccess").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("exitCode").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("containerInfo").GetProperty("containerId").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("containerInfo").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("containerInfo").GetProperty("error").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("retryCount").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("lastRetryTime").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("result").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("errorDetails")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("errorDetails")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("isDedicated").ToString()); + Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("protocol").ToString()); + Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("publicIPAddress").ToString()); + Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("publicFQDN").ToString()); + Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("frontendPort").ToString()); + Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("backendPort").ToString()); + Console.WriteLine(result.GetProperty("nodeAgentInfo").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("nodeAgentInfo").GetProperty("lastUpdateTime").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("publisher").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("offer").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("sku").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("exactVersion").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("scaleSetVmResourceId").ToString()); +} +]]> + + + +This sample shows how to call GetNodeExtensionsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BatchNodeVMExtension item in client.GetNodeExtensionsAsync("", "")) +{ +} +]]> +This sample shows how to call GetNodeExtensionsAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BatchNodeVMExtension item in client.GetNodeExtensionsAsync("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, select: new string[] { "" })) +{ +} +]]> + + + +This sample shows how to call GetNodeExtensionsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BinaryData item in client.GetNodeExtensionsAsync("", "", null, null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); +} +]]> +This sample shows how to call GetNodeExtensionsAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BinaryData item in client.GetNodeExtensionsAsync("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, new string[] { "" }, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("provisioningState").ToString()); + Console.WriteLine(result.GetProperty("vmExtension").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("vmExtension").GetProperty("publisher").ToString()); + Console.WriteLine(result.GetProperty("vmExtension").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("vmExtension").GetProperty("typeHandlerVersion").ToString()); + Console.WriteLine(result.GetProperty("vmExtension").GetProperty("autoUpgradeMinorVersion").ToString()); + Console.WriteLine(result.GetProperty("vmExtension").GetProperty("enableAutomaticUpgrade").ToString()); + Console.WriteLine(result.GetProperty("vmExtension").GetProperty("settings").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("vmExtension").GetProperty("protectedSettings").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("vmExtension").GetProperty("provisionAfterExtensions")[0].ToString()); + Console.WriteLine(result.GetProperty("instanceView").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("displayStatus").ToString()); + Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("level").ToString()); + Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("time").ToString()); + Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("displayStatus").ToString()); + Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("level").ToString()); + Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("time").ToString()); +} +]]> + + + +This sample shows how to call GetNodeFilesAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BatchNodeFile item in client.GetNodeFilesAsync("", "")) +{ +} +]]> +This sample shows how to call GetNodeFilesAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BatchNodeFile item in client.GetNodeFilesAsync("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", recursive: true)) +{ +} +]]> + + + +This sample shows how to call GetNodeFiles. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +foreach (BatchNodeFile item in client.GetNodeFiles("", "")) +{ +} +]]> +This sample shows how to call GetNodeFiles with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +foreach (BatchNodeFile item in client.GetNodeFiles("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", recursive: true)) +{ +} +]]> + + + +This sample shows how to call GetNodeFilesAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BinaryData item in client.GetNodeFilesAsync("", "", null, null, null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); +} +]]> +This sample shows how to call GetNodeFilesAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +await foreach (BinaryData item in client.GetNodeFilesAsync("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", true, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("isDirectory").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("creationTime").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("lastModified").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("contentLength").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("contentType").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("fileMode").ToString()); +} +]]> + + + +This sample shows how to call GetNodeFiles and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +foreach (BinaryData item in client.GetNodeFiles("", "", null, null, null, null, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); +} +]]> +This sample shows how to call GetNodeFiles with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +BatchClient client = new BatchClient(endpoint, credential); + +foreach (BinaryData item in client.GetNodeFiles("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", true, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("isDirectory").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("creationTime").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("lastModified").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("contentLength").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("contentType").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("fileMode").ToString()); +} +]]> + + + \ No newline at end of file diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/DynamicVNetAssignmentScope.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/DynamicVNetAssignmentScope.cs new file mode 100644 index 0000000000000..c8acdcc564757 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/DynamicVNetAssignmentScope.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.Compute.Batch +{ + /// DynamicVNetAssignmentScope enums. + public readonly partial struct DynamicVNetAssignmentScope : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DynamicVNetAssignmentScope(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "none"; + private const string JobValue = "job"; + + /// No dynamic VNet assignment is enabled. + public static DynamicVNetAssignmentScope None { get; } = new DynamicVNetAssignmentScope(NoneValue); + /// Dynamic VNet assignment is done per-job. + public static DynamicVNetAssignmentScope Job { get; } = new DynamicVNetAssignmentScope(JobValue); + /// Determines if two values are the same. + public static bool operator ==(DynamicVNetAssignmentScope left, DynamicVNetAssignmentScope right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DynamicVNetAssignmentScope left, DynamicVNetAssignmentScope right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DynamicVNetAssignmentScope(string value) => new DynamicVNetAssignmentScope(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DynamicVNetAssignmentScope other && Equals(other); + /// + public bool Equals(DynamicVNetAssignmentScope other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/ElevationLevel.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/ElevationLevel.cs new file mode 100644 index 0000000000000..5ae5ea4d0fb00 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/ElevationLevel.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.Compute.Batch +{ + /// ElevationLevel enums. + public readonly partial struct ElevationLevel : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ElevationLevel(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NonAdminValue = "nonadmin"; + private const string AdminValue = "admin"; + + /// The user is a standard user without elevated access. + public static ElevationLevel NonAdmin { get; } = new ElevationLevel(NonAdminValue); + /// The user is a user with elevated access and operates with full Administrator permissions. + public static ElevationLevel Admin { get; } = new ElevationLevel(AdminValue); + /// Determines if two values are the same. + public static bool operator ==(ElevationLevel left, ElevationLevel right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ElevationLevel left, ElevationLevel right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ElevationLevel(string value) => new ElevationLevel(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ElevationLevel other && Equals(other); + /// + public bool Equals(ElevationLevel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/EnvironmentSetting.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/EnvironmentSetting.Serialization.cs new file mode 100644 index 0000000000000..5394104578495 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/EnvironmentSetting.Serialization.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class EnvironmentSetting : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EnvironmentSetting)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + EnvironmentSetting IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EnvironmentSetting)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEnvironmentSetting(document.RootElement, options); + } + + internal static EnvironmentSetting DeserializeEnvironmentSetting(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EnvironmentSetting(name, value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EnvironmentSetting)} does not support writing '{options.Format}' format."); + } + } + + EnvironmentSetting IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeEnvironmentSetting(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EnvironmentSetting)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static EnvironmentSetting FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeEnvironmentSetting(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/EnvironmentSetting.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/EnvironmentSetting.cs new file mode 100644 index 0000000000000..bde5afca2aa79 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/EnvironmentSetting.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// An environment variable to be set on a Task process. + public partial class EnvironmentSetting + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The name of the environment variable. + /// is null. + public EnvironmentSetting(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + } + + /// Initializes a new instance of . + /// The name of the environment variable. + /// The value of the environment variable. + /// Keeps track of any properties unknown to the library. + internal EnvironmentSetting(string name, string value, IDictionary serializedAdditionalRawData) + { + Name = name; + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EnvironmentSetting() + { + } + + /// The name of the environment variable. + public string Name { get; set; } + /// The value of the environment variable. + public string Value { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/ErrorCategory.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/ErrorCategory.cs new file mode 100644 index 0000000000000..5927eb4a76ea1 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/ErrorCategory.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.Compute.Batch +{ + /// ErrorCategory enums. + public readonly partial struct ErrorCategory : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ErrorCategory(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UserErrorValue = "usererror"; + private const string ServerErrorValue = "servererror"; + + /// The error is due to a user issue, such as misconfiguration. + public static ErrorCategory UserError { get; } = new ErrorCategory(UserErrorValue); + /// The error is due to an internal server issue. + public static ErrorCategory ServerError { get; } = new ErrorCategory(ServerErrorValue); + /// Determines if two values are the same. + public static bool operator ==(ErrorCategory left, ErrorCategory right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ErrorCategory left, ErrorCategory right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ErrorCategory(string value) => new ErrorCategory(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ErrorCategory other && Equals(other); + /// + public bool Equals(ErrorCategory other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/ExitCodeMapping.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/ExitCodeMapping.Serialization.cs new file mode 100644 index 0000000000000..9ec340db7bde9 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/ExitCodeMapping.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class ExitCodeMapping : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExitCodeMapping)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("code"u8); + writer.WriteNumberValue(Code); + writer.WritePropertyName("exitOptions"u8); + writer.WriteObjectValue(ExitOptions, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ExitCodeMapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExitCodeMapping)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExitCodeMapping(document.RootElement, options); + } + + internal static ExitCodeMapping DeserializeExitCodeMapping(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int code = default; + ExitOptions exitOptions = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + code = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("exitOptions"u8)) + { + exitOptions = ExitOptions.DeserializeExitOptions(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExitCodeMapping(code, exitOptions, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExitCodeMapping)} does not support writing '{options.Format}' format."); + } + } + + ExitCodeMapping IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExitCodeMapping(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExitCodeMapping)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExitCodeMapping FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExitCodeMapping(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/ExitCodeMapping.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/ExitCodeMapping.cs new file mode 100644 index 0000000000000..8f7079c931814 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/ExitCodeMapping.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; + +namespace Azure.Compute.Batch +{ + /// + /// How the Batch service should respond if a Task exits with a particular exit + /// code. + /// + public partial class ExitCodeMapping + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// A process exit code. + /// How the Batch service should respond if the Task exits with this exit code. + /// is null. + public ExitCodeMapping(int code, ExitOptions exitOptions) + { + Argument.AssertNotNull(exitOptions, nameof(exitOptions)); + + Code = code; + ExitOptions = exitOptions; + } + + /// Initializes a new instance of . + /// A process exit code. + /// How the Batch service should respond if the Task exits with this exit code. + /// Keeps track of any properties unknown to the library. + internal ExitCodeMapping(int code, ExitOptions exitOptions, IDictionary serializedAdditionalRawData) + { + Code = code; + ExitOptions = exitOptions; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExitCodeMapping() + { + } + + /// A process exit code. + public int Code { get; set; } + /// How the Batch service should respond if the Task exits with this exit code. + public ExitOptions ExitOptions { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/ExitCodeRangeMapping.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/ExitCodeRangeMapping.Serialization.cs new file mode 100644 index 0000000000000..d7ee046886d24 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/ExitCodeRangeMapping.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class ExitCodeRangeMapping : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExitCodeRangeMapping)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("start"u8); + writer.WriteNumberValue(Start); + writer.WritePropertyName("end"u8); + writer.WriteNumberValue(End); + writer.WritePropertyName("exitOptions"u8); + writer.WriteObjectValue(ExitOptions, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ExitCodeRangeMapping IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExitCodeRangeMapping)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExitCodeRangeMapping(document.RootElement, options); + } + + internal static ExitCodeRangeMapping DeserializeExitCodeRangeMapping(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int start = default; + int end = default; + ExitOptions exitOptions = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("start"u8)) + { + start = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("end"u8)) + { + end = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("exitOptions"u8)) + { + exitOptions = ExitOptions.DeserializeExitOptions(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExitCodeRangeMapping(start, end, exitOptions, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExitCodeRangeMapping)} does not support writing '{options.Format}' format."); + } + } + + ExitCodeRangeMapping IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExitCodeRangeMapping(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExitCodeRangeMapping)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExitCodeRangeMapping FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExitCodeRangeMapping(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/ExitCodeRangeMapping.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/ExitCodeRangeMapping.cs new file mode 100644 index 0000000000000..62ff19d384397 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/ExitCodeRangeMapping.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// + /// A range of exit codes and how the Batch service should respond to exit codes + /// within that range. + /// + public partial class ExitCodeRangeMapping + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The first exit code in the range. + /// The last exit code in the range. + /// How the Batch service should respond if the Task exits with an exit code in the range start to end (inclusive). + /// is null. + public ExitCodeRangeMapping(int start, int end, ExitOptions exitOptions) + { + Argument.AssertNotNull(exitOptions, nameof(exitOptions)); + + Start = start; + End = end; + ExitOptions = exitOptions; + } + + /// Initializes a new instance of . + /// The first exit code in the range. + /// The last exit code in the range. + /// How the Batch service should respond if the Task exits with an exit code in the range start to end (inclusive). + /// Keeps track of any properties unknown to the library. + internal ExitCodeRangeMapping(int start, int end, ExitOptions exitOptions, IDictionary serializedAdditionalRawData) + { + Start = start; + End = end; + ExitOptions = exitOptions; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExitCodeRangeMapping() + { + } + + /// The first exit code in the range. + public int Start { get; set; } + /// The last exit code in the range. + public int End { get; set; } + /// How the Batch service should respond if the Task exits with an exit code in the range start to end (inclusive). + public ExitOptions ExitOptions { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/ExitConditions.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/ExitConditions.Serialization.cs new file mode 100644 index 0000000000000..68222969f5684 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/ExitConditions.Serialization.cs @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class ExitConditions : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExitConditions)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(ExitCodes)) + { + writer.WritePropertyName("exitCodes"u8); + writer.WriteStartArray(); + foreach (var item in ExitCodes) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ExitCodeRanges)) + { + writer.WritePropertyName("exitCodeRanges"u8); + writer.WriteStartArray(); + foreach (var item in ExitCodeRanges) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(PreProcessingError)) + { + writer.WritePropertyName("preProcessingError"u8); + writer.WriteObjectValue(PreProcessingError, options); + } + if (Optional.IsDefined(FileUploadError)) + { + writer.WritePropertyName("fileUploadError"u8); + writer.WriteObjectValue(FileUploadError, options); + } + if (Optional.IsDefined(Default)) + { + writer.WritePropertyName("default"u8); + writer.WriteObjectValue(Default, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ExitConditions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExitConditions)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExitConditions(document.RootElement, options); + } + + internal static ExitConditions DeserializeExitConditions(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList exitCodes = default; + IList exitCodeRanges = default; + ExitOptions preProcessingError = default; + ExitOptions fileUploadError = default; + ExitOptions @default = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("exitCodes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExitCodeMapping.DeserializeExitCodeMapping(item, options)); + } + exitCodes = array; + continue; + } + if (property.NameEquals("exitCodeRanges"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExitCodeRangeMapping.DeserializeExitCodeRangeMapping(item, options)); + } + exitCodeRanges = array; + continue; + } + if (property.NameEquals("preProcessingError"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + preProcessingError = ExitOptions.DeserializeExitOptions(property.Value, options); + continue; + } + if (property.NameEquals("fileUploadError"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + fileUploadError = ExitOptions.DeserializeExitOptions(property.Value, options); + continue; + } + if (property.NameEquals("default"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + @default = ExitOptions.DeserializeExitOptions(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExitConditions( + exitCodes ?? new ChangeTrackingList(), + exitCodeRanges ?? new ChangeTrackingList(), + preProcessingError, + fileUploadError, + @default, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExitConditions)} does not support writing '{options.Format}' format."); + } + } + + ExitConditions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExitConditions(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExitConditions)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExitConditions FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExitConditions(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/ExitConditions.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/ExitConditions.cs new file mode 100644 index 0000000000000..7e09b68f12a72 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/ExitConditions.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Specifies how the Batch service should respond when the Task completes. + public partial class ExitConditions + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExitConditions() + { + ExitCodes = new ChangeTrackingList(); + ExitCodeRanges = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// A list of individual Task exit codes and how the Batch service should respond to them. + /// A list of Task exit code ranges and how the Batch service should respond to them. + /// How the Batch service should respond if the Task fails to start due to an error. + /// How the Batch service should respond if a file upload error occurs. If the Task exited with an exit code that was specified via exitCodes or exitCodeRanges, and then encountered a file upload error, then the action specified by the exit code takes precedence. + /// How the Batch service should respond if the Task fails with an exit condition not covered by any of the other properties. This value is used if the Task exits with any nonzero exit code not listed in the exitCodes or exitCodeRanges collection, with a pre-processing error if the preProcessingError property is not present, or with a file upload error if the fileUploadError property is not present. If you want non-default behavior on exit code 0, you must list it explicitly using the exitCodes or exitCodeRanges collection. + /// Keeps track of any properties unknown to the library. + internal ExitConditions(IList exitCodes, IList exitCodeRanges, ExitOptions preProcessingError, ExitOptions fileUploadError, ExitOptions @default, IDictionary serializedAdditionalRawData) + { + ExitCodes = exitCodes; + ExitCodeRanges = exitCodeRanges; + PreProcessingError = preProcessingError; + FileUploadError = fileUploadError; + Default = @default; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// A list of individual Task exit codes and how the Batch service should respond to them. + public IList ExitCodes { get; } + /// A list of Task exit code ranges and how the Batch service should respond to them. + public IList ExitCodeRanges { get; } + /// How the Batch service should respond if the Task fails to start due to an error. + public ExitOptions PreProcessingError { get; set; } + /// How the Batch service should respond if a file upload error occurs. If the Task exited with an exit code that was specified via exitCodes or exitCodeRanges, and then encountered a file upload error, then the action specified by the exit code takes precedence. + public ExitOptions FileUploadError { get; set; } + /// How the Batch service should respond if the Task fails with an exit condition not covered by any of the other properties. This value is used if the Task exits with any nonzero exit code not listed in the exitCodes or exitCodeRanges collection, with a pre-processing error if the preProcessingError property is not present, or with a file upload error if the fileUploadError property is not present. If you want non-default behavior on exit code 0, you must list it explicitly using the exitCodes or exitCodeRanges collection. + public ExitOptions Default { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/ExitOptions.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/ExitOptions.Serialization.cs new file mode 100644 index 0000000000000..6c8e87057cb4e --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/ExitOptions.Serialization.cs @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class ExitOptions : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExitOptions)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(JobAction)) + { + writer.WritePropertyName("jobAction"u8); + writer.WriteStringValue(JobAction.Value.ToString()); + } + if (Optional.IsDefined(DependencyAction)) + { + writer.WritePropertyName("dependencyAction"u8); + writer.WriteStringValue(DependencyAction.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ExitOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExitOptions)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExitOptions(document.RootElement, options); + } + + internal static ExitOptions DeserializeExitOptions(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BatchJobAction? jobAction = default; + DependencyAction? dependencyAction = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobAction"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + jobAction = new BatchJobAction(property.Value.GetString()); + continue; + } + if (property.NameEquals("dependencyAction"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dependencyAction = new DependencyAction(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExitOptions(jobAction, dependencyAction, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExitOptions)} does not support writing '{options.Format}' format."); + } + } + + ExitOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExitOptions(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExitOptions)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ExitOptions FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeExitOptions(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/ExitOptions.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/ExitOptions.cs new file mode 100644 index 0000000000000..43cee79c97f75 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/ExitOptions.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Specifies how the Batch service responds to a particular exit condition. + public partial class ExitOptions + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExitOptions() + { + } + + /// Initializes a new instance of . + /// An action to take on the Job containing the Task, if the Task completes with the given exit condition and the Job's onTaskFailed property is 'performExitOptionsJobAction'. The default is none for exit code 0 and terminate for all other exit conditions. If the Job's onTaskFailed property is noaction, then specifying this property returns an error and the add Task request fails with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + /// An action that the Batch service performs on Tasks that depend on this Task. Possible values are 'satisfy' (allowing dependent tasks to progress) and 'block' (dependent tasks continue to wait). Batch does not yet support cancellation of dependent tasks. + /// Keeps track of any properties unknown to the library. + internal ExitOptions(BatchJobAction? jobAction, DependencyAction? dependencyAction, IDictionary serializedAdditionalRawData) + { + JobAction = jobAction; + DependencyAction = dependencyAction; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// An action to take on the Job containing the Task, if the Task completes with the given exit condition and the Job's onTaskFailed property is 'performExitOptionsJobAction'. The default is none for exit code 0 and terminate for all other exit conditions. If the Job's onTaskFailed property is noaction, then specifying this property returns an error and the add Task request fails with an invalid property value error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). + public BatchJobAction? JobAction { get; set; } + /// An action that the Batch service performs on Tasks that depend on this Task. Possible values are 'satisfy' (allowing dependent tasks to progress) and 'block' (dependent tasks continue to wait). Batch does not yet support cancellation of dependent tasks. + public DependencyAction? DependencyAction { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/FileProperties.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/FileProperties.Serialization.cs new file mode 100644 index 0000000000000..b0ab715bf8ca1 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/FileProperties.Serialization.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class FileProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FileProperties)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(CreationTime)) + { + writer.WritePropertyName("creationTime"u8); + writer.WriteStringValue(CreationTime.Value, "O"); + } + writer.WritePropertyName("lastModified"u8); + writer.WriteStringValue(LastModified, "O"); + writer.WritePropertyName("contentLength"u8); + writer.WriteNumberValue(ContentLength); + if (Optional.IsDefined(ContentType)) + { + writer.WritePropertyName("contentType"u8); + writer.WriteStringValue(ContentType); + } + if (Optional.IsDefined(FileMode)) + { + writer.WritePropertyName("fileMode"u8); + writer.WriteStringValue(FileMode); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + FileProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FileProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFileProperties(document.RootElement, options); + } + + internal static FileProperties DeserializeFileProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? creationTime = default; + DateTimeOffset lastModified = default; + long contentLength = default; + string contentType = default; + string fileMode = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("creationTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + creationTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastModified"u8)) + { + lastModified = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("contentLength"u8)) + { + contentLength = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("contentType"u8)) + { + contentType = property.Value.GetString(); + continue; + } + if (property.NameEquals("fileMode"u8)) + { + fileMode = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FileProperties( + creationTime, + lastModified, + contentLength, + contentType, + fileMode, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FileProperties)} does not support writing '{options.Format}' format."); + } + } + + FileProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeFileProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FileProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static FileProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeFileProperties(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/FileProperties.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/FileProperties.cs new file mode 100644 index 0000000000000..62a026bccce26 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/FileProperties.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// The properties of a file on a Compute Node. + public partial class FileProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The time at which the file was last modified. + /// The length of the file. + internal FileProperties(DateTimeOffset lastModified, long contentLength) + { + LastModified = lastModified; + ContentLength = contentLength; + } + + /// Initializes a new instance of . + /// The file creation time. The creation time is not returned for files on Linux Compute Nodes. + /// The time at which the file was last modified. + /// The length of the file. + /// The content type of the file. + /// The file mode attribute in octal format. The file mode is returned only for files on Linux Compute Nodes. + /// Keeps track of any properties unknown to the library. + internal FileProperties(DateTimeOffset? creationTime, DateTimeOffset lastModified, long contentLength, string contentType, string fileMode, IDictionary serializedAdditionalRawData) + { + CreationTime = creationTime; + LastModified = lastModified; + ContentLength = contentLength; + ContentType = contentType; + FileMode = fileMode; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal FileProperties() + { + } + + /// The file creation time. The creation time is not returned for files on Linux Compute Nodes. + public DateTimeOffset? CreationTime { get; } + /// The time at which the file was last modified. + public DateTimeOffset LastModified { get; } + /// The length of the file. + public long ContentLength { get; } + /// The content type of the file. + public string ContentType { get; } + /// The file mode attribute in octal format. The file mode is returned only for files on Linux Compute Nodes. + public string FileMode { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/HttpHeader.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/HttpHeader.Serialization.cs new file mode 100644 index 0000000000000..09ded47c08e7b --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/HttpHeader.Serialization.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class HttpHeader : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HttpHeader)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + HttpHeader IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HttpHeader)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeHttpHeader(document.RootElement, options); + } + + internal static HttpHeader DeserializeHttpHeader(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new HttpHeader(name, value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(HttpHeader)} does not support writing '{options.Format}' format."); + } + } + + HttpHeader IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeHttpHeader(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(HttpHeader)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static HttpHeader FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeHttpHeader(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/HttpHeader.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/HttpHeader.cs new file mode 100644 index 0000000000000..90e588da517ea --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/HttpHeader.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// An HTTP header name-value pair. + public partial class HttpHeader + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The case-insensitive name of the header to be used while uploading output files. + /// is null. + public HttpHeader(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + } + + /// Initializes a new instance of . + /// The case-insensitive name of the header to be used while uploading output files. + /// The value of the header to be used while uploading output files. + /// Keeps track of any properties unknown to the library. + internal HttpHeader(string name, string value, IDictionary serializedAdditionalRawData) + { + Name = name; + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal HttpHeader() + { + } + + /// The case-insensitive name of the header to be used while uploading output files. + public string Name { get; set; } + /// The value of the header to be used while uploading output files. + public string Value { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/ImageReference.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/ImageReference.Serialization.cs new file mode 100644 index 0000000000000..117fab510ee67 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/ImageReference.Serialization.cs @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class ImageReference : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImageReference)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Publisher)) + { + writer.WritePropertyName("publisher"u8); + writer.WriteStringValue(Publisher); + } + if (Optional.IsDefined(Offer)) + { + writer.WritePropertyName("offer"u8); + writer.WriteStringValue(Offer); + } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteStringValue(Sku); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + } + if (Optional.IsDefined(VirtualMachineImageId)) + { + writer.WritePropertyName("virtualMachineImageId"u8); + writer.WriteStringValue(VirtualMachineImageId); + } + if (options.Format != "W" && Optional.IsDefined(ExactVersion)) + { + writer.WritePropertyName("exactVersion"u8); + writer.WriteStringValue(ExactVersion); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ImageReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImageReference)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeImageReference(document.RootElement, options); + } + + internal static ImageReference DeserializeImageReference(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string publisher = default; + string offer = default; + string sku = default; + string version = default; + string virtualMachineImageId = default; + string exactVersion = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("publisher"u8)) + { + publisher = property.Value.GetString(); + continue; + } + if (property.NameEquals("offer"u8)) + { + offer = property.Value.GetString(); + continue; + } + if (property.NameEquals("sku"u8)) + { + sku = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + version = property.Value.GetString(); + continue; + } + if (property.NameEquals("virtualMachineImageId"u8)) + { + virtualMachineImageId = property.Value.GetString(); + continue; + } + if (property.NameEquals("exactVersion"u8)) + { + exactVersion = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ImageReference( + publisher, + offer, + sku, + version, + virtualMachineImageId, + exactVersion, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ImageReference)} does not support writing '{options.Format}' format."); + } + } + + ImageReference IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeImageReference(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ImageReference)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ImageReference FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeImageReference(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/ImageReference.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/ImageReference.cs new file mode 100644 index 0000000000000..6c5cb5fc883f4 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/ImageReference.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// + /// A reference to an Azure Virtual Machines Marketplace Image or a Azure Compute Gallery Image. + /// To get the list of all Azure Marketplace Image references verified by Azure Batch, see the + /// ' List Supported Images ' operation. + /// + public partial class ImageReference + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ImageReference() + { + } + + /// Initializes a new instance of . + /// The publisher of the Azure Virtual Machines Marketplace Image. For example, Canonical or MicrosoftWindowsServer. + /// The offer type of the Azure Virtual Machines Marketplace Image. For example, UbuntuServer or WindowsServer. + /// The SKU of the Azure Virtual Machines Marketplace Image. For example, 18.04-LTS or 2019-Datacenter. + /// The version of the Azure Virtual Machines Marketplace Image. A value of 'latest' can be specified to select the latest version of an Image. If omitted, the default is 'latest'. + /// The ARM resource identifier of the Azure Compute Gallery Image. Compute Nodes in the Pool will be created using this Image Id. This is of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{VersionId} or /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName} for always defaulting to the latest image version. This property is mutually exclusive with other ImageReference properties. The Azure Compute Gallery Image must have replicas in the same region and must be in the same subscription as the Azure Batch account. If the image version is not specified in the imageId, the latest version will be used. For information about the firewall settings for the Batch Compute Node agent to communicate with the Batch service see https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + /// The specific version of the platform image or marketplace image used to create the node. This read-only field differs from 'version' only if the value specified for 'version' when the pool was created was 'latest'. + /// Keeps track of any properties unknown to the library. + internal ImageReference(string publisher, string offer, string sku, string version, string virtualMachineImageId, string exactVersion, IDictionary serializedAdditionalRawData) + { + Publisher = publisher; + Offer = offer; + Sku = sku; + Version = version; + VirtualMachineImageId = virtualMachineImageId; + ExactVersion = exactVersion; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The publisher of the Azure Virtual Machines Marketplace Image. For example, Canonical or MicrosoftWindowsServer. + public string Publisher { get; set; } + /// The offer type of the Azure Virtual Machines Marketplace Image. For example, UbuntuServer or WindowsServer. + public string Offer { get; set; } + /// The SKU of the Azure Virtual Machines Marketplace Image. For example, 18.04-LTS or 2019-Datacenter. + public string Sku { get; set; } + /// The version of the Azure Virtual Machines Marketplace Image. A value of 'latest' can be specified to select the latest version of an Image. If omitted, the default is 'latest'. + public string Version { get; set; } + /// The ARM resource identifier of the Azure Compute Gallery Image. Compute Nodes in the Pool will be created using this Image Id. This is of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{VersionId} or /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName} for always defaulting to the latest image version. This property is mutually exclusive with other ImageReference properties. The Azure Compute Gallery Image must have replicas in the same region and must be in the same subscription as the Azure Batch account. If the image version is not specified in the imageId, the latest version will be used. For information about the firewall settings for the Batch Compute Node agent to communicate with the Batch service see https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + public string VirtualMachineImageId { get; set; } + /// The specific version of the platform image or marketplace image used to create the node. This read-only field differs from 'version' only if the value specified for 'version' when the pool was created was 'latest'. + public string ExactVersion { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/ImageVerificationType.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/ImageVerificationType.cs new file mode 100644 index 0000000000000..690502ed23b58 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/ImageVerificationType.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.Compute.Batch +{ + /// ImageVerificationType enums. + public readonly partial struct ImageVerificationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ImageVerificationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string VerifiedValue = "verified"; + private const string UnverifiedValue = "unverified"; + + /// The Image is guaranteed to be compatible with the associated Compute Node agent SKU and all Batch features have been confirmed to work as expected. + public static ImageVerificationType Verified { get; } = new ImageVerificationType(VerifiedValue); + /// The associated Compute Node agent SKU should have binary compatibility with the Image, but specific functionality has not been verified. + public static ImageVerificationType Unverified { get; } = new ImageVerificationType(UnverifiedValue); + /// Determines if two values are the same. + public static bool operator ==(ImageVerificationType left, ImageVerificationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ImageVerificationType left, ImageVerificationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ImageVerificationType(string value) => new ImageVerificationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ImageVerificationType other && Equals(other); + /// + public bool Equals(ImageVerificationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/InboundEndpoint.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/InboundEndpoint.Serialization.cs new file mode 100644 index 0000000000000..1601adf208238 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/InboundEndpoint.Serialization.cs @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class InboundEndpoint : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InboundEndpoint)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("protocol"u8); + writer.WriteStringValue(Protocol.ToString()); + writer.WritePropertyName("publicIPAddress"u8); + writer.WriteStringValue(PublicIpAddress); + writer.WritePropertyName("publicFQDN"u8); + writer.WriteStringValue(PublicFQDN); + writer.WritePropertyName("frontendPort"u8); + writer.WriteNumberValue(FrontendPort); + writer.WritePropertyName("backendPort"u8); + writer.WriteNumberValue(BackendPort); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + InboundEndpoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InboundEndpoint)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInboundEndpoint(document.RootElement, options); + } + + internal static InboundEndpoint DeserializeInboundEndpoint(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + InboundEndpointProtocol protocol = default; + string publicIPAddress = default; + string publicFQDN = default; + int frontendPort = default; + int backendPort = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("protocol"u8)) + { + protocol = new InboundEndpointProtocol(property.Value.GetString()); + continue; + } + if (property.NameEquals("publicIPAddress"u8)) + { + publicIPAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("publicFQDN"u8)) + { + publicFQDN = property.Value.GetString(); + continue; + } + if (property.NameEquals("frontendPort"u8)) + { + frontendPort = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("backendPort"u8)) + { + backendPort = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new InboundEndpoint( + name, + protocol, + publicIPAddress, + publicFQDN, + frontendPort, + backendPort, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InboundEndpoint)} does not support writing '{options.Format}' format."); + } + } + + InboundEndpoint IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeInboundEndpoint(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InboundEndpoint)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static InboundEndpoint FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeInboundEndpoint(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/InboundEndpoint.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/InboundEndpoint.cs new file mode 100644 index 0000000000000..8febab5a4227c --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/InboundEndpoint.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// An inbound endpoint on a Compute Node. + public partial class InboundEndpoint + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The name of the endpoint. + /// The protocol of the endpoint. + /// The public IP address of the Compute Node. + /// The public fully qualified domain name for the Compute Node. + /// The public port number of the endpoint. + /// The backend port number of the endpoint. + /// , or is null. + internal InboundEndpoint(string name, InboundEndpointProtocol protocol, string publicIpAddress, string publicFQDN, int frontendPort, int backendPort) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(publicIpAddress, nameof(publicIpAddress)); + Argument.AssertNotNull(publicFQDN, nameof(publicFQDN)); + + Name = name; + Protocol = protocol; + PublicIpAddress = publicIpAddress; + PublicFQDN = publicFQDN; + FrontendPort = frontendPort; + BackendPort = backendPort; + } + + /// Initializes a new instance of . + /// The name of the endpoint. + /// The protocol of the endpoint. + /// The public IP address of the Compute Node. + /// The public fully qualified domain name for the Compute Node. + /// The public port number of the endpoint. + /// The backend port number of the endpoint. + /// Keeps track of any properties unknown to the library. + internal InboundEndpoint(string name, InboundEndpointProtocol protocol, string publicIpAddress, string publicFQDN, int frontendPort, int backendPort, IDictionary serializedAdditionalRawData) + { + Name = name; + Protocol = protocol; + PublicIpAddress = publicIpAddress; + PublicFQDN = publicFQDN; + FrontendPort = frontendPort; + BackendPort = backendPort; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal InboundEndpoint() + { + } + + /// The name of the endpoint. + public string Name { get; } + /// The protocol of the endpoint. + public InboundEndpointProtocol Protocol { get; } + /// The public IP address of the Compute Node. + public string PublicIpAddress { get; } + /// The public fully qualified domain name for the Compute Node. + public string PublicFQDN { get; } + /// The public port number of the endpoint. + public int FrontendPort { get; } + /// The backend port number of the endpoint. + public int BackendPort { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/InboundEndpointProtocol.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/InboundEndpointProtocol.cs new file mode 100644 index 0000000000000..4bef62e644dd1 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/InboundEndpointProtocol.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.Compute.Batch +{ + /// InboundEndpointProtocol enums. + public readonly partial struct InboundEndpointProtocol : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public InboundEndpointProtocol(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TcpValue = "tcp"; + private const string UdpValue = "udp"; + + /// Use TCP for the endpoint. + public static InboundEndpointProtocol Tcp { get; } = new InboundEndpointProtocol(TcpValue); + /// Use UDP for the endpoint. + public static InboundEndpointProtocol Udp { get; } = new InboundEndpointProtocol(UdpValue); + /// Determines if two values are the same. + public static bool operator ==(InboundEndpointProtocol left, InboundEndpointProtocol right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(InboundEndpointProtocol left, InboundEndpointProtocol right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator InboundEndpointProtocol(string value) => new InboundEndpointProtocol(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is InboundEndpointProtocol other && Equals(other); + /// + public bool Equals(InboundEndpointProtocol other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/InboundNatPool.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/InboundNatPool.Serialization.cs new file mode 100644 index 0000000000000..596bce51442d3 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/InboundNatPool.Serialization.cs @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class InboundNatPool : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InboundNatPool)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("protocol"u8); + writer.WriteStringValue(Protocol.ToString()); + writer.WritePropertyName("backendPort"u8); + writer.WriteNumberValue(BackendPort); + writer.WritePropertyName("frontendPortRangeStart"u8); + writer.WriteNumberValue(FrontendPortRangeStart); + writer.WritePropertyName("frontendPortRangeEnd"u8); + writer.WriteNumberValue(FrontendPortRangeEnd); + if (Optional.IsCollectionDefined(NetworkSecurityGroupRules)) + { + writer.WritePropertyName("networkSecurityGroupRules"u8); + writer.WriteStartArray(); + foreach (var item in NetworkSecurityGroupRules) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + InboundNatPool IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InboundNatPool)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInboundNatPool(document.RootElement, options); + } + + internal static InboundNatPool DeserializeInboundNatPool(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + InboundEndpointProtocol protocol = default; + int backendPort = default; + int frontendPortRangeStart = default; + int frontendPortRangeEnd = default; + IList networkSecurityGroupRules = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("protocol"u8)) + { + protocol = new InboundEndpointProtocol(property.Value.GetString()); + continue; + } + if (property.NameEquals("backendPort"u8)) + { + backendPort = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("frontendPortRangeStart"u8)) + { + frontendPortRangeStart = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("frontendPortRangeEnd"u8)) + { + frontendPortRangeEnd = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("networkSecurityGroupRules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NetworkSecurityGroupRule.DeserializeNetworkSecurityGroupRule(item, options)); + } + networkSecurityGroupRules = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new InboundNatPool( + name, + protocol, + backendPort, + frontendPortRangeStart, + frontendPortRangeEnd, + networkSecurityGroupRules ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InboundNatPool)} does not support writing '{options.Format}' format."); + } + } + + InboundNatPool IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeInboundNatPool(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InboundNatPool)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static InboundNatPool FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeInboundNatPool(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/InboundNatPool.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/InboundNatPool.cs new file mode 100644 index 0000000000000..7dabe3fd9da02 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/InboundNatPool.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// + /// A inbound NAT Pool that can be used to address specific ports on Compute Nodes + /// in a Batch Pool externally. + /// + public partial class InboundNatPool + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The name of the endpoint. The name must be unique within a Batch Pool, can contain letters, numbers, underscores, periods, and hyphens. Names must start with a letter or number, must end with a letter, number, or underscore, and cannot exceed 77 characters. If any invalid values are provided the request fails with HTTP status code 400. + /// The protocol of the endpoint. + /// The port number on the Compute Node. This must be unique within a Batch Pool. Acceptable values are between 1 and 65535 except for 22, 3389, 29876 and 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400. + /// The first port number in the range of external ports that will be used to provide inbound access to the backendPort on individual Compute Nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved. All ranges within a Pool must be distinct and cannot overlap. Each range must contain at least 40 ports. If any reserved or overlapping values are provided the request fails with HTTP status code 400. + /// The last port number in the range of external ports that will be used to provide inbound access to the backendPort on individual Compute Nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved by the Batch service. All ranges within a Pool must be distinct and cannot overlap. Each range must contain at least 40 ports. If any reserved or overlapping values are provided the request fails with HTTP status code 400. + /// is null. + public InboundNatPool(string name, InboundEndpointProtocol protocol, int backendPort, int frontendPortRangeStart, int frontendPortRangeEnd) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + Protocol = protocol; + BackendPort = backendPort; + FrontendPortRangeStart = frontendPortRangeStart; + FrontendPortRangeEnd = frontendPortRangeEnd; + NetworkSecurityGroupRules = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The name of the endpoint. The name must be unique within a Batch Pool, can contain letters, numbers, underscores, periods, and hyphens. Names must start with a letter or number, must end with a letter, number, or underscore, and cannot exceed 77 characters. If any invalid values are provided the request fails with HTTP status code 400. + /// The protocol of the endpoint. + /// The port number on the Compute Node. This must be unique within a Batch Pool. Acceptable values are between 1 and 65535 except for 22, 3389, 29876 and 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400. + /// The first port number in the range of external ports that will be used to provide inbound access to the backendPort on individual Compute Nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved. All ranges within a Pool must be distinct and cannot overlap. Each range must contain at least 40 ports. If any reserved or overlapping values are provided the request fails with HTTP status code 400. + /// The last port number in the range of external ports that will be used to provide inbound access to the backendPort on individual Compute Nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved by the Batch service. All ranges within a Pool must be distinct and cannot overlap. Each range must contain at least 40 ports. If any reserved or overlapping values are provided the request fails with HTTP status code 400. + /// A list of network security group rules that will be applied to the endpoint. The maximum number of rules that can be specified across all the endpoints on a Batch Pool is 25. If no network security group rules are specified, a default rule will be created to allow inbound access to the specified backendPort. If the maximum number of network security group rules is exceeded the request fails with HTTP status code 400. + /// Keeps track of any properties unknown to the library. + internal InboundNatPool(string name, InboundEndpointProtocol protocol, int backendPort, int frontendPortRangeStart, int frontendPortRangeEnd, IList networkSecurityGroupRules, IDictionary serializedAdditionalRawData) + { + Name = name; + Protocol = protocol; + BackendPort = backendPort; + FrontendPortRangeStart = frontendPortRangeStart; + FrontendPortRangeEnd = frontendPortRangeEnd; + NetworkSecurityGroupRules = networkSecurityGroupRules; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal InboundNatPool() + { + } + + /// The name of the endpoint. The name must be unique within a Batch Pool, can contain letters, numbers, underscores, periods, and hyphens. Names must start with a letter or number, must end with a letter, number, or underscore, and cannot exceed 77 characters. If any invalid values are provided the request fails with HTTP status code 400. + public string Name { get; set; } + /// The protocol of the endpoint. + public InboundEndpointProtocol Protocol { get; set; } + /// The port number on the Compute Node. This must be unique within a Batch Pool. Acceptable values are between 1 and 65535 except for 22, 3389, 29876 and 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400. + public int BackendPort { get; set; } + /// The first port number in the range of external ports that will be used to provide inbound access to the backendPort on individual Compute Nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved. All ranges within a Pool must be distinct and cannot overlap. Each range must contain at least 40 ports. If any reserved or overlapping values are provided the request fails with HTTP status code 400. + public int FrontendPortRangeStart { get; set; } + /// The last port number in the range of external ports that will be used to provide inbound access to the backendPort on individual Compute Nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved by the Batch service. All ranges within a Pool must be distinct and cannot overlap. Each range must contain at least 40 ports. If any reserved or overlapping values are provided the request fails with HTTP status code 400. + public int FrontendPortRangeEnd { get; set; } + /// A list of network security group rules that will be applied to the endpoint. The maximum number of rules that can be specified across all the endpoints on a Batch Pool is 25. If no network security group rules are specified, a default rule will be created to allow inbound access to the specified backendPort. If the maximum number of network security group rules is exceeded the request fails with HTTP status code 400. + public IList NetworkSecurityGroupRules { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/InstanceViewStatus.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/InstanceViewStatus.Serialization.cs new file mode 100644 index 0000000000000..1d458a88f409e --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/InstanceViewStatus.Serialization.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class InstanceViewStatus : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InstanceViewStatus)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + } + if (Optional.IsDefined(DisplayStatus)) + { + writer.WritePropertyName("displayStatus"u8); + writer.WriteStringValue(DisplayStatus); + } + if (Optional.IsDefined(Level)) + { + writer.WritePropertyName("level"u8); + writer.WriteStringValue(Level.Value.ToString()); + } + if (Optional.IsDefined(Message)) + { + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + } + if (Optional.IsDefined(Time)) + { + writer.WritePropertyName("time"u8); + writer.WriteStringValue(Time.Value, "O"); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + InstanceViewStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InstanceViewStatus)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInstanceViewStatus(document.RootElement, options); + } + + internal static InstanceViewStatus DeserializeInstanceViewStatus(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string code = default; + string displayStatus = default; + StatusLevelTypes? level = default; + string message = default; + DateTimeOffset? time = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayStatus"u8)) + { + displayStatus = property.Value.GetString(); + continue; + } + if (property.NameEquals("level"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + level = new StatusLevelTypes(property.Value.GetString()); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("time"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + time = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new InstanceViewStatus( + code, + displayStatus, + level, + message, + time, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InstanceViewStatus)} does not support writing '{options.Format}' format."); + } + } + + InstanceViewStatus IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeInstanceViewStatus(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InstanceViewStatus)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static InstanceViewStatus FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeInstanceViewStatus(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/InstanceViewStatus.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/InstanceViewStatus.cs new file mode 100644 index 0000000000000..32598b7a71f3e --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/InstanceViewStatus.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// The instance view status. + public partial class InstanceViewStatus + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal InstanceViewStatus() + { + } + + /// Initializes a new instance of . + /// The status code. + /// The localized label for the status. + /// Level code. + /// The detailed status message. + /// The time of the status. + /// Keeps track of any properties unknown to the library. + internal InstanceViewStatus(string code, string displayStatus, StatusLevelTypes? level, string message, DateTimeOffset? time, IDictionary serializedAdditionalRawData) + { + Code = code; + DisplayStatus = displayStatus; + Level = level; + Message = message; + Time = time; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The status code. + public string Code { get; } + /// The localized label for the status. + public string DisplayStatus { get; } + /// Level code. + public StatusLevelTypes? Level { get; } + /// The detailed status message. + public string Message { get; } + /// The time of the status. + public DateTimeOffset? Time { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/Internal/Argument.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/Internal/Argument.cs new file mode 100644 index 0000000000000..2d342a29deea4 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/Internal/Argument.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + internal static class Argument + { + public static void AssertNotNull(T value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNull(T? value, string name) + where T : struct + { + if (!value.HasValue) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNullOrEmpty(IEnumerable value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value is ICollection collectionOfT && collectionOfT.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + if (value is ICollection collection && collection.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + using IEnumerator e = value.GetEnumerator(); + if (!e.MoveNext()) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + } + + public static void AssertNotNullOrEmpty(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value.Length == 0) + { + throw new ArgumentException("Value cannot be an empty string.", name); + } + } + + public static void AssertNotNullOrWhiteSpace(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (string.IsNullOrWhiteSpace(value)) + { + throw new ArgumentException("Value cannot be empty or contain only white-space characters.", name); + } + } + + public static void AssertNotDefault(ref T value, string name) + where T : struct, IEquatable + { + if (value.Equals(default)) + { + throw new ArgumentException("Value cannot be empty.", name); + } + } + + public static void AssertInRange(T value, T minimum, T maximum, string name) + where T : notnull, IComparable + { + if (minimum.CompareTo(value) > 0) + { + throw new ArgumentOutOfRangeException(name, "Value is less than the minimum allowed."); + } + if (maximum.CompareTo(value) < 0) + { + throw new ArgumentOutOfRangeException(name, "Value is greater than the maximum allowed."); + } + } + + public static void AssertEnumDefined(Type enumType, object value, string name) + { + if (!Enum.IsDefined(enumType, value)) + { + throw new ArgumentException($"Value not defined for {enumType.FullName}.", name); + } + } + + public static T CheckNotNull(T value, string name) + where T : class + { + AssertNotNull(value, name); + return value; + } + + public static string CheckNotNullOrEmpty(string value, string name) + { + AssertNotNullOrEmpty(value, name); + return value; + } + + public static void AssertNull(T value, string name, string message = null) + { + if (value != null) + { + throw new ArgumentException(message ?? "Value must be null.", name); + } + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 0000000000000..79f135e1c97fc --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/Internal/ChangeTrackingDictionary.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + internal class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary where TKey : notnull + { + private IDictionary _innerDictionary; + + public ChangeTrackingDictionary() + { + } + + public ChangeTrackingDictionary(IDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(dictionary); + } + + public ChangeTrackingDictionary(IReadOnlyDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(); + foreach (var pair in dictionary) + { + _innerDictionary.Add(pair); + } + } + + public bool IsUndefined => _innerDictionary == null; + + public int Count => IsUndefined ? 0 : EnsureDictionary().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureDictionary().IsReadOnly; + + public ICollection Keys => IsUndefined ? Array.Empty() : EnsureDictionary().Keys; + + public ICollection Values => IsUndefined ? Array.Empty() : EnsureDictionary().Values; + + public TValue this[TKey key] + { + get + { + if (IsUndefined) + { + throw new KeyNotFoundException(nameof(key)); + } + return EnsureDictionary()[key]; + } + set + { + EnsureDictionary()[key] = value; + } + } + + IEnumerable IReadOnlyDictionary.Keys => Keys; + + IEnumerable IReadOnlyDictionary.Values => Values; + + public IEnumerator> GetEnumerator() + { + if (IsUndefined) + { + IEnumerator> enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureDictionary().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(KeyValuePair item) + { + EnsureDictionary().Add(item); + } + + public void Clear() + { + EnsureDictionary().Clear(); + } + + public bool Contains(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Contains(item); + } + + public void CopyTo(KeyValuePair[] array, int index) + { + if (IsUndefined) + { + return; + } + EnsureDictionary().CopyTo(array, index); + } + + public bool Remove(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(item); + } + + public void Add(TKey key, TValue value) + { + EnsureDictionary().Add(key, value); + } + + public bool ContainsKey(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().ContainsKey(key); + } + + public bool Remove(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(key); + } + + public bool TryGetValue(TKey key, out TValue value) + { + if (IsUndefined) + { + value = default; + return false; + } + return EnsureDictionary().TryGetValue(key, out value); + } + + public IDictionary EnsureDictionary() + { + return _innerDictionary ??= new Dictionary(); + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/Internal/ChangeTrackingList.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 0000000000000..c730be09d10fd --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/Internal/ChangeTrackingList.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Compute.Batch +{ + internal class ChangeTrackingList : IList, IReadOnlyList + { + private IList _innerList; + + public ChangeTrackingList() + { + } + + public ChangeTrackingList(IList innerList) + { + if (innerList != null) + { + _innerList = innerList; + } + } + + public ChangeTrackingList(IReadOnlyList innerList) + { + if (innerList != null) + { + _innerList = innerList.ToList(); + } + } + + public bool IsUndefined => _innerList == null; + + public int Count => IsUndefined ? 0 : EnsureList().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureList().IsReadOnly; + + public T this[int index] + { + get + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + return EnsureList()[index]; + } + set + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList()[index] = value; + } + } + + public void Reset() + { + _innerList = null; + } + + public IEnumerator GetEnumerator() + { + if (IsUndefined) + { + IEnumerator enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureList().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(T item) + { + EnsureList().Add(item); + } + + public void Clear() + { + EnsureList().Clear(); + } + + public bool Contains(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Contains(item); + } + + public void CopyTo(T[] array, int arrayIndex) + { + if (IsUndefined) + { + return; + } + EnsureList().CopyTo(array, arrayIndex); + } + + public bool Remove(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Remove(item); + } + + public int IndexOf(T item) + { + if (IsUndefined) + { + return -1; + } + return EnsureList().IndexOf(item); + } + + public void Insert(int index, T item) + { + EnsureList().Insert(index, item); + } + + public void RemoveAt(int index) + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList().RemoveAt(index); + } + + public IList EnsureList() + { + return _innerList ??= new List(); + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 0000000000000..e8ed693cc305b --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/Internal/ModelSerializationExtensions.cs @@ -0,0 +1,398 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.Text.Json; +using System.Xml; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + internal static class ModelSerializationExtensions + { + internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W"); + + public static object GetObject(this JsonElement element) + { + switch (element.ValueKind) + { + case JsonValueKind.String: + return element.GetString(); + case JsonValueKind.Number: + if (element.TryGetInt32(out int intValue)) + { + return intValue; + } + if (element.TryGetInt64(out long longValue)) + { + return longValue; + } + return element.GetDouble(); + case JsonValueKind.True: + return true; + case JsonValueKind.False: + return false; + case JsonValueKind.Undefined: + case JsonValueKind.Null: + return null; + case JsonValueKind.Object: + var dictionary = new Dictionary(); + foreach (var jsonProperty in element.EnumerateObject()) + { + dictionary.Add(jsonProperty.Name, jsonProperty.Value.GetObject()); + } + return dictionary; + case JsonValueKind.Array: + var list = new List(); + foreach (var item in element.EnumerateArray()) + { + list.Add(item.GetObject()); + } + return list.ToArray(); + default: + throw new NotSupportedException($"Not supported value kind {element.ValueKind}"); + } + } + + public static byte[] GetBytesFromBase64(this JsonElement element, string format) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + + return format switch + { + "U" => TypeFormatters.FromBase64UrlString(element.GetRequiredString()), + "D" => element.GetBytesFromBase64(), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + } + + public static DateTimeOffset GetDateTimeOffset(this JsonElement element, string format) => format switch + { + "U" when element.ValueKind == JsonValueKind.Number => DateTimeOffset.FromUnixTimeSeconds(element.GetInt64()), + _ => TypeFormatters.ParseDateTimeOffset(element.GetString(), format) + }; + + public static TimeSpan GetTimeSpan(this JsonElement element, string format) => TypeFormatters.ParseTimeSpan(element.GetString(), format); + + public static char GetChar(this JsonElement element) + { + if (element.ValueKind == JsonValueKind.String) + { + var text = element.GetString(); + if (text == null || text.Length != 1) + { + throw new NotSupportedException($"Cannot convert \"{text}\" to a char"); + } + return text[0]; + } + else + { + throw new NotSupportedException($"Cannot convert {element.ValueKind} to a char"); + } + } + + [Conditional("DEBUG")] + public static void ThrowNonNullablePropertyIsNull(this JsonProperty property) + { + throw new JsonException($"A property '{property.Name}' defined as non-nullable but received as null from the service. This exception only happens in DEBUG builds of the library and would be ignored in the release build"); + } + + public static string GetRequiredString(this JsonElement element) + { + var value = element.GetString(); + if (value == null) + { + throw new InvalidOperationException($"The requested operation requires an element of type 'String', but the target element has type '{element.ValueKind}'."); + } + return value; + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTime value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, TimeSpan value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, char value) + { + writer.WriteStringValue(value.ToString(CultureInfo.InvariantCulture)); + } + + public static void WriteBase64StringValue(this Utf8JsonWriter writer, byte[] value, string format) + { + if (value == null) + { + writer.WriteNullValue(); + return; + } + switch (format) + { + case "U": + writer.WriteStringValue(TypeFormatters.ToBase64UrlString(value)); + break; + case "D": + writer.WriteBase64StringValue(value); + break; + default: + throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)); + } + } + + public static void WriteNumberValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + if (format != "U") + { + throw new ArgumentOutOfRangeException(nameof(format), "Only 'U' format is supported when writing a DateTimeOffset as a Number."); + } + writer.WriteNumberValue(value.ToUnixTimeSeconds()); + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, T value, ModelReaderWriterOptions options = null) + { + switch (value) + { + case null: + writer.WriteNullValue(); + break; + case IJsonModel jsonModel: + jsonModel.Write(writer, options ?? WireOptions); + break; + case IUtf8JsonSerializable serializable: + serializable.Write(writer); + break; + case byte[] bytes: + writer.WriteBase64StringValue(bytes); + break; + case BinaryData bytes0: + writer.WriteBase64StringValue(bytes0); + break; + case JsonElement json: + json.WriteTo(writer); + break; + case int i: + writer.WriteNumberValue(i); + break; + case decimal d: + writer.WriteNumberValue(d); + break; + case double d0: + if (double.IsNaN(d0)) + { + writer.WriteStringValue("NaN"); + } + else + { + writer.WriteNumberValue(d0); + } + break; + case float f: + writer.WriteNumberValue(f); + break; + case long l: + writer.WriteNumberValue(l); + break; + case string s: + writer.WriteStringValue(s); + break; + case bool b: + writer.WriteBooleanValue(b); + break; + case Guid g: + writer.WriteStringValue(g); + break; + case DateTimeOffset dateTimeOffset: + writer.WriteStringValue(dateTimeOffset, "O"); + break; + case DateTime dateTime: + writer.WriteStringValue(dateTime, "O"); + break; + case IEnumerable> enumerable: + writer.WriteStartObject(); + foreach (var pair in enumerable) + { + writer.WritePropertyName(pair.Key); + writer.WriteObjectValue(pair.Value, options); + } + writer.WriteEndObject(); + break; + case IEnumerable objectEnumerable: + writer.WriteStartArray(); + foreach (var item in objectEnumerable) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + break; + case TimeSpan timeSpan: + writer.WriteStringValue(timeSpan, "P"); + break; + default: + throw new NotSupportedException($"Not supported type {value.GetType()}"); + } + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, object value, ModelReaderWriterOptions options = null) + { + writer.WriteObjectValue(value, options); + } + + internal static class TypeFormatters + { + private const string RoundtripZFormat = "yyyy-MM-ddTHH:mm:ss.fffffffZ"; + public const string DefaultNumberFormat = "G"; + + public static string ToString(bool value) => value ? "true" : "false"; + + public static string ToString(DateTime value, string format) => value.Kind switch + { + DateTimeKind.Utc => ToString((DateTimeOffset)value, format), + _ => throw new NotSupportedException($"DateTime {value} has a Kind of {value.Kind}. Azure SDK requires it to be UTC. You can call DateTime.SpecifyKind to change Kind property value to DateTimeKind.Utc.") + }; + + public static string ToString(DateTimeOffset value, string format) => format switch + { + "D" => value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture), + "U" => value.ToUnixTimeSeconds().ToString(CultureInfo.InvariantCulture), + "O" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "o" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "R" => value.ToString("r", CultureInfo.InvariantCulture), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(TimeSpan value, string format) => format switch + { + "P" => XmlConvert.ToString(value), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(byte[] value, string format) => format switch + { + "U" => ToBase64UrlString(value), + "D" => Convert.ToBase64String(value), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + + public static string ToBase64UrlString(byte[] value) + { + int numWholeOrPartialInputBlocks = checked(value.Length + 2) / 3; + int size = checked(numWholeOrPartialInputBlocks * 4); + char[] output = new char[size]; + + int numBase64Chars = Convert.ToBase64CharArray(value, 0, value.Length, output, 0); + + int i = 0; + for (; i < numBase64Chars; i++) + { + char ch = output[i]; + if (ch == '+') + { + output[i] = '-'; + } + else + { + if (ch == '/') + { + output[i] = '_'; + } + else + { + if (ch == '=') + { + break; + } + } + } + } + + return new string(output, 0, i); + } + + public static byte[] FromBase64UrlString(string value) + { + int paddingCharsToAdd = (value.Length % 4) switch + { + 0 => 0, + 2 => 2, + 3 => 1, + _ => throw new InvalidOperationException("Malformed input") + }; + char[] output = new char[(value.Length + paddingCharsToAdd)]; + int i = 0; + for (; i < value.Length; i++) + { + char ch = value[i]; + if (ch == '-') + { + output[i] = '+'; + } + else + { + if (ch == '_') + { + output[i] = '/'; + } + else + { + output[i] = ch; + } + } + } + + for (; i < output.Length; i++) + { + output[i] = '='; + } + + return Convert.FromBase64CharArray(output, 0, output.Length); + } + + public static DateTimeOffset ParseDateTimeOffset(string value, string format) => format switch + { + "U" => DateTimeOffset.FromUnixTimeSeconds(long.Parse(value, CultureInfo.InvariantCulture)), + _ => DateTimeOffset.Parse(value, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) + }; + + public static TimeSpan ParseTimeSpan(string value, string format) => format switch + { + "P" => XmlConvert.ToTimeSpan(value), + _ => TimeSpan.ParseExact(value, format, CultureInfo.InvariantCulture) + }; + + public static string ConvertToString(object value, string format = null) => value switch + { + null => "null", + string s => s, + bool b => ToString(b), + int or float or double or long or decimal => ((IFormattable)value).ToString(DefaultNumberFormat, CultureInfo.InvariantCulture), + byte[] b0 when format != null => ToString(b0, format), + IEnumerable s0 => string.Join(",", s0), + DateTimeOffset dateTime when format != null => ToString(dateTime, format), + TimeSpan timeSpan when format != null => ToString(timeSpan, format), + TimeSpan timeSpan0 => XmlConvert.ToString(timeSpan0), + Guid guid => guid.ToString(), + BinaryData binaryData => ConvertToString(binaryData.ToArray(), format), + _ => value.ToString() + }; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/Internal/Optional.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/Internal/Optional.cs new file mode 100644 index 0000000000000..fd4de74cc14cb --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/Internal/Optional.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.Compute.Batch +{ + internal static class Optional + { + public static bool IsCollectionDefined(IEnumerable collection) + { + return !(collection is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined); + } + + public static bool IsCollectionDefined(IDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsCollectionDefined(IReadOnlyDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsDefined(T? value) + where T : struct + { + return value.HasValue; + } + + public static bool IsDefined(object value) + { + return value != null; + } + + public static bool IsDefined(JsonElement value) + { + return value.ValueKind != JsonValueKind.Undefined; + } + + public static bool IsDefined(string value) + { + return value != null; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 0000000000000..83b2e279a9dce --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/Internal/Utf8JsonRequestContent.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.IO; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + internal class Utf8JsonRequestContent : RequestContent + { + private readonly MemoryStream _stream; + private readonly RequestContent _content; + + public Utf8JsonRequestContent() + { + _stream = new MemoryStream(); + _content = Create(_stream); + JsonWriter = new Utf8JsonWriter(_stream); + } + + public Utf8JsonWriter JsonWriter { get; } + + public override async Task WriteToAsync(Stream stream, CancellationToken cancellationToken = default) + { + await JsonWriter.FlushAsync().ConfigureAwait(false); + await _content.WriteToAsync(stream, cancellationToken).ConfigureAwait(false); + } + + public override void WriteTo(Stream stream, CancellationToken cancellationToken = default) + { + JsonWriter.Flush(); + _content.WriteTo(stream, cancellationToken); + } + + public override bool TryComputeLength(out long length) + { + length = JsonWriter.BytesCommitted + JsonWriter.BytesPending; + return true; + } + + public override void Dispose() + { + JsonWriter.Dispose(); + _content.Dispose(); + _stream.Dispose(); + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/IpAddressProvisioningType.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/IpAddressProvisioningType.cs new file mode 100644 index 0000000000000..271d90818f8df --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/IpAddressProvisioningType.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.Compute.Batch +{ + /// IPAddressProvisioningType enums. + public readonly partial struct IpAddressProvisioningType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public IpAddressProvisioningType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string BatchManagedValue = "batchmanaged"; + private const string UserManagedValue = "usermanaged"; + private const string NoPublicIpAddressesValue = "nopublicipaddresses"; + + /// A public IP will be created and managed by Batch. There may be multiple public IPs depending on the size of the Pool. + public static IpAddressProvisioningType BatchManaged { get; } = new IpAddressProvisioningType(BatchManagedValue); + /// Public IPs are provided by the user and will be used to provision the Compute Nodes. + public static IpAddressProvisioningType UserManaged { get; } = new IpAddressProvisioningType(UserManagedValue); + /// No public IP Address will be created. + public static IpAddressProvisioningType NoPublicIpAddresses { get; } = new IpAddressProvisioningType(NoPublicIpAddressesValue); + /// Determines if two values are the same. + public static bool operator ==(IpAddressProvisioningType left, IpAddressProvisioningType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(IpAddressProvisioningType left, IpAddressProvisioningType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator IpAddressProvisioningType(string value) => new IpAddressProvisioningType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is IpAddressProvisioningType other && Equals(other); + /// + public bool Equals(IpAddressProvisioningType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/LinuxUserConfiguration.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/LinuxUserConfiguration.Serialization.cs new file mode 100644 index 0000000000000..bb92943b03125 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/LinuxUserConfiguration.Serialization.cs @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class LinuxUserConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LinuxUserConfiguration)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Uid)) + { + writer.WritePropertyName("uid"u8); + writer.WriteNumberValue(Uid.Value); + } + if (Optional.IsDefined(Gid)) + { + writer.WritePropertyName("gid"u8); + writer.WriteNumberValue(Gid.Value); + } + if (Optional.IsDefined(SshPrivateKey)) + { + writer.WritePropertyName("sshPrivateKey"u8); + writer.WriteStringValue(SshPrivateKey); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + LinuxUserConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LinuxUserConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLinuxUserConfiguration(document.RootElement, options); + } + + internal static LinuxUserConfiguration DeserializeLinuxUserConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? uid = default; + int? gid = default; + string sshPrivateKey = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("uid"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + uid = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("gid"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + gid = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("sshPrivateKey"u8)) + { + sshPrivateKey = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LinuxUserConfiguration(uid, gid, sshPrivateKey, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(LinuxUserConfiguration)} does not support writing '{options.Format}' format."); + } + } + + LinuxUserConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeLinuxUserConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LinuxUserConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static LinuxUserConfiguration FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeLinuxUserConfiguration(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/LinuxUserConfiguration.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/LinuxUserConfiguration.cs new file mode 100644 index 0000000000000..a24b99e10fcef --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/LinuxUserConfiguration.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Properties used to create a user Account on a Linux Compute Node. + public partial class LinuxUserConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public LinuxUserConfiguration() + { + } + + /// Initializes a new instance of . + /// The user ID of the user Account. The uid and gid properties must be specified together or not at all. If not specified the underlying operating system picks the uid. + /// The group ID for the user Account. The uid and gid properties must be specified together or not at all. If not specified the underlying operating system picks the gid. + /// The SSH private key for the user Account. The private key must not be password protected. The private key is used to automatically configure asymmetric-key based authentication for SSH between Compute Nodes in a Linux Pool when the Pool's enableInterNodeCommunication property is true (it is ignored if enableInterNodeCommunication is false). It does this by placing the key pair into the user's .ssh directory. If not specified, password-less SSH is not configured between Compute Nodes (no modification of the user's .ssh directory is done). + /// Keeps track of any properties unknown to the library. + internal LinuxUserConfiguration(int? uid, int? gid, string sshPrivateKey, IDictionary serializedAdditionalRawData) + { + Uid = uid; + Gid = gid; + SshPrivateKey = sshPrivateKey; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The user ID of the user Account. The uid and gid properties must be specified together or not at all. If not specified the underlying operating system picks the uid. + public int? Uid { get; set; } + /// The group ID for the user Account. The uid and gid properties must be specified together or not at all. If not specified the underlying operating system picks the gid. + public int? Gid { get; set; } + /// The SSH private key for the user Account. The private key must not be password protected. The private key is used to automatically configure asymmetric-key based authentication for SSH between Compute Nodes in a Linux Pool when the Pool's enableInterNodeCommunication property is true (it is ignored if enableInterNodeCommunication is false). It does this by placing the key pair into the user's .ssh directory. If not specified, password-less SSH is not configured between Compute Nodes (no modification of the user's .ssh directory is done). + public string SshPrivateKey { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/LoginMode.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/LoginMode.cs new file mode 100644 index 0000000000000..84f394e16380f --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/LoginMode.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.Compute.Batch +{ + /// LoginMode enums. + public readonly partial struct LoginMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public LoginMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string BatchValue = "batch"; + private const string InteractiveValue = "interactive"; + + /// The LOGON32_LOGON_BATCH Win32 login mode. The batch login mode is recommended for long running parallel processes. + public static LoginMode Batch { get; } = new LoginMode(BatchValue); + /// The LOGON32_LOGON_INTERACTIVE Win32 login mode. UAC is enabled on Windows VirtualMachineConfiguration Pools. If this option is used with an elevated user identity in a Windows VirtualMachineConfiguration Pool, the user session will not be elevated unless the application executed by the Task command line is configured to always require administrative privilege or to always require maximum privilege. + public static LoginMode Interactive { get; } = new LoginMode(InteractiveValue); + /// Determines if two values are the same. + public static bool operator ==(LoginMode left, LoginMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(LoginMode left, LoginMode right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator LoginMode(string value) => new LoginMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is LoginMode other && Equals(other); + /// + public bool Equals(LoginMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/ManagedDisk.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/ManagedDisk.Serialization.cs new file mode 100644 index 0000000000000..b3cd49d9cb82b --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/ManagedDisk.Serialization.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class ManagedDisk : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ManagedDisk)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("storageAccountType"u8); + writer.WriteStringValue(StorageAccountType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ManagedDisk IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ManagedDisk)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeManagedDisk(document.RootElement, options); + } + + internal static ManagedDisk DeserializeManagedDisk(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + StorageAccountType storageAccountType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("storageAccountType"u8)) + { + storageAccountType = new StorageAccountType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ManagedDisk(storageAccountType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ManagedDisk)} does not support writing '{options.Format}' format."); + } + } + + ManagedDisk IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeManagedDisk(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ManagedDisk)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ManagedDisk FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeManagedDisk(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/ManagedDisk.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/ManagedDisk.cs new file mode 100644 index 0000000000000..f8ada07e8f729 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/ManagedDisk.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// The managed disk parameters. + public partial class ManagedDisk + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The storage account type for managed disk. + public ManagedDisk(StorageAccountType storageAccountType) + { + StorageAccountType = storageAccountType; + } + + /// Initializes a new instance of . + /// The storage account type for managed disk. + /// Keeps track of any properties unknown to the library. + internal ManagedDisk(StorageAccountType storageAccountType, IDictionary serializedAdditionalRawData) + { + StorageAccountType = storageAccountType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ManagedDisk() + { + } + + /// The storage account type for managed disk. + public StorageAccountType StorageAccountType { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/MetadataItem.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/MetadataItem.Serialization.cs new file mode 100644 index 0000000000000..424b946c9ac81 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/MetadataItem.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class MetadataItem : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MetadataItem)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + MetadataItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MetadataItem)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMetadataItem(document.RootElement, options); + } + + internal static MetadataItem DeserializeMetadataItem(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MetadataItem(name, value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(MetadataItem)} does not support writing '{options.Format}' format."); + } + } + + MetadataItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeMetadataItem(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MetadataItem)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static MetadataItem FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeMetadataItem(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/MetadataItem.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/MetadataItem.cs new file mode 100644 index 0000000000000..910a0b6b76209 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/MetadataItem.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// + /// The Batch service does not assign any meaning to this metadata; it is solely + /// for the use of user code. + /// + public partial class MetadataItem + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The name of the metadata item. + /// The value of the metadata item. + /// or is null. + public MetadataItem(string name, string value) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(value, nameof(value)); + + Name = name; + Value = value; + } + + /// Initializes a new instance of . + /// The name of the metadata item. + /// The value of the metadata item. + /// Keeps track of any properties unknown to the library. + internal MetadataItem(string name, string value, IDictionary serializedAdditionalRawData) + { + Name = name; + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal MetadataItem() + { + } + + /// The name of the metadata item. + public string Name { get; set; } + /// The value of the metadata item. + public string Value { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/MountConfiguration.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/MountConfiguration.Serialization.cs new file mode 100644 index 0000000000000..387392062b56c --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/MountConfiguration.Serialization.cs @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class MountConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MountConfiguration)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(AzureBlobFileSystemConfiguration)) + { + writer.WritePropertyName("azureBlobFileSystemConfiguration"u8); + writer.WriteObjectValue(AzureBlobFileSystemConfiguration, options); + } + if (Optional.IsDefined(NfsMountConfiguration)) + { + writer.WritePropertyName("nfsMountConfiguration"u8); + writer.WriteObjectValue(NfsMountConfiguration, options); + } + if (Optional.IsDefined(CifsMountConfiguration)) + { + writer.WritePropertyName("cifsMountConfiguration"u8); + writer.WriteObjectValue(CifsMountConfiguration, options); + } + if (Optional.IsDefined(AzureFileShareConfiguration)) + { + writer.WritePropertyName("azureFileShareConfiguration"u8); + writer.WriteObjectValue(AzureFileShareConfiguration, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + MountConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MountConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMountConfiguration(document.RootElement, options); + } + + internal static MountConfiguration DeserializeMountConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AzureBlobFileSystemConfiguration azureBlobFileSystemConfiguration = default; + NfsMountConfiguration nfsMountConfiguration = default; + CifsMountConfiguration cifsMountConfiguration = default; + AzureFileShareConfiguration azureFileShareConfiguration = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("azureBlobFileSystemConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + azureBlobFileSystemConfiguration = AzureBlobFileSystemConfiguration.DeserializeAzureBlobFileSystemConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("nfsMountConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nfsMountConfiguration = NfsMountConfiguration.DeserializeNfsMountConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("cifsMountConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cifsMountConfiguration = CifsMountConfiguration.DeserializeCifsMountConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("azureFileShareConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + azureFileShareConfiguration = AzureFileShareConfiguration.DeserializeAzureFileShareConfiguration(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MountConfiguration(azureBlobFileSystemConfiguration, nfsMountConfiguration, cifsMountConfiguration, azureFileShareConfiguration, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(MountConfiguration)} does not support writing '{options.Format}' format."); + } + } + + MountConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeMountConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MountConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static MountConfiguration FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeMountConfiguration(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/MountConfiguration.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/MountConfiguration.cs new file mode 100644 index 0000000000000..6a04472d6c941 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/MountConfiguration.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// The file system to mount on each node. + public partial class MountConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public MountConfiguration() + { + } + + /// Initializes a new instance of . + /// The Azure Storage Container to mount using blob FUSE on each node. This property is mutually exclusive with all other properties. + /// The NFS file system to mount on each node. This property is mutually exclusive with all other properties. + /// The CIFS/SMB file system to mount on each node. This property is mutually exclusive with all other properties. + /// The Azure File Share to mount on each node. This property is mutually exclusive with all other properties. + /// Keeps track of any properties unknown to the library. + internal MountConfiguration(AzureBlobFileSystemConfiguration azureBlobFileSystemConfiguration, NfsMountConfiguration nfsMountConfiguration, CifsMountConfiguration cifsMountConfiguration, AzureFileShareConfiguration azureFileShareConfiguration, IDictionary serializedAdditionalRawData) + { + AzureBlobFileSystemConfiguration = azureBlobFileSystemConfiguration; + NfsMountConfiguration = nfsMountConfiguration; + CifsMountConfiguration = cifsMountConfiguration; + AzureFileShareConfiguration = azureFileShareConfiguration; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The Azure Storage Container to mount using blob FUSE on each node. This property is mutually exclusive with all other properties. + public AzureBlobFileSystemConfiguration AzureBlobFileSystemConfiguration { get; set; } + /// The NFS file system to mount on each node. This property is mutually exclusive with all other properties. + public NfsMountConfiguration NfsMountConfiguration { get; set; } + /// The CIFS/SMB file system to mount on each node. This property is mutually exclusive with all other properties. + public CifsMountConfiguration CifsMountConfiguration { get; set; } + /// The Azure File Share to mount on each node. This property is mutually exclusive with all other properties. + public AzureFileShareConfiguration AzureFileShareConfiguration { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/MultiInstanceSettings.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/MultiInstanceSettings.Serialization.cs new file mode 100644 index 0000000000000..1b72767d544d7 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/MultiInstanceSettings.Serialization.cs @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class MultiInstanceSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MultiInstanceSettings)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(NumberOfInstances)) + { + writer.WritePropertyName("numberOfInstances"u8); + writer.WriteNumberValue(NumberOfInstances.Value); + } + writer.WritePropertyName("coordinationCommandLine"u8); + writer.WriteStringValue(CoordinationCommandLine); + if (Optional.IsCollectionDefined(CommonResourceFiles)) + { + writer.WritePropertyName("commonResourceFiles"u8); + writer.WriteStartArray(); + foreach (var item in CommonResourceFiles) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + MultiInstanceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MultiInstanceSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMultiInstanceSettings(document.RootElement, options); + } + + internal static MultiInstanceSettings DeserializeMultiInstanceSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? numberOfInstances = default; + string coordinationCommandLine = default; + IList commonResourceFiles = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("numberOfInstances"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + numberOfInstances = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("coordinationCommandLine"u8)) + { + coordinationCommandLine = property.Value.GetString(); + continue; + } + if (property.NameEquals("commonResourceFiles"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceFile.DeserializeResourceFile(item, options)); + } + commonResourceFiles = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MultiInstanceSettings(numberOfInstances, coordinationCommandLine, commonResourceFiles ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(MultiInstanceSettings)} does not support writing '{options.Format}' format."); + } + } + + MultiInstanceSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeMultiInstanceSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MultiInstanceSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static MultiInstanceSettings FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeMultiInstanceSettings(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/MultiInstanceSettings.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/MultiInstanceSettings.cs new file mode 100644 index 0000000000000..754506e8d5a54 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/MultiInstanceSettings.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// + /// Multi-instance Tasks are commonly used to support MPI Tasks. In the MPI case, + /// if any of the subtasks fail (for example due to exiting with a non-zero exit + /// code) the entire multi-instance Task fails. The multi-instance Task is then + /// terminated and retried, up to its retry limit. + /// + public partial class MultiInstanceSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The command line to run on all the Compute Nodes to enable them to coordinate when the primary runs the main Task command. A typical coordination command line launches a background service and verifies that the service is ready to process inter-node messages. + /// is null. + public MultiInstanceSettings(string coordinationCommandLine) + { + Argument.AssertNotNull(coordinationCommandLine, nameof(coordinationCommandLine)); + + CoordinationCommandLine = coordinationCommandLine; + CommonResourceFiles = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The number of Compute Nodes required by the Task. If omitted, the default is 1. + /// The command line to run on all the Compute Nodes to enable them to coordinate when the primary runs the main Task command. A typical coordination command line launches a background service and verifies that the service is ready to process inter-node messages. + /// A list of files that the Batch service will download before running the coordination command line. The difference between common resource files and Task resource files is that common resource files are downloaded for all subtasks including the primary, whereas Task resource files are downloaded only for the primary. Also note that these resource files are not downloaded to the Task working directory, but instead are downloaded to the Task root directory (one directory above the working directory). There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. + /// Keeps track of any properties unknown to the library. + internal MultiInstanceSettings(int? numberOfInstances, string coordinationCommandLine, IList commonResourceFiles, IDictionary serializedAdditionalRawData) + { + NumberOfInstances = numberOfInstances; + CoordinationCommandLine = coordinationCommandLine; + CommonResourceFiles = commonResourceFiles; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal MultiInstanceSettings() + { + } + + /// The number of Compute Nodes required by the Task. If omitted, the default is 1. + public int? NumberOfInstances { get; set; } + /// The command line to run on all the Compute Nodes to enable them to coordinate when the primary runs the main Task command. A typical coordination command line launches a background service and verifies that the service is ready to process inter-node messages. + public string CoordinationCommandLine { get; set; } + /// A list of files that the Batch service will download before running the coordination command line. The difference between common resource files and Task resource files is that common resource files are downloaded for all subtasks including the primary, whereas Task resource files are downloaded only for the primary. Also note that these resource files are not downloaded to the Task working directory, but instead are downloaded to the Task root directory (one directory above the working directory). There is a maximum size for the list of resource files. When the max size is exceeded, the request will fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. + public IList CommonResourceFiles { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/NameValuePair.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/NameValuePair.Serialization.cs new file mode 100644 index 0000000000000..df9413cc5c250 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/NameValuePair.Serialization.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class NameValuePair : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NameValuePair)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + NameValuePair IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NameValuePair)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNameValuePair(document.RootElement, options); + } + + internal static NameValuePair DeserializeNameValuePair(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NameValuePair(name, value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NameValuePair)} does not support writing '{options.Format}' format."); + } + } + + NameValuePair IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeNameValuePair(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NameValuePair)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static NameValuePair FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeNameValuePair(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/NameValuePair.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/NameValuePair.cs new file mode 100644 index 0000000000000..e3f2fff941063 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/NameValuePair.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Represents a name-value pair. + public partial class NameValuePair + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal NameValuePair() + { + } + + /// Initializes a new instance of . + /// The name in the name-value pair. + /// The value in the name-value pair. + /// Keeps track of any properties unknown to the library. + internal NameValuePair(string name, string value, IDictionary serializedAdditionalRawData) + { + Name = name; + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The name in the name-value pair. + public string Name { get; } + /// The value in the name-value pair. + public string Value { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/NetworkConfiguration.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/NetworkConfiguration.Serialization.cs new file mode 100644 index 0000000000000..36ede0f652592 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/NetworkConfiguration.Serialization.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class NetworkConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkConfiguration)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(SubnetId)) + { + writer.WritePropertyName("subnetId"u8); + writer.WriteStringValue(SubnetId); + } + if (Optional.IsDefined(DynamicVNetAssignmentScope)) + { + writer.WritePropertyName("dynamicVNetAssignmentScope"u8); + writer.WriteStringValue(DynamicVNetAssignmentScope.Value.ToString()); + } + if (Optional.IsDefined(EndpointConfiguration)) + { + writer.WritePropertyName("endpointConfiguration"u8); + writer.WriteObjectValue(EndpointConfiguration, options); + } + if (Optional.IsDefined(PublicIpAddressConfiguration)) + { + writer.WritePropertyName("publicIPAddressConfiguration"u8); + writer.WriteObjectValue(PublicIpAddressConfiguration, options); + } + if (Optional.IsDefined(EnableAcceleratedNetworking)) + { + writer.WritePropertyName("enableAcceleratedNetworking"u8); + writer.WriteBooleanValue(EnableAcceleratedNetworking.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + NetworkConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNetworkConfiguration(document.RootElement, options); + } + + internal static NetworkConfiguration DeserializeNetworkConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string subnetId = default; + DynamicVNetAssignmentScope? dynamicVNetAssignmentScope = default; + BatchPoolEndpointConfiguration endpointConfiguration = default; + PublicIpAddressConfiguration publicIPAddressConfiguration = default; + bool? enableAcceleratedNetworking = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("subnetId"u8)) + { + subnetId = property.Value.GetString(); + continue; + } + if (property.NameEquals("dynamicVNetAssignmentScope"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dynamicVNetAssignmentScope = new DynamicVNetAssignmentScope(property.Value.GetString()); + continue; + } + if (property.NameEquals("endpointConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endpointConfiguration = BatchPoolEndpointConfiguration.DeserializeBatchPoolEndpointConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("publicIPAddressConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + publicIPAddressConfiguration = PublicIpAddressConfiguration.DeserializePublicIpAddressConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("enableAcceleratedNetworking"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableAcceleratedNetworking = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NetworkConfiguration( + subnetId, + dynamicVNetAssignmentScope, + endpointConfiguration, + publicIPAddressConfiguration, + enableAcceleratedNetworking, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NetworkConfiguration)} does not support writing '{options.Format}' format."); + } + } + + NetworkConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeNetworkConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NetworkConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static NetworkConfiguration FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeNetworkConfiguration(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/NetworkConfiguration.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/NetworkConfiguration.cs new file mode 100644 index 0000000000000..e69a292a35016 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/NetworkConfiguration.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// The network configuration for a Pool. + public partial class NetworkConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public NetworkConfiguration() + { + } + + /// Initializes a new instance of . + /// The ARM resource identifier of the virtual network subnet which the Compute Nodes of the Pool will join. This is of the form /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. The virtual network must be in the same region and subscription as the Azure Batch Account. The specified subnet should have enough free IP addresses to accommodate the number of Compute Nodes in the Pool. If the subnet doesn't have enough free IP addresses, the Pool will partially allocate Nodes and a resize error will occur. The 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for the specified VNet. The specified subnet must allow communication from the Azure Batch service to be able to schedule Tasks on the Nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the Nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the Compute Nodes to unusable. For Pools created with virtualMachineConfiguration only ARM virtual networks ('Microsoft.Network/virtualNetworks') are supported. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved system ports must be enabled for inbound communication. For Pools created with a virtual machine configuration, enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for Windows. Also enable outbound connections to Azure Storage on port 443. For more details see: https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + /// The scope of dynamic vnet assignment. + /// The configuration for endpoints on Compute Nodes in the Batch Pool. Pool endpoint configuration is only supported on Pools with the virtualMachineConfiguration property. + /// The Public IPAddress configuration for Compute Nodes in the Batch Pool. Public IP configuration property is only supported on Pools with the virtualMachineConfiguration property. + /// Whether this pool should enable accelerated networking. Accelerated networking enables single root I/O virtualization (SR-IOV) to a VM, which may lead to improved networking performance. For more details, see: https://learn.microsoft.com/azure/virtual-network/accelerated-networking-overview. + /// Keeps track of any properties unknown to the library. + internal NetworkConfiguration(string subnetId, DynamicVNetAssignmentScope? dynamicVNetAssignmentScope, BatchPoolEndpointConfiguration endpointConfiguration, PublicIpAddressConfiguration publicIpAddressConfiguration, bool? enableAcceleratedNetworking, IDictionary serializedAdditionalRawData) + { + SubnetId = subnetId; + DynamicVNetAssignmentScope = dynamicVNetAssignmentScope; + EndpointConfiguration = endpointConfiguration; + PublicIpAddressConfiguration = publicIpAddressConfiguration; + EnableAcceleratedNetworking = enableAcceleratedNetworking; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The ARM resource identifier of the virtual network subnet which the Compute Nodes of the Pool will join. This is of the form /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. The virtual network must be in the same region and subscription as the Azure Batch Account. The specified subnet should have enough free IP addresses to accommodate the number of Compute Nodes in the Pool. If the subnet doesn't have enough free IP addresses, the Pool will partially allocate Nodes and a resize error will occur. The 'MicrosoftAzureBatch' service principal must have the 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for the specified VNet. The specified subnet must allow communication from the Azure Batch service to be able to schedule Tasks on the Nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the Nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the Compute Nodes to unusable. For Pools created with virtualMachineConfiguration only ARM virtual networks ('Microsoft.Network/virtualNetworks') are supported. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved system ports must be enabled for inbound communication. For Pools created with a virtual machine configuration, enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for Windows. Also enable outbound connections to Azure Storage on port 443. For more details see: https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + public string SubnetId { get; set; } + /// The scope of dynamic vnet assignment. + public DynamicVNetAssignmentScope? DynamicVNetAssignmentScope { get; set; } + /// The configuration for endpoints on Compute Nodes in the Batch Pool. Pool endpoint configuration is only supported on Pools with the virtualMachineConfiguration property. + public BatchPoolEndpointConfiguration EndpointConfiguration { get; set; } + /// The Public IPAddress configuration for Compute Nodes in the Batch Pool. Public IP configuration property is only supported on Pools with the virtualMachineConfiguration property. + public PublicIpAddressConfiguration PublicIpAddressConfiguration { get; set; } + /// Whether this pool should enable accelerated networking. Accelerated networking enables single root I/O virtualization (SR-IOV) to a VM, which may lead to improved networking performance. For more details, see: https://learn.microsoft.com/azure/virtual-network/accelerated-networking-overview. + public bool? EnableAcceleratedNetworking { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/NetworkSecurityGroupRule.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/NetworkSecurityGroupRule.Serialization.cs new file mode 100644 index 0000000000000..efdb0b503e6f5 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/NetworkSecurityGroupRule.Serialization.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class NetworkSecurityGroupRule : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkSecurityGroupRule)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("priority"u8); + writer.WriteNumberValue(Priority); + writer.WritePropertyName("access"u8); + writer.WriteStringValue(Access.ToString()); + writer.WritePropertyName("sourceAddressPrefix"u8); + writer.WriteStringValue(SourceAddressPrefix); + if (Optional.IsCollectionDefined(SourcePortRanges)) + { + writer.WritePropertyName("sourcePortRanges"u8); + writer.WriteStartArray(); + foreach (var item in SourcePortRanges) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + NetworkSecurityGroupRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkSecurityGroupRule)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNetworkSecurityGroupRule(document.RootElement, options); + } + + internal static NetworkSecurityGroupRule DeserializeNetworkSecurityGroupRule(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int priority = default; + NetworkSecurityGroupRuleAccess access = default; + string sourceAddressPrefix = default; + IList sourcePortRanges = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("priority"u8)) + { + priority = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("access"u8)) + { + access = new NetworkSecurityGroupRuleAccess(property.Value.GetString()); + continue; + } + if (property.NameEquals("sourceAddressPrefix"u8)) + { + sourceAddressPrefix = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourcePortRanges"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + sourcePortRanges = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NetworkSecurityGroupRule(priority, access, sourceAddressPrefix, sourcePortRanges ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NetworkSecurityGroupRule)} does not support writing '{options.Format}' format."); + } + } + + NetworkSecurityGroupRule IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeNetworkSecurityGroupRule(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NetworkSecurityGroupRule)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static NetworkSecurityGroupRule FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeNetworkSecurityGroupRule(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/NetworkSecurityGroupRule.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/NetworkSecurityGroupRule.cs new file mode 100644 index 0000000000000..5716920127432 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/NetworkSecurityGroupRule.cs @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// A network security group rule to apply to an inbound endpoint. + public partial class NetworkSecurityGroupRule + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The priority for this rule. Priorities within a Pool must be unique and are evaluated in order of priority. The lower the number the higher the priority. For example, rules could be specified with order numbers of 150, 250, and 350. The rule with the order number of 150 takes precedence over the rule that has an order of 250. Allowed priorities are 150 to 4096. If any reserved or duplicate values are provided the request fails with HTTP status code 400. + /// The action that should be taken for a specified IP address, subnet range or tag. + /// The source address prefix or tag to match for the rule. Valid values are a single IP address (i.e. 10.10.10.10), IP subnet (i.e. 192.168.1.0/24), default tag, or * (for all addresses). If any other values are provided the request fails with HTTP status code 400. + /// is null. + public NetworkSecurityGroupRule(int priority, NetworkSecurityGroupRuleAccess access, string sourceAddressPrefix) + { + Argument.AssertNotNull(sourceAddressPrefix, nameof(sourceAddressPrefix)); + + Priority = priority; + Access = access; + SourceAddressPrefix = sourceAddressPrefix; + SourcePortRanges = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The priority for this rule. Priorities within a Pool must be unique and are evaluated in order of priority. The lower the number the higher the priority. For example, rules could be specified with order numbers of 150, 250, and 350. The rule with the order number of 150 takes precedence over the rule that has an order of 250. Allowed priorities are 150 to 4096. If any reserved or duplicate values are provided the request fails with HTTP status code 400. + /// The action that should be taken for a specified IP address, subnet range or tag. + /// The source address prefix or tag to match for the rule. Valid values are a single IP address (i.e. 10.10.10.10), IP subnet (i.e. 192.168.1.0/24), default tag, or * (for all addresses). If any other values are provided the request fails with HTTP status code 400. + /// The source port ranges to match for the rule. Valid values are '*' (for all ports 0 - 65535), a specific port (i.e. 22), or a port range (i.e. 100-200). The ports must be in the range of 0 to 65535. Each entry in this collection must not overlap any other entry (either a range or an individual port). If any other values are provided the request fails with HTTP status code 400. The default value is '*'. + /// Keeps track of any properties unknown to the library. + internal NetworkSecurityGroupRule(int priority, NetworkSecurityGroupRuleAccess access, string sourceAddressPrefix, IList sourcePortRanges, IDictionary serializedAdditionalRawData) + { + Priority = priority; + Access = access; + SourceAddressPrefix = sourceAddressPrefix; + SourcePortRanges = sourcePortRanges; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal NetworkSecurityGroupRule() + { + } + + /// The priority for this rule. Priorities within a Pool must be unique and are evaluated in order of priority. The lower the number the higher the priority. For example, rules could be specified with order numbers of 150, 250, and 350. The rule with the order number of 150 takes precedence over the rule that has an order of 250. Allowed priorities are 150 to 4096. If any reserved or duplicate values are provided the request fails with HTTP status code 400. + public int Priority { get; set; } + /// The action that should be taken for a specified IP address, subnet range or tag. + public NetworkSecurityGroupRuleAccess Access { get; set; } + /// The source address prefix or tag to match for the rule. Valid values are a single IP address (i.e. 10.10.10.10), IP subnet (i.e. 192.168.1.0/24), default tag, or * (for all addresses). If any other values are provided the request fails with HTTP status code 400. + public string SourceAddressPrefix { get; set; } + /// The source port ranges to match for the rule. Valid values are '*' (for all ports 0 - 65535), a specific port (i.e. 22), or a port range (i.e. 100-200). The ports must be in the range of 0 to 65535. Each entry in this collection must not overlap any other entry (either a range or an individual port). If any other values are provided the request fails with HTTP status code 400. The default value is '*'. + public IList SourcePortRanges { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/NetworkSecurityGroupRuleAccess.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/NetworkSecurityGroupRuleAccess.cs new file mode 100644 index 0000000000000..6dfbd49959dfa --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/NetworkSecurityGroupRuleAccess.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.Compute.Batch +{ + /// NetworkSecurityGroupRuleAccess enums. + public readonly partial struct NetworkSecurityGroupRuleAccess : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NetworkSecurityGroupRuleAccess(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AllowValue = "allow"; + private const string DenyValue = "deny"; + + /// Allow access. + public static NetworkSecurityGroupRuleAccess Allow { get; } = new NetworkSecurityGroupRuleAccess(AllowValue); + /// Deny access. + public static NetworkSecurityGroupRuleAccess Deny { get; } = new NetworkSecurityGroupRuleAccess(DenyValue); + /// Determines if two values are the same. + public static bool operator ==(NetworkSecurityGroupRuleAccess left, NetworkSecurityGroupRuleAccess right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NetworkSecurityGroupRuleAccess left, NetworkSecurityGroupRuleAccess right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator NetworkSecurityGroupRuleAccess(string value) => new NetworkSecurityGroupRuleAccess(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NetworkSecurityGroupRuleAccess other && Equals(other); + /// + public bool Equals(NetworkSecurityGroupRuleAccess other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/NfsMountConfiguration.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/NfsMountConfiguration.Serialization.cs new file mode 100644 index 0000000000000..653d3f6cd0a12 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/NfsMountConfiguration.Serialization.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class NfsMountConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NfsMountConfiguration)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("source"u8); + writer.WriteStringValue(Source); + writer.WritePropertyName("relativeMountPath"u8); + writer.WriteStringValue(RelativeMountPath); + if (Optional.IsDefined(MountOptions)) + { + writer.WritePropertyName("mountOptions"u8); + writer.WriteStringValue(MountOptions); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + NfsMountConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NfsMountConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNfsMountConfiguration(document.RootElement, options); + } + + internal static NfsMountConfiguration DeserializeNfsMountConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string source = default; + string relativeMountPath = default; + string mountOptions = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("source"u8)) + { + source = property.Value.GetString(); + continue; + } + if (property.NameEquals("relativeMountPath"u8)) + { + relativeMountPath = property.Value.GetString(); + continue; + } + if (property.NameEquals("mountOptions"u8)) + { + mountOptions = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NfsMountConfiguration(source, relativeMountPath, mountOptions, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NfsMountConfiguration)} does not support writing '{options.Format}' format."); + } + } + + NfsMountConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeNfsMountConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NfsMountConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static NfsMountConfiguration FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeNfsMountConfiguration(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/NfsMountConfiguration.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/NfsMountConfiguration.cs new file mode 100644 index 0000000000000..dd8f27f7aed9c --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/NfsMountConfiguration.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Information used to connect to an NFS file system. + public partial class NfsMountConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The URI of the file system to mount. + /// The relative path on the compute node where the file system will be mounted. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. + /// or is null. + public NfsMountConfiguration(string source, string relativeMountPath) + { + Argument.AssertNotNull(source, nameof(source)); + Argument.AssertNotNull(relativeMountPath, nameof(relativeMountPath)); + + Source = source; + RelativeMountPath = relativeMountPath; + } + + /// Initializes a new instance of . + /// The URI of the file system to mount. + /// The relative path on the compute node where the file system will be mounted. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. + /// Additional command line options to pass to the mount command. These are 'net use' options in Windows and 'mount' options in Linux. + /// Keeps track of any properties unknown to the library. + internal NfsMountConfiguration(string source, string relativeMountPath, string mountOptions, IDictionary serializedAdditionalRawData) + { + Source = source; + RelativeMountPath = relativeMountPath; + MountOptions = mountOptions; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal NfsMountConfiguration() + { + } + + /// The URI of the file system to mount. + public string Source { get; set; } + /// The relative path on the compute node where the file system will be mounted. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. + public string RelativeMountPath { get; set; } + /// Additional command line options to pass to the mount command. These are 'net use' options in Windows and 'mount' options in Linux. + public string MountOptions { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/OSDisk.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/OSDisk.Serialization.cs new file mode 100644 index 0000000000000..02a6a6a39c0d8 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/OSDisk.Serialization.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class OSDisk : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OSDisk)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(EphemeralOSDiskSettings)) + { + writer.WritePropertyName("ephemeralOSDiskSettings"u8); + writer.WriteObjectValue(EphemeralOSDiskSettings, options); + } + if (Optional.IsDefined(Caching)) + { + writer.WritePropertyName("caching"u8); + writer.WriteStringValue(Caching.Value.ToString()); + } + if (Optional.IsDefined(DiskSizeGB)) + { + writer.WritePropertyName("diskSizeGB"u8); + writer.WriteNumberValue(DiskSizeGB.Value); + } + if (Optional.IsDefined(ManagedDisk)) + { + writer.WritePropertyName("managedDisk"u8); + writer.WriteObjectValue(ManagedDisk, options); + } + if (Optional.IsDefined(WriteAcceleratorEnabled)) + { + writer.WritePropertyName("writeAcceleratorEnabled"u8); + writer.WriteBooleanValue(WriteAcceleratorEnabled.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + OSDisk IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OSDisk)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOSDisk(document.RootElement, options); + } + + internal static OSDisk DeserializeOSDisk(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DiffDiskSettings ephemeralOSDiskSettings = default; + CachingType? caching = default; + int? diskSizeGB = default; + ManagedDisk managedDisk = default; + bool? writeAcceleratorEnabled = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("ephemeralOSDiskSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ephemeralOSDiskSettings = DiffDiskSettings.DeserializeDiffDiskSettings(property.Value, options); + continue; + } + if (property.NameEquals("caching"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + caching = new CachingType(property.Value.GetString()); + continue; + } + if (property.NameEquals("diskSizeGB"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + diskSizeGB = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("managedDisk"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + managedDisk = ManagedDisk.DeserializeManagedDisk(property.Value, options); + continue; + } + if (property.NameEquals("writeAcceleratorEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + writeAcceleratorEnabled = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OSDisk( + ephemeralOSDiskSettings, + caching, + diskSizeGB, + managedDisk, + writeAcceleratorEnabled, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OSDisk)} does not support writing '{options.Format}' format."); + } + } + + OSDisk IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeOSDisk(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OSDisk)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static OSDisk FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeOSDisk(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/OSDisk.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/OSDisk.cs new file mode 100644 index 0000000000000..2c11fc67cba95 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/OSDisk.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Settings for the operating system disk of the compute node (VM). + public partial class OSDisk + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public OSDisk() + { + } + + /// Initializes a new instance of . + /// Specifies the ephemeral Disk Settings for the operating system disk used by the compute node (VM). + /// Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage. + /// The initial disk size in GB when creating new OS disk. + /// The managed disk parameters. + /// Specifies whether writeAccelerator should be enabled or disabled on the disk. + /// Keeps track of any properties unknown to the library. + internal OSDisk(DiffDiskSettings ephemeralOSDiskSettings, CachingType? caching, int? diskSizeGB, ManagedDisk managedDisk, bool? writeAcceleratorEnabled, IDictionary serializedAdditionalRawData) + { + EphemeralOSDiskSettings = ephemeralOSDiskSettings; + Caching = caching; + DiskSizeGB = diskSizeGB; + ManagedDisk = managedDisk; + WriteAcceleratorEnabled = writeAcceleratorEnabled; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Specifies the ephemeral Disk Settings for the operating system disk used by the compute node (VM). + public DiffDiskSettings EphemeralOSDiskSettings { get; set; } + /// Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage. + public CachingType? Caching { get; set; } + /// The initial disk size in GB when creating new OS disk. + public int? DiskSizeGB { get; set; } + /// The managed disk parameters. + public ManagedDisk ManagedDisk { get; set; } + /// Specifies whether writeAccelerator should be enabled or disabled on the disk. + public bool? WriteAcceleratorEnabled { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/OSType.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/OSType.cs new file mode 100644 index 0000000000000..9727c32c74ebb --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/OSType.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.Compute.Batch +{ + /// OSType enums. + public readonly partial struct OSType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public OSType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string LinuxValue = "linux"; + private const string WindowsValue = "windows"; + + /// The Linux operating system. + public static OSType Linux { get; } = new OSType(LinuxValue); + /// The Windows operating system. + public static OSType Windows { get; } = new OSType(WindowsValue); + /// Determines if two values are the same. + public static bool operator ==(OSType left, OSType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OSType left, OSType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator OSType(string value) => new OSType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is OSType other && Equals(other); + /// + public bool Equals(OSType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/OnAllBatchTasksComplete.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/OnAllBatchTasksComplete.cs new file mode 100644 index 0000000000000..6cb8339b1283a --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/OnAllBatchTasksComplete.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.Compute.Batch +{ + /// The action the Batch service should take when all Tasks in the Job are in the completed state. + public readonly partial struct OnAllBatchTasksComplete : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public OnAllBatchTasksComplete(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoActionValue = "noaction"; + private const string TerminateJobValue = "terminatejob"; + + /// Do nothing. The Job remains active unless terminated or disabled by some other means. + public static OnAllBatchTasksComplete NoAction { get; } = new OnAllBatchTasksComplete(NoActionValue); + /// Terminate the Job. The Job's terminationReason is set to 'AllTasksComplete'. + public static OnAllBatchTasksComplete TerminateJob { get; } = new OnAllBatchTasksComplete(TerminateJobValue); + /// Determines if two values are the same. + public static bool operator ==(OnAllBatchTasksComplete left, OnAllBatchTasksComplete right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OnAllBatchTasksComplete left, OnAllBatchTasksComplete right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator OnAllBatchTasksComplete(string value) => new OnAllBatchTasksComplete(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is OnAllBatchTasksComplete other && Equals(other); + /// + public bool Equals(OnAllBatchTasksComplete other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/OnBatchTaskFailure.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/OnBatchTaskFailure.cs new file mode 100644 index 0000000000000..10f31918164a8 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/OnBatchTaskFailure.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.Compute.Batch +{ + /// OnTaskFailure enums. + public readonly partial struct OnBatchTaskFailure : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public OnBatchTaskFailure(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoActionValue = "noaction"; + private const string PerformExitOptionsJobActionValue = "performexitoptionsjobaction"; + + /// Do nothing. The Job remains active unless terminated or disabled by some other means. + public static OnBatchTaskFailure NoAction { get; } = new OnBatchTaskFailure(NoActionValue); + /// Terminate the Job. The Job's terminationReason is set to 'AllTasksComplete'. + public static OnBatchTaskFailure PerformExitOptionsJobAction { get; } = new OnBatchTaskFailure(PerformExitOptionsJobActionValue); + /// Determines if two values are the same. + public static bool operator ==(OnBatchTaskFailure left, OnBatchTaskFailure right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OnBatchTaskFailure left, OnBatchTaskFailure right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator OnBatchTaskFailure(string value) => new OnBatchTaskFailure(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is OnBatchTaskFailure other && Equals(other); + /// + public bool Equals(OnBatchTaskFailure other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/OutputFile.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/OutputFile.Serialization.cs new file mode 100644 index 0000000000000..070e9004d0dbc --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/OutputFile.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class OutputFile : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OutputFile)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("filePattern"u8); + writer.WriteStringValue(FilePattern); + writer.WritePropertyName("destination"u8); + writer.WriteObjectValue(Destination, options); + writer.WritePropertyName("uploadOptions"u8); + writer.WriteObjectValue(UploadOptions, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + OutputFile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OutputFile)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOutputFile(document.RootElement, options); + } + + internal static OutputFile DeserializeOutputFile(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string filePattern = default; + OutputFileDestination destination = default; + OutputFileUploadConfig uploadOptions = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("filePattern"u8)) + { + filePattern = property.Value.GetString(); + continue; + } + if (property.NameEquals("destination"u8)) + { + destination = OutputFileDestination.DeserializeOutputFileDestination(property.Value, options); + continue; + } + if (property.NameEquals("uploadOptions"u8)) + { + uploadOptions = OutputFileUploadConfig.DeserializeOutputFileUploadConfig(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OutputFile(filePattern, destination, uploadOptions, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OutputFile)} does not support writing '{options.Format}' format."); + } + } + + OutputFile IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeOutputFile(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OutputFile)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static OutputFile FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeOutputFile(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/OutputFile.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/OutputFile.cs new file mode 100644 index 0000000000000..cb6966bffce1d --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/OutputFile.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// On every file uploads, Batch service writes two log files to the compute node, 'fileuploadout.txt' and 'fileuploaderr.txt'. These log files are used to learn more about a specific failure. + public partial class OutputFile + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// A pattern indicating which file(s) to upload. Both relative and absolute paths are supported. Relative paths are relative to the Task working directory. The following wildcards are supported: * matches 0 or more characters (for example pattern abc* would match abc or abcdef), ** matches any directory, ? matches any single character, [abc] matches one character in the brackets, and [a-c] matches one character in the range. Brackets can include a negation to match any character not specified (for example [!abc] matches any character but a, b, or c). If a file name starts with "." it is ignored by default but may be matched by specifying it explicitly (for example *.gif will not match .a.gif, but .*.gif will). A simple example: **\*.txt matches any file that does not start in '.' and ends with .txt in the Task working directory or any subdirectory. If the filename contains a wildcard character it can be escaped using brackets (for example abc[*] would match a file named abc*). Note that both \ and / are treated as directory separators on Windows, but only / is on Linux. Environment variables (%var% on Windows or $var on Linux) are expanded prior to the pattern being applied. + /// The destination for the output file(s). + /// Additional options for the upload operation, including under what conditions to perform the upload. + /// , or is null. + public OutputFile(string filePattern, OutputFileDestination destination, OutputFileUploadConfig uploadOptions) + { + Argument.AssertNotNull(filePattern, nameof(filePattern)); + Argument.AssertNotNull(destination, nameof(destination)); + Argument.AssertNotNull(uploadOptions, nameof(uploadOptions)); + + FilePattern = filePattern; + Destination = destination; + UploadOptions = uploadOptions; + } + + /// Initializes a new instance of . + /// A pattern indicating which file(s) to upload. Both relative and absolute paths are supported. Relative paths are relative to the Task working directory. The following wildcards are supported: * matches 0 or more characters (for example pattern abc* would match abc or abcdef), ** matches any directory, ? matches any single character, [abc] matches one character in the brackets, and [a-c] matches one character in the range. Brackets can include a negation to match any character not specified (for example [!abc] matches any character but a, b, or c). If a file name starts with "." it is ignored by default but may be matched by specifying it explicitly (for example *.gif will not match .a.gif, but .*.gif will). A simple example: **\*.txt matches any file that does not start in '.' and ends with .txt in the Task working directory or any subdirectory. If the filename contains a wildcard character it can be escaped using brackets (for example abc[*] would match a file named abc*). Note that both \ and / are treated as directory separators on Windows, but only / is on Linux. Environment variables (%var% on Windows or $var on Linux) are expanded prior to the pattern being applied. + /// The destination for the output file(s). + /// Additional options for the upload operation, including under what conditions to perform the upload. + /// Keeps track of any properties unknown to the library. + internal OutputFile(string filePattern, OutputFileDestination destination, OutputFileUploadConfig uploadOptions, IDictionary serializedAdditionalRawData) + { + FilePattern = filePattern; + Destination = destination; + UploadOptions = uploadOptions; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal OutputFile() + { + } + + /// A pattern indicating which file(s) to upload. Both relative and absolute paths are supported. Relative paths are relative to the Task working directory. The following wildcards are supported: * matches 0 or more characters (for example pattern abc* would match abc or abcdef), ** matches any directory, ? matches any single character, [abc] matches one character in the brackets, and [a-c] matches one character in the range. Brackets can include a negation to match any character not specified (for example [!abc] matches any character but a, b, or c). If a file name starts with "." it is ignored by default but may be matched by specifying it explicitly (for example *.gif will not match .a.gif, but .*.gif will). A simple example: **\*.txt matches any file that does not start in '.' and ends with .txt in the Task working directory or any subdirectory. If the filename contains a wildcard character it can be escaped using brackets (for example abc[*] would match a file named abc*). Note that both \ and / are treated as directory separators on Windows, but only / is on Linux. Environment variables (%var% on Windows or $var on Linux) are expanded prior to the pattern being applied. + public string FilePattern { get; set; } + /// The destination for the output file(s). + public OutputFileDestination Destination { get; set; } + /// Additional options for the upload operation, including under what conditions to perform the upload. + public OutputFileUploadConfig UploadOptions { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/OutputFileBlobContainerDestination.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/OutputFileBlobContainerDestination.Serialization.cs new file mode 100644 index 0000000000000..059dd2156abbd --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/OutputFileBlobContainerDestination.Serialization.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class OutputFileBlobContainerDestination : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OutputFileBlobContainerDestination)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Path)) + { + writer.WritePropertyName("path"u8); + writer.WriteStringValue(Path); + } + writer.WritePropertyName("containerUrl"u8); + writer.WriteStringValue(ContainerUrl); + if (Optional.IsDefined(IdentityReference)) + { + writer.WritePropertyName("identityReference"u8); + writer.WriteObjectValue(IdentityReference, options); + } + if (Optional.IsCollectionDefined(UploadHeaders)) + { + writer.WritePropertyName("uploadHeaders"u8); + writer.WriteStartArray(); + foreach (var item in UploadHeaders) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + OutputFileBlobContainerDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OutputFileBlobContainerDestination)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOutputFileBlobContainerDestination(document.RootElement, options); + } + + internal static OutputFileBlobContainerDestination DeserializeOutputFileBlobContainerDestination(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string path = default; + string containerUrl = default; + BatchNodeIdentityReference identityReference = default; + IList uploadHeaders = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("path"u8)) + { + path = property.Value.GetString(); + continue; + } + if (property.NameEquals("containerUrl"u8)) + { + containerUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("identityReference"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identityReference = BatchNodeIdentityReference.DeserializeBatchNodeIdentityReference(property.Value, options); + continue; + } + if (property.NameEquals("uploadHeaders"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(HttpHeader.DeserializeHttpHeader(item, options)); + } + uploadHeaders = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OutputFileBlobContainerDestination(path, containerUrl, identityReference, uploadHeaders ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OutputFileBlobContainerDestination)} does not support writing '{options.Format}' format."); + } + } + + OutputFileBlobContainerDestination IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeOutputFileBlobContainerDestination(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OutputFileBlobContainerDestination)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static OutputFileBlobContainerDestination FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeOutputFileBlobContainerDestination(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/OutputFileBlobContainerDestination.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/OutputFileBlobContainerDestination.cs new file mode 100644 index 0000000000000..44d0f78eef822 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/OutputFileBlobContainerDestination.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Specifies a file upload destination within an Azure blob storage container. + public partial class OutputFileBlobContainerDestination + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The URL of the container within Azure Blob Storage to which to upload the file(s). If not using a managed identity, the URL must include a Shared Access Signature (SAS) granting write permissions to the container. + /// is null. + public OutputFileBlobContainerDestination(string containerUrl) + { + Argument.AssertNotNull(containerUrl, nameof(containerUrl)); + + ContainerUrl = containerUrl; + UploadHeaders = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The destination blob or virtual directory within the Azure Storage container. If filePattern refers to a specific file (i.e. contains no wildcards), then path is the name of the blob to which to upload that file. If filePattern contains one or more wildcards (and therefore may match multiple files), then path is the name of the blob virtual directory (which is prepended to each blob name) to which to upload the file(s). If omitted, file(s) are uploaded to the root of the container with a blob name matching their file name. + /// The URL of the container within Azure Blob Storage to which to upload the file(s). If not using a managed identity, the URL must include a Shared Access Signature (SAS) granting write permissions to the container. + /// The reference to the user assigned identity to use to access Azure Blob Storage specified by containerUrl. The identity must have write access to the Azure Blob Storage container. + /// A list of name-value pairs for headers to be used in uploading output files. These headers will be specified when uploading files to Azure Storage. Official document on allowed headers when uploading blobs: https://docs.microsoft.com/en-us/rest/api/storageservices/put-blob#request-headers-all-blob-types. + /// Keeps track of any properties unknown to the library. + internal OutputFileBlobContainerDestination(string path, string containerUrl, BatchNodeIdentityReference identityReference, IList uploadHeaders, IDictionary serializedAdditionalRawData) + { + Path = path; + ContainerUrl = containerUrl; + IdentityReference = identityReference; + UploadHeaders = uploadHeaders; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal OutputFileBlobContainerDestination() + { + } + + /// The destination blob or virtual directory within the Azure Storage container. If filePattern refers to a specific file (i.e. contains no wildcards), then path is the name of the blob to which to upload that file. If filePattern contains one or more wildcards (and therefore may match multiple files), then path is the name of the blob virtual directory (which is prepended to each blob name) to which to upload the file(s). If omitted, file(s) are uploaded to the root of the container with a blob name matching their file name. + public string Path { get; set; } + /// The URL of the container within Azure Blob Storage to which to upload the file(s). If not using a managed identity, the URL must include a Shared Access Signature (SAS) granting write permissions to the container. + public string ContainerUrl { get; set; } + /// The reference to the user assigned identity to use to access Azure Blob Storage specified by containerUrl. The identity must have write access to the Azure Blob Storage container. + public BatchNodeIdentityReference IdentityReference { get; set; } + /// A list of name-value pairs for headers to be used in uploading output files. These headers will be specified when uploading files to Azure Storage. Official document on allowed headers when uploading blobs: https://docs.microsoft.com/en-us/rest/api/storageservices/put-blob#request-headers-all-blob-types. + public IList UploadHeaders { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/OutputFileDestination.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/OutputFileDestination.Serialization.cs new file mode 100644 index 0000000000000..6f34ab1cfc7ec --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/OutputFileDestination.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class OutputFileDestination : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OutputFileDestination)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Container)) + { + writer.WritePropertyName("container"u8); + writer.WriteObjectValue(Container, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + OutputFileDestination IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OutputFileDestination)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOutputFileDestination(document.RootElement, options); + } + + internal static OutputFileDestination DeserializeOutputFileDestination(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + OutputFileBlobContainerDestination container = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("container"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + container = OutputFileBlobContainerDestination.DeserializeOutputFileBlobContainerDestination(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OutputFileDestination(container, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OutputFileDestination)} does not support writing '{options.Format}' format."); + } + } + + OutputFileDestination IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeOutputFileDestination(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OutputFileDestination)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static OutputFileDestination FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeOutputFileDestination(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/OutputFileDestination.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/OutputFileDestination.cs new file mode 100644 index 0000000000000..4967dff392581 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/OutputFileDestination.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; + +namespace Azure.Compute.Batch +{ + /// The destination to which a file should be uploaded. + public partial class OutputFileDestination + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public OutputFileDestination() + { + } + + /// Initializes a new instance of . + /// A location in Azure blob storage to which files are uploaded. + /// Keeps track of any properties unknown to the library. + internal OutputFileDestination(OutputFileBlobContainerDestination container, IDictionary serializedAdditionalRawData) + { + Container = container; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// A location in Azure blob storage to which files are uploaded. + public OutputFileBlobContainerDestination Container { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/OutputFileUploadCondition.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/OutputFileUploadCondition.cs new file mode 100644 index 0000000000000..27035214ab95b --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/OutputFileUploadCondition.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.Compute.Batch +{ + /// OutputFileUploadCondition enums. + public readonly partial struct OutputFileUploadCondition : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public OutputFileUploadCondition(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TaskSuccessValue = "tasksuccess"; + private const string TaskFailureValue = "taskfailure"; + private const string TaskCompletionValue = "taskcompletion"; + + /// Upload the file(s) only after the Task process exits with an exit code of 0. + public static OutputFileUploadCondition TaskSuccess { get; } = new OutputFileUploadCondition(TaskSuccessValue); + /// Upload the file(s) only after the Task process exits with a nonzero exit code. + public static OutputFileUploadCondition TaskFailure { get; } = new OutputFileUploadCondition(TaskFailureValue); + /// Upload the file(s) after the Task process exits, no matter what the exit code was. + public static OutputFileUploadCondition TaskCompletion { get; } = new OutputFileUploadCondition(TaskCompletionValue); + /// Determines if two values are the same. + public static bool operator ==(OutputFileUploadCondition left, OutputFileUploadCondition right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OutputFileUploadCondition left, OutputFileUploadCondition right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator OutputFileUploadCondition(string value) => new OutputFileUploadCondition(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is OutputFileUploadCondition other && Equals(other); + /// + public bool Equals(OutputFileUploadCondition other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/OutputFileUploadConfig.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/OutputFileUploadConfig.Serialization.cs new file mode 100644 index 0000000000000..d5204fa3cb798 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/OutputFileUploadConfig.Serialization.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class OutputFileUploadConfig : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OutputFileUploadConfig)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("uploadCondition"u8); + writer.WriteStringValue(UploadCondition.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + OutputFileUploadConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OutputFileUploadConfig)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOutputFileUploadConfig(document.RootElement, options); + } + + internal static OutputFileUploadConfig DeserializeOutputFileUploadConfig(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + OutputFileUploadCondition uploadCondition = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("uploadCondition"u8)) + { + uploadCondition = new OutputFileUploadCondition(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OutputFileUploadConfig(uploadCondition, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OutputFileUploadConfig)} does not support writing '{options.Format}' format."); + } + } + + OutputFileUploadConfig IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeOutputFileUploadConfig(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OutputFileUploadConfig)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static OutputFileUploadConfig FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeOutputFileUploadConfig(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/OutputFileUploadConfig.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/OutputFileUploadConfig.cs new file mode 100644 index 0000000000000..449b7385086d9 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/OutputFileUploadConfig.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// + /// Options for an output file upload operation, including under what conditions + /// to perform the upload. + /// + public partial class OutputFileUploadConfig + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The conditions under which the Task output file or set of files should be uploaded. The default is taskcompletion. + public OutputFileUploadConfig(OutputFileUploadCondition uploadCondition) + { + UploadCondition = uploadCondition; + } + + /// Initializes a new instance of . + /// The conditions under which the Task output file or set of files should be uploaded. The default is taskcompletion. + /// Keeps track of any properties unknown to the library. + internal OutputFileUploadConfig(OutputFileUploadCondition uploadCondition, IDictionary serializedAdditionalRawData) + { + UploadCondition = uploadCondition; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal OutputFileUploadConfig() + { + } + + /// The conditions under which the Task output file or set of files should be uploaded. The default is taskcompletion. + public OutputFileUploadCondition UploadCondition { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/PublicIpAddressConfiguration.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/PublicIpAddressConfiguration.Serialization.cs new file mode 100644 index 0000000000000..e98eca4d6d31a --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/PublicIpAddressConfiguration.Serialization.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class PublicIpAddressConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PublicIpAddressConfiguration)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(IpAddressProvisioningType)) + { + writer.WritePropertyName("provision"u8); + writer.WriteStringValue(IpAddressProvisioningType.Value.ToString()); + } + if (Optional.IsCollectionDefined(IpAddressIds)) + { + writer.WritePropertyName("ipAddressIds"u8); + writer.WriteStartArray(); + foreach (var item in IpAddressIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + PublicIpAddressConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PublicIpAddressConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePublicIpAddressConfiguration(document.RootElement, options); + } + + internal static PublicIpAddressConfiguration DeserializePublicIpAddressConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IpAddressProvisioningType? provision = default; + IList ipAddressIds = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provision"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provision = new IpAddressProvisioningType(property.Value.GetString()); + continue; + } + if (property.NameEquals("ipAddressIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + ipAddressIds = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PublicIpAddressConfiguration(provision, ipAddressIds ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(PublicIpAddressConfiguration)} does not support writing '{options.Format}' format."); + } + } + + PublicIpAddressConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializePublicIpAddressConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PublicIpAddressConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static PublicIpAddressConfiguration FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializePublicIpAddressConfiguration(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/PublicIpAddressConfiguration.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/PublicIpAddressConfiguration.cs new file mode 100644 index 0000000000000..3af8d5206e919 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/PublicIpAddressConfiguration.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// The public IP Address configuration of the networking configuration of a Pool. + public partial class PublicIpAddressConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public PublicIpAddressConfiguration() + { + IpAddressIds = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The provisioning type for Public IP Addresses for the Pool. The default value is BatchManaged. + /// The list of public IPs which the Batch service will use when provisioning Compute Nodes. The number of IPs specified here limits the maximum size of the Pool - 100 dedicated nodes or 100 Spot/Low-priority nodes can be allocated for each public IP. For example, a pool needing 250 dedicated VMs would need at least 3 public IPs specified. Each element of this collection is of the form: /subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.Network/publicIPAddresses/{ip}. + /// Keeps track of any properties unknown to the library. + internal PublicIpAddressConfiguration(IpAddressProvisioningType? ipAddressProvisioningType, IList ipAddressIds, IDictionary serializedAdditionalRawData) + { + IpAddressProvisioningType = ipAddressProvisioningType; + IpAddressIds = ipAddressIds; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The provisioning type for Public IP Addresses for the Pool. The default value is BatchManaged. + public IpAddressProvisioningType? IpAddressProvisioningType { get; set; } + /// The list of public IPs which the Batch service will use when provisioning Compute Nodes. The number of IPs specified here limits the maximum size of the Pool - 100 dedicated nodes or 100 Spot/Low-priority nodes can be allocated for each public IP. For example, a pool needing 250 dedicated VMs would need at least 3 public IPs specified. Each element of this collection is of the form: /subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.Network/publicIPAddresses/{ip}. + public IList IpAddressIds { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/RecentBatchJob.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/RecentBatchJob.Serialization.cs new file mode 100644 index 0000000000000..2d448fb013eeb --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/RecentBatchJob.Serialization.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class RecentBatchJob : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RecentBatchJob)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsDefined(Url)) + { + writer.WritePropertyName("url"u8); + writer.WriteStringValue(Url); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + RecentBatchJob IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RecentBatchJob)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRecentBatchJob(document.RootElement, options); + } + + internal static RecentBatchJob DeserializeRecentBatchJob(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + string url = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("url"u8)) + { + url = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RecentBatchJob(id, url, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(RecentBatchJob)} does not support writing '{options.Format}' format."); + } + } + + RecentBatchJob IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeRecentBatchJob(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RecentBatchJob)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static RecentBatchJob FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeRecentBatchJob(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/RecentBatchJob.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/RecentBatchJob.cs new file mode 100644 index 0000000000000..5d8d951d5f6f1 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/RecentBatchJob.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Information about the most recent Job to run under the Job Schedule. + public partial class RecentBatchJob + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal RecentBatchJob() + { + } + + /// Initializes a new instance of . + /// The ID of the Job. + /// The URL of the Job. + /// Keeps track of any properties unknown to the library. + internal RecentBatchJob(string id, string url, IDictionary serializedAdditionalRawData) + { + Id = id; + Url = url; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The ID of the Job. + public string Id { get; } + /// The URL of the Job. + public string Url { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/ResizeError.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/ResizeError.Serialization.cs new file mode 100644 index 0000000000000..c65fd7a6c0c36 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/ResizeError.Serialization.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class ResizeError : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResizeError)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + } + if (Optional.IsDefined(Message)) + { + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + } + if (Optional.IsCollectionDefined(Values)) + { + writer.WritePropertyName("values"u8); + writer.WriteStartArray(); + foreach (var item in Values) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ResizeError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResizeError)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResizeError(document.RootElement, options); + } + + internal static ResizeError DeserializeResizeError(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string code = default; + string message = default; + IReadOnlyList values = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("values"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NameValuePair.DeserializeNameValuePair(item, options)); + } + values = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResizeError(code, message, values ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ResizeError)} does not support writing '{options.Format}' format."); + } + } + + ResizeError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeResizeError(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResizeError)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ResizeError FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeResizeError(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/ResizeError.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/ResizeError.cs new file mode 100644 index 0000000000000..f01ef629223dd --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/ResizeError.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// An error that occurred when resizing a Pool. + public partial class ResizeError + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ResizeError() + { + Values = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// An identifier for the Pool resize error. Codes are invariant and are intended to be consumed programmatically. + /// A message describing the Pool resize error, intended to be suitable for display in a user interface. + /// A list of additional error details related to the Pool resize error. + /// Keeps track of any properties unknown to the library. + internal ResizeError(string code, string message, IReadOnlyList values, IDictionary serializedAdditionalRawData) + { + Code = code; + Message = message; + Values = values; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// An identifier for the Pool resize error. Codes are invariant and are intended to be consumed programmatically. + public string Code { get; } + /// A message describing the Pool resize error, intended to be suitable for display in a user interface. + public string Message { get; } + /// A list of additional error details related to the Pool resize error. + public IReadOnlyList Values { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/ResourceFile.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/ResourceFile.Serialization.cs new file mode 100644 index 0000000000000..324491f6f9266 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/ResourceFile.Serialization.cs @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class ResourceFile : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceFile)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(AutoStorageContainerName)) + { + writer.WritePropertyName("autoStorageContainerName"u8); + writer.WriteStringValue(AutoStorageContainerName); + } + if (Optional.IsDefined(StorageContainerUrl)) + { + writer.WritePropertyName("storageContainerUrl"u8); + writer.WriteStringValue(StorageContainerUrl); + } + if (Optional.IsDefined(HttpUrl)) + { + writer.WritePropertyName("httpUrl"u8); + writer.WriteStringValue(HttpUrl); + } + if (Optional.IsDefined(BlobPrefix)) + { + writer.WritePropertyName("blobPrefix"u8); + writer.WriteStringValue(BlobPrefix); + } + if (Optional.IsDefined(FilePath)) + { + writer.WritePropertyName("filePath"u8); + writer.WriteStringValue(FilePath); + } + if (Optional.IsDefined(FileMode)) + { + writer.WritePropertyName("fileMode"u8); + writer.WriteStringValue(FileMode); + } + if (Optional.IsDefined(IdentityReference)) + { + writer.WritePropertyName("identityReference"u8); + writer.WriteObjectValue(IdentityReference, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ResourceFile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceFile)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceFile(document.RootElement, options); + } + + internal static ResourceFile DeserializeResourceFile(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string autoStorageContainerName = default; + string storageContainerUrl = default; + string httpUrl = default; + string blobPrefix = default; + string filePath = default; + string fileMode = default; + BatchNodeIdentityReference identityReference = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("autoStorageContainerName"u8)) + { + autoStorageContainerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageContainerUrl"u8)) + { + storageContainerUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("httpUrl"u8)) + { + httpUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("blobPrefix"u8)) + { + blobPrefix = property.Value.GetString(); + continue; + } + if (property.NameEquals("filePath"u8)) + { + filePath = property.Value.GetString(); + continue; + } + if (property.NameEquals("fileMode"u8)) + { + fileMode = property.Value.GetString(); + continue; + } + if (property.NameEquals("identityReference"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identityReference = BatchNodeIdentityReference.DeserializeBatchNodeIdentityReference(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceFile( + autoStorageContainerName, + storageContainerUrl, + httpUrl, + blobPrefix, + filePath, + fileMode, + identityReference, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ResourceFile)} does not support writing '{options.Format}' format."); + } + } + + ResourceFile IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeResourceFile(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceFile)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ResourceFile FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeResourceFile(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/ResourceFile.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/ResourceFile.cs new file mode 100644 index 0000000000000..b404259100420 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/ResourceFile.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// A single file or multiple files to be downloaded to a Compute Node. + public partial class ResourceFile + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ResourceFile() + { + } + + /// Initializes a new instance of . + /// The storage container name in the auto storage Account. The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified. + /// The URL of the blob container within Azure Blob Storage. The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified. This URL must be readable and listable from compute nodes. There are three ways to get such a URL for a container in Azure storage: include a Shared Access Signature (SAS) granting read and list permissions on the container, use a managed identity with read and list permissions, or set the ACL for the container to allow public access. + /// The URL of the file to download. The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified. If the URL points to Azure Blob Storage, it must be readable from compute nodes. There are three ways to get such a URL for a blob in Azure storage: include a Shared Access Signature (SAS) granting read permissions on the blob, use a managed identity with read permission, or set the ACL for the blob or its container to allow public access. + /// The blob prefix to use when downloading blobs from an Azure Storage container. Only the blobs whose names begin with the specified prefix will be downloaded. The property is valid only when autoStorageContainerName or storageContainerUrl is used. This prefix can be a partial filename or a subdirectory. If a prefix is not specified, all the files in the container will be downloaded. + /// The location on the Compute Node to which to download the file(s), relative to the Task's working directory. If the httpUrl property is specified, the filePath is required and describes the path which the file will be downloaded to, including the filename. Otherwise, if the autoStorageContainerName or storageContainerUrl property is specified, filePath is optional and is the directory to download the files to. In the case where filePath is used as a directory, any directory structure already associated with the input data will be retained in full and appended to the specified filePath directory. The specified relative path cannot break out of the Task's working directory (for example by using '..'). + /// The file permission mode attribute in octal format. This property applies only to files being downloaded to Linux Compute Nodes. It will be ignored if it is specified for a resourceFile which will be downloaded to a Windows Compute Node. If this property is not specified for a Linux Compute Node, then a default value of 0770 is applied to the file. + /// The reference to the user assigned identity to use to access Azure Blob Storage specified by storageContainerUrl or httpUrl. + /// Keeps track of any properties unknown to the library. + internal ResourceFile(string autoStorageContainerName, string storageContainerUrl, string httpUrl, string blobPrefix, string filePath, string fileMode, BatchNodeIdentityReference identityReference, IDictionary serializedAdditionalRawData) + { + AutoStorageContainerName = autoStorageContainerName; + StorageContainerUrl = storageContainerUrl; + HttpUrl = httpUrl; + BlobPrefix = blobPrefix; + FilePath = filePath; + FileMode = fileMode; + IdentityReference = identityReference; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The storage container name in the auto storage Account. The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified. + public string AutoStorageContainerName { get; set; } + /// The URL of the blob container within Azure Blob Storage. The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified. This URL must be readable and listable from compute nodes. There are three ways to get such a URL for a container in Azure storage: include a Shared Access Signature (SAS) granting read and list permissions on the container, use a managed identity with read and list permissions, or set the ACL for the container to allow public access. + public string StorageContainerUrl { get; set; } + /// The URL of the file to download. The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified. If the URL points to Azure Blob Storage, it must be readable from compute nodes. There are three ways to get such a URL for a blob in Azure storage: include a Shared Access Signature (SAS) granting read permissions on the blob, use a managed identity with read permission, or set the ACL for the blob or its container to allow public access. + public string HttpUrl { get; set; } + /// The blob prefix to use when downloading blobs from an Azure Storage container. Only the blobs whose names begin with the specified prefix will be downloaded. The property is valid only when autoStorageContainerName or storageContainerUrl is used. This prefix can be a partial filename or a subdirectory. If a prefix is not specified, all the files in the container will be downloaded. + public string BlobPrefix { get; set; } + /// The location on the Compute Node to which to download the file(s), relative to the Task's working directory. If the httpUrl property is specified, the filePath is required and describes the path which the file will be downloaded to, including the filename. Otherwise, if the autoStorageContainerName or storageContainerUrl property is specified, filePath is optional and is the directory to download the files to. In the case where filePath is used as a directory, any directory structure already associated with the input data will be retained in full and appended to the specified filePath directory. The specified relative path cannot break out of the Task's working directory (for example by using '..'). + public string FilePath { get; set; } + /// The file permission mode attribute in octal format. This property applies only to files being downloaded to Linux Compute Nodes. It will be ignored if it is specified for a resourceFile which will be downloaded to a Windows Compute Node. If this property is not specified for a Linux Compute Node, then a default value of 0770 is applied to the file. + public string FileMode { get; set; } + /// The reference to the user assigned identity to use to access Azure Blob Storage specified by storageContainerUrl or httpUrl. + public BatchNodeIdentityReference IdentityReference { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/RollingUpgradePolicy.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/RollingUpgradePolicy.Serialization.cs new file mode 100644 index 0000000000000..09b39011e43ba --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/RollingUpgradePolicy.Serialization.cs @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class RollingUpgradePolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RollingUpgradePolicy)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(EnableCrossZoneUpgrade)) + { + writer.WritePropertyName("enableCrossZoneUpgrade"u8); + writer.WriteBooleanValue(EnableCrossZoneUpgrade.Value); + } + if (Optional.IsDefined(MaxBatchInstancePercent)) + { + writer.WritePropertyName("maxBatchInstancePercent"u8); + writer.WriteNumberValue(MaxBatchInstancePercent.Value); + } + if (Optional.IsDefined(MaxUnhealthyInstancePercent)) + { + writer.WritePropertyName("maxUnhealthyInstancePercent"u8); + writer.WriteNumberValue(MaxUnhealthyInstancePercent.Value); + } + if (Optional.IsDefined(MaxUnhealthyUpgradedInstancePercent)) + { + writer.WritePropertyName("maxUnhealthyUpgradedInstancePercent"u8); + writer.WriteNumberValue(MaxUnhealthyUpgradedInstancePercent.Value); + } + if (Optional.IsDefined(PauseTimeBetweenBatches)) + { + writer.WritePropertyName("pauseTimeBetweenBatches"u8); + writer.WriteStringValue(PauseTimeBetweenBatches.Value, "P"); + } + if (Optional.IsDefined(PrioritizeUnhealthyInstances)) + { + writer.WritePropertyName("prioritizeUnhealthyInstances"u8); + writer.WriteBooleanValue(PrioritizeUnhealthyInstances.Value); + } + if (Optional.IsDefined(RollbackFailedInstancesOnPolicyBreach)) + { + writer.WritePropertyName("rollbackFailedInstancesOnPolicyBreach"u8); + writer.WriteBooleanValue(RollbackFailedInstancesOnPolicyBreach.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + RollingUpgradePolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RollingUpgradePolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRollingUpgradePolicy(document.RootElement, options); + } + + internal static RollingUpgradePolicy DeserializeRollingUpgradePolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? enableCrossZoneUpgrade = default; + int? maxBatchInstancePercent = default; + int? maxUnhealthyInstancePercent = default; + int? maxUnhealthyUpgradedInstancePercent = default; + TimeSpan? pauseTimeBetweenBatches = default; + bool? prioritizeUnhealthyInstances = default; + bool? rollbackFailedInstancesOnPolicyBreach = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("enableCrossZoneUpgrade"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableCrossZoneUpgrade = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("maxBatchInstancePercent"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxBatchInstancePercent = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maxUnhealthyInstancePercent"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxUnhealthyInstancePercent = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maxUnhealthyUpgradedInstancePercent"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxUnhealthyUpgradedInstancePercent = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("pauseTimeBetweenBatches"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pauseTimeBetweenBatches = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("prioritizeUnhealthyInstances"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + prioritizeUnhealthyInstances = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("rollbackFailedInstancesOnPolicyBreach"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + rollbackFailedInstancesOnPolicyBreach = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RollingUpgradePolicy( + enableCrossZoneUpgrade, + maxBatchInstancePercent, + maxUnhealthyInstancePercent, + maxUnhealthyUpgradedInstancePercent, + pauseTimeBetweenBatches, + prioritizeUnhealthyInstances, + rollbackFailedInstancesOnPolicyBreach, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(RollingUpgradePolicy)} does not support writing '{options.Format}' format."); + } + } + + RollingUpgradePolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeRollingUpgradePolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RollingUpgradePolicy)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static RollingUpgradePolicy FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeRollingUpgradePolicy(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/RollingUpgradePolicy.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/RollingUpgradePolicy.cs new file mode 100644 index 0000000000000..00654d33a88fa --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/RollingUpgradePolicy.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// The configuration parameters used while performing a rolling upgrade. + public partial class RollingUpgradePolicy + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public RollingUpgradePolicy() + { + } + + /// Initializes a new instance of . + /// Allow VMSS to ignore AZ boundaries when constructing upgrade batches. Take into consideration the Update Domain and maxBatchInstancePercent to determine the batch size. This field is able to be set to true or false only when using NodePlacementConfiguration as Zonal. + /// The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability. The value of this field should be between 5 and 100, inclusive. If both maxBatchInstancePercent and maxUnhealthyInstancePercent are assigned with value, the value of maxBatchInstancePercent should not be more than maxUnhealthyInstancePercent. + /// The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. The value of this field should be between 5 and 100, inclusive. If both maxBatchInstancePercent and maxUnhealthyInstancePercent are assigned with value, the value of maxBatchInstancePercent should not be more than maxUnhealthyInstancePercent. + /// The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts. The value of this field should be between 0 and 100, inclusive. + /// The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format.. + /// Upgrade all unhealthy instances in a scale set before any healthy instances. + /// Rollback failed instances to previous model if the Rolling Upgrade policy is violated. + /// Keeps track of any properties unknown to the library. + internal RollingUpgradePolicy(bool? enableCrossZoneUpgrade, int? maxBatchInstancePercent, int? maxUnhealthyInstancePercent, int? maxUnhealthyUpgradedInstancePercent, TimeSpan? pauseTimeBetweenBatches, bool? prioritizeUnhealthyInstances, bool? rollbackFailedInstancesOnPolicyBreach, IDictionary serializedAdditionalRawData) + { + EnableCrossZoneUpgrade = enableCrossZoneUpgrade; + MaxBatchInstancePercent = maxBatchInstancePercent; + MaxUnhealthyInstancePercent = maxUnhealthyInstancePercent; + MaxUnhealthyUpgradedInstancePercent = maxUnhealthyUpgradedInstancePercent; + PauseTimeBetweenBatches = pauseTimeBetweenBatches; + PrioritizeUnhealthyInstances = prioritizeUnhealthyInstances; + RollbackFailedInstancesOnPolicyBreach = rollbackFailedInstancesOnPolicyBreach; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Allow VMSS to ignore AZ boundaries when constructing upgrade batches. Take into consideration the Update Domain and maxBatchInstancePercent to determine the batch size. This field is able to be set to true or false only when using NodePlacementConfiguration as Zonal. + public bool? EnableCrossZoneUpgrade { get; set; } + /// The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability. The value of this field should be between 5 and 100, inclusive. If both maxBatchInstancePercent and maxUnhealthyInstancePercent are assigned with value, the value of maxBatchInstancePercent should not be more than maxUnhealthyInstancePercent. + public int? MaxBatchInstancePercent { get; set; } + /// The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. The value of this field should be between 5 and 100, inclusive. If both maxBatchInstancePercent and maxUnhealthyInstancePercent are assigned with value, the value of maxBatchInstancePercent should not be more than maxUnhealthyInstancePercent. + public int? MaxUnhealthyInstancePercent { get; set; } + /// The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts. The value of this field should be between 0 and 100, inclusive. + public int? MaxUnhealthyUpgradedInstancePercent { get; set; } + /// The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format.. + public TimeSpan? PauseTimeBetweenBatches { get; set; } + /// Upgrade all unhealthy instances in a scale set before any healthy instances. + public bool? PrioritizeUnhealthyInstances { get; set; } + /// Rollback failed instances to previous model if the Rolling Upgrade policy is violated. + public bool? RollbackFailedInstancesOnPolicyBreach { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/SchedulingState.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/SchedulingState.cs new file mode 100644 index 0000000000000..79ebd11b40267 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/SchedulingState.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.Compute.Batch +{ + /// SchedulingState enums. + public readonly partial struct SchedulingState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SchedulingState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "enabled"; + private const string DisabledValue = "disabled"; + + /// Tasks can be scheduled on the Compute Node. + public static SchedulingState Enabled { get; } = new SchedulingState(EnabledValue); + /// No new Tasks will be scheduled on the Compute Node. Tasks already running on the Compute Node may still run to completion. All Compute Nodes start with scheduling enabled. + public static SchedulingState Disabled { get; } = new SchedulingState(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(SchedulingState left, SchedulingState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SchedulingState left, SchedulingState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SchedulingState(string value) => new SchedulingState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SchedulingState other && Equals(other); + /// + public bool Equals(SchedulingState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/SecurityProfile.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/SecurityProfile.Serialization.cs new file mode 100644 index 0000000000000..14ea5a55a6077 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/SecurityProfile.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class SecurityProfile : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SecurityProfile)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("encryptionAtHost"u8); + writer.WriteBooleanValue(EncryptionAtHost); + writer.WritePropertyName("securityType"u8); + writer.WriteStringValue(SecurityType.ToString()); + writer.WritePropertyName("uefiSettings"u8); + writer.WriteObjectValue(UefiSettings, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + SecurityProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SecurityProfile)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSecurityProfile(document.RootElement, options); + } + + internal static SecurityProfile DeserializeSecurityProfile(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool encryptionAtHost = default; + SecurityTypes securityType = default; + UefiSettings uefiSettings = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("encryptionAtHost"u8)) + { + encryptionAtHost = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("securityType"u8)) + { + securityType = new SecurityTypes(property.Value.GetString()); + continue; + } + if (property.NameEquals("uefiSettings"u8)) + { + uefiSettings = UefiSettings.DeserializeUefiSettings(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SecurityProfile(encryptionAtHost, securityType, uefiSettings, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SecurityProfile)} does not support writing '{options.Format}' format."); + } + } + + SecurityProfile IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSecurityProfile(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SecurityProfile)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SecurityProfile FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSecurityProfile(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/SecurityProfile.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/SecurityProfile.cs new file mode 100644 index 0000000000000..4f81495d150a0 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/SecurityProfile.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Specifies the security profile settings for the virtual machine or virtual machine scale set. + public partial class SecurityProfile + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual machine scale set. This will enable the encryption for all the disks including Resource/Temp disk at host itself. + /// Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. + /// Specifies the security settings like secure boot and vTPM used while creating the virtual machine. Specifies the security settings like secure boot and vTPM used while creating the virtual machine. + /// is null. + public SecurityProfile(bool encryptionAtHost, SecurityTypes securityType, UefiSettings uefiSettings) + { + Argument.AssertNotNull(uefiSettings, nameof(uefiSettings)); + + EncryptionAtHost = encryptionAtHost; + SecurityType = securityType; + UefiSettings = uefiSettings; + } + + /// Initializes a new instance of . + /// This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual machine scale set. This will enable the encryption for all the disks including Resource/Temp disk at host itself. + /// Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. + /// Specifies the security settings like secure boot and vTPM used while creating the virtual machine. Specifies the security settings like secure boot and vTPM used while creating the virtual machine. + /// Keeps track of any properties unknown to the library. + internal SecurityProfile(bool encryptionAtHost, SecurityTypes securityType, UefiSettings uefiSettings, IDictionary serializedAdditionalRawData) + { + EncryptionAtHost = encryptionAtHost; + SecurityType = securityType; + UefiSettings = uefiSettings; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SecurityProfile() + { + } + + /// This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual machine scale set. This will enable the encryption for all the disks including Resource/Temp disk at host itself. + public bool EncryptionAtHost { get; set; } + /// Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. + public SecurityTypes SecurityType { get; set; } + /// Specifies the security settings like secure boot and vTPM used while creating the virtual machine. Specifies the security settings like secure boot and vTPM used while creating the virtual machine. + public UefiSettings UefiSettings { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/SecurityTypes.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/SecurityTypes.cs new file mode 100644 index 0000000000000..6233c8af2663d --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/SecurityTypes.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Compute.Batch +{ + /// Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. + public readonly partial struct SecurityTypes : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SecurityTypes(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TrustedLaunchValue = "trustedLaunch"; + + /// Trusted launch protects against advanced and persistent attack techniques. + public static SecurityTypes TrustedLaunch { get; } = new SecurityTypes(TrustedLaunchValue); + /// Determines if two values are the same. + public static bool operator ==(SecurityTypes left, SecurityTypes right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SecurityTypes left, SecurityTypes right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SecurityTypes(string value) => new SecurityTypes(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SecurityTypes other && Equals(other); + /// + public bool Equals(SecurityTypes other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/ServiceArtifactReference.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/ServiceArtifactReference.Serialization.cs new file mode 100644 index 0000000000000..be9f32cd663bd --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/ServiceArtifactReference.Serialization.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class ServiceArtifactReference : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ServiceArtifactReference)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ServiceArtifactReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ServiceArtifactReference)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeServiceArtifactReference(document.RootElement, options); + } + + internal static ServiceArtifactReference DeserializeServiceArtifactReference(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ServiceArtifactReference(id, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ServiceArtifactReference)} does not support writing '{options.Format}' format."); + } + } + + ServiceArtifactReference IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeServiceArtifactReference(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ServiceArtifactReference)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ServiceArtifactReference FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeServiceArtifactReference(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/ServiceArtifactReference.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/ServiceArtifactReference.cs new file mode 100644 index 0000000000000..5f7e8a17afa6d --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/ServiceArtifactReference.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// + /// Specifies the service artifact reference id used to set same image version + /// for all virtual machines in the scale set when using 'latest' image version. + /// + public partial class ServiceArtifactReference + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The service artifact reference id of ServiceArtifactReference. The service artifact reference id in the form of /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName}. + /// is null. + public ServiceArtifactReference(string id) + { + Argument.AssertNotNull(id, nameof(id)); + + Id = id; + } + + /// Initializes a new instance of . + /// The service artifact reference id of ServiceArtifactReference. The service artifact reference id in the form of /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName}. + /// Keeps track of any properties unknown to the library. + internal ServiceArtifactReference(string id, IDictionary serializedAdditionalRawData) + { + Id = id; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ServiceArtifactReference() + { + } + + /// The service artifact reference id of ServiceArtifactReference. The service artifact reference id in the form of /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName}. + public string Id { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/StatusLevelTypes.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/StatusLevelTypes.cs new file mode 100644 index 0000000000000..28118bd33986b --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/StatusLevelTypes.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.Compute.Batch +{ + /// Level code. + public readonly partial struct StatusLevelTypes : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public StatusLevelTypes(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ErrorValue = "Error"; + private const string InfoValue = "Info"; + private const string WarningValue = "Warning"; + + /// Error. + public static StatusLevelTypes Error { get; } = new StatusLevelTypes(ErrorValue); + /// Info. + public static StatusLevelTypes Info { get; } = new StatusLevelTypes(InfoValue); + /// Warning. + public static StatusLevelTypes Warning { get; } = new StatusLevelTypes(WarningValue); + /// Determines if two values are the same. + public static bool operator ==(StatusLevelTypes left, StatusLevelTypes right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(StatusLevelTypes left, StatusLevelTypes right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator StatusLevelTypes(string value) => new StatusLevelTypes(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is StatusLevelTypes other && Equals(other); + /// + public bool Equals(StatusLevelTypes other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/StorageAccountType.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/StorageAccountType.cs new file mode 100644 index 0000000000000..ab2c0f8255ac3 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/StorageAccountType.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.Compute.Batch +{ + /// StorageAccountType enums. + public readonly partial struct StorageAccountType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public StorageAccountType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StandardLRSValue = "standard_lrs"; + private const string PremiumLRSValue = "premium_lrs"; + private const string StandardSSDLRSValue = "standardssd_lrs"; + + /// The data disk should use standard locally redundant storage. + public static StorageAccountType StandardLRS { get; } = new StorageAccountType(StandardLRSValue); + /// The data disk should use premium locally redundant storage. + public static StorageAccountType PremiumLRS { get; } = new StorageAccountType(PremiumLRSValue); + /// The data disk / OS disk should use standard SSD locally redundant storage. + public static StorageAccountType StandardSSDLRS { get; } = new StorageAccountType(StandardSSDLRSValue); + /// Determines if two values are the same. + public static bool operator ==(StorageAccountType left, StorageAccountType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(StorageAccountType left, StorageAccountType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator StorageAccountType(string value) => new StorageAccountType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is StorageAccountType other && Equals(other); + /// + public bool Equals(StorageAccountType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/UefiSettings.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/UefiSettings.Serialization.cs new file mode 100644 index 0000000000000..f8c1ab10a99d6 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/UefiSettings.Serialization.cs @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class UefiSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UefiSettings)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(SecureBootEnabled)) + { + writer.WritePropertyName("secureBootEnabled"u8); + writer.WriteBooleanValue(SecureBootEnabled.Value); + } + if (Optional.IsDefined(VTpmEnabled)) + { + writer.WritePropertyName("vTpmEnabled"u8); + writer.WriteBooleanValue(VTpmEnabled.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + UefiSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UefiSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeUefiSettings(document.RootElement, options); + } + + internal static UefiSettings DeserializeUefiSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? secureBootEnabled = default; + bool? vTpmEnabled = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("secureBootEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + secureBootEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("vTpmEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + vTpmEnabled = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UefiSettings(secureBootEnabled, vTpmEnabled, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(UefiSettings)} does not support writing '{options.Format}' format."); + } + } + + UefiSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeUefiSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(UefiSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static UefiSettings FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUefiSettings(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/UefiSettings.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/UefiSettings.cs new file mode 100644 index 0000000000000..bc8c7c1a7f490 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/UefiSettings.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Specifies the security settings like secure boot and vTPM used while creating the virtual machine. + public partial class UefiSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public UefiSettings() + { + } + + /// Initializes a new instance of . + /// Specifies whether secure boot should be enabled on the virtual machine. + /// Specifies whether vTPM should be enabled on the virtual machine. + /// Keeps track of any properties unknown to the library. + internal UefiSettings(bool? secureBootEnabled, bool? vTpmEnabled, IDictionary serializedAdditionalRawData) + { + SecureBootEnabled = secureBootEnabled; + VTpmEnabled = vTpmEnabled; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Specifies whether secure boot should be enabled on the virtual machine. + public bool? SecureBootEnabled { get; set; } + /// Specifies whether vTPM should be enabled on the virtual machine. + public bool? VTpmEnabled { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/UpgradeMode.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/UpgradeMode.cs new file mode 100644 index 0000000000000..a948397f068ce --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/UpgradeMode.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.Compute.Batch +{ + /// UpgradeMode enums. + public readonly partial struct UpgradeMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public UpgradeMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AutomaticValue = "automatic"; + private const string ManualValue = "manual"; + private const string RollingValue = "rolling"; + + /// TAll virtual machines in the scale set are automatically updated at the same time. + public static UpgradeMode Automatic { get; } = new UpgradeMode(AutomaticValue); + /// You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action. + public static UpgradeMode Manual { get; } = new UpgradeMode(ManualValue); + /// The existing instances in a scale set are brought down in batches to be upgraded. Once the upgraded batch is complete, the instances will begin taking traffic again and the next batch will begin. This continues until all instances brought up-to-date. + public static UpgradeMode Rolling { get; } = new UpgradeMode(RollingValue); + /// Determines if two values are the same. + public static bool operator ==(UpgradeMode left, UpgradeMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(UpgradeMode left, UpgradeMode right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator UpgradeMode(string value) => new UpgradeMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is UpgradeMode other && Equals(other); + /// + public bool Equals(UpgradeMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/UpgradePolicy.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/UpgradePolicy.Serialization.cs new file mode 100644 index 0000000000000..22e0ce0865d5d --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/UpgradePolicy.Serialization.cs @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class UpgradePolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UpgradePolicy)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.ToString()); + if (Optional.IsDefined(AutomaticOsUpgradePolicy)) + { + writer.WritePropertyName("automaticOSUpgradePolicy"u8); + writer.WriteObjectValue(AutomaticOsUpgradePolicy, options); + } + if (Optional.IsDefined(RollingUpgradePolicy)) + { + writer.WritePropertyName("rollingUpgradePolicy"u8); + writer.WriteObjectValue(RollingUpgradePolicy, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + UpgradePolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UpgradePolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeUpgradePolicy(document.RootElement, options); + } + + internal static UpgradePolicy DeserializeUpgradePolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + UpgradeMode mode = default; + AutomaticOsUpgradePolicy automaticOSUpgradePolicy = default; + RollingUpgradePolicy rollingUpgradePolicy = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mode"u8)) + { + mode = new UpgradeMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("automaticOSUpgradePolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + automaticOSUpgradePolicy = AutomaticOsUpgradePolicy.DeserializeAutomaticOsUpgradePolicy(property.Value, options); + continue; + } + if (property.NameEquals("rollingUpgradePolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + rollingUpgradePolicy = RollingUpgradePolicy.DeserializeRollingUpgradePolicy(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UpgradePolicy(mode, automaticOSUpgradePolicy, rollingUpgradePolicy, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(UpgradePolicy)} does not support writing '{options.Format}' format."); + } + } + + UpgradePolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeUpgradePolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(UpgradePolicy)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static UpgradePolicy FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUpgradePolicy(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/UpgradePolicy.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/UpgradePolicy.cs new file mode 100644 index 0000000000000..ff0839122bf21 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/UpgradePolicy.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Describes an upgrade policy - automatic, manual, or rolling. + public partial class UpgradePolicy + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Specifies the mode of an upgrade to virtual machines in the scale set.<br /><br /> Possible values are:<br /><br /> **Manual** - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.<br /><br /> **Automatic** - All virtual machines in the scale set are automatically updated at the same time.<br /><br /> **Rolling** - Scale set performs updates in batches with an optional pause time in between. + public UpgradePolicy(UpgradeMode mode) + { + Mode = mode; + } + + /// Initializes a new instance of . + /// Specifies the mode of an upgrade to virtual machines in the scale set.<br /><br /> Possible values are:<br /><br /> **Manual** - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.<br /><br /> **Automatic** - All virtual machines in the scale set are automatically updated at the same time.<br /><br /> **Rolling** - Scale set performs updates in batches with an optional pause time in between. + /// Configuration parameters used for performing automatic OS Upgrade. The configuration parameters used for performing automatic OS upgrade. + /// The configuration parameters used while performing a rolling upgrade. This property is only supported on Pools with the virtualMachineConfiguration property. + /// Keeps track of any properties unknown to the library. + internal UpgradePolicy(UpgradeMode mode, AutomaticOsUpgradePolicy automaticOsUpgradePolicy, RollingUpgradePolicy rollingUpgradePolicy, IDictionary serializedAdditionalRawData) + { + Mode = mode; + AutomaticOsUpgradePolicy = automaticOsUpgradePolicy; + RollingUpgradePolicy = rollingUpgradePolicy; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal UpgradePolicy() + { + } + + /// Specifies the mode of an upgrade to virtual machines in the scale set.<br /><br /> Possible values are:<br /><br /> **Manual** - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.<br /><br /> **Automatic** - All virtual machines in the scale set are automatically updated at the same time.<br /><br /> **Rolling** - Scale set performs updates in batches with an optional pause time in between. + public UpgradeMode Mode { get; set; } + /// Configuration parameters used for performing automatic OS Upgrade. The configuration parameters used for performing automatic OS upgrade. + public AutomaticOsUpgradePolicy AutomaticOsUpgradePolicy { get; set; } + /// The configuration parameters used while performing a rolling upgrade. This property is only supported on Pools with the virtualMachineConfiguration property. + public RollingUpgradePolicy RollingUpgradePolicy { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/UploadBatchServiceLogsContent.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/UploadBatchServiceLogsContent.Serialization.cs new file mode 100644 index 0000000000000..5f9cc8af92622 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/UploadBatchServiceLogsContent.Serialization.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class UploadBatchServiceLogsContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UploadBatchServiceLogsContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("containerUrl"u8); + writer.WriteStringValue(ContainerUrl); + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartTime, "O"); + if (Optional.IsDefined(EndTime)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndTime.Value, "O"); + } + if (Optional.IsDefined(IdentityReference)) + { + writer.WritePropertyName("identityReference"u8); + writer.WriteObjectValue(IdentityReference, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + UploadBatchServiceLogsContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UploadBatchServiceLogsContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeUploadBatchServiceLogsContent(document.RootElement, options); + } + + internal static UploadBatchServiceLogsContent DeserializeUploadBatchServiceLogsContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string containerUrl = default; + DateTimeOffset startTime = default; + DateTimeOffset? endTime = default; + BatchNodeIdentityReference identityReference = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("containerUrl"u8)) + { + containerUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("startTime"u8)) + { + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("identityReference"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identityReference = BatchNodeIdentityReference.DeserializeBatchNodeIdentityReference(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UploadBatchServiceLogsContent(containerUrl, startTime, endTime, identityReference, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(UploadBatchServiceLogsContent)} does not support writing '{options.Format}' format."); + } + } + + UploadBatchServiceLogsContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeUploadBatchServiceLogsContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(UploadBatchServiceLogsContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static UploadBatchServiceLogsContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUploadBatchServiceLogsContent(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/UploadBatchServiceLogsContent.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/UploadBatchServiceLogsContent.cs new file mode 100644 index 0000000000000..e5283b9180cf5 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/UploadBatchServiceLogsContent.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// The Azure Batch service log files upload parameters for a Compute Node. + public partial class UploadBatchServiceLogsContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The URL of the container within Azure Blob Storage to which to upload the Batch Service log file(s). If a user assigned managed identity is not being used, the URL must include a Shared Access Signature (SAS) granting write permissions to the container. The SAS duration must allow enough time for the upload to finish. The start time for SAS is optional and recommended to not be specified. + /// The start of the time range from which to upload Batch Service log file(s). Any log file containing a log message in the time range will be uploaded. This means that the operation might retrieve more logs than have been requested since the entire log file is always uploaded, but the operation should not retrieve fewer logs than have been requested. + /// is null. + public UploadBatchServiceLogsContent(string containerUrl, DateTimeOffset startTime) + { + Argument.AssertNotNull(containerUrl, nameof(containerUrl)); + + ContainerUrl = containerUrl; + StartTime = startTime; + } + + /// Initializes a new instance of . + /// The URL of the container within Azure Blob Storage to which to upload the Batch Service log file(s). If a user assigned managed identity is not being used, the URL must include a Shared Access Signature (SAS) granting write permissions to the container. The SAS duration must allow enough time for the upload to finish. The start time for SAS is optional and recommended to not be specified. + /// The start of the time range from which to upload Batch Service log file(s). Any log file containing a log message in the time range will be uploaded. This means that the operation might retrieve more logs than have been requested since the entire log file is always uploaded, but the operation should not retrieve fewer logs than have been requested. + /// The end of the time range from which to upload Batch Service log file(s). Any log file containing a log message in the time range will be uploaded. This means that the operation might retrieve more logs than have been requested since the entire log file is always uploaded, but the operation should not retrieve fewer logs than have been requested. If omitted, the default is to upload all logs available after the startTime. + /// The reference to the user assigned identity to use to access Azure Blob Storage specified by containerUrl. The identity must have write access to the Azure Blob Storage container. + /// Keeps track of any properties unknown to the library. + internal UploadBatchServiceLogsContent(string containerUrl, DateTimeOffset startTime, DateTimeOffset? endTime, BatchNodeIdentityReference identityReference, IDictionary serializedAdditionalRawData) + { + ContainerUrl = containerUrl; + StartTime = startTime; + EndTime = endTime; + IdentityReference = identityReference; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal UploadBatchServiceLogsContent() + { + } + + /// The URL of the container within Azure Blob Storage to which to upload the Batch Service log file(s). If a user assigned managed identity is not being used, the URL must include a Shared Access Signature (SAS) granting write permissions to the container. The SAS duration must allow enough time for the upload to finish. The start time for SAS is optional and recommended to not be specified. + public string ContainerUrl { get; } + /// The start of the time range from which to upload Batch Service log file(s). Any log file containing a log message in the time range will be uploaded. This means that the operation might retrieve more logs than have been requested since the entire log file is always uploaded, but the operation should not retrieve fewer logs than have been requested. + public DateTimeOffset StartTime { get; } + /// The end of the time range from which to upload Batch Service log file(s). Any log file containing a log message in the time range will be uploaded. This means that the operation might retrieve more logs than have been requested since the entire log file is always uploaded, but the operation should not retrieve fewer logs than have been requested. If omitted, the default is to upload all logs available after the startTime. + public DateTimeOffset? EndTime { get; set; } + /// The reference to the user assigned identity to use to access Azure Blob Storage specified by containerUrl. The identity must have write access to the Azure Blob Storage container. + public BatchNodeIdentityReference IdentityReference { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/UploadBatchServiceLogsResult.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/UploadBatchServiceLogsResult.Serialization.cs new file mode 100644 index 0000000000000..70bc53481d422 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/UploadBatchServiceLogsResult.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class UploadBatchServiceLogsResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UploadBatchServiceLogsResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("virtualDirectoryName"u8); + writer.WriteStringValue(VirtualDirectoryName); + writer.WritePropertyName("numberOfFilesUploaded"u8); + writer.WriteNumberValue(NumberOfFilesUploaded); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + UploadBatchServiceLogsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UploadBatchServiceLogsResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeUploadBatchServiceLogsResult(document.RootElement, options); + } + + internal static UploadBatchServiceLogsResult DeserializeUploadBatchServiceLogsResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string virtualDirectoryName = default; + int numberOfFilesUploaded = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("virtualDirectoryName"u8)) + { + virtualDirectoryName = property.Value.GetString(); + continue; + } + if (property.NameEquals("numberOfFilesUploaded"u8)) + { + numberOfFilesUploaded = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UploadBatchServiceLogsResult(virtualDirectoryName, numberOfFilesUploaded, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(UploadBatchServiceLogsResult)} does not support writing '{options.Format}' format."); + } + } + + UploadBatchServiceLogsResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeUploadBatchServiceLogsResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(UploadBatchServiceLogsResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static UploadBatchServiceLogsResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUploadBatchServiceLogsResult(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/UploadBatchServiceLogsResult.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/UploadBatchServiceLogsResult.cs new file mode 100644 index 0000000000000..d7fc7a0306ece --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/UploadBatchServiceLogsResult.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// The result of uploading Batch service log files from a specific Compute Node. + public partial class UploadBatchServiceLogsResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The virtual directory within Azure Blob Storage container to which the Batch Service log file(s) will be uploaded. The virtual directory name is part of the blob name for each log file uploaded, and it is built based poolId, nodeId and a unique identifier. + /// The number of log files which will be uploaded. + /// is null. + internal UploadBatchServiceLogsResult(string virtualDirectoryName, int numberOfFilesUploaded) + { + Argument.AssertNotNull(virtualDirectoryName, nameof(virtualDirectoryName)); + + VirtualDirectoryName = virtualDirectoryName; + NumberOfFilesUploaded = numberOfFilesUploaded; + } + + /// Initializes a new instance of . + /// The virtual directory within Azure Blob Storage container to which the Batch Service log file(s) will be uploaded. The virtual directory name is part of the blob name for each log file uploaded, and it is built based poolId, nodeId and a unique identifier. + /// The number of log files which will be uploaded. + /// Keeps track of any properties unknown to the library. + internal UploadBatchServiceLogsResult(string virtualDirectoryName, int numberOfFilesUploaded, IDictionary serializedAdditionalRawData) + { + VirtualDirectoryName = virtualDirectoryName; + NumberOfFilesUploaded = numberOfFilesUploaded; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal UploadBatchServiceLogsResult() + { + } + + /// The virtual directory within Azure Blob Storage container to which the Batch Service log file(s) will be uploaded. The virtual directory name is part of the blob name for each log file uploaded, and it is built based poolId, nodeId and a unique identifier. + public string VirtualDirectoryName { get; } + /// The number of log files which will be uploaded. + public int NumberOfFilesUploaded { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/UserAccount.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/UserAccount.Serialization.cs new file mode 100644 index 0000000000000..47a39b431fc5f --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/UserAccount.Serialization.cs @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class UserAccount : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UserAccount)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("password"u8); + writer.WriteStringValue(Password); + if (Optional.IsDefined(ElevationLevel)) + { + writer.WritePropertyName("elevationLevel"u8); + writer.WriteStringValue(ElevationLevel.Value.ToString()); + } + if (Optional.IsDefined(LinuxUserConfiguration)) + { + writer.WritePropertyName("linuxUserConfiguration"u8); + writer.WriteObjectValue(LinuxUserConfiguration, options); + } + if (Optional.IsDefined(WindowsUserConfiguration)) + { + writer.WritePropertyName("windowsUserConfiguration"u8); + writer.WriteObjectValue(WindowsUserConfiguration, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + UserAccount IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UserAccount)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeUserAccount(document.RootElement, options); + } + + internal static UserAccount DeserializeUserAccount(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string password = default; + ElevationLevel? elevationLevel = default; + LinuxUserConfiguration linuxUserConfiguration = default; + WindowsUserConfiguration windowsUserConfiguration = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("password"u8)) + { + password = property.Value.GetString(); + continue; + } + if (property.NameEquals("elevationLevel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + elevationLevel = new ElevationLevel(property.Value.GetString()); + continue; + } + if (property.NameEquals("linuxUserConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + linuxUserConfiguration = LinuxUserConfiguration.DeserializeLinuxUserConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("windowsUserConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + windowsUserConfiguration = WindowsUserConfiguration.DeserializeWindowsUserConfiguration(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UserAccount( + name, + password, + elevationLevel, + linuxUserConfiguration, + windowsUserConfiguration, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(UserAccount)} does not support writing '{options.Format}' format."); + } + } + + UserAccount IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeUserAccount(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(UserAccount)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static UserAccount FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUserAccount(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/UserAccount.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/UserAccount.cs new file mode 100644 index 0000000000000..bd7b9f96245ea --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/UserAccount.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// + /// Properties used to create a user used to execute Tasks on an Azure Batch + /// Compute Node. + /// + public partial class UserAccount + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The name of the user Account. Names can contain any Unicode characters up to a maximum length of 20. + /// The password for the user Account. + /// or is null. + public UserAccount(string name, string password) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(password, nameof(password)); + + Name = name; + Password = password; + } + + /// Initializes a new instance of . + /// The name of the user Account. Names can contain any Unicode characters up to a maximum length of 20. + /// The password for the user Account. + /// The elevation level of the user Account. The default value is nonAdmin. + /// The Linux-specific user configuration for the user Account. This property is ignored if specified on a Windows Pool. If not specified, the user is created with the default options. + /// The Windows-specific user configuration for the user Account. This property can only be specified if the user is on a Windows Pool. If not specified and on a Windows Pool, the user is created with the default options. + /// Keeps track of any properties unknown to the library. + internal UserAccount(string name, string password, ElevationLevel? elevationLevel, LinuxUserConfiguration linuxUserConfiguration, WindowsUserConfiguration windowsUserConfiguration, IDictionary serializedAdditionalRawData) + { + Name = name; + Password = password; + ElevationLevel = elevationLevel; + LinuxUserConfiguration = linuxUserConfiguration; + WindowsUserConfiguration = windowsUserConfiguration; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal UserAccount() + { + } + + /// The name of the user Account. Names can contain any Unicode characters up to a maximum length of 20. + public string Name { get; set; } + /// The password for the user Account. + public string Password { get; set; } + /// The elevation level of the user Account. The default value is nonAdmin. + public ElevationLevel? ElevationLevel { get; set; } + /// The Linux-specific user configuration for the user Account. This property is ignored if specified on a Windows Pool. If not specified, the user is created with the default options. + public LinuxUserConfiguration LinuxUserConfiguration { get; set; } + /// The Windows-specific user configuration for the user Account. This property can only be specified if the user is on a Windows Pool. If not specified and on a Windows Pool, the user is created with the default options. + public WindowsUserConfiguration WindowsUserConfiguration { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/UserAssignedIdentity.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/UserAssignedIdentity.Serialization.cs new file mode 100644 index 0000000000000..33b89d5ad5ec1 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/UserAssignedIdentity.Serialization.cs @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class UserAssignedIdentity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UserAssignedIdentity)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + if (options.Format != "W" && Optional.IsDefined(ClientId)) + { + writer.WritePropertyName("clientId"u8); + writer.WriteStringValue(ClientId); + } + if (options.Format != "W" && Optional.IsDefined(PrincipalId)) + { + writer.WritePropertyName("principalId"u8); + writer.WriteStringValue(PrincipalId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + UserAssignedIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UserAssignedIdentity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeUserAssignedIdentity(document.RootElement, options); + } + + internal static UserAssignedIdentity DeserializeUserAssignedIdentity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string resourceId = default; + string clientId = default; + string principalId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceId"u8)) + { + resourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("clientId"u8)) + { + clientId = property.Value.GetString(); + continue; + } + if (property.NameEquals("principalId"u8)) + { + principalId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UserAssignedIdentity(resourceId, clientId, principalId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(UserAssignedIdentity)} does not support writing '{options.Format}' format."); + } + } + + UserAssignedIdentity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeUserAssignedIdentity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(UserAssignedIdentity)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static UserAssignedIdentity FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUserAssignedIdentity(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/UserAssignedIdentity.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/UserAssignedIdentity.cs new file mode 100644 index 0000000000000..efdf060fdc91b --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/UserAssignedIdentity.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// The user assigned Identity. + public partial class UserAssignedIdentity + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The ARM resource id of the user assigned identity. + /// is null. + internal UserAssignedIdentity(string resourceId) + { + Argument.AssertNotNull(resourceId, nameof(resourceId)); + + ResourceId = resourceId; + } + + /// Initializes a new instance of . + /// The ARM resource id of the user assigned identity. + /// The client id of the user assigned identity. + /// The principal id of the user assigned identity. + /// Keeps track of any properties unknown to the library. + internal UserAssignedIdentity(string resourceId, string clientId, string principalId, IDictionary serializedAdditionalRawData) + { + ResourceId = resourceId; + ClientId = clientId; + PrincipalId = principalId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal UserAssignedIdentity() + { + } + + /// The ARM resource id of the user assigned identity. + public string ResourceId { get; } + /// The client id of the user assigned identity. + public string ClientId { get; } + /// The principal id of the user assigned identity. + public string PrincipalId { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/UserIdentity.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/UserIdentity.Serialization.cs new file mode 100644 index 0000000000000..abb58abef495e --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/UserIdentity.Serialization.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class UserIdentity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UserIdentity)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Username)) + { + writer.WritePropertyName("username"u8); + writer.WriteStringValue(Username); + } + if (Optional.IsDefined(AutoUser)) + { + writer.WritePropertyName("autoUser"u8); + writer.WriteObjectValue(AutoUser, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + UserIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UserIdentity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeUserIdentity(document.RootElement, options); + } + + internal static UserIdentity DeserializeUserIdentity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string username = default; + AutoUserSpecification autoUser = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("username"u8)) + { + username = property.Value.GetString(); + continue; + } + if (property.NameEquals("autoUser"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autoUser = AutoUserSpecification.DeserializeAutoUserSpecification(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UserIdentity(username, autoUser, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(UserIdentity)} does not support writing '{options.Format}' format."); + } + } + + UserIdentity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeUserIdentity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(UserIdentity)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static UserIdentity FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUserIdentity(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/UserIdentity.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/UserIdentity.cs new file mode 100644 index 0000000000000..033d6bcf10ec3 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/UserIdentity.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// The definition of the user identity under which the Task is run. Specify either the userName or autoUser property, but not both. + public partial class UserIdentity + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public UserIdentity() + { + } + + /// Initializes a new instance of . + /// The name of the user identity under which the Task is run. The userName and autoUser properties are mutually exclusive; you must specify one but not both. + /// The auto user under which the Task is run. The userName and autoUser properties are mutually exclusive; you must specify one but not both. + /// Keeps track of any properties unknown to the library. + internal UserIdentity(string username, AutoUserSpecification autoUser, IDictionary serializedAdditionalRawData) + { + Username = username; + AutoUser = autoUser; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The name of the user identity under which the Task is run. The userName and autoUser properties are mutually exclusive; you must specify one but not both. + public string Username { get; set; } + /// The auto user under which the Task is run. The userName and autoUser properties are mutually exclusive; you must specify one but not both. + public AutoUserSpecification AutoUser { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/VMExtension.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/VMExtension.Serialization.cs new file mode 100644 index 0000000000000..80a26f3037780 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/VMExtension.Serialization.cs @@ -0,0 +1,279 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class VMExtension : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VMExtension)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("publisher"u8); + writer.WriteStringValue(Publisher); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + if (Optional.IsDefined(TypeHandlerVersion)) + { + writer.WritePropertyName("typeHandlerVersion"u8); + writer.WriteStringValue(TypeHandlerVersion); + } + if (Optional.IsDefined(AutoUpgradeMinorVersion)) + { + writer.WritePropertyName("autoUpgradeMinorVersion"u8); + writer.WriteBooleanValue(AutoUpgradeMinorVersion.Value); + } + if (Optional.IsDefined(EnableAutomaticUpgrade)) + { + writer.WritePropertyName("enableAutomaticUpgrade"u8); + writer.WriteBooleanValue(EnableAutomaticUpgrade.Value); + } + if (Optional.IsCollectionDefined(Settings)) + { + writer.WritePropertyName("settings"u8); + writer.WriteStartObject(); + foreach (var item in Settings) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(ProtectedSettings)) + { + writer.WritePropertyName("protectedSettings"u8); + writer.WriteStartObject(); + foreach (var item in ProtectedSettings) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(ProvisionAfterExtensions)) + { + writer.WritePropertyName("provisionAfterExtensions"u8); + writer.WriteStartArray(); + foreach (var item in ProvisionAfterExtensions) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + VMExtension IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VMExtension)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVMExtension(document.RootElement, options); + } + + internal static VMExtension DeserializeVMExtension(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string publisher = default; + string type = default; + string typeHandlerVersion = default; + bool? autoUpgradeMinorVersion = default; + bool? enableAutomaticUpgrade = default; + IDictionary settings = default; + IDictionary protectedSettings = default; + IList provisionAfterExtensions = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("publisher"u8)) + { + publisher = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("typeHandlerVersion"u8)) + { + typeHandlerVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("autoUpgradeMinorVersion"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autoUpgradeMinorVersion = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("enableAutomaticUpgrade"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableAutomaticUpgrade = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("settings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + settings = dictionary; + continue; + } + if (property.NameEquals("protectedSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + protectedSettings = dictionary; + continue; + } + if (property.NameEquals("provisionAfterExtensions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + provisionAfterExtensions = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VMExtension( + name, + publisher, + type, + typeHandlerVersion, + autoUpgradeMinorVersion, + enableAutomaticUpgrade, + settings ?? new ChangeTrackingDictionary(), + protectedSettings ?? new ChangeTrackingDictionary(), + provisionAfterExtensions ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(VMExtension)} does not support writing '{options.Format}' format."); + } + } + + VMExtension IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeVMExtension(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VMExtension)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static VMExtension FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeVMExtension(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/VMExtension.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/VMExtension.cs new file mode 100644 index 0000000000000..a041901b66bbc --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/VMExtension.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// The configuration for virtual machine extensions. + public partial class VMExtension + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The name of the virtual machine extension. + /// The name of the extension handler publisher. + /// The type of the extension. + /// , or is null. + public VMExtension(string name, string publisher, string type) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(publisher, nameof(publisher)); + Argument.AssertNotNull(type, nameof(type)); + + Name = name; + Publisher = publisher; + Type = type; + Settings = new ChangeTrackingDictionary(); + ProtectedSettings = new ChangeTrackingDictionary(); + ProvisionAfterExtensions = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The name of the virtual machine extension. + /// The name of the extension handler publisher. + /// The type of the extension. + /// The version of script handler. + /// Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. + /// Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available. + /// JSON formatted public settings for the extension. + /// The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. + /// The collection of extension names. Collection of extension names after which this extension needs to be provisioned. + /// Keeps track of any properties unknown to the library. + internal VMExtension(string name, string publisher, string type, string typeHandlerVersion, bool? autoUpgradeMinorVersion, bool? enableAutomaticUpgrade, IDictionary settings, IDictionary protectedSettings, IList provisionAfterExtensions, IDictionary serializedAdditionalRawData) + { + Name = name; + Publisher = publisher; + Type = type; + TypeHandlerVersion = typeHandlerVersion; + AutoUpgradeMinorVersion = autoUpgradeMinorVersion; + EnableAutomaticUpgrade = enableAutomaticUpgrade; + Settings = settings; + ProtectedSettings = protectedSettings; + ProvisionAfterExtensions = provisionAfterExtensions; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal VMExtension() + { + } + + /// The name of the virtual machine extension. + public string Name { get; set; } + /// The name of the extension handler publisher. + public string Publisher { get; set; } + /// The type of the extension. + public string Type { get; set; } + /// The version of script handler. + public string TypeHandlerVersion { get; set; } + /// Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. + public bool? AutoUpgradeMinorVersion { get; set; } + /// Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available. + public bool? EnableAutomaticUpgrade { get; set; } + /// JSON formatted public settings for the extension. + public IDictionary Settings { get; } + /// The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. + public IDictionary ProtectedSettings { get; } + /// The collection of extension names. Collection of extension names after which this extension needs to be provisioned. + public IList ProvisionAfterExtensions { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/VMExtensionInstanceView.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/VMExtensionInstanceView.Serialization.cs new file mode 100644 index 0000000000000..42e2efd6b4cf2 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/VMExtensionInstanceView.Serialization.cs @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class VMExtensionInstanceView : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VMExtensionInstanceView)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsCollectionDefined(Statuses)) + { + writer.WritePropertyName("statuses"u8); + writer.WriteStartArray(); + foreach (var item in Statuses) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(SubStatuses)) + { + writer.WritePropertyName("subStatuses"u8); + writer.WriteStartArray(); + foreach (var item in SubStatuses) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + VMExtensionInstanceView IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VMExtensionInstanceView)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVMExtensionInstanceView(document.RootElement, options); + } + + internal static VMExtensionInstanceView DeserializeVMExtensionInstanceView(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + IReadOnlyList statuses = default; + IReadOnlyList subStatuses = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("statuses"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(InstanceViewStatus.DeserializeInstanceViewStatus(item, options)); + } + statuses = array; + continue; + } + if (property.NameEquals("subStatuses"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(InstanceViewStatus.DeserializeInstanceViewStatus(item, options)); + } + subStatuses = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VMExtensionInstanceView(name, statuses ?? new ChangeTrackingList(), subStatuses ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(VMExtensionInstanceView)} does not support writing '{options.Format}' format."); + } + } + + VMExtensionInstanceView IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeVMExtensionInstanceView(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VMExtensionInstanceView)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static VMExtensionInstanceView FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeVMExtensionInstanceView(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/VMExtensionInstanceView.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/VMExtensionInstanceView.cs new file mode 100644 index 0000000000000..00ed9fc34b003 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/VMExtensionInstanceView.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// The vm extension instance view. + public partial class VMExtensionInstanceView + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal VMExtensionInstanceView() + { + Statuses = new ChangeTrackingList(); + SubStatuses = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The name of the vm extension instance view. + /// The resource status information. + /// The resource status information. + /// Keeps track of any properties unknown to the library. + internal VMExtensionInstanceView(string name, IReadOnlyList statuses, IReadOnlyList subStatuses, IDictionary serializedAdditionalRawData) + { + Name = name; + Statuses = statuses; + SubStatuses = subStatuses; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The name of the vm extension instance view. + public string Name { get; } + /// The resource status information. + public IReadOnlyList Statuses { get; } + /// The resource status information. + public IReadOnlyList SubStatuses { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/VirtualMachineConfiguration.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/VirtualMachineConfiguration.Serialization.cs new file mode 100644 index 0000000000000..5a2268329b43a --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/VirtualMachineConfiguration.Serialization.cs @@ -0,0 +1,322 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class VirtualMachineConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VirtualMachineConfiguration)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("imageReference"u8); + writer.WriteObjectValue(ImageReference, options); + writer.WritePropertyName("nodeAgentSKUId"u8); + writer.WriteStringValue(NodeAgentSkuId); + if (Optional.IsDefined(WindowsConfiguration)) + { + writer.WritePropertyName("windowsConfiguration"u8); + writer.WriteObjectValue(WindowsConfiguration, options); + } + if (Optional.IsCollectionDefined(DataDisks)) + { + writer.WritePropertyName("dataDisks"u8); + writer.WriteStartArray(); + foreach (var item in DataDisks) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(LicenseType)) + { + writer.WritePropertyName("licenseType"u8); + writer.WriteStringValue(LicenseType); + } + if (Optional.IsDefined(ContainerConfiguration)) + { + writer.WritePropertyName("containerConfiguration"u8); + writer.WriteObjectValue(ContainerConfiguration, options); + } + if (Optional.IsDefined(DiskEncryptionConfiguration)) + { + writer.WritePropertyName("diskEncryptionConfiguration"u8); + writer.WriteObjectValue(DiskEncryptionConfiguration, options); + } + if (Optional.IsDefined(NodePlacementConfiguration)) + { + writer.WritePropertyName("nodePlacementConfiguration"u8); + writer.WriteObjectValue(NodePlacementConfiguration, options); + } + if (Optional.IsCollectionDefined(Extensions)) + { + writer.WritePropertyName("extensions"u8); + writer.WriteStartArray(); + foreach (var item in Extensions) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(OsDisk)) + { + writer.WritePropertyName("osDisk"u8); + writer.WriteObjectValue(OsDisk, options); + } + if (Optional.IsDefined(SecurityProfile)) + { + writer.WritePropertyName("securityProfile"u8); + writer.WriteObjectValue(SecurityProfile, options); + } + if (Optional.IsDefined(ServiceArtifactReference)) + { + writer.WritePropertyName("serviceArtifactReference"u8); + writer.WriteObjectValue(ServiceArtifactReference, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + VirtualMachineConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VirtualMachineConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVirtualMachineConfiguration(document.RootElement, options); + } + + internal static VirtualMachineConfiguration DeserializeVirtualMachineConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ImageReference imageReference = default; + string nodeAgentSKUId = default; + WindowsConfiguration windowsConfiguration = default; + IList dataDisks = default; + string licenseType = default; + ContainerConfiguration containerConfiguration = default; + DiskEncryptionConfiguration diskEncryptionConfiguration = default; + BatchNodePlacementConfiguration nodePlacementConfiguration = default; + IList extensions = default; + OSDisk osDisk = default; + SecurityProfile securityProfile = default; + ServiceArtifactReference serviceArtifactReference = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("imageReference"u8)) + { + imageReference = ImageReference.DeserializeImageReference(property.Value, options); + continue; + } + if (property.NameEquals("nodeAgentSKUId"u8)) + { + nodeAgentSKUId = property.Value.GetString(); + continue; + } + if (property.NameEquals("windowsConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + windowsConfiguration = WindowsConfiguration.DeserializeWindowsConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("dataDisks"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataDisk.DeserializeDataDisk(item, options)); + } + dataDisks = array; + continue; + } + if (property.NameEquals("licenseType"u8)) + { + licenseType = property.Value.GetString(); + continue; + } + if (property.NameEquals("containerConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + containerConfiguration = ContainerConfiguration.DeserializeContainerConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("diskEncryptionConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + diskEncryptionConfiguration = DiskEncryptionConfiguration.DeserializeDiskEncryptionConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("nodePlacementConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nodePlacementConfiguration = BatchNodePlacementConfiguration.DeserializeBatchNodePlacementConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("extensions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(VMExtension.DeserializeVMExtension(item, options)); + } + extensions = array; + continue; + } + if (property.NameEquals("osDisk"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + osDisk = OSDisk.DeserializeOSDisk(property.Value, options); + continue; + } + if (property.NameEquals("securityProfile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + securityProfile = SecurityProfile.DeserializeSecurityProfile(property.Value, options); + continue; + } + if (property.NameEquals("serviceArtifactReference"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + serviceArtifactReference = ServiceArtifactReference.DeserializeServiceArtifactReference(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VirtualMachineConfiguration( + imageReference, + nodeAgentSKUId, + windowsConfiguration, + dataDisks ?? new ChangeTrackingList(), + licenseType, + containerConfiguration, + diskEncryptionConfiguration, + nodePlacementConfiguration, + extensions ?? new ChangeTrackingList(), + osDisk, + securityProfile, + serviceArtifactReference, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(VirtualMachineConfiguration)} does not support writing '{options.Format}' format."); + } + } + + VirtualMachineConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeVirtualMachineConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VirtualMachineConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static VirtualMachineConfiguration FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeVirtualMachineConfiguration(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/VirtualMachineConfiguration.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/VirtualMachineConfiguration.cs new file mode 100644 index 0000000000000..8923d6045e329 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/VirtualMachineConfiguration.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// + /// The configuration for Compute Nodes in a Pool based on the Azure Virtual + /// Machines infrastructure. + /// + public partial class VirtualMachineConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// A reference to the Azure Virtual Machines Marketplace Image or the custom Virtual Machine Image to use. + /// The SKU of the Batch Compute Node agent to be provisioned on Compute Nodes in the Pool. The Batch Compute Node agent is a program that runs on each Compute Node in the Pool, and provides the command-and-control interface between the Compute Node and the Batch service. There are different implementations of the Compute Node agent, known as SKUs, for different operating systems. You must specify a Compute Node agent SKU which matches the selected Image reference. To get the list of supported Compute Node agent SKUs along with their list of verified Image references, see the 'List supported Compute Node agent SKUs' operation. + /// or is null. + public VirtualMachineConfiguration(ImageReference imageReference, string nodeAgentSkuId) + { + Argument.AssertNotNull(imageReference, nameof(imageReference)); + Argument.AssertNotNull(nodeAgentSkuId, nameof(nodeAgentSkuId)); + + ImageReference = imageReference; + NodeAgentSkuId = nodeAgentSkuId; + DataDisks = new ChangeTrackingList(); + Extensions = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// A reference to the Azure Virtual Machines Marketplace Image or the custom Virtual Machine Image to use. + /// The SKU of the Batch Compute Node agent to be provisioned on Compute Nodes in the Pool. The Batch Compute Node agent is a program that runs on each Compute Node in the Pool, and provides the command-and-control interface between the Compute Node and the Batch service. There are different implementations of the Compute Node agent, known as SKUs, for different operating systems. You must specify a Compute Node agent SKU which matches the selected Image reference. To get the list of supported Compute Node agent SKUs along with their list of verified Image references, see the 'List supported Compute Node agent SKUs' operation. + /// Windows operating system settings on the virtual machine. This property must not be specified if the imageReference property specifies a Linux OS Image. + /// The configuration for data disks attached to the Compute Nodes in the Pool. This property must be specified if the Compute Nodes in the Pool need to have empty data disks attached to them. This cannot be updated. Each Compute Node gets its own disk (the disk is not a file share). Existing disks cannot be attached, each attached disk is empty. When the Compute Node is removed from the Pool, the disk and all data associated with it is also deleted. The disk is not formatted after being attached, it must be formatted before use - for more information see https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux and https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. + /// + /// This only applies to Images that contain the Windows operating system, and + /// should only be used when you hold valid on-premises licenses for the Compute + /// Nodes which will be deployed. If omitted, no on-premises licensing discount is + /// applied. Values are: + /// + /// Windows_Server - The on-premises license is for Windows + /// Server. + /// Windows_Client - The on-premises license is for Windows Client. + /// + /// + /// The container configuration for the Pool. If specified, setup is performed on each Compute Node in the Pool to allow Tasks to run in containers. All regular Tasks and Job manager Tasks run on this Pool must specify the containerSettings property, and all other Tasks may specify it. + /// The disk encryption configuration for the pool. If specified, encryption is performed on each node in the pool during node provisioning. + /// The node placement configuration for the pool. This configuration will specify rules on how nodes in the pool will be physically allocated. + /// The virtual machine extension for the pool. If specified, the extensions mentioned in this configuration will be installed on each node. + /// Settings for the operating system disk of the Virtual Machine. + /// Specifies the security profile settings for the virtual machine or virtual machine scale set. + /// Specifies the service artifact reference id used to set same image version for all virtual machines in the scale set when using 'latest' image version. The service artifact reference id in the form of /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName}. + /// Keeps track of any properties unknown to the library. + internal VirtualMachineConfiguration(ImageReference imageReference, string nodeAgentSkuId, WindowsConfiguration windowsConfiguration, IList dataDisks, string licenseType, ContainerConfiguration containerConfiguration, DiskEncryptionConfiguration diskEncryptionConfiguration, BatchNodePlacementConfiguration nodePlacementConfiguration, IList extensions, OSDisk osDisk, SecurityProfile securityProfile, ServiceArtifactReference serviceArtifactReference, IDictionary serializedAdditionalRawData) + { + ImageReference = imageReference; + NodeAgentSkuId = nodeAgentSkuId; + WindowsConfiguration = windowsConfiguration; + DataDisks = dataDisks; + LicenseType = licenseType; + ContainerConfiguration = containerConfiguration; + DiskEncryptionConfiguration = diskEncryptionConfiguration; + NodePlacementConfiguration = nodePlacementConfiguration; + Extensions = extensions; + OsDisk = osDisk; + SecurityProfile = securityProfile; + ServiceArtifactReference = serviceArtifactReference; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal VirtualMachineConfiguration() + { + } + + /// A reference to the Azure Virtual Machines Marketplace Image or the custom Virtual Machine Image to use. + public ImageReference ImageReference { get; set; } + /// The SKU of the Batch Compute Node agent to be provisioned on Compute Nodes in the Pool. The Batch Compute Node agent is a program that runs on each Compute Node in the Pool, and provides the command-and-control interface between the Compute Node and the Batch service. There are different implementations of the Compute Node agent, known as SKUs, for different operating systems. You must specify a Compute Node agent SKU which matches the selected Image reference. To get the list of supported Compute Node agent SKUs along with their list of verified Image references, see the 'List supported Compute Node agent SKUs' operation. + public string NodeAgentSkuId { get; set; } + /// Windows operating system settings on the virtual machine. This property must not be specified if the imageReference property specifies a Linux OS Image. + public WindowsConfiguration WindowsConfiguration { get; set; } + /// The configuration for data disks attached to the Compute Nodes in the Pool. This property must be specified if the Compute Nodes in the Pool need to have empty data disks attached to them. This cannot be updated. Each Compute Node gets its own disk (the disk is not a file share). Existing disks cannot be attached, each attached disk is empty. When the Compute Node is removed from the Pool, the disk and all data associated with it is also deleted. The disk is not formatted after being attached, it must be formatted before use - for more information see https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux and https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. + public IList DataDisks { get; } + /// + /// This only applies to Images that contain the Windows operating system, and + /// should only be used when you hold valid on-premises licenses for the Compute + /// Nodes which will be deployed. If omitted, no on-premises licensing discount is + /// applied. Values are: + /// + /// Windows_Server - The on-premises license is for Windows + /// Server. + /// Windows_Client - The on-premises license is for Windows Client. + /// + /// + public string LicenseType { get; set; } + /// The container configuration for the Pool. If specified, setup is performed on each Compute Node in the Pool to allow Tasks to run in containers. All regular Tasks and Job manager Tasks run on this Pool must specify the containerSettings property, and all other Tasks may specify it. + public ContainerConfiguration ContainerConfiguration { get; set; } + /// The disk encryption configuration for the pool. If specified, encryption is performed on each node in the pool during node provisioning. + public DiskEncryptionConfiguration DiskEncryptionConfiguration { get; set; } + /// The node placement configuration for the pool. This configuration will specify rules on how nodes in the pool will be physically allocated. + public BatchNodePlacementConfiguration NodePlacementConfiguration { get; set; } + /// The virtual machine extension for the pool. If specified, the extensions mentioned in this configuration will be installed on each node. + public IList Extensions { get; } + /// Settings for the operating system disk of the Virtual Machine. + public OSDisk OsDisk { get; set; } + /// Specifies the security profile settings for the virtual machine or virtual machine scale set. + public SecurityProfile SecurityProfile { get; set; } + /// Specifies the service artifact reference id used to set same image version for all virtual machines in the scale set when using 'latest' image version. The service artifact reference id in the form of /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName}. + public ServiceArtifactReference ServiceArtifactReference { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/VirtualMachineInfo.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/VirtualMachineInfo.Serialization.cs new file mode 100644 index 0000000000000..90cd6837075d1 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/VirtualMachineInfo.Serialization.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class VirtualMachineInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VirtualMachineInfo)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(ImageReference)) + { + writer.WritePropertyName("imageReference"u8); + writer.WriteObjectValue(ImageReference, options); + } + if (Optional.IsDefined(ScaleSetVmResourceId)) + { + writer.WritePropertyName("scaleSetVmResourceId"u8); + writer.WriteStringValue(ScaleSetVmResourceId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + VirtualMachineInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VirtualMachineInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVirtualMachineInfo(document.RootElement, options); + } + + internal static VirtualMachineInfo DeserializeVirtualMachineInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ImageReference imageReference = default; + string scaleSetVmResourceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("imageReference"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + imageReference = ImageReference.DeserializeImageReference(property.Value, options); + continue; + } + if (property.NameEquals("scaleSetVmResourceId"u8)) + { + scaleSetVmResourceId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VirtualMachineInfo(imageReference, scaleSetVmResourceId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(VirtualMachineInfo)} does not support writing '{options.Format}' format."); + } + } + + VirtualMachineInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeVirtualMachineInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VirtualMachineInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static VirtualMachineInfo FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeVirtualMachineInfo(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/VirtualMachineInfo.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/VirtualMachineInfo.cs new file mode 100644 index 0000000000000..7df368ae5ef7f --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/VirtualMachineInfo.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Compute.Batch +{ + /// Info about the current state of the virtual machine. + public partial class VirtualMachineInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal VirtualMachineInfo() + { + } + + /// Initializes a new instance of . + /// The reference to the Azure Virtual Machine's Marketplace Image. + /// The resource ID of the Compute Node's current Virtual Machine Scale Set VM. Only defined if the Batch Account was created with its poolAllocationMode property set to 'UserSubscription'. + /// Keeps track of any properties unknown to the library. + internal VirtualMachineInfo(ImageReference imageReference, string scaleSetVmResourceId, IDictionary serializedAdditionalRawData) + { + ImageReference = imageReference; + ScaleSetVmResourceId = scaleSetVmResourceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The reference to the Azure Virtual Machine's Marketplace Image. + public ImageReference ImageReference { get; } + /// The resource ID of the Compute Node's current Virtual Machine Scale Set VM. Only defined if the Batch Account was created with its poolAllocationMode property set to 'UserSubscription'. + public string ScaleSetVmResourceId { get; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/WindowsConfiguration.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/WindowsConfiguration.Serialization.cs new file mode 100644 index 0000000000000..273afa8eb8aba --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/WindowsConfiguration.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class WindowsConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WindowsConfiguration)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(EnableAutomaticUpdates)) + { + writer.WritePropertyName("enableAutomaticUpdates"u8); + writer.WriteBooleanValue(EnableAutomaticUpdates.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WindowsConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WindowsConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWindowsConfiguration(document.RootElement, options); + } + + internal static WindowsConfiguration DeserializeWindowsConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? enableAutomaticUpdates = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("enableAutomaticUpdates"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableAutomaticUpdates = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WindowsConfiguration(enableAutomaticUpdates, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(WindowsConfiguration)} does not support writing '{options.Format}' format."); + } + } + + WindowsConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWindowsConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WindowsConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static WindowsConfiguration FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeWindowsConfiguration(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/WindowsConfiguration.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/WindowsConfiguration.cs new file mode 100644 index 0000000000000..9798daea6dc0a --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/WindowsConfiguration.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; + +namespace Azure.Compute.Batch +{ + /// Windows operating system settings to apply to the virtual machine. + public partial class WindowsConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WindowsConfiguration() + { + } + + /// Initializes a new instance of . + /// Whether automatic updates are enabled on the virtual machine. If omitted, the default value is true. + /// Keeps track of any properties unknown to the library. + internal WindowsConfiguration(bool? enableAutomaticUpdates, IDictionary serializedAdditionalRawData) + { + EnableAutomaticUpdates = enableAutomaticUpdates; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Whether automatic updates are enabled on the virtual machine. If omitted, the default value is true. + public bool? EnableAutomaticUpdates { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/WindowsUserConfiguration.Serialization.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/WindowsUserConfiguration.Serialization.cs new file mode 100644 index 0000000000000..225d0b67c3d56 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/WindowsUserConfiguration.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Compute.Batch +{ + public partial class WindowsUserConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WindowsUserConfiguration)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(LoginMode)) + { + writer.WritePropertyName("loginMode"u8); + writer.WriteStringValue(LoginMode.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WindowsUserConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WindowsUserConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWindowsUserConfiguration(document.RootElement, options); + } + + internal static WindowsUserConfiguration DeserializeWindowsUserConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + LoginMode? loginMode = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("loginMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + loginMode = new LoginMode(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WindowsUserConfiguration(loginMode, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(WindowsUserConfiguration)} does not support writing '{options.Format}' format."); + } + } + + WindowsUserConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWindowsUserConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WindowsUserConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static WindowsUserConfiguration FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeWindowsUserConfiguration(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/Generated/WindowsUserConfiguration.cs b/sdk/batch/Azure.Compute.Batch/src/Generated/WindowsUserConfiguration.cs new file mode 100644 index 0000000000000..1f3173fcb231c --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Generated/WindowsUserConfiguration.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; + +namespace Azure.Compute.Batch +{ + /// Properties used to create a user Account on a Windows Compute Node. + public partial class WindowsUserConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WindowsUserConfiguration() + { + } + + /// Initializes a new instance of . + /// The login mode for the user. The default value for VirtualMachineConfiguration Pools is 'batch'. + /// Keeps track of any properties unknown to the library. + internal WindowsUserConfiguration(LoginMode? loginMode, IDictionary serializedAdditionalRawData) + { + LoginMode = loginMode; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The login mode for the user. The default value for VirtualMachineConfiguration Pools is 'batch'. + public LoginMode? LoginMode { get; set; } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/src/GlobalSuppressions.cs b/sdk/batch/Azure.Compute.Batch/src/GlobalSuppressions.cs new file mode 100644 index 0000000000000..58a20923fe5d3 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/GlobalSuppressions.cs @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// This file is used by Code Analysis to maintain SuppressMessage +// attributes that are applied to this project. +// Project-level suppressions either have no target or are given +// a specific target and scoped to a namespace, type, member, etc. + +using System.Diagnostics.CodeAnalysis; +using System.Reflection; +using System.Security.Cryptography; + +[assembly: SuppressMessage("Usage", "AZC0030:Model name 'ExitOptions' ends with 'Options'. Suggest to rename it to 'ExitConfig' or any other appropriate name.", Justification = "SDK Review Approved, ExitCodeMapping and ExitCodeRangeMapping models have parameter called exitOptions which we wanted to match", Scope = "namespaceanddescendants", Target = "~N:Azure.Compute.Batch")] diff --git a/sdk/batch/Azure.Compute.Batch/src/Properties/AssemblyInfo.cs b/sdk/batch/Azure.Compute.Batch/src/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000000..7e4658d064cc4 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/src/Properties/AssemblyInfo.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Azure.Compute.Batch.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] + +// Replace Microsoft.Test with the correct resource provider namepace for your service and uncomment. +// See https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-services-resource-providers +// for the list of possible values. +[assembly: Azure.Core.AzureResourceProviderNamespace("Microsoft.Batch")] diff --git a/sdk/batch/Azure.Compute.Batch/tests/Azure.Compute.Batch.Tests.csproj b/sdk/batch/Azure.Compute.Batch/tests/Azure.Compute.Batch.Tests.csproj new file mode 100644 index 0000000000000..d7421b8e77b81 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/tests/Azure.Compute.Batch.Tests.csproj @@ -0,0 +1,27 @@ + + + $(RequiredTargetFrameworks) + + + $(NoWarn);CS1591 + + + + + + + + + + + + + + + + + + + + + diff --git a/sdk/batch/Azure.Compute.Batch/tests/Generated/Samples/Samples_BatchClient.cs b/sdk/batch/Azure.Compute.Batch/tests/Generated/Samples/Samples_BatchClient.cs new file mode 100644 index 0000000000000..60acc2870e928 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/tests/Generated/Samples/Samples_BatchClient.cs @@ -0,0 +1,20363 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Threading.Tasks; +using System.Xml; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.Compute.Batch.Samples +{ + public partial class Samples_BatchClient + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetApplication_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetApplication("", null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("versions")[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetApplication_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.GetApplicationAsync("", null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("versions")[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetApplication_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetApplication(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetApplication_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.GetApplicationAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetApplication_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetApplication("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("versions")[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetApplication_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.GetApplicationAsync("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("versions")[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetApplication_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetApplication("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetApplication_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.GetApplicationAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_CreatePool_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + id = "", + vmSize = "", + }); + Response response = client.CreatePool(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_CreatePool_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + id = "", + vmSize = "", + }); + Response response = await client.CreatePoolAsync(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_CreatePool_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchPoolCreateContent pool = new BatchPoolCreateContent("", ""); + Response response = client.CreatePool(pool); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_CreatePool_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchPoolCreateContent pool = new BatchPoolCreateContent("", ""); + Response response = await client.CreatePoolAsync(pool); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_CreatePool_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + id = "", + displayName = "", + vmSize = "", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "", + offer = "", + sku = "", + version = "", + virtualMachineImageId = "", + }, + nodeAgentSKUId = "", + windowsConfiguration = new + { + enableAutomaticUpdates = true, + }, + dataDisks = new object[] + { +new +{ +lun = 1234, +caching = "none", +diskSizeGB = 1234, +storageAccountType = "standard_lrs", +} + }, + licenseType = "", + containerConfiguration = new + { + type = "dockerCompatible", + containerImageNames = new object[] + { +"" + }, + containerRegistries = new object[] + { +new +{ +username = "", +password = "", +registryServer = "", +identityReference = new +{ +resourceId = "", +}, +} + }, + }, + diskEncryptionConfiguration = new + { + targets = new object[] + { +"osdisk" + }, + }, + nodePlacementConfiguration = new + { + policy = "regional", + }, + extensions = new object[] + { +new +{ +name = "", +publisher = "", +type = "", +typeHandlerVersion = "", +autoUpgradeMinorVersion = true, +enableAutomaticUpgrade = true, +settings = new +{ +key = "", +}, +protectedSettings = new +{ +key = "", +}, +provisionAfterExtensions = new object[] +{ +"" +}, +} + }, + osDisk = new + { + ephemeralOSDiskSettings = new + { + placement = "cachedisk", + }, + caching = "none", + diskSizeGB = 1234, + managedDisk = new + { + storageAccountType = "standard_lrs", + }, + writeAcceleratorEnabled = true, + }, + securityProfile = new + { + encryptionAtHost = true, + securityType = "trustedLaunch", + uefiSettings = new + { + secureBootEnabled = true, + vTpmEnabled = true, + }, + }, + serviceArtifactReference = new + { + id = "", + }, + }, + resizeTimeout = "PT1H23M45S", + resourceTags = new + { + key = "", + }, + targetDedicatedNodes = 1234, + targetLowPriorityNodes = 1234, + enableAutoScale = true, + autoScaleFormula = "", + autoScaleEvaluationInterval = "PT1H23M45S", + enableInterNodeCommunication = true, + networkConfiguration = new + { + subnetId = "", + dynamicVNetAssignmentScope = "none", + endpointConfiguration = new + { + inboundNATPools = new object[] + { +new +{ +name = "", +protocol = "tcp", +backendPort = 1234, +frontendPortRangeStart = 1234, +frontendPortRangeEnd = 1234, +networkSecurityGroupRules = new object[] +{ +new +{ +priority = 1234, +access = "allow", +sourceAddressPrefix = "", +sourcePortRanges = new object[] +{ +"" +}, +} +}, +} + }, + }, + publicIPAddressConfiguration = new + { + provision = "batchmanaged", + ipAddressIds = new object[] + { +"" + }, + }, + enableAcceleratedNetworking = true, + }, + startTask = new + { + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { +new +{ +autoStorageContainerName = "", +storageContainerUrl = "", +httpUrl = "", +blobPrefix = "", +filePath = "", +fileMode = "", +} + }, + environmentSettings = new object[] + { +new +{ +name = "", +value = "", +} + }, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + maxTaskRetryCount = 1234, + waitForSuccess = true, + }, + applicationPackageReferences = new object[] + { +new +{ +applicationId = "", +version = "", +} + }, + taskSlotsPerNode = 1234, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + userAccounts = new object[] + { +new +{ +name = "", +password = "", +elevationLevel = "nonadmin", +linuxUserConfiguration = new +{ +uid = 1234, +gid = 1234, +sshPrivateKey = "", +}, +windowsUserConfiguration = new +{ +loginMode = "batch", +}, +} + }, + metadata = new object[] + { +new +{ +name = "", +value = "", +} + }, + mountConfiguration = new object[] + { +new +{ +azureBlobFileSystemConfiguration = new +{ +accountName = "", +containerName = "", +accountKey = "", +sasKey = "", +blobfuseOptions = "", +relativeMountPath = "", +}, +nfsMountConfiguration = new +{ +source = "", +relativeMountPath = "", +mountOptions = "", +}, +cifsMountConfiguration = new +{ +username = "", +source = "", +relativeMountPath = "", +mountOptions = "", +password = "", +}, +azureFileShareConfiguration = new +{ +accountName = "", +azureFileUrl = "", +accountKey = "", +relativeMountPath = "", +mountOptions = "", +}, +} + }, + targetNodeCommunicationMode = "default", + upgradePolicy = new + { + mode = "automatic", + automaticOSUpgradePolicy = new + { + disableAutomaticRollback = true, + enableAutomaticOSUpgrade = true, + useRollingUpgradePolicy = true, + osRollingUpgradeDeferral = true, + }, + rollingUpgradePolicy = new + { + enableCrossZoneUpgrade = true, + maxBatchInstancePercent = 1234, + maxUnhealthyInstancePercent = 1234, + maxUnhealthyUpgradedInstancePercent = 1234, + pauseTimeBetweenBatches = "PT1H23M45S", + prioritizeUnhealthyInstances = true, + rollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }); + Response response = client.CreatePool(content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_CreatePool_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + id = "", + displayName = "", + vmSize = "", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "", + offer = "", + sku = "", + version = "", + virtualMachineImageId = "", + }, + nodeAgentSKUId = "", + windowsConfiguration = new + { + enableAutomaticUpdates = true, + }, + dataDisks = new object[] + { +new +{ +lun = 1234, +caching = "none", +diskSizeGB = 1234, +storageAccountType = "standard_lrs", +} + }, + licenseType = "", + containerConfiguration = new + { + type = "dockerCompatible", + containerImageNames = new object[] + { +"" + }, + containerRegistries = new object[] + { +new +{ +username = "", +password = "", +registryServer = "", +identityReference = new +{ +resourceId = "", +}, +} + }, + }, + diskEncryptionConfiguration = new + { + targets = new object[] + { +"osdisk" + }, + }, + nodePlacementConfiguration = new + { + policy = "regional", + }, + extensions = new object[] + { +new +{ +name = "", +publisher = "", +type = "", +typeHandlerVersion = "", +autoUpgradeMinorVersion = true, +enableAutomaticUpgrade = true, +settings = new +{ +key = "", +}, +protectedSettings = new +{ +key = "", +}, +provisionAfterExtensions = new object[] +{ +"" +}, +} + }, + osDisk = new + { + ephemeralOSDiskSettings = new + { + placement = "cachedisk", + }, + caching = "none", + diskSizeGB = 1234, + managedDisk = new + { + storageAccountType = "standard_lrs", + }, + writeAcceleratorEnabled = true, + }, + securityProfile = new + { + encryptionAtHost = true, + securityType = "trustedLaunch", + uefiSettings = new + { + secureBootEnabled = true, + vTpmEnabled = true, + }, + }, + serviceArtifactReference = new + { + id = "", + }, + }, + resizeTimeout = "PT1H23M45S", + resourceTags = new + { + key = "", + }, + targetDedicatedNodes = 1234, + targetLowPriorityNodes = 1234, + enableAutoScale = true, + autoScaleFormula = "", + autoScaleEvaluationInterval = "PT1H23M45S", + enableInterNodeCommunication = true, + networkConfiguration = new + { + subnetId = "", + dynamicVNetAssignmentScope = "none", + endpointConfiguration = new + { + inboundNATPools = new object[] + { +new +{ +name = "", +protocol = "tcp", +backendPort = 1234, +frontendPortRangeStart = 1234, +frontendPortRangeEnd = 1234, +networkSecurityGroupRules = new object[] +{ +new +{ +priority = 1234, +access = "allow", +sourceAddressPrefix = "", +sourcePortRanges = new object[] +{ +"" +}, +} +}, +} + }, + }, + publicIPAddressConfiguration = new + { + provision = "batchmanaged", + ipAddressIds = new object[] + { +"" + }, + }, + enableAcceleratedNetworking = true, + }, + startTask = new + { + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { +new +{ +autoStorageContainerName = "", +storageContainerUrl = "", +httpUrl = "", +blobPrefix = "", +filePath = "", +fileMode = "", +} + }, + environmentSettings = new object[] + { +new +{ +name = "", +value = "", +} + }, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + maxTaskRetryCount = 1234, + waitForSuccess = true, + }, + applicationPackageReferences = new object[] + { +new +{ +applicationId = "", +version = "", +} + }, + taskSlotsPerNode = 1234, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + userAccounts = new object[] + { +new +{ +name = "", +password = "", +elevationLevel = "nonadmin", +linuxUserConfiguration = new +{ +uid = 1234, +gid = 1234, +sshPrivateKey = "", +}, +windowsUserConfiguration = new +{ +loginMode = "batch", +}, +} + }, + metadata = new object[] + { +new +{ +name = "", +value = "", +} + }, + mountConfiguration = new object[] + { +new +{ +azureBlobFileSystemConfiguration = new +{ +accountName = "", +containerName = "", +accountKey = "", +sasKey = "", +blobfuseOptions = "", +relativeMountPath = "", +}, +nfsMountConfiguration = new +{ +source = "", +relativeMountPath = "", +mountOptions = "", +}, +cifsMountConfiguration = new +{ +username = "", +source = "", +relativeMountPath = "", +mountOptions = "", +password = "", +}, +azureFileShareConfiguration = new +{ +accountName = "", +azureFileUrl = "", +accountKey = "", +relativeMountPath = "", +mountOptions = "", +}, +} + }, + targetNodeCommunicationMode = "default", + upgradePolicy = new + { + mode = "automatic", + automaticOSUpgradePolicy = new + { + disableAutomaticRollback = true, + enableAutomaticOSUpgrade = true, + useRollingUpgradePolicy = true, + osRollingUpgradeDeferral = true, + }, + rollingUpgradePolicy = new + { + enableCrossZoneUpgrade = true, + maxBatchInstancePercent = 1234, + maxUnhealthyInstancePercent = 1234, + maxUnhealthyUpgradedInstancePercent = 1234, + pauseTimeBetweenBatches = "PT1H23M45S", + prioritizeUnhealthyInstances = true, + rollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }); + Response response = await client.CreatePoolAsync(content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_CreatePool_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchPoolCreateContent pool = new BatchPoolCreateContent("", "") + { + DisplayName = "", + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "", + Offer = "", + Sku = "", + Version = "", + VirtualMachineImageId = "", + }, "") + { + WindowsConfiguration = new WindowsConfiguration + { + EnableAutomaticUpdates = true, + }, + DataDisks = {new DataDisk(1234, 1234) +{ +Caching = CachingType.None, +StorageAccountType = StorageAccountType.StandardLRS, +}}, + LicenseType = "", + ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) + { + ContainerImageNames = { "" }, + ContainerRegistries = {new ContainerRegistryReference +{ +Username = "", +Password = "", +RegistryServer = "", +IdentityReference = new BatchNodeIdentityReference +{ +ResourceId = "", +}, +}}, + }, + DiskEncryptionConfiguration = new DiskEncryptionConfiguration + { + Targets = { DiskEncryptionTarget.OsDisk }, + }, + NodePlacementConfiguration = new BatchNodePlacementConfiguration + { + Policy = BatchNodePlacementPolicyType.Regional, + }, + Extensions = {new VMExtension("", "", "") +{ +TypeHandlerVersion = "", +AutoUpgradeMinorVersion = true, +EnableAutomaticUpgrade = true, +Settings = +{ +["key"] = "" +}, +ProtectedSettings = +{ +["key"] = "" +}, +ProvisionAfterExtensions = {""}, +}}, + OsDisk = new OSDisk + { + EphemeralOSDiskSettings = new DiffDiskSettings + { + Placement = DiffDiskPlacement.CacheDisk, + }, + Caching = CachingType.None, + DiskSizeGB = 1234, + ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), + WriteAcceleratorEnabled = true, + }, + SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings + { + SecureBootEnabled = true, + VTpmEnabled = true, + }), + ServiceArtifactReference = new ServiceArtifactReference(""), + }, + ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), + ResourceTags = +{ +["key"] = "" +}, + TargetDedicatedNodes = 1234, + TargetLowPriorityNodes = 1234, + EnableAutoScale = true, + AutoScaleFormula = "", + AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), + EnableInterNodeCommunication = true, + NetworkConfiguration = new NetworkConfiguration + { + SubnetId = "", + DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, + EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] + { +new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) +{ +NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") +{ +SourcePortRanges = {""}, +}}, +} + }), + PublicIpAddressConfiguration = new PublicIpAddressConfiguration + { + IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, + IpAddressIds = { "" }, + }, + EnableAcceleratedNetworking = true, + }, + StartTask = new BatchStartTask("") + { + ContainerSettings = new BatchTaskContainerSettings("") + { + ContainerRunOptions = "", + Registry = default, + WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, + }, + ResourceFiles = {new ResourceFile +{ +AutoStorageContainerName = "", +StorageContainerUrl = "", +HttpUrl = "", +BlobPrefix = "", +FilePath = "", +FileMode = "", +IdentityReference = default, +}}, + EnvironmentSettings = {new EnvironmentSetting("") +{ +Value = "", +}}, + UserIdentity = new UserIdentity + { + Username = "", + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + MaxTaskRetryCount = 1234, + WaitForSuccess = true, + }, + ApplicationPackageReferences = {new BatchApplicationPackageReference("") +{ +Version = "", +}}, + TaskSlotsPerNode = 1234, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), + UserAccounts = {new UserAccount("", "") +{ +ElevationLevel = ElevationLevel.NonAdmin, +LinuxUserConfiguration = new LinuxUserConfiguration +{ +Uid = 1234, +Gid = 1234, +SshPrivateKey = "", +}, +WindowsUserConfiguration = new WindowsUserConfiguration +{ +LoginMode = LoginMode.Batch, +}, +}}, + Metadata = { new MetadataItem("", "") }, + MountConfiguration = {new MountConfiguration +{ +AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") +{ +AccountKey = "", +SasKey = "", +BlobfuseOptions = "", +IdentityReference = default, +}, +NfsMountConfiguration = new NfsMountConfiguration("", "") +{ +MountOptions = "", +}, +CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") +{ +MountOptions = "", +}, +AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") +{ +MountOptions = "", +}, +}}, + TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, + UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) + { + AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy + { + DisableAutomaticRollback = true, + EnableAutomaticOsUpgrade = true, + UseRollingUpgradePolicy = true, + OsRollingUpgradeDeferral = true, + }, + RollingUpgradePolicy = new RollingUpgradePolicy + { + EnableCrossZoneUpgrade = true, + MaxBatchInstancePercent = 1234, + MaxUnhealthyInstancePercent = 1234, + MaxUnhealthyUpgradedInstancePercent = 1234, + PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), + PrioritizeUnhealthyInstances = true, + RollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }; + Response response = client.CreatePool(pool, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_CreatePool_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchPoolCreateContent pool = new BatchPoolCreateContent("", "") + { + DisplayName = "", + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "", + Offer = "", + Sku = "", + Version = "", + VirtualMachineImageId = "", + }, "") + { + WindowsConfiguration = new WindowsConfiguration + { + EnableAutomaticUpdates = true, + }, + DataDisks = {new DataDisk(1234, 1234) +{ +Caching = CachingType.None, +StorageAccountType = StorageAccountType.StandardLRS, +}}, + LicenseType = "", + ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) + { + ContainerImageNames = { "" }, + ContainerRegistries = {new ContainerRegistryReference +{ +Username = "", +Password = "", +RegistryServer = "", +IdentityReference = new BatchNodeIdentityReference +{ +ResourceId = "", +}, +}}, + }, + DiskEncryptionConfiguration = new DiskEncryptionConfiguration + { + Targets = { DiskEncryptionTarget.OsDisk }, + }, + NodePlacementConfiguration = new BatchNodePlacementConfiguration + { + Policy = BatchNodePlacementPolicyType.Regional, + }, + Extensions = {new VMExtension("", "", "") +{ +TypeHandlerVersion = "", +AutoUpgradeMinorVersion = true, +EnableAutomaticUpgrade = true, +Settings = +{ +["key"] = "" +}, +ProtectedSettings = +{ +["key"] = "" +}, +ProvisionAfterExtensions = {""}, +}}, + OsDisk = new OSDisk + { + EphemeralOSDiskSettings = new DiffDiskSettings + { + Placement = DiffDiskPlacement.CacheDisk, + }, + Caching = CachingType.None, + DiskSizeGB = 1234, + ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), + WriteAcceleratorEnabled = true, + }, + SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings + { + SecureBootEnabled = true, + VTpmEnabled = true, + }), + ServiceArtifactReference = new ServiceArtifactReference(""), + }, + ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), + ResourceTags = +{ +["key"] = "" +}, + TargetDedicatedNodes = 1234, + TargetLowPriorityNodes = 1234, + EnableAutoScale = true, + AutoScaleFormula = "", + AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), + EnableInterNodeCommunication = true, + NetworkConfiguration = new NetworkConfiguration + { + SubnetId = "", + DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, + EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] + { +new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) +{ +NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") +{ +SourcePortRanges = {""}, +}}, +} + }), + PublicIpAddressConfiguration = new PublicIpAddressConfiguration + { + IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, + IpAddressIds = { "" }, + }, + EnableAcceleratedNetworking = true, + }, + StartTask = new BatchStartTask("") + { + ContainerSettings = new BatchTaskContainerSettings("") + { + ContainerRunOptions = "", + Registry = default, + WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, + }, + ResourceFiles = {new ResourceFile +{ +AutoStorageContainerName = "", +StorageContainerUrl = "", +HttpUrl = "", +BlobPrefix = "", +FilePath = "", +FileMode = "", +IdentityReference = default, +}}, + EnvironmentSettings = {new EnvironmentSetting("") +{ +Value = "", +}}, + UserIdentity = new UserIdentity + { + Username = "", + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + MaxTaskRetryCount = 1234, + WaitForSuccess = true, + }, + ApplicationPackageReferences = {new BatchApplicationPackageReference("") +{ +Version = "", +}}, + TaskSlotsPerNode = 1234, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), + UserAccounts = {new UserAccount("", "") +{ +ElevationLevel = ElevationLevel.NonAdmin, +LinuxUserConfiguration = new LinuxUserConfiguration +{ +Uid = 1234, +Gid = 1234, +SshPrivateKey = "", +}, +WindowsUserConfiguration = new WindowsUserConfiguration +{ +LoginMode = LoginMode.Batch, +}, +}}, + Metadata = { new MetadataItem("", "") }, + MountConfiguration = {new MountConfiguration +{ +AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") +{ +AccountKey = "", +SasKey = "", +BlobfuseOptions = "", +IdentityReference = default, +}, +NfsMountConfiguration = new NfsMountConfiguration("", "") +{ +MountOptions = "", +}, +CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") +{ +MountOptions = "", +}, +AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") +{ +MountOptions = "", +}, +}}, + TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, + UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) + { + AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy + { + DisableAutomaticRollback = true, + EnableAutomaticOsUpgrade = true, + UseRollingUpgradePolicy = true, + OsRollingUpgradeDeferral = true, + }, + RollingUpgradePolicy = new RollingUpgradePolicy + { + EnableCrossZoneUpgrade = true, + MaxBatchInstancePercent = 1234, + MaxUnhealthyInstancePercent = 1234, + MaxUnhealthyUpgradedInstancePercent = 1234, + PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), + PrioritizeUnhealthyInstances = true, + RollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }; + Response response = await client.CreatePoolAsync(pool, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_DeletePool_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.DeletePool(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_DeletePool_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.DeletePoolAsync(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_DeletePool_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.DeletePool("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_DeletePool_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.DeletePoolAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetPool_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetPool("", null, null, null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetPool_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.GetPoolAsync("", null, null, null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetPool_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetPool(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetPool_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.GetPoolAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetPool_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetPool("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), new string[] { "" }, new string[] { "" }, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result.GetProperty("lastModified").ToString()); + Console.WriteLine(result.GetProperty("creationTime").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); + Console.WriteLine(result.GetProperty("allocationState").ToString()); + Console.WriteLine(result.GetProperty("allocationStateTransitionTime").ToString()); + Console.WriteLine(result.GetProperty("vmSize").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("publisher").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("offer").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("sku").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("exactVersion").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("nodeAgentSKUId").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("windowsConfiguration").GetProperty("enableAutomaticUpdates").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("lun").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("caching").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("storageAccountType").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("licenseType").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerImageNames")[0].ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("diskEncryptionConfiguration").GetProperty("targets")[0].ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("nodePlacementConfiguration").GetProperty("policy").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("publisher").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("typeHandlerVersion").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("autoUpgradeMinorVersion").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("enableAutomaticUpgrade").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("settings").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("protectedSettings").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("provisionAfterExtensions")[0].ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("ephemeralOSDiskSettings").GetProperty("placement").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("caching").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("managedDisk").GetProperty("storageAccountType").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("writeAcceleratorEnabled").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("encryptionAtHost").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("securityType").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("secureBootEnabled").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("vTpmEnabled").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("serviceArtifactReference").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("resizeTimeout").ToString()); + Console.WriteLine(result.GetProperty("resizeErrors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("resizeErrors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("resizeErrors")[0].GetProperty("values")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("resizeErrors")[0].GetProperty("values")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("resourceTags").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("currentDedicatedNodes").ToString()); + Console.WriteLine(result.GetProperty("currentLowPriorityNodes").ToString()); + Console.WriteLine(result.GetProperty("targetDedicatedNodes").ToString()); + Console.WriteLine(result.GetProperty("targetLowPriorityNodes").ToString()); + Console.WriteLine(result.GetProperty("enableAutoScale").ToString()); + Console.WriteLine(result.GetProperty("autoScaleFormula").ToString()); + Console.WriteLine(result.GetProperty("autoScaleEvaluationInterval").ToString()); + Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("timestamp").ToString()); + Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("results").ToString()); + Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("error").GetProperty("values")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("error").GetProperty("values")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("enableInterNodeCommunication").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("dynamicVNetAssignmentScope").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("protocol").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("backendPort").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeStart").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeEnd").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("priority").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("access").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourceAddressPrefix").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourcePortRanges")[0].ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("provision").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("ipAddressIds")[0].ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("enableAcceleratedNetworking").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("waitForSuccess").ToString()); + Console.WriteLine(result.GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); + Console.WriteLine(result.GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("taskSlotsPerNode").ToString()); + Console.WriteLine(result.GetProperty("taskSchedulingPolicy").GetProperty("nodeFillType").ToString()); + Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("uid").ToString()); + Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("gid").ToString()); + Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("sshPrivateKey").ToString()); + Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("windowsUserConfiguration").GetProperty("loginMode").ToString()); + Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("lastUpdateTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("usageStats").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("usageStats").GetProperty("lastUpdateTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("usageStats").GetProperty("dedicatedCoreTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("lastUpdateTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("avgCPUPercentage").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("avgMemoryGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("peakMemoryGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("avgDiskGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("peakDiskGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("diskReadIOps").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("diskWriteIOps").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("diskReadGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("diskWriteGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("networkReadGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("networkWriteGiB").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountName").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("containerName").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountKey").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("sasKey").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("blobfuseOptions").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("mountOptions").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("mountOptions").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountName").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("azureFileUrl").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountKey").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("mountOptions").ToString()); + Console.WriteLine(result.GetProperty("identity").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("identity").GetProperty("userAssignedIdentities")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("identity").GetProperty("userAssignedIdentities")[0].GetProperty("clientId").ToString()); + Console.WriteLine(result.GetProperty("identity").GetProperty("userAssignedIdentities")[0].GetProperty("principalId").ToString()); + Console.WriteLine(result.GetProperty("targetNodeCommunicationMode").ToString()); + Console.WriteLine(result.GetProperty("currentNodeCommunicationMode").ToString()); + Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("mode").ToString()); + Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("disableAutomaticRollback").ToString()); + Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("enableAutomaticOSUpgrade").ToString()); + Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("useRollingUpgradePolicy").ToString()); + Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("osRollingUpgradeDeferral").ToString()); + Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("enableCrossZoneUpgrade").ToString()); + Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxBatchInstancePercent").ToString()); + Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyInstancePercent").ToString()); + Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyUpgradedInstancePercent").ToString()); + Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("pauseTimeBetweenBatches").ToString()); + Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("prioritizeUnhealthyInstances").ToString()); + Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("rollbackFailedInstancesOnPolicyBreach").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetPool_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetPool("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), select: new string[] { "" }, expand: new string[] { "" }, requestConditions: null); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_UpdatePool_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new object()); + Response response = client.UpdatePool("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_UpdatePool_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.UpdatePoolAsync("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_UpdatePool_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + startTask = new + { + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + registry = new + { + username = "", + password = "", + registryServer = "", + identityReference = new + { + resourceId = "", + }, + }, + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { +new +{ +autoStorageContainerName = "", +storageContainerUrl = "", +httpUrl = "", +blobPrefix = "", +filePath = "", +fileMode = "", +} + }, + environmentSettings = new object[] + { +new +{ +name = "", +value = "", +} + }, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + maxTaskRetryCount = 1234, + waitForSuccess = true, + }, + applicationPackageReferences = new object[] + { +new +{ +applicationId = "", +version = "", +} + }, + metadata = new object[] + { +new +{ +name = "", +value = "", +} + }, + targetNodeCommunicationMode = "default", + }); + Response response = client.UpdatePool("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_UpdatePool_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + startTask = new + { + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + registry = new + { + username = "", + password = "", + registryServer = "", + identityReference = new + { + resourceId = "", + }, + }, + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { +new +{ +autoStorageContainerName = "", +storageContainerUrl = "", +httpUrl = "", +blobPrefix = "", +filePath = "", +fileMode = "", +} + }, + environmentSettings = new object[] + { +new +{ +name = "", +value = "", +} + }, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + maxTaskRetryCount = 1234, + waitForSuccess = true, + }, + applicationPackageReferences = new object[] + { +new +{ +applicationId = "", +version = "", +} + }, + metadata = new object[] + { +new +{ +name = "", +value = "", +} + }, + targetNodeCommunicationMode = "default", + }); + Response response = await client.UpdatePoolAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_DisablePoolAutoScale_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.DisablePoolAutoScale(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_DisablePoolAutoScale_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.DisablePoolAutoScaleAsync(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_DisablePoolAutoScale_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.DisablePoolAutoScale("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_DisablePoolAutoScale_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.DisablePoolAutoScaleAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_EnablePoolAutoScale_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new object()); + Response response = client.EnablePoolAutoScale("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_EnablePoolAutoScale_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.EnablePoolAutoScaleAsync("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_EnablePoolAutoScale_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchPoolEnableAutoScaleContent content = new BatchPoolEnableAutoScaleContent(); + Response response = client.EnablePoolAutoScale("", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_EnablePoolAutoScale_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchPoolEnableAutoScaleContent content = new BatchPoolEnableAutoScaleContent(); + Response response = await client.EnablePoolAutoScaleAsync("", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_EnablePoolAutoScale_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + autoScaleFormula = "", + autoScaleEvaluationInterval = "PT1H23M45S", + }); + Response response = client.EnablePoolAutoScale("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_EnablePoolAutoScale_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + autoScaleFormula = "", + autoScaleEvaluationInterval = "PT1H23M45S", + }); + Response response = await client.EnablePoolAutoScaleAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_EnablePoolAutoScale_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchPoolEnableAutoScaleContent content = new BatchPoolEnableAutoScaleContent + { + AutoScaleFormula = "", + AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), + }; + Response response = client.EnablePoolAutoScale("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_EnablePoolAutoScale_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchPoolEnableAutoScaleContent content = new BatchPoolEnableAutoScaleContent + { + AutoScaleFormula = "", + AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), + }; + Response response = await client.EnablePoolAutoScaleAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_EvaluatePoolAutoScale_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + autoScaleFormula = "", + }); + Response response = client.EvaluatePoolAutoScale("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("timestamp").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_EvaluatePoolAutoScale_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + autoScaleFormula = "", + }); + Response response = await client.EvaluatePoolAutoScaleAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("timestamp").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_EvaluatePoolAutoScale_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchPoolEvaluateAutoScaleContent content = new BatchPoolEvaluateAutoScaleContent(""); + Response response = client.EvaluatePoolAutoScale("", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_EvaluatePoolAutoScale_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchPoolEvaluateAutoScaleContent content = new BatchPoolEvaluateAutoScaleContent(""); + Response response = await client.EvaluatePoolAutoScaleAsync("", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_EvaluatePoolAutoScale_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + autoScaleFormula = "", + }); + Response response = client.EvaluatePoolAutoScale("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("timestamp").ToString()); + Console.WriteLine(result.GetProperty("results").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("values")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("values")[0].GetProperty("value").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_EvaluatePoolAutoScale_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + autoScaleFormula = "", + }); + Response response = await client.EvaluatePoolAutoScaleAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("timestamp").ToString()); + Console.WriteLine(result.GetProperty("results").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("values")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("error").GetProperty("values")[0].GetProperty("value").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_EvaluatePoolAutoScale_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchPoolEvaluateAutoScaleContent content = new BatchPoolEvaluateAutoScaleContent(""); + Response response = client.EvaluatePoolAutoScale("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_EvaluatePoolAutoScale_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchPoolEvaluateAutoScaleContent content = new BatchPoolEvaluateAutoScaleContent(""); + Response response = await client.EvaluatePoolAutoScaleAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_ResizePool_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new object()); + Response response = client.ResizePool("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_ResizePool_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.ResizePoolAsync("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_ResizePool_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchPoolResizeContent content = new BatchPoolResizeContent(); + Response response = client.ResizePool("", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_ResizePool_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchPoolResizeContent content = new BatchPoolResizeContent(); + Response response = await client.ResizePoolAsync("", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_ResizePool_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + targetDedicatedNodes = 1234, + targetLowPriorityNodes = 1234, + resizeTimeout = "PT1H23M45S", + nodeDeallocationOption = "requeue", + }); + Response response = client.ResizePool("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_ResizePool_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + targetDedicatedNodes = 1234, + targetLowPriorityNodes = 1234, + resizeTimeout = "PT1H23M45S", + nodeDeallocationOption = "requeue", + }); + Response response = await client.ResizePoolAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_ResizePool_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchPoolResizeContent content = new BatchPoolResizeContent + { + TargetDedicatedNodes = 1234, + TargetLowPriorityNodes = 1234, + ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), + NodeDeallocationOption = BatchNodeDeallocationOption.Requeue, + }; + Response response = client.ResizePool("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_ResizePool_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchPoolResizeContent content = new BatchPoolResizeContent + { + TargetDedicatedNodes = 1234, + TargetLowPriorityNodes = 1234, + ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), + NodeDeallocationOption = BatchNodeDeallocationOption.Requeue, + }; + Response response = await client.ResizePoolAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_StopPoolResize_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.StopPoolResize(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_StopPoolResize_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.StopPoolResizeAsync(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_StopPoolResize_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.StopPoolResize("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_StopPoolResize_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.StopPoolResizeAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_ReplacePoolProperties_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + applicationPackageReferences = new object[] + { +new +{ +applicationId = "", +} + }, + metadata = new object[] + { +new +{ +name = "", +value = "", +} + }, + }); + Response response = client.ReplacePoolProperties("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_ReplacePoolProperties_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + applicationPackageReferences = new object[] + { +new +{ +applicationId = "", +} + }, + metadata = new object[] + { +new +{ +name = "", +value = "", +} + }, + }); + Response response = await client.ReplacePoolPropertiesAsync("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_ReplacePoolProperties_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchPoolReplaceContent pool = new BatchPoolReplaceContent(new BatchApplicationPackageReference[] + { +new BatchApplicationPackageReference("") + }, new MetadataItem[] + { +new MetadataItem("", "") + }); + Response response = client.ReplacePoolProperties("", pool); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_ReplacePoolProperties_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchPoolReplaceContent pool = new BatchPoolReplaceContent(new BatchApplicationPackageReference[] + { +new BatchApplicationPackageReference("") + }, new MetadataItem[] + { +new MetadataItem("", "") + }); + Response response = await client.ReplacePoolPropertiesAsync("", pool); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_ReplacePoolProperties_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + startTask = new + { + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + registry = new + { + username = "", + password = "", + registryServer = "", + identityReference = new + { + resourceId = "", + }, + }, + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { +new +{ +autoStorageContainerName = "", +storageContainerUrl = "", +httpUrl = "", +blobPrefix = "", +filePath = "", +fileMode = "", +} + }, + environmentSettings = new object[] + { +new +{ +name = "", +value = "", +} + }, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + maxTaskRetryCount = 1234, + waitForSuccess = true, + }, + applicationPackageReferences = new object[] + { +new +{ +applicationId = "", +version = "", +} + }, + metadata = new object[] + { +new +{ +name = "", +value = "", +} + }, + targetNodeCommunicationMode = "default", + }); + Response response = client.ReplacePoolProperties("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_ReplacePoolProperties_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + startTask = new + { + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + registry = new + { + username = "", + password = "", + registryServer = "", + identityReference = new + { + resourceId = "", + }, + }, + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { +new +{ +autoStorageContainerName = "", +storageContainerUrl = "", +httpUrl = "", +blobPrefix = "", +filePath = "", +fileMode = "", +} + }, + environmentSettings = new object[] + { +new +{ +name = "", +value = "", +} + }, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + maxTaskRetryCount = 1234, + waitForSuccess = true, + }, + applicationPackageReferences = new object[] + { +new +{ +applicationId = "", +version = "", +} + }, + metadata = new object[] + { +new +{ +name = "", +value = "", +} + }, + targetNodeCommunicationMode = "default", + }); + Response response = await client.ReplacePoolPropertiesAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_ReplacePoolProperties_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchPoolReplaceContent pool = new BatchPoolReplaceContent(new BatchApplicationPackageReference[] + { +new BatchApplicationPackageReference("") +{ +Version = "", +} + }, new MetadataItem[] + { +new MetadataItem("", "") + }) + { + StartTask = new BatchStartTask("") + { + ContainerSettings = new BatchTaskContainerSettings("") + { + ContainerRunOptions = "", + Registry = new ContainerRegistryReference + { + Username = "", + Password = "", + RegistryServer = "", + IdentityReference = new BatchNodeIdentityReference + { + ResourceId = "", + }, + }, + WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, + }, + ResourceFiles = {new ResourceFile +{ +AutoStorageContainerName = "", +StorageContainerUrl = "", +HttpUrl = "", +BlobPrefix = "", +FilePath = "", +FileMode = "", +IdentityReference = default, +}}, + EnvironmentSettings = {new EnvironmentSetting("") +{ +Value = "", +}}, + UserIdentity = new UserIdentity + { + Username = "", + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + MaxTaskRetryCount = 1234, + WaitForSuccess = true, + }, + TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, + }; + Response response = client.ReplacePoolProperties("", pool, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_ReplacePoolProperties_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchPoolReplaceContent pool = new BatchPoolReplaceContent(new BatchApplicationPackageReference[] + { +new BatchApplicationPackageReference("") +{ +Version = "", +} + }, new MetadataItem[] + { +new MetadataItem("", "") + }) + { + StartTask = new BatchStartTask("") + { + ContainerSettings = new BatchTaskContainerSettings("") + { + ContainerRunOptions = "", + Registry = new ContainerRegistryReference + { + Username = "", + Password = "", + RegistryServer = "", + IdentityReference = new BatchNodeIdentityReference + { + ResourceId = "", + }, + }, + WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, + }, + ResourceFiles = {new ResourceFile +{ +AutoStorageContainerName = "", +StorageContainerUrl = "", +HttpUrl = "", +BlobPrefix = "", +FilePath = "", +FileMode = "", +IdentityReference = default, +}}, + EnvironmentSettings = {new EnvironmentSetting("") +{ +Value = "", +}}, + UserIdentity = new UserIdentity + { + Username = "", + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + MaxTaskRetryCount = 1234, + WaitForSuccess = true, + }, + TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, + }; + Response response = await client.ReplacePoolPropertiesAsync("", pool, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_RemoveNodes_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + nodeList = new object[] + { +"" + }, + }); + Response response = client.RemoveNodes("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_RemoveNodes_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + nodeList = new object[] + { +"" + }, + }); + Response response = await client.RemoveNodesAsync("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_RemoveNodes_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchNodeRemoveContent content = new BatchNodeRemoveContent(new string[] { "" }); + Response response = client.RemoveNodes("", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_RemoveNodes_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchNodeRemoveContent content = new BatchNodeRemoveContent(new string[] { "" }); + Response response = await client.RemoveNodesAsync("", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_RemoveNodes_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + nodeList = new object[] + { +"" + }, + resizeTimeout = "PT1H23M45S", + nodeDeallocationOption = "requeue", + }); + Response response = client.RemoveNodes("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_RemoveNodes_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + nodeList = new object[] + { +"" + }, + resizeTimeout = "PT1H23M45S", + nodeDeallocationOption = "requeue", + }); + Response response = await client.RemoveNodesAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_RemoveNodes_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchNodeRemoveContent content = new BatchNodeRemoveContent(new string[] { "" }) + { + ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), + NodeDeallocationOption = BatchNodeDeallocationOption.Requeue, + }; + Response response = client.RemoveNodes("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_RemoveNodes_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchNodeRemoveContent content = new BatchNodeRemoveContent(new string[] { "" }) + { + ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), + NodeDeallocationOption = BatchNodeDeallocationOption.Requeue, + }; + Response response = await client.RemoveNodesAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_DeleteJob_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.DeleteJob(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_DeleteJob_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.DeleteJobAsync(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_DeleteJob_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.DeleteJob("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_DeleteJob_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.DeleteJobAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetJob_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetJob("", null, null, null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("poolInfo").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetJob_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.GetJobAsync("", null, null, null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("poolInfo").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetJob_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetJob(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetJob_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.GetJobAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetJob_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetJob("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), new string[] { "" }, new string[] { "" }, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("usesTaskDependencies").ToString()); + Console.WriteLine(result.GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result.GetProperty("lastModified").ToString()); + Console.WriteLine(result.GetProperty("creationTime").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); + Console.WriteLine(result.GetProperty("previousState").ToString()); + Console.WriteLine(result.GetProperty("previousStateTransitionTime").ToString()); + Console.WriteLine(result.GetProperty("priority").ToString()); + Console.WriteLine(result.GetProperty("allowTaskPreemption").ToString()); + Console.WriteLine(result.GetProperty("maxParallelTasks").ToString()); + Console.WriteLine(result.GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); + Console.WriteLine(result.GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("filePattern").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("path").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("uploadOptions").GetProperty("uploadCondition").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("requiredSlots").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("killJobOnCompletion").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("runExclusive").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("authenticationTokenSettings").GetProperty("access")[0].ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("allowLowPriorityNode").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("waitForSuccess").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("rerunOnNodeRebootAfterSuccess").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("maxWallClockTime").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("retentionTime").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("commonEnvironmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("commonEnvironmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("poolId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("autoPoolIdPrefix").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("poolLifetimeOption").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("keepAlive").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("vmSize").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("publisher").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("offer").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("sku").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("exactVersion").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodeAgentSKUId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("windowsConfiguration").GetProperty("enableAutomaticUpdates").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("lun").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("caching").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("storageAccountType").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("licenseType").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerImageNames")[0].ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("diskEncryptionConfiguration").GetProperty("targets")[0].ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodePlacementConfiguration").GetProperty("policy").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("publisher").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("typeHandlerVersion").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("autoUpgradeMinorVersion").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("enableAutomaticUpgrade").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("settings").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("protectedSettings").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("provisionAfterExtensions")[0].ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("ephemeralOSDiskSettings").GetProperty("placement").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("caching").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("managedDisk").GetProperty("storageAccountType").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("writeAcceleratorEnabled").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("encryptionAtHost").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("securityType").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("secureBootEnabled").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("vTpmEnabled").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("serviceArtifactReference").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSlotsPerNode").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSchedulingPolicy").GetProperty("nodeFillType").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resizeTimeout").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resourceTags").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetDedicatedNodes").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetLowPriorityNodes").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableAutoScale").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleFormula").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleEvaluationInterval").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableInterNodeCommunication").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("dynamicVNetAssignmentScope").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("protocol").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("backendPort").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeStart").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeEnd").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("priority").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("access").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourceAddressPrefix").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourcePortRanges")[0].ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("provision").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("ipAddressIds")[0].ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("enableAcceleratedNetworking").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("waitForSuccess").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("uid").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("gid").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("sshPrivateKey").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("windowsUserConfiguration").GetProperty("loginMode").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountName").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("containerName").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountKey").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("sasKey").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("blobfuseOptions").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("mountOptions").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("mountOptions").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountName").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("azureFileUrl").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountKey").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("mountOptions").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetNodeCommunicationMode").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("mode").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("disableAutomaticRollback").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("enableAutomaticOSUpgrade").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("useRollingUpgradePolicy").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("osRollingUpgradeDeferral").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("enableCrossZoneUpgrade").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxBatchInstancePercent").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyInstancePercent").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyUpgradedInstancePercent").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("pauseTimeBetweenBatches").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("prioritizeUnhealthyInstances").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("rollbackFailedInstancesOnPolicyBreach").ToString()); + Console.WriteLine(result.GetProperty("onAllTasksComplete").ToString()); + Console.WriteLine(result.GetProperty("onTaskFailure").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); + Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("poolId").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("details")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("details")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("terminateReason").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("lastUpdateTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("userCPUTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("kernelCPUTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("wallClockTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("readIOps").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOps").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("readIOGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("numSucceededTasks").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("numFailedTasks").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("numTaskRetries").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("waitTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetJob_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetJob("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), select: new string[] { "" }, expand: new string[] { "" }, requestConditions: null); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_UpdateJob_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new object()); + Response response = client.UpdateJob("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_UpdateJob_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.UpdateJobAsync("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_UpdateJob_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + priority = 1234, + allowTaskPreemption = true, + maxParallelTasks = 1234, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + poolInfo = new + { + poolId = "", + autoPoolSpecification = new + { + autoPoolIdPrefix = "", + poolLifetimeOption = "jobschedule", + keepAlive = true, + pool = new + { + displayName = "", + vmSize = "", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "", + offer = "", + sku = "", + version = "", + virtualMachineImageId = "", + }, + nodeAgentSKUId = "", + windowsConfiguration = new + { + enableAutomaticUpdates = true, + }, + dataDisks = new object[] + { +new +{ +lun = 1234, +caching = "none", +diskSizeGB = 1234, +storageAccountType = "standard_lrs", +} + }, + licenseType = "", + containerConfiguration = new + { + type = "dockerCompatible", + containerImageNames = new object[] + { +"" + }, + containerRegistries = new object[] + { +new +{ +username = "", +password = "", +registryServer = "", +identityReference = new +{ +resourceId = "", +}, +} + }, + }, + diskEncryptionConfiguration = new + { + targets = new object[] + { +"osdisk" + }, + }, + nodePlacementConfiguration = new + { + policy = "regional", + }, + extensions = new object[] + { +new +{ +name = "", +publisher = "", +type = "", +typeHandlerVersion = "", +autoUpgradeMinorVersion = true, +enableAutomaticUpgrade = true, +settings = new +{ +key = "", +}, +protectedSettings = new +{ +key = "", +}, +provisionAfterExtensions = new object[] +{ +"" +}, +} + }, + osDisk = new + { + ephemeralOSDiskSettings = new + { + placement = "cachedisk", + }, + caching = "none", + diskSizeGB = 1234, + managedDisk = new + { + storageAccountType = "standard_lrs", + }, + writeAcceleratorEnabled = true, + }, + securityProfile = new + { + encryptionAtHost = true, + securityType = "trustedLaunch", + uefiSettings = new + { + secureBootEnabled = true, + vTpmEnabled = true, + }, + }, + serviceArtifactReference = new + { + id = "", + }, + }, + taskSlotsPerNode = 1234, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + resizeTimeout = "PT1H23M45S", + resourceTags = "", + targetDedicatedNodes = 1234, + targetLowPriorityNodes = 1234, + enableAutoScale = true, + autoScaleFormula = "", + autoScaleEvaluationInterval = "PT1H23M45S", + enableInterNodeCommunication = true, + networkConfiguration = new + { + subnetId = "", + dynamicVNetAssignmentScope = "none", + endpointConfiguration = new + { + inboundNATPools = new object[] + { +new +{ +name = "", +protocol = "tcp", +backendPort = 1234, +frontendPortRangeStart = 1234, +frontendPortRangeEnd = 1234, +networkSecurityGroupRules = new object[] +{ +new +{ +priority = 1234, +access = "allow", +sourceAddressPrefix = "", +sourcePortRanges = new object[] +{ +"" +}, +} +}, +} + }, + }, + publicIPAddressConfiguration = new + { + provision = "batchmanaged", + ipAddressIds = new object[] + { +"" + }, + }, + enableAcceleratedNetworking = true, + }, + startTask = new + { + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { +new +{ +autoStorageContainerName = "", +storageContainerUrl = "", +httpUrl = "", +blobPrefix = "", +filePath = "", +fileMode = "", +} + }, + environmentSettings = new object[] + { +new +{ +name = "", +value = "", +} + }, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + maxTaskRetryCount = 1234, + waitForSuccess = true, + }, + applicationPackageReferences = new object[] + { +new +{ +applicationId = "", +version = "", +} + }, + userAccounts = new object[] + { +new +{ +name = "", +password = "", +elevationLevel = "nonadmin", +linuxUserConfiguration = new +{ +uid = 1234, +gid = 1234, +sshPrivateKey = "", +}, +windowsUserConfiguration = new +{ +loginMode = "batch", +}, +} + }, + metadata = new object[] + { +new +{ +name = "", +value = "", +} + }, + mountConfiguration = new object[] + { +new +{ +azureBlobFileSystemConfiguration = new +{ +accountName = "", +containerName = "", +accountKey = "", +sasKey = "", +blobfuseOptions = "", +relativeMountPath = "", +}, +nfsMountConfiguration = new +{ +source = "", +relativeMountPath = "", +mountOptions = "", +}, +cifsMountConfiguration = new +{ +username = "", +source = "", +relativeMountPath = "", +mountOptions = "", +password = "", +}, +azureFileShareConfiguration = new +{ +accountName = "", +azureFileUrl = "", +accountKey = "", +relativeMountPath = "", +mountOptions = "", +}, +} + }, + targetNodeCommunicationMode = "default", + upgradePolicy = new + { + mode = "automatic", + automaticOSUpgradePolicy = new + { + disableAutomaticRollback = true, + enableAutomaticOSUpgrade = true, + useRollingUpgradePolicy = true, + osRollingUpgradeDeferral = true, + }, + rollingUpgradePolicy = new + { + enableCrossZoneUpgrade = true, + maxBatchInstancePercent = 1234, + maxUnhealthyInstancePercent = 1234, + maxUnhealthyUpgradedInstancePercent = 1234, + pauseTimeBetweenBatches = "PT1H23M45S", + prioritizeUnhealthyInstances = true, + rollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, + }, + onAllTasksComplete = "noaction", + metadata = new object[] + { +null + }, + }); + Response response = client.UpdateJob("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_UpdateJob_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + priority = 1234, + allowTaskPreemption = true, + maxParallelTasks = 1234, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + poolInfo = new + { + poolId = "", + autoPoolSpecification = new + { + autoPoolIdPrefix = "", + poolLifetimeOption = "jobschedule", + keepAlive = true, + pool = new + { + displayName = "", + vmSize = "", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "", + offer = "", + sku = "", + version = "", + virtualMachineImageId = "", + }, + nodeAgentSKUId = "", + windowsConfiguration = new + { + enableAutomaticUpdates = true, + }, + dataDisks = new object[] + { +new +{ +lun = 1234, +caching = "none", +diskSizeGB = 1234, +storageAccountType = "standard_lrs", +} + }, + licenseType = "", + containerConfiguration = new + { + type = "dockerCompatible", + containerImageNames = new object[] + { +"" + }, + containerRegistries = new object[] + { +new +{ +username = "", +password = "", +registryServer = "", +identityReference = new +{ +resourceId = "", +}, +} + }, + }, + diskEncryptionConfiguration = new + { + targets = new object[] + { +"osdisk" + }, + }, + nodePlacementConfiguration = new + { + policy = "regional", + }, + extensions = new object[] + { +new +{ +name = "", +publisher = "", +type = "", +typeHandlerVersion = "", +autoUpgradeMinorVersion = true, +enableAutomaticUpgrade = true, +settings = new +{ +key = "", +}, +protectedSettings = new +{ +key = "", +}, +provisionAfterExtensions = new object[] +{ +"" +}, +} + }, + osDisk = new + { + ephemeralOSDiskSettings = new + { + placement = "cachedisk", + }, + caching = "none", + diskSizeGB = 1234, + managedDisk = new + { + storageAccountType = "standard_lrs", + }, + writeAcceleratorEnabled = true, + }, + securityProfile = new + { + encryptionAtHost = true, + securityType = "trustedLaunch", + uefiSettings = new + { + secureBootEnabled = true, + vTpmEnabled = true, + }, + }, + serviceArtifactReference = new + { + id = "", + }, + }, + taskSlotsPerNode = 1234, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + resizeTimeout = "PT1H23M45S", + resourceTags = "", + targetDedicatedNodes = 1234, + targetLowPriorityNodes = 1234, + enableAutoScale = true, + autoScaleFormula = "", + autoScaleEvaluationInterval = "PT1H23M45S", + enableInterNodeCommunication = true, + networkConfiguration = new + { + subnetId = "", + dynamicVNetAssignmentScope = "none", + endpointConfiguration = new + { + inboundNATPools = new object[] + { +new +{ +name = "", +protocol = "tcp", +backendPort = 1234, +frontendPortRangeStart = 1234, +frontendPortRangeEnd = 1234, +networkSecurityGroupRules = new object[] +{ +new +{ +priority = 1234, +access = "allow", +sourceAddressPrefix = "", +sourcePortRanges = new object[] +{ +"" +}, +} +}, +} + }, + }, + publicIPAddressConfiguration = new + { + provision = "batchmanaged", + ipAddressIds = new object[] + { +"" + }, + }, + enableAcceleratedNetworking = true, + }, + startTask = new + { + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { +new +{ +autoStorageContainerName = "", +storageContainerUrl = "", +httpUrl = "", +blobPrefix = "", +filePath = "", +fileMode = "", +} + }, + environmentSettings = new object[] + { +new +{ +name = "", +value = "", +} + }, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + maxTaskRetryCount = 1234, + waitForSuccess = true, + }, + applicationPackageReferences = new object[] + { +new +{ +applicationId = "", +version = "", +} + }, + userAccounts = new object[] + { +new +{ +name = "", +password = "", +elevationLevel = "nonadmin", +linuxUserConfiguration = new +{ +uid = 1234, +gid = 1234, +sshPrivateKey = "", +}, +windowsUserConfiguration = new +{ +loginMode = "batch", +}, +} + }, + metadata = new object[] + { +new +{ +name = "", +value = "", +} + }, + mountConfiguration = new object[] + { +new +{ +azureBlobFileSystemConfiguration = new +{ +accountName = "", +containerName = "", +accountKey = "", +sasKey = "", +blobfuseOptions = "", +relativeMountPath = "", +}, +nfsMountConfiguration = new +{ +source = "", +relativeMountPath = "", +mountOptions = "", +}, +cifsMountConfiguration = new +{ +username = "", +source = "", +relativeMountPath = "", +mountOptions = "", +password = "", +}, +azureFileShareConfiguration = new +{ +accountName = "", +azureFileUrl = "", +accountKey = "", +relativeMountPath = "", +mountOptions = "", +}, +} + }, + targetNodeCommunicationMode = "default", + upgradePolicy = new + { + mode = "automatic", + automaticOSUpgradePolicy = new + { + disableAutomaticRollback = true, + enableAutomaticOSUpgrade = true, + useRollingUpgradePolicy = true, + osRollingUpgradeDeferral = true, + }, + rollingUpgradePolicy = new + { + enableCrossZoneUpgrade = true, + maxBatchInstancePercent = 1234, + maxUnhealthyInstancePercent = 1234, + maxUnhealthyUpgradedInstancePercent = 1234, + pauseTimeBetweenBatches = "PT1H23M45S", + prioritizeUnhealthyInstances = true, + rollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, + }, + onAllTasksComplete = "noaction", + metadata = new object[] + { +null + }, + }); + Response response = await client.UpdateJobAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_ReplaceJob_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + poolInfo = new object(), + }); + Response response = client.ReplaceJob("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_ReplaceJob_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + poolInfo = new object(), + }); + Response response = await client.ReplaceJobAsync("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_ReplaceJob_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchJob job = new BatchJob(new BatchPoolInfo()); + Response response = client.ReplaceJob("", job); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_ReplaceJob_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchJob job = new BatchJob(new BatchPoolInfo()); + Response response = await client.ReplaceJobAsync("", job); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_ReplaceJob_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + priority = 1234, + allowTaskPreemption = true, + maxParallelTasks = 1234, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + poolInfo = new + { + poolId = "", + autoPoolSpecification = new + { + autoPoolIdPrefix = "", + poolLifetimeOption = "jobschedule", + keepAlive = true, + pool = new + { + displayName = "", + vmSize = "", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "", + offer = "", + sku = "", + version = "", + virtualMachineImageId = "", + }, + nodeAgentSKUId = "", + windowsConfiguration = new + { + enableAutomaticUpdates = true, + }, + dataDisks = new object[] + { +new +{ +lun = 1234, +caching = "none", +diskSizeGB = 1234, +storageAccountType = "standard_lrs", +} + }, + licenseType = "", + containerConfiguration = new + { + type = "dockerCompatible", + containerImageNames = new object[] + { +"" + }, + containerRegistries = new object[] + { +new +{ +username = "", +password = "", +registryServer = "", +identityReference = new +{ +resourceId = "", +}, +} + }, + }, + diskEncryptionConfiguration = new + { + targets = new object[] + { +"osdisk" + }, + }, + nodePlacementConfiguration = new + { + policy = "regional", + }, + extensions = new object[] + { +new +{ +name = "", +publisher = "", +type = "", +typeHandlerVersion = "", +autoUpgradeMinorVersion = true, +enableAutomaticUpgrade = true, +settings = new +{ +key = "", +}, +protectedSettings = new +{ +key = "", +}, +provisionAfterExtensions = new object[] +{ +"" +}, +} + }, + osDisk = new + { + ephemeralOSDiskSettings = new + { + placement = "cachedisk", + }, + caching = "none", + diskSizeGB = 1234, + managedDisk = new + { + storageAccountType = "standard_lrs", + }, + writeAcceleratorEnabled = true, + }, + securityProfile = new + { + encryptionAtHost = true, + securityType = "trustedLaunch", + uefiSettings = new + { + secureBootEnabled = true, + vTpmEnabled = true, + }, + }, + serviceArtifactReference = new + { + id = "", + }, + }, + taskSlotsPerNode = 1234, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + resizeTimeout = "PT1H23M45S", + resourceTags = "", + targetDedicatedNodes = 1234, + targetLowPriorityNodes = 1234, + enableAutoScale = true, + autoScaleFormula = "", + autoScaleEvaluationInterval = "PT1H23M45S", + enableInterNodeCommunication = true, + networkConfiguration = new + { + subnetId = "", + dynamicVNetAssignmentScope = "none", + endpointConfiguration = new + { + inboundNATPools = new object[] + { +new +{ +name = "", +protocol = "tcp", +backendPort = 1234, +frontendPortRangeStart = 1234, +frontendPortRangeEnd = 1234, +networkSecurityGroupRules = new object[] +{ +new +{ +priority = 1234, +access = "allow", +sourceAddressPrefix = "", +sourcePortRanges = new object[] +{ +"" +}, +} +}, +} + }, + }, + publicIPAddressConfiguration = new + { + provision = "batchmanaged", + ipAddressIds = new object[] + { +"" + }, + }, + enableAcceleratedNetworking = true, + }, + startTask = new + { + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { +new +{ +autoStorageContainerName = "", +storageContainerUrl = "", +httpUrl = "", +blobPrefix = "", +filePath = "", +fileMode = "", +} + }, + environmentSettings = new object[] + { +new +{ +name = "", +value = "", +} + }, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + maxTaskRetryCount = 1234, + waitForSuccess = true, + }, + applicationPackageReferences = new object[] + { +new +{ +applicationId = "", +version = "", +} + }, + userAccounts = new object[] + { +new +{ +name = "", +password = "", +elevationLevel = "nonadmin", +linuxUserConfiguration = new +{ +uid = 1234, +gid = 1234, +sshPrivateKey = "", +}, +windowsUserConfiguration = new +{ +loginMode = "batch", +}, +} + }, + metadata = new object[] + { +new +{ +name = "", +value = "", +} + }, + mountConfiguration = new object[] + { +new +{ +azureBlobFileSystemConfiguration = new +{ +accountName = "", +containerName = "", +accountKey = "", +sasKey = "", +blobfuseOptions = "", +relativeMountPath = "", +}, +nfsMountConfiguration = new +{ +source = "", +relativeMountPath = "", +mountOptions = "", +}, +cifsMountConfiguration = new +{ +username = "", +source = "", +relativeMountPath = "", +mountOptions = "", +password = "", +}, +azureFileShareConfiguration = new +{ +accountName = "", +azureFileUrl = "", +accountKey = "", +relativeMountPath = "", +mountOptions = "", +}, +} + }, + targetNodeCommunicationMode = "default", + upgradePolicy = new + { + mode = "automatic", + automaticOSUpgradePolicy = new + { + disableAutomaticRollback = true, + enableAutomaticOSUpgrade = true, + useRollingUpgradePolicy = true, + osRollingUpgradeDeferral = true, + }, + rollingUpgradePolicy = new + { + enableCrossZoneUpgrade = true, + maxBatchInstancePercent = 1234, + maxUnhealthyInstancePercent = 1234, + maxUnhealthyUpgradedInstancePercent = 1234, + pauseTimeBetweenBatches = "PT1H23M45S", + prioritizeUnhealthyInstances = true, + rollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, + }, + onAllTasksComplete = "noaction", + metadata = new object[] + { +null + }, + }); + Response response = client.ReplaceJob("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_ReplaceJob_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + priority = 1234, + allowTaskPreemption = true, + maxParallelTasks = 1234, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + poolInfo = new + { + poolId = "", + autoPoolSpecification = new + { + autoPoolIdPrefix = "", + poolLifetimeOption = "jobschedule", + keepAlive = true, + pool = new + { + displayName = "", + vmSize = "", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "", + offer = "", + sku = "", + version = "", + virtualMachineImageId = "", + }, + nodeAgentSKUId = "", + windowsConfiguration = new + { + enableAutomaticUpdates = true, + }, + dataDisks = new object[] + { +new +{ +lun = 1234, +caching = "none", +diskSizeGB = 1234, +storageAccountType = "standard_lrs", +} + }, + licenseType = "", + containerConfiguration = new + { + type = "dockerCompatible", + containerImageNames = new object[] + { +"" + }, + containerRegistries = new object[] + { +new +{ +username = "", +password = "", +registryServer = "", +identityReference = new +{ +resourceId = "", +}, +} + }, + }, + diskEncryptionConfiguration = new + { + targets = new object[] + { +"osdisk" + }, + }, + nodePlacementConfiguration = new + { + policy = "regional", + }, + extensions = new object[] + { +new +{ +name = "", +publisher = "", +type = "", +typeHandlerVersion = "", +autoUpgradeMinorVersion = true, +enableAutomaticUpgrade = true, +settings = new +{ +key = "", +}, +protectedSettings = new +{ +key = "", +}, +provisionAfterExtensions = new object[] +{ +"" +}, +} + }, + osDisk = new + { + ephemeralOSDiskSettings = new + { + placement = "cachedisk", + }, + caching = "none", + diskSizeGB = 1234, + managedDisk = new + { + storageAccountType = "standard_lrs", + }, + writeAcceleratorEnabled = true, + }, + securityProfile = new + { + encryptionAtHost = true, + securityType = "trustedLaunch", + uefiSettings = new + { + secureBootEnabled = true, + vTpmEnabled = true, + }, + }, + serviceArtifactReference = new + { + id = "", + }, + }, + taskSlotsPerNode = 1234, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + resizeTimeout = "PT1H23M45S", + resourceTags = "", + targetDedicatedNodes = 1234, + targetLowPriorityNodes = 1234, + enableAutoScale = true, + autoScaleFormula = "", + autoScaleEvaluationInterval = "PT1H23M45S", + enableInterNodeCommunication = true, + networkConfiguration = new + { + subnetId = "", + dynamicVNetAssignmentScope = "none", + endpointConfiguration = new + { + inboundNATPools = new object[] + { +new +{ +name = "", +protocol = "tcp", +backendPort = 1234, +frontendPortRangeStart = 1234, +frontendPortRangeEnd = 1234, +networkSecurityGroupRules = new object[] +{ +new +{ +priority = 1234, +access = "allow", +sourceAddressPrefix = "", +sourcePortRanges = new object[] +{ +"" +}, +} +}, +} + }, + }, + publicIPAddressConfiguration = new + { + provision = "batchmanaged", + ipAddressIds = new object[] + { +"" + }, + }, + enableAcceleratedNetworking = true, + }, + startTask = new + { + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { +new +{ +autoStorageContainerName = "", +storageContainerUrl = "", +httpUrl = "", +blobPrefix = "", +filePath = "", +fileMode = "", +} + }, + environmentSettings = new object[] + { +new +{ +name = "", +value = "", +} + }, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + maxTaskRetryCount = 1234, + waitForSuccess = true, + }, + applicationPackageReferences = new object[] + { +new +{ +applicationId = "", +version = "", +} + }, + userAccounts = new object[] + { +new +{ +name = "", +password = "", +elevationLevel = "nonadmin", +linuxUserConfiguration = new +{ +uid = 1234, +gid = 1234, +sshPrivateKey = "", +}, +windowsUserConfiguration = new +{ +loginMode = "batch", +}, +} + }, + metadata = new object[] + { +new +{ +name = "", +value = "", +} + }, + mountConfiguration = new object[] + { +new +{ +azureBlobFileSystemConfiguration = new +{ +accountName = "", +containerName = "", +accountKey = "", +sasKey = "", +blobfuseOptions = "", +relativeMountPath = "", +}, +nfsMountConfiguration = new +{ +source = "", +relativeMountPath = "", +mountOptions = "", +}, +cifsMountConfiguration = new +{ +username = "", +source = "", +relativeMountPath = "", +mountOptions = "", +password = "", +}, +azureFileShareConfiguration = new +{ +accountName = "", +azureFileUrl = "", +accountKey = "", +relativeMountPath = "", +mountOptions = "", +}, +} + }, + targetNodeCommunicationMode = "default", + upgradePolicy = new + { + mode = "automatic", + automaticOSUpgradePolicy = new + { + disableAutomaticRollback = true, + enableAutomaticOSUpgrade = true, + useRollingUpgradePolicy = true, + osRollingUpgradeDeferral = true, + }, + rollingUpgradePolicy = new + { + enableCrossZoneUpgrade = true, + maxBatchInstancePercent = 1234, + maxUnhealthyInstancePercent = 1234, + maxUnhealthyUpgradedInstancePercent = 1234, + pauseTimeBetweenBatches = "PT1H23M45S", + prioritizeUnhealthyInstances = true, + rollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, + }, + onAllTasksComplete = "noaction", + metadata = new object[] + { +null + }, + }); + Response response = await client.ReplaceJobAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_ReplaceJob_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchJob job = new BatchJob(new BatchPoolInfo + { + PoolId = "", + AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.JobSchedule) + { + AutoPoolIdPrefix = "", + KeepAlive = true, + Pool = new BatchPoolSpecification("") + { + DisplayName = "", + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "", + Offer = "", + Sku = "", + Version = "", + VirtualMachineImageId = "", + }, "") + { + WindowsConfiguration = new WindowsConfiguration + { + EnableAutomaticUpdates = true, + }, + DataDisks = {new DataDisk(1234, 1234) +{ +Caching = CachingType.None, +StorageAccountType = StorageAccountType.StandardLRS, +}}, + LicenseType = "", + ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) + { + ContainerImageNames = { "" }, + ContainerRegistries = {new ContainerRegistryReference +{ +Username = "", +Password = "", +RegistryServer = "", +IdentityReference = new BatchNodeIdentityReference +{ +ResourceId = "", +}, +}}, + }, + DiskEncryptionConfiguration = new DiskEncryptionConfiguration + { + Targets = { DiskEncryptionTarget.OsDisk }, + }, + NodePlacementConfiguration = new BatchNodePlacementConfiguration + { + Policy = BatchNodePlacementPolicyType.Regional, + }, + Extensions = {new VMExtension("", "", "") +{ +TypeHandlerVersion = "", +AutoUpgradeMinorVersion = true, +EnableAutomaticUpgrade = true, +Settings = +{ +["key"] = "" +}, +ProtectedSettings = +{ +["key"] = "" +}, +ProvisionAfterExtensions = {""}, +}}, + OsDisk = new OSDisk + { + EphemeralOSDiskSettings = new DiffDiskSettings + { + Placement = DiffDiskPlacement.CacheDisk, + }, + Caching = CachingType.None, + DiskSizeGB = 1234, + ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), + WriteAcceleratorEnabled = true, + }, + SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings + { + SecureBootEnabled = true, + VTpmEnabled = true, + }), + ServiceArtifactReference = new ServiceArtifactReference(""), + }, + TaskSlotsPerNode = 1234, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), + ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), + ResourceTags = "", + TargetDedicatedNodes = 1234, + TargetLowPriorityNodes = 1234, + EnableAutoScale = true, + AutoScaleFormula = "", + AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), + EnableInterNodeCommunication = true, + NetworkConfiguration = new NetworkConfiguration + { + SubnetId = "", + DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, + EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] + { +new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) +{ +NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") +{ +SourcePortRanges = {""}, +}}, +} + }), + PublicIpAddressConfiguration = new PublicIpAddressConfiguration + { + IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, + IpAddressIds = { "" }, + }, + EnableAcceleratedNetworking = true, + }, + StartTask = new BatchStartTask("") + { + ContainerSettings = new BatchTaskContainerSettings("") + { + ContainerRunOptions = "", + Registry = default, + WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, + }, + ResourceFiles = {new ResourceFile +{ +AutoStorageContainerName = "", +StorageContainerUrl = "", +HttpUrl = "", +BlobPrefix = "", +FilePath = "", +FileMode = "", +IdentityReference = default, +}}, + EnvironmentSettings = {new EnvironmentSetting("") +{ +Value = "", +}}, + UserIdentity = new UserIdentity + { + Username = "", + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + MaxTaskRetryCount = 1234, + WaitForSuccess = true, + }, + ApplicationPackageReferences = {new BatchApplicationPackageReference("") +{ +Version = "", +}}, + UserAccounts = {new UserAccount("", "") +{ +ElevationLevel = ElevationLevel.NonAdmin, +LinuxUserConfiguration = new LinuxUserConfiguration +{ +Uid = 1234, +Gid = 1234, +SshPrivateKey = "", +}, +WindowsUserConfiguration = new WindowsUserConfiguration +{ +LoginMode = LoginMode.Batch, +}, +}}, + Metadata = { new MetadataItem("", "") }, + MountConfiguration = {new MountConfiguration +{ +AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") +{ +AccountKey = "", +SasKey = "", +BlobfuseOptions = "", +IdentityReference = default, +}, +NfsMountConfiguration = new NfsMountConfiguration("", "") +{ +MountOptions = "", +}, +CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") +{ +MountOptions = "", +}, +AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") +{ +MountOptions = "", +}, +}}, + TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, + UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) + { + AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy + { + DisableAutomaticRollback = true, + EnableAutomaticOsUpgrade = true, + UseRollingUpgradePolicy = true, + OsRollingUpgradeDeferral = true, + }, + RollingUpgradePolicy = new RollingUpgradePolicy + { + EnableCrossZoneUpgrade = true, + MaxBatchInstancePercent = 1234, + MaxUnhealthyInstancePercent = 1234, + MaxUnhealthyUpgradedInstancePercent = 1234, + PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), + PrioritizeUnhealthyInstances = true, + RollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, + }) + { + Priority = 1234, + AllowTaskPreemption = true, + MaxParallelTasks = 1234, + Constraints = new BatchJobConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, + OnAllTasksComplete = OnAllBatchTasksComplete.NoAction, + Metadata = { default }, + }; + Response response = client.ReplaceJob("", job, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_ReplaceJob_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchJob job = new BatchJob(new BatchPoolInfo + { + PoolId = "", + AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.JobSchedule) + { + AutoPoolIdPrefix = "", + KeepAlive = true, + Pool = new BatchPoolSpecification("") + { + DisplayName = "", + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "", + Offer = "", + Sku = "", + Version = "", + VirtualMachineImageId = "", + }, "") + { + WindowsConfiguration = new WindowsConfiguration + { + EnableAutomaticUpdates = true, + }, + DataDisks = {new DataDisk(1234, 1234) +{ +Caching = CachingType.None, +StorageAccountType = StorageAccountType.StandardLRS, +}}, + LicenseType = "", + ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) + { + ContainerImageNames = { "" }, + ContainerRegistries = {new ContainerRegistryReference +{ +Username = "", +Password = "", +RegistryServer = "", +IdentityReference = new BatchNodeIdentityReference +{ +ResourceId = "", +}, +}}, + }, + DiskEncryptionConfiguration = new DiskEncryptionConfiguration + { + Targets = { DiskEncryptionTarget.OsDisk }, + }, + NodePlacementConfiguration = new BatchNodePlacementConfiguration + { + Policy = BatchNodePlacementPolicyType.Regional, + }, + Extensions = {new VMExtension("", "", "") +{ +TypeHandlerVersion = "", +AutoUpgradeMinorVersion = true, +EnableAutomaticUpgrade = true, +Settings = +{ +["key"] = "" +}, +ProtectedSettings = +{ +["key"] = "" +}, +ProvisionAfterExtensions = {""}, +}}, + OsDisk = new OSDisk + { + EphemeralOSDiskSettings = new DiffDiskSettings + { + Placement = DiffDiskPlacement.CacheDisk, + }, + Caching = CachingType.None, + DiskSizeGB = 1234, + ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), + WriteAcceleratorEnabled = true, + }, + SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings + { + SecureBootEnabled = true, + VTpmEnabled = true, + }), + ServiceArtifactReference = new ServiceArtifactReference(""), + }, + TaskSlotsPerNode = 1234, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), + ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), + ResourceTags = "", + TargetDedicatedNodes = 1234, + TargetLowPriorityNodes = 1234, + EnableAutoScale = true, + AutoScaleFormula = "", + AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), + EnableInterNodeCommunication = true, + NetworkConfiguration = new NetworkConfiguration + { + SubnetId = "", + DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, + EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] + { +new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) +{ +NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") +{ +SourcePortRanges = {""}, +}}, +} + }), + PublicIpAddressConfiguration = new PublicIpAddressConfiguration + { + IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, + IpAddressIds = { "" }, + }, + EnableAcceleratedNetworking = true, + }, + StartTask = new BatchStartTask("") + { + ContainerSettings = new BatchTaskContainerSettings("") + { + ContainerRunOptions = "", + Registry = default, + WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, + }, + ResourceFiles = {new ResourceFile +{ +AutoStorageContainerName = "", +StorageContainerUrl = "", +HttpUrl = "", +BlobPrefix = "", +FilePath = "", +FileMode = "", +IdentityReference = default, +}}, + EnvironmentSettings = {new EnvironmentSetting("") +{ +Value = "", +}}, + UserIdentity = new UserIdentity + { + Username = "", + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + MaxTaskRetryCount = 1234, + WaitForSuccess = true, + }, + ApplicationPackageReferences = {new BatchApplicationPackageReference("") +{ +Version = "", +}}, + UserAccounts = {new UserAccount("", "") +{ +ElevationLevel = ElevationLevel.NonAdmin, +LinuxUserConfiguration = new LinuxUserConfiguration +{ +Uid = 1234, +Gid = 1234, +SshPrivateKey = "", +}, +WindowsUserConfiguration = new WindowsUserConfiguration +{ +LoginMode = LoginMode.Batch, +}, +}}, + Metadata = { new MetadataItem("", "") }, + MountConfiguration = {new MountConfiguration +{ +AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") +{ +AccountKey = "", +SasKey = "", +BlobfuseOptions = "", +IdentityReference = default, +}, +NfsMountConfiguration = new NfsMountConfiguration("", "") +{ +MountOptions = "", +}, +CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") +{ +MountOptions = "", +}, +AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") +{ +MountOptions = "", +}, +}}, + TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, + UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) + { + AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy + { + DisableAutomaticRollback = true, + EnableAutomaticOsUpgrade = true, + UseRollingUpgradePolicy = true, + OsRollingUpgradeDeferral = true, + }, + RollingUpgradePolicy = new RollingUpgradePolicy + { + EnableCrossZoneUpgrade = true, + MaxBatchInstancePercent = 1234, + MaxUnhealthyInstancePercent = 1234, + MaxUnhealthyUpgradedInstancePercent = 1234, + PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), + PrioritizeUnhealthyInstances = true, + RollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, + }) + { + Priority = 1234, + AllowTaskPreemption = true, + MaxParallelTasks = 1234, + Constraints = new BatchJobConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, + OnAllTasksComplete = OnAllBatchTasksComplete.NoAction, + Metadata = { default }, + }; + Response response = await client.ReplaceJobAsync("", job, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_DisableJob_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + disableTasks = "requeue", + }); + Response response = client.DisableJob("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_DisableJob_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + disableTasks = "requeue", + }); + Response response = await client.DisableJobAsync("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_DisableJob_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchJobDisableContent content = new BatchJobDisableContent(DisableBatchJobOption.Requeue); + Response response = client.DisableJob("", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_DisableJob_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchJobDisableContent content = new BatchJobDisableContent(DisableBatchJobOption.Requeue); + Response response = await client.DisableJobAsync("", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_DisableJob_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + disableTasks = "requeue", + }); + Response response = client.DisableJob("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_DisableJob_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + disableTasks = "requeue", + }); + Response response = await client.DisableJobAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_DisableJob_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchJobDisableContent content = new BatchJobDisableContent(DisableBatchJobOption.Requeue); + Response response = client.DisableJob("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_DisableJob_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchJobDisableContent content = new BatchJobDisableContent(DisableBatchJobOption.Requeue); + Response response = await client.DisableJobAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_EnableJob_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.EnableJob(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_EnableJob_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.EnableJobAsync(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_EnableJob_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.EnableJob("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_EnableJob_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.EnableJobAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_TerminateJob_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = null; + Response response = client.TerminateJob("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_TerminateJob_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = null; + Response response = await client.TerminateJobAsync("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_TerminateJob_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.TerminateJob(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_TerminateJob_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.TerminateJobAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_TerminateJob_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + terminateReason = "", + }); + Response response = client.TerminateJob("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_TerminateJob_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + terminateReason = "", + }); + Response response = await client.TerminateJobAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_TerminateJob_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchJobTerminateContent parameters = new BatchJobTerminateContent + { + TerminationReason = "", + }; + Response response = client.TerminateJob("", parameters: parameters, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_TerminateJob_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchJobTerminateContent parameters = new BatchJobTerminateContent + { + TerminationReason = "", + }; + Response response = await client.TerminateJobAsync("", parameters: parameters, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_CreateJob_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + id = "", + poolInfo = new object(), + }); + Response response = client.CreateJob(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_CreateJob_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + id = "", + poolInfo = new object(), + }); + Response response = await client.CreateJobAsync(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_CreateJob_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchJobCreateContent job = new BatchJobCreateContent("", new BatchPoolInfo()); + Response response = client.CreateJob(job); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_CreateJob_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchJobCreateContent job = new BatchJobCreateContent("", new BatchPoolInfo()); + Response response = await client.CreateJobAsync(job); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_CreateJob_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + id = "", + displayName = "", + usesTaskDependencies = true, + priority = 1234, + allowTaskPreemption = true, + maxParallelTasks = 1234, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + jobManagerTask = new + { + id = "", + displayName = "", + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + registry = new + { + username = "", + password = "", + registryServer = "", + identityReference = new + { + resourceId = "", + }, + }, + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { +new +{ +autoStorageContainerName = "", +storageContainerUrl = "", +httpUrl = "", +blobPrefix = "", +filePath = "", +fileMode = "", +} + }, + outputFiles = new object[] + { +new +{ +filePattern = "", +destination = new +{ +container = new +{ +path = "", +containerUrl = "", +uploadHeaders = new object[] +{ +new +{ +name = "", +value = "", +} +}, +}, +}, +uploadOptions = new +{ +uploadCondition = "tasksuccess", +}, +} + }, + environmentSettings = new object[] + { +new +{ +name = "", +value = "", +} + }, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + requiredSlots = 1234, + killJobOnCompletion = true, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + runExclusive = true, + applicationPackageReferences = new object[] + { +new +{ +applicationId = "", +version = "", +} + }, + authenticationTokenSettings = new + { + access = new object[] + { +"job" + }, + }, + allowLowPriorityNode = true, + }, + jobPreparationTask = new + { + id = "", + commandLine = "", + resourceFiles = new object[] + { +null + }, + environmentSettings = new object[] + { +null + }, + waitForSuccess = true, + rerunOnNodeRebootAfterSuccess = true, + }, + jobReleaseTask = new + { + id = "", + commandLine = "", + resourceFiles = new object[] + { +null + }, + environmentSettings = new object[] + { +null + }, + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + }, + commonEnvironmentSettings = new object[] + { +null + }, + poolInfo = new + { + poolId = "", + autoPoolSpecification = new + { + autoPoolIdPrefix = "", + poolLifetimeOption = "jobschedule", + keepAlive = true, + pool = new + { + displayName = "", + vmSize = "", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "", + offer = "", + sku = "", + version = "", + virtualMachineImageId = "", + }, + nodeAgentSKUId = "", + windowsConfiguration = new + { + enableAutomaticUpdates = true, + }, + dataDisks = new object[] + { +new +{ +lun = 1234, +caching = "none", +diskSizeGB = 1234, +storageAccountType = "standard_lrs", +} + }, + licenseType = "", + containerConfiguration = new + { + type = "dockerCompatible", + containerImageNames = new object[] + { +"" + }, + containerRegistries = new object[] + { +null + }, + }, + diskEncryptionConfiguration = new + { + targets = new object[] + { +"osdisk" + }, + }, + nodePlacementConfiguration = new + { + policy = "regional", + }, + extensions = new object[] + { +new +{ +name = "", +publisher = "", +type = "", +typeHandlerVersion = "", +autoUpgradeMinorVersion = true, +enableAutomaticUpgrade = true, +settings = new +{ +key = "", +}, +protectedSettings = new +{ +key = "", +}, +provisionAfterExtensions = new object[] +{ +"" +}, +} + }, + osDisk = new + { + ephemeralOSDiskSettings = new + { + placement = "cachedisk", + }, + caching = "none", + diskSizeGB = 1234, + managedDisk = new + { + storageAccountType = "standard_lrs", + }, + writeAcceleratorEnabled = true, + }, + securityProfile = new + { + encryptionAtHost = true, + securityType = "trustedLaunch", + uefiSettings = new + { + secureBootEnabled = true, + vTpmEnabled = true, + }, + }, + serviceArtifactReference = new + { + id = "", + }, + }, + taskSlotsPerNode = 1234, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + resizeTimeout = "PT1H23M45S", + resourceTags = "", + targetDedicatedNodes = 1234, + targetLowPriorityNodes = 1234, + enableAutoScale = true, + autoScaleFormula = "", + autoScaleEvaluationInterval = "PT1H23M45S", + enableInterNodeCommunication = true, + networkConfiguration = new + { + subnetId = "", + dynamicVNetAssignmentScope = "none", + endpointConfiguration = new + { + inboundNATPools = new object[] + { +new +{ +name = "", +protocol = "tcp", +backendPort = 1234, +frontendPortRangeStart = 1234, +frontendPortRangeEnd = 1234, +networkSecurityGroupRules = new object[] +{ +new +{ +priority = 1234, +access = "allow", +sourceAddressPrefix = "", +sourcePortRanges = new object[] +{ +"" +}, +} +}, +} + }, + }, + publicIPAddressConfiguration = new + { + provision = "batchmanaged", + ipAddressIds = new object[] + { +"" + }, + }, + enableAcceleratedNetworking = true, + }, + startTask = new + { + commandLine = "", + resourceFiles = new object[] + { +null + }, + environmentSettings = new object[] + { +null + }, + maxTaskRetryCount = 1234, + waitForSuccess = true, + }, + applicationPackageReferences = new object[] + { +null + }, + userAccounts = new object[] + { +new +{ +name = "", +password = "", +elevationLevel = "nonadmin", +linuxUserConfiguration = new +{ +uid = 1234, +gid = 1234, +sshPrivateKey = "", +}, +windowsUserConfiguration = new +{ +loginMode = "batch", +}, +} + }, + metadata = new object[] + { +new +{ +name = "", +value = "", +} + }, + mountConfiguration = new object[] + { +new +{ +azureBlobFileSystemConfiguration = new +{ +accountName = "", +containerName = "", +accountKey = "", +sasKey = "", +blobfuseOptions = "", +relativeMountPath = "", +}, +nfsMountConfiguration = new +{ +source = "", +relativeMountPath = "", +mountOptions = "", +}, +cifsMountConfiguration = new +{ +username = "", +source = "", +relativeMountPath = "", +mountOptions = "", +password = "", +}, +azureFileShareConfiguration = new +{ +accountName = "", +azureFileUrl = "", +accountKey = "", +relativeMountPath = "", +mountOptions = "", +}, +} + }, + targetNodeCommunicationMode = "default", + upgradePolicy = new + { + mode = "automatic", + automaticOSUpgradePolicy = new + { + disableAutomaticRollback = true, + enableAutomaticOSUpgrade = true, + useRollingUpgradePolicy = true, + osRollingUpgradeDeferral = true, + }, + rollingUpgradePolicy = new + { + enableCrossZoneUpgrade = true, + maxBatchInstancePercent = 1234, + maxUnhealthyInstancePercent = 1234, + maxUnhealthyUpgradedInstancePercent = 1234, + pauseTimeBetweenBatches = "PT1H23M45S", + prioritizeUnhealthyInstances = true, + rollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, + }, + onAllTasksComplete = "noaction", + onTaskFailure = "noaction", + networkConfiguration = new + { + subnetId = "", + }, + metadata = new object[] + { +null + }, + }); + Response response = client.CreateJob(content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_CreateJob_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + id = "", + displayName = "", + usesTaskDependencies = true, + priority = 1234, + allowTaskPreemption = true, + maxParallelTasks = 1234, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + jobManagerTask = new + { + id = "", + displayName = "", + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + registry = new + { + username = "", + password = "", + registryServer = "", + identityReference = new + { + resourceId = "", + }, + }, + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { +new +{ +autoStorageContainerName = "", +storageContainerUrl = "", +httpUrl = "", +blobPrefix = "", +filePath = "", +fileMode = "", +} + }, + outputFiles = new object[] + { +new +{ +filePattern = "", +destination = new +{ +container = new +{ +path = "", +containerUrl = "", +uploadHeaders = new object[] +{ +new +{ +name = "", +value = "", +} +}, +}, +}, +uploadOptions = new +{ +uploadCondition = "tasksuccess", +}, +} + }, + environmentSettings = new object[] + { +new +{ +name = "", +value = "", +} + }, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + requiredSlots = 1234, + killJobOnCompletion = true, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + runExclusive = true, + applicationPackageReferences = new object[] + { +new +{ +applicationId = "", +version = "", +} + }, + authenticationTokenSettings = new + { + access = new object[] + { +"job" + }, + }, + allowLowPriorityNode = true, + }, + jobPreparationTask = new + { + id = "", + commandLine = "", + resourceFiles = new object[] + { +null + }, + environmentSettings = new object[] + { +null + }, + waitForSuccess = true, + rerunOnNodeRebootAfterSuccess = true, + }, + jobReleaseTask = new + { + id = "", + commandLine = "", + resourceFiles = new object[] + { +null + }, + environmentSettings = new object[] + { +null + }, + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + }, + commonEnvironmentSettings = new object[] + { +null + }, + poolInfo = new + { + poolId = "", + autoPoolSpecification = new + { + autoPoolIdPrefix = "", + poolLifetimeOption = "jobschedule", + keepAlive = true, + pool = new + { + displayName = "", + vmSize = "", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "", + offer = "", + sku = "", + version = "", + virtualMachineImageId = "", + }, + nodeAgentSKUId = "", + windowsConfiguration = new + { + enableAutomaticUpdates = true, + }, + dataDisks = new object[] + { +new +{ +lun = 1234, +caching = "none", +diskSizeGB = 1234, +storageAccountType = "standard_lrs", +} + }, + licenseType = "", + containerConfiguration = new + { + type = "dockerCompatible", + containerImageNames = new object[] + { +"" + }, + containerRegistries = new object[] + { +null + }, + }, + diskEncryptionConfiguration = new + { + targets = new object[] + { +"osdisk" + }, + }, + nodePlacementConfiguration = new + { + policy = "regional", + }, + extensions = new object[] + { +new +{ +name = "", +publisher = "", +type = "", +typeHandlerVersion = "", +autoUpgradeMinorVersion = true, +enableAutomaticUpgrade = true, +settings = new +{ +key = "", +}, +protectedSettings = new +{ +key = "", +}, +provisionAfterExtensions = new object[] +{ +"" +}, +} + }, + osDisk = new + { + ephemeralOSDiskSettings = new + { + placement = "cachedisk", + }, + caching = "none", + diskSizeGB = 1234, + managedDisk = new + { + storageAccountType = "standard_lrs", + }, + writeAcceleratorEnabled = true, + }, + securityProfile = new + { + encryptionAtHost = true, + securityType = "trustedLaunch", + uefiSettings = new + { + secureBootEnabled = true, + vTpmEnabled = true, + }, + }, + serviceArtifactReference = new + { + id = "", + }, + }, + taskSlotsPerNode = 1234, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + resizeTimeout = "PT1H23M45S", + resourceTags = "", + targetDedicatedNodes = 1234, + targetLowPriorityNodes = 1234, + enableAutoScale = true, + autoScaleFormula = "", + autoScaleEvaluationInterval = "PT1H23M45S", + enableInterNodeCommunication = true, + networkConfiguration = new + { + subnetId = "", + dynamicVNetAssignmentScope = "none", + endpointConfiguration = new + { + inboundNATPools = new object[] + { +new +{ +name = "", +protocol = "tcp", +backendPort = 1234, +frontendPortRangeStart = 1234, +frontendPortRangeEnd = 1234, +networkSecurityGroupRules = new object[] +{ +new +{ +priority = 1234, +access = "allow", +sourceAddressPrefix = "", +sourcePortRanges = new object[] +{ +"" +}, +} +}, +} + }, + }, + publicIPAddressConfiguration = new + { + provision = "batchmanaged", + ipAddressIds = new object[] + { +"" + }, + }, + enableAcceleratedNetworking = true, + }, + startTask = new + { + commandLine = "", + resourceFiles = new object[] + { +null + }, + environmentSettings = new object[] + { +null + }, + maxTaskRetryCount = 1234, + waitForSuccess = true, + }, + applicationPackageReferences = new object[] + { +null + }, + userAccounts = new object[] + { +new +{ +name = "", +password = "", +elevationLevel = "nonadmin", +linuxUserConfiguration = new +{ +uid = 1234, +gid = 1234, +sshPrivateKey = "", +}, +windowsUserConfiguration = new +{ +loginMode = "batch", +}, +} + }, + metadata = new object[] + { +new +{ +name = "", +value = "", +} + }, + mountConfiguration = new object[] + { +new +{ +azureBlobFileSystemConfiguration = new +{ +accountName = "", +containerName = "", +accountKey = "", +sasKey = "", +blobfuseOptions = "", +relativeMountPath = "", +}, +nfsMountConfiguration = new +{ +source = "", +relativeMountPath = "", +mountOptions = "", +}, +cifsMountConfiguration = new +{ +username = "", +source = "", +relativeMountPath = "", +mountOptions = "", +password = "", +}, +azureFileShareConfiguration = new +{ +accountName = "", +azureFileUrl = "", +accountKey = "", +relativeMountPath = "", +mountOptions = "", +}, +} + }, + targetNodeCommunicationMode = "default", + upgradePolicy = new + { + mode = "automatic", + automaticOSUpgradePolicy = new + { + disableAutomaticRollback = true, + enableAutomaticOSUpgrade = true, + useRollingUpgradePolicy = true, + osRollingUpgradeDeferral = true, + }, + rollingUpgradePolicy = new + { + enableCrossZoneUpgrade = true, + maxBatchInstancePercent = 1234, + maxUnhealthyInstancePercent = 1234, + maxUnhealthyUpgradedInstancePercent = 1234, + pauseTimeBetweenBatches = "PT1H23M45S", + prioritizeUnhealthyInstances = true, + rollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, + }, + onAllTasksComplete = "noaction", + onTaskFailure = "noaction", + networkConfiguration = new + { + subnetId = "", + }, + metadata = new object[] + { +null + }, + }); + Response response = await client.CreateJobAsync(content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_CreateJob_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchJobCreateContent job = new BatchJobCreateContent("", new BatchPoolInfo + { + PoolId = "", + AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.JobSchedule) + { + AutoPoolIdPrefix = "", + KeepAlive = true, + Pool = new BatchPoolSpecification("") + { + DisplayName = "", + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "", + Offer = "", + Sku = "", + Version = "", + VirtualMachineImageId = "", + }, "") + { + WindowsConfiguration = new WindowsConfiguration + { + EnableAutomaticUpdates = true, + }, + DataDisks = {new DataDisk(1234, 1234) +{ +Caching = CachingType.None, +StorageAccountType = StorageAccountType.StandardLRS, +}}, + LicenseType = "", + ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) + { + ContainerImageNames = { "" }, + ContainerRegistries = { default }, + }, + DiskEncryptionConfiguration = new DiskEncryptionConfiguration + { + Targets = { DiskEncryptionTarget.OsDisk }, + }, + NodePlacementConfiguration = new BatchNodePlacementConfiguration + { + Policy = BatchNodePlacementPolicyType.Regional, + }, + Extensions = {new VMExtension("", "", "") +{ +TypeHandlerVersion = "", +AutoUpgradeMinorVersion = true, +EnableAutomaticUpgrade = true, +Settings = +{ +["key"] = "" +}, +ProtectedSettings = +{ +["key"] = "" +}, +ProvisionAfterExtensions = {""}, +}}, + OsDisk = new OSDisk + { + EphemeralOSDiskSettings = new DiffDiskSettings + { + Placement = DiffDiskPlacement.CacheDisk, + }, + Caching = CachingType.None, + DiskSizeGB = 1234, + ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), + WriteAcceleratorEnabled = true, + }, + SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings + { + SecureBootEnabled = true, + VTpmEnabled = true, + }), + ServiceArtifactReference = new ServiceArtifactReference(""), + }, + TaskSlotsPerNode = 1234, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), + ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), + ResourceTags = "", + TargetDedicatedNodes = 1234, + TargetLowPriorityNodes = 1234, + EnableAutoScale = true, + AutoScaleFormula = "", + AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), + EnableInterNodeCommunication = true, + NetworkConfiguration = new NetworkConfiguration + { + SubnetId = "", + DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, + EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] + { +new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) +{ +NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") +{ +SourcePortRanges = {""}, +}}, +} + }), + PublicIpAddressConfiguration = new PublicIpAddressConfiguration + { + IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, + IpAddressIds = { "" }, + }, + EnableAcceleratedNetworking = true, + }, + StartTask = new BatchStartTask("") + { + ContainerSettings = default, + ResourceFiles = { default }, + EnvironmentSettings = { default }, + UserIdentity = default, + MaxTaskRetryCount = 1234, + WaitForSuccess = true, + }, + ApplicationPackageReferences = { default }, + UserAccounts = {new UserAccount("", "") +{ +ElevationLevel = ElevationLevel.NonAdmin, +LinuxUserConfiguration = new LinuxUserConfiguration +{ +Uid = 1234, +Gid = 1234, +SshPrivateKey = "", +}, +WindowsUserConfiguration = new WindowsUserConfiguration +{ +LoginMode = LoginMode.Batch, +}, +}}, + Metadata = { new MetadataItem("", "") }, + MountConfiguration = {new MountConfiguration +{ +AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") +{ +AccountKey = "", +SasKey = "", +BlobfuseOptions = "", +IdentityReference = default, +}, +NfsMountConfiguration = new NfsMountConfiguration("", "") +{ +MountOptions = "", +}, +CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") +{ +MountOptions = "", +}, +AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") +{ +MountOptions = "", +}, +}}, + TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, + UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) + { + AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy + { + DisableAutomaticRollback = true, + EnableAutomaticOsUpgrade = true, + UseRollingUpgradePolicy = true, + OsRollingUpgradeDeferral = true, + }, + RollingUpgradePolicy = new RollingUpgradePolicy + { + EnableCrossZoneUpgrade = true, + MaxBatchInstancePercent = 1234, + MaxUnhealthyInstancePercent = 1234, + MaxUnhealthyUpgradedInstancePercent = 1234, + PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), + PrioritizeUnhealthyInstances = true, + RollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, + }) + { + DisplayName = "", + UsesTaskDependencies = true, + Priority = 1234, + AllowTaskPreemption = true, + MaxParallelTasks = 1234, + Constraints = new BatchJobConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, + JobManagerTask = new BatchJobManagerTask("", "") + { + DisplayName = "", + ContainerSettings = new BatchTaskContainerSettings("") + { + ContainerRunOptions = "", + Registry = new ContainerRegistryReference + { + Username = "", + Password = "", + RegistryServer = "", + IdentityReference = new BatchNodeIdentityReference + { + ResourceId = "", + }, + }, + WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, + }, + ResourceFiles = {new ResourceFile +{ +AutoStorageContainerName = "", +StorageContainerUrl = "", +HttpUrl = "", +BlobPrefix = "", +FilePath = "", +FileMode = "", +IdentityReference = default, +}}, + OutputFiles = {new OutputFile("", new OutputFileDestination +{ +Container = new OutputFileBlobContainerDestination("") +{ +Path = "", +IdentityReference = default, +UploadHeaders = {new HttpHeader("") +{ +Value = "", +}}, +}, +}, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, + EnvironmentSettings = {new EnvironmentSetting("") +{ +Value = "", +}}, + Constraints = new BatchTaskConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, + RequiredSlots = 1234, + KillJobOnCompletion = true, + UserIdentity = new UserIdentity + { + Username = "", + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + RunExclusive = true, + ApplicationPackageReferences = {new BatchApplicationPackageReference("") +{ +Version = "", +}}, + AuthenticationTokenSettings = new AuthenticationTokenSettings + { + Access = { AccessScope.Job }, + }, + AllowLowPriorityNode = true, + }, + JobPreparationTask = new BatchJobPreparationTask("") + { + Id = "", + ContainerSettings = default, + ResourceFiles = { default }, + EnvironmentSettings = { default }, + Constraints = default, + WaitForSuccess = true, + UserIdentity = default, + RerunOnNodeRebootAfterSuccess = true, + }, + JobReleaseTask = new BatchJobReleaseTask("") + { + Id = "", + ContainerSettings = default, + ResourceFiles = { default }, + EnvironmentSettings = { default }, + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + UserIdentity = default, + }, + CommonEnvironmentSettings = { default }, + OnAllTasksComplete = OnAllBatchTasksComplete.NoAction, + OnTaskFailure = OnBatchTaskFailure.NoAction, + NetworkConfiguration = new BatchJobNetworkConfiguration(""), + Metadata = { default }, + }; + Response response = client.CreateJob(job, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_CreateJob_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchJobCreateContent job = new BatchJobCreateContent("", new BatchPoolInfo + { + PoolId = "", + AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.JobSchedule) + { + AutoPoolIdPrefix = "", + KeepAlive = true, + Pool = new BatchPoolSpecification("") + { + DisplayName = "", + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "", + Offer = "", + Sku = "", + Version = "", + VirtualMachineImageId = "", + }, "") + { + WindowsConfiguration = new WindowsConfiguration + { + EnableAutomaticUpdates = true, + }, + DataDisks = {new DataDisk(1234, 1234) +{ +Caching = CachingType.None, +StorageAccountType = StorageAccountType.StandardLRS, +}}, + LicenseType = "", + ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) + { + ContainerImageNames = { "" }, + ContainerRegistries = { default }, + }, + DiskEncryptionConfiguration = new DiskEncryptionConfiguration + { + Targets = { DiskEncryptionTarget.OsDisk }, + }, + NodePlacementConfiguration = new BatchNodePlacementConfiguration + { + Policy = BatchNodePlacementPolicyType.Regional, + }, + Extensions = {new VMExtension("", "", "") +{ +TypeHandlerVersion = "", +AutoUpgradeMinorVersion = true, +EnableAutomaticUpgrade = true, +Settings = +{ +["key"] = "" +}, +ProtectedSettings = +{ +["key"] = "" +}, +ProvisionAfterExtensions = {""}, +}}, + OsDisk = new OSDisk + { + EphemeralOSDiskSettings = new DiffDiskSettings + { + Placement = DiffDiskPlacement.CacheDisk, + }, + Caching = CachingType.None, + DiskSizeGB = 1234, + ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), + WriteAcceleratorEnabled = true, + }, + SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings + { + SecureBootEnabled = true, + VTpmEnabled = true, + }), + ServiceArtifactReference = new ServiceArtifactReference(""), + }, + TaskSlotsPerNode = 1234, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), + ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), + ResourceTags = "", + TargetDedicatedNodes = 1234, + TargetLowPriorityNodes = 1234, + EnableAutoScale = true, + AutoScaleFormula = "", + AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), + EnableInterNodeCommunication = true, + NetworkConfiguration = new NetworkConfiguration + { + SubnetId = "", + DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, + EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] + { +new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) +{ +NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") +{ +SourcePortRanges = {""}, +}}, +} + }), + PublicIpAddressConfiguration = new PublicIpAddressConfiguration + { + IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, + IpAddressIds = { "" }, + }, + EnableAcceleratedNetworking = true, + }, + StartTask = new BatchStartTask("") + { + ContainerSettings = default, + ResourceFiles = { default }, + EnvironmentSettings = { default }, + UserIdentity = default, + MaxTaskRetryCount = 1234, + WaitForSuccess = true, + }, + ApplicationPackageReferences = { default }, + UserAccounts = {new UserAccount("", "") +{ +ElevationLevel = ElevationLevel.NonAdmin, +LinuxUserConfiguration = new LinuxUserConfiguration +{ +Uid = 1234, +Gid = 1234, +SshPrivateKey = "", +}, +WindowsUserConfiguration = new WindowsUserConfiguration +{ +LoginMode = LoginMode.Batch, +}, +}}, + Metadata = { new MetadataItem("", "") }, + MountConfiguration = {new MountConfiguration +{ +AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") +{ +AccountKey = "", +SasKey = "", +BlobfuseOptions = "", +IdentityReference = default, +}, +NfsMountConfiguration = new NfsMountConfiguration("", "") +{ +MountOptions = "", +}, +CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") +{ +MountOptions = "", +}, +AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") +{ +MountOptions = "", +}, +}}, + TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, + UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) + { + AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy + { + DisableAutomaticRollback = true, + EnableAutomaticOsUpgrade = true, + UseRollingUpgradePolicy = true, + OsRollingUpgradeDeferral = true, + }, + RollingUpgradePolicy = new RollingUpgradePolicy + { + EnableCrossZoneUpgrade = true, + MaxBatchInstancePercent = 1234, + MaxUnhealthyInstancePercent = 1234, + MaxUnhealthyUpgradedInstancePercent = 1234, + PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), + PrioritizeUnhealthyInstances = true, + RollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, + }) + { + DisplayName = "", + UsesTaskDependencies = true, + Priority = 1234, + AllowTaskPreemption = true, + MaxParallelTasks = 1234, + Constraints = new BatchJobConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, + JobManagerTask = new BatchJobManagerTask("", "") + { + DisplayName = "", + ContainerSettings = new BatchTaskContainerSettings("") + { + ContainerRunOptions = "", + Registry = new ContainerRegistryReference + { + Username = "", + Password = "", + RegistryServer = "", + IdentityReference = new BatchNodeIdentityReference + { + ResourceId = "", + }, + }, + WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, + }, + ResourceFiles = {new ResourceFile +{ +AutoStorageContainerName = "", +StorageContainerUrl = "", +HttpUrl = "", +BlobPrefix = "", +FilePath = "", +FileMode = "", +IdentityReference = default, +}}, + OutputFiles = {new OutputFile("", new OutputFileDestination +{ +Container = new OutputFileBlobContainerDestination("") +{ +Path = "", +IdentityReference = default, +UploadHeaders = {new HttpHeader("") +{ +Value = "", +}}, +}, +}, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, + EnvironmentSettings = {new EnvironmentSetting("") +{ +Value = "", +}}, + Constraints = new BatchTaskConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, + RequiredSlots = 1234, + KillJobOnCompletion = true, + UserIdentity = new UserIdentity + { + Username = "", + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + RunExclusive = true, + ApplicationPackageReferences = {new BatchApplicationPackageReference("") +{ +Version = "", +}}, + AuthenticationTokenSettings = new AuthenticationTokenSettings + { + Access = { AccessScope.Job }, + }, + AllowLowPriorityNode = true, + }, + JobPreparationTask = new BatchJobPreparationTask("") + { + Id = "", + ContainerSettings = default, + ResourceFiles = { default }, + EnvironmentSettings = { default }, + Constraints = default, + WaitForSuccess = true, + UserIdentity = default, + RerunOnNodeRebootAfterSuccess = true, + }, + JobReleaseTask = new BatchJobReleaseTask("") + { + Id = "", + ContainerSettings = default, + ResourceFiles = { default }, + EnvironmentSettings = { default }, + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + UserIdentity = default, + }, + CommonEnvironmentSettings = { default }, + OnAllTasksComplete = OnAllBatchTasksComplete.NoAction, + OnTaskFailure = OnBatchTaskFailure.NoAction, + NetworkConfiguration = new BatchJobNetworkConfiguration(""), + Metadata = { default }, + }; + Response response = await client.CreateJobAsync(job, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetJobTaskCounts_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetJobTaskCounts("", null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("taskCounts").GetProperty("active").ToString()); + Console.WriteLine(result.GetProperty("taskCounts").GetProperty("running").ToString()); + Console.WriteLine(result.GetProperty("taskCounts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("taskCounts").GetProperty("succeeded").ToString()); + Console.WriteLine(result.GetProperty("taskCounts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("active").ToString()); + Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("running").ToString()); + Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("succeeded").ToString()); + Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("failed").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetJobTaskCounts_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.GetJobTaskCountsAsync("", null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("taskCounts").GetProperty("active").ToString()); + Console.WriteLine(result.GetProperty("taskCounts").GetProperty("running").ToString()); + Console.WriteLine(result.GetProperty("taskCounts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("taskCounts").GetProperty("succeeded").ToString()); + Console.WriteLine(result.GetProperty("taskCounts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("active").ToString()); + Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("running").ToString()); + Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("succeeded").ToString()); + Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("failed").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetJobTaskCounts_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetJobTaskCounts(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetJobTaskCounts_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.GetJobTaskCountsAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetJobTaskCounts_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetJobTaskCounts("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("taskCounts").GetProperty("active").ToString()); + Console.WriteLine(result.GetProperty("taskCounts").GetProperty("running").ToString()); + Console.WriteLine(result.GetProperty("taskCounts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("taskCounts").GetProperty("succeeded").ToString()); + Console.WriteLine(result.GetProperty("taskCounts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("active").ToString()); + Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("running").ToString()); + Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("succeeded").ToString()); + Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("failed").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetJobTaskCounts_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.GetJobTaskCountsAsync("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("taskCounts").GetProperty("active").ToString()); + Console.WriteLine(result.GetProperty("taskCounts").GetProperty("running").ToString()); + Console.WriteLine(result.GetProperty("taskCounts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("taskCounts").GetProperty("succeeded").ToString()); + Console.WriteLine(result.GetProperty("taskCounts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("active").ToString()); + Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("running").ToString()); + Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("succeeded").ToString()); + Console.WriteLine(result.GetProperty("taskSlotCounts").GetProperty("failed").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetJobTaskCounts_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetJobTaskCounts("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetJobTaskCounts_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.GetJobTaskCountsAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_DeleteJobSchedule_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.DeleteJobSchedule(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_DeleteJobSchedule_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.DeleteJobScheduleAsync(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_DeleteJobSchedule_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.DeleteJobSchedule("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_DeleteJobSchedule_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.DeleteJobScheduleAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetJobSchedule_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetJobSchedule("", null, null, null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetJobSchedule_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.GetJobScheduleAsync("", null, null, null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetJobSchedule_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetJobSchedule(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetJobSchedule_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.GetJobScheduleAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetJobSchedule_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetJobSchedule("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), new string[] { "" }, new string[] { "" }, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result.GetProperty("lastModified").ToString()); + Console.WriteLine(result.GetProperty("creationTime").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); + Console.WriteLine(result.GetProperty("previousState").ToString()); + Console.WriteLine(result.GetProperty("previousStateTransitionTime").ToString()); + Console.WriteLine(result.GetProperty("schedule").GetProperty("doNotRunUntil").ToString()); + Console.WriteLine(result.GetProperty("schedule").GetProperty("doNotRunAfter").ToString()); + Console.WriteLine(result.GetProperty("schedule").GetProperty("startWindow").ToString()); + Console.WriteLine(result.GetProperty("schedule").GetProperty("recurrenceInterval").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("priority").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("allowTaskPreemption").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("maxParallelTasks").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("usesTaskDependencies").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("onAllTasksComplete").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("onTaskFailure").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("filePattern").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("path").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("uploadOptions").GetProperty("uploadCondition").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("requiredSlots").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("killJobOnCompletion").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("runExclusive").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("authenticationTokenSettings").GetProperty("access")[0].ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("allowLowPriorityNode").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("waitForSuccess").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("rerunOnNodeRebootAfterSuccess").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("maxWallClockTime").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("retentionTime").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("commonEnvironmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("commonEnvironmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("poolId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("autoPoolIdPrefix").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("poolLifetimeOption").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("keepAlive").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("vmSize").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("publisher").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("offer").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("sku").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("exactVersion").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodeAgentSKUId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("windowsConfiguration").GetProperty("enableAutomaticUpdates").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("lun").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("caching").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("storageAccountType").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("licenseType").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerImageNames")[0].ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("diskEncryptionConfiguration").GetProperty("targets")[0].ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodePlacementConfiguration").GetProperty("policy").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("publisher").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("typeHandlerVersion").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("autoUpgradeMinorVersion").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("enableAutomaticUpgrade").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("settings").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("protectedSettings").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("provisionAfterExtensions")[0].ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("ephemeralOSDiskSettings").GetProperty("placement").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("caching").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("managedDisk").GetProperty("storageAccountType").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("writeAcceleratorEnabled").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("encryptionAtHost").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("securityType").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("secureBootEnabled").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("vTpmEnabled").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("serviceArtifactReference").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSlotsPerNode").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSchedulingPolicy").GetProperty("nodeFillType").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resizeTimeout").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resourceTags").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetDedicatedNodes").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetLowPriorityNodes").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableAutoScale").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleFormula").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleEvaluationInterval").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableInterNodeCommunication").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("dynamicVNetAssignmentScope").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("protocol").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("backendPort").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeStart").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeEnd").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("priority").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("access").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourceAddressPrefix").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourcePortRanges")[0].ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("provision").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("ipAddressIds")[0].ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("enableAcceleratedNetworking").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("waitForSuccess").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("uid").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("gid").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("sshPrivateKey").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("windowsUserConfiguration").GetProperty("loginMode").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("containerName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountKey").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("sasKey").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("blobfuseOptions").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("mountOptions").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("mountOptions").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("azureFileUrl").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountKey").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("mountOptions").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetNodeCommunicationMode").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("mode").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("disableAutomaticRollback").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("enableAutomaticOSUpgrade").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("useRollingUpgradePolicy").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("osRollingUpgradeDeferral").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("enableCrossZoneUpgrade").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxBatchInstancePercent").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyInstancePercent").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyUpgradedInstancePercent").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("pauseTimeBetweenBatches").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("prioritizeUnhealthyInstances").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("rollbackFailedInstancesOnPolicyBreach").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("metadata")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("metadata")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("nextRunTime").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("recentJob").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("recentJob").GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("lastUpdateTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("userCPUTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("kernelCPUTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("wallClockTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("readIOps").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOps").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("readIOGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("numSucceededTasks").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("numFailedTasks").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("numTaskRetries").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("waitTime").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetJobSchedule_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetJobSchedule("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), select: new string[] { "" }, expand: new string[] { "" }, requestConditions: null); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_UpdateJobSchedule_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new object()); + Response response = client.UpdateJobSchedule("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_UpdateJobSchedule_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.UpdateJobScheduleAsync("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_UpdateJobSchedule_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + schedule = new + { + doNotRunUntil = "2022-05-10T18:57:31.2311892Z", + doNotRunAfter = "2022-05-10T18:57:31.2311892Z", + startWindow = "PT1H23M45S", + recurrenceInterval = "PT1H23M45S", + }, + jobSpecification = new + { + priority = 1234, + allowTaskPreemption = true, + maxParallelTasks = 1234, + displayName = "", + usesTaskDependencies = true, + onAllTasksComplete = "noaction", + onTaskFailure = "noaction", + networkConfiguration = new + { + subnetId = "", + }, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + jobManagerTask = new + { + id = "", + displayName = "", + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + registry = new + { + username = "", + password = "", + registryServer = "", + identityReference = new + { + resourceId = "", + }, + }, + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { +new +{ +autoStorageContainerName = "", +storageContainerUrl = "", +httpUrl = "", +blobPrefix = "", +filePath = "", +fileMode = "", +} + }, + outputFiles = new object[] + { +new +{ +filePattern = "", +destination = new +{ +container = new +{ +path = "", +containerUrl = "", +uploadHeaders = new object[] +{ +new +{ +name = "", +value = "", +} +}, +}, +}, +uploadOptions = new +{ +uploadCondition = "tasksuccess", +}, +} + }, + environmentSettings = new object[] + { +new +{ +name = "", +value = "", +} + }, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + requiredSlots = 1234, + killJobOnCompletion = true, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + runExclusive = true, + applicationPackageReferences = new object[] + { +new +{ +applicationId = "", +version = "", +} + }, + authenticationTokenSettings = new + { + access = new object[] + { +"job" + }, + }, + allowLowPriorityNode = true, + }, + jobPreparationTask = new + { + id = "", + commandLine = "", + resourceFiles = new object[] + { +null + }, + environmentSettings = new object[] + { +null + }, + waitForSuccess = true, + rerunOnNodeRebootAfterSuccess = true, + }, + jobReleaseTask = new + { + id = "", + commandLine = "", + resourceFiles = new object[] + { +null + }, + environmentSettings = new object[] + { +null + }, + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + }, + commonEnvironmentSettings = new object[] + { +null + }, + poolInfo = new + { + poolId = "", + autoPoolSpecification = new + { + autoPoolIdPrefix = "", + poolLifetimeOption = "jobschedule", + keepAlive = true, + pool = new + { + displayName = "", + vmSize = "", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "", + offer = "", + sku = "", + version = "", + virtualMachineImageId = "", + }, + nodeAgentSKUId = "", + windowsConfiguration = new + { + enableAutomaticUpdates = true, + }, + dataDisks = new object[] + { +new +{ +lun = 1234, +caching = "none", +diskSizeGB = 1234, +storageAccountType = "standard_lrs", +} + }, + licenseType = "", + containerConfiguration = new + { + type = "dockerCompatible", + containerImageNames = new object[] + { +"" + }, + containerRegistries = new object[] + { +null + }, + }, + diskEncryptionConfiguration = new + { + targets = new object[] + { +"osdisk" + }, + }, + nodePlacementConfiguration = new + { + policy = "regional", + }, + extensions = new object[] + { +new +{ +name = "", +publisher = "", +type = "", +typeHandlerVersion = "", +autoUpgradeMinorVersion = true, +enableAutomaticUpgrade = true, +settings = new +{ +key = "", +}, +protectedSettings = new +{ +key = "", +}, +provisionAfterExtensions = new object[] +{ +"" +}, +} + }, + osDisk = new + { + ephemeralOSDiskSettings = new + { + placement = "cachedisk", + }, + caching = "none", + diskSizeGB = 1234, + managedDisk = new + { + storageAccountType = "standard_lrs", + }, + writeAcceleratorEnabled = true, + }, + securityProfile = new + { + encryptionAtHost = true, + securityType = "trustedLaunch", + uefiSettings = new + { + secureBootEnabled = true, + vTpmEnabled = true, + }, + }, + serviceArtifactReference = new + { + id = "", + }, + }, + taskSlotsPerNode = 1234, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + resizeTimeout = "PT1H23M45S", + resourceTags = "", + targetDedicatedNodes = 1234, + targetLowPriorityNodes = 1234, + enableAutoScale = true, + autoScaleFormula = "", + autoScaleEvaluationInterval = "PT1H23M45S", + enableInterNodeCommunication = true, + networkConfiguration = new + { + subnetId = "", + dynamicVNetAssignmentScope = "none", + endpointConfiguration = new + { + inboundNATPools = new object[] + { +new +{ +name = "", +protocol = "tcp", +backendPort = 1234, +frontendPortRangeStart = 1234, +frontendPortRangeEnd = 1234, +networkSecurityGroupRules = new object[] +{ +new +{ +priority = 1234, +access = "allow", +sourceAddressPrefix = "", +sourcePortRanges = new object[] +{ +"" +}, +} +}, +} + }, + }, + publicIPAddressConfiguration = new + { + provision = "batchmanaged", + ipAddressIds = new object[] + { +"" + }, + }, + enableAcceleratedNetworking = true, + }, + startTask = new + { + commandLine = "", + resourceFiles = new object[] + { +null + }, + environmentSettings = new object[] + { +null + }, + maxTaskRetryCount = 1234, + waitForSuccess = true, + }, + applicationPackageReferences = new object[] + { +null + }, + userAccounts = new object[] + { +new +{ +name = "", +password = "", +elevationLevel = "nonadmin", +linuxUserConfiguration = new +{ +uid = 1234, +gid = 1234, +sshPrivateKey = "", +}, +windowsUserConfiguration = new +{ +loginMode = "batch", +}, +} + }, + metadata = new object[] + { +new +{ +name = "", +value = "", +} + }, + mountConfiguration = new object[] + { +new +{ +azureBlobFileSystemConfiguration = new +{ +accountName = "", +containerName = "", +accountKey = "", +sasKey = "", +blobfuseOptions = "", +relativeMountPath = "", +}, +nfsMountConfiguration = new +{ +source = "", +relativeMountPath = "", +mountOptions = "", +}, +cifsMountConfiguration = new +{ +username = "", +source = "", +relativeMountPath = "", +mountOptions = "", +password = "", +}, +azureFileShareConfiguration = new +{ +accountName = "", +azureFileUrl = "", +accountKey = "", +relativeMountPath = "", +mountOptions = "", +}, +} + }, + targetNodeCommunicationMode = "default", + upgradePolicy = new + { + mode = "automatic", + automaticOSUpgradePolicy = new + { + disableAutomaticRollback = true, + enableAutomaticOSUpgrade = true, + useRollingUpgradePolicy = true, + osRollingUpgradeDeferral = true, + }, + rollingUpgradePolicy = new + { + enableCrossZoneUpgrade = true, + maxBatchInstancePercent = 1234, + maxUnhealthyInstancePercent = 1234, + maxUnhealthyUpgradedInstancePercent = 1234, + pauseTimeBetweenBatches = "PT1H23M45S", + prioritizeUnhealthyInstances = true, + rollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, + }, + metadata = new object[] + { +null + }, + }, + metadata = new object[] + { +null + }, + }); + Response response = client.UpdateJobSchedule("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_UpdateJobSchedule_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + schedule = new + { + doNotRunUntil = "2022-05-10T18:57:31.2311892Z", + doNotRunAfter = "2022-05-10T18:57:31.2311892Z", + startWindow = "PT1H23M45S", + recurrenceInterval = "PT1H23M45S", + }, + jobSpecification = new + { + priority = 1234, + allowTaskPreemption = true, + maxParallelTasks = 1234, + displayName = "", + usesTaskDependencies = true, + onAllTasksComplete = "noaction", + onTaskFailure = "noaction", + networkConfiguration = new + { + subnetId = "", + }, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + jobManagerTask = new + { + id = "", + displayName = "", + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + registry = new + { + username = "", + password = "", + registryServer = "", + identityReference = new + { + resourceId = "", + }, + }, + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { +new +{ +autoStorageContainerName = "", +storageContainerUrl = "", +httpUrl = "", +blobPrefix = "", +filePath = "", +fileMode = "", +} + }, + outputFiles = new object[] + { +new +{ +filePattern = "", +destination = new +{ +container = new +{ +path = "", +containerUrl = "", +uploadHeaders = new object[] +{ +new +{ +name = "", +value = "", +} +}, +}, +}, +uploadOptions = new +{ +uploadCondition = "tasksuccess", +}, +} + }, + environmentSettings = new object[] + { +new +{ +name = "", +value = "", +} + }, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + requiredSlots = 1234, + killJobOnCompletion = true, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + runExclusive = true, + applicationPackageReferences = new object[] + { +new +{ +applicationId = "", +version = "", +} + }, + authenticationTokenSettings = new + { + access = new object[] + { +"job" + }, + }, + allowLowPriorityNode = true, + }, + jobPreparationTask = new + { + id = "", + commandLine = "", + resourceFiles = new object[] + { +null + }, + environmentSettings = new object[] + { +null + }, + waitForSuccess = true, + rerunOnNodeRebootAfterSuccess = true, + }, + jobReleaseTask = new + { + id = "", + commandLine = "", + resourceFiles = new object[] + { +null + }, + environmentSettings = new object[] + { +null + }, + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + }, + commonEnvironmentSettings = new object[] + { +null + }, + poolInfo = new + { + poolId = "", + autoPoolSpecification = new + { + autoPoolIdPrefix = "", + poolLifetimeOption = "jobschedule", + keepAlive = true, + pool = new + { + displayName = "", + vmSize = "", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "", + offer = "", + sku = "", + version = "", + virtualMachineImageId = "", + }, + nodeAgentSKUId = "", + windowsConfiguration = new + { + enableAutomaticUpdates = true, + }, + dataDisks = new object[] + { +new +{ +lun = 1234, +caching = "none", +diskSizeGB = 1234, +storageAccountType = "standard_lrs", +} + }, + licenseType = "", + containerConfiguration = new + { + type = "dockerCompatible", + containerImageNames = new object[] + { +"" + }, + containerRegistries = new object[] + { +null + }, + }, + diskEncryptionConfiguration = new + { + targets = new object[] + { +"osdisk" + }, + }, + nodePlacementConfiguration = new + { + policy = "regional", + }, + extensions = new object[] + { +new +{ +name = "", +publisher = "", +type = "", +typeHandlerVersion = "", +autoUpgradeMinorVersion = true, +enableAutomaticUpgrade = true, +settings = new +{ +key = "", +}, +protectedSettings = new +{ +key = "", +}, +provisionAfterExtensions = new object[] +{ +"" +}, +} + }, + osDisk = new + { + ephemeralOSDiskSettings = new + { + placement = "cachedisk", + }, + caching = "none", + diskSizeGB = 1234, + managedDisk = new + { + storageAccountType = "standard_lrs", + }, + writeAcceleratorEnabled = true, + }, + securityProfile = new + { + encryptionAtHost = true, + securityType = "trustedLaunch", + uefiSettings = new + { + secureBootEnabled = true, + vTpmEnabled = true, + }, + }, + serviceArtifactReference = new + { + id = "", + }, + }, + taskSlotsPerNode = 1234, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + resizeTimeout = "PT1H23M45S", + resourceTags = "", + targetDedicatedNodes = 1234, + targetLowPriorityNodes = 1234, + enableAutoScale = true, + autoScaleFormula = "", + autoScaleEvaluationInterval = "PT1H23M45S", + enableInterNodeCommunication = true, + networkConfiguration = new + { + subnetId = "", + dynamicVNetAssignmentScope = "none", + endpointConfiguration = new + { + inboundNATPools = new object[] + { +new +{ +name = "", +protocol = "tcp", +backendPort = 1234, +frontendPortRangeStart = 1234, +frontendPortRangeEnd = 1234, +networkSecurityGroupRules = new object[] +{ +new +{ +priority = 1234, +access = "allow", +sourceAddressPrefix = "", +sourcePortRanges = new object[] +{ +"" +}, +} +}, +} + }, + }, + publicIPAddressConfiguration = new + { + provision = "batchmanaged", + ipAddressIds = new object[] + { +"" + }, + }, + enableAcceleratedNetworking = true, + }, + startTask = new + { + commandLine = "", + resourceFiles = new object[] + { +null + }, + environmentSettings = new object[] + { +null + }, + maxTaskRetryCount = 1234, + waitForSuccess = true, + }, + applicationPackageReferences = new object[] + { +null + }, + userAccounts = new object[] + { +new +{ +name = "", +password = "", +elevationLevel = "nonadmin", +linuxUserConfiguration = new +{ +uid = 1234, +gid = 1234, +sshPrivateKey = "", +}, +windowsUserConfiguration = new +{ +loginMode = "batch", +}, +} + }, + metadata = new object[] + { +new +{ +name = "", +value = "", +} + }, + mountConfiguration = new object[] + { +new +{ +azureBlobFileSystemConfiguration = new +{ +accountName = "", +containerName = "", +accountKey = "", +sasKey = "", +blobfuseOptions = "", +relativeMountPath = "", +}, +nfsMountConfiguration = new +{ +source = "", +relativeMountPath = "", +mountOptions = "", +}, +cifsMountConfiguration = new +{ +username = "", +source = "", +relativeMountPath = "", +mountOptions = "", +password = "", +}, +azureFileShareConfiguration = new +{ +accountName = "", +azureFileUrl = "", +accountKey = "", +relativeMountPath = "", +mountOptions = "", +}, +} + }, + targetNodeCommunicationMode = "default", + upgradePolicy = new + { + mode = "automatic", + automaticOSUpgradePolicy = new + { + disableAutomaticRollback = true, + enableAutomaticOSUpgrade = true, + useRollingUpgradePolicy = true, + osRollingUpgradeDeferral = true, + }, + rollingUpgradePolicy = new + { + enableCrossZoneUpgrade = true, + maxBatchInstancePercent = 1234, + maxUnhealthyInstancePercent = 1234, + maxUnhealthyUpgradedInstancePercent = 1234, + pauseTimeBetweenBatches = "PT1H23M45S", + prioritizeUnhealthyInstances = true, + rollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, + }, + metadata = new object[] + { +null + }, + }, + metadata = new object[] + { +null + }, + }); + Response response = await client.UpdateJobScheduleAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_ReplaceJobSchedule_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + jobSpecification = new + { + poolInfo = new object(), + }, + }); + Response response = client.ReplaceJobSchedule("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_ReplaceJobSchedule_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + jobSpecification = new + { + poolInfo = new object(), + }, + }); + Response response = await client.ReplaceJobScheduleAsync("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_ReplaceJobSchedule_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchJobSchedule jobSchedule = new BatchJobSchedule(new BatchJobSpecification(new BatchPoolInfo())); + Response response = client.ReplaceJobSchedule("", jobSchedule); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_ReplaceJobSchedule_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchJobSchedule jobSchedule = new BatchJobSchedule(new BatchJobSpecification(new BatchPoolInfo())); + Response response = await client.ReplaceJobScheduleAsync("", jobSchedule); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_ReplaceJobSchedule_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + schedule = new + { + doNotRunUntil = "2022-05-10T18:57:31.2311892Z", + doNotRunAfter = "2022-05-10T18:57:31.2311892Z", + startWindow = "PT1H23M45S", + recurrenceInterval = "PT1H23M45S", + }, + jobSpecification = new + { + priority = 1234, + allowTaskPreemption = true, + maxParallelTasks = 1234, + displayName = "", + usesTaskDependencies = true, + onAllTasksComplete = "noaction", + onTaskFailure = "noaction", + networkConfiguration = new + { + subnetId = "", + }, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + jobManagerTask = new + { + id = "", + displayName = "", + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + registry = new + { + username = "", + password = "", + registryServer = "", + identityReference = new + { + resourceId = "", + }, + }, + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { +new +{ +autoStorageContainerName = "", +storageContainerUrl = "", +httpUrl = "", +blobPrefix = "", +filePath = "", +fileMode = "", +} + }, + outputFiles = new object[] + { +new +{ +filePattern = "", +destination = new +{ +container = new +{ +path = "", +containerUrl = "", +uploadHeaders = new object[] +{ +new +{ +name = "", +value = "", +} +}, +}, +}, +uploadOptions = new +{ +uploadCondition = "tasksuccess", +}, +} + }, + environmentSettings = new object[] + { +new +{ +name = "", +value = "", +} + }, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + requiredSlots = 1234, + killJobOnCompletion = true, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + runExclusive = true, + applicationPackageReferences = new object[] + { +new +{ +applicationId = "", +version = "", +} + }, + authenticationTokenSettings = new + { + access = new object[] + { +"job" + }, + }, + allowLowPriorityNode = true, + }, + jobPreparationTask = new + { + id = "", + commandLine = "", + resourceFiles = new object[] + { +null + }, + environmentSettings = new object[] + { +null + }, + waitForSuccess = true, + rerunOnNodeRebootAfterSuccess = true, + }, + jobReleaseTask = new + { + id = "", + commandLine = "", + resourceFiles = new object[] + { +null + }, + environmentSettings = new object[] + { +null + }, + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + }, + commonEnvironmentSettings = new object[] + { +null + }, + poolInfo = new + { + poolId = "", + autoPoolSpecification = new + { + autoPoolIdPrefix = "", + poolLifetimeOption = "jobschedule", + keepAlive = true, + pool = new + { + displayName = "", + vmSize = "", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "", + offer = "", + sku = "", + version = "", + virtualMachineImageId = "", + }, + nodeAgentSKUId = "", + windowsConfiguration = new + { + enableAutomaticUpdates = true, + }, + dataDisks = new object[] + { +new +{ +lun = 1234, +caching = "none", +diskSizeGB = 1234, +storageAccountType = "standard_lrs", +} + }, + licenseType = "", + containerConfiguration = new + { + type = "dockerCompatible", + containerImageNames = new object[] + { +"" + }, + containerRegistries = new object[] + { +null + }, + }, + diskEncryptionConfiguration = new + { + targets = new object[] + { +"osdisk" + }, + }, + nodePlacementConfiguration = new + { + policy = "regional", + }, + extensions = new object[] + { +new +{ +name = "", +publisher = "", +type = "", +typeHandlerVersion = "", +autoUpgradeMinorVersion = true, +enableAutomaticUpgrade = true, +settings = new +{ +key = "", +}, +protectedSettings = new +{ +key = "", +}, +provisionAfterExtensions = new object[] +{ +"" +}, +} + }, + osDisk = new + { + ephemeralOSDiskSettings = new + { + placement = "cachedisk", + }, + caching = "none", + diskSizeGB = 1234, + managedDisk = new + { + storageAccountType = "standard_lrs", + }, + writeAcceleratorEnabled = true, + }, + securityProfile = new + { + encryptionAtHost = true, + securityType = "trustedLaunch", + uefiSettings = new + { + secureBootEnabled = true, + vTpmEnabled = true, + }, + }, + serviceArtifactReference = new + { + id = "", + }, + }, + taskSlotsPerNode = 1234, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + resizeTimeout = "PT1H23M45S", + resourceTags = "", + targetDedicatedNodes = 1234, + targetLowPriorityNodes = 1234, + enableAutoScale = true, + autoScaleFormula = "", + autoScaleEvaluationInterval = "PT1H23M45S", + enableInterNodeCommunication = true, + networkConfiguration = new + { + subnetId = "", + dynamicVNetAssignmentScope = "none", + endpointConfiguration = new + { + inboundNATPools = new object[] + { +new +{ +name = "", +protocol = "tcp", +backendPort = 1234, +frontendPortRangeStart = 1234, +frontendPortRangeEnd = 1234, +networkSecurityGroupRules = new object[] +{ +new +{ +priority = 1234, +access = "allow", +sourceAddressPrefix = "", +sourcePortRanges = new object[] +{ +"" +}, +} +}, +} + }, + }, + publicIPAddressConfiguration = new + { + provision = "batchmanaged", + ipAddressIds = new object[] + { +"" + }, + }, + enableAcceleratedNetworking = true, + }, + startTask = new + { + commandLine = "", + resourceFiles = new object[] + { +null + }, + environmentSettings = new object[] + { +null + }, + maxTaskRetryCount = 1234, + waitForSuccess = true, + }, + applicationPackageReferences = new object[] + { +null + }, + userAccounts = new object[] + { +new +{ +name = "", +password = "", +elevationLevel = "nonadmin", +linuxUserConfiguration = new +{ +uid = 1234, +gid = 1234, +sshPrivateKey = "", +}, +windowsUserConfiguration = new +{ +loginMode = "batch", +}, +} + }, + metadata = new object[] + { +new +{ +name = "", +value = "", +} + }, + mountConfiguration = new object[] + { +new +{ +azureBlobFileSystemConfiguration = new +{ +accountName = "", +containerName = "", +accountKey = "", +sasKey = "", +blobfuseOptions = "", +relativeMountPath = "", +}, +nfsMountConfiguration = new +{ +source = "", +relativeMountPath = "", +mountOptions = "", +}, +cifsMountConfiguration = new +{ +username = "", +source = "", +relativeMountPath = "", +mountOptions = "", +password = "", +}, +azureFileShareConfiguration = new +{ +accountName = "", +azureFileUrl = "", +accountKey = "", +relativeMountPath = "", +mountOptions = "", +}, +} + }, + targetNodeCommunicationMode = "default", + upgradePolicy = new + { + mode = "automatic", + automaticOSUpgradePolicy = new + { + disableAutomaticRollback = true, + enableAutomaticOSUpgrade = true, + useRollingUpgradePolicy = true, + osRollingUpgradeDeferral = true, + }, + rollingUpgradePolicy = new + { + enableCrossZoneUpgrade = true, + maxBatchInstancePercent = 1234, + maxUnhealthyInstancePercent = 1234, + maxUnhealthyUpgradedInstancePercent = 1234, + pauseTimeBetweenBatches = "PT1H23M45S", + prioritizeUnhealthyInstances = true, + rollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, + }, + metadata = new object[] + { +null + }, + }, + metadata = new object[] + { +null + }, + }); + Response response = client.ReplaceJobSchedule("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_ReplaceJobSchedule_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + schedule = new + { + doNotRunUntil = "2022-05-10T18:57:31.2311892Z", + doNotRunAfter = "2022-05-10T18:57:31.2311892Z", + startWindow = "PT1H23M45S", + recurrenceInterval = "PT1H23M45S", + }, + jobSpecification = new + { + priority = 1234, + allowTaskPreemption = true, + maxParallelTasks = 1234, + displayName = "", + usesTaskDependencies = true, + onAllTasksComplete = "noaction", + onTaskFailure = "noaction", + networkConfiguration = new + { + subnetId = "", + }, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + jobManagerTask = new + { + id = "", + displayName = "", + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + registry = new + { + username = "", + password = "", + registryServer = "", + identityReference = new + { + resourceId = "", + }, + }, + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { +new +{ +autoStorageContainerName = "", +storageContainerUrl = "", +httpUrl = "", +blobPrefix = "", +filePath = "", +fileMode = "", +} + }, + outputFiles = new object[] + { +new +{ +filePattern = "", +destination = new +{ +container = new +{ +path = "", +containerUrl = "", +uploadHeaders = new object[] +{ +new +{ +name = "", +value = "", +} +}, +}, +}, +uploadOptions = new +{ +uploadCondition = "tasksuccess", +}, +} + }, + environmentSettings = new object[] + { +new +{ +name = "", +value = "", +} + }, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + requiredSlots = 1234, + killJobOnCompletion = true, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + runExclusive = true, + applicationPackageReferences = new object[] + { +new +{ +applicationId = "", +version = "", +} + }, + authenticationTokenSettings = new + { + access = new object[] + { +"job" + }, + }, + allowLowPriorityNode = true, + }, + jobPreparationTask = new + { + id = "", + commandLine = "", + resourceFiles = new object[] + { +null + }, + environmentSettings = new object[] + { +null + }, + waitForSuccess = true, + rerunOnNodeRebootAfterSuccess = true, + }, + jobReleaseTask = new + { + id = "", + commandLine = "", + resourceFiles = new object[] + { +null + }, + environmentSettings = new object[] + { +null + }, + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + }, + commonEnvironmentSettings = new object[] + { +null + }, + poolInfo = new + { + poolId = "", + autoPoolSpecification = new + { + autoPoolIdPrefix = "", + poolLifetimeOption = "jobschedule", + keepAlive = true, + pool = new + { + displayName = "", + vmSize = "", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "", + offer = "", + sku = "", + version = "", + virtualMachineImageId = "", + }, + nodeAgentSKUId = "", + windowsConfiguration = new + { + enableAutomaticUpdates = true, + }, + dataDisks = new object[] + { +new +{ +lun = 1234, +caching = "none", +diskSizeGB = 1234, +storageAccountType = "standard_lrs", +} + }, + licenseType = "", + containerConfiguration = new + { + type = "dockerCompatible", + containerImageNames = new object[] + { +"" + }, + containerRegistries = new object[] + { +null + }, + }, + diskEncryptionConfiguration = new + { + targets = new object[] + { +"osdisk" + }, + }, + nodePlacementConfiguration = new + { + policy = "regional", + }, + extensions = new object[] + { +new +{ +name = "", +publisher = "", +type = "", +typeHandlerVersion = "", +autoUpgradeMinorVersion = true, +enableAutomaticUpgrade = true, +settings = new +{ +key = "", +}, +protectedSettings = new +{ +key = "", +}, +provisionAfterExtensions = new object[] +{ +"" +}, +} + }, + osDisk = new + { + ephemeralOSDiskSettings = new + { + placement = "cachedisk", + }, + caching = "none", + diskSizeGB = 1234, + managedDisk = new + { + storageAccountType = "standard_lrs", + }, + writeAcceleratorEnabled = true, + }, + securityProfile = new + { + encryptionAtHost = true, + securityType = "trustedLaunch", + uefiSettings = new + { + secureBootEnabled = true, + vTpmEnabled = true, + }, + }, + serviceArtifactReference = new + { + id = "", + }, + }, + taskSlotsPerNode = 1234, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + resizeTimeout = "PT1H23M45S", + resourceTags = "", + targetDedicatedNodes = 1234, + targetLowPriorityNodes = 1234, + enableAutoScale = true, + autoScaleFormula = "", + autoScaleEvaluationInterval = "PT1H23M45S", + enableInterNodeCommunication = true, + networkConfiguration = new + { + subnetId = "", + dynamicVNetAssignmentScope = "none", + endpointConfiguration = new + { + inboundNATPools = new object[] + { +new +{ +name = "", +protocol = "tcp", +backendPort = 1234, +frontendPortRangeStart = 1234, +frontendPortRangeEnd = 1234, +networkSecurityGroupRules = new object[] +{ +new +{ +priority = 1234, +access = "allow", +sourceAddressPrefix = "", +sourcePortRanges = new object[] +{ +"" +}, +} +}, +} + }, + }, + publicIPAddressConfiguration = new + { + provision = "batchmanaged", + ipAddressIds = new object[] + { +"" + }, + }, + enableAcceleratedNetworking = true, + }, + startTask = new + { + commandLine = "", + resourceFiles = new object[] + { +null + }, + environmentSettings = new object[] + { +null + }, + maxTaskRetryCount = 1234, + waitForSuccess = true, + }, + applicationPackageReferences = new object[] + { +null + }, + userAccounts = new object[] + { +new +{ +name = "", +password = "", +elevationLevel = "nonadmin", +linuxUserConfiguration = new +{ +uid = 1234, +gid = 1234, +sshPrivateKey = "", +}, +windowsUserConfiguration = new +{ +loginMode = "batch", +}, +} + }, + metadata = new object[] + { +new +{ +name = "", +value = "", +} + }, + mountConfiguration = new object[] + { +new +{ +azureBlobFileSystemConfiguration = new +{ +accountName = "", +containerName = "", +accountKey = "", +sasKey = "", +blobfuseOptions = "", +relativeMountPath = "", +}, +nfsMountConfiguration = new +{ +source = "", +relativeMountPath = "", +mountOptions = "", +}, +cifsMountConfiguration = new +{ +username = "", +source = "", +relativeMountPath = "", +mountOptions = "", +password = "", +}, +azureFileShareConfiguration = new +{ +accountName = "", +azureFileUrl = "", +accountKey = "", +relativeMountPath = "", +mountOptions = "", +}, +} + }, + targetNodeCommunicationMode = "default", + upgradePolicy = new + { + mode = "automatic", + automaticOSUpgradePolicy = new + { + disableAutomaticRollback = true, + enableAutomaticOSUpgrade = true, + useRollingUpgradePolicy = true, + osRollingUpgradeDeferral = true, + }, + rollingUpgradePolicy = new + { + enableCrossZoneUpgrade = true, + maxBatchInstancePercent = 1234, + maxUnhealthyInstancePercent = 1234, + maxUnhealthyUpgradedInstancePercent = 1234, + pauseTimeBetweenBatches = "PT1H23M45S", + prioritizeUnhealthyInstances = true, + rollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, + }, + metadata = new object[] + { +null + }, + }, + metadata = new object[] + { +null + }, + }); + Response response = await client.ReplaceJobScheduleAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_ReplaceJobSchedule_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchJobSchedule jobSchedule = new BatchJobSchedule(new BatchJobSpecification(new BatchPoolInfo + { + PoolId = "", + AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.JobSchedule) + { + AutoPoolIdPrefix = "", + KeepAlive = true, + Pool = new BatchPoolSpecification("") + { + DisplayName = "", + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "", + Offer = "", + Sku = "", + Version = "", + VirtualMachineImageId = "", + }, "") + { + WindowsConfiguration = new WindowsConfiguration + { + EnableAutomaticUpdates = true, + }, + DataDisks = {new DataDisk(1234, 1234) +{ +Caching = CachingType.None, +StorageAccountType = StorageAccountType.StandardLRS, +}}, + LicenseType = "", + ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) + { + ContainerImageNames = { "" }, + ContainerRegistries = { default }, + }, + DiskEncryptionConfiguration = new DiskEncryptionConfiguration + { + Targets = { DiskEncryptionTarget.OsDisk }, + }, + NodePlacementConfiguration = new BatchNodePlacementConfiguration + { + Policy = BatchNodePlacementPolicyType.Regional, + }, + Extensions = {new VMExtension("", "", "") +{ +TypeHandlerVersion = "", +AutoUpgradeMinorVersion = true, +EnableAutomaticUpgrade = true, +Settings = +{ +["key"] = "" +}, +ProtectedSettings = +{ +["key"] = "" +}, +ProvisionAfterExtensions = {""}, +}}, + OsDisk = new OSDisk + { + EphemeralOSDiskSettings = new DiffDiskSettings + { + Placement = DiffDiskPlacement.CacheDisk, + }, + Caching = CachingType.None, + DiskSizeGB = 1234, + ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), + WriteAcceleratorEnabled = true, + }, + SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings + { + SecureBootEnabled = true, + VTpmEnabled = true, + }), + ServiceArtifactReference = new ServiceArtifactReference(""), + }, + TaskSlotsPerNode = 1234, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), + ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), + ResourceTags = "", + TargetDedicatedNodes = 1234, + TargetLowPriorityNodes = 1234, + EnableAutoScale = true, + AutoScaleFormula = "", + AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), + EnableInterNodeCommunication = true, + NetworkConfiguration = new NetworkConfiguration + { + SubnetId = "", + DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, + EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] + { +new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) +{ +NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") +{ +SourcePortRanges = {""}, +}}, +} + }), + PublicIpAddressConfiguration = new PublicIpAddressConfiguration + { + IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, + IpAddressIds = { "" }, + }, + EnableAcceleratedNetworking = true, + }, + StartTask = new BatchStartTask("") + { + ContainerSettings = default, + ResourceFiles = { default }, + EnvironmentSettings = { default }, + UserIdentity = default, + MaxTaskRetryCount = 1234, + WaitForSuccess = true, + }, + ApplicationPackageReferences = { default }, + UserAccounts = {new UserAccount("", "") +{ +ElevationLevel = ElevationLevel.NonAdmin, +LinuxUserConfiguration = new LinuxUserConfiguration +{ +Uid = 1234, +Gid = 1234, +SshPrivateKey = "", +}, +WindowsUserConfiguration = new WindowsUserConfiguration +{ +LoginMode = LoginMode.Batch, +}, +}}, + Metadata = { new MetadataItem("", "") }, + MountConfiguration = {new MountConfiguration +{ +AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") +{ +AccountKey = "", +SasKey = "", +BlobfuseOptions = "", +IdentityReference = default, +}, +NfsMountConfiguration = new NfsMountConfiguration("", "") +{ +MountOptions = "", +}, +CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") +{ +MountOptions = "", +}, +AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") +{ +MountOptions = "", +}, +}}, + TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, + UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) + { + AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy + { + DisableAutomaticRollback = true, + EnableAutomaticOsUpgrade = true, + UseRollingUpgradePolicy = true, + OsRollingUpgradeDeferral = true, + }, + RollingUpgradePolicy = new RollingUpgradePolicy + { + EnableCrossZoneUpgrade = true, + MaxBatchInstancePercent = 1234, + MaxUnhealthyInstancePercent = 1234, + MaxUnhealthyUpgradedInstancePercent = 1234, + PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), + PrioritizeUnhealthyInstances = true, + RollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, + }) + { + Priority = 1234, + AllowTaskPreemption = true, + MaxParallelTasks = 1234, + DisplayName = "", + UsesTaskDependencies = true, + OnAllTasksComplete = OnAllBatchTasksComplete.NoAction, + OnTaskFailure = OnBatchTaskFailure.NoAction, + NetworkConfiguration = new BatchJobNetworkConfiguration(""), + Constraints = new BatchJobConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, + JobManagerTask = new BatchJobManagerTask("", "") + { + DisplayName = "", + ContainerSettings = new BatchTaskContainerSettings("") + { + ContainerRunOptions = "", + Registry = new ContainerRegistryReference + { + Username = "", + Password = "", + RegistryServer = "", + IdentityReference = new BatchNodeIdentityReference + { + ResourceId = "", + }, + }, + WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, + }, + ResourceFiles = {new ResourceFile +{ +AutoStorageContainerName = "", +StorageContainerUrl = "", +HttpUrl = "", +BlobPrefix = "", +FilePath = "", +FileMode = "", +IdentityReference = default, +}}, + OutputFiles = {new OutputFile("", new OutputFileDestination +{ +Container = new OutputFileBlobContainerDestination("") +{ +Path = "", +IdentityReference = default, +UploadHeaders = {new HttpHeader("") +{ +Value = "", +}}, +}, +}, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, + EnvironmentSettings = {new EnvironmentSetting("") +{ +Value = "", +}}, + Constraints = new BatchTaskConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, + RequiredSlots = 1234, + KillJobOnCompletion = true, + UserIdentity = new UserIdentity + { + Username = "", + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + RunExclusive = true, + ApplicationPackageReferences = {new BatchApplicationPackageReference("") +{ +Version = "", +}}, + AuthenticationTokenSettings = new AuthenticationTokenSettings + { + Access = { AccessScope.Job }, + }, + AllowLowPriorityNode = true, + }, + JobPreparationTask = new BatchJobPreparationTask("") + { + Id = "", + ContainerSettings = default, + ResourceFiles = { default }, + EnvironmentSettings = { default }, + Constraints = default, + WaitForSuccess = true, + UserIdentity = default, + RerunOnNodeRebootAfterSuccess = true, + }, + JobReleaseTask = new BatchJobReleaseTask("") + { + Id = "", + ContainerSettings = default, + ResourceFiles = { default }, + EnvironmentSettings = { default }, + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + UserIdentity = default, + }, + CommonEnvironmentSettings = { default }, + Metadata = { default }, + }) + { + Schedule = new BatchJobScheduleConfiguration + { + DoNotRunUntil = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + DoNotRunAfter = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + StartWindow = XmlConvert.ToTimeSpan("PT1H23M45S"), + RecurrenceInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), + }, + Metadata = { default }, + }; + Response response = client.ReplaceJobSchedule("", jobSchedule, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_ReplaceJobSchedule_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchJobSchedule jobSchedule = new BatchJobSchedule(new BatchJobSpecification(new BatchPoolInfo + { + PoolId = "", + AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.JobSchedule) + { + AutoPoolIdPrefix = "", + KeepAlive = true, + Pool = new BatchPoolSpecification("") + { + DisplayName = "", + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "", + Offer = "", + Sku = "", + Version = "", + VirtualMachineImageId = "", + }, "") + { + WindowsConfiguration = new WindowsConfiguration + { + EnableAutomaticUpdates = true, + }, + DataDisks = {new DataDisk(1234, 1234) +{ +Caching = CachingType.None, +StorageAccountType = StorageAccountType.StandardLRS, +}}, + LicenseType = "", + ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) + { + ContainerImageNames = { "" }, + ContainerRegistries = { default }, + }, + DiskEncryptionConfiguration = new DiskEncryptionConfiguration + { + Targets = { DiskEncryptionTarget.OsDisk }, + }, + NodePlacementConfiguration = new BatchNodePlacementConfiguration + { + Policy = BatchNodePlacementPolicyType.Regional, + }, + Extensions = {new VMExtension("", "", "") +{ +TypeHandlerVersion = "", +AutoUpgradeMinorVersion = true, +EnableAutomaticUpgrade = true, +Settings = +{ +["key"] = "" +}, +ProtectedSettings = +{ +["key"] = "" +}, +ProvisionAfterExtensions = {""}, +}}, + OsDisk = new OSDisk + { + EphemeralOSDiskSettings = new DiffDiskSettings + { + Placement = DiffDiskPlacement.CacheDisk, + }, + Caching = CachingType.None, + DiskSizeGB = 1234, + ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), + WriteAcceleratorEnabled = true, + }, + SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings + { + SecureBootEnabled = true, + VTpmEnabled = true, + }), + ServiceArtifactReference = new ServiceArtifactReference(""), + }, + TaskSlotsPerNode = 1234, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), + ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), + ResourceTags = "", + TargetDedicatedNodes = 1234, + TargetLowPriorityNodes = 1234, + EnableAutoScale = true, + AutoScaleFormula = "", + AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), + EnableInterNodeCommunication = true, + NetworkConfiguration = new NetworkConfiguration + { + SubnetId = "", + DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, + EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] + { +new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) +{ +NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") +{ +SourcePortRanges = {""}, +}}, +} + }), + PublicIpAddressConfiguration = new PublicIpAddressConfiguration + { + IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, + IpAddressIds = { "" }, + }, + EnableAcceleratedNetworking = true, + }, + StartTask = new BatchStartTask("") + { + ContainerSettings = default, + ResourceFiles = { default }, + EnvironmentSettings = { default }, + UserIdentity = default, + MaxTaskRetryCount = 1234, + WaitForSuccess = true, + }, + ApplicationPackageReferences = { default }, + UserAccounts = {new UserAccount("", "") +{ +ElevationLevel = ElevationLevel.NonAdmin, +LinuxUserConfiguration = new LinuxUserConfiguration +{ +Uid = 1234, +Gid = 1234, +SshPrivateKey = "", +}, +WindowsUserConfiguration = new WindowsUserConfiguration +{ +LoginMode = LoginMode.Batch, +}, +}}, + Metadata = { new MetadataItem("", "") }, + MountConfiguration = {new MountConfiguration +{ +AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") +{ +AccountKey = "", +SasKey = "", +BlobfuseOptions = "", +IdentityReference = default, +}, +NfsMountConfiguration = new NfsMountConfiguration("", "") +{ +MountOptions = "", +}, +CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") +{ +MountOptions = "", +}, +AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") +{ +MountOptions = "", +}, +}}, + TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, + UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) + { + AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy + { + DisableAutomaticRollback = true, + EnableAutomaticOsUpgrade = true, + UseRollingUpgradePolicy = true, + OsRollingUpgradeDeferral = true, + }, + RollingUpgradePolicy = new RollingUpgradePolicy + { + EnableCrossZoneUpgrade = true, + MaxBatchInstancePercent = 1234, + MaxUnhealthyInstancePercent = 1234, + MaxUnhealthyUpgradedInstancePercent = 1234, + PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), + PrioritizeUnhealthyInstances = true, + RollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, + }) + { + Priority = 1234, + AllowTaskPreemption = true, + MaxParallelTasks = 1234, + DisplayName = "", + UsesTaskDependencies = true, + OnAllTasksComplete = OnAllBatchTasksComplete.NoAction, + OnTaskFailure = OnBatchTaskFailure.NoAction, + NetworkConfiguration = new BatchJobNetworkConfiguration(""), + Constraints = new BatchJobConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, + JobManagerTask = new BatchJobManagerTask("", "") + { + DisplayName = "", + ContainerSettings = new BatchTaskContainerSettings("") + { + ContainerRunOptions = "", + Registry = new ContainerRegistryReference + { + Username = "", + Password = "", + RegistryServer = "", + IdentityReference = new BatchNodeIdentityReference + { + ResourceId = "", + }, + }, + WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, + }, + ResourceFiles = {new ResourceFile +{ +AutoStorageContainerName = "", +StorageContainerUrl = "", +HttpUrl = "", +BlobPrefix = "", +FilePath = "", +FileMode = "", +IdentityReference = default, +}}, + OutputFiles = {new OutputFile("", new OutputFileDestination +{ +Container = new OutputFileBlobContainerDestination("") +{ +Path = "", +IdentityReference = default, +UploadHeaders = {new HttpHeader("") +{ +Value = "", +}}, +}, +}, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, + EnvironmentSettings = {new EnvironmentSetting("") +{ +Value = "", +}}, + Constraints = new BatchTaskConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, + RequiredSlots = 1234, + KillJobOnCompletion = true, + UserIdentity = new UserIdentity + { + Username = "", + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + RunExclusive = true, + ApplicationPackageReferences = {new BatchApplicationPackageReference("") +{ +Version = "", +}}, + AuthenticationTokenSettings = new AuthenticationTokenSettings + { + Access = { AccessScope.Job }, + }, + AllowLowPriorityNode = true, + }, + JobPreparationTask = new BatchJobPreparationTask("") + { + Id = "", + ContainerSettings = default, + ResourceFiles = { default }, + EnvironmentSettings = { default }, + Constraints = default, + WaitForSuccess = true, + UserIdentity = default, + RerunOnNodeRebootAfterSuccess = true, + }, + JobReleaseTask = new BatchJobReleaseTask("") + { + Id = "", + ContainerSettings = default, + ResourceFiles = { default }, + EnvironmentSettings = { default }, + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + UserIdentity = default, + }, + CommonEnvironmentSettings = { default }, + Metadata = { default }, + }) + { + Schedule = new BatchJobScheduleConfiguration + { + DoNotRunUntil = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + DoNotRunAfter = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + StartWindow = XmlConvert.ToTimeSpan("PT1H23M45S"), + RecurrenceInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), + }, + Metadata = { default }, + }; + Response response = await client.ReplaceJobScheduleAsync("", jobSchedule, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_DisableJobSchedule_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.DisableJobSchedule(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_DisableJobSchedule_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.DisableJobScheduleAsync(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_DisableJobSchedule_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.DisableJobSchedule("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_DisableJobSchedule_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.DisableJobScheduleAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_EnableJobSchedule_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.EnableJobSchedule(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_EnableJobSchedule_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.EnableJobScheduleAsync(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_EnableJobSchedule_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.EnableJobSchedule("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_EnableJobSchedule_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.EnableJobScheduleAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_TerminateJobSchedule_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.TerminateJobSchedule(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_TerminateJobSchedule_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.TerminateJobScheduleAsync(""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_TerminateJobSchedule_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.TerminateJobSchedule("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_TerminateJobSchedule_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.TerminateJobScheduleAsync("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_CreateJobSchedule_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + id = "", + schedule = new object(), + jobSpecification = new + { + poolInfo = new object(), + }, + }); + Response response = client.CreateJobSchedule(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_CreateJobSchedule_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + id = "", + schedule = new object(), + jobSpecification = new + { + poolInfo = new object(), + }, + }); + Response response = await client.CreateJobScheduleAsync(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_CreateJobSchedule_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchJobScheduleCreateContent jobSchedule = new BatchJobScheduleCreateContent("", new BatchJobScheduleConfiguration(), new BatchJobSpecification(new BatchPoolInfo())); + Response response = client.CreateJobSchedule(jobSchedule); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_CreateJobSchedule_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchJobScheduleCreateContent jobSchedule = new BatchJobScheduleCreateContent("", new BatchJobScheduleConfiguration(), new BatchJobSpecification(new BatchPoolInfo())); + Response response = await client.CreateJobScheduleAsync(jobSchedule); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_CreateJobSchedule_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + id = "", + displayName = "", + schedule = new + { + doNotRunUntil = "2022-05-10T18:57:31.2311892Z", + doNotRunAfter = "2022-05-10T18:57:31.2311892Z", + startWindow = "PT1H23M45S", + recurrenceInterval = "PT1H23M45S", + }, + jobSpecification = new + { + priority = 1234, + allowTaskPreemption = true, + maxParallelTasks = 1234, + displayName = "", + usesTaskDependencies = true, + onAllTasksComplete = "noaction", + onTaskFailure = "noaction", + networkConfiguration = new + { + subnetId = "", + }, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + jobManagerTask = new + { + id = "", + displayName = "", + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + registry = new + { + username = "", + password = "", + registryServer = "", + identityReference = new + { + resourceId = "", + }, + }, + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { +new +{ +autoStorageContainerName = "", +storageContainerUrl = "", +httpUrl = "", +blobPrefix = "", +filePath = "", +fileMode = "", +} + }, + outputFiles = new object[] + { +new +{ +filePattern = "", +destination = new +{ +container = new +{ +path = "", +containerUrl = "", +uploadHeaders = new object[] +{ +new +{ +name = "", +value = "", +} +}, +}, +}, +uploadOptions = new +{ +uploadCondition = "tasksuccess", +}, +} + }, + environmentSettings = new object[] + { +new +{ +name = "", +value = "", +} + }, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + requiredSlots = 1234, + killJobOnCompletion = true, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + runExclusive = true, + applicationPackageReferences = new object[] + { +new +{ +applicationId = "", +version = "", +} + }, + authenticationTokenSettings = new + { + access = new object[] + { +"job" + }, + }, + allowLowPriorityNode = true, + }, + jobPreparationTask = new + { + id = "", + commandLine = "", + resourceFiles = new object[] + { +null + }, + environmentSettings = new object[] + { +null + }, + waitForSuccess = true, + rerunOnNodeRebootAfterSuccess = true, + }, + jobReleaseTask = new + { + id = "", + commandLine = "", + resourceFiles = new object[] + { +null + }, + environmentSettings = new object[] + { +null + }, + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + }, + commonEnvironmentSettings = new object[] + { +null + }, + poolInfo = new + { + poolId = "", + autoPoolSpecification = new + { + autoPoolIdPrefix = "", + poolLifetimeOption = "jobschedule", + keepAlive = true, + pool = new + { + displayName = "", + vmSize = "", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "", + offer = "", + sku = "", + version = "", + virtualMachineImageId = "", + }, + nodeAgentSKUId = "", + windowsConfiguration = new + { + enableAutomaticUpdates = true, + }, + dataDisks = new object[] + { +new +{ +lun = 1234, +caching = "none", +diskSizeGB = 1234, +storageAccountType = "standard_lrs", +} + }, + licenseType = "", + containerConfiguration = new + { + type = "dockerCompatible", + containerImageNames = new object[] + { +"" + }, + containerRegistries = new object[] + { +null + }, + }, + diskEncryptionConfiguration = new + { + targets = new object[] + { +"osdisk" + }, + }, + nodePlacementConfiguration = new + { + policy = "regional", + }, + extensions = new object[] + { +new +{ +name = "", +publisher = "", +type = "", +typeHandlerVersion = "", +autoUpgradeMinorVersion = true, +enableAutomaticUpgrade = true, +settings = new +{ +key = "", +}, +protectedSettings = new +{ +key = "", +}, +provisionAfterExtensions = new object[] +{ +"" +}, +} + }, + osDisk = new + { + ephemeralOSDiskSettings = new + { + placement = "cachedisk", + }, + caching = "none", + diskSizeGB = 1234, + managedDisk = new + { + storageAccountType = "standard_lrs", + }, + writeAcceleratorEnabled = true, + }, + securityProfile = new + { + encryptionAtHost = true, + securityType = "trustedLaunch", + uefiSettings = new + { + secureBootEnabled = true, + vTpmEnabled = true, + }, + }, + serviceArtifactReference = new + { + id = "", + }, + }, + taskSlotsPerNode = 1234, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + resizeTimeout = "PT1H23M45S", + resourceTags = "", + targetDedicatedNodes = 1234, + targetLowPriorityNodes = 1234, + enableAutoScale = true, + autoScaleFormula = "", + autoScaleEvaluationInterval = "PT1H23M45S", + enableInterNodeCommunication = true, + networkConfiguration = new + { + subnetId = "", + dynamicVNetAssignmentScope = "none", + endpointConfiguration = new + { + inboundNATPools = new object[] + { +new +{ +name = "", +protocol = "tcp", +backendPort = 1234, +frontendPortRangeStart = 1234, +frontendPortRangeEnd = 1234, +networkSecurityGroupRules = new object[] +{ +new +{ +priority = 1234, +access = "allow", +sourceAddressPrefix = "", +sourcePortRanges = new object[] +{ +"" +}, +} +}, +} + }, + }, + publicIPAddressConfiguration = new + { + provision = "batchmanaged", + ipAddressIds = new object[] + { +"" + }, + }, + enableAcceleratedNetworking = true, + }, + startTask = new + { + commandLine = "", + resourceFiles = new object[] + { +null + }, + environmentSettings = new object[] + { +null + }, + maxTaskRetryCount = 1234, + waitForSuccess = true, + }, + applicationPackageReferences = new object[] + { +null + }, + userAccounts = new object[] + { +new +{ +name = "", +password = "", +elevationLevel = "nonadmin", +linuxUserConfiguration = new +{ +uid = 1234, +gid = 1234, +sshPrivateKey = "", +}, +windowsUserConfiguration = new +{ +loginMode = "batch", +}, +} + }, + metadata = new object[] + { +new +{ +name = "", +value = "", +} + }, + mountConfiguration = new object[] + { +new +{ +azureBlobFileSystemConfiguration = new +{ +accountName = "", +containerName = "", +accountKey = "", +sasKey = "", +blobfuseOptions = "", +relativeMountPath = "", +}, +nfsMountConfiguration = new +{ +source = "", +relativeMountPath = "", +mountOptions = "", +}, +cifsMountConfiguration = new +{ +username = "", +source = "", +relativeMountPath = "", +mountOptions = "", +password = "", +}, +azureFileShareConfiguration = new +{ +accountName = "", +azureFileUrl = "", +accountKey = "", +relativeMountPath = "", +mountOptions = "", +}, +} + }, + targetNodeCommunicationMode = "default", + upgradePolicy = new + { + mode = "automatic", + automaticOSUpgradePolicy = new + { + disableAutomaticRollback = true, + enableAutomaticOSUpgrade = true, + useRollingUpgradePolicy = true, + osRollingUpgradeDeferral = true, + }, + rollingUpgradePolicy = new + { + enableCrossZoneUpgrade = true, + maxBatchInstancePercent = 1234, + maxUnhealthyInstancePercent = 1234, + maxUnhealthyUpgradedInstancePercent = 1234, + pauseTimeBetweenBatches = "PT1H23M45S", + prioritizeUnhealthyInstances = true, + rollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, + }, + metadata = new object[] + { +null + }, + }, + metadata = new object[] + { +null + }, + }); + Response response = client.CreateJobSchedule(content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_CreateJobSchedule_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + id = "", + displayName = "", + schedule = new + { + doNotRunUntil = "2022-05-10T18:57:31.2311892Z", + doNotRunAfter = "2022-05-10T18:57:31.2311892Z", + startWindow = "PT1H23M45S", + recurrenceInterval = "PT1H23M45S", + }, + jobSpecification = new + { + priority = 1234, + allowTaskPreemption = true, + maxParallelTasks = 1234, + displayName = "", + usesTaskDependencies = true, + onAllTasksComplete = "noaction", + onTaskFailure = "noaction", + networkConfiguration = new + { + subnetId = "", + }, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + jobManagerTask = new + { + id = "", + displayName = "", + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + registry = new + { + username = "", + password = "", + registryServer = "", + identityReference = new + { + resourceId = "", + }, + }, + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { +new +{ +autoStorageContainerName = "", +storageContainerUrl = "", +httpUrl = "", +blobPrefix = "", +filePath = "", +fileMode = "", +} + }, + outputFiles = new object[] + { +new +{ +filePattern = "", +destination = new +{ +container = new +{ +path = "", +containerUrl = "", +uploadHeaders = new object[] +{ +new +{ +name = "", +value = "", +} +}, +}, +}, +uploadOptions = new +{ +uploadCondition = "tasksuccess", +}, +} + }, + environmentSettings = new object[] + { +new +{ +name = "", +value = "", +} + }, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + requiredSlots = 1234, + killJobOnCompletion = true, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + runExclusive = true, + applicationPackageReferences = new object[] + { +new +{ +applicationId = "", +version = "", +} + }, + authenticationTokenSettings = new + { + access = new object[] + { +"job" + }, + }, + allowLowPriorityNode = true, + }, + jobPreparationTask = new + { + id = "", + commandLine = "", + resourceFiles = new object[] + { +null + }, + environmentSettings = new object[] + { +null + }, + waitForSuccess = true, + rerunOnNodeRebootAfterSuccess = true, + }, + jobReleaseTask = new + { + id = "", + commandLine = "", + resourceFiles = new object[] + { +null + }, + environmentSettings = new object[] + { +null + }, + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + }, + commonEnvironmentSettings = new object[] + { +null + }, + poolInfo = new + { + poolId = "", + autoPoolSpecification = new + { + autoPoolIdPrefix = "", + poolLifetimeOption = "jobschedule", + keepAlive = true, + pool = new + { + displayName = "", + vmSize = "", + virtualMachineConfiguration = new + { + imageReference = new + { + publisher = "", + offer = "", + sku = "", + version = "", + virtualMachineImageId = "", + }, + nodeAgentSKUId = "", + windowsConfiguration = new + { + enableAutomaticUpdates = true, + }, + dataDisks = new object[] + { +new +{ +lun = 1234, +caching = "none", +diskSizeGB = 1234, +storageAccountType = "standard_lrs", +} + }, + licenseType = "", + containerConfiguration = new + { + type = "dockerCompatible", + containerImageNames = new object[] + { +"" + }, + containerRegistries = new object[] + { +null + }, + }, + diskEncryptionConfiguration = new + { + targets = new object[] + { +"osdisk" + }, + }, + nodePlacementConfiguration = new + { + policy = "regional", + }, + extensions = new object[] + { +new +{ +name = "", +publisher = "", +type = "", +typeHandlerVersion = "", +autoUpgradeMinorVersion = true, +enableAutomaticUpgrade = true, +settings = new +{ +key = "", +}, +protectedSettings = new +{ +key = "", +}, +provisionAfterExtensions = new object[] +{ +"" +}, +} + }, + osDisk = new + { + ephemeralOSDiskSettings = new + { + placement = "cachedisk", + }, + caching = "none", + diskSizeGB = 1234, + managedDisk = new + { + storageAccountType = "standard_lrs", + }, + writeAcceleratorEnabled = true, + }, + securityProfile = new + { + encryptionAtHost = true, + securityType = "trustedLaunch", + uefiSettings = new + { + secureBootEnabled = true, + vTpmEnabled = true, + }, + }, + serviceArtifactReference = new + { + id = "", + }, + }, + taskSlotsPerNode = 1234, + taskSchedulingPolicy = new + { + nodeFillType = "spread", + }, + resizeTimeout = "PT1H23M45S", + resourceTags = "", + targetDedicatedNodes = 1234, + targetLowPriorityNodes = 1234, + enableAutoScale = true, + autoScaleFormula = "", + autoScaleEvaluationInterval = "PT1H23M45S", + enableInterNodeCommunication = true, + networkConfiguration = new + { + subnetId = "", + dynamicVNetAssignmentScope = "none", + endpointConfiguration = new + { + inboundNATPools = new object[] + { +new +{ +name = "", +protocol = "tcp", +backendPort = 1234, +frontendPortRangeStart = 1234, +frontendPortRangeEnd = 1234, +networkSecurityGroupRules = new object[] +{ +new +{ +priority = 1234, +access = "allow", +sourceAddressPrefix = "", +sourcePortRanges = new object[] +{ +"" +}, +} +}, +} + }, + }, + publicIPAddressConfiguration = new + { + provision = "batchmanaged", + ipAddressIds = new object[] + { +"" + }, + }, + enableAcceleratedNetworking = true, + }, + startTask = new + { + commandLine = "", + resourceFiles = new object[] + { +null + }, + environmentSettings = new object[] + { +null + }, + maxTaskRetryCount = 1234, + waitForSuccess = true, + }, + applicationPackageReferences = new object[] + { +null + }, + userAccounts = new object[] + { +new +{ +name = "", +password = "", +elevationLevel = "nonadmin", +linuxUserConfiguration = new +{ +uid = 1234, +gid = 1234, +sshPrivateKey = "", +}, +windowsUserConfiguration = new +{ +loginMode = "batch", +}, +} + }, + metadata = new object[] + { +new +{ +name = "", +value = "", +} + }, + mountConfiguration = new object[] + { +new +{ +azureBlobFileSystemConfiguration = new +{ +accountName = "", +containerName = "", +accountKey = "", +sasKey = "", +blobfuseOptions = "", +relativeMountPath = "", +}, +nfsMountConfiguration = new +{ +source = "", +relativeMountPath = "", +mountOptions = "", +}, +cifsMountConfiguration = new +{ +username = "", +source = "", +relativeMountPath = "", +mountOptions = "", +password = "", +}, +azureFileShareConfiguration = new +{ +accountName = "", +azureFileUrl = "", +accountKey = "", +relativeMountPath = "", +mountOptions = "", +}, +} + }, + targetNodeCommunicationMode = "default", + upgradePolicy = new + { + mode = "automatic", + automaticOSUpgradePolicy = new + { + disableAutomaticRollback = true, + enableAutomaticOSUpgrade = true, + useRollingUpgradePolicy = true, + osRollingUpgradeDeferral = true, + }, + rollingUpgradePolicy = new + { + enableCrossZoneUpgrade = true, + maxBatchInstancePercent = 1234, + maxUnhealthyInstancePercent = 1234, + maxUnhealthyUpgradedInstancePercent = 1234, + pauseTimeBetweenBatches = "PT1H23M45S", + prioritizeUnhealthyInstances = true, + rollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, + }, + metadata = new object[] + { +null + }, + }, + metadata = new object[] + { +null + }, + }); + Response response = await client.CreateJobScheduleAsync(content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_CreateJobSchedule_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchJobScheduleCreateContent jobSchedule = new BatchJobScheduleCreateContent("", new BatchJobScheduleConfiguration + { + DoNotRunUntil = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + DoNotRunAfter = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + StartWindow = XmlConvert.ToTimeSpan("PT1H23M45S"), + RecurrenceInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), + }, new BatchJobSpecification(new BatchPoolInfo + { + PoolId = "", + AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.JobSchedule) + { + AutoPoolIdPrefix = "", + KeepAlive = true, + Pool = new BatchPoolSpecification("") + { + DisplayName = "", + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "", + Offer = "", + Sku = "", + Version = "", + VirtualMachineImageId = "", + }, "") + { + WindowsConfiguration = new WindowsConfiguration + { + EnableAutomaticUpdates = true, + }, + DataDisks = {new DataDisk(1234, 1234) +{ +Caching = CachingType.None, +StorageAccountType = StorageAccountType.StandardLRS, +}}, + LicenseType = "", + ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) + { + ContainerImageNames = { "" }, + ContainerRegistries = { default }, + }, + DiskEncryptionConfiguration = new DiskEncryptionConfiguration + { + Targets = { DiskEncryptionTarget.OsDisk }, + }, + NodePlacementConfiguration = new BatchNodePlacementConfiguration + { + Policy = BatchNodePlacementPolicyType.Regional, + }, + Extensions = {new VMExtension("", "", "") +{ +TypeHandlerVersion = "", +AutoUpgradeMinorVersion = true, +EnableAutomaticUpgrade = true, +Settings = +{ +["key"] = "" +}, +ProtectedSettings = +{ +["key"] = "" +}, +ProvisionAfterExtensions = {""}, +}}, + OsDisk = new OSDisk + { + EphemeralOSDiskSettings = new DiffDiskSettings + { + Placement = DiffDiskPlacement.CacheDisk, + }, + Caching = CachingType.None, + DiskSizeGB = 1234, + ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), + WriteAcceleratorEnabled = true, + }, + SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings + { + SecureBootEnabled = true, + VTpmEnabled = true, + }), + ServiceArtifactReference = new ServiceArtifactReference(""), + }, + TaskSlotsPerNode = 1234, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), + ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), + ResourceTags = "", + TargetDedicatedNodes = 1234, + TargetLowPriorityNodes = 1234, + EnableAutoScale = true, + AutoScaleFormula = "", + AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), + EnableInterNodeCommunication = true, + NetworkConfiguration = new NetworkConfiguration + { + SubnetId = "", + DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, + EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] + { +new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) +{ +NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") +{ +SourcePortRanges = {""}, +}}, +} + }), + PublicIpAddressConfiguration = new PublicIpAddressConfiguration + { + IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, + IpAddressIds = { "" }, + }, + EnableAcceleratedNetworking = true, + }, + StartTask = new BatchStartTask("") + { + ContainerSettings = default, + ResourceFiles = { default }, + EnvironmentSettings = { default }, + UserIdentity = default, + MaxTaskRetryCount = 1234, + WaitForSuccess = true, + }, + ApplicationPackageReferences = { default }, + UserAccounts = {new UserAccount("", "") +{ +ElevationLevel = ElevationLevel.NonAdmin, +LinuxUserConfiguration = new LinuxUserConfiguration +{ +Uid = 1234, +Gid = 1234, +SshPrivateKey = "", +}, +WindowsUserConfiguration = new WindowsUserConfiguration +{ +LoginMode = LoginMode.Batch, +}, +}}, + Metadata = { new MetadataItem("", "") }, + MountConfiguration = {new MountConfiguration +{ +AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") +{ +AccountKey = "", +SasKey = "", +BlobfuseOptions = "", +IdentityReference = default, +}, +NfsMountConfiguration = new NfsMountConfiguration("", "") +{ +MountOptions = "", +}, +CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") +{ +MountOptions = "", +}, +AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") +{ +MountOptions = "", +}, +}}, + TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, + UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) + { + AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy + { + DisableAutomaticRollback = true, + EnableAutomaticOsUpgrade = true, + UseRollingUpgradePolicy = true, + OsRollingUpgradeDeferral = true, + }, + RollingUpgradePolicy = new RollingUpgradePolicy + { + EnableCrossZoneUpgrade = true, + MaxBatchInstancePercent = 1234, + MaxUnhealthyInstancePercent = 1234, + MaxUnhealthyUpgradedInstancePercent = 1234, + PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), + PrioritizeUnhealthyInstances = true, + RollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, + }) + { + Priority = 1234, + AllowTaskPreemption = true, + MaxParallelTasks = 1234, + DisplayName = "", + UsesTaskDependencies = true, + OnAllTasksComplete = OnAllBatchTasksComplete.NoAction, + OnTaskFailure = OnBatchTaskFailure.NoAction, + NetworkConfiguration = new BatchJobNetworkConfiguration(""), + Constraints = new BatchJobConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, + JobManagerTask = new BatchJobManagerTask("", "") + { + DisplayName = "", + ContainerSettings = new BatchTaskContainerSettings("") + { + ContainerRunOptions = "", + Registry = new ContainerRegistryReference + { + Username = "", + Password = "", + RegistryServer = "", + IdentityReference = new BatchNodeIdentityReference + { + ResourceId = "", + }, + }, + WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, + }, + ResourceFiles = {new ResourceFile +{ +AutoStorageContainerName = "", +StorageContainerUrl = "", +HttpUrl = "", +BlobPrefix = "", +FilePath = "", +FileMode = "", +IdentityReference = default, +}}, + OutputFiles = {new OutputFile("", new OutputFileDestination +{ +Container = new OutputFileBlobContainerDestination("") +{ +Path = "", +IdentityReference = default, +UploadHeaders = {new HttpHeader("") +{ +Value = "", +}}, +}, +}, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, + EnvironmentSettings = {new EnvironmentSetting("") +{ +Value = "", +}}, + Constraints = new BatchTaskConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, + RequiredSlots = 1234, + KillJobOnCompletion = true, + UserIdentity = new UserIdentity + { + Username = "", + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + RunExclusive = true, + ApplicationPackageReferences = {new BatchApplicationPackageReference("") +{ +Version = "", +}}, + AuthenticationTokenSettings = new AuthenticationTokenSettings + { + Access = { AccessScope.Job }, + }, + AllowLowPriorityNode = true, + }, + JobPreparationTask = new BatchJobPreparationTask("") + { + Id = "", + ContainerSettings = default, + ResourceFiles = { default }, + EnvironmentSettings = { default }, + Constraints = default, + WaitForSuccess = true, + UserIdentity = default, + RerunOnNodeRebootAfterSuccess = true, + }, + JobReleaseTask = new BatchJobReleaseTask("") + { + Id = "", + ContainerSettings = default, + ResourceFiles = { default }, + EnvironmentSettings = { default }, + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + UserIdentity = default, + }, + CommonEnvironmentSettings = { default }, + Metadata = { default }, + }) + { + DisplayName = "", + Metadata = { default }, + }; + Response response = client.CreateJobSchedule(jobSchedule, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_CreateJobSchedule_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchJobScheduleCreateContent jobSchedule = new BatchJobScheduleCreateContent("", new BatchJobScheduleConfiguration + { + DoNotRunUntil = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + DoNotRunAfter = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + StartWindow = XmlConvert.ToTimeSpan("PT1H23M45S"), + RecurrenceInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), + }, new BatchJobSpecification(new BatchPoolInfo + { + PoolId = "", + AutoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.JobSchedule) + { + AutoPoolIdPrefix = "", + KeepAlive = true, + Pool = new BatchPoolSpecification("") + { + DisplayName = "", + VirtualMachineConfiguration = new VirtualMachineConfiguration(new ImageReference + { + Publisher = "", + Offer = "", + Sku = "", + Version = "", + VirtualMachineImageId = "", + }, "") + { + WindowsConfiguration = new WindowsConfiguration + { + EnableAutomaticUpdates = true, + }, + DataDisks = {new DataDisk(1234, 1234) +{ +Caching = CachingType.None, +StorageAccountType = StorageAccountType.StandardLRS, +}}, + LicenseType = "", + ContainerConfiguration = new ContainerConfiguration(ContainerType.DockerCompatible) + { + ContainerImageNames = { "" }, + ContainerRegistries = { default }, + }, + DiskEncryptionConfiguration = new DiskEncryptionConfiguration + { + Targets = { DiskEncryptionTarget.OsDisk }, + }, + NodePlacementConfiguration = new BatchNodePlacementConfiguration + { + Policy = BatchNodePlacementPolicyType.Regional, + }, + Extensions = {new VMExtension("", "", "") +{ +TypeHandlerVersion = "", +AutoUpgradeMinorVersion = true, +EnableAutomaticUpgrade = true, +Settings = +{ +["key"] = "" +}, +ProtectedSettings = +{ +["key"] = "" +}, +ProvisionAfterExtensions = {""}, +}}, + OsDisk = new OSDisk + { + EphemeralOSDiskSettings = new DiffDiskSettings + { + Placement = DiffDiskPlacement.CacheDisk, + }, + Caching = CachingType.None, + DiskSizeGB = 1234, + ManagedDisk = new ManagedDisk(StorageAccountType.StandardLRS), + WriteAcceleratorEnabled = true, + }, + SecurityProfile = new SecurityProfile(true, SecurityTypes.TrustedLaunch, new UefiSettings + { + SecureBootEnabled = true, + VTpmEnabled = true, + }), + ServiceArtifactReference = new ServiceArtifactReference(""), + }, + TaskSlotsPerNode = 1234, + TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Spread), + ResizeTimeout = XmlConvert.ToTimeSpan("PT1H23M45S"), + ResourceTags = "", + TargetDedicatedNodes = 1234, + TargetLowPriorityNodes = 1234, + EnableAutoScale = true, + AutoScaleFormula = "", + AutoScaleEvaluationInterval = XmlConvert.ToTimeSpan("PT1H23M45S"), + EnableInterNodeCommunication = true, + NetworkConfiguration = new NetworkConfiguration + { + SubnetId = "", + DynamicVNetAssignmentScope = DynamicVNetAssignmentScope.None, + EndpointConfiguration = new BatchPoolEndpointConfiguration(new InboundNatPool[] + { +new InboundNatPool("", InboundEndpointProtocol.Tcp, 1234, 1234, 1234) +{ +NetworkSecurityGroupRules = {new NetworkSecurityGroupRule(1234, NetworkSecurityGroupRuleAccess.Allow, "") +{ +SourcePortRanges = {""}, +}}, +} + }), + PublicIpAddressConfiguration = new PublicIpAddressConfiguration + { + IpAddressProvisioningType = IpAddressProvisioningType.BatchManaged, + IpAddressIds = { "" }, + }, + EnableAcceleratedNetworking = true, + }, + StartTask = new BatchStartTask("") + { + ContainerSettings = default, + ResourceFiles = { default }, + EnvironmentSettings = { default }, + UserIdentity = default, + MaxTaskRetryCount = 1234, + WaitForSuccess = true, + }, + ApplicationPackageReferences = { default }, + UserAccounts = {new UserAccount("", "") +{ +ElevationLevel = ElevationLevel.NonAdmin, +LinuxUserConfiguration = new LinuxUserConfiguration +{ +Uid = 1234, +Gid = 1234, +SshPrivateKey = "", +}, +WindowsUserConfiguration = new WindowsUserConfiguration +{ +LoginMode = LoginMode.Batch, +}, +}}, + Metadata = { new MetadataItem("", "") }, + MountConfiguration = {new MountConfiguration +{ +AzureBlobFileSystemConfiguration = new AzureBlobFileSystemConfiguration("", "", "") +{ +AccountKey = "", +SasKey = "", +BlobfuseOptions = "", +IdentityReference = default, +}, +NfsMountConfiguration = new NfsMountConfiguration("", "") +{ +MountOptions = "", +}, +CifsMountConfiguration = new CifsMountConfiguration("", "", "", "") +{ +MountOptions = "", +}, +AzureFileShareConfiguration = new AzureFileShareConfiguration("", "", "", "") +{ +MountOptions = "", +}, +}}, + TargetNodeCommunicationMode = BatchNodeCommunicationMode.Default, + UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic) + { + AutomaticOsUpgradePolicy = new AutomaticOsUpgradePolicy + { + DisableAutomaticRollback = true, + EnableAutomaticOsUpgrade = true, + UseRollingUpgradePolicy = true, + OsRollingUpgradeDeferral = true, + }, + RollingUpgradePolicy = new RollingUpgradePolicy + { + EnableCrossZoneUpgrade = true, + MaxBatchInstancePercent = 1234, + MaxUnhealthyInstancePercent = 1234, + MaxUnhealthyUpgradedInstancePercent = 1234, + PauseTimeBetweenBatches = XmlConvert.ToTimeSpan("PT1H23M45S"), + PrioritizeUnhealthyInstances = true, + RollbackFailedInstancesOnPolicyBreach = true, + }, + }, + }, + }, + }) + { + Priority = 1234, + AllowTaskPreemption = true, + MaxParallelTasks = 1234, + DisplayName = "", + UsesTaskDependencies = true, + OnAllTasksComplete = OnAllBatchTasksComplete.NoAction, + OnTaskFailure = OnBatchTaskFailure.NoAction, + NetworkConfiguration = new BatchJobNetworkConfiguration(""), + Constraints = new BatchJobConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, + JobManagerTask = new BatchJobManagerTask("", "") + { + DisplayName = "", + ContainerSettings = new BatchTaskContainerSettings("") + { + ContainerRunOptions = "", + Registry = new ContainerRegistryReference + { + Username = "", + Password = "", + RegistryServer = "", + IdentityReference = new BatchNodeIdentityReference + { + ResourceId = "", + }, + }, + WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, + }, + ResourceFiles = {new ResourceFile +{ +AutoStorageContainerName = "", +StorageContainerUrl = "", +HttpUrl = "", +BlobPrefix = "", +FilePath = "", +FileMode = "", +IdentityReference = default, +}}, + OutputFiles = {new OutputFile("", new OutputFileDestination +{ +Container = new OutputFileBlobContainerDestination("") +{ +Path = "", +IdentityReference = default, +UploadHeaders = {new HttpHeader("") +{ +Value = "", +}}, +}, +}, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, + EnvironmentSettings = {new EnvironmentSetting("") +{ +Value = "", +}}, + Constraints = new BatchTaskConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, + RequiredSlots = 1234, + KillJobOnCompletion = true, + UserIdentity = new UserIdentity + { + Username = "", + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + RunExclusive = true, + ApplicationPackageReferences = {new BatchApplicationPackageReference("") +{ +Version = "", +}}, + AuthenticationTokenSettings = new AuthenticationTokenSettings + { + Access = { AccessScope.Job }, + }, + AllowLowPriorityNode = true, + }, + JobPreparationTask = new BatchJobPreparationTask("") + { + Id = "", + ContainerSettings = default, + ResourceFiles = { default }, + EnvironmentSettings = { default }, + Constraints = default, + WaitForSuccess = true, + UserIdentity = default, + RerunOnNodeRebootAfterSuccess = true, + }, + JobReleaseTask = new BatchJobReleaseTask("") + { + Id = "", + ContainerSettings = default, + ResourceFiles = { default }, + EnvironmentSettings = { default }, + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + UserIdentity = default, + }, + CommonEnvironmentSettings = { default }, + Metadata = { default }, + }) + { + DisplayName = "", + Metadata = { default }, + }; + Response response = await client.CreateJobScheduleAsync(jobSchedule, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_CreateTask_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + id = "", + commandLine = "", + }); + Response response = client.CreateTask("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_CreateTask_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + id = "", + commandLine = "", + }); + Response response = await client.CreateTaskAsync("", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_CreateTask_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchTaskCreateContent task = new BatchTaskCreateContent("", ""); + Response response = client.CreateTask("", task); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_CreateTask_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchTaskCreateContent task = new BatchTaskCreateContent("", ""); + Response response = await client.CreateTaskAsync("", task); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_CreateTask_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + id = "", + displayName = "", + exitConditions = new Dictionary + { + ["exitCodes"] = new object[] + { +new +{ +code = 1234, +exitOptions = new +{ +jobAction = "none", +dependencyAction = "satisfy", +}, +} + }, + ["exitCodeRanges"] = new object[] + { +new +{ +start = 1234, +end = 1234, +} + }, + ["preProcessingError"] = null, + ["fileUploadError"] = null, + ["default"] = null + }, + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + registry = new + { + username = "", + password = "", + registryServer = "", + identityReference = new + { + resourceId = "", + }, + }, + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { +new +{ +autoStorageContainerName = "", +storageContainerUrl = "", +httpUrl = "", +blobPrefix = "", +filePath = "", +fileMode = "", +} + }, + outputFiles = new object[] + { +new +{ +filePattern = "", +destination = new +{ +container = new +{ +path = "", +containerUrl = "", +uploadHeaders = new object[] +{ +new +{ +name = "", +value = "", +} +}, +}, +}, +uploadOptions = new +{ +uploadCondition = "tasksuccess", +}, +} + }, + environmentSettings = new object[] + { +new +{ +name = "", +value = "", +} + }, + affinityInfo = new + { + affinityId = "", + }, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + requiredSlots = 1234, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + multiInstanceSettings = new + { + numberOfInstances = 1234, + coordinationCommandLine = "", + commonResourceFiles = new object[] + { +null + }, + }, + dependsOn = new + { + taskIds = new object[] + { +"" + }, + taskIdRanges = new object[] + { +new +{ +start = 1234, +end = 1234, +} + }, + }, + applicationPackageReferences = new object[] + { +new +{ +applicationId = "", +version = "", +} + }, + authenticationTokenSettings = new + { + access = new object[] + { +"job" + }, + }, + }); + Response response = client.CreateTask("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_CreateTask_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + id = "", + displayName = "", + exitConditions = new Dictionary + { + ["exitCodes"] = new object[] + { +new +{ +code = 1234, +exitOptions = new +{ +jobAction = "none", +dependencyAction = "satisfy", +}, +} + }, + ["exitCodeRanges"] = new object[] + { +new +{ +start = 1234, +end = 1234, +} + }, + ["preProcessingError"] = null, + ["fileUploadError"] = null, + ["default"] = null + }, + commandLine = "", + containerSettings = new + { + containerRunOptions = "", + imageName = "", + registry = new + { + username = "", + password = "", + registryServer = "", + identityReference = new + { + resourceId = "", + }, + }, + workingDirectory = "taskWorkingDirectory", + }, + resourceFiles = new object[] + { +new +{ +autoStorageContainerName = "", +storageContainerUrl = "", +httpUrl = "", +blobPrefix = "", +filePath = "", +fileMode = "", +} + }, + outputFiles = new object[] + { +new +{ +filePattern = "", +destination = new +{ +container = new +{ +path = "", +containerUrl = "", +uploadHeaders = new object[] +{ +new +{ +name = "", +value = "", +} +}, +}, +}, +uploadOptions = new +{ +uploadCondition = "tasksuccess", +}, +} + }, + environmentSettings = new object[] + { +new +{ +name = "", +value = "", +} + }, + affinityInfo = new + { + affinityId = "", + }, + constraints = new + { + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + requiredSlots = 1234, + userIdentity = new + { + username = "", + autoUser = new + { + scope = "task", + elevationLevel = "nonadmin", + }, + }, + multiInstanceSettings = new + { + numberOfInstances = 1234, + coordinationCommandLine = "", + commonResourceFiles = new object[] + { +null + }, + }, + dependsOn = new + { + taskIds = new object[] + { +"" + }, + taskIdRanges = new object[] + { +new +{ +start = 1234, +end = 1234, +} + }, + }, + applicationPackageReferences = new object[] + { +new +{ +applicationId = "", +version = "", +} + }, + authenticationTokenSettings = new + { + access = new object[] + { +"job" + }, + }, + }); + Response response = await client.CreateTaskAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_CreateTask_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchTaskCreateContent task = new BatchTaskCreateContent("", "") + { + DisplayName = "", + ExitConditions = new ExitConditions + { + ExitCodes = {new ExitCodeMapping(1234, new ExitOptions +{ +JobAction = BatchJobAction.None, +DependencyAction = DependencyAction.Satisfy, +})}, + ExitCodeRanges = { new ExitCodeRangeMapping(1234, 1234, default) }, + PreProcessingError = default, + FileUploadError = default, + Default = default, + }, + ContainerSettings = new BatchTaskContainerSettings("") + { + ContainerRunOptions = "", + Registry = new ContainerRegistryReference + { + Username = "", + Password = "", + RegistryServer = "", + IdentityReference = new BatchNodeIdentityReference + { + ResourceId = "", + }, + }, + WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, + }, + ResourceFiles = {new ResourceFile +{ +AutoStorageContainerName = "", +StorageContainerUrl = "", +HttpUrl = "", +BlobPrefix = "", +FilePath = "", +FileMode = "", +IdentityReference = default, +}}, + OutputFiles = {new OutputFile("", new OutputFileDestination +{ +Container = new OutputFileBlobContainerDestination("") +{ +Path = "", +IdentityReference = default, +UploadHeaders = {new HttpHeader("") +{ +Value = "", +}}, +}, +}, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, + EnvironmentSettings = {new EnvironmentSetting("") +{ +Value = "", +}}, + AffinityInfo = new AffinityInfo(""), + Constraints = new BatchTaskConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, + RequiredSlots = 1234, + UserIdentity = new UserIdentity + { + Username = "", + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + MultiInstanceSettings = new MultiInstanceSettings("") + { + NumberOfInstances = 1234, + CommonResourceFiles = { default }, + }, + DependsOn = new BatchTaskDependencies + { + TaskIds = { "" }, + TaskIdRanges = { new BatchTaskIdRange(1234, 1234) }, + }, + ApplicationPackageReferences = {new BatchApplicationPackageReference("") +{ +Version = "", +}}, + AuthenticationTokenSettings = new AuthenticationTokenSettings + { + Access = { AccessScope.Job }, + }, + }; + Response response = client.CreateTask("", task, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_CreateTask_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchTaskCreateContent task = new BatchTaskCreateContent("", "") + { + DisplayName = "", + ExitConditions = new ExitConditions + { + ExitCodes = {new ExitCodeMapping(1234, new ExitOptions +{ +JobAction = BatchJobAction.None, +DependencyAction = DependencyAction.Satisfy, +})}, + ExitCodeRanges = { new ExitCodeRangeMapping(1234, 1234, default) }, + PreProcessingError = default, + FileUploadError = default, + Default = default, + }, + ContainerSettings = new BatchTaskContainerSettings("") + { + ContainerRunOptions = "", + Registry = new ContainerRegistryReference + { + Username = "", + Password = "", + RegistryServer = "", + IdentityReference = new BatchNodeIdentityReference + { + ResourceId = "", + }, + }, + WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, + }, + ResourceFiles = {new ResourceFile +{ +AutoStorageContainerName = "", +StorageContainerUrl = "", +HttpUrl = "", +BlobPrefix = "", +FilePath = "", +FileMode = "", +IdentityReference = default, +}}, + OutputFiles = {new OutputFile("", new OutputFileDestination +{ +Container = new OutputFileBlobContainerDestination("") +{ +Path = "", +IdentityReference = default, +UploadHeaders = {new HttpHeader("") +{ +Value = "", +}}, +}, +}, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, + EnvironmentSettings = {new EnvironmentSetting("") +{ +Value = "", +}}, + AffinityInfo = new AffinityInfo(""), + Constraints = new BatchTaskConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, + RequiredSlots = 1234, + UserIdentity = new UserIdentity + { + Username = "", + AutoUser = new AutoUserSpecification + { + Scope = AutoUserScope.Task, + ElevationLevel = ElevationLevel.NonAdmin, + }, + }, + MultiInstanceSettings = new MultiInstanceSettings("") + { + NumberOfInstances = 1234, + CommonResourceFiles = { default }, + }, + DependsOn = new BatchTaskDependencies + { + TaskIds = { "" }, + TaskIdRanges = { new BatchTaskIdRange(1234, 1234) }, + }, + ApplicationPackageReferences = {new BatchApplicationPackageReference("") +{ +Version = "", +}}, + AuthenticationTokenSettings = new AuthenticationTokenSettings + { + Access = { AccessScope.Job }, + }, + }; + Response response = await client.CreateTaskAsync("", task, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_CreateTaskCollection_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + value = new object[] + { +new +{ +id = "", +commandLine = "", +} + }, + }); + Response response = client.CreateTaskCollection("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_CreateTaskCollection_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + value = new object[] + { +new +{ +id = "", +commandLine = "", +} + }, + }); + Response response = await client.CreateTaskCollectionAsync("", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_CreateTaskCollection_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchTaskGroup taskCollection = new BatchTaskGroup(new BatchTaskCreateContent[] + { +new BatchTaskCreateContent("", "") + }); + Response response = client.CreateTaskCollection("", taskCollection); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_CreateTaskCollection_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchTaskGroup taskCollection = new BatchTaskGroup(new BatchTaskCreateContent[] + { +new BatchTaskCreateContent("", "") + }); + Response response = await client.CreateTaskCollectionAsync("", taskCollection); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_CreateTaskCollection_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + value = new object[] + { +new +{ +id = "", +displayName = "", +exitConditions = new Dictionary +{ +["exitCodes"] = new object[] +{ +new +{ +code = 1234, +exitOptions = new +{ +jobAction = "none", +dependencyAction = "satisfy", +}, +} +}, +["exitCodeRanges"] = new object[] +{ +new +{ +start = 1234, +end = 1234, +} +}, +["preProcessingError"] = null, +["fileUploadError"] = null, +["default"] = null +}, +commandLine = "", +containerSettings = new +{ +containerRunOptions = "", +imageName = "", +registry = new +{ +username = "", +password = "", +registryServer = "", +identityReference = new +{ +resourceId = "", +}, +}, +workingDirectory = "taskWorkingDirectory", +}, +resourceFiles = new object[] +{ +new +{ +autoStorageContainerName = "", +storageContainerUrl = "", +httpUrl = "", +blobPrefix = "", +filePath = "", +fileMode = "", +} +}, +outputFiles = new object[] +{ +new +{ +filePattern = "", +destination = new +{ +container = new +{ +path = "", +containerUrl = "", +uploadHeaders = new object[] +{ +new +{ +name = "", +value = "", +} +}, +}, +}, +uploadOptions = new +{ +uploadCondition = "tasksuccess", +}, +} +}, +environmentSettings = new object[] +{ +new +{ +name = "", +value = "", +} +}, +affinityInfo = new +{ +affinityId = "", +}, +constraints = new +{ +maxWallClockTime = "PT1H23M45S", +retentionTime = "PT1H23M45S", +maxTaskRetryCount = 1234, +}, +requiredSlots = 1234, +userIdentity = new +{ +username = "", +autoUser = new +{ +scope = "task", +elevationLevel = "nonadmin", +}, +}, +multiInstanceSettings = new +{ +numberOfInstances = 1234, +coordinationCommandLine = "", +commonResourceFiles = new object[] +{ +null +}, +}, +dependsOn = new +{ +taskIds = new object[] +{ +"" +}, +taskIdRanges = new object[] +{ +new +{ +start = 1234, +end = 1234, +} +}, +}, +applicationPackageReferences = new object[] +{ +new +{ +applicationId = "", +version = "", +} +}, +authenticationTokenSettings = new +{ +access = new object[] +{ +"job" +}, +}, +} + }, + }); + Response response = client.CreateTaskCollection("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("taskId").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("eTag").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("lastModified").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("location").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("message").GetProperty("lang").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("message").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("values")[0].GetProperty("key").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("values")[0].GetProperty("value").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_CreateTaskCollection_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + value = new object[] + { +new +{ +id = "", +displayName = "", +exitConditions = new Dictionary +{ +["exitCodes"] = new object[] +{ +new +{ +code = 1234, +exitOptions = new +{ +jobAction = "none", +dependencyAction = "satisfy", +}, +} +}, +["exitCodeRanges"] = new object[] +{ +new +{ +start = 1234, +end = 1234, +} +}, +["preProcessingError"] = null, +["fileUploadError"] = null, +["default"] = null +}, +commandLine = "", +containerSettings = new +{ +containerRunOptions = "", +imageName = "", +registry = new +{ +username = "", +password = "", +registryServer = "", +identityReference = new +{ +resourceId = "", +}, +}, +workingDirectory = "taskWorkingDirectory", +}, +resourceFiles = new object[] +{ +new +{ +autoStorageContainerName = "", +storageContainerUrl = "", +httpUrl = "", +blobPrefix = "", +filePath = "", +fileMode = "", +} +}, +outputFiles = new object[] +{ +new +{ +filePattern = "", +destination = new +{ +container = new +{ +path = "", +containerUrl = "", +uploadHeaders = new object[] +{ +new +{ +name = "", +value = "", +} +}, +}, +}, +uploadOptions = new +{ +uploadCondition = "tasksuccess", +}, +} +}, +environmentSettings = new object[] +{ +new +{ +name = "", +value = "", +} +}, +affinityInfo = new +{ +affinityId = "", +}, +constraints = new +{ +maxWallClockTime = "PT1H23M45S", +retentionTime = "PT1H23M45S", +maxTaskRetryCount = 1234, +}, +requiredSlots = 1234, +userIdentity = new +{ +username = "", +autoUser = new +{ +scope = "task", +elevationLevel = "nonadmin", +}, +}, +multiInstanceSettings = new +{ +numberOfInstances = 1234, +coordinationCommandLine = "", +commonResourceFiles = new object[] +{ +null +}, +}, +dependsOn = new +{ +taskIds = new object[] +{ +"" +}, +taskIdRanges = new object[] +{ +new +{ +start = 1234, +end = 1234, +} +}, +}, +applicationPackageReferences = new object[] +{ +new +{ +applicationId = "", +version = "", +} +}, +authenticationTokenSettings = new +{ +access = new object[] +{ +"job" +}, +}, +} + }, + }); + Response response = await client.CreateTaskCollectionAsync("", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("value")[0].GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("taskId").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("eTag").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("lastModified").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("location").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("message").GetProperty("lang").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("message").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("values")[0].GetProperty("key").ToString()); + Console.WriteLine(result.GetProperty("value")[0].GetProperty("error").GetProperty("values")[0].GetProperty("value").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_CreateTaskCollection_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchTaskGroup taskCollection = new BatchTaskGroup(new BatchTaskCreateContent[] + { +new BatchTaskCreateContent("", "") +{ +DisplayName = "", +ExitConditions = new ExitConditions +{ +ExitCodes = {new ExitCodeMapping(1234, new ExitOptions +{ +JobAction = BatchJobAction.None, +DependencyAction = DependencyAction.Satisfy, +})}, +ExitCodeRanges = {new ExitCodeRangeMapping(1234, 1234, default)}, +PreProcessingError = default, +FileUploadError = default, +Default = default, +}, +ContainerSettings = new BatchTaskContainerSettings("") +{ +ContainerRunOptions = "", +Registry = new ContainerRegistryReference +{ +Username = "", +Password = "", +RegistryServer = "", +IdentityReference = new BatchNodeIdentityReference +{ +ResourceId = "", +}, +}, +WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, +}, +ResourceFiles = {new ResourceFile +{ +AutoStorageContainerName = "", +StorageContainerUrl = "", +HttpUrl = "", +BlobPrefix = "", +FilePath = "", +FileMode = "", +IdentityReference = default, +}}, +OutputFiles = {new OutputFile("", new OutputFileDestination +{ +Container = new OutputFileBlobContainerDestination("") +{ +Path = "", +IdentityReference = default, +UploadHeaders = {new HttpHeader("") +{ +Value = "", +}}, +}, +}, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, +EnvironmentSettings = {new EnvironmentSetting("") +{ +Value = "", +}}, +AffinityInfo = new AffinityInfo(""), +Constraints = new BatchTaskConstraints +{ +MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), +RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), +MaxTaskRetryCount = 1234, +}, +RequiredSlots = 1234, +UserIdentity = new UserIdentity +{ +Username = "", +AutoUser = new AutoUserSpecification +{ +Scope = AutoUserScope.Task, +ElevationLevel = ElevationLevel.NonAdmin, +}, +}, +MultiInstanceSettings = new MultiInstanceSettings("") +{ +NumberOfInstances = 1234, +CommonResourceFiles = {default}, +}, +DependsOn = new BatchTaskDependencies +{ +TaskIds = {""}, +TaskIdRanges = {new BatchTaskIdRange(1234, 1234)}, +}, +ApplicationPackageReferences = {new BatchApplicationPackageReference("") +{ +Version = "", +}}, +AuthenticationTokenSettings = new AuthenticationTokenSettings +{ +Access = {AccessScope.Job}, +}, +} + }); + Response response = client.CreateTaskCollection("", taskCollection, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_CreateTaskCollection_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchTaskGroup taskCollection = new BatchTaskGroup(new BatchTaskCreateContent[] + { +new BatchTaskCreateContent("", "") +{ +DisplayName = "", +ExitConditions = new ExitConditions +{ +ExitCodes = {new ExitCodeMapping(1234, new ExitOptions +{ +JobAction = BatchJobAction.None, +DependencyAction = DependencyAction.Satisfy, +})}, +ExitCodeRanges = {new ExitCodeRangeMapping(1234, 1234, default)}, +PreProcessingError = default, +FileUploadError = default, +Default = default, +}, +ContainerSettings = new BatchTaskContainerSettings("") +{ +ContainerRunOptions = "", +Registry = new ContainerRegistryReference +{ +Username = "", +Password = "", +RegistryServer = "", +IdentityReference = new BatchNodeIdentityReference +{ +ResourceId = "", +}, +}, +WorkingDirectory = ContainerWorkingDirectory.TaskWorkingDirectory, +}, +ResourceFiles = {new ResourceFile +{ +AutoStorageContainerName = "", +StorageContainerUrl = "", +HttpUrl = "", +BlobPrefix = "", +FilePath = "", +FileMode = "", +IdentityReference = default, +}}, +OutputFiles = {new OutputFile("", new OutputFileDestination +{ +Container = new OutputFileBlobContainerDestination("") +{ +Path = "", +IdentityReference = default, +UploadHeaders = {new HttpHeader("") +{ +Value = "", +}}, +}, +}, new OutputFileUploadConfig(OutputFileUploadCondition.TaskSuccess))}, +EnvironmentSettings = {new EnvironmentSetting("") +{ +Value = "", +}}, +AffinityInfo = new AffinityInfo(""), +Constraints = new BatchTaskConstraints +{ +MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), +RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), +MaxTaskRetryCount = 1234, +}, +RequiredSlots = 1234, +UserIdentity = new UserIdentity +{ +Username = "", +AutoUser = new AutoUserSpecification +{ +Scope = AutoUserScope.Task, +ElevationLevel = ElevationLevel.NonAdmin, +}, +}, +MultiInstanceSettings = new MultiInstanceSettings("") +{ +NumberOfInstances = 1234, +CommonResourceFiles = {default}, +}, +DependsOn = new BatchTaskDependencies +{ +TaskIds = {""}, +TaskIdRanges = {new BatchTaskIdRange(1234, 1234)}, +}, +ApplicationPackageReferences = {new BatchApplicationPackageReference("") +{ +Version = "", +}}, +AuthenticationTokenSettings = new AuthenticationTokenSettings +{ +Access = {AccessScope.Job}, +}, +} + }); + Response response = await client.CreateTaskCollectionAsync("", taskCollection, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_DeleteTask_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.DeleteTask("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_DeleteTask_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.DeleteTaskAsync("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_DeleteTask_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.DeleteTask("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_DeleteTask_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.DeleteTaskAsync("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetTask_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetTask("", "", null, null, null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetTask_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.GetTaskAsync("", "", null, null, null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetTask_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetTask("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetTask_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.GetTaskAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetTask_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetTask("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), new string[] { "" }, new string[] { "" }, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result.GetProperty("lastModified").ToString()); + Console.WriteLine(result.GetProperty("creationTime").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodes")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodes")[0].GetProperty("exitOptions").GetProperty("jobAction").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodes")[0].GetProperty("exitOptions").GetProperty("dependencyAction").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodeRanges")[0].GetProperty("start").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodeRanges")[0].GetProperty("end").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodeRanges")[0].GetProperty("exitOptions").GetProperty("jobAction").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodeRanges")[0].GetProperty("exitOptions").GetProperty("dependencyAction").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("preProcessingError").GetProperty("jobAction").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("preProcessingError").GetProperty("dependencyAction").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("fileUploadError").GetProperty("jobAction").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("fileUploadError").GetProperty("dependencyAction").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("default").GetProperty("jobAction").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("default").GetProperty("dependencyAction").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); + Console.WriteLine(result.GetProperty("previousState").ToString()); + Console.WriteLine(result.GetProperty("previousStateTransitionTime").ToString()); + Console.WriteLine(result.GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("filePattern").ToString()); + Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("path").ToString()); + Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("uploadOptions").GetProperty("uploadCondition").ToString()); + Console.WriteLine(result.GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("affinityInfo").GetProperty("affinityId").ToString()); + Console.WriteLine(result.GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); + Console.WriteLine(result.GetProperty("constraints").GetProperty("retentionTime").ToString()); + Console.WriteLine(result.GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("requiredSlots").ToString()); + Console.WriteLine(result.GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("exitCode").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("containerId").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("error").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("retryCount").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("lastRetryTime").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("requeueCount").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("lastRequeueTime").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("result").ToString()); + Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("affinityId").ToString()); + Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("nodeUrl").ToString()); + Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("poolId").ToString()); + Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("nodeId").ToString()); + Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("taskRootDirectory").ToString()); + Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("taskRootDirectoryUrl").ToString()); + Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("numberOfInstances").ToString()); + Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("coordinationCommandLine").ToString()); + Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("lastUpdateTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("userCPUTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("kernelCPUTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("wallClockTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("readIOps").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOps").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("readIOGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("waitTime").ToString()); + Console.WriteLine(result.GetProperty("dependsOn").GetProperty("taskIds")[0].ToString()); + Console.WriteLine(result.GetProperty("dependsOn").GetProperty("taskIdRanges")[0].GetProperty("start").ToString()); + Console.WriteLine(result.GetProperty("dependsOn").GetProperty("taskIdRanges")[0].GetProperty("end").ToString()); + Console.WriteLine(result.GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); + Console.WriteLine(result.GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("authenticationTokenSettings").GetProperty("access")[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetTask_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetTask("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), select: new string[] { "" }, expand: new string[] { "" }, requestConditions: null); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_ReplaceTask_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new object()); + Response response = client.ReplaceTask("", "", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_ReplaceTask_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.ReplaceTaskAsync("", "", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_ReplaceTask_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchTask task = new BatchTask(); + Response response = client.ReplaceTask("", "", task); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_ReplaceTask_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchTask task = new BatchTask(); + Response response = await client.ReplaceTaskAsync("", "", task); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_ReplaceTask_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + constraints = new + { + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + }); + Response response = client.ReplaceTask("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_ReplaceTask_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + constraints = new + { + maxWallClockTime = "PT1H23M45S", + retentionTime = "PT1H23M45S", + maxTaskRetryCount = 1234, + }, + }); + Response response = await client.ReplaceTaskAsync("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_ReplaceTask_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchTask task = new BatchTask + { + Constraints = new BatchTaskConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, + }; + Response response = client.ReplaceTask("", "", task, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_ReplaceTask_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchTask task = new BatchTask + { + Constraints = new BatchTaskConstraints + { + MaxWallClockTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + RetentionTime = XmlConvert.ToTimeSpan("PT1H23M45S"), + MaxTaskRetryCount = 1234, + }, + }; + Response response = await client.ReplaceTaskAsync("", "", task, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_TerminateTask_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.TerminateTask("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_TerminateTask_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.TerminateTaskAsync("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_TerminateTask_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.TerminateTask("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_TerminateTask_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.TerminateTaskAsync("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_ReactivateTask_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.ReactivateTask("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_ReactivateTask_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.ReactivateTaskAsync("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_ReactivateTask_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.ReactivateTask("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_ReactivateTask_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.ReactivateTaskAsync("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_DeleteTaskFile_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.DeleteTaskFile("", "", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_DeleteTaskFile_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.DeleteTaskFileAsync("", "", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_DeleteTaskFile_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.DeleteTaskFile("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), recursive: true); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_DeleteTaskFile_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.DeleteTaskFileAsync("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), recursive: true); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetTaskFile_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetTaskFile("", "", "", null, null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetTaskFile_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.GetTaskFileAsync("", "", "", null, null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetTaskFile_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetTaskFile("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetTaskFile_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.GetTaskFileAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetTaskFile_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetTaskFile("", "", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), "", null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetTaskFile_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.GetTaskFileAsync("", "", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), "", null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetTaskFile_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetTaskFile("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), ocpRange: "", requestConditions: null); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetTaskFile_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.GetTaskFileAsync("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), ocpRange: "", requestConditions: null); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_CreateNodeUser_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + name = "", + }); + Response response = client.CreateNodeUser("", "", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_CreateNodeUser_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + name = "", + }); + Response response = await client.CreateNodeUserAsync("", "", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_CreateNodeUser_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchNodeUserCreateContent user = new BatchNodeUserCreateContent(""); + Response response = client.CreateNodeUser("", "", user); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_CreateNodeUser_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchNodeUserCreateContent user = new BatchNodeUserCreateContent(""); + Response response = await client.CreateNodeUserAsync("", "", user); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_CreateNodeUser_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + name = "", + isAdmin = true, + expiryTime = "2022-05-10T18:57:31.2311892Z", + password = "", + sshPublicKey = "", + }); + Response response = client.CreateNodeUser("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_CreateNodeUser_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + name = "", + isAdmin = true, + expiryTime = "2022-05-10T18:57:31.2311892Z", + password = "", + sshPublicKey = "", + }); + Response response = await client.CreateNodeUserAsync("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_CreateNodeUser_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchNodeUserCreateContent user = new BatchNodeUserCreateContent("") + { + IsAdmin = true, + ExpiryTime = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + Password = "", + SshPublicKey = "", + }; + Response response = client.CreateNodeUser("", "", user, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_CreateNodeUser_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchNodeUserCreateContent user = new BatchNodeUserCreateContent("") + { + IsAdmin = true, + ExpiryTime = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + Password = "", + SshPublicKey = "", + }; + Response response = await client.CreateNodeUserAsync("", "", user, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_DeleteNodeUser_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.DeleteNodeUser("", "", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_DeleteNodeUser_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.DeleteNodeUserAsync("", "", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_DeleteNodeUser_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.DeleteNodeUser("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_DeleteNodeUser_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.DeleteNodeUserAsync("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_ReplaceNodeUser_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new object()); + Response response = client.ReplaceNodeUser("", "", "", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_ReplaceNodeUser_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.ReplaceNodeUserAsync("", "", "", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_ReplaceNodeUser_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchNodeUserUpdateContent content = new BatchNodeUserUpdateContent(); + Response response = client.ReplaceNodeUser("", "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_ReplaceNodeUser_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchNodeUserUpdateContent content = new BatchNodeUserUpdateContent(); + Response response = await client.ReplaceNodeUserAsync("", "", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_ReplaceNodeUser_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + password = "", + expiryTime = "2022-05-10T18:57:31.2311892Z", + sshPublicKey = "", + }); + Response response = client.ReplaceNodeUser("", "", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_ReplaceNodeUser_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + password = "", + expiryTime = "2022-05-10T18:57:31.2311892Z", + sshPublicKey = "", + }); + Response response = await client.ReplaceNodeUserAsync("", "", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_ReplaceNodeUser_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchNodeUserUpdateContent content = new BatchNodeUserUpdateContent + { + Password = "", + ExpiryTime = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + SshPublicKey = "", + }; + Response response = client.ReplaceNodeUser("", "", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_ReplaceNodeUser_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchNodeUserUpdateContent content = new BatchNodeUserUpdateContent + { + Password = "", + ExpiryTime = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + SshPublicKey = "", + }; + Response response = await client.ReplaceNodeUserAsync("", "", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetNode_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetNode("", "", null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetNode_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.GetNodeAsync("", "", null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetNode_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetNode("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetNode_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.GetNodeAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetNode_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetNode("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), new string[] { "" }, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("schedulingState").ToString()); + Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); + Console.WriteLine(result.GetProperty("lastBootTime").ToString()); + Console.WriteLine(result.GetProperty("allocationTime").ToString()); + Console.WriteLine(result.GetProperty("ipAddress").ToString()); + Console.WriteLine(result.GetProperty("affinityId").ToString()); + Console.WriteLine(result.GetProperty("vmSize").ToString()); + Console.WriteLine(result.GetProperty("totalTasksRun").ToString()); + Console.WriteLine(result.GetProperty("runningTasksCount").ToString()); + Console.WriteLine(result.GetProperty("runningTaskSlotsCount").ToString()); + Console.WriteLine(result.GetProperty("totalTasksSucceeded").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("taskUrl").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("taskId").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("subtaskId").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("taskState").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("exitCode").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("containerId").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("error").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("retryCount").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("lastRetryTime").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("requeueCount").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("lastRequeueTime").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("result").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("waitForSuccess").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("exitCode").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("containerInfo").GetProperty("containerId").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("containerInfo").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("containerInfo").GetProperty("error").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("retryCount").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("lastRetryTime").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("result").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("errorDetails")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("errorDetails")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("isDedicated").ToString()); + Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("protocol").ToString()); + Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("publicIPAddress").ToString()); + Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("publicFQDN").ToString()); + Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("frontendPort").ToString()); + Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("backendPort").ToString()); + Console.WriteLine(result.GetProperty("nodeAgentInfo").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("nodeAgentInfo").GetProperty("lastUpdateTime").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("publisher").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("offer").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("sku").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("exactVersion").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("scaleSetVmResourceId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetNode_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetNode("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), select: new string[] { "" }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_RebootNode_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = null; + Response response = client.RebootNode("", "", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_RebootNode_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = null; + Response response = await client.RebootNodeAsync("", "", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_RebootNode_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.RebootNode("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_RebootNode_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.RebootNodeAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_RebootNode_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + nodeRebootOption = "requeue", + }); + Response response = client.RebootNode("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_RebootNode_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + nodeRebootOption = "requeue", + }); + Response response = await client.RebootNodeAsync("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_RebootNode_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchNodeRebootContent parameters = new BatchNodeRebootContent + { + NodeRebootOption = BatchNodeRebootOption.Requeue, + }; + Response response = client.RebootNode("", "", parameters: parameters, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_RebootNode_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchNodeRebootContent parameters = new BatchNodeRebootContent + { + NodeRebootOption = BatchNodeRebootOption.Requeue, + }; + Response response = await client.RebootNodeAsync("", "", parameters: parameters, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_DisableNodeScheduling_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = null; + Response response = client.DisableNodeScheduling("", "", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_DisableNodeScheduling_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = null; + Response response = await client.DisableNodeSchedulingAsync("", "", content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_DisableNodeScheduling_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.DisableNodeScheduling("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_DisableNodeScheduling_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.DisableNodeSchedulingAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_DisableNodeScheduling_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + nodeDisableSchedulingOption = "requeue", + }); + Response response = client.DisableNodeScheduling("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_DisableNodeScheduling_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + nodeDisableSchedulingOption = "requeue", + }); + Response response = await client.DisableNodeSchedulingAsync("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_DisableNodeScheduling_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchNodeDisableSchedulingContent parameters = new BatchNodeDisableSchedulingContent + { + NodeDisableSchedulingOption = BatchNodeDisableSchedulingOption.Requeue, + }; + Response response = client.DisableNodeScheduling("", "", parameters: parameters, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_DisableNodeScheduling_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + BatchNodeDisableSchedulingContent parameters = new BatchNodeDisableSchedulingContent + { + NodeDisableSchedulingOption = BatchNodeDisableSchedulingOption.Requeue, + }; + Response response = await client.DisableNodeSchedulingAsync("", "", parameters: parameters, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_EnableNodeScheduling_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.EnableNodeScheduling("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_EnableNodeScheduling_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.EnableNodeSchedulingAsync("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_EnableNodeScheduling_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.EnableNodeScheduling("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_EnableNodeScheduling_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.EnableNodeSchedulingAsync("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetNodeRemoteLoginSettings_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetNodeRemoteLoginSettings("", "", null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("remoteLoginIPAddress").ToString()); + Console.WriteLine(result.GetProperty("remoteLoginPort").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetNodeRemoteLoginSettings_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.GetNodeRemoteLoginSettingsAsync("", "", null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("remoteLoginIPAddress").ToString()); + Console.WriteLine(result.GetProperty("remoteLoginPort").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetNodeRemoteLoginSettings_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetNodeRemoteLoginSettings("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetNodeRemoteLoginSettings_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.GetNodeRemoteLoginSettingsAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetNodeRemoteLoginSettings_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetNodeRemoteLoginSettings("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("remoteLoginIPAddress").ToString()); + Console.WriteLine(result.GetProperty("remoteLoginPort").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetNodeRemoteLoginSettings_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.GetNodeRemoteLoginSettingsAsync("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("remoteLoginIPAddress").ToString()); + Console.WriteLine(result.GetProperty("remoteLoginPort").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetNodeRemoteLoginSettings_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetNodeRemoteLoginSettings("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetNodeRemoteLoginSettings_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.GetNodeRemoteLoginSettingsAsync("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_UploadNodeLogs_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + containerUrl = "", + startTime = "2022-05-10T18:57:31.2311892Z", + }); + Response response = client.UploadNodeLogs("", "", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("virtualDirectoryName").ToString()); + Console.WriteLine(result.GetProperty("numberOfFilesUploaded").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_UploadNodeLogs_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + containerUrl = "", + startTime = "2022-05-10T18:57:31.2311892Z", + }); + Response response = await client.UploadNodeLogsAsync("", "", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("virtualDirectoryName").ToString()); + Console.WriteLine(result.GetProperty("numberOfFilesUploaded").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_UploadNodeLogs_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + UploadBatchServiceLogsContent content = new UploadBatchServiceLogsContent("", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); + Response response = client.UploadNodeLogs("", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_UploadNodeLogs_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + UploadBatchServiceLogsContent content = new UploadBatchServiceLogsContent("", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); + Response response = await client.UploadNodeLogsAsync("", "", content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_UploadNodeLogs_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + containerUrl = "", + startTime = "2022-05-10T18:57:31.2311892Z", + endTime = "2022-05-10T18:57:31.2311892Z", + identityReference = new + { + resourceId = "", + }, + }); + Response response = client.UploadNodeLogs("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("virtualDirectoryName").ToString()); + Console.WriteLine(result.GetProperty("numberOfFilesUploaded").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_UploadNodeLogs_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + containerUrl = "", + startTime = "2022-05-10T18:57:31.2311892Z", + endTime = "2022-05-10T18:57:31.2311892Z", + identityReference = new + { + resourceId = "", + }, + }); + Response response = await client.UploadNodeLogsAsync("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("virtualDirectoryName").ToString()); + Console.WriteLine(result.GetProperty("numberOfFilesUploaded").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_UploadNodeLogs_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + UploadBatchServiceLogsContent content = new UploadBatchServiceLogsContent("", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")) + { + EndTime = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + IdentityReference = new BatchNodeIdentityReference + { + ResourceId = "", + }, + }; + Response response = client.UploadNodeLogs("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_UploadNodeLogs_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + UploadBatchServiceLogsContent content = new UploadBatchServiceLogsContent("", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")) + { + EndTime = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + IdentityReference = new BatchNodeIdentityReference + { + ResourceId = "", + }, + }; + Response response = await client.UploadNodeLogsAsync("", "", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetNodeExtension_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetNodeExtension("", "", "", null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetNodeExtension_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.GetNodeExtensionAsync("", "", "", null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetNodeExtension_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetNodeExtension("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetNodeExtension_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.GetNodeExtensionAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetNodeExtension_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetNodeExtension("", "", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), new string[] { "" }, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("provisioningState").ToString()); + Console.WriteLine(result.GetProperty("vmExtension").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("vmExtension").GetProperty("publisher").ToString()); + Console.WriteLine(result.GetProperty("vmExtension").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("vmExtension").GetProperty("typeHandlerVersion").ToString()); + Console.WriteLine(result.GetProperty("vmExtension").GetProperty("autoUpgradeMinorVersion").ToString()); + Console.WriteLine(result.GetProperty("vmExtension").GetProperty("enableAutomaticUpgrade").ToString()); + Console.WriteLine(result.GetProperty("vmExtension").GetProperty("settings").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("vmExtension").GetProperty("protectedSettings").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("vmExtension").GetProperty("provisionAfterExtensions")[0].ToString()); + Console.WriteLine(result.GetProperty("instanceView").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("displayStatus").ToString()); + Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("level").ToString()); + Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("time").ToString()); + Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("displayStatus").ToString()); + Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("level").ToString()); + Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("time").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetNodeExtension_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetNodeExtension("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), select: new string[] { "" }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_DeleteNodeFile_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.DeleteNodeFile("", "", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_DeleteNodeFile_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.DeleteNodeFileAsync("", "", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_DeleteNodeFile_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.DeleteNodeFile("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), recursive: true); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_DeleteNodeFile_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.DeleteNodeFileAsync("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), recursive: true); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetNodeFile_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetNodeFile("", "", "", null, null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetNodeFile_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.GetNodeFileAsync("", "", "", null, null, null, null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetNodeFile_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetNodeFile("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetNodeFile_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.GetNodeFileAsync("", "", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetNodeFile_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetNodeFile("", "", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), "", null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetNodeFile_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.GetNodeFileAsync("", "", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), "", null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetNodeFile_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = client.GetNodeFile("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), ocpRange: "", requestConditions: null); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetNodeFile_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + Response response = await client.GetNodeFileAsync("", "", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), ocpRange: "", requestConditions: null); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetApplications_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BinaryData item in client.GetApplications(null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("versions")[0].ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetApplications_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BinaryData item in client.GetApplicationsAsync(null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("versions")[0].ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetApplications_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BatchApplication item in client.GetApplications()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetApplications_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BatchApplication item in client.GetApplicationsAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetApplications_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BinaryData item in client.GetApplications(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("versions")[0].ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetApplications_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BinaryData item in client.GetApplicationsAsync(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("versions")[0].ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetApplications_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BatchApplication item in client.GetApplications(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetApplications_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BatchApplication item in client.GetApplicationsAsync(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetPoolUsageMetrics_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BinaryData item in client.GetPoolUsageMetrics(null, null, null, null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("poolId").ToString()); + Console.WriteLine(result.GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("vmSize").ToString()); + Console.WriteLine(result.GetProperty("totalCoreHours").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetPoolUsageMetrics_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BinaryData item in client.GetPoolUsageMetricsAsync(null, null, null, null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("poolId").ToString()); + Console.WriteLine(result.GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("vmSize").ToString()); + Console.WriteLine(result.GetProperty("totalCoreHours").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetPoolUsageMetrics_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BatchPoolUsageMetrics item in client.GetPoolUsageMetrics()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetPoolUsageMetrics_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BatchPoolUsageMetrics item in client.GetPoolUsageMetricsAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetPoolUsageMetrics_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BinaryData item in client.GetPoolUsageMetrics(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), "", null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("poolId").ToString()); + Console.WriteLine(result.GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("vmSize").ToString()); + Console.WriteLine(result.GetProperty("totalCoreHours").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetPoolUsageMetrics_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BinaryData item in client.GetPoolUsageMetricsAsync(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), "", null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("poolId").ToString()); + Console.WriteLine(result.GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("vmSize").ToString()); + Console.WriteLine(result.GetProperty("totalCoreHours").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetPoolUsageMetrics_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BatchPoolUsageMetrics item in client.GetPoolUsageMetrics(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, starttime: DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), endtime: DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), filter: "")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetPoolUsageMetrics_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BatchPoolUsageMetrics item in client.GetPoolUsageMetricsAsync(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, starttime: DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), endtime: DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), filter: "")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetPools_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BinaryData item in client.GetPools(null, null, null, null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetPools_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BinaryData item in client.GetPoolsAsync(null, null, null, null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetPools_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BatchPool item in client.GetPools()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetPools_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BatchPool item in client.GetPoolsAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetPools_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BinaryData item in client.GetPools(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", new string[] { "" }, new string[] { "" }, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result.GetProperty("lastModified").ToString()); + Console.WriteLine(result.GetProperty("creationTime").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); + Console.WriteLine(result.GetProperty("allocationState").ToString()); + Console.WriteLine(result.GetProperty("allocationStateTransitionTime").ToString()); + Console.WriteLine(result.GetProperty("vmSize").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("publisher").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("offer").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("sku").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("exactVersion").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("nodeAgentSKUId").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("windowsConfiguration").GetProperty("enableAutomaticUpdates").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("lun").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("caching").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("storageAccountType").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("licenseType").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerImageNames")[0].ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("diskEncryptionConfiguration").GetProperty("targets")[0].ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("nodePlacementConfiguration").GetProperty("policy").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("publisher").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("typeHandlerVersion").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("autoUpgradeMinorVersion").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("enableAutomaticUpgrade").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("settings").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("protectedSettings").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("provisionAfterExtensions")[0].ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("ephemeralOSDiskSettings").GetProperty("placement").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("caching").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("managedDisk").GetProperty("storageAccountType").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("writeAcceleratorEnabled").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("encryptionAtHost").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("securityType").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("secureBootEnabled").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("vTpmEnabled").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("serviceArtifactReference").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("resizeTimeout").ToString()); + Console.WriteLine(result.GetProperty("resizeErrors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("resizeErrors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("resizeErrors")[0].GetProperty("values")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("resizeErrors")[0].GetProperty("values")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("resourceTags").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("currentDedicatedNodes").ToString()); + Console.WriteLine(result.GetProperty("currentLowPriorityNodes").ToString()); + Console.WriteLine(result.GetProperty("targetDedicatedNodes").ToString()); + Console.WriteLine(result.GetProperty("targetLowPriorityNodes").ToString()); + Console.WriteLine(result.GetProperty("enableAutoScale").ToString()); + Console.WriteLine(result.GetProperty("autoScaleFormula").ToString()); + Console.WriteLine(result.GetProperty("autoScaleEvaluationInterval").ToString()); + Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("timestamp").ToString()); + Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("results").ToString()); + Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("error").GetProperty("values")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("error").GetProperty("values")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("enableInterNodeCommunication").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("dynamicVNetAssignmentScope").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("protocol").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("backendPort").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeStart").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeEnd").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("priority").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("access").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourceAddressPrefix").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourcePortRanges")[0].ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("provision").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("ipAddressIds")[0].ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("enableAcceleratedNetworking").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("waitForSuccess").ToString()); + Console.WriteLine(result.GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); + Console.WriteLine(result.GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("taskSlotsPerNode").ToString()); + Console.WriteLine(result.GetProperty("taskSchedulingPolicy").GetProperty("nodeFillType").ToString()); + Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("uid").ToString()); + Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("gid").ToString()); + Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("sshPrivateKey").ToString()); + Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("windowsUserConfiguration").GetProperty("loginMode").ToString()); + Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("lastUpdateTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("usageStats").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("usageStats").GetProperty("lastUpdateTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("usageStats").GetProperty("dedicatedCoreTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("lastUpdateTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("avgCPUPercentage").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("avgMemoryGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("peakMemoryGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("avgDiskGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("peakDiskGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("diskReadIOps").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("diskWriteIOps").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("diskReadGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("diskWriteGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("networkReadGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("networkWriteGiB").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountName").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("containerName").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountKey").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("sasKey").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("blobfuseOptions").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("mountOptions").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("mountOptions").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountName").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("azureFileUrl").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountKey").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("mountOptions").ToString()); + Console.WriteLine(result.GetProperty("identity").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("identity").GetProperty("userAssignedIdentities")[0].GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("identity").GetProperty("userAssignedIdentities")[0].GetProperty("clientId").ToString()); + Console.WriteLine(result.GetProperty("identity").GetProperty("userAssignedIdentities")[0].GetProperty("principalId").ToString()); + Console.WriteLine(result.GetProperty("targetNodeCommunicationMode").ToString()); + Console.WriteLine(result.GetProperty("currentNodeCommunicationMode").ToString()); + Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("mode").ToString()); + Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("disableAutomaticRollback").ToString()); + Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("enableAutomaticOSUpgrade").ToString()); + Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("useRollingUpgradePolicy").ToString()); + Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("osRollingUpgradeDeferral").ToString()); + Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("enableCrossZoneUpgrade").ToString()); + Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxBatchInstancePercent").ToString()); + Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyInstancePercent").ToString()); + Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyUpgradedInstancePercent").ToString()); + Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("pauseTimeBetweenBatches").ToString()); + Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("prioritizeUnhealthyInstances").ToString()); + Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("rollbackFailedInstancesOnPolicyBreach").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetPools_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BatchPool item in client.GetPools(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", select: new string[] { "" }, expand: new string[] { "" })) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetSupportedImages_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BinaryData item in client.GetSupportedImages(null, null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("nodeAgentSKUId").ToString()); + Console.WriteLine(result.GetProperty("imageReference").ToString()); + Console.WriteLine(result.GetProperty("osType").ToString()); + Console.WriteLine(result.GetProperty("verificationType").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetSupportedImages_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BinaryData item in client.GetSupportedImagesAsync(null, null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("nodeAgentSKUId").ToString()); + Console.WriteLine(result.GetProperty("imageReference").ToString()); + Console.WriteLine(result.GetProperty("osType").ToString()); + Console.WriteLine(result.GetProperty("verificationType").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetSupportedImages_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BatchSupportedImage item in client.GetSupportedImages()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetSupportedImages_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BatchSupportedImage item in client.GetSupportedImagesAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetSupportedImages_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BinaryData item in client.GetSupportedImages(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("nodeAgentSKUId").ToString()); + Console.WriteLine(result.GetProperty("imageReference").GetProperty("publisher").ToString()); + Console.WriteLine(result.GetProperty("imageReference").GetProperty("offer").ToString()); + Console.WriteLine(result.GetProperty("imageReference").GetProperty("sku").ToString()); + Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); + Console.WriteLine(result.GetProperty("imageReference").GetProperty("exactVersion").ToString()); + Console.WriteLine(result.GetProperty("osType").ToString()); + Console.WriteLine(result.GetProperty("capabilities")[0].ToString()); + Console.WriteLine(result.GetProperty("batchSupportEndOfLife").ToString()); + Console.WriteLine(result.GetProperty("verificationType").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetSupportedImages_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BinaryData item in client.GetSupportedImagesAsync(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("nodeAgentSKUId").ToString()); + Console.WriteLine(result.GetProperty("imageReference").GetProperty("publisher").ToString()); + Console.WriteLine(result.GetProperty("imageReference").GetProperty("offer").ToString()); + Console.WriteLine(result.GetProperty("imageReference").GetProperty("sku").ToString()); + Console.WriteLine(result.GetProperty("imageReference").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); + Console.WriteLine(result.GetProperty("imageReference").GetProperty("exactVersion").ToString()); + Console.WriteLine(result.GetProperty("osType").ToString()); + Console.WriteLine(result.GetProperty("capabilities")[0].ToString()); + Console.WriteLine(result.GetProperty("batchSupportEndOfLife").ToString()); + Console.WriteLine(result.GetProperty("verificationType").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetSupportedImages_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BatchSupportedImage item in client.GetSupportedImages(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetSupportedImages_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BatchSupportedImage item in client.GetSupportedImagesAsync(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetPoolNodeCounts_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BinaryData item in client.GetPoolNodeCounts(null, null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("poolId").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetPoolNodeCounts_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BinaryData item in client.GetPoolNodeCountsAsync(null, null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("poolId").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetPoolNodeCounts_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BatchPoolNodeCounts item in client.GetPoolNodeCounts()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetPoolNodeCounts_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BatchPoolNodeCounts item in client.GetPoolNodeCountsAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetPoolNodeCounts_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BinaryData item in client.GetPoolNodeCounts(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("poolId").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("creating").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("idle").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("offline").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("preempted").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("rebooting").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("reimaging").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("running").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("starting").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("startTaskFailed").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("leavingPool").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("unknown").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("unusable").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("waitingForStartTask").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("total").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("upgradingOS").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("creating").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("idle").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("offline").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("preempted").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("rebooting").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("reimaging").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("running").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("starting").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("startTaskFailed").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("leavingPool").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("unknown").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("unusable").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("waitingForStartTask").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("total").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("upgradingOS").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetPoolNodeCounts_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BinaryData item in client.GetPoolNodeCountsAsync(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("poolId").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("creating").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("idle").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("offline").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("preempted").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("rebooting").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("reimaging").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("running").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("starting").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("startTaskFailed").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("leavingPool").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("unknown").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("unusable").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("waitingForStartTask").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("total").ToString()); + Console.WriteLine(result.GetProperty("dedicated").GetProperty("upgradingOS").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("creating").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("idle").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("offline").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("preempted").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("rebooting").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("reimaging").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("running").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("starting").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("startTaskFailed").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("leavingPool").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("unknown").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("unusable").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("waitingForStartTask").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("total").ToString()); + Console.WriteLine(result.GetProperty("lowPriority").GetProperty("upgradingOS").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetPoolNodeCounts_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BatchPoolNodeCounts item in client.GetPoolNodeCounts(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetPoolNodeCounts_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BatchPoolNodeCounts item in client.GetPoolNodeCountsAsync(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetJobs_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BinaryData item in client.GetJobs(null, null, null, null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("poolInfo").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetJobs_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BinaryData item in client.GetJobsAsync(null, null, null, null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("poolInfo").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetJobs_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BatchJob item in client.GetJobs()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetJobs_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BatchJob item in client.GetJobsAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetJobs_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BinaryData item in client.GetJobs(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", new string[] { "" }, new string[] { "" }, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("usesTaskDependencies").ToString()); + Console.WriteLine(result.GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result.GetProperty("lastModified").ToString()); + Console.WriteLine(result.GetProperty("creationTime").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); + Console.WriteLine(result.GetProperty("previousState").ToString()); + Console.WriteLine(result.GetProperty("previousStateTransitionTime").ToString()); + Console.WriteLine(result.GetProperty("priority").ToString()); + Console.WriteLine(result.GetProperty("allowTaskPreemption").ToString()); + Console.WriteLine(result.GetProperty("maxParallelTasks").ToString()); + Console.WriteLine(result.GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); + Console.WriteLine(result.GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("filePattern").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("path").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("uploadOptions").GetProperty("uploadCondition").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("requiredSlots").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("killJobOnCompletion").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("runExclusive").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("authenticationTokenSettings").GetProperty("access")[0].ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("allowLowPriorityNode").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("waitForSuccess").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("rerunOnNodeRebootAfterSuccess").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("maxWallClockTime").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("retentionTime").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("commonEnvironmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("commonEnvironmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("poolId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("autoPoolIdPrefix").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("poolLifetimeOption").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("keepAlive").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("vmSize").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("publisher").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("offer").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("sku").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("exactVersion").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodeAgentSKUId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("windowsConfiguration").GetProperty("enableAutomaticUpdates").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("lun").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("caching").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("storageAccountType").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("licenseType").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerImageNames")[0].ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("diskEncryptionConfiguration").GetProperty("targets")[0].ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodePlacementConfiguration").GetProperty("policy").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("publisher").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("typeHandlerVersion").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("autoUpgradeMinorVersion").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("enableAutomaticUpgrade").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("settings").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("protectedSettings").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("provisionAfterExtensions")[0].ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("ephemeralOSDiskSettings").GetProperty("placement").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("caching").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("managedDisk").GetProperty("storageAccountType").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("writeAcceleratorEnabled").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("encryptionAtHost").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("securityType").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("secureBootEnabled").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("vTpmEnabled").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("serviceArtifactReference").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSlotsPerNode").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSchedulingPolicy").GetProperty("nodeFillType").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resizeTimeout").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resourceTags").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetDedicatedNodes").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetLowPriorityNodes").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableAutoScale").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleFormula").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleEvaluationInterval").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableInterNodeCommunication").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("dynamicVNetAssignmentScope").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("protocol").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("backendPort").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeStart").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeEnd").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("priority").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("access").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourceAddressPrefix").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourcePortRanges")[0].ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("provision").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("ipAddressIds")[0].ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("enableAcceleratedNetworking").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("waitForSuccess").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("uid").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("gid").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("sshPrivateKey").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("windowsUserConfiguration").GetProperty("loginMode").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountName").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("containerName").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountKey").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("sasKey").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("blobfuseOptions").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("mountOptions").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("mountOptions").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountName").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("azureFileUrl").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountKey").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("mountOptions").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetNodeCommunicationMode").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("mode").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("disableAutomaticRollback").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("enableAutomaticOSUpgrade").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("useRollingUpgradePolicy").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("osRollingUpgradeDeferral").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("enableCrossZoneUpgrade").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxBatchInstancePercent").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyInstancePercent").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyUpgradedInstancePercent").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("pauseTimeBetweenBatches").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("prioritizeUnhealthyInstances").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("rollbackFailedInstancesOnPolicyBreach").ToString()); + Console.WriteLine(result.GetProperty("onAllTasksComplete").ToString()); + Console.WriteLine(result.GetProperty("onTaskFailure").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); + Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("poolId").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("details")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("details")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("terminateReason").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("lastUpdateTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("userCPUTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("kernelCPUTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("wallClockTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("readIOps").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOps").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("readIOGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("numSucceededTasks").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("numFailedTasks").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("numTaskRetries").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("waitTime").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetJobs_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BatchJob item in client.GetJobs(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", select: new string[] { "" }, expand: new string[] { "" })) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetJobsFromSchedules_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BinaryData item in client.GetJobsFromSchedules("", null, null, null, null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("poolInfo").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetJobsFromSchedules_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BinaryData item in client.GetJobsFromSchedulesAsync("", null, null, null, null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("poolInfo").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetJobsFromSchedules_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BatchJob item in client.GetJobsFromSchedules("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetJobsFromSchedules_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BatchJob item in client.GetJobsFromSchedulesAsync("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetJobsFromSchedules_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BinaryData item in client.GetJobsFromSchedules("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", new string[] { "" }, new string[] { "" }, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("usesTaskDependencies").ToString()); + Console.WriteLine(result.GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result.GetProperty("lastModified").ToString()); + Console.WriteLine(result.GetProperty("creationTime").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); + Console.WriteLine(result.GetProperty("previousState").ToString()); + Console.WriteLine(result.GetProperty("previousStateTransitionTime").ToString()); + Console.WriteLine(result.GetProperty("priority").ToString()); + Console.WriteLine(result.GetProperty("allowTaskPreemption").ToString()); + Console.WriteLine(result.GetProperty("maxParallelTasks").ToString()); + Console.WriteLine(result.GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); + Console.WriteLine(result.GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("filePattern").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("path").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("uploadOptions").GetProperty("uploadCondition").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("requiredSlots").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("killJobOnCompletion").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("runExclusive").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("authenticationTokenSettings").GetProperty("access")[0].ToString()); + Console.WriteLine(result.GetProperty("jobManagerTask").GetProperty("allowLowPriorityNode").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("waitForSuccess").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTask").GetProperty("rerunOnNodeRebootAfterSuccess").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("maxWallClockTime").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("retentionTime").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("commonEnvironmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("commonEnvironmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("poolId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("autoPoolIdPrefix").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("poolLifetimeOption").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("keepAlive").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("vmSize").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("publisher").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("offer").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("sku").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("exactVersion").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodeAgentSKUId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("windowsConfiguration").GetProperty("enableAutomaticUpdates").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("lun").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("caching").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("storageAccountType").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("licenseType").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerImageNames")[0].ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("diskEncryptionConfiguration").GetProperty("targets")[0].ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodePlacementConfiguration").GetProperty("policy").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("publisher").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("typeHandlerVersion").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("autoUpgradeMinorVersion").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("enableAutomaticUpgrade").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("settings").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("protectedSettings").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("provisionAfterExtensions")[0].ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("ephemeralOSDiskSettings").GetProperty("placement").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("caching").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("managedDisk").GetProperty("storageAccountType").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("writeAcceleratorEnabled").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("encryptionAtHost").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("securityType").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("secureBootEnabled").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("vTpmEnabled").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("serviceArtifactReference").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSlotsPerNode").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSchedulingPolicy").GetProperty("nodeFillType").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resizeTimeout").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resourceTags").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetDedicatedNodes").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetLowPriorityNodes").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableAutoScale").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleFormula").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleEvaluationInterval").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableInterNodeCommunication").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("dynamicVNetAssignmentScope").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("protocol").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("backendPort").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeStart").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeEnd").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("priority").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("access").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourceAddressPrefix").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourcePortRanges")[0].ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("provision").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("ipAddressIds")[0].ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("enableAcceleratedNetworking").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("waitForSuccess").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("uid").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("gid").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("sshPrivateKey").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("windowsUserConfiguration").GetProperty("loginMode").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountName").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("containerName").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountKey").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("sasKey").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("blobfuseOptions").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("mountOptions").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("mountOptions").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountName").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("azureFileUrl").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountKey").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("mountOptions").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetNodeCommunicationMode").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("mode").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("disableAutomaticRollback").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("enableAutomaticOSUpgrade").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("useRollingUpgradePolicy").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("osRollingUpgradeDeferral").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("enableCrossZoneUpgrade").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxBatchInstancePercent").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyInstancePercent").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyUpgradedInstancePercent").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("pauseTimeBetweenBatches").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("prioritizeUnhealthyInstances").ToString()); + Console.WriteLine(result.GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("rollbackFailedInstancesOnPolicyBreach").ToString()); + Console.WriteLine(result.GetProperty("onAllTasksComplete").ToString()); + Console.WriteLine(result.GetProperty("onTaskFailure").ToString()); + Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); + Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("poolId").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("details")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("schedulingError").GetProperty("details")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("terminateReason").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("lastUpdateTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("userCPUTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("kernelCPUTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("wallClockTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("readIOps").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOps").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("readIOGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("numSucceededTasks").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("numFailedTasks").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("numTaskRetries").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("waitTime").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetJobsFromSchedules_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BatchJob item in client.GetJobsFromSchedules("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", select: new string[] { "" }, expand: new string[] { "" })) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetJobPreparationAndReleaseTaskStatuses_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BinaryData item in client.GetJobPreparationAndReleaseTaskStatuses("", null, null, null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetJobPreparationAndReleaseTaskStatuses_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BinaryData item in client.GetJobPreparationAndReleaseTaskStatusesAsync("", null, null, null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetJobPreparationAndReleaseTaskStatuses_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BatchJobPreparationAndReleaseTaskStatus item in client.GetJobPreparationAndReleaseTaskStatuses("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetJobPreparationAndReleaseTaskStatuses_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BatchJobPreparationAndReleaseTaskStatus item in client.GetJobPreparationAndReleaseTaskStatusesAsync("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetJobPreparationAndReleaseTaskStatuses_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BinaryData item in client.GetJobPreparationAndReleaseTaskStatuses("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", new string[] { "" }, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("poolId").ToString()); + Console.WriteLine(result.GetProperty("nodeId").ToString()); + Console.WriteLine(result.GetProperty("nodeUrl").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("taskRootDirectory").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("taskRootDirectoryUrl").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("exitCode").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("containerInfo").GetProperty("containerId").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("containerInfo").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("containerInfo").GetProperty("error").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("failureInfo").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("failureInfo").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("failureInfo").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("retryCount").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("lastRetryTime").ToString()); + Console.WriteLine(result.GetProperty("jobPreparationTaskExecutionInfo").GetProperty("result").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("taskRootDirectory").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("taskRootDirectoryUrl").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("exitCode").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("containerInfo").GetProperty("containerId").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("containerInfo").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("containerInfo").GetProperty("error").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("failureInfo").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("failureInfo").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("failureInfo").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobReleaseTaskExecutionInfo").GetProperty("result").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetJobPreparationAndReleaseTaskStatuses_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BatchJobPreparationAndReleaseTaskStatus item in client.GetJobPreparationAndReleaseTaskStatuses("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", select: new string[] { "" })) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetJobSchedules_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BinaryData item in client.GetJobSchedules(null, null, null, null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetJobSchedules_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BinaryData item in client.GetJobSchedulesAsync(null, null, null, null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetJobSchedules_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BatchJobSchedule item in client.GetJobSchedules()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetJobSchedules_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BatchJobSchedule item in client.GetJobSchedulesAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetJobSchedules_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BinaryData item in client.GetJobSchedules(1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", new string[] { "" }, new string[] { "" }, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result.GetProperty("lastModified").ToString()); + Console.WriteLine(result.GetProperty("creationTime").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); + Console.WriteLine(result.GetProperty("previousState").ToString()); + Console.WriteLine(result.GetProperty("previousStateTransitionTime").ToString()); + Console.WriteLine(result.GetProperty("schedule").GetProperty("doNotRunUntil").ToString()); + Console.WriteLine(result.GetProperty("schedule").GetProperty("doNotRunAfter").ToString()); + Console.WriteLine(result.GetProperty("schedule").GetProperty("startWindow").ToString()); + Console.WriteLine(result.GetProperty("schedule").GetProperty("recurrenceInterval").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("priority").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("allowTaskPreemption").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("maxParallelTasks").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("usesTaskDependencies").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("onAllTasksComplete").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("onTaskFailure").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("filePattern").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("path").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("outputFiles")[0].GetProperty("uploadOptions").GetProperty("uploadCondition").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("requiredSlots").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("killJobOnCompletion").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("runExclusive").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("authenticationTokenSettings").GetProperty("access")[0].ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobManagerTask").GetProperty("allowLowPriorityNode").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("retentionTime").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("waitForSuccess").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobPreparationTask").GetProperty("rerunOnNodeRebootAfterSuccess").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("maxWallClockTime").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("retentionTime").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("jobReleaseTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("commonEnvironmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("commonEnvironmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("poolId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("autoPoolIdPrefix").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("poolLifetimeOption").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("keepAlive").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("vmSize").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("publisher").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("offer").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("sku").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("exactVersion").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodeAgentSKUId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("windowsConfiguration").GetProperty("enableAutomaticUpdates").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("lun").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("caching").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("storageAccountType").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("licenseType").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerImageNames")[0].ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("diskEncryptionConfiguration").GetProperty("targets")[0].ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("nodePlacementConfiguration").GetProperty("policy").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("publisher").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("typeHandlerVersion").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("autoUpgradeMinorVersion").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("enableAutomaticUpgrade").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("settings").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("protectedSettings").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("provisionAfterExtensions")[0].ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("ephemeralOSDiskSettings").GetProperty("placement").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("caching").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("diskSizeGB").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("managedDisk").GetProperty("storageAccountType").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("writeAcceleratorEnabled").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("encryptionAtHost").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("securityType").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("secureBootEnabled").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("vTpmEnabled").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("virtualMachineConfiguration").GetProperty("serviceArtifactReference").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSlotsPerNode").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("taskSchedulingPolicy").GetProperty("nodeFillType").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resizeTimeout").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("resourceTags").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetDedicatedNodes").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetLowPriorityNodes").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableAutoScale").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleFormula").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("autoScaleEvaluationInterval").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("enableInterNodeCommunication").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("subnetId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("dynamicVNetAssignmentScope").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("protocol").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("backendPort").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeStart").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeEnd").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("priority").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("access").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourceAddressPrefix").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourcePortRanges")[0].ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("provision").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("ipAddressIds")[0].ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("networkConfiguration").GetProperty("enableAcceleratedNetworking").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("startTask").GetProperty("waitForSuccess").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("uid").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("gid").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("sshPrivateKey").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("userAccounts")[0].GetProperty("windowsUserConfiguration").GetProperty("loginMode").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("metadata")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("containerName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountKey").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("sasKey").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("blobfuseOptions").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("mountOptions").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("mountOptions").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountName").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("azureFileUrl").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountKey").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("relativeMountPath").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("mountOptions").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("targetNodeCommunicationMode").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("mode").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("disableAutomaticRollback").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("enableAutomaticOSUpgrade").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("useRollingUpgradePolicy").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("osRollingUpgradeDeferral").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("enableCrossZoneUpgrade").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxBatchInstancePercent").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyInstancePercent").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyUpgradedInstancePercent").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("pauseTimeBetweenBatches").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("prioritizeUnhealthyInstances").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("poolInfo").GetProperty("autoPoolSpecification").GetProperty("pool").GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("rollbackFailedInstancesOnPolicyBreach").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("metadata")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("jobSpecification").GetProperty("metadata")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("nextRunTime").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("recentJob").GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("recentJob").GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("lastUpdateTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("userCPUTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("kernelCPUTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("wallClockTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("readIOps").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOps").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("readIOGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("numSucceededTasks").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("numFailedTasks").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("numTaskRetries").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("waitTime").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetJobSchedules_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BatchJobSchedule item in client.GetJobSchedules(timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", select: new string[] { "" }, expand: new string[] { "" })) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetTasks_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BinaryData item in client.GetTasks("", null, null, null, null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetTasks_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BinaryData item in client.GetTasksAsync("", null, null, null, null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetTasks_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BatchTask item in client.GetTasks("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetTasks_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BatchTask item in client.GetTasksAsync("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetTasks_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BinaryData item in client.GetTasks("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", new string[] { "" }, new string[] { "" }, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result.GetProperty("lastModified").ToString()); + Console.WriteLine(result.GetProperty("creationTime").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodes")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodes")[0].GetProperty("exitOptions").GetProperty("jobAction").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodes")[0].GetProperty("exitOptions").GetProperty("dependencyAction").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodeRanges")[0].GetProperty("start").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodeRanges")[0].GetProperty("end").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodeRanges")[0].GetProperty("exitOptions").GetProperty("jobAction").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("exitCodeRanges")[0].GetProperty("exitOptions").GetProperty("dependencyAction").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("preProcessingError").GetProperty("jobAction").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("preProcessingError").GetProperty("dependencyAction").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("fileUploadError").GetProperty("jobAction").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("fileUploadError").GetProperty("dependencyAction").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("default").GetProperty("jobAction").ToString()); + Console.WriteLine(result.GetProperty("exitConditions").GetProperty("default").GetProperty("dependencyAction").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); + Console.WriteLine(result.GetProperty("previousState").ToString()); + Console.WriteLine(result.GetProperty("previousStateTransitionTime").ToString()); + Console.WriteLine(result.GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("filePattern").ToString()); + Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("path").ToString()); + Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("containerUrl").ToString()); + Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("destination").GetProperty("container").GetProperty("uploadHeaders")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("outputFiles")[0].GetProperty("uploadOptions").GetProperty("uploadCondition").ToString()); + Console.WriteLine(result.GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("affinityInfo").GetProperty("affinityId").ToString()); + Console.WriteLine(result.GetProperty("constraints").GetProperty("maxWallClockTime").ToString()); + Console.WriteLine(result.GetProperty("constraints").GetProperty("retentionTime").ToString()); + Console.WriteLine(result.GetProperty("constraints").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("requiredSlots").ToString()); + Console.WriteLine(result.GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("exitCode").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("containerId").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("error").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("retryCount").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("lastRetryTime").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("requeueCount").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("lastRequeueTime").ToString()); + Console.WriteLine(result.GetProperty("executionInfo").GetProperty("result").ToString()); + Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("affinityId").ToString()); + Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("nodeUrl").ToString()); + Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("poolId").ToString()); + Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("nodeId").ToString()); + Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("taskRootDirectory").ToString()); + Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("taskRootDirectoryUrl").ToString()); + Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("numberOfInstances").ToString()); + Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("coordinationCommandLine").ToString()); + Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("multiInstanceSettings").GetProperty("commonResourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("lastUpdateTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("userCPUTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("kernelCPUTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("wallClockTime").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("readIOps").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOps").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("readIOGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("writeIOGiB").ToString()); + Console.WriteLine(result.GetProperty("stats").GetProperty("waitTime").ToString()); + Console.WriteLine(result.GetProperty("dependsOn").GetProperty("taskIds")[0].ToString()); + Console.WriteLine(result.GetProperty("dependsOn").GetProperty("taskIdRanges")[0].GetProperty("start").ToString()); + Console.WriteLine(result.GetProperty("dependsOn").GetProperty("taskIdRanges")[0].GetProperty("end").ToString()); + Console.WriteLine(result.GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString()); + Console.WriteLine(result.GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("authenticationTokenSettings").GetProperty("access")[0].ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetTasks_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BatchTask item in client.GetTasks("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", select: new string[] { "" }, expand: new string[] { "" })) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetSubTasks_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BinaryData item in client.GetSubTasks("", "", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetSubTasks_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BinaryData item in client.GetSubTasksAsync("", "", null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetSubTasks_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BatchSubtask item in client.GetSubTasks("", "")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetSubTasks_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BatchSubtask item in client.GetSubTasksAsync("", "")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetSubTasks_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BinaryData item in client.GetSubTasks("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), new string[] { "" }, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("affinityId").ToString()); + Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("nodeUrl").ToString()); + Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("poolId").ToString()); + Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("nodeId").ToString()); + Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("taskRootDirectory").ToString()); + Console.WriteLine(result.GetProperty("nodeInfo").GetProperty("taskRootDirectoryUrl").ToString()); + Console.WriteLine(result.GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("exitCode").ToString()); + Console.WriteLine(result.GetProperty("containerInfo").GetProperty("containerId").ToString()); + Console.WriteLine(result.GetProperty("containerInfo").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("containerInfo").GetProperty("error").ToString()); + Console.WriteLine(result.GetProperty("failureInfo").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("failureInfo").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("failureInfo").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("failureInfo").GetProperty("details")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("failureInfo").GetProperty("details")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); + Console.WriteLine(result.GetProperty("previousState").ToString()); + Console.WriteLine(result.GetProperty("previousStateTransitionTime").ToString()); + Console.WriteLine(result.GetProperty("result").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetSubTasks_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BatchSubtask item in client.GetSubTasks("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), select: new string[] { "" })) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetTaskFiles_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BinaryData item in client.GetTaskFiles("", "", null, null, null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetTaskFiles_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BinaryData item in client.GetTaskFilesAsync("", "", null, null, null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetTaskFiles_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BatchNodeFile item in client.GetTaskFiles("", "")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetTaskFiles_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BatchNodeFile item in client.GetTaskFilesAsync("", "")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetTaskFiles_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BinaryData item in client.GetTaskFiles("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", true, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("isDirectory").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("creationTime").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("lastModified").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("contentLength").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("contentType").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("fileMode").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetTaskFiles_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BinaryData item in client.GetTaskFilesAsync("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", true, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("isDirectory").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("creationTime").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("lastModified").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("contentLength").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("contentType").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("fileMode").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetTaskFiles_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BatchNodeFile item in client.GetTaskFiles("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", recursive: true)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetTaskFiles_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BatchNodeFile item in client.GetTaskFilesAsync("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", recursive: true)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetNodes_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BinaryData item in client.GetNodes("", null, null, null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetNodes_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BinaryData item in client.GetNodesAsync("", null, null, null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetNodes_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BatchNode item in client.GetNodes("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetNodes_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BatchNode item in client.GetNodesAsync("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetNodes_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BinaryData item in client.GetNodes("", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", new string[] { "" }, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("schedulingState").ToString()); + Console.WriteLine(result.GetProperty("stateTransitionTime").ToString()); + Console.WriteLine(result.GetProperty("lastBootTime").ToString()); + Console.WriteLine(result.GetProperty("allocationTime").ToString()); + Console.WriteLine(result.GetProperty("ipAddress").ToString()); + Console.WriteLine(result.GetProperty("affinityId").ToString()); + Console.WriteLine(result.GetProperty("vmSize").ToString()); + Console.WriteLine(result.GetProperty("totalTasksRun").ToString()); + Console.WriteLine(result.GetProperty("runningTasksCount").ToString()); + Console.WriteLine(result.GetProperty("runningTaskSlotsCount").ToString()); + Console.WriteLine(result.GetProperty("totalTasksSucceeded").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("taskUrl").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("jobId").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("taskId").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("subtaskId").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("taskState").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("exitCode").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("containerId").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("containerInfo").GetProperty("error").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("retryCount").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("lastRetryTime").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("requeueCount").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("lastRequeueTime").ToString()); + Console.WriteLine(result.GetProperty("recentTasks")[0].GetProperty("executionInfo").GetProperty("result").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("commandLine").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("imageName").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("username").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("maxTaskRetryCount").ToString()); + Console.WriteLine(result.GetProperty("startTask").GetProperty("waitForSuccess").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("endTime").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("exitCode").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("containerInfo").GetProperty("containerId").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("containerInfo").GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("containerInfo").GetProperty("error").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("failureInfo").GetProperty("details")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("retryCount").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("lastRetryTime").ToString()); + Console.WriteLine(result.GetProperty("startTaskInfo").GetProperty("result").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("errorDetails")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("errors")[0].GetProperty("errorDetails")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("isDedicated").ToString()); + Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("protocol").ToString()); + Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("publicIPAddress").ToString()); + Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("publicFQDN").ToString()); + Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("frontendPort").ToString()); + Console.WriteLine(result.GetProperty("endpointConfiguration").GetProperty("inboundEndpoints")[0].GetProperty("backendPort").ToString()); + Console.WriteLine(result.GetProperty("nodeAgentInfo").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("nodeAgentInfo").GetProperty("lastUpdateTime").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("publisher").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("offer").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("sku").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("imageReference").GetProperty("exactVersion").ToString()); + Console.WriteLine(result.GetProperty("virtualMachineInfo").GetProperty("scaleSetVmResourceId").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetNodes_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BatchNode item in client.GetNodes("", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", select: new string[] { "" })) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetNodeExtensions_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BinaryData item in client.GetNodeExtensions("", "", null, null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetNodeExtensions_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BinaryData item in client.GetNodeExtensionsAsync("", "", null, null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetNodeExtensions_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BatchNodeVMExtension item in client.GetNodeExtensions("", "")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetNodeExtensions_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BatchNodeVMExtension item in client.GetNodeExtensionsAsync("", "")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetNodeExtensions_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BinaryData item in client.GetNodeExtensions("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, new string[] { "" }, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("provisioningState").ToString()); + Console.WriteLine(result.GetProperty("vmExtension").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("vmExtension").GetProperty("publisher").ToString()); + Console.WriteLine(result.GetProperty("vmExtension").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("vmExtension").GetProperty("typeHandlerVersion").ToString()); + Console.WriteLine(result.GetProperty("vmExtension").GetProperty("autoUpgradeMinorVersion").ToString()); + Console.WriteLine(result.GetProperty("vmExtension").GetProperty("enableAutomaticUpgrade").ToString()); + Console.WriteLine(result.GetProperty("vmExtension").GetProperty("settings").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("vmExtension").GetProperty("protectedSettings").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("vmExtension").GetProperty("provisionAfterExtensions")[0].ToString()); + Console.WriteLine(result.GetProperty("instanceView").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("displayStatus").ToString()); + Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("level").ToString()); + Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("instanceView").GetProperty("statuses")[0].GetProperty("time").ToString()); + Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("displayStatus").ToString()); + Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("level").ToString()); + Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("instanceView").GetProperty("subStatuses")[0].GetProperty("time").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetNodeExtensions_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BatchNodeVMExtension item in client.GetNodeExtensions("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, select: new string[] { "" })) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetNodeFiles_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BinaryData item in client.GetNodeFiles("", "", null, null, null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetNodeFiles_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BinaryData item in client.GetNodeFilesAsync("", "", null, null, null, null, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetNodeFiles_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BatchNodeFile item in client.GetNodeFiles("", "")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetNodeFiles_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BatchNodeFile item in client.GetNodeFilesAsync("", "")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetNodeFiles_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BinaryData item in client.GetNodeFiles("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", true, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("isDirectory").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("creationTime").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("lastModified").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("contentLength").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("contentType").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("fileMode").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetNodeFiles_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BinaryData item in client.GetNodeFilesAsync("", "", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), 1234, "", true, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("url").ToString()); + Console.WriteLine(result.GetProperty("isDirectory").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("creationTime").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("lastModified").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("contentLength").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("contentType").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("fileMode").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Batch_GetNodeFiles_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + foreach (BatchNodeFile item in client.GetNodeFiles("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", recursive: true)) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Batch_GetNodeFiles_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + BatchClient client = new BatchClient(endpoint, credential); + + await foreach (BatchNodeFile item in client.GetNodeFilesAsync("", "", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), maxresults: 1234, filter: "", recursive: true)) + { + } + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/tests/Infrastructure/BatchLiveTestBase.cs b/sdk/batch/Azure.Compute.Batch/tests/Infrastructure/BatchLiveTestBase.cs new file mode 100644 index 0000000000000..aeb839d94f866 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/tests/Infrastructure/BatchLiveTestBase.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.Identity; +using Microsoft.Identity.Client.Platforms.Features.DesktopOs.Kerberos; +using Azure.Compute.Batch; + +namespace Azure.Compute.Batch.Tests.Infrastructure +{ + public class BatchLiveTestBase : RecordedTestBase + { + public enum TestAuthMethods + { + Default, + ClientSecret, + NamedKey + }; + + public BatchLiveTestBase(bool isAsync, RecordedTestMode? mode = null) : base(isAsync, mode) + { + SanitizedHeaders.Add("client-request-id"); + UseDefaultGuidFormatForClientRequestId = true; + } + + public BatchLiveTestBase(bool isAsync) : base(isAsync) + { + SanitizedHeaders.Add("client-request-id"); + UseDefaultGuidFormatForClientRequestId = true; + } + + public bool IsPlayBack() + { + return this.Mode == RecordedTestMode.Playback; + } + + /// + /// Creates a with the endpoint and API key provided via environment + /// variables and instruments it to make use of the Azure Core Test Framework functionalities. + /// + /// Whether or not to use a to authenticate. An is used by default. + /// Whether or not instrumenting should be skipped. Avoid skipping it as much as possible. + /// The instrumented . + public BatchClient CreateBatchClient(TestAuthMethods testAuthMethod = TestAuthMethods.ClientSecret, bool skipInstrumenting = false) + { + var options = InstrumentClientOptions(new BatchClientOptions()); + BatchClient client; + Uri uri = new Uri("https://" + TestEnvironment.BatchAccountURI); + + var authorityHost = TestEnvironment.AuthorityHostUrl; + switch (testAuthMethod) + { + case TestAuthMethods.ClientSecret: + { + client = new BatchClient(uri, TestEnvironment.Credential, options); + } + break; + case TestAuthMethods.NamedKey: + { + var credential = new AzureNamedKeyCredential(TestEnvironment.BatchAccountName, TestEnvironment.BatchAccountKey); + client = new BatchClient(uri, credential, options); + } + break; + default: + { + var credential = new DefaultAzureCredential(); + client = new BatchClient(uri, credential, options); + } + break; + } + return skipInstrumenting ? client : InstrumentClient(client); + } + + /// + /// Poll all the tasks in the given job and wait for them to reach the completed state. + /// + /// The ID of the job to poll + /// A task that will complete when all Batch tasks have completed. + /// Thrown if all tasks haven't reached the completed state after a certain period of time + public async Task WaitForTasksToComplete(BatchClient client, String jobId, bool isPlayBackMode = false) + { + // Note that this timeout should take into account the time it takes for the pool to scale up + var timeoutAfter = DateTime.Now.AddMinutes(10); + while (DateTime.Now < timeoutAfter) + { + var allComplete = true; + var tasks = client.GetTasksAsync(jobId, select: new string[] { "id", "state" }); + await foreach (BatchTask task in tasks) + { + if (task.State != BatchTaskState.Completed) + { + allComplete = false; + break; + } + } + + if (allComplete) + { + return; + } + + if (isPlayBackMode == false) + { await Task.Delay(10000); } + } + + throw new TimeoutException("Task(s) did not complete within the specified time"); + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/tests/Infrastructure/BatchLiveTestEnvironment.cs b/sdk/batch/Azure.Compute.Batch/tests/Infrastructure/BatchLiveTestEnvironment.cs new file mode 100644 index 0000000000000..c5dabc42041c8 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/tests/Infrastructure/BatchLiveTestEnvironment.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Azure.Core.TestFramework; + +namespace Azure.Compute.Batch.Tests.Infrastructure +{ + public class BatchLiveTestEnvironment : TestEnvironment + { + public string BatchAccountName => GetRecordedVariable("batch_account_name"); + + public string BatchAccountURI => GetRecordedVariable("batch_account_uri"); + + public string BatchAccountKey => GetRecordedVariable("batch_account_key"); + } +} diff --git a/sdk/batch/Azure.Compute.Batch/tests/Infrastructure/PoolFixture.cs b/sdk/batch/Azure.Compute.Batch/tests/Infrastructure/PoolFixture.cs new file mode 100644 index 0000000000000..784f2b214f9cc --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/tests/Infrastructure/PoolFixture.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using Azure.Compute.Batch; + +namespace Azure.Compute.Batch.Tests.Infrastructure +{ + public class PoolFixture + { + public const string OSFamily = "4"; + public const string VMSize = "STANDARD_D1_v2"; + public const string AdminUserAccountName = "BatchTestAdmin"; + public const string NonAdminUserAccountName = "BatchTestNonAdmin"; + + public BatchPool Pool { get; protected set; } + + public string PoolId { get; private set; } + + public bool PlayBack { get; private set; } + + protected readonly BatchClient client; + + protected PoolFixture(string poolId, BatchClient batchClient, bool isPlayback) + { + PoolId = poolId; + client = batchClient; + PlayBack = isPlayback; + } + + public async Task FindPoolIfExistsAsync() + { + // reuse existing pool if it exists + client.GetPoolsAsync(maxresults: 100, timeOutInSeconds: 10); + AsyncPageable batchPools = client.GetPoolsAsync(); + + await foreach (BatchPool curPool in batchPools) + { + if (curPool.Id.Equals(PoolId)) + { + return curPool; + } + } + + return null; + } + + public async Task WaitForPoolAllocation(BatchClient client, string poolId) + { + BatchPool thePool = await client.GetPoolAsync(poolId); + + //Wait for pool to be in a usable state + //TODO: Use a Utilities waiter + TimeSpan computeNodeAllocationTimeout = TimeSpan.FromMinutes(10); + await TestUtilities.WaitForPoolToReachStateAsync(client, poolId, AllocationState.Steady, computeNodeAllocationTimeout, PlayBack); + + //Wait for the compute nodes in the pool to be in a usable state + //TODO: Use a Utilities waiter + TimeSpan computeNodeSteadyTimeout = TimeSpan.FromMinutes(25); + DateTime allocationWaitStartTime = DateTime.UtcNow; + DateTime timeoutAfterThisTimeUtc = allocationWaitStartTime.Add(computeNodeSteadyTimeout); + + List computeNodes= await client.GetNodesAsync(poolId).ToEnumerableAsync(); + + while (computeNodes.Any(computeNode => computeNode.State != BatchNodeState.Idle)) + { + if (!PlayBack) + { Thread.Sleep(TimeSpan.FromSeconds(10)); } + + computeNodes = await client.GetNodesAsync(poolId).ToEnumerableAsync(); + if (DateTime.UtcNow > timeoutAfterThisTimeUtc) + { + throw new Exception("CreatePool: Timed out waiting for compute nodes in pool to reach idle state. Timeout: " + computeNodeSteadyTimeout.ToString()); + } + } + + return thePool; + } + + public async void WaitForPoolDeletion(BatchClient client, string poolId) + { + BatchPool thePool = await client.GetPoolAsync(poolId); + + TimeSpan deletionOperationTimeout = TimeSpan.FromMinutes(10); + DateTime allocationWaitStartTime = DateTime.UtcNow; + DateTime timeoutAfterThisTimeUtc = allocationWaitStartTime.Add(deletionOperationTimeout); + + while (thePool != null) + { + if (!PlayBack) + { Thread.Sleep(TimeSpan.FromSeconds(10)); } + + thePool = await client.GetPoolAsync(poolId); + if (DateTime.UtcNow > timeoutAfterThisTimeUtc) + { + throw new Exception("DeletePool: Timed out waiting for pool to delete"); + } + } + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/tests/Infrastructure/TestUtilities.cs b/sdk/batch/Azure.Compute.Batch/tests/Infrastructure/TestUtilities.cs new file mode 100644 index 0000000000000..0a1cc540d6a60 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/tests/Infrastructure/TestUtilities.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading; +using System.Threading.Tasks; + +namespace Azure.Compute.Batch.Tests.Infrastructure +{ + public static class TestUtilities + { + #region Wait helpers + + public static async Task WaitForPoolToReachStateAsync(BatchClient client, string poolId, AllocationState targetAllocationState, TimeSpan timeout, bool isPlayback) + { + DateTime allocationWaitStartTime = DateTime.UtcNow; + DateTime timeoutAfterThisTimeUtc = allocationWaitStartTime.Add(timeout); + + BatchPool pool = await client.GetPoolAsync(poolId); + + while (pool.AllocationState != targetAllocationState) + { + if (!isPlayback) + { await Task.Delay(TimeSpan.FromSeconds(10)).ConfigureAwait(continueOnCapturedContext: false); } + + pool = await client.GetPoolAsync(poolId); + + if (DateTime.UtcNow > timeoutAfterThisTimeUtc) + { + throw new Exception("RefreshBasedPollingWithTimeout: Timed out waiting for condition to be met."); + } + } + } + + /// + /// Will throw if timeout is exceeded. + /// + /// + /// + /// + /// + public static async Task RefreshBasedPollingWithTimeoutAsync(Func> condition, TimeSpan timeout) + { + DateTime allocationWaitStartTime = DateTime.UtcNow; + DateTime timeoutAfterThisTimeUtc = allocationWaitStartTime.Add(timeout); + + while (!(await condition().ConfigureAwait(continueOnCapturedContext: false))) + { + await Task.Delay(TimeSpan.FromSeconds(10)).ConfigureAwait(continueOnCapturedContext: false); + //await refreshing.RefreshAsync().ConfigureAwait(continueOnCapturedContext: false); + + if (DateTime.UtcNow > timeoutAfterThisTimeUtc) + { + throw new Exception("RefreshBasedPollingWithTimeout: Timed out waiting for condition to be met."); + } + } + } + #endregion + #region Naming helpers + + public static string GenerateResourceId( + string baseId = null, + int? maxLength = null, + [CallerMemberName] string caller = null) + { + int actualMaxLength = maxLength ?? 50; + + var guid = Guid.NewGuid().ToString("N"); + if (baseId == null && caller == null) + { + return guid; + } + else + { + const int minRandomCharacters = 10; + // make the ID only contain alphanumeric or underscore or dash: + var id = baseId ?? caller; + var safeBaseId = Regex.Replace(id, "[^A-Za-z0-9_-]", ""); + safeBaseId = safeBaseId.Length > actualMaxLength - minRandomCharacters ? safeBaseId.Substring(0, actualMaxLength - minRandomCharacters) : safeBaseId; + var result = $"{safeBaseId}_{guid}"; + return result.Length > actualMaxLength ? result.Substring(0, actualMaxLength) : result; + } + } + + public static string GetMyName() + { + string domainName = Environment.GetEnvironmentVariable("USERNAME"); + + return domainName; + } + + public static string GetTimeStamp() + { + return DateTime.UtcNow.ToString("yyyy-MM-dd_hh-mm-ss"); + } + + public static string GenerateRandomPassword() + { + return Guid.NewGuid().ToString(); + } + #endregion + } +} diff --git a/sdk/batch/Azure.Compute.Batch/tests/Infrastructure/WindowsPoolFixture.cs b/sdk/batch/Azure.Compute.Batch/tests/Infrastructure/WindowsPoolFixture.cs new file mode 100644 index 0000000000000..da96e137ad75d --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/tests/Infrastructure/WindowsPoolFixture.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; + +namespace Azure.Compute.Batch.Tests.Infrastructure +{ + internal class WindowsPoolFixture : PoolFixture + { + public WindowsPoolFixture(BatchClient batchClient, string poolID, bool isPlayback) : base(poolID, batchClient, isPlayback) { } + + public async Task CreatePoolAsync(int targetDedicatedNodes = 1) + { + BatchPool currentPool = await FindPoolIfExistsAsync(); + + if (currentPool == null) + { + BatchPoolCreateContent batchPoolCreateOptions = CreatePoolOptions(targetDedicatedNodes); + Response response = await client.CreatePoolAsync(batchPoolCreateOptions); + } + + return await WaitForPoolAllocation(client, PoolId); + } + + public BatchPoolCreateContent CreatePoolOptions(int? targetDedicatedNodes = null) + { + // create a new pool + ImageReference imageReference = new ImageReference() + { + Publisher = "MicrosoftWindowsServer", + Offer = "WindowsServer", + Sku = "2019-datacenter-smalldisk", + Version = "latest" + }; + VirtualMachineConfiguration virtualMachineConfiguration = new VirtualMachineConfiguration(imageReference, "batch.node.windows amd64"); + + BatchPoolCreateContent batchPoolCreateOptions = new BatchPoolCreateContent( + PoolId, + VMSize) + { + VirtualMachineConfiguration = virtualMachineConfiguration, + TargetDedicatedNodes = targetDedicatedNodes, + }; + return batchPoolCreateOptions; + } + + internal async void DeletePool() + { + try + { + await client.DeletePoolAsync(PoolId); + WaitForPoolDeletion(client, PoolId); + } + catch (Exception ex) + { + int x = 0; + x++; + var xx = ex.Message; + } + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/tests/Integration/BatchApplicationsIntegrationTests.cs b/sdk/batch/Azure.Compute.Batch/tests/Integration/BatchApplicationsIntegrationTests.cs new file mode 100644 index 0000000000000..077cd4f6f4e44 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/tests/Integration/BatchApplicationsIntegrationTests.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Azure.Compute.Batch.Tests.Infrastructure; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.Compute.Batch.Tests.Integration +{ + internal class BatchApplicationsIntegrationTests : BatchLiveTestBase + { + /// + /// Initializes a new instance of the class. + /// + /// A flag used by the Azure Core Test Framework to differentiate between tests for asynchronous and synchronous methods. + public BatchApplicationsIntegrationTests(bool isAsync, RecordedTestMode? mode = null) : base(isAsync, mode) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// A flag used by the Azure Core Test Framework to differentiate between tests for asynchronous and synchronous methods. + public BatchApplicationsIntegrationTests(bool isAsync) : base(isAsync) + { + } + + [RecordedTest] + public async Task GetandListApplication() + { + var client = CreateBatchClient(); + + // list out all applications + string appID = null; + await foreach (BatchApplication item in client.GetApplicationsAsync()) + { + appID = item.Id; + } + Assert.NotNull(appID); + + // verify we can get an application + var application = await client.GetApplicationAsync(appID); + Assert.AreEqual(appID, application.Value.Id); + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/tests/Integration/BatchJobIntegrationTests.cs b/sdk/batch/Azure.Compute.Batch/tests/Integration/BatchJobIntegrationTests.cs new file mode 100644 index 0000000000000..79be228fb71a7 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/tests/Integration/BatchJobIntegrationTests.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Text; +using System.Text.Json; +using System.Threading.Tasks; +using System.Xml; +using Azure.Compute.Batch.Tests.Infrastructure; +using Azure.Core; +using Azure.Core.TestFramework; +using NUnit.Framework; +using static System.Net.WebRequestMethods; + +namespace Azure.Compute.Batch.Tests.Integration +{ + internal class BatchJobIntegrationTests : BatchLiveTestBase + { + /// + /// Initializes a new instance of the class. + /// + /// A flag used by the Azure Core Test Framework to differentiate between tests for asynchronous and synchronous methods. + public BatchJobIntegrationTests(bool isAsync, RecordedTestMode? mode = null) : base(isAsync, mode) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// A flag used by the Azure Core Test Framework to differentiate between tests for asynchronous and synchronous methods. + public BatchJobIntegrationTests(bool isAsync) : base(isAsync) + { + } + + [RecordedTest] + public async Task JobOperations() + { + var client = CreateBatchClient(); + WindowsPoolFixture iaasWindowsPoolFixture = new WindowsPoolFixture(client, "JobOperations", IsPlayBack()); + string poolID = iaasWindowsPoolFixture.PoolId; + string jobID = "batchJob1"; + string taskID = "Task1"; + string commandLine = "cmd /c echo Hello World"; + try + { + // create a pool to verify we have something to query for + BatchPool pool = await iaasWindowsPoolFixture.CreatePoolAsync(1); + + BatchPoolInfo batchPoolInfo = new BatchPoolInfo() + { + PoolId = pool.Id + }; + BatchJobCreateContent batchJobCreateContent = new BatchJobCreateContent(jobID, batchPoolInfo) + { + JobPreparationTask = new BatchJobPreparationTask(commandLine), + JobReleaseTask = new BatchJobReleaseTask(commandLine), + }; + Response response = await client.CreateJobAsync(batchJobCreateContent); + + // verify list jobs + BatchJob job = null; + await foreach (BatchJob item in client.GetJobsAsync()) + { + if (item.Id == jobID) + { + job = item; + } + } + + Assert.IsNotNull(job); + Assert.AreEqual(job.OnAllTasksComplete, OnAllBatchTasksComplete.NoAction); + + // verify update job + job.OnAllTasksComplete = OnAllBatchTasksComplete.TerminateJob; + response = await client.ReplaceJobAsync(jobID, job); + job = await client.GetJobAsync(jobID); + + Assert.IsNotNull(job); + Assert.AreEqual(job.OnAllTasksComplete, OnAllBatchTasksComplete.TerminateJob); + + // create a task + BatchTaskCreateContent taskCreateContent = new BatchTaskCreateContent(taskID, commandLine); + response = await client.CreateTaskAsync(jobID, taskCreateContent); + Assert.IsFalse(response.IsError); + + // list task counts + BatchTaskCountsResult batchTaskCountsResult = await client.GetJobTaskCountsAsync(jobID); + Assert.IsNotNull(batchTaskCountsResult); + // need to make a loop and ping GetJobTaskCountsAsync to get the status + //Assert.AreEqual(batchTaskCountsResult.TaskCounts.Active, 1); + + // disable a job + BatchJobDisableContent content = new BatchJobDisableContent(DisableBatchJobOption.Requeue); + response = await client.DisableJobAsync(jobID, content); + Assert.IsFalse(response.IsError); + + // enable a job + response = await client.EnableJobAsync(jobID); + Assert.IsFalse(response.IsError); + + await WaitForTasksToComplete(client, jobID, IsPlayBack()); + + // get JobPreparationAndReleaseTaskStatuses + int count = 0; + await foreach (BatchJobPreparationAndReleaseTaskStatus item in client.GetJobPreparationAndReleaseTaskStatusesAsync(jobID)) + { + count++; + } + Assert.AreNotEqual(0, count); + + // job terminate + BatchJobTerminateContent parameters = new BatchJobTerminateContent + { + TerminationReason = "", + }; + response = await client.TerminateJobAsync(jobID, parameters); + Assert.IsFalse(response.IsError); + } + finally + { + await client.DeletePoolAsync(poolID); + await client.DeleteJobAsync(jobID); + } + } + + [RecordedTest] + public async Task PatchJob() + { + var client = CreateBatchClient(); + WindowsPoolFixture iaasWindowsPoolFixture = new WindowsPoolFixture(client, "PatchJob", IsPlayBack()); + string poolID = iaasWindowsPoolFixture.PoolId; + string jobID = "batchJob2"; + string commandLine = "cmd /c echo Hello World"; + try + { + // create a pool to verify we have something to query for + BatchPool pool = await iaasWindowsPoolFixture.CreatePoolAsync(0); + + BatchPoolInfo batchPoolInfo = new BatchPoolInfo() + { + PoolId = pool.Id + }; + BatchJobCreateContent batchJobCreateContent = new BatchJobCreateContent(jobID, batchPoolInfo) + { + JobPreparationTask = new BatchJobPreparationTask(commandLine), + JobReleaseTask = new BatchJobReleaseTask(commandLine), + }; + Response response = await client.CreateJobAsync(batchJobCreateContent); + Assert.AreEqual(201, response.Status); + + // verify update job + BatchJobUpdateContent batchUpdateContent = new BatchJobUpdateContent(); + batchUpdateContent.Metadata.Add(new MetadataItem("name", "value")); + response = await client.UpdateJobAsync(jobID, batchUpdateContent); + Assert.AreEqual(200, response.Status); + + BatchJob job = await client.GetJobAsync(jobID); + + Assert.IsNotNull(job); + Assert.AreEqual(job.Metadata.First().Value, "value"); + } + finally + { + await client.DeletePoolAsync(poolID); + await client.DeleteJobAsync(jobID); + } + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/tests/Integration/BatchJobScheduleIntegrationTests.cs b/sdk/batch/Azure.Compute.Batch/tests/Integration/BatchJobScheduleIntegrationTests.cs new file mode 100644 index 0000000000000..0b93058c53fe3 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/tests/Integration/BatchJobScheduleIntegrationTests.cs @@ -0,0 +1,288 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Azure.Compute.Batch.Tests.Infrastructure; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.Compute.Batch.Tests.Integration +{ + internal class BatchJobScheduleIntegrationTests : BatchLiveTestBase + { + /// + /// Initializes a new instance of the class. + /// + /// A flag used by the Azure Core Test Framework to differentiate between tests for asynchronous and synchronous methods. + public BatchJobScheduleIntegrationTests(bool isAsync, RecordedTestMode? mode = null) : base(isAsync, mode) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// A flag used by the Azure Core Test Framework to differentiate between tests for asynchronous and synchronous methods. + public BatchJobScheduleIntegrationTests(bool isAsync) : base(isAsync) + { + } + + [RecordedTest] + public async Task JobScheduleAutoPool() + { + var client = CreateBatchClient(); + string jobScheduleId = "jobSchedule1"; + DateTime unboundDNRU = DateTime.Parse("2026-08-18T00:00:00.0000000Z"); + + BatchJobScheduleConfiguration schedule = new BatchJobScheduleConfiguration() + { + DoNotRunUntil = unboundDNRU, + }; + // create a new pool + ImageReference imageReference = new ImageReference() + { + Publisher = "MicrosoftWindowsServer", + Offer = "WindowsServer", + Sku = "2019-datacenter-smalldisk", + Version = "latest" + }; + VirtualMachineConfiguration virtualMachineConfiguration = new VirtualMachineConfiguration(imageReference, "batch.node.windows amd64"); + + BatchPoolSpecification batchPoolSpecification = new BatchPoolSpecification("STANDARD_D1_v2") + { + VirtualMachineConfiguration = virtualMachineConfiguration, + TargetDedicatedNodes = 1, + }; + BatchAutoPoolSpecification autoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.Job) + { + KeepAlive = false, + Pool = batchPoolSpecification, + }; + BatchPoolInfo poolInfo = new BatchPoolInfo() + { + AutoPoolSpecification = autoPoolSpecification, + }; + BatchJobSpecification jobSpecification = new BatchJobSpecification(poolInfo); + + BatchJobScheduleCreateContent jobSchedule = new BatchJobScheduleCreateContent(jobScheduleId, schedule, jobSpecification); + + try + { + Response response = await client.CreateJobScheduleAsync(jobSchedule); + + // check to see if the job schedule exists + bool result = await client.JobScheduleExistsAsync(jobScheduleId); + Assert.True(result); + + // get the job schedule and verify + BatchJobSchedule batchJobSchedule = await client.GetJobScheduleAsync(jobScheduleId); + Assert.NotNull(batchJobSchedule); + Assert.AreEqual(batchJobSchedule.JobSpecification.PoolInfo.AutoPoolSpecification.Pool.VirtualMachineConfiguration.ImageReference.Sku, "2019-datacenter-smalldisk"); + + // disable the schedule + response = await client.DisableJobScheduleAsync(jobScheduleId); + Assert.AreEqual(204, response.Status); + + // enable the schedule + response = await client.EnableJobScheduleAsync(jobScheduleId); + Assert.AreEqual(204, response.Status); + + response = await client.TerminateJobScheduleAsync(jobScheduleId); + Assert.AreEqual(202, response.Status); + } + finally + { + await client.DeleteJobScheduleAsync(jobScheduleId); + } + } + + [RecordedTest] + public async Task GetJobsFromSchedules() + { + var client = CreateBatchClient(); + string jobScheduleId = "jobSchedule2"; + BatchJobScheduleConfiguration schedule = new BatchJobScheduleConfiguration() + ; + // create a new pool + ImageReference imageReference = new ImageReference() + { + Publisher = "MicrosoftWindowsServer", + Offer = "WindowsServer", + Sku = "2019-datacenter-smalldisk", + Version = "latest" + }; + VirtualMachineConfiguration virtualMachineConfiguration = new VirtualMachineConfiguration(imageReference, "batch.node.windows amd64"); + + BatchPoolSpecification batchPoolSpecification = new BatchPoolSpecification("STANDARD_D1_v2") + { + VirtualMachineConfiguration = virtualMachineConfiguration, + TargetDedicatedNodes = 1, + }; + BatchAutoPoolSpecification autoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.Job) + { + KeepAlive = false, + Pool = batchPoolSpecification, + }; + BatchPoolInfo poolInfo = new BatchPoolInfo() + { + AutoPoolSpecification = autoPoolSpecification, + }; + BatchJobManagerTask batchJobManagerTask = new BatchJobManagerTask("task1", "cmd / c echo Hello World"); + + BatchJobSpecification jobSpecification = new BatchJobSpecification(poolInfo) + { + JobManagerTask = batchJobManagerTask, + }; + + BatchJobScheduleCreateContent jobSchedule = new BatchJobScheduleCreateContent(jobScheduleId, schedule, jobSpecification); + + try + { + Response response = await client.CreateJobScheduleAsync(jobSchedule); + + // check to see if the job schedule exists via list + bool found = false; + await foreach (BatchJobSchedule item in client.GetJobSchedulesAsync()) + { + if ( item.Id == jobScheduleId) + found = true; + } + + Assert.True(found); + + // update the job schedule + int jobCount = 0; + await foreach (BatchJob item in client.GetJobsFromSchedulesAsync(jobScheduleId)) + { + jobCount++; + } + + Assert.AreEqual(1, jobCount); + } + finally + { + await client.DeleteJobScheduleAsync(jobScheduleId); + } + } + + [RecordedTest] + public async Task JobScheduleUpdate() + { + var client = CreateBatchClient(); + string jobScheduleId = "jobSchedule3"; + DateTime unboundDNRU = DateTime.Parse("2026-08-18T00:00:00.0000000Z"); + BatchJobScheduleConfiguration schedule = new BatchJobScheduleConfiguration() + { + DoNotRunUntil = unboundDNRU, + }; + // create a new pool + ImageReference imageReference = new ImageReference() + { + Publisher = "MicrosoftWindowsServer", + Offer = "WindowsServer", + Sku = "2019-datacenter-smalldisk", + Version = "latest" + }; + VirtualMachineConfiguration virtualMachineConfiguration = new VirtualMachineConfiguration(imageReference, "batch.node.windows amd64"); + + BatchPoolSpecification batchPoolSpecification = new BatchPoolSpecification("STANDARD_D1_v2") + { + VirtualMachineConfiguration = virtualMachineConfiguration, + TargetDedicatedNodes = 1, + }; + BatchAutoPoolSpecification autoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.Job) + { + KeepAlive = false, + Pool = batchPoolSpecification, + }; + BatchPoolInfo poolInfo = new BatchPoolInfo() + { + AutoPoolSpecification = autoPoolSpecification, + }; + BatchJobSpecification jobSpecification = new BatchJobSpecification(poolInfo); + + BatchJobScheduleCreateContent jobSchedule = new BatchJobScheduleCreateContent(jobScheduleId, schedule, jobSpecification); + + try + { + Response response = await client.CreateJobScheduleAsync(jobSchedule); + + BatchJobSchedule batchJobSchedule = await client.GetJobScheduleAsync(jobScheduleId); + Assert.NotNull(batchJobSchedule); + + response = await client.ReplaceJobScheduleAsync(jobScheduleId, batchJobSchedule); + Assert.AreEqual(200, response.Status); + + // blocked due to not having a model + //await client.UpdateJobScheduleAsync() + } + finally + { + await client.DeleteJobScheduleAsync(jobScheduleId); + } + } + + [RecordedTest] + public async Task JobSchedulePatch() + { + var client = CreateBatchClient(); + string jobScheduleId = "jobSchedulePatch"; + DateTime unboundDNRU = DateTime.Parse("2026-08-18T00:00:00.0000000Z"); + BatchJobScheduleConfiguration schedule = new BatchJobScheduleConfiguration() + { + DoNotRunUntil = unboundDNRU, + }; + // create a new pool + ImageReference imageReference = new ImageReference() + { + Publisher = "MicrosoftWindowsServer", + Offer = "WindowsServer", + Sku = "2019-datacenter-smalldisk", + Version = "latest" + }; + VirtualMachineConfiguration virtualMachineConfiguration = new VirtualMachineConfiguration(imageReference, "batch.node.windows amd64"); + + BatchPoolSpecification batchPoolSpecification = new BatchPoolSpecification("STANDARD_D1_v2") + { + VirtualMachineConfiguration = virtualMachineConfiguration, + TargetDedicatedNodes = 0, + }; + BatchAutoPoolSpecification autoPoolSpecification = new BatchAutoPoolSpecification(BatchPoolLifetimeOption.Job) + { + KeepAlive = false, + Pool = batchPoolSpecification, + }; + BatchPoolInfo poolInfo = new BatchPoolInfo() + { + AutoPoolSpecification = autoPoolSpecification, + }; + BatchJobSpecification jobSpecification = new BatchJobSpecification(poolInfo); + + BatchJobScheduleCreateContent jobSchedule = new BatchJobScheduleCreateContent(jobScheduleId, schedule, jobSpecification); + + try + { + Response response = await client.CreateJobScheduleAsync(jobSchedule); + + BatchJobScheduleUpdateContent batchJobScheduleUpdateContent = new BatchJobScheduleUpdateContent(); + batchJobScheduleUpdateContent.Metadata.Add(new MetadataItem("name", "value")); + + response = await client.UpdateJobScheduleAsync(jobScheduleId, batchJobScheduleUpdateContent); + Assert.AreEqual(200, response.Status); + + BatchJobSchedule patchJobSchedule = await client.GetJobScheduleAsync(jobScheduleId); + + Assert.IsNotNull(patchJobSchedule); + Assert.AreEqual(patchJobSchedule.Metadata.First().Value, "value"); + } + finally + { + await client.DeleteJobScheduleAsync(jobScheduleId); + } + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/tests/Integration/BatchNodeIntegrationTests.cs b/sdk/batch/Azure.Compute.Batch/tests/Integration/BatchNodeIntegrationTests.cs new file mode 100644 index 0000000000000..eaa927aade09d --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/tests/Integration/BatchNodeIntegrationTests.cs @@ -0,0 +1,255 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Azure.Compute.Batch.Tests.Infrastructure; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.Compute.Batch.Tests.Integration +{ + public class BatchNodeIntegrationTests : BatchLiveTestBase + { + /// BatchNodeIntegrationTests"/> class. + /// + /// A flag used by the Azure Core Test Framework to differentiate between tests for asynchronous and synchronous methods. + public BatchNodeIntegrationTests(bool isAsync, RecordedTestMode? mode = null) : base(isAsync, mode) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// A flag used by the Azure Core Test Framework to differentiate between tests for asynchronous and synchronous methods. + public BatchNodeIntegrationTests(bool isAsync) : base(isAsync) + { + } + + [RecordedTest] + public async Task ListBatchNode() + { + var client = CreateBatchClient(); + WindowsPoolFixture iaasWindowsPoolFixture = new WindowsPoolFixture(client, "ListBatchNode", IsPlayBack()); + var poolID = iaasWindowsPoolFixture.PoolId; + + try + { + // create a pool to verify we have something to query for + BatchPool pool = await iaasWindowsPoolFixture.CreatePoolAsync(2); + + int count = 0; + await foreach (BatchNode item in client.GetNodesAsync(poolID)) + { + count++; + } + + // verify we found at least one poolnode + Assert.AreEqual(2, count); + } + finally + { + await client.DeletePoolAsync(poolID); + } + } + + [RecordedTest] + public async Task BatchNodeUser() + { + var client = CreateBatchClient(); + WindowsPoolFixture iaasWindowsPoolFixture = new WindowsPoolFixture(client, "BatchNodeUser", IsPlayBack()); + var poolID = iaasWindowsPoolFixture.PoolId; + var userName = "User1"; + var userPassWord = "Password1"; + var updatedPassWord = "Password2"; + + try + { + // create a pool to verify we have something to query for + BatchPool pool = await iaasWindowsPoolFixture.CreatePoolAsync(1); + + string batchNodeID = ""; + await foreach (BatchNode item in client.GetNodesAsync(poolID)) + { + batchNodeID = item.Id; + } + Assert.IsNotEmpty(batchNodeID); + + // create new user + BatchNodeUserCreateContent user = new BatchNodeUserCreateContent(userName) + { + Password = userPassWord + }; + Response response = await client.CreateNodeUserAsync(poolID, batchNodeID, user); + Assert.IsFalse(response.IsError); + + // update users password + BatchNodeUserUpdateContent content = new BatchNodeUserUpdateContent() + { + Password = updatedPassWord + }; + response = await client.ReplaceNodeUserAsync(poolID, batchNodeID, userName, content); + Assert.IsFalse(response.IsError); + + // delete uswer + response = await client.DeleteNodeUserAsync(poolID, batchNodeID, userName); + Assert.IsFalse(response.IsError); + } + finally + { + await client.DeletePoolAsync(poolID); + } + } + + [RecordedTest] + public async Task RebootBatchNode() + { + var client = CreateBatchClient(); + WindowsPoolFixture iaasWindowsPoolFixture = new WindowsPoolFixture(client, "RebootBatchNode", IsPlayBack()); + var poolID = iaasWindowsPoolFixture.PoolId; + + try + { + // create a pool to verify we have something to query for + BatchPool pool = await iaasWindowsPoolFixture.CreatePoolAsync(1); + + string batchNodeID = ""; + await foreach (BatchNode item in client.GetNodesAsync(poolID)) + { + batchNodeID = item.Id; + } + Assert.IsNotEmpty(batchNodeID); + + // reboot node + Response response = await client.RebootNodeAsync(poolID, batchNodeID); + Assert.IsFalse(response.IsError); + await iaasWindowsPoolFixture.WaitForPoolAllocation(client, poolID); + } + finally + { + await client.DeletePoolAsync(poolID); + } + } + + public async Task BatchNodeExtension() + { + var client = CreateBatchClient(); + WindowsPoolFixture iaasWindowsPoolFixture = new WindowsPoolFixture(client, "BatchNodeExtension", IsPlayBack()); + var poolID = iaasWindowsPoolFixture.PoolId; + + try + { + // create a pool to verify we have something to query for + BatchPoolCreateContent batchPoolCreateOptions = iaasWindowsPoolFixture.CreatePoolOptions(1); + VMExtension vMExtension = new VMExtension("CustomExtension", "Microsoft.Azure.Geneva", "GenevaMonitoring") + { + TypeHandlerVersion = "2.16", + AutoUpgradeMinorVersion = true, + EnableAutomaticUpgrade = true, + ProtectedSettings = {}, + Settings = {}, + }; + batchPoolCreateOptions.VirtualMachineConfiguration.Extensions.Add(vMExtension); + Response response = await client.CreatePoolAsync(batchPoolCreateOptions); + + BatchPool pool = await iaasWindowsPoolFixture.WaitForPoolAllocation(client, poolID); + + string batchNodeID = ""; + await foreach (BatchNode item in client.GetNodesAsync(poolID)) + { + batchNodeID = item.Id; + } + Assert.IsNotEmpty(batchNodeID); + + BatchNodeVMExtension batchNodeVMExtension1 = await client.GetNodeExtensionAsync(poolID, batchNodeID, "CustomExtension"); + + // reboot node + await foreach (BatchNodeVMExtension item in client.GetNodeExtensionsAsync(poolID, batchNodeID)) + { + Assert.NotNull(item); + Assert.IsNotEmpty(item.VmExtension.Name); + + BatchNodeVMExtension batchNodeVMExtension = await client.GetNodeExtensionAsync(poolID, batchNodeID, item.VmExtension.Name); + Assert.NotNull(batchNodeVMExtension); + } + } + finally + { + await client.DeletePoolAsync(poolID); + } + } + + [RecordedTest] + public async Task GetRemoteLoginSettings() + { + var client = CreateBatchClient(); + WindowsPoolFixture iaasWindowsPoolFixture = new WindowsPoolFixture(client, "GetRemoteLoginSettings", IsPlayBack()); + var poolID = iaasWindowsPoolFixture.PoolId; + + try + { + // create a pool to verify we have something to query for + BatchPool pool = await iaasWindowsPoolFixture.CreatePoolAsync(2); + + string batchNodeID = ""; + await foreach (BatchNode item in client.GetNodesAsync(poolID)) + { + batchNodeID = item.Id; + } + Assert.IsNotEmpty(batchNodeID); + + BatchNodeRemoteLoginSettings batchNodeRemoteLoginSettings = await client.GetNodeRemoteLoginSettingsAsync(poolID, batchNodeID); + Assert.NotNull(batchNodeRemoteLoginSettings); + Assert.IsNotEmpty(batchNodeRemoteLoginSettings.RemoteLoginIpAddress); + } + finally + { + await client.DeletePoolAsync(poolID); + } + } + + [RecordedTest] + public async Task Scheduling() + { + var client = CreateBatchClient(); + WindowsPoolFixture iaasWindowsPoolFixture = new WindowsPoolFixture(client, "Scheduling", IsPlayBack()); + var poolID = iaasWindowsPoolFixture.PoolId; + + try + { + // create a pool to verify we have something to query for + BatchPool pool = await iaasWindowsPoolFixture.CreatePoolAsync(1); + + string batchNodeID = ""; + await foreach (BatchNode item in client.GetNodesAsync(poolID)) + { + batchNodeID = item.Id; + } + Assert.IsNotEmpty(batchNodeID); + BatchNodeDisableSchedulingContent batchNodeDisableSchedulingContent = new BatchNodeDisableSchedulingContent() + { + NodeDisableSchedulingOption = BatchNodeDisableSchedulingOption.TaskCompletion, + }; + Response response = await client.DisableNodeSchedulingAsync(poolID, batchNodeID, batchNodeDisableSchedulingContent); + Assert.AreEqual(200, response.Status); + + response = await client.EnableNodeSchedulingAsync(poolID, batchNodeID); + Assert.AreEqual(200, response.Status); + + UploadBatchServiceLogsContent uploadBatchServiceLogsContent = new UploadBatchServiceLogsContent("http://contoso.com", DateTimeOffset.Parse("2026-05-01T00:00:00.0000000Z")); + + UploadBatchServiceLogsResult uploadBatchServiceLogsResult = await client.UploadNodeLogsAsync(poolID, batchNodeID, uploadBatchServiceLogsContent); + Assert.NotNull(uploadBatchServiceLogsResult); + Assert.IsNotEmpty(uploadBatchServiceLogsResult.VirtualDirectoryName); + } + finally + { + await client.DeletePoolAsync(poolID); + } + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/tests/Integration/BatchPoolIntegrationTests.cs b/sdk/batch/Azure.Compute.Batch/tests/Integration/BatchPoolIntegrationTests.cs new file mode 100644 index 0000000000000..2ccb1c174c8bc --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/tests/Integration/BatchPoolIntegrationTests.cs @@ -0,0 +1,308 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Azure.Compute.Batch.Tests.Infrastructure; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.Compute.Batch.Tests.Integration +{ + public class BatchPoolIntegrationTests : BatchLiveTestBase + { + /// + /// Initializes a new instance of the class. + /// + /// A flag used by the Azure Core Test Framework to differentiate between tests for asynchronous and synchronous methods. + public BatchPoolIntegrationTests(bool isAsync, RecordedTestMode? mode = null) : base(isAsync, mode) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// A flag used by the Azure Core Test Framework to differentiate between tests for asynchronous and synchronous methods. + public BatchPoolIntegrationTests(bool isAsync) : base(isAsync) + { + } + + [RecordedTest] + public async Task GetPoolNodeCounts() + { + var client = CreateBatchClient(); + WindowsPoolFixture iaasWindowsPoolFixture = new WindowsPoolFixture(client, "GetPoolNodeCounts", IsPlayBack()); + var poolID = iaasWindowsPoolFixture.PoolId; + + try + { + // create a pool to verify we have something to query for + BatchPool pool = await iaasWindowsPoolFixture.CreatePoolAsync(); + + int count = 0; + bool poolFound = false; + await foreach (BatchPoolNodeCounts item in client.GetPoolNodeCountsAsync()) + { + count++; + poolFound |= pool.Id.Equals(item.PoolId, StringComparison.OrdinalIgnoreCase); + } + + // verify we found at least one poolnode + Assert.AreNotEqual(0, count); + Assert.IsTrue(poolFound); + } + finally + { + await client.DeletePoolAsync(poolID); + } + } + + [RecordedTest] + public async Task PoolExists() + { + var client = CreateBatchClient(); + WindowsPoolFixture iaasWindowsPoolFixture = new WindowsPoolFixture(client, "PoolExists", IsPlayBack()); + var poolID = iaasWindowsPoolFixture.PoolId; + + try + { + // create a pool to verify we have something to query for + BatchPool pool = await iaasWindowsPoolFixture.CreatePoolAsync(0); + bool poolExist = await client.PoolExistsAsync(poolID); + + var poolDoesntExist = await client.PoolExistsAsync("fakepool"); + + // verify exists + Assert.True(poolExist); + Assert.False(poolDoesntExist); + } + finally + { + await client.DeletePoolAsync(poolID); + } + } + + [RecordedTest] + public async Task PoolGetPoolUsageMetrics() + { + var client = CreateBatchClient(); + WindowsPoolFixture iaasWindowsPoolFixture = new WindowsPoolFixture(client, "PoolGetPoolUsageMetrics", IsPlayBack()); + var poolID = iaasWindowsPoolFixture.PoolId; + + try + { + // create a pool to verify we have something to query for + BatchPool pool = await iaasWindowsPoolFixture.CreatePoolAsync(0); + + BatchPoolUsageMetrics exptedItem = null; + await foreach (BatchPoolUsageMetrics item in client.GetPoolUsageMetricsAsync()) + { + exptedItem = item; + } + + // verify that some usage exists, we can't predict what usage that might be at the time of the test + Assert.NotNull(exptedItem); + Assert.IsNotEmpty(exptedItem.PoolId); + } + finally + { + await client.DeletePoolAsync(poolID); + } + } + + [RecordedTest] + public async Task PoolRemoveNodes() + { + var client = CreateBatchClient(); + WindowsPoolFixture iaasWindowsPoolFixture = new WindowsPoolFixture(client, "PoolRemoveNodes", IsPlayBack()); + var poolID = iaasWindowsPoolFixture.PoolId; + + try + { + // create a pool to verify we have something to query for + BatchPool pool = await iaasWindowsPoolFixture.CreatePoolAsync(2); + BatchPool orginalPool = await client.GetPoolAsync(poolID); + + string batchNodeID = ""; + int nodeCount = 0; + await foreach (BatchNode item in client.GetNodesAsync(poolID)) + { + nodeCount++; + batchNodeID = item.Id; + } + + Assert.AreEqual(2, nodeCount); + + BatchNodeRemoveContent content = new BatchNodeRemoveContent(new string[] { batchNodeID }); + Response response = await client.RemoveNodesAsync(poolID, content); + Assert.AreEqual(202, response.Status); + + BatchPool modfiedPool = await client.GetPoolAsync(poolID); + + // verify that some usage exists, we can't predict what usage that might be at the time of the test + Assert.NotNull(modfiedPool); + Assert.AreEqual(AllocationState.Resizing, modfiedPool.AllocationState); + } + finally + { + await client.DeletePoolAsync(poolID); + } + } + + [RecordedTest] + public async Task AutoScale() + { + var client = CreateBatchClient(); + WindowsPoolFixture iaasWindowsPoolFixture = new WindowsPoolFixture(client, "AutoScale", IsPlayBack()); + var poolID = iaasWindowsPoolFixture.PoolId; + string poolASFormulaOrig = "$TargetDedicated = 0;"; + string poolASFormulaNew = "$TargetDedicated = 1;"; + TimeSpan evalInterval = TimeSpan.FromMinutes(6); + + try + { + // create a pool to verify we have something to query for + BatchPoolCreateContent batchPoolCreateOptions = iaasWindowsPoolFixture.CreatePoolOptions(); + batchPoolCreateOptions.EnableAutoScale = true; + batchPoolCreateOptions.AutoScaleEvaluationInterval = evalInterval; + batchPoolCreateOptions.AutoScaleFormula = poolASFormulaOrig; + Response response = await client.CreatePoolAsync(batchPoolCreateOptions); + BatchPool autoScalePool = await iaasWindowsPoolFixture.WaitForPoolAllocation(client, iaasWindowsPoolFixture.PoolId); + + // verify autoscale settings + Assert.IsTrue(autoScalePool.EnableAutoScale); + Assert.AreEqual(autoScalePool.AutoScaleFormula, poolASFormulaOrig); + + // evaluate autoscale formula + BatchPoolEvaluateAutoScaleContent batchPoolEvaluateAutoScaleContent = new BatchPoolEvaluateAutoScaleContent(poolASFormulaNew); + AutoScaleRun eval = await client.EvaluatePoolAutoScaleAsync(autoScalePool.Id, batchPoolEvaluateAutoScaleContent); + Assert.Null(eval.Error); + + // change eval interval + TimeSpan newEvalInterval = evalInterval + TimeSpan.FromMinutes(1); + BatchPoolEnableAutoScaleContent batchPoolEnableAutoScaleContent = new BatchPoolEnableAutoScaleContent() + { + AutoScaleEvaluationInterval = newEvalInterval, + AutoScaleFormula = poolASFormulaNew, + }; + + // verify + response = await client.EnablePoolAutoScaleAsync(autoScalePool.Id, batchPoolEnableAutoScaleContent); + Assert.AreEqual(200, response.Status); + autoScalePool = await client.GetPoolAsync((autoScalePool.Id)); + Assert.AreEqual(autoScalePool.AutoScaleEvaluationInterval, newEvalInterval); + Assert.AreEqual(autoScalePool.AutoScaleFormula, poolASFormulaNew); + + response = await client.DisablePoolAutoScaleAsync(autoScalePool.Id); + Assert.AreEqual(200, response.Status); + } + finally + { + await client.DeletePoolAsync(poolID); + } + } + + [RecordedTest] + public async Task ResizePool() + { + var client = CreateBatchClient(); + WindowsPoolFixture iaasWindowsPoolFixture = new WindowsPoolFixture(client, "ResizePool", IsPlayBack()); + var poolID = iaasWindowsPoolFixture.PoolId; + + try + { + // create a pool to verify we have something to query for + BatchPool resizePool = await iaasWindowsPoolFixture.CreatePoolAsync(0); + + // verify exists + BatchPoolResizeContent resizeContent = new BatchPoolResizeContent() + { + TargetDedicatedNodes = 1, + ResizeTimeout = TimeSpan.FromMinutes(10), + }; + + // resize pool + Response response = await client.ResizePoolAsync(poolID, resizeContent); + resizePool = await client.GetPoolAsync(poolID); + Assert.AreEqual(AllocationState.Resizing, resizePool.AllocationState); + + // stop resizing + response = await client.StopPoolResizeAsync(poolID); + Assert.AreEqual(202, response.Status); + } + finally + { + await client.DeletePoolAsync(poolID); + } + } + + [RecordedTest] + public async Task ReplacePool() + { + var client = CreateBatchClient(); + WindowsPoolFixture iaasWindowsPoolFixture = new WindowsPoolFixture(client, "ReplacePool", IsPlayBack()); + var poolID = iaasWindowsPoolFixture.PoolId; + + try + { + // create a pool to verify we have something to query for + BatchPool orginalPool = await iaasWindowsPoolFixture.CreatePoolAsync(0); + + // replace pool + BatchApplicationPackageReference[] batchApplicationPackageReferences = new BatchApplicationPackageReference[] { + new BatchApplicationPackageReference("dotnotsdkbatchapplication1") + { + Version = "1" + } + }; + + MetadataItem[] metadataIems = new MetadataItem[] { + new MetadataItem("name", "value") + }; + + BatchPoolReplaceContent replaceContent = new BatchPoolReplaceContent(batchApplicationPackageReferences, metadataIems); + Response response = await client.ReplacePoolPropertiesAsync(poolID, replaceContent); + BatchPool replacePool = await client.GetPoolAsync(poolID); + Assert.AreEqual(replacePool.Metadata.First().Value, "value"); + } + finally + { + await client.DeletePoolAsync(poolID); + } + } + + [RecordedTest] + public async Task PatchPool() + { + var client = CreateBatchClient(); + WindowsPoolFixture iaasWindowsPoolFixture = new WindowsPoolFixture(client, "PatchPool", IsPlayBack()); + var poolID = iaasWindowsPoolFixture.PoolId; + + try + { + // create a pool to verify we have something to query for + BatchPool orginalPool = await iaasWindowsPoolFixture.CreatePoolAsync(0); + + // update pool + BatchPoolUpdateContent updateContent = new BatchPoolUpdateContent(); + updateContent.Metadata.Add(new MetadataItem("name", "value")); + updateContent.ApplicationPackageReferences.Add(new BatchApplicationPackageReference("dotnotsdkbatchapplication1") + { + Version = "1" + }); + + Response response = await client.UpdatePoolAsync(poolID, updateContent); + BatchPool patchPool = await client.GetPoolAsync(poolID); + Assert.AreEqual(patchPool.Metadata.First().Value, "value"); + } + finally + { + await client.DeletePoolAsync(poolID); + } + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/tests/Integration/BatchTaskIntegrationTests.cs b/sdk/batch/Azure.Compute.Batch/tests/Integration/BatchTaskIntegrationTests.cs new file mode 100644 index 0000000000000..ce0284c9bd217 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/tests/Integration/BatchTaskIntegrationTests.cs @@ -0,0 +1,282 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Azure.Compute.Batch.Tests.Infrastructure; +using Azure.Core; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.Compute.Batch.Tests.Integration +{ + internal class BatchTaskIntegrationTests : BatchLiveTestBase + { + /// + /// Initializes a new instance of the class. + /// + /// A flag used by the Azure Core Test Framework to differentiate between tests for asynchronous and synchronous methods. + public BatchTaskIntegrationTests(bool isAsync, RecordedTestMode? mode = null) : base(isAsync, mode) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// A flag used by the Azure Core Test Framework to differentiate between tests for asynchronous and synchronous methods. + public BatchTaskIntegrationTests(bool isAsync) : base(isAsync) + { + } + + [RecordedTest] + public async Task AddTask() + { + var client = CreateBatchClient(); + WindowsPoolFixture iaasWindowsPoolFixture = new WindowsPoolFixture(client, "AddTask", IsPlayBack()); + string poolID = iaasWindowsPoolFixture.PoolId; + string jobID = "batchJob1"; + string taskID = "Task1"; + string commandLine = "cmd /c echo Hello World"; + try + { + // create a pool to verify we have something to query for + BatchPool pool = await iaasWindowsPoolFixture.CreatePoolAsync(0); + + BatchPoolInfo batchPoolInfo = new BatchPoolInfo() + { + PoolId = pool.Id + }; + BatchJobCreateContent batchJobCreateContent = new BatchJobCreateContent(jobID, batchPoolInfo); + Response response = await client.CreateJobAsync(batchJobCreateContent); + + var job = await client.GetJobAsync(jobID); + Assert.IsNotNull(job); + + BatchTaskCreateContent taskCreateContent = new BatchTaskCreateContent(taskID, commandLine); + response = await client.CreateTaskAsync(jobID, taskCreateContent); + + BatchTask task = await client.GetTaskAsync(jobID, taskID); + Assert.IsNotNull(task); + Assert.AreEqual(commandLine, task.CommandLine); + } + finally + { + await client.DeleteJobAsync(jobID); + await client.DeletePoolAsync(poolID); + } + } + + [RecordedTest] + public async Task AddTaskCollection() + { + var client = CreateBatchClient(); + WindowsPoolFixture iaasWindowsPoolFixture = new WindowsPoolFixture(client, "AddTaskCollection", IsPlayBack()); + string poolID = iaasWindowsPoolFixture.PoolId; + string jobID = "batchJob1"; + string taskID = "Task1"; + string commandLine = "cmd /c echo Hello World"; + try + { + // create a pool to verify we have something to query for + BatchPool pool = await iaasWindowsPoolFixture.CreatePoolAsync(0); + + BatchPoolInfo batchPoolInfo = new BatchPoolInfo() + { + PoolId = pool.Id + }; + BatchJobCreateContent batchJobCreateContent = new BatchJobCreateContent(jobID, batchPoolInfo); + Response response = await client.CreateJobAsync(batchJobCreateContent); + + var job = await client.GetJobAsync(jobID); + Assert.IsNotNull(job); + + BatchTaskGroup taskCollection = new BatchTaskGroup(new BatchTaskCreateContent[] + { + new BatchTaskCreateContent(taskID, commandLine) + }); + + BatchTaskAddCollectionResult batchTaskAddCollectionResult = await client.CreateTaskCollectionAsync(jobID, taskCollection); + + Assert.IsNotNull(batchTaskAddCollectionResult); + BatchTaskAddResult batchTaskAddResult = null; + foreach (BatchTaskAddResult item in batchTaskAddCollectionResult.Value) + { + batchTaskAddResult = item; + } + + Assert.IsNotNull(batchTaskAddResult); + Assert.AreEqual(batchTaskAddResult.TaskId, taskID); + } + finally + { + await client.DeleteJobAsync(jobID); + await client.DeletePoolAsync(poolID); + } + } + + [RecordedTest] + public async Task TaskUpdate() + { + var client = CreateBatchClient(); + WindowsPoolFixture iaasWindowsPoolFixture = new WindowsPoolFixture(client, "TaskUpdate", IsPlayBack()); + string poolID = iaasWindowsPoolFixture.PoolId; + string jobID = "batchJob1"; + string taskID = "Task1"; + string commandLine = "cmd /c echo Hello World"; + try + { + // create a pool to verify we have something to query for + BatchPool pool = await iaasWindowsPoolFixture.CreatePoolAsync(0); + + BatchPoolInfo batchPoolInfo = new BatchPoolInfo() + { + PoolId = pool.Id + }; + BatchJobCreateContent batchJobCreateContent = new BatchJobCreateContent(jobID, batchPoolInfo); + Response response = await client.CreateJobAsync(batchJobCreateContent); + + var job = await client.GetJobAsync(jobID); + Assert.IsNotNull(job); + + BatchTaskCreateContent taskCreateContent = new BatchTaskCreateContent(taskID, commandLine); + + response = await client.CreateTaskAsync(jobID, taskCreateContent); + Assert.AreEqual(201, response.Status); + + // get task via lists tasks + BatchTask task = null; + await foreach (BatchTask item in client.GetTasksAsync(jobID)) + { + task = item; + } + + Assert.IsNotNull(task); + Assert.AreEqual(commandLine, task.CommandLine); + + // update task constraints + BatchTaskConstraints batchTaskConstraints = new BatchTaskConstraints() + { + MaxTaskRetryCount = 3, + }; + + task.Constraints = batchTaskConstraints; + response = await client.ReplaceTaskAsync(jobID, taskID, task); + Assert.AreEqual(200, response.Status); + + // verify task got updated + BatchTask updatedTask = await client.GetTaskAsync(jobID, taskID); + Assert.IsNotNull(updatedTask); + Assert.AreEqual(3, updatedTask.Constraints.MaxTaskRetryCount); + } + finally + { + await client.DeleteJobAsync(jobID); + await client.DeletePoolAsync(poolID); + } + } + + [RecordedTest] + public async Task TaskListSubTasks() + { + var client = CreateBatchClient(); + WindowsPoolFixture iaasWindowsPoolFixture = new WindowsPoolFixture(client, "TaskListSubTasks", IsPlayBack()); + string poolID = iaasWindowsPoolFixture.PoolId; + string jobID = "batchJob1"; + string taskID = "Task1"; + string commandLine = "cmd /c echo Hello World"; + try + { + // create a pool to verify we have something to query for + BatchPoolCreateContent batchPoolCreateOptions = iaasWindowsPoolFixture.CreatePoolOptions(); + batchPoolCreateOptions.TargetDedicatedNodes = 3; + batchPoolCreateOptions.TaskSlotsPerNode = 1; + batchPoolCreateOptions.EnableInterNodeCommunication = true; + Response response = await client.CreatePoolAsync(batchPoolCreateOptions); + BatchPool pool = await iaasWindowsPoolFixture.WaitForPoolAllocation(client, iaasWindowsPoolFixture.PoolId); + + BatchPoolInfo batchPoolInfo = new BatchPoolInfo() + { + PoolId = pool.Id + }; + BatchJobCreateContent batchJobCreateContent = new BatchJobCreateContent(jobID, batchPoolInfo); + response = await client.CreateJobAsync(batchJobCreateContent); + + var job = await client.GetJobAsync(jobID); + Assert.IsNotNull(job); + + BatchTaskCreateContent taskCreateContent = new BatchTaskCreateContent(taskID, commandLine) + { + RequiredSlots =1, + MultiInstanceSettings = new MultiInstanceSettings(commandLine) + { + NumberOfInstances = 1, + }, + }; + + response = await client.CreateTaskAsync(jobID, taskCreateContent); + Assert.AreEqual(201, response.Status); + + // list subtasks + int count = 0; + await foreach (BatchSubtask item in client.GetSubTasksAsync(jobID, taskID)) + { + count++; + } + Assert.AreEqual(0, count); + } + finally + { + await client.DeleteJobAsync(jobID); + await client.DeletePoolAsync(poolID); + } + } + + [RecordedTest] + public async Task TaskReactive() + { + var client = CreateBatchClient(); + WindowsPoolFixture iaasWindowsPoolFixture = new WindowsPoolFixture(client, "TaskReactive", IsPlayBack()); + string poolID = iaasWindowsPoolFixture.PoolId; + string jobID = "batchJob1"; + string taskID = "Task1"; + string commandLine = "cmd /c echo Hello World"; + try + { + // create a pool to verify we have something to query for + BatchPool pool = await iaasWindowsPoolFixture.CreatePoolAsync(0); + + BatchPoolInfo batchPoolInfo = new BatchPoolInfo() + { + PoolId = pool.Id + }; + BatchJobCreateContent batchJobCreateContent = new BatchJobCreateContent(jobID, batchPoolInfo); + Response response = await client.CreateJobAsync(batchJobCreateContent); + + var job = await client.GetJobAsync(jobID); + Assert.IsNotNull(job); + + BatchTaskCreateContent taskCreateContent = new BatchTaskCreateContent(taskID, commandLine); + response = await client.CreateTaskAsync(jobID, taskCreateContent); + + BatchTask task = await client.GetTaskAsync(jobID, taskID); + Assert.IsNotNull(task); + Assert.AreEqual(commandLine, task.CommandLine); + + response = await client.TerminateTaskAsync(jobID, taskID); + Assert.AreEqual(204, response.Status); + + response = await client.ReactivateTaskAsync(jobID, taskID); + Assert.AreEqual(204, response.Status); + } + finally + { + await client.DeleteJobAsync(jobID); + await client.DeletePoolAsync(poolID); + } + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/tests/Integration/FileIntegrationTests.cs b/sdk/batch/Azure.Compute.Batch/tests/Integration/FileIntegrationTests.cs new file mode 100644 index 0000000000000..d423a69033198 --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/tests/Integration/FileIntegrationTests.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Text; +using System.Text.Json; +using System.Threading.Tasks; +using Azure.Compute.Batch.Tests.Infrastructure; +using Azure.Core; +using Azure.Core.TestFramework; +using NUnit.Framework; +using static System.Net.WebRequestMethods; + +namespace Azure.Compute.Batch.Tests.Integration +{ + internal class FileIntegrationTests : BatchLiveTestBase + { + /// + /// Initializes a new instance of the class. + /// + /// A flag used by the Azure Core Test Framework to differentiate between tests for asynchronous and synchronous methods. + public FileIntegrationTests(bool isAsync, RecordedTestMode? mode = null) : base(isAsync, mode) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// A flag used by the Azure Core Test Framework to differentiate between tests for asynchronous and synchronous methods. + public FileIntegrationTests(bool isAsync) : base(isAsync) + { + } + + [RecordedTest] + public async Task GetTaskFile() + { + var client = CreateBatchClient(); + WindowsPoolFixture iaasWindowsPoolFixture = new WindowsPoolFixture(client, "GetTaskFile", IsPlayBack()); + string poolId = iaasWindowsPoolFixture.PoolId; + string jobId = "batchJob1"; + try + { + // create a pool to verify we have something to query for + BatchPool pool = await iaasWindowsPoolFixture.CreatePoolAsync(1); + + await client.CreateJobAsync(new BatchJobCreateContent(jobId, new BatchPoolInfo() { PoolId = poolId })); + + for (int i = 0; i < 5; i++) + { + string taskId = $"task-{i}"; + await client.CreateTaskAsync(jobId, new BatchTaskCreateContent(taskId, $"cmd /c echo Hello World {taskId}")); + } + + await WaitForTasksToComplete(client, jobId, IsPlayBack()); + var completedTasks = client.GetTasksAsync(jobId, filter: "state eq 'completed'"); + + int index = 0; + await foreach (BatchTask t in completedTasks) + { + var outputFileName = t.ExecutionInfo.ExitCode == 0 ? "stdout.txt" : "stderr.txt"; + + BatchFileProperties batchFilePropertiesesponse = await client.GetTaskFilePropertiesAsync(jobId, t.Id, outputFileName); + Assert.IsNotNull(batchFilePropertiesesponse); + Assert.IsNotEmpty(batchFilePropertiesesponse.FileUrl); + + BinaryData fileContents = await client.GetTaskFileAsync(jobId, t.Id, outputFileName); + using (var reader = new StreamReader(fileContents.ToStream())) + { + string line = await reader.ReadLineAsync(); + Assert.IsNotEmpty(line); + Assert.AreEqual($"Hello World task-{index++}", line); + } + + // Currently broken + //await foreach (BatchNodeFile item in client.GetTaskFilesAsync(jobId, t.Id)) + //{ + // string url = item.Url; + // long contentLenght = item.Properties.ContentLength; + //} + } + } + finally + { + await client.DeleteJobAsync(jobId); + await client.DeletePoolAsync(poolId); + } + } + + [RecordedTest] + public async Task DeleteTaskFile() + { + var client = CreateBatchClient(); + WindowsPoolFixture iaasWindowsPoolFixture = new WindowsPoolFixture(client, "DeleteTaskFile", IsPlayBack()); + string poolId = iaasWindowsPoolFixture.PoolId; + string jobId = "batchJob1"; + string taskId = "batchTask1"; + string outputFileName = "stdout.txt"; + + try + { + // create a pool to verify we have something to query for + BatchPool pool = await iaasWindowsPoolFixture.CreatePoolAsync(1); + + await client.CreateJobAsync(new BatchJobCreateContent(jobId, new BatchPoolInfo() { PoolId = poolId })); + + await client.CreateTaskAsync(jobId, new BatchTaskCreateContent(taskId, $"cmd /c echo Hello World")); + + await WaitForTasksToComplete(client, jobId, IsPlayBack()); + + BinaryData fileContents = await client.GetTaskFileAsync(jobId, taskId, outputFileName); + using (var reader = new StreamReader(fileContents.ToStream())) + { + string line = await reader.ReadLineAsync(); + Assert.IsNotEmpty(line); + Assert.AreEqual($"Hello World", line); + } + + // delete the file + Response response = await client.DeleteTaskFileAsync(jobId, taskId, outputFileName); + Assert.AreEqual(response.Status, 200); + + //verify deleted, we should get an exception because the file is not found + var ex = Assert.ThrowsAsync(async () => await client.GetTaskFileAsync(jobId, taskId, outputFileName)); + } + finally + { + await client.DeleteJobAsync(jobId); + await client.DeletePoolAsync(poolId); + } + } + + [RecordedTest] + public async Task GetNodeFile() + { + var client = CreateBatchClient(); + WindowsPoolFixture iaasWindowsPoolFixture = new WindowsPoolFixture(client, "GetNodeFile", IsPlayBack()); + string poolId = iaasWindowsPoolFixture.PoolId; + string jobId = "batchJob1"; + string file = "workitems\\batchJob1\\job-1\\task-0\\stdout.txt"; + try + { + // create a pool to verify we have something to query for + BatchPool pool = await iaasWindowsPoolFixture.CreatePoolAsync(1); + + await client.CreateJobAsync(new BatchJobCreateContent(jobId, new BatchPoolInfo() { PoolId = poolId })); + + for (int i = 0; i < 5; i++) + { + string taskId = $"task-{i}"; + await client.CreateTaskAsync(jobId, new BatchTaskCreateContent(taskId, $"cmd /c echo Hello World {taskId}")); + } + + await WaitForTasksToComplete(client, jobId, IsPlayBack()); + + await foreach (BatchNode item in client.GetNodesAsync(poolId)) + { + BatchFileProperties batchFileProperties = await client.GetNodeFilePropertiesAsync(poolId, item.Id, file); + Assert.IsNotNull(batchFileProperties); + Assert.IsNotEmpty(batchFileProperties.FileUrl); + + BinaryData fileContents = await client.GetNodeFileAsync(poolId, item.Id, file); + using (var reader = new StreamReader(fileContents.ToStream())) + { + string line = await reader.ReadLineAsync(); + Assert.IsNotEmpty(line); + //Assert.AreEqual($"Hello World task-{index++}", line); + } + + await client.DeleteNodeFileAsync(poolId, item.Id, file); + + //verify deleted, we should get an exception because the file is not found + var ex = Assert.ThrowsAsync(async () => await client.GetNodeFileAsync(poolId, item.Id, file)); + } + } + finally + { + await client.DeleteJobAsync(jobId); + await client.DeletePoolAsync(poolId); + } + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/tests/Integration/MiscIntegrationTests.cs b/sdk/batch/Azure.Compute.Batch/tests/Integration/MiscIntegrationTests.cs new file mode 100644 index 0000000000000..1e3ac8afc73bc --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/tests/Integration/MiscIntegrationTests.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Azure.Compute.Batch.Tests.Infrastructure; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.Compute.Batch.Tests.Integration +{ + internal class MiscIntegrationTests : BatchLiveTestBase + { + /// + /// Initializes a new instance of the class. + /// + /// A flag used by the Azure Core Test Framework to differentiate between tests for asynchronous and synchronous methods. + public MiscIntegrationTests(bool isAsync, RecordedTestMode? mode = null) : base(isAsync, mode) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// A flag used by the Azure Core Test Framework to differentiate between tests for asynchronous and synchronous methods. + public MiscIntegrationTests(bool isAsync) : base(isAsync) + { + } + + [RecordedTest] + public async Task ListSupportedImages() + { + var client = CreateBatchClient(); + + // get supported images + int count = 0; + await foreach (BatchSupportedImage item in client.GetSupportedImagesAsync()) + { + count++; + } + Assert.NotZero(count); + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/tests/Snippets/ReadMeSnippets.cs b/sdk/batch/Azure.Compute.Batch/tests/Snippets/ReadMeSnippets.cs new file mode 100644 index 0000000000000..435150184a81c --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/tests/Snippets/ReadMeSnippets.cs @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Net.Sockets; +using System.Text; +using System.Threading.Tasks; +using Azure.Identity; + +namespace Azure.Compute.Batch.Tests.Snippets +{ + public class ReadMeSnippets + { + public void AzureNameKeyCredentialSnippet() + { + #region Snippet:Batch_Readme_AzureNameKeyCredential + var credential = new AzureNamedKeyCredential("", "BatchAccountKey"); + BatchClient _batchClient = new BatchClient( + new Uri("https://.eastus.batch.azure.com"), + credential); + #endregion + } + + public void DefaultAzureCredential() + { + #region Snippet:Batch_Readme_EntraIDCredential + + var credential = new DefaultAzureCredential(); + BatchClient _batchClient = new BatchClient( + new Uri("https://.eastus.batch.azure.com"), credential); + #endregion + } + + public void PoolCreate() + { + #region Snippet:Batch_Readme_PoolCreation + + BatchClient _batchClient = new BatchClient( + new Uri("https://.eastus.batch.azure.com"), new DefaultAzureCredential()); + + string poolID = "HelloWorldPool"; + + ImageReference imageReference = new ImageReference() + { + Publisher = "MicrosoftWindowsServer", + Offer = "WindowsServer", + Sku = "2019-datacenter-smalldisk", + Version = "latest" + }; + + VirtualMachineConfiguration virtualMachineConfiguration = new VirtualMachineConfiguration(imageReference, "batch.node.windows amd64"); + + BatchPoolCreateContent batchPoolCreateOptions = new BatchPoolCreateContent( + poolID, "STANDARD_D1_v2") + { + VirtualMachineConfiguration = virtualMachineConfiguration, + TargetDedicatedNodes = 2, + }; + + // create pool + _batchClient.CreatePool(batchPoolCreateOptions); + #endregion + } + + public void PoolRetrieve() + { + #region Snippet:Batch_Readme_PoolRetreival + BatchClient _batchClient = new BatchClient( + new Uri("https://.eastus.batch.azure.com"), new DefaultAzureCredential()); + + BatchPool batchPool = _batchClient.GetPool("poolID"); + + Console.WriteLine(batchPool.Id); + Console.WriteLine(batchPool.Url); + Console.WriteLine(batchPool.AllocationState); + #endregion + } + + public void ListPools() + { + #region Snippet:Batch_Readme_ListPools + BatchClient _batchClient = new BatchClient( + new Uri("https://.eastus.batch.azure.com"), new DefaultAzureCredential()); + + foreach (BatchPool item in _batchClient.GetPools()) + { + Console.WriteLine(item.Id); + } + #endregion + } + + public void NodeRetreival() + { + #region Snippet:Batch_Readme_NodeRetreival + BatchClient _batchClient = new BatchClient( + new Uri("https://.eastus.batch.azure.com"), new DefaultAzureCredential()); + + BatchNode batchNode = _batchClient.GetNode("", ""); + Console.WriteLine(batchNode.Id); + Console.WriteLine(batchNode.Url); + Console.WriteLine(batchNode.State); + #endregion + } + + public void ListNodes() + { + #region Snippet:Batch_Readme_ListNodes + BatchClient _batchClient = new BatchClient( + new Uri("https://.eastus.batch.azure.com"), new DefaultAzureCredential()); + + foreach (BatchNode item in _batchClient.GetNodes("poolID")) + { + Console.WriteLine(item.Id); + } + #endregion + } + + public void JobCreation() + { + #region Snippet:Batch_Readme_JobCreation + BatchClient _batchClient = new BatchClient( + new Uri("https://.eastus.batch.azure.com"), new DefaultAzureCredential()); + + _batchClient.CreateJob(new BatchJobCreateContent("jobId", new BatchPoolInfo() { PoolId = "poolName" })); + #endregion + } + + public void JobRetreival() + { + #region Snippet:Batch_Readme_JobRetreival + BatchClient _batchClient = new BatchClient( + new Uri("https://.eastus.batch.azure.com"), new DefaultAzureCredential()); + + BatchJob batchJob = _batchClient.GetJob("jobID"); + Console.WriteLine(batchJob.Id); + Console.WriteLine(batchJob.State); + #endregion + } + + public void ListJobs() + { + #region Snippet:Batch_Readme_ListJobs + BatchClient _batchClient = new BatchClient( + new Uri("https://.eastus.batch.azure.com"), new DefaultAzureCredential()); + + foreach (BatchJob item in _batchClient.GetJobs()) + { + Console.WriteLine(item.Id); + } + #endregion + } + + public void TaskCreation() + { + #region Snippet:Batch_Readme_TaskCreation + BatchClient _batchClient = new BatchClient( + new Uri("https://.eastus.batch.azure.com"), new DefaultAzureCredential()); + + _batchClient.CreateTask("jobId", new BatchTaskCreateContent("taskId", $"echo Hello world")); + #endregion + } + + public void TaskRetreival() + { + #region Snippet:Batch_Readme_TaskRetreival + BatchClient _batchClient = new BatchClient( + new Uri("https://.eastus.batch.azure.com"), new DefaultAzureCredential()); + + BatchTask batchTask = _batchClient.GetTask("", ""); + Console.WriteLine(batchTask.Id); + Console.WriteLine(batchTask.State); + #endregion + } + + public void ListTasks() + { + #region Snippet:Batch_Readme_ListTasks + BatchClient _batchClient = new BatchClient( + new Uri("https://.eastus.batch.azure.com"), new DefaultAzureCredential()); + + var completedTasks = _batchClient.GetTasks("jobId", filter: "state eq 'completed'"); + foreach (BatchTask t in completedTasks) + { + var outputFileName = t.ExecutionInfo.ExitCode == 0 ? "stdout.txt" : "stderr.txt"; + + Console.WriteLine("Task {0} exited with code {1}. Output ({2}):", + t.Id, t.ExecutionInfo.ExitCode, outputFileName); + + BinaryData fileContents = _batchClient.GetTaskFile("jobId", t.Id, outputFileName); + using (var reader = new StreamReader(fileContents.ToStream())) + { + Console.WriteLine(reader.ReadLine()); + } + } + #endregion + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/tests/Snippets/Sample1_CreatePool_Job_Task.cs b/sdk/batch/Azure.Compute.Batch/tests/Snippets/Sample1_CreatePool_Job_Task.cs new file mode 100644 index 0000000000000..56ff04cb33b4b --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/tests/Snippets/Sample1_CreatePool_Job_Task.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.IO; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager; +using Azure.ResourceManager.Batch; +using Azure.ResourceManager.Batch.Models; + +namespace Azure.Compute.Batch.Tests.Snippets +{ + /// + /// Class is used as code base for Sample1_CreatePool_Job_Task + /// + /// + public class Sample1_CreatePool_Job_Task + { + /// + /// Code to create a Batch client and call operations for snippets. + /// + /// + public async void BatchClientOperations() + { + #region Snippet:Batch_Sample01_CreateBatchClient + + var credential = new DefaultAzureCredential(); + BatchClient _batchClient = new BatchClient( + new Uri("https://examplebatchaccount.eastus.batch.azure.com"), credential); + #endregion + + #region Snippet:Batch_Sample01_CreateBatchJob + await _batchClient.CreateJobAsync(new BatchJobCreateContent("jobId", new BatchPoolInfo() { PoolId = "poolName" })); + #endregion + + #region Snippet:Batch_Sample01_CreateBatchTask + await _batchClient.CreateTaskAsync("jobId", new BatchTaskCreateContent("taskId", $"echo Hello world")); + #endregion + + #region Snippet:Batch_Sample01_GetTasks + var completedTasks = _batchClient.GetTasksAsync("jobId", filter: "state eq 'completed'"); + await foreach (BatchTask t in completedTasks) + { + var outputFileName = t.ExecutionInfo.ExitCode == 0 ? "stdout.txt" : "stderr.txt"; + + Console.WriteLine("Task {0} exited with code {1}. Output ({2}):", + t.Id, t.ExecutionInfo.ExitCode, outputFileName); + + BinaryData fileContents = await _batchClient.GetTaskFileAsync("jobId", t.Id, outputFileName); + using (var reader = new StreamReader(fileContents.ToStream())) + { + Console.WriteLine(await reader.ReadLineAsync()); + } + } + #endregion + } + + /// + /// Code to create a Batch mgmt client and call operatrions snippet. + /// + /// + public async void BatchMgmtOperations() + { + #region Snippet:Batch_Sample01_CreateBatchMgmtClient + + var credential = new DefaultAzureCredential(); + ArmClient _armClient = new ArmClient(credential); + #endregion + + #region Snippet:Batch_Sample01_GetBatchMgmtAccount + var batchAccountIdentifier = ResourceIdentifier.Parse("your-batch-account-resource-id"); + BatchAccountResource batchAccount = await _armClient.GetBatchAccountResource(batchAccountIdentifier).GetAsync(); + #endregion + + #region Snippet:Batch_Sample01_PoolCreation + var poolName = "HelloWorldPool"; + var imageReference = new BatchImageReference() + { + Publisher = "canonical", + Offer = "0001-com-ubuntu-server-jammy", + Sku = "22_04-lts", + Version = "latest" + }; + string nodeAgentSku = "batch.node.ubuntu 22.04"; + + ArmOperation armOperation = await batchAccount.GetBatchAccountPools().CreateOrUpdateAsync( + WaitUntil.Completed, poolName, new BatchAccountPoolData() + { + VmSize = "Standard_DS1_v2", + DeploymentConfiguration = new BatchDeploymentConfiguration() + { + VmConfiguration = new BatchVmConfiguration(imageReference, nodeAgentSku) + }, + ScaleSettings = new BatchAccountPoolScaleSettings() + { + FixedScale = new BatchAccountFixedScaleSettings() + { + TargetDedicatedNodes = 1 + } + } + }); + BatchAccountPoolResource pool = armOperation.Value; + #endregion + } + } +} diff --git a/sdk/batch/Azure.Compute.Batch/tsp-location.yaml b/sdk/batch/Azure.Compute.Batch/tsp-location.yaml new file mode 100644 index 0000000000000..399863ae4a83f --- /dev/null +++ b/sdk/batch/Azure.Compute.Batch/tsp-location.yaml @@ -0,0 +1,3 @@ +directory: specification/batch/Azure.Batch +commit: 9df71d5a717e4ed5e6728e7e6ba2fead60f62243 +repo: Azure/azure-rest-api-specs diff --git a/sdk/batch/ci.data.yml b/sdk/batch/ci.data.yml new file mode 100644 index 0000000000000..881610e1be241 --- /dev/null +++ b/sdk/batch/ci.data.yml @@ -0,0 +1,49 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - main + - hotfix/* + - release/* + paths: + include: + - sdk/batch/ci.data.yml + - sdk/batch/service.projects + - sdk/batch/Microsoft.Azure.Batch + - sdk/batch/MicrosoftAzureBatchFileStaging + - sdk/batch/Microsoft.Azure.Batch.Conventions.Files + exclude: + - sdk/batch/Azure.ResourceManager.Batch/ + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/batch/ci.data.yml + - sdk/batch/service.projects + - sdk/batch/Microsoft.Azure.Batch + - sdk/batch/MicrosoftAzureBatchFileStaging + - sdk/batch/Microsoft.Azure.Batch.Conventions.Files + exclude: + - sdk/batch/Azure.ResourceManager.Batch/ + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + SdkType: data + ServiceDirectory: batch + ArtifactName: packages + BuildSnippets: false + Artifacts: + - name: Microsoft.Azure.Batch + safeName: MicrosoftAzureBatch + - name: Microsoft.Azure.Batch.FileStaging + safeName: MicrosoftAzureBatchFileStaging + - name: Microsoft.Azure.Batch.Conventions.Files + safeName: MicrosoftAzureBatchConventionsFiles diff --git a/sdk/batch/ci.mgmt.yml b/sdk/batch/ci.mgmt.yml index 0813a93903c7e..fdb37873525c8 100644 --- a/sdk/batch/ci.mgmt.yml +++ b/sdk/batch/ci.mgmt.yml @@ -16,6 +16,7 @@ pr: extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: + SdkType: mgmtclient ServiceDirectory: batch LimitForPullRequest: true Artifacts: diff --git a/sdk/batch/ci.yml b/sdk/batch/ci.yml index 54d4512ce1c09..94d08a3340126 100644 --- a/sdk/batch/ci.yml +++ b/sdk/batch/ci.yml @@ -8,7 +8,9 @@ trigger: - release/* paths: include: - - sdk/batch/ + - sdk/batch/ci.yml + - sdk/batch/service.projects + - sdk/batch/Azure.Compute.Batch exclude: - sdk/batch/Azure.ResourceManager.Batch/ @@ -21,20 +23,18 @@ pr: - release/* paths: include: - - sdk/batch/ + - sdk/batch/ci.yml + - sdk/batch/service.projects + - sdk/batch/Azure.Compute.Batch exclude: - sdk/batch/Azure.ResourceManager.Batch/ extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: + SDKType: client ServiceDirectory: batch ArtifactName: packages - BuildSnippets: false Artifacts: - - name: Microsoft.Azure.Batch - safeName: MicrosoftAzureBatch - - name: Microsoft.Azure.Batch.FileStaging - safeName: MicrosoftAzureBatchFileStaging - - name: Microsoft.Azure.Batch.Conventions.Files - safeName: MicrosoftAzureBatchConventionsFiles + - name: Azure.Compute.Batch + safeName: AzureComputeBatch diff --git a/sdk/batch/service.projects b/sdk/batch/service.projects index 49fb6c11c8a05..4dab13fedd216 100644 --- a/sdk/batch/service.projects +++ b/sdk/batch/service.projects @@ -1,4 +1,32 @@ + + + + + + + + + + + + + + diff --git a/sdk/batch/test-resources.json b/sdk/batch/test-resources.json index 705b696327d17..f6e02bcc4aa55 100644 --- a/sdk/batch/test-resources.json +++ b/sdk/batch/test-resources.json @@ -11,21 +11,61 @@ }, "variables": { "batch_account_name": "dotnotsdkbatchaccount1", + "batch_storage_name": "dotnotsdkbatchstorage1", "location": "eastus", - "api_version": "2023-11-01" + "api_version": "2023-11-01", + "mgmtApiVersion": "2022-05-01", + "encryption": { + "services": { + "file": { + "enabled": true + }, + "blob": { + "enabled": true + } + }, + "keySource": "Microsoft.Storage" + }, + "networkAcls": { + "bypass": "AzureServices", + "virtualNetworkRules": [], + "ipRules": [], + "defaultAction": "Allow" + } }, "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "[variables('mgmtApiVersion')]", + "name": "[variables('batch_storage_name')]", + "location": "[variables('location')]", + "sku": { + "name": "Standard_RAGRS", + "tier": "Standard" + }, + "kind": "StorageV2", + "properties": { + "networkAcls": "[variables('networkAcls')]", + "supportsHttpsTrafficOnly": true, + "encryption": "[variables('encryption')]", + "accessTier": "Hot", + "minimumTlsVersion": "TLS1_2", + "allowBlobPublicAccess": true + } + }, { "type": "Microsoft.Batch/batchAccounts", "apiVersion": "[variables('api_version')]", "name": "[variables('batch_account_name')]", "location": "[variables('location')]", - "dependsOn": [], "tags": {}, "identity": { "type": "None" }, "properties": { + "autoStorage": { + "storageAccountId": "[resourceId('Microsoft.Storage/storageAccounts', variables('batch_storage_name'))]" + }, "publicNetworkAccess": "Enabled", "poolAllocationMode": "BatchService", "allowedAuthenticationModes": [ @@ -38,10 +78,17 @@ "defaultAction": "Allow" } } - } + }, + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('batch_storage_name'))]" + ] } ], "outputs": { + "batch_storage_name": { + "type": "string", + "value": "[variables('batch_storage_name')]" + }, "batch_account_name": { "type": "string", "value": "[variables('batch_account_name')]" diff --git a/sdk/batch/tests.yml b/sdk/batch/tests.yml new file mode 100644 index 0000000000000..4fd5d88a34965 --- /dev/null +++ b/sdk/batch/tests.yml @@ -0,0 +1,11 @@ +trigger: none + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml + parameters: + MaxParallel: 6 + ServiceDirectory: batch + SDKType: client + TimeoutInMinutes: 240 + Clouds: 'Public,Canary' + SupportedClouds: 'Public,UsGov,Canary' \ No newline at end of file From 328c716cef4de42f0e7f829dc904d2a638541670 Mon Sep 17 00:00:00 2001 From: JialinXin Date: Wed, 3 Jul 2024 08:50:42 +0800 Subject: [PATCH 004/144] Fix SetState() not work (#44819) * Fix SetState not work * Fix namespace. * Add API updates. --- ...re.Functions.Worker.Extensions.WebPubSub.netstandard2.0.cs | 2 +- .../src/Models/Trigger/ConnectEventResponse.cs | 2 ++ .../src/Models/Trigger/UserEventResponse.cs | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sdk/webpubsub/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub/api/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub.netstandard2.0.cs b/sdk/webpubsub/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub/api/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub.netstandard2.0.cs index ee553b8d299cd..0fb76e2439423 100644 --- a/sdk/webpubsub/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub/api/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub.netstandard2.0.cs +++ b/sdk/webpubsub/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub/api/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub.netstandard2.0.cs @@ -169,7 +169,7 @@ public UserEventResponse() { } public UserEventResponse(System.BinaryData data, Microsoft.Azure.Functions.Worker.WebPubSubDataType dataType) { } public UserEventResponse(string data, Microsoft.Azure.Functions.Worker.WebPubSubDataType dataType = Microsoft.Azure.Functions.Worker.WebPubSubDataType.Text) { } [System.Text.Json.Serialization.JsonPropertyNameAttribute("states")] - public System.Collections.Generic.IReadOnlyDictionary ConnectionStates { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyDictionary ConnectionStates { get { throw null; } } [System.Text.Json.Serialization.JsonPropertyNameAttribute("data")] public System.BinaryData Data { get { throw null; } set { } } [System.Text.Json.Serialization.JsonPropertyNameAttribute("dataType")] diff --git a/sdk/webpubsub/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub/src/Models/Trigger/ConnectEventResponse.cs b/sdk/webpubsub/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub/src/Models/Trigger/ConnectEventResponse.cs index 2dd1c8f07bda6..cfe700cd4005d 100644 --- a/sdk/webpubsub/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub/src/Models/Trigger/ConnectEventResponse.cs +++ b/sdk/webpubsub/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub/src/Models/Trigger/ConnectEventResponse.cs @@ -6,6 +6,7 @@ using System.ComponentModel; using System.Linq; using System.Text.Json.Serialization; +using Microsoft.Azure.WebPubSub.Common; namespace Microsoft.Azure.Functions.Worker { @@ -35,6 +36,7 @@ internal override WebPubSubStatusCode StatusCode /// The connection states. /// [JsonPropertyName("states")] + [JsonConverter(typeof(ConnectionStatesConverter))] public IReadOnlyDictionary ConnectionStates => _states; /// diff --git a/sdk/webpubsub/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub/src/Models/Trigger/UserEventResponse.cs b/sdk/webpubsub/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub/src/Models/Trigger/UserEventResponse.cs index 801a0377dcd78..92c57e61f4821 100644 --- a/sdk/webpubsub/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub/src/Models/Trigger/UserEventResponse.cs +++ b/sdk/webpubsub/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub/src/Models/Trigger/UserEventResponse.cs @@ -6,6 +6,7 @@ using System.ComponentModel; using System.Runtime.Serialization; using System.Text.Json.Serialization; +using Microsoft.Azure.WebPubSub.Common; namespace Microsoft.Azure.Functions.Worker { @@ -36,7 +37,8 @@ internal override WebPubSubStatusCode StatusCode /// The connection states. /// [JsonPropertyName("states")] - public IReadOnlyDictionary ConnectionStates { get; set; } + [JsonConverter(typeof(ConnectionStatesConverter))] + public IReadOnlyDictionary ConnectionStates => _states; /// /// Message. From 5283dd0c9ac7713767e1ad7f81018e1ab51f53be Mon Sep 17 00:00:00 2001 From: "Jiale Zhang (MSFT)" <141405558+zhangjiale-64@users.noreply.github.com> Date: Wed, 3 Jul 2024 21:39:24 +0800 Subject: [PATCH 005/144] Fix spelling issues in all subpackages READMEs (#44844) --- sdk/provisioning/Azure.Provisioning.AppConfiguration/README.md | 2 +- .../Azure.Provisioning.ApplicationInsights/README.md | 2 +- sdk/provisioning/Azure.Provisioning.CognitiveServices/README.md | 2 +- sdk/provisioning/Azure.Provisioning.CosmosDB/README.md | 2 +- sdk/provisioning/Azure.Provisioning.EventHubs/README.md | 2 +- sdk/provisioning/Azure.Provisioning.KeyVault/README.md | 2 +- .../Azure.Provisioning.OperationalInsights/README.md | 2 +- sdk/provisioning/Azure.Provisioning.PostgreSql/README.md | 2 +- sdk/provisioning/Azure.Provisioning.Redis/README.md | 2 +- sdk/provisioning/Azure.Provisioning.Resources/README.md | 2 +- sdk/provisioning/Azure.Provisioning.Search/README.md | 2 +- sdk/provisioning/Azure.Provisioning.ServiceBus/README.md | 2 +- sdk/provisioning/Azure.Provisioning.SignalR/README.md | 2 +- sdk/provisioning/Azure.Provisioning.Sql/README.md | 2 +- sdk/provisioning/Azure.Provisioning.Storage/README.md | 2 +- sdk/provisioning/Azure.Provisioning.WebPubSub/README.md | 2 +- sdk/provisioning/README.md | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/sdk/provisioning/Azure.Provisioning.AppConfiguration/README.md b/sdk/provisioning/Azure.Provisioning.AppConfiguration/README.md index 3342394d3ee80..02ccd43b70671 100644 --- a/sdk/provisioning/Azure.Provisioning.AppConfiguration/README.md +++ b/sdk/provisioning/Azure.Provisioning.AppConfiguration/README.md @@ -20,7 +20,7 @@ dotnet add package Azure.Provisioning.AppConfiguration ## Key concepts -This library allows you to specify your infrastructure in a declarative style using dotnet. You can then use azd to deploy your infrastructure to Azure diretly without needing to write or maintain bicep or arm templates. +This library allows you to specify your infrastructure in a declarative style using dotnet. You can then use azd to deploy your infrastructure to Azure directly without needing to write or maintain bicep or arm templates. ## Examples diff --git a/sdk/provisioning/Azure.Provisioning.ApplicationInsights/README.md b/sdk/provisioning/Azure.Provisioning.ApplicationInsights/README.md index 62f99493cea17..8432eeb65870b 100644 --- a/sdk/provisioning/Azure.Provisioning.ApplicationInsights/README.md +++ b/sdk/provisioning/Azure.Provisioning.ApplicationInsights/README.md @@ -20,7 +20,7 @@ dotnet add package Azure.Provisioning.ApplicationInsights ## Key concepts -This library allows you to specify your infrastructure in a declarative style using dotnet. You can then use azd to deploy your infrastructure to Azure diretly without needing to write or maintain bicep or arm templates. +This library allows you to specify your infrastructure in a declarative style using dotnet. You can then use azd to deploy your infrastructure to Azure directly without needing to write or maintain bicep or arm templates. ## Examples diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/README.md b/sdk/provisioning/Azure.Provisioning.CognitiveServices/README.md index f80140789dc39..30b96f50f52a0 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/README.md +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/README.md @@ -20,7 +20,7 @@ dotnet add package Azure.Provisioning.CognitiveServices ## Key concepts -This library allows you to specify your infrastructure in a declarative style using dotnet. You can then use azd to deploy your infrastructure to Azure diretly without needing to write or maintain bicep or arm templates. +This library allows you to specify your infrastructure in a declarative style using dotnet. You can then use azd to deploy your infrastructure to Azure directly without needing to write or maintain bicep or arm templates. ## Examples diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/README.md b/sdk/provisioning/Azure.Provisioning.CosmosDB/README.md index ba8cefde9d90e..220a9f614ec38 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/README.md +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/README.md @@ -20,7 +20,7 @@ dotnet add package Azure.Provisioning.CosmosDB ## Key concepts -This library allows you to specify your infrastructure in a declarative style using dotnet. You can then use azd to deploy your infrastructure to Azure diretly without needing to write or maintain bicep or arm templates. +This library allows you to specify your infrastructure in a declarative style using dotnet. You can then use azd to deploy your infrastructure to Azure directly without needing to write or maintain bicep or arm templates. ## Examples diff --git a/sdk/provisioning/Azure.Provisioning.EventHubs/README.md b/sdk/provisioning/Azure.Provisioning.EventHubs/README.md index 1292e81ebb27f..97e89f53dddbf 100644 --- a/sdk/provisioning/Azure.Provisioning.EventHubs/README.md +++ b/sdk/provisioning/Azure.Provisioning.EventHubs/README.md @@ -20,7 +20,7 @@ dotnet add package Azure.Provisioning.EventHubs ## Key concepts -This library allows you to specify your infrastructure in a declarative style using dotnet. You can then use azd to deploy your infrastructure to Azure diretly without needing to write or maintain bicep or arm templates. +This library allows you to specify your infrastructure in a declarative style using dotnet. You can then use azd to deploy your infrastructure to Azure directly without needing to write or maintain bicep or arm templates. ## Examples diff --git a/sdk/provisioning/Azure.Provisioning.KeyVault/README.md b/sdk/provisioning/Azure.Provisioning.KeyVault/README.md index 08b972b324206..6a0403784eab7 100644 --- a/sdk/provisioning/Azure.Provisioning.KeyVault/README.md +++ b/sdk/provisioning/Azure.Provisioning.KeyVault/README.md @@ -20,7 +20,7 @@ dotnet add package Azure.Provisioning.KeyVault ## Key concepts -This library allows you to specify your infrastructure in a declarative style using dotnet. You can then use azd to deploy your infrastructure to Azure diretly without needing to write or maintain bicep or arm templates. +This library allows you to specify your infrastructure in a declarative style using dotnet. You can then use azd to deploy your infrastructure to Azure directly without needing to write or maintain bicep or arm templates. ## Examples diff --git a/sdk/provisioning/Azure.Provisioning.OperationalInsights/README.md b/sdk/provisioning/Azure.Provisioning.OperationalInsights/README.md index ca5118a46ec8f..5ecca287bf730 100644 --- a/sdk/provisioning/Azure.Provisioning.OperationalInsights/README.md +++ b/sdk/provisioning/Azure.Provisioning.OperationalInsights/README.md @@ -20,7 +20,7 @@ dotnet add package Azure.Provisioning.OperationalInsights ## Key concepts -This library allows you to specify your infrastructure in a declarative style using dotnet. You can then use azd to deploy your infrastructure to Azure diretly without needing to write or maintain bicep or arm templates. +This library allows you to specify your infrastructure in a declarative style using dotnet. You can then use azd to deploy your infrastructure to Azure directly without needing to write or maintain bicep or arm templates. ## Examples diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/README.md b/sdk/provisioning/Azure.Provisioning.PostgreSql/README.md index dcc3e27d146fe..e6a87a1bfe5af 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/README.md +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/README.md @@ -20,7 +20,7 @@ dotnet add package Azure.Provisioning.PostgreSql ## Key concepts -This library allows you to specify your infrastructure in a declarative style using dotnet. You can then use azd to deploy your infrastructure to Azure diretly without needing to write or maintain bicep or arm templates. +This library allows you to specify your infrastructure in a declarative style using dotnet. You can then use azd to deploy your infrastructure to Azure directly without needing to write or maintain bicep or arm templates. ## Examples diff --git a/sdk/provisioning/Azure.Provisioning.Redis/README.md b/sdk/provisioning/Azure.Provisioning.Redis/README.md index 0bc23427f2e7f..b10d8a8217e09 100644 --- a/sdk/provisioning/Azure.Provisioning.Redis/README.md +++ b/sdk/provisioning/Azure.Provisioning.Redis/README.md @@ -20,7 +20,7 @@ dotnet add package Azure.Provisioning.Redis ## Key concepts -This library allows you to specify your infrastructure in a declarative style using dotnet. You can then use azd to deploy your infrastructure to Azure diretly without needing to write or maintain bicep or arm templates. +This library allows you to specify your infrastructure in a declarative style using dotnet. You can then use azd to deploy your infrastructure to Azure directly without needing to write or maintain bicep or arm templates. ## Examples diff --git a/sdk/provisioning/Azure.Provisioning.Resources/README.md b/sdk/provisioning/Azure.Provisioning.Resources/README.md index abded140ca6f3..d81ca3b8b9b02 100644 --- a/sdk/provisioning/Azure.Provisioning.Resources/README.md +++ b/sdk/provisioning/Azure.Provisioning.Resources/README.md @@ -20,7 +20,7 @@ dotnet add package Azure.Provisioning.Resources ## Key concepts -This library allows you to specify your infrastructure in a declarative style using dotnet. You can then use azd to deploy your infrastructure to Azure diretly without needing to write or maintain bicep or arm templates. +This library allows you to specify your infrastructure in a declarative style using dotnet. You can then use azd to deploy your infrastructure to Azure directly without needing to write or maintain bicep or arm templates. ## Examples diff --git a/sdk/provisioning/Azure.Provisioning.Search/README.md b/sdk/provisioning/Azure.Provisioning.Search/README.md index a85a6a0995ce5..7cf8eaec9f597 100644 --- a/sdk/provisioning/Azure.Provisioning.Search/README.md +++ b/sdk/provisioning/Azure.Provisioning.Search/README.md @@ -20,7 +20,7 @@ dotnet add package Azure.Provisioning.Search ## Key concepts -This library allows you to specify your infrastructure in a declarative style using dotnet. You can then use azd to deploy your infrastructure to Azure diretly without needing to write or maintain bicep or arm templates. +This library allows you to specify your infrastructure in a declarative style using dotnet. You can then use azd to deploy your infrastructure to Azure directly without needing to write or maintain bicep or arm templates. ## Examples diff --git a/sdk/provisioning/Azure.Provisioning.ServiceBus/README.md b/sdk/provisioning/Azure.Provisioning.ServiceBus/README.md index 439616835ca6a..943b605d76817 100644 --- a/sdk/provisioning/Azure.Provisioning.ServiceBus/README.md +++ b/sdk/provisioning/Azure.Provisioning.ServiceBus/README.md @@ -20,7 +20,7 @@ dotnet add package Azure.Provisioning.ServiceBus ## Key concepts -This library allows you to specify your infrastructure in a declarative style using dotnet. You can then use azd to deploy your infrastructure to Azure diretly without needing to write or maintain bicep or arm templates. +This library allows you to specify your infrastructure in a declarative style using dotnet. You can then use azd to deploy your infrastructure to Azure directly without needing to write or maintain bicep or arm templates. ## Examples diff --git a/sdk/provisioning/Azure.Provisioning.SignalR/README.md b/sdk/provisioning/Azure.Provisioning.SignalR/README.md index 53adb73eb35c7..3cb451e785c1b 100644 --- a/sdk/provisioning/Azure.Provisioning.SignalR/README.md +++ b/sdk/provisioning/Azure.Provisioning.SignalR/README.md @@ -20,7 +20,7 @@ dotnet add package Azure.Provisioning.SignalR ## Key concepts -This library allows you to specify your infrastructure in a declarative style using dotnet. You can then use azd to deploy your infrastructure to Azure diretly without needing to write or maintain bicep or arm templates. +This library allows you to specify your infrastructure in a declarative style using dotnet. You can then use azd to deploy your infrastructure to Azure directly without needing to write or maintain bicep or arm templates. ## Examples diff --git a/sdk/provisioning/Azure.Provisioning.Sql/README.md b/sdk/provisioning/Azure.Provisioning.Sql/README.md index 33b51f4a8692d..9d8615a505d4e 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/README.md +++ b/sdk/provisioning/Azure.Provisioning.Sql/README.md @@ -20,7 +20,7 @@ dotnet add package Azure.Provisioning.Sql ## Key concepts -This library allows you to specify your infrastructure in a declarative style using dotnet. You can then use azd to deploy your infrastructure to Azure diretly without needing to write or maintain bicep or arm templates. +This library allows you to specify your infrastructure in a declarative style using dotnet. You can then use azd to deploy your infrastructure to Azure directly without needing to write or maintain bicep or arm templates. ## Examples diff --git a/sdk/provisioning/Azure.Provisioning.Storage/README.md b/sdk/provisioning/Azure.Provisioning.Storage/README.md index cd8ff4476ac57..30bfcc7b2908b 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/README.md +++ b/sdk/provisioning/Azure.Provisioning.Storage/README.md @@ -20,7 +20,7 @@ dotnet add package Azure.Provisioning.Storage ## Key concepts -This library allows you to specify your infrastructure in a declarative style using dotnet. You can then use azd to deploy your infrastructure to Azure diretly without needing to write or maintain bicep or arm templates. +This library allows you to specify your infrastructure in a declarative style using dotnet. You can then use azd to deploy your infrastructure to Azure directly without needing to write or maintain bicep or arm templates. ## Examples diff --git a/sdk/provisioning/Azure.Provisioning.WebPubSub/README.md b/sdk/provisioning/Azure.Provisioning.WebPubSub/README.md index 438df373bb063..cc2a4c0558849 100644 --- a/sdk/provisioning/Azure.Provisioning.WebPubSub/README.md +++ b/sdk/provisioning/Azure.Provisioning.WebPubSub/README.md @@ -20,7 +20,7 @@ dotnet add package Azure.Provisioning.WebPubSub --prerelease ## Key concepts -This library allows you to specify your infrastructure in a declarative style using dotnet. You can then use azd to deploy your infrastructure to Azure diretly without needing to write or maintain bicep or arm templates. +This library allows you to specify your infrastructure in a declarative style using dotnet. You can then use azd to deploy your infrastructure to Azure directly without needing to write or maintain bicep or arm templates. ## Examples diff --git a/sdk/provisioning/README.md b/sdk/provisioning/README.md index dfee760f14946..421ff1109c7a4 100644 --- a/sdk/provisioning/README.md +++ b/sdk/provisioning/README.md @@ -25,7 +25,7 @@ pattern of `Azure.Provisioning.{ServiceName}`. ## Key concepts -This library allows you to specify your infrastructure in a declarative style using dotnet. You can then use azd to deploy your infrastructure to Azure diretly without needing to write or maintain bicep or arm templates. +This library allows you to specify your infrastructure in a declarative style using dotnet. You can then use azd to deploy your infrastructure to Azure directly without needing to write or maintain bicep or arm templates. ## Examples From 0608f9624ac15ee870443febaba9c7387ca35cc6 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 3 Jul 2024 09:39:54 -0400 Subject: [PATCH 006/144] Increment package version after release of Azure.Compute.Batch (#44838) --- sdk/batch/Azure.Compute.Batch/CHANGELOG.md | 10 ++++++++++ .../Azure.Compute.Batch/src/Azure.Compute.Batch.csproj | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/sdk/batch/Azure.Compute.Batch/CHANGELOG.md b/sdk/batch/Azure.Compute.Batch/CHANGELOG.md index 1cf622ded57f4..9f5d79a267222 100644 --- a/sdk/batch/Azure.Compute.Batch/CHANGELOG.md +++ b/sdk/batch/Azure.Compute.Batch/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.0.0-beta.2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.0.0-beta.1 (2024-06-01) ### Features Added diff --git a/sdk/batch/Azure.Compute.Batch/src/Azure.Compute.Batch.csproj b/sdk/batch/Azure.Compute.Batch/src/Azure.Compute.Batch.csproj index 4b7ac983c5ab8..e8c7b32aba424 100644 --- a/sdk/batch/Azure.Compute.Batch/src/Azure.Compute.Batch.csproj +++ b/sdk/batch/Azure.Compute.Batch/src/Azure.Compute.Batch.csproj @@ -2,7 +2,7 @@ This is the Azure.Compute.Batch client library, enabling the creation and management of Batch objects such as Pools, Jobs, and Tasks. For more information about Azure Batch, see https://learn.microsoft.com/azure/batch/batch-technical-overview The Azure Batch client library - 1.0.0-beta.1 + 1.0.0-beta.2 Azure.Compute.Batch $(RequiredTargetFrameworks) true From e8c05c3688e18ce57ffd2fe6957911ce97588f06 Mon Sep 17 00:00:00 2001 From: Amanda Nguyen <48961492+amnguye@users.noreply.github.com> Date: Wed, 3 Jul 2024 09:54:38 -0700 Subject: [PATCH 007/144] Fixing constant in BlobSourceCheckpointData to have correct schema size (#44839) --- .../src/DataMovementBlobConstants.cs | 2 +- .../tests/BlobSourceCheckpointDataTests.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/src/DataMovementBlobConstants.cs b/sdk/storage/Azure.Storage.DataMovement.Blobs/src/DataMovementBlobConstants.cs index ed88850913098..7a2b284776799 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/src/DataMovementBlobConstants.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/src/DataMovementBlobConstants.cs @@ -19,7 +19,7 @@ internal class SourceCheckpointData internal const int SchemaVersion = 2; internal const int VersionIndex = 0; - internal const int DataSize = VersionIndex + OneByte; + internal const int DataSize = VersionIndex + IntSizeInBytes; } internal class DestinationCheckpointData diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/BlobSourceCheckpointDataTests.cs b/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/BlobSourceCheckpointDataTests.cs index 418b0e7252eae..1f3e22a6340a1 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/BlobSourceCheckpointDataTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/BlobSourceCheckpointDataTests.cs @@ -52,7 +52,7 @@ public void Deserialize(BlobType blobType) { BlobSourceCheckpointData data = new(); - using (Stream stream = new MemoryStream(DataMovementBlobConstants.DestinationCheckpointData.VariableLengthStartIndex)) + using (Stream stream = new MemoryStream(DataMovementBlobConstants.SourceCheckpointData.DataSize)) { data.Serialize(stream); stream.Position = 0; From b413fa5711e096bdc3a26caaf2069252bc408266 Mon Sep 17 00:00:00 2001 From: Amanda Nguyen <48961492+amnguye@users.noreply.github.com> Date: Wed, 3 Jul 2024 09:55:16 -0700 Subject: [PATCH 008/144] [Storage] [DataMovement] [Shares] Preserve Permission Key (#44696) * WIP * Preserve Single Transfer Permissions; Rerecorded failing tests * Cleanup * Preserve permission key defaults to false * PR Comments * Removed unnecessary ResourceProperties in ShareDirectoryResource; Fixed LastWritten values; preserve permissions * Rerecord tests * Revert assests.json to main * Rerecord tests * Rerecord test to hopefully resolve merge conflict assets tag * Added end to end tests for short permission values --- .../assets.json | 2 +- .../src/AppendBlobStorageResource.cs | 13 + .../src/BlobStorageResourceContainer.cs | 1 + .../src/BlockBlobStorageResource.cs | 13 + .../src/PageBlobStorageResource.cs | 13 + .../tests/AppendBlobStartTransferCopyTests.cs | 1 - .../tests/AppendBlobToPageBlobTests.cs | 1 - .../BlobContainerServiceToServiceJobTests.cs | 8 +- .../tests/BlockBlobToAppendBlobTests.cs | 1 - .../tests/PageBlobStartTransferCopyTests.cs | 1 - .../tests/PageBlobToAppendBlobTests.cs | 1 - ...ppendBlobDirectoryToShareDirectoryTests.cs | 13 +- ...BlockBlobDirectoryToShareDirectoryTests.cs | 13 +- .../PageBlobDirectoryToShareDirectoryTests.cs | 13 +- ...hareDirectoryToAppendBlobDirectoryTests.cs | 6 +- ...ShareDirectoryToBlockBlobDirectoryTests.cs | 6 +- .../ShareDirectoryToPageBlobDirectoryTests.cs | 6 +- ...torage.DataMovement.Files.Shares.net6.0.cs | 3 +- ...ataMovement.Files.Shares.netstandard2.0.cs | 3 +- .../assets.json | 2 +- .../src/DataMovementShareConstants.cs | 5 +- .../src/DataMovementSharesExtensions.cs | 181 +++++- .../src/PathScanner.cs | 61 +- .../ShareDirectoryStorageResourceContainer.cs | 33 +- .../src/ShareFileDestinationCheckpointData.cs | 37 +- .../src/ShareFileStorageResource.cs | 63 +- .../src/ShareFileStorageResourceOptions.cs | 36 +- .../src/ShareFilesStorageResourceProvider.cs | 8 +- .../tests/ClientMockingExtensions.cs | 29 +- .../tests/PathScannerTests.cs | 100 ++- .../tests/RehydrateShareResourceTests.cs | 4 +- .../ShareDestinationCheckpointDataTests.cs | 25 +- .../ShareDirectoryStartTransferCopyTests.cs | 270 +++++++- ...eDirectoryStorageResourceContainerTests.cs | 29 +- .../tests/ShareFileResourceTests.cs | 583 ++++++++++++++++-- .../tests/ShareFileStartTransferCopyTests.cs | 352 ++++++++++- .../api/Azure.Storage.DataMovement.net6.0.cs | 8 +- ...ure.Storage.DataMovement.netstandard2.0.cs | 8 +- .../src/DataTransferProperty.cs | 2 +- .../LocalDirectoryStorageResourceContainer.cs | 2 + .../src/LocalFileStorageResource.cs | 13 + .../src/ServiceToServiceJobPart.cs | 5 + .../src/ServiceToServiceTransferJob.cs | 1 + .../src/Shared/DataMovementConstants.cs | 5 +- .../StorageResourceContainerInternal.cs | 3 +- .../src/Shared/StorageResourceItemInternal.cs | 9 + .../src/StorageResourceContainer.cs | 1 + .../src/StorageResourceItem.cs | 18 +- .../src/StorageResourceItemProperties.cs | 2 +- .../tests/CleanUpTransferTests.cs | 8 + .../tests/MockStorageResource.cs | 13 + .../tests/ServiceToServiceJobPartTests.cs | 30 +- .../Shared/MemoryStorageResourceContainer.cs | 1 + .../tests/Shared/MemoryStorageResourceItem.cs | 15 + .../tests/Shared/StartTransferCopyTestBase.cs | 2 +- .../StartTransferDirectoryCopyTestBase.cs | 16 +- 56 files changed, 1834 insertions(+), 264 deletions(-) diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/assets.json b/sdk/storage/Azure.Storage.DataMovement.Blobs/assets.json index 5875964cd5cd0..dd04f26a79a05 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/assets.json +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/storage/Azure.Storage.DataMovement.Blobs", - "Tag": "net/storage/Azure.Storage.DataMovement.Blobs_0523c237f1" + "Tag": "net/storage/Azure.Storage.DataMovement.Blobs_db329f90cd" } diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/src/AppendBlobStorageResource.cs b/sdk/storage/Azure.Storage.DataMovement.Blobs/src/AppendBlobStorageResource.cs index a29fcfda0d602..1a1b82f90c863 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/src/AppendBlobStorageResource.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/src/AppendBlobStorageResource.cs @@ -325,5 +325,18 @@ protected override StorageResourceCheckpointData GetDestinationCheckpointData() metadata:_options?.Metadata, tags: default); } + + // no-op for get permissions + protected override Task GetPermissionsAsync( + StorageResourceItemProperties properties = default, + CancellationToken cancellationToken = default) + => Task.FromResult((string)default); + + // no-op for set permissions + protected override Task SetPermissionsAsync( + StorageResourceItem sourceResource, + StorageResourceItemProperties sourceProperties, + CancellationToken cancellationToken = default) + => Task.CompletedTask; } } diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/src/BlobStorageResourceContainer.cs b/sdk/storage/Azure.Storage.DataMovement.Blobs/src/BlobStorageResourceContainer.cs index d5cda8e5ea459..a8c13b4182340 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/src/BlobStorageResourceContainer.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/src/BlobStorageResourceContainer.cs @@ -157,6 +157,7 @@ private StorageResourceItem GetBlobAsStorageResource( /// /// List of the child resources in the storage container. protected override async IAsyncEnumerable GetStorageResourcesAsync( + StorageResourceContainer destinationContainer = default, [EnumeratorCancellation] CancellationToken cancellationToken = default) { // Suffix the backwards slash when searching if there's a prefix specified, diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/src/BlockBlobStorageResource.cs b/sdk/storage/Azure.Storage.DataMovement.Blobs/src/BlockBlobStorageResource.cs index be7a5be1e21f8..6630d1d5cdbbd 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/src/BlockBlobStorageResource.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/src/BlockBlobStorageResource.cs @@ -378,5 +378,18 @@ protected override StorageResourceCheckpointData GetDestinationCheckpointData() metadata: _options?.Metadata, tags: default); } + + // no-op for get permissions + protected override Task GetPermissionsAsync( + StorageResourceItemProperties properties = default, + CancellationToken cancellationToken = default) + => Task.FromResult((string)default); + + // no-op for set permissions + protected override Task SetPermissionsAsync( + StorageResourceItem sourceResource, + StorageResourceItemProperties sourceProperties, + CancellationToken cancellationToken = default) + => Task.CompletedTask; } } diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/src/PageBlobStorageResource.cs b/sdk/storage/Azure.Storage.DataMovement.Blobs/src/PageBlobStorageResource.cs index aeff4d4b0d215..a24a8c9a79890 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/src/PageBlobStorageResource.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/src/PageBlobStorageResource.cs @@ -336,5 +336,18 @@ protected override StorageResourceCheckpointData GetDestinationCheckpointData() metadata: _options?.Metadata, tags: default); } + + // no-op for get permissions + protected override Task GetPermissionsAsync( + StorageResourceItemProperties properties = default, + CancellationToken cancellationToken = default) + => Task.FromResult((string)default); + + // no-op for set permissions + protected override Task SetPermissionsAsync( + StorageResourceItem sourceResource, + StorageResourceItemProperties sourceProperties, + CancellationToken cancellationToken = default) + => Task.CompletedTask; } } diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/AppendBlobStartTransferCopyTests.cs b/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/AppendBlobStartTransferCopyTests.cs index aba7137906603..773a8b36065a4 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/AppendBlobStartTransferCopyTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/AppendBlobStartTransferCopyTests.cs @@ -238,7 +238,6 @@ protected override async Task VerifyPropertiesCopyAsync( BlobProperties destinationProperties = await destinationClient.GetPropertiesAsync(); Assert.That(_defaultMetadata, Is.EqualTo(destinationProperties.Metadata)); - Assert.AreEqual(_defaultAccessTier.ToString(), destinationProperties.AccessTier); Assert.AreEqual(_defaultContentDisposition, destinationProperties.ContentDisposition); Assert.AreEqual(_defaultContentLanguage, destinationProperties.ContentLanguage); Assert.AreEqual(_defaultCacheControl, destinationProperties.CacheControl); diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/AppendBlobToPageBlobTests.cs b/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/AppendBlobToPageBlobTests.cs index 68f2cedfbe178..0e23b296dde20 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/AppendBlobToPageBlobTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/AppendBlobToPageBlobTests.cs @@ -257,7 +257,6 @@ protected override async Task VerifyPropertiesCopyAsync( BlobProperties destinationProperties = await destinationClient.GetPropertiesAsync(); Assert.That(_defaultMetadata, Is.EqualTo(destinationProperties.Metadata)); - Assert.AreEqual(_defaultAccessTier.ToString(), destinationProperties.AccessTier); Assert.AreEqual(_defaultContentDisposition, destinationProperties.ContentDisposition); Assert.AreEqual(_defaultContentLanguage, destinationProperties.ContentLanguage); Assert.AreEqual(_defaultCacheControl, destinationProperties.CacheControl); diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/BlobContainerServiceToServiceJobTests.cs b/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/BlobContainerServiceToServiceJobTests.cs index d4101e1e6364f..6bd52182e7342 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/BlobContainerServiceToServiceJobTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/BlobContainerServiceToServiceJobTests.cs @@ -108,7 +108,9 @@ await checkpointer.AddNewJobAsync( GetMockBlockBlobResource("blob2").Object, GetMockBlockBlobResource("blob3").Object, }; - sourceMock.Setup(r => r.GetStorageResourcesAsync(It.IsAny())) + sourceMock.Setup(r => r.GetStorageResourcesAsync( + It.IsAny(), + It.IsAny())) .Returns(GetStorageResourceItemsAsyncEnumerable(blobItems)); ServiceToServiceTransferJob transferJob = new ServiceToServiceTransferJob( new DataTransfer( @@ -165,7 +167,9 @@ await checkpointer.AddNewJobAsync( GetMockAppendBlobResource("appendblob2").Object, GetMockBlockBlobResource("blockblob3").Object, }; - sourceMock.Setup(r => r.GetStorageResourcesAsync(It.IsAny())) + sourceMock.Setup(r => r.GetStorageResourcesAsync( + It.IsAny(), + It.IsAny())) .Returns(GetStorageResourceItemsAsyncEnumerable(blobItems)); ServiceToServiceTransferJob transferJob = new ServiceToServiceTransferJob( new DataTransfer( diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/BlockBlobToAppendBlobTests.cs b/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/BlockBlobToAppendBlobTests.cs index c7c7f68e2a13d..3d6a6c434c0aa 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/BlockBlobToAppendBlobTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/BlockBlobToAppendBlobTests.cs @@ -245,7 +245,6 @@ protected override async Task VerifyPropertiesCopyAsync( BlobProperties destinationProperties = await destinationClient.GetPropertiesAsync(); Assert.That(_defaultMetadata, Is.EqualTo(destinationProperties.Metadata)); - Assert.AreEqual(_defaultAccessTier.ToString(), destinationProperties.AccessTier); Assert.AreEqual(_defaultContentDisposition, destinationProperties.ContentDisposition); Assert.AreEqual(_defaultContentLanguage, destinationProperties.ContentLanguage); Assert.AreEqual(_defaultCacheControl, destinationProperties.CacheControl); diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/PageBlobStartTransferCopyTests.cs b/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/PageBlobStartTransferCopyTests.cs index b0f226ceeb00a..9406f88e1ebc4 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/PageBlobStartTransferCopyTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/PageBlobStartTransferCopyTests.cs @@ -240,7 +240,6 @@ protected override async Task VerifyPropertiesCopyAsync( BlobProperties destinationProperties = await destinationClient.GetPropertiesAsync(); Assert.That(_defaultMetadata, Is.EqualTo(destinationProperties.Metadata)); - Assert.AreEqual(_defaultAccessTier.ToString(), destinationProperties.AccessTier); Assert.AreEqual(_defaultContentDisposition, destinationProperties.ContentDisposition); Assert.AreEqual(_defaultContentLanguage, destinationProperties.ContentLanguage); Assert.AreEqual(_defaultCacheControl, destinationProperties.CacheControl); diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/PageBlobToAppendBlobTests.cs b/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/PageBlobToAppendBlobTests.cs index d11921b347c1d..a338c0eba7cfd 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/PageBlobToAppendBlobTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/PageBlobToAppendBlobTests.cs @@ -254,7 +254,6 @@ protected override async Task VerifyPropertiesCopyAsync( BlobProperties destinationProperties = await destinationClient.GetPropertiesAsync(); Assert.That(_defaultMetadata, Is.EqualTo(destinationProperties.Metadata)); - Assert.AreEqual(_defaultAccessTier.ToString(), destinationProperties.AccessTier); Assert.AreEqual(_defaultContentDisposition, destinationProperties.ContentDisposition); Assert.AreEqual(_defaultContentLanguage, destinationProperties.ContentLanguage); Assert.AreEqual(_defaultCacheControl, destinationProperties.CacheControl); diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/AppendBlobDirectoryToShareDirectoryTests.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/AppendBlobDirectoryToShareDirectoryTests.cs index ced0e4c30251e..48309e94ce832 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/AppendBlobDirectoryToShareDirectoryTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/AppendBlobDirectoryToShareDirectoryTests.cs @@ -128,7 +128,10 @@ private async Task UploadAppendBlocksAsync( protected override async Task> GetDestinationDisposingContainerAsync(ShareServiceClient service = null, string containerName = null, CancellationToken cancellationToken = default) => await DestinationClientBuilder.GetTestShareAsync(service, containerName); - protected override StorageResourceContainer GetDestinationStorageResourceContainer(ShareClient containerClient, string directoryPath) + protected override StorageResourceContainer GetDestinationStorageResourceContainer( + ShareClient containerClient, + string directoryPath, + TransferPropertiesTestType propertiesTestType = default) { // Authorize with SAS when performing operations if (containerClient.CanGenerateSasUri) @@ -171,7 +174,13 @@ protected override async Task VerifyEmptyDestinationContainerAsync(ShareClient d Assert.IsEmpty(items); } - protected override async Task VerifyResultsAsync(BlobContainerClient sourceContainer, string sourcePrefix, ShareClient destinationContainer, string destinationPrefix, CancellationToken cancellationToken = default) + protected override async Task VerifyResultsAsync( + BlobContainerClient sourceContainer, + string sourcePrefix, + ShareClient destinationContainer, + string destinationPrefix, + TransferPropertiesTestType propertiesTestType = default, + CancellationToken cancellationToken = default) { CancellationHelper.ThrowIfCancellationRequested(cancellationToken); diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/BlockBlobDirectoryToShareDirectoryTests.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/BlockBlobDirectoryToShareDirectoryTests.cs index 28b6fde71166a..d3a3c8a3aee1f 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/BlockBlobDirectoryToShareDirectoryTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/BlockBlobDirectoryToShareDirectoryTests.cs @@ -108,7 +108,10 @@ await blobClient.UploadAsync( protected override async Task> GetDestinationDisposingContainerAsync(ShareServiceClient service = null, string containerName = null, CancellationToken cancellationToken = default) => await DestinationClientBuilder.GetTestShareAsync(service, containerName); - protected override StorageResourceContainer GetDestinationStorageResourceContainer(ShareClient containerClient, string directoryPath) + protected override StorageResourceContainer GetDestinationStorageResourceContainer( + ShareClient containerClient, + string directoryPath, + TransferPropertiesTestType propertiesTestType = default) { // Authorize with SAS when performing operations if (containerClient.CanGenerateSasUri) @@ -151,7 +154,13 @@ protected override async Task VerifyEmptyDestinationContainerAsync(ShareClient d Assert.IsEmpty(items); } - protected override async Task VerifyResultsAsync(BlobContainerClient sourceContainer, string sourcePrefix, ShareClient destinationContainer, string destinationPrefix, CancellationToken cancellationToken = default) + protected override async Task VerifyResultsAsync( + BlobContainerClient sourceContainer, + string sourcePrefix, + ShareClient destinationContainer, + string destinationPrefix, + TransferPropertiesTestType propertiesTestType = default, + CancellationToken cancellationToken = default) { CancellationHelper.ThrowIfCancellationRequested(cancellationToken); diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/PageBlobDirectoryToShareDirectoryTests.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/PageBlobDirectoryToShareDirectoryTests.cs index 404284d128b67..2c36c15dbc01d 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/PageBlobDirectoryToShareDirectoryTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/PageBlobDirectoryToShareDirectoryTests.cs @@ -128,7 +128,10 @@ private async Task UploadPagesAsync( protected override async Task> GetDestinationDisposingContainerAsync(ShareServiceClient service = null, string containerName = null, CancellationToken cancellationToken = default) => await DestinationClientBuilder.GetTestShareAsync(service, containerName); - protected override StorageResourceContainer GetDestinationStorageResourceContainer(ShareClient containerClient, string directoryPath) + protected override StorageResourceContainer GetDestinationStorageResourceContainer( + ShareClient containerClient, + string directoryPath, + TransferPropertiesTestType propertiesTestType = default) { // Authorize with SAS when performing operations if (containerClient.CanGenerateSasUri) @@ -171,7 +174,13 @@ protected override async Task VerifyEmptyDestinationContainerAsync(ShareClient d Assert.IsEmpty(items); } - protected override async Task VerifyResultsAsync(BlobContainerClient sourceContainer, string sourcePrefix, ShareClient destinationContainer, string destinationPrefix, CancellationToken cancellationToken = default) + protected override async Task VerifyResultsAsync( + BlobContainerClient sourceContainer, + string sourcePrefix, + ShareClient destinationContainer, + string destinationPrefix, + TransferPropertiesTestType propertiesTestType = default, + CancellationToken cancellationToken = default) { CancellationHelper.ThrowIfCancellationRequested(cancellationToken); diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/ShareDirectoryToAppendBlobDirectoryTests.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/ShareDirectoryToAppendBlobDirectoryTests.cs index 3f633ac1b9f41..72be0ae1d09a8 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/ShareDirectoryToAppendBlobDirectoryTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/ShareDirectoryToAppendBlobDirectoryTests.cs @@ -136,7 +136,10 @@ protected override async Task CreateObjectInSourceAsync( protected override async Task> GetDestinationDisposingContainerAsync(BlobServiceClient service = null, string containerName = null, CancellationToken cancellationToken = default) => await DestinationClientBuilder.GetTestContainerAsync(service, containerName); - protected override StorageResourceContainer GetDestinationStorageResourceContainer(BlobContainerClient sourceContainerClient, string directoryPath) + protected override StorageResourceContainer GetDestinationStorageResourceContainer( + BlobContainerClient sourceContainerClient, + string directoryPath, + TransferPropertiesTestType propertiesTestType = default) => new BlobStorageResourceContainer(sourceContainerClient, new BlobStorageResourceContainerOptions() { BlobDirectoryPrefix = directoryPath, BlobType = new(BlobType.Append) }); protected override BlobContainerClient GetOAuthDestinationContainerClient(string containerName) @@ -184,6 +187,7 @@ protected override async Task VerifyResultsAsync( string sourcePrefix, BlobContainerClient destinationContainer, string destinationPrefix, + TransferPropertiesTestType propertiesTestType = default, CancellationToken cancellationToken = default) { CancellationHelper.ThrowIfCancellationRequested(cancellationToken); diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/ShareDirectoryToBlockBlobDirectoryTests.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/ShareDirectoryToBlockBlobDirectoryTests.cs index b0791195dec69..062448ba27a3b 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/ShareDirectoryToBlockBlobDirectoryTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/ShareDirectoryToBlockBlobDirectoryTests.cs @@ -117,7 +117,10 @@ protected override async Task CreateObjectInSourceAsync( protected override async Task> GetDestinationDisposingContainerAsync(BlobServiceClient service = null, string containerName = null, CancellationToken cancellationToken = default) => await DestinationClientBuilder.GetTestContainerAsync(service, containerName); - protected override StorageResourceContainer GetDestinationStorageResourceContainer(BlobContainerClient sourceContainerClient, string directoryPath) + protected override StorageResourceContainer GetDestinationStorageResourceContainer( + BlobContainerClient sourceContainerClient, + string directoryPath, + TransferPropertiesTestType propertiesTestType = default) => new BlobStorageResourceContainer(sourceContainerClient, new BlobStorageResourceContainerOptions() { BlobDirectoryPrefix = directoryPath, BlobType = new(BlobType.Block) }); protected override BlobContainerClient GetOAuthDestinationContainerClient(string containerName) @@ -165,6 +168,7 @@ protected override async Task VerifyResultsAsync( string sourcePrefix, BlobContainerClient destinationContainer, string destinationPrefix, + TransferPropertiesTestType propertiesTestType = default, CancellationToken cancellationToken = default) { CancellationHelper.ThrowIfCancellationRequested(cancellationToken); diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/ShareDirectoryToPageBlobDirectoryTests.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/ShareDirectoryToPageBlobDirectoryTests.cs index 6c899678c5f4a..fdad2d1fb9ab6 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/ShareDirectoryToPageBlobDirectoryTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/ShareDirectoryToPageBlobDirectoryTests.cs @@ -137,7 +137,10 @@ protected override async Task CreateObjectInSourceAsync( protected override async Task> GetDestinationDisposingContainerAsync(BlobServiceClient service = null, string containerName = null, CancellationToken cancellationToken = default) => await DestinationClientBuilder.GetTestContainerAsync(service, containerName); - protected override StorageResourceContainer GetDestinationStorageResourceContainer(BlobContainerClient sourceContainerClient, string directoryPath) + protected override StorageResourceContainer GetDestinationStorageResourceContainer( + BlobContainerClient sourceContainerClient, + string directoryPath, + TransferPropertiesTestType propertiesTestType = default) => new BlobStorageResourceContainer(sourceContainerClient, new BlobStorageResourceContainerOptions() { BlobDirectoryPrefix = directoryPath, BlobType = new(BlobType.Page) }); protected override BlobContainerClient GetOAuthDestinationContainerClient(string containerName) @@ -185,6 +188,7 @@ protected override async Task VerifyResultsAsync( string sourcePrefix, BlobContainerClient destinationContainer, string destinationPrefix, + TransferPropertiesTestType propertiesTestType = default, CancellationToken cancellationToken = default) { CancellationHelper.ThrowIfCancellationRequested(cancellationToken); diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/api/Azure.Storage.DataMovement.Files.Shares.net6.0.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/api/Azure.Storage.DataMovement.Files.Shares.net6.0.cs index 2ce83b28387df..732863c35e7a7 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/api/Azure.Storage.DataMovement.Files.Shares.net6.0.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/api/Azure.Storage.DataMovement.Files.Shares.net6.0.cs @@ -41,8 +41,7 @@ public ShareFileStorageResourceOptions() { } public Azure.Storage.DataMovement.DataTransferProperty FileCreatedOn { get { throw null; } set { } } public Azure.Storage.DataMovement.DataTransferProperty FileLastWrittenOn { get { throw null; } set { } } public Azure.Storage.DataMovement.DataTransferProperty> FileMetadata { get { throw null; } set { } } - public string FilePermissionKey { get { throw null; } set { } } - public string FilePermissions { get { throw null; } set { } } + public Azure.Storage.DataMovement.DataTransferProperty FilePermissions { get { throw null; } set { } } public Azure.Storage.Files.Shares.Models.ShareFileRequestConditions SourceConditions { get { throw null; } set { } } } } diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/api/Azure.Storage.DataMovement.Files.Shares.netstandard2.0.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/api/Azure.Storage.DataMovement.Files.Shares.netstandard2.0.cs index 2ce83b28387df..732863c35e7a7 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/api/Azure.Storage.DataMovement.Files.Shares.netstandard2.0.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/api/Azure.Storage.DataMovement.Files.Shares.netstandard2.0.cs @@ -41,8 +41,7 @@ public ShareFileStorageResourceOptions() { } public Azure.Storage.DataMovement.DataTransferProperty FileCreatedOn { get { throw null; } set { } } public Azure.Storage.DataMovement.DataTransferProperty FileLastWrittenOn { get { throw null; } set { } } public Azure.Storage.DataMovement.DataTransferProperty> FileMetadata { get { throw null; } set { } } - public string FilePermissionKey { get { throw null; } set { } } - public string FilePermissions { get { throw null; } set { } } + public Azure.Storage.DataMovement.DataTransferProperty FilePermissions { get { throw null; } set { } } public Azure.Storage.Files.Shares.Models.ShareFileRequestConditions SourceConditions { get { throw null; } set { } } } } diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/assets.json b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/assets.json index a89e75c2ea270..75adfb17d6cb4 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/assets.json +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/storage/Azure.Storage.DataMovement.Files.Shares", - "Tag": "net/storage/Azure.Storage.DataMovement.Files.Shares_2ce88bf195" + "Tag": "net/storage/Azure.Storage.DataMovement.Files.Shares_e86fda7f54" } diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/DataMovementShareConstants.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/DataMovementShareConstants.cs index 11564734296ff..f3631621a1732 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/DataMovementShareConstants.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/DataMovementShareConstants.cs @@ -31,10 +31,9 @@ internal class DestinationCheckpointData internal const int FileAttributesOffsetIndex = PreserveFileAttributesIndex + PreserveEncodedSize; internal const int FileAttributesLengthIndex = FileAttributesOffsetIndex + OffsetLengthEncodedSize; - internal const int FilePermissionKeyOffsetIndex = FileAttributesLengthIndex + OffsetLengthEncodedSize; - internal const int FilePermissionKeyLengthIndex = FilePermissionKeyOffsetIndex + OffsetLengthEncodedSize; + internal const int PreserveFilePermissionIndex = FileAttributesLengthIndex + PreserveEncodedSize; - internal const int PreserveFileCreatedOnIndex = FilePermissionKeyLengthIndex + OffsetLengthEncodedSize; + internal const int PreserveFileCreatedOnIndex = PreserveFilePermissionIndex + OffsetLengthEncodedSize; internal const int FileCreatedOnIndex = PreserveFileCreatedOnIndex + PreserveEncodedSize; internal const int FileCreatedOnLengthIndex = FileCreatedOnIndex + OffsetLengthEncodedSize; diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/DataMovementSharesExtensions.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/DataMovementSharesExtensions.cs index 8e3fe13a00145..99b554e27a898 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/DataMovementSharesExtensions.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/DataMovementSharesExtensions.cs @@ -52,38 +52,72 @@ public static Metadata GetFileMetadata( : default : options?.FileMetadata?.Value; + public static string GetFilePermission( + this ShareFileStorageResourceOptions options, + Dictionary properties) + => (options?.FilePermissions?.Preserve ?? false) + ? properties?.TryGetValue(DataMovementConstants.ResourceProperties.FilePermissions, out object permission) == true + ? (string) permission + : default + : default; + + public static string GetSourcePermissionKey( + this Dictionary properties) + => properties?.TryGetValue(DataMovementConstants.ResourceProperties.SourceFilePermissionKey, out object permissionKey) == true + ? (string)permissionKey + : default; + + public static string GetDestinationPermissionKey( + this Dictionary properties) + => properties?.TryGetValue(DataMovementConstants.ResourceProperties.DestinationFilePermissionKey, out object permissionKey) == true + ? (string)permissionKey + : default; + + public static string GetPermission( + this Dictionary properties) + => properties?.TryGetValue(DataMovementConstants.ResourceProperties.FilePermissions, out object permission) == true + ? (string) permission + : default; + public static FileSmbProperties GetFileSmbProperties( this ShareFileStorageResourceOptions options, - StorageResourceItemProperties properties) - => new() + StorageResourceItemProperties properties, + string destinationPermissionKey) + { + string permissionKeyValue = destinationPermissionKey; + if (string.IsNullOrEmpty(permissionKeyValue)) + { + permissionKeyValue = (options?.FilePermissions?.Preserve ?? false) + ? properties?.RawProperties?.TryGetValue(DataMovementConstants.ResourceProperties.DestinationFilePermissionKey, out object permissionKeyObject) == true + ? (string) permissionKeyObject + : default + : default; + } + return new() { FileAttributes = (options?.FileAttributes?.Preserve ?? true) ? properties?.RawProperties?.TryGetValue(DataMovementConstants.ResourceProperties.FileAttributes, out object fileAttributes) == true - ? (NtfsFileAttributes?) fileAttributes + ? (NtfsFileAttributes?)fileAttributes : default : options?.FileAttributes?.Value, - FilePermissionKey = options?.FilePermissionKey, + FilePermissionKey = permissionKeyValue, FileCreatedOn = (options?.FileCreatedOn?.Preserve ?? true) ? properties?.RawProperties?.TryGetValue(DataMovementConstants.ResourceProperties.CreationTime, out object fileCreatedOn) == true - ? (DateTimeOffset?) fileCreatedOn + ? (DateTimeOffset?)fileCreatedOn : default : options?.FileCreatedOn?.Value, FileLastWrittenOn = (options?.FileLastWrittenOn?.Preserve ?? true) - ? properties?.LastModifiedTime + ? properties?.RawProperties?.TryGetValue(DataMovementConstants.ResourceProperties.LastWrittenOn, out object fileLastWrittenOn) == true + ? (DateTimeOffset?)fileLastWrittenOn + : default : options?.FileLastWrittenOn?.Value, FileChangedOn = (options?.FileChangedOn?.Preserve ?? true) ? properties?.RawProperties?.TryGetValue(DataMovementConstants.ResourceProperties.ChangedOnTime, out object fileChangedOn) == true - ? (DateTimeOffset?) fileChangedOn + ? (DateTimeOffset?)fileChangedOn : default : options?.FileChangedOn?.Value, }; - - internal static ShareFileUploadOptions ToShareFileUploadOptions( - this ShareFileStorageResourceOptions options) - => new() - { - Conditions = options?.DestinationConditions, - }; + } internal static ShareFileUploadRangeOptions ToShareFileUploadRangeOptions( this ShareFileStorageResourceOptions options) @@ -107,60 +141,129 @@ internal static ShareFileUploadRangeFromUriOptions ToShareFileUploadRangeFromUri SourceAuthentication = sourceAuthorization }; + private static void WriteKeyValue( + this Dictionary properties, + string key, + object value) + { + if (value != default && + properties.ContainsKey(key)) + { + properties[key] = value; + } + else + { + properties.Add(key, value); + } + } + internal static StorageResourceItemProperties ToStorageResourceItemProperties( this ShareFileProperties fileProperties) { - Dictionary properties = new(); + Dictionary rawProperties = new(); if (fileProperties.Metadata != default) { - properties.Add(DataMovementConstants.ResourceProperties.Metadata, fileProperties.Metadata); + rawProperties.WriteKeyValue(DataMovementConstants.ResourceProperties.Metadata, fileProperties.Metadata); } if (fileProperties.SmbProperties.FileCreatedOn != default) { - properties.Add(DataMovementConstants.ResourceProperties.CreationTime, fileProperties.SmbProperties.FileCreatedOn); + rawProperties.WriteKeyValue(DataMovementConstants.ResourceProperties.CreationTime, fileProperties.SmbProperties.FileCreatedOn); + } + if (fileProperties.SmbProperties.FileLastWrittenOn != default) + { + rawProperties.WriteKeyValue(DataMovementConstants.ResourceProperties.LastWrittenOn, fileProperties.SmbProperties.FileLastWrittenOn); } if (fileProperties.SmbProperties.FileChangedOn != default) { - properties.Add(DataMovementConstants.ResourceProperties.ChangedOnTime, fileProperties.SmbProperties.FileChangedOn); + rawProperties.WriteKeyValue(DataMovementConstants.ResourceProperties.ChangedOnTime, fileProperties.SmbProperties.FileChangedOn); } if (fileProperties.SmbProperties.FileAttributes != default) { - properties.Add(DataMovementConstants.ResourceProperties.FileAttributes, fileProperties.SmbProperties.FileAttributes); + rawProperties.WriteKeyValue(DataMovementConstants.ResourceProperties.FileAttributes, fileProperties.SmbProperties.FileAttributes); } if (fileProperties.SmbProperties.FilePermissionKey != default) { - properties.Add(DataMovementConstants.ResourceProperties.FilePermissionKey, fileProperties.SmbProperties.FilePermissionKey); + rawProperties.WriteKeyValue(DataMovementConstants.ResourceProperties.SourceFilePermissionKey, fileProperties.SmbProperties.FilePermissionKey); } if (fileProperties.ContentType != default) { - properties.Add(DataMovementConstants.ResourceProperties.ContentType, fileProperties.ContentType); + rawProperties.WriteKeyValue(DataMovementConstants.ResourceProperties.ContentType, fileProperties.ContentType); } if (fileProperties.ContentHash != default) { - properties.Add(DataMovementConstants.ResourceProperties.ContentHash, fileProperties.ContentHash); + rawProperties.WriteKeyValue(DataMovementConstants.ResourceProperties.ContentHash, fileProperties.ContentHash); } if (fileProperties.ContentEncoding != default) { - properties.Add(DataMovementConstants.ResourceProperties.ContentEncoding, fileProperties.ContentEncoding); + rawProperties.WriteKeyValue(DataMovementConstants.ResourceProperties.ContentEncoding, fileProperties.ContentEncoding); } if (fileProperties.ContentLanguage != default) { - properties.Add(DataMovementConstants.ResourceProperties.ContentLanguage, fileProperties.ContentLanguage); + rawProperties.WriteKeyValue(DataMovementConstants.ResourceProperties.ContentLanguage, fileProperties.ContentLanguage); } if (fileProperties.ContentDisposition != default) { - properties.Add(DataMovementConstants.ResourceProperties.ContentDisposition, fileProperties.ContentDisposition); + rawProperties.WriteKeyValue(DataMovementConstants.ResourceProperties.ContentDisposition, fileProperties.ContentDisposition); } if (fileProperties.CacheControl != default) { - properties.Add(DataMovementConstants.ResourceProperties.CacheControl, fileProperties.CacheControl); + rawProperties.WriteKeyValue(DataMovementConstants.ResourceProperties.CacheControl, fileProperties.CacheControl); } - return new StorageResourceItemProperties( resourceLength: fileProperties.ContentLength, eTag: fileProperties.ETag, - lastModifiedTime: fileProperties.SmbProperties.FileLastWrittenOn, - properties: properties); + lastModifiedTime: fileProperties.LastModified, + properties: rawProperties); + } + + internal static void AddToStorageResourceItemProperties( + this StorageResourceItemProperties existingProperties, + ShareFileProperties fileProperties) + { + if (fileProperties.Metadata != default) + { + existingProperties.RawProperties.WriteKeyValue(DataMovementConstants.ResourceProperties.Metadata, fileProperties.Metadata); + } + if (fileProperties.SmbProperties.FileCreatedOn != default) + { + existingProperties.RawProperties.WriteKeyValue(DataMovementConstants.ResourceProperties.CreationTime, fileProperties.SmbProperties.FileCreatedOn); + } + if (fileProperties.SmbProperties.FileChangedOn != default) + { + existingProperties.RawProperties.WriteKeyValue(DataMovementConstants.ResourceProperties.ChangedOnTime, fileProperties.SmbProperties.FileChangedOn); + } + if (fileProperties.SmbProperties.FileAttributes != default) + { + existingProperties.RawProperties.WriteKeyValue(DataMovementConstants.ResourceProperties.FileAttributes, fileProperties.SmbProperties.FileAttributes); + } + if (fileProperties.SmbProperties.FilePermissionKey != default) + { + existingProperties.RawProperties.WriteKeyValue(DataMovementConstants.ResourceProperties.SourceFilePermissionKey, fileProperties.SmbProperties.FilePermissionKey); + } + if (fileProperties.ContentType != default) + { + existingProperties.RawProperties.WriteKeyValue(DataMovementConstants.ResourceProperties.ContentType, fileProperties.ContentType); + } + if (fileProperties.ContentHash != default) + { + existingProperties.RawProperties.WriteKeyValue(DataMovementConstants.ResourceProperties.ContentHash, fileProperties.ContentHash); + } + if (fileProperties.ContentEncoding != default) + { + existingProperties.RawProperties.WriteKeyValue(DataMovementConstants.ResourceProperties.ContentEncoding, fileProperties.ContentEncoding); + } + if (fileProperties.ContentLanguage != default) + { + existingProperties.RawProperties.WriteKeyValue(DataMovementConstants.ResourceProperties.ContentLanguage, fileProperties.ContentLanguage); + } + if (fileProperties.ContentDisposition != default) + { + existingProperties.RawProperties.WriteKeyValue(DataMovementConstants.ResourceProperties.ContentDisposition, fileProperties.ContentDisposition); + } + if (fileProperties.CacheControl != default) + { + existingProperties.RawProperties.WriteKeyValue(DataMovementConstants.ResourceProperties.CacheControl, fileProperties.CacheControl); + } } internal static ShareFileDownloadOptions ToShareFileDownloadOptions( @@ -229,6 +332,26 @@ internal static StorageResourceReadStreamResult ToStorageResourceReadStreamResul lastModifiedTime: info.Details.LastModified, properties: properties)); } + + internal static StorageResourceItemProperties ToResourceProperties( + this ShareFileItem shareItem, + string destinationPermissionKey) + { + Dictionary properties = new(); + if (shareItem?.PermissionKey != default) + { + properties.Add(DataMovementConstants.ResourceProperties.SourceFilePermissionKey, shareItem.PermissionKey); + } + if (destinationPermissionKey != default) + { + properties.Add(DataMovementConstants.ResourceProperties.DestinationFilePermissionKey, destinationPermissionKey); + } + return new StorageResourceItemProperties( + resourceLength: shareItem?.FileSize, + eTag: shareItem?.Properties?.ETag, + lastModifiedTime: shareItem?.Properties?.LastModified, + properties: properties); + } } #pragma warning disable SA1402 // File may only contain a single type diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/PathScanner.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/PathScanner.cs index f7d7b33bf2e30..f874b488e2ac0 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/PathScanner.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/PathScanner.cs @@ -6,10 +6,10 @@ using System.Runtime.CompilerServices; using System.Threading; using System.Threading.Tasks; -using Azure.Core; using Azure.Storage.Common; using Azure.Storage.Files.Shares; using Azure.Storage.Files.Shares.Models; +using Azure.Storage.Files.Shares.Specialized; namespace Azure.Storage.DataMovement.Files.Shares { @@ -17,44 +17,63 @@ internal class PathScanner { public static Lazy Singleton { get; } = new Lazy(() => new PathScanner()); - public virtual async IAsyncEnumerable ScanFilesAsync( - ShareDirectoryClient directory, + public virtual async IAsyncEnumerable ScanAsync( + ShareDirectoryClient sourceDirectory, + ShareClient destinationShare, + ShareFileStorageResourceOptions sourceOptions, + ShareFileTraits traits, [EnumeratorCancellation] CancellationToken cancellationToken) { - await foreach ((ShareDirectoryClient _, ShareFileClient file) in - ScanAsync(directory, cancellationToken).ConfigureAwait(false)) - { - if (file != default) - { - yield return file; - } - } - } - - public virtual async IAsyncEnumerable<(ShareDirectoryClient Dir, ShareFileClient File)> ScanAsync( - ShareDirectoryClient directory, - [EnumeratorCancellation] CancellationToken cancellationToken) - { - Argument.AssertNotNull(directory, nameof(directory)); + Argument.AssertNotNull(sourceDirectory, nameof(sourceDirectory)); Queue toScan = new(); - toScan.Enqueue(directory); + toScan.Enqueue(sourceDirectory); + + // Keep track of created Permission Keys to avoid creating duplicates. + ShareClient sourceShare = sourceDirectory.GetParentShareClient(); + // Permissions keys + Dictionary permissionKeys = new(); while (toScan.Count > 0) { ShareDirectoryClient current = toScan.Dequeue(); await foreach (ShareFileItem item in current.GetFilesAndDirectoriesAsync( + options: new() { Traits = traits }, cancellationToken: cancellationToken).ConfigureAwait(false)) { + string destinationPermissionKey = string.Empty; + if (destinationShare != default && item.PermissionKey != default) + { + // Check if the permission key is already created. + // If not, create it on the Share. + if (!permissionKeys.TryGetValue(item.PermissionKey, out string existingDestinationKey)) + { + // Get the SDDL permission from the source Share (using the permission key). Then create it on the destination Share. + string sourcePermission = await sourceShare.GetPermissionAsync(item.PermissionKey, cancellationToken: cancellationToken).ConfigureAwait(false); + PermissionInfo permissionInfo = await destinationShare.CreatePermissionAsync(sourcePermission, cancellationToken: cancellationToken).ConfigureAwait(false); + destinationPermissionKey = permissionInfo.FilePermissionKey; + permissionKeys.Add(item.PermissionKey, destinationPermissionKey); + } + else + { + destinationPermissionKey = existingDestinationKey; + } + } if (item.IsDirectory) { ShareDirectoryClient subdir = current.GetSubdirectoryClient(item.Name); toScan.Enqueue(subdir); - yield return (Dir: subdir, File: null); + yield return new ShareDirectoryStorageResourceContainer( + subdir, + sourceOptions); } else { - yield return (Dir: null, File: current.GetFileClient(item.Name)); + ShareFileClient fileClient = current.GetFileClient(item.Name); + yield return new ShareFileStorageResource( + fileClient, + item.ToResourceProperties(destinationPermissionKey), + sourceOptions); } } } diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareDirectoryStorageResourceContainer.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareDirectoryStorageResourceContainer.cs index a821f6c850c0d..a6ebdcbd5b720 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareDirectoryStorageResourceContainer.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareDirectoryStorageResourceContainer.cs @@ -8,6 +8,8 @@ using System.Threading; using System.Threading.Tasks; using Azure.Storage.Files.Shares; +using Azure.Storage.Files.Shares.Models; +using Azure.Storage.Files.Shares.Specialized; namespace Azure.Storage.DataMovement.Files.Shares { @@ -41,19 +43,28 @@ protected override StorageResourceItem GetStorageResourceReference(string path, } protected override async IAsyncEnumerable GetStorageResourcesAsync( + StorageResourceContainer destinationContainer = default, [EnumeratorCancellation] CancellationToken cancellationToken = default) { - await foreach ((ShareDirectoryClient dir, ShareFileClient file) in PathScanner.ScanAsync( - ShareDirectoryClient, cancellationToken).ConfigureAwait(false)) + // Set the ShareFileTraits to send when listing. + ShareFileTraits traits = ShareFileTraits.Attributes; + if (ResourceOptions?.FilePermissions?.Preserve ?? false) { - if (file != default) - { - yield return new ShareFileStorageResource(file, ResourceOptions); - } - else - { - yield return new ShareDirectoryStorageResourceContainer(dir, ResourceOptions); - } + traits |= ShareFileTraits.PermissionKey; + } + ShareClient parentDestinationShare = default; + if (destinationContainer != default) + { + parentDestinationShare = (destinationContainer as ShareDirectoryStorageResourceContainer)?.ShareDirectoryClient.GetParentShareClient(); + } + await foreach (StorageResource resource in PathScanner.ScanAsync( + sourceDirectory: ShareDirectoryClient, + destinationShare: parentDestinationShare, + sourceOptions: ResourceOptions, + traits: traits, + cancellationToken: cancellationToken).ConfigureAwait(false)) + { + yield return resource; } } @@ -71,7 +82,7 @@ protected override StorageResourceCheckpointData GetDestinationCheckpointData() contentDisposition: ResourceOptions?.ContentDisposition, cacheControl: ResourceOptions?.CacheControl, fileAttributes: ResourceOptions?.FileAttributes, - filePermissionKey: ResourceOptions?.FilePermissionKey, + preserveFilePermission: ResourceOptions?.FilePermissions?.Preserve, fileCreatedOn: ResourceOptions?.FileCreatedOn, fileLastWrittenOn: ResourceOptions?.FileLastWrittenOn, fileChangedOn: ResourceOptions?.FileChangedOn, diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareFileDestinationCheckpointData.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareFileDestinationCheckpointData.cs index 21c201b6e96d2..9fbdfb6d9ae44 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareFileDestinationCheckpointData.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareFileDestinationCheckpointData.cs @@ -50,11 +50,7 @@ internal class ShareFileDestinationCheckpointData : StorageResourceCheckpointDat public DataTransferProperty FileAttributes; public bool PreserveFileAttributes; - /// - /// The key of the file permission. - /// - public string FilePermissionKey; - private byte[] _filePermissionKeyBytes; + public bool PreserveFilePermission; /// /// The creation time of the file. This is stored as a string with a @@ -103,7 +99,7 @@ public ShareFileDestinationCheckpointData( DataTransferProperty contentDisposition, DataTransferProperty cacheControl, DataTransferProperty fileAttributes, - string filePermissionKey, + bool? preserveFilePermission, DataTransferProperty fileCreatedOn, DataTransferProperty fileLastWrittenOn, DataTransferProperty fileChangedOn, @@ -134,8 +130,7 @@ public ShareFileDestinationCheckpointData( FileAttributes = fileAttributes; PreserveFileAttributes = fileAttributes?.Preserve ?? true; - FilePermissionKey = filePermissionKey; - _filePermissionKeyBytes = !string.IsNullOrEmpty(FilePermissionKey) ? Encoding.UTF8.GetBytes(filePermissionKey) : Array.Empty(); + PreserveFilePermission = preserveFilePermission ?? false; FileCreatedOn = fileCreatedOn; PreserveFileCreatedOn = fileCreatedOn?.Preserve ?? true; @@ -170,7 +165,7 @@ protected override void Serialize(Stream stream) // SMB properties writer.WritePreservablePropertyOffset(PreserveFileAttributes, DataMovementConstants.IntSizeInBytes, ref currentVariableLengthIndex); - writer.WriteVariableLengthFieldInfo(_filePermissionKeyBytes.Length, ref currentVariableLengthIndex); + writer.Write(PreserveFilePermission); writer.WritePreservablePropertyOffset(PreserveFileCreatedOn, _fileCreatedOnBytes.Length, ref currentVariableLengthIndex); writer.WritePreservablePropertyOffset(PreserveFileLastWrittenOn, _fileLastWrittenOnBytes.Length, ref currentVariableLengthIndex); writer.WritePreservablePropertyOffset(PreserveFileChangedOn, _fileChangedOnBytes.Length, ref currentVariableLengthIndex); @@ -189,9 +184,15 @@ protected override void Serialize(Stream stream) // Variable length info if (!PreserveFileAttributes) { - writer.Write((int)FileAttributes.Value); + if (FileAttributes.Value == default) + { + writer.Write((int)0); + } + else + { + writer.Write((int)FileAttributes.Value); + } } - writer.Write(_filePermissionKeyBytes); if (!PreserveFileCreatedOn) { writer.Write(_fileCreatedOnBytes); @@ -249,8 +250,7 @@ internal static ShareFileDestinationCheckpointData Deserialize(Stream stream) // SMB properties (bool preserveFileAttributes, int fileAttributesOffset, int fileAttributesLength) = reader.ReadVariableLengthFieldInfo(); - int filePermissionKeyOffset = reader.ReadInt32(); - int filePermissionKeyLength = reader.ReadInt32(); + bool preserveFilePermission = reader.ReadBoolean(); (bool preserveFileCreatedOn, int fileCreatedOnOffset, int fileCreatedOnLength) = reader.ReadVariableLengthFieldInfo(); (bool preserveFileLastWrittenOn, int fileLastWrittenOnOffset, int fileLastWrittenOnLength) = reader.ReadVariableLengthFieldInfo(); (bool preserveFileChangedOn, int fileChangedOnOffset, int fileChangedOnLength) = reader.ReadVariableLengthFieldInfo(); @@ -274,14 +274,6 @@ internal static ShareFileDestinationCheckpointData Deserialize(Stream stream) ntfsFileAttributes = (NtfsFileAttributes) reader.ReadInt32(); } - // File Permission Key - string filePermissionKey = null; - if (filePermissionKeyOffset > 0) - { - reader.BaseStream.Position = filePermissionKeyOffset; - filePermissionKey = Encoding.UTF8.GetString(reader.ReadBytes(filePermissionKeyLength)); - } - // File Created On DateTimeOffset? fileCreatedOn = default; if (fileCreatedOnOffset > 0) @@ -370,7 +362,7 @@ internal static ShareFileDestinationCheckpointData Deserialize(Stream stream) contentDisposition: preserveContentDisposition ? new(preserveContentDisposition) : new(contentDisposition), cacheControl: preserveCacheControl ? new(preserveCacheControl) : new(cacheControl), fileAttributes: preserveFileAttributes ? new(preserveFileAttributes) : new(ntfsFileAttributes), - filePermissionKey: filePermissionKey, + preserveFilePermission: preserveFilePermission, fileCreatedOn: preserveFileCreatedOn ? new(preserveFileCreatedOn) : new(fileCreatedOn), fileLastWrittenOn: preserveFileLastWrittenOn ? new(preserveFileLastWrittenOn) : new(fileLastWrittenOn), fileChangedOn: preserveFileChangedOn ? new(preserveFileChangedOn) : new(fileChangedOn), @@ -386,7 +378,6 @@ private int CalculateLength() { length += DataMovementConstants.IntSizeInBytes; } - length += _filePermissionKeyBytes.Length; if (PreserveFileCreatedOn) { length += _fileCreatedOnBytes.Length; diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareFileStorageResource.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareFileStorageResource.cs index 70d26e87176d5..762c4a3d34c54 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareFileStorageResource.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareFileStorageResource.cs @@ -10,6 +10,7 @@ using Azure.Storage.DataMovement.Blobs; using Azure.Storage.Files.Shares; using Azure.Storage.Files.Shares.Models; +using Azure.Storage.Files.Shares.Specialized; namespace Azure.Storage.DataMovement.Files.Shares { @@ -31,6 +32,8 @@ internal class ShareFileStorageResource : StorageResourceItemInternal protected override long? Length => ResourceProperties?.ResourceLength; + internal string _destinationPermissionKey; + public ShareFileStorageResource( ShareFileClient fileClient, ShareFileStorageResourceOptions options = default) @@ -73,13 +76,14 @@ internal async Task CreateAsync( } ShareFileHttpHeaders httpHeaders = _options?.GetShareFileHttpHeaders(properties?.RawProperties); IDictionary metadata = _options?.GetFileMetadata(properties?.RawProperties); - FileSmbProperties smbProperties = _options?.GetFileSmbProperties(properties); + string filePermission = _options?.GetFilePermission(properties?.RawProperties); + FileSmbProperties smbProperties = _options?.GetFileSmbProperties(properties, _destinationPermissionKey); await ShareFileClient.CreateAsync( maxSize: maxSize, httpHeaders: httpHeaders, metadata: metadata, smbProperties: smbProperties, - filePermission: _options?.FilePermissions, + filePermission: filePermission, conditions: _options?.DestinationConditions, cancellationToken: cancellationToken).ConfigureAwait(false); } @@ -199,13 +203,64 @@ protected override async Task GetPropertiesAsync( Response response = await ShareFileClient.GetPropertiesAsync( conditions: _options?.SourceConditions, cancellationToken: cancellationToken).ConfigureAwait(false); - if (ResourceProperties == default) + if (ResourceProperties != default) + { + ResourceProperties.AddToStorageResourceItemProperties(response.Value); + } + else { ResourceProperties = response.Value.ToStorageResourceItemProperties(); } return ResourceProperties; } + protected override async Task GetPermissionsAsync( + StorageResourceItemProperties properties = default, + CancellationToken cancellationToken = default) + { + string permissionKey = properties?.RawProperties?.GetSourcePermissionKey(); + if (!string.IsNullOrEmpty(permissionKey)) + { + ShareClient parentShare = ShareFileClient.GetParentShareClient(); + return await parentShare.GetPermissionAsync(permissionKey, cancellationToken).ConfigureAwait(false); + } + return default; + } + + protected override async Task SetPermissionsAsync( + StorageResourceItem sourceResource, + StorageResourceItemProperties sourceProperties, + CancellationToken cancellationToken = default) + { + if (sourceResource is ShareFileStorageResource) + { + if (_options?.FilePermissions?.Preserve ?? false) + { + ShareFileStorageResource sourceShareFile = (ShareFileStorageResource)sourceResource; + string permissionsValue = sourceProperties?.RawProperties?.GetPermission(); + string destinationPermissionKey = sourceProperties?.RawProperties?.GetDestinationPermissionKey(); + // Get / Set the permission key if preserve is set to true, + // there are no short form file permissions (x-ms-file-permission) in the source properties + // and already set destination permission key (x-ms-file-permission-key). + if (destinationPermissionKey == default && permissionsValue == default) + { + string sourcePermissions = await sourceShareFile.GetPermissionsAsync(sourceProperties, cancellationToken).ConfigureAwait(false); + + if (!string.IsNullOrEmpty(sourcePermissions)) + { + ShareClient parentShare = ShareFileClient.GetParentShareClient(); + PermissionInfo permissionsInfo = await parentShare.CreatePermissionAsync(sourcePermissions, cancellationToken).ConfigureAwait(false); + _destinationPermissionKey = permissionsInfo.FilePermissionKey; + } + } + else + { + _destinationPermissionKey = destinationPermissionKey; + } + } + } + } + protected override async Task ReadStreamAsync( long position = 0, long? length = null, @@ -232,7 +287,7 @@ protected override StorageResourceCheckpointData GetDestinationCheckpointData() contentDisposition: _options?.ContentDisposition, cacheControl: _options?.CacheControl, fileAttributes: _options?.FileAttributes, - filePermissionKey: _options?.FilePermissionKey, + preserveFilePermission: _options?.FilePermissions?.Preserve, fileCreatedOn: _options?.FileCreatedOn, fileLastWrittenOn: _options?.FileLastWrittenOn, fileChangedOn: _options?.FileChangedOn, diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareFileStorageResourceOptions.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareFileStorageResourceOptions.cs index 940b2d808d098..fa3f6d5508bcd 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareFileStorageResourceOptions.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareFileStorageResourceOptions.cs @@ -12,13 +12,6 @@ namespace Azure.Storage.DataMovement.Files.Shares /// public class ShareFileStorageResourceOptions { - /// - /// Optional. The file permission to set on the destination directory and/or file. - /// - /// Applies to copy and upload transfers. - /// - public string FilePermissions { get; set; } - /// /// Optional. See . /// Access conditions on the copying of data from this source storage resource share file. @@ -101,8 +94,10 @@ public class ShareFileStorageResourceOptions /// /// The key of the file permission. + /// + /// By default the permission key will not be preserved from the source Share to the destination Share. /// - public string FilePermissionKey { get; set; } + public DataTransferProperty FilePermissions { get; set; } /// /// The creation time of the file. @@ -145,5 +140,30 @@ public class ShareFileStorageResourceOptions /// #pragma warning disable CA2227 // Collection properties should be readonly public DataTransferProperty FileMetadata { get; set; } + + /// + /// Constructor for ShareFileStorageResourceOptions. + /// + public ShareFileStorageResourceOptions() + { + } + + internal ShareFileStorageResourceOptions(ShareFileStorageResourceOptions options) + { + SourceConditions = options?.SourceConditions; + DestinationConditions = options?.DestinationConditions; + CacheControl = options?.CacheControl; + ContentDisposition = options?.ContentDisposition; + ContentEncoding = options?.ContentEncoding; + ContentLanguage = options?.ContentLanguage; + ContentType = options?.ContentType; + FileAttributes = options?.FileAttributes; + FilePermissions = options?.FilePermissions; + FileCreatedOn = options?.FileCreatedOn; + FileLastWrittenOn = options?.FileLastWrittenOn; + FileChangedOn = options?.FileChangedOn; + DirectoryMetadata = options?.DirectoryMetadata; + FileMetadata = options?.FileMetadata; + } } } diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareFilesStorageResourceProvider.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareFilesStorageResourceProvider.cs index 9fa130cc9b5c0..b750781b7419d 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareFilesStorageResourceProvider.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareFilesStorageResourceProvider.cs @@ -2,6 +2,7 @@ // Licensed under the MIT License. using System; +using System.Collections.Generic; using System.IO; using System.Threading; using System.Threading.Tasks; @@ -244,7 +245,7 @@ protected override Task FromDestinationAsync(DataTransferProper ShareFileStorageResourceOptions options = new() { FileAttributes = checkpointData.FileAttributes, - FilePermissionKey = checkpointData.FilePermissionKey, + FilePermissions = new(checkpointData.PreserveFilePermission), CacheControl = checkpointData.CacheControl, ContentDisposition = checkpointData.ContentDisposition, ContentEncoding = checkpointData.ContentEncoding, @@ -256,7 +257,6 @@ protected override Task FromDestinationAsync(DataTransferProper DirectoryMetadata = checkpointData.DirectoryMetadata, FileMetadata = checkpointData.FileMetadata, }; - return Task.FromResult(properties.IsContainer ? FromDirectory(properties.DestinationUri.AbsoluteUri, options) : FromFile(properties.DestinationUri.AbsoluteUri, options)); @@ -319,7 +319,9 @@ public StorageResource FromDirectory(string directoryUri, ShareFileStorageResour /// /// The configured storage resource. /// - public StorageResource FromFile(string fileUri, ShareFileStorageResourceOptions options = default) + public StorageResource FromFile( + string fileUri, + ShareFileStorageResourceOptions options = default) { ShareFileClient client = _credentialType switch { diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ClientMockingExtensions.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ClientMockingExtensions.cs index 1bc1eba17b19e..b8fdcbe1e0097 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ClientMockingExtensions.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ClientMockingExtensions.cs @@ -10,6 +10,9 @@ using Azure.Storage.Files.Shares.Models; using Moq; using Azure.Storage.Tests; +using Azure.Storage.Files.Shares.Specialized; +using System.Threading.Tasks; +using Azure.Core.TestFramework; namespace Azure.Storage.DataMovement.Files.Shares.Tests { @@ -52,7 +55,8 @@ public static Mock WithUri( /// public static Mock WithDirectoryStructure( this Mock mock, - Tree<(string Name, bool IsDirectory)> directoryStructure = default) + Tree<(string Name, bool IsDirectory)> directoryStructure = default, + string permissionKey = default) { mock.Setup(m => m.GetFileClient(It.IsAny())) .Returns(name => @@ -72,7 +76,7 @@ public static Mock WithDirectoryStructure( UriBuilder uriBuilder = new UriBuilder(mock.Object.Uri); uriBuilder.Path = Path.Combine(uriBuilder.Path, name); Mock directory = new(); - return directory.WithUri(uriBuilder.Uri).WithDirectoryStructure(subDirStructure).Object; + return directory.WithUri(uriBuilder.Uri).WithDirectoryStructure(subDirStructure, permissionKey).Object; }); mock.Setup(m => m.GetFilesAndDirectoriesAsync( It.IsAny(), @@ -80,13 +84,32 @@ public static Mock WithDirectoryStructure( ).Returns( (options, cancellationToken) => directoryStructure .Select(elem => FilesModelFactory.ShareFileItem( - isDirectory: elem.Value.IsDirectory, name: elem.Value.Name)) + isDirectory: elem.Value.IsDirectory, + name: elem.Value.Name, + permissionKey: permissionKey)) .AsAsyncPageable() ); return mock; } + public static Mock WithUriAndPermissionKey( + this Mock mock, + string sourcePermission, + string destinationPermissionKey) + { + mock.Setup(m => m.Uri).Returns(new Uri("https://account.file.core.windows.net/share")); + mock.Setup(m => m.CreatePermissionAsync(It.IsAny(), It.IsAny())) + .Returns(Task.FromResult(Response.FromValue( + ShareModelFactory.PermissionInfo(destinationPermissionKey), + new MockResponse(200)))); + mock.Setup(m => m.GetPermissionAsync(It.IsAny(), It.IsAny())) + .Returns(Task.FromResult(Response.FromValue( + sourcePermission, + new MockResponse(200)))); + return mock; + } + public static Tree<(string Name, bool IsDirectory)> AsTree(this IEnumerable<(string Path, bool IsDirectory)> files, string rootDirName = "") { Tree<(string Name, bool IsDirectory)> tree = new() diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/PathScannerTests.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/PathScannerTests.cs index fc3b7b47650d2..836a6ac0ae768 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/PathScannerTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/PathScannerTests.cs @@ -3,15 +3,14 @@ using System; using System.Collections.Generic; -using System.IO; using System.Linq; -using System.Text; +using System.Threading; using System.Threading.Tasks; using Azure.Storage.Files.Shares; using Azure.Storage.Files.Shares.Models; using Moq; +using Moq.Protected; using NUnit.Framework; -using static System.Net.WebRequestMethods; namespace Azure.Storage.DataMovement.Files.Shares.Tests { @@ -50,28 +49,39 @@ public async Task PathScannerFindsAllRecursive(string baseDirName) Host = "myaccount.file.core.windows.net", Path = (shareName + "/" + baseDirName).Trim('/') }.Uri; - Mock directoryClient = new Mock() + Mock sourceDirectory = new Mock() .WithUri(dirUri) .WithDirectoryStructure(paths.AsTree()); + Mock destinationShare = new Mock(); - List files = new(); - List directories = new(); - await foreach ((ShareDirectoryClient dir, ShareFileClient file) - in new PathScanner().ScanAsync(directoryClient.Object, default)) + List files = new(); + List directories = new(); + await foreach (StorageResource storageResource + in new PathScanner().ScanAsync( + sourceDirectory: sourceDirectory.Object, + destinationShare: destinationShare.Object, + sourceOptions: default, + traits: default, + cancellationToken: default)) { - if (file != default) files.Add(file); - if (dir != default) directories.Add(dir); + if (storageResource is ShareFileStorageResource) + files.Add((ShareFileStorageResource)storageResource); + else if (storageResource is ShareDirectoryStorageResourceContainer) + directories.Add((ShareDirectoryStorageResourceContainer)storageResource); } - Assert.That(files.Select(f => f.Path), Is.EquivalentTo(expectedFilePaths)); - Assert.That(directories.Select(f => f.Path), Is.EquivalentTo(expectedDirectoryPaths)); + Assert.That(files.Select(f => f.Uri.PathAndQuery.Substring(shareName.Length + 2)), Is.EquivalentTo(expectedFilePaths)); + Assert.That(directories.Select(f => f.Uri.PathAndQuery.Substring(shareName.Length + 2)), Is.EquivalentTo(expectedDirectoryPaths)); } - [TestCase("")] - [TestCase("somedir")] - public async Task PathScannerFilesRecursive(string baseDirName) + [Test] + public async Task PathScannerFindsAllRecursive_Traits() { + string baseDirName = "somedir"; const string shareName = "myshare"; + string sourcePermissionKey = "myPermissionKey"; + string sourcePermission = "rwl----jwrir09r0i3kjmke;lfds'/fakelongpermission"; + string destinationPermissionKey = "destinationPermissionKey"; List<(string Path, bool IsDirectory)> paths = new() { (Path: "foo/file1-1", IsDirectory: false), @@ -85,6 +95,14 @@ public async Task PathScannerFilesRecursive(string baseDirName) baseDirName + "/" + "foo/file1-2", baseDirName + "/" + "bar/fizz/file2-1", }.Select(s => s.Trim('/')).ToList(); + List expectedDirectoryPaths = new List() + { + baseDirName + "/" + "foo", + baseDirName + "/" + "bar", + baseDirName + "/" + "bar/fizz", + baseDirName + "/" + "bar/buzz", + baseDirName + "/" + "bar/buzz/emptydir", + }.Select(s => s.Trim('/')).ToList(); Uri dirUri = new UriBuilder() { @@ -92,17 +110,57 @@ public async Task PathScannerFilesRecursive(string baseDirName) Host = "myaccount.file.core.windows.net", Path = (shareName + "/" + baseDirName).Trim('/') }.Uri; - Mock directoryClient = new Mock() + Mock mockDirectory = new Mock() .WithUri(dirUri) - .WithDirectoryStructure(paths.AsTree()); + .WithDirectoryStructure(paths.AsTree(), sourcePermissionKey); + Uri shareUri = new ShareUriBuilder(dirUri) + { + DirectoryOrFilePath = "" + }.ToUri(); + Mock mockSourceShare = new Mock(shareUri, new ShareClientOptions()) + .WithUriAndPermissionKey(sourcePermission, destinationPermissionKey); + mockDirectory.Protected() + .Setup("GetParentShareClientCore") + .Returns(mockSourceShare.Object) + .Verifiable(); + Mock mockDestinationShare = new Mock() + .WithUriAndPermissionKey(sourcePermission, destinationPermissionKey); - List files = new(); - await foreach (ShareFileClient file in new PathScanner().ScanFilesAsync(directoryClient.Object, default)) + List files = new(); + List directories = new(); + ShareFileTraits traits = ShareFileTraits.Attributes | ShareFileTraits.PermissionKey; + await foreach (StorageResource storageResource + in new PathScanner().ScanAsync( + sourceDirectory: mockDirectory.Object, + destinationShare: mockDestinationShare.Object, + sourceOptions: default, + traits: traits, + cancellationToken: default)) { - files.Add(file); + if (storageResource is ShareFileStorageResource) + files.Add((ShareFileStorageResource) storageResource); + else if (storageResource is ShareDirectoryStorageResourceContainer) + directories.Add((ShareDirectoryStorageResourceContainer) storageResource); } - Assert.That(files.Select(f => f.Path), Is.EquivalentTo(expectedFilePaths)); + Assert.That(files.Select(f => f.Uri.PathAndQuery.Substring(shareName.Length + 2)), Is.EquivalentTo(expectedFilePaths)); + foreach (ShareFileStorageResource file in files) + { + StorageResourceItemProperties properties = file.GetResourceProperties(); + Assert.That(properties.RawProperties.GetDestinationPermissionKey(), Is.EqualTo(destinationPermissionKey)); + } + Assert.That(directories.Select(f => f.Uri.PathAndQuery.Substring(shareName.Length + 2)), Is.EquivalentTo(expectedDirectoryPaths)); + mockDirectory.Verify(d => d.GetFilesAndDirectoriesAsync( + It.Is( + options => options.Traits == traits), + It.IsAny()), + Times.Once()); + mockSourceShare.Verify(s => s.GetPermissionAsync( + It.Is(permissionKey => sourcePermissionKey.Equals(permissionKey)), + It.IsAny())); + mockDestinationShare.Verify(s => s.CreatePermissionAsync( + It.Is(permission => sourcePermission.Equals(permission)), + It.IsAny())); } } } diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/RehydrateShareResourceTests.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/RehydrateShareResourceTests.cs index e73770243f40b..9ea5d36193ea5 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/RehydrateShareResourceTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/RehydrateShareResourceTests.cs @@ -90,7 +90,7 @@ public async Task RehydrateFile_DestinationOptions() contentDisposition: new("inline"), cacheControl: new("no-cache"), fileAttributes: new(NtfsFileAttributes.Archive), - filePermissionKey: default, + preserveFilePermission: true, fileLastWrittenOn: new(DateTimeOffset.Now), fileChangedOn: new(DateTimeOffset.Now), fileCreatedOn: new(DateTimeOffset.Now), @@ -133,7 +133,7 @@ public async Task RehydrateFile_DestinationOptions() Assert.That(storageResource._options.DirectoryMetadata.Value, Is.EqualTo(originalDestinationData.DirectoryMetadata.Value)); Assert.That(storageResource._options.FileAttributes.Preserve, Is.EqualTo(originalDestinationData.FileAttributes.Preserve)); Assert.That(storageResource._options.FileAttributes.Value, Is.EqualTo(originalDestinationData.FileAttributes.Value)); - Assert.That(storageResource._options.FilePermissionKey, Is.EqualTo(originalDestinationData.FilePermissionKey)); + Assert.IsTrue(storageResource._options.FilePermissions.Preserve); Assert.That(storageResource._options.FileCreatedOn.Preserve, Is.EqualTo(originalDestinationData.FileCreatedOn.Preserve)); Assert.That(storageResource._options.FileCreatedOn.Value, Is.EqualTo(originalDestinationData.FileCreatedOn.Value)); Assert.That(storageResource._options.FileLastWrittenOn.Preserve, Is.EqualTo(originalDestinationData.FileLastWrittenOn.Preserve)); diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareDestinationCheckpointDataTests.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareDestinationCheckpointDataTests.cs index bf5c0f3a6c1c2..e796ab2417d2c 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareDestinationCheckpointDataTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareDestinationCheckpointDataTests.cs @@ -29,6 +29,7 @@ public class ShareDestinationCheckpointDataTests }; // just a few different flags, no meaning private readonly NtfsFileAttributes? DefaultFileAttributes = NtfsFileAttributes.Temporary | NtfsFileAttributes.Archive; + private const string DefaultPermissions = "rwxrwxrwx"; private const string DefaultFilePermissionKey = "MyPermissionKey"; private readonly DateTimeOffset? DefaultFileCreatedOn = new DateTimeOffset(2019, 2, 19, 4, 3, 5, TimeSpan.FromMinutes(5)); private readonly DateTimeOffset? DefaultFileLastWrittenOn = new DateTimeOffset(2024, 11, 24, 11, 23, 45, TimeSpan.FromHours(10)); @@ -57,7 +58,7 @@ private ShareFileDestinationCheckpointData CreateNoPreserveValues() new(false), new(false), new(false), - default, + false, new(false), new(false), new(false), @@ -72,7 +73,7 @@ private ShareFileDestinationCheckpointData CreatePreserveValues() new(true), new(true), new(true), - default, + true, new(true), new(true), new(true), @@ -87,7 +88,7 @@ private ShareFileDestinationCheckpointData CreateSetSampleValues() contentDisposition: new(DefaultContentDisposition), cacheControl: new(DefaultCacheControl), fileAttributes: new(DefaultFileAttributes.Value), - filePermissionKey: DefaultFilePermissionKey, + preserveFilePermission: false, fileCreatedOn: new(DefaultFileCreatedOn.Value), fileLastWrittenOn: new(DefaultFileLastWrittenOn.Value), fileChangedOn: new(DefaultFileChangedOn.Value), @@ -104,8 +105,8 @@ private void AssertEquals(ShareFileDestinationCheckpointData left, ShareFileDest { Assert.That(left.FileAttributes.Value, Is.EqualTo(right.FileAttributes.Value)); } - Assert.That(left.FilePermissionKey, Is.EqualTo(right.FilePermissionKey)); + Assert.That(left.PreserveFilePermission, Is.EqualTo(right.PreserveFilePermission)); Assert.That(left.PreserveFileCreatedOn, Is.EqualTo(right.PreserveFileCreatedOn)); Assert.That(left.FileCreatedOn.Preserve, Is.EqualTo(right.FileCreatedOn.Preserve)); if (!left.PreserveFileCreatedOn && left.FileCreatedOn != default) @@ -196,6 +197,8 @@ private byte[] CreateSerializedPreserve() writer.WritePreservablePropertyOffset(true, 0, ref currentVariableLengthIndex); writer.WritePreservablePropertyOffset(true, 0, ref currentVariableLengthIndex); writer.WritePreservablePropertyOffset(true, 0, ref currentVariableLengthIndex); + writer.WritePreservablePropertyOffset(true, 0, ref currentVariableLengthIndex); + writer.WritePreservablePropertyOffset(true, 0, ref currentVariableLengthIndex); return stream.ToArray(); } @@ -208,6 +211,9 @@ private byte[] CreateSerializedNoPreserve() int currentVariableLengthIndex = DataMovementShareConstants.DestinationCheckpointData.VariableLengthStartIndex; writer.Write(DataMovementShareConstants.DestinationCheckpointData.SchemaVersion); writer.WritePreservablePropertyOffset(false, 0, ref currentVariableLengthIndex); + writer.Write(false); + writer.WritePreservablePropertyOffset(false, 0, ref currentVariableLengthIndex); + writer.WritePreservablePropertyOffset(false, 0, ref currentVariableLengthIndex); writer.WritePreservablePropertyOffset(false, 0, ref currentVariableLengthIndex); writer.WritePreservablePropertyOffset(false, 0, ref currentVariableLengthIndex); writer.WritePreservablePropertyOffset(false, 0, ref currentVariableLengthIndex); @@ -228,7 +234,7 @@ private byte[] CreateSerializedSetValues() using MemoryStream stream = new(); using BinaryWriter writer = new(stream); - byte[] filePermissionKey = Encoding.UTF8.GetBytes(DefaultFilePermissionKey); + bool preserveFilePermission = false; byte[] fileCreatedOn = Encoding.UTF8.GetBytes(DefaultFileCreatedOn.Value.ToString("o")); byte[] fileLastWrittenOn = Encoding.UTF8.GetBytes(DefaultFileLastWrittenOn.Value.ToString("o")); byte[] fileChangedOn = Encoding.UTF8.GetBytes(DefaultFileChangedOn.Value.ToString("o")); @@ -243,7 +249,7 @@ private byte[] CreateSerializedSetValues() int currentVariableLengthIndex = DataMovementShareConstants.DestinationCheckpointData.VariableLengthStartIndex; writer.Write(DataMovementShareConstants.DestinationCheckpointData.SchemaVersion); writer.WritePreservablePropertyOffset(false, DataMovementConstants.IntSizeInBytes, ref currentVariableLengthIndex); - writer.WriteVariableLengthFieldInfo(filePermissionKey.Length, ref currentVariableLengthIndex); + writer.Write(preserveFilePermission); writer.WritePreservablePropertyOffset(false, fileCreatedOn.Length, ref currentVariableLengthIndex); writer.WritePreservablePropertyOffset(false, fileLastWrittenOn.Length, ref currentVariableLengthIndex); writer.WritePreservablePropertyOffset(false, fileChangedOn.Length, ref currentVariableLengthIndex); @@ -255,7 +261,6 @@ private byte[] CreateSerializedSetValues() writer.WritePreservablePropertyOffset(false, fileMetadata.Length, ref currentVariableLengthIndex); writer.WritePreservablePropertyOffset(false, directoryMetadata.Length, ref currentVariableLengthIndex); writer.Write((int)DefaultFileAttributes); - writer.Write(filePermissionKey); writer.Write(fileCreatedOn); writer.Write(fileLastWrittenOn); writer.Write(fileChangedOn); @@ -278,7 +283,7 @@ public void Ctor() Assert.AreEqual(DataMovementShareConstants.DestinationCheckpointData.SchemaVersion, data.Version); Assert.IsTrue(data.PreserveFileAttributes); Assert.IsNull(data.FileAttributes); - Assert.IsNull(data.FilePermissionKey); + Assert.IsFalse(data.PreserveFilePermission); Assert.IsTrue(data.PreserveFileCreatedOn); Assert.IsNull(data.FileCreatedOn); Assert.IsTrue(data.PreserveFileLastWrittenOn); @@ -309,7 +314,7 @@ public void Ctor_SetValues() Assert.That(data.Version, Is.EqualTo(DataMovementShareConstants.DestinationCheckpointData.SchemaVersion)); Assert.IsFalse(data.PreserveFileAttributes); Assert.That(data.FileAttributes.Value, Is.EqualTo(DefaultFileAttributes)); - Assert.That(data.FilePermissionKey, Is.EqualTo(DefaultFilePermissionKey)); + Assert.IsFalse(data.PreserveFilePermission); Assert.IsFalse(data.PreserveFileCreatedOn); Assert.That(data.FileCreatedOn.Value, Is.EqualTo(DefaultFileCreatedOn)); Assert.IsFalse(data.PreserveFileLastWrittenOn); @@ -341,7 +346,7 @@ public void Ctor_Preserve() Assert.IsTrue(data.PreserveFileAttributes); Assert.IsTrue(data.FileAttributes.Preserve); Assert.IsNull(data.FileAttributes.Value); - Assert.IsNull(data.FilePermissionKey); + Assert.IsTrue(data.PreserveFilePermission); Assert.IsTrue(data.PreserveFileCreatedOn); Assert.IsTrue(data.FileCreatedOn.Preserve); Assert.IsNull(data.FileCreatedOn.Value); diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareDirectoryStartTransferCopyTests.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareDirectoryStartTransferCopyTests.cs index 794681a64f2c3..76aea7538f6ed 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareDirectoryStartTransferCopyTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareDirectoryStartTransferCopyTests.cs @@ -14,11 +14,12 @@ using Azure.Storage.Files.Shares.Models; using Azure.Storage.Test.Shared; using Azure.Storage.Files.Shares.Tests; +using Azure.Storage.Test; using NUnit.Framework; -using System.Security.AccessControl; -using Microsoft.Extensions.Options; using System.Threading; using Azure.Core; +using Azure.Storage.Files.Shares.Specialized; +using Metadata = System.Collections.Generic.IDictionary; namespace Azure.Storage.DataMovement.Files.Shares.Tests { @@ -34,6 +35,17 @@ public class ShareDirectoryStartTransferCopyTests : StartTransferDirectoryCopyTe { private const string _fileResourcePrefix = "test-file-"; private const string _expectedOverwriteExceptionMessage = "Cannot overwrite file."; + private const string _defaultContentType = "text/plain"; + private readonly string[] _defaultContentLanguage = new[] { "en-US", "en-CA" }; + private const string _defaultContentDisposition = "inline"; + private const string _defaultCacheControl = "no-cache"; + private const string _defaultPermissions = "O:S-1-5-21-2127521184-1604012920-1887927527-21560751G:S-1-5-21-2127521184-1604012920-1887927527-513D:AI(A;;FA;;;SY)(A;;FA;;;BA)(A;;0x1200a9;;;S-1-5-21-397955417-626881126-188441444-3053964)S:NO_ACCESS_CONTROL"; + private const NtfsFileAttributes _defaultFileAttributes = NtfsFileAttributes.None; + private const NtfsFileAttributes _defaultDirectoryAttributes = NtfsFileAttributes.Directory; + private readonly Metadata _defaultMetadata = DataProvider.BuildMetadata(); + private readonly DateTimeOffset _defaultFileCreatedOn = new DateTimeOffset(2024, 4, 1, 9, 5, 55, default); + private readonly DateTimeOffset _defaultFileLastWrittenOn = new DateTimeOffset(2024, 4, 1, 12, 16, 6, default); + private readonly DateTimeOffset _defaultFileChangedOn = new DateTimeOffset(2024, 4, 1, 13, 30, 3, default); public ShareDirectoryStartTransferCopyTests(bool async, ShareClientOptions.ServiceVersion serviceVersion) : base(async, _expectedOverwriteExceptionMessage, _fileResourcePrefix, null /* RecordedTestMode.Record /* to re-record */) @@ -48,7 +60,12 @@ protected override async Task CreateObjectInSourceAsync( string objectName = null, Stream contents = default, CancellationToken cancellationToken = default) - => await CreateShareFileAsync(container, objectLength, objectName, contents, cancellationToken); + => await CreateShareFileAsync( + container: container, + objectLength: objectLength, + objectName: objectName, + contents: contents, + cancellationToken: cancellationToken); protected override async Task CreateObjectInDestinationAsync( ShareClient container, @@ -56,7 +73,12 @@ protected override async Task CreateObjectInDestinationAsync( string objectName = null, Stream contents = null, CancellationToken cancellationToken = default) - => await CreateShareFileAsync(container, objectLength, objectName, contents, cancellationToken); + => await CreateShareFileAsync( + container: container, + objectLength: objectLength, + objectName: objectName, + contents: contents, + cancellationToken: cancellationToken); protected override async Task> GetDestinationDisposingContainerAsync( ShareServiceClient service = null, @@ -64,8 +86,11 @@ protected override async Task> GetDestinationDi CancellationToken cancellationToken = default) => await DestinationClientBuilder.GetTestShareAsync(service, containerName, cancellationToken: cancellationToken); - protected override StorageResourceContainer GetDestinationStorageResourceContainer(ShareClient containerClient, string prefix) - => new ShareDirectoryStorageResourceContainer(containerClient.GetDirectoryClient(prefix), default); + protected override StorageResourceContainer GetDestinationStorageResourceContainer( + ShareClient containerClient, + string prefix, + TransferPropertiesTestType propertiesTestType = default) + => new ShareDirectoryStorageResourceContainer(containerClient.GetDirectoryClient(prefix), GetShareFileStorageResourceOptions(propertiesTestType)); protected override ShareClient GetOAuthSourceContainerClient(string containerName) { @@ -121,6 +146,7 @@ protected override async Task VerifyResultsAsync( string sourcePrefix, ShareClient destinationContainer, string destinationPrefix, + TransferPropertiesTestType propertiesTestType = default, CancellationToken cancellationToken = default) { CancellationHelper.ThrowIfCancellationRequested(cancellationToken); @@ -166,9 +192,15 @@ protected override async Task VerifyResultsAsync( // Verify Download string sourceFileName = Path.Combine(sourcePrefix, sourceFileNames[i]); - using Stream sourceStream = await sourceDirectory.GetFileClient(sourceFileNames[i]).OpenReadAsync(cancellationToken: cancellationToken); - using Stream destinationStream = await destinationDirectory.GetFileClient(destinationFileNames[i]).OpenReadAsync(cancellationToken: cancellationToken); + ShareFileClient sourceClient = sourceDirectory.GetFileClient(sourceFileNames[i]); + ShareFileClient destinationClient = destinationDirectory.GetFileClient(destinationFileNames[i]); + using Stream sourceStream = await sourceClient.OpenReadAsync(cancellationToken: cancellationToken); + using Stream destinationStream = await destinationClient.OpenReadAsync(cancellationToken: cancellationToken); Assert.AreEqual(sourceStream, destinationStream); + await VerifyPropertiesCopyAsync( + propertiesTestType, + sourceClient, + destinationClient); } } @@ -177,6 +209,7 @@ private async Task CreateShareFileAsync( long? objectLength = null, string objectName = null, Stream contents = default, + TransferPropertiesTestType propertiesType = default, CancellationToken cancellationToken = default) { CancellationHelper.ThrowIfCancellationRequested(cancellationToken); @@ -186,7 +219,30 @@ private async Task CreateShareFileAsync( throw new InvalidOperationException($"Cannot create share file without size specified. Specify {nameof(objectLength)}."); } ShareFileClient fileClient = container.GetRootDirectoryClient().GetFileClient(objectName); - await fileClient.CreateAsync(objectLength.Value); + + string permissionKey = default; + if (propertiesType == TransferPropertiesTestType.Preserve) + { + PermissionInfo permissionInfo = await container.CreatePermissionAsync(_defaultPermissions); + permissionKey = permissionInfo.FilePermissionKey; + } + await fileClient.CreateAsync( + maxSize: objectLength.Value, + httpHeaders: new ShareFileHttpHeaders() + { + ContentLanguage = _defaultContentLanguage, + ContentDisposition = _defaultContentDisposition, + CacheControl = _defaultCacheControl + }, + metadata: _defaultMetadata, + smbProperties: new FileSmbProperties() + { + FileAttributes = _defaultFileAttributes, + FilePermissionKey = permissionKey, + FileCreatedOn = _defaultFileCreatedOn, + FileChangedOn = _defaultFileChangedOn, + FileLastWrittenOn = _defaultFileLastWrittenOn, + }); if (contents != default) { @@ -200,5 +256,201 @@ private async Task CreateDirectoryTreeAsync(ShareClient container, string direct ShareDirectoryClient directory = container.GetRootDirectoryClient().GetSubdirectoryClient(directoryPath); await directory.CreateIfNotExistsAsync(cancellationToken: cancellationToken); } + + protected async Task VerifyPropertiesCopyAsync( + TransferPropertiesTestType transferPropertiesTestType, + ShareFileClient sourceClient, + ShareFileClient destinationClient) + { + if (transferPropertiesTestType == TransferPropertiesTestType.NoPreserve) + { + ShareFileProperties destinationProperties = await destinationClient.GetPropertiesAsync(); + + Assert.IsEmpty(destinationProperties.Metadata); + Assert.IsNull(destinationProperties.ContentDisposition); + Assert.IsNull(destinationProperties.ContentLanguage); + Assert.IsNull(destinationProperties.CacheControl); + } + else if (transferPropertiesTestType == TransferPropertiesTestType.NewProperties) + { + ShareFileProperties destinationProperties = await destinationClient.GetPropertiesAsync(); + + Assert.That(_defaultMetadata, Is.EqualTo(destinationProperties.Metadata)); + Assert.AreEqual(_defaultContentDisposition, destinationProperties.ContentDisposition); + Assert.AreEqual(_defaultContentLanguage, destinationProperties.ContentLanguage); + Assert.AreEqual(_defaultCacheControl, destinationProperties.CacheControl); + Assert.AreEqual(_defaultContentType, destinationProperties.ContentType); + Assert.AreEqual(_defaultFileCreatedOn, destinationProperties.SmbProperties.FileCreatedOn); + Assert.AreEqual(_defaultFileLastWrittenOn, destinationProperties.SmbProperties.FileLastWrittenOn); + } + else if (transferPropertiesTestType == TransferPropertiesTestType.Preserve) + { + ShareFileProperties sourceProperties = await sourceClient.GetPropertiesAsync(); + ShareFileProperties destinationProperties = await destinationClient.GetPropertiesAsync(); + + Assert.That(sourceProperties.Metadata, Is.EqualTo(destinationProperties.Metadata)); + Assert.AreEqual(sourceProperties.ContentDisposition, destinationProperties.ContentDisposition); + Assert.AreEqual(sourceProperties.ContentLanguage, destinationProperties.ContentLanguage); + Assert.AreEqual(sourceProperties.CacheControl, destinationProperties.CacheControl); + Assert.AreEqual(sourceProperties.ContentType, destinationProperties.ContentType); + Assert.AreEqual(sourceProperties.SmbProperties.FileCreatedOn, destinationProperties.SmbProperties.FileCreatedOn); + Assert.AreEqual(sourceProperties.SmbProperties.FileLastWrittenOn, destinationProperties.SmbProperties.FileLastWrittenOn); + + // Check if the permissions are the same. Permission Keys will be different as they are defined by the share service. + ShareClient sourceShareClient = sourceClient.GetParentShareClient(); + string sourcePermission = await sourceShareClient.GetPermissionAsync(sourceProperties.SmbProperties.FilePermissionKey); + + ShareClient parentDestinationClient = destinationClient.GetParentShareClient(); + string fullPermission = await parentDestinationClient.GetPermissionAsync(destinationProperties.SmbProperties.FilePermissionKey); + Assert.AreEqual(sourcePermission, fullPermission); + } + else // Default properties + { + ShareFileProperties sourceProperties = await sourceClient.GetPropertiesAsync(); + ShareFileProperties destinationProperties = await destinationClient.GetPropertiesAsync(); + + Assert.That(sourceProperties.Metadata, Is.EqualTo(destinationProperties.Metadata)); + Assert.AreEqual(sourceProperties.ContentDisposition, destinationProperties.ContentDisposition); + Assert.AreEqual(sourceProperties.ContentLanguage, destinationProperties.ContentLanguage); + Assert.AreEqual(sourceProperties.CacheControl, destinationProperties.CacheControl); + Assert.AreEqual(sourceProperties.ContentType, destinationProperties.ContentType); + Assert.AreEqual(sourceProperties.SmbProperties.FileCreatedOn, destinationProperties.SmbProperties.FileCreatedOn); + Assert.AreEqual(sourceProperties.SmbProperties.FileLastWrittenOn, destinationProperties.SmbProperties.FileLastWrittenOn); + } + } + + private ShareFileStorageResourceOptions GetShareFileStorageResourceOptions(TransferPropertiesTestType type) + { + ShareFileStorageResourceOptions options = default; + if (type == TransferPropertiesTestType.NewProperties) + { + options = new ShareFileStorageResourceOptions + { + ContentDisposition = new(_defaultContentDisposition), + ContentLanguage = new(_defaultContentLanguage), + CacheControl = new(_defaultCacheControl), + ContentType = new(_defaultContentType), + FileMetadata = new(_defaultMetadata), + FileAttributes = new(_defaultFileAttributes), + FileCreatedOn = new(_defaultFileCreatedOn), + FileChangedOn = new(_defaultFileChangedOn), + FileLastWrittenOn = new(_defaultFileLastWrittenOn) + }; + } + else if (type == TransferPropertiesTestType.NoPreserve) + { + options = new ShareFileStorageResourceOptions + { + ContentDisposition = new(false), + ContentLanguage = new(false), + CacheControl = new(false), + ContentType = new(false), + FileMetadata = new(false), + FileAttributes = new(false), + FileCreatedOn = new(false), + FileLastWrittenOn = new(false), + FilePermissions = new(false) + }; + } + else if (type == TransferPropertiesTestType.Preserve) + { + options = new ShareFileStorageResourceOptions + { + ContentDisposition = new(true), + ContentLanguage = new(true), + CacheControl = new(true), + ContentType = new(true), + FileMetadata = new(true), + FileAttributes = new(true), + FileCreatedOn = new(true), + FileLastWrittenOn = new(true), + FilePermissions = new(true) + }; + } + return options; + } + + private async Task CopyRemoteObjects_VerifyProperties( + ShareClient sourceContainer, + ShareClient destinationContainer, + TransferPropertiesTestType propertiesType) + { + // Arrange + int size = Constants.KB; + string sourcePrefix = "sourceFolder"; + string destPrefix = "destFolder"; + await CreateDirectoryInSourceAsync(sourceContainer, sourcePrefix); + string itemName1 = string.Join("/", sourcePrefix, GetNewObjectName()); + string itemName2 = string.Join("/", sourcePrefix, GetNewObjectName()); + await CreateShareFileAsync(sourceContainer, size, itemName1, propertiesType: propertiesType); + await CreateShareFileAsync(sourceContainer, size, itemName2, propertiesType: propertiesType); + + string subDirName = string.Join("/", sourcePrefix, "bar"); + await CreateDirectoryInSourceAsync(sourceContainer, subDirName); + string itemName3 = string.Join("/", subDirName, GetNewObjectName()); + await CreateShareFileAsync(sourceContainer, size, itemName3, propertiesType: propertiesType); + + string subDirName2 = string.Join("/", sourcePrefix, "pik"); + await CreateDirectoryInSourceAsync(sourceContainer, subDirName2); + string itemName4 = string.Join("/", subDirName2, GetNewObjectName()); + await CreateShareFileAsync(sourceContainer, size, itemName4, propertiesType: propertiesType); + + await CreateDirectoryInDestinationAsync(destinationContainer, destPrefix); + + // Create storage resource containers + StorageResourceContainer sourceResource = + GetSourceStorageResourceContainer(sourceContainer, sourcePrefix); + StorageResourceContainer destinationResource = + GetDestinationStorageResourceContainer(destinationContainer, destPrefix, propertiesType); + + // Create Transfer Manager + DataTransferOptions options = new DataTransferOptions(); + TestEventsRaised testEventsRaised = new TestEventsRaised(options); + TransferManager transferManager = new TransferManager(); + + // Start transfer and await for completion. + DataTransfer transfer = await transferManager.StartTransferAsync( + sourceResource, + destinationResource, + options).ConfigureAwait(false); + + CancellationTokenSource tokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30)); + await TestTransferWithTimeout.WaitForCompletionAsync( + transfer, + testEventsRaised, + tokenSource.Token); + + // Verify completion + Assert.NotNull(transfer); + Assert.IsTrue(transfer.HasCompleted); + Assert.AreEqual(DataTransferState.Completed, transfer.TransferStatus.State); + await testEventsRaised.AssertContainerCompletedCheck(4); + + // Assert + await VerifyResultsAsync( + sourceContainer, + sourcePrefix, + destinationContainer, + destPrefix, + propertiesType); + } + + [Test] + [TestCase(TransferPropertiesTestType.NewProperties)] + [TestCase(TransferPropertiesTestType.Preserve)] + [TestCase(TransferPropertiesTestType.NoPreserve)] + [TestCase(TransferPropertiesTestType.Default)] + [LiveOnly] // https://github.com/Azure/azure-sdk-for-net/issues/33082 + public async Task DirectoryToDirectoryAsync_PreservePermissionKey(TransferPropertiesTestType propertiesTestType) + { + // Arrange + await using IDisposingContainer source = await GetSourceDisposingContainerAsync(); + await using IDisposingContainer destination = await GetDestinationDisposingContainerAsync(); + + await CopyRemoteObjects_VerifyProperties( + source.Container, + destination.Container, + propertiesTestType); + } } } diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareDirectoryStorageResourceContainerTests.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareDirectoryStorageResourceContainerTests.cs index 5f07357f35e2c..4ac722b4105c4 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareDirectoryStorageResourceContainerTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareDirectoryStorageResourceContainerTests.cs @@ -20,19 +20,14 @@ namespace Azure.Storage.DataMovement.Files.Shares.Tests { internal class ShareDirectoryStorageResourceContainerTests { - private async IAsyncEnumerable<(TDirectory Directory, TFile File)> ToAsyncEnumerable( - IEnumerable directories, - IEnumerable files) + private async IAsyncEnumerable ToAsyncEnumerable( + IEnumerable resources) { - if (files.Count() != directories.Count()) - { - throw new ArgumentException("Items and Directories should be the same amount"); - } - for (int i = 0; i < files.Count(); i++) + for (int i = 0; i < resources.Count(); i++) { // returning async enumerable must be an async method // so we need something to await - yield return await Task.FromResult((directories.ElementAt(i), files.ElementAt(i))); + yield return await Task.FromResult(resources.ElementAt(i)); } } @@ -48,14 +43,18 @@ public async Task GetStorageResourcesCallsPathScannerCorrectly() List> expectedDirectories = Enumerable.Range(0, pathCount) .Select(i => new Mock()) .ToList(); - + List expectedResources = expectedFiles.Select(m => (StorageResource) new ShareFileStorageResource(m.Object)).ToList(); + expectedResources.Concat(expectedDirectories.Select(m => (StorageResource) new ShareDirectoryStorageResourceContainer(m.Object, default))); // And a mock path scanner Mock pathScanner = new(); - pathScanner.Setup(p => p.ScanAsync(mainClient.Object, It.IsAny())) - .Returns( - (dir, cancellationToken) => ToAsyncEnumerable( - expectedDirectories.Select(m => m.Object), - expectedFiles.Select(m => m.Object))); + pathScanner.Setup(p => p.ScanAsync( + mainClient.Object, + default, + default, + It.IsAny(), + It.IsAny())) + .Returns( + (dir, shareclient, options, traits, cancellationToken) => ToAsyncEnumerable(expectedResources)); // Setup StorageResourceContainer ShareDirectoryStorageResourceContainer resource = new(mainClient.Object, default) diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareFileResourceTests.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareFileResourceTests.cs index 0d14e6dd924b0..20dc72e955662 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareFileResourceTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareFileResourceTests.cs @@ -12,8 +12,10 @@ using Azure.Core.TestFramework.Models; using Azure.Storage.Files.Shares; using Azure.Storage.Files.Shares.Models; +using Azure.Storage.Files.Shares.Specialized; using Azure.Storage.Test; using Moq; +using Moq.Protected; using NUnit.Framework; using Metadata = System.Collections.Generic.IDictionary; @@ -26,10 +28,13 @@ public class ShareFileResourceTests private readonly string[] DefaultContentLanguage = new[] { "en-US", "en-CA" }; private const string DefaultContentDisposition = "inline"; private const string DefaultCacheControl = "no-cache"; + private const string DefaultPermissions = "rwlkjifjeoiwjfaorekmalfjklefjae"; private const string DefaultFilePermissionKey = "key"; + private const string DefaultDestinationFilePermissionKey = "destinationKey"; + private readonly DateTimeOffset DefaultLastModifiedOn = new DateTimeOffset(2024, 4, 1, 12, 18, 10, default); private const NtfsFileAttributes DefaultFileAttributes = NtfsFileAttributes.Archive | NtfsFileAttributes.ReadOnly; private readonly DateTimeOffset DefaultFileCreatedOn = new DateTimeOffset(2024, 4, 1, 9, 5, 55, default); - private readonly DateTimeOffset DefaultFileLastWrittenOn = new DateTimeOffset(2024, 4, 1, 12, 16, 6, default); + private readonly DateTimeOffset DefaultLastWrittenOn = new DateTimeOffset(2024, 4, 1, 12, 16, 6, default); private readonly DateTimeOffset DefaultFileChangedOn = new DateTimeOffset(2024, 4, 1, 13, 30, 3, default); private readonly Dictionary DefaultFileMetadata = new(StringComparer.OrdinalIgnoreCase) { @@ -354,7 +359,7 @@ private async Task> CopyFromStreamPreserveProperties_Inter filePermissionKey: "rw", fileAttributes: "Archive|ReadOnly", fileCreationTime: DefaultFileCreatedOn, - fileLastWriteTime: DefaultFileLastWrittenOn, + fileLastWriteTime: DefaultLastWrittenOn, fileChangeTime: DefaultFileChangedOn, fileId: "48903841", fileParentId: "93024923"), @@ -373,7 +378,7 @@ await storageResource.CopyFromStreamInternalAsync( SourceProperties = new StorageResourceItemProperties( length, new ETag("eTag"), - DefaultFileLastWrittenOn, + DefaultLastWrittenOn, sourceProperties) }); @@ -397,8 +402,9 @@ public async Task CopyFromStreamAsync_PropertiesDefault() { DataMovementConstants.ResourceProperties.ContentDisposition, DefaultContentDisposition }, { DataMovementConstants.ResourceProperties.CacheControl, DefaultCacheControl }, { DataMovementConstants.ResourceProperties.FileAttributes, DefaultFileAttributes }, - { DataMovementConstants.ResourceProperties.FilePermissionKey, DefaultFilePermissionKey }, + { DataMovementConstants.ResourceProperties.SourceFilePermissionKey, DefaultFilePermissionKey }, { DataMovementConstants.ResourceProperties.CreationTime, DefaultFileCreatedOn }, + { DataMovementConstants.ResourceProperties.LastWrittenOn, DefaultLastWrittenOn }, { DataMovementConstants.ResourceProperties.ChangedOnTime, DefaultFileChangedOn }, { DataMovementConstants.ResourceProperties.Metadata, DefaultFileMetadata } }; @@ -426,8 +432,9 @@ public async Task CopyFromStreamAsync_PropertiesDefault() DefaultFileMetadata, It.Is(properties => properties.FileCreatedOn == DefaultFileCreatedOn && - properties.FileLastWrittenOn == DefaultFileLastWrittenOn && - properties.FileChangedOn == DefaultFileChangedOn), + properties.FileLastWrittenOn == DefaultLastWrittenOn && + properties.FileChangedOn == DefaultFileChangedOn && + properties.FilePermissionKey == default), It.IsAny(), It.IsAny(), It.IsAny()), @@ -455,8 +462,10 @@ public async Task CopyFromStreamAsync_PropertiesPreserve() { DataMovementConstants.ResourceProperties.ContentDisposition, DefaultContentDisposition }, { DataMovementConstants.ResourceProperties.CacheControl, DefaultCacheControl }, { DataMovementConstants.ResourceProperties.FileAttributes, DefaultFileAttributes }, - { DataMovementConstants.ResourceProperties.FilePermissionKey, DefaultFilePermissionKey }, + { DataMovementConstants.ResourceProperties.SourceFilePermissionKey, DefaultFilePermissionKey }, + { DataMovementConstants.ResourceProperties.DestinationFilePermissionKey, DefaultDestinationFilePermissionKey }, { DataMovementConstants.ResourceProperties.CreationTime, DefaultFileCreatedOn }, + { DataMovementConstants.ResourceProperties.LastWrittenOn, DefaultLastWrittenOn }, { DataMovementConstants.ResourceProperties.ChangedOnTime, DefaultFileChangedOn }, { DataMovementConstants.ResourceProperties.Metadata, DefaultFileMetadata } }; @@ -472,7 +481,7 @@ public async Task CopyFromStreamAsync_PropertiesPreserve() ContentLanguage = new(true), CacheControl = new(true), FileAttributes = new(true), - FilePermissionKey = default, + FilePermissions = new(true), FileCreatedOn = new(true), FileLastWrittenOn = new(true), FileChangedOn = new(true), @@ -497,7 +506,7 @@ public async Task CopyFromStreamAsync_PropertiesPreserve() DefaultFileMetadata, It.Is(properties => properties.FileCreatedOn == DefaultFileCreatedOn && - properties.FileLastWrittenOn == DefaultFileLastWrittenOn && + properties.FileLastWrittenOn == DefaultLastWrittenOn && properties.FileChangedOn == DefaultFileChangedOn), It.IsAny(), It.IsAny(), @@ -526,7 +535,7 @@ public async Task CopyFromStreamAsync_PropertiesNoPreserve() { DataMovementConstants.ResourceProperties.ContentDisposition, DefaultContentDisposition }, { DataMovementConstants.ResourceProperties.CacheControl, DefaultCacheControl }, { DataMovementConstants.ResourceProperties.FileAttributes, DefaultFileAttributes }, - { DataMovementConstants.ResourceProperties.FilePermissionKey, DefaultFilePermissionKey }, + { DataMovementConstants.ResourceProperties.SourceFilePermissionKey, DefaultFilePermissionKey }, { DataMovementConstants.ResourceProperties.CreationTime, DefaultFileCreatedOn }, { DataMovementConstants.ResourceProperties.ChangedOnTime, DefaultFileChangedOn }, { DataMovementConstants.ResourceProperties.Metadata, DefaultFileMetadata } @@ -543,7 +552,7 @@ public async Task CopyFromStreamAsync_PropertiesNoPreserve() ContentLanguage = new(false), CacheControl = new(false), FileAttributes = new(false), - FilePermissionKey = default, + FilePermissions = new(false), FileCreatedOn = new(false), FileLastWrittenOn = new(false), FileChangedOn = new(false), @@ -569,7 +578,8 @@ public async Task CopyFromStreamAsync_PropertiesNoPreserve() It.Is(properties => properties.FileCreatedOn == default && properties.FileLastWrittenOn == default && - properties.FileChangedOn == default), + properties.FileChangedOn == default && + properties.FilePermissionKey == default), It.IsAny(), It.IsAny(), It.IsAny()), @@ -600,9 +610,9 @@ public async Task CopyFromStreamAsync_SetProperties() ContentLanguage = new(DefaultContentLanguage), CacheControl = new(DefaultCacheControl), FileAttributes = new(DefaultFileAttributes), - FilePermissionKey = default, + FilePermissions = default, FileCreatedOn = new(DefaultFileCreatedOn), - FileLastWrittenOn = new(DefaultFileLastWrittenOn), + FileLastWrittenOn = new(DefaultLastWrittenOn), FileChangedOn = new(DefaultFileChangedOn), FileMetadata = new(DefaultFileMetadata) }, @@ -625,7 +635,7 @@ public async Task CopyFromStreamAsync_SetProperties() DefaultFileMetadata, It.Is(properties => properties.FileCreatedOn == DefaultFileCreatedOn && - properties.FileLastWrittenOn == DefaultFileLastWrittenOn && + properties.FileLastWrittenOn == DefaultLastWrittenOn && properties.FileChangedOn == DefaultFileChangedOn), It.IsAny(), It.IsAny(), @@ -803,8 +813,9 @@ public async Task CopyFromUriAsync_PropertiesDefault() { DataMovementConstants.ResourceProperties.ContentDisposition, DefaultContentDisposition }, { DataMovementConstants.ResourceProperties.CacheControl, DefaultCacheControl }, { DataMovementConstants.ResourceProperties.FileAttributes, DefaultFileAttributes }, - { DataMovementConstants.ResourceProperties.FilePermissionKey, DefaultFilePermissionKey }, + { DataMovementConstants.ResourceProperties.SourceFilePermissionKey, DefaultFilePermissionKey }, { DataMovementConstants.ResourceProperties.CreationTime, DefaultFileCreatedOn }, + { DataMovementConstants.ResourceProperties.LastWrittenOn, DefaultLastWrittenOn }, { DataMovementConstants.ResourceProperties.ChangedOnTime, DefaultFileChangedOn }, { DataMovementConstants.ResourceProperties.Metadata, DefaultFileMetadata } }; @@ -817,7 +828,7 @@ await CopyFromUriAsyncPreserveProperties_Internal( new StorageResourceItemProperties( length, new ETag("eTag"), - DefaultFileLastWrittenOn, + DefaultLastWrittenOn, sourceProperties)); // Verify @@ -831,7 +842,7 @@ await CopyFromUriAsyncPreserveProperties_Internal( DefaultFileMetadata, It.Is(properties => properties.FileCreatedOn == DefaultFileCreatedOn && - properties.FileLastWrittenOn == DefaultFileLastWrittenOn && + properties.FileLastWrittenOn == DefaultLastWrittenOn && properties.FileChangedOn == DefaultFileChangedOn), It.IsAny(), It.IsAny(), @@ -864,8 +875,9 @@ public async Task CopyFromUriAsync_PropertiesPreserve() { DataMovementConstants.ResourceProperties.ContentDisposition, DefaultContentDisposition }, { DataMovementConstants.ResourceProperties.CacheControl, DefaultCacheControl }, { DataMovementConstants.ResourceProperties.FileAttributes, DefaultFileAttributes }, - { DataMovementConstants.ResourceProperties.FilePermissionKey, DefaultFilePermissionKey }, + { DataMovementConstants.ResourceProperties.SourceFilePermissionKey, DefaultFilePermissionKey }, { DataMovementConstants.ResourceProperties.CreationTime, DefaultFileCreatedOn }, + { DataMovementConstants.ResourceProperties.LastWrittenOn, DefaultLastWrittenOn }, { DataMovementConstants.ResourceProperties.ChangedOnTime, DefaultFileChangedOn }, { DataMovementConstants.ResourceProperties.Metadata, DefaultFileMetadata } }; @@ -882,7 +894,7 @@ await CopyFromUriAsyncPreserveProperties_Internal( ContentLanguage = new(true), CacheControl = new(true), FileAttributes = new(true), - FilePermissionKey = default, + FilePermissions = default, FileCreatedOn = new(true), FileLastWrittenOn = new(true), FileChangedOn = new(true), @@ -891,7 +903,7 @@ await CopyFromUriAsyncPreserveProperties_Internal( new StorageResourceItemProperties( length, new ETag("eTag"), - DefaultFileLastWrittenOn, + DefaultLastWrittenOn, sourceProperties)); // Verify @@ -905,7 +917,7 @@ await CopyFromUriAsyncPreserveProperties_Internal( DefaultFileMetadata, It.Is(properties => properties.FileCreatedOn == DefaultFileCreatedOn && - properties.FileLastWrittenOn == DefaultFileLastWrittenOn && + properties.FileLastWrittenOn == DefaultLastWrittenOn && properties.FileChangedOn == DefaultFileChangedOn), It.IsAny(), It.IsAny(), @@ -938,7 +950,7 @@ public async Task CopyFromUriAsync_PropertiesNoPreserve() { DataMovementConstants.ResourceProperties.ContentDisposition, DefaultContentDisposition }, { DataMovementConstants.ResourceProperties.CacheControl, DefaultCacheControl }, { DataMovementConstants.ResourceProperties.FileAttributes, DefaultFileAttributes }, - { DataMovementConstants.ResourceProperties.FilePermissionKey, DefaultFilePermissionKey }, + { DataMovementConstants.ResourceProperties.SourceFilePermissionKey, DefaultFilePermissionKey }, { DataMovementConstants.ResourceProperties.CreationTime, DefaultFileCreatedOn }, { DataMovementConstants.ResourceProperties.ChangedOnTime, DefaultFileChangedOn }, { DataMovementConstants.ResourceProperties.Metadata, DefaultFileMetadata } @@ -956,7 +968,7 @@ await CopyFromUriAsyncPreserveProperties_Internal( ContentLanguage = new(false), CacheControl = new(false), FileAttributes = new(false), - FilePermissionKey = default, + FilePermissions = default, FileCreatedOn = new(false), FileLastWrittenOn = new(false), FileChangedOn = new(false), @@ -965,7 +977,7 @@ await CopyFromUriAsyncPreserveProperties_Internal( new StorageResourceItemProperties( length, new ETag("eTag"), - DefaultFileLastWrittenOn, + DefaultLastWrittenOn, sourceProperties)); // Verify @@ -1017,16 +1029,16 @@ await CopyFromUriAsyncPreserveProperties_Internal( ContentLanguage = new(DefaultContentLanguage), CacheControl = new(DefaultCacheControl), FileAttributes = new(DefaultFileAttributes), - FilePermissionKey = default, + FilePermissions = default, FileCreatedOn = new(DefaultFileCreatedOn), - FileLastWrittenOn = new(DefaultFileLastWrittenOn), + FileLastWrittenOn = new(DefaultLastWrittenOn), FileChangedOn = new(DefaultFileChangedOn), FileMetadata = new(DefaultFileMetadata) }, new StorageResourceItemProperties( length, new ETag("eTag"), - DefaultFileLastWrittenOn, + DefaultLastWrittenOn, default)); // Verify @@ -1040,7 +1052,7 @@ await CopyFromUriAsyncPreserveProperties_Internal( DefaultFileMetadata, It.Is(properties => properties.FileCreatedOn == DefaultFileCreatedOn && - properties.FileLastWrittenOn == DefaultFileLastWrittenOn && + properties.FileLastWrittenOn == DefaultLastWrittenOn && properties.FileChangedOn == DefaultFileChangedOn), It.IsAny(), It.IsAny(), @@ -1232,8 +1244,9 @@ public async Task CopyBlockFromUriAsync_PropertiesDefault() { DataMovementConstants.ResourceProperties.ContentDisposition, DefaultContentDisposition }, { DataMovementConstants.ResourceProperties.CacheControl, DefaultCacheControl }, { DataMovementConstants.ResourceProperties.FileAttributes, DefaultFileAttributes }, - { DataMovementConstants.ResourceProperties.FilePermissionKey, DefaultFilePermissionKey }, + { DataMovementConstants.ResourceProperties.SourceFilePermissionKey, DefaultFilePermissionKey }, { DataMovementConstants.ResourceProperties.CreationTime, DefaultFileCreatedOn }, + { DataMovementConstants.ResourceProperties.LastWrittenOn, DefaultLastWrittenOn }, { DataMovementConstants.ResourceProperties.ChangedOnTime, DefaultFileChangedOn }, { DataMovementConstants.ResourceProperties.Metadata, DefaultFileMetadata } }; @@ -1246,7 +1259,7 @@ await CopyBlockFromUriAsyncPreserveProperties_Internal( new StorageResourceItemProperties( length, new ETag("eTag"), - DefaultFileLastWrittenOn, + DefaultLastWrittenOn, sourceProperties)); // Assert @@ -1260,7 +1273,7 @@ await CopyBlockFromUriAsyncPreserveProperties_Internal( DefaultFileMetadata, It.Is(properties => properties.FileCreatedOn == DefaultFileCreatedOn && - properties.FileLastWrittenOn == DefaultFileLastWrittenOn && + properties.FileLastWrittenOn == DefaultLastWrittenOn && properties.FileChangedOn == DefaultFileChangedOn), It.IsAny(), It.IsAny(), @@ -1293,8 +1306,9 @@ public async Task CopyBlockFromUriAsync_PropertiesPreserve() { DataMovementConstants.ResourceProperties.ContentDisposition, DefaultContentDisposition }, { DataMovementConstants.ResourceProperties.CacheControl, DefaultCacheControl }, { DataMovementConstants.ResourceProperties.FileAttributes, DefaultFileAttributes }, - { DataMovementConstants.ResourceProperties.FilePermissionKey, DefaultFilePermissionKey }, + { DataMovementConstants.ResourceProperties.SourceFilePermissionKey, DefaultFilePermissionKey }, { DataMovementConstants.ResourceProperties.CreationTime, DefaultFileCreatedOn }, + { DataMovementConstants.ResourceProperties.LastWrittenOn, DefaultLastWrittenOn }, { DataMovementConstants.ResourceProperties.ChangedOnTime, DefaultFileChangedOn }, { DataMovementConstants.ResourceProperties.Metadata, DefaultFileMetadata } }; @@ -1311,7 +1325,7 @@ await CopyBlockFromUriAsyncPreserveProperties_Internal( ContentLanguage = new(true), CacheControl = new(true), FileAttributes = new(true), - FilePermissionKey = default, + FilePermissions = default, FileCreatedOn = new(true), FileLastWrittenOn = new(true), FileChangedOn = new(true), @@ -1320,7 +1334,7 @@ await CopyBlockFromUriAsyncPreserveProperties_Internal( new StorageResourceItemProperties( length, new ETag("eTag"), - DefaultFileLastWrittenOn, + DefaultLastWrittenOn, sourceProperties)); // Verify @@ -1334,7 +1348,7 @@ await CopyBlockFromUriAsyncPreserveProperties_Internal( DefaultFileMetadata, It.Is(properties => properties.FileCreatedOn == DefaultFileCreatedOn && - properties.FileLastWrittenOn == DefaultFileLastWrittenOn && + properties.FileLastWrittenOn == DefaultLastWrittenOn && properties.FileChangedOn == DefaultFileChangedOn), It.IsAny(), It.IsAny(), @@ -1367,7 +1381,7 @@ public async Task CopyBlockFromUriAsync_PropertiesNoPreserve() { DataMovementConstants.ResourceProperties.ContentDisposition, DefaultContentDisposition }, { DataMovementConstants.ResourceProperties.CacheControl, DefaultCacheControl }, { DataMovementConstants.ResourceProperties.FileAttributes, DefaultFileAttributes }, - { DataMovementConstants.ResourceProperties.FilePermissionKey, DefaultFilePermissionKey }, + { DataMovementConstants.ResourceProperties.SourceFilePermissionKey, DefaultFilePermissionKey }, { DataMovementConstants.ResourceProperties.CreationTime, DefaultFileCreatedOn }, { DataMovementConstants.ResourceProperties.ChangedOnTime, DefaultFileChangedOn }, { DataMovementConstants.ResourceProperties.Metadata, DefaultFileMetadata } @@ -1385,7 +1399,7 @@ await CopyBlockFromUriAsyncPreserveProperties_Internal( ContentLanguage = new(false), CacheControl = new(false), FileAttributes = new(false), - FilePermissionKey = default, + FilePermissions = default, FileCreatedOn = new(false), FileLastWrittenOn = new(false), FileChangedOn = new(false), @@ -1394,7 +1408,7 @@ await CopyBlockFromUriAsyncPreserveProperties_Internal( new StorageResourceItemProperties( length, new ETag("eTag"), - DefaultFileLastWrittenOn, + DefaultLastWrittenOn, sourceProperties)); // Verify @@ -1447,16 +1461,16 @@ await CopyBlockFromUriAsyncPreserveProperties_Internal( ContentLanguage = new(DefaultContentLanguage), CacheControl = new(DefaultCacheControl), FileAttributes = new(DefaultFileAttributes), - FilePermissionKey = default, + FilePermissions = default, FileCreatedOn = new(DefaultFileCreatedOn), - FileLastWrittenOn = new(DefaultFileLastWrittenOn), + FileLastWrittenOn = new(DefaultLastWrittenOn), FileChangedOn = new(DefaultFileChangedOn), FileMetadata = new(DefaultFileMetadata) }, new StorageResourceItemProperties( length, new ETag("eTag"), - DefaultFileLastWrittenOn, + DefaultLastWrittenOn, default)); // Verify @@ -1470,7 +1484,7 @@ await CopyBlockFromUriAsyncPreserveProperties_Internal( DefaultFileMetadata, It.Is(properties => properties.FileCreatedOn == DefaultFileCreatedOn && - properties.FileLastWrittenOn == DefaultFileLastWrittenOn && + properties.FileLastWrittenOn == DefaultLastWrittenOn && properties.FileChangedOn == DefaultFileChangedOn), It.IsAny(), It.IsAny(), @@ -1503,7 +1517,7 @@ public async Task GetPropertiesAsync() mock.Setup(b => b.GetPropertiesAsync(It.IsAny(), It.IsAny())) .Returns(Task.FromResult(Response.FromValue( FilesModelFactory.StorageFileProperties( - lastModified: DateTime.MinValue, + lastModified: DefaultLastWrittenOn, metadata: DefaultFileMetadata, contentLength: length, contentType: DefaultContentType, @@ -1521,8 +1535,8 @@ public async Task GetPropertiesAsync() copyStatus: CopyStatus.Success, isServerEncrypted: false, fileAttributes: DefaultFileAttributes, + fileLastWriteTime: DefaultLastWrittenOn, fileCreationTime: DefaultFileCreatedOn, - fileLastWriteTime: DefaultFileLastWrittenOn, fileChangeTime: DefaultFileChangedOn, filePermissionKey: DefaultFilePermissionKey, fileId: default, @@ -1544,7 +1558,7 @@ public async Task GetPropertiesAsync() result.RawProperties.TryGetValue(DataMovementConstants.ResourceProperties.Metadata, out object metadataObject); result.RawProperties.TryGetValue(DataMovementConstants.ResourceProperties.CreationTime, out object createdOnObject); result.RawProperties.TryGetValue(DataMovementConstants.ResourceProperties.ChangedOnTime, out object changedOnObject); - result.RawProperties.TryGetValue(DataMovementConstants.ResourceProperties.FilePermissionKey, out object permissionKeyObject); + result.RawProperties.TryGetValue(DataMovementConstants.ResourceProperties.SourceFilePermissionKey, out object permissionKeyObject); // Assert Assert.NotNull(result); @@ -1557,7 +1571,7 @@ public async Task GetPropertiesAsync() Assert.AreEqual(DefaultContentType, (string) contentTypeObject); Assert.AreEqual(DefaultFileAttributes, (NtfsFileAttributes) fileAttributesObject); Assert.AreEqual(DefaultFileCreatedOn, (DateTimeOffset) createdOnObject); - Assert.AreEqual(DefaultFileLastWrittenOn, result.LastModifiedTime); + Assert.AreEqual(DefaultLastWrittenOn, result.LastModifiedTime); Assert.AreEqual(DefaultFileChangedOn, (DateTimeOffset) changedOnObject); Assert.AreEqual(DefaultFilePermissionKey, (string) permissionKeyObject); @@ -1566,6 +1580,94 @@ public async Task GetPropertiesAsync() mock.VerifyNoOtherCalls(); } + [Test] + public async Task GetPropertiesAsync_CachedFromEnumeration() + { + // Arrange + Mock mock = new( + new Uri("https://storageaccount.file.core.windows.net/container/file"), + new ShareClientOptions()); + + long length = 1024; + string source = "https://storageaccount.file.core.windows.net/container/file2"; + mock.Setup(b => b.GetPropertiesAsync(It.IsAny(), It.IsAny())) + .Returns(Task.FromResult(Response.FromValue( + FilesModelFactory.StorageFileProperties( + lastModified: DefaultLastWrittenOn, + metadata: DefaultFileMetadata, + contentLength: length, + contentType: DefaultContentType, + eTag: new ETag("etag"), + contentHash: default, + contentEncoding: DefaultContentEncoding, + cacheControl: DefaultCacheControl, + contentDisposition: DefaultContentDisposition, + contentLanguage: DefaultContentLanguage, + copyCompletedOn: DateTimeOffset.MinValue, + copyStatusDescription: default, + copyId: default, + copyProgress: default, + copySource: source, + copyStatus: CopyStatus.Success, + isServerEncrypted: false, + fileAttributes: DefaultFileAttributes, + fileLastWriteTime: DefaultLastWrittenOn, + fileCreationTime: DefaultFileCreatedOn, + fileChangeTime: DefaultFileChangedOn, + filePermissionKey: DefaultFilePermissionKey, + fileId: default, + fileParentId: default), + new MockResponse(200)))); + + ShareFileStorageResource storageResource = new ShareFileStorageResource( + mock.Object, + new StorageResourceItemProperties( + resourceLength: length, + eTag: new ETag("etag"), + lastModifiedTime: DefaultLastWrittenOn, + properties: new Dictionary + { + { DataMovementConstants.ResourceProperties.SourceFilePermissionKey, DefaultFilePermissionKey }, + { DataMovementConstants.ResourceProperties.DestinationFilePermissionKey, DefaultDestinationFilePermissionKey } + })); + + // Act + StorageResourceItemProperties result = await storageResource.GetPropertiesInternalAsync(); + Mock properties = new Mock(result); + + result.RawProperties.TryGetValue(DataMovementConstants.ResourceProperties.ContentType, out object contentTypeObject); + result.RawProperties.TryGetValue(DataMovementConstants.ResourceProperties.ContentEncoding, out object contentEncodingObject); + result.RawProperties.TryGetValue(DataMovementConstants.ResourceProperties.ContentLanguage, out object contentLanguageObject); + result.RawProperties.TryGetValue(DataMovementConstants.ResourceProperties.ContentDisposition, out object contentDispositionObject); + result.RawProperties.TryGetValue(DataMovementConstants.ResourceProperties.CacheControl, out object cacheControlObject); + result.RawProperties.TryGetValue(DataMovementConstants.ResourceProperties.FileAttributes, out object fileAttributesObject); + result.RawProperties.TryGetValue(DataMovementConstants.ResourceProperties.Metadata, out object metadataObject); + result.RawProperties.TryGetValue(DataMovementConstants.ResourceProperties.CreationTime, out object createdOnObject); + result.RawProperties.TryGetValue(DataMovementConstants.ResourceProperties.ChangedOnTime, out object changedOnObject); + result.RawProperties.TryGetValue(DataMovementConstants.ResourceProperties.SourceFilePermissionKey, out object sourcePermissionKeyObject); + result.RawProperties.TryGetValue(DataMovementConstants.ResourceProperties.DestinationFilePermissionKey, out object destinationPermissionKeyObject); + + // Assert + Assert.NotNull(result); + Assert.AreEqual(length, result.ResourceLength); + Assert.AreEqual(DefaultFileMetadata, (Metadata)metadataObject); + Assert.AreEqual(DefaultCacheControl, (string)cacheControlObject); + Assert.AreEqual(DefaultContentDisposition, (string)contentDispositionObject); + Assert.AreEqual(DefaultContentEncoding, (string[])contentEncodingObject); + Assert.AreEqual(DefaultContentLanguage, (string[])contentLanguageObject); + Assert.AreEqual(DefaultContentType, (string)contentTypeObject); + Assert.AreEqual(DefaultFileAttributes, (NtfsFileAttributes)fileAttributesObject); + Assert.AreEqual(DefaultFileCreatedOn, (DateTimeOffset)createdOnObject); + Assert.AreEqual(DefaultLastWrittenOn, result.LastModifiedTime); + Assert.AreEqual(DefaultFileChangedOn, (DateTimeOffset)changedOnObject); + Assert.AreEqual(DefaultFilePermissionKey, (string)sourcePermissionKeyObject); + Assert.AreEqual(DefaultDestinationFilePermissionKey, (string)destinationPermissionKeyObject); + + mock.Verify(b => b.GetPropertiesAsync(It.IsAny(), It.IsAny()), + Times.Once()); + mock.VerifyNoOtherCalls(); + } + [Test] public async Task GetPropertiesAsync_Error() { @@ -1622,5 +1724,392 @@ public async Task GetCopyAuthorizationHeaderAsync_NoOAuth() Assert.That(await resource.GetCopyAuthorizationHeaderInternalAsync(), Is.Null); } + + [Test] + public async Task GetPermissionsAsync() + { + Mock mockFile = new(); + Mock mockShare = new(); + mockShare.Setup(s => s.GetPermissionAsync(It.IsAny(), It.IsAny())) + .Returns(Task.FromResult(Response.FromValue( + DefaultPermissions, + new MockResponse(200)))); + mockFile.Protected() + .Setup("GetParentShareClientCore") + .Returns(mockShare.Object) + .Verifiable(); + + StorageResourceItemProperties properties = new StorageResourceItemProperties( + 1024, + new ETag("etag"), + DateTimeOffset.UtcNow, + new Dictionary + { + { DataMovementConstants.ResourceProperties.SourceFilePermissionKey, DefaultFilePermissionKey } + }); + + ShareFileStorageResource resource = new(mockFile.Object); + string actualPermission = await resource.GetPermissionsInternalAsync(properties); + + Assert.AreEqual(DefaultPermissions, actualPermission); + mockShare.Verify(s => s.GetPermissionAsync( + It.Is(permissionKey => permissionKey == DefaultFilePermissionKey), + It.IsAny()), + Times.Once()); + mockFile.VerifyNoOtherCalls(); + mockShare.VerifyNoOtherCalls(); + } + + [Test] + public async Task GetPermissionsAsync_Default() + { + Mock mockFile = new(); + Mock mockShare = new(); + + ShareFileStorageResource resource = new(mockFile.Object); + string actualPermission = await resource.GetPermissionsInternalAsync(); + + Assert.IsNull(actualPermission); + mockFile.VerifyNoOtherCalls(); + mockShare.VerifyNoOtherCalls(); + } + + [Test] + public async Task SetPermissionsAsync() + { + Mock sourceFileMock = new( + new ShareFileClient(new Uri("https://storageaccount.file.core.windows.net/share/file2"), + new ShareClientOptions()), + new ShareFileStorageResourceOptions()); + Mock mockFile = new(); + Mock mockShare = new(); + + sourceFileMock.Protected() + .Setup>("GetPermissionsAsync", ItExpr.IsAny(), ItExpr.IsAny()) + .Returns(Task.FromResult(DefaultPermissions)) + .Verifiable(); + mockShare.Setup(s => s.CreatePermissionAsync(It.IsAny(), It.IsAny())) + .Returns(Task.FromResult(Response.FromValue( + ShareModelFactory.PermissionInfo(DefaultDestinationFilePermissionKey), + new MockResponse(200)))); + mockFile.Protected() + .Setup("GetParentShareClientCore") + .Returns(mockShare.Object) + .Verifiable(); + + StorageResourceItemProperties properties = new StorageResourceItemProperties( + 1024, + new ETag("etag"), + DateTimeOffset.UtcNow, + new Dictionary + { + { DataMovementConstants.ResourceProperties.SourceFilePermissionKey, DefaultFilePermissionKey } + }); + + ShareFileStorageResource resource = new( + mockFile.Object, + properties, + new ShareFileStorageResourceOptions() + { + FilePermissions = new(true) + }); + await resource.SetPermissionsInternalAsync( + sourceFileMock.Object, + properties); + + mockShare.Verify(s => s.CreatePermissionAsync( + It.Is(permissions => permissions == DefaultPermissions), + It.IsAny()), + Times.Once()); + Assert.AreEqual(DefaultDestinationFilePermissionKey, resource._destinationPermissionKey); + mockFile.VerifyNoOtherCalls(); + mockShare.VerifyNoOtherCalls(); + } + + [Test] + public async Task SetPermissionsAsync_NonShareFile() + { + Mock sourceFileMock = new(); + Mock mockFile = new(); + + StorageResourceItemProperties properties = new StorageResourceItemProperties( + 1024, + new ETag("etag"), + DateTimeOffset.UtcNow, + new Dictionary + { + { DataMovementConstants.ResourceProperties.SourceFilePermissionKey, DefaultFilePermissionKey } + }); + + ShareFileStorageResource resource = new(mockFile.Object); + await resource.SetPermissionsInternalAsync( + sourceFileMock.Object, + properties); + + mockFile.VerifyNoOtherCalls(); + } + + [Test] + public async Task SetPermissionsAsync_NoPreserve() + { + Mock shareFileClient = new(new Uri("https://storageaccount.file.core.windows.net/share/file1"), new ShareClientOptions()); + Mock sourceFileMock = new( + new ShareFileClient(new Uri("https://storageaccount.file.core.windows.net/share/file2"), + new ShareClientOptions()), + new ShareFileStorageResourceOptions()); + + StorageResourceItemProperties properties = new StorageResourceItemProperties( + 1024, + new ETag("etag"), + DateTimeOffset.UtcNow, + new Dictionary + { + { DataMovementConstants.ResourceProperties.SourceFilePermissionKey, DefaultFilePermissionKey } + }); + + ShareFileStorageResource resource = new( + shareFileClient.Object, + new ShareFileStorageResourceOptions() + { + FilePermissions = new(false) + }); + await resource.SetPermissionsInternalAsync( + sourceFileMock.Object, + properties); + + shareFileClient.VerifyNoOtherCalls(); + sourceFileMock.VerifyNoOtherCalls(); + } + + [Test] + public async Task SetPermissionsAsync_EmptyGetPermissions() + { + Mock sourceFileMock = new( + new ShareFileClient(new Uri("https://storageaccount.file.core.windows.net/share/file2"), + new ShareClientOptions()), + new ShareFileStorageResourceOptions()); + Mock mockFile = new(new Uri("https://storageaccount.file.core.windows.net/share/file1"), new ShareClientOptions()); + + sourceFileMock.Protected() + .Setup>("GetPermissionsAsync", ItExpr.IsAny(), ItExpr.IsAny()) + .Returns(Task.FromResult((string)default)) + .Verifiable(); + + StorageResourceItemProperties properties = new StorageResourceItemProperties( + 1024, + new ETag("etag"), + DateTimeOffset.UtcNow, + new Dictionary + { + { DataMovementConstants.ResourceProperties.SourceFilePermissionKey, DefaultFilePermissionKey } + }); + + ShareFileStorageResource resource = new(mockFile.Object, + new ShareFileStorageResourceOptions() + { + FilePermissions = new(true) + }); + await resource.SetPermissionsInternalAsync( + sourceFileMock.Object, + properties); + + mockFile.VerifyNoOtherCalls(); + } + + [Test] + public async Task SetPermissionsAsync_PermissionsValue() + { + Mock sourceFileMock = new( + new ShareFileClient(new Uri("https://storageaccount.file.core.windows.net/share/file2"), + new ShareClientOptions()), + new ShareFileStorageResourceOptions()); + Mock mockFile = new(new Uri("https://storageaccount.file.core.windows.net/share/file1"), new ShareClientOptions()); + + StorageResourceItemProperties destinationProperties = new StorageResourceItemProperties( + 1024, + new ETag("etag"), + DateTimeOffset.UtcNow, + new Dictionary + { + { DataMovementConstants.ResourceProperties.LastModified, DefaultLastModifiedOn } + }); + StorageResourceItemProperties sourceProperties = new StorageResourceItemProperties( + 1024, + new ETag("etag"), + DateTimeOffset.UtcNow, + new Dictionary + { + { DataMovementConstants.ResourceProperties.FilePermissions, DefaultPermissions } + }); + + ShareFileStorageResource resource = new(mockFile.Object, + destinationProperties, + new ShareFileStorageResourceOptions() + { + FilePermissions = new(true) + }); + await resource.SetPermissionsInternalAsync( + sourceFileMock.Object, + sourceProperties); + mockFile.VerifyNoOtherCalls(); + } + + [Test] + public async Task CreateAsync() + { + // Arrange + int length = 1024; + Mock mockDestination = new( + new Uri("https://storageaccount.file.core.windows.net/container/destinationfile"), + new ShareClientOptions()); + + mockDestination.Setup(b => b.ExistsAsync(It.IsAny())) + .Returns(Task.FromResult(Response.FromValue(false, new MockResponse(200)))); + mockDestination.Setup(b => b.CreateAsync(It.IsAny(), It.IsAny(), It.IsAny>(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) + .Returns(Task.FromResult(Response.FromValue( + FilesModelFactory.StorageFileInfo( + eTag: new ETag("eTag"), + lastModified: DateTimeOffset.UtcNow, + isServerEncrypted: false, + filePermissionKey: "rw", + fileAttributes: "Archive|ReadOnly", + fileCreationTime: DateTimeOffset.UtcNow, + fileLastWriteTime: DateTimeOffset.UtcNow, + fileChangeTime: DateTimeOffset.UtcNow, + fileId: "48903841", + fileParentId: "93024923"), + new MockResponse(200)))); + ShareFileStorageResource destinationResource = new ShareFileStorageResource(mockDestination.Object); + StorageResourceItemProperties properties = new StorageResourceItemProperties( + 1024, + new ETag("etag"), + DateTimeOffset.UtcNow, + new() + { + { DataMovementConstants.ResourceProperties.ContentType, DefaultContentType }, + { DataMovementConstants.ResourceProperties.ContentEncoding, DefaultContentEncoding }, + { DataMovementConstants.ResourceProperties.ContentLanguage, DefaultContentLanguage }, + { DataMovementConstants.ResourceProperties.ContentDisposition, DefaultContentDisposition }, + { DataMovementConstants.ResourceProperties.CacheControl, DefaultCacheControl }, + { DataMovementConstants.ResourceProperties.LastModified, DefaultLastModifiedOn }, + { DataMovementConstants.ResourceProperties.FileAttributes, DefaultFileAttributes }, + { DataMovementConstants.ResourceProperties.CreationTime, DefaultFileCreatedOn }, + { DataMovementConstants.ResourceProperties.LastWrittenOn, DefaultLastWrittenOn }, + { DataMovementConstants.ResourceProperties.ChangedOnTime, DefaultFileChangedOn }, + { DataMovementConstants.ResourceProperties.Metadata, DefaultFileMetadata }, + { DataMovementConstants.ResourceProperties.FilePermissions, DefaultPermissions } + }); + + // Act + await destinationResource.CreateAsync( + overwrite: false, + maxSize: length, + properties: properties, + cancellationToken: CancellationToken.None); + + mockDestination.Verify(b => b.CreateAsync( + length, + It.Is(headers => + headers.CacheControl == DefaultCacheControl && + headers.ContentDisposition == DefaultContentDisposition && + headers.ContentEncoding == DefaultContentEncoding && + headers.ContentType == DefaultContentType && + headers.ContentLanguage == DefaultContentLanguage), + DefaultFileMetadata, + It.Is(properties => + properties.FileCreatedOn == DefaultFileCreatedOn && + properties.FileLastWrittenOn == DefaultLastWrittenOn && + properties.FileChangedOn == DefaultFileChangedOn), + It.IsAny(), + It.IsAny(), + It.IsAny()), + Times.Once()); + mockDestination.Verify(b => b.ExistsAsync( + It.IsAny()), + Times.Once()); + mockDestination.VerifyNoOtherCalls(); + } + + [Test] + public async Task CreateAsync_PermissionKey() + { + // Arrange + int length = 1024; + Mock mockDestination = new( + new Uri("https://storageaccount.file.core.windows.net/container/destinationfile"), + new ShareClientOptions()); + + mockDestination.Setup(b => b.ExistsAsync(It.IsAny())) + .Returns(Task.FromResult(Response.FromValue(false, new MockResponse(200)))); + mockDestination.Setup(b => b.CreateAsync(It.IsAny(), It.IsAny(), It.IsAny>(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) + .Returns(Task.FromResult(Response.FromValue( + FilesModelFactory.StorageFileInfo( + eTag: new ETag("eTag"), + lastModified: DateTimeOffset.UtcNow, + isServerEncrypted: false, + filePermissionKey: "rw", + fileAttributes: "Archive|ReadOnly", + fileCreationTime: DateTimeOffset.UtcNow, + fileLastWriteTime: DateTimeOffset.UtcNow, + fileChangeTime: DateTimeOffset.UtcNow, + fileId: "48903841", + fileParentId: "93024923"), + new MockResponse(200)))); + ShareFileStorageResource destinationResource = new ShareFileStorageResource( + mockDestination.Object, + new() + { + FilePermissions = new(true) + }); + StorageResourceItemProperties properties = new StorageResourceItemProperties( + 1024, + new ETag("etag"), + DateTimeOffset.UtcNow, + new() + { + { DataMovementConstants.ResourceProperties.ContentType, DefaultContentType }, + { DataMovementConstants.ResourceProperties.ContentEncoding, DefaultContentEncoding }, + { DataMovementConstants.ResourceProperties.ContentLanguage, DefaultContentLanguage }, + { DataMovementConstants.ResourceProperties.ContentDisposition, DefaultContentDisposition }, + { DataMovementConstants.ResourceProperties.CacheControl, DefaultCacheControl }, + { DataMovementConstants.ResourceProperties.LastModified, DefaultLastModifiedOn }, + { DataMovementConstants.ResourceProperties.FileAttributes, DefaultFileAttributes }, + { DataMovementConstants.ResourceProperties.CreationTime, DefaultFileCreatedOn }, + { DataMovementConstants.ResourceProperties.LastWrittenOn, DefaultLastWrittenOn }, + { DataMovementConstants.ResourceProperties.ChangedOnTime, DefaultFileChangedOn }, + { DataMovementConstants.ResourceProperties.Metadata, DefaultFileMetadata }, + { DataMovementConstants.ResourceProperties.SourceFilePermissionKey, DefaultFilePermissionKey }, + { DataMovementConstants.ResourceProperties.DestinationFilePermissionKey, DefaultDestinationFilePermissionKey } + }); + + // Act + await destinationResource.CreateAsync( + overwrite: false, + maxSize: length, + properties: properties, + cancellationToken: CancellationToken.None); + + mockDestination.Verify(b => b.CreateAsync( + length, + It.Is(headers => + headers.CacheControl == DefaultCacheControl && + headers.ContentDisposition == DefaultContentDisposition && + headers.ContentEncoding == DefaultContentEncoding && + headers.ContentType == DefaultContentType), + DefaultFileMetadata, + It.Is(properties => + properties.FileCreatedOn == DefaultFileCreatedOn && + properties.FileLastWrittenOn == DefaultLastWrittenOn && + properties.FileChangedOn == DefaultFileChangedOn && + properties.FilePermissionKey == DefaultDestinationFilePermissionKey), + default, + It.IsAny(), + It.IsAny()), + Times.Once()); + mockDestination.Verify(b => b.ExistsAsync( + It.IsAny()), + Times.Once()); + mockDestination.VerifyNoOtherCalls(); + } } } diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareFileStartTransferCopyTests.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareFileStartTransferCopyTests.cs index 92969bb4cde24..6f239e2cac1a4 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareFileStartTransferCopyTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareFileStartTransferCopyTests.cs @@ -13,6 +13,9 @@ using NUnit.Framework; using Azure.Storage.Files.Shares.Models; using Azure.Storage.Test; +using System.Threading; +using Azure.Storage.Files.Shares.Specialized; +using Azure.Storage.Sas; using Metadata = System.Collections.Generic.IDictionary; namespace Azure.Storage.DataMovement.Files.Shares.Tests @@ -32,9 +35,13 @@ public class ShareFileStartTransferCopyTests : StartTransferCopyTestBase private const string _fileResourcePrefix = "test-file-"; private const string _expectedOverwriteExceptionMessage = "Cannot overwrite file."; private const string _defaultContentType = "text/plain"; - private const string _defaultContentLanguage = "en-US"; + private readonly string[] _defaultContentLanguage = new[] { "en-US", "en-CA" }; private const string _defaultContentDisposition = "inline"; private const string _defaultCacheControl = "no-cache"; + private const string _defaultShortPermissions = "O:SYG:SYD:(A;;FA;;;BA)(A;;FA;;;SY)(A;;0x1200a9;;;BU)(A;;0x1301bf;;;AU)(A;;FA;;;SY)"; + private const string _defaultPermissions = "O:S-1-5-21-2127521184-1604012920-1887927527-21560751G:S-1-5-21-2127521184-1604012920-1887927527-513D:AI(A;;FA;;;SY)(A;;FA;;;BA)(A;;0x1200a9;;;S-1-5-21-397955417-626881126-188441444-3053964)S:NO_ACCESS_CONTROL"; + private const NtfsFileAttributes _defaultFileAttributes = NtfsFileAttributes.None; + private const NtfsFileAttributes _defaultDirectoryAttributes = NtfsFileAttributes.Directory; private readonly Metadata _defaultMetadata = DataProvider.BuildMetadata(); private readonly DateTimeOffset _defaultFileCreatedOn = new DateTimeOffset(2024, 4, 1, 9, 5, 55, default); private readonly DateTimeOffset _defaultFileLastWrittenOn = new DateTimeOffset(2024, 4, 1, 12, 16, 6, default); @@ -61,13 +68,14 @@ protected override async Task> GetSourceDisposi protected override async Task> GetDestinationDisposingContainerAsync(ShareServiceClient service = null, string containerName = null) => await DestinationClientBuilder.GetTestShareAsync(service, containerName); - private async Task CreateFileClientAsync( + private async Task CreateFileClientWithShortPermissionsAsync( ShareClient container, long? objectLength = null, bool createResource = false, string objectName = null, ShareClientOptions options = null, - Stream contents = null) + Stream contents = null, + TransferPropertiesTestType propertiesType = TransferPropertiesTestType.Default) { objectName ??= GetNewObjectName(); ShareFileClient fileClient = container.GetRootDirectoryClient().GetFileClient(objectName); @@ -77,15 +85,94 @@ private async Task CreateFileClientAsync( { throw new InvalidOperationException($"Cannot create share file without size specified. Either set {nameof(createResource)} to false or specify a {nameof(objectLength)}."); } - await fileClient.CreateAsync(objectLength.Value); + string permissions = default; + if (propertiesType == TransferPropertiesTestType.Preserve) + { + permissions = _defaultPermissions; + } + await fileClient.CreateAsync( + maxSize: objectLength.Value, + httpHeaders: new ShareFileHttpHeaders() + { + ContentLanguage = _defaultContentLanguage, + ContentDisposition = _defaultContentDisposition, + CacheControl = _defaultCacheControl + }, + metadata: _defaultMetadata, + smbProperties: new FileSmbProperties() + { + FileAttributes = _defaultFileAttributes, + FileCreatedOn = _defaultFileCreatedOn, + FileChangedOn = _defaultFileChangedOn, + FileLastWrittenOn = _defaultFileLastWrittenOn, + }, + filePermission: permissions); + + if (contents != default) + { + await fileClient.UploadAsync(contents); + } + } + Uri containerSas = container.GenerateSasUri(ShareSasPermissions.All, Recording.UtcNow.AddDays(1)); + ShareUriBuilder sasBuilder = new ShareUriBuilder(containerSas) + { + DirectoryOrFilePath = fileClient.Path + }; + return InstrumentClient(new ShareFileClient(sasBuilder.ToUri(), GetOptions())); + } + + private async Task CreateFileClientWithPermissionKeyAsync( + ShareClient container, + long? objectLength = null, + bool createResource = false, + string objectName = null, + ShareClientOptions options = null, + Stream contents = null, + TransferPropertiesTestType propertiesType = TransferPropertiesTestType.Default) + { + objectName ??= GetNewObjectName(); + ShareFileClient fileClient = container.GetRootDirectoryClient().GetFileClient(objectName); + if (createResource) + { + if (!objectLength.HasValue) + { + throw new InvalidOperationException($"Cannot create share file without size specified. Either set {nameof(createResource)} to false or specify a {nameof(objectLength)}."); + } + string permissionKey = default; + if (propertiesType == TransferPropertiesTestType.Preserve) + { + PermissionInfo permissionInfo = await container.CreatePermissionAsync(_defaultPermissions); + permissionKey = permissionInfo.FilePermissionKey; + } + await fileClient.CreateAsync( + maxSize: objectLength.Value, + httpHeaders: new ShareFileHttpHeaders() + { + ContentLanguage = _defaultContentLanguage, + ContentDisposition = _defaultContentDisposition, + CacheControl = _defaultCacheControl + }, + metadata: _defaultMetadata, + smbProperties: new FileSmbProperties() + { + FileAttributes = _defaultFileAttributes, + FilePermissionKey = permissionKey, + FileCreatedOn = _defaultFileCreatedOn, + FileChangedOn = _defaultFileChangedOn, + FileLastWrittenOn = _defaultFileLastWrittenOn, + }); if (contents != default) { await fileClient.UploadAsync(contents); } } - Uri sourceUri = fileClient.GenerateSasUri(Sas.ShareFileSasPermissions.All, Recording.UtcNow.AddDays(1)); - return InstrumentClient(new ShareFileClient(sourceUri, GetOptions())); + Uri containerSas = container.GenerateSasUri(ShareSasPermissions.All, Recording.UtcNow.AddDays(1)); + ShareUriBuilder sasBuilder = new ShareUriBuilder(containerSas) + { + DirectoryOrFilePath = fileClient.Path + }; + return InstrumentClient(new ShareFileClient(sasBuilder.ToUri(), GetOptions())); } protected override Task GetSourceObjectClientAsync( @@ -96,7 +183,7 @@ protected override Task GetSourceObjectClientAsync( ShareClientOptions options = null, Stream contents = null, TransferPropertiesTestType propertiesTestType = default) - => CreateFileClientAsync( + => CreateFileClientWithPermissionKeyAsync( container, objectLength, createResource, @@ -117,7 +204,7 @@ protected override Task GetDestinationObjectClientAsync( string objectName = null, ShareClientOptions options = null, Stream contents = null) - => CreateFileClientAsync( + => CreateFileClientWithPermissionKeyAsync( container, objectLength, createResource, @@ -128,7 +215,55 @@ protected override Task GetDestinationObjectClientAsync( protected override StorageResourceItem GetDestinationStorageResourceItem( ShareFileClient objectClient, TransferPropertiesTestType type = TransferPropertiesTestType.Default) - => new ShareFileStorageResource(objectClient); + { + ShareFileStorageResourceOptions options = default; + if (type == TransferPropertiesTestType.NewProperties) + { + options = new ShareFileStorageResourceOptions + { + ContentDisposition = new(_defaultContentDisposition), + ContentLanguage = new(_defaultContentLanguage), + CacheControl = new(_defaultCacheControl), + ContentType = new(_defaultContentType), + FileMetadata = new(_defaultMetadata), + FileAttributes = new(_defaultFileAttributes), + FileCreatedOn = new(_defaultFileCreatedOn), + FileChangedOn = new(_defaultFileChangedOn), + FileLastWrittenOn = new(_defaultFileLastWrittenOn) + }; + } + else if (type == TransferPropertiesTestType.NoPreserve) + { + options = new ShareFileStorageResourceOptions + { + ContentDisposition = new(false), + ContentLanguage = new(false), + CacheControl = new(false), + ContentType = new(false), + FileMetadata = new(false), + FileAttributes = new(false), + FileCreatedOn = new(false), + FileLastWrittenOn = new(false), + FilePermissions = new(false) + }; + } + else if (type == TransferPropertiesTestType.Preserve) + { + options = new ShareFileStorageResourceOptions + { + ContentDisposition = new(true), + ContentLanguage = new(true), + CacheControl = new(true), + ContentType = new(true), + FileMetadata = new(true), + FileAttributes = new(true), + FileCreatedOn = new(true), + FileLastWrittenOn = new(true), + FilePermissions = new(true) + }; + } + return new ShareFileStorageResource(objectClient, options); + } protected override Task DestinationOpenReadAsync(ShareFileClient objectClient) => objectClient.OpenReadAsync(); @@ -193,8 +328,7 @@ protected override async Task VerifyPropertiesCopyAsync( Assert.AreEqual(_defaultFileLastWrittenOn, destinationProperties.SmbProperties.FileLastWrittenOn); Assert.AreEqual(_defaultFileChangedOn, destinationProperties.SmbProperties.FileChangedOn); } - else //(transferPropertiesTestType == TransferPropertiesTestType.Default || - //transferPropertiesTestType == TransferPropertiesTestType.Preserve) + else if (transferPropertiesTestType == TransferPropertiesTestType.Preserve) { ShareFileProperties sourceProperties = await sourceClient.GetPropertiesAsync(); ShareFileProperties destinationProperties = await destinationClient.GetPropertiesAsync(); @@ -207,6 +341,202 @@ protected override async Task VerifyPropertiesCopyAsync( Assert.AreEqual(sourceProperties.SmbProperties.FileCreatedOn, destinationProperties.SmbProperties.FileCreatedOn); Assert.AreEqual(sourceProperties.SmbProperties.FileLastWrittenOn, destinationProperties.SmbProperties.FileLastWrittenOn); Assert.AreEqual(sourceProperties.SmbProperties.FileChangedOn, destinationProperties.SmbProperties.FileChangedOn); + + // Check if the permissions are the same. Permission Keys will be different as they are defined by the share service. + ShareClient sourceShareClient = sourceClient.GetParentShareClient(); + string sourcePermission = await sourceShareClient.GetPermissionAsync(sourceProperties.SmbProperties.FilePermissionKey); + + ShareClient parentDestinationClient = destinationClient.GetParentShareClient(); + string fullPermission = await parentDestinationClient.GetPermissionAsync(destinationProperties.SmbProperties.FilePermissionKey); + Assert.AreEqual(sourcePermission, fullPermission); + } + else // Default properties + { + ShareFileProperties sourceProperties = await sourceClient.GetPropertiesAsync(); + ShareFileProperties destinationProperties = await destinationClient.GetPropertiesAsync(); + + Assert.That(sourceProperties.Metadata, Is.EqualTo(destinationProperties.Metadata)); + Assert.AreEqual(sourceProperties.ContentDisposition, destinationProperties.ContentDisposition); + Assert.AreEqual(sourceProperties.ContentLanguage, destinationProperties.ContentLanguage); + Assert.AreEqual(sourceProperties.CacheControl, destinationProperties.CacheControl); + Assert.AreEqual(sourceProperties.ContentType, destinationProperties.ContentType); + Assert.AreEqual(sourceProperties.SmbProperties.FileCreatedOn, destinationProperties.SmbProperties.FileCreatedOn); + Assert.AreEqual(sourceProperties.SmbProperties.FileLastWrittenOn, destinationProperties.SmbProperties.FileLastWrittenOn); + Assert.AreEqual(sourceProperties.SmbProperties.FileChangedOn, destinationProperties.SmbProperties.FileChangedOn); + } + } + + private async Task CopyRemoteObjects_VerifyProperties( + ShareClient sourceContainer, + ShareClient destinationContainer, + TransferPropertiesTestType propertiesType) + { + // Create file with properties + ShareFileClient sourceClient = await CreateFileClientWithPermissionKeyAsync( + container: sourceContainer, + objectLength: 0, + createResource: true, + propertiesType: propertiesType); + StorageResourceItem sourceResource = GetSourceStorageResourceItem(sourceClient); + + // Destination client - Set Properties + ShareFileClient destinationClient = await GetDestinationObjectClientAsync( + container: destinationContainer, + createResource: false); + StorageResourceItem destinationResource = GetDestinationStorageResourceItem( + destinationClient, + type: propertiesType); + + DataTransferOptions options = new DataTransferOptions(); + TestEventsRaised testEventsRaised = new TestEventsRaised(options); + TransferManager transferManager = new TransferManager(); + + // Act - Start transfer and await for completion. + DataTransfer transfer = await transferManager.StartTransferAsync( + sourceResource, + destinationResource, + options); + CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30)); + await TestTransferWithTimeout.WaitForCompletionAsync( + transfer, + testEventsRaised, + cancellationTokenSource.Token); + + // Assert + await VerifyPropertiesCopyAsync( + transfer, + propertiesType, + testEventsRaised, + sourceClient, + destinationClient); + } + + [RecordedTest] + public async Task ShareFileToShareFile_PermissionKeyDefault() + { + // Arrange + await using IDisposingContainer source = await GetSourceDisposingContainerAsync(); + await using IDisposingContainer destination = await GetDestinationDisposingContainerAsync(); + + await CopyRemoteObjects_VerifyProperties( + source.Container, + destination.Container, + TransferPropertiesTestType.Default); + } + + [RecordedTest] + public async Task ShareFileToShareFile_PermissionKeyPreserve() + { + // Arrange + await using IDisposingContainer source = await GetSourceDisposingContainerAsync(); + await using IDisposingContainer destination = await GetDestinationDisposingContainerAsync(); + + await CopyRemoteObjects_VerifyProperties( + source.Container, + destination.Container, + TransferPropertiesTestType.Preserve); + } + + [RecordedTest] + public async Task ShareFileToShareFile_PermissionKeyNoPreserve() + { + // Arrange + await using IDisposingContainer source = await GetSourceDisposingContainerAsync(); + await using IDisposingContainer destination = await GetDestinationDisposingContainerAsync(); + + await CopyRemoteObjects_VerifyProperties( + source.Container, + destination.Container, + TransferPropertiesTestType.NoPreserve); + } + + [RecordedTest] + [TestCase(TransferPropertiesTestType.NewProperties)] + [TestCase(TransferPropertiesTestType.Preserve)] + public async Task ShareFileToShareFile_PermissionValue(TransferPropertiesTestType propertiesType) + { + // Arrange + await using IDisposingContainer source = await GetSourceDisposingContainerAsync(); + await using IDisposingContainer destination = await GetDestinationDisposingContainerAsync(); + + // Create file with properties + ShareFileClient sourceClient = await CreateFileClientWithShortPermissionsAsync( + container: source.Container, + objectLength: 0, + createResource: true, + propertiesType: propertiesType); + StorageResourceItem sourceResource = GetSourceStorageResourceItem(sourceClient); + + // Destination client - Set Properties + ShareFileClient destinationClient = await GetDestinationObjectClientAsync( + container: destination.Container, + createResource: false); + StorageResourceItem destinationResource = GetDestinationStorageResourceItem( + destinationClient, + type: propertiesType); + + DataTransferOptions options = new DataTransferOptions(); + TestEventsRaised testEventsRaised = new TestEventsRaised(options); + TransferManager transferManager = new TransferManager(); + + // Act - Start transfer and await for completion. + DataTransfer transfer = await transferManager.StartTransferAsync( + sourceResource, + destinationResource, + options); + CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30)); + await TestTransferWithTimeout.WaitForCompletionAsync( + transfer, + testEventsRaised, + cancellationTokenSource.Token); + + // Assert + Assert.NotNull(transfer); + Assert.IsTrue(transfer.HasCompleted); + Assert.AreEqual(DataTransferState.Completed, transfer.TransferStatus.State); + // Verify Copy - using original source File and Copying the destination + await testEventsRaised.AssertSingleCompletedCheck(); + using Stream sourceStream = await sourceClient.OpenReadAsync(); + using Stream destinationStream = await destinationClient.OpenReadAsync(); + Assert.AreEqual(sourceStream, destinationStream); + if (propertiesType == TransferPropertiesTestType.NewProperties) + { + ShareFileProperties destinationProperties = await destinationClient.GetPropertiesAsync(); + + Assert.That(_defaultMetadata, Is.EqualTo(destinationProperties.Metadata)); + Assert.AreEqual(_defaultContentDisposition, destinationProperties.ContentDisposition); + Assert.AreEqual(_defaultContentLanguage, destinationProperties.ContentLanguage); + Assert.AreEqual(_defaultCacheControl, destinationProperties.CacheControl); + Assert.AreEqual(_defaultContentType, destinationProperties.ContentType); + Assert.AreEqual(_defaultFileCreatedOn, destinationProperties.SmbProperties.FileCreatedOn); + Assert.AreEqual(_defaultFileLastWrittenOn, destinationProperties.SmbProperties.FileLastWrittenOn); + Assert.AreEqual(_defaultFileChangedOn, destinationProperties.SmbProperties.FileChangedOn); + + ShareClient parentDestinationClient = destinationClient.GetParentShareClient(); + string actualPermissions = await parentDestinationClient.GetPermissionAsync(destinationProperties.SmbProperties.FilePermissionKey); + Assert.AreEqual(_defaultShortPermissions, actualPermissions); + } + else if (propertiesType == TransferPropertiesTestType.Preserve) + { + ShareFileProperties sourceProperties = await sourceClient.GetPropertiesAsync(); + ShareFileProperties destinationProperties = await destinationClient.GetPropertiesAsync(); + + Assert.That(sourceProperties.Metadata, Is.EqualTo(destinationProperties.Metadata)); + Assert.AreEqual(sourceProperties.ContentDisposition, destinationProperties.ContentDisposition); + Assert.AreEqual(sourceProperties.ContentLanguage, destinationProperties.ContentLanguage); + Assert.AreEqual(sourceProperties.CacheControl, destinationProperties.CacheControl); + Assert.AreEqual(sourceProperties.ContentType, destinationProperties.ContentType); + Assert.AreEqual(sourceProperties.SmbProperties.FileCreatedOn, destinationProperties.SmbProperties.FileCreatedOn); + Assert.AreEqual(sourceProperties.SmbProperties.FileLastWrittenOn, destinationProperties.SmbProperties.FileLastWrittenOn); + Assert.AreEqual(sourceProperties.SmbProperties.FileChangedOn, destinationProperties.SmbProperties.FileChangedOn); + + // Check if the permissions are the same. Permission Keys will be different as they are defined by the share service. + ShareClient sourceShareClient = sourceClient.GetParentShareClient(); + string sourcePermission = await sourceShareClient.GetPermissionAsync(sourceProperties.SmbProperties.FilePermissionKey); + + ShareClient parentDestinationClient = destinationClient.GetParentShareClient(); + string fullPermission = await parentDestinationClient.GetPermissionAsync(destinationProperties.SmbProperties.FilePermissionKey); + Assert.AreEqual(sourcePermission, fullPermission); } } } diff --git a/sdk/storage/Azure.Storage.DataMovement/api/Azure.Storage.DataMovement.net6.0.cs b/sdk/storage/Azure.Storage.DataMovement/api/Azure.Storage.DataMovement.net6.0.cs index 25dca7aca1806..3770f3de574b0 100644 --- a/sdk/storage/Azure.Storage.DataMovement/api/Azure.Storage.DataMovement.net6.0.cs +++ b/sdk/storage/Azure.Storage.DataMovement/api/Azure.Storage.DataMovement.net6.0.cs @@ -71,7 +71,7 @@ protected internal DataTransferProperties() { } public virtual System.Uri SourceUri { get { throw null; } } public virtual string TransferId { get { throw null; } } } - public abstract partial class DataTransferProperty + public partial class DataTransferProperty { public DataTransferProperty() { } public DataTransferProperty(bool preserve) { } @@ -155,7 +155,7 @@ protected StorageResourceContainer() { } protected internal abstract System.Threading.Tasks.Task CreateIfNotExistsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); protected internal abstract Azure.Storage.DataMovement.StorageResourceContainer GetChildStorageResourceContainer(string path); protected internal abstract Azure.Storage.DataMovement.StorageResourceItem GetStorageResourceReference(string path, string resourceId); - protected internal abstract System.Collections.Generic.IAsyncEnumerable GetStorageResourcesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + protected internal abstract System.Collections.Generic.IAsyncEnumerable GetStorageResourcesAsync(Azure.Storage.DataMovement.StorageResourceContainer destinationContainer = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); } public partial class StorageResourceCopyFromUriOptions { @@ -178,7 +178,7 @@ protected StorageResourceItem() { } protected internal abstract long? Length { get; } protected internal abstract long MaxSupportedChunkSize { get; } protected internal abstract string ResourceId { get; } - protected Azure.Storage.DataMovement.StorageResourceItemProperties ResourceProperties { get { throw null; } set { } } + protected internal Azure.Storage.DataMovement.StorageResourceItemProperties ResourceProperties { get { throw null; } set { } } protected internal abstract Azure.Storage.DataMovement.DataTransferOrder TransferType { get; } protected internal abstract System.Threading.Tasks.Task CompleteTransferAsync(bool overwrite, Azure.Storage.DataMovement.StorageResourceCompleteTransferOptions completeTransferOptions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); protected internal abstract System.Threading.Tasks.Task CopyBlockFromUriAsync(Azure.Storage.DataMovement.StorageResourceItem sourceResource, Azure.HttpRange range, bool overwrite, long completeLength, Azure.Storage.DataMovement.StorageResourceCopyFromUriOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); @@ -186,8 +186,10 @@ protected StorageResourceItem() { } protected internal abstract System.Threading.Tasks.Task CopyFromUriAsync(Azure.Storage.DataMovement.StorageResourceItem sourceResource, bool overwrite, long completeLength, Azure.Storage.DataMovement.StorageResourceCopyFromUriOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); protected internal abstract System.Threading.Tasks.Task DeleteIfExistsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); protected internal abstract System.Threading.Tasks.Task GetCopyAuthorizationHeaderAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + protected internal abstract System.Threading.Tasks.Task GetPermissionsAsync(Azure.Storage.DataMovement.StorageResourceItemProperties properties = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); protected internal abstract System.Threading.Tasks.Task GetPropertiesAsync(System.Threading.CancellationToken token = default(System.Threading.CancellationToken)); protected internal abstract System.Threading.Tasks.Task ReadStreamAsync(long position = (long)0, long? length = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + protected internal abstract System.Threading.Tasks.Task SetPermissionsAsync(Azure.Storage.DataMovement.StorageResourceItem sourceResource, Azure.Storage.DataMovement.StorageResourceItemProperties sourceProperties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); } public partial class StorageResourceItemProperties { diff --git a/sdk/storage/Azure.Storage.DataMovement/api/Azure.Storage.DataMovement.netstandard2.0.cs b/sdk/storage/Azure.Storage.DataMovement/api/Azure.Storage.DataMovement.netstandard2.0.cs index 25dca7aca1806..3770f3de574b0 100644 --- a/sdk/storage/Azure.Storage.DataMovement/api/Azure.Storage.DataMovement.netstandard2.0.cs +++ b/sdk/storage/Azure.Storage.DataMovement/api/Azure.Storage.DataMovement.netstandard2.0.cs @@ -71,7 +71,7 @@ protected internal DataTransferProperties() { } public virtual System.Uri SourceUri { get { throw null; } } public virtual string TransferId { get { throw null; } } } - public abstract partial class DataTransferProperty + public partial class DataTransferProperty { public DataTransferProperty() { } public DataTransferProperty(bool preserve) { } @@ -155,7 +155,7 @@ protected StorageResourceContainer() { } protected internal abstract System.Threading.Tasks.Task CreateIfNotExistsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); protected internal abstract Azure.Storage.DataMovement.StorageResourceContainer GetChildStorageResourceContainer(string path); protected internal abstract Azure.Storage.DataMovement.StorageResourceItem GetStorageResourceReference(string path, string resourceId); - protected internal abstract System.Collections.Generic.IAsyncEnumerable GetStorageResourcesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + protected internal abstract System.Collections.Generic.IAsyncEnumerable GetStorageResourcesAsync(Azure.Storage.DataMovement.StorageResourceContainer destinationContainer = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); } public partial class StorageResourceCopyFromUriOptions { @@ -178,7 +178,7 @@ protected StorageResourceItem() { } protected internal abstract long? Length { get; } protected internal abstract long MaxSupportedChunkSize { get; } protected internal abstract string ResourceId { get; } - protected Azure.Storage.DataMovement.StorageResourceItemProperties ResourceProperties { get { throw null; } set { } } + protected internal Azure.Storage.DataMovement.StorageResourceItemProperties ResourceProperties { get { throw null; } set { } } protected internal abstract Azure.Storage.DataMovement.DataTransferOrder TransferType { get; } protected internal abstract System.Threading.Tasks.Task CompleteTransferAsync(bool overwrite, Azure.Storage.DataMovement.StorageResourceCompleteTransferOptions completeTransferOptions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); protected internal abstract System.Threading.Tasks.Task CopyBlockFromUriAsync(Azure.Storage.DataMovement.StorageResourceItem sourceResource, Azure.HttpRange range, bool overwrite, long completeLength, Azure.Storage.DataMovement.StorageResourceCopyFromUriOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); @@ -186,8 +186,10 @@ protected StorageResourceItem() { } protected internal abstract System.Threading.Tasks.Task CopyFromUriAsync(Azure.Storage.DataMovement.StorageResourceItem sourceResource, bool overwrite, long completeLength, Azure.Storage.DataMovement.StorageResourceCopyFromUriOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); protected internal abstract System.Threading.Tasks.Task DeleteIfExistsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); protected internal abstract System.Threading.Tasks.Task GetCopyAuthorizationHeaderAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + protected internal abstract System.Threading.Tasks.Task GetPermissionsAsync(Azure.Storage.DataMovement.StorageResourceItemProperties properties = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); protected internal abstract System.Threading.Tasks.Task GetPropertiesAsync(System.Threading.CancellationToken token = default(System.Threading.CancellationToken)); protected internal abstract System.Threading.Tasks.Task ReadStreamAsync(long position = (long)0, long? length = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + protected internal abstract System.Threading.Tasks.Task SetPermissionsAsync(Azure.Storage.DataMovement.StorageResourceItem sourceResource, Azure.Storage.DataMovement.StorageResourceItemProperties sourceProperties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); } public partial class StorageResourceItemProperties { diff --git a/sdk/storage/Azure.Storage.DataMovement/src/DataTransferProperty.cs b/sdk/storage/Azure.Storage.DataMovement/src/DataTransferProperty.cs index 30d379a4d4fdb..01ba612d57e3f 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/DataTransferProperty.cs +++ b/sdk/storage/Azure.Storage.DataMovement/src/DataTransferProperty.cs @@ -10,7 +10,7 @@ namespace Azure.Storage.DataMovement /// /// Represents a property on the storage resource. /// - public abstract class DataTransferProperty + public class DataTransferProperty { internal bool _preserve; diff --git a/sdk/storage/Azure.Storage.DataMovement/src/LocalDirectoryStorageResourceContainer.cs b/sdk/storage/Azure.Storage.DataMovement/src/LocalDirectoryStorageResourceContainer.cs index a2c5cfd01b617..35fa3146ac958 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/LocalDirectoryStorageResourceContainer.cs +++ b/sdk/storage/Azure.Storage.DataMovement/src/LocalDirectoryStorageResourceContainer.cs @@ -65,10 +65,12 @@ protected internal override StorageResourceItem GetStorageResourceReference(stri /// /// Lists storage resource in the filesystem. /// + /// /// /// #pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously protected internal override async IAsyncEnumerable GetStorageResourcesAsync( + StorageResourceContainer destinationContainer = default, [EnumeratorCancellation] CancellationToken cancellationToken = default) #pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously { diff --git a/sdk/storage/Azure.Storage.DataMovement/src/LocalFileStorageResource.cs b/sdk/storage/Azure.Storage.DataMovement/src/LocalFileStorageResource.cs index 6949d5f08a117..bc8e208ec3922 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/LocalFileStorageResource.cs +++ b/sdk/storage/Azure.Storage.DataMovement/src/LocalFileStorageResource.cs @@ -289,5 +289,18 @@ protected internal override StorageResourceCheckpointData GetDestinationCheckpoi { return new LocalDestinationCheckpointData(); } + + // no-op for get permissions + protected internal override Task GetPermissionsAsync( + StorageResourceItemProperties properties = default, + CancellationToken cancellationToken = default) + => Task.FromResult((string)default); + + // no-op for set permissions + protected internal override Task SetPermissionsAsync( + StorageResourceItem sourceResource, + StorageResourceItemProperties sourceProperties, + CancellationToken cancellationToken = default) + => Task.CompletedTask; } } diff --git a/sdk/storage/Azure.Storage.DataMovement/src/ServiceToServiceJobPart.cs b/sdk/storage/Azure.Storage.DataMovement/src/ServiceToServiceJobPart.cs index 4dfa03df16367..1a7c3f2a357f9 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/ServiceToServiceJobPart.cs +++ b/sdk/storage/Azure.Storage.DataMovement/src/ServiceToServiceJobPart.cs @@ -184,6 +184,11 @@ public override async Task ProcessPartToChunkAsync() try { sourceProperties = await _sourceResource.GetPropertiesAsync(_cancellationToken).ConfigureAwait(false); + await _destinationResource.SetPermissionsAsync( + _sourceResource, + sourceProperties, + _cancellationToken).ConfigureAwait(false); + fileLength = sourceProperties.ResourceLength; } catch (Exception ex) diff --git a/sdk/storage/Azure.Storage.DataMovement/src/ServiceToServiceTransferJob.cs b/sdk/storage/Azure.Storage.DataMovement/src/ServiceToServiceTransferJob.cs index 826b5bb5b42df..6e1e72d99c0f7 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/ServiceToServiceTransferJob.cs +++ b/sdk/storage/Azure.Storage.DataMovement/src/ServiceToServiceTransferJob.cs @@ -141,6 +141,7 @@ private async IAsyncEnumerable GetStorageResourcesAsync() try { enumerator = _sourceResourceContainer.GetStorageResourcesAsync( + destinationContainer: _destinationResourceContainer, cancellationToken: _cancellationToken).GetAsyncEnumerator(); } catch (Exception ex) diff --git a/sdk/storage/Azure.Storage.DataMovement/src/Shared/DataMovementConstants.cs b/sdk/storage/Azure.Storage.DataMovement/src/Shared/DataMovementConstants.cs index 5f4a3c0f80640..6040d691298a3 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/Shared/DataMovementConstants.cs +++ b/sdk/storage/Azure.Storage.DataMovement/src/Shared/DataMovementConstants.cs @@ -159,9 +159,12 @@ internal static class ResourceProperties internal const string CacheControl = "CacheControl"; internal const string ETag = "ETag"; internal const string LastModified = "LastModified"; + internal const string LastWrittenOn = "LastWrittenOn"; internal const string Metadata = "Metadata"; internal const string FileAttributes = "FileAttributes"; - internal const string FilePermissionKey = "FilePermissionKey"; + internal const string FilePermissions = "FilePermissions"; + internal const string SourceFilePermissionKey = "SourceFilePermissionKey"; + internal const string DestinationFilePermissionKey = "DestinationFilePermissionKey"; } } } diff --git a/sdk/storage/Azure.Storage.DataMovement/src/Shared/StorageResourceContainerInternal.cs b/sdk/storage/Azure.Storage.DataMovement/src/Shared/StorageResourceContainerInternal.cs index 1e58fa5ce5711..9a7eb8e6ae6a7 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/Shared/StorageResourceContainerInternal.cs +++ b/sdk/storage/Azure.Storage.DataMovement/src/Shared/StorageResourceContainerInternal.cs @@ -16,8 +16,9 @@ namespace Azure.Storage.DataMovement internal abstract class StorageResourceContainerInternal : StorageResourceContainer { internal IAsyncEnumerable GetStorageResourcesInternalAsync( + StorageResourceContainer destinationContainer = default, CancellationToken cancellationToken = default) - => GetStorageResourcesAsync(cancellationToken); + => GetStorageResourcesAsync(destinationContainer, cancellationToken); internal StorageResourceItem GetStorageResourceReferenceInternal(string path, string resourceId) => GetStorageResourceReference(path, resourceId); diff --git a/sdk/storage/Azure.Storage.DataMovement/src/Shared/StorageResourceItemInternal.cs b/sdk/storage/Azure.Storage.DataMovement/src/Shared/StorageResourceItemInternal.cs index 1c50f4681745f..c600545d9b773 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/Shared/StorageResourceItemInternal.cs +++ b/sdk/storage/Azure.Storage.DataMovement/src/Shared/StorageResourceItemInternal.cs @@ -78,5 +78,14 @@ internal Task ReadStreamInternalAsync( long? length = null, CancellationToken cancellationToken = default) => ReadStreamAsync(position, length, cancellationToken); + + internal StorageResourceItemProperties GetResourceProperties() + => ResourceProperties; + + internal Task GetPermissionsInternalAsync(StorageResourceItemProperties sourceProperties = default) + => GetPermissionsAsync(sourceProperties); + + internal Task SetPermissionsInternalAsync(StorageResourceItem sourceResource, StorageResourceItemProperties sourceProperties) + => SetPermissionsAsync(sourceResource, sourceProperties); } } diff --git a/sdk/storage/Azure.Storage.DataMovement/src/StorageResourceContainer.cs b/sdk/storage/Azure.Storage.DataMovement/src/StorageResourceContainer.cs index 2849ac5d1ce64..7ad733f237b41 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/StorageResourceContainer.cs +++ b/sdk/storage/Azure.Storage.DataMovement/src/StorageResourceContainer.cs @@ -21,6 +21,7 @@ protected StorageResourceContainer() { } /// Lists all the child storage resources in the path. /// protected internal abstract IAsyncEnumerable GetStorageResourcesAsync( + StorageResourceContainer destinationContainer = default, CancellationToken cancellationToken = default); /// diff --git a/sdk/storage/Azure.Storage.DataMovement/src/StorageResourceItem.cs b/sdk/storage/Azure.Storage.DataMovement/src/StorageResourceItem.cs index b79a190b8f604..624b30ce8244a 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/StorageResourceItem.cs +++ b/sdk/storage/Azure.Storage.DataMovement/src/StorageResourceItem.cs @@ -47,7 +47,7 @@ protected StorageResourceItem() { } /// /// Properties of the Storage Resource Item. /// - protected StorageResourceItemProperties ResourceProperties { get; set; } + protected internal StorageResourceItemProperties ResourceProperties { get; set; } /// /// Consumes the readable stream to upload @@ -151,6 +151,22 @@ protected internal abstract Task CopyBlockFromUriAsync( /// Returns the properties of the Storage Resource. See protected internal abstract Task GetPropertiesAsync(CancellationToken token = default); + /// + /// Gets the Permissions of a storage resource. + /// + /// + protected internal abstract Task GetPermissionsAsync( + StorageResourceItemProperties properties = default, CancellationToken cancellationToken = default); + + /// + /// Sets the permissions of the storage resource. + /// + /// + protected internal abstract Task SetPermissionsAsync( + StorageResourceItem sourceResource, + StorageResourceItemProperties sourceProperties, + CancellationToken cancellationToken = default); + /// /// Gets the Authorization Header for the storage resource if available. /// diff --git a/sdk/storage/Azure.Storage.DataMovement/src/StorageResourceItemProperties.cs b/sdk/storage/Azure.Storage.DataMovement/src/StorageResourceItemProperties.cs index 4cfdc16ae8329..86962aa4d546f 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/StorageResourceItemProperties.cs +++ b/sdk/storage/Azure.Storage.DataMovement/src/StorageResourceItemProperties.cs @@ -55,7 +55,7 @@ public StorageResourceItemProperties( ResourceLength = resourceLength; ETag = eTag; LastModifiedTime = lastModifiedTime; - RawProperties = properties; + RawProperties = properties != default ? properties : new(); } } } diff --git a/sdk/storage/Azure.Storage.DataMovement/tests/CleanUpTransferTests.cs b/sdk/storage/Azure.Storage.DataMovement/tests/CleanUpTransferTests.cs index dd3833f2dd959..9b7628e53ac20 100644 --- a/sdk/storage/Azure.Storage.DataMovement/tests/CleanUpTransferTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement/tests/CleanUpTransferTests.cs @@ -116,6 +116,10 @@ public async Task CleanupAfterFailureAsync() destMock.Verify(b => b.ResourceId, Times.Once()); destMock.Verify(b => b.MaxSupportedChunkSize, Times.Exactly(2)); destMock.Verify(b => b.GetDestinationCheckpointData(), Times.Once()); + destMock.Verify(b => b.SetPermissionsAsync( + sourceMock.Object, + It.IsAny(), + It.IsAny()), Times.Once()); destMock.Verify(b => b.CopyFromUriAsync( sourceMock.Object, false, @@ -155,6 +159,10 @@ public async Task ErrorThrownDuringCleanup() destMock.Verify(b => b.ResourceId, Times.Once()); destMock.Verify(b => b.MaxSupportedChunkSize, Times.Exactly(2)); destMock.Verify(b => b.GetDestinationCheckpointData(), Times.Once()); + destMock.Verify(b => b.SetPermissionsAsync( + sourceMock.Object, + It.IsAny(), + It.IsAny()), Times.Once()); destMock.Verify(b => b.CopyFromUriAsync( sourceMock.Object, false, diff --git a/sdk/storage/Azure.Storage.DataMovement/tests/MockStorageResource.cs b/sdk/storage/Azure.Storage.DataMovement/tests/MockStorageResource.cs index 0180982aff831..f783ab6c8355d 100644 --- a/sdk/storage/Azure.Storage.DataMovement/tests/MockStorageResource.cs +++ b/sdk/storage/Azure.Storage.DataMovement/tests/MockStorageResource.cs @@ -122,5 +122,18 @@ protected internal override Task CopyFromStreamAsync(Stream stream, long streamL stream.Position += streamLength; return Task.CompletedTask; } + + // no-op for get permissions + protected internal override Task GetPermissionsAsync( + StorageResourceItemProperties properties = default, + CancellationToken cancellationToken = default) + => Task.FromResult((string)default); + + // no-op for set permissions + protected internal override Task SetPermissionsAsync( + StorageResourceItem sourceResource, + StorageResourceItemProperties sourceProperties, + CancellationToken cancellationToken = default) + => Task.CompletedTask; } } diff --git a/sdk/storage/Azure.Storage.DataMovement/tests/ServiceToServiceJobPartTests.cs b/sdk/storage/Azure.Storage.DataMovement/tests/ServiceToServiceJobPartTests.cs index 586702c6393b6..b7d4f4a371735 100644 --- a/sdk/storage/Azure.Storage.DataMovement/tests/ServiceToServiceJobPartTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement/tests/ServiceToServiceJobPartTests.cs @@ -24,6 +24,7 @@ public class ServiceToServiceJobPartTests private const string DefaultContentLanguage = "en-US"; private const string DefaultContentDisposition = "inline"; private const string DefaultCacheControl = "no-cache"; + private const string DefaultSourcePermissionKey = "anlfdjsgkljWLJITflo'fu903w8ueng"; public ServiceToServiceJobPartTests() { } private Mock GetQueueChunkTask() @@ -50,17 +51,16 @@ public ServiceToServiceJobPartTests() { } private StorageResourceItemProperties GetResourceProperties(int length) { IDictionary metadata = DataProvider.BuildMetadata(); - IDictionary tags = DataProvider.BuildTags(); Dictionary sourceProperties = new() { - { "ContentType", DefaultContentType }, - { "ContentEncoding", DefaultContentEncoding }, - { "ContentLanguage", DefaultContentLanguage }, - { "ContentDisposition", DefaultContentDisposition }, - { "CacheControl", DefaultCacheControl }, - { "Metadata", metadata }, - { "Tags", tags } + { DataMovementConstants.ResourceProperties.ContentType, DefaultContentType }, + { DataMovementConstants.ResourceProperties.ContentEncoding, DefaultContentEncoding }, + { DataMovementConstants.ResourceProperties.ContentLanguage, DefaultContentLanguage }, + { DataMovementConstants.ResourceProperties.ContentDisposition, DefaultContentDisposition }, + { DataMovementConstants.ResourceProperties.CacheControl, DefaultCacheControl }, + { DataMovementConstants.ResourceProperties.Metadata, metadata }, + { DataMovementConstants.ResourceProperties.SourceFilePermissionKey, DefaultSourcePermissionKey } }; return new( resourceLength: length, @@ -135,6 +135,8 @@ public async Task ProcessPartToChunkAsync_OneShot() // Set up Destination to copy in one shot with a large chunk size and smaller total length. Mock mockDestination = GetStorageResourceItem(); + mockDestination.Setup(r => r.SetPermissionsAsync(It.IsAny(), It.IsAny(), It.IsAny())) + .Returns(Task.CompletedTask); mockDestination.Setup(resource => resource.CopyFromUriAsync(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) .Returns(Task.CompletedTask); mockDestination.Setup(r => r.MaxSupportedChunkSize).Returns(Constants.MB); @@ -170,6 +172,12 @@ await checkpointer.AddNewJobAsync( await jobPart.ProcessPartToChunkAsync(); // Verify + VerifyInvocation( + mockDestination, + resource => resource.SetPermissionsAsync( + mockSource.Object, + properties, + It.IsAny())); VerifyInvocation( mockDestination, resource => resource.CopyFromUriAsync( @@ -232,6 +240,12 @@ await checkpointer.AddNewJobAsync( await jobPart.ProcessPartToChunkAsync(); + VerifyInvocation( + mockDestination, + resource => resource.SetPermissionsAsync( + mockSource.Object, + properties, + It.IsAny())); VerifyInvocation( mockDestination, resource => resource.CopyBlockFromUriAsync( diff --git a/sdk/storage/Azure.Storage.DataMovement/tests/Shared/MemoryStorageResourceContainer.cs b/sdk/storage/Azure.Storage.DataMovement/tests/Shared/MemoryStorageResourceContainer.cs index a68d2e8848f5b..adf83f172651e 100644 --- a/sdk/storage/Azure.Storage.DataMovement/tests/Shared/MemoryStorageResourceContainer.cs +++ b/sdk/storage/Azure.Storage.DataMovement/tests/Shared/MemoryStorageResourceContainer.cs @@ -46,6 +46,7 @@ protected internal override StorageResourceItem GetStorageResourceReference(stri } protected internal override async IAsyncEnumerable GetStorageResourcesAsync( + StorageResourceContainer destinationContainer = default, [EnumeratorCancellation]CancellationToken cancellationToken = default) { foreach (StorageResource storageResource in GetStorageResources(ReturnsContainersOnEnumeration)) diff --git a/sdk/storage/Azure.Storage.DataMovement/tests/Shared/MemoryStorageResourceItem.cs b/sdk/storage/Azure.Storage.DataMovement/tests/Shared/MemoryStorageResourceItem.cs index 33b9dfa424c3a..9ab272964c936 100644 --- a/sdk/storage/Azure.Storage.DataMovement/tests/Shared/MemoryStorageResourceItem.cs +++ b/sdk/storage/Azure.Storage.DataMovement/tests/Shared/MemoryStorageResourceItem.cs @@ -92,5 +92,20 @@ protected internal override Task ReadStreamAsyn var slice = length.HasValue ? Buffer.Slice((int)position, (int)length.Value) : Buffer.Slice((int)position); return Task.FromResult(new StorageResourceReadStreamResult(new MemoryStream(slice.ToArray()))); } + + protected internal override Task GetPermissionsAsync( + StorageResourceItemProperties properties = default, + CancellationToken cancellationToken = default) + { + throw new NotImplementedException(); + } + + protected internal override Task SetPermissionsAsync( + StorageResourceItem sourceResource, + StorageResourceItemProperties sourceProperties, + CancellationToken cancellationToken = default) + { + throw new NotImplementedException(); + } } } diff --git a/sdk/storage/Azure.Storage.DataMovement/tests/Shared/StartTransferCopyTestBase.cs b/sdk/storage/Azure.Storage.DataMovement/tests/Shared/StartTransferCopyTestBase.cs index 7e0165ae8565f..8dfc73e0d1532 100644 --- a/sdk/storage/Azure.Storage.DataMovement/tests/Shared/StartTransferCopyTestBase.cs +++ b/sdk/storage/Azure.Storage.DataMovement/tests/Shared/StartTransferCopyTestBase.cs @@ -1036,7 +1036,7 @@ public virtual async Task SourceObjectToDestinationObject_NewProperties() await CopyRemoteObjects_VerifyProperties( source.Container, destination.Container, - TransferPropertiesTestType.Preserve); + TransferPropertiesTestType.NewProperties); } } } diff --git a/sdk/storage/Azure.Storage.DataMovement/tests/Shared/StartTransferDirectoryCopyTestBase.cs b/sdk/storage/Azure.Storage.DataMovement/tests/Shared/StartTransferDirectoryCopyTestBase.cs index f98606ac11a7e..fd375b3ef0b5d 100644 --- a/sdk/storage/Azure.Storage.DataMovement/tests/Shared/StartTransferDirectoryCopyTestBase.cs +++ b/sdk/storage/Azure.Storage.DataMovement/tests/Shared/StartTransferDirectoryCopyTestBase.cs @@ -37,6 +37,14 @@ public abstract class StartTransferDirectoryCopyTestBase public ClientBuilder SourceClientBuilder { get; protected set; } public ClientBuilder DestinationClientBuilder { get; protected set; } + public enum TransferPropertiesTestType + { + Default = 0, + Preserve = 1, + NoPreserve = 2, + NewProperties = 3, + } + /// /// Constructor for TransferManager.StartTransferAsync tests /// @@ -138,7 +146,10 @@ protected abstract Task> GetDes /// The container client to get the respective storage resource. /// The respective directory path of the storage resource container. /// - protected abstract StorageResourceContainer GetDestinationStorageResourceContainer(TDestinationContainerClient containerClient, string directoryPath); + protected abstract StorageResourceContainer GetDestinationStorageResourceContainer( + TDestinationContainerClient containerClient, + string directoryPath, + TransferPropertiesTestType propertiesTestType = default); /// /// Creates the directory within the source container. Will also create any parent directories if required and is a hierarchical structure. @@ -193,6 +204,7 @@ protected abstract Task VerifyResultsAsync( string sourcePrefix, TDestinationContainerClient destinationContainer, string destinationPrefix, + TransferPropertiesTestType propertiesTestType = default, CancellationToken cancellationToken = default); #endregion @@ -622,7 +634,7 @@ await CopyDirectoryAndVerifyAsync( } #region Single Concurrency - private async Task CreateDirectoryTree( + internal async Task CreateDirectoryTree( TSourceContainerClient client, string sourcePrefix, int size) From 708984591d75204cc18d8aea211d1589d69d5224 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 3 Jul 2024 14:24:05 -0400 Subject: [PATCH 009/144] Sync eng/common directory with azure-sdk-tools for PR 8528 (#44826) * Fix default value for env vars in build-test-resource-config template * Add empty pool condition --------- Co-authored-by: Ben Broderick Phillips --- eng/common/TestResources/build-test-resource-config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eng/common/TestResources/build-test-resource-config.yml b/eng/common/TestResources/build-test-resource-config.yml index c64664f852b1f..c183bf04836bd 100644 --- a/eng/common/TestResources/build-test-resource-config.yml +++ b/eng/common/TestResources/build-test-resource-config.yml @@ -8,7 +8,7 @@ parameters: # EnvVars is used to help diagnose variable conflict issues early - name: EnvVars type: object - default: null + default: {} - name: SubscriptionConfigurationFilePaths type: object default: null @@ -16,6 +16,7 @@ parameters: steps: - task: AzurePowerShell@5 displayName: Set Pipeline Subnet Info + condition: ne(variables['Pool'], '') env: ${{ parameters.EnvVars }} inputs: azureSubscription: azure-sdk-tests From 9eb93a6baabff98c9e01a48262ab7694e7f28d48 Mon Sep 17 00:00:00 2001 From: hakimms <131916587+hakimms@users.noreply.github.com> Date: Wed, 3 Jul 2024 14:20:35 -0700 Subject: [PATCH 010/144] Updated entra auth events readme (#44178) * Updated readme * Updated changelog.md * feedback changes and updated links * Updated links and feedback suggestions * Updated version and lowercase ref link * Feedback changes * Copied learn documentation to readme * Added required titles to readme * Updated structure * removed locale from urls * Feedback changes * Added required section * Feedback updates * Updated layout to match other readme files --- .../CHANGELOG.md | 5 + .../README.md | 329 +++++++++--------- ...obs.Extensions.AuthenticationEvents.csproj | 2 +- .../tests/Samples/AuthEventsTrigger.cs | 52 +++ 4 files changed, 226 insertions(+), 162 deletions(-) create mode 100644 sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/tests/Samples/AuthEventsTrigger.cs diff --git a/sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/CHANGELOG.md b/sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/CHANGELOG.md index 7946f3003ad07..936833eda6c30 100644 --- a/sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/CHANGELOG.md +++ b/sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/CHANGELOG.md @@ -1,5 +1,10 @@ # Release History +## 1.0.1 (2024-06-25) + +### Other Changes +- Updated README.md to reflect the latest changes + ## 1.0.0 (2024-05-15) ### Other Changes diff --git a/sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/README.md b/sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/README.md index 6caf6bbdc057a..66bc7de817245 100644 --- a/sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/README.md +++ b/sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/README.md @@ -8,113 +8,65 @@ The authentication events trigger for Azure Functions allows you to implement a ## Getting started +You can follow this article to start creating your function: [Create a REST API for a token issuance start event in Azure Functions](https://learn.microsoft.com/entra/identity-platform/custom-extension-tokenissuancestart-setup?tabs=visual-studio%2Cazure-portal&pivots=nuget-library) + ### Install the package -Install the authentication events trigger for Azure Functions with [NuGet](https://www.nuget.org/): +Install the Authentication Event extension with [NuGet](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents): ```dotnetcli dotnet add package Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents ``` +--- + ### Prerequisites -- **Azure Subscription:** To use Azure services, including Azure Functions, you'll need a subscription. If you do not have an existing Azure account, you may sign up for a [free trial](https://azure.microsoft.com/free/dotnet/) or use your [Visual Studio Subscription](https://visualstudio.microsoft.com/subscriptions/) benefits when you [create an account](https://account.windowsazure.com/Home/Index). +- A basic understanding of the concepts covered in [Custom authentication extensions overview](https://learn.microsoft.com/entra/identity-platform/custom-extension-overview). +- An Azure subscription with the ability to create Azure Functions. If you don't have an existing Azure account, sign up for a [free trial](https://azure.microsoft.com/free/dotnet/) or use your [Visual Studio Subscription](https://visualstudio.microsoft.com/subscriptions/) benefits when you [create an account](https://account.windowsazure.com/Home/Index). +- A Microsoft Entra ID tenant. You can use either a customer or workforce tenant for this how-to guide. +- One of the following IDEs and configurations: + - Visual Studio with [Azure Development workload for Visual Studio](https://learn.microsoft.com/dotnet/azure/configure-visual-studio) configured. + - Visual Studio Code, with the [Azure Functions](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurefunctions) extension enabled. ### Authenticate the client -When the Microsoft Entra authentication events service calls your custom extension, it sends an `Authorization` header with a `Bearer {token}`. This token represents a [service to service authentication](https://learn.microsoft.com/azure/active-directory/develop/v2-oauth2-client-creds-grant-flow) in which: - -* The '**resource**', also known as the **audience**, is the application that you register to represent your API. This is represented by the `aud` claim in the token. -* The '**client**' is a Microsoft application that represents the Microsoft Entra authentication events service. It has an `appId` value of `99045fe1-7639-4a75-9d4a-577b6ca3810f`. This is represented by: - * The `azp` claim in the token if your application `accessTokenAcceptedVersion` property is set to `2`. - * The `appid` claim in the token if your resource application's `accessTokenAcceptedVersion` property is set to `1` or `null`. - -There are three approaches to authenticating HTTP requests to your function app and validating the token. - -#### Validate tokens using Azure Functions Microsoft Entra ID authentication integration - -When running your function in production, it is **highly recommended** to use the [Azure Functions Microsoft Entra ID authentication integration](https://learn.microsoft.com/azure/app-service/configure-authentication-provider-aad#-option-2-use-an-existing-registration-created-separately) for validating incoming tokens. Set the following function [application settings](https://learn.microsoft.com/azure/azure-functions/functions-how-to-use-azure-function-app-settings?tabs=portal#settings). - -1. Go to the "Authentication" tab in your Function App -2. Click on "Add identity provider" -3. Select "Microsoft" as the identity provider -4. Select "Provide the details of an existing app registration" -5. Enter the `Application ID` of the app that represents your API in Microsoft Entra ID - -The issuer and allowed audience depends on the [`accessTokenAcceptedVersion`](https://learn.microsoft.com/azure/active-directory/develop/access-tokens) property of your application (can be found in the "Manifest" of the application). +There are three ways to set up authentication for your Azure Function: -If the `accessTokenAcceptedVersion` property is set to `2`: -6. Set the `Issuer URL to "https://login.microsoftonline.com/{tenantId}/v2.0" -7. Set an 'Allowed Audience' to the Application ID (`appId`) +- [Set up authentication in the Azure portal using environment variables](#set-up-authentication-in-the-azure-portal-using-environment-variables) (recommended) +- [Set up authentication in your code using `WebJobsAuthenticationEventsTriggerAttribute`](#set-up-authentication-in-your-code-using-webjobsauthenticationeventstriggerattribute) +- [Azure App service authentication and authorization](https://learn.microsoft.com/azure/app-service/configure-authentication-provider-aad?tabs=workforce-tenant) -If the `accessTokenAcceptedVersion` property is set to `1` or `null`: -6. Set the `Issuer URL to "https://sts.windows.net/{tenantId}/" -7. Set an 'Allowed Audience' to the Application ID URI (also known as`identifierUri`). It should be in the format of`api://{azureFunctionAppName}.azurewebsites.net/{resourceApiAppId}` or `api://{FunctionAppFullyQualifiedDomainName}/{resourceApiAppId}` if using a [custom domain name](https://learn.microsoft.com/azure/dns/dns-custom-domain#:~:text=Azure%20Function%20App%201%20Navigate%20to%20Function%20App,Custom%20domain%20text%20field%20and%20select%20Validate.%20). +By default, the code has been set up for authentication in the Azure portal using environment variables. Use the tabs below to select your preferred method of implementing environment variables, or alternatively, refer to the built-in [Azure App service authentication and authorization](https://learn.microsoft.com/azure/app-service/overview-authentication-authorization). For setting up environment variables, use the following values: -By default, the Authentication event trigger will validate that Azure Function authentication integration is configured and it will check that the **client** in the token is set to `99045fe1-7639-4a75-9d4a-577b6ca3810f` (via the `azp` or `appid` claims in the token). + | Name | Value | + | ---- | ----- | + | *AuthenticationEvents__AudienceAppId* | *Custom authentication extension app ID* which is set up in [Configure a custom claim provider for a token issuance event](https://learn.microsoft.com/entra/identity-platform/custom-extension-tokenissuancestart-configuration) | + | *AuthenticationEvents__AuthorityUrl* | • Workforce tenant `https://login.microsoftonline.com/`
• External tenant `https://.ciamlogin.com/` | + | *AuthenticationEvents__AuthorizedPartyAppId* | `99045fe1-7639-4a75-9d4a-577b6ca3810f` or another authorized party | -If you want to test your API against some other client that is not Microsoft Entra authentication events service, like using Postman, you can configure an _optional_ application setting: -* **AuthenticationEvents__CustomCallerAppId** - the guid of your desired client. If not provided, `99045fe1-7639-4a75-9d4a-577b6ca3810f` is assumed. +#### Set up authentication in the Azure portal using environment variables -#### Have the trigger validate the token +1. Sign in to the [Azure portal](https://portal.azure.com) as at least an [Application Administrator](https://learn.microsoft.com/entra/identity/role-based-access-control/permissions-reference#application-developer) or [Authentication Administrator](https://learn.microsoft.com/entra/identity/role-based-access-control/permissions-reference#authentication-administrator). +2. Navigate to the function app you created, and under **Settings**, select **Configuration**. +3. Under **Application settings**, select **New application setting** and add the environment variables from the table and their associated values. +4. Select **Save** to save the application settings. -In local environments or environments that aren't hosted in the Azure Function service, the trigger can do the token validation. Set the following application settings in the [local.settings.json](https://learn.microsoft.com/azure/azure-functions/functions-develop-local#local-settings-file) file: +#### Set up authentication in your code using `WebJobsAuthenticationEventsTriggerAttribute` -* **AuthenticationEvents__TenantId** - your tenant ID -* **AuthenticationEvents__AudienceAppId** - the same value as "Allowed audience" in option 1. -* **AuthenticationEvents__CustomCallerAppId** (_optional_) - the guid of your desired client. If not provided, `99045fe1-7639-4a75-9d4a-577b6ca3810f` is assumed. +1. Open your trigger class in your IDE. +2. Modify the `WebJobsAuthenticationEventsTriggerAttribute` include the `AuthorityUrl`, `AudienceAppId` and `AuthorizedPartyAppId` properties, as shown in the below snippet. -An example `local.settings.json` file: - -```json -{ - "IsEncrypted": false, - "Values": { - "AzureWebJobsStorage": "UseDevelopmentStorage=true", - "FUNCTIONS_WORKER_RUNTIME": "dotnet", - "AuthenticationEvents__TenantId": "8615397b-****-****-****-********06c8", - "AuthenticationEvents__AudienceAppId": "api://46f98993-****-****-****-********0038", - "AuthenticationEvents__CustomCallerAppId": "46f98993-****-****-****-********0038" - } -} +```C# Snippet:AuthEventsTriggerParameters +[FunctionName("onTokenIssuanceStart")] +public static WebJobsAuthenticationEventResponse Run( +[WebJobsAuthenticationEventsTriggerAttribute( + AudienceAppId = "", + AuthorityUrl = "", + AuthorizedPartyAppId = "")] WebJobsTokenIssuanceStartRequest request, ILogger log) ``` -#### No token validation - -If you would like to _not_ authenticate the token while in local development, set the following application settings in the [local.settings.json](https://learn.microsoft.com/azure/azure-functions/functions-develop-local#local-settings-file) file: - -* **AuthenticationEvents__BypassTokenValidation** - value of `true` will make the trigger not check for a validation of the token. - -### Quickstart - -* Visual Studio 2019 - * Start Visual Studio - * Select "Create a new project" - * In the template search area search and select "AzureAuthEventsTrigger" - * Give your project a meaningful Project Name, Location, Solution and Solution Name. - -* Visual Studio Code - * Start Visual Studio Code - * Run the command "Create Azure Authentication Events Trigger Project" via the command palette - * Follow the project creation prompts -* Please note: that on a first time run it might take awhile to download the the required packages. -* For development purpose turn of token validation for testing: -* Add the **AuthenticationEvents__BypassTokenValidation** application key to the "Values" section in the local.settings.json file and set it's value to **true**. If you do not have a local.settings.json file in your local environment, create one in the root of your Function App. - -```json -{ - "IsEncrypted": false, - "Values": { - "AzureWebJobsStorage": "UseDevelopmentStorage=true", - "FUNCTIONS_WORKER_RUNTIME": "dotnet", - "AuthenticationEvents__BypassTokenValidation": true - } -} -``` - -* Once the project is loaded, you can run the sample code and you should see the Azure functions developer's application load your end point. - ## Key concepts ### .NET SDK @@ -133,78 +85,127 @@ The authentication events trigger allows a function to be executed when an authe The authentication events trigger output binding allows a function to send authentication event actions to the Microsoft Entra event service. -## Documentation -* One the function has been published, there's some good reading about logging and metrics that can be found [here](https://learn.microsoft.com/azure/azure-functions/functions-monitor-log-analytics?tabs=csharp) +### Create and build the Azure Function app -* For API Documentation, please see the (Link TBD) -* Once this moves to preview, we except no breaking changes and would be as simple as removing the the NuGet source that points to the private preview. +The first step is to create an HTTP trigger function API using your IDE, install the required NuGet packages and copy in the sample code (found below). You can build the project and run the function to extract the local function URL. ## Examples -To Test Token Augmentation, please do the following. +The function API is the source of extra claims for your token. For the purposes of this article, we're hardcoding the values for the sample app. In production, you can fetch information about the user from external data store. -* Start Visual Studio. -* Open the project that was created in the prior step. (QuickStart) -* Run the Application. (F5) -* Once the Azure functions developer's application has started, copy the listening url that is displayed with the application starts up. -* Note: All Authentication functions are listed, in the case we have one function listener registered called "**OnTokenIssuanceStart**" -* Your function endpoint will then be a combination of the listening url and function, for example: "http://localhost:7071/runtime/webhooks/AuthenticationEvents?code=(YOUR_CODE)&function=OnTokenIssuanceStart" -* Post the following payload using something like Postman or Fiddler. -* Steps for using Postman can be found (Link TBD) +In your trigger class (i.e: _AuthEventsTrigger.cs_), add the contents of the following snippet in your main function body: -```json +```C# Snippet:AuthEventsTriggerExample +[FunctionName("onTokenIssuanceStart")] +public static WebJobsAuthenticationEventResponse Run( +[WebJobsAuthenticationEventsTriggerAttribute( + AudienceAppId = "", + AuthorityUrl = "", + AuthorizedPartyAppId = "")] WebJobsTokenIssuanceStartRequest request, ILogger log) { - "type":"microsoft.graph.authenticationEvent.TokenIssuanceStart", - "source":"/tenants/{tenantId}/applications/{resourceAppId}", - "data":{ - "@odata.type": "microsoft.graph.onTokenIssuanceStartCalloutData", - "tenantId": "30000000-0000-0000-0000-000000000003", - "authenticationEventListenerId1": "10000000-0000-0000-0000-000000000001", - "customAuthenticationExtensionId": "10000000-0000-0000-0000-000000000002", - "authenticationContext1":{ - "correlationId": "20000000-0000-0000-0000-000000000002", - "client": { - "ip": "127.0.0.1", - "locale": "en-us", - "market": "en-au" - }, - "authenticationProtocol": "OAUTH2.0", - "clientServicePrincipal": { - "id": "40000000-0000-0000-0000-000000000001", - "appId": "40000000-0000-0000-0000-000000000002", - "appDisplayName": "Test client app", - "displayName": "Test client application" - }, - "resourceServicePrincipal": { - "id": "40000000-0000-0000-0000-000000000003", - "appId": "40000000-0000-0000-0000-000000000004", - "appDisplayName": "Test resource app", - "displayName": "Test resource application" - }, - "user": { - "companyName": "Nick Gomez", - "country": "USA", - "createdDateTime": "0001-01-01T00:00:00Z", - "displayName": "Dummy display name", - "givenName": "Example", - "id": "60000000-0000-0000-0000-000000000006", - "mail": "test@example.com", - "onPremisesSamAccountName": "testadmin", - "onPremisesSecurityIdentifier": "DummySID", - "onPremisesUserPrincipalName": "Dummy Name", - "preferredDataLocation": "DummyDataLocation", - "preferredLanguage": "DummyLanguage", - "surname": "Test", - "userPrincipalName": "testadmin@example.com", - "userType": "UserTypeCloudManaged" - } + try + { + // Checks if the request is successful and did the token validation pass + if (request.RequestStatus == WebJobsAuthenticationEventsRequestStatusType.Successful) + { + // Fetches information about the user from external data store + // Add new claims to the token's response + request.Response.Actions.Add( + new WebJobsProvideClaimsForToken( + new WebJobsAuthenticationEventsTokenClaim("dateOfBirth", "01/01/2000"), + new WebJobsAuthenticationEventsTokenClaim("customRoles", "Writer", "Editor"), + new WebJobsAuthenticationEventsTokenClaim("apiVersion", "1.0.0"), + new WebJobsAuthenticationEventsTokenClaim( + "correlationId", + request.Data.AuthenticationContext.CorrelationId.ToString()))); + } + else + { + // If the request fails, such as in token validation, output the failed request status, + // such as in token validation or response validation. + log.LogInformation(request.StatusMessage); + } + return request.Completed(); + } + catch (Exception ex) + { + return request.Failed(ex); } +} +``` + +### Build and run the project locally + +It's a good idea to test the function locally before deploying it to Azure. We can use a dummy JSON body that imitates the request that Microsoft Entra ID sends to your REST API. Use your preferred API testing tool to call the function directly. + +1. In your IDE, open *local.settings.json* and replace the code with the following JSON. We can set `"AuthenticationEvents__BypassTokenValidation"` to `true` for local testing purposes. + +```json +{ + "IsEncrypted": false, + "Values": { + "AzureWebJobsStorage": "", + "AzureWebJobsSecretStorageType": "files", + "FUNCTIONS_WORKER_RUNTIME": "dotnet", + "AuthenticationEvents__BypassTokenValidation" : true } } ``` -* You should see this response: +2. Using your preferred API testing tool, create a new HTTP request and set the **HTTP method** to `POST`. +3. Use the following JSON body that imitates the request Microsoft Entra ID sends to your REST API. + +```json +{ + "type": "microsoft.graph.authenticationEvent.tokenIssuanceStart", + "source": "/tenants/30000000-0000-0000-0000-000000000003/applications/40000000-0000-0000-0000-000000000002", + "data": { + "@odata.type": "microsoft.graph.onTokenIssuanceStartCalloutData", + "tenantId": "30000000-0000-0000-0000-000000000003", + "authenticationEventListenerId": "10000000-0000-0000-0000-000000000001", + "customAuthenticationExtensionId": "10000000-0000-0000-0000-000000000002", + "authenticationContext": { + "correlationId": "20000000-0000-0000-0000-000000000002", + "client": { + "ip": "127.0.0.1", + "locale": "en-us", + "market": "en-us" + }, + "protocol": "OAUTH2.0", + "clientServicePrincipal": { + "id": "40000000-0000-0000-0000-000000000001", + "appId": "40000000-0000-0000-0000-000000000002", + "appDisplayName": "My Test application", + "displayName": "My Test application" + }, + "resourceServicePrincipal": { + "id": "40000000-0000-0000-0000-000000000003", + "appId": "40000000-0000-0000-0000-000000000004", + "appDisplayName": "My Test application", + "displayName": "My Test application" + }, + "user": { + "companyName": "Casey Jensen", + "createdDateTime": "2023-08-16T00:00:00Z", + "displayName": "Casey Jensen", + "givenName": "Casey", + "id": "60000000-0000-0000-0000-000000000006", + "mail": "casey@contoso.com", + "onPremisesSamAccountName": "Casey Jensen", + "onPremisesSecurityIdentifier": "", + "onPremisesUserPrincipalName": "Casey Jensen", + "preferredLanguage": "en-us", + "surname": "Jensen", + "userPrincipalName": "casey@contoso.com", + "userType": "Member" + } + } + } +} +``` + +4. Select **Send**, and you should receive a JSON response similar to the following: ```json { @@ -212,39 +213,43 @@ To Test Token Augmentation, please do the following. "@odata.type": "microsoft.graph.onTokenIssuanceStartResponseData", "actions": [ { - "@odata.type": "microsoft.graph.provideClaimsForToken", + "@odata.type": "microsoft.graph.tokenIssuanceStart.provideClaimsForToken", "claims": { - "DateOfBirth": "01/01/2000", - "CustomRoles": [ - "Writer", - "Editor" - ] - } - } + "customClaim1": "customClaimValue1", + "customClaim2": [ + "customClaimString1", + "customClaimString2" + ] + } + } ] } } ``` +### Deploy the function and publish to Azure + +Once it has been tested and working, deploy the function to Azure. + ## Troubleshooting -* Visual Studio Code - * If running in Visual Studio Code, you get an error along the lines of the local Azure Storage Emulator is unavailable, you can start the emulator manually.! (Note: Azure Storage emulator is now deprecated and the suggested replacement is [Azurite](https://learn.microsoft.com/azure/storage/common/storage-use-azurite?tabs=visual-studio)) +### Visual Studio Code + * If running in Visual Studio Code, you get an error along the lines of the local Azure Storage Emulator is unavailable, you can start the emulator manually. (Note: Azure Storage emulator is now deprecated and the suggested replacement is [Azurite](https://learn.microsoft.com/azure/storage/common/storage-use-azurite?tabs=visual-studio)) * If using Visual Studio Code on Mac please use [Azurite](https://learn.microsoft.com/azure/storage/common/storage-use-azurite?tabs=visual-studio) - * If you see the following error on Windows (it's a bug) when trying to run the created projected. - * This can be resolved by executing this command in powershell `Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope LocalMachine` more info on this can be found [here](https://github.com/Azure/azure-functions-core-tools/issues/1821) and [here](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7) + +### Azure function endpoint + +* To determine your published posting endpoint, combine the Azure function endpoint you created, route to the listener and listener code, the listen code can be found by navigating to your Azure function application, selecting "App Keys" and copying the value of AuthenticationEvents_extension. + * For example: "https://azureautheventstriggerdemo.azurewebsites.net/runtime/webhooks/AuthenticationEvents?code=(AuthenticationEvents_extension_key)&function=OnTokenIssuanceStart" ## Next steps +Follow [Configure a custom claim provider for a token issuance event](https://learn.microsoft.com/entra/identity-platform/custom-extension-tokenissuancestart-configuration?tabs=azure-portal%2Cworkforce-tenant) to create a custom extension that will call your function. + For more information on Azure SDK, please refer to [this website](https://azure.github.io/azure-sdk/) -## Publish +Information about logging and metrics for the deployed function can be found [here](https://learn.microsoft.com/azure/azure-functions/monitor-functions?tabs=portal) -* Follow the instruction here to create and publish your Azure Application. -* To determine your published posting endpoint, combine the azure function endpoint you created, route to the listener and listener code, the listen code can be found by navigating to your azure function application, selecting "App Keys" and copying the value of AuthenticationEvents_extension. -* For example: "https://azureautheventstriggerdemo.azurewebsites.net/runtime/webhooks/AuthenticationEvents?code=(AuthenticationEvents_extension_key)&function=OnTokenIssuanceStart" -* Make sure your production environment has the correct application settings for token authentication. -* Once again you can test the published function by posting the above payload to the new endpoint. ## Contributing @@ -266,6 +271,8 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments. +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-net%2Fsdk%2Fentra%2FMicrosoft.Azure.WebJobs.Extensions.AuthenticationEvents%2FREADME.png) + [cg]: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/resourcemanager/Azure.ResourceManager/docs/CONTRIBUTING.md [coc]: https://opensource.microsoft.com/codeofconduct/ diff --git a/sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/src/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents.csproj b/sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/src/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents.csproj index e634c3a9d3714..47299e92932aa 100644 --- a/sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/src/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents.csproj +++ b/sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/src/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents.csproj @@ -2,7 +2,7 @@ $(RequiredTargetFrameworks) true - 1.0.0 + 1.0.1 Triggers for Azure AD Authentication event custom extensions. Lets you focus on your business logic. diff --git a/sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/tests/Samples/AuthEventsTrigger.cs b/sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/tests/Samples/AuthEventsTrigger.cs new file mode 100644 index 0000000000000..f2527d0f16b0a --- /dev/null +++ b/sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/tests/Samples/AuthEventsTrigger.cs @@ -0,0 +1,52 @@ +using System; +using Microsoft.Azure.WebJobs; +using Microsoft.Extensions.Logging; +using Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents.TokenIssuanceStart; +using Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents; + +namespace AuthEventsTrigger +{ + public static class AuthEventsTrigger + { + #region Snippet:AuthEventsTriggerExample + #region Snippet:AuthEventsTriggerParameters + [FunctionName("onTokenIssuanceStart")] + public static WebJobsAuthenticationEventResponse Run( + [WebJobsAuthenticationEventsTriggerAttribute( + AudienceAppId = "", + AuthorityUrl = "", + AuthorizedPartyAppId = "")] WebJobsTokenIssuanceStartRequest request, ILogger log) + #endregion + { + try + { + // Checks if the request is successful and did the token validation pass + if (request.RequestStatus == WebJobsAuthenticationEventsRequestStatusType.Successful) + { + // Fetches information about the user from external data store + // Add new claims to the token's response + request.Response.Actions.Add( + new WebJobsProvideClaimsForToken( + new WebJobsAuthenticationEventsTokenClaim("dateOfBirth", "01/01/2000"), + new WebJobsAuthenticationEventsTokenClaim("customRoles", "Writer", "Editor"), + new WebJobsAuthenticationEventsTokenClaim("apiVersion", "1.0.0"), + new WebJobsAuthenticationEventsTokenClaim( + "correlationId", + request.Data.AuthenticationContext.CorrelationId.ToString()))); + } + else + { + // If the request fails, such as in token validation, output the failed request status, + // such as in token validation or response validation. + log.LogInformation(request.StatusMessage); + } + return request.Completed(); + } + catch (Exception ex) + { + return request.Failed(ex); + } + } + #endregion + } +} \ No newline at end of file From 7e1d1b46faea3eb98a5e6962dc811fc1032f7f10 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 3 Jul 2024 17:51:16 -0400 Subject: [PATCH 011/144] Sync eng/common directory with azure-sdk-tools for PR 8516 (#44799) * Ensure subConfigFiles is not an empty string * Skip instances where $file is an empty string --------- Co-authored-by: Daniel Jurek --- eng/common/TestResources/build-test-resource-config.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/eng/common/TestResources/build-test-resource-config.yml b/eng/common/TestResources/build-test-resource-config.yml index c183bf04836bd..56d7fa4e96ac8 100644 --- a/eng/common/TestResources/build-test-resource-config.yml +++ b/eng/common/TestResources/build-test-resource-config.yml @@ -68,6 +68,12 @@ steps: if ($subConfigFilesRaw) { $subConfigFiles = $subConfigFilesRaw | ConvertFrom-Json -AsHashtable foreach ($file in $subConfigFiles) { + # In some cases, $file could be an empty string. Get-Content will fail + # if $file is an empty string, so skip those cases. + if (!$file) { + continue + } + Write-Host "Merging sub config from file: $file" $subConfig = Get-Content $file | ConvertFrom-Json -AsHashtable $finalConfig = UpdateSubscriptionConfiguration $finalConfig $subConfig From 621c32f951ec9bdac06e2650a11683e1d7c0faec Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 3 Jul 2024 17:55:42 -0400 Subject: [PATCH 012/144] Sync eng/common directory with azure-sdk-tools for PR 8549 (#44841) * commit the file changes so that we can see them running * use standalone tool --------- Co-authored-by: Scott Beddall (from Dev Box) --- eng/common/testproxy/install-test-proxy.ps1 | 33 ++++ .../testproxy/test-proxy-standalone-tool.yml | 83 +++++++++ eng/common/testproxy/test-proxy.ps1 | 162 ++++++++++++++++++ 3 files changed, 278 insertions(+) create mode 100644 eng/common/testproxy/install-test-proxy.ps1 create mode 100644 eng/common/testproxy/test-proxy-standalone-tool.yml create mode 100644 eng/common/testproxy/test-proxy.ps1 diff --git a/eng/common/testproxy/install-test-proxy.ps1 b/eng/common/testproxy/install-test-proxy.ps1 new file mode 100644 index 0000000000000..402e5ddc8cd24 --- /dev/null +++ b/eng/common/testproxy/install-test-proxy.ps1 @@ -0,0 +1,33 @@ +<# +.SYNOPSIS +Installs a standalone version of the test-proxy for use in tests. This function is intended to be used in CI/CD pipelines, and leaves behind +the pipeline variable PROXY_EXE which contains the path to the test-proxy executable. + +.PARAMETER Version +The version of the proxy to install. Requires a full version to be provided. EG "1.0.0-dev.20240617.1" + +.PARAMETER Directory +The directory within which the test-proxy exe will exist after this function invokes. Defaults to CWD. +#> +param( + [Parameter(Mandatory = $true)] + $Version, + [Parameter(Mandatory = $true)] + $InstallDirectory +) + +. (Join-Path $PSScriptRoot test-proxy.ps1) + +Write-Host "Attempting to download and install version `"$Version`" into `"$InstallDirectory`"" + +Install-Standalone-TestProxy -Version $Version -Directory $InstallDirectory + +$PROXY_EXE = "" + +if ($IsWindows) { + $PROXY_EXE = Join-Path $InstallDirectory "Azure.Sdk.Tools.TestProxy.exe" +} else { + $PROXY_EXE = Join-Path $InstallDirectory "Azure.Sdk.Tools.TestProxy" +} +Write-Host "Downloaded test-proxy available at $PROXY_EXE." +Write-Host "##vso[task.setvariable variable=PROXY_EXE]$PROXY_EXE" diff --git a/eng/common/testproxy/test-proxy-standalone-tool.yml b/eng/common/testproxy/test-proxy-standalone-tool.yml new file mode 100644 index 0000000000000..a836427ad79e5 --- /dev/null +++ b/eng/common/testproxy/test-proxy-standalone-tool.yml @@ -0,0 +1,83 @@ +# This template sets variable PROXY_PID to be used for shutdown later. +parameters: + rootFolder: '$(Build.SourcesDirectory)' + runProxy: true + targetVersion: '' + templateRoot: '$(Build.SourcesDirectory)' + condition: true + +steps: + - pwsh: | + ${{ parameters.templateRoot }}/eng/common/scripts/trust-proxy-certificate.ps1 + displayName: 'Language Specific Certificate Trust' + condition: and(succeeded(), ${{ parameters.condition }}) + + - task: PowerShell@2 + displayName: 'Override proxy version if necessary' + condition: and(succeeded(), ${{ parameters.condition }}, ne('${{ parameters.targetVersion }}', '')) + inputs: + targetType: filePath + filePath: '${{ parameters.templateRoot }}/eng/common/testproxy/scripts/override-proxy-version.ps1' + arguments: '-TargetVersion "${{ parameters.targetVersion }}"' + pwsh: true + + - pwsh: | + $standardVersion = "${{ parameters.templateRoot }}/eng/common/testproxy/target_version.txt" + $overrideVersion = "${{ parameters.templateRoot }}/eng/target_proxy_version.txt" + + $version = $(Get-Content $standardVersion -Raw).Trim() + + if (Test-Path $overrideVersion) { + $version = $(Get-Content $overrideVersion -Raw).Trim() + } + + Write-Host "Installing test-proxy version $version" + ${{ parameters.templateRoot }}/eng/common/testproxy/install-test-proxy.ps1 -Version $version -InstallDirectory $(Build.BinariesDirectory)/test-proxy + displayName: "Install test-proxy" + condition: and(succeeded(), ${{ parameters.condition }}) + + - pwsh: | + Write-Host "##vso[task.prependpath]$(Build.BinariesDirectory)/test-proxy" + displayName: "Prepend path with test-proxy tool install location" + + - ${{ if eq(parameters.runProxy, 'true') }}: + - pwsh: | + Write-Host "##vso[task.setvariable variable=ASPNETCORE_Kestrel__Certificates__Default__Path]${{ parameters.templateRoot }}/eng/common/testproxy/dotnet-devcert.pfx" + Write-Host "##vso[task.setvariable variable=ASPNETCORE_Kestrel__Certificates__Default__Password]password" + Write-Host "##vso[task.setvariable variable=PROXY_MANUAL_START]true" + displayName: 'Configure Kestrel and PROXY_MANUAL_START Variables' + condition: and(succeeded(), ${{ parameters.condition }}) + + - pwsh: | + $Process = Start-Process $(PROXY_EXE) ` + -ArgumentList "start -u --storage-location ${{ parameters.rootFolder }}" ` + -NoNewWindow -PassThru -RedirectStandardOutput ${{ parameters.rootFolder }}/test-proxy.log + + Write-Host "##vso[task.setvariable variable=PROXY_PID]$($Process.Id)" + displayName: 'Run the testproxy - windows' + condition: and(succeeded(), eq(variables['Agent.OS'],'Windows_NT'), ${{ parameters.condition }}) + + # nohup does NOT continue beyond the current session if you use it within powershell + - bash: | + nohup $(PROXY_EXE) &>${{ parameters.rootFolder }}/test-proxy.log & + + echo $! > $(Build.SourcesDirectory)/test-proxy.pid + echo "##vso[task.setvariable variable=PROXY_PID]$(cat $(Build.SourcesDirectory)/test-proxy.pid)" + displayName: "Run the testproxy - linux/mac" + condition: and(succeeded(), ne(variables['Agent.OS'],'Windows_NT'), ${{ parameters.condition }}) + workingDirectory: "${{ parameters.rootFolder }}" + + - pwsh: | + for ($i = 0; $i -lt 10; $i++) { + try { + Invoke-WebRequest -Uri "http://localhost:5000/Admin/IsAlive" | Out-Null + exit 0 + } catch { + Write-Warning "Failed to successfully connect to test proxy. Retrying..." + Start-Sleep 6 + } + } + Write-Error "Could not connect to test proxy." + exit 1 + displayName: Test Proxy IsAlive + condition: and(succeeded(), ${{ parameters.condition }}) diff --git a/eng/common/testproxy/test-proxy.ps1 b/eng/common/testproxy/test-proxy.ps1 new file mode 100644 index 0000000000000..f1bf1eca8fd4f --- /dev/null +++ b/eng/common/testproxy/test-proxy.ps1 @@ -0,0 +1,162 @@ +Set-StrictMode -Version 4 +$AVAILABLE_TEST_PROXY_BINARIES = @{ + "Windows" = @{ + "AMD64" = @{ + "system" = "Windows" + "machine" = "AMD64" + "file_name" = "test-proxy-standalone-win-x64.zip" + "executable" = "Azure.Sdk.Tools.TestProxy.exe" + } + } + "Linux" = @{ + "X86_64" = @{ + "system" = "Linux" + "machine" = "X86_64" + "file_name" = "test-proxy-standalone-linux-x64.tar.gz" + "executable" = "Azure.Sdk.Tools.TestProxy" + } + "ARM64" = @{ + "system" = "Linux" + "machine" = "ARM64" + "file_name" = "test-proxy-standalone-linux-arm64.tar.gz" + "executable" = "Azure.Sdk.Tools.TestProxy" + } + } + "Darwin" = @{ + "X86_64" = @{ + "system" = "Darwin" + "machine" = "X86_64" + "file_name" = "test-proxy-standalone-osx-x64.zip" + "executable" = "Azure.Sdk.Tools.TestProxy" + } + "ARM64" = @{ + "system" = "Darwin" + "machine" = "ARM64" + "file_name" = "test-proxy-standalone-osx-arm64.zip" + "executable" = "Azure.Sdk.Tools.TestProxy" + } + } +} + +function Get-SystemArchitecture { + $unameOutput = uname -m + switch ($unameOutput) { + "x86_64" { return "X86_64" } + "aarch64" { return "ARM64" } + "arm64" { return "ARM64" } + default { throw "Unable to determine system architecture. uname -m returned $unameOutput." } + } +} + +function Get-Proxy-Meta () { + $ErrorActionPreferenceDefault = $ErrorActionPreference + $ErrorActionPreference = "Stop" + + $os = "unknown" + $machine = Get-SystemArchitecture + + if ($IsWindows) { + $os = "Windows" + # we only support x64 on windows, if that doesn't work the platform is unsupported + $machine = "AMD64" + } elseif ($IsLinux) { + $os = "Linux" + } elseif ($IsMacOS) { + $os = "Darwin" + } + + $ErrorActionPreference = $ErrorActionPreferenceDefault + + return $AVAILABLE_TEST_PROXY_BINARIES[$os][$machine] +} + +function Get-Proxy-Url ( + [Parameter(mandatory=$true)]$Version +) { + $systemDetails = Get-Proxy-Meta + + $file = $systemDetails.file_name + $url = "https://github.com/Azure/azure-sdk-tools/releases/download/Azure.Sdk.Tools.TestProxy_$Version/$file" + + return $url +} + +function Cleanup-Directory ($path) { + if (Test-Path -Path $path) { + Remove-Item -Path $path -Recurse -Force + } + New-Item -ItemType Directory -Path $path -Force +} + +function Is-Work-Necessary ( + [Parameter(mandatory=$true)] + $Version, + [Parameter(mandatory=$true)] + $Directory +) { + $savedVersionTxt = Join-Path $Directory "downloaded_version.txt" + if (Test-Path $savedVersionTxt) { + $result = (Get-Content -Raw $savedVersionTxt).Trim() + + if ($result -eq $Version) { + return $false + } + } + + return $true +} + +<# +.SYNOPSIS +Installs a standalone version of the test-proxy. +.PARAMETER Version +The version of the proxy to install. Requires a full version to be provided. EG "1.0.0-dev.20240617.1" +.PARAMETER Directory +The directory within which the test-proxy exe will exist after this function invokes. Defaults to "." +#> +function Install-Standalone-TestProxy ( + [Parameter(mandatory=$true)] + $Version, + $Directory="." +) { + $ErrorActionPreference = "Stop" + $systemDetails = Get-Proxy-Meta + + if (!(Test-Path $Directory) -and $Directory -ne ".") { + New-Item -ItemType Directory -Path $Directory -Force + } + + $downloadFolder = Resolve-Path $Directory + $downloadUrl = Get-Proxy-Url $Version + $downloadFile = $downloadUrl.Split('/')[-1] + $downloadLocation = Join-Path $downloadFolder $downloadFile + $savedVersionTxt = Join-Path $downloadFolder "downloaded_version.txt" + + if (Is-Work-Necessary $version $downloadFolder) { + Write-Host "Commencing installation of `"$Version`" to `"$downloadFolder`" from $downloadUrl." + Invoke-WebRequest -Uri $downloadUrl -OutFile $downloadLocation + + if ($downloadFile -like "*.zip") { + Expand-Archive -Path $downloadLocation -DestinationPath $downloadFolder -Force + } elseif ($downloadFile -like "*.tar.gz") { + tar -xzf $downloadLocation -C $downloadFolder + } else { + throw "Unsupported file format" + } + + # Remove the downloaded file after extraction + Remove-Item -Path $downloadLocation -Force + + # Record downloaded version + Set-Content -Path $savedVersionTxt -Value $Version + + # Set executable permissions if on macOS (Darwin) + $executable_path = Join-Path $downloadFolder $systemDetails.executable + if ($IsMacOS) { + chmod 755 $executable_path + } + } + else { + Write-Host "Target version `"$Version`" already present in target directory `"$downloadFolder.`"" + } +} From 316f9834294f696aa44a85bd9157ed70c1e2c499 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 4 Jul 2024 03:52:31 -0400 Subject: [PATCH 013/144] Update AutoRest C# version to 3.0.0-beta.20240703.5 (#44865) * Update Generator Version 3.0.0-beta.20240703.5 * Update SDK codes de_he_2 * Update SDK codes he_me_3 * Update SDK codes ad_co_0 * Update SDK codes st_wo_6 * Update SDK codes mi_pu_4 * Update SDK codes pu_sq_5 * Update SDK codes co_de_1 * update identity version --------- Co-authored-by: Arcturus Zhang --- eng/Packages.Data.props | 2 +- eng/emitter-package-lock.json | 16 ++++----- eng/emitter-package.json | 2 +- .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../src/Generated/tspCodeModel.json | 35 +++++++++++++------ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../TimeSeriesInsightsClientSample.csproj | 2 +- .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ .../Internal/RequestContentHelper.cs | 14 ++++++++ 55 files changed, 736 insertions(+), 21 deletions(-) diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index 08e715b098970..35c4736369fbf 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -222,7 +222,7 @@ All should have PrivateAssets="All" set so they don't become package dependencies --> - + diff --git a/eng/emitter-package-lock.json b/eng/emitter-package-lock.json index fbfb2984ee22c..6f10f44f79d9e 100644 --- a/eng/emitter-package-lock.json +++ b/eng/emitter-package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20240701.2" + "@azure-tools/typespec-csharp": "0.2.0-beta.20240703.5" }, "devDependencies": { "@azure-tools/typespec-autorest": "0.43.0", @@ -22,9 +22,9 @@ } }, "node_modules/@autorest/csharp": { - "version": "3.0.0-beta.20240701.2", - "resolved": "https://registry.npmjs.org/@autorest/csharp/-/csharp-3.0.0-beta.20240701.2.tgz", - "integrity": "sha512-7lgsJPvRM4tx0z6qeCPe2OxBEZ8qhwmRnNZUX/0BH8N9geKYMSiqfHep8eBR+RGLWxdnqa3NZWiR97xUV4VAww==" + "version": "3.0.0-beta.20240703.5", + "resolved": "https://registry.npmjs.org/@autorest/csharp/-/csharp-3.0.0-beta.20240703.5.tgz", + "integrity": "sha512-M5vJUlEUMerJhX+kI+bqB7suetxjScbBhIPKZLfRZwZTyrFfMn/zICvn2scTPByr3SK9ykvOPg3KpSBmcEI3oA==" }, "node_modules/@azure-tools/typespec-autorest": { "version": "0.43.0", @@ -117,11 +117,11 @@ } }, "node_modules/@azure-tools/typespec-csharp": { - "version": "0.2.0-beta.20240701.2", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-csharp/-/typespec-csharp-0.2.0-beta.20240701.2.tgz", - "integrity": "sha512-9yt9gie9MRUjcZ2yTTOF4RPpGQRvOrVorQ3BVbpV2sJJFtCt9oMQOZnxE0KIqLvpTPwmm8H2+xuPIBHj2G/r1g==", + "version": "0.2.0-beta.20240703.5", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-csharp/-/typespec-csharp-0.2.0-beta.20240703.5.tgz", + "integrity": "sha512-ML5MtoH516AWFlvPyaLJ2QWVHhI70KbnCmZHef4e1G6Yr1VklXn7L9ZzCkMvqrkmGPadQBI5wfwJqySSgDfi7g==", "dependencies": { - "@autorest/csharp": "3.0.0-beta.20240701.2", + "@autorest/csharp": "3.0.0-beta.20240703.5", "json-serialize-refs": "0.1.0-0" }, "peerDependencies": { diff --git a/eng/emitter-package.json b/eng/emitter-package.json index b5878ee800c25..72735e1ea0bb3 100644 --- a/eng/emitter-package.json +++ b/eng/emitter-package.json @@ -1,7 +1,7 @@ { "main": "dist/src/index.js", "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20240701.2" + "@azure-tools/typespec-csharp": "0.2.0-beta.20240703.5" }, "devDependencies": { "@azure-tools/typespec-autorest": "0.43.0", diff --git a/sdk/attestation/Azure.Security.Attestation/src/Generated/Internal/RequestContentHelper.cs b/sdk/attestation/Azure.Security.Attestation/src/Generated/Internal/RequestContentHelper.cs index d73f0ebafc804..9a775ad63a8e0 100644 --- a/sdk/attestation/Azure.Security.Attestation/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/attestation/Azure.Security.Attestation/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/Internal/RequestContentHelper.cs b/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/Internal/RequestContentHelper.cs index a39696c355fcd..b7ad0875e85d6 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/communication/Azure.Communication.AlphaIds/src/Generated/Internal/RequestContentHelper.cs b/sdk/communication/Azure.Communication.AlphaIds/src/Generated/Internal/RequestContentHelper.cs index 9215aad3746e4..dffaed8447088 100644 --- a/sdk/communication/Azure.Communication.AlphaIds/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/communication/Azure.Communication.AlphaIds/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Internal/RequestContentHelper.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Internal/RequestContentHelper.cs index a5fd47922bb67..32acb868978c0 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/communication/Azure.Communication.CallingServer/src/Generated/Internal/RequestContentHelper.cs b/sdk/communication/Azure.Communication.CallingServer/src/Generated/Internal/RequestContentHelper.cs index 41ef809584321..23fd745591d58 100644 --- a/sdk/communication/Azure.Communication.CallingServer/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/communication/Azure.Communication.CallingServer/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/communication/Azure.Communication.Chat/src/Generated/Internal/RequestContentHelper.cs b/sdk/communication/Azure.Communication.Chat/src/Generated/Internal/RequestContentHelper.cs index 3d1fed9e16a74..92748d6626ce8 100644 --- a/sdk/communication/Azure.Communication.Chat/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/communication/Azure.Communication.Chat/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/communication/Azure.Communication.Email/src/Generated/Internal/RequestContentHelper.cs b/sdk/communication/Azure.Communication.Email/src/Generated/Internal/RequestContentHelper.cs index 57f5540d4d2f4..915f8f7d5a8c4 100644 --- a/sdk/communication/Azure.Communication.Email/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/communication/Azure.Communication.Email/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/communication/Azure.Communication.Identity/src/Generated/Internal/RequestContentHelper.cs b/sdk/communication/Azure.Communication.Identity/src/Generated/Internal/RequestContentHelper.cs index cb990847d7037..29aa09e6858a9 100644 --- a/sdk/communication/Azure.Communication.Identity/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/communication/Azure.Communication.Identity/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/tspCodeModel.json b/sdk/communication/Azure.Communication.Messages/src/Generated/tspCodeModel.json index c0883b9039b3c..ac4096b077579 100644 --- a/sdk/communication/Azure.Communication.Messages/src/Generated/tspCodeModel.json +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/tspCodeModel.json @@ -288,10 +288,12 @@ "Type": { "$id": "43", "Kind": "array", + "Name": "Array", "ValueType": { "$id": "44", "Kind": "string" - } + }, + "CrossLanguageDefinitionId": "TypeSpec.Array" }, "IsRequired": true, "IsReadOnly": false @@ -477,6 +479,7 @@ "Type": { "$id": "71", "Kind": "array", + "Name": "ArrayMessageTemplateValue", "ValueType": { "$id": "72", "Kind": "model", @@ -900,7 +903,8 @@ ] } } - } + }, + "CrossLanguageDefinitionId": "TypeSpec.Array" }, "IsRequired": false, "IsReadOnly": false @@ -974,6 +978,7 @@ "Type": { "$id": "142", "Kind": "array", + "Name": "ArrayWhatsAppMessageTemplateBindingsComponent", "ValueType": { "$id": "143", "Kind": "model", @@ -995,7 +1000,8 @@ "IsReadOnly": false } ] - } + }, + "CrossLanguageDefinitionId": "TypeSpec.Array" }, "IsRequired": false, "IsReadOnly": false @@ -1008,9 +1014,11 @@ "Type": { "$id": "147", "Kind": "array", + "Name": "ArrayWhatsAppMessageTemplateBindingsComponent", "ValueType": { "$ref": "143" - } + }, + "CrossLanguageDefinitionId": "TypeSpec.Array" }, "IsRequired": false, "IsReadOnly": false @@ -1023,9 +1031,11 @@ "Type": { "$id": "149", "Kind": "array", + "Name": "ArrayWhatsAppMessageTemplateBindingsComponent", "ValueType": { "$ref": "143" - } + }, + "CrossLanguageDefinitionId": "TypeSpec.Array" }, "IsRequired": false, "IsReadOnly": false @@ -1038,6 +1048,7 @@ "Type": { "$id": "151", "Kind": "array", + "Name": "ArrayWhatsAppMessageTemplateBindingsButton", "ValueType": { "$id": "152", "Kind": "model", @@ -1070,7 +1081,8 @@ "IsReadOnly": false } ] - } + }, + "CrossLanguageDefinitionId": "TypeSpec.Array" }, "IsRequired": false, "IsReadOnly": false @@ -1152,6 +1164,7 @@ "Type": { "$id": "158", "Kind": "array", + "Name": "ArrayMessageReceipt", "ValueType": { "$id": "159", "Kind": "model", @@ -1185,7 +1198,8 @@ "IsReadOnly": false } ] - } + }, + "CrossLanguageDefinitionId": "TypeSpec.Array" }, "IsRequired": true, "IsReadOnly": false @@ -1211,6 +1225,7 @@ "Type": { "$id": "166", "Kind": "array", + "Name": "ArrayMessageTemplateItem", "ValueType": { "$id": "167", "Kind": "model", @@ -1317,7 +1332,8 @@ ] } } - } + }, + "CrossLanguageDefinitionId": "TypeSpec.Array" }, "IsRequired": true, "IsReadOnly": false @@ -1363,8 +1379,7 @@ "Description": "The communication resource, for example https://my-resource.communication.azure.com", "Type": { "$id": "186", - "Kind": "uri", - "IsNullable": false + "Kind": "url" }, "Location": "Uri", "IsApiVersion": false, diff --git a/sdk/communication/Azure.Communication.PhoneNumbers/src/Generated/Internal/RequestContentHelper.cs b/sdk/communication/Azure.Communication.PhoneNumbers/src/Generated/Internal/RequestContentHelper.cs index 18068f522ffcd..91958f76b5aaa 100644 --- a/sdk/communication/Azure.Communication.PhoneNumbers/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/communication/Azure.Communication.PhoneNumbers/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/communication/Azure.Communication.Rooms/src/Generated/Internal/RequestContentHelper.cs b/sdk/communication/Azure.Communication.Rooms/src/Generated/Internal/RequestContentHelper.cs index 0549d381562d4..82e65eccb441a 100644 --- a/sdk/communication/Azure.Communication.Rooms/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/communication/Azure.Communication.Rooms/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/communication/Azure.Communication.ShortCodes/src/Generated/Internal/RequestContentHelper.cs b/sdk/communication/Azure.Communication.ShortCodes/src/Generated/Internal/RequestContentHelper.cs index d450134fd7331..01b12e41ad8b2 100644 --- a/sdk/communication/Azure.Communication.ShortCodes/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/communication/Azure.Communication.ShortCodes/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/communication/Azure.Communication.Sms/src/Generated/Internal/RequestContentHelper.cs b/sdk/communication/Azure.Communication.Sms/src/Generated/Internal/RequestContentHelper.cs index 658d4b29c32ed..52439354697cd 100644 --- a/sdk/communication/Azure.Communication.Sms/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/communication/Azure.Communication.Sms/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Internal/RequestContentHelper.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Internal/RequestContentHelper.cs index c2158fbacc58c..d538bf4553f96 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Internal/RequestContentHelper.cs b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Internal/RequestContentHelper.cs index 09d0c39d98559..bb466089af5de 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/Internal/RequestContentHelper.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/Internal/RequestContentHelper.cs index 4055e2410d0d4..61d8e1dae3f7e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i], ModelSerializationExtensions.WireOptions); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Internal/RequestContentHelper.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Internal/RequestContentHelper.cs index b231d111adc5b..d9a0acdc189f9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Internal/RequestContentHelper.cs b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Internal/RequestContentHelper.cs index 643791f47357d..8785aa5cb62de 100644 --- a/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/iot/Azure.IoT.Hub.Service/src/Generated/Internal/RequestContentHelper.cs b/sdk/iot/Azure.IoT.Hub.Service/src/Generated/Internal/RequestContentHelper.cs index 77a31bb562168..3eb9f727a3fb4 100644 --- a/sdk/iot/Azure.IoT.Hub.Service/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/iot/Azure.IoT.Hub.Service/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Internal/RequestContentHelper.cs b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Internal/RequestContentHelper.cs index c4ba0bba356fc..482217bba2c2a 100644 --- a/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/keyvault/Azure.Security.KeyVault.Administration/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/keyvault/samples/sharelink/Generated/Internal/RequestContentHelper.cs b/sdk/keyvault/samples/sharelink/Generated/Internal/RequestContentHelper.cs index 04829b2318342..1c9ec285beed0 100644 --- a/sdk/keyvault/samples/sharelink/Generated/Internal/RequestContentHelper.cs +++ b/sdk/keyvault/samples/sharelink/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/maps/Azure.Maps.Geolocation/src/Generated/Internal/RequestContentHelper.cs b/sdk/maps/Azure.Maps.Geolocation/src/Generated/Internal/RequestContentHelper.cs index ac6ca966b77e6..a0348a2154253 100644 --- a/sdk/maps/Azure.Maps.Geolocation/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/maps/Azure.Maps.Geolocation/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/maps/Azure.Maps.Rendering/src/Generated/Internal/RequestContentHelper.cs b/sdk/maps/Azure.Maps.Rendering/src/Generated/Internal/RequestContentHelper.cs index ac6ca966b77e6..a0348a2154253 100644 --- a/sdk/maps/Azure.Maps.Rendering/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/maps/Azure.Maps.Rendering/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/maps/Azure.Maps.Routing/src/Generated/Internal/RequestContentHelper.cs b/sdk/maps/Azure.Maps.Routing/src/Generated/Internal/RequestContentHelper.cs index ac6ca966b77e6..a0348a2154253 100644 --- a/sdk/maps/Azure.Maps.Routing/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/maps/Azure.Maps.Routing/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/maps/Azure.Maps.Search/src/Generated/Internal/RequestContentHelper.cs b/sdk/maps/Azure.Maps.Search/src/Generated/Internal/RequestContentHelper.cs index ac6ca966b77e6..a0348a2154253 100644 --- a/sdk/maps/Azure.Maps.Search/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/maps/Azure.Maps.Search/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Internal/RequestContentHelper.cs b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Internal/RequestContentHelper.cs index bdf116af6562a..c375a2e8e6663 100644 --- a/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/mixedreality/Azure.MixedReality.Authentication/src/Generated/Internal/RequestContentHelper.cs b/sdk/mixedreality/Azure.MixedReality.Authentication/src/Generated/Internal/RequestContentHelper.cs index 34fe020f3f0d7..e9b1f4dd18440 100644 --- a/sdk/mixedreality/Azure.MixedReality.Authentication/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/mixedreality/Azure.MixedReality.Authentication/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/Generated/Internal/RequestContentHelper.cs b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/Generated/Internal/RequestContentHelper.cs index ffea7c1c374a9..f87ab0d365d8a 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Internal/RequestContentHelper.cs b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Internal/RequestContentHelper.cs index 8e10f32bad989..288f62ba91286 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/monitor/Azure.Monitor.Query/src/Generated/Internal/RequestContentHelper.cs b/sdk/monitor/Azure.Monitor.Query/src/Generated/Internal/RequestContentHelper.cs index 1829d0583d0f5..d4e77afaa017b 100644 --- a/sdk/monitor/Azure.Monitor.Query/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/monitor/Azure.Monitor.Query/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/objectanchors/Azure.MixedReality.ObjectAnchors.Conversion/src/Generated/Internal/RequestContentHelper.cs b/sdk/objectanchors/Azure.MixedReality.ObjectAnchors.Conversion/src/Generated/Internal/RequestContentHelper.cs index 34fe020f3f0d7..e9b1f4dd18440 100644 --- a/sdk/objectanchors/Azure.MixedReality.ObjectAnchors.Conversion/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/objectanchors/Azure.MixedReality.ObjectAnchors.Conversion/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Internal/RequestContentHelper.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Internal/RequestContentHelper.cs index 0aad7787b0206..2db547178d4f9 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i], ModelSerializationExtensions.WireOptions); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/quantum/Azure.Quantum.Jobs/src/Generated/Internal/RequestContentHelper.cs b/sdk/quantum/Azure.Quantum.Jobs/src/Generated/Internal/RequestContentHelper.cs index dd6853880204b..1bff975aded94 100644 --- a/sdk/quantum/Azure.Quantum.Jobs/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/quantum/Azure.Quantum.Jobs/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Internal/RequestContentHelper.cs b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Internal/RequestContentHelper.cs index b9f83af9293c8..332ccb348d2f1 100644 --- a/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/remoterendering/Azure.MixedReality.RemoteRendering/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/RequestContentHelper.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/RequestContentHelper.cs index fb67f367f7ed2..d229188b8c8d1 100644 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Internal/RequestContentHelper.cs b/sdk/search/Azure.Search.Documents/src/Generated/Internal/RequestContentHelper.cs index 1cdf99d0cfe96..87afb3f513b9a 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/storage/Azure.Storage.Blobs.Batch/src/Generated/Internal/RequestContentHelper.cs b/sdk/storage/Azure.Storage.Blobs.Batch/src/Generated/Internal/RequestContentHelper.cs index e045d6d4a17f3..7c41e84001593 100644 --- a/sdk/storage/Azure.Storage.Blobs.Batch/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/storage/Azure.Storage.Blobs.Batch/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/storage/Azure.Storage.Blobs/src/Generated/Internal/RequestContentHelper.cs b/sdk/storage/Azure.Storage.Blobs/src/Generated/Internal/RequestContentHelper.cs index 8bfe0f8906e40..15d9d2a1e3df9 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/storage/Azure.Storage.Files.DataLake/src/Generated/Internal/RequestContentHelper.cs b/sdk/storage/Azure.Storage.Files.DataLake/src/Generated/Internal/RequestContentHelper.cs index 8bfe0f8906e40..15d9d2a1e3df9 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/Internal/RequestContentHelper.cs b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/Internal/RequestContentHelper.cs index 8bfe0f8906e40..15d9d2a1e3df9 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/storage/Azure.Storage.Queues/src/Generated/Internal/RequestContentHelper.cs b/sdk/storage/Azure.Storage.Queues/src/Generated/Internal/RequestContentHelper.cs index 8bfe0f8906e40..15d9d2a1e3df9 100644 --- a/sdk/storage/Azure.Storage.Queues/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/storage/Azure.Storage.Queues/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Internal/RequestContentHelper.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Internal/RequestContentHelper.cs index 38f85b48d0258..5fdffddd9cc60 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/synapse/Azure.Analytics.Synapse.ManagedPrivateEndpoints/src/Generated/Internal/RequestContentHelper.cs b/sdk/synapse/Azure.Analytics.Synapse.ManagedPrivateEndpoints/src/Generated/Internal/RequestContentHelper.cs index 42a710934fda3..7917b074be378 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.ManagedPrivateEndpoints/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.ManagedPrivateEndpoints/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/synapse/Azure.Analytics.Synapse.Monitoring/src/Generated/Internal/RequestContentHelper.cs b/sdk/synapse/Azure.Analytics.Synapse.Monitoring/src/Generated/Internal/RequestContentHelper.cs index 3451799552c2f..443009e3875e1 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Monitoring/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Monitoring/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Internal/RequestContentHelper.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Internal/RequestContentHelper.cs index 1daaf0ea6eb6f..035f6f719254a 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/tables/Azure.Data.Tables/src/Generated/Internal/RequestContentHelper.cs b/sdk/tables/Azure.Data.Tables/src/Generated/Internal/RequestContentHelper.cs index 5da7c0cbe3ba4..bff81afb96197 100644 --- a/sdk/tables/Azure.Data.Tables/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/tables/Azure.Data.Tables/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics.Legacy.Shared/src/Generated/Internal/RequestContentHelper.cs b/sdk/textanalytics/Azure.AI.TextAnalytics.Legacy.Shared/src/Generated/Internal/RequestContentHelper.cs index 646f87e097381..54c405be81228 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics.Legacy.Shared/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics.Legacy.Shared/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Internal/RequestContentHelper.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Internal/RequestContentHelper.cs index ab9fdd418ba63..e5124f4d9f42b 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/timeseriesinsights/Azure.IoT.TimeSeriesInsights/samples/TimeSeriesInsightsClientSample/TimeSeriesInsightsClientSample.csproj b/sdk/timeseriesinsights/Azure.IoT.TimeSeriesInsights/samples/TimeSeriesInsightsClientSample/TimeSeriesInsightsClientSample.csproj index dda79dd416a2d..d577358b041d1 100644 --- a/sdk/timeseriesinsights/Azure.IoT.TimeSeriesInsights/samples/TimeSeriesInsightsClientSample/TimeSeriesInsightsClientSample.csproj +++ b/sdk/timeseriesinsights/Azure.IoT.TimeSeriesInsights/samples/TimeSeriesInsightsClientSample/TimeSeriesInsightsClientSample.csproj @@ -12,7 +12,7 @@ - + diff --git a/sdk/timeseriesinsights/Azure.IoT.TimeSeriesInsights/src/Generated/Internal/RequestContentHelper.cs b/sdk/timeseriesinsights/Azure.IoT.TimeSeriesInsights/src/Generated/Internal/RequestContentHelper.cs index e123474d5543d..6241e35a59cf1 100644 --- a/sdk/timeseriesinsights/Azure.IoT.TimeSeriesInsights/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/timeseriesinsights/Azure.IoT.TimeSeriesInsights/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/translation/Azure.AI.Translation.Text/src/Generated/Internal/RequestContentHelper.cs b/sdk/translation/Azure.AI.Translation.Text/src/Generated/Internal/RequestContentHelper.cs index 5e15ef7289581..81db0c2c297d7 100644 --- a/sdk/translation/Azure.AI.Translation.Text/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/translation/Azure.AI.Translation.Text/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i], ModelSerializationExtensions.WireOptions); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { diff --git a/sdk/videoanalyzer/Azure.Media.VideoAnalyzer.Edge/src/Generated/Internal/RequestContentHelper.cs b/sdk/videoanalyzer/Azure.Media.VideoAnalyzer.Edge/src/Generated/Internal/RequestContentHelper.cs index 3046a5aa6f461..005e6f7f2b2a1 100644 --- a/sdk/videoanalyzer/Azure.Media.VideoAnalyzer.Edge/src/Generated/Internal/RequestContentHelper.cs +++ b/sdk/videoanalyzer/Azure.Media.VideoAnalyzer.Edge/src/Generated/Internal/RequestContentHelper.cs @@ -55,6 +55,20 @@ public static RequestContent FromEnumerable(IEnumerable enumerable) return content; } + public static RequestContent FromEnumerable(ReadOnlySpan span) + where T : notnull + { + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStartArray(); + for (int i = 0; i < span.Length; i++) + { + content.JsonWriter.WriteObjectValue(span[i]); + } + content.JsonWriter.WriteEndArray(); + + return content; + } + public static RequestContent FromDictionary(IDictionary dictionary) where TValue : notnull { From 35b521c31507db4cdffd2df689776e8b0ce89e7d Mon Sep 17 00:00:00 2001 From: Dante Date: Thu, 4 Jul 2024 06:25:43 -0400 Subject: [PATCH 014/144] Deployment stacks sdk introduction (#44405) --- .../Azure.ResourceManager.Resources.sln | 14 - .../CHANGELOG.md | 12 +- ...esourceManager.Resources.netstandard2.0.cs | 406 ++++++ .../assets.json | 2 +- .../Samples/Sample_ArmDeploymentCollection.cs | 2 +- .../Samples/Sample_ArmDeploymentResource.cs | 12 +- .../Azure.ResourceManager.Resources.csproj | 2 +- .../src/Custom/DeploymentStackData.cs | 17 + .../src/Generated/ArmDeploymentCollection.cs | 20 +- .../src/Generated/ArmDeploymentResource.cs | 64 +- .../src/Generated/ArmResourcesModelFactory.cs | 123 ++ .../Generated/DeploymentStackCollection.cs | 484 ++++++++ .../DeploymentStackData.Serialization.cs | 1100 +++++++++++++++++ .../src/Generated/DeploymentStackData.cs | 257 ++++ .../DeploymentStackResource.Serialization.cs | 26 + .../src/Generated/DeploymentStackResource.cs | 860 +++++++++++++ .../Extensions/MockableResourcesArmClient.cs | 12 + ...ockableResourcesManagementGroupResource.cs | 73 +- .../MockableResourcesResourceGroupResource.cs | 73 +- .../MockableResourcesSubscriptionResource.cs | 73 +- .../MockableResourcesTenantResource.cs | 8 +- .../Extensions/ResourcesExtensions.cs | 318 ++++- .../DeploymentStackOperationSource.cs | 38 + ...ymentStackValidateResultOperationSource.cs | 30 + .../Models/ActionOnUnmanage.Serialization.cs | 209 ++++ .../src/Generated/Models/ActionOnUnmanage.cs | 83 ++ .../Models/DenySettings.Serialization.cs | 303 +++++ .../src/Generated/Models/DenySettings.cs | 90 ++ .../src/Generated/Models/DenySettingsMode.cs | 54 + .../src/Generated/Models/DenyStatusMode.cs | 63 + .../DeploymentParameter.Serialization.cs | 230 ++++ .../Generated/Models/DeploymentParameter.cs | 105 ++ ...DeploymentStackListResult.Serialization.cs | 212 ++++ .../Models/DeploymentStackListResult.cs | 70 ++ .../DeploymentStackProvisioningState.cs | 78 ++ ...ntStackTemplateDefinition.Serialization.cs | 196 +++ .../DeploymentStackTemplateDefinition.cs | 100 ++ ...ntStackValidateProperties.Serialization.cs | 429 +++++++ .../DeploymentStackValidateProperties.cs | 103 ++ ...oymentStackValidateResult.Serialization.cs | 298 +++++ .../Models/DeploymentStackValidateResult.cs | 77 ++ ...loymentStacksDebugSetting.Serialization.cs | 163 +++ .../Models/DeploymentStacksDebugSetting.cs | 66 + .../DeploymentStacksDeleteDetachEnum.cs | 51 + ...ymentStacksParametersLink.Serialization.cs | 186 +++ .../Models/DeploymentStacksParametersLink.cs | 81 ++ ...loymentStacksTemplateLink.Serialization.cs | 301 +++++ .../Models/DeploymentStacksTemplateLink.cs | 86 ++ ...eyVaultParameterReference.Serialization.cs | 220 ++++ .../Models/KeyVaultParameterReference.cs | 102 ++ .../ManagedResourceReference.Serialization.cs | 223 ++++ .../Models/ManagedResourceReference.cs | 39 + ...rceReferenceAutoGenerated.Serialization.cs | 163 +++ .../Models/ResourceReferenceAutoGenerated.cs | 66 + ...ResourceReferenceExtended.Serialization.cs | 193 +++ .../Models/ResourceReferenceExtended.cs | 34 + .../Generated/Models/ResourceStatusMode.cs | 54 + .../UnmanageActionManagementGroupMode.cs | 51 + .../Models/UnmanageActionResourceGroupMode.cs | 51 + .../Models/UnmanageActionResourceMode.cs | 51 + .../DeploymentRestOperations.cs | 2 +- .../DeploymentStacksRestOperations.cs | 653 ++++++++++ .../DeploymentsRestOperations.cs | 2 +- .../src/autorest.md | 328 ++++- .../tests/ResourcesTestBase.cs | 82 +- .../DeploymentStackCollectionTests.cs | 220 ++++ .../DeploymentStackOperationsTests.cs | 187 +++ .../mg-stack-template.json | 16 + .../rg-stack-template.json | 24 + .../sub-stack-template.json | 22 + 70 files changed, 10342 insertions(+), 101 deletions(-) create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Custom/DeploymentStackData.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/DeploymentStackCollection.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/DeploymentStackData.Serialization.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/DeploymentStackData.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/DeploymentStackResource.Serialization.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/DeploymentStackResource.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/LongRunningOperation/DeploymentStackOperationSource.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/LongRunningOperation/DeploymentStackValidateResultOperationSource.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ActionOnUnmanage.Serialization.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ActionOnUnmanage.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DenySettings.Serialization.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DenySettings.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DenySettingsMode.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DenyStatusMode.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentParameter.Serialization.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentParameter.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStackListResult.Serialization.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStackListResult.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStackProvisioningState.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStackTemplateDefinition.Serialization.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStackTemplateDefinition.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStackValidateProperties.Serialization.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStackValidateProperties.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStackValidateResult.Serialization.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStackValidateResult.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStacksDebugSetting.Serialization.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStacksDebugSetting.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStacksDeleteDetachEnum.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStacksParametersLink.Serialization.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStacksParametersLink.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStacksTemplateLink.Serialization.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStacksTemplateLink.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/KeyVaultParameterReference.Serialization.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/KeyVaultParameterReference.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ManagedResourceReference.Serialization.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ManagedResourceReference.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ResourceReferenceAutoGenerated.Serialization.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ResourceReferenceAutoGenerated.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ResourceReferenceExtended.Serialization.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ResourceReferenceExtended.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ResourceStatusMode.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/UnmanageActionManagementGroupMode.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/UnmanageActionResourceGroupMode.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/UnmanageActionResourceMode.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/RestOperations/DeploymentStacksRestOperations.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/tests/Scenario/DeploymentStackCollectionTests.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/tests/Scenario/DeploymentStackOperationsTests.cs create mode 100644 sdk/resources/Azure.ResourceManager.Resources/tests/Scenario/DeploymentTemplates/mg-stack-template.json create mode 100644 sdk/resources/Azure.ResourceManager.Resources/tests/Scenario/DeploymentTemplates/rg-stack-template.json create mode 100644 sdk/resources/Azure.ResourceManager.Resources/tests/Scenario/DeploymentTemplates/sub-stack-template.json diff --git a/sdk/resources/Azure.ResourceManager.Resources/Azure.ResourceManager.Resources.sln b/sdk/resources/Azure.ResourceManager.Resources/Azure.ResourceManager.Resources.sln index 9ac6f4b080a33..89158324f5ae9 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/Azure.ResourceManager.Resources.sln +++ b/sdk/resources/Azure.ResourceManager.Resources/Azure.ResourceManager.Resources.sln @@ -2,8 +2,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.6.33829.357 MinimumVisualStudioVersion = 15.0.26124.0 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Core.TestFramework", "..\..\core\Azure.Core.TestFramework\src\Azure.Core.TestFramework.csproj", "{62AF7C88-CE3F-416E-B18E-BC6F884C89E2}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.Resources", "src\Azure.ResourceManager.Resources.csproj", "{DEFF4395-FBD0-4205-95DE-7992E79015FA}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.Resources.Tests", "tests\Azure.ResourceManager.Resources.Tests.csproj", "{9D842058-41AB-42DD-82C8-F3DF49E25297}" @@ -20,18 +18,6 @@ Global Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {62AF7C88-CE3F-416E-B18E-BC6F884C89E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {62AF7C88-CE3F-416E-B18E-BC6F884C89E2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {62AF7C88-CE3F-416E-B18E-BC6F884C89E2}.Debug|x64.ActiveCfg = Debug|Any CPU - {62AF7C88-CE3F-416E-B18E-BC6F884C89E2}.Debug|x64.Build.0 = Debug|Any CPU - {62AF7C88-CE3F-416E-B18E-BC6F884C89E2}.Debug|x86.ActiveCfg = Debug|Any CPU - {62AF7C88-CE3F-416E-B18E-BC6F884C89E2}.Debug|x86.Build.0 = Debug|Any CPU - {62AF7C88-CE3F-416E-B18E-BC6F884C89E2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {62AF7C88-CE3F-416E-B18E-BC6F884C89E2}.Release|Any CPU.Build.0 = Release|Any CPU - {62AF7C88-CE3F-416E-B18E-BC6F884C89E2}.Release|x64.ActiveCfg = Release|Any CPU - {62AF7C88-CE3F-416E-B18E-BC6F884C89E2}.Release|x64.Build.0 = Release|Any CPU - {62AF7C88-CE3F-416E-B18E-BC6F884C89E2}.Release|x86.ActiveCfg = Release|Any CPU - {62AF7C88-CE3F-416E-B18E-BC6F884C89E2}.Release|x86.Build.0 = Release|Any CPU {DEFF4395-FBD0-4205-95DE-7992E79015FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DEFF4395-FBD0-4205-95DE-7992E79015FA}.Debug|Any CPU.Build.0 = Debug|Any CPU {DEFF4395-FBD0-4205-95DE-7992E79015FA}.Debug|x64.ActiveCfg = Debug|Any CPU diff --git a/sdk/resources/Azure.ResourceManager.Resources/CHANGELOG.md b/sdk/resources/Azure.ResourceManager.Resources/CHANGELOG.md index 34bdde9a80702..b2c841f96290b 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/CHANGELOG.md +++ b/sdk/resources/Azure.ResourceManager.Resources/CHANGELOG.md @@ -1,14 +1,10 @@ # Release History -## 1.8.0-beta.1 (Unreleased) +## 1.8.0 (2024-07-04) ### Features Added -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- Added `DeploymentStack` support. ## 1.7.3 (2024-05-07) @@ -20,13 +16,13 @@ ### Features Added -- Add `ArmOperation.Rehydrate` and `ArmOperation.Rehydrate` static methods to rehydrate a long-running operation. +- Added `ArmOperation.Rehydrate` and `ArmOperation.Rehydrate` static methods to rehydrate a long-running operation. ## 1.7.1 (2024-03-23) ### Features Added -- Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. +- Enabled the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. - Added experimental Bicep serialization. ## 1.7.0 (2023-11-16) 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 e15be5aca25e6..77e6f826a2c1e 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 @@ -264,6 +264,83 @@ protected ArmDeploymentScriptResource() { } public virtual Azure.Response Update(Azure.ResourceManager.Resources.Models.ArmDeploymentScriptPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.Resources.Models.ArmDeploymentScriptPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class DeploymentStackCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DeploymentStackCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string deploymentStackName, Azure.ResourceManager.Resources.DeploymentStackData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string deploymentStackName, Azure.ResourceManager.Resources.DeploymentStackData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string deploymentStackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string deploymentStackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string deploymentStackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string deploymentStackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string deploymentStackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string deploymentStackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DeploymentStackData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DeploymentStackData() { } + public Azure.ResourceManager.Resources.Models.ActionOnUnmanage ActionOnUnmanage { get { throw null; } set { } } + public bool? BypassStackOutOfSyncError { get { throw null; } set { } } + public string CorrelationId { get { throw null; } } + public string DebugSettingDetailLevel { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList DeletedResources { get { throw null; } } + public Azure.ResourceManager.Resources.Models.DenySettings DenySettings { get { throw null; } set { } } + public string DeploymentId { get { throw null; } } + public string DeploymentScope { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList DetachedResources { get { throw null; } } + public System.TimeSpan? Duration { get { throw null; } } + public Azure.ResponseError Error { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList FailedResources { get { throw null; } } + public Azure.Core.AzureLocation? Location { get { throw null; } set { } } + public System.BinaryData Outputs { get { throw null; } } + public System.Collections.Generic.IDictionary Parameters { get { throw null; } } + public Azure.ResourceManager.Resources.Models.DeploymentStacksParametersLink ParametersLink { get { throw null; } set { } } + public Azure.ResourceManager.Resources.Models.DeploymentStackProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Resources { get { throw null; } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public System.BinaryData Template { get { throw null; } set { } } + public Azure.ResourceManager.Resources.Models.DeploymentStacksTemplateLink TemplateLink { get { throw null; } set { } } + Azure.ResourceManager.Resources.DeploymentStackData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Resources.DeploymentStackData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeploymentStackResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DeploymentStackResource() { } + public virtual Azure.ResourceManager.Resources.DeploymentStackData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string scope, string deploymentStackName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ResourceManager.Resources.Models.UnmanageActionResourceMode? unmanageActionResources = default(Azure.ResourceManager.Resources.Models.UnmanageActionResourceMode?), Azure.ResourceManager.Resources.Models.UnmanageActionResourceGroupMode? unmanageActionResourceGroups = default(Azure.ResourceManager.Resources.Models.UnmanageActionResourceGroupMode?), Azure.ResourceManager.Resources.Models.UnmanageActionManagementGroupMode? unmanageActionManagementGroups = default(Azure.ResourceManager.Resources.Models.UnmanageActionManagementGroupMode?), bool? bypassStackOutOfSyncError = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Resources.Models.UnmanageActionResourceMode? unmanageActionResources = default(Azure.ResourceManager.Resources.Models.UnmanageActionResourceMode?), Azure.ResourceManager.Resources.Models.UnmanageActionResourceGroupMode? unmanageActionResourceGroups = default(Azure.ResourceManager.Resources.Models.UnmanageActionResourceGroupMode?), Azure.ResourceManager.Resources.Models.UnmanageActionManagementGroupMode? unmanageActionManagementGroups = default(Azure.ResourceManager.Resources.Models.UnmanageActionManagementGroupMode?), bool? bypassStackOutOfSyncError = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ExportTemplate(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExportTemplateAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.Resources.DeploymentStackData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Resources.DeploymentStackData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Resources.DeploymentStackData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Resources.DeploymentStackData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation ValidateStack(Azure.WaitUntil waitUntil, Azure.ResourceManager.Resources.DeploymentStackData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ValidateStackAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Resources.DeploymentStackData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class JitRequestCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected JitRequestCollection() { } @@ -358,6 +435,16 @@ public static partial class ResourcesExtensions public static Azure.ResourceManager.Resources.ArmDeploymentScriptCollection GetArmDeploymentScripts(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } public static Azure.Pageable GetArmDeploymentScripts(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetArmDeploymentScriptsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetDeploymentStack(this Azure.ResourceManager.ManagementGroups.ManagementGroupResource managementGroupResource, string deploymentStackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetDeploymentStack(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string deploymentStackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetDeploymentStack(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string deploymentStackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetDeploymentStackAsync(this Azure.ResourceManager.ManagementGroups.ManagementGroupResource managementGroupResource, string deploymentStackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetDeploymentStackAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string deploymentStackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetDeploymentStackAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string deploymentStackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.Resources.DeploymentStackResource GetDeploymentStackResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.Resources.DeploymentStackCollection GetDeploymentStacks(this Azure.ResourceManager.ManagementGroups.ManagementGroupResource managementGroupResource) { throw null; } + public static Azure.ResourceManager.Resources.DeploymentStackCollection GetDeploymentStacks(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.ResourceManager.Resources.DeploymentStackCollection GetDeploymentStacks(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource) { throw null; } public static Azure.Response GetJitRequest(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string jitRequestName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetJitRequestAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string jitRequestName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Pageable GetJitRequestDefinitions(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -526,6 +613,7 @@ protected MockableResourcesArmClient() { } public virtual Azure.ResourceManager.Resources.ArmApplicationResource GetArmApplicationResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Resources.ArmDeploymentResource GetArmDeploymentResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Resources.ArmDeploymentScriptResource GetArmDeploymentScriptResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.Resources.DeploymentStackResource GetDeploymentStackResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Resources.JitRequestResource GetJitRequestResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Resources.ScriptLogResource GetScriptLogResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Resources.TemplateSpecResource GetTemplateSpecResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -537,6 +625,9 @@ protected MockableResourcesManagementGroupResource() { } public virtual Azure.Response GetArmDeployment(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetArmDeploymentAsync(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.Resources.ArmDeploymentCollection GetArmDeployments() { throw null; } + public virtual Azure.Response GetDeploymentStack(string deploymentStackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDeploymentStackAsync(string deploymentStackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.Resources.DeploymentStackCollection GetDeploymentStacks() { throw null; } } public partial class MockableResourcesResourceGroupResource : Azure.ResourceManager.ArmResource { @@ -553,6 +644,9 @@ protected MockableResourcesResourceGroupResource() { } public virtual Azure.Response GetArmDeploymentScript(string scriptName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetArmDeploymentScriptAsync(string scriptName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.Resources.ArmDeploymentScriptCollection GetArmDeploymentScripts() { throw null; } + public virtual Azure.Response GetDeploymentStack(string deploymentStackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDeploymentStackAsync(string deploymentStackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.Resources.DeploymentStackCollection GetDeploymentStacks() { throw null; } public virtual Azure.Response GetJitRequest(string jitRequestName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetJitRequestAsync(string jitRequestName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.Resources.JitRequestCollection GetJitRequests() { throw null; } @@ -572,6 +666,9 @@ protected MockableResourcesSubscriptionResource() { } public virtual Azure.ResourceManager.Resources.ArmDeploymentCollection GetArmDeployments() { throw null; } public virtual Azure.Pageable GetArmDeploymentScripts(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetArmDeploymentScriptsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDeploymentStack(string deploymentStackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDeploymentStackAsync(string deploymentStackName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.Resources.DeploymentStackCollection GetDeploymentStacks() { throw null; } public virtual Azure.Pageable GetJitRequestDefinitions(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetJitRequestDefinitionsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetTemplateSpecs(Azure.ResourceManager.Resources.Models.TemplateSpecExpandKind? expand = default(Azure.ResourceManager.Resources.Models.TemplateSpecExpandKind?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -589,6 +686,18 @@ protected MockableResourcesTenantResource() { } } namespace Azure.ResourceManager.Resources.Models { + public partial class ActionOnUnmanage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ActionOnUnmanage(Azure.ResourceManager.Resources.Models.DeploymentStacksDeleteDetachEnum resources) { } + public Azure.ResourceManager.Resources.Models.DeploymentStacksDeleteDetachEnum? ManagementGroups { get { throw null; } set { } } + public Azure.ResourceManager.Resources.Models.DeploymentStacksDeleteDetachEnum? ResourceGroups { get { throw null; } set { } } + public Azure.ResourceManager.Resources.Models.DeploymentStacksDeleteDetachEnum Resources { get { throw null; } set { } } + Azure.ResourceManager.Resources.Models.ActionOnUnmanage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Resources.Models.ActionOnUnmanage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ArmApplicationArtifact : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ArmApplicationArtifact() { } @@ -1120,8 +1229,14 @@ public static partial class ArmResourcesModelFactory public static Azure.ResourceManager.Resources.Models.BasicArmDependency BasicArmDependency(string id = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), string resourceName = null) { throw null; } public static Azure.ResourceManager.Resources.Models.DecompiledFileDefinition DecompiledFileDefinition(string path = null, string contents = null) { throw null; } public static Azure.ResourceManager.Resources.Models.DecompileOperationSuccessResult DecompileOperationSuccessResult(System.Collections.Generic.IEnumerable files = null, string entryPoint = null) { throw null; } + public static Azure.ResourceManager.Resources.DeploymentStackData DeploymentStackData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null, Azure.ResponseError error = null, System.BinaryData template = null, Azure.ResourceManager.Resources.Models.DeploymentStacksTemplateLink templateLink = null, System.Collections.Generic.IDictionary parameters = null, Azure.ResourceManager.Resources.Models.DeploymentStacksParametersLink parametersLink = null, Azure.ResourceManager.Resources.Models.ActionOnUnmanage actionOnUnmanage = null, string debugSettingDetailLevel = null, bool? bypassStackOutOfSyncError = default(bool?), string deploymentScope = null, string description = null, Azure.ResourceManager.Resources.Models.DenySettings denySettings = null, Azure.ResourceManager.Resources.Models.DeploymentStackProvisioningState? provisioningState = default(Azure.ResourceManager.Resources.Models.DeploymentStackProvisioningState?), string correlationId = null, System.Collections.Generic.IEnumerable detachedResources = null, System.Collections.Generic.IEnumerable deletedResources = null, System.Collections.Generic.IEnumerable failedResources = null, System.Collections.Generic.IEnumerable resources = null, string deploymentId = null, System.BinaryData outputs = null, System.TimeSpan? duration = default(System.TimeSpan?)) { throw null; } + public static Azure.ResourceManager.Resources.Models.DeploymentStackTemplateDefinition DeploymentStackTemplateDefinition(System.BinaryData template = null, Azure.ResourceManager.Resources.Models.DeploymentStacksTemplateLink templateLink = null) { throw null; } + public static Azure.ResourceManager.Resources.Models.DeploymentStackValidateResult DeploymentStackValidateResult(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Resources.Models.DeploymentStackValidateProperties properties = null, Azure.ResponseError error = null) { throw null; } public static Azure.ResourceManager.Resources.Models.ErrorDeploymentExtended ErrorDeploymentExtended(string provisioningState = null, Azure.ResourceManager.Resources.Models.ErrorDeploymentType? deploymentType = default(Azure.ResourceManager.Resources.Models.ErrorDeploymentType?), string deploymentName = null) { throw null; } public static Azure.ResourceManager.Resources.JitRequestData JitRequestData(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 tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string applicationResourceId = null, System.Guid? publisherTenantId = default(System.Guid?), System.Collections.Generic.IEnumerable jitAuthorizationPolicies = null, Azure.ResourceManager.Resources.Models.JitSchedulingPolicy jitSchedulingPolicy = null, Azure.ResourceManager.Resources.Models.ResourcesProvisioningState? provisioningState = default(Azure.ResourceManager.Resources.Models.ResourcesProvisioningState?), Azure.ResourceManager.Resources.Models.JitRequestState? jitRequestState = default(Azure.ResourceManager.Resources.Models.JitRequestState?), Azure.ResourceManager.Resources.Models.ArmApplicationDetails createdBy = null, Azure.ResourceManager.Resources.Models.ArmApplicationDetails updatedBy = null) { throw null; } + public static Azure.ResourceManager.Resources.Models.ManagedResourceReference ManagedResourceReference(string id = null, Azure.ResourceManager.Resources.Models.ResourceStatusMode? status = default(Azure.ResourceManager.Resources.Models.ResourceStatusMode?), Azure.ResourceManager.Resources.Models.DenyStatusMode? denyStatus = default(Azure.ResourceManager.Resources.Models.DenyStatusMode?)) { throw null; } + public static Azure.ResourceManager.Resources.Models.ResourceReferenceAutoGenerated ResourceReferenceAutoGenerated(string id = null) { throw null; } + public static Azure.ResourceManager.Resources.Models.ResourceReferenceExtended ResourceReferenceExtended(string id = null, Azure.ResponseError error = null) { throw null; } public static Azure.ResourceManager.Resources.ScriptLogData ScriptLogData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string log = null) { throw null; } public static Azure.ResourceManager.Resources.Models.ScriptStatus ScriptStatus(string containerInstanceId = null, string storageAccountId = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), System.DateTimeOffset? expireOn = default(System.DateTimeOffset?), Azure.ResponseError error = null) { throw null; } public static Azure.ResourceManager.Resources.Models.StatusMessage StatusMessage(string status = null, Azure.ResponseError error = null) { throw null; } @@ -1228,6 +1343,181 @@ internal DecompileOperationSuccessResult() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class DenySettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DenySettings(Azure.ResourceManager.Resources.Models.DenySettingsMode mode) { } + public bool? ApplyToChildScopes { get { throw null; } set { } } + public System.Collections.Generic.IList ExcludedActions { get { throw null; } } + public System.Collections.Generic.IList ExcludedPrincipals { get { throw null; } } + public Azure.ResourceManager.Resources.Models.DenySettingsMode Mode { get { throw null; } set { } } + Azure.ResourceManager.Resources.Models.DenySettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Resources.Models.DenySettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DenySettingsMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DenySettingsMode(string value) { throw null; } + public static Azure.ResourceManager.Resources.Models.DenySettingsMode DenyDelete { get { throw null; } } + public static Azure.ResourceManager.Resources.Models.DenySettingsMode DenyWriteAndDelete { get { throw null; } } + public static Azure.ResourceManager.Resources.Models.DenySettingsMode None { get { throw null; } } + public bool Equals(Azure.ResourceManager.Resources.Models.DenySettingsMode 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.Resources.Models.DenySettingsMode left, Azure.ResourceManager.Resources.Models.DenySettingsMode right) { throw null; } + public static implicit operator Azure.ResourceManager.Resources.Models.DenySettingsMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Resources.Models.DenySettingsMode left, Azure.ResourceManager.Resources.Models.DenySettingsMode right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DenyStatusMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DenyStatusMode(string value) { throw null; } + public static Azure.ResourceManager.Resources.Models.DenyStatusMode DenyDelete { get { throw null; } } + public static Azure.ResourceManager.Resources.Models.DenyStatusMode DenyWriteAndDelete { get { throw null; } } + public static Azure.ResourceManager.Resources.Models.DenyStatusMode Inapplicable { get { throw null; } } + public static Azure.ResourceManager.Resources.Models.DenyStatusMode None { get { throw null; } } + public static Azure.ResourceManager.Resources.Models.DenyStatusMode NotSupported { get { throw null; } } + public static Azure.ResourceManager.Resources.Models.DenyStatusMode RemovedBySystem { get { throw null; } } + public bool Equals(Azure.ResourceManager.Resources.Models.DenyStatusMode 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.Resources.Models.DenyStatusMode left, Azure.ResourceManager.Resources.Models.DenyStatusMode right) { throw null; } + public static implicit operator Azure.ResourceManager.Resources.Models.DenyStatusMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Resources.Models.DenyStatusMode left, Azure.ResourceManager.Resources.Models.DenyStatusMode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DeploymentParameter : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DeploymentParameter() { } + public string DeploymentParameterType { get { throw null; } set { } } + public Azure.ResourceManager.Resources.Models.KeyVaultParameterReference Reference { get { throw null; } set { } } + public System.BinaryData Value { get { throw null; } set { } } + Azure.ResourceManager.Resources.Models.DeploymentParameter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Resources.Models.DeploymentParameter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DeploymentStackProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DeploymentStackProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.Resources.Models.DeploymentStackProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.Resources.Models.DeploymentStackProvisioningState Canceling { get { throw null; } } + public static Azure.ResourceManager.Resources.Models.DeploymentStackProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.Resources.Models.DeploymentStackProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.Resources.Models.DeploymentStackProvisioningState DeletingResources { get { throw null; } } + public static Azure.ResourceManager.Resources.Models.DeploymentStackProvisioningState Deploying { get { throw null; } } + public static Azure.ResourceManager.Resources.Models.DeploymentStackProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.Resources.Models.DeploymentStackProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.Resources.Models.DeploymentStackProvisioningState UpdatingDenyAssignments { get { throw null; } } + public static Azure.ResourceManager.Resources.Models.DeploymentStackProvisioningState Validating { get { throw null; } } + public static Azure.ResourceManager.Resources.Models.DeploymentStackProvisioningState Waiting { get { throw null; } } + public bool Equals(Azure.ResourceManager.Resources.Models.DeploymentStackProvisioningState 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.Resources.Models.DeploymentStackProvisioningState left, Azure.ResourceManager.Resources.Models.DeploymentStackProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.Resources.Models.DeploymentStackProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Resources.Models.DeploymentStackProvisioningState left, Azure.ResourceManager.Resources.Models.DeploymentStackProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DeploymentStacksDeleteDetachEnum : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DeploymentStacksDeleteDetachEnum(string value) { throw null; } + public static Azure.ResourceManager.Resources.Models.DeploymentStacksDeleteDetachEnum Delete { get { throw null; } } + public static Azure.ResourceManager.Resources.Models.DeploymentStacksDeleteDetachEnum Detach { get { throw null; } } + public bool Equals(Azure.ResourceManager.Resources.Models.DeploymentStacksDeleteDetachEnum 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.Resources.Models.DeploymentStacksDeleteDetachEnum left, Azure.ResourceManager.Resources.Models.DeploymentStacksDeleteDetachEnum right) { throw null; } + public static implicit operator Azure.ResourceManager.Resources.Models.DeploymentStacksDeleteDetachEnum (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Resources.Models.DeploymentStacksDeleteDetachEnum left, Azure.ResourceManager.Resources.Models.DeploymentStacksDeleteDetachEnum right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DeploymentStacksParametersLink : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DeploymentStacksParametersLink(System.Uri uri) { } + public string ContentVersion { get { throw null; } set { } } + public System.Uri Uri { get { throw null; } set { } } + Azure.ResourceManager.Resources.Models.DeploymentStacksParametersLink System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Resources.Models.DeploymentStacksParametersLink System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeploymentStacksTemplateLink : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DeploymentStacksTemplateLink() { } + public string ContentVersion { get { throw null; } set { } } + public string Id { get { throw null; } set { } } + public string QueryString { get { throw null; } set { } } + public string RelativePath { get { throw null; } set { } } + public System.Uri Uri { get { throw null; } set { } } + Azure.ResourceManager.Resources.Models.DeploymentStacksTemplateLink System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Resources.Models.DeploymentStacksTemplateLink System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeploymentStackTemplateDefinition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DeploymentStackTemplateDefinition() { } + public System.BinaryData Template { get { throw null; } } + public Azure.ResourceManager.Resources.Models.DeploymentStacksTemplateLink TemplateLink { get { throw null; } } + Azure.ResourceManager.Resources.Models.DeploymentStackTemplateDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Resources.Models.DeploymentStackTemplateDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeploymentStackValidateProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DeploymentStackValidateProperties() { } + public Azure.ResourceManager.Resources.Models.ActionOnUnmanage ActionOnUnmanage { get { throw null; } set { } } + public string CorrelationId { get { throw null; } set { } } + public Azure.ResourceManager.Resources.Models.DenySettings DenySettings { get { throw null; } set { } } + public string DeploymentScope { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Parameters { get { throw null; } } + public Azure.ResourceManager.Resources.Models.DeploymentStacksTemplateLink TemplateLink { get { throw null; } set { } } + public System.Collections.Generic.IList ValidatedResources { get { throw null; } } + Azure.ResourceManager.Resources.Models.DeploymentStackValidateProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Resources.Models.DeploymentStackValidateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeploymentStackValidateResult : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DeploymentStackValidateResult() { } + public Azure.ResponseError Error { get { throw null; } set { } } + public Azure.ResourceManager.Resources.Models.DeploymentStackValidateProperties Properties { get { throw null; } set { } } + Azure.ResourceManager.Resources.Models.DeploymentStackValidateResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Resources.Models.DeploymentStackValidateResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ErrorDeployment : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ErrorDeployment() { } @@ -1400,6 +1690,18 @@ public JitSchedulingPolicy(Azure.ResourceManager.Resources.Models.JitSchedulingT public static bool operator !=(Azure.ResourceManager.Resources.Models.JitSchedulingType left, Azure.ResourceManager.Resources.Models.JitSchedulingType right) { throw null; } public override string ToString() { throw null; } } + public partial class KeyVaultParameterReference : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public KeyVaultParameterReference(Azure.ResourceManager.Resources.Models.WritableSubResource keyVault, string secretName) { } + public Azure.Core.ResourceIdentifier KeyVaultId { get { throw null; } set { } } + public string SecretName { get { throw null; } set { } } + public string SecretVersion { get { throw null; } set { } } + Azure.ResourceManager.Resources.Models.KeyVaultParameterReference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Resources.Models.KeyVaultParameterReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class LinkedTemplateArtifact : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public LinkedTemplateArtifact(string path, System.BinaryData template) { } @@ -1411,6 +1713,17 @@ public LinkedTemplateArtifact(string path, System.BinaryData template) { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ManagedResourceReference : Azure.ResourceManager.Resources.Models.ResourceReferenceAutoGenerated, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ManagedResourceReference() { } + public Azure.ResourceManager.Resources.Models.DenyStatusMode? DenyStatus { get { throw null; } set { } } + public Azure.ResourceManager.Resources.Models.ResourceStatusMode? Status { get { throw null; } set { } } + Azure.ResourceManager.Resources.Models.ManagedResourceReference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Resources.Models.ManagedResourceReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public enum ProvisioningOperationKind { NotSpecified = 0, @@ -1424,6 +1737,26 @@ public enum ProvisioningOperationKind EvaluateDeploymentOutput = 8, DeploymentCleanup = 9, } + public partial class ResourceReferenceAutoGenerated : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceReferenceAutoGenerated() { } + public string Id { get { throw null; } } + Azure.ResourceManager.Resources.Models.ResourceReferenceAutoGenerated System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Resources.Models.ResourceReferenceAutoGenerated System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ResourceReferenceExtended : Azure.ResourceManager.Resources.Models.ResourceReferenceAutoGenerated, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceReferenceExtended() { } + public Azure.ResponseError Error { get { throw null; } set { } } + Azure.ResourceManager.Resources.Models.ResourceReferenceExtended System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Resources.Models.ResourceReferenceExtended System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ResourcesProvisioningState : System.IEquatable { @@ -1453,6 +1786,25 @@ public enum ProvisioningOperationKind public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ResourceStatusMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ResourceStatusMode(string value) { throw null; } + public static Azure.ResourceManager.Resources.Models.ResourceStatusMode DeleteFailed { get { throw null; } } + public static Azure.ResourceManager.Resources.Models.ResourceStatusMode Managed { get { throw null; } } + public static Azure.ResourceManager.Resources.Models.ResourceStatusMode RemoveDenyFailed { get { throw null; } } + public bool Equals(Azure.ResourceManager.Resources.Models.ResourceStatusMode 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.Resources.Models.ResourceStatusMode left, Azure.ResourceManager.Resources.Models.ResourceStatusMode right) { throw null; } + public static implicit operator Azure.ResourceManager.Resources.Models.ResourceStatusMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Resources.Models.ResourceStatusMode left, Azure.ResourceManager.Resources.Models.ResourceStatusMode right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ScriptCleanupOptions : System.IEquatable { private readonly object _dummy; @@ -1616,6 +1968,60 @@ public TemplateSpecVersionPatch() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct UnmanageActionManagementGroupMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public UnmanageActionManagementGroupMode(string value) { throw null; } + public static Azure.ResourceManager.Resources.Models.UnmanageActionManagementGroupMode Delete { get { throw null; } } + public static Azure.ResourceManager.Resources.Models.UnmanageActionManagementGroupMode Detach { get { throw null; } } + public bool Equals(Azure.ResourceManager.Resources.Models.UnmanageActionManagementGroupMode 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.Resources.Models.UnmanageActionManagementGroupMode left, Azure.ResourceManager.Resources.Models.UnmanageActionManagementGroupMode right) { throw null; } + public static implicit operator Azure.ResourceManager.Resources.Models.UnmanageActionManagementGroupMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Resources.Models.UnmanageActionManagementGroupMode left, Azure.ResourceManager.Resources.Models.UnmanageActionManagementGroupMode right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct UnmanageActionResourceGroupMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public UnmanageActionResourceGroupMode(string value) { throw null; } + public static Azure.ResourceManager.Resources.Models.UnmanageActionResourceGroupMode Delete { get { throw null; } } + public static Azure.ResourceManager.Resources.Models.UnmanageActionResourceGroupMode Detach { get { throw null; } } + public bool Equals(Azure.ResourceManager.Resources.Models.UnmanageActionResourceGroupMode 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.Resources.Models.UnmanageActionResourceGroupMode left, Azure.ResourceManager.Resources.Models.UnmanageActionResourceGroupMode right) { throw null; } + public static implicit operator Azure.ResourceManager.Resources.Models.UnmanageActionResourceGroupMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Resources.Models.UnmanageActionResourceGroupMode left, Azure.ResourceManager.Resources.Models.UnmanageActionResourceGroupMode right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct UnmanageActionResourceMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public UnmanageActionResourceMode(string value) { throw null; } + public static Azure.ResourceManager.Resources.Models.UnmanageActionResourceMode Delete { get { throw null; } } + public static Azure.ResourceManager.Resources.Models.UnmanageActionResourceMode Detach { get { throw null; } } + public bool Equals(Azure.ResourceManager.Resources.Models.UnmanageActionResourceMode 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.Resources.Models.UnmanageActionResourceMode left, Azure.ResourceManager.Resources.Models.UnmanageActionResourceMode right) { throw null; } + public static implicit operator Azure.ResourceManager.Resources.Models.UnmanageActionResourceMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Resources.Models.UnmanageActionResourceMode left, Azure.ResourceManager.Resources.Models.UnmanageActionResourceMode right) { throw null; } + public override string ToString() { throw null; } + } public partial class WhatIfChange : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal WhatIfChange() { } diff --git a/sdk/resources/Azure.ResourceManager.Resources/assets.json b/sdk/resources/Azure.ResourceManager.Resources/assets.json index 3b0250ff92d65..a5a3e921d094b 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/assets.json +++ b/sdk/resources/Azure.ResourceManager.Resources/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/resources/Azure.ResourceManager.Resources", - "Tag": "net/resources/Azure.ResourceManager.Resources_fefa73f2c4" + "Tag": "net/resources/Azure.ResourceManager.Resources_b91d977a7f" } diff --git a/sdk/resources/Azure.ResourceManager.Resources/samples/Generated/Samples/Sample_ArmDeploymentCollection.cs b/sdk/resources/Azure.ResourceManager.Resources/samples/Generated/Samples/Sample_ArmDeploymentCollection.cs index ce51954e5df6c..7825e52a8fa33 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/samples/Generated/Samples/Sample_ArmDeploymentCollection.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/samples/Generated/Samples/Sample_ArmDeploymentCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ArmDeploymentCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateDeploymentAtAGivenScope() { - // Generated from example definition: specification/resources/resource-manager/Microsoft.Resources/stable/2022-09-01/examples/PutDeploymentAtScope.json + // Generated from example definition: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/PutDeploymentAtScope.json // this example is just showing the usage of "Deployments_CreateOrUpdateAtScope" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/resources/Azure.ResourceManager.Resources/samples/Generated/Samples/Sample_ArmDeploymentResource.cs b/sdk/resources/Azure.ResourceManager.Resources/samples/Generated/Samples/Sample_ArmDeploymentResource.cs index f31af4caffde5..c98a85fb53476 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/samples/Generated/Samples/Sample_ArmDeploymentResource.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/samples/Generated/Samples/Sample_ArmDeploymentResource.cs @@ -21,7 +21,7 @@ public partial class Sample_ArmDeploymentResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateDeploymentAtAGivenScope() { - // Generated from example definition: specification/resources/resource-manager/Microsoft.Resources/stable/2022-09-01/examples/PutDeploymentAtScope.json + // Generated from example definition: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/PutDeploymentAtScope.json // this example is just showing the usage of "Deployments_CreateOrUpdateAtScope" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -70,7 +70,7 @@ public async Task Update_CreateDeploymentAtAGivenScope() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task WhatIf_PredictTemplateChangesAtManagementGroupScope() { - // Generated from example definition: specification/resources/resource-manager/Microsoft.Resources/stable/2022-09-01/examples/PostDeploymentWhatIfOnTenant.json + // Generated from example definition: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/PostDeploymentWhatIfOnTenant.json // this example is just showing the usage of "Deployments_WhatIfAtTenantScope" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -110,7 +110,7 @@ public async Task WhatIf_PredictTemplateChangesAtManagementGroupScope() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task WhatIf_PredictTemplateChangesAtManagementGroupScope1() { - // Generated from example definition: specification/resources/resource-manager/Microsoft.Resources/stable/2022-09-01/examples/PostDeploymentWhatIfOnManagementGroup.json + // Generated from example definition: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/PostDeploymentWhatIfOnManagementGroup.json // this example is just showing the usage of "Deployments_WhatIfAtManagementGroupScope" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -151,7 +151,7 @@ public async Task WhatIf_PredictTemplateChangesAtManagementGroupScope1() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task WhatIf_PredictTemplateChangesAtSubscriptionScope() { - // Generated from example definition: specification/resources/resource-manager/Microsoft.Resources/stable/2022-09-01/examples/PostDeploymentWhatIfOnSubscription.json + // Generated from example definition: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/PostDeploymentWhatIfOnSubscription.json // this example is just showing the usage of "Deployments_WhatIfAtSubscriptionScope" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -192,7 +192,7 @@ public async Task WhatIf_PredictTemplateChangesAtSubscriptionScope() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task WhatIf_PredictTemplateChangesAtResourceGroupScope() { - // Generated from example definition: specification/resources/resource-manager/Microsoft.Resources/stable/2022-09-01/examples/PostDeploymentWhatIfOnResourceGroup.json + // Generated from example definition: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/PostDeploymentWhatIfOnResourceGroup.json // this example is just showing the usage of "Deployments_WhatIf" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -231,7 +231,7 @@ public async Task WhatIf_PredictTemplateChangesAtResourceGroupScope() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CalculateDeploymentTemplateHash_CalculateTemplateHash() { - // Generated from example definition: specification/resources/resource-manager/Microsoft.Resources/stable/2022-09-01/examples/CalculateTemplateHash.json + // Generated from example definition: specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/examples/CalculateTemplateHash.json // this example is just showing the usage of "Deployments_CalculateTemplateHash" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Azure.ResourceManager.Resources.csproj b/sdk/resources/Azure.ResourceManager.Resources/src/Azure.ResourceManager.Resources.csproj index 8820e5463fc9b..b69250ae1cbf5 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Azure.ResourceManager.Resources.csproj +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Azure.ResourceManager.Resources.csproj @@ -1,6 +1,6 @@ - 1.8.0-beta.1 + 1.8.0 1.7.3 Azure.ResourceManager.Resources diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Custom/DeploymentStackData.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Custom/DeploymentStackData.cs new file mode 100644 index 0000000000000..9bad31a6e1884 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Custom/DeploymentStackData.cs @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Resources +{ + /// + /// A class representing the ArmDeploymentStack data model. + /// Deployment stack object. + /// + public partial class DeploymentStackData : ResourceData + { + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/ArmDeploymentCollection.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/ArmDeploymentCollection.cs index 6ba954164fc38..a52edf8589293 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/ArmDeploymentCollection.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/ArmDeploymentCollection.cs @@ -56,7 +56,7 @@ internal ArmDeploymentCollection(ArmClient client, ResourceIdentifier id) : base /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -105,7 +105,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -199,7 +199,7 @@ public virtual async Task> GetAsync(string deplo /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -244,7 +244,7 @@ public virtual Response Get(string deploymentName, Cancel /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -276,7 +276,7 @@ public virtual AsyncPageable GetAllAsync(string filter = /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -308,7 +308,7 @@ public virtual Pageable GetAll(string filter = null, int? /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual async Task> ExistsAsync(string deploymentName, Can /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -394,7 +394,7 @@ public virtual Response Exists(string deploymentName, CancellationToken ca /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -439,7 +439,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/ArmDeploymentResource.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/ArmDeploymentResource.cs index 93954d0884de5..d9a707ff1fd5f 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/ArmDeploymentResource.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/ArmDeploymentResource.cs @@ -107,7 +107,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -147,7 +147,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -187,7 +187,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task> UpdateAsync(WaitU /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, A /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -401,7 +401,7 @@ public virtual async Task CancelAsync(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -439,7 +439,7 @@ public virtual Response Cancel(CancellationToken cancellationToken = default) /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -485,7 +485,7 @@ public virtual async Task> ValidateAsy /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -531,7 +531,7 @@ public virtual ArmOperation Validate(WaitUntil wait /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -569,7 +569,7 @@ public virtual async Task> ExportTemplateAsy /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -607,7 +607,7 @@ public virtual Response ExportTemplate(CancellationTo /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -623,7 +623,7 @@ public virtual Response ExportTemplate(CancellationTo /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -639,7 +639,7 @@ public virtual Response ExportTemplate(CancellationTo /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -655,7 +655,7 @@ public virtual Response ExportTemplate(CancellationTo /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -732,7 +732,7 @@ public virtual async Task> WhatIfAsync(WaitU /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -748,7 +748,7 @@ public virtual async Task> WhatIfAsync(WaitU /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -764,7 +764,7 @@ public virtual async Task> WhatIfAsync(WaitU /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -780,7 +780,7 @@ public virtual async Task> WhatIfAsync(WaitU /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -857,7 +857,7 @@ public virtual ArmOperation WhatIf(WaitUntil waitUntil, A /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// ///
@@ -896,7 +896,7 @@ public virtual async Task> GetDeploymentOperati /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// ///
@@ -935,7 +935,7 @@ public virtual Response GetDeploymentOperation(string op /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// ///
@@ -962,7 +962,7 @@ public virtual AsyncPageable GetDeploymentOperationsAsyn /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// ///
@@ -989,7 +989,7 @@ public virtual Pageable GetDeploymentOperations(int? top /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -1027,7 +1027,7 @@ public virtual async Task CheckExistenceAsync(CancellationToken cancel /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -1065,7 +1065,7 @@ public virtual Response CheckExistence(CancellationToken cancellationToken = def /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -1127,7 +1127,7 @@ public virtual async Task> AddTagAsync(string ke /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -1189,7 +1189,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -1246,7 +1246,7 @@ public virtual async Task> SetTagsAsync(IDiction /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -1303,7 +1303,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -1363,7 +1363,7 @@ public virtual async Task> RemoveTagAsync(string /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/ArmResourcesModelFactory.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/ArmResourcesModelFactory.cs index c65c277dbfe9a..67a07cb580496 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/ArmResourcesModelFactory.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/ArmResourcesModelFactory.cs @@ -850,6 +850,129 @@ public static DecompiledFileDefinition DecompiledFileDefinition(string path = nu return new DecompiledFileDefinition(path, contents, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The template content. Use this element to pass the template syntax directly in the request rather than link to an existing template. It can be a JObject or well-formed JSON string. Use either the templateLink property or the template property, but not both. + /// The URI of the template. Use either the templateLink property or the template property, but not both. + /// A new instance for mocking. + public static DeploymentStackTemplateDefinition DeploymentStackTemplateDefinition(BinaryData template = null, DeploymentStacksTemplateLink templateLink = null) + { + return new DeploymentStackTemplateDefinition(template, templateLink, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The location of the Deployment stack. It cannot be changed after creation. It must be one of the supported Azure locations. + /// Deployment stack resource tags. + /// The error detail. + /// The template content. You use this element when you want to pass the template syntax directly in the request rather than link to an existing template. It can be a JObject or well-formed JSON string. Use either the templateLink property or the template property, but not both. + /// The URI of the template. Use either the templateLink property or the template property, but not both. + /// Name and value pairs that define the deployment parameters for the template. Use this element when providing the parameter values directly in the request, rather than linking to an existing parameter file. Use either the parametersLink property or the parameters property, but not both. + /// The URI of parameters file. Use this element to link to an existing parameters file. Use either the parametersLink property or the parameters property, but not both. + /// Defines the behavior of resources that are no longer managed after the Deployment stack is updated or deleted. + /// The debug setting of the deployment. + /// Flag to bypass service errors that indicate the stack resource list is not correctly synchronized. + /// The scope at which the initial deployment should be created. If a scope is not specified, it will default to the scope of the deployment stack. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroupId}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'). + /// Deployment stack description. Max length of 4096 characters. + /// Defines how resources deployed by the stack are locked. + /// State of the deployment stack. + /// The correlation id of the last Deployment stack upsert or delete operation. It is in GUID format and is used for tracing. + /// An array of resources that were detached during the most recent Deployment stack update. Detached means that the resource was removed from the template, but no relevant deletion operations were specified. So, the resource still exists while no longer being associated with the stack. + /// An array of resources that were deleted during the most recent Deployment stack update. Deleted means that the resource was removed from the template and relevant deletion operations were specified. + /// An array of resources that failed to reach goal state during the most recent update. Each resourceId is accompanied by an error message. + /// An array of resources currently managed by the deployment stack. + /// The resourceId of the deployment resource created by the deployment stack. + /// The outputs of the deployment resource created by the deployment stack. + /// The duration of the last successful Deployment stack update. + /// A new instance for mocking. + public static DeploymentStackData DeploymentStackData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AzureLocation? location = null, IDictionary tags = null, ResponseError error = null, BinaryData template = null, DeploymentStacksTemplateLink templateLink = null, IDictionary parameters = null, DeploymentStacksParametersLink parametersLink = null, ActionOnUnmanage actionOnUnmanage = null, string debugSettingDetailLevel = null, bool? bypassStackOutOfSyncError = null, string deploymentScope = null, string description = null, DenySettings denySettings = null, DeploymentStackProvisioningState? provisioningState = null, string correlationId = null, IEnumerable detachedResources = null, IEnumerable deletedResources = null, IEnumerable failedResources = null, IEnumerable resources = null, string deploymentId = null, BinaryData outputs = null, TimeSpan? duration = null) + { + tags ??= new Dictionary(); + parameters ??= new Dictionary(); + detachedResources ??= new List(); + deletedResources ??= new List(); + failedResources ??= new List(); + resources ??= new List(); + + return new DeploymentStackData( + id, + name, + resourceType, + systemData, + location, + tags, + error, + template, + templateLink, + parameters, + parametersLink, + actionOnUnmanage, + debugSettingDetailLevel != null ? new DeploymentStacksDebugSetting(debugSettingDetailLevel, serializedAdditionalRawData: null) : null, + bypassStackOutOfSyncError, + deploymentScope, + description, + denySettings, + provisioningState, + correlationId, + detachedResources?.ToList(), + deletedResources?.ToList(), + failedResources?.ToList(), + resources?.ToList(), + deploymentId, + outputs, + duration, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The resourceId of a resource managed by the deployment stack. + /// A new instance for mocking. + public static ResourceReferenceAutoGenerated ResourceReferenceAutoGenerated(string id = null) + { + return new ResourceReferenceAutoGenerated(id, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The resourceId of a resource managed by the deployment stack. + /// The error detail. + /// A new instance for mocking. + public static ResourceReferenceExtended ResourceReferenceExtended(string id = null, ResponseError error = null) + { + return new ResourceReferenceExtended(id, serializedAdditionalRawData: null, error); + } + + /// Initializes a new instance of . + /// The resourceId of a resource managed by the deployment stack. + /// Current management state of the resource in the deployment stack. + /// denyAssignment settings applied to the resource. + /// A new instance for mocking. + public static ManagedResourceReference ManagedResourceReference(string id = null, ResourceStatusMode? status = null, DenyStatusMode? denyStatus = null) + { + return new ManagedResourceReference(id, serializedAdditionalRawData: null, status, denyStatus); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The validation result details. + /// The error detail. + /// A new instance for mocking. + public static DeploymentStackValidateResult DeploymentStackValidateResult(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DeploymentStackValidateProperties properties = null, ResponseError error = null) + { + return new DeploymentStackValidateResult( + id, + name, + resourceType, + systemData, + properties, + error, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/DeploymentStackCollection.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/DeploymentStackCollection.cs new file mode 100644 index 0000000000000..df33115caa974 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/DeploymentStackCollection.cs @@ -0,0 +1,484 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ManagementGroups; + +namespace Azure.ResourceManager.Resources +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of , or . + /// To get a instance call the GetDeploymentStacks method from an instance of , or . + /// + public partial class DeploymentStackCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _deploymentStackClientDiagnostics; + private readonly DeploymentStacksRestOperations _deploymentStackRestClient; + + /// Initializes a new instance of the class for mocking. + protected DeploymentStackCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DeploymentStackCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _deploymentStackClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Resources", DeploymentStackResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DeploymentStackResource.ResourceType, out string deploymentStackApiVersion); + _deploymentStackRestClient = new DeploymentStacksRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, deploymentStackApiVersion); + } + + /// + /// Creates or updates a Deployment stack at specific scope. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName} + /// + /// + /// Operation Id + /// DeploymentStacks_CreateOrUpdateAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the deployment stack. + /// Deployment stack supplied to the operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string deploymentStackName, DeploymentStackData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(deploymentStackName, nameof(deploymentStackName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _deploymentStackClientDiagnostics.CreateScope("DeploymentStackCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _deploymentStackRestClient.CreateOrUpdateAtScopeAsync(Id, deploymentStackName, data, cancellationToken).ConfigureAwait(false); + var operation = new ResourcesArmOperation(new DeploymentStackOperationSource(Client), _deploymentStackClientDiagnostics, Pipeline, _deploymentStackRestClient.CreateCreateOrUpdateAtScopeRequest(Id, deploymentStackName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a Deployment stack at specific scope. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName} + /// + /// + /// Operation Id + /// DeploymentStacks_CreateOrUpdateAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the deployment stack. + /// Deployment stack supplied to the operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string deploymentStackName, DeploymentStackData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(deploymentStackName, nameof(deploymentStackName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _deploymentStackClientDiagnostics.CreateScope("DeploymentStackCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _deploymentStackRestClient.CreateOrUpdateAtScope(Id, deploymentStackName, data, cancellationToken); + var operation = new ResourcesArmOperation(new DeploymentStackOperationSource(Client), _deploymentStackClientDiagnostics, Pipeline, _deploymentStackRestClient.CreateCreateOrUpdateAtScopeRequest(Id, deploymentStackName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a Deployment stack with a given name at specific scope. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName} + /// + /// + /// Operation Id + /// DeploymentStacks_GetAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the deployment stack. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string deploymentStackName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(deploymentStackName, nameof(deploymentStackName)); + + using var scope = _deploymentStackClientDiagnostics.CreateScope("DeploymentStackCollection.Get"); + scope.Start(); + try + { + var response = await _deploymentStackRestClient.GetAtScopeAsync(Id, deploymentStackName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DeploymentStackResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a Deployment stack with a given name at specific scope. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName} + /// + /// + /// Operation Id + /// DeploymentStacks_GetAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the deployment stack. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string deploymentStackName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(deploymentStackName, nameof(deploymentStackName)); + + using var scope = _deploymentStackClientDiagnostics.CreateScope("DeploymentStackCollection.Get"); + scope.Start(); + try + { + var response = _deploymentStackRestClient.GetAtScope(Id, deploymentStackName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DeploymentStackResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists all the Deployment stacks within the specified scope. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks + /// + /// + /// Operation Id + /// DeploymentStacks_ListAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _deploymentStackRestClient.CreateListAtScopeRequest(Id); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _deploymentStackRestClient.CreateListAtScopeNextPageRequest(nextLink, Id); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DeploymentStackResource(Client, DeploymentStackData.DeserializeDeploymentStackData(e)), _deploymentStackClientDiagnostics, Pipeline, "DeploymentStackCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists all the Deployment stacks within the specified scope. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks + /// + /// + /// Operation Id + /// DeploymentStacks_ListAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _deploymentStackRestClient.CreateListAtScopeRequest(Id); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _deploymentStackRestClient.CreateListAtScopeNextPageRequest(nextLink, Id); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DeploymentStackResource(Client, DeploymentStackData.DeserializeDeploymentStackData(e)), _deploymentStackClientDiagnostics, Pipeline, "DeploymentStackCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName} + /// + /// + /// Operation Id + /// DeploymentStacks_GetAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the deployment stack. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string deploymentStackName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(deploymentStackName, nameof(deploymentStackName)); + + using var scope = _deploymentStackClientDiagnostics.CreateScope("DeploymentStackCollection.Exists"); + scope.Start(); + try + { + var response = await _deploymentStackRestClient.GetAtScopeAsync(Id, deploymentStackName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName} + /// + /// + /// Operation Id + /// DeploymentStacks_GetAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the deployment stack. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string deploymentStackName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(deploymentStackName, nameof(deploymentStackName)); + + using var scope = _deploymentStackClientDiagnostics.CreateScope("DeploymentStackCollection.Exists"); + scope.Start(); + try + { + var response = _deploymentStackRestClient.GetAtScope(Id, deploymentStackName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName} + /// + /// + /// Operation Id + /// DeploymentStacks_GetAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the deployment stack. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string deploymentStackName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(deploymentStackName, nameof(deploymentStackName)); + + using var scope = _deploymentStackClientDiagnostics.CreateScope("DeploymentStackCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _deploymentStackRestClient.GetAtScopeAsync(Id, deploymentStackName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DeploymentStackResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName} + /// + /// + /// Operation Id + /// DeploymentStacks_GetAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the deployment stack. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string deploymentStackName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(deploymentStackName, nameof(deploymentStackName)); + + using var scope = _deploymentStackClientDiagnostics.CreateScope("DeploymentStackCollection.GetIfExists"); + scope.Start(); + try + { + var response = _deploymentStackRestClient.GetAtScope(Id, deploymentStackName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DeploymentStackResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/DeploymentStackData.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/DeploymentStackData.Serialization.cs new file mode 100644 index 0000000000000..b87a44ec0eb74 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/DeploymentStackData.Serialization.cs @@ -0,0 +1,1100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.Resources +{ + public partial class DeploymentStackData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentStackData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location.Value); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + JsonSerializer.Serialize(writer, Error); + } + if (Optional.IsDefined(Template)) + { + writer.WritePropertyName("template"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Template); +#else + using (JsonDocument document = JsonDocument.Parse(Template)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsDefined(TemplateLink)) + { + writer.WritePropertyName("templateLink"u8); + writer.WriteObjectValue(TemplateLink, options); + } + if (Optional.IsCollectionDefined(Parameters)) + { + writer.WritePropertyName("parameters"u8); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(ParametersLink)) + { + writer.WritePropertyName("parametersLink"u8); + writer.WriteObjectValue(ParametersLink, options); + } + if (Optional.IsDefined(ActionOnUnmanage)) + { + writer.WritePropertyName("actionOnUnmanage"u8); + writer.WriteObjectValue(ActionOnUnmanage, options); + } + if (Optional.IsDefined(DebugSetting)) + { + writer.WritePropertyName("debugSetting"u8); + writer.WriteObjectValue(DebugSetting, options); + } + if (Optional.IsDefined(BypassStackOutOfSyncError)) + { + writer.WritePropertyName("bypassStackOutOfSyncError"u8); + writer.WriteBooleanValue(BypassStackOutOfSyncError.Value); + } + if (Optional.IsDefined(DeploymentScope)) + { + writer.WritePropertyName("deploymentScope"u8); + writer.WriteStringValue(DeploymentScope); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(DenySettings)) + { + writer.WritePropertyName("denySettings"u8); + writer.WriteObjectValue(DenySettings, options); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(CorrelationId)) + { + writer.WritePropertyName("correlationId"u8); + writer.WriteStringValue(CorrelationId); + } + if (options.Format != "W" && Optional.IsCollectionDefined(DetachedResources)) + { + writer.WritePropertyName("detachedResources"u8); + writer.WriteStartArray(); + foreach (var item in DetachedResources) + { + JsonSerializer.Serialize(writer, item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsCollectionDefined(DeletedResources)) + { + writer.WritePropertyName("deletedResources"u8); + writer.WriteStartArray(); + foreach (var item in DeletedResources) + { + JsonSerializer.Serialize(writer, item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsCollectionDefined(FailedResources)) + { + writer.WritePropertyName("failedResources"u8); + writer.WriteStartArray(); + foreach (var item in FailedResources) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsCollectionDefined(Resources)) + { + writer.WritePropertyName("resources"u8); + writer.WriteStartArray(); + foreach (var item in Resources) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(DeploymentId)) + { + writer.WritePropertyName("deploymentId"u8); + writer.WriteStringValue(DeploymentId); + } + if (options.Format != "W" && Optional.IsDefined(Outputs)) + { + writer.WritePropertyName("outputs"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Outputs); +#else + using (JsonDocument document = JsonDocument.Parse(Outputs)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (options.Format != "W" && Optional.IsDefined(Duration)) + { + writer.WritePropertyName("duration"u8); + writer.WriteStringValue(Duration.Value, "P"); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + DeploymentStackData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentStackData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeploymentStackData(document.RootElement, options); + } + + internal static DeploymentStackData DeserializeDeploymentStackData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AzureLocation? location = default; + IDictionary tags = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + ResponseError error = default; + BinaryData template = default; + DeploymentStacksTemplateLink templateLink = default; + IDictionary parameters = default; + DeploymentStacksParametersLink parametersLink = default; + ActionOnUnmanage actionOnUnmanage = default; + DeploymentStacksDebugSetting debugSetting = default; + bool? bypassStackOutOfSyncError = default; + string deploymentScope = default; + string description = default; + DenySettings denySettings = default; + DeploymentStackProvisioningState? provisioningState = default; + string correlationId = default; + IReadOnlyList detachedResources = default; + IReadOnlyList deletedResources = default; + IReadOnlyList failedResources = default; + IReadOnlyList resources = default; + string deploymentId = default; + BinaryData outputs = default; + TimeSpan? duration = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("location"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("error"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = JsonSerializer.Deserialize(property0.Value.GetRawText()); + continue; + } + if (property0.NameEquals("template"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + template = BinaryData.FromString(property0.Value.GetRawText()); + continue; + } + if (property0.NameEquals("templateLink"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + templateLink = DeploymentStacksTemplateLink.DeserializeDeploymentStacksTemplateLink(property0.Value, options); + continue; + } + if (property0.NameEquals("parameters"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + dictionary.Add(property1.Name, DeploymentParameter.DeserializeDeploymentParameter(property1.Value, options)); + } + parameters = dictionary; + continue; + } + if (property0.NameEquals("parametersLink"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + parametersLink = DeploymentStacksParametersLink.DeserializeDeploymentStacksParametersLink(property0.Value, options); + continue; + } + if (property0.NameEquals("actionOnUnmanage"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + actionOnUnmanage = ActionOnUnmanage.DeserializeActionOnUnmanage(property0.Value, options); + continue; + } + if (property0.NameEquals("debugSetting"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + debugSetting = DeploymentStacksDebugSetting.DeserializeDeploymentStacksDebugSetting(property0.Value, options); + continue; + } + if (property0.NameEquals("bypassStackOutOfSyncError"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + bypassStackOutOfSyncError = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("deploymentScope"u8)) + { + deploymentScope = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("description"u8)) + { + description = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("denySettings"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + denySettings = DenySettings.DeserializeDenySettings(property0.Value, options); + continue; + } + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new DeploymentStackProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("correlationId"u8)) + { + correlationId = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("detachedResources"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(JsonSerializer.Deserialize(item.GetRawText())); + } + detachedResources = array; + continue; + } + if (property0.NameEquals("deletedResources"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(JsonSerializer.Deserialize(item.GetRawText())); + } + deletedResources = array; + continue; + } + if (property0.NameEquals("failedResources"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(ResourceReferenceExtended.DeserializeResourceReferenceExtended(item, options)); + } + failedResources = array; + continue; + } + if (property0.NameEquals("resources"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(ManagedResourceReference.DeserializeManagedResourceReference(item, options)); + } + resources = array; + continue; + } + if (property0.NameEquals("deploymentId"u8)) + { + deploymentId = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("outputs"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + outputs = BinaryData.FromString(property0.Value.GetRawText()); + continue; + } + if (property0.NameEquals("duration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + duration = property0.Value.GetTimeSpan("P"); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeploymentStackData( + id, + name, + type, + systemData, + location, + tags ?? new ChangeTrackingDictionary(), + error, + template, + templateLink, + parameters ?? new ChangeTrackingDictionary(), + parametersLink, + actionOnUnmanage, + debugSetting, + bypassStackOutOfSyncError, + deploymentScope, + description, + denySettings, + provisioningState, + correlationId, + detachedResources ?? new ChangeTrackingList(), + deletedResources ?? new ChangeTrackingList(), + failedResources ?? new ChangeTrackingList(), + resources ?? new ChangeTrackingList(), + deploymentId, + outputs, + duration, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" location: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Location)) + { + builder.Append(" location: "); + builder.AppendLine($"'{Location.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Tags), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tags: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags.Any()) + { + builder.Append(" tags: "); + builder.AppendLine("{"); + foreach (var item in Tags) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + if (item.Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{item.Value}'''"); + } + else + { + builder.AppendLine($"'{item.Value}'"); + } + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Error), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" error: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Error)) + { + builder.Append(" error: "); + BicepSerializationHelpers.AppendChildObject(builder, Error, options, 4, false, " error: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Template), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" template: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Template)) + { + builder.Append(" template: "); + builder.AppendLine($"'{Template.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TemplateLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" templateLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TemplateLink)) + { + builder.Append(" templateLink: "); + BicepSerializationHelpers.AppendChildObject(builder, TemplateLink, options, 4, false, " templateLink: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Parameters), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" parameters: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Parameters)) + { + if (Parameters.Any()) + { + builder.Append(" parameters: "); + builder.AppendLine("{"); + foreach (var item in Parameters) + { + builder.Append($" '{item.Key}': "); + BicepSerializationHelpers.AppendChildObject(builder, item.Value, options, 6, false, " parameters: "); + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ParametersLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" parametersLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ParametersLink)) + { + builder.Append(" parametersLink: "); + BicepSerializationHelpers.AppendChildObject(builder, ParametersLink, options, 4, false, " parametersLink: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ActionOnUnmanage), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" actionOnUnmanage: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ActionOnUnmanage)) + { + builder.Append(" actionOnUnmanage: "); + BicepSerializationHelpers.AppendChildObject(builder, ActionOnUnmanage, options, 4, false, " actionOnUnmanage: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("DebugSettingDetailLevel", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" debugSetting: "); + builder.AppendLine("{"); + builder.AppendLine(" debugSetting: {"); + builder.Append(" detailLevel: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(DebugSetting)) + { + builder.Append(" debugSetting: "); + BicepSerializationHelpers.AppendChildObject(builder, DebugSetting, options, 4, false, " debugSetting: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(BypassStackOutOfSyncError), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" bypassStackOutOfSyncError: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(BypassStackOutOfSyncError)) + { + builder.Append(" bypassStackOutOfSyncError: "); + var boolValue = BypassStackOutOfSyncError.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DeploymentScope), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" deploymentScope: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DeploymentScope)) + { + builder.Append(" deploymentScope: "); + if (DeploymentScope.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DeploymentScope}'''"); + } + else + { + builder.AppendLine($"'{DeploymentScope}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DenySettings), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" denySettings: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DenySettings)) + { + builder.Append(" denySettings: "); + BicepSerializationHelpers.AppendChildObject(builder, DenySettings, options, 4, false, " denySettings: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + builder.AppendLine($"'{ProvisioningState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CorrelationId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" correlationId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CorrelationId)) + { + builder.Append(" correlationId: "); + if (CorrelationId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{CorrelationId}'''"); + } + else + { + builder.AppendLine($"'{CorrelationId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DetachedResources), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" detachedResources: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(DetachedResources)) + { + if (DetachedResources.Any()) + { + builder.Append(" detachedResources: "); + builder.AppendLine("["); + foreach (var item in DetachedResources) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " detachedResources: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DeletedResources), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" deletedResources: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(DeletedResources)) + { + if (DeletedResources.Any()) + { + builder.Append(" deletedResources: "); + builder.AppendLine("["); + foreach (var item in DeletedResources) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " deletedResources: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(FailedResources), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" failedResources: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(FailedResources)) + { + if (FailedResources.Any()) + { + builder.Append(" failedResources: "); + builder.AppendLine("["); + foreach (var item in FailedResources) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " failedResources: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Resources), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resources: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Resources)) + { + if (Resources.Any()) + { + builder.Append(" resources: "); + builder.AppendLine("["); + foreach (var item in Resources) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " resources: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DeploymentId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" deploymentId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DeploymentId)) + { + builder.Append(" deploymentId: "); + if (DeploymentId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DeploymentId}'''"); + } + else + { + builder.AppendLine($"'{DeploymentId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Outputs), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" outputs: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Outputs)) + { + builder.Append(" outputs: "); + builder.AppendLine($"'{Outputs.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Duration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" duration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Duration)) + { + builder.Append(" duration: "); + var formattedTimeSpan = TypeFormatters.ToString(Duration.Value, "P"); + builder.AppendLine($"'{formattedTimeSpan}'"); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DeploymentStackData)} does not support writing '{options.Format}' format."); + } + } + + DeploymentStackData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDeploymentStackData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeploymentStackData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/DeploymentStackData.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/DeploymentStackData.cs new file mode 100644 index 0000000000000..4078243e51012 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/DeploymentStackData.cs @@ -0,0 +1,257 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.Resources +{ + /// + /// A class representing the DeploymentStack data model. + /// Deployment stack object. + /// + public partial class DeploymentStackData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DeploymentStackData() + { + Tags = new ChangeTrackingDictionary(); + Parameters = new ChangeTrackingDictionary(); + DetachedResources = new ChangeTrackingList(); + DeletedResources = new ChangeTrackingList(); + FailedResources = new ChangeTrackingList(); + Resources = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The location of the Deployment stack. It cannot be changed after creation. It must be one of the supported Azure locations. + /// Deployment stack resource tags. + /// The error detail. + /// The template content. You use this element when you want to pass the template syntax directly in the request rather than link to an existing template. It can be a JObject or well-formed JSON string. Use either the templateLink property or the template property, but not both. + /// The URI of the template. Use either the templateLink property or the template property, but not both. + /// Name and value pairs that define the deployment parameters for the template. Use this element when providing the parameter values directly in the request, rather than linking to an existing parameter file. Use either the parametersLink property or the parameters property, but not both. + /// The URI of parameters file. Use this element to link to an existing parameters file. Use either the parametersLink property or the parameters property, but not both. + /// Defines the behavior of resources that are no longer managed after the Deployment stack is updated or deleted. + /// The debug setting of the deployment. + /// Flag to bypass service errors that indicate the stack resource list is not correctly synchronized. + /// The scope at which the initial deployment should be created. If a scope is not specified, it will default to the scope of the deployment stack. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroupId}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'). + /// Deployment stack description. Max length of 4096 characters. + /// Defines how resources deployed by the stack are locked. + /// State of the deployment stack. + /// The correlation id of the last Deployment stack upsert or delete operation. It is in GUID format and is used for tracing. + /// An array of resources that were detached during the most recent Deployment stack update. Detached means that the resource was removed from the template, but no relevant deletion operations were specified. So, the resource still exists while no longer being associated with the stack. + /// An array of resources that were deleted during the most recent Deployment stack update. Deleted means that the resource was removed from the template and relevant deletion operations were specified. + /// An array of resources that failed to reach goal state during the most recent update. Each resourceId is accompanied by an error message. + /// An array of resources currently managed by the deployment stack. + /// The resourceId of the deployment resource created by the deployment stack. + /// The outputs of the deployment resource created by the deployment stack. + /// The duration of the last successful Deployment stack update. + /// Keeps track of any properties unknown to the library. + internal DeploymentStackData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AzureLocation? location, IDictionary tags, ResponseError error, BinaryData template, DeploymentStacksTemplateLink templateLink, IDictionary parameters, DeploymentStacksParametersLink parametersLink, ActionOnUnmanage actionOnUnmanage, DeploymentStacksDebugSetting debugSetting, bool? bypassStackOutOfSyncError, string deploymentScope, string description, DenySettings denySettings, DeploymentStackProvisioningState? provisioningState, string correlationId, IReadOnlyList detachedResources, IReadOnlyList deletedResources, IReadOnlyList failedResources, IReadOnlyList resources, string deploymentId, BinaryData outputs, TimeSpan? duration, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Location = location; + Tags = tags; + Error = error; + Template = template; + TemplateLink = templateLink; + Parameters = parameters; + ParametersLink = parametersLink; + ActionOnUnmanage = actionOnUnmanage; + DebugSetting = debugSetting; + BypassStackOutOfSyncError = bypassStackOutOfSyncError; + DeploymentScope = deploymentScope; + Description = description; + DenySettings = denySettings; + ProvisioningState = provisioningState; + CorrelationId = correlationId; + DetachedResources = detachedResources; + DeletedResources = deletedResources; + FailedResources = failedResources; + Resources = resources; + DeploymentId = deploymentId; + Outputs = outputs; + Duration = duration; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The location of the Deployment stack. It cannot be changed after creation. It must be one of the supported Azure locations. + [WirePath("location")] + public AzureLocation? Location { get; set; } + /// Deployment stack resource tags. + [WirePath("tags")] + public IDictionary Tags { get; } + /// The error detail. + [WirePath("properties.error")] + public ResponseError Error { get; set; } + /// + /// The template content. You use this element when you want to pass the template syntax directly in the request rather than link to an existing template. It can be a JObject or well-formed JSON string. Use either the templateLink property or the template property, but not both. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("properties.template")] + public BinaryData Template { get; set; } + /// The URI of the template. Use either the templateLink property or the template property, but not both. + [WirePath("properties.templateLink")] + public DeploymentStacksTemplateLink TemplateLink { get; set; } + /// Name and value pairs that define the deployment parameters for the template. Use this element when providing the parameter values directly in the request, rather than linking to an existing parameter file. Use either the parametersLink property or the parameters property, but not both. + [WirePath("properties.parameters")] + public IDictionary Parameters { get; } + /// The URI of parameters file. Use this element to link to an existing parameters file. Use either the parametersLink property or the parameters property, but not both. + [WirePath("properties.parametersLink")] + public DeploymentStacksParametersLink ParametersLink { get; set; } + /// Defines the behavior of resources that are no longer managed after the Deployment stack is updated or deleted. + [WirePath("properties.actionOnUnmanage")] + public ActionOnUnmanage ActionOnUnmanage { get; set; } + /// The debug setting of the deployment. + internal DeploymentStacksDebugSetting DebugSetting { get; set; } + /// Specifies the type of information to log for debugging. The permitted values are none, requestContent, responseContent, or both requestContent and responseContent separated by a comma. The default is none. When setting this value, carefully consider the type of information that is being passed in during deployment. By logging information about the request or response, sensitive data that is retrieved through the deployment operations could potentially be exposed. + [WirePath("properties.debugSetting.detailLevel")] + public string DebugSettingDetailLevel + { + get => DebugSetting is null ? default : DebugSetting.DetailLevel; + set + { + if (DebugSetting is null) + DebugSetting = new DeploymentStacksDebugSetting(); + DebugSetting.DetailLevel = value; + } + } + + /// Flag to bypass service errors that indicate the stack resource list is not correctly synchronized. + [WirePath("properties.bypassStackOutOfSyncError")] + public bool? BypassStackOutOfSyncError { get; set; } + /// The scope at which the initial deployment should be created. If a scope is not specified, it will default to the scope of the deployment stack. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroupId}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}'). + [WirePath("properties.deploymentScope")] + public string DeploymentScope { get; set; } + /// Deployment stack description. Max length of 4096 characters. + [WirePath("properties.description")] + public string Description { get; set; } + /// Defines how resources deployed by the stack are locked. + [WirePath("properties.denySettings")] + public DenySettings DenySettings { get; set; } + /// State of the deployment stack. + [WirePath("properties.provisioningState")] + public DeploymentStackProvisioningState? ProvisioningState { get; } + /// The correlation id of the last Deployment stack upsert or delete operation. It is in GUID format and is used for tracing. + [WirePath("properties.correlationId")] + public string CorrelationId { get; } + /// An array of resources that were detached during the most recent Deployment stack update. Detached means that the resource was removed from the template, but no relevant deletion operations were specified. So, the resource still exists while no longer being associated with the stack. + [WirePath("properties.detachedResources")] + public IReadOnlyList DetachedResources { get; } + /// An array of resources that were deleted during the most recent Deployment stack update. Deleted means that the resource was removed from the template and relevant deletion operations were specified. + [WirePath("properties.deletedResources")] + public IReadOnlyList DeletedResources { get; } + /// An array of resources that failed to reach goal state during the most recent update. Each resourceId is accompanied by an error message. + [WirePath("properties.failedResources")] + public IReadOnlyList FailedResources { get; } + /// An array of resources currently managed by the deployment stack. + [WirePath("properties.resources")] + public IReadOnlyList Resources { get; } + /// The resourceId of the deployment resource created by the deployment stack. + [WirePath("properties.deploymentId")] + public string DeploymentId { get; } + /// + /// The outputs of the deployment resource created by the deployment stack. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("properties.outputs")] + public BinaryData Outputs { get; } + /// The duration of the last successful Deployment stack update. + [WirePath("properties.duration")] + public TimeSpan? Duration { get; } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/DeploymentStackResource.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/DeploymentStackResource.Serialization.cs new file mode 100644 index 0000000000000..fcb29ed47817c --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/DeploymentStackResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.Resources +{ + public partial class DeploymentStackResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DeploymentStackData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + DeploymentStackData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/DeploymentStackResource.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/DeploymentStackResource.cs new file mode 100644 index 0000000000000..94f9f1e5abac1 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/DeploymentStackResource.cs @@ -0,0 +1,860 @@ +// 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.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ManagementGroups; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.Resources +{ + /// + /// A Class representing a DeploymentStack along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDeploymentStackResource method. + /// Otherwise you can get one from its parent resource , or using the GetDeploymentStack method. + /// + public partial class DeploymentStackResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The scope. + /// The deploymentStackName. + public static ResourceIdentifier CreateResourceIdentifier(string scope, string deploymentStackName) + { + var resourceId = $"{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _deploymentStackClientDiagnostics; + private readonly DeploymentStacksRestOperations _deploymentStackRestClient; + private readonly DeploymentStackData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Resources/deploymentStacks"; + + /// Initializes a new instance of the class for mocking. + protected DeploymentStackResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DeploymentStackResource(ArmClient client, DeploymentStackData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DeploymentStackResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _deploymentStackClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Resources", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string deploymentStackApiVersion); + _deploymentStackRestClient = new DeploymentStacksRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, deploymentStackApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DeploymentStackData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets a Deployment stack with a given name at specific scope. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName} + /// + /// + /// Operation Id + /// DeploymentStacks_GetAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _deploymentStackClientDiagnostics.CreateScope("DeploymentStackResource.Get"); + scope.Start(); + try + { + var response = await _deploymentStackRestClient.GetAtScopeAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DeploymentStackResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a Deployment stack with a given name at specific scope. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName} + /// + /// + /// Operation Id + /// DeploymentStacks_GetAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _deploymentStackClientDiagnostics.CreateScope("DeploymentStackResource.Get"); + scope.Start(); + try + { + var response = _deploymentStackRestClient.GetAtScope(Id.Parent, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DeploymentStackResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a Deployment stack by name at specific scope. When operation completes, status code 200 returned without content. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName} + /// + /// + /// Operation Id + /// DeploymentStacks_DeleteAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Flag to indicate delete rather than detach for unmanaged resources. + /// Flag to indicate delete rather than detach for unmanaged resource groups. + /// Flag to indicate delete rather than detach for unmanaged management groups. + /// Flag to bypass service errors that indicate the stack resource list is not correctly synchronized. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, UnmanageActionResourceMode? unmanageActionResources = null, UnmanageActionResourceGroupMode? unmanageActionResourceGroups = null, UnmanageActionManagementGroupMode? unmanageActionManagementGroups = null, bool? bypassStackOutOfSyncError = null, CancellationToken cancellationToken = default) + { + using var scope = _deploymentStackClientDiagnostics.CreateScope("DeploymentStackResource.Delete"); + scope.Start(); + try + { + var response = await _deploymentStackRestClient.DeleteAtScopeAsync(Id.Parent, Id.Name, unmanageActionResources, unmanageActionResourceGroups, unmanageActionManagementGroups, bypassStackOutOfSyncError, cancellationToken).ConfigureAwait(false); + var operation = new ResourcesArmOperation(_deploymentStackClientDiagnostics, Pipeline, _deploymentStackRestClient.CreateDeleteAtScopeRequest(Id.Parent, Id.Name, unmanageActionResources, unmanageActionResourceGroups, unmanageActionManagementGroups, bypassStackOutOfSyncError).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a Deployment stack by name at specific scope. When operation completes, status code 200 returned without content. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName} + /// + /// + /// Operation Id + /// DeploymentStacks_DeleteAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Flag to indicate delete rather than detach for unmanaged resources. + /// Flag to indicate delete rather than detach for unmanaged resource groups. + /// Flag to indicate delete rather than detach for unmanaged management groups. + /// Flag to bypass service errors that indicate the stack resource list is not correctly synchronized. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, UnmanageActionResourceMode? unmanageActionResources = null, UnmanageActionResourceGroupMode? unmanageActionResourceGroups = null, UnmanageActionManagementGroupMode? unmanageActionManagementGroups = null, bool? bypassStackOutOfSyncError = null, CancellationToken cancellationToken = default) + { + using var scope = _deploymentStackClientDiagnostics.CreateScope("DeploymentStackResource.Delete"); + scope.Start(); + try + { + var response = _deploymentStackRestClient.DeleteAtScope(Id.Parent, Id.Name, unmanageActionResources, unmanageActionResourceGroups, unmanageActionManagementGroups, bypassStackOutOfSyncError, cancellationToken); + var operation = new ResourcesArmOperation(_deploymentStackClientDiagnostics, Pipeline, _deploymentStackRestClient.CreateDeleteAtScopeRequest(Id.Parent, Id.Name, unmanageActionResources, unmanageActionResourceGroups, unmanageActionManagementGroups, bypassStackOutOfSyncError).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a Deployment stack at specific scope. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName} + /// + /// + /// Operation Id + /// DeploymentStacks_CreateOrUpdateAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Deployment stack supplied to the operation. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DeploymentStackData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _deploymentStackClientDiagnostics.CreateScope("DeploymentStackResource.Update"); + scope.Start(); + try + { + var response = await _deploymentStackRestClient.CreateOrUpdateAtScopeAsync(Id.Parent, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new ResourcesArmOperation(new DeploymentStackOperationSource(Client), _deploymentStackClientDiagnostics, Pipeline, _deploymentStackRestClient.CreateCreateOrUpdateAtScopeRequest(Id.Parent, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a Deployment stack at specific scope. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName} + /// + /// + /// Operation Id + /// DeploymentStacks_CreateOrUpdateAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Deployment stack supplied to the operation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, DeploymentStackData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _deploymentStackClientDiagnostics.CreateScope("DeploymentStackResource.Update"); + scope.Start(); + try + { + var response = _deploymentStackRestClient.CreateOrUpdateAtScope(Id.Parent, Id.Name, data, cancellationToken); + var operation = new ResourcesArmOperation(new DeploymentStackOperationSource(Client), _deploymentStackClientDiagnostics, Pipeline, _deploymentStackRestClient.CreateCreateOrUpdateAtScopeRequest(Id.Parent, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Exports the template used to create the Deployment stack. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/exportTemplate + /// + /// + /// Operation Id + /// DeploymentStacks_ExportTemplateAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> ExportTemplateAsync(CancellationToken cancellationToken = default) + { + using var scope = _deploymentStackClientDiagnostics.CreateScope("DeploymentStackResource.ExportTemplate"); + scope.Start(); + try + { + var response = await _deploymentStackRestClient.ExportTemplateAtScopeAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Exports the template used to create the Deployment stack. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/exportTemplate + /// + /// + /// Operation Id + /// DeploymentStacks_ExportTemplateAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response ExportTemplate(CancellationToken cancellationToken = default) + { + using var scope = _deploymentStackClientDiagnostics.CreateScope("DeploymentStackResource.ExportTemplate"); + scope.Start(); + try + { + var response = _deploymentStackRestClient.ExportTemplateAtScope(Id.Parent, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Runs preflight validation on the specific scoped Deployment stack template to verify its acceptance to Azure Resource Manager. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/validate + /// + /// + /// Operation Id + /// DeploymentStacks_ValidateStackAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Deployment stack to validate. + /// The cancellation token to use. + /// is null. + public virtual async Task> ValidateStackAsync(WaitUntil waitUntil, DeploymentStackData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _deploymentStackClientDiagnostics.CreateScope("DeploymentStackResource.ValidateStack"); + scope.Start(); + try + { + var response = await _deploymentStackRestClient.ValidateStackAtScopeAsync(Id.Parent, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new ResourcesArmOperation(new DeploymentStackValidateResultOperationSource(), _deploymentStackClientDiagnostics, Pipeline, _deploymentStackRestClient.CreateValidateStackAtScopeRequest(Id.Parent, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Runs preflight validation on the specific scoped Deployment stack template to verify its acceptance to Azure Resource Manager. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/validate + /// + /// + /// Operation Id + /// DeploymentStacks_ValidateStackAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Deployment stack to validate. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation ValidateStack(WaitUntil waitUntil, DeploymentStackData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _deploymentStackClientDiagnostics.CreateScope("DeploymentStackResource.ValidateStack"); + scope.Start(); + try + { + var response = _deploymentStackRestClient.ValidateStackAtScope(Id.Parent, Id.Name, data, cancellationToken); + var operation = new ResourcesArmOperation(new DeploymentStackValidateResultOperationSource(), _deploymentStackClientDiagnostics, Pipeline, _deploymentStackRestClient.CreateValidateStackAtScopeRequest(Id.Parent, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName} + /// + /// + /// Operation Id + /// DeploymentStacks_GetAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _deploymentStackClientDiagnostics.CreateScope("DeploymentStackResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _deploymentStackRestClient.GetAtScopeAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DeploymentStackResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + current.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName} + /// + /// + /// Operation Id + /// DeploymentStacks_GetAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _deploymentStackClientDiagnostics.CreateScope("DeploymentStackResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _deploymentStackRestClient.GetAtScope(Id.Parent, Id.Name, cancellationToken); + return Response.FromValue(new DeploymentStackResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + current.Tags[key] = value; + var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName} + /// + /// + /// Operation Id + /// DeploymentStacks_GetAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _deploymentStackClientDiagnostics.CreateScope("DeploymentStackResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _deploymentStackRestClient.GetAtScopeAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DeploymentStackResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + current.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName} + /// + /// + /// Operation Id + /// DeploymentStacks_GetAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _deploymentStackClientDiagnostics.CreateScope("DeploymentStackResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _deploymentStackRestClient.GetAtScope(Id.Parent, Id.Name, cancellationToken); + return Response.FromValue(new DeploymentStackResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + current.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName} + /// + /// + /// Operation Id + /// DeploymentStacks_GetAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _deploymentStackClientDiagnostics.CreateScope("DeploymentStackResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _deploymentStackRestClient.GetAtScopeAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DeploymentStackResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + current.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, current, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName} + /// + /// + /// Operation Id + /// DeploymentStacks_GetAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _deploymentStackClientDiagnostics.CreateScope("DeploymentStackResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _deploymentStackRestClient.GetAtScope(Id.Parent, Id.Name, cancellationToken); + return Response.FromValue(new DeploymentStackResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + current.Tags.Remove(key); + var result = Update(WaitUntil.Completed, current, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/MockableResourcesArmClient.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/MockableResourcesArmClient.cs index 64ac6a54cd25d..3e29a2690d062 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/MockableResourcesArmClient.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/MockableResourcesArmClient.cs @@ -129,5 +129,17 @@ public virtual JitRequestResource GetJitRequestResource(ResourceIdentifier id) JitRequestResource.ValidateResourceId(id); return new JitRequestResource(Client, id); } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DeploymentStackResource GetDeploymentStackResource(ResourceIdentifier id) + { + DeploymentStackResource.ValidateResourceId(id); + return new DeploymentStackResource(Client, id); + } } } diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/MockableResourcesManagementGroupResource.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/MockableResourcesManagementGroupResource.cs index 2443bf69f6829..db346608464c2 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/MockableResourcesManagementGroupResource.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/MockableResourcesManagementGroupResource.cs @@ -53,7 +53,7 @@ public virtual ArmDeploymentCollection GetArmDeployments() /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task> GetArmDeploymentAsync /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -101,5 +101,74 @@ public virtual Response GetArmDeployment(string deploymen { return GetArmDeployments().Get(deploymentName, cancellationToken); } + + /// Gets a collection of DeploymentStackResources in the ManagementGroupResource. + /// An object representing collection of DeploymentStackResources and their operations over a DeploymentStackResource. + public virtual DeploymentStackCollection GetDeploymentStacks() + { + return GetCachedClient(client => new DeploymentStackCollection(client, Id)); + } + + /// + /// Gets a Deployment stack with a given name at specific scope. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName} + /// + /// + /// Operation Id + /// DeploymentStacks_GetAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the deployment stack. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDeploymentStackAsync(string deploymentStackName, CancellationToken cancellationToken = default) + { + return await GetDeploymentStacks().GetAsync(deploymentStackName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a Deployment stack with a given name at specific scope. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName} + /// + /// + /// Operation Id + /// DeploymentStacks_GetAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the deployment stack. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDeploymentStack(string deploymentStackName, CancellationToken cancellationToken = default) + { + return GetDeploymentStacks().Get(deploymentStackName, cancellationToken); + } } } diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/MockableResourcesResourceGroupResource.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/MockableResourcesResourceGroupResource.cs index e181c9315fa90..6bdcc9a0735a1 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/MockableResourcesResourceGroupResource.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/MockableResourcesResourceGroupResource.cs @@ -194,7 +194,7 @@ public virtual ArmDeploymentCollection GetArmDeployments() /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task> GetArmDeploymentAsync /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -449,5 +449,74 @@ public virtual Response GetJitRequest(string jitRequestName, { return GetJitRequests().Get(jitRequestName, cancellationToken); } + + /// Gets a collection of DeploymentStackResources in the ResourceGroupResource. + /// An object representing collection of DeploymentStackResources and their operations over a DeploymentStackResource. + public virtual DeploymentStackCollection GetDeploymentStacks() + { + return GetCachedClient(client => new DeploymentStackCollection(client, Id)); + } + + /// + /// Gets a Deployment stack with a given name at specific scope. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName} + /// + /// + /// Operation Id + /// DeploymentStacks_GetAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the deployment stack. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDeploymentStackAsync(string deploymentStackName, CancellationToken cancellationToken = default) + { + return await GetDeploymentStacks().GetAsync(deploymentStackName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a Deployment stack with a given name at specific scope. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName} + /// + /// + /// Operation Id + /// DeploymentStacks_GetAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the deployment stack. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDeploymentStack(string deploymentStackName, CancellationToken cancellationToken = default) + { + return GetDeploymentStacks().Get(deploymentStackName, cancellationToken); + } } } diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/MockableResourcesSubscriptionResource.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/MockableResourcesSubscriptionResource.cs index 0de7283b20b69..ea1f959ac617d 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/MockableResourcesSubscriptionResource.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/MockableResourcesSubscriptionResource.cs @@ -78,7 +78,7 @@ public virtual ArmDeploymentCollection GetArmDeployments() /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetArmDeploymentAsync /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -127,6 +127,75 @@ public virtual Response GetArmDeployment(string deploymen return GetArmDeployments().Get(deploymentName, cancellationToken); } + /// Gets a collection of DeploymentStackResources in the SubscriptionResource. + /// An object representing collection of DeploymentStackResources and their operations over a DeploymentStackResource. + public virtual DeploymentStackCollection GetDeploymentStacks() + { + return GetCachedClient(client => new DeploymentStackCollection(client, Id)); + } + + /// + /// Gets a Deployment stack with a given name at specific scope. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName} + /// + /// + /// Operation Id + /// DeploymentStacks_GetAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the deployment stack. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDeploymentStackAsync(string deploymentStackName, CancellationToken cancellationToken = default) + { + return await GetDeploymentStacks().GetAsync(deploymentStackName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a Deployment stack with a given name at specific scope. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName} + /// + /// + /// Operation Id + /// DeploymentStacks_GetAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the deployment stack. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDeploymentStack(string deploymentStackName, CancellationToken cancellationToken = default) + { + return GetDeploymentStacks().Get(deploymentStackName, cancellationToken); + } + /// /// Lists all the Template Specs within the specified subscriptions. /// diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/MockableResourcesTenantResource.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/MockableResourcesTenantResource.cs index f85a4cc5e69ac..e2d6772f74f5e 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/MockableResourcesTenantResource.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/MockableResourcesTenantResource.cs @@ -61,7 +61,7 @@ public virtual ArmDeploymentCollection GetArmDeployments() /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -92,7 +92,7 @@ public virtual async Task> GetArmDeploymentAsync /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -123,7 +123,7 @@ public virtual Response GetArmDeployment(string deploymen /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual async Task> CalculateDeploymentTempl /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/ResourcesExtensions.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/ResourcesExtensions.cs index 70f2b84a07ffa..7ab531c5154d6 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/ResourcesExtensions.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/ResourcesExtensions.cs @@ -195,6 +195,25 @@ public static JitRequestResource GetJitRequestResource(this ArmClient client, Re return GetMockableResourcesArmClient(client).GetJitRequestResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DeploymentStackResource GetDeploymentStackResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableResourcesArmClient(client).GetDeploymentStackResource(id); + } + /// /// Gets a collection of ArmDeploymentResources in the ManagementGroupResource. /// @@ -225,7 +244,7 @@ public static ArmDeploymentCollection GetArmDeployments(this ManagementGroupReso /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -263,7 +282,7 @@ public static async Task> GetArmDeploymentAsync( /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -288,6 +307,99 @@ public static Response GetArmDeployment(this ManagementGr return GetMockableResourcesManagementGroupResource(managementGroupResource).GetArmDeployment(deploymentName, cancellationToken); } + /// + /// Gets a collection of DeploymentStackResources in the ManagementGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of DeploymentStackResources and their operations over a DeploymentStackResource. + public static DeploymentStackCollection GetDeploymentStacks(this ManagementGroupResource managementGroupResource) + { + Argument.AssertNotNull(managementGroupResource, nameof(managementGroupResource)); + + return GetMockableResourcesManagementGroupResource(managementGroupResource).GetDeploymentStacks(); + } + + /// + /// Gets a Deployment stack with a given name at specific scope. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName} + /// + /// + /// Operation Id + /// DeploymentStacks_GetAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of the deployment stack. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetDeploymentStackAsync(this ManagementGroupResource managementGroupResource, string deploymentStackName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(managementGroupResource, nameof(managementGroupResource)); + + return await GetMockableResourcesManagementGroupResource(managementGroupResource).GetDeploymentStackAsync(deploymentStackName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a Deployment stack with a given name at specific scope. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName} + /// + /// + /// Operation Id + /// DeploymentStacks_GetAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of the deployment stack. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetDeploymentStack(this ManagementGroupResource managementGroupResource, string deploymentStackName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(managementGroupResource, nameof(managementGroupResource)); + + return GetMockableResourcesManagementGroupResource(managementGroupResource).GetDeploymentStack(deploymentStackName, cancellationToken); + } + /// /// Gets a collection of TemplateSpecResources in the ResourceGroupResource. /// @@ -506,7 +618,7 @@ public static ArmDeploymentCollection GetArmDeployments(this ResourceGroupResour /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -544,7 +656,7 @@ public static async Task> GetArmDeploymentAsync( /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -848,6 +960,99 @@ public static Response GetJitRequest(this ResourceGroupResou return GetMockableResourcesResourceGroupResource(resourceGroupResource).GetJitRequest(jitRequestName, cancellationToken); } + /// + /// Gets a collection of DeploymentStackResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of DeploymentStackResources and their operations over a DeploymentStackResource. + public static DeploymentStackCollection GetDeploymentStacks(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableResourcesResourceGroupResource(resourceGroupResource).GetDeploymentStacks(); + } + + /// + /// Gets a Deployment stack with a given name at specific scope. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName} + /// + /// + /// Operation Id + /// DeploymentStacks_GetAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of the deployment stack. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetDeploymentStackAsync(this ResourceGroupResource resourceGroupResource, string deploymentStackName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableResourcesResourceGroupResource(resourceGroupResource).GetDeploymentStackAsync(deploymentStackName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a Deployment stack with a given name at specific scope. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName} + /// + /// + /// Operation Id + /// DeploymentStacks_GetAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of the deployment stack. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetDeploymentStack(this ResourceGroupResource resourceGroupResource, string deploymentStackName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableResourcesResourceGroupResource(resourceGroupResource).GetDeploymentStack(deploymentStackName, cancellationToken); + } + /// /// Gets a collection of ArmDeploymentResources in the SubscriptionResource. /// @@ -878,7 +1083,7 @@ public static ArmDeploymentCollection GetArmDeployments(this SubscriptionResourc /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -916,7 +1121,7 @@ public static async Task> GetArmDeploymentAsync( /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -941,6 +1146,99 @@ public static Response GetArmDeployment(this Subscription return GetMockableResourcesSubscriptionResource(subscriptionResource).GetArmDeployment(deploymentName, cancellationToken); } + /// + /// Gets a collection of DeploymentStackResources in the SubscriptionResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of DeploymentStackResources and their operations over a DeploymentStackResource. + public static DeploymentStackCollection GetDeploymentStacks(this SubscriptionResource subscriptionResource) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableResourcesSubscriptionResource(subscriptionResource).GetDeploymentStacks(); + } + + /// + /// Gets a Deployment stack with a given name at specific scope. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName} + /// + /// + /// Operation Id + /// DeploymentStacks_GetAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of the deployment stack. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetDeploymentStackAsync(this SubscriptionResource subscriptionResource, string deploymentStackName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableResourcesSubscriptionResource(subscriptionResource).GetDeploymentStackAsync(deploymentStackName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a Deployment stack with a given name at specific scope. + /// + /// + /// Request Path + /// /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName} + /// + /// + /// Operation Id + /// DeploymentStacks_GetAtScope + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of the deployment stack. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetDeploymentStack(this SubscriptionResource subscriptionResource, string deploymentStackName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableResourcesSubscriptionResource(subscriptionResource).GetDeploymentStack(deploymentStackName, cancellationToken); + } + /// /// Lists all the Template Specs within the specified subscriptions. /// @@ -1325,7 +1623,7 @@ public static ArmDeploymentCollection GetArmDeployments(this TenantResource tena /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -1363,7 +1661,7 @@ public static async Task> GetArmDeploymentAsync( /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -1401,7 +1699,7 @@ public static Response GetArmDeployment(this TenantResour /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource @@ -1437,7 +1735,7 @@ public static async Task> CalculateDeploymentTempla /// /// /// Default Api Version - /// 2022-09-01 + /// 2024-03-01 /// /// /// Resource diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/LongRunningOperation/DeploymentStackOperationSource.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/LongRunningOperation/DeploymentStackOperationSource.cs new file mode 100644 index 0000000000000..24d61a2df9aa0 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/LongRunningOperation/DeploymentStackOperationSource.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.Resources +{ + internal class DeploymentStackOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal DeploymentStackOperationSource(ArmClient client) + { + _client = client; + } + + DeploymentStackResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = DeploymentStackData.DeserializeDeploymentStackData(document.RootElement); + return new DeploymentStackResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = DeploymentStackData.DeserializeDeploymentStackData(document.RootElement); + return new DeploymentStackResource(_client, data); + } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/LongRunningOperation/DeploymentStackValidateResultOperationSource.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/LongRunningOperation/DeploymentStackValidateResultOperationSource.cs new file mode 100644 index 0000000000000..fbbceab1542f4 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/LongRunningOperation/DeploymentStackValidateResultOperationSource.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.Resources +{ + internal class DeploymentStackValidateResultOperationSource : IOperationSource + { + DeploymentStackValidateResult IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return DeploymentStackValidateResult.DeserializeDeploymentStackValidateResult(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return DeploymentStackValidateResult.DeserializeDeploymentStackValidateResult(document.RootElement); + } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ActionOnUnmanage.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ActionOnUnmanage.Serialization.cs new file mode 100644 index 0000000000000..fd97fd37c2ff5 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ActionOnUnmanage.Serialization.cs @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Resources.Models +{ + public partial class ActionOnUnmanage : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ActionOnUnmanage)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("resources"u8); + writer.WriteStringValue(Resources.ToString()); + if (Optional.IsDefined(ResourceGroups)) + { + writer.WritePropertyName("resourceGroups"u8); + writer.WriteStringValue(ResourceGroups.Value.ToString()); + } + if (Optional.IsDefined(ManagementGroups)) + { + writer.WritePropertyName("managementGroups"u8); + writer.WriteStringValue(ManagementGroups.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ActionOnUnmanage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ActionOnUnmanage)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeActionOnUnmanage(document.RootElement, options); + } + + internal static ActionOnUnmanage DeserializeActionOnUnmanage(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DeploymentStacksDeleteDetachEnum resources = default; + DeploymentStacksDeleteDetachEnum? resourceGroups = default; + DeploymentStacksDeleteDetachEnum? managementGroups = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resources"u8)) + { + resources = new DeploymentStacksDeleteDetachEnum(property.Value.GetString()); + continue; + } + if (property.NameEquals("resourceGroups"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceGroups = new DeploymentStacksDeleteDetachEnum(property.Value.GetString()); + continue; + } + if (property.NameEquals("managementGroups"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + managementGroups = new DeploymentStacksDeleteDetachEnum(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ActionOnUnmanage(resources, resourceGroups, managementGroups, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Resources), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resources: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" resources: "); + builder.AppendLine($"'{Resources.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceGroups), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceGroups: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceGroups)) + { + builder.Append(" resourceGroups: "); + builder.AppendLine($"'{ResourceGroups.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ManagementGroups), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" managementGroups: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ManagementGroups)) + { + builder.Append(" managementGroups: "); + builder.AppendLine($"'{ManagementGroups.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ActionOnUnmanage)} does not support writing '{options.Format}' format."); + } + } + + ActionOnUnmanage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeActionOnUnmanage(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ActionOnUnmanage)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ActionOnUnmanage.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ActionOnUnmanage.cs new file mode 100644 index 0000000000000..e5bfff9878bd2 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ActionOnUnmanage.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Resources.Models +{ + /// Defines the behavior of resources that are no longer managed after the stack is updated or deleted. + public partial class ActionOnUnmanage + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Specifies an action for a newly unmanaged resource. Delete will attempt to delete the resource from Azure. Detach will leave the resource in it's current state. + public ActionOnUnmanage(DeploymentStacksDeleteDetachEnum resources) + { + Resources = resources; + } + + /// Initializes a new instance of . + /// Specifies an action for a newly unmanaged resource. Delete will attempt to delete the resource from Azure. Detach will leave the resource in it's current state. + /// Specifies an action for a newly unmanaged resource. Delete will attempt to delete the resource from Azure. Detach will leave the resource in it's current state. + /// Specifies an action for a newly unmanaged resource. Delete will attempt to delete the resource from Azure. Detach will leave the resource in it's current state. + /// Keeps track of any properties unknown to the library. + internal ActionOnUnmanage(DeploymentStacksDeleteDetachEnum resources, DeploymentStacksDeleteDetachEnum? resourceGroups, DeploymentStacksDeleteDetachEnum? managementGroups, IDictionary serializedAdditionalRawData) + { + Resources = resources; + ResourceGroups = resourceGroups; + ManagementGroups = managementGroups; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ActionOnUnmanage() + { + } + + /// Specifies an action for a newly unmanaged resource. Delete will attempt to delete the resource from Azure. Detach will leave the resource in it's current state. + [WirePath("resources")] + public DeploymentStacksDeleteDetachEnum Resources { get; set; } + /// Specifies an action for a newly unmanaged resource. Delete will attempt to delete the resource from Azure. Detach will leave the resource in it's current state. + [WirePath("resourceGroups")] + public DeploymentStacksDeleteDetachEnum? ResourceGroups { get; set; } + /// Specifies an action for a newly unmanaged resource. Delete will attempt to delete the resource from Azure. Detach will leave the resource in it's current state. + [WirePath("managementGroups")] + public DeploymentStacksDeleteDetachEnum? ManagementGroups { get; set; } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DenySettings.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DenySettings.Serialization.cs new file mode 100644 index 0000000000000..5c3e2c64f4eec --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DenySettings.Serialization.cs @@ -0,0 +1,303 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Resources.Models +{ + public partial class DenySettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DenySettings)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.ToString()); + if (Optional.IsCollectionDefined(ExcludedPrincipals)) + { + writer.WritePropertyName("excludedPrincipals"u8); + writer.WriteStartArray(); + foreach (var item in ExcludedPrincipals) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ExcludedActions)) + { + writer.WritePropertyName("excludedActions"u8); + writer.WriteStartArray(); + foreach (var item in ExcludedActions) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(ApplyToChildScopes)) + { + writer.WritePropertyName("applyToChildScopes"u8); + writer.WriteBooleanValue(ApplyToChildScopes.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + DenySettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DenySettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDenySettings(document.RootElement, options); + } + + internal static DenySettings DeserializeDenySettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DenySettingsMode mode = default; + IList excludedPrincipals = default; + IList excludedActions = default; + bool? applyToChildScopes = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mode"u8)) + { + mode = new DenySettingsMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("excludedPrincipals"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + excludedPrincipals = array; + continue; + } + if (property.NameEquals("excludedActions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + excludedActions = array; + continue; + } + if (property.NameEquals("applyToChildScopes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + applyToChildScopes = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DenySettings(mode, excludedPrincipals ?? new ChangeTrackingList(), excludedActions ?? new ChangeTrackingList(), applyToChildScopes, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Mode), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" mode: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" mode: "); + builder.AppendLine($"'{Mode.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExcludedPrincipals), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" excludedPrincipals: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ExcludedPrincipals)) + { + if (ExcludedPrincipals.Any()) + { + builder.Append(" excludedPrincipals: "); + builder.AppendLine("["); + foreach (var item in ExcludedPrincipals) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExcludedActions), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" excludedActions: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ExcludedActions)) + { + if (ExcludedActions.Any()) + { + builder.Append(" excludedActions: "); + builder.AppendLine("["); + foreach (var item in ExcludedActions) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApplyToChildScopes), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" applyToChildScopes: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApplyToChildScopes)) + { + builder.Append(" applyToChildScopes: "); + var boolValue = ApplyToChildScopes.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DenySettings)} does not support writing '{options.Format}' format."); + } + } + + DenySettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDenySettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DenySettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DenySettings.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DenySettings.cs new file mode 100644 index 0000000000000..e55173d84192c --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DenySettings.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Resources.Models +{ + /// Defines how resources deployed by the Deployment stack are locked. + public partial class DenySettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// denySettings Mode that defines denied actions. + public DenySettings(DenySettingsMode mode) + { + Mode = mode; + ExcludedPrincipals = new ChangeTrackingList(); + ExcludedActions = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// denySettings Mode that defines denied actions. + /// List of AAD principal IDs excluded from the lock. Up to 5 principals are permitted. + /// List of role-based management operations that are excluded from the denySettings. Up to 200 actions are permitted. If the denySetting mode is set to 'denyWriteAndDelete', then the following actions are automatically appended to 'excludedActions': '*\/read' and 'Microsoft.Authorization/locks/delete'. If the denySetting mode is set to 'denyDelete', then the following actions are automatically appended to 'excludedActions': 'Microsoft.Authorization/locks/delete'. Duplicate actions will be removed. + /// DenySettings will be applied to child resource scopes of every managed resource with a deny assignment. + /// Keeps track of any properties unknown to the library. + internal DenySettings(DenySettingsMode mode, IList excludedPrincipals, IList excludedActions, bool? applyToChildScopes, IDictionary serializedAdditionalRawData) + { + Mode = mode; + ExcludedPrincipals = excludedPrincipals; + ExcludedActions = excludedActions; + ApplyToChildScopes = applyToChildScopes; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DenySettings() + { + } + + /// denySettings Mode that defines denied actions. + [WirePath("mode")] + public DenySettingsMode Mode { get; set; } + /// List of AAD principal IDs excluded from the lock. Up to 5 principals are permitted. + [WirePath("excludedPrincipals")] + public IList ExcludedPrincipals { get; } + /// List of role-based management operations that are excluded from the denySettings. Up to 200 actions are permitted. If the denySetting mode is set to 'denyWriteAndDelete', then the following actions are automatically appended to 'excludedActions': '*\/read' and 'Microsoft.Authorization/locks/delete'. If the denySetting mode is set to 'denyDelete', then the following actions are automatically appended to 'excludedActions': 'Microsoft.Authorization/locks/delete'. Duplicate actions will be removed. + [WirePath("excludedActions")] + public IList ExcludedActions { get; } + /// DenySettings will be applied to child resource scopes of every managed resource with a deny assignment. + [WirePath("applyToChildScopes")] + public bool? ApplyToChildScopes { get; set; } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DenySettingsMode.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DenySettingsMode.cs new file mode 100644 index 0000000000000..4ff2064c8b802 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DenySettingsMode.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.Resources.Models +{ + /// denySettings Mode that defines denied actions. + public readonly partial struct DenySettingsMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DenySettingsMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DenyDeleteValue = "denyDelete"; + private const string DenyWriteAndDeleteValue = "denyWriteAndDelete"; + private const string NoneValue = "none"; + + /// Authorized users are able to read and modify the resources, but cannot delete. + public static DenySettingsMode DenyDelete { get; } = new DenySettingsMode(DenyDeleteValue); + /// Authorized users can read from a resource, but cannot modify or delete it. + public static DenySettingsMode DenyWriteAndDelete { get; } = new DenySettingsMode(DenyWriteAndDeleteValue); + /// No denyAssignments have been applied. + public static DenySettingsMode None { get; } = new DenySettingsMode(NoneValue); + /// Determines if two values are the same. + public static bool operator ==(DenySettingsMode left, DenySettingsMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DenySettingsMode left, DenySettingsMode right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DenySettingsMode(string value) => new DenySettingsMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DenySettingsMode other && Equals(other); + /// + public bool Equals(DenySettingsMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DenyStatusMode.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DenyStatusMode.cs new file mode 100644 index 0000000000000..4fdd08e77956d --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DenyStatusMode.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Resources.Models +{ + /// denyAssignment settings applied to the resource. + public readonly partial struct DenyStatusMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DenyStatusMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DenyDeleteValue = "denyDelete"; + private const string NotSupportedValue = "notSupported"; + private const string InapplicableValue = "inapplicable"; + private const string DenyWriteAndDeleteValue = "denyWriteAndDelete"; + private const string RemovedBySystemValue = "removedBySystem"; + private const string NoneValue = "none"; + + /// Authorized users are able to read and modify the resources, but cannot delete. + public static DenyStatusMode DenyDelete { get; } = new DenyStatusMode(DenyDeleteValue); + /// Resource type does not support denyAssignments. + public static DenyStatusMode NotSupported { get; } = new DenyStatusMode(NotSupportedValue); + /// denyAssignments are not supported on resources outside the scope of the deployment stack. + public static DenyStatusMode Inapplicable { get; } = new DenyStatusMode(InapplicableValue); + /// Authorized users can only read from a resource, but cannot modify or delete it. + public static DenyStatusMode DenyWriteAndDelete { get; } = new DenyStatusMode(DenyWriteAndDeleteValue); + /// Deny assignment has been removed by Azure due to a resource management change (management group move, etc.). + public static DenyStatusMode RemovedBySystem { get; } = new DenyStatusMode(RemovedBySystemValue); + /// No denyAssignments have been applied. + public static DenyStatusMode None { get; } = new DenyStatusMode(NoneValue); + /// Determines if two values are the same. + public static bool operator ==(DenyStatusMode left, DenyStatusMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DenyStatusMode left, DenyStatusMode right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DenyStatusMode(string value) => new DenyStatusMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DenyStatusMode other && Equals(other); + /// + public bool Equals(DenyStatusMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentParameter.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentParameter.Serialization.cs new file mode 100644 index 0000000000000..2042c0e1d26c6 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentParameter.Serialization.cs @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Resources.Models +{ + public partial class DeploymentParameter : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentParameter)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Value); +#else + using (JsonDocument document = JsonDocument.Parse(Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsDefined(DeploymentParameterType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(DeploymentParameterType); + } + if (Optional.IsDefined(Reference)) + { + writer.WritePropertyName("reference"u8); + writer.WriteObjectValue(Reference, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + DeploymentParameter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentParameter)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeploymentParameter(document.RootElement, options); + } + + internal static DeploymentParameter DeserializeDeploymentParameter(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BinaryData value = default; + string type = default; + KeyVaultParameterReference reference = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + value = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("reference"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + reference = KeyVaultParameterReference.DeserializeKeyVaultParameterReference(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeploymentParameter(value, type, reference, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + builder.AppendLine($"'{Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DeploymentParameterType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DeploymentParameterType)) + { + builder.Append(" type: "); + if (DeploymentParameterType.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DeploymentParameterType}'''"); + } + else + { + builder.AppendLine($"'{DeploymentParameterType}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Reference), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" reference: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Reference)) + { + builder.Append(" reference: "); + BicepSerializationHelpers.AppendChildObject(builder, Reference, options, 2, false, " reference: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DeploymentParameter)} does not support writing '{options.Format}' format."); + } + } + + DeploymentParameter IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDeploymentParameter(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeploymentParameter)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentParameter.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentParameter.cs new file mode 100644 index 0000000000000..e810c066b72f0 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentParameter.cs @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Resources.Models +{ + /// Deployment parameter for the template. + public partial class DeploymentParameter + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DeploymentParameter() + { + } + + /// Initializes a new instance of . + /// Input value to the parameter. + /// Type of the value. + /// Azure Key Vault parameter reference. + /// Keeps track of any properties unknown to the library. + internal DeploymentParameter(BinaryData value, string deploymentParameterType, KeyVaultParameterReference reference, IDictionary serializedAdditionalRawData) + { + Value = value; + DeploymentParameterType = deploymentParameterType; + Reference = reference; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// Input value to the parameter. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("value")] + public BinaryData Value { get; set; } + /// Type of the value. + [WirePath("type")] + public string DeploymentParameterType { get; set; } + /// Azure Key Vault parameter reference. + [WirePath("reference")] + public KeyVaultParameterReference Reference { get; set; } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStackListResult.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStackListResult.Serialization.cs new file mode 100644 index 0000000000000..205eeb12438fe --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStackListResult.Serialization.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Resources.Models +{ + internal partial class DeploymentStackListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentStackListResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + DeploymentStackListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentStackListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeploymentStackListResult(document.RootElement, options); + } + + internal static DeploymentStackListResult DeserializeDeploymentStackListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DeploymentStackData.DeserializeDeploymentStackData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeploymentStackListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DeploymentStackListResult)} does not support writing '{options.Format}' format."); + } + } + + DeploymentStackListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDeploymentStackListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeploymentStackListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStackListResult.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStackListResult.cs new file mode 100644 index 0000000000000..8b6ba6dd33ca0 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStackListResult.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Resources.Models +{ + /// List of Deployment stacks. + internal partial class DeploymentStackListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DeploymentStackListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// An array of Deployment stacks. + /// The URL to use for getting the next set of results. + /// Keeps track of any properties unknown to the library. + internal DeploymentStackListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// An array of Deployment stacks. + public IReadOnlyList Value { get; } + /// The URL to use for getting the next set of results. + public string NextLink { get; } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStackProvisioningState.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStackProvisioningState.cs new file mode 100644 index 0000000000000..904280f2d6e18 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStackProvisioningState.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Resources.Models +{ + /// State of the deployment stack. + public readonly partial struct DeploymentStackProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DeploymentStackProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CreatingValue = "creating"; + private const string ValidatingValue = "validating"; + private const string WaitingValue = "waiting"; + private const string DeployingValue = "deploying"; + private const string CancelingValue = "canceling"; + private const string UpdatingDenyAssignmentsValue = "updatingDenyAssignments"; + private const string DeletingResourcesValue = "deletingResources"; + private const string SucceededValue = "succeeded"; + private const string FailedValue = "failed"; + private const string CanceledValue = "canceled"; + private const string DeletingValue = "deleting"; + + /// creating. + public static DeploymentStackProvisioningState Creating { get; } = new DeploymentStackProvisioningState(CreatingValue); + /// validating. + public static DeploymentStackProvisioningState Validating { get; } = new DeploymentStackProvisioningState(ValidatingValue); + /// waiting. + public static DeploymentStackProvisioningState Waiting { get; } = new DeploymentStackProvisioningState(WaitingValue); + /// deploying. + public static DeploymentStackProvisioningState Deploying { get; } = new DeploymentStackProvisioningState(DeployingValue); + /// canceling. + public static DeploymentStackProvisioningState Canceling { get; } = new DeploymentStackProvisioningState(CancelingValue); + /// updatingDenyAssignments. + public static DeploymentStackProvisioningState UpdatingDenyAssignments { get; } = new DeploymentStackProvisioningState(UpdatingDenyAssignmentsValue); + /// deletingResources. + public static DeploymentStackProvisioningState DeletingResources { get; } = new DeploymentStackProvisioningState(DeletingResourcesValue); + /// succeeded. + public static DeploymentStackProvisioningState Succeeded { get; } = new DeploymentStackProvisioningState(SucceededValue); + /// failed. + public static DeploymentStackProvisioningState Failed { get; } = new DeploymentStackProvisioningState(FailedValue); + /// canceled. + public static DeploymentStackProvisioningState Canceled { get; } = new DeploymentStackProvisioningState(CanceledValue); + /// deleting. + public static DeploymentStackProvisioningState Deleting { get; } = new DeploymentStackProvisioningState(DeletingValue); + /// Determines if two values are the same. + public static bool operator ==(DeploymentStackProvisioningState left, DeploymentStackProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DeploymentStackProvisioningState left, DeploymentStackProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DeploymentStackProvisioningState(string value) => new DeploymentStackProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DeploymentStackProvisioningState other && Equals(other); + /// + public bool Equals(DeploymentStackProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStackTemplateDefinition.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStackTemplateDefinition.Serialization.cs new file mode 100644 index 0000000000000..86e22ee4f18ac --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStackTemplateDefinition.Serialization.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Resources.Models +{ + public partial class DeploymentStackTemplateDefinition : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentStackTemplateDefinition)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Template)) + { + writer.WritePropertyName("template"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Template); +#else + using (JsonDocument document = JsonDocument.Parse(Template)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsDefined(TemplateLink)) + { + writer.WritePropertyName("templateLink"u8); + writer.WriteObjectValue(TemplateLink, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + DeploymentStackTemplateDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentStackTemplateDefinition)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeploymentStackTemplateDefinition(document.RootElement, options); + } + + internal static DeploymentStackTemplateDefinition DeserializeDeploymentStackTemplateDefinition(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BinaryData template = default; + DeploymentStacksTemplateLink templateLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("template"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + template = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("templateLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + templateLink = DeploymentStacksTemplateLink.DeserializeDeploymentStacksTemplateLink(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeploymentStackTemplateDefinition(template, templateLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Template), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" template: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Template)) + { + builder.Append(" template: "); + builder.AppendLine($"'{Template.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TemplateLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" templateLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TemplateLink)) + { + builder.Append(" templateLink: "); + BicepSerializationHelpers.AppendChildObject(builder, TemplateLink, options, 2, false, " templateLink: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DeploymentStackTemplateDefinition)} does not support writing '{options.Format}' format."); + } + } + + DeploymentStackTemplateDefinition IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDeploymentStackTemplateDefinition(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeploymentStackTemplateDefinition)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStackTemplateDefinition.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStackTemplateDefinition.cs new file mode 100644 index 0000000000000..df86a78d43da0 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStackTemplateDefinition.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Resources.Models +{ + /// Export Template specific properties of the Deployment stack. + public partial class DeploymentStackTemplateDefinition + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DeploymentStackTemplateDefinition() + { + } + + /// Initializes a new instance of . + /// The template content. Use this element to pass the template syntax directly in the request rather than link to an existing template. It can be a JObject or well-formed JSON string. Use either the templateLink property or the template property, but not both. + /// The URI of the template. Use either the templateLink property or the template property, but not both. + /// Keeps track of any properties unknown to the library. + internal DeploymentStackTemplateDefinition(BinaryData template, DeploymentStacksTemplateLink templateLink, IDictionary serializedAdditionalRawData) + { + Template = template; + TemplateLink = templateLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// The template content. Use this element to pass the template syntax directly in the request rather than link to an existing template. It can be a JObject or well-formed JSON string. Use either the templateLink property or the template property, but not both. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("template")] + public BinaryData Template { get; } + /// The URI of the template. Use either the templateLink property or the template property, but not both. + [WirePath("templateLink")] + public DeploymentStacksTemplateLink TemplateLink { get; } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStackValidateProperties.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStackValidateProperties.Serialization.cs new file mode 100644 index 0000000000000..42cf2b4ee0638 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStackValidateProperties.Serialization.cs @@ -0,0 +1,429 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Resources.Models +{ + public partial class DeploymentStackValidateProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentStackValidateProperties)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(ActionOnUnmanage)) + { + writer.WritePropertyName("actionOnUnmanage"u8); + writer.WriteObjectValue(ActionOnUnmanage, options); + } + if (Optional.IsDefined(CorrelationId)) + { + writer.WritePropertyName("correlationId"u8); + writer.WriteStringValue(CorrelationId); + } + if (Optional.IsDefined(DenySettings)) + { + writer.WritePropertyName("denySettings"u8); + writer.WriteObjectValue(DenySettings, options); + } + if (Optional.IsDefined(DeploymentScope)) + { + writer.WritePropertyName("deploymentScope"u8); + writer.WriteStringValue(DeploymentScope); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsCollectionDefined(Parameters)) + { + writer.WritePropertyName("parameters"u8); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(TemplateLink)) + { + writer.WritePropertyName("templateLink"u8); + writer.WriteObjectValue(TemplateLink, options); + } + if (Optional.IsCollectionDefined(ValidatedResources)) + { + writer.WritePropertyName("validatedResources"u8); + writer.WriteStartArray(); + foreach (var item in ValidatedResources) + { + JsonSerializer.Serialize(writer, item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + DeploymentStackValidateProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentStackValidateProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeploymentStackValidateProperties(document.RootElement, options); + } + + internal static DeploymentStackValidateProperties DeserializeDeploymentStackValidateProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ActionOnUnmanage actionOnUnmanage = default; + string correlationId = default; + DenySettings denySettings = default; + string deploymentScope = default; + string description = default; + IDictionary parameters = default; + DeploymentStacksTemplateLink templateLink = default; + IList validatedResources = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("actionOnUnmanage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + actionOnUnmanage = ActionOnUnmanage.DeserializeActionOnUnmanage(property.Value, options); + continue; + } + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("denySettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + denySettings = DenySettings.DeserializeDenySettings(property.Value, options); + continue; + } + if (property.NameEquals("deploymentScope"u8)) + { + deploymentScope = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("parameters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, DeploymentParameter.DeserializeDeploymentParameter(property0.Value, options)); + } + parameters = dictionary; + continue; + } + if (property.NameEquals("templateLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + templateLink = DeploymentStacksTemplateLink.DeserializeDeploymentStacksTemplateLink(property.Value, options); + continue; + } + if (property.NameEquals("validatedResources"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(JsonSerializer.Deserialize(item.GetRawText())); + } + validatedResources = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeploymentStackValidateProperties( + actionOnUnmanage, + correlationId, + denySettings, + deploymentScope, + description, + parameters ?? new ChangeTrackingDictionary(), + templateLink, + validatedResources ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ActionOnUnmanage), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" actionOnUnmanage: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ActionOnUnmanage)) + { + builder.Append(" actionOnUnmanage: "); + BicepSerializationHelpers.AppendChildObject(builder, ActionOnUnmanage, options, 2, false, " actionOnUnmanage: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CorrelationId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" correlationId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CorrelationId)) + { + builder.Append(" correlationId: "); + if (CorrelationId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{CorrelationId}'''"); + } + else + { + builder.AppendLine($"'{CorrelationId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DenySettings), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" denySettings: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DenySettings)) + { + builder.Append(" denySettings: "); + BicepSerializationHelpers.AppendChildObject(builder, DenySettings, options, 2, false, " denySettings: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DeploymentScope), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" deploymentScope: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DeploymentScope)) + { + builder.Append(" deploymentScope: "); + if (DeploymentScope.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DeploymentScope}'''"); + } + else + { + builder.AppendLine($"'{DeploymentScope}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Parameters), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" parameters: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Parameters)) + { + if (Parameters.Any()) + { + builder.Append(" parameters: "); + builder.AppendLine("{"); + foreach (var item in Parameters) + { + builder.Append($" '{item.Key}': "); + BicepSerializationHelpers.AppendChildObject(builder, item.Value, options, 4, false, " parameters: "); + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TemplateLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" templateLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TemplateLink)) + { + builder.Append(" templateLink: "); + BicepSerializationHelpers.AppendChildObject(builder, TemplateLink, options, 2, false, " templateLink: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ValidatedResources), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" validatedResources: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ValidatedResources)) + { + if (ValidatedResources.Any()) + { + builder.Append(" validatedResources: "); + builder.AppendLine("["); + foreach (var item in ValidatedResources) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " validatedResources: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DeploymentStackValidateProperties)} does not support writing '{options.Format}' format."); + } + } + + DeploymentStackValidateProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDeploymentStackValidateProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeploymentStackValidateProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStackValidateProperties.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStackValidateProperties.cs new file mode 100644 index 0000000000000..f3ec759d52759 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStackValidateProperties.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Resources.Models +{ + /// The Deployment stack validation result details. + public partial class DeploymentStackValidateProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DeploymentStackValidateProperties() + { + Parameters = new ChangeTrackingDictionary(); + ValidatedResources = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Defines the behavior of resources that are no longer managed after the Deployment stack is updated or deleted. + /// The correlation id of the Deployment stack validate operation. It is in GUID format and is used for tracing. + /// The Deployment stack deny settings. + /// The Deployment stack deployment scope. + /// The Deployment stack validation description. + /// Deployment parameters. + /// The URI of the template. + /// The array of resources that were validated. + /// Keeps track of any properties unknown to the library. + internal DeploymentStackValidateProperties(ActionOnUnmanage actionOnUnmanage, string correlationId, DenySettings denySettings, string deploymentScope, string description, IDictionary parameters, DeploymentStacksTemplateLink templateLink, IList validatedResources, IDictionary serializedAdditionalRawData) + { + ActionOnUnmanage = actionOnUnmanage; + CorrelationId = correlationId; + DenySettings = denySettings; + DeploymentScope = deploymentScope; + Description = description; + Parameters = parameters; + TemplateLink = templateLink; + ValidatedResources = validatedResources; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Defines the behavior of resources that are no longer managed after the Deployment stack is updated or deleted. + [WirePath("actionOnUnmanage")] + public ActionOnUnmanage ActionOnUnmanage { get; set; } + /// The correlation id of the Deployment stack validate operation. It is in GUID format and is used for tracing. + [WirePath("correlationId")] + public string CorrelationId { get; set; } + /// The Deployment stack deny settings. + [WirePath("denySettings")] + public DenySettings DenySettings { get; set; } + /// The Deployment stack deployment scope. + [WirePath("deploymentScope")] + public string DeploymentScope { get; set; } + /// The Deployment stack validation description. + [WirePath("description")] + public string Description { get; set; } + /// Deployment parameters. + [WirePath("parameters")] + public IDictionary Parameters { get; } + /// The URI of the template. + [WirePath("templateLink")] + public DeploymentStacksTemplateLink TemplateLink { get; set; } + /// The array of resources that were validated. + [WirePath("validatedResources")] + public IList ValidatedResources { get; } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStackValidateResult.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStackValidateResult.Serialization.cs new file mode 100644 index 0000000000000..1656965c7f31d --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStackValidateResult.Serialization.cs @@ -0,0 +1,298 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Resources.Models +{ + public partial class DeploymentStackValidateResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentStackValidateResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + JsonSerializer.Serialize(writer, Error); + } + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + DeploymentStackValidateResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentStackValidateResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeploymentStackValidateResult(document.RootElement, options); + } + + internal static DeploymentStackValidateResult DeserializeDeploymentStackValidateResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DeploymentStackValidateProperties properties = default; + ResponseError error = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = DeploymentStackValidateProperties.DeserializeDeploymentStackValidateProperties(property.Value, options); + continue; + } + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeploymentStackValidateResult( + id, + name, + type, + systemData, + properties, + error, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Properties), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" properties: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Properties)) + { + builder.Append(" properties: "); + BicepSerializationHelpers.AppendChildObject(builder, Properties, options, 2, false, " properties: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Error), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" error: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Error)) + { + builder.Append(" error: "); + BicepSerializationHelpers.AppendChildObject(builder, Error, options, 2, false, " error: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DeploymentStackValidateResult)} does not support writing '{options.Format}' format."); + } + } + + DeploymentStackValidateResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDeploymentStackValidateResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeploymentStackValidateResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStackValidateResult.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStackValidateResult.cs new file mode 100644 index 0000000000000..cb00b8393f8be --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStackValidateResult.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Resources.Models +{ + /// The Deployment stack validation result. + public partial class DeploymentStackValidateResult : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DeploymentStackValidateResult() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The validation result details. + /// The error detail. + /// Keeps track of any properties unknown to the library. + internal DeploymentStackValidateResult(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DeploymentStackValidateProperties properties, ResponseError error, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + Error = error; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The validation result details. + [WirePath("properties")] + public DeploymentStackValidateProperties Properties { get; set; } + /// The error detail. + [WirePath("error")] + public ResponseError Error { get; set; } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStacksDebugSetting.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStacksDebugSetting.Serialization.cs new file mode 100644 index 0000000000000..a2c8a225d0952 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStacksDebugSetting.Serialization.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Resources.Models +{ + internal partial class DeploymentStacksDebugSetting : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentStacksDebugSetting)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(DetailLevel)) + { + writer.WritePropertyName("detailLevel"u8); + writer.WriteStringValue(DetailLevel); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + DeploymentStacksDebugSetting IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentStacksDebugSetting)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeploymentStacksDebugSetting(document.RootElement, options); + } + + internal static DeploymentStacksDebugSetting DeserializeDeploymentStacksDebugSetting(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string detailLevel = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("detailLevel"u8)) + { + detailLevel = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeploymentStacksDebugSetting(detailLevel, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DetailLevel), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" detailLevel: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DetailLevel)) + { + builder.Append(" detailLevel: "); + if (DetailLevel.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DetailLevel}'''"); + } + else + { + builder.AppendLine($"'{DetailLevel}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DeploymentStacksDebugSetting)} does not support writing '{options.Format}' format."); + } + } + + DeploymentStacksDebugSetting IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDeploymentStacksDebugSetting(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeploymentStacksDebugSetting)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStacksDebugSetting.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStacksDebugSetting.cs new file mode 100644 index 0000000000000..b1c41ea88b884 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStacksDebugSetting.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Resources.Models +{ + /// The debug setting. + internal partial class DeploymentStacksDebugSetting + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DeploymentStacksDebugSetting() + { + } + + /// Initializes a new instance of . + /// Specifies the type of information to log for debugging. The permitted values are none, requestContent, responseContent, or both requestContent and responseContent separated by a comma. The default is none. When setting this value, carefully consider the type of information that is being passed in during deployment. By logging information about the request or response, sensitive data that is retrieved through the deployment operations could potentially be exposed. + /// Keeps track of any properties unknown to the library. + internal DeploymentStacksDebugSetting(string detailLevel, IDictionary serializedAdditionalRawData) + { + DetailLevel = detailLevel; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Specifies the type of information to log for debugging. The permitted values are none, requestContent, responseContent, or both requestContent and responseContent separated by a comma. The default is none. When setting this value, carefully consider the type of information that is being passed in during deployment. By logging information about the request or response, sensitive data that is retrieved through the deployment operations could potentially be exposed. + [WirePath("detailLevel")] + public string DetailLevel { get; set; } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStacksDeleteDetachEnum.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStacksDeleteDetachEnum.cs new file mode 100644 index 0000000000000..b59810cebb3b7 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStacksDeleteDetachEnum.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.Resources.Models +{ + /// Specifies an action for a newly unmanaged resource. Delete will attempt to delete the resource from Azure. Detach will leave the resource in it's current state. + public readonly partial struct DeploymentStacksDeleteDetachEnum : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DeploymentStacksDeleteDetachEnum(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DeleteValue = "delete"; + private const string DetachValue = "detach"; + + /// delete. + public static DeploymentStacksDeleteDetachEnum Delete { get; } = new DeploymentStacksDeleteDetachEnum(DeleteValue); + /// detach. + public static DeploymentStacksDeleteDetachEnum Detach { get; } = new DeploymentStacksDeleteDetachEnum(DetachValue); + /// Determines if two values are the same. + public static bool operator ==(DeploymentStacksDeleteDetachEnum left, DeploymentStacksDeleteDetachEnum right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DeploymentStacksDeleteDetachEnum left, DeploymentStacksDeleteDetachEnum right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DeploymentStacksDeleteDetachEnum(string value) => new DeploymentStacksDeleteDetachEnum(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DeploymentStacksDeleteDetachEnum other && Equals(other); + /// + public bool Equals(DeploymentStacksDeleteDetachEnum other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStacksParametersLink.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStacksParametersLink.Serialization.cs new file mode 100644 index 0000000000000..2f4566cc45368 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStacksParametersLink.Serialization.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Resources.Models +{ + public partial class DeploymentStacksParametersLink : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentStacksParametersLink)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("uri"u8); + writer.WriteStringValue(Uri.AbsoluteUri); + if (Optional.IsDefined(ContentVersion)) + { + writer.WritePropertyName("contentVersion"u8); + writer.WriteStringValue(ContentVersion); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + DeploymentStacksParametersLink IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentStacksParametersLink)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeploymentStacksParametersLink(document.RootElement, options); + } + + internal static DeploymentStacksParametersLink DeserializeDeploymentStacksParametersLink(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Uri uri = default; + string contentVersion = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("uri"u8)) + { + uri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("contentVersion"u8)) + { + contentVersion = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeploymentStacksParametersLink(uri, contentVersion, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Uri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" uri: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Uri)) + { + builder.Append(" uri: "); + builder.AppendLine($"'{Uri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ContentVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" contentVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ContentVersion)) + { + builder.Append(" contentVersion: "); + if (ContentVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ContentVersion}'''"); + } + else + { + builder.AppendLine($"'{ContentVersion}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DeploymentStacksParametersLink)} does not support writing '{options.Format}' format."); + } + } + + DeploymentStacksParametersLink IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDeploymentStacksParametersLink(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeploymentStacksParametersLink)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStacksParametersLink.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStacksParametersLink.cs new file mode 100644 index 0000000000000..72e7f5a22a7fa --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStacksParametersLink.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Resources.Models +{ + /// Entity representing the reference to the deployment parameters. + public partial class DeploymentStacksParametersLink + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The URI of the parameters file. + /// is null. + public DeploymentStacksParametersLink(Uri uri) + { + Argument.AssertNotNull(uri, nameof(uri)); + + Uri = uri; + } + + /// Initializes a new instance of . + /// The URI of the parameters file. + /// If included, must match the ContentVersion in the template. + /// Keeps track of any properties unknown to the library. + internal DeploymentStacksParametersLink(Uri uri, string contentVersion, IDictionary serializedAdditionalRawData) + { + Uri = uri; + ContentVersion = contentVersion; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DeploymentStacksParametersLink() + { + } + + /// The URI of the parameters file. + [WirePath("uri")] + public Uri Uri { get; set; } + /// If included, must match the ContentVersion in the template. + [WirePath("contentVersion")] + public string ContentVersion { get; set; } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStacksTemplateLink.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStacksTemplateLink.Serialization.cs new file mode 100644 index 0000000000000..dc4c06562d8df --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStacksTemplateLink.Serialization.cs @@ -0,0 +1,301 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Resources.Models +{ + public partial class DeploymentStacksTemplateLink : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentStacksTemplateLink)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Uri)) + { + writer.WritePropertyName("uri"u8); + writer.WriteStringValue(Uri.AbsoluteUri); + } + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsDefined(RelativePath)) + { + writer.WritePropertyName("relativePath"u8); + writer.WriteStringValue(RelativePath); + } + if (Optional.IsDefined(QueryString)) + { + writer.WritePropertyName("queryString"u8); + writer.WriteStringValue(QueryString); + } + if (Optional.IsDefined(ContentVersion)) + { + writer.WritePropertyName("contentVersion"u8); + writer.WriteStringValue(ContentVersion); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + DeploymentStacksTemplateLink IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentStacksTemplateLink)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeploymentStacksTemplateLink(document.RootElement, options); + } + + internal static DeploymentStacksTemplateLink DeserializeDeploymentStacksTemplateLink(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Uri uri = default; + string id = default; + string relativePath = default; + string queryString = default; + string contentVersion = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("uri"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + uri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("relativePath"u8)) + { + relativePath = property.Value.GetString(); + continue; + } + if (property.NameEquals("queryString"u8)) + { + queryString = property.Value.GetString(); + continue; + } + if (property.NameEquals("contentVersion"u8)) + { + contentVersion = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeploymentStacksTemplateLink( + uri, + id, + relativePath, + queryString, + contentVersion, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Uri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" uri: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Uri)) + { + builder.Append(" uri: "); + builder.AppendLine($"'{Uri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + if (Id.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Id}'''"); + } + else + { + builder.AppendLine($"'{Id}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RelativePath), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" relativePath: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(RelativePath)) + { + builder.Append(" relativePath: "); + if (RelativePath.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{RelativePath}'''"); + } + else + { + builder.AppendLine($"'{RelativePath}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(QueryString), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" queryString: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(QueryString)) + { + builder.Append(" queryString: "); + if (QueryString.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{QueryString}'''"); + } + else + { + builder.AppendLine($"'{QueryString}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ContentVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" contentVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ContentVersion)) + { + builder.Append(" contentVersion: "); + if (ContentVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ContentVersion}'''"); + } + else + { + builder.AppendLine($"'{ContentVersion}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DeploymentStacksTemplateLink)} does not support writing '{options.Format}' format."); + } + } + + DeploymentStacksTemplateLink IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDeploymentStacksTemplateLink(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeploymentStacksTemplateLink)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStacksTemplateLink.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStacksTemplateLink.cs new file mode 100644 index 0000000000000..6da14d9e0ac6d --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/DeploymentStacksTemplateLink.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Resources.Models +{ + /// Entity representing the reference to the template. + public partial class DeploymentStacksTemplateLink + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DeploymentStacksTemplateLink() + { + } + + /// Initializes a new instance of . + /// The URI of the template to deploy. Use either the uri or id property, but not both. + /// The resourceId of a Template Spec. Use either the id or uri property, but not both. + /// The relativePath property can be used to deploy a linked template at a location relative to the parent. If the parent template was linked with a TemplateSpec, this will reference an artifact in the TemplateSpec. If the parent was linked with a URI, the child deployment will be a combination of the parent and relativePath URIs. + /// The query string (for example, a SAS token) to be used with the templateLink URI. + /// If included, must match the ContentVersion in the template. + /// Keeps track of any properties unknown to the library. + internal DeploymentStacksTemplateLink(Uri uri, string id, string relativePath, string queryString, string contentVersion, IDictionary serializedAdditionalRawData) + { + Uri = uri; + Id = id; + RelativePath = relativePath; + QueryString = queryString; + ContentVersion = contentVersion; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The URI of the template to deploy. Use either the uri or id property, but not both. + [WirePath("uri")] + public Uri Uri { get; set; } + /// The resourceId of a Template Spec. Use either the id or uri property, but not both. + [WirePath("id")] + public string Id { get; set; } + /// The relativePath property can be used to deploy a linked template at a location relative to the parent. If the parent template was linked with a TemplateSpec, this will reference an artifact in the TemplateSpec. If the parent was linked with a URI, the child deployment will be a combination of the parent and relativePath URIs. + [WirePath("relativePath")] + public string RelativePath { get; set; } + /// The query string (for example, a SAS token) to be used with the templateLink URI. + [WirePath("queryString")] + public string QueryString { get; set; } + /// If included, must match the ContentVersion in the template. + [WirePath("contentVersion")] + public string ContentVersion { get; set; } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/KeyVaultParameterReference.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/KeyVaultParameterReference.Serialization.cs new file mode 100644 index 0000000000000..19da8ae7126ba --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/KeyVaultParameterReference.Serialization.cs @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Resources.Models +{ + public partial class KeyVaultParameterReference : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(KeyVaultParameterReference)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("keyVault"u8); + JsonSerializer.Serialize(writer, KeyVault); + writer.WritePropertyName("secretName"u8); + writer.WriteStringValue(SecretName); + if (Optional.IsDefined(SecretVersion)) + { + writer.WritePropertyName("secretVersion"u8); + writer.WriteStringValue(SecretVersion); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + KeyVaultParameterReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(KeyVaultParameterReference)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeKeyVaultParameterReference(document.RootElement, options); + } + + internal static KeyVaultParameterReference DeserializeKeyVaultParameterReference(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + WritableSubResource keyVault = default; + string secretName = default; + string secretVersion = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("keyVault"u8)) + { + keyVault = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("secretName"u8)) + { + secretName = property.Value.GetString(); + continue; + } + if (property.NameEquals("secretVersion"u8)) + { + secretVersion = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new KeyVaultParameterReference(keyVault, secretName, secretVersion, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("KeyVaultId", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" keyVault: "); + builder.AppendLine("{"); + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(KeyVault)) + { + builder.Append(" keyVault: "); + BicepSerializationHelpers.AppendChildObject(builder, KeyVault, options, 2, false, " keyVault: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SecretName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" secretName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SecretName)) + { + builder.Append(" secretName: "); + if (SecretName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SecretName}'''"); + } + else + { + builder.AppendLine($"'{SecretName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SecretVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" secretVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SecretVersion)) + { + builder.Append(" secretVersion: "); + if (SecretVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SecretVersion}'''"); + } + else + { + builder.AppendLine($"'{SecretVersion}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(KeyVaultParameterReference)} does not support writing '{options.Format}' format."); + } + } + + KeyVaultParameterReference IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeKeyVaultParameterReference(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(KeyVaultParameterReference)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/KeyVaultParameterReference.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/KeyVaultParameterReference.cs new file mode 100644 index 0000000000000..a87236944709f --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/KeyVaultParameterReference.cs @@ -0,0 +1,102 @@ +// 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.Resources.Models +{ + /// Azure Key Vault parameter reference. + public partial class KeyVaultParameterReference + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Azure Key Vault reference. + /// Azure Key Vault secret name. + /// or is null. + public KeyVaultParameterReference(WritableSubResource keyVault, string secretName) + { + Argument.AssertNotNull(keyVault, nameof(keyVault)); + Argument.AssertNotNull(secretName, nameof(secretName)); + + KeyVault = keyVault; + SecretName = secretName; + } + + /// Initializes a new instance of . + /// Azure Key Vault reference. + /// Azure Key Vault secret name. + /// Azure Key Vault secret version. + /// Keeps track of any properties unknown to the library. + internal KeyVaultParameterReference(WritableSubResource keyVault, string secretName, string secretVersion, IDictionary serializedAdditionalRawData) + { + KeyVault = keyVault; + SecretName = secretName; + SecretVersion = secretVersion; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal KeyVaultParameterReference() + { + } + + /// Azure Key Vault reference. + internal WritableSubResource KeyVault { get; set; } + /// Gets or sets Id. + [WirePath("keyVault.id")] + public ResourceIdentifier KeyVaultId + { + get => KeyVault is null ? default : KeyVault.Id; + set + { + if (KeyVault is null) + KeyVault = new WritableSubResource(); + KeyVault.Id = value; + } + } + + /// Azure Key Vault secret name. + [WirePath("secretName")] + public string SecretName { get; set; } + /// Azure Key Vault secret version. + [WirePath("secretVersion")] + public string SecretVersion { get; set; } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ManagedResourceReference.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ManagedResourceReference.Serialization.cs new file mode 100644 index 0000000000000..b3c9259d66a2b --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ManagedResourceReference.Serialization.cs @@ -0,0 +1,223 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Resources.Models +{ + public partial class ManagedResourceReference : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ManagedResourceReference)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(DenyStatus)) + { + writer.WritePropertyName("denyStatus"u8); + writer.WriteStringValue(DenyStatus.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ManagedResourceReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ManagedResourceReference)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeManagedResourceReference(document.RootElement, options); + } + + internal static ManagedResourceReference DeserializeManagedResourceReference(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceStatusMode? status = default; + DenyStatusMode? denyStatus = default; + string id = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new ResourceStatusMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("denyStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + denyStatus = new DenyStatusMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ManagedResourceReference(id, serializedAdditionalRawData, status, denyStatus); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" status: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Status)) + { + builder.Append(" status: "); + builder.AppendLine($"'{Status.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DenyStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" denyStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DenyStatus)) + { + builder.Append(" denyStatus: "); + builder.AppendLine($"'{DenyStatus.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + if (Id.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Id}'''"); + } + else + { + builder.AppendLine($"'{Id}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ManagedResourceReference)} does not support writing '{options.Format}' format."); + } + } + + ManagedResourceReference IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeManagedResourceReference(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ManagedResourceReference)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ManagedResourceReference.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ManagedResourceReference.cs new file mode 100644 index 0000000000000..057cf0eaba60c --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ManagedResourceReference.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Resources.Models +{ + /// The managed resource model. + public partial class ManagedResourceReference : ResourceReferenceAutoGenerated + { + /// Initializes a new instance of . + public ManagedResourceReference() + { + } + + /// Initializes a new instance of . + /// The resourceId of a resource managed by the deployment stack. + /// Keeps track of any properties unknown to the library. + /// Current management state of the resource in the deployment stack. + /// denyAssignment settings applied to the resource. + internal ManagedResourceReference(string id, IDictionary serializedAdditionalRawData, ResourceStatusMode? status, DenyStatusMode? denyStatus) : base(id, serializedAdditionalRawData) + { + Status = status; + DenyStatus = denyStatus; + } + + /// Current management state of the resource in the deployment stack. + [WirePath("status")] + public ResourceStatusMode? Status { get; set; } + /// denyAssignment settings applied to the resource. + [WirePath("denyStatus")] + public DenyStatusMode? DenyStatus { get; set; } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ResourceReferenceAutoGenerated.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ResourceReferenceAutoGenerated.Serialization.cs new file mode 100644 index 0000000000000..7f1b67d46ed50 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ResourceReferenceAutoGenerated.Serialization.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Resources.Models +{ + public partial class ResourceReferenceAutoGenerated : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceReferenceAutoGenerated)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ResourceReferenceAutoGenerated IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceReferenceAutoGenerated)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceReferenceAutoGenerated(document.RootElement, options); + } + + internal static ResourceReferenceAutoGenerated DeserializeResourceReferenceAutoGenerated(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceReferenceAutoGenerated(id, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + if (Id.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Id}'''"); + } + else + { + builder.AppendLine($"'{Id}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ResourceReferenceAutoGenerated)} does not support writing '{options.Format}' format."); + } + } + + ResourceReferenceAutoGenerated IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeResourceReferenceAutoGenerated(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceReferenceAutoGenerated)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ResourceReferenceAutoGenerated.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ResourceReferenceAutoGenerated.cs new file mode 100644 index 0000000000000..c49b3ed0893f5 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ResourceReferenceAutoGenerated.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Resources.Models +{ + /// The resourceId model. + public partial class ResourceReferenceAutoGenerated + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ResourceReferenceAutoGenerated() + { + } + + /// Initializes a new instance of . + /// The resourceId of a resource managed by the deployment stack. + /// Keeps track of any properties unknown to the library. + internal ResourceReferenceAutoGenerated(string id, IDictionary serializedAdditionalRawData) + { + Id = id; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resourceId of a resource managed by the deployment stack. + [WirePath("id")] + public string Id { get; } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ResourceReferenceExtended.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ResourceReferenceExtended.Serialization.cs new file mode 100644 index 0000000000000..26e718825ebea --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ResourceReferenceExtended.Serialization.cs @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Resources.Models +{ + public partial class ResourceReferenceExtended : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceReferenceExtended)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + JsonSerializer.Serialize(writer, Error); + } + if (options.Format != "W" && Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ResourceReferenceExtended IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceReferenceExtended)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceReferenceExtended(document.RootElement, options); + } + + internal static ResourceReferenceExtended DeserializeResourceReferenceExtended(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResponseError error = default; + string id = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceReferenceExtended(id, serializedAdditionalRawData, error); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Error), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" error: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Error)) + { + builder.Append(" error: "); + BicepSerializationHelpers.AppendChildObject(builder, Error, options, 2, false, " error: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + if (Id.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Id}'''"); + } + else + { + builder.AppendLine($"'{Id}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ResourceReferenceExtended)} does not support writing '{options.Format}' format."); + } + } + + ResourceReferenceExtended IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeResourceReferenceExtended(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceReferenceExtended)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ResourceReferenceExtended.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ResourceReferenceExtended.cs new file mode 100644 index 0000000000000..f8a45a98a0cd7 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ResourceReferenceExtended.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Resources.Models +{ + /// The resourceId extended model. This is used to document failed resources with a resourceId and a corresponding error. + public partial class ResourceReferenceExtended : ResourceReferenceAutoGenerated + { + /// Initializes a new instance of . + public ResourceReferenceExtended() + { + } + + /// Initializes a new instance of . + /// The resourceId of a resource managed by the deployment stack. + /// Keeps track of any properties unknown to the library. + /// The error detail. + internal ResourceReferenceExtended(string id, IDictionary serializedAdditionalRawData, ResponseError error) : base(id, serializedAdditionalRawData) + { + Error = error; + } + + /// The error detail. + [WirePath("error")] + public ResponseError Error { get; set; } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ResourceStatusMode.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ResourceStatusMode.cs new file mode 100644 index 0000000000000..42fa3a9618a5c --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/ResourceStatusMode.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.Resources.Models +{ + /// Current management state of the resource in the deployment stack. + public readonly partial struct ResourceStatusMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ResourceStatusMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ManagedValue = "managed"; + private const string RemoveDenyFailedValue = "removeDenyFailed"; + private const string DeleteFailedValue = "deleteFailed"; + + /// This resource is managed by the deployment stack. + public static ResourceStatusMode Managed { get; } = new ResourceStatusMode(ManagedValue); + /// Unable to remove the deny assignment on resource. + public static ResourceStatusMode RemoveDenyFailed { get; } = new ResourceStatusMode(RemoveDenyFailedValue); + /// Unable to delete the resource from Azure. The delete will be retried on the next stack deployment, or can be deleted manually. + public static ResourceStatusMode DeleteFailed { get; } = new ResourceStatusMode(DeleteFailedValue); + /// Determines if two values are the same. + public static bool operator ==(ResourceStatusMode left, ResourceStatusMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ResourceStatusMode left, ResourceStatusMode right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ResourceStatusMode(string value) => new ResourceStatusMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ResourceStatusMode other && Equals(other); + /// + public bool Equals(ResourceStatusMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/UnmanageActionManagementGroupMode.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/UnmanageActionManagementGroupMode.cs new file mode 100644 index 0000000000000..70208e28cf011 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/UnmanageActionManagementGroupMode.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.Resources.Models +{ + /// The UnmanageActionManagementGroupMode. + public readonly partial struct UnmanageActionManagementGroupMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public UnmanageActionManagementGroupMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DeleteValue = "delete"; + private const string DetachValue = "detach"; + + /// delete. + public static UnmanageActionManagementGroupMode Delete { get; } = new UnmanageActionManagementGroupMode(DeleteValue); + /// detach. + public static UnmanageActionManagementGroupMode Detach { get; } = new UnmanageActionManagementGroupMode(DetachValue); + /// Determines if two values are the same. + public static bool operator ==(UnmanageActionManagementGroupMode left, UnmanageActionManagementGroupMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(UnmanageActionManagementGroupMode left, UnmanageActionManagementGroupMode right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator UnmanageActionManagementGroupMode(string value) => new UnmanageActionManagementGroupMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is UnmanageActionManagementGroupMode other && Equals(other); + /// + public bool Equals(UnmanageActionManagementGroupMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/UnmanageActionResourceGroupMode.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/UnmanageActionResourceGroupMode.cs new file mode 100644 index 0000000000000..d23a76128b002 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/UnmanageActionResourceGroupMode.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.Resources.Models +{ + /// The UnmanageActionResourceGroupMode. + public readonly partial struct UnmanageActionResourceGroupMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public UnmanageActionResourceGroupMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DeleteValue = "delete"; + private const string DetachValue = "detach"; + + /// delete. + public static UnmanageActionResourceGroupMode Delete { get; } = new UnmanageActionResourceGroupMode(DeleteValue); + /// detach. + public static UnmanageActionResourceGroupMode Detach { get; } = new UnmanageActionResourceGroupMode(DetachValue); + /// Determines if two values are the same. + public static bool operator ==(UnmanageActionResourceGroupMode left, UnmanageActionResourceGroupMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(UnmanageActionResourceGroupMode left, UnmanageActionResourceGroupMode right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator UnmanageActionResourceGroupMode(string value) => new UnmanageActionResourceGroupMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is UnmanageActionResourceGroupMode other && Equals(other); + /// + public bool Equals(UnmanageActionResourceGroupMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/UnmanageActionResourceMode.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/UnmanageActionResourceMode.cs new file mode 100644 index 0000000000000..5cdceac5f4b6d --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/UnmanageActionResourceMode.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.Resources.Models +{ + /// The UnmanageActionResourceMode. + public readonly partial struct UnmanageActionResourceMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public UnmanageActionResourceMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DeleteValue = "delete"; + private const string DetachValue = "detach"; + + /// delete. + public static UnmanageActionResourceMode Delete { get; } = new UnmanageActionResourceMode(DeleteValue); + /// detach. + public static UnmanageActionResourceMode Detach { get; } = new UnmanageActionResourceMode(DetachValue); + /// Determines if two values are the same. + public static bool operator ==(UnmanageActionResourceMode left, UnmanageActionResourceMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(UnmanageActionResourceMode left, UnmanageActionResourceMode right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator UnmanageActionResourceMode(string value) => new UnmanageActionResourceMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is UnmanageActionResourceMode other && Equals(other); + /// + public bool Equals(UnmanageActionResourceMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/RestOperations/DeploymentRestOperations.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/RestOperations/DeploymentRestOperations.cs index 0aaf5c1cf9595..643b645166559 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/RestOperations/DeploymentRestOperations.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/RestOperations/DeploymentRestOperations.cs @@ -32,7 +32,7 @@ public DeploymentRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-09-01"; + _apiVersion = apiVersion ?? "2024-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/RestOperations/DeploymentStacksRestOperations.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/RestOperations/DeploymentStacksRestOperations.cs new file mode 100644 index 0000000000000..0169d77f4adea --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/RestOperations/DeploymentStacksRestOperations.cs @@ -0,0 +1,653 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.Resources +{ + internal partial class DeploymentStacksRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of DeploymentStacksRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public DeploymentStacksRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateExportTemplateAtScopeRequestUri(string scope, string deploymentStackName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(scope, false); + uri.AppendPath("/providers/Microsoft.Resources/deploymentStacks/", false); + uri.AppendPath(deploymentStackName, true); + uri.AppendPath("/exportTemplate", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal Core.HttpMessage CreateExportTemplateAtScopeRequest(string scope, string deploymentStackName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(scope, false); + uri.AppendPath("/providers/Microsoft.Resources/deploymentStacks/", false); + uri.AppendPath(deploymentStackName, true); + uri.AppendPath("/exportTemplate", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Exports the template used to create the Deployment stack. + /// The resource scope. + /// Name of the deployment stack. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ExportTemplateAtScopeAsync(string scope, string deploymentStackName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(scope, nameof(scope)); + Argument.AssertNotNullOrEmpty(deploymentStackName, nameof(deploymentStackName)); + + using var message = CreateExportTemplateAtScopeRequest(scope, deploymentStackName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DeploymentStackTemplateDefinition value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DeploymentStackTemplateDefinition.DeserializeDeploymentStackTemplateDefinition(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Exports the template used to create the Deployment stack. + /// The resource scope. + /// Name of the deployment stack. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ExportTemplateAtScope(string scope, string deploymentStackName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(scope, nameof(scope)); + Argument.AssertNotNullOrEmpty(deploymentStackName, nameof(deploymentStackName)); + + using var message = CreateExportTemplateAtScopeRequest(scope, deploymentStackName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DeploymentStackTemplateDefinition value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DeploymentStackTemplateDefinition.DeserializeDeploymentStackTemplateDefinition(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateValidateStackAtScopeRequestUri(string scope, string deploymentStackName, DeploymentStackData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(scope, false); + uri.AppendPath("/providers/Microsoft.Resources/deploymentStacks/", false); + uri.AppendPath(deploymentStackName, true); + uri.AppendPath("/validate", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal Core.HttpMessage CreateValidateStackAtScopeRequest(string scope, string deploymentStackName, DeploymentStackData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(scope, false); + uri.AppendPath("/providers/Microsoft.Resources/deploymentStacks/", false); + uri.AppendPath(deploymentStackName, true); + uri.AppendPath("/validate", 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(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Runs preflight validation on the specific scoped Deployment stack template to verify its acceptance to Azure Resource Manager. + /// The resource scope. + /// Name of the deployment stack. + /// Deployment stack to validate. + /// The cancellation token to use. + /// , or is null. + /// is an empty string, and was expected to be non-empty. + public async Task ValidateStackAtScopeAsync(string scope, string deploymentStackName, DeploymentStackData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(scope, nameof(scope)); + Argument.AssertNotNullOrEmpty(deploymentStackName, nameof(deploymentStackName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateValidateStackAtScopeRequest(scope, deploymentStackName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 400: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Runs preflight validation on the specific scoped Deployment stack template to verify its acceptance to Azure Resource Manager. + /// The resource scope. + /// Name of the deployment stack. + /// Deployment stack to validate. + /// The cancellation token to use. + /// , or is null. + /// is an empty string, and was expected to be non-empty. + public Response ValidateStackAtScope(string scope, string deploymentStackName, DeploymentStackData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(scope, nameof(scope)); + Argument.AssertNotNullOrEmpty(deploymentStackName, nameof(deploymentStackName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateValidateStackAtScopeRequest(scope, deploymentStackName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 400: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListAtScopeRequestUri(string scope) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(scope, false); + uri.AppendPath("/providers/Microsoft.Resources/deploymentStacks", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal Core.HttpMessage CreateListAtScopeRequest(string scope) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(scope, false); + uri.AppendPath("/providers/Microsoft.Resources/deploymentStacks", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists all the Deployment stacks within the specified scope. + /// The resource scope. + /// The cancellation token to use. + /// is null. + public async Task> ListAtScopeAsync(string scope, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(scope, nameof(scope)); + + using var message = CreateListAtScopeRequest(scope); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DeploymentStackListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DeploymentStackListResult.DeserializeDeploymentStackListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists all the Deployment stacks within the specified scope. + /// The resource scope. + /// The cancellation token to use. + /// is null. + public Response ListAtScope(string scope, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(scope, nameof(scope)); + + using var message = CreateListAtScopeRequest(scope); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DeploymentStackListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DeploymentStackListResult.DeserializeDeploymentStackListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateAtScopeRequestUri(string scope, string deploymentStackName, DeploymentStackData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(scope, false); + uri.AppendPath("/providers/Microsoft.Resources/deploymentStacks/", false); + uri.AppendPath(deploymentStackName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal Core.HttpMessage CreateCreateOrUpdateAtScopeRequest(string scope, string deploymentStackName, DeploymentStackData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(scope, false); + uri.AppendPath("/providers/Microsoft.Resources/deploymentStacks/", false); + uri.AppendPath(deploymentStackName, true); + 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(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or updates a Deployment stack at specific scope. + /// The resource scope. + /// Name of the deployment stack. + /// Deployment stack supplied to the operation. + /// The cancellation token to use. + /// , or is null. + /// is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAtScopeAsync(string scope, string deploymentStackName, DeploymentStackData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(scope, nameof(scope)); + Argument.AssertNotNullOrEmpty(deploymentStackName, nameof(deploymentStackName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateAtScopeRequest(scope, deploymentStackName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates a Deployment stack at specific scope. + /// The resource scope. + /// Name of the deployment stack. + /// Deployment stack supplied to the operation. + /// The cancellation token to use. + /// , or is null. + /// is an empty string, and was expected to be non-empty. + public Response CreateOrUpdateAtScope(string scope, string deploymentStackName, DeploymentStackData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(scope, nameof(scope)); + Argument.AssertNotNullOrEmpty(deploymentStackName, nameof(deploymentStackName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateAtScopeRequest(scope, deploymentStackName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetAtScopeRequestUri(string scope, string deploymentStackName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(scope, false); + uri.AppendPath("/providers/Microsoft.Resources/deploymentStacks/", false); + uri.AppendPath(deploymentStackName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal Core.HttpMessage CreateGetAtScopeRequest(string scope, string deploymentStackName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(scope, false); + uri.AppendPath("/providers/Microsoft.Resources/deploymentStacks/", false); + uri.AppendPath(deploymentStackName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a Deployment stack with a given name at specific scope. + /// The resource scope. + /// Name of the deployment stack. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> GetAtScopeAsync(string scope, string deploymentStackName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(scope, nameof(scope)); + Argument.AssertNotNullOrEmpty(deploymentStackName, nameof(deploymentStackName)); + + using var message = CreateGetAtScopeRequest(scope, deploymentStackName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DeploymentStackData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DeploymentStackData.DeserializeDeploymentStackData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DeploymentStackData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a Deployment stack with a given name at specific scope. + /// The resource scope. + /// Name of the deployment stack. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response GetAtScope(string scope, string deploymentStackName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(scope, nameof(scope)); + Argument.AssertNotNullOrEmpty(deploymentStackName, nameof(deploymentStackName)); + + using var message = CreateGetAtScopeRequest(scope, deploymentStackName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DeploymentStackData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DeploymentStackData.DeserializeDeploymentStackData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DeploymentStackData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteAtScopeRequestUri(string scope, string deploymentStackName, UnmanageActionResourceMode? unmanageActionResources, UnmanageActionResourceGroupMode? unmanageActionResourceGroups, UnmanageActionManagementGroupMode? unmanageActionManagementGroups, bool? bypassStackOutOfSyncError) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(scope, false); + uri.AppendPath("/providers/Microsoft.Resources/deploymentStacks/", false); + uri.AppendPath(deploymentStackName, true); + if (unmanageActionResources != null) + { + uri.AppendQuery("unmanageAction.Resources", unmanageActionResources.Value.ToString(), true); + } + if (unmanageActionResourceGroups != null) + { + uri.AppendQuery("unmanageAction.ResourceGroups", unmanageActionResourceGroups.Value.ToString(), true); + } + if (unmanageActionManagementGroups != null) + { + uri.AppendQuery("unmanageAction.ManagementGroups", unmanageActionManagementGroups.Value.ToString(), true); + } + if (bypassStackOutOfSyncError != null) + { + uri.AppendQuery("bypassStackOutOfSyncError", bypassStackOutOfSyncError.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal Core.HttpMessage CreateDeleteAtScopeRequest(string scope, string deploymentStackName, UnmanageActionResourceMode? unmanageActionResources, UnmanageActionResourceGroupMode? unmanageActionResourceGroups, UnmanageActionManagementGroupMode? unmanageActionManagementGroups, bool? bypassStackOutOfSyncError) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/", false); + uri.AppendPath(scope, false); + uri.AppendPath("/providers/Microsoft.Resources/deploymentStacks/", false); + uri.AppendPath(deploymentStackName, true); + if (unmanageActionResources != null) + { + uri.AppendQuery("unmanageAction.Resources", unmanageActionResources.Value.ToString(), true); + } + if (unmanageActionResourceGroups != null) + { + uri.AppendQuery("unmanageAction.ResourceGroups", unmanageActionResourceGroups.Value.ToString(), true); + } + if (unmanageActionManagementGroups != null) + { + uri.AppendQuery("unmanageAction.ManagementGroups", unmanageActionManagementGroups.Value.ToString(), true); + } + if (bypassStackOutOfSyncError != null) + { + uri.AppendQuery("bypassStackOutOfSyncError", bypassStackOutOfSyncError.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes a Deployment stack by name at specific scope. When operation completes, status code 200 returned without content. + /// The resource scope. + /// Name of the deployment stack. + /// Flag to indicate delete rather than detach for unmanaged resources. + /// Flag to indicate delete rather than detach for unmanaged resource groups. + /// Flag to indicate delete rather than detach for unmanaged management groups. + /// Flag to bypass service errors that indicate the stack resource list is not correctly synchronized. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task DeleteAtScopeAsync(string scope, string deploymentStackName, UnmanageActionResourceMode? unmanageActionResources = null, UnmanageActionResourceGroupMode? unmanageActionResourceGroups = null, UnmanageActionManagementGroupMode? unmanageActionManagementGroups = null, bool? bypassStackOutOfSyncError = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(scope, nameof(scope)); + Argument.AssertNotNullOrEmpty(deploymentStackName, nameof(deploymentStackName)); + + using var message = CreateDeleteAtScopeRequest(scope, deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, unmanageActionManagementGroups, bypassStackOutOfSyncError); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes a Deployment stack by name at specific scope. When operation completes, status code 200 returned without content. + /// The resource scope. + /// Name of the deployment stack. + /// Flag to indicate delete rather than detach for unmanaged resources. + /// Flag to indicate delete rather than detach for unmanaged resource groups. + /// Flag to indicate delete rather than detach for unmanaged management groups. + /// Flag to bypass service errors that indicate the stack resource list is not correctly synchronized. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response DeleteAtScope(string scope, string deploymentStackName, UnmanageActionResourceMode? unmanageActionResources = null, UnmanageActionResourceGroupMode? unmanageActionResourceGroups = null, UnmanageActionManagementGroupMode? unmanageActionManagementGroups = null, bool? bypassStackOutOfSyncError = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(scope, nameof(scope)); + Argument.AssertNotNullOrEmpty(deploymentStackName, nameof(deploymentStackName)); + + using var message = CreateDeleteAtScopeRequest(scope, deploymentStackName, unmanageActionResources, unmanageActionResourceGroups, unmanageActionManagementGroups, bypassStackOutOfSyncError); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListAtScopeNextPageRequestUri(string nextLink, string scope) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal Core.HttpMessage CreateListAtScopeNextPageRequest(string nextLink, string scope) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists all the Deployment stacks within the specified scope. + /// The URL to the next page of results. + /// The resource scope. + /// The cancellation token to use. + /// or is null. + public async Task> ListAtScopeNextPageAsync(string nextLink, string scope, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNull(scope, nameof(scope)); + + using var message = CreateListAtScopeNextPageRequest(nextLink, scope); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DeploymentStackListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DeploymentStackListResult.DeserializeDeploymentStackListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists all the Deployment stacks within the specified scope. + /// The URL to the next page of results. + /// The resource scope. + /// The cancellation token to use. + /// or is null. + public Response ListAtScopeNextPage(string nextLink, string scope, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNull(scope, nameof(scope)); + + using var message = CreateListAtScopeNextPageRequest(nextLink, scope); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DeploymentStackListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DeploymentStackListResult.DeserializeDeploymentStackListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/RestOperations/DeploymentsRestOperations.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/RestOperations/DeploymentsRestOperations.cs index d649c1f67d00b..64052ef2763d9 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/RestOperations/DeploymentsRestOperations.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/RestOperations/DeploymentsRestOperations.cs @@ -32,7 +32,7 @@ public DeploymentsRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-09-01"; + _apiVersion = apiVersion ?? "2024-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/autorest.md b/sdk/resources/Azure.ResourceManager.Resources/src/autorest.md index e4ddef1eeb946..5d5f89ab4ff61 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/autorest.md +++ b/sdk/resources/Azure.ResourceManager.Resources/src/autorest.md @@ -51,6 +51,18 @@ request-path-to-scope-resource-types: - resourceGroups - managementGroups - tenant + /{scope}/providers/Microsoft.Resources/deploymentStacks: + - subscriptions + - resourceGroups + - managementGroups + /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}: + - subscriptions + - resourceGroups + - managementGroups + /{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/exportTemplate: + - subscriptions + - resourceGroups + - managementGroups override-operation-name: DeploymentOperations_ListAtScope: GetDeploymentOperations DeploymentOperations_GetAtScope: GetDeploymentOperation @@ -64,6 +76,8 @@ override-operation-name: Deployments_CheckExistenceAtScope: CheckExistence jitRequests_ListBySubscription: GetJitRequestDefinitions Deployments_CalculateTemplateHash: CalculateDeploymentTemplateHash + DeploymentStacks_ExportTemplateAtScope: ExportTemplate + DeploymentStacks_ValidateStackAtScope: ValidateStack operation-groups-to-omit: Providers;ProviderResourceTypes;Resources;ResourceGroups;Tags;Subscriptions;Tenants @@ -155,6 +169,24 @@ directive: - remove-operation: Applications_DeleteById - remove-operation: Applications_CreateOrUpdateById - remove-operation: Applications_UpdateById + - remove-operation: DeploymentStacks_ExportTemplateAtSubscription + - remove-operation: DeploymentStacks_ExportTemplateAtResourceGroup + - remove-operation: DeploymentStacks_ExportTemplateAtManagementGroup + - remove-operation: DeploymentStacks_ValidateStackAtResourceGroup + - remove-operation: DeploymentStacks_ValidateStackAtSubscription + - remove-operation: DeploymentStacks_ValidateStackAtManagementGroup + - remove-operation: DeploymentStacks_ListAtResourceGroup + - remove-operation: DeploymentStacks_ListAtSubscription + - remove-operation: DeploymentStacks_ListAtManagementGroup + - remove-operation: DeploymentStacks_CreateOrUpdateAtResourceGroup + - remove-operation: DeploymentStacks_GetAtResourceGroup + - remove-operation: DeploymentStacks_DeleteAtResourceGroup + - remove-operation: DeploymentStacks_CreateOrUpdateAtSubscription + - remove-operation: DeploymentStacks_GetAtSubscription + - remove-operation: DeploymentStacks_DeleteAtSubscription + - remove-operation: DeploymentStacks_CreateOrUpdateAtManagementGroup + - remove-operation: DeploymentStacks_GetAtManagementGroup + - remove-operation: DeploymentStacks_DeleteAtManagementGroup - from: managedapplications.json where: $['x-ms-paths'] @@ -344,6 +376,291 @@ directive: where: $.definitions.DeploymentProperties transform: delete $.properties.parameters.additionalProperties + # Specify the duration format + - from: deploymentStacks.json + where: $.definitions + transform: > + $.DeploymentStackProperties.properties.duration['format'] = 'duration'; + # Add scope operations + - from: deploymentStacks.json + where: $.paths + transform: > + $['/{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/exportTemplate'] = { + "post": { + "tags": [ + "DeploymentStacks" + ], + "operationId": "DeploymentStacks_ExportTemplateAtScope", + "description": "Exports the template used to create the Deployment stack.", + "parameters": [ + { + "$ref": "./resources.json#/parameters/ScopeParameter" + }, + { + "$ref": "#/parameters/DeploymentStackNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns the Template or TemplateLink payload of the deployment stack.", + "schema": { + "$ref": "#/definitions/DeploymentStackTemplateDefinition" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/DeploymentStacksError" + } + } + } + } + }; + $['/{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}/validate'] = { + "post": { + "tags": [ + "DeploymentStacks" + ], + "operationId": "DeploymentStacks_ValidateStackAtScope", + "description": "Runs preflight validation on the specific scoped Deployment stack template to verify its acceptance to Azure Resource Manager.", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "parameters": [ + { + "$ref": "./resources.json#/parameters/ScopeParameter" + }, + { + "$ref": "#/parameters/DeploymentStackNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "deploymentStack", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/DeploymentStack" + }, + "description": "Deployment stack to validate." + } + ], + "responses": { + "200": { + "description": "OK - The validation operation result.", + "schema": { + "$ref": "#/definitions/DeploymentStackValidateResult" + } + }, + "202": { + "description": "Accepted - The validation request has been accepted for processing and the operation will complete asynchronously.", + "headers": { + "Location": { + "type": "string" + }, + "Retry-After": { + "type": "string", + "description": "Number of seconds to wait before polling for status." + } + } + }, + "400": { + "description": "Failed - The validation operation result.", + "x-ms-error-response": false, + "schema": { + "$ref": "#/definitions/DeploymentStackValidateResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/DeploymentStacksError" + } + } + } + } + }; + $['/{scope}/providers/Microsoft.Resources/deploymentStacks'] = { + "get": { + "tags": [ + "DeploymentStacks" + ], + "operationId": "DeploymentStacks_ListAtScope", + "description": "Lists all the Deployment stacks within the specified scope.", + "parameters": [ + { + "$ref": "./resources.json#/parameters/ScopeParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns an array of Deployment stacks.", + "schema": { + "$ref": "#/definitions/DeploymentStackListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/DeploymentStacksError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }; + $['/{scope}/providers/Microsoft.Resources/deploymentStacks/{deploymentStackName}'] = { + "put": { + "tags": [ + "DeploymentStacks" + ], + "operationId": "DeploymentStacks_CreateOrUpdateAtScope", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "description": "Creates or updates a Deployment stack at specific scope.", + "parameters": [ + { + "$ref": "./resources.json#/parameters/ScopeParameter" + }, + { + "$ref": "#/parameters/DeploymentStackNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "deploymentStack", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/DeploymentStack" + }, + "description": "Deployment stack supplied to the operation." + } + ], + "responses": { + "200": { + "description": "OK - The Deployment stack update request has succeeded.", + "schema": { + "$ref": "#/definitions/DeploymentStack" + } + }, + "201": { + "description": "Deployment stack created.", + "schema": { + "$ref": "#/definitions/DeploymentStack" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/DeploymentStacksError" + } + } + } + }, + "get": { + "tags": [ + "DeploymentStacks" + ], + "operationId": "DeploymentStacks_GetAtScope", + "description": "Gets a Deployment stack with a given name at specific scope.", + "parameters": [ + { + "$ref": "./resources.json#/parameters/ScopeParameter" + }, + { + "$ref": "#/parameters/DeploymentStackNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns information about the Deployment stack.", + "schema": { + "$ref": "#/definitions/DeploymentStack" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/DeploymentStacksError" + } + } + } + }, + "delete": { + "tags": [ + "DeploymentStacks" + ], + "operationId": "DeploymentStacks_DeleteAtScope", + "description": "Deletes a Deployment stack by name at specific scope. When operation completes, status code 200 returned without content.", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "parameters": [ + { + "$ref": "./resources.json#/parameters/ScopeParameter" + }, + { + "$ref": "#/parameters/DeploymentStackNameParameter" + }, + { + "$ref": "#/parameters/DeleteResourceParameter" + }, + { + "$ref": "#/parameters/DeleteResourceGroupParameter" + }, + { + "$ref": "#/parameters/DeleteManagementGroupParameter" + }, + { + "$ref": "#/parameters/BypassStackOutOfSyncErrorParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK - Deployment stack deleted." + }, + "202": { + "description": "Accepted - Check location header for deletion status.", + "headers": { + "Location": { + "type": "string" + } + } + }, + "204": { + "description": "Deployment stack does not exist." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/DeploymentStacksError" + } + } + } + } + }; + ``` ### Tag: package-resources-2022-04 @@ -353,10 +670,11 @@ These settings apply only when `--tag=package-resources-2022-04` is specified on ```yaml $(tag) == 'package-resources-2022-04' input-file: - - https://github.com/Azure/azure-rest-api-specs/blob/6acab48bdaef738f88de60abc41826e9914ad8ad/specification/resources/resource-manager/Microsoft.Resources/stable/2021-05-01/templateSpecs.json - - https://github.com/Azure/azure-rest-api-specs/blob/6acab48bdaef738f88de60abc41826e9914ad8ad/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/deploymentScripts.json - - https://github.com/Azure/azure-rest-api-specs/blob/6acab48bdaef738f88de60abc41826e9914ad8ad/specification/resources/resource-manager/Microsoft.Resources/stable/2022-09-01/resources.json - - https://github.com/Azure/azure-rest-api-specs/blob/6acab48bdaef738f88de60abc41826e9914ad8ad/specification/resources/resource-manager/Microsoft.Solutions/stable/2019-07-01/managedapplications.json - - https://github.com/Azure/azure-rest-api-specs/blob/6acab48bdaef738f88de60abc41826e9914ad8ad/specification/resources/resource-manager/Microsoft.Resources/stable/2023-11-01/bicepClient.json# + - https://github.com/Azure/azure-rest-api-specs/blob/a220053360f9700f81abcdb6142769c85c3bcb27/specification/resources/resource-manager/Microsoft.Resources/stable/2021-05-01/templateSpecs.json + - https://github.com/Azure/azure-rest-api-specs/blob/a220053360f9700f81abcdb6142769c85c3bcb27/specification/resources/resource-manager/Microsoft.Resources/stable/2020-10-01/deploymentScripts.json + - https://github.com/Azure/azure-rest-api-specs/blob/a220053360f9700f81abcdb6142769c85c3bcb27/specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/resources.json + - https://github.com/Azure/azure-rest-api-specs/blob/a220053360f9700f81abcdb6142769c85c3bcb27/specification/resources/resource-manager/Microsoft.Solutions/stable/2019-07-01/managedapplications.json + - https://github.com/Azure/azure-rest-api-specs/blob/a220053360f9700f81abcdb6142769c85c3bcb27/specification/resources/resource-manager/Microsoft.Resources/stable/2023-11-01/bicepClient.json# + - https://github.com/Azure/azure-rest-api-specs/blob/a220053360f9700f81abcdb6142769c85c3bcb27/specification/resources/resource-manager/Microsoft.Resources/stable/2024-03-01/deploymentStacks.json ``` diff --git a/sdk/resources/Azure.ResourceManager.Resources/tests/ResourcesTestBase.cs b/sdk/resources/Azure.ResourceManager.Resources/tests/ResourcesTestBase.cs index c2223f1038058..1b5e771f9bea6 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/tests/ResourcesTestBase.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/tests/ResourcesTestBase.cs @@ -13,7 +13,6 @@ using Azure.ResourceManager.Resources.Models; using NUnit.Framework; using JsonObject = System.Collections.Generic.Dictionary; -using System.Security.Policy; namespace Azure.ResourceManager.Resources.Tests { @@ -137,6 +136,87 @@ protected static ArmDeploymentProperties CreateDeploymentPropertiesUsingJsonElem Location = location }; + protected static DeploymentStackData CreateRGDeploymentStackDataWithTemplate() + { + var data = new DeploymentStackData(); + + data.Template = BinaryData.FromString(File.ReadAllText(Path.Combine( + Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), + "Scenario", + "DeploymentTemplates", + $"rg-stack-template.json"))); + + data.DenySettings = new DenySettings(DenySettingsMode.None); + + data.ActionOnUnmanage = new ActionOnUnmanage() + { + Resources = DeploymentStacksDeleteDetachEnum.Detach, + ResourceGroups = DeploymentStacksDeleteDetachEnum.Detach, + ManagementGroups = DeploymentStacksDeleteDetachEnum.Detach + }; + + data.BypassStackOutOfSyncError = false; + + data.Parameters.Add("templateSpecName", new DeploymentParameter { Value = BinaryData.FromString("\"stacksTestTemplate4321\"") }); + + return data; + } + + protected static DeploymentStackData CreateSubDeploymentStackDataWithTemplate(AzureLocation location) { + var data = new DeploymentStackData(); + + data.Location = location; + + data.Template = BinaryData.FromString(File.ReadAllText(Path.Combine( + Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), + "Scenario", + "DeploymentTemplates", + $"sub-stack-template.json"))); + + data.DenySettings = new DenySettings(DenySettingsMode.None); + + data.ActionOnUnmanage = new ActionOnUnmanage() + { + Resources = DeploymentStacksDeleteDetachEnum.Detach, + ResourceGroups = DeploymentStacksDeleteDetachEnum.Detach, + ManagementGroups = DeploymentStacksDeleteDetachEnum.Detach + }; + + data.BypassStackOutOfSyncError = false; + + data.Parameters.Add("rgName", new DeploymentParameter { Value = BinaryData.FromString("\"stacksTestRG4321\"") } ); + + return data; + } + + protected static DeploymentStackData CreateMGDeploymentStackDataWithTemplate(AzureLocation location) + { + var data = new DeploymentStackData(); + + data.Location = location; + + data.Template = BinaryData.FromString(File.ReadAllText(Path.Combine( + Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), + "Scenario", + "DeploymentTemplates", + $"mg-stack-template.json"))); + + data.DenySettings = new DenySettings(DenySettingsMode.None); + + data.ActionOnUnmanage = new ActionOnUnmanage() + { + Resources = DeploymentStacksDeleteDetachEnum.Detach, + ResourceGroups = DeploymentStacksDeleteDetachEnum.Detach, + ManagementGroups = DeploymentStacksDeleteDetachEnum.Detach + }; + + data.BypassStackOutOfSyncError = false; + + data.Parameters.Add("message", new DeploymentParameter { Value = BinaryData.FromString("\"hello world\"") }); + + return data; + } + private static GenericResourceData ConstructGenericUserAssignedIdentities() { var userAssignedIdentities = new GenericResourceData(AzureLocation.WestUS2); diff --git a/sdk/resources/Azure.ResourceManager.Resources/tests/Scenario/DeploymentStackCollectionTests.cs b/sdk/resources/Azure.ResourceManager.Resources/tests/Scenario/DeploymentStackCollectionTests.cs new file mode 100644 index 0000000000000..cb6e69387afc4 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/tests/Scenario/DeploymentStackCollectionTests.cs @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager.ManagementGroups; +using Azure.ResourceManager.Resources.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Resources.Tests +{ + public class DeploymentStackCollectionTests : ResourcesTestBase + { + public DeploymentStackCollectionTests(bool isAsync) + : base(isAsync)//, RecordedTestMode.Record + { + } + + /* RG Scoped Deployment Stack Tests */ + + [TestCase] + [RecordedTest] + public async Task CreateOrUpdateRG() + { + SubscriptionResource subscription = await Client.GetDefaultSubscriptionAsync(); + + string rgName = Recording.GenerateAssetName("testRg-1-"); + ResourceGroupData rgData = new ResourceGroupData(AzureLocation.WestUS); + ResourceGroupResource rg = (await subscription.GetResourceGroups().CreateOrUpdateAsync(WaitUntil.Completed, rgName, rgData)).Value; + + string deploymentStackName = Recording.GenerateAssetName("deployStackRG-CreateOrUpdate-"); + var deploymentStackData = CreateRGDeploymentStackDataWithTemplate(); + var deploymentStack = (await rg.GetDeploymentStacks().CreateOrUpdateAsync(WaitUntil.Completed ,deploymentStackName, deploymentStackData)).Value; + + Assert.AreEqual(deploymentStackName, deploymentStack.Data.Name); + + await deploymentStack.DeleteAsync(WaitUntil.Completed, unmanageActionResources: UnmanageActionResourceMode.Delete, unmanageActionResourceGroups: UnmanageActionResourceGroupMode.Delete, unmanageActionManagementGroups: UnmanageActionManagementGroupMode.Delete); + await rg.DeleteAsync(WaitUntil.Completed); + } + + [TestCase] + [RecordedTest] + public async Task GetRG() + { + SubscriptionResource subscription = await Client.GetDefaultSubscriptionAsync(); + + string rgName = Recording.GenerateAssetName("testRg-1-"); + ResourceGroupData rgData = new ResourceGroupData(AzureLocation.WestUS); + ResourceGroupResource rg = (await subscription.GetResourceGroups().CreateOrUpdateAsync(WaitUntil.Completed, rgName, rgData)).Value; + + string deploymentStackName = Recording.GenerateAssetName("deployStackRG-Get-"); + var deploymentStackData = CreateRGDeploymentStackDataWithTemplate(); + var deploymentStack = (await rg.GetDeploymentStacks().CreateOrUpdateAsync(WaitUntil.Completed, deploymentStackName, deploymentStackData)).Value; + + var deploymentStackGet = (await rg.GetDeploymentStackAsync(deploymentStackName)).Value; + + AssertValidDeploymentStack(deploymentStack, deploymentStackGet); + + await deploymentStack.DeleteAsync(WaitUntil.Completed, unmanageActionResources: UnmanageActionResourceMode.Delete, unmanageActionResourceGroups: UnmanageActionResourceGroupMode.Delete, unmanageActionManagementGroups: UnmanageActionManagementGroupMode.Delete); + await rg.DeleteAsync(WaitUntil.Completed); + } + + [TestCase] + [RecordedTest] + public async Task ListRG() + { + SubscriptionResource subscription = await Client.GetDefaultSubscriptionAsync(); + + string rgName = Recording.GenerateAssetName("testRg-1-"); + ResourceGroupData rgData = new ResourceGroupData(AzureLocation.WestUS); + ResourceGroupResource rg = (await subscription.GetResourceGroups().CreateOrUpdateAsync(WaitUntil.Completed, rgName, rgData)).Value; + + string deploymentStackName = Recording.GenerateAssetName("deployStackRG-List-"); + var deploymentStackData = CreateRGDeploymentStackDataWithTemplate(); + var getStack = (await rg.GetDeploymentStacks().CreateOrUpdateAsync(WaitUntil.Completed, deploymentStackName, deploymentStackData)).Value; + + var deploymentStacks = rg.GetDeploymentStacks(); + int count = 0; + await foreach (var deploymentStack in deploymentStacks) + { + count++; + } + + Assert.AreEqual(count, 1); + await getStack.DeleteAsync(WaitUntil.Completed); + await rg.DeleteAsync(WaitUntil.Completed); + } + + /* Sub Scoped Deployment Stack Tests */ + + [TestCase] + [RecordedTest] + public async Task CreateOrUpdateSub() + { + SubscriptionResource subscription = await Client.GetDefaultSubscriptionAsync(); + + string deploymentStackName = Recording.GenerateAssetName("deployStackSub-CreateOrUpdate-"); + var deploymentStackData = CreateSubDeploymentStackDataWithTemplate(AzureLocation.WestUS); + DeploymentStackResource deploymentStack = (await subscription.GetDeploymentStacks().CreateOrUpdateAsync(WaitUntil.Completed, deploymentStackName, deploymentStackData)).Value; + + Assert.AreEqual(deploymentStackName, deploymentStack.Data.Name); + + await deploymentStack.DeleteAsync(WaitUntil.Completed, unmanageActionResources: UnmanageActionResourceMode.Delete, unmanageActionResourceGroups: UnmanageActionResourceGroupMode.Delete, unmanageActionManagementGroups: UnmanageActionManagementGroupMode.Delete); + } + + [TestCase] + [RecordedTest] + public async Task GetSub() + { + SubscriptionResource subscription = await Client.GetDefaultSubscriptionAsync(); + + string deploymentStackName = Recording.GenerateAssetName("deployStackSub-Get-"); + var deploymentStackData = CreateSubDeploymentStackDataWithTemplate(AzureLocation.WestUS); + var deploymentStack = (await subscription.GetDeploymentStacks().CreateOrUpdateAsync(WaitUntil.Completed, deploymentStackName, deploymentStackData)).Value; + + var deploymentStackGet = (await subscription.GetDeploymentStackAsync(deploymentStackName)).Value; + + AssertValidDeploymentStack(deploymentStack, deploymentStackGet); + + await deploymentStack.DeleteAsync(WaitUntil.Completed, unmanageActionResources: UnmanageActionResourceMode.Delete, unmanageActionResourceGroups: UnmanageActionResourceGroupMode.Delete, unmanageActionManagementGroups: UnmanageActionManagementGroupMode.Delete); + } + + [TestCase] + [RecordedTest] + public async Task ListSub() + { + SubscriptionResource subscription = await Client.GetDefaultSubscriptionAsync(); + + string deploymentStackName = Recording.GenerateAssetName("deployStackSub-List-"); + var deploymentStackData = CreateSubDeploymentStackDataWithTemplate(AzureLocation.WestUS); + var getStack = (await subscription.GetDeploymentStacks().CreateOrUpdateAsync(WaitUntil.Completed, deploymentStackName, deploymentStackData)).Value; + + var deploymentStacks = subscription.GetDeploymentStacks(); + int count = 0; + await foreach (var deploymentStack in deploymentStacks) + { + count++; + } + + await getStack.DeleteAsync(WaitUntil.Completed, unmanageActionResources: UnmanageActionResourceMode.Delete, unmanageActionResourceGroups: UnmanageActionResourceGroupMode.Delete, unmanageActionManagementGroups: UnmanageActionManagementGroupMode.Delete); + + // There are more stacks in the sub than just the one created for the test: + Assert.GreaterOrEqual(count, 1); + } + + /* MG Scoped Deployment Stack Tests */ + + [TestCase] + [RecordedTest] + public async Task CreateOrUpdateMG() + { + ManagementGroupResource managementGroup = Client.GetManagementGroupResource(ManagementGroupResource.CreateResourceIdentifier("StacksSDKTest")); + + string deploymentStackName = Recording.GenerateAssetName("deployStackExMG-CreateOrUpdate-"); + var deploymentStackData = CreateMGDeploymentStackDataWithTemplate(AzureLocation.WestUS); + DeploymentStackResource deploymentStack = (await managementGroup.GetDeploymentStacks().CreateOrUpdateAsync(WaitUntil.Completed, deploymentStackName, deploymentStackData)).Value; + + Assert.AreEqual(deploymentStackName, deploymentStack.Data.Name); + + await deploymentStack.DeleteAsync(WaitUntil.Completed, unmanageActionResources: UnmanageActionResourceMode.Delete, unmanageActionResourceGroups: UnmanageActionResourceGroupMode.Delete, unmanageActionManagementGroups: UnmanageActionManagementGroupMode.Delete); + } + + [TestCase] + [RecordedTest] + public async Task GetMG() + { + ManagementGroupResource managementGroup = Client.GetManagementGroupResource(ManagementGroupResource.CreateResourceIdentifier("StacksSDKTest")); + + string deploymentStackName = Recording.GenerateAssetName("deployStackMG-Get-"); + var deploymentStackData = CreateMGDeploymentStackDataWithTemplate(AzureLocation.WestUS); + var deploymentStack = (await managementGroup.GetDeploymentStacks().CreateOrUpdateAsync(WaitUntil.Completed, deploymentStackName, deploymentStackData)).Value; + + var deploymentStackGet = (await managementGroup.GetDeploymentStackAsync(deploymentStackName)).Value; + + AssertValidDeploymentStack(deploymentStack, deploymentStackGet); + + await deploymentStack.DeleteAsync(WaitUntil.Completed, unmanageActionResources: UnmanageActionResourceMode.Delete, unmanageActionResourceGroups: UnmanageActionResourceGroupMode.Delete, unmanageActionManagementGroups: UnmanageActionManagementGroupMode.Delete); + } + + [TestCase] + [RecordedTest] + public async Task ListMG() + { + ManagementGroupResource managementGroup = Client.GetManagementGroupResource(ManagementGroupResource.CreateResourceIdentifier("StacksSDKTest")); + + string deploymentStackName = Recording.GenerateAssetName("deployStackExMG-List-"); + var deploymentStackData = CreateMGDeploymentStackDataWithTemplate(AzureLocation.WestUS); + var getStack = (await managementGroup.GetDeploymentStacks().CreateOrUpdateAsync(WaitUntil.Completed, deploymentStackName, deploymentStackData)).Value; + + var deploymentStacks = managementGroup.GetDeploymentStacks(); + int count = 0; + await foreach (var deploymentStack in deploymentStacks) + { + count++; + } + + Assert.AreEqual(count, 1); + await getStack.DeleteAsync(WaitUntil.Completed); + } + + private static void AssertValidDeploymentStack(DeploymentStackResource model, DeploymentStackResource getResult) + { + Assert.AreEqual(model.Data.Name, getResult.Data.Name); + Assert.AreEqual(model.Data.Id, getResult.Data.Id); + Assert.AreEqual(model.Data.ResourceType, getResult.Data.ResourceType); + Assert.AreEqual(model.Data.Location, getResult.Data.Location); + Assert.AreEqual(model.Data.Tags, getResult.Data.Tags); + + Assert.AreEqual(model.Data.ActionOnUnmanage.Resources, getResult.Data.ActionOnUnmanage.Resources); + Assert.AreEqual(model.Data.ActionOnUnmanage.ResourceGroups, getResult.Data.ActionOnUnmanage.ResourceGroups); + Assert.AreEqual(model.Data.ActionOnUnmanage.ManagementGroups, getResult.Data.ActionOnUnmanage.ManagementGroups); + Assert.AreEqual(model.Data.DenySettings.Mode, getResult.Data.DenySettings.Mode); + Assert.AreEqual(model.Data.DenySettings.ApplyToChildScopes, getResult.Data.DenySettings.ApplyToChildScopes); + Assert.AreEqual(model.Data.DenySettings.ExcludedPrincipals, getResult.Data.DenySettings.ExcludedPrincipals); + Assert.AreEqual(model.Data.DenySettings.ExcludedActions, getResult.Data.DenySettings.ExcludedActions); + Assert.AreEqual(model.Data.BypassStackOutOfSyncError, getResult.Data.BypassStackOutOfSyncError); + } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/tests/Scenario/DeploymentStackOperationsTests.cs b/sdk/resources/Azure.ResourceManager.Resources/tests/Scenario/DeploymentStackOperationsTests.cs new file mode 100644 index 0000000000000..f287cb4a9df45 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/tests/Scenario/DeploymentStackOperationsTests.cs @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager.ManagementGroups; +using Azure.ResourceManager.Resources.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Resources.Tests +{ + public class DeploymentStackOperationsTests : ResourcesTestBase + { + public DeploymentStackOperationsTests(bool isAsync) + : base(isAsync)//, RecordedTestMode.Record + { + } + + /* RG Scoped Deployment Stack Tests */ + + [TestCase] + [RecordedTest] + public async Task DeleteRG() + { + SubscriptionResource subscription = await Client.GetDefaultSubscriptionAsync(); + + string rgName = Recording.GenerateAssetName("testRg-1-"); + ResourceGroupData rgData = new ResourceGroupData(AzureLocation.WestUS); + ResourceGroupResource rg = (await subscription.GetResourceGroups().CreateOrUpdateAsync(WaitUntil.Completed, rgName, rgData)).Value; + + string deploymentStackName = Recording.GenerateAssetName("deployStackRG-Delete-"); + var deploymentStackData = CreateRGDeploymentStackDataWithTemplate(); + DeploymentStackResource deploymentStack = (await rg.GetDeploymentStacks().CreateOrUpdateAsync(WaitUntil.Completed, deploymentStackName, deploymentStackData)).Value; + await deploymentStack.DeleteAsync(WaitUntil.Completed); + + var ex = Assert.ThrowsAsync(async () => await deploymentStack.GetAsync()); + Assert.AreEqual(404, ex.Status); + await rg.DeleteAsync(WaitUntil.Completed); + } + + [TestCase] + [RecordedTest] + public async Task ExportRG() + { + SubscriptionResource subscription = await Client.GetDefaultSubscriptionAsync(); + + string rgName = Recording.GenerateAssetName("testRg-1-"); + ResourceGroupData rgData = new ResourceGroupData(AzureLocation.WestUS); + ResourceGroupResource rg = (await subscription.GetResourceGroups().CreateOrUpdateAsync(WaitUntil.Completed, rgName, rgData)).Value; + + string deploymentStackName = Recording.GenerateAssetName("deployStackRG-Export-"); + var deploymentStackData = CreateRGDeploymentStackDataWithTemplate(); + DeploymentStackResource deploymentStack = (await rg.GetDeploymentStacks().CreateOrUpdateAsync(WaitUntil.Completed, deploymentStackName, deploymentStackData)).Value; + var deploymentStackTemplate = (await deploymentStack.ExportTemplateAsync()).Value; + + Assert.IsNotNull(deploymentStackTemplate); + + // TODO: Output is off by a little and may be how the template is being read. + //Assert.AreEqual(deploymentStackTemplate.Template, deploymentStackData.Template); + + await deploymentStack.DeleteAsync(WaitUntil.Completed, unmanageActionResources: UnmanageActionResourceMode.Delete, unmanageActionResourceGroups: UnmanageActionResourceGroupMode.Delete, unmanageActionManagementGroups: UnmanageActionManagementGroupMode.Delete); + await rg.DeleteAsync(WaitUntil.Completed); + } + + [TestCase] + [RecordedTest] + public async Task ValidateRG() + { + SubscriptionResource subscription = await Client.GetDefaultSubscriptionAsync(); + + string rgName = Recording.GenerateAssetName("testRg-1-"); + ResourceGroupData rgData = new ResourceGroupData(AzureLocation.WestUS); + ResourceGroupResource rg = (await subscription.GetResourceGroups().CreateOrUpdateAsync(WaitUntil.Completed, rgName, rgData)).Value; + + string deploymentStackName = Recording.GenerateAssetName("deployStackRG-Validate-"); + var deploymentStackId = new ResourceIdentifier(rg.Id + "/providers/Microsoft.Resources/deploymentStacks/" + deploymentStackName); + var deploymentStack = Client.GetDeploymentStackResource(deploymentStackId); + + var deploymentStackData = CreateRGDeploymentStackDataWithTemplate(); + DeploymentStackValidateResult deploymentStackValidateResult = (await deploymentStack.ValidateStackAsync(WaitUntil.Completed, deploymentStackData)).Value; + + Assert.IsNotNull(deploymentStackValidateResult); + await rg.DeleteAsync(WaitUntil.Completed); + } + + /* Sub Scoped Deployment Stack Tests */ + + [TestCase] + [RecordedTest] + public async Task DeleteSub() + { + SubscriptionResource subscription = await Client.GetDefaultSubscriptionAsync(); + + string deploymentStackName = Recording.GenerateAssetName("deployStackSub-Delete-"); + var deploymentStackData = CreateSubDeploymentStackDataWithTemplate(AzureLocation.WestUS); + DeploymentStackResource deploymentStack = (await subscription.GetDeploymentStacks().CreateOrUpdateAsync(WaitUntil.Completed, deploymentStackName, deploymentStackData)).Value; + await deploymentStack.DeleteAsync(WaitUntil.Completed); + + var ex = Assert.ThrowsAsync(async () => await deploymentStack.GetAsync()); + Assert.AreEqual(404, ex.Status); + } + + [TestCase] + [RecordedTest] + public async Task ExportSub() + { + SubscriptionResource subscription = await Client.GetDefaultSubscriptionAsync(); + + string deploymentStackName = Recording.GenerateAssetName("deployStackSub-Export-"); + var deploymentStackData = CreateSubDeploymentStackDataWithTemplate(AzureLocation.WestUS); + DeploymentStackResource deploymentStack = (await subscription.GetDeploymentStacks().CreateOrUpdateAsync(WaitUntil.Completed, deploymentStackName, deploymentStackData)).Value; + var deploymentStackTemplate = (await deploymentStack.ExportTemplateAsync()).Value; + Assert.IsNotNull(deploymentStackTemplate); + + // TODO: Output is off by a little and may be how the template is being read. + //Assert.AreEqual(deploymentStackTemplate.Template, deploymentStackData.Template); + + await deploymentStack.DeleteAsync(WaitUntil.Completed, unmanageActionResources: UnmanageActionResourceMode.Delete, unmanageActionResourceGroups: UnmanageActionResourceGroupMode.Delete, unmanageActionManagementGroups: UnmanageActionManagementGroupMode.Delete); + } + + [TestCase] + [RecordedTest] + public async Task ValidateSub() + { + SubscriptionResource subscription = await Client.GetDefaultSubscriptionAsync(); + + string deploymentStackName = Recording.GenerateAssetName("deployStackSub-Validate-"); + var deploymentStackId = new ResourceIdentifier(subscription.Id + "/providers/Microsoft.Resources/deploymentStacks/" + deploymentStackName); + var deploymentStack = Client.GetDeploymentStackResource(deploymentStackId); + + var deploymentStackData = CreateSubDeploymentStackDataWithTemplate(AzureLocation.WestUS); + DeploymentStackValidateResult deploymentStackValidateResult = (await deploymentStack.ValidateStackAsync(WaitUntil.Completed, deploymentStackData)).Value; + Assert.NotNull(deploymentStackValidateResult); + } + + /* MG Scoped Deployment Stack Tests */ + + [TestCase] + [RecordedTest] + public async Task DeleteMG() + { + ManagementGroupResource managementGroup = Client.GetManagementGroupResource(ManagementGroupResource.CreateResourceIdentifier("StacksSDKTest")); + + string deploymentStackName = Recording.GenerateAssetName("deployStackMG-Delete-"); + var deploymentStackData = CreateMGDeploymentStackDataWithTemplate(AzureLocation.WestUS); + DeploymentStackResource deploymentStack = (await managementGroup.GetDeploymentStacks().CreateOrUpdateAsync(WaitUntil.Completed, deploymentStackName, deploymentStackData)).Value; + await deploymentStack.DeleteAsync(WaitUntil.Completed); + + var ex = Assert.ThrowsAsync(async () => await deploymentStack.GetAsync()); + Assert.AreEqual(404, ex.Status); + } + + [TestCase] + [RecordedTest] + public async Task ExportMG() + { + ManagementGroupResource managementGroup = Client.GetManagementGroupResource(ManagementGroupResource.CreateResourceIdentifier("StacksSDKTest")); + + string deploymentStackName = Recording.GenerateAssetName("deployStackMG-Export-"); + var deploymentStackData = CreateMGDeploymentStackDataWithTemplate(AzureLocation.WestUS); + DeploymentStackResource deploymentStack = (await managementGroup.GetDeploymentStacks().CreateOrUpdateAsync(WaitUntil.Completed, deploymentStackName, deploymentStackData)).Value; + var deploymentStackTemplate = (await deploymentStack.ExportTemplateAsync()).Value; + Assert.IsNotNull(deploymentStackTemplate); + + // TODO: Output is off by a little and may be how the template is being read. + //Assert.AreEqual(deploymentStackTemplate.Template, deploymentStackData.Template); + + await deploymentStack.DeleteAsync(WaitUntil.Completed, unmanageActionResources: UnmanageActionResourceMode.Delete, unmanageActionResourceGroups: UnmanageActionResourceGroupMode.Delete, unmanageActionManagementGroups: UnmanageActionManagementGroupMode.Delete); + } + + [TestCase] + [RecordedTest] + public async Task ValidateMG() + { + ManagementGroupResource managementGroup = Client.GetManagementGroupResource(ManagementGroupResource.CreateResourceIdentifier("StacksSDKTest")); + + string deploymentStackName = Recording.GenerateAssetName("deployStackMG-Validate-"); + var deploymentStackId = new ResourceIdentifier(managementGroup.Id + "/providers/Microsoft.Resources/deploymentStacks/" + deploymentStackName); + var deploymentStack = Client.GetDeploymentStackResource(deploymentStackId); + + var deploymentStackData = CreateMGDeploymentStackDataWithTemplate(AzureLocation.WestUS); + DeploymentStackValidateResult deploymentStackValidateResult = (await deploymentStack.ValidateStackAsync(WaitUntil.Completed, deploymentStackData)).Value; + Assert.IsNotNull(deploymentStackValidateResult); + } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/tests/Scenario/DeploymentTemplates/mg-stack-template.json b/sdk/resources/Azure.ResourceManager.Resources/tests/Scenario/DeploymentTemplates/mg-stack-template.json new file mode 100644 index 0000000000000..9103dd59aa005 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/tests/Scenario/DeploymentTemplates/mg-stack-template.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-08-01/managementGroupDeploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "message": { + "type": "string" + } + }, + "resources": [], + "outputs": { + "outputMessage": { + "type": "string", + "value": "[parameters('message')]" + } + } +} \ No newline at end of file diff --git a/sdk/resources/Azure.ResourceManager.Resources/tests/Scenario/DeploymentTemplates/rg-stack-template.json b/sdk/resources/Azure.ResourceManager.Resources/tests/Scenario/DeploymentTemplates/rg-stack-template.json new file mode 100644 index 0000000000000..e63064520aa14 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/tests/Scenario/DeploymentTemplates/rg-stack-template.json @@ -0,0 +1,24 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "templateSpecName": { + "type": "string" + } + }, + "variables": { + "location": "[resourceGroup().location]" + }, + "resources": [ + { + "type": "Microsoft.Resources/templateSpecs", + "apiVersion": "2022-02-01", + "name": "[parameters('templateSpecName')]", + "location": "[variables('location')]", + "properties": { + "displayName": "[parameters('templateSpecName')]", + "description": "Template Spec for RG scoped Deployment Stack Test" + } + } + ] +} \ No newline at end of file diff --git a/sdk/resources/Azure.ResourceManager.Resources/tests/Scenario/DeploymentTemplates/sub-stack-template.json b/sdk/resources/Azure.ResourceManager.Resources/tests/Scenario/DeploymentTemplates/sub-stack-template.json new file mode 100644 index 0000000000000..41eea5f5e12c3 --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/tests/Scenario/DeploymentTemplates/sub-stack-template.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "rgname": { + "type": "string", + "defaultValue": "testStacksSDK321" + }, + "location": { + "type": "string", + "defaultValue": "[deployment().location]" + } + }, + "resources": [ + { + "type": "Microsoft.Resources/resourceGroups", + "apiVersion": "2021-04-01", + "name": "[parameters('rgname')]", + "location": "[parameters('location')]" + } + ] +} \ No newline at end of file From 1ced2accc096183f8acbb5e8a9b2d1e6ceebfe4d Mon Sep 17 00:00:00 2001 From: Ayush Gupta - SQL <166794972+guptaayush007@users.noreply.github.com> Date: Thu, 4 Jul 2024 16:45:11 +0530 Subject: [PATCH 015/144] [SQL] Generating the .NET Sdk for adding manual cutover and OperationPhaseDetails parameter In forward Migration v2 workflow for Migrating Azure sterling Db to azure Hyperscale DB (#44470) --- .../Azure.ResourceManager.Sql/CHANGELOG.md | 24 +- ...zure.ResourceManager.Sql.netstandard2.0.cs | 77 +++- .../Samples/Sample_FailoverGroupCollection.cs | 66 ++- .../Samples/Sample_FailoverGroupResource.cs | 57 ++- .../Samples/Sample_SqlDatabaseResource.cs | 120 +++--- ...ServerDatabaseReplicationLinkCollection.cs | 50 ++- ...qlServerDatabaseReplicationLinkResource.cs | 47 ++- .../Samples/Sample_SqlServerResource.cs | 68 +-- .../src/Generated/ArmSqlModelFactory.cs | 201 +++++---- .../Extensions/MockableSqlArmClient.cs | 24 +- .../src/Generated/Extensions/SqlExtensions.cs | 38 +- .../src/Generated/FailoverGroupCollection.cs | 20 +- .../FailoverGroupData.Serialization.cs | 31 ++ .../src/Generated/FailoverGroupData.cs | 7 +- .../src/Generated/FailoverGroupResource.cs | 36 +- .../DatabaseOperationData.Serialization.cs | 31 ++ .../Generated/Models/DatabaseOperationData.cs | 7 +- .../Models/DatabaseOperationPhase.cs | 57 +++ ...baseOperationPhaseDetails.Serialization.cs | 223 ++++++++++ .../Models/DatabaseOperationPhaseDetails.cs | 72 ++++ .../FailoverGroupDatabasesSecondaryType.cs | 51 +++ .../FailoverGroupPatch.Serialization.cs | 16 + .../Generated/Models/FailoverGroupPatch.cs | 7 +- .../Generated/Models/ReplicationLinkType.cs | 2 +- ...abaseReplicationLinkPatch.Serialization.cs | 285 +++++++++++++ .../SqlServerDatabaseReplicationLinkPatch.cs | 72 ++++ .../RestOperations/DatabaseRestOperations.cs | 88 ++-- .../FailoverGroupsRestOperations.cs | 2 +- .../ReplicationLinksRestOperations.cs | 218 +++++++++- .../src/Generated/SqlDatabaseResource.cs | 390 +++++++++--------- ...ServerDatabaseReplicationLinkCollection.cs | 114 ++++- ...tabaseReplicationLinkData.Serialization.cs | 37 +- .../SqlServerDatabaseReplicationLinkData.cs | 13 +- ...qlServerDatabaseReplicationLinkResource.cs | 109 ++++- .../src/Generated/SqlServerResource.cs | 134 +++--- .../Azure.ResourceManager.Sql/src/autorest.md | 12 +- 36 files changed, 2198 insertions(+), 608 deletions(-) create mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseOperationPhase.cs create mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseOperationPhaseDetails.Serialization.cs create mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseOperationPhaseDetails.cs create mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupDatabasesSecondaryType.cs create mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerDatabaseReplicationLinkPatch.Serialization.cs create mode 100644 sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerDatabaseReplicationLinkPatch.cs diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/CHANGELOG.md b/sdk/sqlmanagement/Azure.ResourceManager.Sql/CHANGELOG.md index 7218b46193891..211ccf1149b4f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/CHANGELOG.md +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/CHANGELOG.md @@ -1,15 +1,15 @@ # Release History -## 1.3.0-beta.9 (Unreleased) +## 1.3.0-beta.9 (2024-07-15) ### Features Added -### Breaking Changes - -### Bugs Fixed +- Upgraded api-version tag to latest 'composite-v5'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/f45a76fc39f033947ed12faf4b6416e1e19724cd/specification/sql/resource-manager/readme.md. ### Other Changes +- Upgraded Azure.Core from 1.39.0 to 1.40.0 + ## 1.3.0-beta.8 (2024-05-07) ### Bugs Fixed @@ -20,7 +20,7 @@ ### Features Added -- Add `ArmOperation.Rehydrate` and `ArmOperation.Rehydrate` static methods to rehydrate a long-running operation. +- Added `ArmOperation.Rehydrate` and `ArmOperation.Rehydrate` static methods to rehydrate a long-running operation. ## 1.3.0-beta.6 (2024-03-26) @@ -32,14 +32,14 @@ ### Features Added -- Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. +- Enabled the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. - Added TLS 1.3 to list of valid TLS versions. Also created custom classes needed since the type of MinimalTlsVersion was changed from String to Enum. ## 1.3.0-beta.4 (2023-11-21) ### Features Added -- Enable mocking for extension methods, refer this [document](https://aka.ms/azsdk/net/mocking) for more details. +- Enabled mocking for extension methods, refer this [document](https://aka.ms/azsdk/net/mocking) for more details. ### Other Changes @@ -65,7 +65,7 @@ ### Features Added -- Enable the model factory feature for model mocking, more information can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-mocking-factory-builder). +- Enabled the model factory feature for model mocking, more information can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-mocking-factory-builder). - Added support for `ManagedInstanceServerConfigurationOption`, `ManagedInstanceStartStopSchedule` and `ManagedLedgerDigestUpload` resources. - Added `filter` and `expand` parameters to `Get` and `Exists` methods of `RestorableDroppedDatabaseCollection` and `SqlDatabaseCollection`. - Added `filter` and `expand` parameters to `Get` methods of `RestorableDroppedDatabaseResource` and `SqlDatabaseResource`. @@ -147,12 +147,12 @@ Polishing since last public beta release: ### Features Added -- Add Update methods in resource classes. +- Added Update methods in resource classes. ### Breaking Changes -- Rename private endpoint resource names with `Sql` prefix. -- Rename `PrivateLinkServiceConnectionState` properties to `ConnectionState`. +- Renamed private endpoint resource names with `Sql` prefix. +- Renamed `PrivateLinkServiceConnectionState` properties to `ConnectionState`. ### Bugs Fixed @@ -226,4 +226,4 @@ This package follows the [new Azure SDK guidelines](https://azure.github.io/azur This package is a Public Preview version, so expect incompatible changes in subsequent releases as we improve the product. To provide feedback, submit an issue in our [Azure SDK for .NET GitHub repo](https://github.com/Azure/azure-sdk-for-net/issues). -> NOTE: For more information about unified authentication, please refer to [Microsoft Azure Identity documentation for .NET](https://docs.microsoft.com//dotnet/api/overview/azure/identity-readme?view=azure-dotnet). +> NOTE: For more information about unified authentication, please refer to [Microsoft Azure Identity documentation for .NET](https://docs.microsoft.com//dotnet/api/overview/azure/identity-readme?view=azure-dotnet). \ No newline at end of file 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 74a6da02aede1..8a231beb90860 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 @@ -636,6 +636,7 @@ public FailoverGroupData() { } public Azure.ResourceManager.Sql.Models.FailoverGroupReadWriteEndpoint ReadWriteEndpoint { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.FailoverGroupReplicationRole? ReplicationRole { get { throw null; } } public string ReplicationState { get { throw null; } } + public Azure.ResourceManager.Sql.Models.FailoverGroupDatabasesSecondaryType? SecondaryType { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } Azure.ResourceManager.Sql.FailoverGroupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -4847,6 +4848,8 @@ public SqlServerData(Azure.Core.AzureLocation location) { } public partial class SqlServerDatabaseReplicationLinkCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected SqlServerDatabaseReplicationLinkCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string linkId, Azure.ResourceManager.Sql.SqlServerDatabaseReplicationLinkData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string linkId, Azure.ResourceManager.Sql.SqlServerDatabaseReplicationLinkData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string linkId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string linkId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string linkId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -4863,8 +4866,9 @@ public partial class SqlServerDatabaseReplicationLinkData : Azure.ResourceManage { public SqlServerDatabaseReplicationLinkData() { } public bool? IsTerminationAllowed { get { throw null; } } - public Azure.ResourceManager.Sql.Models.ReplicationLinkType? LinkType { get { throw null; } } + public Azure.ResourceManager.Sql.Models.ReplicationLinkType? LinkType { get { throw null; } set { } } public string PartnerDatabase { get { throw null; } } + public string PartnerDatabaseId { get { throw null; } } public Azure.Core.AzureLocation? PartnerLocation { get { throw null; } } public Azure.ResourceManager.Sql.Models.SqlServerDatabaseReplicationRole? PartnerRole { get { throw null; } } public string PartnerServer { get { throw null; } } @@ -4899,6 +4903,8 @@ protected SqlServerDatabaseReplicationLinkResource() { } Azure.ResourceManager.Sql.SqlServerDatabaseReplicationLinkData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Sql.Models.SqlServerDatabaseReplicationLinkPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Sql.Models.SqlServerDatabaseReplicationLinkPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class SqlServerDatabaseRestorePointCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -6991,7 +6997,8 @@ public static partial class ArmSqlModelFactory public static Azure.ResourceManager.Sql.Models.DatabaseExportDefinition DatabaseExportDefinition(Azure.ResourceManager.Sql.Models.StorageKeyType storageKeyType = default(Azure.ResourceManager.Sql.Models.StorageKeyType), string storageKey = null, System.Uri storageUri = null, string administratorLogin = null, string administratorLoginPassword = null, string authenticationType = null, Azure.ResourceManager.Sql.Models.NetworkIsolationSettings networkIsolation = null) { throw null; } public static Azure.ResourceManager.Sql.Models.DatabaseIdentity DatabaseIdentity(Azure.ResourceManager.Sql.Models.DatabaseIdentityType? identityType = default(Azure.ResourceManager.Sql.Models.DatabaseIdentityType?), System.Guid? tenantId = default(System.Guid?), System.Collections.Generic.IDictionary userAssignedIdentities = null) { throw null; } public static Azure.ResourceManager.Sql.Models.DatabaseImportDefinition DatabaseImportDefinition(string databaseName = null, string edition = null, string serviceObjectiveName = null, string maxSizeBytes = null, Azure.ResourceManager.Sql.Models.StorageKeyType storageKeyType = default(Azure.ResourceManager.Sql.Models.StorageKeyType), string storageKey = null, System.Uri storageUri = null, string administratorLogin = null, string administratorLoginPassword = null, string authenticationType = null, Azure.ResourceManager.Sql.Models.NetworkIsolationSettings networkIsolation = null) { throw null; } - public static Azure.ResourceManager.Sql.Models.DatabaseOperationData DatabaseOperationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string databaseName = null, string operation = null, string operationFriendlyName = null, int? percentComplete = default(int?), string serverName = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.ManagementOperationState? state = default(Azure.ResourceManager.Sql.Models.ManagementOperationState?), int? errorCode = default(int?), string errorDescription = null, int? errorSeverity = default(int?), bool? isUserError = default(bool?), System.DateTimeOffset? estimatedCompleteOn = default(System.DateTimeOffset?), string description = null, bool? isCancellable = default(bool?)) { throw null; } + public static Azure.ResourceManager.Sql.Models.DatabaseOperationData DatabaseOperationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string databaseName = null, string operation = null, string operationFriendlyName = null, int? percentComplete = default(int?), string serverName = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.ManagementOperationState? state = default(Azure.ResourceManager.Sql.Models.ManagementOperationState?), int? errorCode = default(int?), string errorDescription = null, int? errorSeverity = default(int?), bool? isUserError = default(bool?), System.DateTimeOffset? estimatedCompleteOn = default(System.DateTimeOffset?), string description = null, bool? isCancellable = default(bool?), Azure.ResourceManager.Sql.Models.DatabaseOperationPhaseDetails operationPhaseDetails = null) { throw null; } + public static Azure.ResourceManager.Sql.Models.DatabaseOperationPhaseDetails DatabaseOperationPhaseDetails(Azure.ResourceManager.Sql.Models.DatabaseOperationPhase? phase = default(Azure.ResourceManager.Sql.Models.DatabaseOperationPhase?), System.Collections.Generic.IReadOnlyDictionary phaseInformation = null) { throw null; } public static Azure.ResourceManager.Sql.DatabaseSchemaData DatabaseSchemaData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null) { throw null; } public static Azure.ResourceManager.Sql.DatabaseTableData DatabaseTableData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Sql.Models.TableTemporalType? temporalType = default(Azure.ResourceManager.Sql.Models.TableTemporalType?), bool? isMemoryOptimized = default(bool?)) { throw null; } public static Azure.ResourceManager.Sql.Models.DatabaseUsage DatabaseUsage(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string displayName = null, double? currentValue = default(double?), double? limit = default(double?), string unit = null) { throw null; } @@ -7016,7 +7023,7 @@ public static partial class ArmSqlModelFactory public static Azure.ResourceManager.Sql.EndpointCertificateData EndpointCertificateData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string publicBlob = null) { throw null; } public static Azure.ResourceManager.Sql.ExtendedDatabaseBlobAuditingPolicyData ExtendedDatabaseBlobAuditingPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string predicateExpression = null, int? retentionDays = default(int?), System.Collections.Generic.IEnumerable auditActionsAndGroups = null, bool? isStorageSecondaryKeyInUse = default(bool?), bool? isAzureMonitorTargetEnabled = default(bool?), int? queueDelayMs = default(int?), bool? isManagedIdentityInUse = default(bool?), Azure.ResourceManager.Sql.Models.BlobAuditingPolicyState? state = default(Azure.ResourceManager.Sql.Models.BlobAuditingPolicyState?), string storageEndpoint = null, string storageAccountAccessKey = null, System.Guid? storageAccountSubscriptionId = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.Sql.ExtendedServerBlobAuditingPolicyData ExtendedServerBlobAuditingPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? isDevopsAuditEnabled = default(bool?), string predicateExpression = null, int? retentionDays = default(int?), System.Collections.Generic.IEnumerable auditActionsAndGroups = null, bool? isStorageSecondaryKeyInUse = default(bool?), bool? isAzureMonitorTargetEnabled = default(bool?), int? queueDelayMs = default(int?), bool? isManagedIdentityInUse = default(bool?), Azure.ResourceManager.Sql.Models.BlobAuditingPolicyState? state = default(Azure.ResourceManager.Sql.Models.BlobAuditingPolicyState?), string storageEndpoint = null, string storageAccountAccessKey = null, System.Guid? storageAccountSubscriptionId = default(System.Guid?)) { throw null; } - public static Azure.ResourceManager.Sql.FailoverGroupData FailoverGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.Sql.Models.FailoverGroupReadWriteEndpoint readWriteEndpoint = null, Azure.ResourceManager.Sql.Models.FailoverGroupReadOnlyEndpoint readOnlyEndpoint = null, Azure.ResourceManager.Sql.Models.FailoverGroupReplicationRole? replicationRole = default(Azure.ResourceManager.Sql.Models.FailoverGroupReplicationRole?), string replicationState = null, System.Collections.Generic.IEnumerable partnerServers = null, System.Collections.Generic.IEnumerable failoverDatabases = null) { throw null; } + public static Azure.ResourceManager.Sql.FailoverGroupData FailoverGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.Sql.Models.FailoverGroupReadWriteEndpoint readWriteEndpoint = null, Azure.ResourceManager.Sql.Models.FailoverGroupReadOnlyEndpoint readOnlyEndpoint = null, Azure.ResourceManager.Sql.Models.FailoverGroupReplicationRole? replicationRole = default(Azure.ResourceManager.Sql.Models.FailoverGroupReplicationRole?), string replicationState = null, System.Collections.Generic.IEnumerable partnerServers = null, System.Collections.Generic.IEnumerable failoverDatabases = null, Azure.ResourceManager.Sql.Models.FailoverGroupDatabasesSecondaryType? secondaryType = default(Azure.ResourceManager.Sql.Models.FailoverGroupDatabasesSecondaryType?)) { throw null; } public static Azure.ResourceManager.Sql.GeoBackupPolicyData GeoBackupPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string kind = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), Azure.ResourceManager.Sql.Models.GeoBackupPolicyState state = Azure.ResourceManager.Sql.Models.GeoBackupPolicyState.Disabled, string storageType = null) { throw null; } public static Azure.ResourceManager.Sql.Models.ImportExistingDatabaseDefinition ImportExistingDatabaseDefinition(Azure.ResourceManager.Sql.Models.StorageKeyType storageKeyType = default(Azure.ResourceManager.Sql.Models.StorageKeyType), string storageKey = null, System.Uri storageUri = null, string administratorLogin = null, string administratorLoginPassword = null, string authenticationType = null, Azure.ResourceManager.Sql.Models.NetworkIsolationSettings networkIsolation = null) { throw null; } public static Azure.ResourceManager.Sql.Models.ImportExportExtensionsOperationResult ImportExportExtensionsOperationResult(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Guid? requestId = default(System.Guid?), string requestType = null, string lastModifiedTime = null, string serverName = null, string databaseName = null, string status = null, string errorMessage = null) { throw null; } @@ -7152,7 +7159,8 @@ public static partial class ArmSqlModelFactory public static Azure.ResourceManager.Sql.SqlServerCommunicationLinkData SqlServerCommunicationLinkData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string kind = null, string state = null, string partnerServer = null) { throw null; } public static Azure.ResourceManager.Sql.SqlServerConnectionPolicyData SqlServerConnectionPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string kind = null, Azure.ResourceManager.Sql.Models.ServerConnectionType? connectionType = default(Azure.ResourceManager.Sql.Models.ServerConnectionType?)) { throw null; } public static Azure.ResourceManager.Sql.SqlServerData SqlServerData(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 tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string kind = null, string administratorLogin = null, string administratorLoginPassword = null, string version = null, string state = null, string fullyQualifiedDomainName = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.Sql.Models.SqlMinimalTlsVersion? minTlsVersion = default(Azure.ResourceManager.Sql.Models.SqlMinimalTlsVersion?), Azure.ResourceManager.Sql.Models.ServerNetworkAccessFlag? publicNetworkAccess = default(Azure.ResourceManager.Sql.Models.ServerNetworkAccessFlag?), Azure.ResourceManager.Sql.Models.ServerWorkspaceFeature? workspaceFeature = default(Azure.ResourceManager.Sql.Models.ServerWorkspaceFeature?), Azure.Core.ResourceIdentifier primaryUserAssignedIdentityId = null, System.Guid? federatedClientId = default(System.Guid?), System.Uri keyId = null, Azure.ResourceManager.Sql.Models.ServerExternalAdministrator administrators = null, Azure.ResourceManager.Sql.Models.ServerNetworkAccessFlag? restrictOutboundNetworkAccess = default(Azure.ResourceManager.Sql.Models.ServerNetworkAccessFlag?), Azure.ResourceManager.Sql.Models.ServerNetworkAccessFlag? isIPv6Enabled = default(Azure.ResourceManager.Sql.Models.ServerNetworkAccessFlag?), Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus? externalGovernanceStatus = default(Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus?)) { throw null; } - public static Azure.ResourceManager.Sql.SqlServerDatabaseReplicationLinkData SqlServerDatabaseReplicationLinkData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string partnerServer = null, string partnerDatabase = null, Azure.Core.AzureLocation? partnerLocation = default(Azure.Core.AzureLocation?), Azure.ResourceManager.Sql.Models.SqlServerDatabaseReplicationRole? role = default(Azure.ResourceManager.Sql.Models.SqlServerDatabaseReplicationRole?), Azure.ResourceManager.Sql.Models.SqlServerDatabaseReplicationRole? partnerRole = default(Azure.ResourceManager.Sql.Models.SqlServerDatabaseReplicationRole?), string replicationMode = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), int? percentComplete = default(int?), Azure.ResourceManager.Sql.Models.ReplicationLinkState? replicationState = default(Azure.ResourceManager.Sql.Models.ReplicationLinkState?), bool? isTerminationAllowed = default(bool?), Azure.ResourceManager.Sql.Models.ReplicationLinkType? linkType = default(Azure.ResourceManager.Sql.Models.ReplicationLinkType?)) { throw null; } + public static Azure.ResourceManager.Sql.SqlServerDatabaseReplicationLinkData SqlServerDatabaseReplicationLinkData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string partnerServer = null, string partnerDatabase = null, string partnerDatabaseId = null, Azure.Core.AzureLocation? partnerLocation = default(Azure.Core.AzureLocation?), Azure.ResourceManager.Sql.Models.SqlServerDatabaseReplicationRole? role = default(Azure.ResourceManager.Sql.Models.SqlServerDatabaseReplicationRole?), Azure.ResourceManager.Sql.Models.SqlServerDatabaseReplicationRole? partnerRole = default(Azure.ResourceManager.Sql.Models.SqlServerDatabaseReplicationRole?), string replicationMode = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), int? percentComplete = default(int?), Azure.ResourceManager.Sql.Models.ReplicationLinkState? replicationState = default(Azure.ResourceManager.Sql.Models.ReplicationLinkState?), bool? isTerminationAllowed = default(bool?), Azure.ResourceManager.Sql.Models.ReplicationLinkType? linkType = default(Azure.ResourceManager.Sql.Models.ReplicationLinkType?)) { throw null; } + public static Azure.ResourceManager.Sql.Models.SqlServerDatabaseReplicationLinkPatch SqlServerDatabaseReplicationLinkPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Sql.Models.ReplicationLinkType? linkType = default(Azure.ResourceManager.Sql.Models.ReplicationLinkType?)) { throw null; } public static Azure.ResourceManager.Sql.SqlServerDatabaseRestorePointData SqlServerDatabaseRestorePointData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), Azure.ResourceManager.Sql.Models.RestorePointType? restorePointType = default(Azure.ResourceManager.Sql.Models.RestorePointType?), System.DateTimeOffset? earliestRestoreOn = default(System.DateTimeOffset?), System.DateTimeOffset? restorePointCreatedOn = default(System.DateTimeOffset?), string restorePointLabel = null) { throw null; } public static Azure.ResourceManager.Sql.SqlServerDevOpsAuditingSettingData SqlServerDevOpsAuditingSettingData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? isAzureMonitorTargetEnabled = default(bool?), bool? isManagedIdentityInUse = default(bool?), Azure.ResourceManager.Sql.Models.BlobAuditingPolicyState? state = default(Azure.ResourceManager.Sql.Models.BlobAuditingPolicyState?), string storageEndpoint = null, string storageAccountAccessKey = null, System.Guid? storageAccountSubscriptionId = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.Sql.SqlServerDnsAliasData SqlServerDnsAliasData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string azureDnsRecord = null) { throw null; } @@ -7540,6 +7548,7 @@ public DatabaseOperationData() { } public bool? IsUserError { get { throw null; } } public string Operation { get { throw null; } } public string OperationFriendlyName { get { throw null; } } + public Azure.ResourceManager.Sql.Models.DatabaseOperationPhaseDetails OperationPhaseDetails { get { throw null; } } public int? PercentComplete { get { throw null; } } public string ServerName { get { throw null; } } public System.DateTimeOffset? StartOn { get { throw null; } } @@ -7551,6 +7560,37 @@ public DatabaseOperationData() { } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DatabaseOperationPhase : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DatabaseOperationPhase(string value) { throw null; } + public static Azure.ResourceManager.Sql.Models.DatabaseOperationPhase Catchup { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.DatabaseOperationPhase Copying { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.DatabaseOperationPhase CutoverInProgress { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.DatabaseOperationPhase WaitingForCutover { get { throw null; } } + public bool Equals(Azure.ResourceManager.Sql.Models.DatabaseOperationPhase 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.Sql.Models.DatabaseOperationPhase left, Azure.ResourceManager.Sql.Models.DatabaseOperationPhase right) { throw null; } + public static implicit operator Azure.ResourceManager.Sql.Models.DatabaseOperationPhase (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Sql.Models.DatabaseOperationPhase left, Azure.ResourceManager.Sql.Models.DatabaseOperationPhase right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DatabaseOperationPhaseDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DatabaseOperationPhaseDetails() { } + public Azure.ResourceManager.Sql.Models.DatabaseOperationPhase? Phase { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary PhaseInformation { get { throw null; } } + Azure.ResourceManager.Sql.Models.DatabaseOperationPhaseDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Sql.Models.DatabaseOperationPhaseDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct DatabaseReadScale : System.IEquatable { private readonly object _dummy; @@ -7989,6 +8029,24 @@ internal ElasticPoolPerformanceLevelCapability() { } public static bool operator !=(Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus left, Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FailoverGroupDatabasesSecondaryType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FailoverGroupDatabasesSecondaryType(string value) { throw null; } + public static Azure.ResourceManager.Sql.Models.FailoverGroupDatabasesSecondaryType Geo { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.FailoverGroupDatabasesSecondaryType Standby { get { throw null; } } + public bool Equals(Azure.ResourceManager.Sql.Models.FailoverGroupDatabasesSecondaryType 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.Sql.Models.FailoverGroupDatabasesSecondaryType left, Azure.ResourceManager.Sql.Models.FailoverGroupDatabasesSecondaryType right) { throw null; } + public static implicit operator Azure.ResourceManager.Sql.Models.FailoverGroupDatabasesSecondaryType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Sql.Models.FailoverGroupDatabasesSecondaryType left, Azure.ResourceManager.Sql.Models.FailoverGroupDatabasesSecondaryType right) { throw null; } + public override string ToString() { throw null; } + } public partial class FailoverGroupPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public FailoverGroupPatch() { } @@ -8001,6 +8059,7 @@ public FailoverGroupPatch() { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Sql.Models.ReadOnlyEndpointFailoverPolicy? ReadOnlyEndpointFailoverPolicy { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.FailoverGroupReadWriteEndpoint ReadWriteEndpoint { get { throw null; } set { } } + public Azure.ResourceManager.Sql.Models.FailoverGroupDatabasesSecondaryType? SecondaryType { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } Azure.ResourceManager.Sql.Models.FailoverGroupPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -10960,6 +11019,16 @@ public SqlScheduleItem(Azure.ResourceManager.Sql.Models.SqlDayOfWeek startDay, s public static bool operator !=(Azure.ResourceManager.Sql.Models.SqlSecurityAlertPolicyName left, Azure.ResourceManager.Sql.Models.SqlSecurityAlertPolicyName right) { throw null; } public override string ToString() { throw null; } } + public partial class SqlServerDatabaseReplicationLinkPatch : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SqlServerDatabaseReplicationLinkPatch() { } + public Azure.ResourceManager.Sql.Models.ReplicationLinkType? LinkType { get { throw null; } set { } } + Azure.ResourceManager.Sql.Models.SqlServerDatabaseReplicationLinkPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Sql.Models.SqlServerDatabaseReplicationLinkPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public enum SqlServerDatabaseReplicationRole { Primary = 0, diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_FailoverGroupCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_FailoverGroupCollection.cs index d89edac6b97b0..8ef1b245ddce3 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_FailoverGroupCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_FailoverGroupCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_FailoverGroupCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListFailoverGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/FailoverGroupList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupList.json // this example is just showing the usage of "FailoverGroups_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ListFailoverGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetFailoverGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/FailoverGroupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupGet.json // this example is just showing the usage of "FailoverGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_GetFailoverGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetFailoverGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/FailoverGroupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupGet.json // this example is just showing the usage of "FailoverGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_GetFailoverGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetFailoverGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/FailoverGroupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupGet.json // this example is just showing the usage of "FailoverGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_GetFailoverGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateFailoverGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/FailoverGroupCreateOrUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupCreateOrUpdate.json // this example is just showing the usage of "FailoverGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -215,5 +215,61 @@ public async Task CreateOrUpdate_CreateFailoverGroup() // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + + // Create failover group with standby secondary database on partner server. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateFailoverGroupWithStandbySecondaryDatabaseOnPartnerServer() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupCreateOrUpdateStandbySecondary.json + // this example is just showing the usage of "FailoverGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SqlServerResource created on azure + // for more information of creating SqlServerResource, please refer to the document of SqlServerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "Default"; + string serverName = "failover-group-primary-server"; + ResourceIdentifier sqlServerResourceId = SqlServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); + SqlServerResource sqlServer = client.GetSqlServerResource(sqlServerResourceId); + + // get the collection of this FailoverGroupResource + FailoverGroupCollection collection = sqlServer.GetFailoverGroups(); + + // invoke the operation + string failoverGroupName = "failover-group-test-3"; + FailoverGroupData data = new FailoverGroupData() + { + ReadWriteEndpoint = new FailoverGroupReadWriteEndpoint(ReadWriteEndpointFailoverPolicy.Automatic) + { + FailoverWithDataLossGracePeriodMinutes = 480, + }, + ReadOnlyEndpoint = new FailoverGroupReadOnlyEndpoint() + { + FailoverPolicy = ReadOnlyEndpointFailoverPolicy.Disabled, + }, + PartnerServers = +{ +new PartnerServerInfo(new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-secondary-server")) +}, + FailoverDatabases = +{ +new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1"),new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-2") +}, + SecondaryType = FailoverGroupDatabasesSecondaryType.Standby, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, failoverGroupName, data); + FailoverGroupResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FailoverGroupData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_FailoverGroupResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_FailoverGroupResource.cs index ce916de1687f1..871e0e5e48d1f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_FailoverGroupResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_FailoverGroupResource.cs @@ -20,7 +20,7 @@ public partial class Sample_FailoverGroupResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetFailoverGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/FailoverGroupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupGet.json // this example is just showing the usage of "FailoverGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_GetFailoverGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteFailoverGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/FailoverGroupDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupDelete.json // this example is just showing the usage of "FailoverGroups_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -75,12 +75,57 @@ public async Task Delete_DeleteFailoverGroup() Console.WriteLine($"Succeeded"); } + // Add database to failover group with standby secondary on partner server. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_AddDatabaseToFailoverGroupWithStandbySecondaryOnPartnerServer() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupUpdateStandbySecondary.json + // this example is just showing the usage of "FailoverGroups_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FailoverGroupResource created on azure + // for more information of creating FailoverGroupResource, please refer to the document of FailoverGroupResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "Default"; + string serverName = "failover-group-primary-server"; + string failoverGroupName = "failover-group-test-1"; + ResourceIdentifier failoverGroupResourceId = FailoverGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, failoverGroupName); + FailoverGroupResource failoverGroup = client.GetFailoverGroupResource(failoverGroupResourceId); + + // invoke the operation + FailoverGroupPatch patch = new FailoverGroupPatch() + { + ReadWriteEndpoint = new FailoverGroupReadWriteEndpoint(ReadWriteEndpointFailoverPolicy.Automatic) + { + FailoverWithDataLossGracePeriodMinutes = 120, + }, + FailoverDatabases = +{ +new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/failover-group-primary-server/databases/testdb-1") +}, + SecondaryType = FailoverGroupDatabasesSecondaryType.Standby, + }; + ArmOperation lro = await failoverGroup.UpdateAsync(WaitUntil.Completed, patch); + FailoverGroupResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FailoverGroupData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + // Update failover group [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateFailoverGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/FailoverGroupUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupUpdate.json // this example is just showing the usage of "FailoverGroups_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -124,7 +169,7 @@ public async Task Update_UpdateFailoverGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Failover_PlannedFailoverOfAFailoverGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/FailoverGroupFailover.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupFailover.json // this example is just showing the usage of "FailoverGroups_Failover" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -157,7 +202,7 @@ public async Task Failover_PlannedFailoverOfAFailoverGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ForceFailoverAllowDataLoss_ForcedFailoverOfAFailoverGroupAllowingDataLoss() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/FailoverGroupForceFailoverAllowDataLoss.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupForceFailoverAllowDataLoss.json // this example is just showing the usage of "FailoverGroups_ForceFailoverAllowDataLoss" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -190,7 +235,7 @@ public async Task ForceFailoverAllowDataLoss_ForcedFailoverOfAFailoverGroupAllow [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task TryPlannedBeforeForcedFailover_TryPlannedBeforeForcedFailoverOfAFailoverGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-02-01-preview/examples/FailoverGroupTryPlannedBeforeForcedFailover.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/FailoverGroupTryPlannedBeforeForcedFailover.json // this example is just showing the usage of "FailoverGroups_TryPlannedBeforeForcedFailover" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseResource.cs index a5cfc582e8d56..fa4730591372a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseResource.cs @@ -268,66 +268,6 @@ public async Task GetDatabaseExtensions_ListDatabaseExtensions() Console.WriteLine($"Succeeded"); } - // Cancel the database management operation - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CancelDatabaseOperation_CancelTheDatabaseManagementOperation() - { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/CancelDatabaseOperation.json - // this example is just showing the usage of "DatabaseOperations_Cancel" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SqlDatabaseResource created on azure - // for more information of creating SqlDatabaseResource, please refer to the document of SqlDatabaseResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "sqlcrudtest-7398"; - string serverName = "sqlcrudtest-6661"; - string databaseName = "testdb"; - ResourceIdentifier sqlDatabaseResourceId = SqlDatabaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, databaseName); - SqlDatabaseResource sqlDatabase = client.GetSqlDatabaseResource(sqlDatabaseResourceId); - - // invoke the operation - Guid operationId = Guid.Parse("f779414b-e748-4925-8cfe-c8598f7660ae"); - await sqlDatabase.CancelDatabaseOperationAsync(operationId); - - Console.WriteLine($"Succeeded"); - } - - // List the database management operations - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetDatabaseOperations_ListTheDatabaseManagementOperations() - { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2021-02-01-preview/examples/ListDatabaseOperations.json - // this example is just showing the usage of "DatabaseOperations_ListByDatabase" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SqlDatabaseResource created on azure - // for more information of creating SqlDatabaseResource, please refer to the document of SqlDatabaseResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "sqlcrudtest-7398"; - string serverName = "sqlcrudtest-4645"; - string databaseName = "testdb"; - ResourceIdentifier sqlDatabaseResourceId = SqlDatabaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, databaseName); - SqlDatabaseResource sqlDatabase = client.GetSqlDatabaseResource(sqlDatabaseResourceId); - - // invoke the operation and iterate over the result - await foreach (DatabaseOperationData item in sqlDatabase.GetDatabaseOperationsAsync()) - { - Console.WriteLine($"Succeeded: {item}"); - } - - Console.WriteLine($"Succeeded"); - } - // Gets database usages. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] @@ -1366,5 +1306,65 @@ public async Task UpgradeDataWarehouse_UpgradesADataWarehouse() Console.WriteLine($"Succeeded"); } + + // List the database management operations + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetDatabaseOperations_ListTheDatabaseManagementOperations() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/ListDatabaseOperations.json + // this example is just showing the usage of "DatabaseOperations_ListByDatabase" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SqlDatabaseResource created on azure + // for more information of creating SqlDatabaseResource, please refer to the document of SqlDatabaseResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "Default-SQL-SouthEastAsia"; + string serverName = "testsvr"; + string databaseName = "testdb"; + ResourceIdentifier sqlDatabaseResourceId = SqlDatabaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, databaseName); + SqlDatabaseResource sqlDatabase = client.GetSqlDatabaseResource(sqlDatabaseResourceId); + + // invoke the operation and iterate over the result + await foreach (DatabaseOperationData item in sqlDatabase.GetDatabaseOperationsAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Cancel the database management operation + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CancelDatabaseOperation_CancelTheDatabaseManagementOperation() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-11-01-preview/examples/CancelDatabaseOperation.json + // this example is just showing the usage of "DatabaseOperations_Cancel" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SqlDatabaseResource created on azure + // for more information of creating SqlDatabaseResource, please refer to the document of SqlDatabaseResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "sqlcrudtest-7398"; + string serverName = "sqlcrudtest-6661"; + string databaseName = "testdb"; + ResourceIdentifier sqlDatabaseResourceId = SqlDatabaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, databaseName); + SqlDatabaseResource sqlDatabase = client.GetSqlDatabaseResource(sqlDatabaseResourceId); + + // invoke the operation + Guid operationId = Guid.Parse("f779414b-e748-4925-8cfe-c8598f7660ae"); + await sqlDatabase.CancelDatabaseOperationAsync(operationId); + + Console.WriteLine($"Succeeded"); + } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDatabaseReplicationLinkCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDatabaseReplicationLinkCollection.cs index 1e48f5e0ddbbc..fd83d4e4d8c54 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDatabaseReplicationLinkCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDatabaseReplicationLinkCollection.cs @@ -9,6 +9,7 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; +using Azure.ResourceManager.Sql.Models; namespace Azure.ResourceManager.Sql.Samples { @@ -19,7 +20,7 @@ public partial class Sample_SqlServerDatabaseReplicationLinkCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListReplicationLinksOnServerOnDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/ReplicationLinkListByDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ReplicationLinkListByDatabase.json // this example is just showing the usage of "ReplicationLinks_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +58,7 @@ public async Task GetAll_ListReplicationLinksOnServerOnDatabase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsTheReplicationLink() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/ReplicationLinkGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ReplicationLinkGet.json // this example is just showing the usage of "ReplicationLinks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +94,7 @@ public async Task Get_GetsTheReplicationLink() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetsTheReplicationLink() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/ReplicationLinkGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ReplicationLinkGet.json // this example is just showing the usage of "ReplicationLinks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -125,7 +126,7 @@ public async Task Exists_GetsTheReplicationLink() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetsTheReplicationLink() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/ReplicationLinkGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ReplicationLinkGet.json // this example is just showing the usage of "ReplicationLinks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,5 +164,46 @@ public async Task GetIfExists_GetsTheReplicationLink() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } } + + // Updates Replication Link + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_UpdatesReplicationLink() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ReplicationLinkCreateOrUpdate.json + // this example is just showing the usage of "ReplicationLinks_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SqlDatabaseResource created on azure + // for more information of creating SqlDatabaseResource, please refer to the document of SqlDatabaseResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "Default"; + string serverName = "sourcesvr"; + string databaseName = "gamma-db"; + ResourceIdentifier sqlDatabaseResourceId = SqlDatabaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, databaseName); + SqlDatabaseResource sqlDatabase = client.GetSqlDatabaseResource(sqlDatabaseResourceId); + + // get the collection of this SqlServerDatabaseReplicationLinkResource + SqlServerDatabaseReplicationLinkCollection collection = sqlDatabase.GetSqlServerDatabaseReplicationLinks(); + + // invoke the operation + string linkId = "00000000-1111-2222-3333-666666666666"; + SqlServerDatabaseReplicationLinkData data = new SqlServerDatabaseReplicationLinkData() + { + LinkType = ReplicationLinkType.Standby, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, linkId, data); + SqlServerDatabaseReplicationLinkResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlServerDatabaseReplicationLinkData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDatabaseReplicationLinkResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDatabaseReplicationLinkResource.cs index 284a4b19c55d4..2da4ae0d65d4e 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDatabaseReplicationLinkResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDatabaseReplicationLinkResource.cs @@ -9,6 +9,7 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; +using Azure.ResourceManager.Sql.Models; namespace Azure.ResourceManager.Sql.Samples { @@ -19,7 +20,7 @@ public partial class Sample_SqlServerDatabaseReplicationLinkResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsTheReplicationLink() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/ReplicationLinkGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ReplicationLinkGet.json // this example is just showing the usage of "ReplicationLinks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +53,7 @@ public async Task Get_GetsTheReplicationLink() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteReplicationLinkOnServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/ReplicationLinkDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ReplicationLinkDelete.json // this example is just showing the usage of "ReplicationLinks_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -76,12 +77,50 @@ public async Task Delete_DeleteReplicationLinkOnServer() Console.WriteLine($"Succeeded"); } + // Update Replication Link + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_UpdateReplicationLink() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ReplicationLinkUpdate.json + // this example is just showing the usage of "ReplicationLinks_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SqlServerDatabaseReplicationLinkResource created on azure + // for more information of creating SqlServerDatabaseReplicationLinkResource, please refer to the document of SqlServerDatabaseReplicationLinkResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "Default"; + string serverName = "sourcesvr"; + string databaseName = "gamma-db"; + string linkId = "00000000-1111-2222-3333-666666666666"; + ResourceIdentifier sqlServerDatabaseReplicationLinkResourceId = SqlServerDatabaseReplicationLinkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, databaseName, linkId); + SqlServerDatabaseReplicationLinkResource sqlServerDatabaseReplicationLink = client.GetSqlServerDatabaseReplicationLinkResource(sqlServerDatabaseReplicationLinkResourceId); + + // invoke the operation + SqlServerDatabaseReplicationLinkPatch patch = new SqlServerDatabaseReplicationLinkPatch() + { + LinkType = ReplicationLinkType.Standby, + }; + ArmOperation lro = await sqlServerDatabaseReplicationLink.UpdateAsync(WaitUntil.Completed, patch); + SqlServerDatabaseReplicationLinkResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlServerDatabaseReplicationLinkData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + // Planned failover of a replication link [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Failover_PlannedFailoverOfAReplicationLink() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/ReplicationLinkFailover.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ReplicationLinkFailover.json // this example is just showing the usage of "ReplicationLinks_Failover" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -115,7 +154,7 @@ public async Task Failover_PlannedFailoverOfAReplicationLink() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task FailoverAllowDataLoss_ForcedFailoverOfAReplicationLink() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/ReplicationLinkFailoverAllowDataLoss.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ReplicationLinkFailoverAllowDataLoss.json // this example is just showing the usage of "ReplicationLinks_FailoverAllowDataLoss" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerResource.cs index de810029f8387..c7408ec4a04ad 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerResource.cs @@ -107,40 +107,6 @@ public async Task CreateTdeCertificate_UploadATDECertificate() Console.WriteLine($"Succeeded"); } - // List replication links on server - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetReplicationLinks_ListReplicationLinksOnServer() - { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2022-02-01-preview/examples/ReplicationLinkListByServer.json - // this example is just showing the usage of "ReplicationLinks_ListByServer" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SqlServerResource created on azure - // for more information of creating SqlServerResource, please refer to the document of SqlServerResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "Default"; - string serverName = "sourcesvr"; - ResourceIdentifier sqlServerResourceId = SqlServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); - SqlServerResource sqlServer = client.GetSqlServerResource(sqlServerResourceId); - - // invoke the operation and iterate over the result - await foreach (SqlServerDatabaseReplicationLinkResource item in sqlServer.GetReplicationLinksAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - SqlServerDatabaseReplicationLinkData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - // Gets a list of inaccessible databases in a logical server [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] @@ -544,5 +510,39 @@ public async Task RefreshStatus_RefreshExternalGovernanceEnablementStatus() Console.WriteLine($"Succeeded: {result}"); } + + // List replication links on server + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetReplicationLinks_ListReplicationLinksOnServer() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ReplicationLinkListByServer.json + // this example is just showing the usage of "ReplicationLinks_ListByServer" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SqlServerResource created on azure + // for more information of creating SqlServerResource, please refer to the document of SqlServerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "Default"; + string serverName = "sourcesvr"; + ResourceIdentifier sqlServerResourceId = SqlServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); + SqlServerResource sqlServer = client.GetSqlServerResource(sqlServerResourceId); + + // invoke the operation and iterate over the result + await foreach (SqlServerDatabaseReplicationLinkResource item in sqlServer.GetReplicationLinksAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlServerDatabaseReplicationLinkData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ArmSqlModelFactory.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ArmSqlModelFactory.cs index 4d5f5138622c2..0064125ba412f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ArmSqlModelFactory.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ArmSqlModelFactory.cs @@ -3080,50 +3080,6 @@ public static ImportExportExtensionsOperationResult ImportExportExtensionsOperat serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The name of the database the operation is being performed on. - /// The name of operation. - /// The friendly name of operation. - /// The percentage of the operation completed. - /// The name of the server. - /// The operation start time. - /// The operation state. - /// The operation error code. - /// The operation error description. - /// The operation error severity. - /// Whether or not the error is a user error. - /// The estimated completion time of the operation. - /// The operation description. - /// Whether the operation can be cancelled. - /// A new instance for mocking. - public static DatabaseOperationData DatabaseOperationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string databaseName = null, string operation = null, string operationFriendlyName = null, int? percentComplete = null, string serverName = null, DateTimeOffset? startOn = null, ManagementOperationState? state = null, int? errorCode = null, string errorDescription = null, int? errorSeverity = null, bool? isUserError = null, DateTimeOffset? estimatedCompleteOn = null, string description = null, bool? isCancellable = null) - { - return new DatabaseOperationData( - id, - name, - resourceType, - systemData, - databaseName, - operation, - operationFriendlyName, - percentComplete, - serverName, - startOn, - state, - errorCode, - errorDescription, - errorSeverity, - isUserError, - estimatedCompleteOn, - description, - isCancellable, - serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The id. /// The name. @@ -4087,44 +4043,6 @@ public static ManagedInstanceAdvancedThreatProtectionData ManagedInstanceAdvance serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Resource partner server. - /// Resource partner database. - /// Resource partner location. - /// Local replication role. - /// Partner replication role. - /// Replication mode. - /// Time at which the link was created. - /// Seeding completion percentage for the link. - /// Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED). - /// Whether the user is currently allowed to terminate the link. - /// Link type (GEO, NAMED, STANDBY). - /// A new instance for mocking. - public static SqlServerDatabaseReplicationLinkData SqlServerDatabaseReplicationLinkData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string partnerServer = null, string partnerDatabase = null, AzureLocation? partnerLocation = null, SqlServerDatabaseReplicationRole? role = null, SqlServerDatabaseReplicationRole? partnerRole = null, string replicationMode = null, DateTimeOffset? startOn = null, int? percentComplete = null, ReplicationLinkState? replicationState = null, bool? isTerminationAllowed = null, ReplicationLinkType? linkType = null) - { - return new SqlServerDatabaseReplicationLinkData( - id, - name, - resourceType, - systemData, - partnerServer, - partnerDatabase, - partnerLocation, - role, - partnerRole, - replicationMode, - startOn, - percentComplete, - replicationState, - isTerminationAllowed, - linkType, - serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The id. /// The name. @@ -5428,6 +5346,63 @@ public static LogicalDatabaseTransparentDataEncryptionData LogicalDatabaseTransp serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The name of the database the operation is being performed on. + /// The name of operation. + /// The friendly name of operation. + /// The percentage of the operation completed. + /// The name of the server. + /// The operation start time. + /// The operation state. + /// The operation error code. + /// The operation error description. + /// The operation error severity. + /// Whether or not the error is a user error. + /// The estimated completion time of the operation. + /// The operation description. + /// Whether the operation can be cancelled. + /// The operation phase details. + /// A new instance for mocking. + public static DatabaseOperationData DatabaseOperationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string databaseName = null, string operation = null, string operationFriendlyName = null, int? percentComplete = null, string serverName = null, DateTimeOffset? startOn = null, ManagementOperationState? state = null, int? errorCode = null, string errorDescription = null, int? errorSeverity = null, bool? isUserError = null, DateTimeOffset? estimatedCompleteOn = null, string description = null, bool? isCancellable = null, DatabaseOperationPhaseDetails operationPhaseDetails = null) + { + return new DatabaseOperationData( + id, + name, + resourceType, + systemData, + databaseName, + operation, + operationFriendlyName, + percentComplete, + serverName, + startOn, + state, + errorCode, + errorDescription, + errorSeverity, + isUserError, + estimatedCompleteOn, + description, + isCancellable, + operationPhaseDetails, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The operation phase. + /// The operation phase information. + /// A new instance for mocking. + public static DatabaseOperationPhaseDetails DatabaseOperationPhaseDetails(DatabaseOperationPhase? phase = null, IReadOnlyDictionary phaseInformation = null) + { + phaseInformation ??= new Dictionary(); + + return new DatabaseOperationPhaseDetails(phase, phaseInformation, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// Resource ID. /// Resource name. @@ -5744,8 +5719,9 @@ public static SqlVulnerabilityAssessmentData SqlVulnerabilityAssessmentData(Reso /// Replication state of the failover group instance. /// List of partner server information for the failover group. /// List of databases in the failover group. + /// Databases secondary type on partner server. /// A new instance for mocking. - public static FailoverGroupData FailoverGroupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AzureLocation? location = null, IDictionary tags = null, FailoverGroupReadWriteEndpoint readWriteEndpoint = null, FailoverGroupReadOnlyEndpoint readOnlyEndpoint = null, FailoverGroupReplicationRole? replicationRole = null, string replicationState = null, IEnumerable partnerServers = null, IEnumerable failoverDatabases = null) + public static FailoverGroupData FailoverGroupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AzureLocation? location = null, IDictionary tags = null, FailoverGroupReadWriteEndpoint readWriteEndpoint = null, FailoverGroupReadOnlyEndpoint readOnlyEndpoint = null, FailoverGroupReplicationRole? replicationRole = null, string replicationState = null, IEnumerable partnerServers = null, IEnumerable failoverDatabases = null, FailoverGroupDatabasesSecondaryType? secondaryType = null) { tags ??= new Dictionary(); partnerServers ??= new List(); @@ -5764,6 +5740,7 @@ public static FailoverGroupData FailoverGroupData(ResourceIdentifier id = null, replicationState, partnerServers?.ToList(), failoverDatabases?.ToList(), + secondaryType, serializedAdditionalRawData: null); } @@ -6121,5 +6098,63 @@ public static RefreshExternalGovernanceStatusOperationResult RefreshExternalGove errorMessage, serializedAdditionalRawData: null); } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Resource partner server. + /// Resource partner database. + /// Resource partner database Id. + /// Resource partner location. + /// Local replication role. + /// Partner replication role. + /// Replication mode. + /// Time at which the link was created. + /// Seeding completion percentage for the link. + /// Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED). + /// Whether the user is currently allowed to terminate the link. + /// Link type (GEO, NAMED, STANDBY). Update operation does not support NAMED. + /// A new instance for mocking. + public static SqlServerDatabaseReplicationLinkData SqlServerDatabaseReplicationLinkData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string partnerServer = null, string partnerDatabase = null, string partnerDatabaseId = null, AzureLocation? partnerLocation = null, SqlServerDatabaseReplicationRole? role = null, SqlServerDatabaseReplicationRole? partnerRole = null, string replicationMode = null, DateTimeOffset? startOn = null, int? percentComplete = null, ReplicationLinkState? replicationState = null, bool? isTerminationAllowed = null, ReplicationLinkType? linkType = null) + { + return new SqlServerDatabaseReplicationLinkData( + id, + name, + resourceType, + systemData, + partnerServer, + partnerDatabase, + partnerDatabaseId, + partnerLocation, + role, + partnerRole, + replicationMode, + startOn, + percentComplete, + replicationState, + isTerminationAllowed, + linkType, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Link type (GEO, NAMED, STANDBY). Update operation does not support NAMED. + /// A new instance for mocking. + public static SqlServerDatabaseReplicationLinkPatch SqlServerDatabaseReplicationLinkPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ReplicationLinkType? linkType = null) + { + return new SqlServerDatabaseReplicationLinkPatch( + id, + name, + resourceType, + systemData, + linkType, + serializedAdditionalRawData: null); + } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlArmClient.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlArmClient.cs index 1931c1de94434..217cbffe79ea2 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlArmClient.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlArmClient.cs @@ -1162,18 +1162,6 @@ public virtual ManagedInstanceAdvancedThreatProtectionResource GetManagedInstanc return new ManagedInstanceAdvancedThreatProtectionResource(Client, id); } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual SqlServerDatabaseReplicationLinkResource GetSqlServerDatabaseReplicationLinkResource(ResourceIdentifier id) - { - SqlServerDatabaseReplicationLinkResource.ValidateResourceId(id); - return new SqlServerDatabaseReplicationLinkResource(Client, id); - } - /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -1545,5 +1533,17 @@ public virtual SqlServerResource GetSqlServerResource(ResourceIdentifier id) SqlServerResource.ValidateResourceId(id); return new SqlServerResource(Client, id); } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual SqlServerDatabaseReplicationLinkResource GetSqlServerDatabaseReplicationLinkResource(ResourceIdentifier id) + { + SqlServerDatabaseReplicationLinkResource.ValidateResourceId(id); + return new SqlServerDatabaseReplicationLinkResource(Client, id); + } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SqlExtensions.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SqlExtensions.cs index 78750ca35df76..84185a040f19a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SqlExtensions.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SqlExtensions.cs @@ -1820,25 +1820,6 @@ public static ManagedInstanceAdvancedThreatProtectionResource GetManagedInstance return GetMockableSqlArmClient(client).GetManagedInstanceAdvancedThreatProtectionResource(id); } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static SqlServerDatabaseReplicationLinkResource GetSqlServerDatabaseReplicationLinkResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableSqlArmClient(client).GetSqlServerDatabaseReplicationLinkResource(id); - } - /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -2428,6 +2409,25 @@ public static SqlServerResource GetSqlServerResource(this ArmClient client, Reso return GetMockableSqlArmClient(client).GetSqlServerResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static SqlServerDatabaseReplicationLinkResource GetSqlServerDatabaseReplicationLinkResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableSqlArmClient(client).GetSqlServerDatabaseReplicationLinkResource(id); + } + /// /// Gets a collection of SqlServerTrustGroupResources in the ResourceGroupResource. /// diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupCollection.cs index 9d9b92ad49a7d..6d4a92a89be86 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2023-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2023-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string failo /// /// /// Default Api Version - /// 2023-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string failoverGroupName, Can /// /// /// Default Api Version - /// 2023-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToke /// /// /// Default Api Version - /// 2023-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancella /// /// /// Default Api Version - /// 2023-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string failoverGroupName, /// /// /// Default Api Version - /// 2023-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string failoverGroupName, CancellationToken /// /// /// Default Api Version - /// 2023-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2023-02-01-preview + /// 2023-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupData.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupData.Serialization.cs index 55a036a527fd4..6c7556ba05c84 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupData.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupData.Serialization.cs @@ -113,6 +113,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite } writer.WriteEndArray(); } + if (Optional.IsDefined(SecondaryType)) + { + writer.WritePropertyName("secondaryType"u8); + writer.WriteStringValue(SecondaryType.Value.ToString()); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -164,6 +169,7 @@ internal static FailoverGroupData DeserializeFailoverGroupData(JsonElement eleme string replicationState = default; IList partnerServers = default; IList databases = default; + FailoverGroupDatabasesSecondaryType? secondaryType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -291,6 +297,15 @@ internal static FailoverGroupData DeserializeFailoverGroupData(JsonElement eleme databases = array; continue; } + if (property0.NameEquals("secondaryType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + secondaryType = new FailoverGroupDatabasesSecondaryType(property0.Value.GetString()); + continue; + } } continue; } @@ -313,6 +328,7 @@ internal static FailoverGroupData DeserializeFailoverGroupData(JsonElement eleme replicationState, partnerServers ?? new ChangeTrackingList(), databases ?? new ChangeTrackingList(), + secondaryType, serializedAdditionalRawData); } @@ -553,6 +569,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SecondaryType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" secondaryType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SecondaryType)) + { + builder.Append(" secondaryType: "); + builder.AppendLine($"'{SecondaryType.Value.ToString()}'"); + } + } + builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupData.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupData.cs index 1320e51e0261a..9b79b94791ff0 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupData.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupData.cs @@ -72,8 +72,9 @@ public FailoverGroupData() /// Replication state of the failover group instance. /// List of partner server information for the failover group. /// List of databases in the failover group. + /// Databases secondary type on partner server. /// Keeps track of any properties unknown to the library. - internal FailoverGroupData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AzureLocation? location, IDictionary tags, FailoverGroupReadWriteEndpoint readWriteEndpoint, FailoverGroupReadOnlyEndpoint readOnlyEndpoint, FailoverGroupReplicationRole? replicationRole, string replicationState, IList partnerServers, IList failoverDatabases, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal FailoverGroupData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AzureLocation? location, IDictionary tags, FailoverGroupReadWriteEndpoint readWriteEndpoint, FailoverGroupReadOnlyEndpoint readOnlyEndpoint, FailoverGroupReplicationRole? replicationRole, string replicationState, IList partnerServers, IList failoverDatabases, FailoverGroupDatabasesSecondaryType? secondaryType, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { Location = location; Tags = tags; @@ -83,6 +84,7 @@ internal FailoverGroupData(ResourceIdentifier id, string name, ResourceType reso ReplicationState = replicationState; PartnerServers = partnerServers; FailoverDatabases = failoverDatabases; + SecondaryType = secondaryType; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -110,5 +112,8 @@ internal FailoverGroupData(ResourceIdentifier id, string name, ResourceType reso /// List of databases in the failover group. [WirePath("properties.databases")] public IList FailoverDatabases { get; } + /// Databases secondary type on partner server. + [WirePath("properties.secondaryType")] + public FailoverGroupDatabasesSecondaryType? SecondaryType { get; set; } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupResource.cs index 17af2d21e8f69..8e7ef1f9ba182 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2023-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2023-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsync(WaitU /// /// /// Default Api Version - /// 2023-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, F /// /// /// Default Api Version - /// 2023-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -401,7 +401,7 @@ public virtual async Task> FailoverAsync(Wai /// /// /// Default Api Version - /// 2023-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual ArmOperation Failover(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2023-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -485,7 +485,7 @@ public virtual async Task> ForceFailoverAllo /// /// /// Default Api Version - /// 2023-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -527,7 +527,7 @@ public virtual ArmOperation ForceFailoverAllowDataLoss(Wa /// /// /// Default Api Version - /// 2023-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -569,7 +569,7 @@ public virtual async Task> TryPlannedBeforeF /// /// /// Default Api Version - /// 2023-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -611,7 +611,7 @@ public virtual ArmOperation TryPlannedBeforeForcedFailove /// /// /// Default Api Version - /// 2023-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -673,7 +673,7 @@ public virtual async Task> AddTagAsync(string ke /// /// /// Default Api Version - /// 2023-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -735,7 +735,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2023-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -792,7 +792,7 @@ public virtual async Task> SetTagsAsync(IDiction /// /// /// Default Api Version - /// 2023-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -849,7 +849,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -909,7 +909,7 @@ public virtual async Task> RemoveTagAsync(string /// /// /// Default Api Version - /// 2023-02-01-preview + /// 2023-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseOperationData.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseOperationData.Serialization.cs index 78a9d14fca4fd..c37dc99136ad2 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseOperationData.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseOperationData.Serialization.cs @@ -120,6 +120,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WritePropertyName("isCancellable"u8); writer.WriteBooleanValue(IsCancellable.Value); } + if (options.Format != "W" && Optional.IsDefined(OperationPhaseDetails)) + { + writer.WritePropertyName("operationPhaseDetails"u8); + writer.WriteObjectValue(OperationPhaseDetails, options); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -177,6 +182,7 @@ internal static DatabaseOperationData DeserializeDatabaseOperationData(JsonEleme DateTimeOffset? estimatedCompletionTime = default; string description = default; bool? isCancellable = default; + DatabaseOperationPhaseDetails operationPhaseDetails = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -316,6 +322,15 @@ internal static DatabaseOperationData DeserializeDatabaseOperationData(JsonEleme isCancellable = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("operationPhaseDetails"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + operationPhaseDetails = DatabaseOperationPhaseDetails.DeserializeDatabaseOperationPhaseDetails(property0.Value, options); + continue; + } } continue; } @@ -344,6 +359,7 @@ internal static DatabaseOperationData DeserializeDatabaseOperationData(JsonEleme estimatedCompletionTime, description, isCancellable, + operationPhaseDetails, serializedAdditionalRawData); } @@ -675,6 +691,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OperationPhaseDetails), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" operationPhaseDetails: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OperationPhaseDetails)) + { + builder.Append(" operationPhaseDetails: "); + BicepSerializationHelpers.AppendChildObject(builder, OperationPhaseDetails, options, 4, false, " operationPhaseDetails: "); + } + } + builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseOperationData.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseOperationData.cs index 5544118ed23a9..875f893401b6c 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseOperationData.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseOperationData.cs @@ -71,8 +71,9 @@ public DatabaseOperationData() /// The estimated completion time of the operation. /// The operation description. /// Whether the operation can be cancelled. + /// The operation phase details. /// Keeps track of any properties unknown to the library. - internal DatabaseOperationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string databaseName, string operation, string operationFriendlyName, int? percentComplete, string serverName, DateTimeOffset? startOn, ManagementOperationState? state, int? errorCode, string errorDescription, int? errorSeverity, bool? isUserError, DateTimeOffset? estimatedCompleteOn, string description, bool? isCancellable, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal DatabaseOperationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string databaseName, string operation, string operationFriendlyName, int? percentComplete, string serverName, DateTimeOffset? startOn, ManagementOperationState? state, int? errorCode, string errorDescription, int? errorSeverity, bool? isUserError, DateTimeOffset? estimatedCompleteOn, string description, bool? isCancellable, DatabaseOperationPhaseDetails operationPhaseDetails, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { DatabaseName = databaseName; Operation = operation; @@ -88,6 +89,7 @@ internal DatabaseOperationData(ResourceIdentifier id, string name, ResourceType EstimatedCompleteOn = estimatedCompleteOn; Description = description; IsCancellable = isCancellable; + OperationPhaseDetails = operationPhaseDetails; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -133,5 +135,8 @@ internal DatabaseOperationData(ResourceIdentifier id, string name, ResourceType /// Whether the operation can be cancelled. [WirePath("properties.isCancellable")] public bool? IsCancellable { get; } + /// The operation phase details. + [WirePath("properties.operationPhaseDetails")] + public DatabaseOperationPhaseDetails OperationPhaseDetails { get; } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseOperationPhase.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseOperationPhase.cs new file mode 100644 index 0000000000000..c2365bf17e061 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseOperationPhase.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Sql.Models +{ + /// The operation phase. + public readonly partial struct DatabaseOperationPhase : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DatabaseOperationPhase(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CopyingValue = "Copying"; + private const string CatchupValue = "Catchup"; + private const string WaitingForCutoverValue = "WaitingForCutover"; + private const string CutoverInProgressValue = "CutoverInProgress"; + + /// Copying. + public static DatabaseOperationPhase Copying { get; } = new DatabaseOperationPhase(CopyingValue); + /// Catchup. + public static DatabaseOperationPhase Catchup { get; } = new DatabaseOperationPhase(CatchupValue); + /// WaitingForCutover. + public static DatabaseOperationPhase WaitingForCutover { get; } = new DatabaseOperationPhase(WaitingForCutoverValue); + /// CutoverInProgress. + public static DatabaseOperationPhase CutoverInProgress { get; } = new DatabaseOperationPhase(CutoverInProgressValue); + /// Determines if two values are the same. + public static bool operator ==(DatabaseOperationPhase left, DatabaseOperationPhase right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DatabaseOperationPhase left, DatabaseOperationPhase right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DatabaseOperationPhase(string value) => new DatabaseOperationPhase(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DatabaseOperationPhase other && Equals(other); + /// + public bool Equals(DatabaseOperationPhase other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseOperationPhaseDetails.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseOperationPhaseDetails.Serialization.cs new file mode 100644 index 0000000000000..974ce7dbf87b9 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseOperationPhaseDetails.Serialization.cs @@ -0,0 +1,223 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Sql.Models +{ + public partial class DatabaseOperationPhaseDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatabaseOperationPhaseDetails)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(Phase)) + { + writer.WritePropertyName("phase"u8); + writer.WriteStringValue(Phase.Value.ToString()); + } + if (options.Format != "W" && Optional.IsCollectionDefined(PhaseInformation)) + { + writer.WritePropertyName("phaseInformation"u8); + writer.WriteStartObject(); + foreach (var item in PhaseInformation) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + DatabaseOperationPhaseDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatabaseOperationPhaseDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDatabaseOperationPhaseDetails(document.RootElement, options); + } + + internal static DatabaseOperationPhaseDetails DeserializeDatabaseOperationPhaseDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DatabaseOperationPhase? phase = default; + IReadOnlyDictionary phaseInformation = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("phase"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + phase = new DatabaseOperationPhase(property.Value.GetString()); + continue; + } + if (property.NameEquals("phaseInformation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + phaseInformation = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DatabaseOperationPhaseDetails(phase, phaseInformation ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Phase), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" phase: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Phase)) + { + builder.Append(" phase: "); + builder.AppendLine($"'{Phase.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PhaseInformation), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" phaseInformation: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(PhaseInformation)) + { + if (PhaseInformation.Any()) + { + builder.Append(" phaseInformation: "); + builder.AppendLine("{"); + foreach (var item in PhaseInformation) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + if (item.Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{item.Value}'''"); + } + else + { + builder.AppendLine($"'{item.Value}'"); + } + } + builder.AppendLine(" }"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DatabaseOperationPhaseDetails)} does not support writing '{options.Format}' format."); + } + } + + DatabaseOperationPhaseDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDatabaseOperationPhaseDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DatabaseOperationPhaseDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseOperationPhaseDetails.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseOperationPhaseDetails.cs new file mode 100644 index 0000000000000..80cd287cb20f3 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseOperationPhaseDetails.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Sql.Models +{ + /// The phase details properties of a database operation. + public partial class DatabaseOperationPhaseDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DatabaseOperationPhaseDetails() + { + PhaseInformation = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The operation phase. + /// The operation phase information. + /// Keeps track of any properties unknown to the library. + internal DatabaseOperationPhaseDetails(DatabaseOperationPhase? phase, IReadOnlyDictionary phaseInformation, IDictionary serializedAdditionalRawData) + { + Phase = phase; + PhaseInformation = phaseInformation; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The operation phase. + [WirePath("phase")] + public DatabaseOperationPhase? Phase { get; } + /// The operation phase information. + [WirePath("phaseInformation")] + public IReadOnlyDictionary PhaseInformation { get; } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupDatabasesSecondaryType.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupDatabasesSecondaryType.cs new file mode 100644 index 0000000000000..62bc234fe814d --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupDatabasesSecondaryType.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.Sql.Models +{ + /// Databases secondary type on partner server. + public readonly partial struct FailoverGroupDatabasesSecondaryType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FailoverGroupDatabasesSecondaryType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string GeoValue = "Geo"; + private const string StandbyValue = "Standby"; + + /// Geo. + public static FailoverGroupDatabasesSecondaryType Geo { get; } = new FailoverGroupDatabasesSecondaryType(GeoValue); + /// Standby. + public static FailoverGroupDatabasesSecondaryType Standby { get; } = new FailoverGroupDatabasesSecondaryType(StandbyValue); + /// Determines if two values are the same. + public static bool operator ==(FailoverGroupDatabasesSecondaryType left, FailoverGroupDatabasesSecondaryType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FailoverGroupDatabasesSecondaryType left, FailoverGroupDatabasesSecondaryType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator FailoverGroupDatabasesSecondaryType(string value) => new FailoverGroupDatabasesSecondaryType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FailoverGroupDatabasesSecondaryType other && Equals(other); + /// + public bool Equals(FailoverGroupDatabasesSecondaryType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupPatch.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupPatch.Serialization.cs index bac308bb6bd21..ad192432a8db6 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupPatch.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupPatch.Serialization.cs @@ -74,6 +74,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } + if (Optional.IsDefined(SecondaryType)) + { + writer.WritePropertyName("secondaryType"u8); + writer.WriteStringValue(SecondaryType.Value.ToString()); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -118,6 +123,7 @@ internal static FailoverGroupPatch DeserializeFailoverGroupPatch(JsonElement ele FailoverGroupReadOnlyEndpoint readOnlyEndpoint = default; IList databases = default; IList partnerServers = default; + FailoverGroupDatabasesSecondaryType? secondaryType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -198,6 +204,15 @@ internal static FailoverGroupPatch DeserializeFailoverGroupPatch(JsonElement ele partnerServers = array; continue; } + if (property0.NameEquals("secondaryType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + secondaryType = new FailoverGroupDatabasesSecondaryType(property0.Value.GetString()); + continue; + } } continue; } @@ -213,6 +228,7 @@ internal static FailoverGroupPatch DeserializeFailoverGroupPatch(JsonElement ele readOnlyEndpoint, databases ?? new ChangeTrackingList(), partnerServers ?? new ChangeTrackingList(), + secondaryType, serializedAdditionalRawData); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupPatch.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupPatch.cs index fda14caa01aea..fdb0d21b3ae60 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupPatch.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/FailoverGroupPatch.cs @@ -60,14 +60,16 @@ public FailoverGroupPatch() /// Read-only endpoint of the failover group instance. /// List of databases in the failover group. /// List of partner server information for the failover group. + /// Databases secondary type on partner server. /// Keeps track of any properties unknown to the library. - internal FailoverGroupPatch(IDictionary tags, FailoverGroupReadWriteEndpoint readWriteEndpoint, FailoverGroupReadOnlyEndpoint readOnlyEndpoint, IList failoverDatabases, IList partnerServers, IDictionary serializedAdditionalRawData) + internal FailoverGroupPatch(IDictionary tags, FailoverGroupReadWriteEndpoint readWriteEndpoint, FailoverGroupReadOnlyEndpoint readOnlyEndpoint, IList failoverDatabases, IList partnerServers, FailoverGroupDatabasesSecondaryType? secondaryType, IDictionary serializedAdditionalRawData) { Tags = tags; ReadWriteEndpoint = readWriteEndpoint; ReadOnlyEndpoint = readOnlyEndpoint; FailoverDatabases = failoverDatabases; PartnerServers = partnerServers; + SecondaryType = secondaryType; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -86,5 +88,8 @@ internal FailoverGroupPatch(IDictionary tags, FailoverGroupReadW /// List of partner server information for the failover group. [WirePath("properties.partnerServers")] public IList PartnerServers { get; } + /// Databases secondary type on partner server. + [WirePath("properties.secondaryType")] + public FailoverGroupDatabasesSecondaryType? SecondaryType { get; set; } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ReplicationLinkType.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ReplicationLinkType.cs index afbcec0b54bff..fed6f504fcadf 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ReplicationLinkType.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ReplicationLinkType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Sql.Models { - /// Link type (GEO, NAMED, STANDBY). + /// Link type (GEO, NAMED, STANDBY). Update operation does not support NAMED. public readonly partial struct ReplicationLinkType : IEquatable { private readonly string _value; diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerDatabaseReplicationLinkPatch.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerDatabaseReplicationLinkPatch.Serialization.cs new file mode 100644 index 0000000000000..1717ae1153d5f --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerDatabaseReplicationLinkPatch.Serialization.cs @@ -0,0 +1,285 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Sql.Models +{ + public partial class SqlServerDatabaseReplicationLinkPatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SqlServerDatabaseReplicationLinkPatch)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(LinkType)) + { + writer.WritePropertyName("linkType"u8); + writer.WriteStringValue(LinkType.Value.ToString()); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + SqlServerDatabaseReplicationLinkPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SqlServerDatabaseReplicationLinkPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSqlServerDatabaseReplicationLinkPatch(document.RootElement, options); + } + + internal static SqlServerDatabaseReplicationLinkPatch DeserializeSqlServerDatabaseReplicationLinkPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + ReplicationLinkType? linkType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("linkType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + linkType = new ReplicationLinkType(property0.Value.GetString()); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SqlServerDatabaseReplicationLinkPatch( + id, + name, + type, + systemData, + linkType, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LinkType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" linkType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LinkType)) + { + builder.Append(" linkType: "); + builder.AppendLine($"'{LinkType.Value.ToString()}'"); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(SqlServerDatabaseReplicationLinkPatch)} does not support writing '{options.Format}' format."); + } + } + + SqlServerDatabaseReplicationLinkPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSqlServerDatabaseReplicationLinkPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SqlServerDatabaseReplicationLinkPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerDatabaseReplicationLinkPatch.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerDatabaseReplicationLinkPatch.cs new file mode 100644 index 0000000000000..120d6f0bb14ad --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlServerDatabaseReplicationLinkPatch.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Sql.Models +{ + /// A replication link update request. + public partial class SqlServerDatabaseReplicationLinkPatch : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SqlServerDatabaseReplicationLinkPatch() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Link type (GEO, NAMED, STANDBY). Update operation does not support NAMED. + /// Keeps track of any properties unknown to the library. + internal SqlServerDatabaseReplicationLinkPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ReplicationLinkType? linkType, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + LinkType = linkType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Link type (GEO, NAMED, STANDBY). Update operation does not support NAMED. + [WirePath("properties.linkType")] + public ReplicationLinkType? LinkType { get; set; } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseRestOperations.cs index 8f8fe82dbe450..eaa109200931c 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseRestOperations.cs @@ -32,11 +32,11 @@ public DatabaseRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01-preview"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateCancelRequestUri(string subscriptionId, string resourceGroupName, string serverName, string databaseName, Guid operationId) + internal RequestUriBuilder CreateListByDatabaseRequestUri(string subscriptionId, string resourceGroupName, string serverName, string databaseName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -48,18 +48,16 @@ internal RequestUriBuilder CreateCancelRequestUri(string subscriptionId, string uri.AppendPath(serverName, true); uri.AppendPath("/databases/", false); uri.AppendPath(databaseName, true); - uri.AppendPath("/operations/", false); - uri.AppendPath(operationId, true); - uri.AppendPath("/cancel", false); + uri.AppendPath("/operations", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCancelRequest(string subscriptionId, string resourceGroupName, string serverName, string databaseName, Guid operationId) + internal HttpMessage CreateListByDatabaseRequest(string subscriptionId, string resourceGroupName, string serverName, string databaseName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -70,70 +68,77 @@ internal HttpMessage CreateCancelRequest(string subscriptionId, string resourceG uri.AppendPath(serverName, true); uri.AppendPath("/databases/", false); uri.AppendPath(databaseName, true); - uri.AppendPath("/operations/", false); - uri.AppendPath(operationId, true); - uri.AppendPath("/cancel", false); + uri.AppendPath("/operations", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; + request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; } - /// Cancels the asynchronous operation on the database. + /// Gets a list of operations performed on the database. /// The subscription ID that identifies an Azure subscription. /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. /// The name of the server. /// The name of the database. - /// The operation identifier. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task CancelAsync(string subscriptionId, string resourceGroupName, string serverName, string databaseName, Guid operationId, CancellationToken cancellationToken = default) + public async Task> ListByDatabaseAsync(string subscriptionId, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - using var message = CreateCancelRequest(subscriptionId, resourceGroupName, serverName, databaseName, operationId); + using var message = CreateListByDatabaseRequest(subscriptionId, resourceGroupName, serverName, databaseName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - return message.Response; + { + DatabaseOperationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DatabaseOperationListResult.DeserializeDatabaseOperationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Cancels the asynchronous operation on the database. + /// Gets a list of operations performed on the database. /// The subscription ID that identifies an Azure subscription. /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. /// The name of the server. /// The name of the database. - /// The operation identifier. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Cancel(string subscriptionId, string resourceGroupName, string serverName, string databaseName, Guid operationId, CancellationToken cancellationToken = default) + public Response ListByDatabase(string subscriptionId, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - using var message = CreateCancelRequest(subscriptionId, resourceGroupName, serverName, databaseName, operationId); + using var message = CreateListByDatabaseRequest(subscriptionId, resourceGroupName, serverName, databaseName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - return message.Response; + { + DatabaseOperationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DatabaseOperationListResult.DeserializeDatabaseOperationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListByDatabaseRequestUri(string subscriptionId, string resourceGroupName, string serverName, string databaseName) + internal RequestUriBuilder CreateCancelRequestUri(string subscriptionId, string resourceGroupName, string serverName, string databaseName, Guid operationId) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -145,16 +150,18 @@ internal RequestUriBuilder CreateListByDatabaseRequestUri(string subscriptionId, uri.AppendPath(serverName, true); uri.AppendPath("/databases/", false); uri.AppendPath(databaseName, true); - uri.AppendPath("/operations", false); + uri.AppendPath("/operations/", false); + uri.AppendPath(operationId, true); + uri.AppendPath("/cancel", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListByDatabaseRequest(string subscriptionId, string resourceGroupName, string serverName, string databaseName) + internal HttpMessage CreateCancelRequest(string subscriptionId, string resourceGroupName, string serverName, string databaseName, Guid operationId) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -165,71 +172,64 @@ internal HttpMessage CreateListByDatabaseRequest(string subscriptionId, string r uri.AppendPath(serverName, true); uri.AppendPath("/databases/", false); uri.AppendPath(databaseName, true); - uri.AppendPath("/operations", false); + uri.AppendPath("/operations/", false); + uri.AppendPath(operationId, true); + uri.AppendPath("/cancel", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; } - /// Gets a list of operations performed on the database. + /// Cancels the asynchronous operation on the database. /// The subscription ID that identifies an Azure subscription. /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. /// The name of the server. /// The name of the database. + /// The operation identifier. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListByDatabaseAsync(string subscriptionId, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default) + public async Task CancelAsync(string subscriptionId, string resourceGroupName, string serverName, string databaseName, Guid operationId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - using var message = CreateListByDatabaseRequest(subscriptionId, resourceGroupName, serverName, databaseName); + using var message = CreateCancelRequest(subscriptionId, resourceGroupName, serverName, databaseName, operationId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - DatabaseOperationListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DatabaseOperationListResult.DeserializeDatabaseOperationListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Gets a list of operations performed on the database. + /// Cancels the asynchronous operation on the database. /// The subscription ID that identifies an Azure subscription. /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. /// The name of the server. /// The name of the database. + /// The operation identifier. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response ListByDatabase(string subscriptionId, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default) + public Response Cancel(string subscriptionId, string resourceGroupName, string serverName, string databaseName, Guid operationId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); - using var message = CreateListByDatabaseRequest(subscriptionId, resourceGroupName, serverName, databaseName); + using var message = CreateCancelRequest(subscriptionId, resourceGroupName, serverName, databaseName, operationId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - DatabaseOperationListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DatabaseOperationListResult.DeserializeDatabaseOperationListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + return message.Response; default: throw new RequestFailedException(message.Response); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/FailoverGroupsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/FailoverGroupsRestOperations.cs index 059590482ef92..c684bd9f598f0 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/FailoverGroupsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/FailoverGroupsRestOperations.cs @@ -32,7 +32,7 @@ public FailoverGroupsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-02-01-preview"; + _apiVersion = apiVersion ?? "2023-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ReplicationLinksRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ReplicationLinksRestOperations.cs index 19980bb125886..3437081fe907d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ReplicationLinksRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ReplicationLinksRestOperations.cs @@ -32,7 +32,7 @@ public ReplicationLinksRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-02-01-preview"; + _apiVersion = apiVersion ?? "2023-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -250,6 +250,114 @@ public Response Get(string subscriptionId, } } + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, string databaseName, string linkId, SqlServerDatabaseReplicationLinkData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Sql/servers/", false); + uri.AppendPath(serverName, true); + uri.AppendPath("/databases/", false); + uri.AppendPath(databaseName, true); + uri.AppendPath("/replicationLinks/", false); + uri.AppendPath(linkId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, string databaseName, string linkId, SqlServerDatabaseReplicationLinkData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Sql/servers/", false); + uri.AppendPath(serverName, true); + uri.AppendPath("/databases/", false); + uri.AppendPath(databaseName, true); + uri.AppendPath("/replicationLinks/", false); + uri.AppendPath(linkId, true); + 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(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates the replication link type. + /// The subscription ID that identifies an Azure subscription. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the server. + /// The name of the database. + /// The to use. + /// The to use. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serverName, string databaseName, string linkId, SqlServerDatabaseReplicationLinkData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); + Argument.AssertNotNullOrEmpty(linkId, nameof(linkId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, databaseName, linkId, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates the replication link type. + /// The subscription ID that identifies an Azure subscription. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the server. + /// The name of the database. + /// The to use. + /// The to use. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serverName, string databaseName, string linkId, SqlServerDatabaseReplicationLinkData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); + Argument.AssertNotNullOrEmpty(linkId, nameof(linkId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serverName, databaseName, linkId, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serverName, string databaseName, string linkId) { var uri = new RawRequestUriBuilder(); @@ -349,6 +457,114 @@ public Response Delete(string subscriptionId, string resourceGroupName, string s } } + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string serverName, string databaseName, string linkId, SqlServerDatabaseReplicationLinkPatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Sql/servers/", false); + uri.AppendPath(serverName, true); + uri.AppendPath("/databases/", false); + uri.AppendPath(databaseName, true); + uri.AppendPath("/replicationLinks/", false); + uri.AppendPath(linkId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serverName, string databaseName, string linkId, SqlServerDatabaseReplicationLinkPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Sql/servers/", false); + uri.AppendPath(serverName, true); + uri.AppendPath("/databases/", false); + uri.AppendPath(databaseName, true); + uri.AppendPath("/replicationLinks/", false); + uri.AppendPath(linkId, true); + 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(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates the replication link type. + /// The subscription ID that identifies an Azure subscription. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the server. + /// The name of the database. + /// The to use. + /// The to use. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string serverName, string databaseName, string linkId, SqlServerDatabaseReplicationLinkPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); + Argument.AssertNotNullOrEmpty(linkId, nameof(linkId)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serverName, databaseName, linkId, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates the replication link type. + /// The subscription ID that identifies an Azure subscription. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the server. + /// The name of the database. + /// The to use. + /// The to use. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string serverName, string databaseName, string linkId, SqlServerDatabaseReplicationLinkPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serverName, nameof(serverName)); + Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); + Argument.AssertNotNullOrEmpty(linkId, nameof(linkId)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serverName, databaseName, linkId, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateFailoverRequestUri(string subscriptionId, string resourceGroupName, string serverName, string databaseName, string linkId) { var uri = new RawRequestUriBuilder(); diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseResource.cs index 0c82451d2890f..62bd9e9c08769 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseResource.cs @@ -48,8 +48,6 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly RestorePointsRestOperations _sqlServerDatabaseRestorePointRestorePointsRestClient; private readonly ClientDiagnostics _databaseExtensionsClientDiagnostics; private readonly DatabaseExtensionsRestOperations _databaseExtensionsRestClient; - private readonly ClientDiagnostics _databaseOperationsClientDiagnostics; - private readonly DatabaseRestOperations _databaseOperationsRestClient; private readonly ClientDiagnostics _databaseUsagesClientDiagnostics; private readonly DatabaseUsagesRestOperations _databaseUsagesRestClient; private readonly ClientDiagnostics _sqlDatabaseSensitivityLabelSensitivityLabelsClientDiagnostics; @@ -58,6 +56,8 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly SynapseLinkWorkspacesRestOperations _synapseLinkWorkspacesRestClient; private readonly ClientDiagnostics _databaseEncryptionProtectorsClientDiagnostics; private readonly DatabaseEncryptionProtectorsRestOperations _databaseEncryptionProtectorsRestClient; + private readonly ClientDiagnostics _databaseOperationsClientDiagnostics; + private readonly DatabaseRestOperations _databaseOperationsRestClient; private readonly SqlDatabaseData _data; /// Gets the resource type for the operations. @@ -97,8 +97,6 @@ internal SqlDatabaseResource(ArmClient client, ResourceIdentifier id) : base(cli _sqlServerDatabaseRestorePointRestorePointsRestClient = new RestorePointsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sqlServerDatabaseRestorePointRestorePointsApiVersion); _databaseExtensionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", ProviderConstants.DefaultProviderNamespace, Diagnostics); _databaseExtensionsRestClient = new DatabaseExtensionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - _databaseOperationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _databaseOperationsRestClient = new DatabaseRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); _databaseUsagesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", ProviderConstants.DefaultProviderNamespace, Diagnostics); _databaseUsagesRestClient = new DatabaseUsagesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); _sqlDatabaseSensitivityLabelSensitivityLabelsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", SqlDatabaseSensitivityLabelResource.ResourceType.Namespace, Diagnostics); @@ -108,6 +106,8 @@ internal SqlDatabaseResource(ArmClient client, ResourceIdentifier id) : base(cli _synapseLinkWorkspacesRestClient = new SynapseLinkWorkspacesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); _databaseEncryptionProtectorsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", ProviderConstants.DefaultProviderNamespace, Diagnostics); _databaseEncryptionProtectorsRestClient = new DatabaseEncryptionProtectorsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + _databaseOperationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _databaseOperationsRestClient = new DatabaseRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); #if DEBUG ValidateResourceId(Id); #endif @@ -1092,75 +1092,6 @@ public virtual Response GetDatabaseAdv return GetDatabaseAdvancedThreatProtections().Get(advancedThreatProtectionName, cancellationToken); } - /// Gets a collection of SqlServerDatabaseReplicationLinkResources in the SqlDatabase. - /// An object representing collection of SqlServerDatabaseReplicationLinkResources and their operations over a SqlServerDatabaseReplicationLinkResource. - public virtual SqlServerDatabaseReplicationLinkCollection GetSqlServerDatabaseReplicationLinks() - { - return GetCachedClient(client => new SqlServerDatabaseReplicationLinkCollection(client, Id)); - } - - /// - /// Gets a replication link. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId} - /// - /// - /// Operation Id - /// ReplicationLinks_Get - /// - /// - /// Default Api Version - /// 2022-02-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the replication link. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetSqlServerDatabaseReplicationLinkAsync(string linkId, CancellationToken cancellationToken = default) - { - return await GetSqlServerDatabaseReplicationLinks().GetAsync(linkId, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a replication link. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId} - /// - /// - /// Operation Id - /// ReplicationLinks_Get - /// - /// - /// Default Api Version - /// 2022-02-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the replication link. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetSqlServerDatabaseReplicationLink(string linkId, CancellationToken cancellationToken = default) - { - return GetSqlServerDatabaseReplicationLinks().Get(linkId, cancellationToken); - } - /// Gets a collection of LogicalDatabaseTransparentDataEncryptionResources in the SqlDatabase. /// An object representing collection of LogicalDatabaseTransparentDataEncryptionResources and their operations over a LogicalDatabaseTransparentDataEncryptionResource. public virtual LogicalDatabaseTransparentDataEncryptionCollection GetLogicalDatabaseTransparentDataEncryptions() @@ -1356,6 +1287,75 @@ public virtual Response GetLongTermRetentionPol return GetLongTermRetentionPolicies().Get(policyName, cancellationToken); } + /// Gets a collection of SqlServerDatabaseReplicationLinkResources in the SqlDatabase. + /// An object representing collection of SqlServerDatabaseReplicationLinkResources and their operations over a SqlServerDatabaseReplicationLinkResource. + public virtual SqlServerDatabaseReplicationLinkCollection GetSqlServerDatabaseReplicationLinks() + { + return GetCachedClient(client => new SqlServerDatabaseReplicationLinkCollection(client, Id)); + } + + /// + /// Gets a replication link. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId} + /// + /// + /// Operation Id + /// ReplicationLinks_Get + /// + /// + /// Default Api Version + /// 2023-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the replication link. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetSqlServerDatabaseReplicationLinkAsync(string linkId, CancellationToken cancellationToken = default) + { + return await GetSqlServerDatabaseReplicationLinks().GetAsync(linkId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a replication link. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId} + /// + /// + /// Operation Id + /// ReplicationLinks_Get + /// + /// + /// Default Api Version + /// 2023-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the replication link. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetSqlServerDatabaseReplicationLink(string linkId, CancellationToken cancellationToken = default) + { + return GetSqlServerDatabaseReplicationLinks().Get(linkId, cancellationToken); + } + /// /// Gets a database. /// @@ -2028,128 +2028,6 @@ public virtual Pageable GetDatabaseExtens return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ImportExportExtensionsOperationResult.DeserializeImportExportExtensionsOperationResult(e), _databaseExtensionsClientDiagnostics, Pipeline, "SqlDatabaseResource.GetDatabaseExtensions", "value", "nextLink", cancellationToken); } - /// - /// Cancels the asynchronous operation on the database. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations/{operationId}/cancel - /// - /// - /// Operation Id - /// DatabaseOperations_Cancel - /// - /// - /// Default Api Version - /// 2021-02-01-preview - /// - /// - /// - /// The operation identifier. - /// The cancellation token to use. - public virtual async Task CancelDatabaseOperationAsync(Guid operationId, CancellationToken cancellationToken = default) - { - using var scope = _databaseOperationsClientDiagnostics.CreateScope("SqlDatabaseResource.CancelDatabaseOperation"); - scope.Start(); - try - { - var response = await _databaseOperationsRestClient.CancelAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, operationId, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Cancels the asynchronous operation on the database. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations/{operationId}/cancel - /// - /// - /// Operation Id - /// DatabaseOperations_Cancel - /// - /// - /// Default Api Version - /// 2021-02-01-preview - /// - /// - /// - /// The operation identifier. - /// The cancellation token to use. - public virtual Response CancelDatabaseOperation(Guid operationId, CancellationToken cancellationToken = default) - { - using var scope = _databaseOperationsClientDiagnostics.CreateScope("SqlDatabaseResource.CancelDatabaseOperation"); - scope.Start(); - try - { - var response = _databaseOperationsRestClient.Cancel(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, operationId, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a list of operations performed on the database. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations - /// - /// - /// Operation Id - /// DatabaseOperations_ListByDatabase - /// - /// - /// Default Api Version - /// 2021-02-01-preview - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetDatabaseOperationsAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _databaseOperationsRestClient.CreateListByDatabaseRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _databaseOperationsRestClient.CreateListByDatabaseNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => DatabaseOperationData.DeserializeDatabaseOperationData(e), _databaseOperationsClientDiagnostics, Pipeline, "SqlDatabaseResource.GetDatabaseOperations", "value", "nextLink", cancellationToken); - } - - /// - /// Gets a list of operations performed on the database. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations - /// - /// - /// Operation Id - /// DatabaseOperations_ListByDatabase - /// - /// - /// Default Api Version - /// 2021-02-01-preview - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetDatabaseOperations(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _databaseOperationsRestClient.CreateListByDatabaseRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _databaseOperationsRestClient.CreateListByDatabaseNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => DatabaseOperationData.DeserializeDatabaseOperationData(e), _databaseOperationsClientDiagnostics, Pipeline, "SqlDatabaseResource.GetDatabaseOperations", "value", "nextLink", cancellationToken); - } - /// /// Gets database usages. /// @@ -3316,6 +3194,128 @@ public virtual ArmOperation UpgradeDataWarehouse(WaitUntil waitUntil, Cancellati } } + /// + /// Gets a list of operations performed on the database. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations + /// + /// + /// Operation Id + /// DatabaseOperations_ListByDatabase + /// + /// + /// Default Api Version + /// 2022-11-01-preview + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDatabaseOperationsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _databaseOperationsRestClient.CreateListByDatabaseRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _databaseOperationsRestClient.CreateListByDatabaseNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => DatabaseOperationData.DeserializeDatabaseOperationData(e), _databaseOperationsClientDiagnostics, Pipeline, "SqlDatabaseResource.GetDatabaseOperations", "value", "nextLink", cancellationToken); + } + + /// + /// Gets a list of operations performed on the database. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations + /// + /// + /// Operation Id + /// DatabaseOperations_ListByDatabase + /// + /// + /// Default Api Version + /// 2022-11-01-preview + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDatabaseOperations(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _databaseOperationsRestClient.CreateListByDatabaseRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _databaseOperationsRestClient.CreateListByDatabaseNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => DatabaseOperationData.DeserializeDatabaseOperationData(e), _databaseOperationsClientDiagnostics, Pipeline, "SqlDatabaseResource.GetDatabaseOperations", "value", "nextLink", cancellationToken); + } + + /// + /// Cancels the asynchronous operation on the database. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations/{operationId}/cancel + /// + /// + /// Operation Id + /// DatabaseOperations_Cancel + /// + /// + /// Default Api Version + /// 2022-11-01-preview + /// + /// + /// + /// The operation identifier. + /// The cancellation token to use. + public virtual async Task CancelDatabaseOperationAsync(Guid operationId, CancellationToken cancellationToken = default) + { + using var scope = _databaseOperationsClientDiagnostics.CreateScope("SqlDatabaseResource.CancelDatabaseOperation"); + scope.Start(); + try + { + var response = await _databaseOperationsRestClient.CancelAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, operationId, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Cancels the asynchronous operation on the database. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations/{operationId}/cancel + /// + /// + /// Operation Id + /// DatabaseOperations_Cancel + /// + /// + /// Default Api Version + /// 2022-11-01-preview + /// + /// + /// + /// The operation identifier. + /// The cancellation token to use. + public virtual Response CancelDatabaseOperation(Guid operationId, CancellationToken cancellationToken = default) + { + using var scope = _databaseOperationsClientDiagnostics.CreateScope("SqlDatabaseResource.CancelDatabaseOperation"); + scope.Start(); + try + { + var response = _databaseOperationsRestClient.Cancel(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, operationId, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Add a tag to the current resource. /// diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseReplicationLinkCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseReplicationLinkCollection.cs index b277742dd6620..129e3b73c0f5f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseReplicationLinkCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseReplicationLinkCollection.cs @@ -51,6 +51,104 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SqlDatabaseResource.ResourceType), nameof(id)); } + /// + /// Updates the replication link type. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId} + /// + /// + /// Operation Id + /// ReplicationLinks_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2023-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The to use. + /// The to use. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string linkId, SqlServerDatabaseReplicationLinkData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(linkId, nameof(linkId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sqlServerDatabaseReplicationLinkReplicationLinksClientDiagnostics.CreateScope("SqlServerDatabaseReplicationLinkCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _sqlServerDatabaseReplicationLinkReplicationLinksRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, linkId, data, cancellationToken).ConfigureAwait(false); + var operation = new SqlArmOperation(new SqlServerDatabaseReplicationLinkOperationSource(Client), _sqlServerDatabaseReplicationLinkReplicationLinksClientDiagnostics, Pipeline, _sqlServerDatabaseReplicationLinkReplicationLinksRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, linkId, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the replication link type. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId} + /// + /// + /// Operation Id + /// ReplicationLinks_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2023-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The to use. + /// The to use. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string linkId, SqlServerDatabaseReplicationLinkData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(linkId, nameof(linkId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sqlServerDatabaseReplicationLinkReplicationLinksClientDiagnostics.CreateScope("SqlServerDatabaseReplicationLinkCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _sqlServerDatabaseReplicationLinkReplicationLinksRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, linkId, data, cancellationToken); + var operation = new SqlArmOperation(new SqlServerDatabaseReplicationLinkOperationSource(Client), _sqlServerDatabaseReplicationLinkReplicationLinksClientDiagnostics, Pipeline, _sqlServerDatabaseReplicationLinkReplicationLinksRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, linkId, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Gets a replication link. /// @@ -64,7 +162,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2022-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -109,7 +207,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2022-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -154,7 +252,7 @@ public virtual Response Get(string lin /// /// /// Default Api Version - /// 2022-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -184,7 +282,7 @@ public virtual AsyncPageable GetAllAsy /// /// /// Default Api Version - /// 2022-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -214,7 +312,7 @@ public virtual Pageable GetAll(Cancell /// /// /// Default Api Version - /// 2022-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -257,7 +355,7 @@ public virtual async Task> ExistsAsync(string linkId, Cancellatio /// /// /// Default Api Version - /// 2022-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -300,7 +398,7 @@ public virtual Response Exists(string linkId, CancellationToken cancellati /// /// /// Default Api Version - /// 2022-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -345,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2022-02-01-preview + /// 2023-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseReplicationLinkData.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseReplicationLinkData.Serialization.cs index 78328b10121be..57908f4df95a1 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseReplicationLinkData.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseReplicationLinkData.Serialization.cs @@ -61,6 +61,11 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WritePropertyName("partnerDatabase"u8); writer.WriteStringValue(PartnerDatabase); } + if (options.Format != "W" && Optional.IsDefined(PartnerDatabaseId)) + { + writer.WritePropertyName("partnerDatabaseId"u8); + writer.WriteStringValue(PartnerDatabaseId); + } if (options.Format != "W" && Optional.IsDefined(PartnerLocation)) { writer.WritePropertyName("partnerLocation"u8); @@ -101,7 +106,7 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WritePropertyName("isTerminationAllowed"u8); writer.WriteBooleanValue(IsTerminationAllowed.Value); } - if (options.Format != "W" && Optional.IsDefined(LinkType)) + if (Optional.IsDefined(LinkType)) { writer.WritePropertyName("linkType"u8); writer.WriteStringValue(LinkType.Value.ToString()); @@ -151,6 +156,7 @@ internal static SqlServerDatabaseReplicationLinkData DeserializeSqlServerDatabas SystemData systemData = default; string partnerServer = default; string partnerDatabase = default; + string partnerDatabaseId = default; AzureLocation? partnerLocation = default; SqlServerDatabaseReplicationRole? role = default; SqlServerDatabaseReplicationRole? partnerRole = default; @@ -207,6 +213,11 @@ internal static SqlServerDatabaseReplicationLinkData DeserializeSqlServerDatabas partnerDatabase = property0.Value.GetString(); continue; } + if (property0.NameEquals("partnerDatabaseId"u8)) + { + partnerDatabaseId = property0.Value.GetString(); + continue; + } if (property0.NameEquals("partnerLocation"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -300,6 +311,7 @@ internal static SqlServerDatabaseReplicationLinkData DeserializeSqlServerDatabas systemData, partnerServer, partnerDatabase, + partnerDatabaseId, partnerLocation, role, partnerRole, @@ -424,6 +436,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PartnerDatabaseId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" partnerDatabaseId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PartnerDatabaseId)) + { + builder.Append(" partnerDatabaseId: "); + if (PartnerDatabaseId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PartnerDatabaseId}'''"); + } + else + { + builder.AppendLine($"'{PartnerDatabaseId}'"); + } + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PartnerLocation), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseReplicationLinkData.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseReplicationLinkData.cs index d0551234ec4d8..6dcc552a57402 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseReplicationLinkData.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseReplicationLinkData.cs @@ -63,6 +63,7 @@ public SqlServerDatabaseReplicationLinkData() /// The systemData. /// Resource partner server. /// Resource partner database. + /// Resource partner database Id. /// Resource partner location. /// Local replication role. /// Partner replication role. @@ -71,12 +72,13 @@ public SqlServerDatabaseReplicationLinkData() /// Seeding completion percentage for the link. /// Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED). /// Whether the user is currently allowed to terminate the link. - /// Link type (GEO, NAMED, STANDBY). + /// Link type (GEO, NAMED, STANDBY). Update operation does not support NAMED. /// Keeps track of any properties unknown to the library. - internal SqlServerDatabaseReplicationLinkData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string partnerServer, string partnerDatabase, AzureLocation? partnerLocation, SqlServerDatabaseReplicationRole? role, SqlServerDatabaseReplicationRole? partnerRole, string replicationMode, DateTimeOffset? startOn, int? percentComplete, ReplicationLinkState? replicationState, bool? isTerminationAllowed, ReplicationLinkType? linkType, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal SqlServerDatabaseReplicationLinkData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string partnerServer, string partnerDatabase, string partnerDatabaseId, AzureLocation? partnerLocation, SqlServerDatabaseReplicationRole? role, SqlServerDatabaseReplicationRole? partnerRole, string replicationMode, DateTimeOffset? startOn, int? percentComplete, ReplicationLinkState? replicationState, bool? isTerminationAllowed, ReplicationLinkType? linkType, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { PartnerServer = partnerServer; PartnerDatabase = partnerDatabase; + PartnerDatabaseId = partnerDatabaseId; PartnerLocation = partnerLocation; Role = role; PartnerRole = partnerRole; @@ -95,6 +97,9 @@ internal SqlServerDatabaseReplicationLinkData(ResourceIdentifier id, string name /// Resource partner database. [WirePath("properties.partnerDatabase")] public string PartnerDatabase { get; } + /// Resource partner database Id. + [WirePath("properties.partnerDatabaseId")] + public string PartnerDatabaseId { get; } /// Resource partner location. [WirePath("properties.partnerLocation")] public AzureLocation? PartnerLocation { get; } @@ -119,8 +124,8 @@ internal SqlServerDatabaseReplicationLinkData(ResourceIdentifier id, string name /// Whether the user is currently allowed to terminate the link. [WirePath("properties.isTerminationAllowed")] public bool? IsTerminationAllowed { get; } - /// Link type (GEO, NAMED, STANDBY). + /// Link type (GEO, NAMED, STANDBY). Update operation does not support NAMED. [WirePath("properties.linkType")] - public ReplicationLinkType? LinkType { get; } + public ReplicationLinkType? LinkType { get; set; } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseReplicationLinkResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseReplicationLinkResource.cs index a51cd286b554e..1dfe2649e97dd 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseReplicationLinkResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseReplicationLinkResource.cs @@ -11,6 +11,7 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Core.Pipeline; +using Azure.ResourceManager.Sql.Models; namespace Azure.ResourceManager.Sql { @@ -102,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2022-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -142,7 +143,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2022-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -182,7 +183,7 @@ public virtual Response Get(Cancellati /// /// /// Default Api Version - /// 2022-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -224,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2022-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -253,6 +254,98 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } } + /// + /// Updates the replication link type. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId} + /// + /// + /// Operation Id + /// ReplicationLinks_Update + /// + /// + /// Default Api Version + /// 2023-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The to use. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, SqlServerDatabaseReplicationLinkPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _sqlServerDatabaseReplicationLinkReplicationLinksClientDiagnostics.CreateScope("SqlServerDatabaseReplicationLinkResource.Update"); + scope.Start(); + try + { + var response = await _sqlServerDatabaseReplicationLinkReplicationLinksRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new SqlArmOperation(new SqlServerDatabaseReplicationLinkOperationSource(Client), _sqlServerDatabaseReplicationLinkReplicationLinksClientDiagnostics, Pipeline, _sqlServerDatabaseReplicationLinkReplicationLinksRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the replication link type. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId} + /// + /// + /// Operation Id + /// ReplicationLinks_Update + /// + /// + /// Default Api Version + /// 2023-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The to use. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, SqlServerDatabaseReplicationLinkPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _sqlServerDatabaseReplicationLinkReplicationLinksClientDiagnostics.CreateScope("SqlServerDatabaseReplicationLinkResource.Update"); + scope.Start(); + try + { + var response = _sqlServerDatabaseReplicationLinkReplicationLinksRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, cancellationToken); + var operation = new SqlArmOperation(new SqlServerDatabaseReplicationLinkOperationSource(Client), _sqlServerDatabaseReplicationLinkReplicationLinksClientDiagnostics, Pipeline, _sqlServerDatabaseReplicationLinkReplicationLinksRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Fails over from the current primary server to this server. /// @@ -266,7 +359,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2022-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -308,7 +401,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2022-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -350,7 +443,7 @@ public virtual ArmOperation Failover(W /// /// /// Default Api Version - /// 2022-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -392,7 +485,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2022-02-01-preview + /// 2023-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerResource.cs index 61ba71d334e42..5ba10f5694846 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerResource.cs @@ -44,10 +44,10 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ServerRestOperations _serverOperationsRestClient; private readonly ClientDiagnostics _tdeCertificatesClientDiagnostics; private readonly TdeCertificatesRestOperations _tdeCertificatesRestClient; - private readonly ClientDiagnostics _sqlServerDatabaseReplicationLinkReplicationLinksClientDiagnostics; - private readonly ReplicationLinksRestOperations _sqlServerDatabaseReplicationLinkReplicationLinksRestClient; private readonly ClientDiagnostics _sqlDatabaseDatabasesClientDiagnostics; private readonly DatabasesRestOperations _sqlDatabaseDatabasesRestClient; + private readonly ClientDiagnostics _sqlServerDatabaseReplicationLinkReplicationLinksClientDiagnostics; + private readonly ReplicationLinksRestOperations _sqlServerDatabaseReplicationLinkReplicationLinksRestClient; private readonly SqlServerData _data; /// Gets the resource type for the operations. @@ -81,12 +81,12 @@ internal SqlServerResource(ArmClient client, ResourceIdentifier id) : base(clien _serverOperationsRestClient = new ServerRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); _tdeCertificatesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", ProviderConstants.DefaultProviderNamespace, Diagnostics); _tdeCertificatesRestClient = new TdeCertificatesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - _sqlServerDatabaseReplicationLinkReplicationLinksClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", SqlServerDatabaseReplicationLinkResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(SqlServerDatabaseReplicationLinkResource.ResourceType, out string sqlServerDatabaseReplicationLinkReplicationLinksApiVersion); - _sqlServerDatabaseReplicationLinkReplicationLinksRestClient = new ReplicationLinksRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sqlServerDatabaseReplicationLinkReplicationLinksApiVersion); _sqlDatabaseDatabasesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", SqlDatabaseResource.ResourceType.Namespace, Diagnostics); TryGetApiVersion(SqlDatabaseResource.ResourceType, out string sqlDatabaseDatabasesApiVersion); _sqlDatabaseDatabasesRestClient = new DatabasesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sqlDatabaseDatabasesApiVersion); + _sqlServerDatabaseReplicationLinkReplicationLinksClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", SqlServerDatabaseReplicationLinkResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SqlServerDatabaseReplicationLinkResource.ResourceType, out string sqlServerDatabaseReplicationLinkReplicationLinksApiVersion); + _sqlServerDatabaseReplicationLinkReplicationLinksRestClient = new ReplicationLinksRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sqlServerDatabaseReplicationLinkReplicationLinksApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -2044,7 +2044,7 @@ public virtual FailoverGroupCollection GetFailoverGroups() /// /// /// Default Api Version - /// 2023-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -2075,7 +2075,7 @@ public virtual async Task> GetFailoverGroupAsync /// /// /// Default Api Version - /// 2023-02-01-preview + /// 2023-05-01-preview /// /// /// Resource @@ -2537,66 +2537,6 @@ public virtual ArmOperation CreateTdeCertificate(WaitUntil waitUntil, TdeCertifi } } - /// - /// Gets a list of replication links. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/replicationLinks - /// - /// - /// Operation Id - /// ReplicationLinks_ListByServer - /// - /// - /// Default Api Version - /// 2022-02-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetReplicationLinksAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _sqlServerDatabaseReplicationLinkReplicationLinksRestClient.CreateListByServerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sqlServerDatabaseReplicationLinkReplicationLinksRestClient.CreateListByServerNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SqlServerDatabaseReplicationLinkResource(Client, SqlServerDatabaseReplicationLinkData.DeserializeSqlServerDatabaseReplicationLinkData(e)), _sqlServerDatabaseReplicationLinkReplicationLinksClientDiagnostics, Pipeline, "SqlServerResource.GetReplicationLinks", "value", "nextLink", cancellationToken); - } - - /// - /// Gets a list of replication links. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/replicationLinks - /// - /// - /// Operation Id - /// ReplicationLinks_ListByServer - /// - /// - /// Default Api Version - /// 2022-02-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetReplicationLinks(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _sqlServerDatabaseReplicationLinkReplicationLinksRestClient.CreateListByServerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sqlServerDatabaseReplicationLinkReplicationLinksRestClient.CreateListByServerNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SqlServerDatabaseReplicationLinkResource(Client, SqlServerDatabaseReplicationLinkData.DeserializeSqlServerDatabaseReplicationLinkData(e)), _sqlServerDatabaseReplicationLinkReplicationLinksClientDiagnostics, Pipeline, "SqlServerResource.GetReplicationLinks", "value", "nextLink", cancellationToken); - } - /// /// Gets a list of inaccessible databases in a logical server /// @@ -2833,6 +2773,66 @@ public virtual ArmOperation Refr } } + /// + /// Gets a list of replication links. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/replicationLinks + /// + /// + /// Operation Id + /// ReplicationLinks_ListByServer + /// + /// + /// Default Api Version + /// 2023-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetReplicationLinksAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _sqlServerDatabaseReplicationLinkReplicationLinksRestClient.CreateListByServerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sqlServerDatabaseReplicationLinkReplicationLinksRestClient.CreateListByServerNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SqlServerDatabaseReplicationLinkResource(Client, SqlServerDatabaseReplicationLinkData.DeserializeSqlServerDatabaseReplicationLinkData(e)), _sqlServerDatabaseReplicationLinkReplicationLinksClientDiagnostics, Pipeline, "SqlServerResource.GetReplicationLinks", "value", "nextLink", cancellationToken); + } + + /// + /// Gets a list of replication links. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/replicationLinks + /// + /// + /// Operation Id + /// ReplicationLinks_ListByServer + /// + /// + /// Default Api Version + /// 2023-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetReplicationLinks(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _sqlServerDatabaseReplicationLinkReplicationLinksRestClient.CreateListByServerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sqlServerDatabaseReplicationLinkReplicationLinksRestClient.CreateListByServerNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SqlServerDatabaseReplicationLinkResource(Client, SqlServerDatabaseReplicationLinkData.DeserializeSqlServerDatabaseReplicationLinkData(e)), _sqlServerDatabaseReplicationLinkReplicationLinksClientDiagnostics, Pipeline, "SqlServerResource.GetReplicationLinks", "value", "nextLink", cancellationToken); + } + /// /// Add a tag to the current resource. /// diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/autorest.md b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/autorest.md index 1f0aeb2a7215f..6a47c694e969a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/autorest.md +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/autorest.md @@ -5,7 +5,8 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml azure-arm: true tag: package-composite-v5 -require: https://github.com/Azure/azure-rest-api-specs/blob/e7e476ba9cd5dcaacb4b344a0ca9677ba731686b/specification/sql/resource-manager/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/f45a76fc39f033947ed12faf4b6416e1e19724cd/specification/sql/resource-manager/readme.md +#package-composite-v5 namespace: Azure.ResourceManager.Sql output-folder: $(this-folder)/Generated clear-output-folder: true @@ -27,6 +28,9 @@ head-as-boolean: false use-model-reader-writer: true enable-bicep-serialization: true +#mgmt-debug: +# show-serialized-names: true + # this is temporary, to be removed when we find the owner of this feature operation-groups-to-omit: - JobPrivateEndpoints @@ -351,12 +355,12 @@ rename-mapping: ServerUpdate.properties.minimalTlsVersion: minTlsVersion MinimalTlsVersion: SqlMinimalTlsVersion BackupStorageAccessTier: SqlBackupStorageAccessTier - -# mgmt-debug: -# show-serialized-names: true + Phase: DatabaseOperationPhase + PhaseDetails: DatabaseOperationPhaseDetails prompted-enum-values: - Default + directive: - remove-operation: ManagedDatabaseMoveOperations_ListByLocation - remove-operation: ManagedDatabaseMoveOperations_Get From 9571e4fe19203b92e6dab454f6f4c3d78ece4c9a Mon Sep 17 00:00:00 2001 From: Martin Costello Date: Thu, 4 Jul 2024 17:59:58 +0100 Subject: [PATCH 016/144] Avoid ServiceBusSenderOptions allocations (#44856) - Avoid allocating empty `ServiceBusSenderOptions` instances when creating instances of `ServiceBusSender`. - Fix tests that fail if the machine they are run on does not use US date formatting. --- .../tests/AmqpAnnotatedMessageConverterTests.cs | 15 +++++++-------- .../Azure.Messaging.ServiceBus/CHANGELOG.md | 2 ++ .../src/Client/ServiceBusClient.cs | 3 +-- .../src/Sender/ServiceBusSender.cs | 7 +++---- .../tests/Message/MessageLiveTests.cs | 16 +++++++--------- .../tests/Sender/SenderTests.cs | 4 ++-- 6 files changed, 22 insertions(+), 25 deletions(-) diff --git a/sdk/core/Azure.Core.Amqp/tests/AmqpAnnotatedMessageConverterTests.cs b/sdk/core/Azure.Core.Amqp/tests/AmqpAnnotatedMessageConverterTests.cs index f7ca33f24815c..85101630c0d7b 100644 --- a/sdk/core/Azure.Core.Amqp/tests/AmqpAnnotatedMessageConverterTests.cs +++ b/sdk/core/Azure.Core.Amqp/tests/AmqpAnnotatedMessageConverterTests.cs @@ -3,11 +3,10 @@ using System; using System.Collections.Generic; -using System.ComponentModel; +using System.Globalization; using System.IO; using System.Linq; using System.Text; -using Azure.Core.Amqp.Shared; using Microsoft.Azure.Amqp; using Microsoft.Azure.Amqp.Encoding; using Microsoft.Azure.Amqp.Framing; @@ -35,10 +34,10 @@ public class AmqpAnnotatedMessageConverterTests new double[] { 3.1415926 }, new decimal(3.1415926), new decimal[] { new decimal(3.1415926) }, - DateTimeOffset.Parse("3/24/21").UtcDateTime, - new DateTime[] {DateTimeOffset.Parse("3/24/21").UtcDateTime }, - DateTimeOffset.Parse("3/24/21"), - new DateTimeOffset[] {DateTimeOffset.Parse("3/24/21") }, + DateTimeOffset.Parse("3/24/21", CultureInfo.InvariantCulture).UtcDateTime, + new DateTime[] {DateTimeOffset.Parse("3/24/21", CultureInfo.InvariantCulture).UtcDateTime }, + DateTimeOffset.Parse("3/24/21", CultureInfo.InvariantCulture), + new DateTimeOffset[] {DateTimeOffset.Parse("3/24/21", CultureInfo.InvariantCulture) }, TimeSpan.FromSeconds(5), new TimeSpan[] {TimeSpan.FromSeconds(5)}, new Uri("http://localHost"), @@ -53,7 +52,7 @@ public class AmqpAnnotatedMessageConverterTests new Dictionary {{ "key", 1 } }, new Dictionary {{ "key", 3.1415926 } }, new Dictionary {{ "key", new decimal(3.1415926) } }, - new Dictionary {{ "key", DateTimeOffset.Parse("3/24/21").UtcDateTime } }, + new Dictionary {{ "key", DateTimeOffset.Parse("3/24/21", CultureInfo.InvariantCulture).UtcDateTime } }, // for some reason dictionaries with DateTimeOffset, Timespan, or Uri values are not supported in AMQP lib // new Dictionary {{ "key", DateTimeOffset.Parse("3/24/21") } }, // new Dictionary {{ "key", TimeSpan.FromSeconds(5) } }, @@ -69,7 +68,7 @@ public class AmqpAnnotatedMessageConverterTests Enumerable.Repeat(new object[] { long.MaxValue }, 2), Enumerable.Repeat(new object[] { 1 }, 2), Enumerable.Repeat(new object[] { 3.1415926, true }, 2), - Enumerable.Repeat(new object[] { DateTimeOffset.Parse("3/24/21").UtcDateTime, true }, 2), + Enumerable.Repeat(new object[] { DateTimeOffset.Parse("3/24/21", CultureInfo.InvariantCulture).UtcDateTime, true }, 2), new List> { new List { "first", 1}, new List { "second", 2 } } }; diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md b/sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md index c2ad2c867a04f..fb55ddac919fa 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md @@ -19,6 +19,8 @@ - Updated the `Microsoft.Azure.Amqp` dependency to 2.6.7, which contains a fix for decoding messages with a null format code as the body. +- Instances of `ServiceBusSender` created with no explicit `ServiceBusSenderOptions` value allocate less memory. + ## 7.18.0-beta.1 (2024-05-08) ### Features Added diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Client/ServiceBusClient.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Client/ServiceBusClient.cs index 262cccc2fa11e..ce542dad734a1 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Client/ServiceBusClient.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Client/ServiceBusClient.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System; -using System.Diagnostics.CodeAnalysis; using System.Threading; using System.Threading.Tasks; using Azure.Core; @@ -256,7 +255,7 @@ private ServiceBusClient( /// The was constructed with a connection string containing the "EntityPath" token /// that has a different value than the value specified here. /// - public virtual ServiceBusSender CreateSender(string queueOrTopicName) => CreateSender(queueOrTopicName, new ServiceBusSenderOptions()); + public virtual ServiceBusSender CreateSender(string queueOrTopicName) => CreateSender(queueOrTopicName, null); /// /// Creates a instance that can be used for sending messages to a specific diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Sender/ServiceBusSender.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Sender/ServiceBusSender.cs index 357c3f2b8ea6b..c614c5cd17516 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Sender/ServiceBusSender.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Sender/ServiceBusSender.cs @@ -5,7 +5,6 @@ using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; using System.Threading; @@ -120,10 +119,10 @@ internal ServiceBusSender( Argument.AssertNotNullOrWhiteSpace(entityPath, nameof(entityPath)); connection.ThrowIfClosed(); - options = options?.Clone() ?? new ServiceBusSenderOptions(); + var identifier = string.IsNullOrEmpty(options?.Identifier) ? DiagnosticUtilities.GenerateIdentifier(EntityPath) : options.Identifier; EntityPath = entityPath; - Identifier = string.IsNullOrEmpty(options.Identifier) ? DiagnosticUtilities.GenerateIdentifier(EntityPath) : options.Identifier; + Identifier = identifier; _connection = connection; _retryPolicy = _connection.RetryOptions.ToRetryPolicy(); _innerSender = _connection.CreateTransportSender( @@ -159,7 +158,7 @@ protected ServiceBusSender() /// The client instance to use for the sender. /// The name of the queue or topic to send to. protected ServiceBusSender(ServiceBusClient client, string queueOrTopicName) : - this(queueOrTopicName, client.Connection, new ServiceBusSenderOptions()) + this(queueOrTopicName, client.Connection, null) { } diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Message/MessageLiveTests.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Message/MessageLiveTests.cs index 33f801c2c78db..2d552ce386953 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Message/MessageLiveTests.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Message/MessageLiveTests.cs @@ -3,15 +3,13 @@ using System; using System.Collections.Generic; +using System.Globalization; using System.Linq; -using System.Text; using System.Threading.Tasks; using Azure.Core.Amqp; using Azure.Core.Serialization; using Azure.Core.Shared; using Azure.Messaging.ServiceBus.Amqp; -using Azure.Messaging.ServiceBus.Primitives; -using Microsoft.Azure.Amqp.Encoding; using NUnit.Framework; namespace Azure.Messaging.ServiceBus.Tests.Message @@ -431,10 +429,10 @@ public async Task CanSendMultipleDataSections() new double[] { 3.1415926 }, new decimal(3.1415926), new decimal[] { new decimal(3.1415926) }, - DateTimeOffset.Parse("3/24/21").UtcDateTime, - new DateTime[] {DateTimeOffset.Parse("3/24/21").UtcDateTime }, - DateTimeOffset.Parse("3/24/21"), - new DateTimeOffset[] {DateTimeOffset.Parse("3/24/21") }, + DateTimeOffset.Parse("3/24/21", CultureInfo.InvariantCulture).UtcDateTime, + new DateTime[] {DateTimeOffset.Parse("3/24/21", CultureInfo.InvariantCulture).UtcDateTime }, + DateTimeOffset.Parse("3/24/21", CultureInfo.InvariantCulture), + new DateTimeOffset[] {DateTimeOffset.Parse("3/24/21", CultureInfo.InvariantCulture) }, TimeSpan.FromSeconds(5), new TimeSpan[] {TimeSpan.FromSeconds(5)}, new Uri("http://localHost"), @@ -449,7 +447,7 @@ public async Task CanSendMultipleDataSections() new Dictionary {{ "key", 1 } }, new Dictionary {{ "key", 3.1415926 } }, new Dictionary {{ "key", new decimal(3.1415926) } }, - new Dictionary {{ "key", DateTimeOffset.Parse("3/24/21").UtcDateTime } }, + new Dictionary {{ "key", DateTimeOffset.Parse("3/24/21", CultureInfo.InvariantCulture).UtcDateTime } }, // for some reason dictionaries with DateTimeOffset, Timespan, or Uri values are not supported in AMQP lib // new Dictionary {{ "key", DateTimeOffset.Parse("3/24/21") } }, // new Dictionary {{ "key", TimeSpan.FromSeconds(5) } }, @@ -494,7 +492,7 @@ public async Task CanSendValueSection(object value) Enumerable.Repeat(new object[] { long.MaxValue }, 2), Enumerable.Repeat(new object[] { 1 }, 2), Enumerable.Repeat(new object[] { 3.1415926, true }, 2), - Enumerable.Repeat(new object[] { DateTimeOffset.Parse("3/24/21").UtcDateTime, true }, 2), + Enumerable.Repeat(new object[] { DateTimeOffset.Parse("3/24/21", CultureInfo.InvariantCulture).UtcDateTime, true }, 2), new List> { new List { "first", 1}, new List { "second", 2 } } }; diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Sender/SenderTests.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Sender/SenderTests.cs index aead8358c20ca..eecf5dcd421a6 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Sender/SenderTests.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Sender/SenderTests.cs @@ -172,7 +172,7 @@ public async Task SendBatchManagesLockingTheBatch() Assert.That(batch.TryAddMessage(new ServiceBusMessage(Array.Empty())), Is.True, "The batch should not be locked before sending."); - var sender = new ServiceBusSender("dummy", mockConnection.Object, new ServiceBusSenderOptions()); + var sender = new ServiceBusSender("dummy", mockConnection.Object); var sendTask = sender.SendMessagesAsync(batch); Assert.That(() => batch.TryAddMessage(new ServiceBusMessage(Array.Empty())), Throws.InstanceOf(), "The batch should be locked while sending."); @@ -281,7 +281,7 @@ public async Task CloseRespectsCancellationToken() It.IsAny())) .Returns(mockTransportSender.Object); - var sender = new ServiceBusSender("fake", mockConnection.Object, new ServiceBusSenderOptions()); + var sender = new ServiceBusSender("fake", mockConnection.Object); await sender.CloseAsync(cts.Token); mockTransportSender.Verify(transportReceiver => transportReceiver.CloseAsync(It.Is(ct => ct == cts.Token))); } From e922b027844816d548ea8bf8d6f7f86135cec91b Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 4 Jul 2024 17:32:32 -0400 Subject: [PATCH 017/144] Increment package version after release of Azure.ResourceManager.Resources (#44871) --- .../Azure.ResourceManager.Resources/CHANGELOG.md | 10 ++++++++++ .../src/Azure.ResourceManager.Resources.csproj | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/sdk/resources/Azure.ResourceManager.Resources/CHANGELOG.md b/sdk/resources/Azure.ResourceManager.Resources/CHANGELOG.md index b2c841f96290b..3df5e7c737fa7 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/CHANGELOG.md +++ b/sdk/resources/Azure.ResourceManager.Resources/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.9.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.8.0 (2024-07-04) ### Features Added diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Azure.ResourceManager.Resources.csproj b/sdk/resources/Azure.ResourceManager.Resources/src/Azure.ResourceManager.Resources.csproj index b69250ae1cbf5..f61aefccd3066 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Azure.ResourceManager.Resources.csproj +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Azure.ResourceManager.Resources.csproj @@ -1,8 +1,8 @@ - 1.8.0 + 1.9.0-beta.1 - 1.7.3 + 1.8.0 Azure.ResourceManager.Resources Microsoft Azure Resource Manager client SDK for Azure resource provider Resources. azure;management;resources From e6ed88e119713b7914c9b171b8c2c73876e110ad Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 4 Jul 2024 17:32:46 -0400 Subject: [PATCH 018/144] Increment package version after release of Azure.ResourceManager.Sql (#44872) --- .../Azure.ResourceManager.Sql/CHANGELOG.md | 12 +++++++++++- .../src/Azure.ResourceManager.Sql.csproj | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/CHANGELOG.md b/sdk/sqlmanagement/Azure.ResourceManager.Sql/CHANGELOG.md index 211ccf1149b4f..770d034568af8 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/CHANGELOG.md +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.3.0-beta.10 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.3.0-beta.9 (2024-07-15) ### Features Added @@ -226,4 +236,4 @@ This package follows the [new Azure SDK guidelines](https://azure.github.io/azur This package is a Public Preview version, so expect incompatible changes in subsequent releases as we improve the product. To provide feedback, submit an issue in our [Azure SDK for .NET GitHub repo](https://github.com/Azure/azure-sdk-for-net/issues). -> NOTE: For more information about unified authentication, please refer to [Microsoft Azure Identity documentation for .NET](https://docs.microsoft.com//dotnet/api/overview/azure/identity-readme?view=azure-dotnet). \ No newline at end of file +> NOTE: For more information about unified authentication, please refer to [Microsoft Azure Identity documentation for .NET](https://docs.microsoft.com//dotnet/api/overview/azure/identity-readme?view=azure-dotnet). diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Azure.ResourceManager.Sql.csproj b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Azure.ResourceManager.Sql.csproj index 3a62570995ff1..58c25265a5065 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Azure.ResourceManager.Sql.csproj +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Azure.ResourceManager.Sql.csproj @@ -1,6 +1,6 @@ - 1.3.0-beta.9 + 1.3.0-beta.10 1.2.0 Azure.ResourceManager.Sql From 221d510ac316a542eb5f387b23cd4495a629eb0f Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 4 Jul 2024 17:35:53 -0400 Subject: [PATCH 019/144] Increment package version after release of Azure.ResourceManager.OracleDatabase (#44867) --- .../Azure.ResourceManager.OracleDatabase/CHANGELOG.md | 10 ++++++++++ .../src/Azure.ResourceManager.OracleDatabase.csproj | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/CHANGELOG.md b/sdk/oracle/Azure.ResourceManager.OracleDatabase/CHANGELOG.md index 61560c4940404..f1624d4a4a93b 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/CHANGELOG.md +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.1.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.0.0 (2024-06-28) ### Features Added diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Azure.ResourceManager.OracleDatabase.csproj b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Azure.ResourceManager.OracleDatabase.csproj index 25f2ebdc7fc33..cc7d5df9a2c76 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Azure.ResourceManager.OracleDatabase.csproj +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Azure.ResourceManager.OracleDatabase.csproj @@ -1,6 +1,8 @@ - 1.0.0 + 1.1.0-beta.1 + + 1.0.0 Azure.ResourceManager.OracleDatabase Azure Resource Manager client SDK for Azure resource provider OracleDatabase. azure;management;arm;resource manager;oracledatabase From 477051db1f3d98cc779fed99d701cb0b35f51bf6 Mon Sep 17 00:00:00 2001 From: Ray Chen Date: Fri, 5 Jul 2024 14:13:22 +0800 Subject: [PATCH 020/144] Update GenerateAndBuildLib.ps1 (#44874) Don't set 'installInstructions' when it's null, otherwise it would fail the schema validation of 'generateOutput'. --- .../automation/GenerateAndBuildLib.ps1 | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/eng/scripts/automation/GenerateAndBuildLib.ps1 b/eng/scripts/automation/GenerateAndBuildLib.ps1 index 1add91eab06a6..050adeaecc377 100644 --- a/eng/scripts/automation/GenerateAndBuildLib.ps1 +++ b/eng/scripts/automation/GenerateAndBuildLib.ps1 @@ -846,15 +846,22 @@ function GeneratePackage() if ( $serviceType -eq "resource-manager" ) { $ciFilePath = "sdk/$service/ci.mgmt.yml" } - $generatedSDKPackages.Add(@{packageName="$packageName"; - result=$result; - path=@("$path", "$ciFilePath"); - packageFolder="$projectFolder"; - artifacts=$artifacts; - apiViewArtifact=$apiViewArtifact; - language=".Net"; - changelog= $changelog; - installInstructions = $installInstructions}) + + $packageDetails = @{ + packageName="$packageName"; + result=$result; + path=@("$path", "$ciFilePath"); + packageFolder="$projectFolder"; + artifacts=$artifacts; + apiViewArtifact=$apiViewArtifact; + language=".Net"; + changelog=$changelog + } + + if ($installInstructions -ne $null) { + $packageDetails['installInstructions'] = $installInstructions + } + $generatedSDKPackages.Add($packageDetails) } function UpdateExistingSDKByInputFiles() { @@ -930,4 +937,4 @@ function GetSDKProjectFolder() } $projectFolder = (Join-Path $sdkRepoRoot $service $packageDir) return $projectFolder -} \ No newline at end of file +} From fdaa17d0bcf12db53cec54c6e3e4a7ce1d1502a7 Mon Sep 17 00:00:00 2001 From: Wenming Liu Date: Fri, 5 Jul 2024 14:58:27 +0800 Subject: [PATCH 021/144] [Api Management] Bump up api version to latest stable 2022-08-01 (#44074) --- .../CHANGELOG.md | 21 +- ...rceManager.ApiManagement.netstandard2.0.cs | 816 ++++++++++++++++- .../Generated/Samples/Sample_ApiCollection.cs | 223 ++++- .../Samples/Sample_ApiDiagnosticCollection.cs | 10 +- .../Samples/Sample_ApiDiagnosticResource.cs | 8 +- .../Sample_ApiIssueAttachmentCollection.cs | 10 +- .../Sample_ApiIssueAttachmentResource.cs | 8 +- .../Samples/Sample_ApiIssueCollection.cs | 10 +- .../Sample_ApiIssueCommentCollection.cs | 10 +- .../Samples/Sample_ApiIssueCommentResource.cs | 8 +- .../Samples/Sample_ApiIssueResource.cs | 8 +- ...ManagementAuthorizationServerCollection.cs | 12 +- ...piManagementAuthorizationServerResource.cs | 12 +- .../Sample_ApiManagementBackendCollection.cs | 12 +- .../Sample_ApiManagementBackendResource.cs | 10 +- .../Sample_ApiManagementCacheCollection.cs | 10 +- .../Sample_ApiManagementCacheResource.cs | 8 +- ...mple_ApiManagementCertificateCollection.cs | 18 +- ...Sample_ApiManagementCertificateResource.cs | 14 +- ...e_ApiManagementDeletedServiceCollection.cs | 6 +- ...ple_ApiManagementDeletedServiceResource.cs | 6 +- ...ample_ApiManagementDiagnosticCollection.cs | 10 +- .../Sample_ApiManagementDiagnosticResource.cs | 8 +- ...le_ApiManagementEmailTemplateCollection.cs | 10 +- ...mple_ApiManagementEmailTemplateResource.cs | 8 +- ...ntGatewayCertificateAuthorityCollection.cs | 10 +- ...mentGatewayCertificateAuthorityResource.cs | 8 +- .../Sample_ApiManagementGatewayCollection.cs | 10 +- ...tGatewayHostnameConfigurationCollection.cs | 10 +- ...entGatewayHostnameConfigurationResource.cs | 8 +- .../Sample_ApiManagementGatewayResource.cs | 22 +- ...ple_ApiManagementGlobalSchemaCollection.cs | 18 +- ...ample_ApiManagementGlobalSchemaResource.cs | 12 +- .../Sample_ApiManagementGroupCollection.cs | 12 +- .../Sample_ApiManagementGroupResource.cs | 16 +- ...ApiManagementIdentityProviderCollection.cs | 10 +- ...e_ApiManagementIdentityProviderResource.cs | 10 +- .../Sample_ApiManagementIssueCollection.cs | 8 +- .../Sample_ApiManagementIssueResource.cs | 2 +- .../Sample_ApiManagementLoggerCollection.cs | 12 +- .../Sample_ApiManagementLoggerResource.cs | 8 +- ...ample_ApiManagementNamedValueCollection.cs | 18 +- .../Sample_ApiManagementNamedValueResource.cs | 14 +- ...ple_ApiManagementNotificationCollection.cs | 10 +- ...ample_ApiManagementNotificationResource.cs | 20 +- ...nagementOpenIdConnectProviderCollection.cs | 12 +- ...ManagementOpenIdConnectProviderResource.cs | 12 +- .../Sample_ApiManagementPolicyCollection.cs | 16 +- .../Sample_ApiManagementPolicyResource.cs | 10 +- ...nagementPortalDelegationSettingResource.cs | 10 +- ...e_ApiManagementPortalRevisionCollection.cs | 10 +- ...ple_ApiManagementPortalRevisionResource.cs | 6 +- ...piManagementPortalSignInSettingResource.cs | 8 +- ...piManagementPortalSignUpSettingResource.cs | 8 +- ...mentPrivateEndpointConnectionCollection.cs | 10 +- ...gementPrivateEndpointConnectionResource.cs | 6 +- ...Sample_ApiManagementPrivateLinkResource.cs | 2 +- ...ManagementPrivateLinkResourceCollection.cs | 8 +- .../Sample_ApiManagementProductCollection.cs | 10 +- ...le_ApiManagementProductPolicyCollection.cs | 10 +- ...mple_ApiManagementProductPolicyResource.cs | 8 +- .../Sample_ApiManagementProductResource.cs | 26 +- ...ample_ApiManagementProductTagCollection.cs | 10 +- .../Sample_ApiManagementProductTagResource.cs | 8 +- .../Sample_ApiManagementServiceCollection.cs | 83 +- .../Sample_ApiManagementServiceResource.cs | 142 +-- ...ple_ApiManagementSubscriptionCollection.cs | 10 +- ...ample_ApiManagementSubscriptionResource.cs | 14 +- .../Sample_ApiManagementTagCollection.cs | 10 +- .../Sample_ApiManagementTagResource.cs | 8 +- ...le_ApiManagementTenantSettingCollection.cs | 8 +- ...mple_ApiManagementTenantSettingResource.cs | 2 +- .../Sample_ApiManagementUserCollection.cs | 10 +- .../Sample_ApiManagementUserResource.cs | 18 +- ...ApiManagementUserSubscriptionCollection.cs | 8 +- ...e_ApiManagementUserSubscriptionResource.cs | 2 +- .../Samples/Sample_ApiOperationCollection.cs | 16 +- .../Sample_ApiOperationPolicyCollection.cs | 10 +- .../Sample_ApiOperationPolicyResource.cs | 8 +- .../Samples/Sample_ApiOperationResource.cs | 10 +- .../Sample_ApiOperationTagCollection.cs | 10 +- .../Samples/Sample_ApiOperationTagResource.cs | 8 +- .../Samples/Sample_ApiPolicyCollection.cs | 12 +- .../Samples/Sample_ApiPolicyResource.cs | 10 +- .../Samples/Sample_ApiReleaseCollection.cs | 10 +- .../Samples/Sample_ApiReleaseResource.cs | 8 +- .../Generated/Samples/Sample_ApiResource.cs | 16 +- .../Samples/Sample_ApiSchemaCollection.cs | 10 +- .../Samples/Sample_ApiSchemaResource.cs | 8 +- .../Samples/Sample_ApiTagCollection.cs | 10 +- .../Sample_ApiTagDescriptionCollection.cs | 10 +- .../Sample_ApiTagDescriptionResource.cs | 8 +- .../Samples/Sample_ApiTagResource.cs | 8 +- .../Samples/Sample_ApiVersionSetCollection.cs | 10 +- .../Samples/Sample_ApiVersionSetResource.cs | 8 +- ...orizationAccessPolicyContractCollection.cs | 214 +++++ ...thorizationAccessPolicyContractResource.cs | 122 +++ .../Sample_AuthorizationContractCollection.cs | 295 ++++++ .../Sample_AuthorizationContractResource.cs | 230 +++++ ...AuthorizationProviderContractCollection.cs | 383 ++++++++ ...e_AuthorizationProviderContractResource.cs | 286 ++++++ .../Sample_DocumentationContractCollection.cs | 204 +++++ .../Sample_DocumentationContractResource.cs | 145 +++ ...Sample_PolicyFragmentContractCollection.cs | 318 +++++++ .../Sample_PolicyFragmentContractResource.cs | 210 +++++ .../Sample_PortalConfigContractCollection.cs | 234 +++++ .../Sample_PortalConfigContractResource.cs | 144 +++ .../Sample_ResolverContractCollection.cs | 210 +++++ .../Sample_ResolverContractResource.cs | 150 ++++ ...mple_ServiceApiResolverPolicyCollection.cs | 216 +++++ ...Sample_ServiceApiResolverPolicyResource.cs | 154 ++++ .../Samples/Sample_ServiceApiWikiResource.cs | 196 ++++ .../Sample_ServiceProductWikiResource.cs | 196 ++++ .../Sample_SubscriptionResourceExtensions.cs | 2 +- .../Sample_TenantAccessInfoCollection.cs | 16 +- .../Sample_TenantAccessInfoResource.cs | 18 +- ...Azure.ResourceManager.ApiManagement.csproj | 2 +- .../src/Generated/ApiCollection.cs | 20 +- .../src/Generated/ApiData.Serialization.cs | 473 ++++++++++ .../src/Generated/ApiData.cs | 21 + .../src/Generated/ApiDiagnosticCollection.cs | 20 +- .../src/Generated/ApiDiagnosticResource.cs | 16 +- .../Generated/ApiIssueAttachmentCollection.cs | 20 +- .../ApiIssueAttachmentData.Serialization.cs | 143 +++ .../src/Generated/ApiIssueAttachmentData.cs | 3 + .../Generated/ApiIssueAttachmentResource.cs | 16 +- .../src/Generated/ApiIssueCollection.cs | 20 +- .../Generated/ApiIssueCommentCollection.cs | 20 +- .../ApiIssueCommentData.Serialization.cs | 128 +++ .../src/Generated/ApiIssueCommentData.cs | 3 + .../src/Generated/ApiIssueCommentResource.cs | 16 +- .../src/Generated/ApiIssueResource.cs | 24 +- ...ManagementAuthorizationServerCollection.cs | 20 +- ...ntAuthorizationServerData.Serialization.cs | 500 +++++++++++ .../ApiManagementAuthorizationServerData.cs | 28 +- ...piManagementAuthorizationServerResource.cs | 20 +- .../ApiManagementBackendCollection.cs | 20 +- .../ApiManagementBackendData.Serialization.cs | 230 +++++ .../src/Generated/ApiManagementBackendData.cs | 17 +- .../Generated/ApiManagementBackendResource.cs | 24 +- .../Generated/ApiManagementCacheCollection.cs | 20 +- .../ApiManagementCacheData.Serialization.cs | 158 ++++ .../src/Generated/ApiManagementCacheData.cs | 4 + .../Generated/ApiManagementCacheResource.cs | 16 +- .../ApiManagementCertificateCollection.cs | 20 +- ...ManagementCertificateData.Serialization.cs | 151 ++++ .../Generated/ApiManagementCertificateData.cs | 4 + .../ApiManagementCertificateResource.cs | 20 +- .../ApiManagementDeletedServiceCollection.cs | 12 +- ...agementDeletedServiceData.Serialization.cs | 136 +++ .../ApiManagementDeletedServiceData.cs | 4 + .../ApiManagementDeletedServiceResource.cs | 8 +- .../ApiManagementDiagnosticCollection.cs | 20 +- .../ApiManagementDiagnosticResource.cs | 16 +- .../ApiManagementEmailTemplateCollection.cs | 20 +- ...nagementEmailTemplateData.Serialization.cs | 206 +++++ .../ApiManagementEmailTemplateData.cs | 6 + .../ApiManagementEmailTemplateResource.cs | 16 +- ...ntGatewayCertificateAuthorityCollection.cs | 20 +- ...yCertificateAuthorityData.Serialization.cs | 90 ++ ...nagementGatewayCertificateAuthorityData.cs | 1 + ...mentGatewayCertificateAuthorityResource.cs | 16 +- .../ApiManagementGatewayCollection.cs | 20 +- .../ApiManagementGatewayData.Serialization.cs | 112 +++ .../src/Generated/ApiManagementGatewayData.cs | 2 + ...tGatewayHostnameConfigurationCollection.cs | 20 +- ...HostnameConfigurationData.Serialization.cs | 184 ++++ ...agementGatewayHostnameConfigurationData.cs | 3 + ...entGatewayHostnameConfigurationResource.cs | 16 +- .../Generated/ApiManagementGatewayResource.cs | 52 +- .../ApiManagementGlobalSchemaCollection.cs | 20 +- ...anagementGlobalSchemaData.Serialization.cs | 142 +++ .../ApiManagementGlobalSchemaData.cs | 4 + .../ApiManagementGlobalSchemaResource.cs | 16 +- .../Generated/ApiManagementGroupCollection.cs | 20 +- .../ApiManagementGroupData.Serialization.cs | 174 ++++ .../src/Generated/ApiManagementGroupData.cs | 5 + .../Generated/ApiManagementGroupResource.cs | 32 +- ...ApiManagementIdentityProviderCollection.cs | 20 +- ...ementIdentityProviderData.Serialization.cs | 345 +++++++ .../ApiManagementIdentityProviderData.cs | 17 +- .../ApiManagementIdentityProviderResource.cs | 20 +- .../Generated/ApiManagementIssueCollection.cs | 16 +- .../Generated/ApiManagementIssueResource.cs | 4 +- .../ApiManagementLoggerCollection.cs | 20 +- .../ApiManagementLoggerData.Serialization.cs | 181 ++++ .../src/Generated/ApiManagementLoggerData.cs | 5 + .../Generated/ApiManagementLoggerResource.cs | 16 +- .../ApiManagementNamedValueCollection.cs | 20 +- ...iManagementNamedValueData.Serialization.cs | 188 ++++ .../Generated/ApiManagementNamedValueData.cs | 5 + .../ApiManagementNamedValueResource.cs | 24 +- .../ApiManagementNotificationCollection.cs | 20 +- ...anagementNotificationData.Serialization.cs | 135 +++ .../ApiManagementNotificationData.cs | 3 + .../ApiManagementNotificationResource.cs | 40 +- ...nagementOpenIdConnectProviderCollection.cs | 20 +- ...OpenIdConnectProviderData.Serialization.cs | 253 ++++++ .../ApiManagementOpenIdConnectProviderData.cs | 17 +- ...ManagementOpenIdConnectProviderResource.cs | 20 +- .../ApiManagementPolicyCollection.cs | 20 +- .../Generated/ApiManagementPolicyResource.cs | 16 +- ...rtalDelegationSettingData.Serialization.cs | 152 ++++ ...piManagementPortalDelegationSettingData.cs | 4 + ...nagementPortalDelegationSettingResource.cs | 20 +- .../ApiManagementPortalRevisionCollection.cs | 20 +- ...agementPortalRevisionData.Serialization.cs | 183 ++++ .../ApiManagementPortalRevisionData.cs | 6 + .../ApiManagementPortalRevisionResource.cs | 12 +- ...ntPortalSignInSettingData.Serialization.cs | 90 ++ .../ApiManagementPortalSignInSettingData.cs | 1 + ...piManagementPortalSignInSettingResource.cs | 16 +- ...ntPortalSignUpSettingData.Serialization.cs | 105 +++ .../ApiManagementPortalSignUpSettingData.cs | 2 + ...piManagementPortalSignUpSettingResource.cs | 16 +- ...mentPrivateEndpointConnectionCollection.cs | 20 +- ...ateEndpointConnectionData.Serialization.cs | 124 +++ ...ManagementPrivateEndpointConnectionData.cs | 3 + ...gementPrivateEndpointConnectionResource.cs | 12 +- .../ApiManagementPrivateLinkResource.cs | 4 +- ...ManagementPrivateLinkResourceCollection.cs | 16 +- ...ntPrivateLinkResourceData.Serialization.cs | 170 ++++ .../ApiManagementPrivateLinkResourceData.cs | 3 + .../ApiManagementProductCollection.cs | 20 +- .../ApiManagementProductData.Serialization.cs | 205 +++++ .../src/Generated/ApiManagementProductData.cs | 7 + .../ApiManagementProductPolicyCollection.cs | 20 +- .../ApiManagementProductPolicyResource.cs | 16 +- .../Generated/ApiManagementProductResource.cs | 63 +- .../ApiManagementProductTagCollection.cs | 20 +- .../ApiManagementProductTagResource.cs | 16 +- .../ApiManagementServiceCollection.cs | 20 +- .../ApiManagementServiceData.Serialization.cs | 847 ++++++++++++++++++ .../src/Generated/ApiManagementServiceData.cs | 49 +- .../Generated/ApiManagementServiceResource.cs | 654 +++++++++++--- .../ApiManagementSubscriptionCollection.cs | 20 +- .../ApiManagementSubscriptionResource.cs | 28 +- .../Generated/ApiManagementTagCollection.cs | 20 +- .../src/Generated/ApiManagementTagResource.cs | 16 +- .../ApiManagementTenantSettingCollection.cs | 16 +- ...nagementTenantSettingData.Serialization.cs | 112 +++ .../ApiManagementTenantSettingData.cs | 1 + .../ApiManagementTenantSettingResource.cs | 4 +- .../Generated/ApiManagementUserCollection.cs | 20 +- .../Generated/ApiManagementUserResource.cs | 40 +- ...ApiManagementUserSubscriptionCollection.cs | 16 +- .../ApiManagementUserSubscriptionResource.cs | 4 +- .../src/Generated/ApiOperationCollection.cs | 20 +- .../ApiOperationData.Serialization.cs | 251 ++++++ .../src/Generated/ApiOperationData.cs | 8 + .../Generated/ApiOperationPolicyCollection.cs | 20 +- .../Generated/ApiOperationPolicyResource.cs | 16 +- .../src/Generated/ApiOperationResource.cs | 24 +- .../Generated/ApiOperationTagCollection.cs | 20 +- .../src/Generated/ApiOperationTagResource.cs | 16 +- .../src/Generated/ApiPolicyCollection.cs | 20 +- .../src/Generated/ApiPolicyResource.cs | 16 +- .../src/Generated/ApiReleaseCollection.cs | 20 +- .../Generated/ApiReleaseData.Serialization.cs | 144 +++ .../src/Generated/ApiReleaseData.cs | 4 + .../src/Generated/ApiReleaseResource.cs | 16 +- .../src/Generated/ApiResource.cs | 136 ++- .../src/Generated/ApiSchemaCollection.cs | 20 +- .../Generated/ApiSchemaData.Serialization.cs | 153 ++++ .../src/Generated/ApiSchemaData.cs | 4 + .../src/Generated/ApiSchemaResource.cs | 16 +- .../src/Generated/ApiTagCollection.cs | 20 +- .../Generated/ApiTagDescriptionCollection.cs | 20 +- .../ApiTagDescriptionData.Serialization.cs | 181 ++++ .../src/Generated/ApiTagDescriptionData.cs | 5 + .../Generated/ApiTagDescriptionResource.cs | 16 +- .../src/Generated/ApiTagResource.cs | 16 +- .../src/Generated/ApiVersionSetCollection.cs | 20 +- .../ApiVersionSetData.Serialization.cs | 181 ++++ .../src/Generated/ApiVersionSetData.cs | 5 + .../src/Generated/ApiVersionSetResource.cs | 16 +- .../Generated/ArmApiManagementModelFactory.cs | 491 +++++++++- ...orizationAccessPolicyContractCollection.cs | 505 +++++++++++ ...nAccessPolicyContractData.Serialization.cs | 320 +++++++ .../AuthorizationAccessPolicyContractData.cs | 80 ++ ...essPolicyContractResource.Serialization.cs | 26 + ...thorizationAccessPolicyContractResource.cs | 361 ++++++++ .../AuthorizationContractCollection.cs | 505 +++++++++++ ...AuthorizationContractData.Serialization.cs | 448 +++++++++ .../Generated/AuthorizationContractData.cs | 97 ++ ...orizationContractResource.Serialization.cs | 26 + .../AuthorizationContractResource.cs | 594 ++++++++++++ ...AuthorizationProviderContractCollection.cs | 505 +++++++++++ ...ationProviderContractData.Serialization.cs | 356 ++++++++ .../AuthorizationProviderContractData.cs | 86 ++ ...nProviderContractResource.Serialization.cs | 26 + .../AuthorizationProviderContractResource.cs | 428 +++++++++ .../DiagnosticContractData.Serialization.cs | 234 +++++ .../src/Generated/DiagnosticContractData.cs | 10 + .../DocumentationContractCollection.cs | 505 +++++++++++ ...DocumentationContractData.Serialization.cs | 324 +++++++ .../Generated/DocumentationContractData.cs | 80 ++ ...mentationContractResource.Serialization.cs | 26 + .../DocumentationContractResource.cs | 424 +++++++++ .../Extensions/ApiManagementExtensions.cs | 218 ++++- .../MockableApiManagementArmClient.cs | 120 +++ ...kableApiManagementResourceGroupResource.cs | 4 +- ...ckableApiManagementSubscriptionResource.cs | 24 +- .../Internal/BicepSerializationHelpers.cs | 58 ++ .../Generated/Internal/WirePathAttribute.cs | 27 + .../IssueContractData.Serialization.cs | 181 ++++ .../src/Generated/IssueContractData.cs | 6 + .../PolicyFragmentContractOperationSource.cs | 38 + ...cessInformationListResult.Serialization.cs | 80 ++ .../AdditionalLocation.Serialization.cs | 307 +++++++ .../Generated/Models/AdditionalLocation.cs | 23 +- .../ApiContactInformation.Serialization.cs | 79 ++ .../Generated/Models/ApiContactInformation.cs | 3 + .../ApiCreateOrUpdateContent.Serialization.cs | 16 + .../Models/ApiCreateOrUpdateContent.cs | 32 +- ...atePropertiesWsdlSelector.Serialization.cs | 64 ++ ...ApiCreateOrUpdatePropertiesWsdlSelector.cs | 2 + .../ApiEntityBaseContract.Serialization.cs | 294 ++++++ .../Generated/Models/ApiEntityBaseContract.cs | 15 + .../src/Generated/Models/ApiIssuePatch.cs | 6 + .../ApiLicenseInformation.Serialization.cs | 56 ++ .../Generated/Models/ApiLicenseInformation.cs | 2 + .../Models/ApiListResult.Serialization.cs | 80 ++ ...agementAuthorizationError.Serialization.cs | 197 ++++ .../Models/ApiManagementAuthorizationError.cs | 71 ++ ...tAuthorizationServerPatch.Serialization.cs | 500 +++++++++++ .../ApiManagementAuthorizationServerPatch.cs | 28 +- .../Models/ApiManagementAuthorizationType.cs | 48 + .../Models/ApiManagementBackendPatch.cs | 17 +- .../Models/ApiManagementCachePatch.cs | 4 + ...agementCertificateCreateOrUpdateContent.cs | 3 + ...ementEmailTemplateCreateOrUpdateContent.cs | 5 + ...ementGatewayApiListResult.Serialization.cs | 80 ++ ...ApiManagementGroupCreateOrUpdateContent.cs | 4 + .../Models/ApiManagementGroupPatch.cs | 4 + ...piManagementGroupUserData.Serialization.cs | 244 +++++ .../Models/ApiManagementGroupUserData.cs | 8 + ...gementGroupUserListResult.Serialization.cs | 80 ++ ...iderCreateOrUpdateContent.Serialization.cs | 345 +++++++ ...ntIdentityProviderCreateOrUpdateContent.cs | 17 +- ...mentIdentityProviderPatch.Serialization.cs | 12 + .../ApiManagementIdentityProviderPatch.cs | 17 +- .../Models/ApiManagementLoggerPatch.cs | 4 + ...alueCreateOrUpdateContent.Serialization.cs | 188 ++++ ...nagementNamedValueCreateOrUpdateContent.cs | 5 + .../Models/ApiManagementNamedValuePatch.cs | 5 + .../Models/ApiManagementNatGatewayState.cs | 51 ++ ...penIdConnectProviderPatch.Serialization.cs | 32 + ...ApiManagementOpenIdConnectProviderPatch.cs | 17 +- ...EndpointConnectionCreateOrUpdateContent.cs | 2 + ...pointConnectionListResult.Serialization.cs | 42 + ...ateLinkResourceListResult.Serialization.cs | 42 + ...ManagementPrivateLinkResourceListResult.cs | 1 + ...inkServiceConnectionState.Serialization.cs | 79 ++ ...gementPrivateLinkServiceConnectionState.cs | 3 + ...ementProductApiListResult.Serialization.cs | 80 ++ ...entProductGroupListResult.Serialization.cs | 80 ++ .../Models/ApiManagementProductPatch.cs | 7 + ...gementResourceSkuCapacity.Serialization.cs | 78 ++ .../ApiManagementResourceSkuCapacity.cs | 4 + ...ServiceApplyNetworkConfigurationContent.cs | 1 + ...piManagementServiceBackupRestoreContent.cs | 6 + ...OwnershipIdentifierResult.Serialization.cs | 41 + ...rviceGetDomainOwnershipIdentifierResult.cs | 1 + ...tServiceGetSsoTokenResult.Serialization.cs | 33 + .../ApiManagementServiceGetSsoTokenResult.cs | 1 + ...nagementServiceListResult.Serialization.cs | 65 ++ ...anagementServiceNameAvailabilityContent.cs | 1 + ...iceNameAvailabilityResult.Serialization.cs | 72 ++ ...ManagementServiceNameAvailabilityResult.cs | 3 + ...ApiManagementServicePatch.Serialization.cs | 835 +++++++++++++++++ .../Models/ApiManagementServicePatch.cs | 50 +- ...ementServiceSkuProperties.Serialization.cs | 42 + .../ApiManagementServiceSkuProperties.cs | 2 + .../Models/ApiManagementSku.Serialization.cs | 323 +++++++ .../src/Generated/Models/ApiManagementSku.cs | 13 + ...ManagementSkuCapabilities.Serialization.cs | 64 ++ .../Models/ApiManagementSkuCapabilities.cs | 2 + .../ApiManagementSkuCapacity.Serialization.cs | 78 ++ .../Models/ApiManagementSkuCapacity.cs | 4 + .../ApiManagementSkuCosts.Serialization.cs | 79 ++ .../Generated/Models/ApiManagementSkuCosts.cs | 3 + ...ManagementSkuLocationInfo.Serialization.cs | 93 ++ .../Models/ApiManagementSkuLocationInfo.cs | 3 + ...agementSkuRestrictionInfo.Serialization.cs | 78 ++ .../Models/ApiManagementSkuRestrictionInfo.cs | 2 + ...ManagementSkuRestrictions.Serialization.cs | 100 +++ .../Models/ApiManagementSkuRestrictions.cs | 4 + ...iManagementSkuZoneDetails.Serialization.cs | 78 ++ .../Models/ApiManagementSkuZoneDetails.cs | 2 + .../ApiManagementSkusResult.Serialization.cs | 65 ++ ...gementSubscriptionCreateOrUpdateContent.cs | 7 + .../Models/ApiManagementSubscriptionPatch.cs | 9 + .../ApiManagementTagCreateOrUpdateContent.cs | 1 + .../ApiManagementUserCreateOrUpdateContent.cs | 9 + .../Models/ApiManagementUserPatch.cs | 7 + .../src/Generated/Models/ApiOperationPatch.cs | 8 + .../src/Generated/Models/ApiPatch.cs | 19 + .../ApiReleaseListResult.Serialization.cs | 80 ++ .../ApiRevisionContract.Serialization.cs | 174 ++++ .../Generated/Models/ApiRevisionContract.cs | 8 + .../ApiRevisionListResult.Serialization.cs | 80 ++ .../src/Generated/Models/ApiSchemaType.cs | 2 +- .../ApiTagDescriptionCreateOrUpdateContent.cs | 3 + .../ApiVersionConstraint.Serialization.cs | 41 + .../Generated/Models/ApiVersionConstraint.cs | 1 + ...VersionSetContractDetails.Serialization.cs | 148 +++ .../Models/ApiVersionSetContractDetails.cs | 6 + .../ApiVersionSetListResult.Serialization.cs | 80 ++ .../Generated/Models/ApiVersionSetPatch.cs | 5 + .../AssociatedApiProperties.Serialization.cs | 387 ++++++++ .../Models/AssociatedApiProperties.cs | 5 + ...ciatedOperationProperties.Serialization.cs | 202 +++++ .../Models/AssociatedOperationProperties.cs | 8 + ...sociatedProductProperties.Serialization.cs | 172 ++++ .../Models/AssociatedProductProperties.cs | 2 + .../AssociatedTagProperties.Serialization.cs | 64 ++ .../Models/AssociatedTagProperties.cs | 2 + .../AssociationContract.Serialization.cs | 89 ++ .../Generated/Models/AssociationContract.cs | 1 + ...nticationSettingsContract.Serialization.cs | 147 ++- .../Models/AuthenticationSettingsContract.cs | 16 +- ...ionAccessPolicyListResult.Serialization.cs | 242 +++++ .../AuthorizationAccessPolicyListResult.cs | 74 ++ ...ConfirmConsentCodeContent.Serialization.cs | 122 +++ .../AuthorizationConfirmConsentCodeContent.cs | 66 ++ .../AuthorizationListResult.Serialization.cs | 242 +++++ .../Models/AuthorizationListResult.cs | 74 ++ ...AuthorizationLoginContent.Serialization.cs | 126 +++ .../Models/AuthorizationLoginContent.cs | 66 ++ .../AuthorizationLoginResult.Serialization.cs | 163 ++++ .../Models/AuthorizationLoginResult.cs | 66 ++ ...izationProviderListResult.Serialization.cs | 212 +++++ .../Models/AuthorizationProviderListResult.cs | 70 ++ ...nProviderOAuth2GrantTypes.Serialization.cs | 256 ++++++ .../AuthorizationProviderOAuth2GrantTypes.cs | 73 ++ ...ionProviderOAuth2Settings.Serialization.cs | 189 ++++ .../AuthorizationProviderOAuth2Settings.cs | 71 ++ ...orizationServerListResult.Serialization.cs | 80 ++ ...tionServerSecretsContract.Serialization.cs | 87 ++ .../AuthorizationServerSecretsContract.cs | 3 + ...anagementServiceSkuResult.Serialization.cs | 66 ++ .../AvailableApiManagementServiceSkuResult.cs | 3 + ...rizationHeaderCredentials.Serialization.cs | 64 ++ .../BackendAuthorizationHeaderCredentials.cs | 2 + ...ackendCredentialsContract.Serialization.cs | 200 +++++ .../Models/BackendCredentialsContract.cs | 5 + .../Models/BackendListResult.Serialization.cs | 80 ++ .../Models/BackendProperties.Serialization.cs | 33 + .../src/Generated/Models/BackendProperties.cs | 1 + .../BackendProxyContract.Serialization.cs | 79 ++ .../Generated/Models/BackendProxyContract.cs | 3 + .../BackendReconnectContract.Serialization.cs | 90 ++ .../Models/BackendReconnectContract.cs | 1 + ...ceFabricClusterProperties.Serialization.cs | 175 ++++ .../BackendServiceFabricClusterProperties.cs | 6 + .../BackendTlsProperties.Serialization.cs | 50 ++ .../Generated/Models/BackendTlsProperties.cs | 2 + .../BodyDiagnosticSettings.Serialization.cs | 33 + .../Models/BodyDiagnosticSettings.cs | 1 + .../Models/CacheListResult.Serialization.cs | 80 ++ .../CertificateConfiguration.Serialization.cs | 91 ++ .../Models/CertificateConfiguration.cs | 4 + .../CertificateInformation.Serialization.cs | 77 ++ .../Models/CertificateInformation.cs | 3 + .../CertificateListResult.Serialization.cs | 80 ++ .../ClientSecretContract.Serialization.cs | 41 + .../Generated/Models/ClientSecretContract.cs | 1 + .../Models/ConfigurationDeployContent.cs | 2 + .../Models/ConfigurationSaveContent.cs | 2 + .../Models/ConnectivityCheckContent.cs | 5 + .../ConnectivityCheckRequestDestination.cs | 2 + ...nnectivityCheckRequestHttpConfiguration.cs | 3 + ...tivityCheckRequestProtocolConfiguration.cs | 1 + .../Models/ConnectivityCheckRequestSource.cs | 2 + .../ConnectivityCheckResult.Serialization.cs | 132 +++ .../Models/ConnectivityCheckResult.cs | 7 + .../Models/ConnectivityHop.Serialization.cs | 154 ++++ .../src/Generated/Models/ConnectivityHop.cs | 6 + .../Models/ConnectivityIssue.Serialization.cs | 111 +++ .../src/Generated/Models/ConnectivityIssue.cs | 4 + ...onnectivityStatusContract.Serialization.cs | 138 +++ .../Models/ConnectivityStatusContract.cs | 7 + .../ContentItemListResult.Serialization.cs | 65 ++ .../ContentTypeListResult.Serialization.cs | 65 ++ .../Models/DataMasking.Serialization.cs | 65 ++ .../src/Generated/Models/DataMasking.cs | 2 + .../Models/DataMaskingEntity.Serialization.cs | 56 ++ .../src/Generated/Models/DataMaskingEntity.cs | 2 + ...DeletedServicesListResult.Serialization.cs | 65 ++ .../DiagnosticListResult.Serialization.cs | 80 ++ ...ocumentationContractPatch.Serialization.cs | 148 +++ .../Models/DocumentationContractPatch.cs | 71 ++ .../DocumentationListResult.Serialization.cs | 212 +++++ .../Models/DocumentationListResult.cs | 70 ++ .../EmailTemplateListResult.Serialization.cs | 80 ++ ...ametersContractProperties.Serialization.cs | 87 ++ ...ailTemplateParametersContractProperties.cs | 3 + .../EndpointDependency.Serialization.cs | 65 ++ .../Generated/Models/EndpointDependency.cs | 2 + .../Models/EndpointDetail.Serialization.cs | 56 ++ .../src/Generated/Models/EndpointDetail.cs | 2 + .../ErrorFieldContract.Serialization.cs | 87 ++ .../Generated/Models/ErrorFieldContract.cs | 3 + .../Models/ErrorResponseBody.Serialization.cs | 88 ++ .../src/Generated/Models/ErrorResponseBody.cs | 3 + .../Models/GatewayApiData.Serialization.cs | 473 ++++++++++ .../src/Generated/Models/GatewayApiData.cs | 21 + ...ficateAuthorityListResult.Serialization.cs | 65 ++ ...meConfigurationListResult.Serialization.cs | 65 ++ .../Models/GatewayKeyRegenerateContent.cs | 1 + .../GatewayKeysContract.Serialization.cs | 64 ++ .../Generated/Models/GatewayKeysContract.cs | 2 + .../Models/GatewayListResult.Serialization.cs | 80 ++ .../GatewayTokenContract.Serialization.cs | 41 + .../Generated/Models/GatewayTokenContract.cs | 1 + .../Models/GatewayTokenRequestContract.cs | 2 + .../GenerateSsoUriResult.Serialization.cs | 41 + .../Generated/Models/GenerateSsoUriResult.cs | 1 + ...erationResultContractData.Serialization.cs | 206 +++++ .../Models/GitOperationResultContractData.cs | 7 + .../GlobalSchemaListResult.Serialization.cs | 80 ++ .../GroupContractProperties.Serialization.cs | 118 +++ .../Models/GroupContractProperties.cs | 5 + .../Models/GroupListResult.Serialization.cs | 80 ++ .../HostnameConfiguration.Serialization.cs | 214 +++++ .../Generated/Models/HostnameConfiguration.cs | 15 +- .../Models/HttpHeaderConfiguration.cs | 2 + .../HttpMessageDiagnostic.Serialization.cs | 88 ++ .../Generated/Models/HttpMessageDiagnostic.cs | 3 + .../IdentityProviderList.Serialization.cs | 80 ++ ...IssueAttachmentListResult.Serialization.cs | 80 ++ .../IssueCommentListResult.Serialization.cs | 80 ++ .../Models/IssueListResult.Serialization.cs | 80 ++ ...tContractCreateProperties.Serialization.cs | 64 ++ .../KeyVaultContractCreateProperties.cs | 2 + ...eyVaultContractProperties.Serialization.cs | 79 ++ .../Models/KeyVaultContractProperties.cs | 1 + ...sStatusContractProperties.Serialization.cs | 80 ++ ...VaultLastAccessStatusContractProperties.cs | 3 + .../Models/LoggerListResult.Serialization.cs | 80 ++ .../NamedValueListResult.Serialization.cs | 80 ++ .../NamedValueSecretContract.Serialization.cs | 41 + .../Models/NamedValueSecretContract.cs | 1 + .../NetworkStatusContract.Serialization.cs | 78 ++ .../Generated/Models/NetworkStatusContract.cs | 2 + ...tatusContractWithLocation.Serialization.cs | 48 + .../NetworkStatusContractWithLocation.cs | 2 + .../NotificationListResult.Serialization.cs | 80 ++ ...nticationSettingsContract.Serialization.cs | 64 ++ .../OAuth2AuthenticationSettingsContract.cs | 2 + .../src/Generated/Models/OAuth2GrantType.cs | 51 ++ ...nticationSettingsContract.Serialization.cs | 65 ++ .../OpenIdAuthenticationSettingsContract.cs | 2 + ...ConnectProviderListResult.Serialization.cs | 80 ++ .../OperationListResult.Serialization.cs | 80 ++ ...tionResultLogItemContract.Serialization.cs | 87 ++ .../Models/OperationResultLogItemContract.cs | 3 + ...tboundEnvironmentEndpoint.Serialization.cs | 65 ++ .../Models/OutboundEnvironmentEndpoint.cs | 2 + ...ndEnvironmentEndpointList.Serialization.cs | 65 ++ .../Models/OutboundEnvironmentEndpointList.cs | 2 + .../Models/ParameterContract.Serialization.cs | 233 +++++ .../src/Generated/Models/ParameterContract.cs | 9 + .../ParameterExampleContract.Serialization.cs | 102 +++ .../Models/ParameterExampleContract.cs | 4 + ...ipelineDiagnosticSettings.Serialization.cs | 48 + .../Models/PipelineDiagnosticSettings.cs | 2 + .../Generated/Models/PolicyContentFormat.cs | 4 +- ...cyDescriptionContractData.Serialization.cs | 112 +++ .../Models/PolicyDescriptionContractData.cs | 2 + ...licyDescriptionListResult.Serialization.cs | 57 ++ .../Models/PolicyDescriptionListResult.cs | 8 +- .../Models/PolicyFragmentContentFormat.cs | 51 ++ .../PolicyFragmentListResult.Serialization.cs | 242 +++++ .../Models/PolicyFragmentListResult.cs | 77 ++ .../Models/PolicyListResult.Serialization.cs | 80 ++ .../src/Generated/Models/PolicyListResult.cs | 3 + ...ortalConfigCorsProperties.Serialization.cs | 191 ++++ .../Models/PortalConfigCorsProperties.cs | 67 ++ ...PortalConfigCspProperties.Serialization.cs | 286 ++++++ .../Models/PortalConfigCspProperties.cs | 78 ++ ...onfigDelegationProperties.Serialization.cs | 255 ++++++ .../PortalConfigDelegationProperties.cs | 81 ++ .../PortalConfigListResult.Serialization.cs | 212 +++++ .../Models/PortalConfigListResult.cs | 72 ++ ...talConfigPropertiesSignin.Serialization.cs | 160 ++++ .../Models/PortalConfigPropertiesSignin.cs | 66 ++ ...talConfigPropertiesSignup.Serialization.cs | 159 ++++ .../Models/PortalConfigPropertiesSignup.cs | 66 ++ ...gTermsOfServiceProperties.Serialization.cs | 194 ++++ .../PortalConfigTermsOfServiceProperties.cs | 71 ++ .../PortalRevisionListResult.Serialization.cs | 65 ++ ...tingValidationKeyContract.Serialization.cs | 41 + .../PortalSettingValidationKeyContract.cs | 1 + ...ortalSettingsContractData.Serialization.cs | 183 ++++ .../Models/PortalSettingsContractData.cs | 6 + .../Generated/Models/PortalSettingsCspMode.cs | 54 ++ .../PortalSettingsListResult.Serialization.cs | 57 ++ .../Models/PortalSettingsListResult.cs | 8 +- ...vateEndpointConnectionRequestProperties.cs | 1 + .../Models/ProductApiData.Serialization.cs | 473 ++++++++++ .../src/Generated/Models/ProductApiData.cs | 21 + ...oductEntityBaseProperties.Serialization.cs | 126 +++ .../Models/ProductEntityBaseProperties.cs | 6 + .../Models/ProductGroupData.Serialization.cs | 174 ++++ .../src/Generated/Models/ProductGroupData.cs | 5 + .../Models/ProductListResult.Serialization.cs | 80 ++ .../QuotaCounterContract.Serialization.cs | 105 +++ .../Generated/Models/QuotaCounterContract.cs | 5 + .../QuotaCounterListResult.Serialization.cs | 80 ++ .../Models/QuotaCounterListResult.cs | 3 + ...erValueContractProperties.Serialization.cs | 48 + .../QuotaCounterValueContractProperties.cs | 2 + .../Models/QuotaCounterValueUpdateContent.cs | 2 + .../RecipientEmailContract.Serialization.cs | 97 ++ .../Models/RecipientEmailContract.cs | 1 + .../RecipientEmailListResult.Serialization.cs | 80 ++ .../Models/RecipientEmailListResult.cs | 3 + .../RecipientUserContract.Serialization.cs | 97 ++ .../Generated/Models/RecipientUserContract.cs | 1 + .../RecipientUserListResult.Serialization.cs | 80 ++ .../Models/RecipientUserListResult.cs | 3 + ...ipientsContractProperties.Serialization.cs | 91 ++ .../Models/RecipientsContractProperties.cs | 2 + .../Models/RegionContract.Serialization.cs | 73 ++ .../src/Generated/Models/RegionContract.cs | 3 + .../Models/RegionListResult.Serialization.cs | 80 ++ ...legationSettingProperties.Serialization.cs | 34 + ...RegistrationDelegationSettingProperties.cs | 1 + ...EndpointConnectionWrapper.Serialization.cs | 154 ++++ .../RemotePrivateEndpointConnectionWrapper.cs | 7 + .../Models/ReportListResult.Serialization.cs | 80 ++ .../ReportRecordContract.Serialization.cs | 489 ++++++++++ .../Generated/Models/ReportRecordContract.cs | 30 +- .../RepresentationContract.Serialization.cs | 135 +++ .../Models/RepresentationContract.cs | 5 + .../Models/RequestContract.Serialization.cs | 111 +++ .../src/Generated/Models/RequestContract.cs | 4 + .../RequestReportListResult.Serialization.cs | 57 ++ ...questReportRecordContract.Serialization.cs | 353 ++++++++ .../Models/RequestReportRecordContract.cs | 18 + .../ResolverContractPatch.Serialization.cs | 159 ++++ .../Generated/Models/ResolverContractPatch.cs | 76 ++ .../ResolverListResult.Serialization.cs | 242 +++++ .../Generated/Models/ResolverListResult.cs | 74 ++ ...sourceCollectionValueItem.Serialization.cs | 231 +++++ .../Models/ResourceCollectionValueItem.cs | 66 ++ .../ResourceListResult.Serialization.cs | 242 +++++ .../Generated/Models/ResourceListResult.cs | 77 ++ ...ourceLocationDataContract.Serialization.cs | 110 +++ .../Models/ResourceLocationDataContract.cs | 4 + .../Models/ResourceSku.Serialization.cs | 33 + .../src/Generated/Models/ResourceSku.cs | 1 + .../ResourceSkuResults.Serialization.cs | 65 ++ .../Models/ResponseContract.Serialization.cs | 100 +++ .../src/Generated/Models/ResponseContract.cs | 4 + .../Models/SamplingSettings.Serialization.cs | 48 + .../src/Generated/Models/SamplingSettings.cs | 2 + .../Models/SchemaListResult.Serialization.cs | 80 ++ ...legationSettingProperties.Serialization.cs | 34 + ...SubscriptionDelegationSettingProperties.cs | 1 + ...KeyParameterNamesContract.Serialization.cs | 64 ++ .../SubscriptionKeyParameterNamesContract.cs | 2 + .../SubscriptionKeysContract.Serialization.cs | 64 ++ .../Models/SubscriptionKeysContract.cs | 2 + .../SubscriptionListResult.Serialization.cs | 80 ++ .../TagDescriptionListResult.Serialization.cs | 80 ++ .../Models/TagListResult.Serialization.cs | 80 ++ ...agResourceContractDetails.Serialization.cs | 78 ++ .../Models/TagResourceContractDetails.cs | 4 + .../TagResourceListResult.Serialization.cs | 80 ++ .../TenantAccessInfoCreateOrUpdateContent.cs | 4 + .../Generated/Models/TenantAccessInfoPatch.cs | 1 + ...tAccessInfoSecretsDetails.Serialization.cs | 126 +++ .../Models/TenantAccessInfoSecretsDetails.cs | 5 + ...gurationSyncStateContract.Serialization.cs | 223 +++++ .../TenantConfigurationSyncStateContract.cs | 8 + .../TenantSettingsListResult.Serialization.cs | 65 ++ .../TermsOfServiceProperties.Serialization.cs | 73 ++ .../Models/TermsOfServiceProperties.cs | 3 + ...okenBodyParameterContract.Serialization.cs | 64 ++ .../Models/TokenBodyParameterContract.cs | 2 + ...TranslateRequiredQueryParametersConduct.cs | 51 ++ .../UserIdentityContract.Serialization.cs | 64 ++ .../Generated/Models/UserIdentityContract.cs | 2 + .../UserIdentityListResult.Serialization.cs | 80 ++ .../Models/UserListResult.Serialization.cs | 80 ++ .../src/Generated/Models/UserTokenContent.cs | 2 + .../Models/UserTokenResult.Serialization.cs | 41 + .../src/Generated/Models/UserTokenResult.cs | 1 + ...rtualNetworkConfiguration.Serialization.cs | 71 ++ .../Models/VirtualNetworkConfiguration.cs | 3 + ...WikiDocumentationContract.Serialization.cs | 163 ++++ .../Models/WikiDocumentationContract.cs | 66 ++ .../WikiUpdateContract.Serialization.cs | 151 ++++ .../Generated/Models/WikiUpdateContract.cs | 67 ++ .../X509CertificateName.Serialization.cs | 64 ++ .../Generated/Models/X509CertificateName.cs | 2 + .../PolicyContractData.Serialization.cs | 112 +++ .../src/Generated/PolicyContractData.cs | 2 + .../PolicyFragmentContractCollection.cs | 508 +++++++++++ ...olicyFragmentContractData.Serialization.cs | 356 ++++++++ .../Generated/PolicyFragmentContractData.cs | 86 ++ ...yFragmentContractResource.Serialization.cs | 26 + .../PolicyFragmentContractResource.cs | 497 ++++++++++ .../PortalConfigContractCollection.cs | 497 ++++++++++ .../PortalConfigContractData.Serialization.cs | 457 ++++++++++ .../src/Generated/PortalConfigContractData.cs | 136 +++ ...talConfigContractResource.Serialization.cs | 26 + .../Generated/PortalConfigContractResource.cs | 333 +++++++ .../Generated/ResolverContractCollection.cs | 505 +++++++++++ .../ResolverContractData.Serialization.cs | 359 ++++++++ .../src/Generated/ResolverContractData.cs | 85 ++ .../ResolverContractResource.Serialization.cs | 26 + .../src/Generated/ResolverContractResource.cs | 492 ++++++++++ .../ApiDiagnosticRestOperations.cs | 58 +- .../ApiIssueAttachmentRestOperations.cs | 50 +- .../ApiIssueCommentRestOperations.cs | 50 +- .../RestOperations/ApiIssueRestOperations.cs | 58 +- .../ApiManagementRestOperations.cs | 10 +- .../ApiManagementServiceRestOperations.cs | 186 ++-- .../ApiManagementServiceSkusRestOperations.cs | 18 +- .../ApiManagementSkusRestOperations.cs | 10 +- .../ApiOperationPolicyRestOperations.cs | 42 +- .../ApiOperationRestOperations.cs | 58 +- .../RestOperations/ApiPolicyRestOperations.cs | 42 +- .../ApiProductRestOperations.cs | 18 +- .../ApiReleaseRestOperations.cs | 58 +- .../RestOperations/ApiRestOperations.cs | 74 +- .../ApiRevisionRestOperations.cs | 18 +- .../RestOperations/ApiSchemaRestOperations.cs | 50 +- .../ApiTagDescriptionRestOperations.cs | 50 +- .../ApiVersionSetRestOperations.cs | 58 +- .../RestOperations/ApiWikiRestOperations.cs | 581 ++++++++++++ ...AuthorizationAccessPolicyRestOperations.cs | 640 +++++++++++++ .../AuthorizationLoginLinksRestOperations.cs | 157 ++++ .../AuthorizationProviderRestOperations.cs | 568 ++++++++++++ .../AuthorizationRestOperations.cs | 712 +++++++++++++++ .../AuthorizationServerRestOperations.cs | 66 +- .../RestOperations/BackendRestOperations.cs | 70 +- .../RestOperations/CacheRestOperations.cs | 58 +- .../CertificateRestOperations.cs | 58 +- .../ContentItemRestOperations.cs | 50 +- .../ContentTypeRestOperations.cs | 42 +- .../DelegationSettingsRestOperations.cs | 42 +- .../DeletedServicesRestOperations.cs | 18 +- .../DiagnosticRestOperations.cs | 58 +- .../DocumentationRestOperations.cs | 785 ++++++++++++++++ .../EmailTemplateRestOperations.cs | 58 +- .../GatewayApiRestOperations.cs | 42 +- ...tewayCertificateAuthorityRestOperations.cs | 50 +- ...ewayHostnameConfigurationRestOperations.cs | 50 +- .../RestOperations/GatewayRestOperations.cs | 82 +- .../GlobalSchemaRestOperations.cs | 50 +- .../GraphQLApiResolverPolicyRestOperations.cs | 728 +++++++++++++++ .../GraphQLApiResolverRestOperations.cs | 837 +++++++++++++++++ .../RestOperations/GroupRestOperations.cs | 58 +- .../RestOperations/GroupUserRestOperations.cs | 42 +- .../IdentityProviderRestOperations.cs | 66 +- .../RestOperations/IssueRestOperations.cs | 26 +- .../RestOperations/LoggerRestOperations.cs | 58 +- .../NamedValueRestOperations.cs | 74 +- .../NetworkStatusRestOperations.cs | 18 +- ...otificationRecipientEmailRestOperations.cs | 34 +- ...NotificationRecipientUserRestOperations.cs | 34 +- .../NotificationRestOperations.cs | 34 +- .../OpenIdConnectProviderRestOperations.cs | 66 +- .../RestOperations/OperationRestOperations.cs | 18 +- ...workDependenciesEndpointsRestOperations.cs | 10 +- .../PolicyDescriptionRestOperations.cs | 10 +- .../PolicyFragmentRestOperations.cs | 718 +++++++++++++++ .../RestOperations/PolicyRestOperations.cs | 42 +- .../PortalConfigRestOperations.cs | 565 ++++++++++++ .../PortalRevisionRestOperations.cs | 50 +- .../PortalSettingsRestOperations.cs | 10 +- ...PrivateEndpointConnectionRestOperations.cs | 50 +- .../ProductApiRestOperations.cs | 42 +- .../ProductGroupRestOperations.cs | 42 +- .../ProductPolicyRestOperations.cs | 42 +- .../RestOperations/ProductRestOperations.cs | 74 +- .../ProductSubscriptionsRestOperations.cs | 18 +- .../ProductWikiRestOperations.cs | 581 ++++++++++++ .../QuotaByCounterKeysRestOperations.cs | 18 +- .../QuotaByPeriodKeysRestOperations.cs | 18 +- .../RestOperations/RegionRestOperations.cs | 18 +- .../RestOperations/ReportsRestOperations.cs | 122 +-- .../SignInSettingsRestOperations.cs | 34 +- .../SignUpSettingsRestOperations.cs | 34 +- .../SubscriptionRestOperations.cs | 82 +- .../TagResourceRestOperations.cs | 18 +- .../RestOperations/TagRestOperations.cs | 202 ++--- .../TenantAccessGitRestOperations.cs | 18 +- .../TenantAccessRestOperations.cs | 74 +- .../TenantConfigurationRestOperations.cs | 34 +- .../TenantSettingsRestOperations.cs | 26 +- .../UserConfirmationPasswordRestOperations.cs | 10 +- .../RestOperations/UserGroupRestOperations.cs | 18 +- .../UserIdentitiesRestOperations.cs | 18 +- .../RestOperations/UserRestOperations.cs | 74 +- .../UserSubscriptionRestOperations.cs | 26 +- .../ServiceApiResolverPolicyCollection.cs | 478 ++++++++++ ...ApiResolverPolicyResource.Serialization.cs | 26 + .../ServiceApiResolverPolicyResource.cs | 440 +++++++++ .../ServiceApiWikiResource.Serialization.cs | 26 + .../src/Generated/ServiceApiWikiResource.cs | 522 +++++++++++ ...erviceProductWikiResource.Serialization.cs | 26 + .../Generated/ServiceProductWikiResource.cs | 522 +++++++++++ .../SubscriptionContractData.Serialization.cs | 323 +++++++ .../src/Generated/SubscriptionContractData.cs | 13 + .../TagContractData.Serialization.cs | 97 ++ .../src/Generated/TagContractData.cs | 1 + .../Generated/TenantAccessInfoCollection.cs | 20 +- .../TenantAccessInfoData.Serialization.cs | 136 +++ .../src/Generated/TenantAccessInfoData.cs | 3 + .../src/Generated/TenantAccessInfoResource.cs | 32 +- .../UserContractData.Serialization.cs | 244 +++++ .../src/Generated/UserContractData.cs | 8 + .../WikiContractData.Serialization.cs | 305 +++++++ .../src/Generated/WikiContractData.cs | 77 ++ .../src/autorest.md | 67 +- 821 files changed, 64073 insertions(+), 3441 deletions(-) create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationAccessPolicyContractCollection.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationAccessPolicyContractResource.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationContractCollection.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationContractResource.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationProviderContractCollection.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationProviderContractResource.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_DocumentationContractCollection.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_DocumentationContractResource.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PolicyFragmentContractCollection.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PolicyFragmentContractResource.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PortalConfigContractCollection.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PortalConfigContractResource.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ResolverContractCollection.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ResolverContractResource.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceApiResolverPolicyCollection.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceApiResolverPolicyResource.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceApiWikiResource.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceProductWikiResource.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractCollection.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractData.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractData.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractResource.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractResource.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractCollection.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractData.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractData.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractResource.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractResource.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractCollection.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractData.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractData.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractResource.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractResource.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractCollection.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractData.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractData.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractResource.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractResource.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Internal/BicepSerializationHelpers.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Internal/WirePathAttribute.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/LongRunningOperation/PolicyFragmentContractOperationSource.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationError.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationError.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationType.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementNatGatewayState.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationAccessPolicyListResult.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationAccessPolicyListResult.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationConfirmConsentCodeContent.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationConfirmConsentCodeContent.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationListResult.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationListResult.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginContent.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginContent.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginResult.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginResult.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderListResult.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderListResult.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2GrantTypes.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2GrantTypes.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2Settings.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2Settings.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationContractPatch.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationContractPatch.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationListResult.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationListResult.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OAuth2GrantType.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyFragmentContentFormat.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyFragmentListResult.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyFragmentListResult.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCorsProperties.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCorsProperties.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCspProperties.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCspProperties.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigDelegationProperties.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigDelegationProperties.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigListResult.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigListResult.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignin.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignin.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignup.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignup.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigTermsOfServiceProperties.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigTermsOfServiceProperties.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsCspMode.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverContractPatch.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverContractPatch.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverListResult.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverListResult.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceCollectionValueItem.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceCollectionValueItem.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceListResult.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceListResult.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TranslateRequiredQueryParametersConduct.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiDocumentationContract.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiDocumentationContract.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiUpdateContract.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiUpdateContract.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractCollection.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractData.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractData.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractResource.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractResource.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractCollection.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractData.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractData.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractResource.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractResource.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractCollection.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractData.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractData.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractResource.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractResource.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiWikiRestOperations.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationAccessPolicyRestOperations.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationLoginLinksRestOperations.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationProviderRestOperations.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationRestOperations.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DocumentationRestOperations.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GraphQLApiResolverPolicyRestOperations.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GraphQLApiResolverRestOperations.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyFragmentRestOperations.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalConfigRestOperations.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductWikiRestOperations.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyCollection.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyResource.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyResource.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiWikiResource.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiWikiResource.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductWikiResource.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductWikiResource.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/WikiContractData.Serialization.cs create mode 100644 sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/WikiContractData.cs diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/CHANGELOG.md b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/CHANGELOG.md index 2b79d09358350..58086577e6a38 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/CHANGELOG.md +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/CHANGELOG.md @@ -1,20 +1,26 @@ # Release History -## 1.2.0-beta.2 (Unreleased) +## 1.2.0 (2024-07-05) ### Features Added -### Breaking Changes +- Upgraded api-version tag from 'package-2021-08' to 'package-2022-08'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/2d973fccf9f28681a481e9760fa12b2334216e21/specification/apimanagement/resource-manager/readme.md. +- Added `ArmOperation.Rehydrate` and `ArmOperation.Rehydrate` static methods to rehydrate a long-running operation. ### Bugs Fixed +- fix bugs caused by applying to the lastest 'require url' for opeartion_Id_:ContentType_CreateOrUpdate and ContentItem_CreateOrUpdate in apimcontenttypes.json + ### Other Changes +- Upgraded Azure.Core from 1.36.0 to 1.40.0 +- Upgraded Azure.ResourceManager from 1.9.0 to 1.12.0 + ## 1.2.0-beta.1 (2024-04-22) ### Features Added -- Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. +- Enabled the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. ### Bugs Fixed @@ -25,11 +31,11 @@ ### Features Added -- Enable mocking for extension methods, refer this [document](https://aka.ms/azsdk/net/mocking) for more details. +- Enabled mocking for extension methods, refer this [document](https://aka.ms/azsdk/net/mocking) for more details. ### Bugs Fixed -- Add property `PrivateUriString` instead of `PrivateUri` in ApiRevisionContract to fix Uri deserialization issue. +- Added property `PrivateUriString` instead of `PrivateUri` in ApiRevisionContract to fix Uri deserialization issue. ### Other Changes @@ -39,7 +45,7 @@ ### Features Added -- Enable the model factory feature for model mocking, more information can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-mocking-factory-builder). +- Enabled the model factory feature for model mocking, more information can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-mocking-factory-builder). ### Other Changes @@ -117,5 +123,4 @@ This package follows the [new Azure SDK guidelines](https://azure.github.io/azur This package is a Public Preview version, so expect incompatible changes in subsequent releases as we improve the product. To provide feedback, submit an issue in our [Azure SDK for .NET GitHub repo](https://github.com/Azure/azure-sdk-for-net/issues). -> NOTE: For more information about unified authentication, please refer to [Microsoft Azure Identity documentation for .NET](https://docs.microsoft.com//dotnet/api/overview/azure/identity-readme?view=azure-dotnet). - +> NOTE: For more information about unified authentication, please refer to [Microsoft Azure Identity documentation for .NET](https://docs.microsoft.com//dotnet/api/overview/azure/identity-readme?view=azure-dotnet). \ No newline at end of file diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/api/Azure.ResourceManager.ApiManagement.netstandard2.0.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/api/Azure.ResourceManager.ApiManagement.netstandard2.0.cs index 50169a25d9ce9..295a457cc1a05 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/api/Azure.ResourceManager.ApiManagement.netstandard2.0.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/api/Azure.ResourceManager.ApiManagement.netstandard2.0.cs @@ -269,6 +269,8 @@ public ApiManagementAuthorizationServerData() { } public string ResourceOwnerUsername { get { throw null; } set { } } public System.Collections.Generic.IList TokenBodyParameters { get { throw null; } } public string TokenEndpoint { get { throw null; } set { } } + public bool? UseInApiDocumentation { get { throw null; } set { } } + public bool? UseInTestConsole { get { throw null; } set { } } Azure.ResourceManager.ApiManagement.ApiManagementAuthorizationServerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ApiManagement.ApiManagementAuthorizationServerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -657,6 +659,16 @@ public static partial class ApiManagementExtensions public static Azure.ResourceManager.ApiManagement.ApiTagDescriptionResource GetApiTagDescriptionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiTagResource GetApiTagResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiVersionSetResource GetApiVersionSetResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.AuthorizationAccessPolicyContractResource GetAuthorizationAccessPolicyContractResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.AuthorizationContractResource GetAuthorizationContractResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.AuthorizationProviderContractResource GetAuthorizationProviderContractResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.DocumentationContractResource GetDocumentationContractResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.PolicyFragmentContractResource GetPolicyFragmentContractResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.PortalConfigContractResource GetPortalConfigContractResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.ResolverContractResource GetResolverContractResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.ServiceApiResolverPolicyResource GetServiceApiResolverPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.ServiceApiWikiResource GetServiceApiWikiResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.ServiceProductWikiResource GetServiceProductWikiResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.TenantAccessInfoResource GetTenantAccessInfoResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } } public partial class ApiManagementGatewayCertificateAuthorityCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable @@ -963,6 +975,7 @@ public ApiManagementIdentityProviderData() { } public System.Collections.Generic.IList AllowedTenants { get { throw null; } } public string Authority { get { throw null; } set { } } public string ClientId { get { throw null; } set { } } + public string ClientLibrary { get { throw null; } set { } } public string ClientSecret { get { throw null; } set { } } public Azure.ResourceManager.ApiManagement.Models.IdentityProviderType? IdentityProviderType { get { throw null; } set { } } public string PasswordResetPolicyName { get { throw null; } set { } } @@ -1224,6 +1237,8 @@ public ApiManagementOpenIdConnectProviderData() { } public string Description { get { throw null; } set { } } public string DisplayName { get { throw null; } set { } } public string MetadataEndpoint { get { throw null; } set { } } + public bool? UseInApiDocumentation { get { throw null; } set { } } + public bool? UseInTestConsole { get { throw null; } set { } } Azure.ResourceManager.ApiManagement.ApiManagementOpenIdConnectProviderData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ApiManagement.ApiManagementOpenIdConnectProviderData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1639,6 +1654,7 @@ protected ApiManagementProductResource() { } public virtual Azure.AsyncPageable GetProductApisAsync(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetProductGroups(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetProductGroupsAsync(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ServiceProductWikiResource GetServiceProductWiki() { throw null; } Azure.ResourceManager.ApiManagement.ApiManagementProductData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ApiManagement.ApiManagementProductData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1719,7 +1735,9 @@ public ApiManagementServiceData(Azure.Core.AzureLocation location, Azure.Resourc public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public System.Uri ManagementApiUri { get { throw null; } } public string MinApiVersion { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.ApiManagementNatGatewayState? NatGatewayState { get { throw null; } set { } } public string NotificationSenderEmail { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList OutboundPublicIPAddresses { get { throw null; } } public Azure.ResourceManager.ApiManagement.Models.PlatformVersion? PlatformVersion { get { throw null; } } public System.Uri PortalUri { get { throw null; } } public System.Collections.Generic.IList PrivateEndpointConnections { get { throw null; } } @@ -1853,6 +1871,9 @@ protected ApiManagementServiceResource() { } public virtual System.Threading.Tasks.Task> GetApiVersionSetAsync(string versionSetId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ApiVersionSetCollection GetApiVersionSets() { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetAuthorizationProviderContract(string authorizationProviderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAuthorizationProviderContractAsync(string authorizationProviderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.AuthorizationProviderContractCollection GetAuthorizationProviderContracts() { throw null; } public virtual Azure.Pageable GetAvailableApiManagementServiceSkus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetAvailableApiManagementServiceSkusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetContentItem(string contentTypeId, string contentItemId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1865,6 +1886,9 @@ protected ApiManagementServiceResource() { } public virtual System.Threading.Tasks.Task> GetContentTypeAsync(string contentTypeId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetContentTypes(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetContentTypesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDocumentationContract(string documentationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDocumentationContractAsync(string documentationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.DocumentationContractCollection GetDocumentationContracts() { throw null; } public virtual Azure.Response GetNetworkStatusByLocation(Azure.Core.AzureLocation locationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetNetworkStatusByLocationAsync(Azure.Core.AzureLocation locationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetNetworkStatuses(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1873,6 +1897,12 @@ protected ApiManagementServiceResource() { } public virtual Azure.AsyncPageable GetOutboundNetworkDependenciesEndpointsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetPolicyDescriptions(Azure.ResourceManager.ApiManagement.Models.PolicyScopeContract? scope = default(Azure.ResourceManager.ApiManagement.Models.PolicyScopeContract?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetPolicyDescriptionsAsync(Azure.ResourceManager.ApiManagement.Models.PolicyScopeContract? scope = default(Azure.ResourceManager.ApiManagement.Models.PolicyScopeContract?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetPolicyFragmentContract(string id, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetPolicyFragmentContractAsync(string id, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.PolicyFragmentContractCollection GetPolicyFragmentContracts() { throw null; } + public virtual Azure.Response GetPortalConfigContract(string portalConfigId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetPortalConfigContractAsync(string portalConfigId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.PortalConfigContractCollection GetPortalConfigContracts() { throw null; } public virtual Azure.Pageable GetPortalSettings(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetPortalSettingsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetProductsByTags(string filter = null, int? top = default(int?), int? skip = default(int?), bool? includeNotTaggedProducts = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1908,6 +1938,8 @@ protected ApiManagementServiceResource() { } public virtual Azure.ResourceManager.ApiManagement.TenantAccessInfoCollection GetTenantAccessInfos() { throw null; } public virtual Azure.Response GetTenantConfigurationSyncState(Azure.ResourceManager.ApiManagement.Models.ConfigurationName configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetTenantConfigurationSyncStateAsync(Azure.ResourceManager.ApiManagement.Models.ConfigurationName configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation MigrateToStv2(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> MigrateToStv2Async(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation PerformConnectivityCheckAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.Models.ConnectivityCheckContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> PerformConnectivityCheckAsyncAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.Models.ConnectivityCheckContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -2404,6 +2436,10 @@ protected ApiResource() { } public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetOperationsByTags(string filter = null, int? top = default(int?), int? skip = default(int?), bool? includeNotTaggedOperations = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetOperationsByTagsAsync(string filter = null, int? top = default(int?), int? skip = default(int?), bool? includeNotTaggedOperations = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetResolverContract(string resolverId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetResolverContractAsync(string resolverId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ResolverContractCollection GetResolverContracts() { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ServiceApiWikiResource GetServiceApiWiki() { throw null; } Azure.ResourceManager.ApiManagement.ApiData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ApiManagement.ApiData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2605,6 +2641,161 @@ protected ApiVersionSetResource() { } public virtual Azure.Response Update(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class AuthorizationAccessPolicyContractCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected AuthorizationAccessPolicyContractCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string authorizationAccessPolicyId, Azure.ResourceManager.ApiManagement.AuthorizationAccessPolicyContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string authorizationAccessPolicyId, Azure.ResourceManager.ApiManagement.AuthorizationAccessPolicyContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string authorizationAccessPolicyId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string authorizationAccessPolicyId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string authorizationAccessPolicyId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string authorizationAccessPolicyId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string authorizationAccessPolicyId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string authorizationAccessPolicyId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class AuthorizationAccessPolicyContractData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AuthorizationAccessPolicyContractData() { } + public string ObjectId { get { throw null; } set { } } + public System.Guid? TenantId { get { throw null; } set { } } + Azure.ResourceManager.ApiManagement.AuthorizationAccessPolicyContractData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.AuthorizationAccessPolicyContractData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AuthorizationAccessPolicyContractResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected AuthorizationAccessPolicyContractResource() { } + public virtual Azure.ResourceManager.ApiManagement.AuthorizationAccessPolicyContractData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ApiManagement.AuthorizationAccessPolicyContractData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.AuthorizationAccessPolicyContractData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.AuthorizationAccessPolicyContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.AuthorizationAccessPolicyContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class AuthorizationContractCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected AuthorizationContractCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string authorizationId, Azure.ResourceManager.ApiManagement.AuthorizationContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string authorizationId, Azure.ResourceManager.ApiManagement.AuthorizationContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string authorizationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string authorizationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string authorizationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string authorizationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string authorizationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string authorizationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class AuthorizationContractData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AuthorizationContractData() { } + public Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationType? AuthorizationType { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationError Error { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.OAuth2GrantType? OAuth2GrantType { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Parameters { get { throw null; } } + public string Status { get { throw null; } set { } } + Azure.ResourceManager.ApiManagement.AuthorizationContractData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.AuthorizationContractData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AuthorizationContractResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected AuthorizationContractResource() { } + public virtual Azure.ResourceManager.ApiManagement.AuthorizationContractData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response ConfirmConsentCode(Azure.ResourceManager.ApiManagement.Models.AuthorizationConfirmConsentCodeContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ConfirmConsentCodeAsync(Azure.ResourceManager.ApiManagement.Models.AuthorizationConfirmConsentCodeContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetAuthorizationAccessPolicyContract(string authorizationAccessPolicyId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAuthorizationAccessPolicyContractAsync(string authorizationAccessPolicyId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.AuthorizationAccessPolicyContractCollection GetAuthorizationAccessPolicyContracts() { throw null; } + public virtual Azure.Response PostAuthorizationLoginLink(Azure.ResourceManager.ApiManagement.Models.AuthorizationLoginContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> PostAuthorizationLoginLinkAsync(Azure.ResourceManager.ApiManagement.Models.AuthorizationLoginContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ApiManagement.AuthorizationContractData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.AuthorizationContractData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.AuthorizationContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.AuthorizationContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class AuthorizationProviderContractCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected AuthorizationProviderContractCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string authorizationProviderId, Azure.ResourceManager.ApiManagement.AuthorizationProviderContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string authorizationProviderId, Azure.ResourceManager.ApiManagement.AuthorizationProviderContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string authorizationProviderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string authorizationProviderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string authorizationProviderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string authorizationProviderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string authorizationProviderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string authorizationProviderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class AuthorizationProviderContractData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AuthorizationProviderContractData() { } + public string DisplayName { get { throw null; } set { } } + public string IdentityProvider { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.AuthorizationProviderOAuth2Settings Oauth2 { get { throw null; } set { } } + Azure.ResourceManager.ApiManagement.AuthorizationProviderContractData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.AuthorizationProviderContractData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AuthorizationProviderContractResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected AuthorizationProviderContractResource() { } + public virtual Azure.ResourceManager.ApiManagement.AuthorizationProviderContractData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetAuthorizationContract(string authorizationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAuthorizationContractAsync(string authorizationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.AuthorizationContractCollection GetAuthorizationContracts() { throw null; } + Azure.ResourceManager.ApiManagement.AuthorizationProviderContractData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.AuthorizationProviderContractData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.AuthorizationProviderContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.AuthorizationProviderContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class DiagnosticContractData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DiagnosticContractData() { } @@ -2624,6 +2815,55 @@ public DiagnosticContractData() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class DocumentationContractCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DocumentationContractCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string documentationId, Azure.ResourceManager.ApiManagement.DocumentationContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string documentationId, Azure.ResourceManager.ApiManagement.DocumentationContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string documentationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string documentationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string documentationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string documentationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string documentationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string documentationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DocumentationContractData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DocumentationContractData() { } + public string Content { get { throw null; } set { } } + public string Title { get { throw null; } set { } } + Azure.ResourceManager.ApiManagement.DocumentationContractData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.DocumentationContractData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DocumentationContractResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DocumentationContractResource() { } + public virtual Azure.ResourceManager.ApiManagement.DocumentationContractData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string documentationId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetEntityTag(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ApiManagement.DocumentationContractData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.DocumentationContractData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.DocumentationContractPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.DocumentationContractPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class IssueContractData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public IssueContractData() { } @@ -2650,6 +2890,246 @@ public PolicyContractData() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class PolicyFragmentContractCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected PolicyFragmentContractCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string id, Azure.ResourceManager.ApiManagement.PolicyFragmentContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string id, Azure.ResourceManager.ApiManagement.PolicyFragmentContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string id, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string id, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string id, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string filter = null, string orderBy = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string filter = null, string orderBy = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string id, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string id, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string id, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class PolicyFragmentContractData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PolicyFragmentContractData() { } + public string Description { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? Format { get { throw null; } set { } } + public string Value { get { throw null; } set { } } + Azure.ResourceManager.ApiManagement.PolicyFragmentContractData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.PolicyFragmentContractData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PolicyFragmentContractResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected PolicyFragmentContractResource() { } + public virtual Azure.ResourceManager.ApiManagement.PolicyFragmentContractData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string id) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetEntityTag(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetReferences(int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetReferencesAsync(int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ApiManagement.PolicyFragmentContractData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.PolicyFragmentContractData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.PolicyFragmentContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.PolicyFragmentContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class PortalConfigContractCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected PortalConfigContractCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string portalConfigId, Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.PortalConfigContractData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string portalConfigId, Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.PortalConfigContractData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string portalConfigId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string portalConfigId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string portalConfigId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string portalConfigId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string portalConfigId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string portalConfigId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class PortalConfigContractData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PortalConfigContractData() { } + public System.Collections.Generic.IList CorsAllowedOrigins { get { throw null; } } + public Azure.ResourceManager.ApiManagement.Models.PortalConfigCspProperties Csp { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.PortalConfigDelegationProperties Delegation { get { throw null; } set { } } + public bool? EnableBasicAuth { get { throw null; } set { } } + public bool? Require { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.PortalConfigTermsOfServiceProperties SignupTermsOfService { get { throw null; } set { } } + Azure.ResourceManager.ApiManagement.PortalConfigContractData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.PortalConfigContractData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PortalConfigContractResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected PortalConfigContractResource() { } + public virtual Azure.ResourceManager.ApiManagement.PortalConfigContractData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetEntityTag(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ApiManagement.PortalConfigContractData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.PortalConfigContractData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.PortalConfigContractData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.PortalConfigContractData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ResolverContractCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ResolverContractCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string resolverId, Azure.ResourceManager.ApiManagement.ResolverContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string resolverId, Azure.ResourceManager.ApiManagement.ResolverContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string resolverId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string resolverId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string resolverId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string filter = null, int? top = default(int?), int? skip = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string resolverId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string resolverId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string resolverId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ResolverContractData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResolverContractData() { } + public string Description { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } + public string Path { get { throw null; } set { } } + Azure.ResourceManager.ApiManagement.ResolverContractData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.ResolverContractData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ResolverContractResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ResolverContractResource() { } + public virtual Azure.ResourceManager.ApiManagement.ResolverContractData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetEntityTag(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ServiceApiResolverPolicyCollection GetServiceApiResolverPolicies() { throw null; } + public virtual Azure.Response GetServiceApiResolverPolicy(Azure.ResourceManager.ApiManagement.Models.PolicyName policyId, Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetServiceApiResolverPolicyAsync(Azure.ResourceManager.ApiManagement.Models.PolicyName policyId, Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ApiManagement.ResolverContractData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.ResolverContractData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.ResolverContractPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.ResolverContractPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ServiceApiResolverPolicyCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ServiceApiResolverPolicyCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.Models.PolicyName policyId, Azure.ResourceManager.ApiManagement.PolicyContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.Models.PolicyName policyId, Azure.ResourceManager.ApiManagement.PolicyContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(Azure.ResourceManager.ApiManagement.Models.PolicyName policyId, Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(Azure.ResourceManager.ApiManagement.Models.PolicyName policyId, Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(Azure.ResourceManager.ApiManagement.Models.PolicyName policyId, Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(Azure.ResourceManager.ApiManagement.Models.PolicyName policyId, Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(Azure.ResourceManager.ApiManagement.Models.PolicyName policyId, Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(Azure.ResourceManager.ApiManagement.Models.PolicyName policyId, Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ServiceApiResolverPolicyResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ServiceApiResolverPolicyResource() { } + public virtual Azure.ResourceManager.ApiManagement.PolicyContractData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, Azure.ResourceManager.ApiManagement.Models.PolicyName policyId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyExportFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetEntityTag(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ApiManagement.PolicyContractData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.PolicyContractData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.PolicyContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.PolicyContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ServiceApiWikiResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ServiceApiWikiResource() { } + public virtual Azure.ResourceManager.ApiManagement.WikiContractData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.WikiContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.WikiContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string apiId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetEntityTag(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ApiManagement.WikiContractData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.WikiContractData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.WikiUpdateContract wikiUpdateContract, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.WikiUpdateContract wikiUpdateContract, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ServiceProductWikiResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ServiceProductWikiResource() { } + public virtual Azure.ResourceManager.ApiManagement.WikiContractData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.WikiContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.WikiContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string productId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetEntityTag(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ApiManagement.WikiContractData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.WikiContractData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.WikiUpdateContract wikiUpdateContract, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.WikiUpdateContract wikiUpdateContract, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class SubscriptionContractData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SubscriptionContractData() { } @@ -2757,6 +3237,16 @@ public UserContractData() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class WikiContractData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WikiContractData() { } + public System.Collections.Generic.IList Documents { get { throw null; } } + Azure.ResourceManager.ApiManagement.WikiContractData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.WikiContractData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } } namespace Azure.ResourceManager.ApiManagement.Mocking { @@ -2811,6 +3301,16 @@ protected MockableApiManagementArmClient() { } public virtual Azure.ResourceManager.ApiManagement.ApiTagDescriptionResource GetApiTagDescriptionResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ApiTagResource GetApiTagResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ApiVersionSetResource GetApiVersionSetResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.AuthorizationAccessPolicyContractResource GetAuthorizationAccessPolicyContractResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.AuthorizationContractResource GetAuthorizationContractResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.AuthorizationProviderContractResource GetAuthorizationProviderContractResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.DocumentationContractResource GetDocumentationContractResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.PolicyFragmentContractResource GetPolicyFragmentContractResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.PortalConfigContractResource GetPortalConfigContractResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ResolverContractResource GetResolverContractResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ServiceApiResolverPolicyResource GetServiceApiResolverPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ServiceApiWikiResource GetServiceApiWikiResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ServiceProductWikiResource GetServiceProductWikiResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.TenantAccessInfoResource GetTenantAccessInfoResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableApiManagementResourceGroupResource : Azure.ResourceManager.ArmResource @@ -2864,6 +3364,8 @@ public AdditionalLocation(Azure.Core.AzureLocation location, Azure.ResourceManag public bool? DisableGateway { get { throw null; } set { } } public System.Uri GatewayRegionalUri { get { throw null; } } public Azure.Core.AzureLocation Location { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.ApiManagementNatGatewayState? NatGatewayState { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList OutboundPublicIPAddresses { get { throw null; } } public Azure.ResourceManager.ApiManagement.Models.PlatformVersion? PlatformVersion { get { throw null; } } public System.Collections.Generic.IReadOnlyList PrivateIPAddresses { get { throw null; } } public System.Collections.Generic.IReadOnlyList PublicIPAddresses { get { throw null; } } @@ -2936,6 +3438,7 @@ public ApiCreateOrUpdateContent() { } public string TermsOfServiceLink { get { throw null; } set { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.Uri TermsOfServiceUri { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct? TranslateRequiredQueryParametersConduct { get { throw null; } set { } } public string Value { get { throw null; } set { } } public Azure.ResourceManager.ApiManagement.Models.ApiCreateOrUpdatePropertiesWsdlSelector WsdlSelector { get { throw null; } set { } } Azure.ResourceManager.ApiManagement.Models.ApiCreateOrUpdateContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3007,6 +3510,17 @@ public ApiLicenseInformation() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ApiManagementAuthorizationError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ApiManagementAuthorizationError() { } + public string Code { get { throw null; } set { } } + public string Message { get { throw null; } set { } } + Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationError System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ApiManagementAuthorizationServerPatch : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ApiManagementAuthorizationServerPatch() { } @@ -3026,12 +3540,31 @@ public ApiManagementAuthorizationServerPatch() { } public string ResourceOwnerUsername { get { throw null; } set { } } public System.Collections.Generic.IList TokenBodyParameters { get { throw null; } } public string TokenEndpoint { get { throw null; } set { } } + public bool? UseInApiDocumentation { get { throw null; } set { } } + public bool? UseInTestConsole { get { throw null; } set { } } Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationServerPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationServerPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ApiManagementAuthorizationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ApiManagementAuthorizationType(string value) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationType OAuth2 { get { throw null; } } + public bool Equals(Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationType 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.ApiManagement.Models.ApiManagementAuthorizationType left, Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationType right) { throw null; } + public static implicit operator Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationType left, Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationType right) { throw null; } + public override string ToString() { throw null; } + } public partial class ApiManagementBackendPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ApiManagementBackendPatch() { } @@ -3174,6 +3707,7 @@ public ApiManagementIdentityProviderCreateOrUpdateContent() { } public System.Collections.Generic.IList AllowedTenants { get { throw null; } } public string Authority { get { throw null; } set { } } public string ClientId { get { throw null; } set { } } + public string ClientLibrary { get { throw null; } set { } } public string ClientSecret { get { throw null; } set { } } public Azure.ResourceManager.ApiManagement.Models.IdentityProviderType? IdentityProviderType { get { throw null; } set { } } public string PasswordResetPolicyName { get { throw null; } set { } } @@ -3193,6 +3727,7 @@ public ApiManagementIdentityProviderPatch() { } public System.Collections.Generic.IList AllowedTenants { get { throw null; } } public string Authority { get { throw null; } set { } } public string ClientId { get { throw null; } set { } } + public string ClientLibrary { get { throw null; } set { } } public string ClientSecret { get { throw null; } set { } } public Azure.ResourceManager.ApiManagement.Models.IdentityProviderType? IdentityProviderType { get { throw null; } set { } } public string PasswordResetPolicyName { get { throw null; } set { } } @@ -3247,6 +3782,24 @@ public ApiManagementNamedValuePatch() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ApiManagementNatGatewayState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ApiManagementNatGatewayState(string value) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.ApiManagementNatGatewayState Disabled { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.ApiManagementNatGatewayState Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.ApiManagement.Models.ApiManagementNatGatewayState 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.ApiManagement.Models.ApiManagementNatGatewayState left, Azure.ResourceManager.ApiManagement.Models.ApiManagementNatGatewayState right) { throw null; } + public static implicit operator Azure.ResourceManager.ApiManagement.Models.ApiManagementNatGatewayState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.ApiManagementNatGatewayState left, Azure.ResourceManager.ApiManagement.Models.ApiManagementNatGatewayState right) { throw null; } + public override string ToString() { throw null; } + } public partial class ApiManagementOpenIdConnectProviderPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ApiManagementOpenIdConnectProviderPatch() { } @@ -3255,6 +3808,8 @@ public ApiManagementOpenIdConnectProviderPatch() { } public string Description { get { throw null; } set { } } public string DisplayName { get { throw null; } set { } } public string MetadataEndpoint { get { throw null; } set { } } + public bool? UseInApiDocumentation { get { throw null; } set { } } + public bool? UseInTestConsole { get { throw null; } set { } } Azure.ResourceManager.ApiManagement.Models.ApiManagementOpenIdConnectProviderPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ApiManagement.Models.ApiManagementOpenIdConnectProviderPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3466,7 +4021,9 @@ public ApiManagementServicePatch() { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public System.Uri ManagementApiUri { get { throw null; } } public string MinApiVersion { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.ApiManagementNatGatewayState? NatGatewayState { get { throw null; } set { } } public string NotificationSenderEmail { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList OutboundPublicIPAddresses { get { throw null; } } public Azure.ResourceManager.ApiManagement.Models.PlatformVersion? PlatformVersion { get { throw null; } } public System.Uri PortalUri { get { throw null; } } public System.Collections.Generic.IList PrivateEndpointConnections { get { throw null; } } @@ -3931,8 +4488,10 @@ public ApiVersionSetPatch() { } } public static partial class ArmApiManagementModelFactory { - public static Azure.ResourceManager.ApiManagement.Models.AdditionalLocation AdditionalLocation(Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuProperties sku = null, System.Collections.Generic.IEnumerable zones = null, System.Collections.Generic.IEnumerable publicIPAddresses = null, System.Collections.Generic.IEnumerable privateIPAddresses = null, Azure.Core.ResourceIdentifier publicIPAddressId = null, Azure.ResourceManager.ApiManagement.Models.VirtualNetworkConfiguration virtualNetworkConfiguration = null, System.Uri gatewayRegionalUri = null, bool? disableGateway = default(bool?), Azure.ResourceManager.ApiManagement.Models.PlatformVersion? platformVersion = default(Azure.ResourceManager.ApiManagement.Models.PlatformVersion?)) { throw null; } - public static Azure.ResourceManager.ApiManagement.Models.ApiCreateOrUpdateContent ApiCreateOrUpdateContent(string description = null, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings = null, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType = default(Azure.ResourceManager.ApiManagement.Models.ApiType?), string apiRevision = null, string apiVersion = null, bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = null, string apiVersionDescription = null, Azure.Core.ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = default(bool?), string termsOfServiceLink = null, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact = null, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license = null, Azure.Core.ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, System.Collections.Generic.IEnumerable protocols = null, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet = null, string value = null, Azure.ResourceManager.ApiManagement.Models.ContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.ContentFormat?), Azure.ResourceManager.ApiManagement.Models.ApiCreateOrUpdatePropertiesWsdlSelector wsdlSelector = null, Azure.ResourceManager.ApiManagement.Models.SoapApiType? soapApiType = default(Azure.ResourceManager.ApiManagement.Models.SoapApiType?)) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.AdditionalLocation AdditionalLocation(Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuProperties sku = null, System.Collections.Generic.IEnumerable zones = null, System.Collections.Generic.IEnumerable publicIPAddresses = null, System.Collections.Generic.IEnumerable privateIPAddresses = null, Azure.Core.ResourceIdentifier publicIPAddressId = null, Azure.ResourceManager.ApiManagement.Models.VirtualNetworkConfiguration virtualNetworkConfiguration = null, System.Uri gatewayRegionalUri = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementNatGatewayState? natGatewayState = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementNatGatewayState?), System.Collections.Generic.IEnumerable outboundPublicIPAddresses = null, bool? disableGateway = default(bool?), Azure.ResourceManager.ApiManagement.Models.PlatformVersion? platformVersion = default(Azure.ResourceManager.ApiManagement.Models.PlatformVersion?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ApiManagement.Models.AdditionalLocation AdditionalLocation(Azure.Core.AzureLocation location, Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuProperties sku, System.Collections.Generic.IEnumerable zones, System.Collections.Generic.IEnumerable publicIPAddresses, System.Collections.Generic.IEnumerable privateIPAddresses, Azure.Core.ResourceIdentifier publicIPAddressId, Azure.ResourceManager.ApiManagement.Models.VirtualNetworkConfiguration virtualNetworkConfiguration, System.Uri gatewayRegionalUri, bool? disableGateway, Azure.ResourceManager.ApiManagement.Models.PlatformVersion? platformVersion) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.ApiCreateOrUpdateContent ApiCreateOrUpdateContent(string description = null, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings = null, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType = default(Azure.ResourceManager.ApiManagement.Models.ApiType?), string apiRevision = null, string apiVersion = null, bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = null, string apiVersionDescription = null, Azure.Core.ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = default(bool?), string termsOfServiceLink = null, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact = null, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license = null, Azure.Core.ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, System.Collections.Generic.IEnumerable protocols = null, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet = null, string value = null, Azure.ResourceManager.ApiManagement.Models.ContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.ContentFormat?), Azure.ResourceManager.ApiManagement.Models.ApiCreateOrUpdatePropertiesWsdlSelector wsdlSelector = null, Azure.ResourceManager.ApiManagement.Models.SoapApiType? soapApiType = default(Azure.ResourceManager.ApiManagement.Models.SoapApiType?), Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct? translateRequiredQueryParametersConduct = default(Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ApiManagement.Models.ApiCreateOrUpdateContent ApiCreateOrUpdateContent(string description, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, Azure.Core.ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, System.Uri termsOfServiceUri, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license, Azure.Core.ResourceIdentifier sourceApiId, string displayName, System.Uri serviceUri, string path = null, System.Collections.Generic.IEnumerable protocols = null, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet = null, string value = null, Azure.ResourceManager.ApiManagement.Models.ContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.ContentFormat?), Azure.ResourceManager.ApiManagement.Models.ApiCreateOrUpdatePropertiesWsdlSelector wsdlSelector = null, Azure.ResourceManager.ApiManagement.Models.SoapApiType? soapApiType = default(Azure.ResourceManager.ApiManagement.Models.SoapApiType?)) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiData ApiData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings = null, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType = default(Azure.ResourceManager.ApiManagement.Models.ApiType?), string apiRevision = null, string apiVersion = null, bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = null, string apiVersionDescription = null, Azure.Core.ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = default(bool?), string termsOfServiceLink = null, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact = null, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license = null, Azure.Core.ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, System.Collections.Generic.IEnumerable protocols = null, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet = null) { throw null; } @@ -3943,8 +4502,12 @@ public static partial class ArmApiManagementModelFactory public static Azure.ResourceManager.ApiManagement.Models.ApiEntityBaseContract ApiEntityBaseContract(string description, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, Azure.Core.ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, System.Uri termsOfServiceUri, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact = null, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiIssueAttachmentData ApiIssueAttachmentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string title = null, string contentFormat = null, string content = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiIssueCommentData ApiIssueCommentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string text = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier userId = null) { throw null; } - public static Azure.ResourceManager.ApiManagement.ApiManagementAuthorizationServerData ApiManagementAuthorizationServerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, System.Collections.Generic.IEnumerable authorizationMethods = null, System.Collections.Generic.IEnumerable clientAuthenticationMethods = null, System.Collections.Generic.IEnumerable tokenBodyParameters = null, string tokenEndpoint = null, bool? doesSupportState = default(bool?), string defaultScope = null, System.Collections.Generic.IEnumerable bearerTokenSendingMethods = null, string resourceOwnerUsername = null, string resourceOwnerPassword = null, string displayName = null, string clientRegistrationEndpoint = null, string authorizationEndpoint = null, System.Collections.Generic.IEnumerable grantTypes = null, string clientId = null, string clientSecret = null) { throw null; } - public static Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationServerPatch ApiManagementAuthorizationServerPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, System.Collections.Generic.IEnumerable authorizationMethods = null, System.Collections.Generic.IEnumerable clientAuthenticationMethods = null, System.Collections.Generic.IEnumerable tokenBodyParameters = null, string tokenEndpoint = null, bool? doesSupportState = default(bool?), string defaultScope = null, System.Collections.Generic.IEnumerable bearerTokenSendingMethods = null, string resourceOwnerUsername = null, string resourceOwnerPassword = null, string displayName = null, string clientRegistrationEndpoint = null, string authorizationEndpoint = null, System.Collections.Generic.IEnumerable grantTypes = null, string clientId = null, string clientSecret = null) { throw null; } + public static Azure.ResourceManager.ApiManagement.ApiManagementAuthorizationServerData ApiManagementAuthorizationServerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, System.Collections.Generic.IEnumerable authorizationMethods = null, System.Collections.Generic.IEnumerable clientAuthenticationMethods = null, System.Collections.Generic.IEnumerable tokenBodyParameters = null, string tokenEndpoint = null, bool? doesSupportState = default(bool?), string defaultScope = null, System.Collections.Generic.IEnumerable bearerTokenSendingMethods = null, string resourceOwnerUsername = null, string resourceOwnerPassword = null, string displayName = null, bool? useInTestConsole = default(bool?), bool? useInApiDocumentation = default(bool?), string clientRegistrationEndpoint = null, string authorizationEndpoint = null, System.Collections.Generic.IEnumerable grantTypes = null, string clientId = null, string clientSecret = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ApiManagement.ApiManagementAuthorizationServerData ApiManagementAuthorizationServerData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string description, System.Collections.Generic.IEnumerable authorizationMethods, System.Collections.Generic.IEnumerable clientAuthenticationMethods, System.Collections.Generic.IEnumerable tokenBodyParameters, string tokenEndpoint, bool? doesSupportState, string defaultScope, System.Collections.Generic.IEnumerable bearerTokenSendingMethods, string resourceOwnerUsername, string resourceOwnerPassword, string displayName, string clientRegistrationEndpoint, string authorizationEndpoint, System.Collections.Generic.IEnumerable grantTypes, string clientId, string clientSecret) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationServerPatch ApiManagementAuthorizationServerPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, System.Collections.Generic.IEnumerable authorizationMethods = null, System.Collections.Generic.IEnumerable clientAuthenticationMethods = null, System.Collections.Generic.IEnumerable tokenBodyParameters = null, string tokenEndpoint = null, bool? doesSupportState = default(bool?), string defaultScope = null, System.Collections.Generic.IEnumerable bearerTokenSendingMethods = null, string resourceOwnerUsername = null, string resourceOwnerPassword = null, string displayName = null, bool? useInTestConsole = default(bool?), bool? useInApiDocumentation = default(bool?), string clientRegistrationEndpoint = null, string authorizationEndpoint = null, System.Collections.Generic.IEnumerable grantTypes = null, string clientId = null, string clientSecret = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationServerPatch ApiManagementAuthorizationServerPatch(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string description, System.Collections.Generic.IEnumerable authorizationMethods, System.Collections.Generic.IEnumerable clientAuthenticationMethods, System.Collections.Generic.IEnumerable tokenBodyParameters, string tokenEndpoint, bool? doesSupportState, string defaultScope, System.Collections.Generic.IEnumerable bearerTokenSendingMethods, string resourceOwnerUsername, string resourceOwnerPassword, string displayName, string clientRegistrationEndpoint, string authorizationEndpoint, System.Collections.Generic.IEnumerable grantTypes, string clientId, string clientSecret) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementBackendData ApiManagementBackendData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string title = null, string description = null, System.Uri resourceUri = null, Azure.ResourceManager.ApiManagement.Models.BackendServiceFabricClusterProperties backendServiceFabricCluster = null, Azure.ResourceManager.ApiManagement.Models.BackendCredentialsContract credentials = null, Azure.ResourceManager.ApiManagement.Models.BackendProxyContract proxy = null, Azure.ResourceManager.ApiManagement.Models.BackendTlsProperties tls = null, System.Uri uri = null, Azure.ResourceManager.ApiManagement.Models.BackendProtocol? protocol = default(Azure.ResourceManager.ApiManagement.Models.BackendProtocol?)) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementCacheData ApiManagementCacheData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, string connectionString = null, string useFromLocation = null, System.Uri resourceUri = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementCertificateData ApiManagementCertificateData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string subject = null, string thumbprint = null, System.DateTimeOffset? expireOn = default(System.DateTimeOffset?), Azure.ResourceManager.ApiManagement.Models.KeyVaultContractProperties keyVaultDetails = null) { throw null; } @@ -3956,13 +4519,19 @@ public static partial class ArmApiManagementModelFactory public static Azure.ResourceManager.ApiManagement.ApiManagementGlobalSchemaData ApiManagementGlobalSchemaData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.ApiSchemaType? schemaType = default(Azure.ResourceManager.ApiManagement.Models.ApiSchemaType?), string description = null, System.BinaryData value = null, System.BinaryData document = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementGroupData ApiManagementGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string displayName = null, string description = null, bool? isBuiltIn = default(bool?), Azure.ResourceManager.ApiManagement.Models.ApiManagementGroupType? groupType = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementGroupType?), string externalId = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementGroupUserData ApiManagementGroupUserData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementUserState? state = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementUserState?), string note = null, System.Collections.Generic.IEnumerable identities = null, string firstName = null, string lastName = null, string email = null, System.DateTimeOffset? registriesOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable groups = null) { throw null; } - public static Azure.ResourceManager.ApiManagement.Models.ApiManagementIdentityProviderCreateOrUpdateContent ApiManagementIdentityProviderCreateOrUpdateContent(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.IdentityProviderType? identityProviderType = default(Azure.ResourceManager.ApiManagement.Models.IdentityProviderType?), string signInTenant = null, System.Collections.Generic.IEnumerable allowedTenants = null, string authority = null, string signUpPolicyName = null, string signInPolicyName = null, string profileEditingPolicyName = null, string passwordResetPolicyName = null, string clientId = null, string clientSecret = null) { throw null; } - public static Azure.ResourceManager.ApiManagement.ApiManagementIdentityProviderData ApiManagementIdentityProviderData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.IdentityProviderType? identityProviderType = default(Azure.ResourceManager.ApiManagement.Models.IdentityProviderType?), string signInTenant = null, System.Collections.Generic.IEnumerable allowedTenants = null, string authority = null, string signUpPolicyName = null, string signInPolicyName = null, string profileEditingPolicyName = null, string passwordResetPolicyName = null, string clientId = null, string clientSecret = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ApiManagement.Models.ApiManagementIdentityProviderCreateOrUpdateContent ApiManagementIdentityProviderCreateOrUpdateContent(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.ApiManagement.Models.IdentityProviderType? identityProviderType, string signInTenant, System.Collections.Generic.IEnumerable allowedTenants, string authority, string signUpPolicyName, string signInPolicyName, string profileEditingPolicyName, string passwordResetPolicyName, string clientId, string clientSecret) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.ApiManagementIdentityProviderCreateOrUpdateContent ApiManagementIdentityProviderCreateOrUpdateContent(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.IdentityProviderType? identityProviderType = default(Azure.ResourceManager.ApiManagement.Models.IdentityProviderType?), string signInTenant = null, System.Collections.Generic.IEnumerable allowedTenants = null, string authority = null, string signUpPolicyName = null, string signInPolicyName = null, string profileEditingPolicyName = null, string passwordResetPolicyName = null, string clientLibrary = null, string clientId = null, string clientSecret = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ApiManagement.ApiManagementIdentityProviderData ApiManagementIdentityProviderData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.ApiManagement.Models.IdentityProviderType? identityProviderType, string signInTenant, System.Collections.Generic.IEnumerable allowedTenants, string authority, string signUpPolicyName, string signInPolicyName, string profileEditingPolicyName, string passwordResetPolicyName, string clientId, string clientSecret) { throw null; } + public static Azure.ResourceManager.ApiManagement.ApiManagementIdentityProviderData ApiManagementIdentityProviderData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.IdentityProviderType? identityProviderType = default(Azure.ResourceManager.ApiManagement.Models.IdentityProviderType?), string signInTenant = null, System.Collections.Generic.IEnumerable allowedTenants = null, string authority = null, string signUpPolicyName = null, string signInPolicyName = null, string profileEditingPolicyName = null, string passwordResetPolicyName = null, string clientLibrary = null, string clientId = null, string clientSecret = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementLoggerData ApiManagementLoggerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.LoggerType? loggerType = default(Azure.ResourceManager.ApiManagement.Models.LoggerType?), string description = null, System.Collections.Generic.IDictionary credentials = null, bool? isBuffered = default(bool?), Azure.Core.ResourceIdentifier resourceId = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementNamedValueCreateOrUpdateContent ApiManagementNamedValueCreateOrUpdateContent(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.IEnumerable tags = null, bool? isSecret = default(bool?), string displayName = null, string value = null, Azure.ResourceManager.ApiManagement.Models.KeyVaultContractCreateProperties keyVault = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementNamedValueData ApiManagementNamedValueData(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.IEnumerable tags = null, bool? isSecret = default(bool?), string displayName = null, string value = null, Azure.ResourceManager.ApiManagement.Models.KeyVaultContractProperties keyVaultDetails = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementNotificationData ApiManagementNotificationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string title = null, string description = null, Azure.ResourceManager.ApiManagement.Models.RecipientsContractProperties recipients = null) { throw null; } - public static Azure.ResourceManager.ApiManagement.ApiManagementOpenIdConnectProviderData ApiManagementOpenIdConnectProviderData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string displayName = null, string description = null, string metadataEndpoint = null, string clientId = null, string clientSecret = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ApiManagement.ApiManagementOpenIdConnectProviderData ApiManagementOpenIdConnectProviderData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string displayName, string description, string metadataEndpoint, string clientId, string clientSecret) { throw null; } + public static Azure.ResourceManager.ApiManagement.ApiManagementOpenIdConnectProviderData ApiManagementOpenIdConnectProviderData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string displayName = null, string description = null, string metadataEndpoint = null, string clientId = null, string clientSecret = null, bool? useInTestConsole = default(bool?), bool? useInApiDocumentation = default(bool?)) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementPortalDelegationSettingData ApiManagementPortalDelegationSettingData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Uri uri = null, string validationKey = null, bool? isSubscriptionDelegationEnabled = default(bool?), bool? isUserRegistrationDelegationEnabled = default(bool?)) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementPortalRevisionData ApiManagementPortalRevisionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, string statusDetails = null, Azure.ResourceManager.ApiManagement.Models.PortalRevisionStatus? status = default(Azure.ResourceManager.ApiManagement.Models.PortalRevisionStatus?), bool? isCurrent = default(bool?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? updatedOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementPortalSignInSettingData ApiManagementPortalSignInSettingData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? isRedirectEnabled = default(bool?)) { throw null; } @@ -3972,11 +4541,15 @@ public static partial class ArmApiManagementModelFactory public static Azure.ResourceManager.ApiManagement.ApiManagementProductData ApiManagementProductData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, string terms = null, bool? isSubscriptionRequired = default(bool?), bool? isApprovalRequired = default(bool?), int? subscriptionsLimit = default(int?), Azure.ResourceManager.ApiManagement.Models.ApiManagementProductState? state = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementProductState?), string displayName = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementResourceSkuCapacity ApiManagementResourceSkuCapacity(int? minimum = default(int?), int? maximum = default(int?), int? @default = default(int?), Azure.ResourceManager.ApiManagement.Models.ApiManagementResourceSkuCapacityScaleType? scaleType = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementResourceSkuCapacityScaleType?)) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceBackupRestoreContent ApiManagementServiceBackupRestoreContent(string storageAccount = null, string containerName = null, string backupName = null, Azure.ResourceManager.ApiManagement.Models.StorageAccountAccessType? accessType = default(Azure.ResourceManager.ApiManagement.Models.StorageAccountAccessType?), string accessKey = null, string clientId = null) { throw null; } - public static Azure.ResourceManager.ApiManagement.ApiManagementServiceData ApiManagementServiceData(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 tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuProperties sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable zones = null, string notificationSenderEmail = null, string provisioningState = null, string targetProvisioningState = null, System.DateTimeOffset? createdAtUtc = default(System.DateTimeOffset?), System.Uri gatewayUri = null, System.Uri gatewayRegionalUri = null, System.Uri portalUri = null, System.Uri managementApiUri = null, System.Uri scmUri = null, System.Uri developerPortalUri = null, System.Collections.Generic.IEnumerable hostnameConfigurations = null, System.Collections.Generic.IEnumerable publicIPAddresses = null, System.Collections.Generic.IEnumerable privateIPAddresses = null, Azure.Core.ResourceIdentifier publicIPAddressId = null, Azure.ResourceManager.ApiManagement.Models.PublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.ApiManagement.Models.PublicNetworkAccess?), Azure.ResourceManager.ApiManagement.Models.VirtualNetworkConfiguration virtualNetworkConfiguration = null, System.Collections.Generic.IEnumerable additionalLocations = null, System.Collections.Generic.IDictionary customProperties = null, System.Collections.Generic.IEnumerable certificates = null, bool? enableClientCertificate = default(bool?), bool? disableGateway = default(bool?), Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType? virtualNetworkType = default(Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType?), string minApiVersion = null, bool? restore = default(bool?), System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.ApiManagement.Models.PlatformVersion? platformVersion = default(Azure.ResourceManager.ApiManagement.Models.PlatformVersion?), string publisherEmail = null, string publisherName = null) { throw null; } + public static Azure.ResourceManager.ApiManagement.ApiManagementServiceData ApiManagementServiceData(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 tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuProperties sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable zones = null, string notificationSenderEmail = null, string provisioningState = null, string targetProvisioningState = null, System.DateTimeOffset? createdAtUtc = default(System.DateTimeOffset?), System.Uri gatewayUri = null, System.Uri gatewayRegionalUri = null, System.Uri portalUri = null, System.Uri managementApiUri = null, System.Uri scmUri = null, System.Uri developerPortalUri = null, System.Collections.Generic.IEnumerable hostnameConfigurations = null, System.Collections.Generic.IEnumerable publicIPAddresses = null, System.Collections.Generic.IEnumerable privateIPAddresses = null, Azure.Core.ResourceIdentifier publicIPAddressId = null, Azure.ResourceManager.ApiManagement.Models.PublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.ApiManagement.Models.PublicNetworkAccess?), Azure.ResourceManager.ApiManagement.Models.VirtualNetworkConfiguration virtualNetworkConfiguration = null, System.Collections.Generic.IEnumerable additionalLocations = null, System.Collections.Generic.IDictionary customProperties = null, System.Collections.Generic.IEnumerable certificates = null, bool? enableClientCertificate = default(bool?), Azure.ResourceManager.ApiManagement.Models.ApiManagementNatGatewayState? natGatewayState = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementNatGatewayState?), System.Collections.Generic.IEnumerable outboundPublicIPAddresses = null, bool? disableGateway = default(bool?), Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType? virtualNetworkType = default(Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType?), string minApiVersion = null, bool? restore = default(bool?), System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.ApiManagement.Models.PlatformVersion? platformVersion = default(Azure.ResourceManager.ApiManagement.Models.PlatformVersion?), string publisherEmail = null, string publisherName = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ApiManagement.ApiManagementServiceData ApiManagementServiceData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuProperties sku, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ETag? etag, System.Collections.Generic.IEnumerable zones, string notificationSenderEmail, string provisioningState, string targetProvisioningState, System.DateTimeOffset? createdAtUtc, System.Uri gatewayUri, System.Uri gatewayRegionalUri, System.Uri portalUri, System.Uri managementApiUri, System.Uri scmUri, System.Uri developerPortalUri, System.Collections.Generic.IEnumerable hostnameConfigurations, System.Collections.Generic.IEnumerable publicIPAddresses, System.Collections.Generic.IEnumerable privateIPAddresses, Azure.Core.ResourceIdentifier publicIPAddressId, Azure.ResourceManager.ApiManagement.Models.PublicNetworkAccess? publicNetworkAccess, Azure.ResourceManager.ApiManagement.Models.VirtualNetworkConfiguration virtualNetworkConfiguration, System.Collections.Generic.IEnumerable additionalLocations, System.Collections.Generic.IDictionary customProperties, System.Collections.Generic.IEnumerable certificates, bool? enableClientCertificate, bool? disableGateway, Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType? virtualNetworkType, string minApiVersion, bool? restore, System.Collections.Generic.IEnumerable privateEndpointConnections, Azure.ResourceManager.ApiManagement.Models.PlatformVersion? platformVersion, string publisherEmail, string publisherName) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceGetDomainOwnershipIdentifierResult ApiManagementServiceGetDomainOwnershipIdentifierResult(string domainOwnershipIdentifier = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceGetSsoTokenResult ApiManagementServiceGetSsoTokenResult(System.Uri redirectUri = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceNameAvailabilityResult ApiManagementServiceNameAvailabilityResult(bool? isNameAvailable = default(bool?), string message = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceNameUnavailableReason? reason = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceNameUnavailableReason?)) { throw null; } - public static Azure.ResourceManager.ApiManagement.Models.ApiManagementServicePatch ApiManagementServicePatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuProperties sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable zones = null, string notificationSenderEmail = null, string provisioningState = null, string targetProvisioningState = null, System.DateTimeOffset? createdAtUtc = default(System.DateTimeOffset?), System.Uri gatewayUri = null, System.Uri gatewayRegionalUri = null, System.Uri portalUri = null, System.Uri managementApiUri = null, System.Uri scmUri = null, System.Uri developerPortalUri = null, System.Collections.Generic.IEnumerable hostnameConfigurations = null, System.Collections.Generic.IEnumerable publicIPAddresses = null, System.Collections.Generic.IEnumerable privateIPAddresses = null, Azure.Core.ResourceIdentifier publicIPAddressId = null, Azure.ResourceManager.ApiManagement.Models.PublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.ApiManagement.Models.PublicNetworkAccess?), Azure.ResourceManager.ApiManagement.Models.VirtualNetworkConfiguration virtualNetworkConfiguration = null, System.Collections.Generic.IEnumerable additionalLocations = null, System.Collections.Generic.IDictionary customProperties = null, System.Collections.Generic.IEnumerable certificates = null, bool? enableClientCertificate = default(bool?), bool? disableGateway = default(bool?), Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType? virtualNetworkType = default(Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType?), string minApiVersion = null, bool? restore = default(bool?), System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.ApiManagement.Models.PlatformVersion? platformVersion = default(Azure.ResourceManager.ApiManagement.Models.PlatformVersion?), string publisherEmail = null, string publisherName = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.ApiManagementServicePatch ApiManagementServicePatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuProperties sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable zones = null, string notificationSenderEmail = null, string provisioningState = null, string targetProvisioningState = null, System.DateTimeOffset? createdAtUtc = default(System.DateTimeOffset?), System.Uri gatewayUri = null, System.Uri gatewayRegionalUri = null, System.Uri portalUri = null, System.Uri managementApiUri = null, System.Uri scmUri = null, System.Uri developerPortalUri = null, System.Collections.Generic.IEnumerable hostnameConfigurations = null, System.Collections.Generic.IEnumerable publicIPAddresses = null, System.Collections.Generic.IEnumerable privateIPAddresses = null, Azure.Core.ResourceIdentifier publicIPAddressId = null, Azure.ResourceManager.ApiManagement.Models.PublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.ApiManagement.Models.PublicNetworkAccess?), Azure.ResourceManager.ApiManagement.Models.VirtualNetworkConfiguration virtualNetworkConfiguration = null, System.Collections.Generic.IEnumerable additionalLocations = null, System.Collections.Generic.IDictionary customProperties = null, System.Collections.Generic.IEnumerable certificates = null, bool? enableClientCertificate = default(bool?), Azure.ResourceManager.ApiManagement.Models.ApiManagementNatGatewayState? natGatewayState = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementNatGatewayState?), System.Collections.Generic.IEnumerable outboundPublicIPAddresses = null, bool? disableGateway = default(bool?), Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType? virtualNetworkType = default(Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType?), string minApiVersion = null, bool? restore = default(bool?), System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.ApiManagement.Models.PlatformVersion? platformVersion = default(Azure.ResourceManager.ApiManagement.Models.PlatformVersion?), string publisherEmail = null, string publisherName = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ApiManagement.Models.ApiManagementServicePatch ApiManagementServicePatch(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuProperties sku, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ETag? etag, System.Collections.Generic.IEnumerable zones, string notificationSenderEmail, string provisioningState, string targetProvisioningState, System.DateTimeOffset? createdAtUtc, System.Uri gatewayUri, System.Uri gatewayRegionalUri, System.Uri portalUri, System.Uri managementApiUri, System.Uri scmUri, System.Uri developerPortalUri, System.Collections.Generic.IEnumerable hostnameConfigurations, System.Collections.Generic.IEnumerable publicIPAddresses, System.Collections.Generic.IEnumerable privateIPAddresses, Azure.Core.ResourceIdentifier publicIPAddressId, Azure.ResourceManager.ApiManagement.Models.PublicNetworkAccess? publicNetworkAccess, Azure.ResourceManager.ApiManagement.Models.VirtualNetworkConfiguration virtualNetworkConfiguration, System.Collections.Generic.IEnumerable additionalLocations, System.Collections.Generic.IDictionary customProperties, System.Collections.Generic.IEnumerable certificates, bool? enableClientCertificate, bool? disableGateway, Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType? virtualNetworkType, string minApiVersion, bool? restore, System.Collections.Generic.IEnumerable privateEndpointConnections, Azure.ResourceManager.ApiManagement.Models.PlatformVersion? platformVersion, string publisherEmail, string publisherName, System.Collections.Generic.IDictionary tags) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementSku ApiManagementSku(string resourceType = null, string name = null, string tier = null, string size = null, string family = null, string kind = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementSkuCapacity capacity = null, System.Collections.Generic.IEnumerable locations = null, System.Collections.Generic.IEnumerable locationInfo = null, System.Collections.Generic.IEnumerable apiVersions = null, System.Collections.Generic.IEnumerable costs = null, System.Collections.Generic.IEnumerable capabilities = null, System.Collections.Generic.IEnumerable restrictions = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementSkuCapabilities ApiManagementSkuCapabilities(string name = null, string value = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementSkuCapacity ApiManagementSkuCapacity(int? minimum = default(int?), int? maximum = default(int?), int? @default = default(int?), Azure.ResourceManager.ApiManagement.Models.ApiManagementSkuCapacityScaleType? scaleType = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementSkuCapacityScaleType?)) { throw null; } @@ -4002,6 +4575,10 @@ public static partial class ArmApiManagementModelFactory public static Azure.ResourceManager.ApiManagement.Models.AssociatedProductProperties AssociatedProductProperties(string description = null, string terms = null, bool? isSubscriptionRequired = default(bool?), bool? isApprovalRequired = default(bool?), int? subscriptionsLimit = default(int?), Azure.ResourceManager.ApiManagement.Models.ApiManagementProductState? state = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementProductState?), string id = null, string name = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.AssociatedTagProperties AssociatedTagProperties(string id = null, string name = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.AssociationContract AssociationContract(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.AssociationEntityProvisioningState? provisioningState = default(Azure.ResourceManager.ApiManagement.Models.AssociationEntityProvisioningState?)) { throw null; } + public static Azure.ResourceManager.ApiManagement.AuthorizationAccessPolicyContractData AuthorizationAccessPolicyContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Guid? tenantId = default(System.Guid?), string objectId = null) { throw null; } + public static Azure.ResourceManager.ApiManagement.AuthorizationContractData AuthorizationContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationType? authorizationType = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationType?), Azure.ResourceManager.ApiManagement.Models.OAuth2GrantType? oAuth2GrantType = default(Azure.ResourceManager.ApiManagement.Models.OAuth2GrantType?), System.Collections.Generic.IDictionary parameters = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationError error = null, string status = null) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.AuthorizationLoginResult AuthorizationLoginResult(string loginLink = null) { throw null; } + public static Azure.ResourceManager.ApiManagement.AuthorizationProviderContractData AuthorizationProviderContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string displayName = null, string identityProvider = null, Azure.ResourceManager.ApiManagement.Models.AuthorizationProviderOAuth2Settings oauth2 = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.AuthorizationServerSecretsContract AuthorizationServerSecretsContract(string clientSecret = null, string resourceOwnerUsername = null, string resourceOwnerPassword = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.AvailableApiManagementServiceSkuResult AvailableApiManagementServiceSkuResult(Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuType? skuName = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuType?), Azure.ResourceManager.ApiManagement.Models.ApiManagementResourceSkuCapacity capacity = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.BackendReconnectContract BackendReconnectContract(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.TimeSpan? after = default(System.TimeSpan?)) { throw null; } @@ -4013,6 +4590,7 @@ public static partial class ArmApiManagementModelFactory public static Azure.ResourceManager.ApiManagement.Models.ConnectivityIssue ConnectivityIssue(Azure.ResourceManager.ApiManagement.Models.IssueOrigin? origin = default(Azure.ResourceManager.ApiManagement.Models.IssueOrigin?), Azure.ResourceManager.ApiManagement.Models.IssueSeverity? severity = default(Azure.ResourceManager.ApiManagement.Models.IssueSeverity?), Azure.ResourceManager.ApiManagement.Models.IssueType? issueType = default(Azure.ResourceManager.ApiManagement.Models.IssueType?), System.Collections.Generic.IEnumerable> context = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ConnectivityStatusContract ConnectivityStatusContract(string name = null, Azure.ResourceManager.ApiManagement.Models.ConnectivityStatusType status = default(Azure.ResourceManager.ApiManagement.Models.ConnectivityStatusType), string error = null, System.DateTimeOffset lastUpdatedOn = default(System.DateTimeOffset), System.DateTimeOffset lastStatusChangedOn = default(System.DateTimeOffset), string resourceType = null, bool isOptional = false) { throw null; } public static Azure.ResourceManager.ApiManagement.DiagnosticContractData DiagnosticContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.AlwaysLog? alwaysLog = default(Azure.ResourceManager.ApiManagement.Models.AlwaysLog?), string loggerId = null, Azure.ResourceManager.ApiManagement.Models.SamplingSettings sampling = null, Azure.ResourceManager.ApiManagement.Models.PipelineDiagnosticSettings frontend = null, Azure.ResourceManager.ApiManagement.Models.PipelineDiagnosticSettings backend = null, bool? isLogClientIPEnabled = default(bool?), Azure.ResourceManager.ApiManagement.Models.HttpCorrelationProtocol? httpCorrelationProtocol = default(Azure.ResourceManager.ApiManagement.Models.HttpCorrelationProtocol?), Azure.ResourceManager.ApiManagement.Models.TraceVerbosityLevel? verbosity = default(Azure.ResourceManager.ApiManagement.Models.TraceVerbosityLevel?), Azure.ResourceManager.ApiManagement.Models.OperationNameFormat? operationNameFormat = default(Azure.ResourceManager.ApiManagement.Models.OperationNameFormat?), bool? metrics = default(bool?)) { throw null; } + public static Azure.ResourceManager.ApiManagement.DocumentationContractData DocumentationContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string title = null, string content = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.EndpointDependency EndpointDependency(string domainName = null, System.Collections.Generic.IEnumerable endpointDetails = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.EndpointDetail EndpointDetail(int? port = default(int?), string region = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.GatewayApiData GatewayApiData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings = null, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType = default(Azure.ResourceManager.ApiManagement.Models.ApiType?), string apiRevision = null, string apiVersion = null, bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = null, string apiVersionDescription = null, Azure.Core.ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = default(bool?), string termsOfServiceLink = null, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact = null, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license = null, Azure.Core.ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, System.Collections.Generic.IEnumerable protocols = null, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet = null) { throw null; } @@ -4031,6 +4609,8 @@ public static partial class ArmApiManagementModelFactory public static Azure.ResourceManager.ApiManagement.Models.OutboundEnvironmentEndpoint OutboundEnvironmentEndpoint(string category = null, System.Collections.Generic.IEnumerable endpoints = null) { throw null; } public static Azure.ResourceManager.ApiManagement.PolicyContractData PolicyContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string value = null, Azure.ResourceManager.ApiManagement.Models.PolicyContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyContentFormat?)) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.PolicyDescriptionContractData PolicyDescriptionContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, long? scope = default(long?)) { throw null; } + public static Azure.ResourceManager.ApiManagement.PolicyFragmentContractData PolicyFragmentContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string value = null, string description = null, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?)) { throw null; } + public static Azure.ResourceManager.ApiManagement.PortalConfigContractData PortalConfigContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? enableBasicAuth = default(bool?), bool? require = default(bool?), Azure.ResourceManager.ApiManagement.Models.PortalConfigTermsOfServiceProperties signupTermsOfService = null, Azure.ResourceManager.ApiManagement.Models.PortalConfigDelegationProperties delegation = null, System.Collections.Generic.IEnumerable corsAllowedOrigins = null, Azure.ResourceManager.ApiManagement.Models.PortalConfigCspProperties csp = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.PortalSettingsContractData PortalSettingsContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Uri uri = null, string validationKey = null, bool? isSubscriptionDelegationEnabled = default(bool?), bool? isUserRegistrationDelegationEnabled = default(bool?), bool? isRedirectEnabled = default(bool?), Azure.ResourceManager.ApiManagement.Models.TermsOfServiceProperties termsOfService = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.PortalSettingValidationKeyContract PortalSettingValidationKeyContract(string validationKey = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ProductApiData ProductApiData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings = null, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType = default(Azure.ResourceManager.ApiManagement.Models.ApiType?), string apiRevision = null, string apiVersion = null, bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = null, string apiVersionDescription = null, Azure.Core.ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = default(bool?), string termsOfServiceLink = null, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact = null, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license = null, Azure.Core.ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, System.Collections.Generic.IEnumerable protocols = null, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet = null) { throw null; } @@ -4046,6 +4626,8 @@ public static partial class ArmApiManagementModelFactory public static Azure.ResourceManager.ApiManagement.Models.RemotePrivateEndpointConnectionWrapper RemotePrivateEndpointConnectionWrapper(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementPrivateLinkServiceConnectionState privateLinkServiceConnectionState = null, string provisioningState = null, System.Collections.Generic.IEnumerable groupIds = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ReportRecordContract ReportRecordContract(string name = null, System.DateTimeOffset? timestamp = default(System.DateTimeOffset?), string interval = null, string country = null, string region = null, string zip = null, string userId = null, string productId = null, string apiId = null, string operationId = null, string apiRegion = null, Azure.Core.ResourceIdentifier subscriptionResourceId = null, int? callCountSuccess = default(int?), int? callCountBlocked = default(int?), int? callCountFailed = default(int?), int? callCountOther = default(int?), int? callCountTotal = default(int?), long? bandwidth = default(long?), int? cacheHitCount = default(int?), int? cacheMissCount = default(int?), double? apiTimeAvg = default(double?), double? apiTimeMin = default(double?), double? apiTimeMax = default(double?), double? serviceTimeAvg = default(double?), double? serviceTimeMin = default(double?), double? serviceTimeMax = default(double?)) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.RequestReportRecordContract RequestReportRecordContract(string apiId = null, string operationId = null, string productId = null, string userId = null, Azure.Core.RequestMethod? method = default(Azure.Core.RequestMethod?), System.Uri uri = null, System.Net.IPAddress ipAddress = null, string backendResponseCode = null, int? responseCode = default(int?), int? responseSize = default(int?), System.DateTimeOffset? timestamp = default(System.DateTimeOffset?), string cache = null, double? apiTime = default(double?), double? serviceTime = default(double?), string apiRegion = null, Azure.Core.ResourceIdentifier subscriptionResourceId = null, string requestId = null, int? requestSize = default(int?)) { throw null; } + public static Azure.ResourceManager.ApiManagement.ResolverContractData ResolverContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string displayName = null, string path = null, string description = null) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.ResourceCollectionValueItem ResourceCollectionValueItem(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null) { throw null; } public static Azure.ResourceManager.ApiManagement.SubscriptionContractData SubscriptionContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string ownerId = null, string scope = null, string displayName = null, Azure.ResourceManager.ApiManagement.Models.SubscriptionState? state = default(Azure.ResourceManager.ApiManagement.Models.SubscriptionState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? expireOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), System.DateTimeOffset? notifiesOn = default(System.DateTimeOffset?), string primaryKey = null, string secondaryKey = null, string stateComment = null, bool? allowTracing = default(bool?)) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.SubscriptionKeysContract SubscriptionKeysContract(string primaryKey = null, string secondaryKey = null) { throw null; } public static Azure.ResourceManager.ApiManagement.TagContractData TagContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string displayName = null) { throw null; } @@ -4056,6 +4638,7 @@ public static partial class ArmApiManagementModelFactory public static Azure.ResourceManager.ApiManagement.UserContractData UserContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementUserState? state = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementUserState?), string note = null, System.Collections.Generic.IEnumerable identities = null, string firstName = null, string lastName = null, string email = null, System.DateTimeOffset? registriesOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable groups = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.UserTokenResult UserTokenResult(string value = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.VirtualNetworkConfiguration VirtualNetworkConfiguration(System.Guid? vnetId = default(System.Guid?), string subnetname = null, Azure.Core.ResourceIdentifier subnetResourceId = null) { throw null; } + public static Azure.ResourceManager.ApiManagement.WikiContractData WikiContractData(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.IEnumerable documents = null) { throw null; } } public partial class AssociatedApiProperties : Azure.ResourceManager.ApiManagement.Models.ApiEntityBaseContract, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -4148,13 +4731,45 @@ public partial class AuthenticationSettingsContract : System.ClientModel.Primiti { public AuthenticationSettingsContract() { } public Azure.ResourceManager.ApiManagement.Models.OAuth2AuthenticationSettingsContract OAuth2 { get { throw null; } set { } } + public System.Collections.Generic.IList OAuth2AuthenticationSettings { get { throw null; } } public Azure.ResourceManager.ApiManagement.Models.OpenIdAuthenticationSettingsContract OpenId { get { throw null; } set { } } + public System.Collections.Generic.IList OpenidAuthenticationSettings { get { throw null; } } Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class AuthorizationConfirmConsentCodeContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AuthorizationConfirmConsentCodeContent() { } + public string ConsentCode { get { throw null; } set { } } + Azure.ResourceManager.ApiManagement.Models.AuthorizationConfirmConsentCodeContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.AuthorizationConfirmConsentCodeContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AuthorizationLoginContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AuthorizationLoginContent() { } + public System.Uri PostLoginRedirectUri { get { throw null; } set { } } + Azure.ResourceManager.ApiManagement.Models.AuthorizationLoginContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.AuthorizationLoginContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AuthorizationLoginResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AuthorizationLoginResult() { } + public string LoginLink { get { throw null; } } + Azure.ResourceManager.ApiManagement.Models.AuthorizationLoginResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.AuthorizationLoginResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public enum AuthorizationMethod { Head = 0, @@ -4166,6 +4781,28 @@ public enum AuthorizationMethod Patch = 6, Delete = 7, } + public partial class AuthorizationProviderOAuth2GrantTypes : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AuthorizationProviderOAuth2GrantTypes() { } + public System.Collections.Generic.IDictionary AuthorizationCode { get { throw null; } } + public System.Collections.Generic.IDictionary ClientCredentials { get { throw null; } } + Azure.ResourceManager.ApiManagement.Models.AuthorizationProviderOAuth2GrantTypes System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.AuthorizationProviderOAuth2GrantTypes System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AuthorizationProviderOAuth2Settings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AuthorizationProviderOAuth2Settings() { } + public Azure.ResourceManager.ApiManagement.Models.AuthorizationProviderOAuth2GrantTypes GrantTypes { get { throw null; } set { } } + public System.Uri RedirectUri { get { throw null; } set { } } + Azure.ResourceManager.ApiManagement.Models.AuthorizationProviderOAuth2Settings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.AuthorizationProviderOAuth2Settings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class AuthorizationServerSecretsContract : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AuthorizationServerSecretsContract() { } @@ -4699,6 +5336,17 @@ public DataMaskingEntity() { } public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.DataMaskingMode left, Azure.ResourceManager.ApiManagement.Models.DataMaskingMode right) { throw null; } public override string ToString() { throw null; } } + public partial class DocumentationContractPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DocumentationContractPatch() { } + public string Content { get { throw null; } set { } } + public string Title { get { throw null; } set { } } + Azure.ResourceManager.ApiManagement.Models.DocumentationContractPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.DocumentationContractPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class EmailTemplateParametersContractProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public EmailTemplateParametersContractProperties() { } @@ -5222,6 +5870,24 @@ public OAuth2AuthenticationSettingsContract() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct OAuth2GrantType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public OAuth2GrantType(string value) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.OAuth2GrantType AuthorizationCode { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.OAuth2GrantType ClientCredentials { get { throw null; } } + public bool Equals(Azure.ResourceManager.ApiManagement.Models.OAuth2GrantType 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.ApiManagement.Models.OAuth2GrantType left, Azure.ResourceManager.ApiManagement.Models.OAuth2GrantType right) { throw null; } + public static implicit operator Azure.ResourceManager.ApiManagement.Models.OAuth2GrantType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.OAuth2GrantType left, Azure.ResourceManager.ApiManagement.Models.OAuth2GrantType right) { throw null; } + public override string ToString() { throw null; } + } public partial class OpenIdAuthenticationSettingsContract : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public OpenIdAuthenticationSettingsContract() { } @@ -5386,6 +6052,24 @@ public PolicyDescriptionContractData() { } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PolicyFragmentContentFormat : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PolicyFragmentContentFormat(string value) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat Rawxml { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat Xml { get { throw null; } } + public bool Equals(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat 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.ApiManagement.Models.PolicyFragmentContentFormat left, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat right) { throw null; } + public static implicit operator Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat left, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct PolicyName : System.IEquatable { private readonly object _dummy; @@ -5410,6 +6094,42 @@ public enum PolicyScopeContract Operation = 3, All = 4, } + public partial class PortalConfigCspProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PortalConfigCspProperties() { } + public System.Collections.Generic.IList AllowedSources { get { throw null; } } + public Azure.ResourceManager.ApiManagement.Models.PortalSettingsCspMode? Mode { get { throw null; } set { } } + public System.Collections.Generic.IList ReportUri { get { throw null; } } + Azure.ResourceManager.ApiManagement.Models.PortalConfigCspProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.PortalConfigCspProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PortalConfigDelegationProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PortalConfigDelegationProperties() { } + public bool? DelegateRegistration { get { throw null; } set { } } + public bool? DelegateSubscription { get { throw null; } set { } } + public System.Uri DelegationUri { get { throw null; } set { } } + public string ValidationKey { get { throw null; } set { } } + Azure.ResourceManager.ApiManagement.Models.PortalConfigDelegationProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.PortalConfigDelegationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PortalConfigTermsOfServiceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PortalConfigTermsOfServiceProperties() { } + public bool? RequireConsent { get { throw null; } set { } } + public string Text { get { throw null; } set { } } + Azure.ResourceManager.ApiManagement.Models.PortalConfigTermsOfServiceProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.PortalConfigTermsOfServiceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct PortalRevisionStatus : System.IEquatable { @@ -5445,6 +6165,25 @@ public PortalSettingsContractData() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PortalSettingsCspMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PortalSettingsCspMode(string value) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.PortalSettingsCspMode Disabled { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.PortalSettingsCspMode Enabled { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.PortalSettingsCspMode ReportOnly { get { throw null; } } + public bool Equals(Azure.ResourceManager.ApiManagement.Models.PortalSettingsCspMode 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.ApiManagement.Models.PortalSettingsCspMode left, Azure.ResourceManager.ApiManagement.Models.PortalSettingsCspMode right) { throw null; } + public static implicit operator Azure.ResourceManager.ApiManagement.Models.PortalSettingsCspMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.PortalSettingsCspMode left, Azure.ResourceManager.ApiManagement.Models.PortalSettingsCspMode right) { throw null; } + public override string ToString() { throw null; } + } public partial class PortalSettingValidationKeyContract : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal PortalSettingValidationKeyContract() { } @@ -5737,6 +6476,27 @@ internal RequestReportRecordContract() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ResolverContractPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResolverContractPatch() { } + public string Description { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } + public string Path { get { throw null; } set { } } + Azure.ResourceManager.ApiManagement.Models.ResolverContractPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.ResolverContractPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ResourceCollectionValueItem : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ResourceCollectionValueItem() { } + Azure.ResourceManager.ApiManagement.Models.ResourceCollectionValueItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.ResourceCollectionValueItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ResourceLocationDataContract : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ResourceLocationDataContract(string name) { } @@ -6022,6 +6782,24 @@ public enum TokenGenerationUsedKeyType public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.TraceVerbosityLevel left, Azure.ResourceManager.ApiManagement.Models.TraceVerbosityLevel right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct TranslateRequiredQueryParametersConduct : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public TranslateRequiredQueryParametersConduct(string value) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct Query { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct Template { get { throw null; } } + public bool Equals(Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct 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.ApiManagement.Models.TranslateRequiredQueryParametersConduct left, Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct right) { throw null; } + public static implicit operator Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct left, Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct right) { throw null; } + public override string ToString() { throw null; } + } public partial class UserIdentityContract : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public UserIdentityContract() { } @@ -6104,6 +6882,26 @@ public VirtualNetworkConfiguration() { } public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType left, Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType right) { throw null; } public override string ToString() { throw null; } } + public partial class WikiDocumentationContract : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WikiDocumentationContract() { } + public string DocumentationId { get { throw null; } set { } } + Azure.ResourceManager.ApiManagement.Models.WikiDocumentationContract System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.WikiDocumentationContract System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WikiUpdateContract : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WikiUpdateContract() { } + public System.Collections.Generic.IList Documents { get { throw null; } } + Azure.ResourceManager.ApiManagement.Models.WikiUpdateContract System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.WikiUpdateContract System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class X509CertificateName : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public X509CertificateName() { } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiCollection.cs index 3c4f8170e63cf..c372da0248211 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListApis() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApis.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApis.json // this example is just showing the usage of "Api_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ApiManagementListApis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiContract() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiContract.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiContract.json // this example is just showing the usage of "Api_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetApiContract() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetApiContract() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiContract.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiContract.json // this example is just showing the usage of "Api_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetApiContract() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetApiContract() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiContract.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiContract.json // this example is just showing the usage of "Api_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_ApiManagementGetApiContract() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiRevisionContract() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiRevision.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiRevision.json // this example is just showing the usage of "Api_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -201,7 +201,7 @@ public async Task Get_ApiManagementGetApiRevisionContract() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetApiRevisionContract() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiRevision.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiRevision.json // this example is just showing the usage of "Api_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -232,7 +232,7 @@ public async Task Exists_ApiManagementGetApiRevisionContract() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetApiRevisionContract() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiRevision.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiRevision.json // this example is just showing the usage of "Api_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -275,7 +275,7 @@ public async Task GetIfExists_ApiManagementGetApiRevisionContract() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApi.json // this example is just showing the usage of "Api_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -335,7 +335,7 @@ public async Task CreateOrUpdate_ApiManagementCreateApi() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiClone() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiClone.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiClone.json // this example is just showing the usage of "Api_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -385,7 +385,7 @@ public async Task CreateOrUpdate_ApiManagementCreateApiClone() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiNewVersionUsingExistingApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiNewVersionUsingExistingApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiNewVersionUsingExistingApi.json // this example is just showing the usage of "Api_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -437,7 +437,7 @@ public async Task CreateOrUpdate_ApiManagementCreateApiNewVersionUsingExistingAp [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiRevisionFromExistingApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiRevisionFromExistingApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiRevisionFromExistingApi.json // this example is just showing the usage of "Api_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -480,7 +480,7 @@ public async Task CreateOrUpdate_ApiManagementCreateApiRevisionFromExistingApi() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiUsingImportOverrideServiceUrl() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiUsingImportOverrideServiceUrl.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiUsingImportOverrideServiceUrl.json // this example is just showing the usage of "Api_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -523,7 +523,7 @@ public async Task CreateOrUpdate_ApiManagementCreateApiUsingImportOverrideServic [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiUsingOai3Import() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiUsingOai3Import.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiUsingOai3Import.json // this example is just showing the usage of "Api_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -560,12 +560,55 @@ public async Task CreateOrUpdate_ApiManagementCreateApiUsingOai3Import() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + // ApiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct.json + // this example is just showing the usage of "Api_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this ApiResource + ApiCollection collection = apiManagementService.GetApis(); + + // invoke the operation + string apiId = "petstore"; + ApiCreateOrUpdateContent content = new ApiCreateOrUpdateContent() + { + Path = "petstore", + Value = "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml", + Format = ContentFormat.OpenApiLink, + TranslateRequiredQueryParametersConduct = TranslateRequiredQueryParametersConduct.Template, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, apiId, content); + ApiResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ApiData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + // ApiManagementCreateApiUsingSwaggerImport [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiUsingSwaggerImport() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiUsingSwaggerImport.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiUsingSwaggerImport.json // this example is just showing the usage of "Api_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -607,7 +650,7 @@ public async Task CreateOrUpdate_ApiManagementCreateApiUsingSwaggerImport() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiUsingWadlImport() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiUsingWadlImport.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiUsingWadlImport.json // this example is just showing the usage of "Api_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -644,12 +687,152 @@ public async Task CreateOrUpdate_ApiManagementCreateApiUsingWadlImport() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + // ApiManagementCreateApiWithMultipleAuthServers + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApiManagementCreateApiWithMultipleAuthServers() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiWithMultipleAuthServers.json + // this example is just showing the usage of "Api_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this ApiResource + ApiCollection collection = apiManagementService.GetApis(); + + // invoke the operation + string apiId = "tempgroup"; + ApiCreateOrUpdateContent content = new ApiCreateOrUpdateContent() + { + Description = "apidescription5200", + AuthenticationSettings = new AuthenticationSettingsContract() + { + OAuth2AuthenticationSettings = +{ +new OAuth2AuthenticationSettingsContract() +{ +AuthorizationServerId = "authorizationServerId2283", +Scope = "oauth2scope2580", +},new OAuth2AuthenticationSettingsContract() +{ +AuthorizationServerId = "authorizationServerId2284", +Scope = "oauth2scope2581", +} +}, + }, + SubscriptionKeyParameterNames = new SubscriptionKeyParameterNamesContract() + { + Header = "header4520", + Query = "query3037", + }, + DisplayName = "apiname1463", + ServiceLink = "http://newechoapi.cloudapp.net/api", + Path = "newapiPath", + Protocols = +{ +ApiOperationInvokableProtocol.Https,ApiOperationInvokableProtocol.Http +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, apiId, content); + ApiResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ApiData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementCreateApiWithMultipleOpenIdConnectProviders + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApiManagementCreateApiWithMultipleOpenIdConnectProviders() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiWithMultipleOpenIdConnectProviders.json + // this example is just showing the usage of "Api_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this ApiResource + ApiCollection collection = apiManagementService.GetApis(); + + // invoke the operation + string apiId = "tempgroup"; + ApiCreateOrUpdateContent content = new ApiCreateOrUpdateContent() + { + Description = "apidescription5200", + AuthenticationSettings = new AuthenticationSettingsContract() + { + OpenidAuthenticationSettings = +{ +new OpenIdAuthenticationSettingsContract() +{ +OpenIdProviderId = "openidProviderId2283", +BearerTokenSendingMethods = +{ +BearerTokenSendingMethod.AuthorizationHeader +}, +},new OpenIdAuthenticationSettingsContract() +{ +OpenIdProviderId = "openidProviderId2284", +BearerTokenSendingMethods = +{ +BearerTokenSendingMethod.AuthorizationHeader +}, +} +}, + }, + SubscriptionKeyParameterNames = new SubscriptionKeyParameterNamesContract() + { + Header = "header4520", + Query = "query3037", + }, + DisplayName = "apiname1463", + ServiceLink = "http://newechoapi.cloudapp.net/api", + Path = "newapiPath", + Protocols = +{ +ApiOperationInvokableProtocol.Https,ApiOperationInvokableProtocol.Http +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, apiId, content); + ApiResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ApiData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + // ApiManagementCreateApiWithOpenIdConnect [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiWithOpenIdConnect() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiWithOpenIdConnect.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiWithOpenIdConnect.json // this example is just showing the usage of "Api_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -712,7 +895,7 @@ public async Task CreateOrUpdate_ApiManagementCreateApiWithOpenIdConnect() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateGraphQLApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGraphQLApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGraphQLApi.json // this example is just showing the usage of "Api_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -760,7 +943,7 @@ public async Task CreateOrUpdate_ApiManagementCreateGraphQLApi() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateSoapPassThroughApiUsingWsdlImport() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateSoapPassThroughApiUsingWsdlImport.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateSoapPassThroughApiUsingWsdlImport.json // this example is just showing the usage of "Api_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -808,7 +991,7 @@ public async Task CreateOrUpdate_ApiManagementCreateSoapPassThroughApiUsingWsdlI [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateSoapToRestApiUsingWsdlImport() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateSoapToRestApiUsingWsdlImport.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateSoapToRestApiUsingWsdlImport.json // this example is just showing the usage of "Api_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -855,7 +1038,7 @@ public async Task CreateOrUpdate_ApiManagementCreateSoapToRestApiUsingWsdlImport [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateWebSocketApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateWebsocketApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateWebsocketApi.json // this example is just showing the usage of "Api_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiDiagnosticCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiDiagnosticCollection.cs index 5f11065401a9f..ea634c028da7a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiDiagnosticCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiDiagnosticCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiDiagnosticCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListApiDiagnostics() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiDiagnostics.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiDiagnostics.json // this example is just showing the usage of "ApiDiagnostic_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task GetAll_ApiManagementListApiDiagnostics() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiDiagnostic.json // this example is just showing the usage of "ApiDiagnostic_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -94,7 +94,7 @@ public async Task Get_ApiManagementGetApiDiagnostic() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetApiDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiDiagnostic.json // this example is just showing the usage of "ApiDiagnostic_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task Exists_ApiManagementGetApiDiagnostic() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetApiDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiDiagnostic.json // this example is just showing the usage of "ApiDiagnostic_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -170,7 +170,7 @@ public async Task GetIfExists_ApiManagementGetApiDiagnostic() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiDiagnostic.json // this example is just showing the usage of "ApiDiagnostic_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiDiagnosticResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiDiagnosticResource.cs index 2d6318f5d677d..1048c60990005 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiDiagnosticResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiDiagnosticResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiDiagnosticResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadApiDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiDiagnostic.json // this example is just showing the usage of "ApiDiagnostic_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -49,7 +49,7 @@ public async Task GetEntityTag_ApiManagementHeadApiDiagnostic() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiDiagnostic.json // this example is just showing the usage of "ApiDiagnostic_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task Get_ApiManagementGetApiDiagnostic() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateApiDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateApiDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiDiagnostic.json // this example is just showing the usage of "ApiDiagnostic_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -164,7 +164,7 @@ public async Task Update_ApiManagementUpdateApiDiagnostic() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteApiDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiDiagnostic.json // this example is just showing the usage of "ApiDiagnostic_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueAttachmentCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueAttachmentCollection.cs index 0806305e29aa8..369df0ac6f24d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueAttachmentCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueAttachmentCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiIssueAttachmentCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListApiIssueAttachments() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiIssueAttachments.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiIssueAttachments.json // this example is just showing the usage of "ApiIssueAttachment_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task GetAll_ApiManagementListApiIssueAttachments() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiIssueAttachment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiIssueAttachment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssueAttachment.json // this example is just showing the usage of "ApiIssueAttachment_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task Get_ApiManagementGetApiIssueAttachment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetApiIssueAttachment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiIssueAttachment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssueAttachment.json // this example is just showing the usage of "ApiIssueAttachment_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,7 +128,7 @@ public async Task Exists_ApiManagementGetApiIssueAttachment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetApiIssueAttachment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiIssueAttachment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssueAttachment.json // this example is just showing the usage of "ApiIssueAttachment_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -173,7 +173,7 @@ public async Task GetIfExists_ApiManagementGetApiIssueAttachment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiIssueAttachment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiIssueAttachment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiIssueAttachment.json // this example is just showing the usage of "ApiIssueAttachment_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueAttachmentResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueAttachmentResource.cs index 8c286a2a4acf7..4aa3cb6228264 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueAttachmentResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueAttachmentResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiIssueAttachmentResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadApiIssueAttachment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiIssueAttachment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiIssueAttachment.json // this example is just showing the usage of "ApiIssueAttachment_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -49,7 +49,7 @@ public async Task GetEntityTag_ApiManagementHeadApiIssueAttachment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiIssueAttachment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiIssueAttachment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssueAttachment.json // this example is just showing the usage of "ApiIssueAttachment_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -83,7 +83,7 @@ public async Task Get_ApiManagementGetApiIssueAttachment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreateApiIssueAttachment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiIssueAttachment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiIssueAttachment.json // this example is just showing the usage of "ApiIssueAttachment_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -124,7 +124,7 @@ public async Task Update_ApiManagementCreateApiIssueAttachment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteApiIssueAttachment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiIssueAttachment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiIssueAttachment.json // this example is just showing the usage of "ApiIssueAttachment_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueCollection.cs index 5f8687a1b5cb1..f94e86ab0f17f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiIssueCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListApiIssues() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiIssues.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiIssues.json // this example is just showing the usage of "ApiIssue_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task GetAll_ApiManagementListApiIssues() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiIssue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiIssue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssue.json // this example is just showing the usage of "ApiIssue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -94,7 +94,7 @@ public async Task Get_ApiManagementGetApiIssue() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetApiIssue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiIssue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssue.json // this example is just showing the usage of "ApiIssue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task Exists_ApiManagementGetApiIssue() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetApiIssue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiIssue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssue.json // this example is just showing the usage of "ApiIssue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -170,7 +170,7 @@ public async Task GetIfExists_ApiManagementGetApiIssue() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiIssue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiIssue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiIssue.json // this example is just showing the usage of "ApiIssue_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueCommentCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueCommentCollection.cs index c9e5b79eeeaa1..72f7f966c4e59 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueCommentCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueCommentCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiIssueCommentCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListApiIssueComments() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiIssueComments.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiIssueComments.json // this example is just showing the usage of "ApiIssueComment_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task GetAll_ApiManagementListApiIssueComments() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiIssueComment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiIssueComment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssueComment.json // this example is just showing the usage of "ApiIssueComment_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task Get_ApiManagementGetApiIssueComment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetApiIssueComment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiIssueComment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssueComment.json // this example is just showing the usage of "ApiIssueComment_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,7 +128,7 @@ public async Task Exists_ApiManagementGetApiIssueComment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetApiIssueComment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiIssueComment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssueComment.json // this example is just showing the usage of "ApiIssueComment_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -173,7 +173,7 @@ public async Task GetIfExists_ApiManagementGetApiIssueComment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiIssueComment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiIssueComment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiIssueComment.json // this example is just showing the usage of "ApiIssueComment_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueCommentResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueCommentResource.cs index 9e4ac9af82a24..c2b48606d975d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueCommentResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueCommentResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiIssueCommentResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadApiIssueComment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiIssueComment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiIssueComment.json // this example is just showing the usage of "ApiIssueComment_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -49,7 +49,7 @@ public async Task GetEntityTag_ApiManagementHeadApiIssueComment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiIssueComment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiIssueComment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssueComment.json // this example is just showing the usage of "ApiIssueComment_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -83,7 +83,7 @@ public async Task Get_ApiManagementGetApiIssueComment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreateApiIssueComment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiIssueComment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiIssueComment.json // this example is just showing the usage of "ApiIssueComment_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -124,7 +124,7 @@ public async Task Update_ApiManagementCreateApiIssueComment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteApiIssueComment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiIssueComment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiIssueComment.json // this example is just showing the usage of "ApiIssueComment_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueResource.cs index 89a0f9bd924d5..f47047419bf93 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiIssueResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadApiIssue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiIssue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiIssue.json // this example is just showing the usage of "ApiIssue_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -49,7 +49,7 @@ public async Task GetEntityTag_ApiManagementHeadApiIssue() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiIssue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiIssue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiIssue.json // this example is just showing the usage of "ApiIssue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task Get_ApiManagementGetApiIssue() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateApiIssue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateApiIssue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiIssue.json // this example is just showing the usage of "ApiIssue_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +120,7 @@ public async Task Update_ApiManagementUpdateApiIssue() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteApiIssue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiIssue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiIssue.json // this example is just showing the usage of "ApiIssue_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementAuthorizationServerCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementAuthorizationServerCollection.cs index d584d4e430cff..8a36c1004ae7f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementAuthorizationServerCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementAuthorizationServerCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementAuthorizationServerCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListAuthorizationServers() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListAuthorizationServers.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListAuthorizationServers.json // this example is just showing the usage of "AuthorizationServer_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ApiManagementListAuthorizationServers() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetAuthorizationServer() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetAuthorizationServer.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationServer.json // this example is just showing the usage of "AuthorizationServer_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetAuthorizationServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetAuthorizationServer() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetAuthorizationServer.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationServer.json // this example is just showing the usage of "AuthorizationServer_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetAuthorizationServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetAuthorizationServer() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetAuthorizationServer.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationServer.json // this example is just showing the usage of "AuthorizationServer_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_ApiManagementGetAuthorizationServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateAuthorizationServer() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateAuthorizationServer.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationServer.json // this example is just showing the usage of "AuthorizationServer_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -204,6 +204,8 @@ public async Task CreateOrUpdate_ApiManagementCreateAuthorizationServer() ResourceOwnerUsername = "un", ResourceOwnerPassword = "pwd", DisplayName = "test2", + UseInTestConsole = false, + UseInApiDocumentation = true, ClientRegistrationEndpoint = "https://www.contoso.com/apps", AuthorizationEndpoint = "https://www.contoso.com/oauth2/auth", GrantTypes = diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementAuthorizationServerResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementAuthorizationServerResource.cs index 94ef833289b07..0149b37e0383f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementAuthorizationServerResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementAuthorizationServerResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementAuthorizationServerResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadAuthorizationServer() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadAuthorizationServer.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadAuthorizationServer.json // this example is just showing the usage of "AuthorizationServer_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadAuthorizationServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetAuthorizationServer() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetAuthorizationServer.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationServer.json // this example is just showing the usage of "AuthorizationServer_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetAuthorizationServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateAuthorizationServer() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateAuthorizationServer.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateAuthorizationServer.json // this example is just showing the usage of "AuthorizationServer_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -101,6 +101,8 @@ public async Task Update_ApiManagementUpdateAuthorizationServer() ETag ifMatch = new ETag("*"); ApiManagementAuthorizationServerPatch patch = new ApiManagementAuthorizationServerPatch() { + UseInTestConsole = false, + UseInApiDocumentation = true, ClientId = "update", ClientSecret = "updated", }; @@ -118,7 +120,7 @@ public async Task Update_ApiManagementUpdateAuthorizationServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteAuthorizationServer() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteAuthorizationServer.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteAuthorizationServer.json // this example is just showing the usage of "AuthorizationServer_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -147,7 +149,7 @@ public async Task Delete_ApiManagementDeleteAuthorizationServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSecrets_ApiManagementAuthorizationServerListSecrets() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementAuthorizationServerListSecrets.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementAuthorizationServerListSecrets.json // this example is just showing the usage of "AuthorizationServer_ListSecrets" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementBackendCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementBackendCollection.cs index b669ac3f88510..7f73e474fe44a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementBackendCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementBackendCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementBackendCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListBackends() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListBackends.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListBackends.json // this example is just showing the usage of "Backend_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ApiManagementListBackends() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetBackend() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetBackend.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetBackend.json // this example is just showing the usage of "Backend_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetBackend() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetBackend() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetBackend.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetBackend.json // this example is just showing the usage of "Backend_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetBackend() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetBackend() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetBackend.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetBackend.json // this example is just showing the usage of "Backend_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_ApiManagementGetBackend() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateBackendProxyBackend() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateBackendProxyBackend.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateBackendProxyBackend.json // this example is just showing the usage of "Backend_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -236,7 +236,7 @@ public async Task CreateOrUpdate_ApiManagementCreateBackendProxyBackend() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateBackendServiceFabric() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateBackendServiceFabric.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateBackendServiceFabric.json // this example is just showing the usage of "Backend_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementBackendResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementBackendResource.cs index b0cfd706accb6..6bffe64159af8 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementBackendResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementBackendResource.cs @@ -21,7 +21,7 @@ public partial class Sample_ApiManagementBackendResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadBackend() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadBackend.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadBackend.json // this example is just showing the usage of "Backend_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -49,7 +49,7 @@ public async Task GetEntityTag_ApiManagementHeadBackend() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetBackend() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetBackend.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetBackend.json // this example is just showing the usage of "Backend_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -81,7 +81,7 @@ public async Task Get_ApiManagementGetBackend() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateBackend() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateBackend.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateBackend.json // this example is just showing the usage of "Backend_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Update_ApiManagementUpdateBackend() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteBackend() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteBackend.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteBackend.json // this example is just showing the usage of "Backend_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -152,7 +152,7 @@ public async Task Delete_ApiManagementDeleteBackend() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Reconnect_ApiManagementBackendReconnect() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementBackendReconnect.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackendReconnect.json // this example is just showing the usage of "Backend_Reconnect" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCacheCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCacheCollection.cs index 6f3836c07142e..7afa19e76a665 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCacheCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCacheCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementCacheCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListCaches() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListCaches.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListCaches.json // this example is just showing the usage of "Cache_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_ApiManagementListCaches() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetCache() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetCache.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetCache.json // this example is just showing the usage of "Cache_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_ApiManagementGetCache() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetCache() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetCache.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetCache.json // this example is just showing the usage of "Cache_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Exists_ApiManagementGetCache() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetCache() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetCache.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetCache.json // this example is just showing the usage of "Cache_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -165,7 +165,7 @@ public async Task GetIfExists_ApiManagementGetCache() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateCache() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateCache.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateCache.json // this example is just showing the usage of "Cache_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCacheResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCacheResource.cs index 05a33efc28353..e88f6151a0769 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCacheResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCacheResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementCacheResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadCache() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadCache.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadCache.json // this example is just showing the usage of "Cache_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadCache() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetCache() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetCache.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetCache.json // this example is just showing the usage of "Cache_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetCache() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateCache() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateCache.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateCache.json // this example is just showing the usage of "Cache_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -117,7 +117,7 @@ public async Task Update_ApiManagementUpdateCache() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteCache() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteCache.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteCache.json // this example is just showing the usage of "Cache_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCertificateCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCertificateCollection.cs index 6ad2462547cf9..cb1ebebb15a22 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCertificateCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCertificateCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementCertificateCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListCertificates() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListCertificates.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListCertificates.json // this example is just showing the usage of "Certificate_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ApiManagementListCertificates() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetCertificate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetCertificate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetCertificate.json // this example is just showing the usage of "Certificate_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetCertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetCertificate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetCertificate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetCertificate.json // this example is just showing the usage of "Certificate_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetCertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetCertificate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetCertificate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetCertificate.json // this example is just showing the usage of "Certificate_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_ApiManagementGetCertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetCertificateWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetCertificateWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetCertificateWithKeyVault.json // this example is just showing the usage of "Certificate_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -201,7 +201,7 @@ public async Task Get_ApiManagementGetCertificateWithKeyVault() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetCertificateWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetCertificateWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetCertificateWithKeyVault.json // this example is just showing the usage of "Certificate_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -232,7 +232,7 @@ public async Task Exists_ApiManagementGetCertificateWithKeyVault() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetCertificateWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetCertificateWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetCertificateWithKeyVault.json // this example is just showing the usage of "Certificate_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -275,7 +275,7 @@ public async Task GetIfExists_ApiManagementGetCertificateWithKeyVault() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateCertificate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateCertificate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateCertificate.json // this example is just showing the usage of "Certificate_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -316,7 +316,7 @@ public async Task CreateOrUpdate_ApiManagementCreateCertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateCertificateWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateCertificateWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateCertificateWithKeyVault.json // this example is just showing the usage of "Certificate_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCertificateResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCertificateResource.cs index 91050af7a0b9d..38e326ec42b93 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCertificateResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCertificateResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementCertificateResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadCertificate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadCertificate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadCertificate.json // this example is just showing the usage of "Certificate_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadCertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetCertificate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetCertificate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetCertificate.json // this example is just showing the usage of "Certificate_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetCertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetCertificateWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetCertificateWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetCertificateWithKeyVault.json // this example is just showing the usage of "Certificate_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -112,7 +112,7 @@ public async Task Get_ApiManagementGetCertificateWithKeyVault() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreateCertificate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateCertificate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateCertificate.json // this example is just showing the usage of "Certificate_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -150,7 +150,7 @@ public async Task Update_ApiManagementCreateCertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreateCertificateWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateCertificateWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateCertificateWithKeyVault.json // this example is just showing the usage of "Certificate_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -191,7 +191,7 @@ public async Task Update_ApiManagementCreateCertificateWithKeyVault() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteCertificate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteCertificate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteCertificate.json // this example is just showing the usage of "Certificate_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -220,7 +220,7 @@ public async Task Delete_ApiManagementDeleteCertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task RefreshSecret_ApiManagementRefreshCertificate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementRefreshCertificate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementRefreshCertificate.json // this example is just showing the usage of "Certificate_RefreshSecret" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDeletedServiceCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDeletedServiceCollection.cs index 0af5aa944fc01..9350737da8fa9 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDeletedServiceCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDeletedServiceCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementDeletedServiceCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetDeletedServiceByName() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetDeletedServiceByName.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetDeletedServiceByName.json // this example is just showing the usage of "DeletedServices_GetByName" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_ApiManagementGetDeletedServiceByName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetDeletedServiceByName() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetDeletedServiceByName.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetDeletedServiceByName.json // this example is just showing the usage of "DeletedServices_GetByName" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Exists_ApiManagementGetDeletedServiceByName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetDeletedServiceByName() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetDeletedServiceByName.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetDeletedServiceByName.json // this example is just showing the usage of "DeletedServices_GetByName" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDeletedServiceResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDeletedServiceResource.cs index f08875d02fe56..888a5a72ba488 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDeletedServiceResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDeletedServiceResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementDeletedServiceResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetApiManagementDeletedServices_ApiManagementDeletedServicesListBySubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeletedServicesListBySubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeletedServicesListBySubscription.json // this example is just showing the usage of "DeletedServices_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task GetApiManagementDeletedServices_ApiManagementDeletedServicesLi [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetDeletedServiceByName() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetDeletedServiceByName.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetDeletedServiceByName.json // this example is just showing the usage of "DeletedServices_GetByName" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -83,7 +83,7 @@ public async Task Get_ApiManagementGetDeletedServiceByName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeletedServicesPurge() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeletedServicesPurge.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeletedServicesPurge.json // this example is just showing the usage of "DeletedServices_Purge" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDiagnosticCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDiagnosticCollection.cs index 2207e4332f63f..d22829d03a241 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDiagnosticCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDiagnosticCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementDiagnosticCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListDiagnostics() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListDiagnostics.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListDiagnostics.json // this example is just showing the usage of "Diagnostic_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ApiManagementListDiagnostics() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetDiagnostic.json // this example is just showing the usage of "Diagnostic_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetDiagnostic() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetDiagnostic.json // this example is just showing the usage of "Diagnostic_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetDiagnostic() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetDiagnostic.json // this example is just showing the usage of "Diagnostic_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_ApiManagementGetDiagnostic() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateDiagnostic.json // this example is just showing the usage of "Diagnostic_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDiagnosticResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDiagnosticResource.cs index 59a0d0dc17583..4a6ebf1abff93 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDiagnosticResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDiagnosticResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementDiagnosticResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadDiagnostic.json // this example is just showing the usage of "Diagnostic_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadDiagnostic() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetDiagnostic.json // this example is just showing the usage of "Diagnostic_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetDiagnostic() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateDiagnostic.json // this example is just showing the usage of "Diagnostic_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -161,7 +161,7 @@ public async Task Update_ApiManagementUpdateDiagnostic() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteDiagnostic.json // this example is just showing the usage of "Diagnostic_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementEmailTemplateCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementEmailTemplateCollection.cs index f9bf1268a219d..1e915c03aa651 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementEmailTemplateCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementEmailTemplateCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementEmailTemplateCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListTemplates() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListTemplates.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListTemplates.json // this example is just showing the usage of "EmailTemplate_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ApiManagementListTemplates() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetTemplate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTemplate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTemplate.json // this example is just showing the usage of "EmailTemplate_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetTemplate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetTemplate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTemplate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTemplate.json // this example is just showing the usage of "EmailTemplate_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetTemplate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetTemplate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTemplate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTemplate.json // this example is just showing the usage of "EmailTemplate_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_ApiManagementGetTemplate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateTemplate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateTemplate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateTemplate.json // this example is just showing the usage of "EmailTemplate_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementEmailTemplateResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementEmailTemplateResource.cs index f4044027e1643..3e8211b5dd52e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementEmailTemplateResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementEmailTemplateResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementEmailTemplateResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadEmailTemplate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadEmailTemplate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadEmailTemplate.json // this example is just showing the usage of "EmailTemplate_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadEmailTemplate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetTemplate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTemplate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTemplate.json // this example is just showing the usage of "EmailTemplate_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetTemplate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateTemplate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateTemplate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateTemplate.json // this example is just showing the usage of "EmailTemplate_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task Update_ApiManagementUpdateTemplate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteTemplate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteTemplate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteTemplate.json // this example is just showing the usage of "EmailTemplate_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayCertificateAuthorityCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayCertificateAuthorityCollection.cs index d8cbf0e0e6cc7..06523908830b8 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayCertificateAuthorityCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayCertificateAuthorityCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementGatewayCertificateAuthorityCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListGatewaycertificateAuthorities() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListGatewayCertificateAuthorities.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGatewayCertificateAuthorities.json // this example is just showing the usage of "GatewayCertificateAuthority_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ApiManagementListGatewaycertificateAuthorities() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetGatewayCertificateAuthority() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGatewayCertificateAuthority.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGatewayCertificateAuthority.json // this example is just showing the usage of "GatewayCertificateAuthority_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Get_ApiManagementGetGatewayCertificateAuthority() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetGatewayCertificateAuthority() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGatewayCertificateAuthority.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGatewayCertificateAuthority.json // this example is just showing the usage of "GatewayCertificateAuthority_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -125,7 +125,7 @@ public async Task Exists_ApiManagementGetGatewayCertificateAuthority() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetGatewayCertificateAuthority() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGatewayCertificateAuthority.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGatewayCertificateAuthority.json // this example is just showing the usage of "GatewayCertificateAuthority_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -169,7 +169,7 @@ public async Task GetIfExists_ApiManagementGetGatewayCertificateAuthority() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateGatewayCertificateAuthority() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGatewayCertificateAuthority.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGatewayCertificateAuthority.json // this example is just showing the usage of "GatewayCertificateAuthority_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayCertificateAuthorityResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayCertificateAuthorityResource.cs index 7baf29a788b27..1c03064887359 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayCertificateAuthorityResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayCertificateAuthorityResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementGatewayCertificateAuthorityResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadGatewayCertificateAuthority() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadGatewayCertificateAuthority.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGatewayCertificateAuthority.json // this example is just showing the usage of "GatewayCertificateAuthority_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadGatewayCertificateAuthority() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetGatewayCertificateAuthority() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGatewayCertificateAuthority.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGatewayCertificateAuthority.json // this example is just showing the usage of "GatewayCertificateAuthority_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -81,7 +81,7 @@ public async Task Get_ApiManagementGetGatewayCertificateAuthority() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreateGatewayCertificateAuthority() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGatewayCertificateAuthority.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGatewayCertificateAuthority.json // this example is just showing the usage of "GatewayCertificateAuthority_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -119,7 +119,7 @@ public async Task Update_ApiManagementCreateGatewayCertificateAuthority() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteGatewayCertificateAuthority() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteGatewayCertificateAuthority.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGatewayCertificateAuthority.json // this example is just showing the usage of "GatewayCertificateAuthority_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayCollection.cs index 0dcb8414a109e..081ffaa22b28a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementGatewayCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListGateways() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListGateways.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGateways.json // this example is just showing the usage of "Gateway_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ApiManagementListGateways() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetGateway() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGateway.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGateway.json // this example is just showing the usage of "Gateway_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetGateway() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGateway.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGateway.json // this example is just showing the usage of "Gateway_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetGateway() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGateway.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGateway.json // this example is just showing the usage of "Gateway_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_ApiManagementGetGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateGateway() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGateway.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGateway.json // this example is just showing the usage of "Gateway_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayHostnameConfigurationCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayHostnameConfigurationCollection.cs index 6ca2ef102ca49..2cb000560713c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayHostnameConfigurationCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayHostnameConfigurationCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementGatewayHostnameConfigurationCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListGatewayHostnameConfigurations() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListGatewayHostnameConfigurations.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGatewayHostnameConfigurations.json // this example is just showing the usage of "GatewayHostnameConfiguration_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ApiManagementListGatewayHostnameConfigurations() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetGatewayHostnameConfiguration() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGatewayHostnameConfiguration.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGatewayHostnameConfiguration.json // this example is just showing the usage of "GatewayHostnameConfiguration_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Get_ApiManagementGetGatewayHostnameConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetGatewayHostnameConfiguration() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGatewayHostnameConfiguration.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGatewayHostnameConfiguration.json // this example is just showing the usage of "GatewayHostnameConfiguration_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -125,7 +125,7 @@ public async Task Exists_ApiManagementGetGatewayHostnameConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetGatewayHostnameConfiguration() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGatewayHostnameConfiguration.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGatewayHostnameConfiguration.json // this example is just showing the usage of "GatewayHostnameConfiguration_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -169,7 +169,7 @@ public async Task GetIfExists_ApiManagementGetGatewayHostnameConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateGatewayHostnameConfiguration() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGatewayHostnameConfiguration.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGatewayHostnameConfiguration.json // this example is just showing the usage of "GatewayHostnameConfiguration_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayHostnameConfigurationResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayHostnameConfigurationResource.cs index 637dbe19be119..2340b6b98e888 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayHostnameConfigurationResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayHostnameConfigurationResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementGatewayHostnameConfigurationResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadGatewayHostnameConfiguration() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadGatewayHostnameConfiguration.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGatewayHostnameConfiguration.json // this example is just showing the usage of "GatewayHostnameConfiguration_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadGatewayHostnameConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetGatewayHostnameConfiguration() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGatewayHostnameConfiguration.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGatewayHostnameConfiguration.json // this example is just showing the usage of "GatewayHostnameConfiguration_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -81,7 +81,7 @@ public async Task Get_ApiManagementGetGatewayHostnameConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreateGatewayHostnameConfiguration() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGatewayHostnameConfiguration.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGatewayHostnameConfiguration.json // this example is just showing the usage of "GatewayHostnameConfiguration_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -124,7 +124,7 @@ public async Task Update_ApiManagementCreateGatewayHostnameConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteGatewayHostnameConfiguration() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteGatewayHostnameConfiguration.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGatewayHostnameConfiguration.json // this example is just showing the usage of "GatewayHostnameConfiguration_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayResource.cs index 253d3df0afb8b..4c9cbb61890e5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementGatewayResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadGateway() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadGateway.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGateway.json // this example is just showing the usage of "Gateway_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetGateway() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGateway.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGateway.json // this example is just showing the usage of "Gateway_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateGateway() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateGateway.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateGateway.json // this example is just showing the usage of "Gateway_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task Update_ApiManagementUpdateGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteGateway() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteGateway.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGateway.json // this example is just showing the usage of "Gateway_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -147,7 +147,7 @@ public async Task Delete_ApiManagementDeleteGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetKeys_ApiManagementGatewayListKeys() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGatewayListKeys.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGatewayListKeys.json // this example is just showing the usage of "Gateway_ListKeys" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -175,7 +175,7 @@ public async Task GetKeys_ApiManagementGatewayListKeys() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task RegenerateKey_ApiManagementGatewayRegenerateKey() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGatewayRegenerateKey.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGatewayRegenerateKey.json // this example is just showing the usage of "Gateway_RegenerateKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -204,7 +204,7 @@ public async Task RegenerateKey_ApiManagementGatewayRegenerateKey() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GenerateToken_ApiManagementGatewayGenerateToken() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGatewayGenerateToken.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGatewayGenerateToken.json // this example is just showing the usage of "Gateway_GenerateToken" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -233,7 +233,7 @@ public async Task GenerateToken_ApiManagementGatewayGenerateToken() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetGatewayApisByService_ApiManagementListGatewayApis() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListGatewayApis.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGatewayApis.json // this example is just showing the usage of "GatewayApi_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -264,7 +264,7 @@ public async Task GetGatewayApisByService_ApiManagementListGatewayApis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetGatewayApiEntityTag_ApiManagementHeadGatewayApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadGatewayApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGatewayApi.json // this example is just showing the usage of "GatewayApi_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -293,7 +293,7 @@ public async Task GetGatewayApiEntityTag_ApiManagementHeadGatewayApi() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdateGatewayApi_ApiManagementCreateGatewayApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGatewayApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGatewayApi.json // this example is just showing the usage of "GatewayApi_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -326,7 +326,7 @@ public async Task CreateOrUpdateGatewayApi_ApiManagementCreateGatewayApi() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task DeleteGatewayApi_ApiManagementDeleteGatewayApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteGatewayApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGatewayApi.json // this example is just showing the usage of "GatewayApi_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGlobalSchemaCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGlobalSchemaCollection.cs index 82b9d83f5da28..6fa350fedfcca 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGlobalSchemaCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGlobalSchemaCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ApiManagementGlobalSchemaCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListSchemas() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListGlobalSchemas.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGlobalSchemas.json // this example is just showing the usage of "GlobalSchema_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task GetAll_ApiManagementListSchemas() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetSchema1() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGlobalSchema1.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGlobalSchema1.json // this example is just showing the usage of "GlobalSchema_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Get_ApiManagementGetSchema1() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetSchema1() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGlobalSchema1.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGlobalSchema1.json // this example is just showing the usage of "GlobalSchema_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -124,7 +124,7 @@ public async Task Exists_ApiManagementGetSchema1() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetSchema1() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGlobalSchema1.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGlobalSchema1.json // this example is just showing the usage of "GlobalSchema_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -167,7 +167,7 @@ public async Task GetIfExists_ApiManagementGetSchema1() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetSchema2() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGlobalSchema2.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGlobalSchema2.json // this example is just showing the usage of "GlobalSchema_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -202,7 +202,7 @@ public async Task Get_ApiManagementGetSchema2() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetSchema2() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGlobalSchema2.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGlobalSchema2.json // this example is just showing the usage of "GlobalSchema_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -233,7 +233,7 @@ public async Task Exists_ApiManagementGetSchema2() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetSchema2() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGlobalSchema2.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGlobalSchema2.json // this example is just showing the usage of "GlobalSchema_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -276,7 +276,7 @@ public async Task GetIfExists_ApiManagementGetSchema2() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateSchema1() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGlobalSchema1.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGlobalSchema1.json // this example is just showing the usage of "GlobalSchema_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -318,7 +318,7 @@ public async Task CreateOrUpdate_ApiManagementCreateSchema1() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateSchema2() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGlobalSchema2.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGlobalSchema2.json // this example is just showing the usage of "GlobalSchema_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGlobalSchemaResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGlobalSchemaResource.cs index 1a94a6483e712..0ea1363a9fb03 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGlobalSchemaResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGlobalSchemaResource.cs @@ -21,7 +21,7 @@ public partial class Sample_ApiManagementGlobalSchemaResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadGlobalSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGlobalSchema.json // this example is just showing the usage of "GlobalSchema_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -49,7 +49,7 @@ public async Task GetEntityTag_ApiManagementHeadApi() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetSchema1() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGlobalSchema1.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGlobalSchema1.json // this example is just showing the usage of "GlobalSchema_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -81,7 +81,7 @@ public async Task Get_ApiManagementGetSchema1() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetSchema2() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGlobalSchema2.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGlobalSchema2.json // this example is just showing the usage of "GlobalSchema_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -113,7 +113,7 @@ public async Task Get_ApiManagementGetSchema2() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreateSchema1() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGlobalSchema1.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGlobalSchema1.json // this example is just showing the usage of "GlobalSchema_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -152,7 +152,7 @@ public async Task Update_ApiManagementCreateSchema1() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreateSchema2() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGlobalSchema2.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGlobalSchema2.json // this example is just showing the usage of "GlobalSchema_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -216,7 +216,7 @@ public async Task Update_ApiManagementCreateSchema2() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteGlobalSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGlobalSchema.json // this example is just showing the usage of "GlobalSchema_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGroupCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGroupCollection.cs index 557c5434b496b..b2d8120117ce1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGroupCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGroupCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementGroupCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListGroups() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListGroups.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGroups.json // this example is just showing the usage of "Group_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ApiManagementListGroups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGroup.json // this example is just showing the usage of "Group_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGroup.json // this example is just showing the usage of "Group_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGroup.json // this example is just showing the usage of "Group_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_ApiManagementGetGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGroup.json // this example is just showing the usage of "Group_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -206,7 +206,7 @@ public async Task CreateOrUpdate_ApiManagementCreateGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateGroupExternal() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGroupExternal.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGroupExternal.json // this example is just showing the usage of "Group_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGroupResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGroupResource.cs index 0942a76de7cfd..461aaf68952fc 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGroupResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGroupResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementGroupResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGroup.json // this example is just showing the usage of "Group_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGroup.json // this example is just showing the usage of "Group_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateGroup.json // this example is just showing the usage of "Group_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -117,7 +117,7 @@ public async Task Update_ApiManagementUpdateGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGroup.json // this example is just showing the usage of "Group_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -146,7 +146,7 @@ public async Task Delete_ApiManagementDeleteGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetGroupUsers_ApiManagementListGroupUsers() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListGroupUsers.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGroupUsers.json // this example is just showing the usage of "GroupUser_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -177,7 +177,7 @@ public async Task GetGroupUsers_ApiManagementListGroupUsers() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckGroupUserEntityExists_ApiManagementHeadGroupUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadGroupUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGroupUser.json // this example is just showing the usage of "GroupUser_CheckEntityExists" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -206,7 +206,7 @@ public async Task CheckGroupUserEntityExists_ApiManagementHeadGroupUser() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateGroupUser_ApiManagementCreateGroupUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateGroupUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGroupUser.json // this example is just showing the usage of "GroupUser_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -235,7 +235,7 @@ public async Task CreateGroupUser_ApiManagementCreateGroupUser() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task DeleteGroupUser_ApiManagementDeleteGroupUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteGroupUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGroupUser.json // this example is just showing the usage of "GroupUser_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIdentityProviderCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIdentityProviderCollection.cs index ca4b26ec862c9..1ae127184a50d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIdentityProviderCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIdentityProviderCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementIdentityProviderCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListIdentityProviders() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListIdentityProviders.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListIdentityProviders.json // this example is just showing the usage of "IdentityProvider_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ApiManagementListIdentityProviders() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetIdentityProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetIdentityProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetIdentityProvider.json // this example is just showing the usage of "IdentityProvider_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetIdentityProvider() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetIdentityProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetIdentityProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetIdentityProvider.json // this example is just showing the usage of "IdentityProvider_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetIdentityProvider() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetIdentityProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetIdentityProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetIdentityProvider.json // this example is just showing the usage of "IdentityProvider_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_ApiManagementGetIdentityProvider() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateIdentityProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateIdentityProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateIdentityProvider.json // this example is just showing the usage of "IdentityProvider_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIdentityProviderResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIdentityProviderResource.cs index 1286003408bbd..6d899073ad93c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIdentityProviderResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIdentityProviderResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementIdentityProviderResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadIdentityProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadIdentityProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadIdentityProvider.json // this example is just showing the usage of "IdentityProvider_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadIdentityProvider() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetIdentityProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetIdentityProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetIdentityProvider.json // this example is just showing the usage of "IdentityProvider_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetIdentityProvider() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateIdentityProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateIdentityProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateIdentityProvider.json // this example is just showing the usage of "IdentityProvider_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task Update_ApiManagementUpdateIdentityProvider() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteIdentityProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteIdentityProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteIdentityProvider.json // this example is just showing the usage of "IdentityProvider_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -147,7 +147,7 @@ public async Task Delete_ApiManagementDeleteIdentityProvider() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSecrets_ApiManagementIdentityProviderListSecrets() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementIdentityProviderListSecrets.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementIdentityProviderListSecrets.json // this example is just showing the usage of "IdentityProvider_ListSecrets" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIssueCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIssueCollection.cs index b58e700d33382..62146d18409a2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIssueCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIssueCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementIssueCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListIssues() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListIssues.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListIssues.json // this example is just showing the usage of "Issue_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_ApiManagementListIssues() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetIssue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetIssue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetIssue.json // this example is just showing the usage of "Issue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_ApiManagementGetIssue() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetIssue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetIssue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetIssue.json // this example is just showing the usage of "Issue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Exists_ApiManagementGetIssue() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetIssue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetIssue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetIssue.json // this example is just showing the usage of "Issue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIssueResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIssueResource.cs index c9694d6dcf0bc..a45b3652030bc 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIssueResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIssueResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementIssueResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetIssue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetIssue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetIssue.json // this example is just showing the usage of "Issue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementLoggerCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementLoggerCollection.cs index 287aed14720ce..f370fca9fdba1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementLoggerCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementLoggerCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementLoggerCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListLoggers() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListLoggers.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListLoggers.json // this example is just showing the usage of "Logger_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ApiManagementListLoggers() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetLogger() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetLogger.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetLogger.json // this example is just showing the usage of "Logger_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetLogger() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetLogger() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetLogger.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetLogger.json // this example is just showing the usage of "Logger_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetLogger() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetLogger() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetLogger.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetLogger.json // this example is just showing the usage of "Logger_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_ApiManagementGetLogger() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateAILogger() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateAILogger.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAILogger.json // this example is just showing the usage of "Logger_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -211,7 +211,7 @@ public async Task CreateOrUpdate_ApiManagementCreateAILogger() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateEHLogger() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateEHLogger.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateEHLogger.json // this example is just showing the usage of "Logger_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementLoggerResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementLoggerResource.cs index e828260b16d68..1d2632de6f776 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementLoggerResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementLoggerResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementLoggerResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadLogger() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadLogger.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadLogger.json // this example is just showing the usage of "Logger_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadLogger() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetLogger() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetLogger.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetLogger.json // this example is just showing the usage of "Logger_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetLogger() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateLogger() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateLogger.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateLogger.json // this example is just showing the usage of "Logger_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task Update_ApiManagementUpdateLogger() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteLogger() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteLogger.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteLogger.json // this example is just showing the usage of "Logger_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNamedValueCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNamedValueCollection.cs index 058a92c83c302..83a73c8199f27 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNamedValueCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNamedValueCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementNamedValueCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListNamedValues() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListNamedValues.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListNamedValues.json // this example is just showing the usage of "NamedValue_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ApiManagementListNamedValues() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetNamedValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetNamedValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetNamedValue.json // this example is just showing the usage of "NamedValue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetNamedValue() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetNamedValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetNamedValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetNamedValue.json // this example is just showing the usage of "NamedValue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetNamedValue() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetNamedValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetNamedValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetNamedValue.json // this example is just showing the usage of "NamedValue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_ApiManagementGetNamedValue() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetNamedValueWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetNamedValueWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetNamedValueWithKeyVault.json // this example is just showing the usage of "NamedValue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -201,7 +201,7 @@ public async Task Get_ApiManagementGetNamedValueWithKeyVault() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetNamedValueWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetNamedValueWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetNamedValueWithKeyVault.json // this example is just showing the usage of "NamedValue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -232,7 +232,7 @@ public async Task Exists_ApiManagementGetNamedValueWithKeyVault() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetNamedValueWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetNamedValueWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetNamedValueWithKeyVault.json // this example is just showing the usage of "NamedValue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -275,7 +275,7 @@ public async Task GetIfExists_ApiManagementGetNamedValueWithKeyVault() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateNamedValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateNamedValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateNamedValue.json // this example is just showing the usage of "NamedValue_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -321,7 +321,7 @@ public async Task CreateOrUpdate_ApiManagementCreateNamedValue() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateNamedValueWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateNamedValueWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateNamedValueWithKeyVault.json // this example is just showing the usage of "NamedValue_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNamedValueResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNamedValueResource.cs index a2799ff2ea089..ae4d9e978b596 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNamedValueResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNamedValueResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementNamedValueResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadNamedValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadNamedValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadNamedValue.json // this example is just showing the usage of "NamedValue_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadNamedValue() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetNamedValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetNamedValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetNamedValue.json // this example is just showing the usage of "NamedValue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetNamedValue() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetNamedValueWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetNamedValueWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetNamedValueWithKeyVault.json // this example is just showing the usage of "NamedValue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -112,7 +112,7 @@ public async Task Get_ApiManagementGetNamedValueWithKeyVault() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateNamedValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateNamedValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateNamedValue.json // this example is just showing the usage of "NamedValue_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -156,7 +156,7 @@ public async Task Update_ApiManagementUpdateNamedValue() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteNamedValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteNamedValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteNamedValue.json // this example is just showing the usage of "NamedValue_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -185,7 +185,7 @@ public async Task Delete_ApiManagementDeleteNamedValue() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetValue_ApiManagementNamedValueListValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementNamedValueListValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementNamedValueListValue.json // this example is just showing the usage of "NamedValue_ListValue" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -213,7 +213,7 @@ public async Task GetValue_ApiManagementNamedValueListValue() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task RefreshSecret_ApiManagementRefreshNamedValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementRefreshNamedValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementRefreshNamedValue.json // this example is just showing the usage of "NamedValue_RefreshSecret" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNotificationCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNotificationCollection.cs index b13e0a43f327e..bac83760d434b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNotificationCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNotificationCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementNotificationCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListNotifications() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListNotifications.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListNotifications.json // this example is just showing the usage of "Notification_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ApiManagementListNotifications() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetNotification() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetNotification.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetNotification.json // this example is just showing the usage of "Notification_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetNotification() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetNotification() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetNotification.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetNotification.json // this example is just showing the usage of "Notification_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetNotification() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetNotification() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetNotification.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetNotification.json // this example is just showing the usage of "Notification_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_ApiManagementGetNotification() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateNotification() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateNotification.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateNotification.json // this example is just showing the usage of "Notification_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNotificationResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNotificationResource.cs index 37bd2611a6eab..ec154cedc0cc1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNotificationResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNotificationResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementNotificationResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetNotification() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetNotification.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetNotification.json // this example is just showing the usage of "Notification_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_ApiManagementGetNotification() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreateNotification() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateNotification.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateNotification.json // this example is just showing the usage of "Notification_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Update_ApiManagementCreateNotification() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNotificationRecipientUsers_ApiManagementListNotificationRecipientUsers() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListNotificationRecipientUsers.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListNotificationRecipientUsers.json // this example is just showing the usage of "NotificationRecipientUser_ListByNotification" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -116,7 +116,7 @@ public async Task GetNotificationRecipientUsers_ApiManagementListNotificationRec [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckNotificationRecipientUserEntityExists_ApiManagementHeadNotificationRecipientUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadNotificationRecipientUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadNotificationRecipientUser.json // this example is just showing the usage of "NotificationRecipientUser_CheckEntityExists" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -145,7 +145,7 @@ public async Task CheckNotificationRecipientUserEntityExists_ApiManagementHeadNo [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdateNotificationRecipientUser_ApiManagementCreateNotificationRecipientUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateNotificationRecipientUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateNotificationRecipientUser.json // this example is just showing the usage of "NotificationRecipientUser_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -174,7 +174,7 @@ public async Task CreateOrUpdateNotificationRecipientUser_ApiManagementCreateNot [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task DeleteNotificationRecipientUser_ApiManagementDeleteNotificationRecipientUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteNotificationRecipientUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteNotificationRecipientUser.json // this example is just showing the usage of "NotificationRecipientUser_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -203,7 +203,7 @@ public async Task DeleteNotificationRecipientUser_ApiManagementDeleteNotificatio [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNotificationRecipientEmails_ApiManagementListNotificationRecipientEmails() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListNotificationRecipientEmails.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListNotificationRecipientEmails.json // this example is just showing the usage of "NotificationRecipientEmail_ListByNotification" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -234,7 +234,7 @@ public async Task GetNotificationRecipientEmails_ApiManagementListNotificationRe [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckNotificationRecipientEmailEntityExists_ApiManagementHeadNotificationRecipientEmail() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadNotificationRecipientEmail.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadNotificationRecipientEmail.json // this example is just showing the usage of "NotificationRecipientEmail_CheckEntityExists" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -263,7 +263,7 @@ public async Task CheckNotificationRecipientEmailEntityExists_ApiManagementHeadN [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdateNotificationRecipientEmail_ApiManagementCreateNotificationRecipientEmail() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateNotificationRecipientEmail.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateNotificationRecipientEmail.json // this example is just showing the usage of "NotificationRecipientEmail_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -292,7 +292,7 @@ public async Task CreateOrUpdateNotificationRecipientEmail_ApiManagementCreateNo [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task DeleteNotificationRecipientEmail_ApiManagementDeleteNotificationRecipientEmail() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteNotificationRecipientEmail.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteNotificationRecipientEmail.json // this example is just showing the usage of "NotificationRecipientEmail_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementOpenIdConnectProviderCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementOpenIdConnectProviderCollection.cs index 6ae88665f4054..6a410c3d6856a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementOpenIdConnectProviderCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementOpenIdConnectProviderCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementOpenIdConnectProviderCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListOpenIdConnectProviders() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListOpenIdConnectProviders.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListOpenIdConnectProviders.json // this example is just showing the usage of "OpenIdConnectProvider_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_ApiManagementListOpenIdConnectProviders() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetOpenIdConnectProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetOpenIdConnectProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetOpenIdConnectProvider.json // this example is just showing the usage of "OpenIdConnectProvider_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_ApiManagementGetOpenIdConnectProvider() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetOpenIdConnectProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetOpenIdConnectProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetOpenIdConnectProvider.json // this example is just showing the usage of "OpenIdConnectProvider_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Exists_ApiManagementGetOpenIdConnectProvider() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetOpenIdConnectProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetOpenIdConnectProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetOpenIdConnectProvider.json // this example is just showing the usage of "OpenIdConnectProvider_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -165,7 +165,7 @@ public async Task GetIfExists_ApiManagementGetOpenIdConnectProvider() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateOpenIdConnectProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateOpenIdConnectProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateOpenIdConnectProvider.json // this example is just showing the usage of "OpenIdConnectProvider_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -192,6 +192,8 @@ public async Task CreateOrUpdate_ApiManagementCreateOpenIdConnectProvider() MetadataEndpoint = "https://oidprovider-template3.net", ClientId = "oidprovidertemplate3", ClientSecret = "x", + UseInTestConsole = false, + UseInApiDocumentation = true, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, openId, data); ApiManagementOpenIdConnectProviderResource result = lro.Value; diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementOpenIdConnectProviderResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementOpenIdConnectProviderResource.cs index 00275dcbbfeb0..57211f17a7912 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementOpenIdConnectProviderResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementOpenIdConnectProviderResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementOpenIdConnectProviderResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadOpenIdConnectProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadOpenIdConnectProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadOpenIdConnectProvider.json // this example is just showing the usage of "OpenIdConnectProvider_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadOpenIdConnectProvider() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetOpenIdConnectProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetOpenIdConnectProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetOpenIdConnectProvider.json // this example is just showing the usage of "OpenIdConnectProvider_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetOpenIdConnectProvider() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateOpenIdConnectProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateOpenIdConnectProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateOpenIdConnectProvider.json // this example is just showing the usage of "OpenIdConnectProvider_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -102,6 +102,8 @@ public async Task Update_ApiManagementUpdateOpenIdConnectProvider() ApiManagementOpenIdConnectProviderPatch patch = new ApiManagementOpenIdConnectProviderPatch() { ClientSecret = "updatedsecret", + UseInTestConsole = false, + UseInApiDocumentation = true, }; ApiManagementOpenIdConnectProviderResource result = await apiManagementOpenIdConnectProvider.UpdateAsync(ifMatch, patch); @@ -117,7 +119,7 @@ public async Task Update_ApiManagementUpdateOpenIdConnectProvider() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteOpenIdConnectProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteOpenIdConnectProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteOpenIdConnectProvider.json // this example is just showing the usage of "OpenIdConnectProvider_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -146,7 +148,7 @@ public async Task Delete_ApiManagementDeleteOpenIdConnectProvider() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSecrets_ApiManagementOpenidConnectProviderListSecrets() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementOpenidConnectProviderListSecrets.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementOpenidConnectProviderListSecrets.json // this example is just showing the usage of "OpenIdConnectProvider_ListSecrets" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPolicyCollection.cs index 07c3357ac55c8..1b7e3e9bed7ba 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPolicyCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementPolicyCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListPolicies() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListPolicies.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPolicies.json // this example is just showing the usage of "Policy_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ApiManagementListPolicies() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicy.json // this example is just showing the usage of "Policy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicy.json // this example is just showing the usage of "Policy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicy.json // this example is just showing the usage of "Policy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_ApiManagementGetPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetPolicyFormat() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPolicyFormat.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicyFormat.json // this example is just showing the usage of "Policy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -202,7 +202,7 @@ public async Task Get_ApiManagementGetPolicyFormat() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetPolicyFormat() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPolicyFormat.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicyFormat.json // this example is just showing the usage of "Policy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -234,7 +234,7 @@ public async Task Exists_ApiManagementGetPolicyFormat() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetPolicyFormat() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPolicyFormat.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicyFormat.json // this example is just showing the usage of "Policy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -278,7 +278,7 @@ public async Task GetIfExists_ApiManagementGetPolicyFormat() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreatePolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreatePolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreatePolicy.json // this example is just showing the usage of "Policy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPolicyResource.cs index ee134cb81dd25..dbd31607d9f4a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPolicyResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementPolicyResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadPolicy.json // this example is just showing the usage of "Policy_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicy.json // this example is just showing the usage of "Policy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetPolicyFormat() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPolicyFormat.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicyFormat.json // this example is just showing the usage of "Policy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -113,7 +113,7 @@ public async Task Get_ApiManagementGetPolicyFormat() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreatePolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreatePolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreatePolicy.json // this example is just showing the usage of "Policy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -151,7 +151,7 @@ public async Task Update_ApiManagementCreatePolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeletePolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeletePolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeletePolicy.json // this example is just showing the usage of "Policy_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalDelegationSettingResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalDelegationSettingResource.cs index 05d522700b18f..8fd954dd69301 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalDelegationSettingResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalDelegationSettingResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementPortalDelegationSettingResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadDelegationSettings() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadDelegationSettings.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadDelegationSettings.json // this example is just showing the usage of "DelegationSettings_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -47,7 +47,7 @@ public async Task GetEntityTag_ApiManagementHeadDelegationSettings() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementPortalSettingsGetDelegation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementPortalSettingsGetDelegation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsGetDelegation.json // this example is just showing the usage of "DelegationSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Get_ApiManagementPortalSettingsGetDelegation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementPortalSettingsUpdateDelegation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementPortalSettingsUpdateDelegation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsUpdateDelegation.json // this example is just showing the usage of "DelegationSettings_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -113,7 +113,7 @@ public async Task Update_ApiManagementPortalSettingsUpdateDelegation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementPortalSettingsUpdateDelegation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementPortalSettingsPutDelegation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsPutDelegation.json // this example is just showing the usage of "DelegationSettings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -153,7 +153,7 @@ public async Task CreateOrUpdate_ApiManagementPortalSettingsUpdateDelegation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSecrets_ApiManagementListSecretsPortalSettings() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListSecretsPortalSettingsValidationKey.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListSecretsPortalSettingsValidationKey.json // this example is just showing the usage of "DelegationSettings_ListSecrets" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalRevisionCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalRevisionCollection.cs index 7412aeadfddc4..0913c26b2a50f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalRevisionCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalRevisionCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementPortalRevisionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListPortalRevisions() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListPortalRevisions.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPortalRevisions.json // this example is just showing the usage of "PortalRevision_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_ApiManagementListPortalRevisions() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetPortalRevision() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPortalRevision.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPortalRevision.json // this example is just showing the usage of "PortalRevision_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_ApiManagementGetPortalRevision() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetPortalRevision() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPortalRevision.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPortalRevision.json // this example is just showing the usage of "PortalRevision_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Exists_ApiManagementGetPortalRevision() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetPortalRevision() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPortalRevision.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPortalRevision.json // this example is just showing the usage of "PortalRevision_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -165,7 +165,7 @@ public async Task GetIfExists_ApiManagementGetPortalRevision() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreatePortalRevision() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreatePortalRevision.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreatePortalRevision.json // this example is just showing the usage of "PortalRevision_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalRevisionResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalRevisionResource.cs index 5d5a486bc20b7..7092ff48e33d5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalRevisionResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalRevisionResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementPortalRevisionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadPortalRevision() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadPortalRevision.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadPortalRevision.json // this example is just showing the usage of "PortalRevision_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -47,7 +47,7 @@ public async Task GetEntityTag_ApiManagementHeadPortalRevision() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetPortalRevision() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPortalRevision.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPortalRevision.json // this example is just showing the usage of "PortalRevision_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +79,7 @@ public async Task Get_ApiManagementGetPortalRevision() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdatePortalRevision() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdatePortalRevision.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdatePortalRevision.json // this example is just showing the usage of "PortalRevision_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalSignInSettingResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalSignInSettingResource.cs index abfffb1736507..d9781327e715b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalSignInSettingResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalSignInSettingResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementPortalSignInSettingResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadSignInSettings() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadSignInSettings.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadSignInSettings.json // this example is just showing the usage of "SignInSettings_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -46,7 +46,7 @@ public async Task GetEntityTag_ApiManagementHeadSignInSettings() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementPortalSettingsGetSignIn() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementPortalSettingsGetSignIn.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsGetSignIn.json // this example is just showing the usage of "SignInSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -77,7 +77,7 @@ public async Task Get_ApiManagementPortalSettingsGetSignIn() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementPortalSettingsUpdateSignIn() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementPortalSettingsUpdateSignIn.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsUpdateSignIn.json // this example is just showing the usage of "SignInSettings_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -109,7 +109,7 @@ public async Task Update_ApiManagementPortalSettingsUpdateSignIn() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementPortalSettingsUpdateSignIn() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementPortalSettingsPutSignIn.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsPutSignIn.json // this example is just showing the usage of "SignInSettings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalSignUpSettingResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalSignUpSettingResource.cs index 6e793a7718e45..bf5b631bb8c5d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalSignUpSettingResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalSignUpSettingResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementPortalSignUpSettingResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadSignUpSettings() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadSignUpSettings.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadSignUpSettings.json // this example is just showing the usage of "SignUpSettings_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -47,7 +47,7 @@ public async Task GetEntityTag_ApiManagementHeadSignUpSettings() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementPortalSettingsGetSignUp() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementPortalSettingsGetSignUp.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsGetSignUp.json // this example is just showing the usage of "SignUpSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Get_ApiManagementPortalSettingsGetSignUp() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementPortalSettingsUpdateSignUp() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementPortalSettingsUpdateSignUp.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsUpdateSignUp.json // this example is just showing the usage of "SignUpSettings_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -116,7 +116,7 @@ public async Task Update_ApiManagementPortalSettingsUpdateSignUp() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementPortalSettingsUpdateSignUp() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementPortalSettingsPutSignUp.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalSettingsPutSignUp.json // this example is just showing the usage of "SignUpSettings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateEndpointConnectionCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateEndpointConnectionCollection.cs index 004f978e0c0db..e34c4b69851d3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateEndpointConnectionCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateEndpointConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementPrivateEndpointConnectionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListPrivateEndpointConnections() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListPrivateEndpointConnections.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPrivateEndpointConnections.json // this example is just showing the usage of "PrivateEndpointConnection_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ApiManagementListPrivateEndpointConnections() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetPrivateEndpointConnection() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPrivateEndpointConnection.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnection_GetByName" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetPrivateEndpointConnection() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPrivateEndpointConnection.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnection_GetByName" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetPrivateEndpointConnection() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPrivateEndpointConnection.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnection_GetByName" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_ApiManagementGetPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementApproveOrRejectPrivateEndpointConnection() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementApproveOrRejectPrivateEndpointConnection.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementApproveOrRejectPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnection_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateEndpointConnectionResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateEndpointConnectionResource.cs index 2a62945a81819..b1ac61ee32eeb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateEndpointConnectionResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateEndpointConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementPrivateEndpointConnectionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetPrivateEndpointConnection() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPrivateEndpointConnection.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnection_GetByName" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_ApiManagementGetPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementApproveOrRejectPrivateEndpointConnection() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementApproveOrRejectPrivateEndpointConnection.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementApproveOrRejectPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnection_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -94,7 +94,7 @@ public async Task Update_ApiManagementApproveOrRejectPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeletePrivateEndpointConnection() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeletePrivateEndpointConnection.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeletePrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnection_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateLinkResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateLinkResource.cs index e90b0f14191d5..5b6645f001dc5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateLinkResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateLinkResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementPrivateLinkResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetPrivateLinkGroupResource() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPrivateLinkGroupResource.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPrivateLinkGroupResource.json // this example is just showing the usage of "PrivateEndpointConnection_GetPrivateLinkResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateLinkResourceCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateLinkResourceCollection.cs index be4fb5341a80d..2b602da00dd30 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateLinkResourceCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateLinkResourceCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementPrivateLinkResourceCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListPrivateLinkGroupResources() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListPrivateLinkGroupResources.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPrivateLinkGroupResources.json // this example is just showing the usage of "PrivateEndpointConnection_ListPrivateLinkResources" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_ApiManagementListPrivateLinkGroupResources() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetPrivateLinkGroupResource() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPrivateLinkGroupResource.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPrivateLinkGroupResource.json // this example is just showing the usage of "PrivateEndpointConnection_GetPrivateLinkResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_ApiManagementGetPrivateLinkGroupResource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetPrivateLinkGroupResource() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPrivateLinkGroupResource.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPrivateLinkGroupResource.json // this example is just showing the usage of "PrivateEndpointConnection_GetPrivateLinkResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Exists_ApiManagementGetPrivateLinkGroupResource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetPrivateLinkGroupResource() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetPrivateLinkGroupResource.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPrivateLinkGroupResource.json // this example is just showing the usage of "PrivateEndpointConnection_GetPrivateLinkResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductCollection.cs index a73c1a5ec2d72..2bd49190a1306 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementProductCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListProducts() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListProducts.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProducts.json // this example is just showing the usage of "Product_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_ApiManagementListProducts() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetProduct() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetProduct.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProduct.json // this example is just showing the usage of "Product_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_ApiManagementGetProduct() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetProduct() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetProduct.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProduct.json // this example is just showing the usage of "Product_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Exists_ApiManagementGetProduct() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetProduct() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetProduct.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProduct.json // this example is just showing the usage of "Product_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -165,7 +165,7 @@ public async Task GetIfExists_ApiManagementGetProduct() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateProduct() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateProduct.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateProduct.json // this example is just showing the usage of "Product_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductPolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductPolicyCollection.cs index d59eb7657c85d..abc0de837cb5a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductPolicyCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementProductPolicyCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListProductPolicies() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListProductPolicies.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProductPolicies.json // this example is just showing the usage of "ProductPolicy_ListByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task GetAll_ApiManagementListProductPolicies() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetProductPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetProductPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProductPolicy.json // this example is just showing the usage of "ProductPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -94,7 +94,7 @@ public async Task Get_ApiManagementGetProductPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetProductPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetProductPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProductPolicy.json // this example is just showing the usage of "ProductPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task Exists_ApiManagementGetProductPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetProductPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetProductPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProductPolicy.json // this example is just showing the usage of "ProductPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -170,7 +170,7 @@ public async Task GetIfExists_ApiManagementGetProductPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateProductPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateProductPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateProductPolicy.json // this example is just showing the usage of "ProductPolicy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductPolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductPolicyResource.cs index 74a9ad0995897..04261553a69f8 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductPolicyResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementProductPolicyResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadProductPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadProductPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadProductPolicy.json // this example is just showing the usage of "ProductPolicy_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -49,7 +49,7 @@ public async Task GetEntityTag_ApiManagementHeadProductPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetProductPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetProductPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProductPolicy.json // this example is just showing the usage of "ProductPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task Get_ApiManagementGetProductPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreateProductPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateProductPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateProductPolicy.json // this example is just showing the usage of "ProductPolicy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -121,7 +121,7 @@ public async Task Update_ApiManagementCreateProductPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteProductPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteProductPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteProductPolicy.json // this example is just showing the usage of "ProductPolicy_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductResource.cs index 811992c8000e9..cc580d8e6ed91 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementProductResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadProduct() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadProduct.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadProduct.json // this example is just showing the usage of "Product_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadProduct() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetProduct() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetProduct.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProduct.json // this example is just showing the usage of "Product_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetProduct() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateProduct() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateProduct.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateProduct.json // this example is just showing the usage of "Product_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -117,7 +117,7 @@ public async Task Update_ApiManagementUpdateProduct() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteProduct() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteProduct.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteProduct.json // this example is just showing the usage of "Product_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -147,7 +147,7 @@ public async Task Delete_ApiManagementDeleteProduct() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetProductApis_ApiManagementListProductApis() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListProductApis.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProductApis.json // this example is just showing the usage of "ProductApi_ListByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -178,7 +178,7 @@ public async Task GetProductApis_ApiManagementListProductApis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckProductApiEntityExists_ApiManagementHeadProductApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadProductApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadProductApi.json // this example is just showing the usage of "ProductApi_CheckEntityExists" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -207,7 +207,7 @@ public async Task CheckProductApiEntityExists_ApiManagementHeadProductApi() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdateProductApi_ApiManagementCreateProductApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateProductApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateProductApi.json // this example is just showing the usage of "ProductApi_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -236,7 +236,7 @@ public async Task CreateOrUpdateProductApi_ApiManagementCreateProductApi() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task DeleteProductApi_ApiManagementDeleteProductApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteProductApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteProductApi.json // this example is just showing the usage of "ProductApi_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -265,7 +265,7 @@ public async Task DeleteProductApi_ApiManagementDeleteProductApi() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetProductGroups_ApiManagementListProductGroups() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListProductGroups.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProductGroups.json // this example is just showing the usage of "ProductGroup_ListByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -296,7 +296,7 @@ public async Task GetProductGroups_ApiManagementListProductGroups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckProductGroupEntityExists_ApiManagementHeadProductGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadProductGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadProductGroup.json // this example is just showing the usage of "ProductGroup_CheckEntityExists" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -325,7 +325,7 @@ public async Task CheckProductGroupEntityExists_ApiManagementHeadProductGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdateProductGroup_ApiManagementCreateProductGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateProductGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateProductGroup.json // this example is just showing the usage of "ProductGroup_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -354,7 +354,7 @@ public async Task CreateOrUpdateProductGroup_ApiManagementCreateProductGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task DeleteProductGroup_ApiManagementDeleteProductGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteProductGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteProductGroup.json // this example is just showing the usage of "ProductGroup_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -383,7 +383,7 @@ public async Task DeleteProductGroup_ApiManagementDeleteProductGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAllProductSubscriptionData_ApiManagementListProductSubscriptions() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListProductSubscriptions.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProductSubscriptions.json // this example is just showing the usage of "ProductSubscriptions_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductTagCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductTagCollection.cs index aff937ff2e3cf..fcbf5cc15a047 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductTagCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductTagCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementProductTagCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListProductTags() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListProductTags.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProductTags.json // this example is just showing the usage of "Tag_ListByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ApiManagementListProductTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetProductTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetProductTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProductTag.json // this example is just showing the usage of "Tag_GetByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Get_ApiManagementGetProductTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetProductTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetProductTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProductTag.json // this example is just showing the usage of "Tag_GetByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -125,7 +125,7 @@ public async Task Exists_ApiManagementGetProductTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetProductTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetProductTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProductTag.json // this example is just showing the usage of "Tag_GetByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -169,7 +169,7 @@ public async Task GetIfExists_ApiManagementGetProductTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateProductTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateProductTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateProductTag.json // this example is just showing the usage of "Tag_AssignToProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductTagResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductTagResource.cs index c42db50e9b211..3604c2ccdd04d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductTagResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductTagResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementProductTagResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityStateByProduct_ApiManagementHeadProductTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadProductTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadProductTag.json // this example is just showing the usage of "Tag_GetEntityStateByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityStateByProduct_ApiManagementHeadProductTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetProductTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetProductTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProductTag.json // this example is just showing the usage of "Tag_GetByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -81,7 +81,7 @@ public async Task Get_ApiManagementGetProductTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreateProductTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateProductTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateProductTag.json // this example is just showing the usage of "Tag_AssignToProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -115,7 +115,7 @@ public async Task Update_ApiManagementCreateProductTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteProductTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteProductTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteProductTag.json // this example is just showing the usage of "Tag_DetachFromProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementServiceCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementServiceCollection.cs index 8b299b714d920..1134d250ae22a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementServiceCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementServiceCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_ApiManagementServiceCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateMultiRegionServiceWithCustomHostname() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateMultiRegionServiceWithCustomHostname.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateMultiRegionServiceWithCustomHostname.json // this example is just showing the usage of "ApiManagementService_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task CreateOrUpdate_ApiManagementCreateMultiRegionServiceWithCustom [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateService() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateService.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateService.json // this example is just showing the usage of "ApiManagementService_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -135,7 +135,7 @@ public async Task CreateOrUpdate_ApiManagementCreateService() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateServiceHavingMsi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateServiceHavingMsi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceHavingMsi.json // this example is just showing the usage of "ApiManagementService_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -180,7 +180,7 @@ public async Task CreateOrUpdate_ApiManagementCreateServiceHavingMsi() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateServiceInVnetWithPublicIP() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateServiceInVnetWithPublicIP.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceInVnetWithPublicIP.json // this example is just showing the usage of "ApiManagementService_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -234,7 +234,7 @@ public async Task CreateOrUpdate_ApiManagementCreateServiceInVnetWithPublicIP() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateServiceInZones() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateServiceInZones.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceInZones.json // this example is just showing the usage of "ApiManagementService_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -282,7 +282,7 @@ public async Task CreateOrUpdate_ApiManagementCreateServiceInZones() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateServiceWithCustomHostnameKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateServiceWithCustomHostnameKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceWithCustomHostnameKeyVault.json // this example is just showing the usage of "ApiManagementService_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -347,12 +347,57 @@ public async Task CreateOrUpdate_ApiManagementCreateServiceWithCustomHostnameKey Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + // ApiManagementCreateServiceWithNatGatewayEnabled + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApiManagementCreateServiceWithNatGatewayEnabled() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceWithNatGatewayEnabled.json + // this example is just showing the usage of "ApiManagementService_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ApiManagementServiceResource + ApiManagementServiceCollection collection = resourceGroupResource.GetApiManagementServices(); + + // invoke the operation + string serviceName = "apimService1"; + ApiManagementServiceData data = new ApiManagementServiceData(new AzureLocation("East US"), new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Premium, 1), "apim@autorestsdk.com", "autorestsdk") + { + NatGatewayState = ApiManagementNatGatewayState.Enabled, + Tags = +{ +["tag1"] = "value1", +["tag2"] = "value2", +["tag3"] = "value3", +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, serviceName, data); + ApiManagementServiceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ApiManagementServiceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + // ApiManagementCreateServiceWithSystemCertificates [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateServiceWithSystemCertificates() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateServiceWithSystemCertificates.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceWithSystemCertificates.json // this example is just showing the usage of "ApiManagementService_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -404,7 +449,7 @@ public async Task CreateOrUpdate_ApiManagementCreateServiceWithSystemCertificate [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateServiceWithUserAssignedIdentity() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateServiceWithUserAssignedIdentity.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateServiceWithUserAssignedIdentity.json // this example is just showing the usage of "ApiManagementService_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -455,7 +500,7 @@ public async Task CreateOrUpdate_ApiManagementCreateServiceWithUserAssignedIdent [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementUndelete() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUndelete.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUndelete.json // this example is just showing the usage of "ApiManagementService_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -494,7 +539,7 @@ public async Task CreateOrUpdate_ApiManagementUndelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementServiceGetMultiRegionInternalVnet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetMultiRegionInternalVnet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetMultiRegionInternalVnet.json // this example is just showing the usage of "ApiManagementService_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -528,7 +573,7 @@ public async Task Get_ApiManagementServiceGetMultiRegionInternalVnet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementServiceGetMultiRegionInternalVnet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetMultiRegionInternalVnet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetMultiRegionInternalVnet.json // this example is just showing the usage of "ApiManagementService_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -558,7 +603,7 @@ public async Task Exists_ApiManagementServiceGetMultiRegionInternalVnet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementServiceGetMultiRegionInternalVnet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetMultiRegionInternalVnet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetMultiRegionInternalVnet.json // this example is just showing the usage of "ApiManagementService_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -600,7 +645,7 @@ public async Task GetIfExists_ApiManagementServiceGetMultiRegionInternalVnet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementServiceGetService() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetService.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetService.json // this example is just showing the usage of "ApiManagementService_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -634,7 +679,7 @@ public async Task Get_ApiManagementServiceGetService() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementServiceGetService() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetService.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetService.json // this example is just showing the usage of "ApiManagementService_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -664,7 +709,7 @@ public async Task Exists_ApiManagementServiceGetService() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementServiceGetService() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetService.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetService.json // this example is just showing the usage of "ApiManagementService_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -706,7 +751,7 @@ public async Task GetIfExists_ApiManagementServiceGetService() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementServiceGetServiceHavingMsi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetServiceHavingMsi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetServiceHavingMsi.json // this example is just showing the usage of "ApiManagementService_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -740,7 +785,7 @@ public async Task Get_ApiManagementServiceGetServiceHavingMsi() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementServiceGetServiceHavingMsi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetServiceHavingMsi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetServiceHavingMsi.json // this example is just showing the usage of "ApiManagementService_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -770,7 +815,7 @@ public async Task Exists_ApiManagementServiceGetServiceHavingMsi() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementServiceGetServiceHavingMsi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetServiceHavingMsi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetServiceHavingMsi.json // this example is just showing the usage of "ApiManagementService_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -812,7 +857,7 @@ public async Task GetIfExists_ApiManagementServiceGetServiceHavingMsi() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListServiceBySubscriptionAndResourceGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListServiceBySubscriptionAndResourceGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListServiceBySubscriptionAndResourceGroup.json // this example is just showing the usage of "ApiManagementService_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementServiceResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementServiceResource.cs index 4cc5bd445ae1e..5d370275d221f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementServiceResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementServiceResource.cs @@ -22,7 +22,7 @@ public partial class Sample_ApiManagementServiceResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetApisByTags_ApiManagementListApisByTags() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApisByTags.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApisByTags.json // this example is just showing the usage of "Api_ListByTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task GetApisByTags_ApiManagementListApisByTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task PerformConnectivityCheckAsync_HTTPConnectivityCheck() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementPerformConnectivityCheckHttpConnect.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPerformConnectivityCheckHttpConnect.json // this example is just showing the usage of "PerformConnectivityCheckAsync" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -81,7 +81,7 @@ public async Task PerformConnectivityCheckAsync_HTTPConnectivityCheck() }, Headers = { -new HttpHeaderConfiguration("Authorization","Bearer myPreciousToken") +new HttpHeaderConfiguration("Authorization","******") }, }, }; @@ -96,7 +96,7 @@ public async Task PerformConnectivityCheckAsync_HTTPConnectivityCheck() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task PerformConnectivityCheckAsync_TCPConnectivityCheck() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementPerformConnectivityCheck.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPerformConnectivityCheck.json // this example is just showing the usage of "PerformConnectivityCheckAsync" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,7 +128,7 @@ public async Task PerformConnectivityCheckAsync_TCPConnectivityCheck() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetContentTypes_ApiManagementListContentTypes() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListContentTypes.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListContentTypes.json // this example is just showing the usage of "ContentType_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -158,7 +158,7 @@ public async Task GetContentTypes_ApiManagementListContentTypes() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetContentType_ApiManagementGetContentType() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetContentType.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetContentType.json // this example is just showing the usage of "ContentType_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -186,7 +186,7 @@ public async Task GetContentType_ApiManagementGetContentType() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdateContentType_ApiManagementCreateContentType() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateContentType.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateContentType.json // this example is just showing the usage of "ContentType_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -214,7 +214,7 @@ public async Task CreateOrUpdateContentType_ApiManagementCreateContentType() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task DeleteContentType_ApiManagementDeleteContentType() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteContentType.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteContentType.json // this example is just showing the usage of "ContentType_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -243,7 +243,7 @@ public async Task DeleteContentType_ApiManagementDeleteContentType() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetContentItems_ApiManagementListContentTypeContentItems() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListContentTypeContentItems.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListContentTypeContentItems.json // this example is just showing the usage of "ContentItem_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -274,7 +274,7 @@ public async Task GetContentItems_ApiManagementListContentTypeContentItems() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetContentItemEntityTag_ApiManagementHeadContentTypeContentItem() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadContentTypeContentItem.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadContentTypeContentItem.json // this example is just showing the usage of "ContentItem_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -303,7 +303,7 @@ public async Task GetContentItemEntityTag_ApiManagementHeadContentTypeContentIte [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetContentItem_ApiManagementGetContentTypeContentItem() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetContentTypeContentItem.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetContentTypeContentItem.json // this example is just showing the usage of "ContentItem_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -332,7 +332,7 @@ public async Task GetContentItem_ApiManagementGetContentTypeContentItem() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdateContentItem_ApiManagementCreateContentTypeContentItem() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateContentTypeContentItem.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateContentTypeContentItem.json // this example is just showing the usage of "ContentItem_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -361,7 +361,7 @@ public async Task CreateOrUpdateContentItem_ApiManagementCreateContentTypeConten [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task DeleteContentItem_ApiManagementDeleteContentTypeContentItem() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteContentTypeContentItem.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteContentTypeContentItem.json // this example is just showing the usage of "ContentItem_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -391,7 +391,7 @@ public async Task DeleteContentItem_ApiManagementDeleteContentTypeContentItem() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAvailableApiManagementServiceSkus_ApiManagementListSKUsConsumption() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListSKUs-Consumption.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListSKUs-Consumption.json // this example is just showing the usage of "ApiManagementServiceSkus_ListAvailableServiceSkus" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -421,7 +421,7 @@ public async Task GetAvailableApiManagementServiceSkus_ApiManagementListSKUsCons [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAvailableApiManagementServiceSkus_ApiManagementListSKUsDedicated() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListSKUs-Dedicated.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListSKUs-Dedicated.json // this example is just showing the usage of "ApiManagementServiceSkus_ListAvailableServiceSkus" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -451,7 +451,7 @@ public async Task GetAvailableApiManagementServiceSkus_ApiManagementListSKUsDedi [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Restore_ApiManagementRestoreService() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementRestoreWithAccessKey.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementRestoreWithAccessKey.json // this example is just showing the usage of "ApiManagementService_Restore" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -488,7 +488,7 @@ public async Task Restore_ApiManagementRestoreService() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Backup_ApiManagementBackupWithAccessKey() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementBackupWithAccessKey.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackupWithAccessKey.json // this example is just showing the usage of "ApiManagementService_Backup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -525,7 +525,7 @@ public async Task Backup_ApiManagementBackupWithAccessKey() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Backup_ApiManagementBackupWithSystemManagedIdentity() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementBackupWithSystemManagedIdentity.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackupWithSystemManagedIdentity.json // this example is just showing the usage of "ApiManagementService_Backup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -561,7 +561,7 @@ public async Task Backup_ApiManagementBackupWithSystemManagedIdentity() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Backup_ApiManagementBackupWithUserAssignedManagedIdentity() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementBackupWithUserAssignedManagedIdentity.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementBackupWithUserAssignedManagedIdentity.json // this example is just showing the usage of "ApiManagementService_Backup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -598,7 +598,7 @@ public async Task Backup_ApiManagementBackupWithUserAssignedManagedIdentity() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateServiceDisableTls10() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateServiceDisableTls10.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateServiceDisableTls10.json // this example is just showing the usage of "ApiManagementService_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -637,7 +637,7 @@ public async Task Update_ApiManagementUpdateServiceDisableTls10() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateServicePublisherDetails() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateServicePublisherDetails.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateServicePublisherDetails.json // this example is just showing the usage of "ApiManagementService_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -674,7 +674,7 @@ public async Task Update_ApiManagementUpdateServicePublisherDetails() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateServiceToNewVnetAndAvailabilityZones() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateServiceToNewVnetAndAZs.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateServiceToNewVnetAndAZs.json // this example is just showing the usage of "ApiManagementService_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -735,7 +735,7 @@ public async Task Update_ApiManagementUpdateServiceToNewVnetAndAvailabilityZones [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementServiceGetMultiRegionInternalVnet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetMultiRegionInternalVnet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetMultiRegionInternalVnet.json // this example is just showing the usage of "ApiManagementService_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -766,7 +766,7 @@ public async Task Get_ApiManagementServiceGetMultiRegionInternalVnet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementServiceGetService() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetService.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetService.json // this example is just showing the usage of "ApiManagementService_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -797,7 +797,7 @@ public async Task Get_ApiManagementServiceGetService() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementServiceGetServiceHavingMsi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetServiceHavingMsi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetServiceHavingMsi.json // this example is just showing the usage of "ApiManagementService_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -828,7 +828,7 @@ public async Task Get_ApiManagementServiceGetServiceHavingMsi() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementServiceDeleteService() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceDeleteService.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceDeleteService.json // this example is just showing the usage of "ApiManagementService_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -850,12 +850,44 @@ public async Task Delete_ApiManagementServiceDeleteService() Console.WriteLine($"Succeeded"); } + // ApiManagementMigrateService + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task MigrateToStv2_ApiManagementMigrateService() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceMigrateToStv2.json + // this example is just showing the usage of "ApiManagementService_MigrateToStv2" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // invoke the operation + ArmOperation lro = await apiManagementService.MigrateToStv2Async(WaitUntil.Completed); + ApiManagementServiceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ApiManagementServiceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + // ApiManagementListServiceBySubscription [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetApiManagementServices_ApiManagementListServiceBySubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListServiceBySubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListServiceBySubscription.json // this example is just showing the usage of "ApiManagementService_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -887,7 +919,7 @@ public async Task GetApiManagementServices_ApiManagementListServiceBySubscriptio [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSsoToken_ApiManagementServiceGetSsoToken() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetSsoToken.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetSsoToken.json // this example is just showing the usage of "ApiManagementService_GetSsoToken" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -914,7 +946,7 @@ public async Task GetSsoToken_ApiManagementServiceGetSsoToken() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckApiManagementServiceNameAvailability_ApiManagementServiceCheckNameAvailability() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceCheckNameAvailability.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceCheckNameAvailability.json // this example is just showing the usage of "ApiManagementService_CheckNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -940,7 +972,7 @@ public async Task CheckApiManagementServiceNameAvailability_ApiManagementService [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetApiManagementServiceDomainOwnershipIdentifier_ApiManagementServiceGetDomainOwnershipIdentifier() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetDomainOwnershipIdentifier.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetDomainOwnershipIdentifier.json // this example is just showing the usage of "ApiManagementService_GetDomainOwnershipIdentifier" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -965,7 +997,7 @@ public async Task GetApiManagementServiceDomainOwnershipIdentifier_ApiManagement [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ApplyNetworkConfigurationUpdates_ApiManagementApplyNetworkConfigurationUpdates() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementApplyNetworkConfigurationUpdates.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementApplyNetworkConfigurationUpdates.json // this example is just showing the usage of "ApiManagementService_ApplyNetworkConfigurationUpdates" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1001,7 +1033,7 @@ public async Task ApplyNetworkConfigurationUpdates_ApiManagementApplyNetworkConf [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkStatuses_ApiManagementServiceGetNetworkStatus() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetNetworkStatus.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetNetworkStatus.json // this example is just showing the usage of "NetworkStatus_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1031,7 +1063,7 @@ public async Task GetNetworkStatuses_ApiManagementServiceGetNetworkStatus() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkStatusByLocation_ApiManagementServiceGetNetworkStatusByLocation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetNetworkStatusByLocation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetNetworkStatusByLocation.json // this example is just showing the usage of "NetworkStatus_ListByLocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1059,7 +1091,7 @@ public async Task GetNetworkStatusByLocation_ApiManagementServiceGetNetworkStatu [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetOutboundNetworkDependenciesEndpoints_ApiManagementServiceGetOutboundNetworkDependenciesEndpoints() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementServiceGetOutboundNetworkDependenciesEndpoints.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementServiceGetOutboundNetworkDependenciesEndpoints.json // this example is just showing the usage of "OutboundNetworkDependenciesEndpoints_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1089,7 +1121,7 @@ public async Task GetOutboundNetworkDependenciesEndpoints_ApiManagementServiceGe [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetPolicyDescriptions_ApiManagementListPolicyDescriptions() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListPolicyDescriptions.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPolicyDescriptions.json // this example is just showing the usage of "PolicyDescription_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1120,7 +1152,7 @@ public async Task GetPolicyDescriptions_ApiManagementListPolicyDescriptions() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetPortalSettings_ApiManagementListPortalSettings() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListPortalSettings.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPortalSettings.json // this example is just showing the usage of "PortalSettings_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1150,7 +1182,7 @@ public async Task GetPortalSettings_ApiManagementListPortalSettings() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetProductsByTags_ApiManagementListProductsByTags() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListProductsByTags.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListProductsByTags.json // this example is just showing the usage of "Product_ListByTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1180,7 +1212,7 @@ public async Task GetProductsByTags_ApiManagementListProductsByTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetQuotaByCounterKeys_ApiManagementGetQuotaCounterKeys() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetQuotaCounterKeys.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetQuotaCounterKeys.json // this example is just showing the usage of "QuotaByCounterKeys_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1211,7 +1243,7 @@ public async Task GetQuotaByCounterKeys_ApiManagementGetQuotaCounterKeys() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task UpdateQuotaByCounterKeys_ApiManagementUpdateQuotaCounterKey() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateQuotaCounterKey.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateQuotaCounterKey.json // this example is just showing the usage of "QuotaByCounterKeys_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1247,7 +1279,7 @@ public async Task UpdateQuotaByCounterKeys_ApiManagementUpdateQuotaCounterKey() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetQuotaByPeriodKey_ApiManagementGetQuotaCounterKeysByQuotaPeriod() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetQuotaCounterKeysByQuotaPeriod.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetQuotaCounterKeysByQuotaPeriod.json // this example is just showing the usage of "QuotaByPeriodKeys_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1276,7 +1308,7 @@ public async Task GetQuotaByPeriodKey_ApiManagementGetQuotaCounterKeysByQuotaPer [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task UpdateQuotaByPeriodKey_ApiManagementUpdateQuotaCounterKeyByQuotaPeriod() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateQuotaCounterKeyByQuotaPeriod.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateQuotaCounterKeyByQuotaPeriod.json // this example is just showing the usage of "QuotaByPeriodKeys_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1310,7 +1342,7 @@ public async Task UpdateQuotaByPeriodKey_ApiManagementUpdateQuotaCounterKeyByQuo [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetRegions_ApiManagementListRegions() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListRegions.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListRegions.json // this example is just showing the usage of "Region_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1340,7 +1372,7 @@ public async Task GetRegions_ApiManagementListRegions() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetReportsByApi_ApiManagementGetReportsByApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetReportsByApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsByApi.json // this example is just showing the usage of "Reports_ListByApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1371,7 +1403,7 @@ public async Task GetReportsByApi_ApiManagementGetReportsByApi() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetReportsByUser_ApiManagementGetReportsByUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetReportsByUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsByUser.json // this example is just showing the usage of "Reports_ListByUser" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1402,7 +1434,7 @@ public async Task GetReportsByUser_ApiManagementGetReportsByUser() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetReportsByOperation_ApiManagementGetReportsByOperation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetReportsByOperation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsByOperation.json // this example is just showing the usage of "Reports_ListByOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1433,7 +1465,7 @@ public async Task GetReportsByOperation_ApiManagementGetReportsByOperation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetReportsByProduct_ApiManagementGetReportsByProduct() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetReportsByProduct.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsByProduct.json // this example is just showing the usage of "Reports_ListByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1464,7 +1496,7 @@ public async Task GetReportsByProduct_ApiManagementGetReportsByProduct() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetReportsByGeo_ApiManagementGetReportsByGeo() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetReportsByGeo.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsByGeo.json // this example is just showing the usage of "Reports_ListByGeo" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1495,7 +1527,7 @@ public async Task GetReportsByGeo_ApiManagementGetReportsByGeo() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetReportsBySubscription_ApiManagementGetReportsBySubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetReportsBySubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsBySubscription.json // this example is just showing the usage of "Reports_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1526,7 +1558,7 @@ public async Task GetReportsBySubscription_ApiManagementGetReportsBySubscription [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetReportsByTime_ApiManagementGetReportsByTime() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetReportsByTime.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsByTime.json // this example is just showing the usage of "Reports_ListByTime" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1558,7 +1590,7 @@ public async Task GetReportsByTime_ApiManagementGetReportsByTime() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetReportsByRequest_ApiManagementGetReportsByRequest() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetReportsByRequest.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetReportsByRequest.json // this example is just showing the usage of "Reports_ListByRequest" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1589,7 +1621,7 @@ public async Task GetReportsByRequest_ApiManagementGetReportsByRequest() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetTagResources_ApiManagementListTagResources() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListTagResources.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListTagResources.json // this example is just showing the usage of "TagResource_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1619,7 +1651,7 @@ public async Task GetTagResources_ApiManagementListTagResources() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task DeployTenantConfiguration_ApiManagementTenantConfigurationDeploy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementTenantConfigurationDeploy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantConfigurationDeploy.json // this example is just showing the usage of "TenantConfiguration_Deploy" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1652,7 +1684,7 @@ public async Task DeployTenantConfiguration_ApiManagementTenantConfigurationDepl [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task SaveTenantConfiguration_ApiManagementTenantConfigurationSave() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementTenantConfigurationSave.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantConfigurationSave.json // this example is just showing the usage of "TenantConfiguration_Save" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1685,7 +1717,7 @@ public async Task SaveTenantConfiguration_ApiManagementTenantConfigurationSave() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ValidateTenantConfiguration_ApiManagementTenantConfigurationValidate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementTenantConfigurationValidate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantConfigurationValidate.json // this example is just showing the usage of "TenantConfiguration_Validate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1718,7 +1750,7 @@ public async Task ValidateTenantConfiguration_ApiManagementTenantConfigurationVa [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetTenantConfigurationSyncState_ApiManagementTenantAccessSyncState() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementTenantAccessSyncState.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantAccessSyncState.json // this example is just showing the usage of "TenantConfiguration_GetSyncState" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementSubscriptionCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementSubscriptionCollection.cs index 8d1d76203da1b..2e99158f2a9de 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementSubscriptionCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementSubscriptionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementSubscriptionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListSubscriptions() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListSubscriptions.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListSubscriptions.json // this example is just showing the usage of "Subscription_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ApiManagementListSubscriptions() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetSubscription.json // this example is just showing the usage of "Subscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetSubscription.json // this example is just showing the usage of "Subscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetSubscription.json // this example is just showing the usage of "Subscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_ApiManagementGetSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateSubscription.json // this example is just showing the usage of "Subscription_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementSubscriptionResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementSubscriptionResource.cs index 32ac2dc1add6a..24ba97772699d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementSubscriptionResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementSubscriptionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementSubscriptionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadSubscription.json // this example is just showing the usage of "Subscription_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetSubscription.json // this example is just showing the usage of "Subscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateSubscription.json // this example is just showing the usage of "Subscription_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -117,7 +117,7 @@ public async Task Update_ApiManagementUpdateSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteSubscription.json // this example is just showing the usage of "Subscription_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -146,7 +146,7 @@ public async Task Delete_ApiManagementDeleteSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task RegeneratePrimaryKey_ApiManagementSubscriptionRegeneratePrimaryKey() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementSubscriptionRegeneratePrimaryKey.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementSubscriptionRegeneratePrimaryKey.json // this example is just showing the usage of "Subscription_RegeneratePrimaryKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -174,7 +174,7 @@ public async Task RegeneratePrimaryKey_ApiManagementSubscriptionRegeneratePrimar [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task RegenerateSecondaryKey_ApiManagementSubscriptionRegenerateSecondaryKey() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementSubscriptionRegenerateSecondaryKey.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementSubscriptionRegenerateSecondaryKey.json // this example is just showing the usage of "Subscription_RegenerateSecondaryKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -202,7 +202,7 @@ public async Task RegenerateSecondaryKey_ApiManagementSubscriptionRegenerateSeco [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSecrets_ApiManagementSubscriptionListSecrets() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementSubscriptionListSecrets.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementSubscriptionListSecrets.json // this example is just showing the usage of "Subscription_ListSecrets" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTagCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTagCollection.cs index 9bddb78191745..ed2bfe2814db4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTagCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTagCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementTagCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListTags() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListTags.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListTags.json // this example is just showing the usage of "Tag_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ApiManagementListTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTag.json // this example is just showing the usage of "Tag_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTag.json // this example is just showing the usage of "Tag_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTag.json // this example is just showing the usage of "Tag_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_ApiManagementGetTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateTag.json // this example is just showing the usage of "Tag_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTagResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTagResource.cs index 2aa9ce4a248c2..4f7ee786c3f27 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTagResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTagResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementTagResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityState_ApiManagementHeadTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadTag.json // this example is just showing the usage of "Tag_GetEntityState" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityState_ApiManagementHeadTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTag.json // this example is just showing the usage of "Tag_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateTag.json // this example is just showing the usage of "Tag_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -117,7 +117,7 @@ public async Task Update_ApiManagementUpdateTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteTag.json // this example is just showing the usage of "Tag_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTenantSettingCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTenantSettingCollection.cs index 4304f3c6769ec..2c7cbb255a12f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTenantSettingCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTenantSettingCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementTenantSettingCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListTenantSettings() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListTenantSettings.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListTenantSettings.json // this example is just showing the usage of "TenantSettings_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ApiManagementListTenantSettings() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetTenantSettings() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTenantSettings.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTenantSettings.json // this example is just showing the usage of "TenantSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetTenantSettings() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetTenantSettings() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTenantSettings.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTenantSettings.json // this example is just showing the usage of "TenantSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetTenantSettings() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetTenantSettings() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTenantSettings.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTenantSettings.json // this example is just showing the usage of "TenantSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTenantSettingResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTenantSettingResource.cs index 73d1a74dac1db..f3a31657b2b9c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTenantSettingResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTenantSettingResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementTenantSettingResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetTenantSettings() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTenantSettings.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTenantSettings.json // this example is just showing the usage of "TenantSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserCollection.cs index 8816ebfd6aba6..6eef2aa4abdab 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementUserCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListUsers() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListUsers.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListUsers.json // this example is just showing the usage of "User_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ApiManagementListUsers() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetUser.json // this example is just showing the usage of "User_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetUser() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetUser.json // this example is just showing the usage of "User_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetUser() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetUser.json // this example is just showing the usage of "User_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_ApiManagementGetUser() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateUser.json // this example is just showing the usage of "User_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserResource.cs index cc2f51b959fd9..aa706a0c30f92 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementUserResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadUser.json // this example is just showing the usage of "User_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadUser() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetUser.json // this example is just showing the usage of "User_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetUser() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateUser.json // this example is just showing the usage of "User_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -119,7 +119,7 @@ public async Task Update_ApiManagementUpdateUser() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteUser.json // this example is just showing the usage of "User_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -148,7 +148,7 @@ public async Task Delete_ApiManagementDeleteUser() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GenerateSsoUri_ApiManagementUserGenerateSsoUrl() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUserGenerateSsoUrl.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUserGenerateSsoUrl.json // this example is just showing the usage of "User_GenerateSsoUri" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -176,7 +176,7 @@ public async Task GenerateSsoUri_ApiManagementUserGenerateSsoUrl() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSharedAccessToken_ApiManagementUserToken() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUserToken.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUserToken.json // this example is just showing the usage of "User_GetSharedAccessToken" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -209,7 +209,7 @@ public async Task GetSharedAccessToken_ApiManagementUserToken() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetUserGroups_ApiManagementListUserGroups() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListUserGroups.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListUserGroups.json // this example is just showing the usage of "UserGroup_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -244,7 +244,7 @@ public async Task GetUserGroups_ApiManagementListUserGroups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetUserIdentities_ApiManagementListUserIdentities() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListUserIdentities.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListUserIdentities.json // this example is just showing the usage of "UserIdentities_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -275,7 +275,7 @@ public async Task GetUserIdentities_ApiManagementListUserIdentities() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task SendUserConfirmationPassword_ApiManagementUserConfirmationPasswordSend() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUserConfirmationPasswordSend.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUserConfirmationPasswordSend.json // this example is just showing the usage of "UserConfirmationPassword_Send" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserSubscriptionCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserSubscriptionCollection.cs index 22e3bc963b2ab..029beb5576aa7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserSubscriptionCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserSubscriptionCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementUserSubscriptionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListUserSubscriptions() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListUserSubscriptions.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListUserSubscriptions.json // this example is just showing the usage of "UserSubscription_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ApiManagementListUserSubscriptions() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetUserSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetUserSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetUserSubscription.json // this example is just showing the usage of "UserSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Get_ApiManagementGetUserSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetUserSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetUserSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetUserSubscription.json // this example is just showing the usage of "UserSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -125,7 +125,7 @@ public async Task Exists_ApiManagementGetUserSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetUserSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetUserSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetUserSubscription.json // this example is just showing the usage of "UserSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserSubscriptionResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserSubscriptionResource.cs index ef2484a61627e..e63ab49383ade 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserSubscriptionResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserSubscriptionResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementUserSubscriptionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetUserSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetUserSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetUserSubscription.json // this example is just showing the usage of "UserSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationCollection.cs index 62ca5517ebbfe..07c7247225156 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiOperationCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListApiOperations() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiOperations.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiOperations.json // this example is just showing the usage of "ApiOperation_ListByApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task GetAll_ApiManagementListApiOperations() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiOperation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiOperation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperation.json // this example is just showing the usage of "ApiOperation_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -94,7 +94,7 @@ public async Task Get_ApiManagementGetApiOperation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetApiOperation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiOperation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperation.json // this example is just showing the usage of "ApiOperation_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task Exists_ApiManagementGetApiOperation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetApiOperation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiOperation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperation.json // this example is just showing the usage of "ApiOperation_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -170,7 +170,7 @@ public async Task GetIfExists_ApiManagementGetApiOperation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiOperationPetStore() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiOperationPetStore.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationPetStore.json // this example is just showing the usage of "ApiOperation_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -206,7 +206,7 @@ public async Task Get_ApiManagementGetApiOperationPetStore() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetApiOperationPetStore() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiOperationPetStore.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationPetStore.json // this example is just showing the usage of "ApiOperation_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -238,7 +238,7 @@ public async Task Exists_ApiManagementGetApiOperationPetStore() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetApiOperationPetStore() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiOperationPetStore.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationPetStore.json // this example is just showing the usage of "ApiOperation_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -282,7 +282,7 @@ public async Task GetIfExists_ApiManagementGetApiOperationPetStore() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiOperation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiOperation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiOperation.json // this example is just showing the usage of "ApiOperation_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationPolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationPolicyCollection.cs index c7da64fd86d64..eb98313c88871 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationPolicyCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiOperationPolicyCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListApiOperationPolicies() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiOperationPolicies.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiOperationPolicies.json // this example is just showing the usage of "ApiOperationPolicy_ListByOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -59,7 +59,7 @@ public async Task GetAll_ApiManagementListApiOperationPolicies() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiOperationPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiOperationPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationPolicy.json // this example is just showing the usage of "ApiOperationPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -96,7 +96,7 @@ public async Task Get_ApiManagementGetApiOperationPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetApiOperationPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiOperationPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationPolicy.json // this example is just showing the usage of "ApiOperationPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task Exists_ApiManagementGetApiOperationPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetApiOperationPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiOperationPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationPolicy.json // this example is just showing the usage of "ApiOperationPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -174,7 +174,7 @@ public async Task GetIfExists_ApiManagementGetApiOperationPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiOperationPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiOperationPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiOperationPolicy.json // this example is just showing the usage of "ApiOperationPolicy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationPolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationPolicyResource.cs index dd1dec4a90f84..76e6a943802aa 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationPolicyResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiOperationPolicyResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadApiOperationPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiOperationPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiOperationPolicy.json // this example is just showing the usage of "ApiOperationPolicy_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task GetEntityTag_ApiManagementHeadApiOperationPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiOperationPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiOperationPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationPolicy.json // this example is just showing the usage of "ApiOperationPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Get_ApiManagementGetApiOperationPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreateApiOperationPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiOperationPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiOperationPolicy.json // this example is just showing the usage of "ApiOperationPolicy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -125,7 +125,7 @@ public async Task Update_ApiManagementCreateApiOperationPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteApiOperationPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiOperationPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiOperationPolicy.json // this example is just showing the usage of "ApiOperationPolicy_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationResource.cs index b7e4074bb65e3..d6e7b5fddc69a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiOperationResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadApiOperation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiOperation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiOperation.json // this example is just showing the usage of "ApiOperation_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -49,7 +49,7 @@ public async Task GetEntityTag_ApiManagementHeadApiOperation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiOperation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiOperation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperation.json // this example is just showing the usage of "ApiOperation_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task Get_ApiManagementGetApiOperation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiOperationPetStore() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiOperationPetStore.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationPetStore.json // this example is just showing the usage of "ApiOperation_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -115,7 +115,7 @@ public async Task Get_ApiManagementGetApiOperationPetStore() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateApiOperation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateApiOperation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiOperation.json // this example is just showing the usage of "ApiOperation_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -196,7 +196,7 @@ public async Task Update_ApiManagementUpdateApiOperation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteApiOperation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiOperation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiOperation.json // this example is just showing the usage of "ApiOperation_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationTagCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationTagCollection.cs index 8b1733bc1a503..b171c82532215 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationTagCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationTagCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiOperationTagCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListApiOperationTags() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiOperationTags.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiOperationTags.json // this example is just showing the usage of "Tag_ListByOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task GetAll_ApiManagementListApiOperationTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiOperationTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiOperationTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationTag.json // this example is just showing the usage of "Tag_GetByOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task Get_ApiManagementGetApiOperationTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetApiOperationTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiOperationTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationTag.json // this example is just showing the usage of "Tag_GetByOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,7 +128,7 @@ public async Task Exists_ApiManagementGetApiOperationTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetApiOperationTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiOperationTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationTag.json // this example is just showing the usage of "Tag_GetByOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -173,7 +173,7 @@ public async Task GetIfExists_ApiManagementGetApiOperationTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiOperationTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiOperationTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiOperationTag.json // this example is just showing the usage of "Tag_AssignToOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationTagResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationTagResource.cs index ed5c97b565b3c..29996dd36f0e6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationTagResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationTagResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiOperationTagResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityStateByOperation_ApiManagementHeadApiOperationTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiOperationTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiOperationTag.json // this example is just showing the usage of "Tag_GetEntityStateByOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -49,7 +49,7 @@ public async Task GetEntityStateByOperation_ApiManagementHeadApiOperationTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiOperationTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiOperationTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiOperationTag.json // this example is just showing the usage of "Tag_GetByOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -83,7 +83,7 @@ public async Task Get_ApiManagementGetApiOperationTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreateApiOperationTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiOperationTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiOperationTag.json // this example is just showing the usage of "Tag_AssignToOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task Update_ApiManagementCreateApiOperationTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteApiOperationTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiOperationTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiOperationTag.json // this example is just showing the usage of "Tag_DetachFromOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiPolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiPolicyCollection.cs index a9c5e864b9f97..9bb3384129edc 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiPolicyCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiPolicyCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListApiPolicies() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiPolicies.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiPolicies.json // this example is just showing the usage of "ApiPolicy_ListByApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task GetAll_ApiManagementListApiPolicies() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiPolicy.json // this example is just showing the usage of "ApiPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -94,7 +94,7 @@ public async Task Get_ApiManagementGetApiPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetApiPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiPolicy.json // this example is just showing the usage of "ApiPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task Exists_ApiManagementGetApiPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetApiPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiPolicy.json // this example is just showing the usage of "ApiPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -170,7 +170,7 @@ public async Task GetIfExists_ApiManagementGetApiPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiPolicy.json // this example is just showing the usage of "ApiPolicy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -213,7 +213,7 @@ public async Task CreateOrUpdate_ApiManagementCreateApiPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiPolicyNonXmlEncoded() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiPolicyNonXmlEncoded.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiPolicyNonXmlEncoded.json // this example is just showing the usage of "ApiPolicy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiPolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiPolicyResource.cs index cb126c5153dc0..bfe2f189a7c53 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiPolicyResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiPolicyResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadApiPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiPolicy.json // this example is just showing the usage of "ApiPolicy_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -49,7 +49,7 @@ public async Task GetEntityTag_ApiManagementHeadApiPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiPolicy.json // this example is just showing the usage of "ApiPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task Get_ApiManagementGetApiPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreateApiPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiPolicy.json // this example is just showing the usage of "ApiPolicy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Update_ApiManagementCreateApiPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreateApiPolicyNonXmlEncoded() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiPolicyNonXmlEncoded.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiPolicyNonXmlEncoded.json // this example is just showing the usage of "ApiPolicy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -162,7 +162,7 @@ public async Task Update_ApiManagementCreateApiPolicyNonXmlEncoded() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteApiPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiPolicy.json // this example is just showing the usage of "ApiPolicy_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiReleaseCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiReleaseCollection.cs index 0bff8f9940b59..f7ff8adf0dd03 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiReleaseCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiReleaseCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiReleaseCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListApiReleases() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiReleases.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiReleases.json // this example is just showing the usage of "ApiRelease_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ApiManagementListApiReleases() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiRelease() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiRelease.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiRelease.json // this example is just showing the usage of "ApiRelease_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Get_ApiManagementGetApiRelease() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetApiRelease() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiRelease.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiRelease.json // this example is just showing the usage of "ApiRelease_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -125,7 +125,7 @@ public async Task Exists_ApiManagementGetApiRelease() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetApiRelease() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiRelease.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiRelease.json // this example is just showing the usage of "ApiRelease_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -169,7 +169,7 @@ public async Task GetIfExists_ApiManagementGetApiRelease() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiRelease() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiRelease.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiRelease.json // this example is just showing the usage of "ApiRelease_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiReleaseResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiReleaseResource.cs index 360916d75d576..0d54785db2061 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiReleaseResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiReleaseResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiReleaseResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadApiRelease() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiRelease.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiRelease.json // this example is just showing the usage of "ApiRelease_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadApiRelease() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiRelease() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiRelease.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiRelease.json // this example is just showing the usage of "ApiRelease_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -81,7 +81,7 @@ public async Task Get_ApiManagementGetApiRelease() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateApiRelease() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateApiRelease.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiRelease.json // this example is just showing the usage of "ApiRelease_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +120,7 @@ public async Task Update_ApiManagementUpdateApiRelease() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteApiRelease() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiRelease.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiRelease.json // this example is just showing the usage of "ApiRelease_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiResource.cs index f8e51e95d41af..cf24ae4033e0a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApi.json // this example is just showing the usage of "Api_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadApi() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiContract() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiContract.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiContract.json // this example is just showing the usage of "Api_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetApiContract() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiRevisionContract() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiRevision.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiRevision.json // this example is just showing the usage of "Api_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -112,7 +112,7 @@ public async Task Get_ApiManagementGetApiRevisionContract() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApi.json // this example is just showing the usage of "Api_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -151,7 +151,7 @@ public async Task Update_ApiManagementUpdateApi() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApi.json // this example is just showing the usage of "Api_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -180,7 +180,7 @@ public async Task Delete_ApiManagementDeleteApi() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetApiRevisionsByService_ApiManagementListApiRevisions() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiRevisions.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiRevisions.json // this example is just showing the usage of "ApiRevision_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -211,7 +211,7 @@ public async Task GetApiRevisionsByService_ApiManagementListApiRevisions() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetApiProducts_ApiManagementListApiProducts() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiProducts.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiProducts.json // this example is just showing the usage of "ApiProduct_ListByApis" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -246,7 +246,7 @@ public async Task GetApiProducts_ApiManagementListApiProducts() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetOperationsByTags_ApiManagementListApiOperationsByTags() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiOperationsByTags.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiOperationsByTags.json // this example is just showing the usage of "Operation_ListByTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiSchemaCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiSchemaCollection.cs index 5a6e2455a737b..0b724f7be758d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiSchemaCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiSchemaCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiSchemaCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListApiSchemas() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiSchemas.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiSchemas.json // this example is just showing the usage of "ApiSchema_ListByApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ApiManagementListApiSchemas() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiSchema.json // this example is just showing the usage of "ApiSchema_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Get_ApiManagementGetApiSchema() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetApiSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiSchema.json // this example is just showing the usage of "ApiSchema_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -125,7 +125,7 @@ public async Task Exists_ApiManagementGetApiSchema() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetApiSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiSchema.json // this example is just showing the usage of "ApiSchema_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -169,7 +169,7 @@ public async Task GetIfExists_ApiManagementGetApiSchema() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiSchema.json // this example is just showing the usage of "ApiSchema_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiSchemaResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiSchemaResource.cs index 70183894f73ac..e4e38edc952a0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiSchemaResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiSchemaResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiSchemaResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadApiSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiSchema.json // this example is just showing the usage of "ApiSchema_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadApiSchema() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiSchema.json // this example is just showing the usage of "ApiSchema_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -81,7 +81,7 @@ public async Task Get_ApiManagementGetApiSchema() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreateApiSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiSchema.json // this example is just showing the usage of "ApiSchema_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +120,7 @@ public async Task Update_ApiManagementCreateApiSchema() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteApiSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiSchema.json // this example is just showing the usage of "ApiSchema_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagCollection.cs index a13ba810b1e7b..cd74faa6d04c5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiTagCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListApiTags() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiTags.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiTags.json // this example is just showing the usage of "Tag_ListByApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ApiManagementListApiTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiTag.json // this example is just showing the usage of "Tag_GetByApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Get_ApiManagementGetApiTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetApiTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiTag.json // this example is just showing the usage of "Tag_GetByApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -125,7 +125,7 @@ public async Task Exists_ApiManagementGetApiTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetApiTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiTag.json // this example is just showing the usage of "Tag_GetByApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -169,7 +169,7 @@ public async Task GetIfExists_ApiManagementGetApiTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiTag.json // this example is just showing the usage of "Tag_AssignToApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagDescriptionCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagDescriptionCollection.cs index c299d75b53296..095219df0ba9b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagDescriptionCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagDescriptionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiTagDescriptionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListApiTagDescriptions() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiTagDescriptions.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiTagDescriptions.json // this example is just showing the usage of "ApiTagDescription_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task GetAll_ApiManagementListApiTagDescriptions() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiTagDescription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiTagDescription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiTagDescription.json // this example is just showing the usage of "ApiTagDescription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -94,7 +94,7 @@ public async Task Get_ApiManagementGetApiTagDescription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetApiTagDescription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiTagDescription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiTagDescription.json // this example is just showing the usage of "ApiTagDescription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task Exists_ApiManagementGetApiTagDescription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetApiTagDescription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiTagDescription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiTagDescription.json // this example is just showing the usage of "ApiTagDescription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -170,7 +170,7 @@ public async Task GetIfExists_ApiManagementGetApiTagDescription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiTagDescription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiTagDescription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiTagDescription.json // this example is just showing the usage of "ApiTagDescription_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagDescriptionResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagDescriptionResource.cs index aca46b95bd46a..c6456efe2f98f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagDescriptionResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagDescriptionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiTagDescriptionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadApiTagDescription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiTagDescription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiTagDescription.json // this example is just showing the usage of "ApiTagDescription_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -49,7 +49,7 @@ public async Task GetEntityTag_ApiManagementHeadApiTagDescription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiTagDescription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiTagDescription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiTagDescription.json // this example is just showing the usage of "ApiTagDescription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task Get_ApiManagementGetApiTagDescription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreateApiTagDescription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiTagDescription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiTagDescription.json // this example is just showing the usage of "ApiTagDescription_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Update_ApiManagementCreateApiTagDescription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteApiTagDescription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiTagDescription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiTagDescription.json // this example is just showing the usage of "ApiTagDescription_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagResource.cs index 9ba7032807a12..85eacba71ed3f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiTagResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityStateByApi_ApiManagementHeadApiTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiTag.json // this example is just showing the usage of "Tag_GetEntityStateByApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityStateByApi_ApiManagementHeadApiTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiTag.json // this example is just showing the usage of "Tag_GetByApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -81,7 +81,7 @@ public async Task Get_ApiManagementGetApiTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementCreateApiTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiTag.json // this example is just showing the usage of "Tag_AssignToApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -115,7 +115,7 @@ public async Task Update_ApiManagementCreateApiTag() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteApiTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiTag.json // this example is just showing the usage of "Tag_DetachFromApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiVersionSetCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiVersionSetCollection.cs index 4386d9df8af40..1087fc2d0f298 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiVersionSetCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiVersionSetCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiVersionSetCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListApiVersionSets() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListApiVersionSets.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListApiVersionSets.json // this example is just showing the usage of "ApiVersionSet_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ApiManagementListApiVersionSets() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiVersionSet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiVersionSet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiVersionSet.json // this example is just showing the usage of "ApiVersionSet_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetApiVersionSet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetApiVersionSet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiVersionSet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiVersionSet.json // this example is just showing the usage of "ApiVersionSet_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetApiVersionSet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetApiVersionSet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiVersionSet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiVersionSet.json // this example is just showing the usage of "ApiVersionSet_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_ApiManagementGetApiVersionSet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateApiVersionSet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateApiVersionSet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiVersionSet.json // this example is just showing the usage of "ApiVersionSet_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiVersionSetResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiVersionSetResource.cs index d895ce4cf120b..73a9363771445 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiVersionSetResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiVersionSetResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiVersionSetResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadApiVersionSet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadApiVersionSet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiVersionSet.json // this example is just showing the usage of "ApiVersionSet_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadApiVersionSet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetApiVersionSet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetApiVersionSet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiVersionSet.json // this example is just showing the usage of "ApiVersionSet_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetApiVersionSet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateApiVersionSet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateApiVersionSet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiVersionSet.json // this example is just showing the usage of "ApiVersionSet_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -119,7 +119,7 @@ public async Task Update_ApiManagementUpdateApiVersionSet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ApiManagementDeleteApiVersionSet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementDeleteApiVersionSet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiVersionSet.json // this example is just showing the usage of "ApiVersionSet_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationAccessPolicyContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationAccessPolicyContractCollection.cs new file mode 100644 index 0000000000000..d5ff48a001e4f --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationAccessPolicyContractCollection.cs @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_AuthorizationAccessPolicyContractCollection + { + // ApiManagementListAuthorizationAccessPolicies + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ApiManagementListAuthorizationAccessPolicies() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListAuthorizationAccessPolicies.json + // this example is just showing the usage of "AuthorizationAccessPolicy_ListByAuthorization" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AuthorizationContractResource created on azure + // for more information of creating AuthorizationContractResource, please refer to the document of AuthorizationContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + string authorizationId = "authz1"; + ResourceIdentifier authorizationContractResourceId = AuthorizationContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId); + AuthorizationContractResource authorizationContract = client.GetAuthorizationContractResource(authorizationContractResourceId); + + // get the collection of this AuthorizationAccessPolicyContractResource + AuthorizationAccessPolicyContractCollection collection = authorizationContract.GetAuthorizationAccessPolicyContracts(); + + // invoke the operation and iterate over the result + await foreach (AuthorizationAccessPolicyContractResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AuthorizationAccessPolicyContractData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // ApiManagementGetAuthorizationAccessPolicy + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementGetAuthorizationAccessPolicy() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationAccessPolicy.json + // this example is just showing the usage of "AuthorizationAccessPolicy_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AuthorizationContractResource created on azure + // for more information of creating AuthorizationContractResource, please refer to the document of AuthorizationContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + string authorizationId = "authz1"; + ResourceIdentifier authorizationContractResourceId = AuthorizationContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId); + AuthorizationContractResource authorizationContract = client.GetAuthorizationContractResource(authorizationContractResourceId); + + // get the collection of this AuthorizationAccessPolicyContractResource + AuthorizationAccessPolicyContractCollection collection = authorizationContract.GetAuthorizationAccessPolicyContracts(); + + // invoke the operation + string authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; + AuthorizationAccessPolicyContractResource result = await collection.GetAsync(authorizationAccessPolicyId); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AuthorizationAccessPolicyContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementGetAuthorizationAccessPolicy + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_ApiManagementGetAuthorizationAccessPolicy() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationAccessPolicy.json + // this example is just showing the usage of "AuthorizationAccessPolicy_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AuthorizationContractResource created on azure + // for more information of creating AuthorizationContractResource, please refer to the document of AuthorizationContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + string authorizationId = "authz1"; + ResourceIdentifier authorizationContractResourceId = AuthorizationContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId); + AuthorizationContractResource authorizationContract = client.GetAuthorizationContractResource(authorizationContractResourceId); + + // get the collection of this AuthorizationAccessPolicyContractResource + AuthorizationAccessPolicyContractCollection collection = authorizationContract.GetAuthorizationAccessPolicyContracts(); + + // invoke the operation + string authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; + bool result = await collection.ExistsAsync(authorizationAccessPolicyId); + + Console.WriteLine($"Succeeded: {result}"); + } + + // ApiManagementGetAuthorizationAccessPolicy + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_ApiManagementGetAuthorizationAccessPolicy() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationAccessPolicy.json + // this example is just showing the usage of "AuthorizationAccessPolicy_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AuthorizationContractResource created on azure + // for more information of creating AuthorizationContractResource, please refer to the document of AuthorizationContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + string authorizationId = "authz1"; + ResourceIdentifier authorizationContractResourceId = AuthorizationContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId); + AuthorizationContractResource authorizationContract = client.GetAuthorizationContractResource(authorizationContractResourceId); + + // get the collection of this AuthorizationAccessPolicyContractResource + AuthorizationAccessPolicyContractCollection collection = authorizationContract.GetAuthorizationAccessPolicyContracts(); + + // invoke the operation + string authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; + NullableResponse response = await collection.GetIfExistsAsync(authorizationAccessPolicyId); + AuthorizationAccessPolicyContractResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AuthorizationAccessPolicyContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // ApiManagementCreateAuthorizationAccessPolicy + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApiManagementCreateAuthorizationAccessPolicy() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationAccessPolicy.json + // this example is just showing the usage of "AuthorizationAccessPolicy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AuthorizationContractResource created on azure + // for more information of creating AuthorizationContractResource, please refer to the document of AuthorizationContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + string authorizationId = "authz1"; + ResourceIdentifier authorizationContractResourceId = AuthorizationContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId); + AuthorizationContractResource authorizationContract = client.GetAuthorizationContractResource(authorizationContractResourceId); + + // get the collection of this AuthorizationAccessPolicyContractResource + AuthorizationAccessPolicyContractCollection collection = authorizationContract.GetAuthorizationAccessPolicyContracts(); + + // invoke the operation + string authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; + AuthorizationAccessPolicyContractData data = new AuthorizationAccessPolicyContractData() + { + TenantId = Guid.Parse("13932a0d-5c63-4d37-901d-1df9c97722ff"), + ObjectId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab", + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, authorizationAccessPolicyId, data); + AuthorizationAccessPolicyContractResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AuthorizationAccessPolicyContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationAccessPolicyContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationAccessPolicyContractResource.cs new file mode 100644 index 0000000000000..89fb3e4763c73 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationAccessPolicyContractResource.cs @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_AuthorizationAccessPolicyContractResource + { + // ApiManagementGetAuthorizationAccessPolicy + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementGetAuthorizationAccessPolicy() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationAccessPolicy.json + // this example is just showing the usage of "AuthorizationAccessPolicy_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AuthorizationAccessPolicyContractResource created on azure + // for more information of creating AuthorizationAccessPolicyContractResource, please refer to the document of AuthorizationAccessPolicyContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + string authorizationId = "authz1"; + string authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; + ResourceIdentifier authorizationAccessPolicyContractResourceId = AuthorizationAccessPolicyContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, authorizationAccessPolicyId); + AuthorizationAccessPolicyContractResource authorizationAccessPolicyContract = client.GetAuthorizationAccessPolicyContractResource(authorizationAccessPolicyContractResourceId); + + // invoke the operation + AuthorizationAccessPolicyContractResource result = await authorizationAccessPolicyContract.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AuthorizationAccessPolicyContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementCreateAuthorizationAccessPolicy + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_ApiManagementCreateAuthorizationAccessPolicy() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationAccessPolicy.json + // this example is just showing the usage of "AuthorizationAccessPolicy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AuthorizationAccessPolicyContractResource created on azure + // for more information of creating AuthorizationAccessPolicyContractResource, please refer to the document of AuthorizationAccessPolicyContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + string authorizationId = "authz1"; + string authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; + ResourceIdentifier authorizationAccessPolicyContractResourceId = AuthorizationAccessPolicyContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, authorizationAccessPolicyId); + AuthorizationAccessPolicyContractResource authorizationAccessPolicyContract = client.GetAuthorizationAccessPolicyContractResource(authorizationAccessPolicyContractResourceId); + + // invoke the operation + AuthorizationAccessPolicyContractData data = new AuthorizationAccessPolicyContractData() + { + TenantId = Guid.Parse("13932a0d-5c63-4d37-901d-1df9c97722ff"), + ObjectId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab", + }; + ArmOperation lro = await authorizationAccessPolicyContract.UpdateAsync(WaitUntil.Completed, data); + AuthorizationAccessPolicyContractResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AuthorizationAccessPolicyContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementDeleteAuthorizationAccessPolicy + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_ApiManagementDeleteAuthorizationAccessPolicy() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteAuthorizationAccessPolicy.json + // this example is just showing the usage of "AuthorizationAccessPolicy_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AuthorizationAccessPolicyContractResource created on azure + // for more information of creating AuthorizationAccessPolicyContractResource, please refer to the document of AuthorizationAccessPolicyContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + string authorizationId = "authz1"; + string authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; + ResourceIdentifier authorizationAccessPolicyContractResourceId = AuthorizationAccessPolicyContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, authorizationAccessPolicyId); + AuthorizationAccessPolicyContractResource authorizationAccessPolicyContract = client.GetAuthorizationAccessPolicyContractResource(authorizationAccessPolicyContractResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + await authorizationAccessPolicyContract.DeleteAsync(WaitUntil.Completed, ifMatch); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationContractCollection.cs new file mode 100644 index 0000000000000..7483b190f0607 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationContractCollection.cs @@ -0,0 +1,295 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_AuthorizationContractCollection + { + // ApiManagementListAuthorizationsAuthCode + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ApiManagementListAuthorizationsAuthCode() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListAuthorizationsAuthCode.json + // this example is just showing the usage of "Authorization_ListByAuthorizationProvider" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AuthorizationProviderContractResource created on azure + // for more information of creating AuthorizationProviderContractResource, please refer to the document of AuthorizationProviderContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + ResourceIdentifier authorizationProviderContractResourceId = AuthorizationProviderContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId); + AuthorizationProviderContractResource authorizationProviderContract = client.GetAuthorizationProviderContractResource(authorizationProviderContractResourceId); + + // get the collection of this AuthorizationContractResource + AuthorizationContractCollection collection = authorizationProviderContract.GetAuthorizationContracts(); + + // invoke the operation and iterate over the result + await foreach (AuthorizationContractResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AuthorizationContractData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // ApiManagementListAuthorizationsClientCred + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ApiManagementListAuthorizationsClientCred() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListAuthorizationsClientCred.json + // this example is just showing the usage of "Authorization_ListByAuthorizationProvider" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AuthorizationProviderContractResource created on azure + // for more information of creating AuthorizationProviderContractResource, please refer to the document of AuthorizationProviderContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithclientcred"; + ResourceIdentifier authorizationProviderContractResourceId = AuthorizationProviderContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId); + AuthorizationProviderContractResource authorizationProviderContract = client.GetAuthorizationProviderContractResource(authorizationProviderContractResourceId); + + // get the collection of this AuthorizationContractResource + AuthorizationContractCollection collection = authorizationProviderContract.GetAuthorizationContracts(); + + // invoke the operation and iterate over the result + await foreach (AuthorizationContractResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AuthorizationContractData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // ApiManagementGetAuthorization + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementGetAuthorization() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorization.json + // this example is just showing the usage of "Authorization_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AuthorizationProviderContractResource created on azure + // for more information of creating AuthorizationProviderContractResource, please refer to the document of AuthorizationProviderContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + ResourceIdentifier authorizationProviderContractResourceId = AuthorizationProviderContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId); + AuthorizationProviderContractResource authorizationProviderContract = client.GetAuthorizationProviderContractResource(authorizationProviderContractResourceId); + + // get the collection of this AuthorizationContractResource + AuthorizationContractCollection collection = authorizationProviderContract.GetAuthorizationContracts(); + + // invoke the operation + string authorizationId = "authz1"; + AuthorizationContractResource result = await collection.GetAsync(authorizationId); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AuthorizationContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementGetAuthorization + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_ApiManagementGetAuthorization() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorization.json + // this example is just showing the usage of "Authorization_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AuthorizationProviderContractResource created on azure + // for more information of creating AuthorizationProviderContractResource, please refer to the document of AuthorizationProviderContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + ResourceIdentifier authorizationProviderContractResourceId = AuthorizationProviderContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId); + AuthorizationProviderContractResource authorizationProviderContract = client.GetAuthorizationProviderContractResource(authorizationProviderContractResourceId); + + // get the collection of this AuthorizationContractResource + AuthorizationContractCollection collection = authorizationProviderContract.GetAuthorizationContracts(); + + // invoke the operation + string authorizationId = "authz1"; + bool result = await collection.ExistsAsync(authorizationId); + + Console.WriteLine($"Succeeded: {result}"); + } + + // ApiManagementGetAuthorization + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_ApiManagementGetAuthorization() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorization.json + // this example is just showing the usage of "Authorization_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AuthorizationProviderContractResource created on azure + // for more information of creating AuthorizationProviderContractResource, please refer to the document of AuthorizationProviderContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + ResourceIdentifier authorizationProviderContractResourceId = AuthorizationProviderContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId); + AuthorizationProviderContractResource authorizationProviderContract = client.GetAuthorizationProviderContractResource(authorizationProviderContractResourceId); + + // get the collection of this AuthorizationContractResource + AuthorizationContractCollection collection = authorizationProviderContract.GetAuthorizationContracts(); + + // invoke the operation + string authorizationId = "authz1"; + NullableResponse response = await collection.GetIfExistsAsync(authorizationId); + AuthorizationContractResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AuthorizationContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // ApiManagementCreateAuthorizationAADAuthCode + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApiManagementCreateAuthorizationAADAuthCode() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationAADAuthCode.json + // this example is just showing the usage of "Authorization_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AuthorizationProviderContractResource created on azure + // for more information of creating AuthorizationProviderContractResource, please refer to the document of AuthorizationProviderContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + ResourceIdentifier authorizationProviderContractResourceId = AuthorizationProviderContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId); + AuthorizationProviderContractResource authorizationProviderContract = client.GetAuthorizationProviderContractResource(authorizationProviderContractResourceId); + + // get the collection of this AuthorizationContractResource + AuthorizationContractCollection collection = authorizationProviderContract.GetAuthorizationContracts(); + + // invoke the operation + string authorizationId = "authz2"; + AuthorizationContractData data = new AuthorizationContractData() + { + AuthorizationType = ApiManagementAuthorizationType.OAuth2, + OAuth2GrantType = OAuth2GrantType.AuthorizationCode, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, authorizationId, data); + AuthorizationContractResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AuthorizationContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementCreateAuthorizationAADClientCred + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApiManagementCreateAuthorizationAADClientCred() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationAADClientCred.json + // this example is just showing the usage of "Authorization_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AuthorizationProviderContractResource created on azure + // for more information of creating AuthorizationProviderContractResource, please refer to the document of AuthorizationProviderContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithclientcred"; + ResourceIdentifier authorizationProviderContractResourceId = AuthorizationProviderContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId); + AuthorizationProviderContractResource authorizationProviderContract = client.GetAuthorizationProviderContractResource(authorizationProviderContractResourceId); + + // get the collection of this AuthorizationContractResource + AuthorizationContractCollection collection = authorizationProviderContract.GetAuthorizationContracts(); + + // invoke the operation + string authorizationId = "authz1"; + AuthorizationContractData data = new AuthorizationContractData() + { + AuthorizationType = ApiManagementAuthorizationType.OAuth2, + OAuth2GrantType = OAuth2GrantType.AuthorizationCode, + Parameters = +{ +["clientId"] = "53790925-fdd3-4b80-bc7a-4c3aaf25801d", +["clientSecret"] = "xxxxxxxxxxxxxxx~xxxxxxxxx", +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, authorizationId, data); + AuthorizationContractResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AuthorizationContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationContractResource.cs new file mode 100644 index 0000000000000..c49b8cfcb504b --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationContractResource.cs @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_AuthorizationContractResource + { + // ApiManagementGetAuthorization + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementGetAuthorization() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorization.json + // this example is just showing the usage of "Authorization_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AuthorizationContractResource created on azure + // for more information of creating AuthorizationContractResource, please refer to the document of AuthorizationContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + string authorizationId = "authz1"; + ResourceIdentifier authorizationContractResourceId = AuthorizationContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId); + AuthorizationContractResource authorizationContract = client.GetAuthorizationContractResource(authorizationContractResourceId); + + // invoke the operation + AuthorizationContractResource result = await authorizationContract.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AuthorizationContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementCreateAuthorizationAADAuthCode + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_ApiManagementCreateAuthorizationAADAuthCode() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationAADAuthCode.json + // this example is just showing the usage of "Authorization_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AuthorizationContractResource created on azure + // for more information of creating AuthorizationContractResource, please refer to the document of AuthorizationContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + string authorizationId = "authz2"; + ResourceIdentifier authorizationContractResourceId = AuthorizationContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId); + AuthorizationContractResource authorizationContract = client.GetAuthorizationContractResource(authorizationContractResourceId); + + // invoke the operation + AuthorizationContractData data = new AuthorizationContractData() + { + AuthorizationType = ApiManagementAuthorizationType.OAuth2, + OAuth2GrantType = OAuth2GrantType.AuthorizationCode, + }; + ArmOperation lro = await authorizationContract.UpdateAsync(WaitUntil.Completed, data); + AuthorizationContractResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AuthorizationContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementCreateAuthorizationAADClientCred + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_ApiManagementCreateAuthorizationAADClientCred() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationAADClientCred.json + // this example is just showing the usage of "Authorization_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AuthorizationContractResource created on azure + // for more information of creating AuthorizationContractResource, please refer to the document of AuthorizationContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithclientcred"; + string authorizationId = "authz1"; + ResourceIdentifier authorizationContractResourceId = AuthorizationContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId); + AuthorizationContractResource authorizationContract = client.GetAuthorizationContractResource(authorizationContractResourceId); + + // invoke the operation + AuthorizationContractData data = new AuthorizationContractData() + { + AuthorizationType = ApiManagementAuthorizationType.OAuth2, + OAuth2GrantType = OAuth2GrantType.AuthorizationCode, + Parameters = +{ +["clientId"] = "53790925-fdd3-4b80-bc7a-4c3aaf25801d", +["clientSecret"] = "xxxxxxxxxxxxxxx~xxxxxxxxx", +}, + }; + ArmOperation lro = await authorizationContract.UpdateAsync(WaitUntil.Completed, data); + AuthorizationContractResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AuthorizationContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementDeleteAuthorization + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_ApiManagementDeleteAuthorization() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteAuthorization.json + // this example is just showing the usage of "Authorization_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AuthorizationContractResource created on azure + // for more information of creating AuthorizationContractResource, please refer to the document of AuthorizationContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + string authorizationId = "authz1"; + ResourceIdentifier authorizationContractResourceId = AuthorizationContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId); + AuthorizationContractResource authorizationContract = client.GetAuthorizationContractResource(authorizationContractResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + await authorizationContract.DeleteAsync(WaitUntil.Completed, ifMatch); + + Console.WriteLine($"Succeeded"); + } + + // ApiManagementPostAuthorizationConfirmConsentCodeRequest + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task ConfirmConsentCode_ApiManagementPostAuthorizationConfirmConsentCodeRequest() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPostAuthorizationConfirmConsentCodeRequest.json + // this example is just showing the usage of "Authorization_ConfirmConsentCode" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AuthorizationContractResource created on azure + // for more information of creating AuthorizationContractResource, please refer to the document of AuthorizationContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + string authorizationId = "authz1"; + ResourceIdentifier authorizationContractResourceId = AuthorizationContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId); + AuthorizationContractResource authorizationContract = client.GetAuthorizationContractResource(authorizationContractResourceId); + + // invoke the operation + AuthorizationConfirmConsentCodeContent content = new AuthorizationConfirmConsentCodeContent() + { + ConsentCode = "theconsentcode", + }; + await authorizationContract.ConfirmConsentCodeAsync(content); + + Console.WriteLine($"Succeeded"); + } + + // ApiManagementGetAuthorizationLoginRequest + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task PostAuthorizationLoginLink_ApiManagementGetAuthorizationLoginRequest() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationLoginRequest.json + // this example is just showing the usage of "AuthorizationLoginLinks_Post" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AuthorizationContractResource created on azure + // for more information of creating AuthorizationContractResource, please refer to the document of AuthorizationContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + string authorizationId = "authz1"; + ResourceIdentifier authorizationContractResourceId = AuthorizationContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId); + AuthorizationContractResource authorizationContract = client.GetAuthorizationContractResource(authorizationContractResourceId); + + // invoke the operation + AuthorizationLoginContent content = new AuthorizationLoginContent() + { + PostLoginRedirectUri = new Uri("https://www.bing.com/"), + }; + AuthorizationLoginResult result = await authorizationContract.PostAuthorizationLoginLinkAsync(content); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationProviderContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationProviderContractCollection.cs new file mode 100644 index 0000000000000..2f34bbd465618 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationProviderContractCollection.cs @@ -0,0 +1,383 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_AuthorizationProviderContractCollection + { + // ApiManagementListAuthorizationProviders + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ApiManagementListAuthorizationProviders() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListAuthorizationProviders.json + // this example is just showing the usage of "AuthorizationProvider_ListByService" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this AuthorizationProviderContractResource + AuthorizationProviderContractCollection collection = apiManagementService.GetAuthorizationProviderContracts(); + + // invoke the operation and iterate over the result + await foreach (AuthorizationProviderContractResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AuthorizationProviderContractData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // ApiManagementGetAuthorizationProvider + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementGetAuthorizationProvider() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationProvider.json + // this example is just showing the usage of "AuthorizationProvider_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this AuthorizationProviderContractResource + AuthorizationProviderContractCollection collection = apiManagementService.GetAuthorizationProviderContracts(); + + // invoke the operation + string authorizationProviderId = "aadwithauthcode"; + AuthorizationProviderContractResource result = await collection.GetAsync(authorizationProviderId); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AuthorizationProviderContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementGetAuthorizationProvider + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_ApiManagementGetAuthorizationProvider() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationProvider.json + // this example is just showing the usage of "AuthorizationProvider_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this AuthorizationProviderContractResource + AuthorizationProviderContractCollection collection = apiManagementService.GetAuthorizationProviderContracts(); + + // invoke the operation + string authorizationProviderId = "aadwithauthcode"; + bool result = await collection.ExistsAsync(authorizationProviderId); + + Console.WriteLine($"Succeeded: {result}"); + } + + // ApiManagementGetAuthorizationProvider + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_ApiManagementGetAuthorizationProvider() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationProvider.json + // this example is just showing the usage of "AuthorizationProvider_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this AuthorizationProviderContractResource + AuthorizationProviderContractCollection collection = apiManagementService.GetAuthorizationProviderContracts(); + + // invoke the operation + string authorizationProviderId = "aadwithauthcode"; + NullableResponse response = await collection.GetIfExistsAsync(authorizationProviderId); + AuthorizationProviderContractResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AuthorizationProviderContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // ApiManagementCreateAuthorizationProviderAADAuthCode + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApiManagementCreateAuthorizationProviderAADAuthCode() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationProviderAADAuthCode.json + // this example is just showing the usage of "AuthorizationProvider_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this AuthorizationProviderContractResource + AuthorizationProviderContractCollection collection = apiManagementService.GetAuthorizationProviderContracts(); + + // invoke the operation + string authorizationProviderId = "aadwithauthcode"; + AuthorizationProviderContractData data = new AuthorizationProviderContractData() + { + DisplayName = "aadwithauthcode", + IdentityProvider = "aad", + Oauth2 = new AuthorizationProviderOAuth2Settings() + { + RedirectUri = new Uri("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1"), + GrantTypes = new AuthorizationProviderOAuth2GrantTypes() + { + AuthorizationCode = +{ +["clientId"] = "59790825-fdd3-4b10-bc7a-4c3aaf25801d", +["clientSecret"] = "xxxxxxxxxxxxxxxxxxxxxxxx", +["resourceUri"] = "https://graph.microsoft.com", +["scopes"] = "User.Read.All Group.Read.All", +}, + }, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, authorizationProviderId, data); + AuthorizationProviderContractResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AuthorizationProviderContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementCreateAuthorizationProviderAADClientCred + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApiManagementCreateAuthorizationProviderAADClientCred() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationProviderAADClientCred.json + // this example is just showing the usage of "AuthorizationProvider_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this AuthorizationProviderContractResource + AuthorizationProviderContractCollection collection = apiManagementService.GetAuthorizationProviderContracts(); + + // invoke the operation + string authorizationProviderId = "aadwithclientcred"; + AuthorizationProviderContractData data = new AuthorizationProviderContractData() + { + DisplayName = "aadwithclientcred", + IdentityProvider = "aad", + Oauth2 = new AuthorizationProviderOAuth2Settings() + { + RedirectUri = new Uri("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1"), + GrantTypes = new AuthorizationProviderOAuth2GrantTypes() + { + AuthorizationCode = +{ +["resourceUri"] = "https://graph.microsoft.com", +["scopes"] = "User.Read.All Group.Read.All", +}, + }, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, authorizationProviderId, data); + AuthorizationProviderContractResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AuthorizationProviderContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementCreateAuthorizationProviderGenericOAuth2 + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApiManagementCreateAuthorizationProviderGenericOAuth2() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationProviderGenericOAuth2.json + // this example is just showing the usage of "AuthorizationProvider_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this AuthorizationProviderContractResource + AuthorizationProviderContractCollection collection = apiManagementService.GetAuthorizationProviderContracts(); + + // invoke the operation + string authorizationProviderId = "eventbrite"; + AuthorizationProviderContractData data = new AuthorizationProviderContractData() + { + DisplayName = "eventbrite", + IdentityProvider = "oauth2", + Oauth2 = new AuthorizationProviderOAuth2Settings() + { + RedirectUri = new Uri("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1"), + GrantTypes = new AuthorizationProviderOAuth2GrantTypes() + { + AuthorizationCode = +{ +["authorizationUrl"] = "https://www.eventbrite.com/oauth/authorize", +["clientId"] = "genericClientId", +["clientSecret"] = "xxxxxxxxxxxxxxxxxxxxxxxx", +["refreshUrl"] = "https://www.eventbrite.com/oauth/token", +["scopes"] = "", +["tokenUrl"] = "https://www.eventbrite.com/oauth/token", +}, + }, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, authorizationProviderId, data); + AuthorizationProviderContractResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AuthorizationProviderContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementCreateAuthorizationProviderOOBGoogle + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApiManagementCreateAuthorizationProviderOOBGoogle() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationProviderOOBGoogle.json + // this example is just showing the usage of "AuthorizationProvider_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this AuthorizationProviderContractResource + AuthorizationProviderContractCollection collection = apiManagementService.GetAuthorizationProviderContracts(); + + // invoke the operation + string authorizationProviderId = "google"; + AuthorizationProviderContractData data = new AuthorizationProviderContractData() + { + DisplayName = "google", + IdentityProvider = "google", + Oauth2 = new AuthorizationProviderOAuth2Settings() + { + RedirectUri = new Uri("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1"), + GrantTypes = new AuthorizationProviderOAuth2GrantTypes() + { + AuthorizationCode = +{ +["clientId"] = "99999999-xxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com", +["clientSecret"] = "XXXXXXXXXXXXXXXXXXXX", +["scopes"] = "openid https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email", +}, + }, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, authorizationProviderId, data); + AuthorizationProviderContractResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AuthorizationProviderContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationProviderContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationProviderContractResource.cs new file mode 100644 index 0000000000000..0a5d3304131c9 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationProviderContractResource.cs @@ -0,0 +1,286 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_AuthorizationProviderContractResource + { + // ApiManagementGetAuthorizationProvider + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementGetAuthorizationProvider() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetAuthorizationProvider.json + // this example is just showing the usage of "AuthorizationProvider_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AuthorizationProviderContractResource created on azure + // for more information of creating AuthorizationProviderContractResource, please refer to the document of AuthorizationProviderContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + ResourceIdentifier authorizationProviderContractResourceId = AuthorizationProviderContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId); + AuthorizationProviderContractResource authorizationProviderContract = client.GetAuthorizationProviderContractResource(authorizationProviderContractResourceId); + + // invoke the operation + AuthorizationProviderContractResource result = await authorizationProviderContract.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AuthorizationProviderContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementCreateAuthorizationProviderAADAuthCode + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_ApiManagementCreateAuthorizationProviderAADAuthCode() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationProviderAADAuthCode.json + // this example is just showing the usage of "AuthorizationProvider_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AuthorizationProviderContractResource created on azure + // for more information of creating AuthorizationProviderContractResource, please refer to the document of AuthorizationProviderContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + ResourceIdentifier authorizationProviderContractResourceId = AuthorizationProviderContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId); + AuthorizationProviderContractResource authorizationProviderContract = client.GetAuthorizationProviderContractResource(authorizationProviderContractResourceId); + + // invoke the operation + AuthorizationProviderContractData data = new AuthorizationProviderContractData() + { + DisplayName = "aadwithauthcode", + IdentityProvider = "aad", + Oauth2 = new AuthorizationProviderOAuth2Settings() + { + RedirectUri = new Uri("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1"), + GrantTypes = new AuthorizationProviderOAuth2GrantTypes() + { + AuthorizationCode = +{ +["clientId"] = "59790825-fdd3-4b10-bc7a-4c3aaf25801d", +["clientSecret"] = "xxxxxxxxxxxxxxxxxxxxxxxx", +["resourceUri"] = "https://graph.microsoft.com", +["scopes"] = "User.Read.All Group.Read.All", +}, + }, + }, + }; + ArmOperation lro = await authorizationProviderContract.UpdateAsync(WaitUntil.Completed, data); + AuthorizationProviderContractResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AuthorizationProviderContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementCreateAuthorizationProviderAADClientCred + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_ApiManagementCreateAuthorizationProviderAADClientCred() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationProviderAADClientCred.json + // this example is just showing the usage of "AuthorizationProvider_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AuthorizationProviderContractResource created on azure + // for more information of creating AuthorizationProviderContractResource, please refer to the document of AuthorizationProviderContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithclientcred"; + ResourceIdentifier authorizationProviderContractResourceId = AuthorizationProviderContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId); + AuthorizationProviderContractResource authorizationProviderContract = client.GetAuthorizationProviderContractResource(authorizationProviderContractResourceId); + + // invoke the operation + AuthorizationProviderContractData data = new AuthorizationProviderContractData() + { + DisplayName = "aadwithclientcred", + IdentityProvider = "aad", + Oauth2 = new AuthorizationProviderOAuth2Settings() + { + RedirectUri = new Uri("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1"), + GrantTypes = new AuthorizationProviderOAuth2GrantTypes() + { + AuthorizationCode = +{ +["resourceUri"] = "https://graph.microsoft.com", +["scopes"] = "User.Read.All Group.Read.All", +}, + }, + }, + }; + ArmOperation lro = await authorizationProviderContract.UpdateAsync(WaitUntil.Completed, data); + AuthorizationProviderContractResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AuthorizationProviderContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementCreateAuthorizationProviderGenericOAuth2 + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_ApiManagementCreateAuthorizationProviderGenericOAuth2() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationProviderGenericOAuth2.json + // this example is just showing the usage of "AuthorizationProvider_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AuthorizationProviderContractResource created on azure + // for more information of creating AuthorizationProviderContractResource, please refer to the document of AuthorizationProviderContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "eventbrite"; + ResourceIdentifier authorizationProviderContractResourceId = AuthorizationProviderContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId); + AuthorizationProviderContractResource authorizationProviderContract = client.GetAuthorizationProviderContractResource(authorizationProviderContractResourceId); + + // invoke the operation + AuthorizationProviderContractData data = new AuthorizationProviderContractData() + { + DisplayName = "eventbrite", + IdentityProvider = "oauth2", + Oauth2 = new AuthorizationProviderOAuth2Settings() + { + RedirectUri = new Uri("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1"), + GrantTypes = new AuthorizationProviderOAuth2GrantTypes() + { + AuthorizationCode = +{ +["authorizationUrl"] = "https://www.eventbrite.com/oauth/authorize", +["clientId"] = "genericClientId", +["clientSecret"] = "xxxxxxxxxxxxxxxxxxxxxxxx", +["refreshUrl"] = "https://www.eventbrite.com/oauth/token", +["scopes"] = "", +["tokenUrl"] = "https://www.eventbrite.com/oauth/token", +}, + }, + }, + }; + ArmOperation lro = await authorizationProviderContract.UpdateAsync(WaitUntil.Completed, data); + AuthorizationProviderContractResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AuthorizationProviderContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementCreateAuthorizationProviderOOBGoogle + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_ApiManagementCreateAuthorizationProviderOOBGoogle() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateAuthorizationProviderOOBGoogle.json + // this example is just showing the usage of "AuthorizationProvider_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AuthorizationProviderContractResource created on azure + // for more information of creating AuthorizationProviderContractResource, please refer to the document of AuthorizationProviderContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "google"; + ResourceIdentifier authorizationProviderContractResourceId = AuthorizationProviderContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId); + AuthorizationProviderContractResource authorizationProviderContract = client.GetAuthorizationProviderContractResource(authorizationProviderContractResourceId); + + // invoke the operation + AuthorizationProviderContractData data = new AuthorizationProviderContractData() + { + DisplayName = "google", + IdentityProvider = "google", + Oauth2 = new AuthorizationProviderOAuth2Settings() + { + RedirectUri = new Uri("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1"), + GrantTypes = new AuthorizationProviderOAuth2GrantTypes() + { + AuthorizationCode = +{ +["clientId"] = "99999999-xxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com", +["clientSecret"] = "XXXXXXXXXXXXXXXXXXXX", +["scopes"] = "openid https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email", +}, + }, + }, + }; + ArmOperation lro = await authorizationProviderContract.UpdateAsync(WaitUntil.Completed, data); + AuthorizationProviderContractResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AuthorizationProviderContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementDeleteAuthorizationProvider + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_ApiManagementDeleteAuthorizationProvider() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteAuthorizationProvider.json + // this example is just showing the usage of "AuthorizationProvider_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AuthorizationProviderContractResource created on azure + // for more information of creating AuthorizationProviderContractResource, please refer to the document of AuthorizationProviderContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string authorizationProviderId = "aadwithauthcode"; + ResourceIdentifier authorizationProviderContractResourceId = AuthorizationProviderContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, authorizationProviderId); + AuthorizationProviderContractResource authorizationProviderContract = client.GetAuthorizationProviderContractResource(authorizationProviderContractResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + await authorizationProviderContract.DeleteAsync(WaitUntil.Completed, ifMatch); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_DocumentationContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_DocumentationContractCollection.cs new file mode 100644 index 0000000000000..7e087ff0c0317 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_DocumentationContractCollection.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_DocumentationContractCollection + { + // ApiManagementListApis + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ApiManagementListApis() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListDocumentations.json + // this example is just showing the usage of "Documentation_ListByService" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this DocumentationContractResource + DocumentationContractCollection collection = apiManagementService.GetDocumentationContracts(); + + // invoke the operation and iterate over the result + await foreach (DocumentationContractResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DocumentationContractData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // ApiManagementGetDocumentation + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementGetDocumentation() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetDocumentation.json + // this example is just showing the usage of "Documentation_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this DocumentationContractResource + DocumentationContractCollection collection = apiManagementService.GetDocumentationContracts(); + + // invoke the operation + string documentationId = "57d1f7558aa04f15146d9d8a"; + DocumentationContractResource result = await collection.GetAsync(documentationId); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DocumentationContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementGetDocumentation + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_ApiManagementGetDocumentation() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetDocumentation.json + // this example is just showing the usage of "Documentation_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this DocumentationContractResource + DocumentationContractCollection collection = apiManagementService.GetDocumentationContracts(); + + // invoke the operation + string documentationId = "57d1f7558aa04f15146d9d8a"; + bool result = await collection.ExistsAsync(documentationId); + + Console.WriteLine($"Succeeded: {result}"); + } + + // ApiManagementGetDocumentation + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_ApiManagementGetDocumentation() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetDocumentation.json + // this example is just showing the usage of "Documentation_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this DocumentationContractResource + DocumentationContractCollection collection = apiManagementService.GetDocumentationContracts(); + + // invoke the operation + string documentationId = "57d1f7558aa04f15146d9d8a"; + NullableResponse response = await collection.GetIfExistsAsync(documentationId); + DocumentationContractResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DocumentationContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // ApiManagementCreateDocumentation + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApiManagementCreateDocumentation() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateDocumentation.json + // this example is just showing the usage of "Documentation_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this DocumentationContractResource + DocumentationContractCollection collection = apiManagementService.GetDocumentationContracts(); + + // invoke the operation + string documentationId = "57d1f7558aa04f15146d9d8a"; + DocumentationContractData data = new DocumentationContractData() + { + Title = "Title", + Content = "content", + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, documentationId, data); + DocumentationContractResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DocumentationContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_DocumentationContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_DocumentationContractResource.cs new file mode 100644 index 0000000000000..d5e141462aee1 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_DocumentationContractResource.cs @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_DocumentationContractResource + { + // ApiManagementHeadDocumentation + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetEntityTag_ApiManagementHeadDocumentation() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadDocumentation.json + // this example is just showing the usage of "Documentation_GetEntityTag" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DocumentationContractResource created on azure + // for more information of creating DocumentationContractResource, please refer to the document of DocumentationContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string documentationId = "57d1f7558aa04f15146d9d8a"; + ResourceIdentifier documentationContractResourceId = DocumentationContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, documentationId); + DocumentationContractResource documentationContract = client.GetDocumentationContractResource(documentationContractResourceId); + + // invoke the operation + bool result = await documentationContract.GetEntityTagAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + // ApiManagementGetDocumentation + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementGetDocumentation() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetDocumentation.json + // this example is just showing the usage of "Documentation_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DocumentationContractResource created on azure + // for more information of creating DocumentationContractResource, please refer to the document of DocumentationContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string documentationId = "57d1f7558aa04f15146d9d8a"; + ResourceIdentifier documentationContractResourceId = DocumentationContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, documentationId); + DocumentationContractResource documentationContract = client.GetDocumentationContractResource(documentationContractResourceId); + + // invoke the operation + DocumentationContractResource result = await documentationContract.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DocumentationContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementUpdateDocumentation + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_ApiManagementUpdateDocumentation() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateDocumentation.json + // this example is just showing the usage of "Documentation_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DocumentationContractResource created on azure + // for more information of creating DocumentationContractResource, please refer to the document of DocumentationContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string documentationId = "57d1f7558aa04f15146d9d8a"; + ResourceIdentifier documentationContractResourceId = DocumentationContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, documentationId); + DocumentationContractResource documentationContract = client.GetDocumentationContractResource(documentationContractResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + DocumentationContractPatch patch = new DocumentationContractPatch() + { + Title = "Title updated", + Content = "content updated", + }; + DocumentationContractResource result = await documentationContract.UpdateAsync(ifMatch, patch); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DocumentationContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementDeleteDocumentation + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_ApiManagementDeleteDocumentation() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteDocumentation.json + // this example is just showing the usage of "Documentation_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DocumentationContractResource created on azure + // for more information of creating DocumentationContractResource, please refer to the document of DocumentationContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string documentationId = "57d1f7558aa04f15146d9d8a"; + ResourceIdentifier documentationContractResourceId = DocumentationContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, documentationId); + DocumentationContractResource documentationContract = client.GetDocumentationContractResource(documentationContractResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + await documentationContract.DeleteAsync(WaitUntil.Completed, ifMatch); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PolicyFragmentContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PolicyFragmentContractCollection.cs new file mode 100644 index 0000000000000..eab29d801b563 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PolicyFragmentContractCollection.cs @@ -0,0 +1,318 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_PolicyFragmentContractCollection + { + // ApiManagementListPolicyFragments + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ApiManagementListPolicyFragments() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPolicyFragments.json + // this example is just showing the usage of "PolicyFragment_ListByService" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this PolicyFragmentContractResource + PolicyFragmentContractCollection collection = apiManagementService.GetPolicyFragmentContracts(); + + // invoke the operation and iterate over the result + await foreach (PolicyFragmentContractResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PolicyFragmentContractData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // ApiManagementGetPolicyFragment + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementGetPolicyFragment() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicyFragment.json + // this example is just showing the usage of "PolicyFragment_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this PolicyFragmentContractResource + PolicyFragmentContractCollection collection = apiManagementService.GetPolicyFragmentContracts(); + + // invoke the operation + string id = "policyFragment1"; + PolicyFragmentContractResource result = await collection.GetAsync(id); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PolicyFragmentContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementGetPolicyFragment + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_ApiManagementGetPolicyFragment() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicyFragment.json + // this example is just showing the usage of "PolicyFragment_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this PolicyFragmentContractResource + PolicyFragmentContractCollection collection = apiManagementService.GetPolicyFragmentContracts(); + + // invoke the operation + string id = "policyFragment1"; + bool result = await collection.ExistsAsync(id); + + Console.WriteLine($"Succeeded: {result}"); + } + + // ApiManagementGetPolicyFragment + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_ApiManagementGetPolicyFragment() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicyFragment.json + // this example is just showing the usage of "PolicyFragment_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this PolicyFragmentContractResource + PolicyFragmentContractCollection collection = apiManagementService.GetPolicyFragmentContracts(); + + // invoke the operation + string id = "policyFragment1"; + NullableResponse response = await collection.GetIfExistsAsync(id); + PolicyFragmentContractResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PolicyFragmentContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // ApiManagementGetPolicyFragmentFormat + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementGetPolicyFragmentFormat() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicyFragmentFormat.json + // this example is just showing the usage of "PolicyFragment_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this PolicyFragmentContractResource + PolicyFragmentContractCollection collection = apiManagementService.GetPolicyFragmentContracts(); + + // invoke the operation + string id = "policyFragment1"; + PolicyFragmentContentFormat? format = PolicyFragmentContentFormat.Rawxml; + PolicyFragmentContractResource result = await collection.GetAsync(id, format: format); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PolicyFragmentContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementGetPolicyFragmentFormat + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_ApiManagementGetPolicyFragmentFormat() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicyFragmentFormat.json + // this example is just showing the usage of "PolicyFragment_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this PolicyFragmentContractResource + PolicyFragmentContractCollection collection = apiManagementService.GetPolicyFragmentContracts(); + + // invoke the operation + string id = "policyFragment1"; + PolicyFragmentContentFormat? format = PolicyFragmentContentFormat.Rawxml; + bool result = await collection.ExistsAsync(id, format: format); + + Console.WriteLine($"Succeeded: {result}"); + } + + // ApiManagementGetPolicyFragmentFormat + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_ApiManagementGetPolicyFragmentFormat() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicyFragmentFormat.json + // this example is just showing the usage of "PolicyFragment_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this PolicyFragmentContractResource + PolicyFragmentContractCollection collection = apiManagementService.GetPolicyFragmentContracts(); + + // invoke the operation + string id = "policyFragment1"; + PolicyFragmentContentFormat? format = PolicyFragmentContentFormat.Rawxml; + NullableResponse response = await collection.GetIfExistsAsync(id, format: format); + PolicyFragmentContractResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PolicyFragmentContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // ApiManagementCreatePolicy + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApiManagementCreatePolicy() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreatePolicyFragment.json + // this example is just showing the usage of "PolicyFragment_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this PolicyFragmentContractResource + PolicyFragmentContractCollection collection = apiManagementService.GetPolicyFragmentContracts(); + + // invoke the operation + string id = "policyFragment1"; + PolicyFragmentContractData data = new PolicyFragmentContractData() + { + Value = "", + Description = "A policy fragment example", + Format = PolicyFragmentContentFormat.Xml, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, id, data); + PolicyFragmentContractResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PolicyFragmentContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PolicyFragmentContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PolicyFragmentContractResource.cs new file mode 100644 index 0000000000000..74fdd3711c219 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PolicyFragmentContractResource.cs @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_PolicyFragmentContractResource + { + // ApiManagementHeadPolicyFragment + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetEntityTag_ApiManagementHeadPolicyFragment() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadPolicyFragment.json + // this example is just showing the usage of "PolicyFragment_GetEntityTag" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PolicyFragmentContractResource created on azure + // for more information of creating PolicyFragmentContractResource, please refer to the document of PolicyFragmentContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string id = "policyFragment1"; + ResourceIdentifier policyFragmentContractResourceId = PolicyFragmentContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, id); + PolicyFragmentContractResource policyFragmentContract = client.GetPolicyFragmentContractResource(policyFragmentContractResourceId); + + // invoke the operation + bool result = await policyFragmentContract.GetEntityTagAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + // ApiManagementGetPolicyFragment + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementGetPolicyFragment() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicyFragment.json + // this example is just showing the usage of "PolicyFragment_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PolicyFragmentContractResource created on azure + // for more information of creating PolicyFragmentContractResource, please refer to the document of PolicyFragmentContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string id = "policyFragment1"; + ResourceIdentifier policyFragmentContractResourceId = PolicyFragmentContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, id); + PolicyFragmentContractResource policyFragmentContract = client.GetPolicyFragmentContractResource(policyFragmentContractResourceId); + + // invoke the operation + PolicyFragmentContractResource result = await policyFragmentContract.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PolicyFragmentContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementGetPolicyFragmentFormat + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementGetPolicyFragmentFormat() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetPolicyFragmentFormat.json + // this example is just showing the usage of "PolicyFragment_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PolicyFragmentContractResource created on azure + // for more information of creating PolicyFragmentContractResource, please refer to the document of PolicyFragmentContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string id = "policyFragment1"; + ResourceIdentifier policyFragmentContractResourceId = PolicyFragmentContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, id); + PolicyFragmentContractResource policyFragmentContract = client.GetPolicyFragmentContractResource(policyFragmentContractResourceId); + + // invoke the operation + PolicyFragmentContentFormat? format = PolicyFragmentContentFormat.Rawxml; + PolicyFragmentContractResource result = await policyFragmentContract.GetAsync(format: format); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PolicyFragmentContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementCreatePolicy + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_ApiManagementCreatePolicy() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreatePolicyFragment.json + // this example is just showing the usage of "PolicyFragment_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PolicyFragmentContractResource created on azure + // for more information of creating PolicyFragmentContractResource, please refer to the document of PolicyFragmentContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string id = "policyFragment1"; + ResourceIdentifier policyFragmentContractResourceId = PolicyFragmentContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, id); + PolicyFragmentContractResource policyFragmentContract = client.GetPolicyFragmentContractResource(policyFragmentContractResourceId); + + // invoke the operation + PolicyFragmentContractData data = new PolicyFragmentContractData() + { + Value = "", + Description = "A policy fragment example", + Format = PolicyFragmentContentFormat.Xml, + }; + ArmOperation lro = await policyFragmentContract.UpdateAsync(WaitUntil.Completed, data); + PolicyFragmentContractResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PolicyFragmentContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementDeletePolicy + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_ApiManagementDeletePolicy() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeletePolicyFragment.json + // this example is just showing the usage of "PolicyFragment_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PolicyFragmentContractResource created on azure + // for more information of creating PolicyFragmentContractResource, please refer to the document of PolicyFragmentContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string id = "policyFragment1"; + ResourceIdentifier policyFragmentContractResourceId = PolicyFragmentContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, id); + PolicyFragmentContractResource policyFragmentContract = client.GetPolicyFragmentContractResource(policyFragmentContractResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + await policyFragmentContract.DeleteAsync(WaitUntil.Completed, ifMatch); + + Console.WriteLine($"Succeeded"); + } + + // ApiManagementListPolicyFragmentReferences + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetReferences_ApiManagementListPolicyFragmentReferences() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPolicyFragmentReferences.json + // this example is just showing the usage of "PolicyFragment_ListReferences" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PolicyFragmentContractResource created on azure + // for more information of creating PolicyFragmentContractResource, please refer to the document of PolicyFragmentContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string id = "policyFragment1"; + ResourceIdentifier policyFragmentContractResourceId = PolicyFragmentContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, id); + PolicyFragmentContractResource policyFragmentContract = client.GetPolicyFragmentContractResource(policyFragmentContractResourceId); + + // invoke the operation and iterate over the result + await foreach (ResourceCollectionValueItem item in policyFragmentContract.GetReferencesAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PortalConfigContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PortalConfigContractCollection.cs new file mode 100644 index 0000000000000..52113570db639 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PortalConfigContractCollection.cs @@ -0,0 +1,234 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_PortalConfigContractCollection + { + // ApiManagementListPortalConfig + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ApiManagementListPortalConfig() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListPortalConfig.json + // this example is just showing the usage of "PortalConfig_ListByService" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this PortalConfigContractResource + PortalConfigContractCollection collection = apiManagementService.GetPortalConfigContracts(); + + // invoke the operation and iterate over the result + await foreach (PortalConfigContractResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PortalConfigContractData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // ApiManagementPortalConfig + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementPortalConfig() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalConfig.json + // this example is just showing the usage of "PortalConfig_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this PortalConfigContractResource + PortalConfigContractCollection collection = apiManagementService.GetPortalConfigContracts(); + + // invoke the operation + string portalConfigId = "default"; + PortalConfigContractResource result = await collection.GetAsync(portalConfigId); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PortalConfigContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementPortalConfig + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_ApiManagementPortalConfig() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalConfig.json + // this example is just showing the usage of "PortalConfig_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this PortalConfigContractResource + PortalConfigContractCollection collection = apiManagementService.GetPortalConfigContracts(); + + // invoke the operation + string portalConfigId = "default"; + bool result = await collection.ExistsAsync(portalConfigId); + + Console.WriteLine($"Succeeded: {result}"); + } + + // ApiManagementPortalConfig + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_ApiManagementPortalConfig() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalConfig.json + // this example is just showing the usage of "PortalConfig_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this PortalConfigContractResource + PortalConfigContractCollection collection = apiManagementService.GetPortalConfigContracts(); + + // invoke the operation + string portalConfigId = "default"; + NullableResponse response = await collection.GetIfExistsAsync(portalConfigId); + PortalConfigContractResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PortalConfigContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // ApiManagementCreatePortalConfig + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApiManagementCreatePortalConfig() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreatePortalConfig.json + // this example is just showing the usage of "PortalConfig_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this PortalConfigContractResource + PortalConfigContractCollection collection = apiManagementService.GetPortalConfigContracts(); + + // invoke the operation + string portalConfigId = "default"; + ETag ifMatch = new ETag("*"); + PortalConfigContractData data = new PortalConfigContractData() + { + EnableBasicAuth = true, + Require = false, + SignupTermsOfService = new PortalConfigTermsOfServiceProperties() + { + Text = "I agree to the service terms and conditions.", + RequireConsent = false, + }, + Delegation = new PortalConfigDelegationProperties() + { + DelegateRegistration = false, + DelegateSubscription = false, + DelegationUri = null, + ValidationKey = null, + }, + CorsAllowedOrigins = +{ +"https://contoso.com" +}, + Csp = new PortalConfigCspProperties() + { + Mode = PortalSettingsCspMode.ReportOnly, + ReportUri = +{ +new Uri("https://report.contoso.com") +}, + AllowedSources = +{ +"*.contoso.com" +}, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, portalConfigId, ifMatch, data); + PortalConfigContractResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PortalConfigContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PortalConfigContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PortalConfigContractResource.cs new file mode 100644 index 0000000000000..c059c257368d3 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PortalConfigContractResource.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_PortalConfigContractResource + { + // ApiManagementHeadPortalConfig + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetEntityTag_ApiManagementHeadPortalConfig() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadPortalConfig.json + // this example is just showing the usage of "PortalConfig_GetEntityTag" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PortalConfigContractResource created on azure + // for more information of creating PortalConfigContractResource, please refer to the document of PortalConfigContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string portalConfigId = "default"; + ResourceIdentifier portalConfigContractResourceId = PortalConfigContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, portalConfigId); + PortalConfigContractResource portalConfigContract = client.GetPortalConfigContractResource(portalConfigContractResourceId); + + // invoke the operation + bool result = await portalConfigContract.GetEntityTagAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + // ApiManagementPortalConfig + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementPortalConfig() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementPortalConfig.json + // this example is just showing the usage of "PortalConfig_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PortalConfigContractResource created on azure + // for more information of creating PortalConfigContractResource, please refer to the document of PortalConfigContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string portalConfigId = "default"; + ResourceIdentifier portalConfigContractResourceId = PortalConfigContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, portalConfigId); + PortalConfigContractResource portalConfigContract = client.GetPortalConfigContractResource(portalConfigContractResourceId); + + // invoke the operation + PortalConfigContractResource result = await portalConfigContract.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PortalConfigContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementUpdatePortalConfig + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_ApiManagementUpdatePortalConfig() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdatePortalConfig.json + // this example is just showing the usage of "PortalConfig_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PortalConfigContractResource created on azure + // for more information of creating PortalConfigContractResource, please refer to the document of PortalConfigContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string portalConfigId = "default"; + ResourceIdentifier portalConfigContractResourceId = PortalConfigContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, portalConfigId); + PortalConfigContractResource portalConfigContract = client.GetPortalConfigContractResource(portalConfigContractResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + PortalConfigContractData data = new PortalConfigContractData() + { + EnableBasicAuth = true, + Require = false, + SignupTermsOfService = new PortalConfigTermsOfServiceProperties() + { + Text = "I agree to the service terms and conditions.", + RequireConsent = false, + }, + Delegation = new PortalConfigDelegationProperties() + { + DelegateRegistration = false, + DelegateSubscription = false, + DelegationUri = null, + ValidationKey = null, + }, + CorsAllowedOrigins = +{ +"https://contoso.com" +}, + Csp = new PortalConfigCspProperties() + { + Mode = PortalSettingsCspMode.ReportOnly, + ReportUri = +{ +new Uri("https://report.contoso.com") +}, + AllowedSources = +{ +"*.contoso.com" +}, + }, + }; + PortalConfigContractResource result = await portalConfigContract.UpdateAsync(ifMatch, data); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PortalConfigContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ResolverContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ResolverContractCollection.cs new file mode 100644 index 0000000000000..dc602ab11b78c --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ResolverContractCollection.cs @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_ResolverContractCollection + { + // ApiManagementListGraphQLApiResolvers + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ApiManagementListGraphQLApiResolvers() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGraphQLApiResolvers.json + // this example is just showing the usage of "GraphQLApiResolver_ListByApi" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiResource created on azure + // for more information of creating ApiResource, please refer to the document of ApiResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "57d2ef278aa04f0888cba3f3"; + ResourceIdentifier apiResourceId = ApiResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId); + ApiResource api = client.GetApiResource(apiResourceId); + + // get the collection of this ResolverContractResource + ResolverContractCollection collection = api.GetResolverContracts(); + + // invoke the operation and iterate over the result + await foreach (ResolverContractResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ResolverContractData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // ApiManagementGetGraphQLApiResolver + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementGetGraphQLApiResolver() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGraphQLApiResolver.json + // this example is just showing the usage of "GraphQLApiResolver_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiResource created on azure + // for more information of creating ApiResource, please refer to the document of ApiResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "57d2ef278aa04f0888cba3f3"; + ResourceIdentifier apiResourceId = ApiResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId); + ApiResource api = client.GetApiResource(apiResourceId); + + // get the collection of this ResolverContractResource + ResolverContractCollection collection = api.GetResolverContracts(); + + // invoke the operation + string resolverId = "57d2ef278aa04f0ad01d6cdc"; + ResolverContractResource result = await collection.GetAsync(resolverId); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ResolverContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementGetGraphQLApiResolver + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_ApiManagementGetGraphQLApiResolver() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGraphQLApiResolver.json + // this example is just showing the usage of "GraphQLApiResolver_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiResource created on azure + // for more information of creating ApiResource, please refer to the document of ApiResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "57d2ef278aa04f0888cba3f3"; + ResourceIdentifier apiResourceId = ApiResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId); + ApiResource api = client.GetApiResource(apiResourceId); + + // get the collection of this ResolverContractResource + ResolverContractCollection collection = api.GetResolverContracts(); + + // invoke the operation + string resolverId = "57d2ef278aa04f0ad01d6cdc"; + bool result = await collection.ExistsAsync(resolverId); + + Console.WriteLine($"Succeeded: {result}"); + } + + // ApiManagementGetGraphQLApiResolver + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_ApiManagementGetGraphQLApiResolver() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGraphQLApiResolver.json + // this example is just showing the usage of "GraphQLApiResolver_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiResource created on azure + // for more information of creating ApiResource, please refer to the document of ApiResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "57d2ef278aa04f0888cba3f3"; + ResourceIdentifier apiResourceId = ApiResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId); + ApiResource api = client.GetApiResource(apiResourceId); + + // get the collection of this ResolverContractResource + ResolverContractCollection collection = api.GetResolverContracts(); + + // invoke the operation + string resolverId = "57d2ef278aa04f0ad01d6cdc"; + NullableResponse response = await collection.GetIfExistsAsync(resolverId); + ResolverContractResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ResolverContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // ApiManagementCreateGraphQLApiResolver + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApiManagementCreateGraphQLApiResolver() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGraphQLApiResolver.json + // this example is just showing the usage of "GraphQLApiResolver_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiResource created on azure + // for more information of creating ApiResource, please refer to the document of ApiResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "someAPI"; + ResourceIdentifier apiResourceId = ApiResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId); + ApiResource api = client.GetApiResource(apiResourceId); + + // get the collection of this ResolverContractResource + ResolverContractCollection collection = api.GetResolverContracts(); + + // invoke the operation + string resolverId = "newResolver"; + ResolverContractData data = new ResolverContractData() + { + DisplayName = "Query Users", + Path = "Query/users", + Description = "A GraphQL Resolver example", + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, resolverId, data); + ResolverContractResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ResolverContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ResolverContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ResolverContractResource.cs new file mode 100644 index 0000000000000..f4b2c4c51a800 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ResolverContractResource.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_ResolverContractResource + { + // ApiManagementHeadGraphQLApiResolver + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetEntityTag_ApiManagementHeadGraphQLApiResolver() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGraphQLApiResolver.json + // this example is just showing the usage of "GraphQLApiResolver_GetEntityTag" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResolverContractResource created on azure + // for more information of creating ResolverContractResource, please refer to the document of ResolverContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "57d2ef278aa04f0888cba3f3"; + string resolverId = "57d2ef278aa04f0ad01d6cdc"; + ResourceIdentifier resolverContractResourceId = ResolverContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + ResolverContractResource resolverContract = client.GetResolverContractResource(resolverContractResourceId); + + // invoke the operation + bool result = await resolverContract.GetEntityTagAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + // ApiManagementGetGraphQLApiResolver + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementGetGraphQLApiResolver() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGraphQLApiResolver.json + // this example is just showing the usage of "GraphQLApiResolver_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResolverContractResource created on azure + // for more information of creating ResolverContractResource, please refer to the document of ResolverContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "57d2ef278aa04f0888cba3f3"; + string resolverId = "57d2ef278aa04f0ad01d6cdc"; + ResourceIdentifier resolverContractResourceId = ResolverContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + ResolverContractResource resolverContract = client.GetResolverContractResource(resolverContractResourceId); + + // invoke the operation + ResolverContractResource result = await resolverContract.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ResolverContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementUpdateGraphQLApiResolver + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_ApiManagementUpdateGraphQLApiResolver() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateGraphQLApiResolver.json + // this example is just showing the usage of "GraphQLApiResolver_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResolverContractResource created on azure + // for more information of creating ResolverContractResource, please refer to the document of ResolverContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "echo-api"; + string resolverId = "resolverId"; + ResourceIdentifier resolverContractResourceId = ResolverContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + ResolverContractResource resolverContract = client.GetResolverContractResource(resolverContractResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + ResolverContractPatch patch = new ResolverContractPatch() + { + DisplayName = "Query AdminUsers", + Path = "Query/adminUsers", + Description = "A GraphQL Resolver example", + }; + ResolverContractResource result = await resolverContract.UpdateAsync(ifMatch, patch); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ResolverContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementDeleteGraphQLApiResolver + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_ApiManagementDeleteGraphQLApiResolver() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGraphQLApiResolver.json + // this example is just showing the usage of "GraphQLApiResolver_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResolverContractResource created on azure + // for more information of creating ResolverContractResource, please refer to the document of ResolverContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "57d2ef278aa04f0888cba3f3"; + string resolverId = "57d2ef278aa04f0ad01d6cdc"; + ResourceIdentifier resolverContractResourceId = ResolverContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + ResolverContractResource resolverContract = client.GetResolverContractResource(resolverContractResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + await resolverContract.DeleteAsync(WaitUntil.Completed, ifMatch); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceApiResolverPolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceApiResolverPolicyCollection.cs new file mode 100644 index 0000000000000..f01657d8fe38a --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceApiResolverPolicyCollection.cs @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_ServiceApiResolverPolicyCollection + { + // ApiManagementListGraphQLApiResolverPolicies + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ApiManagementListGraphQLApiResolverPolicies() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListGraphQLApiResolverPolicies.json + // this example is just showing the usage of "GraphQLApiResolverPolicy_ListByResolver" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResolverContractResource created on azure + // for more information of creating ResolverContractResource, please refer to the document of ResolverContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "599e2953193c3c0bd0b3e2fa"; + string resolverId = "599e29ab193c3c0bd0b3e2fb"; + ResourceIdentifier resolverContractResourceId = ResolverContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + ResolverContractResource resolverContract = client.GetResolverContractResource(resolverContractResourceId); + + // get the collection of this ServiceApiResolverPolicyResource + ServiceApiResolverPolicyCollection collection = resolverContract.GetServiceApiResolverPolicies(); + + // invoke the operation and iterate over the result + await foreach (ServiceApiResolverPolicyResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PolicyContractData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // ApiManagementGetGraphQLApiResolverPolicy + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementGetGraphQLApiResolverPolicy() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGraphQLApiResolverPolicy.json + // this example is just showing the usage of "GraphQLApiResolverPolicy_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResolverContractResource created on azure + // for more information of creating ResolverContractResource, please refer to the document of ResolverContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "5600b539c53f5b0062040001"; + string resolverId = "5600b53ac53f5b0062080006"; + ResourceIdentifier resolverContractResourceId = ResolverContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + ResolverContractResource resolverContract = client.GetResolverContractResource(resolverContractResourceId); + + // get the collection of this ServiceApiResolverPolicyResource + ServiceApiResolverPolicyCollection collection = resolverContract.GetServiceApiResolverPolicies(); + + // invoke the operation + PolicyName policyId = PolicyName.Policy; + ServiceApiResolverPolicyResource result = await collection.GetAsync(policyId); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PolicyContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementGetGraphQLApiResolverPolicy + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_ApiManagementGetGraphQLApiResolverPolicy() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGraphQLApiResolverPolicy.json + // this example is just showing the usage of "GraphQLApiResolverPolicy_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResolverContractResource created on azure + // for more information of creating ResolverContractResource, please refer to the document of ResolverContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "5600b539c53f5b0062040001"; + string resolverId = "5600b53ac53f5b0062080006"; + ResourceIdentifier resolverContractResourceId = ResolverContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + ResolverContractResource resolverContract = client.GetResolverContractResource(resolverContractResourceId); + + // get the collection of this ServiceApiResolverPolicyResource + ServiceApiResolverPolicyCollection collection = resolverContract.GetServiceApiResolverPolicies(); + + // invoke the operation + PolicyName policyId = PolicyName.Policy; + bool result = await collection.ExistsAsync(policyId); + + Console.WriteLine($"Succeeded: {result}"); + } + + // ApiManagementGetGraphQLApiResolverPolicy + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_ApiManagementGetGraphQLApiResolverPolicy() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGraphQLApiResolverPolicy.json + // this example is just showing the usage of "GraphQLApiResolverPolicy_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResolverContractResource created on azure + // for more information of creating ResolverContractResource, please refer to the document of ResolverContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "5600b539c53f5b0062040001"; + string resolverId = "5600b53ac53f5b0062080006"; + ResourceIdentifier resolverContractResourceId = ResolverContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + ResolverContractResource resolverContract = client.GetResolverContractResource(resolverContractResourceId); + + // get the collection of this ServiceApiResolverPolicyResource + ServiceApiResolverPolicyCollection collection = resolverContract.GetServiceApiResolverPolicies(); + + // invoke the operation + PolicyName policyId = PolicyName.Policy; + NullableResponse response = await collection.GetIfExistsAsync(policyId); + ServiceApiResolverPolicyResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PolicyContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // ApiManagementCreateGraphQLApiResolverPolicy + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApiManagementCreateGraphQLApiResolverPolicy() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGraphQLApiResolverPolicy.json + // this example is just showing the usage of "GraphQLApiResolverPolicy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResolverContractResource created on azure + // for more information of creating ResolverContractResource, please refer to the document of ResolverContractResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "5600b57e7e8880006a040001"; + string resolverId = "5600b57e7e8880006a080001"; + ResourceIdentifier resolverContractResourceId = ResolverContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + ResolverContractResource resolverContract = client.GetResolverContractResource(resolverContractResourceId); + + // get the collection of this ServiceApiResolverPolicyResource + ServiceApiResolverPolicyCollection collection = resolverContract.GetServiceApiResolverPolicies(); + + // invoke the operation + PolicyName policyId = PolicyName.Policy; + PolicyContractData data = new PolicyContractData() + { + Value = "GET/api/users", + Format = PolicyContentFormat.Xml, + }; + ETag? ifMatch = new ETag("*"); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, policyId, data, ifMatch: ifMatch); + ServiceApiResolverPolicyResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PolicyContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceApiResolverPolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceApiResolverPolicyResource.cs new file mode 100644 index 0000000000000..c6b898780ea07 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceApiResolverPolicyResource.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_ServiceApiResolverPolicyResource + { + // ApiManagementHeadGraphQLApiResolverPolicy + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetEntityTag_ApiManagementHeadGraphQLApiResolverPolicy() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadGraphQLApiResolverPolicy.json + // this example is just showing the usage of "GraphQLApiResolverPolicy_GetEntityTag" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceApiResolverPolicyResource created on azure + // for more information of creating ServiceApiResolverPolicyResource, please refer to the document of ServiceApiResolverPolicyResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "5600b539c53f5b0062040001"; + string resolverId = "5600b53ac53f5b0062080006"; + PolicyName policyId = PolicyName.Policy; + ResourceIdentifier serviceApiResolverPolicyResourceId = ServiceApiResolverPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, policyId); + ServiceApiResolverPolicyResource serviceApiResolverPolicy = client.GetServiceApiResolverPolicyResource(serviceApiResolverPolicyResourceId); + + // invoke the operation + bool result = await serviceApiResolverPolicy.GetEntityTagAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + // ApiManagementGetGraphQLApiResolverPolicy + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementGetGraphQLApiResolverPolicy() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetGraphQLApiResolverPolicy.json + // this example is just showing the usage of "GraphQLApiResolverPolicy_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceApiResolverPolicyResource created on azure + // for more information of creating ServiceApiResolverPolicyResource, please refer to the document of ServiceApiResolverPolicyResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "5600b539c53f5b0062040001"; + string resolverId = "5600b53ac53f5b0062080006"; + PolicyName policyId = PolicyName.Policy; + ResourceIdentifier serviceApiResolverPolicyResourceId = ServiceApiResolverPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, policyId); + ServiceApiResolverPolicyResource serviceApiResolverPolicy = client.GetServiceApiResolverPolicyResource(serviceApiResolverPolicyResourceId); + + // invoke the operation + ServiceApiResolverPolicyResource result = await serviceApiResolverPolicy.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PolicyContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementCreateGraphQLApiResolverPolicy + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_ApiManagementCreateGraphQLApiResolverPolicy() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateGraphQLApiResolverPolicy.json + // this example is just showing the usage of "GraphQLApiResolverPolicy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceApiResolverPolicyResource created on azure + // for more information of creating ServiceApiResolverPolicyResource, please refer to the document of ServiceApiResolverPolicyResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "5600b57e7e8880006a040001"; + string resolverId = "5600b57e7e8880006a080001"; + PolicyName policyId = PolicyName.Policy; + ResourceIdentifier serviceApiResolverPolicyResourceId = ServiceApiResolverPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, policyId); + ServiceApiResolverPolicyResource serviceApiResolverPolicy = client.GetServiceApiResolverPolicyResource(serviceApiResolverPolicyResourceId); + + // invoke the operation + PolicyContractData data = new PolicyContractData() + { + Value = "GET/api/users", + Format = PolicyContentFormat.Xml, + }; + ETag? ifMatch = new ETag("*"); + ArmOperation lro = await serviceApiResolverPolicy.UpdateAsync(WaitUntil.Completed, data, ifMatch: ifMatch); + ServiceApiResolverPolicyResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + PolicyContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementDeleteGraphQLApiResolverPolicy + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_ApiManagementDeleteGraphQLApiResolverPolicy() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteGraphQLApiResolverPolicy.json + // this example is just showing the usage of "GraphQLApiResolverPolicy_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceApiResolverPolicyResource created on azure + // for more information of creating ServiceApiResolverPolicyResource, please refer to the document of ServiceApiResolverPolicyResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "testapi"; + string resolverId = "testResolver"; + PolicyName policyId = PolicyName.Policy; + ResourceIdentifier serviceApiResolverPolicyResourceId = ServiceApiResolverPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, policyId); + ServiceApiResolverPolicyResource serviceApiResolverPolicy = client.GetServiceApiResolverPolicyResource(serviceApiResolverPolicyResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + await serviceApiResolverPolicy.DeleteAsync(WaitUntil.Completed, ifMatch); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceApiWikiResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceApiWikiResource.cs new file mode 100644 index 0000000000000..2ca964c844420 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceApiWikiResource.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_ServiceApiWikiResource + { + // ApiManagementHeadApiWiki + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetEntityTag_ApiManagementHeadApiWiki() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadApiWiki.json + // this example is just showing the usage of "ApiWiki_GetEntityTag" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceApiWikiResource created on azure + // for more information of creating ServiceApiWikiResource, please refer to the document of ServiceApiWikiResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "57d1f7558aa04f15146d9d8a"; + ResourceIdentifier serviceApiWikiResourceId = ServiceApiWikiResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId); + ServiceApiWikiResource serviceApiWiki = client.GetServiceApiWikiResource(serviceApiWikiResourceId); + + // invoke the operation + bool result = await serviceApiWiki.GetEntityTagAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + // ApiManagementGetApiWiki + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementGetApiWiki() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetApiWiki.json + // this example is just showing the usage of "ApiWiki_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceApiWikiResource created on azure + // for more information of creating ServiceApiWikiResource, please refer to the document of ServiceApiWikiResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "57d1f7558aa04f15146d9d8a"; + ResourceIdentifier serviceApiWikiResourceId = ServiceApiWikiResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId); + ServiceApiWikiResource serviceApiWiki = client.GetServiceApiWikiResource(serviceApiWikiResourceId); + + // invoke the operation + ServiceApiWikiResource result = await serviceApiWiki.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WikiContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementCreateApiWiki + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApiManagementCreateApiWiki() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateApiWiki.json + // this example is just showing the usage of "ApiWiki_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceApiWikiResource created on azure + // for more information of creating ServiceApiWikiResource, please refer to the document of ServiceApiWikiResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "57d1f7558aa04f15146d9d8a"; + ResourceIdentifier serviceApiWikiResourceId = ServiceApiWikiResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId); + ServiceApiWikiResource serviceApiWiki = client.GetServiceApiWikiResource(serviceApiWikiResourceId); + + // invoke the operation + WikiContractData data = new WikiContractData() + { + Documents = +{ +new WikiDocumentationContract() +{ +DocumentationId = "docId1", +},new WikiDocumentationContract() +{ +DocumentationId = "docId2", +} +}, + }; + ArmOperation lro = await serviceApiWiki.CreateOrUpdateAsync(WaitUntil.Completed, data); + ServiceApiWikiResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WikiContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementUpdateApiWiki + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_ApiManagementUpdateApiWiki() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateApiWiki.json + // this example is just showing the usage of "ApiWiki_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceApiWikiResource created on azure + // for more information of creating ServiceApiWikiResource, please refer to the document of ServiceApiWikiResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "57d1f7558aa04f15146d9d8a"; + ResourceIdentifier serviceApiWikiResourceId = ServiceApiWikiResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId); + ServiceApiWikiResource serviceApiWiki = client.GetServiceApiWikiResource(serviceApiWikiResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + WikiUpdateContract wikiUpdateContract = new WikiUpdateContract() + { + Documents = +{ +new WikiDocumentationContract() +{ +DocumentationId = "docId1", +} +}, + }; + ServiceApiWikiResource result = await serviceApiWiki.UpdateAsync(ifMatch, wikiUpdateContract); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WikiContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementDeleteApiWiki + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_ApiManagementDeleteApiWiki() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteApiWiki.json + // this example is just showing the usage of "ApiWiki_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceApiWikiResource created on azure + // for more information of creating ServiceApiWikiResource, please refer to the document of ServiceApiWikiResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string apiId = "57d1f7558aa04f15146d9d8a"; + ResourceIdentifier serviceApiWikiResourceId = ServiceApiWikiResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, apiId); + ServiceApiWikiResource serviceApiWiki = client.GetServiceApiWikiResource(serviceApiWikiResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + await serviceApiWiki.DeleteAsync(WaitUntil.Completed, ifMatch); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceProductWikiResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceProductWikiResource.cs new file mode 100644 index 0000000000000..039d90cabccf0 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceProductWikiResource.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_ServiceProductWikiResource + { + // ApiManagementHeadProductWiki + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetEntityTag_ApiManagementHeadProductWiki() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadProductWiki.json + // this example is just showing the usage of "ProductWiki_GetEntityTag" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceProductWikiResource created on azure + // for more information of creating ServiceProductWikiResource, please refer to the document of ServiceProductWikiResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string productId = "57d1f7558aa04f15146d9d8a"; + ResourceIdentifier serviceProductWikiResourceId = ServiceProductWikiResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, productId); + ServiceProductWikiResource serviceProductWiki = client.GetServiceProductWikiResource(serviceProductWikiResourceId); + + // invoke the operation + bool result = await serviceProductWiki.GetEntityTagAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + // ApiManagementGetProductWiki + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_ApiManagementGetProductWiki() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetProductWiki.json + // this example is just showing the usage of "ProductWiki_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceProductWikiResource created on azure + // for more information of creating ServiceProductWikiResource, please refer to the document of ServiceProductWikiResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string productId = "57d1f7558aa04f15146d9d8a"; + ResourceIdentifier serviceProductWikiResourceId = ServiceProductWikiResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, productId); + ServiceProductWikiResource serviceProductWiki = client.GetServiceProductWikiResource(serviceProductWikiResourceId); + + // invoke the operation + ServiceProductWikiResource result = await serviceProductWiki.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WikiContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementCreateProductWiki + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApiManagementCreateProductWiki() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateProductWiki.json + // this example is just showing the usage of "ProductWiki_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceProductWikiResource created on azure + // for more information of creating ServiceProductWikiResource, please refer to the document of ServiceProductWikiResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string productId = "57d1f7558aa04f15146d9d8a"; + ResourceIdentifier serviceProductWikiResourceId = ServiceProductWikiResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, productId); + ServiceProductWikiResource serviceProductWiki = client.GetServiceProductWikiResource(serviceProductWikiResourceId); + + // invoke the operation + WikiContractData data = new WikiContractData() + { + Documents = +{ +new WikiDocumentationContract() +{ +DocumentationId = "docId1", +},new WikiDocumentationContract() +{ +DocumentationId = "docId2", +} +}, + }; + ArmOperation lro = await serviceProductWiki.CreateOrUpdateAsync(WaitUntil.Completed, data); + ServiceProductWikiResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WikiContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementUpdateProductWiki + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_ApiManagementUpdateProductWiki() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateProductWiki.json + // this example is just showing the usage of "ProductWiki_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceProductWikiResource created on azure + // for more information of creating ServiceProductWikiResource, please refer to the document of ServiceProductWikiResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string productId = "57d1f7558aa04f15146d9d8a"; + ResourceIdentifier serviceProductWikiResourceId = ServiceProductWikiResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, productId); + ServiceProductWikiResource serviceProductWiki = client.GetServiceProductWikiResource(serviceProductWikiResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + WikiUpdateContract wikiUpdateContract = new WikiUpdateContract() + { + Documents = +{ +new WikiDocumentationContract() +{ +DocumentationId = "docId1", +} +}, + }; + ServiceProductWikiResource result = await serviceProductWiki.UpdateAsync(ifMatch, wikiUpdateContract); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WikiContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // ApiManagementDeleteProductWiki + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_ApiManagementDeleteProductWiki() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementDeleteProductWiki.json + // this example is just showing the usage of "ProductWiki_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceProductWikiResource created on azure + // for more information of creating ServiceProductWikiResource, please refer to the document of ServiceProductWikiResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string productId = "57d1f7558aa04f15146d9d8a"; + ResourceIdentifier serviceProductWikiResourceId = ServiceProductWikiResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, productId); + ServiceProductWikiResource serviceProductWiki = client.GetServiceProductWikiResource(serviceProductWikiResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + await serviceProductWiki.DeleteAsync(WaitUntil.Completed, ifMatch); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 730994cb4e207..bd85cbcb6bc63 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_SubscriptionResourceExtensions [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetApiManagementSkus_ListsAllAvailableResourceSKUs() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListSku.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListSku.json // this example is just showing the usage of "ApiManagementSkus_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_TenantAccessInfoCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_TenantAccessInfoCollection.cs index 728eee6775110..f0691b8764942 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_TenantAccessInfoCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_TenantAccessInfoCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_TenantAccessInfoCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ApiManagementListTenantAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListTenantAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListTenantAccess.json // this example is just showing the usage of "TenantAccess_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ApiManagementListTenantAccess() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetTenantAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTenantAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTenantAccess.json // this example is just showing the usage of "TenantAccess_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_ApiManagementGetTenantAccess() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetTenantAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTenantAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTenantAccess.json // this example is just showing the usage of "TenantAccess_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_ApiManagementGetTenantAccess() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetTenantAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTenantAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTenantAccess.json // this example is just showing the usage of "TenantAccess_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_ApiManagementGetTenantAccess() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetTenantGitAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTenantGitAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTenantGitAccess.json // this example is just showing the usage of "TenantAccess_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -201,7 +201,7 @@ public async Task Get_ApiManagementGetTenantGitAccess() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ApiManagementGetTenantGitAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTenantGitAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTenantGitAccess.json // this example is just showing the usage of "TenantAccess_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -232,7 +232,7 @@ public async Task Exists_ApiManagementGetTenantGitAccess() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ApiManagementGetTenantGitAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTenantGitAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTenantGitAccess.json // this example is just showing the usage of "TenantAccess_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -275,7 +275,7 @@ public async Task GetIfExists_ApiManagementGetTenantGitAccess() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApiManagementCreateTenantAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementCreateTenantAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementCreateTenantAccess.json // this example is just showing the usage of "TenantAccess_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_TenantAccessInfoResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_TenantAccessInfoResource.cs index 684d81b7cccfe..f7a5631329c24 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_TenantAccessInfoResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_TenantAccessInfoResource.cs @@ -20,7 +20,7 @@ public partial class Sample_TenantAccessInfoResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEntityTag_ApiManagementHeadTenantAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementHeadTenantAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementHeadTenantAccess.json // this example is just showing the usage of "TenantAccess_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetEntityTag_ApiManagementHeadTenantAccess() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetTenantAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTenantAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTenantAccess.json // this example is just showing the usage of "TenantAccess_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Get_ApiManagementGetTenantAccess() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ApiManagementGetTenantGitAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementGetTenantGitAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementGetTenantGitAccess.json // this example is just showing the usage of "TenantAccess_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -112,7 +112,7 @@ public async Task Get_ApiManagementGetTenantGitAccess() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApiManagementUpdateTenantAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementUpdateTenantAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementUpdateTenantAccess.json // this example is just showing the usage of "TenantAccess_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -149,7 +149,7 @@ public async Task Update_ApiManagementUpdateTenantAccess() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task RegeneratePrimaryKey_ApiManagementTenantAccessRegenerateKey() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementTenantAccessRegenerateKey.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantAccessRegenerateKey.json // this example is just showing the usage of "TenantAccess_RegeneratePrimaryKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -177,7 +177,7 @@ public async Task RegeneratePrimaryKey_ApiManagementTenantAccessRegenerateKey() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task RegenerateSecondaryKey_ApiManagementTenantAccessRegenerateKey() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementTenantAccessRegenerateKey.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantAccessRegenerateKey.json // this example is just showing the usage of "TenantAccess_RegenerateSecondaryKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -205,7 +205,7 @@ public async Task RegenerateSecondaryKey_ApiManagementTenantAccessRegenerateKey( [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSecrets_ApiManagementListSecretsTenantAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementListSecretsTenantAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementListSecretsTenantAccess.json // this example is just showing the usage of "TenantAccess_ListSecrets" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -233,7 +233,7 @@ public async Task GetSecrets_ApiManagementListSecretsTenantAccess() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task RegeneratePrimaryKeyForGit_ApiManagementTenantAccessRegenerateKey() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementTenantAccessRegenerateKey.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantAccessRegenerateKey.json // this example is just showing the usage of "TenantAccessGit_RegeneratePrimaryKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -261,7 +261,7 @@ public async Task RegeneratePrimaryKeyForGit_ApiManagementTenantAccessRegenerate [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task RegenerateSecondaryKeyForGit_ApiManagementTenantAccessRegenerateKey() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2021-08-01/examples/ApiManagementTenantAccessRegenerateKey.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2022-08-01/examples/ApiManagementTenantAccessRegenerateKey.json // this example is just showing the usage of "TenantAccessGit_RegenerateSecondaryKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Azure.ResourceManager.ApiManagement.csproj b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Azure.ResourceManager.ApiManagement.csproj index 2a056867d2f76..5cd6a5bff7482 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Azure.ResourceManager.ApiManagement.csproj +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Azure.ResourceManager.ApiManagement.csproj @@ -1,6 +1,6 @@ - 1.2.0-beta.2 + 1.2.0 1.1.0 Azure.ResourceManager.ApiManagement diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiCollection.cs index 7249b94240b51..fe130f130c2c9 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdateAsync(WaitUnt /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, str /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetAsync(string apiId, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string apiId, CancellationToken cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -290,7 +290,7 @@ public virtual AsyncPageable GetAllAsync(string filter = null, int? /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -325,7 +325,7 @@ public virtual Pageable GetAll(string filter = null, int? top = nul /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -368,7 +368,7 @@ public virtual async Task> ExistsAsync(string apiId, Cancellation /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -411,7 +411,7 @@ public virtual Response Exists(string apiId, CancellationToken cancellatio /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -456,7 +456,7 @@ public virtual async Task> GetIfExistsAsync(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiData.Serialization.cs index 9ef8aaf777656..02293b2363468 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiData.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -457,6 +459,475 @@ internal static ApiData DeserializeApiData(JsonElement element, ModelReaderWrite serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AuthenticationSettings), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" authenticationSettings: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AuthenticationSettings)) + { + builder.Append(" authenticationSettings: "); + BicepSerializationHelpers.AppendChildObject(builder, AuthenticationSettings, options, 4, false, " authenticationSettings: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SubscriptionKeyParameterNames), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionKeyParameterNames: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SubscriptionKeyParameterNames)) + { + builder.Append(" subscriptionKeyParameterNames: "); + BicepSerializationHelpers.AppendChildObject(builder, SubscriptionKeyParameterNames, options, 4, false, " subscriptionKeyParameterNames: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiType)) + { + builder.Append(" type: "); + builder.AppendLine($"'{ApiType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiRevision), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiRevision: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiRevision)) + { + builder.Append(" apiRevision: "); + if (ApiRevision.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiRevision}'''"); + } + else + { + builder.AppendLine($"'{ApiRevision}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersion)) + { + builder.Append(" apiVersion: "); + if (ApiVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiVersion}'''"); + } + else + { + builder.AppendLine($"'{ApiVersion}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsCurrent), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isCurrent: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsCurrent)) + { + builder.Append(" isCurrent: "); + var boolValue = IsCurrent.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsOnline), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isOnline: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsOnline)) + { + builder.Append(" isOnline: "); + var boolValue = IsOnline.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiRevisionDescription), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiRevisionDescription: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiRevisionDescription)) + { + builder.Append(" apiRevisionDescription: "); + if (ApiRevisionDescription.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiRevisionDescription}'''"); + } + else + { + builder.AppendLine($"'{ApiRevisionDescription}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersionDescription), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersionDescription: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersionDescription)) + { + builder.Append(" apiVersionDescription: "); + if (ApiVersionDescription.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiVersionDescription}'''"); + } + else + { + builder.AppendLine($"'{ApiVersionDescription}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersionSetId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersionSetId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersionSetId)) + { + builder.Append(" apiVersionSetId: "); + builder.AppendLine($"'{ApiVersionSetId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsSubscriptionRequired), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionRequired: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsSubscriptionRequired)) + { + builder.Append(" subscriptionRequired: "); + var boolValue = IsSubscriptionRequired.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TermsOfServiceLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" termsOfServiceUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TermsOfServiceLink)) + { + builder.Append(" termsOfServiceUrl: "); + if (TermsOfServiceLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TermsOfServiceLink}'''"); + } + else + { + builder.AppendLine($"'{TermsOfServiceLink}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Contact), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" contact: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Contact)) + { + builder.Append(" contact: "); + BicepSerializationHelpers.AppendChildObject(builder, Contact, options, 4, false, " contact: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(License), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" license: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(License)) + { + builder.Append(" license: "); + BicepSerializationHelpers.AppendChildObject(builder, License, options, 4, false, " license: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SourceApiId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sourceApiId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SourceApiId)) + { + builder.Append(" sourceApiId: "); + builder.AppendLine($"'{SourceApiId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DisplayName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" displayName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DisplayName)) + { + builder.Append(" displayName: "); + if (DisplayName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DisplayName}'''"); + } + else + { + builder.AppendLine($"'{DisplayName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ServiceLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serviceUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ServiceLink)) + { + builder.Append(" serviceUrl: "); + if (ServiceLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ServiceLink}'''"); + } + else + { + builder.AppendLine($"'{ServiceLink}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Path), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" path: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Path)) + { + builder.Append(" path: "); + if (Path.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Path}'''"); + } + else + { + builder.AppendLine($"'{Path}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Protocols), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" protocols: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Protocols)) + { + if (Protocols.Any()) + { + builder.Append(" protocols: "); + builder.AppendLine("["); + foreach (var item in Protocols) + { + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersionSet), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersionSet: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersionSet)) + { + builder.Append(" apiVersionSet: "); + BicepSerializationHelpers.AppendChildObject(builder, ApiVersionSet, options, 4, false, " apiVersionSet: "); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -465,6 +936,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiData.cs index 55bd712e80bdc..0b6aa43672b7a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiData.cs @@ -111,46 +111,67 @@ internal ApiData(ResourceIdentifier id, string name, ResourceType resourceType, } /// Description of the API. May include HTML formatting tags. + [WirePath("properties.description")] public string Description { get; set; } /// Collection of authentication settings included into this API. + [WirePath("properties.authenticationSettings")] public AuthenticationSettingsContract AuthenticationSettings { get; set; } /// Protocols over which API is made available. + [WirePath("properties.subscriptionKeyParameterNames")] public SubscriptionKeyParameterNamesContract SubscriptionKeyParameterNames { get; set; } /// Type of API. + [WirePath("properties.type")] public ApiType? ApiType { get; set; } /// Describes the revision of the API. If no value is provided, default revision 1 is created. + [WirePath("properties.apiRevision")] public string ApiRevision { get; set; } /// Indicates the version identifier of the API if the API is versioned. + [WirePath("properties.apiVersion")] public string ApiVersion { get; set; } /// Indicates if API revision is current api revision. + [WirePath("properties.isCurrent")] public bool? IsCurrent { get; set; } /// Indicates if API revision is accessible via the gateway. + [WirePath("properties.isOnline")] public bool? IsOnline { get; } /// Description of the API Revision. + [WirePath("properties.apiRevisionDescription")] public string ApiRevisionDescription { get; set; } /// Description of the API Version. + [WirePath("properties.apiVersionDescription")] public string ApiVersionDescription { get; set; } /// A resource identifier for the related ApiVersionSet. + [WirePath("properties.apiVersionSetId")] public ResourceIdentifier ApiVersionSetId { get; set; } /// Specifies whether an API or Product subscription is required for accessing the API. + [WirePath("properties.subscriptionRequired")] public bool? IsSubscriptionRequired { get; set; } /// A URL to the Terms of Service for the API. MUST be in the format of a URL. + [WirePath("properties.termsOfServiceUrl")] public string TermsOfServiceLink { get; set; } /// Contact information for the API. + [WirePath("properties.contact")] public ApiContactInformation Contact { get; set; } /// License information for the API. + [WirePath("properties.license")] public ApiLicenseInformation License { get; set; } /// API identifier of the source API. + [WirePath("properties.sourceApiId")] public ResourceIdentifier SourceApiId { get; set; } /// API name. Must be 1 to 300 characters long. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. + [WirePath("properties.serviceUrl")] public string ServiceLink { get; set; } /// Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. + [WirePath("properties.path")] public string Path { get; set; } /// Describes on which protocols the operations in this API can be invoked. + [WirePath("properties.protocols")] public IList Protocols { get; } /// Version set details. + [WirePath("properties.apiVersionSet")] public ApiVersionSetContractDetails ApiVersionSet { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiDiagnosticCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiDiagnosticCollection.cs index 9535c957b7546..13557973d5ae3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiDiagnosticCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiDiagnosticCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(string diagn /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string diagnosticId, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(string filter = /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string filter = null, int? /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string diagnosticId, Cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string diagnosticId, CancellationToken canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiDiagnosticResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiDiagnosticResource.cs index 4dda4f6e17f5c..5ccd9560f57a3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiDiagnosticResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiDiagnosticResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> UpdateAsync(ETag ifMa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual Response Update(ETag ifMatch, DiagnosticCo /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentCollection.cs index 1c64e8651852a..9a7664a84a3e7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string attachmentId, Can /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(string filt /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string filter = null, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string attachmentId, Cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string attachmentId, CancellationToken canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentData.Serialization.cs index 9f36e7945caf8..95691dbff2e0a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -182,6 +183,146 @@ internal static ApiIssueAttachmentData DeserializeApiIssueAttachmentData(JsonEle serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Title), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" title: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Title)) + { + builder.Append(" title: "); + if (Title.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Title}'''"); + } + else + { + builder.AppendLine($"'{Title}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ContentFormat), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" contentFormat: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ContentFormat)) + { + builder.Append(" contentFormat: "); + if (ContentFormat.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ContentFormat}'''"); + } + else + { + builder.AppendLine($"'{ContentFormat}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Content), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" content: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Content)) + { + builder.Append(" content: "); + if (Content.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Content}'''"); + } + else + { + builder.AppendLine($"'{Content}'"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -190,6 +331,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiIssueAttachmentData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentData.cs index d62c5d670d4eb..dc16beb043661 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentData.cs @@ -73,10 +73,13 @@ internal ApiIssueAttachmentData(ResourceIdentifier id, string name, ResourceType } /// Filename by which the binary data will be saved. + [WirePath("properties.title")] public string Title { get; set; } /// Either 'link' if content is provided via an HTTP link or the MIME type of the Base64-encoded binary data provided in the 'content' property. + [WirePath("properties.contentFormat")] public string ContentFormat { get; set; } /// An HTTP link or Base64-encoded binary data. + [WirePath("properties.content")] public string Content { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentResource.cs index 683f9456a5b65..bb2419002a74d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -273,7 +273,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -322,7 +322,7 @@ public virtual async Task> UpdateAsync( /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -371,7 +371,7 @@ public virtual ArmOperation Update(WaitUntil waitUnt /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -409,7 +409,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCollection.cs index e230c1b06f14d..8101cb6c9df67 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAsync(Wa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task> GetAsync(string issueId, b /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -260,7 +260,7 @@ public virtual Response Get(string issueId, bool? expandCommen /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual AsyncPageable GetAllAsync(string filter = null, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -328,7 +328,7 @@ public virtual Pageable GetAll(string filter = null, bool? exp /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -372,7 +372,7 @@ public virtual async Task> ExistsAsync(string issueId, bool? expa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -416,7 +416,7 @@ public virtual Response Exists(string issueId, bool? expandCommentsAttachm /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -462,7 +462,7 @@ public virtual async Task> GetIfExistsAsync(s /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentCollection.cs index 15b50c3582711..301e65b1561f4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(string com /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string commentId, Cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(string filter /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string filter = null, in /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string commentId, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string commentId, CancellationToken cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentData.Serialization.cs index d706bb7bda86e..1030c62748777 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -190,6 +191,131 @@ internal static ApiIssueCommentData DeserializeApiIssueCommentData(JsonElement e serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Text), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" text: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Text)) + { + builder.Append(" text: "); + if (Text.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Text}'''"); + } + else + { + builder.AppendLine($"'{Text}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CreatedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" createdDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CreatedOn)) + { + builder.Append(" createdDate: "); + var formattedDateTimeString = TypeFormatters.ToString(CreatedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UserId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" userId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UserId)) + { + builder.Append(" userId: "); + builder.AppendLine($"'{UserId.ToString()}'"); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -198,6 +324,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiIssueCommentData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentData.cs index 2054621d145e1..97425fad40d12 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentData.cs @@ -73,10 +73,13 @@ internal ApiIssueCommentData(ResourceIdentifier id, string name, ResourceType re } /// Comment text. + [WirePath("properties.text")] public string Text { get; set; } /// Date and time when the comment was created. + [WirePath("properties.createdDate")] public DateTimeOffset? CreatedOn { get; set; } /// A resource identifier for the user who left the comment. + [WirePath("properties.userId")] public ResourceIdentifier UserId { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentResource.cs index 697f314f2ea11..0717c62140045 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -273,7 +273,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -322,7 +322,7 @@ public virtual async Task> UpdateAsync(Wai /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -371,7 +371,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -409,7 +409,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueResource.cs index 0eea7a4f2c0a6..01aeaf15b3c58 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueResource.cs @@ -110,7 +110,7 @@ public virtual ApiIssueCommentCollection GetApiIssueComments() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetApiIssueCommentA /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -179,7 +179,7 @@ public virtual ApiIssueAttachmentCollection GetApiIssueAttachments() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetApiIssueAttac /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response GetApiIssueAttachment(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual async Task> GetAsync(bool? expandComme /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -323,7 +323,7 @@ public virtual Response Get(bool? expandCommentsAttachments = /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -368,7 +368,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -413,7 +413,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -456,7 +456,7 @@ public virtual async Task> UpdateAsync(ETag ifMatch, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -499,7 +499,7 @@ public virtual Response Update(ETag ifMatch, ApiIssuePatch pat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -537,7 +537,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerCollection.cs index 88d1b19ab1adc..b4002caab4e20 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string aut /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsy /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string authsid, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string authsid, CancellationToken cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerData.Serialization.cs index 2f2b4fd0faaa0..5393aeb5ba4b9 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerData.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -125,6 +127,16 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WritePropertyName("displayName"u8); writer.WriteStringValue(DisplayName); } + if (Optional.IsDefined(UseInTestConsole)) + { + writer.WritePropertyName("useInTestConsole"u8); + writer.WriteBooleanValue(UseInTestConsole.Value); + } + if (Optional.IsDefined(UseInApiDocumentation)) + { + writer.WritePropertyName("useInApiDocumentation"u8); + writer.WriteBooleanValue(UseInApiDocumentation.Value); + } if (Optional.IsDefined(ClientRegistrationEndpoint)) { writer.WritePropertyName("clientRegistrationEndpoint"u8); @@ -209,6 +221,8 @@ internal static ApiManagementAuthorizationServerData DeserializeApiManagementAut string resourceOwnerUsername = default; string resourceOwnerPassword = default; string displayName = default; + bool? useInTestConsole = default; + bool? useInApiDocumentation = default; string clientRegistrationEndpoint = default; string authorizationEndpoint = default; IList grantTypes = default; @@ -346,6 +360,24 @@ internal static ApiManagementAuthorizationServerData DeserializeApiManagementAut displayName = property0.Value.GetString(); continue; } + if (property0.NameEquals("useInTestConsole"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useInTestConsole = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("useInApiDocumentation"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useInApiDocumentation = property0.Value.GetBoolean(); + continue; + } if (property0.NameEquals("clientRegistrationEndpoint"u8)) { clientRegistrationEndpoint = property0.Value.GetString(); @@ -405,6 +437,8 @@ internal static ApiManagementAuthorizationServerData DeserializeApiManagementAut resourceOwnerUsername, resourceOwnerPassword, displayName, + useInTestConsole, + useInApiDocumentation, clientRegistrationEndpoint, authorizationEndpoint, grantTypes ?? new ChangeTrackingList(), @@ -413,6 +447,470 @@ internal static ApiManagementAuthorizationServerData DeserializeApiManagementAut serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AuthorizationMethods), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" authorizationMethods: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(AuthorizationMethods)) + { + if (AuthorizationMethods.Any()) + { + builder.Append(" authorizationMethods: "); + builder.AppendLine("["); + foreach (var item in AuthorizationMethods) + { + builder.AppendLine($" '{item.ToSerialString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientAuthenticationMethods), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientAuthenticationMethod: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ClientAuthenticationMethods)) + { + if (ClientAuthenticationMethods.Any()) + { + builder.Append(" clientAuthenticationMethod: "); + builder.AppendLine("["); + foreach (var item in ClientAuthenticationMethods) + { + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TokenBodyParameters), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tokenBodyParameters: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(TokenBodyParameters)) + { + if (TokenBodyParameters.Any()) + { + builder.Append(" tokenBodyParameters: "); + builder.AppendLine("["); + foreach (var item in TokenBodyParameters) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " tokenBodyParameters: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TokenEndpoint), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tokenEndpoint: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TokenEndpoint)) + { + builder.Append(" tokenEndpoint: "); + if (TokenEndpoint.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TokenEndpoint}'''"); + } + else + { + builder.AppendLine($"'{TokenEndpoint}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DoesSupportState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" supportState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DoesSupportState)) + { + builder.Append(" supportState: "); + var boolValue = DoesSupportState.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DefaultScope), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" defaultScope: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DefaultScope)) + { + builder.Append(" defaultScope: "); + if (DefaultScope.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DefaultScope}'''"); + } + else + { + builder.AppendLine($"'{DefaultScope}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(BearerTokenSendingMethods), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" bearerTokenSendingMethods: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(BearerTokenSendingMethods)) + { + if (BearerTokenSendingMethods.Any()) + { + builder.Append(" bearerTokenSendingMethods: "); + builder.AppendLine("["); + foreach (var item in BearerTokenSendingMethods) + { + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceOwnerUsername), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceOwnerUsername: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceOwnerUsername)) + { + builder.Append(" resourceOwnerUsername: "); + if (ResourceOwnerUsername.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ResourceOwnerUsername}'''"); + } + else + { + builder.AppendLine($"'{ResourceOwnerUsername}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceOwnerPassword), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceOwnerPassword: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceOwnerPassword)) + { + builder.Append(" resourceOwnerPassword: "); + if (ResourceOwnerPassword.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ResourceOwnerPassword}'''"); + } + else + { + builder.AppendLine($"'{ResourceOwnerPassword}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DisplayName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" displayName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DisplayName)) + { + builder.Append(" displayName: "); + if (DisplayName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DisplayName}'''"); + } + else + { + builder.AppendLine($"'{DisplayName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UseInTestConsole), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" useInTestConsole: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UseInTestConsole)) + { + builder.Append(" useInTestConsole: "); + var boolValue = UseInTestConsole.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UseInApiDocumentation), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" useInApiDocumentation: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UseInApiDocumentation)) + { + builder.Append(" useInApiDocumentation: "); + var boolValue = UseInApiDocumentation.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientRegistrationEndpoint), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientRegistrationEndpoint: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientRegistrationEndpoint)) + { + builder.Append(" clientRegistrationEndpoint: "); + if (ClientRegistrationEndpoint.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientRegistrationEndpoint}'''"); + } + else + { + builder.AppendLine($"'{ClientRegistrationEndpoint}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AuthorizationEndpoint), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" authorizationEndpoint: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AuthorizationEndpoint)) + { + builder.Append(" authorizationEndpoint: "); + if (AuthorizationEndpoint.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AuthorizationEndpoint}'''"); + } + else + { + builder.AppendLine($"'{AuthorizationEndpoint}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GrantTypes), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" grantTypes: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(GrantTypes)) + { + if (GrantTypes.Any()) + { + builder.Append(" grantTypes: "); + builder.AppendLine("["); + foreach (var item in GrantTypes) + { + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientId)) + { + builder.Append(" clientId: "); + if (ClientId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientId}'''"); + } + else + { + builder.AppendLine($"'{ClientId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientSecret), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientSecret: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientSecret)) + { + builder.Append(" clientSecret: "); + if (ClientSecret.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientSecret}'''"); + } + else + { + builder.AppendLine($"'{ClientSecret}'"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -421,6 +919,8 @@ BinaryData IPersistableModel.Write(ModelRe { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementAuthorizationServerData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerData.cs index 1a3f9796f4fbc..666402729c2e8 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerData.cs @@ -77,13 +77,15 @@ public ApiManagementAuthorizationServerData() /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. /// User-friendly authorization server name. + /// If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. + /// If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. /// Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. /// OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. /// Form of an authorization grant, which the client uses to request the access token. /// Client or app id registered with this authorization server. /// Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. /// Keeps track of any properties unknown to the library. - internal ApiManagementAuthorizationServerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, IList authorizationMethods, IList clientAuthenticationMethods, IList tokenBodyParameters, string tokenEndpoint, bool? doesSupportState, string defaultScope, IList bearerTokenSendingMethods, string resourceOwnerUsername, string resourceOwnerPassword, string displayName, string clientRegistrationEndpoint, string authorizationEndpoint, IList grantTypes, string clientId, string clientSecret, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ApiManagementAuthorizationServerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, IList authorizationMethods, IList clientAuthenticationMethods, IList tokenBodyParameters, string tokenEndpoint, bool? doesSupportState, string defaultScope, IList bearerTokenSendingMethods, string resourceOwnerUsername, string resourceOwnerPassword, string displayName, bool? useInTestConsole, bool? useInApiDocumentation, string clientRegistrationEndpoint, string authorizationEndpoint, IList grantTypes, string clientId, string clientSecret, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { Description = description; AuthorizationMethods = authorizationMethods; @@ -96,6 +98,8 @@ internal ApiManagementAuthorizationServerData(ResourceIdentifier id, string name ResourceOwnerUsername = resourceOwnerUsername; ResourceOwnerPassword = resourceOwnerPassword; DisplayName = displayName; + UseInTestConsole = useInTestConsole; + UseInApiDocumentation = useInApiDocumentation; ClientRegistrationEndpoint = clientRegistrationEndpoint; AuthorizationEndpoint = authorizationEndpoint; GrantTypes = grantTypes; @@ -105,36 +109,58 @@ internal ApiManagementAuthorizationServerData(ResourceIdentifier id, string name } /// Description of the authorization server. Can contain HTML formatting tags. + [WirePath("properties.description")] public string Description { get; set; } /// HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. + [WirePath("properties.authorizationMethods")] public IList AuthorizationMethods { get; } /// Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format. + [WirePath("properties.clientAuthenticationMethod")] public IList ClientAuthenticationMethods { get; } /// Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}. + [WirePath("properties.tokenBodyParameters")] public IList TokenBodyParameters { get; } /// OAuth token endpoint. Contains absolute URI to entity being referenced. + [WirePath("properties.tokenEndpoint")] public string TokenEndpoint { get; set; } /// If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security. + [WirePath("properties.supportState")] public bool? DoesSupportState { get; set; } /// Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values. + [WirePath("properties.defaultScope")] public string DefaultScope { get; set; } /// Specifies the mechanism by which access token is passed to the API. + [WirePath("properties.bearerTokenSendingMethods")] public IList BearerTokenSendingMethods { get; } /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. + [WirePath("properties.resourceOwnerUsername")] public string ResourceOwnerUsername { get; set; } /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. + [WirePath("properties.resourceOwnerPassword")] public string ResourceOwnerPassword { get; set; } /// User-friendly authorization server name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } + /// If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. + [WirePath("properties.useInTestConsole")] + public bool? UseInTestConsole { get; set; } + /// If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. + [WirePath("properties.useInApiDocumentation")] + public bool? UseInApiDocumentation { get; set; } /// Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. + [WirePath("properties.clientRegistrationEndpoint")] public string ClientRegistrationEndpoint { get; set; } /// OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. + [WirePath("properties.authorizationEndpoint")] public string AuthorizationEndpoint { get; set; } /// Form of an authorization grant, which the client uses to request the access token. + [WirePath("properties.grantTypes")] public IList GrantTypes { get; } /// Client or app id registered with this authorization server. + [WirePath("properties.clientId")] public string ClientId { get; set; } /// Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + [WirePath("properties.clientSecret")] public string ClientSecret { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerResource.cs index b5b227aeef654..7c2f658f5cd15 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> Up /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual Response Update(ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual async Task> GetSecre /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -434,7 +434,7 @@ public virtual Response GetSecrets(Cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -472,7 +472,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendCollection.cs index 570e353b1bf68..e502ea1743e74 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string backendId, Canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(string fi /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string filter = nul /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string backendId, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string backendId, CancellationToken cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendData.Serialization.cs index 32c3530f65f3c..1f3d712a8eed1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -283,6 +284,233 @@ internal static ApiManagementBackendData DeserializeApiManagementBackendData(Jso serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Title), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" title: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Title)) + { + builder.Append(" title: "); + if (Title.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Title}'''"); + } + else + { + builder.AppendLine($"'{Title}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceUri)) + { + builder.Append(" resourceId: "); + builder.AppendLine($"'{ResourceUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("BackendServiceFabricCluster", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" properties: "); + builder.AppendLine("{"); + builder.AppendLine(" properties: {"); + builder.Append(" serviceFabricCluster: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Properties)) + { + builder.Append(" properties: "); + BicepSerializationHelpers.AppendChildObject(builder, Properties, options, 4, false, " properties: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Credentials), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" credentials: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Credentials)) + { + builder.Append(" credentials: "); + BicepSerializationHelpers.AppendChildObject(builder, Credentials, options, 4, false, " credentials: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Proxy), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" proxy: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Proxy)) + { + builder.Append(" proxy: "); + BicepSerializationHelpers.AppendChildObject(builder, Proxy, options, 4, false, " proxy: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Tls), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tls: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Tls)) + { + builder.Append(" tls: "); + BicepSerializationHelpers.AppendChildObject(builder, Tls, options, 4, false, " tls: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Uri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" url: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Uri)) + { + builder.Append(" url: "); + builder.AppendLine($"'{Uri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Protocol), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" protocol: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Protocol)) + { + builder.Append(" protocol: "); + builder.AppendLine($"'{Protocol.Value.ToString()}'"); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -291,6 +519,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementBackendData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendData.cs index a19c1c00aa598..7d5ebae1a8a92 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendData.cs @@ -63,10 +63,10 @@ public ApiManagementBackendData() /// The systemData. /// Backend Title. /// Backend Description. - /// Management Uri of the Resource in External System. This url can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. + /// Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. /// Backend Properties contract. /// Backend Credentials Contract Properties. - /// Backend Proxy Contract Properties. + /// Backend gateway Contract Properties. /// Backend TLS Properties. /// Runtime Url of the Backend. /// Backend communication protocol. @@ -86,14 +86,18 @@ internal ApiManagementBackendData(ResourceIdentifier id, string name, ResourceTy } /// Backend Title. + [WirePath("properties.title")] public string Title { get; set; } /// Backend Description. + [WirePath("properties.description")] public string Description { get; set; } - /// Management Uri of the Resource in External System. This url can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. + /// Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. + [WirePath("properties.resourceId")] public Uri ResourceUri { get; set; } /// Backend Properties contract. internal BackendProperties Properties { get; set; } /// Backend Service Fabric Cluster Properties. + [WirePath("properties.properties.serviceFabricCluster")] public BackendServiceFabricClusterProperties BackendServiceFabricCluster { get => Properties is null ? default : Properties.ServiceFabricCluster; @@ -106,14 +110,19 @@ public BackendServiceFabricClusterProperties BackendServiceFabricCluster } /// Backend Credentials Contract Properties. + [WirePath("properties.credentials")] public BackendCredentialsContract Credentials { get; set; } - /// Backend Proxy Contract Properties. + /// Backend gateway Contract Properties. + [WirePath("properties.proxy")] public BackendProxyContract Proxy { get; set; } /// Backend TLS Properties. + [WirePath("properties.tls")] public BackendTlsProperties Tls { get; set; } /// Runtime Url of the Backend. + [WirePath("properties.url")] public Uri Uri { get; set; } /// Backend communication protocol. + [WirePath("properties.protocol")] public BackendProtocol? Protocol { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendResource.cs index 6e14f8cacc560..192fb5ec49156 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> UpdateAsync(ET /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -346,7 +346,7 @@ public virtual Response Update(ETag ifMatch, ApiMa } /// - /// Notifies the APIM proxy to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. + /// Notifies the API Management gateway to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. /// /// /// Request Path @@ -358,7 +358,7 @@ public virtual Response Update(ETag ifMatch, ApiMa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -385,7 +385,7 @@ public virtual async Task ReconnectAsync(BackendReconnectContract back } /// - /// Notifies the APIM proxy to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. + /// Notifies the API Management gateway to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. /// /// /// Request Path @@ -397,7 +397,7 @@ public virtual async Task ReconnectAsync(BackendReconnectContract back /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -436,7 +436,7 @@ public virtual Response Reconnect(BackendReconnectContract backendReconnectContr /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -474,7 +474,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheCollection.cs index 346fd88947112..a6f42ddfad24d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string cacheId, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -290,7 +290,7 @@ public virtual AsyncPageable GetAllAsync(int? top = /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -322,7 +322,7 @@ public virtual Pageable GetAll(int? top = null, int? /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -365,7 +365,7 @@ public virtual async Task> ExistsAsync(string cacheId, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -408,7 +408,7 @@ public virtual Response Exists(string cacheId, CancellationToken cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -453,7 +453,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheData.Serialization.cs index a39fa0adc43bd..e3f99f79280e7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -198,6 +199,161 @@ internal static ApiManagementCacheData DeserializeApiManagementCacheData(JsonEle serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ConnectionString), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" connectionString: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ConnectionString)) + { + builder.Append(" connectionString: "); + if (ConnectionString.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ConnectionString}'''"); + } + else + { + builder.AppendLine($"'{ConnectionString}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UseFromLocation), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" useFromLocation: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UseFromLocation)) + { + builder.Append(" useFromLocation: "); + if (UseFromLocation.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{UseFromLocation}'''"); + } + else + { + builder.AppendLine($"'{UseFromLocation}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceUri)) + { + builder.Append(" resourceId: "); + builder.AppendLine($"'{ResourceUri.AbsoluteUri}'"); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -206,6 +362,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementCacheData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheData.cs index 38ebfb085461e..919aebbb38046 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheData.cs @@ -75,12 +75,16 @@ internal ApiManagementCacheData(ResourceIdentifier id, string name, ResourceType } /// Cache description. + [WirePath("properties.description")] public string Description { get; set; } /// Runtime connection string to cache. + [WirePath("properties.connectionString")] public string ConnectionString { get; set; } /// Location identifier to use cache from (should be either 'default' or valid Azure region identifier). + [WirePath("properties.useFromLocation")] public string UseFromLocation { get; set; } /// Original uri of entity in external system cache points to. + [WirePath("properties.resourceId")] public Uri ResourceUri { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheResource.cs index 8d72207df4874..63a177f37cef0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> UpdateAsync(ETag /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual Response Update(ETag ifMatch, ApiMana /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateCollection.cs index 5928d5c27d362..faacfd526f920 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -117,7 +117,7 @@ public virtual async Task> Create /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -169,7 +169,7 @@ public virtual ArmOperation CreateOrUpdate(Wai /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task> GetAsync(s /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -259,7 +259,7 @@ public virtual Response Get(string certificate /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -293,7 +293,7 @@ public virtual AsyncPageable GetAllAsync(strin /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -327,7 +327,7 @@ public virtual Pageable GetAll(string filter = /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -370,7 +370,7 @@ public virtual async Task> ExistsAsync(string certificateId, Canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -413,7 +413,7 @@ public virtual Response Exists(string certificateId, CancellationToken can /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -458,7 +458,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateData.Serialization.cs index 29db1b0f397d6..27388a5af11e2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -203,6 +204,154 @@ internal static ApiManagementCertificateData DeserializeApiManagementCertificate serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Subject), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subject: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Subject)) + { + builder.Append(" subject: "); + if (Subject.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Subject}'''"); + } + else + { + builder.AppendLine($"'{Subject}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Thumbprint), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" thumbprint: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Thumbprint)) + { + builder.Append(" thumbprint: "); + if (Thumbprint.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Thumbprint}'''"); + } + else + { + builder.AppendLine($"'{Thumbprint}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExpireOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" expirationDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ExpireOn)) + { + builder.Append(" expirationDate: "); + var formattedDateTimeString = TypeFormatters.ToString(ExpireOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(KeyVaultDetails), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" keyVault: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(KeyVaultDetails)) + { + builder.Append(" keyVault: "); + BicepSerializationHelpers.AppendChildObject(builder, KeyVaultDetails, options, 4, false, " keyVault: "); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -211,6 +360,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrit { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementCertificateData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateData.cs index 09e5184a7f627..7d10ad87cc038 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateData.cs @@ -79,15 +79,19 @@ internal ApiManagementCertificateData(ResourceIdentifier id, string name, Resour } /// Subject attribute of the certificate. + [WirePath("properties.subject")] public string Subject { get; set; } /// Thumbprint of the certificate. + [WirePath("properties.thumbprint")] public string Thumbprint { get; set; } /// /// Expiration date of the certificate. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("properties.expirationDate")] public DateTimeOffset? ExpireOn { get; set; } /// KeyVault location details of the certificate. + [WirePath("properties.keyVault")] public KeyVaultContractProperties KeyVaultDetails { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateResource.cs index 4ab7da619817f..2c50163327eb9 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual async Task> Update /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -370,7 +370,7 @@ public virtual ArmOperation Update(WaitUntil w /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -408,7 +408,7 @@ public virtual async Task> RefreshSec /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -446,7 +446,7 @@ public virtual Response RefreshSecret(Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -484,7 +484,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceCollection.cs index 0e14b7e5fddc5..209d195266def 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceCollection.cs @@ -62,7 +62,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -108,7 +108,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(AzureLocation l /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -198,7 +198,7 @@ public virtual async Task> ExistsAsync(AzureLocation location, st /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -242,7 +242,7 @@ public virtual Response Exists(AzureLocation location, string serviceName, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceData.Serialization.cs index 44c6c5537b661..0d01b914cadc1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -210,6 +211,139 @@ internal static ApiManagementDeletedServiceData DeserializeApiManagementDeletedS serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" location: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Location)) + { + builder.Append(" location: "); + builder.AppendLine($"'{Location.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ServiceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serviceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ServiceId)) + { + builder.Append(" serviceId: "); + builder.AppendLine($"'{ServiceId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScheduledPurgeOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scheduledPurgeDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ScheduledPurgeOn)) + { + builder.Append(" scheduledPurgeDate: "); + var formattedDateTimeString = TypeFormatters.ToString(ScheduledPurgeOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DeletedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" deletionDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DeletedOn)) + { + builder.Append(" deletionDate: "); + var formattedDateTimeString = TypeFormatters.ToString(DeletedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -218,6 +352,8 @@ BinaryData IPersistableModel.Write(ModelReaderW { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementDeletedServiceData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceData.cs index 7f41c280cfa63..abeb0d734b955 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceData.cs @@ -75,12 +75,16 @@ internal ApiManagementDeletedServiceData(ResourceIdentifier id, string name, Res } /// API Management Service Master Location. + [WirePath("location")] public AzureLocation? Location { get; } /// Fully-qualified API Management Service Resource ID. + [WirePath("properties.serviceId")] public ResourceIdentifier ServiceId { get; set; } /// UTC Date and Time when the service will be automatically purged. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. + [WirePath("properties.scheduledPurgeDate")] public DateTimeOffset? ScheduledPurgeOn { get; set; } /// UTC Timestamp when the service was soft-deleted. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. + [WirePath("properties.deletionDate")] public DateTimeOffset? DeletedOn { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceResource.cs index bf5f25124725a..1941c94614ebe 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationTok /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDiagnosticCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDiagnosticCollection.cs index c365920823031..8ee4e83812891 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDiagnosticCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDiagnosticCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string diagnosticId /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string filter = /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string diagnosticId, Cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string diagnosticId, CancellationToken canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDiagnosticResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDiagnosticResource.cs index 64cc2f131fcf8..fb5506a811dfc 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDiagnosticResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDiagnosticResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -357,7 +357,7 @@ public virtual Response Update(ETag ifMatch, Di /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -395,7 +395,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateCollection.cs index a9a860821a5e4..790538f5627e1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -206,7 +206,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -247,7 +247,7 @@ public virtual Response Get(TemplateName tem /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -280,7 +280,7 @@ public virtual AsyncPageable GetAllAsync(str /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(string filter /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -352,7 +352,7 @@ public virtual async Task> ExistsAsync(TemplateName templateName, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -391,7 +391,7 @@ public virtual Response Exists(TemplateName templateName, CancellationToke /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -432,7 +432,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateData.Serialization.cs index ef054786306cc..cbcd8dd39d406 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateData.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -237,6 +239,208 @@ internal static ApiManagementEmailTemplateData DeserializeApiManagementEmailTemp serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Subject), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subject: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Subject)) + { + builder.Append(" subject: "); + if (Subject.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Subject}'''"); + } + else + { + builder.AppendLine($"'{Subject}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Body), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" body: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Body)) + { + builder.Append(" body: "); + if (Body.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Body}'''"); + } + else + { + builder.AppendLine($"'{Body}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Title), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" title: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Title)) + { + builder.Append(" title: "); + if (Title.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Title}'''"); + } + else + { + builder.AppendLine($"'{Title}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsDefault), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isDefault: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsDefault)) + { + builder.Append(" isDefault: "); + var boolValue = IsDefault.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Parameters), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" parameters: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Parameters)) + { + if (Parameters.Any()) + { + builder.Append(" parameters: "); + builder.AppendLine("["); + foreach (var item in Parameters) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " parameters: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -245,6 +449,8 @@ BinaryData IPersistableModel.Write(ModelReaderWr { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementEmailTemplateData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateData.cs index 1b6ec2c1b9068..56f67f05fd3bf 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateData.cs @@ -81,16 +81,22 @@ internal ApiManagementEmailTemplateData(ResourceIdentifier id, string name, Reso } /// Subject of the Template. + [WirePath("properties.subject")] public string Subject { get; set; } /// Email Template Body. This should be a valid XDocument. + [WirePath("properties.body")] public string Body { get; set; } /// Title of the Template. + [WirePath("properties.title")] public string Title { get; set; } /// Description of the Email Template. + [WirePath("properties.description")] public string Description { get; set; } /// Whether the template is the default template provided by API Management or has been edited. + [WirePath("properties.isDefault")] public bool? IsDefault { get; } /// Email Template Parameter values. + [WirePath("properties.parameters")] public IList Parameters { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateResource.cs index f8dc595ca31f5..dd2c9aac925cc 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> UpdateAs /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual Response Update(ETag ifMatch, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityCollection.cs index 31e8834dd57e8..af223fc64e57d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation Cr /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(st /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable G /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string certificateId, Canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string certificateId, CancellationToken can /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityData.Serialization.cs index 574d3f07ffa73..4470202302fb3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -162,6 +163,93 @@ internal static ApiManagementGatewayCertificateAuthorityData DeserializeApiManag serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsTrusted), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isTrusted: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsTrusted)) + { + builder.Append(" isTrusted: "); + var boolValue = IsTrusted.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -170,6 +258,8 @@ BinaryData IPersistableModel.Write { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementGatewayCertificateAuthorityData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityData.cs index 9d6bb728c3d74..417d0325a3120 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityData.cs @@ -69,6 +69,7 @@ internal ApiManagementGatewayCertificateAuthorityData(ResourceIdentifier id, str } /// Determines whether certificate authority is trusted. + [WirePath("properties.isTrusted")] public bool? IsTrusted { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityResource.cs index 0a517014e2f5c..cd0c702921f29 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -370,7 +370,7 @@ public virtual ArmOperation Up /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -408,7 +408,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCollection.cs index a9c7c286be4ba..77605f23026bb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string gatewayId, Canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(string fi /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string filter = nul /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string gatewayId, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string gatewayId, CancellationToken cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayData.Serialization.cs index 7e05965e9387b..c01da741abf78 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -175,6 +176,115 @@ internal static ApiManagementGatewayData DeserializeApiManagementGatewayData(Jso serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LocationData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" locationData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LocationData)) + { + builder.Append(" locationData: "); + BicepSerializationHelpers.AppendChildObject(builder, LocationData, options, 4, false, " locationData: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -183,6 +293,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementGatewayData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayData.cs index 91bd5cc9eb4f0..c12a353e607cb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayData.cs @@ -72,8 +72,10 @@ internal ApiManagementGatewayData(ResourceIdentifier id, string name, ResourceTy } /// Gateway location. + [WirePath("properties.locationData")] public ResourceLocationDataContract LocationData { get; set; } /// Gateway description. + [WirePath("properties.description")] public string Description { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationCollection.cs index 880d7de3d3844..91dbc14a66877 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation C /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(s /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAl /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string hcId, CancellationT /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string hcId, CancellationToken cancellation /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationData.Serialization.cs index 6491ccc58d053..da1cb943c6ff6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -234,6 +235,187 @@ internal static ApiManagementGatewayHostnameConfigurationData DeserializeApiMana serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Hostname), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" hostname: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Hostname)) + { + builder.Append(" hostname: "); + if (Hostname.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Hostname}'''"); + } + else + { + builder.AppendLine($"'{Hostname}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CertificateId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" certificateId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CertificateId)) + { + builder.Append(" certificateId: "); + if (CertificateId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{CertificateId}'''"); + } + else + { + builder.AppendLine($"'{CertificateId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsClientCertificateRequired), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" negotiateClientCertificate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsClientCertificateRequired)) + { + builder.Append(" negotiateClientCertificate: "); + var boolValue = IsClientCertificateRequired.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsTls1_0Enabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tls10Enabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsTls1_0Enabled)) + { + builder.Append(" tls10Enabled: "); + var boolValue = IsTls1_0Enabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsTls1_1Enabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tls11Enabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsTls1_1Enabled)) + { + builder.Append(" tls11Enabled: "); + var boolValue = IsTls1_1Enabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsHttp2_0Enabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" http2Enabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsHttp2_0Enabled)) + { + builder.Append(" http2Enabled: "); + var boolValue = IsHttp2_0Enabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -242,6 +424,8 @@ BinaryData IPersistableModel.Writ { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementGatewayHostnameConfigurationData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationData.cs index 92cd9d25b9da3..a1122fdb32794 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationData.cs @@ -79,10 +79,13 @@ internal ApiManagementGatewayHostnameConfigurationData(ResourceIdentifier id, st } /// Hostname value. Supports valid domain name, partial or full wildcard. + [WirePath("properties.hostname")] public string Hostname { get; set; } /// Identifier of Certificate entity that will be used for TLS connection establishment. + [WirePath("properties.certificateId")] public string CertificateId { get; set; } /// Determines whether gateway requests client certificate. + [WirePath("properties.negotiateClientCertificate")] public bool? IsClientCertificateRequired { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationResource.cs index 471531c46e677..92355fe0dab95 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(C /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -370,7 +370,7 @@ public virtual ArmOperation U /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -408,7 +408,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayResource.cs index c677160802014..1a4d6cec74509 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayResource.cs @@ -114,7 +114,7 @@ public virtual ApiManagementGatewayHostnameConfigurationCollection GetApiManagem /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -145,7 +145,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual ApiManagementGatewayCertificateAuthorityCollection GetApiManageme /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -245,7 +245,7 @@ public virtual Response GetApi /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -325,7 +325,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -370,7 +370,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -415,7 +415,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -458,7 +458,7 @@ public virtual async Task> UpdateAsync(ET /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -501,7 +501,7 @@ public virtual Response Update(ETag ifMatch, ApiMa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -539,7 +539,7 @@ public virtual async Task> GetKeysAsync(Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -577,7 +577,7 @@ public virtual Response GetKeys(CancellationToken cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -619,7 +619,7 @@ public virtual async Task RegenerateKeyAsync(GatewayKeyRegenerateConte /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -661,7 +661,7 @@ public virtual Response RegenerateKey(GatewayKeyRegenerateContent content, Cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -703,7 +703,7 @@ public virtual async Task> GenerateTokenAsync(Gat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -745,7 +745,7 @@ public virtual Response GenerateToken(GatewayTokenRequestC /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -774,7 +774,7 @@ public virtual AsyncPageable GetGatewayApisByServiceAsync(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -803,7 +803,7 @@ public virtual Pageable GetGatewayApisByService(string filter = /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -842,7 +842,7 @@ public virtual async Task> GetGatewayApiEntityTagAsync(string api /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -881,7 +881,7 @@ public virtual Response GetGatewayApiEntityTag(string apiId, CancellationT /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -921,7 +921,7 @@ public virtual async Task> CreateOrUpdateGatewayApiAsyn /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -961,7 +961,7 @@ public virtual Response CreateOrUpdateGatewayApi(string apiId, A /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -1000,7 +1000,7 @@ public virtual async Task DeleteGatewayApiAsync(string apiId, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -1039,7 +1039,7 @@ public virtual Response DeleteGatewayApi(string apiId, CancellationToken cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1077,7 +1077,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaCollection.cs index eb2553cc3bf7a..409cc8e6b0358 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> Creat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -164,7 +164,7 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -254,7 +254,7 @@ public virtual Response Get(string schemaId, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(stri /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(string filter /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string schemaId, Cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string schemaId, CancellationToken cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaData.Serialization.cs index 503446ced3297..6971ec491db5f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -221,6 +222,145 @@ internal static ApiManagementGlobalSchemaData DeserializeApiManagementGlobalSche serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SchemaType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" schemaType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SchemaType)) + { + builder.Append(" schemaType: "); + builder.AppendLine($"'{SchemaType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + builder.AppendLine($"'{Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Document), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" document: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Document)) + { + builder.Append(" document: "); + builder.AppendLine($"'{Document.ToString()}'"); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -229,6 +369,8 @@ BinaryData IPersistableModel.Write(ModelReaderWri { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementGlobalSchemaData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaData.cs index e922c59868619..b298f31f51d30 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaData.cs @@ -76,8 +76,10 @@ internal ApiManagementGlobalSchemaData(ResourceIdentifier id, string name, Resou } /// Schema Type. Immutable. + [WirePath("properties.schemaType")] public ApiSchemaType? SchemaType { get; set; } /// Free-form schema entity description. + [WirePath("properties.description")] public string Description { get; set; } /// /// Json-encoded string for non json-based schema. @@ -109,6 +111,7 @@ internal ApiManagementGlobalSchemaData(ResourceIdentifier id, string name, Resou /// /// /// + [WirePath("properties.value")] public BinaryData Value { get; set; } /// /// Global Schema document object for json-based schema formats(e.g. json schema). @@ -140,6 +143,7 @@ internal ApiManagementGlobalSchemaData(ResourceIdentifier id, string name, Resou /// /// /// + [WirePath("properties.document")] public BinaryData Document { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaResource.cs index 10deff16cb50b..6c32883861a75 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task> Updat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -365,7 +365,7 @@ public virtual ArmOperation Update(WaitUntil /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupCollection.cs index 7a3c9fc74229d..0cef8f451ae8e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -117,7 +117,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -169,7 +169,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -259,7 +259,7 @@ public virtual Response Get(string groupId, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -292,7 +292,7 @@ public virtual AsyncPageable GetAllAsync(string filt /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -325,7 +325,7 @@ public virtual Pageable GetAll(string filter = null, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -368,7 +368,7 @@ public virtual async Task> ExistsAsync(string groupId, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -411,7 +411,7 @@ public virtual Response Exists(string groupId, CancellationToken cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -456,7 +456,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupData.Serialization.cs index 0fb25cf77c4bd..a33e7a2cd19dd 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -215,6 +216,177 @@ internal static ApiManagementGroupData DeserializeApiManagementGroupData(JsonEle serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DisplayName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" displayName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DisplayName)) + { + builder.Append(" displayName: "); + if (DisplayName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DisplayName}'''"); + } + else + { + builder.AppendLine($"'{DisplayName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsBuiltIn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" builtIn: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsBuiltIn)) + { + builder.Append(" builtIn: "); + var boolValue = IsBuiltIn.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GroupType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(GroupType)) + { + builder.Append(" type: "); + builder.AppendLine($"'{GroupType.Value.ToSerialString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExternalId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" externalId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ExternalId)) + { + builder.Append(" externalId: "); + if (ExternalId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ExternalId}'''"); + } + else + { + builder.AppendLine($"'{ExternalId}'"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -223,6 +395,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementGroupData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupData.cs index 23411a156746e..baab8829ecea1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupData.cs @@ -78,14 +78,19 @@ internal ApiManagementGroupData(ResourceIdentifier id, string name, ResourceType } /// Group name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// Group description. Can contain HTML formatting tags. + [WirePath("properties.description")] public string Description { get; set; } /// true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false. + [WirePath("properties.builtIn")] public bool? IsBuiltIn { get; } /// Group type. + [WirePath("properties.type")] public ApiManagementGroupType? GroupType { get; set; } /// For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://<tenant>.onmicrosoft.com/groups/<group object id>`; otherwise the value is null. + [WirePath("properties.externalId")] public string ExternalId { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupResource.cs index 43fb861fd76c3..b25ad13b27f97 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupResource.cs @@ -107,7 +107,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -147,7 +147,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -187,7 +187,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -232,7 +232,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -277,7 +277,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual async Task> UpdateAsync(ETag /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual Response Update(ETag ifMatch, ApiMana /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -392,7 +392,7 @@ public virtual AsyncPageable GetGroupUsersAsync(stri /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -421,7 +421,7 @@ public virtual Pageable GetGroupUsers(string filter /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -460,7 +460,7 @@ public virtual async Task> CheckGroupUserEntityExistsAsync(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -499,7 +499,7 @@ public virtual Response CheckGroupUserEntityExists(string userId, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -538,7 +538,7 @@ public virtual async Task> CreateGroupUserA /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -577,7 +577,7 @@ public virtual Response CreateGroupUser(string userI /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -616,7 +616,7 @@ public virtual async Task DeleteGroupUserAsync(string userId, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -655,7 +655,7 @@ public virtual Response DeleteGroupUser(string userId, CancellationToken cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -693,7 +693,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderCollection.cs index 6e66998cd95db..59169fc9042c8 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> C /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -206,7 +206,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -247,7 +247,7 @@ public virtual Response Get(IdentityProvi /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -277,7 +277,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -307,7 +307,7 @@ public virtual Pageable GetAll(Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -346,7 +346,7 @@ public virtual async Task> ExistsAsync(IdentityProviderType ident /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -385,7 +385,7 @@ public virtual Response Exists(IdentityProviderType identityProviderName, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -426,7 +426,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderData.Serialization.cs index 1be26af1e5095..95784a8312d0f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderData.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -95,6 +97,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WritePropertyName("passwordResetPolicyName"u8); writer.WriteStringValue(PasswordResetPolicyName); } + if (Optional.IsDefined(ClientLibrary)) + { + writer.WritePropertyName("clientLibrary"u8); + writer.WriteStringValue(ClientLibrary); + } if (Optional.IsDefined(ClientId)) { writer.WritePropertyName("clientId"u8); @@ -156,6 +163,7 @@ internal static ApiManagementIdentityProviderData DeserializeApiManagementIdenti string signinPolicyName = default; string profileEditingPolicyName = default; string passwordResetPolicyName = default; + string clientLibrary = default; string clientId = default; string clientSecret = default; IDictionary serializedAdditionalRawData = default; @@ -248,6 +256,11 @@ internal static ApiManagementIdentityProviderData DeserializeApiManagementIdenti passwordResetPolicyName = property0.Value.GetString(); continue; } + if (property0.NameEquals("clientLibrary"u8)) + { + clientLibrary = property0.Value.GetString(); + continue; + } if (property0.NameEquals("clientId"u8)) { clientId = property0.Value.GetString(); @@ -280,11 +293,341 @@ internal static ApiManagementIdentityProviderData DeserializeApiManagementIdenti signinPolicyName, profileEditingPolicyName, passwordResetPolicyName, + clientLibrary, clientId, clientSecret, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IdentityProviderType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IdentityProviderType)) + { + builder.Append(" type: "); + builder.AppendLine($"'{IdentityProviderType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SignInTenant), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" signinTenant: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SignInTenant)) + { + builder.Append(" signinTenant: "); + if (SignInTenant.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SignInTenant}'''"); + } + else + { + builder.AppendLine($"'{SignInTenant}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AllowedTenants), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" allowedTenants: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(AllowedTenants)) + { + if (AllowedTenants.Any()) + { + builder.Append(" allowedTenants: "); + builder.AppendLine("["); + foreach (var item in AllowedTenants) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Authority), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" authority: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Authority)) + { + builder.Append(" authority: "); + if (Authority.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Authority}'''"); + } + else + { + builder.AppendLine($"'{Authority}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SignUpPolicyName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" signupPolicyName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SignUpPolicyName)) + { + builder.Append(" signupPolicyName: "); + if (SignUpPolicyName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SignUpPolicyName}'''"); + } + else + { + builder.AppendLine($"'{SignUpPolicyName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SignInPolicyName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" signinPolicyName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SignInPolicyName)) + { + builder.Append(" signinPolicyName: "); + if (SignInPolicyName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SignInPolicyName}'''"); + } + else + { + builder.AppendLine($"'{SignInPolicyName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProfileEditingPolicyName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" profileEditingPolicyName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProfileEditingPolicyName)) + { + builder.Append(" profileEditingPolicyName: "); + if (ProfileEditingPolicyName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ProfileEditingPolicyName}'''"); + } + else + { + builder.AppendLine($"'{ProfileEditingPolicyName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PasswordResetPolicyName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" passwordResetPolicyName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PasswordResetPolicyName)) + { + builder.Append(" passwordResetPolicyName: "); + if (PasswordResetPolicyName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PasswordResetPolicyName}'''"); + } + else + { + builder.AppendLine($"'{PasswordResetPolicyName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientLibrary), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientLibrary: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientLibrary)) + { + builder.Append(" clientLibrary: "); + if (ClientLibrary.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientLibrary}'''"); + } + else + { + builder.AppendLine($"'{ClientLibrary}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientId)) + { + builder.Append(" clientId: "); + if (ClientId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientId}'''"); + } + else + { + builder.AppendLine($"'{ClientId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientSecret), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientSecret: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientSecret)) + { + builder.Append(" clientSecret: "); + if (ClientSecret.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientSecret}'''"); + } + else + { + builder.AppendLine($"'{ClientSecret}'"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -293,6 +636,8 @@ BinaryData IPersistableModel.Write(ModelReade { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementIdentityProviderData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderData.cs index 70a4bbb798233..8bf0605abe849 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderData.cs @@ -70,10 +70,11 @@ public ApiManagementIdentityProviderData() /// Signin Policy Name. Only applies to AAD B2C Identity Provider. /// Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. /// Password Reset Policy Name. Only applies to AAD B2C Identity Provider. + /// The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. /// Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. /// Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. /// Keeps track of any properties unknown to the library. - internal ApiManagementIdentityProviderData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IdentityProviderType? identityProviderType, string signInTenant, IList allowedTenants, string authority, string signUpPolicyName, string signInPolicyName, string profileEditingPolicyName, string passwordResetPolicyName, string clientId, string clientSecret, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ApiManagementIdentityProviderData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IdentityProviderType? identityProviderType, string signInTenant, IList allowedTenants, string authority, string signUpPolicyName, string signInPolicyName, string profileEditingPolicyName, string passwordResetPolicyName, string clientLibrary, string clientId, string clientSecret, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { IdentityProviderType = identityProviderType; SignInTenant = signInTenant; @@ -83,30 +84,44 @@ internal ApiManagementIdentityProviderData(ResourceIdentifier id, string name, R SignInPolicyName = signInPolicyName; ProfileEditingPolicyName = profileEditingPolicyName; PasswordResetPolicyName = passwordResetPolicyName; + ClientLibrary = clientLibrary; ClientId = clientId; ClientSecret = clientSecret; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Identity Provider Type identifier. + [WirePath("properties.type")] public IdentityProviderType? IdentityProviderType { get; set; } /// The TenantId to use instead of Common when logging into Active Directory. + [WirePath("properties.signinTenant")] public string SignInTenant { get; set; } /// List of Allowed Tenants when configuring Azure Active Directory login. + [WirePath("properties.allowedTenants")] public IList AllowedTenants { get; } /// OpenID Connect discovery endpoint hostname for AAD or AAD B2C. + [WirePath("properties.authority")] public string Authority { get; set; } /// Signup Policy Name. Only applies to AAD B2C Identity Provider. + [WirePath("properties.signupPolicyName")] public string SignUpPolicyName { get; set; } /// Signin Policy Name. Only applies to AAD B2C Identity Provider. + [WirePath("properties.signinPolicyName")] public string SignInPolicyName { get; set; } /// Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. + [WirePath("properties.profileEditingPolicyName")] public string ProfileEditingPolicyName { get; set; } /// Password Reset Policy Name. Only applies to AAD B2C Identity Provider. + [WirePath("properties.passwordResetPolicyName")] public string PasswordResetPolicyName { get; set; } + /// The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. + [WirePath("properties.clientLibrary")] + public string ClientLibrary { get; set; } /// Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. + [WirePath("properties.clientId")] public string ClientId { get; set; } /// Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + [WirePath("properties.clientSecret")] public string ClientSecret { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderResource.cs index ed0b70c56e9cd..9f2110b6b81ad 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationT /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> Updat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual Response Update(ETag ifMat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual async Task> GetSecretsAsync(Cancel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -434,7 +434,7 @@ public virtual Response GetSecrets(CancellationToken cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -472,7 +472,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIssueCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIssueCollection.cs index 790fdb03c5cdb..dba3c8c41b8e0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIssueCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIssueCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string issueId, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -187,7 +187,7 @@ public virtual AsyncPageable GetAllAsync(string filt /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -220,7 +220,7 @@ public virtual Pageable GetAll(string filter = null, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -263,7 +263,7 @@ public virtual async Task> ExistsAsync(string issueId, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -306,7 +306,7 @@ public virtual Response Exists(string issueId, CancellationToken cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIssueResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIssueResource.cs index 7b187106069bc..1957b5dee5ccd 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIssueResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIssueResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerCollection.cs index 12bfb472a7841..9057367cb6995 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string loggerId, Cancel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(string fil /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string filter = null /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string loggerId, Cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string loggerId, CancellationToken cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerData.Serialization.cs index ddcd68b8aa8ad..fd9ee97de7dee 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerData.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -234,6 +236,183 @@ internal static ApiManagementLoggerData DeserializeApiManagementLoggerData(JsonE serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LoggerType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" loggerType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LoggerType)) + { + builder.Append(" loggerType: "); + builder.AppendLine($"'{LoggerType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Credentials), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" credentials: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Credentials)) + { + if (Credentials.Any()) + { + builder.Append(" credentials: "); + builder.AppendLine("{"); + foreach (var item in Credentials) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + if (item.Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{item.Value}'''"); + } + else + { + builder.AppendLine($"'{item.Value}'"); + } + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsBuffered), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isBuffered: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsBuffered)) + { + builder.Append(" isBuffered: "); + var boolValue = IsBuffered.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceId)) + { + builder.Append(" resourceId: "); + builder.AppendLine($"'{ResourceId.ToString()}'"); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -242,6 +421,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpt { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementLoggerData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerData.cs index 565786dafafcf..49e47b50c831c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerData.cs @@ -82,17 +82,22 @@ internal ApiManagementLoggerData(ResourceIdentifier id, string name, ResourceTyp } /// Logger type. + [WirePath("properties.loggerType")] public LoggerType? LoggerType { get; set; } /// Logger description. + [WirePath("properties.description")] public string Description { get; set; } /// /// The name and SendRule connection string of the event hub for azureEventHub logger. /// Instrumentation key for applicationInsights logger. /// + [WirePath("properties.credentials")] public IDictionary Credentials { get; } /// Whether records are buffered in the logger before publishing. Default is assumed to be true. + [WirePath("properties.isBuffered")] public bool? IsBuffered { get; set; } /// Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource). + [WirePath("properties.resourceId")] public ResourceIdentifier ResourceId { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerResource.cs index 3d7ab68b5d8bb..4e742dfe68356 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> UpdateAsync(ETa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual Response Update(ETag ifMatch, ApiMan /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueCollection.cs index 53eec1c5d65a2..89ea3f38b8e2e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string namedValueId /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -289,7 +289,7 @@ public virtual AsyncPageable GetAllAsync(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -323,7 +323,7 @@ public virtual Pageable GetAll(string filter = /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -366,7 +366,7 @@ public virtual async Task> ExistsAsync(string namedValueId, Cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -409,7 +409,7 @@ public virtual Response Exists(string namedValueId, CancellationToken canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -454,7 +454,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueData.Serialization.cs index e500c0d94d28c..262a3bcddf693 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueData.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -229,6 +231,190 @@ internal static ApiManagementNamedValueData DeserializeApiManagementNamedValueDa serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Tags), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tags: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags.Any()) + { + builder.Append(" tags: "); + builder.AppendLine("["); + foreach (var item in Tags) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsSecret), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" secret: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsSecret)) + { + builder.Append(" secret: "); + var boolValue = IsSecret.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DisplayName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" displayName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DisplayName)) + { + builder.Append(" displayName: "); + if (DisplayName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DisplayName}'''"); + } + else + { + builder.AppendLine($"'{DisplayName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + if (Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Value}'''"); + } + else + { + builder.AppendLine($"'{Value}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(KeyVaultDetails), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" keyVault: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(KeyVaultDetails)) + { + builder.Append(" keyVault: "); + BicepSerializationHelpers.AppendChildObject(builder, KeyVaultDetails, options, 4, false, " keyVault: "); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -237,6 +423,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrite { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementNamedValueData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueData.cs index 84e2f65cb7677..a8bac899b00b1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueData.cs @@ -79,14 +79,19 @@ internal ApiManagementNamedValueData(ResourceIdentifier id, string name, Resourc } /// Optional tags that when provided can be used to filter the NamedValue list. + [WirePath("properties.tags")] public IList Tags { get; } /// Determines whether the value is a secret and should be encrypted or not. Default value is false. + [WirePath("properties.secret")] public bool? IsSecret { get; set; } /// Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + [WirePath("properties.value")] public string Value { get; set; } /// KeyVault location details of the namedValue. + [WirePath("properties.keyVault")] public KeyVaultContractProperties KeyVaultDetails { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueResource.cs index e7363c126df3f..c6f8ca99f49e4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual async Task> UpdateA /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -366,7 +366,7 @@ public virtual ArmOperation Update(WaitUntil wa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -404,7 +404,7 @@ public virtual async Task> GetValueAsync(Canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -442,7 +442,7 @@ public virtual Response GetValue(CancellationToken can /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -484,7 +484,7 @@ public virtual async Task> Refresh /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -526,7 +526,7 @@ public virtual ArmOperation RefreshSecret(WaitU /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -564,7 +564,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationCollection.cs index bfd4cf4f0693d..711b89e757df6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -111,7 +111,7 @@ public virtual async Task> Creat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -157,7 +157,7 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -198,7 +198,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -239,7 +239,7 @@ public virtual Response Get(NotificationName /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual AsyncPageable GetAllAsync(int? /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -303,7 +303,7 @@ public virtual Pageable GetAll(int? top = nul /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -342,7 +342,7 @@ public virtual async Task> ExistsAsync(NotificationName notificat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -381,7 +381,7 @@ public virtual Response Exists(NotificationName notificationName, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -422,7 +422,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationData.Serialization.cs index 5d67dd010fbe5..d0e645781b95f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -187,6 +188,138 @@ internal static ApiManagementNotificationData DeserializeApiManagementNotificati serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Title), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" title: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Title)) + { + builder.Append(" title: "); + if (Title.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Title}'''"); + } + else + { + builder.AppendLine($"'{Title}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Recipients), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" recipients: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Recipients)) + { + builder.Append(" recipients: "); + BicepSerializationHelpers.AppendChildObject(builder, Recipients, options, 4, false, " recipients: "); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -195,6 +328,8 @@ BinaryData IPersistableModel.Write(ModelReaderWri { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementNotificationData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationData.cs index 4382039709eb9..1efbe7e32a71a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationData.cs @@ -74,10 +74,13 @@ internal ApiManagementNotificationData(ResourceIdentifier id, string name, Resou } /// Title of the Notification. + [WirePath("properties.title")] public string Title { get; set; } /// Description of the Notification. + [WirePath("properties.description")] public string Description { get; set; } /// Recipient Parameter values. + [WirePath("properties.recipients")] public RecipientsContractProperties Recipients { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationResource.cs index 968667580b96a..fd54c3a083a68 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationResource.cs @@ -111,7 +111,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -151,7 +151,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -191,7 +191,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -236,7 +236,7 @@ public virtual async Task> Updat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -281,7 +281,7 @@ public virtual ArmOperation Update(WaitUntil /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -306,7 +306,7 @@ public virtual AsyncPageable GetNotificationRecipientUser /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -331,7 +331,7 @@ public virtual Pageable GetNotificationRecipientUsers(Can /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -370,7 +370,7 @@ public virtual async Task> CheckNotificationRecipientUserEntityEx /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -409,7 +409,7 @@ public virtual Response CheckNotificationRecipientUserEntityExists(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -448,7 +448,7 @@ public virtual async Task> CreateOrUpdateNotific /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -487,7 +487,7 @@ public virtual Response CreateOrUpdateNotificationRecipie /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -526,7 +526,7 @@ public virtual async Task DeleteNotificationRecipientUserAsync(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -565,7 +565,7 @@ public virtual Response DeleteNotificationRecipientUser(string userId, Cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -590,7 +590,7 @@ public virtual AsyncPageable GetNotificationRecipientEma /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -615,7 +615,7 @@ public virtual Pageable GetNotificationRecipientEmails(C /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -654,7 +654,7 @@ public virtual async Task> CheckNotificationRecipientEmailEntityE /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -693,7 +693,7 @@ public virtual Response CheckNotificationRecipientEmailEntityExists(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -732,7 +732,7 @@ public virtual async Task> CreateOrUpdateNotifi /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -771,7 +771,7 @@ public virtual Response CreateOrUpdateNotificationRecipi /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -810,7 +810,7 @@ public virtual async Task DeleteNotificationRecipientEmailAsync(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderCollection.cs index 189872e419bbe..a7f20c1362fdd 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOr /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string o /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllA /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(strin /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string openId, Cancellatio /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string openId, CancellationToken cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderData.Serialization.cs index 85f7369fe7932..fb64aa210dba4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -74,6 +75,16 @@ void IJsonModel.Write(Utf8JsonWriter wri writer.WritePropertyName("clientSecret"u8); writer.WriteStringValue(ClientSecret); } + if (Optional.IsDefined(UseInTestConsole)) + { + writer.WritePropertyName("useInTestConsole"u8); + writer.WriteBooleanValue(UseInTestConsole.Value); + } + if (Optional.IsDefined(UseInApiDocumentation)) + { + writer.WritePropertyName("useInApiDocumentation"u8); + writer.WriteBooleanValue(UseInApiDocumentation.Value); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -122,6 +133,8 @@ internal static ApiManagementOpenIdConnectProviderData DeserializeApiManagementO string metadataEndpoint = default; string clientId = default; string clientSecret = default; + bool? useInTestConsole = default; + bool? useInApiDocumentation = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -184,6 +197,24 @@ internal static ApiManagementOpenIdConnectProviderData DeserializeApiManagementO clientSecret = property0.Value.GetString(); continue; } + if (property0.NameEquals("useInTestConsole"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useInTestConsole = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("useInApiDocumentation"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useInApiDocumentation = property0.Value.GetBoolean(); + continue; + } } continue; } @@ -203,9 +234,229 @@ internal static ApiManagementOpenIdConnectProviderData DeserializeApiManagementO metadataEndpoint, clientId, clientSecret, + useInTestConsole, + useInApiDocumentation, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DisplayName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" displayName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DisplayName)) + { + builder.Append(" displayName: "); + if (DisplayName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DisplayName}'''"); + } + else + { + builder.AppendLine($"'{DisplayName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MetadataEndpoint), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" metadataEndpoint: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MetadataEndpoint)) + { + builder.Append(" metadataEndpoint: "); + if (MetadataEndpoint.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{MetadataEndpoint}'''"); + } + else + { + builder.AppendLine($"'{MetadataEndpoint}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientId)) + { + builder.Append(" clientId: "); + if (ClientId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientId}'''"); + } + else + { + builder.AppendLine($"'{ClientId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientSecret), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientSecret: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientSecret)) + { + builder.Append(" clientSecret: "); + if (ClientSecret.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientSecret}'''"); + } + else + { + builder.AppendLine($"'{ClientSecret}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UseInTestConsole), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" useInTestConsole: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UseInTestConsole)) + { + builder.Append(" useInTestConsole: "); + var boolValue = UseInTestConsole.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UseInApiDocumentation), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" useInApiDocumentation: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UseInApiDocumentation)) + { + builder.Append(" useInApiDocumentation: "); + var boolValue = UseInApiDocumentation.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -214,6 +465,8 @@ BinaryData IPersistableModel.Write(Model { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementOpenIdConnectProviderData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderData.cs index 316ee490092e0..93847379f96c5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderData.cs @@ -65,26 +65,41 @@ public ApiManagementOpenIdConnectProviderData() /// Metadata endpoint URI. /// Client ID of developer console which is the client application. /// Client Secret of developer console which is the client application. + /// If true, the Open ID Connect provider may be used in the developer portal test console. True by default if no value is provided. + /// If true, the Open ID Connect provider will be used in the API documentation in the developer portal. False by default if no value is provided. /// Keeps track of any properties unknown to the library. - internal ApiManagementOpenIdConnectProviderData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string displayName, string description, string metadataEndpoint, string clientId, string clientSecret, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ApiManagementOpenIdConnectProviderData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string displayName, string description, string metadataEndpoint, string clientId, string clientSecret, bool? useInTestConsole, bool? useInApiDocumentation, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { DisplayName = displayName; Description = description; MetadataEndpoint = metadataEndpoint; ClientId = clientId; ClientSecret = clientSecret; + UseInTestConsole = useInTestConsole; + UseInApiDocumentation = useInApiDocumentation; _serializedAdditionalRawData = serializedAdditionalRawData; } /// User-friendly OpenID Connect Provider name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// User-friendly description of OpenID Connect Provider. + [WirePath("properties.description")] public string Description { get; set; } /// Metadata endpoint URI. + [WirePath("properties.metadataEndpoint")] public string MetadataEndpoint { get; set; } /// Client ID of developer console which is the client application. + [WirePath("properties.clientId")] public string ClientId { get; set; } /// Client Secret of developer console which is the client application. + [WirePath("properties.clientSecret")] public string ClientSecret { get; set; } + /// If true, the Open ID Connect provider may be used in the developer portal test console. True by default if no value is provided. + [WirePath("properties.useInTestConsole")] + public bool? UseInTestConsole { get; set; } + /// If true, the Open ID Connect provider will be used in the API documentation in the developer portal. False by default if no value is provided. + [WirePath("properties.useInApiDocumentation")] + public bool? UseInApiDocumentation { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderResource.cs index d0ecfa9e6c69b..177e7d0ad1434 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual Response Update(ETag /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual async Task> GetSecretsAsync(Cancel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -434,7 +434,7 @@ public virtual Response GetSecrets(CancellationToken cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -472,7 +472,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPolicyCollection.cs index d5e070b01ab55..d2e77ba437a1a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPolicyCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(Policy /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -249,7 +249,7 @@ public virtual Response Get(PolicyName policyId, Po /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -278,7 +278,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -307,7 +307,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -347,7 +347,7 @@ public virtual async Task> ExistsAsync(PolicyName policyId, Polic /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -387,7 +387,7 @@ public virtual Response Exists(PolicyName policyId, PolicyExportFormat? fo /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -429,7 +429,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPolicyResource.cs index 22de937f15bd0..fe2116361d5cf 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPolicyResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPolicyResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Policy /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response Get(PolicyExportFormat? for /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -274,7 +274,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -323,7 +323,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -372,7 +372,7 @@ public virtual ArmOperation Update(WaitUntil waitUn /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalDelegationSettingData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalDelegationSettingData.Serialization.cs index 6cd6e13817bcc..2be1af441e7da 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalDelegationSettingData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalDelegationSettingData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -207,6 +208,155 @@ internal static ApiManagementPortalDelegationSettingData DeserializeApiManagemen serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Uri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" url: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Uri)) + { + builder.Append(" url: "); + builder.AppendLine($"'{Uri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ValidationKey), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" validationKey: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ValidationKey)) + { + builder.Append(" validationKey: "); + if (ValidationKey.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ValidationKey}'''"); + } + else + { + builder.AppendLine($"'{ValidationKey}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("IsSubscriptionDelegationEnabled", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptions: "); + builder.AppendLine("{"); + builder.AppendLine(" subscriptions: {"); + builder.Append(" enabled: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Subscriptions)) + { + builder.Append(" subscriptions: "); + BicepSerializationHelpers.AppendChildObject(builder, Subscriptions, options, 4, false, " subscriptions: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("IsUserRegistrationDelegationEnabled", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" userRegistration: "); + builder.AppendLine("{"); + builder.AppendLine(" userRegistration: {"); + builder.Append(" enabled: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(UserRegistration)) + { + builder.Append(" userRegistration: "); + BicepSerializationHelpers.AppendChildObject(builder, UserRegistration, options, 4, false, " userRegistration: "); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -215,6 +365,8 @@ BinaryData IPersistableModel.Write(Mod { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementPortalDelegationSettingData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalDelegationSettingData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalDelegationSettingData.cs index ce2c7d0f5c5c6..551b06a07b7ea 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalDelegationSettingData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalDelegationSettingData.cs @@ -76,12 +76,15 @@ internal ApiManagementPortalDelegationSettingData(ResourceIdentifier id, string } /// A delegation Url. + [WirePath("properties.url")] public Uri Uri { get; set; } /// A base64-encoded validation key to validate, that a request is coming from Azure API Management. + [WirePath("properties.validationKey")] public string ValidationKey { get; set; } /// Subscriptions delegation settings. internal SubscriptionDelegationSettingProperties Subscriptions { get; set; } /// Enable or disable delegation for subscriptions. + [WirePath("properties.subscriptions.enabled")] public bool? IsSubscriptionDelegationEnabled { get => Subscriptions is null ? default : Subscriptions.IsSubscriptionDelegationEnabled; @@ -96,6 +99,7 @@ public bool? IsSubscriptionDelegationEnabled /// User registration delegation settings. internal RegistrationDelegationSettingProperties UserRegistration { get; set; } /// Enable or disable delegation for user registration. + [WirePath("properties.userRegistration.enabled")] public bool? IsUserRegistrationDelegationEnabled { get => UserRegistration is null ? default : UserRegistration.IsUserRegistrationDelegationEnabled; diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalDelegationSettingResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalDelegationSettingResource.cs index d1742ece97c30..0319a45c87644 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalDelegationSettingResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalDelegationSettingResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cancel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task UpdateAsync(ETag ifMatch, ApiManagementPorta /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual Response Update(ETag ifMatch, ApiManagementPortalDelegationSettin /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -365,7 +365,7 @@ public virtual ArmOperation Create /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual async Task> GetSecre /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -441,7 +441,7 @@ public virtual Response GetSecrets(Cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -479,7 +479,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionCollection.cs index 0487323685099..92348d88a996f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Cre /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string portalRe /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -293,7 +293,7 @@ public virtual AsyncPageable GetAllAsync(st /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -334,7 +334,7 @@ public virtual Pageable GetAll(string filte /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -377,7 +377,7 @@ public virtual async Task> ExistsAsync(string portalRevisionId, C /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -420,7 +420,7 @@ public virtual Response Exists(string portalRevisionId, CancellationToken /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -465,7 +465,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionData.Serialization.cs index 095777df1cd6d..1c0ddd7679361 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -235,6 +236,186 @@ internal static ApiManagementPortalRevisionData DeserializeApiManagementPortalRe serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StatusDetails), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" statusDetails: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StatusDetails)) + { + builder.Append(" statusDetails: "); + if (StatusDetails.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{StatusDetails}'''"); + } + else + { + builder.AppendLine($"'{StatusDetails}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" status: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Status)) + { + builder.Append(" status: "); + builder.AppendLine($"'{Status.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsCurrent), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isCurrent: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsCurrent)) + { + builder.Append(" isCurrent: "); + var boolValue = IsCurrent.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CreatedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" createdDateTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CreatedOn)) + { + builder.Append(" createdDateTime: "); + var formattedDateTimeString = TypeFormatters.ToString(CreatedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UpdatedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" updatedDateTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UpdatedOn)) + { + builder.Append(" updatedDateTime: "); + var formattedDateTimeString = TypeFormatters.ToString(UpdatedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -243,6 +424,8 @@ BinaryData IPersistableModel.Write(ModelReaderW { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementPortalRevisionData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionData.cs index aa67e255d00d4..ad0006c7934d5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionData.cs @@ -80,16 +80,22 @@ internal ApiManagementPortalRevisionData(ResourceIdentifier id, string name, Res } /// Portal revision description. + [WirePath("properties.description")] public string Description { get; set; } /// Portal revision publishing status details. + [WirePath("properties.statusDetails")] public string StatusDetails { get; } /// Status of the portal's revision. + [WirePath("properties.status")] public PortalRevisionStatus? Status { get; } /// Indicates if the portal's revision is public. + [WirePath("properties.isCurrent")] public bool? IsCurrent { get; set; } /// Portal's revision creation date and time. + [WirePath("properties.createdDateTime")] public DateTimeOffset? CreatedOn { get; } /// Last updated date and time. + [WirePath("properties.updatedDateTime")] public DateTimeOffset? UpdatedOn { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionResource.cs index 6cdad5809a33e..abc551e60b43f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationTok /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task> Upd /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -275,7 +275,7 @@ public virtual ArmOperation Update(WaitUnti /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignInSettingData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignInSettingData.Serialization.cs index 2ebddcb6d8c30..6e529c4fceac6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignInSettingData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignInSettingData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -162,6 +163,93 @@ internal static ApiManagementPortalSignInSettingData DeserializeApiManagementPor serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsRedirectEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsRedirectEnabled)) + { + builder.Append(" enabled: "); + var boolValue = IsRedirectEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -170,6 +258,8 @@ BinaryData IPersistableModel.Write(ModelRe { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementPortalSignInSettingData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignInSettingData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignInSettingData.cs index a7f2913a9087d..9644008bf28b4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignInSettingData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignInSettingData.cs @@ -69,6 +69,7 @@ internal ApiManagementPortalSignInSettingData(ResourceIdentifier id, string name } /// Redirect Anonymous users to the Sign-In page. + [WirePath("properties.enabled")] public bool? IsRedirectEnabled { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignInSettingResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignInSettingResource.cs index 2d76113efdc1c..74ffc0205152f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignInSettingResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignInSettingResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task UpdateAsync(ETag ifMatch, ApiManagementPorta /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual Response Update(ETag ifMatch, ApiManagementPortalSignInSettingDat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignUpSettingData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignUpSettingData.Serialization.cs index 6db4619a0c478..8e23f159f4334 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignUpSettingData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignUpSettingData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -179,6 +180,108 @@ internal static ApiManagementPortalSignUpSettingData DeserializeApiManagementPor serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsSignUpDeveloperPortalEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsSignUpDeveloperPortalEnabled)) + { + builder.Append(" enabled: "); + var boolValue = IsSignUpDeveloperPortalEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TermsOfService), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" termsOfService: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TermsOfService)) + { + builder.Append(" termsOfService: "); + BicepSerializationHelpers.AppendChildObject(builder, TermsOfService, options, 4, false, " termsOfService: "); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -187,6 +290,8 @@ BinaryData IPersistableModel.Write(ModelRe { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementPortalSignUpSettingData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignUpSettingData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignUpSettingData.cs index 879786d409615..2704abead6482 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignUpSettingData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignUpSettingData.cs @@ -72,8 +72,10 @@ internal ApiManagementPortalSignUpSettingData(ResourceIdentifier id, string name } /// Allow users to sign up on a developer portal. + [WirePath("properties.enabled")] public bool? IsSignUpDeveloperPortalEnabled { get; set; } /// Terms of service contract properties. + [WirePath("properties.termsOfService")] public TermsOfServiceProperties TermsOfService { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignUpSettingResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignUpSettingResource.cs index d041db6de7443..bbfb18a9df942 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignUpSettingResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignUpSettingResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task UpdateAsync(ETag ifMatch, ApiManagementPorta /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual Response Update(ETag ifMatch, ApiManagementPortalSignUpSettingDat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionCollection.cs index 6d448c7b62ecb..5765eda1a0c82 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation Crea /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(stri /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable Get /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual Pageable GetAll(C /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -354,7 +354,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -397,7 +397,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -442,7 +442,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionData.Serialization.cs index 41a882dc5c6c4..b54b74a29f7c6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -196,6 +197,127 @@ internal static ApiManagementPrivateEndpointConnectionData DeserializeApiManagem serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("PrivateEndpointId", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" privateEndpoint: "); + builder.AppendLine("{"); + builder.AppendLine(" privateEndpoint: {"); + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(PrivateEndpoint)) + { + builder.Append(" privateEndpoint: "); + BicepSerializationHelpers.AppendChildObject(builder, PrivateEndpoint, options, 4, false, " privateEndpoint: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ConnectionState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" privateLinkServiceConnectionState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ConnectionState)) + { + builder.Append(" privateLinkServiceConnectionState: "); + BicepSerializationHelpers.AppendChildObject(builder, ConnectionState, options, 4, false, " privateLinkServiceConnectionState: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + builder.AppendLine($"'{ProvisioningState.Value.ToString()}'"); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -204,6 +326,8 @@ BinaryData IPersistableModel.Write(M { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementPrivateEndpointConnectionData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionData.cs index 29d3dbeaade9b..5c819d4b14318 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionData.cs @@ -77,14 +77,17 @@ internal ApiManagementPrivateEndpointConnectionData(ResourceIdentifier id, strin /// The resource of private end point. internal SubResource PrivateEndpoint { get; set; } /// Gets Id. + [WirePath("properties.privateEndpoint.id")] public ResourceIdentifier PrivateEndpointId { get => PrivateEndpoint is null ? default : PrivateEndpoint.Id; } /// A collection of information about the state of the connection between service consumer and provider. + [WirePath("properties.privateLinkServiceConnectionState")] public ApiManagementPrivateLinkServiceConnectionState ConnectionState { get; set; } /// The provisioning state of the private endpoint connection resource. + [WirePath("properties.provisioningState")] public ApiManagementPrivateEndpointConnectionProvisioningState? ProvisioningState { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionResource.cs index e0269aa6241ff..8a48fb0bcac3f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResource.cs index 366f7759a8c62..80a2a68bea52a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResourceCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResourceCollection.cs index ddd61e360f400..88a546976c955 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResourceCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResourceCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(s /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string privateLink /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual AsyncPageable GetAllAsync(Cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual Pageable GetAll(CancellationTok /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual async Task> ExistsAsync(string privateLinkSubResou /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -298,7 +298,7 @@ public virtual Response Exists(string privateLinkSubResourceName, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -343,7 +343,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResourceData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResourceData.Serialization.cs index fffe7573cd210..db8f5950470a1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResourceData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResourceData.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -210,6 +212,172 @@ internal static ApiManagementPrivateLinkResourceData DeserializeApiManagementPri serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GroupId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" groupId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(GroupId)) + { + builder.Append(" groupId: "); + if (GroupId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{GroupId}'''"); + } + else + { + builder.AppendLine($"'{GroupId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RequiredMembers), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" requiredMembers: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(RequiredMembers)) + { + if (RequiredMembers.Any()) + { + builder.Append(" requiredMembers: "); + builder.AppendLine("["); + foreach (var item in RequiredMembers) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RequiredZoneNames), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" requiredZoneNames: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(RequiredZoneNames)) + { + if (RequiredZoneNames.Any()) + { + builder.Append(" requiredZoneNames: "); + builder.AppendLine("["); + foreach (var item in RequiredZoneNames) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -218,6 +386,8 @@ BinaryData IPersistableModel.Write(ModelRe { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementPrivateLinkResourceData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResourceData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResourceData.cs index b64fb67d0ccfe..cc7c97e321344 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResourceData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResourceData.cs @@ -75,10 +75,13 @@ internal ApiManagementPrivateLinkResourceData(ResourceIdentifier id, string name } /// The private link resource group id. + [WirePath("properties.groupId")] public string GroupId { get; } /// The private link resource required member names. + [WirePath("properties.requiredMembers")] public IReadOnlyList RequiredMembers { get; } /// The private link resource Private link DNS zone name. + [WirePath("properties.requiredZoneNames")] public IList RequiredZoneNames { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductCollection.cs index 672baa6175cf0..84cf34eafaf1c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string productId, Canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -293,7 +293,7 @@ public virtual AsyncPageable GetAllAsync(string fi /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -328,7 +328,7 @@ public virtual Pageable GetAll(string filter = nul /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -371,7 +371,7 @@ public virtual async Task> ExistsAsync(string productId, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -414,7 +414,7 @@ public virtual Response Exists(string productId, CancellationToken cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -459,7 +459,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductData.Serialization.cs index 79dd361246db7..4db24b4331595 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -247,6 +248,208 @@ internal static ApiManagementProductData DeserializeApiManagementProductData(Jso serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Terms), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" terms: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Terms)) + { + builder.Append(" terms: "); + if (Terms.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Terms}'''"); + } + else + { + builder.AppendLine($"'{Terms}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsSubscriptionRequired), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionRequired: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsSubscriptionRequired)) + { + builder.Append(" subscriptionRequired: "); + var boolValue = IsSubscriptionRequired.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsApprovalRequired), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" approvalRequired: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsApprovalRequired)) + { + builder.Append(" approvalRequired: "); + var boolValue = IsApprovalRequired.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SubscriptionsLimit), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionsLimit: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SubscriptionsLimit)) + { + builder.Append(" subscriptionsLimit: "); + builder.AppendLine($"{SubscriptionsLimit.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(State), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" state: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(State)) + { + builder.Append(" state: "); + builder.AppendLine($"'{State.Value.ToSerialString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DisplayName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" displayName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DisplayName)) + { + builder.Append(" displayName: "); + if (DisplayName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DisplayName}'''"); + } + else + { + builder.AppendLine($"'{DisplayName}'"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -255,6 +458,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementProductData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductData.cs index 65278be4a8a15..fef414385e719 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductData.cs @@ -82,18 +82,25 @@ internal ApiManagementProductData(ResourceIdentifier id, string name, ResourceTy } /// Product description. May include HTML formatting tags. + [WirePath("properties.description")] public string Description { get; set; } /// Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process. + [WirePath("properties.terms")] public string Terms { get; set; } /// Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. + [WirePath("properties.subscriptionRequired")] public bool? IsSubscriptionRequired { get; set; } /// whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. + [WirePath("properties.approvalRequired")] public bool? IsApprovalRequired { get; set; } /// Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. + [WirePath("properties.subscriptionsLimit")] public int? SubscriptionsLimit { get; set; } /// whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. + [WirePath("properties.state")] public ApiManagementProductState? State { get; set; } /// Product name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductPolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductPolicyCollection.cs index 67c883b306650..153d9d21e16dc 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductPolicyCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -249,7 +249,7 @@ public virtual Response Get(PolicyName polic /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -278,7 +278,7 @@ public virtual AsyncPageable GetAllAsync(Can /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -307,7 +307,7 @@ public virtual Pageable GetAll(CancellationT /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -347,7 +347,7 @@ public virtual async Task> ExistsAsync(PolicyName policyId, Polic /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -387,7 +387,7 @@ public virtual Response Exists(PolicyName policyId, PolicyExportFormat? fo /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -429,7 +429,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductPolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductPolicyResource.cs index a92b88e929ceb..53ec22e85bb22 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductPolicyResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductPolicyResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -185,7 +185,7 @@ public virtual Response Get(PolicyExportForm /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -230,7 +230,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -275,7 +275,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual async Task> Upda /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -373,7 +373,7 @@ public virtual ArmOperation Update(WaitUntil /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -411,7 +411,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductResource.cs index 174721c031901..32478de17bdeb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductResource.cs @@ -122,7 +122,7 @@ public virtual ApiManagementProductPolicyCollection GetApiManagementProductPolic /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -152,7 +152,7 @@ public virtual async Task> GetApiMa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -189,7 +189,7 @@ public virtual ApiManagementProductTagCollection GetApiManagementProductTags() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -220,7 +220,7 @@ public virtual async Task> GetApiManag /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -238,6 +238,13 @@ public virtual Response GetApiManagementProduct return GetApiManagementProductTags().Get(tagId, cancellationToken); } + /// Gets an object representing a ServiceProductWikiResource along with the instance operations that can be performed on it in the ApiManagementProduct. + /// Returns a object. + public virtual ServiceProductWikiResource GetServiceProductWiki() + { + return new ServiceProductWikiResource(Client, Id.AppendChildResource("wikis", "default")); + } + /// /// Gets the details of the product specified by its identifier. /// @@ -251,7 +258,7 @@ public virtual Response GetApiManagementProduct /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -291,7 +298,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -331,7 +338,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -377,7 +384,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -423,7 +430,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, bool? dele /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -466,7 +473,7 @@ public virtual async Task> UpdateAsync(ET /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -509,7 +516,7 @@ public virtual Response Update(ETag ifMatch, ApiMa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -538,7 +545,7 @@ public virtual AsyncPageable GetProductApisAsync(string filter = /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -567,7 +574,7 @@ public virtual Pageable GetProductApis(string filter = null, int /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -606,7 +613,7 @@ public virtual async Task> CheckProductApiEntityExistsAsync(strin /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -645,7 +652,7 @@ public virtual Response CheckProductApiEntityExists(string apiId, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -684,7 +691,7 @@ public virtual async Task> CreateOrUpdateProductApiAsyn /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -723,7 +730,7 @@ public virtual Response CreateOrUpdateProductApi(string apiId, C /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -762,7 +769,7 @@ public virtual async Task DeleteProductApiAsync(string apiId, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -801,7 +808,7 @@ public virtual Response DeleteProductApi(string apiId, CancellationToken cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -830,7 +837,7 @@ public virtual AsyncPageable GetProductGroupsAsync(string filt /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -859,7 +866,7 @@ public virtual Pageable GetProductGroups(string filter = null, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -898,7 +905,7 @@ public virtual async Task> CheckProductGroupEntityExistsAsync(str /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -937,7 +944,7 @@ public virtual Response CheckProductGroupEntityExists(string groupId, Canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -976,7 +983,7 @@ public virtual async Task> CreateOrUpdateProductGroup /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -1015,7 +1022,7 @@ public virtual Response CreateOrUpdateProductGroup(string grou /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -1054,7 +1061,7 @@ public virtual async Task DeleteProductGroupAsync(string groupId, Canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -1093,7 +1100,7 @@ public virtual Response DeleteProductGroup(string groupId, CancellationToken can /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1131,7 +1138,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductTagCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductTagCollection.cs index edbd620948498..9462a28ba55ff 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductTagCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductTagCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string tagId, Cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual Pageable GetAll(string filter = /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> ExistsAsync(string tagId, Cancellation /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -404,7 +404,7 @@ public virtual Response Exists(string tagId, CancellationToken cancellatio /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductTagResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductTagResource.cs index bc2acf51838a2..3c5a2ab8c4a5e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductTagResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductTagResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual async Task> UpdateA /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual ArmOperation Update(WaitUntil wa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual async Task> GetEntityStateByProductAsync(Cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceCollection.cs index cda6234f81c33..35567cce9609b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string serviceName, Ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken c /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string serviceName, Cancel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string serviceName, CancellationToken cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceData.Serialization.cs index 16c850a382830..133e1b3f6a36f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceData.Serialization.cs @@ -8,7 +8,9 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; using System.Net; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -227,6 +229,21 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WritePropertyName("enableClientCertificate"u8); writer.WriteBooleanValue(EnableClientCertificate.Value); } + if (Optional.IsDefined(NatGatewayState)) + { + writer.WritePropertyName("natGatewayState"u8); + writer.WriteStringValue(NatGatewayState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsCollectionDefined(OutboundPublicIPAddresses)) + { + writer.WritePropertyName("outboundPublicIPAddresses"u8); + writer.WriteStartArray(); + foreach (var item in OutboundPublicIPAddresses) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } if (Optional.IsDefined(DisableGateway)) { writer.WritePropertyName("disableGateway"u8); @@ -335,6 +352,8 @@ internal static ApiManagementServiceData DeserializeApiManagementServiceData(Jso IDictionary customProperties = default; IList certificates = default; bool? enableClientCertificate = default; + ApiManagementNatGatewayState? natGatewayState = default; + IReadOnlyList outboundPublicIPAddresses = default; bool? disableGateway = default; VirtualNetworkType? virtualNetworkType = default; ApiVersionConstraint apiVersionConstraint = default; @@ -648,6 +667,29 @@ internal static ApiManagementServiceData DeserializeApiManagementServiceData(Jso enableClientCertificate = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("natGatewayState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + natGatewayState = new ApiManagementNatGatewayState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("outboundPublicIPAddresses"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + outboundPublicIPAddresses = array; + continue; + } if (property0.NameEquals("disableGateway"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -757,6 +799,8 @@ internal static ApiManagementServiceData DeserializeApiManagementServiceData(Jso customProperties ?? new ChangeTrackingDictionary(), certificates ?? new ChangeTrackingList(), enableClientCertificate, + natGatewayState, + outboundPublicIPAddresses ?? new ChangeTrackingList(), disableGateway, virtualNetworkType, apiVersionConstraint, @@ -768,6 +812,807 @@ internal static ApiManagementServiceData DeserializeApiManagementServiceData(Jso serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" location: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" location: "); + builder.AppendLine($"'{Location.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Tags), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tags: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags.Any()) + { + builder.Append(" tags: "); + builder.AppendLine("{"); + foreach (var item in Tags) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + if (item.Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{item.Value}'''"); + } + else + { + builder.AppendLine($"'{item.Value}'"); + } + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Sku), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sku: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Sku)) + { + builder.Append(" sku: "); + BicepSerializationHelpers.AppendChildObject(builder, Sku, options, 2, false, " sku: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Identity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" identity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Identity)) + { + builder.Append(" identity: "); + BicepSerializationHelpers.AppendChildObject(builder, Identity, options, 2, false, " identity: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ETag), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" etag: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ETag)) + { + builder.Append(" etag: "); + builder.AppendLine($"'{ETag.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Zones), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" zones: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Zones)) + { + if (Zones.Any()) + { + builder.Append(" zones: "); + builder.AppendLine("["); + foreach (var item in Zones) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NotificationSenderEmail), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" notificationSenderEmail: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NotificationSenderEmail)) + { + builder.Append(" notificationSenderEmail: "); + if (NotificationSenderEmail.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NotificationSenderEmail}'''"); + } + else + { + builder.AppendLine($"'{NotificationSenderEmail}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + if (ProvisioningState.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ProvisioningState}'''"); + } + else + { + builder.AppendLine($"'{ProvisioningState}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TargetProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" targetProvisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TargetProvisioningState)) + { + builder.Append(" targetProvisioningState: "); + if (TargetProvisioningState.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TargetProvisioningState}'''"); + } + else + { + builder.AppendLine($"'{TargetProvisioningState}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CreatedAtUtc), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" createdAtUtc: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CreatedAtUtc)) + { + builder.Append(" createdAtUtc: "); + var formattedDateTimeString = TypeFormatters.ToString(CreatedAtUtc.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GatewayUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" gatewayUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(GatewayUri)) + { + builder.Append(" gatewayUrl: "); + builder.AppendLine($"'{GatewayUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GatewayRegionalUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" gatewayRegionalUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(GatewayRegionalUri)) + { + builder.Append(" gatewayRegionalUrl: "); + builder.AppendLine($"'{GatewayRegionalUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PortalUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" portalUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PortalUri)) + { + builder.Append(" portalUrl: "); + builder.AppendLine($"'{PortalUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ManagementApiUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" managementApiUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ManagementApiUri)) + { + builder.Append(" managementApiUrl: "); + builder.AppendLine($"'{ManagementApiUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScmUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scmUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ScmUri)) + { + builder.Append(" scmUrl: "); + builder.AppendLine($"'{ScmUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DeveloperPortalUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" developerPortalUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DeveloperPortalUri)) + { + builder.Append(" developerPortalUrl: "); + builder.AppendLine($"'{DeveloperPortalUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(HostnameConfigurations), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" hostnameConfigurations: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(HostnameConfigurations)) + { + if (HostnameConfigurations.Any()) + { + builder.Append(" hostnameConfigurations: "); + builder.AppendLine("["); + foreach (var item in HostnameConfigurations) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " hostnameConfigurations: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublicIPAddresses), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" publicIPAddresses: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(PublicIPAddresses)) + { + if (PublicIPAddresses.Any()) + { + builder.Append(" publicIPAddresses: "); + builder.AppendLine("["); + foreach (var item in PublicIPAddresses) + { + if (item == null) + { + builder.Append("null"); + continue; + } + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PrivateIPAddresses), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" privateIPAddresses: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(PrivateIPAddresses)) + { + if (PrivateIPAddresses.Any()) + { + builder.Append(" privateIPAddresses: "); + builder.AppendLine("["); + foreach (var item in PrivateIPAddresses) + { + if (item == null) + { + builder.Append("null"); + continue; + } + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublicIPAddressId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" publicIpAddressId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PublicIPAddressId)) + { + builder.Append(" publicIpAddressId: "); + builder.AppendLine($"'{PublicIPAddressId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublicNetworkAccess), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" publicNetworkAccess: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PublicNetworkAccess)) + { + builder.Append(" publicNetworkAccess: "); + builder.AppendLine($"'{PublicNetworkAccess.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VirtualNetworkConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" virtualNetworkConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(VirtualNetworkConfiguration)) + { + builder.Append(" virtualNetworkConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, VirtualNetworkConfiguration, options, 4, false, " virtualNetworkConfiguration: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AdditionalLocations), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" additionalLocations: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(AdditionalLocations)) + { + if (AdditionalLocations.Any()) + { + builder.Append(" additionalLocations: "); + builder.AppendLine("["); + foreach (var item in AdditionalLocations) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " additionalLocations: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CustomProperties), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" customProperties: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(CustomProperties)) + { + if (CustomProperties.Any()) + { + builder.Append(" customProperties: "); + builder.AppendLine("{"); + foreach (var item in CustomProperties) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + if (item.Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{item.Value}'''"); + } + else + { + builder.AppendLine($"'{item.Value}'"); + } + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Certificates), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" certificates: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Certificates)) + { + if (Certificates.Any()) + { + builder.Append(" certificates: "); + builder.AppendLine("["); + foreach (var item in Certificates) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " certificates: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EnableClientCertificate), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enableClientCertificate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EnableClientCertificate)) + { + builder.Append(" enableClientCertificate: "); + var boolValue = EnableClientCertificate.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NatGatewayState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" natGatewayState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NatGatewayState)) + { + builder.Append(" natGatewayState: "); + builder.AppendLine($"'{NatGatewayState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OutboundPublicIPAddresses), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" outboundPublicIPAddresses: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(OutboundPublicIPAddresses)) + { + if (OutboundPublicIPAddresses.Any()) + { + builder.Append(" outboundPublicIPAddresses: "); + builder.AppendLine("["); + foreach (var item in OutboundPublicIPAddresses) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DisableGateway), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" disableGateway: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DisableGateway)) + { + builder.Append(" disableGateway: "); + var boolValue = DisableGateway.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VirtualNetworkType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" virtualNetworkType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(VirtualNetworkType)) + { + builder.Append(" virtualNetworkType: "); + builder.AppendLine($"'{VirtualNetworkType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("MinApiVersion", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersionConstraint: "); + builder.AppendLine("{"); + builder.AppendLine(" apiVersionConstraint: {"); + builder.Append(" minApiVersion: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(ApiVersionConstraint)) + { + builder.Append(" apiVersionConstraint: "); + BicepSerializationHelpers.AppendChildObject(builder, ApiVersionConstraint, options, 4, false, " apiVersionConstraint: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Restore), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" restore: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Restore)) + { + builder.Append(" restore: "); + var boolValue = Restore.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PrivateEndpointConnections), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" privateEndpointConnections: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(PrivateEndpointConnections)) + { + if (PrivateEndpointConnections.Any()) + { + builder.Append(" privateEndpointConnections: "); + builder.AppendLine("["); + foreach (var item in PrivateEndpointConnections) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " privateEndpointConnections: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PlatformVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" platformVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PlatformVersion)) + { + builder.Append(" platformVersion: "); + builder.AppendLine($"'{PlatformVersion.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublisherEmail), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" publisherEmail: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PublisherEmail)) + { + builder.Append(" publisherEmail: "); + if (PublisherEmail.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PublisherEmail}'''"); + } + else + { + builder.AppendLine($"'{PublisherEmail}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublisherName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" publisherName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PublisherName)) + { + builder.Append(" publisherName: "); + if (PublisherName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PublisherName}'''"); + } + else + { + builder.AppendLine($"'{PublisherName}'"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -776,6 +1621,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementServiceData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceData.cs index 04c2720694350..dee0cb282bb50 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceData.cs @@ -72,6 +72,7 @@ public ApiManagementServiceData(AzureLocation location, ApiManagementServiceSkuP AdditionalLocations = new ChangeTrackingList(); CustomProperties = new ChangeTrackingDictionary(); Certificates = new ChangeTrackingList(); + OutboundPublicIPAddresses = new ChangeTrackingList(); PrivateEndpointConnections = new ChangeTrackingList(); PublisherEmail = publisherEmail; PublisherName = publisherName; @@ -105,9 +106,11 @@ public ApiManagementServiceData(AzureLocation location, ApiManagementServiceSkuP /// Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. /// Virtual network configuration of the API Management service. /// Additional datacenter locations of the API Management service. - /// Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1st 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of next ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them. Note: next ciphers can't be disabled since they are required by Azure CloudService internal components: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384. + /// Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1, 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of the following ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them.</br> Note: The following ciphers can't be disabled since they are required by internal platform components: TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. /// List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. /// Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. + /// Property can be used to enable NAT Gateway for this API Management service. + /// Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. /// Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. /// The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. /// Control Plane Apis version constraint for the API Management service. @@ -117,7 +120,7 @@ public ApiManagementServiceData(AzureLocation location, ApiManagementServiceSkuP /// Publisher email. /// Publisher name. /// Keeps track of any properties unknown to the library. - internal ApiManagementServiceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ApiManagementServiceSkuProperties sku, ManagedServiceIdentity identity, ETag? etag, IList zones, string notificationSenderEmail, string provisioningState, string targetProvisioningState, DateTimeOffset? createdAtUtc, Uri gatewayUri, Uri gatewayRegionalUri, Uri portalUri, Uri managementApiUri, Uri scmUri, Uri developerPortalUri, IList hostnameConfigurations, IReadOnlyList publicIPAddresses, IReadOnlyList privateIPAddresses, ResourceIdentifier publicIPAddressId, PublicNetworkAccess? publicNetworkAccess, VirtualNetworkConfiguration virtualNetworkConfiguration, IList additionalLocations, IDictionary customProperties, IList certificates, bool? enableClientCertificate, bool? disableGateway, VirtualNetworkType? virtualNetworkType, ApiVersionConstraint apiVersionConstraint, bool? restore, IList privateEndpointConnections, PlatformVersion? platformVersion, string publisherEmail, string publisherName, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal ApiManagementServiceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ApiManagementServiceSkuProperties sku, ManagedServiceIdentity identity, ETag? etag, IList zones, string notificationSenderEmail, string provisioningState, string targetProvisioningState, DateTimeOffset? createdAtUtc, Uri gatewayUri, Uri gatewayRegionalUri, Uri portalUri, Uri managementApiUri, Uri scmUri, Uri developerPortalUri, IList hostnameConfigurations, IReadOnlyList publicIPAddresses, IReadOnlyList privateIPAddresses, ResourceIdentifier publicIPAddressId, PublicNetworkAccess? publicNetworkAccess, VirtualNetworkConfiguration virtualNetworkConfiguration, IList additionalLocations, IDictionary customProperties, IList certificates, bool? enableClientCertificate, ApiManagementNatGatewayState? natGatewayState, IReadOnlyList outboundPublicIPAddresses, bool? disableGateway, VirtualNetworkType? virtualNetworkType, ApiVersionConstraint apiVersionConstraint, bool? restore, IList privateEndpointConnections, PlatformVersion? platformVersion, string publisherEmail, string publisherName, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Sku = sku; Identity = identity; @@ -143,6 +146,8 @@ internal ApiManagementServiceData(ResourceIdentifier id, string name, ResourceTy CustomProperties = customProperties; Certificates = certificates; EnableClientCertificate = enableClientCertificate; + NatGatewayState = natGatewayState; + OutboundPublicIPAddresses = outboundPublicIPAddresses; DisableGateway = disableGateway; VirtualNetworkType = virtualNetworkType; ApiVersionConstraint = apiVersionConstraint; @@ -160,60 +165,93 @@ internal ApiManagementServiceData() } /// SKU properties of the API Management service. + [WirePath("sku")] public ApiManagementServiceSkuProperties Sku { get; set; } /// Managed service identity of the Api Management service. + [WirePath("identity")] public ManagedServiceIdentity Identity { get; set; } /// ETag of the resource. + [WirePath("etag")] public ETag? ETag { get; } /// A list of availability zones denoting where the resource needs to come from. + [WirePath("zones")] public IList Zones { get; } /// Email address from which the notification will be sent. + [WirePath("properties.notificationSenderEmail")] public string NotificationSenderEmail { get; set; } /// The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + [WirePath("properties.provisioningState")] public string ProvisioningState { get; } /// The provisioning state of the API Management service, which is targeted by the long running operation started on the service. + [WirePath("properties.targetProvisioningState")] public string TargetProvisioningState { get; } /// Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + [WirePath("properties.createdAtUtc")] public DateTimeOffset? CreatedAtUtc { get; } /// Gateway URL of the API Management service. + [WirePath("properties.gatewayUrl")] public Uri GatewayUri { get; } /// Gateway URL of the API Management service in the Default Region. + [WirePath("properties.gatewayRegionalUrl")] public Uri GatewayRegionalUri { get; } /// Publisher portal endpoint Url of the API Management service. + [WirePath("properties.portalUrl")] public Uri PortalUri { get; } /// Management API endpoint URL of the API Management service. + [WirePath("properties.managementApiUrl")] public Uri ManagementApiUri { get; } /// SCM endpoint URL of the API Management service. + [WirePath("properties.scmUrl")] public Uri ScmUri { get; } /// DEveloper Portal endpoint URL of the API Management service. + [WirePath("properties.developerPortalUrl")] public Uri DeveloperPortalUri { get; } /// Custom hostname configuration of the API Management service. + [WirePath("properties.hostnameConfigurations")] public IList HostnameConfigurations { get; } /// Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, Standard, Premium and Isolated SKU. + [WirePath("properties.publicIPAddresses")] public IReadOnlyList PublicIPAddresses { get; } /// Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU. + [WirePath("properties.privateIPAddresses")] public IReadOnlyList PrivateIPAddresses { get; } /// Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported only for Developer and Premium SKU being deployed in Virtual Network. + [WirePath("properties.publicIpAddressId")] public ResourceIdentifier PublicIPAddressId { get; set; } /// Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. + [WirePath("properties.publicNetworkAccess")] public PublicNetworkAccess? PublicNetworkAccess { get; set; } /// Virtual network configuration of the API Management service. + [WirePath("properties.virtualNetworkConfiguration")] public VirtualNetworkConfiguration VirtualNetworkConfiguration { get; set; } /// Additional datacenter locations of the API Management service. + [WirePath("properties.additionalLocations")] public IList AdditionalLocations { get; } - /// Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1st 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of next ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them. Note: next ciphers can't be disabled since they are required by Azure CloudService internal components: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384. + /// Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1, 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of the following ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them.</br> Note: The following ciphers can't be disabled since they are required by internal platform components: TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. + [WirePath("properties.customProperties")] public IDictionary CustomProperties { get; } /// List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. + [WirePath("properties.certificates")] public IList Certificates { get; } /// Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. + [WirePath("properties.enableClientCertificate")] public bool? EnableClientCertificate { get; set; } + /// Property can be used to enable NAT Gateway for this API Management service. + [WirePath("properties.natGatewayState")] + public ApiManagementNatGatewayState? NatGatewayState { get; set; } + /// Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. + [WirePath("properties.outboundPublicIPAddresses")] + public IReadOnlyList OutboundPublicIPAddresses { get; } /// Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. + [WirePath("properties.disableGateway")] public bool? DisableGateway { get; set; } /// The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. + [WirePath("properties.virtualNetworkType")] public VirtualNetworkType? VirtualNetworkType { get; set; } /// Control Plane Apis version constraint for the API Management service. internal ApiVersionConstraint ApiVersionConstraint { get; set; } /// Limit control plane API calls to API Management service with version equal to or newer than this value. + [WirePath("properties.apiVersionConstraint.minApiVersion")] public string MinApiVersion { get => ApiVersionConstraint is null ? default : ApiVersionConstraint.MinApiVersion; @@ -226,14 +264,19 @@ public string MinApiVersion } /// Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other properties will be ignored. + [WirePath("properties.restore")] public bool? Restore { get; set; } /// List of Private Endpoint Connections of this service. + [WirePath("properties.privateEndpointConnections")] public IList PrivateEndpointConnections { get; } /// Compute Platform Version running the service in this location. + [WirePath("properties.platformVersion")] public PlatformVersion? PlatformVersion { get; } /// Publisher email. + [WirePath("properties.publisherEmail")] public string PublisherEmail { get; set; } /// Publisher name. + [WirePath("properties.publisherName")] public string PublisherName { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceResource.cs index 474a7ba629156..78a5911a611d2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceResource.cs @@ -178,7 +178,7 @@ public virtual ApiCollection GetApis() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetApiAsync(string apiId, Cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -247,7 +247,7 @@ public virtual ApiManagementPolicyCollection GetApiManagementPolicies() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -277,7 +277,7 @@ public virtual async Task> GetApiManagemen /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual ApiManagementTagCollection GetApiManagementTags() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetApiManagementTa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -383,7 +383,7 @@ public virtual ApiManagementDiagnosticCollection GetApiManagementDiagnostics() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -414,7 +414,7 @@ public virtual async Task> GetApiManag /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -452,7 +452,7 @@ public virtual ApiManagementIssueCollection GetApiManagementIssues() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -483,7 +483,7 @@ public virtual async Task> GetApiManagement /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -521,7 +521,7 @@ public virtual ApiVersionSetCollection GetApiVersionSets() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -552,7 +552,7 @@ public virtual async Task> GetApiVersionSetAsync /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -590,7 +590,7 @@ public virtual ApiManagementAuthorizationServerCollection GetApiManagementAuthor /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -621,7 +621,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -639,6 +639,75 @@ public virtual Response GetApiManageme return GetApiManagementAuthorizationServers().Get(authsid, cancellationToken); } + /// Gets a collection of AuthorizationProviderContractResources in the ApiManagementService. + /// An object representing collection of AuthorizationProviderContractResources and their operations over a AuthorizationProviderContractResource. + public virtual AuthorizationProviderContractCollection GetAuthorizationProviderContracts() + { + return GetCachedClient(client => new AuthorizationProviderContractCollection(client, Id)); + } + + /// + /// Gets the details of the authorization provider specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization provider. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetAuthorizationProviderContractAsync(string authorizationProviderId, CancellationToken cancellationToken = default) + { + return await GetAuthorizationProviderContracts().GetAsync(authorizationProviderId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the authorization provider specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization provider. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetAuthorizationProviderContract(string authorizationProviderId, CancellationToken cancellationToken = default) + { + return GetAuthorizationProviderContracts().Get(authorizationProviderId, cancellationToken); + } + /// Gets a collection of ApiManagementBackendResources in the ApiManagementService. /// An object representing collection of ApiManagementBackendResources and their operations over a ApiManagementBackendResource. public virtual ApiManagementBackendCollection GetApiManagementBackends() @@ -659,7 +728,7 @@ public virtual ApiManagementBackendCollection GetApiManagementBackends() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -690,7 +759,7 @@ public virtual async Task> GetApiManageme /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -728,7 +797,7 @@ public virtual ApiManagementCacheCollection GetApiManagementCaches() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -759,7 +828,7 @@ public virtual async Task> GetApiManagement /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -797,7 +866,7 @@ public virtual ApiManagementCertificateCollection GetApiManagementCertificates() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -828,7 +897,7 @@ public virtual async Task> GetApiMana /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -866,7 +935,7 @@ public virtual ApiManagementEmailTemplateCollection GetApiManagementEmailTemplat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -895,7 +964,7 @@ public virtual async Task> GetApiMa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -931,7 +1000,7 @@ public virtual ApiManagementGatewayCollection GetApiManagementGateways() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -962,7 +1031,7 @@ public virtual async Task> GetApiManageme /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1000,7 +1069,7 @@ public virtual ApiManagementGroupCollection GetApiManagementGroups() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1031,7 +1100,7 @@ public virtual async Task> GetApiManagement /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1069,7 +1138,7 @@ public virtual ApiManagementIdentityProviderCollection GetApiManagementIdentityP /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1098,7 +1167,7 @@ public virtual async Task> GetAp /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1134,7 +1203,7 @@ public virtual ApiManagementLoggerCollection GetApiManagementLoggers() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1165,7 +1234,7 @@ public virtual async Task> GetApiManagemen /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1203,7 +1272,7 @@ public virtual ApiManagementNamedValueCollection GetApiManagementNamedValues() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1234,7 +1303,7 @@ public virtual async Task> GetApiManag /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1272,7 +1341,7 @@ public virtual ApiManagementNotificationCollection GetApiManagementNotifications /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1301,7 +1370,7 @@ public virtual async Task> GetApiMan /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1337,7 +1406,7 @@ public virtual ApiManagementOpenIdConnectProviderCollection GetApiManagementOpen /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1368,7 +1437,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1386,6 +1455,146 @@ public virtual Response GetApiManage return GetApiManagementOpenIdConnectProviders().Get(openId, cancellationToken); } + /// Gets a collection of PolicyFragmentContractResources in the ApiManagementService. + /// An object representing collection of PolicyFragmentContractResources and their operations over a PolicyFragmentContractResource. + public virtual PolicyFragmentContractCollection GetPolicyFragmentContracts() + { + return GetCachedClient(client => new PolicyFragmentContractCollection(client, Id)); + } + + /// + /// Gets a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// A resource identifier. + /// Policy fragment content format. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetPolicyFragmentContractAsync(string id, PolicyFragmentContentFormat? format = null, CancellationToken cancellationToken = default) + { + return await GetPolicyFragmentContracts().GetAsync(id, format, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// A resource identifier. + /// Policy fragment content format. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetPolicyFragmentContract(string id, PolicyFragmentContentFormat? format = null, CancellationToken cancellationToken = default) + { + return GetPolicyFragmentContracts().Get(id, format, cancellationToken); + } + + /// Gets a collection of PortalConfigContractResources in the ApiManagementService. + /// An object representing collection of PortalConfigContractResources and their operations over a PortalConfigContractResource. + public virtual PortalConfigContractCollection GetPortalConfigContracts() + { + return GetCachedClient(client => new PortalConfigContractCollection(client, Id)); + } + + /// + /// Get the developer portal configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Portal configuration identifier. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetPortalConfigContractAsync(string portalConfigId, CancellationToken cancellationToken = default) + { + return await GetPortalConfigContracts().GetAsync(portalConfigId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the developer portal configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Portal configuration identifier. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetPortalConfigContract(string portalConfigId, CancellationToken cancellationToken = default) + { + return GetPortalConfigContracts().Get(portalConfigId, cancellationToken); + } + /// Gets a collection of ApiManagementPortalRevisionResources in the ApiManagementService. /// An object representing collection of ApiManagementPortalRevisionResources and their operations over a ApiManagementPortalRevisionResource. public virtual ApiManagementPortalRevisionCollection GetApiManagementPortalRevisions() @@ -1406,7 +1615,7 @@ public virtual ApiManagementPortalRevisionCollection GetApiManagementPortalRevis /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1437,7 +1646,7 @@ public virtual async Task> GetApiM /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1496,7 +1705,7 @@ public virtual ApiManagementPrivateEndpointConnectionCollection GetApiManagement /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1527,7 +1736,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1565,7 +1774,7 @@ public virtual ApiManagementPrivateLinkResourceCollection GetApiManagementPrivat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1596,7 +1805,7 @@ public virtual async Task> GetApiMana /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1634,7 +1843,7 @@ public virtual ApiManagementProductCollection GetApiManagementProducts() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1665,7 +1874,7 @@ public virtual async Task> GetApiManageme /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1703,7 +1912,7 @@ public virtual ApiManagementGlobalSchemaCollection GetApiManagementGlobalSchemas /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1734,7 +1943,7 @@ public virtual async Task> GetApiMan /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1772,7 +1981,7 @@ public virtual ApiManagementTenantSettingCollection GetApiManagementTenantSettin /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1801,7 +2010,7 @@ public virtual async Task> GetApiMa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1837,7 +2046,7 @@ public virtual ApiManagementSubscriptionCollection GetApiManagementSubscriptions /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1868,7 +2077,7 @@ public virtual async Task> GetApiMan /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1906,7 +2115,7 @@ public virtual TenantAccessInfoCollection GetTenantAccessInfos() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1935,7 +2144,7 @@ public virtual async Task> GetTenantAccessInf /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1971,7 +2180,7 @@ public virtual ApiManagementUserCollection GetApiManagementUsers() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -2002,7 +2211,7 @@ public virtual async Task> GetApiManagementU /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -2020,6 +2229,75 @@ public virtual Response GetApiManagementUser(string u return GetApiManagementUsers().Get(userId, cancellationToken); } + /// Gets a collection of DocumentationContractResources in the ApiManagementService. + /// An object representing collection of DocumentationContractResources and their operations over a DocumentationContractResource. + public virtual DocumentationContractCollection GetDocumentationContracts() + { + return GetCachedClient(client => new DocumentationContractCollection(client, Id)); + } + + /// + /// Gets the details of the Documentation specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Documentation identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDocumentationContractAsync(string documentationId, CancellationToken cancellationToken = default) + { + return await GetDocumentationContracts().GetAsync(documentationId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the Documentation specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Documentation identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDocumentationContract(string documentationId, CancellationToken cancellationToken = default) + { + return GetDocumentationContracts().Get(documentationId, cancellationToken); + } + /// /// Gets an API Management service resource description. /// @@ -2033,7 +2311,7 @@ public virtual Response GetApiManagementUser(string u /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -2073,7 +2351,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -2113,7 +2391,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -2155,7 +2433,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -2197,7 +2475,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -2243,7 +2521,7 @@ public virtual async Task> UpdateAsyn /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -2289,7 +2567,7 @@ public virtual ArmOperation Update(WaitUntil waitU /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -2323,7 +2601,7 @@ public virtual AsyncPageable GetApisByTagsAsync(stri /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -2357,7 +2635,7 @@ public virtual Pageable GetApisByTags(string filter /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -2399,7 +2677,7 @@ public virtual async Task> PerformConnecti /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -2441,7 +2719,7 @@ public virtual ArmOperation PerformConnectivityCheckAsy /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -2467,7 +2745,7 @@ public virtual AsyncPageable GetContentTypesAsync(Canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -2493,7 +2771,7 @@ public virtual Pageable GetContentTypes(CancellationTo /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -2532,7 +2810,7 @@ public virtual async Task> GetContentTypeAsyn /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -2571,7 +2849,7 @@ public virtual Response GetContentType(string contentT /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -2611,7 +2889,7 @@ public virtual async Task> CreateOrUpdateCont /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -2651,7 +2929,7 @@ public virtual Response CreateOrUpdateContentType(stri /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -2691,7 +2969,7 @@ public virtual async Task DeleteContentTypeAsync(string contentTypeId, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -2731,7 +3009,7 @@ public virtual Response DeleteContentType(string contentTypeId, ETag ifMatch, Ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -2762,7 +3040,7 @@ public virtual AsyncPageable GetContentItemsAsync(stri /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -2793,7 +3071,7 @@ public virtual Pageable GetContentItems(string content /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -2834,7 +3112,7 @@ public virtual async Task> GetContentItemEntityTagAsync(string co /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -2875,7 +3153,7 @@ public virtual Response GetContentItemEntityTag(string contentTypeId, stri /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -2916,7 +3194,7 @@ public virtual async Task> GetContentItemAsyn /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -2957,7 +3235,7 @@ public virtual Response GetContentItem(string contentT /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -2999,7 +3277,7 @@ public virtual async Task> CreateOrUpdateCont /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -3041,7 +3319,7 @@ public virtual Response CreateOrUpdateContentItem(stri /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -3083,7 +3361,7 @@ public virtual async Task DeleteContentItemAsync(string contentTypeId, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -3125,7 +3403,7 @@ public virtual Response DeleteContentItem(string contentTypeId, string contentIt /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -3151,7 +3429,7 @@ public virtual AsyncPageable GetAvailabl /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -3177,7 +3455,7 @@ public virtual Pageable GetAvailableApiM /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -3223,7 +3501,7 @@ public virtual async Task> RestoreAsy /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -3269,7 +3547,7 @@ public virtual ArmOperation Restore(WaitUntil wait /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -3315,7 +3593,7 @@ public virtual async Task> BackupAsyn /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -3348,6 +3626,90 @@ public virtual ArmOperation Backup(WaitUntil waitU } } + /// + /// Upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and could take several minutes to complete. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/migrateToStv2 + /// + /// + /// Operation Id + /// ApiManagementService_MigrateToStv2 + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> MigrateToStv2Async(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _apiManagementServiceClientDiagnostics.CreateScope("ApiManagementServiceResource.MigrateToStv2"); + scope.Start(); + try + { + var response = await _apiManagementServiceRestClient.MigrateToStv2Async(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(new ApiManagementServiceOperationSource(Client), _apiManagementServiceClientDiagnostics, Pipeline, _apiManagementServiceRestClient.CreateMigrateToStv2Request(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and could take several minutes to complete. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/migrateToStv2 + /// + /// + /// Operation Id + /// ApiManagementService_MigrateToStv2 + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation MigrateToStv2(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _apiManagementServiceClientDiagnostics.CreateScope("ApiManagementServiceResource.MigrateToStv2"); + scope.Start(); + try + { + var response = _apiManagementServiceRestClient.MigrateToStv2(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ApiManagementArmOperation(new ApiManagementServiceOperationSource(Client), _apiManagementServiceClientDiagnostics, Pipeline, _apiManagementServiceRestClient.CreateMigrateToStv2Request(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. /// @@ -3361,7 +3723,7 @@ public virtual ArmOperation Backup(WaitUntil waitU /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -3399,7 +3761,7 @@ public virtual async Task> GetSs /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -3437,7 +3799,7 @@ public virtual Response GetSsoToken(Cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -3480,7 +3842,7 @@ public virtual async Task> ApplyNetwo /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -3523,7 +3885,7 @@ public virtual ArmOperation ApplyNetworkConfigurat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -3548,7 +3910,7 @@ public virtual AsyncPageable GetNetworkStatus /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -3573,7 +3935,7 @@ public virtual Pageable GetNetworkStatuses(Ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -3608,7 +3970,7 @@ public virtual async Task> GetNetworkStatusByLoc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -3643,7 +4005,7 @@ public virtual Response GetNetworkStatusByLocation(AzureL /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -3668,7 +4030,7 @@ public virtual AsyncPageable GetOutboundNetworkDepe /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -3693,7 +4055,7 @@ public virtual Pageable GetOutboundNetworkDependenc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -3719,7 +4081,7 @@ public virtual AsyncPageable GetPolicyDescription /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -3745,7 +4107,7 @@ public virtual Pageable GetPolicyDescriptions(Pol /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -3774,7 +4136,7 @@ public virtual AsyncPageable GetPortalSettingsAsync( /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -3803,7 +4165,7 @@ public virtual Pageable GetPortalSettings(Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -3837,7 +4199,7 @@ public virtual AsyncPageable GetProductsByTagsAsync( /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -3871,7 +4233,7 @@ public virtual Pageable GetProductsByTags(string fil /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -3901,7 +4263,7 @@ public virtual AsyncPageable GetQuotaByCounterKeysAsync(st /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -3931,7 +4293,7 @@ public virtual Pageable GetQuotaByCounterKeys(string quota /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -3963,7 +4325,7 @@ public virtual AsyncPageable UpdateQuotaByCounterKeysAsync /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -3995,7 +4357,7 @@ public virtual Pageable UpdateQuotaByCounterKeys(string qu /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4036,7 +4398,7 @@ public virtual async Task> GetQuotaByPeriodKeyAsy /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4077,7 +4439,7 @@ public virtual Response GetQuotaByPeriodKey(string quotaCo /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4120,7 +4482,7 @@ public virtual async Task> UpdateQuotaByPeriodKey /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4163,7 +4525,7 @@ public virtual Response UpdateQuotaByPeriodKey(string quot /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4189,7 +4551,7 @@ public virtual AsyncPageable GetRegionsAsync(CancellationToken c /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4215,7 +4577,7 @@ public virtual Pageable GetRegions(CancellationToken cancellatio /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4248,7 +4610,7 @@ public virtual AsyncPageable GetReportsByApiAsync(string f /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4281,7 +4643,7 @@ public virtual Pageable GetReportsByApi(string filter, int /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4314,7 +4676,7 @@ public virtual AsyncPageable GetReportsByUserAsync(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4347,7 +4709,7 @@ public virtual Pageable GetReportsByUser(string filter, in /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4380,7 +4742,7 @@ public virtual AsyncPageable GetReportsByOperationAsync(st /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4413,7 +4775,7 @@ public virtual Pageable GetReportsByOperation(string filte /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4446,7 +4808,7 @@ public virtual AsyncPageable GetReportsByProductAsync(stri /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4479,7 +4841,7 @@ public virtual Pageable GetReportsByProduct(string filter, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4511,7 +4873,7 @@ public virtual AsyncPageable GetReportsByGeoAsync(string f /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4543,7 +4905,7 @@ public virtual Pageable GetReportsByGeo(string filter, int /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4576,7 +4938,7 @@ public virtual AsyncPageable GetReportsBySubscriptionAsync /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4609,7 +4971,7 @@ public virtual Pageable GetReportsBySubscription(string fi /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4643,7 +5005,7 @@ public virtual AsyncPageable GetReportsByTimeAsync(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4677,7 +5039,7 @@ public virtual Pageable GetReportsByTime(string filter, Ti /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4708,7 +5070,7 @@ public virtual AsyncPageable GetReportsByRequestAsy /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4739,7 +5101,7 @@ public virtual Pageable GetReportsByRequest(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4768,7 +5130,7 @@ public virtual AsyncPageable GetTagResourcesAsync(st /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4797,7 +5159,7 @@ public virtual Pageable GetTagResources(string filte /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4840,7 +5202,7 @@ public virtual async Task> DeployTe /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4883,7 +5245,7 @@ public virtual ArmOperation DeployTenantConfigur /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4926,7 +5288,7 @@ public virtual async Task> SaveTena /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -4969,7 +5331,7 @@ public virtual ArmOperation SaveTenantConfigurat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -5012,7 +5374,7 @@ public virtual async Task> Validate /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -5055,7 +5417,7 @@ public virtual ArmOperation ValidateTenantConfig /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -5090,7 +5452,7 @@ public virtual async Task> GetTen /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -5125,7 +5487,7 @@ public virtual Response GetTenantConfigura /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -5187,7 +5549,7 @@ public virtual async Task> AddTagAsync(st /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -5249,7 +5611,7 @@ public virtual Response AddTag(string key, string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -5306,7 +5668,7 @@ public virtual async Task> SetTagsAsync(I /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -5363,7 +5725,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -5423,7 +5785,7 @@ public virtual async Task> RemoveTagAsync /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementSubscriptionCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementSubscriptionCollection.cs index 2cef402d6885c..f909f74e5f0ca 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementSubscriptionCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementSubscriptionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -123,7 +123,7 @@ public virtual async Task> Creat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual Response Get(string sid, Cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -304,7 +304,7 @@ public virtual AsyncPageable GetAllAsync(stri /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -337,7 +337,7 @@ public virtual Pageable GetAll(string filter /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -380,7 +380,7 @@ public virtual async Task> ExistsAsync(string sid, CancellationTo /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -423,7 +423,7 @@ public virtual Response Exists(string sid, CancellationToken cancellationT /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -468,7 +468,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementSubscriptionResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementSubscriptionResource.cs index 7d16f0e36c26e..1d6fc7822e9dd 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementSubscriptionResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementSubscriptionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual async Task> UpdateAsy /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -370,7 +370,7 @@ public virtual Response Update(ETag ifMatch, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -408,7 +408,7 @@ public virtual async Task RegeneratePrimaryKeyAsync(CancellationToken /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -446,7 +446,7 @@ public virtual Response RegeneratePrimaryKey(CancellationToken cancellationToken /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -484,7 +484,7 @@ public virtual async Task RegenerateSecondaryKeyAsync(CancellationToke /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -522,7 +522,7 @@ public virtual Response RegenerateSecondaryKey(CancellationToken cancellationTok /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -560,7 +560,7 @@ public virtual async Task> GetSecretsAsync(Ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -598,7 +598,7 @@ public virtual Response GetSecrets(CancellationToken c /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -636,7 +636,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTagCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTagCollection.cs index 3a9d31e1b8f93..0cd4c342dc585 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTagCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTagCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -117,7 +117,7 @@ public virtual async Task> CreateOrUpdate /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -169,7 +169,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task> GetAsync(string ta /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -259,7 +259,7 @@ public virtual Response Get(string tagId, Cancellation /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -293,7 +293,7 @@ public virtual AsyncPageable GetAllAsync(string filter /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -327,7 +327,7 @@ public virtual Pageable GetAll(string filter = null, i /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -370,7 +370,7 @@ public virtual async Task> ExistsAsync(string tagId, Cancellation /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -413,7 +413,7 @@ public virtual Response Exists(string tagId, CancellationToken cancellatio /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -458,7 +458,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTagResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTagResource.cs index e6c82bf2d1908..611e353b4e3cb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTagResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTagResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> UpdateAsync(ETag i /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual Response Update(ETag ifMatch, ApiManage /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual async Task> GetEntityStateAsync(CancellationToken /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingCollection.cs index 78c61b176b5b5..57492293ea221 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -106,7 +106,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -147,7 +147,7 @@ public virtual Response Get(SettingsType set /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -178,7 +178,7 @@ public virtual AsyncPageable GetAllAsync(str /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual Pageable GetAll(string filter /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -248,7 +248,7 @@ public virtual async Task> ExistsAsync(SettingsType settingsType, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -287,7 +287,7 @@ public virtual Response Exists(SettingsType settingsType, CancellationToke /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -328,7 +328,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingData.Serialization.cs index 30a181b3246ef..a14aa55ab631c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingData.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -173,6 +175,114 @@ internal static ApiManagementTenantSettingData DeserializeApiManagementTenantSet serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Settings), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" settings: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Settings)) + { + if (Settings.Any()) + { + builder.Append(" settings: "); + builder.AppendLine("{"); + foreach (var item in Settings) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + if (item.Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{item.Value}'''"); + } + else + { + builder.AppendLine($"'{item.Value}'"); + } + } + builder.AppendLine(" }"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -181,6 +291,8 @@ BinaryData IPersistableModel.Write(ModelReaderWr { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementTenantSettingData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingData.cs index 896d4e46692f0..61bc5bcc1533e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingData.cs @@ -70,6 +70,7 @@ internal ApiManagementTenantSettingData(ResourceIdentifier id, string name, Reso } /// Tenant settings. + [WirePath("properties.settings")] public IDictionary Settings { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingResource.cs index 53779e346be43..44a05f5db7565 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserCollection.cs index 291e5e3e480f8..60d1b487909f2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -118,7 +118,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -171,7 +171,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -216,7 +216,7 @@ public virtual async Task> GetAsync(string u /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -261,7 +261,7 @@ public virtual Response Get(string userId, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -295,7 +295,7 @@ public virtual AsyncPageable GetAllAsync(string filte /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -329,7 +329,7 @@ public virtual Pageable GetAll(string filter = null, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -372,7 +372,7 @@ public virtual async Task> ExistsAsync(string userId, Cancellatio /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -415,7 +415,7 @@ public virtual Response Exists(string userId, CancellationToken cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -460,7 +460,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserResource.cs index c45a1e2d8eb10..b77a6f9ba12d6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserResource.cs @@ -122,7 +122,7 @@ public virtual ApiManagementUserSubscriptionCollection GetApiManagementUserSubsc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -153,7 +153,7 @@ public virtual async Task> GetAp /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response GetApiManagementU /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -264,7 +264,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -360,7 +360,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, bool? dele /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual async Task> UpdateAsync(ETag /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -446,7 +446,7 @@ public virtual Response Update(ETag ifMatch, ApiManag /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -484,7 +484,7 @@ public virtual async Task> GenerateSsoUriAsync(Ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -522,7 +522,7 @@ public virtual Response GenerateSsoUri(CancellationToken c /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -564,7 +564,7 @@ public virtual async Task> GetSharedAccessTokenAsync(U /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -606,7 +606,7 @@ public virtual Response GetSharedAccessToken(UserTokenContent c /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -635,7 +635,7 @@ public virtual AsyncPageable GetUserGroupsAsync(stri /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -664,7 +664,7 @@ public virtual Pageable GetUserGroups(string filter /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -690,7 +690,7 @@ public virtual AsyncPageable GetUserIdentitiesAsync(Cancel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -716,7 +716,7 @@ public virtual Pageable GetUserIdentities(CancellationToke /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -751,7 +751,7 @@ public virtual async Task SendUserConfirmationPasswordAsync(AppType? a /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -786,7 +786,7 @@ public virtual Response SendUserConfirmationPassword(AppType? appType = null, Ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -824,7 +824,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserSubscriptionCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserSubscriptionCollection.cs index 09d6ab8ab00b5..c4a9a8a043926 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserSubscriptionCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserSubscriptionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string sid, C /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -187,7 +187,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -220,7 +220,7 @@ public virtual Pageable GetAll(string fil /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -263,7 +263,7 @@ public virtual async Task> ExistsAsync(string sid, CancellationTo /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -306,7 +306,7 @@ public virtual Response Exists(string sid, CancellationToken cancellationT /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserSubscriptionResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserSubscriptionResource.cs index 0f711aa2cad61..8be2a98bcee2b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserSubscriptionResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserSubscriptionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationCollection.cs index a8abaa8243a5e..495ddf99c1a8e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAsyn /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitU /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(string operat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string operationId, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -292,7 +292,7 @@ public virtual AsyncPageable GetAllAsync(string filter = n /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -326,7 +326,7 @@ public virtual Pageable GetAll(string filter = null, int? /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -369,7 +369,7 @@ public virtual async Task> ExistsAsync(string operationId, Cancel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -412,7 +412,7 @@ public virtual Response Exists(string operationId, CancellationToken cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -457,7 +457,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationData.Serialization.cs index cf952700a92b3..c175723a82735 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationData.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -275,6 +277,253 @@ internal static ApiOperationData DeserializeApiOperationData(JsonElement element serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TemplateParameters), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" templateParameters: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(TemplateParameters)) + { + if (TemplateParameters.Any()) + { + builder.Append(" templateParameters: "); + builder.AppendLine("["); + foreach (var item in TemplateParameters) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " templateParameters: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Request), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" request: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Request)) + { + builder.Append(" request: "); + BicepSerializationHelpers.AppendChildObject(builder, Request, options, 4, false, " request: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Responses), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" responses: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Responses)) + { + if (Responses.Any()) + { + builder.Append(" responses: "); + builder.AppendLine("["); + foreach (var item in Responses) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " responses: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Policies), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" policies: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Policies)) + { + builder.Append(" policies: "); + if (Policies.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Policies}'''"); + } + else + { + builder.AppendLine($"'{Policies}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DisplayName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" displayName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DisplayName)) + { + builder.Append(" displayName: "); + if (DisplayName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DisplayName}'''"); + } + else + { + builder.AppendLine($"'{DisplayName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Method), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" method: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Method)) + { + builder.Append(" method: "); + if (Method.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Method}'''"); + } + else + { + builder.AppendLine($"'{Method}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UriTemplate), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" urlTemplate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UriTemplate)) + { + builder.Append(" urlTemplate: "); + if (UriTemplate.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{UriTemplate}'''"); + } + else + { + builder.AppendLine($"'{UriTemplate}'"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -283,6 +532,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions op { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiOperationData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationData.cs index 6b06a12f3b47d..2e1ae079e135a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationData.cs @@ -86,20 +86,28 @@ internal ApiOperationData(ResourceIdentifier id, string name, ResourceType resou } /// Collection of URL template parameters. + [WirePath("properties.templateParameters")] public IList TemplateParameters { get; } /// Description of the operation. May include HTML formatting tags. + [WirePath("properties.description")] public string Description { get; set; } /// An entity containing request details. + [WirePath("properties.request")] public RequestContract Request { get; set; } /// Array of Operation responses. + [WirePath("properties.responses")] public IList Responses { get; } /// Operation Policies. + [WirePath("properties.policies")] public string Policies { get; set; } /// Operation Name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. + [WirePath("properties.method")] public string Method { get; set; } /// Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}. + [WirePath("properties.urlTemplate")] public string UriTemplate { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationPolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationPolicyCollection.cs index e38f3742c6a4c..d1645c6395cb8 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationPolicyCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(PolicyN /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -249,7 +249,7 @@ public virtual Response Get(PolicyName policyId, Pol /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -278,7 +278,7 @@ public virtual AsyncPageable GetAllAsync(Cancellatio /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -307,7 +307,7 @@ public virtual Pageable GetAll(CancellationToken can /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -347,7 +347,7 @@ public virtual async Task> ExistsAsync(PolicyName policyId, Polic /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -387,7 +387,7 @@ public virtual Response Exists(PolicyName policyId, PolicyExportFormat? fo /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -429,7 +429,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationPolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationPolicyResource.cs index b5adcbffa2d4c..01cb4a0818526 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationPolicyResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationPolicyResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -145,7 +145,7 @@ public virtual async Task> GetAsync(PolicyE /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -186,7 +186,7 @@ public virtual Response Get(PolicyExportFormat? form /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -231,7 +231,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -276,7 +276,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -325,7 +325,7 @@ public virtual async Task> UpdateAsync( /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -374,7 +374,7 @@ public virtual ArmOperation Update(WaitUntil waitUnt /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -412,7 +412,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationResource.cs index b7d4fdc7d1ed8..960279dd7f0d8 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationResource.cs @@ -110,7 +110,7 @@ public virtual ApiOperationPolicyCollection GetApiOperationPolicies() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetApiOperationP /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -177,7 +177,7 @@ public virtual ApiOperationTagCollection GetApiOperationTags() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetApiOperationTagA /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -239,7 +239,7 @@ public virtual Response GetApiOperationTag(string tagId /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -279,7 +279,7 @@ public virtual async Task> GetAsync(CancellationT /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual Response Get(CancellationToken cancellation /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -409,7 +409,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -452,7 +452,7 @@ public virtual async Task> UpdateAsync(ETag ifMat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -495,7 +495,7 @@ public virtual Response Update(ETag ifMatch, ApiOperationP /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -533,7 +533,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationTagCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationTagCollection.cs index 6cde8743d10ec..e0a7313fd5d22 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationTagCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationTagCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string tag /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string tagId, CancellationT /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(string filter /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual Pageable GetAll(string filter = null, in /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> ExistsAsync(string tagId, Cancellation /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -404,7 +404,7 @@ public virtual Response Exists(string tagId, CancellationToken cancellatio /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationTagResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationTagResource.cs index cd23c96cbd26c..70f8d4f624e50 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationTagResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationTagResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> UpdateAsync(Wai /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -397,7 +397,7 @@ public virtual async Task> GetEntityStateByOperationAsync(Cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiPolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiPolicyCollection.cs index 450361d4e2e67..08372caec3855 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiPolicyCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdateAsync(W /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnti /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(PolicyName polic /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -249,7 +249,7 @@ public virtual Response Get(PolicyName policyId, PolicyExport /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -278,7 +278,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -307,7 +307,7 @@ public virtual Pageable GetAll(CancellationToken cancellation /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -347,7 +347,7 @@ public virtual async Task> ExistsAsync(PolicyName policyId, Polic /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -387,7 +387,7 @@ public virtual Response Exists(PolicyName policyId, PolicyExportFormat? fo /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -429,7 +429,7 @@ public virtual async Task> GetIfExistsAsync( /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiPolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiPolicyResource.cs index c4b5a6daaeb53..4a65fd9be187f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiPolicyResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiPolicyResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(PolicyExportForm /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -185,7 +185,7 @@ public virtual Response Get(PolicyExportFormat? format = null /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -230,7 +230,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -275,7 +275,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual async Task> UpdateAsync(WaitUntil /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -373,7 +373,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Polic /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -411,7 +411,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseCollection.cs index 4de4c0f9cf713..49883c2adcee9 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAsync( /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnt /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(string releaseI /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string releaseId, CancellationTo /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(string filter = nul /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string filter = null, int? to /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string releaseId, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string releaseId, CancellationToken cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> GetIfExistsAsync /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseData.Serialization.cs index b9d2d558063e0..16b166c096ae1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -206,6 +207,147 @@ internal static ApiReleaseData DeserializeApiReleaseData(JsonElement element, Mo serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiId)) + { + builder.Append(" apiId: "); + builder.AppendLine($"'{ApiId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CreatedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" createdDateTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CreatedOn)) + { + builder.Append(" createdDateTime: "); + var formattedDateTimeString = TypeFormatters.ToString(CreatedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UpdatedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" updatedDateTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UpdatedOn)) + { + builder.Append(" updatedDateTime: "); + var formattedDateTimeString = TypeFormatters.ToString(UpdatedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Notes), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" notes: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Notes)) + { + builder.Append(" notes: "); + if (Notes.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Notes}'''"); + } + else + { + builder.AppendLine($"'{Notes}'"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -214,6 +356,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiReleaseData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseData.cs index 0d516688781a4..1cbde28dfe46f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseData.cs @@ -75,12 +75,16 @@ internal ApiReleaseData(ResourceIdentifier id, string name, ResourceType resourc } /// Identifier of the API the release belongs to. + [WirePath("properties.apiId")] public ResourceIdentifier ApiId { get; set; } /// The time the API was released. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. + [WirePath("properties.createdDateTime")] public DateTimeOffset? CreatedOn { get; } /// The time the API release was updated. + [WirePath("properties.updatedDateTime")] public DateTimeOffset? UpdatedOn { get; } /// Release Notes. + [WirePath("properties.notes")] public string Notes { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseResource.cs index 236a2753dfd87..456ba44019969 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(CancellationTok /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> UpdateAsync(ETag ifMatch /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual Response Update(ETag ifMatch, ApiReleaseData /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiResource.cs index e1b065a37034a..e94d8a033acc0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiResource.cs @@ -122,7 +122,7 @@ public virtual ApiReleaseCollection GetApiReleases() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -153,7 +153,7 @@ public virtual async Task> GetApiReleaseAsync(strin /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -191,7 +191,7 @@ public virtual ApiOperationCollection GetApiOperations() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -222,7 +222,7 @@ public virtual async Task> GetApiOperationAsync(s /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -260,7 +260,7 @@ public virtual ApiPolicyCollection GetApiPolicies() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -290,7 +290,7 @@ public virtual async Task> GetApiPolicyAsync(PolicyN /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -327,7 +327,7 @@ public virtual ApiTagCollection GetApiTags() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual async Task> GetApiTagAsync(string tagId, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -376,6 +376,75 @@ public virtual Response GetApiTag(string tagId, CancellationToke return GetApiTags().Get(tagId, cancellationToken); } + /// Gets a collection of ResolverContractResources in the Api. + /// An object representing collection of ResolverContractResources and their operations over a ResolverContractResource. + public virtual ResolverContractCollection GetResolverContracts() + { + return GetCachedClient(client => new ResolverContractCollection(client, Id)); + } + + /// + /// Gets the details of the GraphQL API Resolver specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetResolverContractAsync(string resolverId, CancellationToken cancellationToken = default) + { + return await GetResolverContracts().GetAsync(resolverId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the GraphQL API Resolver specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetResolverContract(string resolverId, CancellationToken cancellationToken = default) + { + return GetResolverContracts().Get(resolverId, cancellationToken); + } + /// Gets a collection of ApiSchemaResources in the Api. /// An object representing collection of ApiSchemaResources and their operations over a ApiSchemaResource. public virtual ApiSchemaCollection GetApiSchemas() @@ -396,7 +465,7 @@ public virtual ApiSchemaCollection GetApiSchemas() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -427,7 +496,7 @@ public virtual async Task> GetApiSchemaAsync(string /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -465,7 +534,7 @@ public virtual ApiDiagnosticCollection GetApiDiagnostics() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -496,7 +565,7 @@ public virtual async Task> GetApiDiagnosticAsync /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -534,7 +603,7 @@ public virtual ApiIssueCollection GetApiIssues() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -566,7 +635,7 @@ public virtual async Task> GetApiIssueAsync(string is /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -605,7 +674,7 @@ public virtual ApiTagDescriptionCollection GetApiTagDescriptions() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -636,7 +705,7 @@ public virtual async Task> GetApiTagDescript /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -654,6 +723,13 @@ public virtual Response GetApiTagDescription(string t return GetApiTagDescriptions().Get(tagDescriptionId, cancellationToken); } + /// Gets an object representing a ServiceApiWikiResource along with the instance operations that can be performed on it in the Api. + /// Returns a object. + public virtual ServiceApiWikiResource GetServiceApiWiki() + { + return new ServiceApiWikiResource(Client, Id.AppendChildResource("wikis", "default")); + } + /// /// Gets the details of the API specified by its identifier. /// @@ -667,7 +743,7 @@ public virtual Response GetApiTagDescription(string t /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -707,7 +783,7 @@ public virtual async Task> GetAsync(CancellationToken canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -747,7 +823,7 @@ public virtual Response Get(CancellationToken cancellationToken = d /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -793,7 +869,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -839,7 +915,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, bool? dele /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -882,7 +958,7 @@ public virtual async Task> UpdateAsync(ETag ifMatch, ApiPa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -925,7 +1001,7 @@ public virtual Response Update(ETag ifMatch, ApiPatch patch, Cancel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -954,7 +1030,7 @@ public virtual AsyncPageable GetApiRevisionsByServiceAsync( /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -983,7 +1059,7 @@ public virtual Pageable GetApiRevisionsByService(string fil /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -1012,7 +1088,7 @@ public virtual AsyncPageable GetApiProductsAsync(s /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -1041,7 +1117,7 @@ public virtual Pageable GetApiProducts(string filt /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -1071,7 +1147,7 @@ public virtual AsyncPageable GetOperationsByTagsAsyn /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -1101,7 +1177,7 @@ public virtual Pageable GetOperationsByTags(string f /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1139,7 +1215,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaCollection.cs index 662e3c4cbc035..3a6befff828b2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync(W /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -164,7 +164,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnti /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string schemaId, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -254,7 +254,7 @@ public virtual Response Get(string schemaId, CancellationToke /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(string filter = null /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(string filter = null, int? top /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string schemaId, Cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string schemaId, CancellationToken cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> GetIfExistsAsync( /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaData.Serialization.cs index 2801e81446dea..d93f5cfaf2cc4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -231,6 +232,156 @@ internal static ApiSchemaData DeserializeApiSchemaData(JsonElement element, Mode serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ContentType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" contentType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ContentType)) + { + builder.Append(" contentType: "); + if (ContentType.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ContentType}'''"); + } + else + { + builder.AppendLine($"'{ContentType}'"); + } + } + } + + builder.Append(" document:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + if (Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Value}'''"); + } + else + { + builder.AppendLine($"'{Value}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Definitions), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" definitions: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Definitions)) + { + builder.Append(" definitions: "); + builder.AppendLine($"'{Definitions.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Components), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" components: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Components)) + { + builder.Append(" components: "); + builder.AppendLine($"'{Components.ToString()}'"); + } + } + + builder.AppendLine(" }"); + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -239,6 +390,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions optio { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiSchemaData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaData.cs index 99699f9833cf8..d72454e2509ca 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaData.cs @@ -75,8 +75,10 @@ internal ApiSchemaData(ResourceIdentifier id, string name, ResourceType resource } /// Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema document (e.g. application/json, application/xml). </br> - `Swagger` Schema use `application/vnd.ms-azure-apim.swagger.definitions+json` </br> - `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml` </br> - `OpenApi` Schema use `application/vnd.oai.openapi.components+json` </br> - `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml`. + [WirePath("properties.contentType")] public string ContentType { get; set; } /// Json escaped string defining the document representing the Schema. Used for schemas other than Swagger/OpenAPI. + [WirePath("properties.value")] public string Value { get; set; } /// /// Types definitions. Used for Swagger/OpenAPI v1 schemas only, null otherwise. @@ -108,6 +110,7 @@ internal ApiSchemaData(ResourceIdentifier id, string name, ResourceType resource /// /// /// + [WirePath("properties.definitions")] public BinaryData Definitions { get; set; } /// /// Types definitions. Used for Swagger/OpenAPI v2/v3 schemas only, null otherwise. @@ -139,6 +142,7 @@ internal ApiSchemaData(ResourceIdentifier id, string name, ResourceType resource /// /// /// + [WirePath("properties.components")] public BinaryData Components { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaResource.cs index c45ef60a4eafd..79f0dea70d113 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(CancellationToke /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancellationTok /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -274,7 +274,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, bool? forc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual async Task> UpdateAsync(WaitUntil /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -368,7 +368,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, ApiSc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagCollection.cs index aac045d81e85c..82285fd94f58f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsync(Wait /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string tagId, Cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string tagId, CancellationToken canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(string filter = null, i /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual Pageable GetAll(string filter = null, int? top = /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> ExistsAsync(string tagId, Cancellation /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -404,7 +404,7 @@ public virtual Response Exists(string tagId, CancellationToken cancellatio /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExistsAsync(str /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionCollection.cs index a1b0c07a4ead5..3bc5b16b7c4c4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -117,7 +117,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -169,7 +169,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task> GetAsync(string t /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -259,7 +259,7 @@ public virtual Response Get(string tagDescriptionId, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -292,7 +292,7 @@ public virtual AsyncPageable GetAllAsync(string filte /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -325,7 +325,7 @@ public virtual Pageable GetAll(string filter = null, /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -368,7 +368,7 @@ public virtual async Task> ExistsAsync(string tagDescriptionId, C /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -411,7 +411,7 @@ public virtual Response Exists(string tagDescriptionId, CancellationToken /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -456,7 +456,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionData.Serialization.cs index c74cb7eeaa243..896051d60ec2a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -210,6 +211,184 @@ internal static ApiTagDescriptionData DeserializeApiTagDescriptionData(JsonEleme serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExternalDocsUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" externalDocsUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ExternalDocsUri)) + { + builder.Append(" externalDocsUrl: "); + builder.AppendLine($"'{ExternalDocsUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExternalDocsDescription), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" externalDocsDescription: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ExternalDocsDescription)) + { + builder.Append(" externalDocsDescription: "); + if (ExternalDocsDescription.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ExternalDocsDescription}'''"); + } + else + { + builder.AppendLine($"'{ExternalDocsDescription}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TagId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tagId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TagId)) + { + builder.Append(" tagId: "); + if (TagId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TagId}'''"); + } + else + { + builder.AppendLine($"'{TagId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DisplayName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" displayName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DisplayName)) + { + builder.Append(" displayName: "); + if (DisplayName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DisplayName}'''"); + } + else + { + builder.AppendLine($"'{DisplayName}'"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -218,6 +397,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiTagDescriptionData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionData.cs index d233f3d7d546b..2eb3537dbc568 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionData.cs @@ -77,14 +77,19 @@ internal ApiTagDescriptionData(ResourceIdentifier id, string name, ResourceType } /// Description of the Tag. + [WirePath("properties.description")] public string Description { get; set; } /// Absolute URL of external resources describing the tag. + [WirePath("properties.externalDocsUrl")] public Uri ExternalDocsUri { get; set; } /// Description of the external resources describing the tag. + [WirePath("properties.externalDocsDescription")] public string ExternalDocsDescription { get; set; } /// Identifier of the tag in the form of /tags/{tagId}. + [WirePath("properties.tagId")] public string TagId { get; set; } /// Tag name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionResource.cs index 36b71742ac943..e7f70792ee244 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -273,7 +273,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -322,7 +322,7 @@ public virtual async Task> UpdateAsync(W /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -371,7 +371,7 @@ public virtual ArmOperation Update(WaitUntil waitUnti /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -409,7 +409,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagResource.cs index 21abb56359dc0..2dd94f6fdafaa 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(CancellationToken c /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancellationToken /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual async Task> UpdateAsync(WaitUntil wa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual async Task> GetEntityStateByApiAsync(CancellationT /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetCollection.cs index 0ab17409e940a..1c5dbe0cfa8a5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(string versi /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string versionSetId, Cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(string filter = /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string filter = null, int? /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string versionSetId, Cance /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string versionSetId, CancellationToken canc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetData.Serialization.cs index 6df06118c358a..ba9ea48880f49 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -211,6 +212,184 @@ internal static ApiVersionSetData DeserializeApiVersionSetData(JsonElement eleme serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VersionQueryName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" versionQueryName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(VersionQueryName)) + { + builder.Append(" versionQueryName: "); + if (VersionQueryName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{VersionQueryName}'''"); + } + else + { + builder.AppendLine($"'{VersionQueryName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VersionHeaderName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" versionHeaderName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(VersionHeaderName)) + { + builder.Append(" versionHeaderName: "); + if (VersionHeaderName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{VersionHeaderName}'''"); + } + else + { + builder.AppendLine($"'{VersionHeaderName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DisplayName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" displayName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DisplayName)) + { + builder.Append(" displayName: "); + if (DisplayName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DisplayName}'''"); + } + else + { + builder.AppendLine($"'{DisplayName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VersioningScheme), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" versioningScheme: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(VersioningScheme)) + { + builder.Append(" versioningScheme: "); + builder.AppendLine($"'{VersioningScheme.Value.ToString()}'"); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -219,6 +398,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions o { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiVersionSetData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetData.cs index 24576d57922cd..a2d624b30f715 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetData.cs @@ -78,14 +78,19 @@ internal ApiVersionSetData(ResourceIdentifier id, string name, ResourceType reso } /// Description of API Version Set. + [WirePath("properties.description")] public string Description { get; set; } /// Name of query parameter that indicates the API Version if versioningScheme is set to `query`. + [WirePath("properties.versionQueryName")] public string VersionQueryName { get; set; } /// Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`. + [WirePath("properties.versionHeaderName")] public string VersionHeaderName { get; set; } /// Name of API Version Set. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// An value that determines where the API Version identifier will be located in a HTTP request. + [WirePath("properties.versioningScheme")] public VersioningScheme? VersioningScheme { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetResource.cs index 2c0a3862330d6..b7c49f99abd6c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> UpdateAsync(ETag ifMa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual Response Update(ETag ifMatch, ApiVersionSe /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ArmApiManagementModelFactory.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ArmApiManagementModelFactory.cs index 9e94cd377d887..91b1807d48cae 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ArmApiManagementModelFactory.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ArmApiManagementModelFactory.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using System.Net; using Azure.Core; @@ -147,8 +148,9 @@ public static ApiEntityBaseContract ApiEntityBaseContract(string description = n /// * `websocket` creates websocket API /// * `graphql` creates GraphQL API. /// + /// Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', 'query'. /// A new instance for mocking. - public static ApiCreateOrUpdateContent ApiCreateOrUpdateContent(string description = null, AuthenticationSettingsContract authenticationSettings = null, SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, ApiType? apiType = null, string apiRevision = null, string apiVersion = null, bool? isCurrent = null, bool? isOnline = null, string apiRevisionDescription = null, string apiVersionDescription = null, ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = null, string termsOfServiceLink = null, ApiContactInformation contact = null, ApiLicenseInformation license = null, ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, IEnumerable protocols = null, ApiVersionSetContractDetails apiVersionSet = null, string value = null, ContentFormat? format = null, ApiCreateOrUpdatePropertiesWsdlSelector wsdlSelector = null, SoapApiType? soapApiType = null) + public static ApiCreateOrUpdateContent ApiCreateOrUpdateContent(string description = null, AuthenticationSettingsContract authenticationSettings = null, SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, ApiType? apiType = null, string apiRevision = null, string apiVersion = null, bool? isCurrent = null, bool? isOnline = null, string apiRevisionDescription = null, string apiVersionDescription = null, ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = null, string termsOfServiceLink = null, ApiContactInformation contact = null, ApiLicenseInformation license = null, ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, IEnumerable protocols = null, ApiVersionSetContractDetails apiVersionSet = null, string value = null, ContentFormat? format = null, ApiCreateOrUpdatePropertiesWsdlSelector wsdlSelector = null, SoapApiType? soapApiType = null, TranslateRequiredQueryParametersConduct? translateRequiredQueryParametersConduct = null) { protocols ??= new List(); @@ -178,6 +180,7 @@ public static ApiCreateOrUpdateContent ApiCreateOrUpdateContent(string descripti format, wsdlSelector, soapApiType, + translateRequiredQueryParametersConduct, serializedAdditionalRawData: null); } @@ -350,6 +353,28 @@ public static TagContractData TagContractData(ResourceIdentifier id = null, stri serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Resolver Name. + /// Path is type/field being resolved. + /// Description of the resolver. May include HTML formatting tags. + /// A new instance for mocking. + public static ResolverContractData ResolverContractData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, string path = null, string description = null) + { + return new ResolverContractData( + id, + name, + resourceType, + systemData, + displayName, + path, + description, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -676,6 +701,26 @@ public static AssociatedProductProperties AssociatedProductProperties(string des name); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Collection wiki documents included into this wiki. + /// A new instance for mocking. + public static WikiContractData WikiContractData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable documents = null) + { + documents ??= new List(); + + return new WikiContractData( + id, + name, + resourceType, + systemData, + documents?.ToList(), + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -718,13 +763,15 @@ public static ApiVersionSetData ApiVersionSetData(ResourceIdentifier id = null, /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. /// User-friendly authorization server name. + /// If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. + /// If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. /// Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. /// OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. /// Form of an authorization grant, which the client uses to request the access token. /// Client or app id registered with this authorization server. /// Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. /// A new instance for mocking. - public static ApiManagementAuthorizationServerData ApiManagementAuthorizationServerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string description = null, IEnumerable authorizationMethods = null, IEnumerable clientAuthenticationMethods = null, IEnumerable tokenBodyParameters = null, string tokenEndpoint = null, bool? doesSupportState = null, string defaultScope = null, IEnumerable bearerTokenSendingMethods = null, string resourceOwnerUsername = null, string resourceOwnerPassword = null, string displayName = null, string clientRegistrationEndpoint = null, string authorizationEndpoint = null, IEnumerable grantTypes = null, string clientId = null, string clientSecret = null) + public static ApiManagementAuthorizationServerData ApiManagementAuthorizationServerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string description = null, IEnumerable authorizationMethods = null, IEnumerable clientAuthenticationMethods = null, IEnumerable tokenBodyParameters = null, string tokenEndpoint = null, bool? doesSupportState = null, string defaultScope = null, IEnumerable bearerTokenSendingMethods = null, string resourceOwnerUsername = null, string resourceOwnerPassword = null, string displayName = null, bool? useInTestConsole = null, bool? useInApiDocumentation = null, string clientRegistrationEndpoint = null, string authorizationEndpoint = null, IEnumerable grantTypes = null, string clientId = null, string clientSecret = null) { authorizationMethods ??= new List(); clientAuthenticationMethods ??= new List(); @@ -748,6 +795,8 @@ public static ApiManagementAuthorizationServerData ApiManagementAuthorizationSer resourceOwnerUsername, resourceOwnerPassword, displayName, + useInTestConsole, + useInApiDocumentation, clientRegistrationEndpoint, authorizationEndpoint, grantTypes?.ToList(), @@ -772,13 +821,15 @@ public static ApiManagementAuthorizationServerData ApiManagementAuthorizationSer /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. /// User-friendly authorization server name. + /// If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. + /// If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. /// Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. /// OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. /// Form of an authorization grant, which the client uses to request the access token. /// Client or app id registered with this authorization server. /// Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. /// A new instance for mocking. - public static ApiManagementAuthorizationServerPatch ApiManagementAuthorizationServerPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string description = null, IEnumerable authorizationMethods = null, IEnumerable clientAuthenticationMethods = null, IEnumerable tokenBodyParameters = null, string tokenEndpoint = null, bool? doesSupportState = null, string defaultScope = null, IEnumerable bearerTokenSendingMethods = null, string resourceOwnerUsername = null, string resourceOwnerPassword = null, string displayName = null, string clientRegistrationEndpoint = null, string authorizationEndpoint = null, IEnumerable grantTypes = null, string clientId = null, string clientSecret = null) + public static ApiManagementAuthorizationServerPatch ApiManagementAuthorizationServerPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string description = null, IEnumerable authorizationMethods = null, IEnumerable clientAuthenticationMethods = null, IEnumerable tokenBodyParameters = null, string tokenEndpoint = null, bool? doesSupportState = null, string defaultScope = null, IEnumerable bearerTokenSendingMethods = null, string resourceOwnerUsername = null, string resourceOwnerPassword = null, string displayName = null, bool? useInTestConsole = null, bool? useInApiDocumentation = null, string clientRegistrationEndpoint = null, string authorizationEndpoint = null, IEnumerable grantTypes = null, string clientId = null, string clientSecret = null) { authorizationMethods ??= new List(); clientAuthenticationMethods ??= new List(); @@ -802,6 +853,8 @@ public static ApiManagementAuthorizationServerPatch ApiManagementAuthorizationSe resourceOwnerUsername, resourceOwnerPassword, displayName, + useInTestConsole, + useInApiDocumentation, clientRegistrationEndpoint, authorizationEndpoint, grantTypes?.ToList(), @@ -820,6 +873,84 @@ public static AuthorizationServerSecretsContract AuthorizationServerSecretsContr return new AuthorizationServerSecretsContract(clientSecret, resourceOwnerUsername, resourceOwnerPassword, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Authorization Provider name. Must be 1 to 300 characters long. + /// Identity provider name. Must be 1 to 300 characters long. + /// OAuth2 settings. + /// A new instance for mocking. + public static AuthorizationProviderContractData AuthorizationProviderContractData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, string identityProvider = null, AuthorizationProviderOAuth2Settings oauth2 = null) + { + return new AuthorizationProviderContractData( + id, + name, + resourceType, + systemData, + displayName, + identityProvider, + oauth2, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Authorization type options. + /// OAuth2 grant type options. + /// Authorization parameters. + /// Authorization error details. + /// Status of the Authorization. + /// A new instance for mocking. + public static AuthorizationContractData AuthorizationContractData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ApiManagementAuthorizationType? authorizationType = null, OAuth2GrantType? oAuth2GrantType = null, IDictionary parameters = null, ApiManagementAuthorizationError error = null, string status = null) + { + parameters ??= new Dictionary(); + + return new AuthorizationContractData( + id, + name, + resourceType, + systemData, + authorizationType, + oAuth2GrantType, + parameters, + error, + status, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The login link. + /// A new instance for mocking. + public static AuthorizationLoginResult AuthorizationLoginResult(string loginLink = null) + { + return new AuthorizationLoginResult(loginLink, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The Tenant Id. + /// The Object Id. + /// A new instance for mocking. + public static AuthorizationAccessPolicyContractData AuthorizationAccessPolicyContractData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, Guid? tenantId = null, string objectId = null) + { + return new AuthorizationAccessPolicyContractData( + id, + name, + resourceType, + systemData, + tenantId, + objectId, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -827,10 +958,10 @@ public static AuthorizationServerSecretsContract AuthorizationServerSecretsContr /// The systemData. /// Backend Title. /// Backend Description. - /// Management Uri of the Resource in External System. This url can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. + /// Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. /// Backend Properties contract. /// Backend Credentials Contract Properties. - /// Backend Proxy Contract Properties. + /// Backend gateway Contract Properties. /// Backend TLS Properties. /// Runtime Url of the Backend. /// Backend communication protocol. @@ -1103,9 +1234,11 @@ public static ApiManagementServiceBackupRestoreContent ApiManagementServiceBacku /// Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. /// Virtual network configuration of the API Management service. /// Additional datacenter locations of the API Management service. - /// Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1st 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of next ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them. Note: next ciphers can't be disabled since they are required by Azure CloudService internal components: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384. + /// Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1, 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of the following ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them.</br> Note: The following ciphers can't be disabled since they are required by internal platform components: TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. /// List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. /// Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. + /// Property can be used to enable NAT Gateway for this API Management service. + /// Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. /// Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. /// The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. /// Control Plane Apis version constraint for the API Management service. @@ -1115,7 +1248,7 @@ public static ApiManagementServiceBackupRestoreContent ApiManagementServiceBacku /// Publisher email. /// Publisher name. /// A new instance for mocking. - public static ApiManagementServiceData ApiManagementServiceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ApiManagementServiceSkuProperties sku = null, ManagedServiceIdentity identity = null, ETag? etag = null, IEnumerable zones = null, string notificationSenderEmail = null, string provisioningState = null, string targetProvisioningState = null, DateTimeOffset? createdAtUtc = null, Uri gatewayUri = null, Uri gatewayRegionalUri = null, Uri portalUri = null, Uri managementApiUri = null, Uri scmUri = null, Uri developerPortalUri = null, IEnumerable hostnameConfigurations = null, IEnumerable publicIPAddresses = null, IEnumerable privateIPAddresses = null, ResourceIdentifier publicIPAddressId = null, PublicNetworkAccess? publicNetworkAccess = null, VirtualNetworkConfiguration virtualNetworkConfiguration = null, IEnumerable additionalLocations = null, IDictionary customProperties = null, IEnumerable certificates = null, bool? enableClientCertificate = null, bool? disableGateway = null, VirtualNetworkType? virtualNetworkType = null, string minApiVersion = null, bool? restore = null, IEnumerable privateEndpointConnections = null, PlatformVersion? platformVersion = null, string publisherEmail = null, string publisherName = null) + public static ApiManagementServiceData ApiManagementServiceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ApiManagementServiceSkuProperties sku = null, ManagedServiceIdentity identity = null, ETag? etag = null, IEnumerable zones = null, string notificationSenderEmail = null, string provisioningState = null, string targetProvisioningState = null, DateTimeOffset? createdAtUtc = null, Uri gatewayUri = null, Uri gatewayRegionalUri = null, Uri portalUri = null, Uri managementApiUri = null, Uri scmUri = null, Uri developerPortalUri = null, IEnumerable hostnameConfigurations = null, IEnumerable publicIPAddresses = null, IEnumerable privateIPAddresses = null, ResourceIdentifier publicIPAddressId = null, PublicNetworkAccess? publicNetworkAccess = null, VirtualNetworkConfiguration virtualNetworkConfiguration = null, IEnumerable additionalLocations = null, IDictionary customProperties = null, IEnumerable certificates = null, bool? enableClientCertificate = null, ApiManagementNatGatewayState? natGatewayState = null, IEnumerable outboundPublicIPAddresses = null, bool? disableGateway = null, VirtualNetworkType? virtualNetworkType = null, string minApiVersion = null, bool? restore = null, IEnumerable privateEndpointConnections = null, PlatformVersion? platformVersion = null, string publisherEmail = null, string publisherName = null) { tags ??= new Dictionary(); zones ??= new List(); @@ -1125,6 +1258,7 @@ public static ApiManagementServiceData ApiManagementServiceData(ResourceIdentifi additionalLocations ??= new List(); customProperties ??= new Dictionary(); certificates ??= new List(); + outboundPublicIPAddresses ??= new List(); privateEndpointConnections ??= new List(); return new ApiManagementServiceData( @@ -1158,6 +1292,8 @@ public static ApiManagementServiceData ApiManagementServiceData(ResourceIdentifi customProperties, certificates?.ToList(), enableClientCertificate, + natGatewayState, + outboundPublicIPAddresses?.ToList(), disableGateway, virtualNetworkType, minApiVersion != null ? new ApiVersionConstraint(minApiVersion, serializedAdditionalRawData: null) : null, @@ -1188,14 +1324,17 @@ public static VirtualNetworkConfiguration VirtualNetworkConfiguration(Guid? vnet /// Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the location. Supported only for Premium SKU being deployed in Virtual Network. /// Virtual network configuration for the location. /// Gateway URL of the API Management service in the Region. + /// Property can be used to enable NAT Gateway for this API Management service. + /// Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. /// Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in this additional location. /// Compute Platform Version running the service. /// A new instance for mocking. - public static AdditionalLocation AdditionalLocation(AzureLocation location = default, ApiManagementServiceSkuProperties sku = null, IEnumerable zones = null, IEnumerable publicIPAddresses = null, IEnumerable privateIPAddresses = null, ResourceIdentifier publicIPAddressId = null, VirtualNetworkConfiguration virtualNetworkConfiguration = null, Uri gatewayRegionalUri = null, bool? disableGateway = null, PlatformVersion? platformVersion = null) + public static AdditionalLocation AdditionalLocation(AzureLocation location = default, ApiManagementServiceSkuProperties sku = null, IEnumerable zones = null, IEnumerable publicIPAddresses = null, IEnumerable privateIPAddresses = null, ResourceIdentifier publicIPAddressId = null, VirtualNetworkConfiguration virtualNetworkConfiguration = null, Uri gatewayRegionalUri = null, ApiManagementNatGatewayState? natGatewayState = null, IEnumerable outboundPublicIPAddresses = null, bool? disableGateway = null, PlatformVersion? platformVersion = null) { zones ??= new List(); publicIPAddresses ??= new List(); privateIPAddresses ??= new List(); + outboundPublicIPAddresses ??= new List(); return new AdditionalLocation( location, @@ -1206,6 +1345,8 @@ public static AdditionalLocation AdditionalLocation(AzureLocation location = def publicIPAddressId, virtualNetworkConfiguration, gatewayRegionalUri, + natGatewayState, + outboundPublicIPAddresses?.ToList(), disableGateway, platformVersion, serializedAdditionalRawData: null); @@ -1261,9 +1402,11 @@ public static RemotePrivateEndpointConnectionWrapper RemotePrivateEndpointConnec /// Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. /// Virtual network configuration of the API Management service. /// Additional datacenter locations of the API Management service. - /// Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1st 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of next ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them. Note: next ciphers can't be disabled since they are required by Azure CloudService internal components: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384. + /// Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1, 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of the following ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them.</br> Note: The following ciphers can't be disabled since they are required by internal platform components: TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. /// List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. /// Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. + /// Property can be used to enable NAT Gateway for this API Management service. + /// Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. /// Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. /// The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. /// Control Plane Apis version constraint for the API Management service. @@ -1274,7 +1417,7 @@ public static RemotePrivateEndpointConnectionWrapper RemotePrivateEndpointConnec /// Publisher name. /// Resource tags. /// A new instance for mocking. - public static ApiManagementServicePatch ApiManagementServicePatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ApiManagementServiceSkuProperties sku = null, ManagedServiceIdentity identity = null, ETag? etag = null, IEnumerable zones = null, string notificationSenderEmail = null, string provisioningState = null, string targetProvisioningState = null, DateTimeOffset? createdAtUtc = null, Uri gatewayUri = null, Uri gatewayRegionalUri = null, Uri portalUri = null, Uri managementApiUri = null, Uri scmUri = null, Uri developerPortalUri = null, IEnumerable hostnameConfigurations = null, IEnumerable publicIPAddresses = null, IEnumerable privateIPAddresses = null, ResourceIdentifier publicIPAddressId = null, PublicNetworkAccess? publicNetworkAccess = null, VirtualNetworkConfiguration virtualNetworkConfiguration = null, IEnumerable additionalLocations = null, IDictionary customProperties = null, IEnumerable certificates = null, bool? enableClientCertificate = null, bool? disableGateway = null, VirtualNetworkType? virtualNetworkType = null, string minApiVersion = null, bool? restore = null, IEnumerable privateEndpointConnections = null, PlatformVersion? platformVersion = null, string publisherEmail = null, string publisherName = null, IDictionary tags = null) + public static ApiManagementServicePatch ApiManagementServicePatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ApiManagementServiceSkuProperties sku = null, ManagedServiceIdentity identity = null, ETag? etag = null, IEnumerable zones = null, string notificationSenderEmail = null, string provisioningState = null, string targetProvisioningState = null, DateTimeOffset? createdAtUtc = null, Uri gatewayUri = null, Uri gatewayRegionalUri = null, Uri portalUri = null, Uri managementApiUri = null, Uri scmUri = null, Uri developerPortalUri = null, IEnumerable hostnameConfigurations = null, IEnumerable publicIPAddresses = null, IEnumerable privateIPAddresses = null, ResourceIdentifier publicIPAddressId = null, PublicNetworkAccess? publicNetworkAccess = null, VirtualNetworkConfiguration virtualNetworkConfiguration = null, IEnumerable additionalLocations = null, IDictionary customProperties = null, IEnumerable certificates = null, bool? enableClientCertificate = null, ApiManagementNatGatewayState? natGatewayState = null, IEnumerable outboundPublicIPAddresses = null, bool? disableGateway = null, VirtualNetworkType? virtualNetworkType = null, string minApiVersion = null, bool? restore = null, IEnumerable privateEndpointConnections = null, PlatformVersion? platformVersion = null, string publisherEmail = null, string publisherName = null, IDictionary tags = null) { zones ??= new List(); hostnameConfigurations ??= new List(); @@ -1283,6 +1426,7 @@ public static ApiManagementServicePatch ApiManagementServicePatch(ResourceIdenti additionalLocations ??= new List(); customProperties ??= new Dictionary(); certificates ??= new List(); + outboundPublicIPAddresses ??= new List(); privateEndpointConnections ??= new List(); tags ??= new Dictionary(); @@ -1315,6 +1459,8 @@ public static ApiManagementServicePatch ApiManagementServicePatch(ResourceIdenti customProperties, certificates?.ToList(), enableClientCertificate, + natGatewayState, + outboundPublicIPAddresses?.ToList(), disableGateway, virtualNetworkType, minApiVersion != null ? new ApiVersionConstraint(minApiVersion, serializedAdditionalRawData: null) : null, @@ -1677,10 +1823,11 @@ public static UserContractData UserContractData(ResourceIdentifier id = null, st /// Signin Policy Name. Only applies to AAD B2C Identity Provider. /// Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. /// Password Reset Policy Name. Only applies to AAD B2C Identity Provider. + /// The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. /// Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. /// Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. /// A new instance for mocking. - public static ApiManagementIdentityProviderData ApiManagementIdentityProviderData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IdentityProviderType? identityProviderType = null, string signInTenant = null, IEnumerable allowedTenants = null, string authority = null, string signUpPolicyName = null, string signInPolicyName = null, string profileEditingPolicyName = null, string passwordResetPolicyName = null, string clientId = null, string clientSecret = null) + public static ApiManagementIdentityProviderData ApiManagementIdentityProviderData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IdentityProviderType? identityProviderType = null, string signInTenant = null, IEnumerable allowedTenants = null, string authority = null, string signUpPolicyName = null, string signInPolicyName = null, string profileEditingPolicyName = null, string passwordResetPolicyName = null, string clientLibrary = null, string clientId = null, string clientSecret = null) { allowedTenants ??= new List(); @@ -1697,6 +1844,7 @@ public static ApiManagementIdentityProviderData ApiManagementIdentityProviderDat signInPolicyName, profileEditingPolicyName, passwordResetPolicyName, + clientLibrary, clientId, clientSecret, serializedAdditionalRawData: null); @@ -1715,10 +1863,11 @@ public static ApiManagementIdentityProviderData ApiManagementIdentityProviderDat /// Signin Policy Name. Only applies to AAD B2C Identity Provider. /// Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. /// Password Reset Policy Name. Only applies to AAD B2C Identity Provider. + /// The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. /// Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. /// Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. /// A new instance for mocking. - public static ApiManagementIdentityProviderCreateOrUpdateContent ApiManagementIdentityProviderCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IdentityProviderType? identityProviderType = null, string signInTenant = null, IEnumerable allowedTenants = null, string authority = null, string signUpPolicyName = null, string signInPolicyName = null, string profileEditingPolicyName = null, string passwordResetPolicyName = null, string clientId = null, string clientSecret = null) + public static ApiManagementIdentityProviderCreateOrUpdateContent ApiManagementIdentityProviderCreateOrUpdateContent(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IdentityProviderType? identityProviderType = null, string signInTenant = null, IEnumerable allowedTenants = null, string authority = null, string signUpPolicyName = null, string signInPolicyName = null, string profileEditingPolicyName = null, string passwordResetPolicyName = null, string clientLibrary = null, string clientId = null, string clientSecret = null) { allowedTenants ??= new List(); @@ -1735,6 +1884,7 @@ public static ApiManagementIdentityProviderCreateOrUpdateContent ApiManagementId signInPolicyName, profileEditingPolicyName, passwordResetPolicyName, + clientLibrary, clientId, clientSecret, serializedAdditionalRawData: null); @@ -1960,8 +2110,10 @@ public static RecipientEmailContract RecipientEmailContract(ResourceIdentifier i /// Metadata endpoint URI. /// Client ID of developer console which is the client application. /// Client Secret of developer console which is the client application. + /// If true, the Open ID Connect provider may be used in the developer portal test console. True by default if no value is provided. + /// If true, the Open ID Connect provider will be used in the API documentation in the developer portal. False by default if no value is provided. /// A new instance for mocking. - public static ApiManagementOpenIdConnectProviderData ApiManagementOpenIdConnectProviderData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, string description = null, string metadataEndpoint = null, string clientId = null, string clientSecret = null) + public static ApiManagementOpenIdConnectProviderData ApiManagementOpenIdConnectProviderData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, string description = null, string metadataEndpoint = null, string clientId = null, string clientSecret = null, bool? useInTestConsole = null, bool? useInApiDocumentation = null) { return new ApiManagementOpenIdConnectProviderData( id, @@ -1973,6 +2125,8 @@ public static ApiManagementOpenIdConnectProviderData ApiManagementOpenIdConnectP metadataEndpoint, clientId, clientSecret, + useInTestConsole, + useInApiDocumentation, serializedAdditionalRawData: null); } @@ -2027,6 +2181,69 @@ public static PolicyDescriptionContractData PolicyDescriptionContractData(Resour serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Contents of the policy fragment. + /// Policy fragment description. + /// Format of the policy fragment content. + /// A new instance for mocking. + public static PolicyFragmentContractData PolicyFragmentContractData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string value = null, string description = null, PolicyFragmentContentFormat? format = null) + { + return new PolicyFragmentContractData( + id, + name, + resourceType, + systemData, + value, + description, + format, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// A new instance for mocking. + public static ResourceCollectionValueItem ResourceCollectionValueItem(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null) + { + return new ResourceCollectionValueItem(id, name, resourceType, systemData, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Enable or disable Basic authentication method. + /// + /// + /// The developer portal delegation settings. + /// The developer portal Cross-Origin Resource Sharing (CORS) settings. + /// The developer portal Content Security Policy (CSP) settings. + /// A new instance for mocking. + public static PortalConfigContractData PortalConfigContractData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, bool? enableBasicAuth = null, bool? require = null, PortalConfigTermsOfServiceProperties signupTermsOfService = null, PortalConfigDelegationProperties delegation = null, IEnumerable corsAllowedOrigins = null, PortalConfigCspProperties csp = null) + { + corsAllowedOrigins ??= new List(); + + return new PortalConfigContractData( + id, + name, + resourceType, + systemData, + enableBasicAuth, + require != null ? new PortalConfigPropertiesSignin(require, serializedAdditionalRawData: null) : null, + signupTermsOfService != null ? new PortalConfigPropertiesSignup(signupTermsOfService, serializedAdditionalRawData: null) : null, + delegation, + corsAllowedOrigins != null ? new PortalConfigCorsProperties(corsAllowedOrigins?.ToList(), serializedAdditionalRawData: null) : null, + csp, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -2404,7 +2621,7 @@ public static RegionContract RegionContract(string name = null, bool? isMasterRe /// Subscription identifier path. /subscriptions/{subscriptionId}. /// Number of successful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect. /// Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorized and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests. - /// Number of calls failed due to proxy or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and any Code between HttpStatusCode.InternalServerError (500) and 600. + /// Number of calls failed due to gateway or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and any Code between HttpStatusCode.InternalServerError (500) and 600. /// Number of other calls. /// Total number of calls. /// Bandwidth consumed. @@ -2808,5 +3025,251 @@ public static UserTokenResult UserTokenResult(string value = null) { return new UserTokenResult(value, serializedAdditionalRawData: null); } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// documentation title. + /// Markdown documentation content. + /// A new instance for mocking. + public static DocumentationContractData DocumentationContractData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string title = null, string content = null) + { + return new DocumentationContractData( + id, + name, + resourceType, + systemData, + title, + content, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of ApiManagementAuthorizationServerData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Description of the authorization server. Can contain HTML formatting tags. + /// HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. + /// Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format. + /// Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}. + /// OAuth token endpoint. Contains absolute URI to entity being referenced. + /// If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security. + /// Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values. + /// Specifies the mechanism by which access token is passed to the API. + /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. + /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. + /// User-friendly authorization server name. + /// Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. + /// OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. + /// Form of an authorization grant, which the client uses to request the access token. + /// Client or app id registered with this authorization server. + /// Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ApiManagementAuthorizationServerData ApiManagementAuthorizationServerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, IEnumerable authorizationMethods, IEnumerable clientAuthenticationMethods, IEnumerable tokenBodyParameters, string tokenEndpoint, bool? doesSupportState, string defaultScope, IEnumerable bearerTokenSendingMethods, string resourceOwnerUsername, string resourceOwnerPassword, string displayName, string clientRegistrationEndpoint, string authorizationEndpoint, IEnumerable grantTypes, string clientId, string clientSecret) + { + return ApiManagementAuthorizationServerData(id: id, name: name, resourceType: resourceType, systemData: systemData, description: description, authorizationMethods: authorizationMethods, clientAuthenticationMethods: clientAuthenticationMethods, tokenBodyParameters: tokenBodyParameters, tokenEndpoint: tokenEndpoint, doesSupportState: doesSupportState, defaultScope: defaultScope, bearerTokenSendingMethods: bearerTokenSendingMethods, resourceOwnerUsername: resourceOwnerUsername, resourceOwnerPassword: resourceOwnerPassword, displayName: displayName, useInTestConsole: default, useInApiDocumentation: default, clientRegistrationEndpoint: clientRegistrationEndpoint, authorizationEndpoint: authorizationEndpoint, grantTypes: grantTypes, clientId: clientId, clientSecret: clientSecret); + } + + /// Initializes a new instance of ApiManagementAuthorizationServerPatch. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Description of the authorization server. Can contain HTML formatting tags. + /// HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. + /// Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format. + /// Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}. + /// OAuth token endpoint. Contains absolute URI to entity being referenced. + /// If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security. + /// Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values. + /// Specifies the mechanism by which access token is passed to the API. + /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. + /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. + /// User-friendly authorization server name. + /// Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. + /// OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. + /// Form of an authorization grant, which the client uses to request the access token. + /// Client or app id registered with this authorization server. + /// Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ApiManagementAuthorizationServerPatch ApiManagementAuthorizationServerPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, IEnumerable authorizationMethods, IEnumerable clientAuthenticationMethods, IEnumerable tokenBodyParameters, string tokenEndpoint, bool? doesSupportState, string defaultScope, IEnumerable bearerTokenSendingMethods, string resourceOwnerUsername, string resourceOwnerPassword, string displayName, string clientRegistrationEndpoint, string authorizationEndpoint, IEnumerable grantTypes, string clientId, string clientSecret) + { + return ApiManagementAuthorizationServerPatch(id: id, name: name, resourceType: resourceType, systemData: systemData, description: description, authorizationMethods: authorizationMethods, clientAuthenticationMethods: clientAuthenticationMethods, tokenBodyParameters: tokenBodyParameters, tokenEndpoint: tokenEndpoint, doesSupportState: doesSupportState, defaultScope: defaultScope, bearerTokenSendingMethods: bearerTokenSendingMethods, resourceOwnerUsername: resourceOwnerUsername, resourceOwnerPassword: resourceOwnerPassword, displayName: displayName, useInTestConsole: default, useInApiDocumentation: default, clientRegistrationEndpoint: clientRegistrationEndpoint, authorizationEndpoint: authorizationEndpoint, grantTypes: grantTypes, clientId: clientId, clientSecret: clientSecret); + } + + /// Initializes a new instance of ApiManagementServiceData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// SKU properties of the API Management service. + /// Managed service identity of the Api Management service. + /// ETag of the resource. + /// A list of availability zones denoting where the resource needs to come from. + /// Email address from which the notification will be sent. + /// The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + /// The provisioning state of the API Management service, which is targeted by the long running operation started on the service. + /// Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /// Gateway URL of the API Management service. + /// Gateway URL of the API Management service in the Default Region. + /// Publisher portal endpoint Url of the API Management service. + /// Management API endpoint URL of the API Management service. + /// SCM endpoint URL of the API Management service. + /// DEveloper Portal endpoint URL of the API Management service. + /// Custom hostname configuration of the API Management service. + /// Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, Standard, Premium and Isolated SKU. + /// Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU. + /// Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported only for Developer and Premium SKU being deployed in Virtual Network. + /// Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. + /// Virtual network configuration of the API Management service. + /// Additional datacenter locations of the API Management service. + /// Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1st 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of next ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them. Note: next ciphers can't be disabled since they are required by Azure CloudService internal components: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384. + /// List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. + /// Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. + /// Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. + /// The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. + /// Control Plane Apis version constraint for the API Management service. + /// Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other properties will be ignored. + /// List of Private Endpoint Connections of this service. + /// Compute Platform Version running the service in this location. + /// Publisher email. + /// Publisher name. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ApiManagementServiceData ApiManagementServiceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ApiManagementServiceSkuProperties sku, ManagedServiceIdentity identity, ETag? etag, IEnumerable zones, string notificationSenderEmail, string provisioningState, string targetProvisioningState, DateTimeOffset? createdAtUtc, Uri gatewayUri, Uri gatewayRegionalUri, Uri portalUri, Uri managementApiUri, Uri scmUri, Uri developerPortalUri, IEnumerable hostnameConfigurations, IEnumerable publicIPAddresses, IEnumerable privateIPAddresses, ResourceIdentifier publicIPAddressId, PublicNetworkAccess? publicNetworkAccess, VirtualNetworkConfiguration virtualNetworkConfiguration, IEnumerable additionalLocations, IDictionary customProperties, IEnumerable certificates, bool? enableClientCertificate, bool? disableGateway, VirtualNetworkType? virtualNetworkType, string minApiVersion, bool? restore, IEnumerable privateEndpointConnections, PlatformVersion? platformVersion, string publisherEmail, string publisherName) + { + return ApiManagementServiceData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, sku: sku, identity: identity, etag: etag, zones: zones, notificationSenderEmail: notificationSenderEmail, provisioningState: provisioningState, targetProvisioningState: targetProvisioningState, createdAtUtc: createdAtUtc, gatewayUri: gatewayUri, gatewayRegionalUri: gatewayRegionalUri, portalUri: portalUri, managementApiUri: managementApiUri, scmUri: scmUri, developerPortalUri: developerPortalUri, hostnameConfigurations: hostnameConfigurations, publicIPAddresses: publicIPAddresses, privateIPAddresses: privateIPAddresses, publicIPAddressId: publicIPAddressId, publicNetworkAccess: publicNetworkAccess, virtualNetworkConfiguration: virtualNetworkConfiguration, additionalLocations: additionalLocations, customProperties: customProperties, certificates: certificates, enableClientCertificate: enableClientCertificate, natGatewayState: default, outboundPublicIPAddresses: default, disableGateway: disableGateway, virtualNetworkType: virtualNetworkType, minApiVersion: minApiVersion, restore: restore, privateEndpointConnections: privateEndpointConnections, platformVersion: platformVersion, publisherEmail: publisherEmail, publisherName: publisherName); + } + + /// Initializes a new instance of AdditionalLocation. + /// The location name of the additional region among Azure Data center regions. + /// SKU properties of the API Management service. + /// A list of availability zones denoting where the resource needs to come from. + /// Public Static Load Balanced IP addresses of the API Management service in the additional location. Available only for Basic, Standard, Premium and Isolated SKU. + /// Private Static Load Balanced IP addresses of the API Management service which is deployed in an Internal Virtual Network in a particular additional location. Available only for Basic, Standard, Premium and Isolated SKU. + /// Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the location. Supported only for Premium SKU being deployed in Virtual Network. + /// Virtual network configuration for the location. + /// Gateway URL of the API Management service in the Region. + /// Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in this additional location. + /// Compute Platform Version running the service. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static AdditionalLocation AdditionalLocation(AzureLocation location, ApiManagementServiceSkuProperties sku, IEnumerable zones, IEnumerable publicIPAddresses, IEnumerable privateIPAddresses, ResourceIdentifier publicIPAddressId, VirtualNetworkConfiguration virtualNetworkConfiguration, Uri gatewayRegionalUri, bool? disableGateway, PlatformVersion? platformVersion) + { + return AdditionalLocation(location: location, sku: sku, zones: zones, publicIPAddresses: publicIPAddresses, privateIPAddresses: privateIPAddresses, publicIPAddressId: publicIPAddressId, virtualNetworkConfiguration: virtualNetworkConfiguration, gatewayRegionalUri: gatewayRegionalUri, natGatewayState: default, outboundPublicIPAddresses: default, disableGateway: disableGateway, platformVersion: platformVersion); + } + + /// Initializes a new instance of ApiManagementServicePatch. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// SKU properties of the API Management service. + /// Managed service identity of the Api Management service. + /// ETag of the resource. + /// A list of availability zones denoting where the resource needs to come from. + /// Email address from which the notification will be sent. + /// The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + /// The provisioning state of the API Management service, which is targeted by the long running operation started on the service. + /// Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /// Gateway URL of the API Management service. + /// Gateway URL of the API Management service in the Default Region. + /// Publisher portal endpoint Url of the API Management service. + /// Management API endpoint URL of the API Management service. + /// SCM endpoint URL of the API Management service. + /// DEveloper Portal endpoint URL of the API Management service. + /// Custom hostname configuration of the API Management service. + /// Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, Standard, Premium and Isolated SKU. + /// Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU. + /// Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported only for Developer and Premium SKU being deployed in Virtual Network. + /// Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. + /// Virtual network configuration of the API Management service. + /// Additional datacenter locations of the API Management service. + /// Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1st 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of next ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them. Note: next ciphers can't be disabled since they are required by Azure CloudService internal components: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384. + /// List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. + /// Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. + /// Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. + /// The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. + /// Control Plane Apis version constraint for the API Management service. + /// Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other properties will be ignored. + /// List of Private Endpoint Connections of this service. + /// Compute Platform Version running the service in this location. + /// Publisher email. + /// Publisher name. + /// Resource tags. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ApiManagementServicePatch ApiManagementServicePatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ApiManagementServiceSkuProperties sku, ManagedServiceIdentity identity, ETag? etag, IEnumerable zones, string notificationSenderEmail, string provisioningState, string targetProvisioningState, DateTimeOffset? createdAtUtc, Uri gatewayUri, Uri gatewayRegionalUri, Uri portalUri, Uri managementApiUri, Uri scmUri, Uri developerPortalUri, IEnumerable hostnameConfigurations, IEnumerable publicIPAddresses, IEnumerable privateIPAddresses, ResourceIdentifier publicIPAddressId, PublicNetworkAccess? publicNetworkAccess, VirtualNetworkConfiguration virtualNetworkConfiguration, IEnumerable additionalLocations, IDictionary customProperties, IEnumerable certificates, bool? enableClientCertificate, bool? disableGateway, VirtualNetworkType? virtualNetworkType, string minApiVersion, bool? restore, IEnumerable privateEndpointConnections, PlatformVersion? platformVersion, string publisherEmail, string publisherName, IDictionary tags) + { + return ApiManagementServicePatch(id: id, name: name, resourceType: resourceType, systemData: systemData, sku: sku, identity: identity, etag: etag, zones: zones, notificationSenderEmail: notificationSenderEmail, provisioningState: provisioningState, targetProvisioningState: targetProvisioningState, createdAtUtc: createdAtUtc, gatewayUri: gatewayUri, gatewayRegionalUri: gatewayRegionalUri, portalUri: portalUri, managementApiUri: managementApiUri, scmUri: scmUri, developerPortalUri: developerPortalUri, hostnameConfigurations: hostnameConfigurations, publicIPAddresses: publicIPAddresses, privateIPAddresses: privateIPAddresses, publicIPAddressId: publicIPAddressId, publicNetworkAccess: publicNetworkAccess, virtualNetworkConfiguration: virtualNetworkConfiguration, additionalLocations: additionalLocations, customProperties: customProperties, certificates: certificates, enableClientCertificate: enableClientCertificate, natGatewayState: default, outboundPublicIPAddresses: default, disableGateway: disableGateway, virtualNetworkType: virtualNetworkType, minApiVersion: minApiVersion, restore: restore, privateEndpointConnections: privateEndpointConnections, platformVersion: platformVersion, publisherEmail: publisherEmail, publisherName: publisherName, tags: tags); + } + + /// Initializes a new instance of ApiManagementIdentityProviderData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Identity Provider Type identifier. + /// The TenantId to use instead of Common when logging into Active Directory. + /// List of Allowed Tenants when configuring Azure Active Directory login. + /// OpenID Connect discovery endpoint hostname for AAD or AAD B2C. + /// Signup Policy Name. Only applies to AAD B2C Identity Provider. + /// Signin Policy Name. Only applies to AAD B2C Identity Provider. + /// Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. + /// Password Reset Policy Name. Only applies to AAD B2C Identity Provider. + /// Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. + /// Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ApiManagementIdentityProviderData ApiManagementIdentityProviderData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IdentityProviderType? identityProviderType, string signInTenant, IEnumerable allowedTenants, string authority, string signUpPolicyName, string signInPolicyName, string profileEditingPolicyName, string passwordResetPolicyName, string clientId, string clientSecret) + { + return ApiManagementIdentityProviderData(id: id, name: name, resourceType: resourceType, systemData: systemData, identityProviderType: identityProviderType, signInTenant: signInTenant, allowedTenants: allowedTenants, authority: authority, signUpPolicyName: signUpPolicyName, signInPolicyName: signInPolicyName, profileEditingPolicyName: profileEditingPolicyName, passwordResetPolicyName: passwordResetPolicyName, clientLibrary: default, clientId: clientId, clientSecret: clientSecret); + } + + /// Initializes a new instance of ApiManagementIdentityProviderCreateOrUpdateContent. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Identity Provider Type identifier. + /// The TenantId to use instead of Common when logging into Active Directory. + /// List of Allowed Tenants when configuring Azure Active Directory login. + /// OpenID Connect discovery endpoint hostname for AAD or AAD B2C. + /// Signup Policy Name. Only applies to AAD B2C Identity Provider. + /// Signin Policy Name. Only applies to AAD B2C Identity Provider. + /// Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. + /// Password Reset Policy Name. Only applies to AAD B2C Identity Provider. + /// Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. + /// Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ApiManagementIdentityProviderCreateOrUpdateContent ApiManagementIdentityProviderCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IdentityProviderType? identityProviderType, string signInTenant, IEnumerable allowedTenants, string authority, string signUpPolicyName, string signInPolicyName, string profileEditingPolicyName, string passwordResetPolicyName, string clientId, string clientSecret) + { + return ApiManagementIdentityProviderCreateOrUpdateContent(id: id, name: name, resourceType: resourceType, systemData: systemData, identityProviderType: identityProviderType, signInTenant: signInTenant, allowedTenants: allowedTenants, authority: authority, signUpPolicyName: signUpPolicyName, signInPolicyName: signInPolicyName, profileEditingPolicyName: profileEditingPolicyName, passwordResetPolicyName: passwordResetPolicyName, clientLibrary: default, clientId: clientId, clientSecret: clientSecret); + } + + /// Initializes a new instance of ApiManagementOpenIdConnectProviderData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// User-friendly OpenID Connect Provider name. + /// User-friendly description of OpenID Connect Provider. + /// Metadata endpoint URI. + /// Client ID of developer console which is the client application. + /// Client Secret of developer console which is the client application. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ApiManagementOpenIdConnectProviderData ApiManagementOpenIdConnectProviderData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string displayName, string description, string metadataEndpoint, string clientId, string clientSecret) + { + return ApiManagementOpenIdConnectProviderData(id: id, name: name, resourceType: resourceType, systemData: systemData, displayName: displayName, description: description, metadataEndpoint: metadataEndpoint, clientId: clientId, clientSecret: clientSecret, useInTestConsole: default, useInApiDocumentation: default); + } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractCollection.cs new file mode 100644 index 0000000000000..70fd0f00ac964 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractCollection.cs @@ -0,0 +1,505 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetAuthorizationAccessPolicyContracts method from an instance of . + /// + public partial class AuthorizationAccessPolicyContractCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics; + private readonly AuthorizationAccessPolicyRestOperations _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient; + + /// Initializes a new instance of the class for mocking. + protected AuthorizationAccessPolicyContractCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal AuthorizationAccessPolicyContractCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", AuthorizationAccessPolicyContractResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(AuthorizationAccessPolicyContractResource.ResourceType, out string authorizationAccessPolicyContractAuthorizationAccessPolicyApiVersion); + _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient = new AuthorizationAccessPolicyRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, authorizationAccessPolicyContractAuthorizationAccessPolicyApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != AuthorizationContractResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AuthorizationContractResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates Authorization Access Policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Identifier of the authorization access policy. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string authorizationAccessPolicyId, AuthorizationAccessPolicyContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, authorizationAccessPolicyId, data, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, authorizationAccessPolicyId, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new AuthorizationAccessPolicyContractResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates Authorization Access Policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Identifier of the authorization access policy. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string authorizationAccessPolicyId, AuthorizationAccessPolicyContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, authorizationAccessPolicyId, data, ifMatch, cancellationToken); + var uri = _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, authorizationAccessPolicyId, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new AuthorizationAccessPolicyContractResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the authorization access policy specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization access policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string authorizationAccessPolicyId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractCollection.Get"); + scope.Start(); + try + { + var response = await _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, authorizationAccessPolicyId, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AuthorizationAccessPolicyContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the authorization access policy specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization access policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string authorizationAccessPolicyId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractCollection.Get"); + scope.Start(); + try + { + var response = _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, authorizationAccessPolicyId, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AuthorizationAccessPolicyContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists a collection of authorization access policy defined within a authorization. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_ListByAuthorization + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.CreateListByAuthorizationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.CreateListByAuthorizationNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, filter, top, skip); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AuthorizationAccessPolicyContractResource(Client, AuthorizationAccessPolicyContractData.DeserializeAuthorizationAccessPolicyContractData(e)), _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics, Pipeline, "AuthorizationAccessPolicyContractCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists a collection of authorization access policy defined within a authorization. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_ListByAuthorization + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.CreateListByAuthorizationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.CreateListByAuthorizationNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, filter, top, skip); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AuthorizationAccessPolicyContractResource(Client, AuthorizationAccessPolicyContractData.DeserializeAuthorizationAccessPolicyContractData(e)), _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics, Pipeline, "AuthorizationAccessPolicyContractCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization access policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string authorizationAccessPolicyId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractCollection.Exists"); + scope.Start(); + try + { + var response = await _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, authorizationAccessPolicyId, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization access policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string authorizationAccessPolicyId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractCollection.Exists"); + scope.Start(); + try + { + var response = _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, authorizationAccessPolicyId, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization access policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string authorizationAccessPolicyId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, authorizationAccessPolicyId, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AuthorizationAccessPolicyContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization access policy. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string authorizationAccessPolicyId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractCollection.GetIfExists"); + scope.Start(); + try + { + var response = _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, authorizationAccessPolicyId, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AuthorizationAccessPolicyContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractData.Serialization.cs new file mode 100644 index 0000000000000..b6b9d88712252 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractData.Serialization.cs @@ -0,0 +1,320 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + public partial class AuthorizationAccessPolicyContractData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AuthorizationAccessPolicyContractData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(TenantId)) + { + writer.WritePropertyName("tenantId"u8); + writer.WriteStringValue(TenantId.Value); + } + if (Optional.IsDefined(ObjectId)) + { + writer.WritePropertyName("objectId"u8); + writer.WriteStringValue(ObjectId); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AuthorizationAccessPolicyContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AuthorizationAccessPolicyContractData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAuthorizationAccessPolicyContractData(document.RootElement, options); + } + + internal static AuthorizationAccessPolicyContractData DeserializeAuthorizationAccessPolicyContractData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + Guid? tenantId = default; + string objectId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tenantId"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tenantId = property0.Value.GetGuid(); + continue; + } + if (property0.NameEquals("objectId"u8)) + { + objectId = property0.Value.GetString(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AuthorizationAccessPolicyContractData( + id, + name, + type, + systemData, + tenantId, + objectId, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TenantId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tenantId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TenantId)) + { + builder.Append(" tenantId: "); + builder.AppendLine($"'{TenantId.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ObjectId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" objectId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ObjectId)) + { + builder.Append(" objectId: "); + if (ObjectId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ObjectId}'''"); + } + else + { + builder.AppendLine($"'{ObjectId}'"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(AuthorizationAccessPolicyContractData)} does not support writing '{options.Format}' format."); + } + } + + AuthorizationAccessPolicyContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAuthorizationAccessPolicyContractData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AuthorizationAccessPolicyContractData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractData.cs new file mode 100644 index 0000000000000..527cc0068b676 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractData.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing the AuthorizationAccessPolicyContract data model. + /// Authorization access policy contract. + /// + public partial class AuthorizationAccessPolicyContractData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AuthorizationAccessPolicyContractData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The Tenant Id. + /// The Object Id. + /// Keeps track of any properties unknown to the library. + internal AuthorizationAccessPolicyContractData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, Guid? tenantId, string objectId, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + TenantId = tenantId; + ObjectId = objectId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The Tenant Id. + [WirePath("properties.tenantId")] + public Guid? TenantId { get; set; } + /// The Object Id. + [WirePath("properties.objectId")] + public string ObjectId { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractResource.Serialization.cs new file mode 100644 index 0000000000000..103b23710e2bc --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.ApiManagement +{ + public partial class AuthorizationAccessPolicyContractResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + AuthorizationAccessPolicyContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + AuthorizationAccessPolicyContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractResource.cs new file mode 100644 index 0000000000000..2267676cc0cb8 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractResource.cs @@ -0,0 +1,361 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A Class representing an AuthorizationAccessPolicyContract along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetAuthorizationAccessPolicyContractResource method. + /// Otherwise you can get one from its parent resource using the GetAuthorizationAccessPolicyContract method. + /// + public partial class AuthorizationAccessPolicyContractResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The serviceName. + /// The authorizationProviderId. + /// The authorizationId. + /// The authorizationAccessPolicyId. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics; + private readonly AuthorizationAccessPolicyRestOperations _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient; + private readonly AuthorizationAccessPolicyContractData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/service/authorizationProviders/authorizations/accessPolicies"; + + /// Initializes a new instance of the class for mocking. + protected AuthorizationAccessPolicyContractResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal AuthorizationAccessPolicyContractResource(ArmClient client, AuthorizationAccessPolicyContractData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal AuthorizationAccessPolicyContractResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string authorizationAccessPolicyContractAuthorizationAccessPolicyApiVersion); + _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient = new AuthorizationAccessPolicyRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, authorizationAccessPolicyContractAuthorizationAccessPolicyApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual AuthorizationAccessPolicyContractData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets the details of the authorization access policy specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractResource.Get"); + scope.Start(); + try + { + var response = await _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AuthorizationAccessPolicyContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the authorization access policy specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractResource.Get"); + scope.Start(); + try + { + var response = _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AuthorizationAccessPolicyContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes specific access policy from the Authorization. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_Delete + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractResource.Delete"); + scope.Start(); + try + { + var response = await _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes specific access policy from the Authorization. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_Delete + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractResource.Delete"); + scope.Start(); + try + { + var response = _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var uri = _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates Authorization Access Policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, AuthorizationAccessPolicyContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractResource.Update"); + scope.Start(); + try + { + var response = await _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new AuthorizationAccessPolicyContractResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates Authorization Access Policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, AuthorizationAccessPolicyContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _authorizationAccessPolicyContractAuthorizationAccessPolicyClientDiagnostics.CreateScope("AuthorizationAccessPolicyContractResource.Update"); + scope.Start(); + try + { + var response = _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken); + var uri = _authorizationAccessPolicyContractAuthorizationAccessPolicyRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new AuthorizationAccessPolicyContractResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractCollection.cs new file mode 100644 index 0000000000000..53ccde733ad56 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractCollection.cs @@ -0,0 +1,505 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetAuthorizationContracts method from an instance of . + /// + public partial class AuthorizationContractCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _authorizationContractAuthorizationClientDiagnostics; + private readonly AuthorizationRestOperations _authorizationContractAuthorizationRestClient; + + /// Initializes a new instance of the class for mocking. + protected AuthorizationContractCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal AuthorizationContractCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _authorizationContractAuthorizationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", AuthorizationContractResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(AuthorizationContractResource.ResourceType, out string authorizationContractAuthorizationApiVersion); + _authorizationContractAuthorizationRestClient = new AuthorizationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, authorizationContractAuthorizationApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != AuthorizationProviderContractResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AuthorizationProviderContractResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates authorization. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Identifier of the authorization. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string authorizationId, AuthorizationContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _authorizationContractAuthorizationRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, authorizationId, data, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _authorizationContractAuthorizationRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, authorizationId, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new AuthorizationContractResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates authorization. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Identifier of the authorization. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string authorizationId, AuthorizationContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _authorizationContractAuthorizationRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, authorizationId, data, ifMatch, cancellationToken); + var uri = _authorizationContractAuthorizationRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, authorizationId, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new AuthorizationContractResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the authorization specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string authorizationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractCollection.Get"); + scope.Start(); + try + { + var response = await _authorizationContractAuthorizationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, authorizationId, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AuthorizationContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the authorization specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string authorizationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractCollection.Get"); + scope.Start(); + try + { + var response = _authorizationContractAuthorizationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, authorizationId, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AuthorizationContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists a collection of authorization providers defined within a authorization provider. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations + /// + /// + /// Operation Id + /// Authorization_ListByAuthorizationProvider + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _authorizationContractAuthorizationRestClient.CreateListByAuthorizationProviderRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _authorizationContractAuthorizationRestClient.CreateListByAuthorizationProviderNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AuthorizationContractResource(Client, AuthorizationContractData.DeserializeAuthorizationContractData(e)), _authorizationContractAuthorizationClientDiagnostics, Pipeline, "AuthorizationContractCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists a collection of authorization providers defined within a authorization provider. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations + /// + /// + /// Operation Id + /// Authorization_ListByAuthorizationProvider + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _authorizationContractAuthorizationRestClient.CreateListByAuthorizationProviderRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _authorizationContractAuthorizationRestClient.CreateListByAuthorizationProviderNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AuthorizationContractResource(Client, AuthorizationContractData.DeserializeAuthorizationContractData(e)), _authorizationContractAuthorizationClientDiagnostics, Pipeline, "AuthorizationContractCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string authorizationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractCollection.Exists"); + scope.Start(); + try + { + var response = await _authorizationContractAuthorizationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, authorizationId, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string authorizationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractCollection.Exists"); + scope.Start(); + try + { + var response = _authorizationContractAuthorizationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, authorizationId, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string authorizationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _authorizationContractAuthorizationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, authorizationId, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AuthorizationContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string authorizationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractCollection.GetIfExists"); + scope.Start(); + try + { + var response = _authorizationContractAuthorizationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, authorizationId, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AuthorizationContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractData.Serialization.cs new file mode 100644 index 0000000000000..e733b47acc4ec --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractData.Serialization.cs @@ -0,0 +1,448 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ApiManagement.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + public partial class AuthorizationContractData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AuthorizationContractData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(AuthorizationType)) + { + writer.WritePropertyName("authorizationType"u8); + writer.WriteStringValue(AuthorizationType.Value.ToString()); + } + if (Optional.IsDefined(OAuth2GrantType)) + { + writer.WritePropertyName("oauth2grantType"u8); + writer.WriteStringValue(OAuth2GrantType.Value.ToString()); + } + if (Optional.IsCollectionDefined(Parameters)) + { + writer.WritePropertyName("parameters"u8); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + writer.WriteObjectValue(Error, options); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AuthorizationContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AuthorizationContractData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAuthorizationContractData(document.RootElement, options); + } + + internal static AuthorizationContractData DeserializeAuthorizationContractData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + ApiManagementAuthorizationType? authorizationType = default; + OAuth2GrantType? oauth2grantType = default; + IDictionary parameters = default; + ApiManagementAuthorizationError error = default; + string status = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("authorizationType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authorizationType = new ApiManagementAuthorizationType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("oauth2grantType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + oauth2grantType = new OAuth2GrantType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("parameters"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + dictionary.Add(property1.Name, property1.Value.GetString()); + } + parameters = dictionary; + continue; + } + if (property0.NameEquals("error"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = ApiManagementAuthorizationError.DeserializeApiManagementAuthorizationError(property0.Value, options); + continue; + } + if (property0.NameEquals("status"u8)) + { + status = property0.Value.GetString(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AuthorizationContractData( + id, + name, + type, + systemData, + authorizationType, + oauth2grantType, + parameters ?? new ChangeTrackingDictionary(), + error, + status, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AuthorizationType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" authorizationType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AuthorizationType)) + { + builder.Append(" authorizationType: "); + builder.AppendLine($"'{AuthorizationType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OAuth2GrantType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" oauth2grantType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OAuth2GrantType)) + { + builder.Append(" oauth2grantType: "); + builder.AppendLine($"'{OAuth2GrantType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Parameters), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" parameters: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Parameters)) + { + if (Parameters.Any()) + { + builder.Append(" parameters: "); + builder.AppendLine("{"); + foreach (var item in Parameters) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + if (item.Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{item.Value}'''"); + } + else + { + builder.AppendLine($"'{item.Value}'"); + } + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Error), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" error: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Error)) + { + builder.Append(" error: "); + BicepSerializationHelpers.AppendChildObject(builder, Error, options, 4, false, " error: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" status: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Status)) + { + builder.Append(" status: "); + if (Status.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Status}'''"); + } + else + { + builder.AppendLine($"'{Status}'"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(AuthorizationContractData)} does not support writing '{options.Format}' format."); + } + } + + AuthorizationContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAuthorizationContractData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AuthorizationContractData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractData.cs new file mode 100644 index 0000000000000..2f281bf6a3666 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractData.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.ApiManagement.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing the AuthorizationContract data model. + /// Authorization contract. + /// + public partial class AuthorizationContractData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AuthorizationContractData() + { + Parameters = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Authorization type options. + /// OAuth2 grant type options. + /// Authorization parameters. + /// Authorization error details. + /// Status of the Authorization. + /// Keeps track of any properties unknown to the library. + internal AuthorizationContractData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ApiManagementAuthorizationType? authorizationType, OAuth2GrantType? oAuth2GrantType, IDictionary parameters, ApiManagementAuthorizationError error, string status, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + AuthorizationType = authorizationType; + OAuth2GrantType = oAuth2GrantType; + Parameters = parameters; + Error = error; + Status = status; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Authorization type options. + [WirePath("properties.authorizationType")] + public ApiManagementAuthorizationType? AuthorizationType { get; set; } + /// OAuth2 grant type options. + [WirePath("properties.oauth2grantType")] + public OAuth2GrantType? OAuth2GrantType { get; set; } + /// Authorization parameters. + [WirePath("properties.parameters")] + public IDictionary Parameters { get; } + /// Authorization error details. + [WirePath("properties.error")] + public ApiManagementAuthorizationError Error { get; set; } + /// Status of the Authorization. + [WirePath("properties.status")] + public string Status { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractResource.Serialization.cs new file mode 100644 index 0000000000000..43128b49cb45c --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.ApiManagement +{ + public partial class AuthorizationContractResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + AuthorizationContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + AuthorizationContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractResource.cs new file mode 100644 index 0000000000000..da9a3672d9da8 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractResource.cs @@ -0,0 +1,594 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A Class representing an AuthorizationContract along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetAuthorizationContractResource method. + /// Otherwise you can get one from its parent resource using the GetAuthorizationContract method. + /// + public partial class AuthorizationContractResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The serviceName. + /// The authorizationProviderId. + /// The authorizationId. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _authorizationContractAuthorizationClientDiagnostics; + private readonly AuthorizationRestOperations _authorizationContractAuthorizationRestClient; + private readonly ClientDiagnostics _authorizationLoginLinksClientDiagnostics; + private readonly AuthorizationLoginLinksRestOperations _authorizationLoginLinksRestClient; + private readonly AuthorizationContractData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/service/authorizationProviders/authorizations"; + + /// Initializes a new instance of the class for mocking. + protected AuthorizationContractResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal AuthorizationContractResource(ArmClient client, AuthorizationContractData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal AuthorizationContractResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _authorizationContractAuthorizationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string authorizationContractAuthorizationApiVersion); + _authorizationContractAuthorizationRestClient = new AuthorizationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, authorizationContractAuthorizationApiVersion); + _authorizationLoginLinksClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _authorizationLoginLinksRestClient = new AuthorizationLoginLinksRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual AuthorizationContractData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of AuthorizationAccessPolicyContractResources in the AuthorizationContract. + /// An object representing collection of AuthorizationAccessPolicyContractResources and their operations over a AuthorizationAccessPolicyContractResource. + public virtual AuthorizationAccessPolicyContractCollection GetAuthorizationAccessPolicyContracts() + { + return GetCachedClient(client => new AuthorizationAccessPolicyContractCollection(client, Id)); + } + + /// + /// Gets the details of the authorization access policy specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization access policy. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetAuthorizationAccessPolicyContractAsync(string authorizationAccessPolicyId, CancellationToken cancellationToken = default) + { + return await GetAuthorizationAccessPolicyContracts().GetAsync(authorizationAccessPolicyId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the authorization access policy specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies/{authorizationAccessPolicyId} + /// + /// + /// Operation Id + /// AuthorizationAccessPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization access policy. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetAuthorizationAccessPolicyContract(string authorizationAccessPolicyId, CancellationToken cancellationToken = default) + { + return GetAuthorizationAccessPolicyContracts().Get(authorizationAccessPolicyId, cancellationToken); + } + + /// + /// Gets the details of the authorization specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractResource.Get"); + scope.Start(); + try + { + var response = await _authorizationContractAuthorizationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AuthorizationContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the authorization specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractResource.Get"); + scope.Start(); + try + { + var response = _authorizationContractAuthorizationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AuthorizationContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes specific Authorization from the Authorization provider. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_Delete + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractResource.Delete"); + scope.Start(); + try + { + var response = await _authorizationContractAuthorizationRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _authorizationContractAuthorizationRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes specific Authorization from the Authorization provider. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_Delete + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractResource.Delete"); + scope.Start(); + try + { + var response = _authorizationContractAuthorizationRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var uri = _authorizationContractAuthorizationRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates authorization. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, AuthorizationContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractResource.Update"); + scope.Start(); + try + { + var response = await _authorizationContractAuthorizationRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _authorizationContractAuthorizationRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new AuthorizationContractResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates authorization. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, AuthorizationContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractResource.Update"); + scope.Start(); + try + { + var response = _authorizationContractAuthorizationRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken); + var uri = _authorizationContractAuthorizationRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new AuthorizationContractResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Confirm valid consent code to suppress Authorizations anti-phishing page. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/confirmConsentCode + /// + /// + /// Operation Id + /// Authorization_ConfirmConsentCode + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Create parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task ConfirmConsentCodeAsync(AuthorizationConfirmConsentCodeContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractResource.ConfirmConsentCode"); + scope.Start(); + try + { + var response = await _authorizationContractAuthorizationRestClient.ConfirmConsentCodeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Confirm valid consent code to suppress Authorizations anti-phishing page. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/confirmConsentCode + /// + /// + /// Operation Id + /// Authorization_ConfirmConsentCode + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Create parameters. + /// The cancellation token to use. + /// is null. + public virtual Response ConfirmConsentCode(AuthorizationConfirmConsentCodeContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _authorizationContractAuthorizationClientDiagnostics.CreateScope("AuthorizationContractResource.ConfirmConsentCode"); + scope.Start(); + try + { + var response = _authorizationContractAuthorizationRestClient.ConfirmConsentCode(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets authorization login links. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/getLoginLinks + /// + /// + /// Operation Id + /// AuthorizationLoginLinks_Post + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// + /// Create parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> PostAuthorizationLoginLinkAsync(AuthorizationLoginContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _authorizationLoginLinksClientDiagnostics.CreateScope("AuthorizationContractResource.PostAuthorizationLoginLink"); + scope.Start(); + try + { + var response = await _authorizationLoginLinksRestClient.PostAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets authorization login links. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/getLoginLinks + /// + /// + /// Operation Id + /// AuthorizationLoginLinks_Post + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// + /// Create parameters. + /// The cancellation token to use. + /// is null. + public virtual Response PostAuthorizationLoginLink(AuthorizationLoginContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _authorizationLoginLinksClientDiagnostics.CreateScope("AuthorizationContractResource.PostAuthorizationLoginLink"); + scope.Start(); + try + { + var response = _authorizationLoginLinksRestClient.Post(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractCollection.cs new file mode 100644 index 0000000000000..9c07c1f8b69d0 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractCollection.cs @@ -0,0 +1,505 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetAuthorizationProviderContracts method from an instance of . + /// + public partial class AuthorizationProviderContractCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _authorizationProviderContractAuthorizationProviderClientDiagnostics; + private readonly AuthorizationProviderRestOperations _authorizationProviderContractAuthorizationProviderRestClient; + + /// Initializes a new instance of the class for mocking. + protected AuthorizationProviderContractCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal AuthorizationProviderContractCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _authorizationProviderContractAuthorizationProviderClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", AuthorizationProviderContractResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(AuthorizationProviderContractResource.ResourceType, out string authorizationProviderContractAuthorizationProviderApiVersion); + _authorizationProviderContractAuthorizationProviderRestClient = new AuthorizationProviderRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, authorizationProviderContractAuthorizationProviderApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ApiManagementServiceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ApiManagementServiceResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates authorization provider. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Identifier of the authorization provider. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string authorizationProviderId, AuthorizationProviderContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _authorizationProviderContractAuthorizationProviderRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, authorizationProviderId, data, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _authorizationProviderContractAuthorizationProviderRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, authorizationProviderId, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new AuthorizationProviderContractResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates authorization provider. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Identifier of the authorization provider. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string authorizationProviderId, AuthorizationProviderContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _authorizationProviderContractAuthorizationProviderRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, authorizationProviderId, data, ifMatch, cancellationToken); + var uri = _authorizationProviderContractAuthorizationProviderRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, authorizationProviderId, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new AuthorizationProviderContractResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the authorization provider specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization provider. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string authorizationProviderId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractCollection.Get"); + scope.Start(); + try + { + var response = await _authorizationProviderContractAuthorizationProviderRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, authorizationProviderId, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AuthorizationProviderContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the authorization provider specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization provider. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string authorizationProviderId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractCollection.Get"); + scope.Start(); + try + { + var response = _authorizationProviderContractAuthorizationProviderRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, authorizationProviderId, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AuthorizationProviderContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists a collection of authorization providers defined within a service instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders + /// + /// + /// Operation Id + /// AuthorizationProvider_ListByService + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _authorizationProviderContractAuthorizationProviderRestClient.CreateListByServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _authorizationProviderContractAuthorizationProviderRestClient.CreateListByServiceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top, skip); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AuthorizationProviderContractResource(Client, AuthorizationProviderContractData.DeserializeAuthorizationProviderContractData(e)), _authorizationProviderContractAuthorizationProviderClientDiagnostics, Pipeline, "AuthorizationProviderContractCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists a collection of authorization providers defined within a service instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders + /// + /// + /// Operation Id + /// AuthorizationProvider_ListByService + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _authorizationProviderContractAuthorizationProviderRestClient.CreateListByServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _authorizationProviderContractAuthorizationProviderRestClient.CreateListByServiceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top, skip); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AuthorizationProviderContractResource(Client, AuthorizationProviderContractData.DeserializeAuthorizationProviderContractData(e)), _authorizationProviderContractAuthorizationProviderClientDiagnostics, Pipeline, "AuthorizationProviderContractCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization provider. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string authorizationProviderId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractCollection.Exists"); + scope.Start(); + try + { + var response = await _authorizationProviderContractAuthorizationProviderRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, authorizationProviderId, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization provider. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string authorizationProviderId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractCollection.Exists"); + scope.Start(); + try + { + var response = _authorizationProviderContractAuthorizationProviderRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, authorizationProviderId, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization provider. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string authorizationProviderId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _authorizationProviderContractAuthorizationProviderRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, authorizationProviderId, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AuthorizationProviderContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization provider. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string authorizationProviderId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractCollection.GetIfExists"); + scope.Start(); + try + { + var response = _authorizationProviderContractAuthorizationProviderRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, authorizationProviderId, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AuthorizationProviderContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractData.Serialization.cs new file mode 100644 index 0000000000000..f518c211e52e7 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractData.Serialization.cs @@ -0,0 +1,356 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ApiManagement.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + public partial class AuthorizationProviderContractData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AuthorizationProviderContractData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsDefined(IdentityProvider)) + { + writer.WritePropertyName("identityProvider"u8); + writer.WriteStringValue(IdentityProvider); + } + if (Optional.IsDefined(Oauth2)) + { + writer.WritePropertyName("oauth2"u8); + writer.WriteObjectValue(Oauth2, options); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AuthorizationProviderContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AuthorizationProviderContractData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAuthorizationProviderContractData(document.RootElement, options); + } + + internal static AuthorizationProviderContractData DeserializeAuthorizationProviderContractData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + string displayName = default; + string identityProvider = default; + AuthorizationProviderOAuth2Settings oauth2 = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("displayName"u8)) + { + displayName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("identityProvider"u8)) + { + identityProvider = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("oauth2"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + oauth2 = AuthorizationProviderOAuth2Settings.DeserializeAuthorizationProviderOAuth2Settings(property0.Value, options); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AuthorizationProviderContractData( + id, + name, + type, + systemData, + displayName, + identityProvider, + oauth2, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DisplayName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" displayName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DisplayName)) + { + builder.Append(" displayName: "); + if (DisplayName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DisplayName}'''"); + } + else + { + builder.AppendLine($"'{DisplayName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IdentityProvider), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" identityProvider: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IdentityProvider)) + { + builder.Append(" identityProvider: "); + if (IdentityProvider.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{IdentityProvider}'''"); + } + else + { + builder.AppendLine($"'{IdentityProvider}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Oauth2), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" oauth2: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Oauth2)) + { + builder.Append(" oauth2: "); + BicepSerializationHelpers.AppendChildObject(builder, Oauth2, options, 4, false, " oauth2: "); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(AuthorizationProviderContractData)} does not support writing '{options.Format}' format."); + } + } + + AuthorizationProviderContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAuthorizationProviderContractData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AuthorizationProviderContractData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractData.cs new file mode 100644 index 0000000000000..827dc7e93a9a1 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractData.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.ApiManagement.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing the AuthorizationProviderContract data model. + /// Authorization Provider contract. + /// + public partial class AuthorizationProviderContractData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AuthorizationProviderContractData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Authorization Provider name. Must be 1 to 300 characters long. + /// Identity provider name. Must be 1 to 300 characters long. + /// OAuth2 settings. + /// Keeps track of any properties unknown to the library. + internal AuthorizationProviderContractData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string displayName, string identityProvider, AuthorizationProviderOAuth2Settings oauth2, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + DisplayName = displayName; + IdentityProvider = identityProvider; + Oauth2 = oauth2; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Authorization Provider name. Must be 1 to 300 characters long. + [WirePath("properties.displayName")] + public string DisplayName { get; set; } + /// Identity provider name. Must be 1 to 300 characters long. + [WirePath("properties.identityProvider")] + public string IdentityProvider { get; set; } + /// OAuth2 settings. + [WirePath("properties.oauth2")] + public AuthorizationProviderOAuth2Settings Oauth2 { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractResource.Serialization.cs new file mode 100644 index 0000000000000..3c0ec6922b4e0 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.ApiManagement +{ + public partial class AuthorizationProviderContractResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + AuthorizationProviderContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + AuthorizationProviderContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractResource.cs new file mode 100644 index 0000000000000..fbafc87b9fec3 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractResource.cs @@ -0,0 +1,428 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A Class representing an AuthorizationProviderContract along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetAuthorizationProviderContractResource method. + /// Otherwise you can get one from its parent resource using the GetAuthorizationProviderContract method. + /// + public partial class AuthorizationProviderContractResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The serviceName. + /// The authorizationProviderId. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _authorizationProviderContractAuthorizationProviderClientDiagnostics; + private readonly AuthorizationProviderRestOperations _authorizationProviderContractAuthorizationProviderRestClient; + private readonly AuthorizationProviderContractData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/service/authorizationProviders"; + + /// Initializes a new instance of the class for mocking. + protected AuthorizationProviderContractResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal AuthorizationProviderContractResource(ArmClient client, AuthorizationProviderContractData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal AuthorizationProviderContractResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _authorizationProviderContractAuthorizationProviderClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string authorizationProviderContractAuthorizationProviderApiVersion); + _authorizationProviderContractAuthorizationProviderRestClient = new AuthorizationProviderRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, authorizationProviderContractAuthorizationProviderApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual AuthorizationProviderContractData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of AuthorizationContractResources in the AuthorizationProviderContract. + /// An object representing collection of AuthorizationContractResources and their operations over a AuthorizationContractResource. + public virtual AuthorizationContractCollection GetAuthorizationContracts() + { + return GetCachedClient(client => new AuthorizationContractCollection(client, Id)); + } + + /// + /// Gets the details of the authorization specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetAuthorizationContractAsync(string authorizationId, CancellationToken cancellationToken = default) + { + return await GetAuthorizationContracts().GetAsync(authorizationId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the authorization specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId} + /// + /// + /// Operation Id + /// Authorization_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the authorization. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetAuthorizationContract(string authorizationId, CancellationToken cancellationToken = default) + { + return GetAuthorizationContracts().Get(authorizationId, cancellationToken); + } + + /// + /// Gets the details of the authorization provider specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractResource.Get"); + scope.Start(); + try + { + var response = await _authorizationProviderContractAuthorizationProviderRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AuthorizationProviderContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the authorization provider specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractResource.Get"); + scope.Start(); + try + { + var response = _authorizationProviderContractAuthorizationProviderRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AuthorizationProviderContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes specific authorization provider from the API Management service instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_Delete + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractResource.Delete"); + scope.Start(); + try + { + var response = await _authorizationProviderContractAuthorizationProviderRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _authorizationProviderContractAuthorizationProviderRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes specific authorization provider from the API Management service instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_Delete + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractResource.Delete"); + scope.Start(); + try + { + var response = _authorizationProviderContractAuthorizationProviderRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var uri = _authorizationProviderContractAuthorizationProviderRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates authorization provider. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, AuthorizationProviderContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractResource.Update"); + scope.Start(); + try + { + var response = await _authorizationProviderContractAuthorizationProviderRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _authorizationProviderContractAuthorizationProviderRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new AuthorizationProviderContractResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates authorization provider. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId} + /// + /// + /// Operation Id + /// AuthorizationProvider_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, AuthorizationProviderContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _authorizationProviderContractAuthorizationProviderClientDiagnostics.CreateScope("AuthorizationProviderContractResource.Update"); + scope.Start(); + try + { + var response = _authorizationProviderContractAuthorizationProviderRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken); + var uri = _authorizationProviderContractAuthorizationProviderRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new AuthorizationProviderContractResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DiagnosticContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DiagnosticContractData.Serialization.cs index edd6281a0ab56..c8d64e221e41b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DiagnosticContractData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DiagnosticContractData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -303,6 +304,237 @@ internal static DiagnosticContractData DeserializeDiagnosticContractData(JsonEle serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AlwaysLog), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" alwaysLog: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AlwaysLog)) + { + builder.Append(" alwaysLog: "); + builder.AppendLine($"'{AlwaysLog.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LoggerId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" loggerId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LoggerId)) + { + builder.Append(" loggerId: "); + if (LoggerId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{LoggerId}'''"); + } + else + { + builder.AppendLine($"'{LoggerId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Sampling), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sampling: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Sampling)) + { + builder.Append(" sampling: "); + BicepSerializationHelpers.AppendChildObject(builder, Sampling, options, 4, false, " sampling: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Frontend), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" frontend: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Frontend)) + { + builder.Append(" frontend: "); + BicepSerializationHelpers.AppendChildObject(builder, Frontend, options, 4, false, " frontend: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Backend), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" backend: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Backend)) + { + builder.Append(" backend: "); + BicepSerializationHelpers.AppendChildObject(builder, Backend, options, 4, false, " backend: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsLogClientIPEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" logClientIp: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsLogClientIPEnabled)) + { + builder.Append(" logClientIp: "); + var boolValue = IsLogClientIPEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(HttpCorrelationProtocol), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" httpCorrelationProtocol: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(HttpCorrelationProtocol)) + { + builder.Append(" httpCorrelationProtocol: "); + builder.AppendLine($"'{HttpCorrelationProtocol.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Verbosity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" verbosity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Verbosity)) + { + builder.Append(" verbosity: "); + builder.AppendLine($"'{Verbosity.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OperationNameFormat), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" operationNameFormat: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OperationNameFormat)) + { + builder.Append(" operationNameFormat: "); + builder.AppendLine($"'{OperationNameFormat.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Metrics), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" metrics: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Metrics)) + { + builder.Append(" metrics: "); + var boolValue = Metrics.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -311,6 +543,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(DiagnosticContractData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DiagnosticContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DiagnosticContractData.cs index 9d469e4399a2e..0405757e710c6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DiagnosticContractData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DiagnosticContractData.cs @@ -88,24 +88,34 @@ internal DiagnosticContractData(ResourceIdentifier id, string name, ResourceType } /// Specifies for what type of messages sampling settings should not apply. + [WirePath("properties.alwaysLog")] public AlwaysLog? AlwaysLog { get; set; } /// Resource Id of a target logger. + [WirePath("properties.loggerId")] public string LoggerId { get; set; } /// Sampling settings for Diagnostic. + [WirePath("properties.sampling")] public SamplingSettings Sampling { get; set; } /// Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. + [WirePath("properties.frontend")] public PipelineDiagnosticSettings Frontend { get; set; } /// Diagnostic settings for incoming/outgoing HTTP messages to the Backend. + [WirePath("properties.backend")] public PipelineDiagnosticSettings Backend { get; set; } /// Log the ClientIP. Default is false. + [WirePath("properties.logClientIp")] public bool? IsLogClientIPEnabled { get; set; } /// Sets correlation protocol to use for Application Insights diagnostics. + [WirePath("properties.httpCorrelationProtocol")] public HttpCorrelationProtocol? HttpCorrelationProtocol { get; set; } /// The verbosity level applied to traces emitted by trace policies. + [WirePath("properties.verbosity")] public TraceVerbosityLevel? Verbosity { get; set; } /// The format of the Operation Name for Application Insights telemetries. Default is Name. + [WirePath("properties.operationNameFormat")] public OperationNameFormat? OperationNameFormat { get; set; } /// Emit custom metrics via emit-metric policy. Applicable only to Application Insights diagnostic settings. + [WirePath("properties.metrics")] public bool? Metrics { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractCollection.cs new file mode 100644 index 0000000000000..5fa773da4d0ea --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractCollection.cs @@ -0,0 +1,505 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDocumentationContracts method from an instance of . + /// + public partial class DocumentationContractCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _documentationContractDocumentationClientDiagnostics; + private readonly DocumentationRestOperations _documentationContractDocumentationRestClient; + + /// Initializes a new instance of the class for mocking. + protected DocumentationContractCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DocumentationContractCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _documentationContractDocumentationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", DocumentationContractResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DocumentationContractResource.ResourceType, out string documentationContractDocumentationApiVersion); + _documentationContractDocumentationRestClient = new DocumentationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, documentationContractDocumentationApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ApiManagementServiceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ApiManagementServiceResource.ResourceType), nameof(id)); + } + + /// + /// Creates a new Documentation or updates an existing one. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Documentation identifier. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string documentationId, DocumentationContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _documentationContractDocumentationRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, documentationId, data, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _documentationContractDocumentationRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, documentationId, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new DocumentationContractResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates a new Documentation or updates an existing one. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Documentation identifier. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string documentationId, DocumentationContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _documentationContractDocumentationRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, documentationId, data, ifMatch, cancellationToken); + var uri = _documentationContractDocumentationRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, documentationId, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new DocumentationContractResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the Documentation specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Documentation identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string documentationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractCollection.Get"); + scope.Start(); + try + { + var response = await _documentationContractDocumentationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, documentationId, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DocumentationContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the Documentation specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Documentation identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string documentationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractCollection.Get"); + scope.Start(); + try + { + var response = _documentationContractDocumentationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, documentationId, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DocumentationContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists all Documentations of the API Management service instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations + /// + /// + /// Operation Id + /// Documentation_ListByService + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | eq | contains |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _documentationContractDocumentationRestClient.CreateListByServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _documentationContractDocumentationRestClient.CreateListByServiceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top, skip); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DocumentationContractResource(Client, DocumentationContractData.DeserializeDocumentationContractData(e)), _documentationContractDocumentationClientDiagnostics, Pipeline, "DocumentationContractCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists all Documentations of the API Management service instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations + /// + /// + /// Operation Id + /// Documentation_ListByService + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | eq | contains |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _documentationContractDocumentationRestClient.CreateListByServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _documentationContractDocumentationRestClient.CreateListByServiceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top, skip); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DocumentationContractResource(Client, DocumentationContractData.DeserializeDocumentationContractData(e)), _documentationContractDocumentationClientDiagnostics, Pipeline, "DocumentationContractCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Documentation identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string documentationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractCollection.Exists"); + scope.Start(); + try + { + var response = await _documentationContractDocumentationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, documentationId, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Documentation identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string documentationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractCollection.Exists"); + scope.Start(); + try + { + var response = _documentationContractDocumentationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, documentationId, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Documentation identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string documentationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _documentationContractDocumentationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, documentationId, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DocumentationContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Documentation identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string documentationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractCollection.GetIfExists"); + scope.Start(); + try + { + var response = _documentationContractDocumentationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, documentationId, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DocumentationContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractData.Serialization.cs new file mode 100644 index 0000000000000..28e388f827db9 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractData.Serialization.cs @@ -0,0 +1,324 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + public partial class DocumentationContractData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentationContractData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Title)) + { + writer.WritePropertyName("title"u8); + writer.WriteStringValue(Title); + } + if (Optional.IsDefined(Content)) + { + writer.WritePropertyName("content"u8); + writer.WriteStringValue(Content); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + DocumentationContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentationContractData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDocumentationContractData(document.RootElement, options); + } + + internal static DocumentationContractData DeserializeDocumentationContractData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + string title = default; + string content = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("title"u8)) + { + title = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("content"u8)) + { + content = property0.Value.GetString(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DocumentationContractData( + id, + name, + type, + systemData, + title, + content, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Title), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" title: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Title)) + { + builder.Append(" title: "); + if (Title.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Title}'''"); + } + else + { + builder.AppendLine($"'{Title}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Content), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" content: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Content)) + { + builder.Append(" content: "); + if (Content.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Content}'''"); + } + else + { + builder.AppendLine($"'{Content}'"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DocumentationContractData)} does not support writing '{options.Format}' format."); + } + } + + DocumentationContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDocumentationContractData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DocumentationContractData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractData.cs new file mode 100644 index 0000000000000..56fffa486a223 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractData.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing the DocumentationContract data model. + /// Markdown documentation details. + /// + public partial class DocumentationContractData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DocumentationContractData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// documentation title. + /// Markdown documentation content. + /// Keeps track of any properties unknown to the library. + internal DocumentationContractData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string title, string content, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Title = title; + Content = content; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// documentation title. + [WirePath("properties.title")] + public string Title { get; set; } + /// Markdown documentation content. + [WirePath("properties.content")] + public string Content { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractResource.Serialization.cs new file mode 100644 index 0000000000000..a2ee3859a6791 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.ApiManagement +{ + public partial class DocumentationContractResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DocumentationContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + DocumentationContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractResource.cs new file mode 100644 index 0000000000000..549ed750d83a3 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractResource.cs @@ -0,0 +1,424 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A Class representing a DocumentationContract along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDocumentationContractResource method. + /// Otherwise you can get one from its parent resource using the GetDocumentationContract method. + /// + public partial class DocumentationContractResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The serviceName. + /// The documentationId. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string documentationId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _documentationContractDocumentationClientDiagnostics; + private readonly DocumentationRestOperations _documentationContractDocumentationRestClient; + private readonly DocumentationContractData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/service/documentations"; + + /// Initializes a new instance of the class for mocking. + protected DocumentationContractResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DocumentationContractResource(ArmClient client, DocumentationContractData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DocumentationContractResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _documentationContractDocumentationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string documentationContractDocumentationApiVersion); + _documentationContractDocumentationRestClient = new DocumentationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, documentationContractDocumentationApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DocumentationContractData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets the details of the Documentation specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractResource.Get"); + scope.Start(); + try + { + var response = await _documentationContractDocumentationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DocumentationContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the Documentation specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractResource.Get"); + scope.Start(); + try + { + var response = _documentationContractDocumentationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DocumentationContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the specified Documentation from an API. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Delete + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractResource.Delete"); + scope.Start(); + try + { + var response = await _documentationContractDocumentationRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _documentationContractDocumentationRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the specified Documentation from an API. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Delete + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractResource.Delete"); + scope.Start(); + try + { + var response = _documentationContractDocumentationRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var uri = _documentationContractDocumentationRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the details of the Documentation for an API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Update + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Documentation Update parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(ETag ifMatch, DocumentationContractPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractResource.Update"); + scope.Start(); + try + { + var response = await _documentationContractDocumentationRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DocumentationContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the details of the Documentation for an API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_Update + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Documentation Update parameters. + /// The cancellation token to use. + /// is null. + public virtual Response Update(ETag ifMatch, DocumentationContractPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractResource.Update"); + scope.Start(); + try + { + var response = _documentationContractDocumentationRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, patch, cancellationToken); + return Response.FromValue(new DocumentationContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the Documentation by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_GetEntityTag + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetEntityTagAsync(CancellationToken cancellationToken = default) + { + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractResource.GetEntityTag"); + scope.Start(); + try + { + var response = await _documentationContractDocumentationRestClient.GetEntityTagAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the Documentation by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/documentations/{documentationId} + /// + /// + /// Operation Id + /// Documentation_GetEntityTag + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetEntityTag(CancellationToken cancellationToken = default) + { + using var scope = _documentationContractDocumentationClientDiagnostics.CreateScope("DocumentationContractResource.GetEntityTag"); + scope.Start(); + try + { + var response = _documentationContractDocumentationRestClient.GetEntityTag(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/ApiManagementExtensions.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/ApiManagementExtensions.cs index 32c3e69bf08b0..1eea71d4435e2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/ApiManagementExtensions.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/ApiManagementExtensions.cs @@ -109,6 +109,25 @@ public static ApiOperationPolicyResource GetApiOperationPolicyResource(this ArmC return GetMockableApiManagementArmClient(client).GetApiOperationPolicyResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static ServiceApiResolverPolicyResource GetServiceApiResolverPolicyResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableApiManagementArmClient(client).GetServiceApiResolverPolicyResource(id); + } + /// /// Gets an object representing an along with the instance operations that can be performed on it but with no data. /// You can use to create an from its components. @@ -242,6 +261,25 @@ public static ApiManagementTagResource GetApiManagementTagResource(this ArmClien return GetMockableApiManagementArmClient(client).GetApiManagementTagResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static ResolverContractResource GetResolverContractResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableApiManagementArmClient(client).GetResolverContractResource(id); + } + /// /// Gets an object representing an along with the instance operations that can be performed on it but with no data. /// You can use to create an from its components. @@ -394,6 +432,44 @@ public static ApiTagDescriptionResource GetApiTagDescriptionResource(this ArmCli return GetMockableApiManagementArmClient(client).GetApiTagDescriptionResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static ServiceApiWikiResource GetServiceApiWikiResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableApiManagementArmClient(client).GetServiceApiWikiResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static ServiceProductWikiResource GetServiceProductWikiResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableApiManagementArmClient(client).GetServiceProductWikiResource(id); + } + /// /// Gets an object representing an along with the instance operations that can be performed on it but with no data. /// You can use to create an from its components. @@ -432,6 +508,63 @@ public static ApiManagementAuthorizationServerResource GetApiManagementAuthoriza return GetMockableApiManagementArmClient(client).GetApiManagementAuthorizationServerResource(id); } + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static AuthorizationProviderContractResource GetAuthorizationProviderContractResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableApiManagementArmClient(client).GetAuthorizationProviderContractResource(id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static AuthorizationContractResource GetAuthorizationContractResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableApiManagementArmClient(client).GetAuthorizationContractResource(id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static AuthorizationAccessPolicyContractResource GetAuthorizationAccessPolicyContractResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableApiManagementArmClient(client).GetAuthorizationAccessPolicyContractResource(id); + } + /// /// Gets an object representing an along with the instance operations that can be performed on it but with no data. /// You can use to create an from its components. @@ -717,6 +850,44 @@ public static ApiManagementOpenIdConnectProviderResource GetApiManagementOpenIdC return GetMockableApiManagementArmClient(client).GetApiManagementOpenIdConnectProviderResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static PolicyFragmentContractResource GetPolicyFragmentContractResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableApiManagementArmClient(client).GetPolicyFragmentContractResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static PortalConfigContractResource GetPortalConfigContractResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableApiManagementArmClient(client).GetPortalConfigContractResource(id); + } + /// /// Gets an object representing an along with the instance operations that can be performed on it but with no data. /// You can use to create an from its components. @@ -964,6 +1135,25 @@ public static ApiManagementUserResource GetApiManagementUserResource(this ArmCli return GetMockableApiManagementArmClient(client).GetApiManagementUserResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DocumentationContractResource GetDocumentationContractResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableApiManagementArmClient(client).GetDocumentationContractResource(id); + } + /// /// Gets a collection of ApiManagementServiceResources in the ResourceGroupResource. /// @@ -994,7 +1184,7 @@ public static ApiManagementServiceCollection GetApiManagementServices(this Resou /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1032,7 +1222,7 @@ public static async Task> GetApiManagemen /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1087,7 +1277,7 @@ public static ApiManagementDeletedServiceCollection GetApiManagementDeletedServi /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1126,7 +1316,7 @@ public static async Task> GetApiMa /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1165,7 +1355,7 @@ public static Response GetApiManagementDele /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1201,7 +1391,7 @@ public static AsyncPageable GetApiManagemen /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1237,7 +1427,7 @@ public static Pageable GetApiManagementDele /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1273,7 +1463,7 @@ public static AsyncPageable GetApiManagementServic /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1309,7 +1499,7 @@ public static Pageable GetApiManagementServices(th /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1345,7 +1535,7 @@ public static async Task> C /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1381,7 +1571,7 @@ public static Response CheckApiManag /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1416,7 +1606,7 @@ public static async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -1451,7 +1641,7 @@ public static Response G /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -1483,7 +1673,7 @@ public static AsyncPageable GetApiManagementSkusAsync(this Sub /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/MockableApiManagementArmClient.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/MockableApiManagementArmClient.cs index 11823f7f36558..8181d894624ff 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/MockableApiManagementArmClient.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/MockableApiManagementArmClient.cs @@ -82,6 +82,18 @@ public virtual ApiOperationPolicyResource GetApiOperationPolicyResource(Resource return new ApiOperationPolicyResource(Client, id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ServiceApiResolverPolicyResource GetServiceApiResolverPolicyResource(ResourceIdentifier id) + { + ServiceApiResolverPolicyResource.ValidateResourceId(id); + return new ServiceApiResolverPolicyResource(Client, id); + } + /// /// Gets an object representing an along with the instance operations that can be performed on it but with no data. /// You can use to create an from its components. @@ -166,6 +178,18 @@ public virtual ApiManagementTagResource GetApiManagementTagResource(ResourceIden return new ApiManagementTagResource(Client, id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ResolverContractResource GetResolverContractResource(ResourceIdentifier id) + { + ResolverContractResource.ValidateResourceId(id); + return new ResolverContractResource(Client, id); + } + /// /// Gets an object representing an along with the instance operations that can be performed on it but with no data. /// You can use to create an from its components. @@ -262,6 +286,30 @@ public virtual ApiTagDescriptionResource GetApiTagDescriptionResource(ResourceId return new ApiTagDescriptionResource(Client, id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ServiceApiWikiResource GetServiceApiWikiResource(ResourceIdentifier id) + { + ServiceApiWikiResource.ValidateResourceId(id); + return new ServiceApiWikiResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ServiceProductWikiResource GetServiceProductWikiResource(ResourceIdentifier id) + { + ServiceProductWikiResource.ValidateResourceId(id); + return new ServiceProductWikiResource(Client, id); + } + /// /// Gets an object representing an along with the instance operations that can be performed on it but with no data. /// You can use to create an from its components. @@ -286,6 +334,42 @@ public virtual ApiManagementAuthorizationServerResource GetApiManagementAuthoriz return new ApiManagementAuthorizationServerResource(Client, id); } + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual AuthorizationProviderContractResource GetAuthorizationProviderContractResource(ResourceIdentifier id) + { + AuthorizationProviderContractResource.ValidateResourceId(id); + return new AuthorizationProviderContractResource(Client, id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual AuthorizationContractResource GetAuthorizationContractResource(ResourceIdentifier id) + { + AuthorizationContractResource.ValidateResourceId(id); + return new AuthorizationContractResource(Client, id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual AuthorizationAccessPolicyContractResource GetAuthorizationAccessPolicyContractResource(ResourceIdentifier id) + { + AuthorizationAccessPolicyContractResource.ValidateResourceId(id); + return new AuthorizationAccessPolicyContractResource(Client, id); + } + /// /// Gets an object representing an along with the instance operations that can be performed on it but with no data. /// You can use to create an from its components. @@ -466,6 +550,30 @@ public virtual ApiManagementOpenIdConnectProviderResource GetApiManagementOpenId return new ApiManagementOpenIdConnectProviderResource(Client, id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual PolicyFragmentContractResource GetPolicyFragmentContractResource(ResourceIdentifier id) + { + PolicyFragmentContractResource.ValidateResourceId(id); + return new PolicyFragmentContractResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual PortalConfigContractResource GetPortalConfigContractResource(ResourceIdentifier id) + { + PortalConfigContractResource.ValidateResourceId(id); + return new PortalConfigContractResource(Client, id); + } + /// /// Gets an object representing an along with the instance operations that can be performed on it but with no data. /// You can use to create an from its components. @@ -621,5 +729,17 @@ public virtual ApiManagementUserResource GetApiManagementUserResource(ResourceId ApiManagementUserResource.ValidateResourceId(id); return new ApiManagementUserResource(Client, id); } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DocumentationContractResource GetDocumentationContractResource(ResourceIdentifier id) + { + DocumentationContractResource.ValidateResourceId(id); + return new DocumentationContractResource(Client, id); + } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/MockableApiManagementResourceGroupResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/MockableApiManagementResourceGroupResource.cs index 9514323645906..d7eeb299e0795 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/MockableApiManagementResourceGroupResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/MockableApiManagementResourceGroupResource.cs @@ -53,7 +53,7 @@ public virtual ApiManagementServiceCollection GetApiManagementServices() /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task> GetApiManageme /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/MockableApiManagementSubscriptionResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/MockableApiManagementSubscriptionResource.cs index 19843b5f6bfc6..e2981468c8dd2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/MockableApiManagementSubscriptionResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/MockableApiManagementSubscriptionResource.cs @@ -70,7 +70,7 @@ public virtual ApiManagementDeletedServiceCollection GetApiManagementDeletedServ /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -102,7 +102,7 @@ public virtual async Task> GetApiM /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -134,7 +134,7 @@ public virtual Response GetApiManagementDel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -164,7 +164,7 @@ public virtual AsyncPageable GetApiManageme /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -194,7 +194,7 @@ public virtual Pageable GetApiManagementDel /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual AsyncPageable GetApiManagementServi /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -254,7 +254,7 @@ public virtual Pageable GetApiManagementServices(C /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -296,7 +296,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -338,7 +338,7 @@ public virtual Response CheckApiMana /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -376,7 +376,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -414,7 +414,7 @@ public virtual Response /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -440,7 +440,7 @@ public virtual AsyncPageable GetApiManagementSkusAsync(Cancell /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Internal/BicepSerializationHelpers.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Internal/BicepSerializationHelpers.cs new file mode 100644 index 0000000000000..d971137925fbd --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Internal/BicepSerializationHelpers.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text; + +namespace Azure.ResourceManager.ApiManagement +{ + internal static class BicepSerializationHelpers + { + public static void AppendChildObject(StringBuilder stringBuilder, object childObject, ModelReaderWriterOptions options, int spaces, bool indentFirstLine, string formattedPropertyName) + { + string indent = new string(' ', spaces); + int emptyObjectLength = 2 + spaces + Environment.NewLine.Length + Environment.NewLine.Length; + int length = stringBuilder.Length; + bool inMultilineString = false; + + BinaryData data = ModelReaderWriter.Write(childObject, options); + string[] lines = data.ToString().Split(Environment.NewLine.ToCharArray(), StringSplitOptions.RemoveEmptyEntries); + for (int i = 0; i < lines.Length; i++) + { + string line = lines[i]; + if (inMultilineString) + { + if (line.Contains("'''")) + { + inMultilineString = false; + } + stringBuilder.AppendLine(line); + continue; + } + if (line.Contains("'''")) + { + inMultilineString = true; + stringBuilder.AppendLine($"{indent}{line}"); + continue; + } + if (i == 0 && !indentFirstLine) + { + stringBuilder.AppendLine($"{line}"); + } + else + { + stringBuilder.AppendLine($"{indent}{line}"); + } + } + if (stringBuilder.Length == length + emptyObjectLength) + { + stringBuilder.Length = stringBuilder.Length - emptyObjectLength - formattedPropertyName.Length; + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Internal/WirePathAttribute.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Internal/WirePathAttribute.cs new file mode 100644 index 0000000000000..bfd1c4d381e28 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Internal/WirePathAttribute.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.ApiManagement +{ + [AttributeUsage(AttributeTargets.Property)] + internal class WirePathAttribute : Attribute + { + private string _wirePath; + + public WirePathAttribute(string wirePath) + { + _wirePath = wirePath; + } + + public override string ToString() + { + return _wirePath; + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/IssueContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/IssueContractData.Serialization.cs index 02c353e26767e..36f20e4e76ef3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/IssueContractData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/IssueContractData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -235,6 +236,184 @@ internal static IssueContractData DeserializeIssueContractData(JsonElement eleme serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CreatedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" createdDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CreatedOn)) + { + builder.Append(" createdDate: "); + var formattedDateTimeString = TypeFormatters.ToString(CreatedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(State), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" state: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(State)) + { + builder.Append(" state: "); + builder.AppendLine($"'{State.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiId)) + { + builder.Append(" apiId: "); + builder.AppendLine($"'{ApiId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Title), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" title: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Title)) + { + builder.Append(" title: "); + if (Title.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Title}'''"); + } + else + { + builder.AppendLine($"'{Title}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UserId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" userId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UserId)) + { + builder.Append(" userId: "); + builder.AppendLine($"'{UserId.ToString()}'"); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -243,6 +422,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions o { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(IssueContractData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/IssueContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/IssueContractData.cs index 5aa0040ea2f61..ff148367dee77 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/IssueContractData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/IssueContractData.cs @@ -80,16 +80,22 @@ internal IssueContractData(ResourceIdentifier id, string name, ResourceType reso } /// Date and time when the issue was created. + [WirePath("properties.createdDate")] public DateTimeOffset? CreatedOn { get; set; } /// Status of the issue. + [WirePath("properties.state")] public IssueState? State { get; set; } /// A resource identifier for the API the issue was created for. + [WirePath("properties.apiId")] public ResourceIdentifier ApiId { get; set; } /// The issue title. + [WirePath("properties.title")] public string Title { get; set; } /// Text describing the issue. + [WirePath("properties.description")] public string Description { get; set; } /// A resource identifier for the user created the issue. + [WirePath("properties.userId")] public ResourceIdentifier UserId { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/LongRunningOperation/PolicyFragmentContractOperationSource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/LongRunningOperation/PolicyFragmentContractOperationSource.cs new file mode 100644 index 0000000000000..35a218457b1f5 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/LongRunningOperation/PolicyFragmentContractOperationSource.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement +{ + internal class PolicyFragmentContractOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal PolicyFragmentContractOperationSource(ArmClient client) + { + _client = client; + } + + PolicyFragmentContractResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = PolicyFragmentContractData.DeserializePolicyFragmentContractData(document.RootElement); + return new PolicyFragmentContractResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = PolicyFragmentContractData.DeserializePolicyFragmentContractData(document.RootElement); + return new PolicyFragmentContractResource(_client, data); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AccessInformationListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AccessInformationListResult.Serialization.cs index f9db70c8f9306..ba2d02bf0540d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AccessInformationListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AccessInformationListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static AccessInformationListResult DeserializeAccessInformationListResu return new AccessInformationListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrite { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(AccessInformationListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AdditionalLocation.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AdditionalLocation.Serialization.cs index 26b2503663e7d..0456e14621511 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AdditionalLocation.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AdditionalLocation.Serialization.cs @@ -8,7 +8,9 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; using System.Net; +using System.Text; using System.Text.Json; using Azure.Core; @@ -86,6 +88,21 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("gatewayRegionalUrl"u8); writer.WriteStringValue(GatewayRegionalUri.AbsoluteUri); } + if (Optional.IsDefined(NatGatewayState)) + { + writer.WritePropertyName("natGatewayState"u8); + writer.WriteStringValue(NatGatewayState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsCollectionDefined(OutboundPublicIPAddresses)) + { + writer.WritePropertyName("outboundPublicIPAddresses"u8); + writer.WriteStartArray(); + foreach (var item in OutboundPublicIPAddresses) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } if (Optional.IsDefined(DisableGateway)) { writer.WritePropertyName("disableGateway"u8); @@ -142,6 +159,8 @@ internal static AdditionalLocation DeserializeAdditionalLocation(JsonElement ele ResourceIdentifier publicIPAddressId = default; VirtualNetworkConfiguration virtualNetworkConfiguration = default; Uri gatewayRegionalUri = default; + ApiManagementNatGatewayState? natGatewayState = default; + IReadOnlyList outboundPublicIPAddresses = default; bool? disableGateway = default; PlatformVersion? platformVersion = default; IDictionary serializedAdditionalRawData = default; @@ -241,6 +260,29 @@ internal static AdditionalLocation DeserializeAdditionalLocation(JsonElement ele gatewayRegionalUri = new Uri(property.Value.GetString()); continue; } + if (property.NameEquals("natGatewayState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + natGatewayState = new ApiManagementNatGatewayState(property.Value.GetString()); + continue; + } + if (property.NameEquals("outboundPublicIPAddresses"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + outboundPublicIPAddresses = array; + continue; + } if (property.NameEquals("disableGateway"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -274,11 +316,274 @@ internal static AdditionalLocation DeserializeAdditionalLocation(JsonElement ele publicIPAddressId, virtualNetworkConfiguration, gatewayRegionalUri, + natGatewayState, + outboundPublicIPAddresses ?? new ChangeTrackingList(), disableGateway, platformVersion, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" location: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" location: "); + builder.AppendLine($"'{Location.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Sku), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sku: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Sku)) + { + builder.Append(" sku: "); + BicepSerializationHelpers.AppendChildObject(builder, Sku, options, 2, false, " sku: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Zones), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" zones: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Zones)) + { + if (Zones.Any()) + { + builder.Append(" zones: "); + builder.AppendLine("["); + foreach (var item in Zones) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublicIPAddresses), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" publicIPAddresses: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(PublicIPAddresses)) + { + if (PublicIPAddresses.Any()) + { + builder.Append(" publicIPAddresses: "); + builder.AppendLine("["); + foreach (var item in PublicIPAddresses) + { + if (item == null) + { + builder.Append("null"); + continue; + } + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PrivateIPAddresses), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" privateIPAddresses: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(PrivateIPAddresses)) + { + if (PrivateIPAddresses.Any()) + { + builder.Append(" privateIPAddresses: "); + builder.AppendLine("["); + foreach (var item in PrivateIPAddresses) + { + if (item == null) + { + builder.Append("null"); + continue; + } + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublicIPAddressId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" publicIpAddressId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PublicIPAddressId)) + { + builder.Append(" publicIpAddressId: "); + builder.AppendLine($"'{PublicIPAddressId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VirtualNetworkConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" virtualNetworkConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(VirtualNetworkConfiguration)) + { + builder.Append(" virtualNetworkConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, VirtualNetworkConfiguration, options, 2, false, " virtualNetworkConfiguration: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GatewayRegionalUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" gatewayRegionalUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(GatewayRegionalUri)) + { + builder.Append(" gatewayRegionalUrl: "); + builder.AppendLine($"'{GatewayRegionalUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NatGatewayState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" natGatewayState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NatGatewayState)) + { + builder.Append(" natGatewayState: "); + builder.AppendLine($"'{NatGatewayState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OutboundPublicIPAddresses), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" outboundPublicIPAddresses: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(OutboundPublicIPAddresses)) + { + if (OutboundPublicIPAddresses.Any()) + { + builder.Append(" outboundPublicIPAddresses: "); + builder.AppendLine("["); + foreach (var item in OutboundPublicIPAddresses) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DisableGateway), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" disableGateway: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DisableGateway)) + { + builder.Append(" disableGateway: "); + var boolValue = DisableGateway.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PlatformVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" platformVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PlatformVersion)) + { + builder.Append(" platformVersion: "); + builder.AppendLine($"'{PlatformVersion.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -287,6 +592,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(AdditionalLocation)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AdditionalLocation.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AdditionalLocation.cs index e7c94ae3c4ce8..7b250444258f1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AdditionalLocation.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AdditionalLocation.cs @@ -60,6 +60,7 @@ public AdditionalLocation(AzureLocation location, ApiManagementServiceSkuPropert Zones = new ChangeTrackingList(); PublicIPAddresses = new ChangeTrackingList(); PrivateIPAddresses = new ChangeTrackingList(); + OutboundPublicIPAddresses = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -71,10 +72,12 @@ public AdditionalLocation(AzureLocation location, ApiManagementServiceSkuPropert /// Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the location. Supported only for Premium SKU being deployed in Virtual Network. /// Virtual network configuration for the location. /// Gateway URL of the API Management service in the Region. + /// Property can be used to enable NAT Gateway for this API Management service. + /// Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. /// Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in this additional location. /// Compute Platform Version running the service. /// Keeps track of any properties unknown to the library. - internal AdditionalLocation(AzureLocation location, ApiManagementServiceSkuProperties sku, IList zones, IReadOnlyList publicIPAddresses, IReadOnlyList privateIPAddresses, ResourceIdentifier publicIPAddressId, VirtualNetworkConfiguration virtualNetworkConfiguration, Uri gatewayRegionalUri, bool? disableGateway, PlatformVersion? platformVersion, IDictionary serializedAdditionalRawData) + internal AdditionalLocation(AzureLocation location, ApiManagementServiceSkuProperties sku, IList zones, IReadOnlyList publicIPAddresses, IReadOnlyList privateIPAddresses, ResourceIdentifier publicIPAddressId, VirtualNetworkConfiguration virtualNetworkConfiguration, Uri gatewayRegionalUri, ApiManagementNatGatewayState? natGatewayState, IReadOnlyList outboundPublicIPAddresses, bool? disableGateway, PlatformVersion? platformVersion, IDictionary serializedAdditionalRawData) { Location = location; Sku = sku; @@ -84,6 +87,8 @@ internal AdditionalLocation(AzureLocation location, ApiManagementServiceSkuPrope PublicIPAddressId = publicIPAddressId; VirtualNetworkConfiguration = virtualNetworkConfiguration; GatewayRegionalUri = gatewayRegionalUri; + NatGatewayState = natGatewayState; + OutboundPublicIPAddresses = outboundPublicIPAddresses; DisableGateway = disableGateway; PlatformVersion = platformVersion; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -95,24 +100,40 @@ internal AdditionalLocation() } /// The location name of the additional region among Azure Data center regions. + [WirePath("location")] public AzureLocation Location { get; set; } /// SKU properties of the API Management service. + [WirePath("sku")] public ApiManagementServiceSkuProperties Sku { get; set; } /// A list of availability zones denoting where the resource needs to come from. + [WirePath("zones")] public IList Zones { get; } /// Public Static Load Balanced IP addresses of the API Management service in the additional location. Available only for Basic, Standard, Premium and Isolated SKU. + [WirePath("publicIPAddresses")] public IReadOnlyList PublicIPAddresses { get; } /// Private Static Load Balanced IP addresses of the API Management service which is deployed in an Internal Virtual Network in a particular additional location. Available only for Basic, Standard, Premium and Isolated SKU. + [WirePath("privateIPAddresses")] public IReadOnlyList PrivateIPAddresses { get; } /// Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the location. Supported only for Premium SKU being deployed in Virtual Network. + [WirePath("publicIpAddressId")] public ResourceIdentifier PublicIPAddressId { get; set; } /// Virtual network configuration for the location. + [WirePath("virtualNetworkConfiguration")] public VirtualNetworkConfiguration VirtualNetworkConfiguration { get; set; } /// Gateway URL of the API Management service in the Region. + [WirePath("gatewayRegionalUrl")] public Uri GatewayRegionalUri { get; } + /// Property can be used to enable NAT Gateway for this API Management service. + [WirePath("natGatewayState")] + public ApiManagementNatGatewayState? NatGatewayState { get; set; } + /// Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. + [WirePath("outboundPublicIPAddresses")] + public IReadOnlyList OutboundPublicIPAddresses { get; } /// Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in this additional location. + [WirePath("disableGateway")] public bool? DisableGateway { get; set; } /// Compute Platform Version running the service. + [WirePath("platformVersion")] public PlatformVersion? PlatformVersion { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiContactInformation.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiContactInformation.Serialization.cs index 97a0b5b68fdfe..22d873e11081c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiContactInformation.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiContactInformation.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -114,6 +115,82 @@ internal static ApiContactInformation DeserializeApiContactInformation(JsonEleme return new ApiContactInformation(name, uri, email, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Uri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" url: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Uri)) + { + builder.Append(" url: "); + builder.AppendLine($"'{Uri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Email), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" email: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Email)) + { + builder.Append(" email: "); + if (Email.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Email}'''"); + } + else + { + builder.AppendLine($"'{Email}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -122,6 +199,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiContactInformation)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiContactInformation.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiContactInformation.cs index 23e7adc66caea..529f32388450b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiContactInformation.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiContactInformation.cs @@ -64,10 +64,13 @@ internal ApiContactInformation(string name, Uri uri, string email, IDictionary The identifying name of the contact person/organization. + [WirePath("name")] public string Name { get; set; } /// The URL pointing to the contact information. MUST be in the format of a URL. + [WirePath("url")] public Uri Uri { get; set; } /// The email address of the contact person/organization. MUST be in the format of an email address. + [WirePath("email")] public string Email { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdateContent.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdateContent.Serialization.cs index ee8c14c040e1a..e5e49f9600450 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdateContent.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdateContent.Serialization.cs @@ -158,6 +158,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WritePropertyName("apiType"u8); writer.WriteStringValue(SoapApiType.Value.ToString()); } + if (Optional.IsDefined(TranslateRequiredQueryParametersConduct)) + { + writer.WritePropertyName("translateRequiredQueryParameters"u8); + writer.WriteStringValue(TranslateRequiredQueryParametersConduct.Value.ToString()); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -222,6 +227,7 @@ internal static ApiCreateOrUpdateContent DeserializeApiCreateOrUpdateContent(Jso ContentFormat? format = default; ApiCreateOrUpdatePropertiesWsdlSelector wsdlSelector = default; SoapApiType? apiType = default; + TranslateRequiredQueryParametersConduct? translateRequiredQueryParameters = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -425,6 +431,15 @@ internal static ApiCreateOrUpdateContent DeserializeApiCreateOrUpdateContent(Jso apiType = new SoapApiType(property0.Value.GetString()); continue; } + if (property0.NameEquals("translateRequiredQueryParameters"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + translateRequiredQueryParameters = new TranslateRequiredQueryParametersConduct(property0.Value.GetString()); + continue; + } } continue; } @@ -460,6 +475,7 @@ internal static ApiCreateOrUpdateContent DeserializeApiCreateOrUpdateContent(Jso format, wsdlSelector, apiType, + translateRequiredQueryParameters, serializedAdditionalRawData); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdateContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdateContent.cs index 00b71cc243218..5f4e29f45b162 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdateContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdateContent.cs @@ -84,8 +84,9 @@ public ApiCreateOrUpdateContent() /// * `websocket` creates websocket API /// * `graphql` creates GraphQL API. /// + /// Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', 'query'. /// Keeps track of any properties unknown to the library. - internal ApiCreateOrUpdateContent(string description, AuthenticationSettingsContract authenticationSettings, SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, string termsOfServiceLink, ApiContactInformation contact, ApiLicenseInformation license, ResourceIdentifier sourceApiId, string displayName, string serviceLink, string path, IList protocols, ApiVersionSetContractDetails apiVersionSet, string value, ContentFormat? format, ApiCreateOrUpdatePropertiesWsdlSelector wsdlSelector, SoapApiType? soapApiType, IDictionary serializedAdditionalRawData) + internal ApiCreateOrUpdateContent(string description, AuthenticationSettingsContract authenticationSettings, SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, string termsOfServiceLink, ApiContactInformation contact, ApiLicenseInformation license, ResourceIdentifier sourceApiId, string displayName, string serviceLink, string path, IList protocols, ApiVersionSetContractDetails apiVersionSet, string value, ContentFormat? format, ApiCreateOrUpdatePropertiesWsdlSelector wsdlSelector, SoapApiType? soapApiType, TranslateRequiredQueryParametersConduct? translateRequiredQueryParametersConduct, IDictionary serializedAdditionalRawData) { Description = description; AuthenticationSettings = authenticationSettings; @@ -112,56 +113,81 @@ internal ApiCreateOrUpdateContent(string description, AuthenticationSettingsCont Format = format; WsdlSelector = wsdlSelector; SoapApiType = soapApiType; + TranslateRequiredQueryParametersConduct = translateRequiredQueryParametersConduct; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Description of the API. May include HTML formatting tags. + [WirePath("properties.description")] public string Description { get; set; } /// Collection of authentication settings included into this API. + [WirePath("properties.authenticationSettings")] public AuthenticationSettingsContract AuthenticationSettings { get; set; } /// Protocols over which API is made available. + [WirePath("properties.subscriptionKeyParameterNames")] public SubscriptionKeyParameterNamesContract SubscriptionKeyParameterNames { get; set; } /// Type of API. + [WirePath("properties.type")] public ApiType? ApiType { get; set; } /// Describes the revision of the API. If no value is provided, default revision 1 is created. + [WirePath("properties.apiRevision")] public string ApiRevision { get; set; } /// Indicates the version identifier of the API if the API is versioned. + [WirePath("properties.apiVersion")] public string ApiVersion { get; set; } /// Indicates if API revision is current api revision. + [WirePath("properties.isCurrent")] public bool? IsCurrent { get; set; } /// Indicates if API revision is accessible via the gateway. + [WirePath("properties.isOnline")] public bool? IsOnline { get; } /// Description of the API Revision. + [WirePath("properties.apiRevisionDescription")] public string ApiRevisionDescription { get; set; } /// Description of the API Version. + [WirePath("properties.apiVersionDescription")] public string ApiVersionDescription { get; set; } /// A resource identifier for the related ApiVersionSet. + [WirePath("properties.apiVersionSetId")] public ResourceIdentifier ApiVersionSetId { get; set; } /// Specifies whether an API or Product subscription is required for accessing the API. + [WirePath("properties.subscriptionRequired")] public bool? IsSubscriptionRequired { get; set; } /// A URL to the Terms of Service for the API. MUST be in the format of a URL. + [WirePath("properties.termsOfServiceUrl")] public string TermsOfServiceLink { get; set; } /// Contact information for the API. + [WirePath("properties.contact")] public ApiContactInformation Contact { get; set; } /// License information for the API. + [WirePath("properties.license")] public ApiLicenseInformation License { get; set; } /// API identifier of the source API. + [WirePath("properties.sourceApiId")] public ResourceIdentifier SourceApiId { get; set; } /// API name. Must be 1 to 300 characters long. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. + [WirePath("properties.serviceUrl")] public string ServiceLink { get; set; } /// Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. + [WirePath("properties.path")] public string Path { get; set; } /// Describes on which protocols the operations in this API can be invoked. + [WirePath("properties.protocols")] public IList Protocols { get; } /// Version set details. + [WirePath("properties.apiVersionSet")] public ApiVersionSetContractDetails ApiVersionSet { get; set; } /// Content value when Importing an API. + [WirePath("properties.value")] public string Value { get; set; } /// Format of the Content in which the API is getting imported. + [WirePath("properties.format")] public ContentFormat? Format { get; set; } /// Criteria to limit import of WSDL to a subset of the document. + [WirePath("properties.wsdlSelector")] public ApiCreateOrUpdatePropertiesWsdlSelector WsdlSelector { get; set; } /// /// Type of API to create. @@ -170,6 +196,10 @@ internal ApiCreateOrUpdateContent(string description, AuthenticationSettingsCont /// * `websocket` creates websocket API /// * `graphql` creates GraphQL API. /// + [WirePath("properties.apiType")] public SoapApiType? SoapApiType { get; set; } + /// Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', 'query'. + [WirePath("properties.translateRequiredQueryParameters")] + public TranslateRequiredQueryParametersConduct? TranslateRequiredQueryParametersConduct { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdatePropertiesWsdlSelector.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdatePropertiesWsdlSelector.Serialization.cs index 3154ad4809265..fb79997f544da 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdatePropertiesWsdlSelector.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdatePropertiesWsdlSelector.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -99,6 +100,67 @@ internal static ApiCreateOrUpdatePropertiesWsdlSelector DeserializeApiCreateOrUp return new ApiCreateOrUpdatePropertiesWsdlSelector(wsdlServiceName, wsdlEndpointName, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(WsdlServiceName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" wsdlServiceName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(WsdlServiceName)) + { + builder.Append(" wsdlServiceName: "); + if (WsdlServiceName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{WsdlServiceName}'''"); + } + else + { + builder.AppendLine($"'{WsdlServiceName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(WsdlEndpointName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" wsdlEndpointName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(WsdlEndpointName)) + { + builder.Append(" wsdlEndpointName: "); + if (WsdlEndpointName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{WsdlEndpointName}'''"); + } + else + { + builder.AppendLine($"'{WsdlEndpointName}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -107,6 +169,8 @@ BinaryData IPersistableModel.Write(Mode { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiCreateOrUpdatePropertiesWsdlSelector)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdatePropertiesWsdlSelector.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdatePropertiesWsdlSelector.cs index 5afe74cf3f2d3..e90b78cf237de 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdatePropertiesWsdlSelector.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdatePropertiesWsdlSelector.cs @@ -62,8 +62,10 @@ internal ApiCreateOrUpdatePropertiesWsdlSelector(string wsdlServiceName, string } /// Name of service to import from WSDL. + [WirePath("wsdlServiceName")] public string WsdlServiceName { get; set; } /// Name of endpoint(port) to import from WSDL. + [WirePath("wsdlEndpointName")] public string WsdlEndpointName { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiEntityBaseContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiEntityBaseContract.Serialization.cs index 0bc19d546b6c0..f60ed776a6988 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiEntityBaseContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiEntityBaseContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -294,6 +295,297 @@ internal static ApiEntityBaseContract DeserializeApiEntityBaseContract(JsonEleme serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AuthenticationSettings), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" authenticationSettings: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AuthenticationSettings)) + { + builder.Append(" authenticationSettings: "); + BicepSerializationHelpers.AppendChildObject(builder, AuthenticationSettings, options, 2, false, " authenticationSettings: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SubscriptionKeyParameterNames), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionKeyParameterNames: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SubscriptionKeyParameterNames)) + { + builder.Append(" subscriptionKeyParameterNames: "); + BicepSerializationHelpers.AppendChildObject(builder, SubscriptionKeyParameterNames, options, 2, false, " subscriptionKeyParameterNames: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiType)) + { + builder.Append(" type: "); + builder.AppendLine($"'{ApiType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiRevision), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiRevision: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiRevision)) + { + builder.Append(" apiRevision: "); + if (ApiRevision.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiRevision}'''"); + } + else + { + builder.AppendLine($"'{ApiRevision}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersion)) + { + builder.Append(" apiVersion: "); + if (ApiVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiVersion}'''"); + } + else + { + builder.AppendLine($"'{ApiVersion}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsCurrent), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isCurrent: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsCurrent)) + { + builder.Append(" isCurrent: "); + var boolValue = IsCurrent.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsOnline), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isOnline: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsOnline)) + { + builder.Append(" isOnline: "); + var boolValue = IsOnline.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiRevisionDescription), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiRevisionDescription: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiRevisionDescription)) + { + builder.Append(" apiRevisionDescription: "); + if (ApiRevisionDescription.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiRevisionDescription}'''"); + } + else + { + builder.AppendLine($"'{ApiRevisionDescription}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersionDescription), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersionDescription: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersionDescription)) + { + builder.Append(" apiVersionDescription: "); + if (ApiVersionDescription.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiVersionDescription}'''"); + } + else + { + builder.AppendLine($"'{ApiVersionDescription}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersionSetId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersionSetId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersionSetId)) + { + builder.Append(" apiVersionSetId: "); + builder.AppendLine($"'{ApiVersionSetId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsSubscriptionRequired), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionRequired: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsSubscriptionRequired)) + { + builder.Append(" subscriptionRequired: "); + var boolValue = IsSubscriptionRequired.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TermsOfServiceLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" termsOfServiceUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TermsOfServiceLink)) + { + builder.Append(" termsOfServiceUrl: "); + if (TermsOfServiceLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TermsOfServiceLink}'''"); + } + else + { + builder.AppendLine($"'{TermsOfServiceLink}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Contact), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" contact: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Contact)) + { + builder.Append(" contact: "); + BicepSerializationHelpers.AppendChildObject(builder, Contact, options, 2, false, " contact: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(License), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" license: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(License)) + { + builder.Append(" license: "); + BicepSerializationHelpers.AppendChildObject(builder, License, options, 2, false, " license: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -302,6 +594,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiEntityBaseContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiEntityBaseContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiEntityBaseContract.cs index 118dc6f7fe770..0991e5c62670e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiEntityBaseContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiEntityBaseContract.cs @@ -89,34 +89,49 @@ internal ApiEntityBaseContract(string description, AuthenticationSettingsContrac } /// Description of the API. May include HTML formatting tags. + [WirePath("description")] public string Description { get; } /// Collection of authentication settings included into this API. + [WirePath("authenticationSettings")] public AuthenticationSettingsContract AuthenticationSettings { get; } /// Protocols over which API is made available. + [WirePath("subscriptionKeyParameterNames")] public SubscriptionKeyParameterNamesContract SubscriptionKeyParameterNames { get; } /// Type of API. + [WirePath("type")] public ApiType? ApiType { get; } /// Describes the revision of the API. If no value is provided, default revision 1 is created. + [WirePath("apiRevision")] public string ApiRevision { get; } /// Indicates the version identifier of the API if the API is versioned. + [WirePath("apiVersion")] public string ApiVersion { get; } /// Indicates if API revision is current api revision. + [WirePath("isCurrent")] public bool? IsCurrent { get; } /// Indicates if API revision is accessible via the gateway. + [WirePath("isOnline")] public bool? IsOnline { get; } /// Description of the API Revision. + [WirePath("apiRevisionDescription")] public string ApiRevisionDescription { get; } /// Description of the API Version. + [WirePath("apiVersionDescription")] public string ApiVersionDescription { get; } /// A resource identifier for the related ApiVersionSet. + [WirePath("apiVersionSetId")] public ResourceIdentifier ApiVersionSetId { get; } /// Specifies whether an API or Product subscription is required for accessing the API. + [WirePath("subscriptionRequired")] public bool? IsSubscriptionRequired { get; } /// A URL to the Terms of Service for the API. MUST be in the format of a URL. + [WirePath("termsOfServiceUrl")] public string TermsOfServiceLink { get; } /// Contact information for the API. + [WirePath("contact")] public ApiContactInformation Contact { get; } /// License information for the API. + [WirePath("license")] public ApiLicenseInformation License { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiIssuePatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiIssuePatch.cs index 46a2a3bd828b9..c1ea48798f030 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiIssuePatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiIssuePatch.cs @@ -71,16 +71,22 @@ internal ApiIssuePatch(DateTimeOffset? createdOn, IssueState? state, ResourceIde } /// Date and time when the issue was created. + [WirePath("properties.createdDate")] public DateTimeOffset? CreatedOn { get; set; } /// Status of the issue. + [WirePath("properties.state")] public IssueState? State { get; set; } /// A resource identifier for the API the issue was created for. + [WirePath("properties.apiId")] public ResourceIdentifier ApiId { get; set; } /// The issue title. + [WirePath("properties.title")] public string Title { get; set; } /// Text describing the issue. + [WirePath("properties.description")] public string Description { get; set; } /// A resource identifier for the user created the issue. + [WirePath("properties.userId")] public string UserId { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiLicenseInformation.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiLicenseInformation.Serialization.cs index 357a82776e498..22f90ea82e652 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiLicenseInformation.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiLicenseInformation.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -103,6 +104,59 @@ internal static ApiLicenseInformation DeserializeApiLicenseInformation(JsonEleme return new ApiLicenseInformation(name, uri, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Uri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" url: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Uri)) + { + builder.Append(" url: "); + builder.AppendLine($"'{Uri.AbsoluteUri}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -111,6 +165,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiLicenseInformation)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiLicenseInformation.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiLicenseInformation.cs index 3f1256a0d298a..b21dc4b340ce1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiLicenseInformation.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiLicenseInformation.cs @@ -62,8 +62,10 @@ internal ApiLicenseInformation(string name, Uri uri, IDictionary The license name used for the API. + [WirePath("name")] public string Name { get; set; } /// A URL to the license used for the API. MUST be in the format of a URL. + [WirePath("url")] public Uri Uri { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiListResult.Serialization.cs index ee1ea7b06f32d..a9f59a70e52a5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static ApiListResult DeserializeApiListResult(JsonElement element, Mode return new ApiListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions optio { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationError.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationError.Serialization.cs new file mode 100644 index 0000000000000..f98f0545b6e6d --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationError.Serialization.cs @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + public partial class ApiManagementAuthorizationError : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApiManagementAuthorizationError)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + } + if (Optional.IsDefined(Message)) + { + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ApiManagementAuthorizationError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApiManagementAuthorizationError)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementAuthorizationError(document.RootElement, options); + } + + internal static ApiManagementAuthorizationError DeserializeApiManagementAuthorizationError(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string code = default; + string message = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementAuthorizationError(code, message, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Code), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" code: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Code)) + { + builder.Append(" code: "); + if (Code.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Code}'''"); + } + else + { + builder.AppendLine($"'{Code}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Message), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" message: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Message)) + { + builder.Append(" message: "); + if (Message.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Message}'''"); + } + else + { + builder.AppendLine($"'{Message}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ApiManagementAuthorizationError)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementAuthorizationError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeApiManagementAuthorizationError(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementAuthorizationError)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationError.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationError.cs new file mode 100644 index 0000000000000..af1e111a8f49d --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationError.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// Authorization error details. + public partial class ApiManagementAuthorizationError + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ApiManagementAuthorizationError() + { + } + + /// Initializes a new instance of . + /// Error code. + /// Error message. + /// Keeps track of any properties unknown to the library. + internal ApiManagementAuthorizationError(string code, string message, IDictionary serializedAdditionalRawData) + { + Code = code; + Message = message; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Error code. + [WirePath("code")] + public string Code { get; set; } + /// Error message. + [WirePath("message")] + public string Message { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationServerPatch.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationServerPatch.Serialization.cs index 8febff3e9d568..9d8e85f1f9205 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationServerPatch.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationServerPatch.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -124,6 +126,16 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WritePropertyName("displayName"u8); writer.WriteStringValue(DisplayName); } + if (Optional.IsDefined(UseInTestConsole)) + { + writer.WritePropertyName("useInTestConsole"u8); + writer.WriteBooleanValue(UseInTestConsole.Value); + } + if (Optional.IsDefined(UseInApiDocumentation)) + { + writer.WritePropertyName("useInApiDocumentation"u8); + writer.WriteBooleanValue(UseInApiDocumentation.Value); + } if (Optional.IsDefined(ClientRegistrationEndpoint)) { writer.WritePropertyName("clientRegistrationEndpoint"u8); @@ -208,6 +220,8 @@ internal static ApiManagementAuthorizationServerPatch DeserializeApiManagementAu string resourceOwnerUsername = default; string resourceOwnerPassword = default; string displayName = default; + bool? useInTestConsole = default; + bool? useInApiDocumentation = default; string clientRegistrationEndpoint = default; string authorizationEndpoint = default; IList grantTypes = default; @@ -345,6 +359,24 @@ internal static ApiManagementAuthorizationServerPatch DeserializeApiManagementAu displayName = property0.Value.GetString(); continue; } + if (property0.NameEquals("useInTestConsole"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useInTestConsole = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("useInApiDocumentation"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useInApiDocumentation = property0.Value.GetBoolean(); + continue; + } if (property0.NameEquals("clientRegistrationEndpoint"u8)) { clientRegistrationEndpoint = property0.Value.GetString(); @@ -404,6 +436,8 @@ internal static ApiManagementAuthorizationServerPatch DeserializeApiManagementAu resourceOwnerUsername, resourceOwnerPassword, displayName, + useInTestConsole, + useInApiDocumentation, clientRegistrationEndpoint, authorizationEndpoint, grantTypes ?? new ChangeTrackingList(), @@ -412,6 +446,470 @@ internal static ApiManagementAuthorizationServerPatch DeserializeApiManagementAu serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AuthorizationMethods), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" authorizationMethods: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(AuthorizationMethods)) + { + if (AuthorizationMethods.Any()) + { + builder.Append(" authorizationMethods: "); + builder.AppendLine("["); + foreach (var item in AuthorizationMethods) + { + builder.AppendLine($" '{item.ToSerialString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientAuthenticationMethods), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientAuthenticationMethod: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ClientAuthenticationMethods)) + { + if (ClientAuthenticationMethods.Any()) + { + builder.Append(" clientAuthenticationMethod: "); + builder.AppendLine("["); + foreach (var item in ClientAuthenticationMethods) + { + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TokenBodyParameters), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tokenBodyParameters: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(TokenBodyParameters)) + { + if (TokenBodyParameters.Any()) + { + builder.Append(" tokenBodyParameters: "); + builder.AppendLine("["); + foreach (var item in TokenBodyParameters) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " tokenBodyParameters: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TokenEndpoint), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tokenEndpoint: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TokenEndpoint)) + { + builder.Append(" tokenEndpoint: "); + if (TokenEndpoint.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TokenEndpoint}'''"); + } + else + { + builder.AppendLine($"'{TokenEndpoint}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DoesSupportState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" supportState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DoesSupportState)) + { + builder.Append(" supportState: "); + var boolValue = DoesSupportState.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DefaultScope), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" defaultScope: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DefaultScope)) + { + builder.Append(" defaultScope: "); + if (DefaultScope.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DefaultScope}'''"); + } + else + { + builder.AppendLine($"'{DefaultScope}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(BearerTokenSendingMethods), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" bearerTokenSendingMethods: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(BearerTokenSendingMethods)) + { + if (BearerTokenSendingMethods.Any()) + { + builder.Append(" bearerTokenSendingMethods: "); + builder.AppendLine("["); + foreach (var item in BearerTokenSendingMethods) + { + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceOwnerUsername), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceOwnerUsername: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceOwnerUsername)) + { + builder.Append(" resourceOwnerUsername: "); + if (ResourceOwnerUsername.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ResourceOwnerUsername}'''"); + } + else + { + builder.AppendLine($"'{ResourceOwnerUsername}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceOwnerPassword), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceOwnerPassword: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceOwnerPassword)) + { + builder.Append(" resourceOwnerPassword: "); + if (ResourceOwnerPassword.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ResourceOwnerPassword}'''"); + } + else + { + builder.AppendLine($"'{ResourceOwnerPassword}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DisplayName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" displayName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DisplayName)) + { + builder.Append(" displayName: "); + if (DisplayName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DisplayName}'''"); + } + else + { + builder.AppendLine($"'{DisplayName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UseInTestConsole), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" useInTestConsole: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UseInTestConsole)) + { + builder.Append(" useInTestConsole: "); + var boolValue = UseInTestConsole.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UseInApiDocumentation), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" useInApiDocumentation: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UseInApiDocumentation)) + { + builder.Append(" useInApiDocumentation: "); + var boolValue = UseInApiDocumentation.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientRegistrationEndpoint), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientRegistrationEndpoint: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientRegistrationEndpoint)) + { + builder.Append(" clientRegistrationEndpoint: "); + if (ClientRegistrationEndpoint.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientRegistrationEndpoint}'''"); + } + else + { + builder.AppendLine($"'{ClientRegistrationEndpoint}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AuthorizationEndpoint), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" authorizationEndpoint: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AuthorizationEndpoint)) + { + builder.Append(" authorizationEndpoint: "); + if (AuthorizationEndpoint.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AuthorizationEndpoint}'''"); + } + else + { + builder.AppendLine($"'{AuthorizationEndpoint}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GrantTypes), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" grantTypes: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(GrantTypes)) + { + if (GrantTypes.Any()) + { + builder.Append(" grantTypes: "); + builder.AppendLine("["); + foreach (var item in GrantTypes) + { + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientId)) + { + builder.Append(" clientId: "); + if (ClientId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientId}'''"); + } + else + { + builder.AppendLine($"'{ClientId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientSecret), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientSecret: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientSecret)) + { + builder.Append(" clientSecret: "); + if (ClientSecret.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientSecret}'''"); + } + else + { + builder.AppendLine($"'{ClientSecret}'"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -420,6 +918,8 @@ BinaryData IPersistableModel.Write(ModelR { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementAuthorizationServerPatch)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationServerPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationServerPatch.cs index ffa2d8d830857..4ab0b289c2198 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationServerPatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationServerPatch.cs @@ -73,13 +73,15 @@ public ApiManagementAuthorizationServerPatch() /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. /// User-friendly authorization server name. + /// If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. + /// If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. /// Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. /// OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. /// Form of an authorization grant, which the client uses to request the access token. /// Client or app id registered with this authorization server. /// Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. /// Keeps track of any properties unknown to the library. - internal ApiManagementAuthorizationServerPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, IList authorizationMethods, IList clientAuthenticationMethods, IList tokenBodyParameters, string tokenEndpoint, bool? doesSupportState, string defaultScope, IList bearerTokenSendingMethods, string resourceOwnerUsername, string resourceOwnerPassword, string displayName, string clientRegistrationEndpoint, string authorizationEndpoint, IList grantTypes, string clientId, string clientSecret, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ApiManagementAuthorizationServerPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, IList authorizationMethods, IList clientAuthenticationMethods, IList tokenBodyParameters, string tokenEndpoint, bool? doesSupportState, string defaultScope, IList bearerTokenSendingMethods, string resourceOwnerUsername, string resourceOwnerPassword, string displayName, bool? useInTestConsole, bool? useInApiDocumentation, string clientRegistrationEndpoint, string authorizationEndpoint, IList grantTypes, string clientId, string clientSecret, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { Description = description; AuthorizationMethods = authorizationMethods; @@ -92,6 +94,8 @@ internal ApiManagementAuthorizationServerPatch(ResourceIdentifier id, string nam ResourceOwnerUsername = resourceOwnerUsername; ResourceOwnerPassword = resourceOwnerPassword; DisplayName = displayName; + UseInTestConsole = useInTestConsole; + UseInApiDocumentation = useInApiDocumentation; ClientRegistrationEndpoint = clientRegistrationEndpoint; AuthorizationEndpoint = authorizationEndpoint; GrantTypes = grantTypes; @@ -101,36 +105,58 @@ internal ApiManagementAuthorizationServerPatch(ResourceIdentifier id, string nam } /// Description of the authorization server. Can contain HTML formatting tags. + [WirePath("properties.description")] public string Description { get; set; } /// HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. + [WirePath("properties.authorizationMethods")] public IList AuthorizationMethods { get; } /// Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format. + [WirePath("properties.clientAuthenticationMethod")] public IList ClientAuthenticationMethods { get; } /// Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}. + [WirePath("properties.tokenBodyParameters")] public IList TokenBodyParameters { get; } /// OAuth token endpoint. Contains absolute URI to entity being referenced. + [WirePath("properties.tokenEndpoint")] public string TokenEndpoint { get; set; } /// If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security. + [WirePath("properties.supportState")] public bool? DoesSupportState { get; set; } /// Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values. + [WirePath("properties.defaultScope")] public string DefaultScope { get; set; } /// Specifies the mechanism by which access token is passed to the API. + [WirePath("properties.bearerTokenSendingMethods")] public IList BearerTokenSendingMethods { get; } /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. + [WirePath("properties.resourceOwnerUsername")] public string ResourceOwnerUsername { get; set; } /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. + [WirePath("properties.resourceOwnerPassword")] public string ResourceOwnerPassword { get; set; } /// User-friendly authorization server name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } + /// If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. + [WirePath("properties.useInTestConsole")] + public bool? UseInTestConsole { get; set; } + /// If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. + [WirePath("properties.useInApiDocumentation")] + public bool? UseInApiDocumentation { get; set; } /// Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. + [WirePath("properties.clientRegistrationEndpoint")] public string ClientRegistrationEndpoint { get; set; } /// OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. + [WirePath("properties.authorizationEndpoint")] public string AuthorizationEndpoint { get; set; } /// Form of an authorization grant, which the client uses to request the access token. + [WirePath("properties.grantTypes")] public IList GrantTypes { get; } /// Client or app id registered with this authorization server. + [WirePath("properties.clientId")] public string ClientId { get; set; } /// Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + [WirePath("properties.clientSecret")] public string ClientSecret { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationType.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationType.cs new file mode 100644 index 0000000000000..a66fe58bab885 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementAuthorizationType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// Authorization type options. + public readonly partial struct ApiManagementAuthorizationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ApiManagementAuthorizationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string OAuth2Value = "OAuth2"; + + /// OAuth2 authorization type. + public static ApiManagementAuthorizationType OAuth2 { get; } = new ApiManagementAuthorizationType(OAuth2Value); + /// Determines if two values are the same. + public static bool operator ==(ApiManagementAuthorizationType left, ApiManagementAuthorizationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ApiManagementAuthorizationType left, ApiManagementAuthorizationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ApiManagementAuthorizationType(string value) => new ApiManagementAuthorizationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ApiManagementAuthorizationType other && Equals(other); + /// + public bool Equals(ApiManagementAuthorizationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementBackendPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementBackendPatch.cs index 8568ba8466b01..38a46c38895f4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementBackendPatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementBackendPatch.cs @@ -53,10 +53,10 @@ public ApiManagementBackendPatch() /// Initializes a new instance of . /// Backend Title. /// Backend Description. - /// Management Uri of the Resource in External System. This url can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. + /// Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. /// Backend Properties contract. /// Backend Credentials Contract Properties. - /// Backend Proxy Contract Properties. + /// Backend gateway Contract Properties. /// Backend TLS Properties. /// Runtime Url of the Backend. /// Backend communication protocol. @@ -76,14 +76,18 @@ internal ApiManagementBackendPatch(string title, string description, Uri resourc } /// Backend Title. + [WirePath("properties.title")] public string Title { get; set; } /// Backend Description. + [WirePath("properties.description")] public string Description { get; set; } - /// Management Uri of the Resource in External System. This url can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. + /// Management Uri of the Resource in External System. This URL can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. + [WirePath("properties.resourceId")] public Uri ResourceUri { get; set; } /// Backend Properties contract. internal BackendProperties Properties { get; set; } /// Backend Service Fabric Cluster Properties. + [WirePath("properties.properties.serviceFabricCluster")] public BackendServiceFabricClusterProperties BackendServiceFabricCluster { get => Properties is null ? default : Properties.ServiceFabricCluster; @@ -96,14 +100,19 @@ public BackendServiceFabricClusterProperties BackendServiceFabricCluster } /// Backend Credentials Contract Properties. + [WirePath("properties.credentials")] public BackendCredentialsContract Credentials { get; set; } - /// Backend Proxy Contract Properties. + /// Backend gateway Contract Properties. + [WirePath("properties.proxy")] public BackendProxyContract Proxy { get; set; } /// Backend TLS Properties. + [WirePath("properties.tls")] public BackendTlsProperties Tls { get; set; } /// Runtime Url of the Backend. + [WirePath("properties.url")] public Uri Uri { get; set; } /// Backend communication protocol. + [WirePath("properties.protocol")] public BackendProtocol? Protocol { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementCachePatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementCachePatch.cs index a0a77f6551b41..5ff887f3ed6e3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementCachePatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementCachePatch.cs @@ -66,12 +66,16 @@ internal ApiManagementCachePatch(string description, string connectionString, st } /// Cache description. + [WirePath("properties.description")] public string Description { get; set; } /// Runtime connection string to cache. + [WirePath("properties.connectionString")] public string ConnectionString { get; set; } /// Location identifier to use cache from (should be either 'default' or valid Azure region identifier). + [WirePath("properties.useFromLocation")] public string UseFromLocation { get; set; } /// Original uri of entity in external system cache points to. + [WirePath("properties.resourceId")] public Uri ResourceUri { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementCertificateCreateOrUpdateContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementCertificateCreateOrUpdateContent.cs index 452eeeef951c3..0432d942c8feb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementCertificateCreateOrUpdateContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementCertificateCreateOrUpdateContent.cs @@ -64,10 +64,13 @@ internal ApiManagementCertificateCreateOrUpdateContent(string data, string passw } /// Base 64 encoded certificate using the application/x-pkcs12 representation. + [WirePath("properties.data")] public string Data { get; set; } /// Password for the Certificate. + [WirePath("properties.password")] public string Password { get; set; } /// KeyVault location details of the certificate. + [WirePath("properties.keyVault")] public KeyVaultContractCreateProperties KeyVaultDetails { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementEmailTemplateCreateOrUpdateContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementEmailTemplateCreateOrUpdateContent.cs index 0bc7ea85cbbbd..31833d415e6f7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementEmailTemplateCreateOrUpdateContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementEmailTemplateCreateOrUpdateContent.cs @@ -69,14 +69,19 @@ internal ApiManagementEmailTemplateCreateOrUpdateContent(string subject, string } /// Subject of the Template. + [WirePath("properties.subject")] public string Subject { get; set; } /// Title of the Template. + [WirePath("properties.title")] public string Title { get; set; } /// Description of the Email Template. + [WirePath("properties.description")] public string Description { get; set; } /// Email Template Body. This should be a valid XDocument. + [WirePath("properties.body")] public string Body { get; set; } /// Email Template Parameter values. + [WirePath("properties.parameters")] public IList Parameters { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGatewayApiListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGatewayApiListResult.Serialization.cs index 1bc1586ba3962..7010f063eed24 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGatewayApiListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGatewayApiListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static ApiManagementGatewayApiListResult DeserializeApiManagementGatewa return new ApiManagementGatewayApiListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReade { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementGatewayApiListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupCreateOrUpdateContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupCreateOrUpdateContent.cs index 239a8886fd756..ca4d1429c9f18 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupCreateOrUpdateContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupCreateOrUpdateContent.cs @@ -66,12 +66,16 @@ internal ApiManagementGroupCreateOrUpdateContent(string displayName, string desc } /// Group name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// Group description. + [WirePath("properties.description")] public string Description { get; set; } /// Group type. + [WirePath("properties.type")] public ApiManagementGroupType? ApiManagementGroupType { get; set; } /// Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://<tenant>.onmicrosoft.com/groups/<group object id>`; otherwise the value is null. + [WirePath("properties.externalId")] public string ExternalId { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupPatch.cs index e8c8602888245..b2d35ee9bbf39 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupPatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupPatch.cs @@ -66,12 +66,16 @@ internal ApiManagementGroupPatch(string displayName, string description, ApiMana } /// Group name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// Group description. + [WirePath("properties.description")] public string Description { get; set; } /// Group type. + [WirePath("properties.type")] public ApiManagementGroupType? ApiManagementGroupType { get; set; } /// Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://<tenant>.onmicrosoft.com/groups/<group object id>`; otherwise the value is null. + [WirePath("properties.externalId")] public string ExternalId { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupUserData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupUserData.Serialization.cs index 3f60b01679a06..9552f3bd847b7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupUserData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupUserData.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -278,6 +280,246 @@ internal static ApiManagementGroupUserData DeserializeApiManagementGroupUserData serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(State), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" state: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(State)) + { + builder.Append(" state: "); + builder.AppendLine($"'{State.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Note), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" note: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Note)) + { + builder.Append(" note: "); + if (Note.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Note}'''"); + } + else + { + builder.AppendLine($"'{Note}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Identities), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" identities: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Identities)) + { + if (Identities.Any()) + { + builder.Append(" identities: "); + builder.AppendLine("["); + foreach (var item in Identities) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " identities: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(FirstName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" firstName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(FirstName)) + { + builder.Append(" firstName: "); + if (FirstName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{FirstName}'''"); + } + else + { + builder.AppendLine($"'{FirstName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LastName)) + { + builder.Append(" lastName: "); + if (LastName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{LastName}'''"); + } + else + { + builder.AppendLine($"'{LastName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Email), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" email: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Email)) + { + builder.Append(" email: "); + if (Email.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Email}'''"); + } + else + { + builder.AppendLine($"'{Email}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RegistriesOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" registrationDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(RegistriesOn)) + { + builder.Append(" registrationDate: "); + var formattedDateTimeString = TypeFormatters.ToString(RegistriesOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Groups), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" groups: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Groups)) + { + if (Groups.Any()) + { + builder.Append(" groups: "); + builder.AppendLine("["); + foreach (var item in Groups) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " groups: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -286,6 +528,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriter { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementGroupUserData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupUserData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupUserData.cs index dafc8c7505ac5..337152e17aa78 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupUserData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupUserData.cs @@ -85,23 +85,31 @@ internal ApiManagementGroupUserData(ResourceIdentifier id, string name, Resource } /// Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. + [WirePath("properties.state")] public ApiManagementUserState? State { get; set; } /// Optional note about a user set by the administrator. + [WirePath("properties.note")] public string Note { get; set; } /// Collection of user identities. + [WirePath("properties.identities")] public IList Identities { get; } /// First name. + [WirePath("properties.firstName")] public string FirstName { get; set; } /// Last name. + [WirePath("properties.lastName")] public string LastName { get; set; } /// Email address. + [WirePath("properties.email")] public string Email { get; set; } /// /// Date of user registration. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("properties.registrationDate")] public DateTimeOffset? RegistriesOn { get; set; } /// Collection of groups user is part of. + [WirePath("properties.groups")] public IReadOnlyList Groups { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupUserListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupUserListResult.Serialization.cs index 9f3c7adeb75cb..63e2550806192 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupUserListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGroupUserListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static ApiManagementGroupUserListResult DeserializeApiManagementGroupUs return new ApiManagementGroupUserListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReader { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementGroupUserListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderCreateOrUpdateContent.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderCreateOrUpdateContent.Serialization.cs index 5ef243c4d1ef4..ba73f79edcf28 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderCreateOrUpdateContent.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderCreateOrUpdateContent.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -94,6 +96,11 @@ void IJsonModel.Write(Utf8Js writer.WritePropertyName("passwordResetPolicyName"u8); writer.WriteStringValue(PasswordResetPolicyName); } + if (Optional.IsDefined(ClientLibrary)) + { + writer.WritePropertyName("clientLibrary"u8); + writer.WriteStringValue(ClientLibrary); + } if (Optional.IsDefined(ClientId)) { writer.WritePropertyName("clientId"u8); @@ -155,6 +162,7 @@ internal static ApiManagementIdentityProviderCreateOrUpdateContent DeserializeAp string signinPolicyName = default; string profileEditingPolicyName = default; string passwordResetPolicyName = default; + string clientLibrary = default; string clientId = default; string clientSecret = default; IDictionary serializedAdditionalRawData = default; @@ -247,6 +255,11 @@ internal static ApiManagementIdentityProviderCreateOrUpdateContent DeserializeAp passwordResetPolicyName = property0.Value.GetString(); continue; } + if (property0.NameEquals("clientLibrary"u8)) + { + clientLibrary = property0.Value.GetString(); + continue; + } if (property0.NameEquals("clientId"u8)) { clientId = property0.Value.GetString(); @@ -279,11 +292,341 @@ internal static ApiManagementIdentityProviderCreateOrUpdateContent DeserializeAp signinPolicyName, profileEditingPolicyName, passwordResetPolicyName, + clientLibrary, clientId, clientSecret, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IdentityProviderType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IdentityProviderType)) + { + builder.Append(" type: "); + builder.AppendLine($"'{IdentityProviderType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SignInTenant), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" signinTenant: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SignInTenant)) + { + builder.Append(" signinTenant: "); + if (SignInTenant.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SignInTenant}'''"); + } + else + { + builder.AppendLine($"'{SignInTenant}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AllowedTenants), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" allowedTenants: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(AllowedTenants)) + { + if (AllowedTenants.Any()) + { + builder.Append(" allowedTenants: "); + builder.AppendLine("["); + foreach (var item in AllowedTenants) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Authority), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" authority: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Authority)) + { + builder.Append(" authority: "); + if (Authority.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Authority}'''"); + } + else + { + builder.AppendLine($"'{Authority}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SignUpPolicyName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" signupPolicyName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SignUpPolicyName)) + { + builder.Append(" signupPolicyName: "); + if (SignUpPolicyName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SignUpPolicyName}'''"); + } + else + { + builder.AppendLine($"'{SignUpPolicyName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SignInPolicyName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" signinPolicyName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SignInPolicyName)) + { + builder.Append(" signinPolicyName: "); + if (SignInPolicyName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SignInPolicyName}'''"); + } + else + { + builder.AppendLine($"'{SignInPolicyName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProfileEditingPolicyName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" profileEditingPolicyName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProfileEditingPolicyName)) + { + builder.Append(" profileEditingPolicyName: "); + if (ProfileEditingPolicyName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ProfileEditingPolicyName}'''"); + } + else + { + builder.AppendLine($"'{ProfileEditingPolicyName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PasswordResetPolicyName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" passwordResetPolicyName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PasswordResetPolicyName)) + { + builder.Append(" passwordResetPolicyName: "); + if (PasswordResetPolicyName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PasswordResetPolicyName}'''"); + } + else + { + builder.AppendLine($"'{PasswordResetPolicyName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientLibrary), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientLibrary: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientLibrary)) + { + builder.Append(" clientLibrary: "); + if (ClientLibrary.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientLibrary}'''"); + } + else + { + builder.AppendLine($"'{ClientLibrary}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientId)) + { + builder.Append(" clientId: "); + if (ClientId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientId}'''"); + } + else + { + builder.AppendLine($"'{ClientId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientSecret), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientSecret: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientSecret)) + { + builder.Append(" clientSecret: "); + if (ClientSecret.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientSecret}'''"); + } + else + { + builder.AppendLine($"'{ClientSecret}'"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -292,6 +635,8 @@ BinaryData IPersistableModel { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementIdentityProviderCreateOrUpdateContent)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderCreateOrUpdateContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderCreateOrUpdateContent.cs index ff7a762ce17bf..ea335ee2fb645 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderCreateOrUpdateContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderCreateOrUpdateContent.cs @@ -66,10 +66,11 @@ public ApiManagementIdentityProviderCreateOrUpdateContent() /// Signin Policy Name. Only applies to AAD B2C Identity Provider. /// Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. /// Password Reset Policy Name. Only applies to AAD B2C Identity Provider. + /// The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. /// Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. /// Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. /// Keeps track of any properties unknown to the library. - internal ApiManagementIdentityProviderCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IdentityProviderType? identityProviderType, string signInTenant, IList allowedTenants, string authority, string signUpPolicyName, string signInPolicyName, string profileEditingPolicyName, string passwordResetPolicyName, string clientId, string clientSecret, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ApiManagementIdentityProviderCreateOrUpdateContent(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IdentityProviderType? identityProviderType, string signInTenant, IList allowedTenants, string authority, string signUpPolicyName, string signInPolicyName, string profileEditingPolicyName, string passwordResetPolicyName, string clientLibrary, string clientId, string clientSecret, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { IdentityProviderType = identityProviderType; SignInTenant = signInTenant; @@ -79,30 +80,44 @@ internal ApiManagementIdentityProviderCreateOrUpdateContent(ResourceIdentifier i SignInPolicyName = signInPolicyName; ProfileEditingPolicyName = profileEditingPolicyName; PasswordResetPolicyName = passwordResetPolicyName; + ClientLibrary = clientLibrary; ClientId = clientId; ClientSecret = clientSecret; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Identity Provider Type identifier. + [WirePath("properties.type")] public IdentityProviderType? IdentityProviderType { get; set; } /// The TenantId to use instead of Common when logging into Active Directory. + [WirePath("properties.signinTenant")] public string SignInTenant { get; set; } /// List of Allowed Tenants when configuring Azure Active Directory login. + [WirePath("properties.allowedTenants")] public IList AllowedTenants { get; } /// OpenID Connect discovery endpoint hostname for AAD or AAD B2C. + [WirePath("properties.authority")] public string Authority { get; set; } /// Signup Policy Name. Only applies to AAD B2C Identity Provider. + [WirePath("properties.signupPolicyName")] public string SignUpPolicyName { get; set; } /// Signin Policy Name. Only applies to AAD B2C Identity Provider. + [WirePath("properties.signinPolicyName")] public string SignInPolicyName { get; set; } /// Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. + [WirePath("properties.profileEditingPolicyName")] public string ProfileEditingPolicyName { get; set; } /// Password Reset Policy Name. Only applies to AAD B2C Identity Provider. + [WirePath("properties.passwordResetPolicyName")] public string PasswordResetPolicyName { get; set; } + /// The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. + [WirePath("properties.clientLibrary")] + public string ClientLibrary { get; set; } /// Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. + [WirePath("properties.clientId")] public string ClientId { get; set; } /// Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + [WirePath("properties.clientSecret")] public string ClientSecret { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderPatch.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderPatch.Serialization.cs index 57d5927d5ecd7..80756ca4a05ed 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderPatch.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderPatch.Serialization.cs @@ -73,6 +73,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WritePropertyName("passwordResetPolicyName"u8); writer.WriteStringValue(PasswordResetPolicyName); } + if (Optional.IsDefined(ClientLibrary)) + { + writer.WritePropertyName("clientLibrary"u8); + writer.WriteStringValue(ClientLibrary); + } if (Optional.IsDefined(ClientId)) { writer.WritePropertyName("clientId"u8); @@ -130,6 +135,7 @@ internal static ApiManagementIdentityProviderPatch DeserializeApiManagementIdent string signinPolicyName = default; string profileEditingPolicyName = default; string passwordResetPolicyName = default; + string clientLibrary = default; string clientId = default; string clientSecret = default; IDictionary serializedAdditionalRawData = default; @@ -198,6 +204,11 @@ internal static ApiManagementIdentityProviderPatch DeserializeApiManagementIdent passwordResetPolicyName = property0.Value.GetString(); continue; } + if (property0.NameEquals("clientLibrary"u8)) + { + clientLibrary = property0.Value.GetString(); + continue; + } if (property0.NameEquals("clientId"u8)) { clientId = property0.Value.GetString(); @@ -226,6 +237,7 @@ internal static ApiManagementIdentityProviderPatch DeserializeApiManagementIdent signinPolicyName, profileEditingPolicyName, passwordResetPolicyName, + clientLibrary, clientId, clientSecret, serializedAdditionalRawData); diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderPatch.cs index aaee40873a3c8..6d7aa8f3e0233 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderPatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementIdentityProviderPatch.cs @@ -60,10 +60,11 @@ public ApiManagementIdentityProviderPatch() /// Signin Policy Name. Only applies to AAD B2C Identity Provider. /// Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. /// Password Reset Policy Name. Only applies to AAD B2C Identity Provider. + /// The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. /// Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. /// Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. /// Keeps track of any properties unknown to the library. - internal ApiManagementIdentityProviderPatch(IdentityProviderType? identityProviderType, string signInTenant, IList allowedTenants, string authority, string signUpPolicyName, string signInPolicyName, string profileEditingPolicyName, string passwordResetPolicyName, string clientId, string clientSecret, IDictionary serializedAdditionalRawData) + internal ApiManagementIdentityProviderPatch(IdentityProviderType? identityProviderType, string signInTenant, IList allowedTenants, string authority, string signUpPolicyName, string signInPolicyName, string profileEditingPolicyName, string passwordResetPolicyName, string clientLibrary, string clientId, string clientSecret, IDictionary serializedAdditionalRawData) { IdentityProviderType = identityProviderType; SignInTenant = signInTenant; @@ -73,30 +74,44 @@ internal ApiManagementIdentityProviderPatch(IdentityProviderType? identityProvid SignInPolicyName = signInPolicyName; ProfileEditingPolicyName = profileEditingPolicyName; PasswordResetPolicyName = passwordResetPolicyName; + ClientLibrary = clientLibrary; ClientId = clientId; ClientSecret = clientSecret; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Identity Provider Type identifier. + [WirePath("properties.type")] public IdentityProviderType? IdentityProviderType { get; set; } /// The TenantId to use instead of Common when logging into Active Directory. + [WirePath("properties.signinTenant")] public string SignInTenant { get; set; } /// List of Allowed Tenants when configuring Azure Active Directory login. + [WirePath("properties.allowedTenants")] public IList AllowedTenants { get; } /// OpenID Connect discovery endpoint hostname for AAD or AAD B2C. + [WirePath("properties.authority")] public string Authority { get; set; } /// Signup Policy Name. Only applies to AAD B2C Identity Provider. + [WirePath("properties.signupPolicyName")] public string SignUpPolicyName { get; set; } /// Signin Policy Name. Only applies to AAD B2C Identity Provider. + [WirePath("properties.signinPolicyName")] public string SignInPolicyName { get; set; } /// Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. + [WirePath("properties.profileEditingPolicyName")] public string ProfileEditingPolicyName { get; set; } /// Password Reset Policy Name. Only applies to AAD B2C Identity Provider. + [WirePath("properties.passwordResetPolicyName")] public string PasswordResetPolicyName { get; set; } + /// The client library to be used in the developer portal. Only applies to AAD and AAD B2C Identity Provider. + [WirePath("properties.clientLibrary")] + public string ClientLibrary { get; set; } /// Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. + [WirePath("properties.clientId")] public string ClientId { get; set; } /// Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. + [WirePath("properties.clientSecret")] public string ClientSecret { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementLoggerPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementLoggerPatch.cs index 69b4463e00a46..5a5f6bb3a1975 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementLoggerPatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementLoggerPatch.cs @@ -67,12 +67,16 @@ internal ApiManagementLoggerPatch(LoggerType? loggerType, string description, ID } /// Logger type. + [WirePath("properties.loggerType")] public LoggerType? LoggerType { get; set; } /// Logger description. + [WirePath("properties.description")] public string Description { get; set; } /// Logger credentials. + [WirePath("properties.credentials")] public IDictionary Credentials { get; } /// Whether records are buffered in the logger before publishing. Default is assumed to be true. + [WirePath("properties.isBuffered")] public bool? IsBuffered { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementNamedValueCreateOrUpdateContent.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementNamedValueCreateOrUpdateContent.Serialization.cs index a98ad19588533..d32bc1f106ce8 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementNamedValueCreateOrUpdateContent.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementNamedValueCreateOrUpdateContent.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -228,6 +230,190 @@ internal static ApiManagementNamedValueCreateOrUpdateContent DeserializeApiManag serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Tags), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tags: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags.Any()) + { + builder.Append(" tags: "); + builder.AppendLine("["); + foreach (var item in Tags) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsSecret), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" secret: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsSecret)) + { + builder.Append(" secret: "); + var boolValue = IsSecret.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DisplayName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" displayName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DisplayName)) + { + builder.Append(" displayName: "); + if (DisplayName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DisplayName}'''"); + } + else + { + builder.AppendLine($"'{DisplayName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + if (Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Value}'''"); + } + else + { + builder.AppendLine($"'{Value}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(KeyVault), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" keyVault: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(KeyVault)) + { + builder.Append(" keyVault: "); + BicepSerializationHelpers.AppendChildObject(builder, KeyVault, options, 4, false, " keyVault: "); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -236,6 +422,8 @@ BinaryData IPersistableModel.Write { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementNamedValueCreateOrUpdateContent)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementNamedValueCreateOrUpdateContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementNamedValueCreateOrUpdateContent.cs index 0bc095dd436f9..bfee23d1dc57b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementNamedValueCreateOrUpdateContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementNamedValueCreateOrUpdateContent.cs @@ -75,14 +75,19 @@ internal ApiManagementNamedValueCreateOrUpdateContent(ResourceIdentifier id, str } /// Optional tags that when provided can be used to filter the NamedValue list. + [WirePath("properties.tags")] public IList Tags { get; } /// Determines whether the value is a secret and should be encrypted or not. Default value is false. + [WirePath("properties.secret")] public bool? IsSecret { get; set; } /// Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + [WirePath("properties.value")] public string Value { get; set; } /// KeyVault location details of the namedValue. + [WirePath("properties.keyVault")] public KeyVaultContractCreateProperties KeyVault { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementNamedValuePatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementNamedValuePatch.cs index e5412f12e9bc2..abcf9cc777b8e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementNamedValuePatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementNamedValuePatch.cs @@ -69,14 +69,19 @@ internal ApiManagementNamedValuePatch(IList tags, bool? isSecret, string } /// Optional tags that when provided can be used to filter the NamedValue list. + [WirePath("properties.tags")] public IList Tags { get; } /// Determines whether the value is a secret and should be encrypted or not. Default value is false. + [WirePath("properties.secret")] public bool? IsSecret { get; set; } /// Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. + [WirePath("properties.value")] public string Value { get; set; } /// KeyVault location details of the namedValue. + [WirePath("properties.keyVault")] public KeyVaultContractCreateProperties KeyVault { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementNatGatewayState.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementNatGatewayState.cs new file mode 100644 index 0000000000000..bf96b039df767 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementNatGatewayState.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.ApiManagement.Models +{ + /// Property can be used to enable NAT Gateway for this API Management service. + public readonly partial struct ApiManagementNatGatewayState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ApiManagementNatGatewayState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Nat Gateway is enabled for the service. + public static ApiManagementNatGatewayState Enabled { get; } = new ApiManagementNatGatewayState(EnabledValue); + /// Nat Gateway is disabled for the service. + public static ApiManagementNatGatewayState Disabled { get; } = new ApiManagementNatGatewayState(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(ApiManagementNatGatewayState left, ApiManagementNatGatewayState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ApiManagementNatGatewayState left, ApiManagementNatGatewayState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ApiManagementNatGatewayState(string value) => new ApiManagementNatGatewayState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ApiManagementNatGatewayState other && Equals(other); + /// + public bool Equals(ApiManagementNatGatewayState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementOpenIdConnectProviderPatch.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementOpenIdConnectProviderPatch.Serialization.cs index d3326eef680c5..74e2d6a20ac7a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementOpenIdConnectProviderPatch.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementOpenIdConnectProviderPatch.Serialization.cs @@ -53,6 +53,16 @@ void IJsonModel.Write(Utf8JsonWriter wr writer.WritePropertyName("clientSecret"u8); writer.WriteStringValue(ClientSecret); } + if (Optional.IsDefined(UseInTestConsole)) + { + writer.WritePropertyName("useInTestConsole"u8); + writer.WriteBooleanValue(UseInTestConsole.Value); + } + if (Optional.IsDefined(UseInApiDocumentation)) + { + writer.WritePropertyName("useInApiDocumentation"u8); + writer.WriteBooleanValue(UseInApiDocumentation.Value); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -97,6 +107,8 @@ internal static ApiManagementOpenIdConnectProviderPatch DeserializeApiManagement string metadataEndpoint = default; string clientId = default; string clientSecret = default; + bool? useInTestConsole = default; + bool? useInApiDocumentation = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -135,6 +147,24 @@ internal static ApiManagementOpenIdConnectProviderPatch DeserializeApiManagement clientSecret = property0.Value.GetString(); continue; } + if (property0.NameEquals("useInTestConsole"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useInTestConsole = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("useInApiDocumentation"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useInApiDocumentation = property0.Value.GetBoolean(); + continue; + } } continue; } @@ -150,6 +180,8 @@ internal static ApiManagementOpenIdConnectProviderPatch DeserializeApiManagement metadataEndpoint, clientId, clientSecret, + useInTestConsole, + useInApiDocumentation, serializedAdditionalRawData); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementOpenIdConnectProviderPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementOpenIdConnectProviderPatch.cs index 44defa7db4fdb..395217d3a10a6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementOpenIdConnectProviderPatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementOpenIdConnectProviderPatch.cs @@ -56,26 +56,41 @@ public ApiManagementOpenIdConnectProviderPatch() /// Metadata endpoint URI. /// Client ID of developer console which is the client application. /// Client Secret of developer console which is the client application. + /// If true, the Open ID Connect provider may be used in the developer portal test console. True by default if no value is provided. + /// If true, the Open ID Connect provider will be used in the API documentation in the developer portal. False by default if no value is provided. /// Keeps track of any properties unknown to the library. - internal ApiManagementOpenIdConnectProviderPatch(string displayName, string description, string metadataEndpoint, string clientId, string clientSecret, IDictionary serializedAdditionalRawData) + internal ApiManagementOpenIdConnectProviderPatch(string displayName, string description, string metadataEndpoint, string clientId, string clientSecret, bool? useInTestConsole, bool? useInApiDocumentation, IDictionary serializedAdditionalRawData) { DisplayName = displayName; Description = description; MetadataEndpoint = metadataEndpoint; ClientId = clientId; ClientSecret = clientSecret; + UseInTestConsole = useInTestConsole; + UseInApiDocumentation = useInApiDocumentation; _serializedAdditionalRawData = serializedAdditionalRawData; } /// User-friendly OpenID Connect Provider name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// User-friendly description of OpenID Connect Provider. + [WirePath("properties.description")] public string Description { get; set; } /// Metadata endpoint URI. + [WirePath("properties.metadataEndpoint")] public string MetadataEndpoint { get; set; } /// Client ID of developer console which is the client application. + [WirePath("properties.clientId")] public string ClientId { get; set; } /// Client Secret of developer console which is the client application. + [WirePath("properties.clientSecret")] public string ClientSecret { get; set; } + /// If true, the Open ID Connect provider may be used in the developer portal test console. True by default if no value is provided. + [WirePath("properties.useInTestConsole")] + public bool? UseInTestConsole { get; set; } + /// If true, the Open ID Connect provider will be used in the API documentation in the developer portal. False by default if no value is provided. + [WirePath("properties.useInApiDocumentation")] + public bool? UseInApiDocumentation { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateEndpointConnectionCreateOrUpdateContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateEndpointConnectionCreateOrUpdateContent.cs index 73588779ef104..11f3ea41dc6c9 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateEndpointConnectionCreateOrUpdateContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateEndpointConnectionCreateOrUpdateContent.cs @@ -63,10 +63,12 @@ internal ApiManagementPrivateEndpointConnectionCreateOrUpdateContent(ResourceIde } /// Private Endpoint Connection Resource Id. + [WirePath("id")] public ResourceIdentifier Id { get; set; } /// The connection state of the private endpoint connection. internal PrivateEndpointConnectionRequestProperties Properties { get; set; } /// A collection of information about the state of the connection between service consumer and provider. + [WirePath("properties.privateLinkServiceConnectionState")] public ApiManagementPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get => Properties is null ? default : Properties.PrivateLinkServiceConnectionState; diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateEndpointConnectionListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateEndpointConnectionListResult.Serialization.cs index ce118db94b46a..17283fc53c4c3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateEndpointConnectionListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateEndpointConnectionListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -102,6 +104,44 @@ internal static ApiManagementPrivateEndpointConnectionListResult DeserializeApiM return new ApiManagementPrivateEndpointConnectionListResult(value ?? new ChangeTrackingList(), serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -110,6 +150,8 @@ BinaryData IPersistableModel.W { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementPrivateEndpointConnectionListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateLinkResourceListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateLinkResourceListResult.Serialization.cs index 351c9041eb07a..1d4d1941c0b76 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateLinkResourceListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateLinkResourceListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -102,6 +104,44 @@ internal static ApiManagementPrivateLinkResourceListResult DeserializeApiManagem return new ApiManagementPrivateLinkResourceListResult(value ?? new ChangeTrackingList(), serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -110,6 +150,8 @@ BinaryData IPersistableModel.Write(M { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementPrivateLinkResourceListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateLinkResourceListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateLinkResourceListResult.cs index 6b0e80c08398f..2257c96c357ca 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateLinkResourceListResult.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateLinkResourceListResult.cs @@ -61,6 +61,7 @@ internal ApiManagementPrivateLinkResourceListResult(IReadOnlyList Array of private link resources. + [WirePath("value")] public IReadOnlyList Value { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateLinkServiceConnectionState.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateLinkServiceConnectionState.Serialization.cs index 5da37c812c146..7aa67e2f7f6cb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateLinkServiceConnectionState.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateLinkServiceConnectionState.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -114,6 +115,82 @@ internal static ApiManagementPrivateLinkServiceConnectionState DeserializeApiMan return new ApiManagementPrivateLinkServiceConnectionState(status, description, actionsRequired, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" status: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Status)) + { + builder.Append(" status: "); + builder.AppendLine($"'{Status.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ActionsRequired), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" actionsRequired: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ActionsRequired)) + { + builder.Append(" actionsRequired: "); + if (ActionsRequired.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ActionsRequired}'''"); + } + else + { + builder.AppendLine($"'{ActionsRequired}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -122,6 +199,8 @@ BinaryData IPersistableModel.Wri { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementPrivateLinkServiceConnectionState)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateLinkServiceConnectionState.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateLinkServiceConnectionState.cs index e50866503f811..0d924d7a94a4c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateLinkServiceConnectionState.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementPrivateLinkServiceConnectionState.cs @@ -64,10 +64,13 @@ internal ApiManagementPrivateLinkServiceConnectionState(ApiManagementPrivateEndp } /// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + [WirePath("status")] public ApiManagementPrivateEndpointServiceConnectionStatus? Status { get; set; } /// The reason for approval/rejection of the connection. + [WirePath("description")] public string Description { get; set; } /// A message indicating if changes on the service provider require any updates on the consumer. + [WirePath("actionsRequired")] public string ActionsRequired { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementProductApiListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementProductApiListResult.Serialization.cs index a1b10a443272c..fa2ea8c71e13d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementProductApiListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementProductApiListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static ApiManagementProductApiListResult DeserializeApiManagementProduc return new ApiManagementProductApiListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReade { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementProductApiListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementProductGroupListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementProductGroupListResult.Serialization.cs index 43c13a908f73c..b4688b64b9d5c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementProductGroupListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementProductGroupListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static ApiManagementProductGroupListResult DeserializeApiManagementProd return new ApiManagementProductGroupListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelRea { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementProductGroupListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementProductPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementProductPatch.cs index af493f0a7faf0..f7aa2bc8e7ce8 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementProductPatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementProductPatch.cs @@ -72,18 +72,25 @@ internal ApiManagementProductPatch(string description, string terms, bool? isSub } /// Product description. May include HTML formatting tags. + [WirePath("properties.description")] public string Description { get; set; } /// Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process. + [WirePath("properties.terms")] public string Terms { get; set; } /// Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. + [WirePath("properties.subscriptionRequired")] public bool? IsSubscriptionRequired { get; set; } /// whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. + [WirePath("properties.approvalRequired")] public bool? IsApprovalRequired { get; set; } /// Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. + [WirePath("properties.subscriptionsLimit")] public int? SubscriptionsLimit { get; set; } /// whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. + [WirePath("properties.state")] public ApiManagementProductState? State { get; set; } /// Product name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementResourceSkuCapacity.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementResourceSkuCapacity.Serialization.cs index 72437976eb6ae..0d5ecde437630 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementResourceSkuCapacity.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementResourceSkuCapacity.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -137,6 +138,81 @@ internal static ApiManagementResourceSkuCapacity DeserializeApiManagementResourc return new ApiManagementResourceSkuCapacity(minimum, maximum, @default, scaleType, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Minimum), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" minimum: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Minimum)) + { + builder.Append(" minimum: "); + builder.AppendLine($"{Minimum.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Maximum), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" maximum: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Maximum)) + { + builder.Append(" maximum: "); + builder.AppendLine($"{Maximum.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Default), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" default: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Default)) + { + builder.Append(" default: "); + builder.AppendLine($"{Default.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScaleType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scaleType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ScaleType)) + { + builder.Append(" scaleType: "); + builder.AppendLine($"'{ScaleType.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -145,6 +221,8 @@ BinaryData IPersistableModel.Write(ModelReader { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementResourceSkuCapacity)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementResourceSkuCapacity.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementResourceSkuCapacity.cs index 726ac8f5f56df..7935fbd0bf7d1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementResourceSkuCapacity.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementResourceSkuCapacity.cs @@ -66,12 +66,16 @@ internal ApiManagementResourceSkuCapacity(int? minimum, int? maximum, int? @defa } /// The minimum capacity. + [WirePath("minimum")] public int? Minimum { get; } /// The maximum capacity that can be set. + [WirePath("maximum")] public int? Maximum { get; } /// The default capacity. + [WirePath("default")] public int? Default { get; } /// The scale type applicable to the sku. + [WirePath("scaleType")] public ApiManagementResourceSkuCapacityScaleType? ScaleType { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceApplyNetworkConfigurationContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceApplyNetworkConfigurationContent.cs index b12714d252316..a94e97a909089 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceApplyNetworkConfigurationContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceApplyNetworkConfigurationContent.cs @@ -61,6 +61,7 @@ internal ApiManagementServiceApplyNetworkConfigurationContent(AzureLocation? loc } /// Location of the Api Management service to update for a multi-region service. For a service deployed in a single region, this parameter is not required. + [WirePath("location")] public AzureLocation? Location { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceBackupRestoreContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceBackupRestoreContent.cs index d6d5b19447a03..db67e7ca9a5e7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceBackupRestoreContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceBackupRestoreContent.cs @@ -86,16 +86,22 @@ internal ApiManagementServiceBackupRestoreContent() } /// The name of the Azure storage account (used to place/retrieve the backup). + [WirePath("storageAccount")] public string StorageAccount { get; } /// The name of the blob container (used to place/retrieve the backup). + [WirePath("containerName")] public string ContainerName { get; } /// The name of the backup file to create/retrieve. + [WirePath("backupName")] public string BackupName { get; } /// The type of access to be used for the storage account. + [WirePath("accessType")] public StorageAccountAccessType? AccessType { get; set; } /// Storage account access key. Required only if `accessType` is set to `AccessKey`. + [WirePath("accessKey")] public string AccessKey { get; set; } /// The Client ID of user assigned managed identity. Required only if `accessType` is set to `UserAssignedManagedIdentity`. + [WirePath("clientId")] public string ClientId { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceGetDomainOwnershipIdentifierResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceGetDomainOwnershipIdentifierResult.Serialization.cs index 737ba79fc45af..6cfa3572c3912 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceGetDomainOwnershipIdentifierResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceGetDomainOwnershipIdentifierResult.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -88,6 +89,44 @@ internal static ApiManagementServiceGetDomainOwnershipIdentifierResult Deseriali return new ApiManagementServiceGetDomainOwnershipIdentifierResult(domainOwnershipIdentifier, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DomainOwnershipIdentifier), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" domainOwnershipIdentifier: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DomainOwnershipIdentifier)) + { + builder.Append(" domainOwnershipIdentifier: "); + if (DomainOwnershipIdentifier.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DomainOwnershipIdentifier}'''"); + } + else + { + builder.AppendLine($"'{DomainOwnershipIdentifier}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -96,6 +135,8 @@ BinaryData IPersistableModel The domain ownership identifier value. + [WirePath("domainOwnershipIdentifier")] public string DomainOwnershipIdentifier { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceGetSsoTokenResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceGetSsoTokenResult.Serialization.cs index 1b5028d18d547..a102dc21c8a8f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceGetSsoTokenResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceGetSsoTokenResult.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -92,6 +93,36 @@ internal static ApiManagementServiceGetSsoTokenResult DeserializeApiManagementSe return new ApiManagementServiceGetSsoTokenResult(redirectUri, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RedirectUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" redirectUri: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(RedirectUri)) + { + builder.Append(" redirectUri: "); + builder.AppendLine($"'{RedirectUri.AbsoluteUri}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -100,6 +131,8 @@ BinaryData IPersistableModel.Write(ModelR { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementServiceGetSsoTokenResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceGetSsoTokenResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceGetSsoTokenResult.cs index 2de990ca06a08..de75fff67b6e0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceGetSsoTokenResult.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceGetSsoTokenResult.cs @@ -60,6 +60,7 @@ internal ApiManagementServiceGetSsoTokenResult(Uri redirectUri, IDictionary Redirect URL to the Publisher Portal containing the SSO token. + [WirePath("redirectUri")] public Uri RedirectUri { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceListResult.Serialization.cs index 899dfd5eca9b2..931ab2d6c9aa3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -106,6 +108,67 @@ internal static ApiManagementServiceListResult DeserializeApiManagementServiceLi return new ApiManagementServiceListResult(value, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -114,6 +177,8 @@ BinaryData IPersistableModel.Write(ModelReaderWr { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementServiceListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceNameAvailabilityContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceNameAvailabilityContent.cs index 9da1c98abf7a0..4e952162e732a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceNameAvailabilityContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceNameAvailabilityContent.cs @@ -70,6 +70,7 @@ internal ApiManagementServiceNameAvailabilityContent() } /// The name to check for availability. + [WirePath("name")] public string Name { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceNameAvailabilityResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceNameAvailabilityResult.Serialization.cs index 21adff3ca37ab..f4f1e333c4557 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceNameAvailabilityResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceNameAvailabilityResult.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -118,6 +119,75 @@ internal static ApiManagementServiceNameAvailabilityResult DeserializeApiManagem return new ApiManagementServiceNameAvailabilityResult(nameAvailable, message, reason, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsNameAvailable), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nameAvailable: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsNameAvailable)) + { + builder.Append(" nameAvailable: "); + var boolValue = IsNameAvailable.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Message), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" message: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Message)) + { + builder.Append(" message: "); + if (Message.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Message}'''"); + } + else + { + builder.AppendLine($"'{Message}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Reason), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" reason: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Reason)) + { + builder.Append(" reason: "); + builder.AppendLine($"'{Reason.Value.ToSerialString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -126,6 +196,8 @@ BinaryData IPersistableModel.Write(M { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementServiceNameAvailabilityResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceNameAvailabilityResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceNameAvailabilityResult.cs index 81afe6805738f..9513450e7419c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceNameAvailabilityResult.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceNameAvailabilityResult.cs @@ -64,10 +64,13 @@ internal ApiManagementServiceNameAvailabilityResult(bool? isNameAvailable, strin } /// True if the name is available and can be used to create a new API Management service; otherwise false. + [WirePath("nameAvailable")] public bool? IsNameAvailable { get; } /// If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that <resourceName> is already in use, and direct them to select a different name. + [WirePath("message")] public string Message { get; } /// Invalid indicates the name provided does not match the resource provider’s naming requirements (incorrect length, unsupported characters, etc.) AlreadyExists indicates that the name is already in use and is therefore unavailable. + [WirePath("reason")] public ApiManagementServiceNameUnavailableReason? Reason { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServicePatch.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServicePatch.Serialization.cs index 4af4c3564dedf..5d1fd1e385b93 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServicePatch.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServicePatch.Serialization.cs @@ -8,7 +8,9 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; using System.Net; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -227,6 +229,21 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WritePropertyName("enableClientCertificate"u8); writer.WriteBooleanValue(EnableClientCertificate.Value); } + if (Optional.IsDefined(NatGatewayState)) + { + writer.WritePropertyName("natGatewayState"u8); + writer.WriteStringValue(NatGatewayState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsCollectionDefined(OutboundPublicIPAddresses)) + { + writer.WritePropertyName("outboundPublicIPAddresses"u8); + writer.WriteStartArray(); + foreach (var item in OutboundPublicIPAddresses) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } if (Optional.IsDefined(DisableGateway)) { writer.WritePropertyName("disableGateway"u8); @@ -340,6 +357,8 @@ internal static ApiManagementServicePatch DeserializeApiManagementServicePatch(J IDictionary customProperties = default; IList certificates = default; bool? enableClientCertificate = default; + ApiManagementNatGatewayState? natGatewayState = default; + IReadOnlyList outboundPublicIPAddresses = default; bool? disableGateway = default; VirtualNetworkType? virtualNetworkType = default; ApiVersionConstraint apiVersionConstraint = default; @@ -652,6 +671,29 @@ internal static ApiManagementServicePatch DeserializeApiManagementServicePatch(J enableClientCertificate = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("natGatewayState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + natGatewayState = new ApiManagementNatGatewayState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("outboundPublicIPAddresses"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + outboundPublicIPAddresses = array; + continue; + } if (property0.NameEquals("disableGateway"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -759,6 +801,8 @@ internal static ApiManagementServicePatch DeserializeApiManagementServicePatch(J customProperties ?? new ChangeTrackingDictionary(), certificates ?? new ChangeTrackingList(), enableClientCertificate, + natGatewayState, + outboundPublicIPAddresses ?? new ChangeTrackingList(), disableGateway, virtualNetworkType, apiVersionConstraint, @@ -771,6 +815,795 @@ internal static ApiManagementServicePatch DeserializeApiManagementServicePatch(J serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Tags), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tags: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags.Any()) + { + builder.Append(" tags: "); + builder.AppendLine("{"); + foreach (var item in Tags) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + if (item.Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{item.Value}'''"); + } + else + { + builder.AppendLine($"'{item.Value}'"); + } + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Sku), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sku: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Sku)) + { + builder.Append(" sku: "); + BicepSerializationHelpers.AppendChildObject(builder, Sku, options, 2, false, " sku: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Identity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" identity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Identity)) + { + builder.Append(" identity: "); + BicepSerializationHelpers.AppendChildObject(builder, Identity, options, 2, false, " identity: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ETag), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" etag: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ETag)) + { + builder.Append(" etag: "); + builder.AppendLine($"'{ETag.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Zones), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" zones: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Zones)) + { + if (Zones.Any()) + { + builder.Append(" zones: "); + builder.AppendLine("["); + foreach (var item in Zones) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NotificationSenderEmail), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" notificationSenderEmail: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NotificationSenderEmail)) + { + builder.Append(" notificationSenderEmail: "); + if (NotificationSenderEmail.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NotificationSenderEmail}'''"); + } + else + { + builder.AppendLine($"'{NotificationSenderEmail}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + if (ProvisioningState.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ProvisioningState}'''"); + } + else + { + builder.AppendLine($"'{ProvisioningState}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TargetProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" targetProvisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TargetProvisioningState)) + { + builder.Append(" targetProvisioningState: "); + if (TargetProvisioningState.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TargetProvisioningState}'''"); + } + else + { + builder.AppendLine($"'{TargetProvisioningState}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CreatedAtUtc), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" createdAtUtc: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CreatedAtUtc)) + { + builder.Append(" createdAtUtc: "); + var formattedDateTimeString = TypeFormatters.ToString(CreatedAtUtc.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GatewayUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" gatewayUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(GatewayUri)) + { + builder.Append(" gatewayUrl: "); + builder.AppendLine($"'{GatewayUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GatewayRegionalUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" gatewayRegionalUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(GatewayRegionalUri)) + { + builder.Append(" gatewayRegionalUrl: "); + builder.AppendLine($"'{GatewayRegionalUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PortalUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" portalUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PortalUri)) + { + builder.Append(" portalUrl: "); + builder.AppendLine($"'{PortalUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ManagementApiUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" managementApiUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ManagementApiUri)) + { + builder.Append(" managementApiUrl: "); + builder.AppendLine($"'{ManagementApiUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScmUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scmUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ScmUri)) + { + builder.Append(" scmUrl: "); + builder.AppendLine($"'{ScmUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DeveloperPortalUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" developerPortalUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DeveloperPortalUri)) + { + builder.Append(" developerPortalUrl: "); + builder.AppendLine($"'{DeveloperPortalUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(HostnameConfigurations), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" hostnameConfigurations: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(HostnameConfigurations)) + { + if (HostnameConfigurations.Any()) + { + builder.Append(" hostnameConfigurations: "); + builder.AppendLine("["); + foreach (var item in HostnameConfigurations) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " hostnameConfigurations: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublicIPAddresses), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" publicIPAddresses: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(PublicIPAddresses)) + { + if (PublicIPAddresses.Any()) + { + builder.Append(" publicIPAddresses: "); + builder.AppendLine("["); + foreach (var item in PublicIPAddresses) + { + if (item == null) + { + builder.Append("null"); + continue; + } + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PrivateIPAddresses), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" privateIPAddresses: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(PrivateIPAddresses)) + { + if (PrivateIPAddresses.Any()) + { + builder.Append(" privateIPAddresses: "); + builder.AppendLine("["); + foreach (var item in PrivateIPAddresses) + { + if (item == null) + { + builder.Append("null"); + continue; + } + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublicIPAddressId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" publicIpAddressId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PublicIPAddressId)) + { + builder.Append(" publicIpAddressId: "); + builder.AppendLine($"'{PublicIPAddressId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublicNetworkAccess), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" publicNetworkAccess: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PublicNetworkAccess)) + { + builder.Append(" publicNetworkAccess: "); + builder.AppendLine($"'{PublicNetworkAccess.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VirtualNetworkConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" virtualNetworkConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(VirtualNetworkConfiguration)) + { + builder.Append(" virtualNetworkConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, VirtualNetworkConfiguration, options, 4, false, " virtualNetworkConfiguration: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AdditionalLocations), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" additionalLocations: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(AdditionalLocations)) + { + if (AdditionalLocations.Any()) + { + builder.Append(" additionalLocations: "); + builder.AppendLine("["); + foreach (var item in AdditionalLocations) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " additionalLocations: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CustomProperties), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" customProperties: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(CustomProperties)) + { + if (CustomProperties.Any()) + { + builder.Append(" customProperties: "); + builder.AppendLine("{"); + foreach (var item in CustomProperties) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + if (item.Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{item.Value}'''"); + } + else + { + builder.AppendLine($"'{item.Value}'"); + } + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Certificates), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" certificates: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Certificates)) + { + if (Certificates.Any()) + { + builder.Append(" certificates: "); + builder.AppendLine("["); + foreach (var item in Certificates) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " certificates: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EnableClientCertificate), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enableClientCertificate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EnableClientCertificate)) + { + builder.Append(" enableClientCertificate: "); + var boolValue = EnableClientCertificate.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NatGatewayState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" natGatewayState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NatGatewayState)) + { + builder.Append(" natGatewayState: "); + builder.AppendLine($"'{NatGatewayState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OutboundPublicIPAddresses), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" outboundPublicIPAddresses: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(OutboundPublicIPAddresses)) + { + if (OutboundPublicIPAddresses.Any()) + { + builder.Append(" outboundPublicIPAddresses: "); + builder.AppendLine("["); + foreach (var item in OutboundPublicIPAddresses) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DisableGateway), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" disableGateway: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DisableGateway)) + { + builder.Append(" disableGateway: "); + var boolValue = DisableGateway.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VirtualNetworkType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" virtualNetworkType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(VirtualNetworkType)) + { + builder.Append(" virtualNetworkType: "); + builder.AppendLine($"'{VirtualNetworkType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("MinApiVersion", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersionConstraint: "); + builder.AppendLine("{"); + builder.AppendLine(" apiVersionConstraint: {"); + builder.Append(" minApiVersion: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(ApiVersionConstraint)) + { + builder.Append(" apiVersionConstraint: "); + BicepSerializationHelpers.AppendChildObject(builder, ApiVersionConstraint, options, 4, false, " apiVersionConstraint: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Restore), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" restore: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Restore)) + { + builder.Append(" restore: "); + var boolValue = Restore.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PrivateEndpointConnections), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" privateEndpointConnections: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(PrivateEndpointConnections)) + { + if (PrivateEndpointConnections.Any()) + { + builder.Append(" privateEndpointConnections: "); + builder.AppendLine("["); + foreach (var item in PrivateEndpointConnections) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " privateEndpointConnections: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PlatformVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" platformVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PlatformVersion)) + { + builder.Append(" platformVersion: "); + builder.AppendLine($"'{PlatformVersion.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublisherEmail), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" publisherEmail: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PublisherEmail)) + { + builder.Append(" publisherEmail: "); + if (PublisherEmail.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PublisherEmail}'''"); + } + else + { + builder.AppendLine($"'{PublisherEmail}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublisherName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" publisherName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PublisherName)) + { + builder.Append(" publisherName: "); + if (PublisherName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PublisherName}'''"); + } + else + { + builder.AppendLine($"'{PublisherName}'"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -779,6 +1612,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterO { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementServicePatch)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServicePatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServicePatch.cs index 41bc969b6f6b5..3de4738e68ada 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServicePatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServicePatch.cs @@ -58,6 +58,7 @@ public ApiManagementServicePatch() AdditionalLocations = new ChangeTrackingList(); CustomProperties = new ChangeTrackingDictionary(); Certificates = new ChangeTrackingList(); + OutboundPublicIPAddresses = new ChangeTrackingList(); PrivateEndpointConnections = new ChangeTrackingList(); Tags = new ChangeTrackingDictionary(); } @@ -88,9 +89,11 @@ public ApiManagementServicePatch() /// Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. /// Virtual network configuration of the API Management service. /// Additional datacenter locations of the API Management service. - /// Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1st 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of next ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them. Note: next ciphers can't be disabled since they are required by Azure CloudService internal components: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384. + /// Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1, 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of the following ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them.</br> Note: The following ciphers can't be disabled since they are required by internal platform components: TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. /// List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. /// Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. + /// Property can be used to enable NAT Gateway for this API Management service. + /// Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. /// Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. /// The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. /// Control Plane Apis version constraint for the API Management service. @@ -101,7 +104,7 @@ public ApiManagementServicePatch() /// Publisher name. /// Resource tags. /// Keeps track of any properties unknown to the library. - internal ApiManagementServicePatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ApiManagementServiceSkuProperties sku, ManagedServiceIdentity identity, ETag? etag, IList zones, string notificationSenderEmail, string provisioningState, string targetProvisioningState, DateTimeOffset? createdAtUtc, Uri gatewayUri, Uri gatewayRegionalUri, Uri portalUri, Uri managementApiUri, Uri scmUri, Uri developerPortalUri, IList hostnameConfigurations, IReadOnlyList publicIPAddresses, IReadOnlyList privateIPAddresses, ResourceIdentifier publicIPAddressId, PublicNetworkAccess? publicNetworkAccess, VirtualNetworkConfiguration virtualNetworkConfiguration, IList additionalLocations, IDictionary customProperties, IList certificates, bool? enableClientCertificate, bool? disableGateway, VirtualNetworkType? virtualNetworkType, ApiVersionConstraint apiVersionConstraint, bool? restore, IList privateEndpointConnections, PlatformVersion? platformVersion, string publisherEmail, string publisherName, IDictionary tags, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ApiManagementServicePatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ApiManagementServiceSkuProperties sku, ManagedServiceIdentity identity, ETag? etag, IList zones, string notificationSenderEmail, string provisioningState, string targetProvisioningState, DateTimeOffset? createdAtUtc, Uri gatewayUri, Uri gatewayRegionalUri, Uri portalUri, Uri managementApiUri, Uri scmUri, Uri developerPortalUri, IList hostnameConfigurations, IReadOnlyList publicIPAddresses, IReadOnlyList privateIPAddresses, ResourceIdentifier publicIPAddressId, PublicNetworkAccess? publicNetworkAccess, VirtualNetworkConfiguration virtualNetworkConfiguration, IList additionalLocations, IDictionary customProperties, IList certificates, bool? enableClientCertificate, ApiManagementNatGatewayState? natGatewayState, IReadOnlyList outboundPublicIPAddresses, bool? disableGateway, VirtualNetworkType? virtualNetworkType, ApiVersionConstraint apiVersionConstraint, bool? restore, IList privateEndpointConnections, PlatformVersion? platformVersion, string publisherEmail, string publisherName, IDictionary tags, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { Sku = sku; Identity = identity; @@ -127,6 +130,8 @@ internal ApiManagementServicePatch(ResourceIdentifier id, string name, ResourceT CustomProperties = customProperties; Certificates = certificates; EnableClientCertificate = enableClientCertificate; + NatGatewayState = natGatewayState; + OutboundPublicIPAddresses = outboundPublicIPAddresses; DisableGateway = disableGateway; VirtualNetworkType = virtualNetworkType; ApiVersionConstraint = apiVersionConstraint; @@ -140,60 +145,93 @@ internal ApiManagementServicePatch(ResourceIdentifier id, string name, ResourceT } /// SKU properties of the API Management service. + [WirePath("sku")] public ApiManagementServiceSkuProperties Sku { get; set; } /// Managed service identity of the Api Management service. + [WirePath("identity")] public ManagedServiceIdentity Identity { get; set; } /// ETag of the resource. + [WirePath("etag")] public ETag? ETag { get; } /// A list of availability zones denoting where the resource needs to come from. + [WirePath("zones")] public IList Zones { get; } /// Email address from which the notification will be sent. + [WirePath("properties.notificationSenderEmail")] public string NotificationSenderEmail { get; set; } /// The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + [WirePath("properties.provisioningState")] public string ProvisioningState { get; } /// The provisioning state of the API Management service, which is targeted by the long running operation started on the service. + [WirePath("properties.targetProvisioningState")] public string TargetProvisioningState { get; } /// Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + [WirePath("properties.createdAtUtc")] public DateTimeOffset? CreatedAtUtc { get; } /// Gateway URL of the API Management service. + [WirePath("properties.gatewayUrl")] public Uri GatewayUri { get; } /// Gateway URL of the API Management service in the Default Region. + [WirePath("properties.gatewayRegionalUrl")] public Uri GatewayRegionalUri { get; } /// Publisher portal endpoint Url of the API Management service. + [WirePath("properties.portalUrl")] public Uri PortalUri { get; } /// Management API endpoint URL of the API Management service. + [WirePath("properties.managementApiUrl")] public Uri ManagementApiUri { get; } /// SCM endpoint URL of the API Management service. + [WirePath("properties.scmUrl")] public Uri ScmUri { get; } /// DEveloper Portal endpoint URL of the API Management service. + [WirePath("properties.developerPortalUrl")] public Uri DeveloperPortalUri { get; } /// Custom hostname configuration of the API Management service. + [WirePath("properties.hostnameConfigurations")] public IList HostnameConfigurations { get; } /// Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, Standard, Premium and Isolated SKU. + [WirePath("properties.publicIPAddresses")] public IReadOnlyList PublicIPAddresses { get; } /// Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU. + [WirePath("properties.privateIPAddresses")] public IReadOnlyList PrivateIPAddresses { get; } /// Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported only for Developer and Premium SKU being deployed in Virtual Network. + [WirePath("properties.publicIpAddressId")] public ResourceIdentifier PublicIPAddressId { get; set; } /// Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. + [WirePath("properties.publicNetworkAccess")] public PublicNetworkAccess? PublicNetworkAccess { get; set; } /// Virtual network configuration of the API Management service. + [WirePath("properties.virtualNetworkConfiguration")] public VirtualNetworkConfiguration VirtualNetworkConfiguration { get; set; } /// Additional datacenter locations of the API Management service. + [WirePath("properties.additionalLocations")] public IList AdditionalLocations { get; } - /// Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1st 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of next ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them. Note: next ciphers can't be disabled since they are required by Azure CloudService internal components: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384. + /// Custom properties of the API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.</br>Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.</br>Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1, 2018 and `False` otherwise. Http2 setting's default value is `False`.</br></br>You can disable any of the following ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them.</br> Note: The following ciphers can't be disabled since they are required by internal platform components: TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. + [WirePath("properties.customProperties")] public IDictionary CustomProperties { get; } /// List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. + [WirePath("properties.certificates")] public IList Certificates { get; } /// Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. + [WirePath("properties.enableClientCertificate")] public bool? EnableClientCertificate { get; set; } + /// Property can be used to enable NAT Gateway for this API Management service. + [WirePath("properties.natGatewayState")] + public ApiManagementNatGatewayState? NatGatewayState { get; set; } + /// Outbound public IPV4 address prefixes associated with NAT Gateway deployed service. Available only for Premium SKU on stv2 platform. + [WirePath("properties.outboundPublicIPAddresses")] + public IReadOnlyList OutboundPublicIPAddresses { get; } /// Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. + [WirePath("properties.disableGateway")] public bool? DisableGateway { get; set; } /// The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. + [WirePath("properties.virtualNetworkType")] public VirtualNetworkType? VirtualNetworkType { get; set; } /// Control Plane Apis version constraint for the API Management service. internal ApiVersionConstraint ApiVersionConstraint { get; set; } /// Limit control plane API calls to API Management service with version equal to or newer than this value. + [WirePath("properties.apiVersionConstraint.minApiVersion")] public string MinApiVersion { get => ApiVersionConstraint is null ? default : ApiVersionConstraint.MinApiVersion; @@ -206,16 +244,22 @@ public string MinApiVersion } /// Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other properties will be ignored. + [WirePath("properties.restore")] public bool? Restore { get; set; } /// List of Private Endpoint Connections of this service. + [WirePath("properties.privateEndpointConnections")] public IList PrivateEndpointConnections { get; } /// Compute Platform Version running the service in this location. + [WirePath("properties.platformVersion")] public PlatformVersion? PlatformVersion { get; } /// Publisher email. + [WirePath("properties.publisherEmail")] public string PublisherEmail { get; set; } /// Publisher name. + [WirePath("properties.publisherName")] public string PublisherName { get; set; } /// Resource tags. + [WirePath("tags")] public IDictionary Tags { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceSkuProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceSkuProperties.Serialization.cs index edd30cdfd6efa..1ff49d620e0eb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceSkuProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceSkuProperties.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -93,6 +94,45 @@ internal static ApiManagementServiceSkuProperties DeserializeApiManagementServic return new ApiManagementServiceSkuProperties(name, capacity, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" name: "); + builder.AppendLine($"'{Name.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Capacity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" capacity: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" capacity: "); + builder.AppendLine($"{Capacity}"); + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -101,6 +141,8 @@ BinaryData IPersistableModel.Write(ModelReade { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementServiceSkuProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceSkuProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceSkuProperties.cs index 35dba6e0eb103..b3950fe0f239c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceSkuProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceSkuProperties.cs @@ -71,8 +71,10 @@ internal ApiManagementServiceSkuProperties() } /// Name of the Sku. + [WirePath("name")] public ApiManagementServiceSkuType Name { get; set; } /// Capacity of the SKU (number of deployed units of the SKU). For Consumption SKU capacity must be specified as 0. + [WirePath("capacity")] public int Capacity { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSku.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSku.Serialization.cs index 04d44fa42e908..35e99913cb2a6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSku.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSku.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -322,6 +324,325 @@ internal static ApiManagementSku DeserializeApiManagementSku(JsonElement element serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceType)) + { + builder.Append(" resourceType: "); + if (ResourceType.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ResourceType}'''"); + } + else + { + builder.AppendLine($"'{ResourceType}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Tier), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tier: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Tier)) + { + builder.Append(" tier: "); + if (Tier.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Tier}'''"); + } + else + { + builder.AppendLine($"'{Tier}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Size), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" size: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Size)) + { + builder.Append(" size: "); + if (Size.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Size}'''"); + } + else + { + builder.AppendLine($"'{Size}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Family), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" family: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Family)) + { + builder.Append(" family: "); + if (Family.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Family}'''"); + } + else + { + builder.AppendLine($"'{Family}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Kind), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" kind: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Kind)) + { + builder.Append(" kind: "); + if (Kind.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Kind}'''"); + } + else + { + builder.AppendLine($"'{Kind}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Capacity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" capacity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Capacity)) + { + builder.Append(" capacity: "); + BicepSerializationHelpers.AppendChildObject(builder, Capacity, options, 2, false, " capacity: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Locations), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" locations: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Locations)) + { + if (Locations.Any()) + { + builder.Append(" locations: "); + builder.AppendLine("["); + foreach (var item in Locations) + { + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LocationInfo), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" locationInfo: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(LocationInfo)) + { + if (LocationInfo.Any()) + { + builder.Append(" locationInfo: "); + builder.AppendLine("["); + foreach (var item in LocationInfo) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " locationInfo: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersions), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersions: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ApiVersions)) + { + if (ApiVersions.Any()) + { + builder.Append(" apiVersions: "); + builder.AppendLine("["); + foreach (var item in ApiVersions) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Costs), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" costs: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Costs)) + { + if (Costs.Any()) + { + builder.Append(" costs: "); + builder.AppendLine("["); + foreach (var item in Costs) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " costs: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Capabilities), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" capabilities: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Capabilities)) + { + if (Capabilities.Any()) + { + builder.Append(" capabilities: "); + builder.AppendLine("["); + foreach (var item in Capabilities) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " capabilities: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Restrictions), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" restrictions: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Restrictions)) + { + if (Restrictions.Any()) + { + builder.Append(" restrictions: "); + builder.AppendLine("["); + foreach (var item in Restrictions) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " restrictions: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -330,6 +651,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions op { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementSku)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSku.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSku.cs index 3f4eeb4a5797b..67ad2222a5a85 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSku.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSku.cs @@ -91,30 +91,43 @@ internal ApiManagementSku(string resourceType, string name, string tier, string } /// The type of resource the SKU applies to. + [WirePath("resourceType")] public string ResourceType { get; } /// The name of SKU. + [WirePath("name")] public string Name { get; } /// Specifies the tier of virtual machines in a scale set.<br /><br /> Possible Values:<br /><br /> **Standard**<br /><br /> **Basic**. + [WirePath("tier")] public string Tier { get; } /// The Size of the SKU. + [WirePath("size")] public string Size { get; } /// The Family of this particular SKU. + [WirePath("family")] public string Family { get; } /// The Kind of resources that are supported in this SKU. + [WirePath("kind")] public string Kind { get; } /// Specifies the number of virtual machines in the scale set. + [WirePath("capacity")] public ApiManagementSkuCapacity Capacity { get; } /// The set of locations that the SKU is available. + [WirePath("locations")] public IReadOnlyList Locations { get; } /// A list of locations and availability zones in those locations where the SKU is available. + [WirePath("locationInfo")] public IReadOnlyList LocationInfo { get; } /// The api versions that support this SKU. + [WirePath("apiVersions")] public IReadOnlyList ApiVersions { get; } /// Metadata for retrieving price info. + [WirePath("costs")] public IReadOnlyList Costs { get; } /// A name value pair to describe the capability. + [WirePath("capabilities")] public IReadOnlyList Capabilities { get; } /// The restrictions because of which SKU cannot be used. This is empty if there are no restrictions. + [WirePath("restrictions")] public IReadOnlyList Restrictions { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCapabilities.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCapabilities.Serialization.cs index 5b40e9b1e77ed..17a5ab9877baf 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCapabilities.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCapabilities.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -99,6 +100,67 @@ internal static ApiManagementSkuCapabilities DeserializeApiManagementSkuCapabili return new ApiManagementSkuCapabilities(name, value, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + if (Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Value}'''"); + } + else + { + builder.AppendLine($"'{Value}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -107,6 +169,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrit { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementSkuCapabilities)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCapabilities.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCapabilities.cs index 23c0faf407c38..de810333ae7cd 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCapabilities.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCapabilities.cs @@ -62,8 +62,10 @@ internal ApiManagementSkuCapabilities(string name, string value, IDictionary An invariant to describe the feature. + [WirePath("name")] public string Name { get; } /// An invariant if the feature is measured by quantity. + [WirePath("value")] public string Value { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCapacity.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCapacity.Serialization.cs index 75947c05f3782..5a9f3aaab6605 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCapacity.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCapacity.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -137,6 +138,81 @@ internal static ApiManagementSkuCapacity DeserializeApiManagementSkuCapacity(Jso return new ApiManagementSkuCapacity(minimum, maximum, @default, scaleType, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Minimum), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" minimum: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Minimum)) + { + builder.Append(" minimum: "); + builder.AppendLine($"{Minimum.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Maximum), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" maximum: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Maximum)) + { + builder.Append(" maximum: "); + builder.AppendLine($"{Maximum.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Default), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" default: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Default)) + { + builder.Append(" default: "); + builder.AppendLine($"{Default.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScaleType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scaleType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ScaleType)) + { + builder.Append(" scaleType: "); + builder.AppendLine($"'{ScaleType.Value.ToSerialString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -145,6 +221,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementSkuCapacity)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCapacity.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCapacity.cs index 6a1c544ee9f12..16e96e2e967e9 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCapacity.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCapacity.cs @@ -66,12 +66,16 @@ internal ApiManagementSkuCapacity(int? minimum, int? maximum, int? @default, Api } /// The minimum capacity. + [WirePath("minimum")] public int? Minimum { get; } /// The maximum capacity that can be set. + [WirePath("maximum")] public int? Maximum { get; } /// The default capacity. + [WirePath("default")] public int? Default { get; } /// The scale type applicable to the sku. + [WirePath("scaleType")] public ApiManagementSkuCapacityScaleType? ScaleType { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCosts.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCosts.Serialization.cs index 201a6f5e9c68f..f88c792e3c136 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCosts.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCosts.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -114,6 +115,82 @@ internal static ApiManagementSkuCosts DeserializeApiManagementSkuCosts(JsonEleme return new ApiManagementSkuCosts(meterId, quantity, extendedUnit, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MeterId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" meterID: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MeterId)) + { + builder.Append(" meterID: "); + if (MeterId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{MeterId}'''"); + } + else + { + builder.AppendLine($"'{MeterId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Quantity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" quantity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Quantity)) + { + builder.Append(" quantity: "); + builder.AppendLine($"'{Quantity.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExtendedUnit), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" extendedUnit: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ExtendedUnit)) + { + builder.Append(" extendedUnit: "); + if (ExtendedUnit.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ExtendedUnit}'''"); + } + else + { + builder.AppendLine($"'{ExtendedUnit}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -122,6 +199,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementSkuCosts)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCosts.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCosts.cs index 28fd16920408a..0cb7f0c4a698b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCosts.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuCosts.cs @@ -64,10 +64,13 @@ internal ApiManagementSkuCosts(string meterId, long? quantity, string extendedUn } /// Used for querying price from commerce. + [WirePath("meterID")] public string MeterId { get; } /// The multiplier is needed to extend the base metered cost. + [WirePath("quantity")] public long? Quantity { get; } /// An invariant to show the extended unit. + [WirePath("extendedUnit")] public string ExtendedUnit { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuLocationInfo.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuLocationInfo.Serialization.cs index f01d92cb23713..c9a32029a93f5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuLocationInfo.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuLocationInfo.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -142,6 +144,95 @@ internal static ApiManagementSkuLocationInfo DeserializeApiManagementSkuLocation return new ApiManagementSkuLocationInfo(location, zones ?? new ChangeTrackingList(), zoneDetails ?? new ChangeTrackingList(), serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" location: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Location)) + { + builder.Append(" location: "); + builder.AppendLine($"'{Location.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Zones), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" zones: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Zones)) + { + if (Zones.Any()) + { + builder.Append(" zones: "); + builder.AppendLine("["); + foreach (var item in Zones) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ZoneDetails), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" zoneDetails: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ZoneDetails)) + { + if (ZoneDetails.Any()) + { + builder.Append(" zoneDetails: "); + builder.AppendLine("["); + foreach (var item in ZoneDetails) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " zoneDetails: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -150,6 +241,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrit { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementSkuLocationInfo)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuLocationInfo.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuLocationInfo.cs index c720f9b91925b..afba2782a3031 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuLocationInfo.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuLocationInfo.cs @@ -67,10 +67,13 @@ internal ApiManagementSkuLocationInfo(AzureLocation? location, IReadOnlyList Location of the SKU. + [WirePath("location")] public AzureLocation? Location { get; } /// List of availability zones where the SKU is supported. + [WirePath("zones")] public IReadOnlyList Zones { get; } /// Details of capabilities available to a SKU in specific zones. + [WirePath("zoneDetails")] public IReadOnlyList ZoneDetails { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuRestrictionInfo.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuRestrictionInfo.Serialization.cs index 0bdc3ef37d95b..3ee98de08acfe 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuRestrictionInfo.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuRestrictionInfo.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -127,6 +129,80 @@ internal static ApiManagementSkuRestrictionInfo DeserializeApiManagementSkuRestr return new ApiManagementSkuRestrictionInfo(locations ?? new ChangeTrackingList(), zones ?? new ChangeTrackingList(), serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Locations), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" locations: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Locations)) + { + if (Locations.Any()) + { + builder.Append(" locations: "); + builder.AppendLine("["); + foreach (var item in Locations) + { + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Zones), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" zones: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Zones)) + { + if (Zones.Any()) + { + builder.Append(" zones: "); + builder.AppendLine("["); + foreach (var item in Zones) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -135,6 +211,8 @@ BinaryData IPersistableModel.Write(ModelReaderW { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementSkuRestrictionInfo)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuRestrictionInfo.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuRestrictionInfo.cs index b042e005cc76b..d67df0dd88546 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuRestrictionInfo.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuRestrictionInfo.cs @@ -65,8 +65,10 @@ internal ApiManagementSkuRestrictionInfo(IReadOnlyList locations, } /// Locations where the SKU is restricted. + [WirePath("locations")] public IReadOnlyList Locations { get; } /// List of availability zones where the SKU is restricted. + [WirePath("zones")] public IReadOnlyList Zones { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuRestrictions.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuRestrictions.Serialization.cs index a164574d40fb5..5dd7d8ee0f713 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuRestrictions.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuRestrictions.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -147,6 +149,102 @@ internal static ApiManagementSkuRestrictions DeserializeApiManagementSkuRestrict return new ApiManagementSkuRestrictions(type, values ?? new ChangeTrackingList(), restrictionInfo, reasonCode, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RestrictionsType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(RestrictionsType)) + { + builder.Append(" type: "); + builder.AppendLine($"'{RestrictionsType.Value.ToSerialString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Values), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" values: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Values)) + { + if (Values.Any()) + { + builder.Append(" values: "); + builder.AppendLine("["); + foreach (var item in Values) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RestrictionInfo), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" restrictionInfo: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(RestrictionInfo)) + { + builder.Append(" restrictionInfo: "); + BicepSerializationHelpers.AppendChildObject(builder, RestrictionInfo, options, 2, false, " restrictionInfo: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ReasonCode), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" reasonCode: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ReasonCode)) + { + builder.Append(" reasonCode: "); + builder.AppendLine($"'{ReasonCode.Value.ToSerialString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -155,6 +253,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrit { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementSkuRestrictions)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuRestrictions.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuRestrictions.cs index b770e8f158407..cd88ce4c98f53 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuRestrictions.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuRestrictions.cs @@ -67,12 +67,16 @@ internal ApiManagementSkuRestrictions(ApiManagementSkuRestrictionsType? restrict } /// The type of restrictions. + [WirePath("type")] public ApiManagementSkuRestrictionsType? RestrictionsType { get; } /// The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted. + [WirePath("values")] public IReadOnlyList Values { get; } /// The information about the restriction where the SKU cannot be used. + [WirePath("restrictionInfo")] public ApiManagementSkuRestrictionInfo RestrictionInfo { get; } /// The reason for restriction. + [WirePath("reasonCode")] public ApiManagementSkuRestrictionsReasonCode? ReasonCode { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuZoneDetails.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuZoneDetails.Serialization.cs index 970c6f889703a..43263789f6e3f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuZoneDetails.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuZoneDetails.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -127,6 +129,80 @@ internal static ApiManagementSkuZoneDetails DeserializeApiManagementSkuZoneDetai return new ApiManagementSkuZoneDetails(name ?? new ChangeTrackingList(), capabilities ?? new ChangeTrackingList(), serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Name)) + { + if (Name.Any()) + { + builder.Append(" name: "); + builder.AppendLine("["); + foreach (var item in Name) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Capabilities), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" capabilities: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Capabilities)) + { + if (Capabilities.Any()) + { + builder.Append(" capabilities: "); + builder.AppendLine("["); + foreach (var item in Capabilities) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " capabilities: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -135,6 +211,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrite { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementSkuZoneDetails)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuZoneDetails.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuZoneDetails.cs index b5de642b8c115..c8009a03e54fc 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuZoneDetails.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkuZoneDetails.cs @@ -64,8 +64,10 @@ internal ApiManagementSkuZoneDetails(IReadOnlyList name, IReadOnlyList The set of zones that the SKU is available in with the specified capabilities. + [WirePath("name")] public IReadOnlyList Name { get; } /// A list of capabilities that are available for the SKU in the specified list of zones. + [WirePath("capabilities")] public IReadOnlyList Capabilities { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkusResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkusResult.Serialization.cs index 0cc07d4438920..e146b48f5a001 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkusResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSkusResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -106,6 +108,67 @@ internal static ApiManagementSkusResult DeserializeApiManagementSkusResult(JsonE return new ApiManagementSkusResult(value, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -114,6 +177,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpt { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiManagementSkusResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSubscriptionCreateOrUpdateContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSubscriptionCreateOrUpdateContent.cs index e3655b96b8b38..1fd160cfaa29c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSubscriptionCreateOrUpdateContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSubscriptionCreateOrUpdateContent.cs @@ -72,18 +72,25 @@ internal ApiManagementSubscriptionCreateOrUpdateContent(string ownerId, string s } /// User (user id path) for whom subscription is being created in form /users/{userId}. + [WirePath("properties.ownerId")] public string OwnerId { get; set; } /// Scope like /products/{productId} or /apis or /apis/{apiId}. + [WirePath("properties.scope")] public string Scope { get; set; } /// Subscription name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// Primary subscription key. If not specified during request key will be generated automatically. + [WirePath("properties.primaryKey")] public string PrimaryKey { get; set; } /// Secondary subscription key. If not specified during request key will be generated automatically. + [WirePath("properties.secondaryKey")] public string SecondaryKey { get; set; } /// Initial subscription state. If no value is specified, subscription is created with Submitted state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. + [WirePath("properties.state")] public SubscriptionState? State { get; set; } /// Determines whether tracing can be enabled. + [WirePath("properties.allowTracing")] public bool? AllowTracing { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSubscriptionPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSubscriptionPatch.cs index 5f7daffa0ff1c..e160d102f58cc 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSubscriptionPatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementSubscriptionPatch.cs @@ -76,22 +76,31 @@ internal ApiManagementSubscriptionPatch(string ownerId, string scope, DateTimeOf } /// User identifier path: /users/{userId}. + [WirePath("properties.ownerId")] public string OwnerId { get; set; } /// Scope like /products/{productId} or /apis or /apis/{apiId}. + [WirePath("properties.scope")] public string Scope { get; set; } /// Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + [WirePath("properties.expirationDate")] public DateTimeOffset? ExpireOn { get; set; } /// Subscription name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// Primary subscription key. + [WirePath("properties.primaryKey")] public string PrimaryKey { get; set; } /// Secondary subscription key. + [WirePath("properties.secondaryKey")] public string SecondaryKey { get; set; } /// Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. + [WirePath("properties.state")] public SubscriptionState? State { get; set; } /// Comments describing subscription state change by the administrator when the state is changed to the 'rejected'. + [WirePath("properties.stateComment")] public string StateComment { get; set; } /// Determines whether tracing can be enabled. + [WirePath("properties.allowTracing")] public bool? AllowTracing { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementTagCreateOrUpdateContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementTagCreateOrUpdateContent.cs index bc02359295b71..75a5d1eb91870 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementTagCreateOrUpdateContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementTagCreateOrUpdateContent.cs @@ -60,6 +60,7 @@ internal ApiManagementTagCreateOrUpdateContent(string displayName, IDictionary Tag name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementUserCreateOrUpdateContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementUserCreateOrUpdateContent.cs index 50cce59aa3152..df26483d76607 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementUserCreateOrUpdateContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementUserCreateOrUpdateContent.cs @@ -77,22 +77,31 @@ internal ApiManagementUserCreateOrUpdateContent(ApiManagementUserState? state, s } /// Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. + [WirePath("properties.state")] public ApiManagementUserState? State { get; set; } /// Optional note about a user set by the administrator. + [WirePath("properties.note")] public string Note { get; set; } /// Collection of user identities. + [WirePath("properties.identities")] public IList Identities { get; } /// Email address. Must not be empty and must be unique within the service instance. + [WirePath("properties.email")] public string Email { get; set; } /// First name. + [WirePath("properties.firstName")] public string FirstName { get; set; } /// Last name. + [WirePath("properties.lastName")] public string LastName { get; set; } /// User Password. If no value is provided, a default password is generated. + [WirePath("properties.password")] public string Password { get; set; } /// Determines the type of application which send the create user request. Default is legacy portal. + [WirePath("properties.appType")] public AppType? AppType { get; set; } /// Determines the type of confirmation e-mail that will be sent to the newly created user. + [WirePath("properties.confirmation")] public ConfirmationEmailType? Confirmation { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementUserPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementUserPatch.cs index 5b034be9596d1..023b0198b664b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementUserPatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementUserPatch.cs @@ -73,18 +73,25 @@ internal ApiManagementUserPatch(ApiManagementUserState? state, string note, ILis } /// Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. + [WirePath("properties.state")] public ApiManagementUserState? State { get; set; } /// Optional note about a user set by the administrator. + [WirePath("properties.note")] public string Note { get; set; } /// Collection of user identities. + [WirePath("properties.identities")] public IList Identities { get; } /// Email address. Must not be empty and must be unique within the service instance. + [WirePath("properties.email")] public string Email { get; set; } /// User Password. + [WirePath("properties.password")] public string Password { get; set; } /// First name. + [WirePath("properties.firstName")] public string FirstName { get; set; } /// Last name. + [WirePath("properties.lastName")] public string LastName { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiOperationPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiOperationPatch.cs index a2be40d52a94d..098185fd0d90d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiOperationPatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiOperationPatch.cs @@ -76,20 +76,28 @@ internal ApiOperationPatch(IList templateParameters, string d } /// Collection of URL template parameters. + [WirePath("properties.templateParameters")] public IList TemplateParameters { get; } /// Description of the operation. May include HTML formatting tags. + [WirePath("properties.description")] public string Description { get; set; } /// An entity containing request details. + [WirePath("properties.request")] public RequestContract Request { get; set; } /// Array of Operation responses. + [WirePath("properties.responses")] public IList Responses { get; } /// Operation Policies. + [WirePath("properties.policies")] public string Policies { get; set; } /// Operation Name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. + [WirePath("properties.method")] public string Method { get; set; } /// Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}. + [WirePath("properties.urlTemplate")] public string UriTemplate { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiPatch.cs index d2cf6e203ca70..4acb5551f3156 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiPatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiPatch.cs @@ -98,42 +98,61 @@ internal ApiPatch(string description, AuthenticationSettingsContract authenticat } /// Description of the API. May include HTML formatting tags. + [WirePath("properties.description")] public string Description { get; set; } /// Collection of authentication settings included into this API. + [WirePath("properties.authenticationSettings")] public AuthenticationSettingsContract AuthenticationSettings { get; set; } /// Protocols over which API is made available. + [WirePath("properties.subscriptionKeyParameterNames")] public SubscriptionKeyParameterNamesContract SubscriptionKeyParameterNames { get; set; } /// Type of API. + [WirePath("properties.type")] public ApiType? ApiType { get; set; } /// Describes the revision of the API. If no value is provided, default revision 1 is created. + [WirePath("properties.apiRevision")] public string ApiRevision { get; set; } /// Indicates the version identifier of the API if the API is versioned. + [WirePath("properties.apiVersion")] public string ApiVersion { get; set; } /// Indicates if API revision is current api revision. + [WirePath("properties.isCurrent")] public bool? IsCurrent { get; set; } /// Indicates if API revision is accessible via the gateway. + [WirePath("properties.isOnline")] public bool? IsOnline { get; } /// Description of the API Revision. + [WirePath("properties.apiRevisionDescription")] public string ApiRevisionDescription { get; set; } /// Description of the API Version. + [WirePath("properties.apiVersionDescription")] public string ApiVersionDescription { get; set; } /// A resource identifier for the related ApiVersionSet. + [WirePath("properties.apiVersionSetId")] public ResourceIdentifier ApiVersionSetId { get; set; } /// Specifies whether an API or Product subscription is required for accessing the API. + [WirePath("properties.subscriptionRequired")] public bool? IsSubscriptionRequired { get; set; } /// A URL to the Terms of Service for the API. MUST be in the format of a URL. + [WirePath("properties.termsOfServiceUrl")] public string TermsOfServiceLink { get; set; } /// Contact information for the API. + [WirePath("properties.contact")] public ApiContactInformation Contact { get; set; } /// License information for the API. + [WirePath("properties.license")] public ApiLicenseInformation License { get; set; } /// API name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// Absolute URL of the backend service implementing this API. + [WirePath("properties.serviceUrl")] public string ServiceLink { get; set; } /// Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. + [WirePath("properties.path")] public string Path { get; set; } /// Describes on which protocols the operations in this API can be invoked. + [WirePath("properties.protocols")] public IList Protocols { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiReleaseListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiReleaseListResult.Serialization.cs index 18c85a0844d4b..0089b771dd219 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiReleaseListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiReleaseListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static ApiReleaseListResult DeserializeApiReleaseListResult(JsonElement return new ApiReleaseListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiReleaseListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiRevisionContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiRevisionContract.Serialization.cs index 51bc9c8d13e4c..75073ee1431c9 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiRevisionContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiRevisionContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -190,6 +191,177 @@ internal static ApiRevisionContract DeserializeApiRevisionContract(JsonElement e serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiId)) + { + builder.Append(" apiId: "); + if (ApiId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiId}'''"); + } + else + { + builder.AppendLine($"'{ApiId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiRevision), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiRevision: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiRevision)) + { + builder.Append(" apiRevision: "); + if (ApiRevision.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiRevision}'''"); + } + else + { + builder.AppendLine($"'{ApiRevision}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CreatedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" createdDateTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CreatedOn)) + { + builder.Append(" createdDateTime: "); + var formattedDateTimeString = TypeFormatters.ToString(CreatedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UpdatedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" updatedDateTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UpdatedOn)) + { + builder.Append(" updatedDateTime: "); + var formattedDateTimeString = TypeFormatters.ToString(UpdatedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PrivateUriString), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" privateUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PrivateUriString)) + { + builder.Append(" privateUrl: "); + if (PrivateUriString.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PrivateUriString}'''"); + } + else + { + builder.AppendLine($"'{PrivateUriString}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsOnline), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isOnline: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsOnline)) + { + builder.Append(" isOnline: "); + var boolValue = IsOnline.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsCurrent), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isCurrent: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsCurrent)) + { + builder.Append(" isCurrent: "); + var boolValue = IsCurrent.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -198,6 +370,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiRevisionContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiRevisionContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiRevisionContract.cs index 4dd6abbd5e28b..e3a7700c944ce 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiRevisionContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiRevisionContract.cs @@ -74,20 +74,28 @@ internal ApiRevisionContract(string apiId, string apiRevision, DateTimeOffset? c } /// Identifier of the API Revision. + [WirePath("apiId")] public string ApiId { get; } /// Revision number of API. + [WirePath("apiRevision")] public string ApiRevision { get; } /// The time the API Revision was created. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. + [WirePath("createdDateTime")] public DateTimeOffset? CreatedOn { get; } /// The time the API Revision were updated. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. + [WirePath("updatedDateTime")] public DateTimeOffset? UpdatedOn { get; } /// Description of the API Revision. + [WirePath("description")] public string Description { get; } /// Gateway URL for accessing the non-current API Revision. + [WirePath("privateUrl")] public string PrivateUriString { get; } /// Indicates if API revision is the current api revision. + [WirePath("isOnline")] public bool? IsOnline { get; } /// Indicates if API revision is accessible via the gateway. + [WirePath("isCurrent")] public bool? IsCurrent { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiRevisionListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiRevisionListResult.Serialization.cs index c679d045ce5a5..7a9d4f22f0a08 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiRevisionListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiRevisionListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static ApiRevisionListResult DeserializeApiRevisionListResult(JsonEleme return new ApiRevisionListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiRevisionListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiSchemaType.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiSchemaType.cs index 7aadb858da33c..51bebe11b4114 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiSchemaType.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiSchemaType.cs @@ -25,7 +25,7 @@ public ApiSchemaType(string value) private const string XmlValue = "xml"; private const string JsonValue = "json"; - /// Xml schema type. + /// XML schema type. public static ApiSchemaType Xml { get; } = new ApiSchemaType(XmlValue); /// Json schema type. public static ApiSchemaType Json { get; } = new ApiSchemaType(JsonValue); diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiTagDescriptionCreateOrUpdateContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiTagDescriptionCreateOrUpdateContent.cs index 6fb7427d206f9..ee4bd1a7f34d2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiTagDescriptionCreateOrUpdateContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiTagDescriptionCreateOrUpdateContent.cs @@ -64,10 +64,13 @@ internal ApiTagDescriptionCreateOrUpdateContent(string description, Uri external } /// Description of the Tag. + [WirePath("properties.description")] public string Description { get; set; } /// Absolute URL of external resources describing the tag. + [WirePath("properties.externalDocsUrl")] public Uri ExternalDocsUri { get; set; } /// Description of the external resources describing the tag. + [WirePath("properties.externalDocsDescription")] public string ExternalDocsDescription { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionConstraint.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionConstraint.Serialization.cs index 9072fc11d726f..f970cd23e467d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionConstraint.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionConstraint.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -88,6 +89,44 @@ internal static ApiVersionConstraint DeserializeApiVersionConstraint(JsonElement return new ApiVersionConstraint(minApiVersion, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MinApiVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" minApiVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MinApiVersion)) + { + builder.Append(" minApiVersion: "); + if (MinApiVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{MinApiVersion}'''"); + } + else + { + builder.AppendLine($"'{MinApiVersion}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -96,6 +135,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiVersionConstraint)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionConstraint.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionConstraint.cs index 178f256476457..0ba9ef23db6c6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionConstraint.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionConstraint.cs @@ -60,6 +60,7 @@ internal ApiVersionConstraint(string minApiVersion, IDictionary Limit control plane API calls to API Management service with version equal to or newer than this value. + [WirePath("minApiVersion")] public string MinApiVersion { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionSetContractDetails.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionSetContractDetails.Serialization.cs index 3645c75f839c0..b099ab7f577d3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionSetContractDetails.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionSetContractDetails.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -154,6 +155,151 @@ internal static ApiVersionSetContractDetails DeserializeApiVersionSetContractDet serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + if (Id.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Id}'''"); + } + else + { + builder.AppendLine($"'{Id}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VersioningScheme), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" versioningScheme: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(VersioningScheme)) + { + builder.Append(" versioningScheme: "); + builder.AppendLine($"'{VersioningScheme.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VersionQueryName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" versionQueryName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(VersionQueryName)) + { + builder.Append(" versionQueryName: "); + if (VersionQueryName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{VersionQueryName}'''"); + } + else + { + builder.AppendLine($"'{VersionQueryName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VersionHeaderName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" versionHeaderName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(VersionHeaderName)) + { + builder.Append(" versionHeaderName: "); + if (VersionHeaderName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{VersionHeaderName}'''"); + } + else + { + builder.AppendLine($"'{VersionHeaderName}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -162,6 +308,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrit { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiVersionSetContractDetails)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionSetContractDetails.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionSetContractDetails.cs index 215bf3d8bf32f..a5cab24b3295c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionSetContractDetails.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionSetContractDetails.cs @@ -70,16 +70,22 @@ internal ApiVersionSetContractDetails(string id, string name, string description } /// Identifier for existing API Version Set. Omit this value to create a new Version Set. + [WirePath("id")] public string Id { get; set; } /// The display Name of the API Version Set. + [WirePath("name")] public string Name { get; set; } /// Description of API Version Set. + [WirePath("description")] public string Description { get; set; } /// An value that determines where the API Version identifier will be located in a HTTP request. + [WirePath("versioningScheme")] public VersioningScheme? VersioningScheme { get; set; } /// Name of query parameter that indicates the API Version if versioningScheme is set to `query`. + [WirePath("versionQueryName")] public string VersionQueryName { get; set; } /// Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`. + [WirePath("versionHeaderName")] public string VersionHeaderName { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionSetListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionSetListResult.Serialization.cs index 381bf710acc8b..38b36ab0b2d60 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionSetListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionSetListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static ApiVersionSetListResult DeserializeApiVersionSetListResult(JsonE return new ApiVersionSetListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpt { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ApiVersionSetListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionSetPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionSetPatch.cs index 86c4bae42b969..18dc332ef649b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionSetPatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiVersionSetPatch.cs @@ -68,14 +68,19 @@ internal ApiVersionSetPatch(string description, string versionQueryName, string } /// Description of API Version Set. + [WirePath("properties.description")] public string Description { get; set; } /// Name of query parameter that indicates the API Version if versioningScheme is set to `query`. + [WirePath("properties.versionQueryName")] public string VersionQueryName { get; set; } /// Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`. + [WirePath("properties.versionHeaderName")] public string VersionHeaderName { get; set; } /// Name of API Version Set. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// An value that determines where the API Version identifier will be located in a HTTP request. + [WirePath("properties.versioningScheme")] public VersioningScheme? VersioningScheme { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedApiProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedApiProperties.Serialization.cs index 545c2c7704f0f..9ef826d40e740 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedApiProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedApiProperties.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -372,6 +374,389 @@ internal static AssociatedApiProperties DeserializeAssociatedApiProperties(JsonE protocols ?? new ChangeTrackingList()); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + if (Id.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Id}'''"); + } + else + { + builder.AppendLine($"'{Id}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ServiceUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serviceUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ServiceUri)) + { + builder.Append(" serviceUrl: "); + builder.AppendLine($"'{ServiceUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Path), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" path: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Path)) + { + builder.Append(" path: "); + if (Path.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Path}'''"); + } + else + { + builder.AppendLine($"'{Path}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Protocols), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" protocols: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Protocols)) + { + if (Protocols.Any()) + { + builder.Append(" protocols: "); + builder.AppendLine("["); + foreach (var item in Protocols) + { + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AuthenticationSettings), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" authenticationSettings: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AuthenticationSettings)) + { + builder.Append(" authenticationSettings: "); + BicepSerializationHelpers.AppendChildObject(builder, AuthenticationSettings, options, 2, false, " authenticationSettings: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SubscriptionKeyParameterNames), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionKeyParameterNames: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SubscriptionKeyParameterNames)) + { + builder.Append(" subscriptionKeyParameterNames: "); + BicepSerializationHelpers.AppendChildObject(builder, SubscriptionKeyParameterNames, options, 2, false, " subscriptionKeyParameterNames: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiRevision), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiRevision: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiRevision)) + { + builder.Append(" apiRevision: "); + if (ApiRevision.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiRevision}'''"); + } + else + { + builder.AppendLine($"'{ApiRevision}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersion)) + { + builder.Append(" apiVersion: "); + if (ApiVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiVersion}'''"); + } + else + { + builder.AppendLine($"'{ApiVersion}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsCurrent), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isCurrent: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsCurrent)) + { + builder.Append(" isCurrent: "); + var boolValue = IsCurrent.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsOnline), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isOnline: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsOnline)) + { + builder.Append(" isOnline: "); + var boolValue = IsOnline.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiRevisionDescription), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiRevisionDescription: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiRevisionDescription)) + { + builder.Append(" apiRevisionDescription: "); + if (ApiRevisionDescription.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiRevisionDescription}'''"); + } + else + { + builder.AppendLine($"'{ApiRevisionDescription}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersionDescription), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersionDescription: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersionDescription)) + { + builder.Append(" apiVersionDescription: "); + if (ApiVersionDescription.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiVersionDescription}'''"); + } + else + { + builder.AppendLine($"'{ApiVersionDescription}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersionSetId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersionSetId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersionSetId)) + { + builder.Append(" apiVersionSetId: "); + builder.AppendLine($"'{ApiVersionSetId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsSubscriptionRequired), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionRequired: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsSubscriptionRequired)) + { + builder.Append(" subscriptionRequired: "); + var boolValue = IsSubscriptionRequired.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TermsOfServiceLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" termsOfServiceUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TermsOfServiceLink)) + { + builder.Append(" termsOfServiceUrl: "); + if (TermsOfServiceLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TermsOfServiceLink}'''"); + } + else + { + builder.AppendLine($"'{TermsOfServiceLink}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Contact), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" contact: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Contact)) + { + builder.Append(" contact: "); + BicepSerializationHelpers.AppendChildObject(builder, Contact, options, 2, false, " contact: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(License), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" license: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(License)) + { + builder.Append(" license: "); + BicepSerializationHelpers.AppendChildObject(builder, License, options, 2, false, " license: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -380,6 +765,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpt { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(AssociatedApiProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedApiProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedApiProperties.cs index 3181975efc88b..1122e925f6c6f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedApiProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedApiProperties.cs @@ -52,14 +52,19 @@ internal AssociatedApiProperties(string description, AuthenticationSettingsContr } /// API identifier in the form /apis/{apiId}. + [WirePath("id")] public string Id { get; } /// API name. + [WirePath("name")] public string Name { get; } /// Absolute URL of the backend service implementing this API. + [WirePath("serviceUrl")] public Uri ServiceUri { get; } /// Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. + [WirePath("path")] public string Path { get; } /// Describes on which protocols the operations in this API can be invoked. + [WirePath("protocols")] public IReadOnlyList Protocols { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedOperationProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedOperationProperties.Serialization.cs index cd1fffe82e21f..464569ac29a21 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedOperationProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedOperationProperties.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -174,6 +175,205 @@ internal static AssociatedOperationProperties DeserializeAssociatedOperationProp serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + if (Id.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Id}'''"); + } + else + { + builder.AppendLine($"'{Id}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiName)) + { + builder.Append(" apiName: "); + if (ApiName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiName}'''"); + } + else + { + builder.AppendLine($"'{ApiName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiRevision), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiRevision: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiRevision)) + { + builder.Append(" apiRevision: "); + if (ApiRevision.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiRevision}'''"); + } + else + { + builder.AppendLine($"'{ApiRevision}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersion)) + { + builder.Append(" apiVersion: "); + if (ApiVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiVersion}'''"); + } + else + { + builder.AppendLine($"'{ApiVersion}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Method), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" method: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Method)) + { + builder.Append(" method: "); + if (Method.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Method}'''"); + } + else + { + builder.AppendLine($"'{Method}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UriTemplate), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" urlTemplate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UriTemplate)) + { + builder.Append(" urlTemplate: "); + if (UriTemplate.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{UriTemplate}'''"); + } + else + { + builder.AppendLine($"'{UriTemplate}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -182,6 +382,8 @@ BinaryData IPersistableModel.Write(ModelReaderWri { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(AssociatedOperationProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedOperationProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedOperationProperties.cs index bb5b28cf675aa..8428a39f878cb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedOperationProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedOperationProperties.cs @@ -74,20 +74,28 @@ internal AssociatedOperationProperties(string id, string name, string apiName, s } /// Identifier of the operation in form /operations/{operationId}. + [WirePath("id")] public string Id { get; } /// Operation name. + [WirePath("name")] public string Name { get; } /// API Name. + [WirePath("apiName")] public string ApiName { get; } /// API Revision. + [WirePath("apiRevision")] public string ApiRevision { get; } /// API Version. + [WirePath("apiVersion")] public string ApiVersion { get; } /// Operation Description. + [WirePath("description")] public string Description { get; } /// A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. + [WirePath("method")] public string Method { get; } /// Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}. + [WirePath("urlTemplate")] public string UriTemplate { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedProductProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedProductProperties.Serialization.cs index b350f1e8e5c03..40410364789cb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedProductProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedProductProperties.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -187,6 +188,175 @@ internal static AssociatedProductProperties DeserializeAssociatedProductProperti name); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + if (Id.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Id}'''"); + } + else + { + builder.AppendLine($"'{Id}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Terms), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" terms: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Terms)) + { + builder.Append(" terms: "); + if (Terms.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Terms}'''"); + } + else + { + builder.AppendLine($"'{Terms}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsSubscriptionRequired), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionRequired: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsSubscriptionRequired)) + { + builder.Append(" subscriptionRequired: "); + var boolValue = IsSubscriptionRequired.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsApprovalRequired), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" approvalRequired: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsApprovalRequired)) + { + builder.Append(" approvalRequired: "); + var boolValue = IsApprovalRequired.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SubscriptionsLimit), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionsLimit: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SubscriptionsLimit)) + { + builder.Append(" subscriptionsLimit: "); + builder.AppendLine($"{SubscriptionsLimit.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(State), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" state: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(State)) + { + builder.Append(" state: "); + builder.AppendLine($"'{State.Value.ToSerialString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -195,6 +365,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrite { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(AssociatedProductProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedProductProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedProductProperties.cs index ecb15595c5674..be88e4d68ef55 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedProductProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedProductProperties.cs @@ -45,8 +45,10 @@ internal AssociatedProductProperties() } /// Identifier of the product in the form of /products/{productId}. + [WirePath("id")] public string Id { get; } /// Product name. + [WirePath("name")] public string Name { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedTagProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedTagProperties.Serialization.cs index 122025afcf6e4..bca5305579b5f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedTagProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedTagProperties.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -99,6 +100,67 @@ internal static AssociatedTagProperties DeserializeAssociatedTagProperties(JsonE return new AssociatedTagProperties(id, name, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + if (Id.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Id}'''"); + } + else + { + builder.AppendLine($"'{Id}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -107,6 +169,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpt { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(AssociatedTagProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedTagProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedTagProperties.cs index 6ea61d4726d07..08ef9d658e6ca 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedTagProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociatedTagProperties.cs @@ -62,8 +62,10 @@ internal AssociatedTagProperties(string id, string name, IDictionary Tag identifier. + [WirePath("id")] public string Id { get; } /// Tag Name. + [WirePath("name")] public string Name { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociationContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociationContract.Serialization.cs index 553b210d57b97..09ea87e81f47a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociationContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociationContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -162,6 +163,92 @@ internal static AssociationContract DeserializeAssociationContract(JsonElement e serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + builder.AppendLine($"'{ProvisioningState.Value.ToString()}'"); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -170,6 +257,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(AssociationContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociationContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociationContract.cs index f2a23b4ecb448..c07235288c4d2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociationContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AssociationContract.cs @@ -66,6 +66,7 @@ internal AssociationContract(ResourceIdentifier id, string name, ResourceType re } /// Provisioning state. + [WirePath("properties.provisioningState")] public AssociationEntityProvisioningState? ProvisioningState { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthenticationSettingsContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthenticationSettingsContract.Serialization.cs index 7259449c5d220..49f9f8dcd5bde 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthenticationSettingsContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthenticationSettingsContract.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -36,6 +38,26 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WritePropertyName("openid"u8); writer.WriteObjectValue(OpenId, options); } + if (Optional.IsCollectionDefined(OAuth2AuthenticationSettings)) + { + writer.WritePropertyName("oAuth2AuthenticationSettings"u8); + writer.WriteStartArray(); + foreach (var item in OAuth2AuthenticationSettings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(OpenidAuthenticationSettings)) + { + writer.WritePropertyName("openidAuthenticationSettings"u8); + writer.WriteStartArray(); + foreach (var item in OpenidAuthenticationSettings) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -76,6 +98,8 @@ internal static AuthenticationSettingsContract DeserializeAuthenticationSettings } OAuth2AuthenticationSettingsContract oAuth2 = default; OpenIdAuthenticationSettingsContract openid = default; + IList oAuth2AuthenticationSettings = default; + IList openidAuthenticationSettings = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -98,13 +122,132 @@ internal static AuthenticationSettingsContract DeserializeAuthenticationSettings openid = OpenIdAuthenticationSettingsContract.DeserializeOpenIdAuthenticationSettingsContract(property.Value, options); continue; } + if (property.NameEquals("oAuth2AuthenticationSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(OAuth2AuthenticationSettingsContract.DeserializeOAuth2AuthenticationSettingsContract(item, options)); + } + oAuth2AuthenticationSettings = array; + continue; + } + if (property.NameEquals("openidAuthenticationSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(OpenIdAuthenticationSettingsContract.DeserializeOpenIdAuthenticationSettingsContract(item, options)); + } + openidAuthenticationSettings = array; + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new AuthenticationSettingsContract(oAuth2, openid, serializedAdditionalRawData); + return new AuthenticationSettingsContract(oAuth2, openid, oAuth2AuthenticationSettings ?? new ChangeTrackingList(), openidAuthenticationSettings ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OAuth2), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" oAuth2: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OAuth2)) + { + builder.Append(" oAuth2: "); + BicepSerializationHelpers.AppendChildObject(builder, OAuth2, options, 2, false, " oAuth2: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OpenId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" openid: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OpenId)) + { + builder.Append(" openid: "); + BicepSerializationHelpers.AppendChildObject(builder, OpenId, options, 2, false, " openid: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OAuth2AuthenticationSettings), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" oAuth2AuthenticationSettings: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(OAuth2AuthenticationSettings)) + { + if (OAuth2AuthenticationSettings.Any()) + { + builder.Append(" oAuth2AuthenticationSettings: "); + builder.AppendLine("["); + foreach (var item in OAuth2AuthenticationSettings) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " oAuth2AuthenticationSettings: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OpenidAuthenticationSettings), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" openidAuthenticationSettings: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(OpenidAuthenticationSettings)) + { + if (OpenidAuthenticationSettings.Any()) + { + builder.Append(" openidAuthenticationSettings: "); + builder.AppendLine("["); + foreach (var item in OpenidAuthenticationSettings) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " openidAuthenticationSettings: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) @@ -115,6 +258,8 @@ BinaryData IPersistableModel.Write(ModelReaderWr { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(AuthenticationSettingsContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthenticationSettingsContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthenticationSettingsContract.cs index e934f944f652e..7227ab1d2bfae 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthenticationSettingsContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthenticationSettingsContract.cs @@ -48,22 +48,36 @@ public partial class AuthenticationSettingsContract /// Initializes a new instance of . public AuthenticationSettingsContract() { + OAuth2AuthenticationSettings = new ChangeTrackingList(); + OpenidAuthenticationSettings = new ChangeTrackingList(); } /// Initializes a new instance of . /// OAuth2 Authentication settings. /// OpenID Connect Authentication Settings. + /// Collection of OAuth2 authentication settings included into this API. + /// Collection of Open ID Connect authentication settings included into this API. /// Keeps track of any properties unknown to the library. - internal AuthenticationSettingsContract(OAuth2AuthenticationSettingsContract oAuth2, OpenIdAuthenticationSettingsContract openId, IDictionary serializedAdditionalRawData) + internal AuthenticationSettingsContract(OAuth2AuthenticationSettingsContract oAuth2, OpenIdAuthenticationSettingsContract openId, IList oAuth2AuthenticationSettings, IList openidAuthenticationSettings, IDictionary serializedAdditionalRawData) { OAuth2 = oAuth2; OpenId = openId; + OAuth2AuthenticationSettings = oAuth2AuthenticationSettings; + OpenidAuthenticationSettings = openidAuthenticationSettings; _serializedAdditionalRawData = serializedAdditionalRawData; } /// OAuth2 Authentication settings. + [WirePath("oAuth2")] public OAuth2AuthenticationSettingsContract OAuth2 { get; set; } /// OpenID Connect Authentication Settings. + [WirePath("openid")] public OpenIdAuthenticationSettingsContract OpenId { get; set; } + /// Collection of OAuth2 authentication settings included into this API. + [WirePath("oAuth2AuthenticationSettings")] + public IList OAuth2AuthenticationSettings { get; } + /// Collection of Open ID Connect authentication settings included into this API. + [WirePath("openidAuthenticationSettings")] + public IList OpenidAuthenticationSettings { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationAccessPolicyListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationAccessPolicyListResult.Serialization.cs new file mode 100644 index 0000000000000..b733d3af4e7f4 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationAccessPolicyListResult.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + internal partial class AuthorizationAccessPolicyListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AuthorizationAccessPolicyListResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Count)) + { + writer.WritePropertyName("count"u8); + writer.WriteNumberValue(Count.Value); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AuthorizationAccessPolicyListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AuthorizationAccessPolicyListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAuthorizationAccessPolicyListResult(document.RootElement, options); + } + + internal static AuthorizationAccessPolicyListResult DeserializeAuthorizationAccessPolicyListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + long? count = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthorizationAccessPolicyContractData.DeserializeAuthorizationAccessPolicyContractData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("count"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + count = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AuthorizationAccessPolicyListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(AuthorizationAccessPolicyListResult)} does not support writing '{options.Format}' format."); + } + } + + AuthorizationAccessPolicyListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAuthorizationAccessPolicyListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AuthorizationAccessPolicyListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationAccessPolicyListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationAccessPolicyListResult.cs new file mode 100644 index 0000000000000..eca87f8bba291 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationAccessPolicyListResult.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// Paged Authorization Access Policy list representation. + internal partial class AuthorizationAccessPolicyListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal AuthorizationAccessPolicyListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Page values. + /// Total record count number across all pages. + /// Next page link if any. + /// Keeps track of any properties unknown to the library. + internal AuthorizationAccessPolicyListResult(IReadOnlyList value, long? count, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + Count = count; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Page values. + public IReadOnlyList Value { get; } + /// Total record count number across all pages. + public long? Count { get; } + /// Next page link if any. + public string NextLink { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationConfirmConsentCodeContent.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationConfirmConsentCodeContent.Serialization.cs new file mode 100644 index 0000000000000..41089856f460e --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationConfirmConsentCodeContent.Serialization.cs @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + public partial class AuthorizationConfirmConsentCodeContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AuthorizationConfirmConsentCodeContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(ConsentCode)) + { + writer.WritePropertyName("consentCode"u8); + writer.WriteStringValue(ConsentCode); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AuthorizationConfirmConsentCodeContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AuthorizationConfirmConsentCodeContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAuthorizationConfirmConsentCodeContent(document.RootElement, options); + } + + internal static AuthorizationConfirmConsentCodeContent DeserializeAuthorizationConfirmConsentCodeContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string consentCode = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("consentCode"u8)) + { + consentCode = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AuthorizationConfirmConsentCodeContent(consentCode, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AuthorizationConfirmConsentCodeContent)} does not support writing '{options.Format}' format."); + } + } + + AuthorizationConfirmConsentCodeContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAuthorizationConfirmConsentCodeContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AuthorizationConfirmConsentCodeContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationConfirmConsentCodeContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationConfirmConsentCodeContent.cs new file mode 100644 index 0000000000000..5c4fab2ae4c22 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationConfirmConsentCodeContent.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// Authorization confirm consent code request contract. + public partial class AuthorizationConfirmConsentCodeContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AuthorizationConfirmConsentCodeContent() + { + } + + /// Initializes a new instance of . + /// The consent code from the authorization server after authorizing and consenting. + /// Keeps track of any properties unknown to the library. + internal AuthorizationConfirmConsentCodeContent(string consentCode, IDictionary serializedAdditionalRawData) + { + ConsentCode = consentCode; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The consent code from the authorization server after authorizing and consenting. + [WirePath("consentCode")] + public string ConsentCode { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationListResult.Serialization.cs new file mode 100644 index 0000000000000..6092db845b29b --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationListResult.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + internal partial class AuthorizationListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AuthorizationListResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Count)) + { + writer.WritePropertyName("count"u8); + writer.WriteNumberValue(Count.Value); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AuthorizationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AuthorizationListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAuthorizationListResult(document.RootElement, options); + } + + internal static AuthorizationListResult DeserializeAuthorizationListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + long? count = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthorizationContractData.DeserializeAuthorizationContractData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("count"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + count = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AuthorizationListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(AuthorizationListResult)} does not support writing '{options.Format}' format."); + } + } + + AuthorizationListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAuthorizationListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AuthorizationListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationListResult.cs new file mode 100644 index 0000000000000..4e4108f1b06e2 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationListResult.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// Paged Authorization list representation. + internal partial class AuthorizationListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal AuthorizationListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Page values. + /// Total record count number across all pages. + /// Next page link if any. + /// Keeps track of any properties unknown to the library. + internal AuthorizationListResult(IReadOnlyList value, long? count, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + Count = count; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Page values. + public IReadOnlyList Value { get; } + /// Total record count number across all pages. + public long? Count { get; } + /// Next page link if any. + public string NextLink { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginContent.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginContent.Serialization.cs new file mode 100644 index 0000000000000..3cc80192584bd --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginContent.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + public partial class AuthorizationLoginContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AuthorizationLoginContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(PostLoginRedirectUri)) + { + writer.WritePropertyName("postLoginRedirectUrl"u8); + writer.WriteStringValue(PostLoginRedirectUri.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AuthorizationLoginContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AuthorizationLoginContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAuthorizationLoginContent(document.RootElement, options); + } + + internal static AuthorizationLoginContent DeserializeAuthorizationLoginContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Uri postLoginRedirectUri = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("postLoginRedirectUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + postLoginRedirectUri = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AuthorizationLoginContent(postLoginRedirectUri, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AuthorizationLoginContent)} does not support writing '{options.Format}' format."); + } + } + + AuthorizationLoginContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAuthorizationLoginContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AuthorizationLoginContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginContent.cs new file mode 100644 index 0000000000000..5aa6b170f30f3 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginContent.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// Authorization login request contract. + public partial class AuthorizationLoginContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AuthorizationLoginContent() + { + } + + /// Initializes a new instance of . + /// The redirect URL after login has completed. + /// Keeps track of any properties unknown to the library. + internal AuthorizationLoginContent(Uri postLoginRedirectUri, IDictionary serializedAdditionalRawData) + { + PostLoginRedirectUri = postLoginRedirectUri; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The redirect URL after login has completed. + [WirePath("postLoginRedirectUrl")] + public Uri PostLoginRedirectUri { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginResult.Serialization.cs new file mode 100644 index 0000000000000..16c92082da11e --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginResult.Serialization.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + public partial class AuthorizationLoginResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AuthorizationLoginResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(LoginLink)) + { + writer.WritePropertyName("loginLink"u8); + writer.WriteStringValue(LoginLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AuthorizationLoginResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AuthorizationLoginResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAuthorizationLoginResult(document.RootElement, options); + } + + internal static AuthorizationLoginResult DeserializeAuthorizationLoginResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string loginLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("loginLink"u8)) + { + loginLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AuthorizationLoginResult(loginLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LoginLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" loginLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LoginLink)) + { + builder.Append(" loginLink: "); + if (LoginLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{LoginLink}'''"); + } + else + { + builder.AppendLine($"'{LoginLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(AuthorizationLoginResult)} does not support writing '{options.Format}' format."); + } + } + + AuthorizationLoginResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAuthorizationLoginResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AuthorizationLoginResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginResult.cs new file mode 100644 index 0000000000000..1981a92d423b3 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationLoginResult.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// Authorization login response contract. + public partial class AuthorizationLoginResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal AuthorizationLoginResult() + { + } + + /// Initializes a new instance of . + /// The login link. + /// Keeps track of any properties unknown to the library. + internal AuthorizationLoginResult(string loginLink, IDictionary serializedAdditionalRawData) + { + LoginLink = loginLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The login link. + [WirePath("loginLink")] + public string LoginLink { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderListResult.Serialization.cs new file mode 100644 index 0000000000000..6db030d5f28bf --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderListResult.Serialization.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + internal partial class AuthorizationProviderListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AuthorizationProviderListResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AuthorizationProviderListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AuthorizationProviderListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAuthorizationProviderListResult(document.RootElement, options); + } + + internal static AuthorizationProviderListResult DeserializeAuthorizationProviderListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AuthorizationProviderContractData.DeserializeAuthorizationProviderContractData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AuthorizationProviderListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(AuthorizationProviderListResult)} does not support writing '{options.Format}' format."); + } + } + + AuthorizationProviderListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAuthorizationProviderListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AuthorizationProviderListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderListResult.cs new file mode 100644 index 0000000000000..05e2c2e79df8d --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderListResult.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// Paged Authorization Provider list representation. + internal partial class AuthorizationProviderListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal AuthorizationProviderListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Page values. + /// Next page link if any. + /// Keeps track of any properties unknown to the library. + internal AuthorizationProviderListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Page values. + public IReadOnlyList Value { get; } + /// Next page link if any. + public string NextLink { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2GrantTypes.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2GrantTypes.Serialization.cs new file mode 100644 index 0000000000000..c61ecb87328ab --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2GrantTypes.Serialization.cs @@ -0,0 +1,256 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + public partial class AuthorizationProviderOAuth2GrantTypes : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AuthorizationProviderOAuth2GrantTypes)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(AuthorizationCode)) + { + writer.WritePropertyName("authorizationCode"u8); + writer.WriteStartObject(); + foreach (var item in AuthorizationCode) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(ClientCredentials)) + { + writer.WritePropertyName("clientCredentials"u8); + writer.WriteStartObject(); + foreach (var item in ClientCredentials) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AuthorizationProviderOAuth2GrantTypes IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AuthorizationProviderOAuth2GrantTypes)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAuthorizationProviderOAuth2GrantTypes(document.RootElement, options); + } + + internal static AuthorizationProviderOAuth2GrantTypes DeserializeAuthorizationProviderOAuth2GrantTypes(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary authorizationCode = default; + IDictionary clientCredentials = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("authorizationCode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + authorizationCode = dictionary; + continue; + } + if (property.NameEquals("clientCredentials"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + clientCredentials = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AuthorizationProviderOAuth2GrantTypes(authorizationCode ?? new ChangeTrackingDictionary(), clientCredentials ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AuthorizationCode), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" authorizationCode: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(AuthorizationCode)) + { + if (AuthorizationCode.Any()) + { + builder.Append(" authorizationCode: "); + builder.AppendLine("{"); + foreach (var item in AuthorizationCode) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + if (item.Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{item.Value}'''"); + } + else + { + builder.AppendLine($"'{item.Value}'"); + } + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientCredentials), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientCredentials: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ClientCredentials)) + { + if (ClientCredentials.Any()) + { + builder.Append(" clientCredentials: "); + builder.AppendLine("{"); + foreach (var item in ClientCredentials) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + if (item.Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{item.Value}'''"); + } + else + { + builder.AppendLine($"'{item.Value}'"); + } + } + builder.AppendLine(" }"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(AuthorizationProviderOAuth2GrantTypes)} does not support writing '{options.Format}' format."); + } + } + + AuthorizationProviderOAuth2GrantTypes IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAuthorizationProviderOAuth2GrantTypes(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AuthorizationProviderOAuth2GrantTypes)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2GrantTypes.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2GrantTypes.cs new file mode 100644 index 0000000000000..01f630402d64e --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2GrantTypes.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// Authorization Provider oauth2 grant types settings. + public partial class AuthorizationProviderOAuth2GrantTypes + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AuthorizationProviderOAuth2GrantTypes() + { + AuthorizationCode = new ChangeTrackingDictionary(); + ClientCredentials = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// OAuth2 authorization code grant parameters. + /// OAuth2 client credential grant parameters. + /// Keeps track of any properties unknown to the library. + internal AuthorizationProviderOAuth2GrantTypes(IDictionary authorizationCode, IDictionary clientCredentials, IDictionary serializedAdditionalRawData) + { + AuthorizationCode = authorizationCode; + ClientCredentials = clientCredentials; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// OAuth2 authorization code grant parameters. + [WirePath("authorizationCode")] + public IDictionary AuthorizationCode { get; } + /// OAuth2 client credential grant parameters. + [WirePath("clientCredentials")] + public IDictionary ClientCredentials { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2Settings.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2Settings.Serialization.cs new file mode 100644 index 0000000000000..f985395a595d5 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2Settings.Serialization.cs @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + public partial class AuthorizationProviderOAuth2Settings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AuthorizationProviderOAuth2Settings)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(RedirectUri)) + { + writer.WritePropertyName("redirectUrl"u8); + writer.WriteStringValue(RedirectUri.AbsoluteUri); + } + if (Optional.IsDefined(GrantTypes)) + { + writer.WritePropertyName("grantTypes"u8); + writer.WriteObjectValue(GrantTypes, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AuthorizationProviderOAuth2Settings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AuthorizationProviderOAuth2Settings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAuthorizationProviderOAuth2Settings(document.RootElement, options); + } + + internal static AuthorizationProviderOAuth2Settings DeserializeAuthorizationProviderOAuth2Settings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Uri redirectUri = default; + AuthorizationProviderOAuth2GrantTypes grantTypes = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("redirectUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + redirectUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("grantTypes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + grantTypes = AuthorizationProviderOAuth2GrantTypes.DeserializeAuthorizationProviderOAuth2GrantTypes(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AuthorizationProviderOAuth2Settings(redirectUri, grantTypes, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RedirectUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" redirectUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(RedirectUri)) + { + builder.Append(" redirectUrl: "); + builder.AppendLine($"'{RedirectUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GrantTypes), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" grantTypes: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(GrantTypes)) + { + builder.Append(" grantTypes: "); + BicepSerializationHelpers.AppendChildObject(builder, GrantTypes, options, 2, false, " grantTypes: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(AuthorizationProviderOAuth2Settings)} does not support writing '{options.Format}' format."); + } + } + + AuthorizationProviderOAuth2Settings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAuthorizationProviderOAuth2Settings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AuthorizationProviderOAuth2Settings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2Settings.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2Settings.cs new file mode 100644 index 0000000000000..032bb935e78d6 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationProviderOAuth2Settings.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// OAuth2 settings details. + public partial class AuthorizationProviderOAuth2Settings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AuthorizationProviderOAuth2Settings() + { + } + + /// Initializes a new instance of . + /// Redirect URL to be set in the OAuth application. + /// OAuth2 settings. + /// Keeps track of any properties unknown to the library. + internal AuthorizationProviderOAuth2Settings(Uri redirectUri, AuthorizationProviderOAuth2GrantTypes grantTypes, IDictionary serializedAdditionalRawData) + { + RedirectUri = redirectUri; + GrantTypes = grantTypes; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Redirect URL to be set in the OAuth application. + [WirePath("redirectUrl")] + public Uri RedirectUri { get; set; } + /// OAuth2 settings. + [WirePath("grantTypes")] + public AuthorizationProviderOAuth2GrantTypes GrantTypes { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationServerListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationServerListResult.Serialization.cs index 65e1c0bc686cd..b9c6ba5e3767f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationServerListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationServerListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static AuthorizationServerListResult DeserializeAuthorizationServerList return new AuthorizationServerListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWri { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(AuthorizationServerListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationServerSecretsContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationServerSecretsContract.Serialization.cs index f9eba6db40d63..ce6c4a3a4ec8d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationServerSecretsContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationServerSecretsContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -110,6 +111,90 @@ internal static AuthorizationServerSecretsContract DeserializeAuthorizationServe return new AuthorizationServerSecretsContract(clientSecret, resourceOwnerUsername, resourceOwnerPassword, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientSecret), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientSecret: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientSecret)) + { + builder.Append(" clientSecret: "); + if (ClientSecret.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientSecret}'''"); + } + else + { + builder.AppendLine($"'{ClientSecret}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceOwnerUsername), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceOwnerUsername: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceOwnerUsername)) + { + builder.Append(" resourceOwnerUsername: "); + if (ResourceOwnerUsername.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ResourceOwnerUsername}'''"); + } + else + { + builder.AppendLine($"'{ResourceOwnerUsername}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceOwnerPassword), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceOwnerPassword: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceOwnerPassword)) + { + builder.Append(" resourceOwnerPassword: "); + if (ResourceOwnerPassword.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ResourceOwnerPassword}'''"); + } + else + { + builder.AppendLine($"'{ResourceOwnerPassword}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -118,6 +203,8 @@ BinaryData IPersistableModel.Write(ModelRead { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(AuthorizationServerSecretsContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationServerSecretsContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationServerSecretsContract.cs index e2918b4a6248a..3a9febde3b07e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationServerSecretsContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AuthorizationServerSecretsContract.cs @@ -64,10 +64,13 @@ internal AuthorizationServerSecretsContract(string clientSecret, string resource } /// oAuth Authorization Server Secrets. + [WirePath("clientSecret")] public string ClientSecret { get; } /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. + [WirePath("resourceOwnerUsername")] public string ResourceOwnerUsername { get; } /// Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. + [WirePath("resourceOwnerPassword")] public string ResourceOwnerPassword { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AvailableApiManagementServiceSkuResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AvailableApiManagementServiceSkuResult.Serialization.cs index d2c81a88b3b32..75d308d949cf0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AvailableApiManagementServiceSkuResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AvailableApiManagementServiceSkuResult.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -122,6 +123,69 @@ internal static AvailableApiManagementServiceSkuResult DeserializeAvailableApiMa return new AvailableApiManagementServiceSkuResult(resourceType, sku, capacity, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceType)) + { + builder.Append(" resourceType: "); + builder.AppendLine($"'{ResourceType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("SkuName", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sku: "); + builder.AppendLine("{"); + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Sku)) + { + builder.Append(" sku: "); + BicepSerializationHelpers.AppendChildObject(builder, Sku, options, 2, false, " sku: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Capacity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" capacity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Capacity)) + { + builder.Append(" capacity: "); + BicepSerializationHelpers.AppendChildObject(builder, Capacity, options, 2, false, " capacity: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -130,6 +194,8 @@ BinaryData IPersistableModel.Write(Model { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(AvailableApiManagementServiceSkuResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AvailableApiManagementServiceSkuResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AvailableApiManagementServiceSkuResult.cs index 47f5dd6909009..4cc2ee68ccc29 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AvailableApiManagementServiceSkuResult.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AvailableApiManagementServiceSkuResult.cs @@ -65,16 +65,19 @@ internal AvailableApiManagementServiceSkuResult(ResourceType? resourceType, Reso } /// The type of resource the SKU applies to. + [WirePath("resourceType")] public ResourceType? ResourceType { get; } /// Specifies API Management SKU. internal ResourceSku Sku { get; } /// Name of the Sku. + [WirePath("sku.name")] public ApiManagementServiceSkuType? SkuName { get => Sku?.Name; } /// Specifies the number of API Management units. + [WirePath("capacity")] public ApiManagementResourceSkuCapacity Capacity { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendAuthorizationHeaderCredentials.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendAuthorizationHeaderCredentials.Serialization.cs index 7d95e6f858150..6bd0acce92c29 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendAuthorizationHeaderCredentials.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendAuthorizationHeaderCredentials.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -93,6 +94,67 @@ internal static BackendAuthorizationHeaderCredentials DeserializeBackendAuthoriz return new BackendAuthorizationHeaderCredentials(scheme, parameter, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Scheme), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scheme: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Scheme)) + { + builder.Append(" scheme: "); + if (Scheme.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Scheme}'''"); + } + else + { + builder.AppendLine($"'{Scheme}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Parameter), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" parameter: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Parameter)) + { + builder.Append(" parameter: "); + if (Parameter.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Parameter}'''"); + } + else + { + builder.AppendLine($"'{Parameter}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -101,6 +163,8 @@ BinaryData IPersistableModel.Write(ModelR { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(BackendAuthorizationHeaderCredentials)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendAuthorizationHeaderCredentials.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendAuthorizationHeaderCredentials.cs index 1f441f1c09672..108b93ba72857 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendAuthorizationHeaderCredentials.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendAuthorizationHeaderCredentials.cs @@ -75,8 +75,10 @@ internal BackendAuthorizationHeaderCredentials() } /// Authentication Scheme name. + [WirePath("scheme")] public string Scheme { get; set; } /// Authentication Parameter value. + [WirePath("parameter")] public string Parameter { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendCredentialsContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendCredentialsContract.Serialization.cs index dae27d0582580..8d1c8a581a52c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendCredentialsContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendCredentialsContract.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -244,6 +246,202 @@ internal static BackendCredentialsContract DeserializeBackendCredentialsContract serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CertificateIds), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" certificateIds: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(CertificateIds)) + { + if (CertificateIds.Any()) + { + builder.Append(" certificateIds: "); + builder.AppendLine("["); + foreach (var item in CertificateIds) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Certificate), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" certificate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Certificate)) + { + if (Certificate.Any()) + { + builder.Append(" certificate: "); + builder.AppendLine("["); + foreach (var item in Certificate) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Query), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" query: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Query)) + { + if (Query.Any()) + { + builder.Append(" query: "); + builder.AppendLine("{"); + foreach (var item in Query) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + builder.AppendLine("["); + foreach (var item0 in item.Value) + { + if (item0 == null) + { + builder.Append("null"); + continue; + } + if (item0.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item0}'''"); + } + else + { + builder.AppendLine($" '{item0}'"); + } + } + builder.AppendLine(" ]"); + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Header), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" header: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Header)) + { + if (Header.Any()) + { + builder.Append(" header: "); + builder.AppendLine("{"); + foreach (var item in Header) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + builder.AppendLine("["); + foreach (var item0 in item.Value) + { + if (item0 == null) + { + builder.Append("null"); + continue; + } + if (item0.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item0}'''"); + } + else + { + builder.AppendLine($" '{item0}'"); + } + } + builder.AppendLine(" ]"); + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Authorization), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" authorization: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Authorization)) + { + builder.Append(" authorization: "); + BicepSerializationHelpers.AppendChildObject(builder, Authorization, options, 2, false, " authorization: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -252,6 +450,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriter { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(BackendCredentialsContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendCredentialsContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendCredentialsContract.cs index 5d5335fb815eb..590e935add314 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendCredentialsContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendCredentialsContract.cs @@ -72,14 +72,19 @@ internal BackendCredentialsContract(IList certificateIds, IList } /// List of Client Certificate Ids. + [WirePath("certificateIds")] public IList CertificateIds { get; } /// List of Client Certificate Thumbprints. Will be ignored if certificatesIds are provided. + [WirePath("certificate")] public IList Certificate { get; } /// Query Parameter description. + [WirePath("query")] public IDictionary> Query { get; } /// Header Parameter description. + [WirePath("header")] public IDictionary> Header { get; } /// Authorization header authentication. + [WirePath("authorization")] public BackendAuthorizationHeaderCredentials Authorization { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendListResult.Serialization.cs index e86d908d7ce80..f54203d15e46e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static BackendListResult DeserializeBackendListResult(JsonElement eleme return new BackendListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions o { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(BackendListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendProperties.Serialization.cs index 661667ceabf67..6f925f9ca3c77 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendProperties.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -92,6 +93,36 @@ internal static BackendProperties DeserializeBackendProperties(JsonElement eleme return new BackendProperties(serviceFabricCluster, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ServiceFabricCluster), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serviceFabricCluster: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ServiceFabricCluster)) + { + builder.Append(" serviceFabricCluster: "); + BicepSerializationHelpers.AppendChildObject(builder, ServiceFabricCluster, options, 2, false, " serviceFabricCluster: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -100,6 +131,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions o { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(BackendProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendProperties.cs index 553add4f51e3b..b6f3add82f85d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendProperties.cs @@ -60,6 +60,7 @@ internal BackendProperties(BackendServiceFabricClusterProperties serviceFabricCl } /// Backend Service Fabric Cluster Properties. + [WirePath("serviceFabricCluster")] public BackendServiceFabricClusterProperties ServiceFabricCluster { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendProxyContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendProxyContract.Serialization.cs index 171ccfed616e9..a7d11e734a053 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendProxyContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendProxyContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -107,6 +108,82 @@ internal static BackendProxyContract DeserializeBackendProxyContract(JsonElement return new BackendProxyContract(uri, username, password, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Uri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" url: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Uri)) + { + builder.Append(" url: "); + builder.AppendLine($"'{Uri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Username), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" username: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Username)) + { + builder.Append(" username: "); + if (Username.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Username}'''"); + } + else + { + builder.AppendLine($"'{Username}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Password), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" password: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Password)) + { + builder.Append(" password: "); + if (Password.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Password}'''"); + } + else + { + builder.AppendLine($"'{Password}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -115,6 +192,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(BackendProxyContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendProxyContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendProxyContract.cs index 5582162ebd89f..f9134360298e3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendProxyContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendProxyContract.cs @@ -74,10 +74,13 @@ internal BackendProxyContract() } /// WebProxy Server AbsoluteUri property which includes the entire URI stored in the Uri instance, including all fragments and query strings. + [WirePath("url")] public Uri Uri { get; set; } /// Username to connect to the WebProxy server. + [WirePath("username")] public string Username { get; set; } /// Password to connect to the WebProxy Server. + [WirePath("password")] public string Password { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendReconnectContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendReconnectContract.Serialization.cs index 8b469c4e6f8ab..f46509918797c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendReconnectContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendReconnectContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -162,6 +163,93 @@ internal static BackendReconnectContract DeserializeBackendReconnectContract(Jso serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(After), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" after: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(After)) + { + builder.Append(" after: "); + var formattedTimeSpan = TypeFormatters.ToString(After.Value, "P"); + builder.AppendLine($"'{formattedTimeSpan}'"); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -170,6 +258,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(BackendReconnectContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendReconnectContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendReconnectContract.cs index b1d3a62f054ab..31d2c4b01d66f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendReconnectContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendReconnectContract.cs @@ -66,6 +66,7 @@ internal BackendReconnectContract(ResourceIdentifier id, string name, ResourceTy } /// Duration in ISO8601 format after which reconnect will be initiated. Minimum duration of the Reconnect is PT2M. + [WirePath("properties.after")] public TimeSpan? After { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendServiceFabricClusterProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendServiceFabricClusterProperties.Serialization.cs index 27e58786fc731..4b0747ab2a955 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendServiceFabricClusterProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendServiceFabricClusterProperties.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -189,6 +191,177 @@ internal static BackendServiceFabricClusterProperties DeserializeBackendServiceF serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientCertificateId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientCertificateId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientCertificateId)) + { + builder.Append(" clientCertificateId: "); + if (ClientCertificateId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientCertificateId}'''"); + } + else + { + builder.AppendLine($"'{ClientCertificateId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientCertificatethumbprint), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientCertificatethumbprint: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientCertificatethumbprint)) + { + builder.Append(" clientCertificatethumbprint: "); + if (ClientCertificatethumbprint.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientCertificatethumbprint}'''"); + } + else + { + builder.AppendLine($"'{ClientCertificatethumbprint}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MaxPartitionResolutionRetries), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" maxPartitionResolutionRetries: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MaxPartitionResolutionRetries)) + { + builder.Append(" maxPartitionResolutionRetries: "); + builder.AppendLine($"{MaxPartitionResolutionRetries.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ManagementEndpoints), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" managementEndpoints: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ManagementEndpoints)) + { + if (ManagementEndpoints.Any()) + { + builder.Append(" managementEndpoints: "); + builder.AppendLine("["); + foreach (var item in ManagementEndpoints) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ServerCertificateThumbprints), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serverCertificateThumbprints: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ServerCertificateThumbprints)) + { + if (ServerCertificateThumbprints.Any()) + { + builder.Append(" serverCertificateThumbprints: "); + builder.AppendLine("["); + foreach (var item in ServerCertificateThumbprints) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ServerX509Names), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serverX509Names: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ServerX509Names)) + { + if (ServerX509Names.Any()) + { + builder.Append(" serverX509Names: "); + builder.AppendLine("["); + foreach (var item in ServerX509Names) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " serverX509Names: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -197,6 +370,8 @@ BinaryData IPersistableModel.Write(ModelR { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(BackendServiceFabricClusterProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendServiceFabricClusterProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendServiceFabricClusterProperties.cs index 2857a92cf3e2f..127c63715c065 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendServiceFabricClusterProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendServiceFabricClusterProperties.cs @@ -83,16 +83,22 @@ internal BackendServiceFabricClusterProperties() } /// The client certificate id for the management endpoint. + [WirePath("clientCertificateId")] public string ClientCertificateId { get; set; } /// The client certificate thumbprint for the management endpoint. Will be ignored if certificatesIds are provided. + [WirePath("clientCertificatethumbprint")] public string ClientCertificatethumbprint { get; set; } /// Maximum number of retries while attempting resolve the partition. + [WirePath("maxPartitionResolutionRetries")] public int? MaxPartitionResolutionRetries { get; set; } /// The cluster management endpoint. + [WirePath("managementEndpoints")] public IList ManagementEndpoints { get; } /// Thumbprints of certificates cluster management service uses for tls communication. + [WirePath("serverCertificateThumbprints")] public IList ServerCertificateThumbprints { get; } /// Server X509 Certificate Names Collection. + [WirePath("serverX509Names")] public IList ServerX509Names { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendTlsProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendTlsProperties.Serialization.cs index 6ae0a55786343..91dfe8d1849cb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendTlsProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendTlsProperties.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -107,6 +108,53 @@ internal static BackendTlsProperties DeserializeBackendTlsProperties(JsonElement return new BackendTlsProperties(validateCertificateChain, validateCertificateName, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ShouldValidateCertificateChain), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" validateCertificateChain: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ShouldValidateCertificateChain)) + { + builder.Append(" validateCertificateChain: "); + var boolValue = ShouldValidateCertificateChain.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ShouldValidateCertificateName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" validateCertificateName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ShouldValidateCertificateName)) + { + builder.Append(" validateCertificateName: "); + var boolValue = ShouldValidateCertificateName.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -115,6 +163,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(BackendTlsProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendTlsProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendTlsProperties.cs index c12f9a483df2c..0208b90855f5e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendTlsProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendTlsProperties.cs @@ -62,8 +62,10 @@ internal BackendTlsProperties(bool? shouldValidateCertificateChain, bool? should } /// Flag indicating whether SSL certificate chain validation should be done when using self-signed certificates for this backend host. + [WirePath("validateCertificateChain")] public bool? ShouldValidateCertificateChain { get; set; } /// Flag indicating whether SSL certificate name validation should be done when using self-signed certificates for this backend host. + [WirePath("validateCertificateName")] public bool? ShouldValidateCertificateName { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BodyDiagnosticSettings.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BodyDiagnosticSettings.Serialization.cs index 92908b23eea82..716314cc37ce1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BodyDiagnosticSettings.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BodyDiagnosticSettings.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -92,6 +93,36 @@ internal static BodyDiagnosticSettings DeserializeBodyDiagnosticSettings(JsonEle return new BodyDiagnosticSettings(bytes, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Bytes), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" bytes: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Bytes)) + { + builder.Append(" bytes: "); + builder.AppendLine($"{Bytes.Value}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -100,6 +131,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(BodyDiagnosticSettings)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BodyDiagnosticSettings.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BodyDiagnosticSettings.cs index 3641e041ea45d..dce83f9520144 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BodyDiagnosticSettings.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BodyDiagnosticSettings.cs @@ -60,6 +60,7 @@ internal BodyDiagnosticSettings(int? bytes, IDictionary seri } /// Number of request body bytes to log. + [WirePath("bytes")] public int? Bytes { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CacheListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CacheListResult.Serialization.cs index 86ff4af847fdc..4016d89ebfe30 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CacheListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CacheListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static CacheListResult DeserializeCacheListResult(JsonElement element, return new CacheListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opt { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(CacheListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateConfiguration.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateConfiguration.Serialization.cs index c777d1ef3f3f9..67fcab2a67b1e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateConfiguration.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateConfiguration.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -122,6 +123,94 @@ internal static CertificateConfiguration DeserializeCertificateConfiguration(Jso return new CertificateConfiguration(encodedCertificate, certificatePassword, storeName, certificate, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EncodedCertificate), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" encodedCertificate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EncodedCertificate)) + { + builder.Append(" encodedCertificate: "); + if (EncodedCertificate.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{EncodedCertificate}'''"); + } + else + { + builder.AppendLine($"'{EncodedCertificate}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CertificatePassword), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" certificatePassword: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CertificatePassword)) + { + builder.Append(" certificatePassword: "); + if (CertificatePassword.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{CertificatePassword}'''"); + } + else + { + builder.AppendLine($"'{CertificatePassword}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StoreName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" storeName: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" storeName: "); + builder.AppendLine($"'{StoreName.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Certificate), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" certificate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Certificate)) + { + builder.Append(" certificate: "); + BicepSerializationHelpers.AppendChildObject(builder, Certificate, options, 2, false, " certificate: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -130,6 +219,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(CertificateConfiguration)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateConfiguration.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateConfiguration.cs index 7299e9529ea3c..6b6c09a0c3739 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateConfiguration.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateConfiguration.cs @@ -73,12 +73,16 @@ internal CertificateConfiguration() } /// Base64 Encoded certificate. + [WirePath("encodedCertificate")] public string EncodedCertificate { get; set; } /// Certificate Password. + [WirePath("certificatePassword")] public string CertificatePassword { get; set; } /// The System.Security.Cryptography.x509certificates.StoreName certificate store location. Only Root and CertificateAuthority are valid locations. + [WirePath("storeName")] public CertificateConfigurationStoreName StoreName { get; set; } /// Certificate information. + [WirePath("certificate")] public CertificateInformation Certificate { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateInformation.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateInformation.Serialization.cs index 8a424f4caff5c..f17aa8699ae4a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateInformation.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateInformation.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -101,6 +102,80 @@ internal static CertificateInformation DeserializeCertificateInformation(JsonEle return new CertificateInformation(expiry, thumbprint, subject, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExpireOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" expiry: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" expiry: "); + var formattedDateTimeString = TypeFormatters.ToString(ExpireOn, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Thumbprint), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" thumbprint: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Thumbprint)) + { + builder.Append(" thumbprint: "); + if (Thumbprint.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Thumbprint}'''"); + } + else + { + builder.AppendLine($"'{Thumbprint}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Subject), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subject: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Subject)) + { + builder.Append(" subject: "); + if (Subject.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Subject}'''"); + } + else + { + builder.AppendLine($"'{Subject}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -109,6 +184,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(CertificateInformation)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateInformation.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateInformation.cs index e9338e440c4eb..12d5d983bc59c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateInformation.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateInformation.cs @@ -79,10 +79,13 @@ internal CertificateInformation() } /// Expiration date of the certificate. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + [WirePath("expiry")] public DateTimeOffset ExpireOn { get; set; } /// Thumbprint of the certificate. + [WirePath("thumbprint")] public string Thumbprint { get; set; } /// Subject of the certificate. + [WirePath("subject")] public string Subject { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateListResult.Serialization.cs index 1de3d88d92964..9f12085599b2b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CertificateListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static CertificateListResult DeserializeCertificateListResult(JsonEleme return new CertificateListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(CertificateListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ClientSecretContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ClientSecretContract.Serialization.cs index cbb39fd889c08..fef034be3786d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ClientSecretContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ClientSecretContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -88,6 +89,44 @@ internal static ClientSecretContract DeserializeClientSecretContract(JsonElement return new ClientSecretContract(clientSecret, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientSecret), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientSecret: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientSecret)) + { + builder.Append(" clientSecret: "); + if (ClientSecret.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientSecret}'''"); + } + else + { + builder.AppendLine($"'{ClientSecret}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -96,6 +135,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ClientSecretContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ClientSecretContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ClientSecretContract.cs index 4c59e488670a9..86ca8dce558ab 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ClientSecretContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ClientSecretContract.cs @@ -60,6 +60,7 @@ internal ClientSecretContract(string clientSecret, IDictionary Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. + [WirePath("clientSecret")] public string ClientSecret { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConfigurationDeployContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConfigurationDeployContent.cs index b406e1eee5851..a4aa2e5654cc6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConfigurationDeployContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConfigurationDeployContent.cs @@ -62,8 +62,10 @@ internal ConfigurationDeployContent(string branch, bool? forceDelete, IDictionar } /// The name of the Git branch from which the configuration is to be deployed to the configuration database. + [WirePath("properties.branch")] public string Branch { get; set; } /// The value enforcing deleting subscriptions to products that are deleted in this update. + [WirePath("properties.force")] public bool? ForceDelete { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConfigurationSaveContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConfigurationSaveContent.cs index 243154d2cb12f..b60a59fc680c6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConfigurationSaveContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConfigurationSaveContent.cs @@ -62,8 +62,10 @@ internal ConfigurationSaveContent(string branch, bool? forceUpdate, IDictionary< } /// The name of the Git branch in which to commit the current configuration snapshot. + [WirePath("properties.branch")] public string Branch { get; set; } /// The value if true, the current configuration database is committed to the Git repository, even if the Git repository has newer changes that would be overwritten. + [WirePath("properties.force")] public bool? ForceUpdate { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckContent.cs index d3524dbceac27..26364367df127 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckContent.cs @@ -81,16 +81,21 @@ internal ConnectivityCheckContent() } /// Definitions about the connectivity check origin. + [WirePath("source")] public ConnectivityCheckRequestSource Source { get; } /// The connectivity check operation destination. + [WirePath("destination")] public ConnectivityCheckRequestDestination Destination { get; } /// The IP version to be used. Only IPv4 is supported for now. + [WirePath("preferredIPVersion")] public PreferredIPVersion? PreferredIPVersion { get; set; } /// The request's protocol. Specific protocol configuration can be available based on this selection. The specified destination address must be coherent with this value. + [WirePath("protocol")] public ConnectivityCheckProtocol? Protocol { get; set; } /// Protocol-specific configuration. internal ConnectivityCheckRequestProtocolConfiguration ProtocolConfiguration { get; set; } /// Configuration for HTTP or HTTPS requests. + [WirePath("protocolConfiguration.HTTPConfiguration")] public ConnectivityCheckRequestHttpConfiguration ProtocolHttpConfiguration { get => ProtocolConfiguration is null ? default : ProtocolConfiguration.HttpConfiguration; diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckRequestDestination.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckRequestDestination.cs index 0cb593714e629..18146a8cefd9b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckRequestDestination.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckRequestDestination.cs @@ -74,8 +74,10 @@ internal ConnectivityCheckRequestDestination() } /// Destination address. Can either be an IP address or a FQDN. + [WirePath("address")] public string Address { get; } /// Destination port. + [WirePath("port")] public long Port { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckRequestHttpConfiguration.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckRequestHttpConfiguration.cs index 65f3e71e06a41..3a46247af167e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckRequestHttpConfiguration.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckRequestHttpConfiguration.cs @@ -66,10 +66,13 @@ internal ConnectivityCheckRequestHttpConfiguration(HttpMethodConfiguration? meth } /// The HTTP method to be used. + [WirePath("method")] public HttpMethodConfiguration? Method { get; set; } /// List of HTTP status codes considered valid for the request response. + [WirePath("validStatusCodes")] public IList ValidStatusCodes { get; } /// List of headers to be included in the request. + [WirePath("headers")] public IList Headers { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckRequestProtocolConfiguration.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckRequestProtocolConfiguration.cs index fa10c4d137e43..4f275e950a794 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckRequestProtocolConfiguration.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckRequestProtocolConfiguration.cs @@ -60,6 +60,7 @@ internal ConnectivityCheckRequestProtocolConfiguration(ConnectivityCheckRequestH } /// Configuration for HTTP or HTTPS requests. + [WirePath("HTTPConfiguration")] public ConnectivityCheckRequestHttpConfiguration HttpConfiguration { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckRequestSource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckRequestSource.cs index 1eaa8877a2554..b9b317ab1eebb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckRequestSource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckRequestSource.cs @@ -72,8 +72,10 @@ internal ConnectivityCheckRequestSource() } /// The API Management service region from where to start the connectivity check operation. + [WirePath("region")] public string Region { get; } /// The particular VMSS instance from which to fire the request. + [WirePath("instance")] public long? Instance { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckResult.Serialization.cs index 3c26504e2b5cc..53316846e63d8 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -200,6 +202,134 @@ internal static ConnectivityCheckResult DeserializeConnectivityCheckResult(JsonE serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Hops), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" hops: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Hops)) + { + if (Hops.Any()) + { + builder.Append(" hops: "); + builder.AppendLine("["); + foreach (var item in Hops) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " hops: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ConnectionStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" connectionStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ConnectionStatus)) + { + builder.Append(" connectionStatus: "); + builder.AppendLine($"'{ConnectionStatus.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AvgLatencyInMs), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" avgLatencyInMs: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AvgLatencyInMs)) + { + builder.Append(" avgLatencyInMs: "); + builder.AppendLine($"'{AvgLatencyInMs.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MinLatencyInMs), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" minLatencyInMs: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MinLatencyInMs)) + { + builder.Append(" minLatencyInMs: "); + builder.AppendLine($"'{MinLatencyInMs.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MaxLatencyInMs), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" maxLatencyInMs: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MaxLatencyInMs)) + { + builder.Append(" maxLatencyInMs: "); + builder.AppendLine($"'{MaxLatencyInMs.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProbesSent), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" probesSent: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProbesSent)) + { + builder.Append(" probesSent: "); + builder.AppendLine($"'{ProbesSent.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProbesFailed), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" probesFailed: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProbesFailed)) + { + builder.Append(" probesFailed: "); + builder.AppendLine($"'{ProbesFailed.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -208,6 +338,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpt { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ConnectivityCheckResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckResult.cs index 29ed0b2f8d721..16e7418eb9af9 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckResult.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityCheckResult.cs @@ -73,18 +73,25 @@ internal ConnectivityCheckResult(IReadOnlyList hops, Connection } /// List of hops between the source and the destination. + [WirePath("hops")] public IReadOnlyList Hops { get; } /// The connection status. + [WirePath("connectionStatus")] public ConnectionStatus? ConnectionStatus { get; } /// Average latency in milliseconds. + [WirePath("avgLatencyInMs")] public long? AvgLatencyInMs { get; } /// Minimum latency in milliseconds. + [WirePath("minLatencyInMs")] public long? MinLatencyInMs { get; } /// Maximum latency in milliseconds. + [WirePath("maxLatencyInMs")] public long? MaxLatencyInMs { get; } /// Total number of probes sent. + [WirePath("probesSent")] public long? ProbesSent { get; } /// Number of failed probes. + [WirePath("probesFailed")] public long? ProbesFailed { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityHop.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityHop.Serialization.cs index 3076271c75807..8e4ce3dd6e06b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityHop.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityHop.Serialization.cs @@ -8,7 +8,9 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; using System.Net; +using System.Text; using System.Text.Json; using Azure.Core; @@ -187,6 +189,156 @@ internal static ConnectivityHop DeserializeConnectivityHop(JsonElement element, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ConnectivityHopType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ConnectivityHopType)) + { + builder.Append(" type: "); + if (ConnectivityHopType.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ConnectivityHopType}'''"); + } + else + { + builder.AppendLine($"'{ConnectivityHopType}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + if (Id.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Id}'''"); + } + else + { + builder.AppendLine($"'{Id}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Address), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" address: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Address)) + { + builder.Append(" address: "); + builder.AppendLine($"'{Address.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceId)) + { + builder.Append(" resourceId: "); + builder.AppendLine($"'{ResourceId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextHopIds), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextHopIds: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(NextHopIds)) + { + if (NextHopIds.Any()) + { + builder.Append(" nextHopIds: "); + builder.AppendLine("["); + foreach (var item in NextHopIds) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Issues), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" issues: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Issues)) + { + if (Issues.Any()) + { + builder.Append(" issues: "); + builder.AppendLine("["); + foreach (var item in Issues) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " issues: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -195,6 +347,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opt { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ConnectivityHop)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityHop.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityHop.cs index 39c512bbd1163..94db26e3085e4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityHop.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityHop.cs @@ -74,16 +74,22 @@ internal ConnectivityHop(string connectivityHopType, string id, IPAddress addres } /// The type of the hop. + [WirePath("type")] public string ConnectivityHopType { get; } /// The ID of the hop. + [WirePath("id")] public string Id { get; } /// The IP address of the hop. + [WirePath("address")] public IPAddress Address { get; } /// The ID of the resource corresponding to this hop. + [WirePath("resourceId")] public ResourceIdentifier ResourceId { get; } /// List of next hop identifiers. + [WirePath("nextHopIds")] public IReadOnlyList NextHopIds { get; } /// List of issues. + [WirePath("issues")] public IReadOnlyList Issues { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityIssue.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityIssue.Serialization.cs index 11f125245a470..23dbf803b9823 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityIssue.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityIssue.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -170,6 +172,113 @@ internal static ConnectivityIssue DeserializeConnectivityIssue(JsonElement eleme return new ConnectivityIssue(origin, severity, type, context ?? new ChangeTrackingList>(), serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Origin), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" origin: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Origin)) + { + builder.Append(" origin: "); + builder.AppendLine($"'{Origin.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Severity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" severity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Severity)) + { + builder.Append(" severity: "); + builder.AppendLine($"'{Severity.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IssueType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IssueType)) + { + builder.Append(" type: "); + builder.AppendLine($"'{IssueType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Context), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" context: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Context)) + { + if (Context.Any()) + { + builder.Append(" context: "); + builder.AppendLine("["); + foreach (var item in Context) + { + if (item == null) + { + builder.Append("null"); + continue; + } + builder.AppendLine("{"); + foreach (var item0 in item) + { + builder.Append($" '{item0.Key}': "); + if (item0.Value == null) + { + builder.Append("null"); + continue; + } + if (item0.Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{item0.Value}'''"); + } + else + { + builder.AppendLine($"'{item0.Value}'"); + } + } + builder.AppendLine(" }"); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -178,6 +287,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions o { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ConnectivityIssue)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityIssue.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityIssue.cs index b8ca76f1b5479..f30b8745b440c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityIssue.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityIssue.cs @@ -67,12 +67,16 @@ internal ConnectivityIssue(IssueOrigin? origin, IssueSeverity? severity, IssueTy } /// The origin of the issue. + [WirePath("origin")] public IssueOrigin? Origin { get; } /// The severity of the issue. + [WirePath("severity")] public IssueSeverity? Severity { get; } /// The type of issue. + [WirePath("type")] public IssueType? IssueType { get; } /// Provides additional context on the issue. + [WirePath("context")] public IReadOnlyList> Context { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityStatusContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityStatusContract.Serialization.cs index fca2c260ddca3..4133f0a7fe873 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityStatusContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityStatusContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -144,6 +145,141 @@ internal static ConnectivityStatusContract DeserializeConnectivityStatusContract serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" status: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" status: "); + builder.AppendLine($"'{Status.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Error), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" error: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Error)) + { + builder.Append(" error: "); + if (Error.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Error}'''"); + } + else + { + builder.AppendLine($"'{Error}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastUpdatedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastUpdated: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" lastUpdated: "); + var formattedDateTimeString = TypeFormatters.ToString(LastUpdatedOn, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastStatusChangedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastStatusChange: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" lastStatusChange: "); + var formattedDateTimeString = TypeFormatters.ToString(LastStatusChangedOn, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceType)) + { + builder.Append(" resourceType: "); + if (ResourceType.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ResourceType}'''"); + } + else + { + builder.AppendLine($"'{ResourceType}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsOptional), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isOptional: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" isOptional: "); + var boolValue = IsOptional == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -152,6 +288,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriter { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ConnectivityStatusContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityStatusContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityStatusContract.cs index c3ec6483acb81..8072e5f577892 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityStatusContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ConnectivityStatusContract.cs @@ -105,24 +105,31 @@ internal ConnectivityStatusContract() } /// The hostname of the resource which the service depends on. This can be the database, storage or any other azure resource on which the service depends upon. + [WirePath("name")] public string Name { get; } /// Resource Connectivity Status Type identifier. + [WirePath("status")] public ConnectivityStatusType Status { get; } /// Error details of the connectivity to the resource. + [WirePath("error")] public string Error { get; } /// /// The date when the resource connectivity status was last updated. This status should be updated every 15 minutes. If this status has not been updated, then it means that the service has lost network connectivity to the resource, from inside the Virtual Network.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("lastUpdated")] public DateTimeOffset LastUpdatedOn { get; } /// /// The date when the resource connectivity status last Changed from success to failure or vice-versa. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("lastStatusChange")] public DateTimeOffset LastStatusChangedOn { get; } /// Resource Type. + [WirePath("resourceType")] public string ResourceType { get; } /// Whether this is optional. + [WirePath("isOptional")] public bool IsOptional { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ContentItemListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ContentItemListResult.Serialization.cs index 2b1f526bdffee..49df88cb84a87 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ContentItemListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ContentItemListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -113,6 +115,67 @@ internal static ContentItemListResult DeserializeContentItemListResult(JsonEleme return new ContentItemListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -121,6 +184,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ContentItemListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ContentTypeListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ContentTypeListResult.Serialization.cs index 6499056cd9ae9..81d854ab62787 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ContentTypeListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ContentTypeListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -113,6 +115,67 @@ internal static ContentTypeListResult DeserializeContentTypeListResult(JsonEleme return new ContentTypeListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -121,6 +184,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ContentTypeListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DataMasking.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DataMasking.Serialization.cs index 60bd6e87474cc..02f15c4dad7c0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DataMasking.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DataMasking.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -127,6 +129,67 @@ internal static DataMasking DeserializeDataMasking(JsonElement element, ModelRea return new DataMasking(queryParams ?? new ChangeTrackingList(), headers ?? new ChangeTrackingList(), serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(QueryParams), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" queryParams: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(QueryParams)) + { + if (QueryParams.Any()) + { + builder.Append(" queryParams: "); + builder.AppendLine("["); + foreach (var item in QueryParams) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " queryParams: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Headers), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" headers: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Headers)) + { + if (Headers.Any()) + { + builder.Append(" headers: "); + builder.AppendLine("["); + foreach (var item in Headers) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " headers: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -135,6 +198,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(DataMasking)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DataMasking.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DataMasking.cs index 2f27b49b6883b..7d32767a114fc 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DataMasking.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DataMasking.cs @@ -64,8 +64,10 @@ internal DataMasking(IList queryParams, IList Masking settings for Url query parameters. + [WirePath("queryParams")] public IList QueryParams { get; } /// Masking settings for headers. + [WirePath("headers")] public IList Headers { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DataMaskingEntity.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DataMaskingEntity.Serialization.cs index c73cd7d668a66..ae5e80952ba9e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DataMaskingEntity.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DataMaskingEntity.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -103,6 +104,59 @@ internal static DataMaskingEntity DeserializeDataMaskingEntity(JsonElement eleme return new DataMaskingEntity(value, mode, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + if (Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Value}'''"); + } + else + { + builder.AppendLine($"'{Value}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Mode), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" mode: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Mode)) + { + builder.Append(" mode: "); + builder.AppendLine($"'{Mode.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -111,6 +165,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions o { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(DataMaskingEntity)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DataMaskingEntity.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DataMaskingEntity.cs index 3eb26d100da5d..cbd96e68289cc 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DataMaskingEntity.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DataMaskingEntity.cs @@ -62,8 +62,10 @@ internal DataMaskingEntity(string value, DataMaskingMode? mode, IDictionary The name of an entity to mask (e.g. a name of a header or a query parameter). + [WirePath("value")] public string Value { get; set; } /// Data masking mode. + [WirePath("mode")] public DataMaskingMode? Mode { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DeletedServicesListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DeletedServicesListResult.Serialization.cs index 4bd5d91dc857c..ac71ae27a88b5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DeletedServicesListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DeletedServicesListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -113,6 +115,67 @@ internal static DeletedServicesListResult DeserializeDeletedServicesListResult(J return new DeletedServicesListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -121,6 +184,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterO { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(DeletedServicesListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DiagnosticListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DiagnosticListResult.Serialization.cs index 60752fc7c6e1d..391834cdf4091 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DiagnosticListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DiagnosticListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static DiagnosticListResult DeserializeDiagnosticListResult(JsonElement return new DiagnosticListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(DiagnosticListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationContractPatch.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationContractPatch.Serialization.cs new file mode 100644 index 0000000000000..a2fd27620367f --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationContractPatch.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + public partial class DocumentationContractPatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentationContractPatch)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Title)) + { + writer.WritePropertyName("title"u8); + writer.WriteStringValue(Title); + } + if (Optional.IsDefined(Content)) + { + writer.WritePropertyName("content"u8); + writer.WriteStringValue(Content); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + DocumentationContractPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentationContractPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDocumentationContractPatch(document.RootElement, options); + } + + internal static DocumentationContractPatch DeserializeDocumentationContractPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string title = default; + string content = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("title"u8)) + { + title = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("content"u8)) + { + content = property0.Value.GetString(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DocumentationContractPatch(title, content, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DocumentationContractPatch)} does not support writing '{options.Format}' format."); + } + } + + DocumentationContractPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDocumentationContractPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DocumentationContractPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationContractPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationContractPatch.cs new file mode 100644 index 0000000000000..6f7cf0bea8cac --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationContractPatch.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// Documentation update contract details. + public partial class DocumentationContractPatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DocumentationContractPatch() + { + } + + /// Initializes a new instance of . + /// documentation title. + /// Markdown documentation content. + /// Keeps track of any properties unknown to the library. + internal DocumentationContractPatch(string title, string content, IDictionary serializedAdditionalRawData) + { + Title = title; + Content = content; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// documentation title. + [WirePath("properties.title")] + public string Title { get; set; } + /// Markdown documentation content. + [WirePath("properties.content")] + public string Content { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationListResult.Serialization.cs new file mode 100644 index 0000000000000..d56f6b1c7fdc1 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationListResult.Serialization.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + internal partial class DocumentationListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentationListResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + DocumentationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DocumentationListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDocumentationListResult(document.RootElement, options); + } + + internal static DocumentationListResult DeserializeDocumentationListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DocumentationContractData.DeserializeDocumentationContractData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DocumentationListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DocumentationListResult)} does not support writing '{options.Format}' format."); + } + } + + DocumentationListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDocumentationListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DocumentationListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationListResult.cs new file mode 100644 index 0000000000000..3daee4497be8d --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DocumentationListResult.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// Paged Documentation list representation. + internal partial class DocumentationListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DocumentationListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Page values. + /// Next page link if any. + /// Keeps track of any properties unknown to the library. + internal DocumentationListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Page values. + public IReadOnlyList Value { get; } + /// Next page link if any. + public string NextLink { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EmailTemplateListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EmailTemplateListResult.Serialization.cs index 262193e8b2f4a..131389345c1d6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EmailTemplateListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EmailTemplateListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static EmailTemplateListResult DeserializeEmailTemplateListResult(JsonE return new EmailTemplateListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpt { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(EmailTemplateListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EmailTemplateParametersContractProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EmailTemplateParametersContractProperties.Serialization.cs index d71579b17915a..0ebe548a47ae2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EmailTemplateParametersContractProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EmailTemplateParametersContractProperties.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -110,6 +111,90 @@ internal static EmailTemplateParametersContractProperties DeserializeEmailTempla return new EmailTemplateParametersContractProperties(name, title, description, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Title), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" title: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Title)) + { + builder.Append(" title: "); + if (Title.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Title}'''"); + } + else + { + builder.AppendLine($"'{Title}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -118,6 +203,8 @@ BinaryData IPersistableModel.Write(Mo { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(EmailTemplateParametersContractProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EmailTemplateParametersContractProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EmailTemplateParametersContractProperties.cs index bb1ea4b447674..cb15fddfa3d55 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EmailTemplateParametersContractProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EmailTemplateParametersContractProperties.cs @@ -64,10 +64,13 @@ internal EmailTemplateParametersContractProperties(string name, string title, st } /// Template parameter name. + [WirePath("name")] public string Name { get; set; } /// Template parameter title. + [WirePath("title")] public string Title { get; set; } /// Template parameter description. + [WirePath("description")] public string Description { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EndpointDependency.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EndpointDependency.Serialization.cs index c68d892a1570d..38f09ea75789e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EndpointDependency.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EndpointDependency.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -113,6 +115,67 @@ internal static EndpointDependency DeserializeEndpointDependency(JsonElement ele return new EndpointDependency(domainName, endpointDetails ?? new ChangeTrackingList(), serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DomainName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" domainName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DomainName)) + { + builder.Append(" domainName: "); + if (DomainName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DomainName}'''"); + } + else + { + builder.AppendLine($"'{DomainName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndpointDetails), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endpointDetails: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(EndpointDetails)) + { + if (EndpointDetails.Any()) + { + builder.Append(" endpointDetails: "); + builder.AppendLine("["); + foreach (var item in EndpointDetails) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " endpointDetails: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -121,6 +184,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(EndpointDependency)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EndpointDependency.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EndpointDependency.cs index 833f86bdcf11a..45573fd411f96 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EndpointDependency.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EndpointDependency.cs @@ -63,8 +63,10 @@ internal EndpointDependency(string domainName, IReadOnlyList end } /// The domain name of the dependency. + [WirePath("domainName")] public string DomainName { get; } /// The Ports used when connecting to DomainName. + [WirePath("endpointDetails")] public IReadOnlyList EndpointDetails { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EndpointDetail.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EndpointDetail.Serialization.cs index 15cfea6bb661e..074f481025913 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EndpointDetail.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EndpointDetail.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -103,6 +104,59 @@ internal static EndpointDetail DeserializeEndpointDetail(JsonElement element, Mo return new EndpointDetail(port, region, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Port), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" port: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Port)) + { + builder.Append(" port: "); + builder.AppendLine($"{Port.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Region), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" region: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Region)) + { + builder.Append(" region: "); + if (Region.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Region}'''"); + } + else + { + builder.AppendLine($"'{Region}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -111,6 +165,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(EndpointDetail)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EndpointDetail.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EndpointDetail.cs index 064503efd78df..49f2c8e195da5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EndpointDetail.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/EndpointDetail.cs @@ -62,8 +62,10 @@ internal EndpointDetail(int? port, string region, IDictionary The port an endpoint is connected to. + [WirePath("port")] public int? Port { get; } /// The region of the dependency. + [WirePath("region")] public string Region { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ErrorFieldContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ErrorFieldContract.Serialization.cs index 2bd388d8c5ab8..359f78d338464 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ErrorFieldContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ErrorFieldContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -110,6 +111,90 @@ internal static ErrorFieldContract DeserializeErrorFieldContract(JsonElement ele return new ErrorFieldContract(code, message, target, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Code), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" code: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Code)) + { + builder.Append(" code: "); + if (Code.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Code}'''"); + } + else + { + builder.AppendLine($"'{Code}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Message), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" message: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Message)) + { + builder.Append(" message: "); + if (Message.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Message}'''"); + } + else + { + builder.AppendLine($"'{Message}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Target), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" target: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Target)) + { + builder.Append(" target: "); + if (Target.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Target}'''"); + } + else + { + builder.AppendLine($"'{Target}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -118,6 +203,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ErrorFieldContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ErrorFieldContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ErrorFieldContract.cs index 5163f42f7c5a0..9f887f6548715 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ErrorFieldContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ErrorFieldContract.cs @@ -64,10 +64,13 @@ internal ErrorFieldContract(string code, string message, string target, IDiction } /// Property level error code. + [WirePath("code")] public string Code { get; set; } /// Human-readable representation of property-level error. + [WirePath("message")] public string Message { get; set; } /// Property name. + [WirePath("target")] public string Target { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ErrorResponseBody.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ErrorResponseBody.Serialization.cs index 047df58979880..8e58f673c6b4b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ErrorResponseBody.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ErrorResponseBody.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -124,6 +126,90 @@ internal static ErrorResponseBody DeserializeErrorResponseBody(JsonElement eleme return new ErrorResponseBody(code, message, details ?? new ChangeTrackingList(), serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Code), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" code: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Code)) + { + builder.Append(" code: "); + if (Code.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Code}'''"); + } + else + { + builder.AppendLine($"'{Code}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Message), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" message: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Message)) + { + builder.Append(" message: "); + if (Message.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Message}'''"); + } + else + { + builder.AppendLine($"'{Message}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Details), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" details: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Details)) + { + if (Details.Any()) + { + builder.Append(" details: "); + builder.AppendLine("["); + foreach (var item in Details) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " details: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -132,6 +218,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions o { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ErrorResponseBody)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ErrorResponseBody.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ErrorResponseBody.cs index a2e84f3ba2d89..b9b01b0a1d6b4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ErrorResponseBody.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ErrorResponseBody.cs @@ -65,10 +65,13 @@ internal ErrorResponseBody(string code, string message, IList Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response. + [WirePath("code")] public string Code { get; set; } /// Human-readable representation of the error. + [WirePath("message")] public string Message { get; set; } /// The list of invalid fields send in request, in case of validation error. + [WirePath("details")] public IList Details { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayApiData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayApiData.Serialization.cs index b0fc2a28d69fa..1ee2ef1a8ba0b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayApiData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayApiData.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -456,6 +458,475 @@ internal static GatewayApiData DeserializeGatewayApiData(JsonElement element, Mo serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AuthenticationSettings), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" authenticationSettings: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AuthenticationSettings)) + { + builder.Append(" authenticationSettings: "); + BicepSerializationHelpers.AppendChildObject(builder, AuthenticationSettings, options, 4, false, " authenticationSettings: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SubscriptionKeyParameterNames), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionKeyParameterNames: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SubscriptionKeyParameterNames)) + { + builder.Append(" subscriptionKeyParameterNames: "); + BicepSerializationHelpers.AppendChildObject(builder, SubscriptionKeyParameterNames, options, 4, false, " subscriptionKeyParameterNames: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiType)) + { + builder.Append(" type: "); + builder.AppendLine($"'{ApiType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiRevision), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiRevision: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiRevision)) + { + builder.Append(" apiRevision: "); + if (ApiRevision.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiRevision}'''"); + } + else + { + builder.AppendLine($"'{ApiRevision}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersion)) + { + builder.Append(" apiVersion: "); + if (ApiVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiVersion}'''"); + } + else + { + builder.AppendLine($"'{ApiVersion}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsCurrent), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isCurrent: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsCurrent)) + { + builder.Append(" isCurrent: "); + var boolValue = IsCurrent.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsOnline), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isOnline: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsOnline)) + { + builder.Append(" isOnline: "); + var boolValue = IsOnline.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiRevisionDescription), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiRevisionDescription: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiRevisionDescription)) + { + builder.Append(" apiRevisionDescription: "); + if (ApiRevisionDescription.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiRevisionDescription}'''"); + } + else + { + builder.AppendLine($"'{ApiRevisionDescription}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersionDescription), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersionDescription: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersionDescription)) + { + builder.Append(" apiVersionDescription: "); + if (ApiVersionDescription.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiVersionDescription}'''"); + } + else + { + builder.AppendLine($"'{ApiVersionDescription}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersionSetId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersionSetId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersionSetId)) + { + builder.Append(" apiVersionSetId: "); + builder.AppendLine($"'{ApiVersionSetId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsSubscriptionRequired), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionRequired: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsSubscriptionRequired)) + { + builder.Append(" subscriptionRequired: "); + var boolValue = IsSubscriptionRequired.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TermsOfServiceLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" termsOfServiceUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TermsOfServiceLink)) + { + builder.Append(" termsOfServiceUrl: "); + if (TermsOfServiceLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TermsOfServiceLink}'''"); + } + else + { + builder.AppendLine($"'{TermsOfServiceLink}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Contact), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" contact: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Contact)) + { + builder.Append(" contact: "); + BicepSerializationHelpers.AppendChildObject(builder, Contact, options, 4, false, " contact: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(License), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" license: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(License)) + { + builder.Append(" license: "); + BicepSerializationHelpers.AppendChildObject(builder, License, options, 4, false, " license: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SourceApiId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sourceApiId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SourceApiId)) + { + builder.Append(" sourceApiId: "); + builder.AppendLine($"'{SourceApiId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DisplayName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" displayName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DisplayName)) + { + builder.Append(" displayName: "); + if (DisplayName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DisplayName}'''"); + } + else + { + builder.AppendLine($"'{DisplayName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ServiceLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serviceUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ServiceLink)) + { + builder.Append(" serviceUrl: "); + if (ServiceLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ServiceLink}'''"); + } + else + { + builder.AppendLine($"'{ServiceLink}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Path), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" path: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Path)) + { + builder.Append(" path: "); + if (Path.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Path}'''"); + } + else + { + builder.AppendLine($"'{Path}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Protocols), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" protocols: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Protocols)) + { + if (Protocols.Any()) + { + builder.Append(" protocols: "); + builder.AppendLine("["); + foreach (var item in Protocols) + { + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersionSet), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersionSet: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersionSet)) + { + builder.Append(" apiVersionSet: "); + BicepSerializationHelpers.AppendChildObject(builder, ApiVersionSet, options, 4, false, " apiVersionSet: "); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -464,6 +935,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(GatewayApiData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayApiData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayApiData.cs index a0097d18d91b8..42bb9873b5b6b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayApiData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayApiData.cs @@ -107,46 +107,67 @@ internal GatewayApiData(ResourceIdentifier id, string name, ResourceType resourc } /// Description of the API. May include HTML formatting tags. + [WirePath("properties.description")] public string Description { get; set; } /// Collection of authentication settings included into this API. + [WirePath("properties.authenticationSettings")] public AuthenticationSettingsContract AuthenticationSettings { get; set; } /// Protocols over which API is made available. + [WirePath("properties.subscriptionKeyParameterNames")] public SubscriptionKeyParameterNamesContract SubscriptionKeyParameterNames { get; set; } /// Type of API. + [WirePath("properties.type")] public ApiType? ApiType { get; set; } /// Describes the revision of the API. If no value is provided, default revision 1 is created. + [WirePath("properties.apiRevision")] public string ApiRevision { get; set; } /// Indicates the version identifier of the API if the API is versioned. + [WirePath("properties.apiVersion")] public string ApiVersion { get; set; } /// Indicates if API revision is current api revision. + [WirePath("properties.isCurrent")] public bool? IsCurrent { get; set; } /// Indicates if API revision is accessible via the gateway. + [WirePath("properties.isOnline")] public bool? IsOnline { get; } /// Description of the API Revision. + [WirePath("properties.apiRevisionDescription")] public string ApiRevisionDescription { get; set; } /// Description of the API Version. + [WirePath("properties.apiVersionDescription")] public string ApiVersionDescription { get; set; } /// A resource identifier for the related ApiVersionSet. + [WirePath("properties.apiVersionSetId")] public ResourceIdentifier ApiVersionSetId { get; set; } /// Specifies whether an API or Product subscription is required for accessing the API. + [WirePath("properties.subscriptionRequired")] public bool? IsSubscriptionRequired { get; set; } /// A URL to the Terms of Service for the API. MUST be in the format of a URL. + [WirePath("properties.termsOfServiceUrl")] public string TermsOfServiceLink { get; set; } /// Contact information for the API. + [WirePath("properties.contact")] public ApiContactInformation Contact { get; set; } /// License information for the API. + [WirePath("properties.license")] public ApiLicenseInformation License { get; set; } /// API identifier of the source API. + [WirePath("properties.sourceApiId")] public ResourceIdentifier SourceApiId { get; set; } /// API name. Must be 1 to 300 characters long. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. + [WirePath("properties.serviceUrl")] public string ServiceLink { get; set; } /// Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. + [WirePath("properties.path")] public string Path { get; set; } /// Describes on which protocols the operations in this API can be invoked. + [WirePath("properties.protocols")] public IList Protocols { get; } /// Version set details. + [WirePath("properties.apiVersionSet")] public ApiVersionSetContractDetails ApiVersionSet { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayCertificateAuthorityListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayCertificateAuthorityListResult.Serialization.cs index df2fae5ff2d50..4cbf0204d2e77 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayCertificateAuthorityListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayCertificateAuthorityListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -113,6 +115,67 @@ internal static GatewayCertificateAuthorityListResult DeserializeGatewayCertific return new GatewayCertificateAuthorityListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -121,6 +184,8 @@ BinaryData IPersistableModel.Write(ModelR { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(GatewayCertificateAuthorityListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayHostnameConfigurationListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayHostnameConfigurationListResult.Serialization.cs index 649718c5c0a0a..863fb62852d66 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayHostnameConfigurationListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayHostnameConfigurationListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -113,6 +115,67 @@ internal static GatewayHostnameConfigurationListResult DeserializeGatewayHostnam return new GatewayHostnameConfigurationListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -121,6 +184,8 @@ BinaryData IPersistableModel.Write(Model { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(GatewayHostnameConfigurationListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayKeyRegenerateContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayKeyRegenerateContent.cs index f4c8f41cb977a..41c8b6f9d4e93 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayKeyRegenerateContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayKeyRegenerateContent.cs @@ -67,6 +67,7 @@ internal GatewayKeyRegenerateContent() } /// The Key being regenerated. + [WirePath("keyType")] public GatewayRegenerateKeyType KeyType { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayKeysContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayKeysContract.Serialization.cs index 88cffac0adbdd..924d7a8e7f81e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayKeysContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayKeysContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -99,6 +100,67 @@ internal static GatewayKeysContract DeserializeGatewayKeysContract(JsonElement e return new GatewayKeysContract(primary, secondary, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Primary), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" primary: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Primary)) + { + builder.Append(" primary: "); + if (Primary.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Primary}'''"); + } + else + { + builder.AppendLine($"'{Primary}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Secondary), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" secondary: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Secondary)) + { + builder.Append(" secondary: "); + if (Secondary.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Secondary}'''"); + } + else + { + builder.AppendLine($"'{Secondary}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -107,6 +169,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(GatewayKeysContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayKeysContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayKeysContract.cs index 25e33b53c779f..52495eb1ed78e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayKeysContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayKeysContract.cs @@ -62,8 +62,10 @@ internal GatewayKeysContract(string primary, string secondary, IDictionary Primary gateway key. + [WirePath("primary")] public string Primary { get; } /// Secondary gateway key. + [WirePath("secondary")] public string Secondary { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayListResult.Serialization.cs index 074018f3ee02a..a68903b865d03 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static GatewayListResult DeserializeGatewayListResult(JsonElement eleme return new GatewayListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions o { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(GatewayListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayTokenContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayTokenContract.Serialization.cs index d1bdf99204e49..94342c7f256e4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayTokenContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayTokenContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -88,6 +89,44 @@ internal static GatewayTokenContract DeserializeGatewayTokenContract(JsonElement return new GatewayTokenContract(value, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + if (Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Value}'''"); + } + else + { + builder.AppendLine($"'{Value}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -96,6 +135,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(GatewayTokenContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayTokenContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayTokenContract.cs index 25c4303d7aa49..cdec1ef0aa5e1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayTokenContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayTokenContract.cs @@ -60,6 +60,7 @@ internal GatewayTokenContract(string value, IDictionary seri } /// Shared Access Authentication token value for the Gateway. + [WirePath("value")] public string Value { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayTokenRequestContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayTokenRequestContract.cs index 9d9221a56860f..83c5bcccfbc7e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayTokenRequestContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayTokenRequestContract.cs @@ -77,11 +77,13 @@ internal GatewayTokenRequestContract() } /// The Key to be used to generate gateway token. + [WirePath("keyType")] public TokenGenerationUsedKeyType KeyType { get; } /// /// The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("expiry")] public DateTimeOffset Expiry { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GenerateSsoUriResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GenerateSsoUriResult.Serialization.cs index 4344e40f37a3f..511fca42211e5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GenerateSsoUriResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GenerateSsoUriResult.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -88,6 +89,44 @@ internal static GenerateSsoUriResult DeserializeGenerateSsoUriResult(JsonElement return new GenerateSsoUriResult(value, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + if (Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Value}'''"); + } + else + { + builder.AppendLine($"'{Value}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -96,6 +135,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(GenerateSsoUriResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GenerateSsoUriResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GenerateSsoUriResult.cs index 2f02a4a089404..43c3d21dad07b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GenerateSsoUriResult.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GenerateSsoUriResult.cs @@ -60,6 +60,7 @@ internal GenerateSsoUriResult(string value, IDictionary seri } /// Redirect Url containing the SSO URL value. + [WirePath("value")] public string Value { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GitOperationResultContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GitOperationResultContractData.Serialization.cs index 2814e72ee22a5..645a168da733b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GitOperationResultContractData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GitOperationResultContractData.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -260,6 +262,208 @@ internal static GitOperationResultContractData DeserializeGitOperationResultCont serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OperationResultIdentifier), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OperationResultIdentifier)) + { + builder.Append(" id: "); + if (OperationResultIdentifier.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{OperationResultIdentifier}'''"); + } + else + { + builder.AppendLine($"'{OperationResultIdentifier}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" status: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Status)) + { + builder.Append(" status: "); + builder.AppendLine($"'{Status.Value.ToSerialString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StartedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" started: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StartedOn)) + { + builder.Append(" started: "); + var formattedDateTimeString = TypeFormatters.ToString(StartedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UpdatedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" updated: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UpdatedOn)) + { + builder.Append(" updated: "); + var formattedDateTimeString = TypeFormatters.ToString(UpdatedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResultInfo), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resultInfo: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResultInfo)) + { + builder.Append(" resultInfo: "); + if (ResultInfo.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ResultInfo}'''"); + } + else + { + builder.AppendLine($"'{ResultInfo}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Error), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" error: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Error)) + { + builder.Append(" error: "); + BicepSerializationHelpers.AppendChildObject(builder, Error, options, 4, false, " error: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ActionLog), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" actionLog: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ActionLog)) + { + if (ActionLog.Any()) + { + builder.Append(" actionLog: "); + builder.AppendLine("["); + foreach (var item in ActionLog) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " actionLog: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -268,6 +472,8 @@ BinaryData IPersistableModel.Write(ModelReaderWr { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(GitOperationResultContractData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GitOperationResultContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GitOperationResultContractData.cs index cb917e7f6198a..ae94e5402c078 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GitOperationResultContractData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GitOperationResultContractData.cs @@ -85,24 +85,31 @@ internal GitOperationResultContractData(ResourceIdentifier id, string name, Reso } /// Operation result identifier. + [WirePath("properties.id")] public string OperationResultIdentifier { get; set; } /// Status of an async operation. + [WirePath("properties.status")] public AsyncOperationStatus? Status { get; set; } /// /// Start time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("properties.started")] public DateTimeOffset? StartedOn { get; set; } /// /// Last update time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("properties.updated")] public DateTimeOffset? UpdatedOn { get; set; } /// Optional result info. + [WirePath("properties.resultInfo")] public string ResultInfo { get; set; } /// Error Body Contract. + [WirePath("properties.error")] public ErrorResponseBody Error { get; set; } /// This property if only provided as part of the TenantConfiguration_Validate operation. It contains the log the entities which will be updated/created/deleted as part of the TenantConfiguration_Deploy operation. + [WirePath("properties.actionLog")] public IReadOnlyList ActionLog { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GlobalSchemaListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GlobalSchemaListResult.Serialization.cs index 313598d287631..7494b809be9db 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GlobalSchemaListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GlobalSchemaListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static GlobalSchemaListResult DeserializeGlobalSchemaListResult(JsonEle return new GlobalSchemaListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(GlobalSchemaListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GroupContractProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GroupContractProperties.Serialization.cs index 1448f675d3021..7012f707b9e15 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GroupContractProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GroupContractProperties.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -143,6 +144,121 @@ internal static GroupContractProperties DeserializeGroupContractProperties(JsonE serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DisplayName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" displayName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DisplayName)) + { + builder.Append(" displayName: "); + if (DisplayName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DisplayName}'''"); + } + else + { + builder.AppendLine($"'{DisplayName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsBuiltIn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" builtIn: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsBuiltIn)) + { + builder.Append(" builtIn: "); + var boolValue = IsBuiltIn.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiManagementGroupType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiManagementGroupType)) + { + builder.Append(" type: "); + builder.AppendLine($"'{ApiManagementGroupType.Value.ToSerialString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExternalId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" externalId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ExternalId)) + { + builder.Append(" externalId: "); + if (ExternalId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ExternalId}'''"); + } + else + { + builder.AppendLine($"'{ExternalId}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -151,6 +267,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpt { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(GroupContractProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GroupContractProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GroupContractProperties.cs index e6a0f12f06083..b0ef0fb832766 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GroupContractProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GroupContractProperties.cs @@ -78,14 +78,19 @@ internal GroupContractProperties() } /// Group name. + [WirePath("displayName")] public string DisplayName { get; } /// Group description. Can contain HTML formatting tags. + [WirePath("description")] public string Description { get; } /// true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false. + [WirePath("builtIn")] public bool? IsBuiltIn { get; } /// Group type. + [WirePath("type")] public ApiManagementGroupType? ApiManagementGroupType { get; } /// For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://<tenant>.onmicrosoft.com/groups/<group object id>`; otherwise the value is null. + [WirePath("externalId")] public string ExternalId { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GroupListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GroupListResult.Serialization.cs index a8119302fb042..a3f242d77aa41 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GroupListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GroupListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static GroupListResult DeserializeGroupListResult(JsonElement element, return new GroupListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opt { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(GroupListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HostnameConfiguration.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HostnameConfiguration.Serialization.cs index 67de90f1127f3..d3e231216cc5c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HostnameConfiguration.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HostnameConfiguration.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -228,6 +229,217 @@ internal static HostnameConfiguration DeserializeHostnameConfiguration(JsonEleme serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(HostnameType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" type: "); + builder.AppendLine($"'{HostnameType.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(HostName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" hostName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(HostName)) + { + builder.Append(" hostName: "); + if (HostName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{HostName}'''"); + } + else + { + builder.AppendLine($"'{HostName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(KeyVaultSecretUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" keyVaultId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(KeyVaultSecretUri)) + { + builder.Append(" keyVaultId: "); + builder.AppendLine($"'{KeyVaultSecretUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IdentityClientId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" identityClientId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IdentityClientId)) + { + builder.Append(" identityClientId: "); + if (IdentityClientId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{IdentityClientId}'''"); + } + else + { + builder.AppendLine($"'{IdentityClientId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EncodedCertificate), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" encodedCertificate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EncodedCertificate)) + { + builder.Append(" encodedCertificate: "); + if (EncodedCertificate.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{EncodedCertificate}'''"); + } + else + { + builder.AppendLine($"'{EncodedCertificate}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CertificatePassword), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" certificatePassword: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CertificatePassword)) + { + builder.Append(" certificatePassword: "); + if (CertificatePassword.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{CertificatePassword}'''"); + } + else + { + builder.AppendLine($"'{CertificatePassword}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsDefaultSslBindingEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" defaultSslBinding: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsDefaultSslBindingEnabled)) + { + builder.Append(" defaultSslBinding: "); + var boolValue = IsDefaultSslBindingEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsClientCertificateNegotiationEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" negotiateClientCertificate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsClientCertificateNegotiationEnabled)) + { + builder.Append(" negotiateClientCertificate: "); + var boolValue = IsClientCertificateNegotiationEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Certificate), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" certificate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Certificate)) + { + builder.Append(" certificate: "); + BicepSerializationHelpers.AppendChildObject(builder, Certificate, options, 2, false, " certificate: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CertificateSource), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" certificateSource: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CertificateSource)) + { + builder.Append(" certificateSource: "); + builder.AppendLine($"'{CertificateSource.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CertificateStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" certificateStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CertificateStatus)) + { + builder.Append(" certificateStatus: "); + builder.AppendLine($"'{CertificateStatus.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -236,6 +448,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(HostnameConfiguration)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HostnameConfiguration.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HostnameConfiguration.cs index 39d7d57980fe8..0f006e1ece4a1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HostnameConfiguration.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HostnameConfiguration.cs @@ -64,7 +64,7 @@ public HostnameConfiguration(HostnameType hostnameType, string hostName) /// System or User Assigned Managed identity clientId as generated by Azure AD, which has GET access to the keyVault containing the SSL certificate. /// Base64 Encoded certificate. /// Certificate Password. - /// Specify true to setup the certificate associated with this Hostname as the Default SSL Certificate. If a client does not send the SNI header, then this will be the certificate that will be challenged. The property is useful if a service has multiple custom hostname enabled and it needs to decide on the default ssl certificate. The setting only applied to Proxy Hostname Type. + /// Specify true to setup the certificate associated with this Hostname as the Default SSL Certificate. If a client does not send the SNI header, then this will be the certificate that will be challenged. The property is useful if a service has multiple custom hostname enabled and it needs to decide on the default ssl certificate. The setting only applied to gateway Hostname Type. /// Specify true to always negotiate client certificate on the hostname. Default Value is false. /// Certificate information. /// Certificate Source. @@ -92,26 +92,37 @@ internal HostnameConfiguration() } /// Hostname type. + [WirePath("type")] public HostnameType HostnameType { get; set; } /// Hostname to configure on the Api Management service. + [WirePath("hostName")] public string HostName { get; set; } /// Url to the KeyVault Secret containing the Ssl Certificate. If absolute Url containing version is provided, auto-update of ssl certificate will not work. This requires Api Management service to be configured with aka.ms/apimmsi. The secret should be of type *application/x-pkcs12*. + [WirePath("keyVaultId")] public Uri KeyVaultSecretUri { get; set; } /// System or User Assigned Managed identity clientId as generated by Azure AD, which has GET access to the keyVault containing the SSL certificate. + [WirePath("identityClientId")] public string IdentityClientId { get; set; } /// Base64 Encoded certificate. + [WirePath("encodedCertificate")] public string EncodedCertificate { get; set; } /// Certificate Password. + [WirePath("certificatePassword")] public string CertificatePassword { get; set; } - /// Specify true to setup the certificate associated with this Hostname as the Default SSL Certificate. If a client does not send the SNI header, then this will be the certificate that will be challenged. The property is useful if a service has multiple custom hostname enabled and it needs to decide on the default ssl certificate. The setting only applied to Proxy Hostname Type. + /// Specify true to setup the certificate associated with this Hostname as the Default SSL Certificate. If a client does not send the SNI header, then this will be the certificate that will be challenged. The property is useful if a service has multiple custom hostname enabled and it needs to decide on the default ssl certificate. The setting only applied to gateway Hostname Type. + [WirePath("defaultSslBinding")] public bool? IsDefaultSslBindingEnabled { get; set; } /// Specify true to always negotiate client certificate on the hostname. Default Value is false. + [WirePath("negotiateClientCertificate")] public bool? IsClientCertificateNegotiationEnabled { get; set; } /// Certificate information. + [WirePath("certificate")] public CertificateInformation Certificate { get; set; } /// Certificate Source. + [WirePath("certificateSource")] public CertificateSource? CertificateSource { get; set; } /// Certificate Status. + [WirePath("certificateStatus")] public CertificateStatus? CertificateStatus { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HttpHeaderConfiguration.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HttpHeaderConfiguration.cs index 5a6e85a51feec..2a6268af1f8e4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HttpHeaderConfiguration.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HttpHeaderConfiguration.cs @@ -75,8 +75,10 @@ internal HttpHeaderConfiguration() } /// Header name. + [WirePath("name")] public string Name { get; } /// Header value. + [WirePath("value")] public string Value { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HttpMessageDiagnostic.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HttpMessageDiagnostic.Serialization.cs index 826c941c5775f..923061dcf2b36 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HttpMessageDiagnostic.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HttpMessageDiagnostic.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -132,6 +134,90 @@ internal static HttpMessageDiagnostic DeserializeHttpMessageDiagnostic(JsonEleme return new HttpMessageDiagnostic(headers ?? new ChangeTrackingList(), body, dataMasking, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Headers), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" headers: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Headers)) + { + if (Headers.Any()) + { + builder.Append(" headers: "); + builder.AppendLine("["); + foreach (var item in Headers) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("BodyBytes", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" body: "); + builder.AppendLine("{"); + builder.Append(" bytes: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Body)) + { + builder.Append(" body: "); + BicepSerializationHelpers.AppendChildObject(builder, Body, options, 2, false, " body: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DataMasking), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" dataMasking: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DataMasking)) + { + builder.Append(" dataMasking: "); + BicepSerializationHelpers.AppendChildObject(builder, DataMasking, options, 2, false, " dataMasking: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -140,6 +226,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(HttpMessageDiagnostic)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HttpMessageDiagnostic.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HttpMessageDiagnostic.cs index d4b7df1b9b5dd..9c2695faacf4a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HttpMessageDiagnostic.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/HttpMessageDiagnostic.cs @@ -65,10 +65,12 @@ internal HttpMessageDiagnostic(IList headers, BodyDiagnosticSettings bod } /// Array of HTTP Headers to log. + [WirePath("headers")] public IList Headers { get; } /// Body logging settings. internal BodyDiagnosticSettings Body { get; set; } /// Number of request body bytes to log. + [WirePath("body.bytes")] public int? BodyBytes { get => Body is null ? default : Body.Bytes; @@ -81,6 +83,7 @@ public int? BodyBytes } /// Data masking settings. + [WirePath("dataMasking")] public DataMasking DataMasking { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/IdentityProviderList.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/IdentityProviderList.Serialization.cs index b02e49435c8e2..6c17860e714be 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/IdentityProviderList.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/IdentityProviderList.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static IdentityProviderList DeserializeIdentityProviderList(JsonElement return new IdentityProviderList(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(IdentityProviderList)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/IssueAttachmentListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/IssueAttachmentListResult.Serialization.cs index d05728508430e..1d79e2a2097b3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/IssueAttachmentListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/IssueAttachmentListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static IssueAttachmentListResult DeserializeIssueAttachmentListResult(J return new IssueAttachmentListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterO { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(IssueAttachmentListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/IssueCommentListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/IssueCommentListResult.Serialization.cs index f3d15a449ad32..78822aacf37f7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/IssueCommentListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/IssueCommentListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static IssueCommentListResult DeserializeIssueCommentListResult(JsonEle return new IssueCommentListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(IssueCommentListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/IssueListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/IssueListResult.Serialization.cs index 33ad5b543b86b..1361eea709e0c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/IssueListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/IssueListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static IssueListResult DeserializeIssueListResult(JsonElement element, return new IssueListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opt { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(IssueListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultContractCreateProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultContractCreateProperties.Serialization.cs index 20fe66ceee8cc..2d41417715feb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultContractCreateProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultContractCreateProperties.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -99,6 +100,67 @@ internal static KeyVaultContractCreateProperties DeserializeKeyVaultContractCrea return new KeyVaultContractCreateProperties(secretIdentifier, identityClientId, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SecretIdentifier), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" secretIdentifier: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SecretIdentifier)) + { + builder.Append(" secretIdentifier: "); + if (SecretIdentifier.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SecretIdentifier}'''"); + } + else + { + builder.AppendLine($"'{SecretIdentifier}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IdentityClientId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" identityClientId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IdentityClientId)) + { + builder.Append(" identityClientId: "); + if (IdentityClientId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{IdentityClientId}'''"); + } + else + { + builder.AppendLine($"'{IdentityClientId}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -107,6 +169,8 @@ BinaryData IPersistableModel.Write(ModelReader { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(KeyVaultContractCreateProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultContractCreateProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultContractCreateProperties.cs index bd15ee0c1cd6b..b19af684d2e28 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultContractCreateProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultContractCreateProperties.cs @@ -62,8 +62,10 @@ internal KeyVaultContractCreateProperties(string secretIdentifier, string identi } /// Key vault secret identifier for fetching secret. Providing a versioned secret will prevent auto-refresh. This requires API Management service to be configured with aka.ms/apimmsi. + [WirePath("secretIdentifier")] public string SecretIdentifier { get; set; } /// Null for SystemAssignedIdentity or Client Id for UserAssignedIdentity , which will be used to access key vault secret. + [WirePath("identityClientId")] public string IdentityClientId { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultContractProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultContractProperties.Serialization.cs index e9a811f6ad36d..3c66b6ccfdea6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultContractProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultContractProperties.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -114,6 +115,82 @@ internal static KeyVaultContractProperties DeserializeKeyVaultContractProperties return new KeyVaultContractProperties(secretIdentifier, identityClientId, serializedAdditionalRawData, lastStatus); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LastStatus)) + { + builder.Append(" lastStatus: "); + BicepSerializationHelpers.AppendChildObject(builder, LastStatus, options, 2, false, " lastStatus: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SecretIdentifier), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" secretIdentifier: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SecretIdentifier)) + { + builder.Append(" secretIdentifier: "); + if (SecretIdentifier.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SecretIdentifier}'''"); + } + else + { + builder.AppendLine($"'{SecretIdentifier}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IdentityClientId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" identityClientId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IdentityClientId)) + { + builder.Append(" identityClientId: "); + if (IdentityClientId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{IdentityClientId}'''"); + } + else + { + builder.AppendLine($"'{IdentityClientId}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -122,6 +199,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriter { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(KeyVaultContractProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultContractProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultContractProperties.cs index e4a14b1e19381..faaa90c43a01c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultContractProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultContractProperties.cs @@ -29,6 +29,7 @@ internal KeyVaultContractProperties(string secretIdentifier, string identityClie } /// Last time sync and refresh status of secret from key vault. + [WirePath("lastStatus")] public KeyVaultLastAccessStatusContractProperties LastStatus { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultLastAccessStatusContractProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultLastAccessStatusContractProperties.Serialization.cs index 3c75b434f6220..e4d45c6d88a8b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultLastAccessStatusContractProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultLastAccessStatusContractProperties.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -114,6 +115,83 @@ internal static KeyVaultLastAccessStatusContractProperties DeserializeKeyVaultLa return new KeyVaultLastAccessStatusContractProperties(code, message, timeStampUtc, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Code), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" code: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Code)) + { + builder.Append(" code: "); + if (Code.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Code}'''"); + } + else + { + builder.AppendLine($"'{Code}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Message), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" message: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Message)) + { + builder.Append(" message: "); + if (Message.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Message}'''"); + } + else + { + builder.AppendLine($"'{Message}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TimeStampUtc), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" timeStampUtc: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TimeStampUtc)) + { + builder.Append(" timeStampUtc: "); + var formattedDateTimeString = TypeFormatters.ToString(TimeStampUtc.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -122,6 +200,8 @@ BinaryData IPersistableModel.Write(M { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(KeyVaultLastAccessStatusContractProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultLastAccessStatusContractProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultLastAccessStatusContractProperties.cs index 8daec5ad14961..2161e3245a805 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultLastAccessStatusContractProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/KeyVaultLastAccessStatusContractProperties.cs @@ -67,13 +67,16 @@ internal KeyVaultLastAccessStatusContractProperties(string code, string message, } /// Last status code for sync and refresh of secret from key vault. + [WirePath("code")] public string Code { get; set; } /// Details of the error else empty. + [WirePath("message")] public string Message { get; set; } /// /// Last time secret was accessed. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("timeStampUtc")] public DateTimeOffset? TimeStampUtc { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/LoggerListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/LoggerListResult.Serialization.cs index 7b4d58c4afe3c..f8ee8e3558d96 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/LoggerListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/LoggerListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static LoggerListResult DeserializeLoggerListResult(JsonElement element return new LoggerListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions op { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(LoggerListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NamedValueListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NamedValueListResult.Serialization.cs index 1328fd375eb55..a2d9cefc57736 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NamedValueListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NamedValueListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static NamedValueListResult DeserializeNamedValueListResult(JsonElement return new NamedValueListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NamedValueListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NamedValueSecretContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NamedValueSecretContract.Serialization.cs index 7a3e0945148ca..ffea031e69721 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NamedValueSecretContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NamedValueSecretContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -88,6 +89,44 @@ internal static NamedValueSecretContract DeserializeNamedValueSecretContract(Jso return new NamedValueSecretContract(value, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + if (Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Value}'''"); + } + else + { + builder.AppendLine($"'{Value}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -96,6 +135,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NamedValueSecretContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NamedValueSecretContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NamedValueSecretContract.cs index ebdbb12f07aec..695f367a00b97 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NamedValueSecretContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NamedValueSecretContract.cs @@ -60,6 +60,7 @@ internal NamedValueSecretContract(string value, IDictionary } /// This is secret value of the NamedValue entity. + [WirePath("value")] public string Value { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NetworkStatusContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NetworkStatusContract.Serialization.cs index 8d9f1bd44fcd0..0c8679d35f4c0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NetworkStatusContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NetworkStatusContract.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -113,6 +115,80 @@ internal static NetworkStatusContract DeserializeNetworkStatusContract(JsonEleme return new NetworkStatusContract(dnsServers, connectivityStatus, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DnsServers), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" dnsServers: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(DnsServers)) + { + if (DnsServers.Any()) + { + builder.Append(" dnsServers: "); + builder.AppendLine("["); + foreach (var item in DnsServers) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ConnectivityStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" connectivityStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ConnectivityStatus)) + { + if (ConnectivityStatus.Any()) + { + builder.Append(" connectivityStatus: "); + builder.AppendLine("["); + foreach (var item in ConnectivityStatus) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " connectivityStatus: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -121,6 +197,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NetworkStatusContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NetworkStatusContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NetworkStatusContract.cs index 29581d8243ef6..d76c31b444f25 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NetworkStatusContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NetworkStatusContract.cs @@ -76,8 +76,10 @@ internal NetworkStatusContract() } /// Gets the list of DNS servers IPV4 addresses. + [WirePath("dnsServers")] public IReadOnlyList DnsServers { get; } /// Gets the list of Connectivity Status to the Resources on which the service depends upon. + [WirePath("connectivityStatus")] public IReadOnlyList ConnectivityStatus { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NetworkStatusContractWithLocation.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NetworkStatusContractWithLocation.Serialization.cs index f33c450a8bc5c..4e0a402dd2e22 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NetworkStatusContractWithLocation.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NetworkStatusContractWithLocation.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -107,6 +108,51 @@ internal static NetworkStatusContractWithLocation DeserializeNetworkStatusContra return new NetworkStatusContractWithLocation(location, networkStatus, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" location: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Location)) + { + builder.Append(" location: "); + builder.AppendLine($"'{Location.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NetworkStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" networkStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NetworkStatus)) + { + builder.Append(" networkStatus: "); + BicepSerializationHelpers.AppendChildObject(builder, NetworkStatus, options, 2, false, " networkStatus: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -115,6 +161,8 @@ BinaryData IPersistableModel.Write(ModelReade { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NetworkStatusContractWithLocation)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NetworkStatusContractWithLocation.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NetworkStatusContractWithLocation.cs index 9b4eaef09241f..a24835a0f2a31 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NetworkStatusContractWithLocation.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NetworkStatusContractWithLocation.cs @@ -63,8 +63,10 @@ internal NetworkStatusContractWithLocation(AzureLocation? location, NetworkStatu } /// Location of service. + [WirePath("location")] public AzureLocation? Location { get; } /// Network status in Location. + [WirePath("networkStatus")] public NetworkStatusContract NetworkStatus { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NotificationListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NotificationListResult.Serialization.cs index ebd6b610d2b57..95bb49c8ca8b2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NotificationListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/NotificationListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static NotificationListResult DeserializeNotificationListResult(JsonEle return new NotificationListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NotificationListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OAuth2AuthenticationSettingsContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OAuth2AuthenticationSettingsContract.Serialization.cs index 6802cbc03a521..4976ce33b62ee 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OAuth2AuthenticationSettingsContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OAuth2AuthenticationSettingsContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -99,6 +100,67 @@ internal static OAuth2AuthenticationSettingsContract DeserializeOAuth2Authentica return new OAuth2AuthenticationSettingsContract(authorizationServerId, scope, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AuthorizationServerId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" authorizationServerId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AuthorizationServerId)) + { + builder.Append(" authorizationServerId: "); + if (AuthorizationServerId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AuthorizationServerId}'''"); + } + else + { + builder.AppendLine($"'{AuthorizationServerId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Scope), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scope: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Scope)) + { + builder.Append(" scope: "); + if (Scope.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Scope}'''"); + } + else + { + builder.AppendLine($"'{Scope}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -107,6 +169,8 @@ BinaryData IPersistableModel.Write(ModelRe { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(OAuth2AuthenticationSettingsContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OAuth2AuthenticationSettingsContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OAuth2AuthenticationSettingsContract.cs index 0b118f6886c26..7f176dc7ac090 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OAuth2AuthenticationSettingsContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OAuth2AuthenticationSettingsContract.cs @@ -62,8 +62,10 @@ internal OAuth2AuthenticationSettingsContract(string authorizationServerId, stri } /// OAuth authorization server identifier. + [WirePath("authorizationServerId")] public string AuthorizationServerId { get; set; } /// operations scope. + [WirePath("scope")] public string Scope { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OAuth2GrantType.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OAuth2GrantType.cs new file mode 100644 index 0000000000000..6dcc4e9c50f58 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OAuth2GrantType.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.ApiManagement.Models +{ + /// OAuth2 grant type options. + public readonly partial struct OAuth2GrantType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public OAuth2GrantType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AuthorizationCodeValue = "AuthorizationCode"; + private const string ClientCredentialsValue = "ClientCredentials"; + + /// Authorization Code grant. + public static OAuth2GrantType AuthorizationCode { get; } = new OAuth2GrantType(AuthorizationCodeValue); + /// Client Credential grant. + public static OAuth2GrantType ClientCredentials { get; } = new OAuth2GrantType(ClientCredentialsValue); + /// Determines if two values are the same. + public static bool operator ==(OAuth2GrantType left, OAuth2GrantType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OAuth2GrantType left, OAuth2GrantType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator OAuth2GrantType(string value) => new OAuth2GrantType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is OAuth2GrantType other && Equals(other); + /// + public bool Equals(OAuth2GrantType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OpenIdAuthenticationSettingsContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OpenIdAuthenticationSettingsContract.Serialization.cs index 12e3efcf32103..6bf14fb3e7696 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OpenIdAuthenticationSettingsContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OpenIdAuthenticationSettingsContract.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -113,6 +115,67 @@ internal static OpenIdAuthenticationSettingsContract DeserializeOpenIdAuthentica return new OpenIdAuthenticationSettingsContract(openidProviderId, bearerTokenSendingMethods ?? new ChangeTrackingList(), serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OpenIdProviderId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" openidProviderId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OpenIdProviderId)) + { + builder.Append(" openidProviderId: "); + if (OpenIdProviderId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{OpenIdProviderId}'''"); + } + else + { + builder.AppendLine($"'{OpenIdProviderId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(BearerTokenSendingMethods), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" bearerTokenSendingMethods: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(BearerTokenSendingMethods)) + { + if (BearerTokenSendingMethods.Any()) + { + builder.Append(" bearerTokenSendingMethods: "); + builder.AppendLine("["); + foreach (var item in BearerTokenSendingMethods) + { + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -121,6 +184,8 @@ BinaryData IPersistableModel.Write(ModelRe { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(OpenIdAuthenticationSettingsContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OpenIdAuthenticationSettingsContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OpenIdAuthenticationSettingsContract.cs index 563a826171164..2d03e0289d1a5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OpenIdAuthenticationSettingsContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OpenIdAuthenticationSettingsContract.cs @@ -63,8 +63,10 @@ internal OpenIdAuthenticationSettingsContract(string openIdProviderId, IList OAuth authorization server identifier. + [WirePath("openidProviderId")] public string OpenIdProviderId { get; set; } /// How to send token to the server. + [WirePath("bearerTokenSendingMethods")] public IList BearerTokenSendingMethods { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OpenIdConnectProviderListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OpenIdConnectProviderListResult.Serialization.cs index 56234355c5fa2..c2ba475cb2076 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OpenIdConnectProviderListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OpenIdConnectProviderListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static OpenIdConnectProviderListResult DeserializeOpenIdConnectProvider return new OpenIdConnectProviderListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderW { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(OpenIdConnectProviderListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OperationListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OperationListResult.Serialization.cs index e07174428d420..1d40f54d63f8a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OperationListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OperationListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static OperationListResult DeserializeOperationListResult(JsonElement e return new OperationListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(OperationListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OperationResultLogItemContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OperationResultLogItemContract.Serialization.cs index f75c2ccb5ee05..1737b1dc3c6f5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OperationResultLogItemContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OperationResultLogItemContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -110,6 +111,90 @@ internal static OperationResultLogItemContract DeserializeOperationResultLogItem return new OperationResultLogItemContract(objectType, action, objectKey, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ObjectType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" objectType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ObjectType)) + { + builder.Append(" objectType: "); + if (ObjectType.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ObjectType}'''"); + } + else + { + builder.AppendLine($"'{ObjectType}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Action), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" action: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Action)) + { + builder.Append(" action: "); + if (Action.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Action}'''"); + } + else + { + builder.AppendLine($"'{Action}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ObjectKey), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" objectKey: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ObjectKey)) + { + builder.Append(" objectKey: "); + if (ObjectKey.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ObjectKey}'''"); + } + else + { + builder.AppendLine($"'{ObjectKey}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -118,6 +203,8 @@ BinaryData IPersistableModel.Write(ModelReaderWr { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(OperationResultLogItemContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OperationResultLogItemContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OperationResultLogItemContract.cs index 11788e514b027..7b8ed74bd07d6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OperationResultLogItemContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OperationResultLogItemContract.cs @@ -64,10 +64,13 @@ internal OperationResultLogItemContract(string objectType, string action, string } /// The type of entity contract. + [WirePath("objectType")] public string ObjectType { get; } /// Action like create/update/delete. + [WirePath("action")] public string Action { get; } /// Identifier of the entity being created/updated/deleted. + [WirePath("objectKey")] public string ObjectKey { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpoint.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpoint.Serialization.cs index f6e7925eae4a7..a932a2938783b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpoint.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpoint.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -113,6 +115,67 @@ internal static OutboundEnvironmentEndpoint DeserializeOutboundEnvironmentEndpoi return new OutboundEnvironmentEndpoint(category, endpoints ?? new ChangeTrackingList(), serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Category), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" category: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Category)) + { + builder.Append(" category: "); + if (Category.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Category}'''"); + } + else + { + builder.AppendLine($"'{Category}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Endpoints), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endpoints: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Endpoints)) + { + if (Endpoints.Any()) + { + builder.Append(" endpoints: "); + builder.AppendLine("["); + foreach (var item in Endpoints) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " endpoints: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -121,6 +184,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrite { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(OutboundEnvironmentEndpoint)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpoint.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpoint.cs index a059001382d85..fd513b755de55 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpoint.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpoint.cs @@ -63,8 +63,10 @@ internal OutboundEnvironmentEndpoint(string category, IReadOnlyList The type of service accessed by the Api Management Service, e.g., Azure Storage, Azure SQL Database, and Azure Active Directory. + [WirePath("category")] public string Category { get; } /// The endpoints that the Api Management Service reaches the service at. + [WirePath("endpoints")] public IReadOnlyList Endpoints { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpointList.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpointList.Serialization.cs index 281e1c6159b21..fffa8e0b94d7b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpointList.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpointList.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -106,6 +108,67 @@ internal static OutboundEnvironmentEndpointList DeserializeOutboundEnvironmentEn return new OutboundEnvironmentEndpointList(value, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -114,6 +177,8 @@ BinaryData IPersistableModel.Write(ModelReaderW { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(OutboundEnvironmentEndpointList)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpointList.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpointList.cs index 6077e3bb9a689..a59a549df328d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpointList.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/OutboundEnvironmentEndpointList.cs @@ -73,8 +73,10 @@ internal OutboundEnvironmentEndpointList() } /// Collection of resources. + [WirePath("value")] public IReadOnlyList Value { get; } /// Link to next page of resources. + [WirePath("nextLink")] public string NextLink { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ParameterContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ParameterContract.Serialization.cs index 75ad448261c39..742157797113a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ParameterContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ParameterContract.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -213,6 +215,235 @@ internal static ParameterContract DeserializeParameterContract(JsonElement eleme serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ParameterContractType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ParameterContractType)) + { + builder.Append(" type: "); + if (ParameterContractType.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ParameterContractType}'''"); + } + else + { + builder.AppendLine($"'{ParameterContractType}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DefaultValue), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" defaultValue: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DefaultValue)) + { + builder.Append(" defaultValue: "); + if (DefaultValue.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DefaultValue}'''"); + } + else + { + builder.AppendLine($"'{DefaultValue}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsRequired), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" required: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsRequired)) + { + builder.Append(" required: "); + var boolValue = IsRequired.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Values), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" values: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Values)) + { + if (Values.Any()) + { + builder.Append(" values: "); + builder.AppendLine("["); + foreach (var item in Values) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SchemaId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" schemaId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SchemaId)) + { + builder.Append(" schemaId: "); + if (SchemaId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SchemaId}'''"); + } + else + { + builder.AppendLine($"'{SchemaId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TypeName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" typeName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TypeName)) + { + builder.Append(" typeName: "); + if (TypeName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TypeName}'''"); + } + else + { + builder.AppendLine($"'{TypeName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Examples), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" examples: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Examples)) + { + if (Examples.Any()) + { + builder.Append(" examples: "); + builder.AppendLine("{"); + foreach (var item in Examples) + { + builder.Append($" '{item.Key}': "); + BicepSerializationHelpers.AppendChildObject(builder, item.Value, options, 4, false, " examples: "); + } + builder.AppendLine(" }"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -221,6 +452,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions o { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ParameterContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ParameterContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ParameterContract.cs index 2cae424bd96e5..2fc3772bcbd93 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ParameterContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ParameterContract.cs @@ -91,22 +91,31 @@ internal ParameterContract() } /// Parameter name. + [WirePath("name")] public string Name { get; set; } /// Parameter description. + [WirePath("description")] public string Description { get; set; } /// Parameter type. + [WirePath("type")] public string ParameterContractType { get; set; } /// Default parameter value. + [WirePath("defaultValue")] public string DefaultValue { get; set; } /// Specifies whether parameter is required or not. + [WirePath("required")] public bool? IsRequired { get; set; } /// Parameter values. + [WirePath("values")] public IList Values { get; } /// Schema identifier. + [WirePath("schemaId")] public string SchemaId { get; set; } /// Type name defined by the schema. + [WirePath("typeName")] public string TypeName { get; set; } /// Exampled defined for the parameter. + [WirePath("examples")] public IDictionary Examples { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ParameterExampleContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ParameterExampleContract.Serialization.cs index 2a460a5f8baf6..b202ede10b486 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ParameterExampleContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ParameterExampleContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -132,6 +133,105 @@ internal static ParameterExampleContract DeserializeParameterExampleContract(Jso return new ParameterExampleContract(summary, description, value, externalValue, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Summary), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" summary: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Summary)) + { + builder.Append(" summary: "); + if (Summary.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Summary}'''"); + } + else + { + builder.AppendLine($"'{Summary}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + builder.AppendLine($"'{Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExternalValue), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" externalValue: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ExternalValue)) + { + builder.Append(" externalValue: "); + if (ExternalValue.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ExternalValue}'''"); + } + else + { + builder.AppendLine($"'{ExternalValue}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -140,6 +240,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ParameterExampleContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ParameterExampleContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ParameterExampleContract.cs index 4b78aaea0b875..c7313c0bf1b3d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ParameterExampleContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ParameterExampleContract.cs @@ -66,8 +66,10 @@ internal ParameterExampleContract(string summary, string description, BinaryData } /// Short description for the example. + [WirePath("summary")] public string Summary { get; set; } /// Long description for the example. + [WirePath("description")] public string Description { get; set; } /// /// Example value. May be a primitive value, or an object. @@ -99,8 +101,10 @@ internal ParameterExampleContract(string summary, string description, BinaryData /// /// /// + [WirePath("value")] public BinaryData Value { get; set; } /// A URL that points to the literal example. + [WirePath("externalValue")] public string ExternalValue { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PipelineDiagnosticSettings.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PipelineDiagnosticSettings.Serialization.cs index 24fc1ee24ea30..8707332af6178 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PipelineDiagnosticSettings.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PipelineDiagnosticSettings.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -107,6 +108,51 @@ internal static PipelineDiagnosticSettings DeserializePipelineDiagnosticSettings return new PipelineDiagnosticSettings(request, response, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Request), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" request: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Request)) + { + builder.Append(" request: "); + BicepSerializationHelpers.AppendChildObject(builder, Request, options, 2, false, " request: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Response), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" response: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Response)) + { + builder.Append(" response: "); + BicepSerializationHelpers.AppendChildObject(builder, Response, options, 2, false, " response: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -115,6 +161,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriter { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(PipelineDiagnosticSettings)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PipelineDiagnosticSettings.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PipelineDiagnosticSettings.cs index 71a2937d15422..4e7fbcfa3581f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PipelineDiagnosticSettings.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PipelineDiagnosticSettings.cs @@ -62,8 +62,10 @@ internal PipelineDiagnosticSettings(HttpMessageDiagnostic request, HttpMessageDi } /// Diagnostic settings for request. + [WirePath("request")] public HttpMessageDiagnostic Request { get; set; } /// Diagnostic settings for response. + [WirePath("response")] public HttpMessageDiagnostic Response { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyContentFormat.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyContentFormat.cs index 1daa753704143..900d91aaba95d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyContentFormat.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyContentFormat.cs @@ -29,11 +29,11 @@ public PolicyContentFormat(string value) /// The contents are inline and Content type is an XML document. public static PolicyContentFormat Xml { get; } = new PolicyContentFormat(XmlValue); - /// The policy XML document is hosted on a http endpoint accessible from the API Management service. + /// The policy XML document is hosted on a HTTP endpoint accessible from the API Management service. public static PolicyContentFormat XmlLink { get; } = new PolicyContentFormat(XmlLinkValue); /// The contents are inline and Content type is a non XML encoded policy document. public static PolicyContentFormat RawXml { get; } = new PolicyContentFormat(RawXmlValue); - /// The policy document is not Xml encoded and is hosted on a http endpoint accessible from the API Management service. + /// The policy document is not XML encoded and is hosted on a HTTP endpoint accessible from the API Management service. public static PolicyContentFormat RawXmlLink { get; } = new PolicyContentFormat(RawXmlLinkValue); /// Determines if two values are the same. public static bool operator ==(PolicyContentFormat left, PolicyContentFormat right) => left.Equals(right); diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyDescriptionContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyDescriptionContractData.Serialization.cs index fe176a169803b..047d8fd447c73 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyDescriptionContractData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyDescriptionContractData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -174,6 +175,115 @@ internal static PolicyDescriptionContractData DeserializePolicyDescriptionContra serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Scope), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scope: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Scope)) + { + builder.Append(" scope: "); + builder.AppendLine($"'{Scope.Value.ToString()}'"); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -182,6 +292,8 @@ BinaryData IPersistableModel.Write(ModelReaderWri { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(PolicyDescriptionContractData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyDescriptionContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyDescriptionContractData.cs index c6ad653b173af..cc186c392f6dd 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyDescriptionContractData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyDescriptionContractData.cs @@ -68,8 +68,10 @@ internal PolicyDescriptionContractData(ResourceIdentifier id, string name, Resou } /// Policy description. + [WirePath("properties.description")] public string Description { get; } /// Binary OR value of the Snippet scope. + [WirePath("properties.scope")] public long? Scope { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyDescriptionListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyDescriptionListResult.Serialization.cs index 28c4ebd1b3173..55630ec24994c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyDescriptionListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyDescriptionListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -117,6 +119,59 @@ internal static PolicyDescriptionListResult DeserializePolicyDescriptionListResu return new PolicyDescriptionListResult(value ?? new ChangeTrackingList(), count, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -125,6 +180,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrite { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(PolicyDescriptionListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyDescriptionListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyDescriptionListResult.cs index d9035ad523503..6ff96e0fe9eff 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyDescriptionListResult.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyDescriptionListResult.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ApiManagement.Models { - /// Descriptions of APIM policies. + /// Descriptions of API Management policies. internal partial class PolicyDescriptionListResult { /// @@ -52,7 +52,7 @@ internal PolicyDescriptionListResult() } /// Initializes a new instance of . - /// Descriptions of APIM policies. + /// Descriptions of API Management policies. /// Total record count number. /// Keeps track of any properties unknown to the library. internal PolicyDescriptionListResult(IReadOnlyList value, long? count, IDictionary serializedAdditionalRawData) @@ -62,9 +62,11 @@ internal PolicyDescriptionListResult(IReadOnlyList Descriptions of APIM policies. + /// Descriptions of API Management policies. + [WirePath("value")] public IReadOnlyList Value { get; } /// Total record count number. + [WirePath("count")] public long? Count { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyFragmentContentFormat.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyFragmentContentFormat.cs new file mode 100644 index 0000000000000..a28f8c390488e --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyFragmentContentFormat.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.ApiManagement.Models +{ + /// The PolicyFragmentContentFormat. + public readonly partial struct PolicyFragmentContentFormat : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PolicyFragmentContentFormat(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string XmlValue = "xml"; + private const string RawxmlValue = "rawxml"; + + /// The contents are inline and Content type is an XML document. + public static PolicyFragmentContentFormat Xml { get; } = new PolicyFragmentContentFormat(XmlValue); + /// The contents are inline and Content type is a non XML encoded policy document. + public static PolicyFragmentContentFormat Rawxml { get; } = new PolicyFragmentContentFormat(RawxmlValue); + /// Determines if two values are the same. + public static bool operator ==(PolicyFragmentContentFormat left, PolicyFragmentContentFormat right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PolicyFragmentContentFormat left, PolicyFragmentContentFormat right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator PolicyFragmentContentFormat(string value) => new PolicyFragmentContentFormat(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PolicyFragmentContentFormat other && Equals(other); + /// + public bool Equals(PolicyFragmentContentFormat other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyFragmentListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyFragmentListResult.Serialization.cs new file mode 100644 index 0000000000000..440715eb55d2e --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyFragmentListResult.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + internal partial class PolicyFragmentListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PolicyFragmentListResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Count)) + { + writer.WritePropertyName("count"u8); + writer.WriteNumberValue(Count.Value); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + PolicyFragmentListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PolicyFragmentListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePolicyFragmentListResult(document.RootElement, options); + } + + internal static PolicyFragmentListResult DeserializePolicyFragmentListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + long? count = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(PolicyFragmentContractData.DeserializePolicyFragmentContractData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("count"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + count = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PolicyFragmentListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(PolicyFragmentListResult)} does not support writing '{options.Format}' format."); + } + } + + PolicyFragmentListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializePolicyFragmentListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PolicyFragmentListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyFragmentListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyFragmentListResult.cs new file mode 100644 index 0000000000000..1b618ab2d994b --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyFragmentListResult.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// The response of the get policy fragments operation. + internal partial class PolicyFragmentListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal PolicyFragmentListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Policy fragment contract value. + /// Total record count number. + /// Next page link if any. + /// Keeps track of any properties unknown to the library. + internal PolicyFragmentListResult(IReadOnlyList value, long? count, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + Count = count; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Policy fragment contract value. + [WirePath("value")] + public IReadOnlyList Value { get; } + /// Total record count number. + [WirePath("count")] + public long? Count { get; } + /// Next page link if any. + [WirePath("nextLink")] + public string NextLink { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyListResult.Serialization.cs index 630ec212f4e2f..6b0b8d9c2069a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static PolicyListResult DeserializePolicyListResult(JsonElement element return new PolicyListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions op { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(PolicyListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyListResult.cs index 577317433cb96..01d698f8dbf9e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyListResult.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyListResult.cs @@ -65,10 +65,13 @@ internal PolicyListResult(IReadOnlyList value, long? count, } /// Policy Contract value. + [WirePath("value")] public IReadOnlyList Value { get; } /// Total record count number. + [WirePath("count")] public long? Count { get; } /// Next page link if any. + [WirePath("nextLink")] public string NextLink { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCorsProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCorsProperties.Serialization.cs new file mode 100644 index 0000000000000..25b55f34af37f --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCorsProperties.Serialization.cs @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + internal partial class PortalConfigCorsProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PortalConfigCorsProperties)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(AllowedOrigins)) + { + writer.WritePropertyName("allowedOrigins"u8); + writer.WriteStartArray(); + foreach (var item in AllowedOrigins) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + PortalConfigCorsProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PortalConfigCorsProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePortalConfigCorsProperties(document.RootElement, options); + } + + internal static PortalConfigCorsProperties DeserializePortalConfigCorsProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList allowedOrigins = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("allowedOrigins"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + allowedOrigins = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PortalConfigCorsProperties(allowedOrigins ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AllowedOrigins), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" allowedOrigins: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(AllowedOrigins)) + { + if (AllowedOrigins.Any()) + { + builder.Append(" allowedOrigins: "); + builder.AppendLine("["); + foreach (var item in AllowedOrigins) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(PortalConfigCorsProperties)} does not support writing '{options.Format}' format."); + } + } + + PortalConfigCorsProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializePortalConfigCorsProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PortalConfigCorsProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCorsProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCorsProperties.cs new file mode 100644 index 0000000000000..197e65ae89a53 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCorsProperties.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// The developer portal Cross-Origin Resource Sharing (CORS) settings. + internal partial class PortalConfigCorsProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public PortalConfigCorsProperties() + { + AllowedOrigins = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Allowed origins, e.g. `https://trusted.com`. + /// Keeps track of any properties unknown to the library. + internal PortalConfigCorsProperties(IList allowedOrigins, IDictionary serializedAdditionalRawData) + { + AllowedOrigins = allowedOrigins; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Allowed origins, e.g. `https://trusted.com`. + [WirePath("allowedOrigins")] + public IList AllowedOrigins { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCspProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCspProperties.Serialization.cs new file mode 100644 index 0000000000000..2893259120783 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCspProperties.Serialization.cs @@ -0,0 +1,286 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + public partial class PortalConfigCspProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PortalConfigCspProperties)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.Value.ToString()); + } + if (Optional.IsCollectionDefined(ReportUri)) + { + writer.WritePropertyName("reportUri"u8); + writer.WriteStartArray(); + foreach (var item in ReportUri) + { + if (item == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item.AbsoluteUri); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(AllowedSources)) + { + writer.WritePropertyName("allowedSources"u8); + writer.WriteStartArray(); + foreach (var item in AllowedSources) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + PortalConfigCspProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PortalConfigCspProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePortalConfigCspProperties(document.RootElement, options); + } + + internal static PortalConfigCspProperties DeserializePortalConfigCspProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PortalSettingsCspMode? mode = default; + IList reportUri = default; + IList allowedSources = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mode = new PortalSettingsCspMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("reportUri"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(new Uri(item.GetString())); + } + } + reportUri = array; + continue; + } + if (property.NameEquals("allowedSources"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + allowedSources = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PortalConfigCspProperties(mode, reportUri ?? new ChangeTrackingList(), allowedSources ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Mode), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" mode: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Mode)) + { + builder.Append(" mode: "); + builder.AppendLine($"'{Mode.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ReportUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" reportUri: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ReportUri)) + { + if (ReportUri.Any()) + { + builder.Append(" reportUri: "); + builder.AppendLine("["); + foreach (var item in ReportUri) + { + if (item == null) + { + builder.Append("null"); + continue; + } + builder.AppendLine($" '{item.AbsoluteUri}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AllowedSources), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" allowedSources: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(AllowedSources)) + { + if (AllowedSources.Any()) + { + builder.Append(" allowedSources: "); + builder.AppendLine("["); + foreach (var item in AllowedSources) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(PortalConfigCspProperties)} does not support writing '{options.Format}' format."); + } + } + + PortalConfigCspProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializePortalConfigCspProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PortalConfigCspProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCspProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCspProperties.cs new file mode 100644 index 0000000000000..7f3e1f26237f6 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigCspProperties.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// The developer portal Content Security Policy (CSP) settings. + public partial class PortalConfigCspProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public PortalConfigCspProperties() + { + ReportUri = new ChangeTrackingList(); + AllowedSources = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The mode of the developer portal Content Security Policy (CSP). + /// The URLs used by the browser to report CSP violations. + /// Allowed sources, e.g. `*.trusted.com`, `trusted.com`, `https://`. + /// Keeps track of any properties unknown to the library. + internal PortalConfigCspProperties(PortalSettingsCspMode? mode, IList reportUri, IList allowedSources, IDictionary serializedAdditionalRawData) + { + Mode = mode; + ReportUri = reportUri; + AllowedSources = allowedSources; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The mode of the developer portal Content Security Policy (CSP). + [WirePath("mode")] + public PortalSettingsCspMode? Mode { get; set; } + /// The URLs used by the browser to report CSP violations. + [WirePath("reportUri")] + public IList ReportUri { get; } + /// Allowed sources, e.g. `*.trusted.com`, `trusted.com`, `https://`. + [WirePath("allowedSources")] + public IList AllowedSources { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigDelegationProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigDelegationProperties.Serialization.cs new file mode 100644 index 0000000000000..2a4b09f551d57 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigDelegationProperties.Serialization.cs @@ -0,0 +1,255 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + public partial class PortalConfigDelegationProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PortalConfigDelegationProperties)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(DelegateRegistration)) + { + writer.WritePropertyName("delegateRegistration"u8); + writer.WriteBooleanValue(DelegateRegistration.Value); + } + if (Optional.IsDefined(DelegateSubscription)) + { + writer.WritePropertyName("delegateSubscription"u8); + writer.WriteBooleanValue(DelegateSubscription.Value); + } + if (Optional.IsDefined(DelegationUri)) + { + writer.WritePropertyName("delegationUrl"u8); + writer.WriteStringValue(DelegationUri.AbsoluteUri); + } + if (Optional.IsDefined(ValidationKey)) + { + writer.WritePropertyName("validationKey"u8); + writer.WriteStringValue(ValidationKey); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + PortalConfigDelegationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PortalConfigDelegationProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePortalConfigDelegationProperties(document.RootElement, options); + } + + internal static PortalConfigDelegationProperties DeserializePortalConfigDelegationProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? delegateRegistration = default; + bool? delegateSubscription = default; + Uri delegationUri = default; + string validationKey = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("delegateRegistration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + delegateRegistration = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("delegateSubscription"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + delegateSubscription = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("delegationUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + delegationUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("validationKey"u8)) + { + validationKey = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PortalConfigDelegationProperties(delegateRegistration, delegateSubscription, delegationUri, validationKey, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DelegateRegistration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" delegateRegistration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DelegateRegistration)) + { + builder.Append(" delegateRegistration: "); + var boolValue = DelegateRegistration.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DelegateSubscription), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" delegateSubscription: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DelegateSubscription)) + { + builder.Append(" delegateSubscription: "); + var boolValue = DelegateSubscription.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DelegationUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" delegationUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DelegationUri)) + { + builder.Append(" delegationUrl: "); + builder.AppendLine($"'{DelegationUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ValidationKey), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" validationKey: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ValidationKey)) + { + builder.Append(" validationKey: "); + if (ValidationKey.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ValidationKey}'''"); + } + else + { + builder.AppendLine($"'{ValidationKey}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(PortalConfigDelegationProperties)} does not support writing '{options.Format}' format."); + } + } + + PortalConfigDelegationProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializePortalConfigDelegationProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PortalConfigDelegationProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigDelegationProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigDelegationProperties.cs new file mode 100644 index 0000000000000..bbdb4f02702fd --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigDelegationProperties.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// The PortalConfigDelegationProperties. + public partial class PortalConfigDelegationProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public PortalConfigDelegationProperties() + { + } + + /// Initializes a new instance of . + /// Enable or disable delegation for user registration. + /// Enable or disable delegation for product subscriptions. + /// A delegation endpoint URL. + /// A base64-encoded validation key to ensure requests originate from Azure API Management service. + /// Keeps track of any properties unknown to the library. + internal PortalConfigDelegationProperties(bool? delegateRegistration, bool? delegateSubscription, Uri delegationUri, string validationKey, IDictionary serializedAdditionalRawData) + { + DelegateRegistration = delegateRegistration; + DelegateSubscription = delegateSubscription; + DelegationUri = delegationUri; + ValidationKey = validationKey; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Enable or disable delegation for user registration. + [WirePath("delegateRegistration")] + public bool? DelegateRegistration { get; set; } + /// Enable or disable delegation for product subscriptions. + [WirePath("delegateSubscription")] + public bool? DelegateSubscription { get; set; } + /// A delegation endpoint URL. + [WirePath("delegationUrl")] + public Uri DelegationUri { get; set; } + /// A base64-encoded validation key to ensure requests originate from Azure API Management service. + [WirePath("validationKey")] + public string ValidationKey { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigListResult.Serialization.cs new file mode 100644 index 0000000000000..2911a49abe37a --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigListResult.Serialization.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + internal partial class PortalConfigListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PortalConfigListResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + PortalConfigListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PortalConfigListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePortalConfigListResult(document.RootElement, options); + } + + internal static PortalConfigListResult DeserializePortalConfigListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(PortalConfigContractData.DeserializePortalConfigContractData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PortalConfigListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(PortalConfigListResult)} does not support writing '{options.Format}' format."); + } + } + + PortalConfigListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializePortalConfigListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PortalConfigListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigListResult.cs new file mode 100644 index 0000000000000..abaec4ba091ea --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigListResult.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// The collection of the developer portal configurations. + internal partial class PortalConfigListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal PortalConfigListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The developer portal configurations. + /// Next page link if any. + /// Keeps track of any properties unknown to the library. + internal PortalConfigListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The developer portal configurations. + [WirePath("value")] + public IReadOnlyList Value { get; } + /// Next page link if any. + [WirePath("nextLink")] + public string NextLink { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignin.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignin.Serialization.cs new file mode 100644 index 0000000000000..e27a9e927e73f --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignin.Serialization.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + internal partial class PortalConfigPropertiesSignin : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PortalConfigPropertiesSignin)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Require)) + { + writer.WritePropertyName("require"u8); + writer.WriteBooleanValue(Require.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + PortalConfigPropertiesSignin IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PortalConfigPropertiesSignin)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePortalConfigPropertiesSignin(document.RootElement, options); + } + + internal static PortalConfigPropertiesSignin DeserializePortalConfigPropertiesSignin(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? require = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("require"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + require = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PortalConfigPropertiesSignin(require, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Require), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" require: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Require)) + { + builder.Append(" require: "); + var boolValue = Require.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(PortalConfigPropertiesSignin)} does not support writing '{options.Format}' format."); + } + } + + PortalConfigPropertiesSignin IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializePortalConfigPropertiesSignin(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PortalConfigPropertiesSignin)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignin.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignin.cs new file mode 100644 index 0000000000000..6d662d62f1f08 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignin.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// The PortalConfigPropertiesSignin. + internal partial class PortalConfigPropertiesSignin + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public PortalConfigPropertiesSignin() + { + } + + /// Initializes a new instance of . + /// Redirect anonymous users to the sign-in page. + /// Keeps track of any properties unknown to the library. + internal PortalConfigPropertiesSignin(bool? require, IDictionary serializedAdditionalRawData) + { + Require = require; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Redirect anonymous users to the sign-in page. + [WirePath("require")] + public bool? Require { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignup.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignup.Serialization.cs new file mode 100644 index 0000000000000..5e46a19d28c5f --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignup.Serialization.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + internal partial class PortalConfigPropertiesSignup : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PortalConfigPropertiesSignup)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(TermsOfService)) + { + writer.WritePropertyName("termsOfService"u8); + writer.WriteObjectValue(TermsOfService, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + PortalConfigPropertiesSignup IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PortalConfigPropertiesSignup)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePortalConfigPropertiesSignup(document.RootElement, options); + } + + internal static PortalConfigPropertiesSignup DeserializePortalConfigPropertiesSignup(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PortalConfigTermsOfServiceProperties termsOfService = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("termsOfService"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + termsOfService = PortalConfigTermsOfServiceProperties.DeserializePortalConfigTermsOfServiceProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PortalConfigPropertiesSignup(termsOfService, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TermsOfService), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" termsOfService: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TermsOfService)) + { + builder.Append(" termsOfService: "); + BicepSerializationHelpers.AppendChildObject(builder, TermsOfService, options, 2, false, " termsOfService: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(PortalConfigPropertiesSignup)} does not support writing '{options.Format}' format."); + } + } + + PortalConfigPropertiesSignup IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializePortalConfigPropertiesSignup(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PortalConfigPropertiesSignup)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignup.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignup.cs new file mode 100644 index 0000000000000..4436e55561bc6 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigPropertiesSignup.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// The PortalConfigPropertiesSignup. + internal partial class PortalConfigPropertiesSignup + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public PortalConfigPropertiesSignup() + { + } + + /// Initializes a new instance of . + /// Terms of service settings. + /// Keeps track of any properties unknown to the library. + internal PortalConfigPropertiesSignup(PortalConfigTermsOfServiceProperties termsOfService, IDictionary serializedAdditionalRawData) + { + TermsOfService = termsOfService; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Terms of service settings. + [WirePath("termsOfService")] + public PortalConfigTermsOfServiceProperties TermsOfService { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigTermsOfServiceProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigTermsOfServiceProperties.Serialization.cs new file mode 100644 index 0000000000000..31a445bdaa4bd --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigTermsOfServiceProperties.Serialization.cs @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + public partial class PortalConfigTermsOfServiceProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PortalConfigTermsOfServiceProperties)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Text)) + { + writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); + } + if (Optional.IsDefined(RequireConsent)) + { + writer.WritePropertyName("requireConsent"u8); + writer.WriteBooleanValue(RequireConsent.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + PortalConfigTermsOfServiceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PortalConfigTermsOfServiceProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePortalConfigTermsOfServiceProperties(document.RootElement, options); + } + + internal static PortalConfigTermsOfServiceProperties DeserializePortalConfigTermsOfServiceProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string text = default; + bool? requireConsent = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("text"u8)) + { + text = property.Value.GetString(); + continue; + } + if (property.NameEquals("requireConsent"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + requireConsent = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PortalConfigTermsOfServiceProperties(text, requireConsent, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Text), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" text: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Text)) + { + builder.Append(" text: "); + if (Text.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Text}'''"); + } + else + { + builder.AppendLine($"'{Text}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RequireConsent), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" requireConsent: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(RequireConsent)) + { + builder.Append(" requireConsent: "); + var boolValue = RequireConsent.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(PortalConfigTermsOfServiceProperties)} does not support writing '{options.Format}' format."); + } + } + + PortalConfigTermsOfServiceProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializePortalConfigTermsOfServiceProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PortalConfigTermsOfServiceProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigTermsOfServiceProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigTermsOfServiceProperties.cs new file mode 100644 index 0000000000000..be26a06476b9f --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalConfigTermsOfServiceProperties.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// Terms of service contract properties. + public partial class PortalConfigTermsOfServiceProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public PortalConfigTermsOfServiceProperties() + { + } + + /// Initializes a new instance of . + /// A terms of service text. + /// Ask user for consent to the terms of service. + /// Keeps track of any properties unknown to the library. + internal PortalConfigTermsOfServiceProperties(string text, bool? requireConsent, IDictionary serializedAdditionalRawData) + { + Text = text; + RequireConsent = requireConsent; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// A terms of service text. + [WirePath("text")] + public string Text { get; set; } + /// Ask user for consent to the terms of service. + [WirePath("requireConsent")] + public bool? RequireConsent { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalRevisionListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalRevisionListResult.Serialization.cs index 0f86532292845..50d833ca7b751 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalRevisionListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalRevisionListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -113,6 +115,67 @@ internal static PortalRevisionListResult DeserializePortalRevisionListResult(Jso return new PortalRevisionListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -121,6 +184,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(PortalRevisionListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingValidationKeyContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingValidationKeyContract.Serialization.cs index 54a5fef49d2d6..f13db85480e86 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingValidationKeyContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingValidationKeyContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -88,6 +89,44 @@ internal static PortalSettingValidationKeyContract DeserializePortalSettingValid return new PortalSettingValidationKeyContract(validationKey, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ValidationKey), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" validationKey: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ValidationKey)) + { + builder.Append(" validationKey: "); + if (ValidationKey.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ValidationKey}'''"); + } + else + { + builder.AppendLine($"'{ValidationKey}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -96,6 +135,8 @@ BinaryData IPersistableModel.Write(ModelRead { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(PortalSettingValidationKeyContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingValidationKeyContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingValidationKeyContract.cs index 0000a797eae87..473246b9a03c9 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingValidationKeyContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingValidationKeyContract.cs @@ -60,6 +60,7 @@ internal PortalSettingValidationKeyContract(string validationKey, IDictionary This is secret value of the validation key in portal settings. + [WirePath("validationKey")] public string ValidationKey { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsContractData.Serialization.cs index afbbe686f8d95..83b23787667d8 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsContractData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsContractData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -238,6 +239,186 @@ internal static PortalSettingsContractData DeserializePortalSettingsContractData serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Uri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" url: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Uri)) + { + builder.Append(" url: "); + builder.AppendLine($"'{Uri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ValidationKey), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" validationKey: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ValidationKey)) + { + builder.Append(" validationKey: "); + if (ValidationKey.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ValidationKey}'''"); + } + else + { + builder.AppendLine($"'{ValidationKey}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("IsSubscriptionDelegationEnabled", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptions: "); + builder.AppendLine("{"); + builder.AppendLine(" subscriptions: {"); + builder.Append(" enabled: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(IsSubscriptions)) + { + builder.Append(" subscriptions: "); + BicepSerializationHelpers.AppendChildObject(builder, IsSubscriptions, options, 4, false, " subscriptions: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("IsUserRegistrationDelegationEnabled", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" userRegistration: "); + builder.AppendLine("{"); + builder.AppendLine(" userRegistration: {"); + builder.Append(" enabled: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(IsUserRegistration)) + { + builder.Append(" userRegistration: "); + BicepSerializationHelpers.AppendChildObject(builder, IsUserRegistration, options, 4, false, " userRegistration: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsRedirectEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsRedirectEnabled)) + { + builder.Append(" enabled: "); + var boolValue = IsRedirectEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TermsOfService), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" termsOfService: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TermsOfService)) + { + builder.Append(" termsOfService: "); + BicepSerializationHelpers.AppendChildObject(builder, TermsOfService, options, 4, false, " termsOfService: "); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -246,6 +427,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriter { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(PortalSettingsContractData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsContractData.cs index 2b13cd0166efc..016f69789858b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsContractData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsContractData.cs @@ -76,12 +76,15 @@ internal PortalSettingsContractData(ResourceIdentifier id, string name, Resource } /// A delegation Url. + [WirePath("properties.url")] public Uri Uri { get; set; } /// A base64-encoded validation key to validate, that a request is coming from Azure API Management. + [WirePath("properties.validationKey")] public string ValidationKey { get; set; } /// Subscriptions delegation settings. internal SubscriptionDelegationSettingProperties IsSubscriptions { get; set; } /// Enable or disable delegation for subscriptions. + [WirePath("properties.subscriptions.enabled")] public bool? IsSubscriptionDelegationEnabled { get => IsSubscriptions is null ? default : IsSubscriptions.IsSubscriptionDelegationEnabled; @@ -96,6 +99,7 @@ public bool? IsSubscriptionDelegationEnabled /// User registration delegation settings. internal RegistrationDelegationSettingProperties IsUserRegistration { get; set; } /// Enable or disable delegation for user registration. + [WirePath("properties.userRegistration.enabled")] public bool? IsUserRegistrationDelegationEnabled { get => IsUserRegistration is null ? default : IsUserRegistration.IsUserRegistrationDelegationEnabled; @@ -108,8 +112,10 @@ public bool? IsUserRegistrationDelegationEnabled } /// Redirect Anonymous users to the Sign-In page. + [WirePath("properties.enabled")] public bool? IsRedirectEnabled { get; set; } /// Terms of service contract properties. + [WirePath("properties.termsOfService")] public TermsOfServiceProperties TermsOfService { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsCspMode.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsCspMode.cs new file mode 100644 index 0000000000000..1001ca81aae24 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsCspMode.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.ApiManagement.Models +{ + /// The mode of the developer portal Content Security Policy (CSP). + public readonly partial struct PortalSettingsCspMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PortalSettingsCspMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "enabled"; + private const string DisabledValue = "disabled"; + private const string ReportOnlyValue = "reportOnly"; + + /// The browser will block requests not matching allowed origins. + public static PortalSettingsCspMode Enabled { get; } = new PortalSettingsCspMode(EnabledValue); + /// The browser will not apply the origin restrictions. + public static PortalSettingsCspMode Disabled { get; } = new PortalSettingsCspMode(DisabledValue); + /// The browser will report requests not matching allowed origins without blocking them. + public static PortalSettingsCspMode ReportOnly { get; } = new PortalSettingsCspMode(ReportOnlyValue); + /// Determines if two values are the same. + public static bool operator ==(PortalSettingsCspMode left, PortalSettingsCspMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PortalSettingsCspMode left, PortalSettingsCspMode right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator PortalSettingsCspMode(string value) => new PortalSettingsCspMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PortalSettingsCspMode other && Equals(other); + /// + public bool Equals(PortalSettingsCspMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsListResult.Serialization.cs index e64bb2f09b637..4055510c964ed 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -117,6 +119,59 @@ internal static PortalSettingsListResult DeserializePortalSettingsListResult(Jso return new PortalSettingsListResult(value ?? new ChangeTrackingList(), count, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -125,6 +180,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(PortalSettingsListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsListResult.cs index 060558de479e8..46df388864562 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsListResult.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PortalSettingsListResult.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ApiManagement.Models { - /// Descriptions of APIM policies. + /// Descriptions of API Management policies. internal partial class PortalSettingsListResult { /// @@ -52,7 +52,7 @@ internal PortalSettingsListResult() } /// Initializes a new instance of . - /// Descriptions of APIM policies. + /// Descriptions of API Management policies. /// Total record count number. /// Keeps track of any properties unknown to the library. internal PortalSettingsListResult(IReadOnlyList value, long? count, IDictionary serializedAdditionalRawData) @@ -62,9 +62,11 @@ internal PortalSettingsListResult(IReadOnlyList valu _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Descriptions of APIM policies. + /// Descriptions of API Management policies. + [WirePath("value")] public IReadOnlyList Value { get; } /// Total record count number. + [WirePath("count")] public long? Count { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PrivateEndpointConnectionRequestProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PrivateEndpointConnectionRequestProperties.cs index 413263675cf36..a8c7768a32584 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PrivateEndpointConnectionRequestProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PrivateEndpointConnectionRequestProperties.cs @@ -60,6 +60,7 @@ internal PrivateEndpointConnectionRequestProperties(ApiManagementPrivateLinkServ } /// A collection of information about the state of the connection between service consumer and provider. + [WirePath("privateLinkServiceConnectionState")] public ApiManagementPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductApiData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductApiData.Serialization.cs index 9852f01a4c919..cffd0b8b94877 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductApiData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductApiData.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -456,6 +458,475 @@ internal static ProductApiData DeserializeProductApiData(JsonElement element, Mo serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AuthenticationSettings), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" authenticationSettings: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AuthenticationSettings)) + { + builder.Append(" authenticationSettings: "); + BicepSerializationHelpers.AppendChildObject(builder, AuthenticationSettings, options, 4, false, " authenticationSettings: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SubscriptionKeyParameterNames), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionKeyParameterNames: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SubscriptionKeyParameterNames)) + { + builder.Append(" subscriptionKeyParameterNames: "); + BicepSerializationHelpers.AppendChildObject(builder, SubscriptionKeyParameterNames, options, 4, false, " subscriptionKeyParameterNames: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiType)) + { + builder.Append(" type: "); + builder.AppendLine($"'{ApiType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiRevision), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiRevision: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiRevision)) + { + builder.Append(" apiRevision: "); + if (ApiRevision.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiRevision}'''"); + } + else + { + builder.AppendLine($"'{ApiRevision}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersion)) + { + builder.Append(" apiVersion: "); + if (ApiVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiVersion}'''"); + } + else + { + builder.AppendLine($"'{ApiVersion}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsCurrent), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isCurrent: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsCurrent)) + { + builder.Append(" isCurrent: "); + var boolValue = IsCurrent.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsOnline), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isOnline: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsOnline)) + { + builder.Append(" isOnline: "); + var boolValue = IsOnline.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiRevisionDescription), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiRevisionDescription: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiRevisionDescription)) + { + builder.Append(" apiRevisionDescription: "); + if (ApiRevisionDescription.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiRevisionDescription}'''"); + } + else + { + builder.AppendLine($"'{ApiRevisionDescription}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersionDescription), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersionDescription: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersionDescription)) + { + builder.Append(" apiVersionDescription: "); + if (ApiVersionDescription.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiVersionDescription}'''"); + } + else + { + builder.AppendLine($"'{ApiVersionDescription}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersionSetId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersionSetId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersionSetId)) + { + builder.Append(" apiVersionSetId: "); + builder.AppendLine($"'{ApiVersionSetId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsSubscriptionRequired), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionRequired: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsSubscriptionRequired)) + { + builder.Append(" subscriptionRequired: "); + var boolValue = IsSubscriptionRequired.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TermsOfServiceLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" termsOfServiceUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TermsOfServiceLink)) + { + builder.Append(" termsOfServiceUrl: "); + if (TermsOfServiceLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TermsOfServiceLink}'''"); + } + else + { + builder.AppendLine($"'{TermsOfServiceLink}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Contact), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" contact: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Contact)) + { + builder.Append(" contact: "); + BicepSerializationHelpers.AppendChildObject(builder, Contact, options, 4, false, " contact: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(License), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" license: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(License)) + { + builder.Append(" license: "); + BicepSerializationHelpers.AppendChildObject(builder, License, options, 4, false, " license: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SourceApiId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sourceApiId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SourceApiId)) + { + builder.Append(" sourceApiId: "); + builder.AppendLine($"'{SourceApiId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DisplayName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" displayName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DisplayName)) + { + builder.Append(" displayName: "); + if (DisplayName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DisplayName}'''"); + } + else + { + builder.AppendLine($"'{DisplayName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ServiceLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serviceUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ServiceLink)) + { + builder.Append(" serviceUrl: "); + if (ServiceLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ServiceLink}'''"); + } + else + { + builder.AppendLine($"'{ServiceLink}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Path), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" path: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Path)) + { + builder.Append(" path: "); + if (Path.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Path}'''"); + } + else + { + builder.AppendLine($"'{Path}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Protocols), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" protocols: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Protocols)) + { + if (Protocols.Any()) + { + builder.Append(" protocols: "); + builder.AppendLine("["); + foreach (var item in Protocols) + { + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersionSet), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiVersionSet: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersionSet)) + { + builder.Append(" apiVersionSet: "); + BicepSerializationHelpers.AppendChildObject(builder, ApiVersionSet, options, 4, false, " apiVersionSet: "); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -464,6 +935,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ProductApiData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductApiData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductApiData.cs index e33b1a341a31f..54b66e6ee0a8e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductApiData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductApiData.cs @@ -107,46 +107,67 @@ internal ProductApiData(ResourceIdentifier id, string name, ResourceType resourc } /// Description of the API. May include HTML formatting tags. + [WirePath("properties.description")] public string Description { get; set; } /// Collection of authentication settings included into this API. + [WirePath("properties.authenticationSettings")] public AuthenticationSettingsContract AuthenticationSettings { get; set; } /// Protocols over which API is made available. + [WirePath("properties.subscriptionKeyParameterNames")] public SubscriptionKeyParameterNamesContract SubscriptionKeyParameterNames { get; set; } /// Type of API. + [WirePath("properties.type")] public ApiType? ApiType { get; set; } /// Describes the revision of the API. If no value is provided, default revision 1 is created. + [WirePath("properties.apiRevision")] public string ApiRevision { get; set; } /// Indicates the version identifier of the API if the API is versioned. + [WirePath("properties.apiVersion")] public string ApiVersion { get; set; } /// Indicates if API revision is current api revision. + [WirePath("properties.isCurrent")] public bool? IsCurrent { get; set; } /// Indicates if API revision is accessible via the gateway. + [WirePath("properties.isOnline")] public bool? IsOnline { get; } /// Description of the API Revision. + [WirePath("properties.apiRevisionDescription")] public string ApiRevisionDescription { get; set; } /// Description of the API Version. + [WirePath("properties.apiVersionDescription")] public string ApiVersionDescription { get; set; } /// A resource identifier for the related ApiVersionSet. + [WirePath("properties.apiVersionSetId")] public ResourceIdentifier ApiVersionSetId { get; set; } /// Specifies whether an API or Product subscription is required for accessing the API. + [WirePath("properties.subscriptionRequired")] public bool? IsSubscriptionRequired { get; set; } /// A URL to the Terms of Service for the API. MUST be in the format of a URL. + [WirePath("properties.termsOfServiceUrl")] public string TermsOfServiceLink { get; set; } /// Contact information for the API. + [WirePath("properties.contact")] public ApiContactInformation Contact { get; set; } /// License information for the API. + [WirePath("properties.license")] public ApiLicenseInformation License { get; set; } /// API identifier of the source API. + [WirePath("properties.sourceApiId")] public ResourceIdentifier SourceApiId { get; set; } /// API name. Must be 1 to 300 characters long. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. + [WirePath("properties.serviceUrl")] public string ServiceLink { get; set; } /// Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. + [WirePath("properties.path")] public string Path { get; set; } /// Describes on which protocols the operations in this API can be invoked. + [WirePath("properties.protocols")] public IList Protocols { get; } /// Version set details. + [WirePath("properties.apiVersionSet")] public ApiVersionSetContractDetails ApiVersionSet { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductEntityBaseProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductEntityBaseProperties.Serialization.cs index 359aeb347639e..a7b14c475b742 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductEntityBaseProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductEntityBaseProperties.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -166,6 +167,129 @@ internal static ProductEntityBaseProperties DeserializeProductEntityBaseProperti serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Terms), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" terms: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Terms)) + { + builder.Append(" terms: "); + if (Terms.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Terms}'''"); + } + else + { + builder.AppendLine($"'{Terms}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsSubscriptionRequired), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionRequired: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsSubscriptionRequired)) + { + builder.Append(" subscriptionRequired: "); + var boolValue = IsSubscriptionRequired.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsApprovalRequired), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" approvalRequired: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsApprovalRequired)) + { + builder.Append(" approvalRequired: "); + var boolValue = IsApprovalRequired.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SubscriptionsLimit), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionsLimit: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SubscriptionsLimit)) + { + builder.Append(" subscriptionsLimit: "); + builder.AppendLine($"{SubscriptionsLimit.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(State), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" state: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(State)) + { + builder.Append(" state: "); + builder.AppendLine($"'{State.Value.ToSerialString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -174,6 +298,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrite { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ProductEntityBaseProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductEntityBaseProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductEntityBaseProperties.cs index 11c5ed42d100f..55496cf8f109a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductEntityBaseProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductEntityBaseProperties.cs @@ -70,16 +70,22 @@ internal ProductEntityBaseProperties(string description, string terms, bool? isS } /// Product description. May include HTML formatting tags. + [WirePath("description")] public string Description { get; } /// Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process. + [WirePath("terms")] public string Terms { get; } /// Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. + [WirePath("subscriptionRequired")] public bool? IsSubscriptionRequired { get; } /// whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. + [WirePath("approvalRequired")] public bool? IsApprovalRequired { get; } /// Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. + [WirePath("subscriptionsLimit")] public int? SubscriptionsLimit { get; } /// whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. + [WirePath("state")] public ApiManagementProductState? State { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductGroupData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductGroupData.Serialization.cs index 447fce6a4a9f6..e06a79d8bcd26 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductGroupData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductGroupData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -214,6 +215,177 @@ internal static ProductGroupData DeserializeProductGroupData(JsonElement element serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DisplayName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" displayName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DisplayName)) + { + builder.Append(" displayName: "); + if (DisplayName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DisplayName}'''"); + } + else + { + builder.AppendLine($"'{DisplayName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsBuiltIn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" builtIn: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsBuiltIn)) + { + builder.Append(" builtIn: "); + var boolValue = IsBuiltIn.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GroupType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(GroupType)) + { + builder.Append(" type: "); + builder.AppendLine($"'{GroupType.Value.ToSerialString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExternalId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" externalId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ExternalId)) + { + builder.Append(" externalId: "); + if (ExternalId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ExternalId}'''"); + } + else + { + builder.AppendLine($"'{ExternalId}'"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -222,6 +394,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions op { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ProductGroupData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductGroupData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductGroupData.cs index 9c0181099881a..5f2eb58ac806d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductGroupData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductGroupData.cs @@ -74,14 +74,19 @@ internal ProductGroupData(ResourceIdentifier id, string name, ResourceType resou } /// Group name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// Group description. Can contain HTML formatting tags. + [WirePath("properties.description")] public string Description { get; set; } /// true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false. + [WirePath("properties.builtIn")] public bool? IsBuiltIn { get; } /// Group type. + [WirePath("properties.type")] public ApiManagementGroupType? GroupType { get; set; } /// For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://<tenant>.onmicrosoft.com/groups/<group object id>`; otherwise the value is null. + [WirePath("properties.externalId")] public string ExternalId { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductListResult.Serialization.cs index 711bbd1424a96..53c7a70e8535b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static ProductListResult DeserializeProductListResult(JsonElement eleme return new ProductListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions o { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ProductListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterContract.Serialization.cs index 33b132c69709f..534271aa65994 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -130,6 +131,108 @@ internal static QuotaCounterContract DeserializeQuotaCounterContract(JsonElement serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CounterKey), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" counterKey: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CounterKey)) + { + builder.Append(" counterKey: "); + if (CounterKey.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{CounterKey}'''"); + } + else + { + builder.AppendLine($"'{CounterKey}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PeriodKey), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" periodKey: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PeriodKey)) + { + builder.Append(" periodKey: "); + if (PeriodKey.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PeriodKey}'''"); + } + else + { + builder.AppendLine($"'{PeriodKey}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PeriodStartOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" periodStartTime: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" periodStartTime: "); + var formattedDateTimeString = TypeFormatters.ToString(PeriodStartOn, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PeriodEndOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" periodEndTime: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" periodEndTime: "); + var formattedDateTimeString = TypeFormatters.ToString(PeriodEndOn, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + BicepSerializationHelpers.AppendChildObject(builder, Value, options, 2, false, " value: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -138,6 +241,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(QuotaCounterContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterContract.cs index d440b373b00bc..ca316ae06cb03 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterContract.cs @@ -97,20 +97,25 @@ internal QuotaCounterContract() } /// The Key value of the Counter. Must not be empty. + [WirePath("counterKey")] public string CounterKey { get; } /// Identifier of the Period for which the counter was collected. Must not be empty. + [WirePath("periodKey")] public string PeriodKey { get; } /// /// The date of the start of Counter Period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("periodStartTime")] public DateTimeOffset PeriodStartOn { get; } /// /// The date of the end of Counter Period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("periodEndTime")] public DateTimeOffset PeriodEndOn { get; } /// Quota Value Properties. + [WirePath("value")] public QuotaCounterValueContractProperties Value { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterListResult.Serialization.cs index 9f75acb3fa6cd..a1a6ff58d7467 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static QuotaCounterListResult DeserializeQuotaCounterListResult(JsonEle return new QuotaCounterListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(QuotaCounterListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterListResult.cs index 78f64ccbc21d5..f84186dd154dd 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterListResult.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterListResult.cs @@ -65,10 +65,13 @@ internal QuotaCounterListResult(IReadOnlyList value, long? } /// Quota counter values. + [WirePath("value")] public IReadOnlyList Value { get; } /// Total record count number across all pages. + [WirePath("count")] public long? Count { get; } /// Next page link if any. + [WirePath("nextLink")] public string NextLink { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterValueContractProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterValueContractProperties.Serialization.cs index 0ad731834298c..74d10253de67d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterValueContractProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterValueContractProperties.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -107,6 +108,51 @@ internal static QuotaCounterValueContractProperties DeserializeQuotaCounterValue return new QuotaCounterValueContractProperties(callsCount, kbTransferred, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CallsCount), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" callsCount: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CallsCount)) + { + builder.Append(" callsCount: "); + builder.AppendLine($"{CallsCount.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(KbTransferred), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" kbTransferred: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(KbTransferred)) + { + builder.Append(" kbTransferred: "); + builder.AppendLine($"'{KbTransferred.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -115,6 +161,8 @@ BinaryData IPersistableModel.Write(ModelRea { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(QuotaCounterValueContractProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterValueContractProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterValueContractProperties.cs index 98f516e5ecd74..e42ed7782f230 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterValueContractProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterValueContractProperties.cs @@ -62,8 +62,10 @@ internal QuotaCounterValueContractProperties(int? callsCount, double? kbTransfer } /// Number of times Counter was called. + [WirePath("callsCount")] public int? CallsCount { get; } /// Data Transferred in KiloBytes. + [WirePath("kbTransferred")] public double? KbTransferred { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterValueUpdateContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterValueUpdateContent.cs index 9f0b8e708eb79..bc4d5defff578 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterValueUpdateContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/QuotaCounterValueUpdateContent.cs @@ -62,8 +62,10 @@ internal QuotaCounterValueUpdateContent(int? callsCount, double? kbTransferred, } /// Number of times Counter was called. + [WirePath("properties.callsCount")] public int? CallsCount { get; set; } /// Data Transferred in KiloBytes. + [WirePath("properties.kbTransferred")] public double? KbTransferred { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientEmailContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientEmailContract.Serialization.cs index c7f9b604f0699..8a791703a30db 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientEmailContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientEmailContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -158,6 +159,100 @@ internal static RecipientEmailContract DeserializeRecipientEmailContract(JsonEle serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Email), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" email: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Email)) + { + builder.Append(" email: "); + if (Email.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Email}'''"); + } + else + { + builder.AppendLine($"'{Email}'"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -166,6 +261,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(RecipientEmailContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientEmailContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientEmailContract.cs index 6705465b25b64..9d62619412ffc 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientEmailContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientEmailContract.cs @@ -66,6 +66,7 @@ internal RecipientEmailContract(ResourceIdentifier id, string name, ResourceType } /// User Email subscribed to notification. + [WirePath("properties.email")] public string Email { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientEmailListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientEmailListResult.Serialization.cs index 871fe88bf29a8..cf8a63a23faf4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientEmailListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientEmailListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static RecipientEmailListResult DeserializeRecipientEmailListResult(Jso return new RecipientEmailListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(RecipientEmailListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientEmailListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientEmailListResult.cs index b8aecccaaa62a..edeeb9b486013 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientEmailListResult.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientEmailListResult.cs @@ -65,10 +65,13 @@ internal RecipientEmailListResult(IReadOnlyList value, l } /// Page values. + [WirePath("value")] public IReadOnlyList Value { get; } /// Total record count number across all pages. + [WirePath("count")] public long? Count { get; } /// Next page link if any. + [WirePath("nextLink")] public string NextLink { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientUserContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientUserContract.Serialization.cs index 9a0abf37de8d1..2108b3a893f21 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientUserContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientUserContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -158,6 +159,100 @@ internal static RecipientUserContract DeserializeRecipientUserContract(JsonEleme serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UserId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" userId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UserId)) + { + builder.Append(" userId: "); + if (UserId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{UserId}'''"); + } + else + { + builder.AppendLine($"'{UserId}'"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -166,6 +261,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(RecipientUserContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientUserContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientUserContract.cs index 22b11f8dd480a..7db89ba033b7f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientUserContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientUserContract.cs @@ -66,6 +66,7 @@ internal RecipientUserContract(ResourceIdentifier id, string name, ResourceType } /// API Management UserId subscribed to notification. + [WirePath("properties.userId")] public string UserId { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientUserListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientUserListResult.Serialization.cs index d4cd5929831f1..ca03be7d05274 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientUserListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientUserListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static RecipientUserListResult DeserializeRecipientUserListResult(JsonE return new RecipientUserListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpt { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(RecipientUserListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientUserListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientUserListResult.cs index b5a4cde98a0c5..b9d61a847a64f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientUserListResult.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientUserListResult.cs @@ -65,10 +65,13 @@ internal RecipientUserListResult(IReadOnlyList value, lon } /// Page values. + [WirePath("value")] public IReadOnlyList Value { get; } /// Total record count number across all pages. + [WirePath("count")] public long? Count { get; } /// Next page link if any. + [WirePath("nextLink")] public string NextLink { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientsContractProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientsContractProperties.Serialization.cs index 4c67a1660783d..89887f72503a1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientsContractProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientsContractProperties.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -127,6 +129,93 @@ internal static RecipientsContractProperties DeserializeRecipientsContractProper return new RecipientsContractProperties(emails ?? new ChangeTrackingList(), users ?? new ChangeTrackingList(), serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Emails), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" emails: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Emails)) + { + if (Emails.Any()) + { + builder.Append(" emails: "); + builder.AppendLine("["); + foreach (var item in Emails) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Users), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" users: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Users)) + { + if (Users.Any()) + { + builder.Append(" users: "); + builder.AppendLine("["); + foreach (var item in Users) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -135,6 +224,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrit { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(RecipientsContractProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientsContractProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientsContractProperties.cs index e0664e8a1ad55..6534876299aeb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientsContractProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RecipientsContractProperties.cs @@ -64,8 +64,10 @@ internal RecipientsContractProperties(IList emails, IList users, } /// List of Emails subscribed for the notification. + [WirePath("emails")] public IList Emails { get; } /// List of Users subscribed for the notification. + [WirePath("users")] public IList Users { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegionContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegionContract.Serialization.cs index 636183a74929b..02a8d288a275f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegionContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegionContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -118,6 +119,76 @@ internal static RegionContract DeserializeRegionContract(JsonElement element, Mo return new RegionContract(name, isMasterRegion, isDeleted, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsMasterRegion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isMasterRegion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsMasterRegion)) + { + builder.Append(" isMasterRegion: "); + var boolValue = IsMasterRegion.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsDeleted), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isDeleted: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsDeleted)) + { + builder.Append(" isDeleted: "); + var boolValue = IsDeleted.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -126,6 +197,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(RegionContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegionContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegionContract.cs index cd03733ff8a24..d7bd82c2c78a0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegionContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegionContract.cs @@ -64,10 +64,13 @@ internal RegionContract(string name, bool? isMasterRegion, bool? isDeleted, IDic } /// Region name. + [WirePath("name")] public string Name { get; } /// whether Region is the master region. + [WirePath("isMasterRegion")] public bool? IsMasterRegion { get; } /// whether Region is deleted. + [WirePath("isDeleted")] public bool? IsDeleted { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegionListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegionListResult.Serialization.cs index dc7655b147712..3b37580778f93 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegionListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegionListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static RegionListResult DeserializeRegionListResult(JsonElement element return new RegionListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions op { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(RegionListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegistrationDelegationSettingProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegistrationDelegationSettingProperties.Serialization.cs index 4e3aa8232d15a..e9b4bca30e52c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegistrationDelegationSettingProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegistrationDelegationSettingProperties.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -92,6 +93,37 @@ internal static RegistrationDelegationSettingProperties DeserializeRegistrationD return new RegistrationDelegationSettingProperties(enabled, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsUserRegistrationDelegationEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsUserRegistrationDelegationEnabled)) + { + builder.Append(" enabled: "); + var boolValue = IsUserRegistrationDelegationEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -100,6 +132,8 @@ BinaryData IPersistableModel.Write(Mode { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(RegistrationDelegationSettingProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegistrationDelegationSettingProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegistrationDelegationSettingProperties.cs index 2bd6e737ab667..f09886c67589e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegistrationDelegationSettingProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RegistrationDelegationSettingProperties.cs @@ -60,6 +60,7 @@ internal RegistrationDelegationSettingProperties(bool? isUserRegistrationDelegat } /// Enable or disable delegation for user registration. + [WirePath("enabled")] public bool? IsUserRegistrationDelegationEnabled { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RemotePrivateEndpointConnectionWrapper.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RemotePrivateEndpointConnectionWrapper.Serialization.cs index 260650e873598..b8c66fc7ad3c5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RemotePrivateEndpointConnectionWrapper.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RemotePrivateEndpointConnectionWrapper.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Resources.Models; @@ -208,6 +210,156 @@ internal static RemotePrivateEndpointConnectionWrapper DeserializeRemotePrivateE serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("PrivateEndpointId", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" privateEndpoint: "); + builder.AppendLine("{"); + builder.AppendLine(" privateEndpoint: {"); + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(PrivateEndpoint)) + { + builder.Append(" privateEndpoint: "); + BicepSerializationHelpers.AppendChildObject(builder, PrivateEndpoint, options, 4, false, " privateEndpoint: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PrivateLinkServiceConnectionState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" privateLinkServiceConnectionState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PrivateLinkServiceConnectionState)) + { + builder.Append(" privateLinkServiceConnectionState: "); + BicepSerializationHelpers.AppendChildObject(builder, PrivateLinkServiceConnectionState, options, 4, false, " privateLinkServiceConnectionState: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + if (ProvisioningState.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ProvisioningState}'''"); + } + else + { + builder.AppendLine($"'{ProvisioningState}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GroupIds), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" groupIds: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(GroupIds)) + { + if (GroupIds.Any()) + { + builder.Append(" groupIds: "); + builder.AppendLine("["); + foreach (var item in GroupIds) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -216,6 +368,8 @@ BinaryData IPersistableModel.Write(Model { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(RemotePrivateEndpointConnectionWrapper)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RemotePrivateEndpointConnectionWrapper.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RemotePrivateEndpointConnectionWrapper.cs index 0e3942efc0256..5cbd870118e51 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RemotePrivateEndpointConnectionWrapper.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RemotePrivateEndpointConnectionWrapper.cs @@ -75,24 +75,31 @@ internal RemotePrivateEndpointConnectionWrapper(ResourceIdentifier id, string na } /// Private Endpoint connection resource id. + [WirePath("id")] public ResourceIdentifier Id { get; set; } /// Private Endpoint Connection Name. + [WirePath("name")] public string Name { get; set; } /// Private Endpoint Connection Resource Type. + [WirePath("type")] public ResourceType? ResourceType { get; set; } /// The resource of private end point. internal SubResource PrivateEndpoint { get; set; } /// Gets Id. + [WirePath("properties.privateEndpoint.id")] public ResourceIdentifier PrivateEndpointId { get => PrivateEndpoint is null ? default : PrivateEndpoint.Id; } /// A collection of information about the state of the connection between service consumer and provider. + [WirePath("properties.privateLinkServiceConnectionState")] public ApiManagementPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; } /// The provisioning state of the private endpoint connection resource. + [WirePath("properties.provisioningState")] public string ProvisioningState { get; } /// All the Group ids. + [WirePath("properties.groupIds")] public IReadOnlyList GroupIds { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ReportListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ReportListResult.Serialization.cs index 89df119eb0503..57ac7b1c42dea 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ReportListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ReportListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static ReportListResult DeserializeReportListResult(JsonElement element return new ReportListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions op { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ReportListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ReportRecordContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ReportRecordContract.Serialization.cs index 3dc498472d5fe..f3997d2e10f21 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ReportRecordContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ReportRecordContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -454,6 +455,492 @@ internal static ReportRecordContract DeserializeReportRecordContract(JsonElement serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Timestamp), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" timestamp: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Timestamp)) + { + builder.Append(" timestamp: "); + var formattedDateTimeString = TypeFormatters.ToString(Timestamp.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Interval), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" interval: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Interval)) + { + builder.Append(" interval: "); + if (Interval.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Interval}'''"); + } + else + { + builder.AppendLine($"'{Interval}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Country), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" country: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Country)) + { + builder.Append(" country: "); + if (Country.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Country}'''"); + } + else + { + builder.AppendLine($"'{Country}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Region), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" region: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Region)) + { + builder.Append(" region: "); + if (Region.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Region}'''"); + } + else + { + builder.AppendLine($"'{Region}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Zip), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" zip: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Zip)) + { + builder.Append(" zip: "); + if (Zip.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Zip}'''"); + } + else + { + builder.AppendLine($"'{Zip}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UserId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" userId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UserId)) + { + builder.Append(" userId: "); + if (UserId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{UserId}'''"); + } + else + { + builder.AppendLine($"'{UserId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProductId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" productId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProductId)) + { + builder.Append(" productId: "); + if (ProductId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ProductId}'''"); + } + else + { + builder.AppendLine($"'{ProductId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiId)) + { + builder.Append(" apiId: "); + if (ApiId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiId}'''"); + } + else + { + builder.AppendLine($"'{ApiId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OperationId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" operationId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OperationId)) + { + builder.Append(" operationId: "); + if (OperationId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{OperationId}'''"); + } + else + { + builder.AppendLine($"'{OperationId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiRegion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiRegion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiRegion)) + { + builder.Append(" apiRegion: "); + if (ApiRegion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiRegion}'''"); + } + else + { + builder.AppendLine($"'{ApiRegion}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SubscriptionResourceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SubscriptionResourceId)) + { + builder.Append(" subscriptionId: "); + builder.AppendLine($"'{SubscriptionResourceId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CallCountSuccess), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" callCountSuccess: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CallCountSuccess)) + { + builder.Append(" callCountSuccess: "); + builder.AppendLine($"{CallCountSuccess.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CallCountBlocked), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" callCountBlocked: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CallCountBlocked)) + { + builder.Append(" callCountBlocked: "); + builder.AppendLine($"{CallCountBlocked.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CallCountFailed), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" callCountFailed: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CallCountFailed)) + { + builder.Append(" callCountFailed: "); + builder.AppendLine($"{CallCountFailed.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CallCountOther), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" callCountOther: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CallCountOther)) + { + builder.Append(" callCountOther: "); + builder.AppendLine($"{CallCountOther.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CallCountTotal), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" callCountTotal: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CallCountTotal)) + { + builder.Append(" callCountTotal: "); + builder.AppendLine($"{CallCountTotal.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Bandwidth), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" bandwidth: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Bandwidth)) + { + builder.Append(" bandwidth: "); + builder.AppendLine($"'{Bandwidth.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CacheHitCount), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" cacheHitCount: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CacheHitCount)) + { + builder.Append(" cacheHitCount: "); + builder.AppendLine($"{CacheHitCount.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CacheMissCount), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" cacheMissCount: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CacheMissCount)) + { + builder.Append(" cacheMissCount: "); + builder.AppendLine($"{CacheMissCount.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiTimeAvg), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiTimeAvg: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiTimeAvg)) + { + builder.Append(" apiTimeAvg: "); + builder.AppendLine($"'{ApiTimeAvg.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiTimeMin), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiTimeMin: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiTimeMin)) + { + builder.Append(" apiTimeMin: "); + builder.AppendLine($"'{ApiTimeMin.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiTimeMax), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiTimeMax: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiTimeMax)) + { + builder.Append(" apiTimeMax: "); + builder.AppendLine($"'{ApiTimeMax.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ServiceTimeAvg), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serviceTimeAvg: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ServiceTimeAvg)) + { + builder.Append(" serviceTimeAvg: "); + builder.AppendLine($"'{ServiceTimeAvg.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ServiceTimeMin), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serviceTimeMin: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ServiceTimeMin)) + { + builder.Append(" serviceTimeMin: "); + builder.AppendLine($"'{ServiceTimeMin.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ServiceTimeMax), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serviceTimeMax: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ServiceTimeMax)) + { + builder.Append(" serviceTimeMax: "); + builder.AppendLine($"'{ServiceTimeMax.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -462,6 +949,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ReportRecordContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ReportRecordContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ReportRecordContract.cs index 3ee26a8c1c16b..77b846d6dd15c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ReportRecordContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ReportRecordContract.cs @@ -69,7 +69,7 @@ internal ReportRecordContract() /// Subscription identifier path. /subscriptions/{subscriptionId}. /// Number of successful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect. /// Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorized and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests. - /// Number of calls failed due to proxy or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and any Code between HttpStatusCode.InternalServerError (500) and 600. + /// Number of calls failed due to gateway or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and any Code between HttpStatusCode.InternalServerError (500) and 600. /// Number of other calls. /// Total number of calls. /// Bandwidth consumed. @@ -114,59 +114,85 @@ internal ReportRecordContract(string name, DateTimeOffset? timestamp, string int } /// Name depending on report endpoint specifies product, API, operation or developer name. + [WirePath("name")] public string Name { get; } /// /// Start of aggregation period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("timestamp")] public DateTimeOffset? Timestamp { get; } /// Length of aggregation period. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations). + [WirePath("interval")] public string Interval { get; } /// Country to which this record data is related. + [WirePath("country")] public string Country { get; } /// Country region to which this record data is related. + [WirePath("region")] public string Region { get; } /// Zip code to which this record data is related. + [WirePath("zip")] public string Zip { get; } /// User identifier path. /users/{userId}. + [WirePath("userId")] public string UserId { get; } /// Product identifier path. /products/{productId}. + [WirePath("productId")] public string ProductId { get; } /// API identifier path. /apis/{apiId}. + [WirePath("apiId")] public string ApiId { get; } /// Operation identifier path. /apis/{apiId}/operations/{operationId}. + [WirePath("operationId")] public string OperationId { get; } /// API region identifier. + [WirePath("apiRegion")] public string ApiRegion { get; } /// Subscription identifier path. /subscriptions/{subscriptionId}. + [WirePath("subscriptionId")] public ResourceIdentifier SubscriptionResourceId { get; } /// Number of successful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect. + [WirePath("callCountSuccess")] public int? CallCountSuccess { get; } /// Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorized and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests. + [WirePath("callCountBlocked")] public int? CallCountBlocked { get; } - /// Number of calls failed due to proxy or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and any Code between HttpStatusCode.InternalServerError (500) and 600. + /// Number of calls failed due to gateway or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and any Code between HttpStatusCode.InternalServerError (500) and 600. + [WirePath("callCountFailed")] public int? CallCountFailed { get; } /// Number of other calls. + [WirePath("callCountOther")] public int? CallCountOther { get; } /// Total number of calls. + [WirePath("callCountTotal")] public int? CallCountTotal { get; } /// Bandwidth consumed. + [WirePath("bandwidth")] public long? Bandwidth { get; } /// Number of times when content was served from cache policy. + [WirePath("cacheHitCount")] public int? CacheHitCount { get; } /// Number of times content was fetched from backend. + [WirePath("cacheMissCount")] public int? CacheMissCount { get; } /// Average time it took to process request. + [WirePath("apiTimeAvg")] public double? ApiTimeAvg { get; } /// Minimum time it took to process request. + [WirePath("apiTimeMin")] public double? ApiTimeMin { get; } /// Maximum time it took to process request. + [WirePath("apiTimeMax")] public double? ApiTimeMax { get; } /// Average time it took to process request on backend. + [WirePath("serviceTimeAvg")] public double? ServiceTimeAvg { get; } /// Minimum time it took to process request on backend. + [WirePath("serviceTimeMin")] public double? ServiceTimeMin { get; } /// Maximum time it took to process request on backend. + [WirePath("serviceTimeMax")] public double? ServiceTimeMax { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RepresentationContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RepresentationContract.Serialization.cs index c99534e14be94..92b6eb2e7f3f4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RepresentationContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RepresentationContract.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -164,6 +166,137 @@ internal static RepresentationContract DeserializeRepresentationContract(JsonEle serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ContentType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" contentType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ContentType)) + { + builder.Append(" contentType: "); + if (ContentType.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ContentType}'''"); + } + else + { + builder.AppendLine($"'{ContentType}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SchemaId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" schemaId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SchemaId)) + { + builder.Append(" schemaId: "); + if (SchemaId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SchemaId}'''"); + } + else + { + builder.AppendLine($"'{SchemaId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TypeName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" typeName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TypeName)) + { + builder.Append(" typeName: "); + if (TypeName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TypeName}'''"); + } + else + { + builder.AppendLine($"'{TypeName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(FormParameters), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" formParameters: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(FormParameters)) + { + if (FormParameters.Any()) + { + builder.Append(" formParameters: "); + builder.AppendLine("["); + foreach (var item in FormParameters) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " formParameters: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Examples), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" examples: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Examples)) + { + if (Examples.Any()) + { + builder.Append(" examples: "); + builder.AppendLine("{"); + foreach (var item in Examples) + { + builder.Append($" '{item.Key}': "); + BicepSerializationHelpers.AppendChildObject(builder, item.Value, options, 4, false, " examples: "); + } + builder.AppendLine(" }"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -172,6 +305,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(RepresentationContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RepresentationContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RepresentationContract.cs index ab3b6c076d722..c7693a6e57b64 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RepresentationContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RepresentationContract.cs @@ -80,14 +80,19 @@ internal RepresentationContract() } /// Specifies a registered or custom content type for this representation, e.g. application/xml. + [WirePath("contentType")] public string ContentType { get; set; } /// Schema identifier. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'. + [WirePath("schemaId")] public string SchemaId { get; set; } /// Type name defined by the schema. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'. + [WirePath("typeName")] public string TypeName { get; set; } /// Collection of form parameters. Required if 'contentType' value is either 'application/x-www-form-urlencoded' or 'multipart/form-data'.. + [WirePath("formParameters")] public IList FormParameters { get; } /// Exampled defined for the representation. + [WirePath("examples")] public IDictionary Examples { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestContract.Serialization.cs index 60977e76f3320..3f30438a73765 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestContract.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -163,6 +165,113 @@ internal static RequestContract DeserializeRequestContract(JsonElement element, return new RequestContract(description, queryParameters ?? new ChangeTrackingList(), headers ?? new ChangeTrackingList(), representations ?? new ChangeTrackingList(), serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(QueryParameters), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" queryParameters: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(QueryParameters)) + { + if (QueryParameters.Any()) + { + builder.Append(" queryParameters: "); + builder.AppendLine("["); + foreach (var item in QueryParameters) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " queryParameters: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Headers), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" headers: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Headers)) + { + if (Headers.Any()) + { + builder.Append(" headers: "); + builder.AppendLine("["); + foreach (var item in Headers) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " headers: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Representations), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" representations: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Representations)) + { + if (Representations.Any()) + { + builder.Append(" representations: "); + builder.AppendLine("["); + foreach (var item in Representations) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " representations: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -171,6 +280,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opt { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(RequestContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestContract.cs index 624692c1d23f0..d8174eaeb08db 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestContract.cs @@ -69,12 +69,16 @@ internal RequestContract(string description, IList queryParam } /// Operation request description. + [WirePath("description")] public string Description { get; set; } /// Collection of operation request query parameters. + [WirePath("queryParameters")] public IList QueryParameters { get; } /// Collection of operation request headers. + [WirePath("headers")] public IList Headers { get; } /// Collection of operation request representations. + [WirePath("representations")] public IList Representations { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestReportListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestReportListResult.Serialization.cs index 02a546f6b4c0a..3e1cbf1062ad4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestReportListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestReportListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -117,6 +119,59 @@ internal static RequestReportListResult DeserializeRequestReportListResult(JsonE return new RequestReportListResult(value ?? new ChangeTrackingList(), count, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -125,6 +180,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpt { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(RequestReportListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestReportRecordContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestReportRecordContract.Serialization.cs index b9e2a4bb302d2..9cc84fb98cd9b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestReportRecordContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestReportRecordContract.Serialization.cs @@ -9,6 +9,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Net; +using System.Text; using System.Text.Json; using Azure.Core; @@ -335,6 +336,356 @@ internal static RequestReportRecordContract DeserializeRequestReportRecordContra serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiId)) + { + builder.Append(" apiId: "); + if (ApiId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiId}'''"); + } + else + { + builder.AppendLine($"'{ApiId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OperationId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" operationId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OperationId)) + { + builder.Append(" operationId: "); + if (OperationId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{OperationId}'''"); + } + else + { + builder.AppendLine($"'{OperationId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProductId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" productId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProductId)) + { + builder.Append(" productId: "); + if (ProductId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ProductId}'''"); + } + else + { + builder.AppendLine($"'{ProductId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UserId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" userId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UserId)) + { + builder.Append(" userId: "); + if (UserId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{UserId}'''"); + } + else + { + builder.AppendLine($"'{UserId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Method), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" method: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Method)) + { + builder.Append(" method: "); + builder.AppendLine($"'{Method.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Uri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" url: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Uri)) + { + builder.Append(" url: "); + builder.AppendLine($"'{Uri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IPAddress), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" ipAddress: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IPAddress)) + { + builder.Append(" ipAddress: "); + builder.AppendLine($"'{IPAddress.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(BackendResponseCode), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" backendResponseCode: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(BackendResponseCode)) + { + builder.Append(" backendResponseCode: "); + if (BackendResponseCode.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{BackendResponseCode}'''"); + } + else + { + builder.AppendLine($"'{BackendResponseCode}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResponseCode), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" responseCode: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResponseCode)) + { + builder.Append(" responseCode: "); + builder.AppendLine($"{ResponseCode.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResponseSize), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" responseSize: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResponseSize)) + { + builder.Append(" responseSize: "); + builder.AppendLine($"{ResponseSize.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Timestamp), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" timestamp: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Timestamp)) + { + builder.Append(" timestamp: "); + var formattedDateTimeString = TypeFormatters.ToString(Timestamp.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Cache), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" cache: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Cache)) + { + builder.Append(" cache: "); + if (Cache.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Cache}'''"); + } + else + { + builder.AppendLine($"'{Cache}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiTime), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiTime)) + { + builder.Append(" apiTime: "); + builder.AppendLine($"'{ApiTime.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ServiceTime), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serviceTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ServiceTime)) + { + builder.Append(" serviceTime: "); + builder.AppendLine($"'{ServiceTime.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiRegion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" apiRegion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiRegion)) + { + builder.Append(" apiRegion: "); + if (ApiRegion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiRegion}'''"); + } + else + { + builder.AppendLine($"'{ApiRegion}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SubscriptionResourceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SubscriptionResourceId)) + { + builder.Append(" subscriptionId: "); + builder.AppendLine($"'{SubscriptionResourceId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RequestId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" requestId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(RequestId)) + { + builder.Append(" requestId: "); + if (RequestId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{RequestId}'''"); + } + else + { + builder.AppendLine($"'{RequestId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RequestSize), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" requestSize: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(RequestSize)) + { + builder.Append(" requestSize: "); + builder.AppendLine($"{RequestSize.Value}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -343,6 +694,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrite { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(RequestReportRecordContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestReportRecordContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestReportRecordContract.cs index e89ab171f645e..994462d209a5f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestReportRecordContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/RequestReportRecordContract.cs @@ -96,40 +96,58 @@ internal RequestReportRecordContract(string apiId, string operationId, string pr } /// API identifier path. /apis/{apiId}. + [WirePath("apiId")] public string ApiId { get; } /// Operation identifier path. /apis/{apiId}/operations/{operationId}. + [WirePath("operationId")] public string OperationId { get; } /// Product identifier path. /products/{productId}. + [WirePath("productId")] public string ProductId { get; } /// User identifier path. /users/{userId}. + [WirePath("userId")] public string UserId { get; } /// The HTTP method associated with this request.. + [WirePath("method")] public RequestMethod? Method { get; } /// The full URL associated with this request. + [WirePath("url")] public Uri Uri { get; } /// The client IP address associated with this request. + [WirePath("ipAddress")] public IPAddress IPAddress { get; } /// The HTTP status code received by the gateway as a result of forwarding this request to the backend. + [WirePath("backendResponseCode")] public string BackendResponseCode { get; } /// The HTTP status code returned by the gateway. + [WirePath("responseCode")] public int? ResponseCode { get; } /// The size of the response returned by the gateway. + [WirePath("responseSize")] public int? ResponseSize { get; } /// The date and time when this request was received by the gateway in ISO 8601 format. + [WirePath("timestamp")] public DateTimeOffset? Timestamp { get; } /// Specifies if response cache was involved in generating the response. If the value is none, the cache was not used. If the value is hit, cached response was returned. If the value is miss, the cache was used but lookup resulted in a miss and request was fulfilled by the backend. + [WirePath("cache")] public string Cache { get; } /// The total time it took to process this request. + [WirePath("apiTime")] public double? ApiTime { get; } /// he time it took to forward this request to the backend and get the response back. + [WirePath("serviceTime")] public double? ServiceTime { get; } /// Azure region where the gateway that processed this request is located. + [WirePath("apiRegion")] public string ApiRegion { get; } /// Subscription identifier path. /subscriptions/{subscriptionId}. + [WirePath("subscriptionId")] public ResourceIdentifier SubscriptionResourceId { get; } /// Request Identifier. + [WirePath("requestId")] public string RequestId { get; } /// The size of this request.. + [WirePath("requestSize")] public int? RequestSize { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverContractPatch.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverContractPatch.Serialization.cs new file mode 100644 index 0000000000000..79e276afb96e8 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverContractPatch.Serialization.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + public partial class ResolverContractPatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResolverContractPatch)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsDefined(Path)) + { + writer.WritePropertyName("path"u8); + writer.WriteStringValue(Path); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ResolverContractPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResolverContractPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResolverContractPatch(document.RootElement, options); + } + + internal static ResolverContractPatch DeserializeResolverContractPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string displayName = default; + string path = default; + string description = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("displayName"u8)) + { + displayName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("path"u8)) + { + path = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("description"u8)) + { + description = property0.Value.GetString(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResolverContractPatch(displayName, path, description, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ResolverContractPatch)} does not support writing '{options.Format}' format."); + } + } + + ResolverContractPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeResolverContractPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResolverContractPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverContractPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverContractPatch.cs new file mode 100644 index 0000000000000..1943565a3cb39 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverContractPatch.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// GraphQL API Resolver Update Contract details. + public partial class ResolverContractPatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ResolverContractPatch() + { + } + + /// Initializes a new instance of . + /// Resolver Name. + /// Path is type/field being resolved. + /// Description of the resolver. May include HTML formatting tags. + /// Keeps track of any properties unknown to the library. + internal ResolverContractPatch(string displayName, string path, string description, IDictionary serializedAdditionalRawData) + { + DisplayName = displayName; + Path = path; + Description = description; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resolver Name. + [WirePath("properties.displayName")] + public string DisplayName { get; set; } + /// Path is type/field being resolved. + [WirePath("properties.path")] + public string Path { get; set; } + /// Description of the resolver. May include HTML formatting tags. + [WirePath("properties.description")] + public string Description { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverListResult.Serialization.cs new file mode 100644 index 0000000000000..cd7899cc1a2c5 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverListResult.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + internal partial class ResolverListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResolverListResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Count)) + { + writer.WritePropertyName("count"u8); + writer.WriteNumberValue(Count.Value); + } + if (options.Format != "W" && Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ResolverListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResolverListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResolverListResult(document.RootElement, options); + } + + internal static ResolverListResult DeserializeResolverListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + long? count = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResolverContractData.DeserializeResolverContractData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("count"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + count = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResolverListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ResolverListResult)} does not support writing '{options.Format}' format."); + } + } + + ResolverListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeResolverListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResolverListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverListResult.cs new file mode 100644 index 0000000000000..a4e3714b83c0a --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResolverListResult.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// Paged Resolver list representation. + internal partial class ResolverListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ResolverListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Page values. + /// Total record count number across all pages. + /// Next page link if any. + /// Keeps track of any properties unknown to the library. + internal ResolverListResult(IReadOnlyList value, long? count, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + Count = count; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Page values. + public IReadOnlyList Value { get; } + /// Total record count number across all pages. + public long? Count { get; } + /// Next page link if any. + public string NextLink { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceCollectionValueItem.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceCollectionValueItem.Serialization.cs new file mode 100644 index 0000000000000..c1b1a682814c8 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceCollectionValueItem.Serialization.cs @@ -0,0 +1,231 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + public partial class ResourceCollectionValueItem : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceCollectionValueItem)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ResourceCollectionValueItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceCollectionValueItem)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceCollectionValueItem(document.RootElement, options); + } + + internal static ResourceCollectionValueItem DeserializeResourceCollectionValueItem(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceCollectionValueItem(id, name, type, systemData, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ResourceCollectionValueItem)} does not support writing '{options.Format}' format."); + } + } + + ResourceCollectionValueItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeResourceCollectionValueItem(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceCollectionValueItem)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceCollectionValueItem.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceCollectionValueItem.cs new file mode 100644 index 0000000000000..c255000f44919 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceCollectionValueItem.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// The ResourceCollectionValueItem. + public partial class ResourceCollectionValueItem : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ResourceCollectionValueItem() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Keeps track of any properties unknown to the library. + internal ResourceCollectionValueItem(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + _serializedAdditionalRawData = serializedAdditionalRawData; + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceListResult.Serialization.cs new file mode 100644 index 0000000000000..dbf243cdd5703 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceListResult.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + internal partial class ResourceListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceListResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Count)) + { + writer.WritePropertyName("count"u8); + writer.WriteNumberValue(Count.Value); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceListResult(document.RootElement, options); + } + + internal static ResourceListResult DeserializeResourceListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + long? count = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ResourceCollectionValueItem.DeserializeResourceCollectionValueItem(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("count"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + count = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ResourceListResult)} does not support writing '{options.Format}' format."); + } + } + + ResourceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeResourceListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceListResult.cs new file mode 100644 index 0000000000000..e3d7944322e2e --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceListResult.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// A collection of resources. + internal partial class ResourceListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ResourceListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// A collection of resources. + /// Total record count number. + /// Next page link if any. + /// Keeps track of any properties unknown to the library. + internal ResourceListResult(IReadOnlyList value, long? count, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + Count = count; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// A collection of resources. + [WirePath("value")] + public IReadOnlyList Value { get; } + /// Total record count number. + [WirePath("count")] + public long? Count { get; } + /// Next page link if any. + [WirePath("nextLink")] + public string NextLink { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceLocationDataContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceLocationDataContract.Serialization.cs index 66f7ac631ac0a..3bcdf7f3d633f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceLocationDataContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceLocationDataContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -118,6 +119,113 @@ internal static ResourceLocationDataContract DeserializeResourceLocationDataCont return new ResourceLocationDataContract(name, city, district, countryOrRegion, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(City), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" city: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(City)) + { + builder.Append(" city: "); + if (City.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{City}'''"); + } + else + { + builder.AppendLine($"'{City}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(District), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" district: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(District)) + { + builder.Append(" district: "); + if (District.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{District}'''"); + } + else + { + builder.AppendLine($"'{District}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CountryOrRegion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" countryOrRegion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CountryOrRegion)) + { + builder.Append(" countryOrRegion: "); + if (CountryOrRegion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{CountryOrRegion}'''"); + } + else + { + builder.AppendLine($"'{CountryOrRegion}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -126,6 +234,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrit { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ResourceLocationDataContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceLocationDataContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceLocationDataContract.cs index 88e63642dc90a..3fba8dbc5ba41 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceLocationDataContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceLocationDataContract.cs @@ -76,12 +76,16 @@ internal ResourceLocationDataContract() } /// A canonical name for the geographic or physical location. + [WirePath("name")] public string Name { get; set; } /// The city or locality where the resource is located. + [WirePath("city")] public string City { get; set; } /// The district, state, or province where the resource is located. + [WirePath("district")] public string District { get; set; } /// The country or region where the resource is located. + [WirePath("countryOrRegion")] public string CountryOrRegion { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceSku.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceSku.Serialization.cs index d3deb0a63cd32..0543c66f27a82 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceSku.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceSku.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -92,6 +93,36 @@ internal static ResourceSku DeserializeResourceSku(JsonElement element, ModelRea return new ResourceSku(name, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + builder.AppendLine($"'{Name.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -100,6 +131,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ResourceSku)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceSku.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceSku.cs index 5b02889f442d8..db59a8e5d1c7d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceSku.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceSku.cs @@ -60,6 +60,7 @@ internal ResourceSku(ApiManagementServiceSkuType? name, IDictionary Name of the Sku. + [WirePath("name")] public ApiManagementServiceSkuType? Name { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceSkuResults.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceSkuResults.Serialization.cs index 44759f52cc1c6..31452f3b3b43b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceSkuResults.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResourceSkuResults.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -106,6 +108,67 @@ internal static ResourceSkuResults DeserializeResourceSkuResults(JsonElement ele return new ResourceSkuResults(value, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -114,6 +177,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ResourceSkuResults)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResponseContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResponseContract.Serialization.cs index 68c0a97c8b35d..e50a034995df4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResponseContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResponseContract.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -146,6 +148,102 @@ internal static ResponseContract DeserializeResponseContract(JsonElement element return new ResponseContract(statusCode, description, representations ?? new ChangeTrackingList(), headers ?? new ChangeTrackingList(), serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StatusCode), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" statusCode: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" statusCode: "); + builder.AppendLine($"{StatusCode}"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Representations), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" representations: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Representations)) + { + if (Representations.Any()) + { + builder.Append(" representations: "); + builder.AppendLine("["); + foreach (var item in Representations) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " representations: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Headers), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" headers: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Headers)) + { + if (Headers.Any()) + { + builder.Append(" headers: "); + builder.AppendLine("["); + foreach (var item in Headers) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " headers: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -154,6 +252,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions op { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ResponseContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResponseContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResponseContract.cs index adf68ccc50c1c..220dbca8061d6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResponseContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ResponseContract.cs @@ -75,12 +75,16 @@ internal ResponseContract() } /// Operation response HTTP status code. + [WirePath("statusCode")] public int StatusCode { get; set; } /// Operation response description. + [WirePath("description")] public string Description { get; set; } /// Collection of operation response representations. + [WirePath("representations")] public IList Representations { get; } /// Collection of operation response headers. + [WirePath("headers")] public IList Headers { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SamplingSettings.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SamplingSettings.Serialization.cs index ced96cb62c058..38481494e8664 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SamplingSettings.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SamplingSettings.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -107,6 +108,51 @@ internal static SamplingSettings DeserializeSamplingSettings(JsonElement element return new SamplingSettings(samplingType, percentage, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SamplingType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" samplingType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SamplingType)) + { + builder.Append(" samplingType: "); + builder.AppendLine($"'{SamplingType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Percentage), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" percentage: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Percentage)) + { + builder.Append(" percentage: "); + builder.AppendLine($"'{Percentage.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -115,6 +161,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions op { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(SamplingSettings)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SamplingSettings.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SamplingSettings.cs index c329a72b6e15a..dbc2d57e504cb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SamplingSettings.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SamplingSettings.cs @@ -62,8 +62,10 @@ internal SamplingSettings(SamplingType? samplingType, double? percentage, IDicti } /// Sampling type. + [WirePath("samplingType")] public SamplingType? SamplingType { get; set; } /// Rate of sampling for fixed-rate sampling. + [WirePath("percentage")] public double? Percentage { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SchemaListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SchemaListResult.Serialization.cs index 8ab18c0ee6f64..11445f70f1cf1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SchemaListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SchemaListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static SchemaListResult DeserializeSchemaListResult(JsonElement element return new SchemaListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions op { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(SchemaListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionDelegationSettingProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionDelegationSettingProperties.Serialization.cs index d71710c4cc4b3..d486b687e6c1b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionDelegationSettingProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionDelegationSettingProperties.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -92,6 +93,37 @@ internal static SubscriptionDelegationSettingProperties DeserializeSubscriptionD return new SubscriptionDelegationSettingProperties(enabled, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsSubscriptionDelegationEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsSubscriptionDelegationEnabled)) + { + builder.Append(" enabled: "); + var boolValue = IsSubscriptionDelegationEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -100,6 +132,8 @@ BinaryData IPersistableModel.Write(Mode { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(SubscriptionDelegationSettingProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionDelegationSettingProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionDelegationSettingProperties.cs index 14acf807cb84f..697f6ba9bc793 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionDelegationSettingProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionDelegationSettingProperties.cs @@ -60,6 +60,7 @@ internal SubscriptionDelegationSettingProperties(bool? isSubscriptionDelegationE } /// Enable or disable delegation for subscriptions. + [WirePath("enabled")] public bool? IsSubscriptionDelegationEnabled { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionKeyParameterNamesContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionKeyParameterNamesContract.Serialization.cs index 434006c8a4cf8..78a0eaab2a5cf 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionKeyParameterNamesContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionKeyParameterNamesContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -99,6 +100,67 @@ internal static SubscriptionKeyParameterNamesContract DeserializeSubscriptionKey return new SubscriptionKeyParameterNamesContract(header, query, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Header), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" header: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Header)) + { + builder.Append(" header: "); + if (Header.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Header}'''"); + } + else + { + builder.AppendLine($"'{Header}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Query), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" query: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Query)) + { + builder.Append(" query: "); + if (Query.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Query}'''"); + } + else + { + builder.AppendLine($"'{Query}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -107,6 +169,8 @@ BinaryData IPersistableModel.Write(ModelR { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(SubscriptionKeyParameterNamesContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionKeyParameterNamesContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionKeyParameterNamesContract.cs index c8d8da2fe9add..7810a2401dafa 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionKeyParameterNamesContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionKeyParameterNamesContract.cs @@ -62,8 +62,10 @@ internal SubscriptionKeyParameterNamesContract(string header, string query, IDic } /// Subscription key header name. + [WirePath("header")] public string Header { get; set; } /// Subscription key query string parameter name. + [WirePath("query")] public string Query { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionKeysContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionKeysContract.Serialization.cs index 239afc57da4d5..e1930f5988ef0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionKeysContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionKeysContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -99,6 +100,67 @@ internal static SubscriptionKeysContract DeserializeSubscriptionKeysContract(Jso return new SubscriptionKeysContract(primaryKey, secondaryKey, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PrimaryKey), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" primaryKey: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PrimaryKey)) + { + builder.Append(" primaryKey: "); + if (PrimaryKey.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PrimaryKey}'''"); + } + else + { + builder.AppendLine($"'{PrimaryKey}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SecondaryKey), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" secondaryKey: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SecondaryKey)) + { + builder.Append(" secondaryKey: "); + if (SecondaryKey.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SecondaryKey}'''"); + } + else + { + builder.AppendLine($"'{SecondaryKey}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -107,6 +169,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(SubscriptionKeysContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionKeysContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionKeysContract.cs index b8539bdd963c5..417e47d3423bc 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionKeysContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionKeysContract.cs @@ -62,8 +62,10 @@ internal SubscriptionKeysContract(string primaryKey, string secondaryKey, IDicti } /// Subscription primary key. + [WirePath("primaryKey")] public string PrimaryKey { get; } /// Subscription secondary key. + [WirePath("secondaryKey")] public string SecondaryKey { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionListResult.Serialization.cs index b6f444d060ebc..9568c735878df 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SubscriptionListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static SubscriptionListResult DeserializeSubscriptionListResult(JsonEle return new SubscriptionListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(SubscriptionListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagDescriptionListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagDescriptionListResult.Serialization.cs index abcdf5535fe09..978ae868e199a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagDescriptionListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagDescriptionListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static TagDescriptionListResult DeserializeTagDescriptionListResult(Jso return new TagDescriptionListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(TagDescriptionListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagListResult.Serialization.cs index 2abec7675fe05..f768c03124607 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static TagListResult DeserializeTagListResult(JsonElement element, Mode return new TagListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions optio { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(TagListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagResourceContractDetails.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagResourceContractDetails.Serialization.cs index e6f8184748448..34a87d79f681e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagResourceContractDetails.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagResourceContractDetails.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -130,6 +131,81 @@ internal static TagResourceContractDetails DeserializeTagResourceContractDetails return new TagResourceContractDetails(tag, api, operation, product, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Tag), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tag: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Tag)) + { + builder.Append(" tag: "); + BicepSerializationHelpers.AppendChildObject(builder, Tag, options, 2, false, " tag: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Api), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" api: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Api)) + { + builder.Append(" api: "); + BicepSerializationHelpers.AppendChildObject(builder, Api, options, 2, false, " api: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Operation), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" operation: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Operation)) + { + builder.Append(" operation: "); + BicepSerializationHelpers.AppendChildObject(builder, Operation, options, 2, false, " operation: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Product), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" product: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Product)) + { + builder.Append(" product: "); + BicepSerializationHelpers.AppendChildObject(builder, Product, options, 2, false, " product: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -138,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriter { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(TagResourceContractDetails)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagResourceContractDetails.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagResourceContractDetails.cs index 14653a70919c2..d981128ea2dea 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagResourceContractDetails.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagResourceContractDetails.cs @@ -76,12 +76,16 @@ internal TagResourceContractDetails() } /// Tag associated with the resource. + [WirePath("tag")] public AssociatedTagProperties Tag { get; } /// API associated with the tag. + [WirePath("api")] public AssociatedApiProperties Api { get; } /// Operation associated with the tag. + [WirePath("operation")] public AssociatedOperationProperties Operation { get; } /// Product associated with the tag. + [WirePath("product")] public AssociatedProductProperties Product { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagResourceListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagResourceListResult.Serialization.cs index 6917543c238c4..12bfbfea8cfb1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagResourceListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TagResourceListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static TagResourceListResult DeserializeTagResourceListResult(JsonEleme return new TagResourceListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(TagResourceListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantAccessInfoCreateOrUpdateContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantAccessInfoCreateOrUpdateContent.cs index 89d5e3c14fa0b..f5f63de403716 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantAccessInfoCreateOrUpdateContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantAccessInfoCreateOrUpdateContent.cs @@ -66,12 +66,16 @@ internal TenantAccessInfoCreateOrUpdateContent(string principalId, string primar } /// Principal (User) Identifier. + [WirePath("properties.principalId")] public string PrincipalId { get; set; } /// Primary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + [WirePath("properties.primaryKey")] public string PrimaryKey { get; set; } /// Secondary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + [WirePath("properties.secondaryKey")] public string SecondaryKey { get; set; } /// Determines whether direct access is enabled. + [WirePath("properties.enabled")] public bool? IsDirectAccessEnabled { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantAccessInfoPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantAccessInfoPatch.cs index 176e5b1c8b660..71d5a145c0d65 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantAccessInfoPatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantAccessInfoPatch.cs @@ -60,6 +60,7 @@ internal TenantAccessInfoPatch(bool? isDirectAccessEnabled, IDictionary Determines whether direct access is enabled. + [WirePath("properties.enabled")] public bool? IsDirectAccessEnabled { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantAccessInfoSecretsDetails.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantAccessInfoSecretsDetails.Serialization.cs index e1195e03ce249..71883eb792309 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantAccessInfoSecretsDetails.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantAccessInfoSecretsDetails.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -142,6 +143,129 @@ internal static TenantAccessInfoSecretsDetails DeserializeTenantAccessInfoSecret serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AccessInfoType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AccessInfoType)) + { + builder.Append(" id: "); + if (AccessInfoType.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AccessInfoType}'''"); + } + else + { + builder.AppendLine($"'{AccessInfoType}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PrincipalId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" principalId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PrincipalId)) + { + builder.Append(" principalId: "); + if (PrincipalId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PrincipalId}'''"); + } + else + { + builder.AppendLine($"'{PrincipalId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PrimaryKey), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" primaryKey: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PrimaryKey)) + { + builder.Append(" primaryKey: "); + if (PrimaryKey.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PrimaryKey}'''"); + } + else + { + builder.AppendLine($"'{PrimaryKey}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SecondaryKey), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" secondaryKey: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SecondaryKey)) + { + builder.Append(" secondaryKey: "); + if (SecondaryKey.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SecondaryKey}'''"); + } + else + { + builder.AppendLine($"'{SecondaryKey}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsDirectAccessEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsDirectAccessEnabled)) + { + builder.Append(" enabled: "); + var boolValue = IsDirectAccessEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -150,6 +274,8 @@ BinaryData IPersistableModel.Write(ModelReaderWr { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(TenantAccessInfoSecretsDetails)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantAccessInfoSecretsDetails.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantAccessInfoSecretsDetails.cs index 0e9c2ba98223b..7f072a3ffeecb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantAccessInfoSecretsDetails.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantAccessInfoSecretsDetails.cs @@ -68,14 +68,19 @@ internal TenantAccessInfoSecretsDetails(string accessInfoType, string principalI } /// Access Information type ('access' or 'gitAccess'). + [WirePath("id")] public string AccessInfoType { get; } /// Principal (User) Identifier. + [WirePath("principalId")] public string PrincipalId { get; } /// Primary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + [WirePath("primaryKey")] public string PrimaryKey { get; } /// Secondary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + [WirePath("secondaryKey")] public string SecondaryKey { get; } /// Determines whether direct access is enabled. + [WirePath("enabled")] public bool? IsDirectAccessEnabled { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantConfigurationSyncStateContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantConfigurationSyncStateContract.Serialization.cs index d96d797498782..fd6036a40c91b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantConfigurationSyncStateContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantConfigurationSyncStateContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -262,6 +263,226 @@ internal static TenantConfigurationSyncStateContract DeserializeTenantConfigurat serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Branch), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" branch: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Branch)) + { + builder.Append(" branch: "); + if (Branch.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Branch}'''"); + } + else + { + builder.AppendLine($"'{Branch}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CommitId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" commitId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CommitId)) + { + builder.Append(" commitId: "); + if (CommitId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{CommitId}'''"); + } + else + { + builder.AppendLine($"'{CommitId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsExported), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isExport: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsExported)) + { + builder.Append(" isExport: "); + var boolValue = IsExported.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsSynced), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isSynced: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsSynced)) + { + builder.Append(" isSynced: "); + var boolValue = IsSynced.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsGitEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isGitEnabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsGitEnabled)) + { + builder.Append(" isGitEnabled: "); + var boolValue = IsGitEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SyncOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" syncDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SyncOn)) + { + builder.Append(" syncDate: "); + var formattedDateTimeString = TypeFormatters.ToString(SyncOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ConfigurationChangeOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" configurationChangeDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ConfigurationChangeOn)) + { + builder.Append(" configurationChangeDate: "); + var formattedDateTimeString = TypeFormatters.ToString(ConfigurationChangeOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastOperationId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastOperationId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LastOperationId)) + { + builder.Append(" lastOperationId: "); + if (LastOperationId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{LastOperationId}'''"); + } + else + { + builder.AppendLine($"'{LastOperationId}'"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -270,6 +491,8 @@ BinaryData IPersistableModel.Write(ModelRe { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(TenantConfigurationSyncStateContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantConfigurationSyncStateContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantConfigurationSyncStateContract.cs index c79532fd30cea..f28104be6e886 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantConfigurationSyncStateContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantConfigurationSyncStateContract.cs @@ -86,26 +86,34 @@ internal TenantConfigurationSyncStateContract(ResourceIdentifier id, string name } /// The name of Git branch. + [WirePath("properties.branch")] public string Branch { get; set; } /// The latest commit Id. + [WirePath("properties.commitId")] public string CommitId { get; set; } /// value indicating if last sync was save (true) or deploy (false) operation. + [WirePath("properties.isExport")] public bool? IsExported { get; set; } /// value indicating if last synchronization was later than the configuration change. + [WirePath("properties.isSynced")] public bool? IsSynced { get; set; } /// value indicating whether Git configuration access is enabled. + [WirePath("properties.isGitEnabled")] public bool? IsGitEnabled { get; set; } /// /// The date of the latest synchronization. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("properties.syncDate")] public DateTimeOffset? SyncOn { get; set; } /// /// The date of the latest configuration change. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("properties.configurationChangeDate")] public DateTimeOffset? ConfigurationChangeOn { get; set; } /// Most recent tenant configuration operation identifier. + [WirePath("properties.lastOperationId")] public string LastOperationId { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantSettingsListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantSettingsListResult.Serialization.cs index e14409a101472..a071090151eab 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantSettingsListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TenantSettingsListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -113,6 +115,67 @@ internal static TenantSettingsListResult DeserializeTenantSettingsListResult(Jso return new TenantSettingsListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -121,6 +184,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(TenantSettingsListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TermsOfServiceProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TermsOfServiceProperties.Serialization.cs index eead8f7310049..23f22dea8eec5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TermsOfServiceProperties.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TermsOfServiceProperties.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -118,6 +119,76 @@ internal static TermsOfServiceProperties DeserializeTermsOfServiceProperties(Jso return new TermsOfServiceProperties(text, enabled, consentRequired, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Text), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" text: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Text)) + { + builder.Append(" text: "); + if (Text.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Text}'''"); + } + else + { + builder.AppendLine($"'{Text}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsDisplayEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsDisplayEnabled)) + { + builder.Append(" enabled: "); + var boolValue = IsDisplayEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsConsentRequired), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" consentRequired: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsConsentRequired)) + { + builder.Append(" consentRequired: "); + var boolValue = IsConsentRequired.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -126,6 +197,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(TermsOfServiceProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TermsOfServiceProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TermsOfServiceProperties.cs index 4e6a3650361e0..31878f8bb8f4f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TermsOfServiceProperties.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TermsOfServiceProperties.cs @@ -64,10 +64,13 @@ internal TermsOfServiceProperties(string text, bool? isDisplayEnabled, bool? isC } /// A terms of service text. + [WirePath("text")] public string Text { get; set; } /// Display terms of service during a sign-up process. + [WirePath("enabled")] public bool? IsDisplayEnabled { get; set; } /// Ask user for consent to the terms of service. + [WirePath("consentRequired")] public bool? IsConsentRequired { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TokenBodyParameterContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TokenBodyParameterContract.Serialization.cs index 3653ff3587079..fdef6fa389a85 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TokenBodyParameterContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TokenBodyParameterContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -93,6 +94,67 @@ internal static TokenBodyParameterContract DeserializeTokenBodyParameterContract return new TokenBodyParameterContract(name, value, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + if (Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Value}'''"); + } + else + { + builder.AppendLine($"'{Value}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -101,6 +163,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriter { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(TokenBodyParameterContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TokenBodyParameterContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TokenBodyParameterContract.cs index 334c8c904fcd0..395665600546d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TokenBodyParameterContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TokenBodyParameterContract.cs @@ -75,8 +75,10 @@ internal TokenBodyParameterContract() } /// body parameter name. + [WirePath("name")] public string Name { get; set; } /// body parameter value. + [WirePath("value")] public string Value { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TranslateRequiredQueryParametersConduct.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TranslateRequiredQueryParametersConduct.cs new file mode 100644 index 0000000000000..f258007515867 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/TranslateRequiredQueryParametersConduct.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.ApiManagement.Models +{ + /// Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', 'query'. + public readonly partial struct TranslateRequiredQueryParametersConduct : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public TranslateRequiredQueryParametersConduct(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TemplateValue = "template"; + private const string QueryValue = "query"; + + /// Translates required query parameters to template ones. Is a default value. + public static TranslateRequiredQueryParametersConduct Template { get; } = new TranslateRequiredQueryParametersConduct(TemplateValue); + /// Leaves required query parameters as they are (no translation done). + public static TranslateRequiredQueryParametersConduct Query { get; } = new TranslateRequiredQueryParametersConduct(QueryValue); + /// Determines if two values are the same. + public static bool operator ==(TranslateRequiredQueryParametersConduct left, TranslateRequiredQueryParametersConduct right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(TranslateRequiredQueryParametersConduct left, TranslateRequiredQueryParametersConduct right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator TranslateRequiredQueryParametersConduct(string value) => new TranslateRequiredQueryParametersConduct(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is TranslateRequiredQueryParametersConduct other && Equals(other); + /// + public bool Equals(TranslateRequiredQueryParametersConduct other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserIdentityContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserIdentityContract.Serialization.cs index aa66da236e679..1c604c59eda05 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserIdentityContract.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserIdentityContract.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -99,6 +100,67 @@ internal static UserIdentityContract DeserializeUserIdentityContract(JsonElement return new UserIdentityContract(provider, id, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Provider), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provider: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Provider)) + { + builder.Append(" provider: "); + if (Provider.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Provider}'''"); + } + else + { + builder.AppendLine($"'{Provider}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + if (Id.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Id}'''"); + } + else + { + builder.AppendLine($"'{Id}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -107,6 +169,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(UserIdentityContract)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserIdentityContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserIdentityContract.cs index 8faffbd1ba649..0354d45d1fa5a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserIdentityContract.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserIdentityContract.cs @@ -62,8 +62,10 @@ internal UserIdentityContract(string provider, string id, IDictionary Identity provider name. + [WirePath("provider")] public string Provider { get; set; } /// Identifier value within provider. + [WirePath("id")] public string Id { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserIdentityListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserIdentityListResult.Serialization.cs index 2fab613574f55..57b20deb4e6b0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserIdentityListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserIdentityListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static UserIdentityListResult DeserializeUserIdentityListResult(JsonEle return new UserIdentityListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(UserIdentityListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserListResult.Serialization.cs index 9db855305335a..3d6f787e9092d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserListResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static UserListResult DeserializeUserListResult(JsonElement element, Mo return new UserListResult(value ?? new ChangeTrackingList(), count, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Count), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" count: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Count)) + { + builder.Append(" count: "); + builder.AppendLine($"'{Count.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(UserListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserTokenContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserTokenContent.cs index 27e046450cff9..9437c713361bd 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserTokenContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserTokenContent.cs @@ -65,11 +65,13 @@ internal UserTokenContent(TokenGenerationUsedKeyType? keyType, DateTimeOffset? e } /// The Key to be used to generate token for user. + [WirePath("properties.keyType")] public TokenGenerationUsedKeyType? KeyType { get; set; } /// /// The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("properties.expiry")] public DateTimeOffset? ExpireOn { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserTokenResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserTokenResult.Serialization.cs index 8458efeffef75..8231a1de702c6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserTokenResult.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserTokenResult.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -88,6 +89,44 @@ internal static UserTokenResult DeserializeUserTokenResult(JsonElement element, return new UserTokenResult(value, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + if (Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Value}'''"); + } + else + { + builder.AppendLine($"'{Value}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -96,6 +135,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opt { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(UserTokenResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserTokenResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserTokenResult.cs index c3bd3c177fe86..85718bdd2c977 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserTokenResult.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/UserTokenResult.cs @@ -60,6 +60,7 @@ internal UserTokenResult(string value, IDictionary serialize } /// Shared Access Authorization token for the User. + [WirePath("value")] public string Value { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/VirtualNetworkConfiguration.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/VirtualNetworkConfiguration.Serialization.cs index cdd29c67cb497..13f61b9d760d1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/VirtualNetworkConfiguration.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/VirtualNetworkConfiguration.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -118,6 +119,74 @@ internal static VirtualNetworkConfiguration DeserializeVirtualNetworkConfigurati return new VirtualNetworkConfiguration(vnetid, subnetname, subnetResourceId, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VnetId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" vnetid: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(VnetId)) + { + builder.Append(" vnetid: "); + builder.AppendLine($"'{VnetId.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Subnetname), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subnetname: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Subnetname)) + { + builder.Append(" subnetname: "); + if (Subnetname.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Subnetname}'''"); + } + else + { + builder.AppendLine($"'{Subnetname}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SubnetResourceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subnetResourceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SubnetResourceId)) + { + builder.Append(" subnetResourceId: "); + builder.AppendLine($"'{SubnetResourceId.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -126,6 +195,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrite { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(VirtualNetworkConfiguration)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/VirtualNetworkConfiguration.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/VirtualNetworkConfiguration.cs index 4701cd7f152a2..22479ff0efd4d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/VirtualNetworkConfiguration.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/VirtualNetworkConfiguration.cs @@ -65,10 +65,13 @@ internal VirtualNetworkConfiguration(Guid? vnetId, string subnetname, ResourceId } /// The virtual network ID. This is typically a GUID. Expect a null GUID by default. + [WirePath("vnetid")] public Guid? VnetId { get; } /// The name of the subnet. + [WirePath("subnetname")] public string Subnetname { get; } /// The full resource ID of a subnet in a virtual network to deploy the API Management service in. + [WirePath("subnetResourceId")] public ResourceIdentifier SubnetResourceId { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiDocumentationContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiDocumentationContract.Serialization.cs new file mode 100644 index 0000000000000..03a24c1ba2baa --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiDocumentationContract.Serialization.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + public partial class WikiDocumentationContract : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WikiDocumentationContract)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(DocumentationId)) + { + writer.WritePropertyName("documentationId"u8); + writer.WriteStringValue(DocumentationId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WikiDocumentationContract IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WikiDocumentationContract)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWikiDocumentationContract(document.RootElement, options); + } + + internal static WikiDocumentationContract DeserializeWikiDocumentationContract(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string documentationId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("documentationId"u8)) + { + documentationId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WikiDocumentationContract(documentationId, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DocumentationId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" documentationId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DocumentationId)) + { + builder.Append(" documentationId: "); + if (DocumentationId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DocumentationId}'''"); + } + else + { + builder.AppendLine($"'{DocumentationId}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WikiDocumentationContract)} does not support writing '{options.Format}' format."); + } + } + + WikiDocumentationContract IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWikiDocumentationContract(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WikiDocumentationContract)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiDocumentationContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiDocumentationContract.cs new file mode 100644 index 0000000000000..b3acd93214836 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiDocumentationContract.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// Wiki documentation details. + public partial class WikiDocumentationContract + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WikiDocumentationContract() + { + } + + /// Initializes a new instance of . + /// Documentation Identifier. + /// Keeps track of any properties unknown to the library. + internal WikiDocumentationContract(string documentationId, IDictionary serializedAdditionalRawData) + { + DocumentationId = documentationId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Documentation Identifier. + [WirePath("documentationId")] + public string DocumentationId { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiUpdateContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiUpdateContract.Serialization.cs new file mode 100644 index 0000000000000..b7fee2f98a9cb --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiUpdateContract.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + public partial class WikiUpdateContract : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WikiUpdateContract)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Documents)) + { + writer.WritePropertyName("documents"u8); + writer.WriteStartArray(); + foreach (var item in Documents) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WikiUpdateContract IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WikiUpdateContract)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWikiUpdateContract(document.RootElement, options); + } + + internal static WikiUpdateContract DeserializeWikiUpdateContract(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList documents = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("documents"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(WikiDocumentationContract.DeserializeWikiDocumentationContract(item, options)); + } + documents = array; + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WikiUpdateContract(documents ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(WikiUpdateContract)} does not support writing '{options.Format}' format."); + } + } + + WikiUpdateContract IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWikiUpdateContract(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WikiUpdateContract)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiUpdateContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiUpdateContract.cs new file mode 100644 index 0000000000000..4b315e98e0ee0 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/WikiUpdateContract.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// Wiki update contract details. + public partial class WikiUpdateContract + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WikiUpdateContract() + { + Documents = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Collection wiki documents included into this wiki. + /// Keeps track of any properties unknown to the library. + internal WikiUpdateContract(IList documents, IDictionary serializedAdditionalRawData) + { + Documents = documents; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Collection wiki documents included into this wiki. + [WirePath("properties.documents")] + public IList Documents { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/X509CertificateName.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/X509CertificateName.Serialization.cs index 86549b87f877f..e97b5c1ca66bd 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/X509CertificateName.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/X509CertificateName.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -99,6 +100,67 @@ internal static X509CertificateName DeserializeX509CertificateName(JsonElement e return new X509CertificateName(name, issuerCertificateThumbprint, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IssuerCertificateThumbprint), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" issuerCertificateThumbprint: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IssuerCertificateThumbprint)) + { + builder.Append(" issuerCertificateThumbprint: "); + if (IssuerCertificateThumbprint.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{IssuerCertificateThumbprint}'''"); + } + else + { + builder.AppendLine($"'{IssuerCertificateThumbprint}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -107,6 +169,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(X509CertificateName)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/X509CertificateName.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/X509CertificateName.cs index 04f363ab5558d..c9f65a055f8d4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/X509CertificateName.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/X509CertificateName.cs @@ -62,8 +62,10 @@ internal X509CertificateName(string name, string issuerCertificateThumbprint, ID } /// Common Name of the Certificate. + [WirePath("name")] public string Name { get; set; } /// Thumbprint for the Issuer of the Certificate. + [WirePath("issuerCertificateThumbprint")] public string IssuerCertificateThumbprint { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyContractData.Serialization.cs index e538e07b4c8b3..f06ff96806283 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyContractData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyContractData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -175,6 +176,115 @@ internal static PolicyContractData DeserializePolicyContractData(JsonElement ele serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + if (Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Value}'''"); + } + else + { + builder.AppendLine($"'{Value}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Format), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" format: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Format)) + { + builder.Append(" format: "); + builder.AppendLine($"'{Format.Value.ToString()}'"); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -183,6 +293,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(PolicyContractData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyContractData.cs index e19bbf17fbc50..42661afba59ee 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyContractData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyContractData.cs @@ -72,8 +72,10 @@ internal PolicyContractData(ResourceIdentifier id, string name, ResourceType res } /// Contents of the Policy as defined by the format. + [WirePath("properties.value")] public string Value { get; set; } /// Format of the policyContent. + [WirePath("properties.format")] public PolicyContentFormat? Format { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractCollection.cs new file mode 100644 index 0000000000000..04a394479e41f --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractCollection.cs @@ -0,0 +1,508 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetPolicyFragmentContracts method from an instance of . + /// + public partial class PolicyFragmentContractCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _policyFragmentContractPolicyFragmentClientDiagnostics; + private readonly PolicyFragmentRestOperations _policyFragmentContractPolicyFragmentRestClient; + + /// Initializes a new instance of the class for mocking. + protected PolicyFragmentContractCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal PolicyFragmentContractCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _policyFragmentContractPolicyFragmentClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", PolicyFragmentContractResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(PolicyFragmentContractResource.ResourceType, out string policyFragmentContractPolicyFragmentApiVersion); + _policyFragmentContractPolicyFragmentRestClient = new PolicyFragmentRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, policyFragmentContractPolicyFragmentApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ApiManagementServiceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ApiManagementServiceResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// A resource identifier. + /// The policy fragment contents to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string id, PolicyFragmentContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(id, nameof(id)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _policyFragmentContractPolicyFragmentRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, data, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(new PolicyFragmentContractOperationSource(Client), _policyFragmentContractPolicyFragmentClientDiagnostics, Pipeline, _policyFragmentContractPolicyFragmentRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, data, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// A resource identifier. + /// The policy fragment contents to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string id, PolicyFragmentContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(id, nameof(id)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _policyFragmentContractPolicyFragmentRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, data, ifMatch, cancellationToken); + var operation = new ApiManagementArmOperation(new PolicyFragmentContractOperationSource(Client), _policyFragmentContractPolicyFragmentClientDiagnostics, Pipeline, _policyFragmentContractPolicyFragmentRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, data, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// A resource identifier. + /// Policy fragment content format. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string id, PolicyFragmentContentFormat? format = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractCollection.Get"); + scope.Start(); + try + { + var response = await _policyFragmentContractPolicyFragmentRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, format, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PolicyFragmentContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// A resource identifier. + /// Policy fragment content format. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string id, PolicyFragmentContentFormat? format = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractCollection.Get"); + scope.Start(); + try + { + var response = _policyFragmentContractPolicyFragmentRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, format, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PolicyFragmentContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets all policy fragments. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments + /// + /// + /// Operation Id + /// PolicyFragment_ListByService + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter, orderBy | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| value | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// OData order by query option. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string filter = null, string orderBy = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _policyFragmentContractPolicyFragmentRestClient.CreateListByServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, orderBy, top, skip); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => new PolicyFragmentContractResource(Client, PolicyFragmentContractData.DeserializePolicyFragmentContractData(e)), _policyFragmentContractPolicyFragmentClientDiagnostics, Pipeline, "PolicyFragmentContractCollection.GetAll", "value", null, cancellationToken); + } + + /// + /// Gets all policy fragments. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments + /// + /// + /// Operation Id + /// PolicyFragment_ListByService + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter, orderBy | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| value | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// OData order by query option. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string filter = null, string orderBy = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _policyFragmentContractPolicyFragmentRestClient.CreateListByServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, orderBy, top, skip); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => new PolicyFragmentContractResource(Client, PolicyFragmentContractData.DeserializePolicyFragmentContractData(e)), _policyFragmentContractPolicyFragmentClientDiagnostics, Pipeline, "PolicyFragmentContractCollection.GetAll", "value", null, cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// A resource identifier. + /// Policy fragment content format. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string id, PolicyFragmentContentFormat? format = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractCollection.Exists"); + scope.Start(); + try + { + var response = await _policyFragmentContractPolicyFragmentRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, format, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// A resource identifier. + /// Policy fragment content format. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string id, PolicyFragmentContentFormat? format = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractCollection.Exists"); + scope.Start(); + try + { + var response = _policyFragmentContractPolicyFragmentRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, format, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// A resource identifier. + /// Policy fragment content format. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string id, PolicyFragmentContentFormat? format = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _policyFragmentContractPolicyFragmentRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, format, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new PolicyFragmentContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// A resource identifier. + /// Policy fragment content format. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string id, PolicyFragmentContentFormat? format = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractCollection.GetIfExists"); + scope.Start(); + try + { + var response = _policyFragmentContractPolicyFragmentRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, id, format, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new PolicyFragmentContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractData.Serialization.cs new file mode 100644 index 0000000000000..ffec2b055f287 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractData.Serialization.cs @@ -0,0 +1,356 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ApiManagement.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + public partial class PolicyFragmentContractData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PolicyFragmentContractData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(Format)) + { + writer.WritePropertyName("format"u8); + writer.WriteStringValue(Format.Value.ToString()); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + PolicyFragmentContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PolicyFragmentContractData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePolicyFragmentContractData(document.RootElement, options); + } + + internal static PolicyFragmentContractData DeserializePolicyFragmentContractData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + string value = default; + string description = default; + PolicyFragmentContentFormat? format = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("value"u8)) + { + value = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("description"u8)) + { + description = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("format"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + format = new PolicyFragmentContentFormat(property0.Value.GetString()); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PolicyFragmentContractData( + id, + name, + type, + systemData, + value, + description, + format, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + if (Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Value}'''"); + } + else + { + builder.AppendLine($"'{Value}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Format), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" format: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Format)) + { + builder.Append(" format: "); + builder.AppendLine($"'{Format.Value.ToString()}'"); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(PolicyFragmentContractData)} does not support writing '{options.Format}' format."); + } + } + + PolicyFragmentContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializePolicyFragmentContractData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PolicyFragmentContractData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractData.cs new file mode 100644 index 0000000000000..e426417cddfcb --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractData.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.ApiManagement.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing the PolicyFragmentContract data model. + /// Policy fragment contract details. + /// + public partial class PolicyFragmentContractData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public PolicyFragmentContractData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Contents of the policy fragment. + /// Policy fragment description. + /// Format of the policy fragment content. + /// Keeps track of any properties unknown to the library. + internal PolicyFragmentContractData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string value, string description, PolicyFragmentContentFormat? format, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Value = value; + Description = description; + Format = format; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Contents of the policy fragment. + [WirePath("properties.value")] + public string Value { get; set; } + /// Policy fragment description. + [WirePath("properties.description")] + public string Description { get; set; } + /// Format of the policy fragment content. + [WirePath("properties.format")] + public PolicyFragmentContentFormat? Format { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractResource.Serialization.cs new file mode 100644 index 0000000000000..7bd69c6df7b88 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.ApiManagement +{ + public partial class PolicyFragmentContractResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + PolicyFragmentContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + PolicyFragmentContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractResource.cs new file mode 100644 index 0000000000000..23faf63b47dc6 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractResource.cs @@ -0,0 +1,497 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A Class representing a PolicyFragmentContract along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetPolicyFragmentContractResource method. + /// Otherwise you can get one from its parent resource using the GetPolicyFragmentContract method. + /// + public partial class PolicyFragmentContractResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The serviceName. + /// The id. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string id) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _policyFragmentContractPolicyFragmentClientDiagnostics; + private readonly PolicyFragmentRestOperations _policyFragmentContractPolicyFragmentRestClient; + private readonly PolicyFragmentContractData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/service/policyFragments"; + + /// Initializes a new instance of the class for mocking. + protected PolicyFragmentContractResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal PolicyFragmentContractResource(ArmClient client, PolicyFragmentContractData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal PolicyFragmentContractResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _policyFragmentContractPolicyFragmentClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string policyFragmentContractPolicyFragmentApiVersion); + _policyFragmentContractPolicyFragmentRestClient = new PolicyFragmentRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, policyFragmentContractPolicyFragmentApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual PolicyFragmentContractData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Policy fragment content format. + /// The cancellation token to use. + public virtual async Task> GetAsync(PolicyFragmentContentFormat? format = null, CancellationToken cancellationToken = default) + { + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractResource.Get"); + scope.Start(); + try + { + var response = await _policyFragmentContractPolicyFragmentRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, format, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PolicyFragmentContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Policy fragment content format. + /// The cancellation token to use. + public virtual Response Get(PolicyFragmentContentFormat? format = null, CancellationToken cancellationToken = default) + { + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractResource.Get"); + scope.Start(); + try + { + var response = _policyFragmentContractPolicyFragmentRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, format, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PolicyFragmentContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_Delete + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractResource.Delete"); + scope.Start(); + try + { + var response = await _policyFragmentContractPolicyFragmentRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _policyFragmentContractPolicyFragmentRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_Delete + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractResource.Delete"); + scope.Start(); + try + { + var response = _policyFragmentContractPolicyFragmentRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var uri = _policyFragmentContractPolicyFragmentRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The policy fragment contents to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, PolicyFragmentContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractResource.Update"); + scope.Start(); + try + { + var response = await _policyFragmentContractPolicyFragmentRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(new PolicyFragmentContractOperationSource(Client), _policyFragmentContractPolicyFragmentClientDiagnostics, Pipeline, _policyFragmentContractPolicyFragmentRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The policy fragment contents to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, PolicyFragmentContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractResource.Update"); + scope.Start(); + try + { + var response = _policyFragmentContractPolicyFragmentRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken); + var operation = new ApiManagementArmOperation(new PolicyFragmentContractOperationSource(Client), _policyFragmentContractPolicyFragmentClientDiagnostics, Pipeline, _policyFragmentContractPolicyFragmentRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists policy resources that reference the policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}/listReferences + /// + /// + /// Operation Id + /// PolicyFragment_ListReferences + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetReferencesAsync(int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _policyFragmentContractPolicyFragmentRestClient.CreateListReferencesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, top, skip); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => ResourceCollectionValueItem.DeserializeResourceCollectionValueItem(e), _policyFragmentContractPolicyFragmentClientDiagnostics, Pipeline, "PolicyFragmentContractResource.GetReferences", "value", null, cancellationToken); + } + + /// + /// Lists policy resources that reference the policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id}/listReferences + /// + /// + /// Operation Id + /// PolicyFragment_ListReferences + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetReferences(int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _policyFragmentContractPolicyFragmentRestClient.CreateListReferencesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, top, skip); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => ResourceCollectionValueItem.DeserializeResourceCollectionValueItem(e), _policyFragmentContractPolicyFragmentClientDiagnostics, Pipeline, "PolicyFragmentContractResource.GetReferences", "value", null, cancellationToken); + } + + /// + /// Gets the entity state (Etag) version of a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_GetEntityTag + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetEntityTagAsync(CancellationToken cancellationToken = default) + { + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractResource.GetEntityTag"); + scope.Start(); + try + { + var response = await _policyFragmentContractPolicyFragmentRestClient.GetEntityTagAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of a policy fragment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyFragments/{id} + /// + /// + /// Operation Id + /// PolicyFragment_GetEntityTag + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetEntityTag(CancellationToken cancellationToken = default) + { + using var scope = _policyFragmentContractPolicyFragmentClientDiagnostics.CreateScope("PolicyFragmentContractResource.GetEntityTag"); + scope.Start(); + try + { + var response = _policyFragmentContractPolicyFragmentRestClient.GetEntityTag(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractCollection.cs new file mode 100644 index 0000000000000..a116ae23d4426 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractCollection.cs @@ -0,0 +1,497 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetPortalConfigContracts method from an instance of . + /// + public partial class PortalConfigContractCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _portalConfigContractPortalConfigClientDiagnostics; + private readonly PortalConfigRestOperations _portalConfigContractPortalConfigRestClient; + + /// Initializes a new instance of the class for mocking. + protected PortalConfigContractCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal PortalConfigContractCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _portalConfigContractPortalConfigClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", PortalConfigContractResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(PortalConfigContractResource.ResourceType, out string portalConfigContractPortalConfigApiVersion); + _portalConfigContractPortalConfigRestClient = new PortalConfigRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, portalConfigContractPortalConfigApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ApiManagementServiceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ApiManagementServiceResource.ResourceType), nameof(id)); + } + + /// + /// Create or update the developer portal configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Portal configuration identifier. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Update the developer portal configuration. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string portalConfigId, ETag ifMatch, PortalConfigContractData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _portalConfigContractPortalConfigRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, portalConfigId, ifMatch, data, cancellationToken).ConfigureAwait(false); + var uri = _portalConfigContractPortalConfigRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, portalConfigId, ifMatch, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new PortalConfigContractResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update the developer portal configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Portal configuration identifier. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Update the developer portal configuration. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string portalConfigId, ETag ifMatch, PortalConfigContractData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _portalConfigContractPortalConfigRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, portalConfigId, ifMatch, data, cancellationToken); + var uri = _portalConfigContractPortalConfigRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, portalConfigId, ifMatch, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new PortalConfigContractResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the developer portal configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Portal configuration identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string portalConfigId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractCollection.Get"); + scope.Start(); + try + { + var response = await _portalConfigContractPortalConfigRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, portalConfigId, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PortalConfigContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the developer portal configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Portal configuration identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string portalConfigId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractCollection.Get"); + scope.Start(); + try + { + var response = _portalConfigContractPortalConfigRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, portalConfigId, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PortalConfigContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists the developer portal configurations. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs + /// + /// + /// Operation Id + /// PortalConfig_ListByService + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _portalConfigContractPortalConfigRestClient.CreateListByServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => new PortalConfigContractResource(Client, PortalConfigContractData.DeserializePortalConfigContractData(e)), _portalConfigContractPortalConfigClientDiagnostics, Pipeline, "PortalConfigContractCollection.GetAll", "value", null, cancellationToken); + } + + /// + /// Lists the developer portal configurations. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs + /// + /// + /// Operation Id + /// PortalConfig_ListByService + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _portalConfigContractPortalConfigRestClient.CreateListByServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => new PortalConfigContractResource(Client, PortalConfigContractData.DeserializePortalConfigContractData(e)), _portalConfigContractPortalConfigClientDiagnostics, Pipeline, "PortalConfigContractCollection.GetAll", "value", null, cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Portal configuration identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string portalConfigId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractCollection.Exists"); + scope.Start(); + try + { + var response = await _portalConfigContractPortalConfigRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, portalConfigId, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Portal configuration identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string portalConfigId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractCollection.Exists"); + scope.Start(); + try + { + var response = _portalConfigContractPortalConfigRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, portalConfigId, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Portal configuration identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string portalConfigId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _portalConfigContractPortalConfigRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, portalConfigId, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new PortalConfigContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Portal configuration identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string portalConfigId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractCollection.GetIfExists"); + scope.Start(); + try + { + var response = _portalConfigContractPortalConfigRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, portalConfigId, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new PortalConfigContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractData.Serialization.cs new file mode 100644 index 0000000000000..6dd6c0acb432c --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractData.Serialization.cs @@ -0,0 +1,457 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ApiManagement.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + public partial class PortalConfigContractData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PortalConfigContractData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(EnableBasicAuth)) + { + writer.WritePropertyName("enableBasicAuth"u8); + writer.WriteBooleanValue(EnableBasicAuth.Value); + } + if (Optional.IsDefined(Signin)) + { + writer.WritePropertyName("signin"u8); + writer.WriteObjectValue(Signin, options); + } + if (Optional.IsDefined(Signup)) + { + writer.WritePropertyName("signup"u8); + writer.WriteObjectValue(Signup, options); + } + if (Optional.IsDefined(Delegation)) + { + writer.WritePropertyName("delegation"u8); + writer.WriteObjectValue(Delegation, options); + } + if (Optional.IsDefined(Cors)) + { + writer.WritePropertyName("cors"u8); + writer.WriteObjectValue(Cors, options); + } + if (Optional.IsDefined(Csp)) + { + writer.WritePropertyName("csp"u8); + writer.WriteObjectValue(Csp, options); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + PortalConfigContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PortalConfigContractData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePortalConfigContractData(document.RootElement, options); + } + + internal static PortalConfigContractData DeserializePortalConfigContractData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + bool? enableBasicAuth = default; + PortalConfigPropertiesSignin signin = default; + PortalConfigPropertiesSignup signup = default; + PortalConfigDelegationProperties delegation = default; + PortalConfigCorsProperties cors = default; + PortalConfigCspProperties csp = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("enableBasicAuth"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableBasicAuth = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("signin"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + signin = PortalConfigPropertiesSignin.DeserializePortalConfigPropertiesSignin(property0.Value, options); + continue; + } + if (property0.NameEquals("signup"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + signup = PortalConfigPropertiesSignup.DeserializePortalConfigPropertiesSignup(property0.Value, options); + continue; + } + if (property0.NameEquals("delegation"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + delegation = PortalConfigDelegationProperties.DeserializePortalConfigDelegationProperties(property0.Value, options); + continue; + } + if (property0.NameEquals("cors"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cors = PortalConfigCorsProperties.DeserializePortalConfigCorsProperties(property0.Value, options); + continue; + } + if (property0.NameEquals("csp"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + csp = PortalConfigCspProperties.DeserializePortalConfigCspProperties(property0.Value, options); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PortalConfigContractData( + id, + name, + type, + systemData, + enableBasicAuth, + signin, + signup, + delegation, + cors, + csp, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EnableBasicAuth), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enableBasicAuth: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EnableBasicAuth)) + { + builder.Append(" enableBasicAuth: "); + var boolValue = EnableBasicAuth.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("Require", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" signin: "); + builder.AppendLine("{"); + builder.AppendLine(" signin: {"); + builder.Append(" require: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Signin)) + { + builder.Append(" signin: "); + BicepSerializationHelpers.AppendChildObject(builder, Signin, options, 4, false, " signin: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("SignupTermsOfService", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" signup: "); + builder.AppendLine("{"); + builder.AppendLine(" signup: {"); + builder.Append(" termsOfService: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Signup)) + { + builder.Append(" signup: "); + BicepSerializationHelpers.AppendChildObject(builder, Signup, options, 4, false, " signup: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Delegation), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" delegation: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Delegation)) + { + builder.Append(" delegation: "); + BicepSerializationHelpers.AppendChildObject(builder, Delegation, options, 4, false, " delegation: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("CorsAllowedOrigins", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" cors: "); + builder.AppendLine("{"); + builder.AppendLine(" cors: {"); + builder.Append(" allowedOrigins: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Cors)) + { + builder.Append(" cors: "); + BicepSerializationHelpers.AppendChildObject(builder, Cors, options, 4, false, " cors: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Csp), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" csp: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Csp)) + { + builder.Append(" csp: "); + BicepSerializationHelpers.AppendChildObject(builder, Csp, options, 4, false, " csp: "); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(PortalConfigContractData)} does not support writing '{options.Format}' format."); + } + } + + PortalConfigContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializePortalConfigContractData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PortalConfigContractData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractData.cs new file mode 100644 index 0000000000000..422d13d046558 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractData.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.ApiManagement.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing the PortalConfigContract data model. + /// The developer portal configuration contract. + /// + public partial class PortalConfigContractData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public PortalConfigContractData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Enable or disable Basic authentication method. + /// + /// + /// The developer portal delegation settings. + /// The developer portal Cross-Origin Resource Sharing (CORS) settings. + /// The developer portal Content Security Policy (CSP) settings. + /// Keeps track of any properties unknown to the library. + internal PortalConfigContractData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, bool? enableBasicAuth, PortalConfigPropertiesSignin signin, PortalConfigPropertiesSignup signup, PortalConfigDelegationProperties delegation, PortalConfigCorsProperties cors, PortalConfigCspProperties csp, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + EnableBasicAuth = enableBasicAuth; + Signin = signin; + Signup = signup; + Delegation = delegation; + Cors = cors; + Csp = csp; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Enable or disable Basic authentication method. + [WirePath("properties.enableBasicAuth")] + public bool? EnableBasicAuth { get; set; } + /// Gets or sets the signin. + internal PortalConfigPropertiesSignin Signin { get; set; } + /// Redirect anonymous users to the sign-in page. + [WirePath("properties.signin.require")] + public bool? Require + { + get => Signin is null ? default : Signin.Require; + set + { + if (Signin is null) + Signin = new PortalConfigPropertiesSignin(); + Signin.Require = value; + } + } + + /// Gets or sets the signup. + internal PortalConfigPropertiesSignup Signup { get; set; } + /// Terms of service settings. + [WirePath("properties.signup.termsOfService")] + public PortalConfigTermsOfServiceProperties SignupTermsOfService + { + get => Signup is null ? default : Signup.TermsOfService; + set + { + if (Signup is null) + Signup = new PortalConfigPropertiesSignup(); + Signup.TermsOfService = value; + } + } + + /// The developer portal delegation settings. + [WirePath("properties.delegation")] + public PortalConfigDelegationProperties Delegation { get; set; } + /// The developer portal Cross-Origin Resource Sharing (CORS) settings. + internal PortalConfigCorsProperties Cors { get; set; } + /// Allowed origins, e.g. `https://trusted.com`. + [WirePath("properties.cors.allowedOrigins")] + public IList CorsAllowedOrigins + { + get + { + if (Cors is null) + Cors = new PortalConfigCorsProperties(); + return Cors.AllowedOrigins; + } + } + + /// The developer portal Content Security Policy (CSP) settings. + [WirePath("properties.csp")] + public PortalConfigCspProperties Csp { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractResource.Serialization.cs new file mode 100644 index 0000000000000..c36db81869ca0 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.ApiManagement +{ + public partial class PortalConfigContractResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + PortalConfigContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + PortalConfigContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractResource.cs new file mode 100644 index 0000000000000..8589f01eea070 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractResource.cs @@ -0,0 +1,333 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A Class representing a PortalConfigContract along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetPortalConfigContractResource method. + /// Otherwise you can get one from its parent resource using the GetPortalConfigContract method. + /// + public partial class PortalConfigContractResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The serviceName. + /// The portalConfigId. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _portalConfigContractPortalConfigClientDiagnostics; + private readonly PortalConfigRestOperations _portalConfigContractPortalConfigRestClient; + private readonly PortalConfigContractData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/service/portalconfigs"; + + /// Initializes a new instance of the class for mocking. + protected PortalConfigContractResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal PortalConfigContractResource(ArmClient client, PortalConfigContractData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal PortalConfigContractResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _portalConfigContractPortalConfigClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string portalConfigContractPortalConfigApiVersion); + _portalConfigContractPortalConfigRestClient = new PortalConfigRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, portalConfigContractPortalConfigApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual PortalConfigContractData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get the developer portal configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractResource.Get"); + scope.Start(); + try + { + var response = await _portalConfigContractPortalConfigRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PortalConfigContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the developer portal configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractResource.Get"); + scope.Start(); + try + { + var response = _portalConfigContractPortalConfigRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PortalConfigContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update the developer portal configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_Update + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Update the developer portal configuration. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(ETag ifMatch, PortalConfigContractData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractResource.Update"); + scope.Start(); + try + { + var response = await _portalConfigContractPortalConfigRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, data, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new PortalConfigContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update the developer portal configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_Update + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Update the developer portal configuration. + /// The cancellation token to use. + /// is null. + public virtual Response Update(ETag ifMatch, PortalConfigContractData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractResource.Update"); + scope.Start(); + try + { + var response = _portalConfigContractPortalConfigRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, data, cancellationToken); + return Response.FromValue(new PortalConfigContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the developer portal configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_GetEntityTag + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetEntityTagAsync(CancellationToken cancellationToken = default) + { + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractResource.GetEntityTag"); + scope.Start(); + try + { + var response = await _portalConfigContractPortalConfigRestClient.GetEntityTagAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the developer portal configuration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalconfigs/{portalConfigId} + /// + /// + /// Operation Id + /// PortalConfig_GetEntityTag + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetEntityTag(CancellationToken cancellationToken = default) + { + using var scope = _portalConfigContractPortalConfigClientDiagnostics.CreateScope("PortalConfigContractResource.GetEntityTag"); + scope.Start(); + try + { + var response = _portalConfigContractPortalConfigRestClient.GetEntityTag(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractCollection.cs new file mode 100644 index 0000000000000..707c491cb42de --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractCollection.cs @@ -0,0 +1,505 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetResolverContracts method from an instance of . + /// + public partial class ResolverContractCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _resolverContractGraphQLApiResolverClientDiagnostics; + private readonly GraphQLApiResolverRestOperations _resolverContractGraphQLApiResolverRestClient; + + /// Initializes a new instance of the class for mocking. + protected ResolverContractCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal ResolverContractCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _resolverContractGraphQLApiResolverClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResolverContractResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResolverContractResource.ResourceType, out string resolverContractGraphQLApiResolverApiVersion); + _resolverContractGraphQLApiResolverRestClient = new GraphQLApiResolverRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, resolverContractGraphQLApiResolverApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ApiResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ApiResource.ResourceType), nameof(id)); + } + + /// + /// Creates a new resolver in the GraphQL API or updates an existing one. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string resolverId, ResolverContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _resolverContractGraphQLApiResolverRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, resolverId, data, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _resolverContractGraphQLApiResolverRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, resolverId, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new ResolverContractResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates a new resolver in the GraphQL API or updates an existing one. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string resolverId, ResolverContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _resolverContractGraphQLApiResolverRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, resolverId, data, ifMatch, cancellationToken); + var uri = _resolverContractGraphQLApiResolverRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, resolverId, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new ResolverContractResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the GraphQL API Resolver specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractCollection.Get"); + scope.Start(); + try + { + var response = await _resolverContractGraphQLApiResolverRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, resolverId, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ResolverContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the GraphQL API Resolver specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractCollection.Get"); + scope.Start(); + try + { + var response = _resolverContractGraphQLApiResolverRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, resolverId, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ResolverContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists a collection of the resolvers for the specified GraphQL API. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers + /// + /// + /// Operation Id + /// GraphQLApiResolver_ListByApi + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _resolverContractGraphQLApiResolverRestClient.CreateListByApiRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _resolverContractGraphQLApiResolverRestClient.CreateListByApiNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ResolverContractResource(Client, ResolverContractData.DeserializeResolverContractData(e)), _resolverContractGraphQLApiResolverClientDiagnostics, Pipeline, "ResolverContractCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists a collection of the resolvers for the specified GraphQL API. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers + /// + /// + /// Operation Id + /// GraphQLApiResolver_ListByApi + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _resolverContractGraphQLApiResolverRestClient.CreateListByApiRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _resolverContractGraphQLApiResolverRestClient.CreateListByApiNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ResolverContractResource(Client, ResolverContractData.DeserializeResolverContractData(e)), _resolverContractGraphQLApiResolverClientDiagnostics, Pipeline, "ResolverContractCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractCollection.Exists"); + scope.Start(); + try + { + var response = await _resolverContractGraphQLApiResolverRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, resolverId, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractCollection.Exists"); + scope.Start(); + try + { + var response = _resolverContractGraphQLApiResolverRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, resolverId, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _resolverContractGraphQLApiResolverRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, resolverId, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ResolverContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractCollection.GetIfExists"); + scope.Start(); + try + { + var response = _resolverContractGraphQLApiResolverRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, resolverId, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ResolverContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractData.Serialization.cs new file mode 100644 index 0000000000000..553255bf299e1 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractData.Serialization.cs @@ -0,0 +1,359 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + public partial class ResolverContractData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResolverContractData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsDefined(Path)) + { + writer.WritePropertyName("path"u8); + writer.WriteStringValue(Path); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ResolverContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResolverContractData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResolverContractData(document.RootElement, options); + } + + internal static ResolverContractData DeserializeResolverContractData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + string displayName = default; + string path = default; + string description = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("displayName"u8)) + { + displayName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("path"u8)) + { + path = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("description"u8)) + { + description = property0.Value.GetString(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResolverContractData( + id, + name, + type, + systemData, + displayName, + path, + description, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DisplayName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" displayName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DisplayName)) + { + builder.Append(" displayName: "); + if (DisplayName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DisplayName}'''"); + } + else + { + builder.AppendLine($"'{DisplayName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Path), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" path: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Path)) + { + builder.Append(" path: "); + if (Path.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Path}'''"); + } + else + { + builder.AppendLine($"'{Path}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ResolverContractData)} does not support writing '{options.Format}' format."); + } + } + + ResolverContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeResolverContractData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResolverContractData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractData.cs new file mode 100644 index 0000000000000..349251aacbc03 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractData.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing the ResolverContract data model. + /// GraphQL API Resolver details. + /// + public partial class ResolverContractData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ResolverContractData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Resolver Name. + /// Path is type/field being resolved. + /// Description of the resolver. May include HTML formatting tags. + /// Keeps track of any properties unknown to the library. + internal ResolverContractData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string displayName, string path, string description, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + DisplayName = displayName; + Path = path; + Description = description; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resolver Name. + [WirePath("properties.displayName")] + public string DisplayName { get; set; } + /// Path is type/field being resolved. + [WirePath("properties.path")] + public string Path { get; set; } + /// Description of the resolver. May include HTML formatting tags. + [WirePath("properties.description")] + public string Description { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractResource.Serialization.cs new file mode 100644 index 0000000000000..6a058777ec72a --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.ApiManagement +{ + public partial class ResolverContractResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ResolverContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + ResolverContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractResource.cs new file mode 100644 index 0000000000000..33fb55176023b --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractResource.cs @@ -0,0 +1,492 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A Class representing a ResolverContract along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetResolverContractResource method. + /// Otherwise you can get one from its parent resource using the GetResolverContract method. + /// + public partial class ResolverContractResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The serviceName. + /// The apiId. + /// The resolverId. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _resolverContractGraphQLApiResolverClientDiagnostics; + private readonly GraphQLApiResolverRestOperations _resolverContractGraphQLApiResolverRestClient; + private readonly ResolverContractData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/service/apis/resolvers"; + + /// Initializes a new instance of the class for mocking. + protected ResolverContractResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ResolverContractResource(ArmClient client, ResolverContractData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ResolverContractResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _resolverContractGraphQLApiResolverClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string resolverContractGraphQLApiResolverApiVersion); + _resolverContractGraphQLApiResolverRestClient = new GraphQLApiResolverRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, resolverContractGraphQLApiResolverApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual ResolverContractData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of ServiceApiResolverPolicyResources in the ResolverContract. + /// An object representing collection of ServiceApiResolverPolicyResources and their operations over a ServiceApiResolverPolicyResource. + public virtual ServiceApiResolverPolicyCollection GetServiceApiResolverPolicies() + { + return GetCachedClient(client => new ServiceApiResolverPolicyCollection(client, Id)); + } + + /// + /// Get the policy configuration at the GraphQL API Resolver level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The identifier of the Policy. + /// Policy Export Format. + /// The cancellation token to use. + [ForwardsClientCalls] + public virtual async Task> GetServiceApiResolverPolicyAsync(PolicyName policyId, PolicyExportFormat? format = null, CancellationToken cancellationToken = default) + { + return await GetServiceApiResolverPolicies().GetAsync(policyId, format, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the policy configuration at the GraphQL API Resolver level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The identifier of the Policy. + /// Policy Export Format. + /// The cancellation token to use. + [ForwardsClientCalls] + public virtual Response GetServiceApiResolverPolicy(PolicyName policyId, PolicyExportFormat? format = null, CancellationToken cancellationToken = default) + { + return GetServiceApiResolverPolicies().Get(policyId, format, cancellationToken); + } + + /// + /// Gets the details of the GraphQL API Resolver specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractResource.Get"); + scope.Start(); + try + { + var response = await _resolverContractGraphQLApiResolverRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ResolverContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the GraphQL API Resolver specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractResource.Get"); + scope.Start(); + try + { + var response = _resolverContractGraphQLApiResolverRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ResolverContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the specified resolver in the GraphQL API. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Delete + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractResource.Delete"); + scope.Start(); + try + { + var response = await _resolverContractGraphQLApiResolverRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _resolverContractGraphQLApiResolverRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the specified resolver in the GraphQL API. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Delete + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractResource.Delete"); + scope.Start(); + try + { + var response = _resolverContractGraphQLApiResolverRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var uri = _resolverContractGraphQLApiResolverRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the details of the resolver in the GraphQL API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Update + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// GraphQL API Resolver Update parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(ETag ifMatch, ResolverContractPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractResource.Update"); + scope.Start(); + try + { + var response = await _resolverContractGraphQLApiResolverRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ResolverContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the details of the resolver in the GraphQL API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_Update + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// GraphQL API Resolver Update parameters. + /// The cancellation token to use. + /// is null. + public virtual Response Update(ETag ifMatch, ResolverContractPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractResource.Update"); + scope.Start(); + try + { + var response = _resolverContractGraphQLApiResolverRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, patch, cancellationToken); + return Response.FromValue(new ResolverContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_GetEntityTag + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetEntityTagAsync(CancellationToken cancellationToken = default) + { + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractResource.GetEntityTag"); + scope.Start(); + try + { + var response = await _resolverContractGraphQLApiResolverRestClient.GetEntityTagAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId} + /// + /// + /// Operation Id + /// GraphQLApiResolver_GetEntityTag + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetEntityTag(CancellationToken cancellationToken = default) + { + using var scope = _resolverContractGraphQLApiResolverClientDiagnostics.CreateScope("ResolverContractResource.GetEntityTag"); + scope.Start(); + try + { + var response = _resolverContractGraphQLApiResolverRestClient.GetEntityTag(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiDiagnosticRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiDiagnosticRestOperations.cs index 60bf61cf7c846..cb93f163c6685 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiDiagnosticRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiDiagnosticRestOperations.cs @@ -32,7 +32,7 @@ public ApiDiagnosticRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -101,8 +101,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all diagnostics of an API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -135,8 +135,8 @@ public async Task> ListByServiceAsync(string subs } /// Lists all diagnostics of an API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -211,8 +211,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Diagnostic identifier. Must be unique in the current API Management service instance. @@ -247,8 +247,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Diagnostic identifier. Must be unique in the current API Management service instance. @@ -325,8 +325,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the Diagnostic for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Diagnostic identifier. Must be unique in the current API Management service instance. @@ -360,8 +360,8 @@ public async Task> GetAsync(string subscription } /// Gets the details of the Diagnostic for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Diagnostic identifier. Must be unique in the current API Management service instance. @@ -445,8 +445,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates a new Diagnostic for an API or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Diagnostic identifier. Must be unique in the current API Management service instance. @@ -482,8 +482,8 @@ public async Task> CreateOrUpdateAsync(string s } /// Creates a new Diagnostic for an API or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Diagnostic identifier. Must be unique in the current API Management service instance. @@ -566,8 +566,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the details of the Diagnostic for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Diagnostic identifier. Must be unique in the current API Management service instance. @@ -602,8 +602,8 @@ public async Task> UpdateAsync(string subscript } /// Updates the details of the Diagnostic for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Diagnostic identifier. Must be unique in the current API Management service instance. @@ -681,8 +681,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified Diagnostic from an API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Diagnostic identifier. Must be unique in the current API Management service instance. @@ -711,8 +711,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified Diagnostic from an API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Diagnostic identifier. Must be unique in the current API Management service instance. @@ -764,8 +764,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists all diagnostics of an API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -800,8 +800,8 @@ public async Task> ListByServiceNextPageAsync(str /// Lists all diagnostics of an API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueAttachmentRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueAttachmentRestOperations.cs index 3a5d2e56cd6bf..2ea4e027d97bd 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueAttachmentRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueAttachmentRestOperations.cs @@ -32,7 +32,7 @@ public ApiIssueAttachmentRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -105,8 +105,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all attachments for the Issue associated with the specified API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -141,8 +141,8 @@ public async Task> ListByServiceAsync(string } /// Lists all attachments for the Issue associated with the specified API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -223,8 +223,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -261,8 +261,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -345,8 +345,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the issue Attachment for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -382,8 +382,8 @@ public async Task> GetAsync(string subscription } /// Gets the details of the issue Attachment for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -473,8 +473,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates a new Attachment for the Issue in an API or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -512,8 +512,8 @@ public async Task> CreateOrUpdateAsync(string s } /// Creates a new Attachment for the Issue in an API or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -598,8 +598,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified comment from an Issue. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -630,8 +630,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified comment from an Issue. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -685,8 +685,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists all attachments for the Issue associated with the specified API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -723,8 +723,8 @@ public async Task> ListByServiceNextPageAsyn /// Lists all attachments for the Issue associated with the specified API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueCommentRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueCommentRestOperations.cs index b489f436a1690..de6013366fced 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueCommentRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueCommentRestOperations.cs @@ -32,7 +32,7 @@ public ApiIssueCommentRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -105,8 +105,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all comments for the Issue associated with the specified API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -141,8 +141,8 @@ public async Task> ListByServiceAsync(string su } /// Lists all comments for the Issue associated with the specified API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -223,8 +223,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -261,8 +261,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -345,8 +345,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the issue Comment for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -382,8 +382,8 @@ public async Task> GetAsync(string subscriptionId, } /// Gets the details of the issue Comment for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -473,8 +473,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates a new Comment for the Issue in an API or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -512,8 +512,8 @@ public async Task> CreateOrUpdateAsync(string subs } /// Creates a new Comment for the Issue in an API or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -598,8 +598,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified comment from an Issue. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -630,8 +630,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified comment from an Issue. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -685,8 +685,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists all comments for the Issue associated with the specified API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -723,8 +723,8 @@ public async Task> ListByServiceNextPageAsync(s /// Lists all comments for the Issue associated with the specified API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueRestOperations.cs index 086a4c89d123a..20d4418f392e2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueRestOperations.cs @@ -32,7 +32,7 @@ public ApiIssueRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -109,8 +109,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all issues associated with the specified API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>. @@ -144,8 +144,8 @@ public async Task> ListByServiceAsync(string subscript } /// Lists all issues associated with the specified API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>. @@ -221,8 +221,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the Issue for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -257,8 +257,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the Issue for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -343,8 +343,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the Issue for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -379,8 +379,8 @@ public async Task> GetAsync(string subscriptionId, s } /// Gets the details of the Issue for an API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -465,8 +465,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates a new Issue for an API or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -502,8 +502,8 @@ public async Task> CreateOrUpdateAsync(string subscr } /// Creates a new Issue for an API or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -586,8 +586,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates an existing issue for an API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -622,8 +622,8 @@ public async Task> UpdateAsync(string subscriptionId } /// Updates an existing issue for an API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -701,8 +701,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified Issue from an API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -731,8 +731,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified Issue from an API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Issue identifier. Must be unique in the current API Management service instance. @@ -784,8 +784,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists all issues associated with the specified API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>. @@ -821,8 +821,8 @@ public async Task> ListByServiceNextPageAsync(string n /// Lists all issues associated with the specified API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementRestOperations.cs index cec45ee4361d1..ce4780c460ef7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementRestOperations.cs @@ -31,7 +31,7 @@ public ApiManagementRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -76,8 +76,8 @@ internal HttpMessage CreatePerformConnectivityCheckAsyncRequest(string subscript } /// Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Connectivity Check request parameters. /// The cancellation token to use. @@ -103,8 +103,8 @@ public async Task PerformConnectivityCheckAsyncAsync(string subscripti } /// Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Connectivity Check request parameters. /// The cancellation token to use. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementServiceRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementServiceRestOperations.cs index 898a3ca2a25c1..5121456a41a21 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementServiceRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementServiceRestOperations.cs @@ -32,7 +32,7 @@ public ApiManagementServiceRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -77,8 +77,8 @@ internal HttpMessage CreateRestoreRequest(string subscriptionId, string resource } /// Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Parameters supplied to the Restore API Management service from backup operation. /// The cancellation token to use. @@ -104,8 +104,8 @@ public async Task RestoreAsync(string subscriptionId, string resourceG } /// Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Parameters supplied to the Restore API Management service from backup operation. /// The cancellation token to use. @@ -171,8 +171,8 @@ internal HttpMessage CreateBackupRequest(string subscriptionId, string resourceG } /// Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Parameters supplied to the ApiManagementService_Backup operation. /// The cancellation token to use. @@ -198,8 +198,8 @@ public async Task BackupAsync(string subscriptionId, string resourceGr } /// Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Parameters supplied to the ApiManagementService_Backup operation. /// The cancellation token to use. @@ -263,8 +263,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Parameters supplied to the CreateOrUpdate API Management service operation. /// The cancellation token to use. @@ -283,7 +283,6 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re { case 200: case 201: - case 202: return message.Response; default: throw new RequestFailedException(message.Response); @@ -291,8 +290,8 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates or updates an API Management service. This is long running operation and could take several minutes to complete. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Parameters supplied to the CreateOrUpdate API Management service operation. /// The cancellation token to use. @@ -311,7 +310,6 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, { case 200: case 201: - case 202: return message.Response; default: throw new RequestFailedException(message.Response); @@ -357,8 +355,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates an existing API Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Parameters supplied to the CreateOrUpdate API Management service operation. /// The cancellation token to use. @@ -384,8 +382,8 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Updates an existing API Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Parameters supplied to the CreateOrUpdate API Management service operation. /// The cancellation token to use. @@ -445,8 +443,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets an API Management service resource description. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -476,8 +474,8 @@ public async Task> GetAsync(string subscripti } /// Gets an API Management service resource description. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -541,8 +539,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes an existing API Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -567,8 +565,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes an existing API Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -592,6 +590,92 @@ public Response Delete(string subscriptionId, string resourceGroupName, string s } } + internal RequestUriBuilder CreateMigrateToStv2RequestUri(string subscriptionId, string resourceGroupName, string serviceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/migrateToStv2", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateMigrateToStv2Request(string subscriptionId, string resourceGroupName, string serviceName) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/migrateToStv2", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and could take several minutes to complete. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task MigrateToStv2Async(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateMigrateToStv2Request(subscriptionId, resourceGroupName, serviceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Upgrades an API Management service to the Stv2 platform. For details refer to https://aka.ms/apim-migrate-stv2. This change is not reversible. This is long running operation and could take several minutes to complete. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response MigrateToStv2(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateMigrateToStv2Request(subscriptionId, resourceGroupName, serviceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) { var uri = new RawRequestUriBuilder(); @@ -625,8 +709,8 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str } /// List all API Management services within a resource group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// 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. @@ -652,8 +736,8 @@ public async Task> ListByResourceGroupA } /// List all API Management services within a resource group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// 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. @@ -707,7 +791,7 @@ internal HttpMessage CreateListRequest(string subscriptionId) } /// Lists all API Management services within an Azure subscription. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -732,7 +816,7 @@ public async Task> ListAsync(string sub } /// Lists all API Management services within an Azure subscription. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -793,8 +877,8 @@ internal HttpMessage CreateGetSsoTokenRequest(string subscriptionId, string reso } /// Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -822,8 +906,8 @@ public async Task> GetSsoTokenAs } /// Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -883,7 +967,7 @@ internal HttpMessage CreateCheckNameAvailabilityRequest(string subscriptionId, A } /// Checks availability and correctness of a name for an API Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// Parameters supplied to the CheckNameAvailability operation. /// The cancellation token to use. /// or is null. @@ -910,7 +994,7 @@ public async Task> CheckNam } /// Checks availability and correctness of a name for an API Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// Parameters supplied to the CheckNameAvailability operation. /// The cancellation token to use. /// or is null. @@ -965,7 +1049,7 @@ internal HttpMessage CreateGetDomainOwnershipIdentifierRequest(string subscripti } /// Get the custom domain ownership identifier for an API Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -990,7 +1074,7 @@ public async Task Get the custom domain ownership identifier for an API Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -1058,8 +1142,8 @@ internal HttpMessage CreateApplyNetworkConfigurationUpdatesRequest(string subscr } /// Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Parameters supplied to the Apply Network Configuration operation. If the parameters are empty, all the regions in which the Api Management service is deployed will be updated sequentially without incurring downtime in the region. /// The cancellation token to use. @@ -1084,8 +1168,8 @@ public async Task ApplyNetworkConfigurationUpdatesAsync(string subscri } /// Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Parameters supplied to the Apply Network Configuration operation. If the parameters are empty, all the regions in which the Api Management service is deployed will be updated sequentially without incurring downtime in the region. /// The cancellation token to use. @@ -1133,8 +1217,8 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// List all API Management services within a resource group. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// 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. @@ -1162,8 +1246,8 @@ public async Task> ListByResourceGroupN /// List all API Management services within a resource group. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// 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. @@ -1213,7 +1297,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Lists all API Management services within an Azure subscription. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// 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. @@ -1240,7 +1324,7 @@ public async Task> ListNextPageAsync(st /// Lists all API Management services within an Azure subscription. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// 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. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementServiceSkusRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementServiceSkusRestOperations.cs index 1fffe92099b07..64c9e6d67e778 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementServiceSkusRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementServiceSkusRestOperations.cs @@ -32,7 +32,7 @@ public ApiManagementServiceSkusRestOperations(HttpPipeline pipeline, string appl { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,8 +73,8 @@ internal HttpMessage CreateListAvailableServiceSkusRequest(string subscriptionId } /// Gets all available SKU for a given API Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -102,8 +102,8 @@ public async Task> ListAvailableServiceSkusAsync(st } /// Gets all available SKU for a given API Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -154,8 +154,8 @@ internal HttpMessage CreateListAvailableServiceSkusNextPageRequest(string nextLi /// Gets all available SKU for a given API Management service. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , , or is null. @@ -185,8 +185,8 @@ public async Task> ListAvailableServiceSkusNextPage /// Gets all available SKU for a given API Management service. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , , or is null. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementSkusRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementSkusRestOperations.cs index c49e67fb208f0..8d7f02f71214d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementSkusRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementSkusRestOperations.cs @@ -32,7 +32,7 @@ public ApiManagementSkusRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -65,7 +65,7 @@ internal HttpMessage CreateListRequest(string subscriptionId) } /// Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -90,7 +90,7 @@ public async Task> ListAsync(string subscripti } /// Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -138,7 +138,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// 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. @@ -165,7 +165,7 @@ public async Task> ListNextPageAsync(string ne /// Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// 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. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiOperationPolicyRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiOperationPolicyRestOperations.cs index c4d344e1eedfc..02ecde0b61119 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiOperationPolicyRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiOperationPolicyRestOperations.cs @@ -32,7 +32,7 @@ public ApiOperationPolicyRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -81,8 +81,8 @@ internal HttpMessage CreateListByOperationRequest(string subscriptionId, string } /// Get the list of policy configuration at the API Operation level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -114,8 +114,8 @@ public async Task> ListByOperationAsync(string subscr } /// Get the list of policy configuration at the API Operation level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -193,8 +193,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the API operation policy specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -230,8 +230,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the API operation policy specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -321,8 +321,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get the policy configuration at the API Operation level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -358,8 +358,8 @@ public async Task> GetAsync(string subscriptionId, } /// Get the policy configuration at the API Operation level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -449,8 +449,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates policy configuration for the API Operation level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -487,8 +487,8 @@ public async Task> CreateOrUpdateAsync(string subsc } /// Creates or updates policy configuration for the API Operation level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -572,8 +572,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the policy configuration at the Api Operation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -603,8 +603,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the policy configuration at the Api Operation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiOperationRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiOperationRestOperations.cs index e3c93e560f7e7..5eac2266ba8ea 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiOperationRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiOperationRestOperations.cs @@ -32,7 +32,7 @@ public ApiOperationRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -109,8 +109,8 @@ internal HttpMessage CreateListByApiRequest(string subscriptionId, string resour } /// Lists a collection of the operations for the specified API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -144,8 +144,8 @@ public async Task> ListByApiAsync(string subscript } /// Lists a collection of the operations for the specified API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -221,8 +221,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the API operation specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -257,8 +257,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the API operation specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -335,8 +335,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the API Operation specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -370,8 +370,8 @@ public async Task> GetAsync(string subscriptionId, st } /// Gets the details of the API Operation specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -455,8 +455,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates a new operation in the API or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -492,8 +492,8 @@ public async Task> CreateOrUpdateAsync(string subscri } /// Creates a new operation in the API or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -576,8 +576,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the details of the operation in the API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -612,8 +612,8 @@ public async Task> UpdateAsync(string subscriptionId, } /// Updates the details of the operation in the API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -691,8 +691,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified operation in the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -721,8 +721,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified operation in the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -774,8 +774,8 @@ internal HttpMessage CreateListByApiNextPageRequest(string nextLink, string subs /// Lists a collection of the operations for the specified API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -811,8 +811,8 @@ public async Task> ListByApiNextPageAsync(string n /// Lists a collection of the operations for the specified API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiPolicyRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiPolicyRestOperations.cs index 99a251a97cff2..effe0e1e716bb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiPolicyRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiPolicyRestOperations.cs @@ -32,7 +32,7 @@ public ApiPolicyRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -77,8 +77,8 @@ internal HttpMessage CreateListByApiRequest(string subscriptionId, string resour } /// Get the policy configuration at the API level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The cancellation token to use. @@ -108,8 +108,8 @@ public async Task> ListByApiAsync(string subscription } /// Get the policy configuration at the API level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The cancellation token to use. @@ -181,8 +181,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the API policy specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The identifier of the Policy. @@ -216,8 +216,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the API policy specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The identifier of the Policy. @@ -301,8 +301,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get the policy configuration at the API level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The identifier of the Policy. @@ -336,8 +336,8 @@ public async Task> GetAsync(string subscriptionId, } /// Get the policy configuration at the API level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The identifier of the Policy. @@ -421,8 +421,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates policy configuration for the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The identifier of the Policy. @@ -457,8 +457,8 @@ public async Task> CreateOrUpdateAsync(string subsc } /// Creates or updates policy configuration for the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The identifier of the Policy. @@ -536,8 +536,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the policy configuration at the Api. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The identifier of the Policy. @@ -565,8 +565,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the policy configuration at the Api. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The identifier of the Policy. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiProductRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiProductRestOperations.cs index d2ac49b773b06..60aa0557a4d1a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiProductRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiProductRestOperations.cs @@ -32,7 +32,7 @@ public ApiProductRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -101,8 +101,8 @@ internal HttpMessage CreateListByApisRequest(string subscriptionId, string resou } /// Lists all Products, which the API is part of. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -135,8 +135,8 @@ public async Task> ListByApisAsync(string subscripti } /// Lists all Products, which the API is part of. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -192,8 +192,8 @@ internal HttpMessage CreateListByApisNextPageRequest(string nextLink, string sub /// Lists all Products, which the API is part of. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -228,8 +228,8 @@ public async Task> ListByApisNextPageAsync(string ne /// Lists all Products, which the API is part of. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiReleaseRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiReleaseRestOperations.cs index 318ce6ab906a8..e42105df4785e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiReleaseRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiReleaseRestOperations.cs @@ -32,7 +32,7 @@ public ApiReleaseRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -101,8 +101,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| notes | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -135,8 +135,8 @@ public async Task> ListByServiceAsync(string subs } /// Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| notes | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -211,8 +211,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Returns the etag of an API release. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Release identifier within an API. Must be unique in the current API Management service instance. @@ -247,8 +247,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Returns the etag of an API release. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Release identifier within an API. Must be unique in the current API Management service instance. @@ -325,8 +325,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Returns the details of an API release. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Release identifier within an API. Must be unique in the current API Management service instance. @@ -360,8 +360,8 @@ public async Task> GetAsync(string subscriptionId, stri } /// Returns the details of an API release. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Release identifier within an API. Must be unique in the current API Management service instance. @@ -445,8 +445,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates a new Release for the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Release identifier within an API. Must be unique in the current API Management service instance. @@ -482,8 +482,8 @@ public async Task> CreateOrUpdateAsync(string subscript } /// Creates a new Release for the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Release identifier within an API. Must be unique in the current API Management service instance. @@ -566,8 +566,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the details of the release of the API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Release identifier within an API. Must be unique in the current API Management service instance. @@ -602,8 +602,8 @@ public async Task> UpdateAsync(string subscriptionId, s } /// Updates the details of the release of the API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Release identifier within an API. Must be unique in the current API Management service instance. @@ -681,8 +681,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified release in the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Release identifier within an API. Must be unique in the current API Management service instance. @@ -711,8 +711,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified release in the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// Release identifier within an API. Must be unique in the current API Management service instance. @@ -764,8 +764,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| notes | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -800,8 +800,8 @@ public async Task> ListByServiceNextPageAsync(str /// Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| notes | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiRestOperations.cs index 2468a767f429b..660aa36a1a7a7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiRestOperations.cs @@ -32,7 +32,7 @@ public ApiRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoi { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -113,8 +113,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all APIs of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| isCurrent | filter | eq, ne | |</br>. /// Number of records to return. @@ -147,8 +147,8 @@ public async Task> ListByServiceAsync(string subscriptio } /// Lists all APIs of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| isCurrent | filter | eq, ne | |</br>. /// Number of records to return. @@ -219,8 +219,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The cancellation token to use. @@ -253,8 +253,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The cancellation token to use. @@ -325,8 +325,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The cancellation token to use. @@ -358,8 +358,8 @@ public async Task> GetAsync(string subscriptionId, string reso } /// Gets the details of the API specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// The cancellation token to use. @@ -437,8 +437,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates new or updates existing specified API of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Create or update parameters. @@ -468,8 +468,8 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates new or updates existing specified API of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Create or update parameters. @@ -542,8 +542,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the specified API of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -576,8 +576,8 @@ public async Task> UpdateAsync(string subscriptionId, string r } /// Updates the specified API of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -657,8 +657,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified API of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -686,8 +686,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified API of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -783,8 +783,8 @@ internal HttpMessage CreateListByTagsRequest(string subscriptionId, string resou } /// Lists a collection of apis associated with tags. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| isCurrent | filter | eq | |</br>. /// Number of records to return. @@ -816,8 +816,8 @@ public async Task> ListByTagsAsync(string subscr } /// Lists a collection of apis associated with tags. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| isCurrent | filter | eq | |</br>. /// Number of records to return. @@ -872,8 +872,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists all APIs of the API Management service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| isCurrent | filter | eq, ne | |</br>. /// Number of records to return. @@ -908,8 +908,8 @@ public async Task> ListByServiceNextPageAsync(string nex /// Lists all APIs of the API Management service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| isCurrent | filter | eq, ne | |</br>. /// Number of records to return. @@ -966,8 +966,8 @@ internal HttpMessage CreateListByTagsNextPageRequest(string nextLink, string sub /// Lists a collection of apis associated with tags. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| isCurrent | filter | eq | |</br>. /// Number of records to return. @@ -1001,8 +1001,8 @@ public async Task> ListByTagsNextPageAsync(strin /// Lists a collection of apis associated with tags. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| isCurrent | filter | eq | |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiRevisionRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiRevisionRestOperations.cs index d9465017dea76..af06d27cc425e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiRevisionRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiRevisionRestOperations.cs @@ -32,7 +32,7 @@ public ApiRevisionRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -101,8 +101,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all revisions of an API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -135,8 +135,8 @@ public async Task> ListByServiceAsync(string sub } /// Lists all revisions of an API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -192,8 +192,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists all revisions of an API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -228,8 +228,8 @@ public async Task> ListByServiceNextPageAsync(st /// Lists all revisions of an API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiSchemaRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiSchemaRestOperations.cs index 39e9291ec22cd..935304f1aa75b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiSchemaRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiSchemaRestOperations.cs @@ -32,7 +32,7 @@ public ApiSchemaRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -101,8 +101,8 @@ internal HttpMessage CreateListByApiRequest(string subscriptionId, string resour } /// Get the schema configuration at the API level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| contentType | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -135,8 +135,8 @@ public async Task> ListByApiAsync(string subscription } /// Get the schema configuration at the API level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| contentType | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -211,8 +211,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the schema specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Schema id identifier. Must be unique in the current API Management service instance. @@ -247,8 +247,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the schema specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Schema id identifier. Must be unique in the current API Management service instance. @@ -325,8 +325,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get the schema configuration at the API level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Schema id identifier. Must be unique in the current API Management service instance. @@ -360,8 +360,8 @@ public async Task> GetAsync(string subscriptionId, strin } /// Get the schema configuration at the API level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Schema id identifier. Must be unique in the current API Management service instance. @@ -445,8 +445,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates schema configuration for the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Schema id identifier. Must be unique in the current API Management service instance. @@ -478,8 +478,8 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates or updates schema configuration for the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Schema id identifier. Must be unique in the current API Management service instance. @@ -562,8 +562,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the schema configuration at the Api. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Schema id identifier. Must be unique in the current API Management service instance. @@ -593,8 +593,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the schema configuration at the Api. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Schema id identifier. Must be unique in the current API Management service instance. @@ -647,8 +647,8 @@ internal HttpMessage CreateListByApiNextPageRequest(string nextLink, string subs /// Get the schema configuration at the API level. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| contentType | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -683,8 +683,8 @@ public async Task> ListByApiNextPageAsync(string next /// Get the schema configuration at the API level. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| contentType | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiTagDescriptionRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiTagDescriptionRestOperations.cs index 867235e58c5c1..37d0e31590ddd 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiTagDescriptionRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiTagDescriptionRestOperations.cs @@ -32,7 +32,7 @@ public ApiTagDescriptionRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -101,8 +101,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -135,8 +135,8 @@ public async Task> ListByServiceAsync(string } /// Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -211,8 +211,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state version of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag description identifier. Used when creating tagDescription for API/Tag association. Based on API and Tag names. @@ -247,8 +247,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state version of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag description identifier. Used when creating tagDescription for API/Tag association. Based on API and Tag names. @@ -325,8 +325,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get Tag description in scope of API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag description identifier. Used when creating tagDescription for API/Tag association. Based on API and Tag names. @@ -360,8 +360,8 @@ public async Task> GetAsync(string subscriptionI } /// Get Tag description in scope of API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag description identifier. Used when creating tagDescription for API/Tag association. Based on API and Tag names. @@ -445,8 +445,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create/Update tag description in scope of the Api. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag description identifier. Used when creating tagDescription for API/Tag association. Based on API and Tag names. @@ -482,8 +482,8 @@ public async Task> CreateOrUpdateAsync(string su } /// Create/Update tag description in scope of the Api. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag description identifier. Used when creating tagDescription for API/Tag association. Based on API and Tag names. @@ -562,8 +562,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete tag description for the Api. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag description identifier. Used when creating tagDescription for API/Tag association. Based on API and Tag names. @@ -592,8 +592,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete tag description for the Api. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag description identifier. Used when creating tagDescription for API/Tag association. Based on API and Tag names. @@ -645,8 +645,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -681,8 +681,8 @@ public async Task> ListByServiceNextPageAsync /// Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiVersionSetRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiVersionSetRestOperations.cs index 5f6844a06a025..2b9c3fbee7b00 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiVersionSetRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiVersionSetRestOperations.cs @@ -32,7 +32,7 @@ public ApiVersionSetRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -97,8 +97,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of API Version Sets in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>. /// Number of records to return. @@ -129,8 +129,8 @@ public async Task> ListByServiceAsync(string s } /// Lists a collection of API Version Sets in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>. /// Number of records to return. @@ -199,8 +199,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the Api Version Set specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Api Version Set identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -233,8 +233,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the Api Version Set specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Api Version Set identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -305,8 +305,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the Api Version Set specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Api Version Set identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -338,8 +338,8 @@ public async Task> GetAsync(string subscriptionId, s } /// Gets the details of the Api Version Set specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Api Version Set identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -417,8 +417,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or Updates a Api Version Set. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Api Version Set identifier. Must be unique in the current API Management service instance. /// Create or update parameters. @@ -452,8 +452,8 @@ public async Task> CreateOrUpdateAsync(string subscr } /// Creates or Updates a Api Version Set. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Api Version Set identifier. Must be unique in the current API Management service instance. /// Create or update parameters. @@ -530,8 +530,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the details of the Api VersionSet specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Api Version Set identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -564,8 +564,8 @@ public async Task> UpdateAsync(string subscriptionId } /// Updates the details of the Api VersionSet specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Api Version Set identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -637,8 +637,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes specific Api Version Set. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Api Version Set identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -665,8 +665,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes specific Api Version Set. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Api Version Set identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -716,8 +716,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of API Version Sets in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>. /// Number of records to return. @@ -750,8 +750,8 @@ public async Task> ListByServiceNextPageAsync( /// Lists a collection of API Version Sets in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiWikiRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiWikiRestOperations.cs new file mode 100644 index 0000000000000..0730a066226cf --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiWikiRestOperations.cs @@ -0,0 +1,581 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class ApiWikiRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ApiWikiRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ApiWikiRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2022-08-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetEntityTagRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string apiId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Head; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetEntityTagAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, apiId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetEntityTag(string subscriptionId, string resourceGroupName, string serviceName, string apiId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, apiId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string apiId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the Wiki for an API specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, apiId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WikiContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WikiContractData.DeserializeWikiContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WikiContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the Wiki for an API specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string serviceName, string apiId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, apiId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WikiContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WikiContractData.DeserializeWikiContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WikiContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string apiId, WikiContractData data, ETag? ifMatch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, WikiContractData data, ETag? ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch.Value); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates a new Wiki for an API or updates an existing one. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API identifier. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, WikiContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, apiId, data, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + WikiContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WikiContractData.DeserializeWikiContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates a new Wiki for an API or updates an existing one. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API identifier. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string apiId, WikiContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, apiId, data, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + WikiContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WikiContractData.DeserializeWikiContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string apiId, ETag ifMatch, WikiUpdateContract wikiUpdateContract) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, ETag ifMatch, WikiUpdateContract wikiUpdateContract) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(wikiUpdateContract, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates the details of the Wiki for an API specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Wiki Update parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, ETag ifMatch, WikiUpdateContract wikiUpdateContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNull(wikiUpdateContract, nameof(wikiUpdateContract)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, apiId, ifMatch, wikiUpdateContract); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WikiContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WikiContractData.DeserializeWikiContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates the details of the Wiki for an API specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Wiki Update parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string serviceName, string apiId, ETag ifMatch, WikiUpdateContract wikiUpdateContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNull(wikiUpdateContract, nameof(wikiUpdateContract)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, apiId, ifMatch, wikiUpdateContract); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WikiContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WikiContractData.DeserializeWikiContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string apiId, ETag ifMatch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, ETag ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes the specified Wiki from an API. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, apiId, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes the specified Wiki from an API. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string serviceName, string apiId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, apiId, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationAccessPolicyRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationAccessPolicyRestOperations.cs new file mode 100644 index 0000000000000..cf0dc36dbc14b --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationAccessPolicyRestOperations.cs @@ -0,0 +1,640 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class AuthorizationAccessPolicyRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AuthorizationAccessPolicyRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public AuthorizationAccessPolicyRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2022-08-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByAuthorizationRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string filter, int? top, int? skip) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendPath("/accessPolicies", false); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByAuthorizationRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string filter, int? top, int? skip) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendPath("/accessPolicies", false); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists a collection of authorization access policy defined within a authorization. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListByAuthorizationAsync(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var message = CreateListByAuthorizationRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, filter, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AuthorizationAccessPolicyListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationAccessPolicyListResult.DeserializeAuthorizationAccessPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a collection of authorization access policy defined within a authorization. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListByAuthorization(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var message = CreateListByAuthorizationRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, filter, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AuthorizationAccessPolicyListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationAccessPolicyListResult.DeserializeAuthorizationAccessPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendPath("/accessPolicies/", false); + uri.AppendPath(authorizationAccessPolicyId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendPath("/accessPolicies/", false); + uri.AppendPath(authorizationAccessPolicyId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the authorization access policy specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// Identifier of the authorization access policy. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, authorizationAccessPolicyId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AuthorizationAccessPolicyContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationAccessPolicyContractData.DeserializeAuthorizationAccessPolicyContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AuthorizationAccessPolicyContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the authorization access policy specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// Identifier of the authorization access policy. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, authorizationAccessPolicyId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AuthorizationAccessPolicyContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationAccessPolicyContractData.DeserializeAuthorizationAccessPolicyContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AuthorizationAccessPolicyContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId, AuthorizationAccessPolicyContractData data, ETag? ifMatch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendPath("/accessPolicies/", false); + uri.AppendPath(authorizationAccessPolicyId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId, AuthorizationAccessPolicyContractData data, ETag? ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendPath("/accessPolicies/", false); + uri.AppendPath(authorizationAccessPolicyId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch.Value); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or updates Authorization Access Policy. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// Identifier of the authorization access policy. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId, AuthorizationAccessPolicyContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, authorizationAccessPolicyId, data, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + AuthorizationAccessPolicyContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationAccessPolicyContractData.DeserializeAuthorizationAccessPolicyContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates Authorization Access Policy. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// Identifier of the authorization access policy. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId, AuthorizationAccessPolicyContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, authorizationAccessPolicyId, data, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + AuthorizationAccessPolicyContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationAccessPolicyContractData.DeserializeAuthorizationAccessPolicyContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId, ETag ifMatch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendPath("/accessPolicies/", false); + uri.AppendPath(authorizationAccessPolicyId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId, ETag ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendPath("/accessPolicies/", false); + uri.AppendPath(authorizationAccessPolicyId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes specific access policy from the Authorization. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// Identifier of the authorization access policy. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, authorizationAccessPolicyId, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes specific access policy from the Authorization. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// Identifier of the authorization access policy. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string authorizationAccessPolicyId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNullOrEmpty(authorizationAccessPolicyId, nameof(authorizationAccessPolicyId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, authorizationAccessPolicyId, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByAuthorizationNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string filter, int? top, int? skip) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByAuthorizationNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string filter, int? top, int? skip) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists a collection of authorization access policy defined within a authorization. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListByAuthorizationNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var message = CreateListByAuthorizationNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, filter, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AuthorizationAccessPolicyListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationAccessPolicyListResult.DeserializeAuthorizationAccessPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a collection of authorization access policy defined within a authorization. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListByAuthorizationNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var message = CreateListByAuthorizationNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, filter, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AuthorizationAccessPolicyListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationAccessPolicyListResult.DeserializeAuthorizationAccessPolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationLoginLinksRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationLoginLinksRestOperations.cs new file mode 100644 index 0000000000000..bbb4b352742ef --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationLoginLinksRestOperations.cs @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class AuthorizationLoginLinksRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AuthorizationLoginLinksRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public AuthorizationLoginLinksRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2022-08-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreatePostRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, AuthorizationLoginContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendPath("/getLoginLinks", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreatePostRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, AuthorizationLoginContent content) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendPath("/getLoginLinks", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Gets authorization login links. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// Create parameters. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> PostAsync(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, AuthorizationLoginContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreatePostRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AuthorizationLoginResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationLoginResult.DeserializeAuthorizationLoginResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets authorization login links. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// Create parameters. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Post(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, AuthorizationLoginContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreatePostRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AuthorizationLoginResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationLoginResult.DeserializeAuthorizationLoginResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationProviderRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationProviderRestOperations.cs new file mode 100644 index 0000000000000..ce1c7b7f1f2d0 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationProviderRestOperations.cs @@ -0,0 +1,568 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class AuthorizationProviderRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AuthorizationProviderRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public AuthorizationProviderRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2022-08-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByServiceRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string filter, int? top, int? skip) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders", false); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByServiceRequest(string subscriptionId, string resourceGroupName, string serviceName, string filter, int? top, int? skip) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders", false); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists a collection of authorization providers defined within a service instance. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByServiceAsync(string subscriptionId, string resourceGroupName, string serviceName, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceRequest(subscriptionId, resourceGroupName, serviceName, filter, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AuthorizationProviderListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationProviderListResult.DeserializeAuthorizationProviderListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a collection of authorization providers defined within a service instance. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByService(string subscriptionId, string resourceGroupName, string serviceName, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceRequest(subscriptionId, resourceGroupName, serviceName, filter, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AuthorizationProviderListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationProviderListResult.DeserializeAuthorizationProviderListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the authorization provider specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AuthorizationProviderContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationProviderContractData.DeserializeAuthorizationProviderContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AuthorizationProviderContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the authorization provider specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AuthorizationProviderContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationProviderContractData.DeserializeAuthorizationProviderContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AuthorizationProviderContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, AuthorizationProviderContractData data, ETag? ifMatch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, AuthorizationProviderContractData data, ETag? ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch.Value); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or updates authorization provider. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, AuthorizationProviderContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, data, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + AuthorizationProviderContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationProviderContractData.DeserializeAuthorizationProviderContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates authorization provider. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, AuthorizationProviderContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, data, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + AuthorizationProviderContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationProviderContractData.DeserializeAuthorizationProviderContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, ETag ifMatch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, ETag ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes specific authorization provider from the API Management service instance. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes specific authorization provider from the API Management service instance. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByServiceNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string filter, int? top, int? skip) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string filter, int? top, int? skip) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists a collection of authorization providers defined within a service instance. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByServiceNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, filter, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AuthorizationProviderListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationProviderListResult.DeserializeAuthorizationProviderListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a collection of authorization providers defined within a service instance. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByServiceNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, filter, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AuthorizationProviderListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationProviderListResult.DeserializeAuthorizationProviderListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationRestOperations.cs new file mode 100644 index 0000000000000..112abd0c0689f --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationRestOperations.cs @@ -0,0 +1,712 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class AuthorizationRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AuthorizationRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public AuthorizationRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2022-08-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByAuthorizationProviderRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string filter, int? top, int? skip) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations", false); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByAuthorizationProviderRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string filter, int? top, int? skip) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations", false); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists a collection of authorization providers defined within a authorization provider. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByAuthorizationProviderAsync(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var message = CreateListByAuthorizationProviderRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, filter, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AuthorizationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationListResult.DeserializeAuthorizationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a collection of authorization providers defined within a authorization provider. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByAuthorizationProvider(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var message = CreateListByAuthorizationProviderRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, filter, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AuthorizationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationListResult.DeserializeAuthorizationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the authorization specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AuthorizationContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationContractData.DeserializeAuthorizationContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AuthorizationContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the authorization specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AuthorizationContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationContractData.DeserializeAuthorizationContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AuthorizationContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, AuthorizationContractData data, ETag? ifMatch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, AuthorizationContractData data, ETag? ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch.Value); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or updates authorization. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, AuthorizationContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, data, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + AuthorizationContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationContractData.DeserializeAuthorizationContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates authorization. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, AuthorizationContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, data, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + AuthorizationContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationContractData.DeserializeAuthorizationContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, ETag ifMatch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, ETag ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes specific Authorization from the Authorization provider. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes specific Authorization from the Authorization provider. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateConfirmConsentCodeRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, AuthorizationConfirmConsentCodeContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendPath("/confirmConsentCode", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateConfirmConsentCodeRequest(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, AuthorizationConfirmConsentCodeContent content) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/authorizationProviders/", false); + uri.AppendPath(authorizationProviderId, true); + uri.AppendPath("/authorizations/", false); + uri.AppendPath(authorizationId, true); + uri.AppendPath("/confirmConsentCode", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Confirm valid consent code to suppress Authorizations anti-phishing page. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// Create parameters. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task ConfirmConsentCodeAsync(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, AuthorizationConfirmConsentCodeContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateConfirmConsentCodeRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Confirm valid consent code to suppress Authorizations anti-phishing page. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// Identifier of the authorization. + /// Create parameters. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ConfirmConsentCode(string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string authorizationId, AuthorizationConfirmConsentCodeContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + Argument.AssertNotNullOrEmpty(authorizationId, nameof(authorizationId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateConfirmConsentCodeRequest(subscriptionId, resourceGroupName, serviceName, authorizationProviderId, authorizationId, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByAuthorizationProviderNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string filter, int? top, int? skip) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByAuthorizationProviderNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string filter, int? top, int? skip) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists a collection of authorization providers defined within a authorization provider. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByAuthorizationProviderNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var message = CreateListByAuthorizationProviderNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, authorizationProviderId, filter, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AuthorizationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AuthorizationListResult.DeserializeAuthorizationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a collection of authorization providers defined within a authorization provider. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Identifier of the authorization provider. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByAuthorizationProviderNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string authorizationProviderId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(authorizationProviderId, nameof(authorizationProviderId)); + + using var message = CreateListByAuthorizationProviderNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, authorizationProviderId, filter, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AuthorizationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AuthorizationListResult.DeserializeAuthorizationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationServerRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationServerRestOperations.cs index f9f65450263bb..ae48b609950d2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationServerRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationServerRestOperations.cs @@ -32,7 +32,7 @@ public AuthorizationServerRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -97,8 +97,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of authorization servers defined within a service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -129,8 +129,8 @@ public async Task> ListByServiceAsync(st } /// Lists a collection of authorization servers defined within a service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -199,8 +199,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the authorizationServer specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the authorization server. /// The cancellation token to use. @@ -233,8 +233,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the authorizationServer specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the authorization server. /// The cancellation token to use. @@ -305,8 +305,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the authorization server specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the authorization server. /// The cancellation token to use. @@ -338,8 +338,8 @@ public async Task> GetAsync(strin } /// Gets the details of the authorization server specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the authorization server. /// The cancellation token to use. @@ -417,8 +417,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates new authorization server or updates an existing authorization server. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the authorization server. /// Create or update parameters. @@ -452,8 +452,8 @@ public async Task> CreateOrUpdate } /// Creates new authorization server or updates an existing authorization server. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the authorization server. /// Create or update parameters. @@ -530,8 +530,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the details of the authorization server specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the authorization server. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -564,8 +564,8 @@ public async Task> UpdateAsync(st } /// Updates the details of the authorization server specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the authorization server. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -637,8 +637,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes specific authorization server instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the authorization server. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -665,8 +665,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes specific authorization server instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the authorization server. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -733,8 +733,8 @@ internal HttpMessage CreateListSecretsRequest(string subscriptionId, string reso } /// Gets the client secret details of the authorization server. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the authorization server. /// The cancellation token to use. @@ -764,8 +764,8 @@ public async Task> ListSecretsAsync } /// Gets the client secret details of the authorization server. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the authorization server. /// The cancellation token to use. @@ -818,8 +818,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of authorization servers defined within a service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -852,8 +852,8 @@ public async Task> ListByServiceNextPage /// Lists a collection of authorization servers defined within a service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/BackendRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/BackendRestOperations.cs index 76fbe1a9db179..8a4d92627882a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/BackendRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/BackendRestOperations.cs @@ -32,7 +32,7 @@ public BackendRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -97,8 +97,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of backends in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| url | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -129,8 +129,8 @@ public async Task> ListByServiceAsync(string subscri } /// Lists a collection of backends in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| url | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -199,8 +199,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the backend specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Backend entity. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -233,8 +233,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the backend specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Backend entity. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -305,8 +305,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the backend specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Backend entity. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -338,8 +338,8 @@ public async Task> GetAsync(string subscripti } /// Gets the details of the backend specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Backend entity. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -417,8 +417,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or Updates a backend. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Backend entity. Must be unique in the current API Management service instance. /// Create parameters. @@ -452,8 +452,8 @@ public async Task> CreateOrUpdateAsync(string } /// Creates or Updates a backend. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Backend entity. Must be unique in the current API Management service instance. /// Create parameters. @@ -530,8 +530,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates an existing backend. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Backend entity. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -564,8 +564,8 @@ public async Task> UpdateAsync(string subscri } /// Updates an existing backend. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Backend entity. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -637,8 +637,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified backend. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Backend entity. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -665,8 +665,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified backend. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Backend entity. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -739,9 +739,9 @@ internal HttpMessage CreateReconnectRequest(string subscriptionId, string resour return message; } - /// Notifies the APIM proxy to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// Notifies the API Management gateway to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Backend entity. Must be unique in the current API Management service instance. /// Reconnect request parameters. @@ -766,9 +766,9 @@ public async Task ReconnectAsync(string subscriptionId, string resourc } } - /// Notifies the APIM proxy to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// Notifies the API Management gateway to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Backend entity. Must be unique in the current API Management service instance. /// Reconnect request parameters. @@ -817,8 +817,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of backends in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| url | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -851,8 +851,8 @@ public async Task> ListByServiceNextPageAsync(string /// Lists a collection of backends in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| url | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/CacheRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/CacheRestOperations.cs index af3d578ff2128..edfd7f27e65da 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/CacheRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/CacheRestOperations.cs @@ -32,7 +32,7 @@ public CacheRestOperations(HttpPipeline pipeline, string applicationId, Uri endp { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -89,8 +89,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of all external Caches in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Number of records to return. /// Number of records to skip. @@ -120,8 +120,8 @@ public async Task> ListByServiceAsync(string subscript } /// Lists a collection of all external Caches in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Number of records to return. /// Number of records to skip. @@ -189,8 +189,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the Cache specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). /// The cancellation token to use. @@ -223,8 +223,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the Cache specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). /// The cancellation token to use. @@ -295,8 +295,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the Cache specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). /// The cancellation token to use. @@ -328,8 +328,8 @@ public async Task> GetAsync(string subscription } /// Gets the details of the Cache specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). /// The cancellation token to use. @@ -407,8 +407,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates an External Cache to be used in Api Management instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). /// Create or Update parameters. @@ -442,8 +442,8 @@ public async Task> CreateOrUpdateAsync(string s } /// Creates or updates an External Cache to be used in Api Management instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). /// Create or Update parameters. @@ -520,8 +520,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the details of the cache specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -554,8 +554,8 @@ public async Task> UpdateAsync(string subscript } /// Updates the details of the cache specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -627,8 +627,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes specific Cache. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -655,8 +655,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes specific Cache. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -706,8 +706,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of all external Caches in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Number of records to return. /// Number of records to skip. @@ -739,8 +739,8 @@ public async Task> ListByServiceNextPageAsync(string n /// Lists a collection of all external Caches in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Number of records to return. /// Number of records to skip. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/CertificateRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/CertificateRestOperations.cs index 382995078615f..ad9cf52da40d6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/CertificateRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/CertificateRestOperations.cs @@ -32,7 +32,7 @@ public CertificateRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -105,8 +105,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of all certificates in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| subject | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| expirationDate | filter | ge, le, eq, ne, gt, lt | |</br>. /// Number of records to return. @@ -138,8 +138,8 @@ public async Task> ListByServiceAsync(string sub } /// Lists a collection of all certificates in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| subject | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| expirationDate | filter | ge, le, eq, ne, gt, lt | |</br>. /// Number of records to return. @@ -209,8 +209,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the certificate specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -243,8 +243,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the certificate specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -315,8 +315,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the certificate specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -348,8 +348,8 @@ public async Task> GetAsync(string subscr } /// Gets the details of the certificate specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -427,8 +427,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates the certificate being used for authentication with the backend. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. /// Create or Update parameters. @@ -462,8 +462,8 @@ public async Task> CreateOrUpdateAsync(st } /// Creates or updates the certificate being used for authentication with the backend. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. /// Create or Update parameters. @@ -536,8 +536,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes specific certificate. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -564,8 +564,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes specific certificate. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -632,8 +632,8 @@ internal HttpMessage CreateRefreshSecretRequest(string subscriptionId, string re } /// From KeyVault, Refresh the certificate being used for authentication with the backend. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -663,8 +663,8 @@ public async Task> RefreshSecretAsync(str } /// From KeyVault, Refresh the certificate being used for authentication with the backend. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -717,8 +717,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of all certificates in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| subject | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| expirationDate | filter | ge, le, eq, ne, gt, lt | |</br>. /// Number of records to return. @@ -752,8 +752,8 @@ public async Task> ListByServiceNextPageAsync(st /// Lists a collection of all certificates in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| subject | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| expirationDate | filter | ge, le, eq, ne, gt, lt | |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ContentItemRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ContentItemRestOperations.cs index b5a2bb6ee50bc..2b63cbc086b12 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ContentItemRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ContentItemRestOperations.cs @@ -32,7 +32,7 @@ public ContentItemRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -77,8 +77,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists developer portal's content items specified by the provided content type. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// The cancellation token to use. @@ -108,8 +108,8 @@ public async Task> ListByServiceAsync(string sub } /// Lists developer portal's content items specified by the provided content type. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// The cancellation token to use. @@ -181,8 +181,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Returns the entity state (ETag) version of the developer portal's content item specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// Content item identifier. @@ -217,8 +217,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Returns the entity state (ETag) version of the developer portal's content item specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// Content item identifier. @@ -295,8 +295,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Returns the developer portal's content item specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// Content item identifier. @@ -328,8 +328,8 @@ public async Task> GetAsync(string subscripti } /// Returns the developer portal's content item specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// Content item identifier. @@ -407,8 +407,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates a new developer portal's content item specified by the provided content type. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// Content item identifier. @@ -442,8 +442,8 @@ public async Task> CreateOrUpdateAsync(string } /// Creates a new developer portal's content item specified by the provided content type. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// Content item identifier. @@ -520,8 +520,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Removes the specified developer portal's content item. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// Content item identifier. @@ -550,8 +550,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Removes the specified developer portal's content item. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// Content item identifier. @@ -603,8 +603,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists developer portal's content items specified by the provided content type. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// The cancellation token to use. @@ -636,8 +636,8 @@ public async Task> ListByServiceNextPageAsync(st /// Lists developer portal's content items specified by the provided content type. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// The cancellation token to use. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ContentTypeRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ContentTypeRestOperations.cs index 8ffde73521396..3a6751e859f72 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ContentTypeRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ContentTypeRestOperations.cs @@ -32,7 +32,7 @@ public ContentTypeRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,8 +73,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -102,8 +102,8 @@ public async Task> ListByServiceAsync(string sub } /// Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -169,8 +169,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// The cancellation token to use. @@ -200,8 +200,8 @@ public async Task> GetAsync(string subscripti } /// Gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// The cancellation token to use. @@ -273,8 +273,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Custom content types' identifiers need to start with the `c-` prefix. Built-in content types can't be modified. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -306,8 +306,8 @@ public async Task> CreateOrUpdateAsync(string } /// Creates or updates the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Custom content types' identifiers need to start with the `c-` prefix. Built-in content types can't be modified. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -378,8 +378,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Removes the specified developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Built-in content types (with identifiers starting with the `c-` prefix) can't be removed. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -406,8 +406,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Removes the specified developer portal's content type. Content types describe content items' properties, validation rules, and constraints. Built-in content types (with identifiers starting with the `c-` prefix) can't be removed. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Content type identifier. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -457,8 +457,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , , or is null. @@ -488,8 +488,8 @@ public async Task> ListByServiceNextPageAsync(st /// Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , , or is null. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DelegationSettingsRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DelegationSettingsRestOperations.cs index e7c87ad17f488..f19e16806f1f1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DelegationSettingsRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DelegationSettingsRestOperations.cs @@ -32,7 +32,7 @@ public DelegationSettingsRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,8 +73,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the DelegationSettings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -105,8 +105,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the DelegationSettings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -173,8 +173,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get Delegation Settings for the Portal. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -204,8 +204,8 @@ public async Task> GetAsync(s } /// Get Delegation Settings for the Portal. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -276,8 +276,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Update Delegation settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. /// Update Delegation settings. @@ -303,8 +303,8 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Update Delegation settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. /// Update Delegation settings. @@ -374,8 +374,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create or Update Delegation settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Create or update parameters. /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -406,8 +406,8 @@ public async Task> CreateOrUp } /// Create or Update Delegation settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Create or update parameters. /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -474,8 +474,8 @@ internal HttpMessage CreateListSecretsRequest(string subscriptionId, string reso } /// Gets the secret validation key of the DelegationSettings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -503,8 +503,8 @@ public async Task> ListSecretsAsync } /// Gets the secret validation key of the DelegationSettings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DeletedServicesRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DeletedServicesRestOperations.cs index 2188b7b4d483b..fdcbe1476f33e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DeletedServicesRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DeletedServicesRestOperations.cs @@ -32,7 +32,7 @@ public DeletedServicesRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -65,7 +65,7 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) } /// Lists all soft-deleted services available for undelete for the given subscription. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -90,7 +90,7 @@ public async Task> ListBySubscriptionAsync(s } /// Lists all soft-deleted services available for undelete for the given subscription. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -149,7 +149,7 @@ internal HttpMessage CreateGetByNameRequest(string subscriptionId, AzureLocation } /// Get soft-deleted Api Management Service by name. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The location of the deleted API Management service. /// The name of the API Management service. /// The cancellation token to use. @@ -179,7 +179,7 @@ public async Task> GetByNameAsync(stri } /// Get soft-deleted Api Management Service by name. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The location of the deleted API Management service. /// The name of the API Management service. /// The cancellation token to use. @@ -243,7 +243,7 @@ internal HttpMessage CreatePurgeRequest(string subscriptionId, AzureLocation loc } /// Purges Api Management Service (deletes it with no option to undelete). - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The location of the deleted API Management service. /// The name of the API Management service. /// The cancellation token to use. @@ -268,7 +268,7 @@ public async Task PurgeAsync(string subscriptionId, AzureLocation loca } /// Purges Api Management Service (deletes it with no option to undelete). - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The ID of the target subscription. /// The location of the deleted API Management service. /// The name of the API Management service. /// The cancellation token to use. @@ -316,7 +316,7 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// Lists all soft-deleted services available for undelete for the given subscription. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// 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. @@ -343,7 +343,7 @@ public async Task> ListBySubscriptionNextPag /// Lists all soft-deleted services available for undelete for the given subscription. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// 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. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DiagnosticRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DiagnosticRestOperations.cs index 0ebbdaf68f2fa..036a30d073e35 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DiagnosticRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DiagnosticRestOperations.cs @@ -32,7 +32,7 @@ public DiagnosticRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -97,8 +97,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all diagnostics of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -129,8 +129,8 @@ public async Task> ListByServiceAsync(string subs } /// Lists all diagnostics of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -199,8 +199,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the Diagnostic specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Diagnostic identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -233,8 +233,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the Diagnostic specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Diagnostic identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -305,8 +305,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the Diagnostic specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Diagnostic identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -338,8 +338,8 @@ public async Task> GetAsync(string subscription } /// Gets the details of the Diagnostic specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Diagnostic identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -417,8 +417,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates a new Diagnostic or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Diagnostic identifier. Must be unique in the current API Management service instance. /// Create parameters. @@ -452,8 +452,8 @@ public async Task> CreateOrUpdateAsync(string s } /// Creates a new Diagnostic or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Diagnostic identifier. Must be unique in the current API Management service instance. /// Create parameters. @@ -530,8 +530,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the details of the Diagnostic specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Diagnostic identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -564,8 +564,8 @@ public async Task> UpdateAsync(string subscript } /// Updates the details of the Diagnostic specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Diagnostic identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -637,8 +637,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified Diagnostic. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Diagnostic identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -665,8 +665,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified Diagnostic. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Diagnostic identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -716,8 +716,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists all diagnostics of the API Management service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -750,8 +750,8 @@ public async Task> ListByServiceNextPageAsync(str /// Lists all diagnostics of the API Management service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DocumentationRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DocumentationRestOperations.cs new file mode 100644 index 0000000000000..d02e234a2036b --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DocumentationRestOperations.cs @@ -0,0 +1,785 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class DocumentationRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of DocumentationRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public DocumentationRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2022-08-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByServiceRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string filter, int? top, int? skip) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/documentations", false); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByServiceRequest(string subscriptionId, string resourceGroupName, string serviceName, string filter, int? top, int? skip) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/documentations", false); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists all Documentations of the API Management service instance. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | eq | contains |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByServiceAsync(string subscriptionId, string resourceGroupName, string serviceName, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceRequest(subscriptionId, resourceGroupName, serviceName, filter, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DocumentationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DocumentationListResult.DeserializeDocumentationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists all Documentations of the API Management service instance. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | eq | contains |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByService(string subscriptionId, string resourceGroupName, string serviceName, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceRequest(subscriptionId, resourceGroupName, serviceName, filter, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DocumentationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DocumentationListResult.DeserializeDocumentationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetEntityTagRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string documentationId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/documentations/", false); + uri.AppendPath(documentationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string resourceGroupName, string serviceName, string documentationId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Head; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/documentations/", false); + uri.AppendPath(documentationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the entity state (Etag) version of the Documentation by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Documentation identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetEntityTagAsync(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, documentationId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the entity state (Etag) version of the Documentation by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Documentation identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetEntityTag(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, documentationId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string documentationId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/documentations/", false); + uri.AppendPath(documentationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string documentationId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/documentations/", false); + uri.AppendPath(documentationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the Documentation specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Documentation identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, documentationId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DocumentationContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DocumentationContractData.DeserializeDocumentationContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DocumentationContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the Documentation specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Documentation identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, documentationId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DocumentationContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DocumentationContractData.DeserializeDocumentationContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DocumentationContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, DocumentationContractData data, ETag? ifMatch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/documentations/", false); + uri.AppendPath(documentationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, DocumentationContractData data, ETag? ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/documentations/", false); + uri.AppendPath(documentationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch.Value); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates a new Documentation or updates an existing one. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Documentation identifier. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, DocumentationContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, documentationId, data, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + DocumentationContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DocumentationContractData.DeserializeDocumentationContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates a new Documentation or updates an existing one. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Documentation identifier. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, DocumentationContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, documentationId, data, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + DocumentationContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DocumentationContractData.DeserializeDocumentationContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, ETag ifMatch, DocumentationContractPatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/documentations/", false); + uri.AppendPath(documentationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, ETag ifMatch, DocumentationContractPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/documentations/", false); + uri.AppendPath(documentationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates the details of the Documentation for an API specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Documentation identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Documentation Update parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, ETag ifMatch, DocumentationContractPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, documentationId, ifMatch, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DocumentationContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DocumentationContractData.DeserializeDocumentationContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates the details of the Documentation for an API specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Documentation identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Documentation Update parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, ETag ifMatch, DocumentationContractPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, documentationId, ifMatch, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DocumentationContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DocumentationContractData.DeserializeDocumentationContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, ETag ifMatch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/documentations/", false); + uri.AppendPath(documentationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, ETag ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/documentations/", false); + uri.AppendPath(documentationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes the specified Documentation from an API. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Documentation identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, documentationId, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes the specified Documentation from an API. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Documentation identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string serviceName, string documentationId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(documentationId, nameof(documentationId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, documentationId, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByServiceNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string filter, int? top, int? skip) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string filter, int? top, int? skip) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists all Documentations of the API Management service instance. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | eq | contains |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByServiceNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, filter, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DocumentationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DocumentationListResult.DeserializeDocumentationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists all Documentations of the API Management service instance. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | eq | contains |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByServiceNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, filter, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DocumentationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DocumentationListResult.DeserializeDocumentationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/EmailTemplateRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/EmailTemplateRestOperations.cs index 977a66a702dd3..6c1fa2c873158 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/EmailTemplateRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/EmailTemplateRestOperations.cs @@ -32,7 +32,7 @@ public EmailTemplateRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -97,8 +97,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Gets all email templates. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -129,8 +129,8 @@ public async Task> ListByServiceAsync(string s } /// Gets all email templates. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -199,8 +199,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the email template specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Email Template Name Identifier. /// The cancellation token to use. @@ -232,8 +232,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the email template specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Email Template Name Identifier. /// The cancellation token to use. @@ -303,8 +303,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the email template specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Email Template Name Identifier. /// The cancellation token to use. @@ -335,8 +335,8 @@ public async Task> GetAsync(string subs } /// Gets the details of the email template specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Email Template Name Identifier. /// The cancellation token to use. @@ -413,8 +413,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Updates an Email Template. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Email Template Name Identifier. /// Email Template update parameters. @@ -447,8 +447,8 @@ public async Task> CreateOrUpdateAsync( } /// Updates an Email Template. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Email Template Name Identifier. /// Email Template update parameters. @@ -524,8 +524,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates API Management email template. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Email Template Name Identifier. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -557,8 +557,8 @@ public async Task> UpdateAsync(string s } /// Updates API Management email template. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Email Template Name Identifier. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -629,8 +629,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Reset the Email Template to default template provided by the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Email Template Name Identifier. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -656,8 +656,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Reset the Email Template to default template provided by the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Email Template Name Identifier. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -706,8 +706,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Gets all email templates. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -740,8 +740,8 @@ public async Task> ListByServiceNextPageAsync( /// Gets all email templates. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayApiRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayApiRestOperations.cs index 412c6c8c300cf..216c86c6cf332 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayApiRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayApiRestOperations.cs @@ -32,7 +32,7 @@ public GatewayApiRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -101,8 +101,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of the APIs associated with a gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -135,8 +135,8 @@ public async Task> ListByServiceAsyn } /// Lists a collection of the APIs associated with a gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -211,8 +211,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Checks that API entity specified by identifier is associated with the Gateway entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// API identifier. Must be unique in the current API Management service instance. @@ -247,8 +247,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Checks that API entity specified by identifier is associated with the Gateway entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// API identifier. Must be unique in the current API Management service instance. @@ -332,8 +332,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Adds an API to the specified Gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// API identifier. Must be unique in the current API Management service instance. @@ -367,8 +367,8 @@ public async Task> CreateOrUpdateAsync(string subscript } /// Adds an API to the specified Gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// API identifier. Must be unique in the current API Management service instance. @@ -444,8 +444,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified API from the specified Gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// API identifier. Must be unique in the current API Management service instance. @@ -473,8 +473,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified API from the specified Gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// API identifier. Must be unique in the current API Management service instance. @@ -525,8 +525,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of the APIs associated with a gateway. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -561,8 +561,8 @@ public async Task> ListByServiceNext /// Lists a collection of the APIs associated with a gateway. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayCertificateAuthorityRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayCertificateAuthorityRestOperations.cs index 3e542e9f263a1..00d8a3674ef36 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayCertificateAuthorityRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayCertificateAuthorityRestOperations.cs @@ -32,7 +32,7 @@ public GatewayCertificateAuthorityRestOperations(HttpPipeline pipeline, string a { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -101,8 +101,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists the collection of Certificate Authorities for the specified Gateway entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | eq, ne | |</br>. @@ -135,8 +135,8 @@ public async Task> ListByService } /// Lists the collection of Certificate Authorities for the specified Gateway entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | eq, ne | |</br>. @@ -211,8 +211,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. @@ -247,8 +247,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. @@ -325,8 +325,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get assigned Gateway Certificate Authority details. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. @@ -360,8 +360,8 @@ public async Task> GetAsy } /// Get assigned Gateway Certificate Authority details. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. @@ -445,8 +445,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Assign Certificate entity to Gateway entity as Certificate Authority. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. @@ -482,8 +482,8 @@ public async Task> Create } /// Assign Certificate entity to Gateway entity as Certificate Authority. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. @@ -562,8 +562,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Remove relationship between Certificate Authority and Gateway entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. @@ -592,8 +592,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Remove relationship between Certificate Authority and Gateway entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Identifier of the certificate entity. Must be unique in the current API Management service instance. @@ -645,8 +645,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists the collection of Certificate Authorities for the specified Gateway entity. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | eq, ne | |</br>. @@ -681,8 +681,8 @@ public async Task> ListByService /// Lists the collection of Certificate Authorities for the specified Gateway entity. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | eq, ne | |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayHostnameConfigurationRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayHostnameConfigurationRestOperations.cs index 2b96373c4cea3..ed44ce446bb09 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayHostnameConfigurationRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayHostnameConfigurationRestOperations.cs @@ -32,7 +32,7 @@ public GatewayHostnameConfigurationRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -101,8 +101,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists the collection of hostname configurations for the specified gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| hostname | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -135,8 +135,8 @@ public async Task> ListByServic } /// Lists the collection of hostname configurations for the specified gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| hostname | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -211,8 +211,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Checks that hostname configuration entity specified by identifier exists for specified Gateway entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway entity. @@ -247,8 +247,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Checks that hostname configuration entity specified by identifier exists for specified Gateway entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway entity. @@ -325,8 +325,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get details of a hostname configuration. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway entity. @@ -360,8 +360,8 @@ public async Task> GetAs } /// Get details of a hostname configuration. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway entity. @@ -445,8 +445,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates of updates hostname configuration for a Gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway entity. @@ -482,8 +482,8 @@ public async Task> Creat } /// Creates of updates hostname configuration for a Gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway entity. @@ -562,8 +562,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified hostname configuration from the specified Gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway entity. @@ -592,8 +592,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified hostname configuration from the specified Gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway entity. @@ -645,8 +645,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists the collection of hostname configurations for the specified gateway. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| hostname | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -681,8 +681,8 @@ public async Task> ListByServic /// Lists the collection of hostname configurations for the specified gateway. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| hostname | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayRestOperations.cs index 2baee3bc686b8..c70e02707671b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayRestOperations.cs @@ -32,7 +32,7 @@ public GatewayRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -97,8 +97,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of gateways registered with service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| region | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -129,8 +129,8 @@ public async Task> ListByServiceAsync(string subscri } /// Lists a collection of gateways registered with service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| region | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -199,8 +199,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the Gateway specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// The cancellation token to use. @@ -233,8 +233,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the Gateway specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// The cancellation token to use. @@ -305,8 +305,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the Gateway specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// The cancellation token to use. @@ -338,8 +338,8 @@ public async Task> GetAsync(string subscripti } /// Gets the details of the Gateway specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// The cancellation token to use. @@ -417,8 +417,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates a Gateway to be used in Api Management instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// The to use. @@ -452,8 +452,8 @@ public async Task> CreateOrUpdateAsync(string } /// Creates or updates a Gateway to be used in Api Management instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// The to use. @@ -530,8 +530,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the details of the gateway specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -564,8 +564,8 @@ public async Task> UpdateAsync(string subscri } /// Updates the details of the gateway specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -637,8 +637,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes specific Gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -665,8 +665,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes specific Gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -733,8 +733,8 @@ internal HttpMessage CreateListKeysRequest(string subscriptionId, string resourc } /// Retrieves gateway keys. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// The cancellation token to use. @@ -764,8 +764,8 @@ public async Task> ListKeysAsync(string subscripti } /// Retrieves gateway keys. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// The cancellation token to use. @@ -839,8 +839,8 @@ internal HttpMessage CreateRegenerateKeyRequest(string subscriptionId, string re } /// Regenerates specified gateway key invalidating any tokens created with it. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// The to use. @@ -867,8 +867,8 @@ public async Task RegenerateKeyAsync(string subscriptionId, string res } /// Regenerates specified gateway key invalidating any tokens created with it. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// The to use. @@ -939,8 +939,8 @@ internal HttpMessage CreateGenerateTokenRequest(string subscriptionId, string re } /// Gets the Shared Access Authorization Token for the gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// The to use. @@ -972,8 +972,8 @@ public async Task> GenerateTokenAsync(string subs } /// Gets the Shared Access Authorization Token for the gateway. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'. /// The to use. @@ -1028,8 +1028,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of gateways registered with service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| region | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -1062,8 +1062,8 @@ public async Task> ListByServiceNextPageAsync(string /// Lists a collection of gateways registered with service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| region | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GlobalSchemaRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GlobalSchemaRestOperations.cs index 62830a0e533b7..b7ca448dd336c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GlobalSchemaRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GlobalSchemaRestOperations.cs @@ -32,7 +32,7 @@ public GlobalSchemaRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -97,8 +97,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of schemas registered with service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -129,8 +129,8 @@ public async Task> ListByServiceAsync(string su } /// Lists a collection of schemas registered with service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -199,8 +199,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the Schema specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Schema id identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -233,8 +233,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the Schema specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Schema id identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -305,8 +305,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the Schema specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Schema id identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -338,8 +338,8 @@ public async Task> GetAsync(string subsc } /// Gets the details of the Schema specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Schema id identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -417,8 +417,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates new or updates existing specified Schema of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Schema id identifier. Must be unique in the current API Management service instance. /// Create or update parameters. @@ -448,8 +448,8 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates new or updates existing specified Schema of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Schema id identifier. Must be unique in the current API Management service instance. /// Create or update parameters. @@ -518,8 +518,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes specific Schema. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Schema id identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -546,8 +546,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes specific Schema. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Schema id identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -597,8 +597,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of schemas registered with service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -631,8 +631,8 @@ public async Task> ListByServiceNextPageAsync(s /// Lists a collection of schemas registered with service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GraphQLApiResolverPolicyRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GraphQLApiResolverPolicyRestOperations.cs new file mode 100644 index 0000000000000..ca13fcc417b7e --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GraphQLApiResolverPolicyRestOperations.cs @@ -0,0 +1,728 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class GraphQLApiResolverPolicyRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of GraphQLApiResolverPolicyRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public GraphQLApiResolverPolicyRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2022-08-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByResolverRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendPath("/policies", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByResolverRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendPath("/policies", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the list of policy configuration at the GraphQL API Resolver level. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListByResolverAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateListByResolverRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PolicyListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PolicyListResult.DeserializePolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the list of policy configuration at the GraphQL API Resolver level. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListByResolver(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateListByResolverRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PolicyListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PolicyListResult.DeserializePolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetEntityTagRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendPath("/policies/", false); + uri.AppendPath(policyId.ToString(), true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Head; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendPath("/policies/", false); + uri.AppendPath(policyId.ToString(), true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The identifier of the Policy. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetEntityTagAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, policyId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The identifier of the Policy. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetEntityTag(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, policyId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId, PolicyExportFormat? format) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendPath("/policies/", false); + uri.AppendPath(policyId.ToString(), true); + if (format != null) + { + uri.AppendQuery("format", format.Value.ToString(), true); + } + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId, PolicyExportFormat? format) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendPath("/policies/", false); + uri.AppendPath(policyId.ToString(), true); + if (format != null) + { + uri.AppendQuery("format", format.Value.ToString(), true); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the policy configuration at the GraphQL API Resolver level. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The identifier of the Policy. + /// Policy Export Format. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId, PolicyExportFormat? format = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, policyId, format); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PolicyContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PolicyContractData.DeserializePolicyContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PolicyContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the policy configuration at the GraphQL API Resolver level. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The identifier of the Policy. + /// Policy Export Format. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId, PolicyExportFormat? format = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, policyId, format); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PolicyContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PolicyContractData.DeserializePolicyContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PolicyContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId, PolicyContractData data, ETag? ifMatch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendPath("/policies/", false); + uri.AppendPath(policyId.ToString(), true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId, PolicyContractData data, ETag? ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendPath("/policies/", false); + uri.AppendPath(policyId.ToString(), true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch.Value); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or updates policy configuration for the GraphQL API Resolver level. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The identifier of the Policy. + /// The policy contents to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId, PolicyContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, policyId, data, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + PolicyContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PolicyContractData.DeserializePolicyContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates policy configuration for the GraphQL API Resolver level. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The identifier of the Policy. + /// The policy contents to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId, PolicyContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, policyId, data, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + PolicyContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PolicyContractData.DeserializePolicyContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId, ETag ifMatch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendPath("/policies/", false); + uri.AppendPath(policyId.ToString(), true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId, ETag ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendPath("/policies/", false); + uri.AppendPath(policyId.ToString(), true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes the policy configuration at the GraphQL Api Resolver. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The identifier of the Policy. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, policyId, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes the policy configuration at the GraphQL Api Resolver. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The identifier of the Policy. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, policyId, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResolverNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByResolverNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the list of policy configuration at the GraphQL API Resolver level. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListByResolverNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateListByResolverNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PolicyListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PolicyListResult.DeserializePolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the list of policy configuration at the GraphQL API Resolver level. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListByResolverNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateListByResolverNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PolicyListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PolicyListResult.DeserializePolicyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GraphQLApiResolverRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GraphQLApiResolverRestOperations.cs new file mode 100644 index 0000000000000..96b4bc0d2bb81 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GraphQLApiResolverRestOperations.cs @@ -0,0 +1,837 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class GraphQLApiResolverRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of GraphQLApiResolverRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public GraphQLApiResolverRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2022-08-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByApiRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string filter, int? top, int? skip) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers", false); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByApiRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string filter, int? top, int? skip) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers", false); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists a collection of the resolvers for the specified GraphQL API. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByApiAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + + using var message = CreateListByApiRequest(subscriptionId, resourceGroupName, serviceName, apiId, filter, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ResolverListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ResolverListResult.DeserializeResolverListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a collection of the resolvers for the specified GraphQL API. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByApi(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + + using var message = CreateListByApiRequest(subscriptionId, resourceGroupName, serviceName, apiId, filter, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ResolverListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ResolverListResult.DeserializeResolverListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetEntityTagRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Head; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetEntityTagAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the entity state (Etag) version of the GraphQL API resolver specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetEntityTag(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the GraphQL API Resolver specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ResolverContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ResolverContractData.DeserializeResolverContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ResolverContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the GraphQL API Resolver specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ResolverContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ResolverContractData.DeserializeResolverContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ResolverContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, ResolverContractData data, ETag? ifMatch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, ResolverContractData data, ETag? ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch.Value); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates a new resolver in the GraphQL API or updates an existing one. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, ResolverContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, data, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + ResolverContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ResolverContractData.DeserializeResolverContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates a new resolver in the GraphQL API or updates an existing one. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, ResolverContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, data, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + ResolverContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ResolverContractData.DeserializeResolverContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, ETag ifMatch, ResolverContractPatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, ETag ifMatch, ResolverContractPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates the details of the resolver in the GraphQL API specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// GraphQL API Resolver Update parameters. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, ETag ifMatch, ResolverContractPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, ifMatch, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ResolverContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ResolverContractData.DeserializeResolverContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates the details of the resolver in the GraphQL API specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// GraphQL API Resolver Update parameters. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, ETag ifMatch, ResolverContractPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, ifMatch, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ResolverContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ResolverContractData.DeserializeResolverContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, ETag ifMatch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, ETag ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/resolvers/", false); + uri.AppendPath(resolverId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes the specified resolver in the GraphQL API. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes the specified resolver in the GraphQL API. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(resolverId, nameof(resolverId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, apiId, resolverId, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByApiNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string apiId, string filter, int? top, int? skip) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByApiNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string apiId, string filter, int? top, int? skip) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists a collection of the resolvers for the specified GraphQL API. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByApiNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string apiId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + + using var message = CreateListByApiNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, apiId, filter, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ResolverListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ResolverListResult.DeserializeResolverListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a collection of the resolvers for the specified GraphQL API. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByApiNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string apiId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + + using var message = CreateListByApiNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, apiId, filter, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ResolverListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ResolverListResult.DeserializeResolverListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GroupRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GroupRestOperations.cs index 26d24fc47cf88..e8683db949246 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GroupRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GroupRestOperations.cs @@ -32,7 +32,7 @@ public GroupRestOperations(HttpPipeline pipeline, string applicationId, Uri endp { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -97,8 +97,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of groups defined within a service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| externalId | filter | eq | |</br>. /// Number of records to return. @@ -129,8 +129,8 @@ public async Task> ListByServiceAsync(string subscript } /// Lists a collection of groups defined within a service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| externalId | filter | eq | |</br>. /// Number of records to return. @@ -199,8 +199,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the group specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -233,8 +233,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the group specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -305,8 +305,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the group specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -338,8 +338,8 @@ public async Task> GetAsync(string subscription } /// Gets the details of the group specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -417,8 +417,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or Updates a group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// Create parameters. @@ -452,8 +452,8 @@ public async Task> CreateOrUpdateAsync(string s } /// Creates or Updates a group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// Create parameters. @@ -530,8 +530,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the details of the group specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -564,8 +564,8 @@ public async Task> UpdateAsync(string subscript } /// Updates the details of the group specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -637,8 +637,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes specific group of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -665,8 +665,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes specific group of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -716,8 +716,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of groups defined within a service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| externalId | filter | eq | |</br>. /// Number of records to return. @@ -750,8 +750,8 @@ public async Task> ListByServiceNextPageAsync(string n /// Lists a collection of groups defined within a service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| externalId | filter | eq | |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GroupUserRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GroupUserRestOperations.cs index e13f7b1e4f832..3137c29bba3ae 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GroupUserRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GroupUserRestOperations.cs @@ -32,7 +32,7 @@ public GroupUserRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -101,8 +101,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Lists a collection of user entities associated with the group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| registrationDate | filter | ge, le, eq, ne, gt, lt | |</br>| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -135,8 +135,8 @@ public async Task> ListAsync(string s } /// Lists a collection of user entities associated with the group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| registrationDate | filter | ge, le, eq, ne, gt, lt | |</br>| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -211,8 +211,8 @@ internal HttpMessage CreateCheckEntityExistsRequest(string subscriptionId, strin } /// Checks that user entity specified by identifier is associated with the group entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// User identifier. Must be unique in the current API Management service instance. @@ -247,8 +247,8 @@ public async Task> CheckEntityExistsAsync(string subscriptionId, } /// Checks that user entity specified by identifier is associated with the group entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// User identifier. Must be unique in the current API Management service instance. @@ -325,8 +325,8 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG } /// Add existing user to existing group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// User identifier. Must be unique in the current API Management service instance. @@ -359,8 +359,8 @@ public async Task> CreateAsync(string subsc } /// Add existing user to existing group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// User identifier. Must be unique in the current API Management service instance. @@ -435,8 +435,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Remove existing user from existing group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// User identifier. Must be unique in the current API Management service instance. @@ -464,8 +464,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Remove existing user from existing group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// User identifier. Must be unique in the current API Management service instance. @@ -516,8 +516,8 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Lists a collection of user entities associated with the group. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| registrationDate | filter | ge, le, eq, ne, gt, lt | |</br>| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -552,8 +552,8 @@ public async Task> ListNextPageAsync( /// Lists a collection of user entities associated with the group. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Group identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| registrationDate | filter | ge, le, eq, ne, gt, lt | |</br>| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/IdentityProviderRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/IdentityProviderRestOperations.cs index 54c12302dc156..ca2741b30328d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/IdentityProviderRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/IdentityProviderRestOperations.cs @@ -32,7 +32,7 @@ public IdentityProviderRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,8 +73,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of Identity Provider configured in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -102,8 +102,8 @@ public async Task> ListByServiceAsync(string subs } /// Lists a collection of Identity Provider configured in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -169,8 +169,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the identityProvider specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identity Provider Type identifier. /// The cancellation token to use. @@ -202,8 +202,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the identityProvider specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identity Provider Type identifier. /// The cancellation token to use. @@ -273,8 +273,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the configuration details of the identity Provider configured in specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identity Provider Type identifier. /// The cancellation token to use. @@ -305,8 +305,8 @@ public async Task> GetAsync(string s } /// Gets the configuration details of the identity Provider configured in specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identity Provider Type identifier. /// The cancellation token to use. @@ -383,8 +383,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or Updates the IdentityProvider configuration. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identity Provider Type identifier. /// Create parameters. @@ -417,8 +417,8 @@ public async Task> CreateOrUpdateAsy } /// Creates or Updates the IdentityProvider configuration. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identity Provider Type identifier. /// Create parameters. @@ -494,8 +494,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates an existing IdentityProvider configuration. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identity Provider Type identifier. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -527,8 +527,8 @@ public async Task> UpdateAsync(strin } /// Updates an existing IdentityProvider configuration. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identity Provider Type identifier. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -599,8 +599,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified identity provider configuration. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identity Provider Type identifier. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -626,8 +626,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified identity provider configuration. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identity Provider Type identifier. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -693,8 +693,8 @@ internal HttpMessage CreateListSecretsRequest(string subscriptionId, string reso } /// Gets the client secret details of the Identity Provider. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identity Provider Type identifier. /// The cancellation token to use. @@ -723,8 +723,8 @@ public async Task> ListSecretsAsync(string subscr } /// Gets the client secret details of the Identity Provider. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identity Provider Type identifier. /// The cancellation token to use. @@ -776,8 +776,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of Identity Provider configured in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , , or is null. @@ -807,8 +807,8 @@ public async Task> ListByServiceNextPageAsync(str /// Lists a collection of Identity Provider configured in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , , or is null. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/IssueRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/IssueRestOperations.cs index beb398202ba98..be82c91b55422 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/IssueRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/IssueRestOperations.cs @@ -32,7 +32,7 @@ public IssueRestOperations(HttpPipeline pipeline, string applicationId, Uri endp { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -97,8 +97,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of issues in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| authorName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>. /// Number of records to return. @@ -129,8 +129,8 @@ public async Task> ListByServiceAsync(string subscript } /// Lists a collection of issues in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| authorName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>. /// Number of records to return. @@ -199,8 +199,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets API Management issue details. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Issue identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -232,8 +232,8 @@ public async Task> GetAsync(string subscriptionId, s } /// Gets API Management issue details. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Issue identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -288,8 +288,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of issues in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| authorName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>. /// Number of records to return. @@ -322,8 +322,8 @@ public async Task> ListByServiceNextPageAsync(string n /// Lists a collection of issues in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| authorName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/LoggerRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/LoggerRestOperations.cs index dccbd6a62f1ba..ca0c0f646769b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/LoggerRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/LoggerRestOperations.cs @@ -32,7 +32,7 @@ public LoggerRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -97,8 +97,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of loggers in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| loggerType | filter | eq | |</br>| resourceId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -129,8 +129,8 @@ public async Task> ListByServiceAsync(string subscrip } /// Lists a collection of loggers in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| loggerType | filter | eq | |</br>| resourceId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -199,8 +199,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the logger specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Logger identifier. Must be unique in the API Management service instance. /// The cancellation token to use. @@ -233,8 +233,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the logger specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Logger identifier. Must be unique in the API Management service instance. /// The cancellation token to use. @@ -305,8 +305,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the logger specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Logger identifier. Must be unique in the API Management service instance. /// The cancellation token to use. @@ -338,8 +338,8 @@ public async Task> GetAsync(string subscriptio } /// Gets the details of the logger specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Logger identifier. Must be unique in the API Management service instance. /// The cancellation token to use. @@ -417,8 +417,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or Updates a logger. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Logger identifier. Must be unique in the API Management service instance. /// Create parameters. @@ -452,8 +452,8 @@ public async Task> CreateOrUpdateAsync(string } /// Creates or Updates a logger. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Logger identifier. Must be unique in the API Management service instance. /// Create parameters. @@ -530,8 +530,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates an existing logger. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Logger identifier. Must be unique in the API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -564,8 +564,8 @@ public async Task> UpdateAsync(string subscrip } /// Updates an existing logger. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Logger identifier. Must be unique in the API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -637,8 +637,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified logger. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Logger identifier. Must be unique in the API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -665,8 +665,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified logger. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Logger identifier. Must be unique in the API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -716,8 +716,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of loggers in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| loggerType | filter | eq | |</br>| resourceId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -750,8 +750,8 @@ public async Task> ListByServiceNextPageAsync(string /// Lists a collection of loggers in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| loggerType | filter | eq | |</br>| resourceId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NamedValueRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NamedValueRestOperations.cs index 49ca8b40f4485..266ed84dc34a8 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NamedValueRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NamedValueRestOperations.cs @@ -32,7 +32,7 @@ public NamedValueRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -105,8 +105,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of named values defined within a service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| tags | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -138,8 +138,8 @@ public async Task> ListByServiceAsync(string subs } /// Lists a collection of named values defined within a service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| tags | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -209,8 +209,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the named value specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// The cancellation token to use. @@ -243,8 +243,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the named value specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// The cancellation token to use. @@ -315,8 +315,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the named value specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// The cancellation token to use. @@ -348,8 +348,8 @@ public async Task> GetAsync(string subscri } /// Gets the details of the named value specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// The cancellation token to use. @@ -427,8 +427,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates named value. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// Create parameters. @@ -458,8 +458,8 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates or updates named value. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// Create parameters. @@ -532,8 +532,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the specific named value. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -562,8 +562,8 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Updates the specific named value. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -631,8 +631,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes specific named value from the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -659,8 +659,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes specific named value from the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -727,8 +727,8 @@ internal HttpMessage CreateListValueRequest(string subscriptionId, string resour } /// Gets the secret of the named value specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// The cancellation token to use. @@ -758,8 +758,8 @@ public async Task> ListValueAsync(string subs } /// Gets the secret of the named value specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// The cancellation token to use. @@ -829,8 +829,8 @@ internal HttpMessage CreateRefreshSecretRequest(string subscriptionId, string re } /// Refresh the secret of the named value specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// The cancellation token to use. @@ -856,8 +856,8 @@ public async Task RefreshSecretAsync(string subscriptionId, string res } /// Refresh the secret of the named value specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the NamedValue. /// The cancellation token to use. @@ -906,8 +906,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of named values defined within a service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| tags | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -941,8 +941,8 @@ public async Task> ListByServiceNextPageAsync(str /// Lists a collection of named values defined within a service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| tags | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NetworkStatusRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NetworkStatusRestOperations.cs index e0b16e4362560..99db18c2758b7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NetworkStatusRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NetworkStatusRestOperations.cs @@ -33,7 +33,7 @@ public NetworkStatusRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -74,8 +74,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -108,8 +108,8 @@ public async Task>> Li } /// Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -182,8 +182,8 @@ internal HttpMessage CreateListByLocationRequest(string subscriptionId, string r } /// Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Location in which the API Management service is deployed. This is one of the Azure Regions like West US, East US, South Central US. /// The cancellation token to use. @@ -212,8 +212,8 @@ public async Task> ListByLocationAsync(string su } /// Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Location in which the API Management service is deployed. This is one of the Azure Regions like West US, East US, South Central US. /// The cancellation token to use. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRecipientEmailRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRecipientEmailRestOperations.cs index fa1e34e33cb0d..131bedddde002 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRecipientEmailRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRecipientEmailRestOperations.cs @@ -32,7 +32,7 @@ public NotificationRecipientEmailRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -77,8 +77,8 @@ internal HttpMessage CreateListByNotificationRequest(string subscriptionId, stri } /// Gets the list of the Notification Recipient Emails subscribed to a notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// The cancellation token to use. @@ -107,8 +107,8 @@ public async Task> ListByNotificationAsync(st } /// Gets the list of the Notification Recipient Emails subscribed to a notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// The cancellation token to use. @@ -179,8 +179,8 @@ internal HttpMessage CreateCheckEntityExistsRequest(string subscriptionId, strin } /// Determine if Notification Recipient Email subscribed to the notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// Email identifier. @@ -214,8 +214,8 @@ public async Task> CheckEntityExistsAsync(string subscriptionId, } /// Determine if Notification Recipient Email subscribed to the notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// Email identifier. @@ -291,8 +291,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Adds the Email address to the list of Recipients for the Notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// Email identifier. @@ -324,8 +324,8 @@ public async Task> CreateOrUpdateAsync(string s } /// Adds the Email address to the list of Recipients for the Notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// Email identifier. @@ -399,8 +399,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Removes the email from the list of Notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// Email identifier. @@ -427,8 +427,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Removes the email from the list of Notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// Email identifier. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRecipientUserRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRecipientUserRestOperations.cs index 4aada53a8203e..7595b53d227ce 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRecipientUserRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRecipientUserRestOperations.cs @@ -32,7 +32,7 @@ public NotificationRecipientUserRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -77,8 +77,8 @@ internal HttpMessage CreateListByNotificationRequest(string subscriptionId, stri } /// Gets the list of the Notification Recipient User subscribed to the notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// The cancellation token to use. @@ -107,8 +107,8 @@ public async Task> ListByNotificationAsync(str } /// Gets the list of the Notification Recipient User subscribed to the notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// The cancellation token to use. @@ -179,8 +179,8 @@ internal HttpMessage CreateCheckEntityExistsRequest(string subscriptionId, strin } /// Determine if the Notification Recipient User is subscribed to the notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// User identifier. Must be unique in the current API Management service instance. @@ -214,8 +214,8 @@ public async Task> CheckEntityExistsAsync(string subscriptionId, } /// Determine if the Notification Recipient User is subscribed to the notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// User identifier. Must be unique in the current API Management service instance. @@ -291,8 +291,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Adds the API Management User to the list of Recipients for the Notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// User identifier. Must be unique in the current API Management service instance. @@ -324,8 +324,8 @@ public async Task> CreateOrUpdateAsync(string su } /// Adds the API Management User to the list of Recipients for the Notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// User identifier. Must be unique in the current API Management service instance. @@ -399,8 +399,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Removes the API Management user from the list of Notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// User identifier. Must be unique in the current API Management service instance. @@ -427,8 +427,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Removes the API Management user from the list of Notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// User identifier. Must be unique in the current API Management service instance. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRestOperations.cs index 4876ed14b855d..a11a38ec2c657 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRestOperations.cs @@ -32,7 +32,7 @@ public NotificationRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -89,8 +89,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of properties defined within a service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Number of records to return. /// Number of records to skip. @@ -120,8 +120,8 @@ public async Task> ListByServiceAsync(string su } /// Lists a collection of properties defined within a service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Number of records to return. /// Number of records to skip. @@ -189,8 +189,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the Notification specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// The cancellation token to use. @@ -221,8 +221,8 @@ public async Task> GetAsync(string subsc } /// Gets the details of the Notification specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// The cancellation token to use. @@ -295,8 +295,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create or Update API Management publisher notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -326,8 +326,8 @@ public async Task> CreateOrUpdateAsync(s } /// Create or Update API Management publisher notification. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Notification Name Identifier. /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -380,8 +380,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of properties defined within a service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Number of records to return. /// Number of records to skip. @@ -413,8 +413,8 @@ public async Task> ListByServiceNextPageAsync(s /// Lists a collection of properties defined within a service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Number of records to return. /// Number of records to skip. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OpenIdConnectProviderRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OpenIdConnectProviderRestOperations.cs index caf0e4c4b68bb..53d069dc2b51e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OpenIdConnectProviderRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OpenIdConnectProviderRestOperations.cs @@ -32,7 +32,7 @@ public OpenIdConnectProviderRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -97,8 +97,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists of all the OpenId Connect Providers. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -129,8 +129,8 @@ public async Task> ListByServiceAsync( } /// Lists of all the OpenId Connect Providers. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -199,8 +199,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the OpenID Connect Provider. /// The cancellation token to use. @@ -233,8 +233,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the OpenID Connect Provider. /// The cancellation token to use. @@ -305,8 +305,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets specific OpenID Connect Provider without secrets. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the OpenID Connect Provider. /// The cancellation token to use. @@ -338,8 +338,8 @@ public async Task> GetAsync(str } /// Gets specific OpenID Connect Provider without secrets. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the OpenID Connect Provider. /// The cancellation token to use. @@ -417,8 +417,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates the OpenID Connect Provider. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the OpenID Connect Provider. /// Create parameters. @@ -452,8 +452,8 @@ public async Task> CreateOrUpda } /// Creates or updates the OpenID Connect Provider. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the OpenID Connect Provider. /// Create parameters. @@ -530,8 +530,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the specific OpenID Connect Provider. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the OpenID Connect Provider. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -564,8 +564,8 @@ public async Task> UpdateAsync( } /// Updates the specific OpenID Connect Provider. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the OpenID Connect Provider. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -637,8 +637,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes specific OpenID Connect Provider of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the OpenID Connect Provider. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -665,8 +665,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes specific OpenID Connect Provider of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the OpenID Connect Provider. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -733,8 +733,8 @@ internal HttpMessage CreateListSecretsRequest(string subscriptionId, string reso } /// Gets the client secret details of the OpenID Connect Provider. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the OpenID Connect Provider. /// The cancellation token to use. @@ -764,8 +764,8 @@ public async Task> ListSecretsAsync(string subscr } /// Gets the client secret details of the OpenID Connect Provider. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Identifier of the OpenID Connect Provider. /// The cancellation token to use. @@ -818,8 +818,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists of all the OpenId Connect Providers. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -852,8 +852,8 @@ public async Task> ListByServiceNextPa /// Lists of all the OpenId Connect Providers. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OperationRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OperationRestOperations.cs index c17d1672e162f..46472fdaf7b54 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OperationRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OperationRestOperations.cs @@ -32,7 +32,7 @@ public OperationRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -109,8 +109,8 @@ internal HttpMessage CreateListByTagsRequest(string subscriptionId, string resou } /// Lists a collection of operations associated with tags. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -144,8 +144,8 @@ public async Task> ListByTagsAsync(string subscr } /// Lists a collection of operations associated with tags. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -202,8 +202,8 @@ internal HttpMessage CreateListByTagsNextPageRequest(string nextLink, string sub /// Lists a collection of operations associated with tags. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -239,8 +239,8 @@ public async Task> ListByTagsNextPageAsync(strin /// Lists a collection of operations associated with tags. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OutboundNetworkDependenciesEndpointsRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OutboundNetworkDependenciesEndpointsRestOperations.cs index b586b712f32d6..db0162ffac1ea 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OutboundNetworkDependenciesEndpointsRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OutboundNetworkDependenciesEndpointsRestOperations.cs @@ -32,7 +32,7 @@ public OutboundNetworkDependenciesEndpointsRestOperations(HttpPipeline pipeline, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,8 +73,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Gets the network endpoints of all outbound dependencies of a ApiManagement service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -102,8 +102,8 @@ public async Task> ListByServiceAsync( } /// Gets the network endpoints of all outbound dependencies of a ApiManagement service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyDescriptionRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyDescriptionRestOperations.cs index 4e933dad2cc80..23e585d585efd 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyDescriptionRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyDescriptionRestOperations.cs @@ -32,7 +32,7 @@ public PolicyDescriptionRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -81,8 +81,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all policy descriptions. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Policy scope. /// The cancellation token to use. @@ -111,8 +111,8 @@ public async Task> ListByServiceAsync(stri } /// Lists all policy descriptions. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Policy scope. /// The cancellation token to use. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyFragmentRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyFragmentRestOperations.cs new file mode 100644 index 0000000000000..61856470b4374 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyFragmentRestOperations.cs @@ -0,0 +1,718 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class PolicyFragmentRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of PolicyFragmentRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public PolicyFragmentRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2022-08-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByServiceRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string filter, string orderBy, int? top, int? skip) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyFragments", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (orderBy != null) + { + uri.AppendQuery("$orderby", orderBy, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + return uri; + } + + internal HttpMessage CreateListByServiceRequest(string subscriptionId, string resourceGroupName, string serviceName, string filter, string orderBy, int? top, int? skip) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyFragments", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (orderBy != null) + { + uri.AppendQuery("$orderby", orderBy, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets all policy fragments. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter, orderBy | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| value | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// OData order by query option. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByServiceAsync(string subscriptionId, string resourceGroupName, string serviceName, string filter = null, string orderBy = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceRequest(subscriptionId, resourceGroupName, serviceName, filter, orderBy, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PolicyFragmentListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PolicyFragmentListResult.DeserializePolicyFragmentListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets all policy fragments. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter, orderBy | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| value | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// OData order by query option. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByService(string subscriptionId, string resourceGroupName, string serviceName, string filter = null, string orderBy = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceRequest(subscriptionId, resourceGroupName, serviceName, filter, orderBy, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PolicyFragmentListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PolicyFragmentListResult.DeserializePolicyFragmentListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetEntityTagRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string id) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyFragments/", false); + uri.AppendPath(id, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string resourceGroupName, string serviceName, string id) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Head; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyFragments/", false); + uri.AppendPath(id, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the entity state (Etag) version of a policy fragment. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// A resource identifier. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetEntityTagAsync(string subscriptionId, string resourceGroupName, string serviceName, string id, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, id); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the entity state (Etag) version of a policy fragment. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// A resource identifier. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetEntityTag(string subscriptionId, string resourceGroupName, string serviceName, string id, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, id); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string id, PolicyFragmentContentFormat? format) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyFragments/", false); + uri.AppendPath(id, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (format != null) + { + uri.AppendQuery("format", format.Value.ToString(), true); + } + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string id, PolicyFragmentContentFormat? format) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyFragments/", false); + uri.AppendPath(id, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (format != null) + { + uri.AppendQuery("format", format.Value.ToString(), true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a policy fragment. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// A resource identifier. + /// Policy fragment content format. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serviceName, string id, PolicyFragmentContentFormat? format = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, id, format); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PolicyFragmentContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PolicyFragmentContractData.DeserializePolicyFragmentContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PolicyFragmentContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a policy fragment. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// A resource identifier. + /// Policy fragment content format. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string serviceName, string id, PolicyFragmentContentFormat? format = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, id, format); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PolicyFragmentContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PolicyFragmentContractData.DeserializePolicyFragmentContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PolicyFragmentContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string id, PolicyFragmentContractData data, ETag? ifMatch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyFragments/", false); + uri.AppendPath(id, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string id, PolicyFragmentContractData data, ETag? ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyFragments/", false); + uri.AppendPath(id, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch.Value); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or updates a policy fragment. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// A resource identifier. + /// The policy fragment contents to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string id, PolicyFragmentContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, id, data, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates a policy fragment. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// A resource identifier. + /// The policy fragment contents to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string id, PolicyFragmentContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, id, data, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string id, ETag ifMatch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyFragments/", false); + uri.AppendPath(id, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string id, ETag ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyFragments/", false); + uri.AppendPath(id, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes a policy fragment. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// A resource identifier. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serviceName, string id, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, id, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes a policy fragment. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// A resource identifier. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string serviceName, string id, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, id, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListReferencesRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string id, int? top, int? skip) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyFragments/", false); + uri.AppendPath(id, true); + uri.AppendPath("/listReferences", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + return uri; + } + + internal HttpMessage CreateListReferencesRequest(string subscriptionId, string resourceGroupName, string serviceName, string id, int? top, int? skip) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyFragments/", false); + uri.AppendPath(id, true); + uri.AppendPath("/listReferences", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists policy resources that reference the policy fragment. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// A resource identifier. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListReferencesAsync(string subscriptionId, string resourceGroupName, string serviceName, string id, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var message = CreateListReferencesRequest(subscriptionId, resourceGroupName, serviceName, id, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ResourceListResult.DeserializeResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists policy resources that reference the policy fragment. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// A resource identifier. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListReferences(string subscriptionId, string resourceGroupName, string serviceName, string id, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var message = CreateListReferencesRequest(subscriptionId, resourceGroupName, serviceName, id, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ResourceListResult.DeserializeResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyRestOperations.cs index d3b36f7e7f36e..42cada163f79c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyRestOperations.cs @@ -32,7 +32,7 @@ public PolicyRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,8 +73,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all the Global Policy definitions of the Api Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -102,8 +102,8 @@ public async Task> ListByServiceAsync(string subscrip } /// Lists all the Global Policy definitions of the Api Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -169,8 +169,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the Global policy definition in the Api Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Policy. /// The cancellation token to use. @@ -202,8 +202,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the Global policy definition in the Api Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Policy. /// The cancellation token to use. @@ -281,8 +281,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get the Global policy definition of the Api Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Policy. /// Policy Export Format. @@ -314,8 +314,8 @@ public async Task> GetAsync(string subscriptionId, } /// Get the Global policy definition of the Api Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Policy. /// Policy Export Format. @@ -393,8 +393,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates the global policy configuration of the Api Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Policy. /// The policy contents to apply. @@ -427,8 +427,8 @@ public async Task> CreateOrUpdateAsync(string subsc } /// Creates or updates the global policy configuration of the Api Management service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Policy. /// The policy contents to apply. @@ -500,8 +500,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the global policy configuration of the Api Management Service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Policy. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -527,8 +527,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the global policy configuration of the Api Management Service. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Policy. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalConfigRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalConfigRestOperations.cs new file mode 100644 index 0000000000000..a2b0aa42532f9 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalConfigRestOperations.cs @@ -0,0 +1,565 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class PortalConfigRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of PortalConfigRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public PortalConfigRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2022-08-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByServiceRequestUri(string subscriptionId, string resourceGroupName, string serviceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/portalconfigs", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByServiceRequest(string subscriptionId, string resourceGroupName, string serviceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/portalconfigs", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists the developer portal configurations. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByServiceAsync(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceRequest(subscriptionId, resourceGroupName, serviceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PortalConfigListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PortalConfigListResult.DeserializePortalConfigListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the developer portal configurations. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByService(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceRequest(subscriptionId, resourceGroupName, serviceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PortalConfigListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PortalConfigListResult.DeserializePortalConfigListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetEntityTagRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/portalconfigs/", false); + uri.AppendPath(portalConfigId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Head; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/portalconfigs/", false); + uri.AppendPath(portalConfigId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the entity state (Etag) version of the developer portal configuration. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Portal configuration identifier. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetEntityTagAsync(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, portalConfigId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the entity state (Etag) version of the developer portal configuration. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Portal configuration identifier. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetEntityTag(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, portalConfigId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/portalconfigs/", false); + uri.AppendPath(portalConfigId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/portalconfigs/", false); + uri.AppendPath(portalConfigId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the developer portal configuration. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Portal configuration identifier. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, portalConfigId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PortalConfigContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PortalConfigContractData.DeserializePortalConfigContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PortalConfigContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the developer portal configuration. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Portal configuration identifier. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, portalConfigId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PortalConfigContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PortalConfigContractData.DeserializePortalConfigContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PortalConfigContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId, ETag ifMatch, PortalConfigContractData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/portalconfigs/", false); + uri.AppendPath(portalConfigId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId, ETag ifMatch, PortalConfigContractData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/portalconfigs/", false); + uri.AppendPath(portalConfigId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update the developer portal configuration. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Portal configuration identifier. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Update the developer portal configuration. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId, ETag ifMatch, PortalConfigContractData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, portalConfigId, ifMatch, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PortalConfigContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PortalConfigContractData.DeserializePortalConfigContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update the developer portal configuration. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Portal configuration identifier. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Update the developer portal configuration. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId, ETag ifMatch, PortalConfigContractData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, portalConfigId, ifMatch, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PortalConfigContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PortalConfigContractData.DeserializePortalConfigContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId, ETag ifMatch, PortalConfigContractData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/portalconfigs/", false); + uri.AppendPath(portalConfigId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId, ETag ifMatch, PortalConfigContractData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/portalconfigs/", false); + uri.AppendPath(portalConfigId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or update the developer portal configuration. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Portal configuration identifier. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Update the developer portal configuration. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId, ETag ifMatch, PortalConfigContractData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, portalConfigId, ifMatch, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PortalConfigContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PortalConfigContractData.DeserializePortalConfigContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update the developer portal configuration. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Portal configuration identifier. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Update the developer portal configuration. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string portalConfigId, ETag ifMatch, PortalConfigContractData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(portalConfigId, nameof(portalConfigId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, portalConfigId, ifMatch, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PortalConfigContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PortalConfigContractData.DeserializePortalConfigContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalRevisionRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalRevisionRestOperations.cs index 76b3ea0d8d062..c6bbe40ac7584 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalRevisionRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalRevisionRestOperations.cs @@ -32,7 +32,7 @@ public PortalRevisionRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -97,8 +97,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists developer portal's revisions. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// /// | Field | Supported operators | Supported functions | @@ -137,8 +137,8 @@ public async Task> ListByServiceAsync(string } /// Lists developer portal's revisions. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// /// | Field | Supported operators | Supported functions | @@ -215,8 +215,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the developer portal revision specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Portal revision identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -249,8 +249,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the developer portal revision specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Portal revision identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -321,8 +321,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the developer portal's revision specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Portal revision identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -354,8 +354,8 @@ public async Task> GetAsync(string sub } /// Gets the developer portal's revision specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Portal revision identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -429,8 +429,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` property indicates if the revision is publicly accessible. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Portal revision identifier. Must be unique in the current API Management service instance. /// The to use. @@ -458,8 +458,8 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` property indicates if the revision is publicly accessible. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Portal revision identifier. Must be unique in the current API Management service instance. /// The to use. @@ -530,8 +530,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the description of specified portal revision or makes it current. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Portal revision identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -560,8 +560,8 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Updates the description of specified portal revision or makes it current. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Portal revision identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -613,8 +613,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists developer portal's revisions. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// /// | Field | Supported operators | Supported functions | @@ -655,8 +655,8 @@ public async Task> ListByServiceNextPageAsync /// Lists developer portal's revisions. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// /// | Field | Supported operators | Supported functions | diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalSettingsRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalSettingsRestOperations.cs index 440202af83f83..5e1c313ed6eb1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalSettingsRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalSettingsRestOperations.cs @@ -32,7 +32,7 @@ public PortalSettingsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,8 +73,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of portalsettings defined within a service instance.. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -102,8 +102,8 @@ public async Task> ListByServiceAsync(string } /// Lists a collection of portalsettings defined within a service instance.. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PrivateEndpointConnectionRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PrivateEndpointConnectionRestOperations.cs index 13d4f78ca5597..68e837c26eee4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PrivateEndpointConnectionRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PrivateEndpointConnectionRestOperations.cs @@ -32,7 +32,7 @@ public PrivateEndpointConnectionRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,8 +73,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all private endpoint connections of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -102,8 +102,8 @@ public async Task> Li } /// Lists all private endpoint connections of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -169,8 +169,8 @@ internal HttpMessage CreateGetByNameRequest(string subscriptionId, string resour } /// Gets the details of the Private Endpoint Connection specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Name of the private endpoint connection. /// The cancellation token to use. @@ -202,8 +202,8 @@ public async Task> GetByNam } /// Gets the details of the Private Endpoint Connection specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Name of the private endpoint connection. /// The cancellation token to use. @@ -277,8 +277,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates a new Private Endpoint Connection or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Name of the private endpoint connection. /// The to use. @@ -306,8 +306,8 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates a new Private Endpoint Connection or updates an existing one. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Name of the private endpoint connection. /// The to use. @@ -373,8 +373,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified Private Endpoint Connection. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Name of the private endpoint connection. /// The cancellation token to use. @@ -401,8 +401,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified Private Endpoint Connection. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Name of the private endpoint connection. /// The cancellation token to use. @@ -465,8 +465,8 @@ internal HttpMessage CreateListPrivateLinkResourcesRequest(string subscriptionId } /// Gets the private link resources. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -494,8 +494,8 @@ public async Task> ListPriv } /// Gets the private link resources. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -561,8 +561,8 @@ internal HttpMessage CreateGetPrivateLinkResourceRequest(string subscriptionId, } /// Gets the private link resources. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Name of the private link resource. /// The cancellation token to use. @@ -594,8 +594,8 @@ public async Task> GetPrivateLink } /// Gets the private link resources. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Name of the private link resource. /// The cancellation token to use. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductApiRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductApiRestOperations.cs index 6be9d23054441..deda5f49ee464 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductApiRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductApiRestOperations.cs @@ -32,7 +32,7 @@ public ProductApiRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -101,8 +101,8 @@ internal HttpMessage CreateListByProductRequest(string subscriptionId, string re } /// Lists a collection of the APIs associated with a product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -135,8 +135,8 @@ public async Task> ListByProductAsyn } /// Lists a collection of the APIs associated with a product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -211,8 +211,8 @@ internal HttpMessage CreateCheckEntityExistsRequest(string subscriptionId, strin } /// Checks that API entity specified by identifier is associated with the Product entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. @@ -247,8 +247,8 @@ public async Task> CheckEntityExistsAsync(string subscriptionId, } /// Checks that API entity specified by identifier is associated with the Product entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. @@ -325,8 +325,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Adds an API to the specified product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. @@ -359,8 +359,8 @@ public async Task> CreateOrUpdateAsync(string subscript } /// Adds an API to the specified product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. @@ -435,8 +435,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified API from the specified product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. @@ -464,8 +464,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified API from the specified product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. @@ -516,8 +516,8 @@ internal HttpMessage CreateListByProductNextPageRequest(string nextLink, string /// Lists a collection of the APIs associated with a product. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -552,8 +552,8 @@ public async Task> ListByProductNext /// Lists a collection of the APIs associated with a product. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductGroupRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductGroupRestOperations.cs index 37f205664f041..66283b7ca8f14 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductGroupRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductGroupRestOperations.cs @@ -32,7 +32,7 @@ public ProductGroupRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -101,8 +101,8 @@ internal HttpMessage CreateListByProductRequest(string subscriptionId, string re } /// Lists the collection of developer groups associated with the specified product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | |</br>| displayName | filter | eq, ne | |</br>| description | filter | eq, ne | |</br>. @@ -135,8 +135,8 @@ public async Task> ListByProductAs } /// Lists the collection of developer groups associated with the specified product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | |</br>| displayName | filter | eq, ne | |</br>| description | filter | eq, ne | |</br>. @@ -211,8 +211,8 @@ internal HttpMessage CreateCheckEntityExistsRequest(string subscriptionId, strin } /// Checks that Group entity specified by identifier is associated with the Product entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Group identifier. Must be unique in the current API Management service instance. @@ -247,8 +247,8 @@ public async Task> CheckEntityExistsAsync(string subscriptionId, } /// Checks that Group entity specified by identifier is associated with the Product entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Group identifier. Must be unique in the current API Management service instance. @@ -325,8 +325,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Adds the association between the specified developer group with the specified product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Group identifier. Must be unique in the current API Management service instance. @@ -359,8 +359,8 @@ public async Task> CreateOrUpdateAsync(string subscri } /// Adds the association between the specified developer group with the specified product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Group identifier. Must be unique in the current API Management service instance. @@ -435,8 +435,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the association between the specified group and product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Group identifier. Must be unique in the current API Management service instance. @@ -464,8 +464,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the association between the specified group and product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Group identifier. Must be unique in the current API Management service instance. @@ -516,8 +516,8 @@ internal HttpMessage CreateListByProductNextPageRequest(string nextLink, string /// Lists the collection of developer groups associated with the specified product. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | |</br>| displayName | filter | eq, ne | |</br>| description | filter | eq, ne | |</br>. @@ -552,8 +552,8 @@ public async Task> ListByProductNe /// Lists the collection of developer groups associated with the specified product. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | |</br>| displayName | filter | eq, ne | |</br>| description | filter | eq, ne | |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductPolicyRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductPolicyRestOperations.cs index 9c598be7cedf5..de5f472786310 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductPolicyRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductPolicyRestOperations.cs @@ -32,7 +32,7 @@ public ProductPolicyRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -77,8 +77,8 @@ internal HttpMessage CreateListByProductRequest(string subscriptionId, string re } /// Get the policy configuration at the Product level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -108,8 +108,8 @@ public async Task> ListByProductAsync(string subscrip } /// Get the policy configuration at the Product level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -181,8 +181,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Get the ETag of the policy configuration at the Product level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The identifier of the Policy. @@ -216,8 +216,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Get the ETag of the policy configuration at the Product level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The identifier of the Policy. @@ -301,8 +301,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get the policy configuration at the Product level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The identifier of the Policy. @@ -336,8 +336,8 @@ public async Task> GetAsync(string subscriptionId, } /// Get the policy configuration at the Product level. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The identifier of the Policy. @@ -421,8 +421,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates policy configuration for the Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The identifier of the Policy. @@ -457,8 +457,8 @@ public async Task> CreateOrUpdateAsync(string subsc } /// Creates or updates policy configuration for the Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The identifier of the Policy. @@ -536,8 +536,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the policy configuration at the Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The identifier of the Policy. @@ -565,8 +565,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the policy configuration at the Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The identifier of the Policy. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductRestOperations.cs index dddf8e1ca9ff3..fdb07457b7237 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductRestOperations.cs @@ -32,7 +32,7 @@ public ProductRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -113,8 +113,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of products in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| groups | expand | | |</br>. /// Number of records to return. @@ -147,8 +147,8 @@ public async Task> ListByServiceAsync(string subscri } /// Lists a collection of products in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| groups | expand | | |</br>. /// Number of records to return. @@ -219,8 +219,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the product specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -253,8 +253,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the product specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -325,8 +325,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the product specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -358,8 +358,8 @@ public async Task> GetAsync(string subscripti } /// Gets the details of the product specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -437,8 +437,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or Updates a product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Create or update parameters. @@ -472,8 +472,8 @@ public async Task> CreateOrUpdateAsync(string } /// Creates or Updates a product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Create or update parameters. @@ -550,8 +550,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Update existing product details. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -584,8 +584,8 @@ public async Task> UpdateAsync(string subscri } /// Update existing product details. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -665,8 +665,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -694,8 +694,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -791,8 +791,8 @@ internal HttpMessage CreateListByTagsRequest(string subscriptionId, string resou } /// Lists a collection of products associated with tags. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -824,8 +824,8 @@ public async Task> ListByTagsAsync(string subscr } /// Lists a collection of products associated with tags. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -880,8 +880,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of products in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| groups | expand | | |</br>. /// Number of records to return. @@ -916,8 +916,8 @@ public async Task> ListByServiceNextPageAsync(string /// Lists a collection of products in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| groups | expand | | |</br>. /// Number of records to return. @@ -974,8 +974,8 @@ internal HttpMessage CreateListByTagsNextPageRequest(string nextLink, string sub /// Lists a collection of products associated with tags. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -1009,8 +1009,8 @@ public async Task> ListByTagsNextPageAsync(strin /// Lists a collection of products associated with tags. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | substringof, contains, startswith, endswith |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductSubscriptionsRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductSubscriptionsRestOperations.cs index 97d5113041083..4701f8430319b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductSubscriptionsRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductSubscriptionsRestOperations.cs @@ -32,7 +32,7 @@ public ProductSubscriptionsRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -101,8 +101,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Lists the collection of subscriptions to the specified product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| user | expand | | |</br>. @@ -135,8 +135,8 @@ public async Task> ListAsync(string subscriptio } /// Lists the collection of subscriptions to the specified product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| user | expand | | |</br>. @@ -192,8 +192,8 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Lists the collection of subscriptions to the specified product. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| user | expand | | |</br>. @@ -228,8 +228,8 @@ public async Task> ListNextPageAsync(string nex /// Lists the collection of subscriptions to the specified product. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| user | expand | | |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductWikiRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductWikiRestOperations.cs new file mode 100644 index 0000000000000..d34f3569a44b8 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductWikiRestOperations.cs @@ -0,0 +1,581 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class ProductWikiRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ProductWikiRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ProductWikiRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2022-08-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetEntityTagRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string productId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/products/", false); + uri.AppendPath(productId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string resourceGroupName, string serviceName, string productId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Head; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/products/", false); + uri.AppendPath(productId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Product identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetEntityTagAsync(string subscriptionId, string resourceGroupName, string serviceName, string productId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(productId, nameof(productId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, productId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Product identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetEntityTag(string subscriptionId, string resourceGroupName, string serviceName, string productId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(productId, nameof(productId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, productId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string productId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/products/", false); + uri.AppendPath(productId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string productId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/products/", false); + uri.AppendPath(productId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the Wiki for a Product specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Product identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string serviceName, string productId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(productId, nameof(productId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, productId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WikiContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WikiContractData.DeserializeWikiContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WikiContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the Wiki for a Product specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Product identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string serviceName, string productId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(productId, nameof(productId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, productId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WikiContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WikiContractData.DeserializeWikiContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WikiContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string productId, WikiContractData data, ETag? ifMatch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/products/", false); + uri.AppendPath(productId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string productId, WikiContractData data, ETag? ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/products/", false); + uri.AppendPath(productId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch.Value); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates a new Wiki for a Product or updates an existing one. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Product identifier. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string productId, WikiContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(productId, nameof(productId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, productId, data, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + WikiContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WikiContractData.DeserializeWikiContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates a new Wiki for a Product or updates an existing one. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Product identifier. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string serviceName, string productId, WikiContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(productId, nameof(productId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, productId, data, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + WikiContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WikiContractData.DeserializeWikiContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string productId, ETag ifMatch, WikiUpdateContract wikiUpdateContract) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/products/", false); + uri.AppendPath(productId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string productId, ETag ifMatch, WikiUpdateContract wikiUpdateContract) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/products/", false); + uri.AppendPath(productId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(wikiUpdateContract, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates the details of the Wiki for a Product specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Product identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Wiki Update parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string serviceName, string productId, ETag ifMatch, WikiUpdateContract wikiUpdateContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(productId, nameof(productId)); + Argument.AssertNotNull(wikiUpdateContract, nameof(wikiUpdateContract)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, productId, ifMatch, wikiUpdateContract); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WikiContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WikiContractData.DeserializeWikiContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates the details of the Wiki for a Product specified by its identifier. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Product identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Wiki Update parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string serviceName, string productId, ETag ifMatch, WikiUpdateContract wikiUpdateContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(productId, nameof(productId)); + Argument.AssertNotNull(wikiUpdateContract, nameof(wikiUpdateContract)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, productId, ifMatch, wikiUpdateContract); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WikiContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WikiContractData.DeserializeWikiContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string productId, ETag ifMatch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/products/", false); + uri.AppendPath(productId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string productId, ETag ifMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/products/", false); + uri.AppendPath(productId, true); + uri.AppendPath("/wikis/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes the specified Wiki from a Product. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Product identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string serviceName, string productId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(productId, nameof(productId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, productId, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes the specified Wiki from a Product. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Product identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string serviceName, string productId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(productId, nameof(productId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, productId, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/QuotaByCounterKeysRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/QuotaByCounterKeysRestOperations.cs index f7b3f78f93058..3a1574505cf07 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/QuotaByCounterKeysRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/QuotaByCounterKeysRestOperations.cs @@ -32,7 +32,7 @@ public QuotaByCounterKeysRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -75,8 +75,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key. /// The cancellation token to use. @@ -106,8 +106,8 @@ public async Task> ListByServiceAsync(string su } /// Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key. /// The cancellation token to use. @@ -179,8 +179,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key. /// The value of the quota counter to be applied to all quota counter periods. @@ -212,8 +212,8 @@ public async Task> UpdateAsync(string subscript } /// Updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key. /// The value of the quota counter to be applied to all quota counter periods. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/QuotaByPeriodKeysRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/QuotaByPeriodKeysRestOperations.cs index dd354457a4234..f061b65b5e4b2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/QuotaByPeriodKeysRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/QuotaByPeriodKeysRestOperations.cs @@ -32,7 +32,7 @@ public QuotaByPeriodKeysRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -79,8 +79,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key. /// Quota period key identifier. @@ -112,8 +112,8 @@ public async Task> GetAsync(string subscriptionId } /// Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key. /// Quota period key identifier. @@ -191,8 +191,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates an existing quota counter value in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key. /// Quota period key identifier. @@ -226,8 +226,8 @@ public async Task> UpdateAsync(string subscriptio } /// Updates an existing quota counter value in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key. /// Quota period key identifier. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/RegionRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/RegionRestOperations.cs index 35294d4b1a537..33ea2f62fb5e3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/RegionRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/RegionRestOperations.cs @@ -32,7 +32,7 @@ public RegionRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,8 +73,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists all azure regions in which the service exists. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -102,8 +102,8 @@ public async Task> ListByServiceAsync(string subscrip } /// Lists all azure regions in which the service exists. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -154,8 +154,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists all azure regions in which the service exists. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , , or is null. @@ -185,8 +185,8 @@ public async Task> ListByServiceNextPageAsync(string /// Lists all azure regions in which the service exists. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , , or is null. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ReportsRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ReportsRestOperations.cs index 6a2d16d5646f0..b6c75360b58f3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ReportsRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ReportsRestOperations.cs @@ -32,7 +32,7 @@ public ReportsRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -99,8 +99,8 @@ internal HttpMessage CreateListByApiRequest(string subscriptionId, string resour } /// Lists report records by API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The filter to apply on the operation. /// Number of records to return. @@ -133,8 +133,8 @@ public async Task> ListByApiAsync(string subscription } /// Lists report records by API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The filter to apply on the operation. /// Number of records to return. @@ -229,8 +229,8 @@ internal HttpMessage CreateListByUserRequest(string subscriptionId, string resou } /// Lists report records by User. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| userId | select, filter | eq | | </br>| apiRegion | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -263,8 +263,8 @@ public async Task> ListByUserAsync(string subscriptio } /// Lists report records by User. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| userId | select, filter | eq | | </br>| apiRegion | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -359,8 +359,8 @@ internal HttpMessage CreateListByOperationRequest(string subscriptionId, string } /// Lists report records by API Operations. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | select, filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -393,8 +393,8 @@ public async Task> ListByOperationAsync(string subscr } /// Lists report records by API Operations. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | select, filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -489,8 +489,8 @@ internal HttpMessage CreateListByProductRequest(string subscriptionId, string re } /// Lists report records by Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | select, filter | eq | | </br>| subscriptionId | filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -523,8 +523,8 @@ public async Task> ListByProductAsync(string subscrip } /// Lists report records by Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | select, filter | eq | | </br>| subscriptionId | filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -611,8 +611,8 @@ internal HttpMessage CreateListByGeoRequest(string subscriptionId, string resour } /// Lists report records by geography. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| country | select | | | </br>| region | select | | | </br>| zip | select | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| callCountSuccess | select | | | </br>| callCountBlocked | select | | | </br>| callCountFailed | select | | | </br>| callCountOther | select | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -644,8 +644,8 @@ public async Task> ListByGeoAsync(string subscription } /// Lists report records by geography. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| country | select | | | </br>| region | select | | | </br>| zip | select | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| callCountSuccess | select | | | </br>| callCountBlocked | select | | | </br>| callCountFailed | select | | | </br>| callCountOther | select | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -739,8 +739,8 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, stri } /// Lists report records by subscription. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| apiRegion | filter | eq | | </br>| userId | select, filter | eq | | </br>| productId | select, filter | eq | | </br>| subscriptionId | select, filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -773,8 +773,8 @@ public async Task> ListBySubscriptionAsync(string sub } /// Lists report records by subscription. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| apiRegion | filter | eq | | </br>| userId | select, filter | eq | | </br>| productId | select, filter | eq | | </br>| subscriptionId | select, filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -871,8 +871,8 @@ internal HttpMessage CreateListByTimeRequest(string subscriptionId, string resou } /// Lists report records by Time. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter, select | ge, le | | </br>| interval | select | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| callCountSuccess | select | | | </br>| callCountBlocked | select | | | </br>| callCountFailed | select | | | </br>| callCountOther | select | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// By time interval. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)). @@ -906,8 +906,8 @@ public async Task> ListByTimeAsync(string subscriptio } /// Lists report records by Time. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter, select | ge, le | | </br>| interval | select | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| callCountSuccess | select | | | </br>| callCountBlocked | select | | | </br>| callCountFailed | select | | | </br>| callCountOther | select | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// By time interval. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)). @@ -995,8 +995,8 @@ internal HttpMessage CreateListByRequestRequest(string subscriptionId, string re } /// Lists report records by Request. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| productId | filter | eq | | </br>| userId | filter | eq | | </br>| apiRegion | filter | eq | | </br>| subscriptionId | filter | eq | | </br>. /// Number of records to return. @@ -1028,8 +1028,8 @@ public async Task> ListByRequestAsync(string s } /// Lists report records by Request. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| productId | filter | eq | | </br>| userId | filter | eq | | </br>| apiRegion | filter | eq | | </br>| subscriptionId | filter | eq | | </br>. /// Number of records to return. @@ -1084,8 +1084,8 @@ internal HttpMessage CreateListByApiNextPageRequest(string nextLink, string subs /// Lists report records by API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The filter to apply on the operation. /// Number of records to return. @@ -1120,8 +1120,8 @@ public async Task> ListByApiNextPageAsync(string next /// Lists report records by API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The filter to apply on the operation. /// Number of records to return. @@ -1178,8 +1178,8 @@ internal HttpMessage CreateListByUserNextPageRequest(string nextLink, string sub /// Lists report records by User. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| userId | select, filter | eq | | </br>| apiRegion | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -1214,8 +1214,8 @@ public async Task> ListByUserNextPageAsync(string nex /// Lists report records by User. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| userId | select, filter | eq | | </br>| apiRegion | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -1272,8 +1272,8 @@ internal HttpMessage CreateListByOperationNextPageRequest(string nextLink, strin /// Lists report records by API Operations. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | select, filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -1308,8 +1308,8 @@ public async Task> ListByOperationNextPageAsync(strin /// Lists report records by API Operations. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | select, filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -1366,8 +1366,8 @@ internal HttpMessage CreateListByProductNextPageRequest(string nextLink, string /// Lists report records by Product. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | select, filter | eq | | </br>| subscriptionId | filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -1402,8 +1402,8 @@ public async Task> ListByProductNextPageAsync(string /// Lists report records by Product. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | select, filter | eq | | </br>| subscriptionId | filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -1460,8 +1460,8 @@ internal HttpMessage CreateListByGeoNextPageRequest(string nextLink, string subs /// Lists report records by geography. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| country | select | | | </br>| region | select | | | </br>| zip | select | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| callCountSuccess | select | | | </br>| callCountBlocked | select | | | </br>| callCountFailed | select | | | </br>| callCountOther | select | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -1495,8 +1495,8 @@ public async Task> ListByGeoNextPageAsync(string next /// Lists report records by geography. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| country | select | | | </br>| region | select | | | </br>| zip | select | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| callCountSuccess | select | | | </br>| callCountBlocked | select | | | </br>| callCountFailed | select | | | </br>| callCountOther | select | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -1552,8 +1552,8 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// Lists report records by subscription. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| apiRegion | filter | eq | | </br>| userId | select, filter | eq | | </br>| productId | select, filter | eq | | </br>| subscriptionId | select, filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -1588,8 +1588,8 @@ public async Task> ListBySubscriptionNextPageAsync(st /// Lists report records by subscription. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter | ge, le | | </br>| displayName | select, orderBy | | | </br>| apiRegion | filter | eq | | </br>| userId | select, filter | eq | | </br>| productId | select, filter | eq | | </br>| subscriptionId | select, filter | eq | | </br>| callCountSuccess | select, orderBy | | | </br>| callCountBlocked | select, orderBy | | | </br>| callCountFailed | select, orderBy | | | </br>| callCountOther | select, orderBy | | | </br>| callCountTotal | select, orderBy | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select, orderBy | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// Number of records to return. @@ -1646,8 +1646,8 @@ internal HttpMessage CreateListByTimeNextPageRequest(string nextLink, string sub /// Lists report records by Time. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter, select | ge, le | | </br>| interval | select | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| callCountSuccess | select | | | </br>| callCountBlocked | select | | | </br>| callCountFailed | select | | | </br>| callCountOther | select | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// By time interval. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)). @@ -1683,8 +1683,8 @@ public async Task> ListByTimeNextPageAsync(string nex /// Lists report records by Time. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| timestamp | filter, select | ge, le | | </br>| interval | select | | | </br>| apiRegion | filter | eq | | </br>| userId | filter | eq | | </br>| productId | filter | eq | | </br>| subscriptionId | filter | eq | | </br>| apiId | filter | eq | | </br>| operationId | filter | eq | | </br>| callCountSuccess | select | | | </br>| callCountBlocked | select | | | </br>| callCountFailed | select | | | </br>| callCountOther | select | | | </br>| bandwidth | select, orderBy | | | </br>| cacheHitsCount | select | | | </br>| cacheMissCount | select | | | </br>| apiTimeAvg | select | | | </br>| apiTimeMin | select | | | </br>| apiTimeMax | select | | | </br>| serviceTimeAvg | select | | | </br>| serviceTimeMin | select | | | </br>| serviceTimeMax | select | | | </br>. /// By time interval. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)). diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SignInSettingsRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SignInSettingsRestOperations.cs index ebdb55365ab9e..480d8f4bfbf64 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SignInSettingsRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SignInSettingsRestOperations.cs @@ -31,7 +31,7 @@ public SignInSettingsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -72,8 +72,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the SignInSettings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -104,8 +104,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the SignInSettings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -172,8 +172,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get Sign In Settings for the Portal. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -203,8 +203,8 @@ public async Task> GetAsync(strin } /// Get Sign In Settings for the Portal. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -275,8 +275,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Update Sign-In settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. /// Update Sign-In settings. @@ -302,8 +302,8 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Update Sign-In settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. /// Update Sign-In settings. @@ -373,8 +373,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create or Update Sign-In settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Create or update parameters. /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -405,8 +405,8 @@ public async Task> CreateOrUpdate } /// Create or Update Sign-In settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Create or update parameters. /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SignUpSettingsRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SignUpSettingsRestOperations.cs index b72fa5156ee82..11139e2c9f358 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SignUpSettingsRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SignUpSettingsRestOperations.cs @@ -31,7 +31,7 @@ public SignUpSettingsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -72,8 +72,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the SignUpSettings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -104,8 +104,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the SignUpSettings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -172,8 +172,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get Sign Up Settings for the Portal. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -203,8 +203,8 @@ public async Task> GetAsync(strin } /// Get Sign Up Settings for the Portal. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The cancellation token to use. /// , or is null. @@ -275,8 +275,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Update Sign-Up settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. /// Update Sign-Up settings. @@ -302,8 +302,8 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } /// Update Sign-Up settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. /// Update Sign-Up settings. @@ -373,8 +373,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create or Update Sign-Up settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Create or update parameters. /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -405,8 +405,8 @@ public async Task> CreateOrUpdate } /// Create or Update Sign-Up settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Create or update parameters. /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SubscriptionRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SubscriptionRestOperations.cs index 520f277dfc128..0083d4d2917d3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SubscriptionRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SubscriptionRestOperations.cs @@ -32,7 +32,7 @@ public SubscriptionRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -97,8 +97,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Lists all subscriptions of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| user | expand | | |</br>. /// Number of records to return. @@ -129,8 +129,8 @@ public async Task> ListAsync(string subscriptio } /// Lists all subscriptions of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| user | expand | | |</br>. /// Number of records to return. @@ -199,8 +199,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// The cancellation token to use. @@ -233,8 +233,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// The cancellation token to use. @@ -305,8 +305,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the specified Subscription entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// The cancellation token to use. @@ -338,8 +338,8 @@ public async Task> GetAsync(string subscripti } /// Gets the specified Subscription entity. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// The cancellation token to use. @@ -433,8 +433,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates the subscription of specified user to the specified product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// Create parameters. @@ -474,8 +474,8 @@ public async Task> CreateOrUpdateAsync(string } /// Creates or updates the subscription of specified user to the specified product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// Create parameters. @@ -574,8 +574,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the details of a subscription specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -614,8 +614,8 @@ public async Task> UpdateAsync(string subscri } /// Updates the details of a subscription specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -693,8 +693,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified subscription. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -721,8 +721,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified subscription. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -789,8 +789,8 @@ internal HttpMessage CreateRegeneratePrimaryKeyRequest(string subscriptionId, st } /// Regenerates primary key of existing subscription of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// The cancellation token to use. @@ -815,8 +815,8 @@ public async Task RegeneratePrimaryKeyAsync(string subscriptionId, str } /// Regenerates primary key of existing subscription of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// The cancellation token to use. @@ -881,8 +881,8 @@ internal HttpMessage CreateRegenerateSecondaryKeyRequest(string subscriptionId, } /// Regenerates secondary key of existing subscription of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// The cancellation token to use. @@ -907,8 +907,8 @@ public async Task RegenerateSecondaryKeyAsync(string subscriptionId, s } /// Regenerates secondary key of existing subscription of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// The cancellation token to use. @@ -973,8 +973,8 @@ internal HttpMessage CreateListSecretsRequest(string subscriptionId, string reso } /// Gets the specified Subscription keys. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// The cancellation token to use. @@ -1004,8 +1004,8 @@ public async Task> ListSecretsAsync(string su } /// Gets the specified Subscription keys. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. /// The cancellation token to use. @@ -1058,8 +1058,8 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Lists all subscriptions of the API Management service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| user | expand | | |</br>. /// Number of records to return. @@ -1092,8 +1092,8 @@ public async Task> ListNextPageAsync(string nex /// Lists all subscriptions of the API Management service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| user | expand | | |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagResourceRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagResourceRestOperations.cs index 2ba3f19e635d5..fda3c99d672ac 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagResourceRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagResourceRestOperations.cs @@ -32,7 +32,7 @@ public TagResourceRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -97,8 +97,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of resources associated with tags. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| aid | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| isCurrent | filter | eq | |</br>. /// Number of records to return. @@ -129,8 +129,8 @@ public async Task> ListByServiceAsync(string sub } /// Lists a collection of resources associated with tags. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| aid | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| isCurrent | filter | eq | |</br>. /// Number of records to return. @@ -184,8 +184,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of resources associated with tags. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| aid | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| isCurrent | filter | eq | |</br>. /// Number of records to return. @@ -218,8 +218,8 @@ public async Task> ListByServiceNextPageAsync(st /// Lists a collection of resources associated with tags. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| aid | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| isCurrent | filter | eq | |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagRestOperations.cs index 4bc625b8b43e1..4a20a5b710f17 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagRestOperations.cs @@ -32,7 +32,7 @@ public TagRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoi { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -105,8 +105,8 @@ internal HttpMessage CreateListByOperationRequest(string subscriptionId, string } /// Lists all Tags associated with the Operation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -141,8 +141,8 @@ public async Task> ListByOperationAsync(string subscript } /// Lists all Tags associated with the Operation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -223,8 +223,8 @@ internal HttpMessage CreateGetEntityStateByOperationRequest(string subscriptionI } /// Gets the entity state version of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -261,8 +261,8 @@ public async Task> GetEntityStateByOperationAsync(string subscrip } /// Gets the entity state version of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -345,8 +345,8 @@ internal HttpMessage CreateGetByOperationRequest(string subscriptionId, string r } /// Get tag associated with the Operation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -382,8 +382,8 @@ public async Task> GetByOperationAsync(string subscrip } /// Get tag associated with the Operation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -465,8 +465,8 @@ internal HttpMessage CreateAssignToOperationRequest(string subscriptionId, strin } /// Assign tag to the Operation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -501,8 +501,8 @@ public async Task> AssignToOperationAsync(string subsc } /// Assign tag to the Operation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -583,8 +583,8 @@ internal HttpMessage CreateDetachFromOperationRequest(string subscriptionId, str } /// Detach the tag from the Operation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -614,8 +614,8 @@ public async Task DetachFromOperationAsync(string subscriptionId, stri } /// Detach the tag from the Operation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -709,8 +709,8 @@ internal HttpMessage CreateListByApiRequest(string subscriptionId, string resour } /// Lists all Tags associated with the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -743,8 +743,8 @@ public async Task> ListByApiAsync(string subscriptionId, } /// Lists all Tags associated with the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -819,8 +819,8 @@ internal HttpMessage CreateGetEntityStateByApiRequest(string subscriptionId, str } /// Gets the entity state version of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag identifier. Must be unique in the current API Management service instance. @@ -855,8 +855,8 @@ public async Task> GetEntityStateByApiAsync(string subscriptionId } /// Gets the entity state version of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag identifier. Must be unique in the current API Management service instance. @@ -933,8 +933,8 @@ internal HttpMessage CreateGetByApiRequest(string subscriptionId, string resourc } /// Get tag associated with the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag identifier. Must be unique in the current API Management service instance. @@ -968,8 +968,8 @@ public async Task> GetByApiAsync(string subscriptionId } /// Get tag associated with the API. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag identifier. Must be unique in the current API Management service instance. @@ -1045,8 +1045,8 @@ internal HttpMessage CreateAssignToApiRequest(string subscriptionId, string reso } /// Assign tag to the Api. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag identifier. Must be unique in the current API Management service instance. @@ -1079,8 +1079,8 @@ public async Task> AssignToApiAsync(string subscriptio } /// Assign tag to the Api. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag identifier. Must be unique in the current API Management service instance. @@ -1155,8 +1155,8 @@ internal HttpMessage CreateDetachFromApiRequest(string subscriptionId, string re } /// Detach the tag from the Api. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag identifier. Must be unique in the current API Management service instance. @@ -1184,8 +1184,8 @@ public async Task DetachFromApiAsync(string subscriptionId, string res } /// Detach the tag from the Api. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Tag identifier. Must be unique in the current API Management service instance. @@ -1277,8 +1277,8 @@ internal HttpMessage CreateListByProductRequest(string subscriptionId, string re } /// Lists all Tags associated with the Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -1311,8 +1311,8 @@ public async Task> ListByProductAsync(string subscriptio } /// Lists all Tags associated with the Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -1387,8 +1387,8 @@ internal HttpMessage CreateGetEntityStateByProductRequest(string subscriptionId, } /// Gets the entity state version of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Tag identifier. Must be unique in the current API Management service instance. @@ -1423,8 +1423,8 @@ public async Task> GetEntityStateByProductAsync(string subscripti } /// Gets the entity state version of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Tag identifier. Must be unique in the current API Management service instance. @@ -1501,8 +1501,8 @@ internal HttpMessage CreateGetByProductRequest(string subscriptionId, string res } /// Get tag associated with the Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Tag identifier. Must be unique in the current API Management service instance. @@ -1536,8 +1536,8 @@ public async Task> GetByProductAsync(string subscripti } /// Get tag associated with the Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Tag identifier. Must be unique in the current API Management service instance. @@ -1613,8 +1613,8 @@ internal HttpMessage CreateAssignToProductRequest(string subscriptionId, string } /// Assign tag to the Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Tag identifier. Must be unique in the current API Management service instance. @@ -1647,8 +1647,8 @@ public async Task> AssignToProductAsync(string subscri } /// Assign tag to the Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Tag identifier. Must be unique in the current API Management service instance. @@ -1723,8 +1723,8 @@ internal HttpMessage CreateDetachFromProductRequest(string subscriptionId, strin } /// Detach the tag from the Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Tag identifier. Must be unique in the current API Management service instance. @@ -1752,8 +1752,8 @@ public async Task DetachFromProductAsync(string subscriptionId, string } /// Detach the tag from the Product. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// Tag identifier. Must be unique in the current API Management service instance. @@ -1849,8 +1849,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of tags defined within a service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -1882,8 +1882,8 @@ public async Task> ListByServiceAsync(string subscriptio } /// Lists a collection of tags defined within a service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -1953,8 +1953,8 @@ internal HttpMessage CreateGetEntityStateRequest(string subscriptionId, string r } /// Gets the entity state version of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Tag identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -1987,8 +1987,8 @@ public async Task> GetEntityStateAsync(string subscriptionId, str } /// Gets the entity state version of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Tag identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -2059,8 +2059,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Tag identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -2092,8 +2092,8 @@ public async Task> GetAsync(string subscriptionId, str } /// Gets the details of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Tag identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -2171,8 +2171,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates a tag. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Tag identifier. Must be unique in the current API Management service instance. /// Create parameters. @@ -2206,8 +2206,8 @@ public async Task> CreateOrUpdateAsync(string subscrip } /// Creates a tag. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Tag identifier. Must be unique in the current API Management service instance. /// Create parameters. @@ -2284,8 +2284,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the details of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Tag identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -2318,8 +2318,8 @@ public async Task> UpdateAsync(string subscriptionId, } /// Updates the details of the tag specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Tag identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -2391,8 +2391,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes specific tag of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Tag identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -2419,8 +2419,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes specific tag of the API Management service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Tag identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -2470,8 +2470,8 @@ internal HttpMessage CreateListByOperationNextPageRequest(string nextLink, strin /// Lists all Tags associated with the Operation. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -2508,8 +2508,8 @@ public async Task> ListByOperationNextPageAsync(string n /// Lists all Tags associated with the Operation. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// Operation identifier within an API. Must be unique in the current API Management service instance. @@ -2568,8 +2568,8 @@ internal HttpMessage CreateListByApiNextPageRequest(string nextLink, string subs /// Lists all Tags associated with the API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -2604,8 +2604,8 @@ public async Task> ListByApiNextPageAsync(string nextLin /// Lists all Tags associated with the API. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -2662,8 +2662,8 @@ internal HttpMessage CreateListByProductNextPageRequest(string nextLink, string /// Lists all Tags associated with the Product. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -2698,8 +2698,8 @@ public async Task> ListByProductNextPageAsync(string nex /// Lists all Tags associated with the Product. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Product identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -2756,8 +2756,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of tags defined within a service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. @@ -2791,8 +2791,8 @@ public async Task> ListByServiceNextPageAsync(string nex /// Lists a collection of tags defined within a service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantAccessGitRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantAccessGitRestOperations.cs index b9d43afa980e4..b675d455f0a8d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantAccessGitRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantAccessGitRestOperations.cs @@ -31,7 +31,7 @@ public TenantAccessGitRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -76,8 +76,8 @@ internal HttpMessage CreateRegeneratePrimaryKeyRequest(string subscriptionId, st } /// Regenerate primary access key for GIT. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -101,8 +101,8 @@ public async Task RegeneratePrimaryKeyAsync(string subscriptionId, str } /// Regenerate primary access key for GIT. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -166,8 +166,8 @@ internal HttpMessage CreateRegenerateSecondaryKeyRequest(string subscriptionId, } /// Regenerate secondary access key for GIT. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -191,8 +191,8 @@ public async Task RegenerateSecondaryKeyAsync(string subscriptionId, s } /// Regenerate secondary access key for GIT. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantAccessRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantAccessRestOperations.cs index 31b67330f82c3..dccf472053e33 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantAccessRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantAccessRestOperations.cs @@ -32,7 +32,7 @@ public TenantAccessRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -81,8 +81,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Returns list of access infos - for Git and Management endpoints. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Not used. /// The cancellation token to use. @@ -111,8 +111,8 @@ public async Task> ListByServiceAsync(stri } /// Returns list of access infos - for Git and Management endpoints. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Not used. /// The cancellation token to use. @@ -179,8 +179,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Tenant access metadata. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -212,8 +212,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Tenant access metadata. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -283,8 +283,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get tenant access information details without secrets. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -315,8 +315,8 @@ public async Task> GetAsync(string subscriptionId } /// Get tenant access information details without secrets. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -390,8 +390,8 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG } /// Update tenant access information details. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -423,8 +423,8 @@ public async Task> CreateAsync(string subscriptio } /// Update tenant access information details. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -499,8 +499,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Update tenant access information details. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -532,8 +532,8 @@ public async Task> UpdateAsync(string subscriptio } /// Update tenant access information details. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -605,8 +605,8 @@ internal HttpMessage CreateRegeneratePrimaryKeyRequest(string subscriptionId, st } /// Regenerate primary access key. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -630,8 +630,8 @@ public async Task RegeneratePrimaryKeyAsync(string subscriptionId, str } /// Regenerate primary access key. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -695,8 +695,8 @@ internal HttpMessage CreateRegenerateSecondaryKeyRequest(string subscriptionId, } /// Regenerate secondary access key. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -720,8 +720,8 @@ public async Task RegenerateSecondaryKeyAsync(string subscriptionId, s } /// Regenerate secondary access key. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -785,8 +785,8 @@ internal HttpMessage CreateListSecretsRequest(string subscriptionId, string reso } /// Get tenant access information details. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -815,8 +815,8 @@ public async Task> ListSecretsAsync(str } /// Get tenant access information details. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Access configuration. /// The cancellation token to use. @@ -868,8 +868,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Returns list of access infos - for Git and Management endpoints. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Not used. /// The cancellation token to use. @@ -900,8 +900,8 @@ public async Task> ListByServiceNextPageAs /// Returns list of access infos - for Git and Management endpoints. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Not used. /// The cancellation token to use. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantConfigurationRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantConfigurationRestOperations.cs index 12b989dab41a4..c39fc51a35a14 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantConfigurationRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantConfigurationRestOperations.cs @@ -32,7 +32,7 @@ public TenantConfigurationRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -81,8 +81,8 @@ internal HttpMessage CreateDeployRequest(string subscriptionId, string resourceG } /// This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Git Configuration Operation. /// Deploy Configuration parameters. @@ -109,8 +109,8 @@ public async Task DeployAsync(string subscriptionId, string resourceGr } /// This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Git Configuration Operation. /// Deploy Configuration parameters. @@ -181,8 +181,8 @@ internal HttpMessage CreateSaveRequest(string subscriptionId, string resourceGro } /// This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Git Configuration Operation. /// Save Configuration parameters. @@ -209,8 +209,8 @@ public async Task SaveAsync(string subscriptionId, string resourceGrou } /// This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Git Configuration Operation. /// Save Configuration parameters. @@ -281,8 +281,8 @@ internal HttpMessage CreateValidateRequest(string subscriptionId, string resourc } /// This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Git Configuration Operation. /// Validate Configuration parameters. @@ -309,8 +309,8 @@ public async Task ValidateAsync(string subscriptionId, string resource } /// This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Git Configuration Operation. /// Validate Configuration parameters. @@ -377,8 +377,8 @@ internal HttpMessage CreateGetSyncStateRequest(string subscriptionId, string res } /// Gets the status of the most recent synchronization between the configuration database and the Git repository. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Git Configuration Operation. /// The cancellation token to use. @@ -407,8 +407,8 @@ public async Task> GetSyncStateAs } /// Gets the status of the most recent synchronization between the configuration database and the Git repository. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the Git Configuration Operation. /// The cancellation token to use. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantSettingsRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantSettingsRestOperations.cs index cd836f9a04b5d..c9656659103e5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantSettingsRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantSettingsRestOperations.cs @@ -32,7 +32,7 @@ public TenantSettingsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -81,8 +81,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Public settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Not used. /// The cancellation token to use. @@ -111,8 +111,8 @@ public async Task> ListByServiceAsync(string } /// Public settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Not used. /// The cancellation token to use. @@ -179,8 +179,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get tenant settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the settings. /// The cancellation token to use. @@ -211,8 +211,8 @@ public async Task> GetAsync(string subs } /// Get tenant settings. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// The identifier of the settings. /// The cancellation token to use. @@ -266,8 +266,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Public settings. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Not used. /// The cancellation token to use. @@ -298,8 +298,8 @@ public async Task> ListByServiceNextPageAsync /// Public settings. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// Not used. /// The cancellation token to use. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserConfirmationPasswordRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserConfirmationPasswordRestOperations.cs index 2a6d62dc02b2a..91550850fd0de 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserConfirmationPasswordRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserConfirmationPasswordRestOperations.cs @@ -31,7 +31,7 @@ public UserConfirmationPasswordRestOperations(HttpPipeline pipeline, string appl { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -84,8 +84,8 @@ internal HttpMessage CreateSendRequest(string subscriptionId, string resourceGro } /// Sends confirmation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// Determines the type of application which send the create user request. Default is legacy publisher portal. @@ -111,8 +111,8 @@ public async Task SendAsync(string subscriptionId, string resourceGrou } /// Sends confirmation. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// Determines the type of application which send the create user request. Default is legacy publisher portal. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserGroupRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserGroupRestOperations.cs index d10853588456c..c7260e2895950 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserGroupRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserGroupRestOperations.cs @@ -32,7 +32,7 @@ public UserGroupRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -101,8 +101,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Lists all user groups. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|------------------------|-----------------------------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -135,8 +135,8 @@ public async Task> ListAsync(string subscriptionId, st } /// Lists all user groups. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|------------------------|-----------------------------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -192,8 +192,8 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Lists all user groups. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|------------------------|-----------------------------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -228,8 +228,8 @@ public async Task> ListNextPageAsync(string nextLink, /// Lists all user groups. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|------------------------|-----------------------------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserIdentitiesRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserIdentitiesRestOperations.cs index be99c6a1ec510..3fef0b2062935 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserIdentitiesRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserIdentitiesRestOperations.cs @@ -32,7 +32,7 @@ public UserIdentitiesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -77,8 +77,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// List of all user identities. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -108,8 +108,8 @@ public async Task> ListAsync(string subscriptio } /// List of all user identities. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -162,8 +162,8 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// List of all user identities. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -195,8 +195,8 @@ public async Task> ListNextPageAsync(string nex /// List of all user identities. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserRestOperations.cs index 36ce20f38eec9..03da755e51a19 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserRestOperations.cs @@ -32,7 +32,7 @@ public UserRestOperations(HttpPipeline pipeline, string applicationId, Uri endpo { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -105,8 +105,8 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Lists a collection of registered users in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| registrationDate | filter | ge, le, eq, ne, gt, lt | |</br>| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| groups | expand | | |</br>. /// Number of records to return. @@ -138,8 +138,8 @@ public async Task> ListByServiceAsync(string subscripti } /// Lists a collection of registered users in the specified service instance. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| registrationDate | filter | ge, le, eq, ne, gt, lt | |</br>| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| groups | expand | | |</br>. /// Number of records to return. @@ -209,8 +209,8 @@ internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string res } /// Gets the entity state (Etag) version of the user specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -243,8 +243,8 @@ public async Task> GetEntityTagAsync(string subscriptionId, strin } /// Gets the entity state (Etag) version of the user specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -315,8 +315,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the user specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -348,8 +348,8 @@ public async Task> GetAsync(string subscriptionId, st } /// Gets the details of the user specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -435,8 +435,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or Updates a user. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// Create or update parameters. @@ -471,8 +471,8 @@ public async Task> CreateOrUpdateAsync(string subscri } /// Creates or Updates a user. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// Create or update parameters. @@ -550,8 +550,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the details of the user specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -584,8 +584,8 @@ public async Task> UpdateAsync(string subscriptionId, } /// Updates the details of the user specified by its identifier. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -681,8 +681,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes specific user. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -712,8 +712,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes specific user. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -783,8 +783,8 @@ internal HttpMessage CreateGenerateSsoUriRequest(string subscriptionId, string r } /// Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -814,8 +814,8 @@ public async Task> GenerateSsoUriAsync(string sub } /// Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// The cancellation token to use. @@ -889,8 +889,8 @@ internal HttpMessage CreateGetSharedAccessTokenRequest(string subscriptionId, st } /// Gets the Shared Access Authorization Token for the User. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// Create Authorization Token parameters. @@ -922,8 +922,8 @@ public async Task> GetSharedAccessTokenAsync(string su } /// Gets the Shared Access Authorization Token for the User. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// Create Authorization Token parameters. @@ -978,8 +978,8 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Lists a collection of registered users in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| registrationDate | filter | ge, le, eq, ne, gt, lt | |</br>| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| groups | expand | | |</br>. /// Number of records to return. @@ -1013,8 +1013,8 @@ public async Task> ListByServiceNextPageAsync(string ne /// Lists a collection of registered users in the specified service instance. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| registrationDate | filter | ge, le, eq, ne, gt, lt | |</br>| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| groups | expand | | |</br>. /// Number of records to return. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserSubscriptionRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserSubscriptionRestOperations.cs index 8b77d4231c489..a837d9ac106c3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserSubscriptionRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserSubscriptionRestOperations.cs @@ -32,7 +32,7 @@ public UserSubscriptionRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-08-01"; + _apiVersion = apiVersion ?? "2022-08-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -101,8 +101,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Lists the collection of subscriptions of the specified user. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|------------------------|-----------------------------------|</br>|name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -135,8 +135,8 @@ public async Task> ListAsync(string subscriptio } /// Lists the collection of subscriptions of the specified user. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|------------------------|-----------------------------------|</br>|name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -211,8 +211,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the specified Subscription entity associated with a particular user. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. @@ -246,8 +246,8 @@ public async Task> GetAsync(string subscripti } /// Gets the specified Subscription entity associated with a particular user. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// Subscription entity Identifier. The entity represents the association between a user and a product in API Management. @@ -304,8 +304,8 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Lists the collection of subscriptions of the specified user. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|------------------------|-----------------------------------|</br>|name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. @@ -340,8 +340,8 @@ public async Task> ListNextPageAsync(string nex /// Lists the collection of subscriptions of the specified user. /// The URL to the next page of results. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - /// The name of the resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// The name of the API Management service. /// User identifier. Must be unique in the current API Management service instance. /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|------------------------|-----------------------------------|</br>|name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>|productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyCollection.cs new file mode 100644 index 0000000000000..623d595084a7b --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyCollection.cs @@ -0,0 +1,478 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetServiceApiResolverPolicies method from an instance of . + /// + public partial class ServiceApiResolverPolicyCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics; + private readonly GraphQLApiResolverPolicyRestOperations _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient; + + /// Initializes a new instance of the class for mocking. + protected ServiceApiResolverPolicyCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal ServiceApiResolverPolicyCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ServiceApiResolverPolicyResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ServiceApiResolverPolicyResource.ResourceType, out string serviceApiResolverPolicyGraphQLApiResolverPolicyApiVersion); + _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient = new GraphQLApiResolverPolicyRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceApiResolverPolicyGraphQLApiResolverPolicyApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResolverContractResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResolverContractResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates policy configuration for the GraphQL API Resolver level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The identifier of the Policy. + /// The policy contents to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, PolicyName policyId, PolicyContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, policyId, data, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, policyId, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new ServiceApiResolverPolicyResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates policy configuration for the GraphQL API Resolver level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The identifier of the Policy. + /// The policy contents to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, PolicyName policyId, PolicyContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, policyId, data, ifMatch, cancellationToken); + var uri = _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, policyId, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new ServiceApiResolverPolicyResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the policy configuration at the GraphQL API Resolver level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The identifier of the Policy. + /// Policy Export Format. + /// The cancellation token to use. + public virtual async Task> GetAsync(PolicyName policyId, PolicyExportFormat? format = null, CancellationToken cancellationToken = default) + { + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyCollection.Get"); + scope.Start(); + try + { + var response = await _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, policyId, format, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceApiResolverPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the policy configuration at the GraphQL API Resolver level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The identifier of the Policy. + /// Policy Export Format. + /// The cancellation token to use. + public virtual Response Get(PolicyName policyId, PolicyExportFormat? format = null, CancellationToken cancellationToken = default) + { + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyCollection.Get"); + scope.Start(); + try + { + var response = _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, policyId, format, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceApiResolverPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the list of policy configuration at the GraphQL API Resolver level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_ListByResolver + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.CreateListByResolverRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.CreateListByResolverNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ServiceApiResolverPolicyResource(Client, PolicyContractData.DeserializePolicyContractData(e)), _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics, Pipeline, "ServiceApiResolverPolicyCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Get the list of policy configuration at the GraphQL API Resolver level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_ListByResolver + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.CreateListByResolverRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.CreateListByResolverNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ServiceApiResolverPolicyResource(Client, PolicyContractData.DeserializePolicyContractData(e)), _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics, Pipeline, "ServiceApiResolverPolicyCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The identifier of the Policy. + /// Policy Export Format. + /// The cancellation token to use. + public virtual async Task> ExistsAsync(PolicyName policyId, PolicyExportFormat? format = null, CancellationToken cancellationToken = default) + { + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyCollection.Exists"); + scope.Start(); + try + { + var response = await _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, policyId, format, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The identifier of the Policy. + /// Policy Export Format. + /// The cancellation token to use. + public virtual Response Exists(PolicyName policyId, PolicyExportFormat? format = null, CancellationToken cancellationToken = default) + { + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyCollection.Exists"); + scope.Start(); + try + { + var response = _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, policyId, format, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The identifier of the Policy. + /// Policy Export Format. + /// The cancellation token to use. + public virtual async Task> GetIfExistsAsync(PolicyName policyId, PolicyExportFormat? format = null, CancellationToken cancellationToken = default) + { + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, policyId, format, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ServiceApiResolverPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The identifier of the Policy. + /// Policy Export Format. + /// The cancellation token to use. + public virtual NullableResponse GetIfExists(PolicyName policyId, PolicyExportFormat? format = null, CancellationToken cancellationToken = default) + { + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyCollection.GetIfExists"); + scope.Start(); + try + { + var response = _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, policyId, format, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ServiceApiResolverPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyResource.Serialization.cs new file mode 100644 index 0000000000000..5614d3073b095 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.ApiManagement +{ + public partial class ServiceApiResolverPolicyResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + PolicyContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + PolicyContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyResource.cs new file mode 100644 index 0000000000000..204c40285caa2 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyResource.cs @@ -0,0 +1,440 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A Class representing a ServiceApiResolverPolicy along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetServiceApiResolverPolicyResource method. + /// Otherwise you can get one from its parent resource using the GetServiceApiResolverPolicy method. + /// + public partial class ServiceApiResolverPolicyResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The serviceName. + /// The apiId. + /// The resolverId. + /// The policyId. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string apiId, string resolverId, PolicyName policyId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics; + private readonly GraphQLApiResolverPolicyRestOperations _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient; + private readonly PolicyContractData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/service/apis/resolvers/policies"; + + /// Initializes a new instance of the class for mocking. + protected ServiceApiResolverPolicyResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ServiceApiResolverPolicyResource(ArmClient client, PolicyContractData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ServiceApiResolverPolicyResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string serviceApiResolverPolicyGraphQLApiResolverPolicyApiVersion); + _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient = new GraphQLApiResolverPolicyRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceApiResolverPolicyGraphQLApiResolverPolicyApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual PolicyContractData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get the policy configuration at the GraphQL API Resolver level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Policy Export Format. + /// The cancellation token to use. + public virtual async Task> GetAsync(PolicyExportFormat? format = null, CancellationToken cancellationToken = default) + { + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyResource.Get"); + scope.Start(); + try + { + var response = await _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, format, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceApiResolverPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the policy configuration at the GraphQL API Resolver level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Policy Export Format. + /// The cancellation token to use. + public virtual Response Get(PolicyExportFormat? format = null, CancellationToken cancellationToken = default) + { + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyResource.Get"); + scope.Start(); + try + { + var response = _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, format, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceApiResolverPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the policy configuration at the GraphQL Api Resolver. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_Delete + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyResource.Delete"); + scope.Start(); + try + { + var response = await _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the policy configuration at the GraphQL Api Resolver. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_Delete + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyResource.Delete"); + scope.Start(); + try + { + var response = _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var uri = _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates policy configuration for the GraphQL API Resolver level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The policy contents to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, PolicyContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyResource.Update"); + scope.Start(); + try + { + var response = await _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new ServiceApiResolverPolicyResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates policy configuration for the GraphQL API Resolver level. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The policy contents to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, PolicyContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyResource.Update"); + scope.Start(); + try + { + var response = _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, ifMatch, cancellationToken); + var uri = _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new ServiceApiResolverPolicyResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_GetEntityTag + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetEntityTagAsync(CancellationToken cancellationToken = default) + { + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyResource.GetEntityTag"); + scope.Start(); + try + { + var response = await _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.GetEntityTagAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the GraphQL API resolver policy specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId} + /// + /// + /// Operation Id + /// GraphQLApiResolverPolicy_GetEntityTag + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetEntityTag(CancellationToken cancellationToken = default) + { + using var scope = _serviceApiResolverPolicyGraphQLApiResolverPolicyClientDiagnostics.CreateScope("ServiceApiResolverPolicyResource.GetEntityTag"); + scope.Start(); + try + { + var response = _serviceApiResolverPolicyGraphQLApiResolverPolicyRestClient.GetEntityTag(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiWikiResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiWikiResource.Serialization.cs new file mode 100644 index 0000000000000..032176be5c114 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiWikiResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.ApiManagement +{ + public partial class ServiceApiWikiResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + WikiContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + WikiContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiWikiResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiWikiResource.cs new file mode 100644 index 0000000000000..31d86e338f5b6 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiWikiResource.cs @@ -0,0 +1,522 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A Class representing a ServiceApiWiki along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetServiceApiWikiResource method. + /// Otherwise you can get one from its parent resource using the GetServiceApiWiki method. + /// + public partial class ServiceApiWikiResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The serviceName. + /// The apiId. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string apiId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _serviceApiWikiApiWikiClientDiagnostics; + private readonly ApiWikiRestOperations _serviceApiWikiApiWikiRestClient; + private readonly WikiContractData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/service/apis/wikis"; + + /// Initializes a new instance of the class for mocking. + protected ServiceApiWikiResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ServiceApiWikiResource(ArmClient client, WikiContractData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ServiceApiWikiResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _serviceApiWikiApiWikiClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string serviceApiWikiApiWikiApiVersion); + _serviceApiWikiApiWikiRestClient = new ApiWikiRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceApiWikiApiWikiApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual WikiContractData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets the details of the Wiki for an API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default + /// + /// + /// Operation Id + /// ApiWiki_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _serviceApiWikiApiWikiClientDiagnostics.CreateScope("ServiceApiWikiResource.Get"); + scope.Start(); + try + { + var response = await _serviceApiWikiApiWikiRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceApiWikiResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the Wiki for an API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default + /// + /// + /// Operation Id + /// ApiWiki_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _serviceApiWikiApiWikiClientDiagnostics.CreateScope("ServiceApiWikiResource.Get"); + scope.Start(); + try + { + var response = _serviceApiWikiApiWikiRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceApiWikiResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the specified Wiki from an API. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default + /// + /// + /// Operation Id + /// ApiWiki_Delete + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _serviceApiWikiApiWikiClientDiagnostics.CreateScope("ServiceApiWikiResource.Delete"); + scope.Start(); + try + { + var response = await _serviceApiWikiApiWikiRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _serviceApiWikiApiWikiRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the specified Wiki from an API. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default + /// + /// + /// Operation Id + /// ApiWiki_Delete + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _serviceApiWikiApiWikiClientDiagnostics.CreateScope("ServiceApiWikiResource.Delete"); + scope.Start(); + try + { + var response = _serviceApiWikiApiWikiRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, ifMatch, cancellationToken); + var uri = _serviceApiWikiApiWikiRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the details of the Wiki for an API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default + /// + /// + /// Operation Id + /// ApiWiki_Update + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Wiki Update parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(ETag ifMatch, WikiUpdateContract wikiUpdateContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(wikiUpdateContract, nameof(wikiUpdateContract)); + + using var scope = _serviceApiWikiApiWikiClientDiagnostics.CreateScope("ServiceApiWikiResource.Update"); + scope.Start(); + try + { + var response = await _serviceApiWikiApiWikiRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, ifMatch, wikiUpdateContract, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ServiceApiWikiResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the details of the Wiki for an API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default + /// + /// + /// Operation Id + /// ApiWiki_Update + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Wiki Update parameters. + /// The cancellation token to use. + /// is null. + public virtual Response Update(ETag ifMatch, WikiUpdateContract wikiUpdateContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(wikiUpdateContract, nameof(wikiUpdateContract)); + + using var scope = _serviceApiWikiApiWikiClientDiagnostics.CreateScope("ServiceApiWikiResource.Update"); + scope.Start(); + try + { + var response = _serviceApiWikiApiWikiRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, ifMatch, wikiUpdateContract, cancellationToken); + return Response.FromValue(new ServiceApiWikiResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates a new Wiki for an API or updates an existing one. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default + /// + /// + /// Operation Id + /// ApiWiki_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, WikiContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _serviceApiWikiApiWikiClientDiagnostics.CreateScope("ServiceApiWikiResource.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _serviceApiWikiApiWikiRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, data, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _serviceApiWikiApiWikiRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new ServiceApiWikiResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates a new Wiki for an API or updates an existing one. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default + /// + /// + /// Operation Id + /// ApiWiki_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, WikiContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _serviceApiWikiApiWikiClientDiagnostics.CreateScope("ServiceApiWikiResource.CreateOrUpdate"); + scope.Start(); + try + { + var response = _serviceApiWikiApiWikiRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, data, ifMatch, cancellationToken); + var uri = _serviceApiWikiApiWikiRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new ServiceApiWikiResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default + /// + /// + /// Operation Id + /// ApiWiki_GetEntityTag + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetEntityTagAsync(CancellationToken cancellationToken = default) + { + using var scope = _serviceApiWikiApiWikiClientDiagnostics.CreateScope("ServiceApiWikiResource.GetEntityTag"); + scope.Start(); + try + { + var response = await _serviceApiWikiApiWikiRestClient.GetEntityTagAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the Wiki for an API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/wikis/default + /// + /// + /// Operation Id + /// ApiWiki_GetEntityTag + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetEntityTag(CancellationToken cancellationToken = default) + { + using var scope = _serviceApiWikiApiWikiClientDiagnostics.CreateScope("ServiceApiWikiResource.GetEntityTag"); + scope.Start(); + try + { + var response = _serviceApiWikiApiWikiRestClient.GetEntityTag(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductWikiResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductWikiResource.Serialization.cs new file mode 100644 index 0000000000000..e2d3eea09473f --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductWikiResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.ApiManagement +{ + public partial class ServiceProductWikiResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + WikiContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + WikiContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductWikiResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductWikiResource.cs new file mode 100644 index 0000000000000..4ac12711313d8 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductWikiResource.cs @@ -0,0 +1,522 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A Class representing a ServiceProductWiki along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetServiceProductWikiResource method. + /// Otherwise you can get one from its parent resource using the GetServiceProductWiki method. + /// + public partial class ServiceProductWikiResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The serviceName. + /// The productId. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string productId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _serviceProductWikiProductWikiClientDiagnostics; + private readonly ProductWikiRestOperations _serviceProductWikiProductWikiRestClient; + private readonly WikiContractData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/service/products/wikis"; + + /// Initializes a new instance of the class for mocking. + protected ServiceProductWikiResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ServiceProductWikiResource(ArmClient client, WikiContractData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ServiceProductWikiResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _serviceProductWikiProductWikiClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string serviceProductWikiProductWikiApiVersion); + _serviceProductWikiProductWikiRestClient = new ProductWikiRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceProductWikiProductWikiApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual WikiContractData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets the details of the Wiki for a Product specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default + /// + /// + /// Operation Id + /// ProductWiki_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _serviceProductWikiProductWikiClientDiagnostics.CreateScope("ServiceProductWikiResource.Get"); + scope.Start(); + try + { + var response = await _serviceProductWikiProductWikiRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceProductWikiResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the Wiki for a Product specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default + /// + /// + /// Operation Id + /// ProductWiki_Get + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _serviceProductWikiProductWikiClientDiagnostics.CreateScope("ServiceProductWikiResource.Get"); + scope.Start(); + try + { + var response = _serviceProductWikiProductWikiRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceProductWikiResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the specified Wiki from a Product. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default + /// + /// + /// Operation Id + /// ProductWiki_Delete + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _serviceProductWikiProductWikiClientDiagnostics.CreateScope("ServiceProductWikiResource.Delete"); + scope.Start(); + try + { + var response = await _serviceProductWikiProductWikiRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _serviceProductWikiProductWikiRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the specified Wiki from a Product. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default + /// + /// + /// Operation Id + /// ProductWiki_Delete + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _serviceProductWikiProductWikiClientDiagnostics.CreateScope("ServiceProductWikiResource.Delete"); + scope.Start(); + try + { + var response = _serviceProductWikiProductWikiRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, ifMatch, cancellationToken); + var uri = _serviceProductWikiProductWikiRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the details of the Wiki for a Product specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default + /// + /// + /// Operation Id + /// ProductWiki_Update + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Wiki Update parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(ETag ifMatch, WikiUpdateContract wikiUpdateContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(wikiUpdateContract, nameof(wikiUpdateContract)); + + using var scope = _serviceProductWikiProductWikiClientDiagnostics.CreateScope("ServiceProductWikiResource.Update"); + scope.Start(); + try + { + var response = await _serviceProductWikiProductWikiRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, ifMatch, wikiUpdateContract, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ServiceProductWikiResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the details of the Wiki for a Product specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default + /// + /// + /// Operation Id + /// ProductWiki_Update + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Wiki Update parameters. + /// The cancellation token to use. + /// is null. + public virtual Response Update(ETag ifMatch, WikiUpdateContract wikiUpdateContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(wikiUpdateContract, nameof(wikiUpdateContract)); + + using var scope = _serviceProductWikiProductWikiClientDiagnostics.CreateScope("ServiceProductWikiResource.Update"); + scope.Start(); + try + { + var response = _serviceProductWikiProductWikiRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, ifMatch, wikiUpdateContract, cancellationToken); + return Response.FromValue(new ServiceProductWikiResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates a new Wiki for a Product or updates an existing one. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default + /// + /// + /// Operation Id + /// ProductWiki_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, WikiContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _serviceProductWikiProductWikiClientDiagnostics.CreateScope("ServiceProductWikiResource.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _serviceProductWikiProductWikiRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, data, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _serviceProductWikiProductWikiRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new ServiceProductWikiResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates a new Wiki for a Product or updates an existing one. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default + /// + /// + /// Operation Id + /// ProductWiki_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, WikiContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _serviceProductWikiProductWikiClientDiagnostics.CreateScope("ServiceProductWikiResource.CreateOrUpdate"); + scope.Start(); + try + { + var response = _serviceProductWikiProductWikiRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, data, ifMatch, cancellationToken); + var uri = _serviceProductWikiProductWikiRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new ServiceProductWikiResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default + /// + /// + /// Operation Id + /// ProductWiki_GetEntityTag + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetEntityTagAsync(CancellationToken cancellationToken = default) + { + using var scope = _serviceProductWikiProductWikiClientDiagnostics.CreateScope("ServiceProductWikiResource.GetEntityTag"); + scope.Start(); + try + { + var response = await _serviceProductWikiProductWikiRestClient.GetEntityTagAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the Wiki for a Product specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/wikis/default + /// + /// + /// Operation Id + /// ProductWiki_GetEntityTag + /// + /// + /// Default Api Version + /// 2022-08-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetEntityTag(CancellationToken cancellationToken = default) + { + using var scope = _serviceProductWikiProductWikiClientDiagnostics.CreateScope("ServiceProductWikiResource.GetEntityTag"); + scope.Start(); + try + { + var response = _serviceProductWikiProductWikiRestClient.GetEntityTag(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/SubscriptionContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/SubscriptionContractData.Serialization.cs index 8782dc3cecd8d..54f6a8d3f8737 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/SubscriptionContractData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/SubscriptionContractData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -331,6 +332,326 @@ internal static SubscriptionContractData DeserializeSubscriptionContractData(Jso serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OwnerId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" ownerId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OwnerId)) + { + builder.Append(" ownerId: "); + if (OwnerId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{OwnerId}'''"); + } + else + { + builder.AppendLine($"'{OwnerId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Scope), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scope: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Scope)) + { + builder.Append(" scope: "); + if (Scope.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Scope}'''"); + } + else + { + builder.AppendLine($"'{Scope}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DisplayName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" displayName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DisplayName)) + { + builder.Append(" displayName: "); + if (DisplayName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DisplayName}'''"); + } + else + { + builder.AppendLine($"'{DisplayName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(State), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" state: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(State)) + { + builder.Append(" state: "); + builder.AppendLine($"'{State.Value.ToSerialString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CreatedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" createdDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CreatedOn)) + { + builder.Append(" createdDate: "); + var formattedDateTimeString = TypeFormatters.ToString(CreatedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StartOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" startDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StartOn)) + { + builder.Append(" startDate: "); + var formattedDateTimeString = TypeFormatters.ToString(StartOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExpireOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" expirationDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ExpireOn)) + { + builder.Append(" expirationDate: "); + var formattedDateTimeString = TypeFormatters.ToString(ExpireOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EndOn)) + { + builder.Append(" endDate: "); + var formattedDateTimeString = TypeFormatters.ToString(EndOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NotifiesOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" notificationDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NotifiesOn)) + { + builder.Append(" notificationDate: "); + var formattedDateTimeString = TypeFormatters.ToString(NotifiesOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PrimaryKey), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" primaryKey: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PrimaryKey)) + { + builder.Append(" primaryKey: "); + if (PrimaryKey.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PrimaryKey}'''"); + } + else + { + builder.AppendLine($"'{PrimaryKey}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SecondaryKey), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" secondaryKey: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SecondaryKey)) + { + builder.Append(" secondaryKey: "); + if (SecondaryKey.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SecondaryKey}'''"); + } + else + { + builder.AppendLine($"'{SecondaryKey}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StateComment), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" stateComment: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StateComment)) + { + builder.Append(" stateComment: "); + if (StateComment.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{StateComment}'''"); + } + else + { + builder.AppendLine($"'{StateComment}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AllowTracing), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" allowTracing: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AllowTracing)) + { + builder.Append(" allowTracing: "); + var boolValue = AllowTracing.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -339,6 +660,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(SubscriptionContractData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/SubscriptionContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/SubscriptionContractData.cs index 154ecc9024bc1..3b97420fd8e98 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/SubscriptionContractData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/SubscriptionContractData.cs @@ -109,45 +109,58 @@ internal SubscriptionContractData(ResourceIdentifier id, string name, ResourceTy } /// The user resource identifier of the subscription owner. The value is a valid relative URL in the format of /users/{userId} where {userId} is a user identifier. + [WirePath("properties.ownerId")] public string OwnerId { get; set; } /// Scope like /products/{productId} or /apis or /apis/{apiId}. + [WirePath("properties.scope")] public string Scope { get; set; } /// The name of the subscription, or null if the subscription has no name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } /// Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. + [WirePath("properties.state")] public SubscriptionState? State { get; set; } /// /// Subscription creation date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("properties.createdDate")] public DateTimeOffset? CreatedOn { get; } /// /// Subscription activation date. The setting is for audit purposes only and the subscription is not automatically activated. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("properties.startDate")] public DateTimeOffset? StartOn { get; set; } /// /// Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("properties.expirationDate")] public DateTimeOffset? ExpireOn { get; set; } /// /// Date when subscription was cancelled or expired. The setting is for audit purposes only and the subscription is not automatically cancelled. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("properties.endDate")] public DateTimeOffset? EndOn { get; set; } /// /// Upcoming subscription expiration notification date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("properties.notificationDate")] public DateTimeOffset? NotifiesOn { get; set; } /// Subscription primary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + [WirePath("properties.primaryKey")] public string PrimaryKey { get; set; } /// Subscription secondary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + [WirePath("properties.secondaryKey")] public string SecondaryKey { get; set; } /// Optional subscription comment added by an administrator when the state is changed to the 'rejected'. + [WirePath("properties.stateComment")] public string StateComment { get; set; } /// Determines whether tracing is enabled. + [WirePath("properties.allowTracing")] public bool? AllowTracing { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TagContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TagContractData.Serialization.cs index efc6749e5d286..14a6186f45855 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TagContractData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TagContractData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -158,6 +159,100 @@ internal static TagContractData DeserializeTagContractData(JsonElement element, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DisplayName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" displayName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DisplayName)) + { + builder.Append(" displayName: "); + if (DisplayName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DisplayName}'''"); + } + else + { + builder.AppendLine($"'{DisplayName}'"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -166,6 +261,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opt { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(TagContractData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TagContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TagContractData.cs index 9c83f61f54eca..19fe7dc5f455c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TagContractData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TagContractData.cs @@ -69,6 +69,7 @@ internal TagContractData(ResourceIdentifier id, string name, ResourceType resour } /// Tag name. + [WirePath("properties.displayName")] public string DisplayName { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoCollection.cs index 2294dc70c9230..f8fa27d811188 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdate /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -206,7 +206,7 @@ public virtual async Task> GetAsync(AccessNam /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -247,7 +247,7 @@ public virtual Response Get(AccessName accessName, Can /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -278,7 +278,7 @@ public virtual AsyncPageable GetAllAsync(string filter /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -309,7 +309,7 @@ public virtual Pageable GetAll(string filter = null, C /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -348,7 +348,7 @@ public virtual async Task> ExistsAsync(AccessName accessName, Can /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -387,7 +387,7 @@ public virtual Response Exists(AccessName accessName, CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -428,7 +428,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoData.Serialization.cs index 46cccd7779d84..29ef1eef82c02 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -186,6 +187,139 @@ internal static TenantAccessInfoData DeserializeTenantAccessInfoData(JsonElement serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AccessInfoType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AccessInfoType)) + { + builder.Append(" id: "); + if (AccessInfoType.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AccessInfoType}'''"); + } + else + { + builder.AppendLine($"'{AccessInfoType}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PrincipalId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" principalId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PrincipalId)) + { + builder.Append(" principalId: "); + if (PrincipalId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PrincipalId}'''"); + } + else + { + builder.AppendLine($"'{PrincipalId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsDirectAccessEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsDirectAccessEnabled)) + { + builder.Append(" enabled: "); + var boolValue = IsDirectAccessEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -194,6 +328,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(TenantAccessInfoData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoData.cs index 10af369edca08..29c3426eab3f9 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoData.cs @@ -73,10 +73,13 @@ internal TenantAccessInfoData(ResourceIdentifier id, string name, ResourceType r } /// Access Information type ('access' or 'gitAccess'). + [WirePath("properties.id")] public string AccessInfoType { get; set; } /// Principal (User) Identifier. + [WirePath("properties.principalId")] public string PrincipalId { get; set; } /// Determines whether direct access is enabled. + [WirePath("properties.enabled")] public bool? IsDirectAccessEnabled { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoResource.cs index 74d9f462c9607..0c752b9c3447d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoResource.cs @@ -106,7 +106,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -146,7 +146,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -186,7 +186,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task> UpdateAsync(ETag i /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual Response Update(ETag ifMatch, TenantAcc /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -310,7 +310,7 @@ public virtual async Task RegeneratePrimaryKeyAsync(CancellationToken /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -348,7 +348,7 @@ public virtual Response RegeneratePrimaryKey(CancellationToken cancellationToken /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -386,7 +386,7 @@ public virtual async Task RegenerateSecondaryKeyAsync(CancellationToke /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -424,7 +424,7 @@ public virtual Response RegenerateSecondaryKey(CancellationToken cancellationTok /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -462,7 +462,7 @@ public virtual async Task> GetSecretsAs /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -500,7 +500,7 @@ public virtual Response GetSecrets(CancellationT /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -534,7 +534,7 @@ public virtual async Task RegeneratePrimaryKeyForGitAsync(Cancellation /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -568,7 +568,7 @@ public virtual Response RegeneratePrimaryKeyForGit(CancellationToken cancellatio /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -602,7 +602,7 @@ public virtual async Task RegenerateSecondaryKeyForGitAsync(Cancellati /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// @@ -636,7 +636,7 @@ public virtual Response RegenerateSecondaryKeyForGit(CancellationToken cancellat /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource @@ -674,7 +674,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-08-01 + /// 2022-08-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/UserContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/UserContractData.Serialization.cs index 35080c4aa2cd2..89f15639f0a9e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/UserContractData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/UserContractData.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.ApiManagement.Models; @@ -279,6 +281,246 @@ internal static UserContractData DeserializeUserContractData(JsonElement element serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(State), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" state: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(State)) + { + builder.Append(" state: "); + builder.AppendLine($"'{State.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Note), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" note: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Note)) + { + builder.Append(" note: "); + if (Note.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Note}'''"); + } + else + { + builder.AppendLine($"'{Note}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Identities), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" identities: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Identities)) + { + if (Identities.Any()) + { + builder.Append(" identities: "); + builder.AppendLine("["); + foreach (var item in Identities) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " identities: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(FirstName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" firstName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(FirstName)) + { + builder.Append(" firstName: "); + if (FirstName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{FirstName}'''"); + } + else + { + builder.AppendLine($"'{FirstName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LastName)) + { + builder.Append(" lastName: "); + if (LastName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{LastName}'''"); + } + else + { + builder.AppendLine($"'{LastName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Email), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" email: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Email)) + { + builder.Append(" email: "); + if (Email.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Email}'''"); + } + else + { + builder.AppendLine($"'{Email}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RegistriesOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" registrationDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(RegistriesOn)) + { + builder.Append(" registrationDate: "); + var formattedDateTimeString = TypeFormatters.ToString(RegistriesOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Groups), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" groups: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Groups)) + { + if (Groups.Any()) + { + builder.Append(" groups: "); + builder.AppendLine("["); + foreach (var item in Groups) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " groups: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -287,6 +529,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions op { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(UserContractData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/UserContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/UserContractData.cs index e30e74005c312..d542545e5a475 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/UserContractData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/UserContractData.cs @@ -89,23 +89,31 @@ internal UserContractData(ResourceIdentifier id, string name, ResourceType resou } /// Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. + [WirePath("properties.state")] public ApiManagementUserState? State { get; set; } /// Optional note about a user set by the administrator. + [WirePath("properties.note")] public string Note { get; set; } /// Collection of user identities. + [WirePath("properties.identities")] public IList Identities { get; } /// First name. + [WirePath("properties.firstName")] public string FirstName { get; set; } /// Last name. + [WirePath("properties.lastName")] public string LastName { get; set; } /// Email address. + [WirePath("properties.email")] public string Email { get; set; } /// /// Date of user registration. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. /// /// + [WirePath("properties.registrationDate")] public DateTimeOffset? RegistriesOn { get; set; } /// Collection of groups user is part of. + [WirePath("properties.groups")] public IReadOnlyList Groups { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/WikiContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/WikiContractData.Serialization.cs new file mode 100644 index 0000000000000..981ed3f986ac8 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/WikiContractData.Serialization.cs @@ -0,0 +1,305 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.ApiManagement.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + public partial class WikiContractData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WikiContractData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Documents)) + { + writer.WritePropertyName("documents"u8); + writer.WriteStartArray(); + foreach (var item in Documents) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WikiContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WikiContractData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWikiContractData(document.RootElement, options); + } + + internal static WikiContractData DeserializeWikiContractData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IList documents = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("documents"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(WikiDocumentationContract.DeserializeWikiDocumentationContract(item, options)); + } + documents = array; + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WikiContractData( + id, + name, + type, + systemData, + documents ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Documents), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" documents: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Documents)) + { + if (Documents.Any()) + { + builder.Append(" documents: "); + builder.AppendLine("["); + foreach (var item in Documents) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " documents: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WikiContractData)} does not support writing '{options.Format}' format."); + } + } + + WikiContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWikiContractData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WikiContractData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/WikiContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/WikiContractData.cs new file mode 100644 index 0000000000000..8d8cfd334caf9 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/WikiContractData.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.ApiManagement.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing the WikiContract data model. + /// Wiki properties + /// + public partial class WikiContractData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WikiContractData() + { + Documents = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Collection wiki documents included into this wiki. + /// Keeps track of any properties unknown to the library. + internal WikiContractData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IList documents, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Documents = documents; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Collection wiki documents included into this wiki. + [WirePath("properties.documents")] + public IList Documents { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/autorest.md b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/autorest.md index 4f5f0fdc9fd5e..b2bee00fa7e7c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/autorest.md +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/autorest.md @@ -8,7 +8,8 @@ azure-arm: true csharp: true library-name: ApiManagement namespace: Azure.ResourceManager.ApiManagement -require: https://github.com/Azure/azure-rest-api-specs/blob/2f28b5026a4b44adefd0237087acb0c48cfe31a6/specification/apimanagement/resource-manager/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/2d973fccf9f28681a481e9760fa12b2334216e21/specification/apimanagement/resource-manager/readme.md +tag: package-2022-08 output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: @@ -19,8 +20,10 @@ modelerfour: flatten-payloads: false use-model-reader-writer: true skip-serialization-format-xml: true -# mgmt-debug: -# show-serialized-names: true +enable-bicep-serialization: true + +#mgmt-debug: +# show-serialized-names: true list-exception: - /subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/deletedservices/{serviceName} @@ -114,6 +117,9 @@ override-operation-name: prepend-rp-prefix: - ResourceSkuCapacity - ResourceSkuCapacityScaleType +- AuthorizationType +- AuthorizationError +- NatGatewayState rename-mapping: GatewayHostnameConfigurationContract.properties.negotiateClientCertificate: IsClientCertificateRequired @@ -280,6 +286,9 @@ rename-mapping: ApiCreateOrUpdateParameter.properties.termsOfServiceUrl: termsOfServiceLink ApiCreateOrUpdateParameter.properties.serviceUrl: serviceLink ApiEntityBaseContract.termsOfServiceUrl: termsOfServiceLink + AuthorizationConfirmConsentCodeRequestContract: AuthorizationConfirmConsentCodeContent + AuthorizationLoginRequestContract: AuthorizationLoginContent + AuthorizationLoginResponseContract: AuthorizationLoginResult directive: - remove-operation: 'ApiManagementOperations_List' @@ -555,9 +564,57 @@ directive: } ] } - reason: Modify the original swagger since the id in the real response is slightly different from the ApiManagementGroupResource. + # reason: Modify the original swagger since the id in the real response is slightly different from the ApiManagementGroupResource. - from: swagger-document where: $..[?(@.name=='$orderby')] transform: $['x-ms-client-name'] = 'orderBy' - + - from: apimcontenttypes.json + where: $.paths.['/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}'].put + transform: > + $['parameters']=[ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ContentTypeIdParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/IfMatchOptionalParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + } + ] + - from: apimcontenttypes.json + where: $.paths.['/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}'].put + transform: > + $['parameters']=[ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ContentTypeIdParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/ContentItemIdParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/IfMatchOptionalParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + } + ] ``` From 280643f30bba7c50dadb0a3d08c2db45669e0a9a Mon Sep 17 00:00:00 2001 From: Minghao Chen <30464227+HarveyLink@users.noreply.github.com> Date: Fri, 5 Jul 2024 16:07:34 +0800 Subject: [PATCH 022/144] [KeyVault] Bump API version to 2023-07-01 (#44690) --- .../CHANGELOG.md | 22 +++---- ...ResourceManager.KeyVault.netstandard2.0.cs | 15 ++++- .../Sample_DeletedKeyVaultCollection.cs | 6 +- .../Samples/Sample_DeletedKeyVaultResource.cs | 4 +- .../Sample_DeletedManagedHsmCollection.cs | 6 +- .../Sample_DeletedManagedHsmResource.cs | 4 +- .../Samples/Sample_KeyVaultCollection.cs | 12 ++-- ...aultPrivateEndpointConnectionCollection.cs | 10 +-- ...yVaultPrivateEndpointConnectionResource.cs | 6 +- .../Samples/Sample_KeyVaultResource.cs | 14 ++-- .../Sample_KeyVaultSecretCollection.cs | 10 +-- .../Samples/Sample_KeyVaultSecretResource.cs | 4 +- .../Samples/Sample_ManagedHsmCollection.cs | 10 +-- ...dHsmPrivateEndpointConnectionCollection.cs | 10 +-- ...gedHsmPrivateEndpointConnectionResource.cs | 6 +- .../Samples/Sample_ManagedHsmResource.cs | 14 ++-- .../Sample_SubscriptionResourceExtensions.cs | 4 +- .../src/Azure.ResourceManager.KeyVault.csproj | 2 +- .../src/Generated/ArmKeyVaultModelFactory.cs | 66 ++++++++++++++++++- .../Generated/DeletedKeyVaultCollection.cs | 12 ++-- .../src/Generated/DeletedKeyVaultResource.cs | 8 +-- .../Generated/DeletedManagedHsmCollection.cs | 12 ++-- .../Generated/DeletedManagedHsmResource.cs | 8 +-- .../Extensions/KeyVaultExtensions.cs | 40 +++++------ .../MockableKeyVaultResourceGroupResource.cs | 8 +-- .../MockableKeyVaultSubscriptionResource.cs | 32 ++++----- .../src/Generated/KeyVaultCollection.cs | 20 +++--- ...aultPrivateEndpointConnectionCollection.cs | 20 +++--- ...yVaultPrivateEndpointConnectionResource.cs | 12 ++-- .../src/Generated/KeyVaultResource.cs | 40 +++++------ .../src/Generated/KeyVaultSecretCollection.cs | 20 +++--- .../src/Generated/KeyVaultSecretResource.cs | 8 +-- .../src/Generated/ManagedHsmCollection.cs | 20 +++--- .../Generated/ManagedHsmData.Serialization.cs | 33 ++++++++++ .../src/Generated/ManagedHsmData.cs | 7 +- ...dHsmPrivateEndpointConnectionCollection.cs | 20 +++--- ...ateEndpointConnectionData.Serialization.cs | 33 ++++++++++ ...ManagedHsmPrivateEndpointConnectionData.cs | 7 +- ...gedHsmPrivateEndpointConnectionResource.cs | 24 +++---- .../src/Generated/ManagedHsmResource.cs | 36 +++++----- ...smPrivateLinkResourceData.Serialization.cs | 33 ++++++++++ .../ManagedHsmPrivateLinkResourceData.cs | 7 +- .../ManagedHsmsRestOperations.cs | 2 +- ...rivateEndpointConnectionsRestOperations.cs | 2 +- .../MhsmPrivateLinkResourcesRestOperations.cs | 2 +- .../MhsmRegionsRestOperations.cs | 2 +- ...rivateEndpointConnectionsRestOperations.cs | 2 +- .../PrivateLinkResourcesRestOperations.cs | 2 +- .../RestOperations/SecretsRestOperations.cs | 2 +- .../RestOperations/VaultsRestOperations.cs | 2 +- .../src/autorest.md | 41 ++++++++---- 51 files changed, 469 insertions(+), 273 deletions(-) diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/CHANGELOG.md b/sdk/keyvault/Azure.ResourceManager.KeyVault/CHANGELOG.md index 3f84c3d2b6d9e..12c5cc84fbf3f 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/CHANGELOG.md +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/CHANGELOG.md @@ -1,15 +1,15 @@ # Release History -## 1.3.0-beta.1 (Unreleased) +## 1.3.0 (2024-07-05) ### Features Added -### Breaking Changes - -### Bugs Fixed +- Upgraded api-version tag from 'package-2023-02' to 'package-2023-07'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/d1296700aa6cd650970e9891dd58eef5698327fd/specification/keyvault/resource-manager/readme.md ### Other Changes +- Upgraded Azure.Core from 1.39.0 to 1.40.0 + ## 1.2.3 (2024-05-07) ### Bugs Fixed @@ -20,20 +20,20 @@ ### Features Added -- Add `ArmOperation.Rehydrate` and `ArmOperation.Rehydrate` static methods to rehydrate a long-running operation. +- Added `ArmOperation.Rehydrate` and `ArmOperation.Rehydrate` static methods to rehydrate a long-running operation. ## 1.2.1 (2024-03-23) ### Features Added -- Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. +- Enabled the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. - Added experimental Bicep serialization. ## 1.2.0 (2023-11-21) ### Features Added -- Enable mocking for extension methods, refer this [document](https://aka.ms/azsdk/net/mocking) for more details. +- Enabled mocking for extension methods, refer this [document](https://aka.ms/azsdk/net/mocking) for more details. ### Other Changes @@ -43,7 +43,7 @@ ### Features Added -- Enable the model factory feature for model mocking, more information can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-mocking-factory-builder). +- Enabled the model factory feature for model mocking, more information can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-mocking-factory-builder). ### Other Changes @@ -54,8 +54,8 @@ ### Features Added -- Add `Secret` operations -- Add some new properties for `ManagedHsmProperties` +- Added `Secret` operations +- Added some new properties for `ManagedHsmProperties` ### Other Changes @@ -264,4 +264,4 @@ After upgrade: ```C# Snippet:Changelog_CreateModel KeyVaultProperties properties = new KeyVaultProperties(Guid.NewGuid(), new KeyVaultSku(KeyVaultSkuFamily.A, KeyVaultSkuName.Standard)); KeyVaultCreateOrUpdateContent parameters = new KeyVaultCreateOrUpdateContent(AzureLocation.WestUS2, properties); -``` +``` \ No newline at end of file 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 0d06dd8162925..63dbfd6509658 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 @@ -305,6 +305,7 @@ protected ManagedHsmCollection() { } public partial class ManagedHsmData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ManagedHsmData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.KeyVault.Models.ManagedHsmProperties Properties { get { throw null; } set { } } public Azure.ResourceManager.KeyVault.Models.ManagedHsmSku Sku { get { throw null; } set { } } Azure.ResourceManager.KeyVault.ManagedHsmData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -334,6 +335,7 @@ public partial class ManagedHsmPrivateEndpointConnectionData : Azure.ResourceMan { public ManagedHsmPrivateEndpointConnectionData(Azure.Core.AzureLocation location) { } public Azure.ETag? ETag { get { throw null; } set { } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PrivateEndpointId { get { throw null; } } public Azure.ResourceManager.KeyVault.Models.ManagedHsmPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get { throw null; } set { } } public Azure.ResourceManager.KeyVault.Models.ManagedHsmPrivateEndpointConnectionProvisioningState? ProvisioningState { get { throw null; } } @@ -473,12 +475,18 @@ public static partial class ArmKeyVaultModelFactory public static Azure.ResourceManager.KeyVault.Models.KeyVaultProperties KeyVaultProperties(System.Guid tenantId = default(System.Guid), Azure.ResourceManager.KeyVault.Models.KeyVaultSku sku = null, System.Collections.Generic.IEnumerable accessPolicies = null, System.Uri vaultUri = null, string hsmPoolResourceId = null, bool? enabledForDeployment = default(bool?), bool? enabledForDiskEncryption = default(bool?), bool? enabledForTemplateDeployment = default(bool?), bool? enableSoftDelete = default(bool?), int? softDeleteRetentionInDays = default(int?), bool? enableRbacAuthorization = default(bool?), Azure.ResourceManager.KeyVault.Models.KeyVaultCreateMode? createMode = default(Azure.ResourceManager.KeyVault.Models.KeyVaultCreateMode?), bool? enablePurgeProtection = default(bool?), Azure.ResourceManager.KeyVault.Models.KeyVaultNetworkRuleSet networkRuleSet = null, Azure.ResourceManager.KeyVault.Models.KeyVaultProvisioningState? provisioningState = default(Azure.ResourceManager.KeyVault.Models.KeyVaultProvisioningState?), System.Collections.Generic.IEnumerable privateEndpointConnections = null, string publicNetworkAccess = null) { throw null; } public static Azure.ResourceManager.KeyVault.Models.KeyVaultSecretCreateOrUpdateContent KeyVaultSecretCreateOrUpdateContent(System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.KeyVault.Models.SecretProperties properties = null) { throw null; } public static Azure.ResourceManager.KeyVault.KeyVaultSecretData KeyVaultSecretData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.KeyVault.Models.SecretProperties properties = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IReadOnlyDictionary tags = null) { throw null; } - public static Azure.ResourceManager.KeyVault.ManagedHsmData ManagedHsmData(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 tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.KeyVault.Models.ManagedHsmProperties properties = null, Azure.ResourceManager.KeyVault.Models.ManagedHsmSku sku = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.KeyVault.ManagedHsmData ManagedHsmData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.KeyVault.Models.ManagedHsmProperties properties, Azure.ResourceManager.KeyVault.Models.ManagedHsmSku sku) { throw null; } + public static Azure.ResourceManager.KeyVault.ManagedHsmData ManagedHsmData(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 tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.KeyVault.Models.ManagedHsmProperties properties = null, Azure.ResourceManager.KeyVault.Models.ManagedHsmSku sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } public static Azure.ResourceManager.KeyVault.Models.ManagedHsmGeoReplicatedRegion ManagedHsmGeoReplicatedRegion(string name = null, Azure.ResourceManager.KeyVault.Models.ManagedHsmGeoReplicatedRegionProvisioningState? provisioningState = default(Azure.ResourceManager.KeyVault.Models.ManagedHsmGeoReplicatedRegionProvisioningState?), bool? isPrimary = default(bool?)) { throw null; } public static Azure.ResourceManager.KeyVault.Models.ManagedHsmNameAvailabilityResult ManagedHsmNameAvailabilityResult(bool? isNameAvailable = default(bool?), Azure.ResourceManager.KeyVault.Models.ManagedHsmNameUnavailableReason? reason = default(Azure.ResourceManager.KeyVault.Models.ManagedHsmNameUnavailableReason?), string message = null) { throw null; } - public static Azure.ResourceManager.KeyVault.ManagedHsmPrivateEndpointConnectionData ManagedHsmPrivateEndpointConnectionData(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 tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.KeyVault.Models.ManagedHsmPrivateLinkServiceConnectionState privateLinkServiceConnectionState = null, Azure.ResourceManager.KeyVault.Models.ManagedHsmPrivateEndpointConnectionProvisioningState? provisioningState = default(Azure.ResourceManager.KeyVault.Models.ManagedHsmPrivateEndpointConnectionProvisioningState?), Azure.ResourceManager.KeyVault.Models.ManagedHsmSku sku = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.KeyVault.ManagedHsmPrivateEndpointConnectionData ManagedHsmPrivateEndpointConnectionData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ETag? etag, Azure.Core.ResourceIdentifier privateEndpointId, Azure.ResourceManager.KeyVault.Models.ManagedHsmPrivateLinkServiceConnectionState privateLinkServiceConnectionState, Azure.ResourceManager.KeyVault.Models.ManagedHsmPrivateEndpointConnectionProvisioningState? provisioningState, Azure.ResourceManager.KeyVault.Models.ManagedHsmSku sku) { throw null; } + public static Azure.ResourceManager.KeyVault.ManagedHsmPrivateEndpointConnectionData ManagedHsmPrivateEndpointConnectionData(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 tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.KeyVault.Models.ManagedHsmPrivateLinkServiceConnectionState privateLinkServiceConnectionState = null, Azure.ResourceManager.KeyVault.Models.ManagedHsmPrivateEndpointConnectionProvisioningState? provisioningState = default(Azure.ResourceManager.KeyVault.Models.ManagedHsmPrivateEndpointConnectionProvisioningState?), Azure.ResourceManager.KeyVault.Models.ManagedHsmSku sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } public static Azure.ResourceManager.KeyVault.Models.ManagedHsmPrivateEndpointConnectionItemData ManagedHsmPrivateEndpointConnectionItemData(Azure.Core.ResourceIdentifier id = null, Azure.ETag? etag = default(Azure.ETag?), Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.KeyVault.Models.ManagedHsmPrivateLinkServiceConnectionState privateLinkServiceConnectionState = null, Azure.ResourceManager.KeyVault.Models.ManagedHsmPrivateEndpointConnectionProvisioningState? provisioningState = default(Azure.ResourceManager.KeyVault.Models.ManagedHsmPrivateEndpointConnectionProvisioningState?)) { throw null; } - public static Azure.ResourceManager.KeyVault.Models.ManagedHsmPrivateLinkResourceData ManagedHsmPrivateLinkResourceData(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 tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null, Azure.ResourceManager.KeyVault.Models.ManagedHsmSku sku = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.KeyVault.Models.ManagedHsmPrivateLinkResourceData ManagedHsmPrivateLinkResourceData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, string groupId, System.Collections.Generic.IEnumerable requiredMembers, System.Collections.Generic.IEnumerable requiredZoneNames, Azure.ResourceManager.KeyVault.Models.ManagedHsmSku sku) { throw null; } + public static Azure.ResourceManager.KeyVault.Models.ManagedHsmPrivateLinkResourceData ManagedHsmPrivateLinkResourceData(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 tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null, Azure.ResourceManager.KeyVault.Models.ManagedHsmSku sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } public static Azure.ResourceManager.KeyVault.Models.ManagedHsmProperties ManagedHsmProperties(System.Guid? tenantId = default(System.Guid?), System.Collections.Generic.IEnumerable initialAdminObjectIds = null, System.Uri hsmUri = null, bool? enableSoftDelete = default(bool?), int? softDeleteRetentionInDays = default(int?), bool? enablePurgeProtection = default(bool?), Azure.ResourceManager.KeyVault.Models.ManagedHsmCreateMode? createMode = default(Azure.ResourceManager.KeyVault.Models.ManagedHsmCreateMode?), string statusMessage = null, Azure.ResourceManager.KeyVault.Models.ManagedHsmProvisioningState? provisioningState = default(Azure.ResourceManager.KeyVault.Models.ManagedHsmProvisioningState?), Azure.ResourceManager.KeyVault.Models.ManagedHsmNetworkRuleSet networkRuleSet = null, System.Collections.Generic.IEnumerable regions = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.KeyVault.Models.ManagedHsmPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.KeyVault.Models.ManagedHsmPublicNetworkAccess?), System.DateTimeOffset? scheduledPurgeOn = default(System.DateTimeOffset?), Azure.ResourceManager.KeyVault.Models.ManagedHSMSecurityDomainProperties securityDomainProperties = null) { throw null; } public static Azure.ResourceManager.KeyVault.Models.ManagedHSMSecurityDomainProperties ManagedHSMSecurityDomainProperties(Azure.ResourceManager.KeyVault.Models.ManagedHSMSecurityDomainActivationStatus? activationStatus = default(Azure.ResourceManager.KeyVault.Models.ManagedHSMSecurityDomainActivationStatus?), string activationStatusMessage = null) { throw null; } public static Azure.ResourceManager.KeyVault.Models.SecretAttributes SecretAttributes(bool? enabled = default(bool?), System.DateTimeOffset? notBefore = default(System.DateTimeOffset?), System.DateTimeOffset? expires = default(System.DateTimeOffset?), System.DateTimeOffset? created = default(System.DateTimeOffset?), System.DateTimeOffset? updated = default(System.DateTimeOffset?)) { throw null; } @@ -1260,6 +1268,7 @@ public partial class ManagedHsmPrivateLinkResourceData : Azure.ResourceManager.M { public ManagedHsmPrivateLinkResourceData(Azure.Core.AzureLocation location) { } public string GroupId { get { throw null; } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList RequiredMembers { get { throw null; } } public System.Collections.Generic.IList RequiredZoneNames { get { throw null; } } public Azure.ResourceManager.KeyVault.Models.ManagedHsmSku Sku { get { throw null; } set { } } diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_DeletedKeyVaultCollection.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_DeletedKeyVaultCollection.cs index 80909fcfda99a..47d78329805b1 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_DeletedKeyVaultCollection.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_DeletedKeyVaultCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_DeletedKeyVaultCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_RetrieveADeletedVault() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/getDeletedVault.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/getDeletedVault.json // this example is just showing the usage of "Vaults_GetDeleted" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_RetrieveADeletedVault() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_RetrieveADeletedVault() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/getDeletedVault.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/getDeletedVault.json // this example is just showing the usage of "Vaults_GetDeleted" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Exists_RetrieveADeletedVault() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_RetrieveADeletedVault() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/getDeletedVault.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/getDeletedVault.json // this example is just showing the usage of "Vaults_GetDeleted" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_DeletedKeyVaultResource.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_DeletedKeyVaultResource.cs index 40b38eb7bd017..adeb0bdf97253 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_DeletedKeyVaultResource.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_DeletedKeyVaultResource.cs @@ -19,7 +19,7 @@ public partial class Sample_DeletedKeyVaultResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_RetrieveADeletedVault() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/getDeletedVault.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/getDeletedVault.json // this example is just showing the usage of "Vaults_GetDeleted" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_RetrieveADeletedVault() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task PurgeDeleted_PurgeADeletedVault() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/purgeDeletedVault.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/purgeDeletedVault.json // this example is just showing the usage of "Vaults_PurgeDeleted" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_DeletedManagedHsmCollection.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_DeletedManagedHsmCollection.cs index f8a8b655eb4ae..34a9048662d1b 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_DeletedManagedHsmCollection.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_DeletedManagedHsmCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_DeletedManagedHsmCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_RetrieveADeletedManagedHSM() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/DeletedManagedHsm_Get.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/DeletedManagedHsm_Get.json // this example is just showing the usage of "ManagedHsms_GetDeleted" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_RetrieveADeletedManagedHSM() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_RetrieveADeletedManagedHSM() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/DeletedManagedHsm_Get.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/DeletedManagedHsm_Get.json // this example is just showing the usage of "ManagedHsms_GetDeleted" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Exists_RetrieveADeletedManagedHSM() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_RetrieveADeletedManagedHSM() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/DeletedManagedHsm_Get.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/DeletedManagedHsm_Get.json // this example is just showing the usage of "ManagedHsms_GetDeleted" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_DeletedManagedHsmResource.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_DeletedManagedHsmResource.cs index a25ea6027324a..b3cb2944a109c 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_DeletedManagedHsmResource.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_DeletedManagedHsmResource.cs @@ -19,7 +19,7 @@ public partial class Sample_DeletedManagedHsmResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_RetrieveADeletedManagedHSM() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/DeletedManagedHsm_Get.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/DeletedManagedHsm_Get.json // this example is just showing the usage of "ManagedHsms_GetDeleted" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_RetrieveADeletedManagedHSM() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task PurgeDeleted_PurgeAManagedHSMPool() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/DeletedManagedHsm_Purge.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/DeletedManagedHsm_Purge.json // this example is just showing the usage of "ManagedHsms_PurgeDeleted" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_KeyVaultCollection.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_KeyVaultCollection.cs index 56b3b03957bc6..60864d7f2a859 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_KeyVaultCollection.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_KeyVaultCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_KeyVaultCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateANewVaultOrUpdateAnExistingVault() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/createVault.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/createVault.json // this example is just showing the usage of "Vaults_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -81,7 +81,7 @@ public async Task CreateOrUpdate_CreateANewVaultOrUpdateAnExistingVault() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateAVaultWithNetworkAcls() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/createVaultWithNetworkAcls.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/createVaultWithNetworkAcls.json // this example is just showing the usage of "Vaults_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -135,7 +135,7 @@ public async Task CreateOrUpdate_CreateOrUpdateAVaultWithNetworkAcls() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_RetrieveAVault() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/getVault.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/getVault.json // this example is just showing the usage of "Vaults_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -169,7 +169,7 @@ public async Task Get_RetrieveAVault() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_RetrieveAVault() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/getVault.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/getVault.json // this example is just showing the usage of "Vaults_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -199,7 +199,7 @@ public async Task Exists_RetrieveAVault() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_RetrieveAVault() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/getVault.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/getVault.json // this example is just showing the usage of "Vaults_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -241,7 +241,7 @@ public async Task GetIfExists_RetrieveAVault() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListVaultsInTheSpecifiedResourceGroup() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/listVaultByResourceGroup.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/listVaultByResourceGroup.json // this example is just showing the usage of "Vaults_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_KeyVaultPrivateEndpointConnectionCollection.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_KeyVaultPrivateEndpointConnectionCollection.cs index d46e54fdc0d4c..503fab6a922c7 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_KeyVaultPrivateEndpointConnectionCollection.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_KeyVaultPrivateEndpointConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_KeyVaultPrivateEndpointConnectionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_KeyVaultGetPrivateEndpointConnection() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/getPrivateEndpointConnection.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/getPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_KeyVaultGetPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_KeyVaultGetPrivateEndpointConnection() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/getPrivateEndpointConnection.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/getPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Exists_KeyVaultGetPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_KeyVaultGetPrivateEndpointConnection() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/getPrivateEndpointConnection.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/getPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetIfExists_KeyVaultGetPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_KeyVaultPutPrivateEndpointConnection() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/putPrivateEndpointConnection.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/putPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnections_Put" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -174,7 +174,7 @@ public async Task CreateOrUpdate_KeyVaultPutPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_KeyVaultListPrivateEndpointConnection() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/listPrivateEndpointConnection.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/listPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnections_ListByResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_KeyVaultPrivateEndpointConnectionResource.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_KeyVaultPrivateEndpointConnectionResource.cs index aebe9a7d8c6af..8b4387e65090e 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_KeyVaultPrivateEndpointConnectionResource.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_KeyVaultPrivateEndpointConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_KeyVaultPrivateEndpointConnectionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_KeyVaultGetPrivateEndpointConnection() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/getPrivateEndpointConnection.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/getPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_KeyVaultGetPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_KeyVaultPutPrivateEndpointConnection() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/putPrivateEndpointConnection.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/putPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnections_Put" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -94,7 +94,7 @@ public async Task Update_KeyVaultPutPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_KeyVaultDeletePrivateEndpointConnection() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/deletePrivateEndpointConnection.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/deletePrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnections_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_KeyVaultResource.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_KeyVaultResource.cs index e90a5570d0c39..8bd62c0e408a0 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_KeyVaultResource.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_KeyVaultResource.cs @@ -21,7 +21,7 @@ public partial class Sample_KeyVaultResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateAnExistingVault() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/updateVault.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/updateVault.json // this example is just showing the usage of "Vaults_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task Update_UpdateAnExistingVault() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAVault() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/deleteVault.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/deleteVault.json // this example is just showing the usage of "Vaults_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -109,7 +109,7 @@ public async Task Delete_DeleteAVault() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_RetrieveAVault() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/getVault.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/getVault.json // this example is just showing the usage of "Vaults_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -140,7 +140,7 @@ public async Task Get_RetrieveAVault() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task UpdateAccessPolicy_AddAnAccessPolicyOrUpdateAnAccessPolicyWithNewPermissions() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/updateAccessPoliciesAdd.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/updateAccessPoliciesAdd.json // this example is just showing the usage of "Vaults_UpdateAccessPolicy" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -186,7 +186,7 @@ public async Task UpdateAccessPolicy_AddAnAccessPolicyOrUpdateAnAccessPolicyWith [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetKeyVaults_ListVaultsInTheSpecifiedSubscription() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/listVaultBySubscription.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/listVaultBySubscription.json // this example is just showing the usage of "Vaults_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -219,7 +219,7 @@ public async Task GetKeyVaults_ListVaultsInTheSpecifiedSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckKeyVaultNameAvailability_ValidateAVaultName() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/checkVaultNameAvailability.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/checkVaultNameAvailability.json // this example is just showing the usage of "Vaults_CheckNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -245,7 +245,7 @@ public async Task CheckKeyVaultNameAvailability_ValidateAVaultName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetPrivateLinkResources_KeyVaultListPrivateLinkResources() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/listPrivateLinkResources.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/listPrivateLinkResources.json // this example is just showing the usage of "PrivateLinkResources_ListByVault" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_KeyVaultSecretCollection.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_KeyVaultSecretCollection.cs index d8425f768e42a..21803f35c95b2 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_KeyVaultSecretCollection.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_KeyVaultSecretCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_KeyVaultSecretCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateASecret() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/createSecret.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/createSecret.json // this example is just showing the usage of "Secrets_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task CreateOrUpdate_CreateASecret() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetASecret() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/getSecret.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/getSecret.json // this example is just showing the usage of "Secrets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task Get_GetASecret() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetASecret() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/getSecret.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/getSecret.json // this example is just showing the usage of "Secrets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task Exists_GetASecret() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetASecret() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/getSecret.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/getSecret.json // this example is just showing the usage of "Secrets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -169,7 +169,7 @@ public async Task GetIfExists_GetASecret() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListSecretsInTheVault() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/listSecrets.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/listSecrets.json // this example is just showing the usage of "Secrets_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_KeyVaultSecretResource.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_KeyVaultSecretResource.cs index b94a17f90e3bc..7c0bf11383e31 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_KeyVaultSecretResource.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_KeyVaultSecretResource.cs @@ -20,7 +20,7 @@ public partial class Sample_KeyVaultSecretResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateASecret() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/updateSecret.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/updateSecret.json // this example is just showing the usage of "Secrets_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -59,7 +59,7 @@ public async Task Update_UpdateASecret() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetASecret() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/getSecret.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/getSecret.json // this example is just showing the usage of "Secrets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_ManagedHsmCollection.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_ManagedHsmCollection.cs index 717b927dca85d..c93002c50c556 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_ManagedHsmCollection.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_ManagedHsmCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ManagedHsmCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateANewManagedHSMPoolOrUpdateAnExistingManagedHSMPool() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/ManagedHsm_CreateOrUpdate.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/ManagedHsm_CreateOrUpdate.json // this example is just showing the usage of "ManagedHsms_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -76,7 +76,7 @@ public async Task CreateOrUpdate_CreateANewManagedHSMPoolOrUpdateAnExistingManag [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_RetrieveAManagedHSMPool() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/ManagedHsm_Get.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/ManagedHsm_Get.json // this example is just showing the usage of "ManagedHsms_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -110,7 +110,7 @@ public async Task Get_RetrieveAManagedHSMPool() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_RetrieveAManagedHSMPool() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/ManagedHsm_Get.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/ManagedHsm_Get.json // this example is just showing the usage of "ManagedHsms_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -140,7 +140,7 @@ public async Task Exists_RetrieveAManagedHSMPool() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_RetrieveAManagedHSMPool() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/ManagedHsm_Get.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/ManagedHsm_Get.json // this example is just showing the usage of "ManagedHsms_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -182,7 +182,7 @@ public async Task GetIfExists_RetrieveAManagedHSMPool() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListManagedHSMPoolsInAResourceGroup() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/ManagedHsm_ListByResourceGroup.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/ManagedHsm_ListByResourceGroup.json // this example is just showing the usage of "ManagedHsms_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_ManagedHsmPrivateEndpointConnectionCollection.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_ManagedHsmPrivateEndpointConnectionCollection.cs index 73ea7f30ba698..e6164c9ed374f 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_ManagedHsmPrivateEndpointConnectionCollection.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_ManagedHsmPrivateEndpointConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedHsmPrivateEndpointConnectionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListManagedHSMPoolsInASubscription() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/ManagedHsm_ListPrivateEndpointConnectionsByResource.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/ManagedHsm_ListPrivateEndpointConnectionsByResource.json // this example is just showing the usage of "MHSMPrivateEndpointConnections_ListByResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ListManagedHSMPoolsInASubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ManagedHsmGetPrivateEndpointConnection() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/ManagedHsm_getPrivateEndpointConnection.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/ManagedHsm_getPrivateEndpointConnection.json // this example is just showing the usage of "MHSMPrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_ManagedHsmGetPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ManagedHsmGetPrivateEndpointConnection() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/ManagedHsm_getPrivateEndpointConnection.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/ManagedHsm_getPrivateEndpointConnection.json // this example is just showing the usage of "MHSMPrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_ManagedHsmGetPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ManagedHsmGetPrivateEndpointConnection() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/ManagedHsm_getPrivateEndpointConnection.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/ManagedHsm_getPrivateEndpointConnection.json // this example is just showing the usage of "MHSMPrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_ManagedHsmGetPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ManagedHsmPutPrivateEndpointConnection() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/ManagedHsm_putPrivateEndpointConnection.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/ManagedHsm_putPrivateEndpointConnection.json // this example is just showing the usage of "MHSMPrivateEndpointConnections_Put" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_ManagedHsmPrivateEndpointConnectionResource.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_ManagedHsmPrivateEndpointConnectionResource.cs index 318f38995beed..43edf63714033 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_ManagedHsmPrivateEndpointConnectionResource.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_ManagedHsmPrivateEndpointConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedHsmPrivateEndpointConnectionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ManagedHsmGetPrivateEndpointConnection() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/ManagedHsm_getPrivateEndpointConnection.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/ManagedHsm_getPrivateEndpointConnection.json // this example is just showing the usage of "MHSMPrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_ManagedHsmGetPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ManagedHsmPutPrivateEndpointConnection() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/ManagedHsm_putPrivateEndpointConnection.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/ManagedHsm_putPrivateEndpointConnection.json // this example is just showing the usage of "MHSMPrivateEndpointConnections_Put" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Update_ManagedHsmPutPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ManagedHsmDeletePrivateEndpointConnection() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/ManagedHsm_deletePrivateEndpointConnection.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/ManagedHsm_deletePrivateEndpointConnection.json // this example is just showing the usage of "MHSMPrivateEndpointConnections_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_ManagedHsmResource.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_ManagedHsmResource.cs index 1f315579c789b..0a294376790d0 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_ManagedHsmResource.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_ManagedHsmResource.cs @@ -21,7 +21,7 @@ public partial class Sample_ManagedHsmResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateAnExistingManagedHSMPool() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/ManagedHsm_Update.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/ManagedHsm_Update.json // this example is just showing the usage of "ManagedHsms_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -62,7 +62,7 @@ public async Task Update_UpdateAnExistingManagedHSMPool() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAManagedHSMPool() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/ManagedHsm_Delete.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/ManagedHsm_Delete.json // this example is just showing the usage of "ManagedHsms_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task Delete_DeleteAManagedHSMPool() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_RetrieveAManagedHSMPool() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/ManagedHsm_Get.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/ManagedHsm_Get.json // this example is just showing the usage of "ManagedHsms_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +120,7 @@ public async Task Get_RetrieveAManagedHSMPool() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetManagedHsms_ListManagedHSMPoolsInASubscription() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/ManagedHsm_ListBySubscription.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/ManagedHsm_ListBySubscription.json // this example is just showing the usage of "ManagedHsms_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -152,7 +152,7 @@ public async Task GetManagedHsms_ListManagedHSMPoolsInASubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckManagedHsmNameAvailability_ValidateAManagedHsmName() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/ManagedHsm_checkMhsmNameAvailability.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/ManagedHsm_checkMhsmNameAvailability.json // this example is just showing the usage of "ManagedHsms_CheckManagedHsmNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -178,7 +178,7 @@ public async Task CheckManagedHsmNameAvailability_ValidateAManagedHsmName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetMHSMPrivateLinkResourcesByManagedHsmResource_KeyVaultListPrivateLinkResources() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/ManagedHsm_listPrivateLinkResources.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/ManagedHsm_listPrivateLinkResources.json // this example is just showing the usage of "MHSMPrivateLinkResources_ListByManagedHsmResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -208,7 +208,7 @@ public async Task GetMHSMPrivateLinkResourcesByManagedHsmResource_KeyVaultListPr [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetMHSMRegionsByResource_ListManagedHSMPoolsInASubscription() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/ManagedHsm_ListRegionsByResource.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/ManagedHsm_ListRegionsByResource.json // this example is just showing the usage of "MHSMRegions_ListByResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 6eee45c18d418..435f81d3e9795 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -20,7 +20,7 @@ public partial class Sample_SubscriptionResourceExtensions [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetDeletedKeyVaults_ListDeletedVaultsInTheSpecifiedSubscription() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/listDeletedVaults.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/listDeletedVaults.json // this example is just showing the usage of "Vaults_ListDeleted" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task GetDeletedKeyVaults_ListDeletedVaultsInTheSpecifiedSubscriptio [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetDeletedManagedHsms_ListDeletedManagedHSMsInTheSpecifiedSubscription() { - // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/examples/DeletedManagedHsm_List.json + // Generated from example definition: specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-07-01/examples/DeletedManagedHsm_List.json // this example is just showing the usage of "ManagedHsms_ListDeleted" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Azure.ResourceManager.KeyVault.csproj b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Azure.ResourceManager.KeyVault.csproj index aae8b4b868663..b245da30a7743 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Azure.ResourceManager.KeyVault.csproj +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Azure.ResourceManager.KeyVault.csproj @@ -1,6 +1,6 @@ - 1.3.0-beta.1 + 1.3.0 1.2.3 Azure.ResourceManager.KeyVault diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ArmKeyVaultModelFactory.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ArmKeyVaultModelFactory.cs index c078290f6dcca..ab20a59df3e67 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ArmKeyVaultModelFactory.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ArmKeyVaultModelFactory.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using Azure.Core; using Azure.ResourceManager.Models; @@ -265,8 +266,9 @@ public static KeyVaultPrivateLinkResourceData KeyVaultPrivateLinkResourceData(Re /// The location. /// Properties of the managed HSM. /// SKU details. + /// Managed service identity (system assigned and/or user assigned identities). /// A new instance for mocking. - public static ManagedHsmData ManagedHsmData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedHsmProperties properties = null, ManagedHsmSku sku = null) + public static ManagedHsmData ManagedHsmData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedHsmProperties properties = null, ManagedHsmSku sku = null, ManagedServiceIdentity identity = null) { tags ??= new Dictionary(); @@ -279,6 +281,7 @@ public static ManagedHsmData ManagedHsmData(ResourceIdentifier id = null, string location, properties, sku, + identity, serializedAdditionalRawData: null); } @@ -373,8 +376,9 @@ public static ManagedHSMSecurityDomainProperties ManagedHSMSecurityDomainPropert /// Approval state of the private link connection. /// Provisioning state of the private endpoint connection. /// SKU details. + /// Managed service identity (system assigned and/or user assigned identities). /// A new instance for mocking. - public static ManagedHsmPrivateEndpointConnectionData ManagedHsmPrivateEndpointConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, ResourceIdentifier privateEndpointId = null, ManagedHsmPrivateLinkServiceConnectionState privateLinkServiceConnectionState = null, ManagedHsmPrivateEndpointConnectionProvisioningState? provisioningState = null, ManagedHsmSku sku = null) + public static ManagedHsmPrivateEndpointConnectionData ManagedHsmPrivateEndpointConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, ResourceIdentifier privateEndpointId = null, ManagedHsmPrivateLinkServiceConnectionState privateLinkServiceConnectionState = null, ManagedHsmPrivateEndpointConnectionProvisioningState? provisioningState = null, ManagedHsmSku sku = null, ManagedServiceIdentity identity = null) { tags ??= new Dictionary(); @@ -390,6 +394,7 @@ public static ManagedHsmPrivateEndpointConnectionData ManagedHsmPrivateEndpointC privateLinkServiceConnectionState, provisioningState, sku, + identity, serializedAdditionalRawData: null); } @@ -444,8 +449,9 @@ public static DeletedManagedHsmProperties DeletedManagedHsmProperties(ResourceId /// Required member names of private link resource. /// Required DNS zone names of the the private link resource. /// SKU details. + /// Managed service identity (system assigned and/or user assigned identities). /// A new instance for mocking. - public static ManagedHsmPrivateLinkResourceData ManagedHsmPrivateLinkResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string groupId = null, IEnumerable requiredMembers = null, IEnumerable requiredZoneNames = null, ManagedHsmSku sku = null) + public static ManagedHsmPrivateLinkResourceData ManagedHsmPrivateLinkResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string groupId = null, IEnumerable requiredMembers = null, IEnumerable requiredZoneNames = null, ManagedHsmSku sku = null, ManagedServiceIdentity identity = null) { tags ??= new Dictionary(); requiredMembers ??= new List(); @@ -462,6 +468,7 @@ public static ManagedHsmPrivateLinkResourceData ManagedHsmPrivateLinkResourceDat requiredMembers?.ToList(), requiredZoneNames?.ToList(), sku, + identity, serializedAdditionalRawData: null); } @@ -563,5 +570,58 @@ public static KeyVaultSecretData KeyVaultSecretData(ResourceIdentifier id = null tags, serializedAdditionalRawData: null); } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Properties of the managed HSM. + /// SKU details. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ManagedHsmData ManagedHsmData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedHsmProperties properties, ManagedHsmSku sku) + { + return ManagedHsmData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, properties: properties, sku: sku, identity: default); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Modified whenever there is a change in the state of private endpoint connection. + /// Properties of the private endpoint object. + /// Approval state of the private link connection. + /// Provisioning state of the private endpoint connection. + /// SKU details. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ManagedHsmPrivateEndpointConnectionData ManagedHsmPrivateEndpointConnectionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, ResourceIdentifier privateEndpointId, ManagedHsmPrivateLinkServiceConnectionState privateLinkServiceConnectionState, ManagedHsmPrivateEndpointConnectionProvisioningState? provisioningState, ManagedHsmSku sku) + { + return ManagedHsmPrivateEndpointConnectionData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, etag: etag, privateEndpointId: privateEndpointId, privateLinkServiceConnectionState: privateLinkServiceConnectionState, provisioningState: provisioningState, sku: sku, identity: default); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Group identifier of private link resource. + /// Required member names of private link resource. + /// Required DNS zone names of the the private link resource. + /// SKU details. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ManagedHsmPrivateLinkResourceData ManagedHsmPrivateLinkResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string groupId, IEnumerable requiredMembers, IEnumerable requiredZoneNames, ManagedHsmSku sku) + { + return ManagedHsmPrivateLinkResourceData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, groupId: groupId, requiredMembers: requiredMembers, requiredZoneNames: requiredZoneNames, sku: sku, identity: default); + } } } diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedKeyVaultCollection.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedKeyVaultCollection.cs index f91e8817484d4..9fedaa2a1957a 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedKeyVaultCollection.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedKeyVaultCollection.cs @@ -62,7 +62,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -108,7 +108,7 @@ public virtual async Task> GetAsync(AzureLocat /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(AzureLocation location, str /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -198,7 +198,7 @@ public virtual async Task> ExistsAsync(AzureLocation location, st /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -242,7 +242,7 @@ public virtual Response Exists(AzureLocation location, string vaultName, C /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedKeyVaultResource.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedKeyVaultResource.cs index 5165ade3a0887..70a11589f76fb 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedKeyVaultResource.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedKeyVaultResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancellat /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task PurgeDeletedAsync(WaitUntil waitUntil, C /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedManagedHsmCollection.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedManagedHsmCollection.cs index 02491e344f7cf..bc09ba33d5f5a 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedManagedHsmCollection.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedManagedHsmCollection.cs @@ -62,7 +62,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -108,7 +108,7 @@ public virtual async Task> GetAsync(AzureLoc /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(AzureLocation location, s /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -198,7 +198,7 @@ public virtual async Task> ExistsAsync(AzureLocation location, st /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -242,7 +242,7 @@ public virtual Response Exists(AzureLocation location, string name, Cancel /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedManagedHsmResource.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedManagedHsmResource.cs index 30aeed42b163d..10fccc7a35ee6 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedManagedHsmResource.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedManagedHsmResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task PurgeDeletedAsync(WaitUntil waitUntil, C /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Extensions/KeyVaultExtensions.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Extensions/KeyVaultExtensions.cs index 117edbd2b3352..720334f5df2dd 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Extensions/KeyVaultExtensions.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Extensions/KeyVaultExtensions.cs @@ -196,7 +196,7 @@ public static KeyVaultCollection GetKeyVaults(this ResourceGroupResource resourc /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -234,7 +234,7 @@ public static async Task> GetKeyVaultAsync(this Resou /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -289,7 +289,7 @@ public static ManagedHsmCollection GetManagedHsms(this ResourceGroupResource res /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -327,7 +327,7 @@ public static async Task> GetManagedHsmAsync(this R /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -382,7 +382,7 @@ public static DeletedKeyVaultCollection GetDeletedKeyVaults(this SubscriptionRes /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -421,7 +421,7 @@ public static async Task> GetDeletedKeyVaultAs /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -477,7 +477,7 @@ public static DeletedManagedHsmCollection GetDeletedManagedHsms(this Subscriptio /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -516,7 +516,7 @@ public static async Task> GetDeletedManagedH /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -555,7 +555,7 @@ public static Response GetDeletedManagedHsm(this Subs /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -592,7 +592,7 @@ public static AsyncPageable GetKeyVaultsAsync(this Subscriptio /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -629,7 +629,7 @@ public static Pageable GetKeyVaults(this SubscriptionResource /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// @@ -661,7 +661,7 @@ public static AsyncPageable GetDeletedKeyVaultsAsync(th /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// @@ -693,7 +693,7 @@ public static Pageable GetDeletedKeyVaults(this Subscri /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -729,7 +729,7 @@ public static async Task> CheckKeyVault /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -765,7 +765,7 @@ public static Response CheckKeyVaultNameAvailabi /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -802,7 +802,7 @@ public static AsyncPageable GetManagedHsmsAsync(this Subscri /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -839,7 +839,7 @@ public static Pageable GetManagedHsms(this SubscriptionResou /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// @@ -871,7 +871,7 @@ public static AsyncPageable GetDeletedManagedHsmsAsyn /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// @@ -903,7 +903,7 @@ public static Pageable GetDeletedManagedHsms(this Sub /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -939,7 +939,7 @@ public static async Task> CheckManage /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Extensions/MockableKeyVaultResourceGroupResource.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Extensions/MockableKeyVaultResourceGroupResource.cs index b3a04a42126c1..cddb41101444c 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Extensions/MockableKeyVaultResourceGroupResource.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Extensions/MockableKeyVaultResourceGroupResource.cs @@ -53,7 +53,7 @@ public virtual KeyVaultCollection GetKeyVaults() /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task> GetKeyVaultAsync(string va /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -122,7 +122,7 @@ public virtual ManagedHsmCollection GetManagedHsms() /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -153,7 +153,7 @@ public virtual async Task> GetManagedHsmAsync(strin /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Extensions/MockableKeyVaultSubscriptionResource.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Extensions/MockableKeyVaultSubscriptionResource.cs index 8a96019efc24b..09d7573c8c386 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Extensions/MockableKeyVaultSubscriptionResource.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Extensions/MockableKeyVaultSubscriptionResource.cs @@ -74,7 +74,7 @@ public virtual DeletedKeyVaultCollection GetDeletedKeyVaults() /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -106,7 +106,7 @@ public virtual async Task> GetDeletedKeyVaultA /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -145,7 +145,7 @@ public virtual DeletedManagedHsmCollection GetDeletedManagedHsms() /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -177,7 +177,7 @@ public virtual async Task> GetDeletedManaged /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual Response GetDeletedManagedHsm(AzureLoc /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -240,7 +240,7 @@ public virtual AsyncPageable GetKeyVaultsAsync(int? top = null /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual Pageable GetKeyVaults(int? top = null, Cancella /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// @@ -297,7 +297,7 @@ public virtual AsyncPageable GetDeletedKeyVaultsAsync(C /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// @@ -323,7 +323,7 @@ public virtual Pageable GetDeletedKeyVaults(Cancellatio /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -365,7 +365,7 @@ public virtual async Task> CheckKeyVaul /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -407,7 +407,7 @@ public virtual Response CheckKeyVaultNameAvailab /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -438,7 +438,7 @@ public virtual AsyncPageable GetManagedHsmsAsync(int? top = /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -469,7 +469,7 @@ public virtual Pageable GetManagedHsms(int? top = null, Canc /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// @@ -495,7 +495,7 @@ public virtual AsyncPageable GetDeletedManagedHsmsAsy /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// @@ -521,7 +521,7 @@ public virtual Pageable GetDeletedManagedHsms(Cancell /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -563,7 +563,7 @@ public virtual async Task> CheckManag /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultCollection.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultCollection.cs index 420811bf3ea62..efd240b0a5659 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultCollection.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultCollection.cs @@ -66,7 +66,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdateAsync(Wa /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -164,7 +164,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string vaultName, /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -254,7 +254,7 @@ public virtual Response Get(string vaultName, CancellationToke /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(int? top = null, Canc /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(int? top = null, CancellationTo /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string vaultName, Cancella /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string vaultName, CancellationToken cancell /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> GetIfExistsAsync(s /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultPrivateEndpointConnectionCollection.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultPrivateEndpointConnectionCollection.cs index 6f09aa285a470..cbab25128bd13 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultPrivateEndpointConnectionCollection.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultPrivateEndpointConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrU /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string pr /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAs /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(Cancel /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultPrivateEndpointConnectionResource.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultPrivateEndpointConnectionResource.cs index 4d07c1b80db44..03cf5de486c0e 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultPrivateEndpointConnectionResource.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultPrivateEndpointConnectionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cancellat /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(Wa /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultResource.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultResource.cs index e87bd39d8d610..b4b49e0a267ea 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultResource.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultResource.cs @@ -115,7 +115,7 @@ public virtual KeyVaultPrivateEndpointConnectionCollection GetKeyVaultPrivateEnd /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -146,7 +146,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual KeyVaultSecretCollection GetKeyVaultSecrets() /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -215,7 +215,7 @@ public virtual async Task> GetKeyVaultSecretAsy /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -246,7 +246,7 @@ public virtual Response GetKeyVaultSecret(string secretN /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual async Task> GetAsync(CancellationToken /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -326,7 +326,7 @@ public virtual Response Get(CancellationToken cancellationToke /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -370,7 +370,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -414,7 +414,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -456,7 +456,7 @@ public virtual async Task> UpdateAsync(KeyVaultPatch /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -498,7 +498,7 @@ public virtual Response Update(KeyVaultPatch patch, Cancellati /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// @@ -537,7 +537,7 @@ public virtual async Task> UpdateAccess /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// @@ -576,7 +576,7 @@ public virtual Response UpdateAccessPolicy(Acces /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// @@ -601,7 +601,7 @@ public virtual AsyncPageable GetPrivateLinkReso /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// @@ -626,7 +626,7 @@ public virtual Pageable GetPrivateLinkResources /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -688,7 +688,7 @@ public virtual async Task> AddTagAsync(string key, st /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -750,7 +750,7 @@ public virtual Response AddTag(string key, string value, Cance /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -807,7 +807,7 @@ public virtual async Task> SetTagsAsync(IDictionary /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -864,7 +864,7 @@ public virtual Response SetTags(IDictionary ta /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -924,7 +924,7 @@ public virtual async Task> RemoveTagAsync(string key, /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultSecretCollection.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultSecretCollection.cs index 92b282356f335..c70fc0fe01563 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultSecretCollection.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultSecretCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(string secr /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string secretName, Cancellat /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsync(int? top = null /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual Pageable GetAll(int? top = null, Cancella /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -362,7 +362,7 @@ public virtual async Task> ExistsAsync(string secretName, Cancell /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -405,7 +405,7 @@ public virtual Response Exists(string secretName, CancellationToken cancel /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -450,7 +450,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultSecretResource.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultSecretResource.cs index f10347663969e..f5f7f3916b4f1 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultSecretResource.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultSecretResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task> UpdateAsync(KeyVault /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmCollection.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmCollection.cs index 74e345e9c64e4..36eb798d4b1e0 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmCollection.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync( /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnt /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string name, Ca /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string name, CancellationToken c /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -284,7 +284,7 @@ public virtual AsyncPageable GetAllAsync(int? top = null, Ca /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(int? top = null, Cancellation /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -401,7 +401,7 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -446,7 +446,7 @@ public virtual async Task> GetIfExistsAsync /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmData.Serialization.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmData.Serialization.cs index c6fa57ae14be0..9cc54e4052d1c 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmData.Serialization.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmData.Serialization.cs @@ -40,6 +40,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku, options); } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + JsonSerializer.Serialize(writer, Identity, serializeOptions); + } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -113,6 +119,7 @@ internal static ManagedHsmData DeserializeManagedHsmData(JsonElement element, Mo } ManagedHsmProperties properties = default; ManagedHsmSku sku = default; + ManagedServiceIdentity identity = default; IDictionary tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -141,6 +148,16 @@ internal static ManagedHsmData DeserializeManagedHsmData(JsonElement element, Mo sku = ManagedHsmSku.DeserializeManagedHsmSku(property.Value, options); continue; } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); + continue; + } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -199,6 +216,7 @@ internal static ManagedHsmData DeserializeManagedHsmData(JsonElement element, Mo location, properties, sku, + identity, serializedAdditionalRawData); } @@ -315,6 +333,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Identity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" identity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Identity)) + { + builder.Append(" identity: "); + BicepSerializationHelpers.AppendChildObject(builder, Identity, options, 2, false, " identity: "); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmData.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmData.cs index 0b649360401ef..f1a5cd0fe4d8a 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmData.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmData.cs @@ -66,11 +66,13 @@ public ManagedHsmData(AzureLocation location) : base(location) /// The location. /// Properties of the managed HSM. /// SKU details. + /// Managed service identity (system assigned and/or user assigned identities). /// Keeps track of any properties unknown to the library. - internal ManagedHsmData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedHsmProperties properties, ManagedHsmSku sku, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal ManagedHsmData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedHsmProperties properties, ManagedHsmSku sku, ManagedServiceIdentity identity, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Properties = properties; Sku = sku; + Identity = identity; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -85,5 +87,8 @@ internal ManagedHsmData() /// SKU details. [WirePath("sku")] public ManagedHsmSku Sku { get; set; } + /// Managed service identity (system assigned and/or user assigned identities). + [WirePath("identity")] + public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmPrivateEndpointConnectionCollection.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmPrivateEndpointConnectionCollection.cs index aac153dc143c1..7b08672fe9a0c 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmPrivateEndpointConnectionCollection.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmPrivateEndpointConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateO /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAll /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(Canc /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmPrivateEndpointConnectionData.Serialization.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmPrivateEndpointConnectionData.Serialization.cs index 9b3d9931cb76e..fb0bd0836de87 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmPrivateEndpointConnectionData.Serialization.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmPrivateEndpointConnectionData.Serialization.cs @@ -41,6 +41,12 @@ void IJsonModel.Write(Utf8JsonWriter wr writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku, options); } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + JsonSerializer.Serialize(writer, Identity, serializeOptions); + } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -132,6 +138,7 @@ internal static ManagedHsmPrivateEndpointConnectionData DeserializeManagedHsmPri } ETag? etag = default; ManagedHsmSku sku = default; + ManagedServiceIdentity identity = default; IDictionary tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -163,6 +170,16 @@ internal static ManagedHsmPrivateEndpointConnectionData DeserializeManagedHsmPri sku = ManagedHsmSku.DeserializeManagedHsmSku(property.Value, options); continue; } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); + continue; + } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -263,6 +280,7 @@ internal static ManagedHsmPrivateEndpointConnectionData DeserializeManagedHsmPri privateLinkServiceConnectionState, provisioningState, sku, + identity, serializedAdditionalRawData); } @@ -379,6 +397,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Identity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" identity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Identity)) + { + builder.Append(" identity: "); + BicepSerializationHelpers.AppendChildObject(builder, Identity, options, 2, false, " identity: "); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmPrivateEndpointConnectionData.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmPrivateEndpointConnectionData.cs index 6c18975f19b59..1d0e205b73dc9 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmPrivateEndpointConnectionData.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmPrivateEndpointConnectionData.cs @@ -70,14 +70,16 @@ public ManagedHsmPrivateEndpointConnectionData(AzureLocation location) : base(lo /// Approval state of the private link connection. /// Provisioning state of the private endpoint connection. /// SKU details. + /// Managed service identity (system assigned and/or user assigned identities). /// Keeps track of any properties unknown to the library. - internal ManagedHsmPrivateEndpointConnectionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, SubResource privateEndpoint, ManagedHsmPrivateLinkServiceConnectionState privateLinkServiceConnectionState, ManagedHsmPrivateEndpointConnectionProvisioningState? provisioningState, ManagedHsmSku sku, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal ManagedHsmPrivateEndpointConnectionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, SubResource privateEndpoint, ManagedHsmPrivateLinkServiceConnectionState privateLinkServiceConnectionState, ManagedHsmPrivateEndpointConnectionProvisioningState? provisioningState, ManagedHsmSku sku, ManagedServiceIdentity identity, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { ETag = etag; PrivateEndpoint = privateEndpoint; PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; ProvisioningState = provisioningState; Sku = sku; + Identity = identity; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -107,5 +109,8 @@ public ResourceIdentifier PrivateEndpointId /// SKU details. [WirePath("sku")] public ManagedHsmSku Sku { get; set; } + /// Managed service identity (system assigned and/or user assigned identities). + [WirePath("identity")] + public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmPrivateEndpointConnectionResource.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmPrivateEndpointConnectionResource.cs index 3cfbcc2e60b6d..33e51ea61b256 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmPrivateEndpointConnectionResource.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmPrivateEndpointConnectionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Cancell /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete( /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -362,7 +362,7 @@ public virtual ArmOperation Update( /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -419,7 +419,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -476,7 +476,7 @@ public virtual Response AddTag(stri /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -532,7 +532,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -588,7 +588,7 @@ public virtual Response SetTags(IDi /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -643,7 +643,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmResource.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmResource.cs index 5efc606a706df..861b150606679 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmResource.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmResource.cs @@ -119,7 +119,7 @@ public virtual ManagedHsmPrivateEndpointConnectionCollection GetManagedHsmPrivat /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -150,7 +150,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response GetManagedH /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -221,7 +221,7 @@ public virtual async Task> GetAsync(CancellationTok /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -261,7 +261,7 @@ public virtual Response Get(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -303,7 +303,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -391,7 +391,7 @@ public virtual async Task> UpdateAsync(WaitUnti /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -437,7 +437,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Mana /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// @@ -462,7 +462,7 @@ public virtual AsyncPageable GetMHSMPrivateLi /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// @@ -487,7 +487,7 @@ public virtual Pageable GetMHSMPrivateLinkRes /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// @@ -513,7 +513,7 @@ public virtual AsyncPageable GetMHSMRegionsByReso /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// @@ -539,7 +539,7 @@ public virtual Pageable GetMHSMRegionsByResource( /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -601,7 +601,7 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -663,7 +663,7 @@ public virtual Response AddTag(string key, string value, Can /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -720,7 +720,7 @@ public virtual async Task> SetTagsAsync(IDictionary /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -777,7 +777,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource @@ -837,7 +837,7 @@ public virtual async Task> RemoveTagAsync(string ke /// /// /// Default Api Version - /// 2023-02-01 + /// 2023-07-01 /// /// /// Resource diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Models/ManagedHsmPrivateLinkResourceData.Serialization.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Models/ManagedHsmPrivateLinkResourceData.Serialization.cs index 309d75cef7bee..e941c9dc5440d 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Models/ManagedHsmPrivateLinkResourceData.Serialization.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Models/ManagedHsmPrivateLinkResourceData.Serialization.cs @@ -34,6 +34,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku, options); } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + JsonSerializer.Serialize(writer, Identity, serializeOptions); + } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -134,6 +140,7 @@ internal static ManagedHsmPrivateLinkResourceData DeserializeManagedHsmPrivateLi return null; } ManagedHsmSku sku = default; + ManagedServiceIdentity identity = default; IDictionary tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -156,6 +163,16 @@ internal static ManagedHsmPrivateLinkResourceData DeserializeManagedHsmPrivateLi sku = ManagedHsmSku.DeserializeManagedHsmSku(property.Value, options); continue; } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); + continue; + } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -261,6 +278,7 @@ internal static ManagedHsmPrivateLinkResourceData DeserializeManagedHsmPrivateLi requiredMembers ?? new ChangeTrackingList(), requiredZoneNames ?? new ChangeTrackingList(), sku, + identity, serializedAdditionalRawData); } @@ -362,6 +380,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Identity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" identity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Identity)) + { + builder.Append(" identity: "); + BicepSerializationHelpers.AppendChildObject(builder, Identity, options, 2, false, " identity: "); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Models/ManagedHsmPrivateLinkResourceData.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Models/ManagedHsmPrivateLinkResourceData.cs index 9ca2c6eea3a85..dedb7a19193bb 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Models/ManagedHsmPrivateLinkResourceData.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/Models/ManagedHsmPrivateLinkResourceData.cs @@ -66,13 +66,15 @@ public ManagedHsmPrivateLinkResourceData(AzureLocation location) : base(location /// Required member names of private link resource. /// Required DNS zone names of the the private link resource. /// SKU details. + /// Managed service identity (system assigned and/or user assigned identities). /// Keeps track of any properties unknown to the library. - internal ManagedHsmPrivateLinkResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string groupId, IReadOnlyList requiredMembers, IList requiredZoneNames, ManagedHsmSku sku, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal ManagedHsmPrivateLinkResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string groupId, IReadOnlyList requiredMembers, IList requiredZoneNames, ManagedHsmSku sku, ManagedServiceIdentity identity, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { GroupId = groupId; RequiredMembers = requiredMembers; RequiredZoneNames = requiredZoneNames; Sku = sku; + Identity = identity; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -93,5 +95,8 @@ internal ManagedHsmPrivateLinkResourceData() /// SKU details. [WirePath("sku")] public ManagedHsmSku Sku { get; set; } + /// Managed service identity (system assigned and/or user assigned identities). + [WirePath("identity")] + public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/ManagedHsmsRestOperations.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/ManagedHsmsRestOperations.cs index 1061454b9253e..bad956922d771 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/ManagedHsmsRestOperations.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/ManagedHsmsRestOperations.cs @@ -32,7 +32,7 @@ public ManagedHsmsRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-02-01"; + _apiVersion = apiVersion ?? "2023-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/MhsmPrivateEndpointConnectionsRestOperations.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/MhsmPrivateEndpointConnectionsRestOperations.cs index a1189737ddac4..78789cdbe3e26 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/MhsmPrivateEndpointConnectionsRestOperations.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/MhsmPrivateEndpointConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public MhsmPrivateEndpointConnectionsRestOperations(HttpPipeline pipeline, strin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-02-01"; + _apiVersion = apiVersion ?? "2023-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/MhsmPrivateLinkResourcesRestOperations.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/MhsmPrivateLinkResourcesRestOperations.cs index 297e0d05da55a..0306c0e006d51 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/MhsmPrivateLinkResourcesRestOperations.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/MhsmPrivateLinkResourcesRestOperations.cs @@ -32,7 +32,7 @@ public MhsmPrivateLinkResourcesRestOperations(HttpPipeline pipeline, string appl { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-02-01"; + _apiVersion = apiVersion ?? "2023-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/MhsmRegionsRestOperations.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/MhsmRegionsRestOperations.cs index 43bda757afcb7..14882073b945c 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/MhsmRegionsRestOperations.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/MhsmRegionsRestOperations.cs @@ -32,7 +32,7 @@ public MhsmRegionsRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-02-01"; + _apiVersion = apiVersion ?? "2023-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs index dbfe4780334b8..f8d9c49e75847 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public PrivateEndpointConnectionsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-02-01"; + _apiVersion = apiVersion ?? "2023-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs index f699c64a163cd..6078116a5f5e6 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs @@ -32,7 +32,7 @@ public PrivateLinkResourcesRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-02-01"; + _apiVersion = apiVersion ?? "2023-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/SecretsRestOperations.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/SecretsRestOperations.cs index d851c50971c7c..f1bb76b1259e8 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/SecretsRestOperations.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/SecretsRestOperations.cs @@ -32,7 +32,7 @@ public SecretsRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-02-01"; + _apiVersion = apiVersion ?? "2023-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/VaultsRestOperations.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/VaultsRestOperations.cs index 2aa72bee7a349..a0a47004dcc5c 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/VaultsRestOperations.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/RestOperations/VaultsRestOperations.cs @@ -32,7 +32,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 ?? "2023-02-01"; + _apiVersion = apiVersion ?? "2023-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/autorest.md b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/autorest.md index 0f11720925da6..d31ada8432836 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/autorest.md +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/autorest.md @@ -7,7 +7,8 @@ azure-arm: true csharp: true library-name: KeyVault namespace: Azure.ResourceManager.KeyVault -tag: package-2023-02 +require: https://github.com/Azure/azure-rest-api-specs/blob/d1296700aa6cd650970e9891dd58eef5698327fd/specification/keyvault/resource-manager/readme.md +#tag: package-2023-07 output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: @@ -120,6 +121,16 @@ rename-mapping: CertificatePermissions: IdentityAccessCertificatePermission IPRule.value: AddressRange CheckNameAvailabilityResult: KeyVaultNameAvailabilityResult + Trigger: KeyRotationTrigger + Action: KeyRotationAction + Key: KeyVaultKey + Key.properties.kty: keyType + KeyAttributes.enabled: isEnabled + KeyAttributes.exportable: canExported + KeyProperties.kty: keyType + ManagedHsmKeyAttributes.enabled: isEnabled + ManagedHsmKeyAttributes.exportable: canExported + ManagedHsmKeyProperties.kty: keyType prompted-enum-values: Default @@ -151,17 +162,19 @@ directive: $.VaultProperties.properties.provisioningState['x-ms-enum']['name'] = 'KeyVaultProvisioningState'; $.Vault['x-csharp-usage'] = 'model,input,output'; $.CheckNameAvailabilityResult.properties.reason['x-ms-enum']['name'] = 'KeyVaultNameUnavailableReason'; -``` - -### Tag: package-2023-02 - -These settings apply only when `--tag=package-2023-02` is specified on the command line. - -```yaml $(tag) == 'package-2023-02' -input-file: - - https://github.com/Azure/azure-rest-api-specs/blob/33f06ff82a4c751bcbc842b7ed4da2e81b0717b6/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/common.json - - https://github.com/Azure/azure-rest-api-specs/blob/33f06ff82a4c751bcbc842b7ed4da2e81b0717b6/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/keyvault.json - - https://github.com/Azure/azure-rest-api-specs/blob/33f06ff82a4c751bcbc842b7ed4da2e81b0717b6/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/managedHsm.json - - https://github.com/Azure/azure-rest-api-specs/blob/33f06ff82a4c751bcbc842b7ed4da2e81b0717b6/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/providers.json - - https://github.com/Azure/azure-rest-api-specs/blob/33f06ff82a4c751bcbc842b7ed4da2e81b0717b6/specification/keyvault/resource-manager/Microsoft.KeyVault/stable/2023-02-01/secrets.json + # Remove keysManagedHsm.json and keys.json since these 2 are part of data plane + - from: keysManagedHsm.json + where: $.paths + transform: > + for (var path in $) + { + delete $[path]; + } + - from: keys.json + where: $.paths + transform: > + for (var path in $) + { + delete $[path]; + } ``` From 1f9fa875586c12bd266957acfc21889c702d6feb Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 5 Jul 2024 06:03:54 -0400 Subject: [PATCH 023/144] Increment package version after release of Azure.ResourceManager.ApiManagement (#44876) --- .../Azure.ResourceManager.ApiManagement/CHANGELOG.md | 12 +++++++++++- .../src/Azure.ResourceManager.ApiManagement.csproj | 4 ++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/CHANGELOG.md b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/CHANGELOG.md index 58086577e6a38..1190812165594 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/CHANGELOG.md +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.3.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.2.0 (2024-07-05) ### Features Added @@ -123,4 +133,4 @@ This package follows the [new Azure SDK guidelines](https://azure.github.io/azur This package is a Public Preview version, so expect incompatible changes in subsequent releases as we improve the product. To provide feedback, submit an issue in our [Azure SDK for .NET GitHub repo](https://github.com/Azure/azure-sdk-for-net/issues). -> NOTE: For more information about unified authentication, please refer to [Microsoft Azure Identity documentation for .NET](https://docs.microsoft.com//dotnet/api/overview/azure/identity-readme?view=azure-dotnet). \ No newline at end of file +> NOTE: For more information about unified authentication, please refer to [Microsoft Azure Identity documentation for .NET](https://docs.microsoft.com//dotnet/api/overview/azure/identity-readme?view=azure-dotnet). diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Azure.ResourceManager.ApiManagement.csproj b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Azure.ResourceManager.ApiManagement.csproj index 5cd6a5bff7482..3f069c084c92b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Azure.ResourceManager.ApiManagement.csproj +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Azure.ResourceManager.ApiManagement.csproj @@ -1,8 +1,8 @@ - 1.2.0 + 1.3.0-beta.1 - 1.1.0 + 1.2.0 Azure.ResourceManager.ApiManagement Microsoft Azure Resource Manager client SDK for Azure resource provider Microsoft.ApiManagement. azure;management;arm;resource manager;apimanagement From 50f5cd155d11c336d9c7296689f0db380fafe898 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 5 Jul 2024 06:04:19 -0400 Subject: [PATCH 024/144] Increment package version after release of Azure.ResourceManager.KeyVault (#44877) --- .../Azure.ResourceManager.KeyVault/CHANGELOG.md | 12 +++++++++++- .../src/Azure.ResourceManager.KeyVault.csproj | 4 ++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/CHANGELOG.md b/sdk/keyvault/Azure.ResourceManager.KeyVault/CHANGELOG.md index 12c5cc84fbf3f..a5490104c3766 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/CHANGELOG.md +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.4.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.3.0 (2024-07-05) ### Features Added @@ -264,4 +274,4 @@ After upgrade: ```C# Snippet:Changelog_CreateModel KeyVaultProperties properties = new KeyVaultProperties(Guid.NewGuid(), new KeyVaultSku(KeyVaultSkuFamily.A, KeyVaultSkuName.Standard)); KeyVaultCreateOrUpdateContent parameters = new KeyVaultCreateOrUpdateContent(AzureLocation.WestUS2, properties); -``` \ No newline at end of file +``` diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Azure.ResourceManager.KeyVault.csproj b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Azure.ResourceManager.KeyVault.csproj index b245da30a7743..fd1040352a815 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Azure.ResourceManager.KeyVault.csproj +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Azure.ResourceManager.KeyVault.csproj @@ -1,8 +1,8 @@ - 1.3.0 + 1.4.0-beta.1 - 1.2.3 + 1.3.0 Azure.ResourceManager.KeyVault Microsoft Azure management client SDK for Azure resource provider Microsoft.KeyVault. azure;management;keyvault From 557c7b1e224b795457270aa3c367c258e3816895 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 5 Jul 2024 13:15:21 -0400 Subject: [PATCH 025/144] Delete eng/common/InterdependencyGraph.html which is unused. (#44860) Co-authored-by: Wes Haggard --- eng/common/InterdependencyGraph.html | 356 --------------------------- 1 file changed, 356 deletions(-) delete mode 100644 eng/common/InterdependencyGraph.html diff --git a/eng/common/InterdependencyGraph.html b/eng/common/InterdependencyGraph.html deleted file mode 100644 index 21f78563ed421..0000000000000 --- a/eng/common/InterdependencyGraph.html +++ /dev/null @@ -1,356 +0,0 @@ - - - -Interdependency Graph - - - - - - - - -
-

Dependency Graph

- - -
-
-
- - - From 640757b0bcdb7329e1985a4721a2e5fb78f6d18f Mon Sep 17 00:00:00 2001 From: Jose Arriaga Maldonado <45773732+joseharriaga@users.noreply.github.com> Date: Fri, 5 Jul 2024 10:22:02 -0700 Subject: [PATCH 026/144] [Azure OpenAI] Pin OpenAI version (#44708) Pin OpenAI version, which is used by Azure OpenAI. --- eng/Packages.Data.props | 4 ++++ sdk/openai/Azure.AI.OpenAI/src/Azure.AI.OpenAI.csproj | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index 35c4736369fbf..64f0a3d53b8f4 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -177,6 +177,10 @@ + + + + - + diff --git a/eng/emitter-package-lock.json b/eng/emitter-package-lock.json index 6f10f44f79d9e..a071be113dd33 100644 --- a/eng/emitter-package-lock.json +++ b/eng/emitter-package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20240703.5" + "@azure-tools/typespec-csharp": "0.2.0-beta.20240707.1" }, "devDependencies": { "@azure-tools/typespec-autorest": "0.43.0", @@ -22,9 +22,9 @@ } }, "node_modules/@autorest/csharp": { - "version": "3.0.0-beta.20240703.5", - "resolved": "https://registry.npmjs.org/@autorest/csharp/-/csharp-3.0.0-beta.20240703.5.tgz", - "integrity": "sha512-M5vJUlEUMerJhX+kI+bqB7suetxjScbBhIPKZLfRZwZTyrFfMn/zICvn2scTPByr3SK9ykvOPg3KpSBmcEI3oA==" + "version": "3.0.0-beta.20240707.1", + "resolved": "https://registry.npmjs.org/@autorest/csharp/-/csharp-3.0.0-beta.20240707.1.tgz", + "integrity": "sha512-MjvNBR5H1Yzg3NvsBswDkTj8WXT2rcYPyNIgG6apwgEqUni+HXIUFMgTYFzpoS4A7uTHo+saPH7j4IBYADkpiQ==" }, "node_modules/@azure-tools/typespec-autorest": { "version": "0.43.0", @@ -117,11 +117,11 @@ } }, "node_modules/@azure-tools/typespec-csharp": { - "version": "0.2.0-beta.20240703.5", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-csharp/-/typespec-csharp-0.2.0-beta.20240703.5.tgz", - "integrity": "sha512-ML5MtoH516AWFlvPyaLJ2QWVHhI70KbnCmZHef4e1G6Yr1VklXn7L9ZzCkMvqrkmGPadQBI5wfwJqySSgDfi7g==", + "version": "0.2.0-beta.20240707.1", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-csharp/-/typespec-csharp-0.2.0-beta.20240707.1.tgz", + "integrity": "sha512-jYm+W5pLlqeKIRoOPGRQLoEhK6SG8eG1qhrBS8QEV8s12GyngVx1qxChjviArKlCM3xfqX82zLOkrG8iJ5hh6w==", "dependencies": { - "@autorest/csharp": "3.0.0-beta.20240703.5", + "@autorest/csharp": "3.0.0-beta.20240707.1", "json-serialize-refs": "0.1.0-0" }, "peerDependencies": { diff --git a/eng/emitter-package.json b/eng/emitter-package.json index 72735e1ea0bb3..5005c065b59b2 100644 --- a/eng/emitter-package.json +++ b/eng/emitter-package.json @@ -1,7 +1,7 @@ { "main": "dist/src/index.js", "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20240703.5" + "@azure-tools/typespec-csharp": "0.2.0-beta.20240707.1" }, "devDependencies": { "@azure-tools/typespec-autorest": "0.43.0", diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/tspCodeModel.json b/sdk/communication/Azure.Communication.Messages/src/Generated/tspCodeModel.json index ac4096b077579..fec6b442d4485 100644 --- a/sdk/communication/Azure.Communication.Messages/src/Generated/tspCodeModel.json +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/tspCodeModel.json @@ -1405,8 +1405,7 @@ "$id": "189", "Type": { "$id": "190", - "Kind": "string", - "IsNullable": false + "Kind": "string" }, "Value": "2024-02-01" }, @@ -1506,8 +1505,7 @@ "NameInRequest": "Accept", "Type": { "$id": "200", - "Kind": "string", - "IsNullable": false + "Kind": "string" }, "Location": "Header", "IsApiVersion": false, @@ -1532,8 +1530,7 @@ "NameInRequest": "Content-Type", "Type": { "$id": "203", - "Kind": "string", - "IsNullable": false + "Kind": "string" }, "Location": "Header", "IsApiVersion": false, @@ -1679,8 +1676,7 @@ "NameInRequest": "Accept", "Type": { "$id": "217", - "Kind": "string", - "IsNullable": false + "Kind": "string" }, "Location": "Header", "IsApiVersion": false, @@ -1851,8 +1847,7 @@ "NameInRequest": "Accept", "Type": { "$id": "235", - "Kind": "string", - "IsNullable": false + "Kind": "string" }, "Location": "Header", "IsApiVersion": false, From 93512b14ca1b6d40dde499bfb1e74440779dae5f Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Mon, 8 Jul 2024 09:03:04 -0500 Subject: [PATCH 030/144] Fix for BearerTokenAuthenticationPolicy hang (#44882) --- sdk/core/Azure.Core/CHANGELOG.md | 1 + .../BearerTokenAuthenticationPolicy.cs | 12 ++--- .../BearerTokenAuthenticationPolicyTests.cs | 52 +++++++++++++++++++ 3 files changed, 59 insertions(+), 6 deletions(-) diff --git a/sdk/core/Azure.Core/CHANGELOG.md b/sdk/core/Azure.Core/CHANGELOG.md index 271a6966de58d..61f9e6dd31ce6 100644 --- a/sdk/core/Azure.Core/CHANGELOG.md +++ b/sdk/core/Azure.Core/CHANGELOG.md @@ -7,6 +7,7 @@ ### Breaking Changes ### Bugs Fixed +- Fixed an issue that could result in `BearerTokenAuthenticationPolicy` fails to refresh a token, resulting in a `OperationCanceledException`. ### Other Changes diff --git a/sdk/core/Azure.Core/src/Pipeline/BearerTokenAuthenticationPolicy.cs b/sdk/core/Azure.Core/src/Pipeline/BearerTokenAuthenticationPolicy.cs index ea49deb64b9ec..0b8c7de0d5a19 100644 --- a/sdk/core/Azure.Core/src/Pipeline/BearerTokenAuthenticationPolicy.cs +++ b/sdk/core/Azure.Core/src/Pipeline/BearerTokenAuthenticationPolicy.cs @@ -173,7 +173,7 @@ protected void AuthenticateAndAuthorizeRequest(HttpMessage message, TokenRequest message.Request.Headers.SetValue(HttpHeader.Names.Authorization, headerValue); } - private class AccessTokenCache + internal class AccessTokenCache { private readonly object _syncObj = new object(); private readonly TokenCredential _credential; @@ -181,7 +181,7 @@ private class AccessTokenCache private readonly TimeSpan _tokenRefreshRetryDelay; // must be updated under lock (_syncObj) - private TokenRequestState? _state; + internal TokenRequestState? _state; public AccessTokenCache(TokenCredential credential, TimeSpan tokenRefreshOffset, TimeSpan tokenRefreshRetryDelay) { @@ -204,7 +204,7 @@ public async ValueTask GetAuthHeaderValueAsync(HttpMessage message, Toke { if (localState.BackgroundTokenUpdateTcs != null) { - headerValueInfo = await localState.GetCurrentHeaderValue(async).ConfigureAwait(false); + headerValueInfo = await localState.GetCurrentHeaderValue(async, false, message.CancellationToken).ConfigureAwait(false); _ = Task.Run(() => GetHeaderValueFromCredentialInBackgroundAsync(localState.BackgroundTokenUpdateTcs, headerValueInfo, context, async)); return headerValueInfo.HeaderValue; } @@ -355,7 +355,7 @@ private async ValueTask SetResultOnTcsFromCredentialAsync(TokenRequestContext co targetTcs.SetResult(new AuthHeaderValueInfo("Bearer " + token.Token, token.ExpiresOn, token.RefreshOn.HasValue ? token.RefreshOn.Value : token.ExpiresOn - _tokenRefreshOffset)); } - private readonly struct AuthHeaderValueInfo + internal readonly struct AuthHeaderValueInfo { public string HeaderValue { get; } public DateTimeOffset ExpiresOn { get; } @@ -369,7 +369,7 @@ public AuthHeaderValueInfo(string headerValue, DateTimeOffset expiresOn, DateTim } } - private class TokenRequestState + internal class TokenRequestState { public TokenRequestContext CurrentContext { get; } public TaskCompletionSource CurrentTokenTcs { get; } @@ -409,7 +409,7 @@ public TokenRequestState WithBackgroundUpdateTcsAsCurrent() => new TokenRequestState(CurrentContext, BackgroundTokenUpdateTcs!, default); public TokenRequestState WithNewCurrentTokenTcs() => - new TokenRequestState(CurrentContext, new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously), BackgroundTokenUpdateTcs); + new TokenRequestState(CurrentContext, new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously), default); public TokenRequestState WithNewBackroundUpdateTokenTcs() => new TokenRequestState(CurrentContext, CurrentTokenTcs, new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously)); diff --git a/sdk/core/Azure.Core/tests/BearerTokenAuthenticationPolicyTests.cs b/sdk/core/Azure.Core/tests/BearerTokenAuthenticationPolicyTests.cs index 92a1b2d907f8f..9d079b6c87234 100644 --- a/sdk/core/Azure.Core/tests/BearerTokenAuthenticationPolicyTests.cs +++ b/sdk/core/Azure.Core/tests/BearerTokenAuthenticationPolicyTests.cs @@ -888,6 +888,58 @@ public async Task BearerTokenAuthenticationPolicy_SwitchedTenants() Assert.AreEqual(3, callCount); } + [Test] + public async Task TokenCacheCurrentTcsTOkenIsExpiredAndBackgroundTcsInitialized() + { + var currentTcs = new TaskCompletionSource(); + var backgroundTcs = new TaskCompletionSource(); + + currentTcs.SetResult(new BearerTokenAuthenticationPolicy.AccessTokenCache.AuthHeaderValueInfo("token", DateTimeOffset.UtcNow.AddMinutes(-5), DateTimeOffset.UtcNow.AddMinutes(-5))); + + TokenRequestContext ctx = new TokenRequestContext(new[] { "scope" }); + var cache = new BearerTokenAuthenticationPolicy.AccessTokenCache( + new TokenCredentialStub((r, c) => new AccessToken(string.Empty, DateTimeOffset.MaxValue), IsAsync), + TimeSpan.FromMinutes(5), TimeSpan.FromSeconds(30)) + { + _state = new BearerTokenAuthenticationPolicy.AccessTokenCache.TokenRequestState( + ctx, + currentTcs, + backgroundTcs + ) + }; + var msg = new HttpMessage(new MockRequest(), ResponseClassifier.Shared); + var cts = new CancellationTokenSource(); + cts.CancelAfter(5000); + msg.CancellationToken = cts.Token; + await cache.GetAuthHeaderValueAsync(msg, ctx, IsAsync); + } + + [Test] + public async Task TokenCacheCurrentTcsIsCancelledAndBackgroundTcsInitialized() + { + var currentTcs = new TaskCompletionSource(); + var backgroundTcs = new TaskCompletionSource(); + + currentTcs.SetCanceled(); + + TokenRequestContext ctx = new TokenRequestContext(new[] { "scope" }); + var cache = new BearerTokenAuthenticationPolicy.AccessTokenCache( + new TokenCredentialStub((r, c) => new AccessToken(string.Empty, DateTimeOffset.MaxValue), IsAsync), + TimeSpan.FromMinutes(5), TimeSpan.FromSeconds(30)) + { + _state = new BearerTokenAuthenticationPolicy.AccessTokenCache.TokenRequestState( + ctx, + currentTcs, + backgroundTcs + ) + }; + var msg = new HttpMessage(new MockRequest(), ResponseClassifier.Shared); + var cts = new CancellationTokenSource(); + cts.CancelAfter(5000); + msg.CancellationToken = cts.Token; + await cache.GetAuthHeaderValueAsync(msg, ctx, IsAsync); + } + private class ChallengeBasedAuthenticationTestPolicy : BearerTokenAuthenticationPolicy { public string TenantId { get; private set; } From 5e049bca69149e1bcc009588f04935ed48958c01 Mon Sep 17 00:00:00 2001 From: Ben Broderick Phillips Date: Mon, 8 Jul 2024 13:37:08 -0400 Subject: [PATCH 031/144] Skip project reference tests for openai (#44896) --- sdk/openai/ci.yml | 3 +++ sdk/openai/tests.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/sdk/openai/ci.yml b/sdk/openai/ci.yml index 3b387f0fce557..62e6f4b87040d 100644 --- a/sdk/openai/ci.yml +++ b/sdk/openai/ci.yml @@ -31,6 +31,9 @@ extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: ServiceDirectory: openai + # Skip project reference tests + MatrixFilters: + - AdditionalTestArguments=^(?!.*UseProjectReferenceToAzureClients=true) ArtifactName: packages Artifacts: - name: Azure.AI.OpenAI diff --git a/sdk/openai/tests.yml b/sdk/openai/tests.yml index 870ac62c02986..7bc53e7518932 100644 --- a/sdk/openai/tests.yml +++ b/sdk/openai/tests.yml @@ -5,3 +5,6 @@ extends: parameters: ServiceDirectory: openai SupportedClouds: 'Public' + # Skip project reference tests + MatrixFilters: + - AdditionalTestArguments=^(?!.*UseProjectReferenceToAzureClients=true) From 45cd14757f67585024f92c32c6a8075d105e9002 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Mon, 8 Jul 2024 13:40:13 -0400 Subject: [PATCH 032/144] Update GitHubEventProcessor version to 1.0.0-dev.20240708.1 (#44898) Co-authored-by: James Suplizio --- .github/workflows/event-processor.yml | 4 ++-- .github/workflows/scheduled-event-processor.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/event-processor.yml b/.github/workflows/event-processor.yml index 8bb1d3a1bd520..06092e395ad8c 100644 --- a/.github/workflows/event-processor.yml +++ b/.github/workflows/event-processor.yml @@ -58,7 +58,7 @@ jobs: run: > dotnet tool install Azure.Sdk.Tools.GitHubEventProcessor - --version 1.0.0-dev.20240610.2 + --version 1.0.0-dev.20240708.1 --add-source https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json --global shell: bash @@ -114,7 +114,7 @@ jobs: run: > dotnet tool install Azure.Sdk.Tools.GitHubEventProcessor - --version 1.0.0-dev.20240610.2 + --version 1.0.0-dev.20240708.1 --add-source https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json --global shell: bash diff --git a/.github/workflows/scheduled-event-processor.yml b/.github/workflows/scheduled-event-processor.yml index db36be4e561d9..a20efcfcb9eb4 100644 --- a/.github/workflows/scheduled-event-processor.yml +++ b/.github/workflows/scheduled-event-processor.yml @@ -39,7 +39,7 @@ jobs: run: > dotnet tool install Azure.Sdk.Tools.GitHubEventProcessor - --version 1.0.0-dev.20240610.2 + --version 1.0.0-dev.20240708.1 --add-source https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json --global shell: bash From cf6bc9ec83395b8ff207811086271d7f1cd3af88 Mon Sep 17 00:00:00 2001 From: James Suplizio Date: Mon, 8 Jul 2024 12:25:50 -0700 Subject: [PATCH 033/144] Make @Azure/azure-sdk-eng the owner of .github/workflows (#44900) --- .github/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index a124b2e554c63..2a6b77608619d 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1005,6 +1005,7 @@ /eng/ @hallipr @weshaggard @benbp /eng/common/ @Azure/azure-sdk-eng /eng/mgmt/ @ArthurMa1978 @m-nash +/.github/workflows/ @Azure/azure-sdk-eng # Add owners for notifications for specific pipelines /eng/pipelines/aggregate-reports.yml @jsquire From 46cca5a3d86b3f2f228221a21cd1455545e11df3 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Mon, 8 Jul 2024 15:58:04 -0400 Subject: [PATCH 034/144] Increment package version after release of Azure.AI.Translation.Document (#44895) --- .../Azure.AI.Translation.Document/CHANGELOG.md | 10 ++++++++++ .../src/Azure.AI.Translation.Document.csproj | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/sdk/translation/Azure.AI.Translation.Document/CHANGELOG.md b/sdk/translation/Azure.AI.Translation.Document/CHANGELOG.md index 631b58dada978..4cb8f1d4f3366 100644 --- a/sdk/translation/Azure.AI.Translation.Document/CHANGELOG.md +++ b/sdk/translation/Azure.AI.Translation.Document/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 2.0.0-beta.3 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 2.0.0-beta.2 (2024-07-05) ### Features Added diff --git a/sdk/translation/Azure.AI.Translation.Document/src/Azure.AI.Translation.Document.csproj b/sdk/translation/Azure.AI.Translation.Document/src/Azure.AI.Translation.Document.csproj index c240c2afb7410..58cdf2ac964a5 100644 --- a/sdk/translation/Azure.AI.Translation.Document/src/Azure.AI.Translation.Document.csproj +++ b/sdk/translation/Azure.AI.Translation.Document/src/Azure.AI.Translation.Document.csproj @@ -3,7 +3,7 @@ Translator is a cloud-based machine translation service and is part of the Azure Cognitive Services family of cognitive APIs used to build intelligent apps. Translator is easy to integrate in your applications, websites, tools, and solutions. It allows you to add multi-language user experiences in 90 languages and dialects. And it can be used on any hardware platform with any operating system for text translation. Microsoft Azure.AI.Translation.Document client library - 2.0.0-beta.2 + 2.0.0-beta.3 Microsoft Azure Document Translation From 698eb623fbdecb8a00cab9489d48330d4cb3077b Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Mon, 8 Jul 2024 17:53:40 -0400 Subject: [PATCH 035/144] Sync eng/common directory with azure-sdk-tools for PR 8558 (#44863) * Support storage network access and worm removal in remove test resources script * Move storage network access script to common resource helpers file * Improve storage container deletion resilience * Plumb through pool variable to live test cleanup template * Add sleep for network rule application --------- Co-authored-by: Ben Broderick Phillips --- .../TestResources/New-TestResources.ps1 | 294 +----------------- .../TestResources/Remove-TestResources.ps1 | 19 ++ .../TestResources/TestResources-Helpers.ps1 | 267 ++++++++++++++++ .../TestResources/remove-test-resources.yml | 10 +- .../scripts/Helpers/Resource-Helpers.ps1 | 232 ++++++++++++-- 5 files changed, 501 insertions(+), 321 deletions(-) create mode 100644 eng/common/TestResources/TestResources-Helpers.ps1 diff --git a/eng/common/TestResources/New-TestResources.ps1 b/eng/common/TestResources/New-TestResources.ps1 index 6ee09ff3b23ec..6ccf55a781c1e 100644 --- a/eng/common/TestResources/New-TestResources.ps1 +++ b/eng/common/TestResources/New-TestResources.ps1 @@ -117,6 +117,8 @@ param ( $NewTestResourcesRemainingArguments ) +. (Join-Path $PSScriptRoot .. scripts Helpers Resource-Helpers.ps1) +. $PSScriptRoot/TestResources-Helpers.ps1 . $PSScriptRoot/SubConfig-Helpers.ps1 if (!$ServicePrincipalAuth) { @@ -131,272 +133,6 @@ if (!$PSBoundParameters.ContainsKey('ErrorAction')) { $ErrorActionPreference = 'Stop' } -function Log($Message) -{ - Write-Host ('{0} - {1}' -f [DateTime]::Now.ToLongTimeString(), $Message) -} - -# vso commands are specially formatted log lines that are parsed by Azure Pipelines -# to perform additional actions, most commonly marking values as secrets. -# https://docs.microsoft.com/en-us/azure/devops/pipelines/scripts/logging-commands -function LogVsoCommand([string]$message) -{ - if (!$CI -or $SuppressVsoCommands) { - return - } - Write-Host $message -} - -function Retry([scriptblock] $Action, [int] $Attempts = 5) -{ - $attempt = 0 - $sleep = 5 - - while ($attempt -lt $Attempts) { - try { - $attempt++ - return $Action.Invoke() - } catch { - if ($attempt -lt $Attempts) { - $sleep *= 2 - - Write-Warning "Attempt $attempt failed: $_. Trying again in $sleep seconds..." - Start-Sleep -Seconds $sleep - } else { - throw - } - } - } -} - -# NewServicePrincipalWrapper creates an object from an AAD graph or Microsoft Graph service principal object type. -# This is necessary to work around breaking changes introduced in Az version 7.0.0: -# https://azure.microsoft.com/en-us/updates/update-your-apps-to-use-microsoft-graph-before-30-june-2022/ -function NewServicePrincipalWrapper([string]$subscription, [string]$resourceGroup, [string]$displayName) -{ - if ((Get-Module Az.Resources).Version -eq "5.3.0") { - # https://github.com/Azure/azure-powershell/issues/17040 - # New-AzAdServicePrincipal calls will fail with: - # "You cannot call a method on a null-valued expression." - Write-Warning "Az.Resources version 5.3.0 is not supported. Please update to >= 5.3.1" - Write-Warning "Update-Module Az.Resources -RequiredVersion 5.3.1" - exit 1 - } - - try { - $servicePrincipal = Retry { - New-AzADServicePrincipal -Role "Owner" -Scope "/subscriptions/$SubscriptionId/resourceGroups/$ResourceGroupName" -DisplayName $displayName - } - } catch { - # The underlying error "The directory object quota limit for the Principal has been exceeded" gets overwritten by the module trying - # to call New-AzADApplication with a null object instead of stopping execution, which makes this case hard to diagnose because it prints the following: - # "Cannot bind argument to parameter 'ObjectId' because it is an empty string." - # Provide a more helpful diagnostic prompt to the user if appropriate: - $totalApps = (Get-AzADApplication -OwnedApplication).Length - $msg = "App Registrations owned by you total $totalApps and may exceed the max quota (likely around 135)." + ` - "`nTry removing some at https://ms.portal.azure.com/#view/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/~/RegisteredApps" + ` - " or by running the following command to remove apps created by this script:" + ` - "`n Get-AzADApplication -DisplayNameStartsWith '$baseName' | Remove-AzADApplication" + ` - "`nNOTE: You may need to wait for the quota number to be updated after removing unused applications." - Write-Warning $msg - throw - } - - $spPassword = "" - $appId = "" - if (Get-Member -Name "Secret" -InputObject $servicePrincipal -MemberType property) { - Write-Verbose "Using legacy PSADServicePrincipal object type from AAD graph API" - # Secret property exists on PSADServicePrincipal type from AAD graph in Az # module versions < 7.0.0 - $spPassword = $servicePrincipal.Secret - $appId = $servicePrincipal.ApplicationId - } else { - if ((Get-Module Az.Resources).Version -eq "5.1.0") { - Write-Verbose "Creating password and credential for service principal via MS Graph API" - Write-Warning "Please update Az.Resources to >= 5.2.0 by running 'Update-Module Az'" - # Microsoft graph objects (Az.Resources version == 5.1.0) do not provision a secret on creation so it must be added separately. - # Submitting a password credential object without specifying a password will result in one being generated on the server side. - $password = New-Object -TypeName "Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.MicrosoftGraphPasswordCredential" - $password.DisplayName = "Password for $displayName" - $credential = Retry { New-AzADSpCredential -PasswordCredentials $password -ServicePrincipalObject $servicePrincipal -ErrorAction 'Stop' } - $spPassword = ConvertTo-SecureString $credential.SecretText -AsPlainText -Force - $appId = $servicePrincipal.AppId - } else { - Write-Verbose "Creating service principal credential via MS Graph API" - # In 5.2.0 the password credential issue was fixed (see https://github.com/Azure/azure-powershell/pull/16690) but the - # parameter set was changed making the above call fail due to a missing ServicePrincipalId parameter. - $credential = Retry { $servicePrincipal | New-AzADSpCredential -ErrorAction 'Stop' } - $spPassword = ConvertTo-SecureString $credential.SecretText -AsPlainText -Force - $appId = $servicePrincipal.AppId - } - } - - return @{ - AppId = $appId - ApplicationId = $appId - # This is the ObjectId/OID but most return objects use .Id so keep it consistent to prevent confusion - Id = $servicePrincipal.Id - DisplayName = $servicePrincipal.DisplayName - Secret = $spPassword - } -} - -function LoadCloudConfig([string] $env) -{ - $configPath = "$PSScriptRoot/clouds/$env.json" - if (!(Test-Path $configPath)) { - Write-Warning "Could not find cloud configuration for environment '$env'" - return @{} - } - - $config = Get-Content $configPath | ConvertFrom-Json -AsHashtable - return $config -} - -function MergeHashes([hashtable] $source, [psvariable] $dest) -{ - foreach ($key in $source.Keys) { - if ($dest.Value.Contains($key) -and $dest.Value[$key] -ne $source[$key]) { - Write-Warning ("Overwriting '$($dest.Name).$($key)' with value '$($dest.Value[$key])' " + - "to new value '$($source[$key])'") - } - $dest.Value[$key] = $source[$key] - } -} - -function BuildBicepFile([System.IO.FileSystemInfo] $file) -{ - if (!(Get-Command bicep -ErrorAction Ignore)) { - Write-Error "A bicep file was found at '$($file.FullName)' but the Azure Bicep CLI is not installed. See aka.ms/bicep-install" - throw - } - - $tmp = $env:TEMP ? $env:TEMP : [System.IO.Path]::GetTempPath() - $templateFilePath = Join-Path $tmp "$ResourceType-resources.$(New-Guid).compiled.json" - - # Az can deploy bicep files natively, but by compiling here it becomes easier to parse the - # outputted json for mismatched parameter declarations. - bicep build $file.FullName --outfile $templateFilePath - if ($LASTEXITCODE) { - Write-Error "Failure building bicep file '$($file.FullName)'" - throw - } - - return $templateFilePath -} - -function BuildDeploymentOutputs([string]$serviceName, [object]$azContext, [object]$deployment, [hashtable]$environmentVariables) { - $serviceDirectoryPrefix = BuildServiceDirectoryPrefix $serviceName - # Add default values - $deploymentOutputs = [Ordered]@{ - "${serviceDirectoryPrefix}SUBSCRIPTION_ID" = $azContext.Subscription.Id; - "${serviceDirectoryPrefix}RESOURCE_GROUP" = $resourceGroup.ResourceGroupName; - "${serviceDirectoryPrefix}LOCATION" = $resourceGroup.Location; - "${serviceDirectoryPrefix}ENVIRONMENT" = $azContext.Environment.Name; - "${serviceDirectoryPrefix}AZURE_AUTHORITY_HOST" = $azContext.Environment.ActiveDirectoryAuthority; - "${serviceDirectoryPrefix}RESOURCE_MANAGER_URL" = $azContext.Environment.ResourceManagerUrl; - "${serviceDirectoryPrefix}SERVICE_MANAGEMENT_URL" = $azContext.Environment.ServiceManagementUrl; - "AZURE_SERVICE_DIRECTORY" = $serviceName.ToUpperInvariant(); - } - - if ($ServicePrincipalAuth) { - $deploymentOutputs["${serviceDirectoryPrefix}CLIENT_ID"] = $TestApplicationId; - $deploymentOutputs["${serviceDirectoryPrefix}CLIENT_SECRET"] = $TestApplicationSecret; - $deploymentOutputs["${serviceDirectoryPrefix}TENANT_ID"] = $azContext.Tenant.Id; - } - - MergeHashes $environmentVariables $(Get-Variable deploymentOutputs) - - foreach ($key in $deployment.Outputs.Keys) { - $variable = $deployment.Outputs[$key] - - # Work around bug that makes the first few characters of environment variables be lowercase. - $key = $key.ToUpperInvariant() - - if ($variable.Type -eq 'String' -or $variable.Type -eq 'SecureString') { - $deploymentOutputs[$key] = $variable.Value - } - } - - # Force capitalization of all keys to avoid Azure Pipelines confusion with - # variable auto-capitalization and OS env var capitalization differences - $capitalized = @{} - foreach ($item in $deploymentOutputs.GetEnumerator()) { - $capitalized[$item.Name.ToUpperInvariant()] = $item.Value - } - - return $capitalized -} - -function SetDeploymentOutputs( - [string]$serviceName, - [object]$azContext, - [object]$deployment, - [object]$templateFile, - [hashtable]$environmentVariables = @{} -) { - $deploymentEnvironmentVariables = $environmentVariables.Clone() - $deploymentOutputs = BuildDeploymentOutputs $serviceName $azContext $deployment $deploymentEnvironmentVariables - - if ($OutFile) { - if (!$IsWindows) { - Write-Host 'File option is supported only on Windows' - } - - $outputFile = "$($templateFile.originalFilePath).env" - - $environmentText = $deploymentOutputs | ConvertTo-Json; - $bytes = [System.Text.Encoding]::UTF8.GetBytes($environmentText) - $protectedBytes = [Security.Cryptography.ProtectedData]::Protect($bytes, $null, [Security.Cryptography.DataProtectionScope]::CurrentUser) - - Set-Content $outputFile -Value $protectedBytes -AsByteStream -Force - - Write-Host "Test environment settings`n $environmentText`nstored into encrypted $outputFile" - } else { - if (!$CI) { - # Write an extra new line to isolate the environment variables for easy reading. - Log "Persist the following environment variables based on your detected shell ($shell):`n" - } - - # Write overwrite warnings first, since local execution prints a runnable command to export variables - foreach ($key in $deploymentOutputs.Keys) { - if ([Environment]::GetEnvironmentVariable($key)) { - Write-Warning "Deployment outputs will overwrite pre-existing environment variable '$key'" - } - } - - # Marking values as secret by allowed keys below is not sufficient, as there may be outputs set in the ARM/bicep - # file that re-mark those values as secret (since all user-provided deployment outputs are treated as secret by default). - # This variable supports a second check on not marking previously allowed keys/values as secret. - $notSecretValues = @() - foreach ($key in $deploymentOutputs.Keys) { - $value = $deploymentOutputs[$key] - $deploymentEnvironmentVariables[$key] = $value - - if ($CI) { - if (ShouldMarkValueAsSecret $serviceName $key $value $notSecretValues) { - # Treat all ARM template output variables as secrets since "SecureString" variables do not set values. - # In order to mask secrets but set environment variables for any given ARM template, we set variables twice as shown below. - LogVsoCommand "##vso[task.setvariable variable=_$key;issecret=true;]$value" - Write-Host "Setting variable as secret '$key'" - } else { - Write-Host "Setting variable '$key': $value" - $notSecretValues += $value - } - LogVsoCommand "##vso[task.setvariable variable=$key;]$value" - } else { - Write-Host ($shellExportFormat -f $key, $value) - } - } - - if ($key) { - # Isolate the environment variables for easy reading. - Write-Host "`n" - $key = $null - } - } - - return $deploymentEnvironmentVariables, $deploymentOutputs -} # Support actions to invoke on exit. $exitActions = @({ @@ -843,31 +579,7 @@ try { -templateFile $templateFile ` -environmentVariables $EnvironmentVariables - $storageAccounts = Retry { Get-AzResource -ResourceGroupName $ResourceGroupName -ResourceType "Microsoft.Storage/storageAccounts" } - # Add client IP to storage account when running as local user. Pipeline's have their own vnet with access - if ($storageAccounts) { - foreach ($account in $storageAccounts) { - $rules = Get-AzStorageAccountNetworkRuleSet -ResourceGroupName $ResourceGroupName -AccountName $account.Name - if ($rules -and $rules.DefaultAction -eq "Allow") { - Write-Host "Restricting network rules in storage account '$($account.Name)' to deny access by default" - Retry { Update-AzStorageAccountNetworkRuleSet -ResourceGroupName $ResourceGroupName -Name $account.Name -DefaultAction Deny } - if ($CI -and $env:PoolSubnet) { - Write-Host "Enabling access to '$($account.Name)' from pipeline subnet $($env:PoolSubnet)" - Retry { Add-AzStorageAccountNetworkRule -ResourceGroupName $ResourceGroupName -Name $account.Name -VirtualNetworkResourceId $env:PoolSubnet } - } elseif ($AllowIpRanges) { - Write-Host "Enabling access to '$($account.Name)' to $($AllowIpRanges.Length) IP ranges" - $ipRanges = $AllowIpRanges | ForEach-Object { - @{ Action = 'allow'; IPAddressOrRange = $_ } - } - Retry { Update-AzStorageAccountNetworkRuleSet -ResourceGroupName $ResourceGroupName -Name $account.Name -IPRule $ipRanges | Out-Null } - } elseif (!$CI) { - Write-Host "Enabling access to '$($account.Name)' from client IP" - $clientIp ??= Retry { Invoke-RestMethod -Uri 'https://icanhazip.com/' } # cloudflare owned ip site - Retry { Add-AzStorageAccountNetworkRule -ResourceGroupName $ResourceGroupName -Name $account.Name -IPAddressOrRange $clientIp | Out-Null } - } - } - } - } + SetResourceNetworkAccessRules -ResourceGroupName $ResourceGroupName -AllowIpRanges $AllowIpRanges -CI:$CI $postDeploymentScript = $templateFile.originalFilePath | Split-Path | Join-Path -ChildPath "$ResourceType-resources-post.ps1" if (Test-Path $postDeploymentScript) { diff --git a/eng/common/TestResources/Remove-TestResources.ps1 b/eng/common/TestResources/Remove-TestResources.ps1 index 490b41b8ebe9b..08ca9d8f5a54d 100644 --- a/eng/common/TestResources/Remove-TestResources.ps1 +++ b/eng/common/TestResources/Remove-TestResources.ps1 @@ -61,6 +61,19 @@ param ( [Parameter()] [switch] $ServicePrincipalAuth, + # List of CIDR ranges to add to specific resource firewalls, e.g. @(10.100.0.0/16, 10.200.0.0/16) + [Parameter()] + [ValidateCount(0,399)] + [Validatescript({ + foreach ($range in $PSItem) { + if ($range -like '*/31' -or $range -like '*/32') { + throw "Firewall IP Ranges cannot contain a /31 or /32 CIDR" + } + } + return $true + })] + [array] $AllowIpRanges = @(), + [Parameter()] [switch] $Force, @@ -69,6 +82,9 @@ param ( $RemoveTestResourcesRemainingArguments ) +. (Join-Path $PSScriptRoot .. scripts Helpers Resource-Helpers.ps1) +. (Join-Path $PSScriptRoot TestResources-Helpers.ps1) + # By default stop for any error. if (!$PSBoundParameters.ContainsKey('ErrorAction')) { $ErrorActionPreference = 'Stop' @@ -241,6 +257,9 @@ $verifyDeleteScript = { # Get any resources that can be purged after the resource group is deleted coerced into a collection even if empty. $purgeableResources = Get-PurgeableGroupResources $ResourceGroupName +SetResourceNetworkAccessRules -ResourceGroupName $ResourceGroupName -AllowIpRanges $AllowIpRanges -Override -CI:$CI +Remove-WormStorageAccounts -GroupPrefix $ResourceGroupName -CI:$CI + Log "Deleting resource group '$ResourceGroupName'" if ($Force -and !$purgeableResources) { Remove-AzResourceGroup -Name "$ResourceGroupName" -Force:$Force -AsJob diff --git a/eng/common/TestResources/TestResources-Helpers.ps1 b/eng/common/TestResources/TestResources-Helpers.ps1 new file mode 100644 index 0000000000000..6dee017aec9a7 --- /dev/null +++ b/eng/common/TestResources/TestResources-Helpers.ps1 @@ -0,0 +1,267 @@ +function Log($Message) { + Write-Host ('{0} - {1}' -f [DateTime]::Now.ToLongTimeString(), $Message) +} + +# vso commands are specially formatted log lines that are parsed by Azure Pipelines +# to perform additional actions, most commonly marking values as secrets. +# https://docs.microsoft.com/en-us/azure/devops/pipelines/scripts/logging-commands +function LogVsoCommand([string]$message) { + if (!$CI -or $SuppressVsoCommands) { + return + } + Write-Host $message +} + +function Retry([scriptblock] $Action, [int] $Attempts = 5) { + $attempt = 0 + $sleep = 5 + + while ($attempt -lt $Attempts) { + try { + $attempt++ + return $Action.Invoke() + } + catch { + if ($attempt -lt $Attempts) { + $sleep *= 2 + + Write-Warning "Attempt $attempt failed: $_. Trying again in $sleep seconds..." + Start-Sleep -Seconds $sleep + } + else { + throw + } + } + } +} + +# NewServicePrincipalWrapper creates an object from an AAD graph or Microsoft Graph service principal object type. +# This is necessary to work around breaking changes introduced in Az version 7.0.0: +# https://azure.microsoft.com/en-us/updates/update-your-apps-to-use-microsoft-graph-before-30-june-2022/ +function NewServicePrincipalWrapper([string]$subscription, [string]$resourceGroup, [string]$displayName) { + if ((Get-Module Az.Resources).Version -eq "5.3.0") { + # https://github.com/Azure/azure-powershell/issues/17040 + # New-AzAdServicePrincipal calls will fail with: + # "You cannot call a method on a null-valued expression." + Write-Warning "Az.Resources version 5.3.0 is not supported. Please update to >= 5.3.1" + Write-Warning "Update-Module Az.Resources -RequiredVersion 5.3.1" + exit 1 + } + + try { + $servicePrincipal = Retry { + New-AzADServicePrincipal -Role "Owner" -Scope "/subscriptions/$SubscriptionId/resourceGroups/$ResourceGroupName" -DisplayName $displayName + } + } + catch { + # The underlying error "The directory object quota limit for the Principal has been exceeded" gets overwritten by the module trying + # to call New-AzADApplication with a null object instead of stopping execution, which makes this case hard to diagnose because it prints the following: + # "Cannot bind argument to parameter 'ObjectId' because it is an empty string." + # Provide a more helpful diagnostic prompt to the user if appropriate: + $totalApps = (Get-AzADApplication -OwnedApplication).Length + $msg = "App Registrations owned by you total $totalApps and may exceed the max quota (likely around 135)." + ` + "`nTry removing some at https://ms.portal.azure.com/#view/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/~/RegisteredApps" + ` + " or by running the following command to remove apps created by this script:" + ` + "`n Get-AzADApplication -DisplayNameStartsWith '$baseName' | Remove-AzADApplication" + ` + "`nNOTE: You may need to wait for the quota number to be updated after removing unused applications." + Write-Warning $msg + throw + } + + $spPassword = "" + $appId = "" + if (Get-Member -Name "Secret" -InputObject $servicePrincipal -MemberType property) { + Write-Verbose "Using legacy PSADServicePrincipal object type from AAD graph API" + # Secret property exists on PSADServicePrincipal type from AAD graph in Az # module versions < 7.0.0 + $spPassword = $servicePrincipal.Secret + $appId = $servicePrincipal.ApplicationId + } + else { + if ((Get-Module Az.Resources).Version -eq "5.1.0") { + Write-Verbose "Creating password and credential for service principal via MS Graph API" + Write-Warning "Please update Az.Resources to >= 5.2.0 by running 'Update-Module Az'" + # Microsoft graph objects (Az.Resources version == 5.1.0) do not provision a secret on creation so it must be added separately. + # Submitting a password credential object without specifying a password will result in one being generated on the server side. + $password = New-Object -TypeName "Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.MicrosoftGraphPasswordCredential" + $password.DisplayName = "Password for $displayName" + $credential = Retry { New-AzADSpCredential -PasswordCredentials $password -ServicePrincipalObject $servicePrincipal -ErrorAction 'Stop' } + $spPassword = ConvertTo-SecureString $credential.SecretText -AsPlainText -Force + $appId = $servicePrincipal.AppId + } + else { + Write-Verbose "Creating service principal credential via MS Graph API" + # In 5.2.0 the password credential issue was fixed (see https://github.com/Azure/azure-powershell/pull/16690) but the + # parameter set was changed making the above call fail due to a missing ServicePrincipalId parameter. + $credential = Retry { $servicePrincipal | New-AzADSpCredential -ErrorAction 'Stop' } + $spPassword = ConvertTo-SecureString $credential.SecretText -AsPlainText -Force + $appId = $servicePrincipal.AppId + } + } + + return @{ + AppId = $appId + ApplicationId = $appId + # This is the ObjectId/OID but most return objects use .Id so keep it consistent to prevent confusion + Id = $servicePrincipal.Id + DisplayName = $servicePrincipal.DisplayName + Secret = $spPassword + } +} + +function LoadCloudConfig([string] $env) { + $configPath = "$PSScriptRoot/clouds/$env.json" + if (!(Test-Path $configPath)) { + Write-Warning "Could not find cloud configuration for environment '$env'" + return @{} + } + + $config = Get-Content $configPath | ConvertFrom-Json -AsHashtable + return $config +} + +function MergeHashes([hashtable] $source, [psvariable] $dest) { + foreach ($key in $source.Keys) { + if ($dest.Value.Contains($key) -and $dest.Value[$key] -ne $source[$key]) { + Write-Warning ("Overwriting '$($dest.Name).$($key)' with value '$($dest.Value[$key])' " + + "to new value '$($source[$key])'") + } + $dest.Value[$key] = $source[$key] + } +} + +function BuildBicepFile([System.IO.FileSystemInfo] $file) { + if (!(Get-Command bicep -ErrorAction Ignore)) { + Write-Error "A bicep file was found at '$($file.FullName)' but the Azure Bicep CLI is not installed. See aka.ms/bicep-install" + throw + } + + $tmp = $env:TEMP ? $env:TEMP : [System.IO.Path]::GetTempPath() + $templateFilePath = Join-Path $tmp "$ResourceType-resources.$(New-Guid).compiled.json" + + # Az can deploy bicep files natively, but by compiling here it becomes easier to parse the + # outputted json for mismatched parameter declarations. + bicep build $file.FullName --outfile $templateFilePath + if ($LASTEXITCODE) { + Write-Error "Failure building bicep file '$($file.FullName)'" + throw + } + + return $templateFilePath +} + +function BuildDeploymentOutputs([string]$serviceName, [object]$azContext, [object]$deployment, [hashtable]$environmentVariables) { + $serviceDirectoryPrefix = BuildServiceDirectoryPrefix $serviceName + # Add default values + $deploymentOutputs = [Ordered]@{ + "${serviceDirectoryPrefix}SUBSCRIPTION_ID" = $azContext.Subscription.Id; + "${serviceDirectoryPrefix}RESOURCE_GROUP" = $resourceGroup.ResourceGroupName; + "${serviceDirectoryPrefix}LOCATION" = $resourceGroup.Location; + "${serviceDirectoryPrefix}ENVIRONMENT" = $azContext.Environment.Name; + "${serviceDirectoryPrefix}AZURE_AUTHORITY_HOST" = $azContext.Environment.ActiveDirectoryAuthority; + "${serviceDirectoryPrefix}RESOURCE_MANAGER_URL" = $azContext.Environment.ResourceManagerUrl; + "${serviceDirectoryPrefix}SERVICE_MANAGEMENT_URL" = $azContext.Environment.ServiceManagementUrl; + "AZURE_SERVICE_DIRECTORY" = $serviceName.ToUpperInvariant(); + } + + if ($ServicePrincipalAuth) { + $deploymentOutputs["${serviceDirectoryPrefix}CLIENT_ID"] = $TestApplicationId; + $deploymentOutputs["${serviceDirectoryPrefix}CLIENT_SECRET"] = $TestApplicationSecret; + $deploymentOutputs["${serviceDirectoryPrefix}TENANT_ID"] = $azContext.Tenant.Id; + } + + MergeHashes $environmentVariables $(Get-Variable deploymentOutputs) + + foreach ($key in $deployment.Outputs.Keys) { + $variable = $deployment.Outputs[$key] + + # Work around bug that makes the first few characters of environment variables be lowercase. + $key = $key.ToUpperInvariant() + + if ($variable.Type -eq 'String' -or $variable.Type -eq 'SecureString') { + $deploymentOutputs[$key] = $variable.Value + } + } + + # Force capitalization of all keys to avoid Azure Pipelines confusion with + # variable auto-capitalization and OS env var capitalization differences + $capitalized = @{} + foreach ($item in $deploymentOutputs.GetEnumerator()) { + $capitalized[$item.Name.ToUpperInvariant()] = $item.Value + } + + return $capitalized +} + +function SetDeploymentOutputs( + [string]$serviceName, + [object]$azContext, + [object]$deployment, + [object]$templateFile, + [hashtable]$environmentVariables = @{} +) { + $deploymentEnvironmentVariables = $environmentVariables.Clone() + $deploymentOutputs = BuildDeploymentOutputs $serviceName $azContext $deployment $deploymentEnvironmentVariables + + if ($OutFile) { + if (!$IsWindows) { + Write-Host 'File option is supported only on Windows' + } + + $outputFile = "$($templateFile.originalFilePath).env" + + $environmentText = $deploymentOutputs | ConvertTo-Json; + $bytes = [System.Text.Encoding]::UTF8.GetBytes($environmentText) + $protectedBytes = [Security.Cryptography.ProtectedData]::Protect($bytes, $null, [Security.Cryptography.DataProtectionScope]::CurrentUser) + + Set-Content $outputFile -Value $protectedBytes -AsByteStream -Force + + Write-Host "Test environment settings`n $environmentText`nstored into encrypted $outputFile" + } + else { + if (!$CI) { + # Write an extra new line to isolate the environment variables for easy reading. + Log "Persist the following environment variables based on your detected shell ($shell):`n" + } + + # Write overwrite warnings first, since local execution prints a runnable command to export variables + foreach ($key in $deploymentOutputs.Keys) { + if ([Environment]::GetEnvironmentVariable($key)) { + Write-Warning "Deployment outputs will overwrite pre-existing environment variable '$key'" + } + } + + # Marking values as secret by allowed keys below is not sufficient, as there may be outputs set in the ARM/bicep + # file that re-mark those values as secret (since all user-provided deployment outputs are treated as secret by default). + # This variable supports a second check on not marking previously allowed keys/values as secret. + $notSecretValues = @() + foreach ($key in $deploymentOutputs.Keys) { + $value = $deploymentOutputs[$key] + $deploymentEnvironmentVariables[$key] = $value + + if ($CI) { + if (ShouldMarkValueAsSecret $serviceName $key $value $notSecretValues) { + # Treat all ARM template output variables as secrets since "SecureString" variables do not set values. + # In order to mask secrets but set environment variables for any given ARM template, we set variables twice as shown below. + LogVsoCommand "##vso[task.setvariable variable=_$key;issecret=true;]$value" + Write-Host "Setting variable as secret '$key'" + } + else { + Write-Host "Setting variable '$key': $value" + $notSecretValues += $value + } + LogVsoCommand "##vso[task.setvariable variable=$key;]$value" + } + else { + Write-Host ($shellExportFormat -f $key, $value) + } + } + + if ($key) { + # Isolate the environment variables for easy reading. + Write-Host "`n" + $key = $null + } + } + + return $deploymentEnvironmentVariables, $deploymentOutputs +} diff --git a/eng/common/TestResources/remove-test-resources.yml b/eng/common/TestResources/remove-test-resources.yml index b877d72139a20..025e90dd4c297 100644 --- a/eng/common/TestResources/remove-test-resources.yml +++ b/eng/common/TestResources/remove-test-resources.yml @@ -29,7 +29,9 @@ steps: displayName: Remove test resources condition: and(eq(variables['CI_HAS_DEPLOYED_RESOURCES'], 'true'), ne(variables['Skip.RemoveTestResources'], 'true')) continueOnError: true - env: ${{ parameters.EnvVars }} + env: + PoolSubnet: $(PoolSubnet) + ${{ insert }}: ${{ parameters.EnvVars }} inputs: azureSubscription: ${{ parameters.ServiceConnection }} azurePowerShellVersion: LatestVersion @@ -46,6 +48,7 @@ steps: @subscriptionConfiguration ` -ResourceType '${{ parameters.ResourceType }}' ` -ServiceDirectory "${{ parameters.ServiceDirectory }}" ` + -AllowIpRanges ('$(azsdk-corp-net-ip-ranges)' -split ',') ` -CI ` -Force ` -Verbose @@ -63,10 +66,13 @@ steps: -ResourceType '${{ parameters.ResourceType }}' ` -ServiceDirectory "${{ parameters.ServiceDirectory }}" ` -ServicePrincipalAuth ` + -AllowIpRanges ('$(azsdk-corp-net-ip-ranges)' -split ',') ` -CI ` -Force ` -Verbose displayName: Remove test resources condition: and(eq(variables['CI_HAS_DEPLOYED_RESOURCES'], 'true'), ne(variables['Skip.RemoveTestResources'], 'true')) continueOnError: true - env: ${{ parameters.EnvVars }} + env: + PoolSubnet: $(PoolSubnet) + ${{ insert }}: ${{ parameters.EnvVars }} diff --git a/eng/common/scripts/Helpers/Resource-Helpers.ps1 b/eng/common/scripts/Helpers/Resource-Helpers.ps1 index 6c02e9150e24c..938ccfa4b55f8 100644 --- a/eng/common/scripts/Helpers/Resource-Helpers.ps1 +++ b/eng/common/scripts/Helpers/Resource-Helpers.ps1 @@ -4,7 +4,7 @@ function Get-PurgeableGroupResources { param ( - [Parameter(Mandatory=$true, Position=0)] + [Parameter(Mandatory = $true, Position = 0)] [string] $ResourceGroupName ) @@ -27,8 +27,8 @@ function Get-PurgeableGroupResources { # Get any Key Vaults that will be deleted so they can be purged later if soft delete is enabled. $deletedKeyVaults = @(Get-AzKeyVault -ResourceGroupName $ResourceGroupName -ErrorAction Ignore | ForEach-Object { - # Enumerating vaults from a resource group does not return all properties we required. - Get-AzKeyVault -VaultName $_.VaultName -ErrorAction Ignore | Where-Object { $_.EnableSoftDelete } ` + # Enumerating vaults from a resource group does not return all properties we required. + Get-AzKeyVault -VaultName $_.VaultName -ErrorAction Ignore | Where-Object { $_.EnableSoftDelete } ` | Add-Member -MemberType NoteProperty -Name AzsdkResourceType -Value 'Key Vault' -PassThru ` | Add-Member -MemberType AliasProperty -Name AzsdkName -Value VaultName -PassThru }) @@ -56,13 +56,13 @@ function Get-PurgeableResources { $deletedHsms = @() foreach ($r in $content.value) { $deletedHsms += [pscustomobject] @{ - AzsdkResourceType = 'Managed HSM' - AzsdkName = $r.name - Id = $r.id - Name = $r.name - Location = $r.properties.location - DeletionDate = $r.properties.deletionDate -as [DateTime] - ScheduledPurgeDate = $r.properties.scheduledPurgeDate -as [DateTime] + AzsdkResourceType = 'Managed HSM' + AzsdkName = $r.name + Id = $r.id + Name = $r.name + Location = $r.properties.location + DeletionDate = $r.properties.deletionDate -as [DateTime] + ScheduledPurgeDate = $r.properties.scheduledPurgeDate -as [DateTime] EnablePurgeProtection = $r.properties.purgeProtectionEnabled } } @@ -91,7 +91,8 @@ function Get-PurgeableResources { Write-Verbose "Found $($deletedKeyVaults.Count) deleted Key Vaults to potentially purge." $purgeableResources += $deletedKeyVaults } - } catch { } + } + catch { } return $purgeableResources } @@ -100,7 +101,7 @@ function Get-PurgeableResources { # This allows you to pipe a collection and process each item in the collection. filter Remove-PurgeableResources { param ( - [Parameter(Position=0, ValueFromPipeline=$true)] + [Parameter(Position = 0, ValueFromPipeline = $true)] [object[]] $Resource, [Parameter()] @@ -128,7 +129,7 @@ filter Remove-PurgeableResources { # Use `-AsJob` to start a lightweight, cancellable job and pass to `Wait-PurgeableResoruceJob` for consistent behavior. Remove-AzKeyVault -VaultName $r.VaultName -Location $r.Location -InRemovedState -Force -ErrorAction Continue -AsJob ` - | Wait-PurgeableResourceJob -Resource $r -Timeout $Timeout -PassThru:$PassThru + | Wait-PurgeableResourceJob -Resource $r -Timeout $Timeout -PassThru:$PassThru } 'Managed HSM' { @@ -139,18 +140,19 @@ filter Remove-PurgeableResources { # Use `GetNewClosure()` on the `-Action` ScriptBlock to make sure variables are captured. Invoke-AzRestMethod -Method POST -Path "/subscriptions/$subscriptionId/providers/Microsoft.KeyVault/locations/$($r.Location)/deletedManagedHSMs/$($r.Name)/purge?api-version=2023-02-01" -ErrorAction Ignore -AsJob ` - | Wait-PurgeableResourceJob -Resource $r -Timeout $Timeout -PassThru:$PassThru -Action { - param ( $response ) - if ($response.StatusCode -ge 200 -and $response.StatusCode -lt 300) { - Write-Warning "Successfully requested that Managed HSM '$($r.Name)' be purged, but may take a few minutes before it is actually purged." - } elseif ($response.Content) { - $content = $response.Content | ConvertFrom-Json - if ($content.error) { - $err = $content.error - Write-Warning "Failed to deleted Managed HSM '$($r.Name)': ($($err.code)) $($err.message)" - } - } - }.GetNewClosure() + | Wait-PurgeableResourceJob -Resource $r -Timeout $Timeout -PassThru:$PassThru -Action { + param ( $response ) + if ($response.StatusCode -ge 200 -and $response.StatusCode -lt 300) { + Write-Warning "Successfully requested that Managed HSM '$($r.Name)' be purged, but may take a few minutes before it is actually purged." + } + elseif ($response.Content) { + $content = $response.Content | ConvertFrom-Json + if ($content.error) { + $err = $content.error + Write-Warning "Failed to deleted Managed HSM '$($r.Name)': ($($err.code)) $($err.message)" + } + } + }.GetNewClosure() } default { @@ -167,12 +169,12 @@ function Log($Message) { function Wait-PurgeableResourceJob { param ( - [Parameter(Mandatory=$true, ValueFromPipeline=$true)] + [Parameter(Mandatory = $true, ValueFromPipeline = $true)] $Job, # The resource is used for logging and to return if `-PassThru` is specified # so we can easily see all resources that may be in a bad state when the script has completed. - [Parameter(Mandatory=$true)] + [Parameter(Mandatory = $true)] $Resource, # Optional ScriptBlock should define params corresponding to the associated job's `Output` property. @@ -195,7 +197,8 @@ function Wait-PurgeableResourceJob { if ($Action) { $null = $Action.Invoke($result) } - } else { + } + else { Write-Warning "Timed out waiting to purge $($Resource.AzsdkResourceType) '$($Resource.AzsdkName)'. Cancelling job." $Job.Cancel() @@ -204,3 +207,176 @@ function Wait-PurgeableResourceJob { } } } + +# Helper function for removing storage accounts with WORM that sometimes get leaked from live tests not set up to clean +# up their resource policies +function Remove-WormStorageAccounts() { + [CmdletBinding(SupportsShouldProcess = $True)] + param( + [string]$GroupPrefix, + [switch]$CI + ) + + $ErrorActionPreference = 'Stop' + + # Be a little defensive so we don't delete non-live test groups via naming convention + # DO NOT REMOVE THIS + # We call this script from live test pipelines as well, and a string mismatch/error could blow away + # some static storage accounts we rely on + if (!$groupPrefix -or ($CI -and !$GroupPrefix.StartsWith('rg-'))) { + throw "The -GroupPrefix parameter must not be empty, or must start with 'rg-' in CI contexts" + } + + $groups = Get-AzResourceGroup | Where-Object { $_.ResourceGroupName.StartsWith($GroupPrefix) } | Where-Object { $_.ProvisioningState -ne 'Deleting' } + + foreach ($group in $groups) { + Write-Host "=========================================" + $accounts = Get-AzStorageAccount -ResourceGroupName $group.ResourceGroupName + if ($accounts) { + foreach ($account in $accounts) { + if ($WhatIfPreference) { + Write-Host "What if: Removing $($account.StorageAccountName) in $($account.ResourceGroupName)" + } + else { + Write-Host "Removing $($account.StorageAccountName) in $($account.ResourceGroupName)" + } + + $hasContainers = ($account.Kind -ne "FileStorage") + + # If it doesn't have containers then we can skip the explicit clean-up of this storage account + if (!$hasContainers) { continue } + + $ctx = New-AzStorageContext -StorageAccountName $account.StorageAccountName + + $immutableBlobs = $ctx ` + | Get-AzStorageContainer ` + | Where-Object { $_.BlobContainerProperties.HasImmutableStorageWithVersioning } ` + | Get-AzStorageBlob + try { + foreach ($blob in $immutableBlobs) { + Write-Host "Removing legal hold - blob: $($blob.Name), account: $($account.StorageAccountName), group: $($group.ResourceGroupName)" + $blob | Set-AzStorageBlobLegalHold -DisableLegalHold | Out-Null + } + } + catch { + Write-Warning "User must have 'Storage Blob Data Owner' RBAC permission on subscription or resource group" + Write-Error $_ + throw + } + # Sometimes we get a 404 blob not found but can still delete containers, + # and sometimes we must delete the blob if there's a legal hold. + # Try to remove the blob, but keep running regardless. + $succeeded = $false + for ($attempt = 0; $attempt -lt 2; $attempt++) { + if ($succeeded) { + break + } + + try { + Write-Host "Removing immutability policies - account: $($ctx.StorageAccountName), group: $($group.ResourceGroupName)" + $null = $ctx | Get-AzStorageContainer | Get-AzStorageBlob | Remove-AzStorageBlobImmutabilityPolicy + } + catch {} + + try { + $ctx | Get-AzStorageContainer | Get-AzStorageBlob | Remove-AzStorageBlob -Force + $succeeded = $true + } + catch { + Write-Warning "Failed to remove blobs - account: $($ctx.StorageAccountName), group: $($group.ResourceGroupName)" + Write-Warning $_ + } + } + + try { + # Use AzRm cmdlet as deletion will only work through ARM with the immutability policies defined on the blobs + $ctx | Get-AzStorageContainer | ForEach-Object { Remove-AzRmStorageContainer -Name $_.Name -StorageAccountName $ctx.StorageAccountName -ResourceGroupName $group.ResourceGroupName -Force } + } + catch { + Write-Warning "Container removal failed. Ignoring the error and trying to delete the storage account." + Write-Warning $_ + } + Remove-AzStorageAccount -StorageAccountName $account.StorageAccountName -ResourceGroupName $account.ResourceGroupName -Force + } + } + if ($WhatIfPreference) { + Write-Host "What if: Removing resource group $($group.ResourceGroupName)" + } + else { + Remove-AzResourceGroup -ResourceGroupName $group.ResourceGroupName -Force -AsJob + } + } +} + +function SetResourceNetworkAccessRules([string]$ResourceGroupName, [array]$AllowIpRanges, [switch]$CI) { + SetStorageNetworkAccessRules -ResourceGroupName $ResourceGroupName -AllowIpRanges $AllowIpRanges -CI:$CI +} + +function SetStorageNetworkAccessRules([string]$ResourceGroupName, [array]$AllowIpRanges, [switch]$CI, [switch]$Override) { + $clientIp = $null + $storageAccounts = Retry { Get-AzResource -ResourceGroupName $ResourceGroupName -ResourceType "Microsoft.Storage/storageAccounts" } + # Add client IP to storage account when running as local user. Pipeline's have their own vnet with access + if ($storageAccounts) { + $appliedRule = $false + foreach ($account in $storageAccounts) { + $rules = Get-AzStorageAccountNetworkRuleSet -ResourceGroupName $ResourceGroupName -AccountName $account.Name + if ($rules -and ($Override -or $rules.DefaultAction -eq "Allow")) { + Write-Host "Restricting network rules in storage account '$($account.Name)' to deny access by default" + Retry { Update-AzStorageAccountNetworkRuleSet -ResourceGroupName $ResourceGroupName -Name $account.Name -DefaultAction Deny } + if ($CI -and $env:PoolSubnet) { + Write-Host "Enabling access to '$($account.Name)' from pipeline subnet $($env:PoolSubnet)" + Retry { Add-AzStorageAccountNetworkRule -ResourceGroupName $ResourceGroupName -Name $account.Name -VirtualNetworkResourceId $env:PoolSubnet } + $appliedRule = $true + } + elseif ($AllowIpRanges) { + Write-Host "Enabling access to '$($account.Name)' to $($AllowIpRanges.Length) IP ranges" + $ipRanges = $AllowIpRanges | ForEach-Object { + @{ Action = 'allow'; IPAddressOrRange = $_ } + } + Retry { Update-AzStorageAccountNetworkRuleSet -ResourceGroupName $ResourceGroupName -Name $account.Name -IPRule $ipRanges | Out-Null } + $appliedRule = $true + } + elseif (!$CI) { + Write-Host "Enabling access to '$($account.Name)' from client IP" + $clientIp ??= Retry { Invoke-RestMethod -Uri 'https://icanhazip.com/' } # cloudflare owned ip site + $clientIp = $clientIp.Trim() + $ipRanges = Get-AzStorageAccountNetworkRuleSet -ResourceGroupName $ResourceGroupName -Name $account.Name + if ($ipRanges) { + foreach ($range in $ipRanges.IpRules) { + if (DoesSubnetOverlap $range.IPAddressOrRange $clientIp) { + return + } + } + } + Retry { Add-AzStorageAccountNetworkRule -ResourceGroupName $ResourceGroupName -Name $account.Name -IPAddressOrRange $clientIp | Out-Null } + $appliedRule = $true + } + } + } + if ($appliedRule) { + Write-Host "Sleeping for 15 seconds to allow network rules to take effect" + Start-Sleep 15 + } + } +} + +function DoesSubnetOverlap([string]$ipOrCidr, [string]$overlapIp) { + [System.Net.IPAddress]$overlapIpAddress = $overlapIp + $parsed = $ipOrCidr -split '/' + [System.Net.IPAddress]$baseIp = $parsed[0] + if ($parsed.Length -eq 1) { + return $baseIp -eq $overlapIpAddress + } + + $subnet = $parsed[1] + $subnetNum = [int]$subnet + + $baseMask = [math]::pow(2, 31) + $mask = 0 + for ($i = 0; $i -lt $subnetNum; $i++) { + $mask = $mask + $baseMask; + $baseMask = $baseMask / 2 + } + + return $baseIp.Address -eq ($overlapIpAddress.Address -band ([System.Net.IPAddress]$mask).Address) +} From 452d0e1930fdd28eb4763be70eb58f9448a045e3 Mon Sep 17 00:00:00 2001 From: Anne Thompson Date: Mon, 8 Jul 2024 20:25:57 -0700 Subject: [PATCH 036/144] ClientModel: Updates to paging types to support sub-client enumerator pattern (#44825) * Initial checkin of changes to paging APIs * nits * rename ToValueCollection method to GetAllValues * nits * Add back simplified PageToken; otherwise implementations must always deserialize before using * rename to ClientToken for general use with LRO rehydration as well * nits * make ClientToken non-abstract * nits * proposed renames * backup idea; I'm wondering if RequestOptions can always be handled by the closure * remove RequestOptions from signatures * nits * GetPageCore - enable an overload that doesn't take a page token * Change GetPage with no parameters to GetFirstPage * rename ClientToken to ContinuationToken and remove GetFirstPage method * some updates based on feedback from Krzysztof * add Async suffix * move to CurrentPageToken instead of FirstPageToken * simplified page collection * tidy * tidy * implement interface explicitly * reimplement GetAllValues to account for possibility GetCurrentPage was called first * add internal emitted files that generated code will use * Add stubs for mock paging client * flush out client a bit * updates * Backup of mock client WIP * rework/rename and add tests prior to implementation * make first test pass * sync tests all pass * backup sync async test base paging tests idea * separate unit and scenario tests * clean up sync unit tests * add async unit tests * Add GetCurrentPageCore so that GetCurrentPage doesn't advance enumerator * complete sync scenario tests * Add async tests * nits * Add refdocs * address pr feedback on clarifying refdoc comments * update OAI Test csproj to opt out of project reference pipeline * add more ExcludeFromProjectReferenceToConversion * add more ExcludeFromProjectReferenceToConversion * move build variables * temporarily opt-out Azure.Core.TestFramework * revert TestFramework change and do it for Azure.Core instead * try it without OAI csproj mods --- sdk/core/Azure.Core/src/Azure.Core.csproj | 2 + .../api/System.ClientModel.net6.0.cs | 57 ++- .../api/System.ClientModel.netstandard2.0.cs | 57 ++- ...tionOfT.cs => AsyncCollectionResultOfT.cs} | 13 +- .../src/Convenience/AsyncPageCollectionOfT.cs | 75 +++ .../Convenience/AsyncPageableCollectionOfT.cs | 62 --- .../src/Convenience/ClientResult.cs | 2 +- ...ollectionOfT.cs => CollectionResultOfT.cs} | 13 +- .../src/Convenience/ContinuationToken.cs | 56 +++ .../src/Convenience/PageCollectionOfT.cs | 73 +++ .../src/Convenience/PageResultOfT.cs | 69 +++ .../src/Convenience/PageableCollectionOfT.cs | 57 --- .../src/Convenience/ResultPageOfT.cs | 50 -- .../PageCollectionScenarioTests.cs | 472 ++++++++++++++++++ .../tests/Convenience/PageCollectionTests.cs | 199 ++++++++ .../Convenience/PageableCollectionTests.cs | 271 ---------- .../Mocks/MockAsyncPageCollection.cs | 49 ++ .../TestFramework/Mocks/MockPageCollection.cs | 45 ++ .../TestFramework/Mocks/MockPageableClient.cs | 133 ----- .../TestFramework/PageableResultHelpers.cs | 94 ---- .../System.ClientModel.Tests.Client.csproj | 1 + .../PagingClient/Emitted/Argument.cs | 19 + .../Emitted/CancellationTokenExtensions.cs | 18 + .../Emitted/PageCollectionHelpers.cs | 66 +++ .../PagingClient/Emitted/PageEnumerator.cs | 61 +++ .../Emitted/PageResultEnumerator.cs | 76 +++ .../PagingClient/MockData/MockPagingData.cs | 49 ++ .../MockData/MockValueItemPageResponse.cs | 58 +++ .../TestClients/PagingClient/PagingClient.cs | 122 +++++ .../PagingClient/PagingClientOptions.cs | 12 + .../PagingClient/PagingProtocolClient.cs | 55 ++ .../TestClients/PagingClient/ValueItem.cs | 30 ++ .../TestClients/PagingClient/ValueItemPage.cs | 34 ++ .../PagingClient/ValuesPageEnumerator.cs | 134 +++++ .../ValuesPageResultEnumerator.cs | 123 +++++ .../PagingClient/ValuesPageToken.cs | 129 +++++ .../SSE/ClientResultCollectionTests.cs | 12 +- .../TestFramework/Mocks/MockSseClient.cs | 4 +- .../Mocks/MockSseClientExtensions.cs | 4 +- 39 files changed, 2124 insertions(+), 732 deletions(-) rename sdk/core/System.ClientModel/src/Convenience/{AsyncResultCollectionOfT.cs => AsyncCollectionResultOfT.cs} (74%) create mode 100644 sdk/core/System.ClientModel/src/Convenience/AsyncPageCollectionOfT.cs delete mode 100644 sdk/core/System.ClientModel/src/Convenience/AsyncPageableCollectionOfT.cs rename sdk/core/System.ClientModel/src/Convenience/{ResultCollectionOfT.cs => CollectionResultOfT.cs} (74%) create mode 100644 sdk/core/System.ClientModel/src/Convenience/ContinuationToken.cs create mode 100644 sdk/core/System.ClientModel/src/Convenience/PageCollectionOfT.cs create mode 100644 sdk/core/System.ClientModel/src/Convenience/PageResultOfT.cs delete mode 100644 sdk/core/System.ClientModel/src/Convenience/PageableCollectionOfT.cs delete mode 100644 sdk/core/System.ClientModel/src/Convenience/ResultPageOfT.cs create mode 100644 sdk/core/System.ClientModel/tests/Convenience/PageCollectionScenarioTests.cs create mode 100644 sdk/core/System.ClientModel/tests/Convenience/PageCollectionTests.cs delete mode 100644 sdk/core/System.ClientModel/tests/Convenience/PageableCollectionTests.cs create mode 100644 sdk/core/System.ClientModel/tests/TestFramework/Mocks/MockAsyncPageCollection.cs create mode 100644 sdk/core/System.ClientModel/tests/TestFramework/Mocks/MockPageCollection.cs delete mode 100644 sdk/core/System.ClientModel/tests/TestFramework/Mocks/MockPageableClient.cs delete mode 100644 sdk/core/System.ClientModel/tests/TestFramework/PageableResultHelpers.cs create mode 100644 sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/Emitted/Argument.cs create mode 100644 sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/Emitted/CancellationTokenExtensions.cs create mode 100644 sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/Emitted/PageCollectionHelpers.cs create mode 100644 sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/Emitted/PageEnumerator.cs create mode 100644 sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/Emitted/PageResultEnumerator.cs create mode 100644 sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/MockData/MockPagingData.cs create mode 100644 sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/MockData/MockValueItemPageResponse.cs create mode 100644 sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/PagingClient.cs create mode 100644 sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/PagingClientOptions.cs create mode 100644 sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/PagingProtocolClient.cs create mode 100644 sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/ValueItem.cs create mode 100644 sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/ValueItemPage.cs create mode 100644 sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/ValuesPageEnumerator.cs create mode 100644 sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/ValuesPageResultEnumerator.cs create mode 100644 sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/ValuesPageToken.cs diff --git a/sdk/core/Azure.Core/src/Azure.Core.csproj b/sdk/core/Azure.Core/src/Azure.Core.csproj index 678fb1e38bb4d..c64fe1233b111 100644 --- a/sdk/core/Azure.Core/src/Azure.Core.csproj +++ b/sdk/core/Azure.Core/src/Azure.Core.csproj @@ -28,6 +28,8 @@ + + diff --git a/sdk/core/System.ClientModel/api/System.ClientModel.net6.0.cs b/sdk/core/System.ClientModel/api/System.ClientModel.net6.0.cs index 53cdd65eb9a97..d258e5cb4df20 100644 --- a/sdk/core/System.ClientModel/api/System.ClientModel.net6.0.cs +++ b/sdk/core/System.ClientModel/api/System.ClientModel.net6.0.cs @@ -7,17 +7,20 @@ public ApiKeyCredential(string key) { } public static implicit operator System.ClientModel.ApiKeyCredential (string key) { throw null; } public void Update(string key) { } } - public abstract partial class AsyncPageableCollection : System.ClientModel.AsyncResultCollection + public abstract partial class AsyncCollectionResult : System.ClientModel.ClientResult, System.Collections.Generic.IAsyncEnumerable { - protected AsyncPageableCollection() { } - public abstract System.Collections.Generic.IAsyncEnumerable> AsPages(string? continuationToken = null, int? pageSizeHint = default(int?)); - public override System.Collections.Generic.IAsyncEnumerator GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + protected internal AsyncCollectionResult() { } + protected internal AsyncCollectionResult(System.ClientModel.Primitives.PipelineResponse response) { } + public abstract System.Collections.Generic.IAsyncEnumerator GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); } - public abstract partial class AsyncResultCollection : System.ClientModel.ClientResult, System.Collections.Generic.IAsyncEnumerable + public abstract partial class AsyncPageCollection : System.Collections.Generic.IAsyncEnumerable> { - protected internal AsyncResultCollection() { } - protected internal AsyncResultCollection(System.ClientModel.Primitives.PipelineResponse response) { } - public abstract System.Collections.Generic.IAsyncEnumerator GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + protected AsyncPageCollection() { } + public System.Collections.Generic.IAsyncEnumerable GetAllValuesAsync([System.Runtime.CompilerServices.EnumeratorCancellationAttribute] System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + protected abstract System.Collections.Generic.IAsyncEnumerator> GetAsyncEnumeratorCore(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public System.Threading.Tasks.Task> GetCurrentPageAsync() { throw null; } + protected abstract System.Threading.Tasks.Task> GetCurrentPageAsyncCore(); + System.Collections.Generic.IAsyncEnumerator> System.Collections.Generic.IAsyncEnumerable>.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } } public abstract partial class BinaryContent : System.IDisposable { @@ -54,25 +57,37 @@ protected internal ClientResult(T value, System.ClientModel.Primitives.PipelineR public virtual T Value { get { throw null; } } public static implicit operator T (System.ClientModel.ClientResult result) { throw null; } } - public abstract partial class PageableCollection : System.ClientModel.ResultCollection + public abstract partial class CollectionResult : System.ClientModel.ClientResult, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { - protected PageableCollection() { } - public abstract System.Collections.Generic.IEnumerable> AsPages(string? continuationToken = null, int? pageSizeHint = default(int?)); - public override System.Collections.Generic.IEnumerator GetEnumerator() { throw null; } + protected internal CollectionResult() { } + protected internal CollectionResult(System.ClientModel.Primitives.PipelineResponse response) { } + public abstract System.Collections.Generic.IEnumerator GetEnumerator(); + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public abstract partial class ResultCollection : System.ClientModel.ClientResult, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + public partial class ContinuationToken { - protected internal ResultCollection() { } - protected internal ResultCollection(System.ClientModel.Primitives.PipelineResponse response) { } - public abstract System.Collections.Generic.IEnumerator GetEnumerator(); + protected ContinuationToken() { } + protected ContinuationToken(System.BinaryData bytes) { } + public static System.ClientModel.ContinuationToken FromBytes(System.BinaryData bytes) { throw null; } + public virtual System.BinaryData ToBytes() { throw null; } + } + public abstract partial class PageCollection : System.Collections.Generic.IEnumerable>, System.Collections.IEnumerable + { + protected PageCollection() { } + public System.Collections.Generic.IEnumerable GetAllValues() { throw null; } + public System.ClientModel.PageResult GetCurrentPage() { throw null; } + protected abstract System.ClientModel.PageResult GetCurrentPageCore(); + protected abstract System.Collections.Generic.IEnumerator> GetEnumeratorCore(); + System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class ResultPage : System.ClientModel.ResultCollection + public partial class PageResult : System.ClientModel.ClientResult { - internal ResultPage() { } - public string? ContinuationToken { get { throw null; } } - public static System.ClientModel.ResultPage Create(System.Collections.Generic.IEnumerable values, string? continuationToken, System.ClientModel.Primitives.PipelineResponse response) { throw null; } - public override System.Collections.Generic.IEnumerator GetEnumerator() { throw null; } + internal PageResult() { } + public System.ClientModel.ContinuationToken? NextPageToken { get { throw null; } } + public System.ClientModel.ContinuationToken PageToken { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Values { get { throw null; } } + public static System.ClientModel.PageResult Create(System.Collections.Generic.IReadOnlyList values, System.ClientModel.ContinuationToken pageToken, System.ClientModel.ContinuationToken? nextPageToken, System.ClientModel.Primitives.PipelineResponse response) { throw null; } } } namespace System.ClientModel.Primitives diff --git a/sdk/core/System.ClientModel/api/System.ClientModel.netstandard2.0.cs b/sdk/core/System.ClientModel/api/System.ClientModel.netstandard2.0.cs index e43b75c72c1e4..e01150b0c72f9 100644 --- a/sdk/core/System.ClientModel/api/System.ClientModel.netstandard2.0.cs +++ b/sdk/core/System.ClientModel/api/System.ClientModel.netstandard2.0.cs @@ -7,17 +7,20 @@ public ApiKeyCredential(string key) { } public static implicit operator System.ClientModel.ApiKeyCredential (string key) { throw null; } public void Update(string key) { } } - public abstract partial class AsyncPageableCollection : System.ClientModel.AsyncResultCollection + public abstract partial class AsyncCollectionResult : System.ClientModel.ClientResult, System.Collections.Generic.IAsyncEnumerable { - protected AsyncPageableCollection() { } - public abstract System.Collections.Generic.IAsyncEnumerable> AsPages(string? continuationToken = null, int? pageSizeHint = default(int?)); - public override System.Collections.Generic.IAsyncEnumerator GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + protected internal AsyncCollectionResult() { } + protected internal AsyncCollectionResult(System.ClientModel.Primitives.PipelineResponse response) { } + public abstract System.Collections.Generic.IAsyncEnumerator GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); } - public abstract partial class AsyncResultCollection : System.ClientModel.ClientResult, System.Collections.Generic.IAsyncEnumerable + public abstract partial class AsyncPageCollection : System.Collections.Generic.IAsyncEnumerable> { - protected internal AsyncResultCollection() { } - protected internal AsyncResultCollection(System.ClientModel.Primitives.PipelineResponse response) { } - public abstract System.Collections.Generic.IAsyncEnumerator GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + protected AsyncPageCollection() { } + public System.Collections.Generic.IAsyncEnumerable GetAllValuesAsync([System.Runtime.CompilerServices.EnumeratorCancellationAttribute] System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + protected abstract System.Collections.Generic.IAsyncEnumerator> GetAsyncEnumeratorCore(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public System.Threading.Tasks.Task> GetCurrentPageAsync() { throw null; } + protected abstract System.Threading.Tasks.Task> GetCurrentPageAsyncCore(); + System.Collections.Generic.IAsyncEnumerator> System.Collections.Generic.IAsyncEnumerable>.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } } public abstract partial class BinaryContent : System.IDisposable { @@ -54,25 +57,37 @@ protected internal ClientResult(T value, System.ClientModel.Primitives.PipelineR public virtual T Value { get { throw null; } } public static implicit operator T (System.ClientModel.ClientResult result) { throw null; } } - public abstract partial class PageableCollection : System.ClientModel.ResultCollection + public abstract partial class CollectionResult : System.ClientModel.ClientResult, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { - protected PageableCollection() { } - public abstract System.Collections.Generic.IEnumerable> AsPages(string? continuationToken = null, int? pageSizeHint = default(int?)); - public override System.Collections.Generic.IEnumerator GetEnumerator() { throw null; } + protected internal CollectionResult() { } + protected internal CollectionResult(System.ClientModel.Primitives.PipelineResponse response) { } + public abstract System.Collections.Generic.IEnumerator GetEnumerator(); + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public abstract partial class ResultCollection : System.ClientModel.ClientResult, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + public partial class ContinuationToken { - protected internal ResultCollection() { } - protected internal ResultCollection(System.ClientModel.Primitives.PipelineResponse response) { } - public abstract System.Collections.Generic.IEnumerator GetEnumerator(); + protected ContinuationToken() { } + protected ContinuationToken(System.BinaryData bytes) { } + public static System.ClientModel.ContinuationToken FromBytes(System.BinaryData bytes) { throw null; } + public virtual System.BinaryData ToBytes() { throw null; } + } + public abstract partial class PageCollection : System.Collections.Generic.IEnumerable>, System.Collections.IEnumerable + { + protected PageCollection() { } + public System.Collections.Generic.IEnumerable GetAllValues() { throw null; } + public System.ClientModel.PageResult GetCurrentPage() { throw null; } + protected abstract System.ClientModel.PageResult GetCurrentPageCore(); + protected abstract System.Collections.Generic.IEnumerator> GetEnumeratorCore(); + System.Collections.Generic.IEnumerator> System.Collections.Generic.IEnumerable>.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class ResultPage : System.ClientModel.ResultCollection + public partial class PageResult : System.ClientModel.ClientResult { - internal ResultPage() { } - public string? ContinuationToken { get { throw null; } } - public static System.ClientModel.ResultPage Create(System.Collections.Generic.IEnumerable values, string? continuationToken, System.ClientModel.Primitives.PipelineResponse response) { throw null; } - public override System.Collections.Generic.IEnumerator GetEnumerator() { throw null; } + internal PageResult() { } + public System.ClientModel.ContinuationToken? NextPageToken { get { throw null; } } + public System.ClientModel.ContinuationToken PageToken { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Values { get { throw null; } } + public static System.ClientModel.PageResult Create(System.Collections.Generic.IReadOnlyList values, System.ClientModel.ContinuationToken pageToken, System.ClientModel.ContinuationToken? nextPageToken, System.ClientModel.Primitives.PipelineResponse response) { throw null; } } } namespace System.ClientModel.Primitives diff --git a/sdk/core/System.ClientModel/src/Convenience/AsyncResultCollectionOfT.cs b/sdk/core/System.ClientModel/src/Convenience/AsyncCollectionResultOfT.cs similarity index 74% rename from sdk/core/System.ClientModel/src/Convenience/AsyncResultCollectionOfT.cs rename to sdk/core/System.ClientModel/src/Convenience/AsyncCollectionResultOfT.cs index da0f411799f0e..cada18b25ba4c 100644 --- a/sdk/core/System.ClientModel/src/Convenience/AsyncResultCollectionOfT.cs +++ b/sdk/core/System.ClientModel/src/Convenience/AsyncCollectionResultOfT.cs @@ -8,12 +8,13 @@ namespace System.ClientModel; /// -/// Represents a collection of results returned from a cloud service operation. +/// Represents a collection of values returned from a cloud service operation. +/// The collection values may be returned by one or more service responses. /// -public abstract class AsyncResultCollection : ClientResult, IAsyncEnumerable +public abstract class AsyncCollectionResult : ClientResult, IAsyncEnumerable { /// - /// Create a new instance of . + /// Create a new instance of . /// /// If no is provided when the /// instance is created, it is expected that @@ -24,17 +25,17 @@ public abstract class AsyncResultCollection : ClientResult, IAsyncEnumerable< /// is called. Such implementations will typically be returned from client /// convenience methods so that callers of the methods don't need to /// dispose the return value. - protected internal AsyncResultCollection() : base() + protected internal AsyncCollectionResult() : base() { } /// - /// Create a new instance of . + /// Create a new instance of . /// /// The holding the /// items in the collection, or the first set of the items in the collection. /// - protected internal AsyncResultCollection(PipelineResponse response) : base(response) + protected internal AsyncCollectionResult(PipelineResponse response) : base(response) { } diff --git a/sdk/core/System.ClientModel/src/Convenience/AsyncPageCollectionOfT.cs b/sdk/core/System.ClientModel/src/Convenience/AsyncPageCollectionOfT.cs new file mode 100644 index 0000000000000..7786b60d70f6e --- /dev/null +++ b/sdk/core/System.ClientModel/src/Convenience/AsyncPageCollectionOfT.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using System.Threading; +using System.Threading.Tasks; + +namespace System.ClientModel; + +/// +/// An asynchronous collection of page results returned by a cloud service. +/// Cloud services use pagination to return a collection of items over multiple +/// responses. Each response from the service returns a page of items in the +/// collection, as well as the information needed to obtain the next page of +/// items, until all the items in the requested collection have been returned. +/// To enumerate the items in the collection, instead of the pages in the +/// collection, call . To get the current +/// collection page, call . +/// +public abstract class AsyncPageCollection : IAsyncEnumerable> +{ + /// + /// Create a new instance of . + /// + protected AsyncPageCollection() : base() + { + // Note that page collections delay making a first request until either + // GetCurrentPageAsync is called or the collection returned by + // GetAllValuesAsync is enumerated, so this constructor calls the base + // class constructor that does not take a PipelineResponse. + } + + /// + /// Get the current page of the collection. + /// + /// The current page in the collection. + public async Task> GetCurrentPageAsync() + => await GetCurrentPageAsyncCore().ConfigureAwait(false); + + /// + /// Get a collection of all the values in the collection requested from the + /// cloud service, rather than the pages of values. + /// + /// The values requested from the cloud service. + public async IAsyncEnumerable GetAllValuesAsync([EnumeratorCancellation] CancellationToken cancellationToken = default) + { + await foreach (PageResult page in this.WithCancellation(cancellationToken).ConfigureAwait(false)) + { + foreach (T value in page.Values) + { + cancellationToken.ThrowIfCancellationRequested(); + + yield return value; + } + } + } + + /// + /// Get the current page of the collection. + /// + /// The current page in the collection. + protected abstract Task> GetCurrentPageAsyncCore(); + + /// + /// Get an async enumerator that can enumerate the pages of values returned + /// by the cloud service. + /// + /// An async enumerator of pages holding the items in the value + /// collection. + protected abstract IAsyncEnumerator> GetAsyncEnumeratorCore(CancellationToken cancellationToken = default); + + IAsyncEnumerator> IAsyncEnumerable>.GetAsyncEnumerator(CancellationToken cancellationToken) + => GetAsyncEnumeratorCore(cancellationToken); +} diff --git a/sdk/core/System.ClientModel/src/Convenience/AsyncPageableCollectionOfT.cs b/sdk/core/System.ClientModel/src/Convenience/AsyncPageableCollectionOfT.cs deleted file mode 100644 index 1a36bab43a6b2..0000000000000 --- a/sdk/core/System.ClientModel/src/Convenience/AsyncPageableCollectionOfT.cs +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - -namespace System.ClientModel; - -/// -/// Represents a collection of results returned from a cloud service operation -/// sequentially over one or more calls to the service. -/// -public abstract class AsyncPageableCollection : AsyncResultCollection -{ - /// - /// Create a new instance of . - /// - /// This constructor does not take a - /// because derived types are expected to defer the first service call - /// until the collection is enumerated using await foreach. - /// - protected AsyncPageableCollection() : base() - { - } - - /// - /// Return an enumerable of that aynchronously - /// enumerates the collection's pages instead of the collection's individual - /// values. This may make multiple service requests. - /// - /// A token indicating where the collection - /// of results returned from the service should begin. Passing null - /// will start the collection at the first page of values. - /// The number of items to request that the - /// service return in a , if the service supports - /// such requests. - /// An async sequence of , each holding - /// the subset of collection values contained in a given service response. - /// - public abstract IAsyncEnumerable> AsPages(string? continuationToken = default, int? pageSizeHint = default); - - /// - /// Return an enumerator that iterates asynchronously through the collection - /// values. This may make multiple service requests. - /// - /// The used - /// with requests made while enumerating asynchronously. - /// An that can iterate - /// asynchronously through the collection values. - public override async IAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) - { - await foreach (ResultPage page in AsPages().ConfigureAwait(false).WithCancellation(cancellationToken)) - { - foreach (T value in page) - { - yield return value; - } - } - } -} diff --git a/sdk/core/System.ClientModel/src/Convenience/ClientResult.cs b/sdk/core/System.ClientModel/src/Convenience/ClientResult.cs index 7205c9165fdbe..77e7b3cbf94d8 100644 --- a/sdk/core/System.ClientModel/src/Convenience/ClientResult.cs +++ b/sdk/core/System.ClientModel/src/Convenience/ClientResult.cs @@ -45,7 +45,7 @@ protected ClientResult(PipelineResponse response) /// No /// value is currently available for this /// instance. This can happen when the instance - /// is a collection type like + /// is a collection type like /// that has not yet been enumerated. public PipelineResponse GetRawResponse() { diff --git a/sdk/core/System.ClientModel/src/Convenience/ResultCollectionOfT.cs b/sdk/core/System.ClientModel/src/Convenience/CollectionResultOfT.cs similarity index 74% rename from sdk/core/System.ClientModel/src/Convenience/ResultCollectionOfT.cs rename to sdk/core/System.ClientModel/src/Convenience/CollectionResultOfT.cs index 5943cc8438f95..bf51575ef9d20 100644 --- a/sdk/core/System.ClientModel/src/Convenience/ResultCollectionOfT.cs +++ b/sdk/core/System.ClientModel/src/Convenience/CollectionResultOfT.cs @@ -8,12 +8,13 @@ namespace System.ClientModel; /// -/// Represents a collection of results returned from a cloud service operation. +/// Represents a collection of values returned from a cloud service operation. +/// The collection values may be returned by one or more service responses. /// -public abstract class ResultCollection : ClientResult, IEnumerable +public abstract class CollectionResult : ClientResult, IEnumerable { /// - /// Create a new instance of . + /// Create a new instance of . /// /// If no is provided when the /// instance is created, it is expected that @@ -24,17 +25,17 @@ public abstract class ResultCollection : ClientResult, IEnumerable /// is called. Such implementations will typically be returned from client /// convenience methods so that callers of the methods don't need to /// dispose the return value. - protected internal ResultCollection() : base() + protected internal CollectionResult() : base() { } /// - /// Create a new instance of . + /// Create a new instance of . /// /// The holding the /// items in the collection, or the first set of the items in the collection. /// - protected internal ResultCollection(PipelineResponse response) : base(response) + protected internal CollectionResult(PipelineResponse response) : base(response) { } diff --git a/sdk/core/System.ClientModel/src/Convenience/ContinuationToken.cs b/sdk/core/System.ClientModel/src/Convenience/ContinuationToken.cs new file mode 100644 index 0000000000000..353348839dc8f --- /dev/null +++ b/sdk/core/System.ClientModel/src/Convenience/ContinuationToken.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.ClientModel.Internal; + +namespace System.ClientModel; + +/// +/// A token that can be passed to a client method to request or rehydrate a +/// subclient from the state represented by the token. +/// +public class ContinuationToken +{ + private readonly BinaryData? _bytes; + + /// + /// Create a new instance of . + /// + /// This constructor is used by derived types to create an + /// instance from values held by the client. + protected ContinuationToken() { } + + /// + /// Create a new instance of . + /// + /// Bytes that can be deserialized into a subtype of + /// . + protected ContinuationToken(BinaryData bytes) + { + Argument.AssertNotNull(bytes, nameof(bytes)); + + _bytes = bytes; + } + + /// + /// Create a new instance of from the + /// provided . + /// + /// Bytes obtained from calling + /// on a . + /// A that can be passed to a + /// client method to request or rehydrate a subclient equivalent to the one + /// from which the original bytes were + /// obtained. + /// + public static ContinuationToken FromBytes(BinaryData bytes) => new(bytes); + + /// + /// Write the bytes of this . + /// + /// The bytes of this . + /// Thrown if not implemented + /// in a derived type. + public virtual BinaryData ToBytes() => _bytes ?? + throw new InvalidOperationException("Unable to write token as bytes."); +} diff --git a/sdk/core/System.ClientModel/src/Convenience/PageCollectionOfT.cs b/sdk/core/System.ClientModel/src/Convenience/PageCollectionOfT.cs new file mode 100644 index 0000000000000..6ee7e17201620 --- /dev/null +++ b/sdk/core/System.ClientModel/src/Convenience/PageCollectionOfT.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Collections; +using System.Collections.Generic; + +namespace System.ClientModel; + +/// +/// A collection of page results returned by a cloud service. Cloud services +/// use pagination to return a collection of items over multiple responses. +/// Each response from the service returns a page of items in the collection, +/// as well as the information needed to obtain the next page of items, until +/// all the items in the requested collection have been returned. To enumerate +/// the items in the collection, instead of the pages in the collection, call +/// . To get the current collection page, call +/// . +/// +public abstract class PageCollection : IEnumerable> +{ + /// + /// Create a new instance of . + /// + protected PageCollection() : base() + { + // Note that page collections delay making a first request until either + // GetCurrentPage is called or the collection returned by GetAllValues + // is enumerated, so this constructor calls the base class constructor + // that does not take a PipelineResponse. + } + + /// + /// Get the current page of the collection. + /// + /// The current page in the collection. + public PageResult GetCurrentPage() + => GetCurrentPageCore(); + + /// + /// Get a collection of all the values in the collection requested from the + /// cloud service, rather than the pages of values. + /// + /// The values requested from the cloud service. + public IEnumerable GetAllValues() + { + foreach (PageResult page in this) + { + foreach (T value in page.Values) + { + yield return value; + } + } + } + + /// + /// Get the current page of the collection. + /// + /// The current page in the collection. + protected abstract PageResult GetCurrentPageCore(); + + /// + /// Get an enumerator that can enumerate the pages of values returned by + /// the cloud service. + /// + /// An enumerator of pages holding the items in the value + /// collection. + protected abstract IEnumerator> GetEnumeratorCore(); + + IEnumerator> IEnumerable>.GetEnumerator() + => GetEnumeratorCore(); + + IEnumerator IEnumerable.GetEnumerator() => ((IEnumerable>)this).GetEnumerator(); +} diff --git a/sdk/core/System.ClientModel/src/Convenience/PageResultOfT.cs b/sdk/core/System.ClientModel/src/Convenience/PageResultOfT.cs new file mode 100644 index 0000000000000..c8aa4ca3b77d3 --- /dev/null +++ b/sdk/core/System.ClientModel/src/Convenience/PageResultOfT.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.ClientModel.Internal; +using System.ClientModel.Primitives; +using System.Collections.Generic; + +namespace System.ClientModel; + +/// +/// A page of values returned from a cloud service in response to a request for +/// a collection from a paginated endpoint. When used with +/// or , +/// returns a subset of a complete collection of values returned from a service. +/// Each represents the values in a single service +/// response. +/// +public class PageResult : ClientResult +{ + private PageResult(IReadOnlyList values, + ContinuationToken pageToken, + ContinuationToken? nextPageToken, + PipelineResponse response) : base(response) + { + Argument.AssertNotNull(values, nameof(values)); + Argument.AssertNotNull(pageToken, nameof(pageToken)); + + Values = values; + PageToken = pageToken; + NextPageToken = nextPageToken; + } + + /// + /// Gets the values in this . + /// + public IReadOnlyList Values { get; } + + /// + /// Gets a token that can be passed to a client method to obtain a page + /// collection that begins with this page of values. + /// + /// for more details. + public ContinuationToken PageToken { get; } + + /// + /// Gets a token that can be passed to a client method to obtain a page + /// collection that begins with the page of values after this page. If + /// is null, the current page is the last page + /// in the page collection. + /// + /// for more details. + public ContinuationToken? NextPageToken { get; } + + /// + /// Create a from the provided parameters. + /// + /// The values in the . + /// + /// A token that can be used to request a collection + /// beginning with this page of values. + /// A token that can be used to request a + /// collection beginning with the next page of values. + /// The response that returned the values in the + /// page. + /// A holding the provided values. + /// + public static PageResult Create(IReadOnlyList values, ContinuationToken pageToken, ContinuationToken? nextPageToken, PipelineResponse response) + => new(values, pageToken, nextPageToken, response); +} diff --git a/sdk/core/System.ClientModel/src/Convenience/PageableCollectionOfT.cs b/sdk/core/System.ClientModel/src/Convenience/PageableCollectionOfT.cs deleted file mode 100644 index eff5d4f5e0c8b..0000000000000 --- a/sdk/core/System.ClientModel/src/Convenience/PageableCollectionOfT.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.ClientModel.Primitives; -using System.Collections.Generic; - -namespace System.ClientModel; - -/// -/// Represents a collection of results returned from a cloud service operation -/// sequentially over one or more calls to the service. -/// -public abstract class PageableCollection : ResultCollection -{ - /// - /// Create a new instance of . - /// - /// This constructor does not take a - /// because derived types are expected to defer the first service call - /// until the collection is enumerated using foreach. - protected PageableCollection() : base() - { - } - - /// - /// Return an enumerable of that enumerates the - /// collection's pages instead of the collection's individual values. This - /// may make multiple service requests. - /// - /// A token indicating where the collection - /// of results returned from the service should begin. Passing null - /// will start the collection at the first page of values. - /// The number of items to request that the - /// service return in a , if the service supports - /// such requests. - /// A sequence of , each holding the - /// subset of collection values contained in a given service response. - /// - public abstract IEnumerable> AsPages(string? continuationToken = default, int? pageSizeHint = default); - - /// - /// Return an enumerator that iterates through the collection values. This - /// may make multiple service requests. - /// - /// An that can iterate through the - /// collection values. - public override IEnumerator GetEnumerator() - { - foreach (ResultPage page in AsPages()) - { - foreach (T value in page) - { - yield return value; - } - } - } -} diff --git a/sdk/core/System.ClientModel/src/Convenience/ResultPageOfT.cs b/sdk/core/System.ClientModel/src/Convenience/ResultPageOfT.cs deleted file mode 100644 index 9542295127ca2..0000000000000 --- a/sdk/core/System.ClientModel/src/Convenience/ResultPageOfT.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.ClientModel.Primitives; -using System.Collections.Generic; - -namespace System.ClientModel; - -/// -/// Represents the subset (or page) of results contained in a single response -/// from a cloud service returning a collection of results sequentially over -/// one or more calls to the service (i.e. a paged collection). -/// -public class ResultPage : ResultCollection -{ - private readonly IEnumerable _values; - - private ResultPage(IEnumerable values, string? continuationToken, PipelineResponse response) - : base(response) - { - _values = values; - ContinuationToken = continuationToken; - } - - /// - /// Creates a new . - /// - /// The values contained in . - /// - /// The token that can be used to request - /// the next page of results from the service, or null if this page - /// holds the final subset of values. - /// The holding the - /// collection values returned by the service. - /// An instance of holding the provided - /// values. - public static ResultPage Create(IEnumerable values, string? continuationToken, PipelineResponse response) - => new(values, continuationToken, response); - - /// - /// Gets the continuation token used to request the next - /// . May be null or empty when no values - /// remain to be returned from the collection. - /// - public string? ContinuationToken { get; } - - /// - public override IEnumerator GetEnumerator() - => _values.GetEnumerator(); -} diff --git a/sdk/core/System.ClientModel/tests/Convenience/PageCollectionScenarioTests.cs b/sdk/core/System.ClientModel/tests/Convenience/PageCollectionScenarioTests.cs new file mode 100644 index 0000000000000..7efc42d41494e --- /dev/null +++ b/sdk/core/System.ClientModel/tests/Convenience/PageCollectionScenarioTests.cs @@ -0,0 +1,472 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using ClientModel.Tests.Mocks; +using ClientModel.Tests.Paging; +using NUnit.Framework; + +namespace System.ClientModel.Tests.Paging; + +/// +/// Scenario tests for sync and async page collections. +/// +public class PageScenarioCollectionTests +{ + [Test] + public void CanRehydratePageCollection() + { + PagingClientOptions options = new() + { + Transport = new MockPipelineTransport("Mock", i => 200) + }; + + PagingClient client = new PagingClient(options); + PageCollection pages = client.GetValues(); + PageResult page = pages.GetCurrentPage(); + + ContinuationToken pageToken = page.PageToken; + + PageCollection rehydratedPages = client.GetValues(pageToken); + PageResult rehydratedPage = rehydratedPages.GetCurrentPage(); + + Assert.AreEqual(page.Values.Count, rehydratedPage.Values.Count); + + List allValues = pages.GetAllValues().ToList(); + List allRehydratedValues = rehydratedPages.GetAllValues().ToList(); + + for (int i = 0; i < allValues.Count; i++) + { + Assert.AreEqual(allValues[i].Id, allRehydratedValues[i].Id); + } + } + + [Test] + public async Task CanRehydratePageCollectionAsync() + { + PagingClientOptions options = new() + { + Transport = new MockPipelineTransport("Mock", i => 200) + }; + + PagingClient client = new PagingClient(options); + AsyncPageCollection pages = client.GetValuesAsync(); + PageResult page = await pages.GetCurrentPageAsync(); + + ContinuationToken pageToken = page.PageToken; + + AsyncPageCollection rehydratedPages = client.GetValuesAsync(pageToken); + PageResult rehydratedPage = await rehydratedPages.GetCurrentPageAsync(); + + Assert.AreEqual(page.Values.Count, rehydratedPage.Values.Count); + + List allValues = await pages.GetAllValuesAsync().ToListAsync(); + List allRehydratedValues = await rehydratedPages.GetAllValuesAsync().ToListAsync(); + + for (int i = 0; i < allValues.Count; i++) + { + Assert.AreEqual(allValues[i].Id, allRehydratedValues[i].Id); + } + } + + [Test] + public void CanReorderItemsAndRehydrate() + { + PagingClientOptions options = new() + { + Transport = new MockPipelineTransport("Mock", i => 200) + }; + + string order = "desc"; + Assert.AreNotEqual(MockPagingData.DefaultOrder, order); + + PagingClient client = new PagingClient(options); + PageCollection pages = client.GetValues(order: order); + PageResult page = pages.GetCurrentPage(); + + ContinuationToken pageToken = page.PageToken; + + PageCollection rehydratedPages = client.GetValues(pageToken); + PageResult rehydratedPage = rehydratedPages.GetCurrentPage(); + + Assert.AreEqual(page.Values.Count, rehydratedPage.Values.Count); + + // We got the last one first from both pages + Assert.AreEqual(MockPagingData.Count - 1, page.Values[0].Id); + Assert.AreEqual(MockPagingData.Count - 1, rehydratedPage.Values[0].Id); + } + + [Test] + public async Task CanReorderItemsAndRehydrateAsync() + { + PagingClientOptions options = new() + { + Transport = new MockPipelineTransport("Mock", i => 200) + }; + + string order = "desc"; + Assert.AreNotEqual(MockPagingData.DefaultOrder, order); + + PagingClient client = new PagingClient(options); + AsyncPageCollection pages = client.GetValuesAsync(order: order); + PageResult page = await pages.GetCurrentPageAsync(); + + ContinuationToken pageToken = page.PageToken; + + AsyncPageCollection rehydratedPages = client.GetValuesAsync(pageToken); + PageResult rehydratedPage = await rehydratedPages.GetCurrentPageAsync(); + + Assert.AreEqual(page.Values.Count, rehydratedPage.Values.Count); + + // We got the last one first from both pages + Assert.AreEqual(MockPagingData.Count - 1, page.Values[0].Id); + Assert.AreEqual(MockPagingData.Count - 1, rehydratedPage.Values[0].Id); + } + + [Test] + public void CanChangePageSizeAndRehydrate() + { + PagingClientOptions options = new() + { + Transport = new MockPipelineTransport("Mock", i => 200) + }; + + int pageSize = 4; + Assert.AreNotEqual(MockPagingData.DefaultPageSize, pageSize); + + PagingClient client = new PagingClient(options); + PageCollection pages = client.GetValues(pageSize: pageSize); + PageResult page = pages.GetCurrentPage(); + + ContinuationToken pageToken = page.PageToken; + + PageCollection rehydratedPages = client.GetValues(pageToken); + PageResult rehydratedPage = rehydratedPages.GetCurrentPage(); + + // Both pages have same non-default page size + Assert.AreEqual(pageSize, page.Values.Count); + Assert.AreEqual(pageSize, rehydratedPage.Values.Count); + } + + [Test] + public async Task CanChangePageSizeAndRehydrateAsync() + { + PagingClientOptions options = new() + { + Transport = new MockPipelineTransport("Mock", i => 200) + }; + + int pageSize = 4; + Assert.AreNotEqual(MockPagingData.DefaultPageSize, pageSize); + + PagingClient client = new PagingClient(options); + AsyncPageCollection pages = client.GetValuesAsync(pageSize: pageSize); + PageResult page = await pages.GetCurrentPageAsync(); + + ContinuationToken pageToken = page.PageToken; + + AsyncPageCollection rehydratedPages = client.GetValuesAsync(pageToken); + PageResult rehydratedPage = await rehydratedPages.GetCurrentPageAsync(); + + // Both pages have same non-default page size + Assert.AreEqual(pageSize, page.Values.Count); + Assert.AreEqual(pageSize, rehydratedPage.Values.Count); + } + + [Test] + public void CanSkipItemsAndRehydrate() + { + PagingClientOptions options = new() + { + Transport = new MockPipelineTransport("Mock", i => 200) + }; + + int offset = 4; + Assert.AreNotEqual(MockPagingData.DefaultOffset, offset); + + PagingClient client = new PagingClient(options); + PageCollection pages = client.GetValues(offset: offset); + PageResult page = pages.GetCurrentPage(); + + ContinuationToken pageToken = page.PageToken; + + PageCollection rehydratedPages = client.GetValues(pageToken); + PageResult rehydratedPage = rehydratedPages.GetCurrentPage(); + + Assert.AreEqual(page.Values.Count, rehydratedPage.Values.Count); + + // Both pages have the same non-default offset value + Assert.AreEqual(offset, page.Values[0].Id); + Assert.AreEqual(offset, rehydratedPage.Values[0].Id); + } + + [Test] + public async Task CanSkipItemsAndRehydrateAsync() + { + PagingClientOptions options = new() + { + Transport = new MockPipelineTransport("Mock", i => 200) + }; + + int offset = 4; + Assert.AreNotEqual(MockPagingData.DefaultOffset, offset); + + PagingClient client = new PagingClient(options); + AsyncPageCollection pages = client.GetValuesAsync(offset: offset); + PageResult page = await pages.GetCurrentPageAsync(); + + ContinuationToken pageToken = page.PageToken; + + AsyncPageCollection rehydratedPages = client.GetValuesAsync(pageToken); + PageResult rehydratedPage = await rehydratedPages.GetCurrentPageAsync(); + + Assert.AreEqual(page.Values.Count, rehydratedPage.Values.Count); + + // Both pages have the same non-default offset value + Assert.AreEqual(offset, page.Values[0].Id); + Assert.AreEqual(offset, rehydratedPage.Values[0].Id); + } + + [Test] + public void CanChangeAllCollectionParametersAndRehydrate() + { + PagingClientOptions options = new() + { + Transport = new MockPipelineTransport("Mock", i => 200) + }; + + string order = "desc"; + Assert.AreNotEqual(MockPagingData.DefaultOrder, order); + + int pageSize = 4; + Assert.AreNotEqual(MockPagingData.DefaultPageSize, pageSize); + + int offset = 4; + Assert.AreNotEqual(MockPagingData.DefaultOffset, offset); + + PagingClient client = new PagingClient(options); + PageCollection pages = client.GetValues(order, pageSize, offset); + PageResult page = pages.GetCurrentPage(); + + ContinuationToken pageToken = page.PageToken; + + PageCollection rehydratedPages = client.GetValues(pageToken); + PageResult rehydratedPage = rehydratedPages.GetCurrentPage(); + + // Both page collections and first pages are the same on each dimension + + // Collections have same non-default number of pages. + Assert.AreEqual(3, pages.Count()); + Assert.AreEqual(3, rehydratedPages.Count()); + + // Last one first and same items skipped + Assert.AreEqual(11, page.Values[0].Id); + Assert.AreEqual(11, rehydratedPage.Values[0].Id); + + // Equal page size + Assert.AreEqual(pageSize, page.Values.Count); + Assert.AreEqual(pageSize, rehydratedPage.Values.Count); + } + + [Test] + public async Task CanChangeAllCollectionParametersAndRehydrateAsync() + { + PagingClientOptions options = new() + { + Transport = new MockPipelineTransport("Mock", i => 200) + }; + + string order = "desc"; + Assert.AreNotEqual(MockPagingData.DefaultOrder, order); + + int pageSize = 4; + Assert.AreNotEqual(MockPagingData.DefaultPageSize, pageSize); + + int offset = 4; + Assert.AreNotEqual(MockPagingData.DefaultOffset, offset); + + PagingClient client = new PagingClient(options); + AsyncPageCollection pages = client.GetValuesAsync(order, pageSize, offset); + PageResult page = await pages.GetCurrentPageAsync(); + + ContinuationToken pageToken = page.PageToken; + + AsyncPageCollection rehydratedPages = client.GetValuesAsync(pageToken); + PageResult rehydratedPage = await rehydratedPages.GetCurrentPageAsync(); + + // Both page collections and first pages are the same on each dimension + + // Collections have same non-default number of pages. + Assert.AreEqual(3, await pages.CountAsync()); + Assert.AreEqual(3, await rehydratedPages.CountAsync()); + + // Last one first and same items skipped + Assert.AreEqual(11, page.Values[0].Id); + Assert.AreEqual(11, rehydratedPage.Values[0].Id); + + // Equal page size + Assert.AreEqual(pageSize, page.Values.Count); + Assert.AreEqual(pageSize, rehydratedPage.Values.Count); + } + + [Test] + public void CanCastToConvenienceFromProtocol() + { + PagingClientOptions options = new() + { + Transport = new MockPipelineTransport("Mock", i => 200) + }; + + PagingClient client = new PagingClient(options); + + // Call the protocol method on the convenience client. + IEnumerable pageResults = client.GetValues( + order: default, + pageSize: default, + offset: default, + new RequestOptions()); + + // Cast to convience type from protocol return value. + PageCollection pages = (PageCollection)pageResults; + + IEnumerable values = pages.GetAllValues(); + + int count = 0; + foreach (ValueItem value in values) + { + Assert.AreEqual(count, value.Id); + count++; + } + + Assert.AreEqual(MockPagingData.Count, count); + } + + [Test] + public async Task CanCastToConvenienceFromProtocolAsync() + { + PagingClientOptions options = new() + { + Transport = new MockPipelineTransport("Mock", i => 200) + }; + + PagingClient client = new PagingClient(options); + + // Call the protocol method on the convenience client. + IAsyncEnumerable pageResults = client.GetValuesAsync( + order: default, + pageSize: default, + offset: default, + new RequestOptions()); + + // Cast to convience type from protocol return value. + AsyncPageCollection pages = (AsyncPageCollection)pageResults; + + IAsyncEnumerable values = pages.GetAllValuesAsync(); + + int count = 0; + await foreach (ValueItem value in values) + { + Assert.AreEqual(count, value.Id); + count++; + } + + Assert.AreEqual(MockPagingData.Count, count); + } + + [Test] + public void CanEvolveFromProtocol() + { + // This scenario tests validates that user code doesn't break when + // convenience methods are added. We show this by illustrating that + // exactly the same code works the same way when using a client that + // has only protocol methods and a client that has the same protocol + // methods and also convenience methods. + + PagingClientOptions options = new() + { + Transport = new MockPipelineTransport("Mock", i => 200) + }; + + static void Validate(IEnumerable results) + { + int pageCount = 0; + foreach (ClientResult result in results) + { + Assert.AreEqual(200, result.GetRawResponse().Status); + pageCount++; + } + + Assert.AreEqual(MockPagingData.Count / MockPagingData.DefaultPageSize, pageCount); + } + + // Protocol code + PagingProtocolClient protocolClient = new PagingProtocolClient(options); + IEnumerable pageResults = protocolClient.GetValues( + order: default, + pageSize: default, + offset: default, + new RequestOptions()); + + Validate(pageResults); + + // Convenience code + PagingClient convenienceClient = new PagingClient(options); + IEnumerable pages = convenienceClient.GetValues( + order: default, + pageSize: default, + offset: default, + new RequestOptions()); + + Validate(pages); + } + + [Test] + public async Task CanEvolveFromProtocolAsync() + { + // This scenario tests validates that user code doesn't break when + // convenience methods are added. We show this by illustrating that + // exactly the same code works the same way when using a client that + // has only protocol methods and a client that has the same protocol + // methods and also convenience methods. + + PagingClientOptions options = new() + { + Transport = new MockPipelineTransport("Mock", i => 200) + }; + + static async Task ValidateAsync(IAsyncEnumerable results) + { + int pageCount = 0; + await foreach (ClientResult result in results) + { + Assert.AreEqual(200, result.GetRawResponse().Status); + pageCount++; + } + + Assert.AreEqual(MockPagingData.Count / MockPagingData.DefaultPageSize, pageCount); + } + + // Protocol code + PagingProtocolClient protocolClient = new PagingProtocolClient(options); + IAsyncEnumerable pageResults = protocolClient.GetValuesAsync( + order: default, + pageSize: default, + offset: default, + new RequestOptions()); + + await ValidateAsync(pageResults); + + // Convenience code + PagingClient convenienceClient = new PagingClient(options); + IAsyncEnumerable pages = convenienceClient.GetValuesAsync( + order: default, + pageSize: default, + offset: default, + new RequestOptions()); + + await ValidateAsync(pages); + } +} diff --git a/sdk/core/System.ClientModel/tests/Convenience/PageCollectionTests.cs b/sdk/core/System.ClientModel/tests/Convenience/PageCollectionTests.cs new file mode 100644 index 0000000000000..4a6a2c640d3b2 --- /dev/null +++ b/sdk/core/System.ClientModel/tests/Convenience/PageCollectionTests.cs @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using ClientModel.Tests.Mocks; +using ClientModel.Tests.Paging; +using NUnit.Framework; + +namespace System.ClientModel.Tests.Paging; + +/// +/// Unit tests for sync and async page collections. +/// +public class PageCollectionTests +{ + private const int Count = 16; + private const int DefaultPageSize = 8; + private static readonly List MockValues = GetMockValues(Count).ToList(); + + private static IEnumerable GetMockValues(int count) + { + for (int i = 0; i < count; i++) + { + yield return i; + } + } + + [Test] + public void CanGetAllValues() + { + PageCollection pages = new MockPageCollection(MockValues, DefaultPageSize); + IEnumerable values = pages.GetAllValues(); + + int count = 0; + foreach (int value in values) + { + Assert.AreEqual(count, value); + count++; + } + + Assert.AreEqual(Count, count); + } + + [Test] + public async Task CanGetAllValuesAsync() + { + AsyncPageCollection pages = new MockAsyncPageCollection(MockValues, DefaultPageSize); + IAsyncEnumerable values = pages.GetAllValuesAsync(); + + int count = 0; + await foreach (int value in values) + { + Assert.AreEqual(count, value); + count++; + } + + Assert.AreEqual(Count, count); + } + + [Test] + public void CanGetCurrentPage() + { + PageCollection pages = new MockPageCollection(MockValues, DefaultPageSize); + PageResult page = pages.GetCurrentPage(); + + Assert.AreEqual(MockPagingData.DefaultPageSize, page.Values.Count); + Assert.AreEqual(0, page.Values[0]); + } + + [Test] + public async Task CanGetCurrentPageAsync() + { + AsyncPageCollection pages = new MockAsyncPageCollection(MockValues, DefaultPageSize); + PageResult page = await pages.GetCurrentPageAsync(); + + Assert.AreEqual(MockPagingData.DefaultPageSize, page.Values.Count); + Assert.AreEqual(0, page.Values[0]); + } + + [Test] + public void CanGetCurrentPageThenGetAllItems() + { + PageCollection pages = new MockPageCollection(MockValues, DefaultPageSize); + PageResult page = pages.GetCurrentPage(); + + Assert.AreEqual(DefaultPageSize, page.Values.Count); + Assert.AreEqual(0, page.Values[0]); + + IEnumerable values = pages.GetAllValues(); + + int count = 0; + foreach (int value in values) + { + Assert.AreEqual(count, value); + count++; + } + + Assert.AreEqual(Count, count); + } + + [Test] + public async Task CanGetCurrentPageThenGetAllItemsAsync() + { + AsyncPageCollection pages = new MockAsyncPageCollection(MockValues, DefaultPageSize); + PageResult page = await pages.GetCurrentPageAsync(); + + Assert.AreEqual(DefaultPageSize, page.Values.Count); + Assert.AreEqual(0, page.Values[0]); + + IAsyncEnumerable values = pages.GetAllValuesAsync(); + + int count = 0; + await foreach (int value in values) + { + Assert.AreEqual(count, value); + count++; + } + + Assert.AreEqual(Count, count); + } + + [Test] + public void CanGetCurrentPageWhileEnumeratingItems() + { + PageCollection pages = new MockPageCollection(MockValues, DefaultPageSize); + IEnumerable values = pages.GetAllValues(); + + int count = 0; + foreach (int value in values) + { + Assert.AreEqual(count, value); + count++; + + PageResult page = pages.GetCurrentPage(); + + // Validate that the current item is in range of the page values + Assert.GreaterOrEqual(value, page.Values[0]); + Assert.LessOrEqual(value, page.Values[page.Values.Count - 1]); + } + + Assert.AreEqual(MockPagingData.Count, count); + } + + [Test] + public async Task CanGetCurrentPageWhileEnumeratingItemsAsync() + { + AsyncPageCollection pages = new MockAsyncPageCollection(MockValues, DefaultPageSize); + IAsyncEnumerable values = pages.GetAllValuesAsync(); + + int count = 0; + await foreach (int value in values) + { + Assert.AreEqual(count, value); + count++; + + PageResult page = await pages.GetCurrentPageAsync(); + + // Validate that the current item is in range of the page values + Assert.GreaterOrEqual(value, page.Values[0]); + Assert.LessOrEqual(value, page.Values[page.Values.Count - 1]); + } + + Assert.AreEqual(MockPagingData.Count, count); + } + + [Test] + public void CanEnumerateClientResults() + { + PageCollection pages = new MockPageCollection(MockValues, DefaultPageSize); + IEnumerable pageResults = pages; + + int pageCount = 0; + foreach (ClientResult result in pageResults) + { + Assert.AreEqual(200, result.GetRawResponse().Status); + pageCount++; + } + + Assert.AreEqual(2, pageCount); + } + + [Test] + public async Task CanEnumerateClientResultsAsync() + { + AsyncPageCollection pages = new MockAsyncPageCollection(MockValues, DefaultPageSize); + IAsyncEnumerable pageResults = pages; + + int pageCount = 0; + await foreach (ClientResult result in pageResults) + { + Assert.AreEqual(200, result.GetRawResponse().Status); + pageCount++; + } + + Assert.AreEqual(2, pageCount); + } +} diff --git a/sdk/core/System.ClientModel/tests/Convenience/PageableCollectionTests.cs b/sdk/core/System.ClientModel/tests/Convenience/PageableCollectionTests.cs deleted file mode 100644 index 48092dd8b27d8..0000000000000 --- a/sdk/core/System.ClientModel/tests/Convenience/PageableCollectionTests.cs +++ /dev/null @@ -1,271 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.ClientModel.Primitives; -using System.Threading.Tasks; -using Azure.Core.TestFramework; -using ClientModel.Tests.Mocks; -using NUnit.Framework; - -namespace System.ClientModel.Tests.Results; - -public class PageableCollectionTests -{ - private static readonly string[] MockPageContents = { """ - [ - { "intValue" : 0, "stringValue" : "0" }, - { "intValue" : 1, "stringValue" : "1" }, - { "intValue" : 2, "stringValue" : "2" } - ] - """,""" - [ - { "intValue" : 3, "stringValue" : "3" }, - { "intValue" : 4, "stringValue" : "4" }, - { "intValue" : 5, "stringValue" : "5" } - ] - """,""" - [ - { "intValue" : 6, "stringValue" : "6" }, - { "intValue" : 7, "stringValue" : "7" }, - { "intValue" : 8, "stringValue" : "8" } - ] - """, - }; - - private static readonly int PageCount = MockPageContents.Length; - private static readonly int ItemCount = 9; - - [Test] - public void CanEnumerateValues() - { - MockPageableClient client = new(); - PageableCollection models = client.GetModels(MockPageContents); - - int i = 0; - foreach (MockJsonModel model in models) - { - Assert.AreEqual(i, model.IntValue); - Assert.AreEqual(i.ToString(), model.StringValue); - - i++; - } - - Assert.AreEqual(ItemCount, i); - } - - [Test] - public void CanEnumeratePages() - { - MockPageableClient client = new(); - PageableCollection models = client.GetModels(MockPageContents); - - int pageCount = 0; - int itemCount = 0; - foreach (ResultPage page in models.AsPages()) - { - foreach (MockJsonModel model in page) - { - Assert.AreEqual(itemCount, model.IntValue); - Assert.AreEqual(itemCount.ToString(), model.StringValue); - - itemCount++; - } - - pageCount++; - } - - Assert.AreEqual(ItemCount, itemCount); - Assert.AreEqual(PageCount, pageCount); - } - - [Test] - public void CanStartPageEnumerationMidwayThrough() - { - MockPageableClient client = new(); - PageableCollection models = client.GetModels(MockPageContents); - - int pageCount = 0; - int i = 6; - - // Request just the last page by starting at the last seen value - // on the prior page -- i.e. item 5. - foreach (ResultPage page in models.AsPages(continuationToken: "5")) - { - foreach (MockJsonModel model in page) - { - Assert.AreEqual(i, model.IntValue); - Assert.AreEqual(i.ToString(), model.StringValue); - - i++; - } - - pageCount++; - } - - Assert.AreEqual(ItemCount, i); - Assert.AreEqual(1, pageCount); - } - - [Test] - public void CanSetPageSizeHint() - { - MockPageableClient client = new(); - PageableCollection models = client.GetModels(MockPageContents); - var pages = models.AsPages(pageSizeHint: 10); - foreach (var _ in pages) - { - // page size hint is ignored in this mock - } - - Assert.AreEqual(10, client.RequestedPageSize); - } - - [Test] - public void CanGetRawResponses() - { - MockPageableClient client = new(); - PageableCollection models = client.GetModels(MockPageContents); - - int pageCount = 0; - int itemCount = 0; - foreach (ResultPage page in models.AsPages()) - { - foreach (MockJsonModel model in page) - { - Assert.AreEqual(itemCount, model.IntValue); - Assert.AreEqual(itemCount.ToString(), model.StringValue); - - itemCount++; - } - - PipelineResponse collectionResponse = models.GetRawResponse(); - PipelineResponse pageResponse = page.GetRawResponse(); - - Assert.AreEqual(pageResponse, collectionResponse); - Assert.AreEqual(MockPageContents[pageCount], pageResponse.Content.ToString()); - Assert.AreEqual(MockPageContents[pageCount], collectionResponse.Content.ToString()); - - pageCount++; - } - - Assert.AreEqual(ItemCount, itemCount); - Assert.AreEqual(PageCount, pageCount); - } - - [Test] - public async Task CanEnumerateValuesAsync() - { - MockPageableClient client = new(); - AsyncPageableCollection models = client.GetModelsAsync(MockPageContents); - - int i = 0; - await foreach (MockJsonModel model in models) - { - Assert.AreEqual(i, model.IntValue); - Assert.AreEqual(i.ToString(), model.StringValue); - - i++; - } - - Assert.AreEqual(ItemCount, i); - } - - [Test] - public async Task CanEnumeratePagesAsync() - { - MockPageableClient client = new(); - AsyncPageableCollection models = client.GetModelsAsync(MockPageContents); - - int pageCount = 0; - int itemCount = 0; - await foreach (ResultPage page in models.AsPages()) - { - foreach (MockJsonModel model in page) - { - Assert.AreEqual(itemCount, model.IntValue); - Assert.AreEqual(itemCount.ToString(), model.StringValue); - - itemCount++; - } - - pageCount++; - } - - Assert.AreEqual(ItemCount, itemCount); - Assert.AreEqual(PageCount, pageCount); - } - - [Test] - public async Task CanStartPageEnumerationMidwayThroughAsync() - { - MockPageableClient client = new(); - AsyncPageableCollection models = client.GetModelsAsync(MockPageContents); - - int pageCount = 0; - int i = 6; - - // Request just the last page by starting at the last seen value - // on the prior page -- i.e. item 5. - await foreach (ResultPage page in models.AsPages(continuationToken: "5")) - { - foreach (MockJsonModel model in page) - { - Assert.AreEqual(i, model.IntValue); - Assert.AreEqual(i.ToString(), model.StringValue); - - i++; - } - - pageCount++; - } - - Assert.AreEqual(ItemCount, i); - Assert.AreEqual(1, pageCount); - } - - [Test] - public async Task CanSetPageSizeHintAsync() - { - MockPageableClient client = new(); - AsyncPageableCollection models = client.GetModelsAsync(MockPageContents); - var pages = models.AsPages(pageSizeHint: 10); - await foreach (var _ in pages) - { - // page size hint is ignored in this mock - } - - Assert.AreEqual(10, client.RequestedPageSize); - } - - [Test] - public async Task CanGetRawResponsesAsync() - { - MockPageableClient client = new(); - AsyncPageableCollection models = client.GetModelsAsync(MockPageContents); - - int pageCount = 0; - int itemCount = 0; - await foreach (ResultPage page in models.AsPages()) - { - foreach (MockJsonModel model in page) - { - Assert.AreEqual(itemCount, model.IntValue); - Assert.AreEqual(itemCount.ToString(), model.StringValue); - - itemCount++; - } - - PipelineResponse collectionResponse = models.GetRawResponse(); - PipelineResponse pageResponse = page.GetRawResponse(); - - Assert.AreEqual(pageResponse, collectionResponse); - Assert.AreEqual(MockPageContents[pageCount], pageResponse.Content.ToString()); - Assert.AreEqual(MockPageContents[pageCount], collectionResponse.Content.ToString()); - - pageCount++; - } - - Assert.AreEqual(ItemCount, itemCount); - Assert.AreEqual(PageCount, pageCount); - } -} diff --git a/sdk/core/System.ClientModel/tests/TestFramework/Mocks/MockAsyncPageCollection.cs b/sdk/core/System.ClientModel/tests/TestFramework/Mocks/MockAsyncPageCollection.cs new file mode 100644 index 0000000000000..4d2b9a7d53763 --- /dev/null +++ b/sdk/core/System.ClientModel/tests/TestFramework/Mocks/MockAsyncPageCollection.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.ClientModel; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; + +namespace ClientModel.Tests.Mocks; + +public class MockAsyncPageCollection : AsyncPageCollection +{ + private readonly List _values; + private readonly int _pageSize; + + private int _current; + + public MockAsyncPageCollection(List values, int pageSize) + { + _values = values; + _pageSize = pageSize; + } + + protected override async Task> GetCurrentPageAsyncCore() + => await GetPageFromCurrentStateAsync().ConfigureAwait(false); + + protected override async IAsyncEnumerator> GetAsyncEnumeratorCore(CancellationToken cancellationToken) + { + while (_current < _values.Count) + { + yield return await GetPageFromCurrentStateAsync().ConfigureAwait(false); + + _current += _pageSize; + } + } + + private async Task> GetPageFromCurrentStateAsync() + { + await Task.Delay(0); + + int pageSize = Math.Min(_pageSize, _values.Count - _current); + List pageValues = _values.GetRange(_current, pageSize); + + // Make page tokens not useful for mocks. + ContinuationToken mockPageToken = ContinuationToken.FromBytes(BinaryData.FromString("{}")); + return PageResult.Create(pageValues, mockPageToken, null, new MockPipelineResponse(200)); + } +} diff --git a/sdk/core/System.ClientModel/tests/TestFramework/Mocks/MockPageCollection.cs b/sdk/core/System.ClientModel/tests/TestFramework/Mocks/MockPageCollection.cs new file mode 100644 index 0000000000000..47fa94c12c16e --- /dev/null +++ b/sdk/core/System.ClientModel/tests/TestFramework/Mocks/MockPageCollection.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.ClientModel; +using System.Collections.Generic; + +namespace ClientModel.Tests.Mocks; + +public class MockPageCollection : PageCollection +{ + private readonly List _values; + private readonly int _pageSize; + + private int _current; + + public MockPageCollection(List values, int pageSize) + { + _values = values; + _pageSize = pageSize; + } + + protected override PageResult GetCurrentPageCore() + => GetPageFromCurrentState(); + + protected override IEnumerator> GetEnumeratorCore() + { + while (_current < _values.Count) + { + yield return GetPageFromCurrentState(); + + _current += _pageSize; + } + } + + private PageResult GetPageFromCurrentState() + { + int pageSize = Math.Min(_pageSize, _values.Count - _current); + List pageValues = _values.GetRange(_current, pageSize); + + // Make page tokens not useful for mocks. + ContinuationToken mockPageToken = ContinuationToken.FromBytes(BinaryData.FromString("{}")); + return PageResult.Create(pageValues, mockPageToken, null, new MockPipelineResponse(200)); + } +} diff --git a/sdk/core/System.ClientModel/tests/TestFramework/Mocks/MockPageableClient.cs b/sdk/core/System.ClientModel/tests/TestFramework/Mocks/MockPageableClient.cs deleted file mode 100644 index 0ad116f70c945..0000000000000 --- a/sdk/core/System.ClientModel/tests/TestFramework/Mocks/MockPageableClient.cs +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Diagnostics; -using System.Linq; -using System.Threading.Tasks; -using Azure.Core.TestFramework; -using ClientModel.Tests.Internal; - -namespace ClientModel.Tests.Mocks; - -public class MockPageableClient -{ - public bool ProtocolMethodCalled { get; private set; } - public int? RequestedPageSize { get; private set; } - - // mock convenience method - async - public virtual AsyncPageableCollection GetModelsAsync(string[] pageContents) - { - PipelineResponse? lastResponse = default; - - // The contract for this pageable implementation is that the last seen - // value id (where the id is StringValue) provides the continuation token - // for the page. - - int pageNumber = 0; - JsonModelList values = new(); - - async Task> firstPageFuncAsync(int? pageSize) - { - ClientResult result = await GetModelsAsync(pageContents[pageNumber++], options: null).ConfigureAwait(false); - lastResponse = result.GetRawResponse(); - values = ModelReaderWriter.Read>(lastResponse.Content)!; - string? continuationToken = pageNumber < pageContents.Length ? values[values.Count - 1].StringValue : null; - return ResultPage.Create(values, continuationToken, lastResponse); - } - - async Task> nextPageFuncAsync(string? continuationToken, int? pageSize) - { - RequestedPageSize = pageSize; - - bool atRequestedPage = values.Count > 0 && values.Last().StringValue == continuationToken; - while (!atRequestedPage && pageNumber < pageContents.Length) - { - BinaryData content = BinaryData.FromString(pageContents[pageNumber++]); - JsonModelList pageValues = ModelReaderWriter.Read>(content)!; - atRequestedPage = pageValues[pageValues.Count - 1].StringValue == continuationToken; - } - - Debug.Assert(atRequestedPage is true); - - ClientResult result = await GetModelsAsync(pageContents[pageNumber++], options: null).ConfigureAwait(false); - lastResponse = result.GetRawResponse(); - values = ModelReaderWriter.Read>(lastResponse.Content)!; - continuationToken = pageNumber < pageContents.Length ? values[values.Count - 1].StringValue : null; - return ResultPage.Create(values, continuationToken, lastResponse); - } - - return PageableResultHelpers.Create(firstPageFuncAsync, nextPageFuncAsync); - } - - // mock convenience method - sync - public virtual PageableCollection GetModels(string[] pageContents) - { - PipelineResponse? lastResponse = default; - - // The contract for this pageable implementation is that the last seen - // value id (where the id is StringValue) provides the continuation token - // for the page. - - int pageNumber = 0; - JsonModelList values = new(); - - ResultPage firstPageFunc(int? pageSize) - { - ClientResult result = GetModels(pageContents[pageNumber++], options: null); - lastResponse = result.GetRawResponse(); - values = ModelReaderWriter.Read>(lastResponse.Content)!; - string? continuationToken = pageNumber < pageContents.Length ? values[values.Count - 1].StringValue : null; - return ResultPage.Create(values, continuationToken, lastResponse); - } - - ResultPage nextPageFunc(string? continuationToken, int? pageSize) - { - RequestedPageSize = pageSize; - - bool atRequestedPage = values.Count > 0 && values.Last().StringValue == continuationToken; - while (!atRequestedPage && pageNumber < pageContents.Length) - { - BinaryData content = BinaryData.FromString(pageContents[pageNumber++]); - JsonModelList pageValues = ModelReaderWriter.Read>(content)!; - atRequestedPage = pageValues[pageValues.Count - 1].StringValue == continuationToken; - } - - Debug.Assert(atRequestedPage is true); - - ClientResult result = GetModels(pageContents[pageNumber++], options: null); - lastResponse = result.GetRawResponse(); - values = ModelReaderWriter.Read>(lastResponse.Content)!; - continuationToken = pageNumber < pageContents.Length ? values[values.Count - 1].StringValue : null; - return ResultPage.Create(values, continuationToken, lastResponse); - } - - return PageableResultHelpers.Create(firstPageFunc, nextPageFunc); - } - - // mock protocol method - async - public virtual async Task GetModelsAsync(string pageContent, RequestOptions? options = default) - { - await Task.Delay(0); - - MockPipelineResponse response = new(200); - response.SetContent(pageContent); - - ProtocolMethodCalled = true; - - return ClientResult.FromResponse(response); - } - - // mock protocol method - sync - public virtual ClientResult GetModels(string pageContent, RequestOptions? options = default) - { - MockPipelineResponse response = new(200); - response.SetContent(pageContent); - - ProtocolMethodCalled = true; - - return ClientResult.FromResponse(response); - } -} diff --git a/sdk/core/System.ClientModel/tests/TestFramework/PageableResultHelpers.cs b/sdk/core/System.ClientModel/tests/TestFramework/PageableResultHelpers.cs deleted file mode 100644 index 6013ede13cdc9..0000000000000 --- a/sdk/core/System.ClientModel/tests/TestFramework/PageableResultHelpers.cs +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.ClientModel; -using System.Collections.Generic; -using System.Threading.Tasks; - -namespace ClientModel.Tests.Internal; - -internal class PageableResultHelpers -{ - public static PageableCollection Create(Func> firstPageFunc, Func>? nextPageFunc, int? pageSize = default) where T : notnull - { - ResultPage first(string? _, int? pageSizeHint) => firstPageFunc(pageSizeHint); - return new FuncPageable(first, nextPageFunc, pageSize); - } - - public static AsyncPageableCollection Create(Func>> firstPageFunc, Func>>? nextPageFunc, int? pageSize = default) where T : notnull - { - Task> first(string? _, int? pageSizeHint) => firstPageFunc(pageSizeHint); - return new FuncAsyncPageable(first, nextPageFunc, pageSize); - } - - private class FuncAsyncPageable : AsyncPageableCollection where T : notnull - { - private readonly Func>> _firstPageFunc; - private readonly Func>>? _nextPageFunc; - private readonly int? _defaultPageSize; - - public FuncAsyncPageable(Func>> firstPageFunc, Func>>? nextPageFunc, int? defaultPageSize = default) - { - _firstPageFunc = firstPageFunc; - _nextPageFunc = nextPageFunc; - _defaultPageSize = defaultPageSize; - } - - public override async IAsyncEnumerable> AsPages(string? continuationToken = default, int? pageSizeHint = default) - { - Func>>? pageFunc = string.IsNullOrEmpty(continuationToken) ? _firstPageFunc : _nextPageFunc; - - if (pageFunc == null) - { - yield break; - } - - int? pageSize = pageSizeHint ?? _defaultPageSize; - do - { - ResultPage page = await pageFunc(continuationToken, pageSize).ConfigureAwait(false); - SetRawResponse(page.GetRawResponse()); - yield return page; - continuationToken = page.ContinuationToken; - pageFunc = _nextPageFunc; - } - while (!string.IsNullOrEmpty(continuationToken) && pageFunc != null); - } - } - - private class FuncPageable : PageableCollection where T : notnull - { - private readonly Func> _firstPageFunc; - private readonly Func>? _nextPageFunc; - private readonly int? _defaultPageSize; - - public FuncPageable(Func> firstPageFunc, Func>? nextPageFunc, int? defaultPageSize = default) - { - _firstPageFunc = firstPageFunc; - _nextPageFunc = nextPageFunc; - _defaultPageSize = defaultPageSize; - } - - public override IEnumerable> AsPages(string? continuationToken = default, int? pageSizeHint = default) - { - Func>? pageFunc = string.IsNullOrEmpty(continuationToken) ? _firstPageFunc : _nextPageFunc; - - if (pageFunc == null) - { - yield break; - } - - int? pageSize = pageSizeHint ?? _defaultPageSize; - do - { - ResultPage page = pageFunc(continuationToken, pageSize); - SetRawResponse(page.GetRawResponse()); - yield return page; - continuationToken = page.ContinuationToken; - pageFunc = _nextPageFunc; - } - while (!string.IsNullOrEmpty(continuationToken) && pageFunc != null); - } - } -} diff --git a/sdk/core/System.ClientModel/tests/client/System.ClientModel.Tests.Client.csproj b/sdk/core/System.ClientModel/tests/client/System.ClientModel.Tests.Client.csproj index 8a60f3bfaac57..9ed77bfb7b69f 100644 --- a/sdk/core/System.ClientModel/tests/client/System.ClientModel.Tests.Client.csproj +++ b/sdk/core/System.ClientModel/tests/client/System.ClientModel.Tests.Client.csproj @@ -12,6 +12,7 @@ + diff --git a/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/Emitted/Argument.cs b/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/Emitted/Argument.cs new file mode 100644 index 0000000000000..79804fd51ac16 --- /dev/null +++ b/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/Emitted/Argument.cs @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace ClientModel.Tests.Paging; + +internal static class Argument +{ + public static void AssertNotNull(T? value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + } +} diff --git a/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/Emitted/CancellationTokenExtensions.cs b/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/Emitted/CancellationTokenExtensions.cs new file mode 100644 index 0000000000000..78058b617a068 --- /dev/null +++ b/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/Emitted/CancellationTokenExtensions.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.ClientModel.Primitives; +using System.Threading; + +namespace ClientModel.Tests.Paging; + +internal static class CancellationTokenExtensions +{ + public static RequestOptions ToRequestOptions(this CancellationToken cancellationToken) + { + return new RequestOptions() + { + CancellationToken = cancellationToken + }; + } +} diff --git a/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/Emitted/PageCollectionHelpers.cs b/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/Emitted/PageCollectionHelpers.cs new file mode 100644 index 0000000000000..21b5fba1a4b24 --- /dev/null +++ b/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/Emitted/PageCollectionHelpers.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.ClientModel; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; + +namespace ClientModel.Tests.Paging; + +internal class PageCollectionHelpers +{ + public static PageCollection Create(PageEnumerator enumerator) + => new EnumeratorPageCollection(enumerator); + + public static AsyncPageCollection CreateAsync(PageEnumerator enumerator) + => new AsyncEnumeratorPageCollection(enumerator); + + public static IEnumerable Create(PageResultEnumerator enumerator) + { + while (enumerator.MoveNext()) + { + yield return enumerator.Current; + } + } + + public static async IAsyncEnumerable CreateAsync(PageResultEnumerator enumerator) + { + while (await enumerator.MoveNextAsync().ConfigureAwait(false)) + { + yield return enumerator.Current; + } + } + + private class EnumeratorPageCollection : PageCollection + { + private readonly PageEnumerator _enumerator; + + public EnumeratorPageCollection(PageEnumerator enumerator) + { + _enumerator = enumerator; + } + + protected override PageResult GetCurrentPageCore() + => _enumerator.GetCurrentPage(); + + protected override IEnumerator> GetEnumeratorCore() + => _enumerator; + } + + private class AsyncEnumeratorPageCollection : AsyncPageCollection + { + private readonly PageEnumerator _enumerator; + + public AsyncEnumeratorPageCollection(PageEnumerator enumerator) + { + _enumerator = enumerator; + } + + protected override async Task> GetCurrentPageAsyncCore() + => await _enumerator.GetCurrentPageAsync().ConfigureAwait(false); + + protected override IAsyncEnumerator> GetAsyncEnumeratorCore(CancellationToken cancellationToken = default) + => _enumerator; + } +} diff --git a/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/Emitted/PageEnumerator.cs b/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/Emitted/PageEnumerator.cs new file mode 100644 index 0000000000000..53527a1e1a187 --- /dev/null +++ b/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/Emitted/PageEnumerator.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.ClientModel; +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace ClientModel.Tests.Paging; + +internal abstract class PageEnumerator : PageResultEnumerator, + IAsyncEnumerator>, + IEnumerator> +{ + public abstract PageResult GetPageFromResult(ClientResult result); + + public PageResult GetCurrentPage() + { + if (Current is null) + { + return GetPageFromResult(GetFirst()); + } + + return ((IEnumerator>)this).Current; + } + + public async Task> GetCurrentPageAsync() + { + if (Current is null) + { + return GetPageFromResult(await GetFirstAsync().ConfigureAwait(false)); + } + + return ((IEnumerator>)this).Current; + } + + PageResult IEnumerator>.Current + { + get + { + if (Current is null) + { + return default!; + } + + return GetPageFromResult(Current); + } + } + + PageResult IAsyncEnumerator>.Current + { + get + { + if (Current is null) + { + return default!; + } + + return GetPageFromResult(Current); + } + } +} diff --git a/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/Emitted/PageResultEnumerator.cs b/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/Emitted/PageResultEnumerator.cs new file mode 100644 index 0000000000000..64d2550f97db8 --- /dev/null +++ b/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/Emitted/PageResultEnumerator.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.ClientModel; +using System.Collections; +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace ClientModel.Tests.Paging; + +internal abstract class PageResultEnumerator : IAsyncEnumerator, IEnumerator +{ + private ClientResult? _current; + private bool _hasNext = true; + + public ClientResult Current => _current!; + + public abstract Task GetFirstAsync(); + + public abstract ClientResult GetFirst(); + + public abstract Task GetNextAsync(ClientResult result); + + public abstract ClientResult GetNext(ClientResult result); + + public abstract bool HasNext(ClientResult result); + + object IEnumerator.Current => ((IEnumerator)this).Current; + + public bool MoveNext() + { + if (!_hasNext) + { + return false; + } + + if (_current == null) + { + _current = GetFirst(); + } + else + { + _current = GetNext(_current); + } + + _hasNext = HasNext(_current); + return true; + } + + void IEnumerator.Reset() => _current = null; + + void IDisposable.Dispose() { } + + public async ValueTask MoveNextAsync() + { + if (!_hasNext) + { + return false; + } + + if (_current == null) + { + _current = await GetFirstAsync().ConfigureAwait(false); + } + else + { + _current = await GetNextAsync(_current).ConfigureAwait(false); + } + + _hasNext = HasNext(_current); + return true; + } + + ValueTask IAsyncDisposable.DisposeAsync() => default; +} diff --git a/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/MockData/MockPagingData.cs b/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/MockData/MockPagingData.cs new file mode 100644 index 0000000000000..9a004c51eec09 --- /dev/null +++ b/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/MockData/MockPagingData.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.ClientModel; +using System.Collections.Generic; +using System.Linq; + +namespace ClientModel.Tests.Paging; + +public class MockPagingData +{ + public const int Count = 16; + + public const string DefaultOrder = "asc"; + public const int DefaultPageSize = 8; + public const int DefaultOffset = 0; + + // Source of all the data + public static IEnumerable GetValues() + { + for (int i = 0; i < Count; i++) + { + yield return new ValueItem(i, $"{i}"); + } + } + + // Filters on top of data source + public static IEnumerable GetValues( + string? order, + int? pageSize, + int? offset) + { + order ??= DefaultOrder; + pageSize ??= DefaultPageSize; + offset ??= DefaultOffset; + + IEnumerable ordered = order == "asc" ? + GetValues() : + GetValues().Reverse(); + IEnumerable skipped = ordered.Skip(offset.Value); + IEnumerable page = skipped.Take(pageSize.Value); + + return page; + } + + // Turn data into a page result for protocol layer + public static ClientResult GetPageResult(IEnumerable values) + => ClientResult.FromResponse(new MockValueItemPageResponse(values)); +} diff --git a/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/MockData/MockValueItemPageResponse.cs b/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/MockData/MockValueItemPageResponse.cs new file mode 100644 index 0000000000000..f21cb0720d269 --- /dev/null +++ b/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/MockData/MockValueItemPageResponse.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace ClientModel.Tests.Paging; + +internal class MockValueItemPageResponse : PipelineResponse +{ + public MockValueItemPageResponse(IEnumerable values) + { + StringBuilder sb = new StringBuilder(); + sb.AppendLine("["); + + int count = 0; + foreach (ValueItem value in values) + { + sb.AppendLine(value.ToJson()); + + if (++count != values.Count()) + { + sb.AppendLine(","); + } + } + sb.AppendLine("]"); + + Content = BinaryData.FromString(sb.ToString()); + } + + public override int Status => 200; + + public override string ReasonPhrase => "OK"; + + public override Stream? ContentStream + { + get => null; + set => throw new NotImplementedException(); + } + + public override BinaryData Content { get; } + + protected override PipelineResponseHeaders HeadersCore => throw new NotImplementedException(); + + public override BinaryData BufferContent(CancellationToken cancellationToken = default) + => Content; + + public override ValueTask BufferContentAsync(CancellationToken cancellationToken = default) + => new(Content); + + public override void Dispose() { } +} diff --git a/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/PagingClient.cs b/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/PagingClient.cs new file mode 100644 index 0000000000000..c44c08c57ac3a --- /dev/null +++ b/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/PagingClient.cs @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Threading; + +namespace ClientModel.Tests.Paging; + +// A mock client implementation that illustrates paging patterns for client +// endpoints that have both convenience and protocol methods. +public class PagingClient +{ + private readonly ClientPipeline _pipeline; + private readonly Uri _endpoint; + + public PagingClient(PagingClientOptions options) + { + _pipeline = ClientPipeline.Create(options); + _endpoint = new Uri("https://www.paging.com"); + } + + public virtual AsyncPageCollection GetValuesAsync( + string? order = default, + int? pageSize = default, + int? offset = default, + CancellationToken cancellationToken = default) + { + ValuesPageEnumerator enumerator = new ValuesPageEnumerator( + _pipeline, + _endpoint, + order: order, + pageSize: pageSize, + offset: offset, + cancellationToken.ToRequestOptions()); + return PageCollectionHelpers.CreateAsync(enumerator); + } + + public virtual AsyncPageCollection GetValuesAsync( + ContinuationToken firstPageToken, + CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(firstPageToken, nameof(firstPageToken)); + + ValuesPageToken token = ValuesPageToken.FromToken(firstPageToken); + ValuesPageEnumerator enumerator = new ValuesPageEnumerator( + _pipeline, + _endpoint, + token.Order, + token.PageSize, + token.Offset, + cancellationToken.ToRequestOptions()); + return PageCollectionHelpers.CreateAsync(enumerator); + } + + public virtual PageCollection GetValues( + string? order = default, + int? pageSize = default, + int? offset = default, + CancellationToken cancellationToken = default) + { + ValuesPageEnumerator enumerator = new ValuesPageEnumerator( + _pipeline, + _endpoint, + order: order, + pageSize: pageSize, + offset: offset, + cancellationToken.ToRequestOptions()); + return PageCollectionHelpers.Create(enumerator); + } + + public virtual PageCollection GetValues( + ContinuationToken firstPageToken, + CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(firstPageToken, nameof(firstPageToken)); + + ValuesPageToken token = ValuesPageToken.FromToken(firstPageToken); + ValuesPageEnumerator enumerator = new ValuesPageEnumerator( + _pipeline, + _endpoint, + token.Order, + token.PageSize, + token.Offset, + cancellationToken.ToRequestOptions()); + return PageCollectionHelpers.Create(enumerator); + } + + public virtual IAsyncEnumerable GetValuesAsync( + string? order, + int? pageSize, + int? offset, + RequestOptions options) + { + ValuesPageEnumerator enumerator = new ValuesPageEnumerator( + _pipeline, + _endpoint, + order: order, + pageSize: pageSize, + offset: offset, + options); + return PageCollectionHelpers.CreateAsync(enumerator); + } + + public virtual IEnumerable GetValues( + string? order, + int? pageSize, + int? offset, + RequestOptions options) + { + ValuesPageEnumerator enumerator = new ValuesPageEnumerator( + _pipeline, + _endpoint, + order: order, + pageSize: pageSize, + offset: offset, + options); + return PageCollectionHelpers.Create(enumerator); + } +} diff --git a/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/PagingClientOptions.cs b/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/PagingClientOptions.cs new file mode 100644 index 0000000000000..0813e7730122f --- /dev/null +++ b/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/PagingClientOptions.cs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; + +namespace ClientModel.Tests.Paging; + +public class PagingClientOptions : ClientPipelineOptions +{ +} diff --git a/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/PagingProtocolClient.cs b/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/PagingProtocolClient.cs new file mode 100644 index 0000000000000..05c4779bb792b --- /dev/null +++ b/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/PagingProtocolClient.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; + +namespace ClientModel.Tests.Paging; + +// A mock client implementation that illustrates paging patterns for client +// endpoints that only have protocol methods. +public class PagingProtocolClient +{ + private readonly ClientPipeline _pipeline; + private readonly Uri _endpoint; + + public PagingProtocolClient(PagingClientOptions options) + { + _pipeline = ClientPipeline.Create(options); + _endpoint = new Uri("https://www.paging.com"); + } + + public virtual IAsyncEnumerable GetValuesAsync( + string? order, + int? pageSize, + int? offset, + RequestOptions? options = default) + { + PageResultEnumerator enumerator = new ValuesPageResultEnumerator( + _pipeline, + _endpoint, + order, + pageSize, + offset, + options); + return PageCollectionHelpers.CreateAsync(enumerator); + } + + public virtual IEnumerable GetValues( + string? order, + int? pageSize, + int? offset, + RequestOptions? options = default) + { + PageResultEnumerator enumerator = new ValuesPageResultEnumerator( + _pipeline, + _endpoint, + order, + pageSize, + offset, + options); + return PageCollectionHelpers.Create(enumerator); + } +} diff --git a/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/ValueItem.cs b/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/ValueItem.cs new file mode 100644 index 0000000000000..5265fc52d974e --- /dev/null +++ b/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/ValueItem.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Text.Json; + +namespace ClientModel.Tests.Paging; + +// A mock model that illustrate values that can be returned in a page collection +public class ValueItem +{ + public ValueItem(int id, string value) + { + Id = id; + Value = value; + } + + public int Id { get; } + public string Value { get; } + + public string ToJson() => $"{{ \"id\" : {Id}, \"value\" : \"{Value}\" }}"; + + public static ValueItem FromJson(JsonElement element) + { + int id = element.GetProperty("id").GetInt32(); + string value = element.GetProperty("value").GetString()!; + return new ValueItem(id, value); + } + + public override string ToString() => ToJson(); +} diff --git a/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/ValueItemPage.cs b/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/ValueItemPage.cs new file mode 100644 index 0000000000000..8dbde03dacaac --- /dev/null +++ b/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/ValueItemPage.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Text.Json; + +namespace ClientModel.Tests.Paging; + +// In a real client, this type would be generated but would be made internal. +// It corresponds to the REST API definition of the response that comes back +// with a list of items in a page. +internal class ValueItemPage +{ + protected ValueItemPage(List values) + { + Values = values; + } + + public IReadOnlyList Values { get; set; } + + public static ValueItemPage FromJson(BinaryData json) + { + List items = new(); + + using JsonDocument doc = JsonDocument.Parse(json); + foreach (JsonElement element in doc.RootElement.EnumerateArray()) + { + items.Add(ValueItem.FromJson(element)); + } + + return new ValueItemPage(items); + } +} diff --git a/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/ValuesPageEnumerator.cs b/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/ValuesPageEnumerator.cs new file mode 100644 index 0000000000000..67d32ba833db3 --- /dev/null +++ b/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/ValuesPageEnumerator.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace ClientModel.Tests.Paging; + +// Mocks a page enumerator a client would evolve to for paged endpoints when +// the client adds convenience methods. +internal class ValuesPageEnumerator : PageEnumerator +{ + private readonly ClientPipeline _pipeline; + private readonly Uri _endpoint; + + private readonly string? _order; + private readonly int? _pageSize; + + // This one is special - it keeps track of which page we're on. + private int? _offset; + + // We need two offsets to be able to create both page tokens. + private int _nextOffset; + + private readonly RequestOptions? _options; + + public ValuesPageEnumerator( + ClientPipeline pipeline, + Uri endpoint, + string? order, + int? pageSize, + int? offset, + RequestOptions? options) + { + _pipeline = pipeline; + _endpoint = endpoint; + + _order = order; + _pageSize = pageSize; + _offset = offset; + + _options = options; + } + + public override PageResult GetPageFromResult(ClientResult result) + { + PipelineResponse response = result.GetRawResponse(); + ValueItemPage pageModel = ValueItemPage.FromJson(response.Content); + + ValuesPageToken pageToken = ValuesPageToken.FromOptions(_order, _pageSize, _offset); + ValuesPageToken? nextPageToken = pageToken.GetNextPageToken(_nextOffset, MockPagingData.Count); + + return PageResult.Create(pageModel.Values, pageToken, nextPageToken, response); + } + + public override ClientResult GetFirst() + { + ClientResult result = GetValuesPage(_order, _pageSize, _offset); + + _nextOffset = GetNextOffset(_offset, _pageSize); + + return result; + } + + public override async Task GetFirstAsync() + { + ClientResult result = await GetValuesPageAsync(_order, _pageSize, _offset).ConfigureAwait(false); + + _nextOffset = GetNextOffset(_offset, _pageSize); + + return result; + } + + public override ClientResult GetNext(ClientResult result) + { + _offset = _nextOffset; + + ClientResult pageResult = GetValuesPage(_order, _pageSize, _offset); + + _nextOffset = GetNextOffset(_offset, _pageSize); + + return pageResult; + } + + public override async Task GetNextAsync(ClientResult result) + { + _offset = _nextOffset; + + ClientResult pageResult = await GetValuesPageAsync(_order, _pageSize, _offset).ConfigureAwait(false); + + _nextOffset = GetNextOffset(_offset, _pageSize); + + return pageResult; + } + + public override bool HasNext(ClientResult result) + { + return _nextOffset < MockPagingData.Count; + } + + // In a real client implementation, these would be the generated protocol + // method used to obtain a page of items. + internal virtual async Task GetValuesPageAsync( + string? order, + int? pageSize, + int? offset, + RequestOptions? options = default) + { + await Task.Delay(0); + IEnumerable values = MockPagingData.GetValues(order, pageSize, offset); + return MockPagingData.GetPageResult(values); + } + + internal virtual ClientResult GetValuesPage( + string? order, + int? pageSize, + int? offset, + RequestOptions? options = default) + { + IEnumerable values = MockPagingData.GetValues(order, pageSize, offset); + return MockPagingData.GetPageResult(values); + } + + // This helper method is specific to this mock enumerator implementation + private static int GetNextOffset(int? offset, int? pageSize) + { + offset ??= MockPagingData.DefaultOffset; + pageSize ??= MockPagingData.DefaultPageSize; + return offset.Value + pageSize.Value; + } +} diff --git a/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/ValuesPageResultEnumerator.cs b/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/ValuesPageResultEnumerator.cs new file mode 100644 index 0000000000000..655d49f4bfe97 --- /dev/null +++ b/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/ValuesPageResultEnumerator.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace ClientModel.Tests.Paging; + +// Mocks a page result enumerator a client would have for paged endpoints when +// those endpoints only have protocol methods on the client. +internal class ValuesPageResultEnumerator : PageResultEnumerator +{ + private readonly ClientPipeline _pipeline; + private readonly Uri _endpoint; + + private readonly string? _order; + private readonly int? _pageSize; + + // This one is special - it keeps track of which page we're on. + private int? _offset; + + // We need two offsets to be able to create both page tokens. + private int _nextOffset; + + private readonly RequestOptions? _options; + + public ValuesPageResultEnumerator( + ClientPipeline pipeline, + Uri endpoint, + string? order, + int? pageSize, + int? offset, + RequestOptions? options) + { + _pipeline = pipeline; + _endpoint = endpoint; + + _order = order; + _pageSize = pageSize; + _offset = offset; + + _options = options; + } + + public override ClientResult GetFirst() + { + ClientResult result = GetValuesPage(_order, _pageSize, _offset); + + _nextOffset = GetNextOffset(_offset, _pageSize); + + return result; + } + + public override async Task GetFirstAsync() + { + ClientResult result = await GetValuesPageAsync(_order, _pageSize, _offset).ConfigureAwait(false); + + _nextOffset = GetNextOffset(_offset, _pageSize); + + return result; + } + + public override ClientResult GetNext(ClientResult result) + { + _offset = _nextOffset; + + ClientResult pageResult = GetValuesPage(_order, _pageSize, _offset); + + _nextOffset = GetNextOffset(_offset, _pageSize); + + return pageResult; + } + + public override async Task GetNextAsync(ClientResult result) + { + _offset = _nextOffset; + + ClientResult pageResult = await GetValuesPageAsync(_order, _pageSize, _offset).ConfigureAwait(false); + + _nextOffset = GetNextOffset(_offset, _pageSize); + + return pageResult; + } + + public override bool HasNext(ClientResult result) + { + return _nextOffset < MockPagingData.Count; + } + + // In a real client implementation, these would be the generated protocol + // method used to obtain a page of items. + internal virtual async Task GetValuesPageAsync( + string? order, + int? pageSize, + int? offset, + RequestOptions? options = default) + { + await Task.Delay(0); + IEnumerable values = MockPagingData.GetValues(order, pageSize, offset); + return MockPagingData.GetPageResult(values); + } + + internal virtual ClientResult GetValuesPage( + string? order, + int? pageSize, + int? offset, + RequestOptions? options = default) + { + IEnumerable values = MockPagingData.GetValues(order, pageSize, offset); + return MockPagingData.GetPageResult(values); + } + + // This helper method is specific to this mock enumerator implementation + private static int GetNextOffset(int? offset, int? pageSize) + { + offset ??= MockPagingData.DefaultOffset; + pageSize ??= MockPagingData.DefaultPageSize; + return offset.Value + pageSize.Value; + } +} diff --git a/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/ValuesPageToken.cs b/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/ValuesPageToken.cs new file mode 100644 index 0000000000000..3a205541eadc2 --- /dev/null +++ b/sdk/core/System.ClientModel/tests/client/TestClients/PagingClient/ValuesPageToken.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.ClientModel; +using System.Diagnostics; +using System.IO; +using System.Text.Json; + +namespace ClientModel.Tests.Paging; + +internal class ValuesPageToken : ContinuationToken +{ + protected ValuesPageToken(string? order, int? pageSize, int? offset) + { + Order = order; + PageSize = pageSize; + Offset = offset; + } + + public string? Order { get; } + public int? PageSize { get; } + public int? Offset { get; } + + public override BinaryData ToBytes() + { + using MemoryStream stream = new(); + using Utf8JsonWriter writer = new(stream); + + writer.WriteStartObject(); + + if (Order is not null) + { + writer.WriteString("order", Order); + } + + if (PageSize.HasValue) + { + writer.WriteNumber("pageSize", PageSize.Value); + } + + if (Offset.HasValue) + { + writer.WriteNumber("offset", Offset.Value); + } + + writer.WriteEndObject(); + + writer.Flush(); + stream.Position = 0; + + return BinaryData.FromStream(stream); + } + + public ValuesPageToken? GetNextPageToken(int offset, int count) + { + if (offset >= count) + { + return null; + } + + return new ValuesPageToken(Order, PageSize, offset); + } + + public static ValuesPageToken FromToken(ContinuationToken pageToken) + { + if (pageToken is ValuesPageToken token) + { + return token; + } + + BinaryData data = pageToken.ToBytes(); + + if (data.ToMemory().Length == 0) + { + throw new ArgumentException("Failed to create ValuesPageToken from provided pageToken.", nameof(pageToken)); + } + + Utf8JsonReader reader = new(data); + + string? order = null; + int? pageSize = null; + int? offset = null; + + reader.Read(); + + Debug.Assert(reader.TokenType == JsonTokenType.StartObject); + + while (reader.Read()) + { + if (reader.TokenType == JsonTokenType.EndObject) + { + break; + } + + Debug.Assert(reader.TokenType == JsonTokenType.PropertyName); + + string propertyName = reader.GetString()!; + + switch (propertyName) + { + case "order": + reader.Read(); + Debug.Assert(reader.TokenType == JsonTokenType.String); + order = reader.GetString(); + break; + + case "pageSize": + reader.Read(); + Debug.Assert(reader.TokenType == JsonTokenType.Number); + pageSize = reader.GetInt32(); + break; + + case "offset": + reader.Read(); + Debug.Assert(reader.TokenType == JsonTokenType.Number); + offset = reader.GetInt32(); + break; + default: + throw new JsonException($"Unrecognized property '{propertyName}'."); + } + } + + return new(order, pageSize, offset); + } + + public static ValuesPageToken FromOptions(string? order, int? pageSize, int? offset) + => new(order, pageSize, offset); +} diff --git a/sdk/core/System.ClientModel/tests/internal/Convenience/SSE/ClientResultCollectionTests.cs b/sdk/core/System.ClientModel/tests/internal/Convenience/SSE/ClientResultCollectionTests.cs index 8e2fb8d3095e3..d9f896e7769e8 100644 --- a/sdk/core/System.ClientModel/tests/internal/Convenience/SSE/ClientResultCollectionTests.cs +++ b/sdk/core/System.ClientModel/tests/internal/Convenience/SSE/ClientResultCollectionTests.cs @@ -21,7 +21,7 @@ public ClientResultCollectionTests(bool isAsync) : base(isAsync) public async Task EnumeratesModelValues() { MockSseClient client = new(); - AsyncResultCollection models = client.GetModelsStreamingAsync(); + AsyncCollectionResult models = client.GetModelsStreamingAsync(); int i = 0; await foreach (MockJsonModel model in models) @@ -39,7 +39,7 @@ public async Task EnumeratesModelValues() public async Task ModelCollectionDelaysSendingRequest() { MockSseClient client = new(); - AsyncResultCollection models = client.GetModelsStreamingAsync(); + AsyncCollectionResult models = client.GetModelsStreamingAsync(); Assert.IsFalse(client.ProtocolMethodCalled); @@ -60,7 +60,7 @@ public async Task ModelCollectionDelaysSendingRequest() public void ModelCollectionThrowsIfCancelled() { MockSseClient client = new(); - AsyncResultCollection models = client.GetModelsStreamingAsync(); + AsyncCollectionResult models = client.GetModelsStreamingAsync(); // Set it to `cancelled: true` to validate functionality. CancellationToken token = new(true); @@ -77,7 +77,7 @@ public void ModelCollectionThrowsIfCancelled() public async Task ModelCollectionDisposesStream() { MockSseClient client = new(); - AsyncResultCollection models = client.GetModelsStreamingAsync(); + AsyncCollectionResult models = client.GetModelsStreamingAsync(); await foreach (MockJsonModel model in models) { @@ -91,7 +91,7 @@ public async Task ModelCollectionDisposesStream() public void ModelCollectionGetRawResponseThrowsBeforeEnumerated() { MockSseClient client = new(); - AsyncResultCollection models = client.GetModelsStreamingAsync(); + AsyncCollectionResult models = client.GetModelsStreamingAsync(); Assert.Throws(() => { PipelineResponse response = models.GetRawResponse(); }); } @@ -99,7 +99,7 @@ public void ModelCollectionGetRawResponseThrowsBeforeEnumerated() public async Task StopsOnStringBasedTerminalEvent() { MockSseClient client = new(); - AsyncResultCollection models = client.GetModelsStreamingAsync("[DONE]"); + AsyncCollectionResult models = client.GetModelsStreamingAsync("[DONE]"); bool empty = true; await foreach (MockJsonModel model in models) diff --git a/sdk/core/System.ClientModel/tests/internal/TestFramework/Mocks/MockSseClient.cs b/sdk/core/System.ClientModel/tests/internal/TestFramework/Mocks/MockSseClient.cs index 2113d2acb0474..34d156fc486b8 100644 --- a/sdk/core/System.ClientModel/tests/internal/TestFramework/Mocks/MockSseClient.cs +++ b/sdk/core/System.ClientModel/tests/internal/TestFramework/Mocks/MockSseClient.cs @@ -41,7 +41,7 @@ public class MockSseClient public bool ProtocolMethodCalled { get; private set; } // mock convenience method - public virtual AsyncResultCollection GetModelsStreamingAsync(string content = DefaultMockContent) + public virtual AsyncCollectionResult GetModelsStreamingAsync(string content = DefaultMockContent) { return new AsyncMockJsonModelCollection(content, GetModelsStreamingAsync); } @@ -63,7 +63,7 @@ public virtual ClientResult GetModelsStreamingAsync(string content, RequestOptio // Internal client implementation of convenience-layer AsyncResultCollection. // This currently layers over an internal AsyncResultCollection // representing the event.data values, but does not strictly have to. - private class AsyncMockJsonModelCollection : AsyncResultCollection + private class AsyncMockJsonModelCollection : AsyncCollectionResult { private readonly string _content; private readonly Func _protocolMethod; diff --git a/sdk/core/System.ClientModel/tests/internal/TestFramework/Mocks/MockSseClientExtensions.cs b/sdk/core/System.ClientModel/tests/internal/TestFramework/Mocks/MockSseClientExtensions.cs index 00ebadbe6e60f..ac493b7abd644 100644 --- a/sdk/core/System.ClientModel/tests/internal/TestFramework/Mocks/MockSseClientExtensions.cs +++ b/sdk/core/System.ClientModel/tests/internal/TestFramework/Mocks/MockSseClientExtensions.cs @@ -15,7 +15,7 @@ namespace ClientModel.Tests.Internal.Mocks; public static class MockSseClientExtensions { - public static AsyncResultCollection EnumerateDataEvents(this PipelineResponse response) + public static AsyncCollectionResult EnumerateDataEvents(this PipelineResponse response) { if (response.ContentStream is null) { @@ -25,7 +25,7 @@ public static AsyncResultCollection EnumerateDataEvents(this Pipelin return new AsyncSseDataEventCollection(response, "[DONE]"); } - private class AsyncSseDataEventCollection : AsyncResultCollection + private class AsyncSseDataEventCollection : AsyncCollectionResult { private readonly string _terminalData; From 2c14024279f0d853403d65bd02e020f8b095643a Mon Sep 17 00:00:00 2001 From: Martin Costello Date: Tue, 9 Jul 2024 14:57:40 +0100 Subject: [PATCH 037/144] Avoid ServiceBus*Options allocations (#44885) - Avoid allocating empty `ServiceBusClientOptions` and `ServiceBusProcessorOptions` instances when creating instances of `ServiceBusClient` and `ServiceBusProcessor`. - Remove unused `ServiceBusSenderOptions.Clone()` method. --- .../src/Client/ServiceBusClient.cs | 8 ++++---- .../src/Sender/ServiceBusSenderOptions.cs | 11 ----------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Client/ServiceBusClient.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Client/ServiceBusClient.cs index ce542dad734a1..c77abfe5a787f 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Client/ServiceBusClient.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Client/ServiceBusClient.cs @@ -120,7 +120,7 @@ protected ServiceBusClient() /// Other values will be ignored; to configure the processor, please use the . /// public ServiceBusClient(string connectionString) : - this(connectionString, new ServiceBusClientOptions()) + this(connectionString, null as ServiceBusClientOptions) { } @@ -192,7 +192,7 @@ public ServiceBusClient( /// This is likely to be similar to {yournamespace}.servicebus.windows.net. /// The Azure managed identity credential to use for authorization. Access controls may be specified by the Service Bus namespace. public ServiceBusClient(string fullyQualifiedNamespace, TokenCredential credential) : - this(fullyQualifiedNamespace, (object)credential, new ServiceBusClientOptions()) + this(fullyQualifiedNamespace, (object)credential, null) { } @@ -562,7 +562,7 @@ public virtual ServiceBusProcessor CreateProcessor(string queueName) entityPath: queueName, connection: Connection, isSessionEntity: false, - options: new ServiceBusProcessorOptions()); + options: null); } /// @@ -619,7 +619,7 @@ public virtual ServiceBusProcessor CreateProcessor( entityPath: EntityNameFormatter.FormatSubscriptionPath(topicName, subscriptionName), connection: Connection, isSessionEntity: false, - options: new ServiceBusProcessorOptions()); + options: null); } /// diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Sender/ServiceBusSenderOptions.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Sender/ServiceBusSenderOptions.cs index 620c1d38b3a6e..5d515df176115 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Sender/ServiceBusSenderOptions.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Sender/ServiceBusSenderOptions.cs @@ -44,16 +44,5 @@ public class ServiceBusSenderOptions /// [EditorBrowsable(EditorBrowsableState.Never)] public override string ToString() => base.ToString(); - - /// - /// Creates a new copy of the current , cloning its attributes into a new instance. - /// - /// - /// A new copy of . - internal ServiceBusSenderOptions Clone() => - new ServiceBusSenderOptions - { - Identifier = Identifier - }; } } From 5050c6abec7e20442a169e073705dce91b3536f2 Mon Sep 17 00:00:00 2001 From: Madalyn Redding <66138537+m-redding@users.noreply.github.com> Date: Tue, 9 Jul 2024 10:45:19 -0400 Subject: [PATCH 038/144] [Schema Registry] Generating from TypeSpec for JSON GA (#44881) * regenerating * API * cleanup files * test recordings * clean up Avro package * cleaned up too much... * fix test recordings --- ...zure.Data.SchemaRegistry.netstandard2.0.cs | 5 +- .../Azure.Data.SchemaRegistry/assets.json | 2 +- .../src/ContentType.cs | 24 +- ...DataSchemaRegistryClientBuildExtensions.cs | 12 + ...taSchemaRegistryClientBuilderExtensions.cs | 34 + .../Internal/ChangeTrackingDictionary.cs | 167 ---- .../Generated/Internal/ChangeTrackingList.cs | 153 ---- .../Internal/ModelSerializationExtensions.cs | 395 -------- .../MultipartFormDataRequestContent.cs | 203 ----- .../src/Generated/Internal/Optional.cs | 51 -- .../Internal/RequestContentHelper.cs | 136 --- .../Internal/Utf8JsonRequestContent.cs | 55 -- .../src/Generated/Models/ContentType.cs | 36 - .../Generated/Models/Error.Serialization.cs | 40 - .../src/Generated/Models/Error.cs | 28 - .../Models/ErrorDetail.Serialization.cs | 62 -- .../src/Generated/Models/ErrorDetail.cs | 48 - .../Models/SchemaGroups.Serialization.cs | 56 -- .../src/Generated/Models/SchemaGroups.cs | 35 - .../src/Generated/Models/SchemaId.cs | 23 - .../Models/SchemaVersions.Serialization.cs | 56 -- .../src/Generated/Models/SchemaVersions.cs | 35 - .../src/Generated/SchemaGetByIdHeaders.cs | 34 - .../SchemaGetSchemaVersionHeaders.cs | 34 - .../src/Generated/SchemaGroupsRestClient.cs | 168 ---- .../SchemaQueryIdByContentHeaders.cs | 32 - .../src/Generated/SchemaRegisterHeaders.cs | 32 - .../src/Generated/SchemaRegistryClient.cs | 848 ++++++++++++++++++ .../Generated/SchemaRegistryClientOptions.cs | 29 + .../src/Generated/SchemaRestClient.cs | 568 ------------ .../src/SchemaFormat.cs | 1 - .../src/SchemaGroups.cs | 9 - .../Azure.Data.SchemaRegistry/src/SchemaId.cs | 12 - .../src/SchemaRegistryClient.cs | 114 ++- .../src/SchemaRegistryClientOptions.cs | 29 +- .../src/SchemaRegistryModelFactory.cs | 1 - .../src/SchemaVersions.cs | 9 - .../Azure.Data.SchemaRegistry/src/autorest.md | 115 --- .../tests/SchemaRegistryClientLiveTests.cs | 21 +- .../tsp-location.yaml | 4 + .../assets.json | 2 +- ...zure.Data.SchemaRegistry.ApacheAvro.csproj | 10 +- 42 files changed, 1039 insertions(+), 2689 deletions(-) create mode 100644 sdk/schemaregistry/Azure.Data.SchemaRegistry/src/DataSchemaRegistryClientBuildExtensions.cs create mode 100644 sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/DataSchemaRegistryClientBuilderExtensions.cs delete mode 100644 sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/ChangeTrackingDictionary.cs delete mode 100644 sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/ChangeTrackingList.cs delete mode 100644 sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/ModelSerializationExtensions.cs delete mode 100644 sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/MultipartFormDataRequestContent.cs delete mode 100644 sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/Optional.cs delete mode 100644 sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/RequestContentHelper.cs delete mode 100644 sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/Utf8JsonRequestContent.cs delete mode 100644 sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/ContentType.cs delete mode 100644 sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/Error.Serialization.cs delete mode 100644 sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/Error.cs delete mode 100644 sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/ErrorDetail.Serialization.cs delete mode 100644 sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/ErrorDetail.cs delete mode 100644 sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/SchemaGroups.Serialization.cs delete mode 100644 sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/SchemaGroups.cs delete mode 100644 sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/SchemaId.cs delete mode 100644 sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/SchemaVersions.Serialization.cs delete mode 100644 sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/SchemaVersions.cs delete mode 100644 sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/SchemaGetByIdHeaders.cs delete mode 100644 sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/SchemaGetSchemaVersionHeaders.cs delete mode 100644 sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/SchemaGroupsRestClient.cs delete mode 100644 sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/SchemaQueryIdByContentHeaders.cs delete mode 100644 sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/SchemaRegisterHeaders.cs create mode 100644 sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/SchemaRegistryClient.cs create mode 100644 sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/SchemaRegistryClientOptions.cs delete mode 100644 sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/SchemaRestClient.cs delete mode 100644 sdk/schemaregistry/Azure.Data.SchemaRegistry/src/SchemaGroups.cs delete mode 100644 sdk/schemaregistry/Azure.Data.SchemaRegistry/src/SchemaId.cs delete mode 100644 sdk/schemaregistry/Azure.Data.SchemaRegistry/src/SchemaVersions.cs delete mode 100644 sdk/schemaregistry/Azure.Data.SchemaRegistry/src/autorest.md create mode 100644 sdk/schemaregistry/Azure.Data.SchemaRegistry/tsp-location.yaml diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/api/Azure.Data.SchemaRegistry.netstandard2.0.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/api/Azure.Data.SchemaRegistry.netstandard2.0.cs index c627df1310333..1df798114d282 100644 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/api/Azure.Data.SchemaRegistry.netstandard2.0.cs +++ b/sdk/schemaregistry/Azure.Data.SchemaRegistry/api/Azure.Data.SchemaRegistry.netstandard2.0.cs @@ -34,6 +34,7 @@ protected SchemaRegistryClient() { } public SchemaRegistryClient(string fullyQualifiedNamespace, Azure.Core.TokenCredential credential) { } public SchemaRegistryClient(string fullyQualifiedNamespace, Azure.Core.TokenCredential credential, Azure.Data.SchemaRegistry.SchemaRegistryClientOptions options) { } public string FullyQualifiedNamespace { get { throw null; } } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } public virtual Azure.Response GetSchema(string groupName, string schemaName, int schemaVersion, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetSchema(string schemaId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetSchemaAsync(string groupName, string schemaName, int schemaVersion, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -45,12 +46,12 @@ public SchemaRegistryClient(string fullyQualifiedNamespace, Azure.Core.TokenCred } public partial class SchemaRegistryClientOptions : Azure.Core.ClientOptions { - public SchemaRegistryClientOptions(Azure.Data.SchemaRegistry.SchemaRegistryClientOptions.ServiceVersion version = Azure.Data.SchemaRegistry.SchemaRegistryClientOptions.ServiceVersion.V2023_07) { } + public SchemaRegistryClientOptions(Azure.Data.SchemaRegistry.SchemaRegistryClientOptions.ServiceVersion version = Azure.Data.SchemaRegistry.SchemaRegistryClientOptions.ServiceVersion.V2023_07_01) { } public enum ServiceVersion { V2021_10 = 1, V2022_10 = 2, - V2023_07 = 3, + V2023_07_01 = 3, } } public static partial class SchemaRegistryModelFactory diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/assets.json b/sdk/schemaregistry/Azure.Data.SchemaRegistry/assets.json index 76576d4952842..c9a66cb0e0a5b 100644 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/assets.json +++ b/sdk/schemaregistry/Azure.Data.SchemaRegistry/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/schemaregistry/Azure.Data.SchemaRegistry", - "Tag": "net/schemaregistry/Azure.Data.SchemaRegistry_e2ef99a396" + "Tag": "net/schemaregistry/Azure.Data.SchemaRegistry_4b3f12dd0e" } diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/ContentType.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/ContentType.cs index 90b8c6c3e59f0..70d53c6aa38e9 100644 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/ContentType.cs +++ b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/ContentType.cs @@ -3,32 +3,46 @@ using System; using System.ComponentModel; -using Azure.Core; namespace Azure.Data.SchemaRegistry { /// The SerializationType. - [CodeGenModel("ContentType")] internal readonly partial struct ContentType : IEquatable { + private const string AvroValue = "application/json; serialization=Avro"; + private const string JsonValue = "application/json; serialization=json"; + private const string CustomValue = "text/plain; charset=utf-8"; + private const string ProtobufValue = "text/vnd.ms.protobuf"; + private readonly string _value; + /// Initializes a new instance of . + /// is null. + public ContentType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + /// application/json; serialization=Avro. - [CodeGenMember("ApplicationJsonSerializationAvro")] public static ContentType Avro { get; } = new ContentType(AvroValue); /// application/json; serialization=json. - [CodeGenMember("ApplicationJsonSerializationJson")] public static ContentType Json { get; } = new ContentType(JsonValue); /// text/plain; charset=utf-8. - [CodeGenMember("TextPlainCharsetUtf8")] public static ContentType Custom { get; } = new ContentType(CustomValue); ///// text/vnd.ms.protobuf. //[CodeGenMember("TextVndMsProtobuf")] //public static ContentType Protobuf { get; } = new ContentType(ProtobufValue); + /// Determines if two values are the same. + public static bool operator ==(ContentType left, ContentType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ContentType left, ContentType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ContentType(string value) => new ContentType(value); + /// [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is ContentType other && Equals(other); diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/DataSchemaRegistryClientBuildExtensions.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/DataSchemaRegistryClientBuildExtensions.cs new file mode 100644 index 0000000000000..d09c417ffda12 --- /dev/null +++ b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/DataSchemaRegistryClientBuildExtensions.cs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; + +namespace Azure.Data.SchemaRegistry +{ + [CodeGenClient("DataSchemaRegistryClientBuilderExtensions")] + internal static partial class DataSchemaRegistryClientBuilderExtensions + { + } +} diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/DataSchemaRegistryClientBuilderExtensions.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/DataSchemaRegistryClientBuilderExtensions.cs new file mode 100644 index 0000000000000..c9c851ccb1b4e --- /dev/null +++ b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/DataSchemaRegistryClientBuilderExtensions.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core.Extensions; + +namespace Azure.Data.SchemaRegistry +{ + /// Extension methods to add to client builder. + internal static partial class DataSchemaRegistryClientBuilderExtensions + { + /// Registers a instance. + /// The builder to register with. + /// The Schema Registry service endpoint, for example 'my-namespace.servicebus.windows.net'. + public static IAzureClientBuilder AddSchemaRegistryClient(this TBuilder builder, Uri endpoint) + where TBuilder : IAzureClientFactoryBuilderWithCredential + { + return builder.RegisterClientFactory((options, cred) => new SchemaRegistryClient(endpoint, cred, options)); + } + + /// Registers a instance. + /// The builder to register with. + /// The configuration values. + public static IAzureClientBuilder AddSchemaRegistryClient(this TBuilder builder, TConfiguration configuration) + where TBuilder : IAzureClientFactoryBuilderWithConfiguration + { + return builder.RegisterClientFactory(configuration); + } + } +} diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/ChangeTrackingDictionary.cs deleted file mode 100644 index eeed57a8b0444..0000000000000 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/ChangeTrackingDictionary.cs +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; - -namespace Azure.Data.SchemaRegistry -{ - internal class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary where TKey : notnull - { - private IDictionary _innerDictionary; - - public ChangeTrackingDictionary() - { - } - - public ChangeTrackingDictionary(IDictionary dictionary) - { - if (dictionary == null) - { - return; - } - _innerDictionary = new Dictionary(dictionary); - } - - public ChangeTrackingDictionary(IReadOnlyDictionary dictionary) - { - if (dictionary == null) - { - return; - } - _innerDictionary = new Dictionary(); - foreach (var pair in dictionary) - { - _innerDictionary.Add(pair); - } - } - - public bool IsUndefined => _innerDictionary == null; - - public int Count => IsUndefined ? 0 : EnsureDictionary().Count; - - public bool IsReadOnly => IsUndefined ? false : EnsureDictionary().IsReadOnly; - - public ICollection Keys => IsUndefined ? Array.Empty() : EnsureDictionary().Keys; - - public ICollection Values => IsUndefined ? Array.Empty() : EnsureDictionary().Values; - - public TValue this[TKey key] - { - get - { - if (IsUndefined) - { - throw new KeyNotFoundException(nameof(key)); - } - return EnsureDictionary()[key]; - } - set - { - EnsureDictionary()[key] = value; - } - } - - IEnumerable IReadOnlyDictionary.Keys => Keys; - - IEnumerable IReadOnlyDictionary.Values => Values; - - public IEnumerator> GetEnumerator() - { - if (IsUndefined) - { - IEnumerator> enumerateEmpty() - { - yield break; - } - return enumerateEmpty(); - } - return EnsureDictionary().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - - public void Add(KeyValuePair item) - { - EnsureDictionary().Add(item); - } - - public void Clear() - { - EnsureDictionary().Clear(); - } - - public bool Contains(KeyValuePair item) - { - if (IsUndefined) - { - return false; - } - return EnsureDictionary().Contains(item); - } - - public void CopyTo(KeyValuePair[] array, int index) - { - if (IsUndefined) - { - return; - } - EnsureDictionary().CopyTo(array, index); - } - - public bool Remove(KeyValuePair item) - { - if (IsUndefined) - { - return false; - } - return EnsureDictionary().Remove(item); - } - - public void Add(TKey key, TValue value) - { - EnsureDictionary().Add(key, value); - } - - public bool ContainsKey(TKey key) - { - if (IsUndefined) - { - return false; - } - return EnsureDictionary().ContainsKey(key); - } - - public bool Remove(TKey key) - { - if (IsUndefined) - { - return false; - } - return EnsureDictionary().Remove(key); - } - - public bool TryGetValue(TKey key, out TValue value) - { - if (IsUndefined) - { - value = default; - return false; - } - return EnsureDictionary().TryGetValue(key, out value); - } - - public IDictionary EnsureDictionary() - { - return _innerDictionary ??= new Dictionary(); - } - } -} diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/ChangeTrackingList.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/ChangeTrackingList.cs deleted file mode 100644 index 85f0394e3b74f..0000000000000 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/ChangeTrackingList.cs +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; - -namespace Azure.Data.SchemaRegistry -{ - internal class ChangeTrackingList : IList, IReadOnlyList - { - private IList _innerList; - - public ChangeTrackingList() - { - } - - public ChangeTrackingList(IList innerList) - { - if (innerList != null) - { - _innerList = innerList; - } - } - - public ChangeTrackingList(IReadOnlyList innerList) - { - if (innerList != null) - { - _innerList = innerList.ToList(); - } - } - - public bool IsUndefined => _innerList == null; - - public int Count => IsUndefined ? 0 : EnsureList().Count; - - public bool IsReadOnly => IsUndefined ? false : EnsureList().IsReadOnly; - - public T this[int index] - { - get - { - if (IsUndefined) - { - throw new ArgumentOutOfRangeException(nameof(index)); - } - return EnsureList()[index]; - } - set - { - if (IsUndefined) - { - throw new ArgumentOutOfRangeException(nameof(index)); - } - EnsureList()[index] = value; - } - } - - public void Reset() - { - _innerList = null; - } - - public IEnumerator GetEnumerator() - { - if (IsUndefined) - { - IEnumerator enumerateEmpty() - { - yield break; - } - return enumerateEmpty(); - } - return EnsureList().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - - public void Add(T item) - { - EnsureList().Add(item); - } - - public void Clear() - { - EnsureList().Clear(); - } - - public bool Contains(T item) - { - if (IsUndefined) - { - return false; - } - return EnsureList().Contains(item); - } - - public void CopyTo(T[] array, int arrayIndex) - { - if (IsUndefined) - { - return; - } - EnsureList().CopyTo(array, arrayIndex); - } - - public bool Remove(T item) - { - if (IsUndefined) - { - return false; - } - return EnsureList().Remove(item); - } - - public int IndexOf(T item) - { - if (IsUndefined) - { - return -1; - } - return EnsureList().IndexOf(item); - } - - public void Insert(int index, T item) - { - EnsureList().Insert(index, item); - } - - public void RemoveAt(int index) - { - if (IsUndefined) - { - throw new ArgumentOutOfRangeException(nameof(index)); - } - EnsureList().RemoveAt(index); - } - - public IList EnsureList() - { - return _innerList ??= new List(); - } - } -} diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/ModelSerializationExtensions.cs deleted file mode 100644 index 181d6921210f4..0000000000000 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/ModelSerializationExtensions.cs +++ /dev/null @@ -1,395 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Diagnostics; -using System.Globalization; -using System.Text.Json; -using System.Xml; -using Azure.Core; - -namespace Azure.Data.SchemaRegistry -{ - internal static class ModelSerializationExtensions - { - internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W"); - - public static object GetObject(this JsonElement element) - { - switch (element.ValueKind) - { - case JsonValueKind.String: - return element.GetString(); - case JsonValueKind.Number: - if (element.TryGetInt32(out int intValue)) - { - return intValue; - } - if (element.TryGetInt64(out long longValue)) - { - return longValue; - } - return element.GetDouble(); - case JsonValueKind.True: - return true; - case JsonValueKind.False: - return false; - case JsonValueKind.Undefined: - case JsonValueKind.Null: - return null; - case JsonValueKind.Object: - var dictionary = new Dictionary(); - foreach (var jsonProperty in element.EnumerateObject()) - { - dictionary.Add(jsonProperty.Name, jsonProperty.Value.GetObject()); - } - return dictionary; - case JsonValueKind.Array: - var list = new List(); - foreach (var item in element.EnumerateArray()) - { - list.Add(item.GetObject()); - } - return list.ToArray(); - default: - throw new NotSupportedException($"Not supported value kind {element.ValueKind}"); - } - } - - public static byte[] GetBytesFromBase64(this JsonElement element, string format) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - - return format switch - { - "U" => TypeFormatters.FromBase64UrlString(element.GetRequiredString()), - "D" => element.GetBytesFromBase64(), - _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) - }; - } - - public static DateTimeOffset GetDateTimeOffset(this JsonElement element, string format) => format switch - { - "U" when element.ValueKind == JsonValueKind.Number => DateTimeOffset.FromUnixTimeSeconds(element.GetInt64()), - _ => TypeFormatters.ParseDateTimeOffset(element.GetString(), format) - }; - - public static TimeSpan GetTimeSpan(this JsonElement element, string format) => TypeFormatters.ParseTimeSpan(element.GetString(), format); - - public static char GetChar(this JsonElement element) - { - if (element.ValueKind == JsonValueKind.String) - { - var text = element.GetString(); - if (text == null || text.Length != 1) - { - throw new NotSupportedException($"Cannot convert \"{text}\" to a char"); - } - return text[0]; - } - else - { - throw new NotSupportedException($"Cannot convert {element.ValueKind} to a char"); - } - } - - [Conditional("DEBUG")] - public static void ThrowNonNullablePropertyIsNull(this JsonProperty property) - { - throw new JsonException($"A property '{property.Name}' defined as non-nullable but received as null from the service. This exception only happens in DEBUG builds of the library and would be ignored in the release build"); - } - - public static string GetRequiredString(this JsonElement element) - { - var value = element.GetString(); - if (value == null) - { - throw new InvalidOperationException($"The requested operation requires an element of type 'String', but the target element has type '{element.ValueKind}'."); - } - return value; - } - - public static void WriteStringValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) - { - writer.WriteStringValue(TypeFormatters.ToString(value, format)); - } - - public static void WriteStringValue(this Utf8JsonWriter writer, DateTime value, string format) - { - writer.WriteStringValue(TypeFormatters.ToString(value, format)); - } - - public static void WriteStringValue(this Utf8JsonWriter writer, TimeSpan value, string format) - { - writer.WriteStringValue(TypeFormatters.ToString(value, format)); - } - - public static void WriteStringValue(this Utf8JsonWriter writer, char value) - { - writer.WriteStringValue(value.ToString(CultureInfo.InvariantCulture)); - } - - public static void WriteBase64StringValue(this Utf8JsonWriter writer, byte[] value, string format) - { - if (value == null) - { - writer.WriteNullValue(); - return; - } - switch (format) - { - case "U": - writer.WriteStringValue(TypeFormatters.ToBase64UrlString(value)); - break; - case "D": - writer.WriteBase64StringValue(value); - break; - default: - throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)); - } - } - - public static void WriteNumberValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) - { - if (format != "U") - { - throw new ArgumentOutOfRangeException(nameof(format), "Only 'U' format is supported when writing a DateTimeOffset as a Number."); - } - writer.WriteNumberValue(value.ToUnixTimeSeconds()); - } - - public static void WriteObjectValue(this Utf8JsonWriter writer, T value) - { - switch (value) - { - case null: - writer.WriteNullValue(); - break; - case IUtf8JsonSerializable serializable: - serializable.Write(writer); - break; - case byte[] bytes: - writer.WriteBase64StringValue(bytes); - break; - case BinaryData bytes0: - writer.WriteBase64StringValue(bytes0); - break; - case JsonElement json: - json.WriteTo(writer); - break; - case int i: - writer.WriteNumberValue(i); - break; - case decimal d: - writer.WriteNumberValue(d); - break; - case double d0: - if (double.IsNaN(d0)) - { - writer.WriteStringValue("NaN"); - } - else - { - writer.WriteNumberValue(d0); - } - break; - case float f: - writer.WriteNumberValue(f); - break; - case long l: - writer.WriteNumberValue(l); - break; - case string s: - writer.WriteStringValue(s); - break; - case bool b: - writer.WriteBooleanValue(b); - break; - case Guid g: - writer.WriteStringValue(g); - break; - case DateTimeOffset dateTimeOffset: - writer.WriteStringValue(dateTimeOffset, "O"); - break; - case DateTime dateTime: - writer.WriteStringValue(dateTime, "O"); - break; - case IEnumerable> enumerable: - writer.WriteStartObject(); - foreach (var pair in enumerable) - { - writer.WritePropertyName(pair.Key); - writer.WriteObjectValue(pair.Value); - } - writer.WriteEndObject(); - break; - case IEnumerable objectEnumerable: - writer.WriteStartArray(); - foreach (var item in objectEnumerable) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - break; - case TimeSpan timeSpan: - writer.WriteStringValue(timeSpan, "P"); - break; - default: - throw new NotSupportedException($"Not supported type {value.GetType()}"); - } - } - - public static void WriteObjectValue(this Utf8JsonWriter writer, object value) - { - writer.WriteObjectValue(value); - } - - internal static class TypeFormatters - { - private const string RoundtripZFormat = "yyyy-MM-ddTHH:mm:ss.fffffffZ"; - public const string DefaultNumberFormat = "G"; - - public static string ToString(bool value) => value ? "true" : "false"; - - public static string ToString(DateTime value, string format) => value.Kind switch - { - DateTimeKind.Utc => ToString((DateTimeOffset)value, format), - _ => throw new NotSupportedException($"DateTime {value} has a Kind of {value.Kind}. Azure SDK requires it to be UTC. You can call DateTime.SpecifyKind to change Kind property value to DateTimeKind.Utc.") - }; - - public static string ToString(DateTimeOffset value, string format) => format switch - { - "D" => value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture), - "U" => value.ToUnixTimeSeconds().ToString(CultureInfo.InvariantCulture), - "O" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), - "o" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), - "R" => value.ToString("r", CultureInfo.InvariantCulture), - _ => value.ToString(format, CultureInfo.InvariantCulture) - }; - - public static string ToString(TimeSpan value, string format) => format switch - { - "P" => XmlConvert.ToString(value), - _ => value.ToString(format, CultureInfo.InvariantCulture) - }; - - public static string ToString(byte[] value, string format) => format switch - { - "U" => ToBase64UrlString(value), - "D" => Convert.ToBase64String(value), - _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) - }; - - public static string ToBase64UrlString(byte[] value) - { - int numWholeOrPartialInputBlocks = checked(value.Length + 2) / 3; - int size = checked(numWholeOrPartialInputBlocks * 4); - char[] output = new char[size]; - - int numBase64Chars = Convert.ToBase64CharArray(value, 0, value.Length, output, 0); - - int i = 0; - for (; i < numBase64Chars; i++) - { - char ch = output[i]; - if (ch == '+') - { - output[i] = '-'; - } - else - { - if (ch == '/') - { - output[i] = '_'; - } - else - { - if (ch == '=') - { - break; - } - } - } - } - - return new string(output, 0, i); - } - - public static byte[] FromBase64UrlString(string value) - { - int paddingCharsToAdd = (value.Length % 4) switch - { - 0 => 0, - 2 => 2, - 3 => 1, - _ => throw new InvalidOperationException("Malformed input") - }; - char[] output = new char[(value.Length + paddingCharsToAdd)]; - int i = 0; - for (; i < value.Length; i++) - { - char ch = value[i]; - if (ch == '-') - { - output[i] = '+'; - } - else - { - if (ch == '_') - { - output[i] = '/'; - } - else - { - output[i] = ch; - } - } - } - - for (; i < output.Length; i++) - { - output[i] = '='; - } - - return Convert.FromBase64CharArray(output, 0, output.Length); - } - - public static DateTimeOffset ParseDateTimeOffset(string value, string format) => format switch - { - "U" => DateTimeOffset.FromUnixTimeSeconds(long.Parse(value, CultureInfo.InvariantCulture)), - _ => DateTimeOffset.Parse(value, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) - }; - - public static TimeSpan ParseTimeSpan(string value, string format) => format switch - { - "P" => XmlConvert.ToTimeSpan(value), - _ => TimeSpan.ParseExact(value, format, CultureInfo.InvariantCulture) - }; - - public static string ConvertToString(object value, string format = null) => value switch - { - null => "null", - string s => s, - bool b => ToString(b), - int or float or double or long or decimal => ((IFormattable)value).ToString(DefaultNumberFormat, CultureInfo.InvariantCulture), - byte[] b0 when format != null => ToString(b0, format), - IEnumerable s0 => string.Join(",", s0), - DateTimeOffset dateTime when format != null => ToString(dateTime, format), - TimeSpan timeSpan when format != null => ToString(timeSpan, format), - TimeSpan timeSpan0 => XmlConvert.ToString(timeSpan0), - Guid guid => guid.ToString(), - BinaryData binaryData => ConvertToString(binaryData.ToArray(), format), - _ => value.ToString() - }; - } - } -} diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/MultipartFormDataRequestContent.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/MultipartFormDataRequestContent.cs deleted file mode 100644 index a9eb805e57a3c..0000000000000 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/MultipartFormDataRequestContent.cs +++ /dev/null @@ -1,203 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Globalization; -using System.IO; -using System.Net.Http; -using System.Net.Http.Headers; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.Data.SchemaRegistry -{ - internal class MultipartFormDataRequestContent : RequestContent - { - private readonly System.Net.Http.MultipartFormDataContent _multipartContent; - private static readonly Random _random = new Random(); - private static readonly char[] _boundaryValues = "0123456789=ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz".ToCharArray(); - - public MultipartFormDataRequestContent() - { - _multipartContent = new System.Net.Http.MultipartFormDataContent(CreateBoundary()); - } - - public string ContentType - { - get - { - return _multipartContent.Headers.ContentType.ToString(); - } - } - - internal HttpContent HttpContent => _multipartContent; - - private static string CreateBoundary() - { - Span chars = new char[70]; - byte[] random = new byte[70]; - _random.NextBytes(random); - int mask = 255 >> 2; - for (int i = 0; i < 70; i++) - { - chars[i] = _boundaryValues[random[i] & mask]; - } - return chars.ToString(); - } - - public void Add(string content, string name, string filename = null, string contentType = null) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - Add(new StringContent(content), name, filename, contentType); - } - - public void Add(int content, string name, string filename = null, string contentType = null) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - string value = content.ToString("G", CultureInfo.InvariantCulture); - Add(new StringContent(value), name, filename, contentType); - } - - public void Add(long content, string name, string filename = null, string contentType = null) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - string value = content.ToString("G", CultureInfo.InvariantCulture); - Add(new StringContent(value), name, filename, contentType); - } - - public void Add(float content, string name, string filename = null, string contentType = null) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - string value = content.ToString("G", CultureInfo.InvariantCulture); - Add(new StringContent(value), name, filename, contentType); - } - - public void Add(double content, string name, string filename = null, string contentType = null) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - string value = content.ToString("G", CultureInfo.InvariantCulture); - Add(new StringContent(value), name, filename, contentType); - } - - public void Add(decimal content, string name, string filename = null, string contentType = null) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - string value = content.ToString("G", CultureInfo.InvariantCulture); - Add(new StringContent(value), name, filename, contentType); - } - - public void Add(bool content, string name, string filename = null, string contentType = null) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - string value = content ? "true" : "false"; - Add(new StringContent(value), name, filename, contentType); - } - - public void Add(Stream content, string name, string filename = null, string contentType = null) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - Add(new StreamContent(content), name, filename, contentType); - } - - public void Add(byte[] content, string name, string filename = null, string contentType = null) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - Add(new ByteArrayContent(content), name, filename, contentType); - } - - public void Add(BinaryData content, string name, string filename = null, string contentType = null) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - Add(new ByteArrayContent(content.ToArray()), name, filename, contentType); - } - - private void Add(HttpContent content, string name, string filename, string contentType) - { - if (filename != null) - { - Argument.AssertNotNullOrEmpty(filename, nameof(filename)); - AddFilenameHeader(content, name, filename); - } - if (contentType != null) - { - Argument.AssertNotNullOrEmpty(contentType, nameof(contentType)); - AddContentTypeHeader(content, contentType); - } - _multipartContent.Add(content, name); - } - - public static void AddFilenameHeader(HttpContent content, string name, string filename) - { - ContentDispositionHeaderValue header = new ContentDispositionHeaderValue("form-data") { Name = name, FileName = filename }; - content.Headers.ContentDisposition = header; - } - - public static void AddContentTypeHeader(HttpContent content, string contentType) - { - MediaTypeHeaderValue header = new MediaTypeHeaderValue(contentType); - content.Headers.ContentType = header; - } - - public override bool TryComputeLength(out long length) - { - if (_multipartContent.Headers.ContentLength is long contentLength) - { - length = contentLength; - return true; - } - length = 0; - return false; - } - - public override void WriteTo(Stream stream, CancellationToken cancellationToken = default) - { -#if NET6_0_OR_GREATER - _multipartContent.CopyTo(stream, default, cancellationToken); -#else -#pragma warning disable AZC0107 - _multipartContent.CopyToAsync(stream).EnsureCompleted(); -#pragma warning restore AZC0107 -#endif - } - - public override async Task WriteToAsync(Stream stream, CancellationToken cancellationToken = default) - { -#if NET6_0_OR_GREATER - await _multipartContent.CopyToAsync(stream, cancellationToken).ConfigureAwait(false); -#else - await _multipartContent.CopyToAsync(stream).ConfigureAwait(false); -#endif - } - - public override void Dispose() - { - _multipartContent.Dispose(); - } - } -} diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/Optional.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/Optional.cs deleted file mode 100644 index 2b359e695299a..0000000000000 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/Optional.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; - -namespace Azure.Data.SchemaRegistry -{ - internal static class Optional - { - public static bool IsCollectionDefined(IEnumerable collection) - { - return !(collection is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined); - } - - public static bool IsCollectionDefined(IDictionary collection) - { - return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); - } - - public static bool IsCollectionDefined(IReadOnlyDictionary collection) - { - return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); - } - - public static bool IsDefined(T? value) - where T : struct - { - return value.HasValue; - } - - public static bool IsDefined(object value) - { - return value != null; - } - - public static bool IsDefined(JsonElement value) - { - return value.ValueKind != JsonValueKind.Undefined; - } - - public static bool IsDefined(string value) - { - return value != null; - } - } -} diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/RequestContentHelper.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/RequestContentHelper.cs deleted file mode 100644 index d229188b8c8d1..0000000000000 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/RequestContentHelper.cs +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.Data.SchemaRegistry -{ - internal static class RequestContentHelper - { - public static RequestContent FromEnumerable(IEnumerable enumerable) - where T : notnull - { - Utf8JsonRequestContent content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteStartArray(); - foreach (var item in enumerable) - { - content.JsonWriter.WriteObjectValue(item); - } - content.JsonWriter.WriteEndArray(); - - return content; - } - - public static RequestContent FromEnumerable(IEnumerable enumerable) - { - Utf8JsonRequestContent content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteStartArray(); - foreach (var item in enumerable) - { - if (item == null) - { - content.JsonWriter.WriteNullValue(); - } - else - { -#if NET6_0_OR_GREATER - content.JsonWriter.WriteRawValue(item); -#else - using (JsonDocument document = JsonDocument.Parse(item)) - { - JsonSerializer.Serialize(content.JsonWriter, document.RootElement); - } -#endif - } - } - content.JsonWriter.WriteEndArray(); - - return content; - } - - public static RequestContent FromEnumerable(ReadOnlySpan span) - where T : notnull - { - Utf8JsonRequestContent content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteStartArray(); - for (int i = 0; i < span.Length; i++) - { - content.JsonWriter.WriteObjectValue(span[i]); - } - content.JsonWriter.WriteEndArray(); - - return content; - } - - public static RequestContent FromDictionary(IDictionary dictionary) - where TValue : notnull - { - Utf8JsonRequestContent content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteStartObject(); - foreach (var item in dictionary) - { - content.JsonWriter.WritePropertyName(item.Key); - content.JsonWriter.WriteObjectValue(item.Value); - } - content.JsonWriter.WriteEndObject(); - - return content; - } - - public static RequestContent FromDictionary(IDictionary dictionary) - { - Utf8JsonRequestContent content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteStartObject(); - foreach (var item in dictionary) - { - content.JsonWriter.WritePropertyName(item.Key); - if (item.Value == null) - { - content.JsonWriter.WriteNullValue(); - } - else - { -#if NET6_0_OR_GREATER - content.JsonWriter.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(content.JsonWriter, document.RootElement); - } -#endif - } - } - content.JsonWriter.WriteEndObject(); - - return content; - } - - public static RequestContent FromObject(object value) - { - Utf8JsonRequestContent content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(value); - return content; - } - - public static RequestContent FromObject(BinaryData value) - { - Utf8JsonRequestContent content = new Utf8JsonRequestContent(); -#if NET6_0_OR_GREATER - content.JsonWriter.WriteRawValue(value); -#else - using (JsonDocument document = JsonDocument.Parse(value)) - { - JsonSerializer.Serialize(content.JsonWriter, document.RootElement); - } -#endif - return content; - } - } -} diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/Utf8JsonRequestContent.cs deleted file mode 100644 index 473465e9a2470..0000000000000 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Internal/Utf8JsonRequestContent.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.IO; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; - -namespace Azure.Data.SchemaRegistry -{ - internal class Utf8JsonRequestContent : RequestContent - { - private readonly MemoryStream _stream; - private readonly RequestContent _content; - - public Utf8JsonRequestContent() - { - _stream = new MemoryStream(); - _content = Create(_stream); - JsonWriter = new Utf8JsonWriter(_stream); - } - - public Utf8JsonWriter JsonWriter { get; } - - public override async Task WriteToAsync(Stream stream, CancellationToken cancellationToken = default) - { - await JsonWriter.FlushAsync().ConfigureAwait(false); - await _content.WriteToAsync(stream, cancellationToken).ConfigureAwait(false); - } - - public override void WriteTo(Stream stream, CancellationToken cancellationToken = default) - { - JsonWriter.Flush(); - _content.WriteTo(stream, cancellationToken); - } - - public override bool TryComputeLength(out long length) - { - length = JsonWriter.BytesCommitted + JsonWriter.BytesPending; - return true; - } - - public override void Dispose() - { - JsonWriter.Dispose(); - _content.Dispose(); - _stream.Dispose(); - } - } -} diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/ContentType.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/ContentType.cs deleted file mode 100644 index 536a042a23e8d..0000000000000 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/ContentType.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.Data.SchemaRegistry -{ - /// The ContentType. - internal readonly partial struct ContentType : IEquatable - { - /// Initializes a new instance of . - /// is null. - public ContentType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AvroValue = "application/json; serialization=Avro"; - private const string JsonValue = "application/json; serialization=json"; - private const string CustomValue = "text/plain; charset=utf-8"; - private const string TextVndMsProtobufValue = "text/vnd.ms.protobuf"; - /// text/vnd.ms.protobuf. - public static ContentType TextVndMsProtobuf { get; } = new ContentType(TextVndMsProtobufValue); - /// Determines if two values are the same. - public static bool operator ==(ContentType left, ContentType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ContentType left, ContentType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ContentType(string value) => new ContentType(value); - } -} diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/Error.Serialization.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/Error.Serialization.cs deleted file mode 100644 index 0201b18b6c3fd..0000000000000 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/Error.Serialization.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; - -namespace Azure.Data.SchemaRegistry.Models -{ - internal partial class Error - { - internal static Error DeserializeError(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ErrorDetail error = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("error"u8)) - { - error = ErrorDetail.DeserializeErrorDetail(property.Value); - continue; - } - } - return new Error(error); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static Error FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeError(document.RootElement); - } - } -} diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/Error.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/Error.cs deleted file mode 100644 index 2bedc02c226e8..0000000000000 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/Error.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.Data.SchemaRegistry.Models -{ - /// An error response returned from Azure Schema Registry service. - internal partial class Error - { - /// Initializes a new instance of . - /// Error response returned from Azure Schema Registry service. - /// is null. - internal Error(ErrorDetail errorProperty) - { - Argument.AssertNotNull(errorProperty, nameof(errorProperty)); - - ErrorProperty = errorProperty; - } - - /// Error response returned from Azure Schema Registry service. - public ErrorDetail ErrorProperty { get; } - } -} diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/ErrorDetail.Serialization.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/ErrorDetail.Serialization.cs deleted file mode 100644 index a7860ae5bccf4..0000000000000 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/ErrorDetail.Serialization.cs +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; - -namespace Azure.Data.SchemaRegistry.Models -{ - internal partial class ErrorDetail - { - internal static ErrorDetail DeserializeErrorDetail(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string code = default; - string message = default; - IReadOnlyList details = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("code"u8)) - { - code = property.Value.GetString(); - continue; - } - if (property.NameEquals("message"u8)) - { - message = property.Value.GetString(); - continue; - } - if (property.NameEquals("details"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DeserializeErrorDetail(item)); - } - details = array; - continue; - } - } - return new ErrorDetail(code, message, details ?? new ChangeTrackingList()); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static ErrorDetail FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeErrorDetail(document.RootElement); - } - } -} diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/ErrorDetail.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/ErrorDetail.cs deleted file mode 100644 index 61d4ad6b8d2b3..0000000000000 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/ErrorDetail.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.Data.SchemaRegistry.Models -{ - /// Error response returned from Azure Schema Registry service. - internal partial class ErrorDetail - { - /// Initializes a new instance of . - /// Server-defined error code. - /// Brief description of error. - /// or is null. - internal ErrorDetail(string code, string message) - { - Argument.AssertNotNull(code, nameof(code)); - Argument.AssertNotNull(message, nameof(message)); - - Code = code; - Message = message; - Details = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// Server-defined error code. - /// Brief description of error. - /// Error message details to help user understand/debug failure. - internal ErrorDetail(string code, string message, IReadOnlyList details) - { - Code = code; - Message = message; - Details = details; - } - - /// Server-defined error code. - public string Code { get; } - /// Brief description of error. - public string Message { get; } - /// Error message details to help user understand/debug failure. - public IReadOnlyList Details { get; } - } -} diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/SchemaGroups.Serialization.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/SchemaGroups.Serialization.cs deleted file mode 100644 index 236ed73c7837e..0000000000000 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/SchemaGroups.Serialization.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; - -namespace Azure.Data.SchemaRegistry.Models -{ - internal partial class SchemaGroups - { - internal static SchemaGroups DeserializeSchemaGroups(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList schemaGroups = default; - string nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("schemaGroups"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - schemaGroups = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new SchemaGroups(schemaGroups ?? new ChangeTrackingList(), nextLink); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static SchemaGroups FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeSchemaGroups(document.RootElement); - } - } -} diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/SchemaGroups.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/SchemaGroups.cs deleted file mode 100644 index e5648f3876590..0000000000000 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/SchemaGroups.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; - -namespace Azure.Data.SchemaRegistry.Models -{ - /// Object received from the registry containing the list of schema groups and link to next batch page. - internal partial class SchemaGroups - { - /// Initializes a new instance of . - internal SchemaGroups() - { - Groups = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// Array of schema groups. - /// URl to next batch of schema groups. - internal SchemaGroups(IReadOnlyList groups, string nextLink) - { - Groups = groups; - NextLink = nextLink; - } - - /// Array of schema groups. - public IReadOnlyList Groups { get; } - /// URl to next batch of schema groups. - public string NextLink { get; } - } -} diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/SchemaId.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/SchemaId.cs deleted file mode 100644 index 91c177082ff6a..0000000000000 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/SchemaId.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Data.SchemaRegistry.Models -{ - /// Object received from the registry containing schema identifiers. - internal readonly partial struct SchemaId - { - /// Initializes a new instance of . - /// Schema ID that uniquely identifies a schema in the registry namespace. - internal SchemaId(string id) - { - Id = id; - } - - /// Schema ID that uniquely identifies a schema in the registry namespace. - public string Id { get; } - } -} diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/SchemaVersions.Serialization.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/SchemaVersions.Serialization.cs deleted file mode 100644 index 025787606dcad..0000000000000 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/SchemaVersions.Serialization.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; - -namespace Azure.Data.SchemaRegistry.Models -{ - internal partial class SchemaVersions - { - internal static SchemaVersions DeserializeSchemaVersions(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList schemaVersions = default; - string nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("schemaVersions"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetInt32()); - } - schemaVersions = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new SchemaVersions(schemaVersions ?? new ChangeTrackingList(), nextLink); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static SchemaVersions FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeSchemaVersions(document.RootElement); - } - } -} diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/SchemaVersions.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/SchemaVersions.cs deleted file mode 100644 index cb7dba1f21e52..0000000000000 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/Models/SchemaVersions.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; - -namespace Azure.Data.SchemaRegistry.Models -{ - /// Object received from the registry containing the list of schema versions and link to next batch page. - internal partial class SchemaVersions - { - /// Initializes a new instance of . - internal SchemaVersions() - { - Versions = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// Array of schema version integers. - /// URl to next batch of schema versions. - internal SchemaVersions(IReadOnlyList versions, string nextLink) - { - Versions = versions; - NextLink = nextLink; - } - - /// Array of schema version integers. - public IReadOnlyList Versions { get; } - /// URl to next batch of schema versions. - public string NextLink { get; } - } -} diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/SchemaGetByIdHeaders.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/SchemaGetByIdHeaders.cs deleted file mode 100644 index 8f47f951a7cc0..0000000000000 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/SchemaGetByIdHeaders.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using Azure.Core; - -namespace Azure.Data.SchemaRegistry -{ - internal partial class SchemaGetByIdHeaders - { - private readonly Response _response; - public SchemaGetByIdHeaders(Response response) - { - _response = response; - } - /// URL location of schema, identified by schema group, schema name, and version. - public string Location => _response.Headers.TryGetValue("Location", out string value) ? value : null; - /// The content type for given schema. Each schema type has an associated content-type. - public ContentType? ContentType => _response.Headers.TryGetValue("Content-Type", out string value) ? new ContentType(value) : (ContentType?)null; - /// References specific schema in registry namespace. - public string SchemaId => _response.Headers.TryGetValue("Schema-Id", out string value) ? value : null; - /// URL location of schema, identified by schema ID. - public string SchemaIdLocation => _response.Headers.TryGetValue("Schema-Id-Location", out string value) ? value : null; - /// References schema group. - public string SchemaGroupName => _response.Headers.TryGetValue("Schema-Group-Name", out string value) ? value : null; - /// References schema name. - public string SchemaName => _response.Headers.TryGetValue("Schema-Name", out string value) ? value : null; - /// Version of the returned schema. - public int? SchemaVersion => _response.Headers.TryGetValue("Schema-Version", out int? value) ? value : null; - } -} diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/SchemaGetSchemaVersionHeaders.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/SchemaGetSchemaVersionHeaders.cs deleted file mode 100644 index cac74a1b4b402..0000000000000 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/SchemaGetSchemaVersionHeaders.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using Azure.Core; - -namespace Azure.Data.SchemaRegistry -{ - internal partial class SchemaGetSchemaVersionHeaders - { - private readonly Response _response; - public SchemaGetSchemaVersionHeaders(Response response) - { - _response = response; - } - /// URL location of schema, identified by schema group, schema name, and version. - public string Location => _response.Headers.TryGetValue("Location", out string value) ? value : null; - /// The content type for given schema. Each schema type has an associated content-type. - public ContentType? ContentType => _response.Headers.TryGetValue("Content-Type", out string value) ? new ContentType(value) : (ContentType?)null; - /// References specific schema in registry namespace. - public string SchemaId => _response.Headers.TryGetValue("Schema-Id", out string value) ? value : null; - /// URL location of schema, identified by schema ID. - public string SchemaIdLocation => _response.Headers.TryGetValue("Schema-Id-Location", out string value) ? value : null; - /// References schema group. - public string SchemaGroupName => _response.Headers.TryGetValue("Schema-Group-Name", out string value) ? value : null; - /// References schema name. - public string SchemaName => _response.Headers.TryGetValue("Schema-Name", out string value) ? value : null; - /// Version of the returned schema. - public int? SchemaVersion => _response.Headers.TryGetValue("Schema-Version", out int? value) ? value : null; - } -} diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/SchemaGroupsRestClient.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/SchemaGroupsRestClient.cs deleted file mode 100644 index e387809d720b9..0000000000000 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/SchemaGroupsRestClient.cs +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.Data.SchemaRegistry.Models; - -namespace Azure.Data.SchemaRegistry -{ - internal partial class SchemaGroupsRestClient - { - private readonly HttpPipeline _pipeline; - private readonly string _endpoint; - private readonly string _apiVersion; - - /// The ClientDiagnostics is used to provide tracing support for the client library. - internal ClientDiagnostics ClientDiagnostics { get; } - - /// Initializes a new instance of SchemaGroupsRestClient. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The Schema Registry service endpoint, for example my-namespace.servicebus.windows.net. - /// Api Version. - /// , , or is null. - public SchemaGroupsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string apiVersion = "2022-10") - { - ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? throw new ArgumentNullException(nameof(endpoint)); - _apiVersion = apiVersion ?? throw new ArgumentNullException(nameof(apiVersion)); - } - - internal HttpMessage CreateListRequest() - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.AppendRaw("https://", false); - uri.AppendRaw(_endpoint, false); - uri.AppendPath("/$schemaGroups", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Get list of schema groups. - /// The cancellation token to use. - /// Gets the list of schema groups user is authorized to access. - public async Task> ListAsync(CancellationToken cancellationToken = default) - { - using var message = CreateListRequest(); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SchemaGroups value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = SchemaGroups.DeserializeSchemaGroups(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get list of schema groups. - /// The cancellation token to use. - /// Gets the list of schema groups user is authorized to access. - public Response List(CancellationToken cancellationToken = default) - { - using var message = CreateListRequest(); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SchemaGroups value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = SchemaGroups.DeserializeSchemaGroups(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListNextPageRequest(string nextLink) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.AppendRaw("https://", false); - uri.AppendRaw(_endpoint, false); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Get list of schema groups. - /// The URL to the next page of results. - /// The cancellation token to use. - /// is null. - /// Gets the list of schema groups user is authorized to access. - public async Task> ListNextPageAsync(string nextLink, CancellationToken cancellationToken = default) - { - if (nextLink == null) - { - throw new ArgumentNullException(nameof(nextLink)); - } - - using var message = CreateListNextPageRequest(nextLink); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SchemaGroups value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = SchemaGroups.DeserializeSchemaGroups(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get list of schema groups. - /// The URL to the next page of results. - /// The cancellation token to use. - /// is null. - /// Gets the list of schema groups user is authorized to access. - public Response ListNextPage(string nextLink, CancellationToken cancellationToken = default) - { - if (nextLink == null) - { - throw new ArgumentNullException(nameof(nextLink)); - } - - using var message = CreateListNextPageRequest(nextLink); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SchemaGroups value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = SchemaGroups.DeserializeSchemaGroups(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/SchemaQueryIdByContentHeaders.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/SchemaQueryIdByContentHeaders.cs deleted file mode 100644 index 1d7aa2fc5172d..0000000000000 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/SchemaQueryIdByContentHeaders.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using Azure.Core; - -namespace Azure.Data.SchemaRegistry -{ - internal partial class SchemaQueryIdByContentHeaders - { - private readonly Response _response; - public SchemaQueryIdByContentHeaders(Response response) - { - _response = response; - } - /// URL location of schema, identified by schema group, schema name, and version. - public string Location => _response.Headers.TryGetValue("Location", out string value) ? value : null; - /// References specific schema in registry namespace. - public string SchemaId => _response.Headers.TryGetValue("Schema-Id", out string value) ? value : null; - /// URL location of schema, identified by schema ID. - public string SchemaIdLocation => _response.Headers.TryGetValue("Schema-Id-Location", out string value) ? value : null; - /// References schema group. - public string SchemaGroupName => _response.Headers.TryGetValue("Schema-Group-Name", out string value) ? value : null; - /// References schema name. - public string SchemaName => _response.Headers.TryGetValue("Schema-Name", out string value) ? value : null; - /// Version of the returned schema. - public int? SchemaVersion => _response.Headers.TryGetValue("Schema-Version", out int? value) ? value : null; - } -} diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/SchemaRegisterHeaders.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/SchemaRegisterHeaders.cs deleted file mode 100644 index 9b391bc77c1e2..0000000000000 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/SchemaRegisterHeaders.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using Azure.Core; - -namespace Azure.Data.SchemaRegistry -{ - internal partial class SchemaRegisterHeaders - { - private readonly Response _response; - public SchemaRegisterHeaders(Response response) - { - _response = response; - } - /// URL location of schema, identified by schema group, schema name, and version. - public string Location => _response.Headers.TryGetValue("Location", out string value) ? value : null; - /// References specific schema in registry namespace. - public string SchemaId => _response.Headers.TryGetValue("Schema-Id", out string value) ? value : null; - /// URL location of schema, identified by schema ID. - public string SchemaIdLocation => _response.Headers.TryGetValue("Schema-Id-Location", out string value) ? value : null; - /// References schema group. - public string SchemaGroupName => _response.Headers.TryGetValue("Schema-Group-Name", out string value) ? value : null; - /// References schema name. - public string SchemaName => _response.Headers.TryGetValue("Schema-Name", out string value) ? value : null; - /// Version of the returned schema. - public int? SchemaVersion => _response.Headers.TryGetValue("Schema-Version", out int? value) ? value : null; - } -} diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/SchemaRegistryClient.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/SchemaRegistryClient.cs new file mode 100644 index 0000000000000..09f5d7667091f --- /dev/null +++ b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/SchemaRegistryClient.cs @@ -0,0 +1,848 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Data.SchemaRegistry +{ + // Data plane generated client. + /// SchemaRegistryClient is a client for registering and retrieving schemas from the Azure Schema Registry service. + public partial class SchemaRegistryClient + { + private static readonly string[] AuthorizationScopes = new string[] { "https://eventhubs.azure.net/.default" }; + private readonly TokenCredential _tokenCredential; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline => _pipeline; + + /// Get a registered schema by its unique ID reference. + /// Schema ID that uniquely identifies a schema in the registry namespace. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Gets a registered schema by its unique ID. Azure Schema Registry guarantees that ID is unique within a namespace. Operation response type is based on serialization of schema requested. + internal virtual async Task> GetSchemaByIdAsync(string id, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetSchemaByIdAsync(id, context).ConfigureAwait(false); + return Response.FromValue(response.Content, response); + } + + /// Get a registered schema by its unique ID reference. + /// Schema ID that uniquely identifies a schema in the registry namespace. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Gets a registered schema by its unique ID. Azure Schema Registry guarantees that ID is unique within a namespace. Operation response type is based on serialization of schema requested. + internal virtual Response GetSchemaById(string id, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetSchemaById(id, context); + return Response.FromValue(response.Content, response); + } + + /// + /// [Protocol Method] Get a registered schema by its unique ID reference. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Schema ID that uniquely identifies a schema in the registry namespace. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual async Task GetSchemaByIdAsync(string id, RequestContext context) + { + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var scope = ClientDiagnostics.CreateScope("SchemaRegistryClient.GetSchemaById"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSchemaByIdRequest(id, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get a registered schema by its unique ID reference. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Schema ID that uniquely identifies a schema in the registry namespace. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual Response GetSchemaById(string id, RequestContext context) + { + Argument.AssertNotNullOrEmpty(id, nameof(id)); + + using var scope = ClientDiagnostics.CreateScope("SchemaRegistryClient.GetSchemaById"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSchemaByIdRequest(id, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get specific schema versions. + /// Name of schema group. + /// Name of schema. + /// Version number of specific schema. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Gets one specific version of one schema. + internal virtual async Task> GetSchemaByVersionAsync(string groupName, string schemaName, int schemaVersion, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetSchemaByVersionAsync(groupName, schemaName, schemaVersion, context).ConfigureAwait(false); + return Response.FromValue(response.Content, response); + } + + /// Get specific schema versions. + /// Name of schema group. + /// Name of schema. + /// Version number of specific schema. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Gets one specific version of one schema. + internal virtual Response GetSchemaByVersion(string groupName, string schemaName, int schemaVersion, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetSchemaByVersion(groupName, schemaName, schemaVersion, context); + return Response.FromValue(response.Content, response); + } + + /// + /// [Protocol Method] Get specific schema versions. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Name of schema group. + /// Name of schema. + /// Version number of specific schema. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual async Task GetSchemaByVersionAsync(string groupName, string schemaName, int schemaVersion, RequestContext context) + { + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + + using var scope = ClientDiagnostics.CreateScope("SchemaRegistryClient.GetSchemaByVersion"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSchemaByVersionRequest(groupName, schemaName, schemaVersion, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get specific schema versions. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Name of schema group. + /// Name of schema. + /// Version number of specific schema. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual Response GetSchemaByVersion(string groupName, string schemaName, int schemaVersion, RequestContext context) + { + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + + using var scope = ClientDiagnostics.CreateScope("SchemaRegistryClient.GetSchemaByVersion"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSchemaByVersionRequest(groupName, schemaName, schemaVersion, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get properties for existing schema. + /// Name of schema group. + /// Name of schema. + /// String representation (UTF-8) of the schema. + /// The content type for given schema. Allowed values: "application/json; serialization=Avro" | "application/json; serialization=Json" | "text/plain; charset=utf-8" | "text/vnd.ms.protobuf". + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Gets the properties referencing an existing schema within the specified schema group, as matched by schema content comparison. + internal virtual async Task GetSchemaPropertiesByContentAsync(string groupName, string schemaName, BinaryData schemaContent, Core.ContentType contentType, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNull(schemaContent, nameof(schemaContent)); + + using RequestContent content = schemaContent; + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetSchemaPropertiesByContentAsync(groupName, schemaName, content, contentType, context).ConfigureAwait(false); + return response; + } + + /// Get properties for existing schema. + /// Name of schema group. + /// Name of schema. + /// String representation (UTF-8) of the schema. + /// The content type for given schema. Allowed values: "application/json; serialization=Avro" | "application/json; serialization=Json" | "text/plain; charset=utf-8" | "text/vnd.ms.protobuf". + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Gets the properties referencing an existing schema within the specified schema group, as matched by schema content comparison. + internal virtual Response GetSchemaPropertiesByContent(string groupName, string schemaName, BinaryData schemaContent, Core.ContentType contentType, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNull(schemaContent, nameof(schemaContent)); + + using RequestContent content = schemaContent; + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetSchemaPropertiesByContent(groupName, schemaName, content, contentType, context); + return response; + } + + /// + /// [Protocol Method] Get properties for existing schema. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Name of schema group. + /// Name of schema. + /// The content to send as the body of the request. + /// The content type for given schema. Allowed values: "application/json; serialization=Avro" | "application/json; serialization=Json" | "text/plain; charset=utf-8" | "text/vnd.ms.protobuf". + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual async Task GetSchemaPropertiesByContentAsync(string groupName, string schemaName, RequestContent content, Core.ContentType contentType, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("SchemaRegistryClient.GetSchemaPropertiesByContent"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSchemaPropertiesByContentRequest(groupName, schemaName, content, contentType, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get properties for existing schema. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Name of schema group. + /// Name of schema. + /// The content to send as the body of the request. + /// The content type for given schema. Allowed values: "application/json; serialization=Avro" | "application/json; serialization=Json" | "text/plain; charset=utf-8" | "text/vnd.ms.protobuf". + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual Response GetSchemaPropertiesByContent(string groupName, string schemaName, RequestContent content, Core.ContentType contentType, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("SchemaRegistryClient.GetSchemaPropertiesByContent"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSchemaPropertiesByContentRequest(groupName, schemaName, content, contentType, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Register new schema. + /// Name of schema group. + /// Name of schema. + /// String representation (UTF-8) of the schema. + /// The content type for given schema. Allowed values: "application/json; serialization=Avro" | "application/json; serialization=Json" | "text/plain; charset=utf-8" | "text/vnd.ms.protobuf". + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Register new schema. If schema of specified name does not exist in specified group, schema is created at version 1. If schema of specified name exists already in specified group, schema is created at latest version + 1. + internal virtual async Task RegisterSchemaAsync(string groupName, string schemaName, BinaryData schemaContent, Core.ContentType contentType, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNull(schemaContent, nameof(schemaContent)); + + using RequestContent content = schemaContent; + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await RegisterSchemaAsync(groupName, schemaName, content, contentType, context).ConfigureAwait(false); + return response; + } + + /// Register new schema. + /// Name of schema group. + /// Name of schema. + /// String representation (UTF-8) of the schema. + /// The content type for given schema. Allowed values: "application/json; serialization=Avro" | "application/json; serialization=Json" | "text/plain; charset=utf-8" | "text/vnd.ms.protobuf". + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Register new schema. If schema of specified name does not exist in specified group, schema is created at version 1. If schema of specified name exists already in specified group, schema is created at latest version + 1. + internal virtual Response RegisterSchema(string groupName, string schemaName, BinaryData schemaContent, Core.ContentType contentType, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNull(schemaContent, nameof(schemaContent)); + + using RequestContent content = schemaContent; + RequestContext context = FromCancellationToken(cancellationToken); + Response response = RegisterSchema(groupName, schemaName, content, contentType, context); + return response; + } + + /// + /// [Protocol Method] Register new schema + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Name of schema group. + /// Name of schema. + /// The content to send as the body of the request. + /// The content type for given schema. Allowed values: "application/json; serialization=Avro" | "application/json; serialization=Json" | "text/plain; charset=utf-8" | "text/vnd.ms.protobuf". + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual async Task RegisterSchemaAsync(string groupName, string schemaName, RequestContent content, Core.ContentType contentType, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("SchemaRegistryClient.RegisterSchema"); + scope.Start(); + try + { + using HttpMessage message = CreateRegisterSchemaRequest(groupName, schemaName, content, contentType, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Register new schema + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Name of schema group. + /// Name of schema. + /// The content to send as the body of the request. + /// The content type for given schema. Allowed values: "application/json; serialization=Avro" | "application/json; serialization=Json" | "text/plain; charset=utf-8" | "text/vnd.ms.protobuf". + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual Response RegisterSchema(string groupName, string schemaName, RequestContent content, Core.ContentType contentType, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("SchemaRegistryClient.RegisterSchema"); + scope.Start(); + try + { + using HttpMessage message = CreateRegisterSchemaRequest(groupName, schemaName, content, contentType, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get list of schema groups. + /// The cancellation token to use. + /// Gets the list of schema groups user is authorized to access. + internal virtual AsyncPageable GetSchemaGroupsAsync(CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSchemaGroupsRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSchemaGroupsNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => e.GetString(), ClientDiagnostics, _pipeline, "SchemaRegistryClient.GetSchemaGroups", "Value", "NextLink", context); + } + + /// Get list of schema groups. + /// The cancellation token to use. + /// Gets the list of schema groups user is authorized to access. + internal virtual Pageable GetSchemaGroups(CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSchemaGroupsRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSchemaGroupsNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => e.GetString(), ClientDiagnostics, _pipeline, "SchemaRegistryClient.GetSchemaGroups", "Value", "NextLink", context); + } + + /// + /// [Protocol Method] Get list of schema groups. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + internal virtual AsyncPageable GetSchemaGroupsAsync(RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSchemaGroupsRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSchemaGroupsNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "SchemaRegistryClient.GetSchemaGroups", "Value", "NextLink", context); + } + + /// + /// [Protocol Method] Get list of schema groups. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + internal virtual Pageable GetSchemaGroups(RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSchemaGroupsRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSchemaGroupsNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "SchemaRegistryClient.GetSchemaGroups", "Value", "NextLink", context); + } + + /// List schema versions. + /// Name of schema group. + /// Name of schema. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Gets the list of all versions of one schema. + internal virtual AsyncPageable GetSchemaVersionsAsync(string groupName, string schemaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSchemaVersionsRequest(groupName, schemaName, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSchemaVersionsNextPageRequest(nextLink, groupName, schemaName, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => e.GetInt32(), ClientDiagnostics, _pipeline, "SchemaRegistryClient.GetSchemaVersions", "Value", "NextLink", context); + } + + /// List schema versions. + /// Name of schema group. + /// Name of schema. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Gets the list of all versions of one schema. + internal virtual Pageable GetSchemaVersions(string groupName, string schemaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSchemaVersionsRequest(groupName, schemaName, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSchemaVersionsNextPageRequest(nextLink, groupName, schemaName, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => e.GetInt32(), ClientDiagnostics, _pipeline, "SchemaRegistryClient.GetSchemaVersions", "Value", "NextLink", context); + } + + /// + /// [Protocol Method] List schema versions. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Name of schema group. + /// Name of schema. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + internal virtual AsyncPageable GetSchemaVersionsAsync(string groupName, string schemaName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSchemaVersionsRequest(groupName, schemaName, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSchemaVersionsNextPageRequest(nextLink, groupName, schemaName, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "SchemaRegistryClient.GetSchemaVersions", "Value", "NextLink", context); + } + + /// + /// [Protocol Method] List schema versions. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Name of schema group. + /// Name of schema. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + internal virtual Pageable GetSchemaVersions(string groupName, string schemaName, RequestContext context) + { + Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); + Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSchemaVersionsRequest(groupName, schemaName, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSchemaVersionsNextPageRequest(nextLink, groupName, schemaName, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "SchemaRegistryClient.GetSchemaVersions", "Value", "NextLink", context); + } + + internal HttpMessage CreateGetSchemaGroupsRequest(RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw("https://", false); + uri.Reset(_endpoint); + uri.AppendPath("/$schemaGroups", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetSchemaVersionsRequest(string groupName, string schemaName, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw("https://", false); + uri.Reset(_endpoint); + uri.AppendPath("/$schemaGroups/", false); + uri.AppendPath(groupName, true); + uri.AppendPath("/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/versions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetSchemaByIdRequest(string id, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw("https://", false); + uri.Reset(_endpoint); + uri.AppendPath("/$schemaGroups/$schemas/", false); + uri.AppendPath(id, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json; serialization=Avro"); + return message; + } + + internal HttpMessage CreateGetSchemaByVersionRequest(string groupName, string schemaName, int schemaVersion, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw("https://", false); + uri.Reset(_endpoint); + uri.AppendPath("/$schemaGroups/", false); + uri.AppendPath(groupName, true); + uri.AppendPath("/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(schemaVersion, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json; serialization=Avro"); + return message; + } + + internal HttpMessage CreateGetSchemaPropertiesByContentRequest(string groupName, string schemaName, RequestContent content, Core.ContentType contentType, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw("https://", false); + uri.Reset(_endpoint); + uri.AppendPath("/$schemaGroups/", false); + uri.AppendPath(groupName, true); + uri.AppendPath("/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendPath(":get-id", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", contentType.ToString()); + request.Content = content; + return message; + } + + internal HttpMessage CreateRegisterSchemaRequest(string groupName, string schemaName, RequestContent content, Core.ContentType contentType, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw("https://", false); + uri.Reset(_endpoint); + uri.AppendPath("/$schemaGroups/", false); + uri.AppendPath(groupName, true); + uri.AppendPath("/schemas/", false); + uri.AppendPath(schemaName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", contentType.ToString()); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetSchemaGroupsNextPageRequest(string nextLink, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw("https://", false); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetSchemaVersionsNextPageRequest(string nextLink, string groupName, string schemaName, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw("https://", false); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + private static RequestContext DefaultRequestContext = new RequestContext(); + internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) + { + if (!cancellationToken.CanBeCanceled) + { + return DefaultRequestContext; + } + + return new RequestContext() { CancellationToken = cancellationToken }; + } + + private static ResponseClassifier _responseClassifier200; + private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); + private static ResponseClassifier _responseClassifier204; + private static ResponseClassifier ResponseClassifier204 => _responseClassifier204 ??= new StatusCodeClassifier(stackalloc ushort[] { 204 }); + } +} diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/SchemaRegistryClientOptions.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/SchemaRegistryClientOptions.cs new file mode 100644 index 0000000000000..a3ab0c67ea8ea --- /dev/null +++ b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/SchemaRegistryClientOptions.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.Data.SchemaRegistry +{ + /// Client options for SchemaRegistryClient. + public partial class SchemaRegistryClientOptions : ClientOptions + { + private const ServiceVersion LatestVersion = ServiceVersion.V2023_07_01; + + /// The version of the service to use. + public enum ServiceVersion + { + /// Service version "2021-10". + V2021_10 = 1, + /// Service version "2022-10". + V2022_10 = 2, + /// Service version "2023-07-01". + V2023_07_01 = 3, + } + } +} diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/SchemaRestClient.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/SchemaRestClient.cs deleted file mode 100644 index bf888fc56b1f4..0000000000000 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/SchemaRestClient.cs +++ /dev/null @@ -1,568 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.IO; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.Data.SchemaRegistry.Models; - -namespace Azure.Data.SchemaRegistry -{ - internal partial class SchemaRestClient - { - private readonly HttpPipeline _pipeline; - private readonly string _endpoint; - private readonly string _apiVersion; - - /// The ClientDiagnostics is used to provide tracing support for the client library. - internal ClientDiagnostics ClientDiagnostics { get; } - - /// Initializes a new instance of SchemaRestClient. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The Schema Registry service endpoint, for example my-namespace.servicebus.windows.net. - /// Api Version. - /// , , or is null. - public SchemaRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string apiVersion = "2022-10") - { - ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? throw new ArgumentNullException(nameof(endpoint)); - _apiVersion = apiVersion ?? throw new ArgumentNullException(nameof(apiVersion)); - } - - internal HttpMessage CreateGetByIdRequest(string id) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.AppendRaw("https://", false); - uri.AppendRaw(_endpoint, false); - uri.AppendPath("/$schemaGroups/$schemas/", false); - uri.AppendPath(id, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json; serialization=Avro, application/json; serialization=json, application/octet-stream"); - return message; - } - - /// Get a registered schema by its unique ID reference. - /// References specific schema in registry namespace. - /// The cancellation token to use. - /// is null. - /// Gets a registered schema by its unique ID. Azure Schema Registry guarantees that ID is unique within a namespace. Operation response type is based on serialization of schema requested. - public async Task> GetByIdAsync(string id, CancellationToken cancellationToken = default) - { - if (id == null) - { - throw new ArgumentNullException(nameof(id)); - } - - using var message = CreateGetByIdRequest(id); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - var headers = new SchemaGetByIdHeaders(message.Response); - switch (message.Response.Status) - { - case 200: - { - var value = message.ExtractResponseContent(); - return ResponseWithHeaders.FromValue(value, headers, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get a registered schema by its unique ID reference. - /// References specific schema in registry namespace. - /// The cancellation token to use. - /// is null. - /// Gets a registered schema by its unique ID. Azure Schema Registry guarantees that ID is unique within a namespace. Operation response type is based on serialization of schema requested. - public ResponseWithHeaders GetById(string id, CancellationToken cancellationToken = default) - { - if (id == null) - { - throw new ArgumentNullException(nameof(id)); - } - - using var message = CreateGetByIdRequest(id); - _pipeline.Send(message, cancellationToken); - var headers = new SchemaGetByIdHeaders(message.Response); - switch (message.Response.Status) - { - case 200: - { - var value = message.ExtractResponseContent(); - return ResponseWithHeaders.FromValue(value, headers, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetVersionsRequest(string groupName, string schemaName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.AppendRaw("https://", false); - uri.AppendRaw(_endpoint, false); - uri.AppendPath("/$schemaGroups/", false); - uri.AppendPath(groupName, true); - uri.AppendPath("/schemas/", false); - uri.AppendPath(schemaName, true); - uri.AppendPath("/versions", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Get list schema versions. - /// Schema group under which schema is registered. Group's serialization type should match the serialization type specified in the request. - /// Name of schema. - /// The cancellation token to use. - /// or is null. - /// Gets the list of all versions of one schema. - public async Task> GetVersionsAsync(string groupName, string schemaName, CancellationToken cancellationToken = default) - { - if (groupName == null) - { - throw new ArgumentNullException(nameof(groupName)); - } - if (schemaName == null) - { - throw new ArgumentNullException(nameof(schemaName)); - } - - using var message = CreateGetVersionsRequest(groupName, schemaName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SchemaVersions value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = SchemaVersions.DeserializeSchemaVersions(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get list schema versions. - /// Schema group under which schema is registered. Group's serialization type should match the serialization type specified in the request. - /// Name of schema. - /// The cancellation token to use. - /// or is null. - /// Gets the list of all versions of one schema. - public Response GetVersions(string groupName, string schemaName, CancellationToken cancellationToken = default) - { - if (groupName == null) - { - throw new ArgumentNullException(nameof(groupName)); - } - if (schemaName == null) - { - throw new ArgumentNullException(nameof(schemaName)); - } - - using var message = CreateGetVersionsRequest(groupName, schemaName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SchemaVersions value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = SchemaVersions.DeserializeSchemaVersions(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetSchemaVersionRequest(string groupName, string schemaName, int schemaVersion) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.AppendRaw("https://", false); - uri.AppendRaw(_endpoint, false); - uri.AppendPath("/$schemaGroups/", false); - uri.AppendPath(groupName, true); - uri.AppendPath("/schemas/", false); - uri.AppendPath(schemaName, true); - uri.AppendPath("/versions/", false); - uri.AppendPath(schemaVersion, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json; serialization=Avro, application/json; serialization=json, application/octet-stream"); - return message; - } - - /// Get specific schema versions. - /// Schema group under which schema is registered. Group's serialization type should match the serialization type specified in the request. - /// Name of schema. - /// Version number of specific schema. - /// The cancellation token to use. - /// or is null. - /// Gets one specific version of one schema. - public async Task> GetSchemaVersionAsync(string groupName, string schemaName, int schemaVersion, CancellationToken cancellationToken = default) - { - if (groupName == null) - { - throw new ArgumentNullException(nameof(groupName)); - } - if (schemaName == null) - { - throw new ArgumentNullException(nameof(schemaName)); - } - - using var message = CreateGetSchemaVersionRequest(groupName, schemaName, schemaVersion); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - var headers = new SchemaGetSchemaVersionHeaders(message.Response); - switch (message.Response.Status) - { - case 200: - { - var value = message.ExtractResponseContent(); - return ResponseWithHeaders.FromValue(value, headers, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get specific schema versions. - /// Schema group under which schema is registered. Group's serialization type should match the serialization type specified in the request. - /// Name of schema. - /// Version number of specific schema. - /// The cancellation token to use. - /// or is null. - /// Gets one specific version of one schema. - public ResponseWithHeaders GetSchemaVersion(string groupName, string schemaName, int schemaVersion, CancellationToken cancellationToken = default) - { - if (groupName == null) - { - throw new ArgumentNullException(nameof(groupName)); - } - if (schemaName == null) - { - throw new ArgumentNullException(nameof(schemaName)); - } - - using var message = CreateGetSchemaVersionRequest(groupName, schemaName, schemaVersion); - _pipeline.Send(message, cancellationToken); - var headers = new SchemaGetSchemaVersionHeaders(message.Response); - switch (message.Response.Status) - { - case 200: - { - var value = message.ExtractResponseContent(); - return ResponseWithHeaders.FromValue(value, headers, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateQueryIdByContentRequest(string groupName, string schemaName, ContentType contentType, Stream schemaContent) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.AppendRaw("https://", false); - uri.AppendRaw(_endpoint, false); - uri.AppendPath("/$schemaGroups/", false); - uri.AppendPath(groupName, true); - uri.AppendPath("/schemas/", false); - uri.AppendPath(schemaName, true); - uri.AppendPath(":get-id", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", contentType.ToString()); - request.Content = RequestContent.Create(schemaContent); - return message; - } - - /// Get ID for existing schema. - /// Schema group under which schema is registered. Group's serialization type should match the serialization type specified in the request. - /// Name of schema. - /// Content type of the schema. - /// String representation (UTF-8) of the registered schema. - /// The cancellation token to use. - /// , or is null. - /// Gets the ID referencing an existing schema within the specified schema group, as matched by schema content comparison. - public async Task> QueryIdByContentAsync(string groupName, string schemaName, ContentType contentType, Stream schemaContent, CancellationToken cancellationToken = default) - { - if (groupName == null) - { - throw new ArgumentNullException(nameof(groupName)); - } - if (schemaName == null) - { - throw new ArgumentNullException(nameof(schemaName)); - } - if (schemaContent == null) - { - throw new ArgumentNullException(nameof(schemaContent)); - } - - using var message = CreateQueryIdByContentRequest(groupName, schemaName, contentType, schemaContent); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - var headers = new SchemaQueryIdByContentHeaders(message.Response); - switch (message.Response.Status) - { - case 204: - return ResponseWithHeaders.FromValue(headers, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get ID for existing schema. - /// Schema group under which schema is registered. Group's serialization type should match the serialization type specified in the request. - /// Name of schema. - /// Content type of the schema. - /// String representation (UTF-8) of the registered schema. - /// The cancellation token to use. - /// , or is null. - /// Gets the ID referencing an existing schema within the specified schema group, as matched by schema content comparison. - public ResponseWithHeaders QueryIdByContent(string groupName, string schemaName, ContentType contentType, Stream schemaContent, CancellationToken cancellationToken = default) - { - if (groupName == null) - { - throw new ArgumentNullException(nameof(groupName)); - } - if (schemaName == null) - { - throw new ArgumentNullException(nameof(schemaName)); - } - if (schemaContent == null) - { - throw new ArgumentNullException(nameof(schemaContent)); - } - - using var message = CreateQueryIdByContentRequest(groupName, schemaName, contentType, schemaContent); - _pipeline.Send(message, cancellationToken); - var headers = new SchemaQueryIdByContentHeaders(message.Response); - switch (message.Response.Status) - { - case 204: - return ResponseWithHeaders.FromValue(headers, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateRegisterRequest(string groupName, string schemaName, string contentType, Stream schemaContent) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.AppendRaw("https://", false); - uri.AppendRaw(_endpoint, false); - uri.AppendPath("/$schemaGroups/", false); - uri.AppendPath(groupName, true); - uri.AppendPath("/schemas/", false); - uri.AppendPath(schemaName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", contentType); - request.Content = RequestContent.Create(schemaContent); - return message; - } - - /// Register new schema. - /// Schema group under which schema should be registered. Group's serialization type should match the serialization type specified in the request. - /// Name of schema. - /// Content type of the schema. - /// String representation (UTF-8) of the schema being registered. - /// The cancellation token to use. - /// , , or is null. - /// - /// Register new schema. If schema of specified name does not exist in specified group, schema is created at version 1. If schema of specified name exists already in specified group, schema is created at latest version + 1. - /// - /// - public async Task> RegisterAsync(string groupName, string schemaName, string contentType, Stream schemaContent, CancellationToken cancellationToken = default) - { - if (groupName == null) - { - throw new ArgumentNullException(nameof(groupName)); - } - if (schemaName == null) - { - throw new ArgumentNullException(nameof(schemaName)); - } - if (contentType == null) - { - throw new ArgumentNullException(nameof(contentType)); - } - if (schemaContent == null) - { - throw new ArgumentNullException(nameof(schemaContent)); - } - - using var message = CreateRegisterRequest(groupName, schemaName, contentType, schemaContent); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - var headers = new SchemaRegisterHeaders(message.Response); - switch (message.Response.Status) - { - case 204: - return ResponseWithHeaders.FromValue(headers, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Register new schema. - /// Schema group under which schema should be registered. Group's serialization type should match the serialization type specified in the request. - /// Name of schema. - /// Content type of the schema. - /// String representation (UTF-8) of the schema being registered. - /// The cancellation token to use. - /// , , or is null. - /// - /// Register new schema. If schema of specified name does not exist in specified group, schema is created at version 1. If schema of specified name exists already in specified group, schema is created at latest version + 1. - /// - /// - public ResponseWithHeaders Register(string groupName, string schemaName, string contentType, Stream schemaContent, CancellationToken cancellationToken = default) - { - if (groupName == null) - { - throw new ArgumentNullException(nameof(groupName)); - } - if (schemaName == null) - { - throw new ArgumentNullException(nameof(schemaName)); - } - if (contentType == null) - { - throw new ArgumentNullException(nameof(contentType)); - } - if (schemaContent == null) - { - throw new ArgumentNullException(nameof(schemaContent)); - } - - using var message = CreateRegisterRequest(groupName, schemaName, contentType, schemaContent); - _pipeline.Send(message, cancellationToken); - var headers = new SchemaRegisterHeaders(message.Response); - switch (message.Response.Status) - { - case 204: - return ResponseWithHeaders.FromValue(headers, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetVersionsNextPageRequest(string nextLink, string groupName, string schemaName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.AppendRaw("https://", false); - uri.AppendRaw(_endpoint, false); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - /// Get list schema versions. - /// The URL to the next page of results. - /// Schema group under which schema is registered. Group's serialization type should match the serialization type specified in the request. - /// Name of schema. - /// The cancellation token to use. - /// , or is null. - /// Gets the list of all versions of one schema. - public async Task> GetVersionsNextPageAsync(string nextLink, string groupName, string schemaName, CancellationToken cancellationToken = default) - { - if (nextLink == null) - { - throw new ArgumentNullException(nameof(nextLink)); - } - if (groupName == null) - { - throw new ArgumentNullException(nameof(groupName)); - } - if (schemaName == null) - { - throw new ArgumentNullException(nameof(schemaName)); - } - - using var message = CreateGetVersionsNextPageRequest(nextLink, groupName, schemaName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SchemaVersions value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = SchemaVersions.DeserializeSchemaVersions(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get list schema versions. - /// The URL to the next page of results. - /// Schema group under which schema is registered. Group's serialization type should match the serialization type specified in the request. - /// Name of schema. - /// The cancellation token to use. - /// , or is null. - /// Gets the list of all versions of one schema. - public Response GetVersionsNextPage(string nextLink, string groupName, string schemaName, CancellationToken cancellationToken = default) - { - if (nextLink == null) - { - throw new ArgumentNullException(nameof(nextLink)); - } - if (groupName == null) - { - throw new ArgumentNullException(nameof(groupName)); - } - if (schemaName == null) - { - throw new ArgumentNullException(nameof(schemaName)); - } - - using var message = CreateGetVersionsNextPageRequest(nextLink, groupName, schemaName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SchemaVersions value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = SchemaVersions.DeserializeSchemaVersions(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/SchemaFormat.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/SchemaFormat.cs index 38144eccb3031..03ba90fa7f16e 100644 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/SchemaFormat.cs +++ b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/SchemaFormat.cs @@ -3,7 +3,6 @@ using System; using System.ComponentModel; -using System.Security.Cryptography; namespace Azure.Data.SchemaRegistry { diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/SchemaGroups.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/SchemaGroups.cs deleted file mode 100644 index 54b9c82d63067..0000000000000 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/SchemaGroups.cs +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Azure.Data.SchemaRegistry.Models -{ - internal partial class SchemaGroups - { - } -} \ No newline at end of file diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/SchemaId.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/SchemaId.cs deleted file mode 100644 index 154d76331ce70..0000000000000 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/SchemaId.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Core; - -namespace Azure.Data.SchemaRegistry.Models -{ - [CodeGenModel("SchemaId")] - internal readonly partial struct SchemaId - { - } -} diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/SchemaRegistryClient.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/SchemaRegistryClient.cs index 17ab30fe76acd..7149b2aaa0b62 100644 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/SchemaRegistryClient.cs +++ b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/SchemaRegistryClient.cs @@ -2,8 +2,6 @@ // Licensed under the MIT License. using System; -using System.IO; -using System.Security.Authentication.ExtendedProtection; using System.Threading; using System.Threading.Tasks; using Azure.Core; @@ -14,10 +12,8 @@ namespace Azure.Data.SchemaRegistry /// /// The Schema Registry client provides operations to interact with the Schema Registry service. /// - public class SchemaRegistryClient + public partial class SchemaRegistryClient { - private readonly ClientDiagnostics _clientDiagnostics; - internal SchemaRestClient RestClient { get; } private const string CredentialScope = "https://eventhubs.azure.net/.default"; /// @@ -31,11 +27,11 @@ public class SchemaRegistryClient /// Initializes a new instance of the . /// public SchemaRegistryClient(string fullyQualifiedNamespace, TokenCredential credential, SchemaRegistryClientOptions options) : this( - new ClientDiagnostics(options), - HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, CredentialScope)), - fullyQualifiedNamespace, - options.Version) + new Uri($"https://{fullyQualifiedNamespace}"), + credential, + options) { + FullyQualifiedNamespace = fullyQualifiedNamespace; } /// @@ -50,15 +46,29 @@ protected SchemaRegistryClient() } /// Initializes a new instance of . - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The fully qualified namespace. For example, myschemaregistry.servicebus.windows.net. - /// The API version of the service. - internal SchemaRegistryClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string fullyQualifiedNamespace, string apiVersion) + /// The Schema Registry service endpoint, for example 'https://my-namespace.servicebus.windows.net' + /// A credential used to authenticate to an Azure service. + /// or is null. + internal SchemaRegistryClient(Uri endpoint, TokenCredential credential) : this(endpoint, credential, new SchemaRegistryClientOptions()) { - RestClient = new SchemaRestClient(clientDiagnostics, pipeline, fullyQualifiedNamespace, apiVersion); - _clientDiagnostics = clientDiagnostics; - FullyQualifiedNamespace = fullyQualifiedNamespace; + } + + /// Initializes a new instance of SchemaRegistryClient. + /// The Schema Registry service endpoint, for example 'https://my-namespace.servicebus.windows.net'. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + /// or is null. + internal SchemaRegistryClient(Uri endpoint, TokenCredential credential, SchemaRegistryClientOptions options) + { + Argument.AssertNotNull(credential, nameof(credential)); + Argument.AssertNotNull(endpoint, nameof(endpoint)); + options ??= new SchemaRegistryClientOptions(); + + ClientDiagnostics = new ClientDiagnostics(options, true); + _tokenCredential = credential; + _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes) }, new ResponseClassifier()); + _endpoint = endpoint; + _apiVersion = options.Version; } /// @@ -116,21 +126,26 @@ private async Task> RegisterSchemaInternalAsync( bool async, CancellationToken cancellationToken = default) { - using DiagnosticScope scope = _clientDiagnostics.CreateScope(RegisterSchemaScopeName); + using DiagnosticScope scope = ClientDiagnostics.CreateScope(RegisterSchemaScopeName); scope.Start(); try { - ResponseWithHeaders response; + Response response; if (async) { - response = await RestClient.RegisterAsync(groupName, schemaName, format.ToContentType().ToString(), new BinaryData(schemaDefinition).ToStream(), cancellationToken).ConfigureAwait(false); + response = await RegisterSchemaAsync(groupName, schemaName, new BinaryData(schemaDefinition), new Core.ContentType(format.ToContentType().ToString()), cancellationToken).ConfigureAwait(false); } else { - response = RestClient.Register(groupName, schemaName, format.ToContentType().ToString(), new BinaryData(schemaDefinition).ToStream(), cancellationToken); + response = RegisterSchema(groupName, schemaName, new BinaryData(schemaDefinition), new Core.ContentType(format.ToContentType().ToString()), cancellationToken); } - var properties = new SchemaProperties(format, response.Headers.SchemaId, response.Headers.SchemaGroupName, response.Headers.SchemaName, response.Headers.SchemaVersion!.Value); + var schemaIdHeader = response.Headers.TryGetValue("Schema-Id", out string idHeader) ? idHeader : null; + var schemaGroupNameHeader = response.Headers.TryGetValue("Schema-Group-Name", out string groupNameHeader) ? groupNameHeader : null; + var schemaNameHeader = response.Headers.TryGetValue("Schema-Name", out string nameHeader) ? nameHeader : null; + var schemaVersionHeader = response.Headers.TryGetValue("Schema-Version", out int? versionHeader) ? versionHeader : null; + + var properties = new SchemaProperties(format, schemaIdHeader, schemaGroupNameHeader, schemaNameHeader, schemaVersionHeader!.Value); return Response.FromValue(properties, response); } @@ -188,21 +203,26 @@ private async Task> GetSchemaPropertiesInternalAsync( bool async, CancellationToken cancellationToken) { - using DiagnosticScope scope = _clientDiagnostics.CreateScope(GetSchemaIdScopeName); + using DiagnosticScope scope = ClientDiagnostics.CreateScope(GetSchemaIdScopeName); scope.Start(); try { - ResponseWithHeaders response; + Response response; if (async) { - response = await RestClient.QueryIdByContentAsync(groupName, schemaName, format.ToContentType() , new BinaryData(schemaDefinition).ToStream(), cancellationToken).ConfigureAwait(false); + response = await GetSchemaPropertiesByContentAsync(groupName, schemaName, new BinaryData(schemaDefinition), new Core.ContentType(format.ToContentType().ToString()), cancellationToken).ConfigureAwait(false); } else { - response = RestClient.QueryIdByContent(groupName, schemaName, format.ToContentType(), new BinaryData(schemaDefinition).ToStream(), cancellationToken); + response = GetSchemaPropertiesByContent(groupName, schemaName, new BinaryData(schemaDefinition), new Core.ContentType(format.ToContentType().ToString()), cancellationToken); } - var properties = new SchemaProperties(format, response.Headers.SchemaId, response.Headers.SchemaGroupName, response.Headers.SchemaName, response.Headers.SchemaVersion!.Value); + var schemaIdHeader = response.Headers.TryGetValue("Schema-Id", out string idHeader) ? idHeader : null; + var schemaGroupNameHeader = response.Headers.TryGetValue("Schema-Group-Name", out string groupNameHeader) ? groupNameHeader : null; + var schemaNameHeader = response.Headers.TryGetValue("Schema-Name", out string nameHeader) ? nameHeader : null; + var schemaVersionHeader = response.Headers.TryGetValue("Schema-Version", out int? versionHeader) ? versionHeader : null; + + var properties = new SchemaProperties(format, schemaIdHeader, schemaGroupNameHeader, schemaNameHeader, schemaVersionHeader!.Value); return Response.FromValue(properties, response); } @@ -263,24 +283,30 @@ public virtual Response GetSchema(string groupName, string private async Task> GetSchemaInternalAsync(string groupName, string schemaName, int version, bool async, CancellationToken cancellationToken) { - using DiagnosticScope scope = _clientDiagnostics.CreateScope(GetSchemaScopeName); + using DiagnosticScope scope = ClientDiagnostics.CreateScope(GetSchemaScopeName); scope.Start(); try { - ResponseWithHeaders response; + Response response; if (async) { - response = await RestClient.GetSchemaVersionAsync(groupName, schemaName, version, cancellationToken).ConfigureAwait(false); + response = await GetSchemaByVersionAsync(groupName, schemaName, version, cancellationToken).ConfigureAwait(false); } else { - response = RestClient.GetSchemaVersion(groupName, schemaName, version, cancellationToken); + response = GetSchemaByVersion(groupName, schemaName, version, cancellationToken); } - var properties = new SchemaProperties(SchemaFormat.FromContentType(response.Headers.ContentType.Value.ToString()), response.Headers.SchemaId, response.Headers.SchemaGroupName, response.Headers.SchemaName, response.Headers.SchemaVersion!.Value); - var schema = new SchemaRegistrySchema(properties, BinaryData.FromStream(response.Value).ToString()); + var schemaIdHeader = response.GetRawResponse().Headers.TryGetValue("Schema-Id", out string idHeader) ? idHeader : null; + var schemaGroupNameHeader = response.GetRawResponse().Headers.TryGetValue("Schema-Group-Name", out string groupNameHeader) ? groupNameHeader : null; + var schemaNameHeader = response.GetRawResponse().Headers.TryGetValue("Schema-Name", out string nameHeader) ? nameHeader : null; + var schemaVersionHeader = response.GetRawResponse().Headers.TryGetValue("Schema-Version", out int? versionHeader) ? versionHeader : null; + var schemaContentTypeHeader = response.GetRawResponse().Headers.TryGetValue("Content-Type", out string contentTypeHeader) ? contentTypeHeader : null; - return Response.FromValue(schema, response); + var properties = new SchemaProperties(SchemaFormat.FromContentType(schemaContentTypeHeader), schemaIdHeader, schemaGroupNameHeader, schemaNameHeader, schemaVersionHeader!.Value); + var schema = new SchemaRegistrySchema(properties, response.Value.ToString()); + + return Response.FromValue(schema, response.GetRawResponse()); } catch (Exception e) { @@ -291,24 +317,30 @@ private async Task> GetSchemaInternalAsync(string private async Task> GetSchemaInternalAsync(string schemaId, bool async, CancellationToken cancellationToken) { - using DiagnosticScope scope = _clientDiagnostics.CreateScope(GetSchemaScopeName); + using DiagnosticScope scope = ClientDiagnostics.CreateScope(GetSchemaScopeName); scope.Start(); try { - ResponseWithHeaders response; + Response response; if (async) { - response = await RestClient.GetByIdAsync(schemaId, cancellationToken).ConfigureAwait(false); + response = await GetSchemaByIdAsync(schemaId, cancellationToken).ConfigureAwait(false); } else { - response = RestClient.GetById(schemaId, cancellationToken); + response = GetSchemaById(schemaId, cancellationToken); } - var properties = new SchemaProperties(SchemaFormat.FromContentType(response.Headers.ContentType.Value.ToString()), response.Headers.SchemaId, response.Headers.SchemaGroupName, response.Headers.SchemaName, response.Headers.SchemaVersion!.Value); - var schema = new SchemaRegistrySchema(properties, BinaryData.FromStream(response.Value).ToString()); + var schemaIdHeader = response.GetRawResponse().Headers.TryGetValue("Schema-Id", out string idHeader) ? idHeader : null; + var schemaGroupNameHeader = response.GetRawResponse().Headers.TryGetValue("Schema-Group-Name", out string groupNameHeader) ? groupNameHeader : null; + var schemaNameHeader = response.GetRawResponse().Headers.TryGetValue("Schema-Name", out string nameHeader) ? nameHeader : null; + var schemaVersionHeader = response.GetRawResponse().Headers.TryGetValue("Schema-Version", out int? versionHeader) ? versionHeader : null; + var schemaContentTypeHeader = response.GetRawResponse().Headers.TryGetValue("Content-Type", out string contentTypeHeader) ? contentTypeHeader : null; + + var properties = new SchemaProperties(SchemaFormat.FromContentType(schemaContentTypeHeader), schemaIdHeader, schemaGroupNameHeader, schemaNameHeader, schemaVersionHeader!.Value); + var schema = new SchemaRegistrySchema(properties, response.Value.ToString()); - return Response.FromValue(schema, response); + return Response.FromValue(schema, response.GetRawResponse()); } catch (Exception e) { diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/SchemaRegistryClientOptions.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/SchemaRegistryClientOptions.cs index 6a674179c5f74..1f9700f050051 100644 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/SchemaRegistryClientOptions.cs +++ b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/SchemaRegistryClientOptions.cs @@ -9,45 +9,22 @@ namespace Azure.Data.SchemaRegistry /// /// The options for /// - public class SchemaRegistryClientOptions : ClientOptions + public partial class SchemaRegistryClientOptions : ClientOptions { internal string Version { get; } /// /// Initializes a new instance of the . /// - public SchemaRegistryClientOptions(ServiceVersion version = ServiceVersion.V2023_07) + public SchemaRegistryClientOptions(ServiceVersion version = ServiceVersion.V2023_07_01) { Version = version switch { ServiceVersion.V2021_10 => "2021-10", ServiceVersion.V2022_10 => "2022-10", - ServiceVersion.V2023_07 => "2023-07-01", + ServiceVersion.V2023_07_01 => "2023-07-01", _ => throw new ArgumentException($"The service version {version} is not supported by this library.", nameof(version)) }; } - - /// - /// The Schema Registry service version. - /// - public enum ServiceVersion - { - /// - /// Version 2021-10 of the Schema Registry service. - /// -#pragma warning disable CA1707 - V2021_10 = 1, - - /// - /// Version 2022-10 of the Schema Registry service. - /// - V2022_10 = 2, - - /// - /// Version 2023-07 of the Schema Registry service. - /// - V2023_07 = 3 -#pragma warning restore CA1707 - } } } diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/SchemaRegistryModelFactory.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/SchemaRegistryModelFactory.cs index 332a482d3979a..a7f622a814252 100644 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/SchemaRegistryModelFactory.cs +++ b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/SchemaRegistryModelFactory.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. using System.ComponentModel; -using Azure.Data.SchemaRegistry.Models; namespace Azure.Data.SchemaRegistry { diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/SchemaVersions.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/SchemaVersions.cs deleted file mode 100644 index 01aa7dbe31223..0000000000000 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/SchemaVersions.cs +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Azure.Data.SchemaRegistry.Models -{ - internal partial class SchemaVersions - { - } -} \ No newline at end of file diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/autorest.md b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/autorest.md deleted file mode 100644 index c0a8cb7199ba0..0000000000000 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/autorest.md +++ /dev/null @@ -1,115 +0,0 @@ -# Generated code configuration - -Run `dotnet build /t:GenerateCode` to generate code. - -``` yaml -title: SchemaRegistryClient -require: https://github.com/Azure/azure-rest-api-specs/blob/70e53bf07d4f67000743c05d281930f2713a988e/specification/schemaregistry/data-plane/readme.md -generation1-convenience-client: true -``` - -## Swagger workarounds - -### Update producers arrays - get version -Because of some limitations of swagger and Autorest, Autorest cannot properly deduce that we would like to have an object return type to put on this method if we have a mix of "text/..." and "application/..." outputs in the produces array. Because of this we need to have "application/octet-stream" as a kind of stand-in for the the text outputs (Custom: "text/plain; charset=utf-8" and Protobuf: "text/vnd.ms.protobuf"). We have to determine what the output is on the client side based on the content-type. - -``` yaml -directive: - from: swagger-document - where: $.paths["/$schemaGroups/{groupName}/schemas/{schemaName}/versions/{schemaVersion}"].get - transform: > - $.produces = [ - "application/json; serialization=Avro", - "application/json; serialization=json", - "application/octet-stream" - ] -``` - -### Update producers arrays - get id -We need to use "application/octet-stream" here for the same reason as above. - -``` yaml -directive: - from: swagger-document - where: $.paths["/$schemaGroups/$schemas/{id}"].get - transform: > - $.produces = [ - "application/json; serialization=Avro", - "application/json; serialization=json", - "application/octet-stream" - ] -``` - -### Add Content-Type header to GetById operation - -``` yaml -directive: - from: swagger-document - where: $.paths["/$schemaGroups/{groupName}/schemas/{schemaName}:get-id"].post - transform: > - $.parameters.push({ - "name": "Content-Type", - "in": "header", - "description": "Content type of the schema.", - "required": true, - "type": "string", - "enum": [ - "application/json; serialization=Avro", - "application/json; serialization=json", - "text/plain; charset=utf-8", - "text/vnd.ms.protobuf" - ], - "x-ms-enum": { - "name": "ContentType", - "modelAsString": true - }}); -``` - -### Add Content-Type header to Register operation - -``` yaml -directive: - from: swagger-document - where: $.paths["/$schemaGroups/{groupName}/schemas/{schemaName}"].put - transform: > - $.parameters.push({ - "name": "Content-Type", - "in": "header", - "description": "Content type of the schema.", - "required": true, - "type": "string"}); -``` - -### Enrich Content-Type header in response headers for operations returning the schema - -``` yaml -directive: - from: swagger-document - where: $.paths["/$schemaGroups/$schemas/{id}"].get.responses["200"].headers - transform: > - $["Content-Type"]["enum"] = [ - "application/json; serialization=Avro", - "application/json; serialization=json", - "text/plain; charset=utf-8" - ]; - $["Content-Type"]["x-ms-enum"] = { - "name": "ContentType", - "modelAsString": true - }; -``` - -``` yaml -directive: - from: swagger-document - where: $.paths["/$schemaGroups/{groupName}/schemas/{schemaName}/versions/{schemaVersion}"].get.responses["200"].headers - transform: > - $["Content-Type"]["enum"] = [ - "application/json; serialization=Avro", - "application/json; serialization=json", - "text/plain; charset=utf-8" - ]; - $["Content-Type"]["x-ms-enum"] = { - "name": "ContentType", - "modelAsString": true - }; -``` diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/tests/SchemaRegistryClientLiveTests.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/tests/SchemaRegistryClientLiveTests.cs index 779015ca6733b..d9df2e30cc637 100644 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/tests/SchemaRegistryClientLiveTests.cs +++ b/sdk/schemaregistry/Azure.Data.SchemaRegistry/tests/SchemaRegistryClientLiveTests.cs @@ -3,18 +3,13 @@ using System; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; using System.Threading.Tasks; -using Azure.Core; using Azure.Core.TestFramework; using NUnit.Framework; -using System.Collections.Generic; -using System.Net; namespace Azure.Data.SchemaRegistry.Tests { - [ClientTestFixture(SchemaRegistryClientOptions.ServiceVersion.V2021_10, SchemaRegistryClientOptions.ServiceVersion.V2022_10, SchemaRegistryClientOptions.ServiceVersion.V2023_07)] + [ClientTestFixture(SchemaRegistryClientOptions.ServiceVersion.V2021_10, SchemaRegistryClientOptions.ServiceVersion.V2022_10, SchemaRegistryClientOptions.ServiceVersion.V2023_07_01)] public class SchemaRegistryClientLiveTests : RecordedTestBase { private readonly SchemaRegistryClientOptions.ServiceVersion _serviceVersion; @@ -29,7 +24,7 @@ private SchemaRegistryClient CreateClient(string format) string endpoint; switch (format, _serviceVersion) { - case (Avro, SchemaRegistryClientOptions.ServiceVersion.V2023_07): + case (Avro, SchemaRegistryClientOptions.ServiceVersion.V2023_07_01): endpoint = TestEnvironment.SchemaRegistryEndpointAvro; break; case (Avro, SchemaRegistryClientOptions.ServiceVersion.V2022_10): @@ -38,7 +33,7 @@ private SchemaRegistryClient CreateClient(string format) case (Avro, SchemaRegistryClientOptions.ServiceVersion.V2021_10): endpoint = TestEnvironment.SchemaRegistryEndpointAvro2021; break; - case (Json, SchemaRegistryClientOptions.ServiceVersion.V2023_07): + case (Json, SchemaRegistryClientOptions.ServiceVersion.V2023_07_01): endpoint = TestEnvironment.SchemaRegistryEndpointJson; break; case (Json, SchemaRegistryClientOptions.ServiceVersion.V2022_10): @@ -47,7 +42,7 @@ private SchemaRegistryClient CreateClient(string format) case (Json, SchemaRegistryClientOptions.ServiceVersion.V2021_10): endpoint = TestEnvironment.SchemaRegistryEndpointJson2021; break; - case (Custom, SchemaRegistryClientOptions.ServiceVersion.V2023_07): + case (Custom, SchemaRegistryClientOptions.ServiceVersion.V2023_07_01): endpoint = TestEnvironment.SchemaRegistryEndpointCustom; break; case (Custom, SchemaRegistryClientOptions.ServiceVersion.V2022_10): @@ -56,7 +51,7 @@ private SchemaRegistryClient CreateClient(string format) case (Custom, SchemaRegistryClientOptions.ServiceVersion.V2021_10): endpoint = TestEnvironment.SchemaRegistryEndpointCustom2021; break; - case (Protobuf, SchemaRegistryClientOptions.ServiceVersion.V2023_07): + case (Protobuf, SchemaRegistryClientOptions.ServiceVersion.V2023_07_01): endpoint = TestEnvironment.SchemaRegistryEndpointProtobuf; break; case (Protobuf, SchemaRegistryClientOptions.ServiceVersion.V2022_10): @@ -66,7 +61,7 @@ private SchemaRegistryClient CreateClient(string format) endpoint = TestEnvironment.SchemaRegistryEndpointProtobuf2021; break; default: - endpoint= TestEnvironment.SchemaRegistryEndpointAvro; + endpoint = TestEnvironment.SchemaRegistryEndpointAvro; break; } @@ -174,10 +169,10 @@ public async Task CanGetSchema(string formatName) var format = StringToSchemaFormat(formatName); var content = StringToSchemaContent(formatName, 1); - var registerProperties = await client.RegisterSchemaAsync(groupName, schemaName, content, format); + SchemaProperties registerProperties = await client.RegisterSchemaAsync(groupName, schemaName, content, format); AssertSchemaProperties(registerProperties, schemaName, format); - SchemaRegistrySchema schema = await client.GetSchemaAsync(registerProperties.Value.Id); + SchemaRegistrySchema schema = await client.GetSchemaAsync(registerProperties.Id); AssertSchema(schema, schemaName, content, format); AssertPropertiesAreEqual(registerProperties, schema.Properties, format); } diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/tsp-location.yaml b/sdk/schemaregistry/Azure.Data.SchemaRegistry/tsp-location.yaml new file mode 100644 index 0000000000000..93dfddce7393e --- /dev/null +++ b/sdk/schemaregistry/Azure.Data.SchemaRegistry/tsp-location.yaml @@ -0,0 +1,4 @@ +repo: Azure/azure-rest-api-specs +directory: specification/schemaregistry/SchemaRegistry +additionalDirectories: [] +commit: ab064e0047ec560a700d6b501097d99471ad817b \ No newline at end of file diff --git a/sdk/schemaregistry/Microsoft.Azure.Data.SchemaRegistry.ApacheAvro/assets.json b/sdk/schemaregistry/Microsoft.Azure.Data.SchemaRegistry.ApacheAvro/assets.json index 2b8753fa0cf1c..ae7740044a9be 100644 --- a/sdk/schemaregistry/Microsoft.Azure.Data.SchemaRegistry.ApacheAvro/assets.json +++ b/sdk/schemaregistry/Microsoft.Azure.Data.SchemaRegistry.ApacheAvro/assets.json @@ -2,6 +2,6 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/schemaregistry/Microsoft.Azure.Data.SchemaRegistry.ApacheAvro", - "Tag": "net/schemaregistry/Microsoft.Azure.Data.SchemaRegistry.ApacheAvro_33f05d3e57" + "Tag": "net/schemaregistry/Microsoft.Azure.Data.SchemaRegistry.ApacheAvro_e22a0d198d" } \ No newline at end of file diff --git a/sdk/schemaregistry/Microsoft.Azure.Data.SchemaRegistry.ApacheAvro/src/Microsoft.Azure.Data.SchemaRegistry.ApacheAvro.csproj b/sdk/schemaregistry/Microsoft.Azure.Data.SchemaRegistry.ApacheAvro/src/Microsoft.Azure.Data.SchemaRegistry.ApacheAvro.csproj index 3b7cf60a3f707..a2e846ab3010e 100644 --- a/sdk/schemaregistry/Microsoft.Azure.Data.SchemaRegistry.ApacheAvro/src/Microsoft.Azure.Data.SchemaRegistry.ApacheAvro.csproj +++ b/sdk/schemaregistry/Microsoft.Azure.Data.SchemaRegistry.ApacheAvro/src/Microsoft.Azure.Data.SchemaRegistry.ApacheAvro.csproj @@ -11,15 +11,13 @@ - + - - - - - + + + From 4a0ec102d719152731688462b439d0cbedadb52e Mon Sep 17 00:00:00 2001 From: Madalyn Redding <66138537+m-redding@users.noreply.github.com> Date: Tue, 9 Jul 2024 11:08:07 -0400 Subject: [PATCH 039/144] [Azure.Core] GeoJsonConverter serialization fix (#44835) * GeoJsonConverter serialization fix * formatting * formatting * Update GeoJsonConverter.cs * Update CHANGELOG.md * add comment --- sdk/core/Azure.Core/CHANGELOG.md | 2 ++ .../src/GeoJson/GeoJsonConverter.cs | 17 ++++++++++- .../tests/GeoJsonSerializationTests.cs | 30 ++++++++++++------- 3 files changed, 38 insertions(+), 11 deletions(-) diff --git a/sdk/core/Azure.Core/CHANGELOG.md b/sdk/core/Azure.Core/CHANGELOG.md index 61f9e6dd31ce6..6ff2368316fc8 100644 --- a/sdk/core/Azure.Core/CHANGELOG.md +++ b/sdk/core/Azure.Core/CHANGELOG.md @@ -9,6 +9,8 @@ ### Bugs Fixed - Fixed an issue that could result in `BearerTokenAuthenticationPolicy` fails to refresh a token, resulting in a `OperationCanceledException`. +- Fixed case where a GeoJSON string could not be deserialized when the BoundingBox JSON value ("bbox") was set explicitly to null ([#44835](https://github.com/Azure/azure-sdk-for-net/pull/44835)) + ### Other Changes ## 1.40.0 (2024-06-06) diff --git a/sdk/core/Azure.Core/src/GeoJson/GeoJsonConverter.cs b/sdk/core/Azure.Core/src/GeoJson/GeoJsonConverter.cs index 43685ec16d506..78868b7c2b4ab 100644 --- a/sdk/core/Azure.Core/src/GeoJson/GeoJsonConverter.cs +++ b/sdk/core/Azure.Core/src/GeoJson/GeoJsonConverter.cs @@ -127,6 +127,21 @@ internal static GeoObject Read(JsonElement element) if (element.TryGetProperty(BBoxProperty, out JsonElement bboxElement)) { + // According to RFC 7946, the bbox member is optional. If one is provided, it MUST + // be an array and cannot be null. + // The code below is intentionally lenient and allows a null value to be treated + // as if the bbox member was omitted. The GeoObject.BoundingBox property is already + // set to null when there is no bbox, so setting it to null when the GeoJSON data has + // a null bbox does not impact the behavior of the GeoObject class. + // This was done to be compatible with third-party GeoJSON serializers. There are some + // GeoJSON serializer packages in the broader community that either don't follow this + // part of the spec, or interpret optional as being equal to nullable. + // Note: The Azure.Core serializer follows the spec and never writes "bbox": null + if (bboxElement.ValueKind == JsonValueKind.Null) + { + return null; + } + var arrayLength = bboxElement.GetArrayLength(); switch (arrayLength) @@ -458,4 +473,4 @@ private static JsonElement GetRequiredProperty(JsonElement element, string name) return property; } } -} \ No newline at end of file +} diff --git a/sdk/core/Azure.Core/tests/GeoJsonSerializationTests.cs b/sdk/core/Azure.Core/tests/GeoJsonSerializationTests.cs index 3e39c0658c016..6c1713029516f 100644 --- a/sdk/core/Azure.Core/tests/GeoJsonSerializationTests.cs +++ b/sdk/core/Azure.Core/tests/GeoJsonSerializationTests.cs @@ -21,7 +21,7 @@ public GeoJsonSerializationTests(int points) } [Test] - public void CanRoundripPoint() + public void CanRoundTripPoint() { var input = $"{{ \"type\": \"Point\", \"coordinates\": [{PS(0)}] }}"; @@ -30,7 +30,17 @@ public void CanRoundripPoint() } [Test] - public void CanRoundripBBox() + public void CanRoundTripNullBBox() + { + // cspell:ignore bbox + var input = $"{{ \"type\": \"Point\", \"coordinates\": [{PS(0)}], \"bbox\": null }}"; + + var point = AssertRoundtrip(input); + Assert.AreEqual(P(0), point.Coordinates); + } + + [Test] + public void CanRoundTripBBox() { // cspell:ignore bbox var input = $"{{ \"type\": \"Point\", \"coordinates\": [{PS(0)}], \"bbox\": [ {PS(1)}, {PS(2)} ] }}"; @@ -67,7 +77,7 @@ public void CanRoundripBBox() } [Test] - public void CanRoundripAdditionalProperties() + public void CanRoundTripAdditionalProperties() { var input = $"{{ \"type\": \"Point\", \"coordinates\": [{PS(0)}]," + $" \"additionalNumber\": 1," + @@ -101,7 +111,7 @@ public void CanRoundripAdditionalProperties() } [Test] - public void CanRoundripPolygon() + public void CanRoundTripPolygon() { var input = $" {{ \"type\": \"Polygon\", \"coordinates\": [ [ [{PS(0)}], [{PS(1)}], [{PS(2)}], [{PS(3)}], [{PS(4)}], [{PS(0)}] ] ] }}"; @@ -120,7 +130,7 @@ public void CanRoundripPolygon() } [Test] - public void CanRoundripPolygonHoles() + public void CanRoundTripPolygonHoles() { var input = $"{{ \"type\": \"Polygon\", \"coordinates\": [" + $" [ [{PS(0)}], [{PS(1)}], [{PS(2)}], [{PS(3)}], [{PS(4)}], [{PS(0)}] ]," + @@ -152,7 +162,7 @@ public void CanRoundripPolygonHoles() } [Test] - public void CanRoundripMultiPoint() + public void CanRoundTripMultiPoint() { var input = $"{{ \"type\": \"MultiPoint\", \"coordinates\": [ [{PS(0)}], [{PS(1)}] ] }}"; @@ -164,7 +174,7 @@ public void CanRoundripMultiPoint() } [Test] - public void CanRoundripMultiLineString() + public void CanRoundTripMultiLineString() { var input = $"{{ \"type\": \"MultiLineString\", \"coordinates\": [ [ [{PS(0)}], [{PS(1)}] ], [ [{PS(2)}], [{PS(3)}] ] ] }}"; @@ -185,7 +195,7 @@ public void CanRoundripMultiLineString() } [Test] - public void CanRoundripMultiPolygon() + public void CanRoundTripMultiPolygon() { var input = $" {{ \"type\": \"MultiPolygon\", \"coordinates\": [" + $" [ [ [{PS(0)}], [{PS(1)}], [{PS(2)}], [{PS(3)}], [{PS(4)}], [{PS(0)}] ] ]," + @@ -235,7 +245,7 @@ public void CanRoundripMultiPolygon() } [Test] - public void CanRoundripGeometryCollection() + public void CanRoundTripGeometryCollection() { var input = $"{{ \"type\": \"GeometryCollection\", \"geometries\": [{{ \"type\": \"Point\", \"coordinates\": [{PS(0)}] }}, {{ \"type\": \"LineString\", \"coordinates\": [ [{PS(1)}], [{PS(2)}] ] }}] }}"; @@ -295,4 +305,4 @@ private T AssertRoundtrip(string json) where T: GeoObject return geometry4; } } -} \ No newline at end of file +} From d170d1b72449dd50f37f9ccabb15b0f98312bc93 Mon Sep 17 00:00:00 2001 From: Wes Haggard Date: Tue, 9 Jul 2024 09:52:58 -0700 Subject: [PATCH 040/144] Increment Microsoft.Azure.Functions.Worker.Extensions.WebPubSub version (#44880) Also update version increment script to error on missing version property. --- doc/dev/Versioning.md | 4 ++-- eng/scripts/Update-PkgVersion.ps1 | 5 +++++ .../CHANGELOG.md | 12 +++++++++++- ...zure.Functions.Worker.Extensions.WebPubSub.csproj | 7 ++++--- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/doc/dev/Versioning.md b/doc/dev/Versioning.md index b5d2f3c8a64d7..3e662f869ee2c 100644 --- a/doc/dev/Versioning.md +++ b/doc/dev/Versioning.md @@ -45,8 +45,8 @@ They will use the following format which is also used by the .NET team: ``` FILEMAJOR.FILEMINOR.FILEPATCH.FILEREVISION ``` -- `FILEMAJOR`: Specified in the first part of `VersionPrefix` property. -- `FILEMINOR`: Set to `MINOR * 100 + PATCH / 100`, where `MINOR` and `PATCH` are the 2nd and 3rd parts of `VersionPrefix` property. +- `FILEMAJOR`: Specified in the first part of `Version` property. +- `FILEMINOR`: Set to `MINOR * 100 + PATCH / 100`, where `MINOR` and `PATCH` are the 2nd and 3rd parts of `Version` property. - `FILEPATCH`: Set to `(PATCH % 100) * 100 + yy`. - `FILEREVISION`: Set to `(50 * mm + dd) * 100 + r`. This algorithm makes it easy to parse the month and date from `FILEREVISION` while staying in the range of a short which is what a version element uses. diff --git a/eng/scripts/Update-PkgVersion.ps1 b/eng/scripts/Update-PkgVersion.ps1 index d39c726d5455e..ac429a153eed2 100644 --- a/eng/scripts/Update-PkgVersion.ps1 +++ b/eng/scripts/Update-PkgVersion.ps1 @@ -53,6 +53,11 @@ $csproj.Load($csprojPath) $propertyGroup = ($csproj | Select-Xml "Project/PropertyGroup/Version").Node.ParentNode $packageVersion = $propertyGroup.Version +if (!$packageVersion) { + Write-Error "Could not find the element in your project $csprojPath, be sure it has a Version property and not a VersionPrefix property." + exit 1 +} + $packageSemVer = [AzureEngSemanticVersion]::new($packageVersion) $packageOldSemVer = [AzureEngSemanticVersion]::new($packageVersion) Write-Host "Current Version: ${PackageVersion}" diff --git a/sdk/webpubsub/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub/CHANGELOG.md b/sdk/webpubsub/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub/CHANGELOG.md index 2601f9cf026bd..d2a089fca0e8e 100644 --- a/sdk/webpubsub/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub/CHANGELOG.md +++ b/sdk/webpubsub/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.8.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.7.0 (2024-07-01) ### Features Added @@ -13,4 +23,4 @@ ## 1.5.0-beta.1 (2023-04-27) ### Features Added -- Initial beta release \ No newline at end of file +- Initial beta release diff --git a/sdk/webpubsub/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub/src/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub.csproj b/sdk/webpubsub/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub/src/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub.csproj index bf300fb0bde1b..8fc21493d5628 100644 --- a/sdk/webpubsub/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub/src/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub.csproj +++ b/sdk/webpubsub/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub/src/Microsoft.Azure.Functions.Worker.Extensions.WebPubSub.csproj @@ -1,12 +1,13 @@ - + Microsoft.Azure.Functions.Worker.Extensions.WebPubSub Azure, WebPubSub Azure Web PubSub Service extensions for .NET isolated functions $(RequiredTargetFrameworks) annotations - - 1.7.0 + 1.8.0-beta.1 + + 1.7.0 $(NoWarn);CA2227 true From 97050dc0f16ee1b156784667bf968a06608fb816 Mon Sep 17 00:00:00 2001 From: Patrick Hallisey Date: Tue, 9 Jul 2024 16:06:22 -0700 Subject: [PATCH 041/144] Use eng/common template for create-tags-and-git-release (#44921) * Use eng/common template for create-tags-and-git-release --- eng/pipelines/templates/jobs/mgmt-release.yml | 20 +++++-------------- .../stages/archetype-net-release.yml | 1 - 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/eng/pipelines/templates/jobs/mgmt-release.yml b/eng/pipelines/templates/jobs/mgmt-release.yml index 180d914069fb7..6fa22b788584d 100644 --- a/eng/pipelines/templates/jobs/mgmt-release.yml +++ b/eng/pipelines/templates/jobs/mgmt-release.yml @@ -39,21 +39,11 @@ jobs: - ${{ if and(eq(parameters.ShouldPublishToNuget, 'true'), eq(variables['Build.Repository.Name'], 'Azure/azure-sdk-for-net')) }}: - - task: Powershell@2 - displayName: 'Verify Package Tags and Create Git Releases' - inputs: - filePath: ${{ parameters.BuildToolsPath }}/scripts/create-tags-and-git-release.ps1 - arguments: > - -artifactLocation '$(PIPELINE.WORKSPACE)/packages' - -workingDirectory $(System.DefaultWorkingDirectory) - -packageRepository 'Nuget' - -releaseSha '$(Build.SourceVersion)' - -repoOwner 'Azure' - -repoName 'azure-sdk-for-net' - pwsh: true - env: - GH_TOKEN: $(azuresdk-github-pat) - condition: and(succeeded(), ne(variables['SkipCreateTagAndGitRelease'], 'true')) + - template: /eng/common/pipelines/templates/steps/create-tags-and-git-release.yml + parameters: + ArtifactLocation: '$(PIPELINE.WORKSPACE)/packages' + PackageRepository: Nuget + ReleaseSha: $(Build.SourceVersion) - template: pipelines/steps/publish-symbols.yml@azure-sdk-build-tools displayName: 'Upload Symbols' diff --git a/eng/pipelines/templates/stages/archetype-net-release.yml b/eng/pipelines/templates/stages/archetype-net-release.yml index 7be7e0de1634c..4465fb157c0ef 100644 --- a/eng/pipelines/templates/stages/archetype-net-release.yml +++ b/eng/pipelines/templates/stages/archetype-net-release.yml @@ -105,7 +105,6 @@ stages: ArtifactLocation: $(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed/${{artifact.name}} PackageRepository: Nuget ReleaseSha: $(Build.SourceVersion) - RepoId: Azure/azure-sdk-for-net - ${{if ne(artifact.skipPublishPackage, 'true')}}: - deployment: PublishPackage From b6161ec1a18dd49a4c6c4b0d5c7fbe02c96cbb57 Mon Sep 17 00:00:00 2001 From: GuptaVertika <149072034+GuptaVertika@users.noreply.github.com> Date: Wed, 10 Jul 2024 14:37:08 +0530 Subject: [PATCH 042/144] Package-2024-01-01 (#44868) * Package-2024-01-01 * script ran * workaround of breaking changes - fix breaking change in GetExpressRouteCrossConnections - fix breaking change in InboundSecurityRule - add backward compatibility of `FirewallPacketCaptureContent` - update api interface * fix change log version check error * fix release date * remove [Obsolete] and fix extension implementation error --------- Co-authored-by: Mingzhe Huang (from Dev Box) --- .../CHANGELOG.md | 9 +- ....ResourceManager.Network.netstandard2.0.cs | 140 ++++- .../Sample_AdminRuleGroupCollection.cs | 10 +- .../Samples/Sample_AdminRuleGroupResource.cs | 6 +- .../Sample_ApplicationGatewayCollection.cs | 10 +- ...ewayPrivateEndpointConnectionCollection.cs | 10 +- ...atewayPrivateEndpointConnectionResource.cs | 6 +- .../Sample_ApplicationGatewayResource.cs | 32 +- ...tionGatewayWafDynamicManifestCollection.cs | 8 +- ...cationGatewayWafDynamicManifestResource.cs | 2 +- ...mple_ApplicationSecurityGroupCollection.cs | 10 +- ...Sample_ApplicationSecurityGroupResource.cs | 8 +- .../Samples/Sample_AzureFirewallCollection.cs | 44 +- .../Samples/Sample_AzureFirewallResource.cs | 22 +- .../Sample_AzureWebCategoryCollection.cs | 8 +- .../Sample_AzureWebCategoryResource.cs | 2 +- .../Sample_BackendAddressPoolCollection.cs | 18 +- .../Sample_BackendAddressPoolResource.cs | 10 +- .../Samples/Sample_BaseAdminRuleCollection.cs | 18 +- .../Samples/Sample_BaseAdminRuleResource.cs | 10 +- .../Samples/Sample_BastionHostCollection.cs | 26 +- .../Samples/Sample_BastionHostResource.cs | 16 +- .../Samples/Sample_BgpConnectionCollection.cs | 10 +- .../Samples/Sample_BgpConnectionResource.cs | 10 +- .../Sample_CloudServiceSwapCollection.cs | 10 +- .../Sample_CloudServiceSwapResource.cs | 4 +- .../Sample_ConnectionMonitorCollection.cs | 14 +- .../Sample_ConnectionMonitorResource.cs | 12 +- ...ple_ConnectivityConfigurationCollection.cs | 10 +- ...ample_ConnectivityConfigurationResource.cs | 6 +- .../Sample_CustomIPPrefixCollection.cs | 10 +- .../Samples/Sample_CustomIPPrefixResource.cs | 8 +- .../Sample_DdosCustomPolicyCollection.cs | 8 +- .../Sample_DdosCustomPolicyResource.cs | 6 +- .../Sample_DdosProtectionPlanCollection.cs | 10 +- .../Sample_DdosProtectionPlanResource.cs | 8 +- .../Sample_DefaultSecurityRuleCollection.cs | 8 +- .../Sample_DefaultSecurityRuleResource.cs | 2 +- .../Sample_DscpConfigurationCollection.cs | 10 +- .../Sample_DscpConfigurationResource.cs | 8 +- ...ressRouteCircuitAuthorizationCollection.cs | 10 +- ...xpressRouteCircuitAuthorizationResource.cs | 6 +- .../Sample_ExpressRouteCircuitCollection.cs | 12 +- ...ExpressRouteCircuitConnectionCollection.cs | 10 +- ...e_ExpressRouteCircuitConnectionResource.cs | 6 +- ...le_ExpressRouteCircuitPeeringCollection.cs | 10 +- ...mple_ExpressRouteCircuitPeeringResource.cs | 14 +- .../Sample_ExpressRouteCircuitResource.cs | 10 +- ...Sample_ExpressRouteConnectionCollection.cs | 10 +- .../Sample_ExpressRouteConnectionResource.cs | 6 +- ...e_ExpressRouteCrossConnectionCollection.cs | 10 +- ...ssRouteCrossConnectionPeeringCollection.cs | 10 +- ...ressRouteCrossConnectionPeeringResource.cs | 12 +- ...ple_ExpressRouteCrossConnectionResource.cs | 6 +- .../Sample_ExpressRouteGatewayCollection.cs | 10 +- .../Sample_ExpressRouteGatewayResource.cs | 8 +- .../Sample_ExpressRouteLinkCollection.cs | 8 +- .../Sample_ExpressRouteLinkResource.cs | 2 +- ...ExpressRoutePortAuthorizationCollection.cs | 10 +- ...e_ExpressRoutePortAuthorizationResource.cs | 6 +- .../Sample_ExpressRoutePortCollection.cs | 12 +- .../Sample_ExpressRoutePortResource.cs | 10 +- ...ple_ExpressRoutePortsLocationCollection.cs | 8 +- ...ample_ExpressRoutePortsLocationResource.cs | 2 +- ...mple_ExpressRouteProviderPortCollection.cs | 8 +- ...Sample_ExpressRouteProviderPortResource.cs | 4 +- .../Sample_FirewallPolicyCollection.cs | 10 +- .../Sample_FirewallPolicyDraftResource.cs | 6 +- .../Samples/Sample_FirewallPolicyResource.cs | 14 +- ...wallPolicyRuleCollectionGroupCollection.cs | 40 +- ...lPolicyRuleCollectionGroupDraftResource.cs | 6 +- ...rewallPolicyRuleCollectionGroupResource.cs | 20 +- .../Samples/Sample_FlowLogCollection.cs | 18 +- .../Samples/Sample_FlowLogResource.cs | 6 +- ...ample_FrontendIPConfigurationCollection.cs | 8 +- .../Sample_FrontendIPConfigurationResource.cs | 2 +- .../Sample_HubIPConfigurationCollection.cs | 10 +- .../Sample_HubIPConfigurationResource.cs | 6 +- .../Samples/Sample_HubRouteTableCollection.cs | 10 +- .../Samples/Sample_HubRouteTableResource.cs | 6 +- ...e_HubVirtualNetworkConnectionCollection.cs | 10 +- ...ple_HubVirtualNetworkConnectionResource.cs | 6 +- .../Samples/Sample_IPAllocationCollection.cs | 10 +- .../Samples/Sample_IPAllocationResource.cs | 8 +- .../Samples/Sample_IPGroupCollection.cs | 10 +- .../Samples/Sample_IPGroupResource.cs | 8 +- .../Sample_InboundNatRuleCollection.cs | 10 +- .../Samples/Sample_InboundNatRuleResource.cs | 6 +- .../Sample_InboundSecurityRuleCollection.cs | 185 +++++++ .../Sample_InboundSecurityRuleResource.cs | 105 ++++ .../Samples/Sample_LoadBalancerCollection.cs | 34 +- .../Samples/Sample_LoadBalancerResource.cs | 18 +- .../Sample_LoadBalancingRuleCollection.cs | 8 +- .../Sample_LoadBalancingRuleResource.cs | 2 +- .../Sample_LocalNetworkGatewayCollection.cs | 10 +- .../Sample_LocalNetworkGatewayResource.cs | 6 +- ...GroupNetworkManagerConnectionCollection.cs | 10 +- ...ntGroupNetworkManagerConnectionResource.cs | 6 +- .../Samples/Sample_NatGatewayCollection.cs | 10 +- .../Samples/Sample_NatGatewayResource.cs | 8 +- .../Samples/Sample_NetworkGroupCollection.cs | 10 +- .../Samples/Sample_NetworkGroupResource.cs | 6 +- ...mple_NetworkGroupStaticMemberCollection.cs | 10 +- ...Sample_NetworkGroupStaticMemberResource.cs | 6 +- .../Sample_NetworkInterfaceCollection.cs | 12 +- ...tworkInterfaceIPConfigurationCollection.cs | 8 +- ...NetworkInterfaceIPConfigurationResource.cs | 2 +- .../Sample_NetworkInterfaceResource.cs | 14 +- ...workInterfaceTapConfigurationCollection.cs | 10 +- ...etworkInterfaceTapConfigurationResource.cs | 6 +- .../Sample_NetworkManagerCollection.cs | 10 +- .../Samples/Sample_NetworkManagerResource.cs | 16 +- ...workPrivateEndpointConnectionCollection.cs | 10 +- ...etworkPrivateEndpointConnectionResource.cs | 6 +- .../Sample_NetworkProfileCollection.cs | 16 +- .../Samples/Sample_NetworkProfileResource.cs | 10 +- .../Sample_NetworkSecurityGroupCollection.cs | 12 +- .../Sample_NetworkSecurityGroupResource.cs | 8 +- ...ample_NetworkVirtualApplianceCollection.cs | 12 +- ...orkVirtualApplianceConnectionCollection.cs | 10 +- ...tworkVirtualApplianceConnectionResource.cs | 6 +- .../Sample_NetworkVirtualApplianceResource.cs | 73 +-- ...le_NetworkVirtualApplianceSkuCollection.cs | 8 +- ...mple_NetworkVirtualApplianceSkuResource.cs | 2 +- .../Sample_NetworkWatcherCollection.cs | 10 +- .../Samples/Sample_NetworkWatcherResource.cs | 44 +- .../Samples/Sample_OutboundRuleCollection.cs | 8 +- .../Samples/Sample_OutboundRuleResource.cs | 2 +- .../Samples/Sample_P2SVpnGatewayCollection.cs | 10 +- .../Samples/Sample_P2SVpnGatewayResource.cs | 18 +- .../Samples/Sample_PacketCaptureCollection.cs | 10 +- .../Samples/Sample_PacketCaptureResource.cs | 10 +- ...ExpressRouteCircuitConnectionCollection.cs | 8 +- ...erExpressRouteCircuitConnectionResource.cs | 2 +- ...olicySignaturesOverridesForIdpsResource.cs | 6 +- .../Sample_PrivateDnsZoneGroupCollection.cs | 10 +- .../Sample_PrivateDnsZoneGroupResource.cs | 6 +- .../Sample_PrivateEndpointCollection.cs | 26 +- .../Samples/Sample_PrivateEndpointResource.cs | 16 +- .../Sample_PrivateLinkServiceCollection.cs | 10 +- .../Sample_PrivateLinkServiceResource.cs | 8 +- .../Samples/Sample_ProbeCollection.cs | 8 +- .../Generated/Samples/Sample_ProbeResource.cs | 2 +- .../Sample_PublicIPAddressCollection.cs | 16 +- .../Samples/Sample_PublicIPAddressResource.cs | 10 +- .../Sample_PublicIPPrefixCollection.cs | 12 +- .../Samples/Sample_PublicIPPrefixResource.cs | 8 +- .../Sample_ResourceGroupResourceExtensions.cs | 10 +- .../Samples/Sample_RouteCollection.cs | 10 +- .../Samples/Sample_RouteFilterCollection.cs | 10 +- .../Samples/Sample_RouteFilterResource.cs | 8 +- .../Sample_RouteFilterRuleCollection.cs | 10 +- .../Samples/Sample_RouteFilterRuleResource.cs | 6 +- .../Samples/Sample_RouteMapCollection.cs | 10 +- .../Samples/Sample_RouteMapResource.cs | 6 +- .../Generated/Samples/Sample_RouteResource.cs | 6 +- .../Samples/Sample_RouteTableCollection.cs | 12 +- .../Samples/Sample_RouteTableResource.cs | 8 +- .../Samples/Sample_RoutingIntentCollection.cs | 10 +- .../Samples/Sample_RoutingIntentResource.cs | 6 +- .../Sample_ScopeConnectionCollection.cs | 10 +- .../Samples/Sample_ScopeConnectionResource.cs | 6 +- ...le_SecurityAdminConfigurationCollection.cs | 10 +- ...mple_SecurityAdminConfigurationResource.cs | 6 +- ...ample_SecurityPartnerProviderCollection.cs | 10 +- .../Sample_SecurityPartnerProviderResource.cs | 8 +- .../Samples/Sample_SecurityRuleCollection.cs | 10 +- .../Samples/Sample_SecurityRuleResource.cs | 6 +- .../Sample_ServiceEndpointPolicyCollection.cs | 12 +- ...rviceEndpointPolicyDefinitionCollection.cs | 10 +- ...ServiceEndpointPolicyDefinitionResource.cs | 6 +- .../Sample_ServiceEndpointPolicyResource.cs | 8 +- .../Samples/Sample_SubnetCollection.cs | 76 ++- .../Samples/Sample_SubnetResource.cs | 69 ++- ...ptionNetworkManagerConnectionCollection.cs | 10 +- ...riptionNetworkManagerConnectionResource.cs | 6 +- .../Sample_SubscriptionResourceExtensions.cs | 30 +- .../Sample_VirtualApplianceSiteCollection.cs | 10 +- .../Sample_VirtualApplianceSiteResource.cs | 6 +- .../Samples/Sample_VirtualHubCollection.cs | 10 +- .../Samples/Sample_VirtualHubResource.cs | 18 +- ...Sample_VirtualHubRouteTableV2Collection.cs | 10 +- .../Sample_VirtualHubRouteTableV2Resource.cs | 6 +- .../Sample_VirtualNetworkCollection.cs | 36 +- .../Sample_VirtualNetworkGatewayCollection.cs | 18 +- ...rtualNetworkGatewayConnectionCollection.cs | 10 +- ...VirtualNetworkGatewayConnectionResource.cs | 24 +- ..._VirtualNetworkGatewayNatRuleCollection.cs | 10 +- ...le_VirtualNetworkGatewayNatRuleResource.cs | 6 +- .../Sample_VirtualNetworkGatewayResource.cs | 42 +- .../Sample_VirtualNetworkPeeringCollection.cs | 442 ++++++++++++++- .../Sample_VirtualNetworkPeeringResource.cs | 266 ++++++++- .../Samples/Sample_VirtualNetworkResource.cs | 20 +- .../Sample_VirtualNetworkTapCollection.cs | 10 +- .../Sample_VirtualNetworkTapResource.cs | 8 +- .../Samples/Sample_VirtualRouterCollection.cs | 10 +- .../Sample_VirtualRouterPeeringCollection.cs | 10 +- .../Sample_VirtualRouterPeeringResource.cs | 6 +- .../Samples/Sample_VirtualRouterResource.cs | 8 +- .../Samples/Sample_VirtualWanCollection.cs | 10 +- .../Samples/Sample_VirtualWanResource.cs | 16 +- .../Samples/Sample_VpnConnectionCollection.cs | 10 +- .../Samples/Sample_VpnConnectionResource.cs | 12 +- .../Samples/Sample_VpnGatewayCollection.cs | 10 +- .../Sample_VpnGatewayNatRuleCollection.cs | 10 +- .../Sample_VpnGatewayNatRuleResource.cs | 6 +- .../Samples/Sample_VpnGatewayResource.cs | 16 +- ...Sample_VpnServerConfigurationCollection.cs | 10 +- ...erverConfigurationPolicyGroupCollection.cs | 10 +- ...nServerConfigurationPolicyGroupResource.cs | 6 +- .../Sample_VpnServerConfigurationResource.cs | 8 +- .../Samples/Sample_VpnSiteCollection.cs | 10 +- .../Samples/Sample_VpnSiteLinkCollection.cs | 8 +- .../Sample_VpnSiteLinkConnectionCollection.cs | 8 +- .../Sample_VpnSiteLinkConnectionResource.cs | 6 +- .../Samples/Sample_VpnSiteLinkResource.cs | 2 +- .../Samples/Sample_VpnSiteResource.cs | 8 +- ..._WebApplicationFirewallPolicyCollection.cs | 10 +- ...le_WebApplicationFirewallPolicyResource.cs | 8 +- .../src/Azure.ResourceManager.Network.csproj | 2 +- .../Customization/ArmNetworkModelFactory.cs | 39 ++ .../Customization/AzureFirewallResource.cs | 78 +++ .../MockableNetworkSubscriptionResource.cs | 68 +++ .../Extensions/NetworkExtensions.cs | 75 +++ .../Models/FirewallPacketCaptureContent.cs | 17 +- ...ewallPacketCaptureContent.serialization.cs | 74 +++ .../Models/InboundSecurityRule.cs | 9 +- .../InboundSecurityRule.serialization.cs} | 2 - .../NetworkVirtualApplianceResource.cs | 195 +++++++ .../src/Generated/AdminRuleGroupCollection.cs | 20 +- .../src/Generated/AdminRuleGroupResource.cs | 16 +- .../Generated/ApplicationGatewayCollection.cs | 20 +- ...ewayPrivateEndpointConnectionCollection.cs | 20 +- ...atewayPrivateEndpointConnectionResource.cs | 12 +- .../Generated/ApplicationGatewayResource.cs | 48 +- ...tionGatewayWafDynamicManifestCollection.cs | 16 +- ...cationGatewayWafDynamicManifestResource.cs | 4 +- .../ApplicationSecurityGroupCollection.cs | 20 +- .../ApplicationSecurityGroupResource.cs | 24 +- .../src/Generated/ArmNetworkModelFactory.cs | 185 ++++++- .../src/Generated/AzureFirewallCollection.cs | 20 +- .../src/Generated/AzureFirewallResource.cs | 36 +- .../Generated/AzureWebCategoryCollection.cs | 16 +- .../src/Generated/AzureWebCategoryResource.cs | 4 +- .../Generated/BackendAddressPoolCollection.cs | 20 +- .../Generated/BackendAddressPoolResource.cs | 16 +- .../src/Generated/BaseAdminRuleCollection.cs | 20 +- .../src/Generated/BaseAdminRuleResource.cs | 12 +- .../src/Generated/BastionHostCollection.cs | 20 +- .../BastionHostData.Serialization.cs | 18 +- .../src/Generated/BastionHostData.cs | 8 +- .../src/Generated/BastionHostResource.cs | 28 +- .../src/Generated/BgpConnectionCollection.cs | 20 +- .../src/Generated/BgpConnectionResource.cs | 20 +- .../Generated/CloudServiceSwapCollection.cs | 20 +- .../src/Generated/CloudServiceSwapResource.cs | 8 +- .../Generated/ConnectionMonitorCollection.cs | 20 +- .../Generated/ConnectionMonitorResource.cs | 36 +- .../ConnectivityConfigurationCollection.cs | 20 +- .../ConnectivityConfigurationResource.cs | 12 +- .../src/Generated/CustomIPPrefixCollection.cs | 20 +- .../src/Generated/CustomIPPrefixResource.cs | 24 +- .../Generated/DdosCustomPolicyCollection.cs | 16 +- .../src/Generated/DdosCustomPolicyResource.cs | 24 +- .../Generated/DdosProtectionPlanCollection.cs | 20 +- .../Generated/DdosProtectionPlanResource.cs | 24 +- .../DefaultSecurityRuleCollection.cs | 16 +- .../Generated/DefaultSecurityRuleResource.cs | 4 +- .../Generated/DscpConfigurationCollection.cs | 20 +- .../Generated/DscpConfigurationResource.cs | 24 +- ...ressRouteCircuitAuthorizationCollection.cs | 20 +- ...eCircuitAuthorizationData.Serialization.cs | 16 + .../ExpressRouteCircuitAuthorizationData.cs | 6 +- ...xpressRouteCircuitAuthorizationResource.cs | 12 +- .../ExpressRouteCircuitCollection.cs | 20 +- ...ExpressRouteCircuitConnectionCollection.cs | 20 +- .../ExpressRouteCircuitConnectionResource.cs | 12 +- .../ExpressRouteCircuitPeeringCollection.cs | 20 +- .../ExpressRouteCircuitPeeringResource.cs | 36 +- .../Generated/ExpressRouteCircuitResource.cs | 36 +- .../ExpressRouteConnectionCollection.cs | 20 +- .../ExpressRouteConnectionResource.cs | 12 +- .../ExpressRouteCrossConnectionCollection.cs | 20 +- ...ssRouteCrossConnectionPeeringCollection.cs | 20 +- ...ressRouteCrossConnectionPeeringResource.cs | 24 +- .../ExpressRouteCrossConnectionResource.cs | 24 +- .../ExpressRouteGatewayCollection.cs | 20 +- .../Generated/ExpressRouteGatewayResource.cs | 28 +- .../Generated/ExpressRouteLinkCollection.cs | 16 +- .../src/Generated/ExpressRouteLinkResource.cs | 4 +- ...ExpressRoutePortAuthorizationCollection.cs | 20 +- .../ExpressRoutePortAuthorizationResource.cs | 12 +- .../Generated/ExpressRoutePortCollection.cs | 20 +- .../src/Generated/ExpressRoutePortResource.cs | 36 +- .../ExpressRoutePortsLocationCollection.cs | 16 +- .../ExpressRoutePortsLocationResource.cs | 4 +- .../ExpressRouteProviderPortCollection.cs | 16 +- .../ExpressRouteProviderPortResource.cs | 4 +- .../Extensions/MockableNetworkArmClient.cs | 12 + .../MockableNetworkManagementGroupResource.cs | 4 +- .../MockableNetworkResourceGroupResource.cs | 200 +++---- .../MockableNetworkSubscriptionResource.cs | 282 +++++----- .../Generated/Extensions/NetworkExtensions.cs | 505 +++++++++--------- .../src/Generated/FirewallPolicyCollection.cs | 20 +- .../Generated/FirewallPolicyDraftResource.cs | 24 +- .../src/Generated/FirewallPolicyResource.cs | 40 +- ...wallPolicyRuleCollectionGroupCollection.cs | 20 +- ...lPolicyRuleCollectionGroupDraftResource.cs | 12 +- ...rewallPolicyRuleCollectionGroupResource.cs | 12 +- .../src/Generated/FlowLogCollection.cs | 20 +- .../Generated/FlowLogData.Serialization.cs | 17 + .../src/Generated/FlowLogData.cs | 7 +- .../src/Generated/FlowLogResource.cs | 24 +- .../FrontendIPConfigurationCollection.cs | 16 +- .../FrontendIPConfigurationResource.cs | 4 +- .../Generated/HubIPConfigurationCollection.cs | 20 +- .../Generated/HubIPConfigurationResource.cs | 12 +- .../src/Generated/HubRouteTableCollection.cs | 20 +- .../src/Generated/HubRouteTableResource.cs | 12 +- .../HubVirtualNetworkConnectionCollection.cs | 20 +- .../HubVirtualNetworkConnectionResource.cs | 12 +- .../src/Generated/IPAllocationCollection.cs | 20 +- .../src/Generated/IPAllocationResource.cs | 24 +- .../src/Generated/IPGroupCollection.cs | 20 +- .../src/Generated/IPGroupResource.cs | 24 +- .../src/Generated/InboundNatRuleCollection.cs | 20 +- .../src/Generated/InboundNatRuleResource.cs | 12 +- .../InboundSecurityRuleCollection.cs | 415 ++++++++++++++ .../InboundSecurityRuleData.Serialization.cs | 246 +++++++++ .../src/Generated/InboundSecurityRuleData.cs | 53 ++ ...boundSecurityRuleResource.Serialization.cs | 26 + .../Generated/InboundSecurityRuleResource.cs | 263 +++++++++ .../src/Generated/LoadBalancerCollection.cs | 20 +- .../src/Generated/LoadBalancerResource.cs | 56 +- .../Generated/LoadBalancingRuleCollection.cs | 16 +- .../Generated/LoadBalancingRuleResource.cs | 4 +- .../LocalNetworkGatewayCollection.cs | 20 +- .../Generated/LocalNetworkGatewayResource.cs | 24 +- .../InboundSecurityRuleOperationSource.cs | 20 +- ...tualApplianceInstanceIdsOperationSource.cs | 30 ++ ...GroupNetworkManagerConnectionCollection.cs | 20 +- ...ntGroupNetworkManagerConnectionResource.cs | 12 +- .../Generated/Models/BastionHostSkuName.cs | 5 +- ...ewallPacketCaptureContent.Serialization.cs | 271 ---------- ...cketCaptureRequestContent.Serialization.cs | 240 +++++++++ .../FirewallPacketCaptureRequestContent.cs | 91 ++++ .../FlowLogInformation.Serialization.cs | 17 + .../Generated/Models/FlowLogInformation.cs | 7 +- .../src/Generated/Models/NetworkSku.cs | 4 +- .../Models/ProbeNoHealthyBackendsBehavior.cs | 51 ++ ...ServiceEndpointProperties.Serialization.cs | 18 +- .../Models/ServiceEndpointProperties.cs | 19 +- .../src/Generated/NatGatewayCollection.cs | 20 +- .../src/Generated/NatGatewayResource.cs | 24 +- .../src/Generated/NetworkGroupCollection.cs | 20 +- .../src/Generated/NetworkGroupResource.cs | 16 +- .../NetworkGroupStaticMemberCollection.cs | 20 +- .../NetworkGroupStaticMemberResource.cs | 12 +- .../Generated/NetworkInterfaceCollection.cs | 20 +- ...tworkInterfaceIPConfigurationCollection.cs | 16 +- ...NetworkInterfaceIPConfigurationResource.cs | 4 +- .../src/Generated/NetworkInterfaceResource.cs | 44 +- ...workInterfaceTapConfigurationCollection.cs | 20 +- ...etworkInterfaceTapConfigurationResource.cs | 12 +- .../src/Generated/NetworkManagerCollection.cs | 20 +- .../src/Generated/NetworkManagerResource.cs | 56 +- ...workPrivateEndpointConnectionCollection.cs | 20 +- ...etworkPrivateEndpointConnectionResource.cs | 12 +- .../src/Generated/NetworkProfileCollection.cs | 20 +- .../src/Generated/NetworkProfileResource.cs | 24 +- .../NetworkSecurityGroupCollection.cs | 20 +- .../Generated/NetworkSecurityGroupResource.cs | 32 +- .../NetworkVirtualApplianceCollection.cs | 20 +- ...orkVirtualApplianceConnectionCollection.cs | 20 +- ...tworkVirtualApplianceConnectionResource.cs | 12 +- .../NetworkVirtualApplianceResource.cs | 209 ++++---- .../NetworkVirtualApplianceSkuCollection.cs | 16 +- .../NetworkVirtualApplianceSkuResource.cs | 4 +- .../src/Generated/NetworkWatcherCollection.cs | 20 +- .../src/Generated/NetworkWatcherResource.cs | 84 +-- .../src/Generated/OutboundRuleCollection.cs | 16 +- .../src/Generated/OutboundRuleResource.cs | 4 +- .../src/Generated/P2SVpnGatewayCollection.cs | 20 +- .../src/Generated/P2SVpnGatewayResource.cs | 44 +- .../src/Generated/PacketCaptureCollection.cs | 20 +- .../src/Generated/PacketCaptureResource.cs | 20 +- ...ExpressRouteCircuitConnectionCollection.cs | 16 +- ...erExpressRouteCircuitConnectionResource.cs | 4 +- ...olicySignaturesOverridesForIdpsResource.cs | 12 +- .../PrivateDnsZoneGroupCollection.cs | 20 +- .../Generated/PrivateDnsZoneGroupResource.cs | 12 +- .../Generated/PrivateEndpointCollection.cs | 20 +- .../src/Generated/PrivateEndpointResource.cs | 28 +- .../Generated/PrivateLinkServiceCollection.cs | 20 +- .../Generated/PrivateLinkServiceResource.cs | 28 +- .../src/Generated/ProbeCollection.cs | 16 +- .../src/Generated/ProbeData.Serialization.cs | 16 + .../src/Generated/ProbeData.cs | 6 +- .../src/Generated/ProbeResource.cs | 4 +- .../Generated/PublicIPAddressCollection.cs | 20 +- .../src/Generated/PublicIPAddressResource.cs | 28 +- .../src/Generated/PublicIPPrefixCollection.cs | 20 +- .../src/Generated/PublicIPPrefixResource.cs | 24 +- .../AdminRuleCollectionsRestOperations.cs | 2 +- .../AdminRulesRestOperations.cs | 2 +- ...rivateEndpointConnectionsRestOperations.cs | 2 +- ...tewayPrivateLinkResourcesRestOperations.cs | 2 +- ...afDynamicManifestsDefaultRestOperations.cs | 2 +- ...atewayWafDynamicManifestsRestOperations.cs | 2 +- .../ApplicationGatewaysRestOperations.cs | 2 +- ...ApplicationSecurityGroupsRestOperations.cs | 2 +- .../AvailableDelegationsRestOperations.cs | 2 +- ...AvailableEndpointServicesRestOperations.cs | 2 +- ...lablePrivateEndpointTypesRestOperations.cs | 2 +- ...eResourceGroupDelegationsRestOperations.cs | 2 +- .../AvailableServiceAliasesRestOperations.cs | 2 +- .../AzureFirewallFqdnTagsRestOperations.cs | 2 +- .../AzureFirewallsRestOperations.cs | 10 +- .../BastionHostsRestOperations.cs | 2 +- .../BgpServiceCommunitiesRestOperations.cs | 2 +- ...ConfigurationPolicyGroupsRestOperations.cs | 2 +- .../ConnectionMonitorsRestOperations.cs | 2 +- ...onnectivityConfigurationsRestOperations.cs | 2 +- .../CustomIPPrefixesRestOperations.cs | 2 +- .../DdosCustomPoliciesRestOperations.cs | 2 +- .../DdosProtectionPlansRestOperations.cs | 2 +- .../DefaultSecurityRulesRestOperations.cs | 2 +- .../DscpConfigurationRestOperations.cs | 2 +- ...outeCircuitAuthorizationsRestOperations.cs | 2 +- ...ssRouteCircuitConnectionsRestOperations.cs | 2 +- ...pressRouteCircuitPeeringsRestOperations.cs | 2 +- .../ExpressRouteCircuitsRestOperations.cs | 2 +- .../ExpressRouteConnectionsRestOperations.cs | 2 +- ...teCrossConnectionPeeringsRestOperations.cs | 2 +- ...ressRouteCrossConnectionsRestOperations.cs | 38 +- .../ExpressRouteGatewaysRestOperations.cs | 2 +- .../ExpressRouteLinksRestOperations.cs | 2 +- ...ssRoutePortAuthorizationsRestOperations.cs | 2 +- ...xpressRoutePortsLocationsRestOperations.cs | 2 +- .../ExpressRoutePortsRestOperations.cs | 2 +- ...outeProviderPortsLocationRestOperations.cs | 2 +- ...ressRouteServiceProvidersRestOperations.cs | 2 +- .../FirewallPoliciesRestOperations.cs | 2 +- ...FirewallPolicyDeploymentsRestOperations.cs | 2 +- .../FirewallPolicyDraftsRestOperations.cs | 2 +- ...dpsSignaturesFilterValuesRestOperations.cs | 2 +- ...cyIdpsSignaturesOverridesRestOperations.cs | 2 +- ...ewallPolicyIdpsSignaturesRestOperations.cs | 2 +- ...RuleCollectionGroupDraftsRestOperations.cs | 2 +- ...olicyRuleCollectionGroupsRestOperations.cs | 2 +- .../RestOperations/FlowLogsRestOperations.cs | 2 +- .../HubRouteTablesRestOperations.cs | 2 +- ...VirtualNetworkConnectionsRestOperations.cs | 2 +- .../InboundNatRulesRestOperations.cs | 2 +- .../InboundSecurityRuleRestOperations.cs | 134 ++++- .../IpAllocationsRestOperations.cs | 2 +- .../RestOperations/IpGroupsRestOperations.cs | 2 +- ...lancerBackendAddressPoolsRestOperations.cs | 2 +- ...rFrontendIPConfigurationsRestOperations.cs | 2 +- ...alancerLoadBalancingRulesRestOperations.cs | 2 +- ...BalancerNetworkInterfacesRestOperations.cs | 2 +- ...LoadBalancerOutboundRulesRestOperations.cs | 2 +- .../LoadBalancerProbesRestOperations.cs | 2 +- .../LoadBalancersRestOperations.cs | 2 +- .../LocalNetworkGatewaysRestOperations.cs | 2 +- ...NetworkManagerConnectionsRestOperations.cs | 2 +- .../NatGatewaysRestOperations.cs | 2 +- .../RestOperations/NatRulesRestOperations.cs | 2 +- .../NetworkGroupsRestOperations.cs | 2 +- ...InterfaceIPConfigurationsRestOperations.cs | 2 +- ...orkInterfaceLoadBalancersRestOperations.cs | 2 +- ...nterfaceTapConfigurationsRestOperations.cs | 2 +- .../NetworkInterfacesRestOperations.cs | 2 +- .../NetworkManagementRestOperations.cs | 2 +- .../NetworkManagerCommitsRestOperations.cs | 2 +- ...rkManagerDeploymentStatusRestOperations.cs | 2 +- .../NetworkManagersRestOperations.cs | 2 +- .../NetworkProfilesRestOperations.cs | 2 +- .../NetworkSecurityGroupsRestOperations.cs | 2 +- ...rtualApplianceConnectionsRestOperations.cs | 2 +- .../NetworkVirtualAppliancesRestOperations.cs | 4 +- .../NetworkWatchersRestOperations.cs | 2 +- .../P2SVpnGatewaysRestOperations.cs | 2 +- .../PacketCapturesRestOperations.cs | 2 +- ...ssRouteCircuitConnectionsRestOperations.cs | 2 +- .../PrivateDnsZoneGroupsRestOperations.cs | 2 +- .../PrivateEndpointsRestOperations.cs | 2 +- .../PrivateLinkServicesRestOperations.cs | 2 +- .../PublicIPAddressesRestOperations.cs | 2 +- .../PublicIPPrefixesRestOperations.cs | 2 +- .../ResourceNavigationLinksRestOperations.cs | 2 +- .../RouteFilterRulesRestOperations.cs | 2 +- .../RouteFiltersRestOperations.cs | 2 +- .../RestOperations/RouteMapsRestOperations.cs | 2 +- .../RouteTablesRestOperations.cs | 2 +- .../RestOperations/RoutesRestOperations.cs | 2 +- .../RoutingIntentRestOperations.cs | 2 +- .../ScopeConnectionsRestOperations.cs | 2 +- ...curityAdminConfigurationsRestOperations.cs | 2 +- .../SecurityPartnerProvidersRestOperations.cs | 2 +- .../SecurityRulesRestOperations.cs | 2 +- .../ServiceAssociationLinksRestOperations.cs | 2 +- .../ServiceEndpointPoliciesRestOperations.cs | 2 +- ...EndpointPolicyDefinitionsRestOperations.cs | 2 +- .../ServiceTagInformationRestOperations.cs | 2 +- .../ServiceTagsRestOperations.cs | 2 +- .../StaticMembersRestOperations.cs | 2 +- .../RestOperations/SubnetsRestOperations.cs | 2 +- ...NetworkManagerConnectionsRestOperations.cs | 2 +- .../RestOperations/UsagesRestOperations.cs | 2 +- .../RestOperations/VipSwapRestOperations.cs | 2 +- .../VirtualApplianceSitesRestOperations.cs | 2 +- .../VirtualApplianceSkusRestOperations.cs | 2 +- .../VirtualHubBgpConnectionRestOperations.cs | 2 +- .../VirtualHubBgpConnectionsRestOperations.cs | 2 +- ...VirtualHubIpConfigurationRestOperations.cs | 2 +- .../VirtualHubRouteTableV2SRestOperations.cs | 2 +- .../VirtualHubsRestOperations.cs | 2 +- ...NetworkGatewayConnectionsRestOperations.cs | 2 +- ...ualNetworkGatewayNatRulesRestOperations.cs | 2 +- .../VirtualNetworkGatewaysRestOperations.cs | 2 +- .../VirtualNetworkPeeringsRestOperations.cs | 2 +- .../VirtualNetworkTapsRestOperations.cs | 2 +- .../VirtualNetworksRestOperations.cs | 2 +- .../VirtualRouterPeeringsRestOperations.cs | 2 +- .../VirtualRoutersRestOperations.cs | 2 +- .../VirtualWansRestOperations.cs | 2 +- .../VpnConnectionsRestOperations.cs | 2 +- .../VpnGatewaysRestOperations.cs | 2 +- .../VpnLinkConnectionsRestOperations.cs | 2 +- ...sAssociatedWithVirtualWanRestOperations.cs | 2 +- .../VpnServerConfigurationsRestOperations.cs | 2 +- .../VpnSiteLinkConnectionsRestOperations.cs | 2 +- .../VpnSiteLinksRestOperations.cs | 2 +- .../VpnSitesConfigurationRestOperations.cs | 2 +- .../RestOperations/VpnSitesRestOperations.cs | 2 +- ...plicationFirewallPoliciesRestOperations.cs | 2 +- .../WebCategoriesRestOperations.cs | 2 +- .../src/Generated/RouteCollection.cs | 20 +- .../src/Generated/RouteFilterCollection.cs | 20 +- .../src/Generated/RouteFilterResource.cs | 28 +- .../Generated/RouteFilterRuleCollection.cs | 20 +- .../src/Generated/RouteFilterRuleResource.cs | 12 +- .../src/Generated/RouteMapCollection.cs | 20 +- .../src/Generated/RouteMapResource.cs | 12 +- .../src/Generated/RouteResource.cs | 12 +- .../src/Generated/RouteTableCollection.cs | 20 +- .../src/Generated/RouteTableResource.cs | 28 +- .../src/Generated/RoutingIntentCollection.cs | 20 +- .../src/Generated/RoutingIntentResource.cs | 12 +- .../Generated/ScopeConnectionCollection.cs | 20 +- .../src/Generated/ScopeConnectionResource.cs | 12 +- .../SecurityAdminConfigurationCollection.cs | 20 +- .../SecurityAdminConfigurationResource.cs | 16 +- .../SecurityPartnerProviderCollection.cs | 20 +- .../SecurityPartnerProviderResource.cs | 24 +- .../src/Generated/SecurityRuleCollection.cs | 20 +- .../src/Generated/SecurityRuleResource.cs | 12 +- .../ServiceEndpointPolicyCollection.cs | 20 +- ...rviceEndpointPolicyDefinitionCollection.cs | 20 +- ...ServiceEndpointPolicyDefinitionResource.cs | 12 +- .../ServiceEndpointPolicyResource.cs | 28 +- .../src/Generated/SubnetCollection.cs | 20 +- .../src/Generated/SubnetResource.cs | 28 +- ...ptionNetworkManagerConnectionCollection.cs | 20 +- ...riptionNetworkManagerConnectionResource.cs | 12 +- .../VirtualApplianceSiteCollection.cs | 20 +- .../Generated/VirtualApplianceSiteResource.cs | 12 +- .../src/Generated/VirtualHubCollection.cs | 20 +- .../src/Generated/VirtualHubResource.cs | 64 +-- .../VirtualHubRouteTableV2Collection.cs | 20 +- .../VirtualHubRouteTableV2Resource.cs | 12 +- .../src/Generated/VirtualNetworkCollection.cs | 20 +- .../VirtualNetworkGatewayCollection.cs | 20 +- ...rtualNetworkGatewayConnectionCollection.cs | 20 +- ...VirtualNetworkGatewayConnectionResource.cs | 56 +- ...VirtualNetworkGatewayData.Serialization.cs | 17 + .../Generated/VirtualNetworkGatewayData.cs | 7 +- .../VirtualNetworkGatewayNatRuleCollection.cs | 20 +- .../VirtualNetworkGatewayNatRuleResource.cs | 12 +- .../VirtualNetworkGatewayResource.cs | 92 ++-- .../VirtualNetworkPeeringCollection.cs | 20 +- .../VirtualNetworkPeeringResource.cs | 12 +- .../src/Generated/VirtualNetworkResource.cs | 48 +- .../Generated/VirtualNetworkTapCollection.cs | 20 +- .../Generated/VirtualNetworkTapResource.cs | 24 +- .../src/Generated/VirtualRouterCollection.cs | 20 +- .../VirtualRouterPeeringCollection.cs | 20 +- .../Generated/VirtualRouterPeeringResource.cs | 12 +- .../src/Generated/VirtualRouterResource.cs | 28 +- .../src/Generated/VirtualWanCollection.cs | 20 +- .../src/Generated/VirtualWanResource.cs | 40 +- .../src/Generated/VpnConnectionCollection.cs | 20 +- .../src/Generated/VpnConnectionResource.cs | 24 +- .../src/Generated/VpnGatewayCollection.cs | 20 +- .../Generated/VpnGatewayNatRuleCollection.cs | 20 +- .../Generated/VpnGatewayNatRuleResource.cs | 12 +- .../src/Generated/VpnGatewayResource.cs | 44 +- .../VpnServerConfigurationCollection.cs | 20 +- ...erverConfigurationPolicyGroupCollection.cs | 20 +- ...nServerConfigurationPolicyGroupResource.cs | 12 +- .../VpnServerConfigurationResource.cs | 28 +- .../src/Generated/VpnSiteCollection.cs | 20 +- .../src/Generated/VpnSiteLinkCollection.cs | 16 +- .../VpnSiteLinkConnectionCollection.cs | 16 +- .../VpnSiteLinkConnectionResource.cs | 12 +- .../src/Generated/VpnSiteLinkResource.cs | 4 +- .../src/Generated/VpnSiteResource.cs | 28 +- .../WebApplicationFirewallPolicyCollection.cs | 20 +- .../WebApplicationFirewallPolicyResource.cs | 24 +- .../src/autorest.md | 6 +- 611 files changed, 7742 insertions(+), 4467 deletions(-) create mode 100644 sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_InboundSecurityRuleCollection.cs create mode 100644 sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_InboundSecurityRuleResource.cs create mode 100644 sdk/network/Azure.ResourceManager.Network/src/Customization/AzureFirewallResource.cs create mode 100644 sdk/network/Azure.ResourceManager.Network/src/Customization/Extensions/MockableNetworkSubscriptionResource.cs rename sdk/network/Azure.ResourceManager.Network/src/{Generated => Customization}/Models/FirewallPacketCaptureContent.cs (86%) create mode 100644 sdk/network/Azure.ResourceManager.Network/src/Customization/Models/FirewallPacketCaptureContent.serialization.cs rename sdk/network/Azure.ResourceManager.Network/src/{Generated => Customization}/Models/InboundSecurityRule.cs (80%) rename sdk/network/Azure.ResourceManager.Network/src/{Generated/Models/InboundSecurityRule.Serialization.cs => Customization/Models/InboundSecurityRule.serialization.cs} (99%) create mode 100644 sdk/network/Azure.ResourceManager.Network/src/Customization/NetworkVirtualApplianceResource.cs create mode 100644 sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleCollection.cs create mode 100644 sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleData.Serialization.cs create mode 100644 sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleData.cs create mode 100644 sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleResource.Serialization.cs create mode 100644 sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleResource.cs create mode 100644 sdk/network/Azure.ResourceManager.Network/src/Generated/LongRunningOperation/NetworkVirtualApplianceInstanceIdsOperationSource.cs delete mode 100644 sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPacketCaptureContent.Serialization.cs create mode 100644 sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPacketCaptureRequestContent.Serialization.cs create mode 100644 sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPacketCaptureRequestContent.cs create mode 100644 sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ProbeNoHealthyBackendsBehavior.cs diff --git a/sdk/network/Azure.ResourceManager.Network/CHANGELOG.md b/sdk/network/Azure.ResourceManager.Network/CHANGELOG.md index d1b51ed484be7..2b4f4265e64ee 100644 --- a/sdk/network/Azure.ResourceManager.Network/CHANGELOG.md +++ b/sdk/network/Azure.ResourceManager.Network/CHANGELOG.md @@ -1,14 +1,9 @@ # Release History -## 1.9.0-beta.1 (Unreleased) +## 1.9.0 (2024-07-10) ### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- Upgraded api-version tag from 'package-2023-11' to 'package-2024-01'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/network/resource-manager/readme.md ## 1.8.0 (2024-06-24) diff --git a/sdk/network/Azure.ResourceManager.Network/api/Azure.ResourceManager.Network.netstandard2.0.cs b/sdk/network/Azure.ResourceManager.Network/api/Azure.ResourceManager.Network.netstandard2.0.cs index 69e4d2484380a..ea69ddbe245a2 100644 --- a/sdk/network/Azure.ResourceManager.Network/api/Azure.ResourceManager.Network.netstandard2.0.cs +++ b/sdk/network/Azure.ResourceManager.Network/api/Azure.ResourceManager.Network.netstandard2.0.cs @@ -358,8 +358,12 @@ protected AzureFirewallResource() { } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation GetLearnedPrefixes(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetLearnedPrefixesAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.ArmOperation PacketCapture(Azure.WaitUntil waitUntil, Azure.ResourceManager.Network.Models.FirewallPacketCaptureContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation PacketCapture(Azure.WaitUntil waitUntil, Azure.ResourceManager.Network.Models.FirewallPacketCaptureRequestContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task PacketCaptureAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Network.Models.FirewallPacketCaptureContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task PacketCaptureAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Network.Models.FirewallPacketCaptureRequestContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -544,6 +548,7 @@ public BastionHostData() { } public bool? EnableFileCopy { get { throw null; } set { } } public bool? EnableIPConnect { get { throw null; } set { } } public bool? EnableKerberos { get { throw null; } set { } } + public bool? EnableSessionRecording { get { throw null; } set { } } public bool? EnableShareableLink { get { throw null; } set { } } public bool? EnableTunneling { get { throw null; } set { } } public Azure.ETag? ETag { get { throw null; } } @@ -1132,6 +1137,7 @@ public partial class ExpressRouteCircuitAuthorizationData : Azure.ResourceManage public ExpressRouteCircuitAuthorizationData() { } public string AuthorizationKey { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.AuthorizationUseStatus? AuthorizationUseStatus { get { throw null; } set { } } + public System.Uri ConnectionResourceUri { get { throw null; } } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } Azure.ResourceManager.Network.ExpressRouteCircuitAuthorizationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2134,6 +2140,7 @@ public FlowLogData() { } public bool? Enabled { get { throw null; } set { } } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Network.Models.FlowLogProperties Format { get { throw null; } set { } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Network.Models.RetentionPolicyParameters RetentionPolicy { get { throw null; } set { } } public Azure.Core.ResourceIdentifier StorageId { get { throw null; } set { } } @@ -2436,6 +2443,48 @@ protected InboundNatRuleResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Network.InboundNatRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Network.InboundNatRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class InboundSecurityRuleCollection : Azure.ResourceManager.ArmCollection + { + protected InboundSecurityRuleCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string ruleCollectionName, Azure.ResourceManager.Network.InboundSecurityRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string ruleCollectionName, Azure.ResourceManager.Network.InboundSecurityRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string ruleCollectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string ruleCollectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string ruleCollectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string ruleCollectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string ruleCollectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string ruleCollectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class InboundSecurityRuleData : Azure.ResourceManager.Network.Models.NetworkResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public InboundSecurityRuleData() { } + public Azure.ETag? ETag { get { throw null; } } + public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IList Rules { get { throw null; } } + public Azure.ResourceManager.Network.Models.InboundSecurityRuleType? RuleType { get { throw null; } set { } } + Azure.ResourceManager.Network.InboundSecurityRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Network.InboundSecurityRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class InboundSecurityRuleResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected InboundSecurityRuleResource() { } + public virtual Azure.ResourceManager.Network.InboundSecurityRuleData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string networkVirtualApplianceName, string ruleCollectionName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.Network.InboundSecurityRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Network.InboundSecurityRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Network.InboundSecurityRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Network.InboundSecurityRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class IPAllocationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected IPAllocationCollection() { } @@ -2977,8 +3026,12 @@ public static partial class NetworkExtensions public static Azure.ResourceManager.Network.ExpressRouteCrossConnectionPeeringResource GetExpressRouteCrossConnectionPeeringResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Network.ExpressRouteCrossConnectionResource GetExpressRouteCrossConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Network.ExpressRouteCrossConnectionCollection GetExpressRouteCrossConnections(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetExpressRouteCrossConnections(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetExpressRouteCrossConnectionsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Pageable GetExpressRouteCrossConnections(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.Pageable GetExpressRouteCrossConnections(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken) { throw null; } + public static Azure.AsyncPageable GetExpressRouteCrossConnectionsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.AsyncPageable GetExpressRouteCrossConnectionsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken) { throw null; } public static Azure.Response GetExpressRouteGateway(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string expressRouteGatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetExpressRouteGatewayAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string expressRouteGatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.Network.ExpressRouteGatewayResource GetExpressRouteGatewayResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -3018,6 +3071,7 @@ public static partial class NetworkExtensions public static Azure.ResourceManager.Network.HubRouteTableResource GetHubRouteTableResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Network.HubVirtualNetworkConnectionResource GetHubVirtualNetworkConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Network.InboundNatRuleResource GetInboundNatRuleResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.Network.InboundSecurityRuleResource GetInboundSecurityRuleResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetIPAllocation(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string ipAllocationName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetIPAllocationAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string ipAllocationName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.Network.IPAllocationResource GetIPAllocationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -3915,13 +3969,18 @@ protected NetworkVirtualApplianceResource() { } public virtual bool HasData { get { throw null; } } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.ArmOperation CreateOrUpdateInboundSecurityRule(Azure.WaitUntil waitUntil, string ruleCollectionName, Azure.ResourceManager.Network.Models.InboundSecurityRule inboundSecurityRule, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task> CreateOrUpdateInboundSecurityRuleAsync(Azure.WaitUntil waitUntil, string ruleCollectionName, Azure.ResourceManager.Network.Models.InboundSecurityRule inboundSecurityRule, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string networkVirtualApplianceName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetInboundSecurityRule(string ruleCollectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetInboundSecurityRuleAsync(string ruleCollectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.Network.InboundSecurityRuleCollection GetInboundSecurityRules() { throw null; } public virtual Azure.Response GetNetworkVirtualApplianceConnection(string connectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetNetworkVirtualApplianceConnectionAsync(string connectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.Network.NetworkVirtualApplianceConnectionCollection GetNetworkVirtualApplianceConnections() { throw null; } @@ -3930,8 +3989,12 @@ protected NetworkVirtualApplianceResource() { } public virtual Azure.ResourceManager.Network.VirtualApplianceSiteCollection GetVirtualApplianceSites() { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.Response Restart(Azure.ResourceManager.Network.Models.NetworkVirtualApplianceInstanceIds networkVirtualApplianceInstanceIds = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Restart(Azure.WaitUntil waitUntil, Azure.ResourceManager.Network.Models.NetworkVirtualApplianceInstanceIds networkVirtualApplianceInstanceIds = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task RestartAsync(Azure.ResourceManager.Network.Models.NetworkVirtualApplianceInstanceIds networkVirtualApplianceInstanceIds = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RestartAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Network.Models.NetworkVirtualApplianceInstanceIds networkVirtualApplianceInstanceIds = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.Network.NetworkVirtualApplianceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4546,6 +4609,7 @@ public ProbeData() { } public Azure.ETag? ETag { get { throw null; } } public int? IntervalInSeconds { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList LoadBalancingRules { get { throw null; } } + public Azure.ResourceManager.Network.Models.ProbeNoHealthyBackendsBehavior? NoHealthyBackendsBehavior { get { throw null; } set { } } public int? NumberOfProbes { get { throw null; } set { } } public int? Port { get { throw null; } set { } } public int? ProbeThreshold { get { throw null; } set { } } @@ -5903,6 +5967,7 @@ public VirtualNetworkGatewayData() { } public Azure.ResourceManager.Resources.Models.ExtendedLocation ExtendedLocation { get { throw null; } set { } } public Azure.Core.ResourceIdentifier GatewayDefaultSiteId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.VirtualNetworkGatewayType? GatewayType { get { throw null; } set { } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public string InboundDnsForwardingEndpoint { get { throw null; } } public System.Collections.Generic.IList IPConfigurations { get { throw null; } } public System.Collections.Generic.IList NatRules { get { throw null; } } @@ -7007,6 +7072,7 @@ protected MockableNetworkArmClient() { } public virtual Azure.ResourceManager.Network.HubRouteTableResource GetHubRouteTableResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Network.HubVirtualNetworkConnectionResource GetHubVirtualNetworkConnectionResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Network.InboundNatRuleResource GetInboundNatRuleResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.Network.InboundSecurityRuleResource GetInboundSecurityRuleResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Network.IPAllocationResource GetIPAllocationResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Network.IPGroupResource GetIPGroupResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Network.LoadBalancerResource GetLoadBalancerResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -7291,7 +7357,11 @@ protected MockableNetworkSubscriptionResource() { } public virtual Azure.AsyncPageable GetDscpConfigurationsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetExpressRouteCircuits(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetExpressRouteCircuitsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetExpressRouteCrossConnections(string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.Pageable GetExpressRouteCrossConnections(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetExpressRouteCrossConnectionsAsync(string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.AsyncPageable GetExpressRouteCrossConnectionsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetExpressRouteGateways(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetExpressRouteGatewaysAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -8824,7 +8894,9 @@ public static partial class ArmNetworkModelFactory public static Azure.ResourceManager.Network.BackendAddressPoolData BackendAddressPoolData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType? resourceType, Azure.ETag? etag, Azure.Core.AzureLocation? location, System.Collections.Generic.IEnumerable tunnelInterfaces, System.Collections.Generic.IEnumerable loadBalancerBackendAddresses, System.Collections.Generic.IEnumerable backendIPConfigurations, System.Collections.Generic.IEnumerable loadBalancingRules, Azure.Core.ResourceIdentifier outboundRuleId, System.Collections.Generic.IEnumerable outboundRules, System.Collections.Generic.IEnumerable inboundNatRules, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState, int? drainPeriodInSeconds, Azure.Core.ResourceIdentifier virtualNetworkId) { throw null; } public static Azure.ResourceManager.Network.BackendAddressPoolData BackendAddressPoolData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ETag? etag = default(Azure.ETag?), Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IEnumerable tunnelInterfaces = null, System.Collections.Generic.IEnumerable loadBalancerBackendAddresses = null, System.Collections.Generic.IEnumerable backendIPConfigurations = null, System.Collections.Generic.IEnumerable loadBalancingRules = null, Azure.Core.ResourceIdentifier outboundRuleId = null, System.Collections.Generic.IEnumerable outboundRules = null, System.Collections.Generic.IEnumerable inboundNatRules = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?), int? drainPeriodInSeconds = default(int?), Azure.Core.ResourceIdentifier virtualNetworkId = null, Azure.ResourceManager.Network.Models.BackendAddressSyncMode? syncMode = default(Azure.ResourceManager.Network.Models.BackendAddressSyncMode?)) { throw null; } public static Azure.ResourceManager.Network.BaseAdminRuleData BaseAdminRuleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string kind = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } - public static Azure.ResourceManager.Network.BastionHostData BastionHostData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IEnumerable zones = null, Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.Network.Models.BastionHostSkuName? skuName = default(Azure.ResourceManager.Network.Models.BastionHostSkuName?), System.Collections.Generic.IEnumerable ipConfigurations = null, string dnsName = null, Azure.Core.ResourceIdentifier virtualNetworkId = null, System.Collections.Generic.IEnumerable networkAclsIPRules = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?), int? scaleUnits = default(int?), bool? disableCopyPaste = default(bool?), bool? enableFileCopy = default(bool?), bool? enableIPConnect = default(bool?), bool? enableShareableLink = default(bool?), bool? enableTunneling = default(bool?), bool? enableKerberos = default(bool?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.Network.BastionHostData BastionHostData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType? resourceType, Azure.Core.AzureLocation? location, System.Collections.Generic.IDictionary tags, System.Collections.Generic.IEnumerable zones, Azure.ETag? etag, Azure.ResourceManager.Network.Models.BastionHostSkuName? skuName, System.Collections.Generic.IEnumerable ipConfigurations, string dnsName, Azure.Core.ResourceIdentifier virtualNetworkId, System.Collections.Generic.IEnumerable networkAclsIPRules, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState, int? scaleUnits, bool? disableCopyPaste, bool? enableFileCopy, bool? enableIPConnect, bool? enableShareableLink, bool? enableTunneling, bool? enableKerberos) { throw null; } + public static Azure.ResourceManager.Network.BastionHostData BastionHostData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IEnumerable zones = null, Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.Network.Models.BastionHostSkuName? skuName = default(Azure.ResourceManager.Network.Models.BastionHostSkuName?), System.Collections.Generic.IEnumerable ipConfigurations = null, string dnsName = null, Azure.Core.ResourceIdentifier virtualNetworkId = null, System.Collections.Generic.IEnumerable networkAclsIPRules = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?), int? scaleUnits = default(int?), bool? disableCopyPaste = default(bool?), bool? enableFileCopy = default(bool?), bool? enableIPConnect = default(bool?), bool? enableShareableLink = default(bool?), bool? enableTunneling = default(bool?), bool? enableKerberos = default(bool?), bool? enableSessionRecording = default(bool?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.Network.BastionHostData BastionHostData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null, Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.Network.Models.BastionHostSkuName? skuName = default(Azure.ResourceManager.Network.Models.BastionHostSkuName?), System.Collections.Generic.IEnumerable ipConfigurations = null, string dnsName = null, Azure.Core.ResourceIdentifier virtualNetworkId = null, System.Collections.Generic.IEnumerable networkAclsIPRules = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?), int? scaleUnits = default(int?), bool? disableCopyPaste = default(bool?), bool? enableFileCopy = default(bool?), bool? enableIPConnect = default(bool?), bool? enableShareableLink = default(bool?), bool? enableTunneling = default(bool?), bool? enableKerberos = default(bool?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -8868,7 +8940,9 @@ public static partial class ArmNetworkModelFactory public static Azure.ResourceManager.Network.Models.EndpointServiceResult EndpointServiceResult(string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.Core.ResourceIdentifier id = null) { throw null; } public static Azure.ResourceManager.Network.Models.EvaluatedNetworkSecurityGroup EvaluatedNetworkSecurityGroup(Azure.Core.ResourceIdentifier networkSecurityGroupId = null, string appliedTo = null, Azure.ResourceManager.Network.Models.MatchedRule matchedRule = null, System.Collections.Generic.IEnumerable rulesEvaluationResult = null) { throw null; } public static Azure.ResourceManager.Network.Models.ExpressRouteCircuitArpTable ExpressRouteCircuitArpTable(int? age = default(int?), string @interface = null, string ipAddress = null, string macAddress = null) { throw null; } - public static Azure.ResourceManager.Network.ExpressRouteCircuitAuthorizationData ExpressRouteCircuitAuthorizationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ETag? etag = default(Azure.ETag?), string authorizationKey = null, Azure.ResourceManager.Network.Models.AuthorizationUseStatus? authorizationUseStatus = default(Azure.ResourceManager.Network.Models.AuthorizationUseStatus?), Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.Network.ExpressRouteCircuitAuthorizationData ExpressRouteCircuitAuthorizationData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType? resourceType, Azure.ETag? etag, string authorizationKey, Azure.ResourceManager.Network.Models.AuthorizationUseStatus? authorizationUseStatus, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState) { throw null; } + public static Azure.ResourceManager.Network.ExpressRouteCircuitAuthorizationData ExpressRouteCircuitAuthorizationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ETag? etag = default(Azure.ETag?), string authorizationKey = null, Azure.ResourceManager.Network.Models.AuthorizationUseStatus? authorizationUseStatus = default(Azure.ResourceManager.Network.Models.AuthorizationUseStatus?), System.Uri connectionResourceUri = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?)) { throw null; } public static Azure.ResourceManager.Network.ExpressRouteCircuitConnectionData ExpressRouteCircuitConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ETag? etag = default(Azure.ETag?), Azure.Core.ResourceIdentifier expressRouteCircuitPeeringId = null, Azure.Core.ResourceIdentifier peerExpressRouteCircuitPeeringId = null, string addressPrefix = null, string authorizationKey = null, Azure.ResourceManager.Network.Models.IPv6CircuitConnectionConfig ipv6CircuitConnectionConfig = null, Azure.ResourceManager.Network.Models.CircuitConnectionStatus? circuitConnectionStatus = default(Azure.ResourceManager.Network.Models.CircuitConnectionStatus?), Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.Network.ExpressRouteCircuitData ExpressRouteCircuitData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType? resourceType, Azure.Core.AzureLocation? location, System.Collections.Generic.IDictionary tags, Azure.ResourceManager.Network.Models.ExpressRouteCircuitSku sku, Azure.ETag? etag, bool? allowClassicOperations, string circuitProvisioningState, Azure.ResourceManager.Network.Models.ServiceProviderProvisioningState? serviceProviderProvisioningState, System.Collections.Generic.IEnumerable authorizations, System.Collections.Generic.IEnumerable peerings, string serviceKey, string serviceProviderNotes, Azure.ResourceManager.Network.Models.ExpressRouteCircuitServiceProviderProperties serviceProviderProperties, Azure.Core.ResourceIdentifier expressRoutePortId, float? bandwidthInGbps, int? stag, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState, string gatewayManagerETag, bool? globalReachEnabled, string authorizationKey, string authorizationStatus) { throw null; } @@ -8901,7 +8975,9 @@ public static partial class ArmNetworkModelFactory public static Azure.ResourceManager.Network.FirewallPolicyRuleCollectionGroupData FirewallPolicyRuleCollectionGroupData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType? resourceType, Azure.ETag? etag, int? priority, System.Collections.Generic.IEnumerable ruleCollections, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState) { throw null; } public static Azure.ResourceManager.Network.FirewallPolicyRuleCollectionGroupData FirewallPolicyRuleCollectionGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ETag? etag = default(Azure.ETag?), string size = null, int? priority = default(int?), System.Collections.Generic.IEnumerable ruleCollections = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?)) { throw null; } public static Azure.ResourceManager.Network.FirewallPolicyRuleCollectionGroupDraftData FirewallPolicyRuleCollectionGroupDraftData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), string size = null, int? priority = default(int?), System.Collections.Generic.IEnumerable ruleCollections = null) { throw null; } - public static Azure.ResourceManager.Network.FlowLogData FlowLogData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null, Azure.ETag? etag = default(Azure.ETag?), Azure.Core.ResourceIdentifier targetResourceId = null, System.Guid? targetResourceGuid = default(System.Guid?), Azure.Core.ResourceIdentifier storageId = null, bool? enabled = default(bool?), Azure.ResourceManager.Network.Models.RetentionPolicyParameters retentionPolicy = null, Azure.ResourceManager.Network.Models.FlowLogProperties format = null, Azure.ResourceManager.Network.Models.TrafficAnalyticsConfigurationProperties trafficAnalyticsConfiguration = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.Network.FlowLogData FlowLogData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType? resourceType, Azure.Core.AzureLocation? location, System.Collections.Generic.IDictionary tags, Azure.ETag? etag, Azure.Core.ResourceIdentifier targetResourceId, System.Guid? targetResourceGuid, Azure.Core.ResourceIdentifier storageId, bool? enabled, Azure.ResourceManager.Network.Models.RetentionPolicyParameters retentionPolicy, Azure.ResourceManager.Network.Models.FlowLogProperties format, Azure.ResourceManager.Network.Models.TrafficAnalyticsConfigurationProperties trafficAnalyticsConfiguration, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState) { throw null; } + public static Azure.ResourceManager.Network.FlowLogData FlowLogData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null, Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.Core.ResourceIdentifier targetResourceId = null, System.Guid? targetResourceGuid = default(System.Guid?), Azure.Core.ResourceIdentifier storageId = null, bool? enabled = default(bool?), Azure.ResourceManager.Network.Models.RetentionPolicyParameters retentionPolicy = null, Azure.ResourceManager.Network.Models.FlowLogProperties format = null, Azure.ResourceManager.Network.Models.TrafficAnalyticsConfigurationProperties trafficAnalyticsConfiguration = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?)) { throw null; } public static Azure.ResourceManager.Network.FrontendIPConfigurationData FrontendIPConfigurationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable zones = null, System.Collections.Generic.IEnumerable inboundNatRules = null, System.Collections.Generic.IEnumerable inboundNatPools = null, System.Collections.Generic.IEnumerable outboundRules = null, System.Collections.Generic.IEnumerable loadBalancingRules = null, string privateIPAddress = null, Azure.ResourceManager.Network.Models.NetworkIPAllocationMethod? privateIPAllocationMethod = default(Azure.ResourceManager.Network.Models.NetworkIPAllocationMethod?), Azure.ResourceManager.Network.Models.NetworkIPVersion? privateIPAddressVersion = default(Azure.ResourceManager.Network.Models.NetworkIPVersion?), Azure.ResourceManager.Network.SubnetData subnet = null, Azure.ResourceManager.Network.PublicIPAddressData publicIPAddress = null, Azure.Core.ResourceIdentifier publicIPPrefixId = null, Azure.Core.ResourceIdentifier gatewayLoadBalancerId = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?)) { throw null; } public static Azure.ResourceManager.Network.Models.GatewayRoute GatewayRoute(string localAddress = null, string network = null, string nextHop = null, string sourcePeer = null, string origin = null, string asPath = null, int? weight = default(int?)) { throw null; } public static Azure.ResourceManager.Network.Models.GatewayRouteListResult GatewayRouteListResult(System.Collections.Generic.IEnumerable value = null) { throw null; } @@ -8917,7 +8993,9 @@ public static partial class ArmNetworkModelFactory public static Azure.ResourceManager.Network.Models.InboundNatRulePortMapping InboundNatRulePortMapping(string inboundNatRuleName = null, Azure.ResourceManager.Network.Models.LoadBalancingTransportProtocol? protocol = default(Azure.ResourceManager.Network.Models.LoadBalancingTransportProtocol?), int? frontendPort = default(int?), int? backendPort = default(int?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.Network.Models.InboundSecurityRule InboundSecurityRule(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType? resourceType, Azure.ETag? etag, System.Collections.Generic.IEnumerable rules, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.Network.Models.InboundSecurityRule InboundSecurityRule(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.Network.Models.InboundSecurityRuleType? ruleType = default(Azure.ResourceManager.Network.Models.InboundSecurityRuleType?), System.Collections.Generic.IEnumerable rules = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?)) { throw null; } + public static Azure.ResourceManager.Network.InboundSecurityRuleData InboundSecurityRuleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.Network.Models.InboundSecurityRuleType? ruleType = default(Azure.ResourceManager.Network.Models.InboundSecurityRuleType?), System.Collections.Generic.IEnumerable rules = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?)) { throw null; } public static Azure.ResourceManager.Network.Models.IPAddressAvailabilityResult IPAddressAvailabilityResult(bool? available = default(bool?), System.Collections.Generic.IEnumerable availableIPAddresses = null, bool? isPlatformReserved = default(bool?)) { throw null; } public static Azure.ResourceManager.Network.IPAllocationData IPAllocationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null, Azure.ETag? etag = default(Azure.ETag?), Azure.Core.ResourceIdentifier subnetId = null, Azure.Core.ResourceIdentifier virtualNetworkId = null, Azure.ResourceManager.Network.Models.NetworkIPAllocationType? ipAllocationType = default(Azure.ResourceManager.Network.Models.NetworkIPAllocationType?), string prefix = null, int? prefixLength = default(int?), Azure.ResourceManager.Network.Models.NetworkIPVersion? prefixType = default(Azure.ResourceManager.Network.Models.NetworkIPVersion?), string ipamAllocationId = null, System.Collections.Generic.IDictionary allocationTags = null) { throw null; } public static Azure.ResourceManager.Network.IPGroupData IPGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null, Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?), System.Collections.Generic.IEnumerable ipAddresses = null, System.Collections.Generic.IEnumerable firewalls = null, System.Collections.Generic.IEnumerable firewallPolicies = null) { throw null; } @@ -9000,7 +9078,9 @@ public static partial class ArmNetworkModelFactory public static Azure.ResourceManager.Network.PrivateLinkServiceData PrivateLinkServiceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable loadBalancerFrontendIPConfigurations = null, System.Collections.Generic.IEnumerable ipConfigurations = null, System.Collections.Generic.IEnumerable networkInterfaces = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?), System.Collections.Generic.IEnumerable privateEndpointConnections = null, System.Collections.Generic.IEnumerable visibilitySubscriptions = null, System.Collections.Generic.IEnumerable autoApprovalSubscriptions = null, System.Collections.Generic.IEnumerable fqdns = null, string alias = null, bool? enableProxyProtocol = default(bool?)) { throw null; } public static Azure.ResourceManager.Network.Models.PrivateLinkServiceIPConfiguration PrivateLinkServiceIPConfiguration(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ETag? etag = default(Azure.ETag?), string privateIPAddress = null, Azure.ResourceManager.Network.Models.NetworkIPAllocationMethod? privateIPAllocationMethod = default(Azure.ResourceManager.Network.Models.NetworkIPAllocationMethod?), Azure.ResourceManager.Network.SubnetData subnet = null, bool? primary = default(bool?), Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?), Azure.ResourceManager.Network.Models.NetworkIPVersion? privateIPAddressVersion = default(Azure.ResourceManager.Network.Models.NetworkIPVersion?)) { throw null; } public static Azure.ResourceManager.Network.Models.PrivateLinkServiceVisibility PrivateLinkServiceVisibility(bool? visible = default(bool?)) { throw null; } - public static Azure.ResourceManager.Network.ProbeData ProbeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable loadBalancingRules = null, Azure.ResourceManager.Network.Models.ProbeProtocol? protocol = default(Azure.ResourceManager.Network.Models.ProbeProtocol?), int? port = default(int?), int? intervalInSeconds = default(int?), int? numberOfProbes = default(int?), int? probeThreshold = default(int?), string requestPath = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?)) { throw null; } + public static Azure.ResourceManager.Network.ProbeData ProbeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable loadBalancingRules = null, Azure.ResourceManager.Network.Models.ProbeProtocol? protocol = default(Azure.ResourceManager.Network.Models.ProbeProtocol?), int? port = default(int?), int? intervalInSeconds = default(int?), Azure.ResourceManager.Network.Models.ProbeNoHealthyBackendsBehavior? noHealthyBackendsBehavior = default(Azure.ResourceManager.Network.Models.ProbeNoHealthyBackendsBehavior?), int? numberOfProbes = default(int?), int? probeThreshold = default(int?), string requestPath = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.Network.ProbeData ProbeData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType? resourceType, Azure.ETag? etag, System.Collections.Generic.IEnumerable loadBalancingRules, Azure.ResourceManager.Network.Models.ProbeProtocol? protocol, int? port, int? intervalInSeconds, int? numberOfProbes, int? probeThreshold, string requestPath, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState) { throw null; } public static Azure.ResourceManager.Network.PublicIPAddressData PublicIPAddressData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, Azure.ResourceManager.Network.Models.PublicIPAddressSku sku = null, Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable zones = null, Azure.ResourceManager.Network.Models.NetworkIPAllocationMethod? publicIPAllocationMethod = default(Azure.ResourceManager.Network.Models.NetworkIPAllocationMethod?), Azure.ResourceManager.Network.Models.NetworkIPVersion? publicIPAddressVersion = default(Azure.ResourceManager.Network.Models.NetworkIPVersion?), Azure.ResourceManager.Network.Models.NetworkIPConfiguration ipConfiguration = null, Azure.ResourceManager.Network.Models.PublicIPAddressDnsSettings dnsSettings = null, Azure.ResourceManager.Network.Models.DdosSettings ddosSettings = null, System.Collections.Generic.IEnumerable ipTags = null, string ipAddress = null, Azure.Core.ResourceIdentifier publicIPPrefixId = null, int? idleTimeoutInMinutes = default(int?), System.Guid? resourceGuid = default(System.Guid?), Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?), Azure.ResourceManager.Network.PublicIPAddressData servicePublicIPAddress = null, Azure.ResourceManager.Network.NatGatewayData natGateway = null, Azure.ResourceManager.Network.Models.PublicIPAddressMigrationPhase? migrationPhase = default(Azure.ResourceManager.Network.Models.PublicIPAddressMigrationPhase?), Azure.ResourceManager.Network.PublicIPAddressData linkedPublicIPAddress = null, Azure.ResourceManager.Network.Models.IPAddressDeleteOption? deleteOption = default(Azure.ResourceManager.Network.Models.IPAddressDeleteOption?)) { throw null; } public static Azure.ResourceManager.Network.Models.PublicIPDdosProtectionStatusResult PublicIPDdosProtectionStatusResult(Azure.Core.ResourceIdentifier publicIPAddressId = null, System.Net.IPAddress publicIPAddress = null, Azure.ResourceManager.Network.Models.WorkloadProtectedFlag? isWorkloadProtected = default(Azure.ResourceManager.Network.Models.WorkloadProtectedFlag?), Azure.Core.ResourceIdentifier ddosProtectionPlanId = null) { throw null; } public static Azure.ResourceManager.Network.PublicIPPrefixData PublicIPPrefixData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, Azure.ResourceManager.Network.Models.PublicIPPrefixSku sku = null, Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable zones = null, Azure.ResourceManager.Network.Models.NetworkIPVersion? publicIPAddressVersion = default(Azure.ResourceManager.Network.Models.NetworkIPVersion?), System.Collections.Generic.IEnumerable ipTags = null, int? prefixLength = default(int?), string ipPrefix = null, System.Collections.Generic.IEnumerable publicIPAddresses = null, Azure.Core.ResourceIdentifier loadBalancerFrontendIPConfigurationId = null, Azure.Core.ResourceIdentifier customIPPrefixId = null, System.Guid? resourceGuid = default(System.Guid?), Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?), Azure.ResourceManager.Network.NatGatewayData natGateway = null) { throw null; } @@ -9023,7 +9103,9 @@ public static partial class ArmNetworkModelFactory public static Azure.ResourceManager.Network.Models.ServiceDelegation ServiceDelegation(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ETag? etag = default(Azure.ETag?), string serviceName = null, System.Collections.Generic.IEnumerable actions = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?)) { throw null; } public static Azure.ResourceManager.Network.ServiceEndpointPolicyData ServiceEndpointPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null, Azure.ETag? etag = default(Azure.ETag?), string kind = null, System.Collections.Generic.IEnumerable serviceEndpointPolicyDefinitions = null, System.Collections.Generic.IEnumerable subnets = null, System.Guid? resourceGuid = default(System.Guid?), Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?), string serviceAlias = null, System.Collections.Generic.IEnumerable contextualServiceEndpointPolicies = null) { throw null; } public static Azure.ResourceManager.Network.ServiceEndpointPolicyDefinitionData ServiceEndpointPolicyDefinitionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ETag? etag = default(Azure.ETag?), string description = null, string service = null, System.Collections.Generic.IEnumerable serviceResources = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?)) { throw null; } - public static Azure.ResourceManager.Network.Models.ServiceEndpointProperties ServiceEndpointProperties(string service = null, System.Collections.Generic.IEnumerable locations = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?)) { throw null; } + public static Azure.ResourceManager.Network.Models.ServiceEndpointProperties ServiceEndpointProperties(string service = null, Azure.Core.ResourceIdentifier networkIdentifierId = null, System.Collections.Generic.IEnumerable locations = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.Network.Models.ServiceEndpointProperties ServiceEndpointProperties(string service, System.Collections.Generic.IEnumerable locations, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState) { throw null; } public static Azure.ResourceManager.Network.Models.ServiceTagInformation ServiceTagInformation(Azure.ResourceManager.Network.Models.ServiceTagInformationPropertiesFormat properties = null, string name = null, string id = null, string serviceTagChangeNumber = null) { throw null; } public static Azure.ResourceManager.Network.Models.ServiceTagInformationPropertiesFormat ServiceTagInformationPropertiesFormat(string changeNumber = null, string region = null, string systemService = null, System.Collections.Generic.IEnumerable addressPrefixes = null, string state = null) { throw null; } public static Azure.ResourceManager.Network.Models.ServiceTagsListResult ServiceTagsListResult(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string changeNumber = null, string cloud = null, System.Collections.Generic.IEnumerable values = null, string nextLink = null) { throw null; } @@ -9056,7 +9138,9 @@ public static partial class ArmNetworkModelFactory public static Azure.ResourceManager.Network.VirtualNetworkData VirtualNetworkData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable addressPrefixes = null, System.Collections.Generic.IEnumerable dhcpOptionsDnsServers = null, int? flowTimeoutInMinutes = default(int?), System.Collections.Generic.IEnumerable subnets = null, System.Collections.Generic.IEnumerable virtualNetworkPeerings = null, System.Guid? resourceGuid = default(System.Guid?), Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?), bool? enableDdosProtection = default(bool?), bool? enableVmProtection = default(bool?), Azure.Core.ResourceIdentifier ddosProtectionPlanId = null, Azure.ResourceManager.Network.Models.VirtualNetworkBgpCommunities bgpCommunities = null, Azure.ResourceManager.Network.Models.VirtualNetworkEncryption encryption = null, System.Collections.Generic.IEnumerable ipAllocations = null, System.Collections.Generic.IEnumerable flowLogs = null) { throw null; } public static Azure.ResourceManager.Network.VirtualNetworkGatewayConnectionData VirtualNetworkGatewayConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null, Azure.ETag? etag = default(Azure.ETag?), string authorizationKey = null, Azure.ResourceManager.Network.VirtualNetworkGatewayData virtualNetworkGateway1 = null, Azure.ResourceManager.Network.VirtualNetworkGatewayData virtualNetworkGateway2 = null, Azure.ResourceManager.Network.LocalNetworkGatewayData localNetworkGateway2 = null, System.Collections.Generic.IEnumerable ingressNatRules = null, System.Collections.Generic.IEnumerable egressNatRules = null, Azure.ResourceManager.Network.Models.VirtualNetworkGatewayConnectionType connectionType = default(Azure.ResourceManager.Network.Models.VirtualNetworkGatewayConnectionType), Azure.ResourceManager.Network.Models.VirtualNetworkGatewayConnectionProtocol? connectionProtocol = default(Azure.ResourceManager.Network.Models.VirtualNetworkGatewayConnectionProtocol?), int? routingWeight = default(int?), int? dpdTimeoutSeconds = default(int?), Azure.ResourceManager.Network.Models.VirtualNetworkGatewayConnectionMode? connectionMode = default(Azure.ResourceManager.Network.Models.VirtualNetworkGatewayConnectionMode?), string sharedKey = null, Azure.ResourceManager.Network.Models.VirtualNetworkGatewayConnectionStatus? connectionStatus = default(Azure.ResourceManager.Network.Models.VirtualNetworkGatewayConnectionStatus?), System.Collections.Generic.IEnumerable tunnelConnectionStatus = null, long? egressBytesTransferred = default(long?), long? ingressBytesTransferred = default(long?), Azure.Core.ResourceIdentifier peerId = null, bool? enableBgp = default(bool?), System.Collections.Generic.IEnumerable gatewayCustomBgpIPAddresses = null, bool? useLocalAzureIPAddress = default(bool?), bool? usePolicyBasedTrafficSelectors = default(bool?), System.Collections.Generic.IEnumerable ipsecPolicies = null, System.Collections.Generic.IEnumerable trafficSelectorPolicies = null, System.Guid? resourceGuid = default(System.Guid?), Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?), bool? expressRouteGatewayBypass = default(bool?), bool? enablePrivateLinkFastPath = default(bool?)) { throw null; } public static Azure.ResourceManager.Network.Models.VirtualNetworkGatewayConnectionListEntity VirtualNetworkGatewayConnectionListEntity(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null, Azure.ETag? etag = default(Azure.ETag?), string authorizationKey = null, Azure.Core.ResourceIdentifier virtualNetworkGateway1Id = null, Azure.Core.ResourceIdentifier virtualNetworkGateway2Id = null, Azure.Core.ResourceIdentifier localNetworkGateway2Id = null, Azure.ResourceManager.Network.Models.VirtualNetworkGatewayConnectionType connectionType = default(Azure.ResourceManager.Network.Models.VirtualNetworkGatewayConnectionType), Azure.ResourceManager.Network.Models.VirtualNetworkGatewayConnectionProtocol? connectionProtocol = default(Azure.ResourceManager.Network.Models.VirtualNetworkGatewayConnectionProtocol?), int? routingWeight = default(int?), Azure.ResourceManager.Network.Models.VirtualNetworkGatewayConnectionMode? connectionMode = default(Azure.ResourceManager.Network.Models.VirtualNetworkGatewayConnectionMode?), string sharedKey = null, Azure.ResourceManager.Network.Models.VirtualNetworkGatewayConnectionStatus? connectionStatus = default(Azure.ResourceManager.Network.Models.VirtualNetworkGatewayConnectionStatus?), System.Collections.Generic.IEnumerable tunnelConnectionStatus = null, long? egressBytesTransferred = default(long?), long? ingressBytesTransferred = default(long?), Azure.Core.ResourceIdentifier peerId = null, bool? enableBgp = default(bool?), System.Collections.Generic.IEnumerable gatewayCustomBgpIPAddresses = null, bool? usePolicyBasedTrafficSelectors = default(bool?), System.Collections.Generic.IEnumerable ipsecPolicies = null, System.Collections.Generic.IEnumerable trafficSelectorPolicies = null, System.Guid? resourceGuid = default(System.Guid?), Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?), bool? expressRouteGatewayBypass = default(bool?), bool? enablePrivateLinkFastPath = default(bool?)) { throw null; } - public static Azure.ResourceManager.Network.VirtualNetworkGatewayData VirtualNetworkGatewayData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.Network.Models.VirtualNetworkGatewayAutoScaleBounds autoScaleBounds = null, System.Collections.Generic.IEnumerable ipConfigurations = null, Azure.ResourceManager.Network.Models.VirtualNetworkGatewayType? gatewayType = default(Azure.ResourceManager.Network.Models.VirtualNetworkGatewayType?), Azure.ResourceManager.Network.Models.VpnType? vpnType = default(Azure.ResourceManager.Network.Models.VpnType?), Azure.ResourceManager.Network.Models.VpnGatewayGeneration? vpnGatewayGeneration = default(Azure.ResourceManager.Network.Models.VpnGatewayGeneration?), bool? enableBgp = default(bool?), bool? enablePrivateIPAddress = default(bool?), bool? active = default(bool?), bool? disableIPSecReplayProtection = default(bool?), Azure.Core.ResourceIdentifier gatewayDefaultSiteId = null, Azure.ResourceManager.Network.Models.VirtualNetworkGatewaySku sku = null, Azure.ResourceManager.Network.Models.VpnClientConfiguration vpnClientConfiguration = null, System.Collections.Generic.IEnumerable virtualNetworkGatewayPolicyGroups = null, Azure.ResourceManager.Network.Models.BgpSettings bgpSettings = null, System.Collections.Generic.IEnumerable customRoutesAddressPrefixes = null, System.Guid? resourceGuid = default(System.Guid?), Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?), bool? enableDnsForwarding = default(bool?), string inboundDnsForwardingEndpoint = null, Azure.Core.ResourceIdentifier vNetExtendedLocationResourceId = null, System.Collections.Generic.IEnumerable natRules = null, bool? enableBgpRouteTranslationForNat = default(bool?), bool? allowVirtualWanTraffic = default(bool?), bool? allowRemoteVnetTraffic = default(bool?), Azure.ResourceManager.Network.Models.ExpressRouteGatewayAdminState? adminState = default(Azure.ResourceManager.Network.Models.ExpressRouteGatewayAdminState?)) { throw null; } + public static Azure.ResourceManager.Network.VirtualNetworkGatewayData VirtualNetworkGatewayData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Network.Models.VirtualNetworkGatewayAutoScaleBounds autoScaleBounds = null, System.Collections.Generic.IEnumerable ipConfigurations = null, Azure.ResourceManager.Network.Models.VirtualNetworkGatewayType? gatewayType = default(Azure.ResourceManager.Network.Models.VirtualNetworkGatewayType?), Azure.ResourceManager.Network.Models.VpnType? vpnType = default(Azure.ResourceManager.Network.Models.VpnType?), Azure.ResourceManager.Network.Models.VpnGatewayGeneration? vpnGatewayGeneration = default(Azure.ResourceManager.Network.Models.VpnGatewayGeneration?), bool? enableBgp = default(bool?), bool? enablePrivateIPAddress = default(bool?), bool? active = default(bool?), bool? disableIPSecReplayProtection = default(bool?), Azure.Core.ResourceIdentifier gatewayDefaultSiteId = null, Azure.ResourceManager.Network.Models.VirtualNetworkGatewaySku sku = null, Azure.ResourceManager.Network.Models.VpnClientConfiguration vpnClientConfiguration = null, System.Collections.Generic.IEnumerable virtualNetworkGatewayPolicyGroups = null, Azure.ResourceManager.Network.Models.BgpSettings bgpSettings = null, System.Collections.Generic.IEnumerable customRoutesAddressPrefixes = null, System.Guid? resourceGuid = default(System.Guid?), Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?), bool? enableDnsForwarding = default(bool?), string inboundDnsForwardingEndpoint = null, Azure.Core.ResourceIdentifier vNetExtendedLocationResourceId = null, System.Collections.Generic.IEnumerable natRules = null, bool? enableBgpRouteTranslationForNat = default(bool?), bool? allowVirtualWanTraffic = default(bool?), bool? allowRemoteVnetTraffic = default(bool?), Azure.ResourceManager.Network.Models.ExpressRouteGatewayAdminState? adminState = default(Azure.ResourceManager.Network.Models.ExpressRouteGatewayAdminState?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.Network.VirtualNetworkGatewayData VirtualNetworkGatewayData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType? resourceType, Azure.Core.AzureLocation? location, System.Collections.Generic.IDictionary tags, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation, Azure.ETag? etag, Azure.ResourceManager.Network.Models.VirtualNetworkGatewayAutoScaleBounds autoScaleBounds, System.Collections.Generic.IEnumerable ipConfigurations, Azure.ResourceManager.Network.Models.VirtualNetworkGatewayType? gatewayType, Azure.ResourceManager.Network.Models.VpnType? vpnType, Azure.ResourceManager.Network.Models.VpnGatewayGeneration? vpnGatewayGeneration, bool? enableBgp, bool? enablePrivateIPAddress, bool? active, bool? disableIPSecReplayProtection, Azure.Core.ResourceIdentifier gatewayDefaultSiteId, Azure.ResourceManager.Network.Models.VirtualNetworkGatewaySku sku, Azure.ResourceManager.Network.Models.VpnClientConfiguration vpnClientConfiguration, System.Collections.Generic.IEnumerable virtualNetworkGatewayPolicyGroups, Azure.ResourceManager.Network.Models.BgpSettings bgpSettings, System.Collections.Generic.IEnumerable customRoutesAddressPrefixes, System.Guid? resourceGuid, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState, bool? enableDnsForwarding, string inboundDnsForwardingEndpoint, Azure.Core.ResourceIdentifier vNetExtendedLocationResourceId, System.Collections.Generic.IEnumerable natRules, bool? enableBgpRouteTranslationForNat, bool? allowVirtualWanTraffic, bool? allowRemoteVnetTraffic, Azure.ResourceManager.Network.Models.ExpressRouteGatewayAdminState? adminState) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.Network.VirtualNetworkGatewayData VirtualNetworkGatewayData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType? resourceType, Azure.Core.AzureLocation? location, System.Collections.Generic.IDictionary tags, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation, Azure.ETag? etag, System.Collections.Generic.IEnumerable ipConfigurations, Azure.ResourceManager.Network.Models.VirtualNetworkGatewayType? gatewayType, Azure.ResourceManager.Network.Models.VpnType? vpnType, Azure.ResourceManager.Network.Models.VpnGatewayGeneration? vpnGatewayGeneration, bool? enableBgp, bool? enablePrivateIPAddress, bool? active, bool? disableIPSecReplayProtection, Azure.Core.ResourceIdentifier gatewayDefaultSiteId, Azure.ResourceManager.Network.Models.VirtualNetworkGatewaySku sku, Azure.ResourceManager.Network.Models.VpnClientConfiguration vpnClientConfiguration, System.Collections.Generic.IEnumerable virtualNetworkGatewayPolicyGroups, Azure.ResourceManager.Network.Models.BgpSettings bgpSettings, System.Collections.Generic.IEnumerable customRoutesAddressPrefixes, System.Guid? resourceGuid, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState, bool? enableDnsForwarding, string inboundDnsForwardingEndpoint, Azure.Core.ResourceIdentifier vNetExtendedLocationResourceId, System.Collections.Generic.IEnumerable natRules, bool? enableBgpRouteTranslationForNat, bool? allowVirtualWanTraffic, bool? allowRemoteVnetTraffic, Azure.ResourceManager.Network.Models.ExpressRouteGatewayAdminState? adminState) { throw null; } public static Azure.ResourceManager.Network.Models.VirtualNetworkGatewayIPConfiguration VirtualNetworkGatewayIPConfiguration(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.Network.Models.NetworkIPAllocationMethod? privateIPAllocationMethod = default(Azure.ResourceManager.Network.Models.NetworkIPAllocationMethod?), Azure.Core.ResourceIdentifier subnetId = null, Azure.Core.ResourceIdentifier publicIPAddressId = null, string privateIPAddress = null, Azure.ResourceManager.Network.Models.NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.Network.Models.NetworkProvisioningState?)) { throw null; } @@ -9711,6 +9795,7 @@ public BastionHostIPRule() { } public BastionHostSkuName(string value) { throw null; } public static Azure.ResourceManager.Network.Models.BastionHostSkuName Basic { get { throw null; } } public static Azure.ResourceManager.Network.Models.BastionHostSkuName Developer { get { throw null; } } + public static Azure.ResourceManager.Network.Models.BastionHostSkuName Premium { get { throw null; } } public static Azure.ResourceManager.Network.Models.BastionHostSkuName Standard { get { throw null; } } public bool Equals(Azure.ResourceManager.Network.Models.BastionHostSkuName other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -11522,6 +11607,7 @@ public ExpressRouteServiceProviderBandwidthsOffered() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public partial class FirewallPacketCaptureContent : Azure.ResourceManager.Network.Models.NetworkSubResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public FirewallPacketCaptureContent() { } @@ -11538,6 +11624,22 @@ public FirewallPacketCaptureContent() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class FirewallPacketCaptureRequestContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FirewallPacketCaptureRequestContent() { } + public int? DurationInSeconds { get { throw null; } set { } } + public string FileName { get { throw null; } set { } } + public System.Collections.Generic.IList Filters { get { throw null; } } + public System.Collections.Generic.IList Flags { get { throw null; } } + public int? NumberOfPacketsToCapture { get { throw null; } set { } } + public Azure.ResourceManager.Network.Models.AzureFirewallNetworkRuleProtocol? Protocol { get { throw null; } set { } } + public System.Uri SasUri { get { throw null; } set { } } + Azure.ResourceManager.Network.Models.FirewallPacketCaptureRequestContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Network.Models.FirewallPacketCaptureRequestContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class FirewallPolicyCertificateAuthority : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public FirewallPolicyCertificateAuthority() { } @@ -11949,6 +12051,7 @@ public partial class FlowLogInformation : System.ClientModel.Primitives.IJsonMod public FlowLogInformation(Azure.Core.ResourceIdentifier targetResourceId, Azure.Core.ResourceIdentifier storageId, bool enabled) { } public bool Enabled { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.FlowLogProperties Format { get { throw null; } set { } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.RetentionPolicyParameters RetentionPolicy { get { throw null; } set { } } public Azure.Core.ResourceIdentifier StorageId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier TargetResourceId { get { throw null; } set { } } @@ -12402,6 +12505,7 @@ internal InboundNatRulePortMapping() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public partial class InboundSecurityRule : Azure.ResourceManager.Network.Models.NetworkResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public InboundSecurityRule() { } @@ -12409,6 +12513,7 @@ public InboundSecurityRule() { } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public System.Collections.Generic.IList Rules { get { throw null; } } public Azure.ResourceManager.Network.Models.InboundSecurityRuleType? RuleType { get { throw null; } set { } } + public static implicit operator Azure.ResourceManager.Network.InboundSecurityRuleData (Azure.ResourceManager.Network.Models.InboundSecurityRule r) { throw null; } Azure.ResourceManager.Network.Models.InboundSecurityRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Network.Models.InboundSecurityRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -14452,6 +14557,24 @@ internal PrivateLinkServiceVisibility() { } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProbeNoHealthyBackendsBehavior : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProbeNoHealthyBackendsBehavior(string value) { throw null; } + public static Azure.ResourceManager.Network.Models.ProbeNoHealthyBackendsBehavior AllProbedDown { get { throw null; } } + public static Azure.ResourceManager.Network.Models.ProbeNoHealthyBackendsBehavior AllProbedUp { get { throw null; } } + public bool Equals(Azure.ResourceManager.Network.Models.ProbeNoHealthyBackendsBehavior 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.Network.Models.ProbeNoHealthyBackendsBehavior left, Azure.ResourceManager.Network.Models.ProbeNoHealthyBackendsBehavior right) { throw null; } + public static implicit operator Azure.ResourceManager.Network.Models.ProbeNoHealthyBackendsBehavior (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Network.Models.ProbeNoHealthyBackendsBehavior left, Azure.ResourceManager.Network.Models.ProbeNoHealthyBackendsBehavior right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ProbeProtocol : System.IEquatable { private readonly object _dummy; @@ -15341,6 +15464,7 @@ public partial class ServiceEndpointProperties : System.ClientModel.Primitives.I { public ServiceEndpointProperties() { } public System.Collections.Generic.IList Locations { get { throw null; } } + public Azure.Core.ResourceIdentifier NetworkIdentifierId { get { throw null; } set { } } public Azure.ResourceManager.Network.Models.NetworkProvisioningState? ProvisioningState { get { throw null; } } public string Service { get { throw null; } set { } } Azure.ResourceManager.Network.Models.ServiceEndpointProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_AdminRuleGroupCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_AdminRuleGroupCollection.cs index 34264d1b28e88..7bcda239edbe8 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_AdminRuleGroupCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_AdminRuleGroupCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_AdminRuleGroupCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListSecurityAdminRuleCollections() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerAdminRuleCollectionList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerAdminRuleCollectionList.json // this example is just showing the usage of "AdminRuleCollections_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task GetAll_ListSecurityAdminRuleCollections() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsSecurityAdminRuleCollection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerAdminRuleCollectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerAdminRuleCollectionGet.json // this example is just showing the usage of "AdminRuleCollections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -94,7 +94,7 @@ public async Task Get_GetsSecurityAdminRuleCollection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetsSecurityAdminRuleCollection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerAdminRuleCollectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerAdminRuleCollectionGet.json // this example is just showing the usage of "AdminRuleCollections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task Exists_GetsSecurityAdminRuleCollection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetsSecurityAdminRuleCollection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerAdminRuleCollectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerAdminRuleCollectionGet.json // this example is just showing the usage of "AdminRuleCollections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -170,7 +170,7 @@ public async Task GetIfExists_GetsSecurityAdminRuleCollection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateAnAdminRuleCollection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerAdminRuleCollectionPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerAdminRuleCollectionPut.json // this example is just showing the usage of "AdminRuleCollections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_AdminRuleGroupResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_AdminRuleGroupResource.cs index 1271e000fba10..4b22addac0650 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_AdminRuleGroupResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_AdminRuleGroupResource.cs @@ -20,7 +20,7 @@ public partial class Sample_AdminRuleGroupResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsSecurityAdminRuleCollection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerAdminRuleCollectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerAdminRuleCollectionGet.json // this example is just showing the usage of "AdminRuleCollections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Get_GetsSecurityAdminRuleCollection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateAnAdminRuleCollection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerAdminRuleCollectionPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerAdminRuleCollectionPut.json // this example is just showing the usage of "AdminRuleCollections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task Update_CreateOrUpdateAnAdminRuleCollection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeletesAnAdminRuleCollection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerAdminRuleCollectionDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerAdminRuleCollectionDelete.json // this example is just showing the usage of "AdminRuleCollections_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ApplicationGatewayCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ApplicationGatewayCollection.cs index b035f4099e949..f713a0e96adaa 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ApplicationGatewayCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ApplicationGatewayCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_ApplicationGatewayCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetApplicationGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationGatewayGet.json // this example is just showing the usage of "ApplicationGateways_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task Get_GetApplicationGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetApplicationGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationGatewayGet.json // this example is just showing the usage of "ApplicationGateways_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -87,7 +87,7 @@ public async Task Exists_GetApplicationGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetApplicationGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationGatewayGet.json // this example is just showing the usage of "ApplicationGateways_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetIfExists_GetApplicationGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateApplicationGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationGatewayCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationGatewayCreate.json // this example is just showing the usage of "ApplicationGateways_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -396,7 +396,7 @@ public async Task CreateOrUpdate_CreateApplicationGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListsAllApplicationGatewaysInAResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationGatewayList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationGatewayList.json // this example is just showing the usage of "ApplicationGateways_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ApplicationGatewayPrivateEndpointConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ApplicationGatewayPrivateEndpointConnectionCollection.cs index 5d82d3fb2d0c8..35bfe70e71fc8 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ApplicationGatewayPrivateEndpointConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ApplicationGatewayPrivateEndpointConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApplicationGatewayPrivateEndpointConnectionCollectio [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_UpdateApplicationGatewayPrivateEndpointConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationGatewayPrivateEndpointConnectionUpdate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationGatewayPrivateEndpointConnectionUpdate.json // this example is just showing the usage of "ApplicationGatewayPrivateEndpointConnections_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -65,7 +65,7 @@ public async Task CreateOrUpdate_UpdateApplicationGatewayPrivateEndpointConnecti [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetApplicationGatewayPrivateEndpointConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json // this example is just showing the usage of "ApplicationGatewayPrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -100,7 +100,7 @@ public async Task Get_GetApplicationGatewayPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetApplicationGatewayPrivateEndpointConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json // this example is just showing the usage of "ApplicationGatewayPrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -131,7 +131,7 @@ public async Task Exists_GetApplicationGatewayPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetApplicationGatewayPrivateEndpointConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json // this example is just showing the usage of "ApplicationGatewayPrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -174,7 +174,7 @@ public async Task GetIfExists_GetApplicationGatewayPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListsAllPrivateEndpointConnectionsOnApplicationGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationGatewayPrivateEndpointConnectionList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationGatewayPrivateEndpointConnectionList.json // this example is just showing the usage of "ApplicationGatewayPrivateEndpointConnections_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ApplicationGatewayPrivateEndpointConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ApplicationGatewayPrivateEndpointConnectionResource.cs index f1266b95f0480..72ec21d23363e 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ApplicationGatewayPrivateEndpointConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ApplicationGatewayPrivateEndpointConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApplicationGatewayPrivateEndpointConnectionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteApplicationGatewayPrivateEndpointConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationGatewayPrivateEndpointConnectionDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationGatewayPrivateEndpointConnectionDelete.json // this example is just showing the usage of "ApplicationGatewayPrivateEndpointConnections_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Delete_DeleteApplicationGatewayPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateApplicationGatewayPrivateEndpointConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationGatewayPrivateEndpointConnectionUpdate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationGatewayPrivateEndpointConnectionUpdate.json // this example is just showing the usage of "ApplicationGatewayPrivateEndpointConnections_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,7 +90,7 @@ public async Task Update_UpdateApplicationGatewayPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetApplicationGatewayPrivateEndpointConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json // this example is just showing the usage of "ApplicationGatewayPrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ApplicationGatewayResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ApplicationGatewayResource.cs index 3665226f618ee..1c003429fdd2f 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ApplicationGatewayResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ApplicationGatewayResource.cs @@ -21,7 +21,7 @@ public partial class Sample_ApplicationGatewayResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteApplicationGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationGatewayDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationGatewayDelete.json // this example is just showing the usage of "ApplicationGateways_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Delete_DeleteApplicationGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetApplicationGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationGatewayGet.json // this example is just showing the usage of "ApplicationGateways_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +79,7 @@ public async Task Get_GetApplicationGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateApplicationGatewayTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationGatewayUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationGatewayUpdateTags.json // this example is just showing the usage of "ApplicationGateways_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task Update_UpdateApplicationGatewayTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetApplicationGateways_ListsAllApplicationGatewaysInASubscription() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationGatewayListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationGatewayListAll.json // this example is just showing the usage of "ApplicationGateways_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -150,7 +150,7 @@ public async Task GetApplicationGateways_ListsAllApplicationGatewaysInASubscript [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Start_StartApplicationGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationGatewayStart.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationGatewayStart.json // this example is just showing the usage of "ApplicationGateways_Start" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -177,7 +177,7 @@ public async Task Start_StartApplicationGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Stop_StopApplicationGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationGatewayStop.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationGatewayStop.json // this example is just showing the usage of "ApplicationGateways_Stop" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -204,7 +204,7 @@ public async Task Stop_StopApplicationGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task BackendHealth_GetBackendHealth() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationGatewayBackendHealthGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationGatewayBackendHealthGet.json // this example is just showing the usage of "ApplicationGateways_BackendHealth" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -232,7 +232,7 @@ public async Task BackendHealth_GetBackendHealth() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task BackendHealthOnDemand_TestBackendHealth() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationGatewayBackendHealthTest.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationGatewayBackendHealthTest.json // this example is just showing the usage of "ApplicationGateways_BackendHealthOnDemand" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -269,7 +269,7 @@ public async Task BackendHealthOnDemand_TestBackendHealth() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAvailableServerVariablesApplicationGateways_GetAvailableServerVariables() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationGatewayAvailableServerVariablesGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationGatewayAvailableServerVariablesGet.json // this example is just showing the usage of "ApplicationGateways_ListAvailableServerVariables" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -297,7 +297,7 @@ public async Task GetAvailableServerVariablesApplicationGateways_GetAvailableSer [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAvailableRequestHeadersApplicationGateways_GetAvailableRequestHeaders() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationGatewayAvailableRequestHeadersGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationGatewayAvailableRequestHeadersGet.json // this example is just showing the usage of "ApplicationGateways_ListAvailableRequestHeaders" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -325,7 +325,7 @@ public async Task GetAvailableRequestHeadersApplicationGateways_GetAvailableRequ [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAvailableResponseHeadersApplicationGateways_GetAvailableResponseHeaders() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationGatewayAvailableResponseHeadersGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationGatewayAvailableResponseHeadersGet.json // this example is just showing the usage of "ApplicationGateways_ListAvailableResponseHeaders" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -353,7 +353,7 @@ public async Task GetAvailableResponseHeadersApplicationGateways_GetAvailableRes [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAppGatewayAvailableWafRuleSets_GetAvailableWafRuleSets() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationGatewayAvailableWafRuleSetsGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationGatewayAvailableWafRuleSetsGet.json // this example is just showing the usage of "ApplicationGateways_ListAvailableWafRuleSets" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -381,7 +381,7 @@ public async Task GetAppGatewayAvailableWafRuleSets_GetAvailableWafRuleSets() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetApplicationGatewayAvailableSslOptions_GetAvailableSslOptions() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationGatewayAvailableSslOptionsGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationGatewayAvailableSslOptionsGet.json // this example is just showing the usage of "ApplicationGateways_ListAvailableSslOptions" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -406,7 +406,7 @@ public async Task GetApplicationGatewayAvailableSslOptions_GetAvailableSslOption [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetApplicationGatewayAvailableSslPredefinedPolicies_GetAvailableSslPredefinedPolicies() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPoliciesGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPoliciesGet.json // this example is just showing the usage of "ApplicationGateways_ListAvailableSslPredefinedPolicies" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -434,7 +434,7 @@ public async Task GetApplicationGatewayAvailableSslPredefinedPolicies_GetAvailab [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetApplicationGatewaySslPredefinedPolicy_GetAvailableSslPredefinedPolicyByName() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPolicyGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationGatewayAvailableSslOptionsPredefinedPolicyGet.json // this example is just showing the usage of "ApplicationGateways_GetSslPredefinedPolicy" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -460,7 +460,7 @@ public async Task GetApplicationGatewaySslPredefinedPolicy_GetAvailableSslPredef [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetApplicationGatewayPrivateLinkResources_ListsAllPrivateLinkResourcesOnApplicationGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationGatewayPrivateLinkResourceList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationGatewayPrivateLinkResourceList.json // this example is just showing the usage of "ApplicationGatewayPrivateLinkResources_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ApplicationGatewayWafDynamicManifestCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ApplicationGatewayWafDynamicManifestCollection.cs index 14b8cd9cee1ec..4c369af59ecf0 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ApplicationGatewayWafDynamicManifestCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ApplicationGatewayWafDynamicManifestCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApplicationGatewayWafDynamicManifestCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsWAFDefaultManifest() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json // this example is just showing the usage of "ApplicationGatewayWafDynamicManifestsDefault_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Get_GetsWAFDefaultManifest() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetsWAFDefaultManifest() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json // this example is just showing the usage of "ApplicationGatewayWafDynamicManifestsDefault_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task Exists_GetsWAFDefaultManifest() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetsWAFDefaultManifest() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json // this example is just showing the usage of "ApplicationGatewayWafDynamicManifestsDefault_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task GetIfExists_GetsWAFDefaultManifest() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetsWAFManifests() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/GetApplicationGatewayWafDynamicManifests.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/GetApplicationGatewayWafDynamicManifests.json // this example is just showing the usage of "ApplicationGatewayWafDynamicManifests_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ApplicationGatewayWafDynamicManifestResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ApplicationGatewayWafDynamicManifestResource.cs index d3c4d0d58690c..90086b6fa2743 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ApplicationGatewayWafDynamicManifestResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ApplicationGatewayWafDynamicManifestResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApplicationGatewayWafDynamicManifestResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsWAFDefaultManifest() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/GetApplicationGatewayWafDynamicManifestsDefault.json // this example is just showing the usage of "ApplicationGatewayWafDynamicManifestsDefault_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ApplicationSecurityGroupCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ApplicationSecurityGroupCollection.cs index 641ad1ca739bf..fd88429518063 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ApplicationSecurityGroupCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ApplicationSecurityGroupCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApplicationSecurityGroupCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetApplicationSecurityGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationSecurityGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationSecurityGroupGet.json // this example is just showing the usage of "ApplicationSecurityGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_GetApplicationSecurityGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetApplicationSecurityGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationSecurityGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationSecurityGroupGet.json // this example is just showing the usage of "ApplicationSecurityGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Exists_GetApplicationSecurityGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetApplicationSecurityGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationSecurityGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationSecurityGroupGet.json // this example is just showing the usage of "ApplicationSecurityGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task GetIfExists_GetApplicationSecurityGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateApplicationSecurityGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationSecurityGroupCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationSecurityGroupCreate.json // this example is just showing the usage of "ApplicationSecurityGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -165,7 +165,7 @@ public async Task CreateOrUpdate_CreateApplicationSecurityGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListLoadBalancersInResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationSecurityGroupList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationSecurityGroupList.json // this example is just showing the usage of "ApplicationSecurityGroups_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ApplicationSecurityGroupResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ApplicationSecurityGroupResource.cs index 3c2879d18052c..2cdba3b72c73c 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ApplicationSecurityGroupResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ApplicationSecurityGroupResource.cs @@ -21,7 +21,7 @@ public partial class Sample_ApplicationSecurityGroupResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteApplicationSecurityGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationSecurityGroupDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationSecurityGroupDelete.json // this example is just showing the usage of "ApplicationSecurityGroups_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Delete_DeleteApplicationSecurityGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetApplicationSecurityGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationSecurityGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationSecurityGroupGet.json // this example is just showing the usage of "ApplicationSecurityGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +79,7 @@ public async Task Get_GetApplicationSecurityGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateApplicationSecurityGroupTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationSecurityGroupUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationSecurityGroupUpdateTags.json // this example is just showing the usage of "ApplicationSecurityGroups_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task Update_UpdateApplicationSecurityGroupTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetApplicationSecurityGroups_ListAllApplicationSecurityGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ApplicationSecurityGroupListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ApplicationSecurityGroupListAll.json // this example is just showing the usage of "ApplicationSecurityGroups_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_AzureFirewallCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_AzureFirewallCollection.cs index 9ddbed7091e82..ab150467eb0e2 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_AzureFirewallCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_AzureFirewallCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_AzureFirewallCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAzureFirewall() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureFirewallGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureFirewallGet.json // this example is just showing the usage of "AzureFirewalls_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetAzureFirewall() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAzureFirewall() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureFirewallGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureFirewallGet.json // this example is just showing the usage of "AzureFirewalls_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Exists_GetAzureFirewall() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAzureFirewall() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureFirewallGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureFirewallGet.json // this example is just showing the usage of "AzureFirewalls_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -127,7 +127,7 @@ public async Task GetIfExists_GetAzureFirewall() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAzureFirewallWithAdditionalProperties() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureFirewallGetWithAdditionalProperties.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureFirewallGetWithAdditionalProperties.json // this example is just showing the usage of "AzureFirewalls_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -161,7 +161,7 @@ public async Task Get_GetAzureFirewallWithAdditionalProperties() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAzureFirewallWithAdditionalProperties() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureFirewallGetWithAdditionalProperties.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureFirewallGetWithAdditionalProperties.json // this example is just showing the usage of "AzureFirewalls_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -191,7 +191,7 @@ public async Task Exists_GetAzureFirewallWithAdditionalProperties() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAzureFirewallWithAdditionalProperties() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureFirewallGetWithAdditionalProperties.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureFirewallGetWithAdditionalProperties.json // this example is just showing the usage of "AzureFirewalls_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -233,7 +233,7 @@ public async Task GetIfExists_GetAzureFirewallWithAdditionalProperties() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAzureFirewallWithIpGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureFirewallGetWithIpGroups.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureFirewallGetWithIpGroups.json // this example is just showing the usage of "AzureFirewalls_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -267,7 +267,7 @@ public async Task Get_GetAzureFirewallWithIpGroups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAzureFirewallWithIpGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureFirewallGetWithIpGroups.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureFirewallGetWithIpGroups.json // this example is just showing the usage of "AzureFirewalls_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -297,7 +297,7 @@ public async Task Exists_GetAzureFirewallWithIpGroups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAzureFirewallWithIpGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureFirewallGetWithIpGroups.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureFirewallGetWithIpGroups.json // this example is just showing the usage of "AzureFirewalls_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -339,7 +339,7 @@ public async Task GetIfExists_GetAzureFirewallWithIpGroups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAzureFirewallWithZones() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureFirewallGetWithZones.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureFirewallGetWithZones.json // this example is just showing the usage of "AzureFirewalls_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -373,7 +373,7 @@ public async Task Get_GetAzureFirewallWithZones() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAzureFirewallWithZones() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureFirewallGetWithZones.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureFirewallGetWithZones.json // this example is just showing the usage of "AzureFirewalls_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -403,7 +403,7 @@ public async Task Exists_GetAzureFirewallWithZones() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAzureFirewallWithZones() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureFirewallGetWithZones.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureFirewallGetWithZones.json // this example is just showing the usage of "AzureFirewalls_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -445,7 +445,7 @@ public async Task GetIfExists_GetAzureFirewallWithZones() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAzureFirewallWithManagementSubnet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureFirewallGetWithMgmtSubnet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureFirewallGetWithMgmtSubnet.json // this example is just showing the usage of "AzureFirewalls_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -479,7 +479,7 @@ public async Task Get_GetAzureFirewallWithManagementSubnet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAzureFirewallWithManagementSubnet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureFirewallGetWithMgmtSubnet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureFirewallGetWithMgmtSubnet.json // this example is just showing the usage of "AzureFirewalls_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -509,7 +509,7 @@ public async Task Exists_GetAzureFirewallWithManagementSubnet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAzureFirewallWithManagementSubnet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureFirewallGetWithMgmtSubnet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureFirewallGetWithMgmtSubnet.json // this example is just showing the usage of "AzureFirewalls_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -551,7 +551,7 @@ public async Task GetIfExists_GetAzureFirewallWithManagementSubnet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateAzureFirewall() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureFirewallPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureFirewallPut.json // this example is just showing the usage of "AzureFirewalls_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -755,7 +755,7 @@ public async Task CreateOrUpdate_CreateAzureFirewall() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateAzureFirewallWithAdditionalProperties() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureFirewallPutWithAdditionalProperties.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureFirewallPutWithAdditionalProperties.json // this example is just showing the usage of "AzureFirewalls_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -964,7 +964,7 @@ public async Task CreateOrUpdate_CreateAzureFirewallWithAdditionalProperties() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateAzureFirewallWithIpGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureFirewallPutWithIpGroups.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureFirewallPutWithIpGroups.json // this example is just showing the usage of "AzureFirewalls_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1168,7 +1168,7 @@ public async Task CreateOrUpdate_CreateAzureFirewallWithIpGroups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateAzureFirewallWithZones() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureFirewallPutWithZones.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureFirewallPutWithZones.json // this example is just showing the usage of "AzureFirewalls_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1373,7 +1373,7 @@ public async Task CreateOrUpdate_CreateAzureFirewallWithZones() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateAzureFirewallWithManagementSubnet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureFirewallPutWithMgmtSubnet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureFirewallPutWithMgmtSubnet.json // this example is just showing the usage of "AzureFirewalls_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1583,7 +1583,7 @@ public async Task CreateOrUpdate_CreateAzureFirewallWithManagementSubnet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateAzureFirewallInVirtualHub() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureFirewallPutInHub.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureFirewallPutInHub.json // this example is just showing the usage of "AzureFirewalls_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1647,7 +1647,7 @@ public async Task CreateOrUpdate_CreateAzureFirewallInVirtualHub() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAllAzureFirewallsForAGivenResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureFirewallListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureFirewallListByResourceGroup.json // this example is just showing the usage of "AzureFirewalls_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_AzureFirewallResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_AzureFirewallResource.cs index b6f73bda2da14..d37c15663548f 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_AzureFirewallResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_AzureFirewallResource.cs @@ -21,7 +21,7 @@ public partial class Sample_AzureFirewallResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAzureFirewall() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureFirewallDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureFirewallDelete.json // this example is just showing the usage of "AzureFirewalls_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Delete_DeleteAzureFirewall() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAzureFirewall() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureFirewallGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureFirewallGet.json // this example is just showing the usage of "AzureFirewalls_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +79,7 @@ public async Task Get_GetAzureFirewall() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAzureFirewallWithAdditionalProperties() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureFirewallGetWithAdditionalProperties.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureFirewallGetWithAdditionalProperties.json // this example is just showing the usage of "AzureFirewalls_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -110,7 +110,7 @@ public async Task Get_GetAzureFirewallWithAdditionalProperties() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAzureFirewallWithIpGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureFirewallGetWithIpGroups.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureFirewallGetWithIpGroups.json // this example is just showing the usage of "AzureFirewalls_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -141,7 +141,7 @@ public async Task Get_GetAzureFirewallWithIpGroups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAzureFirewallWithZones() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureFirewallGetWithZones.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureFirewallGetWithZones.json // this example is just showing the usage of "AzureFirewalls_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -172,7 +172,7 @@ public async Task Get_GetAzureFirewallWithZones() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAzureFirewallWithManagementSubnet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureFirewallGetWithMgmtSubnet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureFirewallGetWithMgmtSubnet.json // this example is just showing the usage of "AzureFirewalls_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -203,7 +203,7 @@ public async Task Get_GetAzureFirewallWithManagementSubnet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateAzureFirewallTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureFirewallUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureFirewallUpdateTags.json // this example is just showing the usage of "AzureFirewalls_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -243,7 +243,7 @@ public async Task Update_UpdateAzureFirewallTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAzureFirewalls_ListAllAzureFirewallsForAGivenSubscription() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureFirewallListBySubscription.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureFirewallListBySubscription.json // this example is just showing the usage of "AzureFirewalls_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -275,7 +275,7 @@ public async Task GetAzureFirewalls_ListAllAzureFirewallsForAGivenSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetLearnedPrefixes_AzureFirewallListLearnedPrefixes() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureFirewallListLearnedIPPrefixes.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureFirewallListLearnedIPPrefixes.json // this example is just showing the usage of "AzureFirewalls_ListLearnedPrefixes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -303,7 +303,7 @@ public async Task GetLearnedPrefixes_AzureFirewallListLearnedPrefixes() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task PacketCapture_AzureFirewallPacketCapture() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureFirewallPacketCapture.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureFirewallPacketCapture.json // this example is just showing the usage of "AzureFirewalls_PacketCapture" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -320,7 +320,7 @@ public async Task PacketCapture_AzureFirewallPacketCapture() AzureFirewallResource azureFirewall = client.GetAzureFirewallResource(azureFirewallResourceId); // invoke the operation - FirewallPacketCaptureContent content = new FirewallPacketCaptureContent() + FirewallPacketCaptureRequestContent content = new FirewallPacketCaptureRequestContent() { DurationInSeconds = 300, NumberOfPacketsToCapture = 5000, diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_AzureWebCategoryCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_AzureWebCategoryCollection.cs index 35147813d7f25..45c69d3acc3f5 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_AzureWebCategoryCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_AzureWebCategoryCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_AzureWebCategoryCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAzureWebCategoryByName() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureWebCategoryGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureWebCategoryGet.json // this example is just showing the usage of "WebCategories_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Get_GetAzureWebCategoryByName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAzureWebCategoryByName() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureWebCategoryGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureWebCategoryGet.json // this example is just showing the usage of "WebCategories_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task Exists_GetAzureWebCategoryByName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAzureWebCategoryByName() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureWebCategoryGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureWebCategoryGet.json // this example is just showing the usage of "WebCategories_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task GetIfExists_GetAzureWebCategoryByName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAllAzureWebCategoriesForAGivenSubscription() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureWebCategoriesListBySubscription.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureWebCategoriesListBySubscription.json // this example is just showing the usage of "WebCategories_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_AzureWebCategoryResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_AzureWebCategoryResource.cs index 7cc6f77a00fee..1ccdae6d3bbc6 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_AzureWebCategoryResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_AzureWebCategoryResource.cs @@ -19,7 +19,7 @@ public partial class Sample_AzureWebCategoryResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAzureWebCategoryByName() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureWebCategoryGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureWebCategoryGet.json // this example is just showing the usage of "WebCategories_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BackendAddressPoolCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BackendAddressPoolCollection.cs index a4cebed9f323b..dfb101485613c 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BackendAddressPoolCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BackendAddressPoolCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_BackendAddressPoolCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_LoadBalancerWithBackendAddressPoolContainingBackendAddresses() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LBBackendAddressPoolListWithBackendAddressesPoolType.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LBBackendAddressPoolListWithBackendAddressesPoolType.json // this example is just showing the usage of "LoadBalancerBackendAddressPools_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_LoadBalancerWithBackendAddressPoolContainingBackendAddr [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_LoadBalancerBackendAddressPoolList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerBackendAddressPoolList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerBackendAddressPoolList.json // this example is just showing the usage of "LoadBalancerBackendAddressPools_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -94,7 +94,7 @@ public async Task GetAll_LoadBalancerBackendAddressPoolList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_LoadBalancerWithBackendAddressPoolWithBackendAddresses() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json // this example is just showing the usage of "LoadBalancerBackendAddressPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task Get_LoadBalancerWithBackendAddressPoolWithBackendAddresses() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_LoadBalancerWithBackendAddressPoolWithBackendAddresses() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json // this example is just showing the usage of "LoadBalancerBackendAddressPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -160,7 +160,7 @@ public async Task Exists_LoadBalancerWithBackendAddressPoolWithBackendAddresses( [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_LoadBalancerWithBackendAddressPoolWithBackendAddresses() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json // this example is just showing the usage of "LoadBalancerBackendAddressPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -203,7 +203,7 @@ public async Task GetIfExists_LoadBalancerWithBackendAddressPoolWithBackendAddre [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_LoadBalancerBackendAddressPoolGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerBackendAddressPoolGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerBackendAddressPoolGet.json // this example is just showing the usage of "LoadBalancerBackendAddressPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -238,7 +238,7 @@ public async Task Get_LoadBalancerBackendAddressPoolGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_LoadBalancerBackendAddressPoolGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerBackendAddressPoolGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerBackendAddressPoolGet.json // this example is just showing the usage of "LoadBalancerBackendAddressPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -269,7 +269,7 @@ public async Task Exists_LoadBalancerBackendAddressPoolGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_LoadBalancerBackendAddressPoolGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerBackendAddressPoolGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerBackendAddressPoolGet.json // this example is just showing the usage of "LoadBalancerBackendAddressPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -312,7 +312,7 @@ public async Task GetIfExists_LoadBalancerBackendAddressPoolGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_UpdateLoadBalancerBackendPoolWithBackendAddressesContainingVirtualNetworkAndIPAddress() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LBBackendAddressPoolWithBackendAddressesPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LBBackendAddressPoolWithBackendAddressesPut.json // this example is just showing the usage of "LoadBalancerBackendAddressPools_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BackendAddressPoolResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BackendAddressPoolResource.cs index 08dd8644b0768..7401ef604946e 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BackendAddressPoolResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BackendAddressPoolResource.cs @@ -20,7 +20,7 @@ public partial class Sample_BackendAddressPoolResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetInboundNatRulePortMappingsLoadBalancer_QueryInboundNATRulePortMapping() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/QueryInboundNatRulePortMapping.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/QueryInboundNatRulePortMapping.json // this example is just showing the usage of "LoadBalancers_ListInboundNatRulePortMappings" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task GetInboundNatRulePortMappingsLoadBalancer_QueryInboundNATRuleP [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_LoadBalancerWithBackendAddressPoolWithBackendAddresses() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json // this example is just showing the usage of "LoadBalancerBackendAddressPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Get_LoadBalancerWithBackendAddressPoolWithBackendAddresses() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_LoadBalancerBackendAddressPoolGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerBackendAddressPoolGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerBackendAddressPoolGet.json // this example is just showing the usage of "LoadBalancerBackendAddressPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -117,7 +117,7 @@ public async Task Get_LoadBalancerBackendAddressPoolGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateLoadBalancerBackendPoolWithBackendAddressesContainingVirtualNetworkAndIPAddress() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LBBackendAddressPoolWithBackendAddressesPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LBBackendAddressPoolWithBackendAddressesPut.json // this example is just showing the usage of "LoadBalancerBackendAddressPools_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -167,7 +167,7 @@ public async Task Update_UpdateLoadBalancerBackendPoolWithBackendAddressesContai [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_BackendAddressPoolDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerBackendAddressPoolDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerBackendAddressPoolDelete.json // this example is just showing the usage of "LoadBalancerBackendAddressPools_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BaseAdminRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BaseAdminRuleCollection.cs index 637cbbb90e75e..91e82172e5e48 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BaseAdminRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BaseAdminRuleCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_BaseAdminRuleCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListSecurityAdminRules() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerAdminRuleList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerAdminRuleList.json // this example is just showing the usage of "AdminRules_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -59,7 +59,7 @@ public async Task GetAll_ListSecurityAdminRules() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsSecurityAdminRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerAdminRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerAdminRuleGet.json // this example is just showing the usage of "AdminRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -96,7 +96,7 @@ public async Task Get_GetsSecurityAdminRule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetsSecurityAdminRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerAdminRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerAdminRuleGet.json // this example is just showing the usage of "AdminRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task Exists_GetsSecurityAdminRule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetsSecurityAdminRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerAdminRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerAdminRuleGet.json // this example is just showing the usage of "AdminRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -174,7 +174,7 @@ public async Task GetIfExists_GetsSecurityAdminRule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsSecurityDefaultAdminRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerDefaultAdminRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerDefaultAdminRuleGet.json // this example is just showing the usage of "AdminRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -211,7 +211,7 @@ public async Task Get_GetsSecurityDefaultAdminRule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetsSecurityDefaultAdminRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerDefaultAdminRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerDefaultAdminRuleGet.json // this example is just showing the usage of "AdminRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -244,7 +244,7 @@ public async Task Exists_GetsSecurityDefaultAdminRule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetsSecurityDefaultAdminRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerDefaultAdminRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerDefaultAdminRuleGet.json // this example is just showing the usage of "AdminRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -289,7 +289,7 @@ public async Task GetIfExists_GetsSecurityDefaultAdminRule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateADefaultAdminRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerDefaultAdminRulePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerDefaultAdminRulePut.json // this example is just showing the usage of "AdminRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -331,7 +331,7 @@ public async Task CreateOrUpdate_CreateADefaultAdminRule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateAnAdminRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerAdminRulePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerAdminRulePut.json // this example is just showing the usage of "AdminRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BaseAdminRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BaseAdminRuleResource.cs index 8aa56380a5ef6..5cabcb8cb21fa 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BaseAdminRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BaseAdminRuleResource.cs @@ -20,7 +20,7 @@ public partial class Sample_BaseAdminRuleResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsSecurityAdminRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerAdminRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerAdminRuleGet.json // this example is just showing the usage of "AdminRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_GetsSecurityAdminRule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsSecurityDefaultAdminRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerDefaultAdminRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerDefaultAdminRuleGet.json // this example is just showing the usage of "AdminRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task Get_GetsSecurityDefaultAdminRule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateADefaultAdminRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerDefaultAdminRulePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerDefaultAdminRulePut.json // this example is just showing the usage of "AdminRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -127,7 +127,7 @@ public async Task Update_CreateADefaultAdminRule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateAnAdminRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerAdminRulePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerAdminRulePut.json // this example is just showing the usage of "AdminRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -194,7 +194,7 @@ public async Task Update_CreateAnAdminRule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeletesAnAdminRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerAdminRuleDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerAdminRuleDelete.json // this example is just showing the usage of "AdminRules_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BastionHostCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BastionHostCollection.cs index df60db0bf06b2..85e43364b74bc 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BastionHostCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BastionHostCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_BastionHostCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetBastionHost() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/BastionHostGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/BastionHostGet.json // this example is just showing the usage of "BastionHosts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetBastionHost() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetBastionHost() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/BastionHostGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/BastionHostGet.json // this example is just showing the usage of "BastionHosts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Exists_GetBastionHost() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetBastionHost() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/BastionHostGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/BastionHostGet.json // this example is just showing the usage of "BastionHosts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -127,7 +127,7 @@ public async Task GetIfExists_GetBastionHost() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetBastionHostWithZones() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/BastionHostGetWithZones.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/BastionHostGetWithZones.json // this example is just showing the usage of "BastionHosts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -161,7 +161,7 @@ public async Task Get_GetBastionHostWithZones() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetBastionHostWithZones() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/BastionHostGetWithZones.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/BastionHostGetWithZones.json // this example is just showing the usage of "BastionHosts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -191,7 +191,7 @@ public async Task Exists_GetBastionHostWithZones() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetBastionHostWithZones() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/BastionHostGetWithZones.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/BastionHostGetWithZones.json // this example is just showing the usage of "BastionHosts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -233,7 +233,7 @@ public async Task GetIfExists_GetBastionHostWithZones() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDeveloperBastionHost() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/BastionHostDeveloperGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/BastionHostDeveloperGet.json // this example is just showing the usage of "BastionHosts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -267,7 +267,7 @@ public async Task Get_GetDeveloperBastionHost() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetDeveloperBastionHost() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/BastionHostDeveloperGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/BastionHostDeveloperGet.json // this example is just showing the usage of "BastionHosts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -297,7 +297,7 @@ public async Task Exists_GetDeveloperBastionHost() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetDeveloperBastionHost() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/BastionHostDeveloperGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/BastionHostDeveloperGet.json // this example is just showing the usage of "BastionHosts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -339,7 +339,7 @@ public async Task GetIfExists_GetDeveloperBastionHost() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateBastionHost() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/BastionHostPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/BastionHostPut.json // this example is just showing the usage of "BastionHosts_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -386,7 +386,7 @@ public async Task CreateOrUpdate_CreateBastionHost() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateBastionHostWithZones() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/BastionHostPutWithZones.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/BastionHostPutWithZones.json // this example is just showing the usage of "BastionHosts_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -433,7 +433,7 @@ public async Task CreateOrUpdate_CreateBastionHostWithZones() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateDeveloperBastionHost() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/BastionHostDeveloperPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/BastionHostDeveloperPut.json // this example is just showing the usage of "BastionHosts_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -482,7 +482,7 @@ public async Task CreateOrUpdate_CreateDeveloperBastionHost() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAllBastionHostsForAGivenResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/BastionHostListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/BastionHostListByResourceGroup.json // this example is just showing the usage of "BastionHosts_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BastionHostResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BastionHostResource.cs index a89cefbf88366..cf6f1831c884e 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BastionHostResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BastionHostResource.cs @@ -21,7 +21,7 @@ public partial class Sample_BastionHostResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteBastionHost() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/BastionHostDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/BastionHostDelete.json // this example is just showing the usage of "BastionHosts_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Delete_DeleteBastionHost() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteDeveloperBastionHost() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/BastionHostDeveloperDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/BastionHostDeveloperDelete.json // this example is just showing the usage of "BastionHosts_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -75,7 +75,7 @@ public async Task Delete_DeleteDeveloperBastionHost() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetBastionHost() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/BastionHostGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/BastionHostGet.json // this example is just showing the usage of "BastionHosts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -106,7 +106,7 @@ public async Task Get_GetBastionHost() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetBastionHostWithZones() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/BastionHostGetWithZones.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/BastionHostGetWithZones.json // this example is just showing the usage of "BastionHosts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -137,7 +137,7 @@ public async Task Get_GetBastionHostWithZones() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDeveloperBastionHost() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/BastionHostDeveloperGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/BastionHostDeveloperGet.json // this example is just showing the usage of "BastionHosts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -168,7 +168,7 @@ public async Task Get_GetDeveloperBastionHost() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PatchBastionHost() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/BastionHostPatch.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/BastionHostPatch.json // this example is just showing the usage of "BastionHosts_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -208,7 +208,7 @@ public async Task Update_PatchBastionHost() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetBastionHosts_ListAllBastionHostsForAGivenSubscription() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/BastionHostListBySubscription.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/BastionHostListBySubscription.json // this example is just showing the usage of "BastionHosts_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -240,7 +240,7 @@ public async Task GetBastionHosts_ListAllBastionHostsForAGivenSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task DeleteBastionShareableLinkByToken_DeleteBastionShareableLinksForTheRequestVMs() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/BastionShareableLinkDeleteByToken.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/BastionShareableLinkDeleteByToken.json // this example is just showing the usage of "DeleteBastionShareableLinkByToken" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BgpConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BgpConnectionCollection.cs index 9209ee701c6e1..37869ca182f16 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BgpConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BgpConnectionCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_BgpConnectionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VirtualHubVirtualHubRouteTableV2Get() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualHubBgpConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualHubBgpConnectionGet.json // this example is just showing the usage of "VirtualHubBgpConnection_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_VirtualHubVirtualHubRouteTableV2Get() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_VirtualHubVirtualHubRouteTableV2Get() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualHubBgpConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualHubBgpConnectionGet.json // this example is just showing the usage of "VirtualHubBgpConnection_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Exists_VirtualHubVirtualHubRouteTableV2Get() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_VirtualHubVirtualHubRouteTableV2Get() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualHubBgpConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualHubBgpConnectionGet.json // this example is just showing the usage of "VirtualHubBgpConnection_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,7 +128,7 @@ public async Task GetIfExists_VirtualHubVirtualHubRouteTableV2Get() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_VirtualHubRouteTableV2Put() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualHubBgpConnectionPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualHubBgpConnectionPut.json // this example is just showing the usage of "VirtualHubBgpConnection_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -170,7 +170,7 @@ public async Task CreateOrUpdate_VirtualHubRouteTableV2Put() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_VirtualHubRouteTableV2List() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualHubBgpConnectionList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualHubBgpConnectionList.json // this example is just showing the usage of "VirtualHubBgpConnections_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BgpConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BgpConnectionResource.cs index d9c8d847bf210..a8f23dcf4492e 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BgpConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_BgpConnectionResource.cs @@ -21,7 +21,7 @@ public partial class Sample_BgpConnectionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VirtualHubVirtualHubRouteTableV2Get() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualHubBgpConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualHubBgpConnectionGet.json // this example is just showing the usage of "VirtualHubBgpConnection_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Get_VirtualHubVirtualHubRouteTableV2Get() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_VirtualHubRouteTableV2Put() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualHubBgpConnectionPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualHubBgpConnectionPut.json // this example is just showing the usage of "VirtualHubBgpConnection_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Update_VirtualHubRouteTableV2Put() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_VirtualHubRouteTableV2Delete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualHubBgpConnectionDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualHubBgpConnectionDelete.json // this example is just showing the usage of "VirtualHubBgpConnection_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +120,7 @@ public async Task Delete_VirtualHubRouteTableV2Delete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetVirtualHubBgpConnectionLearnedRoutes_VirtualRouterPeerListLearnedRoutes() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualRouterPeerListLearnedRoute.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualRouterPeerListLearnedRoute.json // this example is just showing the usage of "VirtualHubBgpConnections_ListLearnedRoutes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -149,7 +149,7 @@ public async Task GetVirtualHubBgpConnectionLearnedRoutes_VirtualRouterPeerListL [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetVirtualHubBgpConnectionAdvertisedRoutes_VirtualRouterPeerListAdvertisedRoutes() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualRouterPeerListAdvertisedRoute.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualRouterPeerListAdvertisedRoute.json // this example is just showing the usage of "VirtualHubBgpConnections_ListAdvertisedRoutes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_CloudServiceSwapCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_CloudServiceSwapCollection.cs index 44ce1063fe9f1..7d73b8d289075 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_CloudServiceSwapCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_CloudServiceSwapCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_CloudServiceSwapCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSwapResource() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/CloudServiceSwapGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/CloudServiceSwapGet.json // this example is just showing the usage of "VipSwap_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetSwapResource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetSwapResource() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/CloudServiceSwapGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/CloudServiceSwapGet.json // this example is just showing the usage of "VipSwap_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Exists_GetSwapResource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetSwapResource() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/CloudServiceSwapGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/CloudServiceSwapGet.json // this example is just showing the usage of "VipSwap_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -127,7 +127,7 @@ public async Task GetIfExists_GetSwapResource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_PutVipSwapOperation() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/CloudServiceSwapPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/CloudServiceSwapPut.json // this example is just showing the usage of "VipSwap_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -161,7 +161,7 @@ public async Task CreateOrUpdate_PutVipSwapOperation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetSwapResourceList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/CloudServiceSwapList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/CloudServiceSwapList.json // this example is just showing the usage of "VipSwap_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_CloudServiceSwapResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_CloudServiceSwapResource.cs index a4a48a2aeefc8..191dac3797d91 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_CloudServiceSwapResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_CloudServiceSwapResource.cs @@ -20,7 +20,7 @@ public partial class Sample_CloudServiceSwapResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSwapResource() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/CloudServiceSwapGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/CloudServiceSwapGet.json // this example is just showing the usage of "VipSwap_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_GetSwapResource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PutVipSwapOperation() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/CloudServiceSwapPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/CloudServiceSwapPut.json // this example is just showing the usage of "VipSwap_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ConnectionMonitorCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ConnectionMonitorCollection.cs index b81b8b72f62f0..7802f4b8360bb 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ConnectionMonitorCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ConnectionMonitorCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ConnectionMonitorCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateConnectionMonitorV1() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherConnectionMonitorCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherConnectionMonitorCreate.json // this example is just showing the usage of "ConnectionMonitors_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -94,7 +94,7 @@ public async Task CreateOrUpdate_CreateConnectionMonitorV1() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateConnectionMonitorV2() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherConnectionMonitorV2Create.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherConnectionMonitorV2Create.json // this example is just showing the usage of "ConnectionMonitors_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -192,7 +192,7 @@ public async Task CreateOrUpdate_CreateConnectionMonitorV2() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateConnectionMonitorWithArcNetwork() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherConnectionMonitorCreateWithArcNetwork.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherConnectionMonitorCreateWithArcNetwork.json // this example is just showing the usage of "ConnectionMonitors_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -293,7 +293,7 @@ public async Task CreateOrUpdate_CreateConnectionMonitorWithArcNetwork() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetConnectionMonitor() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherConnectionMonitorGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherConnectionMonitorGet.json // this example is just showing the usage of "ConnectionMonitors_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -328,7 +328,7 @@ public async Task Get_GetConnectionMonitor() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetConnectionMonitor() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherConnectionMonitorGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherConnectionMonitorGet.json // this example is just showing the usage of "ConnectionMonitors_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -359,7 +359,7 @@ public async Task Exists_GetConnectionMonitor() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetConnectionMonitor() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherConnectionMonitorGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherConnectionMonitorGet.json // this example is just showing the usage of "ConnectionMonitors_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -402,7 +402,7 @@ public async Task GetIfExists_GetConnectionMonitor() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListConnectionMonitors() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherConnectionMonitorList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherConnectionMonitorList.json // this example is just showing the usage of "ConnectionMonitors_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ConnectionMonitorResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ConnectionMonitorResource.cs index 29f1cfee5671e..6cd0fde101147 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ConnectionMonitorResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ConnectionMonitorResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ConnectionMonitorResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetConnectionMonitor() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherConnectionMonitorGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherConnectionMonitorGet.json // this example is just showing the usage of "ConnectionMonitors_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_GetConnectionMonitor() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteConnectionMonitor() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherConnectionMonitorDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherConnectionMonitorDelete.json // this example is just showing the usage of "ConnectionMonitors_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Delete_DeleteConnectionMonitor() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateConnectionMonitorTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherConnectionMonitorUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherConnectionMonitorUpdateTags.json // this example is just showing the usage of "ConnectionMonitors_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +120,7 @@ public async Task Update_UpdateConnectionMonitorTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Stop_StopConnectionMonitor() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherConnectionMonitorStop.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherConnectionMonitorStop.json // this example is just showing the usage of "ConnectionMonitors_Stop" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -148,7 +148,7 @@ public async Task Stop_StopConnectionMonitor() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Start_StartConnectionMonitor() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherConnectionMonitorStart.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherConnectionMonitorStart.json // this example is just showing the usage of "ConnectionMonitors_Start" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -176,7 +176,7 @@ public async Task Start_StartConnectionMonitor() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Query_QueryConnectionMonitor() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherConnectionMonitorQuery.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherConnectionMonitorQuery.json // this example is just showing the usage of "ConnectionMonitors_Query" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ConnectivityConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ConnectivityConfigurationCollection.cs index 59d164f403ca6..d0250577a39ec 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ConnectivityConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ConnectivityConfigurationCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ConnectivityConfigurationCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ConnectivityConfigurationsGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerConnectivityConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerConnectivityConfigurationGet.json // this example is just showing the usage of "ConnectivityConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_ConnectivityConfigurationsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ConnectivityConfigurationsGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerConnectivityConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerConnectivityConfigurationGet.json // this example is just showing the usage of "ConnectivityConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Exists_ConnectivityConfigurationsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ConnectivityConfigurationsGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerConnectivityConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerConnectivityConfigurationGet.json // this example is just showing the usage of "ConnectivityConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetIfExists_ConnectivityConfigurationsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ConnectivityConfigurationsPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerConnectivityConfigurationPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerConnectivityConfigurationPut.json // this example is just showing the usage of "ConnectivityConfigurations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -188,7 +188,7 @@ public async Task CreateOrUpdate_ConnectivityConfigurationsPut() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ConnectivityConfigurationsList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerConnectivityConfigurationList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerConnectivityConfigurationList.json // this example is just showing the usage of "ConnectivityConfigurations_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ConnectivityConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ConnectivityConfigurationResource.cs index 513f37305d74d..c4b231ac39784 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ConnectivityConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ConnectivityConfigurationResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ConnectivityConfigurationResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ConnectivityConfigurationsGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerConnectivityConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerConnectivityConfigurationGet.json // this example is just showing the usage of "ConnectivityConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_ConnectivityConfigurationsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ConnectivityConfigurationsPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerConnectivityConfigurationPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerConnectivityConfigurationPut.json // this example is just showing the usage of "ConnectivityConfigurations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -108,7 +108,7 @@ public async Task Update_ConnectivityConfigurationsPut() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ConnectivityConfigurationsDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerConnectivityConfigurationDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerConnectivityConfigurationDelete.json // this example is just showing the usage of "ConnectivityConfigurations_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_CustomIPPrefixCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_CustomIPPrefixCollection.cs index 9a9ed5b432c38..d262d6308d4c9 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_CustomIPPrefixCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_CustomIPPrefixCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_CustomIPPrefixCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetCustomIPPrefix() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/CustomIpPrefixGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/CustomIpPrefixGet.json // this example is just showing the usage of "CustomIPPrefixes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_GetCustomIPPrefix() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetCustomIPPrefix() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/CustomIpPrefixGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/CustomIpPrefixGet.json // this example is just showing the usage of "CustomIPPrefixes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Exists_GetCustomIPPrefix() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetCustomIPPrefix() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/CustomIpPrefixGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/CustomIpPrefixGet.json // this example is just showing the usage of "CustomIPPrefixes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task GetIfExists_GetCustomIPPrefix() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateCustomIPPrefixAllocationMethod() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/CustomIpPrefixCreateCustomizedValues.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/CustomIpPrefixCreateCustomizedValues.json // this example is just showing the usage of "CustomIPPrefixes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task CreateOrUpdate_CreateCustomIPPrefixAllocationMethod() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListResourceGroupCustomIPPrefixes() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/CustomIpPrefixList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/CustomIpPrefixList.json // this example is just showing the usage of "CustomIPPrefixes_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_CustomIPPrefixResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_CustomIPPrefixResource.cs index da24e60588c55..fec6ee387bf91 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_CustomIPPrefixResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_CustomIPPrefixResource.cs @@ -21,7 +21,7 @@ public partial class Sample_CustomIPPrefixResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteCustomIPPrefix() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/CustomIpPrefixDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/CustomIpPrefixDelete.json // this example is just showing the usage of "CustomIPPrefixes_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Delete_DeleteCustomIPPrefix() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetCustomIPPrefix() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/CustomIpPrefixGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/CustomIpPrefixGet.json // this example is just showing the usage of "CustomIPPrefixes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +79,7 @@ public async Task Get_GetCustomIPPrefix() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdatePublicIPAddressTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/CustomIpPrefixUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/CustomIpPrefixUpdateTags.json // this example is just showing the usage of "CustomIPPrefixes_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task Update_UpdatePublicIPAddressTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetCustomIPPrefixes_ListAllCustomIPPrefixes() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/CustomIpPrefixListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/CustomIpPrefixListAll.json // this example is just showing the usage of "CustomIPPrefixes_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_DdosCustomPolicyCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_DdosCustomPolicyCollection.cs index 77d1981a3899a..b0ee3476a1440 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_DdosCustomPolicyCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_DdosCustomPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_DdosCustomPolicyCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDDoSCustomPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/DdosCustomPolicyGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/DdosCustomPolicyGet.json // this example is just showing the usage of "DdosCustomPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_GetDDoSCustomPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetDDoSCustomPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/DdosCustomPolicyGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/DdosCustomPolicyGet.json // this example is just showing the usage of "DdosCustomPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Exists_GetDDoSCustomPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetDDoSCustomPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/DdosCustomPolicyGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/DdosCustomPolicyGet.json // this example is just showing the usage of "DdosCustomPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task GetIfExists_GetDDoSCustomPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateDDoSCustomPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/DdosCustomPolicyCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/DdosCustomPolicyCreate.json // this example is just showing the usage of "DdosCustomPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_DdosCustomPolicyResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_DdosCustomPolicyResource.cs index 1d6f6e15c62a9..2145f89e853cb 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_DdosCustomPolicyResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_DdosCustomPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_DdosCustomPolicyResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteDDoSCustomPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/DdosCustomPolicyDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/DdosCustomPolicyDelete.json // this example is just showing the usage of "DdosCustomPolicies_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -47,7 +47,7 @@ public async Task Delete_DeleteDDoSCustomPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDDoSCustomPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/DdosCustomPolicyGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/DdosCustomPolicyGet.json // this example is just showing the usage of "DdosCustomPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Get_GetDDoSCustomPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_DDoSCustomPolicyUpdateTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/DdosCustomPolicyUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/DdosCustomPolicyUpdateTags.json // this example is just showing the usage of "DdosCustomPolicies_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_DdosProtectionPlanCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_DdosProtectionPlanCollection.cs index d06e67441e690..905c90ad3b6f7 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_DdosProtectionPlanCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_DdosProtectionPlanCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_DdosProtectionPlanCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDDoSProtectionPlan() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/DdosProtectionPlanGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/DdosProtectionPlanGet.json // this example is just showing the usage of "DdosProtectionPlans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_GetDDoSProtectionPlan() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetDDoSProtectionPlan() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/DdosProtectionPlanGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/DdosProtectionPlanGet.json // this example is just showing the usage of "DdosProtectionPlans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Exists_GetDDoSProtectionPlan() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetDDoSProtectionPlan() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/DdosProtectionPlanGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/DdosProtectionPlanGet.json // this example is just showing the usage of "DdosProtectionPlans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task GetIfExists_GetDDoSProtectionPlan() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateDDoSProtectionPlan() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/DdosProtectionPlanCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/DdosProtectionPlanCreate.json // this example is just showing the usage of "DdosProtectionPlans_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -162,7 +162,7 @@ public async Task CreateOrUpdate_CreateDDoSProtectionPlan() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListDDoSProtectionPlansInResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/DdosProtectionPlanList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/DdosProtectionPlanList.json // this example is just showing the usage of "DdosProtectionPlans_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_DdosProtectionPlanResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_DdosProtectionPlanResource.cs index 99ea3833ecdae..65e3f6f9a08f8 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_DdosProtectionPlanResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_DdosProtectionPlanResource.cs @@ -21,7 +21,7 @@ public partial class Sample_DdosProtectionPlanResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteDDoSProtectionPlan() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/DdosProtectionPlanDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/DdosProtectionPlanDelete.json // this example is just showing the usage of "DdosProtectionPlans_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Delete_DeleteDDoSProtectionPlan() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDDoSProtectionPlan() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/DdosProtectionPlanGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/DdosProtectionPlanGet.json // this example is just showing the usage of "DdosProtectionPlans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +79,7 @@ public async Task Get_GetDDoSProtectionPlan() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_DDoSProtectionPlanUpdateTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/DdosProtectionPlanUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/DdosProtectionPlanUpdateTags.json // this example is just showing the usage of "DdosProtectionPlans_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task Update_DDoSProtectionPlanUpdateTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetDdosProtectionPlans_ListAllDDoSProtectionPlans() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/DdosProtectionPlanListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/DdosProtectionPlanListAll.json // this example is just showing the usage of "DdosProtectionPlans_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_DefaultSecurityRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_DefaultSecurityRuleCollection.cs index 8325198e19331..c35e72a10d6b0 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_DefaultSecurityRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_DefaultSecurityRuleCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_DefaultSecurityRuleCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_DefaultSecurityRuleList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/DefaultSecurityRuleList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/DefaultSecurityRuleList.json // this example is just showing the usage of "DefaultSecurityRules_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_DefaultSecurityRuleList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_DefaultSecurityRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/DefaultSecurityRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/DefaultSecurityRuleGet.json // this example is just showing the usage of "DefaultSecurityRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_DefaultSecurityRuleGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_DefaultSecurityRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/DefaultSecurityRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/DefaultSecurityRuleGet.json // this example is just showing the usage of "DefaultSecurityRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Exists_DefaultSecurityRuleGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_DefaultSecurityRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/DefaultSecurityRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/DefaultSecurityRuleGet.json // this example is just showing the usage of "DefaultSecurityRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_DefaultSecurityRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_DefaultSecurityRuleResource.cs index 4f529f4fc1643..4609f73d7d26e 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_DefaultSecurityRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_DefaultSecurityRuleResource.cs @@ -19,7 +19,7 @@ public partial class Sample_DefaultSecurityRuleResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_DefaultSecurityRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/DefaultSecurityRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/DefaultSecurityRuleGet.json // this example is just showing the usage of "DefaultSecurityRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_DscpConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_DscpConfigurationCollection.cs index 704e1df96f3ca..3cdc10ed1a68c 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_DscpConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_DscpConfigurationCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_DscpConfigurationCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateDSCPConfiguration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/DscpConfigurationCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/DscpConfigurationCreate.json // this example is just showing the usage of "DscpConfiguration_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -146,7 +146,7 @@ public async Task CreateOrUpdate_CreateDSCPConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDscpConfiguration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/DscpConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/DscpConfigurationGet.json // this example is just showing the usage of "DscpConfiguration_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -180,7 +180,7 @@ public async Task Get_GetDscpConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetDscpConfiguration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/DscpConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/DscpConfigurationGet.json // this example is just showing the usage of "DscpConfiguration_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -210,7 +210,7 @@ public async Task Exists_GetDscpConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetDscpConfiguration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/DscpConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/DscpConfigurationGet.json // this example is just showing the usage of "DscpConfiguration_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -252,7 +252,7 @@ public async Task GetIfExists_GetDscpConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetDscpConfiguration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/DscpConfigurationList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/DscpConfigurationList.json // this example is just showing the usage of "DscpConfiguration_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_DscpConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_DscpConfigurationResource.cs index 06aa3557d7b77..830983f487ab6 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_DscpConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_DscpConfigurationResource.cs @@ -21,7 +21,7 @@ public partial class Sample_DscpConfigurationResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateDSCPConfiguration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/DscpConfigurationCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/DscpConfigurationCreate.json // this example is just showing the usage of "DscpConfiguration_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -143,7 +143,7 @@ public async Task Update_CreateDSCPConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteDSCPConfiguration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/DscpConfigurationDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/DscpConfigurationDelete.json // this example is just showing the usage of "DscpConfiguration_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -170,7 +170,7 @@ public async Task Delete_DeleteDSCPConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDscpConfiguration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/DscpConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/DscpConfigurationGet.json // this example is just showing the usage of "DscpConfiguration_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -201,7 +201,7 @@ public async Task Get_GetDscpConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetDscpConfigurations_ListAllNetworkInterfaces() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/DscpConfigurationListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/DscpConfigurationListAll.json // this example is just showing the usage of "DscpConfiguration_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitAuthorizationCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitAuthorizationCollection.cs index a18eb6b5bc4fa..a5224a0cabf2c 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitAuthorizationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitAuthorizationCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ExpressRouteCircuitAuthorizationCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetExpressRouteCircuitAuthorization() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitAuthorizationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitAuthorizationGet.json // this example is just showing the usage of "ExpressRouteCircuitAuthorizations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_GetExpressRouteCircuitAuthorization() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetExpressRouteCircuitAuthorization() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitAuthorizationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitAuthorizationGet.json // this example is just showing the usage of "ExpressRouteCircuitAuthorizations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Exists_GetExpressRouteCircuitAuthorization() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetExpressRouteCircuitAuthorization() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitAuthorizationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitAuthorizationGet.json // this example is just showing the usage of "ExpressRouteCircuitAuthorizations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,7 +128,7 @@ public async Task GetIfExists_GetExpressRouteCircuitAuthorization() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateExpressRouteCircuitAuthorization() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitAuthorizationCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitAuthorizationCreate.json // this example is just showing the usage of "ExpressRouteCircuitAuthorizations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -165,7 +165,7 @@ public async Task CreateOrUpdate_CreateExpressRouteCircuitAuthorization() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListExpressRouteCircuitAuthorization() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitAuthorizationList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitAuthorizationList.json // this example is just showing the usage of "ExpressRouteCircuitAuthorizations_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitAuthorizationResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitAuthorizationResource.cs index 92eec5545c1d9..9c8e2c8c3d3e2 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitAuthorizationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitAuthorizationResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ExpressRouteCircuitAuthorizationResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteExpressRouteCircuitAuthorization() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitAuthorizationDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitAuthorizationDelete.json // this example is just showing the usage of "ExpressRouteCircuitAuthorizations_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -47,7 +47,7 @@ public async Task Delete_DeleteExpressRouteCircuitAuthorization() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetExpressRouteCircuitAuthorization() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitAuthorizationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitAuthorizationGet.json // this example is just showing the usage of "ExpressRouteCircuitAuthorizations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +79,7 @@ public async Task Get_GetExpressRouteCircuitAuthorization() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateExpressRouteCircuitAuthorization() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitAuthorizationCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitAuthorizationCreate.json // this example is just showing the usage of "ExpressRouteCircuitAuthorizations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitCollection.cs index cfa3612847658..30f0a1710f7b3 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ExpressRouteCircuitCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetExpressRouteCircuit() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitGet.json // this example is just showing the usage of "ExpressRouteCircuits_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetExpressRouteCircuit() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetExpressRouteCircuit() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitGet.json // this example is just showing the usage of "ExpressRouteCircuits_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Exists_GetExpressRouteCircuit() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetExpressRouteCircuit() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitGet.json // this example is just showing the usage of "ExpressRouteCircuits_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -127,7 +127,7 @@ public async Task GetIfExists_GetExpressRouteCircuit() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateExpressRouteCircuit() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitCreate.json // this example is just showing the usage of "ExpressRouteCircuits_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -185,7 +185,7 @@ public async Task CreateOrUpdate_CreateExpressRouteCircuit() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateExpressRouteCircuitOnExpressRoutePort() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitCreateOnExpressRoutePort.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitCreateOnExpressRoutePort.json // this example is just showing the usage of "ExpressRouteCircuits_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -234,7 +234,7 @@ public async Task CreateOrUpdate_CreateExpressRouteCircuitOnExpressRoutePort() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListExpressRouteCircuitsInAResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitListByResourceGroup.json // this example is just showing the usage of "ExpressRouteCircuits_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitConnectionCollection.cs index 6db72cfecec34..a7806d22995d2 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ExpressRouteCircuitConnectionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ExpressRouteCircuitConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitConnectionGet.json // this example is just showing the usage of "ExpressRouteCircuitConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task Get_ExpressRouteCircuitConnectionGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ExpressRouteCircuitConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitConnectionGet.json // this example is just showing the usage of "ExpressRouteCircuitConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task Exists_ExpressRouteCircuitConnectionGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ExpressRouteCircuitConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitConnectionGet.json // this example is just showing the usage of "ExpressRouteCircuitConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -132,7 +132,7 @@ public async Task GetIfExists_ExpressRouteCircuitConnectionGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ExpressRouteCircuitConnectionCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitConnectionCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitConnectionCreate.json // this example is just showing the usage of "ExpressRouteCircuitConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -180,7 +180,7 @@ public async Task CreateOrUpdate_ExpressRouteCircuitConnectionCreate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListExpressRouteCircuitConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitConnectionList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitConnectionList.json // this example is just showing the usage of "ExpressRouteCircuitConnections_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitConnectionResource.cs index 4f1e82dbfd276..897d78392e672 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ExpressRouteCircuitConnectionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteExpressRouteCircuit() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitConnectionDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitConnectionDelete.json // this example is just showing the usage of "ExpressRouteCircuitConnections_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -49,7 +49,7 @@ public async Task Delete_DeleteExpressRouteCircuit() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ExpressRouteCircuitConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitConnectionGet.json // this example is just showing the usage of "ExpressRouteCircuitConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task Get_ExpressRouteCircuitConnectionGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ExpressRouteCircuitConnectionCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitConnectionCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitConnectionCreate.json // this example is just showing the usage of "ExpressRouteCircuitConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitPeeringCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitPeeringCollection.cs index 7e97d87b268b0..f746d7f3f3cee 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitPeeringCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitPeeringCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ExpressRouteCircuitPeeringCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetExpressRouteCircuitPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitPeeringGet.json // this example is just showing the usage of "ExpressRouteCircuitPeerings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_GetExpressRouteCircuitPeering() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetExpressRouteCircuitPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitPeeringGet.json // this example is just showing the usage of "ExpressRouteCircuitPeerings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Exists_GetExpressRouteCircuitPeering() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetExpressRouteCircuitPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitPeeringGet.json // this example is just showing the usage of "ExpressRouteCircuitPeerings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,7 +128,7 @@ public async Task GetIfExists_GetExpressRouteCircuitPeering() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateExpressRouteCircuitPeerings() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitPeeringCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitPeeringCreate.json // this example is just showing the usage of "ExpressRouteCircuitPeerings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -171,7 +171,7 @@ public async Task CreateOrUpdate_CreateExpressRouteCircuitPeerings() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListExpressRouteCircuitPeerings() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitPeeringList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitPeeringList.json // this example is just showing the usage of "ExpressRouteCircuitPeerings_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitPeeringResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitPeeringResource.cs index 2f55a1ecd0719..78708d0875187 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitPeeringResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitPeeringResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ExpressRouteCircuitPeeringResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteExpressRouteCircuitPeerings() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitPeeringDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitPeeringDelete.json // this example is just showing the usage of "ExpressRouteCircuitPeerings_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Delete_DeleteExpressRouteCircuitPeerings() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetExpressRouteCircuitPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitPeeringGet.json // this example is just showing the usage of "ExpressRouteCircuitPeerings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Get_GetExpressRouteCircuitPeering() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateExpressRouteCircuitPeerings() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitPeeringCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitPeeringCreate.json // this example is just showing the usage of "ExpressRouteCircuitPeerings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +120,7 @@ public async Task Update_CreateExpressRouteCircuitPeerings() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetArpTableExpressRouteCircuit_ListARPTable() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitARPTableList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitARPTableList.json // this example is just showing the usage of "ExpressRouteCircuits_ListArpTable" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -150,7 +150,7 @@ public async Task GetArpTableExpressRouteCircuit_ListARPTable() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetRoutesTableExpressRouteCircuit_ListRouteTables() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitRouteTableList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitRouteTableList.json // this example is just showing the usage of "ExpressRouteCircuits_ListRoutesTable" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -180,7 +180,7 @@ public async Task GetRoutesTableExpressRouteCircuit_ListRouteTables() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetRoutesTableSummaryExpressRouteCircuit_ListRouteTableSummary() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitRouteTableSummaryList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitRouteTableSummaryList.json // this example is just showing the usage of "ExpressRouteCircuits_ListRoutesTableSummary" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -210,7 +210,7 @@ public async Task GetRoutesTableSummaryExpressRouteCircuit_ListRouteTableSummary [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetPeeringStatsExpressRouteCircuit_GetExpressRouteCircuitPeeringTrafficStats() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitPeeringStats.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitPeeringStats.json // this example is just showing the usage of "ExpressRouteCircuits_GetPeeringStats" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitResource.cs index 85301695c9c4e..6530e0d320583 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCircuitResource.cs @@ -21,7 +21,7 @@ public partial class Sample_ExpressRouteCircuitResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteExpressRouteCircuit() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitDelete.json // this example is just showing the usage of "ExpressRouteCircuits_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Delete_DeleteExpressRouteCircuit() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetExpressRouteCircuit() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitGet.json // this example is just showing the usage of "ExpressRouteCircuits_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +79,7 @@ public async Task Get_GetExpressRouteCircuit() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateExpressRouteCircuitTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitUpdateTags.json // this example is just showing the usage of "ExpressRouteCircuits_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task Update_UpdateExpressRouteCircuitTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetStats_GetExpressRouteCircuitTrafficStats() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitStats.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitStats.json // this example is just showing the usage of "ExpressRouteCircuits_GetStats" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -145,7 +145,7 @@ public async Task GetStats_GetExpressRouteCircuitTrafficStats() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetExpressRouteCircuits_ListExpressRouteCircuitsInASubscription() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCircuitListBySubscription.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCircuitListBySubscription.json // this example is just showing the usage of "ExpressRouteCircuits_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteConnectionCollection.cs index 9a0a51179734f..fb2c0a71f6c17 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteConnectionCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ExpressRouteConnectionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ExpressRouteConnectionCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteConnectionCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteConnectionCreate.json // this example is just showing the usage of "ExpressRouteConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task CreateOrUpdate_ExpressRouteConnectionCreate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ExpressRouteConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteConnectionGet.json // this example is just showing the usage of "ExpressRouteConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task Get_ExpressRouteConnectionGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ExpressRouteConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteConnectionGet.json // this example is just showing the usage of "ExpressRouteConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -157,7 +157,7 @@ public async Task Exists_ExpressRouteConnectionGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ExpressRouteConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteConnectionGet.json // this example is just showing the usage of "ExpressRouteConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -200,7 +200,7 @@ public async Task GetIfExists_ExpressRouteConnectionGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ExpressRouteConnectionList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteConnectionList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteConnectionList.json // this example is just showing the usage of "ExpressRouteConnections_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteConnectionResource.cs index 7a0eb4551ceca..3329ffcfae4dd 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteConnectionResource.cs @@ -21,7 +21,7 @@ public partial class Sample_ExpressRouteConnectionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ExpressRouteConnectionCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteConnectionCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteConnectionCreate.json // this example is just showing the usage of "ExpressRouteConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task Update_ExpressRouteConnectionCreate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ExpressRouteConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteConnectionGet.json // this example is just showing the usage of "ExpressRouteConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +120,7 @@ public async Task Get_ExpressRouteConnectionGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ExpressRouteConnectionDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteConnectionDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteConnectionDelete.json // this example is just showing the usage of "ExpressRouteConnections_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCrossConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCrossConnectionCollection.cs index 54a94ed1801c2..a8436cfad6bb9 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCrossConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCrossConnectionCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ExpressRouteCrossConnectionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ExpressRouteCrossConnectionListByResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCrossConnectionListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCrossConnectionListByResourceGroup.json // this example is just showing the usage of "ExpressRouteCrossConnections_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ExpressRouteCrossConnectionListByResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetExpressRouteCrossConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCrossConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCrossConnectionGet.json // this example is just showing the usage of "ExpressRouteCrossConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_GetExpressRouteCrossConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetExpressRouteCrossConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCrossConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCrossConnectionGet.json // this example is just showing the usage of "ExpressRouteCrossConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -121,7 +121,7 @@ public async Task Exists_GetExpressRouteCrossConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetExpressRouteCrossConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCrossConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCrossConnectionGet.json // this example is just showing the usage of "ExpressRouteCrossConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +163,7 @@ public async Task GetIfExists_GetExpressRouteCrossConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_UpdateExpressRouteCrossConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCrossConnectionUpdate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCrossConnectionUpdate.json // this example is just showing the usage of "ExpressRouteCrossConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCrossConnectionPeeringCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCrossConnectionPeeringCollection.cs index eaa6a7b797f23..d22e5e36aa4d9 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCrossConnectionPeeringCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCrossConnectionPeeringCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ExpressRouteCrossConnectionPeeringCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ExpressRouteCrossConnectionBgpPeeringList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCrossConnectionBgpPeeringList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCrossConnectionBgpPeeringList.json // this example is just showing the usage of "ExpressRouteCrossConnectionPeerings_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ExpressRouteCrossConnectionBgpPeeringList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetExpressRouteCrossConnectionBgpPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json // this example is just showing the usage of "ExpressRouteCrossConnectionPeerings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_GetExpressRouteCrossConnectionBgpPeering() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetExpressRouteCrossConnectionBgpPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json // this example is just showing the usage of "ExpressRouteCrossConnectionPeerings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_GetExpressRouteCrossConnectionBgpPeering() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetExpressRouteCrossConnectionBgpPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json // this example is just showing the usage of "ExpressRouteCrossConnectionPeerings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_GetExpressRouteCrossConnectionBgpPeering() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ExpressRouteCrossConnectionBgpPeeringCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCrossConnectionBgpPeeringCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCrossConnectionBgpPeeringCreate.json // this example is just showing the usage of "ExpressRouteCrossConnectionPeerings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCrossConnectionPeeringResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCrossConnectionPeeringResource.cs index d34d302da76d8..f7e857e54d9e2 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCrossConnectionPeeringResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCrossConnectionPeeringResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ExpressRouteCrossConnectionPeeringResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetArpTableExpressRouteCrossConnection_GetExpressRouteCrossConnectionsArpTable() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCrossConnectionsArpTable.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCrossConnectionsArpTable.json // this example is just showing the usage of "ExpressRouteCrossConnections_ListArpTable" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task GetArpTableExpressRouteCrossConnection_GetExpressRouteCrossCon [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetRoutesTableSummaryExpressRouteCrossConnection_GetExpressRouteCrossConnectionsRouteTableSummary() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCrossConnectionsRouteTableSummary.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCrossConnectionsRouteTableSummary.json // this example is just showing the usage of "ExpressRouteCrossConnections_ListRoutesTableSummary" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task GetRoutesTableSummaryExpressRouteCrossConnection_GetExpressRou [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetRoutesTableExpressRouteCrossConnection_GetExpressRouteCrossConnectionsRouteTable() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCrossConnectionsRouteTable.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCrossConnectionsRouteTable.json // this example is just showing the usage of "ExpressRouteCrossConnections_ListRoutesTable" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -110,7 +110,7 @@ public async Task GetRoutesTableExpressRouteCrossConnection_GetExpressRouteCross [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteExpressRouteCrossConnectionBgpPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCrossConnectionBgpPeeringDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCrossConnectionBgpPeeringDelete.json // this example is just showing the usage of "ExpressRouteCrossConnectionPeerings_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -138,7 +138,7 @@ public async Task Delete_DeleteExpressRouteCrossConnectionBgpPeering() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetExpressRouteCrossConnectionBgpPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json // this example is just showing the usage of "ExpressRouteCrossConnectionPeerings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -170,7 +170,7 @@ public async Task Get_GetExpressRouteCrossConnectionBgpPeering() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ExpressRouteCrossConnectionBgpPeeringCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCrossConnectionBgpPeeringCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCrossConnectionBgpPeeringCreate.json // this example is just showing the usage of "ExpressRouteCrossConnectionPeerings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCrossConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCrossConnectionResource.cs index f456bf378da42..d2d9ff958dcdb 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCrossConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteCrossConnectionResource.cs @@ -21,7 +21,7 @@ public partial class Sample_ExpressRouteCrossConnectionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetExpressRouteCrossConnections_ExpressRouteCrossConnectionList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCrossConnectionList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCrossConnectionList.json // this example is just showing the usage of "ExpressRouteCrossConnections_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task GetExpressRouteCrossConnections_ExpressRouteCrossConnectionLis [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetExpressRouteCrossConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCrossConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCrossConnectionGet.json // this example is just showing the usage of "ExpressRouteCrossConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Get_GetExpressRouteCrossConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateExpressRouteCrossConnectionTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteCrossConnectionUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteCrossConnectionUpdateTags.json // this example is just showing the usage of "ExpressRouteCrossConnections_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteGatewayCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteGatewayCollection.cs index a1575c6a7ce88..e1c220684a4f5 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteGatewayCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteGatewayCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ExpressRouteGatewayCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ExpressRouteGatewayListByResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteGatewayListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteGatewayListByResourceGroup.json // this example is just showing the usage of "ExpressRouteGateways_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ExpressRouteGatewayListByResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ExpressRouteGatewayCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteGatewayCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteGatewayCreate.json // this example is just showing the usage of "ExpressRouteGateways_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -102,7 +102,7 @@ public async Task CreateOrUpdate_ExpressRouteGatewayCreate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ExpressRouteGatewayGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteGatewayGet.json // this example is just showing the usage of "ExpressRouteGateways_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -136,7 +136,7 @@ public async Task Get_ExpressRouteGatewayGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ExpressRouteGatewayGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteGatewayGet.json // this example is just showing the usage of "ExpressRouteGateways_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task Exists_ExpressRouteGatewayGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ExpressRouteGatewayGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteGatewayGet.json // this example is just showing the usage of "ExpressRouteGateways_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteGatewayResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteGatewayResource.cs index a835f4e4c331a..488e9fc7e0e48 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteGatewayResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteGatewayResource.cs @@ -21,7 +21,7 @@ public partial class Sample_ExpressRouteGatewayResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetExpressRouteGateways_ExpressRouteGatewayListBySubscription() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteGatewayListBySubscription.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteGatewayListBySubscription.json // this example is just showing the usage of "ExpressRouteGateways_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task GetExpressRouteGateways_ExpressRouteGatewayListBySubscription( [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ExpressRouteGatewayUpdate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteGatewayUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteGatewayUpdateTags.json // this example is just showing the usage of "ExpressRouteGateways_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Update_ExpressRouteGatewayUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ExpressRouteGatewayGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteGatewayGet.json // this example is just showing the usage of "ExpressRouteGateways_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -124,7 +124,7 @@ public async Task Get_ExpressRouteGatewayGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ExpressRouteGatewayDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteGatewayDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteGatewayDelete.json // this example is just showing the usage of "ExpressRouteGateways_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteLinkCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteLinkCollection.cs index 1ea2ef86c13ac..b0288cff83bc5 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteLinkCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteLinkCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ExpressRouteLinkCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ExpressRouteLinkGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteLinkGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteLinkGet.json // this example is just showing the usage of "ExpressRouteLinks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_ExpressRouteLinkGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ExpressRouteLinkGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteLinkGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteLinkGet.json // this example is just showing the usage of "ExpressRouteLinks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Exists_ExpressRouteLinkGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ExpressRouteLinkGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteLinkGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteLinkGet.json // this example is just showing the usage of "ExpressRouteLinks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,7 +128,7 @@ public async Task GetIfExists_ExpressRouteLinkGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ExpressRouteLinkGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteLinkList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteLinkList.json // this example is just showing the usage of "ExpressRouteLinks_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteLinkResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteLinkResource.cs index 1736a45f2676e..fdcaa1f50a4c7 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteLinkResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteLinkResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ExpressRouteLinkResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ExpressRouteLinkGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteLinkGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteLinkGet.json // this example is just showing the usage of "ExpressRouteLinks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRoutePortAuthorizationCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRoutePortAuthorizationCollection.cs index 8c7173a0fe04b..49c9a5871247f 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRoutePortAuthorizationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRoutePortAuthorizationCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ExpressRoutePortAuthorizationCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetExpressRoutePortAuthorization() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRoutePortAuthorizationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRoutePortAuthorizationGet.json // this example is just showing the usage of "ExpressRoutePortAuthorizations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_GetExpressRoutePortAuthorization() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetExpressRoutePortAuthorization() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRoutePortAuthorizationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRoutePortAuthorizationGet.json // this example is just showing the usage of "ExpressRoutePortAuthorizations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Exists_GetExpressRoutePortAuthorization() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetExpressRoutePortAuthorization() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRoutePortAuthorizationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRoutePortAuthorizationGet.json // this example is just showing the usage of "ExpressRoutePortAuthorizations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,7 +128,7 @@ public async Task GetIfExists_GetExpressRoutePortAuthorization() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateExpressRoutePortAuthorization() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRoutePortAuthorizationCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRoutePortAuthorizationCreate.json // this example is just showing the usage of "ExpressRoutePortAuthorizations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -165,7 +165,7 @@ public async Task CreateOrUpdate_CreateExpressRoutePortAuthorization() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListExpressRoutePortAuthorization() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRoutePortAuthorizationList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRoutePortAuthorizationList.json // this example is just showing the usage of "ExpressRoutePortAuthorizations_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRoutePortAuthorizationResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRoutePortAuthorizationResource.cs index 8321570436857..c5996e3a6ed3a 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRoutePortAuthorizationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRoutePortAuthorizationResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ExpressRoutePortAuthorizationResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteExpressRoutePortAuthorization() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRoutePortAuthorizationDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRoutePortAuthorizationDelete.json // this example is just showing the usage of "ExpressRoutePortAuthorizations_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -47,7 +47,7 @@ public async Task Delete_DeleteExpressRoutePortAuthorization() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetExpressRoutePortAuthorization() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRoutePortAuthorizationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRoutePortAuthorizationGet.json // this example is just showing the usage of "ExpressRoutePortAuthorizations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +79,7 @@ public async Task Get_GetExpressRoutePortAuthorization() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateExpressRoutePortAuthorization() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRoutePortAuthorizationCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRoutePortAuthorizationCreate.json // this example is just showing the usage of "ExpressRoutePortAuthorizations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRoutePortCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRoutePortCollection.cs index 3b4a682ae991b..a38fb0394a7de 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRoutePortCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRoutePortCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ExpressRoutePortCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ExpressRoutePortGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRoutePortGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRoutePortGet.json // this example is just showing the usage of "ExpressRoutePorts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_ExpressRoutePortGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ExpressRoutePortGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRoutePortGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRoutePortGet.json // this example is just showing the usage of "ExpressRoutePorts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Exists_ExpressRoutePortGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ExpressRoutePortGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRoutePortGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRoutePortGet.json // this example is just showing the usage of "ExpressRoutePorts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -127,7 +127,7 @@ public async Task GetIfExists_ExpressRoutePortGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ExpressRoutePortCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRoutePortCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRoutePortCreate.json // this example is just showing the usage of "ExpressRoutePorts_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -170,7 +170,7 @@ public async Task CreateOrUpdate_ExpressRoutePortCreate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ExpressRoutePortUpdateLink() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRoutePortUpdateLink.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRoutePortUpdateLink.json // this example is just showing the usage of "ExpressRoutePorts_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -221,7 +221,7 @@ public async Task CreateOrUpdate_ExpressRoutePortUpdateLink() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ExpressRoutePortListByResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRoutePortListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRoutePortListByResourceGroup.json // this example is just showing the usage of "ExpressRoutePorts_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRoutePortResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRoutePortResource.cs index 3ff580bef75ee..366b664d6dc01 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRoutePortResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRoutePortResource.cs @@ -21,7 +21,7 @@ public partial class Sample_ExpressRoutePortResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ExpressRoutePortDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRoutePortDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRoutePortDelete.json // this example is just showing the usage of "ExpressRoutePorts_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Delete_ExpressRoutePortDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ExpressRoutePortGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRoutePortGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRoutePortGet.json // this example is just showing the usage of "ExpressRoutePorts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +79,7 @@ public async Task Get_ExpressRoutePortGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ExpressRoutePortUpdateTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRoutePortUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRoutePortUpdateTags.json // this example is just showing the usage of "ExpressRoutePorts_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task Update_ExpressRoutePortUpdateTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetExpressRoutePorts_ExpressRoutePortList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRoutePortList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRoutePortList.json // this example is just showing the usage of "ExpressRoutePorts_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -150,7 +150,7 @@ public async Task GetExpressRoutePorts_ExpressRoutePortList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GenerateLoa_GenerateExpressRoutePortLOA() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/GenerateExpressRoutePortsLOA.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/GenerateExpressRoutePortsLOA.json // this example is just showing the usage of "ExpressRoutePorts_GenerateLoa" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRoutePortsLocationCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRoutePortsLocationCollection.cs index 052e1b0b10aa9..bf39035b9697f 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRoutePortsLocationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRoutePortsLocationCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ExpressRoutePortsLocationCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ExpressRoutePortsLocationList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRoutePortsLocationList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRoutePortsLocationList.json // this example is just showing the usage of "ExpressRoutePortsLocations_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task GetAll_ExpressRoutePortsLocationList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ExpressRoutePortsLocationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRoutePortsLocationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRoutePortsLocationGet.json // this example is just showing the usage of "ExpressRoutePortsLocations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task Get_ExpressRoutePortsLocationGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ExpressRoutePortsLocationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRoutePortsLocationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRoutePortsLocationGet.json // this example is just showing the usage of "ExpressRoutePortsLocations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -117,7 +117,7 @@ public async Task Exists_ExpressRoutePortsLocationGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ExpressRoutePortsLocationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRoutePortsLocationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRoutePortsLocationGet.json // this example is just showing the usage of "ExpressRoutePortsLocations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRoutePortsLocationResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRoutePortsLocationResource.cs index eede400c8fbb4..ccdb671ee482f 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRoutePortsLocationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRoutePortsLocationResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ExpressRoutePortsLocationResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ExpressRoutePortsLocationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRoutePortsLocationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRoutePortsLocationGet.json // this example is just showing the usage of "ExpressRoutePortsLocations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteProviderPortCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteProviderPortCollection.cs index 6e878cbedfc69..993649e735c28 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteProviderPortCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteProviderPortCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ExpressRouteProviderPortCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ExpressRouteProviderPort() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/expressRouteProviderPort.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/expressRouteProviderPort.json // this example is just showing the usage of "ExpressRouteProviderPort" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Get_ExpressRouteProviderPort() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ExpressRouteProviderPort() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/expressRouteProviderPort.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/expressRouteProviderPort.json // this example is just showing the usage of "ExpressRouteProviderPort" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task Exists_ExpressRouteProviderPort() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ExpressRouteProviderPort() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/expressRouteProviderPort.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/expressRouteProviderPort.json // this example is just showing the usage of "ExpressRouteProviderPort" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task GetIfExists_ExpressRouteProviderPort() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ExpressRouteProviderPortList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/expressRouteProviderPortList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/expressRouteProviderPortList.json // this example is just showing the usage of "ExpressRouteProviderPortsLocation_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteProviderPortResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteProviderPortResource.cs index e99e0535c68b8..c17a9d4e38446 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteProviderPortResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ExpressRouteProviderPortResource.cs @@ -21,7 +21,7 @@ public partial class Sample_ExpressRouteProviderPortResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckDnsNameAvailability_CheckDnsNameAvailability() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/CheckDnsNameAvailability.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/CheckDnsNameAvailability.json // this example is just showing the usage of "CheckDnsNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task CheckDnsNameAvailability_CheckDnsNameAvailability() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ExpressRouteProviderPort() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/expressRouteProviderPort.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/expressRouteProviderPort.json // this example is just showing the usage of "ExpressRouteProviderPort" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FirewallPolicyCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FirewallPolicyCollection.cs index 0b6f19f7a9402..de22eaf5a3004 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FirewallPolicyCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FirewallPolicyCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_FirewallPolicyCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetFirewallPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyGet.json // this example is just showing the usage of "FirewallPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetFirewallPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetFirewallPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyGet.json // this example is just showing the usage of "FirewallPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Exists_GetFirewallPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetFirewallPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyGet.json // this example is just showing the usage of "FirewallPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -127,7 +127,7 @@ public async Task GetIfExists_GetFirewallPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateFirewallPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyPut.json // this example is just showing the usage of "FirewallPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -272,7 +272,7 @@ public async Task CreateOrUpdate_CreateFirewallPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAllFirewallPoliciesForAGivenResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyListByResourceGroup.json // this example is just showing the usage of "FirewallPolicies_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FirewallPolicyDraftResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FirewallPolicyDraftResource.cs index 34a67bbe89909..2fb371c6ff204 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FirewallPolicyDraftResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FirewallPolicyDraftResource.cs @@ -20,7 +20,7 @@ public partial class Sample_FirewallPolicyDraftResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateFirewallPolicyDraft() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyDraftPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyDraftPut.json // this example is just showing the usage of "FirewallPolicyDrafts_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -151,7 +151,7 @@ public async Task CreateOrUpdate_CreateOrUpdateFirewallPolicyDraft() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteFirewallPolicyDraft() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyDraftDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyDraftDelete.json // this example is just showing the usage of "FirewallPolicyDrafts_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -178,7 +178,7 @@ public async Task Delete_DeleteFirewallPolicyDraft() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetFirewallPolicyDraft() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyDraftGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyDraftGet.json // this example is just showing the usage of "FirewallPolicyDrafts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FirewallPolicyResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FirewallPolicyResource.cs index f3a0ead9b3eb3..ee91e61e1b280 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FirewallPolicyResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FirewallPolicyResource.cs @@ -21,7 +21,7 @@ public partial class Sample_FirewallPolicyResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteFirewallPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyDelete.json // this example is just showing the usage of "FirewallPolicies_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Delete_DeleteFirewallPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetFirewallPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyGet.json // this example is just showing the usage of "FirewallPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +79,7 @@ public async Task Get_GetFirewallPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateFirewallPolicyTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyPatch.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyPatch.json // this example is just showing the usage of "FirewallPolicies_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task Update_UpdateFirewallPolicyTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetFirewallPolicies_ListAllFirewallPoliciesForAGivenSubscription() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyListBySubscription.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyListBySubscription.json // this example is just showing the usage of "FirewallPolicies_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -150,7 +150,7 @@ public async Task GetFirewallPolicies_ListAllFirewallPoliciesForAGivenSubscripti [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetFirewallPolicyIdpsSignature_QuerySignatureOverrides() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyQuerySignatureOverrides.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyQuerySignatureOverrides.json // this example is just showing the usage of "FirewallPolicyIdpsSignatures_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -199,7 +199,7 @@ public async Task GetFirewallPolicyIdpsSignature_QuerySignatureOverrides() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetFirewallPolicyIdpsSignaturesFilterValue_QuerySignatureOverrides() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyQuerySignatureOverridesFilterValues.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyQuerySignatureOverridesFilterValues.json // this example is just showing the usage of "FirewallPolicyIdpsSignaturesFilterValues_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -230,7 +230,7 @@ public async Task GetFirewallPolicyIdpsSignaturesFilterValue_QuerySignatureOverr [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task DeployFirewallPolicyDeployment_DeployFirewallPolicyDraft() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyDraftDeploy.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyDraftDeploy.json // this example is just showing the usage of "FirewallPolicyDeployments_Deploy" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FirewallPolicyRuleCollectionGroupCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FirewallPolicyRuleCollectionGroupCollection.cs index 60253a2e4de5e..f696a4e09b753 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FirewallPolicyRuleCollectionGroupCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FirewallPolicyRuleCollectionGroupCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_FirewallPolicyRuleCollectionGroupCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetFirewallPolicyNatRuleCollectionGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetFirewallPolicyNatRuleCollectionGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetFirewallPolicyNatRuleCollectionGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Exists_GetFirewallPolicyNatRuleCollectionGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetFirewallPolicyNatRuleCollectionGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetIfExists_GetFirewallPolicyNatRuleCollectionGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetFirewallPolicyRuleCollectionGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyRuleCollectionGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyRuleCollectionGroupGet.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -164,7 +164,7 @@ public async Task Get_GetFirewallPolicyRuleCollectionGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetFirewallPolicyRuleCollectionGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyRuleCollectionGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyRuleCollectionGroupGet.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -195,7 +195,7 @@ public async Task Exists_GetFirewallPolicyRuleCollectionGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetFirewallPolicyRuleCollectionGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyRuleCollectionGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyRuleCollectionGroupGet.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -238,7 +238,7 @@ public async Task GetIfExists_GetFirewallPolicyRuleCollectionGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetFirewallPolicyRuleCollectionGroupWithIpGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsGet.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -273,7 +273,7 @@ public async Task Get_GetFirewallPolicyRuleCollectionGroupWithIpGroups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetFirewallPolicyRuleCollectionGroupWithIpGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsGet.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -304,7 +304,7 @@ public async Task Exists_GetFirewallPolicyRuleCollectionGroupWithIpGroups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetFirewallPolicyRuleCollectionGroupWithIpGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsGet.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -347,7 +347,7 @@ public async Task GetIfExists_GetFirewallPolicyRuleCollectionGroupWithIpGroups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetFirewallPolicyRuleCollectionGroupWithWebCategories() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesGet.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -382,7 +382,7 @@ public async Task Get_GetFirewallPolicyRuleCollectionGroupWithWebCategories() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetFirewallPolicyRuleCollectionGroupWithWebCategories() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesGet.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -413,7 +413,7 @@ public async Task Exists_GetFirewallPolicyRuleCollectionGroupWithWebCategories() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetFirewallPolicyRuleCollectionGroupWithWebCategories() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesGet.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -456,7 +456,7 @@ public async Task GetIfExists_GetFirewallPolicyRuleCollectionGroupWithWebCategor [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateFirewallPolicyNatRuleCollectionGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyNatRuleCollectionGroupPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyNatRuleCollectionGroupPut.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -533,7 +533,7 @@ public async Task CreateOrUpdate_CreateFirewallPolicyNatRuleCollectionGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateFirewallPolicyRuleCollectionGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyRuleCollectionGroupPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyRuleCollectionGroupPut.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -605,7 +605,7 @@ public async Task CreateOrUpdate_CreateFirewallPolicyRuleCollectionGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateFirewallPolicyRuleCollectionGroupWithIPGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsPut.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -676,7 +676,7 @@ public async Task CreateOrUpdate_CreateFirewallPolicyRuleCollectionGroupWithIPGr [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateFirewallPolicyRuleCollectionGroupWithWebCategories() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesPut.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -748,7 +748,7 @@ public async Task CreateOrUpdate_CreateFirewallPolicyRuleCollectionGroupWithWebC [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateFirewallPolicyRuleCollectionGroupWithHttpHeaderToInsert() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyRuleCollectionGroupWithHttpHeadersToInsert.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyRuleCollectionGroupWithHttpHeadersToInsert.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -828,7 +828,7 @@ public async Task CreateOrUpdate_CreateFirewallPolicyRuleCollectionGroupWithHttp [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAllFirewallPolicyRuleCollectionGroupWithWebCategories() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesList.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -865,7 +865,7 @@ public async Task GetAll_ListAllFirewallPolicyRuleCollectionGroupWithWebCategori [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAllFirewallPolicyRuleCollectionGroupsForAGivenFirewallPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyRuleCollectionGroupList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyRuleCollectionGroupList.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -902,7 +902,7 @@ public async Task GetAll_ListAllFirewallPolicyRuleCollectionGroupsForAGivenFirew [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAllFirewallPolicyRuleCollectionGroupsWithIpGroupsForAGivenFirewallPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsList.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FirewallPolicyRuleCollectionGroupDraftResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FirewallPolicyRuleCollectionGroupDraftResource.cs index 543412dc12f23..72e64b8f5ef92 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FirewallPolicyRuleCollectionGroupDraftResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FirewallPolicyRuleCollectionGroupDraftResource.cs @@ -20,7 +20,7 @@ public partial class Sample_FirewallPolicyRuleCollectionGroupDraftResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteFirewallRuleCollectionGroupDraft() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyRuleCollectionGroupDraftDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyRuleCollectionGroupDraftDelete.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroupDrafts_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Delete_DeleteFirewallRuleCollectionGroupDraft() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateRuleCollectionGroupDraft() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyRuleCollectionGroupDraftPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyRuleCollectionGroupDraftPut.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroupDrafts_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -117,7 +117,7 @@ public async Task CreateOrUpdate_CreateOrUpdateRuleCollectionGroupDraft() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetRuleCollectionGroupDraft() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyRuleCollectionGroupDraftGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyRuleCollectionGroupDraftGet.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroupDrafts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FirewallPolicyRuleCollectionGroupResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FirewallPolicyRuleCollectionGroupResource.cs index 71b034d9d19d3..6d770a6d4b9d8 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FirewallPolicyRuleCollectionGroupResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FirewallPolicyRuleCollectionGroupResource.cs @@ -20,7 +20,7 @@ public partial class Sample_FirewallPolicyRuleCollectionGroupResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteFirewallPolicyRuleCollectionGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyRuleCollectionGroupDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyRuleCollectionGroupDelete.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Delete_DeleteFirewallPolicyRuleCollectionGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetFirewallPolicyNatRuleCollectionGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Get_GetFirewallPolicyNatRuleCollectionGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetFirewallPolicyRuleCollectionGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyRuleCollectionGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyRuleCollectionGroupGet.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -112,7 +112,7 @@ public async Task Get_GetFirewallPolicyRuleCollectionGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetFirewallPolicyRuleCollectionGroupWithIpGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsGet.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -144,7 +144,7 @@ public async Task Get_GetFirewallPolicyRuleCollectionGroupWithIpGroups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetFirewallPolicyRuleCollectionGroupWithWebCategories() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesGet.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -176,7 +176,7 @@ public async Task Get_GetFirewallPolicyRuleCollectionGroupWithWebCategories() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateFirewallPolicyNatRuleCollectionGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyNatRuleCollectionGroupPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyNatRuleCollectionGroupPut.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -250,7 +250,7 @@ public async Task Update_CreateFirewallPolicyNatRuleCollectionGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateFirewallPolicyRuleCollectionGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyRuleCollectionGroupPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyRuleCollectionGroupPut.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -319,7 +319,7 @@ public async Task Update_CreateFirewallPolicyRuleCollectionGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateFirewallPolicyRuleCollectionGroupWithIPGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyRuleCollectionGroupWithIpGroupsPut.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -387,7 +387,7 @@ public async Task Update_CreateFirewallPolicyRuleCollectionGroupWithIPGroups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateFirewallPolicyRuleCollectionGroupWithWebCategories() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesPut.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -456,7 +456,7 @@ public async Task Update_CreateFirewallPolicyRuleCollectionGroupWithWebCategorie [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateFirewallPolicyRuleCollectionGroupWithHttpHeaderToInsert() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicyRuleCollectionGroupWithHttpHeadersToInsert.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicyRuleCollectionGroupWithHttpHeadersToInsert.json // this example is just showing the usage of "FirewallPolicyRuleCollectionGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FlowLogCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FlowLogCollection.cs index 7cca06f03ff60..6d57af1a32c43 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FlowLogCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FlowLogCollection.cs @@ -9,6 +9,7 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; +using Azure.ResourceManager.Models; using Azure.ResourceManager.Network.Models; namespace Azure.ResourceManager.Network.Samples @@ -20,7 +21,7 @@ public partial class Sample_FlowLogCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateFlowLog() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherFlowLogCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherFlowLogCreate.json // this example is just showing the usage of "FlowLogs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -43,6 +44,13 @@ public async Task CreateOrUpdate_CreateOrUpdateFlowLog() string flowLogName = "fl"; FlowLogData data = new FlowLogData() { + Identity = new ManagedServiceIdentity("UserAssigned") + { + UserAssignedIdentities = +{ +[new ResourceIdentifier("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1")] = new UserAssignedIdentity(), +}, + }, TargetResourceId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/desmondcentral-nsg"), StorageId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/nwtest1mgvbfmqsigdxe"), Enabled = true, @@ -68,7 +76,7 @@ public async Task CreateOrUpdate_CreateOrUpdateFlowLog() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetFlowLog() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherFlowLogGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherFlowLogGet.json // this example is just showing the usage of "FlowLogs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -103,7 +111,7 @@ public async Task Get_GetFlowLog() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetFlowLog() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherFlowLogGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherFlowLogGet.json // this example is just showing the usage of "FlowLogs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -134,7 +142,7 @@ public async Task Exists_GetFlowLog() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetFlowLog() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherFlowLogGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherFlowLogGet.json // this example is just showing the usage of "FlowLogs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -177,7 +185,7 @@ public async Task GetIfExists_GetFlowLog() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListConnectionMonitors() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherFlowLogList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherFlowLogList.json // this example is just showing the usage of "FlowLogs_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FlowLogResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FlowLogResource.cs index 42d62e222d54c..b189bfef79f94 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FlowLogResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FlowLogResource.cs @@ -20,7 +20,7 @@ public partial class Sample_FlowLogResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateFlowLogTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherFlowLogUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherFlowLogUpdateTags.json // this example is just showing the usage of "FlowLogs_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task Update_UpdateFlowLogTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetFlowLog() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherFlowLogGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherFlowLogGet.json // this example is just showing the usage of "FlowLogs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_GetFlowLog() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteFlowLog() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherFlowLogDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherFlowLogDelete.json // this example is just showing the usage of "FlowLogs_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FrontendIPConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FrontendIPConfigurationCollection.cs index 78a55f2590244..10912f7de96e0 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FrontendIPConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FrontendIPConfigurationCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_FrontendIPConfigurationCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_LoadBalancerFrontendIPConfigurationList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerFrontendIPConfigurationList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerFrontendIPConfigurationList.json // this example is just showing the usage of "LoadBalancerFrontendIPConfigurations_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_LoadBalancerFrontendIPConfigurationList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_LoadBalancerFrontendIPConfigurationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerFrontendIPConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerFrontendIPConfigurationGet.json // this example is just showing the usage of "LoadBalancerFrontendIPConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_LoadBalancerFrontendIPConfigurationGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_LoadBalancerFrontendIPConfigurationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerFrontendIPConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerFrontendIPConfigurationGet.json // this example is just showing the usage of "LoadBalancerFrontendIPConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Exists_LoadBalancerFrontendIPConfigurationGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_LoadBalancerFrontendIPConfigurationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerFrontendIPConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerFrontendIPConfigurationGet.json // this example is just showing the usage of "LoadBalancerFrontendIPConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FrontendIPConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FrontendIPConfigurationResource.cs index e2e4fd94de35a..cd2966ec6a284 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FrontendIPConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_FrontendIPConfigurationResource.cs @@ -19,7 +19,7 @@ public partial class Sample_FrontendIPConfigurationResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_LoadBalancerFrontendIPConfigurationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerFrontendIPConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerFrontendIPConfigurationGet.json // this example is just showing the usage of "LoadBalancerFrontendIPConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_HubIPConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_HubIPConfigurationCollection.cs index 864fed8e89838..904d839c4e25f 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_HubIPConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_HubIPConfigurationCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_HubIPConfigurationCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VirtualHubVirtualHubRouteTableV2Get() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualHubIpConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualHubIpConfigurationGet.json // this example is just showing the usage of "VirtualHubIpConfiguration_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_VirtualHubVirtualHubRouteTableV2Get() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_VirtualHubVirtualHubRouteTableV2Get() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualHubIpConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualHubIpConfigurationGet.json // this example is just showing the usage of "VirtualHubIpConfiguration_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Exists_VirtualHubVirtualHubRouteTableV2Get() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_VirtualHubVirtualHubRouteTableV2Get() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualHubIpConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualHubIpConfigurationGet.json // this example is just showing the usage of "VirtualHubIpConfiguration_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,7 +128,7 @@ public async Task GetIfExists_VirtualHubVirtualHubRouteTableV2Get() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_VirtualHubIpConfigurationPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualHubIpConfigurationPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualHubIpConfigurationPut.json // this example is just showing the usage of "VirtualHubIpConfiguration_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -171,7 +171,7 @@ public async Task CreateOrUpdate_VirtualHubIpConfigurationPut() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_VirtualHubRouteTableV2List() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualHubIpConfigurationList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualHubIpConfigurationList.json // this example is just showing the usage of "VirtualHubIpConfiguration_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_HubIPConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_HubIPConfigurationResource.cs index f2df48735d50a..f5eb1d4d36280 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_HubIPConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_HubIPConfigurationResource.cs @@ -19,7 +19,7 @@ public partial class Sample_HubIPConfigurationResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VirtualHubVirtualHubRouteTableV2Get() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualHubIpConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualHubIpConfigurationGet.json // this example is just showing the usage of "VirtualHubIpConfiguration_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_VirtualHubVirtualHubRouteTableV2Get() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_VirtualHubIpConfigurationPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualHubIpConfigurationPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualHubIpConfigurationPut.json // this example is just showing the usage of "VirtualHubIpConfiguration_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Update_VirtualHubIpConfigurationPut() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_VirtualHubIpConfigurationDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualHubIpConfigurationDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualHubIpConfigurationDelete.json // this example is just showing the usage of "VirtualHubIpConfiguration_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_HubRouteTableCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_HubRouteTableCollection.cs index cee122fa69a4e..19330edd3e3ce 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_HubRouteTableCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_HubRouteTableCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_HubRouteTableCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_RouteTablePut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/HubRouteTablePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/HubRouteTablePut.json // this example is just showing the usage of "HubRouteTables_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -70,7 +70,7 @@ public async Task CreateOrUpdate_RouteTablePut() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_RouteTableGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/HubRouteTableGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/HubRouteTableGet.json // this example is just showing the usage of "HubRouteTables_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -105,7 +105,7 @@ public async Task Get_RouteTableGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_RouteTableGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/HubRouteTableGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/HubRouteTableGet.json // this example is just showing the usage of "HubRouteTables_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -136,7 +136,7 @@ public async Task Exists_RouteTableGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_RouteTableGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/HubRouteTableGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/HubRouteTableGet.json // this example is just showing the usage of "HubRouteTables_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -179,7 +179,7 @@ public async Task GetIfExists_RouteTableGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_RouteTableList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/HubRouteTableList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/HubRouteTableList.json // this example is just showing the usage of "HubRouteTables_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_HubRouteTableResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_HubRouteTableResource.cs index a283ad85aacc7..677324869e469 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_HubRouteTableResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_HubRouteTableResource.cs @@ -20,7 +20,7 @@ public partial class Sample_HubRouteTableResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_RouteTablePut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/HubRouteTablePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/HubRouteTablePut.json // this example is just showing the usage of "HubRouteTables_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -67,7 +67,7 @@ public async Task Update_RouteTablePut() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_RouteTableGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/HubRouteTableGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/HubRouteTableGet.json // this example is just showing the usage of "HubRouteTables_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -99,7 +99,7 @@ public async Task Get_RouteTableGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_RouteTableDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/HubRouteTableDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/HubRouteTableDelete.json // this example is just showing the usage of "HubRouteTables_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_HubVirtualNetworkConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_HubVirtualNetworkConnectionCollection.cs index c7c4f234a41df..7f0582ac13ec0 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_HubVirtualNetworkConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_HubVirtualNetworkConnectionCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_HubVirtualNetworkConnectionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_HubVirtualNetworkConnectionPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/HubVirtualNetworkConnectionPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/HubVirtualNetworkConnectionPut.json // this example is just showing the usage of "HubVirtualNetworkConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -109,7 +109,7 @@ public async Task CreateOrUpdate_HubVirtualNetworkConnectionPut() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_HubVirtualNetworkConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/HubVirtualNetworkConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/HubVirtualNetworkConnectionGet.json // this example is just showing the usage of "HubVirtualNetworkConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -144,7 +144,7 @@ public async Task Get_HubVirtualNetworkConnectionGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_HubVirtualNetworkConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/HubVirtualNetworkConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/HubVirtualNetworkConnectionGet.json // this example is just showing the usage of "HubVirtualNetworkConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -175,7 +175,7 @@ public async Task Exists_HubVirtualNetworkConnectionGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_HubVirtualNetworkConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/HubVirtualNetworkConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/HubVirtualNetworkConnectionGet.json // this example is just showing the usage of "HubVirtualNetworkConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -218,7 +218,7 @@ public async Task GetIfExists_HubVirtualNetworkConnectionGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_HubVirtualNetworkConnectionList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/HubVirtualNetworkConnectionList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/HubVirtualNetworkConnectionList.json // this example is just showing the usage of "HubVirtualNetworkConnections_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_HubVirtualNetworkConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_HubVirtualNetworkConnectionResource.cs index 9b0860ad21959..dcbbaf9303feb 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_HubVirtualNetworkConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_HubVirtualNetworkConnectionResource.cs @@ -21,7 +21,7 @@ public partial class Sample_HubVirtualNetworkConnectionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_HubVirtualNetworkConnectionPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/HubVirtualNetworkConnectionPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/HubVirtualNetworkConnectionPut.json // this example is just showing the usage of "HubVirtualNetworkConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -106,7 +106,7 @@ public async Task Update_HubVirtualNetworkConnectionPut() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_HubVirtualNetworkConnectionDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/HubVirtualNetworkConnectionDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/HubVirtualNetworkConnectionDelete.json // this example is just showing the usage of "HubVirtualNetworkConnections_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -134,7 +134,7 @@ public async Task Delete_HubVirtualNetworkConnectionDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_HubVirtualNetworkConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/HubVirtualNetworkConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/HubVirtualNetworkConnectionGet.json // this example is just showing the usage of "HubVirtualNetworkConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_IPAllocationCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_IPAllocationCollection.cs index ac5200ec4901c..93add02963049 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_IPAllocationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_IPAllocationCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_IPAllocationCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetIpAllocation() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/IpAllocationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/IpAllocationGet.json // this example is just showing the usage of "IpAllocations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetIpAllocation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetIpAllocation() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/IpAllocationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/IpAllocationGet.json // this example is just showing the usage of "IpAllocations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Exists_GetIpAllocation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetIpAllocation() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/IpAllocationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/IpAllocationGet.json // this example is just showing the usage of "IpAllocations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -127,7 +127,7 @@ public async Task GetIfExists_GetIpAllocation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateIpAllocation() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/IpAllocationCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/IpAllocationCreate.json // this example is just showing the usage of "IpAllocations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -172,7 +172,7 @@ public async Task CreateOrUpdate_CreateIpAllocation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListIpAllocationsInResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/IpAllocationListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/IpAllocationListByResourceGroup.json // this example is just showing the usage of "IpAllocations_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_IPAllocationResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_IPAllocationResource.cs index f7ea5faecaf87..9520490add282 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_IPAllocationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_IPAllocationResource.cs @@ -21,7 +21,7 @@ public partial class Sample_IPAllocationResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteIpAllocation() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/IpAllocationDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/IpAllocationDelete.json // this example is just showing the usage of "IpAllocations_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Delete_DeleteIpAllocation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetIpAllocation() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/IpAllocationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/IpAllocationGet.json // this example is just showing the usage of "IpAllocations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +79,7 @@ public async Task Get_GetIpAllocation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateVirtualNetworkTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/IpAllocationUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/IpAllocationUpdateTags.json // this example is just showing the usage of "IpAllocations_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task Update_UpdateVirtualNetworkTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIPAllocations_ListAllIpAllocations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/IpAllocationList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/IpAllocationList.json // this example is just showing the usage of "IpAllocations_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_IPGroupCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_IPGroupCollection.cs index 9000b983a8201..08a1c4eae4db0 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_IPGroupCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_IPGroupCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_IPGroupCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetIpGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/IpGroupsGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/IpGroupsGet.json // this example is just showing the usage of "IpGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_GetIpGroups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetIpGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/IpGroupsGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/IpGroupsGet.json // this example is just showing the usage of "IpGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Exists_GetIpGroups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetIpGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/IpGroupsGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/IpGroupsGet.json // this example is just showing the usage of "IpGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task GetIfExists_GetIpGroups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateIpGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/IpGroupsCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/IpGroupsCreate.json // this example is just showing the usage of "IpGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -173,7 +173,7 @@ public async Task CreateOrUpdate_CreateOrUpdateIpGroups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListByResourceGroupIpGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/IpGroupsListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/IpGroupsListByResourceGroup.json // this example is just showing the usage of "IpGroups_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_IPGroupResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_IPGroupResource.cs index 14bc7bcf92363..030e8194176e5 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_IPGroupResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_IPGroupResource.cs @@ -21,7 +21,7 @@ public partial class Sample_IPGroupResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetIpGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/IpGroupsGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/IpGroupsGet.json // this example is just showing the usage of "IpGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_GetIpGroups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateIpGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/IpGroupsUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/IpGroupsUpdateTags.json // this example is just showing the usage of "IpGroups_UpdateGroups" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Update_UpdateIpGroups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteIpGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/IpGroupsDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/IpGroupsDelete.json // this example is just showing the usage of "IpGroups_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task Delete_DeleteIpGroups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIPGroups_ListIpGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/IpGroupsListBySubscription.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/IpGroupsListBySubscription.json // this example is just showing the usage of "IpGroups_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_InboundNatRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_InboundNatRuleCollection.cs index 52344fda5f727..1a0e3afde1efd 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_InboundNatRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_InboundNatRuleCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_InboundNatRuleCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_InboundNatRuleList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/InboundNatRuleList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/InboundNatRuleList.json // this example is just showing the usage of "InboundNatRules_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_InboundNatRuleList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_InboundNatRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/InboundNatRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/InboundNatRuleGet.json // this example is just showing the usage of "InboundNatRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_InboundNatRuleGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_InboundNatRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/InboundNatRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/InboundNatRuleGet.json // this example is just showing the usage of "InboundNatRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_InboundNatRuleGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_InboundNatRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/InboundNatRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/InboundNatRuleGet.json // this example is just showing the usage of "InboundNatRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_InboundNatRuleGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_InboundNatRuleCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/InboundNatRuleCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/InboundNatRuleCreate.json // this example is just showing the usage of "InboundNatRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_InboundNatRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_InboundNatRuleResource.cs index bf1b8c6953a51..27d2d86f03aa9 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_InboundNatRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_InboundNatRuleResource.cs @@ -20,7 +20,7 @@ public partial class Sample_InboundNatRuleResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_InboundNatRuleDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/InboundNatRuleDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/InboundNatRuleDelete.json // this example is just showing the usage of "InboundNatRules_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Delete_InboundNatRuleDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_InboundNatRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/InboundNatRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/InboundNatRuleGet.json // this example is just showing the usage of "InboundNatRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Get_InboundNatRuleGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_InboundNatRuleCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/InboundNatRuleCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/InboundNatRuleCreate.json // this example is just showing the usage of "InboundNatRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_InboundSecurityRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_InboundSecurityRuleCollection.cs new file mode 100644 index 0000000000000..3c46b6f846760 --- /dev/null +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_InboundSecurityRuleCollection.cs @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Network.Models; + +namespace Azure.ResourceManager.Network.Samples +{ + public partial class Sample_InboundSecurityRuleCollection + { + // Create Network Virtual Appliance Inbound Security Rules + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateNetworkVirtualApplianceInboundSecurityRules() + { + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/InboundSecurityRulePut.json + // this example is just showing the usage of "InboundSecurityRule_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkVirtualApplianceResource created on azure + // for more information of creating NetworkVirtualApplianceResource, please refer to the document of NetworkVirtualApplianceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string networkVirtualApplianceName = "nva"; + ResourceIdentifier networkVirtualApplianceResourceId = NetworkVirtualApplianceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkVirtualApplianceName); + NetworkVirtualApplianceResource networkVirtualAppliance = client.GetNetworkVirtualApplianceResource(networkVirtualApplianceResourceId); + + // get the collection of this InboundSecurityRuleResource + InboundSecurityRuleCollection collection = networkVirtualAppliance.GetInboundSecurityRules(); + + // invoke the operation + string ruleCollectionName = "rule1"; + InboundSecurityRuleData data = new InboundSecurityRuleData() + { + RuleType = InboundSecurityRuleType.Permanent, + Rules = +{ +new InboundSecurityRules() +{ +Name = "inboundRule1", +Protocol = InboundSecurityRulesProtocol.Tcp, +SourceAddressPrefix = "50.20.121.5/32", +DestinationPortRange = 22, +DestinationPortRanges = +{ +"80-100" +}, +AppliesOn = +{ +"slbip1" +}, +} +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, ruleCollectionName, data); + InboundSecurityRuleResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + InboundSecurityRuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Create Network Virtual Appliance Inbound Security Rules + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_CreateNetworkVirtualApplianceInboundSecurityRules() + { + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/InboundSecurityRuleGet.json + // this example is just showing the usage of "InboundSecurityRule_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkVirtualApplianceResource created on azure + // for more information of creating NetworkVirtualApplianceResource, please refer to the document of NetworkVirtualApplianceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string networkVirtualApplianceName = "nva"; + ResourceIdentifier networkVirtualApplianceResourceId = NetworkVirtualApplianceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkVirtualApplianceName); + NetworkVirtualApplianceResource networkVirtualAppliance = client.GetNetworkVirtualApplianceResource(networkVirtualApplianceResourceId); + + // get the collection of this InboundSecurityRuleResource + InboundSecurityRuleCollection collection = networkVirtualAppliance.GetInboundSecurityRules(); + + // invoke the operation + string ruleCollectionName = "rule1"; + InboundSecurityRuleResource result = await collection.GetAsync(ruleCollectionName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + InboundSecurityRuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Create Network Virtual Appliance Inbound Security Rules + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_CreateNetworkVirtualApplianceInboundSecurityRules() + { + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/InboundSecurityRuleGet.json + // this example is just showing the usage of "InboundSecurityRule_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkVirtualApplianceResource created on azure + // for more information of creating NetworkVirtualApplianceResource, please refer to the document of NetworkVirtualApplianceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string networkVirtualApplianceName = "nva"; + ResourceIdentifier networkVirtualApplianceResourceId = NetworkVirtualApplianceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkVirtualApplianceName); + NetworkVirtualApplianceResource networkVirtualAppliance = client.GetNetworkVirtualApplianceResource(networkVirtualApplianceResourceId); + + // get the collection of this InboundSecurityRuleResource + InboundSecurityRuleCollection collection = networkVirtualAppliance.GetInboundSecurityRules(); + + // invoke the operation + string ruleCollectionName = "rule1"; + bool result = await collection.ExistsAsync(ruleCollectionName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Create Network Virtual Appliance Inbound Security Rules + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_CreateNetworkVirtualApplianceInboundSecurityRules() + { + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/InboundSecurityRuleGet.json + // this example is just showing the usage of "InboundSecurityRule_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkVirtualApplianceResource created on azure + // for more information of creating NetworkVirtualApplianceResource, please refer to the document of NetworkVirtualApplianceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string networkVirtualApplianceName = "nva"; + ResourceIdentifier networkVirtualApplianceResourceId = NetworkVirtualApplianceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkVirtualApplianceName); + NetworkVirtualApplianceResource networkVirtualAppliance = client.GetNetworkVirtualApplianceResource(networkVirtualApplianceResourceId); + + // get the collection of this InboundSecurityRuleResource + InboundSecurityRuleCollection collection = networkVirtualAppliance.GetInboundSecurityRules(); + + // invoke the operation + string ruleCollectionName = "rule1"; + NullableResponse response = await collection.GetIfExistsAsync(ruleCollectionName); + InboundSecurityRuleResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + InboundSecurityRuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_InboundSecurityRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_InboundSecurityRuleResource.cs new file mode 100644 index 0000000000000..df65bb6283185 --- /dev/null +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_InboundSecurityRuleResource.cs @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Network.Models; + +namespace Azure.ResourceManager.Network.Samples +{ + public partial class Sample_InboundSecurityRuleResource + { + // Create Network Virtual Appliance Inbound Security Rules + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_CreateNetworkVirtualApplianceInboundSecurityRules() + { + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/InboundSecurityRulePut.json + // this example is just showing the usage of "InboundSecurityRule_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this InboundSecurityRuleResource created on azure + // for more information of creating InboundSecurityRuleResource, please refer to the document of InboundSecurityRuleResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string networkVirtualApplianceName = "nva"; + string ruleCollectionName = "rule1"; + ResourceIdentifier inboundSecurityRuleResourceId = InboundSecurityRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkVirtualApplianceName, ruleCollectionName); + InboundSecurityRuleResource inboundSecurityRule = client.GetInboundSecurityRuleResource(inboundSecurityRuleResourceId); + + // invoke the operation + InboundSecurityRuleData data = new InboundSecurityRuleData() + { + RuleType = InboundSecurityRuleType.Permanent, + Rules = +{ +new InboundSecurityRules() +{ +Name = "inboundRule1", +Protocol = InboundSecurityRulesProtocol.Tcp, +SourceAddressPrefix = "50.20.121.5/32", +DestinationPortRange = 22, +DestinationPortRanges = +{ +"80-100" +}, +AppliesOn = +{ +"slbip1" +}, +} +}, + }; + ArmOperation lro = await inboundSecurityRule.UpdateAsync(WaitUntil.Completed, data); + InboundSecurityRuleResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + InboundSecurityRuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Create Network Virtual Appliance Inbound Security Rules + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_CreateNetworkVirtualApplianceInboundSecurityRules() + { + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/InboundSecurityRuleGet.json + // this example is just showing the usage of "InboundSecurityRule_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this InboundSecurityRuleResource created on azure + // for more information of creating InboundSecurityRuleResource, please refer to the document of InboundSecurityRuleResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string networkVirtualApplianceName = "nva"; + string ruleCollectionName = "rule1"; + ResourceIdentifier inboundSecurityRuleResourceId = InboundSecurityRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkVirtualApplianceName, ruleCollectionName); + InboundSecurityRuleResource inboundSecurityRule = client.GetInboundSecurityRuleResource(inboundSecurityRuleResourceId); + + // invoke the operation + InboundSecurityRuleResource result = await inboundSecurityRule.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + InboundSecurityRuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_LoadBalancerCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_LoadBalancerCollection.cs index 90e56ea8240b2..4365dd8571b2e 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_LoadBalancerCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_LoadBalancerCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_LoadBalancerCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetLoadBalancer() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerGet.json // this example is just showing the usage of "LoadBalancers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task Get_GetLoadBalancer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetLoadBalancer() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerGet.json // this example is just showing the usage of "LoadBalancers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Exists_GetLoadBalancer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetLoadBalancer() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerGet.json // this example is just showing the usage of "LoadBalancers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,7 +128,7 @@ public async Task GetIfExists_GetLoadBalancer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetLoadBalancerWithInboundNATRulePortMapping() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerGetInboundNatRulePortMapping.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerGetInboundNatRulePortMapping.json // this example is just showing the usage of "LoadBalancers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -162,7 +162,7 @@ public async Task Get_GetLoadBalancerWithInboundNATRulePortMapping() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetLoadBalancerWithInboundNATRulePortMapping() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerGetInboundNatRulePortMapping.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerGetInboundNatRulePortMapping.json // this example is just showing the usage of "LoadBalancers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -192,7 +192,7 @@ public async Task Exists_GetLoadBalancerWithInboundNATRulePortMapping() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetLoadBalancerWithInboundNATRulePortMapping() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerGetInboundNatRulePortMapping.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerGetInboundNatRulePortMapping.json // this example is just showing the usage of "LoadBalancers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -234,7 +234,7 @@ public async Task GetIfExists_GetLoadBalancerWithInboundNATRulePortMapping() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateLoadBalancer() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerCreate.json // this example is just showing the usage of "LoadBalancers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -338,7 +338,7 @@ public async Task CreateOrUpdate_CreateLoadBalancer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateLoadBalancerWithFrontendIPInZone1() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerCreateWithZones.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerCreateWithZones.json // this example is just showing the usage of "LoadBalancers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -451,7 +451,7 @@ public async Task CreateOrUpdate_CreateLoadBalancerWithFrontendIPInZone1() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateLoadBalancerWithGatewayLoadBalancerConsumerConfigured() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerCreateGatewayLoadBalancerConsumer.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerCreateGatewayLoadBalancerConsumer.json // this example is just showing the usage of "LoadBalancers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -561,7 +561,7 @@ public async Task CreateOrUpdate_CreateLoadBalancerWithGatewayLoadBalancerConsum [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithOneBackendPool() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithOneBackendPool.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithOneBackendPool.json // this example is just showing the usage of "LoadBalancers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -679,7 +679,7 @@ public async Task CreateOrUpdate_CreateLoadBalancerWithGatewayLoadBalancerProvid [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateLoadBalancerWithGatewayLoadBalancerProviderConfiguredWithTwoBackendPool() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithTwoBackendPool.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerCreateGatewayLoadBalancerProviderWithTwoBackendPool.json // this example is just showing the usage of "LoadBalancers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -787,7 +787,7 @@ public async Task CreateOrUpdate_CreateLoadBalancerWithGatewayLoadBalancerProvid [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateLoadBalancerWithGlobalTierAndOneRegionalLoadBalancerInItsBackendPool() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerCreateGlobalTier.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerCreateGlobalTier.json // this example is just showing the usage of "LoadBalancers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -886,7 +886,7 @@ public async Task CreateOrUpdate_CreateLoadBalancerWithGlobalTierAndOneRegionalL [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateLoadBalancerWithStandardSKU() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerCreateStandardSku.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerCreateStandardSku.json // this example is just showing the usage of "LoadBalancers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -995,7 +995,7 @@ public async Task CreateOrUpdate_CreateLoadBalancerWithStandardSKU() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateLoadBalancerWithSyncModePropertyOnPool() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerCreateWithSyncModePropertyOnPool.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerCreateWithSyncModePropertyOnPool.json // this example is just showing the usage of "LoadBalancers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1106,7 +1106,7 @@ public async Task CreateOrUpdate_CreateLoadBalancerWithSyncModePropertyOnPool() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateLoadBalancerWithInboundNatPool() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerCreateWithInboundNatPool.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerCreateWithInboundNatPool.json // this example is just showing the usage of "LoadBalancers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1196,7 +1196,7 @@ public async Task CreateOrUpdate_CreateLoadBalancerWithInboundNatPool() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateLoadBalancerWithOutboundRules() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerCreateWithOutboundRules.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerCreateWithOutboundRules.json // this example is just showing the usage of "LoadBalancers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1319,7 +1319,7 @@ public async Task CreateOrUpdate_CreateLoadBalancerWithOutboundRules() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListLoadBalancersInResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerList.json // this example is just showing the usage of "LoadBalancers_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_LoadBalancerResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_LoadBalancerResource.cs index b2abbfe31820a..4ab0576c09012 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_LoadBalancerResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_LoadBalancerResource.cs @@ -21,7 +21,7 @@ public partial class Sample_LoadBalancerResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteLoadBalancer() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerDelete.json // this example is just showing the usage of "LoadBalancers_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Delete_DeleteLoadBalancer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetLoadBalancer() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerGet.json // this example is just showing the usage of "LoadBalancers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +79,7 @@ public async Task Get_GetLoadBalancer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetLoadBalancerWithInboundNATRulePortMapping() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerGetInboundNatRulePortMapping.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerGetInboundNatRulePortMapping.json // this example is just showing the usage of "LoadBalancers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -110,7 +110,7 @@ public async Task Get_GetLoadBalancerWithInboundNATRulePortMapping() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateLoadBalancerTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerUpdateTags.json // this example is just showing the usage of "LoadBalancers_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -149,7 +149,7 @@ public async Task Update_UpdateLoadBalancerTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetLoadBalancers_ListAllLoadBalancers() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerListAll.json // this example is just showing the usage of "LoadBalancers_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -181,7 +181,7 @@ public async Task GetLoadBalancers_ListAllLoadBalancers() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task SwapPublicIPAddressesLoadBalancer_SwapVIPsBetweenTwoLoadBalancers() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancersSwapPublicIpAddresses.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancersSwapPublicIpAddresses.json // this example is just showing the usage of "LoadBalancers_SwapPublicIPAddresses" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -222,7 +222,7 @@ public async Task SwapPublicIPAddressesLoadBalancer_SwapVIPsBetweenTwoLoadBalanc [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task MigrateToIPBased_MigrateLoadBalancerToIPBased() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/MigrateLoadBalancerToIPBased.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/MigrateLoadBalancerToIPBased.json // this example is just showing the usage of "LoadBalancers_MigrateToIPBased" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -256,7 +256,7 @@ public async Task MigrateToIPBased_MigrateLoadBalancerToIPBased() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetLoadBalancerNetworkInterfaces_LoadBalancerNetworkInterfaceListSimple() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerNetworkInterfaceListSimple.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerNetworkInterfaceListSimple.json // this example is just showing the usage of "LoadBalancerNetworkInterfaces_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -290,7 +290,7 @@ public async Task GetLoadBalancerNetworkInterfaces_LoadBalancerNetworkInterfaceL [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetLoadBalancerNetworkInterfaces_LoadBalancerNetworkInterfaceListVmss() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerNetworkInterfaceListVmss.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerNetworkInterfaceListVmss.json // this example is just showing the usage of "LoadBalancerNetworkInterfaces_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_LoadBalancingRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_LoadBalancingRuleCollection.cs index 223852f4689bf..4b339ae742f7e 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_LoadBalancingRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_LoadBalancingRuleCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_LoadBalancingRuleCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_LoadBalancerLoadBalancingRuleList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerLoadBalancingRuleList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerLoadBalancingRuleList.json // this example is just showing the usage of "LoadBalancerLoadBalancingRules_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_LoadBalancerLoadBalancingRuleList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_LoadBalancerLoadBalancingRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerLoadBalancingRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerLoadBalancingRuleGet.json // this example is just showing the usage of "LoadBalancerLoadBalancingRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_LoadBalancerLoadBalancingRuleGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_LoadBalancerLoadBalancingRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerLoadBalancingRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerLoadBalancingRuleGet.json // this example is just showing the usage of "LoadBalancerLoadBalancingRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Exists_LoadBalancerLoadBalancingRuleGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_LoadBalancerLoadBalancingRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerLoadBalancingRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerLoadBalancingRuleGet.json // this example is just showing the usage of "LoadBalancerLoadBalancingRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_LoadBalancingRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_LoadBalancingRuleResource.cs index 14ea386a1d498..62ef87fab730c 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_LoadBalancingRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_LoadBalancingRuleResource.cs @@ -19,7 +19,7 @@ public partial class Sample_LoadBalancingRuleResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_LoadBalancerLoadBalancingRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerLoadBalancingRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerLoadBalancingRuleGet.json // this example is just showing the usage of "LoadBalancerLoadBalancingRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_LocalNetworkGatewayCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_LocalNetworkGatewayCollection.cs index 0f99d7354a635..a1bd00c5df90f 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_LocalNetworkGatewayCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_LocalNetworkGatewayCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_LocalNetworkGatewayCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateLocalNetworkGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LocalNetworkGatewayCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LocalNetworkGatewayCreate.json // this example is just showing the usage of "LocalNetworkGateways_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -65,7 +65,7 @@ public async Task CreateOrUpdate_CreateLocalNetworkGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetLocalNetworkGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LocalNetworkGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LocalNetworkGatewayGet.json // this example is just showing the usage of "LocalNetworkGateways_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -99,7 +99,7 @@ public async Task Get_GetLocalNetworkGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetLocalNetworkGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LocalNetworkGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LocalNetworkGatewayGet.json // this example is just showing the usage of "LocalNetworkGateways_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task Exists_GetLocalNetworkGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetLocalNetworkGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LocalNetworkGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LocalNetworkGatewayGet.json // this example is just showing the usage of "LocalNetworkGateways_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -171,7 +171,7 @@ public async Task GetIfExists_GetLocalNetworkGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListLocalNetworkGateways() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LocalNetworkGatewayList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LocalNetworkGatewayList.json // this example is just showing the usage of "LocalNetworkGateways_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_LocalNetworkGatewayResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_LocalNetworkGatewayResource.cs index 46ff8690daf6b..485c4b10e93e4 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_LocalNetworkGatewayResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_LocalNetworkGatewayResource.cs @@ -20,7 +20,7 @@ public partial class Sample_LocalNetworkGatewayResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetLocalNetworkGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LocalNetworkGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LocalNetworkGatewayGet.json // this example is just showing the usage of "LocalNetworkGateways_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_GetLocalNetworkGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteLocalNetworkGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LocalNetworkGatewayDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LocalNetworkGatewayDelete.json // this example is just showing the usage of "LocalNetworkGateways_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_DeleteLocalNetworkGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateLocalNetworkGatewayTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LocalNetworkGatewayUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LocalNetworkGatewayUpdateTags.json // this example is just showing the usage of "LocalNetworkGateways_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ManagementGroupNetworkManagerConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ManagementGroupNetworkManagerConnectionCollection.cs index f61f56ca52c04..0b9bc843f856e 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ManagementGroupNetworkManagerConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ManagementGroupNetworkManagerConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagementGroupNetworkManagerConnectionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateManagementGroupNetworkManagerConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerConnectionManagementGroupPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerConnectionManagementGroupPut.json // this example is just showing the usage of "ManagementGroupNetworkManagerConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task CreateOrUpdate_CreateOrUpdateManagementGroupNetworkManagerConn [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetManagementGroupNetworkManagerConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerConnectionManagementGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerConnectionManagementGroupGet.json // this example is just showing the usage of "ManagementGroupNetworkManagerConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_GetManagementGroupNetworkManagerConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetManagementGroupNetworkManagerConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerConnectionManagementGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerConnectionManagementGroupGet.json // this example is just showing the usage of "ManagementGroupNetworkManagerConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +120,7 @@ public async Task Exists_GetManagementGroupNetworkManagerConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetManagementGroupNetworkManagerConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerConnectionManagementGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerConnectionManagementGroupGet.json // this example is just showing the usage of "ManagementGroupNetworkManagerConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -161,7 +161,7 @@ public async Task GetIfExists_GetManagementGroupNetworkManagerConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListManagementGroupNetworkManagerConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerConnectionManagementGroupList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerConnectionManagementGroupList.json // this example is just showing the usage of "ManagementGroupNetworkManagerConnections_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ManagementGroupNetworkManagerConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ManagementGroupNetworkManagerConnectionResource.cs index d56693795fd53..9df5bcc20f347 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ManagementGroupNetworkManagerConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ManagementGroupNetworkManagerConnectionResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ManagementGroupNetworkManagerConnectionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateManagementGroupNetworkManagerConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerConnectionManagementGroupPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerConnectionManagementGroupPut.json // this example is just showing the usage of "ManagementGroupNetworkManagerConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Update_CreateOrUpdateManagementGroupNetworkManagerConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetManagementGroupNetworkManagerConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerConnectionManagementGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerConnectionManagementGroupGet.json // this example is just showing the usage of "ManagementGroupNetworkManagerConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Get_GetManagementGroupNetworkManagerConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteManagementGroupNetworkManagerConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerConnectionManagementGroupDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerConnectionManagementGroupDelete.json // this example is just showing the usage of "ManagementGroupNetworkManagerConnections_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NatGatewayCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NatGatewayCollection.cs index 0c0f3b4e682f3..535eec10289f1 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NatGatewayCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NatGatewayCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_NatGatewayCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetNatGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NatGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NatGatewayGet.json // this example is just showing the usage of "NatGateways_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task Get_GetNatGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetNatGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NatGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NatGatewayGet.json // this example is just showing the usage of "NatGateways_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Exists_GetNatGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetNatGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NatGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NatGatewayGet.json // this example is just showing the usage of "NatGateways_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,7 +128,7 @@ public async Task GetIfExists_GetNatGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateNatGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NatGatewayCreateOrUpdate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NatGatewayCreateOrUpdate.json // this example is just showing the usage of "NatGateways_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -182,7 +182,7 @@ public async Task CreateOrUpdate_CreateNatGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListNatGatewaysInResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NatGatewayList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NatGatewayList.json // this example is just showing the usage of "NatGateways_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NatGatewayResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NatGatewayResource.cs index 895aded818b84..7cd541f36738e 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NatGatewayResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NatGatewayResource.cs @@ -21,7 +21,7 @@ public partial class Sample_NatGatewayResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteNatGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NatGatewayDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NatGatewayDelete.json // this example is just showing the usage of "NatGateways_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Delete_DeleteNatGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetNatGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NatGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NatGatewayGet.json // this example is just showing the usage of "NatGateways_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +79,7 @@ public async Task Get_GetNatGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateNatGatewayTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NatGatewayUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NatGatewayUpdateTags.json // this example is just showing the usage of "NatGateways_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task Update_UpdateNatGatewayTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNatGateways_ListAllNatGateways() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NatGatewayListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NatGatewayListAll.json // this example is just showing the usage of "NatGateways_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkGroupCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkGroupCollection.cs index 493689fced541..cb9477dd91257 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkGroupCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkGroupCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_NetworkGroupCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_NetworkGroupsGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerGroupGet.json // this example is just showing the usage of "NetworkGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_NetworkGroupsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_NetworkGroupsGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerGroupGet.json // this example is just showing the usage of "NetworkGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Exists_NetworkGroupsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_NetworkGroupsGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerGroupGet.json // this example is just showing the usage of "NetworkGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,7 +128,7 @@ public async Task GetIfExists_NetworkGroupsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_NetworkGroupsPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerGroupPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerGroupPut.json // this example is just showing the usage of "NetworkGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -168,7 +168,7 @@ public async Task CreateOrUpdate_NetworkGroupsPut() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_NetworkGroupsList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerGroupList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerGroupList.json // this example is just showing the usage of "NetworkGroups_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkGroupResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkGroupResource.cs index b544fc8be4ac9..ce7506c2ca4fb 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkGroupResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkGroupResource.cs @@ -19,7 +19,7 @@ public partial class Sample_NetworkGroupResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_NetworkGroupsGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerGroupGet.json // this example is just showing the usage of "NetworkGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_NetworkGroupsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_NetworkGroupsPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerGroupPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerGroupPut.json // this example is just showing the usage of "NetworkGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task Update_NetworkGroupsPut() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_NetworkGroupsDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerGroupDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerGroupDelete.json // this example is just showing the usage of "NetworkGroups_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkGroupStaticMemberCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkGroupStaticMemberCollection.cs index e9d504f463fe8..ca0c476ed9ce7 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkGroupStaticMemberCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkGroupStaticMemberCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_NetworkGroupStaticMemberCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_StaticMembersGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerStaticMemberGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerStaticMemberGet.json // this example is just showing the usage of "StaticMembers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_StaticMembersGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_StaticMembersGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerStaticMemberGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerStaticMemberGet.json // this example is just showing the usage of "StaticMembers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -87,7 +87,7 @@ public async Task Exists_StaticMembersGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_StaticMembersGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerStaticMemberGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerStaticMemberGet.json // this example is just showing the usage of "StaticMembers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -131,7 +131,7 @@ public async Task GetIfExists_StaticMembersGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_StaticMemberPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerStaticMemberPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerStaticMemberPut.json // this example is just showing the usage of "StaticMembers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -172,7 +172,7 @@ public async Task CreateOrUpdate_StaticMemberPut() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_StaticMembersList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerStaticMemberList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerStaticMemberList.json // this example is just showing the usage of "StaticMembers_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkGroupStaticMemberResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkGroupStaticMemberResource.cs index 9908b6a2b8cfd..7fca81f3c7b28 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkGroupStaticMemberResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkGroupStaticMemberResource.cs @@ -19,7 +19,7 @@ public partial class Sample_NetworkGroupStaticMemberResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_StaticMembersGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerStaticMemberGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerStaticMemberGet.json // this example is just showing the usage of "StaticMembers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_StaticMembersGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_StaticMemberPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerStaticMemberPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerStaticMemberPut.json // this example is just showing the usage of "StaticMembers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,7 +90,7 @@ public async Task Update_StaticMemberPut() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_StaticMembersDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerStaticMemberDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerStaticMemberDelete.json // this example is just showing the usage of "StaticMembers_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkInterfaceCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkInterfaceCollection.cs index 60bdfd29dde21..216f9d1f84916 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkInterfaceCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkInterfaceCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkInterfaceCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetNetworkInterface() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkInterfaceGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkInterfaceGet.json // this example is just showing the usage of "NetworkInterfaces_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_GetNetworkInterface() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetNetworkInterface() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkInterfaceGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkInterfaceGet.json // this example is just showing the usage of "NetworkInterfaces_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Exists_GetNetworkInterface() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetNetworkInterface() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkInterfaceGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkInterfaceGet.json // this example is just showing the usage of "NetworkInterfaces_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task GetIfExists_GetNetworkInterface() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateNetworkInterface() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkInterfaceCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkInterfaceCreate.json // this example is just showing the usage of "NetworkInterfaces_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -186,7 +186,7 @@ public async Task CreateOrUpdate_CreateNetworkInterface() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateNetworkInterfaceWithGatewayLoadBalancerConsumerConfigured() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkInterfaceCreateGatewayLoadBalancerConsumer.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkInterfaceCreateGatewayLoadBalancerConsumer.json // this example is just showing the usage of "NetworkInterfaces_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -242,7 +242,7 @@ public async Task CreateOrUpdate_CreateNetworkInterfaceWithGatewayLoadBalancerCo [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListNetworkInterfacesInResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkInterfaceList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkInterfaceList.json // this example is just showing the usage of "NetworkInterfaces_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkInterfaceIPConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkInterfaceIPConfigurationCollection.cs index e7842483a0fa7..c637c08839f2d 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkInterfaceIPConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkInterfaceIPConfigurationCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_NetworkInterfaceIPConfigurationCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_NetworkInterfaceIPConfigurationList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkInterfaceIPConfigurationList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkInterfaceIPConfigurationList.json // this example is just showing the usage of "NetworkInterfaceIPConfigurations_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_NetworkInterfaceIPConfigurationList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_NetworkInterfaceIPConfigurationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkInterfaceIPConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkInterfaceIPConfigurationGet.json // this example is just showing the usage of "NetworkInterfaceIPConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_NetworkInterfaceIPConfigurationGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_NetworkInterfaceIPConfigurationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkInterfaceIPConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkInterfaceIPConfigurationGet.json // this example is just showing the usage of "NetworkInterfaceIPConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Exists_NetworkInterfaceIPConfigurationGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_NetworkInterfaceIPConfigurationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkInterfaceIPConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkInterfaceIPConfigurationGet.json // this example is just showing the usage of "NetworkInterfaceIPConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkInterfaceIPConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkInterfaceIPConfigurationResource.cs index 392cb1bf11a4c..7a40953a30cbb 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkInterfaceIPConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkInterfaceIPConfigurationResource.cs @@ -19,7 +19,7 @@ public partial class Sample_NetworkInterfaceIPConfigurationResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_NetworkInterfaceIPConfigurationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkInterfaceIPConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkInterfaceIPConfigurationGet.json // this example is just showing the usage of "NetworkInterfaceIPConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkInterfaceResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkInterfaceResource.cs index f527708eb82ce..76faed9f0a2f4 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkInterfaceResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkInterfaceResource.cs @@ -21,7 +21,7 @@ public partial class Sample_NetworkInterfaceResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteNetworkInterface() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkInterfaceDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkInterfaceDelete.json // this example is just showing the usage of "NetworkInterfaces_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Delete_DeleteNetworkInterface() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetNetworkInterface() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkInterfaceGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkInterfaceGet.json // this example is just showing the usage of "NetworkInterfaces_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +79,7 @@ public async Task Get_GetNetworkInterface() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateNetworkInterfaceTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkInterfaceUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkInterfaceUpdateTags.json // this example is just showing the usage of "NetworkInterfaces_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task Update_UpdateNetworkInterfaceTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkInterfaces_ListAllNetworkInterfaces() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkInterfaceListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkInterfaceListAll.json // this example is just showing the usage of "NetworkInterfaces_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -150,7 +150,7 @@ public async Task GetNetworkInterfaces_ListAllNetworkInterfaces() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEffectiveRouteTable_ShowNetworkInterfaceEffectiveRouteTables() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkInterfaceEffectiveRouteTableList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkInterfaceEffectiveRouteTableList.json // this example is just showing the usage of "NetworkInterfaces_GetEffectiveRouteTable" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -178,7 +178,7 @@ public async Task GetEffectiveRouteTable_ShowNetworkInterfaceEffectiveRouteTable [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEffectiveNetworkSecurityGroups_ListNetworkInterfaceEffectiveNetworkSecurityGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkInterfaceEffectiveNSGList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkInterfaceEffectiveNSGList.json // this example is just showing the usage of "NetworkInterfaces_ListEffectiveNetworkSecurityGroups" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -206,7 +206,7 @@ public async Task GetEffectiveNetworkSecurityGroups_ListNetworkInterfaceEffectiv [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkInterfaceLoadBalancers_NetworkInterfaceLoadBalancerList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkInterfaceLoadBalancerList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkInterfaceLoadBalancerList.json // this example is just showing the usage of "NetworkInterfaceLoadBalancers_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkInterfaceTapConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkInterfaceTapConfigurationCollection.cs index b377d453f4514..2f9a4055b1617 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkInterfaceTapConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkInterfaceTapConfigurationCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_NetworkInterfaceTapConfigurationCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetNetworkInterfaceTapConfigurations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkInterfaceTapConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkInterfaceTapConfigurationGet.json // this example is just showing the usage of "NetworkInterfaceTapConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_GetNetworkInterfaceTapConfigurations() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetNetworkInterfaceTapConfigurations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkInterfaceTapConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkInterfaceTapConfigurationGet.json // this example is just showing the usage of "NetworkInterfaceTapConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Exists_GetNetworkInterfaceTapConfigurations() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetNetworkInterfaceTapConfigurations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkInterfaceTapConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkInterfaceTapConfigurationGet.json // this example is just showing the usage of "NetworkInterfaceTapConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,7 +128,7 @@ public async Task GetIfExists_GetNetworkInterfaceTapConfigurations() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateNetworkInterfaceTapConfigurations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkInterfaceTapConfigurationCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkInterfaceTapConfigurationCreate.json // this example is just showing the usage of "NetworkInterfaceTapConfigurations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -171,7 +171,7 @@ public async Task CreateOrUpdate_CreateNetworkInterfaceTapConfigurations() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListVirtualNetworkTapConfigurations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkInterfaceTapConfigurationList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkInterfaceTapConfigurationList.json // this example is just showing the usage of "NetworkInterfaceTapConfigurations_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkInterfaceTapConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkInterfaceTapConfigurationResource.cs index 27599e7db2bf5..588c3af75651f 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkInterfaceTapConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkInterfaceTapConfigurationResource.cs @@ -19,7 +19,7 @@ public partial class Sample_NetworkInterfaceTapConfigurationResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteTapConfiguration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkInterfaceTapConfigurationDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkInterfaceTapConfigurationDelete.json // this example is just showing the usage of "NetworkInterfaceTapConfigurations_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -47,7 +47,7 @@ public async Task Delete_DeleteTapConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetNetworkInterfaceTapConfigurations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkInterfaceTapConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkInterfaceTapConfigurationGet.json // this example is just showing the usage of "NetworkInterfaceTapConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +79,7 @@ public async Task Get_GetNetworkInterfaceTapConfigurations() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateNetworkInterfaceTapConfigurations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkInterfaceTapConfigurationCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkInterfaceTapConfigurationCreate.json // this example is just showing the usage of "NetworkInterfaceTapConfigurations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkManagerCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkManagerCollection.cs index afa0ff873fb49..99dbaa9c0a840 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkManagerCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkManagerCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_NetworkManagerCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_NetworkManagersGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerGet.json // this example is just showing the usage of "NetworkManagers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_NetworkManagersGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_NetworkManagersGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerGet.json // this example is just showing the usage of "NetworkManagers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Exists_NetworkManagersGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_NetworkManagersGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerGet.json // this example is just showing the usage of "NetworkManagers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -127,7 +127,7 @@ public async Task GetIfExists_NetworkManagersGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_PutNetworkManager() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerPut.json // this example is just showing the usage of "NetworkManagers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -181,7 +181,7 @@ public async Task CreateOrUpdate_PutNetworkManager() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListNetworkManager() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerList.json // this example is just showing the usage of "NetworkManagers_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkManagerResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkManagerResource.cs index be96f0abd083a..f99c57f130a55 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkManagerResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkManagerResource.cs @@ -21,7 +21,7 @@ public partial class Sample_NetworkManagerResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetActiveConnectivityConfigurations_ListActiveConnectivityConfigurations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerActiveConnectivityConfigurationsList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerActiveConnectivityConfigurationsList.json // this example is just showing the usage of "ListActiveConnectivityConfigurations" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -59,7 +59,7 @@ public async Task GetActiveConnectivityConfigurations_ListActiveConnectivityConf [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetActiveSecurityAdminRules_ListActiveSecurityAdminRules() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerActiveSecurityAdminRulesList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerActiveSecurityAdminRulesList.json // this example is just showing the usage of "ListActiveSecurityAdminRules" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -97,7 +97,7 @@ public async Task GetActiveSecurityAdminRules_ListActiveSecurityAdminRules() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_NetworkManagersGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerGet.json // this example is just showing the usage of "NetworkManagers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,7 +128,7 @@ public async Task Get_NetworkManagersGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_NetworkManagersDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerDelete.json // this example is just showing the usage of "NetworkManagers_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -156,7 +156,7 @@ public async Task Delete_NetworkManagersDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_NetworkManagesPatch() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerPatch.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerPatch.json // this example is just showing the usage of "NetworkManagers_Patch" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -195,7 +195,7 @@ public async Task Update_NetworkManagesPatch() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkManagers_NetworkManagersList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerListAll.json // this example is just showing the usage of "NetworkManagers_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -227,7 +227,7 @@ public async Task GetNetworkManagers_NetworkManagersList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task PostNetworkManagerCommit_NetworkManageCommitPost() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerCommitPost.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerCommitPost.json // this example is just showing the usage of "NetworkManagerCommits_Post" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -265,7 +265,7 @@ public async Task PostNetworkManagerCommit_NetworkManageCommitPost() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkManagerDeploymentStatus_NetworkManagerDeploymentStatusList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerDeploymentStatusList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerDeploymentStatusList.json // this example is just showing the usage of "NetworkManagerDeploymentStatus_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkPrivateEndpointConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkPrivateEndpointConnectionCollection.cs index 96debba14b87f..3241e011ac474 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkPrivateEndpointConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkPrivateEndpointConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkPrivateEndpointConnectionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetPrivateEndPointConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateLinkServices_GetPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetPrivateEndPointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetPrivateEndPointConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateLinkServices_GetPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Exists_GetPrivateEndPointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetPrivateEndPointConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateLinkServices_GetPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetIfExists_GetPrivateEndPointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApproveOrRejectPrivateEndPointConnectionForAPrivateLinkService() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateLinkServiceUpdatePrivateEndpointConnection.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateLinkServiceUpdatePrivateEndpointConnection.json // this example is just showing the usage of "PrivateLinkServices_UpdatePrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -174,7 +174,7 @@ public async Task CreateOrUpdate_ApproveOrRejectPrivateEndPointConnectionForAPri [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListPrivateLinkServiceInResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateLinkServiceListPrivateEndpointConnection.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateLinkServiceListPrivateEndpointConnection.json // this example is just showing the usage of "PrivateLinkServices_ListPrivateEndpointConnections" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkPrivateEndpointConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkPrivateEndpointConnectionResource.cs index 7967129229b7b..6a829837ef5bc 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkPrivateEndpointConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkPrivateEndpointConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkPrivateEndpointConnectionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetPrivateEndPointConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateLinkServices_GetPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_GetPrivateEndPointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApproveOrRejectPrivateEndPointConnectionForAPrivateLinkService() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateLinkServiceUpdatePrivateEndpointConnection.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateLinkServiceUpdatePrivateEndpointConnection.json // this example is just showing the usage of "PrivateLinkServices_UpdatePrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -94,7 +94,7 @@ public async Task Update_ApproveOrRejectPrivateEndPointConnectionForAPrivateLink [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeletePrivateEndPointConnectionForAPrivateLinkService() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateLinkServiceDeletePrivateEndpointConnection.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateLinkServiceDeletePrivateEndpointConnection.json // this example is just showing the usage of "PrivateLinkServices_DeletePrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkProfileCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkProfileCollection.cs index b31603ca7e39a..a0d7c486ee400 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkProfileCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkProfileCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_NetworkProfileCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetNetworkProfile() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkProfileGetConfigOnly.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkProfileGetConfigOnly.json // this example is just showing the usage of "NetworkProfiles_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetNetworkProfile() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetNetworkProfile() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkProfileGetConfigOnly.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkProfileGetConfigOnly.json // this example is just showing the usage of "NetworkProfiles_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Exists_GetNetworkProfile() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetNetworkProfile() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkProfileGetConfigOnly.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkProfileGetConfigOnly.json // this example is just showing the usage of "NetworkProfiles_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -127,7 +127,7 @@ public async Task GetIfExists_GetNetworkProfile() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetNetworkProfileWithContainerNetworkInterfaces() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkProfileGetWithContainerNic.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkProfileGetWithContainerNic.json // this example is just showing the usage of "NetworkProfiles_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -161,7 +161,7 @@ public async Task Get_GetNetworkProfileWithContainerNetworkInterfaces() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetNetworkProfileWithContainerNetworkInterfaces() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkProfileGetWithContainerNic.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkProfileGetWithContainerNic.json // this example is just showing the usage of "NetworkProfiles_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -191,7 +191,7 @@ public async Task Exists_GetNetworkProfileWithContainerNetworkInterfaces() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetNetworkProfileWithContainerNetworkInterfaces() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkProfileGetWithContainerNic.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkProfileGetWithContainerNic.json // this example is just showing the usage of "NetworkProfiles_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -233,7 +233,7 @@ public async Task GetIfExists_GetNetworkProfileWithContainerNetworkInterfaces() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateNetworkProfileDefaults() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkProfileCreateConfigOnly.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkProfileCreateConfigOnly.json // this example is just showing the usage of "NetworkProfiles_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -290,7 +290,7 @@ public async Task CreateOrUpdate_CreateNetworkProfileDefaults() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListResourceGroupNetworkProfiles() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkProfileList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkProfileList.json // this example is just showing the usage of "NetworkProfiles_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkProfileResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkProfileResource.cs index 9ff6b22ed54a4..b2213a26fb8c7 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkProfileResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkProfileResource.cs @@ -21,7 +21,7 @@ public partial class Sample_NetworkProfileResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteNetworkProfile() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkProfileDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkProfileDelete.json // this example is just showing the usage of "NetworkProfiles_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Delete_DeleteNetworkProfile() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetNetworkProfile() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkProfileGetConfigOnly.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkProfileGetConfigOnly.json // this example is just showing the usage of "NetworkProfiles_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +79,7 @@ public async Task Get_GetNetworkProfile() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetNetworkProfileWithContainerNetworkInterfaces() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkProfileGetWithContainerNic.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkProfileGetWithContainerNic.json // this example is just showing the usage of "NetworkProfiles_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -110,7 +110,7 @@ public async Task Get_GetNetworkProfileWithContainerNetworkInterfaces() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateNetworkProfileTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkProfileUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkProfileUpdateTags.json // this example is just showing the usage of "NetworkProfiles_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -149,7 +149,7 @@ public async Task Update_UpdateNetworkProfileTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkProfiles_ListAllNetworkProfiles() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkProfileListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkProfileListAll.json // this example is just showing the usage of "NetworkProfiles_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkSecurityGroupCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkSecurityGroupCollection.cs index 1d1725fd60320..b954fc53ef774 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkSecurityGroupCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkSecurityGroupCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_NetworkSecurityGroupCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetNetworkSecurityGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkSecurityGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkSecurityGroupGet.json // this example is just showing the usage of "NetworkSecurityGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetNetworkSecurityGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetNetworkSecurityGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkSecurityGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkSecurityGroupGet.json // this example is just showing the usage of "NetworkSecurityGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Exists_GetNetworkSecurityGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetNetworkSecurityGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkSecurityGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkSecurityGroupGet.json // this example is just showing the usage of "NetworkSecurityGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -127,7 +127,7 @@ public async Task GetIfExists_GetNetworkSecurityGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateNetworkSecurityGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkSecurityGroupCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkSecurityGroupCreate.json // this example is just showing the usage of "NetworkSecurityGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task CreateOrUpdate_CreateNetworkSecurityGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateNetworkSecurityGroupWithRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkSecurityGroupCreateWithRule.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkSecurityGroupCreateWithRule.json // this example is just showing the usage of "NetworkSecurityGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -220,7 +220,7 @@ public async Task CreateOrUpdate_CreateNetworkSecurityGroupWithRule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListNetworkSecurityGroupsInResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkSecurityGroupList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkSecurityGroupList.json // this example is just showing the usage of "NetworkSecurityGroups_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkSecurityGroupResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkSecurityGroupResource.cs index 2628b25673961..8c93041105ae1 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkSecurityGroupResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkSecurityGroupResource.cs @@ -21,7 +21,7 @@ public partial class Sample_NetworkSecurityGroupResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteNetworkSecurityGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkSecurityGroupDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkSecurityGroupDelete.json // this example is just showing the usage of "NetworkSecurityGroups_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Delete_DeleteNetworkSecurityGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetNetworkSecurityGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkSecurityGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkSecurityGroupGet.json // this example is just showing the usage of "NetworkSecurityGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +79,7 @@ public async Task Get_GetNetworkSecurityGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateNetworkSecurityGroupTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkSecurityGroupUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkSecurityGroupUpdateTags.json // this example is just showing the usage of "NetworkSecurityGroups_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task Update_UpdateNetworkSecurityGroupTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkSecurityGroups_ListAllNetworkSecurityGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkSecurityGroupListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkSecurityGroupListAll.json // this example is just showing the usage of "NetworkSecurityGroups_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkVirtualApplianceCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkVirtualApplianceCollection.cs index f320488285bea..9df11d0894366 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkVirtualApplianceCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkVirtualApplianceCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_NetworkVirtualApplianceCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetNetworkVirtualAppliance() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkVirtualApplianceGet.json // this example is just showing the usage of "NetworkVirtualAppliances_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task Get_GetNetworkVirtualAppliance() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetNetworkVirtualAppliance() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkVirtualApplianceGet.json // this example is just showing the usage of "NetworkVirtualAppliances_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -87,7 +87,7 @@ public async Task Exists_GetNetworkVirtualAppliance() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetNetworkVirtualAppliance() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkVirtualApplianceGet.json // this example is just showing the usage of "NetworkVirtualAppliances_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetIfExists_GetNetworkVirtualAppliance() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateNetworkVirtualAppliance() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualAppliancePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkVirtualAppliancePut.json // this example is just showing the usage of "NetworkVirtualAppliances_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -244,7 +244,7 @@ public async Task CreateOrUpdate_CreateNetworkVirtualAppliance() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateSaaSNetworkVirtualAppliance() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceSaaSPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkVirtualApplianceSaaSPut.json // this example is just showing the usage of "NetworkVirtualAppliances_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -292,7 +292,7 @@ public async Task CreateOrUpdate_CreateSaaSNetworkVirtualAppliance() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAllNetworkVirtualApplianceForAGivenResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkVirtualApplianceListByResourceGroup.json // this example is just showing the usage of "NetworkVirtualAppliances_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkVirtualApplianceConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkVirtualApplianceConnectionCollection.cs index 8be2325f1c9ec..af3e8f821fc5b 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkVirtualApplianceConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkVirtualApplianceConnectionCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_NetworkVirtualApplianceConnectionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_NetworkVirtualApplianceConnectionPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceConnectionPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkVirtualApplianceConnectionPut.json // this example is just showing the usage of "NetworkVirtualApplianceConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task CreateOrUpdate_NetworkVirtualApplianceConnectionPut() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_NetworkVirtualApplianceConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkVirtualApplianceConnectionGet.json // this example is just showing the usage of "NetworkVirtualApplianceConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -124,7 +124,7 @@ public async Task Get_NetworkVirtualApplianceConnectionGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_NetworkVirtualApplianceConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkVirtualApplianceConnectionGet.json // this example is just showing the usage of "NetworkVirtualApplianceConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -155,7 +155,7 @@ public async Task Exists_NetworkVirtualApplianceConnectionGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_NetworkVirtualApplianceConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkVirtualApplianceConnectionGet.json // this example is just showing the usage of "NetworkVirtualApplianceConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -198,7 +198,7 @@ public async Task GetIfExists_NetworkVirtualApplianceConnectionGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_NetworkVirtualApplianceConnectionList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceConnectionList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkVirtualApplianceConnectionList.json // this example is just showing the usage of "NetworkVirtualApplianceConnections_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkVirtualApplianceConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkVirtualApplianceConnectionResource.cs index e309659b3f07e..7a2bf8229ddc4 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkVirtualApplianceConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkVirtualApplianceConnectionResource.cs @@ -21,7 +21,7 @@ public partial class Sample_NetworkVirtualApplianceConnectionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_NetworkVirtualApplianceConnectionPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceConnectionPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkVirtualApplianceConnectionPut.json // this example is just showing the usage of "NetworkVirtualApplianceConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Update_NetworkVirtualApplianceConnectionPut() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_NetworkVirtualApplianceConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkVirtualApplianceConnectionGet.json // this example is just showing the usage of "NetworkVirtualApplianceConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task Get_NetworkVirtualApplianceConnectionGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_NetworkVirtualApplianceConnectionDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceConnectionDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkVirtualApplianceConnectionDelete.json // this example is just showing the usage of "NetworkVirtualApplianceConnections_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkVirtualApplianceResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkVirtualApplianceResource.cs index 456a23690f7b3..95df717959ee2 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkVirtualApplianceResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkVirtualApplianceResource.cs @@ -21,7 +21,7 @@ public partial class Sample_NetworkVirtualApplianceResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteNetworkVirtualAppliance() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkVirtualApplianceDelete.json // this example is just showing the usage of "NetworkVirtualAppliances_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Delete_DeleteNetworkVirtualAppliance() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetNetworkVirtualAppliance() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkVirtualApplianceGet.json // this example is just showing the usage of "NetworkVirtualAppliances_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +79,7 @@ public async Task Get_GetNetworkVirtualAppliance() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateNetworkVirtualAppliance() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkVirtualApplianceUpdateTags.json // this example is just showing the usage of "NetworkVirtualAppliances_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task Update_UpdateNetworkVirtualAppliance() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Restart_RestartAllNetworkVirtualApplianceVMsInVMScaleSet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceEmptyRestart.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkVirtualApplianceEmptyRestart.json // this example is just showing the usage of "NetworkVirtualAppliances_Restart" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -135,9 +135,10 @@ public async Task Restart_RestartAllNetworkVirtualApplianceVMsInVMScaleSet() NetworkVirtualApplianceResource networkVirtualAppliance = client.GetNetworkVirtualApplianceResource(networkVirtualApplianceResourceId); // invoke the operation - await networkVirtualAppliance.RestartAsync(); + ArmOperation lro = await networkVirtualAppliance.RestartAsync(WaitUntil.Completed); + NetworkVirtualApplianceInstanceIds result = lro.Value; - Console.WriteLine($"Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } // Restart Specific NetworkVirtualAppliance VMs in VM Scale Set @@ -145,7 +146,7 @@ public async Task Restart_RestartAllNetworkVirtualApplianceVMsInVMScaleSet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Restart_RestartSpecificNetworkVirtualApplianceVMsInVMScaleSet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceSpecificRestart.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkVirtualApplianceSpecificRestart.json // this example is just showing the usage of "NetworkVirtualAppliances_Restart" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -162,9 +163,10 @@ public async Task Restart_RestartSpecificNetworkVirtualApplianceVMsInVMScaleSet( NetworkVirtualApplianceResource networkVirtualAppliance = client.GetNetworkVirtualApplianceResource(networkVirtualApplianceResourceId); // invoke the operation - await networkVirtualAppliance.RestartAsync(); + ArmOperation lro = await networkVirtualAppliance.RestartAsync(WaitUntil.Completed); + NetworkVirtualApplianceInstanceIds result = lro.Value; - Console.WriteLine($"Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } // List all Network Virtual Appliances for a given subscription @@ -172,7 +174,7 @@ public async Task Restart_RestartSpecificNetworkVirtualApplianceVMsInVMScaleSet( [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkVirtualAppliances_ListAllNetworkVirtualAppliancesForAGivenSubscription() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceListBySubscription.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkVirtualApplianceListBySubscription.json // this example is just showing the usage of "NetworkVirtualAppliances_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -198,56 +200,5 @@ public async Task GetNetworkVirtualAppliances_ListAllNetworkVirtualAppliancesFor Console.WriteLine($"Succeeded"); } - - // Create Network Virtual Appliance Inbound Security Rules - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdateInboundSecurityRule_CreateNetworkVirtualApplianceInboundSecurityRules() - { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/InboundSecurityRulePut.json - // this example is just showing the usage of "InboundSecurityRule_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this NetworkVirtualApplianceResource created on azure - // for more information of creating NetworkVirtualApplianceResource, please refer to the document of NetworkVirtualApplianceResource - string subscriptionId = "subid"; - string resourceGroupName = "rg1"; - string networkVirtualApplianceName = "nva"; - ResourceIdentifier networkVirtualApplianceResourceId = NetworkVirtualApplianceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, networkVirtualApplianceName); - NetworkVirtualApplianceResource networkVirtualAppliance = client.GetNetworkVirtualApplianceResource(networkVirtualApplianceResourceId); - - // invoke the operation - string ruleCollectionName = "rule1"; - InboundSecurityRule inboundSecurityRule = new InboundSecurityRule() - { - RuleType = InboundSecurityRuleType.Permanent, - Rules = -{ -new InboundSecurityRules() -{ -Name = "inboundRule1", -Protocol = InboundSecurityRulesProtocol.Tcp, -SourceAddressPrefix = "50.20.121.5/32", -DestinationPortRange = 22, -DestinationPortRanges = -{ -"80-100" -}, -AppliesOn = -{ -"slbip1" -}, -} -}, - }; - ArmOperation lro = await networkVirtualAppliance.CreateOrUpdateInboundSecurityRuleAsync(WaitUntil.Completed, ruleCollectionName, inboundSecurityRule); - InboundSecurityRule result = lro.Value; - - Console.WriteLine($"Succeeded: {result}"); - } } } diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkVirtualApplianceSkuCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkVirtualApplianceSkuCollection.cs index ece7275b0d953..40de332c88d7f 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkVirtualApplianceSkuCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkVirtualApplianceSkuCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkVirtualApplianceSkuCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_NetworkVirtualApplianceSkuListResult() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceSkuList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkVirtualApplianceSkuList.json // this example is just showing the usage of "VirtualApplianceSkus_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task GetAll_NetworkVirtualApplianceSkuListResult() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_NetworkVirtualApplianceSkuGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceSkuGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkVirtualApplianceSkuGet.json // this example is just showing the usage of "VirtualApplianceSkus_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task Get_NetworkVirtualApplianceSkuGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_NetworkVirtualApplianceSkuGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceSkuGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkVirtualApplianceSkuGet.json // this example is just showing the usage of "VirtualApplianceSkus_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -117,7 +117,7 @@ public async Task Exists_NetworkVirtualApplianceSkuGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_NetworkVirtualApplianceSkuGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceSkuGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkVirtualApplianceSkuGet.json // this example is just showing the usage of "VirtualApplianceSkus_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkVirtualApplianceSkuResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkVirtualApplianceSkuResource.cs index a7b3ac859b54e..16d96debaf405 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkVirtualApplianceSkuResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkVirtualApplianceSkuResource.cs @@ -19,7 +19,7 @@ public partial class Sample_NetworkVirtualApplianceSkuResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_NetworkVirtualApplianceSkuGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceSkuGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkVirtualApplianceSkuGet.json // this example is just showing the usage of "VirtualApplianceSkus_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkWatcherCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkWatcherCollection.cs index 74e32c50dd1aa..abd2924513faa 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkWatcherCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkWatcherCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NetworkWatcherCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateNetworkWatcher() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherCreate.json // this example is just showing the usage of "NetworkWatchers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -59,7 +59,7 @@ public async Task CreateOrUpdate_CreateNetworkWatcher() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetNetworkWatcher() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherGet.json // this example is just showing the usage of "NetworkWatchers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Get_GetNetworkWatcher() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetNetworkWatcher() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherGet.json // this example is just showing the usage of "NetworkWatchers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_GetNetworkWatcher() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetNetworkWatcher() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherGet.json // this example is just showing the usage of "NetworkWatchers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -165,7 +165,7 @@ public async Task GetIfExists_GetNetworkWatcher() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListNetworkWatchers() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherList.json // this example is just showing the usage of "NetworkWatchers_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkWatcherResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkWatcherResource.cs index a6c856f60aea5..2a7477b6f80f4 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkWatcherResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_NetworkWatcherResource.cs @@ -9,6 +9,7 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; +using Azure.ResourceManager.Models; using Azure.ResourceManager.Network.Models; using Azure.ResourceManager.Resources; @@ -21,7 +22,7 @@ public partial class Sample_NetworkWatcherResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetNetworkWatcher() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherGet.json // this example is just showing the usage of "NetworkWatchers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +53,7 @@ public async Task Get_GetNetworkWatcher() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteNetworkWatcher() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherDelete.json // this example is just showing the usage of "NetworkWatchers_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +80,7 @@ public async Task Delete_DeleteNetworkWatcher() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateNetworkWatcherTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherUpdateTags.json // this example is just showing the usage of "NetworkWatchers_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +119,7 @@ public async Task Update_UpdateNetworkWatcherTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkWatchers_ListAllNetworkWatchers() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherListAll.json // this example is just showing the usage of "NetworkWatchers_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -150,7 +151,7 @@ public async Task GetNetworkWatchers_ListAllNetworkWatchers() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetTopology_GetTopology() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherTopologyGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherTopologyGet.json // this example is just showing the usage of "NetworkWatchers_GetTopology" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -181,7 +182,7 @@ public async Task GetTopology_GetTopology() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task VerifyIPFlow_IpFlowVerify() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherIpFlowVerify.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherIpFlowVerify.json // this example is just showing the usage of "NetworkWatchers_VerifyIPFlow" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -210,7 +211,7 @@ public async Task VerifyIPFlow_IpFlowVerify() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNextHop_GetNextHop() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherNextHopGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherNextHopGet.json // this example is just showing the usage of "NetworkWatchers_GetNextHop" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -242,7 +243,7 @@ public async Task GetNextHop_GetNextHop() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetVmSecurityRules_GetSecurityGroupView() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherSecurityGroupViewGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherSecurityGroupViewGet.json // this example is just showing the usage of "NetworkWatchers_GetVmSecurityRules" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -271,7 +272,7 @@ public async Task GetVmSecurityRules_GetSecurityGroupView() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetTroubleshooting_GetTroubleshooting() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherTroubleshootGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherTroubleshootGet.json // this example is just showing the usage of "NetworkWatchers_GetTroubleshooting" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -300,7 +301,7 @@ public async Task GetTroubleshooting_GetTroubleshooting() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetTroubleshootingResult_GetTroubleshootResult() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherTroubleshootResultQuery.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherTroubleshootResultQuery.json // this example is just showing the usage of "NetworkWatchers_GetTroubleshootingResult" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -329,7 +330,7 @@ public async Task GetTroubleshootingResult_GetTroubleshootResult() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task SetFlowLogConfiguration_ConfigureFlowLog() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherFlowLogConfigure.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherFlowLogConfigure.json // this example is just showing the usage of "NetworkWatchers_SetFlowLogConfiguration" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -346,7 +347,16 @@ public async Task SetFlowLogConfiguration_ConfigureFlowLog() NetworkWatcherResource networkWatcher = client.GetNetworkWatcherResource(networkWatcherResourceId); // invoke the operation - FlowLogInformation flowLogInformation = new FlowLogInformation(new ResourceIdentifier("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/nsg1"), new ResourceIdentifier("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/st1"), true); + FlowLogInformation flowLogInformation = new FlowLogInformation(new ResourceIdentifier("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/nsg1"), new ResourceIdentifier("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/st1"), true) + { + Identity = new ManagedServiceIdentity("UserAssigned") + { + UserAssignedIdentities = +{ +[new ResourceIdentifier("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1")] = new UserAssignedIdentity(), +}, + }, + }; ArmOperation lro = await networkWatcher.SetFlowLogConfigurationAsync(WaitUntil.Completed, flowLogInformation); FlowLogInformation result = lro.Value; @@ -358,7 +368,7 @@ public async Task SetFlowLogConfiguration_ConfigureFlowLog() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetFlowLogStatus_GetFlowLogStatus() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherFlowLogStatusQuery.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherFlowLogStatusQuery.json // this example is just showing the usage of "NetworkWatchers_GetFlowLogStatus" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -387,7 +397,7 @@ public async Task GetFlowLogStatus_GetFlowLogStatus() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckConnectivity_CheckConnectivity() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherConnectivityCheck.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherConnectivityCheck.json // this example is just showing the usage of "NetworkWatchers_CheckConnectivity" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -423,7 +433,7 @@ public async Task CheckConnectivity_CheckConnectivity() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAzureReachabilityReport_GetAzureReachabilityReport() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherAzureReachabilityReportGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherAzureReachabilityReportGet.json // this example is just showing the usage of "NetworkWatchers_GetAzureReachabilityReport" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -465,7 +475,7 @@ public async Task GetAzureReachabilityReport_GetAzureReachabilityReport() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAvailableProviders_GetAvailableProvidersList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherAvailableProvidersListGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherAvailableProvidersListGet.json // this example is just showing the usage of "NetworkWatchers_ListAvailableProviders" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -503,7 +513,7 @@ public async Task GetAvailableProviders_GetAvailableProvidersList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkConfigurationDiagnostic_NetworkConfigurationDiagnostic() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherNetworkConfigurationDiagnostic.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherNetworkConfigurationDiagnostic.json // this example is just showing the usage of "NetworkWatchers_GetNetworkConfigurationDiagnostic" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_OutboundRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_OutboundRuleCollection.cs index c9ea3b563f047..0b167bad5feb2 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_OutboundRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_OutboundRuleCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_OutboundRuleCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_LoadBalancerOutboundRuleList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerOutboundRuleList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerOutboundRuleList.json // this example is just showing the usage of "LoadBalancerOutboundRules_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_LoadBalancerOutboundRuleList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_LoadBalancerOutboundRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerOutboundRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerOutboundRuleGet.json // this example is just showing the usage of "LoadBalancerOutboundRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_LoadBalancerOutboundRuleGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_LoadBalancerOutboundRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerOutboundRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerOutboundRuleGet.json // this example is just showing the usage of "LoadBalancerOutboundRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Exists_LoadBalancerOutboundRuleGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_LoadBalancerOutboundRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerOutboundRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerOutboundRuleGet.json // this example is just showing the usage of "LoadBalancerOutboundRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_OutboundRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_OutboundRuleResource.cs index 3d49725329f97..c29a8b91a49f8 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_OutboundRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_OutboundRuleResource.cs @@ -19,7 +19,7 @@ public partial class Sample_OutboundRuleResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_LoadBalancerOutboundRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerOutboundRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerOutboundRuleGet.json // this example is just showing the usage of "LoadBalancerOutboundRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_P2SVpnGatewayCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_P2SVpnGatewayCollection.cs index 339e743a72464..7d85a1031b6bb 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_P2SVpnGatewayCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_P2SVpnGatewayCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_P2SVpnGatewayCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_P2SVpnGatewayGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/P2SVpnGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/P2SVpnGatewayGet.json // this example is just showing the usage of "P2sVpnGateways_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task Get_P2SVpnGatewayGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_P2SVpnGatewayGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/P2SVpnGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/P2SVpnGatewayGet.json // this example is just showing the usage of "P2sVpnGateways_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Exists_P2SVpnGatewayGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_P2SVpnGatewayGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/P2SVpnGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/P2SVpnGatewayGet.json // this example is just showing the usage of "P2sVpnGateways_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,7 +128,7 @@ public async Task GetIfExists_P2SVpnGatewayGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_P2SVpnGatewayPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/P2SVpnGatewayPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/P2SVpnGatewayPut.json // this example is just showing the usage of "P2sVpnGateways_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -221,7 +221,7 @@ public async Task CreateOrUpdate_P2SVpnGatewayPut() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_P2SVpnGatewayListByResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/P2SVpnGatewayListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/P2SVpnGatewayListByResourceGroup.json // this example is just showing the usage of "P2sVpnGateways_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_P2SVpnGatewayResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_P2SVpnGatewayResource.cs index 0b529c71da801..6f038032cf1ee 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_P2SVpnGatewayResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_P2SVpnGatewayResource.cs @@ -21,7 +21,7 @@ public partial class Sample_P2SVpnGatewayResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_P2SVpnGatewayGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/P2SVpnGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/P2SVpnGatewayGet.json // this example is just showing the usage of "P2sVpnGateways_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_P2SVpnGatewayGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_P2SVpnGatewayUpdate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/P2SVpnGatewayUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/P2SVpnGatewayUpdateTags.json // this example is just showing the usage of "P2sVpnGateways_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Update_P2SVpnGatewayUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_P2SVpnGatewayDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/P2SVpnGatewayDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/P2SVpnGatewayDelete.json // this example is just showing the usage of "P2sVpnGateways_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -119,7 +119,7 @@ public async Task Delete_P2SVpnGatewayDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetP2SVpnGateways_P2SVpnGatewayListBySubscription() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/P2SVpnGatewayList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/P2SVpnGatewayList.json // this example is just showing the usage of "P2sVpnGateways_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -151,7 +151,7 @@ public async Task GetP2SVpnGateways_P2SVpnGatewayListBySubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Reset_ResetP2SVpnGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/P2SVpnGatewayReset.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/P2SVpnGatewayReset.json // this example is just showing the usage of "P2SVpnGateways_Reset" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -183,7 +183,7 @@ public async Task Reset_ResetP2SVpnGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GenerateVpnProfile_GenerateP2SVpnGatewayVPNProfile() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/P2SVpnGatewayGenerateVpnProfile.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/P2SVpnGatewayGenerateVpnProfile.json // this example is just showing the usage of "P2sVpnGateways_GenerateVpnProfile" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -215,7 +215,7 @@ public async Task GenerateVpnProfile_GenerateP2SVpnGatewayVPNProfile() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetP2SVpnConnectionHealth_P2SVpnGatewayGetConnectionHealth() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/P2SVpnGatewayGetConnectionHealth.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/P2SVpnGatewayGetConnectionHealth.json // this example is just showing the usage of "P2sVpnGateways_GetP2SVpnConnectionHealth" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -247,7 +247,7 @@ public async Task GetP2SVpnConnectionHealth_P2SVpnGatewayGetConnectionHealth() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetP2SVpnConnectionHealthDetailed_P2SVpnGatewayGetConnectionHealthDetailed() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/P2SVpnGatewayGetConnectionHealthDetailed.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/P2SVpnGatewayGetConnectionHealthDetailed.json // this example is just showing the usage of "P2sVpnGateways_GetP2SVpnConnectionHealthDetailed" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -283,7 +283,7 @@ public async Task GetP2SVpnConnectionHealthDetailed_P2SVpnGatewayGetConnectionHe [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task DisconnectP2SVpnConnections_DisconnectVpnConnectionsFromP2sVpnGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/P2sVpnGatewaysDisconnectP2sVpnConnections.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/P2sVpnGatewaysDisconnectP2sVpnConnections.json // this example is just showing the usage of "P2sVpnGateways_DisconnectP2SVpnConnections" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PacketCaptureCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PacketCaptureCollection.cs index f38d7f66ecf96..ca43429d56a57 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PacketCaptureCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PacketCaptureCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_PacketCaptureCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreatePacketCapture() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherPacketCaptureCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherPacketCaptureCreate.json // this example is just showing the usage of "PacketCaptures_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -76,7 +76,7 @@ public async Task CreateOrUpdate_CreatePacketCapture() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetPacketCapture() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherPacketCaptureGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherPacketCaptureGet.json // this example is just showing the usage of "PacketCaptures_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -111,7 +111,7 @@ public async Task Get_GetPacketCapture() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetPacketCapture() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherPacketCaptureGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherPacketCaptureGet.json // this example is just showing the usage of "PacketCaptures_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -142,7 +142,7 @@ public async Task Exists_GetPacketCapture() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetPacketCapture() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherPacketCaptureGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherPacketCaptureGet.json // this example is just showing the usage of "PacketCaptures_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -185,7 +185,7 @@ public async Task GetIfExists_GetPacketCapture() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListPacketCaptures() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherPacketCapturesList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherPacketCapturesList.json // this example is just showing the usage of "PacketCaptures_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PacketCaptureResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PacketCaptureResource.cs index 9aad19dbabbb9..6d7dae8193f73 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PacketCaptureResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PacketCaptureResource.cs @@ -20,7 +20,7 @@ public partial class Sample_PacketCaptureResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreatePacketCapture() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherPacketCaptureCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherPacketCaptureCreate.json // this example is just showing the usage of "PacketCaptures_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -73,7 +73,7 @@ public async Task Update_CreatePacketCapture() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetPacketCapture() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherPacketCaptureGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherPacketCaptureGet.json // this example is just showing the usage of "PacketCaptures_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -105,7 +105,7 @@ public async Task Get_GetPacketCapture() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeletePacketCapture() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherPacketCaptureDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherPacketCaptureDelete.json // this example is just showing the usage of "PacketCaptures_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -133,7 +133,7 @@ public async Task Delete_DeletePacketCapture() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Stop_StopPacketCapture() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherPacketCaptureStop.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherPacketCaptureStop.json // this example is just showing the usage of "PacketCaptures_Stop" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -161,7 +161,7 @@ public async Task Stop_StopPacketCapture() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetStatus_QueryPacketCaptureStatus() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkWatcherPacketCaptureQueryStatus.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkWatcherPacketCaptureQueryStatus.json // this example is just showing the usage of "PacketCaptures_GetStatus" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PeerExpressRouteCircuitConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PeerExpressRouteCircuitConnectionCollection.cs index 88d774e03690f..a6c3b587672a7 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PeerExpressRouteCircuitConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PeerExpressRouteCircuitConnectionCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_PeerExpressRouteCircuitConnectionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_PeerExpressRouteCircuitConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PeerExpressRouteCircuitConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PeerExpressRouteCircuitConnectionGet.json // this example is just showing the usage of "PeerExpressRouteCircuitConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_PeerExpressRouteCircuitConnectionGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_PeerExpressRouteCircuitConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PeerExpressRouteCircuitConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PeerExpressRouteCircuitConnectionGet.json // this example is just showing the usage of "PeerExpressRouteCircuitConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -87,7 +87,7 @@ public async Task Exists_PeerExpressRouteCircuitConnectionGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_PeerExpressRouteCircuitConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PeerExpressRouteCircuitConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PeerExpressRouteCircuitConnectionGet.json // this example is just showing the usage of "PeerExpressRouteCircuitConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -131,7 +131,7 @@ public async Task GetIfExists_PeerExpressRouteCircuitConnectionGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListPeerExpressRouteCircuitConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PeerExpressRouteCircuitConnectionList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PeerExpressRouteCircuitConnectionList.json // this example is just showing the usage of "PeerExpressRouteCircuitConnections_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PeerExpressRouteCircuitConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PeerExpressRouteCircuitConnectionResource.cs index 835e82be4ea55..3d8fb01720f54 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PeerExpressRouteCircuitConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PeerExpressRouteCircuitConnectionResource.cs @@ -19,7 +19,7 @@ public partial class Sample_PeerExpressRouteCircuitConnectionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_PeerExpressRouteCircuitConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PeerExpressRouteCircuitConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PeerExpressRouteCircuitConnectionGet.json // this example is just showing the usage of "PeerExpressRouteCircuitConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PolicySignaturesOverridesForIdpsResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PolicySignaturesOverridesForIdpsResource.cs index d25e5d48aa1bd..a3fd0fac7b696 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PolicySignaturesOverridesForIdpsResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PolicySignaturesOverridesForIdpsResource.cs @@ -19,7 +19,7 @@ public partial class Sample_PolicySignaturesOverridesForIdpsResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PatchSignatureOverrides() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicySignatureOverridesPatch.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicySignatureOverridesPatch.json // this example is just showing the usage of "FirewallPolicyIdpsSignaturesOverrides_Patch" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -61,7 +61,7 @@ public async Task Update_PatchSignatureOverrides() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_PutSignatureOverrides() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicySignatureOverridesPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicySignatureOverridesPut.json // this example is just showing the usage of "FirewallPolicyIdpsSignaturesOverrides_Put" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -104,7 +104,7 @@ public async Task CreateOrUpdate_PutSignatureOverrides() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSignatureOverrides() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/FirewallPolicySignatureOverridesGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/FirewallPolicySignatureOverridesGet.json // this example is just showing the usage of "FirewallPolicyIdpsSignaturesOverrides_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PrivateDnsZoneGroupCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PrivateDnsZoneGroupCollection.cs index 238384a019a49..f237e81632d39 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PrivateDnsZoneGroupCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PrivateDnsZoneGroupCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_PrivateDnsZoneGroupCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetPrivateDnsZoneGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateEndpointDnsZoneGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateEndpointDnsZoneGroupGet.json // this example is just showing the usage of "PrivateDnsZoneGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetPrivateDnsZoneGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetPrivateDnsZoneGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateEndpointDnsZoneGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateEndpointDnsZoneGroupGet.json // this example is just showing the usage of "PrivateDnsZoneGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Exists_GetPrivateDnsZoneGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetPrivateDnsZoneGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateEndpointDnsZoneGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateEndpointDnsZoneGroupGet.json // this example is just showing the usage of "PrivateDnsZoneGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetIfExists_GetPrivateDnsZoneGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreatePrivateDnsZoneGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateEndpointDnsZoneGroupCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateEndpointDnsZoneGroupCreate.json // this example is just showing the usage of "PrivateDnsZoneGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -175,7 +175,7 @@ public async Task CreateOrUpdate_CreatePrivateDnsZoneGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListPrivateEndpointsInResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateEndpointDnsZoneGroupList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateEndpointDnsZoneGroupList.json // this example is just showing the usage of "PrivateDnsZoneGroups_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PrivateDnsZoneGroupResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PrivateDnsZoneGroupResource.cs index 46faf0aa85404..79cc958bdc8d5 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PrivateDnsZoneGroupResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PrivateDnsZoneGroupResource.cs @@ -20,7 +20,7 @@ public partial class Sample_PrivateDnsZoneGroupResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeletePrivateDnsZoneGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateEndpointDnsZoneGroupDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateEndpointDnsZoneGroupDelete.json // this example is just showing the usage of "PrivateDnsZoneGroups_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Delete_DeletePrivateDnsZoneGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetPrivateDnsZoneGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateEndpointDnsZoneGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateEndpointDnsZoneGroupGet.json // this example is just showing the usage of "PrivateDnsZoneGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Get_GetPrivateDnsZoneGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreatePrivateDnsZoneGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateEndpointDnsZoneGroupCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateEndpointDnsZoneGroupCreate.json // this example is just showing the usage of "PrivateDnsZoneGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PrivateEndpointCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PrivateEndpointCollection.cs index 91487563d0d20..52eebc585e03e 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PrivateEndpointCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PrivateEndpointCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_PrivateEndpointCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetPrivateEndpoint() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateEndpointGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateEndpointGet.json // this example is just showing the usage of "PrivateEndpoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task Get_GetPrivateEndpoint() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetPrivateEndpoint() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateEndpointGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateEndpointGet.json // this example is just showing the usage of "PrivateEndpoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Exists_GetPrivateEndpoint() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetPrivateEndpoint() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateEndpointGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateEndpointGet.json // this example is just showing the usage of "PrivateEndpoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,7 +128,7 @@ public async Task GetIfExists_GetPrivateEndpoint() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetPrivateEndpointWithApplicationSecurityGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateEndpointGetWithASG.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateEndpointGetWithASG.json // this example is just showing the usage of "PrivateEndpoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -162,7 +162,7 @@ public async Task Get_GetPrivateEndpointWithApplicationSecurityGroups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetPrivateEndpointWithApplicationSecurityGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateEndpointGetWithASG.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateEndpointGetWithASG.json // this example is just showing the usage of "PrivateEndpoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -192,7 +192,7 @@ public async Task Exists_GetPrivateEndpointWithApplicationSecurityGroups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetPrivateEndpointWithApplicationSecurityGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateEndpointGetWithASG.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateEndpointGetWithASG.json // this example is just showing the usage of "PrivateEndpoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -234,7 +234,7 @@ public async Task GetIfExists_GetPrivateEndpointWithApplicationSecurityGroups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetPrivateEndpointWithManualApprovalConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateEndpointGetForManualApproval.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateEndpointGetForManualApproval.json // this example is just showing the usage of "PrivateEndpoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -268,7 +268,7 @@ public async Task Get_GetPrivateEndpointWithManualApprovalConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetPrivateEndpointWithManualApprovalConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateEndpointGetForManualApproval.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateEndpointGetForManualApproval.json // this example is just showing the usage of "PrivateEndpoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -298,7 +298,7 @@ public async Task Exists_GetPrivateEndpointWithManualApprovalConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetPrivateEndpointWithManualApprovalConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateEndpointGetForManualApproval.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateEndpointGetForManualApproval.json // this example is just showing the usage of "PrivateEndpoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -340,7 +340,7 @@ public async Task GetIfExists_GetPrivateEndpointWithManualApprovalConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreatePrivateEndpoint() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateEndpointCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateEndpointCreate.json // this example is just showing the usage of "PrivateEndpoints_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -406,7 +406,7 @@ public async Task CreateOrUpdate_CreatePrivateEndpoint() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreatePrivateEndpointWithApplicationSecurityGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateEndpointCreateWithASG.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateEndpointCreateWithASG.json // this example is just showing the usage of "PrivateEndpoints_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -468,7 +468,7 @@ public async Task CreateOrUpdate_CreatePrivateEndpointWithApplicationSecurityGro [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreatePrivateEndpointWithManualApprovalConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateEndpointCreateForManualApproval.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateEndpointCreateForManualApproval.json // this example is just showing the usage of "PrivateEndpoints_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -534,7 +534,7 @@ public async Task CreateOrUpdate_CreatePrivateEndpointWithManualApprovalConnecti [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListPrivateEndpointsInResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateEndpointList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateEndpointList.json // this example is just showing the usage of "PrivateEndpoints_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PrivateEndpointResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PrivateEndpointResource.cs index bab3123ba944a..f7c207dcd998b 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PrivateEndpointResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PrivateEndpointResource.cs @@ -22,7 +22,7 @@ public partial class Sample_PrivateEndpointResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeletePrivateEndpoint() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateEndpointDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateEndpointDelete.json // this example is just showing the usage of "PrivateEndpoints_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -49,7 +49,7 @@ public async Task Delete_DeletePrivateEndpoint() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetPrivateEndpoint() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateEndpointGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateEndpointGet.json // this example is just showing the usage of "PrivateEndpoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Get_GetPrivateEndpoint() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetPrivateEndpointWithApplicationSecurityGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateEndpointGetWithASG.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateEndpointGetWithASG.json // this example is just showing the usage of "PrivateEndpoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -111,7 +111,7 @@ public async Task Get_GetPrivateEndpointWithApplicationSecurityGroups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetPrivateEndpointWithManualApprovalConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateEndpointGetForManualApproval.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateEndpointGetForManualApproval.json // this example is just showing the usage of "PrivateEndpoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -142,7 +142,7 @@ public async Task Get_GetPrivateEndpointWithManualApprovalConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreatePrivateEndpoint() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateEndpointCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateEndpointCreate.json // this example is just showing the usage of "PrivateEndpoints_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -205,7 +205,7 @@ public async Task Update_CreatePrivateEndpoint() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreatePrivateEndpointWithApplicationSecurityGroups() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateEndpointCreateWithASG.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateEndpointCreateWithASG.json // this example is just showing the usage of "PrivateEndpoints_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -264,7 +264,7 @@ public async Task Update_CreatePrivateEndpointWithApplicationSecurityGroups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreatePrivateEndpointWithManualApprovalConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateEndpointCreateForManualApproval.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateEndpointCreateForManualApproval.json // this example is just showing the usage of "PrivateEndpoints_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -327,7 +327,7 @@ public async Task Update_CreatePrivateEndpointWithManualApprovalConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetPrivateEndpoints_ListAllPrivateEndpoints() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateEndpointListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateEndpointListAll.json // this example is just showing the usage of "PrivateEndpoints_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PrivateLinkServiceCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PrivateLinkServiceCollection.cs index 4f49cfaba3302..25028046857e4 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PrivateLinkServiceCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PrivateLinkServiceCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_PrivateLinkServiceCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetPrivateLinkService() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateLinkServiceGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateLinkServiceGet.json // this example is just showing the usage of "PrivateLinkServices_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetPrivateLinkService() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetPrivateLinkService() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateLinkServiceGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateLinkServiceGet.json // this example is just showing the usage of "PrivateLinkServices_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Exists_GetPrivateLinkService() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetPrivateLinkService() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateLinkServiceGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateLinkServiceGet.json // this example is just showing the usage of "PrivateLinkServices_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -127,7 +127,7 @@ public async Task GetIfExists_GetPrivateLinkService() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreatePrivateLinkService() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateLinkServiceCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateLinkServiceCreate.json // this example is just showing the usage of "PrivateLinkServices_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -199,7 +199,7 @@ public async Task CreateOrUpdate_CreatePrivateLinkService() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListPrivateLinkServiceInResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateLinkServiceList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateLinkServiceList.json // this example is just showing the usage of "PrivateLinkServices_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PrivateLinkServiceResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PrivateLinkServiceResource.cs index 7ae700f81f8b4..b3b0de433efb0 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PrivateLinkServiceResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PrivateLinkServiceResource.cs @@ -21,7 +21,7 @@ public partial class Sample_PrivateLinkServiceResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeletePrivateLinkService() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateLinkServiceDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateLinkServiceDelete.json // this example is just showing the usage of "PrivateLinkServices_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Delete_DeletePrivateLinkService() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetPrivateLinkService() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateLinkServiceGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateLinkServiceGet.json // this example is just showing the usage of "PrivateLinkServices_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +79,7 @@ public async Task Get_GetPrivateLinkService() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreatePrivateLinkService() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateLinkServiceCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateLinkServiceCreate.json // this example is just showing the usage of "PrivateLinkServices_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -148,7 +148,7 @@ public async Task Update_CreatePrivateLinkService() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetPrivateLinkServices_ListAllPrivateListService() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PrivateLinkServiceListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PrivateLinkServiceListAll.json // this example is just showing the usage of "PrivateLinkServices_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ProbeCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ProbeCollection.cs index d1c6cf3a85eab..b7409ac843587 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ProbeCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ProbeCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ProbeCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_LoadBalancerProbeList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerProbeList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerProbeList.json // this example is just showing the usage of "LoadBalancerProbes_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_LoadBalancerProbeList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_LoadBalancerProbeGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerProbeGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerProbeGet.json // this example is just showing the usage of "LoadBalancerProbes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_LoadBalancerProbeGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_LoadBalancerProbeGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerProbeGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerProbeGet.json // this example is just showing the usage of "LoadBalancerProbes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Exists_LoadBalancerProbeGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_LoadBalancerProbeGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerProbeGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerProbeGet.json // this example is just showing the usage of "LoadBalancerProbes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ProbeResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ProbeResource.cs index eb9f907d70fda..e3680f6c976bf 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ProbeResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ProbeResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ProbeResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_LoadBalancerProbeGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/LoadBalancerProbeGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/LoadBalancerProbeGet.json // this example is just showing the usage of "LoadBalancerProbes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PublicIPAddressCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PublicIPAddressCollection.cs index d6bdb9bad734a..82d10abc804bf 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PublicIPAddressCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PublicIPAddressCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_PublicIPAddressCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetPublicIPAddress() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PublicIpAddressGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PublicIpAddressGet.json // this example is just showing the usage of "PublicIPAddresses_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetPublicIPAddress() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetPublicIPAddress() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PublicIpAddressGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PublicIpAddressGet.json // this example is just showing the usage of "PublicIPAddresses_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Exists_GetPublicIPAddress() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetPublicIPAddress() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PublicIpAddressGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PublicIpAddressGet.json // this example is just showing the usage of "PublicIPAddresses_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -127,7 +127,7 @@ public async Task GetIfExists_GetPublicIPAddress() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreatePublicIPAddressDNS() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PublicIpAddressCreateDns.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PublicIpAddressCreateDns.json // this example is just showing the usage of "PublicIPAddresses_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -170,7 +170,7 @@ public async Task CreateOrUpdate_CreatePublicIPAddressDNS() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreatePublicIPAddressDNSWithDomainNameLabelScope() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PublicIpAddressCreateDnsWithDomainNameLabelScope.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PublicIpAddressCreateDnsWithDomainNameLabelScope.json // this example is just showing the usage of "PublicIPAddresses_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -214,7 +214,7 @@ public async Task CreateOrUpdate_CreatePublicIPAddressDNSWithDomainNameLabelScop [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreatePublicIPAddressAllocationMethod() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PublicIpAddressCreateCustomizedValues.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PublicIpAddressCreateCustomizedValues.json // this example is just showing the usage of "PublicIPAddresses_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -261,7 +261,7 @@ public async Task CreateOrUpdate_CreatePublicIPAddressAllocationMethod() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreatePublicIPAddressDefaults() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PublicIpAddressCreateDefaults.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PublicIpAddressCreateDefaults.json // this example is just showing the usage of "PublicIPAddresses_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -300,7 +300,7 @@ public async Task CreateOrUpdate_CreatePublicIPAddressDefaults() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListResourceGroupPublicIPAddresses() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PublicIpAddressList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PublicIpAddressList.json // this example is just showing the usage of "PublicIPAddresses_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PublicIPAddressResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PublicIPAddressResource.cs index 58485a88287ec..95a8918b76e00 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PublicIPAddressResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PublicIPAddressResource.cs @@ -21,7 +21,7 @@ public partial class Sample_PublicIPAddressResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeletePublicIPAddress() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PublicIpAddressDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PublicIpAddressDelete.json // this example is just showing the usage of "PublicIPAddresses_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Delete_DeletePublicIPAddress() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetPublicIPAddress() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PublicIpAddressGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PublicIpAddressGet.json // this example is just showing the usage of "PublicIPAddresses_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +79,7 @@ public async Task Get_GetPublicIPAddress() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdatePublicIPAddressTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PublicIpAddressUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PublicIpAddressUpdateTags.json // this example is just showing the usage of "PublicIPAddresses_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task Update_UpdatePublicIPAddressTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetPublicIPAddresses_ListAllPublicIPAddresses() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PublicIpAddressListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PublicIpAddressListAll.json // this example is just showing the usage of "PublicIPAddresses_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -150,7 +150,7 @@ public async Task GetPublicIPAddresses_ListAllPublicIPAddresses() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task DdosProtectionStatus_GetDdosProtectionStatusOfAPublicIPAddress() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PublicIpAddressGetDdosProtectionStatus.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PublicIpAddressGetDdosProtectionStatus.json // this example is just showing the usage of "PublicIPAddresses_DdosProtectionStatus" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PublicIPPrefixCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PublicIPPrefixCollection.cs index 72e74e188f3da..b3e9ead733b52 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PublicIPPrefixCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PublicIPPrefixCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_PublicIPPrefixCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetPublicIPPrefix() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PublicIpPrefixGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PublicIpPrefixGet.json // this example is just showing the usage of "PublicIPPrefixes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetPublicIPPrefix() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetPublicIPPrefix() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PublicIpPrefixGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PublicIpPrefixGet.json // this example is just showing the usage of "PublicIPPrefixes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Exists_GetPublicIPPrefix() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetPublicIPPrefix() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PublicIpPrefixGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PublicIpPrefixGet.json // this example is just showing the usage of "PublicIPPrefixes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -127,7 +127,7 @@ public async Task GetIfExists_GetPublicIPPrefix() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreatePublicIPPrefixAllocationMethod() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PublicIpPrefixCreateCustomizedValues.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PublicIpPrefixCreateCustomizedValues.json // this example is just showing the usage of "PublicIPPrefixes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -173,7 +173,7 @@ public async Task CreateOrUpdate_CreatePublicIPPrefixAllocationMethod() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreatePublicIPPrefixDefaults() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PublicIpPrefixCreateDefaults.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PublicIpPrefixCreateDefaults.json // this example is just showing the usage of "PublicIPPrefixes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -217,7 +217,7 @@ public async Task CreateOrUpdate_CreatePublicIPPrefixDefaults() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListResourceGroupPublicIPPrefixes() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PublicIpPrefixList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PublicIpPrefixList.json // this example is just showing the usage of "PublicIPPrefixes_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PublicIPPrefixResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PublicIPPrefixResource.cs index 64d77d4ad22a6..8b85ea4e621fa 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PublicIPPrefixResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_PublicIPPrefixResource.cs @@ -21,7 +21,7 @@ public partial class Sample_PublicIPPrefixResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeletePublicIPPrefix() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PublicIpPrefixDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PublicIpPrefixDelete.json // this example is just showing the usage of "PublicIPPrefixes_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Delete_DeletePublicIPPrefix() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetPublicIPPrefix() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PublicIpPrefixGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PublicIpPrefixGet.json // this example is just showing the usage of "PublicIPPrefixes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +79,7 @@ public async Task Get_GetPublicIPPrefix() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdatePublicIPPrefixTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PublicIpPrefixUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PublicIpPrefixUpdateTags.json // this example is just showing the usage of "PublicIPPrefixes_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task Update_UpdatePublicIPPrefixTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetPublicIPPrefixes_ListAllPublicIPPrefixes() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/PublicIpPrefixListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/PublicIpPrefixListAll.json // this example is just showing the usage of "PublicIPPrefixes_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs index 869739f5f0d8d..27baf615def3f 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_ResourceGroupResourceExtensions [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAvailableResourceGroupDelegations_GetAvailableDelegationsInTheResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AvailableDelegationsResourceGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AvailableDelegationsResourceGroupGet.json // this example is just showing the usage of "AvailableResourceGroupDelegations_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task GetAvailableResourceGroupDelegations_GetAvailableDelegationsIn [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAvailableServiceAliasesByResourceGroup_GetAvailableServiceAliasesInTheResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AvailableServiceAliasesListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AvailableServiceAliasesListByResourceGroup.json // this example is just showing the usage of "AvailableServiceAliases_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -81,7 +81,7 @@ public async Task GetAvailableServiceAliasesByResourceGroup_GetAvailableServiceA [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAvailablePrivateEndpointTypesByResourceGroup_GetAvailablePrivateEndpointTypesInTheResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AvailablePrivateEndpointTypesResourceGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AvailablePrivateEndpointTypesResourceGroupGet.json // this example is just showing the usage of "AvailablePrivateEndpointTypes_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -111,7 +111,7 @@ public async Task GetAvailablePrivateEndpointTypesByResourceGroup_GetAvailablePr [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckPrivateLinkServiceVisibilityByResourceGroupPrivateLinkService_CheckPrivateLinkServiceVisibility() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/CheckPrivateLinkServiceVisibilityByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/CheckPrivateLinkServiceVisibilityByResourceGroup.json // this example is just showing the usage of "PrivateLinkServices_CheckPrivateLinkServiceVisibilityByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -143,7 +143,7 @@ public async Task CheckPrivateLinkServiceVisibilityByResourceGroupPrivateLinkSer [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAutoApprovedPrivateLinkServicesByResourceGroupPrivateLinkServices_GetListOfPrivateLinkServiceIdThatCanBeLinkedToAPrivateEndPointWithAutoApproved() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AutoApprovedPrivateLinkServicesResourceGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AutoApprovedPrivateLinkServicesResourceGroupGet.json // this example is just showing the usage of "PrivateLinkServices_ListAutoApprovedPrivateLinkServicesByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteCollection.cs index eb3bc389cc759..5dbf2a4b78c00 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_RouteCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetRoute() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteTableRouteGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteTableRouteGet.json // this example is just showing the usage of "Routes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetRoute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetRoute() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteTableRouteGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteTableRouteGet.json // this example is just showing the usage of "Routes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Exists_GetRoute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetRoute() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteTableRouteGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteTableRouteGet.json // this example is just showing the usage of "Routes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetIfExists_GetRoute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateRoute() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteTableRouteCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteTableRouteCreate.json // this example is just showing the usage of "Routes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -170,7 +170,7 @@ public async Task CreateOrUpdate_CreateRoute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListRoutes() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteTableRouteList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteTableRouteList.json // this example is just showing the usage of "Routes_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteFilterCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteFilterCollection.cs index d618c3119da26..ebfd15b65732f 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteFilterCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteFilterCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_RouteFilterCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_RouteFilterGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteFilterGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteFilterGet.json // this example is just showing the usage of "RouteFilters_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_RouteFilterGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_RouteFilterGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteFilterGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteFilterGet.json // this example is just showing the usage of "RouteFilters_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Exists_RouteFilterGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_RouteFilterGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteFilterGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteFilterGet.json // this example is just showing the usage of "RouteFilters_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -127,7 +127,7 @@ public async Task GetIfExists_RouteFilterGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_RouteFilterCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteFilterCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteFilterCreate.json // this example is just showing the usage of "RouteFilters_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -183,7 +183,7 @@ public async Task CreateOrUpdate_RouteFilterCreate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_RouteFilterListByResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteFilterListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteFilterListByResourceGroup.json // this example is just showing the usage of "RouteFilters_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteFilterResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteFilterResource.cs index 7eabc03d8b37a..5f7ca1f41d129 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteFilterResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteFilterResource.cs @@ -21,7 +21,7 @@ public partial class Sample_RouteFilterResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_RouteFilterDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteFilterDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteFilterDelete.json // this example is just showing the usage of "RouteFilters_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Delete_RouteFilterDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_RouteFilterGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteFilterGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteFilterGet.json // this example is just showing the usage of "RouteFilters_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +79,7 @@ public async Task Get_RouteFilterGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateRouteFilterTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteFilterUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteFilterUpdateTags.json // this example is just showing the usage of "RouteFilters_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -117,7 +117,7 @@ public async Task Update_UpdateRouteFilterTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetRouteFilters_RouteFilterList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteFilterList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteFilterList.json // this example is just showing the usage of "RouteFilters_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteFilterRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteFilterRuleCollection.cs index 57c482f60fafc..da0a3772fbc1d 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteFilterRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteFilterRuleCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_RouteFilterRuleCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_RouteFilterRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteFilterRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteFilterRuleGet.json // this example is just showing the usage of "RouteFilterRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_RouteFilterRuleGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_RouteFilterRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteFilterRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteFilterRuleGet.json // this example is just showing the usage of "RouteFilterRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Exists_RouteFilterRuleGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_RouteFilterRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteFilterRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteFilterRuleGet.json // this example is just showing the usage of "RouteFilterRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetIfExists_RouteFilterRuleGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_RouteFilterRuleCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteFilterRuleCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteFilterRuleCreate.json // this example is just showing the usage of "RouteFilterRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -174,7 +174,7 @@ public async Task CreateOrUpdate_RouteFilterRuleCreate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_RouteFilterRuleListByRouteFilter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteFilterRuleListByRouteFilter.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteFilterRuleListByRouteFilter.json // this example is just showing the usage of "RouteFilterRules_ListByRouteFilter" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteFilterRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteFilterRuleResource.cs index 00ecfc054c68a..b098742d46aad 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteFilterRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteFilterRuleResource.cs @@ -20,7 +20,7 @@ public partial class Sample_RouteFilterRuleResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_RouteFilterRuleDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteFilterRuleDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteFilterRuleDelete.json // this example is just showing the usage of "RouteFilterRules_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Delete_RouteFilterRuleDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_RouteFilterRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteFilterRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteFilterRuleGet.json // this example is just showing the usage of "RouteFilterRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Get_RouteFilterRuleGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_RouteFilterRuleCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteFilterRuleCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteFilterRuleCreate.json // this example is just showing the usage of "RouteFilterRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteMapCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteMapCollection.cs index 54bb04becbeb4..e30122f11c80d 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteMapCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteMapCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_RouteMapCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_RouteMapGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteMapGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteMapGet.json // this example is just showing the usage of "RouteMaps_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_RouteMapGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_RouteMapGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteMapGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteMapGet.json // this example is just showing the usage of "RouteMaps_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Exists_RouteMapGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_RouteMapGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteMapGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteMapGet.json // this example is just showing the usage of "RouteMaps_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetIfExists_RouteMapGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_RouteMapPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteMapPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteMapPut.json // this example is just showing the usage of "RouteMaps_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -223,7 +223,7 @@ public async Task CreateOrUpdate_RouteMapPut() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_RouteMapList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteMapList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteMapList.json // this example is just showing the usage of "RouteMaps_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteMapResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteMapResource.cs index 36239b965e487..5e8a14e0a5b51 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteMapResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteMapResource.cs @@ -20,7 +20,7 @@ public partial class Sample_RouteMapResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_RouteMapGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteMapGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteMapGet.json // this example is just showing the usage of "RouteMaps_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_RouteMapGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_RouteMapPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteMapPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteMapPut.json // this example is just showing the usage of "RouteMaps_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -143,7 +143,7 @@ public async Task Update_RouteMapPut() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_RouteMapDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteMapDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteMapDelete.json // this example is just showing the usage of "RouteMaps_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteResource.cs index 35eec53aee99d..c854d44abf4df 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteResource.cs @@ -20,7 +20,7 @@ public partial class Sample_RouteResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteRoute() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteTableRouteDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteTableRouteDelete.json // this example is just showing the usage of "Routes_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Delete_DeleteRoute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetRoute() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteTableRouteGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteTableRouteGet.json // this example is just showing the usage of "Routes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Get_GetRoute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateRoute() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteTableRouteCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteTableRouteCreate.json // this example is just showing the usage of "Routes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteTableCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteTableCollection.cs index 22608cff8a70d..aad8bce28f46d 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteTableCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteTableCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_RouteTableCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetRouteTable() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteTableGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteTableGet.json // this example is just showing the usage of "RouteTables_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetRouteTable() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetRouteTable() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteTableGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteTableGet.json // this example is just showing the usage of "RouteTables_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Exists_GetRouteTable() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetRouteTable() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteTableGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteTableGet.json // this example is just showing the usage of "RouteTables_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -127,7 +127,7 @@ public async Task GetIfExists_GetRouteTable() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateRouteTable() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteTableCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteTableCreate.json // this example is just showing the usage of "RouteTables_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task CreateOrUpdate_CreateRouteTable() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateRouteTableWithRoute() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteTableCreateWithRoute.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteTableCreateWithRoute.json // this example is just showing the usage of "RouteTables_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -215,7 +215,7 @@ public async Task CreateOrUpdate_CreateRouteTableWithRoute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListRouteTablesInResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteTableList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteTableList.json // this example is just showing the usage of "RouteTables_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteTableResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteTableResource.cs index 1dea7755f2823..05ff9738c6a60 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteTableResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RouteTableResource.cs @@ -21,7 +21,7 @@ public partial class Sample_RouteTableResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteRouteTable() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteTableDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteTableDelete.json // this example is just showing the usage of "RouteTables_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Delete_DeleteRouteTable() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetRouteTable() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteTableGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteTableGet.json // this example is just showing the usage of "RouteTables_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +79,7 @@ public async Task Get_GetRouteTable() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateRouteTableTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteTableUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteTableUpdateTags.json // this example is just showing the usage of "RouteTables_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task Update_UpdateRouteTableTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetRouteTables_ListAllRouteTables() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RouteTableListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RouteTableListAll.json // this example is just showing the usage of "RouteTables_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RoutingIntentCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RoutingIntentCollection.cs index 110992732fb7f..dc44e856098a9 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RoutingIntentCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RoutingIntentCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_RoutingIntentCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_RouteTablePut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RoutingIntentPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RoutingIntentPut.json // this example is just showing the usage of "RoutingIntent_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -69,7 +69,7 @@ public async Task CreateOrUpdate_RouteTablePut() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_RouteTableGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RoutingIntentGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RoutingIntentGet.json // this example is just showing the usage of "RoutingIntent_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -104,7 +104,7 @@ public async Task Get_RouteTableGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_RouteTableGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RoutingIntentGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RoutingIntentGet.json // this example is just showing the usage of "RoutingIntent_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -135,7 +135,7 @@ public async Task Exists_RouteTableGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_RouteTableGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RoutingIntentGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RoutingIntentGet.json // this example is just showing the usage of "RoutingIntent_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -178,7 +178,7 @@ public async Task GetIfExists_RouteTableGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_RoutingIntentList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RoutingIntentList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RoutingIntentList.json // this example is just showing the usage of "RoutingIntent_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RoutingIntentResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RoutingIntentResource.cs index 7e780b4d36e91..d1eca42055400 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RoutingIntentResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_RoutingIntentResource.cs @@ -20,7 +20,7 @@ public partial class Sample_RoutingIntentResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_RouteTablePut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RoutingIntentPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RoutingIntentPut.json // this example is just showing the usage of "RoutingIntent_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -66,7 +66,7 @@ public async Task Update_RouteTablePut() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_RouteTableGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RoutingIntentGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RoutingIntentGet.json // this example is just showing the usage of "RoutingIntent_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -98,7 +98,7 @@ public async Task Get_RouteTableGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_RouteTableDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/RoutingIntentDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/RoutingIntentDelete.json // this example is just showing the usage of "RoutingIntent_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ScopeConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ScopeConnectionCollection.cs index dd0abfe6a2ccb..85ddd498db9e9 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ScopeConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ScopeConnectionCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ScopeConnectionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateNetworkManagerScopeConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerScopeConnectionPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerScopeConnectionPut.json // this example is just showing the usage of "ScopeConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -61,7 +61,7 @@ public async Task CreateOrUpdate_CreateOrUpdateNetworkManagerScopeConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetNetworkManagerScopeConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerScopeConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerScopeConnectionGet.json // this example is just showing the usage of "ScopeConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -96,7 +96,7 @@ public async Task Get_GetNetworkManagerScopeConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetNetworkManagerScopeConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerScopeConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerScopeConnectionGet.json // this example is just showing the usage of "ScopeConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -127,7 +127,7 @@ public async Task Exists_GetNetworkManagerScopeConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetNetworkManagerScopeConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerScopeConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerScopeConnectionGet.json // this example is just showing the usage of "ScopeConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -170,7 +170,7 @@ public async Task GetIfExists_GetNetworkManagerScopeConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListNetworkManagerScopeConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerScopeConnectionList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerScopeConnectionList.json // this example is just showing the usage of "ScopeConnections_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ScopeConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ScopeConnectionResource.cs index 4b845da12d767..15551cdaebff5 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ScopeConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ScopeConnectionResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ScopeConnectionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateNetworkManagerScopeConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerScopeConnectionPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerScopeConnectionPut.json // this example is just showing the usage of "ScopeConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task Update_CreateOrUpdateNetworkManagerScopeConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetNetworkManagerScopeConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerScopeConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerScopeConnectionGet.json // this example is just showing the usage of "ScopeConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,7 +90,7 @@ public async Task Get_GetNetworkManagerScopeConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteNetworkManagerScopeConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerScopeConnectionDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerScopeConnectionDelete.json // this example is just showing the usage of "ScopeConnections_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SecurityAdminConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SecurityAdminConfigurationCollection.cs index 19bc261405332..58f5bd2cf3003 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SecurityAdminConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SecurityAdminConfigurationCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SecurityAdminConfigurationCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListSecurityAdminConfigurationsInANetworkManager() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerSecurityAdminConfigurationList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerSecurityAdminConfigurationList.json // this example is just showing the usage of "SecurityAdminConfigurations_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ListSecurityAdminConfigurationsInANetworkManager() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSecurityAdminConfigurations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerSecurityAdminConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerSecurityAdminConfigurationGet.json // this example is just showing the usage of "SecurityAdminConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_GetSecurityAdminConfigurations() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetSecurityAdminConfigurations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerSecurityAdminConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerSecurityAdminConfigurationGet.json // this example is just showing the usage of "SecurityAdminConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_GetSecurityAdminConfigurations() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetSecurityAdminConfigurations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerSecurityAdminConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerSecurityAdminConfigurationGet.json // this example is just showing the usage of "SecurityAdminConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_GetSecurityAdminConfigurations() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateNetworkManagerSecurityAdminConfiguration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerSecurityAdminConfigurationPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerSecurityAdminConfigurationPut.json // this example is just showing the usage of "SecurityAdminConfigurations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SecurityAdminConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SecurityAdminConfigurationResource.cs index b9cea0fa6e4c7..73edd1beffe9c 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SecurityAdminConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SecurityAdminConfigurationResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SecurityAdminConfigurationResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSecurityAdminConfigurations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerSecurityAdminConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerSecurityAdminConfigurationGet.json // this example is just showing the usage of "SecurityAdminConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_GetSecurityAdminConfigurations() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateNetworkManagerSecurityAdminConfiguration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerSecurityAdminConfigurationPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerSecurityAdminConfigurationPut.json // this example is just showing the usage of "SecurityAdminConfigurations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Update_CreateNetworkManagerSecurityAdminConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteNetworkManagerSecurityAdminConfiguration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerSecurityAdminConfigurationDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerSecurityAdminConfigurationDelete.json // this example is just showing the usage of "SecurityAdminConfigurations_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SecurityPartnerProviderCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SecurityPartnerProviderCollection.cs index 47253a2516c03..11b005353c784 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SecurityPartnerProviderCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SecurityPartnerProviderCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_SecurityPartnerProviderCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSecurityPartnerProvider() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/SecurityPartnerProviderGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/SecurityPartnerProviderGet.json // this example is just showing the usage of "SecurityPartnerProviders_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetSecurityPartnerProvider() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetSecurityPartnerProvider() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/SecurityPartnerProviderGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/SecurityPartnerProviderGet.json // this example is just showing the usage of "SecurityPartnerProviders_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Exists_GetSecurityPartnerProvider() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetSecurityPartnerProvider() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/SecurityPartnerProviderGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/SecurityPartnerProviderGet.json // this example is just showing the usage of "SecurityPartnerProviders_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -127,7 +127,7 @@ public async Task GetIfExists_GetSecurityPartnerProvider() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateSecurityPartnerProvider() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/SecurityPartnerProviderPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/SecurityPartnerProviderPut.json // this example is just showing the usage of "SecurityPartnerProviders_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -172,7 +172,7 @@ public async Task CreateOrUpdate_CreateSecurityPartnerProvider() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAllSecurityPartnerProvidersForAGivenResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/SecurityPartnerProviderListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/SecurityPartnerProviderListByResourceGroup.json // this example is just showing the usage of "SecurityPartnerProviders_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SecurityPartnerProviderResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SecurityPartnerProviderResource.cs index 5f158418b6bee..fee37bd19f2be 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SecurityPartnerProviderResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SecurityPartnerProviderResource.cs @@ -21,7 +21,7 @@ public partial class Sample_SecurityPartnerProviderResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteSecurityPartnerProvider() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/SecurityPartnerProviderDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/SecurityPartnerProviderDelete.json // this example is just showing the usage of "SecurityPartnerProviders_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Delete_DeleteSecurityPartnerProvider() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSecurityPartnerProvider() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/SecurityPartnerProviderGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/SecurityPartnerProviderGet.json // this example is just showing the usage of "SecurityPartnerProviders_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +79,7 @@ public async Task Get_GetSecurityPartnerProvider() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateSecurityPartnerProviderTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/SecurityPartnerProviderUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/SecurityPartnerProviderUpdateTags.json // this example is just showing the usage of "SecurityPartnerProviders_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task Update_UpdateSecurityPartnerProviderTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSecurityPartnerProviders_ListAllSecurityPartnerProvidersForAGivenSubscription() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/SecurityPartnerProviderListBySubscription.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/SecurityPartnerProviderListBySubscription.json // this example is just showing the usage of "SecurityPartnerProviders_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SecurityRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SecurityRuleCollection.cs index 298cecac0ef54..c2ff46ddeb58b 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SecurityRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SecurityRuleCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SecurityRuleCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetNetworkSecurityRuleInNetworkSecurityGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkSecurityGroupRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkSecurityGroupRuleGet.json // this example is just showing the usage of "SecurityRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetNetworkSecurityRuleInNetworkSecurityGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetNetworkSecurityRuleInNetworkSecurityGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkSecurityGroupRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkSecurityGroupRuleGet.json // this example is just showing the usage of "SecurityRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Exists_GetNetworkSecurityRuleInNetworkSecurityGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetNetworkSecurityRuleInNetworkSecurityGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkSecurityGroupRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkSecurityGroupRuleGet.json // this example is just showing the usage of "SecurityRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetIfExists_GetNetworkSecurityRuleInNetworkSecurityGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateSecurityRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkSecurityGroupRuleCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkSecurityGroupRuleCreate.json // this example is just showing the usage of "SecurityRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -176,7 +176,7 @@ public async Task CreateOrUpdate_CreateSecurityRule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListNetworkSecurityRulesInNetworkSecurityGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkSecurityGroupRuleList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkSecurityGroupRuleList.json // this example is just showing the usage of "SecurityRules_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SecurityRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SecurityRuleResource.cs index 18938f782a803..838f48a2e4971 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SecurityRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SecurityRuleResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SecurityRuleResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteNetworkSecurityRuleFromNetworkSecurityGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkSecurityGroupRuleDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkSecurityGroupRuleDelete.json // this example is just showing the usage of "SecurityRules_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Delete_DeleteNetworkSecurityRuleFromNetworkSecurityGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetNetworkSecurityRuleInNetworkSecurityGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkSecurityGroupRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkSecurityGroupRuleGet.json // this example is just showing the usage of "SecurityRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Get_GetNetworkSecurityRuleInNetworkSecurityGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateSecurityRule() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkSecurityGroupRuleCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkSecurityGroupRuleCreate.json // this example is just showing the usage of "SecurityRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ServiceEndpointPolicyCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ServiceEndpointPolicyCollection.cs index 4719af6758daa..b69f366c95d1b 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ServiceEndpointPolicyCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ServiceEndpointPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ServiceEndpointPolicyCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetServiceEndPointPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ServiceEndpointPolicyGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ServiceEndpointPolicyGet.json // this example is just showing the usage of "ServiceEndpointPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_GetServiceEndPointPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetServiceEndPointPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ServiceEndpointPolicyGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ServiceEndpointPolicyGet.json // this example is just showing the usage of "ServiceEndpointPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Exists_GetServiceEndPointPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetServiceEndPointPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ServiceEndpointPolicyGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ServiceEndpointPolicyGet.json // this example is just showing the usage of "ServiceEndpointPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task GetIfExists_GetServiceEndPointPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateServiceEndpointPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ServiceEndpointPolicyCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ServiceEndpointPolicyCreate.json // this example is just showing the usage of "ServiceEndpointPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -165,7 +165,7 @@ public async Task CreateOrUpdate_CreateServiceEndpointPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateServiceEndpointPolicyWithDefinition() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ServiceEndpointPolicyCreateWithDefinition.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ServiceEndpointPolicyCreateWithDefinition.json // this example is just showing the usage of "ServiceEndpointPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -217,7 +217,7 @@ public async Task CreateOrUpdate_CreateServiceEndpointPolicyWithDefinition() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListResourceGroupServiceEndpointPolicies() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ServiceEndpointPolicyList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ServiceEndpointPolicyList.json // this example is just showing the usage of "ServiceEndpointPolicies_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ServiceEndpointPolicyDefinitionCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ServiceEndpointPolicyDefinitionCollection.cs index e475607aee966..6b1c6aa8616a2 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ServiceEndpointPolicyDefinitionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ServiceEndpointPolicyDefinitionCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ServiceEndpointPolicyDefinitionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetServiceEndpointDefinitionInServiceEndpointPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ServiceEndpointPolicyDefinitionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ServiceEndpointPolicyDefinitionGet.json // this example is just showing the usage of "ServiceEndpointPolicyDefinitions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_GetServiceEndpointDefinitionInServiceEndpointPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetServiceEndpointDefinitionInServiceEndpointPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ServiceEndpointPolicyDefinitionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ServiceEndpointPolicyDefinitionGet.json // this example is just showing the usage of "ServiceEndpointPolicyDefinitions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Exists_GetServiceEndpointDefinitionInServiceEndpointPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetServiceEndpointDefinitionInServiceEndpointPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ServiceEndpointPolicyDefinitionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ServiceEndpointPolicyDefinitionGet.json // this example is just showing the usage of "ServiceEndpointPolicyDefinitions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,7 +128,7 @@ public async Task GetIfExists_GetServiceEndpointDefinitionInServiceEndpointPolic [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateServiceEndpointPolicyDefinition() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ServiceEndpointPolicyDefinitionCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ServiceEndpointPolicyDefinitionCreate.json // this example is just showing the usage of "ServiceEndpointPolicyDefinitions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -173,7 +173,7 @@ public async Task CreateOrUpdate_CreateServiceEndpointPolicyDefinition() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListServiceEndpointDefinitionsInServiceEndPointPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ServiceEndpointPolicyDefinitionList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ServiceEndpointPolicyDefinitionList.json // this example is just showing the usage of "ServiceEndpointPolicyDefinitions_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ServiceEndpointPolicyDefinitionResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ServiceEndpointPolicyDefinitionResource.cs index a929bf5c5a6e4..48062016b16c9 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ServiceEndpointPolicyDefinitionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ServiceEndpointPolicyDefinitionResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ServiceEndpointPolicyDefinitionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteServiceEndpointPolicyDefinitionsFromServiceEndpointPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ServiceEndpointPolicyDefinitionDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ServiceEndpointPolicyDefinitionDelete.json // this example is just showing the usage of "ServiceEndpointPolicyDefinitions_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -47,7 +47,7 @@ public async Task Delete_DeleteServiceEndpointPolicyDefinitionsFromServiceEndpoi [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetServiceEndpointDefinitionInServiceEndpointPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ServiceEndpointPolicyDefinitionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ServiceEndpointPolicyDefinitionGet.json // this example is just showing the usage of "ServiceEndpointPolicyDefinitions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +79,7 @@ public async Task Get_GetServiceEndpointDefinitionInServiceEndpointPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateServiceEndpointPolicyDefinition() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ServiceEndpointPolicyDefinitionCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ServiceEndpointPolicyDefinitionCreate.json // this example is just showing the usage of "ServiceEndpointPolicyDefinitions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ServiceEndpointPolicyResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ServiceEndpointPolicyResource.cs index 52fb9b849cf4d..851ed14d32a7a 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ServiceEndpointPolicyResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_ServiceEndpointPolicyResource.cs @@ -21,7 +21,7 @@ public partial class Sample_ServiceEndpointPolicyResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteServiceEndpointPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ServiceEndpointPolicyDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ServiceEndpointPolicyDelete.json // this example is just showing the usage of "ServiceEndpointPolicies_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Delete_DeleteServiceEndpointPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetServiceEndPointPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ServiceEndpointPolicyGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ServiceEndpointPolicyGet.json // this example is just showing the usage of "ServiceEndpointPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +79,7 @@ public async Task Get_GetServiceEndPointPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateServiceEndpointPolicyTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ServiceEndpointPolicyUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ServiceEndpointPolicyUpdateTags.json // this example is just showing the usage of "ServiceEndpointPolicies_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task Update_UpdateServiceEndpointPolicyTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetServiceEndpointPoliciesByServiceEndpointPolicy_ListAllServiceEndpointPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ServiceEndpointPolicyListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ServiceEndpointPolicyListAll.json // this example is just showing the usage of "ServiceEndpointPolicies_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SubnetCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SubnetCollection.cs index eab2ec81feb0f..90fa7452c160b 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SubnetCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SubnetCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SubnetCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSubnet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/SubnetGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/SubnetGet.json // this example is just showing the usage of "Subnets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetSubnet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetSubnet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/SubnetGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/SubnetGet.json // this example is just showing the usage of "Subnets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Exists_GetSubnet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetSubnet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/SubnetGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/SubnetGet.json // this example is just showing the usage of "Subnets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetIfExists_GetSubnet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSubnetWithADelegation() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/SubnetGetWithDelegation.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/SubnetGetWithDelegation.json // this example is just showing the usage of "Subnets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -164,7 +164,7 @@ public async Task Get_GetSubnetWithADelegation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetSubnetWithADelegation() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/SubnetGetWithDelegation.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/SubnetGetWithDelegation.json // this example is just showing the usage of "Subnets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -195,7 +195,7 @@ public async Task Exists_GetSubnetWithADelegation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetSubnetWithADelegation() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/SubnetGetWithDelegation.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/SubnetGetWithDelegation.json // this example is just showing the usage of "Subnets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -238,7 +238,7 @@ public async Task GetIfExists_GetSubnetWithADelegation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSubnetWithSharingScope() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/SubnetGetWithSharingScope.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/SubnetGetWithSharingScope.json // this example is just showing the usage of "Subnets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -273,7 +273,7 @@ public async Task Get_GetSubnetWithSharingScope() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetSubnetWithSharingScope() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/SubnetGetWithSharingScope.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/SubnetGetWithSharingScope.json // this example is just showing the usage of "Subnets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -304,7 +304,7 @@ public async Task Exists_GetSubnetWithSharingScope() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetSubnetWithSharingScope() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/SubnetGetWithSharingScope.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/SubnetGetWithSharingScope.json // this example is just showing the usage of "Subnets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -347,7 +347,7 @@ public async Task GetIfExists_GetSubnetWithSharingScope() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateSubnet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/SubnetCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/SubnetCreate.json // this example is just showing the usage of "Subnets_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -387,7 +387,7 @@ public async Task CreateOrUpdate_CreateSubnet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateSubnetWithADelegation() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/SubnetCreateWithDelegation.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/SubnetCreateWithDelegation.json // this example is just showing the usage of "Subnets_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -427,7 +427,7 @@ public async Task CreateOrUpdate_CreateSubnetWithADelegation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateSubnetWithServiceEndpoints() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/SubnetCreateServiceEndpoint.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/SubnetCreateServiceEndpoint.json // this example is just showing the usage of "Subnets_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -469,12 +469,60 @@ public async Task CreateOrUpdate_CreateSubnetWithServiceEndpoints() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + // Create subnet with service endpoints with network identifier + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateSubnetWithServiceEndpointsWithNetworkIdentifier() + { + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/SubnetCreateServiceEndpointNetworkIdentifier.json + // this example is just showing the usage of "Subnets_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this VirtualNetworkResource created on azure + // for more information of creating VirtualNetworkResource, please refer to the document of VirtualNetworkResource + string subscriptionId = "subid"; + string resourceGroupName = "subnet-test"; + string virtualNetworkName = "vnetname"; + ResourceIdentifier virtualNetworkResourceId = VirtualNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName); + VirtualNetworkResource virtualNetwork = client.GetVirtualNetworkResource(virtualNetworkResourceId); + + // get the collection of this SubnetResource + SubnetCollection collection = virtualNetwork.GetSubnets(); + + // invoke the operation + string subnetName = "subnet1"; + SubnetData data = new SubnetData() + { + AddressPrefix = "10.0.0.0/16", + ServiceEndpoints = +{ +new ServiceEndpointProperties() +{ +Service = "Microsoft.Storage", +NetworkIdentifierId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/subnet-test/providers/Microsoft.Network/publicIPAddresses/test-ip"), +} +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, subnetName, data); + SubnetResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SubnetData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + // Create subnet with sharing scope [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateSubnetWithSharingScope() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/SubnetCreateWithSharingScope.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/SubnetCreateWithSharingScope.json // this example is just showing the usage of "Subnets_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -514,7 +562,7 @@ public async Task CreateOrUpdate_CreateSubnetWithSharingScope() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListSubnets() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/SubnetList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/SubnetList.json // this example is just showing the usage of "Subnets_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SubnetResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SubnetResource.cs index ee1cd55ef6657..ab80d2a20e525 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SubnetResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SubnetResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SubnetResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteSubnet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/SubnetDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/SubnetDelete.json // this example is just showing the usage of "Subnets_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Delete_DeleteSubnet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSubnet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/SubnetGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/SubnetGet.json // this example is just showing the usage of "Subnets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Get_GetSubnet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSubnetWithADelegation() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/SubnetGetWithDelegation.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/SubnetGetWithDelegation.json // this example is just showing the usage of "Subnets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -112,7 +112,7 @@ public async Task Get_GetSubnetWithADelegation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSubnetWithSharingScope() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/SubnetGetWithSharingScope.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/SubnetGetWithSharingScope.json // this example is just showing the usage of "Subnets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -144,7 +144,7 @@ public async Task Get_GetSubnetWithSharingScope() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateSubnet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/SubnetCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/SubnetCreate.json // this example is just showing the usage of "Subnets_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -181,7 +181,7 @@ public async Task Update_CreateSubnet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateSubnetWithADelegation() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/SubnetCreateWithDelegation.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/SubnetCreateWithDelegation.json // this example is just showing the usage of "Subnets_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -218,7 +218,7 @@ public async Task Update_CreateSubnetWithADelegation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateSubnetWithServiceEndpoints() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/SubnetCreateServiceEndpoint.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/SubnetCreateServiceEndpoint.json // this example is just showing the usage of "Subnets_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -257,12 +257,57 @@ public async Task Update_CreateSubnetWithServiceEndpoints() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + // Create subnet with service endpoints with network identifier + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_CreateSubnetWithServiceEndpointsWithNetworkIdentifier() + { + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/SubnetCreateServiceEndpointNetworkIdentifier.json + // this example is just showing the usage of "Subnets_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubnetResource created on azure + // for more information of creating SubnetResource, please refer to the document of SubnetResource + string subscriptionId = "subid"; + string resourceGroupName = "subnet-test"; + string virtualNetworkName = "vnetname"; + string subnetName = "subnet1"; + ResourceIdentifier subnetResourceId = SubnetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName, subnetName); + SubnetResource subnet = client.GetSubnetResource(subnetResourceId); + + // invoke the operation + SubnetData data = new SubnetData() + { + AddressPrefix = "10.0.0.0/16", + ServiceEndpoints = +{ +new ServiceEndpointProperties() +{ +Service = "Microsoft.Storage", +NetworkIdentifierId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/subnet-test/providers/Microsoft.Network/publicIPAddresses/test-ip"), +} +}, + }; + ArmOperation lro = await subnet.UpdateAsync(WaitUntil.Completed, data); + SubnetResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SubnetData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + // Create subnet with sharing scope [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateSubnetWithSharingScope() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/SubnetCreateWithSharingScope.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/SubnetCreateWithSharingScope.json // this example is just showing the usage of "Subnets_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -299,7 +344,7 @@ public async Task Update_CreateSubnetWithSharingScope() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task PrepareNetworkPolicies_PrepareNetworkPolicies() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/SubnetPrepareNetworkPolicies.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/SubnetPrepareNetworkPolicies.json // this example is just showing the usage of "Subnets_PrepareNetworkPolicies" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -331,7 +376,7 @@ public async Task PrepareNetworkPolicies_PrepareNetworkPolicies() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task UnprepareNetworkPolicies_UnprepareNetworkPolicies() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/SubnetUnprepareNetworkPolicies.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/SubnetUnprepareNetworkPolicies.json // this example is just showing the usage of "Subnets_UnprepareNetworkPolicies" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -363,7 +408,7 @@ public async Task UnprepareNetworkPolicies_UnprepareNetworkPolicies() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetResourceNavigationLinks_GetResourceNavigationLinks() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGetResourceNavigationLinks.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGetResourceNavigationLinks.json // this example is just showing the usage of "ResourceNavigationLinks_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -394,7 +439,7 @@ public async Task GetResourceNavigationLinks_GetResourceNavigationLinks() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetServiceAssociationLinks_GetServiceAssociationLinks() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGetServiceAssociationLinks.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGetServiceAssociationLinks.json // this example is just showing the usage of "ServiceAssociationLinks_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SubscriptionNetworkManagerConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SubscriptionNetworkManagerConnectionCollection.cs index a6464f802a943..f7673a9940039 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SubscriptionNetworkManagerConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SubscriptionNetworkManagerConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SubscriptionNetworkManagerConnectionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateSubscriptionNetworkManagerConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerConnectionSubscriptionPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerConnectionSubscriptionPut.json // this example is just showing the usage of "SubscriptionNetworkManagerConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task CreateOrUpdate_CreateOrUpdateSubscriptionNetworkManagerConnect [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSubscriptionNetworkManagerConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerConnectionSubscriptionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerConnectionSubscriptionGet.json // this example is just showing the usage of "SubscriptionNetworkManagerConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_GetSubscriptionNetworkManagerConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetSubscriptionNetworkManagerConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerConnectionSubscriptionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerConnectionSubscriptionGet.json // this example is just showing the usage of "SubscriptionNetworkManagerConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +120,7 @@ public async Task Exists_GetSubscriptionNetworkManagerConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetSubscriptionNetworkManagerConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerConnectionSubscriptionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerConnectionSubscriptionGet.json // this example is just showing the usage of "SubscriptionNetworkManagerConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -161,7 +161,7 @@ public async Task GetIfExists_GetSubscriptionNetworkManagerConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListSubscriptionNetworkManagerConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerConnectionSubscriptionList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerConnectionSubscriptionList.json // this example is just showing the usage of "SubscriptionNetworkManagerConnections_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SubscriptionNetworkManagerConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SubscriptionNetworkManagerConnectionResource.cs index 37e8a2d366609..669ce8431be2c 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SubscriptionNetworkManagerConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SubscriptionNetworkManagerConnectionResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SubscriptionNetworkManagerConnectionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateSubscriptionNetworkManagerConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerConnectionSubscriptionPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerConnectionSubscriptionPut.json // this example is just showing the usage of "SubscriptionNetworkManagerConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Update_CreateOrUpdateSubscriptionNetworkManagerConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSubscriptionNetworkManagerConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerConnectionSubscriptionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerConnectionSubscriptionGet.json // this example is just showing the usage of "SubscriptionNetworkManagerConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Get_GetSubscriptionNetworkManagerConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteSubscriptionNetworkManagerConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerConnectionSubscriptionDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerConnectionSubscriptionDelete.json // this example is just showing the usage of "SubscriptionNetworkManagerConnections_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 6bf9435522729..e985ba4c73b95 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_SubscriptionResourceExtensions [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAvailableDelegations_GetAvailableDelegations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AvailableDelegationsSubscriptionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AvailableDelegationsSubscriptionGet.json // this example is just showing the usage of "AvailableDelegations_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task GetAvailableDelegations_GetAvailableDelegations() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAvailableServiceAliases_GetAvailableServiceAliases() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AvailableServiceAliasesList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AvailableServiceAliasesList.json // this example is just showing the usage of "AvailableServiceAliases_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +79,7 @@ public async Task GetAvailableServiceAliases_GetAvailableServiceAliases() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAzureFirewallFqdnTags_ListAllAzureFirewallFQDNTagsForAGivenSubscription() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AzureFirewallFqdnTagsListBySubscription.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AzureFirewallFqdnTagsListBySubscription.json // this example is just showing the usage of "AzureFirewallFqdnTags_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -107,7 +107,7 @@ public async Task GetAzureFirewallFqdnTags_ListAllAzureFirewallFQDNTagsForAGiven [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAvailableEndpointServices_EndpointServicesList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/EndpointServicesList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/EndpointServicesList.json // this example is just showing the usage of "AvailableEndpointServices_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -136,7 +136,7 @@ public async Task GetAvailableEndpointServices_EndpointServicesList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetExpressRouteServiceProviders_ListExpressRouteProviders() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ExpressRouteProviderList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ExpressRouteProviderList.json // this example is just showing the usage of "ExpressRouteServiceProviders_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -164,7 +164,7 @@ public async Task GetExpressRouteServiceProviders_ListExpressRouteProviders() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAvailablePrivateEndpointTypes_GetAvailablePrivateEndpointTypes() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AvailablePrivateEndpointTypesGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AvailablePrivateEndpointTypesGet.json // this example is just showing the usage of "AvailablePrivateEndpointTypes_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -193,7 +193,7 @@ public async Task GetAvailablePrivateEndpointTypes_GetAvailablePrivateEndpointTy [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckPrivateLinkServiceVisibilityPrivateLinkService_CheckPrivateLinkServiceVisibility() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/CheckPrivateLinkServiceVisibility.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/CheckPrivateLinkServiceVisibility.json // this example is just showing the usage of "PrivateLinkServices_CheckPrivateLinkServiceVisibility" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -224,7 +224,7 @@ public async Task CheckPrivateLinkServiceVisibilityPrivateLinkService_CheckPriva [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAutoApprovedPrivateLinkServicesPrivateLinkServices_GetListOfPrivateLinkServiceIdThatCanBeLinkedToAPrivateEndPointWithAutoApproved() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/AutoApprovedPrivateLinkServicesGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/AutoApprovedPrivateLinkServicesGet.json // this example is just showing the usage of "PrivateLinkServices_ListAutoApprovedPrivateLinkServices" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -253,7 +253,7 @@ public async Task GetAutoApprovedPrivateLinkServicesPrivateLinkServices_GetListO [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetBgpServiceCommunities_ServiceCommunityList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ServiceCommunityList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ServiceCommunityList.json // this example is just showing the usage of "BgpServiceCommunities_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -281,7 +281,7 @@ public async Task GetBgpServiceCommunities_ServiceCommunityList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetServiceTag_GetListOfServiceTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ServiceTagsList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ServiceTagsList.json // this example is just showing the usage of "ServiceTags_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -307,7 +307,7 @@ public async Task GetServiceTag_GetListOfServiceTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAllServiceTagInformation_GetListOfServiceTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ServiceTagInformationListResult.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ServiceTagInformationListResult.json // this example is just showing the usage of "ServiceTagInformation_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -336,7 +336,7 @@ public async Task GetAllServiceTagInformation_GetListOfServiceTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAllServiceTagInformation_GetListOfServiceTagsWithNoAddressPrefixes() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ServiceTagInformationListResultWithNoAddressPrefixes.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ServiceTagInformationListResultWithNoAddressPrefixes.json // this example is just showing the usage of "ServiceTagInformation_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -366,7 +366,7 @@ public async Task GetAllServiceTagInformation_GetListOfServiceTagsWithNoAddressP [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAllServiceTagInformation_GetListOfServiceTagsWithTagName() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ServiceTagInformationListResultWithTagname.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ServiceTagInformationListResultWithTagname.json // this example is just showing the usage of "ServiceTagInformation_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -396,7 +396,7 @@ public async Task GetAllServiceTagInformation_GetListOfServiceTagsWithTagName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetUsages_ListUsages() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/UsageList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/UsageList.json // this example is just showing the usage of "Usages_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -425,7 +425,7 @@ public async Task GetUsages_ListUsages() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetUsages_ListUsagesSpacedLocation() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/UsageListSpacedLocation.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/UsageListSpacedLocation.json // this example is just showing the usage of "Usages_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualApplianceSiteCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualApplianceSiteCollection.cs index 4181d6680185b..43c0aada80e5d 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualApplianceSiteCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualApplianceSiteCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_VirtualApplianceSiteCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetNetworkVirtualApplianceSite() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceSiteGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkVirtualApplianceSiteGet.json // this example is just showing the usage of "VirtualApplianceSites_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetNetworkVirtualApplianceSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetNetworkVirtualApplianceSite() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceSiteGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkVirtualApplianceSiteGet.json // this example is just showing the usage of "VirtualApplianceSites_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Exists_GetNetworkVirtualApplianceSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetNetworkVirtualApplianceSite() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceSiteGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkVirtualApplianceSiteGet.json // this example is just showing the usage of "VirtualApplianceSites_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetIfExists_GetNetworkVirtualApplianceSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateNetworkVirtualApplianceSite() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceSitePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkVirtualApplianceSitePut.json // this example is just showing the usage of "VirtualApplianceSites_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -175,7 +175,7 @@ public async Task CreateOrUpdate_CreateNetworkVirtualApplianceSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAllNetworkVirtualApplianceSitesForAGivenNetworkVirtualAppliance() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceSiteList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkVirtualApplianceSiteList.json // this example is just showing the usage of "VirtualApplianceSites_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualApplianceSiteResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualApplianceSiteResource.cs index a2956d766baf2..d6ecab4a9c308 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualApplianceSiteResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualApplianceSiteResource.cs @@ -20,7 +20,7 @@ public partial class Sample_VirtualApplianceSiteResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteNetworkVirtualApplianceSite() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceSiteDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkVirtualApplianceSiteDelete.json // this example is just showing the usage of "VirtualApplianceSites_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Delete_DeleteNetworkVirtualApplianceSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetNetworkVirtualApplianceSite() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceSiteGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkVirtualApplianceSiteGet.json // this example is just showing the usage of "VirtualApplianceSites_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Get_GetNetworkVirtualApplianceSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateNetworkVirtualApplianceSite() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkVirtualApplianceSitePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkVirtualApplianceSitePut.json // this example is just showing the usage of "VirtualApplianceSites_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualHubCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualHubCollection.cs index b4d0814ae7cc0..9946863319316 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualHubCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualHubCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_VirtualHubCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VirtualHubGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualHubGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualHubGet.json // this example is just showing the usage of "VirtualHubs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_VirtualHubGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_VirtualHubGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualHubGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualHubGet.json // this example is just showing the usage of "VirtualHubs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Exists_VirtualHubGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_VirtualHubGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualHubGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualHubGet.json // this example is just showing the usage of "VirtualHubs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task GetIfExists_VirtualHubGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_VirtualHubPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualHubPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualHubPut.json // this example is just showing the usage of "VirtualHubs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -172,7 +172,7 @@ public async Task CreateOrUpdate_VirtualHubPut() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_VirtualHubListByResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualHubListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualHubListByResourceGroup.json // this example is just showing the usage of "VirtualHubs_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualHubResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualHubResource.cs index d87de91dc8554..2a8ddd8f18a54 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualHubResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualHubResource.cs @@ -21,7 +21,7 @@ public partial class Sample_VirtualHubResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VirtualHubGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualHubGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualHubGet.json // this example is just showing the usage of "VirtualHubs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_VirtualHubGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_VirtualHubUpdate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualHubUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualHubUpdateTags.json // this example is just showing the usage of "VirtualHubs_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Update_VirtualHubUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_VirtualHubDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualHubDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualHubDelete.json // this example is just showing the usage of "VirtualHubs_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task Delete_VirtualHubDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetVirtualHubs_VirtualHubList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualHubList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualHubList.json // this example is just showing the usage of "VirtualHubs_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -150,7 +150,7 @@ public async Task GetVirtualHubs_VirtualHubList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetVirtualHubEffectiveRoutes_EffectiveRoutesForAConnectionResource() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/EffectiveRoutesListForConnection.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/EffectiveRoutesListForConnection.json // this example is just showing the usage of "VirtualHubs_GetEffectiveVirtualHubRoutes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -183,7 +183,7 @@ public async Task GetVirtualHubEffectiveRoutes_EffectiveRoutesForAConnectionReso [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetVirtualHubEffectiveRoutes_EffectiveRoutesForARouteTableResource() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/EffectiveRoutesListForRouteTable.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/EffectiveRoutesListForRouteTable.json // this example is just showing the usage of "VirtualHubs_GetEffectiveVirtualHubRoutes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -216,7 +216,7 @@ public async Task GetVirtualHubEffectiveRoutes_EffectiveRoutesForARouteTableReso [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetVirtualHubEffectiveRoutes_EffectiveRoutesForTheVirtualHub() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/EffectiveRoutesListForVirtualHub.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/EffectiveRoutesListForVirtualHub.json // this example is just showing the usage of "VirtualHubs_GetEffectiveVirtualHubRoutes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -245,7 +245,7 @@ public async Task GetVirtualHubEffectiveRoutes_EffectiveRoutesForTheVirtualHub() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetVirtualHubInboundRoutes_InboundRoutesForTheVirtualHubOnAParticularConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/GetInboundRoutes.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/GetInboundRoutes.json // this example is just showing the usage of "VirtualHubs_GetInboundRoutes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -278,7 +278,7 @@ public async Task GetVirtualHubInboundRoutes_InboundRoutesForTheVirtualHubOnAPar [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetVirtualHubOutboundRoutes_OutboundRoutesForTheVirtualHubOnAParticularConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/GetOutboundRoutes.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/GetOutboundRoutes.json // this example is just showing the usage of "VirtualHubs_GetOutboundRoutes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualHubRouteTableV2Collection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualHubRouteTableV2Collection.cs index 56bb0502dfd48..d099da077b74b 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualHubRouteTableV2Collection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualHubRouteTableV2Collection.cs @@ -20,7 +20,7 @@ public partial class Sample_VirtualHubRouteTableV2Collection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VirtualHubVirtualHubRouteTableV2Get() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualHubRouteTableV2Get.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualHubRouteTableV2Get.json // this example is just showing the usage of "VirtualHubRouteTableV2s_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_VirtualHubVirtualHubRouteTableV2Get() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_VirtualHubVirtualHubRouteTableV2Get() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualHubRouteTableV2Get.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualHubRouteTableV2Get.json // this example is just showing the usage of "VirtualHubRouteTableV2s_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Exists_VirtualHubVirtualHubRouteTableV2Get() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_VirtualHubVirtualHubRouteTableV2Get() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualHubRouteTableV2Get.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualHubRouteTableV2Get.json // this example is just showing the usage of "VirtualHubRouteTableV2s_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetIfExists_VirtualHubVirtualHubRouteTableV2Get() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_VirtualHubRouteTableV2Put() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualHubRouteTableV2Put.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualHubRouteTableV2Put.json // this example is just showing the usage of "VirtualHubRouteTableV2s_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -200,7 +200,7 @@ public async Task CreateOrUpdate_VirtualHubRouteTableV2Put() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_VirtualHubRouteTableV2List() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualHubRouteTableV2List.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualHubRouteTableV2List.json // this example is just showing the usage of "VirtualHubRouteTableV2s_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualHubRouteTableV2Resource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualHubRouteTableV2Resource.cs index 38f148cd9072d..9c9f822aa80ae 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualHubRouteTableV2Resource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualHubRouteTableV2Resource.cs @@ -20,7 +20,7 @@ public partial class Sample_VirtualHubRouteTableV2Resource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VirtualHubVirtualHubRouteTableV2Get() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualHubRouteTableV2Get.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualHubRouteTableV2Get.json // this example is just showing the usage of "VirtualHubRouteTableV2s_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_VirtualHubVirtualHubRouteTableV2Get() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_VirtualHubRouteTableV2Put() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualHubRouteTableV2Put.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualHubRouteTableV2Put.json // this example is just showing the usage of "VirtualHubRouteTableV2s_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +120,7 @@ public async Task Update_VirtualHubRouteTableV2Put() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_VirtualHubRouteTableV2Delete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualHubRouteTableV2Delete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualHubRouteTableV2Delete.json // this example is just showing the usage of "VirtualHubRouteTableV2s_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkCollection.cs index 2fc188189d03c..e615892b7cd88 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_VirtualNetworkCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetVirtualNetwork() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGet.json // this example is just showing the usage of "VirtualNetworks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetVirtualNetwork() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetVirtualNetwork() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGet.json // this example is just showing the usage of "VirtualNetworks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Exists_GetVirtualNetwork() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetVirtualNetwork() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGet.json // this example is just showing the usage of "VirtualNetworks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -127,7 +127,7 @@ public async Task GetIfExists_GetVirtualNetwork() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetVirtualNetworkWithADelegatedSubnet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGetWithSubnetDelegation.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGetWithSubnetDelegation.json // this example is just showing the usage of "VirtualNetworks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -161,7 +161,7 @@ public async Task Get_GetVirtualNetworkWithADelegatedSubnet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetVirtualNetworkWithADelegatedSubnet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGetWithSubnetDelegation.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGetWithSubnetDelegation.json // this example is just showing the usage of "VirtualNetworks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -191,7 +191,7 @@ public async Task Exists_GetVirtualNetworkWithADelegatedSubnet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetVirtualNetworkWithADelegatedSubnet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGetWithSubnetDelegation.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGetWithSubnetDelegation.json // this example is just showing the usage of "VirtualNetworks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -233,7 +233,7 @@ public async Task GetIfExists_GetVirtualNetworkWithADelegatedSubnet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetVirtualNetworkWithServiceAssociationLinks() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGetWithServiceAssociationLink.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGetWithServiceAssociationLink.json // this example is just showing the usage of "VirtualNetworks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -267,7 +267,7 @@ public async Task Get_GetVirtualNetworkWithServiceAssociationLinks() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetVirtualNetworkWithServiceAssociationLinks() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGetWithServiceAssociationLink.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGetWithServiceAssociationLink.json // this example is just showing the usage of "VirtualNetworks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -297,7 +297,7 @@ public async Task Exists_GetVirtualNetworkWithServiceAssociationLinks() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetVirtualNetworkWithServiceAssociationLinks() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGetWithServiceAssociationLink.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGetWithServiceAssociationLink.json // this example is just showing the usage of "VirtualNetworks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -339,7 +339,7 @@ public async Task GetIfExists_GetVirtualNetworkWithServiceAssociationLinks() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateVirtualNetwork() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkCreate.json // this example is just showing the usage of "VirtualNetworks_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -383,7 +383,7 @@ public async Task CreateOrUpdate_CreateVirtualNetwork() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateVirtualNetworkWithBgpCommunities() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkCreateWithBgpCommunities.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkCreateWithBgpCommunities.json // this example is just showing the usage of "VirtualNetworks_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -435,7 +435,7 @@ public async Task CreateOrUpdate_CreateVirtualNetworkWithBgpCommunities() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateVirtualNetworkWithDelegatedSubnets() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkCreateSubnetWithDelegation.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkCreateSubnetWithDelegation.json // this example is just showing the usage of "VirtualNetworks_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -494,7 +494,7 @@ public async Task CreateOrUpdate_CreateVirtualNetworkWithDelegatedSubnets() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateVirtualNetworkWithEncryption() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkCreateWithEncryption.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkCreateWithEncryption.json // this example is just showing the usage of "VirtualNetworks_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -549,7 +549,7 @@ public async Task CreateOrUpdate_CreateVirtualNetworkWithEncryption() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateVirtualNetworkWithServiceEndpoints() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkCreateServiceEndpoints.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkCreateServiceEndpoints.json // this example is just showing the usage of "VirtualNetworks_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -607,7 +607,7 @@ public async Task CreateOrUpdate_CreateVirtualNetworkWithServiceEndpoints() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateVirtualNetworkWithServiceEndpointsAndServiceEndpointPolicy() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkCreateServiceEndpointPolicy.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkCreateServiceEndpointPolicy.json // this example is just showing the usage of "VirtualNetworks_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -672,7 +672,7 @@ public async Task CreateOrUpdate_CreateVirtualNetworkWithServiceEndpointsAndServ [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateVirtualNetworkWithSubnet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkCreateSubnet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkCreateSubnet.json // this example is just showing the usage of "VirtualNetworks_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -723,7 +723,7 @@ public async Task CreateOrUpdate_CreateVirtualNetworkWithSubnet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateVirtualNetworkWithSubnetContainingAddressPrefixes() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkCreateSubnetWithAddressPrefixes.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkCreateSubnetWithAddressPrefixes.json // this example is just showing the usage of "VirtualNetworks_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -777,7 +777,7 @@ public async Task CreateOrUpdate_CreateVirtualNetworkWithSubnetContainingAddress [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListVirtualNetworksInResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkList.json // this example is just showing the usage of "VirtualNetworks_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkGatewayCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkGatewayCollection.cs index 009379bfb0f97..b68033a810b2a 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkGatewayCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkGatewayCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_VirtualNetworkGatewayCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_UpdateVirtualNetworkGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayUpdate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayUpdate.json // this example is just showing the usage of "VirtualNetworkGateways_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -161,7 +161,7 @@ public async Task CreateOrUpdate_UpdateVirtualNetworkGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_UpdateVirtualNetworkScalableGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkScalableGatewayUpdate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkScalableGatewayUpdate.json // this example is just showing the usage of "VirtualNetworkGateways_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -271,7 +271,7 @@ public async Task CreateOrUpdate_UpdateVirtualNetworkScalableGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetVirtualNetworkGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayGet.json // this example is just showing the usage of "VirtualNetworkGateways_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -305,7 +305,7 @@ public async Task Get_GetVirtualNetworkGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetVirtualNetworkGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayGet.json // this example is just showing the usage of "VirtualNetworkGateways_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -335,7 +335,7 @@ public async Task Exists_GetVirtualNetworkGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetVirtualNetworkGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayGet.json // this example is just showing the usage of "VirtualNetworkGateways_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -377,7 +377,7 @@ public async Task GetIfExists_GetVirtualNetworkGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetVirtualNetworkScalableGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkScalableGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkScalableGatewayGet.json // this example is just showing the usage of "VirtualNetworkGateways_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -411,7 +411,7 @@ public async Task Get_GetVirtualNetworkScalableGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetVirtualNetworkScalableGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkScalableGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkScalableGatewayGet.json // this example is just showing the usage of "VirtualNetworkGateways_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -441,7 +441,7 @@ public async Task Exists_GetVirtualNetworkScalableGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetVirtualNetworkScalableGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkScalableGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkScalableGatewayGet.json // this example is just showing the usage of "VirtualNetworkGateways_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -483,7 +483,7 @@ public async Task GetIfExists_GetVirtualNetworkScalableGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListVirtualNetworkGatewaysinResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayList.json // this example is just showing the usage of "VirtualNetworkGateways_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkGatewayConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkGatewayConnectionCollection.cs index 6f85c0b8f3c89..731187bb8278d 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkGatewayConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkGatewayConnectionCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_VirtualNetworkGatewayConnectionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateVirtualNetworkGatewayConnectionS2S() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayConnectionCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayConnectionCreate.json // this example is just showing the usage of "VirtualNetworkGatewayConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -138,7 +138,7 @@ public async Task CreateOrUpdate_CreateVirtualNetworkGatewayConnectionS2S() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetVirtualNetworkGatewayConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayConnectionGet.json // this example is just showing the usage of "VirtualNetworkGatewayConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -172,7 +172,7 @@ public async Task Get_GetVirtualNetworkGatewayConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetVirtualNetworkGatewayConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayConnectionGet.json // this example is just showing the usage of "VirtualNetworkGatewayConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -202,7 +202,7 @@ public async Task Exists_GetVirtualNetworkGatewayConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetVirtualNetworkGatewayConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayConnectionGet.json // this example is just showing the usage of "VirtualNetworkGatewayConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -244,7 +244,7 @@ public async Task GetIfExists_GetVirtualNetworkGatewayConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListVirtualNetworkGatewayConnectionsinResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayConnectionsList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayConnectionsList.json // this example is just showing the usage of "VirtualNetworkGatewayConnections_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkGatewayConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkGatewayConnectionResource.cs index a6448148fe3a9..47d9eb4f01771 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkGatewayConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkGatewayConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_VirtualNetworkGatewayConnectionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task VpnDeviceConfigurationScript_GetVPNDeviceConfigurationScript() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayVpnDeviceConfigurationScript.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayVpnDeviceConfigurationScript.json // this example is just showing the usage of "VirtualNetworkGateways_VpnDeviceConfigurationScript" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task VpnDeviceConfigurationScript_GetVPNDeviceConfigurationScript() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetVirtualNetworkGatewayConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayConnectionGet.json // this example is just showing the usage of "VirtualNetworkGatewayConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Get_GetVirtualNetworkGatewayConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteVirtualNetworkGatewayConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayConnectionDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayConnectionDelete.json // this example is just showing the usage of "VirtualNetworkGatewayConnections_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -111,7 +111,7 @@ public async Task Delete_DeleteVirtualNetworkGatewayConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateVirtualNetworkGatewayConnectionTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayConnectionUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayConnectionUpdateTags.json // this example is just showing the usage of "VirtualNetworkGatewayConnections_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -151,7 +151,7 @@ public async Task Update_UpdateVirtualNetworkGatewayConnectionTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task SetSharedKey_SetVirtualNetworkGatewayConnectionSharedKey() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayConnectionSetSharedKey.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayConnectionSetSharedKey.json // this example is just showing the usage of "VirtualNetworkGatewayConnections_SetSharedKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -180,7 +180,7 @@ public async Task SetSharedKey_SetVirtualNetworkGatewayConnectionSharedKey() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSharedKey_GetVirtualNetworkGatewayConnectionSharedKey() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayConnectionGetSharedKey.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayConnectionGetSharedKey.json // this example is just showing the usage of "VirtualNetworkGatewayConnections_GetSharedKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -207,7 +207,7 @@ public async Task GetSharedKey_GetVirtualNetworkGatewayConnectionSharedKey() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ResetSharedKey_ResetVirtualNetworkGatewayConnectionSharedKey() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayConnectionResetSharedKey.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayConnectionResetSharedKey.json // this example is just showing the usage of "VirtualNetworkGatewayConnections_ResetSharedKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -236,7 +236,7 @@ public async Task ResetSharedKey_ResetVirtualNetworkGatewayConnectionSharedKey() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task StartPacketCapture_StartPacketCaptureOnVirtualNetworkGatewayConnectionWithFilter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayConnectionStartPacketCaptureFilterData.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayConnectionStartPacketCaptureFilterData.json // this example is just showing the usage of "VirtualNetworkGatewayConnections_StartPacketCapture" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -268,7 +268,7 @@ public async Task StartPacketCapture_StartPacketCaptureOnVirtualNetworkGatewayCo [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task StartPacketCapture_StartPacketCaptureOnVirtualNetworkGatewayConnectionWithoutFilter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayConnectionStartPacketCapture.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayConnectionStartPacketCapture.json // this example is just showing the usage of "VirtualNetworkGatewayConnections_StartPacketCapture" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -296,7 +296,7 @@ public async Task StartPacketCapture_StartPacketCaptureOnVirtualNetworkGatewayCo [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task StopPacketCapture_StopPacketCaptureOnVirtualNetworkGatewayConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayConnectionStopPacketCapture.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayConnectionStopPacketCapture.json // this example is just showing the usage of "VirtualNetworkGatewayConnections_StopPacketCapture" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -328,7 +328,7 @@ public async Task StopPacketCapture_StopPacketCaptureOnVirtualNetworkGatewayConn [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIkeSas_GetVirtualNetworkGatewayConnectionIkeSa() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayConnectionGetIkeSas.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayConnectionGetIkeSas.json // this example is just showing the usage of "VirtualNetworkGatewayConnections_GetIkeSas" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -356,7 +356,7 @@ public async Task GetIkeSas_GetVirtualNetworkGatewayConnectionIkeSa() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ResetConnection_ResetVirtualNetworkGatewayConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayConnectionReset.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayConnectionReset.json // this example is just showing the usage of "VirtualNetworkGatewayConnections_ResetConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkGatewayNatRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkGatewayNatRuleCollection.cs index 22d29cc14d217..381aee1663f74 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkGatewayNatRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkGatewayNatRuleCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_VirtualNetworkGatewayNatRuleCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VirtualNetworkGatewayNatRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayNatRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayNatRuleGet.json // this example is just showing the usage of "VirtualNetworkGatewayNatRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_VirtualNetworkGatewayNatRuleGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_VirtualNetworkGatewayNatRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayNatRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayNatRuleGet.json // this example is just showing the usage of "VirtualNetworkGatewayNatRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Exists_VirtualNetworkGatewayNatRuleGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_VirtualNetworkGatewayNatRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayNatRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayNatRuleGet.json // this example is just showing the usage of "VirtualNetworkGatewayNatRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetIfExists_VirtualNetworkGatewayNatRuleGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_VirtualNetworkGatewayNatRulePut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayNatRulePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayNatRulePut.json // this example is just showing the usage of "VirtualNetworkGatewayNatRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -187,7 +187,7 @@ public async Task CreateOrUpdate_VirtualNetworkGatewayNatRulePut() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_VirtualNetworkGatewayNatRuleList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayNatRuleList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayNatRuleList.json // this example is just showing the usage of "VirtualNetworkGatewayNatRules_ListByVirtualNetworkGateway" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkGatewayNatRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkGatewayNatRuleResource.cs index 7907a7d256cb9..a77836f3c68a4 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkGatewayNatRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkGatewayNatRuleResource.cs @@ -20,7 +20,7 @@ public partial class Sample_VirtualNetworkGatewayNatRuleResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VirtualNetworkGatewayNatRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayNatRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayNatRuleGet.json // this example is just showing the usage of "VirtualNetworkGatewayNatRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_VirtualNetworkGatewayNatRuleGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_VirtualNetworkGatewayNatRulePut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayNatRulePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayNatRulePut.json // this example is just showing the usage of "VirtualNetworkGatewayNatRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -107,7 +107,7 @@ public async Task Update_VirtualNetworkGatewayNatRulePut() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_VirtualNetworkGatewayNatRuleDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayNatRuleDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayNatRuleDelete.json // this example is just showing the usage of "VirtualNetworkGatewayNatRules_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkGatewayResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkGatewayResource.cs index c95679bef7b2a..f60b6d8a10459 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkGatewayResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkGatewayResource.cs @@ -20,7 +20,7 @@ public partial class Sample_VirtualNetworkGatewayResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetVirtualNetworkGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayGet.json // this example is just showing the usage of "VirtualNetworkGateways_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_GetVirtualNetworkGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetVirtualNetworkScalableGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkScalableGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkScalableGatewayGet.json // this example is just showing the usage of "VirtualNetworkGateways_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task Get_GetVirtualNetworkScalableGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteVirtualNetworkGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayDelete.json // this example is just showing the usage of "VirtualNetworkGateways_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -109,7 +109,7 @@ public async Task Delete_DeleteVirtualNetworkGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateVirtualNetworkGatewayTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayUpdateTags.json // this example is just showing the usage of "VirtualNetworkGateways_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -149,7 +149,7 @@ public async Task Update_UpdateVirtualNetworkGatewayTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetConnections_VirtualNetworkGatewaysListConnections() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewaysListConnections.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewaysListConnections.json // this example is just showing the usage of "VirtualNetworkGateways_ListConnections" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -179,7 +179,7 @@ public async Task GetConnections_VirtualNetworkGatewaysListConnections() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Reset_ResetVirtualNetworkGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayReset.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayReset.json // this example is just showing the usage of "VirtualNetworkGateways_Reset" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -211,7 +211,7 @@ public async Task Reset_ResetVirtualNetworkGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ResetVpnClientSharedKey_ResetVpnClientSharedKey() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayResetVpnClientSharedKey.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayResetVpnClientSharedKey.json // this example is just showing the usage of "VirtualNetworkGateways_ResetVpnClientSharedKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -238,7 +238,7 @@ public async Task ResetVpnClientSharedKey_ResetVpnClientSharedKey() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GenerateVpnClientPackage_GenerateVPNClientPackage() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayGenerateVpnClientPackage.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayGenerateVpnClientPackage.json // this example is just showing the usage of "VirtualNetworkGateways_Generatevpnclientpackage" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -267,7 +267,7 @@ public async Task GenerateVpnClientPackage_GenerateVPNClientPackage() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GenerateVpnProfile_GenerateVirtualNetworkGatewayVPNProfile() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayGenerateVpnProfile.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayGenerateVpnProfile.json // this example is just showing the usage of "VirtualNetworkGateways_GenerateVpnProfile" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -296,7 +296,7 @@ public async Task GenerateVpnProfile_GenerateVirtualNetworkGatewayVPNProfile() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetVpnProfilePackageUrl_GetVirtualNetworkGatewayVPNProfilePackageURL() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayGetVpnProfilePackageUrl.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayGetVpnProfilePackageUrl.json // this example is just showing the usage of "VirtualNetworkGateways_GetVpnProfilePackageUrl" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -324,7 +324,7 @@ public async Task GetVpnProfilePackageUrl_GetVirtualNetworkGatewayVPNProfilePack [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetBgpPeerStatus_GetVirtualNetworkGatewayBGPPeerStatus() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayGetBGPPeerStatus.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayGetBGPPeerStatus.json // this example is just showing the usage of "VirtualNetworkGateways_GetBgpPeerStatus" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -352,7 +352,7 @@ public async Task GetBgpPeerStatus_GetVirtualNetworkGatewayBGPPeerStatus() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task SupportedVpnDevices_ListVirtualNetworkGatewaySupportedVPNDevices() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewaySupportedVpnDevice.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewaySupportedVpnDevice.json // this example is just showing the usage of "VirtualNetworkGateways_SupportedVpnDevices" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -379,7 +379,7 @@ public async Task SupportedVpnDevices_ListVirtualNetworkGatewaySupportedVPNDevic [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetLearnedRoutes_GetVirtualNetworkGatewayLearnedRoutes() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayLearnedRoutes.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayLearnedRoutes.json // this example is just showing the usage of "VirtualNetworkGateways_GetLearnedRoutes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -407,7 +407,7 @@ public async Task GetLearnedRoutes_GetVirtualNetworkGatewayLearnedRoutes() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAdvertisedRoutes_GetVirtualNetworkGatewayAdvertisedRoutes() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayGetAdvertisedRoutes.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayGetAdvertisedRoutes.json // this example is just showing the usage of "VirtualNetworkGateways_GetAdvertisedRoutes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -436,7 +436,7 @@ public async Task GetAdvertisedRoutes_GetVirtualNetworkGatewayAdvertisedRoutes() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task SetVpnclientIPsecParameters_SetVirtualNetworkGatewayVpnClientIpsecParameters() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewaySetVpnClientIpsecParameters.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewaySetVpnClientIpsecParameters.json // this example is just showing the usage of "VirtualNetworkGateways_SetVpnclientIPsecParameters" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -465,7 +465,7 @@ public async Task SetVpnclientIPsecParameters_SetVirtualNetworkGatewayVpnClientI [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetVpnclientIPsecParameters_GetVirtualNetworkGatewayVpnClientIpsecParameters() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayGetVpnClientIpsecParameters.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayGetVpnClientIpsecParameters.json // this example is just showing the usage of "VirtualNetworkGateways_GetVpnclientIPsecParameters" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -493,7 +493,7 @@ public async Task GetVpnclientIPsecParameters_GetVirtualNetworkGatewayVpnClientI [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task StartPacketCapture_StartPacketCaptureOnVirtualNetworkGatewayWithFilter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayStartPacketCaptureFilterData.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayStartPacketCaptureFilterData.json // this example is just showing the usage of "VirtualNetworkGateways_StartPacketCapture" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -525,7 +525,7 @@ public async Task StartPacketCapture_StartPacketCaptureOnVirtualNetworkGatewayWi [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task StartPacketCapture_StartPacketCaptureOnVirtualNetworkGatewayWithoutFilter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayStartPacketCapture.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayStartPacketCapture.json // this example is just showing the usage of "VirtualNetworkGateways_StartPacketCapture" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -553,7 +553,7 @@ public async Task StartPacketCapture_StartPacketCaptureOnVirtualNetworkGatewayWi [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task StopPacketCapture_StopPacketCaptureOnVirtualNetworkGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayStopPacketCapture.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayStopPacketCapture.json // this example is just showing the usage of "VirtualNetworkGateways_StopPacketCapture" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -585,7 +585,7 @@ public async Task StopPacketCapture_StopPacketCaptureOnVirtualNetworkGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetVpnclientConnectionHealth_GetVirtualNetworkGatewayVpnclientConnectionHealth() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewayGetVpnclientConnectionHealth.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewayGetVpnclientConnectionHealth.json // this example is just showing the usage of "VirtualNetworkGateways_GetVpnclientConnectionHealth" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -613,7 +613,7 @@ public async Task GetVpnclientConnectionHealth_GetVirtualNetworkGatewayVpnclient [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task DisconnectVirtualNetworkGatewayVpnConnections_DisconnectVpnConnectionsFromVirtualNetworkGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGatewaysDisconnectP2sVpnConnections.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGatewaysDisconnectP2sVpnConnections.json // this example is just showing the usage of "VirtualNetworkGateways_DisconnectVirtualNetworkGatewayVpnConnections" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkPeeringCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkPeeringCollection.cs index 8e1ef6d88563d..75b5af19e2f8d 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkPeeringCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkPeeringCollection.cs @@ -15,12 +15,121 @@ namespace Azure.ResourceManager.Network.Samples { public partial class Sample_VirtualNetworkPeeringCollection { + // Get V6 subnet peering + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetV6SubnetPeering() + { + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkV6SubnetPeeringGet.json + // this example is just showing the usage of "VirtualNetworkPeerings_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this VirtualNetworkResource created on azure + // for more information of creating VirtualNetworkResource, please refer to the document of VirtualNetworkResource + string subscriptionId = "subid"; + string resourceGroupName = "peerTest"; + string virtualNetworkName = "vnet1"; + ResourceIdentifier virtualNetworkResourceId = VirtualNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName); + VirtualNetworkResource virtualNetwork = client.GetVirtualNetworkResource(virtualNetworkResourceId); + + // get the collection of this VirtualNetworkPeeringResource + VirtualNetworkPeeringCollection collection = virtualNetwork.GetVirtualNetworkPeerings(); + + // invoke the operation + string virtualNetworkPeeringName = "peer"; + VirtualNetworkPeeringResource result = await collection.GetAsync(virtualNetworkPeeringName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + VirtualNetworkPeeringData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get V6 subnet peering + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetV6SubnetPeering() + { + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkV6SubnetPeeringGet.json + // this example is just showing the usage of "VirtualNetworkPeerings_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this VirtualNetworkResource created on azure + // for more information of creating VirtualNetworkResource, please refer to the document of VirtualNetworkResource + string subscriptionId = "subid"; + string resourceGroupName = "peerTest"; + string virtualNetworkName = "vnet1"; + ResourceIdentifier virtualNetworkResourceId = VirtualNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName); + VirtualNetworkResource virtualNetwork = client.GetVirtualNetworkResource(virtualNetworkResourceId); + + // get the collection of this VirtualNetworkPeeringResource + VirtualNetworkPeeringCollection collection = virtualNetwork.GetVirtualNetworkPeerings(); + + // invoke the operation + string virtualNetworkPeeringName = "peer"; + bool result = await collection.ExistsAsync(virtualNetworkPeeringName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get V6 subnet peering + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetV6SubnetPeering() + { + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkV6SubnetPeeringGet.json + // this example is just showing the usage of "VirtualNetworkPeerings_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this VirtualNetworkResource created on azure + // for more information of creating VirtualNetworkResource, please refer to the document of VirtualNetworkResource + string subscriptionId = "subid"; + string resourceGroupName = "peerTest"; + string virtualNetworkName = "vnet1"; + ResourceIdentifier virtualNetworkResourceId = VirtualNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName); + VirtualNetworkResource virtualNetwork = client.GetVirtualNetworkResource(virtualNetworkResourceId); + + // get the collection of this VirtualNetworkPeeringResource + VirtualNetworkPeeringCollection collection = virtualNetwork.GetVirtualNetworkPeerings(); + + // invoke the operation + string virtualNetworkPeeringName = "peer"; + NullableResponse response = await collection.GetIfExistsAsync(virtualNetworkPeeringName); + VirtualNetworkPeeringResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + VirtualNetworkPeeringData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + // Get peering [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkPeeringGet.json // this example is just showing the usage of "VirtualNetworkPeerings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +164,7 @@ public async Task Get_GetPeering() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkPeeringGet.json // this example is just showing the usage of "VirtualNetworkPeerings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +195,7 @@ public async Task Exists_GetPeering() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkPeeringGet.json // this example is just showing the usage of "VirtualNetworkPeerings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +238,7 @@ public async Task GetIfExists_GetPeering() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetPeeringWithRemoteVirtualNetworkEncryption() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkPeeringGetWithRemoteVirtualNetworkEncryption.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkPeeringGetWithRemoteVirtualNetworkEncryption.json // this example is just showing the usage of "VirtualNetworkPeerings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -164,7 +273,7 @@ public async Task Get_GetPeeringWithRemoteVirtualNetworkEncryption() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetPeeringWithRemoteVirtualNetworkEncryption() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkPeeringGetWithRemoteVirtualNetworkEncryption.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkPeeringGetWithRemoteVirtualNetworkEncryption.json // this example is just showing the usage of "VirtualNetworkPeerings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -195,7 +304,116 @@ public async Task Exists_GetPeeringWithRemoteVirtualNetworkEncryption() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetPeeringWithRemoteVirtualNetworkEncryption() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkPeeringGetWithRemoteVirtualNetworkEncryption.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkPeeringGetWithRemoteVirtualNetworkEncryption.json + // this example is just showing the usage of "VirtualNetworkPeerings_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this VirtualNetworkResource created on azure + // for more information of creating VirtualNetworkResource, please refer to the document of VirtualNetworkResource + string subscriptionId = "subid"; + string resourceGroupName = "peerTest"; + string virtualNetworkName = "vnet1"; + ResourceIdentifier virtualNetworkResourceId = VirtualNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName); + VirtualNetworkResource virtualNetwork = client.GetVirtualNetworkResource(virtualNetworkResourceId); + + // get the collection of this VirtualNetworkPeeringResource + VirtualNetworkPeeringCollection collection = virtualNetwork.GetVirtualNetworkPeerings(); + + // invoke the operation + string virtualNetworkPeeringName = "peer"; + NullableResponse response = await collection.GetIfExistsAsync(virtualNetworkPeeringName); + VirtualNetworkPeeringResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + VirtualNetworkPeeringData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Get subnet peering + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetSubnetPeering() + { + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkSubnetPeeringGet.json + // this example is just showing the usage of "VirtualNetworkPeerings_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this VirtualNetworkResource created on azure + // for more information of creating VirtualNetworkResource, please refer to the document of VirtualNetworkResource + string subscriptionId = "subid"; + string resourceGroupName = "peerTest"; + string virtualNetworkName = "vnet1"; + ResourceIdentifier virtualNetworkResourceId = VirtualNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName); + VirtualNetworkResource virtualNetwork = client.GetVirtualNetworkResource(virtualNetworkResourceId); + + // get the collection of this VirtualNetworkPeeringResource + VirtualNetworkPeeringCollection collection = virtualNetwork.GetVirtualNetworkPeerings(); + + // invoke the operation + string virtualNetworkPeeringName = "peer"; + VirtualNetworkPeeringResource result = await collection.GetAsync(virtualNetworkPeeringName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + VirtualNetworkPeeringData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get subnet peering + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetSubnetPeering() + { + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkSubnetPeeringGet.json + // this example is just showing the usage of "VirtualNetworkPeerings_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this VirtualNetworkResource created on azure + // for more information of creating VirtualNetworkResource, please refer to the document of VirtualNetworkResource + string subscriptionId = "subid"; + string resourceGroupName = "peerTest"; + string virtualNetworkName = "vnet1"; + ResourceIdentifier virtualNetworkResourceId = VirtualNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName); + VirtualNetworkResource virtualNetwork = client.GetVirtualNetworkResource(virtualNetworkResourceId); + + // get the collection of this VirtualNetworkPeeringResource + VirtualNetworkPeeringCollection collection = virtualNetwork.GetVirtualNetworkPeerings(); + + // invoke the operation + string virtualNetworkPeeringName = "peer"; + bool result = await collection.ExistsAsync(virtualNetworkPeeringName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get subnet peering + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetSubnetPeering() + { + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkSubnetPeeringGet.json // this example is just showing the usage of "VirtualNetworkPeerings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -233,12 +451,66 @@ public async Task GetIfExists_GetPeeringWithRemoteVirtualNetworkEncryption() } } + // Create V6 Subnet peering + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateV6SubnetPeering() + { + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkV6SubnetPeeringCreate.json + // this example is just showing the usage of "VirtualNetworkPeerings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this VirtualNetworkResource created on azure + // for more information of creating VirtualNetworkResource, please refer to the document of VirtualNetworkResource + string subscriptionId = "subid"; + string resourceGroupName = "peerTest"; + string virtualNetworkName = "vnet1"; + ResourceIdentifier virtualNetworkResourceId = VirtualNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName); + VirtualNetworkResource virtualNetwork = client.GetVirtualNetworkResource(virtualNetworkResourceId); + + // get the collection of this VirtualNetworkPeeringResource + VirtualNetworkPeeringCollection collection = virtualNetwork.GetVirtualNetworkPeerings(); + + // invoke the operation + string virtualNetworkPeeringName = "peer"; + VirtualNetworkPeeringData data = new VirtualNetworkPeeringData() + { + AllowVirtualNetworkAccess = true, + AllowForwardedTraffic = true, + AllowGatewayTransit = false, + UseRemoteGateways = false, + RemoteVirtualNetworkId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2"), + AreCompleteVnetsPeered = false, + EnableOnlyIPv6Peering = true, + LocalSubnetNames = +{ +"Subnet1","Subnet4" +}, + RemoteSubnetNames = +{ +"Subnet2" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, virtualNetworkPeeringName, data); + VirtualNetworkPeeringResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + VirtualNetworkPeeringData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + // Create peering [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreatePeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkPeeringCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkPeeringCreate.json // this example is just showing the usage of "VirtualNetworkPeerings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -282,7 +554,7 @@ public async Task CreateOrUpdate_CreatePeering() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreatePeeringWithRemoteVirtualNetworkEncryption() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkPeeringCreateWithRemoteVirtualNetworkEncryption.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkPeeringCreateWithRemoteVirtualNetworkEncryption.json // this example is just showing the usage of "VirtualNetworkPeerings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -321,12 +593,158 @@ public async Task CreateOrUpdate_CreatePeeringWithRemoteVirtualNetworkEncryption Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + // Create subnet peering + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateSubnetPeering() + { + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkSubnetPeeringCreate.json + // this example is just showing the usage of "VirtualNetworkPeerings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this VirtualNetworkResource created on azure + // for more information of creating VirtualNetworkResource, please refer to the document of VirtualNetworkResource + string subscriptionId = "subid"; + string resourceGroupName = "peerTest"; + string virtualNetworkName = "vnet1"; + ResourceIdentifier virtualNetworkResourceId = VirtualNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName); + VirtualNetworkResource virtualNetwork = client.GetVirtualNetworkResource(virtualNetworkResourceId); + + // get the collection of this VirtualNetworkPeeringResource + VirtualNetworkPeeringCollection collection = virtualNetwork.GetVirtualNetworkPeerings(); + + // invoke the operation + string virtualNetworkPeeringName = "peer"; + VirtualNetworkPeeringData data = new VirtualNetworkPeeringData() + { + AllowVirtualNetworkAccess = true, + AllowForwardedTraffic = true, + AllowGatewayTransit = false, + UseRemoteGateways = false, + RemoteVirtualNetworkId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2"), + AreCompleteVnetsPeered = false, + EnableOnlyIPv6Peering = false, + LocalSubnetNames = +{ +"Subnet1","Subnet4" +}, + RemoteSubnetNames = +{ +"Subnet2" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, virtualNetworkPeeringName, data); + VirtualNetworkPeeringResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + VirtualNetworkPeeringData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + // Sync Peering [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_SyncPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkPeeringSync.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkPeeringSync.json + // this example is just showing the usage of "VirtualNetworkPeerings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this VirtualNetworkResource created on azure + // for more information of creating VirtualNetworkResource, please refer to the document of VirtualNetworkResource + string subscriptionId = "subid"; + string resourceGroupName = "peerTest"; + string virtualNetworkName = "vnet1"; + ResourceIdentifier virtualNetworkResourceId = VirtualNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName); + VirtualNetworkResource virtualNetwork = client.GetVirtualNetworkResource(virtualNetworkResourceId); + + // get the collection of this VirtualNetworkPeeringResource + VirtualNetworkPeeringCollection collection = virtualNetwork.GetVirtualNetworkPeerings(); + + // invoke the operation + string virtualNetworkPeeringName = "peer"; + VirtualNetworkPeeringData data = new VirtualNetworkPeeringData() + { + AllowVirtualNetworkAccess = true, + AllowForwardedTraffic = true, + AllowGatewayTransit = false, + UseRemoteGateways = false, + RemoteVirtualNetworkId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2"), + }; + SyncRemoteAddressSpace? syncRemoteAddressSpace = SyncRemoteAddressSpace.True; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, virtualNetworkPeeringName, data, syncRemoteAddressSpace: syncRemoteAddressSpace); + VirtualNetworkPeeringResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + VirtualNetworkPeeringData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Sync V6 Subnet Peering + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_SyncV6SubnetPeering() + { + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkV6SubnetPeeringSync.json + // this example is just showing the usage of "VirtualNetworkPeerings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this VirtualNetworkResource created on azure + // for more information of creating VirtualNetworkResource, please refer to the document of VirtualNetworkResource + string subscriptionId = "subid"; + string resourceGroupName = "peerTest"; + string virtualNetworkName = "vnet1"; + ResourceIdentifier virtualNetworkResourceId = VirtualNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName); + VirtualNetworkResource virtualNetwork = client.GetVirtualNetworkResource(virtualNetworkResourceId); + + // get the collection of this VirtualNetworkPeeringResource + VirtualNetworkPeeringCollection collection = virtualNetwork.GetVirtualNetworkPeerings(); + + // invoke the operation + string virtualNetworkPeeringName = "peer"; + VirtualNetworkPeeringData data = new VirtualNetworkPeeringData() + { + AllowVirtualNetworkAccess = true, + AllowForwardedTraffic = true, + AllowGatewayTransit = false, + UseRemoteGateways = false, + RemoteVirtualNetworkId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2"), + AreCompleteVnetsPeered = false, + EnableOnlyIPv6Peering = true, + }; + SyncRemoteAddressSpace? syncRemoteAddressSpace = SyncRemoteAddressSpace.True; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, virtualNetworkPeeringName, data, syncRemoteAddressSpace: syncRemoteAddressSpace); + VirtualNetworkPeeringResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + VirtualNetworkPeeringData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Sync subnet Peering + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_SyncSubnetPeering() + { + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkSubnetPeeringSync.json // this example is just showing the usage of "VirtualNetworkPeerings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -354,6 +772,8 @@ public async Task CreateOrUpdate_SyncPeering() AllowGatewayTransit = false, UseRemoteGateways = false, RemoteVirtualNetworkId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2"), + AreCompleteVnetsPeered = false, + EnableOnlyIPv6Peering = false, }; SyncRemoteAddressSpace? syncRemoteAddressSpace = SyncRemoteAddressSpace.True; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, virtualNetworkPeeringName, data, syncRemoteAddressSpace: syncRemoteAddressSpace); @@ -371,7 +791,7 @@ public async Task CreateOrUpdate_SyncPeering() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListPeerings() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkPeeringList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkPeeringList.json // this example is just showing the usage of "VirtualNetworkPeerings_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -408,7 +828,7 @@ public async Task GetAll_ListPeerings() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListPeeringsWithRemoteVirtualNetworkEncryption() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkPeeringListWithRemoteVirtualNetworkEncryption.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkPeeringListWithRemoteVirtualNetworkEncryption.json // this example is just showing the usage of "VirtualNetworkPeerings_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkPeeringResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkPeeringResource.cs index b0dc37e06d79e..f33986d3bd61b 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkPeeringResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkPeeringResource.cs @@ -20,7 +20,7 @@ public partial class Sample_VirtualNetworkPeeringResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeletePeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkPeeringDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkPeeringDelete.json // this example is just showing the usage of "VirtualNetworkPeerings_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -43,12 +43,44 @@ public async Task Delete_DeletePeering() Console.WriteLine($"Succeeded"); } + // Get V6 subnet peering + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetV6SubnetPeering() + { + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkV6SubnetPeeringGet.json + // this example is just showing the usage of "VirtualNetworkPeerings_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this VirtualNetworkPeeringResource created on azure + // for more information of creating VirtualNetworkPeeringResource, please refer to the document of VirtualNetworkPeeringResource + string subscriptionId = "subid"; + string resourceGroupName = "peerTest"; + string virtualNetworkName = "vnet1"; + string virtualNetworkPeeringName = "peer"; + ResourceIdentifier virtualNetworkPeeringResourceId = VirtualNetworkPeeringResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName); + VirtualNetworkPeeringResource virtualNetworkPeering = client.GetVirtualNetworkPeeringResource(virtualNetworkPeeringResourceId); + + // invoke the operation + VirtualNetworkPeeringResource result = await virtualNetworkPeering.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + VirtualNetworkPeeringData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + // Get peering [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkPeeringGet.json // this example is just showing the usage of "VirtualNetworkPeerings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +112,39 @@ public async Task Get_GetPeering() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetPeeringWithRemoteVirtualNetworkEncryption() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkPeeringGetWithRemoteVirtualNetworkEncryption.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkPeeringGetWithRemoteVirtualNetworkEncryption.json + // this example is just showing the usage of "VirtualNetworkPeerings_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this VirtualNetworkPeeringResource created on azure + // for more information of creating VirtualNetworkPeeringResource, please refer to the document of VirtualNetworkPeeringResource + string subscriptionId = "subid"; + string resourceGroupName = "peerTest"; + string virtualNetworkName = "vnet1"; + string virtualNetworkPeeringName = "peer"; + ResourceIdentifier virtualNetworkPeeringResourceId = VirtualNetworkPeeringResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName); + VirtualNetworkPeeringResource virtualNetworkPeering = client.GetVirtualNetworkPeeringResource(virtualNetworkPeeringResourceId); + + // invoke the operation + VirtualNetworkPeeringResource result = await virtualNetworkPeering.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + VirtualNetworkPeeringData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get subnet peering + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetSubnetPeering() + { + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkSubnetPeeringGet.json // this example is just showing the usage of "VirtualNetworkPeerings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -107,12 +171,63 @@ public async Task Get_GetPeeringWithRemoteVirtualNetworkEncryption() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + // Create V6 Subnet peering + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_CreateV6SubnetPeering() + { + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkV6SubnetPeeringCreate.json + // this example is just showing the usage of "VirtualNetworkPeerings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this VirtualNetworkPeeringResource created on azure + // for more information of creating VirtualNetworkPeeringResource, please refer to the document of VirtualNetworkPeeringResource + string subscriptionId = "subid"; + string resourceGroupName = "peerTest"; + string virtualNetworkName = "vnet1"; + string virtualNetworkPeeringName = "peer"; + ResourceIdentifier virtualNetworkPeeringResourceId = VirtualNetworkPeeringResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName); + VirtualNetworkPeeringResource virtualNetworkPeering = client.GetVirtualNetworkPeeringResource(virtualNetworkPeeringResourceId); + + // invoke the operation + VirtualNetworkPeeringData data = new VirtualNetworkPeeringData() + { + AllowVirtualNetworkAccess = true, + AllowForwardedTraffic = true, + AllowGatewayTransit = false, + UseRemoteGateways = false, + RemoteVirtualNetworkId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2"), + AreCompleteVnetsPeered = false, + EnableOnlyIPv6Peering = true, + LocalSubnetNames = +{ +"Subnet1","Subnet4" +}, + RemoteSubnetNames = +{ +"Subnet2" +}, + }; + ArmOperation lro = await virtualNetworkPeering.UpdateAsync(WaitUntil.Completed, data); + VirtualNetworkPeeringResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + VirtualNetworkPeeringData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + // Create peering [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreatePeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkPeeringCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkPeeringCreate.json // this example is just showing the usage of "VirtualNetworkPeerings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -153,7 +268,48 @@ public async Task Update_CreatePeering() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreatePeeringWithRemoteVirtualNetworkEncryption() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkPeeringCreateWithRemoteVirtualNetworkEncryption.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkPeeringCreateWithRemoteVirtualNetworkEncryption.json + // this example is just showing the usage of "VirtualNetworkPeerings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this VirtualNetworkPeeringResource created on azure + // for more information of creating VirtualNetworkPeeringResource, please refer to the document of VirtualNetworkPeeringResource + string subscriptionId = "subid"; + string resourceGroupName = "peerTest"; + string virtualNetworkName = "vnet1"; + string virtualNetworkPeeringName = "peer"; + ResourceIdentifier virtualNetworkPeeringResourceId = VirtualNetworkPeeringResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName); + VirtualNetworkPeeringResource virtualNetworkPeering = client.GetVirtualNetworkPeeringResource(virtualNetworkPeeringResourceId); + + // invoke the operation + VirtualNetworkPeeringData data = new VirtualNetworkPeeringData() + { + AllowVirtualNetworkAccess = true, + AllowForwardedTraffic = true, + AllowGatewayTransit = false, + UseRemoteGateways = false, + RemoteVirtualNetworkId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2"), + }; + ArmOperation lro = await virtualNetworkPeering.UpdateAsync(WaitUntil.Completed, data); + VirtualNetworkPeeringResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + VirtualNetworkPeeringData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Create subnet peering + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_CreateSubnetPeering() + { + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkSubnetPeeringCreate.json // this example is just showing the usage of "VirtualNetworkPeerings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -178,6 +334,16 @@ public async Task Update_CreatePeeringWithRemoteVirtualNetworkEncryption() AllowGatewayTransit = false, UseRemoteGateways = false, RemoteVirtualNetworkId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2"), + AreCompleteVnetsPeered = false, + EnableOnlyIPv6Peering = false, + LocalSubnetNames = +{ +"Subnet1","Subnet4" +}, + RemoteSubnetNames = +{ +"Subnet2" +}, }; ArmOperation lro = await virtualNetworkPeering.UpdateAsync(WaitUntil.Completed, data); VirtualNetworkPeeringResource result = lro.Value; @@ -194,7 +360,93 @@ public async Task Update_CreatePeeringWithRemoteVirtualNetworkEncryption() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_SyncPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkPeeringSync.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkPeeringSync.json + // this example is just showing the usage of "VirtualNetworkPeerings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this VirtualNetworkPeeringResource created on azure + // for more information of creating VirtualNetworkPeeringResource, please refer to the document of VirtualNetworkPeeringResource + string subscriptionId = "subid"; + string resourceGroupName = "peerTest"; + string virtualNetworkName = "vnet1"; + string virtualNetworkPeeringName = "peer"; + ResourceIdentifier virtualNetworkPeeringResourceId = VirtualNetworkPeeringResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName); + VirtualNetworkPeeringResource virtualNetworkPeering = client.GetVirtualNetworkPeeringResource(virtualNetworkPeeringResourceId); + + // invoke the operation + VirtualNetworkPeeringData data = new VirtualNetworkPeeringData() + { + AllowVirtualNetworkAccess = true, + AllowForwardedTraffic = true, + AllowGatewayTransit = false, + UseRemoteGateways = false, + RemoteVirtualNetworkId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2"), + }; + SyncRemoteAddressSpace? syncRemoteAddressSpace = SyncRemoteAddressSpace.True; + ArmOperation lro = await virtualNetworkPeering.UpdateAsync(WaitUntil.Completed, data, syncRemoteAddressSpace: syncRemoteAddressSpace); + VirtualNetworkPeeringResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + VirtualNetworkPeeringData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Sync V6 Subnet Peering + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_SyncV6SubnetPeering() + { + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkV6SubnetPeeringSync.json + // this example is just showing the usage of "VirtualNetworkPeerings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this VirtualNetworkPeeringResource created on azure + // for more information of creating VirtualNetworkPeeringResource, please refer to the document of VirtualNetworkPeeringResource + string subscriptionId = "subid"; + string resourceGroupName = "peerTest"; + string virtualNetworkName = "vnet1"; + string virtualNetworkPeeringName = "peer"; + ResourceIdentifier virtualNetworkPeeringResourceId = VirtualNetworkPeeringResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName); + VirtualNetworkPeeringResource virtualNetworkPeering = client.GetVirtualNetworkPeeringResource(virtualNetworkPeeringResourceId); + + // invoke the operation + VirtualNetworkPeeringData data = new VirtualNetworkPeeringData() + { + AllowVirtualNetworkAccess = true, + AllowForwardedTraffic = true, + AllowGatewayTransit = false, + UseRemoteGateways = false, + RemoteVirtualNetworkId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2"), + AreCompleteVnetsPeered = false, + EnableOnlyIPv6Peering = true, + }; + SyncRemoteAddressSpace? syncRemoteAddressSpace = SyncRemoteAddressSpace.True; + ArmOperation lro = await virtualNetworkPeering.UpdateAsync(WaitUntil.Completed, data, syncRemoteAddressSpace: syncRemoteAddressSpace); + VirtualNetworkPeeringResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + VirtualNetworkPeeringData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Sync subnet Peering + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_SyncSubnetPeering() + { + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkSubnetPeeringSync.json // this example is just showing the usage of "VirtualNetworkPeerings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -219,6 +471,8 @@ public async Task Update_SyncPeering() AllowGatewayTransit = false, UseRemoteGateways = false, RemoteVirtualNetworkId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2"), + AreCompleteVnetsPeered = false, + EnableOnlyIPv6Peering = false, }; SyncRemoteAddressSpace? syncRemoteAddressSpace = SyncRemoteAddressSpace.True; ArmOperation lro = await virtualNetworkPeering.UpdateAsync(WaitUntil.Completed, data, syncRemoteAddressSpace: syncRemoteAddressSpace); diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkResource.cs index 082d153f6d24d..b7abe5731327e 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkResource.cs @@ -21,7 +21,7 @@ public partial class Sample_VirtualNetworkResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkManagerEffectiveConnectivityConfigurations_ListEffectiveConnectivityConfiguration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerEffectiveConnectivityConfigurationsList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerEffectiveConnectivityConfigurationsList.json // this example is just showing the usage of "ListNetworkManagerEffectiveConnectivityConfigurations" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task GetNetworkManagerEffectiveConnectivityConfigurations_ListEffec [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkManagerEffectiveSecurityAdminRules_ListEffectiveSecurityAdminRules() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NetworkManagerEffectiveSecurityAdminRulesList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NetworkManagerEffectiveSecurityAdminRulesList.json // this example is just showing the usage of "ListNetworkManagerEffectiveSecurityAdminRules" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task GetNetworkManagerEffectiveSecurityAdminRules_ListEffectiveSecu [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteVirtualNetwork() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkDelete.json // this example is just showing the usage of "VirtualNetworks_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -116,7 +116,7 @@ public async Task Delete_DeleteVirtualNetwork() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetVirtualNetwork() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGet.json // this example is just showing the usage of "VirtualNetworks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -147,7 +147,7 @@ public async Task Get_GetVirtualNetwork() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetVirtualNetworkWithADelegatedSubnet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGetWithSubnetDelegation.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGetWithSubnetDelegation.json // this example is just showing the usage of "VirtualNetworks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -178,7 +178,7 @@ public async Task Get_GetVirtualNetworkWithADelegatedSubnet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetVirtualNetworkWithServiceAssociationLinks() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkGetWithServiceAssociationLink.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkGetWithServiceAssociationLink.json // this example is just showing the usage of "VirtualNetworks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -209,7 +209,7 @@ public async Task Get_GetVirtualNetworkWithServiceAssociationLinks() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateVirtualNetworkTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkUpdateTags.json // this example is just showing the usage of "VirtualNetworks_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -248,7 +248,7 @@ public async Task Update_UpdateVirtualNetworkTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetVirtualNetworks_ListAllVirtualNetworks() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkListAll.json // this example is just showing the usage of "VirtualNetworks_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -280,7 +280,7 @@ public async Task GetVirtualNetworks_ListAllVirtualNetworks() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckIPAddressAvailability_CheckIPAddressAvailability() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkCheckIPAddressAvailability.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkCheckIPAddressAvailability.json // this example is just showing the usage of "VirtualNetworks_CheckIPAddressAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -308,7 +308,7 @@ public async Task CheckIPAddressAvailability_CheckIPAddressAvailability() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetUsage_VnetGetUsage() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkListUsage.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkListUsage.json // this example is just showing the usage of "VirtualNetworks_ListUsage" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkTapCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkTapCollection.cs index 3f4de570d56c8..dc41c0022ac2a 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkTapCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkTapCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_VirtualNetworkTapCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetVirtualNetworkTap() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkTapGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkTapGet.json // this example is just showing the usage of "VirtualNetworkTaps_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_GetVirtualNetworkTap() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetVirtualNetworkTap() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkTapGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkTapGet.json // this example is just showing the usage of "VirtualNetworkTaps_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Exists_GetVirtualNetworkTap() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetVirtualNetworkTap() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkTapGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkTapGet.json // this example is just showing the usage of "VirtualNetworkTaps_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task GetIfExists_GetVirtualNetworkTap() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateVirtualNetworkTap() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkTapCreate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkTapCreate.json // this example is just showing the usage of "VirtualNetworkTaps_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -169,7 +169,7 @@ public async Task CreateOrUpdate_CreateVirtualNetworkTap() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListVirtualNetworkTapsInResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkTapList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkTapList.json // this example is just showing the usage of "VirtualNetworkTaps_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkTapResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkTapResource.cs index b83f5429adf5e..0d891f4f88878 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkTapResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualNetworkTapResource.cs @@ -21,7 +21,7 @@ public partial class Sample_VirtualNetworkTapResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteVirtualNetworkTapResource() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkTapDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkTapDelete.json // this example is just showing the usage of "VirtualNetworkTaps_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Delete_DeleteVirtualNetworkTapResource() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetVirtualNetworkTap() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkTapGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkTapGet.json // this example is just showing the usage of "VirtualNetworkTaps_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +79,7 @@ public async Task Get_GetVirtualNetworkTap() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateVirtualNetworkTapTags() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkTapUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkTapUpdateTags.json // this example is just showing the usage of "VirtualNetworkTaps_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task Update_UpdateVirtualNetworkTapTags() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetVirtualNetworkTaps_ListAllVirtualNetworkTaps() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualNetworkTapListAll.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualNetworkTapListAll.json // this example is just showing the usage of "VirtualNetworkTaps_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualRouterCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualRouterCollection.cs index c36be51d2c413..a107e519cf476 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualRouterCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualRouterCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_VirtualRouterCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetVirtualRouter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualRouterGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualRouterGet.json // this example is just showing the usage of "VirtualRouters_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_GetVirtualRouter() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetVirtualRouter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualRouterGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualRouterGet.json // this example is just showing the usage of "VirtualRouters_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Exists_GetVirtualRouter() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetVirtualRouter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualRouterGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualRouterGet.json // this example is just showing the usage of "VirtualRouters_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task GetIfExists_GetVirtualRouter() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateVirtualRouter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualRouterPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualRouterPut.json // this example is just showing the usage of "VirtualRouters_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -170,7 +170,7 @@ public async Task CreateOrUpdate_CreateVirtualRouter() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAllVirtualRouterForAGivenResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualRouterListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualRouterListByResourceGroup.json // this example is just showing the usage of "VirtualRouters_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualRouterPeeringCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualRouterPeeringCollection.cs index 9e169909b87d1..a35ce855f2d1e 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualRouterPeeringCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualRouterPeeringCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_VirtualRouterPeeringCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetVirtualRouterPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualRouterPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualRouterPeeringGet.json // this example is just showing the usage of "VirtualRouterPeerings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_GetVirtualRouterPeering() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetVirtualRouterPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualRouterPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualRouterPeeringGet.json // this example is just showing the usage of "VirtualRouterPeerings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Exists_GetVirtualRouterPeering() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetVirtualRouterPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualRouterPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualRouterPeeringGet.json // this example is just showing the usage of "VirtualRouterPeerings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,7 +128,7 @@ public async Task GetIfExists_GetVirtualRouterPeering() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateVirtualRouterPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualRouterPeeringPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualRouterPeeringPut.json // this example is just showing the usage of "VirtualRouterPeerings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -169,7 +169,7 @@ public async Task CreateOrUpdate_CreateVirtualRouterPeering() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAllVirtualRouterPeeringsForAGivenVirtualRouter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualRouterPeeringList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualRouterPeeringList.json // this example is just showing the usage of "VirtualRouterPeerings_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualRouterPeeringResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualRouterPeeringResource.cs index 2abc7a3cb7408..9f9f6e242ee60 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualRouterPeeringResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualRouterPeeringResource.cs @@ -19,7 +19,7 @@ public partial class Sample_VirtualRouterPeeringResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteVirtualRouterPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualRouterPeeringDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualRouterPeeringDelete.json // this example is just showing the usage of "VirtualRouterPeerings_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -47,7 +47,7 @@ public async Task Delete_DeleteVirtualRouterPeering() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetVirtualRouterPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualRouterPeeringGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualRouterPeeringGet.json // this example is just showing the usage of "VirtualRouterPeerings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +79,7 @@ public async Task Get_GetVirtualRouterPeering() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateVirtualRouterPeering() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualRouterPeeringPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualRouterPeeringPut.json // this example is just showing the usage of "VirtualRouterPeerings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualRouterResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualRouterResource.cs index 7973e1e8c4223..ae0900e2595e7 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualRouterResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualRouterResource.cs @@ -20,7 +20,7 @@ public partial class Sample_VirtualRouterResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteVirtualRouter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualRouterDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualRouterDelete.json // this example is just showing the usage of "VirtualRouters_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -47,7 +47,7 @@ public async Task Delete_DeleteVirtualRouter() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetVirtualRouter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualRouterGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualRouterGet.json // this example is just showing the usage of "VirtualRouters_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Get_GetVirtualRouter() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateVirtualRouter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualRouterPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualRouterPut.json // this example is just showing the usage of "VirtualRouters_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -119,7 +119,7 @@ public async Task Update_CreateVirtualRouter() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetVirtualRouters_ListAllVirtualRoutersForAGivenSubscription() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualRouterListBySubscription.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualRouterListBySubscription.json // this example is just showing the usage of "VirtualRouters_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualWanCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualWanCollection.cs index 6e6851896239c..3adafdaa2de12 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualWanCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualWanCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_VirtualWanCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VirtualWANGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualWANGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualWANGet.json // this example is just showing the usage of "VirtualWans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_VirtualWANGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_VirtualWANGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualWANGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualWANGet.json // this example is just showing the usage of "VirtualWans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Exists_VirtualWANGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_VirtualWANGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualWANGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualWANGet.json // this example is just showing the usage of "VirtualWans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task GetIfExists_VirtualWANGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_VirtualWANCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualWANPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualWANPut.json // this example is just showing the usage of "VirtualWans_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -171,7 +171,7 @@ public async Task CreateOrUpdate_VirtualWANCreate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_VirtualWANListByResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualWANListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualWANListByResourceGroup.json // this example is just showing the usage of "VirtualWans_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualWanResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualWanResource.cs index d2b89b37728c3..6c78944c633dc 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualWanResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VirtualWanResource.cs @@ -21,7 +21,7 @@ public partial class Sample_VirtualWanResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task SupportedSecurityProviders_SupportedSecurityProviders() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualWanSupportedSecurityProviders.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualWanSupportedSecurityProviders.json // this example is just showing the usage of "SupportedSecurityProviders" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task SupportedSecurityProviders_SupportedSecurityProviders() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GenerateVirtualWanVpnServerConfigurationVpnProfile_GenerateVirtualWanVpnServerConfigurationVpnProfile() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/GenerateVirtualWanVpnServerConfigurationVpnProfile.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/GenerateVirtualWanVpnServerConfigurationVpnProfile.json // this example is just showing the usage of "Generatevirtualwanvpnserverconfigurationvpnprofile" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -81,7 +81,7 @@ public async Task GenerateVirtualWanVpnServerConfigurationVpnProfile_GenerateVir [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VirtualWANGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualWANGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualWANGet.json // this example is just showing the usage of "VirtualWans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -112,7 +112,7 @@ public async Task Get_VirtualWANGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_VirtualWANUpdate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualWANUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualWANUpdateTags.json // this example is just showing the usage of "VirtualWans_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -151,7 +151,7 @@ public async Task Update_VirtualWANUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_VirtualWANDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualWANDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualWANDelete.json // this example is just showing the usage of "VirtualWans_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -178,7 +178,7 @@ public async Task Delete_VirtualWANDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetVirtualWans_VirtualWANList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VirtualWANList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VirtualWANList.json // this example is just showing the usage of "VirtualWans_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -210,7 +210,7 @@ public async Task GetVirtualWans_VirtualWANList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task DownloadVpnSitesConfiguration_VpnSitesConfigurationDownload() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnSitesConfigurationDownload.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnSitesConfigurationDownload.json // this example is just showing the usage of "VpnSitesConfiguration_Download" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -244,7 +244,7 @@ public async Task DownloadVpnSitesConfiguration_VpnSitesConfigurationDownload() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetVpnServerConfigurationsAssociatedWithVirtualWan_GetVirtualWanVpnServerConfigurations() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/GetVirtualWanVpnServerConfigurations.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/GetVirtualWanVpnServerConfigurations.json // this example is just showing the usage of "VpnServerConfigurationsAssociatedWithVirtualWan_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnConnectionCollection.cs index 9baee25db7ecc..5683f993b6d98 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnConnectionCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_VpnConnectionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VpnConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnConnectionGet.json // this example is just showing the usage of "VpnConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task Get_VpnConnectionGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_VpnConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnConnectionGet.json // this example is just showing the usage of "VpnConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -87,7 +87,7 @@ public async Task Exists_VpnConnectionGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_VpnConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnConnectionGet.json // this example is just showing the usage of "VpnConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -130,7 +130,7 @@ public async Task GetIfExists_VpnConnectionGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_VpnConnectionPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnConnectionPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnConnectionPut.json // this example is just showing the usage of "VpnConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -212,7 +212,7 @@ public async Task CreateOrUpdate_VpnConnectionPut() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_VpnConnectionList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnConnectionList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnConnectionList.json // this example is just showing the usage of "VpnConnections_ListByVpnGateway" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnConnectionResource.cs index 771f0a48c99b2..42ba45c124b8c 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnConnectionResource.cs @@ -21,7 +21,7 @@ public partial class Sample_VpnConnectionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VpnConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnConnectionGet.json // this example is just showing the usage of "VpnConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Get_VpnConnectionGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_VpnConnectionPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnConnectionPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnConnectionPut.json // this example is just showing the usage of "VpnConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -132,7 +132,7 @@ public async Task Update_VpnConnectionPut() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_VpnConnectionDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnConnectionDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnConnectionDelete.json // this example is just showing the usage of "VpnConnections_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -160,7 +160,7 @@ public async Task Delete_VpnConnectionDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task StartPacketCapture_StartPacketCaptureOnVpnConnectionWithFilter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnConnectionStartPacketCaptureFilterData.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnConnectionStartPacketCaptureFilterData.json // this example is just showing the usage of "VpnConnections_StartPacketCapture" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -197,7 +197,7 @@ public async Task StartPacketCapture_StartPacketCaptureOnVpnConnectionWithFilter [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task StartPacketCapture_StartPacketCaptureOnVpnConnectionWithoutFilter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnConnectionStartPacketCapture.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnConnectionStartPacketCapture.json // this example is just showing the usage of "VpnConnections_StartPacketCapture" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -233,7 +233,7 @@ public async Task StartPacketCapture_StartPacketCaptureOnVpnConnectionWithoutFil [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task StopPacketCapture_StartPacketCaptureOnVpnConnectionWithoutFilter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnConnectionStopPacketCapture.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnConnectionStopPacketCapture.json // this example is just showing the usage of "VpnConnections_StopPacketCapture" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnGatewayCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnGatewayCollection.cs index 88a657247b54f..c84912ac903f9 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnGatewayCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnGatewayCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_VpnGatewayCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VpnGatewayGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnGatewayGet.json // this example is just showing the usage of "VpnGateways_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task Get_VpnGatewayGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_VpnGatewayGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnGatewayGet.json // this example is just showing the usage of "VpnGateways_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Exists_VpnGatewayGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_VpnGatewayGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnGatewayGet.json // this example is just showing the usage of "VpnGateways_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,7 +128,7 @@ public async Task GetIfExists_VpnGatewayGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_VpnGatewayPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnGatewayPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnGatewayPut.json // this example is just showing the usage of "VpnGateways_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -247,7 +247,7 @@ public async Task CreateOrUpdate_VpnGatewayPut() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_VpnGatewayListByResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnGatewayListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnGatewayListByResourceGroup.json // this example is just showing the usage of "VpnGateways_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnGatewayNatRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnGatewayNatRuleCollection.cs index e4c313e536673..7b3fb35dfa804 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnGatewayNatRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnGatewayNatRuleCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_VpnGatewayNatRuleCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_NatRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NatRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NatRuleGet.json // this example is just showing the usage of "NatRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_NatRuleGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_NatRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NatRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NatRuleGet.json // this example is just showing the usage of "NatRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Exists_NatRuleGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_NatRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NatRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NatRuleGet.json // this example is just showing the usage of "NatRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetIfExists_NatRuleGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_NatRulePut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NatRulePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NatRulePut.json // this example is just showing the usage of "NatRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -185,7 +185,7 @@ public async Task CreateOrUpdate_NatRulePut() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_NatRuleList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NatRuleList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NatRuleList.json // this example is just showing the usage of "NatRules_ListByVpnGateway" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnGatewayNatRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnGatewayNatRuleResource.cs index 28f5ea897adf3..f8e869b2c38e4 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnGatewayNatRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnGatewayNatRuleResource.cs @@ -20,7 +20,7 @@ public partial class Sample_VpnGatewayNatRuleResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_NatRuleGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NatRuleGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NatRuleGet.json // this example is just showing the usage of "NatRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_NatRuleGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_NatRulePut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NatRulePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NatRulePut.json // this example is just showing the usage of "NatRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -105,7 +105,7 @@ public async Task Update_NatRulePut() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_NatRuleDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/NatRuleDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/NatRuleDelete.json // this example is just showing the usage of "NatRules_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnGatewayResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnGatewayResource.cs index 0655113f72691..3668622b313b2 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnGatewayResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnGatewayResource.cs @@ -21,7 +21,7 @@ public partial class Sample_VpnGatewayResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VpnGatewayGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnGatewayGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnGatewayGet.json // this example is just showing the usage of "VpnGateways_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_VpnGatewayGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_VpnGatewayUpdate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnGatewayUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnGatewayUpdateTags.json // this example is just showing the usage of "VpnGateways_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Update_VpnGatewayUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_VpnGatewayDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnGatewayDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnGatewayDelete.json // this example is just showing the usage of "VpnGateways_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -119,7 +119,7 @@ public async Task Delete_VpnGatewayDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Reset_ResetVpnGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnGatewayReset.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnGatewayReset.json // this example is just showing the usage of "VpnGateways_Reset" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -151,7 +151,7 @@ public async Task Reset_ResetVpnGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task StartPacketCapture_StartPacketCaptureOnVpnGatewayWithFilter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnGatewayStartPacketCaptureFilterData.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnGatewayStartPacketCaptureFilterData.json // this example is just showing the usage of "VpnGateways_StartPacketCapture" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -183,7 +183,7 @@ public async Task StartPacketCapture_StartPacketCaptureOnVpnGatewayWithFilter() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task StartPacketCapture_StartPacketCaptureOnVpnGatewayWithoutFilter() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnGatewayStartPacketCapture.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnGatewayStartPacketCapture.json // this example is just showing the usage of "VpnGateways_StartPacketCapture" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -211,7 +211,7 @@ public async Task StartPacketCapture_StartPacketCaptureOnVpnGatewayWithoutFilter [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task StopPacketCapture_StopPacketCaptureOnVpnGateway() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnGatewayStopPacketCapture.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnGatewayStopPacketCapture.json // this example is just showing the usage of "VpnGateways_StopPacketCapture" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -243,7 +243,7 @@ public async Task StopPacketCapture_StopPacketCaptureOnVpnGateway() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetVpnGateways_VpnGatewayListBySubscription() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnGatewayList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnGatewayList.json // this example is just showing the usage of "VpnGateways_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnServerConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnServerConfigurationCollection.cs index 39a753b6e890f..33014f1365eba 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnServerConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnServerConfigurationCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_VpnServerConfigurationCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VpnServerConfigurationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnServerConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnServerConfigurationGet.json // this example is just showing the usage of "VpnServerConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_VpnServerConfigurationGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_VpnServerConfigurationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnServerConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnServerConfigurationGet.json // this example is just showing the usage of "VpnServerConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Exists_VpnServerConfigurationGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_VpnServerConfigurationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnServerConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnServerConfigurationGet.json // this example is just showing the usage of "VpnServerConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -127,7 +127,7 @@ public async Task GetIfExists_VpnServerConfigurationGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_VpnServerConfigurationCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnServerConfigurationPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnServerConfigurationPut.json // this example is just showing the usage of "VpnServerConfigurations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -252,7 +252,7 @@ public async Task CreateOrUpdate_VpnServerConfigurationCreate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_VpnServerConfigurationListByResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnServerConfigurationListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnServerConfigurationListByResourceGroup.json // this example is just showing the usage of "VpnServerConfigurations_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnServerConfigurationPolicyGroupCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnServerConfigurationPolicyGroupCollection.cs index b4603a7da3762..8a321da079434 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnServerConfigurationPolicyGroupCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnServerConfigurationPolicyGroupCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_VpnServerConfigurationPolicyGroupCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ConfigurationPolicyGroupPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ConfigurationPolicyGroupPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ConfigurationPolicyGroupPut.json // this example is just showing the usage of "ConfigurationPolicyGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -75,7 +75,7 @@ public async Task CreateOrUpdate_ConfigurationPolicyGroupPut() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ConfigurationPolicyGroupGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ConfigurationPolicyGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ConfigurationPolicyGroupGet.json // this example is just showing the usage of "ConfigurationPolicyGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -110,7 +110,7 @@ public async Task Get_ConfigurationPolicyGroupGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ConfigurationPolicyGroupGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ConfigurationPolicyGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ConfigurationPolicyGroupGet.json // this example is just showing the usage of "ConfigurationPolicyGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -141,7 +141,7 @@ public async Task Exists_ConfigurationPolicyGroupGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ConfigurationPolicyGroupGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ConfigurationPolicyGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ConfigurationPolicyGroupGet.json // this example is just showing the usage of "ConfigurationPolicyGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -184,7 +184,7 @@ public async Task GetIfExists_ConfigurationPolicyGroupGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ConfigurationPolicyGroupListByVpnServerConfiguration() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ConfigurationPolicyGroupListByVpnServerConfiguration.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ConfigurationPolicyGroupListByVpnServerConfiguration.json // this example is just showing the usage of "configurationPolicyGroups_ListByVpnServerConfiguration" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnServerConfigurationPolicyGroupResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnServerConfigurationPolicyGroupResource.cs index 0efcaac4caaca..92b851a75b60f 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnServerConfigurationPolicyGroupResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnServerConfigurationPolicyGroupResource.cs @@ -20,7 +20,7 @@ public partial class Sample_VpnServerConfigurationPolicyGroupResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ConfigurationPolicyGroupPut() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ConfigurationPolicyGroupPut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ConfigurationPolicyGroupPut.json // this example is just showing the usage of "ConfigurationPolicyGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -72,7 +72,7 @@ public async Task Update_ConfigurationPolicyGroupPut() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ConfigurationPolicyGroupDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ConfigurationPolicyGroupDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ConfigurationPolicyGroupDelete.json // this example is just showing the usage of "ConfigurationPolicyGroups_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -100,7 +100,7 @@ public async Task Delete_ConfigurationPolicyGroupDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ConfigurationPolicyGroupGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/ConfigurationPolicyGroupGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/ConfigurationPolicyGroupGet.json // this example is just showing the usage of "ConfigurationPolicyGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnServerConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnServerConfigurationResource.cs index d596cb2d1cb49..ccbc53898e3b8 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnServerConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnServerConfigurationResource.cs @@ -21,7 +21,7 @@ public partial class Sample_VpnServerConfigurationResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VpnServerConfigurationGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnServerConfigurationGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnServerConfigurationGet.json // this example is just showing the usage of "VpnServerConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_VpnServerConfigurationGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_VpnServerConfigurationUpdate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnServerConfigurationUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnServerConfigurationUpdateTags.json // this example is just showing the usage of "VpnServerConfigurations_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Update_VpnServerConfigurationUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_VpnServerConfigurationDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnServerConfigurationDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnServerConfigurationDelete.json // this example is just showing the usage of "VpnServerConfigurations_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task Delete_VpnServerConfigurationDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetVpnServerConfigurations_VpnServerConfigurationList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnServerConfigurationList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnServerConfigurationList.json // this example is just showing the usage of "VpnServerConfigurations_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnSiteCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnSiteCollection.cs index 949f0193ec0cd..a20b908b6c3b6 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnSiteCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnSiteCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_VpnSiteCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VpnSiteGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnSiteGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnSiteGet.json // this example is just showing the usage of "VpnSites_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_VpnSiteGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_VpnSiteGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnSiteGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnSiteGet.json // this example is just showing the usage of "VpnSites_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Exists_VpnSiteGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_VpnSiteGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnSiteGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnSiteGet.json // this example is just showing the usage of "VpnSites_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -127,7 +127,7 @@ public async Task GetIfExists_VpnSiteGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_VpnSiteCreate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnSitePut.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnSitePut.json // this example is just showing the usage of "VpnSites_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -201,7 +201,7 @@ public async Task CreateOrUpdate_VpnSiteCreate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_VpnSiteListByResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnSiteListByResourceGroup.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnSiteListByResourceGroup.json // this example is just showing the usage of "VpnSites_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnSiteLinkCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnSiteLinkCollection.cs index 38a70c437ea38..df66b6cb214c4 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnSiteLinkCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnSiteLinkCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_VpnSiteLinkCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VpnSiteGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnSiteLinkGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnSiteLinkGet.json // this example is just showing the usage of "VpnSiteLinks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_VpnSiteGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_VpnSiteGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnSiteLinkGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnSiteLinkGet.json // this example is just showing the usage of "VpnSiteLinks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Exists_VpnSiteGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_VpnSiteGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnSiteLinkGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnSiteLinkGet.json // this example is just showing the usage of "VpnSiteLinks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,7 +128,7 @@ public async Task GetIfExists_VpnSiteGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_VpnSiteLinkListByVpnSite() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnSiteLinkListByVpnSite.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnSiteLinkListByVpnSite.json // this example is just showing the usage of "VpnSiteLinks_ListByVpnSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnSiteLinkConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnSiteLinkConnectionCollection.cs index 1317eb32edbe5..c7336980d432a 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnSiteLinkConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnSiteLinkConnectionCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_VpnSiteLinkConnectionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_VpnSiteLinkConnectionList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnSiteLinkConnectionList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnSiteLinkConnectionList.json // this example is just showing the usage of "VpnLinkConnections_ListByVpnConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_VpnSiteLinkConnectionList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VpnSiteLinkConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnSiteLinkConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnSiteLinkConnectionGet.json // this example is just showing the usage of "VpnSiteLinkConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Get_VpnSiteLinkConnectionGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_VpnSiteLinkConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnSiteLinkConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnSiteLinkConnectionGet.json // this example is just showing the usage of "VpnSiteLinkConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -125,7 +125,7 @@ public async Task Exists_VpnSiteLinkConnectionGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_VpnSiteLinkConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnSiteLinkConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnSiteLinkConnectionGet.json // this example is just showing the usage of "VpnSiteLinkConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnSiteLinkConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnSiteLinkConnectionResource.cs index 12235c38a55da..76443d8a420ae 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnSiteLinkConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnSiteLinkConnectionResource.cs @@ -19,7 +19,7 @@ public partial class Sample_VpnSiteLinkConnectionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ResetConnectionVpnLinkConnection_ResetVpnLinkConnection() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnSiteLinkConnectionReset.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnSiteLinkConnectionReset.json // this example is just showing the usage of "VpnLinkConnections_ResetConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task ResetConnectionVpnLinkConnection_ResetVpnLinkConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIkeSasVpnLinkConnection_GetVpnLinkConnectionIkeSa() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnSiteLinkConnectionGetIkeSas.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnSiteLinkConnectionGetIkeSas.json // this example is just showing the usage of "VpnLinkConnections_GetIkeSas" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task GetIkeSasVpnLinkConnection_GetVpnLinkConnectionIkeSa() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VpnSiteLinkConnectionGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnSiteLinkConnectionGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnSiteLinkConnectionGet.json // this example is just showing the usage of "VpnSiteLinkConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnSiteLinkResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnSiteLinkResource.cs index 90dff80d3edda..0c1017abcff7e 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnSiteLinkResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnSiteLinkResource.cs @@ -19,7 +19,7 @@ public partial class Sample_VpnSiteLinkResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VpnSiteGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnSiteLinkGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnSiteLinkGet.json // this example is just showing the usage of "VpnSiteLinks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnSiteResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnSiteResource.cs index 6c6f9004f867f..c9e7a179c7d78 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnSiteResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_VpnSiteResource.cs @@ -21,7 +21,7 @@ public partial class Sample_VpnSiteResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_VpnSiteGet() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnSiteGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnSiteGet.json // this example is just showing the usage of "VpnSites_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_VpnSiteGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_VpnSiteUpdate() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnSiteUpdateTags.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnSiteUpdateTags.json // this example is just showing the usage of "VpnSites_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Update_VpnSiteUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_VpnSiteDelete() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnSiteDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnSiteDelete.json // this example is just showing the usage of "VpnSites_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task Delete_VpnSiteDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetVpnSites_VpnSiteList() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/VpnSiteList.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/VpnSiteList.json // this example is just showing the usage of "VpnSites_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_WebApplicationFirewallPolicyCollection.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_WebApplicationFirewallPolicyCollection.cs index 5ad0c4985eb66..d10462e30f8fe 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_WebApplicationFirewallPolicyCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_WebApplicationFirewallPolicyCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_WebApplicationFirewallPolicyCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListsAllWAFPoliciesInAResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/WafListPolicies.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/WafListPolicies.json // this example is just showing the usage of "WebApplicationFirewallPolicies_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ListsAllWAFPoliciesInAResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsAWAFPolicyWithinAResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/WafPolicyGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/WafPolicyGet.json // this example is just showing the usage of "WebApplicationFirewallPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_GetsAWAFPolicyWithinAResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetsAWAFPolicyWithinAResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/WafPolicyGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/WafPolicyGet.json // this example is just showing the usage of "WebApplicationFirewallPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -121,7 +121,7 @@ public async Task Exists_GetsAWAFPolicyWithinAResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetsAWAFPolicyWithinAResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/WafPolicyGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/WafPolicyGet.json // this example is just showing the usage of "WebApplicationFirewallPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +163,7 @@ public async Task GetIfExists_GetsAWAFPolicyWithinAResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreatesOrUpdatesAWAFPolicyWithinAResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/WafPolicyCreateOrUpdate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/WafPolicyCreateOrUpdate.json // this example is just showing the usage of "WebApplicationFirewallPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_WebApplicationFirewallPolicyResource.cs b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_WebApplicationFirewallPolicyResource.cs index 20a69f9a6044a..2c8e6acd304e2 100644 --- a/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_WebApplicationFirewallPolicyResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/samples/Generated/Samples/Sample_WebApplicationFirewallPolicyResource.cs @@ -21,7 +21,7 @@ public partial class Sample_WebApplicationFirewallPolicyResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetWebApplicationFirewallPolicies_ListsAllWAFPoliciesInASubscription() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/WafListAllPolicies.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/WafListAllPolicies.json // this example is just showing the usage of "WebApplicationFirewallPolicies_ListAll" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task GetWebApplicationFirewallPolicies_ListsAllWAFPoliciesInASubscr [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsAWAFPolicyWithinAResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/WafPolicyGet.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/WafPolicyGet.json // this example is just showing the usage of "WebApplicationFirewallPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Get_GetsAWAFPolicyWithinAResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreatesOrUpdatesAWAFPolicyWithinAResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/WafPolicyCreateOrUpdate.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/WafPolicyCreateOrUpdate.json // this example is just showing the usage of "WebApplicationFirewallPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -308,7 +308,7 @@ public async Task Update_CreatesOrUpdatesAWAFPolicyWithinAResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeletesAWAFPolicyWithinAResourceGroup() { - // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-11-01/examples/WafPolicyDelete.json + // Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2024-01-01/examples/WafPolicyDelete.json // this example is just showing the usage of "WebApplicationFirewallPolicies_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/network/Azure.ResourceManager.Network/src/Azure.ResourceManager.Network.csproj b/sdk/network/Azure.ResourceManager.Network/src/Azure.ResourceManager.Network.csproj index 22aefae3ce271..f58288915e159 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Azure.ResourceManager.Network.csproj +++ b/sdk/network/Azure.ResourceManager.Network/src/Azure.ResourceManager.Network.csproj @@ -1,6 +1,6 @@ - 1.9.0-beta.1 + 1.9.0 1.8.0 Azure.ResourceManager.Network diff --git a/sdk/network/Azure.ResourceManager.Network/src/Customization/ArmNetworkModelFactory.cs b/sdk/network/Azure.ResourceManager.Network/src/Customization/ArmNetworkModelFactory.cs index 7c59812238b1f..9607da059fc1b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Customization/ArmNetworkModelFactory.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Customization/ArmNetworkModelFactory.cs @@ -274,5 +274,44 @@ public static ApplicationGatewayListener ApplicationGatewayListener(ResourceIden /// A new instance for mocking. public static NetworkVirtualApplianceData NetworkVirtualApplianceData(ResourceIdentifier id, string name, ResourceType? resourceType, AzureLocation? location, IDictionary tags, ManagedServiceIdentity identity, ETag? etag, VirtualApplianceSkuProperties nvaSku, string addressPrefix, IEnumerable bootStrapConfigurationBlobs, ResourceIdentifier virtualHubId, IEnumerable cloudInitConfigurationBlobs, string cloudInitConfiguration, long? virtualApplianceAsn, string sshPublicKey, IEnumerable virtualApplianceNics, IEnumerable additionalNics, IEnumerable virtualApplianceSites, IEnumerable virtualApplianceConnections, IEnumerable inboundSecurityRules, NetworkProvisioningState? provisioningState, string deploymentType, VirtualApplianceDelegationProperties delegation, PartnerManagedResourceProperties partnerManagedResource) => NetworkVirtualApplianceData(id, name, resourceType, location, tags, identity, etag, nvaSku, addressPrefix, bootStrapConfigurationBlobs, virtualHubId, cloudInitConfigurationBlobs, cloudInitConfiguration, virtualApplianceAsn, sshPublicKey, virtualApplianceNics, additionalNics, null, virtualApplianceSites, virtualApplianceConnections, inboundSecurityRules, provisioningState, deploymentType, delegation, partnerManagedResource); + + /// Initializes a new instance of . + /// Resource ID. + /// Resource name. + /// Resource type. + /// A unique read-only string that changes whenever the resource is updated. + /// Rule Type. This should be either AutoExpire or Permanent. Auto Expire Rule only creates NSG rules. Permanent Rule creates NSG rule and SLB LB Rule. + /// List of allowed rules. + /// The provisioning state of the resource. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static InboundSecurityRule InboundSecurityRule(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, ETag? etag = null, InboundSecurityRuleType? ruleType = null, IEnumerable rules = null, NetworkProvisioningState? provisioningState = null) + { + rules ??= new List(); + + return new InboundSecurityRule( + id, + name, + resourceType, + serializedAdditionalRawData: null, + etag, + ruleType, + rules?.ToList(), + provisioningState); + } + + /// Initializes a new instance of . + /// Resource ID. + /// Resource name. + /// Resource type. + /// A unique read-only string that changes whenever the resource is updated. + /// List of allowed rules. + /// The provisioning state of the resource. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static InboundSecurityRule InboundSecurityRule(ResourceIdentifier id, string name, ResourceType? resourceType, ETag? etag, IEnumerable rules, NetworkProvisioningState? provisioningState) + { + return InboundSecurityRule(id: id, name: name, resourceType: resourceType, etag: etag, ruleType: default, rules: rules, provisioningState: provisioningState); + } } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Customization/AzureFirewallResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Customization/AzureFirewallResource.cs new file mode 100644 index 0000000000000..341d4839d744d --- /dev/null +++ b/sdk/network/Azure.ResourceManager.Network/src/Customization/AzureFirewallResource.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; +using Azure.ResourceManager.Network.Models; + +namespace Azure.ResourceManager.Network +{ + public partial class AzureFirewallResource + { + /// + /// Runs a packet capture on AzureFirewall. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}/packetCapture + /// + /// + /// Operation Id + /// AzureFirewalls_PacketCapture + /// + /// + /// Default Api Version + /// 2023-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Parameters supplied to run packet capture on azure firewall. + /// The cancellation token to use. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task PacketCaptureAsync(WaitUntil waitUntil, FirewallPacketCaptureContent content, CancellationToken cancellationToken = default) + { + return await PacketCaptureAsync(waitUntil, content.ToNewRequestContent(), cancellationToken).ConfigureAwait(false); + } + + /// + /// Runs a packet capture on AzureFirewall. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}/packetCapture + /// + /// + /// Operation Id + /// AzureFirewalls_PacketCapture + /// + /// + /// Default Api Version + /// 2023-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Parameters supplied to run packet capture on azure firewall. + /// The cancellation token to use. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ArmOperation PacketCapture(WaitUntil waitUntil, FirewallPacketCaptureContent content, CancellationToken cancellationToken = default) + { + return PacketCapture(waitUntil, content.ToNewRequestContent(), cancellationToken); + } + } +} diff --git a/sdk/network/Azure.ResourceManager.Network/src/Customization/Extensions/MockableNetworkSubscriptionResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Customization/Extensions/MockableNetworkSubscriptionResource.cs new file mode 100644 index 0000000000000..01d14e9c8cdc9 --- /dev/null +++ b/sdk/network/Azure.ResourceManager.Network/src/Customization/Extensions/MockableNetworkSubscriptionResource.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; +using System.Threading; + +namespace Azure.ResourceManager.Network.Mocking +{ + public partial class MockableNetworkSubscriptionResource : ArmResource + { + /// + /// Retrieves all the ExpressRouteCrossConnections in a subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteCrossConnections + /// + /// + /// Operation Id + /// ExpressRouteCrossConnections_List + /// + /// + /// Default Api Version + /// 2023-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual AsyncPageable GetExpressRouteCrossConnectionsAsync(CancellationToken cancellationToken = default) + => GetExpressRouteCrossConnectionsAsync(null, cancellationToken); + + /// + /// Retrieves all the ExpressRouteCrossConnections in a subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteCrossConnections + /// + /// + /// Operation Id + /// ExpressRouteCrossConnections_List + /// + /// + /// Default Api Version + /// 2023-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Pageable GetExpressRouteCrossConnections(CancellationToken cancellationToken = default) + => GetExpressRouteCrossConnections(null, cancellationToken); + } +} diff --git a/sdk/network/Azure.ResourceManager.Network/src/Customization/Extensions/NetworkExtensions.cs b/sdk/network/Azure.ResourceManager.Network/src/Customization/Extensions/NetworkExtensions.cs index 560afe0ccfd4d..fdd730fb4c7e4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Customization/Extensions/NetworkExtensions.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Customization/Extensions/NetworkExtensions.cs @@ -6,6 +6,7 @@ using System; using System.ComponentModel; using System.Threading; +using Azure.ResourceManager.Network.Mocking; using Azure.ResourceManager.Network.Models; using Azure.ResourceManager.Resources; @@ -58,5 +59,79 @@ public static Pageable GetApplicationGatewayA { return GetMockableNetworkSubscriptionResource(subscriptionResource).GetAppGatewayAvailableWafRuleSets(cancellationToken); } + + /// + /// Retrieves all the ExpressRouteCrossConnections in a subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteCrossConnections + /// + /// + /// Operation Id + /// ExpressRouteCrossConnections_List + /// + /// + /// Default Api Version + /// 2023-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public static Pageable GetExpressRouteCrossConnections(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableNetworkSubscriptionResource(subscriptionResource).GetExpressRouteCrossConnections(cancellationToken); + } + + /// + /// Retrieves all the ExpressRouteCrossConnections in a subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteCrossConnections + /// + /// + /// Operation Id + /// ExpressRouteCrossConnections_List + /// + /// + /// Default Api Version + /// 2023-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + [EditorBrowsable(EditorBrowsableState.Never)] + public static AsyncPageable GetExpressRouteCrossConnectionsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableNetworkSubscriptionResource(subscriptionResource).GetExpressRouteCrossConnectionsAsync(cancellationToken); + } } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPacketCaptureContent.cs b/sdk/network/Azure.ResourceManager.Network/src/Customization/Models/FirewallPacketCaptureContent.cs similarity index 86% rename from sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPacketCaptureContent.cs rename to sdk/network/Azure.ResourceManager.Network/src/Customization/Models/FirewallPacketCaptureContent.cs index 8b41f4175bc32..4ac41763004af 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPacketCaptureContent.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Customization/Models/FirewallPacketCaptureContent.cs @@ -1,17 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; using System.Collections.Generic; +using System.ComponentModel; using Azure.Core; namespace Azure.ResourceManager.Network.Models { /// Azure Firewall Packet Capture Parameters resource. + [EditorBrowsable(EditorBrowsableState.Never)] public partial class FirewallPacketCaptureContent : NetworkSubResource { /// Initializes a new instance of . @@ -56,5 +56,18 @@ internal FirewallPacketCaptureContent(ResourceIdentifier id, IDictionary Flags { get; } /// Rules to filter packet captures. public IList Filters { get; } + + internal FirewallPacketCaptureRequestContent ToNewRequestContent() + { + return new FirewallPacketCaptureRequestContent( + DurationInSeconds, + NumberOfPacketsToCapture, + SasUri, + FileName, + Protocol, + Flags, + Filters, + _serializedAdditionalRawData); + } } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Customization/Models/FirewallPacketCaptureContent.serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Customization/Models/FirewallPacketCaptureContent.serialization.cs new file mode 100644 index 0000000000000..4e5c333a9ac06 --- /dev/null +++ b/sdk/network/Azure.ResourceManager.Network/src/Customization/Models/FirewallPacketCaptureContent.serialization.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Network.Models +{ + public partial class FirewallPacketCaptureContent : IUtf8JsonSerializable, IJsonModel + { + /// + /// Dummy implementation. + /// + /// + /// + /// + /// + FirewallPacketCaptureContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + throw new NotImplementedException(); + } + + /// + /// Dummy implementation. + /// + /// + /// + /// + /// + FirewallPacketCaptureContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + throw new NotImplementedException(); + } + + /// + /// Dummy implementation. + /// + /// + /// + /// + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) + { + throw new NotImplementedException(); + } + + /// + /// Dummy implementation. + /// + /// + /// + /// + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + throw new NotImplementedException(); + } + + /// + /// Dummy implementation. + /// + /// + /// + /// + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + throw new NotImplementedException(); + } + } +} diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundSecurityRule.cs b/sdk/network/Azure.ResourceManager.Network/src/Customization/Models/InboundSecurityRule.cs similarity index 80% rename from sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundSecurityRule.cs rename to sdk/network/Azure.ResourceManager.Network/src/Customization/Models/InboundSecurityRule.cs index 535f213b602a2..5e28e13fdacf3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundSecurityRule.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Customization/Models/InboundSecurityRule.cs @@ -1,17 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; using System.Collections.Generic; +using System.ComponentModel; using Azure.Core; namespace Azure.ResourceManager.Network.Models { /// NVA Inbound Security Rule resource. + [EditorBrowsable(EditorBrowsableState.Never)] public partial class InboundSecurityRule : NetworkResourceData { /// Initializes a new instance of . @@ -45,5 +45,10 @@ internal InboundSecurityRule(ResourceIdentifier id, string name, ResourceType? r public IList Rules { get; } /// The provisioning state of the resource. public NetworkProvisioningState? ProvisioningState { get; } + + /// Implicitly converts an to an . + /// The to convert. + /// The converted . + public static implicit operator InboundSecurityRuleData(InboundSecurityRule r) => new InboundSecurityRuleData(r.Id, r.Name, r.ResourceType, new Dictionary(), r.ETag, r.RuleType, r.Rules, r.ProvisioningState); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundSecurityRule.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Customization/Models/InboundSecurityRule.serialization.cs similarity index 99% rename from sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundSecurityRule.Serialization.cs rename to sdk/network/Azure.ResourceManager.Network/src/Customization/Models/InboundSecurityRule.serialization.cs index 6f8bff8b0780f..b68b4bae3e264 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/InboundSecurityRule.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Customization/Models/InboundSecurityRule.serialization.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; diff --git a/sdk/network/Azure.ResourceManager.Network/src/Customization/NetworkVirtualApplianceResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Customization/NetworkVirtualApplianceResource.cs new file mode 100644 index 0000000000000..32f47d28b5091 --- /dev/null +++ b/sdk/network/Azure.ResourceManager.Network/src/Customization/NetworkVirtualApplianceResource.cs @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Network.Models; + +namespace Azure.ResourceManager.Network +{ + public partial class NetworkVirtualApplianceResource : ArmResource + { + private ClientDiagnostics _inboundSecurityRuleClientDiagnostics; + private InboundSecurityRuleRestOperations _inboundSecurityRuleRestClient; + + private ClientDiagnostics InboundSecurityRuleClientDiagnostics + { + get => _inboundSecurityRuleClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Network", ProviderConstants.DefaultProviderNamespace, Diagnostics); + } + private InboundSecurityRuleRestOperations InboundSecurityRuleRestClient + { + get => _inboundSecurityRuleRestClient ??= new InboundSecurityRuleRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + } + + /// + /// Restarts one or more VMs belonging to the specified Network Virtual Appliance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/restart + /// + /// + /// Operation Id + /// NetworkVirtualAppliances_Restart + /// + /// + /// Default Api Version + /// 2023-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Specifies a list of virtual machine instance IDs from the Network Virtual Appliance VM instances. + /// The cancellation token to use. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual Response Restart(NetworkVirtualApplianceInstanceIds networkVirtualApplianceInstanceIds = null, CancellationToken cancellationToken = default) + => Restart(WaitUntil.Completed, networkVirtualApplianceInstanceIds, cancellationToken).GetRawResponse(); + + /// + /// Restarts one or more VMs belonging to the specified Network Virtual Appliance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/restart + /// + /// + /// Operation Id + /// NetworkVirtualAppliances_Restart + /// + /// + /// Default Api Version + /// 2023-11-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Specifies a list of virtual machine instance IDs from the Network Virtual Appliance VM instances. + /// The cancellation token to use. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task RestartAsync(NetworkVirtualApplianceInstanceIds networkVirtualApplianceInstanceIds = null, CancellationToken cancellationToken = default) + => (await RestartAsync(WaitUntil.Completed, networkVirtualApplianceInstanceIds, cancellationToken).ConfigureAwait(false)).GetRawResponse(); + + /// + /// Creates or updates the specified Network Virtual Appliance Inbound Security Rules. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName} + /// + /// + /// Operation Id + /// InboundSecurityRule_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2023-11-01 + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of security rule collection. + /// Parameters supplied to the create or update Network Virtual Appliance Inbound Security Rules operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> CreateOrUpdateInboundSecurityRuleAsync(WaitUntil waitUntil, string ruleCollectionName, InboundSecurityRule inboundSecurityRule, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(ruleCollectionName, nameof(ruleCollectionName)); + Argument.AssertNotNull(inboundSecurityRule, nameof(inboundSecurityRule)); + + using var scope = InboundSecurityRuleClientDiagnostics.CreateScope("NetworkVirtualApplianceResource.CreateOrUpdateInboundSecurityRule"); + scope.Start(); + try + { + var response = await InboundSecurityRuleRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleCollectionName, inboundSecurityRule, cancellationToken).ConfigureAwait(false); + var operation = new NetworkArmOperation(new ObsoleteInboundSecurityRuleOperationSource(), InboundSecurityRuleClientDiagnostics, Pipeline, InboundSecurityRuleRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleCollectionName, inboundSecurityRule).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates the specified Network Virtual Appliance Inbound Security Rules. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName} + /// + /// + /// Operation Id + /// InboundSecurityRule_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2023-11-01 + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of security rule collection. + /// Parameters supplied to the create or update Network Virtual Appliance Inbound Security Rules operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ArmOperation CreateOrUpdateInboundSecurityRule(WaitUntil waitUntil, string ruleCollectionName, InboundSecurityRule inboundSecurityRule, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(ruleCollectionName, nameof(ruleCollectionName)); + Argument.AssertNotNull(inboundSecurityRule, nameof(inboundSecurityRule)); + + using var scope = InboundSecurityRuleClientDiagnostics.CreateScope("NetworkVirtualApplianceResource.CreateOrUpdateInboundSecurityRule"); + scope.Start(); + try + { + var response = InboundSecurityRuleRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleCollectionName, inboundSecurityRule, cancellationToken); + var operation = new NetworkArmOperation(new ObsoleteInboundSecurityRuleOperationSource(), InboundSecurityRuleClientDiagnostics, Pipeline, InboundSecurityRuleRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleCollectionName, inboundSecurityRule).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// This is a copy of old InboundSecurityRuleOperationSource class. + /// + private class ObsoleteInboundSecurityRuleOperationSource : IOperationSource + { + InboundSecurityRule IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return InboundSecurityRule.DeserializeInboundSecurityRule(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return InboundSecurityRule.DeserializeInboundSecurityRule(document.RootElement); + } + } + } +} diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/AdminRuleGroupCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/AdminRuleGroupCollection.cs index 66d5e3191d686..f791f4a19c638 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/AdminRuleGroupCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/AdminRuleGroupCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(string rule /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string ruleCollectionName, C /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsync(int? top = null /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(int? top = null, string s /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string ruleCollectionName, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string ruleCollectionName, CancellationToke /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/AdminRuleGroupResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/AdminRuleGroupResource.cs index 78180e097a1b2..989f00cba0c31 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/AdminRuleGroupResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/AdminRuleGroupResource.cs @@ -109,7 +109,7 @@ public virtual BaseAdminRuleCollection GetBaseAdminRules() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetBaseAdminRuleAsync /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -171,7 +171,7 @@ public virtual Response GetBaseAdminRule(string ruleName, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -251,7 +251,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? f /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -337,7 +337,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? force = null, Canc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -385,7 +385,7 @@ public virtual async Task> UpdateAsync(Wait /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayCollection.cs index f2380ff6a63e1..83c57549232b1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string applicationGatewa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string applicationGatewayN /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string applicationGatewayName, Cancellation /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayPrivateEndpointConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayPrivateEndpointConnectionCollection.cs index 85cb91390b6d9..f9b160a614187 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayPrivateEndpointConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayPrivateEndpointConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable Get /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string connectionName, Can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string connectionName, CancellationToken ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayPrivateEndpointConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayPrivateEndpointConnectionResource.cs index 33b090adf89c4..a8a3734917db5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayPrivateEndpointConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayPrivateEndpointConnectionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayResource.cs index 1cdba4beaffee..b4b7d96e43d63 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayResource.cs @@ -115,7 +115,7 @@ public virtual ApplicationGatewayPrivateEndpointConnectionCollection GetApplicat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -146,7 +146,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -177,7 +177,7 @@ public virtual Response Get /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -217,7 +217,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -299,7 +299,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -341,7 +341,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -383,7 +383,7 @@ public virtual async Task> UpdateAsync(Netw /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -425,7 +425,7 @@ public virtual Response Update(NetworkTagsObject net /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -467,7 +467,7 @@ public virtual async Task StartAsync(WaitUntil waitUntil, Cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -509,7 +509,7 @@ public virtual ArmOperation Start(WaitUntil waitUntil, CancellationToken cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -551,7 +551,7 @@ public virtual async Task StopAsync(WaitUntil waitUntil, Cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -593,7 +593,7 @@ public virtual ArmOperation Stop(WaitUntil waitUntil, CancellationToken cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -636,7 +636,7 @@ public virtual async Task> Backend /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -679,7 +679,7 @@ public virtual ArmOperation BackendHealth(WaitU /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -726,7 +726,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -773,7 +773,7 @@ public virtual ArmOperation BackendHeal /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -799,7 +799,7 @@ public virtual AsyncPageable GetApplicati /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -825,7 +825,7 @@ public virtual Pageable GetApplicationGat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -887,7 +887,7 @@ public virtual async Task> AddTagAsync(stri /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -949,7 +949,7 @@ public virtual Response AddTag(string key, string va /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1006,7 +1006,7 @@ public virtual async Task> SetTagsAsync(IDi /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1063,7 +1063,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1123,7 +1123,7 @@ public virtual async Task> RemoveTagAsync(s /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayWafDynamicManifestCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayWafDynamicManifestCollection.cs index f2bf802b57965..6e0e1592b6538 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayWafDynamicManifestCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayWafDynamicManifestCollection.cs @@ -73,7 +73,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -153,7 +153,7 @@ public virtual Response Get(Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual AsyncPageable GetAl /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual Pageable GetAll(Can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -251,7 +251,7 @@ public virtual async Task> ExistsAsync(CancellationToken cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -289,7 +289,7 @@ public virtual Response Exists(CancellationToken cancellationToken = defau /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -329,7 +329,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayWafDynamicManifestResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayWafDynamicManifestResource.cs index 44603fade8eac..400eac97772a2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayWafDynamicManifestResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayWafDynamicManifestResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationSecurityGroupCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationSecurityGroupCollection.cs index 03f4bb300f0ec..61299454606bd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationSecurityGroupCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationSecurityGroupCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> Create /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(Wai /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(s /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string application /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationTok /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string applicationSecurity /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string applicationSecurityGroupName, Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationSecurityGroupResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationSecurityGroupResource.cs index 623d5b044974c..0054c0d7308de 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationSecurityGroupResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationSecurityGroupResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -309,7 +309,7 @@ public virtual async Task> UpdateAsyn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual Response Update(NetworkTagsObje /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -413,7 +413,7 @@ public virtual async Task> AddTagAsyn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -475,7 +475,7 @@ public virtual Response AddTag(string key, str /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -532,7 +532,7 @@ public virtual async Task> SetTagsAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -589,7 +589,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -649,7 +649,7 @@ public virtual async Task> RemoveTagA /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ArmNetworkModelFactory.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ArmNetworkModelFactory.cs index 10162371d2583..9bfa28ce2fb5c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ArmNetworkModelFactory.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ArmNetworkModelFactory.cs @@ -1017,6 +1017,7 @@ public static NetworkPrivateEndpointConnectionData NetworkPrivateEndpointConnect /// Resource location. /// Resource tags. /// A unique read-only string that changes whenever the resource is updated. + /// FlowLog resource Managed Identity. /// ID of network security group to which flow log will be applied. /// Guid of network security group to which flow log will be applied. /// ID of the storage account which is used to store the flow log. @@ -1026,7 +1027,7 @@ public static NetworkPrivateEndpointConnectionData NetworkPrivateEndpointConnect /// Parameters that define the configuration of traffic analytics. /// The provisioning state of the flow log. /// A new instance for mocking. - public static FlowLogData FlowLogData(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, AzureLocation? location = null, IDictionary tags = null, ETag? etag = null, ResourceIdentifier targetResourceId = null, Guid? targetResourceGuid = null, ResourceIdentifier storageId = null, bool? enabled = null, RetentionPolicyParameters retentionPolicy = null, FlowLogProperties format = null, TrafficAnalyticsConfigurationProperties trafficAnalyticsConfiguration = null, NetworkProvisioningState? provisioningState = null) + public static FlowLogData FlowLogData(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, AzureLocation? location = null, IDictionary tags = null, ETag? etag = null, ManagedServiceIdentity identity = null, ResourceIdentifier targetResourceId = null, Guid? targetResourceGuid = null, ResourceIdentifier storageId = null, bool? enabled = null, RetentionPolicyParameters retentionPolicy = null, FlowLogProperties format = null, TrafficAnalyticsConfigurationProperties trafficAnalyticsConfiguration = null, NetworkProvisioningState? provisioningState = null) { tags ??= new Dictionary(); @@ -1038,6 +1039,7 @@ public static FlowLogData FlowLogData(ResourceIdentifier id = null, string name tags, serializedAdditionalRawData: null, etag, + identity, targetResourceId, targetResourceGuid, storageId, @@ -1110,14 +1112,15 @@ public static RouteData RouteData(ResourceIdentifier id = null, string name = nu /// Initializes a new instance of . /// The type of the endpoint service. + /// SubResource as network identifier. /// A list of locations. /// The provisioning state of the service endpoint resource. /// A new instance for mocking. - public static ServiceEndpointProperties ServiceEndpointProperties(string service = null, IEnumerable locations = null, NetworkProvisioningState? provisioningState = null) + public static ServiceEndpointProperties ServiceEndpointProperties(string service = null, ResourceIdentifier networkIdentifierId = null, IEnumerable locations = null, NetworkProvisioningState? provisioningState = null) { locations ??= new List(); - return new ServiceEndpointProperties(service, locations?.ToList(), provisioningState, serializedAdditionalRawData: null); + return new ServiceEndpointProperties(service, networkIdentifierId != null ? ResourceManagerModelFactory.WritableSubResource(networkIdentifierId) : null, locations?.ToList(), provisioningState, serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -2518,8 +2521,9 @@ public static AzureWebCategoryData AzureWebCategoryData(ResourceIdentifier id = /// Enable/Disable Shareable Link of the Bastion Host resource. /// Enable/Disable Tunneling feature of the Bastion Host resource. /// Enable/Disable Kerberos feature of the Bastion Host resource. + /// Enable/Disable Session Recording feature of the Bastion Host resource. /// A new instance for mocking. - public static BastionHostData BastionHostData(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, AzureLocation? location = null, IDictionary tags = null, IEnumerable zones = null, ETag? etag = null, BastionHostSkuName? skuName = null, IEnumerable ipConfigurations = null, string dnsName = null, ResourceIdentifier virtualNetworkId = null, IEnumerable networkAclsIPRules = null, NetworkProvisioningState? provisioningState = null, int? scaleUnits = null, bool? disableCopyPaste = null, bool? enableFileCopy = null, bool? enableIPConnect = null, bool? enableShareableLink = null, bool? enableTunneling = null, bool? enableKerberos = null) + public static BastionHostData BastionHostData(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, AzureLocation? location = null, IDictionary tags = null, IEnumerable zones = null, ETag? etag = null, BastionHostSkuName? skuName = null, IEnumerable ipConfigurations = null, string dnsName = null, ResourceIdentifier virtualNetworkId = null, IEnumerable networkAclsIPRules = null, NetworkProvisioningState? provisioningState = null, int? scaleUnits = null, bool? disableCopyPaste = null, bool? enableFileCopy = null, bool? enableIPConnect = null, bool? enableShareableLink = null, bool? enableTunneling = null, bool? enableKerberos = null, bool? enableSessionRecording = null) { tags ??= new Dictionary(); zones ??= new List(); @@ -2547,7 +2551,8 @@ public static BastionHostData BastionHostData(ResourceIdentifier id = null, stri enableIPConnect, enableShareableLink, enableTunneling, - enableKerberos); + enableKerberos, + enableSessionRecording); } /// Initializes a new instance of . @@ -2787,9 +2792,10 @@ public static EndpointServiceResult EndpointServiceResult(string name = null, Re /// A unique read-only string that changes whenever the resource is updated. /// The authorization key. /// The authorization use status. + /// The reference to the ExpressRoute connection resource using the authorization. /// The provisioning state of the authorization resource. /// A new instance for mocking. - public static ExpressRouteCircuitAuthorizationData ExpressRouteCircuitAuthorizationData(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, ETag? etag = null, string authorizationKey = null, AuthorizationUseStatus? authorizationUseStatus = null, NetworkProvisioningState? provisioningState = null) + public static ExpressRouteCircuitAuthorizationData ExpressRouteCircuitAuthorizationData(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, ETag? etag = null, string authorizationKey = null, AuthorizationUseStatus? authorizationUseStatus = null, Uri connectionResourceUri = null, NetworkProvisioningState? provisioningState = null) { return new ExpressRouteCircuitAuthorizationData( id, @@ -2799,6 +2805,7 @@ public static ExpressRouteCircuitAuthorizationData ExpressRouteCircuitAuthorizat etag, authorizationKey, authorizationUseStatus, + connectionResourceUri, provisioningState); } @@ -3809,12 +3816,13 @@ public static LoadBalancingRuleData LoadBalancingRuleData(ResourceIdentifier id /// The protocol of the end point. If 'Tcp' is specified, a received ACK is required for the probe to be successful. If 'Http' or 'Https' is specified, a 200 OK response from the specifies URI is required for the probe to be successful. /// The port for communicating the probe. Possible values range from 1 to 65535, inclusive. /// The interval, in seconds, for how frequently to probe the endpoint for health status. Typically, the interval is slightly less than half the allocated timeout period (in seconds) which allows two full probes before taking the instance out of rotation. The default value is 15, the minimum value is 5. + /// Determines how new connections are handled by the load balancer when all backend instances are probed down. /// The number of probes where if no response, will result in stopping further traffic from being delivered to the endpoint. This values allows endpoints to be taken out of rotation faster or slower than the typical times used in Azure. /// The number of consecutive successful or failed probes in order to allow or deny traffic from being delivered to this endpoint. After failing the number of consecutive probes equal to this value, the endpoint will be taken out of rotation and require the same number of successful consecutive probes to be placed back in rotation. /// The URI used for requesting health status from the VM. Path is required if a protocol is set to http. Otherwise, it is not allowed. There is no default value. /// The provisioning state of the probe resource. /// A new instance for mocking. - public static ProbeData ProbeData(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, ETag? etag = null, IEnumerable loadBalancingRules = null, ProbeProtocol? protocol = null, int? port = null, int? intervalInSeconds = null, int? numberOfProbes = null, int? probeThreshold = null, string requestPath = null, NetworkProvisioningState? provisioningState = null) + public static ProbeData ProbeData(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, ETag? etag = null, IEnumerable loadBalancingRules = null, ProbeProtocol? protocol = null, int? port = null, int? intervalInSeconds = null, ProbeNoHealthyBackendsBehavior? noHealthyBackendsBehavior = null, int? numberOfProbes = null, int? probeThreshold = null, string requestPath = null, NetworkProvisioningState? provisioningState = null) { loadBalancingRules ??= new List(); @@ -3828,6 +3836,7 @@ public static ProbeData ProbeData(ResourceIdentifier id = null, string name = nu protocol, port, intervalInSeconds, + noHealthyBackendsBehavior, numberOfProbes, probeThreshold, requestPath, @@ -4748,7 +4757,7 @@ public static NetworkVirtualApplianceSkuInstances NetworkVirtualApplianceSkuInst return new NetworkVirtualApplianceSkuInstances(scaleUnit, instanceCount, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Resource ID. /// Resource name. /// Resource type. @@ -4756,12 +4765,12 @@ public static NetworkVirtualApplianceSkuInstances NetworkVirtualApplianceSkuInst /// Rule Type. This should be either AutoExpire or Permanent. Auto Expire Rule only creates NSG rules. Permanent Rule creates NSG rule and SLB LB Rule. /// List of allowed rules. /// The provisioning state of the resource. - /// A new instance for mocking. - public static InboundSecurityRule InboundSecurityRule(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, ETag? etag = null, InboundSecurityRuleType? ruleType = null, IEnumerable rules = null, NetworkProvisioningState? provisioningState = null) + /// A new instance for mocking. + public static InboundSecurityRuleData InboundSecurityRuleData(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, ETag? etag = null, InboundSecurityRuleType? ruleType = null, IEnumerable rules = null, NetworkProvisioningState? provisioningState = null) { rules ??= new List(); - return new InboundSecurityRule( + return new InboundSecurityRuleData( id, name, resourceType, @@ -6035,6 +6044,7 @@ public static VirtualNetworkUsageName VirtualNetworkUsageName(string localizedVa /// Resource tags. /// The extended location of type local virtual network gateway. /// A unique read-only string that changes whenever the resource is updated. + /// The identity of the virtual network gateway, if configured. /// Autoscale configuration for virutal network gateway. /// IP configurations for virtual network gateway. /// The type of this virtual network gateway. @@ -6061,7 +6071,7 @@ public static VirtualNetworkUsageName VirtualNetworkUsageName(string localizedVa /// Configure this gateway to accept traffic from other Azure Virtual Networks. This configuration does not support connectivity to Azure Virtual WAN. /// Property to indicate if the Express Route Gateway serves traffic when there are multiple Express Route Gateways in the vnet. /// A new instance for mocking. - public static VirtualNetworkGatewayData VirtualNetworkGatewayData(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, AzureLocation? location = null, IDictionary tags = null, ExtendedLocation extendedLocation = null, ETag? etag = null, VirtualNetworkGatewayAutoScaleBounds autoScaleBounds = null, IEnumerable ipConfigurations = null, VirtualNetworkGatewayType? gatewayType = null, VpnType? vpnType = null, VpnGatewayGeneration? vpnGatewayGeneration = null, bool? enableBgp = null, bool? enablePrivateIPAddress = null, bool? active = null, bool? disableIPSecReplayProtection = null, ResourceIdentifier gatewayDefaultSiteId = null, VirtualNetworkGatewaySku sku = null, VpnClientConfiguration vpnClientConfiguration = null, IEnumerable virtualNetworkGatewayPolicyGroups = null, BgpSettings bgpSettings = null, IEnumerable customRoutesAddressPrefixes = null, Guid? resourceGuid = null, NetworkProvisioningState? provisioningState = null, bool? enableDnsForwarding = null, string inboundDnsForwardingEndpoint = null, ResourceIdentifier vNetExtendedLocationResourceId = null, IEnumerable natRules = null, bool? enableBgpRouteTranslationForNat = null, bool? allowVirtualWanTraffic = null, bool? allowRemoteVnetTraffic = null, ExpressRouteGatewayAdminState? adminState = null) + public static VirtualNetworkGatewayData VirtualNetworkGatewayData(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, AzureLocation? location = null, IDictionary tags = null, ExtendedLocation extendedLocation = null, ETag? etag = null, ManagedServiceIdentity identity = null, VirtualNetworkGatewayAutoScaleBounds autoScaleBounds = null, IEnumerable ipConfigurations = null, VirtualNetworkGatewayType? gatewayType = null, VpnType? vpnType = null, VpnGatewayGeneration? vpnGatewayGeneration = null, bool? enableBgp = null, bool? enablePrivateIPAddress = null, bool? active = null, bool? disableIPSecReplayProtection = null, ResourceIdentifier gatewayDefaultSiteId = null, VirtualNetworkGatewaySku sku = null, VpnClientConfiguration vpnClientConfiguration = null, IEnumerable virtualNetworkGatewayPolicyGroups = null, BgpSettings bgpSettings = null, IEnumerable customRoutesAddressPrefixes = null, Guid? resourceGuid = null, NetworkProvisioningState? provisioningState = null, bool? enableDnsForwarding = null, string inboundDnsForwardingEndpoint = null, ResourceIdentifier vNetExtendedLocationResourceId = null, IEnumerable natRules = null, bool? enableBgpRouteTranslationForNat = null, bool? allowVirtualWanTraffic = null, bool? allowRemoteVnetTraffic = null, ExpressRouteGatewayAdminState? adminState = null) { tags ??= new Dictionary(); ipConfigurations ??= new List(); @@ -6078,6 +6088,7 @@ public static VirtualNetworkGatewayData VirtualNetworkGatewayData(ResourceIdenti serializedAdditionalRawData: null, extendedLocation, etag, + identity, autoScaleBounds != null ? new VirtualNetworkGatewayAutoScaleConfiguration(autoScaleBounds, serializedAdditionalRawData: null) : null, ipConfigurations?.ToList(), gatewayType, @@ -8023,6 +8034,142 @@ public static NetworkDefaultAdminRule NetworkDefaultAdminRule(ResourceIdentifier resourceGuid); } + /// Initializes a new instance of . + /// Resource ID. + /// Resource name. + /// Resource type. + /// Resource location. + /// Resource tags. + /// A unique read-only string that changes whenever the resource is updated. + /// ID of network security group to which flow log will be applied. + /// Guid of network security group to which flow log will be applied. + /// ID of the storage account which is used to store the flow log. + /// Flag to enable/disable flow logging. + /// Parameters that define the retention policy for flow log. + /// Parameters that define the flow log format. + /// Parameters that define the configuration of traffic analytics. + /// The provisioning state of the flow log. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static FlowLogData FlowLogData(ResourceIdentifier id, string name, ResourceType? resourceType, AzureLocation? location, IDictionary tags, ETag? etag, ResourceIdentifier targetResourceId, Guid? targetResourceGuid, ResourceIdentifier storageId, bool? enabled, RetentionPolicyParameters retentionPolicy, FlowLogProperties format, TrafficAnalyticsConfigurationProperties trafficAnalyticsConfiguration, NetworkProvisioningState? provisioningState) + { + return FlowLogData(id: id, name: name, resourceType: resourceType, location: location, tags: tags, etag: etag, identity: default, targetResourceId: targetResourceId, targetResourceGuid: targetResourceGuid, storageId: storageId, enabled: enabled, retentionPolicy: retentionPolicy, format: format, trafficAnalyticsConfiguration: trafficAnalyticsConfiguration, provisioningState: provisioningState); + } + + /// Initializes a new instance of . + /// The type of the endpoint service. + /// A list of locations. + /// The provisioning state of the service endpoint resource. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ServiceEndpointProperties ServiceEndpointProperties(string service, IEnumerable locations, NetworkProvisioningState? provisioningState) + { + return ServiceEndpointProperties(service: service, networkIdentifierId: default, locations: locations, provisioningState: provisioningState); + } + + /// Initializes a new instance of . + /// Resource ID. + /// Resource name. + /// Resource type. + /// Resource location. + /// Resource tags. + /// A list of availability zones denoting where the resource needs to come from. + /// A unique read-only string that changes whenever the resource is updated. + /// The sku of this Bastion Host. + /// IP configuration of the Bastion Host resource. + /// FQDN for the endpoint on which bastion host is accessible. + /// Reference to an existing virtual network required for Developer Bastion Host only. + /// + /// The provisioning state of the bastion host resource. + /// The scale units for the Bastion Host resource. + /// Enable/Disable Copy/Paste feature of the Bastion Host resource. + /// Enable/Disable File Copy feature of the Bastion Host resource. + /// Enable/Disable IP Connect feature of the Bastion Host resource. + /// Enable/Disable Shareable Link of the Bastion Host resource. + /// Enable/Disable Tunneling feature of the Bastion Host resource. + /// Enable/Disable Kerberos feature of the Bastion Host resource. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static BastionHostData BastionHostData(ResourceIdentifier id, string name, ResourceType? resourceType, AzureLocation? location, IDictionary tags, IEnumerable zones, ETag? etag, BastionHostSkuName? skuName, IEnumerable ipConfigurations, string dnsName, ResourceIdentifier virtualNetworkId, IEnumerable networkAclsIPRules, NetworkProvisioningState? provisioningState, int? scaleUnits, bool? disableCopyPaste, bool? enableFileCopy, bool? enableIPConnect, bool? enableShareableLink, bool? enableTunneling, bool? enableKerberos) + { + return BastionHostData(id: id, name: name, resourceType: resourceType, location: location, tags: tags, zones: zones, etag: etag, skuName: skuName, ipConfigurations: ipConfigurations, dnsName: dnsName, virtualNetworkId: virtualNetworkId, networkAclsIPRules: networkAclsIPRules, provisioningState: provisioningState, scaleUnits: scaleUnits, disableCopyPaste: disableCopyPaste, enableFileCopy: enableFileCopy, enableIPConnect: enableIPConnect, enableShareableLink: enableShareableLink, enableTunneling: enableTunneling, enableKerberos: enableKerberos, enableSessionRecording: default); + } + + /// Initializes a new instance of . + /// Resource ID. + /// Resource name. + /// Resource type. + /// A unique read-only string that changes whenever the resource is updated. + /// The authorization key. + /// The authorization use status. + /// The provisioning state of the authorization resource. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ExpressRouteCircuitAuthorizationData ExpressRouteCircuitAuthorizationData(ResourceIdentifier id, string name, ResourceType? resourceType, ETag? etag, string authorizationKey, AuthorizationUseStatus? authorizationUseStatus, NetworkProvisioningState? provisioningState) + { + return ExpressRouteCircuitAuthorizationData(id: id, name: name, resourceType: resourceType, etag: etag, authorizationKey: authorizationKey, authorizationUseStatus: authorizationUseStatus, connectionResourceUri: default, provisioningState: provisioningState); + } + + /// Initializes a new instance of . + /// Resource ID. + /// Resource name. + /// Resource type. + /// A unique read-only string that changes whenever the resource is updated. + /// The load balancer rules that use this probe. + /// The protocol of the end point. If 'Tcp' is specified, a received ACK is required for the probe to be successful. If 'Http' or 'Https' is specified, a 200 OK response from the specifies URI is required for the probe to be successful. + /// The port for communicating the probe. Possible values range from 1 to 65535, inclusive. + /// The interval, in seconds, for how frequently to probe the endpoint for health status. Typically, the interval is slightly less than half the allocated timeout period (in seconds) which allows two full probes before taking the instance out of rotation. The default value is 15, the minimum value is 5. + /// The number of probes where if no response, will result in stopping further traffic from being delivered to the endpoint. This values allows endpoints to be taken out of rotation faster or slower than the typical times used in Azure. + /// The number of consecutive successful or failed probes in order to allow or deny traffic from being delivered to this endpoint. After failing the number of consecutive probes equal to this value, the endpoint will be taken out of rotation and require the same number of successful consecutive probes to be placed back in rotation. + /// The URI used for requesting health status from the VM. Path is required if a protocol is set to http. Otherwise, it is not allowed. There is no default value. + /// The provisioning state of the probe resource. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ProbeData ProbeData(ResourceIdentifier id, string name, ResourceType? resourceType, ETag? etag, IEnumerable loadBalancingRules, ProbeProtocol? protocol, int? port, int? intervalInSeconds, int? numberOfProbes, int? probeThreshold, string requestPath, NetworkProvisioningState? provisioningState) + { + return ProbeData(id: id, name: name, resourceType: resourceType, etag: etag, loadBalancingRules: loadBalancingRules, protocol: protocol, port: port, intervalInSeconds: intervalInSeconds, noHealthyBackendsBehavior: default, numberOfProbes: numberOfProbes, probeThreshold: probeThreshold, requestPath: requestPath, provisioningState: provisioningState); + } + + /// Initializes a new instance of . + /// Resource ID. + /// Resource name. + /// Resource type. + /// Resource location. + /// Resource tags. + /// The extended location of type local virtual network gateway. + /// A unique read-only string that changes whenever the resource is updated. + /// Autoscale configuration for virutal network gateway. + /// IP configurations for virtual network gateway. + /// The type of this virtual network gateway. + /// The type of this virtual network gateway. + /// The generation for this VirtualNetworkGateway. Must be None if gatewayType is not VPN. + /// Whether BGP is enabled for this virtual network gateway or not. + /// Whether private IP needs to be enabled on this gateway for connections or not. + /// ActiveActive flag. + /// disableIPSecReplayProtection flag. + /// The reference to the LocalNetworkGateway resource which represents local network site having default routes. Assign Null value in case of removing existing default site setting. + /// The reference to the VirtualNetworkGatewaySku resource which represents the SKU selected for Virtual network gateway. + /// The reference to the VpnClientConfiguration resource which represents the P2S VpnClient configurations. + /// The reference to the VirtualNetworkGatewayPolicyGroup resource which represents the available VirtualNetworkGatewayPolicyGroup for the gateway. + /// Virtual network gateway's BGP speaker settings. + /// The reference to the address space resource which represents the custom routes address space specified by the customer for virtual network gateway and VpnClient. + /// The resource GUID property of the virtual network gateway resource. + /// The provisioning state of the virtual network gateway resource. + /// Whether dns forwarding is enabled or not. + /// The IP address allocated by the gateway to which dns requests can be sent. + /// Customer vnet resource id. VirtualNetworkGateway of type local gateway is associated with the customer vnet. + /// NatRules for virtual network gateway. + /// EnableBgpRouteTranslationForNat flag. + /// Configures this gateway to accept traffic from remote Virtual WAN networks. + /// Configure this gateway to accept traffic from other Azure Virtual Networks. This configuration does not support connectivity to Azure Virtual WAN. + /// Property to indicate if the Express Route Gateway serves traffic when there are multiple Express Route Gateways in the vnet. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static VirtualNetworkGatewayData VirtualNetworkGatewayData(ResourceIdentifier id, string name, ResourceType? resourceType, AzureLocation? location, IDictionary tags, ExtendedLocation extendedLocation, ETag? etag, VirtualNetworkGatewayAutoScaleBounds autoScaleBounds, IEnumerable ipConfigurations, VirtualNetworkGatewayType? gatewayType, VpnType? vpnType, VpnGatewayGeneration? vpnGatewayGeneration, bool? enableBgp, bool? enablePrivateIPAddress, bool? active, bool? disableIPSecReplayProtection, ResourceIdentifier gatewayDefaultSiteId, VirtualNetworkGatewaySku sku, VpnClientConfiguration vpnClientConfiguration, IEnumerable virtualNetworkGatewayPolicyGroups, BgpSettings bgpSettings, IEnumerable customRoutesAddressPrefixes, Guid? resourceGuid, NetworkProvisioningState? provisioningState, bool? enableDnsForwarding, string inboundDnsForwardingEndpoint, ResourceIdentifier vNetExtendedLocationResourceId, IEnumerable natRules, bool? enableBgpRouteTranslationForNat, bool? allowVirtualWanTraffic, bool? allowRemoteVnetTraffic, ExpressRouteGatewayAdminState? adminState) + { + return VirtualNetworkGatewayData(id: id, name: name, resourceType: resourceType, location: location, tags: tags, extendedLocation: extendedLocation, etag: etag, identity: default, autoScaleBounds: autoScaleBounds, ipConfigurations: ipConfigurations, gatewayType: gatewayType, vpnType: vpnType, vpnGatewayGeneration: vpnGatewayGeneration, enableBgp: enableBgp, enablePrivateIPAddress: enablePrivateIPAddress, active: active, disableIPSecReplayProtection: disableIPSecReplayProtection, gatewayDefaultSiteId: gatewayDefaultSiteId, sku: sku, vpnClientConfiguration: vpnClientConfiguration, virtualNetworkGatewayPolicyGroups: virtualNetworkGatewayPolicyGroups, bgpSettings: bgpSettings, customRoutesAddressPrefixes: customRoutesAddressPrefixes, resourceGuid: resourceGuid, provisioningState: provisioningState, enableDnsForwarding: enableDnsForwarding, inboundDnsForwardingEndpoint: inboundDnsForwardingEndpoint, vNetExtendedLocationResourceId: vNetExtendedLocationResourceId, natRules: natRules, enableBgpRouteTranslationForNat: enableBgpRouteTranslationForNat, allowVirtualWanTraffic: allowVirtualWanTraffic, allowRemoteVnetTraffic: allowRemoteVnetTraffic, adminState: adminState); + } + /// Initializes a new instance of . /// Resource ID. /// Resource name. @@ -8157,20 +8304,6 @@ public static VirtualApplianceNicProperties VirtualApplianceNicProperties(string return VirtualApplianceNicProperties(nicType: default, name: name, publicIPAddress: publicIPAddress, privateIPAddress: privateIPAddress, instanceName: instanceName); } - /// Initializes a new instance of . - /// Resource ID. - /// Resource name. - /// Resource type. - /// A unique read-only string that changes whenever the resource is updated. - /// List of allowed rules. - /// The provisioning state of the resource. - /// A new instance for mocking. - [EditorBrowsable(EditorBrowsableState.Never)] - public static InboundSecurityRule InboundSecurityRule(ResourceIdentifier id, string name, ResourceType? resourceType, ETag? etag, IEnumerable rules, NetworkProvisioningState? provisioningState) - { - return InboundSecurityRule(id: id, name: name, resourceType: resourceType, etag: etag, ruleType: default, rules: rules, provisioningState: provisioningState); - } - /// Initializes a new instance of . /// The ID of the targeted resource, only AzureVM and AzureVMSS as target type are currently supported. /// A list of AzureVMSS instances which can be included or excluded to run packet capture. If both included and excluded are empty, then the packet capture will run on all instances of AzureVMSS. diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallCollection.cs index a211f5e41da7f..df66b22fd8165 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string azure /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string azureFirewallName, Can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToke /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string azureFirewallName, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string azureFirewallName, CancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallResource.cs index d036470d389c2..bd52e71dcb82f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsync(WaitU /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, N /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -401,7 +401,7 @@ public virtual async Task> GetLearnedP /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual ArmOperation GetLearnedPrefixes(Wait /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual ArmOperation GetLearnedPrefixes(Wait /// Parameters supplied to run packet capture on azure firewall. /// The cancellation token to use. /// is null. - public virtual async Task PacketCaptureAsync(WaitUntil waitUntil, FirewallPacketCaptureContent content, CancellationToken cancellationToken = default) + public virtual async Task PacketCaptureAsync(WaitUntil waitUntil, FirewallPacketCaptureRequestContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); @@ -489,7 +489,7 @@ public virtual async Task PacketCaptureAsync(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -501,7 +501,7 @@ public virtual async Task PacketCaptureAsync(WaitUntil waitUntil, /// Parameters supplied to run packet capture on azure firewall. /// The cancellation token to use. /// is null. - public virtual ArmOperation PacketCapture(WaitUntil waitUntil, FirewallPacketCaptureContent content, CancellationToken cancellationToken = default) + public virtual ArmOperation PacketCapture(WaitUntil waitUntil, FirewallPacketCaptureRequestContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); @@ -535,7 +535,7 @@ public virtual ArmOperation PacketCapture(WaitUntil waitUntil, FirewallPacketCap /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -597,7 +597,7 @@ public virtual async Task> AddTagAsync(string ke /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -659,7 +659,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -716,7 +716,7 @@ public virtual async Task> SetTagsAsync(IDiction /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -773,7 +773,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -833,7 +833,7 @@ public virtual async Task> RemoveTagAsync(string /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureWebCategoryCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureWebCategoryCollection.cs index 895938793abb1..9a26dece53f15 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureWebCategoryCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureWebCategoryCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -111,7 +111,7 @@ public virtual async Task> GetAsync(string na /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -157,7 +157,7 @@ public virtual Response Get(string name, string expand /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -187,7 +187,7 @@ public virtual AsyncPageable GetAllAsync(CancellationT /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -217,7 +217,7 @@ public virtual Pageable GetAll(CancellationToken cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -261,7 +261,7 @@ public virtual async Task> ExistsAsync(string name, string expand /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -305,7 +305,7 @@ public virtual Response Exists(string name, string expand = null, Cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureWebCategoryResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureWebCategoryResource.cs index a64f12e45eb0b..2b39009ce9132 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureWebCategoryResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureWebCategoryResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(string ex /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/BackendAddressPoolCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/BackendAddressPoolCollection.cs index 3c9d92919b3b1..dd15ca50996ea 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/BackendAddressPoolCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/BackendAddressPoolCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string backendAddressPoo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string backendAddressPoolN /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string backendAddressPoolName, Cancellation /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/BackendAddressPoolResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/BackendAddressPoolResource.cs index 6f631d46478bb..dbd6ecc574cfc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/BackendAddressPoolResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/BackendAddressPoolResource.cs @@ -107,7 +107,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -147,7 +147,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -187,7 +187,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task> UpdateAsync( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual ArmOperation Update(WaitUntil waitUnt /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -409,7 +409,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/BaseAdminRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/BaseAdminRuleCollection.cs index c87ec9a818ec6..59a5a76a49071 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/BaseAdminRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/BaseAdminRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(string ruleN /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string ruleName, Cancellation /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsync(int? top = null, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(int? top = null, string sk /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string ruleName, Cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string ruleName, CancellationToken cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/BaseAdminRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/BaseAdminRuleResource.cs index f2a6b5e1957b4..0530f6b88e530 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/BaseAdminRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/BaseAdminRuleResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? f /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? force = null, Canc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task> UpdateAsync(WaitU /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostCollection.cs index 0dace62e52aa6..18a93c9e7befc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string bastion /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string bastionHostName, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancellati /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string bastionHostName, Ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string bastionHostName, CancellationToken c /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsAsyn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostData.Serialization.cs index 3d025264e6c69..c30d1541ff49c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostData.Serialization.cs @@ -146,6 +146,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WritePropertyName("enableKerberos"u8); writer.WriteBooleanValue(EnableKerberos.Value); } + if (Optional.IsDefined(EnableSessionRecording)) + { + writer.WritePropertyName("enableSessionRecording"u8); + writer.WriteBooleanValue(EnableSessionRecording.Value); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -205,6 +210,7 @@ internal static BastionHostData DeserializeBastionHostData(JsonElement element, bool? enableShareableLink = default; bool? enableTunneling = default; bool? enableKerberos = default; + bool? enableSessionRecording = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -405,6 +411,15 @@ internal static BastionHostData DeserializeBastionHostData(JsonElement element, enableKerberos = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("enableSessionRecording"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableSessionRecording = property0.Value.GetBoolean(); + continue; + } } continue; } @@ -435,7 +450,8 @@ internal static BastionHostData DeserializeBastionHostData(JsonElement element, enableIPConnect, enableShareableLink, enableTunneling, - enableKerberos); + enableKerberos, + enableSessionRecording); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostData.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostData.cs index f84d2e61c554b..3f979536e1720 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostData.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostData.cs @@ -48,7 +48,8 @@ public BastionHostData() /// Enable/Disable Shareable Link of the Bastion Host resource. /// Enable/Disable Tunneling feature of the Bastion Host resource. /// Enable/Disable Kerberos feature of the Bastion Host resource. - internal BastionHostData(ResourceIdentifier id, string name, ResourceType? resourceType, AzureLocation? location, IDictionary tags, IDictionary serializedAdditionalRawData, IList zones, ETag? etag, NetworkSku sku, IList ipConfigurations, string dnsName, WritableSubResource virtualNetwork, BastionHostPropertiesFormatNetworkAcls networkAcls, NetworkProvisioningState? provisioningState, int? scaleUnits, bool? disableCopyPaste, bool? enableFileCopy, bool? enableIPConnect, bool? enableShareableLink, bool? enableTunneling, bool? enableKerberos) : base(id, name, resourceType, location, tags, serializedAdditionalRawData) + /// Enable/Disable Session Recording feature of the Bastion Host resource. + internal BastionHostData(ResourceIdentifier id, string name, ResourceType? resourceType, AzureLocation? location, IDictionary tags, IDictionary serializedAdditionalRawData, IList zones, ETag? etag, NetworkSku sku, IList ipConfigurations, string dnsName, WritableSubResource virtualNetwork, BastionHostPropertiesFormatNetworkAcls networkAcls, NetworkProvisioningState? provisioningState, int? scaleUnits, bool? disableCopyPaste, bool? enableFileCopy, bool? enableIPConnect, bool? enableShareableLink, bool? enableTunneling, bool? enableKerberos, bool? enableSessionRecording) : base(id, name, resourceType, location, tags, serializedAdditionalRawData) { Zones = zones; ETag = etag; @@ -65,6 +66,7 @@ internal BastionHostData(ResourceIdentifier id, string name, ResourceType? resou EnableShareableLink = enableShareableLink; EnableTunneling = enableTunneling; EnableKerberos = enableKerberos; + EnableSessionRecording = enableSessionRecording; } /// A list of availability zones denoting where the resource needs to come from. @@ -73,7 +75,7 @@ internal BastionHostData(ResourceIdentifier id, string name, ResourceType? resou public ETag? ETag { get; } /// The sku of this Bastion Host. internal NetworkSku Sku { get; set; } - /// The name of this Bastion Host. + /// The name of the sku of this Bastion Host. public BastionHostSkuName? SkuName { get => Sku is null ? default : Sku.Name; @@ -132,5 +134,7 @@ public IList NetworkAclsIPRules public bool? EnableTunneling { get; set; } /// Enable/Disable Kerberos feature of the Bastion Host resource. public bool? EnableKerberos { get; set; } + /// Enable/Disable Session Recording feature of the Bastion Host resource. + public bool? EnableSessionRecording { get; set; } } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostResource.cs index 09fd52fa93567..39a549271b49c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostResource.cs @@ -108,7 +108,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -148,7 +148,7 @@ public virtual async Task> GetAsync(CancellationTo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -188,7 +188,7 @@ public virtual Response Get(CancellationToken cancellationT /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -230,7 +230,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task> UpdateAsync(WaitUnt /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Net /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual async Task DeleteBastionShareableLinkByTokenAsync(W /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -456,7 +456,7 @@ public virtual ArmOperation DeleteBastionShareableLinkByToken(WaitUntil waitUnti /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -518,7 +518,7 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -580,7 +580,7 @@ public virtual Response AddTag(string key, string value, Ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -637,7 +637,7 @@ public virtual async Task> SetTagsAsync(IDictionar /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -694,7 +694,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -754,7 +754,7 @@ public virtual async Task> RemoveTagAsync(string k /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/BgpConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/BgpConnectionCollection.cs index c77422ed86016..1be3670632c00 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/BgpConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/BgpConnectionCollection.cs @@ -69,7 +69,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -118,7 +118,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(string conne /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string connectionName, Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToke /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll(CancellationToken cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string connectionName, Can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string connectionName, CancellationToken ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/BgpConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/BgpConnectionResource.cs index 4d089b9309997..76cbfd3c942e0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/BgpConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/BgpConnectionResource.cs @@ -108,7 +108,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -148,7 +148,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -188,7 +188,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -230,7 +230,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task> UpdateAsync(WaitU /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, B /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual async Task>>> G /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -448,7 +448,7 @@ public virtual ArmOperation>> GetVirtualHub /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -490,7 +490,7 @@ public virtual async Task>>> G /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/CloudServiceSwapCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/CloudServiceSwapCollection.cs index 6e25f7cd5f3e7..fd105d25b0a9e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/CloudServiceSwapCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/CloudServiceSwapCollection.cs @@ -70,7 +70,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task CreateOrUpdateAsync(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, CloudServiceSwap /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -202,7 +202,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -242,7 +242,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual AsyncPageable GetAllAsync(CancellationT /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Pageable GetAll(CancellationToken cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -338,7 +338,7 @@ public virtual async Task> ExistsAsync(CancellationToken cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -376,7 +376,7 @@ public virtual Response Exists(CancellationToken cancellationToken = defau /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -416,7 +416,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/CloudServiceSwapResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/CloudServiceSwapResource.cs index fd672a7213543..9eeffe602596e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/CloudServiceSwapResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/CloudServiceSwapResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task UpdateAsync(WaitUntil waitUntil, CloudSe /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectionMonitorCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectionMonitorCollection.cs index ac13ce4cfdf25..f15c29fc38e65 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectionMonitorCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectionMonitorCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetAsync(string c /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string connectionMonitorN /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -284,7 +284,7 @@ public virtual AsyncPageable GetAllAsync(Cancellation /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken canc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string connectionMonitorNa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string connectionMonitorName, CancellationT /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectionMonitorResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectionMonitorResource.cs index 1d591ae242815..bcaab3b692304 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectionMonitorResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectionMonitorResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -309,7 +309,7 @@ public virtual async Task> UpdateAsync(Netwo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual Response Update(NetworkTagsObject netw /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -393,7 +393,7 @@ public virtual async Task StopAsync(WaitUntil waitUntil, Cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -435,7 +435,7 @@ public virtual ArmOperation Stop(WaitUntil waitUntil, CancellationToken cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -477,7 +477,7 @@ public virtual async Task StartAsync(WaitUntil waitUntil, Cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -519,7 +519,7 @@ public virtual ArmOperation Start(WaitUntil waitUntil, CancellationToken cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -561,7 +561,7 @@ public virtual async Task> QueryAsync /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -603,7 +603,7 @@ public virtual ArmOperation Query(WaitUntil waitUn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -665,7 +665,7 @@ public virtual async Task> AddTagAsync(strin /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -727,7 +727,7 @@ public virtual Response AddTag(string key, string val /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -784,7 +784,7 @@ public virtual async Task> SetTagsAsync(IDic /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -841,7 +841,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -901,7 +901,7 @@ public virtual async Task> RemoveTagAsync(st /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectivityConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectivityConfigurationCollection.cs index 128c815d7868b..c1dd57b14067b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectivityConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectivityConfigurationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> Creat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string configurat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsync(int? /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(int? top = nul /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string configurationName, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string configurationName, CancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectivityConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectivityConfigurationResource.cs index d86ee44eb8a70..41b98df25b999 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectivityConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectivityConfigurationResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? f /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? force = null, Canc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> Updat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/CustomIPPrefixCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/CustomIPPrefixCollection.cs index 6c76de4f6c5d0..e4296895f1aac 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/CustomIPPrefixCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/CustomIPPrefixCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string cust /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string customIPPrefixName, s /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string customIPPrefixName, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string customIPPrefixName, string expand = /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/CustomIPPrefixResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/CustomIPPrefixResource.cs index 101e01ab2cc41..4e56a3cff1562 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/CustomIPPrefixResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/CustomIPPrefixResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(string expa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -185,7 +185,7 @@ public virtual Response Get(string expand = null, Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(NetworkT /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -353,7 +353,7 @@ public virtual Response Update(NetworkTagsObject network /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -415,7 +415,7 @@ public virtual async Task> AddTagAsync(string k /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -477,7 +477,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -534,7 +534,7 @@ public virtual async Task> SetTagsAsync(IDictio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -591,7 +591,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -651,7 +651,7 @@ public virtual async Task> RemoveTagAsync(strin /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosCustomPolicyCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosCustomPolicyCollection.cs index 5b514f1c46852..8876e66528526 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosCustomPolicyCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosCustomPolicyCollection.cs @@ -62,7 +62,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -111,7 +111,7 @@ public virtual async Task> CreateOrUpdate /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -160,7 +160,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -205,7 +205,7 @@ public virtual async Task> GetAsync(string dd /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response Get(string ddosCustomPolicyNam /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -293,7 +293,7 @@ public virtual async Task> ExistsAsync(string ddosCustomPolicyNam /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -336,7 +336,7 @@ public virtual Response Exists(string ddosCustomPolicyName, CancellationTo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -381,7 +381,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosCustomPolicyResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosCustomPolicyResource.cs index aaa79b68a3ed6..964d3bca9df92 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosCustomPolicyResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosCustomPolicyResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -309,7 +309,7 @@ public virtual async Task> UpdateAsync(Networ /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual Response Update(NetworkTagsObject netwo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -413,7 +413,7 @@ public virtual async Task> AddTagAsync(string /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -475,7 +475,7 @@ public virtual Response AddTag(string key, string valu /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -532,7 +532,7 @@ public virtual async Task> SetTagsAsync(IDict /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -589,7 +589,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -649,7 +649,7 @@ public virtual async Task> RemoveTagAsync(str /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosProtectionPlanCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosProtectionPlanCollection.cs index 0a02da6caaca8..7d21c28493d35 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosProtectionPlanCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosProtectionPlanCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string ddosProtectionPla /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string ddosProtectionPlanN /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string ddosProtectionPlanName, Cancellation /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosProtectionPlanResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosProtectionPlanResource.cs index 8bd7d33b65bcd..9ed63e65a2f5a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosProtectionPlanResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosProtectionPlanResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -309,7 +309,7 @@ public virtual async Task> UpdateAsync(Netw /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual Response Update(NetworkTagsObject net /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -413,7 +413,7 @@ public virtual async Task> AddTagAsync(stri /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -475,7 +475,7 @@ public virtual Response AddTag(string key, string va /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -532,7 +532,7 @@ public virtual async Task> SetTagsAsync(IDi /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -589,7 +589,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -649,7 +649,7 @@ public virtual async Task> RemoveTagAsync(s /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/DefaultSecurityRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/DefaultSecurityRuleCollection.cs index f46c0ddbde809..a72bf475edc86 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/DefaultSecurityRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/DefaultSecurityRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string defaultSecurityR /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string defaultSecurityRule /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string defaultSecurityRuleName, Cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/DefaultSecurityRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/DefaultSecurityRuleResource.cs index 2137d0594505a..5e5bdc867980c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/DefaultSecurityRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/DefaultSecurityRuleResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/DscpConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/DscpConfigurationCollection.cs index f78f4ef716016..93f4169dea5be 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/DscpConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/DscpConfigurationCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string d /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string dscpConfigurationN /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancellation /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken canc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string dscpConfigurationNa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string dscpConfigurationName, CancellationT /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/DscpConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/DscpConfigurationResource.cs index acd92785ee458..98d76920b72ce 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/DscpConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/DscpConfigurationResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAsync(W /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual ArmOperation Update(WaitUntil waitUnti /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -415,7 +415,7 @@ public virtual async Task> AddTagAsync(strin /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -472,7 +472,7 @@ public virtual Response AddTag(string key, string val /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -528,7 +528,7 @@ public virtual async Task> SetTagsAsync(IDic /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -584,7 +584,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -639,7 +639,7 @@ public virtual async Task> RemoveTagAsync(st /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationCollection.cs index de1e816565cea..d0f57cabb8d58 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string aut /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string authorizationName, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string authorizationName, CancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationData.Serialization.cs index dd2e3c6ea97bb..ba1c5847268ca 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationData.Serialization.cs @@ -59,6 +59,11 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WritePropertyName("authorizationUseStatus"u8); writer.WriteStringValue(AuthorizationUseStatus.Value.ToString()); } + if (options.Format != "W" && Optional.IsDefined(ConnectionResourceUri)) + { + writer.WritePropertyName("connectionResourceUri"u8); + writer.WriteStringValue(ConnectionResourceUri.AbsoluteUri); + } if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -109,6 +114,7 @@ internal static ExpressRouteCircuitAuthorizationData DeserializeExpressRouteCirc ResourceType? type = default; string authorizationKey = default; AuthorizationUseStatus? authorizationUseStatus = default; + Uri connectionResourceUri = default; NetworkProvisioningState? provisioningState = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -169,6 +175,15 @@ internal static ExpressRouteCircuitAuthorizationData DeserializeExpressRouteCirc authorizationUseStatus = new AuthorizationUseStatus(property0.Value.GetString()); continue; } + if (property0.NameEquals("connectionResourceUri"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectionResourceUri = new Uri(property0.Value.GetString()); + continue; + } if (property0.NameEquals("provisioningState"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -195,6 +210,7 @@ internal static ExpressRouteCircuitAuthorizationData DeserializeExpressRouteCirc etag, authorizationKey, authorizationUseStatus, + connectionResourceUri, provisioningState); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationData.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationData.cs index 7f52fa9a60419..987e4f5892b11 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationData.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationData.cs @@ -31,12 +31,14 @@ public ExpressRouteCircuitAuthorizationData() /// A unique read-only string that changes whenever the resource is updated. /// The authorization key. /// The authorization use status. + /// The reference to the ExpressRoute connection resource using the authorization. /// The provisioning state of the authorization resource. - internal ExpressRouteCircuitAuthorizationData(ResourceIdentifier id, string name, ResourceType? resourceType, IDictionary serializedAdditionalRawData, ETag? etag, string authorizationKey, AuthorizationUseStatus? authorizationUseStatus, NetworkProvisioningState? provisioningState) : base(id, name, resourceType, serializedAdditionalRawData) + internal ExpressRouteCircuitAuthorizationData(ResourceIdentifier id, string name, ResourceType? resourceType, IDictionary serializedAdditionalRawData, ETag? etag, string authorizationKey, AuthorizationUseStatus? authorizationUseStatus, Uri connectionResourceUri, NetworkProvisioningState? provisioningState) : base(id, name, resourceType, serializedAdditionalRawData) { ETag = etag; AuthorizationKey = authorizationKey; AuthorizationUseStatus = authorizationUseStatus; + ConnectionResourceUri = connectionResourceUri; ProvisioningState = provisioningState; } @@ -46,6 +48,8 @@ internal ExpressRouteCircuitAuthorizationData(ResourceIdentifier id, string name public string AuthorizationKey { get; set; } /// The authorization use status. public AuthorizationUseStatus? AuthorizationUseStatus { get; set; } + /// The reference to the ExpressRoute connection resource using the authorization. + public Uri ConnectionResourceUri { get; } /// The provisioning state of the authorization resource. public NetworkProvisioningState? ProvisioningState { get; } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationResource.cs index 905335236c496..b3d4218e35c5e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cancellati /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitCollection.cs index 98a050c45e760..c518f28177eab 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string circuitName, Can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string circuitName, Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string circuitName, CancellationToken cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitConnectionCollection.cs index 650350effbdd6..335fc707bb7fc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> C /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string connec /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancellati /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string connectionName, Can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string connectionName, CancellationToken ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitConnectionResource.cs index 7f97f70cda166..699a74be595b4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitConnectionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationT /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> U /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitPeeringCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitPeeringCollection.cs index 8c94e8ee4d0be..42f0a8581a968 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitPeeringCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitPeeringCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string peeringNa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationT /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string peeringName, Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string peeringName, CancellationToken cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitPeeringResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitPeeringResource.cs index 57586cbf7a696..41ae815ee90af 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitPeeringResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitPeeringResource.cs @@ -114,7 +114,7 @@ public virtual ExpressRouteCircuitConnectionCollection GetExpressRouteCircuitCon /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -145,7 +145,7 @@ public virtual async Task> GetEx /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual PeerExpressRouteCircuitConnectionCollection GetPeerExpressRouteCi /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -245,7 +245,7 @@ public virtual Response GetPeerExpres /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -325,7 +325,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -409,7 +409,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> Upda /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -501,7 +501,7 @@ public virtual ArmOperation Update(WaitUntil /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -548,7 +548,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -595,7 +595,7 @@ public virtual ArmOperation GetArpTableE /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -642,7 +642,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -689,7 +689,7 @@ public virtual ArmOperation GetRoutes /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -736,7 +736,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -783,7 +783,7 @@ public virtual ArmOperation Ge /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -821,7 +821,7 @@ public virtual async Task> GetPeeringStatsExp /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitResource.cs index f33b377c856b8..8c2c006e15eac 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitResource.cs @@ -110,7 +110,7 @@ public virtual ExpressRouteCircuitAuthorizationCollection GetExpressRouteCircuit /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -179,7 +179,7 @@ public virtual ExpressRouteCircuitPeeringCollection GetExpressRouteCircuitPeerin /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetExpre /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response GetExpressRouteCircu /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -281,7 +281,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -405,7 +405,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> UpdateAsync(Net /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -489,7 +489,7 @@ public virtual Response Update(NetworkTagsObject ne /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -527,7 +527,7 @@ public virtual async Task> GetStatsAsync(Canc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -565,7 +565,7 @@ public virtual Response GetStats(CancellationToken can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -627,7 +627,7 @@ public virtual async Task> AddTagAsync(str /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -689,7 +689,7 @@ public virtual Response AddTag(string key, string v /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -746,7 +746,7 @@ public virtual async Task> SetTagsAsync(ID /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -803,7 +803,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -863,7 +863,7 @@ public virtual async Task> RemoveTagAsync( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteConnectionCollection.cs index a0dc4c8322591..5361d8cb57e47 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOr /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitU /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string connectionNam /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -281,7 +281,7 @@ public virtual AsyncPageable GetAllAsync(Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -310,7 +310,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -353,7 +353,7 @@ public virtual async Task> ExistsAsync(string connectionName, Can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual Response Exists(string connectionName, CancellationToken ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -441,7 +441,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteConnectionResource.cs index 96489a7c08014..ed78fed37f316 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteConnectionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionCollection.cs index f8612707dff73..7a67289bb0f81 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> Cre /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string crossCon /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(Cancellation /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string crossConnectionName /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string crossConnectionName, CancellationTok /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionPeeringCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionPeeringCollection.cs index e16a18c857bb5..9ab3541cc1320 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionPeeringCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionPeeringCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOr /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string p /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllA /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string peeringName, Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string peeringName, CancellationToken cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionPeeringResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionPeeringResource.cs index d84421dbb07d3..e7ccab5e42f4c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionPeeringResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionPeeringResource.cs @@ -107,7 +107,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -147,7 +147,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -187,7 +187,7 @@ public virtual Response Get(Cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual ArmOperation Update(W /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -457,7 +457,7 @@ public virtual ArmOperation GetArpTableE /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -504,7 +504,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -551,7 +551,7 @@ public virtual ArmOperation /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -598,7 +598,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionResource.cs index 8d09b0bf11383..b800f2e8746e5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionResource.cs @@ -110,7 +110,7 @@ public virtual ExpressRouteCrossConnectionPeeringCollection GetExpressRouteCross /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response GetExpressRo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(CancellationTok /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task> UpdateA /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -336,7 +336,7 @@ public virtual Response Update(NetworkTagsO /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual async Task> AddTagA /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -460,7 +460,7 @@ public virtual Response AddTag(string key, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -517,7 +517,7 @@ public virtual async Task> SetTags /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -574,7 +574,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -634,7 +634,7 @@ public virtual async Task> RemoveT /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteGatewayCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteGatewayCollection.cs index e212be712b08a..294cfbf975bb8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteGatewayCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteGatewayCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string expressRouteGate /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -354,7 +354,7 @@ public virtual async Task> ExistsAsync(string expressRouteGateway /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -397,7 +397,7 @@ public virtual Response Exists(string expressRouteGatewayName, Cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -442,7 +442,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteGatewayResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteGatewayResource.cs index c2a62ab502678..434da9abd2dfb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteGatewayResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteGatewayResource.cs @@ -110,7 +110,7 @@ public virtual ExpressRouteConnectionCollection GetExpressRouteConnections() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetExpressRo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response GetExpressRouteConnectio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -336,7 +336,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -382,7 +382,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -428,7 +428,7 @@ public virtual ArmOperation Update(WaitUntil waitUn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -490,7 +490,7 @@ public virtual async Task> AddTagAsync(str /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -552,7 +552,7 @@ public virtual Response AddTag(string key, string v /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -609,7 +609,7 @@ public virtual async Task> SetTagsAsync(ID /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -666,7 +666,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -726,7 +726,7 @@ public virtual async Task> RemoveTagAsync( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteLinkCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteLinkCollection.cs index e26f8463b82a2..0eb351fd92e3f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteLinkCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteLinkCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string li /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string linkName, Cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(CancellationT /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string linkName, Cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string linkName, CancellationToken cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteLinkResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteLinkResource.cs index ec121e08f6e11..e91b7f4136f73 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteLinkResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteLinkResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortAuthorizationCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortAuthorizationCollection.cs index 3c6ad80fa0142..f95ffd287df52 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortAuthorizationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortAuthorizationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> C /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string author /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancellati /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string authorizationName, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string authorizationName, CancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortAuthorizationResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortAuthorizationResource.cs index 8b25a8717fce0..6a8b5edd9cbf4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortAuthorizationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortAuthorizationResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationT /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> U /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortCollection.cs index 1809d14b52adf..9978d4129a1ae 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdate /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string ex /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string expressRoutePortNam /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationT /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string expressRoutePortNam /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string expressRoutePortName, CancellationTo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortResource.cs index 824b96eaef3ff..6233fdc4df3a4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortResource.cs @@ -110,7 +110,7 @@ public virtual ExpressRouteLinkCollection GetExpressRouteLinks() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetExpressRouteLin /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -179,7 +179,7 @@ public virtual ExpressRoutePortAuthorizationCollection GetExpressRoutePortAuthor /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetEx /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response GetExpressRoutePo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -281,7 +281,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -405,7 +405,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> UpdateAsync(Networ /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -489,7 +489,7 @@ public virtual Response Update(NetworkTagsObject netwo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -531,7 +531,7 @@ public virtual async Task> Generate /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -573,7 +573,7 @@ public virtual Response GenerateLoa(Generate /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -635,7 +635,7 @@ public virtual async Task> AddTagAsync(string /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -697,7 +697,7 @@ public virtual Response AddTag(string key, string valu /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -754,7 +754,7 @@ public virtual async Task> SetTagsAsync(IDict /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -811,7 +811,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -871,7 +871,7 @@ public virtual async Task> RemoveTagAsync(str /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortsLocationCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortsLocationCollection.cs index a011a387eeb90..acfae5aa309c8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortsLocationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortsLocationCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -110,7 +110,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -155,7 +155,7 @@ public virtual Response Get(string locationNa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -185,7 +185,7 @@ public virtual AsyncPageable GetAllAsync(Canc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -215,7 +215,7 @@ public virtual Pageable GetAll(CancellationTo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual async Task> ExistsAsync(string locationName, Cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Response Exists(string locationName, CancellationToken canc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -346,7 +346,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortsLocationResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortsLocationResource.cs index 8a4245602e5ab..a24abc27c9359 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortsLocationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortsLocationResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteProviderPortCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteProviderPortCollection.cs index 0e311b031188c..834be38480156 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteProviderPortCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteProviderPortCollection.cs @@ -70,7 +70,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> GetAsync(s /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -160,7 +160,7 @@ public virtual Response Get(string providerpor /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -190,7 +190,7 @@ public virtual AsyncPageable GetAllAsync(strin /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -220,7 +220,7 @@ public virtual Pageable GetAll(string filter = /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -263,7 +263,7 @@ public virtual async Task> ExistsAsync(string providerport, Cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -306,7 +306,7 @@ public virtual Response Exists(string providerport, CancellationToken canc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteProviderPortResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteProviderPortResource.cs index 39b055c1d201a..0ce74f8be1a94 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteProviderPortResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteProviderPortResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkArmClient.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkArmClient.cs index 439768ee5647c..b02a766b9e832 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkArmClient.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkArmClient.cs @@ -742,6 +742,18 @@ public virtual NetworkVirtualApplianceSkuResource GetNetworkVirtualApplianceSkuR return new NetworkVirtualApplianceSkuResource(Client, id); } + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual InboundSecurityRuleResource GetInboundSecurityRuleResource(ResourceIdentifier id) + { + InboundSecurityRuleResource.ValidateResourceId(id); + return new InboundSecurityRuleResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkManagementGroupResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkManagementGroupResource.cs index f12bda292b8ea..b0be9f9e385ce 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkManagementGroupResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkManagementGroupResource.cs @@ -53,7 +53,7 @@ public virtual ManagementGroupNetworkManagerConnectionCollection GetManagementGr /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkResourceGroupResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkResourceGroupResource.cs index 11d6fc61d1f54..500e11065a292 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkResourceGroupResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkResourceGroupResource.cs @@ -74,7 +74,7 @@ public virtual ApplicationGatewayCollection GetApplicationGateways() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -105,7 +105,7 @@ public virtual async Task> GetApplicationGa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual ApplicationSecurityGroupCollection GetApplicationSecurityGroups() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -174,7 +174,7 @@ public virtual async Task> GetApplica /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual AzureFirewallCollection GetAzureFirewalls() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -243,7 +243,7 @@ public virtual async Task> GetAzureFirewallAsync /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -281,7 +281,7 @@ public virtual BastionHostCollection GetBastionHosts() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> GetBastionHostAsync(str /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -353,7 +353,7 @@ public virtual CloudServiceSwapCollection GetCloudServiceSwaps(string resourceNa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -384,7 +384,7 @@ public virtual async Task> GetCloudServiceSwa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -422,7 +422,7 @@ public virtual CustomIPPrefixCollection GetCustomIPPrefixes() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -454,7 +454,7 @@ public virtual async Task> GetCustomIPPrefixAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -493,7 +493,7 @@ public virtual DdosCustomPolicyCollection GetDdosCustomPolicies() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -524,7 +524,7 @@ public virtual async Task> GetDdosCustomPolic /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -562,7 +562,7 @@ public virtual DdosProtectionPlanCollection GetDdosProtectionPlans() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -593,7 +593,7 @@ public virtual async Task> GetDdosProtectio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -631,7 +631,7 @@ public virtual DscpConfigurationCollection GetDscpConfigurations() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -662,7 +662,7 @@ public virtual async Task> GetDscpConfigurat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -700,7 +700,7 @@ public virtual ExpressRouteCircuitCollection GetExpressRouteCircuits() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -731,7 +731,7 @@ public virtual async Task> GetExpressRoute /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -769,7 +769,7 @@ public virtual ExpressRouteCrossConnectionCollection GetExpressRouteCrossConnect /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -800,7 +800,7 @@ public virtual async Task> GetExpr /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -838,7 +838,7 @@ public virtual ExpressRoutePortCollection GetExpressRoutePorts() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -869,7 +869,7 @@ public virtual async Task> GetExpressRoutePor /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -907,7 +907,7 @@ public virtual FirewallPolicyCollection GetFirewallPolicies() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -939,7 +939,7 @@ public virtual async Task> GetFirewallPolicyAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -978,7 +978,7 @@ public virtual IPAllocationCollection GetIPAllocations() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1010,7 +1010,7 @@ public virtual async Task> GetIPAllocationAsync(s /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1049,7 +1049,7 @@ public virtual IPGroupCollection GetIPGroups() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1081,7 +1081,7 @@ public virtual async Task> GetIPGroupAsync(string ipGr /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1120,7 +1120,7 @@ public virtual LoadBalancerCollection GetLoadBalancers() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1152,7 +1152,7 @@ public virtual async Task> GetLoadBalancerAsync(s /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1191,7 +1191,7 @@ public virtual NatGatewayCollection GetNatGateways() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1223,7 +1223,7 @@ public virtual async Task> GetNatGatewayAsync(strin /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1262,7 +1262,7 @@ public virtual NetworkInterfaceCollection GetNetworkInterfaces() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1294,7 +1294,7 @@ public virtual async Task> GetNetworkInterfac /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1333,7 +1333,7 @@ public virtual NetworkManagerCollection GetNetworkManagers() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1364,7 +1364,7 @@ public virtual async Task> GetNetworkManagerAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1402,7 +1402,7 @@ public virtual NetworkProfileCollection GetNetworkProfiles() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1434,7 +1434,7 @@ public virtual async Task> GetNetworkProfileAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1473,7 +1473,7 @@ public virtual NetworkSecurityGroupCollection GetNetworkSecurityGroups() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1505,7 +1505,7 @@ public virtual async Task> GetNetworkSecu /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1544,7 +1544,7 @@ public virtual NetworkVirtualApplianceCollection GetNetworkVirtualAppliances() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1576,7 +1576,7 @@ public virtual async Task> GetNetworkV /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1615,7 +1615,7 @@ public virtual NetworkWatcherCollection GetNetworkWatchers() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1646,7 +1646,7 @@ public virtual async Task> GetNetworkWatcherAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1684,7 +1684,7 @@ public virtual PrivateEndpointCollection GetPrivateEndpoints() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1716,7 +1716,7 @@ public virtual async Task> GetPrivateEndpointA /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1755,7 +1755,7 @@ public virtual PrivateLinkServiceCollection GetPrivateLinkServices() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1787,7 +1787,7 @@ public virtual async Task> GetPrivateLinkSe /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1826,7 +1826,7 @@ public virtual PublicIPAddressCollection GetPublicIPAddresses() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1858,7 +1858,7 @@ public virtual async Task> GetPublicIPAddressA /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1897,7 +1897,7 @@ public virtual PublicIPPrefixCollection GetPublicIPPrefixes() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1929,7 +1929,7 @@ public virtual async Task> GetPublicIPPrefixAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1968,7 +1968,7 @@ public virtual RouteFilterCollection GetRouteFilters() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2000,7 +2000,7 @@ public virtual async Task> GetRouteFilterAsync(str /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2039,7 +2039,7 @@ public virtual RouteTableCollection GetRouteTables() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2071,7 +2071,7 @@ public virtual async Task> GetRouteTableAsync(strin /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2110,7 +2110,7 @@ public virtual SecurityPartnerProviderCollection GetSecurityPartnerProviders() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2141,7 +2141,7 @@ public virtual async Task> GetSecurity /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2179,7 +2179,7 @@ public virtual ServiceEndpointPolicyCollection GetServiceEndpointPolicies() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2211,7 +2211,7 @@ public virtual async Task> GetServiceEnd /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2250,7 +2250,7 @@ public virtual VirtualNetworkCollection GetVirtualNetworks() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2282,7 +2282,7 @@ public virtual async Task> GetVirtualNetworkAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2321,7 +2321,7 @@ public virtual VirtualNetworkGatewayCollection GetVirtualNetworkGateways() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2352,7 +2352,7 @@ public virtual async Task> GetVirtualNet /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2390,7 +2390,7 @@ public virtual VirtualNetworkGatewayConnectionCollection GetVirtualNetworkGatewa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2421,7 +2421,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2459,7 +2459,7 @@ public virtual LocalNetworkGatewayCollection GetLocalNetworkGateways() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2490,7 +2490,7 @@ public virtual async Task> GetLocalNetwork /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2528,7 +2528,7 @@ public virtual VirtualNetworkTapCollection GetVirtualNetworkTaps() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2559,7 +2559,7 @@ public virtual async Task> GetVirtualNetwork /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2597,7 +2597,7 @@ public virtual VirtualRouterCollection GetVirtualRouters() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2629,7 +2629,7 @@ public virtual async Task> GetVirtualRouterAsync /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2668,7 +2668,7 @@ public virtual VirtualWanCollection GetVirtualWans() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2699,7 +2699,7 @@ public virtual async Task> GetVirtualWanAsync(strin /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2737,7 +2737,7 @@ public virtual VpnSiteCollection GetVpnSites() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2768,7 +2768,7 @@ public virtual async Task> GetVpnSiteAsync(string vpnS /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2806,7 +2806,7 @@ public virtual VpnServerConfigurationCollection GetVpnServerConfigurations() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2837,7 +2837,7 @@ public virtual async Task> GetVpnServer /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2875,7 +2875,7 @@ public virtual VirtualHubCollection GetVirtualHubs() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2906,7 +2906,7 @@ public virtual async Task> GetVirtualHubAsync(strin /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2944,7 +2944,7 @@ public virtual VpnGatewayCollection GetVpnGateways() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2975,7 +2975,7 @@ public virtual async Task> GetVpnGatewayAsync(strin /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3013,7 +3013,7 @@ public virtual P2SVpnGatewayCollection GetP2SVpnGateways() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3044,7 +3044,7 @@ public virtual async Task> GetP2SVpnGatewayAsync /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3082,7 +3082,7 @@ public virtual ExpressRouteGatewayCollection GetExpressRouteGateways() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3113,7 +3113,7 @@ public virtual async Task> GetExpressRoute /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3151,7 +3151,7 @@ public virtual WebApplicationFirewallPolicyCollection GetWebApplicationFirewallP /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3182,7 +3182,7 @@ public virtual async Task> GetWeb /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3213,7 +3213,7 @@ public virtual Response GetWebApplicationF /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -3240,7 +3240,7 @@ public virtual AsyncPageable GetAvailableResourceGroupDeleg /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -3267,7 +3267,7 @@ public virtual Pageable GetAvailableResourceGroupDelegation /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -3294,7 +3294,7 @@ public virtual AsyncPageable GetAvailableServiceAliasesBy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -3321,7 +3321,7 @@ public virtual Pageable GetAvailableServiceAliasesByResou /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -3348,7 +3348,7 @@ public virtual AsyncPageable GetAvailablePrivateEn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -3375,7 +3375,7 @@ public virtual Pageable GetAvailablePrivateEndpoin /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -3418,7 +3418,7 @@ public virtual async Task> CheckPriva /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -3461,7 +3461,7 @@ public virtual ArmOperation CheckPrivateLinkServic /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -3488,7 +3488,7 @@ public virtual AsyncPageable GetAutoApprovedPriv /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkSubscriptionResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkSubscriptionResource.cs index b081eaf6bb3b0..06cae55fe26f7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkSubscriptionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/MockableNetworkSubscriptionResource.cs @@ -267,7 +267,7 @@ public virtual ApplicationGatewayWafDynamicManifestCollection GetApplicationGate /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -296,7 +296,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -332,7 +332,7 @@ public virtual AzureWebCategoryCollection GetAzureWebCategories() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual async Task> GetAzureWebCategor /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual ExpressRouteProviderPortCollection GetExpressRouteProviderPorts() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -434,7 +434,7 @@ public virtual async Task> GetExpress /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -472,7 +472,7 @@ public virtual ExpressRoutePortsLocationCollection GetExpressRoutePortsLocations /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -503,7 +503,7 @@ public virtual async Task> GetExpres /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -541,7 +541,7 @@ public virtual SubscriptionNetworkManagerConnectionCollection GetSubscriptionNet /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -572,7 +572,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -610,7 +610,7 @@ public virtual NetworkVirtualApplianceSkuCollection GetNetworkVirtualApplianceSk /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -641,7 +641,7 @@ public virtual async Task> GetNetwo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -672,7 +672,7 @@ public virtual Response GetNetworkVirtualApp /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -702,7 +702,7 @@ public virtual AsyncPageable GetApplicationGatewaysA /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -732,7 +732,7 @@ public virtual Pageable GetApplicationGateways(Cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -761,7 +761,7 @@ public virtual AsyncPageable GetAvailableServerVariablesApplicationGatew /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -790,7 +790,7 @@ public virtual Pageable GetAvailableServerVariablesApplicationGateways(C /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -819,7 +819,7 @@ public virtual AsyncPageable GetAvailableRequestHeadersApplicationGatewa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -848,7 +848,7 @@ public virtual Pageable GetAvailableRequestHeadersApplicationGateways(Ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -877,7 +877,7 @@ public virtual AsyncPageable GetAvailableResponseHeadersApplicationGatew /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -906,7 +906,7 @@ public virtual Pageable GetAvailableResponseHeadersApplicationGateways(C /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -935,7 +935,7 @@ public virtual AsyncPageable GetAppGatewayAva /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -964,7 +964,7 @@ public virtual Pageable GetAppGatewayAvailabl /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1002,7 +1002,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1040,7 +1040,7 @@ public virtual Response GetApplicatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1070,7 +1070,7 @@ public virtual AsyncPageable GetApplicati /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1100,7 +1100,7 @@ public virtual Pageable GetApplicationGat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1143,7 +1143,7 @@ public virtual async Task> GetAp /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1186,7 +1186,7 @@ public virtual Response GetApplicationGat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1216,7 +1216,7 @@ public virtual AsyncPageable GetApplicationSec /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1246,7 +1246,7 @@ public virtual Pageable GetApplicationSecurity /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -1273,7 +1273,7 @@ public virtual AsyncPageable GetAvailableDelegationsAsync(A /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -1300,7 +1300,7 @@ public virtual Pageable GetAvailableDelegations(AzureLocati /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -1327,7 +1327,7 @@ public virtual AsyncPageable GetAvailableServiceAliasesAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -1354,7 +1354,7 @@ public virtual Pageable GetAvailableServiceAliases(AzureL /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1384,7 +1384,7 @@ public virtual AsyncPageable GetAzureFirewallsAsync(Cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1414,7 +1414,7 @@ public virtual Pageable GetAzureFirewalls(CancellationTok /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -1440,7 +1440,7 @@ public virtual AsyncPageable GetAzureFirewallFqdnTagsAsync /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -1466,7 +1466,7 @@ public virtual Pageable GetAzureFirewallFqdnTags(Cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1496,7 +1496,7 @@ public virtual AsyncPageable GetBastionHostsAsync(Cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1526,7 +1526,7 @@ public virtual Pageable GetBastionHosts(CancellationToken c /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1569,7 +1569,7 @@ public virtual async Task> CheckDnsNameAvail /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1612,7 +1612,7 @@ public virtual Response CheckDnsNameAvailability(Azur /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1642,7 +1642,7 @@ public virtual AsyncPageable GetCustomIPPrefixesAsync(Ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1672,7 +1672,7 @@ public virtual Pageable GetCustomIPPrefixes(Cancellation /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1702,7 +1702,7 @@ public virtual AsyncPageable GetDdosProtectionPlansA /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1732,7 +1732,7 @@ public virtual Pageable GetDdosProtectionPlans(Cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1762,7 +1762,7 @@ public virtual AsyncPageable GetDscpConfigurationsAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1792,7 +1792,7 @@ public virtual Pageable GetDscpConfigurations(Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -1819,7 +1819,7 @@ public virtual AsyncPageable GetAvailableEndpointServices /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -1846,7 +1846,7 @@ public virtual Pageable GetAvailableEndpointServices(Azur /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1876,7 +1876,7 @@ public virtual AsyncPageable GetExpressRouteCircuit /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1906,7 +1906,7 @@ public virtual Pageable GetExpressRouteCircuits(Can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -1932,7 +1932,7 @@ public virtual AsyncPageable GetExpressRouteService /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -1958,7 +1958,7 @@ public virtual Pageable GetExpressRouteServiceProvi /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1966,12 +1966,13 @@ public virtual Pageable GetExpressRouteServiceProvi /// /// /// + /// The filter to apply on the operation. For example, you can use $filter=name eq '{circuitServiceKey}'. /// The cancellation token to use. /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetExpressRouteCrossConnectionsAsync(CancellationToken cancellationToken = default) + public virtual AsyncPageable GetExpressRouteCrossConnectionsAsync(string filter = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => ExpressRouteCrossConnectionRestClient.CreateListRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ExpressRouteCrossConnectionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); + HttpMessage FirstPageRequest(int? pageSizeHint) => ExpressRouteCrossConnectionRestClient.CreateListRequest(Id.SubscriptionId, filter); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ExpressRouteCrossConnectionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, filter); return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ExpressRouteCrossConnectionResource(Client, ExpressRouteCrossConnectionData.DeserializeExpressRouteCrossConnectionData(e)), ExpressRouteCrossConnectionClientDiagnostics, Pipeline, "MockableNetworkSubscriptionResource.GetExpressRouteCrossConnections", "value", "nextLink", cancellationToken); } @@ -1988,7 +1989,7 @@ public virtual AsyncPageable GetExpressRout /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1996,12 +1997,13 @@ public virtual AsyncPageable GetExpressRout /// /// /// + /// The filter to apply on the operation. For example, you can use $filter=name eq '{circuitServiceKey}'. /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetExpressRouteCrossConnections(CancellationToken cancellationToken = default) + public virtual Pageable GetExpressRouteCrossConnections(string filter = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => ExpressRouteCrossConnectionRestClient.CreateListRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ExpressRouteCrossConnectionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); + HttpMessage FirstPageRequest(int? pageSizeHint) => ExpressRouteCrossConnectionRestClient.CreateListRequest(Id.SubscriptionId, filter); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ExpressRouteCrossConnectionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, filter); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ExpressRouteCrossConnectionResource(Client, ExpressRouteCrossConnectionData.DeserializeExpressRouteCrossConnectionData(e)), ExpressRouteCrossConnectionClientDiagnostics, Pipeline, "MockableNetworkSubscriptionResource.GetExpressRouteCrossConnections", "value", "nextLink", cancellationToken); } @@ -2018,7 +2020,7 @@ public virtual Pageable GetExpressRouteCros /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2048,7 +2050,7 @@ public virtual AsyncPageable GetExpressRoutePortsAsync /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2078,7 +2080,7 @@ public virtual Pageable GetExpressRoutePorts(Cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2108,7 +2110,7 @@ public virtual AsyncPageable GetFirewallPoliciesAsync(Ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2138,7 +2140,7 @@ public virtual Pageable GetFirewallPolicies(Cancellation /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2168,7 +2170,7 @@ public virtual AsyncPageable GetIPAllocationsAsync(Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2198,7 +2200,7 @@ public virtual Pageable GetIPAllocations(CancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2228,7 +2230,7 @@ public virtual AsyncPageable GetIPGroupsAsync(CancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2258,7 +2260,7 @@ public virtual Pageable GetIPGroups(CancellationToken cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2288,7 +2290,7 @@ public virtual AsyncPageable GetLoadBalancersAsync(Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2318,7 +2320,7 @@ public virtual Pageable GetLoadBalancers(CancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2365,7 +2367,7 @@ public virtual async Task SwapPublicIPAddressesLoadBalancerAsync(W /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2412,7 +2414,7 @@ public virtual ArmOperation SwapPublicIPAddressesLoadBalancer(WaitUntil waitUnti /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2442,7 +2444,7 @@ public virtual AsyncPageable GetNatGatewaysAsync(Cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2472,7 +2474,7 @@ public virtual Pageable GetNatGateways(CancellationToken can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2502,7 +2504,7 @@ public virtual AsyncPageable GetNetworkInterfacesAsync /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2532,7 +2534,7 @@ public virtual Pageable GetNetworkInterfaces(Cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2564,7 +2566,7 @@ public virtual AsyncPageable GetNetworkManagersAsync(int /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2596,7 +2598,7 @@ public virtual Pageable GetNetworkManagers(int? top = nu /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2626,7 +2628,7 @@ public virtual AsyncPageable GetNetworkProfilesAsync(Can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2656,7 +2658,7 @@ public virtual Pageable GetNetworkProfiles(CancellationT /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2686,7 +2688,7 @@ public virtual AsyncPageable GetNetworkSecurityGro /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2716,7 +2718,7 @@ public virtual Pageable GetNetworkSecurityGroups(C /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2746,7 +2748,7 @@ public virtual AsyncPageable GetNetworkVirtualA /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2776,7 +2778,7 @@ public virtual Pageable GetNetworkVirtualApplia /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2805,7 +2807,7 @@ public virtual AsyncPageable GetNetworkWatchersAsync(Can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2834,7 +2836,7 @@ public virtual Pageable GetNetworkWatchers(CancellationT /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2864,7 +2866,7 @@ public virtual AsyncPageable GetPrivateEndpointsAsync(C /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2894,7 +2896,7 @@ public virtual Pageable GetPrivateEndpoints(Cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -2921,7 +2923,7 @@ public virtual AsyncPageable GetAvailablePrivateEn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -2948,7 +2950,7 @@ public virtual Pageable GetAvailablePrivateEndpoin /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2978,7 +2980,7 @@ public virtual AsyncPageable GetPrivateLinkServicesA /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3008,7 +3010,7 @@ public virtual Pageable GetPrivateLinkServices(Cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -3051,7 +3053,7 @@ public virtual async Task> CheckPriva /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -3094,7 +3096,7 @@ public virtual ArmOperation CheckPrivateLinkServic /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -3121,7 +3123,7 @@ public virtual AsyncPageable GetAutoApprovedPriv /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -3148,7 +3150,7 @@ public virtual Pageable GetAutoApprovedPrivateLi /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3178,7 +3180,7 @@ public virtual AsyncPageable GetPublicIPAddressesAsync( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3208,7 +3210,7 @@ public virtual Pageable GetPublicIPAddresses(Cancellati /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3238,7 +3240,7 @@ public virtual AsyncPageable GetPublicIPPrefixesAsync(Ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3268,7 +3270,7 @@ public virtual Pageable GetPublicIPPrefixes(Cancellation /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3298,7 +3300,7 @@ public virtual AsyncPageable GetRouteFiltersAsync(Cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3328,7 +3330,7 @@ public virtual Pageable GetRouteFilters(CancellationToken c /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3358,7 +3360,7 @@ public virtual AsyncPageable GetRouteTablesAsync(Cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3388,7 +3390,7 @@ public virtual Pageable GetRouteTables(CancellationToken can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3418,7 +3420,7 @@ public virtual AsyncPageable GetSecurityPartner /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3448,7 +3450,7 @@ public virtual Pageable GetSecurityPartnerProvi /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -3474,7 +3476,7 @@ public virtual AsyncPageable GetBgpServiceCommunitiesAsync( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -3500,7 +3502,7 @@ public virtual Pageable GetBgpServiceCommunities(Cancellati /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3530,7 +3532,7 @@ public virtual AsyncPageable GetServiceEndpointPo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3560,7 +3562,7 @@ public virtual Pageable GetServiceEndpointPolicie /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -3595,7 +3597,7 @@ public virtual async Task> GetServiceTagAsync(Az /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -3630,7 +3632,7 @@ public virtual Response GetServiceTag(AzureLocation locat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -3659,7 +3661,7 @@ public virtual AsyncPageable GetAllServiceTagInformationA /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -3688,7 +3690,7 @@ public virtual Pageable GetAllServiceTagInformation(Azure /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -3715,7 +3717,7 @@ public virtual AsyncPageable GetUsagesAsync(AzureLocation location /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -3742,7 +3744,7 @@ public virtual Pageable GetUsages(AzureLocation location, Cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3772,7 +3774,7 @@ public virtual AsyncPageable GetVirtualNetworksAsync(Can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3802,7 +3804,7 @@ public virtual Pageable GetVirtualNetworks(CancellationT /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3832,7 +3834,7 @@ public virtual AsyncPageable GetVirtualNetworkTapsAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3862,7 +3864,7 @@ public virtual Pageable GetVirtualNetworkTaps(Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3892,7 +3894,7 @@ public virtual AsyncPageable GetVirtualRoutersAsync(Cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3922,7 +3924,7 @@ public virtual Pageable GetVirtualRouters(CancellationTok /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3952,7 +3954,7 @@ public virtual AsyncPageable GetVirtualWansAsync(Cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3982,7 +3984,7 @@ public virtual Pageable GetVirtualWans(CancellationToken can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -4012,7 +4014,7 @@ public virtual AsyncPageable GetVpnSitesAsync(CancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -4042,7 +4044,7 @@ public virtual Pageable GetVpnSites(CancellationToken cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -4072,7 +4074,7 @@ public virtual AsyncPageable GetVpnServerConfigu /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -4102,7 +4104,7 @@ public virtual Pageable GetVpnServerConfiguratio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -4132,7 +4134,7 @@ public virtual AsyncPageable GetVirtualHubsAsync(Cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -4162,7 +4164,7 @@ public virtual Pageable GetVirtualHubs(CancellationToken can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -4192,7 +4194,7 @@ public virtual AsyncPageable GetVpnGatewaysAsync(Cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -4222,7 +4224,7 @@ public virtual Pageable GetVpnGateways(CancellationToken can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -4252,7 +4254,7 @@ public virtual AsyncPageable GetP2SVpnGatewaysAsync(Cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -4282,7 +4284,7 @@ public virtual Pageable GetP2SVpnGateways(CancellationTok /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -4311,7 +4313,7 @@ public virtual AsyncPageable GetExpressRouteGateway /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -4340,7 +4342,7 @@ public virtual Pageable GetExpressRouteGateways(Can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -4370,7 +4372,7 @@ public virtual AsyncPageable GetWebApplica /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/NetworkExtensions.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/NetworkExtensions.cs index 00651e152260f..a844b9a459a1f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/NetworkExtensions.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Extensions/NetworkExtensions.cs @@ -1160,6 +1160,25 @@ public static NetworkVirtualApplianceSkuResource GetNetworkVirtualApplianceSkuRe return GetMockableNetworkArmClient(client).GetNetworkVirtualApplianceSkuResource(id); } + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static InboundSecurityRuleResource GetInboundSecurityRuleResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableNetworkArmClient(client).GetInboundSecurityRuleResource(id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -2159,7 +2178,7 @@ public static ManagementGroupNetworkManagerConnectionCollection GetManagementGro /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2197,7 +2216,7 @@ public static async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2252,7 +2271,7 @@ public static ApplicationGatewayCollection GetApplicationGateways(this ResourceG /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2290,7 +2309,7 @@ public static async Task> GetApplicationGat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2345,7 +2364,7 @@ public static ApplicationSecurityGroupCollection GetApplicationSecurityGroups(th /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2383,7 +2402,7 @@ public static async Task> GetApplicat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2438,7 +2457,7 @@ public static AzureFirewallCollection GetAzureFirewalls(this ResourceGroupResour /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2476,7 +2495,7 @@ public static async Task> GetAzureFirewallAsync( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2531,7 +2550,7 @@ public static BastionHostCollection GetBastionHosts(this ResourceGroupResource r /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2569,7 +2588,7 @@ public static async Task> GetBastionHostAsync(this /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2626,7 +2645,7 @@ public static CloudServiceSwapCollection GetCloudServiceSwaps(this ResourceGroup /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2664,7 +2683,7 @@ public static async Task> GetCloudServiceSwap /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2719,7 +2738,7 @@ public static CustomIPPrefixCollection GetCustomIPPrefixes(this ResourceGroupRes /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2758,7 +2777,7 @@ public static async Task> GetCustomIPPrefixAsyn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2814,7 +2833,7 @@ public static DdosCustomPolicyCollection GetDdosCustomPolicies(this ResourceGrou /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2852,7 +2871,7 @@ public static async Task> GetDdosCustomPolicy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2907,7 +2926,7 @@ public static DdosProtectionPlanCollection GetDdosProtectionPlans(this ResourceG /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2945,7 +2964,7 @@ public static async Task> GetDdosProtection /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3000,7 +3019,7 @@ public static DscpConfigurationCollection GetDscpConfigurations(this ResourceGro /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3038,7 +3057,7 @@ public static async Task> GetDscpConfigurati /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3093,7 +3112,7 @@ public static ExpressRouteCircuitCollection GetExpressRouteCircuits(this Resourc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3131,7 +3150,7 @@ public static async Task> GetExpressRouteC /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3186,7 +3205,7 @@ public static ExpressRouteCrossConnectionCollection GetExpressRouteCrossConnecti /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3224,7 +3243,7 @@ public static async Task> GetExpre /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3279,7 +3298,7 @@ public static ExpressRoutePortCollection GetExpressRoutePorts(this ResourceGroup /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3317,7 +3336,7 @@ public static async Task> GetExpressRoutePort /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3372,7 +3391,7 @@ public static FirewallPolicyCollection GetFirewallPolicies(this ResourceGroupRes /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3411,7 +3430,7 @@ public static async Task> GetFirewallPolicyAsyn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3467,7 +3486,7 @@ public static IPAllocationCollection GetIPAllocations(this ResourceGroupResource /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3506,7 +3525,7 @@ public static async Task> GetIPAllocationAsync(th /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3562,7 +3581,7 @@ public static IPGroupCollection GetIPGroups(this ResourceGroupResource resourceG /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3601,7 +3620,7 @@ public static async Task> GetIPGroupAsync(this Resourc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3657,7 +3676,7 @@ public static LoadBalancerCollection GetLoadBalancers(this ResourceGroupResource /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3696,7 +3715,7 @@ public static async Task> GetLoadBalancerAsync(th /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3752,7 +3771,7 @@ public static NatGatewayCollection GetNatGateways(this ResourceGroupResource res /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3791,7 +3810,7 @@ public static async Task> GetNatGatewayAsync(this R /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3847,7 +3866,7 @@ public static NetworkInterfaceCollection GetNetworkInterfaces(this ResourceGroup /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3886,7 +3905,7 @@ public static async Task> GetNetworkInterface /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3942,7 +3961,7 @@ public static NetworkManagerCollection GetNetworkManagers(this ResourceGroupReso /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -3980,7 +3999,7 @@ public static async Task> GetNetworkManagerAsyn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -4035,7 +4054,7 @@ public static NetworkProfileCollection GetNetworkProfiles(this ResourceGroupReso /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -4074,7 +4093,7 @@ public static async Task> GetNetworkProfileAsyn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -4130,7 +4149,7 @@ public static NetworkSecurityGroupCollection GetNetworkSecurityGroups(this Resou /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -4169,7 +4188,7 @@ public static async Task> GetNetworkSecur /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -4225,7 +4244,7 @@ public static NetworkVirtualApplianceCollection GetNetworkVirtualAppliances(this /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -4264,7 +4283,7 @@ public static async Task> GetNetworkVi /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -4320,7 +4339,7 @@ public static NetworkWatcherCollection GetNetworkWatchers(this ResourceGroupReso /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -4358,7 +4377,7 @@ public static async Task> GetNetworkWatcherAsyn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -4413,7 +4432,7 @@ public static PrivateEndpointCollection GetPrivateEndpoints(this ResourceGroupRe /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -4452,7 +4471,7 @@ public static async Task> GetPrivateEndpointAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -4508,7 +4527,7 @@ public static PrivateLinkServiceCollection GetPrivateLinkServices(this ResourceG /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -4547,7 +4566,7 @@ public static async Task> GetPrivateLinkSer /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -4603,7 +4622,7 @@ public static PublicIPAddressCollection GetPublicIPAddresses(this ResourceGroupR /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -4642,7 +4661,7 @@ public static async Task> GetPublicIPAddressAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -4698,7 +4717,7 @@ public static PublicIPPrefixCollection GetPublicIPPrefixes(this ResourceGroupRes /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -4737,7 +4756,7 @@ public static async Task> GetPublicIPPrefixAsyn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -4793,7 +4812,7 @@ public static RouteFilterCollection GetRouteFilters(this ResourceGroupResource r /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -4832,7 +4851,7 @@ public static async Task> GetRouteFilterAsync(this /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -4888,7 +4907,7 @@ public static RouteTableCollection GetRouteTables(this ResourceGroupResource res /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -4927,7 +4946,7 @@ public static async Task> GetRouteTableAsync(this R /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -4983,7 +5002,7 @@ public static SecurityPartnerProviderCollection GetSecurityPartnerProviders(this /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -5021,7 +5040,7 @@ public static async Task> GetSecurityP /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -5076,7 +5095,7 @@ public static ServiceEndpointPolicyCollection GetServiceEndpointPolicies(this Re /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -5115,7 +5134,7 @@ public static async Task> GetServiceEndp /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -5171,7 +5190,7 @@ public static VirtualNetworkCollection GetVirtualNetworks(this ResourceGroupReso /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -5210,7 +5229,7 @@ public static async Task> GetVirtualNetworkAsyn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -5266,7 +5285,7 @@ public static VirtualNetworkGatewayCollection GetVirtualNetworkGateways(this Res /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -5304,7 +5323,7 @@ public static async Task> GetVirtualNetw /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -5359,7 +5378,7 @@ public static VirtualNetworkGatewayConnectionCollection GetVirtualNetworkGateway /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -5397,7 +5416,7 @@ public static async Task> GetV /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -5452,7 +5471,7 @@ public static LocalNetworkGatewayCollection GetLocalNetworkGateways(this Resourc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -5490,7 +5509,7 @@ public static async Task> GetLocalNetworkG /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -5545,7 +5564,7 @@ public static VirtualNetworkTapCollection GetVirtualNetworkTaps(this ResourceGro /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -5583,7 +5602,7 @@ public static async Task> GetVirtualNetworkT /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -5638,7 +5657,7 @@ public static VirtualRouterCollection GetVirtualRouters(this ResourceGroupResour /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -5677,7 +5696,7 @@ public static async Task> GetVirtualRouterAsync( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -5733,7 +5752,7 @@ public static VirtualWanCollection GetVirtualWans(this ResourceGroupResource res /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -5771,7 +5790,7 @@ public static async Task> GetVirtualWanAsync(this R /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -5826,7 +5845,7 @@ public static VpnSiteCollection GetVpnSites(this ResourceGroupResource resourceG /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -5864,7 +5883,7 @@ public static async Task> GetVpnSiteAsync(this Resourc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -5919,7 +5938,7 @@ public static VpnServerConfigurationCollection GetVpnServerConfigurations(this R /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -5957,7 +5976,7 @@ public static async Task> GetVpnServerC /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -6012,7 +6031,7 @@ public static VirtualHubCollection GetVirtualHubs(this ResourceGroupResource res /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -6050,7 +6069,7 @@ public static async Task> GetVirtualHubAsync(this R /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -6105,7 +6124,7 @@ public static VpnGatewayCollection GetVpnGateways(this ResourceGroupResource res /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -6143,7 +6162,7 @@ public static async Task> GetVpnGatewayAsync(this R /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -6198,7 +6217,7 @@ public static P2SVpnGatewayCollection GetP2SVpnGateways(this ResourceGroupResour /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -6236,7 +6255,7 @@ public static async Task> GetP2SVpnGatewayAsync( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -6291,7 +6310,7 @@ public static ExpressRouteGatewayCollection GetExpressRouteGateways(this Resourc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -6329,7 +6348,7 @@ public static async Task> GetExpressRouteG /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -6384,7 +6403,7 @@ public static WebApplicationFirewallPolicyCollection GetWebApplicationFirewallPo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -6422,7 +6441,7 @@ public static async Task> GetWebA /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -6460,7 +6479,7 @@ public static Response GetWebApplicationFi /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -6493,7 +6512,7 @@ public static AsyncPageable GetAvailableResourceGroupDelega /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -6526,7 +6545,7 @@ public static Pageable GetAvailableResourceGroupDelegations /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -6559,7 +6578,7 @@ public static AsyncPageable GetAvailableServiceAliasesByR /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -6592,7 +6611,7 @@ public static Pageable GetAvailableServiceAliasesByResour /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -6625,7 +6644,7 @@ public static AsyncPageable GetAvailablePrivateEnd /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -6658,7 +6677,7 @@ public static Pageable GetAvailablePrivateEndpoint /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -6692,7 +6711,7 @@ public static async Task> CheckPrivat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -6726,7 +6745,7 @@ public static ArmOperation CheckPrivateLinkService /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -6759,7 +6778,7 @@ public static AsyncPageable GetAutoApprovedPriva /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -6810,7 +6829,7 @@ public static ApplicationGatewayWafDynamicManifestCollection GetApplicationGatew /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -6847,7 +6866,7 @@ public static async Task> /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -6901,7 +6920,7 @@ public static AzureWebCategoryCollection GetAzureWebCategories(this Subscription /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -6940,7 +6959,7 @@ public static async Task> GetAzureWebCategory /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -6996,7 +7015,7 @@ public static ExpressRouteProviderPortCollection GetExpressRouteProviderPorts(th /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -7034,7 +7053,7 @@ public static async Task> GetExpressR /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -7089,7 +7108,7 @@ public static ExpressRoutePortsLocationCollection GetExpressRoutePortsLocations( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -7127,7 +7146,7 @@ public static async Task> GetExpress /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -7182,7 +7201,7 @@ public static SubscriptionNetworkManagerConnectionCollection GetSubscriptionNetw /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -7220,7 +7239,7 @@ public static async Task> /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -7275,7 +7294,7 @@ public static NetworkVirtualApplianceSkuCollection GetNetworkVirtualApplianceSku /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -7313,7 +7332,7 @@ public static async Task> GetNetwor /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -7351,7 +7370,7 @@ public static Response GetNetworkVirtualAppl /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -7387,7 +7406,7 @@ public static AsyncPageable GetApplicationGatewaysAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -7423,7 +7442,7 @@ public static Pageable GetApplicationGateways(this S /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -7459,7 +7478,7 @@ public static AsyncPageable GetAvailableServerVariablesApplicationGatewa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -7495,7 +7514,7 @@ public static Pageable GetAvailableServerVariablesApplicationGateways(th /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -7531,7 +7550,7 @@ public static AsyncPageable GetAvailableRequestHeadersApplicationGateway /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -7567,7 +7586,7 @@ public static Pageable GetAvailableRequestHeadersApplicationGateways(thi /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -7603,7 +7622,7 @@ public static AsyncPageable GetAvailableResponseHeadersApplicationGatewa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -7639,7 +7658,7 @@ public static Pageable GetAvailableResponseHeadersApplicationGateways(th /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -7675,7 +7694,7 @@ public static AsyncPageable GetAppGatewayAvai /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -7711,7 +7730,7 @@ public static Pageable GetAppGatewayAvailable /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -7746,7 +7765,7 @@ public static async Task> Ge /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -7781,7 +7800,7 @@ public static Response GetApplication /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -7817,7 +7836,7 @@ public static AsyncPageable GetApplicatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -7853,7 +7872,7 @@ public static Pageable GetApplicationGate /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -7890,7 +7909,7 @@ public static async Task> GetApp /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -7927,7 +7946,7 @@ public static Response GetApplicationGate /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -7963,7 +7982,7 @@ public static AsyncPageable GetApplicationSecu /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -7999,7 +8018,7 @@ public static Pageable GetApplicationSecurityG /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -8032,7 +8051,7 @@ public static AsyncPageable GetAvailableDelegationsAsync(th /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -8065,7 +8084,7 @@ public static Pageable GetAvailableDelegations(this Subscri /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -8098,7 +8117,7 @@ public static AsyncPageable GetAvailableServiceAliasesAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -8131,7 +8150,7 @@ public static Pageable GetAvailableServiceAliases(this Su /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -8167,7 +8186,7 @@ public static AsyncPageable GetAzureFirewallsAsync(this S /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -8203,7 +8222,7 @@ public static Pageable GetAzureFirewalls(this Subscriptio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -8235,7 +8254,7 @@ public static AsyncPageable GetAzureFirewallFqdnTagsAsync( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -8267,7 +8286,7 @@ public static Pageable GetAzureFirewallFqdnTags(this Subsc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -8303,7 +8322,7 @@ public static AsyncPageable GetBastionHostsAsync(this Subsc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -8339,7 +8358,7 @@ public static Pageable GetBastionHosts(this SubscriptionRes /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -8376,7 +8395,7 @@ public static async Task> CheckDnsNameAvaila /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -8413,7 +8432,7 @@ public static Response CheckDnsNameAvailability(this /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -8449,7 +8468,7 @@ public static AsyncPageable GetCustomIPPrefixesAsync(thi /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -8485,7 +8504,7 @@ public static Pageable GetCustomIPPrefixes(this Subscrip /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -8521,7 +8540,7 @@ public static AsyncPageable GetDdosProtectionPlansAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -8557,7 +8576,7 @@ public static Pageable GetDdosProtectionPlans(this S /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -8593,7 +8612,7 @@ public static AsyncPageable GetDscpConfigurationsAsyn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -8629,7 +8648,7 @@ public static Pageable GetDscpConfigurations(this Sub /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -8662,7 +8681,7 @@ public static AsyncPageable GetAvailableEndpointServicesA /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -8695,7 +8714,7 @@ public static Pageable GetAvailableEndpointServices(this /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -8731,7 +8750,7 @@ public static AsyncPageable GetExpressRouteCircuits /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -8767,7 +8786,7 @@ public static Pageable GetExpressRouteCircuits(this /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -8799,7 +8818,7 @@ public static AsyncPageable GetExpressRouteServiceP /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -8831,7 +8850,7 @@ public static Pageable GetExpressRouteServiceProvid /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -8840,18 +8859,19 @@ public static Pageable GetExpressRouteServiceProvid /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. + /// The filter to apply on the operation. For example, you can use $filter=name eq '{circuitServiceKey}'. /// The cancellation token to use. /// is null. /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetExpressRouteCrossConnectionsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + public static AsyncPageable GetExpressRouteCrossConnectionsAsync(this SubscriptionResource subscriptionResource, string filter = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableNetworkSubscriptionResource(subscriptionResource).GetExpressRouteCrossConnectionsAsync(cancellationToken); + return GetMockableNetworkSubscriptionResource(subscriptionResource).GetExpressRouteCrossConnectionsAsync(filter, cancellationToken); } /// @@ -8867,7 +8887,7 @@ public static AsyncPageable GetExpressRoute /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -8876,18 +8896,19 @@ public static AsyncPageable GetExpressRoute /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. + /// The filter to apply on the operation. For example, you can use $filter=name eq '{circuitServiceKey}'. /// The cancellation token to use. /// is null. /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetExpressRouteCrossConnections(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + public static Pageable GetExpressRouteCrossConnections(this SubscriptionResource subscriptionResource, string filter = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableNetworkSubscriptionResource(subscriptionResource).GetExpressRouteCrossConnections(cancellationToken); + return GetMockableNetworkSubscriptionResource(subscriptionResource).GetExpressRouteCrossConnections(filter, cancellationToken); } /// @@ -8903,7 +8924,7 @@ public static Pageable GetExpressRouteCross /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -8939,7 +8960,7 @@ public static AsyncPageable GetExpressRoutePortsAsync( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -8975,7 +8996,7 @@ public static Pageable GetExpressRoutePorts(this Subsc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -9011,7 +9032,7 @@ public static AsyncPageable GetFirewallPoliciesAsync(thi /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -9047,7 +9068,7 @@ public static Pageable GetFirewallPolicies(this Subscrip /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -9083,7 +9104,7 @@ public static AsyncPageable GetIPAllocationsAsync(this Sub /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -9119,7 +9140,7 @@ public static Pageable GetIPAllocations(this SubscriptionR /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -9155,7 +9176,7 @@ public static AsyncPageable GetIPGroupsAsync(this SubscriptionR /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -9191,7 +9212,7 @@ public static Pageable GetIPGroups(this SubscriptionResource su /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -9227,7 +9248,7 @@ public static AsyncPageable GetLoadBalancersAsync(this Sub /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -9263,7 +9284,7 @@ public static Pageable GetLoadBalancers(this SubscriptionR /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -9301,7 +9322,7 @@ public static async Task SwapPublicIPAddressesLoadBalancerAsync(th /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -9339,7 +9360,7 @@ public static ArmOperation SwapPublicIPAddressesLoadBalancer(this SubscriptionRe /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -9375,7 +9396,7 @@ public static AsyncPageable GetNatGatewaysAsync(this Subscri /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -9411,7 +9432,7 @@ public static Pageable GetNatGateways(this SubscriptionResou /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -9447,7 +9468,7 @@ public static AsyncPageable GetNetworkInterfacesAsync( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -9483,7 +9504,7 @@ public static Pageable GetNetworkInterfaces(this Subsc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -9521,7 +9542,7 @@ public static AsyncPageable GetNetworkManagersAsync(this /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -9559,7 +9580,7 @@ public static Pageable GetNetworkManagers(this Subscript /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -9595,7 +9616,7 @@ public static AsyncPageable GetNetworkProfilesAsync(this /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -9631,7 +9652,7 @@ public static Pageable GetNetworkProfiles(this Subscript /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -9667,7 +9688,7 @@ public static AsyncPageable GetNetworkSecurityGrou /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -9703,7 +9724,7 @@ public static Pageable GetNetworkSecurityGroups(th /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -9739,7 +9760,7 @@ public static AsyncPageable GetNetworkVirtualAp /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -9775,7 +9796,7 @@ public static Pageable GetNetworkVirtualApplian /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -9811,7 +9832,7 @@ public static AsyncPageable GetNetworkWatchersAsync(this /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -9847,7 +9868,7 @@ public static Pageable GetNetworkWatchers(this Subscript /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -9883,7 +9904,7 @@ public static AsyncPageable GetPrivateEndpointsAsync(th /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -9919,7 +9940,7 @@ public static Pageable GetPrivateEndpoints(this Subscri /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -9952,7 +9973,7 @@ public static AsyncPageable GetAvailablePrivateEnd /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -9985,7 +10006,7 @@ public static Pageable GetAvailablePrivateEndpoint /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -10021,7 +10042,7 @@ public static AsyncPageable GetPrivateLinkServicesAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -10057,7 +10078,7 @@ public static Pageable GetPrivateLinkServices(this S /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -10091,7 +10112,7 @@ public static async Task> CheckPrivat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -10125,7 +10146,7 @@ public static ArmOperation CheckPrivateLinkService /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -10158,7 +10179,7 @@ public static AsyncPageable GetAutoApprovedPriva /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -10191,7 +10212,7 @@ public static Pageable GetAutoApprovedPrivateLin /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -10227,7 +10248,7 @@ public static AsyncPageable GetPublicIPAddressesAsync(t /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -10263,7 +10284,7 @@ public static Pageable GetPublicIPAddresses(this Subscr /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -10299,7 +10320,7 @@ public static AsyncPageable GetPublicIPPrefixesAsync(thi /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -10335,7 +10356,7 @@ public static Pageable GetPublicIPPrefixes(this Subscrip /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -10371,7 +10392,7 @@ public static AsyncPageable GetRouteFiltersAsync(this Subsc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -10407,7 +10428,7 @@ public static Pageable GetRouteFilters(this SubscriptionRes /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -10443,7 +10464,7 @@ public static AsyncPageable GetRouteTablesAsync(this Subscri /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -10479,7 +10500,7 @@ public static Pageable GetRouteTables(this SubscriptionResou /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -10515,7 +10536,7 @@ public static AsyncPageable GetSecurityPartnerP /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -10551,7 +10572,7 @@ public static Pageable GetSecurityPartnerProvid /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -10583,7 +10604,7 @@ public static AsyncPageable GetBgpServiceCommunitiesAsync(t /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -10615,7 +10636,7 @@ public static Pageable GetBgpServiceCommunities(this Subscr /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -10651,7 +10672,7 @@ public static AsyncPageable GetServiceEndpointPol /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -10687,7 +10708,7 @@ public static Pageable GetServiceEndpointPolicies /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -10719,7 +10740,7 @@ public static async Task> GetServiceTagAsync(thi /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -10751,7 +10772,7 @@ public static Response GetServiceTag(this SubscriptionRes /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -10786,7 +10807,7 @@ public static AsyncPageable GetAllServiceTagInformationAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -10821,7 +10842,7 @@ public static Pageable GetAllServiceTagInformation(this S /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -10854,7 +10875,7 @@ public static AsyncPageable GetUsagesAsync(this SubscriptionResour /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -10887,7 +10908,7 @@ public static Pageable GetUsages(this SubscriptionResource subscri /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -10923,7 +10944,7 @@ public static AsyncPageable GetVirtualNetworksAsync(this /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -10959,7 +10980,7 @@ public static Pageable GetVirtualNetworks(this Subscript /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -10995,7 +11016,7 @@ public static AsyncPageable GetVirtualNetworkTapsAsyn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -11031,7 +11052,7 @@ public static Pageable GetVirtualNetworkTaps(this Sub /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -11067,7 +11088,7 @@ public static AsyncPageable GetVirtualRoutersAsync(this S /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -11103,7 +11124,7 @@ public static Pageable GetVirtualRouters(this Subscriptio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -11139,7 +11160,7 @@ public static AsyncPageable GetVirtualWansAsync(this Subscri /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -11175,7 +11196,7 @@ public static Pageable GetVirtualWans(this SubscriptionResou /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -11211,7 +11232,7 @@ public static AsyncPageable GetVpnSitesAsync(this SubscriptionR /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -11247,7 +11268,7 @@ public static Pageable GetVpnSites(this SubscriptionResource su /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -11283,7 +11304,7 @@ public static AsyncPageable GetVpnServerConfigur /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -11319,7 +11340,7 @@ public static Pageable GetVpnServerConfiguration /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -11355,7 +11376,7 @@ public static AsyncPageable GetVirtualHubsAsync(this Subscri /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -11391,7 +11412,7 @@ public static Pageable GetVirtualHubs(this SubscriptionResou /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -11427,7 +11448,7 @@ public static AsyncPageable GetVpnGatewaysAsync(this Subscri /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -11463,7 +11484,7 @@ public static Pageable GetVpnGateways(this SubscriptionResou /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -11499,7 +11520,7 @@ public static AsyncPageable GetP2SVpnGatewaysAsync(this S /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -11535,7 +11556,7 @@ public static Pageable GetP2SVpnGateways(this Subscriptio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -11571,7 +11592,7 @@ public static AsyncPageable GetExpressRouteGateways /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -11607,7 +11628,7 @@ public static Pageable GetExpressRouteGateways(this /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -11643,7 +11664,7 @@ public static AsyncPageable GetWebApplicat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyCollection.cs index ff6984d2ecf64..ffcb72dddfd47 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string fire /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string firewallPolicyName, s /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string firewallPolicyName, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string firewallPolicyName, string expand = /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyDraftResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyDraftResource.cs index 4bb26edb356bd..0e2b02c451742 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyDraftResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyDraftResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -365,7 +365,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -422,7 +422,7 @@ public virtual async Task> AddTagAsync(str /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -479,7 +479,7 @@ public virtual Response AddTag(string key, string v /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -535,7 +535,7 @@ public virtual async Task> SetTagsAsync(ID /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -591,7 +591,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -646,7 +646,7 @@ public virtual async Task> RemoveTagAsync( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyResource.cs index 89e6a13b0e5c7..8cfb52271819a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyResource.cs @@ -122,7 +122,7 @@ public virtual FirewallPolicyRuleCollectionGroupCollection GetFirewallPolicyRule /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -153,7 +153,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -198,7 +198,7 @@ public virtual FirewallPolicyDraftResource GetFirewallPolicyDraft() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -239,7 +239,7 @@ public virtual async Task> GetAsync(string expa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -280,7 +280,7 @@ public virtual Response Get(string expand = null, Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -322,7 +322,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual async Task> UpdateAsync(NetworkT /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -448,7 +448,7 @@ public virtual Response Update(NetworkTagsObject network /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -486,7 +486,7 @@ public virtual async Task> GetFirewallPolicyId /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -524,7 +524,7 @@ public virtual Response GetFirewallPolicyIdpsSignature( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -562,7 +562,7 @@ public virtual async Task> GetFir /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -600,7 +600,7 @@ public virtual Response GetFirewallPolicyI /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -638,7 +638,7 @@ public virtual async Task DeployFirewallPolicyDeploymentAsync(Wait /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -676,7 +676,7 @@ public virtual ArmOperation DeployFirewallPolicyDeployment(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -738,7 +738,7 @@ public virtual async Task> AddTagAsync(string k /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -800,7 +800,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -857,7 +857,7 @@ public virtual async Task> SetTagsAsync(IDictio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -914,7 +914,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -974,7 +974,7 @@ public virtual async Task> RemoveTagAsync(strin /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupCollection.cs index d2e08325e4465..10c0cd83ece39 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrU /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string ru /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string ruleCollectionGroup /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string ruleCollectionGroupName, Cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupDraftResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupDraftResource.cs index a411d3f1f37a6..71ee2fc7eaaa9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupDraftResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupDraftResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Canc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupResource.cs index fadfff13af88c..0fa45c09b520f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupResource.cs @@ -108,7 +108,7 @@ public virtual FirewallPolicyRuleCollectionGroupDraftResource GetFirewallPolicyR /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -148,7 +148,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -188,7 +188,7 @@ public virtual Response Get(Cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -230,7 +230,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogCollection.cs index 6c2067f988ddb..5b464e773ced0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsync(Wai /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string flowLogName /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string flowLogName, CancellationTok /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken canc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string flowLogName, Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string flowLogName, CancellationToken cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAsync(st /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogData.Serialization.cs index 8eeacce31aacb..24987b9b59c29 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogData.Serialization.cs @@ -10,6 +10,7 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; +using Azure.ResourceManager.Models; using Azure.ResourceManager.Network.Models; namespace Azure.ResourceManager.Network @@ -32,6 +33,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + JsonSerializer.Serialize(writer, Identity); + } if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -145,6 +151,7 @@ internal static FlowLogData DeserializeFlowLogData(JsonElement element, ModelRea return null; } ETag? etag = default; + ManagedServiceIdentity identity = default; ResourceIdentifier id = default; string name = default; ResourceType? type = default; @@ -171,6 +178,15 @@ internal static FlowLogData DeserializeFlowLogData(JsonElement element, ModelRea etag = new ETag(property.Value.GetString()); continue; } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } if (property.NameEquals("id"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -315,6 +331,7 @@ internal static FlowLogData DeserializeFlowLogData(JsonElement element, ModelRea tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, etag, + identity, targetResourceId, targetResourceGuid, storageId, diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogData.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogData.cs index 13444feec19fc..239f1a13c68d1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogData.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogData.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using Azure.Core; +using Azure.ResourceManager.Models; using Azure.ResourceManager.Network.Models; namespace Azure.ResourceManager.Network @@ -31,6 +32,7 @@ public FlowLogData() /// Resource tags. /// Keeps track of any properties unknown to the library. /// A unique read-only string that changes whenever the resource is updated. + /// FlowLog resource Managed Identity. /// ID of network security group to which flow log will be applied. /// Guid of network security group to which flow log will be applied. /// ID of the storage account which is used to store the flow log. @@ -39,9 +41,10 @@ public FlowLogData() /// Parameters that define the flow log format. /// Parameters that define the configuration of traffic analytics. /// The provisioning state of the flow log. - internal FlowLogData(ResourceIdentifier id, string name, ResourceType? resourceType, AzureLocation? location, IDictionary tags, IDictionary serializedAdditionalRawData, ETag? etag, ResourceIdentifier targetResourceId, Guid? targetResourceGuid, ResourceIdentifier storageId, bool? enabled, RetentionPolicyParameters retentionPolicy, FlowLogProperties format, TrafficAnalyticsProperties flowAnalyticsConfiguration, NetworkProvisioningState? provisioningState) : base(id, name, resourceType, location, tags, serializedAdditionalRawData) + internal FlowLogData(ResourceIdentifier id, string name, ResourceType? resourceType, AzureLocation? location, IDictionary tags, IDictionary serializedAdditionalRawData, ETag? etag, ManagedServiceIdentity identity, ResourceIdentifier targetResourceId, Guid? targetResourceGuid, ResourceIdentifier storageId, bool? enabled, RetentionPolicyParameters retentionPolicy, FlowLogProperties format, TrafficAnalyticsProperties flowAnalyticsConfiguration, NetworkProvisioningState? provisioningState) : base(id, name, resourceType, location, tags, serializedAdditionalRawData) { ETag = etag; + Identity = identity; TargetResourceId = targetResourceId; TargetResourceGuid = targetResourceGuid; StorageId = storageId; @@ -54,6 +57,8 @@ internal FlowLogData(ResourceIdentifier id, string name, ResourceType? resourceT /// A unique read-only string that changes whenever the resource is updated. public ETag? ETag { get; } + /// FlowLog resource Managed Identity. + public ManagedServiceIdentity Identity { get; set; } /// ID of network security group to which flow log will be applied. public ResourceIdentifier TargetResourceId { get; set; } /// Guid of network security group to which flow log will be applied. diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogResource.cs index 39d8aa8e3fd75..d12bff7c78be9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(CancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -309,7 +309,7 @@ public virtual async Task> UpdateAsync(NetworkTagsObje /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual Response Update(NetworkTagsObject networkTagsObj /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -413,7 +413,7 @@ public virtual async Task> AddTagAsync(string key, str /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -475,7 +475,7 @@ public virtual Response AddTag(string key, string value, Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -532,7 +532,7 @@ public virtual async Task> SetTagsAsync(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -589,7 +589,7 @@ public virtual Response SetTags(IDictionary tag /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -649,7 +649,7 @@ public virtual async Task> RemoveTagAsync(string key, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FrontendIPConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FrontendIPConfigurationCollection.cs index 5d23183399754..3573bdd91977a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FrontendIPConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FrontendIPConfigurationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string frontendIPCo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToke /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string frontendIPConfigura /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string frontendIPConfigurationName, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FrontendIPConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FrontendIPConfigurationResource.cs index 987c458952cbb..fea4d4ce157e3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FrontendIPConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FrontendIPConfigurationResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubIPConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubIPConfigurationCollection.cs index 7441da5ce964f..49551cf45813d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubIPConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubIPConfigurationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string ipConfigName, Can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string ipConfigName, Cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string ipConfigName, CancellationToken canc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubIPConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubIPConfigurationResource.cs index 24e53e7e1ebdd..2f0f5ad75717a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubIPConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubIPConfigurationResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubRouteTableCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubRouteTableCollection.cs index e6163ad75b5bd..b44188695deac 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubRouteTableCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubRouteTableCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string route /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string routeTableName, Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToke /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string routeTableName, Can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string routeTableName, CancellationToken ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubRouteTableResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubRouteTableResource.cs index 15b09e292c995..7b7ad676a9857 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubRouteTableResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubRouteTableResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(WaitU /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubVirtualNetworkConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubVirtualNetworkConnectionCollection.cs index fb791b87066e8..a7a0d14719220 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubVirtualNetworkConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubVirtualNetworkConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Cre /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string connecti /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancellation /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string connectionName, Can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string connectionName, CancellationToken ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubVirtualNetworkConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubVirtualNetworkConnectionResource.cs index df077c174ed3d..7300a36d35903 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubVirtualNetworkConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubVirtualNetworkConnectionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationTok /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> Upd /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/IPAllocationCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/IPAllocationCollection.cs index 73ed922862b4c..8d98a4d9c4b92 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/IPAllocationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/IPAllocationCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsyn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitU /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string ipAllo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string ipAllocationName, strin /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string ipAllocationName, s /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string ipAllocationName, string expand = nu /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/IPAllocationResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/IPAllocationResource.cs index 4e051211e4d4e..1a829f46ff5d7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/IPAllocationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/IPAllocationResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(string expand /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -185,7 +185,7 @@ public virtual Response Get(string expand = null, Cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(NetworkTag /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -353,7 +353,7 @@ public virtual Response Update(NetworkTagsObject networkTa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -415,7 +415,7 @@ public virtual async Task> AddTagAsync(string key /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -477,7 +477,7 @@ public virtual Response AddTag(string key, string value, C /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -534,7 +534,7 @@ public virtual async Task> SetTagsAsync(IDictiona /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -591,7 +591,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -651,7 +651,7 @@ public virtual async Task> RemoveTagAsync(string /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/IPGroupCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/IPGroupCollection.cs index 634e0ed4bee71..b6902b04bcf01 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/IPGroupCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/IPGroupCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync(Wai /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string ipGroupsNam /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string ipGroupsName, string expand /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken canc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string ipGroupsName, strin /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string ipGroupsName, string expand = null, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExistsAsync(st /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/IPGroupResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/IPGroupResource.cs index 8f35d2e8891a3..7233adaa57330 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/IPGroupResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/IPGroupResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(string expand = nu /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -185,7 +185,7 @@ public virtual Response Get(string expand = null, CancellationT /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(NetworkTagsObje /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -353,7 +353,7 @@ public virtual Response Update(NetworkTagsObject networkTagsObj /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -415,7 +415,7 @@ public virtual async Task> AddTagAsync(string key, str /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -477,7 +477,7 @@ public virtual Response AddTag(string key, string value, Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -534,7 +534,7 @@ public virtual async Task> SetTagsAsync(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -591,7 +591,7 @@ public virtual Response SetTags(IDictionary tag /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -651,7 +651,7 @@ public virtual async Task> RemoveTagAsync(string key, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundNatRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundNatRuleCollection.cs index 222d87e252a0d..97557e387aaf7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundNatRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundNatRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string inbo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -254,7 +254,7 @@ public virtual Response Get(string inboundNatRuleName, s /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -284,7 +284,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual async Task> ExistsAsync(string inboundNatRuleName, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string inboundNatRuleName, string expand = /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundNatRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundNatRuleResource.cs index ae376db3d1116..611ff51dbdd9d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundNatRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundNatRuleResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(string expa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(string expand = null, Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsync(Wait /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleCollection.cs new file mode 100644 index 0000000000000..914f6d3607f36 --- /dev/null +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleCollection.cs @@ -0,0 +1,415 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.Network +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetInboundSecurityRules method from an instance of . + /// + public partial class InboundSecurityRuleCollection : ArmCollection + { + private readonly ClientDiagnostics _inboundSecurityRuleClientDiagnostics; + private readonly InboundSecurityRuleRestOperations _inboundSecurityRuleRestClient; + + /// Initializes a new instance of the class for mocking. + protected InboundSecurityRuleCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal InboundSecurityRuleCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _inboundSecurityRuleClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Network", InboundSecurityRuleResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(InboundSecurityRuleResource.ResourceType, out string inboundSecurityRuleApiVersion); + _inboundSecurityRuleRestClient = new InboundSecurityRuleRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, inboundSecurityRuleApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != NetworkVirtualApplianceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, NetworkVirtualApplianceResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates the specified Network Virtual Appliance Inbound Security Rules. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName} + /// + /// + /// Operation Id + /// InboundSecurityRule_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-01-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of security rule collection. + /// Parameters supplied to the create or update Network Virtual Appliance Inbound Security Rules operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string ruleCollectionName, InboundSecurityRuleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(ruleCollectionName, nameof(ruleCollectionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _inboundSecurityRuleClientDiagnostics.CreateScope("InboundSecurityRuleCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _inboundSecurityRuleRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleCollectionName, data, cancellationToken).ConfigureAwait(false); + var operation = new NetworkArmOperation(new InboundSecurityRuleOperationSource(Client), _inboundSecurityRuleClientDiagnostics, Pipeline, _inboundSecurityRuleRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleCollectionName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates the specified Network Virtual Appliance Inbound Security Rules. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName} + /// + /// + /// Operation Id + /// InboundSecurityRule_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-01-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of security rule collection. + /// Parameters supplied to the create or update Network Virtual Appliance Inbound Security Rules operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string ruleCollectionName, InboundSecurityRuleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(ruleCollectionName, nameof(ruleCollectionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _inboundSecurityRuleClientDiagnostics.CreateScope("InboundSecurityRuleCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _inboundSecurityRuleRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleCollectionName, data, cancellationToken); + var operation = new NetworkArmOperation(new InboundSecurityRuleOperationSource(Client), _inboundSecurityRuleClientDiagnostics, Pipeline, _inboundSecurityRuleRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleCollectionName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Retrieves the available specified Network Virtual Appliance Inbound Security Rules Collection. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName} + /// + /// + /// Operation Id + /// InboundSecurityRule_Get + /// + /// + /// Default Api Version + /// 2024-01-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of security rule collection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string ruleCollectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(ruleCollectionName, nameof(ruleCollectionName)); + + using var scope = _inboundSecurityRuleClientDiagnostics.CreateScope("InboundSecurityRuleCollection.Get"); + scope.Start(); + try + { + var response = await _inboundSecurityRuleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleCollectionName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new InboundSecurityRuleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Retrieves the available specified Network Virtual Appliance Inbound Security Rules Collection. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName} + /// + /// + /// Operation Id + /// InboundSecurityRule_Get + /// + /// + /// Default Api Version + /// 2024-01-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of security rule collection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string ruleCollectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(ruleCollectionName, nameof(ruleCollectionName)); + + using var scope = _inboundSecurityRuleClientDiagnostics.CreateScope("InboundSecurityRuleCollection.Get"); + scope.Start(); + try + { + var response = _inboundSecurityRuleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleCollectionName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new InboundSecurityRuleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName} + /// + /// + /// Operation Id + /// InboundSecurityRule_Get + /// + /// + /// Default Api Version + /// 2024-01-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of security rule collection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string ruleCollectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(ruleCollectionName, nameof(ruleCollectionName)); + + using var scope = _inboundSecurityRuleClientDiagnostics.CreateScope("InboundSecurityRuleCollection.Exists"); + scope.Start(); + try + { + var response = await _inboundSecurityRuleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleCollectionName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName} + /// + /// + /// Operation Id + /// InboundSecurityRule_Get + /// + /// + /// Default Api Version + /// 2024-01-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of security rule collection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string ruleCollectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(ruleCollectionName, nameof(ruleCollectionName)); + + using var scope = _inboundSecurityRuleClientDiagnostics.CreateScope("InboundSecurityRuleCollection.Exists"); + scope.Start(); + try + { + var response = _inboundSecurityRuleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleCollectionName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName} + /// + /// + /// Operation Id + /// InboundSecurityRule_Get + /// + /// + /// Default Api Version + /// 2024-01-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of security rule collection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string ruleCollectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(ruleCollectionName, nameof(ruleCollectionName)); + + using var scope = _inboundSecurityRuleClientDiagnostics.CreateScope("InboundSecurityRuleCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _inboundSecurityRuleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleCollectionName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new InboundSecurityRuleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName} + /// + /// + /// Operation Id + /// InboundSecurityRule_Get + /// + /// + /// Default Api Version + /// 2024-01-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of security rule collection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string ruleCollectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(ruleCollectionName, nameof(ruleCollectionName)); + + using var scope = _inboundSecurityRuleClientDiagnostics.CreateScope("InboundSecurityRuleCollection.GetIfExists"); + scope.Start(); + try + { + var response = _inboundSecurityRuleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleCollectionName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new InboundSecurityRuleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleData.Serialization.cs new file mode 100644 index 0000000000000..cabaf010d0d53 --- /dev/null +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleData.Serialization.cs @@ -0,0 +1,246 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Network.Models; + +namespace Azure.ResourceManager.Network +{ + public partial class InboundSecurityRuleData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InboundSecurityRuleData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("etag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W" && Optional.IsDefined(ResourceType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType.Value); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(RuleType)) + { + writer.WritePropertyName("ruleType"u8); + writer.WriteStringValue(RuleType.Value.ToString()); + } + if (Optional.IsCollectionDefined(Rules)) + { + writer.WritePropertyName("rules"u8); + writer.WriteStartArray(); + foreach (var item in Rules) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + InboundSecurityRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InboundSecurityRuleData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInboundSecurityRuleData(document.RootElement, options); + } + + internal static InboundSecurityRuleData DeserializeInboundSecurityRuleData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ETag? etag = default; + ResourceIdentifier id = default; + string name = default; + ResourceType? type = default; + InboundSecurityRuleType? ruleType = default; + IList rules = default; + NetworkProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("etag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = new ETag(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("ruleType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ruleType = new InboundSecurityRuleType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("rules"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(InboundSecurityRules.DeserializeInboundSecurityRules(item, options)); + } + rules = array; + continue; + } + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new NetworkProvisioningState(property0.Value.GetString()); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new InboundSecurityRuleData( + id, + name, + type, + serializedAdditionalRawData, + etag, + ruleType, + rules ?? new ChangeTrackingList(), + provisioningState); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InboundSecurityRuleData)} does not support writing '{options.Format}' format."); + } + } + + InboundSecurityRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeInboundSecurityRuleData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InboundSecurityRuleData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleData.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleData.cs new file mode 100644 index 0000000000000..f1335a2e062c3 --- /dev/null +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleData.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Network.Models; + +namespace Azure.ResourceManager.Network +{ + /// + /// A class representing the InboundSecurityRule data model. + /// NVA Inbound Security Rule resource. + /// + public partial class InboundSecurityRuleData : NetworkResourceData + { + /// Initializes a new instance of . + public InboundSecurityRuleData() + { + Rules = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Resource ID. + /// Resource name. + /// Resource type. + /// Keeps track of any properties unknown to the library. + /// A unique read-only string that changes whenever the resource is updated. + /// Rule Type. This should be either AutoExpire or Permanent. Auto Expire Rule only creates NSG rules. Permanent Rule creates NSG rule and SLB LB Rule. + /// List of allowed rules. + /// The provisioning state of the resource. + internal InboundSecurityRuleData(ResourceIdentifier id, string name, ResourceType? resourceType, IDictionary serializedAdditionalRawData, ETag? etag, InboundSecurityRuleType? ruleType, IList rules, NetworkProvisioningState? provisioningState) : base(id, name, resourceType, serializedAdditionalRawData) + { + ETag = etag; + RuleType = ruleType; + Rules = rules; + ProvisioningState = provisioningState; + } + + /// A unique read-only string that changes whenever the resource is updated. + public ETag? ETag { get; } + /// Rule Type. This should be either AutoExpire or Permanent. Auto Expire Rule only creates NSG rules. Permanent Rule creates NSG rule and SLB LB Rule. + public InboundSecurityRuleType? RuleType { get; set; } + /// List of allowed rules. + public IList Rules { get; } + /// The provisioning state of the resource. + public NetworkProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleResource.Serialization.cs new file mode 100644 index 0000000000000..ba253200d6f01 --- /dev/null +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.Network +{ + public partial class InboundSecurityRuleResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + InboundSecurityRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + InboundSecurityRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleResource.cs new file mode 100644 index 0000000000000..4a238d1e23920 --- /dev/null +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleResource.cs @@ -0,0 +1,263 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.Network +{ + /// + /// A Class representing an InboundSecurityRule along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetInboundSecurityRuleResource method. + /// Otherwise you can get one from its parent resource using the GetInboundSecurityRule method. + /// + public partial class InboundSecurityRuleResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The networkVirtualApplianceName. + /// The ruleCollectionName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string networkVirtualApplianceName, string ruleCollectionName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _inboundSecurityRuleClientDiagnostics; + private readonly InboundSecurityRuleRestOperations _inboundSecurityRuleRestClient; + private readonly InboundSecurityRuleData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Network/networkVirtualAppliances/inboundSecurityRules"; + + /// Initializes a new instance of the class for mocking. + protected InboundSecurityRuleResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal InboundSecurityRuleResource(ArmClient client, InboundSecurityRuleData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal InboundSecurityRuleResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _inboundSecurityRuleClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Network", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string inboundSecurityRuleApiVersion); + _inboundSecurityRuleRestClient = new InboundSecurityRuleRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, inboundSecurityRuleApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual InboundSecurityRuleData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Retrieves the available specified Network Virtual Appliance Inbound Security Rules Collection. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName} + /// + /// + /// Operation Id + /// InboundSecurityRule_Get + /// + /// + /// Default Api Version + /// 2024-01-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _inboundSecurityRuleClientDiagnostics.CreateScope("InboundSecurityRuleResource.Get"); + scope.Start(); + try + { + var response = await _inboundSecurityRuleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new InboundSecurityRuleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Retrieves the available specified Network Virtual Appliance Inbound Security Rules Collection. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName} + /// + /// + /// Operation Id + /// InboundSecurityRule_Get + /// + /// + /// Default Api Version + /// 2024-01-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _inboundSecurityRuleClientDiagnostics.CreateScope("InboundSecurityRuleResource.Get"); + scope.Start(); + try + { + var response = _inboundSecurityRuleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new InboundSecurityRuleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates the specified Network Virtual Appliance Inbound Security Rules. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName} + /// + /// + /// Operation Id + /// InboundSecurityRule_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-01-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Parameters supplied to the create or update Network Virtual Appliance Inbound Security Rules operation. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, InboundSecurityRuleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _inboundSecurityRuleClientDiagnostics.CreateScope("InboundSecurityRuleResource.Update"); + scope.Start(); + try + { + var response = await _inboundSecurityRuleRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new NetworkArmOperation(new InboundSecurityRuleOperationSource(Client), _inboundSecurityRuleClientDiagnostics, Pipeline, _inboundSecurityRuleRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates the specified Network Virtual Appliance Inbound Security Rules. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName} + /// + /// + /// Operation Id + /// InboundSecurityRule_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-01-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Parameters supplied to the create or update Network Virtual Appliance Inbound Security Rules operation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, InboundSecurityRuleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _inboundSecurityRuleClientDiagnostics.CreateScope("InboundSecurityRuleResource.Update"); + scope.Start(); + try + { + var response = _inboundSecurityRuleRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new NetworkArmOperation(new InboundSecurityRuleOperationSource(Client), _inboundSecurityRuleClientDiagnostics, Pipeline, _inboundSecurityRuleRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancerCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancerCollection.cs index 1d10469ec6f92..e76221c94c317 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancerCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancerCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsyn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitU /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string loadBa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string loadBalancerName, strin /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string loadBalancerName, s /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string loadBalancerName, string expand = nu /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancerResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancerResource.cs index 5c4c03c067c90..6b13e4103061f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancerResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancerResource.cs @@ -115,7 +115,7 @@ public virtual BackendAddressPoolCollection GetBackendAddressPools() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -146,7 +146,7 @@ public virtual async Task> GetBackendAddres /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual FrontendIPConfigurationCollection GetFrontendIPConfigurations() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -215,7 +215,7 @@ public virtual async Task> GetFrontend /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual InboundNatRuleCollection GetInboundNatRules() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual async Task> GetInboundNatRuleAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual LoadBalancingRuleCollection GetLoadBalancingRules() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> GetLoadBalancingR /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -393,7 +393,7 @@ public virtual OutboundRuleCollection GetOutboundRules() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -424,7 +424,7 @@ public virtual async Task> GetOutboundRuleAsync(s /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -462,7 +462,7 @@ public virtual ProbeCollection GetProbes() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -493,7 +493,7 @@ public virtual async Task> GetProbeAsync(string probeNam /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -524,7 +524,7 @@ public virtual Response GetProbe(string probeName, CancellationTo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -565,7 +565,7 @@ public virtual async Task> GetAsync(string expand /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -606,7 +606,7 @@ public virtual Response Get(string expand = null, Cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -648,7 +648,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -690,7 +690,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -732,7 +732,7 @@ public virtual async Task> UpdateAsync(NetworkTag /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -774,7 +774,7 @@ public virtual Response Update(NetworkTagsObject networkTa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -813,7 +813,7 @@ public virtual async Task> MigrateT /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -852,7 +852,7 @@ public virtual Response MigrateToIPBased(Mig /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -878,7 +878,7 @@ public virtual AsyncPageable GetLoadBalancerNetworkInt /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -904,7 +904,7 @@ public virtual Pageable GetLoadBalancerNetworkInterfac /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -966,7 +966,7 @@ public virtual async Task> AddTagAsync(string key /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1028,7 +1028,7 @@ public virtual Response AddTag(string key, string value, C /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1085,7 +1085,7 @@ public virtual async Task> SetTagsAsync(IDictiona /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1142,7 +1142,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1202,7 +1202,7 @@ public virtual async Task> RemoveTagAsync(string /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancingRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancingRuleCollection.cs index eed8205b494e1..ca8228141efcf 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancingRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancingRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string l /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string loadBalancingRuleN /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cancellation /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken canc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string loadBalancingRuleNa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string loadBalancingRuleName, CancellationT /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancingRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancingRuleResource.cs index 213d06709c596..c5b905b517481 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancingRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancingRuleResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/LocalNetworkGatewayCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/LocalNetworkGatewayCollection.cs index 2a596a825240f..fae4e49913802 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/LocalNetworkGatewayCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/LocalNetworkGatewayCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string localNetworkGate /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string localNetworkGateway /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string localNetworkGatewayName, Cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/LocalNetworkGatewayResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/LocalNetworkGatewayResource.cs index bd2f3fdbfdb14..9f98605e40969 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/LocalNetworkGatewayResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/LocalNetworkGatewayResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -309,7 +309,7 @@ public virtual async Task> UpdateAsync(Net /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual Response Update(NetworkTagsObject ne /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -413,7 +413,7 @@ public virtual async Task> AddTagAsync(str /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -475,7 +475,7 @@ public virtual Response AddTag(string key, string v /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -532,7 +532,7 @@ public virtual async Task> SetTagsAsync(ID /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -589,7 +589,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -649,7 +649,7 @@ public virtual async Task> RemoveTagAsync( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/LongRunningOperation/InboundSecurityRuleOperationSource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/LongRunningOperation/InboundSecurityRuleOperationSource.cs index f3e54674518a5..78b392c942b56 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/LongRunningOperation/InboundSecurityRuleOperationSource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/LongRunningOperation/InboundSecurityRuleOperationSource.cs @@ -9,22 +9,30 @@ using System.Threading; using System.Threading.Tasks; using Azure.Core; -using Azure.ResourceManager.Network.Models; namespace Azure.ResourceManager.Network { - internal class InboundSecurityRuleOperationSource : IOperationSource + internal class InboundSecurityRuleOperationSource : IOperationSource { - InboundSecurityRule IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + private readonly ArmClient _client; + + internal InboundSecurityRuleOperationSource(ArmClient client) + { + _client = client; + } + + InboundSecurityRuleResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) { using var document = JsonDocument.Parse(response.ContentStream); - return InboundSecurityRule.DeserializeInboundSecurityRule(document.RootElement); + var data = InboundSecurityRuleData.DeserializeInboundSecurityRuleData(document.RootElement); + return new InboundSecurityRuleResource(_client, data); } - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - return InboundSecurityRule.DeserializeInboundSecurityRule(document.RootElement); + var data = InboundSecurityRuleData.DeserializeInboundSecurityRuleData(document.RootElement); + return new InboundSecurityRuleResource(_client, data); } } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/LongRunningOperation/NetworkVirtualApplianceInstanceIdsOperationSource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/LongRunningOperation/NetworkVirtualApplianceInstanceIdsOperationSource.cs new file mode 100644 index 0000000000000..29e019444b62c --- /dev/null +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/LongRunningOperation/NetworkVirtualApplianceInstanceIdsOperationSource.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.Network.Models; + +namespace Azure.ResourceManager.Network +{ + internal class NetworkVirtualApplianceInstanceIdsOperationSource : IOperationSource + { + NetworkVirtualApplianceInstanceIds IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return NetworkVirtualApplianceInstanceIds.DeserializeNetworkVirtualApplianceInstanceIds(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return NetworkVirtualApplianceInstanceIds.DeserializeNetworkVirtualApplianceInstanceIds(document.RootElement); + } + } +} diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ManagementGroupNetworkManagerConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ManagementGroupNetworkManagerConnectionCollection.cs index 4fd5e0513a6a2..565297f7d88c2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ManagementGroupNetworkManagerConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ManagementGroupNetworkManagerConnectionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation Cre /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(str /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -289,7 +289,7 @@ public virtual AsyncPageable Ge /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual Pageable GetAll( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual async Task> ExistsAsync(string networkManagerConne /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -407,7 +407,7 @@ public virtual Response Exists(string networkManagerConnectionName, Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -452,7 +452,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ManagementGroupNetworkManagerConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ManagementGroupNetworkManagerConnectionResource.cs index c48cc465f7e76..955fb9c16e905 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ManagementGroupNetworkManagerConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ManagementGroupNetworkManagerConnectionResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(Can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -268,7 +268,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostSkuName.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostSkuName.cs index 423078e51d93c..78fca8e8dd939 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostSkuName.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/BastionHostSkuName.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Network.Models { - /// The name of this Bastion Host. + /// The name of the sku of this Bastion Host. public readonly partial struct BastionHostSkuName : IEquatable { private readonly string _value; @@ -25,6 +25,7 @@ public BastionHostSkuName(string value) private const string BasicValue = "Basic"; private const string StandardValue = "Standard"; private const string DeveloperValue = "Developer"; + private const string PremiumValue = "Premium"; /// Basic. public static BastionHostSkuName Basic { get; } = new BastionHostSkuName(BasicValue); @@ -32,6 +33,8 @@ public BastionHostSkuName(string value) public static BastionHostSkuName Standard { get; } = new BastionHostSkuName(StandardValue); /// Developer. public static BastionHostSkuName Developer { get; } = new BastionHostSkuName(DeveloperValue); + /// Premium. + public static BastionHostSkuName Premium { get; } = new BastionHostSkuName(PremiumValue); /// Determines if two values are the same. public static bool operator ==(BastionHostSkuName left, BastionHostSkuName right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPacketCaptureContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPacketCaptureContent.Serialization.cs deleted file mode 100644 index 4ff00b078de9e..0000000000000 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPacketCaptureContent.Serialization.cs +++ /dev/null @@ -1,271 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Network.Models -{ - public partial class FirewallPacketCaptureContent : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(FirewallPacketCaptureContent)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(DurationInSeconds)) - { - writer.WritePropertyName("durationInSeconds"u8); - writer.WriteNumberValue(DurationInSeconds.Value); - } - if (Optional.IsDefined(NumberOfPacketsToCapture)) - { - writer.WritePropertyName("numberOfPacketsToCapture"u8); - writer.WriteNumberValue(NumberOfPacketsToCapture.Value); - } - if (Optional.IsDefined(SasUri)) - { - writer.WritePropertyName("sasUrl"u8); - writer.WriteStringValue(SasUri.AbsoluteUri); - } - if (Optional.IsDefined(FileName)) - { - writer.WritePropertyName("fileName"u8); - writer.WriteStringValue(FileName); - } - if (Optional.IsDefined(Protocol)) - { - writer.WritePropertyName("protocol"u8); - writer.WriteStringValue(Protocol.Value.ToString()); - } - if (Optional.IsCollectionDefined(Flags)) - { - writer.WritePropertyName("flags"u8); - writer.WriteStartArray(); - foreach (var item in Flags) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(Filters)) - { - writer.WritePropertyName("filters"u8); - writer.WriteStartArray(); - foreach (var item in Filters) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - FirewallPacketCaptureContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(FirewallPacketCaptureContent)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeFirewallPacketCaptureContent(document.RootElement, options); - } - - internal static FirewallPacketCaptureContent DeserializeFirewallPacketCaptureContent(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ResourceIdentifier id = default; - int? durationInSeconds = default; - int? numberOfPacketsToCapture = default; - Uri sasUrl = default; - string fileName = default; - AzureFirewallNetworkRuleProtocol? protocol = default; - IList flags = default; - IList filters = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("durationInSeconds"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - durationInSeconds = property0.Value.GetInt32(); - continue; - } - if (property0.NameEquals("numberOfPacketsToCapture"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - numberOfPacketsToCapture = property0.Value.GetInt32(); - continue; - } - if (property0.NameEquals("sasUrl"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sasUrl = new Uri(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("fileName"u8)) - { - fileName = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("protocol"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - protocol = new AzureFirewallNetworkRuleProtocol(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("flags"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(AzureFirewallPacketCaptureFlags.DeserializeAzureFirewallPacketCaptureFlags(item, options)); - } - flags = array; - continue; - } - if (property0.NameEquals("filters"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(AzureFirewallPacketCaptureRule.DeserializeAzureFirewallPacketCaptureRule(item, options)); - } - filters = array; - continue; - } - } - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new FirewallPacketCaptureContent( - id, - serializedAdditionalRawData, - durationInSeconds, - numberOfPacketsToCapture, - sasUrl, - fileName, - protocol, - flags ?? new ChangeTrackingList(), - filters ?? new ChangeTrackingList()); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(FirewallPacketCaptureContent)} does not support writing '{options.Format}' format."); - } - } - - FirewallPacketCaptureContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeFirewallPacketCaptureContent(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(FirewallPacketCaptureContent)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPacketCaptureRequestContent.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPacketCaptureRequestContent.Serialization.cs new file mode 100644 index 0000000000000..5b3780fb76a95 --- /dev/null +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPacketCaptureRequestContent.Serialization.cs @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Network.Models +{ + public partial class FirewallPacketCaptureRequestContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FirewallPacketCaptureRequestContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(DurationInSeconds)) + { + writer.WritePropertyName("durationInSeconds"u8); + writer.WriteNumberValue(DurationInSeconds.Value); + } + if (Optional.IsDefined(NumberOfPacketsToCapture)) + { + writer.WritePropertyName("numberOfPacketsToCapture"u8); + writer.WriteNumberValue(NumberOfPacketsToCapture.Value); + } + if (Optional.IsDefined(SasUri)) + { + writer.WritePropertyName("sasUrl"u8); + writer.WriteStringValue(SasUri.AbsoluteUri); + } + if (Optional.IsDefined(FileName)) + { + writer.WritePropertyName("fileName"u8); + writer.WriteStringValue(FileName); + } + if (Optional.IsDefined(Protocol)) + { + writer.WritePropertyName("protocol"u8); + writer.WriteStringValue(Protocol.Value.ToString()); + } + if (Optional.IsCollectionDefined(Flags)) + { + writer.WritePropertyName("flags"u8); + writer.WriteStartArray(); + foreach (var item in Flags) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Filters)) + { + writer.WritePropertyName("filters"u8); + writer.WriteStartArray(); + foreach (var item in Filters) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + FirewallPacketCaptureRequestContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FirewallPacketCaptureRequestContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFirewallPacketCaptureRequestContent(document.RootElement, options); + } + + internal static FirewallPacketCaptureRequestContent DeserializeFirewallPacketCaptureRequestContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? durationInSeconds = default; + int? numberOfPacketsToCapture = default; + Uri sasUrl = default; + string fileName = default; + AzureFirewallNetworkRuleProtocol? protocol = default; + IList flags = default; + IList filters = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("durationInSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + durationInSeconds = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("numberOfPacketsToCapture"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + numberOfPacketsToCapture = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("sasUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sasUrl = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("fileName"u8)) + { + fileName = property.Value.GetString(); + continue; + } + if (property.NameEquals("protocol"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + protocol = new AzureFirewallNetworkRuleProtocol(property.Value.GetString()); + continue; + } + if (property.NameEquals("flags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AzureFirewallPacketCaptureFlags.DeserializeAzureFirewallPacketCaptureFlags(item, options)); + } + flags = array; + continue; + } + if (property.NameEquals("filters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AzureFirewallPacketCaptureRule.DeserializeAzureFirewallPacketCaptureRule(item, options)); + } + filters = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FirewallPacketCaptureRequestContent( + durationInSeconds, + numberOfPacketsToCapture, + sasUrl, + fileName, + protocol, + flags ?? new ChangeTrackingList(), + filters ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FirewallPacketCaptureRequestContent)} does not support writing '{options.Format}' format."); + } + } + + FirewallPacketCaptureRequestContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeFirewallPacketCaptureRequestContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FirewallPacketCaptureRequestContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPacketCaptureRequestContent.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPacketCaptureRequestContent.cs new file mode 100644 index 0000000000000..900342a801b77 --- /dev/null +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FirewallPacketCaptureRequestContent.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Network.Models +{ + /// Azure Firewall Packet Capture Parameters. + public partial class FirewallPacketCaptureRequestContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FirewallPacketCaptureRequestContent() + { + Flags = new ChangeTrackingList(); + Filters = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Duration of packet capture in seconds. + /// Number of packets to be captured. + /// Upload capture location. + /// Name of file to be uploaded to sasURL. + /// The protocol of packets to capture. + /// The tcp-flag type to be captured. Used with protocol TCP. + /// Rules to filter packet captures. + /// Keeps track of any properties unknown to the library. + internal FirewallPacketCaptureRequestContent(int? durationInSeconds, int? numberOfPacketsToCapture, Uri sasUri, string fileName, AzureFirewallNetworkRuleProtocol? protocol, IList flags, IList filters, IDictionary serializedAdditionalRawData) + { + DurationInSeconds = durationInSeconds; + NumberOfPacketsToCapture = numberOfPacketsToCapture; + SasUri = sasUri; + FileName = fileName; + Protocol = protocol; + Flags = flags; + Filters = filters; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Duration of packet capture in seconds. + public int? DurationInSeconds { get; set; } + /// Number of packets to be captured. + public int? NumberOfPacketsToCapture { get; set; } + /// Upload capture location. + public Uri SasUri { get; set; } + /// Name of file to be uploaded to sasURL. + public string FileName { get; set; } + /// The protocol of packets to capture. + public AzureFirewallNetworkRuleProtocol? Protocol { get; set; } + /// The tcp-flag type to be captured. Used with protocol TCP. + public IList Flags { get; } + /// Rules to filter packet captures. + public IList Filters { get; } + } +} diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogInformation.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogInformation.Serialization.cs index d5fcaefa6e415..7d19bec1ed79f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogInformation.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogInformation.Serialization.cs @@ -10,6 +10,7 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; +using Azure.ResourceManager.Models; namespace Azure.ResourceManager.Network.Models { @@ -33,6 +34,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("flowAnalyticsConfiguration"u8); writer.WriteObjectValue(FlowAnalyticsConfiguration, options); } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + JsonSerializer.Serialize(writer, Identity); + } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); writer.WritePropertyName("storageId"u8); @@ -90,6 +96,7 @@ internal static FlowLogInformation DeserializeFlowLogInformation(JsonElement ele } ResourceIdentifier targetResourceId = default; TrafficAnalyticsProperties flowAnalyticsConfiguration = default; + ManagedServiceIdentity identity = default; ResourceIdentifier storageId = default; bool enabled = default; RetentionPolicyParameters retentionPolicy = default; @@ -112,6 +119,15 @@ internal static FlowLogInformation DeserializeFlowLogInformation(JsonElement ele flowAnalyticsConfiguration = TrafficAnalyticsProperties.DeserializeTrafficAnalyticsProperties(property.Value, options); continue; } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -161,6 +177,7 @@ internal static FlowLogInformation DeserializeFlowLogInformation(JsonElement ele return new FlowLogInformation( targetResourceId, flowAnalyticsConfiguration, + identity, storageId, enabled, retentionPolicy, diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogInformation.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogInformation.cs index 4033faa305a85..fe9af490c7129 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogInformation.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/FlowLogInformation.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using Azure.Core; +using Azure.ResourceManager.Models; namespace Azure.ResourceManager.Network.Models { @@ -64,15 +65,17 @@ public FlowLogInformation(ResourceIdentifier targetResourceId, ResourceIdentifie /// Initializes a new instance of . /// The ID of the resource to configure for flow log and traffic analytics (optional) . /// Parameters that define the configuration of traffic analytics. + /// FlowLog resource Managed Identity. /// ID of the storage account which is used to store the flow log. /// Flag to enable/disable flow logging. /// Parameters that define the retention policy for flow log. /// Parameters that define the flow log format. /// Keeps track of any properties unknown to the library. - internal FlowLogInformation(ResourceIdentifier targetResourceId, TrafficAnalyticsProperties flowAnalyticsConfiguration, ResourceIdentifier storageId, bool enabled, RetentionPolicyParameters retentionPolicy, FlowLogProperties format, IDictionary serializedAdditionalRawData) + internal FlowLogInformation(ResourceIdentifier targetResourceId, TrafficAnalyticsProperties flowAnalyticsConfiguration, ManagedServiceIdentity identity, ResourceIdentifier storageId, bool enabled, RetentionPolicyParameters retentionPolicy, FlowLogProperties format, IDictionary serializedAdditionalRawData) { TargetResourceId = targetResourceId; FlowAnalyticsConfiguration = flowAnalyticsConfiguration; + Identity = identity; StorageId = storageId; Enabled = enabled; RetentionPolicy = retentionPolicy; @@ -101,6 +104,8 @@ public TrafficAnalyticsConfigurationProperties TrafficAnalyticsConfiguration } } + /// FlowLog resource Managed Identity. + public ManagedServiceIdentity Identity { get; set; } /// ID of the storage account which is used to store the flow log. public ResourceIdentifier StorageId { get; set; } /// Flag to enable/disable flow logging. diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSku.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSku.cs index 6ab1d11f5b278..6152628ac3fa0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSku.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/NetworkSku.cs @@ -51,7 +51,7 @@ public NetworkSku() } /// Initializes a new instance of . - /// The name of this Bastion Host. + /// The name of the sku of this Bastion Host. /// Keeps track of any properties unknown to the library. internal NetworkSku(BastionHostSkuName? name, IDictionary serializedAdditionalRawData) { @@ -59,7 +59,7 @@ internal NetworkSku(BastionHostSkuName? name, IDictionary se _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The name of this Bastion Host. + /// The name of the sku of this Bastion Host. public BastionHostSkuName? Name { get; set; } } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ProbeNoHealthyBackendsBehavior.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ProbeNoHealthyBackendsBehavior.cs new file mode 100644 index 0000000000000..a58463c8de698 --- /dev/null +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ProbeNoHealthyBackendsBehavior.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.Network.Models +{ + /// Determines how new connections are handled by the load balancer when all backend instances are probed down. + public readonly partial struct ProbeNoHealthyBackendsBehavior : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ProbeNoHealthyBackendsBehavior(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AllProbedDownValue = "AllProbedDown"; + private const string AllProbedUpValue = "AllProbedUp"; + + /// No new flows will be sent to the backend pool. + public static ProbeNoHealthyBackendsBehavior AllProbedDown { get; } = new ProbeNoHealthyBackendsBehavior(AllProbedDownValue); + /// When all backend instances are probed down, incoming packets will be sent to all instances. + public static ProbeNoHealthyBackendsBehavior AllProbedUp { get; } = new ProbeNoHealthyBackendsBehavior(AllProbedUpValue); + /// Determines if two values are the same. + public static bool operator ==(ProbeNoHealthyBackendsBehavior left, ProbeNoHealthyBackendsBehavior right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ProbeNoHealthyBackendsBehavior left, ProbeNoHealthyBackendsBehavior right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ProbeNoHealthyBackendsBehavior(string value) => new ProbeNoHealthyBackendsBehavior(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ProbeNoHealthyBackendsBehavior other && Equals(other); + /// + public bool Equals(ProbeNoHealthyBackendsBehavior other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointProperties.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointProperties.Serialization.cs index 606a3733a871d..bbeba62f0b5ea 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointProperties.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointProperties.Serialization.cs @@ -10,6 +10,7 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; +using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.Network.Models { @@ -31,6 +32,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WritePropertyName("service"u8); writer.WriteStringValue(Service); } + if (Optional.IsDefined(NetworkIdentifier)) + { + writer.WritePropertyName("networkIdentifier"u8); + JsonSerializer.Serialize(writer, NetworkIdentifier); + } if (Optional.IsCollectionDefined(Locations)) { writer.WritePropertyName("locations"u8); @@ -85,6 +91,7 @@ internal static ServiceEndpointProperties DeserializeServiceEndpointProperties(J return null; } string service = default; + WritableSubResource networkIdentifier = default; IList locations = default; NetworkProvisioningState? provisioningState = default; IDictionary serializedAdditionalRawData = default; @@ -96,6 +103,15 @@ internal static ServiceEndpointProperties DeserializeServiceEndpointProperties(J service = property.Value.GetString(); continue; } + if (property.NameEquals("networkIdentifier"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkIdentifier = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } if (property.NameEquals("locations"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -125,7 +141,7 @@ internal static ServiceEndpointProperties DeserializeServiceEndpointProperties(J } } serializedAdditionalRawData = rawDataDictionary; - return new ServiceEndpointProperties(service, locations ?? new ChangeTrackingList(), provisioningState, serializedAdditionalRawData); + return new ServiceEndpointProperties(service, networkIdentifier, locations ?? new ChangeTrackingList(), provisioningState, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointProperties.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointProperties.cs index 14a099541805a..f1a0fc72d1b31 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointProperties.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/Models/ServiceEndpointProperties.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using Azure.Core; +using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.Network.Models { @@ -54,12 +55,14 @@ public ServiceEndpointProperties() /// Initializes a new instance of . /// The type of the endpoint service. + /// SubResource as network identifier. /// A list of locations. /// The provisioning state of the service endpoint resource. /// Keeps track of any properties unknown to the library. - internal ServiceEndpointProperties(string service, IList locations, NetworkProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + internal ServiceEndpointProperties(string service, WritableSubResource networkIdentifier, IList locations, NetworkProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) { Service = service; + NetworkIdentifier = networkIdentifier; Locations = locations; ProvisioningState = provisioningState; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -67,6 +70,20 @@ internal ServiceEndpointProperties(string service, IList location /// The type of the endpoint service. public string Service { get; set; } + /// SubResource as network identifier. + internal WritableSubResource NetworkIdentifier { get; set; } + /// Gets or sets Id. + public ResourceIdentifier NetworkIdentifierId + { + get => NetworkIdentifier is null ? default : NetworkIdentifier.Id; + set + { + if (NetworkIdentifier is null) + NetworkIdentifier = new WritableSubResource(); + NetworkIdentifier.Id = value; + } + } + /// A list of locations. public IList Locations { get; } /// The provisioning state of the service endpoint resource. diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NatGatewayCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NatGatewayCollection.cs index 9e165cdf7d26a..24e4adb6830d6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NatGatewayCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NatGatewayCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnt /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string natGatew /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string natGatewayName, string ex /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken c /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string natGatewayName, str /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string natGatewayName, string expand = null /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExistsAsync /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NatGatewayResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NatGatewayResource.cs index aa213779282ec..e17e6722df6ee 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NatGatewayResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NatGatewayResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(string expand = /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -185,7 +185,7 @@ public virtual Response Get(string expand = null, Cancellati /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(NetworkTagsO /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -353,7 +353,7 @@ public virtual Response Update(NetworkTagsObject networkTags /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -415,7 +415,7 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -477,7 +477,7 @@ public virtual Response AddTag(string key, string value, Can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -534,7 +534,7 @@ public virtual async Task> SetTagsAsync(IDictionary /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -591,7 +591,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -651,7 +651,7 @@ public virtual async Task> RemoveTagAsync(string ke /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupCollection.cs index 854e2e98ae05a..312a90fd2cc17 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAsyn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitU /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(string networ /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string networkGroupName, Cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -290,7 +290,7 @@ public virtual AsyncPageable GetAllAsync(int? top = null, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -322,7 +322,7 @@ public virtual Pageable GetAll(int? top = null, string ski /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -365,7 +365,7 @@ public virtual async Task> ExistsAsync(string networkGroupName, C /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -408,7 +408,7 @@ public virtual Response Exists(string networkGroupName, CancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -453,7 +453,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupResource.cs index b40e24a9d3d4b..bdd9482b016b5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupResource.cs @@ -108,7 +108,7 @@ public virtual NetworkGroupStaticMemberCollection GetNetworkGroupStaticMembers() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> GetNetwork /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response GetNetworkGroupStaticM /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetAsync(CancellationT /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response Get(CancellationToken cancellation /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -293,7 +293,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? f /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -336,7 +336,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? force = null, Canc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -385,7 +385,7 @@ public virtual async Task> UpdateAsync(WaitUn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupStaticMemberCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupStaticMemberCollection.cs index 41dcb80aed79f..ec7bcf48ca977 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupStaticMemberCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupStaticMemberCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> Create /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(Wai /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(s /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string staticMembe /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsync(int? /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(int? top = null /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string staticMemberName, C /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string staticMemberName, CancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupStaticMemberResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupStaticMemberResource.cs index 71fb67396ce68..b2b798564e4c6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupStaticMemberResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupStaticMemberResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task> Update /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceCollection.cs index fd6b9e8551025..c920deccb559a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdate /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string ne /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string networkInterfaceNam /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(CancellationT /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string networkInterfaceNam /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string networkInterfaceName, string expand /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceIPConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceIPConfigurationCollection.cs index a4c4ab5e5a075..d8062725319ce 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceIPConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceIPConfigurationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string ipCo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsyn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(Cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string ipConfigurationName /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string ipConfigurationName, CancellationTok /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceIPConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceIPConfigurationResource.cs index 44d9342ae1456..bb874e873a40c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceIPConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceIPConfigurationResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceResource.cs index df248351a21b4..76844e2ed0e2d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceResource.cs @@ -115,7 +115,7 @@ public virtual NetworkInterfaceIPConfigurationCollection GetNetworkInterfaceIPCo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -146,7 +146,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual NetworkInterfaceTapConfigurationCollection GetNetworkInterfaceTap /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -215,7 +215,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -246,7 +246,7 @@ public virtual Response GetNetworkInte /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -287,7 +287,7 @@ public virtual async Task> GetAsync(string ex /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -328,7 +328,7 @@ public virtual Response Get(string expand = null, Canc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -370,7 +370,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -412,7 +412,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -454,7 +454,7 @@ public virtual async Task> UpdateAsync(Networ /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -496,7 +496,7 @@ public virtual Response Update(NetworkTagsObject netwo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -538,7 +538,7 @@ public virtual async Task> GetEffectiveRo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -580,7 +580,7 @@ public virtual ArmOperation GetEffectiveRouteTable(Wai /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -622,7 +622,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -664,7 +664,7 @@ public virtual ArmOperation GetEffectiv /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -690,7 +690,7 @@ public virtual AsyncPageable GetNetworkInterfaceLoadBalanc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -716,7 +716,7 @@ public virtual Pageable GetNetworkInterfaceLoadBalancers(C /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -778,7 +778,7 @@ public virtual async Task> AddTagAsync(string /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -840,7 +840,7 @@ public virtual Response AddTag(string key, string valu /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -897,7 +897,7 @@ public virtual async Task> SetTagsAsync(IDict /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -954,7 +954,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1014,7 +1014,7 @@ public virtual async Task> RemoveTagAsync(str /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceTapConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceTapConfigurationCollection.cs index 4901b25245ca9..c1d0133c1a059 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceTapConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceTapConfigurationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string tap /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string tapConfigurationNam /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string tapConfigurationName, CancellationTo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceTapConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceTapConfigurationResource.cs index bf599555f1719..563fe56d199cf 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceTapConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceTapConfigurationResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cancellati /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerCollection.cs index 7bb4191256313..2c9b3b767e23b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(string netw /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string networkManagerName, C /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -289,7 +289,7 @@ public virtual AsyncPageable GetAllAsync(int? top = null /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual Pageable GetAll(int? top = null, string s /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual async Task> ExistsAsync(string networkManagerName, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -407,7 +407,7 @@ public virtual Response Exists(string networkManagerName, CancellationToke /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -452,7 +452,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerResource.cs index b76f65c4fa6a4..e5cb2af9ccbb7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerResource.cs @@ -124,7 +124,7 @@ public virtual ConnectivityConfigurationCollection GetConnectivityConfigurations /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -155,7 +155,7 @@ public virtual async Task> GetConnec /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -193,7 +193,7 @@ public virtual NetworkGroupCollection GetNetworkGroups() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task> GetNetworkGroupAsync(s /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -262,7 +262,7 @@ public virtual ScopeConnectionCollection GetScopeConnections() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -293,7 +293,7 @@ public virtual async Task> GetScopeConnectionA /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -331,7 +331,7 @@ public virtual SecurityAdminConfigurationCollection GetSecurityAdminConfiguratio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -362,7 +362,7 @@ public virtual async Task> GetSecur /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -393,7 +393,7 @@ public virtual Response GetSecurityAdminConf /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -433,7 +433,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -473,7 +473,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -516,7 +516,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? f /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -559,7 +559,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? force = null, Canc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -601,7 +601,7 @@ public virtual async Task> UpdateAsync(NetworkM /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -643,7 +643,7 @@ public virtual Response Update(NetworkManagerPatch patch /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -677,7 +677,7 @@ public virtual AsyncPageable GetActiveConnectiv /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -711,7 +711,7 @@ public virtual Pageable GetActiveConnectivityCo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -745,7 +745,7 @@ public virtual AsyncPageable GetActiveSecurityAdmin /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -779,7 +779,7 @@ public virtual Pageable GetActiveSecurityAdminRules /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -821,7 +821,7 @@ public virtual async Task> PostNetworkManager /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -863,7 +863,7 @@ public virtual ArmOperation PostNetworkManagerCommit(WaitU /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -893,7 +893,7 @@ public virtual AsyncPageable GetNetworkManagerDe /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -923,7 +923,7 @@ public virtual Pageable GetNetworkManagerDeploym /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -985,7 +985,7 @@ public virtual async Task> AddTagAsync(string k /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1047,7 +1047,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1104,7 +1104,7 @@ public virtual async Task> SetTagsAsync(IDictio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1161,7 +1161,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1221,7 +1221,7 @@ public virtual async Task> RemoveTagAsync(strin /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkPrivateEndpointConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkPrivateEndpointConnectionCollection.cs index c5749292e6055..3e48b81bdd726 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkPrivateEndpointConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkPrivateEndpointConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string peC /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual Pageable GetAll(Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -362,7 +362,7 @@ public virtual async Task> ExistsAsync(string peConnectionName, s /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string peConnectionName, string expand = nu /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -452,7 +452,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkPrivateEndpointConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkPrivateEndpointConnectionResource.cs index 21f362e6bcd03..d2c2850e9b55d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkPrivateEndpointConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkPrivateEndpointConnectionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(string exp /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkProfileCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkProfileCollection.cs index 70143183c079e..ac92067cac528 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkProfileCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkProfileCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(string netw /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -259,7 +259,7 @@ public virtual Response Get(string networkProfileName, s /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -289,7 +289,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string networkProfileName, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -407,7 +407,7 @@ public virtual Response Exists(string networkProfileName, string expand = /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -453,7 +453,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkProfileResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkProfileResource.cs index d01032ccd0400..4d6b58535168c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkProfileResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkProfileResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(string expa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -185,7 +185,7 @@ public virtual Response Get(string expand = null, Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(NetworkT /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -353,7 +353,7 @@ public virtual Response Update(NetworkTagsObject network /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -415,7 +415,7 @@ public virtual async Task> AddTagAsync(string k /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -477,7 +477,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -534,7 +534,7 @@ public virtual async Task> SetTagsAsync(IDictio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -591,7 +591,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -651,7 +651,7 @@ public virtual async Task> RemoveTagAsync(strin /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityGroupCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityGroupCollection.cs index 2cb4a4d1a9a5d..999bf73e8e2f9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityGroupCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityGroupCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string networkSecurity /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(Cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken c /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string networkSecurityGrou /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string networkSecurityGroupName, string exp /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityGroupResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityGroupResource.cs index dc7ad2bc69610..899bb1d44d596 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityGroupResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityGroupResource.cs @@ -110,7 +110,7 @@ public virtual SecurityRuleCollection GetSecurityRules() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetSecurityRuleAsync(s /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -179,7 +179,7 @@ public virtual DefaultSecurityRuleCollection GetDefaultSecurityRules() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetDefaultSecur /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response GetDefaultSecurityRule(stri /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -323,7 +323,7 @@ public virtual Response Get(string expand = null, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -365,7 +365,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -407,7 +407,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> UpdateAsync(Ne /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -491,7 +491,7 @@ public virtual Response Update(NetworkTagsObject n /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -553,7 +553,7 @@ public virtual async Task> AddTagAsync(st /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -615,7 +615,7 @@ public virtual Response AddTag(string key, string /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -672,7 +672,7 @@ public virtual async Task> SetTagsAsync(I /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -729,7 +729,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -789,7 +789,7 @@ public virtual async Task> RemoveTagAsync /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceCollection.cs index 427913c798e59..e97cdcf852a8a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string networkVirtu /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToke /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string networkVirtualAppli /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string networkVirtualApplianceName, string /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceConnectionCollection.cs index a93d000f4e539..c31c2626e2d6e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrU /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string co /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string connectionName, Can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string connectionName, CancellationToken ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceConnectionResource.cs index b13160b7fff0a..bb27bd743dca4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceConnectionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceResource.cs index f70ac90e6de8b..05d8ea60a74b1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceResource.cs @@ -37,8 +37,6 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ClientDiagnostics _networkVirtualApplianceClientDiagnostics; private readonly NetworkVirtualAppliancesRestOperations _networkVirtualApplianceRestClient; - private readonly ClientDiagnostics _inboundSecurityRuleClientDiagnostics; - private readonly InboundSecurityRuleRestOperations _inboundSecurityRuleRestClient; private readonly NetworkVirtualApplianceData _data; /// Gets the resource type for the operations. @@ -66,8 +64,6 @@ internal NetworkVirtualApplianceResource(ArmClient client, ResourceIdentifier id _networkVirtualApplianceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Network", ResourceType.Namespace, Diagnostics); TryGetApiVersion(ResourceType, out string networkVirtualApplianceApiVersion); _networkVirtualApplianceRestClient = new NetworkVirtualAppliancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkVirtualApplianceApiVersion); - _inboundSecurityRuleClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Network", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _inboundSecurityRuleRestClient = new InboundSecurityRuleRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); #if DEBUG ValidateResourceId(Id); #endif @@ -114,7 +110,7 @@ public virtual VirtualApplianceSiteCollection GetVirtualApplianceSites() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -145,7 +141,7 @@ public virtual async Task> GetVirtualAppl /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,6 +159,75 @@ public virtual Response GetVirtualApplianceSite(st return GetVirtualApplianceSites().Get(siteName, cancellationToken); } + /// Gets a collection of InboundSecurityRuleResources in the NetworkVirtualAppliance. + /// An object representing collection of InboundSecurityRuleResources and their operations over a InboundSecurityRuleResource. + public virtual InboundSecurityRuleCollection GetInboundSecurityRules() + { + return GetCachedClient(client => new InboundSecurityRuleCollection(client, Id)); + } + + /// + /// Retrieves the available specified Network Virtual Appliance Inbound Security Rules Collection. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName} + /// + /// + /// Operation Id + /// InboundSecurityRule_Get + /// + /// + /// Default Api Version + /// 2024-01-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of security rule collection. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetInboundSecurityRuleAsync(string ruleCollectionName, CancellationToken cancellationToken = default) + { + return await GetInboundSecurityRules().GetAsync(ruleCollectionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Retrieves the available specified Network Virtual Appliance Inbound Security Rules Collection. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName} + /// + /// + /// Operation Id + /// InboundSecurityRule_Get + /// + /// + /// Default Api Version + /// 2024-01-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of security rule collection. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetInboundSecurityRule(string ruleCollectionName, CancellationToken cancellationToken = default) + { + return GetInboundSecurityRules().Get(ruleCollectionName, cancellationToken); + } + /// Gets a collection of NetworkVirtualApplianceConnectionResources in the NetworkVirtualAppliance. /// An object representing collection of NetworkVirtualApplianceConnectionResources and their operations over a NetworkVirtualApplianceConnectionResource. public virtual NetworkVirtualApplianceConnectionCollection GetNetworkVirtualApplianceConnections() @@ -183,7 +248,7 @@ public virtual NetworkVirtualApplianceConnectionCollection GetNetworkVirtualAppl /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -214,7 +279,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -245,7 +310,7 @@ public virtual Response GetNetworkVir /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -286,7 +351,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -327,7 +392,7 @@ public virtual Response Get(string expand = nul /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -369,7 +434,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -411,7 +476,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -453,7 +518,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -495,7 +560,7 @@ public virtual Response Update(NetworkTagsObjec /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -503,16 +568,20 @@ public virtual Response Update(NetworkTagsObjec /// /// /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// Specifies a list of virtual machine instance IDs from the Network Virtual Appliance VM instances. /// The cancellation token to use. - public virtual async Task RestartAsync(NetworkVirtualApplianceInstanceIds networkVirtualApplianceInstanceIds = null, CancellationToken cancellationToken = default) + public virtual async Task> RestartAsync(WaitUntil waitUntil, NetworkVirtualApplianceInstanceIds networkVirtualApplianceInstanceIds = null, CancellationToken cancellationToken = default) { using var scope = _networkVirtualApplianceClientDiagnostics.CreateScope("NetworkVirtualApplianceResource.Restart"); scope.Start(); try { var response = await _networkVirtualApplianceRestClient.RestartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, networkVirtualApplianceInstanceIds, cancellationToken).ConfigureAwait(false); - return response; + var operation = new NetworkArmOperation(new NetworkVirtualApplianceInstanceIdsOperationSource(), _networkVirtualApplianceClientDiagnostics, Pipeline, _networkVirtualApplianceRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, networkVirtualApplianceInstanceIds).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; } catch (Exception e) { @@ -534,7 +603,7 @@ public virtual async Task RestartAsync(NetworkVirtualApplianceInstance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -542,103 +611,17 @@ public virtual async Task RestartAsync(NetworkVirtualApplianceInstance /// /// /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// Specifies a list of virtual machine instance IDs from the Network Virtual Appliance VM instances. /// The cancellation token to use. - public virtual Response Restart(NetworkVirtualApplianceInstanceIds networkVirtualApplianceInstanceIds = null, CancellationToken cancellationToken = default) + public virtual ArmOperation Restart(WaitUntil waitUntil, NetworkVirtualApplianceInstanceIds networkVirtualApplianceInstanceIds = null, CancellationToken cancellationToken = default) { using var scope = _networkVirtualApplianceClientDiagnostics.CreateScope("NetworkVirtualApplianceResource.Restart"); scope.Start(); try { var response = _networkVirtualApplianceRestClient.Restart(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, networkVirtualApplianceInstanceIds, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates the specified Network Virtual Appliance Inbound Security Rules. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName} - /// - /// - /// Operation Id - /// InboundSecurityRule_CreateOrUpdate - /// - /// - /// Default Api Version - /// 2023-11-01 - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of security rule collection. - /// Parameters supplied to the create or update Network Virtual Appliance Inbound Security Rules operation. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateInboundSecurityRuleAsync(WaitUntil waitUntil, string ruleCollectionName, InboundSecurityRule inboundSecurityRule, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(ruleCollectionName, nameof(ruleCollectionName)); - Argument.AssertNotNull(inboundSecurityRule, nameof(inboundSecurityRule)); - - using var scope = _inboundSecurityRuleClientDiagnostics.CreateScope("NetworkVirtualApplianceResource.CreateOrUpdateInboundSecurityRule"); - scope.Start(); - try - { - var response = await _inboundSecurityRuleRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleCollectionName, inboundSecurityRule, cancellationToken).ConfigureAwait(false); - var operation = new NetworkArmOperation(new InboundSecurityRuleOperationSource(), _inboundSecurityRuleClientDiagnostics, Pipeline, _inboundSecurityRuleRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleCollectionName, inboundSecurityRule).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates the specified Network Virtual Appliance Inbound Security Rules. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName} - /// - /// - /// Operation Id - /// InboundSecurityRule_CreateOrUpdate - /// - /// - /// Default Api Version - /// 2023-11-01 - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of security rule collection. - /// Parameters supplied to the create or update Network Virtual Appliance Inbound Security Rules operation. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdateInboundSecurityRule(WaitUntil waitUntil, string ruleCollectionName, InboundSecurityRule inboundSecurityRule, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(ruleCollectionName, nameof(ruleCollectionName)); - Argument.AssertNotNull(inboundSecurityRule, nameof(inboundSecurityRule)); - - using var scope = _inboundSecurityRuleClientDiagnostics.CreateScope("NetworkVirtualApplianceResource.CreateOrUpdateInboundSecurityRule"); - scope.Start(); - try - { - var response = _inboundSecurityRuleRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleCollectionName, inboundSecurityRule, cancellationToken); - var operation = new NetworkArmOperation(new InboundSecurityRuleOperationSource(), _inboundSecurityRuleClientDiagnostics, Pipeline, _inboundSecurityRuleRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleCollectionName, inboundSecurityRule).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var operation = new NetworkArmOperation(new NetworkVirtualApplianceInstanceIdsOperationSource(), _networkVirtualApplianceClientDiagnostics, Pipeline, _networkVirtualApplianceRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, networkVirtualApplianceInstanceIds).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -663,7 +646,7 @@ public virtual ArmOperation CreateOrUpdateInboundSecurityRu /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -725,7 +708,7 @@ public virtual async Task> AddTagAsync /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -787,7 +770,7 @@ public virtual Response AddTag(string key, stri /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -844,7 +827,7 @@ public virtual async Task> SetTagsAsyn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -901,7 +884,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -961,7 +944,7 @@ public virtual async Task> RemoveTagAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceSkuCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceSkuCollection.cs index 9af0b0e57ffb5..d2dbf3effbc8d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceSkuCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceSkuCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -110,7 +110,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -155,7 +155,7 @@ public virtual Response Get(string skuName, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -185,7 +185,7 @@ public virtual AsyncPageable GetAllAsync(Can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -215,7 +215,7 @@ public virtual Pageable GetAll(CancellationT /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual async Task> ExistsAsync(string skuName, Cancellati /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Response Exists(string skuName, CancellationToken cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -346,7 +346,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceSkuResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceSkuResource.cs index 80b8de50b73d2..9356f130d252a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceSkuResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceSkuResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkWatcherCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkWatcherCollection.cs index fd947b390be20..50a77ab851c1c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkWatcherCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkWatcherCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(string netw /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string networkWatcherName, C /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual async Task> ExistsAsync(string networkWatcherName, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -401,7 +401,7 @@ public virtual Response Exists(string networkWatcherName, CancellationToke /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -446,7 +446,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkWatcherResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkWatcherResource.cs index 8dbe2fa0bc4be..0817b20140af7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkWatcherResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkWatcherResource.cs @@ -110,7 +110,7 @@ public virtual PacketCaptureCollection GetPacketCaptures() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetPacketCaptureAsync /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -179,7 +179,7 @@ public virtual ConnectionMonitorCollection GetConnectionMonitors() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetConnectionMoni /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -248,7 +248,7 @@ public virtual FlowLogCollection GetFlowLogs() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -279,7 +279,7 @@ public virtual async Task> GetFlowLogAsync(string flow /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -310,7 +310,7 @@ public virtual Response GetFlowLog(string flowLogName, Cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -350,7 +350,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -390,7 +390,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -432,7 +432,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -474,7 +474,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -516,7 +516,7 @@ public virtual async Task> UpdateAsync(NetworkT /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -558,7 +558,7 @@ public virtual Response Update(NetworkTagsObject network /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -600,7 +600,7 @@ public virtual async Task> GetTopologyAsync(TopologyCo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -642,7 +642,7 @@ public virtual Response GetTopology(TopologyContent content, Ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -688,7 +688,7 @@ public virtual async Task> VerifyIPFlowAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -734,7 +734,7 @@ public virtual ArmOperation VerifyIPFlow(WaitUntil wai /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -780,7 +780,7 @@ public virtual async Task> GetNextHopAsync(WaitUntil /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -826,7 +826,7 @@ public virtual ArmOperation GetNextHop(WaitUntil waitUntil, NextH /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -872,7 +872,7 @@ public virtual async Task> GetVmSecurityRu /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -918,7 +918,7 @@ public virtual ArmOperation GetVmSecurityRules(WaitUnti /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -964,7 +964,7 @@ public virtual async Task> GetTroubleshootin /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1010,7 +1010,7 @@ public virtual ArmOperation GetTroubleshooting(WaitUntil /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1056,7 +1056,7 @@ public virtual async Task> GetTroubleshootin /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1102,7 +1102,7 @@ public virtual ArmOperation GetTroubleshootingResult(Wait /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1148,7 +1148,7 @@ public virtual async Task> SetFlowLogConfigurat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1194,7 +1194,7 @@ public virtual ArmOperation SetFlowLogConfiguration(WaitUnti /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1240,7 +1240,7 @@ public virtual async Task> GetFlowLogStatusAsyn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1286,7 +1286,7 @@ public virtual ArmOperation GetFlowLogStatus(WaitUntil waitU /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1332,7 +1332,7 @@ public virtual async Task> CheckConnectivi /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1378,7 +1378,7 @@ public virtual ArmOperation CheckConnectivity(WaitUntil /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1424,7 +1424,7 @@ public virtual async Task> GetAzureReachab /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1470,7 +1470,7 @@ public virtual ArmOperation GetAzureReachabilityReport( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1516,7 +1516,7 @@ public virtual async Task> GetAvailableProv /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1562,7 +1562,7 @@ public virtual ArmOperation GetAvailableProviders(WaitUn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1608,7 +1608,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1654,7 +1654,7 @@ public virtual ArmOperation GetNetworkCo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1716,7 +1716,7 @@ public virtual async Task> AddTagAsync(string k /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1778,7 +1778,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1835,7 +1835,7 @@ public virtual async Task> SetTagsAsync(IDictio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1892,7 +1892,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1952,7 +1952,7 @@ public virtual async Task> RemoveTagAsync(strin /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/OutboundRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/OutboundRuleCollection.cs index a2d09b14d172f..e09b6573dc5f1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/OutboundRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/OutboundRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string outbou /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string outboundRuleName, Cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string outboundRuleName, C /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string outboundRuleName, CancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/OutboundRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/OutboundRuleResource.cs index 53659cfadb5d0..f65acec4352c4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/OutboundRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/OutboundRuleResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(CancellationT /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/P2SVpnGatewayCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/P2SVpnGatewayCollection.cs index 4a5f661166ecf..a573a92a73a9d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/P2SVpnGatewayCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/P2SVpnGatewayCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string gatew /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string gatewayName, Cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToke /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string gatewayName, Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string gatewayName, CancellationToken cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/P2SVpnGatewayResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/P2SVpnGatewayResource.cs index b8a2eef7b51dd..51496017bd787 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/P2SVpnGatewayResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/P2SVpnGatewayResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsync(WaitU /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, N /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -401,7 +401,7 @@ public virtual async Task> ResetAsync(WaitUn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual ArmOperation Reset(WaitUntil waitUntil, Ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -489,7 +489,7 @@ public virtual async Task> GenerateVpnProfileAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -535,7 +535,7 @@ public virtual ArmOperation GenerateVpnProfile(WaitUntil wai /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -577,7 +577,7 @@ public virtual async Task> GetP2SVpnConnecti /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -619,7 +619,7 @@ public virtual ArmOperation GetP2SVpnConnectionHealth(Wai /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -665,7 +665,7 @@ public virtual async Task> GetP2SVpnConnect /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -711,7 +711,7 @@ public virtual ArmOperation GetP2SVpnConnectionHealthDet /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -757,7 +757,7 @@ public virtual async Task DisconnectP2SVpnConnectionsAsync(WaitUnt /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -803,7 +803,7 @@ public virtual ArmOperation DisconnectP2SVpnConnections(WaitUntil waitUntil, P2S /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -865,7 +865,7 @@ public virtual async Task> AddTagAsync(string ke /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -927,7 +927,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -984,7 +984,7 @@ public virtual async Task> SetTagsAsync(IDiction /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1041,7 +1041,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1101,7 +1101,7 @@ public virtual async Task> RemoveTagAsync(string /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PacketCaptureCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PacketCaptureCollection.cs index 3bf58288b0ba6..e3bb7681ad310 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PacketCaptureCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PacketCaptureCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string packe /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string packetCaptureName, Can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToke /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual Pageable GetAll(CancellationToken cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -354,7 +354,7 @@ public virtual async Task> ExistsAsync(string packetCaptureName, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -397,7 +397,7 @@ public virtual Response Exists(string packetCaptureName, CancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -442,7 +442,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PacketCaptureResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PacketCaptureResource.cs index 5aef3b7f7d03b..b2fa3cae62144 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PacketCaptureResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PacketCaptureResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAsync(WaitU /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, P /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual async Task StopAsync(WaitUntil waitUntil, Cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -442,7 +442,7 @@ public virtual ArmOperation Stop(WaitUntil waitUntil, CancellationToken cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -484,7 +484,7 @@ public virtual async Task> GetStatu /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PeerExpressRouteCircuitConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PeerExpressRouteCircuitConnectionCollection.cs index 6e21d587f52f9..bab5592ab311b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PeerExpressRouteCircuitConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PeerExpressRouteCircuitConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string co /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string connectionName, Can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string connectionName, CancellationToken ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PeerExpressRouteCircuitConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PeerExpressRouteCircuitConnectionResource.cs index fc02208032705..2afb12163f082 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PeerExpressRouteCircuitConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PeerExpressRouteCircuitConnectionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PolicySignaturesOverridesForIdpsResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PolicySignaturesOverridesForIdpsResource.cs index 7c6461e177de4..8b50660a09ad0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PolicySignaturesOverridesForIdpsResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PolicySignaturesOverridesForIdpsResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(Cancellati /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -222,7 +222,7 @@ public virtual async Task> Up /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -264,7 +264,7 @@ public virtual Response Update(PolicyS /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateDnsZoneGroupCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateDnsZoneGroupCollection.cs index 129a3502a41a8..b28f74e6dd0ef 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateDnsZoneGroupCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateDnsZoneGroupCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string privateDnsZoneGr /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string privateDnsZoneGroup /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string privateDnsZoneGroupName, Cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateDnsZoneGroupResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateDnsZoneGroupResource.cs index 3d4b1f88dacda..c61c31b78dba6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateDnsZoneGroupResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateDnsZoneGroupResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateEndpointCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateEndpointCollection.cs index 6663acd669f55..937bafa1624d7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateEndpointCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateEndpointCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string pri /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string privateEndpointName, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string privateEndpointName /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string privateEndpointName, string expand = /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateEndpointResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateEndpointResource.cs index 34f80336422eb..9eff2e54dfe6e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateEndpointResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateEndpointResource.cs @@ -109,7 +109,7 @@ public virtual PrivateDnsZoneGroupCollection GetPrivateDnsZoneGroups() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetPrivateDnsZo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -171,7 +171,7 @@ public virtual Response GetPrivateDnsZoneGroup(stri /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(string exp /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string expand = null, Cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -295,7 +295,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -337,7 +337,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -383,7 +383,7 @@ public virtual async Task> UpdateAsync(Wai /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -429,7 +429,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -486,7 +486,7 @@ public virtual async Task> AddTagAsync(string /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -543,7 +543,7 @@ public virtual Response AddTag(string key, string value /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -599,7 +599,7 @@ public virtual async Task> SetTagsAsync(IDicti /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -655,7 +655,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -710,7 +710,7 @@ public virtual async Task> RemoveTagAsync(stri /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateLinkServiceCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateLinkServiceCollection.cs index 4e9a8c07b5c46..86db4bb44fb75 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateLinkServiceCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateLinkServiceCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string serviceName, stri /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(Cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string serviceName, string /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string serviceName, string expand = null, C /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateLinkServiceResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateLinkServiceResource.cs index 05e077bb5df5a..a4d88e7200791 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateLinkServiceResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateLinkServiceResource.cs @@ -109,7 +109,7 @@ public virtual NetworkPrivateEndpointConnectionCollection GetNetworkPrivateEndpo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -173,7 +173,7 @@ public virtual Response GetNetworkPriv /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string expand = null, Ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -297,7 +297,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -339,7 +339,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -385,7 +385,7 @@ public virtual async Task> UpdateAsync( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -431,7 +431,7 @@ public virtual ArmOperation Update(WaitUntil waitUnt /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -488,7 +488,7 @@ public virtual async Task> AddTagAsync(stri /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -545,7 +545,7 @@ public virtual Response AddTag(string key, string va /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -601,7 +601,7 @@ public virtual async Task> SetTagsAsync(IDi /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -657,7 +657,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -712,7 +712,7 @@ public virtual async Task> RemoveTagAsync(s /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeCollection.cs index c1231ffb8c251..e75b152cd2dc5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string probeName, Ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string probeName, CancellationToken c /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken cancellationToke /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string probeName, Cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string probeName, CancellationToken cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExistsAsync(stri /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeData.Serialization.cs index 7c6fbba06bc9a..40d895a8f64f7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeData.Serialization.cs @@ -75,6 +75,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WritePropertyName("intervalInSeconds"u8); writer.WriteNumberValue(IntervalInSeconds.Value); } + if (Optional.IsDefined(NoHealthyBackendsBehavior)) + { + writer.WritePropertyName("NoHealthyBackendsBehavior"u8); + writer.WriteStringValue(NoHealthyBackendsBehavior.Value.ToString()); + } if (Optional.IsDefined(NumberOfProbes)) { writer.WritePropertyName("numberOfProbes"u8); @@ -142,6 +147,7 @@ internal static ProbeData DeserializeProbeData(JsonElement element, ModelReaderW ProbeProtocol? protocol = default; int? port = default; int? intervalInSeconds = default; + ProbeNoHealthyBackendsBehavior? noHealthyBackendsBehavior = default; int? numberOfProbes = default; int? probeThreshold = default; string requestPath = default; @@ -232,6 +238,15 @@ internal static ProbeData DeserializeProbeData(JsonElement element, ModelReaderW intervalInSeconds = property0.Value.GetInt32(); continue; } + if (property0.NameEquals("NoHealthyBackendsBehavior"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + noHealthyBackendsBehavior = new ProbeNoHealthyBackendsBehavior(property0.Value.GetString()); + continue; + } if (property0.NameEquals("numberOfProbes"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -283,6 +298,7 @@ internal static ProbeData DeserializeProbeData(JsonElement element, ModelReaderW protocol, port, intervalInSeconds, + noHealthyBackendsBehavior, numberOfProbes, probeThreshold, requestPath, diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeData.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeData.cs index 81f4edd1308bb..782fa00b1f573 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeData.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeData.cs @@ -35,17 +35,19 @@ public ProbeData() /// The protocol of the end point. If 'Tcp' is specified, a received ACK is required for the probe to be successful. If 'Http' or 'Https' is specified, a 200 OK response from the specifies URI is required for the probe to be successful. /// The port for communicating the probe. Possible values range from 1 to 65535, inclusive. /// The interval, in seconds, for how frequently to probe the endpoint for health status. Typically, the interval is slightly less than half the allocated timeout period (in seconds) which allows two full probes before taking the instance out of rotation. The default value is 15, the minimum value is 5. + /// Determines how new connections are handled by the load balancer when all backend instances are probed down. /// The number of probes where if no response, will result in stopping further traffic from being delivered to the endpoint. This values allows endpoints to be taken out of rotation faster or slower than the typical times used in Azure. /// The number of consecutive successful or failed probes in order to allow or deny traffic from being delivered to this endpoint. After failing the number of consecutive probes equal to this value, the endpoint will be taken out of rotation and require the same number of successful consecutive probes to be placed back in rotation. /// The URI used for requesting health status from the VM. Path is required if a protocol is set to http. Otherwise, it is not allowed. There is no default value. /// The provisioning state of the probe resource. - internal ProbeData(ResourceIdentifier id, string name, ResourceType? resourceType, IDictionary serializedAdditionalRawData, ETag? etag, IReadOnlyList loadBalancingRules, ProbeProtocol? protocol, int? port, int? intervalInSeconds, int? numberOfProbes, int? probeThreshold, string requestPath, NetworkProvisioningState? provisioningState) : base(id, name, resourceType, serializedAdditionalRawData) + internal ProbeData(ResourceIdentifier id, string name, ResourceType? resourceType, IDictionary serializedAdditionalRawData, ETag? etag, IReadOnlyList loadBalancingRules, ProbeProtocol? protocol, int? port, int? intervalInSeconds, ProbeNoHealthyBackendsBehavior? noHealthyBackendsBehavior, int? numberOfProbes, int? probeThreshold, string requestPath, NetworkProvisioningState? provisioningState) : base(id, name, resourceType, serializedAdditionalRawData) { ETag = etag; LoadBalancingRules = loadBalancingRules; Protocol = protocol; Port = port; IntervalInSeconds = intervalInSeconds; + NoHealthyBackendsBehavior = noHealthyBackendsBehavior; NumberOfProbes = numberOfProbes; ProbeThreshold = probeThreshold; RequestPath = requestPath; @@ -62,6 +64,8 @@ internal ProbeData(ResourceIdentifier id, string name, ResourceType? resourceTyp public int? Port { get; set; } /// The interval, in seconds, for how frequently to probe the endpoint for health status. Typically, the interval is slightly less than half the allocated timeout period (in seconds) which allows two full probes before taking the instance out of rotation. The default value is 15, the minimum value is 5. public int? IntervalInSeconds { get; set; } + /// Determines how new connections are handled by the load balancer when all backend instances are probed down. + public ProbeNoHealthyBackendsBehavior? NoHealthyBackendsBehavior { get; set; } /// The number of probes where if no response, will result in stopping further traffic from being delivered to the endpoint. This values allows endpoints to be taken out of rotation faster or slower than the typical times used in Azure. public int? NumberOfProbes { get; set; } /// The number of consecutive successful or failed probes in order to allow or deny traffic from being delivered to this endpoint. After failing the number of consecutive probes equal to this value, the endpoint will be taken out of rotation and require the same number of successful consecutive probes to be placed back in rotation. diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeResource.cs index 72a92ad9b43e7..7793a4e944326 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPAddressCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPAddressCollection.cs index 249a2309362ce..173c6af1e6f63 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPAddressCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPAddressCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string pub /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string publicIPAddressName, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string publicIPAddressName /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string publicIPAddressName, string expand = /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPAddressResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPAddressResource.cs index 022fca1637fdf..78270e2594730 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPAddressResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPAddressResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(string exp /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -185,7 +185,7 @@ public virtual Response Get(string expand = null, Cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(Network /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -353,7 +353,7 @@ public virtual Response Update(NetworkTagsObject networ /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -395,7 +395,7 @@ public virtual async Task> Ddos /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -437,7 +437,7 @@ public virtual ArmOperation DdosProtectionSt /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -499,7 +499,7 @@ public virtual async Task> AddTagAsync(string /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -561,7 +561,7 @@ public virtual Response AddTag(string key, string value /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -618,7 +618,7 @@ public virtual async Task> SetTagsAsync(IDicti /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -675,7 +675,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -735,7 +735,7 @@ public virtual async Task> RemoveTagAsync(stri /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPPrefixCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPPrefixCollection.cs index 256d6f9b59ee5..a57428ba8afb3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPPrefixCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPPrefixCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string publ /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string publicIPPrefixName, s /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string publicIPPrefixName, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string publicIPPrefixName, string expand = /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPPrefixResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPPrefixResource.cs index 6c3df9f6a67ee..7c3e147d9eb2c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPPrefixResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPPrefixResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(string expa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -185,7 +185,7 @@ public virtual Response Get(string expand = null, Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(NetworkT /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -353,7 +353,7 @@ public virtual Response Update(NetworkTagsObject network /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -415,7 +415,7 @@ public virtual async Task> AddTagAsync(string k /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -477,7 +477,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -534,7 +534,7 @@ public virtual async Task> SetTagsAsync(IDictio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -591,7 +591,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -651,7 +651,7 @@ public virtual async Task> RemoveTagAsync(strin /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AdminRuleCollectionsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AdminRuleCollectionsRestOperations.cs index 3e38bcb6d7809..ca81a34cffe08 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AdminRuleCollectionsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AdminRuleCollectionsRestOperations.cs @@ -32,7 +32,7 @@ public AdminRuleCollectionsRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AdminRulesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AdminRulesRestOperations.cs index 3daf0cda26abf..8e64b90faa21c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AdminRulesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AdminRulesRestOperations.cs @@ -32,7 +32,7 @@ public AdminRulesRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewayPrivateEndpointConnectionsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewayPrivateEndpointConnectionsRestOperations.cs index 514fee7c197eb..f15f43476e309 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewayPrivateEndpointConnectionsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewayPrivateEndpointConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public ApplicationGatewayPrivateEndpointConnectionsRestOperations(HttpPipeline p { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewayPrivateLinkResourcesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewayPrivateLinkResourcesRestOperations.cs index 0db517d1a5e7a..ddf490b2d0783 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewayPrivateLinkResourcesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewayPrivateLinkResourcesRestOperations.cs @@ -32,7 +32,7 @@ public ApplicationGatewayPrivateLinkResourcesRestOperations(HttpPipeline pipelin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewayWafDynamicManifestsDefaultRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewayWafDynamicManifestsDefaultRestOperations.cs index 1e9ec2bbfac2f..35635bfd73535 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewayWafDynamicManifestsDefaultRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewayWafDynamicManifestsDefaultRestOperations.cs @@ -31,7 +31,7 @@ public ApplicationGatewayWafDynamicManifestsDefaultRestOperations(HttpPipeline p { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewayWafDynamicManifestsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewayWafDynamicManifestsRestOperations.cs index 9a37f45291f13..7f9c1dda2d5f6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewayWafDynamicManifestsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewayWafDynamicManifestsRestOperations.cs @@ -32,7 +32,7 @@ public ApplicationGatewayWafDynamicManifestsRestOperations(HttpPipeline pipeline { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewaysRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewaysRestOperations.cs index 787cf46887239..5077695143d4b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewaysRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationGatewaysRestOperations.cs @@ -33,7 +33,7 @@ public ApplicationGatewaysRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationSecurityGroupsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationSecurityGroupsRestOperations.cs index 8065b0ec78808..f6dbb215b0ffb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationSecurityGroupsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ApplicationSecurityGroupsRestOperations.cs @@ -32,7 +32,7 @@ public ApplicationSecurityGroupsRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailableDelegationsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailableDelegationsRestOperations.cs index c975a2a0bf829..40a6f64b39d74 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailableDelegationsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailableDelegationsRestOperations.cs @@ -32,7 +32,7 @@ public AvailableDelegationsRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailableEndpointServicesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailableEndpointServicesRestOperations.cs index 54904db1d2b4f..a59eaf18cdd4a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailableEndpointServicesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailableEndpointServicesRestOperations.cs @@ -32,7 +32,7 @@ public AvailableEndpointServicesRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailablePrivateEndpointTypesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailablePrivateEndpointTypesRestOperations.cs index b1a2e373fbc4e..b3dd0c342e795 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailablePrivateEndpointTypesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailablePrivateEndpointTypesRestOperations.cs @@ -32,7 +32,7 @@ public AvailablePrivateEndpointTypesRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailableResourceGroupDelegationsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailableResourceGroupDelegationsRestOperations.cs index 46c43d3715c14..786e760991ade 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailableResourceGroupDelegationsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailableResourceGroupDelegationsRestOperations.cs @@ -32,7 +32,7 @@ public AvailableResourceGroupDelegationsRestOperations(HttpPipeline pipeline, st { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailableServiceAliasesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailableServiceAliasesRestOperations.cs index 723f6b17289cc..a268321440d44 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailableServiceAliasesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AvailableServiceAliasesRestOperations.cs @@ -32,7 +32,7 @@ public AvailableServiceAliasesRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AzureFirewallFqdnTagsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AzureFirewallFqdnTagsRestOperations.cs index 856f180a86298..35ba56a394135 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AzureFirewallFqdnTagsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AzureFirewallFqdnTagsRestOperations.cs @@ -32,7 +32,7 @@ public AzureFirewallFqdnTagsRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AzureFirewallsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AzureFirewallsRestOperations.cs index c66bba3d00ce8..62fa39a27497d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AzureFirewallsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/AzureFirewallsRestOperations.cs @@ -32,7 +32,7 @@ public AzureFirewallsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -652,7 +652,7 @@ public Response ListLearnedPrefixes(string subscriptionId, string resourceGroupN } } - internal RequestUriBuilder CreatePacketCaptureRequestUri(string subscriptionId, string resourceGroupName, string azureFirewallName, FirewallPacketCaptureContent content) + internal RequestUriBuilder CreatePacketCaptureRequestUri(string subscriptionId, string resourceGroupName, string azureFirewallName, FirewallPacketCaptureRequestContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -667,7 +667,7 @@ internal RequestUriBuilder CreatePacketCaptureRequestUri(string subscriptionId, return uri; } - internal HttpMessage CreatePacketCaptureRequest(string subscriptionId, string resourceGroupName, string azureFirewallName, FirewallPacketCaptureContent content) + internal HttpMessage CreatePacketCaptureRequest(string subscriptionId, string resourceGroupName, string azureFirewallName, FirewallPacketCaptureRequestContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -700,7 +700,7 @@ internal HttpMessage CreatePacketCaptureRequest(string subscriptionId, string re /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task PacketCaptureAsync(string subscriptionId, string resourceGroupName, string azureFirewallName, FirewallPacketCaptureContent content, CancellationToken cancellationToken = default) + public async Task PacketCaptureAsync(string subscriptionId, string resourceGroupName, string azureFirewallName, FirewallPacketCaptureRequestContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -726,7 +726,7 @@ public async Task PacketCaptureAsync(string subscriptionId, string res /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response PacketCapture(string subscriptionId, string resourceGroupName, string azureFirewallName, FirewallPacketCaptureContent content, CancellationToken cancellationToken = default) + public Response PacketCapture(string subscriptionId, string resourceGroupName, string azureFirewallName, FirewallPacketCaptureRequestContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/BastionHostsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/BastionHostsRestOperations.cs index db8e52c5f2da2..f3231e7d86cf3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/BastionHostsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/BastionHostsRestOperations.cs @@ -32,7 +32,7 @@ public BastionHostsRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/BgpServiceCommunitiesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/BgpServiceCommunitiesRestOperations.cs index eeec3d6ffdad0..e2390adb1986f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/BgpServiceCommunitiesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/BgpServiceCommunitiesRestOperations.cs @@ -32,7 +32,7 @@ public BgpServiceCommunitiesRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ConfigurationPolicyGroupsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ConfigurationPolicyGroupsRestOperations.cs index 159ca6d20a2fe..c225c2e9bf0ed 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ConfigurationPolicyGroupsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ConfigurationPolicyGroupsRestOperations.cs @@ -32,7 +32,7 @@ public ConfigurationPolicyGroupsRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ConnectionMonitorsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ConnectionMonitorsRestOperations.cs index 21d547cba831d..a633e428edc27 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ConnectionMonitorsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ConnectionMonitorsRestOperations.cs @@ -32,7 +32,7 @@ public ConnectionMonitorsRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ConnectivityConfigurationsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ConnectivityConfigurationsRestOperations.cs index 3db66f5dd1897..61fd81cc2d36c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ConnectivityConfigurationsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ConnectivityConfigurationsRestOperations.cs @@ -32,7 +32,7 @@ public ConnectivityConfigurationsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/CustomIPPrefixesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/CustomIPPrefixesRestOperations.cs index 91473a509a874..5f815b16275a7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/CustomIPPrefixesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/CustomIPPrefixesRestOperations.cs @@ -32,7 +32,7 @@ public CustomIPPrefixesRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/DdosCustomPoliciesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/DdosCustomPoliciesRestOperations.cs index 224776326330f..c6ab64ad8c50b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/DdosCustomPoliciesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/DdosCustomPoliciesRestOperations.cs @@ -32,7 +32,7 @@ public DdosCustomPoliciesRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/DdosProtectionPlansRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/DdosProtectionPlansRestOperations.cs index 9953cbaf53738..7f424d1d48ae3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/DdosProtectionPlansRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/DdosProtectionPlansRestOperations.cs @@ -32,7 +32,7 @@ public DdosProtectionPlansRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/DefaultSecurityRulesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/DefaultSecurityRulesRestOperations.cs index c33a7dab1858b..0c1f768e523cc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/DefaultSecurityRulesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/DefaultSecurityRulesRestOperations.cs @@ -32,7 +32,7 @@ public DefaultSecurityRulesRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/DscpConfigurationRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/DscpConfigurationRestOperations.cs index 76549388f4851..8b1c3ce58dc39 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/DscpConfigurationRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/DscpConfigurationRestOperations.cs @@ -32,7 +32,7 @@ public DscpConfigurationRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCircuitAuthorizationsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCircuitAuthorizationsRestOperations.cs index 755ef567d6530..8cfac10bf6046 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCircuitAuthorizationsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCircuitAuthorizationsRestOperations.cs @@ -32,7 +32,7 @@ public ExpressRouteCircuitAuthorizationsRestOperations(HttpPipeline pipeline, st { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCircuitConnectionsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCircuitConnectionsRestOperations.cs index c2a5f067b2091..b4e2c410b4aaf 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCircuitConnectionsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCircuitConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public ExpressRouteCircuitConnectionsRestOperations(HttpPipeline pipeline, strin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCircuitPeeringsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCircuitPeeringsRestOperations.cs index c06002c2356e7..e19c782f089f2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCircuitPeeringsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCircuitPeeringsRestOperations.cs @@ -32,7 +32,7 @@ public ExpressRouteCircuitPeeringsRestOperations(HttpPipeline pipeline, string a { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCircuitsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCircuitsRestOperations.cs index 8d9ae8c44173e..963f3c488ad90 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCircuitsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCircuitsRestOperations.cs @@ -32,7 +32,7 @@ public ExpressRouteCircuitsRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteConnectionsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteConnectionsRestOperations.cs index 0045ad73024ea..0de853d885b60 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteConnectionsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public ExpressRouteConnectionsRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCrossConnectionPeeringsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCrossConnectionPeeringsRestOperations.cs index 53519882e960f..afae06da884c1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCrossConnectionPeeringsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCrossConnectionPeeringsRestOperations.cs @@ -32,7 +32,7 @@ public ExpressRouteCrossConnectionPeeringsRestOperations(HttpPipeline pipeline, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCrossConnectionsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCrossConnectionsRestOperations.cs index ab3a66fa667b5..f1fbd04957587 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCrossConnectionsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteCrossConnectionsRestOperations.cs @@ -32,11 +32,11 @@ public ExpressRouteCrossConnectionsRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId) + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string filter) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -44,10 +44,14 @@ internal RequestUriBuilder CreateListRequestUri(string subscriptionId) uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.Network/expressRouteCrossConnections", false); uri.AppendQuery("api-version", _apiVersion, true); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } return uri; } - internal HttpMessage CreateListRequest(string subscriptionId) + internal HttpMessage CreateListRequest(string subscriptionId, string filter) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -58,6 +62,10 @@ internal HttpMessage CreateListRequest(string subscriptionId) uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.Network/expressRouteCrossConnections", false); uri.AppendQuery("api-version", _apiVersion, true); + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } request.Uri = uri; request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); @@ -66,14 +74,15 @@ internal HttpMessage CreateListRequest(string subscriptionId) /// Retrieves all the ExpressRouteCrossConnections in a subscription. /// The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The filter to apply on the operation. For example, you can use $filter=name eq '{circuitServiceKey}'. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string filter = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - using var message = CreateListRequest(subscriptionId); + using var message = CreateListRequest(subscriptionId, filter); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -91,14 +100,15 @@ public async Task> ListAsync(str /// Retrieves all the ExpressRouteCrossConnections in a subscription. /// The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The filter to apply on the operation. For example, you can use $filter=name eq '{circuitServiceKey}'. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string filter = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - using var message = CreateListRequest(subscriptionId); + using var message = CreateListRequest(subscriptionId, filter); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -786,7 +796,7 @@ public Response ListRoutesTable(string subscriptionId, string resourceGroupName, } } - internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId) + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string filter) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -794,7 +804,7 @@ internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string return uri; } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId) + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string filter) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -811,15 +821,16 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Retrieves all the ExpressRouteCrossConnections in a subscription. /// The URL to the next page of results. /// The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The filter to apply on the operation. For example, you can use $filter=name eq '{circuitServiceKey}'. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string filter = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, filter); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -838,15 +849,16 @@ public async Task> ListNextPageA /// Retrieves all the ExpressRouteCrossConnections in a subscription. /// The URL to the next page of results. /// The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The filter to apply on the operation. For example, you can use $filter=name eq '{circuitServiceKey}'. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string filter = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, filter); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteGatewaysRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteGatewaysRestOperations.cs index b2d474734aa7f..9d77690ab2513 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteGatewaysRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteGatewaysRestOperations.cs @@ -32,7 +32,7 @@ public ExpressRouteGatewaysRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteLinksRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteLinksRestOperations.cs index b5ea285393664..3e8314c35b252 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteLinksRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteLinksRestOperations.cs @@ -32,7 +32,7 @@ public ExpressRouteLinksRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRoutePortAuthorizationsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRoutePortAuthorizationsRestOperations.cs index 44f3a531c61ca..642817accb6e0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRoutePortAuthorizationsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRoutePortAuthorizationsRestOperations.cs @@ -32,7 +32,7 @@ public ExpressRoutePortAuthorizationsRestOperations(HttpPipeline pipeline, strin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRoutePortsLocationsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRoutePortsLocationsRestOperations.cs index 12acab9d5202c..3ac99b2fc4dfe 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRoutePortsLocationsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRoutePortsLocationsRestOperations.cs @@ -32,7 +32,7 @@ public ExpressRoutePortsLocationsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRoutePortsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRoutePortsRestOperations.cs index 0f695d5b4428b..74d8fe3cdd116 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRoutePortsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRoutePortsRestOperations.cs @@ -32,7 +32,7 @@ public ExpressRoutePortsRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteProviderPortsLocationRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteProviderPortsLocationRestOperations.cs index 6965f484d0fb9..f7aa7c84c4ae8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteProviderPortsLocationRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteProviderPortsLocationRestOperations.cs @@ -32,7 +32,7 @@ public ExpressRouteProviderPortsLocationRestOperations(HttpPipeline pipeline, st { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteServiceProvidersRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteServiceProvidersRestOperations.cs index 3751d62889ca6..abb8e0213604d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteServiceProvidersRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ExpressRouteServiceProvidersRestOperations.cs @@ -32,7 +32,7 @@ public ExpressRouteServiceProvidersRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPoliciesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPoliciesRestOperations.cs index 29521251bafcd..a3e7542b8742b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPoliciesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPoliciesRestOperations.cs @@ -32,7 +32,7 @@ public FirewallPoliciesRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyDeploymentsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyDeploymentsRestOperations.cs index cabe3ad3d727e..ce5084913c7fc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyDeploymentsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyDeploymentsRestOperations.cs @@ -30,7 +30,7 @@ public FirewallPolicyDeploymentsRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyDraftsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyDraftsRestOperations.cs index 2284686e055a8..15662ffda5479 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyDraftsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyDraftsRestOperations.cs @@ -31,7 +31,7 @@ public FirewallPolicyDraftsRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyIdpsSignaturesFilterValuesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyIdpsSignaturesFilterValuesRestOperations.cs index fc6e5b586ebc2..9d20cea089a6a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyIdpsSignaturesFilterValuesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyIdpsSignaturesFilterValuesRestOperations.cs @@ -32,7 +32,7 @@ public FirewallPolicyIdpsSignaturesFilterValuesRestOperations(HttpPipeline pipel { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyIdpsSignaturesOverridesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyIdpsSignaturesOverridesRestOperations.cs index 8031704018375..f3a9842735193 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyIdpsSignaturesOverridesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyIdpsSignaturesOverridesRestOperations.cs @@ -32,7 +32,7 @@ public FirewallPolicyIdpsSignaturesOverridesRestOperations(HttpPipeline pipeline { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyIdpsSignaturesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyIdpsSignaturesRestOperations.cs index 06ef27e8099e4..bc5f3bcdbb5d7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyIdpsSignaturesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyIdpsSignaturesRestOperations.cs @@ -32,7 +32,7 @@ public FirewallPolicyIdpsSignaturesRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyRuleCollectionGroupDraftsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyRuleCollectionGroupDraftsRestOperations.cs index d1b6ba56cc270..7e17f6b3faa8f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyRuleCollectionGroupDraftsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyRuleCollectionGroupDraftsRestOperations.cs @@ -31,7 +31,7 @@ public FirewallPolicyRuleCollectionGroupDraftsRestOperations(HttpPipeline pipeli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyRuleCollectionGroupsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyRuleCollectionGroupsRestOperations.cs index ff6a37010c7f0..e78d9c895090e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyRuleCollectionGroupsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FirewallPolicyRuleCollectionGroupsRestOperations.cs @@ -32,7 +32,7 @@ public FirewallPolicyRuleCollectionGroupsRestOperations(HttpPipeline pipeline, s { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FlowLogsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FlowLogsRestOperations.cs index bf574d3975ece..9560d4cca7985 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FlowLogsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/FlowLogsRestOperations.cs @@ -32,7 +32,7 @@ public FlowLogsRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/HubRouteTablesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/HubRouteTablesRestOperations.cs index 580d789fbd354..69bd66916d6a0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/HubRouteTablesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/HubRouteTablesRestOperations.cs @@ -32,7 +32,7 @@ public HubRouteTablesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/HubVirtualNetworkConnectionsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/HubVirtualNetworkConnectionsRestOperations.cs index 8be3fd059ef6b..03430be20182e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/HubVirtualNetworkConnectionsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/HubVirtualNetworkConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public HubVirtualNetworkConnectionsRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/InboundNatRulesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/InboundNatRulesRestOperations.cs index 858d22ff1024f..d1f4548b260ec 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/InboundNatRulesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/InboundNatRulesRestOperations.cs @@ -32,7 +32,7 @@ public InboundNatRulesRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/InboundSecurityRuleRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/InboundSecurityRuleRestOperations.cs index f9140b9da0366..31efbd2ad42ac 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/InboundSecurityRuleRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/InboundSecurityRuleRestOperations.cs @@ -6,11 +6,11 @@ #nullable disable using System; +using System.Text.Json; using System.Threading; using System.Threading.Tasks; using Azure.Core; using Azure.Core.Pipeline; -using Azure.ResourceManager.Network.Models; namespace Azure.ResourceManager.Network { @@ -31,11 +31,11 @@ public InboundSecurityRuleRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string networkVirtualApplianceName, string ruleCollectionName, InboundSecurityRule inboundSecurityRule) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string networkVirtualApplianceName, string ruleCollectionName, InboundSecurityRuleData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -51,7 +51,7 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string networkVirtualApplianceName, string ruleCollectionName, InboundSecurityRule inboundSecurityRule) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string networkVirtualApplianceName, string ruleCollectionName, InboundSecurityRuleData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -71,7 +71,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(inboundSecurityRule, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); request.Content = content; _userAgent.Apply(message); return message; @@ -82,19 +82,19 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// The name of the resource group. /// The name of the Network Virtual Appliance. /// The name of security rule collection. - /// Parameters supplied to the create or update Network Virtual Appliance Inbound Security Rules operation. + /// Parameters supplied to the create or update Network Virtual Appliance Inbound Security Rules operation. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string networkVirtualApplianceName, string ruleCollectionName, InboundSecurityRule inboundSecurityRule, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string networkVirtualApplianceName, string ruleCollectionName, InboundSecurityRuleData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(networkVirtualApplianceName, nameof(networkVirtualApplianceName)); Argument.AssertNotNullOrEmpty(ruleCollectionName, nameof(ruleCollectionName)); - Argument.AssertNotNull(inboundSecurityRule, nameof(inboundSecurityRule)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, networkVirtualApplianceName, ruleCollectionName, inboundSecurityRule); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, networkVirtualApplianceName, ruleCollectionName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -111,19 +111,19 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re /// The name of the resource group. /// The name of the Network Virtual Appliance. /// The name of security rule collection. - /// Parameters supplied to the create or update Network Virtual Appliance Inbound Security Rules operation. + /// Parameters supplied to the create or update Network Virtual Appliance Inbound Security Rules operation. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string networkVirtualApplianceName, string ruleCollectionName, InboundSecurityRule inboundSecurityRule, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string networkVirtualApplianceName, string ruleCollectionName, InboundSecurityRuleData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(networkVirtualApplianceName, nameof(networkVirtualApplianceName)); Argument.AssertNotNullOrEmpty(ruleCollectionName, nameof(ruleCollectionName)); - Argument.AssertNotNull(inboundSecurityRule, nameof(inboundSecurityRule)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, networkVirtualApplianceName, ruleCollectionName, inboundSecurityRule); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, networkVirtualApplianceName, ruleCollectionName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -134,5 +134,109 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, throw new RequestFailedException(message.Response); } } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string networkVirtualApplianceName, string ruleCollectionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Network/networkVirtualAppliances/", false); + uri.AppendPath(networkVirtualApplianceName, true); + uri.AppendPath("/inboundSecurityRules/", false); + uri.AppendPath(ruleCollectionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string networkVirtualApplianceName, string ruleCollectionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Network/networkVirtualAppliances/", false); + uri.AppendPath(networkVirtualApplianceName, true); + uri.AppendPath("/inboundSecurityRules/", false); + uri.AppendPath(ruleCollectionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Retrieves the available specified Network Virtual Appliance Inbound Security Rules Collection. + /// The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the Network Virtual Appliance. + /// The name of security rule collection. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string networkVirtualApplianceName, string ruleCollectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkVirtualApplianceName, nameof(networkVirtualApplianceName)); + Argument.AssertNotNullOrEmpty(ruleCollectionName, nameof(ruleCollectionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, networkVirtualApplianceName, ruleCollectionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + InboundSecurityRuleData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = InboundSecurityRuleData.DeserializeInboundSecurityRuleData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((InboundSecurityRuleData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Retrieves the available specified Network Virtual Appliance Inbound Security Rules Collection. + /// The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The name of the resource group. + /// The name of the Network Virtual Appliance. + /// The name of security rule collection. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string networkVirtualApplianceName, string ruleCollectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(networkVirtualApplianceName, nameof(networkVirtualApplianceName)); + Argument.AssertNotNullOrEmpty(ruleCollectionName, nameof(ruleCollectionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, networkVirtualApplianceName, ruleCollectionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + InboundSecurityRuleData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = InboundSecurityRuleData.DeserializeInboundSecurityRuleData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((InboundSecurityRuleData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/IpAllocationsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/IpAllocationsRestOperations.cs index 105c0fa0a65d5..8a8085ea98af1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/IpAllocationsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/IpAllocationsRestOperations.cs @@ -32,7 +32,7 @@ public IpAllocationsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/IpGroupsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/IpGroupsRestOperations.cs index f7610a5ee9877..66416deaac61a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/IpGroupsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/IpGroupsRestOperations.cs @@ -32,7 +32,7 @@ public IpGroupsRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerBackendAddressPoolsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerBackendAddressPoolsRestOperations.cs index 340461c8bfc91..dce5e0fe0ff3b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerBackendAddressPoolsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerBackendAddressPoolsRestOperations.cs @@ -32,7 +32,7 @@ public LoadBalancerBackendAddressPoolsRestOperations(HttpPipeline pipeline, stri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerFrontendIPConfigurationsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerFrontendIPConfigurationsRestOperations.cs index b8f69234044fd..9687ea26075f3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerFrontendIPConfigurationsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerFrontendIPConfigurationsRestOperations.cs @@ -32,7 +32,7 @@ public LoadBalancerFrontendIPConfigurationsRestOperations(HttpPipeline pipeline, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerLoadBalancingRulesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerLoadBalancingRulesRestOperations.cs index 27cae842c9d88..20a85c7044fb2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerLoadBalancingRulesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerLoadBalancingRulesRestOperations.cs @@ -32,7 +32,7 @@ public LoadBalancerLoadBalancingRulesRestOperations(HttpPipeline pipeline, strin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerNetworkInterfacesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerNetworkInterfacesRestOperations.cs index 52024a173ba1c..64f9a601e46f4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerNetworkInterfacesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerNetworkInterfacesRestOperations.cs @@ -32,7 +32,7 @@ public LoadBalancerNetworkInterfacesRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerOutboundRulesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerOutboundRulesRestOperations.cs index 83dfa9d437a71..eb329a61dcd4d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerOutboundRulesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerOutboundRulesRestOperations.cs @@ -32,7 +32,7 @@ public LoadBalancerOutboundRulesRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerProbesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerProbesRestOperations.cs index a518c16253c83..c82069046f0ca 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerProbesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancerProbesRestOperations.cs @@ -32,7 +32,7 @@ public LoadBalancerProbesRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancersRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancersRestOperations.cs index 762b102df0f75..e431e8630241f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancersRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LoadBalancersRestOperations.cs @@ -32,7 +32,7 @@ public LoadBalancersRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LocalNetworkGatewaysRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LocalNetworkGatewaysRestOperations.cs index ca10db549d196..839140d71aa27 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LocalNetworkGatewaysRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/LocalNetworkGatewaysRestOperations.cs @@ -32,7 +32,7 @@ public LocalNetworkGatewaysRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ManagementGroupNetworkManagerConnectionsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ManagementGroupNetworkManagerConnectionsRestOperations.cs index cb8d0d91e6939..3a305d35abb80 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ManagementGroupNetworkManagerConnectionsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ManagementGroupNetworkManagerConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public ManagementGroupNetworkManagerConnectionsRestOperations(HttpPipeline pipel { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NatGatewaysRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NatGatewaysRestOperations.cs index ecec20962ae1a..487ec78839e83 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NatGatewaysRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NatGatewaysRestOperations.cs @@ -32,7 +32,7 @@ public NatGatewaysRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NatRulesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NatRulesRestOperations.cs index 819c6be2977fb..7b15798d5bd05 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NatRulesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NatRulesRestOperations.cs @@ -32,7 +32,7 @@ public NatRulesRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkGroupsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkGroupsRestOperations.cs index 8feeab4e4f0e5..15782f636f389 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkGroupsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkGroupsRestOperations.cs @@ -32,7 +32,7 @@ public NetworkGroupsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkInterfaceIPConfigurationsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkInterfaceIPConfigurationsRestOperations.cs index edccdc9909840..ed95cafead330 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkInterfaceIPConfigurationsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkInterfaceIPConfigurationsRestOperations.cs @@ -32,7 +32,7 @@ public NetworkInterfaceIPConfigurationsRestOperations(HttpPipeline pipeline, str { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkInterfaceLoadBalancersRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkInterfaceLoadBalancersRestOperations.cs index 4c798b8378b96..70a9e933ad53b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkInterfaceLoadBalancersRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkInterfaceLoadBalancersRestOperations.cs @@ -32,7 +32,7 @@ public NetworkInterfaceLoadBalancersRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkInterfaceTapConfigurationsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkInterfaceTapConfigurationsRestOperations.cs index 2074fd00db865..72b9131e9d395 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkInterfaceTapConfigurationsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkInterfaceTapConfigurationsRestOperations.cs @@ -32,7 +32,7 @@ public NetworkInterfaceTapConfigurationsRestOperations(HttpPipeline pipeline, st { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkInterfacesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkInterfacesRestOperations.cs index 4443e0ae14dcc..9b1de9bfda867 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkInterfacesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkInterfacesRestOperations.cs @@ -32,7 +32,7 @@ public NetworkInterfacesRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkManagementRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkManagementRestOperations.cs index 97677c78d8b02..5c1bcb6c14117 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkManagementRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkManagementRestOperations.cs @@ -32,7 +32,7 @@ public NetworkManagementRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkManagerCommitsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkManagerCommitsRestOperations.cs index 3b3568874bd03..caa6e7b56f0af 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkManagerCommitsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkManagerCommitsRestOperations.cs @@ -31,7 +31,7 @@ public NetworkManagerCommitsRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkManagerDeploymentStatusRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkManagerDeploymentStatusRestOperations.cs index 53efd1b888a2d..6fb393111976d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkManagerDeploymentStatusRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkManagerDeploymentStatusRestOperations.cs @@ -32,7 +32,7 @@ public NetworkManagerDeploymentStatusRestOperations(HttpPipeline pipeline, strin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkManagersRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkManagersRestOperations.cs index b5bb08c57da8f..3cba356a71196 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkManagersRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkManagersRestOperations.cs @@ -32,7 +32,7 @@ public NetworkManagersRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkProfilesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkProfilesRestOperations.cs index eb72e3a6b8fcf..552e7d17b5d21 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkProfilesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkProfilesRestOperations.cs @@ -32,7 +32,7 @@ public NetworkProfilesRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityGroupsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityGroupsRestOperations.cs index 2305e93f2bd9f..3229cd0d05be9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityGroupsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkSecurityGroupsRestOperations.cs @@ -32,7 +32,7 @@ public NetworkSecurityGroupsRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkVirtualApplianceConnectionsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkVirtualApplianceConnectionsRestOperations.cs index df696011b15b9..8453583b71e7e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkVirtualApplianceConnectionsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkVirtualApplianceConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public NetworkVirtualApplianceConnectionsRestOperations(HttpPipeline pipeline, s { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkVirtualAppliancesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkVirtualAppliancesRestOperations.cs index 74c028a39ba74..8a9af983039d9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkVirtualAppliancesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkVirtualAppliancesRestOperations.cs @@ -32,7 +32,7 @@ public NetworkVirtualAppliancesRestOperations(HttpPipeline pipeline, string appl { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -482,6 +482,7 @@ public async Task RestartAsync(string subscriptionId, string resourceG switch (message.Response.Status) { case 200: + case 202: return message.Response; default: throw new RequestFailedException(message.Response); @@ -507,6 +508,7 @@ public Response Restart(string subscriptionId, string resourceGroupName, string switch (message.Response.Status) { case 200: + case 202: return message.Response; default: throw new RequestFailedException(message.Response); diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkWatchersRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkWatchersRestOperations.cs index be5b4d5638946..18fbc7c719a54 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkWatchersRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/NetworkWatchersRestOperations.cs @@ -32,7 +32,7 @@ public NetworkWatchersRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/P2SVpnGatewaysRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/P2SVpnGatewaysRestOperations.cs index 73bd9a3eb0de7..151c8ff343fd4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/P2SVpnGatewaysRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/P2SVpnGatewaysRestOperations.cs @@ -32,7 +32,7 @@ public P2SVpnGatewaysRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PacketCapturesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PacketCapturesRestOperations.cs index 176ea4594e4bd..c9bb0a96fff91 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PacketCapturesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PacketCapturesRestOperations.cs @@ -32,7 +32,7 @@ public PacketCapturesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PeerExpressRouteCircuitConnectionsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PeerExpressRouteCircuitConnectionsRestOperations.cs index 075cea4b0cb36..52636f9d12a51 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PeerExpressRouteCircuitConnectionsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PeerExpressRouteCircuitConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public PeerExpressRouteCircuitConnectionsRestOperations(HttpPipeline pipeline, s { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PrivateDnsZoneGroupsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PrivateDnsZoneGroupsRestOperations.cs index ff472827247bd..d2b924a4ae4cf 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PrivateDnsZoneGroupsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PrivateDnsZoneGroupsRestOperations.cs @@ -32,7 +32,7 @@ public PrivateDnsZoneGroupsRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PrivateEndpointsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PrivateEndpointsRestOperations.cs index 413f8f376b184..b91a4b173e4d5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PrivateEndpointsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PrivateEndpointsRestOperations.cs @@ -32,7 +32,7 @@ public PrivateEndpointsRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PrivateLinkServicesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PrivateLinkServicesRestOperations.cs index 68a4569b22d74..9284ef738a2a4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PrivateLinkServicesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PrivateLinkServicesRestOperations.cs @@ -32,7 +32,7 @@ public PrivateLinkServicesRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PublicIPAddressesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PublicIPAddressesRestOperations.cs index e2a4f50c76003..8a8c764a8793a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PublicIPAddressesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PublicIPAddressesRestOperations.cs @@ -32,7 +32,7 @@ public PublicIPAddressesRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PublicIPPrefixesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PublicIPPrefixesRestOperations.cs index 9771601e04f6c..5386f48b3fa2e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PublicIPPrefixesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/PublicIPPrefixesRestOperations.cs @@ -32,7 +32,7 @@ public PublicIPPrefixesRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ResourceNavigationLinksRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ResourceNavigationLinksRestOperations.cs index cd5f7fb985d11..db149324aeb27 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ResourceNavigationLinksRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ResourceNavigationLinksRestOperations.cs @@ -32,7 +32,7 @@ public ResourceNavigationLinksRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RouteFilterRulesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RouteFilterRulesRestOperations.cs index 9f694c050c905..7125339f37d9b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RouteFilterRulesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RouteFilterRulesRestOperations.cs @@ -32,7 +32,7 @@ public RouteFilterRulesRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RouteFiltersRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RouteFiltersRestOperations.cs index 92ac124bea6ea..70f720924e132 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RouteFiltersRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RouteFiltersRestOperations.cs @@ -32,7 +32,7 @@ public RouteFiltersRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RouteMapsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RouteMapsRestOperations.cs index 26e09bc0d98bc..db929d2388d50 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RouteMapsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RouteMapsRestOperations.cs @@ -32,7 +32,7 @@ public RouteMapsRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RouteTablesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RouteTablesRestOperations.cs index 5ccb676d239bb..eaee6e848eb69 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RouteTablesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RouteTablesRestOperations.cs @@ -32,7 +32,7 @@ public RouteTablesRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RoutesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RoutesRestOperations.cs index b218b8e8ab84f..a233db7046c88 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RoutesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RoutesRestOperations.cs @@ -32,7 +32,7 @@ public RoutesRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RoutingIntentRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RoutingIntentRestOperations.cs index df6bd409678ed..adc3bfc86a8f7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RoutingIntentRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/RoutingIntentRestOperations.cs @@ -32,7 +32,7 @@ public RoutingIntentRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ScopeConnectionsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ScopeConnectionsRestOperations.cs index 25faac42cfb2d..bd09b976737d0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ScopeConnectionsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ScopeConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public ScopeConnectionsRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SecurityAdminConfigurationsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SecurityAdminConfigurationsRestOperations.cs index 2be0ad3056b92..921d5d567d8d6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SecurityAdminConfigurationsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SecurityAdminConfigurationsRestOperations.cs @@ -32,7 +32,7 @@ public SecurityAdminConfigurationsRestOperations(HttpPipeline pipeline, string a { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SecurityPartnerProvidersRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SecurityPartnerProvidersRestOperations.cs index b64ca14cd5367..746204e767702 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SecurityPartnerProvidersRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SecurityPartnerProvidersRestOperations.cs @@ -32,7 +32,7 @@ public SecurityPartnerProvidersRestOperations(HttpPipeline pipeline, string appl { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SecurityRulesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SecurityRulesRestOperations.cs index d39090c1ac6d2..ea54300fe6491 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SecurityRulesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SecurityRulesRestOperations.cs @@ -32,7 +32,7 @@ public SecurityRulesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceAssociationLinksRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceAssociationLinksRestOperations.cs index ac09b70c1d529..d0269506d57d1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceAssociationLinksRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceAssociationLinksRestOperations.cs @@ -32,7 +32,7 @@ public ServiceAssociationLinksRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceEndpointPoliciesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceEndpointPoliciesRestOperations.cs index c23b1f3dd96ea..2ff28a76ada1d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceEndpointPoliciesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceEndpointPoliciesRestOperations.cs @@ -32,7 +32,7 @@ public ServiceEndpointPoliciesRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceEndpointPolicyDefinitionsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceEndpointPolicyDefinitionsRestOperations.cs index e4c5d716dcc01..a438877c24407 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceEndpointPolicyDefinitionsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceEndpointPolicyDefinitionsRestOperations.cs @@ -32,7 +32,7 @@ public ServiceEndpointPolicyDefinitionsRestOperations(HttpPipeline pipeline, str { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceTagInformationRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceTagInformationRestOperations.cs index 212078a02c0cf..cd4c0645f87c9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceTagInformationRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceTagInformationRestOperations.cs @@ -32,7 +32,7 @@ public ServiceTagInformationRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceTagsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceTagsRestOperations.cs index be0cc773e3d43..7544e52855931 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceTagsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/ServiceTagsRestOperations.cs @@ -32,7 +32,7 @@ public ServiceTagsRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/StaticMembersRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/StaticMembersRestOperations.cs index efd27fa5fbdcf..0cc1515771314 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/StaticMembersRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/StaticMembersRestOperations.cs @@ -32,7 +32,7 @@ public StaticMembersRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SubnetsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SubnetsRestOperations.cs index 5c862e38cab72..fc6b8643f23ab 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SubnetsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SubnetsRestOperations.cs @@ -32,7 +32,7 @@ public SubnetsRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SubscriptionNetworkManagerConnectionsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SubscriptionNetworkManagerConnectionsRestOperations.cs index a28c74b00da19..7bde65dc28256 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SubscriptionNetworkManagerConnectionsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/SubscriptionNetworkManagerConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public SubscriptionNetworkManagerConnectionsRestOperations(HttpPipeline pipeline { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/UsagesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/UsagesRestOperations.cs index 9403534ad8a51..87d92c751a8b5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/UsagesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/UsagesRestOperations.cs @@ -32,7 +32,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 ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VipSwapRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VipSwapRestOperations.cs index f2a08eac8b1e1..e0e90a6bec714 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VipSwapRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VipSwapRestOperations.cs @@ -32,7 +32,7 @@ public VipSwapRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualApplianceSitesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualApplianceSitesRestOperations.cs index 378e9260d0b0a..47c032dc557e1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualApplianceSitesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualApplianceSitesRestOperations.cs @@ -32,7 +32,7 @@ public VirtualApplianceSitesRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualApplianceSkusRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualApplianceSkusRestOperations.cs index 57d3068cd8df3..939a4a6c222c6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualApplianceSkusRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualApplianceSkusRestOperations.cs @@ -32,7 +32,7 @@ public VirtualApplianceSkusRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubBgpConnectionRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubBgpConnectionRestOperations.cs index d5cf8465120d6..1921f418b14b0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubBgpConnectionRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubBgpConnectionRestOperations.cs @@ -31,7 +31,7 @@ public VirtualHubBgpConnectionRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubBgpConnectionsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubBgpConnectionsRestOperations.cs index 4ee7edae83248..bcb5cc076fa1f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubBgpConnectionsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubBgpConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public VirtualHubBgpConnectionsRestOperations(HttpPipeline pipeline, string appl { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubIpConfigurationRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubIpConfigurationRestOperations.cs index 605f41c9c7d3e..7aa1b3cb33846 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubIpConfigurationRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubIpConfigurationRestOperations.cs @@ -32,7 +32,7 @@ public VirtualHubIpConfigurationRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubRouteTableV2SRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubRouteTableV2SRestOperations.cs index d42f7828f1f00..6e541c021b0ec 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubRouteTableV2SRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubRouteTableV2SRestOperations.cs @@ -32,7 +32,7 @@ public VirtualHubRouteTableV2SRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubsRestOperations.cs index 779f403476740..9ee0c4120f782 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualHubsRestOperations.cs @@ -32,7 +32,7 @@ public VirtualHubsRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkGatewayConnectionsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkGatewayConnectionsRestOperations.cs index 453cfeab0e2f3..adcbabc3b592d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkGatewayConnectionsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkGatewayConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public VirtualNetworkGatewayConnectionsRestOperations(HttpPipeline pipeline, str { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkGatewayNatRulesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkGatewayNatRulesRestOperations.cs index feb4b4529617a..d4f28e1abeafb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkGatewayNatRulesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkGatewayNatRulesRestOperations.cs @@ -32,7 +32,7 @@ public VirtualNetworkGatewayNatRulesRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkGatewaysRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkGatewaysRestOperations.cs index 8ae84755e00f3..a75fb5534833d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkGatewaysRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkGatewaysRestOperations.cs @@ -32,7 +32,7 @@ public VirtualNetworkGatewaysRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkPeeringsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkPeeringsRestOperations.cs index be9ba1e4680a8..fa3f84b3f35b2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkPeeringsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkPeeringsRestOperations.cs @@ -32,7 +32,7 @@ public VirtualNetworkPeeringsRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkTapsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkTapsRestOperations.cs index fdc5f855ab025..63f66bf1db9bc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkTapsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworkTapsRestOperations.cs @@ -32,7 +32,7 @@ public VirtualNetworkTapsRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworksRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworksRestOperations.cs index 723153e795ee9..2614cf7993e03 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworksRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualNetworksRestOperations.cs @@ -32,7 +32,7 @@ public VirtualNetworksRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualRouterPeeringsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualRouterPeeringsRestOperations.cs index 5e53014f1f803..f9a9092a82959 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualRouterPeeringsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualRouterPeeringsRestOperations.cs @@ -32,7 +32,7 @@ public VirtualRouterPeeringsRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualRoutersRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualRoutersRestOperations.cs index 57706171df49a..8928a04639e79 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualRoutersRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualRoutersRestOperations.cs @@ -32,7 +32,7 @@ public VirtualRoutersRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualWansRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualWansRestOperations.cs index dc7a8ead0156f..36d6820488124 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualWansRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VirtualWansRestOperations.cs @@ -32,7 +32,7 @@ public VirtualWansRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnConnectionsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnConnectionsRestOperations.cs index 2916896b3e332..173fba2b21c1d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnConnectionsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public VpnConnectionsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnGatewaysRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnGatewaysRestOperations.cs index e2b7aa59454bc..4f7cc10477f49 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnGatewaysRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnGatewaysRestOperations.cs @@ -32,7 +32,7 @@ public VpnGatewaysRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnLinkConnectionsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnLinkConnectionsRestOperations.cs index 524b612595ca7..91ff9adb19eb2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnLinkConnectionsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnLinkConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public VpnLinkConnectionsRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnServerConfigurationsAssociatedWithVirtualWanRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnServerConfigurationsAssociatedWithVirtualWanRestOperations.cs index 3d5b64f8f4d27..38039d7576663 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnServerConfigurationsAssociatedWithVirtualWanRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnServerConfigurationsAssociatedWithVirtualWanRestOperations.cs @@ -30,7 +30,7 @@ public VpnServerConfigurationsAssociatedWithVirtualWanRestOperations(HttpPipelin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnServerConfigurationsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnServerConfigurationsRestOperations.cs index d578ec141bb3b..d14ecdc440519 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnServerConfigurationsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnServerConfigurationsRestOperations.cs @@ -32,7 +32,7 @@ public VpnServerConfigurationsRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnSiteLinkConnectionsRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnSiteLinkConnectionsRestOperations.cs index f118391fedc3c..aea8515e0a993 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnSiteLinkConnectionsRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnSiteLinkConnectionsRestOperations.cs @@ -31,7 +31,7 @@ public VpnSiteLinkConnectionsRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnSiteLinksRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnSiteLinksRestOperations.cs index d0b29c923dd59..4c3b25b03a84c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnSiteLinksRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnSiteLinksRestOperations.cs @@ -32,7 +32,7 @@ public VpnSiteLinksRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnSitesConfigurationRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnSitesConfigurationRestOperations.cs index 304490164f8f9..e63b1404ef7c7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnSitesConfigurationRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnSitesConfigurationRestOperations.cs @@ -31,7 +31,7 @@ public VpnSitesConfigurationRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnSitesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnSitesRestOperations.cs index f333c9ff67475..1b549df9ac8b7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnSitesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/VpnSitesRestOperations.cs @@ -32,7 +32,7 @@ public VpnSitesRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/WebApplicationFirewallPoliciesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/WebApplicationFirewallPoliciesRestOperations.cs index 3c63a4d62659e..1df87584e0980 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/WebApplicationFirewallPoliciesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/WebApplicationFirewallPoliciesRestOperations.cs @@ -32,7 +32,7 @@ public WebApplicationFirewallPoliciesRestOperations(HttpPipeline pipeline, strin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/WebCategoriesRestOperations.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/WebCategoriesRestOperations.cs index c36ab1791f831..298e69d4b6a48 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/WebCategoriesRestOperations.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RestOperations/WebCategoriesRestOperations.cs @@ -32,7 +32,7 @@ public WebCategoriesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2024-01-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteCollection.cs index 325fc3d8e6e0c..3cfefff9cbeba 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsync(WaitU /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, s /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string routeName, Ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string routeName, CancellationToken c /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancellationToke /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string routeName, Cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string routeName, CancellationToken cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAsync(stri /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterCollection.cs index 73aa758ee8509..642af44fe3d14 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string routeFi /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string routeFilterName, string /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken cancellati /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string routeFilterName, st /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string routeFilterName, string expand = nul /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExistsAsyn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterResource.cs index 68c9019275fa1..5f61a5d9deaf2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterResource.cs @@ -110,7 +110,7 @@ public virtual RouteFilterRuleCollection GetRouteFilterRules() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetRouteFilterRuleA /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response GetRouteFilterRule(string ruleN /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(string expand /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -254,7 +254,7 @@ public virtual Response Get(string expand = null, Cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -296,7 +296,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -338,7 +338,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -380,7 +380,7 @@ public virtual async Task> UpdateAsync(NetworkTags /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -422,7 +422,7 @@ public virtual Response Update(NetworkTagsObject networkTag /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -484,7 +484,7 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -546,7 +546,7 @@ public virtual Response AddTag(string key, string value, Ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -603,7 +603,7 @@ public virtual async Task> SetTagsAsync(IDictionar /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -660,7 +660,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -720,7 +720,7 @@ public virtual async Task> RemoveTagAsync(string k /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterRuleCollection.cs index 753eba9c2182d..4e2f919d72f63 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string rul /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string ruleName, Cancellati /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string ruleName, Cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string ruleName, CancellationToken cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterRuleResource.cs index bccad2686fdb3..e74c6bd1d45d8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterRuleResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(Wai /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteMapCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteMapCollection.cs index 166886ad5f8aa..d538a7455e6b0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteMapCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteMapCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsync(Wa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string routeMapNa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string routeMapName, CancellationT /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancellationT /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string routeMapName, Cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string routeMapName, CancellationToken canc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAsync(s /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteMapResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteMapResource.cs index 2fcea10d9ed73..7235d229a3b1b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteMapResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteMapResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(CancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancellationToke /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(WaitUntil /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteResource.cs index 2c8f83942611a..928a1d22929e7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancellationToken = /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(WaitUntil wai /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteTableCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteTableCollection.cs index a3c6b949126cc..62509b7cfb315 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteTableCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteTableCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnt /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string routeTab /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string routeTableName, string ex /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken c /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string routeTableName, str /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string routeTableName, string expand = null /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExistsAsync /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteTableResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteTableResource.cs index 959a4123042f1..6ff5685cb65e5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteTableResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteTableResource.cs @@ -110,7 +110,7 @@ public virtual RouteCollection GetRoutes() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetRouteAsync(string routeNam /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response GetRoute(string routeName, CancellationTo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(string expand = /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -254,7 +254,7 @@ public virtual Response Get(string expand = null, Cancellati /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -296,7 +296,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -338,7 +338,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -380,7 +380,7 @@ public virtual async Task> UpdateAsync(NetworkTagsO /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -422,7 +422,7 @@ public virtual Response Update(NetworkTagsObject networkTags /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -484,7 +484,7 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -546,7 +546,7 @@ public virtual Response AddTag(string key, string value, Can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -603,7 +603,7 @@ public virtual async Task> SetTagsAsync(IDictionary /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -660,7 +660,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -720,7 +720,7 @@ public virtual async Task> RemoveTagAsync(string ke /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RoutingIntentCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RoutingIntentCollection.cs index f0ba73ef80ed0..4eef8397caa75 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RoutingIntentCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RoutingIntentCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string routi /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string routingIntentName, Can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToke /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string routingIntentName, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string routingIntentName, CancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RoutingIntentResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RoutingIntentResource.cs index f19dffb3eb0cc..235bbc5ecd4cc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RoutingIntentResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RoutingIntentResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(WaitU /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ScopeConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ScopeConnectionCollection.cs index 107f3195bea18..adc65da5d77cc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ScopeConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ScopeConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(string sco /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string scopeConnectionName, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsync(int? top = nul /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(int? top = null, string /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string scopeConnectionName /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string scopeConnectionName, CancellationTok /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ScopeConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ScopeConnectionResource.cs index 05fffdadf9ef6..e3c4287e2d233 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ScopeConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ScopeConnectionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task> UpdateAsync(Wai /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityAdminConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityAdminConfigurationCollection.cs index 6b539a736a149..d693fa70728bc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityAdminConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityAdminConfigurationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string configura /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsync(int /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(int? top = nu /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string configurationName, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string configurationName, CancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityAdminConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityAdminConfigurationResource.cs index 4d535c5baa3e2..cef841d226b0d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityAdminConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityAdminConfigurationResource.cs @@ -108,7 +108,7 @@ public virtual AdminRuleGroupCollection GetAdminRuleGroups() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> GetAdminRuleGroupAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response GetAdminRuleGroup(string ruleCol /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -293,7 +293,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? f /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -336,7 +336,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? force = null, Canc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -384,7 +384,7 @@ public virtual async Task> Upda /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityPartnerProviderCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityPartnerProviderCollection.cs index 03b9bf70fe445..a5b0ad0901722 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityPartnerProviderCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityPartnerProviderCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string securityPart /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToke /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string securityPartnerProv /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string securityPartnerProviderName, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityPartnerProviderResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityPartnerProviderResource.cs index 2c12e6754baa5..a8c0c450fc70b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityPartnerProviderResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityPartnerProviderResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -309,7 +309,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual Response Update(NetworkTagsObjec /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -413,7 +413,7 @@ public virtual async Task> AddTagAsync /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -475,7 +475,7 @@ public virtual Response AddTag(string key, stri /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -532,7 +532,7 @@ public virtual async Task> SetTagsAsyn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -589,7 +589,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -649,7 +649,7 @@ public virtual async Task> RemoveTagAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityRuleCollection.cs index de76b5479c48f..d987672512372 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsyn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitU /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string securi /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string securityRuleName, Cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string securityRuleName, C /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string securityRuleName, CancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityRuleResource.cs index 32fc05abf82d9..391a2b489a152 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityRuleResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(CancellationT /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancellation /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(WaitUn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyCollection.cs index 1ec568e7e8057..24dab54b9b1de 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string serviceEndpoin /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string serviceEndpointPoli /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string serviceEndpointPolicyName, string ex /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyDefinitionCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyDefinitionCollection.cs index c08c8e32a5747..15e84880b129b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyDefinitionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyDefinitionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpd /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string serv /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsyn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string serviceEndpointPoli /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string serviceEndpointPolicyDefinitionName, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyDefinitionResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyDefinitionResource.cs index bbe05b322af52..e7d2d530e19d5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyDefinitionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyDefinitionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyResource.cs index e4a88aefdfcae..7707e25c26c8d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyResource.cs @@ -110,7 +110,7 @@ public virtual ServiceEndpointPolicyDefinitionCollection GetServiceEndpointPolic /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response GetServiceEndpo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -254,7 +254,7 @@ public virtual Response Get(string expand = null, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -296,7 +296,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -338,7 +338,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -380,7 +380,7 @@ public virtual async Task> UpdateAsync(N /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -422,7 +422,7 @@ public virtual Response Update(NetworkTagsObject /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -484,7 +484,7 @@ public virtual async Task> AddTagAsync(s /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -546,7 +546,7 @@ public virtual Response AddTag(string key, string /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -603,7 +603,7 @@ public virtual async Task> SetTagsAsync( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -660,7 +660,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -720,7 +720,7 @@ public virtual async Task> RemoveTagAsyn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/SubnetCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/SubnetCollection.cs index 9dacf314d43c0..1d08268bc927a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/SubnetCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/SubnetCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsync(Wait /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string subnetName, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -254,7 +254,7 @@ public virtual Response Get(string subnetName, string expand = n /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -284,7 +284,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(CancellationToken cancellationTok /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual async Task> ExistsAsync(string subnetName, string /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string subnetName, string expand = null, Ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task> GetIfExistsAsync(str /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/SubnetResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/SubnetResource.cs index 6d2b0d151e008..ab826873d68c2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/SubnetResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/SubnetResource.cs @@ -111,7 +111,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -152,7 +152,7 @@ public virtual async Task> GetAsync(string expand = nul /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -193,7 +193,7 @@ public virtual Response Get(string expand = null, CancellationTo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -235,7 +235,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -277,7 +277,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -323,7 +323,7 @@ public virtual async Task> UpdateAsync(WaitUntil wa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -369,7 +369,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, SubnetDa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -415,7 +415,7 @@ public virtual async Task PrepareNetworkPoliciesAsync(WaitUntil wa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -461,7 +461,7 @@ public virtual ArmOperation PrepareNetworkPolicies(WaitUntil waitUntil, PrepareN /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -507,7 +507,7 @@ public virtual async Task UnprepareNetworkPoliciesAsync(WaitUntil /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -553,7 +553,7 @@ public virtual ArmOperation UnprepareNetworkPolicies(WaitUntil waitUntil, Unprep /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -578,7 +578,7 @@ public virtual AsyncPageable GetResourceNavigationLinksA /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -603,7 +603,7 @@ public virtual Pageable GetResourceNavigationLinks(Cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -628,7 +628,7 @@ public virtual AsyncPageable GetServiceAssociationLinksA /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/SubscriptionNetworkManagerConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/SubscriptionNetworkManagerConnectionCollection.cs index 8f7232ec3baf5..b678ddb050e25 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/SubscriptionNetworkManagerConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/SubscriptionNetworkManagerConnectionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation Create /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -289,7 +289,7 @@ public virtual AsyncPageable GetAl /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual Pageable GetAll(int /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual async Task> ExistsAsync(string networkManagerConne /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -407,7 +407,7 @@ public virtual Response Exists(string networkManagerConnectionName, Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -452,7 +452,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/SubscriptionNetworkManagerConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/SubscriptionNetworkManagerConnectionResource.cs index 438f92676c963..abeda4a49d6ae 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/SubscriptionNetworkManagerConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/SubscriptionNetworkManagerConnectionResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -268,7 +268,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualApplianceSiteCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualApplianceSiteCollection.cs index bd66ccb1ea90e..d36383b8e2979 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualApplianceSiteCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualApplianceSiteCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string siteName, Cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken c /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string siteName, Cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string siteName, CancellationToken cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualApplianceSiteResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualApplianceSiteResource.cs index 0520ebc72b80f..018d815b62e82 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualApplianceSiteResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualApplianceSiteResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsyn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubCollection.cs index dd1fd666d1bda..c651b7a050778 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnt /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string virtualH /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string virtualHubName, Cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken c /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string virtualHubName, Can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string virtualHubName, CancellationToken ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsAsync /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubResource.cs index 4be831d170e2c..a6062041cff54 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubResource.cs @@ -110,7 +110,7 @@ public virtual RouteMapCollection GetRouteMaps() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetRouteMapAsync(string ro /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -179,7 +179,7 @@ public virtual HubVirtualNetworkConnectionCollection GetHubVirtualNetworkConnect /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetHubV /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -248,7 +248,7 @@ public virtual VirtualHubRouteTableV2Collection GetVirtualHubRouteTableV2s() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -279,7 +279,7 @@ public virtual async Task> GetVirtualHu /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual BgpConnectionCollection GetBgpConnections() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -348,7 +348,7 @@ public virtual async Task> GetBgpConnectionAsync /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -386,7 +386,7 @@ public virtual HubIPConfigurationCollection GetHubIPConfigurations() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -417,7 +417,7 @@ public virtual async Task> GetHubIPConfigur /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual HubRouteTableCollection GetHubRouteTables() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -486,7 +486,7 @@ public virtual async Task> GetHubRouteTableAsync /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -524,7 +524,7 @@ public virtual RoutingIntentCollection GetRoutingIntents() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -555,7 +555,7 @@ public virtual async Task> GetRoutingIntentAsync /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -586,7 +586,7 @@ public virtual Response GetRoutingIntent(string routingIn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -626,7 +626,7 @@ public virtual async Task> GetAsync(CancellationTok /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -666,7 +666,7 @@ public virtual Response Get(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -708,7 +708,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -750,7 +750,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -792,7 +792,7 @@ public virtual async Task> UpdateAsync(NetworkTagsO /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -834,7 +834,7 @@ public virtual Response Update(NetworkTagsObject virtualHubP /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -877,7 +877,7 @@ public virtual async Task> GetVirtual /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -920,7 +920,7 @@ public virtual ArmOperation GetVirtualHubEffective /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -966,7 +966,7 @@ public virtual async Task> GetVirtualHu /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1012,7 +1012,7 @@ public virtual ArmOperation GetVirtualHubInboundRout /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1058,7 +1058,7 @@ public virtual async Task> GetVirtualHu /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1104,7 +1104,7 @@ public virtual ArmOperation GetVirtualHubOutboundRou /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1166,7 +1166,7 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1228,7 +1228,7 @@ public virtual Response AddTag(string key, string value, Can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1285,7 +1285,7 @@ public virtual async Task> SetTagsAsync(IDictionary /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1342,7 +1342,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1402,7 +1402,7 @@ public virtual async Task> RemoveTagAsync(string ke /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubRouteTableV2Collection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubRouteTableV2Collection.cs index c7d868786b7cd..ddeb8ebd69f74 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubRouteTableV2Collection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubRouteTableV2Collection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOr /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitU /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string routeTableNam /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string routeTableName, Can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string routeTableName, CancellationToken ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubRouteTableV2Resource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubRouteTableV2Resource.cs index e2e8451ba55f5..bfe8639d0c718 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubRouteTableV2Resource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubRouteTableV2Resource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkCollection.cs index fc22161e7d12e..c59d85e0daed5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string virt /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string virtualNetworkName, s /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string virtualNetworkName, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string virtualNetworkName, string expand = /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayCollection.cs index 6438e3704cc84..1d01592614a58 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string virtualNetwork /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string virtualNetworkGatew /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string virtualNetworkGatewayName, Cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayConnectionCollection.cs index 4a974ad6d9d5a..a736d8dbb542c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayConnectionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpd /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string virt /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsyn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(Cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string virtualNetworkGatew /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string virtualNetworkGatewayConnectionName, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayConnectionResource.cs index b0b036c6f96b4..cc46ef8697e0b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayConnectionResource.cs @@ -108,7 +108,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -148,7 +148,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -188,7 +188,7 @@ public virtual Response Get(Cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -230,7 +230,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual ArmOperation Update(Wait /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual async Task> VpnDeviceConfigurationScriptAsync(Vp /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -448,7 +448,7 @@ public virtual Response VpnDeviceConfigurationScript(VpnDeviceScriptCont /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -494,7 +494,7 @@ public virtual async Task> SetSharedKeyAsync(W /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -540,7 +540,7 @@ public virtual ArmOperation SetSharedKey(WaitUntil waitUnti /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -578,7 +578,7 @@ public virtual async Task> GetSharedKeyAsync(Cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -616,7 +616,7 @@ public virtual Response GetSharedKey(CancellationToken canc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -662,7 +662,7 @@ public virtual async Task> ResetSharedKey /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -708,7 +708,7 @@ public virtual ArmOperation ResetSharedKey(WaitUntil w /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -751,7 +751,7 @@ public virtual async Task> StartPacketCaptureAsync(WaitUnti /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -794,7 +794,7 @@ public virtual ArmOperation StartPacketCapture(WaitUntil waitUntil, VpnP /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -840,7 +840,7 @@ public virtual async Task> StopPacketCaptureAsync(WaitUntil /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -886,7 +886,7 @@ public virtual ArmOperation StopPacketCapture(WaitUntil waitUntil, VpnPa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -928,7 +928,7 @@ public virtual async Task> GetIkeSasAsync(WaitUntil waitUnt /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -970,7 +970,7 @@ public virtual ArmOperation GetIkeSas(WaitUntil waitUntil, CancellationT /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1012,7 +1012,7 @@ public virtual async Task ResetConnectionAsync(WaitUntil waitUntil /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1054,7 +1054,7 @@ public virtual ArmOperation ResetConnection(WaitUntil waitUntil, CancellationTok /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1116,7 +1116,7 @@ public virtual async Task> Add /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1178,7 +1178,7 @@ public virtual Response AddTag(string k /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1235,7 +1235,7 @@ public virtual async Task> Set /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1292,7 +1292,7 @@ public virtual Response SetTags(IDictio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1352,7 +1352,7 @@ public virtual async Task> Rem /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayData.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayData.Serialization.cs index d22a2623183b7..fe8e7afe5d349 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayData.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayData.Serialization.cs @@ -10,6 +10,7 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; +using Azure.ResourceManager.Models; using Azure.ResourceManager.Network.Models; using Azure.ResourceManager.Resources.Models; @@ -38,6 +39,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WritePropertyName("etag"u8); writer.WriteStringValue(ETag.Value.ToString()); } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + JsonSerializer.Serialize(writer, Identity); + } if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); @@ -252,6 +258,7 @@ internal static VirtualNetworkGatewayData DeserializeVirtualNetworkGatewayData(J } ExtendedLocation extendedLocation = default; ETag? etag = default; + ManagedServiceIdentity identity = default; ResourceIdentifier id = default; string name = default; ResourceType? type = default; @@ -304,6 +311,15 @@ internal static VirtualNetworkGatewayData DeserializeVirtualNetworkGatewayData(J etag = new ETag(property.Value.GetString()); continue; } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } if (property.NameEquals("id"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -613,6 +629,7 @@ internal static VirtualNetworkGatewayData DeserializeVirtualNetworkGatewayData(J serializedAdditionalRawData, extendedLocation, etag, + identity, autoScaleConfiguration, ipConfigurations ?? new ChangeTrackingList(), gatewayType, diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayData.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayData.cs index abd58a799b512..fcbdb93d5985b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayData.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayData.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using Azure.Core; +using Azure.ResourceManager.Models; using Azure.ResourceManager.Network.Models; using Azure.ResourceManager.Resources.Models; @@ -36,6 +37,7 @@ public VirtualNetworkGatewayData() /// Keeps track of any properties unknown to the library. /// The extended location of type local virtual network gateway. /// A unique read-only string that changes whenever the resource is updated. + /// The identity of the virtual network gateway, if configured. /// Autoscale configuration for virutal network gateway. /// IP configurations for virtual network gateway. /// The type of this virtual network gateway. @@ -61,10 +63,11 @@ public VirtualNetworkGatewayData() /// Configures this gateway to accept traffic from remote Virtual WAN networks. /// Configure this gateway to accept traffic from other Azure Virtual Networks. This configuration does not support connectivity to Azure Virtual WAN. /// Property to indicate if the Express Route Gateway serves traffic when there are multiple Express Route Gateways in the vnet. - internal VirtualNetworkGatewayData(ResourceIdentifier id, string name, ResourceType? resourceType, AzureLocation? location, IDictionary tags, IDictionary serializedAdditionalRawData, ExtendedLocation extendedLocation, ETag? etag, VirtualNetworkGatewayAutoScaleConfiguration autoScaleConfiguration, IList ipConfigurations, VirtualNetworkGatewayType? gatewayType, VpnType? vpnType, VpnGatewayGeneration? vpnGatewayGeneration, bool? enableBgp, bool? enablePrivateIPAddress, bool? active, bool? disableIPSecReplayProtection, WritableSubResource gatewayDefaultSite, VirtualNetworkGatewaySku sku, VpnClientConfiguration vpnClientConfiguration, IList virtualNetworkGatewayPolicyGroups, BgpSettings bgpSettings, AddressSpace customRoutes, Guid? resourceGuid, NetworkProvisioningState? provisioningState, bool? enableDnsForwarding, string inboundDnsForwardingEndpoint, ResourceIdentifier vNetExtendedLocationResourceId, IList natRules, bool? enableBgpRouteTranslationForNat, bool? allowVirtualWanTraffic, bool? allowRemoteVnetTraffic, ExpressRouteGatewayAdminState? adminState) : base(id, name, resourceType, location, tags, serializedAdditionalRawData) + internal VirtualNetworkGatewayData(ResourceIdentifier id, string name, ResourceType? resourceType, AzureLocation? location, IDictionary tags, IDictionary serializedAdditionalRawData, ExtendedLocation extendedLocation, ETag? etag, ManagedServiceIdentity identity, VirtualNetworkGatewayAutoScaleConfiguration autoScaleConfiguration, IList ipConfigurations, VirtualNetworkGatewayType? gatewayType, VpnType? vpnType, VpnGatewayGeneration? vpnGatewayGeneration, bool? enableBgp, bool? enablePrivateIPAddress, bool? active, bool? disableIPSecReplayProtection, WritableSubResource gatewayDefaultSite, VirtualNetworkGatewaySku sku, VpnClientConfiguration vpnClientConfiguration, IList virtualNetworkGatewayPolicyGroups, BgpSettings bgpSettings, AddressSpace customRoutes, Guid? resourceGuid, NetworkProvisioningState? provisioningState, bool? enableDnsForwarding, string inboundDnsForwardingEndpoint, ResourceIdentifier vNetExtendedLocationResourceId, IList natRules, bool? enableBgpRouteTranslationForNat, bool? allowVirtualWanTraffic, bool? allowRemoteVnetTraffic, ExpressRouteGatewayAdminState? adminState) : base(id, name, resourceType, location, tags, serializedAdditionalRawData) { ExtendedLocation = extendedLocation; ETag = etag; + Identity = identity; AutoScaleConfiguration = autoScaleConfiguration; IPConfigurations = ipConfigurations; GatewayType = gatewayType; @@ -96,6 +99,8 @@ internal VirtualNetworkGatewayData(ResourceIdentifier id, string name, ResourceT public ExtendedLocation ExtendedLocation { get; set; } /// A unique read-only string that changes whenever the resource is updated. public ETag? ETag { get; } + /// The identity of the virtual network gateway, if configured. + public ManagedServiceIdentity Identity { get; set; } /// Autoscale configuration for virutal network gateway. internal VirtualNetworkGatewayAutoScaleConfiguration AutoScaleConfiguration { get; set; } /// The bounds of the autoscale configuration. diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayNatRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayNatRuleCollection.cs index 1d5d85306c0da..63fa6d806bf08 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayNatRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayNatRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Cr /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string natRule /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(C /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string natRuleName, Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string natRuleName, CancellationToken cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayNatRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayNatRuleResource.cs index 057ddf220324c..16166067544f7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayNatRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayNatRuleResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationTo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> Up /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayResource.cs index 732c71a20ec89..303bfa36a166e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayResource.cs @@ -111,7 +111,7 @@ public virtual VirtualNetworkGatewayNatRuleCollection GetVirtualNetworkGatewayNa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetVir /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -173,7 +173,7 @@ public virtual Response GetVirtualNetworkG /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -295,7 +295,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -337,7 +337,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -383,7 +383,7 @@ public virtual async Task> UpdateAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -429,7 +429,7 @@ public virtual ArmOperation Update(WaitUntil wait /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -459,7 +459,7 @@ public virtual AsyncPageable GetConne /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -489,7 +489,7 @@ public virtual Pageable GetConnection /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -532,7 +532,7 @@ public virtual async Task> ResetAsyn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -575,7 +575,7 @@ public virtual ArmOperation Reset(WaitUntil waitU /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -617,7 +617,7 @@ public virtual async Task ResetVpnClientSharedKeyAsync(WaitUntil w /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -659,7 +659,7 @@ public virtual ArmOperation ResetVpnClientSharedKey(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -705,7 +705,7 @@ public virtual async Task> GenerateVpnClientPackageAsync(Wa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -751,7 +751,7 @@ public virtual ArmOperation GenerateVpnClientPackage(WaitUntil waitUntil /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -797,7 +797,7 @@ public virtual async Task> GenerateVpnProfileAsync(WaitUnti /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -843,7 +843,7 @@ public virtual ArmOperation GenerateVpnProfile(WaitUntil waitUntil, VpnC /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -885,7 +885,7 @@ public virtual async Task> GetVpnProfilePackageUrlAsync(Wai /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -927,7 +927,7 @@ public virtual ArmOperation GetVpnProfilePackageUrl(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -970,7 +970,7 @@ public virtual async Task> GetBgpPeerStatu /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1013,7 +1013,7 @@ public virtual ArmOperation GetBgpPeerStatus(WaitUntil /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1051,7 +1051,7 @@ public virtual async Task> SupportedVpnDevicesAsync(Cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1089,7 +1089,7 @@ public virtual Response SupportedVpnDevices(CancellationToken cancellati /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1131,7 +1131,7 @@ public virtual async Task> GetLearnedRoutes /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1173,7 +1173,7 @@ public virtual ArmOperation GetLearnedRoutes(WaitUntil w /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1219,7 +1219,7 @@ public virtual async Task> GetAdvertisedRou /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1265,7 +1265,7 @@ public virtual ArmOperation GetAdvertisedRoutes(WaitUnti /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1311,7 +1311,7 @@ public virtual async Task> SetVpnclientIP /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1357,7 +1357,7 @@ public virtual ArmOperation SetVpnclientIPsecParameter /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1399,7 +1399,7 @@ public virtual async Task> GetVpnclientIP /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1441,7 +1441,7 @@ public virtual ArmOperation GetVpnclientIPsecParameter /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1484,7 +1484,7 @@ public virtual async Task> StartPacketCaptureAsync(WaitUnti /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1527,7 +1527,7 @@ public virtual ArmOperation StartPacketCapture(WaitUntil waitUntil, VpnP /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1573,7 +1573,7 @@ public virtual async Task> StopPacketCaptureAsync(WaitUntil /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1619,7 +1619,7 @@ public virtual ArmOperation StopPacketCapture(WaitUntil waitUntil, VpnPa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1661,7 +1661,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1703,7 +1703,7 @@ public virtual ArmOperation GetVpncli /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1749,7 +1749,7 @@ public virtual async Task DisconnectVirtualNetworkGatewayVpnConnec /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1795,7 +1795,7 @@ public virtual ArmOperation DisconnectVirtualNetworkGatewayVpnConnections(WaitUn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1857,7 +1857,7 @@ public virtual async Task> AddTagAsync(s /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1919,7 +1919,7 @@ public virtual Response AddTag(string key, string /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1976,7 +1976,7 @@ public virtual async Task> SetTagsAsync( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2033,7 +2033,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -2093,7 +2093,7 @@ public virtual async Task> RemoveTagAsyn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkPeeringCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkPeeringCollection.cs index 624dc9fa632e5..93933827d62a5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkPeeringCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkPeeringCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string virtualNetwork /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual async Task> ExistsAsync(string virtualNetworkPeeri /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -401,7 +401,7 @@ public virtual Response Exists(string virtualNetworkPeeringName, Cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -446,7 +446,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkPeeringResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkPeeringResource.cs index c3860250288f1..627abe04eeed6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkPeeringResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkPeeringResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkResource.cs index d7e5b59aa4c2d..bcdc0048dce0d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkResource.cs @@ -116,7 +116,7 @@ public virtual SubnetCollection GetSubnets() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -148,7 +148,7 @@ public virtual async Task> GetSubnetAsync(string subnet /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -187,7 +187,7 @@ public virtual VirtualNetworkPeeringCollection GetVirtualNetworkPeerings() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -218,7 +218,7 @@ public virtual async Task> GetVirtualNet /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -249,7 +249,7 @@ public virtual Response GetVirtualNetworkPeering( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -290,7 +290,7 @@ public virtual async Task> GetAsync(string expa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -331,7 +331,7 @@ public virtual Response Get(string expand = null, Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -373,7 +373,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -415,7 +415,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -457,7 +457,7 @@ public virtual async Task> UpdateAsync(NetworkT /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -499,7 +499,7 @@ public virtual Response Update(NetworkTagsObject network /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -533,7 +533,7 @@ public virtual AsyncPageable GetNetworkManag /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -567,7 +567,7 @@ public virtual Pageable GetNetworkManagerEff /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -601,7 +601,7 @@ public virtual AsyncPageable GetNetworkManagerEf /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -635,7 +635,7 @@ public virtual Pageable GetNetworkManagerEffecti /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -677,7 +677,7 @@ public virtual async Task> CheckIPAddressA /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -719,7 +719,7 @@ public virtual Response CheckIPAddressAvailability( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -749,7 +749,7 @@ public virtual AsyncPageable GetUsageAsync(CancellationToke /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -779,7 +779,7 @@ public virtual Pageable GetUsage(CancellationToken cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -841,7 +841,7 @@ public virtual async Task> AddTagAsync(string k /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -903,7 +903,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -960,7 +960,7 @@ public virtual async Task> SetTagsAsync(IDictio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1017,7 +1017,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1077,7 +1077,7 @@ public virtual async Task> RemoveTagAsync(strin /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkTapCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkTapCollection.cs index 4102ae4615903..d7b1a7eb6de32 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkTapCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkTapCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string t /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string tapName, Cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancellation /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken canc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string tapName, Cancellati /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string tapName, CancellationToken cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkTapResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkTapResource.cs index f8b6a116ae90a..4b1d906584149 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkTapResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkTapResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -309,7 +309,7 @@ public virtual async Task> UpdateAsync(Netwo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual Response Update(NetworkTagsObject tapP /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -413,7 +413,7 @@ public virtual async Task> AddTagAsync(strin /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -475,7 +475,7 @@ public virtual Response AddTag(string key, string val /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -532,7 +532,7 @@ public virtual async Task> SetTagsAsync(IDic /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -589,7 +589,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -649,7 +649,7 @@ public virtual async Task> RemoveTagAsync(st /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterCollection.cs index e37cb3be47339..d7fe890c77e40 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string virtu /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string virtualRouterName, str /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToke /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(CancellationToken cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string virtualRouterName, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string virtualRouterName, string expand = n /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterPeeringCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterPeeringCollection.cs index 649ea2e42eee4..a604efb9a3562 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterPeeringCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterPeeringCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string peeringName, Ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken c /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string peeringName, Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string peeringName, CancellationToken cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterPeeringResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterPeeringResource.cs index 0f4f1ed0dba65..ba73cf3cfd636 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterPeeringResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterPeeringResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsyn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterResource.cs index ddf1986e1065e..1df5112946618 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterResource.cs @@ -109,7 +109,7 @@ public virtual VirtualRouterPeeringCollection GetVirtualRouterPeerings() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetVirtualRout /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -171,7 +171,7 @@ public virtual Response GetVirtualRouterPeering(st /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(string expan /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string expand = null, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -295,7 +295,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -337,7 +337,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -383,7 +383,7 @@ public virtual async Task> UpdateAsync(WaitU /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -429,7 +429,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, V /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -486,7 +486,7 @@ public virtual async Task> AddTagAsync(string ke /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -543,7 +543,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -599,7 +599,7 @@ public virtual async Task> SetTagsAsync(IDiction /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -655,7 +655,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -710,7 +710,7 @@ public virtual async Task> RemoveTagAsync(string /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualWanCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualWanCollection.cs index ce2ce59608e5e..b5462be6bf34d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualWanCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualWanCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnt /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string virtualW /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string virtualWanName, Cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken c /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string virtualWanName, Can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string virtualWanName, CancellationToken ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsAsync /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualWanResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualWanResource.cs index 6b85e2c95e436..af43af72e4dca 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualWanResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualWanResource.cs @@ -116,7 +116,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -156,7 +156,7 @@ public virtual async Task> GetAsync(CancellationTok /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -196,7 +196,7 @@ public virtual Response Get(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -238,7 +238,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -280,7 +280,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -322,7 +322,7 @@ public virtual async Task> UpdateAsync(NetworkTagsO /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual Response Update(NetworkTagsObject wanParamete /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual async Task> SupportedSecuri /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -440,7 +440,7 @@ public virtual Response SupportedSecurityProviders( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -486,7 +486,7 @@ public virtual async Task> GenerateVirtualWanVp /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -532,7 +532,7 @@ public virtual ArmOperation GenerateVirtualWanVpnServerConfi /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -574,7 +574,7 @@ public virtual async Task DownloadVpnSitesConfigurationAsync(WaitU /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -616,7 +616,7 @@ public virtual ArmOperation DownloadVpnSitesConfiguration(WaitUntil waitUntil, G /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -654,7 +654,7 @@ public virtual async Task> GetVpnS /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// @@ -692,7 +692,7 @@ public virtual ArmOperation GetVpnServerConfigu /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -754,7 +754,7 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -816,7 +816,7 @@ public virtual Response AddTag(string key, string value, Can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -873,7 +873,7 @@ public virtual async Task> SetTagsAsync(IDictionary /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -930,7 +930,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -990,7 +990,7 @@ public virtual async Task> RemoveTagAsync(string ke /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnConnectionCollection.cs index 1799de18dd809..d10ea755a99aa 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string conne /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string connectionName, Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToke /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string connectionName, Can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string connectionName, CancellationToken ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnConnectionResource.cs index 94c9c2d680f70..21e365744db01 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnConnectionResource.cs @@ -109,7 +109,7 @@ public virtual VpnSiteLinkConnectionCollection GetVpnSiteLinkConnections() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetVpnSiteLin /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -171,7 +171,7 @@ public virtual Response GetVpnSiteLinkConnection( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -251,7 +251,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -293,7 +293,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -335,7 +335,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -381,7 +381,7 @@ public virtual async Task> UpdateAsync(WaitU /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -427,7 +427,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, V /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -470,7 +470,7 @@ public virtual async Task> StartPacketCaptureAsync(WaitUnti /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -513,7 +513,7 @@ public virtual ArmOperation StartPacketCapture(WaitUntil waitUntil, VpnC /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -556,7 +556,7 @@ public virtual async Task> StopPacketCaptureAsync(WaitUntil /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayCollection.cs index 702d67cb0ee70..a0eae54185a38 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnt /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string gatewayN /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string gatewayName, Cancellation /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken c /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string gatewayName, Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string gatewayName, CancellationToken cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsAsync /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayNatRuleCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayNatRuleCollection.cs index 063ce1efb0957..0254b72c9ba3c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayNatRuleCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayNatRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string n /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string natRuleName, Cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancellation /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken canc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string natRuleName, Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string natRuleName, CancellationToken cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayNatRuleResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayNatRuleResource.cs index fbe3db45773d8..6e4c3f0026f7d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayNatRuleResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayNatRuleResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(W /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayResource.cs index 0ec1353be101c..52b19f13d4743 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayResource.cs @@ -110,7 +110,7 @@ public virtual VpnConnectionCollection GetVpnConnections() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetVpnConnectionAsync /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -179,7 +179,7 @@ public virtual VpnGatewayNatRuleCollection GetVpnGatewayNatRules() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetVpnGatewayNatR /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response GetVpnGatewayNatRule(string n /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -281,7 +281,7 @@ public virtual async Task> GetAsync(CancellationTok /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual Response Get(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -405,7 +405,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> UpdateAsync(WaitUnti /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -497,7 +497,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Netw /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -540,7 +540,7 @@ public virtual async Task> ResetAsync(WaitUntil /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -583,7 +583,7 @@ public virtual ArmOperation Reset(WaitUntil waitUntil, strin /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -626,7 +626,7 @@ public virtual async Task> StartPacketCaptureAsync(WaitUnti /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -669,7 +669,7 @@ public virtual ArmOperation StartPacketCapture(WaitUntil waitUntil, VpnG /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -712,7 +712,7 @@ public virtual async Task> StopPacketCaptureAsync(WaitUntil /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -755,7 +755,7 @@ public virtual ArmOperation StopPacketCapture(WaitUntil waitUntil, VpnGa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -817,7 +817,7 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -879,7 +879,7 @@ public virtual Response AddTag(string key, string value, Can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -936,7 +936,7 @@ public virtual async Task> SetTagsAsync(IDictionary /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -993,7 +993,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -1053,7 +1053,7 @@ public virtual async Task> RemoveTagAsync(string ke /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationCollection.cs index fbc5d8d622256..afd913f543413 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOr /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitU /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string vpnServerConf /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string vpnServerConfigurat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string vpnServerConfigurationName, Cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationPolicyGroupCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationPolicyGroupCollection.cs index de30d72226054..2e2bcb1bc6ae1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationPolicyGroupCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationPolicyGroupCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrU /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string co /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string configurationPolicy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string configurationPolicyGroupName, Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationPolicyGroupResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationPolicyGroupResource.cs index 7d0b702684270..bba2606f305f6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationPolicyGroupResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationPolicyGroupResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cancellat /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationResource.cs index ce1dee836c8ef..8906d3edeba9d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationResource.cs @@ -110,7 +110,7 @@ public virtual VpnServerConfigurationPolicyGroupCollection GetVpnServerConfigura /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response GetVpnServerC /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(Can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(CancellationToken ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -336,7 +336,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -378,7 +378,7 @@ public virtual async Task> UpdateAsync( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -420,7 +420,7 @@ public virtual Response Update(NetworkTagsObject /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -482,7 +482,7 @@ public virtual async Task> AddTagAsync( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -544,7 +544,7 @@ public virtual Response AddTag(string key, strin /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -601,7 +601,7 @@ public virtual async Task> SetTagsAsync /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -658,7 +658,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -718,7 +718,7 @@ public virtual async Task> RemoveTagAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteCollection.cs index 6120e17133001..8dd5be9b60fc5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync(Wai /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string vpnSiteName /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string vpnSiteName, CancellationTok /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken canc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string vpnSiteName, Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string vpnSiteName, CancellationToken cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsAsync(st /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkCollection.cs index d2348ddb21ced..fffbda5ffb1f5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string vpnSite /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string vpnSiteLinkName, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken cancellati /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string vpnSiteLinkName, Ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string vpnSiteLinkName, CancellationToken c /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExistsAsyn /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkConnectionCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkConnectionCollection.cs index d76ae461eda71..5046502749ad2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkConnectionCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkConnectionCollection.cs @@ -69,7 +69,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -159,7 +159,7 @@ public virtual Response Get(string linkConnection /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -189,7 +189,7 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -219,7 +219,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -262,7 +262,7 @@ public virtual async Task> ExistsAsync(string linkConnectionName, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -305,7 +305,7 @@ public virtual Response Exists(string linkConnectionName, CancellationToke /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -350,7 +350,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkConnectionResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkConnectionResource.cs index 53faec8d65c59..bc24ad1194b64 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkConnectionResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkConnectionResource.cs @@ -107,7 +107,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -147,7 +147,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -187,7 +187,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task ResetConnectionVpnLinkConnectionAsync(Wa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation ResetConnectionVpnLinkConnection(WaitUntil waitUntil /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> GetIkeSasVpnLinkConnectionAsync( /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkResource.cs index 1e5715f37a56f..67fbab064ae15 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(CancellationTo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteResource.cs index 3b312701d27b2..ef9e292c90c6e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteResource.cs @@ -110,7 +110,7 @@ public virtual VpnSiteLinkCollection GetVpnSiteLinks() /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetVpnSiteLinkAsync(str /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response GetVpnSiteLink(string vpnSiteLinkNa /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(CancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(CancellationToken cancellationToken /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -336,7 +336,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -378,7 +378,7 @@ public virtual async Task> UpdateAsync(NetworkTagsObje /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -420,7 +420,7 @@ public virtual Response Update(NetworkTagsObject vpnSiteParamet /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -482,7 +482,7 @@ public virtual async Task> AddTagAsync(string key, str /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -544,7 +544,7 @@ public virtual Response AddTag(string key, string value, Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -601,7 +601,7 @@ public virtual async Task> SetTagsAsync(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -658,7 +658,7 @@ public virtual Response SetTags(IDictionary tag /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -718,7 +718,7 @@ public virtual async Task> RemoveTagAsync(string key, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/WebApplicationFirewallPolicyCollection.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/WebApplicationFirewallPolicyCollection.cs index 55e904bb3911e..cf4a300df4711 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/WebApplicationFirewallPolicyCollection.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/WebApplicationFirewallPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> Cr /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string policyN /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(C /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll(Cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string policyName, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string policyName, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/WebApplicationFirewallPolicyResource.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/WebApplicationFirewallPolicyResource.cs index e2f163d44fba1..05e13f0bf0770 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/WebApplicationFirewallPolicyResource.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/WebApplicationFirewallPolicyResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationTo /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual async Task> Up /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -362,7 +362,7 @@ public virtual ArmOperation Update(WaitUnt /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -419,7 +419,7 @@ public virtual async Task> AddTag /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -476,7 +476,7 @@ public virtual Response AddTag(string key, /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -532,7 +532,7 @@ public virtual async Task> SetTag /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -588,7 +588,7 @@ public virtual Response SetTags(IDictionar /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource @@ -643,7 +643,7 @@ public virtual async Task> Remove /// /// /// Default Api Version - /// 2023-11-01 + /// 2024-01-01 /// /// /// Resource diff --git a/sdk/network/Azure.ResourceManager.Network/src/autorest.md b/sdk/network/Azure.ResourceManager.Network/src/autorest.md index bc0a4e940a713..e411bde31a32e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/autorest.md +++ b/sdk/network/Azure.ResourceManager.Network/src/autorest.md @@ -7,8 +7,8 @@ Run `dotnet build /t:GenerateCode` to generate code. azure-arm: true library-name: Network namespace: Azure.ResourceManager.Network -require: https://github.com/Azure/azure-rest-api-specs/blob/d1f4d6fcf1bbb2e71a32bb2079de12f17fedf56a/specification/network/resource-manager/readme.md -# tag: package-2023-11 +require: https://github.com/Azure/azure-rest-api-specs/blob/220ad9c6554fc7d6d10a89bdb441c1e3b36e3285/specification/network/resource-manager/readme.md +# tag: package-2024-01 output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: @@ -196,6 +196,8 @@ rename-mapping: MigratedPools: MigrateLoadBalancerToIPBasedResult IPRule: BastionHostIPRule NetworkVirtualApplianceConnection.properties.routingConfiguration: ConnectionRoutingConfiguration + # to workaround breaking change in FirewallPacketCaptureParameters, we have to keep the old codes and rename it + FirewallPacketCaptureParameters: FirewallPacketCaptureRequestParameters keep-plural-resource-data: - PolicySignaturesOverridesForIdps From 4c337a8317b6fbf6bfacf397b3c5c700ce0d013f Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Wed, 10 Jul 2024 11:58:55 -0500 Subject: [PATCH 043/144] Turn off WarningsAsErrors until we bump System.Text.Json (#44931) --- eng/Directory.Build.Common.props | 3 ++- eng/pipelines/templates/jobs/ci.yml | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/eng/Directory.Build.Common.props b/eng/Directory.Build.Common.props index 49c1a31473087..3da126724dd08 100644 --- a/eng/Directory.Build.Common.props +++ b/eng/Directory.Build.Common.props @@ -77,7 +77,8 @@ AZPROVISION001; - true + + false 1.3.3 Azure.ResourceManager.Redis diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Customization/ArmRedisModelFactory.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Customization/ArmRedisModelFactory.cs index e352ee7a018ce..813c6195e52a2 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Customization/ArmRedisModelFactory.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Customization/ArmRedisModelFactory.cs @@ -43,11 +43,7 @@ public static partial class ArmRedisModelFactory /// A new instance for mocking. [EditorBrowsable(EditorBrowsableState.Never)] public static RedisCommonConfiguration RedisCommonConfiguration(bool? isRdbBackupEnabled = null, string rdbBackupFrequency = null, int? rdbBackupMaxSnapshotCount = null, string rdbStorageConnectionString = null, bool? isAofBackupEnabled = null, string aofStorageConnectionString0 = null, string aofStorageConnectionString1 = null, string maxFragmentationMemoryReserved = null, string maxMemoryPolicy = null, string maxMemoryReserved = null, string maxMemoryDelta = null, string maxClients = null, string preferredDataArchiveAuthMethod = null, string preferredDataPersistenceAuthMethod = null, string zonalConfiguration = null, string authNotRequired = null, string storageSubscriptionId = null, IDictionary additionalProperties = null) - { - additionalProperties ??= new Dictionary(); - - return new RedisCommonConfiguration(isRdbBackupEnabled, rdbBackupFrequency, rdbBackupMaxSnapshotCount, rdbStorageConnectionString, isAofBackupEnabled, aofStorageConnectionString0, aofStorageConnectionString1, maxFragmentationMemoryReserved, maxMemoryPolicy, maxMemoryReserved, maxMemoryDelta, maxClients, preferredDataArchiveAuthMethod, preferredDataPersistenceAuthMethod, zonalConfiguration, authNotRequired, storageSubscriptionId, default, additionalProperties); - } + => RedisCommonConfiguration(isRdbBackupEnabled: isRdbBackupEnabled, rdbBackupFrequency: rdbBackupFrequency, rdbBackupMaxSnapshotCount: rdbBackupMaxSnapshotCount, rdbStorageConnectionString: rdbStorageConnectionString, isAofBackupEnabled: isAofBackupEnabled, aofStorageConnectionString0: aofStorageConnectionString0, aofStorageConnectionString1: aofStorageConnectionString1, maxFragmentationMemoryReserved: maxFragmentationMemoryReserved, maxMemoryPolicy: maxMemoryPolicy, maxMemoryReserved: maxMemoryReserved, maxMemoryDelta: maxMemoryDelta, maxClients: maxClients, preferredDataArchiveAuthMethod: preferredDataArchiveAuthMethod, preferredDataPersistenceAuthMethod: preferredDataPersistenceAuthMethod, zonalConfiguration: zonalConfiguration, authNotRequired: authNotRequired, storageSubscriptionId: storageSubscriptionId, additionalProperties: additionalProperties); /// Initializes a new instance of RedisData. /// The id. @@ -81,15 +77,6 @@ public static RedisCommonConfiguration RedisCommonConfiguration(bool? isRdbBacku /// A new instance for mocking. [EditorBrowsable(EditorBrowsableState.Never)] public static RedisData RedisData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, IEnumerable zones = null, ManagedServiceIdentity identity = null, RedisCommonConfiguration redisConfiguration = null, string redisVersion = null, bool? enableNonSslPort = null, int? replicasPerMaster = null, int? replicasPerPrimary = null, IDictionary tenantSettings = null, int? shardCount = null, RedisTlsVersion? minimumTlsVersion = null, RedisPublicNetworkAccess? publicNetworkAccess = null, RedisSku sku = null, ResourceIdentifier subnetId = null, IPAddress staticIP = null, RedisProvisioningState? provisioningState = null, string hostName = null, int? port = null, int? sslPort = null, RedisAccessKeys accessKeys = null, IEnumerable linkedServers = null, IEnumerable instances = null, IEnumerable privateEndpointConnections = null) - { - tags ??= new Dictionary(); - zones ??= new List(); - tenantSettings ??= new Dictionary(); - linkedServers ??= new List(); - instances ??= new List(); - privateEndpointConnections ??= new List(); - - return new RedisData(id, name, resourceType, systemData, tags, location, zones?.ToList(), identity, redisConfiguration, redisVersion, enableNonSslPort, replicasPerMaster, replicasPerPrimary, tenantSettings, shardCount, minimumTlsVersion, publicNetworkAccess, default, sku, subnetId, staticIP, provisioningState, hostName, port, sslPort, accessKeys, linkedServers?.ToList(), instances?.ToList(), privateEndpointConnections?.ToList(), null); - } + => RedisData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, zones: zones?.ToList(), identity: identity, redisConfiguration: redisConfiguration, redisVersion: redisVersion, enableNonSslPort: enableNonSslPort, replicasPerMaster: replicasPerMaster, replicasPerPrimary: replicasPerPrimary, tenantSettings: tenantSettings, shardCount: shardCount, minimumTlsVersion: minimumTlsVersion, publicNetworkAccess: publicNetworkAccess, sku: sku, subnetId: subnetId, staticIP: staticIP, provisioningState: provisioningState, hostName: hostName, port: port, sslPort: sslPort, accessKeys: accessKeys, linkedServers: linkedServers?.ToList(), instances: instances?.ToList(), privateEndpointConnections: privateEndpointConnections?.ToList()); } } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/ArmRedisModelFactory.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/ArmRedisModelFactory.cs index b047fee82997c..8f1ebd17e91b2 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/ArmRedisModelFactory.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/ArmRedisModelFactory.cs @@ -36,7 +36,7 @@ public static RedisUpgradeNotification RedisUpgradeNotification(string name = nu /// The geo-location where the resource lives. /// Resource tags. /// The identity of the resource. - /// All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. + /// All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta, maxmemory-policy,notify-keyspace-events, aof-backup-enabled, aof-storage-connection-string-0, aof-storage-connection-string-1 etc. /// Redis version. This should be in the form 'major[.minor]' (only 'major' is required) or the value 'latest' which refers to the latest stable Redis version that is available. Supported versions: 4.0, 6.0 (latest). Default value is 'latest'. /// Specifies whether the non-ssl Redis server port (6379) is enabled. /// The number of replicas to be created per primary. @@ -46,11 +46,12 @@ public static RedisUpgradeNotification RedisUpgradeNotification(string name = nu /// Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). /// Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. /// Optional: Specifies the update channel for the monthly Redis updates your Redis Cache will receive. Caches using 'Preview' update channel get latest Redis updates at least 4 weeks ahead of 'Stable' channel caches. Default value is 'Stable'. + /// Authentication to Redis through access keys is disabled when set as true. Default value is false. /// The SKU of the Redis cache to deploy. /// The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. /// Static IP address. Optionally, may be specified when deploying a Redis cache inside an existing Azure Virtual Network; auto assigned by default. /// A new instance for mocking. - public static RedisCreateOrUpdateContent RedisCreateOrUpdateContent(IEnumerable zones = null, AzureLocation location = default, IDictionary tags = null, ManagedServiceIdentity identity = null, RedisCommonConfiguration redisConfiguration = null, string redisVersion = null, bool? enableNonSslPort = null, int? replicasPerMaster = null, int? replicasPerPrimary = null, IDictionary tenantSettings = null, int? shardCount = null, RedisTlsVersion? minimumTlsVersion = null, RedisPublicNetworkAccess? publicNetworkAccess = null, UpdateChannel? updateChannel = null, RedisSku sku = null, ResourceIdentifier subnetId = null, IPAddress staticIP = null) + public static RedisCreateOrUpdateContent RedisCreateOrUpdateContent(IEnumerable zones = null, AzureLocation location = default, IDictionary tags = null, ManagedServiceIdentity identity = null, RedisCommonConfiguration redisConfiguration = null, string redisVersion = null, bool? enableNonSslPort = null, int? replicasPerMaster = null, int? replicasPerPrimary = null, IDictionary tenantSettings = null, int? shardCount = null, RedisTlsVersion? minimumTlsVersion = null, RedisPublicNetworkAccess? publicNetworkAccess = null, UpdateChannel? updateChannel = null, bool? disableAccessKeyAuthentication = null, RedisSku sku = null, ResourceIdentifier subnetId = null, IPAddress staticIP = null) { zones ??= new List(); tags ??= new Dictionary(); @@ -71,6 +72,7 @@ public static RedisCreateOrUpdateContent RedisCreateOrUpdateContent(IEnumerable< minimumTlsVersion, publicNetworkAccess, updateChannel, + disableAccessKeyAuthentication, sku, subnetId, staticIP, @@ -90,6 +92,7 @@ public static RedisCreateOrUpdateContent RedisCreateOrUpdateContent(IEnumerable< /// Value in megabytes reserved for non-cache usage per shard e.g. failover. /// Value in megabytes reserved for non-cache usage per shard e.g. failover. /// The max clients config. + /// The keyspace events which should be monitored. /// Preferred auth method to communicate to storage account used for data archive, specify SAS or ManagedIdentity, default value is SAS. /// Preferred auth method to communicate to storage account used for data persistence, specify SAS or ManagedIdentity, default value is SAS. /// Zonal Configuration. @@ -98,7 +101,7 @@ public static RedisCreateOrUpdateContent RedisCreateOrUpdateContent(IEnumerable< /// Specifies whether AAD based authentication has been enabled or disabled for the cache. /// Additional Properties. /// A new instance for mocking. - public static RedisCommonConfiguration RedisCommonConfiguration(bool? isRdbBackupEnabled = null, string rdbBackupFrequency = null, int? rdbBackupMaxSnapshotCount = null, string rdbStorageConnectionString = null, bool? isAofBackupEnabled = null, string aofStorageConnectionString0 = null, string aofStorageConnectionString1 = null, string maxFragmentationMemoryReserved = null, string maxMemoryPolicy = null, string maxMemoryReserved = null, string maxMemoryDelta = null, string maxClients = null, string preferredDataArchiveAuthMethod = null, string preferredDataPersistenceAuthMethod = null, string zonalConfiguration = null, string authNotRequired = null, string storageSubscriptionId = null, string isAadEnabled = null, IDictionary additionalProperties = null) + public static RedisCommonConfiguration RedisCommonConfiguration(bool? isRdbBackupEnabled = null, string rdbBackupFrequency = null, int? rdbBackupMaxSnapshotCount = null, string rdbStorageConnectionString = null, bool? isAofBackupEnabled = null, string aofStorageConnectionString0 = null, string aofStorageConnectionString1 = null, string maxFragmentationMemoryReserved = null, string maxMemoryPolicy = null, string maxMemoryReserved = null, string maxMemoryDelta = null, string maxClients = null, string notifyKeyspaceEvents = null, string preferredDataArchiveAuthMethod = null, string preferredDataPersistenceAuthMethod = null, string zonalConfiguration = null, string authNotRequired = null, string storageSubscriptionId = null, string isAadEnabled = null, IDictionary additionalProperties = null) { additionalProperties ??= new Dictionary(); @@ -115,6 +118,7 @@ public static RedisCommonConfiguration RedisCommonConfiguration(bool? isRdbBacku maxMemoryReserved, maxMemoryDelta, maxClients, + notifyKeyspaceEvents, preferredDataArchiveAuthMethod, preferredDataPersistenceAuthMethod, zonalConfiguration, @@ -133,7 +137,7 @@ public static RedisCommonConfiguration RedisCommonConfiguration(bool? isRdbBacku /// The location. /// A list of availability zones denoting where the resource needs to come from. /// The identity of the resource. - /// All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. + /// All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta, maxmemory-policy,notify-keyspace-events, aof-backup-enabled, aof-storage-connection-string-0, aof-storage-connection-string-1 etc. /// Redis version. This should be in the form 'major[.minor]' (only 'major' is required) or the value 'latest' which refers to the latest stable Redis version that is available. Supported versions: 4.0, 6.0 (latest). Default value is 'latest'. /// Specifies whether the non-ssl Redis server port (6379) is enabled. /// The number of replicas to be created per primary. @@ -143,6 +147,7 @@ public static RedisCommonConfiguration RedisCommonConfiguration(bool? isRdbBacku /// Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). /// Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. /// Optional: Specifies the update channel for the monthly Redis updates your Redis Cache will receive. Caches using 'Preview' update channel get latest Redis updates at least 4 weeks ahead of 'Stable' channel caches. Default value is 'Stable'. + /// Authentication to Redis through access keys is disabled when set as true. Default value is false. /// The SKU of the Redis cache to deploy. /// The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. /// Static IP address. Optionally, may be specified when deploying a Redis cache inside an existing Azure Virtual Network; auto assigned by default. @@ -155,7 +160,7 @@ public static RedisCommonConfiguration RedisCommonConfiguration(bool? isRdbBacku /// List of the Redis instances associated with the cache. /// List of private endpoint connection associated with the specified redis cache. /// A new instance for mocking. - public static RedisData RedisData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, IEnumerable zones = null, ManagedServiceIdentity identity = null, RedisCommonConfiguration redisConfiguration = null, string redisVersion = null, bool? enableNonSslPort = null, int? replicasPerMaster = null, int? replicasPerPrimary = null, IDictionary tenantSettings = null, int? shardCount = null, RedisTlsVersion? minimumTlsVersion = null, RedisPublicNetworkAccess? publicNetworkAccess = null, UpdateChannel? updateChannel = null, RedisSku sku = null, ResourceIdentifier subnetId = null, IPAddress staticIP = null, RedisProvisioningState? provisioningState = null, string hostName = null, int? port = null, int? sslPort = null, RedisAccessKeys accessKeys = null, IEnumerable linkedServers = null, IEnumerable instances = null, IEnumerable privateEndpointConnections = null) + public static RedisData RedisData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, IEnumerable zones = null, ManagedServiceIdentity identity = null, RedisCommonConfiguration redisConfiguration = null, string redisVersion = null, bool? enableNonSslPort = null, int? replicasPerMaster = null, int? replicasPerPrimary = null, IDictionary tenantSettings = null, int? shardCount = null, RedisTlsVersion? minimumTlsVersion = null, RedisPublicNetworkAccess? publicNetworkAccess = null, UpdateChannel? updateChannel = null, bool? disableAccessKeyAuthentication = null, RedisSku sku = null, ResourceIdentifier subnetId = null, IPAddress staticIP = null, RedisProvisioningState? provisioningState = null, string hostName = null, int? port = null, int? sslPort = null, RedisAccessKeys accessKeys = null, IEnumerable linkedServers = null, IEnumerable instances = null, IEnumerable privateEndpointConnections = null) { tags ??= new Dictionary(); zones ??= new List(); @@ -183,6 +188,7 @@ public static RedisData RedisData(ResourceIdentifier id = null, string name = nu minimumTlsVersion, publicNetworkAccess, updateChannel, + disableAccessKeyAuthentication, sku, subnetId, staticIP, @@ -461,5 +467,94 @@ public static RedisCacheAccessPolicyAssignmentData RedisCacheAccessPolicyAssignm accessPolicyName, serializedAdditionalRawData: null); } + + /// Initializes a new instance of . + /// A list of availability zones denoting where the resource needs to come from. + /// The geo-location where the resource lives. + /// Resource tags. + /// The identity of the resource. + /// All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. + /// Redis version. This should be in the form 'major[.minor]' (only 'major' is required) or the value 'latest' which refers to the latest stable Redis version that is available. Supported versions: 4.0, 6.0 (latest). Default value is 'latest'. + /// Specifies whether the non-ssl Redis server port (6379) is enabled. + /// The number of replicas to be created per primary. + /// The number of replicas to be created per primary. + /// A dictionary of tenant settings. + /// The number of shards to be created on a Premium Cluster Cache. + /// Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). + /// Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. + /// Optional: Specifies the update channel for the monthly Redis updates your Redis Cache will receive. Caches using 'Preview' update channel get latest Redis updates at least 4 weeks ahead of 'Stable' channel caches. Default value is 'Stable'. + /// The SKU of the Redis cache to deploy. + /// The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. + /// Static IP address. Optionally, may be specified when deploying a Redis cache inside an existing Azure Virtual Network; auto assigned by default. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static RedisCreateOrUpdateContent RedisCreateOrUpdateContent(IEnumerable zones, AzureLocation location, IDictionary tags, ManagedServiceIdentity identity, RedisCommonConfiguration redisConfiguration, string redisVersion, bool? enableNonSslPort, int? replicasPerMaster, int? replicasPerPrimary, IDictionary tenantSettings, int? shardCount, RedisTlsVersion? minimumTlsVersion, RedisPublicNetworkAccess? publicNetworkAccess, UpdateChannel? updateChannel, RedisSku sku, ResourceIdentifier subnetId, IPAddress staticIP) + { + return RedisCreateOrUpdateContent(zones: zones, location: location, tags: tags, identity: identity, redisConfiguration: redisConfiguration, redisVersion: redisVersion, enableNonSslPort: enableNonSslPort, replicasPerMaster: replicasPerMaster, replicasPerPrimary: replicasPerPrimary, tenantSettings: tenantSettings, shardCount: shardCount, minimumTlsVersion: minimumTlsVersion, publicNetworkAccess: publicNetworkAccess, updateChannel: updateChannel, disableAccessKeyAuthentication: default, sku: sku, subnetId: subnetId, staticIP: staticIP); + } + + /// Initializes a new instance of . + /// Specifies whether the rdb backup is enabled. + /// Specifies the frequency for creating rdb backup in minutes. Valid values: (15, 30, 60, 360, 720, 1440). + /// Specifies the maximum number of snapshots for rdb backup. + /// The storage account connection string for storing rdb file. + /// Specifies whether the aof backup is enabled. + /// First storage account connection string. + /// Second storage account connection string. + /// Value in megabytes reserved for fragmentation per shard. + /// The eviction strategy used when your data won't fit within its memory limit. + /// Value in megabytes reserved for non-cache usage per shard e.g. failover. + /// Value in megabytes reserved for non-cache usage per shard e.g. failover. + /// The max clients config. + /// Preferred auth method to communicate to storage account used for data archive, specify SAS or ManagedIdentity, default value is SAS. + /// Preferred auth method to communicate to storage account used for data persistence, specify SAS or ManagedIdentity, default value is SAS. + /// Zonal Configuration. + /// Specifies whether the authentication is disabled. Setting this property is highly discouraged from security point of view. + /// SubscriptionId of the storage account for persistence (aof/rdb) using ManagedIdentity. + /// Specifies whether AAD based authentication has been enabled or disabled for the cache. + /// Additional Properties. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static RedisCommonConfiguration RedisCommonConfiguration(bool? isRdbBackupEnabled, string rdbBackupFrequency, int? rdbBackupMaxSnapshotCount, string rdbStorageConnectionString, bool? isAofBackupEnabled, string aofStorageConnectionString0, string aofStorageConnectionString1, string maxFragmentationMemoryReserved, string maxMemoryPolicy, string maxMemoryReserved, string maxMemoryDelta, string maxClients, string preferredDataArchiveAuthMethod, string preferredDataPersistenceAuthMethod, string zonalConfiguration, string authNotRequired, string storageSubscriptionId, string isAadEnabled, IDictionary additionalProperties) + { + return RedisCommonConfiguration(isRdbBackupEnabled: isRdbBackupEnabled, rdbBackupFrequency: rdbBackupFrequency, rdbBackupMaxSnapshotCount: rdbBackupMaxSnapshotCount, rdbStorageConnectionString: rdbStorageConnectionString, isAofBackupEnabled: isAofBackupEnabled, aofStorageConnectionString0: aofStorageConnectionString0, aofStorageConnectionString1: aofStorageConnectionString1, maxFragmentationMemoryReserved: maxFragmentationMemoryReserved, maxMemoryPolicy: maxMemoryPolicy, maxMemoryReserved: maxMemoryReserved, maxMemoryDelta: maxMemoryDelta, maxClients: maxClients, notifyKeyspaceEvents: default, preferredDataArchiveAuthMethod: preferredDataArchiveAuthMethod, preferredDataPersistenceAuthMethod: preferredDataPersistenceAuthMethod, zonalConfiguration: zonalConfiguration, authNotRequired: authNotRequired, storageSubscriptionId: storageSubscriptionId, isAadEnabled: isAadEnabled, additionalProperties: additionalProperties); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// A list of availability zones denoting where the resource needs to come from. + /// The identity of the resource. + /// All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. + /// Redis version. This should be in the form 'major[.minor]' (only 'major' is required) or the value 'latest' which refers to the latest stable Redis version that is available. Supported versions: 4.0, 6.0 (latest). Default value is 'latest'. + /// Specifies whether the non-ssl Redis server port (6379) is enabled. + /// The number of replicas to be created per primary. + /// The number of replicas to be created per primary. + /// A dictionary of tenant settings. + /// The number of shards to be created on a Premium Cluster Cache. + /// Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). + /// Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. + /// Optional: Specifies the update channel for the monthly Redis updates your Redis Cache will receive. Caches using 'Preview' update channel get latest Redis updates at least 4 weeks ahead of 'Stable' channel caches. Default value is 'Stable'. + /// The SKU of the Redis cache to deploy. + /// The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. + /// Static IP address. Optionally, may be specified when deploying a Redis cache inside an existing Azure Virtual Network; auto assigned by default. + /// Redis instance provisioning status. + /// Redis host name. + /// Redis non-SSL port. + /// Redis SSL port. + /// The keys of the Redis cache - not set if this object is not the response to Create or Update redis cache. + /// List of the linked servers associated with the cache. + /// List of the Redis instances associated with the cache. + /// List of private endpoint connection associated with the specified redis cache. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static RedisData RedisData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, IEnumerable zones, ManagedServiceIdentity identity, RedisCommonConfiguration redisConfiguration, string redisVersion, bool? enableNonSslPort, int? replicasPerMaster, int? replicasPerPrimary, IDictionary tenantSettings, int? shardCount, RedisTlsVersion? minimumTlsVersion, RedisPublicNetworkAccess? publicNetworkAccess, UpdateChannel? updateChannel, RedisSku sku, ResourceIdentifier subnetId, IPAddress staticIP, RedisProvisioningState? provisioningState, string hostName, int? port, int? sslPort, RedisAccessKeys accessKeys, IEnumerable linkedServers, IEnumerable instances, IEnumerable privateEndpointConnections) + { + return RedisData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, zones: zones, identity: identity, redisConfiguration: redisConfiguration, redisVersion: redisVersion, enableNonSslPort: enableNonSslPort, replicasPerMaster: replicasPerMaster, replicasPerPrimary: replicasPerPrimary, tenantSettings: tenantSettings, shardCount: shardCount, minimumTlsVersion: minimumTlsVersion, publicNetworkAccess: publicNetworkAccess, updateChannel: updateChannel, disableAccessKeyAuthentication: default, sku: sku, subnetId: subnetId, staticIP: staticIP, provisioningState: provisioningState, hostName: hostName, port: port, sslPort: sslPort, accessKeys: accessKeys, linkedServers: linkedServers, instances: instances, privateEndpointConnections: privateEndpointConnections); + } } } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Extensions/MockableRedisResourceGroupResource.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Extensions/MockableRedisResourceGroupResource.cs index bd7803dfe4cd4..94c881d1ef869 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Extensions/MockableRedisResourceGroupResource.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Extensions/MockableRedisResourceGroupResource.cs @@ -53,7 +53,7 @@ public virtual RedisCollection GetAllRedis() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task> GetRedisAsync(string name, Ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Extensions/MockableRedisSubscriptionResource.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Extensions/MockableRedisSubscriptionResource.cs index ea948ce67c128..f940dd0bd9f35 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Extensions/MockableRedisSubscriptionResource.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Extensions/MockableRedisSubscriptionResource.cs @@ -59,7 +59,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -101,7 +101,7 @@ public virtual async Task CheckRedisNameAvailabilityAsync(RedisNameAva /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual Response CheckRedisNameAvailability(RedisNameAvailabilityContent /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -173,7 +173,7 @@ public virtual AsyncPageable GetAllRedisAsync(CancellationToken c /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -203,7 +203,7 @@ public virtual Pageable GetAllRedis(CancellationToken cancellatio /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// @@ -243,7 +243,7 @@ public virtual async Task> GetAsyncOperationStatu /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Extensions/RedisExtensions.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Extensions/RedisExtensions.cs index 3be7eb52f17d6..71e6edf9a5b88 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Extensions/RedisExtensions.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Extensions/RedisExtensions.cs @@ -196,7 +196,7 @@ public static RedisCollection GetAllRedis(this ResourceGroupResource resourceGro /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -234,7 +234,7 @@ public static async Task> GetRedisAsync(this ResourceGro /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -272,7 +272,7 @@ public static Response GetRedis(this ResourceGroupResource resour /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -308,7 +308,7 @@ public static async Task CheckRedisNameAvailabilityAsync(this Subscrip /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -344,7 +344,7 @@ public static Response CheckRedisNameAvailability(this SubscriptionResource subs /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -380,7 +380,7 @@ public static AsyncPageable GetAllRedisAsync(this SubscriptionRes /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -416,7 +416,7 @@ public static Pageable GetAllRedis(this SubscriptionResource subs /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// @@ -450,7 +450,7 @@ public static async Task> GetAsyncOperationStatus /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisCommonConfiguration.Serialization.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisCommonConfiguration.Serialization.cs index 086f72f799e1a..946b7456d63ba 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisCommonConfiguration.Serialization.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisCommonConfiguration.Serialization.cs @@ -87,6 +87,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WritePropertyName("maxclients"u8); writer.WriteStringValue(MaxClients); } + if (Optional.IsDefined(NotifyKeyspaceEvents)) + { + writer.WritePropertyName("notify-keyspace-events"u8); + writer.WriteStringValue(NotifyKeyspaceEvents); + } if (options.Format != "W" && Optional.IsDefined(PreferredDataArchiveAuthMethod)) { writer.WritePropertyName("preferred-data-archive-auth-method"u8); @@ -164,6 +169,7 @@ internal static RedisCommonConfiguration DeserializeRedisCommonConfiguration(Jso string maxmemoryReserved = default; string maxmemoryDelta = default; string maxclients = default; + string notifyKeyspaceEvents = default; string preferredDataArchiveAuthMethod = default; string preferredDataPersistenceAuthMethod = default; string zonalConfiguration = default; @@ -234,6 +240,11 @@ internal static RedisCommonConfiguration DeserializeRedisCommonConfiguration(Jso maxclients = property.Value.GetString(); continue; } + if (property.NameEquals("notify-keyspace-events"u8)) + { + notifyKeyspaceEvents = property.Value.GetString(); + continue; + } if (property.NameEquals("preferred-data-archive-auth-method"u8)) { preferredDataArchiveAuthMethod = property.Value.GetString(); @@ -280,6 +291,7 @@ internal static RedisCommonConfiguration DeserializeRedisCommonConfiguration(Jso maxmemoryReserved, maxmemoryDelta, maxclients, + notifyKeyspaceEvents, preferredDataArchiveAuthMethod, preferredDataPersistenceAuthMethod, zonalConfiguration, @@ -554,6 +566,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NotifyKeyspaceEvents), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" notify-keyspace-events: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NotifyKeyspaceEvents)) + { + builder.Append(" notify-keyspace-events: "); + if (NotifyKeyspaceEvents.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NotifyKeyspaceEvents}'''"); + } + else + { + builder.AppendLine($"'{NotifyKeyspaceEvents}'"); + } + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PreferredDataArchiveAuthMethod), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisCommonConfiguration.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisCommonConfiguration.cs index fb47dc84aa869..746f3487e18d2 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisCommonConfiguration.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisCommonConfiguration.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Redis.Models { - /// All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. + /// All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta, maxmemory-policy,notify-keyspace-events, aof-backup-enabled, aof-storage-connection-string-0, aof-storage-connection-string-1 etc. public partial class RedisCommonConfiguration { /// Initializes a new instance of . @@ -32,6 +32,7 @@ public RedisCommonConfiguration() /// Value in megabytes reserved for non-cache usage per shard e.g. failover. /// Value in megabytes reserved for non-cache usage per shard e.g. failover. /// The max clients config. + /// The keyspace events which should be monitored. /// Preferred auth method to communicate to storage account used for data archive, specify SAS or ManagedIdentity, default value is SAS. /// Preferred auth method to communicate to storage account used for data persistence, specify SAS or ManagedIdentity, default value is SAS. /// Zonal Configuration. @@ -39,7 +40,7 @@ public RedisCommonConfiguration() /// SubscriptionId of the storage account for persistence (aof/rdb) using ManagedIdentity. /// Specifies whether AAD based authentication has been enabled or disabled for the cache. /// Additional Properties. - internal RedisCommonConfiguration(bool? isRdbBackupEnabled, string rdbBackupFrequency, int? rdbBackupMaxSnapshotCount, string rdbStorageConnectionString, bool? isAofBackupEnabled, string aofStorageConnectionString0, string aofStorageConnectionString1, string maxFragmentationMemoryReserved, string maxMemoryPolicy, string maxMemoryReserved, string maxMemoryDelta, string maxClients, string preferredDataArchiveAuthMethod, string preferredDataPersistenceAuthMethod, string zonalConfiguration, string authNotRequired, string storageSubscriptionId, string isAadEnabled, IDictionary additionalProperties) + internal RedisCommonConfiguration(bool? isRdbBackupEnabled, string rdbBackupFrequency, int? rdbBackupMaxSnapshotCount, string rdbStorageConnectionString, bool? isAofBackupEnabled, string aofStorageConnectionString0, string aofStorageConnectionString1, string maxFragmentationMemoryReserved, string maxMemoryPolicy, string maxMemoryReserved, string maxMemoryDelta, string maxClients, string notifyKeyspaceEvents, string preferredDataArchiveAuthMethod, string preferredDataPersistenceAuthMethod, string zonalConfiguration, string authNotRequired, string storageSubscriptionId, string isAadEnabled, IDictionary additionalProperties) { IsRdbBackupEnabled = isRdbBackupEnabled; RdbBackupFrequency = rdbBackupFrequency; @@ -53,6 +54,7 @@ internal RedisCommonConfiguration(bool? isRdbBackupEnabled, string rdbBackupFreq MaxMemoryReserved = maxMemoryReserved; MaxMemoryDelta = maxMemoryDelta; MaxClients = maxClients; + NotifyKeyspaceEvents = notifyKeyspaceEvents; PreferredDataArchiveAuthMethod = preferredDataArchiveAuthMethod; PreferredDataPersistenceAuthMethod = preferredDataPersistenceAuthMethod; ZonalConfiguration = zonalConfiguration; @@ -98,6 +100,9 @@ internal RedisCommonConfiguration(bool? isRdbBackupEnabled, string rdbBackupFreq /// The max clients config. [WirePath("maxclients")] public string MaxClients { get; } + /// The keyspace events which should be monitored. + [WirePath("notify-keyspace-events")] + public string NotifyKeyspaceEvents { get; set; } /// Preferred auth method to communicate to storage account used for data archive, specify SAS or ManagedIdentity, default value is SAS. [WirePath("preferred-data-archive-auth-method")] public string PreferredDataArchiveAuthMethod { get; } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisCreateOrUpdateContent.Serialization.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisCreateOrUpdateContent.Serialization.cs index 0c4e35e743ac9..a3de15fe478ed 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisCreateOrUpdateContent.Serialization.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisCreateOrUpdateContent.Serialization.cs @@ -114,6 +114,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WritePropertyName("updateChannel"u8); writer.WriteStringValue(UpdateChannel.Value.ToString()); } + if (Optional.IsDefined(DisableAccessKeyAuthentication)) + { + writer.WritePropertyName("disableAccessKeyAuthentication"u8); + writer.WriteBooleanValue(DisableAccessKeyAuthentication.Value); + } writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku, options); if (Optional.IsDefined(SubnetId)) @@ -179,6 +184,7 @@ internal static RedisCreateOrUpdateContent DeserializeRedisCreateOrUpdateContent RedisTlsVersion? minimumTlsVersion = default; RedisPublicNetworkAccess? publicNetworkAccess = default; UpdateChannel? updateChannel = default; + bool? disableAccessKeyAuthentication = default; RedisSku sku = default; ResourceIdentifier subnetId = default; IPAddress staticIP = default; @@ -328,6 +334,15 @@ internal static RedisCreateOrUpdateContent DeserializeRedisCreateOrUpdateContent updateChannel = new UpdateChannel(property0.Value.GetString()); continue; } + if (property0.NameEquals("disableAccessKeyAuthentication"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + disableAccessKeyAuthentication = property0.Value.GetBoolean(); + continue; + } if (property0.NameEquals("sku"u8)) { sku = RedisSku.DeserializeRedisSku(property0.Value, options); @@ -375,6 +390,7 @@ internal static RedisCreateOrUpdateContent DeserializeRedisCreateOrUpdateContent minimumTlsVersion, publicNetworkAccess, updateChannel, + disableAccessKeyAuthentication, sku, subnetId, staticIP, diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisCreateOrUpdateContent.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisCreateOrUpdateContent.cs index 65716c76a71a1..fbe81581449c1 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisCreateOrUpdateContent.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisCreateOrUpdateContent.cs @@ -68,7 +68,7 @@ public RedisCreateOrUpdateContent(AzureLocation location, RedisSku sku) /// The geo-location where the resource lives. /// Resource tags. /// The identity of the resource. - /// All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. + /// All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta, maxmemory-policy,notify-keyspace-events, aof-backup-enabled, aof-storage-connection-string-0, aof-storage-connection-string-1 etc. /// Redis version. This should be in the form 'major[.minor]' (only 'major' is required) or the value 'latest' which refers to the latest stable Redis version that is available. Supported versions: 4.0, 6.0 (latest). Default value is 'latest'. /// Specifies whether the non-ssl Redis server port (6379) is enabled. /// The number of replicas to be created per primary. @@ -78,11 +78,12 @@ public RedisCreateOrUpdateContent(AzureLocation location, RedisSku sku) /// Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). /// Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. /// Optional: Specifies the update channel for the monthly Redis updates your Redis Cache will receive. Caches using 'Preview' update channel get latest Redis updates at least 4 weeks ahead of 'Stable' channel caches. Default value is 'Stable'. + /// Authentication to Redis through access keys is disabled when set as true. Default value is false. /// The SKU of the Redis cache to deploy. /// The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. /// Static IP address. Optionally, may be specified when deploying a Redis cache inside an existing Azure Virtual Network; auto assigned by default. /// Keeps track of any properties unknown to the library. - internal RedisCreateOrUpdateContent(IList zones, AzureLocation location, IDictionary tags, ManagedServiceIdentity identity, RedisCommonConfiguration redisConfiguration, string redisVersion, bool? enableNonSslPort, int? replicasPerMaster, int? replicasPerPrimary, IDictionary tenantSettings, int? shardCount, RedisTlsVersion? minimumTlsVersion, RedisPublicNetworkAccess? publicNetworkAccess, UpdateChannel? updateChannel, RedisSku sku, ResourceIdentifier subnetId, IPAddress staticIP, IDictionary serializedAdditionalRawData) + internal RedisCreateOrUpdateContent(IList zones, AzureLocation location, IDictionary tags, ManagedServiceIdentity identity, RedisCommonConfiguration redisConfiguration, string redisVersion, bool? enableNonSslPort, int? replicasPerMaster, int? replicasPerPrimary, IDictionary tenantSettings, int? shardCount, RedisTlsVersion? minimumTlsVersion, RedisPublicNetworkAccess? publicNetworkAccess, UpdateChannel? updateChannel, bool? disableAccessKeyAuthentication, RedisSku sku, ResourceIdentifier subnetId, IPAddress staticIP, IDictionary serializedAdditionalRawData) { Zones = zones; Location = location; @@ -98,6 +99,7 @@ internal RedisCreateOrUpdateContent(IList zones, AzureLocation location, MinimumTlsVersion = minimumTlsVersion; PublicNetworkAccess = publicNetworkAccess; UpdateChannel = updateChannel; + DisableAccessKeyAuthentication = disableAccessKeyAuthentication; Sku = sku; SubnetId = subnetId; StaticIP = staticIP; @@ -121,7 +123,7 @@ internal RedisCreateOrUpdateContent() /// The identity of the resource. [WirePath("identity")] public ManagedServiceIdentity Identity { get; set; } - /// All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. + /// All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta, maxmemory-policy,notify-keyspace-events, aof-backup-enabled, aof-storage-connection-string-0, aof-storage-connection-string-1 etc. [WirePath("properties.redisConfiguration")] public RedisCommonConfiguration RedisConfiguration { get; set; } /// Redis version. This should be in the form 'major[.minor]' (only 'major' is required) or the value 'latest' which refers to the latest stable Redis version that is available. Supported versions: 4.0, 6.0 (latest). Default value is 'latest'. @@ -151,6 +153,9 @@ internal RedisCreateOrUpdateContent() /// Optional: Specifies the update channel for the monthly Redis updates your Redis Cache will receive. Caches using 'Preview' update channel get latest Redis updates at least 4 weeks ahead of 'Stable' channel caches. Default value is 'Stable'. [WirePath("properties.updateChannel")] public UpdateChannel? UpdateChannel { get; set; } + /// Authentication to Redis through access keys is disabled when set as true. Default value is false. + [WirePath("properties.disableAccessKeyAuthentication")] + public bool? DisableAccessKeyAuthentication { get; set; } /// The SKU of the Redis cache to deploy. [WirePath("properties.sku")] public RedisSku Sku { get; } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisPatch.Serialization.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisPatch.Serialization.cs index 185893d645e91..323ed2e4f308f 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisPatch.Serialization.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisPatch.Serialization.cs @@ -101,6 +101,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption writer.WritePropertyName("updateChannel"u8); writer.WriteStringValue(UpdateChannel.Value.ToString()); } + if (Optional.IsDefined(DisableAccessKeyAuthentication)) + { + writer.WritePropertyName("disableAccessKeyAuthentication"u8); + writer.WriteBooleanValue(DisableAccessKeyAuthentication.Value); + } if (Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); @@ -157,6 +162,7 @@ internal static RedisPatch DeserializeRedisPatch(JsonElement element, ModelReade RedisTlsVersion? minimumTlsVersion = default; RedisPublicNetworkAccess? publicNetworkAccess = default; UpdateChannel? updateChannel = default; + bool? disableAccessKeyAuthentication = default; RedisSku sku = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -285,6 +291,15 @@ internal static RedisPatch DeserializeRedisPatch(JsonElement element, ModelReade updateChannel = new UpdateChannel(property0.Value.GetString()); continue; } + if (property0.NameEquals("disableAccessKeyAuthentication"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + disableAccessKeyAuthentication = property0.Value.GetBoolean(); + continue; + } if (property0.NameEquals("sku"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -316,6 +331,7 @@ internal static RedisPatch DeserializeRedisPatch(JsonElement element, ModelReade minimumTlsVersion, publicNetworkAccess, updateChannel, + disableAccessKeyAuthentication, sku, serializedAdditionalRawData); } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisPatch.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisPatch.cs index fd261e93fe63f..c417f08bd5435 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisPatch.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisPatch.cs @@ -56,7 +56,7 @@ public RedisPatch() /// Initializes a new instance of . /// Resource tags. /// The identity of the resource. - /// All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. + /// All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta, maxmemory-policy,notify-keyspace-events, aof-backup-enabled, aof-storage-connection-string-0, aof-storage-connection-string-1 etc. /// Redis version. This should be in the form 'major[.minor]' (only 'major' is required) or the value 'latest' which refers to the latest stable Redis version that is available. Supported versions: 4.0, 6.0 (latest). Default value is 'latest'. /// Specifies whether the non-ssl Redis server port (6379) is enabled. /// The number of replicas to be created per primary. @@ -66,9 +66,10 @@ public RedisPatch() /// Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). /// Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. /// Optional: Specifies the update channel for the monthly Redis updates your Redis Cache will receive. Caches using 'Preview' update channel get latest Redis updates at least 4 weeks ahead of 'Stable' channel caches. Default value is 'Stable'. + /// Authentication to Redis through access keys is disabled when set as true. Default value is false. /// The SKU of the Redis cache to deploy. /// Keeps track of any properties unknown to the library. - internal RedisPatch(IDictionary tags, ManagedServiceIdentity identity, RedisCommonConfiguration redisConfiguration, string redisVersion, bool? enableNonSslPort, int? replicasPerMaster, int? replicasPerPrimary, IDictionary tenantSettings, int? shardCount, RedisTlsVersion? minimumTlsVersion, RedisPublicNetworkAccess? publicNetworkAccess, UpdateChannel? updateChannel, RedisSku sku, IDictionary serializedAdditionalRawData) + internal RedisPatch(IDictionary tags, ManagedServiceIdentity identity, RedisCommonConfiguration redisConfiguration, string redisVersion, bool? enableNonSslPort, int? replicasPerMaster, int? replicasPerPrimary, IDictionary tenantSettings, int? shardCount, RedisTlsVersion? minimumTlsVersion, RedisPublicNetworkAccess? publicNetworkAccess, UpdateChannel? updateChannel, bool? disableAccessKeyAuthentication, RedisSku sku, IDictionary serializedAdditionalRawData) { Tags = tags; Identity = identity; @@ -82,6 +83,7 @@ internal RedisPatch(IDictionary tags, ManagedServiceIdentity ide MinimumTlsVersion = minimumTlsVersion; PublicNetworkAccess = publicNetworkAccess; UpdateChannel = updateChannel; + DisableAccessKeyAuthentication = disableAccessKeyAuthentication; Sku = sku; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -92,7 +94,7 @@ internal RedisPatch(IDictionary tags, ManagedServiceIdentity ide /// The identity of the resource. [WirePath("identity")] public ManagedServiceIdentity Identity { get; set; } - /// All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. + /// All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta, maxmemory-policy,notify-keyspace-events, aof-backup-enabled, aof-storage-connection-string-0, aof-storage-connection-string-1 etc. [WirePath("properties.redisConfiguration")] public RedisCommonConfiguration RedisConfiguration { get; set; } /// Redis version. This should be in the form 'major[.minor]' (only 'major' is required) or the value 'latest' which refers to the latest stable Redis version that is available. Supported versions: 4.0, 6.0 (latest). Default value is 'latest'. @@ -122,6 +124,9 @@ internal RedisPatch(IDictionary tags, ManagedServiceIdentity ide /// Optional: Specifies the update channel for the monthly Redis updates your Redis Cache will receive. Caches using 'Preview' update channel get latest Redis updates at least 4 weeks ahead of 'Stable' channel caches. Default value is 'Stable'. [WirePath("properties.updateChannel")] public UpdateChannel? UpdateChannel { get; set; } + /// Authentication to Redis through access keys is disabled when set as true. Default value is false. + [WirePath("properties.disableAccessKeyAuthentication")] + public bool? DisableAccessKeyAuthentication { get; set; } /// The SKU of the Redis cache to deploy. [WirePath("properties.sku")] public RedisSku Sku { get; set; } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyAssignmentCollection.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyAssignmentCollection.cs index cd25f053f9a13..2140cf2f28bb6 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyAssignmentCollection.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyAssignmentCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string acc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsy /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string accessPolicyAssignm /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string accessPolicyAssignmentName, Cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyAssignmentResource.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyAssignmentResource.cs index b32c1fe9429b7..fd5475a7570d7 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyAssignmentResource.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyAssignmentResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyCollection.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyCollection.cs index 74973fff7f965..84be67cbe674a 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyCollection.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOr /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitU /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string accessPolicyN /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string accessPolicyName, C /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string accessPolicyName, CancellationToken /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyResource.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyResource.cs index dd00e4a4f8c87..cc42b3bf72160 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyResource.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Can /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAs /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCollection.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCollection.cs index b4cb004c3a386..a3b2a8c44ff48 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCollection.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCollection.cs @@ -66,7 +66,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdateAsync(WaitU /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -164,7 +164,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, s /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string name, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -254,7 +254,7 @@ public virtual Response Get(string name, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -284,7 +284,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(CancellationToken cancellationToke /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -445,7 +445,7 @@ public virtual async Task> GetIfExistsAsync(stri /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisData.Serialization.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisData.Serialization.cs index 60032d49bf99a..6dd6aa38798b8 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisData.Serialization.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisData.Serialization.cs @@ -138,6 +138,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WritePropertyName("updateChannel"u8); writer.WriteStringValue(UpdateChannel.Value.ToString()); } + if (Optional.IsDefined(DisableAccessKeyAuthentication)) + { + writer.WritePropertyName("disableAccessKeyAuthentication"u8); + writer.WriteBooleanValue(DisableAccessKeyAuthentication.Value); + } writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku, options); if (Optional.IsDefined(SubnetId)) @@ -269,6 +274,7 @@ internal static RedisData DeserializeRedisData(JsonElement element, ModelReaderW RedisTlsVersion? minimumTlsVersion = default; RedisPublicNetworkAccess? publicNetworkAccess = default; UpdateChannel? updateChannel = default; + bool? disableAccessKeyAuthentication = default; RedisSku sku = default; ResourceIdentifier subnetId = default; IPAddress staticIP = default; @@ -450,6 +456,15 @@ internal static RedisData DeserializeRedisData(JsonElement element, ModelReaderW updateChannel = new UpdateChannel(property0.Value.GetString()); continue; } + if (property0.NameEquals("disableAccessKeyAuthentication"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + disableAccessKeyAuthentication = property0.Value.GetBoolean(); + continue; + } if (property0.NameEquals("sku"u8)) { sku = RedisSku.DeserializeRedisSku(property0.Value, options); @@ -585,6 +600,7 @@ internal static RedisData DeserializeRedisData(JsonElement element, ModelReaderW minimumTlsVersion, publicNetworkAccess, updateChannel, + disableAccessKeyAuthentication, sku, subnetId, staticIP, @@ -946,6 +962,22 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DisableAccessKeyAuthentication), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" disableAccessKeyAuthentication: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DisableAccessKeyAuthentication)) + { + builder.Append(" disableAccessKeyAuthentication: "); + var boolValue = DisableAccessKeyAuthentication.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Sku), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisData.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisData.cs index 280b00aa0fc8b..20bbea08157d5 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisData.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisData.cs @@ -78,7 +78,7 @@ public RedisData(AzureLocation location, RedisSku sku) : base(location) /// The location. /// A list of availability zones denoting where the resource needs to come from. /// The identity of the resource. - /// All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. + /// All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta, maxmemory-policy,notify-keyspace-events, aof-backup-enabled, aof-storage-connection-string-0, aof-storage-connection-string-1 etc. /// Redis version. This should be in the form 'major[.minor]' (only 'major' is required) or the value 'latest' which refers to the latest stable Redis version that is available. Supported versions: 4.0, 6.0 (latest). Default value is 'latest'. /// Specifies whether the non-ssl Redis server port (6379) is enabled. /// The number of replicas to be created per primary. @@ -88,6 +88,7 @@ public RedisData(AzureLocation location, RedisSku sku) : base(location) /// Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). /// Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. /// Optional: Specifies the update channel for the monthly Redis updates your Redis Cache will receive. Caches using 'Preview' update channel get latest Redis updates at least 4 weeks ahead of 'Stable' channel caches. Default value is 'Stable'. + /// Authentication to Redis through access keys is disabled when set as true. Default value is false. /// The SKU of the Redis cache to deploy. /// The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. /// Static IP address. Optionally, may be specified when deploying a Redis cache inside an existing Azure Virtual Network; auto assigned by default. @@ -100,7 +101,7 @@ public RedisData(AzureLocation location, RedisSku sku) : base(location) /// List of the Redis instances associated with the cache. /// List of private endpoint connection associated with the specified redis cache. /// Keeps track of any properties unknown to the library. - internal RedisData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, IList zones, ManagedServiceIdentity identity, RedisCommonConfiguration redisConfiguration, string redisVersion, bool? enableNonSslPort, int? replicasPerMaster, int? replicasPerPrimary, IDictionary tenantSettings, int? shardCount, RedisTlsVersion? minimumTlsVersion, RedisPublicNetworkAccess? publicNetworkAccess, UpdateChannel? updateChannel, RedisSku sku, ResourceIdentifier subnetId, IPAddress staticIP, RedisProvisioningState? provisioningState, string hostName, int? port, int? sslPort, RedisAccessKeys accessKeys, IReadOnlyList linkedServers, IReadOnlyList instances, IReadOnlyList privateEndpointConnections, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal RedisData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, IList zones, ManagedServiceIdentity identity, RedisCommonConfiguration redisConfiguration, string redisVersion, bool? enableNonSslPort, int? replicasPerMaster, int? replicasPerPrimary, IDictionary tenantSettings, int? shardCount, RedisTlsVersion? minimumTlsVersion, RedisPublicNetworkAccess? publicNetworkAccess, UpdateChannel? updateChannel, bool? disableAccessKeyAuthentication, RedisSku sku, ResourceIdentifier subnetId, IPAddress staticIP, RedisProvisioningState? provisioningState, string hostName, int? port, int? sslPort, RedisAccessKeys accessKeys, IReadOnlyList linkedServers, IReadOnlyList instances, IReadOnlyList privateEndpointConnections, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Zones = zones; Identity = identity; @@ -114,6 +115,7 @@ internal RedisData(ResourceIdentifier id, string name, ResourceType resourceType MinimumTlsVersion = minimumTlsVersion; PublicNetworkAccess = publicNetworkAccess; UpdateChannel = updateChannel; + DisableAccessKeyAuthentication = disableAccessKeyAuthentication; Sku = sku; SubnetId = subnetId; StaticIP = staticIP; @@ -139,7 +141,7 @@ internal RedisData() /// The identity of the resource. [WirePath("identity")] public ManagedServiceIdentity Identity { get; set; } - /// All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. + /// All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta, maxmemory-policy,notify-keyspace-events, aof-backup-enabled, aof-storage-connection-string-0, aof-storage-connection-string-1 etc. [WirePath("properties.redisConfiguration")] public RedisCommonConfiguration RedisConfiguration { get; set; } /// Redis version. This should be in the form 'major[.minor]' (only 'major' is required) or the value 'latest' which refers to the latest stable Redis version that is available. Supported versions: 4.0, 6.0 (latest). Default value is 'latest'. @@ -169,6 +171,9 @@ internal RedisData() /// Optional: Specifies the update channel for the monthly Redis updates your Redis Cache will receive. Caches using 'Preview' update channel get latest Redis updates at least 4 weeks ahead of 'Stable' channel caches. Default value is 'Stable'. [WirePath("properties.updateChannel")] public UpdateChannel? UpdateChannel { get; set; } + /// Authentication to Redis through access keys is disabled when set as true. Default value is false. + [WirePath("properties.disableAccessKeyAuthentication")] + public bool? DisableAccessKeyAuthentication { get; set; } /// The SKU of the Redis cache to deploy. [WirePath("properties.sku")] public RedisSku Sku { get; set; } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisFirewallRuleCollection.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisFirewallRuleCollection.cs index 32c71e95b1bc2..81af3b1faad38 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisFirewallRuleCollection.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisFirewallRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(string r /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string ruleName, Cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(Cancellation /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationToken canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string ruleName, Cancellat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string ruleName, CancellationToken cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisFirewallRuleResource.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisFirewallRuleResource.cs index a6ed3ceddea11..00cffefdd6874 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisFirewallRuleResource.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisFirewallRuleResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task> UpdateAsync(W /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisLinkedServerWithPropertyCollection.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisLinkedServerWithPropertyCollection.cs index ed05f6be5024e..6f5d1829f38f0 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisLinkedServerWithPropertyCollection.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisLinkedServerWithPropertyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> C /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string linked /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(Cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string linkedServerName, C /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string linkedServerName, CancellationToken /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisLinkedServerWithPropertyResource.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisLinkedServerWithPropertyResource.cs index e4dfa895a0c1c..9ef97cfbd3afd 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisLinkedServerWithPropertyResource.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisLinkedServerWithPropertyResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationT /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> U /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPatchScheduleCollection.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPatchScheduleCollection.cs index c37c4de7cc9fe..627048b6d8322 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPatchScheduleCollection.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPatchScheduleCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -204,7 +204,7 @@ public virtual async Task> GetAsync(RedisPa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -245,7 +245,7 @@ public virtual Response Get(RedisPatchScheduleDefaul /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -275,7 +275,7 @@ public virtual AsyncPageable GetAllAsync(Cancellatio /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -305,7 +305,7 @@ public virtual Pageable GetAll(CancellationToken can /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -344,7 +344,7 @@ public virtual async Task> ExistsAsync(RedisPatchScheduleDefaultN /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -383,7 +383,7 @@ public virtual Response Exists(RedisPatchScheduleDefaultName defaultName, /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -424,7 +424,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPatchScheduleResource.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPatchScheduleResource.cs index e9561470027b6..eb05be81d6429 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPatchScheduleResource.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPatchScheduleResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task> UpdateAsync( /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPrivateEndpointConnectionCollection.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPrivateEndpointConnectionCollection.cs index 5c275ea9bc4e2..41d1e09142acd 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPrivateEndpointConnectionCollection.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPrivateEndpointConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpda /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string priva /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -281,7 +281,7 @@ public virtual AsyncPageable GetAllAsync /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -310,7 +310,7 @@ public virtual Pageable GetAll(Cancellat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -353,7 +353,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -441,7 +441,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPrivateEndpointConnectionResource.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPrivateEndpointConnectionResource.cs index c73cd118f8708..b9c8f2aba046a 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPrivateEndpointConnectionResource.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPrivateEndpointConnectionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cancellation /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisResource.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisResource.cs index f9c413e923405..46434414da26f 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisResource.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisResource.cs @@ -116,7 +116,7 @@ public virtual RedisFirewallRuleCollection GetRedisFirewallRules() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -147,7 +147,7 @@ public virtual async Task> GetRedisFirewallR /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -185,7 +185,7 @@ public virtual RedisPatchScheduleCollection GetRedisPatchSchedules() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task> GetRedisPatchSch /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -250,7 +250,7 @@ public virtual RedisLinkedServerWithPropertyCollection GetRedisLinkedServerWithP /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -281,7 +281,7 @@ public virtual async Task> GetRe /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual RedisPrivateEndpointConnectionCollection GetRedisPrivateEndpointC /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -350,7 +350,7 @@ public virtual async Task> GetR /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -388,7 +388,7 @@ public virtual RedisCacheAccessPolicyCollection GetRedisCacheAccessPolicies() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -419,7 +419,7 @@ public virtual async Task> GetRedisCach /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -457,7 +457,7 @@ public virtual RedisCacheAccessPolicyAssignmentCollection GetRedisCacheAccessPol /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -488,7 +488,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -519,7 +519,7 @@ public virtual Response GetRedisCacheA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -559,7 +559,7 @@ public virtual async Task> GetAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -599,7 +599,7 @@ public virtual Response Get(CancellationToken cancellationToken = /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -641,7 +641,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -683,7 +683,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -729,7 +729,7 @@ public virtual async Task> UpdateAsync(WaitUntil wai /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -775,7 +775,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, RedisPatc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -806,7 +806,7 @@ public virtual AsyncPageable GetUpgradeNotificationsAs /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -837,7 +837,7 @@ public virtual Pageable GetUpgradeNotifications(double /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -875,7 +875,7 @@ public virtual async Task> GetKeysAsync(CancellationTo /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -913,7 +913,7 @@ public virtual Response GetKeys(CancellationToken cancellationT /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -955,7 +955,7 @@ public virtual async Task> RegenerateKeyAsync(RedisReg /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -997,7 +997,7 @@ public virtual Response RegenerateKey(RedisRegenerateKeyContent /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -1039,7 +1039,7 @@ public virtual async Task> ForceRebootAsync(Red /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -1081,7 +1081,7 @@ public virtual Response ForceReboot(RedisRebootContent c /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -1127,7 +1127,7 @@ public virtual async Task ImportDataAsync(WaitUntil waitUntil, Imp /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -1173,7 +1173,7 @@ public virtual ArmOperation ImportData(WaitUntil waitUntil, ImportRdbContent con /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -1219,7 +1219,7 @@ public virtual async Task ExportDataAsync(WaitUntil waitUntil, Exp /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -1265,7 +1265,7 @@ public virtual ArmOperation ExportData(WaitUntil waitUntil, ExportRdbContent con /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -1307,7 +1307,7 @@ public virtual async Task> FlushCacheAsync(W /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -1349,7 +1349,7 @@ public virtual ArmOperation FlushCache(WaitUntil waitUnti /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// @@ -1374,7 +1374,7 @@ public virtual AsyncPageable GetPrivateLinkResourcesBy /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// @@ -1399,7 +1399,7 @@ public virtual Pageable GetPrivateLinkResourcesByRedis /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -1461,7 +1461,7 @@ public virtual async Task> AddTagAsync(string key, strin /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -1523,7 +1523,7 @@ public virtual Response AddTag(string key, string value, Cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -1580,7 +1580,7 @@ public virtual async Task> SetTagsAsync(IDictionary /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -1637,7 +1637,7 @@ public virtual Response SetTags(IDictionary tags, /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource @@ -1697,7 +1697,7 @@ public virtual async Task> RemoveTagAsync(string key, Ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-03-01 /// /// /// Resource diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/AccessPolicyAssignmentRestOperations.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/AccessPolicyAssignmentRestOperations.cs index c08be25532c0b..d40fc992fe619 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/AccessPolicyAssignmentRestOperations.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/AccessPolicyAssignmentRestOperations.cs @@ -32,7 +32,7 @@ public AccessPolicyAssignmentRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/AccessPolicyRestOperations.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/AccessPolicyRestOperations.cs index 3751a211f278e..be99b6b63053d 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/AccessPolicyRestOperations.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/AccessPolicyRestOperations.cs @@ -32,7 +32,7 @@ public AccessPolicyRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/AsyncOperationStatusRestOperations.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/AsyncOperationStatusRestOperations.cs index 5ac6bec8d753c..b0c4061afdcdc 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/AsyncOperationStatusRestOperations.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/AsyncOperationStatusRestOperations.cs @@ -32,7 +32,7 @@ public AsyncOperationStatusRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/FirewallRulesRestOperations.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/FirewallRulesRestOperations.cs index 9cb1a5261b5e3..95ea57be94bde 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/FirewallRulesRestOperations.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/FirewallRulesRestOperations.cs @@ -32,7 +32,7 @@ public FirewallRulesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/LinkedServerRestOperations.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/LinkedServerRestOperations.cs index f77b86f7b6050..b17d570b05430 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/LinkedServerRestOperations.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/LinkedServerRestOperations.cs @@ -32,7 +32,7 @@ public LinkedServerRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/PatchSchedulesRestOperations.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/PatchSchedulesRestOperations.cs index 17e5e2f06a6b4..ea1d944187db6 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/PatchSchedulesRestOperations.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/PatchSchedulesRestOperations.cs @@ -32,7 +32,7 @@ public PatchSchedulesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs index 8bbf79e38b23c..907974e3c07d7 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public PrivateEndpointConnectionsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs index 6b17097e93f7a..1952dfbeef8d4 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs @@ -32,7 +32,7 @@ public PrivateLinkResourcesRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/RedisRestOperations.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/RedisRestOperations.cs index f3e2e3174d3da..edd3b0c8dd4a2 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/RedisRestOperations.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RestOperations/RedisRestOperations.cs @@ -32,7 +32,7 @@ public RedisRestOperations(HttpPipeline pipeline, string applicationId, Uri endp { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/autorest.md b/sdk/redis/Azure.ResourceManager.Redis/src/autorest.md index 9351c24820ca2..71c394befdfec 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/autorest.md +++ b/sdk/redis/Azure.ResourceManager.Redis/src/autorest.md @@ -8,7 +8,7 @@ azure-arm: true csharp: true library-name: Redis namespace: Azure.ResourceManager.Redis -require: https://github.com/Azure/azure-rest-api-specs/blob/dac9f85a47b0e4e759593f3a19968a732b911b47/specification/redis/resource-manager/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/3cb1b51638616435470fc10ea00de92512186ece/specification/redis/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: @@ -20,6 +20,7 @@ modelerfour: lenient-model-deduplication: true use-model-reader-writer: true enable-bicep-serialization: true +tag: package-2024-03 rename-mapping: CheckNameAvailabilityParameters: RedisNameAvailabilityContent diff --git a/sdk/redis/Azure.ResourceManager.Redis/tests/ScenarioTests/AadFunctionalTests.cs b/sdk/redis/Azure.ResourceManager.Redis/tests/ScenarioTests/AuthenticationFunctionalTests.cs similarity index 86% rename from sdk/redis/Azure.ResourceManager.Redis/tests/ScenarioTests/AadFunctionalTests.cs rename to sdk/redis/Azure.ResourceManager.Redis/tests/ScenarioTests/AuthenticationFunctionalTests.cs index 4ca15b8bb7804..48de55c1212d2 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/tests/ScenarioTests/AadFunctionalTests.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/tests/ScenarioTests/AuthenticationFunctionalTests.cs @@ -10,11 +10,11 @@ namespace Azure.ResourceManager.Redis.Tests.ScenarioTests { - public class AadFunctionalTests : RedisManagementTestBase + public class AuthenticationFunctionalTests : RedisManagementTestBase { private ResourceGroupResource ResourceGroup { get; set; } private RedisCollection Collection { get; set; } - public AadFunctionalTests(bool isAsync) + public AuthenticationFunctionalTests(bool isAsync) : base(isAsync)//, RecordedTestMode.Record) { } @@ -27,11 +27,13 @@ private async Task SetCollectionsAsync() [Test] public async Task AadTests() { - // Create aad enabled cache + // Create aad enabled cache with access keys authentication disabled await SetCollectionsAsync(); - string redisCacheName = Recording.GenerateAssetName("AadTestCache"); - RedisCreateOrUpdateContent redisCreationParameters = new RedisCreateOrUpdateContent(DefaultLocation, new RedisSku(RedisSkuName.Premium, RedisSkuFamily.Premium, 1)) + string redisCacheName = Recording.GenerateAssetName("AuthenticationTestCache"); + RedisCreateOrUpdateContent redisCreationParameters = new RedisCreateOrUpdateContent(DefaultLocation, + new RedisSku(RedisSkuName.Premium, RedisSkuFamily.Premium, 1)) { + DisableAccessKeyAuthentication = true, RedisConfiguration = new RedisCommonConfiguration() { IsAadEnabled = "true" @@ -39,8 +41,9 @@ public async Task AadTests() }; RedisResource redisResource = (await Collection.CreateOrUpdateAsync(WaitUntil.Completed, redisCacheName, redisCreationParameters)).Value; - // Verify cache is aad enabled + // Verify cache is aad enabled and access keys authentication disabled Assert.IsTrue(string.Equals(redisResource.Data.RedisConfiguration.IsAadEnabled, "true", StringComparison.OrdinalIgnoreCase)); + Assert.IsTrue(redisResource.Data.DisableAccessKeyAuthentication); // List access polices RedisCacheAccessPolicyCollection accessPolicyCollection = redisResource.GetRedisCacheAccessPolicies(); @@ -129,6 +132,16 @@ public async Task AadTests() accessPolicyList = await accessPolicyCollection.GetAllAsync().ToEnumerableAsync(); Assert.AreEqual(3, accessPolicyList.Count); + // Enable access keys authentication on cache + redisCreationParameters = new RedisCreateOrUpdateContent(DefaultLocation, new RedisSku(RedisSkuName.Premium, RedisSkuFamily.Premium, 1)) + { + DisableAccessKeyAuthentication = false + }; + redisResource = (await Collection.CreateOrUpdateAsync(WaitUntil.Completed, redisCacheName, redisCreationParameters)).Value; + + // Verify access keys authentication is enabled + Assert.IsFalse(redisResource.Data.DisableAccessKeyAuthentication); + // Disable aad on cache redisCreationParameters = new RedisCreateOrUpdateContent(DefaultLocation, new RedisSku(RedisSkuName.Premium, RedisSkuFamily.Premium, 1)) { From c6f1765b454208de16a2289cfd7171b5232dce1a Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 11 Jul 2024 05:57:02 -0400 Subject: [PATCH 050/144] Update AutoRest C# version to 3.0.0-beta.20240710.2 (#44947) * Update Generator Version 3.0.0-beta.20240710.2 * Update SDK codes de_he_2 * Update SDK codes st_wo_6 * Update SDK codes mi_pu_4 * Update SDK codes he_me_3 * Update SDK codes co_de_1 * try to fix spec --------- Co-authored-by: tadelesh --- eng/Packages.Data.props | 2 +- eng/emitter-package-lock.json | 27 +- eng/emitter-package.json | 4 +- .../src/Generated/tspCodeModel.json | 4 +- .../tsp-location.yaml | 4 +- ...ProgrammableConnectivity.netstandard2.0.cs | 20 +- .../src/Generated/DeviceLocation.cs | 20 +- .../src/Generated/DeviceNetwork.cs | 20 +- .../src/Generated/Docs/DeviceLocation.xml | 16 +- .../src/Generated/Docs/DeviceNetwork.xml | 16 +- .../src/Generated/Docs/NumberVerification.xml | 32 +- .../src/Generated/Docs/SimSwap.xml | 32 +- .../src/Generated/NumberVerification.cs | 20 +- .../src/Generated/SimSwap.cs | 40 +- .../Samples/Samples_DeviceLocation.cs | 16 +- .../Samples/Samples_DeviceNetwork.cs | 16 +- .../Samples/Samples_NumberVerification.cs | 32 +- .../Generated/Samples/Samples_SimSwap.cs | 32 +- .../tsp-location.yaml | 2 +- ....Analytics.Defender.Easm.netstandard2.0.cs | 32 +- .../src/Generated/Docs/EasmClient.xml | 128 +-- .../src/Generated/EasmClient.cs | 160 +-- .../Generated/Samples/Samples_EasmClient.cs | 128 +-- .../tsp-location.yaml | 2 +- .../Azure.AI.Vision.Face.netstandard2.0.cs | 917 ++++++++++++++++++ .../src/Generated/Docs/FaceSessionClient.xml | 16 +- .../src/Generated/FaceSessionClient.cs | 60 +- .../Samples/Samples_FaceSessionClient.cs | 16 +- .../Azure.AI.Vision.Face/tsp-location.yaml | 2 +- ...Insights.CancerProfiling.netstandard2.0.cs | 4 +- .../src/Generated/CancerProfilingClient.cs | 20 +- .../Generated/Docs/CancerProfilingClient.xml | 16 +- .../Samples/Samples_CancerProfilingClient.cs | 16 +- .../tsp-location.yaml | 2 +- ...nsights.ClinicalMatching.netstandard2.0.cs | 4 +- .../src/Generated/ClinicalMatchingClient.cs | 20 +- .../Generated/Docs/ClinicalMatchingClient.xml | 16 +- .../Samples/Samples_ClinicalMatchingClient.cs | 16 +- .../tsp-location.yaml | 2 +- ...sights.RadiologyInsights.netstandard2.0.cs | 4 +- .../Docs/RadiologyInsightsClient.xml | 16 +- .../src/Generated/RadiologyInsightsClient.cs | 20 +- .../Samples_RadiologyInsightsClient.cs | 16 +- .../tsp-location.yaml | 2 +- ...ure.AI.OpenAI.Assistants.netstandard2.0.cs | 16 +- .../src/Generated/AssistantsClient.cs | 80 +- .../tsp-location.yaml | 2 +- ...nalytics.Purview.DataMap.netstandard2.0.cs | 84 +- .../src/Generated/Discovery.cs | 60 +- .../src/Generated/Docs/Discovery.xml | 48 +- .../src/Generated/Docs/Entity.xml | 112 +-- .../src/Generated/Docs/Glossary.xml | 96 +- .../src/Generated/Docs/Relationship.xml | 32 +- .../src/Generated/Docs/TypeDefinition.xml | 48 +- .../src/Generated/Entity.cs | 158 ++- .../src/Generated/Glossary.cs | 152 ++- .../src/Generated/Relationship.cs | 40 +- .../src/Generated/TypeDefinition.cs | 80 +- .../Generated/Samples/Samples_Discovery.cs | 48 +- .../tests/Generated/Samples/Samples_Entity.cs | 112 +-- .../Generated/Samples/Samples_Glossary.cs | 96 +- .../Generated/Samples/Samples_Relationship.cs | 32 +- .../Samples/Samples_TypeDefinition.cs | 48 +- .../tsp-location.yaml | 3 +- .../tsp-location.yaml | 2 +- 65 files changed, 2104 insertions(+), 1235 deletions(-) create mode 100644 sdk/face/Azure.AI.Vision.Face/api/Azure.AI.Vision.Face.netstandard2.0.cs diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index f80f11bd68f97..af791ece308a5 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -226,7 +226,7 @@ All should have PrivateAssets="All" set so they don't become package dependencies --> - + diff --git a/eng/emitter-package-lock.json b/eng/emitter-package-lock.json index a071be113dd33..c8e923c612a90 100644 --- a/eng/emitter-package-lock.json +++ b/eng/emitter-package-lock.json @@ -5,14 +5,14 @@ "packages": { "": { "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20240707.1" + "@azure-tools/typespec-csharp": "0.2.0-beta.20240710.2" }, "devDependencies": { "@azure-tools/typespec-autorest": "0.43.0", "@azure-tools/typespec-azure-core": "0.43.0", "@azure-tools/typespec-azure-resource-manager": "0.43.0", "@azure-tools/typespec-azure-rulesets": "0.43.0", - "@azure-tools/typespec-client-generator-core": "0.43.1", + "@azure-tools/typespec-client-generator-core": "0.43.2", "@typespec/compiler": "0.57.0", "@typespec/http": "0.57.0", "@typespec/openapi": "0.57.0", @@ -22,9 +22,9 @@ } }, "node_modules/@autorest/csharp": { - "version": "3.0.0-beta.20240707.1", - "resolved": "https://registry.npmjs.org/@autorest/csharp/-/csharp-3.0.0-beta.20240707.1.tgz", - "integrity": "sha512-MjvNBR5H1Yzg3NvsBswDkTj8WXT2rcYPyNIgG6apwgEqUni+HXIUFMgTYFzpoS4A7uTHo+saPH7j4IBYADkpiQ==" + "version": "3.0.0-beta.20240710.2", + "resolved": "https://registry.npmjs.org/@autorest/csharp/-/csharp-3.0.0-beta.20240710.2.tgz", + "integrity": "sha512-xFYWQjVKkid9PZRYPmch16S6SQqx094CFqMWS5T7/A3kPtXcu5IIPoyyhupaDxAZEHlEpQ70qaE/mNOlPX/acQ==" }, "node_modules/@azure-tools/typespec-autorest": { "version": "0.43.0", @@ -96,9 +96,9 @@ } }, "node_modules/@azure-tools/typespec-client-generator-core": { - "version": "0.43.1", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.43.1.tgz", - "integrity": "sha512-NwNN/fIOcjOU/8o6ViCuEAAQl6zmu2X1QKPuXxeSy8ssDwrTiX9Ho2X/7IZM4XmOArKTtgmTkNcSnnmuj5dsGg==", + "version": "0.43.2", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.43.2.tgz", + "integrity": "sha512-UAVV30BtTQBiXmBoQ3SyvmiuBDYoqWFIn7G96hjojpwXpE6D5ba0y5LascMuF1b65eAhGnnf974DElJE9DGepQ==", "dev": true, "dependencies": { "change-case": "~5.4.4", @@ -112,16 +112,15 @@ "@typespec/compiler": "~0.57.0", "@typespec/http": "~0.57.0", "@typespec/rest": "~0.57.0", - "@typespec/versioning": "~0.57.0", - "@typespec/xml": "~0.57.0" + "@typespec/versioning": "~0.57.0" } }, "node_modules/@azure-tools/typespec-csharp": { - "version": "0.2.0-beta.20240707.1", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-csharp/-/typespec-csharp-0.2.0-beta.20240707.1.tgz", - "integrity": "sha512-jYm+W5pLlqeKIRoOPGRQLoEhK6SG8eG1qhrBS8QEV8s12GyngVx1qxChjviArKlCM3xfqX82zLOkrG8iJ5hh6w==", + "version": "0.2.0-beta.20240710.2", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-csharp/-/typespec-csharp-0.2.0-beta.20240710.2.tgz", + "integrity": "sha512-LYSWJ+vuvCjlahcGKPwrJR4uTRcJxzT7715LqDDSDQyH6RcPNVyIGOjjmlfj2AHBYI8bPnq6UgkjfecsUR2Drg==", "dependencies": { - "@autorest/csharp": "3.0.0-beta.20240707.1", + "@autorest/csharp": "3.0.0-beta.20240710.2", "json-serialize-refs": "0.1.0-0" }, "peerDependencies": { diff --git a/eng/emitter-package.json b/eng/emitter-package.json index 5005c065b59b2..bfe498b005d83 100644 --- a/eng/emitter-package.json +++ b/eng/emitter-package.json @@ -1,14 +1,14 @@ { "main": "dist/src/index.js", "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20240707.1" + "@azure-tools/typespec-csharp": "0.2.0-beta.20240710.2" }, "devDependencies": { "@azure-tools/typespec-autorest": "0.43.0", "@azure-tools/typespec-azure-core": "0.43.0", "@azure-tools/typespec-azure-resource-manager": "0.43.0", "@azure-tools/typespec-azure-rulesets": "0.43.0", - "@azure-tools/typespec-client-generator-core": "0.43.1", + "@azure-tools/typespec-client-generator-core": "0.43.2", "@typespec/compiler": "0.57.0", "@typespec/http": "0.57.0", "@typespec/openapi": "0.57.0", diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/tspCodeModel.json b/sdk/communication/Azure.Communication.Messages/src/Generated/tspCodeModel.json index fec6b442d4485..fc12a52cfd2af 100644 --- a/sdk/communication/Azure.Communication.Messages/src/Generated/tspCodeModel.json +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/tspCodeModel.json @@ -1483,8 +1483,8 @@ }, { "$id": "198", - "Name": "NotificationContent", - "NameInRequest": "NotificationContent", + "Name": "notificationContent", + "NameInRequest": "body", "Description": "Details of the message to send.", "Type": { "$ref": "38" diff --git a/sdk/communication/Azure.Communication.Messages/tsp-location.yaml b/sdk/communication/Azure.Communication.Messages/tsp-location.yaml index e85d7a27d9272..01b9db9a86ed6 100644 --- a/sdk/communication/Azure.Communication.Messages/tsp-location.yaml +++ b/sdk/communication/Azure.Communication.Messages/tsp-location.yaml @@ -1,4 +1,4 @@ -commit: 44cbf51b9eee8a2dbf55ced61a61032aaed0148b +commit: b8ec3841224e5a9a27c128e588b1c387baef6a99 directory: specification/communication/Communication.Messages additionalDirectories: [] -repo: Azure/azure-rest-api-specs \ No newline at end of file +repo: Azure/azure-rest-api-specs diff --git a/sdk/communication/Azure.Communication.ProgrammableConnectivity/api/Azure.Communication.ProgrammableConnectivity.netstandard2.0.cs b/sdk/communication/Azure.Communication.ProgrammableConnectivity/api/Azure.Communication.ProgrammableConnectivity.netstandard2.0.cs index dca4e2bad4c91..35957a1c4567a 100644 --- a/sdk/communication/Azure.Communication.ProgrammableConnectivity/api/Azure.Communication.ProgrammableConnectivity.netstandard2.0.cs +++ b/sdk/communication/Azure.Communication.ProgrammableConnectivity/api/Azure.Communication.ProgrammableConnectivity.netstandard2.0.cs @@ -15,9 +15,9 @@ public partial class DeviceLocation { protected DeviceLocation() { } public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } - public virtual Azure.Response Verify(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.DeviceLocationVerificationContent deviceLocationVerificationContent, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Verify(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.DeviceLocationVerificationContent body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Verify(string apcGatewayId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> VerifyAsync(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.DeviceLocationVerificationContent deviceLocationVerificationContent, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> VerifyAsync(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.DeviceLocationVerificationContent body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task VerifyAsync(string apcGatewayId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } } public partial class DeviceLocationVerificationContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel @@ -48,9 +48,9 @@ public partial class DeviceNetwork { protected DeviceNetwork() { } public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } - public virtual Azure.Response Retrieve(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.NetworkIdentifier networkIdentifier, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Retrieve(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.NetworkIdentifier body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Retrieve(string apcGatewayId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> RetrieveAsync(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.NetworkIdentifier networkIdentifier, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RetrieveAsync(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.NetworkIdentifier body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task RetrieveAsync(string apcGatewayId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } } public partial class Ipv4Address : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel @@ -113,9 +113,9 @@ public partial class NumberVerification { protected NumberVerification() { } public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } - public virtual Azure.Response VerifyWithCode(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.NumberVerificationWithCodeContent numberVerificationWithCodeContent, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response VerifyWithCode(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.NumberVerificationWithCodeContent body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response VerifyWithCode(string apcGatewayId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> VerifyWithCodeAsync(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.NumberVerificationWithCodeContent numberVerificationWithCodeContent, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> VerifyWithCodeAsync(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.NumberVerificationWithCodeContent body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task VerifyWithCodeAsync(string apcGatewayId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response VerifyWithoutCode(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.NumberVerificationWithoutCodeContent numberVerificationWithoutCodeContent, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response VerifyWithoutCode(string apcGatewayId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } @@ -178,13 +178,13 @@ public partial class SimSwap { protected SimSwap() { } public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } - public virtual Azure.Response Retrieve(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.SimSwapRetrievalContent simSwapRetrievalContent, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Retrieve(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.SimSwapRetrievalContent body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Retrieve(string apcGatewayId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> RetrieveAsync(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.SimSwapRetrievalContent simSwapRetrievalContent, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RetrieveAsync(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.SimSwapRetrievalContent body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task RetrieveAsync(string apcGatewayId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response Verify(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.SimSwapVerificationContent simSwapVerificationContent, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Verify(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.SimSwapVerificationContent body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Verify(string apcGatewayId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> VerifyAsync(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.SimSwapVerificationContent simSwapVerificationContent, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> VerifyAsync(string apcGatewayId, Azure.Communication.ProgrammableConnectivity.SimSwapVerificationContent body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task VerifyAsync(string apcGatewayId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } } public partial class SimSwapRetrievalContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel diff --git a/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceLocation.cs b/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceLocation.cs index f9bad5389fc28..927683a9c7ada 100644 --- a/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceLocation.cs +++ b/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceLocation.cs @@ -51,16 +51,16 @@ internal DeviceLocation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeli /// Verifies whether a device is within a specified location area, defined as an accuracy (radius) around a point, specified by longitude and latitude. /// The identifier of the APC Gateway resource which should handle this request. - /// Request to verify Location. + /// Body parameter. /// The cancellation token to use. - /// or is null. + /// or is null. /// - public virtual async Task> VerifyAsync(string apcGatewayId, DeviceLocationVerificationContent deviceLocationVerificationContent, CancellationToken cancellationToken = default) + public virtual async Task> VerifyAsync(string apcGatewayId, DeviceLocationVerificationContent body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId)); - Argument.AssertNotNull(deviceLocationVerificationContent, nameof(deviceLocationVerificationContent)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = deviceLocationVerificationContent.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await VerifyAsync(apcGatewayId, content, context).ConfigureAwait(false); return Response.FromValue(DeviceLocationVerificationResult.FromResponse(response), response); @@ -68,16 +68,16 @@ public virtual async Task> VerifyAsyn /// Verifies whether a device is within a specified location area, defined as an accuracy (radius) around a point, specified by longitude and latitude. /// The identifier of the APC Gateway resource which should handle this request. - /// Request to verify Location. + /// Body parameter. /// The cancellation token to use. - /// or is null. + /// or is null. /// - public virtual Response Verify(string apcGatewayId, DeviceLocationVerificationContent deviceLocationVerificationContent, CancellationToken cancellationToken = default) + public virtual Response Verify(string apcGatewayId, DeviceLocationVerificationContent body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId)); - Argument.AssertNotNull(deviceLocationVerificationContent, nameof(deviceLocationVerificationContent)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = deviceLocationVerificationContent.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = Verify(apcGatewayId, content, context); return Response.FromValue(DeviceLocationVerificationResult.FromResponse(response), response); diff --git a/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceNetwork.cs b/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceNetwork.cs index 5e7bcc3e2b0f9..d2c1e51dee071 100644 --- a/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceNetwork.cs +++ b/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/DeviceNetwork.cs @@ -51,16 +51,16 @@ internal DeviceNetwork(ClientDiagnostics clientDiagnostics, HttpPipeline pipelin /// Retrieves the network a given device is on. Returns network in a networkCode format that can be used for other APIs. /// The identifier of the APC Gateway resource which should handle this request. - /// Identifier for the network to be queried. + /// Body parameter. /// The cancellation token to use. - /// or is null. + /// or is null. /// - public virtual async Task> RetrieveAsync(string apcGatewayId, NetworkIdentifier networkIdentifier, CancellationToken cancellationToken = default) + public virtual async Task> RetrieveAsync(string apcGatewayId, NetworkIdentifier body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId)); - Argument.AssertNotNull(networkIdentifier, nameof(networkIdentifier)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = networkIdentifier.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await RetrieveAsync(apcGatewayId, content, context).ConfigureAwait(false); return Response.FromValue(NetworkRetrievalResult.FromResponse(response), response); @@ -68,16 +68,16 @@ public virtual async Task> RetrieveAsync(string /// Retrieves the network a given device is on. Returns network in a networkCode format that can be used for other APIs. /// The identifier of the APC Gateway resource which should handle this request. - /// Identifier for the network to be queried. + /// Body parameter. /// The cancellation token to use. - /// or is null. + /// or is null. /// - public virtual Response Retrieve(string apcGatewayId, NetworkIdentifier networkIdentifier, CancellationToken cancellationToken = default) + public virtual Response Retrieve(string apcGatewayId, NetworkIdentifier body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId)); - Argument.AssertNotNull(networkIdentifier, nameof(networkIdentifier)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = networkIdentifier.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = Retrieve(apcGatewayId, content, context); return Response.FromValue(NetworkRetrievalResult.FromResponse(response), response); diff --git a/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/DeviceLocation.xml b/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/DeviceLocation.xml index e33d286eac284..78861d2d14d83 100644 --- a/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/DeviceLocation.xml +++ b/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/DeviceLocation.xml @@ -9,8 +9,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); -DeviceLocationVerificationContent deviceLocationVerificationContent = new DeviceLocationVerificationContent(new NetworkIdentifier("", ""), 123.45, 123.45, 1234, new LocationDevice()); -Response response = await client.VerifyAsync("", deviceLocationVerificationContent); +DeviceLocationVerificationContent body = new DeviceLocationVerificationContent(new NetworkIdentifier("", ""), 123.45, 123.45, 1234, new LocationDevice()); +Response response = await client.VerifyAsync("", body); ]]> This sample shows how to call VerifyAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); -DeviceLocationVerificationContent deviceLocationVerificationContent = new DeviceLocationVerificationContent(new NetworkIdentifier("", ""), 123.45, 123.45, 1234, new LocationDevice +DeviceLocationVerificationContent body = new DeviceLocationVerificationContent(new NetworkIdentifier("", ""), 123.45, 123.45, 1234, new LocationDevice { NetworkAccessIdentifier = "", PhoneNumber = "", Ipv4Address = new Ipv4Address("", 1234), Ipv6Address = new Ipv6Address("", 1234), }); -Response response = await client.VerifyAsync("", deviceLocationVerificationContent); +Response response = await client.VerifyAsync("", body); ]]> @@ -36,8 +36,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); -DeviceLocationVerificationContent deviceLocationVerificationContent = new DeviceLocationVerificationContent(new NetworkIdentifier("", ""), 123.45, 123.45, 1234, new LocationDevice()); -Response response = client.Verify("", deviceLocationVerificationContent); +DeviceLocationVerificationContent body = new DeviceLocationVerificationContent(new NetworkIdentifier("", ""), 123.45, 123.45, 1234, new LocationDevice()); +Response response = client.Verify("", body); ]]> This sample shows how to call Verify with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); -DeviceLocationVerificationContent deviceLocationVerificationContent = new DeviceLocationVerificationContent(new NetworkIdentifier("", ""), 123.45, 123.45, 1234, new LocationDevice +DeviceLocationVerificationContent body = new DeviceLocationVerificationContent(new NetworkIdentifier("", ""), 123.45, 123.45, 1234, new LocationDevice { NetworkAccessIdentifier = "", PhoneNumber = "", Ipv4Address = new Ipv4Address("", 1234), Ipv6Address = new Ipv6Address("", 1234), }); -Response response = client.Verify("", deviceLocationVerificationContent); +Response response = client.Verify("", body); ]]> diff --git a/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/DeviceNetwork.xml b/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/DeviceNetwork.xml index 23ee4b5876d8e..1f977fef38cb3 100644 --- a/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/DeviceNetwork.xml +++ b/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/DeviceNetwork.xml @@ -9,8 +9,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); -NetworkIdentifier networkIdentifier = new NetworkIdentifier("", ""); -Response response = await client.RetrieveAsync("", networkIdentifier); +NetworkIdentifier body = new NetworkIdentifier("", ""); +Response response = await client.RetrieveAsync("", body); ]]> This sample shows how to call RetrieveAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); -NetworkIdentifier networkIdentifier = new NetworkIdentifier("", ""); -Response response = await client.RetrieveAsync("", networkIdentifier); +NetworkIdentifier body = new NetworkIdentifier("", ""); +Response response = await client.RetrieveAsync("", body); ]]> @@ -30,8 +30,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); -NetworkIdentifier networkIdentifier = new NetworkIdentifier("", ""); -Response response = client.Retrieve("", networkIdentifier); +NetworkIdentifier body = new NetworkIdentifier("", ""); +Response response = client.Retrieve("", body); ]]> This sample shows how to call Retrieve with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); -NetworkIdentifier networkIdentifier = new NetworkIdentifier("", ""); -Response response = client.Retrieve("", networkIdentifier); +NetworkIdentifier body = new NetworkIdentifier("", ""); +Response response = client.Retrieve("", body); ]]> diff --git a/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/NumberVerification.xml b/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/NumberVerification.xml index c5dbe4f6ca5bf..d4e2d4703591f 100644 --- a/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/NumberVerification.xml +++ b/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/NumberVerification.xml @@ -9,8 +9,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); -NumberVerificationWithoutCodeContent numberVerificationWithoutCodeContent = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("", ""), new Uri("http://localhost:3000")); -Response response = await client.VerifyWithoutCodeAsync("", numberVerificationWithoutCodeContent); +NumberVerificationWithoutCodeContent body = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("", ""), new Uri("http://localhost:3000")); +Response response = await client.VerifyWithoutCodeAsync("", body); ]]> This sample shows how to call VerifyWithoutCodeAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); -NumberVerificationWithoutCodeContent numberVerificationWithoutCodeContent = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("", ""), new Uri("http://localhost:3000")) +NumberVerificationWithoutCodeContent body = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("", ""), new Uri("http://localhost:3000")) { PhoneNumber = "", HashedPhoneNumber = "", }; -Response response = await client.VerifyWithoutCodeAsync("", numberVerificationWithoutCodeContent); +Response response = await client.VerifyWithoutCodeAsync("", body); ]]> @@ -34,8 +34,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); -NumberVerificationWithoutCodeContent numberVerificationWithoutCodeContent = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("", ""), new Uri("http://localhost:3000")); -Response response = client.VerifyWithoutCode("", numberVerificationWithoutCodeContent); +NumberVerificationWithoutCodeContent body = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("", ""), new Uri("http://localhost:3000")); +Response response = client.VerifyWithoutCode("", body); ]]> This sample shows how to call VerifyWithoutCode with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); -NumberVerificationWithoutCodeContent numberVerificationWithoutCodeContent = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("", ""), new Uri("http://localhost:3000")) +NumberVerificationWithoutCodeContent body = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("", ""), new Uri("http://localhost:3000")) { PhoneNumber = "", HashedPhoneNumber = "", }; -Response response = client.VerifyWithoutCode("", numberVerificationWithoutCodeContent); +Response response = client.VerifyWithoutCode("", body); ]]> @@ -145,8 +145,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); -NumberVerificationWithCodeContent numberVerificationWithCodeContent = new NumberVerificationWithCodeContent(""); -Response response = await client.VerifyWithCodeAsync("", numberVerificationWithCodeContent); +NumberVerificationWithCodeContent body = new NumberVerificationWithCodeContent(""); +Response response = await client.VerifyWithCodeAsync("", body); ]]> This sample shows how to call VerifyWithCodeAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); -NumberVerificationWithCodeContent numberVerificationWithCodeContent = new NumberVerificationWithCodeContent(""); -Response response = await client.VerifyWithCodeAsync("", numberVerificationWithCodeContent); +NumberVerificationWithCodeContent body = new NumberVerificationWithCodeContent(""); +Response response = await client.VerifyWithCodeAsync("", body); ]]> @@ -166,8 +166,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); -NumberVerificationWithCodeContent numberVerificationWithCodeContent = new NumberVerificationWithCodeContent(""); -Response response = client.VerifyWithCode("", numberVerificationWithCodeContent); +NumberVerificationWithCodeContent body = new NumberVerificationWithCodeContent(""); +Response response = client.VerifyWithCode("", body); ]]> This sample shows how to call VerifyWithCode with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); -NumberVerificationWithCodeContent numberVerificationWithCodeContent = new NumberVerificationWithCodeContent(""); -Response response = client.VerifyWithCode("", numberVerificationWithCodeContent); +NumberVerificationWithCodeContent body = new NumberVerificationWithCodeContent(""); +Response response = client.VerifyWithCode("", body); ]]> diff --git a/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/SimSwap.xml b/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/SimSwap.xml index 336bb16785a6c..83bbc5ad2cc1f 100644 --- a/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/SimSwap.xml +++ b/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/Docs/SimSwap.xml @@ -9,8 +9,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); -SimSwapRetrievalContent simSwapRetrievalContent = new SimSwapRetrievalContent(new NetworkIdentifier("", "")); -Response response = await client.RetrieveAsync("", simSwapRetrievalContent); +SimSwapRetrievalContent body = new SimSwapRetrievalContent(new NetworkIdentifier("", "")); +Response response = await client.RetrieveAsync("", body); ]]> This sample shows how to call RetrieveAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); -SimSwapRetrievalContent simSwapRetrievalContent = new SimSwapRetrievalContent(new NetworkIdentifier("", "")) +SimSwapRetrievalContent body = new SimSwapRetrievalContent(new NetworkIdentifier("", "")) { PhoneNumber = "", }; -Response response = await client.RetrieveAsync("", simSwapRetrievalContent); +Response response = await client.RetrieveAsync("", body); ]]> @@ -33,8 +33,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); -SimSwapRetrievalContent simSwapRetrievalContent = new SimSwapRetrievalContent(new NetworkIdentifier("", "")); -Response response = client.Retrieve("", simSwapRetrievalContent); +SimSwapRetrievalContent body = new SimSwapRetrievalContent(new NetworkIdentifier("", "")); +Response response = client.Retrieve("", body); ]]> This sample shows how to call Retrieve with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); -SimSwapRetrievalContent simSwapRetrievalContent = new SimSwapRetrievalContent(new NetworkIdentifier("", "")) +SimSwapRetrievalContent body = new SimSwapRetrievalContent(new NetworkIdentifier("", "")) { PhoneNumber = "", }; -Response response = client.Retrieve("", simSwapRetrievalContent); +Response response = client.Retrieve("", body); ]]> @@ -141,8 +141,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); -SimSwapVerificationContent simSwapVerificationContent = new SimSwapVerificationContent(new NetworkIdentifier("", "")); -Response response = await client.VerifyAsync("", simSwapVerificationContent); +SimSwapVerificationContent body = new SimSwapVerificationContent(new NetworkIdentifier("", "")); +Response response = await client.VerifyAsync("", body); ]]> This sample shows how to call VerifyAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); -SimSwapVerificationContent simSwapVerificationContent = new SimSwapVerificationContent(new NetworkIdentifier("", "")) +SimSwapVerificationContent body = new SimSwapVerificationContent(new NetworkIdentifier("", "")) { PhoneNumber = "", MaxAgeHours = 1234, }; -Response response = await client.VerifyAsync("", simSwapVerificationContent); +Response response = await client.VerifyAsync("", body); ]]> @@ -166,8 +166,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); -SimSwapVerificationContent simSwapVerificationContent = new SimSwapVerificationContent(new NetworkIdentifier("", "")); -Response response = client.Verify("", simSwapVerificationContent); +SimSwapVerificationContent body = new SimSwapVerificationContent(new NetworkIdentifier("", "")); +Response response = client.Verify("", body); ]]> This sample shows how to call Verify with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); -SimSwapVerificationContent simSwapVerificationContent = new SimSwapVerificationContent(new NetworkIdentifier("", "")) +SimSwapVerificationContent body = new SimSwapVerificationContent(new NetworkIdentifier("", "")) { PhoneNumber = "", MaxAgeHours = 1234, }; -Response response = client.Verify("", simSwapVerificationContent); +Response response = client.Verify("", body); ]]> diff --git a/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/NumberVerification.cs b/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/NumberVerification.cs index def53355be57f..e50a5823df633 100644 --- a/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/NumberVerification.cs +++ b/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/NumberVerification.cs @@ -62,16 +62,16 @@ internal NumberVerification(ClientDiagnostics clientDiagnostics, HttpPipeline pi /// Verifies the phone number (MSISDN) associated with a device. /// The identifier of the APC Gateway resource which should handle this request. - /// Request to verify number of device - second call. + /// Body parameter. /// The cancellation token to use. - /// or is null. + /// or is null. /// - public virtual async Task> VerifyWithCodeAsync(string apcGatewayId, NumberVerificationWithCodeContent numberVerificationWithCodeContent, CancellationToken cancellationToken = default) + public virtual async Task> VerifyWithCodeAsync(string apcGatewayId, NumberVerificationWithCodeContent body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId)); - Argument.AssertNotNull(numberVerificationWithCodeContent, nameof(numberVerificationWithCodeContent)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = numberVerificationWithCodeContent.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await VerifyWithCodeAsync(apcGatewayId, content, context).ConfigureAwait(false); return Response.FromValue(NumberVerificationResult.FromResponse(response), response); @@ -79,16 +79,16 @@ public virtual async Task> VerifyWithCodeAsyn /// Verifies the phone number (MSISDN) associated with a device. /// The identifier of the APC Gateway resource which should handle this request. - /// Request to verify number of device - second call. + /// Body parameter. /// The cancellation token to use. - /// or is null. + /// or is null. /// - public virtual Response VerifyWithCode(string apcGatewayId, NumberVerificationWithCodeContent numberVerificationWithCodeContent, CancellationToken cancellationToken = default) + public virtual Response VerifyWithCode(string apcGatewayId, NumberVerificationWithCodeContent body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId)); - Argument.AssertNotNull(numberVerificationWithCodeContent, nameof(numberVerificationWithCodeContent)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = numberVerificationWithCodeContent.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = VerifyWithCode(apcGatewayId, content, context); return Response.FromValue(NumberVerificationResult.FromResponse(response), response); diff --git a/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/SimSwap.cs b/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/SimSwap.cs index 545f342cfd762..c8696bdccb133 100644 --- a/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/SimSwap.cs +++ b/sdk/communication/Azure.Communication.ProgrammableConnectivity/src/Generated/SimSwap.cs @@ -51,16 +51,16 @@ internal SimSwap(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Tok /// Provides timestamp of latest SIM swap. /// The identifier of the APC Gateway resource which should handle this request. - /// Request to retrieve SimSwap date. + /// Body parameter. /// The cancellation token to use. - /// or is null. + /// or is null. /// - public virtual async Task> RetrieveAsync(string apcGatewayId, SimSwapRetrievalContent simSwapRetrievalContent, CancellationToken cancellationToken = default) + public virtual async Task> RetrieveAsync(string apcGatewayId, SimSwapRetrievalContent body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId)); - Argument.AssertNotNull(simSwapRetrievalContent, nameof(simSwapRetrievalContent)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = simSwapRetrievalContent.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await RetrieveAsync(apcGatewayId, content, context).ConfigureAwait(false); return Response.FromValue(SimSwapRetrievalResult.FromResponse(response), response); @@ -68,16 +68,16 @@ public virtual async Task> RetrieveAsync(string /// Provides timestamp of latest SIM swap. /// The identifier of the APC Gateway resource which should handle this request. - /// Request to retrieve SimSwap date. + /// Body parameter. /// The cancellation token to use. - /// or is null. + /// or is null. /// - public virtual Response Retrieve(string apcGatewayId, SimSwapRetrievalContent simSwapRetrievalContent, CancellationToken cancellationToken = default) + public virtual Response Retrieve(string apcGatewayId, SimSwapRetrievalContent body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId)); - Argument.AssertNotNull(simSwapRetrievalContent, nameof(simSwapRetrievalContent)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = simSwapRetrievalContent.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = Retrieve(apcGatewayId, content, context); return Response.FromValue(SimSwapRetrievalResult.FromResponse(response), response); @@ -167,16 +167,16 @@ public virtual Response Retrieve(string apcGatewayId, RequestContent content, Re /// Verifies if a SIM swap has been performed during a past period (defined in the request with 'maxAgeHours' attribute). Returns 'True' if a SIM swap has occured. /// The identifier of the APC Gateway resource which should handle this request. - /// Request to verify SimSwap in period. + /// Body parameter. /// The cancellation token to use. - /// or is null. + /// or is null. /// - public virtual async Task> VerifyAsync(string apcGatewayId, SimSwapVerificationContent simSwapVerificationContent, CancellationToken cancellationToken = default) + public virtual async Task> VerifyAsync(string apcGatewayId, SimSwapVerificationContent body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId)); - Argument.AssertNotNull(simSwapVerificationContent, nameof(simSwapVerificationContent)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = simSwapVerificationContent.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await VerifyAsync(apcGatewayId, content, context).ConfigureAwait(false); return Response.FromValue(SimSwapVerificationResult.FromResponse(response), response); @@ -184,16 +184,16 @@ public virtual async Task> VerifyAsync(strin /// Verifies if a SIM swap has been performed during a past period (defined in the request with 'maxAgeHours' attribute). Returns 'True' if a SIM swap has occured. /// The identifier of the APC Gateway resource which should handle this request. - /// Request to verify SimSwap in period. + /// Body parameter. /// The cancellation token to use. - /// or is null. + /// or is null. /// - public virtual Response Verify(string apcGatewayId, SimSwapVerificationContent simSwapVerificationContent, CancellationToken cancellationToken = default) + public virtual Response Verify(string apcGatewayId, SimSwapVerificationContent body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(apcGatewayId, nameof(apcGatewayId)); - Argument.AssertNotNull(simSwapVerificationContent, nameof(simSwapVerificationContent)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = simSwapVerificationContent.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = Verify(apcGatewayId, content, context); return Response.FromValue(SimSwapVerificationResult.FromResponse(response), response); diff --git a/sdk/communication/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_DeviceLocation.cs b/sdk/communication/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_DeviceLocation.cs index a8de526052c46..36d8d907213ab 100644 --- a/sdk/communication/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_DeviceLocation.cs +++ b/sdk/communication/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_DeviceLocation.cs @@ -76,8 +76,8 @@ public void Example_DeviceLocation_Verify_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); - DeviceLocationVerificationContent deviceLocationVerificationContent = new DeviceLocationVerificationContent(new NetworkIdentifier("", ""), 123.45, 123.45, 1234, new LocationDevice()); - Response response = client.Verify("", deviceLocationVerificationContent); + DeviceLocationVerificationContent body = new DeviceLocationVerificationContent(new NetworkIdentifier("", ""), 123.45, 123.45, 1234, new LocationDevice()); + Response response = client.Verify("", body); } [Test] @@ -88,8 +88,8 @@ public async Task Example_DeviceLocation_Verify_ShortVersion_Convenience_Async() TokenCredential credential = new DefaultAzureCredential(); DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); - DeviceLocationVerificationContent deviceLocationVerificationContent = new DeviceLocationVerificationContent(new NetworkIdentifier("", ""), 123.45, 123.45, 1234, new LocationDevice()); - Response response = await client.VerifyAsync("", deviceLocationVerificationContent); + DeviceLocationVerificationContent body = new DeviceLocationVerificationContent(new NetworkIdentifier("", ""), 123.45, 123.45, 1234, new LocationDevice()); + Response response = await client.VerifyAsync("", body); } [Test] @@ -180,14 +180,14 @@ public void Example_DeviceLocation_Verify_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); - DeviceLocationVerificationContent deviceLocationVerificationContent = new DeviceLocationVerificationContent(new NetworkIdentifier("", ""), 123.45, 123.45, 1234, new LocationDevice + DeviceLocationVerificationContent body = new DeviceLocationVerificationContent(new NetworkIdentifier("", ""), 123.45, 123.45, 1234, new LocationDevice { NetworkAccessIdentifier = "", PhoneNumber = "", Ipv4Address = new Ipv4Address("", 1234), Ipv6Address = new Ipv6Address("", 1234), }); - Response response = client.Verify("", deviceLocationVerificationContent); + Response response = client.Verify("", body); } [Test] @@ -198,14 +198,14 @@ public async Task Example_DeviceLocation_Verify_AllParameters_Convenience_Async( TokenCredential credential = new DefaultAzureCredential(); DeviceLocation client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceLocationClient(apiVersion: "2024-02-09-preview"); - DeviceLocationVerificationContent deviceLocationVerificationContent = new DeviceLocationVerificationContent(new NetworkIdentifier("", ""), 123.45, 123.45, 1234, new LocationDevice + DeviceLocationVerificationContent body = new DeviceLocationVerificationContent(new NetworkIdentifier("", ""), 123.45, 123.45, 1234, new LocationDevice { NetworkAccessIdentifier = "", PhoneNumber = "", Ipv4Address = new Ipv4Address("", 1234), Ipv6Address = new Ipv6Address("", 1234), }); - Response response = await client.VerifyAsync("", deviceLocationVerificationContent); + Response response = await client.VerifyAsync("", body); } } } diff --git a/sdk/communication/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_DeviceNetwork.cs b/sdk/communication/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_DeviceNetwork.cs index b35c63682cc1c..e034a64c0be7a 100644 --- a/sdk/communication/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_DeviceNetwork.cs +++ b/sdk/communication/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_DeviceNetwork.cs @@ -62,8 +62,8 @@ public void Example_DeviceNetwork_Retrieve_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); - NetworkIdentifier networkIdentifier = new NetworkIdentifier("", ""); - Response response = client.Retrieve("", networkIdentifier); + NetworkIdentifier body = new NetworkIdentifier("", ""); + Response response = client.Retrieve("", body); } [Test] @@ -74,8 +74,8 @@ public async Task Example_DeviceNetwork_Retrieve_ShortVersion_Convenience_Async( TokenCredential credential = new DefaultAzureCredential(); DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); - NetworkIdentifier networkIdentifier = new NetworkIdentifier("", ""); - Response response = await client.RetrieveAsync("", networkIdentifier); + NetworkIdentifier body = new NetworkIdentifier("", ""); + Response response = await client.RetrieveAsync("", body); } [Test] @@ -124,8 +124,8 @@ public void Example_DeviceNetwork_Retrieve_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); - NetworkIdentifier networkIdentifier = new NetworkIdentifier("", ""); - Response response = client.Retrieve("", networkIdentifier); + NetworkIdentifier body = new NetworkIdentifier("", ""); + Response response = client.Retrieve("", body); } [Test] @@ -136,8 +136,8 @@ public async Task Example_DeviceNetwork_Retrieve_AllParameters_Convenience_Async TokenCredential credential = new DefaultAzureCredential(); DeviceNetwork client = new ProgrammableConnectivityClient(endpoint, credential).GetDeviceNetworkClient(apiVersion: "2024-02-09-preview"); - NetworkIdentifier networkIdentifier = new NetworkIdentifier("", ""); - Response response = await client.RetrieveAsync("", networkIdentifier); + NetworkIdentifier body = new NetworkIdentifier("", ""); + Response response = await client.RetrieveAsync("", body); } } } diff --git a/sdk/communication/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_NumberVerification.cs b/sdk/communication/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_NumberVerification.cs index 70087620b06ab..8f0abc9e94dcc 100644 --- a/sdk/communication/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_NumberVerification.cs +++ b/sdk/communication/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_NumberVerification.cs @@ -68,8 +68,8 @@ public void Example_NumberVerification_VerifyWithoutCode_ShortVersion_Convenienc TokenCredential credential = new DefaultAzureCredential(); NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); - NumberVerificationWithoutCodeContent numberVerificationWithoutCodeContent = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("", ""), new Uri("http://localhost:3000")); - Response response = client.VerifyWithoutCode("", numberVerificationWithoutCodeContent); + NumberVerificationWithoutCodeContent body = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("", ""), new Uri("http://localhost:3000")); + Response response = client.VerifyWithoutCode("", body); } [Test] @@ -80,8 +80,8 @@ public async Task Example_NumberVerification_VerifyWithoutCode_ShortVersion_Conv TokenCredential credential = new DefaultAzureCredential(); NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); - NumberVerificationWithoutCodeContent numberVerificationWithoutCodeContent = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("", ""), new Uri("http://localhost:3000")); - Response response = await client.VerifyWithoutCodeAsync("", numberVerificationWithoutCodeContent); + NumberVerificationWithoutCodeContent body = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("", ""), new Uri("http://localhost:3000")); + Response response = await client.VerifyWithoutCodeAsync("", body); } [Test] @@ -140,12 +140,12 @@ public void Example_NumberVerification_VerifyWithoutCode_AllParameters_Convenien TokenCredential credential = new DefaultAzureCredential(); NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); - NumberVerificationWithoutCodeContent numberVerificationWithoutCodeContent = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("", ""), new Uri("http://localhost:3000")) + NumberVerificationWithoutCodeContent body = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("", ""), new Uri("http://localhost:3000")) { PhoneNumber = "", HashedPhoneNumber = "", }; - Response response = client.VerifyWithoutCode("", numberVerificationWithoutCodeContent); + Response response = client.VerifyWithoutCode("", body); } [Test] @@ -156,12 +156,12 @@ public async Task Example_NumberVerification_VerifyWithoutCode_AllParameters_Con TokenCredential credential = new DefaultAzureCredential(); NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); - NumberVerificationWithoutCodeContent numberVerificationWithoutCodeContent = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("", ""), new Uri("http://localhost:3000")) + NumberVerificationWithoutCodeContent body = new NumberVerificationWithoutCodeContent(new NetworkIdentifier("", ""), new Uri("http://localhost:3000")) { PhoneNumber = "", HashedPhoneNumber = "", }; - Response response = await client.VerifyWithoutCodeAsync("", numberVerificationWithoutCodeContent); + Response response = await client.VerifyWithoutCodeAsync("", body); } [Test] @@ -208,8 +208,8 @@ public void Example_NumberVerification_VerifyWithCode_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); - NumberVerificationWithCodeContent numberVerificationWithCodeContent = new NumberVerificationWithCodeContent(""); - Response response = client.VerifyWithCode("", numberVerificationWithCodeContent); + NumberVerificationWithCodeContent body = new NumberVerificationWithCodeContent(""); + Response response = client.VerifyWithCode("", body); } [Test] @@ -220,8 +220,8 @@ public async Task Example_NumberVerification_VerifyWithCode_ShortVersion_Conveni TokenCredential credential = new DefaultAzureCredential(); NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); - NumberVerificationWithCodeContent numberVerificationWithCodeContent = new NumberVerificationWithCodeContent(""); - Response response = await client.VerifyWithCodeAsync("", numberVerificationWithCodeContent); + NumberVerificationWithCodeContent body = new NumberVerificationWithCodeContent(""); + Response response = await client.VerifyWithCodeAsync("", body); } [Test] @@ -268,8 +268,8 @@ public void Example_NumberVerification_VerifyWithCode_AllParameters_Convenience( TokenCredential credential = new DefaultAzureCredential(); NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); - NumberVerificationWithCodeContent numberVerificationWithCodeContent = new NumberVerificationWithCodeContent(""); - Response response = client.VerifyWithCode("", numberVerificationWithCodeContent); + NumberVerificationWithCodeContent body = new NumberVerificationWithCodeContent(""); + Response response = client.VerifyWithCode("", body); } [Test] @@ -280,8 +280,8 @@ public async Task Example_NumberVerification_VerifyWithCode_AllParameters_Conven TokenCredential credential = new DefaultAzureCredential(); NumberVerification client = new ProgrammableConnectivityClient(endpoint, credential).GetNumberVerificationClient(apiVersion: "2024-02-09-preview"); - NumberVerificationWithCodeContent numberVerificationWithCodeContent = new NumberVerificationWithCodeContent(""); - Response response = await client.VerifyWithCodeAsync("", numberVerificationWithCodeContent); + NumberVerificationWithCodeContent body = new NumberVerificationWithCodeContent(""); + Response response = await client.VerifyWithCodeAsync("", body); } } } diff --git a/sdk/communication/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_SimSwap.cs b/sdk/communication/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_SimSwap.cs index ed60c0336e32c..d43346eac1ac4 100644 --- a/sdk/communication/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_SimSwap.cs +++ b/sdk/communication/Azure.Communication.ProgrammableConnectivity/tests/Generated/Samples/Samples_SimSwap.cs @@ -68,8 +68,8 @@ public void Example_SimSwap_Retrieve_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); - SimSwapRetrievalContent simSwapRetrievalContent = new SimSwapRetrievalContent(new NetworkIdentifier("", "")); - Response response = client.Retrieve("", simSwapRetrievalContent); + SimSwapRetrievalContent body = new SimSwapRetrievalContent(new NetworkIdentifier("", "")); + Response response = client.Retrieve("", body); } [Test] @@ -80,8 +80,8 @@ public async Task Example_SimSwap_Retrieve_ShortVersion_Convenience_Async() TokenCredential credential = new DefaultAzureCredential(); SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); - SimSwapRetrievalContent simSwapRetrievalContent = new SimSwapRetrievalContent(new NetworkIdentifier("", "")); - Response response = await client.RetrieveAsync("", simSwapRetrievalContent); + SimSwapRetrievalContent body = new SimSwapRetrievalContent(new NetworkIdentifier("", "")); + Response response = await client.RetrieveAsync("", body); } [Test] @@ -138,11 +138,11 @@ public void Example_SimSwap_Retrieve_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); - SimSwapRetrievalContent simSwapRetrievalContent = new SimSwapRetrievalContent(new NetworkIdentifier("", "")) + SimSwapRetrievalContent body = new SimSwapRetrievalContent(new NetworkIdentifier("", "")) { PhoneNumber = "", }; - Response response = client.Retrieve("", simSwapRetrievalContent); + Response response = client.Retrieve("", body); } [Test] @@ -153,11 +153,11 @@ public async Task Example_SimSwap_Retrieve_AllParameters_Convenience_Async() TokenCredential credential = new DefaultAzureCredential(); SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); - SimSwapRetrievalContent simSwapRetrievalContent = new SimSwapRetrievalContent(new NetworkIdentifier("", "")) + SimSwapRetrievalContent body = new SimSwapRetrievalContent(new NetworkIdentifier("", "")) { PhoneNumber = "", }; - Response response = await client.RetrieveAsync("", simSwapRetrievalContent); + Response response = await client.RetrieveAsync("", body); } [Test] @@ -212,8 +212,8 @@ public void Example_SimSwap_Verify_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); - SimSwapVerificationContent simSwapVerificationContent = new SimSwapVerificationContent(new NetworkIdentifier("", "")); - Response response = client.Verify("", simSwapVerificationContent); + SimSwapVerificationContent body = new SimSwapVerificationContent(new NetworkIdentifier("", "")); + Response response = client.Verify("", body); } [Test] @@ -224,8 +224,8 @@ public async Task Example_SimSwap_Verify_ShortVersion_Convenience_Async() TokenCredential credential = new DefaultAzureCredential(); SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); - SimSwapVerificationContent simSwapVerificationContent = new SimSwapVerificationContent(new NetworkIdentifier("", "")); - Response response = await client.VerifyAsync("", simSwapVerificationContent); + SimSwapVerificationContent body = new SimSwapVerificationContent(new NetworkIdentifier("", "")); + Response response = await client.VerifyAsync("", body); } [Test] @@ -284,12 +284,12 @@ public void Example_SimSwap_Verify_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); - SimSwapVerificationContent simSwapVerificationContent = new SimSwapVerificationContent(new NetworkIdentifier("", "")) + SimSwapVerificationContent body = new SimSwapVerificationContent(new NetworkIdentifier("", "")) { PhoneNumber = "", MaxAgeHours = 1234, }; - Response response = client.Verify("", simSwapVerificationContent); + Response response = client.Verify("", body); } [Test] @@ -300,12 +300,12 @@ public async Task Example_SimSwap_Verify_AllParameters_Convenience_Async() TokenCredential credential = new DefaultAzureCredential(); SimSwap client = new ProgrammableConnectivityClient(endpoint, credential).GetSimSwapClient(apiVersion: "2024-02-09-preview"); - SimSwapVerificationContent simSwapVerificationContent = new SimSwapVerificationContent(new NetworkIdentifier("", "")) + SimSwapVerificationContent body = new SimSwapVerificationContent(new NetworkIdentifier("", "")) { PhoneNumber = "", MaxAgeHours = 1234, }; - Response response = await client.VerifyAsync("", simSwapVerificationContent); + Response response = await client.VerifyAsync("", body); } } } diff --git a/sdk/communication/Azure.Communication.ProgrammableConnectivity/tsp-location.yaml b/sdk/communication/Azure.Communication.ProgrammableConnectivity/tsp-location.yaml index a3194647b4a84..984bcf4b206ce 100644 --- a/sdk/communication/Azure.Communication.ProgrammableConnectivity/tsp-location.yaml +++ b/sdk/communication/Azure.Communication.ProgrammableConnectivity/tsp-location.yaml @@ -1,4 +1,4 @@ -commit: 018899cb32a2ccb87953beff95d0a21ad62b53c8 +commit: c28640102e994513192bc17863eec5968b0057d5 repo: Azure/azure-rest-api-specs directory: specification/programmableconnectivity/Azure.ProgrammableConnectivity diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/api/Azure.Analytics.Defender.Easm.netstandard2.0.cs b/sdk/easm/Azure.Analytics.Defender.Easm/api/Azure.Analytics.Defender.Easm.netstandard2.0.cs index ff9626d8f8d00..0e4565a4d11aa 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/api/Azure.Analytics.Defender.Easm.netstandard2.0.cs +++ b/sdk/easm/Azure.Analytics.Defender.Easm/api/Azure.Analytics.Defender.Easm.netstandard2.0.cs @@ -791,17 +791,17 @@ public EasmClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Az public virtual Azure.Response CancelTask(string taskId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task CancelTaskAsync(string taskId, Azure.RequestContext context) { throw null; } public virtual System.Threading.Tasks.Task> CancelTaskAsync(string taskId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateOrReplaceDataConnection(string dataConnectionName, Azure.Analytics.Defender.Easm.DataConnectionPayload dataConnectionPayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateOrReplaceDataConnection(string dataConnectionName, Azure.Analytics.Defender.Easm.DataConnectionPayload body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateOrReplaceDataConnection(string dataConnectionName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrReplaceDataConnectionAsync(string dataConnectionName, Azure.Analytics.Defender.Easm.DataConnectionPayload dataConnectionPayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrReplaceDataConnectionAsync(string dataConnectionName, Azure.Analytics.Defender.Easm.DataConnectionPayload body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task CreateOrReplaceDataConnectionAsync(string dataConnectionName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response CreateOrReplaceDiscoveryGroup(string groupName, Azure.Analytics.Defender.Easm.DiscoveryGroupPayload discoveryGroupPayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateOrReplaceDiscoveryGroup(string groupName, Azure.Analytics.Defender.Easm.DiscoveryGroupPayload body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateOrReplaceDiscoveryGroup(string groupName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrReplaceDiscoveryGroupAsync(string groupName, Azure.Analytics.Defender.Easm.DiscoveryGroupPayload discoveryGroupPayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrReplaceDiscoveryGroupAsync(string groupName, Azure.Analytics.Defender.Easm.DiscoveryGroupPayload body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task CreateOrReplaceDiscoveryGroupAsync(string groupName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response CreateOrReplaceSavedFilter(string filterName, Azure.Analytics.Defender.Easm.SavedFilterPayload savedFilterPayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateOrReplaceSavedFilter(string filterName, Azure.Analytics.Defender.Easm.SavedFilterPayload body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateOrReplaceSavedFilter(string filterName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrReplaceSavedFilterAsync(string filterName, Azure.Analytics.Defender.Easm.SavedFilterPayload savedFilterPayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrReplaceSavedFilterAsync(string filterName, Azure.Analytics.Defender.Easm.SavedFilterPayload body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task CreateOrReplaceSavedFilterAsync(string filterName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response DeleteDataConnection(string dataConnectionName, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task DeleteDataConnectionAsync(string dataConnectionName, Azure.RequestContext context = null) { throw null; } @@ -855,13 +855,13 @@ public EasmClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Az public virtual Azure.Pageable GetSavedFilters(string filter = null, int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetSavedFiltersAsync(string filter, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } public virtual Azure.AsyncPageable GetSavedFiltersAsync(string filter = null, int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetSnapshot(Azure.Analytics.Defender.Easm.ReportAssetSnapshotPayload reportAssetSnapshotPayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetSnapshot(Azure.Analytics.Defender.Easm.ReportAssetSnapshotPayload body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetSnapshot(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> GetSnapshotAsync(Azure.Analytics.Defender.Easm.ReportAssetSnapshotPayload reportAssetSnapshotPayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSnapshotAsync(Azure.Analytics.Defender.Easm.ReportAssetSnapshotPayload body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task GetSnapshotAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response GetSummary(Azure.Analytics.Defender.Easm.ReportAssetSummaryPayload reportAssetSummaryPayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetSummary(Azure.Analytics.Defender.Easm.ReportAssetSummaryPayload body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetSummary(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> GetSummaryAsync(Azure.Analytics.Defender.Easm.ReportAssetSummaryPayload reportAssetSummaryPayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSummaryAsync(Azure.Analytics.Defender.Easm.ReportAssetSummaryPayload body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task GetSummaryAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response GetTask(string taskId, Azure.RequestContext context) { throw null; } public virtual Azure.Response GetTask(string taskId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -873,17 +873,17 @@ public EasmClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Az public virtual Azure.AsyncPageable GetTasksAsync(string filter = null, string orderby = null, int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RunDiscoveryGroup(string groupName, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task RunDiscoveryGroupAsync(string groupName, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response UpdateAssets(string filter, Azure.Analytics.Defender.Easm.AssetUpdatePayload assetUpdatePayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response UpdateAssets(string filter, Azure.Analytics.Defender.Easm.AssetUpdatePayload body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response UpdateAssets(string filter, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAssetsAsync(string filter, Azure.Analytics.Defender.Easm.AssetUpdatePayload assetUpdatePayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAssetsAsync(string filter, Azure.Analytics.Defender.Easm.AssetUpdatePayload body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task UpdateAssetsAsync(string filter, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response ValidateDataConnection(Azure.Analytics.Defender.Easm.DataConnectionPayload dataConnectionPayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ValidateDataConnection(Azure.Analytics.Defender.Easm.DataConnectionPayload body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response ValidateDataConnection(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> ValidateDataConnectionAsync(Azure.Analytics.Defender.Easm.DataConnectionPayload dataConnectionPayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ValidateDataConnectionAsync(Azure.Analytics.Defender.Easm.DataConnectionPayload body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task ValidateDataConnectionAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response ValidateDiscoveryGroup(Azure.Analytics.Defender.Easm.DiscoveryGroupPayload discoveryGroupPayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ValidateDiscoveryGroup(Azure.Analytics.Defender.Easm.DiscoveryGroupPayload body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response ValidateDiscoveryGroup(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> ValidateDiscoveryGroupAsync(Azure.Analytics.Defender.Easm.DiscoveryGroupPayload discoveryGroupPayload, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ValidateDiscoveryGroupAsync(Azure.Analytics.Defender.Easm.DiscoveryGroupPayload body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task ValidateDiscoveryGroupAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } } public partial class EasmClientOptions : Azure.Core.ClientOptions diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/Docs/EasmClient.xml b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/Docs/EasmClient.xml index 0852b588dd9ef..d9a2e7040be41 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/Docs/EasmClient.xml +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/Docs/EasmClient.xml @@ -9,8 +9,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -AssetUpdatePayload assetUpdatePayload = new AssetUpdatePayload(); -Response response = await client.UpdateAssetsAsync("", assetUpdatePayload); +AssetUpdatePayload body = new AssetUpdatePayload(); +Response response = await client.UpdateAssetsAsync("", body); ]]> This sample shows how to call UpdateAssetsAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -AssetUpdatePayload assetUpdatePayload = new AssetUpdatePayload +AssetUpdatePayload body = new AssetUpdatePayload { State = AssetUpdateState.Candidate, ExternalId = "", @@ -28,7 +28,7 @@ AssetUpdatePayload assetUpdatePayload = new AssetUpdatePayload }, Transfers = AssetUpdateTransfers.As, }; -Response response = await client.UpdateAssetsAsync("", assetUpdatePayload); +Response response = await client.UpdateAssetsAsync("", body); ]]> @@ -39,8 +39,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -AssetUpdatePayload assetUpdatePayload = new AssetUpdatePayload(); -Response response = client.UpdateAssets("", assetUpdatePayload); +AssetUpdatePayload body = new AssetUpdatePayload(); +Response response = client.UpdateAssets("", body); ]]> This sample shows how to call UpdateAssets with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -AssetUpdatePayload assetUpdatePayload = new AssetUpdatePayload +AssetUpdatePayload body = new AssetUpdatePayload { State = AssetUpdateState.Candidate, ExternalId = "", @@ -58,7 +58,7 @@ AssetUpdatePayload assetUpdatePayload = new AssetUpdatePayload }, Transfers = AssetUpdateTransfers.As, }; -Response response = client.UpdateAssets("", assetUpdatePayload); +Response response = client.UpdateAssets("", body); ]]> @@ -279,8 +279,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); -Response response = await client.ValidateDataConnectionAsync(dataConnectionPayload); +DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); +Response response = await client.ValidateDataConnectionAsync(body); ]]> This sample shows how to call ValidateDataConnectionAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties +DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties { ApiKey = "", WorkspaceId = "", @@ -299,7 +299,7 @@ DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayl Frequency = DataConnectionFrequency.Daily, FrequencyOffset = 1234, }; -Response response = await client.ValidateDataConnectionAsync(dataConnectionPayload); +Response response = await client.ValidateDataConnectionAsync(body); ]]> @@ -310,8 +310,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); -Response response = client.ValidateDataConnection(dataConnectionPayload); +DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); +Response response = client.ValidateDataConnection(body); ]]> This sample shows how to call ValidateDataConnection with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties +DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties { ApiKey = "", WorkspaceId = "", @@ -330,7 +330,7 @@ DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayl Frequency = DataConnectionFrequency.Daily, FrequencyOffset = 1234, }; -Response response = client.ValidateDataConnection(dataConnectionPayload); +Response response = client.ValidateDataConnection(body); ]]> @@ -547,8 +547,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); -Response response = await client.CreateOrReplaceDataConnectionAsync("", dataConnectionPayload); +DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); +Response response = await client.CreateOrReplaceDataConnectionAsync("", body); ]]> This sample shows how to call CreateOrReplaceDataConnectionAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties +DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties { ApiKey = "", WorkspaceId = "", @@ -567,7 +567,7 @@ DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayl Frequency = DataConnectionFrequency.Daily, FrequencyOffset = 1234, }; -Response response = await client.CreateOrReplaceDataConnectionAsync("", dataConnectionPayload); +Response response = await client.CreateOrReplaceDataConnectionAsync("", body); ]]> @@ -578,8 +578,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); -Response response = client.CreateOrReplaceDataConnection("", dataConnectionPayload); +DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); +Response response = client.CreateOrReplaceDataConnection("", body); ]]> This sample shows how to call CreateOrReplaceDataConnection with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties +DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties { ApiKey = "", WorkspaceId = "", @@ -598,7 +598,7 @@ DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayl Frequency = DataConnectionFrequency.Daily, FrequencyOffset = 1234, }; -Response response = client.CreateOrReplaceDataConnection("", dataConnectionPayload); +Response response = client.CreateOrReplaceDataConnection("", body); ]]> @@ -765,8 +765,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload(); -Response response = await client.ValidateDiscoveryGroupAsync(discoveryGroupPayload); +DiscoveryGroupPayload body = new DiscoveryGroupPayload(); +Response response = await client.ValidateDiscoveryGroupAsync(body); ]]> This sample shows how to call ValidateDiscoveryGroupAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload +DiscoveryGroupPayload body = new DiscoveryGroupPayload { Name = "", Description = "", @@ -789,7 +789,7 @@ DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload Excludes = { default }, TemplateId = "", }; -Response response = await client.ValidateDiscoveryGroupAsync(discoveryGroupPayload); +Response response = await client.ValidateDiscoveryGroupAsync(body); ]]> @@ -800,8 +800,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload(); -Response response = client.ValidateDiscoveryGroup(discoveryGroupPayload); +DiscoveryGroupPayload body = new DiscoveryGroupPayload(); +Response response = client.ValidateDiscoveryGroup(body); ]]> This sample shows how to call ValidateDiscoveryGroup with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload +DiscoveryGroupPayload body = new DiscoveryGroupPayload { Name = "", Description = "", @@ -824,7 +824,7 @@ DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload Excludes = { default }, TemplateId = "", }; -Response response = client.ValidateDiscoveryGroup(discoveryGroupPayload); +Response response = client.ValidateDiscoveryGroup(body); ]]> @@ -1077,8 +1077,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload(); -Response response = await client.CreateOrReplaceDiscoveryGroupAsync("", discoveryGroupPayload); +DiscoveryGroupPayload body = new DiscoveryGroupPayload(); +Response response = await client.CreateOrReplaceDiscoveryGroupAsync("", body); ]]> This sample shows how to call CreateOrReplaceDiscoveryGroupAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload +DiscoveryGroupPayload body = new DiscoveryGroupPayload { Name = "", Description = "", @@ -1101,7 +1101,7 @@ DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload Excludes = { default }, TemplateId = "", }; -Response response = await client.CreateOrReplaceDiscoveryGroupAsync("", discoveryGroupPayload); +Response response = await client.CreateOrReplaceDiscoveryGroupAsync("", body); ]]> @@ -1112,8 +1112,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload(); -Response response = client.CreateOrReplaceDiscoveryGroup("", discoveryGroupPayload); +DiscoveryGroupPayload body = new DiscoveryGroupPayload(); +Response response = client.CreateOrReplaceDiscoveryGroup("", body); ]]> This sample shows how to call CreateOrReplaceDiscoveryGroup with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload +DiscoveryGroupPayload body = new DiscoveryGroupPayload { Name = "", Description = "", @@ -1136,7 +1136,7 @@ DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload Excludes = { default }, TemplateId = "", }; -Response response = client.CreateOrReplaceDiscoveryGroup("", discoveryGroupPayload); +Response response = client.CreateOrReplaceDiscoveryGroup("", body); ]]> @@ -1541,8 +1541,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -ReportAssetSnapshotPayload reportAssetSnapshotPayload = new ReportAssetSnapshotPayload(); -Response response = await client.GetSnapshotAsync(reportAssetSnapshotPayload); +ReportAssetSnapshotPayload body = new ReportAssetSnapshotPayload(); +Response response = await client.GetSnapshotAsync(body); ]]> This sample shows how to call GetSnapshotAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -ReportAssetSnapshotPayload reportAssetSnapshotPayload = new ReportAssetSnapshotPayload +ReportAssetSnapshotPayload body = new ReportAssetSnapshotPayload { Metric = "", LabelName = "", Size = 1234, Page = 1234, }; -Response response = await client.GetSnapshotAsync(reportAssetSnapshotPayload); +Response response = await client.GetSnapshotAsync(body); ]]> @@ -1568,8 +1568,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -ReportAssetSnapshotPayload reportAssetSnapshotPayload = new ReportAssetSnapshotPayload(); -Response response = client.GetSnapshot(reportAssetSnapshotPayload); +ReportAssetSnapshotPayload body = new ReportAssetSnapshotPayload(); +Response response = client.GetSnapshot(body); ]]> This sample shows how to call GetSnapshot with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -ReportAssetSnapshotPayload reportAssetSnapshotPayload = new ReportAssetSnapshotPayload +ReportAssetSnapshotPayload body = new ReportAssetSnapshotPayload { Metric = "", LabelName = "", Size = 1234, Page = 1234, }; -Response response = client.GetSnapshot(reportAssetSnapshotPayload); +Response response = client.GetSnapshot(body); ]]> @@ -1711,8 +1711,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -ReportAssetSummaryPayload reportAssetSummaryPayload = new ReportAssetSummaryPayload(); -Response response = await client.GetSummaryAsync(reportAssetSummaryPayload); +ReportAssetSummaryPayload body = new ReportAssetSummaryPayload(); +Response response = await client.GetSummaryAsync(body); ]]> This sample shows how to call GetSummaryAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -ReportAssetSummaryPayload reportAssetSummaryPayload = new ReportAssetSummaryPayload +ReportAssetSummaryPayload body = new ReportAssetSummaryPayload { MetricCategories = { "" }, Metrics = { "" }, @@ -1729,7 +1729,7 @@ ReportAssetSummaryPayload reportAssetSummaryPayload = new ReportAssetSummaryPayl SegmentBy = "", LabelName = "", }; -Response response = await client.GetSummaryAsync(reportAssetSummaryPayload); +Response response = await client.GetSummaryAsync(body); ]]> @@ -1740,8 +1740,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -ReportAssetSummaryPayload reportAssetSummaryPayload = new ReportAssetSummaryPayload(); -Response response = client.GetSummary(reportAssetSummaryPayload); +ReportAssetSummaryPayload body = new ReportAssetSummaryPayload(); +Response response = client.GetSummary(body); ]]> This sample shows how to call GetSummary with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -ReportAssetSummaryPayload reportAssetSummaryPayload = new ReportAssetSummaryPayload +ReportAssetSummaryPayload body = new ReportAssetSummaryPayload { MetricCategories = { "" }, Metrics = { "" }, @@ -1758,7 +1758,7 @@ ReportAssetSummaryPayload reportAssetSummaryPayload = new ReportAssetSummaryPayl SegmentBy = "", LabelName = "", }; -Response response = client.GetSummary(reportAssetSummaryPayload); +Response response = client.GetSummary(body); ]]> @@ -1969,8 +1969,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -SavedFilterPayload savedFilterPayload = new SavedFilterPayload("", ""); -Response response = await client.CreateOrReplaceSavedFilterAsync("", savedFilterPayload); +SavedFilterPayload body = new SavedFilterPayload("", ""); +Response response = await client.CreateOrReplaceSavedFilterAsync("", body); ]]> This sample shows how to call CreateOrReplaceSavedFilterAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -SavedFilterPayload savedFilterPayload = new SavedFilterPayload("", ""); -Response response = await client.CreateOrReplaceSavedFilterAsync("", savedFilterPayload); +SavedFilterPayload body = new SavedFilterPayload("", ""); +Response response = await client.CreateOrReplaceSavedFilterAsync("", body); ]]> @@ -1990,8 +1990,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -SavedFilterPayload savedFilterPayload = new SavedFilterPayload("", ""); -Response response = client.CreateOrReplaceSavedFilter("", savedFilterPayload); +SavedFilterPayload body = new SavedFilterPayload("", ""); +Response response = client.CreateOrReplaceSavedFilter("", body); ]]> This sample shows how to call CreateOrReplaceSavedFilter with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); -SavedFilterPayload savedFilterPayload = new SavedFilterPayload("", ""); -Response response = client.CreateOrReplaceSavedFilter("", savedFilterPayload); +SavedFilterPayload body = new SavedFilterPayload("", ""); +Response response = client.CreateOrReplaceSavedFilter("", body); ]]> diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/EasmClient.cs b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/EasmClient.cs index 44df688206fea..3a076e236d9cc 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/EasmClient.cs +++ b/sdk/easm/Azure.Analytics.Defender.Easm/src/Generated/EasmClient.cs @@ -63,16 +63,16 @@ public EasmClient(Uri endpoint, TokenCredential credential, EasmClientOptions op /// Update labels on assets matching the provided filter. /// An expression on the resource type that selects the resources to be returned. - /// A request body used to update an asset. + /// Body parameter. /// The cancellation token to use. - /// or is null. + /// or is null. /// - public virtual async Task> UpdateAssetsAsync(string filter, AssetUpdatePayload assetUpdatePayload, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAssetsAsync(string filter, AssetUpdatePayload body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(filter, nameof(filter)); - Argument.AssertNotNull(assetUpdatePayload, nameof(assetUpdatePayload)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = assetUpdatePayload.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await UpdateAssetsAsync(filter, content, context).ConfigureAwait(false); return Response.FromValue(TaskResource.FromResponse(response), response); @@ -80,16 +80,16 @@ public virtual async Task> UpdateAssetsAsync(string filte /// Update labels on assets matching the provided filter. /// An expression on the resource type that selects the resources to be returned. - /// A request body used to update an asset. + /// Body parameter. /// The cancellation token to use. - /// or is null. + /// or is null. /// - public virtual Response UpdateAssets(string filter, AssetUpdatePayload assetUpdatePayload, CancellationToken cancellationToken = default) + public virtual Response UpdateAssets(string filter, AssetUpdatePayload body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(filter, nameof(filter)); - Argument.AssertNotNull(assetUpdatePayload, nameof(assetUpdatePayload)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = assetUpdatePayload.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = UpdateAssets(filter, content, context); return Response.FromValue(TaskResource.FromResponse(response), response); @@ -288,30 +288,30 @@ public virtual Response GetAssetResource(string assetId, RequestContext context) } /// Validate a data connection with a given dataConnectionName. - /// The to use. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual async Task> ValidateDataConnectionAsync(DataConnectionPayload dataConnectionPayload, CancellationToken cancellationToken = default) + public virtual async Task> ValidateDataConnectionAsync(DataConnectionPayload body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(dataConnectionPayload, nameof(dataConnectionPayload)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = dataConnectionPayload.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await ValidateDataConnectionAsync(content, context).ConfigureAwait(false); return Response.FromValue(ValidateResult.FromResponse(response), response); } /// Validate a data connection with a given dataConnectionName. - /// The to use. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual Response ValidateDataConnection(DataConnectionPayload dataConnectionPayload, CancellationToken cancellationToken = default) + public virtual Response ValidateDataConnection(DataConnectionPayload body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(dataConnectionPayload, nameof(dataConnectionPayload)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = dataConnectionPayload.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = ValidateDataConnection(content, context); return Response.FromValue(ValidateResult.FromResponse(response), response); @@ -507,17 +507,17 @@ public virtual Response GetDataConnection(string dataConnectionName, RequestCont /// Create or replace a data connection with a given dataConnectionName. /// The caller provided unique name for the resource. - /// The to use. + /// Body parameter. /// The cancellation token to use. - /// or is null. + /// or is null. /// is an empty string, and was expected to be non-empty. /// - public virtual async Task> CreateOrReplaceDataConnectionAsync(string dataConnectionName, DataConnectionPayload dataConnectionPayload, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrReplaceDataConnectionAsync(string dataConnectionName, DataConnectionPayload body, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(dataConnectionName, nameof(dataConnectionName)); - Argument.AssertNotNull(dataConnectionPayload, nameof(dataConnectionPayload)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = dataConnectionPayload.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await CreateOrReplaceDataConnectionAsync(dataConnectionName, content, context).ConfigureAwait(false); return Response.FromValue(DataConnection.FromResponse(response), response); @@ -525,17 +525,17 @@ public virtual async Task> CreateOrReplaceDataConnectio /// Create or replace a data connection with a given dataConnectionName. /// The caller provided unique name for the resource. - /// The to use. + /// Body parameter. /// The cancellation token to use. - /// or is null. + /// or is null. /// is an empty string, and was expected to be non-empty. /// - public virtual Response CreateOrReplaceDataConnection(string dataConnectionName, DataConnectionPayload dataConnectionPayload, CancellationToken cancellationToken = default) + public virtual Response CreateOrReplaceDataConnection(string dataConnectionName, DataConnectionPayload body, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(dataConnectionName, nameof(dataConnectionName)); - Argument.AssertNotNull(dataConnectionPayload, nameof(dataConnectionPayload)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = dataConnectionPayload.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = CreateOrReplaceDataConnection(dataConnectionName, content, context); return Response.FromValue(DataConnection.FromResponse(response), response); @@ -698,30 +698,30 @@ public virtual Response DeleteDataConnection(string dataConnectionName, RequestC } /// Validate a discovery group with a given groupName. - /// A request body used to create a discovery group. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual async Task> ValidateDiscoveryGroupAsync(DiscoveryGroupPayload discoveryGroupPayload, CancellationToken cancellationToken = default) + public virtual async Task> ValidateDiscoveryGroupAsync(DiscoveryGroupPayload body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(discoveryGroupPayload, nameof(discoveryGroupPayload)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = discoveryGroupPayload.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await ValidateDiscoveryGroupAsync(content, context).ConfigureAwait(false); return Response.FromValue(ValidateResult.FromResponse(response), response); } /// Validate a discovery group with a given groupName. - /// A request body used to create a discovery group. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual Response ValidateDiscoveryGroup(DiscoveryGroupPayload discoveryGroupPayload, CancellationToken cancellationToken = default) + public virtual Response ValidateDiscoveryGroup(DiscoveryGroupPayload body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(discoveryGroupPayload, nameof(discoveryGroupPayload)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = discoveryGroupPayload.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = ValidateDiscoveryGroup(content, context); return Response.FromValue(ValidateResult.FromResponse(response), response); @@ -917,17 +917,17 @@ public virtual Response GetDiscoveryGroup(string groupName, RequestContext conte /// Create a discovery group with a given groupName. /// The caller provided unique name for the resource. - /// A request body used to create a discovery group. + /// Body parameter. /// The cancellation token to use. - /// or is null. + /// or is null. /// is an empty string, and was expected to be non-empty. /// - public virtual async Task> CreateOrReplaceDiscoveryGroupAsync(string groupName, DiscoveryGroupPayload discoveryGroupPayload, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrReplaceDiscoveryGroupAsync(string groupName, DiscoveryGroupPayload body, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - Argument.AssertNotNull(discoveryGroupPayload, nameof(discoveryGroupPayload)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = discoveryGroupPayload.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await CreateOrReplaceDiscoveryGroupAsync(groupName, content, context).ConfigureAwait(false); return Response.FromValue(DiscoveryGroup.FromResponse(response), response); @@ -935,17 +935,17 @@ public virtual async Task> CreateOrReplaceDiscoveryGrou /// Create a discovery group with a given groupName. /// The caller provided unique name for the resource. - /// A request body used to create a discovery group. + /// Body parameter. /// The cancellation token to use. - /// or is null. + /// or is null. /// is an empty string, and was expected to be non-empty. /// - public virtual Response CreateOrReplaceDiscoveryGroup(string groupName, DiscoveryGroupPayload discoveryGroupPayload, CancellationToken cancellationToken = default) + public virtual Response CreateOrReplaceDiscoveryGroup(string groupName, DiscoveryGroupPayload body, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); - Argument.AssertNotNull(discoveryGroupPayload, nameof(discoveryGroupPayload)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = discoveryGroupPayload.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = CreateOrReplaceDiscoveryGroup(groupName, content, context); return Response.FromValue(DiscoveryGroup.FromResponse(response), response); @@ -1308,30 +1308,30 @@ public virtual Response GetBillable(RequestContext context) } /// Get the most recent snapshot of asset summary values for the snapshot request. - /// A request body used to retrieve an asset report snapshot. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual async Task> GetSnapshotAsync(ReportAssetSnapshotPayload reportAssetSnapshotPayload, CancellationToken cancellationToken = default) + public virtual async Task> GetSnapshotAsync(ReportAssetSnapshotPayload body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(reportAssetSnapshotPayload, nameof(reportAssetSnapshotPayload)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = reportAssetSnapshotPayload.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await GetSnapshotAsync(content, context).ConfigureAwait(false); return Response.FromValue(ReportAssetSnapshotResult.FromResponse(response), response); } /// Get the most recent snapshot of asset summary values for the snapshot request. - /// A request body used to retrieve an asset report snapshot. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual Response GetSnapshot(ReportAssetSnapshotPayload reportAssetSnapshotPayload, CancellationToken cancellationToken = default) + public virtual Response GetSnapshot(ReportAssetSnapshotPayload body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(reportAssetSnapshotPayload, nameof(reportAssetSnapshotPayload)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = reportAssetSnapshotPayload.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = GetSnapshot(content, context); return Response.FromValue(ReportAssetSnapshotResult.FromResponse(response), response); @@ -1416,30 +1416,30 @@ public virtual Response GetSnapshot(RequestContent content, RequestContext conte } /// Get asset summary details for the summary request. - /// A request body used to retrieve summary asset information. One and only one collection of summary identifiers must be provided: filters, metrics, or metricCategories. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual async Task> GetSummaryAsync(ReportAssetSummaryPayload reportAssetSummaryPayload, CancellationToken cancellationToken = default) + public virtual async Task> GetSummaryAsync(ReportAssetSummaryPayload body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(reportAssetSummaryPayload, nameof(reportAssetSummaryPayload)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = reportAssetSummaryPayload.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await GetSummaryAsync(content, context).ConfigureAwait(false); return Response.FromValue(ReportAssetSummaryResult.FromResponse(response), response); } /// Get asset summary details for the summary request. - /// A request body used to retrieve summary asset information. One and only one collection of summary identifiers must be provided: filters, metrics, or metricCategories. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual Response GetSummary(ReportAssetSummaryPayload reportAssetSummaryPayload, CancellationToken cancellationToken = default) + public virtual Response GetSummary(ReportAssetSummaryPayload body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(reportAssetSummaryPayload, nameof(reportAssetSummaryPayload)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = reportAssetSummaryPayload.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = GetSummary(content, context); return Response.FromValue(ReportAssetSummaryResult.FromResponse(response), response); @@ -1635,17 +1635,17 @@ public virtual Response GetSavedFilter(string filterName, RequestContext context /// Create or replace a saved filter with a given filterName. /// The caller provided unique name for the resource. - /// A request body used to create a saved filter. + /// Body parameter. /// The cancellation token to use. - /// or is null. + /// or is null. /// is an empty string, and was expected to be non-empty. /// - public virtual async Task> CreateOrReplaceSavedFilterAsync(string filterName, SavedFilterPayload savedFilterPayload, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrReplaceSavedFilterAsync(string filterName, SavedFilterPayload body, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(filterName, nameof(filterName)); - Argument.AssertNotNull(savedFilterPayload, nameof(savedFilterPayload)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = savedFilterPayload.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await CreateOrReplaceSavedFilterAsync(filterName, content, context).ConfigureAwait(false); return Response.FromValue(SavedFilter.FromResponse(response), response); @@ -1653,17 +1653,17 @@ public virtual async Task> CreateOrReplaceSavedFilterAsync /// Create or replace a saved filter with a given filterName. /// The caller provided unique name for the resource. - /// A request body used to create a saved filter. + /// Body parameter. /// The cancellation token to use. - /// or is null. + /// or is null. /// is an empty string, and was expected to be non-empty. /// - public virtual Response CreateOrReplaceSavedFilter(string filterName, SavedFilterPayload savedFilterPayload, CancellationToken cancellationToken = default) + public virtual Response CreateOrReplaceSavedFilter(string filterName, SavedFilterPayload body, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(filterName, nameof(filterName)); - Argument.AssertNotNull(savedFilterPayload, nameof(savedFilterPayload)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = savedFilterPayload.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = CreateOrReplaceSavedFilter(filterName, content, context); return Response.FromValue(SavedFilter.FromResponse(response), response); diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/tests/Generated/Samples/Samples_EasmClient.cs b/sdk/easm/Azure.Analytics.Defender.Easm/tests/Generated/Samples/Samples_EasmClient.cs index 2bac73e1e7030..be6ad717bd457 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/tests/Generated/Samples/Samples_EasmClient.cs +++ b/sdk/easm/Azure.Analytics.Defender.Easm/tests/Generated/Samples/Samples_EasmClient.cs @@ -54,8 +54,8 @@ public void Example_AssetResource_UpdateAssets_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - AssetUpdatePayload assetUpdatePayload = new AssetUpdatePayload(); - Response response = client.UpdateAssets("", assetUpdatePayload); + AssetUpdatePayload body = new AssetUpdatePayload(); + Response response = client.UpdateAssets("", body); } [Test] @@ -66,8 +66,8 @@ public async Task Example_AssetResource_UpdateAssets_ShortVersion_Convenience_As TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - AssetUpdatePayload assetUpdatePayload = new AssetUpdatePayload(); - Response response = await client.UpdateAssetsAsync("", assetUpdatePayload); + AssetUpdatePayload body = new AssetUpdatePayload(); + Response response = await client.UpdateAssetsAsync("", body); } [Test] @@ -140,7 +140,7 @@ public void Example_AssetResource_UpdateAssets_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - AssetUpdatePayload assetUpdatePayload = new AssetUpdatePayload + AssetUpdatePayload body = new AssetUpdatePayload { State = AssetUpdateState.Candidate, ExternalId = "", @@ -150,7 +150,7 @@ public void Example_AssetResource_UpdateAssets_AllParameters_Convenience() }, Transfers = AssetUpdateTransfers.As, }; - Response response = client.UpdateAssets("", assetUpdatePayload); + Response response = client.UpdateAssets("", body); } [Test] @@ -161,7 +161,7 @@ public async Task Example_AssetResource_UpdateAssets_AllParameters_Convenience_A TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - AssetUpdatePayload assetUpdatePayload = new AssetUpdatePayload + AssetUpdatePayload body = new AssetUpdatePayload { State = AssetUpdateState.Candidate, ExternalId = "", @@ -171,7 +171,7 @@ public async Task Example_AssetResource_UpdateAssets_AllParameters_Convenience_A }, Transfers = AssetUpdateTransfers.As, }; - Response response = await client.UpdateAssetsAsync("", assetUpdatePayload); + Response response = await client.UpdateAssetsAsync("", body); } [Test] @@ -356,8 +356,8 @@ public void Example_EasmClient_ValidateDataConnection_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); - Response response = client.ValidateDataConnection(dataConnectionPayload); + DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); + Response response = client.ValidateDataConnection(body); } [Test] @@ -368,8 +368,8 @@ public async Task Example_EasmClient_ValidateDataConnection_ShortVersion_Conveni TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); - Response response = await client.ValidateDataConnectionAsync(dataConnectionPayload); + DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); + Response response = await client.ValidateDataConnectionAsync(body); } [Test] @@ -442,7 +442,7 @@ public void Example_EasmClient_ValidateDataConnection_AllParameters_Convenience( TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties + DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties { ApiKey = "", WorkspaceId = "", @@ -453,7 +453,7 @@ public void Example_EasmClient_ValidateDataConnection_AllParameters_Convenience( Frequency = DataConnectionFrequency.Daily, FrequencyOffset = 1234, }; - Response response = client.ValidateDataConnection(dataConnectionPayload); + Response response = client.ValidateDataConnection(body); } [Test] @@ -464,7 +464,7 @@ public async Task Example_EasmClient_ValidateDataConnection_AllParameters_Conven TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties + DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties { ApiKey = "", WorkspaceId = "", @@ -475,7 +475,7 @@ public async Task Example_EasmClient_ValidateDataConnection_AllParameters_Conven Frequency = DataConnectionFrequency.Daily, FrequencyOffset = 1234, }; - Response response = await client.ValidateDataConnectionAsync(dataConnectionPayload); + Response response = await client.ValidateDataConnectionAsync(body); } [Test] @@ -650,8 +650,8 @@ public void Example_DataConnection_CreateOrReplaceDataConnection_ShortVersion_Co TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); - Response response = client.CreateOrReplaceDataConnection("", dataConnectionPayload); + DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); + Response response = client.CreateOrReplaceDataConnection("", body); } [Test] @@ -662,8 +662,8 @@ public async Task Example_DataConnection_CreateOrReplaceDataConnection_ShortVers TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); - Response response = await client.CreateOrReplaceDataConnectionAsync("", dataConnectionPayload); + DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties()); + Response response = await client.CreateOrReplaceDataConnectionAsync("", body); } [Test] @@ -750,7 +750,7 @@ public void Example_DataConnection_CreateOrReplaceDataConnection_AllParameters_C TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties + DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties { ApiKey = "", WorkspaceId = "", @@ -761,7 +761,7 @@ public void Example_DataConnection_CreateOrReplaceDataConnection_AllParameters_C Frequency = DataConnectionFrequency.Daily, FrequencyOffset = 1234, }; - Response response = client.CreateOrReplaceDataConnection("", dataConnectionPayload); + Response response = client.CreateOrReplaceDataConnection("", body); } [Test] @@ -772,7 +772,7 @@ public async Task Example_DataConnection_CreateOrReplaceDataConnection_AllParame TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DataConnectionPayload dataConnectionPayload = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties + DataConnectionPayload body = new LogAnalyticsDataConnectionPayload(new LogAnalyticsDataConnectionProperties { ApiKey = "", WorkspaceId = "", @@ -783,7 +783,7 @@ public async Task Example_DataConnection_CreateOrReplaceDataConnection_AllParame Frequency = DataConnectionFrequency.Daily, FrequencyOffset = 1234, }; - Response response = await client.CreateOrReplaceDataConnectionAsync("", dataConnectionPayload); + Response response = await client.CreateOrReplaceDataConnectionAsync("", body); } [Test] @@ -876,8 +876,8 @@ public void Example_EasmClient_ValidateDiscoveryGroup_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload(); - Response response = client.ValidateDiscoveryGroup(discoveryGroupPayload); + DiscoveryGroupPayload body = new DiscoveryGroupPayload(); + Response response = client.ValidateDiscoveryGroup(body); } [Test] @@ -888,8 +888,8 @@ public async Task Example_EasmClient_ValidateDiscoveryGroup_ShortVersion_Conveni TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload(); - Response response = await client.ValidateDiscoveryGroupAsync(discoveryGroupPayload); + DiscoveryGroupPayload body = new DiscoveryGroupPayload(); + Response response = await client.ValidateDiscoveryGroupAsync(body); } [Test] @@ -984,7 +984,7 @@ public void Example_EasmClient_ValidateDiscoveryGroup_AllParameters_Convenience( TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload + DiscoveryGroupPayload body = new DiscoveryGroupPayload { Name = "", Description = "", @@ -999,7 +999,7 @@ public void Example_EasmClient_ValidateDiscoveryGroup_AllParameters_Convenience( Excludes = { default }, TemplateId = "", }; - Response response = client.ValidateDiscoveryGroup(discoveryGroupPayload); + Response response = client.ValidateDiscoveryGroup(body); } [Test] @@ -1010,7 +1010,7 @@ public async Task Example_EasmClient_ValidateDiscoveryGroup_AllParameters_Conven TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload + DiscoveryGroupPayload body = new DiscoveryGroupPayload { Name = "", Description = "", @@ -1025,7 +1025,7 @@ public async Task Example_EasmClient_ValidateDiscoveryGroup_AllParameters_Conven Excludes = { default }, TemplateId = "", }; - Response response = await client.ValidateDiscoveryGroupAsync(discoveryGroupPayload); + Response response = await client.ValidateDiscoveryGroupAsync(body); } [Test] @@ -1212,8 +1212,8 @@ public void Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_ShortVersion_Conven TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload(); - Response response = client.CreateOrReplaceDiscoveryGroup("", discoveryGroupPayload); + DiscoveryGroupPayload body = new DiscoveryGroupPayload(); + Response response = client.CreateOrReplaceDiscoveryGroup("", body); } [Test] @@ -1224,8 +1224,8 @@ public async Task Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_ShortVersion_ TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload(); - Response response = await client.CreateOrReplaceDiscoveryGroupAsync("", discoveryGroupPayload); + DiscoveryGroupPayload body = new DiscoveryGroupPayload(); + Response response = await client.CreateOrReplaceDiscoveryGroupAsync("", body); } [Test] @@ -1358,7 +1358,7 @@ public void Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_AllParameters_Conve TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload + DiscoveryGroupPayload body = new DiscoveryGroupPayload { Name = "", Description = "", @@ -1373,7 +1373,7 @@ public void Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_AllParameters_Conve Excludes = { default }, TemplateId = "", }; - Response response = client.CreateOrReplaceDiscoveryGroup("", discoveryGroupPayload); + Response response = client.CreateOrReplaceDiscoveryGroup("", body); } [Test] @@ -1384,7 +1384,7 @@ public async Task Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_AllParameters TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - DiscoveryGroupPayload discoveryGroupPayload = new DiscoveryGroupPayload + DiscoveryGroupPayload body = new DiscoveryGroupPayload { Name = "", Description = "", @@ -1399,7 +1399,7 @@ public async Task Example_DiscoGroup_CreateOrReplaceDiscoveryGroup_AllParameters Excludes = { default }, TemplateId = "", }; - Response response = await client.CreateOrReplaceDiscoveryGroupAsync("", discoveryGroupPayload); + Response response = await client.CreateOrReplaceDiscoveryGroupAsync("", body); } [Test] @@ -1718,8 +1718,8 @@ public void Example_EasmClient_GetSnapshot_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - ReportAssetSnapshotPayload reportAssetSnapshotPayload = new ReportAssetSnapshotPayload(); - Response response = client.GetSnapshot(reportAssetSnapshotPayload); + ReportAssetSnapshotPayload body = new ReportAssetSnapshotPayload(); + Response response = client.GetSnapshot(body); } [Test] @@ -1730,8 +1730,8 @@ public async Task Example_EasmClient_GetSnapshot_ShortVersion_Convenience_Async( TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - ReportAssetSnapshotPayload reportAssetSnapshotPayload = new ReportAssetSnapshotPayload(); - Response response = await client.GetSnapshotAsync(reportAssetSnapshotPayload); + ReportAssetSnapshotPayload body = new ReportAssetSnapshotPayload(); + Response response = await client.GetSnapshotAsync(body); } [Test] @@ -1834,14 +1834,14 @@ public void Example_EasmClient_GetSnapshot_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - ReportAssetSnapshotPayload reportAssetSnapshotPayload = new ReportAssetSnapshotPayload + ReportAssetSnapshotPayload body = new ReportAssetSnapshotPayload { Metric = "", LabelName = "", Size = 1234, Page = 1234, }; - Response response = client.GetSnapshot(reportAssetSnapshotPayload); + Response response = client.GetSnapshot(body); } [Test] @@ -1852,14 +1852,14 @@ public async Task Example_EasmClient_GetSnapshot_AllParameters_Convenience_Async TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - ReportAssetSnapshotPayload reportAssetSnapshotPayload = new ReportAssetSnapshotPayload + ReportAssetSnapshotPayload body = new ReportAssetSnapshotPayload { Metric = "", LabelName = "", Size = 1234, Page = 1234, }; - Response response = await client.GetSnapshotAsync(reportAssetSnapshotPayload); + Response response = await client.GetSnapshotAsync(body); } [Test] @@ -1900,8 +1900,8 @@ public void Example_EasmClient_GetSummary_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - ReportAssetSummaryPayload reportAssetSummaryPayload = new ReportAssetSummaryPayload(); - Response response = client.GetSummary(reportAssetSummaryPayload); + ReportAssetSummaryPayload body = new ReportAssetSummaryPayload(); + Response response = client.GetSummary(body); } [Test] @@ -1912,8 +1912,8 @@ public async Task Example_EasmClient_GetSummary_ShortVersion_Convenience_Async() TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - ReportAssetSummaryPayload reportAssetSummaryPayload = new ReportAssetSummaryPayload(); - Response response = await client.GetSummaryAsync(reportAssetSummaryPayload); + ReportAssetSummaryPayload body = new ReportAssetSummaryPayload(); + Response response = await client.GetSummaryAsync(body); } [Test] @@ -2004,7 +2004,7 @@ public void Example_EasmClient_GetSummary_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - ReportAssetSummaryPayload reportAssetSummaryPayload = new ReportAssetSummaryPayload + ReportAssetSummaryPayload body = new ReportAssetSummaryPayload { MetricCategories = { "" }, Metrics = { "" }, @@ -2013,7 +2013,7 @@ public void Example_EasmClient_GetSummary_AllParameters_Convenience() SegmentBy = "", LabelName = "", }; - Response response = client.GetSummary(reportAssetSummaryPayload); + Response response = client.GetSummary(body); } [Test] @@ -2024,7 +2024,7 @@ public async Task Example_EasmClient_GetSummary_AllParameters_Convenience_Async( TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - ReportAssetSummaryPayload reportAssetSummaryPayload = new ReportAssetSummaryPayload + ReportAssetSummaryPayload body = new ReportAssetSummaryPayload { MetricCategories = { "" }, Metrics = { "" }, @@ -2033,7 +2033,7 @@ public async Task Example_EasmClient_GetSummary_AllParameters_Convenience_Async( SegmentBy = "", LabelName = "", }; - Response response = await client.GetSummaryAsync(reportAssetSummaryPayload); + Response response = await client.GetSummaryAsync(body); } [Test] @@ -2190,8 +2190,8 @@ public void Example_SavedFilter_CreateOrReplaceSavedFilter_ShortVersion_Convenie TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - SavedFilterPayload savedFilterPayload = new SavedFilterPayload("", ""); - Response response = client.CreateOrReplaceSavedFilter("", savedFilterPayload); + SavedFilterPayload body = new SavedFilterPayload("", ""); + Response response = client.CreateOrReplaceSavedFilter("", body); } [Test] @@ -2202,8 +2202,8 @@ public async Task Example_SavedFilter_CreateOrReplaceSavedFilter_ShortVersion_Co TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - SavedFilterPayload savedFilterPayload = new SavedFilterPayload("", ""); - Response response = await client.CreateOrReplaceSavedFilterAsync("", savedFilterPayload); + SavedFilterPayload body = new SavedFilterPayload("", ""); + Response response = await client.CreateOrReplaceSavedFilterAsync("", body); } [Test] @@ -2260,8 +2260,8 @@ public void Example_SavedFilter_CreateOrReplaceSavedFilter_AllParameters_Conveni TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - SavedFilterPayload savedFilterPayload = new SavedFilterPayload("", ""); - Response response = client.CreateOrReplaceSavedFilter("", savedFilterPayload); + SavedFilterPayload body = new SavedFilterPayload("", ""); + Response response = client.CreateOrReplaceSavedFilter("", body); } [Test] @@ -2272,8 +2272,8 @@ public async Task Example_SavedFilter_CreateOrReplaceSavedFilter_AllParameters_C TokenCredential credential = new DefaultAzureCredential(); EasmClient client = new EasmClient(endpoint, credential); - SavedFilterPayload savedFilterPayload = new SavedFilterPayload("", ""); - Response response = await client.CreateOrReplaceSavedFilterAsync("", savedFilterPayload); + SavedFilterPayload body = new SavedFilterPayload("", ""); + Response response = await client.CreateOrReplaceSavedFilterAsync("", body); } [Test] diff --git a/sdk/easm/Azure.Analytics.Defender.Easm/tsp-location.yaml b/sdk/easm/Azure.Analytics.Defender.Easm/tsp-location.yaml index 2844a868f8f8f..506ec154280a5 100644 --- a/sdk/easm/Azure.Analytics.Defender.Easm/tsp-location.yaml +++ b/sdk/easm/Azure.Analytics.Defender.Easm/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/riskiq/Easm -commit: 1fe785dc9b49c48088a9d11db023eee07dd168e7 +commit: 823fa0c70ae5dc9d4693f65dde6b5e943e8183b4 repo: Azure/azure-rest-api-specs diff --git a/sdk/face/Azure.AI.Vision.Face/api/Azure.AI.Vision.Face.netstandard2.0.cs b/sdk/face/Azure.AI.Vision.Face/api/Azure.AI.Vision.Face.netstandard2.0.cs new file mode 100644 index 0000000000000..b437cafe7b630 --- /dev/null +++ b/sdk/face/Azure.AI.Vision.Face/api/Azure.AI.Vision.Face.netstandard2.0.cs @@ -0,0 +1,917 @@ +namespace Azure.AI.Vision.Face +{ + public partial class AccessoryItem : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AccessoryItem() { } + public float Confidence { get { throw null; } } + public Azure.AI.Vision.Face.AccessoryType Type { get { throw null; } } + Azure.AI.Vision.Face.AccessoryItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Vision.Face.AccessoryItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AccessoryType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AccessoryType(string value) { throw null; } + public static Azure.AI.Vision.Face.AccessoryType Glasses { get { throw null; } } + public static Azure.AI.Vision.Face.AccessoryType Headwear { get { throw null; } } + public static Azure.AI.Vision.Face.AccessoryType Mask { get { throw null; } } + public bool Equals(Azure.AI.Vision.Face.AccessoryType 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.AI.Vision.Face.AccessoryType left, Azure.AI.Vision.Face.AccessoryType right) { throw null; } + public static implicit operator Azure.AI.Vision.Face.AccessoryType (string value) { throw null; } + public static bool operator !=(Azure.AI.Vision.Face.AccessoryType left, Azure.AI.Vision.Face.AccessoryType right) { throw null; } + public override string ToString() { throw null; } + } + public static partial class AIVisionFaceModelFactory + { + public static Azure.AI.Vision.Face.AccessoryItem AccessoryItem(Azure.AI.Vision.Face.AccessoryType type = default(Azure.AI.Vision.Face.AccessoryType), float confidence = 0f) { throw null; } + public static Azure.AI.Vision.Face.AuditLivenessResponseInfo AuditLivenessResponseInfo(Azure.AI.Vision.Face.LivenessResponseBody body = null, int statusCode = 0, long latencyInMilliseconds = (long)0) { throw null; } + public static Azure.AI.Vision.Face.AuditRequestInfo AuditRequestInfo(string url = null, string method = null, long? contentLength = default(long?), string contentType = null, string userAgent = null) { throw null; } + public static Azure.AI.Vision.Face.BlurProperties BlurProperties(Azure.AI.Vision.Face.BlurLevel blurLevel = default(Azure.AI.Vision.Face.BlurLevel), float value = 0f) { throw null; } + public static Azure.AI.Vision.Face.CreateLivenessSessionContent CreateLivenessSessionContent(Azure.AI.Vision.Face.LivenessOperationMode livenessOperationMode = default(Azure.AI.Vision.Face.LivenessOperationMode), bool? sendResultsToClient = default(bool?), bool? deviceCorrelationIdSetInClient = default(bool?), string deviceCorrelationId = null, int? authTokenTimeToLiveInSeconds = default(int?)) { throw null; } + public static Azure.AI.Vision.Face.CreateLivenessSessionResult CreateLivenessSessionResult(string sessionId = null, string authToken = null) { throw null; } + public static Azure.AI.Vision.Face.CreateLivenessWithVerifySessionResult CreateLivenessWithVerifySessionResult(string sessionId = null, string authToken = null, Azure.AI.Vision.Face.LivenessWithVerifyImage verifyImage = null) { throw null; } + public static Azure.AI.Vision.Face.ExposureProperties ExposureProperties(Azure.AI.Vision.Face.ExposureLevel exposureLevel = default(Azure.AI.Vision.Face.ExposureLevel), float value = 0f) { throw null; } + public static Azure.AI.Vision.Face.FaceAttributes FaceAttributes(float? age = default(float?), float? smile = default(float?), Azure.AI.Vision.Face.FacialHair facialHair = null, Azure.AI.Vision.Face.GlassesType? glasses = default(Azure.AI.Vision.Face.GlassesType?), Azure.AI.Vision.Face.HeadPose headPose = null, Azure.AI.Vision.Face.HairProperties hair = null, Azure.AI.Vision.Face.OcclusionProperties occlusion = null, System.Collections.Generic.IEnumerable accessories = null, Azure.AI.Vision.Face.BlurProperties blur = null, Azure.AI.Vision.Face.ExposureProperties exposure = null, Azure.AI.Vision.Face.NoiseProperties noise = null, Azure.AI.Vision.Face.MaskProperties mask = null, Azure.AI.Vision.Face.QualityForRecognition? qualityForRecognition = default(Azure.AI.Vision.Face.QualityForRecognition?)) { throw null; } + public static Azure.AI.Vision.Face.FaceDetectionResult FaceDetectionResult(System.Guid? faceId = default(System.Guid?), Azure.AI.Vision.Face.FaceRecognitionModel? recognitionModel = default(Azure.AI.Vision.Face.FaceRecognitionModel?), Azure.AI.Vision.Face.FaceRectangle faceRectangle = null, Azure.AI.Vision.Face.FaceLandmarks faceLandmarks = null, Azure.AI.Vision.Face.FaceAttributes faceAttributes = null) { throw null; } + public static Azure.AI.Vision.Face.FaceFindSimilarResult FaceFindSimilarResult(float confidence = 0f, System.Guid? faceId = default(System.Guid?), System.Guid? persistedFaceId = default(System.Guid?)) { throw null; } + public static Azure.AI.Vision.Face.FaceGroupingResult FaceGroupingResult(System.Collections.Generic.IEnumerable> groups = null, System.Collections.Generic.IEnumerable messyGroup = null) { throw null; } + public static Azure.AI.Vision.Face.FaceLandmarks FaceLandmarks(Azure.AI.Vision.Face.LandmarkCoordinate pupilLeft = null, Azure.AI.Vision.Face.LandmarkCoordinate pupilRight = null, Azure.AI.Vision.Face.LandmarkCoordinate noseTip = null, Azure.AI.Vision.Face.LandmarkCoordinate mouthLeft = null, Azure.AI.Vision.Face.LandmarkCoordinate mouthRight = null, Azure.AI.Vision.Face.LandmarkCoordinate eyebrowLeftOuter = null, Azure.AI.Vision.Face.LandmarkCoordinate eyebrowLeftInner = null, Azure.AI.Vision.Face.LandmarkCoordinate eyeLeftOuter = null, Azure.AI.Vision.Face.LandmarkCoordinate eyeLeftTop = null, Azure.AI.Vision.Face.LandmarkCoordinate eyeLeftBottom = null, Azure.AI.Vision.Face.LandmarkCoordinate eyeLeftInner = null, Azure.AI.Vision.Face.LandmarkCoordinate eyebrowRightInner = null, Azure.AI.Vision.Face.LandmarkCoordinate eyebrowRightOuter = null, Azure.AI.Vision.Face.LandmarkCoordinate eyeRightInner = null, Azure.AI.Vision.Face.LandmarkCoordinate eyeRightTop = null, Azure.AI.Vision.Face.LandmarkCoordinate eyeRightBottom = null, Azure.AI.Vision.Face.LandmarkCoordinate eyeRightOuter = null, Azure.AI.Vision.Face.LandmarkCoordinate noseRootLeft = null, Azure.AI.Vision.Face.LandmarkCoordinate noseRootRight = null, Azure.AI.Vision.Face.LandmarkCoordinate noseLeftAlarTop = null, Azure.AI.Vision.Face.LandmarkCoordinate noseRightAlarTop = null, Azure.AI.Vision.Face.LandmarkCoordinate noseLeftAlarOutTip = null, Azure.AI.Vision.Face.LandmarkCoordinate noseRightAlarOutTip = null, Azure.AI.Vision.Face.LandmarkCoordinate upperLipTop = null, Azure.AI.Vision.Face.LandmarkCoordinate upperLipBottom = null, Azure.AI.Vision.Face.LandmarkCoordinate underLipTop = null, Azure.AI.Vision.Face.LandmarkCoordinate underLipBottom = null) { throw null; } + public static Azure.AI.Vision.Face.FaceRectangle FaceRectangle(int top = 0, int left = 0, int width = 0, int height = 0) { throw null; } + public static Azure.AI.Vision.Face.FaceVerificationResult FaceVerificationResult(bool isIdentical = false, float confidence = 0f) { throw null; } + public static Azure.AI.Vision.Face.FacialHair FacialHair(float moustache = 0f, float beard = 0f, float sideburns = 0f) { throw null; } + public static Azure.AI.Vision.Face.HairColor HairColor(Azure.AI.Vision.Face.HairColorType color = default(Azure.AI.Vision.Face.HairColorType), float confidence = 0f) { throw null; } + public static Azure.AI.Vision.Face.HairProperties HairProperties(float bald = 0f, bool invisible = false, System.Collections.Generic.IEnumerable hairColor = null) { throw null; } + public static Azure.AI.Vision.Face.HeadPose HeadPose(float pitch = 0f, float roll = 0f, float yaw = 0f) { throw null; } + public static Azure.AI.Vision.Face.LandmarkCoordinate LandmarkCoordinate(float x = 0f, float y = 0f) { throw null; } + public static Azure.AI.Vision.Face.LivenessOutputsTarget LivenessOutputsTarget(Azure.AI.Vision.Face.FaceRectangle faceRectangle = null, string fileName = null, int timeOffsetWithinFile = 0, Azure.AI.Vision.Face.FaceImageType imageType = default(Azure.AI.Vision.Face.FaceImageType)) { throw null; } + public static Azure.AI.Vision.Face.LivenessResponseBody LivenessResponseBody(Azure.AI.Vision.Face.FaceLivenessDecision? livenessDecision = default(Azure.AI.Vision.Face.FaceLivenessDecision?), Azure.AI.Vision.Face.LivenessOutputsTarget target = null, Azure.AI.Vision.Face.LivenessModel? modelVersionUsed = default(Azure.AI.Vision.Face.LivenessModel?), Azure.AI.Vision.Face.LivenessWithVerifyOutputs verifyResult = null, System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } + public static Azure.AI.Vision.Face.LivenessSession LivenessSession(string id = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset? sessionStartDateTime = default(System.DateTimeOffset?), bool sessionExpired = false, string deviceCorrelationId = null, int? authTokenTimeToLiveInSeconds = default(int?), Azure.AI.Vision.Face.FaceSessionStatus status = default(Azure.AI.Vision.Face.FaceSessionStatus), Azure.AI.Vision.Face.LivenessSessionAuditEntry result = null) { throw null; } + public static Azure.AI.Vision.Face.LivenessSessionAuditEntry LivenessSessionAuditEntry(long id = (long)0, string sessionId = null, string requestId = null, string clientRequestId = null, System.DateTimeOffset receivedDateTime = default(System.DateTimeOffset), Azure.AI.Vision.Face.AuditRequestInfo request = null, Azure.AI.Vision.Face.AuditLivenessResponseInfo response = null, string digest = null) { throw null; } + public static Azure.AI.Vision.Face.LivenessSessionItem LivenessSessionItem(string id = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset? sessionStartDateTime = default(System.DateTimeOffset?), bool sessionExpired = false, string deviceCorrelationId = null, int? authTokenTimeToLiveInSeconds = default(int?)) { throw null; } + public static Azure.AI.Vision.Face.LivenessWithVerifyImage LivenessWithVerifyImage(Azure.AI.Vision.Face.FaceRectangle faceRectangle = null, Azure.AI.Vision.Face.QualityForRecognition qualityForRecognition = default(Azure.AI.Vision.Face.QualityForRecognition)) { throw null; } + public static Azure.AI.Vision.Face.LivenessWithVerifyOutputs LivenessWithVerifyOutputs(Azure.AI.Vision.Face.LivenessWithVerifyImage verifyImage = null, float matchConfidence = 0f, bool isIdentical = false) { throw null; } + public static Azure.AI.Vision.Face.LivenessWithVerifySession LivenessWithVerifySession(string id = null, System.DateTimeOffset createdDateTime = default(System.DateTimeOffset), System.DateTimeOffset? sessionStartDateTime = default(System.DateTimeOffset?), bool sessionExpired = false, string deviceCorrelationId = null, int? authTokenTimeToLiveInSeconds = default(int?), Azure.AI.Vision.Face.FaceSessionStatus status = default(Azure.AI.Vision.Face.FaceSessionStatus), Azure.AI.Vision.Face.LivenessSessionAuditEntry result = null) { throw null; } + public static Azure.AI.Vision.Face.MaskProperties MaskProperties(bool noseAndMouthCovered = false, Azure.AI.Vision.Face.MaskType type = default(Azure.AI.Vision.Face.MaskType)) { throw null; } + public static Azure.AI.Vision.Face.NoiseProperties NoiseProperties(Azure.AI.Vision.Face.NoiseLevel noiseLevel = default(Azure.AI.Vision.Face.NoiseLevel), float value = 0f) { throw null; } + public static Azure.AI.Vision.Face.OcclusionProperties OcclusionProperties(bool foreheadOccluded = false, bool eyeOccluded = false, bool mouthOccluded = false) { throw null; } + } + public partial class AuditLivenessResponseInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AuditLivenessResponseInfo() { } + public Azure.AI.Vision.Face.LivenessResponseBody Body { get { throw null; } } + public long LatencyInMilliseconds { get { throw null; } } + public int StatusCode { get { throw null; } } + Azure.AI.Vision.Face.AuditLivenessResponseInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Vision.Face.AuditLivenessResponseInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AuditRequestInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AuditRequestInfo() { } + public long? ContentLength { get { throw null; } } + public string ContentType { get { throw null; } } + public string Method { get { throw null; } } + public string Url { get { throw null; } } + public string UserAgent { get { throw null; } } + Azure.AI.Vision.Face.AuditRequestInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Vision.Face.AuditRequestInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AzureAIVisionFaceClientOptions : Azure.Core.ClientOptions + { + public AzureAIVisionFaceClientOptions(Azure.AI.Vision.Face.AzureAIVisionFaceClientOptions.ServiceVersion version = Azure.AI.Vision.Face.AzureAIVisionFaceClientOptions.ServiceVersion.V1_1_Preview_1) { } + public enum ServiceVersion + { + V1_1_Preview_1 = 1, + } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BlurLevel : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BlurLevel(string value) { throw null; } + public static Azure.AI.Vision.Face.BlurLevel High { get { throw null; } } + public static Azure.AI.Vision.Face.BlurLevel Low { get { throw null; } } + public static Azure.AI.Vision.Face.BlurLevel Medium { get { throw null; } } + public bool Equals(Azure.AI.Vision.Face.BlurLevel 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.AI.Vision.Face.BlurLevel left, Azure.AI.Vision.Face.BlurLevel right) { throw null; } + public static implicit operator Azure.AI.Vision.Face.BlurLevel (string value) { throw null; } + public static bool operator !=(Azure.AI.Vision.Face.BlurLevel left, Azure.AI.Vision.Face.BlurLevel right) { throw null; } + public override string ToString() { throw null; } + } + public partial class BlurProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal BlurProperties() { } + public Azure.AI.Vision.Face.BlurLevel BlurLevel { get { throw null; } } + public float Value { get { throw null; } } + Azure.AI.Vision.Face.BlurProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Vision.Face.BlurProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CreateLivenessSessionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CreateLivenessSessionContent(Azure.AI.Vision.Face.LivenessOperationMode livenessOperationMode) { } + public int? AuthTokenTimeToLiveInSeconds { get { throw null; } set { } } + public string DeviceCorrelationId { get { throw null; } set { } } + public bool? DeviceCorrelationIdSetInClient { get { throw null; } set { } } + public Azure.AI.Vision.Face.LivenessOperationMode LivenessOperationMode { get { throw null; } } + public bool? SendResultsToClient { get { throw null; } set { } } + Azure.AI.Vision.Face.CreateLivenessSessionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Vision.Face.CreateLivenessSessionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CreateLivenessSessionResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CreateLivenessSessionResult() { } + public string AuthToken { get { throw null; } } + public string SessionId { get { throw null; } } + Azure.AI.Vision.Face.CreateLivenessSessionResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Vision.Face.CreateLivenessSessionResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CreateLivenessWithVerifySessionResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal CreateLivenessWithVerifySessionResult() { } + public string AuthToken { get { throw null; } } + public string SessionId { get { throw null; } } + public Azure.AI.Vision.Face.LivenessWithVerifyImage VerifyImage { get { throw null; } } + Azure.AI.Vision.Face.CreateLivenessWithVerifySessionResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Vision.Face.CreateLivenessWithVerifySessionResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ExposureLevel : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ExposureLevel(string value) { throw null; } + public static Azure.AI.Vision.Face.ExposureLevel GoodExposure { get { throw null; } } + public static Azure.AI.Vision.Face.ExposureLevel OverExposure { get { throw null; } } + public static Azure.AI.Vision.Face.ExposureLevel UnderExposure { get { throw null; } } + public bool Equals(Azure.AI.Vision.Face.ExposureLevel 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.AI.Vision.Face.ExposureLevel left, Azure.AI.Vision.Face.ExposureLevel right) { throw null; } + public static implicit operator Azure.AI.Vision.Face.ExposureLevel (string value) { throw null; } + public static bool operator !=(Azure.AI.Vision.Face.ExposureLevel left, Azure.AI.Vision.Face.ExposureLevel right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ExposureProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ExposureProperties() { } + public Azure.AI.Vision.Face.ExposureLevel ExposureLevel { get { throw null; } } + public float Value { get { throw null; } } + Azure.AI.Vision.Face.ExposureProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Vision.Face.ExposureProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FaceAttributes : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal FaceAttributes() { } + public System.Collections.Generic.IReadOnlyList Accessories { get { throw null; } } + public float? Age { get { throw null; } } + public Azure.AI.Vision.Face.BlurProperties Blur { get { throw null; } } + public Azure.AI.Vision.Face.ExposureProperties Exposure { get { throw null; } } + public Azure.AI.Vision.Face.FacialHair FacialHair { get { throw null; } } + public Azure.AI.Vision.Face.GlassesType? Glasses { get { throw null; } } + public Azure.AI.Vision.Face.HairProperties Hair { get { throw null; } } + public Azure.AI.Vision.Face.HeadPose HeadPose { get { throw null; } } + public Azure.AI.Vision.Face.MaskProperties Mask { get { throw null; } } + public Azure.AI.Vision.Face.NoiseProperties Noise { get { throw null; } } + public Azure.AI.Vision.Face.OcclusionProperties Occlusion { get { throw null; } } + public Azure.AI.Vision.Face.QualityForRecognition? QualityForRecognition { get { throw null; } } + public float? Smile { get { throw null; } } + Azure.AI.Vision.Face.FaceAttributes System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Vision.Face.FaceAttributes System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FaceAttributeType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FaceAttributeType(string value) { throw null; } + public static Azure.AI.Vision.Face.FaceAttributeType Accessories { get { throw null; } } + public static Azure.AI.Vision.Face.FaceAttributeType Age { get { throw null; } } + public static Azure.AI.Vision.Face.FaceAttributeType Blur { get { throw null; } } + public static Azure.AI.Vision.Face.FaceAttributeType Exposure { get { throw null; } } + public static Azure.AI.Vision.Face.FaceAttributeType FacialHair { get { throw null; } } + public static Azure.AI.Vision.Face.FaceAttributeType Glasses { get { throw null; } } + public static Azure.AI.Vision.Face.FaceAttributeType Hair { get { throw null; } } + public static Azure.AI.Vision.Face.FaceAttributeType HeadPose { get { throw null; } } + public static Azure.AI.Vision.Face.FaceAttributeType Mask { get { throw null; } } + public static Azure.AI.Vision.Face.FaceAttributeType Noise { get { throw null; } } + public static Azure.AI.Vision.Face.FaceAttributeType Occlusion { get { throw null; } } + public static Azure.AI.Vision.Face.FaceAttributeType QualityForRecognition { get { throw null; } } + public static Azure.AI.Vision.Face.FaceAttributeType Smile { get { throw null; } } + public bool Equals(Azure.AI.Vision.Face.FaceAttributeType 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.AI.Vision.Face.FaceAttributeType left, Azure.AI.Vision.Face.FaceAttributeType right) { throw null; } + public static implicit operator Azure.AI.Vision.Face.FaceAttributeType (string value) { throw null; } + public static bool operator !=(Azure.AI.Vision.Face.FaceAttributeType left, Azure.AI.Vision.Face.FaceAttributeType right) { throw null; } + public override string ToString() { throw null; } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential, Size=1)] + public partial struct Detection01 + { + public static Azure.AI.Vision.Face.FaceAttributeType Accessories { get { throw null; } } + public static Azure.AI.Vision.Face.FaceAttributeType Blur { get { throw null; } } + public static Azure.AI.Vision.Face.FaceAttributeType Exposure { get { throw null; } } + public static Azure.AI.Vision.Face.FaceAttributeType Glasses { get { throw null; } } + public static Azure.AI.Vision.Face.FaceAttributeType HeadPose { get { throw null; } } + public static Azure.AI.Vision.Face.FaceAttributeType Mask { get { throw null; } } + public static Azure.AI.Vision.Face.FaceAttributeType Noise { get { throw null; } } + public static Azure.AI.Vision.Face.FaceAttributeType Occlusion { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential, Size=1)] + public partial struct Detection03 + { + public static Azure.AI.Vision.Face.FaceAttributeType Blur { get { throw null; } } + public static Azure.AI.Vision.Face.FaceAttributeType HeadPose { get { throw null; } } + public static Azure.AI.Vision.Face.FaceAttributeType Mask { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential, Size=1)] + public partial struct Recognition03 + { + public static Azure.AI.Vision.Face.FaceAttributeType QualityForRecognition { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential, Size=1)] + public partial struct Recognition04 + { + public static Azure.AI.Vision.Face.FaceAttributeType QualityForRecognition { get { throw null; } } + } + } + public partial class FaceClient + { + protected FaceClient() { } + public FaceClient(System.Uri endpoint, Azure.AzureKeyCredential credential) { } + public FaceClient(System.Uri endpoint, Azure.AzureKeyCredential credential, Azure.AI.Vision.Face.AzureAIVisionFaceClientOptions options) { } + public FaceClient(System.Uri endpoint, Azure.Core.TokenCredential credential) { } + public FaceClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.AI.Vision.Face.AzureAIVisionFaceClientOptions options) { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.Response> Detect(System.BinaryData imageContent, Azure.AI.Vision.Face.FaceDetectionModel detectionModel, Azure.AI.Vision.Face.FaceRecognitionModel recognitionModel, bool returnFaceId, System.Collections.Generic.IEnumerable returnFaceAttributes = null, bool? returnFaceLandmarks = default(bool?), bool? returnRecognitionModel = default(bool?), int? faceIdTimeToLive = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response> Detect(System.Uri url, Azure.AI.Vision.Face.FaceDetectionModel detectionModel, Azure.AI.Vision.Face.FaceRecognitionModel recognitionModel, bool returnFaceId, System.Collections.Generic.IEnumerable returnFaceAttributes = null, bool? returnFaceLandmarks = default(bool?), bool? returnRecognitionModel = default(bool?), int? faceIdTimeToLive = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task>> DetectAsync(System.BinaryData imageContent, Azure.AI.Vision.Face.FaceDetectionModel detectionModel, Azure.AI.Vision.Face.FaceRecognitionModel recognitionModel, bool returnFaceId, System.Collections.Generic.IEnumerable returnFaceAttributes = null, bool? returnFaceLandmarks = default(bool?), bool? returnRecognitionModel = default(bool?), int? faceIdTimeToLive = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task>> DetectAsync(System.Uri url, Azure.AI.Vision.Face.FaceDetectionModel detectionModel, Azure.AI.Vision.Face.FaceRecognitionModel recognitionModel, bool returnFaceId, System.Collections.Generic.IEnumerable returnFaceAttributes = null, bool? returnFaceLandmarks = default(bool?), bool? returnRecognitionModel = default(bool?), int? faceIdTimeToLive = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response FindSimilar(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response> FindSimilar(System.Guid faceId, System.Collections.Generic.IEnumerable faceIds, int? maxNumOfCandidatesReturned = default(int?), Azure.AI.Vision.Face.FindSimilarMatchMode? mode = default(Azure.AI.Vision.Face.FindSimilarMatchMode?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task FindSimilarAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task>> FindSimilarAsync(System.Guid faceId, System.Collections.Generic.IEnumerable faceIds, int? maxNumOfCandidatesReturned = default(int?), Azure.AI.Vision.Face.FindSimilarMatchMode? mode = default(Azure.AI.Vision.Face.FindSimilarMatchMode?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Group(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response Group(System.Collections.Generic.IEnumerable faceIds, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GroupAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> GroupAsync(System.Collections.Generic.IEnumerable faceIds, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response VerifyFaceToFace(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response VerifyFaceToFace(System.Guid faceId1, System.Guid faceId2, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task VerifyFaceToFaceAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> VerifyFaceToFaceAsync(System.Guid faceId1, System.Guid faceId2, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FaceDetectionModel : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FaceDetectionModel(string value) { throw null; } + public static Azure.AI.Vision.Face.FaceDetectionModel Detection01 { get { throw null; } } + public static Azure.AI.Vision.Face.FaceDetectionModel Detection02 { get { throw null; } } + public static Azure.AI.Vision.Face.FaceDetectionModel Detection03 { get { throw null; } } + public bool Equals(Azure.AI.Vision.Face.FaceDetectionModel 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.AI.Vision.Face.FaceDetectionModel left, Azure.AI.Vision.Face.FaceDetectionModel right) { throw null; } + public static implicit operator Azure.AI.Vision.Face.FaceDetectionModel (string value) { throw null; } + public static bool operator !=(Azure.AI.Vision.Face.FaceDetectionModel left, Azure.AI.Vision.Face.FaceDetectionModel right) { throw null; } + public override string ToString() { throw null; } + } + public partial class FaceDetectionResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal FaceDetectionResult() { } + public Azure.AI.Vision.Face.FaceAttributes FaceAttributes { get { throw null; } } + public System.Guid? FaceId { get { throw null; } } + public Azure.AI.Vision.Face.FaceLandmarks FaceLandmarks { get { throw null; } } + public Azure.AI.Vision.Face.FaceRectangle FaceRectangle { get { throw null; } } + public Azure.AI.Vision.Face.FaceRecognitionModel? RecognitionModel { get { throw null; } } + Azure.AI.Vision.Face.FaceDetectionResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Vision.Face.FaceDetectionResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FaceFindSimilarResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal FaceFindSimilarResult() { } + public float Confidence { get { throw null; } } + public System.Guid? FaceId { get { throw null; } } + public System.Guid? PersistedFaceId { get { throw null; } } + Azure.AI.Vision.Face.FaceFindSimilarResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Vision.Face.FaceFindSimilarResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FaceGroupingResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal FaceGroupingResult() { } + public System.Collections.Generic.IReadOnlyList> Groups { get { throw null; } } + public System.Collections.Generic.IReadOnlyList MessyGroup { get { throw null; } } + Azure.AI.Vision.Face.FaceGroupingResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Vision.Face.FaceGroupingResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FaceImageType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FaceImageType(string value) { throw null; } + public static Azure.AI.Vision.Face.FaceImageType Color { get { throw null; } } + public static Azure.AI.Vision.Face.FaceImageType Depth { get { throw null; } } + public static Azure.AI.Vision.Face.FaceImageType Infrared { get { throw null; } } + public bool Equals(Azure.AI.Vision.Face.FaceImageType 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.AI.Vision.Face.FaceImageType left, Azure.AI.Vision.Face.FaceImageType right) { throw null; } + public static implicit operator Azure.AI.Vision.Face.FaceImageType (string value) { throw null; } + public static bool operator !=(Azure.AI.Vision.Face.FaceImageType left, Azure.AI.Vision.Face.FaceImageType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class FaceLandmarks : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal FaceLandmarks() { } + public Azure.AI.Vision.Face.LandmarkCoordinate EyebrowLeftInner { get { throw null; } } + public Azure.AI.Vision.Face.LandmarkCoordinate EyebrowLeftOuter { get { throw null; } } + public Azure.AI.Vision.Face.LandmarkCoordinate EyebrowRightInner { get { throw null; } } + public Azure.AI.Vision.Face.LandmarkCoordinate EyebrowRightOuter { get { throw null; } } + public Azure.AI.Vision.Face.LandmarkCoordinate EyeLeftBottom { get { throw null; } } + public Azure.AI.Vision.Face.LandmarkCoordinate EyeLeftInner { get { throw null; } } + public Azure.AI.Vision.Face.LandmarkCoordinate EyeLeftOuter { get { throw null; } } + public Azure.AI.Vision.Face.LandmarkCoordinate EyeLeftTop { get { throw null; } } + public Azure.AI.Vision.Face.LandmarkCoordinate EyeRightBottom { get { throw null; } } + public Azure.AI.Vision.Face.LandmarkCoordinate EyeRightInner { get { throw null; } } + public Azure.AI.Vision.Face.LandmarkCoordinate EyeRightOuter { get { throw null; } } + public Azure.AI.Vision.Face.LandmarkCoordinate EyeRightTop { get { throw null; } } + public Azure.AI.Vision.Face.LandmarkCoordinate MouthLeft { get { throw null; } } + public Azure.AI.Vision.Face.LandmarkCoordinate MouthRight { get { throw null; } } + public Azure.AI.Vision.Face.LandmarkCoordinate NoseLeftAlarOutTip { get { throw null; } } + public Azure.AI.Vision.Face.LandmarkCoordinate NoseLeftAlarTop { get { throw null; } } + public Azure.AI.Vision.Face.LandmarkCoordinate NoseRightAlarOutTip { get { throw null; } } + public Azure.AI.Vision.Face.LandmarkCoordinate NoseRightAlarTop { get { throw null; } } + public Azure.AI.Vision.Face.LandmarkCoordinate NoseRootLeft { get { throw null; } } + public Azure.AI.Vision.Face.LandmarkCoordinate NoseRootRight { get { throw null; } } + public Azure.AI.Vision.Face.LandmarkCoordinate NoseTip { get { throw null; } } + public Azure.AI.Vision.Face.LandmarkCoordinate PupilLeft { get { throw null; } } + public Azure.AI.Vision.Face.LandmarkCoordinate PupilRight { get { throw null; } } + public Azure.AI.Vision.Face.LandmarkCoordinate UnderLipBottom { get { throw null; } } + public Azure.AI.Vision.Face.LandmarkCoordinate UnderLipTop { get { throw null; } } + public Azure.AI.Vision.Face.LandmarkCoordinate UpperLipBottom { get { throw null; } } + public Azure.AI.Vision.Face.LandmarkCoordinate UpperLipTop { get { throw null; } } + Azure.AI.Vision.Face.FaceLandmarks System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Vision.Face.FaceLandmarks System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FaceLivenessDecision : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FaceLivenessDecision(string value) { throw null; } + public static Azure.AI.Vision.Face.FaceLivenessDecision RealFace { get { throw null; } } + public static Azure.AI.Vision.Face.FaceLivenessDecision SpoofFace { get { throw null; } } + public static Azure.AI.Vision.Face.FaceLivenessDecision Uncertain { get { throw null; } } + public bool Equals(Azure.AI.Vision.Face.FaceLivenessDecision 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.AI.Vision.Face.FaceLivenessDecision left, Azure.AI.Vision.Face.FaceLivenessDecision right) { throw null; } + public static implicit operator Azure.AI.Vision.Face.FaceLivenessDecision (string value) { throw null; } + public static bool operator !=(Azure.AI.Vision.Face.FaceLivenessDecision left, Azure.AI.Vision.Face.FaceLivenessDecision right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FaceRecognitionModel : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FaceRecognitionModel(string value) { throw null; } + public static Azure.AI.Vision.Face.FaceRecognitionModel Recognition01 { get { throw null; } } + public static Azure.AI.Vision.Face.FaceRecognitionModel Recognition02 { get { throw null; } } + public static Azure.AI.Vision.Face.FaceRecognitionModel Recognition03 { get { throw null; } } + public static Azure.AI.Vision.Face.FaceRecognitionModel Recognition04 { get { throw null; } } + public bool Equals(Azure.AI.Vision.Face.FaceRecognitionModel 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.AI.Vision.Face.FaceRecognitionModel left, Azure.AI.Vision.Face.FaceRecognitionModel right) { throw null; } + public static implicit operator Azure.AI.Vision.Face.FaceRecognitionModel (string value) { throw null; } + public static bool operator !=(Azure.AI.Vision.Face.FaceRecognitionModel left, Azure.AI.Vision.Face.FaceRecognitionModel right) { throw null; } + public override string ToString() { throw null; } + } + public partial class FaceRectangle : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal FaceRectangle() { } + public int Height { get { throw null; } } + public int Left { get { throw null; } } + public int Top { get { throw null; } } + public int Width { get { throw null; } } + Azure.AI.Vision.Face.FaceRectangle System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Vision.Face.FaceRectangle System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FaceSessionClient + { + protected FaceSessionClient() { } + public FaceSessionClient(System.Uri endpoint, Azure.AzureKeyCredential credential) { } + public FaceSessionClient(System.Uri endpoint, Azure.AzureKeyCredential credential, Azure.AI.Vision.Face.AzureAIVisionFaceClientOptions options) { } + public FaceSessionClient(System.Uri endpoint, Azure.Core.TokenCredential credential) { } + public FaceSessionClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.AI.Vision.Face.AzureAIVisionFaceClientOptions options) { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.Response CreateLivenessSession(Azure.AI.Vision.Face.CreateLivenessSessionContent body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateLivenessSession(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> CreateLivenessSessionAsync(Azure.AI.Vision.Face.CreateLivenessSessionContent body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CreateLivenessSessionAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response CreateLivenessWithVerifySession(Azure.AI.Vision.Face.CreateLivenessSessionContent createLivenessSessionContent, System.IO.Stream verifyImage, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateLivenessWithVerifySessionAsync(Azure.AI.Vision.Face.CreateLivenessSessionContent createLivenessSessionContent, System.IO.Stream verifyImage, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response DeleteLivenessSession(string sessionId, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteLivenessSessionAsync(string sessionId, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response DeleteLivenessWithVerifySession(string sessionId, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteLivenessWithVerifySessionAsync(string sessionId, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetLivenessSessionAuditEntries(string sessionId, string start, int? top, Azure.RequestContext context) { throw null; } + public virtual Azure.Response> GetLivenessSessionAuditEntries(string sessionId, string start = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetLivenessSessionAuditEntriesAsync(string sessionId, string start, int? top, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task>> GetLivenessSessionAuditEntriesAsync(string sessionId, string start = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetLivenessSessionResult(string sessionId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetLivenessSessionResult(string sessionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetLivenessSessionResultAsync(string sessionId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetLivenessSessionResultAsync(string sessionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetLivenessSessions(string start, int? top, Azure.RequestContext context) { throw null; } + public virtual Azure.Response> GetLivenessSessions(string start = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetLivenessSessionsAsync(string start, int? top, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task>> GetLivenessSessionsAsync(string start = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetLivenessWithVerifySessionAuditEntries(string sessionId, string start, int? top, Azure.RequestContext context) { throw null; } + public virtual Azure.Response> GetLivenessWithVerifySessionAuditEntries(string sessionId, string start = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetLivenessWithVerifySessionAuditEntriesAsync(string sessionId, string start, int? top, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task>> GetLivenessWithVerifySessionAuditEntriesAsync(string sessionId, string start = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetLivenessWithVerifySessionResult(string sessionId, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetLivenessWithVerifySessionResult(string sessionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetLivenessWithVerifySessionResultAsync(string sessionId, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetLivenessWithVerifySessionResultAsync(string sessionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetLivenessWithVerifySessions(string start, int? top, Azure.RequestContext context) { throw null; } + public virtual Azure.Response> GetLivenessWithVerifySessions(string start = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetLivenessWithVerifySessionsAsync(string start, int? top, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task>> GetLivenessWithVerifySessionsAsync(string start = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FaceSessionStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FaceSessionStatus(string value) { throw null; } + public static Azure.AI.Vision.Face.FaceSessionStatus NotStarted { get { throw null; } } + public static Azure.AI.Vision.Face.FaceSessionStatus ResultAvailable { get { throw null; } } + public static Azure.AI.Vision.Face.FaceSessionStatus Started { get { throw null; } } + public bool Equals(Azure.AI.Vision.Face.FaceSessionStatus 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.AI.Vision.Face.FaceSessionStatus left, Azure.AI.Vision.Face.FaceSessionStatus right) { throw null; } + public static implicit operator Azure.AI.Vision.Face.FaceSessionStatus (string value) { throw null; } + public static bool operator !=(Azure.AI.Vision.Face.FaceSessionStatus left, Azure.AI.Vision.Face.FaceSessionStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class FaceVerificationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal FaceVerificationResult() { } + public float Confidence { get { throw null; } } + public bool IsIdentical { get { throw null; } } + Azure.AI.Vision.Face.FaceVerificationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Vision.Face.FaceVerificationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FacialHair : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal FacialHair() { } + public float Beard { get { throw null; } } + public float Moustache { get { throw null; } } + public float Sideburns { get { throw null; } } + Azure.AI.Vision.Face.FacialHair System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Vision.Face.FacialHair System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FindSimilarMatchMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FindSimilarMatchMode(string value) { throw null; } + public static Azure.AI.Vision.Face.FindSimilarMatchMode MatchFace { get { throw null; } } + public static Azure.AI.Vision.Face.FindSimilarMatchMode MatchPerson { get { throw null; } } + public bool Equals(Azure.AI.Vision.Face.FindSimilarMatchMode 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.AI.Vision.Face.FindSimilarMatchMode left, Azure.AI.Vision.Face.FindSimilarMatchMode right) { throw null; } + public static implicit operator Azure.AI.Vision.Face.FindSimilarMatchMode (string value) { throw null; } + public static bool operator !=(Azure.AI.Vision.Face.FindSimilarMatchMode left, Azure.AI.Vision.Face.FindSimilarMatchMode right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct GlassesType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public GlassesType(string value) { throw null; } + public static Azure.AI.Vision.Face.GlassesType NoGlasses { get { throw null; } } + public static Azure.AI.Vision.Face.GlassesType ReadingGlasses { get { throw null; } } + public static Azure.AI.Vision.Face.GlassesType Sunglasses { get { throw null; } } + public static Azure.AI.Vision.Face.GlassesType SwimmingGoggles { get { throw null; } } + public bool Equals(Azure.AI.Vision.Face.GlassesType 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.AI.Vision.Face.GlassesType left, Azure.AI.Vision.Face.GlassesType right) { throw null; } + public static implicit operator Azure.AI.Vision.Face.GlassesType (string value) { throw null; } + public static bool operator !=(Azure.AI.Vision.Face.GlassesType left, Azure.AI.Vision.Face.GlassesType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class HairColor : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal HairColor() { } + public Azure.AI.Vision.Face.HairColorType Color { get { throw null; } } + public float Confidence { get { throw null; } } + Azure.AI.Vision.Face.HairColor System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Vision.Face.HairColor System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct HairColorType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public HairColorType(string value) { throw null; } + public static Azure.AI.Vision.Face.HairColorType Black { get { throw null; } } + public static Azure.AI.Vision.Face.HairColorType Blond { get { throw null; } } + public static Azure.AI.Vision.Face.HairColorType Brown { get { throw null; } } + public static Azure.AI.Vision.Face.HairColorType Gray { get { throw null; } } + public static Azure.AI.Vision.Face.HairColorType Other { get { throw null; } } + public static Azure.AI.Vision.Face.HairColorType Red { get { throw null; } } + public static Azure.AI.Vision.Face.HairColorType UnknownHairColor { get { throw null; } } + public static Azure.AI.Vision.Face.HairColorType White { get { throw null; } } + public bool Equals(Azure.AI.Vision.Face.HairColorType 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.AI.Vision.Face.HairColorType left, Azure.AI.Vision.Face.HairColorType right) { throw null; } + public static implicit operator Azure.AI.Vision.Face.HairColorType (string value) { throw null; } + public static bool operator !=(Azure.AI.Vision.Face.HairColorType left, Azure.AI.Vision.Face.HairColorType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class HairProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal HairProperties() { } + public float Bald { get { throw null; } } + public System.Collections.Generic.IReadOnlyList HairColor { get { throw null; } } + public bool Invisible { get { throw null; } } + Azure.AI.Vision.Face.HairProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Vision.Face.HairProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HeadPose : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal HeadPose() { } + public float Pitch { get { throw null; } } + public float Roll { get { throw null; } } + public float Yaw { get { throw null; } } + Azure.AI.Vision.Face.HeadPose System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Vision.Face.HeadPose System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class LandmarkCoordinate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal LandmarkCoordinate() { } + public float X { get { throw null; } } + public float Y { get { throw null; } } + Azure.AI.Vision.Face.LandmarkCoordinate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Vision.Face.LandmarkCoordinate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct LivenessModel : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public LivenessModel(string value) { throw null; } + public static Azure.AI.Vision.Face.LivenessModel V20200215Preview01 { get { throw null; } } + public static Azure.AI.Vision.Face.LivenessModel V20211112Preview03 { get { throw null; } } + public static Azure.AI.Vision.Face.LivenessModel V20221015Preview04 { get { throw null; } } + public static Azure.AI.Vision.Face.LivenessModel V20230302Preview05 { get { throw null; } } + public bool Equals(Azure.AI.Vision.Face.LivenessModel 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.AI.Vision.Face.LivenessModel left, Azure.AI.Vision.Face.LivenessModel right) { throw null; } + public static implicit operator Azure.AI.Vision.Face.LivenessModel (string value) { throw null; } + public static bool operator !=(Azure.AI.Vision.Face.LivenessModel left, Azure.AI.Vision.Face.LivenessModel right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct LivenessOperationMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public LivenessOperationMode(string value) { throw null; } + public static Azure.AI.Vision.Face.LivenessOperationMode Passive { get { throw null; } } + public static Azure.AI.Vision.Face.LivenessOperationMode PassiveActive { get { throw null; } } + public bool Equals(Azure.AI.Vision.Face.LivenessOperationMode 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.AI.Vision.Face.LivenessOperationMode left, Azure.AI.Vision.Face.LivenessOperationMode right) { throw null; } + public static implicit operator Azure.AI.Vision.Face.LivenessOperationMode (string value) { throw null; } + public static bool operator !=(Azure.AI.Vision.Face.LivenessOperationMode left, Azure.AI.Vision.Face.LivenessOperationMode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class LivenessOutputsTarget : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal LivenessOutputsTarget() { } + public Azure.AI.Vision.Face.FaceRectangle FaceRectangle { get { throw null; } } + public string FileName { get { throw null; } } + public Azure.AI.Vision.Face.FaceImageType ImageType { get { throw null; } } + public int TimeOffsetWithinFile { get { throw null; } } + Azure.AI.Vision.Face.LivenessOutputsTarget System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Vision.Face.LivenessOutputsTarget System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class LivenessResponseBody : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal LivenessResponseBody() { } + public System.Collections.Generic.IReadOnlyDictionary AdditionalProperties { get { throw null; } } + public Azure.AI.Vision.Face.FaceLivenessDecision? LivenessDecision { get { throw null; } } + public Azure.AI.Vision.Face.LivenessModel? ModelVersionUsed { get { throw null; } } + public Azure.AI.Vision.Face.LivenessOutputsTarget Target { get { throw null; } } + public Azure.AI.Vision.Face.LivenessWithVerifyOutputs VerifyResult { get { throw null; } } + Azure.AI.Vision.Face.LivenessResponseBody System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Vision.Face.LivenessResponseBody System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class LivenessSession : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal LivenessSession() { } + public int? AuthTokenTimeToLiveInSeconds { get { throw null; } } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public string DeviceCorrelationId { get { throw null; } } + public string Id { get { throw null; } } + public Azure.AI.Vision.Face.LivenessSessionAuditEntry Result { get { throw null; } } + public bool SessionExpired { get { throw null; } } + public System.DateTimeOffset? SessionStartDateTime { get { throw null; } } + public Azure.AI.Vision.Face.FaceSessionStatus Status { get { throw null; } } + Azure.AI.Vision.Face.LivenessSession System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Vision.Face.LivenessSession System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class LivenessSessionAuditEntry : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal LivenessSessionAuditEntry() { } + public string ClientRequestId { get { throw null; } } + public string Digest { get { throw null; } } + public long Id { get { throw null; } } + public System.DateTimeOffset ReceivedDateTime { get { throw null; } } + public Azure.AI.Vision.Face.AuditRequestInfo Request { get { throw null; } } + public string RequestId { get { throw null; } } + public Azure.AI.Vision.Face.AuditLivenessResponseInfo Response { get { throw null; } } + public string SessionId { get { throw null; } } + Azure.AI.Vision.Face.LivenessSessionAuditEntry System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Vision.Face.LivenessSessionAuditEntry System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class LivenessSessionItem : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal LivenessSessionItem() { } + public int? AuthTokenTimeToLiveInSeconds { get { throw null; } } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public string DeviceCorrelationId { get { throw null; } } + public string Id { get { throw null; } } + public bool SessionExpired { get { throw null; } } + public System.DateTimeOffset? SessionStartDateTime { get { throw null; } } + Azure.AI.Vision.Face.LivenessSessionItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Vision.Face.LivenessSessionItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class LivenessWithVerifyImage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal LivenessWithVerifyImage() { } + public Azure.AI.Vision.Face.FaceRectangle FaceRectangle { get { throw null; } } + public Azure.AI.Vision.Face.QualityForRecognition QualityForRecognition { get { throw null; } } + Azure.AI.Vision.Face.LivenessWithVerifyImage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Vision.Face.LivenessWithVerifyImage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class LivenessWithVerifyOutputs : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal LivenessWithVerifyOutputs() { } + public bool IsIdentical { get { throw null; } } + public float MatchConfidence { get { throw null; } } + public Azure.AI.Vision.Face.LivenessWithVerifyImage VerifyImage { get { throw null; } } + Azure.AI.Vision.Face.LivenessWithVerifyOutputs System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Vision.Face.LivenessWithVerifyOutputs System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class LivenessWithVerifySession : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal LivenessWithVerifySession() { } + public int? AuthTokenTimeToLiveInSeconds { get { throw null; } } + public System.DateTimeOffset CreatedDateTime { get { throw null; } } + public string DeviceCorrelationId { get { throw null; } } + public string Id { get { throw null; } } + public Azure.AI.Vision.Face.LivenessSessionAuditEntry Result { get { throw null; } } + public bool SessionExpired { get { throw null; } } + public System.DateTimeOffset? SessionStartDateTime { get { throw null; } } + public Azure.AI.Vision.Face.FaceSessionStatus Status { get { throw null; } } + Azure.AI.Vision.Face.LivenessWithVerifySession System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Vision.Face.LivenessWithVerifySession System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class MaskProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal MaskProperties() { } + public bool NoseAndMouthCovered { get { throw null; } } + public Azure.AI.Vision.Face.MaskType Type { get { throw null; } } + Azure.AI.Vision.Face.MaskProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Vision.Face.MaskProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MaskType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MaskType(string value) { throw null; } + public static Azure.AI.Vision.Face.MaskType FaceMask { get { throw null; } } + public static Azure.AI.Vision.Face.MaskType NoMask { get { throw null; } } + public static Azure.AI.Vision.Face.MaskType OtherMaskOrOcclusion { get { throw null; } } + public static Azure.AI.Vision.Face.MaskType Uncertain { get { throw null; } } + public bool Equals(Azure.AI.Vision.Face.MaskType 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.AI.Vision.Face.MaskType left, Azure.AI.Vision.Face.MaskType right) { throw null; } + public static implicit operator Azure.AI.Vision.Face.MaskType (string value) { throw null; } + public static bool operator !=(Azure.AI.Vision.Face.MaskType left, Azure.AI.Vision.Face.MaskType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NoiseLevel : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NoiseLevel(string value) { throw null; } + public static Azure.AI.Vision.Face.NoiseLevel High { get { throw null; } } + public static Azure.AI.Vision.Face.NoiseLevel Low { get { throw null; } } + public static Azure.AI.Vision.Face.NoiseLevel Medium { get { throw null; } } + public bool Equals(Azure.AI.Vision.Face.NoiseLevel 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.AI.Vision.Face.NoiseLevel left, Azure.AI.Vision.Face.NoiseLevel right) { throw null; } + public static implicit operator Azure.AI.Vision.Face.NoiseLevel (string value) { throw null; } + public static bool operator !=(Azure.AI.Vision.Face.NoiseLevel left, Azure.AI.Vision.Face.NoiseLevel right) { throw null; } + public override string ToString() { throw null; } + } + public partial class NoiseProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NoiseProperties() { } + public Azure.AI.Vision.Face.NoiseLevel NoiseLevel { get { throw null; } } + public float Value { get { throw null; } } + Azure.AI.Vision.Face.NoiseProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Vision.Face.NoiseProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class OcclusionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal OcclusionProperties() { } + public bool EyeOccluded { get { throw null; } } + public bool ForeheadOccluded { get { throw null; } } + public bool MouthOccluded { get { throw null; } } + Azure.AI.Vision.Face.OcclusionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Vision.Face.OcclusionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct QualityForRecognition : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public QualityForRecognition(string value) { throw null; } + public static Azure.AI.Vision.Face.QualityForRecognition High { get { throw null; } } + public static Azure.AI.Vision.Face.QualityForRecognition Low { get { throw null; } } + public static Azure.AI.Vision.Face.QualityForRecognition Medium { get { throw null; } } + public bool Equals(Azure.AI.Vision.Face.QualityForRecognition 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.AI.Vision.Face.QualityForRecognition left, Azure.AI.Vision.Face.QualityForRecognition right) { throw null; } + public static implicit operator Azure.AI.Vision.Face.QualityForRecognition (string value) { throw null; } + public static bool operator !=(Azure.AI.Vision.Face.QualityForRecognition left, Azure.AI.Vision.Face.QualityForRecognition right) { throw null; } + public override string ToString() { throw null; } + } +} +namespace Microsoft.Extensions.Azure +{ + public static partial class AIVisionFaceClientBuilderExtensions + { + public static Azure.Core.Extensions.IAzureClientBuilder AddFaceClient(this TBuilder builder, System.Uri endpoint) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddFaceClient(this TBuilder builder, System.Uri endpoint, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddFaceClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddFaceSessionClient(this TBuilder builder, System.Uri endpoint) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddFaceSessionClient(this TBuilder builder, System.Uri endpoint, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddFaceSessionClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } + } +} diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/Docs/FaceSessionClient.xml b/sdk/face/Azure.AI.Vision.Face/src/Generated/Docs/FaceSessionClient.xml index caebbcff8c2ff..d3172ec4d1d1b 100644 --- a/sdk/face/Azure.AI.Vision.Face/src/Generated/Docs/FaceSessionClient.xml +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/Docs/FaceSessionClient.xml @@ -9,8 +9,8 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); -CreateLivenessSessionContent createLivenessSessionContent = new CreateLivenessSessionContent(LivenessOperationMode.Passive); -Response response = await client.CreateLivenessSessionAsync(createLivenessSessionContent); +CreateLivenessSessionContent body = new CreateLivenessSessionContent(LivenessOperationMode.Passive); +Response response = await client.CreateLivenessSessionAsync(body); ]]> This sample shows how to call CreateLivenessSessionAsync with all parameters. "); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); -CreateLivenessSessionContent createLivenessSessionContent = new CreateLivenessSessionContent(LivenessOperationMode.Passive) +CreateLivenessSessionContent body = new CreateLivenessSessionContent(LivenessOperationMode.Passive) { SendResultsToClient = true, DeviceCorrelationIdSetInClient = true, DeviceCorrelationId = "", AuthTokenTimeToLiveInSeconds = 1234, }; -Response response = await client.CreateLivenessSessionAsync(createLivenessSessionContent); +Response response = await client.CreateLivenessSessionAsync(body); ]]> @@ -36,8 +36,8 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); -CreateLivenessSessionContent createLivenessSessionContent = new CreateLivenessSessionContent(LivenessOperationMode.Passive); -Response response = client.CreateLivenessSession(createLivenessSessionContent); +CreateLivenessSessionContent body = new CreateLivenessSessionContent(LivenessOperationMode.Passive); +Response response = client.CreateLivenessSession(body); ]]> This sample shows how to call CreateLivenessSession with all parameters. "); AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); -CreateLivenessSessionContent createLivenessSessionContent = new CreateLivenessSessionContent(LivenessOperationMode.Passive) +CreateLivenessSessionContent body = new CreateLivenessSessionContent(LivenessOperationMode.Passive) { SendResultsToClient = true, DeviceCorrelationIdSetInClient = true, DeviceCorrelationId = "", AuthTokenTimeToLiveInSeconds = 1234, }; -Response response = client.CreateLivenessSession(createLivenessSessionContent); +Response response = client.CreateLivenessSession(body); ]]> diff --git a/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceSessionClient.cs b/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceSessionClient.cs index f86f2c12ada35..4019a5bc3493c 100644 --- a/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceSessionClient.cs +++ b/sdk/face/Azure.AI.Vision.Face/src/Generated/FaceSessionClient.cs @@ -103,9 +103,9 @@ public FaceSessionClient(Uri endpoint, TokenCredential credential, AzureAIVision } /// Create a new detect liveness session. - /// Request for creating liveness session. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// /// A session is best for client device scenarios where developers want to authorize a client device to perform only a liveness detection without granting full access to their resource. Created sessions have a limited life span and only authorize clients to perform the desired action before access is expired. /// @@ -119,20 +119,20 @@ public FaceSessionClient(Uri endpoint, TokenCredential credential, AzureAIVision /// > Client access can be revoked by deleting the session using the Delete Liveness Session operation. To retrieve a result, use the Get Liveness Session. To audit the individual requests that a client has made to your resource, use the List Liveness Session Audit Entries. /// /// - public virtual async Task> CreateLivenessSessionAsync(CreateLivenessSessionContent createLivenessSessionContent, CancellationToken cancellationToken = default) + public virtual async Task> CreateLivenessSessionAsync(CreateLivenessSessionContent body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(createLivenessSessionContent, nameof(createLivenessSessionContent)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = createLivenessSessionContent.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await CreateLivenessSessionAsync(content, context).ConfigureAwait(false); return Response.FromValue(CreateLivenessSessionResult.FromResponse(response), response); } /// Create a new detect liveness session. - /// Request for creating liveness session. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// /// A session is best for client device scenarios where developers want to authorize a client device to perform only a liveness detection without granting full access to their resource. Created sessions have a limited life span and only authorize clients to perform the desired action before access is expired. /// @@ -146,11 +146,11 @@ public virtual async Task> CreateLivenessS /// > Client access can be revoked by deleting the session using the Delete Liveness Session operation. To retrieve a result, use the Get Liveness Session. To audit the individual requests that a client has made to your resource, use the List Liveness Session Audit Entries. /// /// - public virtual Response CreateLivenessSession(CreateLivenessSessionContent createLivenessSessionContent, CancellationToken cancellationToken = default) + public virtual Response CreateLivenessSession(CreateLivenessSessionContent body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(createLivenessSessionContent, nameof(createLivenessSessionContent)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = createLivenessSessionContent.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = CreateLivenessSession(content, context); return Response.FromValue(CreateLivenessSessionResult.FromResponse(response), response); @@ -675,9 +675,9 @@ public virtual Response GetLivenessSessionAuditEntries(string sessionId, string } /// Create a new liveness session with verify. Client device submits VerifyImage during the /detectLivenessWithVerify/singleModal call. - /// Request for creating liveness session. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// /// A session is best for client device scenarios where developers want to authorize a client device to perform only a liveness detection without granting full access to their resource. Created sessions have a limited life span and only authorize clients to perform the desired action before access is expired. /// @@ -698,20 +698,20 @@ public virtual Response GetLivenessSessionAuditEntries(string sessionId, string /// > [!NOTE] /// > Extra measures should be taken to validate that the client is sending the expected VerifyImage. /// - internal virtual async Task> CreateLivenessWithVerifySessionAsync(CreateLivenessSessionContent createLivenessSessionContent, CancellationToken cancellationToken = default) + internal virtual async Task> CreateLivenessWithVerifySessionAsync(CreateLivenessSessionContent body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(createLivenessSessionContent, nameof(createLivenessSessionContent)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = createLivenessSessionContent.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await CreateLivenessWithVerifySessionAsync(content, context).ConfigureAwait(false); return Response.FromValue(CreateLivenessWithVerifySessionResult.FromResponse(response), response); } /// Create a new liveness session with verify. Client device submits VerifyImage during the /detectLivenessWithVerify/singleModal call. - /// Request for creating liveness session. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// /// A session is best for client device scenarios where developers want to authorize a client device to perform only a liveness detection without granting full access to their resource. Created sessions have a limited life span and only authorize clients to perform the desired action before access is expired. /// @@ -732,11 +732,11 @@ internal virtual async Task> Cre /// > [!NOTE] /// > Extra measures should be taken to validate that the client is sending the expected VerifyImage. /// - internal virtual Response CreateLivenessWithVerifySession(CreateLivenessSessionContent createLivenessSessionContent, CancellationToken cancellationToken = default) + internal virtual Response CreateLivenessWithVerifySession(CreateLivenessSessionContent body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(createLivenessSessionContent, nameof(createLivenessSessionContent)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = createLivenessSessionContent.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = CreateLivenessWithVerifySession(content, context); return Response.FromValue(CreateLivenessWithVerifySessionResult.FromResponse(response), response); @@ -819,9 +819,9 @@ internal virtual Response CreateLivenessWithVerifySession(RequestContent content } /// Create a new liveness session with verify. Provide the verify image during session creation. - /// Request of liveness with verify session creation. + /// Request content of liveness with verify session creation. /// The cancellation token to use. - /// is null. + /// is null. /// /// A session is best for client device scenarios where developers want to authorize a client device to perform only a liveness detection without granting full access to their resource. Created sessions have a limited life span and only authorize clients to perform the desired action before access is expired. /// @@ -840,20 +840,20 @@ internal virtual Response CreateLivenessWithVerifySession(RequestContent content /// /// Recommended Option: VerifyImage is provided during session creation. /// - internal virtual async Task> CreateLivenessWithVerifySessionWithVerifyImageAsync(CreateLivenessWithVerifySessionContent createLivenessWithVerifySessionContent, CancellationToken cancellationToken = default) + internal virtual async Task> CreateLivenessWithVerifySessionWithVerifyImageAsync(CreateLivenessWithVerifySessionContent body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(createLivenessWithVerifySessionContent, nameof(createLivenessWithVerifySessionContent)); + Argument.AssertNotNull(body, nameof(body)); - using MultipartFormDataRequestContent content = createLivenessWithVerifySessionContent.ToMultipartRequestContent(); + using MultipartFormDataRequestContent content = body.ToMultipartRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await CreateLivenessWithVerifySessionWithVerifyImageAsync(content, content.ContentType, context).ConfigureAwait(false); return Response.FromValue(CreateLivenessWithVerifySessionResult.FromResponse(response), response); } /// Create a new liveness session with verify. Provide the verify image during session creation. - /// Request of liveness with verify session creation. + /// Request content of liveness with verify session creation. /// The cancellation token to use. - /// is null. + /// is null. /// /// A session is best for client device scenarios where developers want to authorize a client device to perform only a liveness detection without granting full access to their resource. Created sessions have a limited life span and only authorize clients to perform the desired action before access is expired. /// @@ -872,11 +872,11 @@ internal virtual async Task> Cre /// /// Recommended Option: VerifyImage is provided during session creation. /// - internal virtual Response CreateLivenessWithVerifySessionWithVerifyImage(CreateLivenessWithVerifySessionContent createLivenessWithVerifySessionContent, CancellationToken cancellationToken = default) + internal virtual Response CreateLivenessWithVerifySessionWithVerifyImage(CreateLivenessWithVerifySessionContent body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(createLivenessWithVerifySessionContent, nameof(createLivenessWithVerifySessionContent)); + Argument.AssertNotNull(body, nameof(body)); - using MultipartFormDataRequestContent content = createLivenessWithVerifySessionContent.ToMultipartRequestContent(); + using MultipartFormDataRequestContent content = body.ToMultipartRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = CreateLivenessWithVerifySessionWithVerifyImage(content, content.ContentType, context); return Response.FromValue(CreateLivenessWithVerifySessionResult.FromResponse(response), response); diff --git a/sdk/face/Azure.AI.Vision.Face/tests/Generated/Samples/Samples_FaceSessionClient.cs b/sdk/face/Azure.AI.Vision.Face/tests/Generated/Samples/Samples_FaceSessionClient.cs index ba531b3cb3e60..e5709b38ab0e1 100644 --- a/sdk/face/Azure.AI.Vision.Face/tests/Generated/Samples/Samples_FaceSessionClient.cs +++ b/sdk/face/Azure.AI.Vision.Face/tests/Generated/Samples/Samples_FaceSessionClient.cs @@ -63,8 +63,8 @@ public void Example_LivenessSession_CreateLivenessSession_ShortVersion_Convenien AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); - CreateLivenessSessionContent createLivenessSessionContent = new CreateLivenessSessionContent(LivenessOperationMode.Passive); - Response response = client.CreateLivenessSession(createLivenessSessionContent); + CreateLivenessSessionContent body = new CreateLivenessSessionContent(LivenessOperationMode.Passive); + Response response = client.CreateLivenessSession(body); } [Test] @@ -75,8 +75,8 @@ public async Task Example_LivenessSession_CreateLivenessSession_ShortVersion_Con AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); - CreateLivenessSessionContent createLivenessSessionContent = new CreateLivenessSessionContent(LivenessOperationMode.Passive); - Response response = await client.CreateLivenessSessionAsync(createLivenessSessionContent); + CreateLivenessSessionContent body = new CreateLivenessSessionContent(LivenessOperationMode.Passive); + Response response = await client.CreateLivenessSessionAsync(body); } [Test] @@ -133,14 +133,14 @@ public void Example_LivenessSession_CreateLivenessSession_AllParameters_Convenie AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); - CreateLivenessSessionContent createLivenessSessionContent = new CreateLivenessSessionContent(LivenessOperationMode.Passive) + CreateLivenessSessionContent body = new CreateLivenessSessionContent(LivenessOperationMode.Passive) { SendResultsToClient = true, DeviceCorrelationIdSetInClient = true, DeviceCorrelationId = "", AuthTokenTimeToLiveInSeconds = 1234, }; - Response response = client.CreateLivenessSession(createLivenessSessionContent); + Response response = client.CreateLivenessSession(body); } [Test] @@ -151,14 +151,14 @@ public async Task Example_LivenessSession_CreateLivenessSession_AllParameters_Co AzureKeyCredential credential = new AzureKeyCredential(""); FaceSessionClient client = new FaceSessionClient(endpoint, credential); - CreateLivenessSessionContent createLivenessSessionContent = new CreateLivenessSessionContent(LivenessOperationMode.Passive) + CreateLivenessSessionContent body = new CreateLivenessSessionContent(LivenessOperationMode.Passive) { SendResultsToClient = true, DeviceCorrelationIdSetInClient = true, DeviceCorrelationId = "", AuthTokenTimeToLiveInSeconds = 1234, }; - Response response = await client.CreateLivenessSessionAsync(createLivenessSessionContent); + Response response = await client.CreateLivenessSessionAsync(body); } [Test] diff --git a/sdk/face/Azure.AI.Vision.Face/tsp-location.yaml b/sdk/face/Azure.AI.Vision.Face/tsp-location.yaml index 5d7aa72781b6c..d170fcf1cfd54 100644 --- a/sdk/face/Azure.AI.Vision.Face/tsp-location.yaml +++ b/sdk/face/Azure.AI.Vision.Face/tsp-location.yaml @@ -1,5 +1,5 @@ directory: specification/ai/Face -commit: 1d2253d1e221541cf05ae5d0dd95bd28c0846238 +commit: b9652b3e860e690c9ff53866071c591d59fed907 repo: Azure/azure-rest-api-specs additionalDirectories: [] diff --git a/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/api/Azure.Health.Insights.CancerProfiling.netstandard2.0.cs b/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/api/Azure.Health.Insights.CancerProfiling.netstandard2.0.cs index 027353afb4d86..d893226583b7c 100644 --- a/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/api/Azure.Health.Insights.CancerProfiling.netstandard2.0.cs +++ b/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/api/Azure.Health.Insights.CancerProfiling.netstandard2.0.cs @@ -7,9 +7,9 @@ public CancerProfilingClient(System.Uri endpoint, Azure.AzureKeyCredential crede public CancerProfilingClient(System.Uri endpoint, Azure.AzureKeyCredential credential, Azure.Health.Insights.CancerProfiling.CancerProfilingClientOptions options) { } public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } public virtual Azure.Operation InferCancerProfile(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Operation InferCancerProfile(Azure.WaitUntil waitUntil, Azure.Health.Insights.CancerProfiling.OncoPhenotypeData oncoPhenotypeData, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation InferCancerProfile(Azure.WaitUntil waitUntil, Azure.Health.Insights.CancerProfiling.OncoPhenotypeData body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> InferCancerProfileAsync(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> InferCancerProfileAsync(Azure.WaitUntil waitUntil, Azure.Health.Insights.CancerProfiling.OncoPhenotypeData oncoPhenotypeData, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> InferCancerProfileAsync(Azure.WaitUntil waitUntil, Azure.Health.Insights.CancerProfiling.OncoPhenotypeData body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class CancerProfilingClientOptions : Azure.Core.ClientOptions { diff --git a/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/src/Generated/CancerProfilingClient.cs b/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/src/Generated/CancerProfilingClient.cs index 5c4f5ec464f97..b0939b1db0556 100644 --- a/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/src/Generated/CancerProfilingClient.cs +++ b/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/src/Generated/CancerProfilingClient.cs @@ -63,16 +63,16 @@ public CancerProfilingClient(Uri endpoint, AzureKeyCredential credential, Cancer /// Create Onco Phenotype job. /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The body of the Onco Phenotype request. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// Creates an Onco Phenotype job with the given request body. /// - public virtual async Task> InferCancerProfileAsync(WaitUntil waitUntil, OncoPhenotypeData oncoPhenotypeData, CancellationToken cancellationToken = default) + public virtual async Task> InferCancerProfileAsync(WaitUntil waitUntil, OncoPhenotypeData body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(oncoPhenotypeData, nameof(oncoPhenotypeData)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = oncoPhenotypeData.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Operation response = await InferCancerProfileAsync(waitUntil, content, context).ConfigureAwait(false); return ProtocolOperationHelpers.Convert(response, FetchOncoPhenotypeResultsFromOncoPhenotypeResult, ClientDiagnostics, "CancerProfilingClient.InferCancerProfile"); @@ -80,16 +80,16 @@ public virtual async Task> InferCancerProfileAsy /// Create Onco Phenotype job. /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The body of the Onco Phenotype request. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// Creates an Onco Phenotype job with the given request body. /// - public virtual Operation InferCancerProfile(WaitUntil waitUntil, OncoPhenotypeData oncoPhenotypeData, CancellationToken cancellationToken = default) + public virtual Operation InferCancerProfile(WaitUntil waitUntil, OncoPhenotypeData body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(oncoPhenotypeData, nameof(oncoPhenotypeData)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = oncoPhenotypeData.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Operation response = InferCancerProfile(waitUntil, content, context); return ProtocolOperationHelpers.Convert(response, FetchOncoPhenotypeResultsFromOncoPhenotypeResult, ClientDiagnostics, "CancerProfilingClient.InferCancerProfile"); diff --git a/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/src/Generated/Docs/CancerProfilingClient.xml b/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/src/Generated/Docs/CancerProfilingClient.xml index 31f0811326d25..b63b8d60a5515 100644 --- a/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/src/Generated/Docs/CancerProfilingClient.xml +++ b/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/src/Generated/Docs/CancerProfilingClient.xml @@ -9,11 +9,11 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); -OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new PatientRecord[] +OncoPhenotypeData body = new OncoPhenotypeData(new PatientRecord[] { new PatientRecord("") }); -Operation operation = await client.InferCancerProfileAsync(WaitUntil.Completed, oncoPhenotypeData); +Operation operation = await client.InferCancerProfileAsync(WaitUntil.Completed, body); OncoPhenotypeResults responseData = operation.Value; ]]> This sample shows how to call InferCancerProfileAsync with all parameters. @@ -22,7 +22,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); -OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new PatientRecord[] +OncoPhenotypeData body = new OncoPhenotypeData(new PatientRecord[] { new PatientRecord("") { @@ -53,7 +53,7 @@ OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new PatientRecord[] CheckForCancerCase = true, }, }; -Operation operation = await client.InferCancerProfileAsync(WaitUntil.Completed, oncoPhenotypeData); +Operation operation = await client.InferCancerProfileAsync(WaitUntil.Completed, body); OncoPhenotypeResults responseData = operation.Value; ]]> @@ -65,11 +65,11 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); -OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new PatientRecord[] +OncoPhenotypeData body = new OncoPhenotypeData(new PatientRecord[] { new PatientRecord("") }); -Operation operation = client.InferCancerProfile(WaitUntil.Completed, oncoPhenotypeData); +Operation operation = client.InferCancerProfile(WaitUntil.Completed, body); OncoPhenotypeResults responseData = operation.Value; ]]> This sample shows how to call InferCancerProfile with all parameters. @@ -78,7 +78,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); -OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new PatientRecord[] +OncoPhenotypeData body = new OncoPhenotypeData(new PatientRecord[] { new PatientRecord("") { @@ -109,7 +109,7 @@ OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new PatientRecord[] CheckForCancerCase = true, }, }; -Operation operation = client.InferCancerProfile(WaitUntil.Completed, oncoPhenotypeData); +Operation operation = client.InferCancerProfile(WaitUntil.Completed, body); OncoPhenotypeResults responseData = operation.Value; ]]> diff --git a/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/tests/Generated/Samples/Samples_CancerProfilingClient.cs b/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/tests/Generated/Samples/Samples_CancerProfilingClient.cs index 8fc13c5cc0d5d..40ffbfb689a12 100644 --- a/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/tests/Generated/Samples/Samples_CancerProfilingClient.cs +++ b/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/tests/Generated/Samples/Samples_CancerProfilingClient.cs @@ -80,11 +80,11 @@ public void Example_CancerProfilingClient_InferCancerProfile_ShortVersion_Conven AzureKeyCredential credential = new AzureKeyCredential(""); CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); - OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new PatientRecord[] + OncoPhenotypeData body = new OncoPhenotypeData(new PatientRecord[] { new PatientRecord("") }); - Operation operation = client.InferCancerProfile(WaitUntil.Completed, oncoPhenotypeData); + Operation operation = client.InferCancerProfile(WaitUntil.Completed, body); OncoPhenotypeResults responseData = operation.Value; } @@ -96,11 +96,11 @@ public async Task Example_CancerProfilingClient_InferCancerProfile_ShortVersion_ AzureKeyCredential credential = new AzureKeyCredential(""); CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); - OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new PatientRecord[] + OncoPhenotypeData body = new OncoPhenotypeData(new PatientRecord[] { new PatientRecord("") }); - Operation operation = await client.InferCancerProfileAsync(WaitUntil.Completed, oncoPhenotypeData); + Operation operation = await client.InferCancerProfileAsync(WaitUntil.Completed, body); OncoPhenotypeResults responseData = operation.Value; } @@ -274,7 +274,7 @@ public void Example_CancerProfilingClient_InferCancerProfile_AllParameters_Conve AzureKeyCredential credential = new AzureKeyCredential(""); CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); - OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new PatientRecord[] + OncoPhenotypeData body = new OncoPhenotypeData(new PatientRecord[] { new PatientRecord("") { @@ -305,7 +305,7 @@ public void Example_CancerProfilingClient_InferCancerProfile_AllParameters_Conve CheckForCancerCase = true, }, }; - Operation operation = client.InferCancerProfile(WaitUntil.Completed, oncoPhenotypeData); + Operation operation = client.InferCancerProfile(WaitUntil.Completed, body); OncoPhenotypeResults responseData = operation.Value; } @@ -317,7 +317,7 @@ public async Task Example_CancerProfilingClient_InferCancerProfile_AllParameters AzureKeyCredential credential = new AzureKeyCredential(""); CancerProfilingClient client = new CancerProfilingClient(endpoint, credential); - OncoPhenotypeData oncoPhenotypeData = new OncoPhenotypeData(new PatientRecord[] + OncoPhenotypeData body = new OncoPhenotypeData(new PatientRecord[] { new PatientRecord("") { @@ -348,7 +348,7 @@ public async Task Example_CancerProfilingClient_InferCancerProfile_AllParameters CheckForCancerCase = true, }, }; - Operation operation = await client.InferCancerProfileAsync(WaitUntil.Completed, oncoPhenotypeData); + Operation operation = await client.InferCancerProfileAsync(WaitUntil.Completed, body); OncoPhenotypeResults responseData = operation.Value; } } diff --git a/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/tsp-location.yaml b/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/tsp-location.yaml index ab38668a323ea..3a66c5d32b214 100644 --- a/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/tsp-location.yaml +++ b/sdk/healthinsights/Azure.Health.Insights.CancerProfiling/tsp-location.yaml @@ -2,5 +2,5 @@ directory: specification/ai/HealthInsights/HealthInsights.OncoPhenotype/ additionalDirectories: - specification/ai/HealthInsights/HealthInsights.OpenAPI/ - specification/ai/HealthInsights/HealthInsights.Common/ -commit: e367672ea9422797ec90bfdf21a9434218359311 +commit: 65d7c0b79602bead9d477a756882b44391920776 repo: azure/azure-rest-api-specs diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/api/Azure.Health.Insights.ClinicalMatching.netstandard2.0.cs b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/api/Azure.Health.Insights.ClinicalMatching.netstandard2.0.cs index e81ce2952bab1..19fb61ce1ea00 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/api/Azure.Health.Insights.ClinicalMatching.netstandard2.0.cs +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/api/Azure.Health.Insights.ClinicalMatching.netstandard2.0.cs @@ -107,9 +107,9 @@ public ClinicalMatchingClient(System.Uri endpoint, Azure.AzureKeyCredential cred public ClinicalMatchingClient(System.Uri endpoint, Azure.AzureKeyCredential credential, Azure.Health.Insights.ClinicalMatching.ClinicalMatchingClientOptions options) { } public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } public virtual Azure.Operation MatchTrials(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Operation MatchTrials(Azure.WaitUntil waitUntil, Azure.Health.Insights.ClinicalMatching.TrialMatcherData trialMatcherData, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation MatchTrials(Azure.WaitUntil waitUntil, Azure.Health.Insights.ClinicalMatching.TrialMatcherData body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> MatchTrialsAsync(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> MatchTrialsAsync(Azure.WaitUntil waitUntil, Azure.Health.Insights.ClinicalMatching.TrialMatcherData trialMatcherData, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> MatchTrialsAsync(Azure.WaitUntil waitUntil, Azure.Health.Insights.ClinicalMatching.TrialMatcherData body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class ClinicalMatchingClientOptions : Azure.Core.ClientOptions { diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalMatchingClient.cs b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalMatchingClient.cs index ac18d4c935c5f..11c3bbbe75e69 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalMatchingClient.cs +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/ClinicalMatchingClient.cs @@ -63,16 +63,16 @@ public ClinicalMatchingClient(Uri endpoint, AzureKeyCredential credential, Clini /// Create Trial Matcher job. /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The body of the Trial Matcher request. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// Creates a Trial Matcher job with the given request body. /// - public virtual async Task> MatchTrialsAsync(WaitUntil waitUntil, TrialMatcherData trialMatcherData, CancellationToken cancellationToken = default) + public virtual async Task> MatchTrialsAsync(WaitUntil waitUntil, TrialMatcherData body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(trialMatcherData, nameof(trialMatcherData)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = trialMatcherData.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Operation response = await MatchTrialsAsync(waitUntil, content, context).ConfigureAwait(false); return ProtocolOperationHelpers.Convert(response, FetchTrialMatcherResultsFromTrialMatcherResult, ClientDiagnostics, "ClinicalMatchingClient.MatchTrials"); @@ -80,16 +80,16 @@ public virtual async Task> MatchTrialsAsync(WaitU /// Create Trial Matcher job. /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The body of the Trial Matcher request. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// Creates a Trial Matcher job with the given request body. /// - public virtual Operation MatchTrials(WaitUntil waitUntil, TrialMatcherData trialMatcherData, CancellationToken cancellationToken = default) + public virtual Operation MatchTrials(WaitUntil waitUntil, TrialMatcherData body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(trialMatcherData, nameof(trialMatcherData)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = trialMatcherData.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Operation response = MatchTrials(waitUntil, content, context); return ProtocolOperationHelpers.Convert(response, FetchTrialMatcherResultsFromTrialMatcherResult, ClientDiagnostics, "ClinicalMatchingClient.MatchTrials"); diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/Docs/ClinicalMatchingClient.xml b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/Docs/ClinicalMatchingClient.xml index fe2bf75b18923..7ca422550f1de 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/Docs/ClinicalMatchingClient.xml +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/src/Generated/Docs/ClinicalMatchingClient.xml @@ -9,11 +9,11 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); -TrialMatcherData trialMatcherData = new TrialMatcherData(new PatientRecord[] +TrialMatcherData body = new TrialMatcherData(new PatientRecord[] { new PatientRecord("") }); -Operation operation = await client.MatchTrialsAsync(WaitUntil.Completed, trialMatcherData); +Operation operation = await client.MatchTrialsAsync(WaitUntil.Completed, body); TrialMatcherResults responseData = operation.Value; ]]> This sample shows how to call MatchTrialsAsync with all parameters. @@ -22,7 +22,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); -TrialMatcherData trialMatcherData = new TrialMatcherData(new PatientRecord[] +TrialMatcherData body = new TrialMatcherData(new PatientRecord[] { new PatientRecord("") { @@ -101,7 +101,7 @@ TrialMatcherData trialMatcherData = new TrialMatcherData(new PatientRecord[] IncludeEvidence = true, }, }; -Operation operation = await client.MatchTrialsAsync(WaitUntil.Completed, trialMatcherData); +Operation operation = await client.MatchTrialsAsync(WaitUntil.Completed, body); TrialMatcherResults responseData = operation.Value; ]]> @@ -113,11 +113,11 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); -TrialMatcherData trialMatcherData = new TrialMatcherData(new PatientRecord[] +TrialMatcherData body = new TrialMatcherData(new PatientRecord[] { new PatientRecord("") }); -Operation operation = client.MatchTrials(WaitUntil.Completed, trialMatcherData); +Operation operation = client.MatchTrials(WaitUntil.Completed, body); TrialMatcherResults responseData = operation.Value; ]]> This sample shows how to call MatchTrials with all parameters. @@ -126,7 +126,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); -TrialMatcherData trialMatcherData = new TrialMatcherData(new PatientRecord[] +TrialMatcherData body = new TrialMatcherData(new PatientRecord[] { new PatientRecord("") { @@ -205,7 +205,7 @@ TrialMatcherData trialMatcherData = new TrialMatcherData(new PatientRecord[] IncludeEvidence = true, }, }; -Operation operation = client.MatchTrials(WaitUntil.Completed, trialMatcherData); +Operation operation = client.MatchTrials(WaitUntil.Completed, body); TrialMatcherResults responseData = operation.Value; ]]> diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/tests/Generated/Samples/Samples_ClinicalMatchingClient.cs b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/tests/Generated/Samples/Samples_ClinicalMatchingClient.cs index 41d7a61b7e042..577fbde92ab92 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/tests/Generated/Samples/Samples_ClinicalMatchingClient.cs +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/tests/Generated/Samples/Samples_ClinicalMatchingClient.cs @@ -80,11 +80,11 @@ public void Example_ClinicalMatchingClient_MatchTrials_ShortVersion_Convenience( AzureKeyCredential credential = new AzureKeyCredential(""); ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); - TrialMatcherData trialMatcherData = new TrialMatcherData(new PatientRecord[] + TrialMatcherData body = new TrialMatcherData(new PatientRecord[] { new PatientRecord("") }); - Operation operation = client.MatchTrials(WaitUntil.Completed, trialMatcherData); + Operation operation = client.MatchTrials(WaitUntil.Completed, body); TrialMatcherResults responseData = operation.Value; } @@ -96,11 +96,11 @@ public async Task Example_ClinicalMatchingClient_MatchTrials_ShortVersion_Conven AzureKeyCredential credential = new AzureKeyCredential(""); ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); - TrialMatcherData trialMatcherData = new TrialMatcherData(new PatientRecord[] + TrialMatcherData body = new TrialMatcherData(new PatientRecord[] { new PatientRecord("") }); - Operation operation = await client.MatchTrialsAsync(WaitUntil.Completed, trialMatcherData); + Operation operation = await client.MatchTrialsAsync(WaitUntil.Completed, body); TrialMatcherResults responseData = operation.Value; } @@ -566,7 +566,7 @@ public void Example_ClinicalMatchingClient_MatchTrials_AllParameters_Convenience AzureKeyCredential credential = new AzureKeyCredential(""); ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); - TrialMatcherData trialMatcherData = new TrialMatcherData(new PatientRecord[] + TrialMatcherData body = new TrialMatcherData(new PatientRecord[] { new PatientRecord("") { @@ -645,7 +645,7 @@ public void Example_ClinicalMatchingClient_MatchTrials_AllParameters_Convenience IncludeEvidence = true, }, }; - Operation operation = client.MatchTrials(WaitUntil.Completed, trialMatcherData); + Operation operation = client.MatchTrials(WaitUntil.Completed, body); TrialMatcherResults responseData = operation.Value; } @@ -657,7 +657,7 @@ public async Task Example_ClinicalMatchingClient_MatchTrials_AllParameters_Conve AzureKeyCredential credential = new AzureKeyCredential(""); ClinicalMatchingClient client = new ClinicalMatchingClient(endpoint, credential); - TrialMatcherData trialMatcherData = new TrialMatcherData(new PatientRecord[] + TrialMatcherData body = new TrialMatcherData(new PatientRecord[] { new PatientRecord("") { @@ -736,7 +736,7 @@ public async Task Example_ClinicalMatchingClient_MatchTrials_AllParameters_Conve IncludeEvidence = true, }, }; - Operation operation = await client.MatchTrialsAsync(WaitUntil.Completed, trialMatcherData); + Operation operation = await client.MatchTrialsAsync(WaitUntil.Completed, body); TrialMatcherResults responseData = operation.Value; } } diff --git a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/tsp-location.yaml b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/tsp-location.yaml index 4d9680fdb9e0e..54e364fd83e51 100644 --- a/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/tsp-location.yaml +++ b/sdk/healthinsights/Azure.Health.Insights.ClinicalMatching/tsp-location.yaml @@ -2,5 +2,5 @@ directory: specification/ai/HealthInsights/HealthInsights.TrialMatcher/ additionalDirectories: - specification/ai/HealthInsights/HealthInsights.OpenAPI/ - specification/ai/HealthInsights/HealthInsights.Common/ -commit: e367672ea9422797ec90bfdf21a9434218359311 +commit: 65d7c0b79602bead9d477a756882b44391920776 repo: azure/azure-rest-api-specs diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/api/Azure.Health.Insights.RadiologyInsights.netstandard2.0.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/api/Azure.Health.Insights.RadiologyInsights.netstandard2.0.cs index 2ac6f287a2c40..f9b50f67753ba 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/api/Azure.Health.Insights.RadiologyInsights.netstandard2.0.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/api/Azure.Health.Insights.RadiologyInsights.netstandard2.0.cs @@ -924,9 +924,9 @@ public RadiologyInsightsClient(System.Uri endpoint, Azure.AzureKeyCredential cre public RadiologyInsightsClient(System.Uri endpoint, Azure.AzureKeyCredential credential, Azure.Health.Insights.RadiologyInsights.RadiologyInsightsClientOptions options) { } public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } public virtual Azure.Operation InferRadiologyInsights(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Operation InferRadiologyInsights(Azure.WaitUntil waitUntil, Azure.Health.Insights.RadiologyInsights.RadiologyInsightsData radiologyInsightsData, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Operation InferRadiologyInsights(Azure.WaitUntil waitUntil, Azure.Health.Insights.RadiologyInsights.RadiologyInsightsData body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> InferRadiologyInsightsAsync(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> InferRadiologyInsightsAsync(Azure.WaitUntil waitUntil, Azure.Health.Insights.RadiologyInsights.RadiologyInsightsData radiologyInsightsData, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> InferRadiologyInsightsAsync(Azure.WaitUntil waitUntil, Azure.Health.Insights.RadiologyInsights.RadiologyInsightsData body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class RadiologyInsightsClientOptions : Azure.Core.ClientOptions { diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/Docs/RadiologyInsightsClient.xml b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/Docs/RadiologyInsightsClient.xml index 6dde626f5ba70..2a494042bba1d 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/Docs/RadiologyInsightsClient.xml +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/Docs/RadiologyInsightsClient.xml @@ -9,11 +9,11 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); RadiologyInsightsClient client = new RadiologyInsightsClient(endpoint, credential); -RadiologyInsightsData radiologyInsightsData = new RadiologyInsightsData(new PatientRecord[] +RadiologyInsightsData body = new RadiologyInsightsData(new PatientRecord[] { new PatientRecord("") }); -Operation operation = await client.InferRadiologyInsightsAsync(WaitUntil.Completed, radiologyInsightsData); +Operation operation = await client.InferRadiologyInsightsAsync(WaitUntil.Completed, body); RadiologyInsightsInferenceResult responseData = operation.Value; ]]> This sample shows how to call InferRadiologyInsightsAsync with all parameters. @@ -22,7 +22,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); RadiologyInsightsClient client = new RadiologyInsightsClient(endpoint, credential); -RadiologyInsightsData radiologyInsightsData = new RadiologyInsightsData(new PatientRecord[] +RadiologyInsightsData body = new RadiologyInsightsData(new PatientRecord[] { new PatientRecord("") { @@ -184,7 +184,7 @@ RadiologyInsightsData radiologyInsightsData = new RadiologyInsightsData(new Pati Locale = "", }, }; -Operation operation = await client.InferRadiologyInsightsAsync(WaitUntil.Completed, radiologyInsightsData); +Operation operation = await client.InferRadiologyInsightsAsync(WaitUntil.Completed, body); RadiologyInsightsInferenceResult responseData = operation.Value; ]]> @@ -196,11 +196,11 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); RadiologyInsightsClient client = new RadiologyInsightsClient(endpoint, credential); -RadiologyInsightsData radiologyInsightsData = new RadiologyInsightsData(new PatientRecord[] +RadiologyInsightsData body = new RadiologyInsightsData(new PatientRecord[] { new PatientRecord("") }); -Operation operation = client.InferRadiologyInsights(WaitUntil.Completed, radiologyInsightsData); +Operation operation = client.InferRadiologyInsights(WaitUntil.Completed, body); RadiologyInsightsInferenceResult responseData = operation.Value; ]]> This sample shows how to call InferRadiologyInsights with all parameters. @@ -209,7 +209,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); RadiologyInsightsClient client = new RadiologyInsightsClient(endpoint, credential); -RadiologyInsightsData radiologyInsightsData = new RadiologyInsightsData(new PatientRecord[] +RadiologyInsightsData body = new RadiologyInsightsData(new PatientRecord[] { new PatientRecord("") { @@ -371,7 +371,7 @@ RadiologyInsightsData radiologyInsightsData = new RadiologyInsightsData(new Pati Locale = "", }, }; -Operation operation = client.InferRadiologyInsights(WaitUntil.Completed, radiologyInsightsData); +Operation operation = client.InferRadiologyInsights(WaitUntil.Completed, body); RadiologyInsightsInferenceResult responseData = operation.Value; ]]> diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyInsightsClient.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyInsightsClient.cs index 551dfac381e8a..27d41cb07b50a 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyInsightsClient.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/src/Generated/RadiologyInsightsClient.cs @@ -63,16 +63,16 @@ public RadiologyInsightsClient(Uri endpoint, AzureKeyCredential credential, Radi /// Create Radiology Insights job. /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Contains the list of patients, and configuration data. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// Creates a Radiology Insights job with the given request body. /// - public virtual async Task> InferRadiologyInsightsAsync(WaitUntil waitUntil, RadiologyInsightsData radiologyInsightsData, CancellationToken cancellationToken = default) + public virtual async Task> InferRadiologyInsightsAsync(WaitUntil waitUntil, RadiologyInsightsData body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(radiologyInsightsData, nameof(radiologyInsightsData)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = radiologyInsightsData.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Operation response = await InferRadiologyInsightsAsync(waitUntil, content, context).ConfigureAwait(false); return ProtocolOperationHelpers.Convert(response, FetchRadiologyInsightsInferenceResultFromRadiologyInsightsResult, ClientDiagnostics, "RadiologyInsightsClient.InferRadiologyInsights"); @@ -80,16 +80,16 @@ public virtual async Task> InferRadi /// Create Radiology Insights job. /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Contains the list of patients, and configuration data. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// Creates a Radiology Insights job with the given request body. /// - public virtual Operation InferRadiologyInsights(WaitUntil waitUntil, RadiologyInsightsData radiologyInsightsData, CancellationToken cancellationToken = default) + public virtual Operation InferRadiologyInsights(WaitUntil waitUntil, RadiologyInsightsData body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(radiologyInsightsData, nameof(radiologyInsightsData)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = radiologyInsightsData.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Operation response = InferRadiologyInsights(waitUntil, content, context); return ProtocolOperationHelpers.Convert(response, FetchRadiologyInsightsInferenceResultFromRadiologyInsightsResult, ClientDiagnostics, "RadiologyInsightsClient.InferRadiologyInsights"); diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/tests/Generated/Samples/Samples_RadiologyInsightsClient.cs b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/tests/Generated/Samples/Samples_RadiologyInsightsClient.cs index 081e2164520c4..e797214f80d27 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/tests/Generated/Samples/Samples_RadiologyInsightsClient.cs +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/tests/Generated/Samples/Samples_RadiologyInsightsClient.cs @@ -79,11 +79,11 @@ public void Example_RadiologyInsightsClient_InferRadiologyInsights_ShortVersion_ AzureKeyCredential credential = new AzureKeyCredential(""); RadiologyInsightsClient client = new RadiologyInsightsClient(endpoint, credential); - RadiologyInsightsData radiologyInsightsData = new RadiologyInsightsData(new PatientRecord[] + RadiologyInsightsData body = new RadiologyInsightsData(new PatientRecord[] { new PatientRecord("") }); - Operation operation = client.InferRadiologyInsights(WaitUntil.Completed, radiologyInsightsData); + Operation operation = client.InferRadiologyInsights(WaitUntil.Completed, body); RadiologyInsightsInferenceResult responseData = operation.Value; } @@ -95,11 +95,11 @@ public async Task Example_RadiologyInsightsClient_InferRadiologyInsights_ShortVe AzureKeyCredential credential = new AzureKeyCredential(""); RadiologyInsightsClient client = new RadiologyInsightsClient(endpoint, credential); - RadiologyInsightsData radiologyInsightsData = new RadiologyInsightsData(new PatientRecord[] + RadiologyInsightsData body = new RadiologyInsightsData(new PatientRecord[] { new PatientRecord("") }); - Operation operation = await client.InferRadiologyInsightsAsync(WaitUntil.Completed, radiologyInsightsData); + Operation operation = await client.InferRadiologyInsightsAsync(WaitUntil.Completed, body); RadiologyInsightsInferenceResult responseData = operation.Value; } @@ -767,7 +767,7 @@ public void Example_RadiologyInsightsClient_InferRadiologyInsights_AllParameters AzureKeyCredential credential = new AzureKeyCredential(""); RadiologyInsightsClient client = new RadiologyInsightsClient(endpoint, credential); - RadiologyInsightsData radiologyInsightsData = new RadiologyInsightsData(new PatientRecord[] + RadiologyInsightsData body = new RadiologyInsightsData(new PatientRecord[] { new PatientRecord("") { @@ -929,7 +929,7 @@ public void Example_RadiologyInsightsClient_InferRadiologyInsights_AllParameters Locale = "", }, }; - Operation operation = client.InferRadiologyInsights(WaitUntil.Completed, radiologyInsightsData); + Operation operation = client.InferRadiologyInsights(WaitUntil.Completed, body); RadiologyInsightsInferenceResult responseData = operation.Value; } @@ -941,7 +941,7 @@ public async Task Example_RadiologyInsightsClient_InferRadiologyInsights_AllPara AzureKeyCredential credential = new AzureKeyCredential(""); RadiologyInsightsClient client = new RadiologyInsightsClient(endpoint, credential); - RadiologyInsightsData radiologyInsightsData = new RadiologyInsightsData(new PatientRecord[] + RadiologyInsightsData body = new RadiologyInsightsData(new PatientRecord[] { new PatientRecord("") { @@ -1103,7 +1103,7 @@ public async Task Example_RadiologyInsightsClient_InferRadiologyInsights_AllPara Locale = "", }, }; - Operation operation = await client.InferRadiologyInsightsAsync(WaitUntil.Completed, radiologyInsightsData); + Operation operation = await client.InferRadiologyInsightsAsync(WaitUntil.Completed, body); RadiologyInsightsInferenceResult responseData = operation.Value; } } diff --git a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/tsp-location.yaml b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/tsp-location.yaml index 37e66aa71dbb5..6f0e45068e5f9 100644 --- a/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/tsp-location.yaml +++ b/sdk/healthinsights/Azure.Health.Insights.RadiologyInsights/tsp-location.yaml @@ -2,6 +2,6 @@ directory: specification/ai/HealthInsights/HealthInsights.RadiologyInsights additionalDirectories: - specification/ai/HealthInsights/HealthInsights.OpenAPI - specification/ai/HealthInsights/HealthInsights.Common -commit: bfdee1b8c641c2c6dea1fca78490e3ab429c5717 +commit: f33a6a43080101f1989a1c6e6ea00bb06eea5210 repo: Azure/azure-rest-api-specs cleanup: false diff --git a/sdk/openai/Azure.AI.OpenAI.Assistants/api/Azure.AI.OpenAI.Assistants.netstandard2.0.cs b/sdk/openai/Azure.AI.OpenAI.Assistants/api/Azure.AI.OpenAI.Assistants.netstandard2.0.cs index 866aa2384dcd4..93b0eae8220af 100644 --- a/sdk/openai/Azure.AI.OpenAI.Assistants/api/Azure.AI.OpenAI.Assistants.netstandard2.0.cs +++ b/sdk/openai/Azure.AI.OpenAI.Assistants/api/Azure.AI.OpenAI.Assistants.netstandard2.0.cs @@ -58,19 +58,19 @@ public AssistantsClient(System.Uri endpoint, Azure.Core.TokenCredential tokenCre public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } public virtual Azure.Response CancelRun(string threadId, string runId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CancelRunAsync(string threadId, string runId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateAssistant(Azure.AI.OpenAI.Assistants.AssistantCreationOptions assistantCreationOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateAssistantAsync(Azure.AI.OpenAI.Assistants.AssistantCreationOptions assistantCreationOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateAssistant(Azure.AI.OpenAI.Assistants.AssistantCreationOptions body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateAssistantAsync(Azure.AI.OpenAI.Assistants.AssistantCreationOptions body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateMessage(string threadId, Azure.AI.OpenAI.Assistants.MessageRole role, string content, System.Collections.Generic.IEnumerable fileIds = null, System.Collections.Generic.IDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateMessageAsync(string threadId, Azure.AI.OpenAI.Assistants.MessageRole role, string content, System.Collections.Generic.IEnumerable fileIds = null, System.Collections.Generic.IDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateRun(Azure.AI.OpenAI.Assistants.AssistantThread thread, Azure.AI.OpenAI.Assistants.Assistant assistant, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateRun(string threadId, Azure.AI.OpenAI.Assistants.CreateRunOptions createRunOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateRunAsync(Azure.AI.OpenAI.Assistants.AssistantThread thread, Azure.AI.OpenAI.Assistants.Assistant assistant, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateRunAsync(string threadId, Azure.AI.OpenAI.Assistants.CreateRunOptions createRunOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateThread(Azure.AI.OpenAI.Assistants.AssistantThreadCreationOptions assistantThreadCreationOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateThread(Azure.AI.OpenAI.Assistants.AssistantThreadCreationOptions body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateThread(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateThreadAndRun(Azure.AI.OpenAI.Assistants.CreateAndRunThreadOptions createAndRunThreadOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateThreadAndRunAsync(Azure.AI.OpenAI.Assistants.CreateAndRunThreadOptions createAndRunThreadOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateThreadAsync(Azure.AI.OpenAI.Assistants.AssistantThreadCreationOptions assistantThreadCreationOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateThreadAndRun(Azure.AI.OpenAI.Assistants.CreateAndRunThreadOptions body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateThreadAndRunAsync(Azure.AI.OpenAI.Assistants.CreateAndRunThreadOptions body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateThreadAsync(Azure.AI.OpenAI.Assistants.AssistantThreadCreationOptions body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateThreadAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response DeleteAssistant(string assistantId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> DeleteAssistantAsync(string assistantId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -120,8 +120,8 @@ public AssistantsClient(System.Uri endpoint, Azure.Core.TokenCredential tokenCre public virtual System.Threading.Tasks.Task> SubmitToolOutputsToRunAsync(string threadId, string runId, System.Collections.Generic.IEnumerable toolOutputs, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response UnlinkAssistantFile(string assistantId, string fileId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UnlinkAssistantFileAsync(string assistantId, string fileId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response UpdateAssistant(string assistantId, Azure.AI.OpenAI.Assistants.UpdateAssistantOptions updateAssistantOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAssistantAsync(string assistantId, Azure.AI.OpenAI.Assistants.UpdateAssistantOptions updateAssistantOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response UpdateAssistant(string assistantId, Azure.AI.OpenAI.Assistants.UpdateAssistantOptions body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAssistantAsync(string assistantId, Azure.AI.OpenAI.Assistants.UpdateAssistantOptions body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response UpdateMessage(string threadId, string messageId, System.Collections.Generic.IDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateMessageAsync(string threadId, string messageId, System.Collections.Generic.IDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response UpdateRun(string threadId, string runId, System.Collections.Generic.IDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } diff --git a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/AssistantsClient.cs b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/AssistantsClient.cs index 5fac23f167008..acde6fbb7e646 100644 --- a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/AssistantsClient.cs +++ b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/AssistantsClient.cs @@ -39,28 +39,28 @@ protected AssistantsClient() } /// Creates a new assistant. - /// The request details to use when creating a new assistant. + /// Body parameter. /// The cancellation token to use. - /// is null. - public virtual async Task> CreateAssistantAsync(AssistantCreationOptions assistantCreationOptions, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> CreateAssistantAsync(AssistantCreationOptions body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(assistantCreationOptions, nameof(assistantCreationOptions)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = assistantCreationOptions.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await CreateAssistantAsync(content, context).ConfigureAwait(false); return Response.FromValue(Assistant.FromResponse(response), response); } /// Creates a new assistant. - /// The request details to use when creating a new assistant. + /// Body parameter. /// The cancellation token to use. - /// is null. - public virtual Response CreateAssistant(AssistantCreationOptions assistantCreationOptions, CancellationToken cancellationToken = default) + /// is null. + public virtual Response CreateAssistant(AssistantCreationOptions body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(assistantCreationOptions, nameof(assistantCreationOptions)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = assistantCreationOptions.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = CreateAssistant(content, context); return Response.FromValue(Assistant.FromResponse(response), response); @@ -332,16 +332,16 @@ internal virtual Response GetAssistant(string assistantId, RequestContext contex /// Modifies an existing assistant. /// The ID of the assistant to modify. - /// The request details to use when modifying an existing assistant. + /// Body parameter. /// The cancellation token to use. - /// or is null. + /// or is null. /// is an empty string, and was expected to be non-empty. - public virtual async Task> UpdateAssistantAsync(string assistantId, UpdateAssistantOptions updateAssistantOptions, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAssistantAsync(string assistantId, UpdateAssistantOptions body, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); - Argument.AssertNotNull(updateAssistantOptions, nameof(updateAssistantOptions)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = updateAssistantOptions.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await UpdateAssistantAsync(assistantId, content, context).ConfigureAwait(false); return Response.FromValue(Assistant.FromResponse(response), response); @@ -349,16 +349,16 @@ public virtual async Task> UpdateAssistantAsync(string assis /// Modifies an existing assistant. /// The ID of the assistant to modify. - /// The request details to use when modifying an existing assistant. + /// Body parameter. /// The cancellation token to use. - /// or is null. + /// or is null. /// is an empty string, and was expected to be non-empty. - public virtual Response UpdateAssistant(string assistantId, UpdateAssistantOptions updateAssistantOptions, CancellationToken cancellationToken = default) + public virtual Response UpdateAssistant(string assistantId, UpdateAssistantOptions body, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); - Argument.AssertNotNull(updateAssistantOptions, nameof(updateAssistantOptions)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = updateAssistantOptions.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = UpdateAssistant(assistantId, content, context); return Response.FromValue(Assistant.FromResponse(response), response); @@ -997,28 +997,28 @@ internal virtual Response InternalUnlinkAssistantFile(string assistantId, string } /// Creates a new thread. Threads contain messages and can be run by assistants. - /// The details used to create a new assistant thread. + /// Body parameter. /// The cancellation token to use. - /// is null. - public virtual async Task> CreateThreadAsync(AssistantThreadCreationOptions assistantThreadCreationOptions, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> CreateThreadAsync(AssistantThreadCreationOptions body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(assistantThreadCreationOptions, nameof(assistantThreadCreationOptions)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = assistantThreadCreationOptions.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await CreateThreadAsync(content, context).ConfigureAwait(false); return Response.FromValue(AssistantThread.FromResponse(response), response); } /// Creates a new thread. Threads contain messages and can be run by assistants. - /// The details used to create a new assistant thread. + /// Body parameter. /// The cancellation token to use. - /// is null. - public virtual Response CreateThread(AssistantThreadCreationOptions assistantThreadCreationOptions, CancellationToken cancellationToken = default) + /// is null. + public virtual Response CreateThread(AssistantThreadCreationOptions body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(assistantThreadCreationOptions, nameof(assistantThreadCreationOptions)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = assistantThreadCreationOptions.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = CreateThread(content, context); return Response.FromValue(AssistantThread.FromResponse(response), response); @@ -2751,28 +2751,28 @@ internal virtual Response CancelRun(string threadId, string runId, RequestContex } /// Creates a new assistant thread and immediately starts a run using that new thread. - /// The details used when creating and immediately running a new assistant thread. + /// Body parameter. /// The cancellation token to use. - /// is null. - public virtual async Task> CreateThreadAndRunAsync(CreateAndRunThreadOptions createAndRunThreadOptions, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> CreateThreadAndRunAsync(CreateAndRunThreadOptions body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(createAndRunThreadOptions, nameof(createAndRunThreadOptions)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = createAndRunThreadOptions.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await CreateThreadAndRunAsync(content, context).ConfigureAwait(false); return Response.FromValue(ThreadRun.FromResponse(response), response); } /// Creates a new assistant thread and immediately starts a run using that new thread. - /// The details used when creating and immediately running a new assistant thread. + /// Body parameter. /// The cancellation token to use. - /// is null. - public virtual Response CreateThreadAndRun(CreateAndRunThreadOptions createAndRunThreadOptions, CancellationToken cancellationToken = default) + /// is null. + public virtual Response CreateThreadAndRun(CreateAndRunThreadOptions body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(createAndRunThreadOptions, nameof(createAndRunThreadOptions)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = createAndRunThreadOptions.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = CreateThreadAndRun(content, context); return Response.FromValue(ThreadRun.FromResponse(response), response); diff --git a/sdk/openai/Azure.AI.OpenAI.Assistants/tsp-location.yaml b/sdk/openai/Azure.AI.OpenAI.Assistants/tsp-location.yaml index b0ae317718fb8..58f812caec89c 100644 --- a/sdk/openai/Azure.AI.OpenAI.Assistants/tsp-location.yaml +++ b/sdk/openai/Azure.AI.OpenAI.Assistants/tsp-location.yaml @@ -1,3 +1,3 @@ directory: specification/ai/OpenAI.Assistants -commit: 1fe785dc9b49c48088a9d11db023eee07dd168e7 +commit: 4fef3a8d819f8fc8eef6a3b68320f710e666b72a repo: Azure/azure-rest-api-specs diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/api/Azure.Analytics.Purview.DataMap.netstandard2.0.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/api/Azure.Analytics.Purview.DataMap.netstandard2.0.cs index 8e40619b670c9..5cf2cc1999adc 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/api/Azure.Analytics.Purview.DataMap.netstandard2.0.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/api/Azure.Analytics.Purview.DataMap.netstandard2.0.cs @@ -1001,26 +1001,26 @@ public partial class Discovery { protected Discovery() { } public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } - public virtual Azure.Response AutoComplete(Azure.Analytics.Purview.DataMap.AutoCompleteConfig autoCompleteConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response AutoComplete(Azure.Analytics.Purview.DataMap.AutoCompleteConfig body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response AutoComplete(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> AutoCompleteAsync(Azure.Analytics.Purview.DataMap.AutoCompleteConfig autoCompleteConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AutoCompleteAsync(Azure.Analytics.Purview.DataMap.AutoCompleteConfig body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task AutoCompleteAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response Query(Azure.Analytics.Purview.DataMap.QueryConfig queryConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Query(Azure.Analytics.Purview.DataMap.QueryConfig body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Query(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> QueryAsync(Azure.Analytics.Purview.DataMap.QueryConfig queryConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> QueryAsync(Azure.Analytics.Purview.DataMap.QueryConfig body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task QueryAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response Suggest(Azure.Analytics.Purview.DataMap.SuggestConfig suggestConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Suggest(Azure.Analytics.Purview.DataMap.SuggestConfig body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Suggest(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> SuggestAsync(Azure.Analytics.Purview.DataMap.SuggestConfig suggestConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SuggestAsync(Azure.Analytics.Purview.DataMap.SuggestConfig body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task SuggestAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } } public partial class Entity { protected Entity() { } public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } - public virtual Azure.Response AddClassification(Azure.Analytics.Purview.DataMap.ClassificationAssociateConfig classificationAssociateConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response AddClassification(Azure.Analytics.Purview.DataMap.ClassificationAssociateConfig body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response AddClassification(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task AddClassificationAsync(Azure.Analytics.Purview.DataMap.ClassificationAssociateConfig classificationAssociateConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task AddClassificationAsync(Azure.Analytics.Purview.DataMap.ClassificationAssociateConfig body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task AddClassificationAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response AddClassifications(string guid, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response AddClassifications(string guid, System.Collections.Generic.IEnumerable body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1046,9 +1046,9 @@ protected Entity() { } public virtual Azure.Response AddOrUpdateBusinessMetadataAttributes(string guid, string businessMetadataName, System.Collections.Generic.IDictionary body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task AddOrUpdateBusinessMetadataAttributesAsync(string guid, string businessMetadataName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task AddOrUpdateBusinessMetadataAttributesAsync(string guid, string businessMetadataName, System.Collections.Generic.IDictionary body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response BatchCreateOrUpdate(Azure.Analytics.Purview.DataMap.AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo, string collectionId = null, Azure.Analytics.Purview.DataMap.BusinessAttributeUpdateBehavior? businessAttributeUpdateBehavior = default(Azure.Analytics.Purview.DataMap.BusinessAttributeUpdateBehavior?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response BatchCreateOrUpdate(Azure.Analytics.Purview.DataMap.AtlasEntitiesWithExtInfo body, string collectionId = null, Azure.Analytics.Purview.DataMap.BusinessAttributeUpdateBehavior? businessAttributeUpdateBehavior = default(Azure.Analytics.Purview.DataMap.BusinessAttributeUpdateBehavior?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response BatchCreateOrUpdate(Azure.Core.RequestContent content, string collectionId = null, string businessAttributeUpdateBehavior = null, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> BatchCreateOrUpdateAsync(Azure.Analytics.Purview.DataMap.AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo, string collectionId = null, Azure.Analytics.Purview.DataMap.BusinessAttributeUpdateBehavior? businessAttributeUpdateBehavior = default(Azure.Analytics.Purview.DataMap.BusinessAttributeUpdateBehavior?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> BatchCreateOrUpdateAsync(Azure.Analytics.Purview.DataMap.AtlasEntitiesWithExtInfo body, string collectionId = null, Azure.Analytics.Purview.DataMap.BusinessAttributeUpdateBehavior? businessAttributeUpdateBehavior = default(Azure.Analytics.Purview.DataMap.BusinessAttributeUpdateBehavior?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task BatchCreateOrUpdateAsync(Azure.Core.RequestContent content, string collectionId = null, string businessAttributeUpdateBehavior = null, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response BatchDelete(System.Collections.Generic.IEnumerable guid, Azure.RequestContext context) { throw null; } public virtual Azure.Response BatchDelete(System.Collections.Generic.IEnumerable guid, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1058,13 +1058,13 @@ protected Entity() { } public virtual Azure.Response BatchGetByUniqueAttributes(string typeName, bool? minExtInfo = default(bool?), bool? ignoreRelationships = default(bool?), string attrNQualifiedName = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task BatchGetByUniqueAttributesAsync(string typeName, bool? minExtInfo, bool? ignoreRelationships, string attrNQualifiedName, Azure.RequestContext context) { throw null; } public virtual System.Threading.Tasks.Task> BatchGetByUniqueAttributesAsync(string typeName, bool? minExtInfo = default(bool?), bool? ignoreRelationships = default(bool?), string attrNQualifiedName = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response> BatchSetClassifications(Azure.Analytics.Purview.DataMap.AtlasEntityHeaders atlasEntityHeaders, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response> BatchSetClassifications(Azure.Analytics.Purview.DataMap.AtlasEntityHeaders body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response BatchSetClassifications(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task>> BatchSetClassificationsAsync(Azure.Analytics.Purview.DataMap.AtlasEntityHeaders atlasEntityHeaders, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task>> BatchSetClassificationsAsync(Azure.Analytics.Purview.DataMap.AtlasEntityHeaders body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task BatchSetClassificationsAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response CreateOrUpdate(Azure.Analytics.Purview.DataMap.AtlasEntityWithExtInfo atlasEntityWithExtInfo, Azure.Analytics.Purview.DataMap.BusinessAttributeUpdateBehavior? businessAttributeUpdateBehavior = default(Azure.Analytics.Purview.DataMap.BusinessAttributeUpdateBehavior?), string collectionId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateOrUpdate(Azure.Analytics.Purview.DataMap.AtlasEntityWithExtInfo body, Azure.Analytics.Purview.DataMap.BusinessAttributeUpdateBehavior? businessAttributeUpdateBehavior = default(Azure.Analytics.Purview.DataMap.BusinessAttributeUpdateBehavior?), string collectionId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateOrUpdate(Azure.Core.RequestContent content, string businessAttributeUpdateBehavior = null, string collectionId = null, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.Analytics.Purview.DataMap.AtlasEntityWithExtInfo atlasEntityWithExtInfo, Azure.Analytics.Purview.DataMap.BusinessAttributeUpdateBehavior? businessAttributeUpdateBehavior = default(Azure.Analytics.Purview.DataMap.BusinessAttributeUpdateBehavior?), string collectionId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.Analytics.Purview.DataMap.AtlasEntityWithExtInfo body, Azure.Analytics.Purview.DataMap.BusinessAttributeUpdateBehavior? businessAttributeUpdateBehavior = default(Azure.Analytics.Purview.DataMap.BusinessAttributeUpdateBehavior?), string collectionId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task CreateOrUpdateAsync(Azure.Core.RequestContent content, string businessAttributeUpdateBehavior = null, string collectionId = null, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response Delete(string guid, Azure.RequestContext context) { throw null; } public virtual Azure.Response Delete(string guid, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1102,14 +1102,14 @@ protected Entity() { } public virtual Azure.Response GetHeader(string guid, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task GetHeaderAsync(string guid, Azure.RequestContext context) { throw null; } public virtual System.Threading.Tasks.Task> GetHeaderAsync(string guid, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response ImportBusinessMetadata(Azure.Analytics.Purview.DataMap.BusinessMetadataOptions businessMetadataOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ImportBusinessMetadata(Azure.Analytics.Purview.DataMap.BusinessMetadataOptions body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response ImportBusinessMetadata(Azure.Core.RequestContent content, string contentType, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response ImportBusinessMetadata(System.BinaryData file, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ImportBusinessMetadataAsync(Azure.Analytics.Purview.DataMap.BusinessMetadataOptions businessMetadataOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ImportBusinessMetadataAsync(Azure.Analytics.Purview.DataMap.BusinessMetadataOptions body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task ImportBusinessMetadataAsync(Azure.Core.RequestContent content, string contentType, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response MoveEntitiesToCollection(string collectionId, Azure.Analytics.Purview.DataMap.MoveEntitiesConfig moveEntitiesConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response MoveEntitiesToCollection(string collectionId, Azure.Analytics.Purview.DataMap.MoveEntitiesConfig body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response MoveEntitiesToCollection(string collectionId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> MoveEntitiesToCollectionAsync(string collectionId, Azure.Analytics.Purview.DataMap.MoveEntitiesConfig moveEntitiesConfig, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> MoveEntitiesToCollectionAsync(string collectionId, Azure.Analytics.Purview.DataMap.MoveEntitiesConfig body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task MoveEntitiesToCollectionAsync(string collectionId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response RemoveBusinessMetadata(string guid, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response RemoveBusinessMetadata(string guid, System.Collections.Generic.IDictionary> body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1143,9 +1143,9 @@ protected Entity() { } public virtual Azure.Response UpdateAttributeById(string guid, string name, System.BinaryData body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task UpdateAttributeByIdAsync(string guid, string name, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAttributeByIdAsync(string guid, string name, System.BinaryData body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response UpdateByUniqueAttribute(string typeName, Azure.Analytics.Purview.DataMap.AtlasEntityWithExtInfo atlasEntityWithExtInfo, string attribute = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response UpdateByUniqueAttribute(string typeName, Azure.Analytics.Purview.DataMap.AtlasEntityWithExtInfo body, string attribute = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response UpdateByUniqueAttribute(string typeName, Azure.Core.RequestContent content, string attribute = null, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateByUniqueAttributeAsync(string typeName, Azure.Analytics.Purview.DataMap.AtlasEntityWithExtInfo atlasEntityWithExtInfo, string attribute = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateByUniqueAttributeAsync(string typeName, Azure.Analytics.Purview.DataMap.AtlasEntityWithExtInfo body, string attribute = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task UpdateByUniqueAttributeAsync(string typeName, Azure.Core.RequestContent content, string attribute = null, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response UpdateClassifications(string guid, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response UpdateClassifications(string guid, System.Collections.Generic.IEnumerable body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1198,21 +1198,21 @@ protected Glossary() { } public virtual Azure.Response> BatchGet(int? limit = default(int?), int? offset = default(int?), string sort = null, bool? ignoreTermsAndCategories = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task BatchGetAsync(int? limit, int? offset, string sort, bool? ignoreTermsAndCategories, Azure.RequestContext context) { throw null; } public virtual System.Threading.Tasks.Task>> BatchGetAsync(int? limit = default(int?), int? offset = default(int?), string sort = null, bool? ignoreTermsAndCategories = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Create(Azure.Analytics.Purview.DataMap.AtlasGlossary atlasGlossary, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Create(Azure.Analytics.Purview.DataMap.AtlasGlossary body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Create(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> CreateAsync(Azure.Analytics.Purview.DataMap.AtlasGlossary atlasGlossary, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateAsync(Azure.Analytics.Purview.DataMap.AtlasGlossary body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task CreateAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response CreateCategories(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response> CreateCategories(System.Collections.Generic.IEnumerable body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task CreateCategoriesAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task>> CreateCategoriesAsync(System.Collections.Generic.IEnumerable body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateCategory(Azure.Analytics.Purview.DataMap.AtlasGlossaryCategory atlasGlossaryCategory, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateCategory(Azure.Analytics.Purview.DataMap.AtlasGlossaryCategory body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateCategory(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> CreateCategoryAsync(Azure.Analytics.Purview.DataMap.AtlasGlossaryCategory atlasGlossaryCategory, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateCategoryAsync(Azure.Analytics.Purview.DataMap.AtlasGlossaryCategory body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task CreateCategoryAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response CreateTerm(Azure.Analytics.Purview.DataMap.AtlasGlossaryTerm atlasGlossaryTerm, bool? includeTermHierarchy = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateTerm(Azure.Analytics.Purview.DataMap.AtlasGlossaryTerm body, bool? includeTermHierarchy = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateTerm(Azure.Core.RequestContent content, bool? includeTermHierarchy = default(bool?), Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> CreateTermAsync(Azure.Analytics.Purview.DataMap.AtlasGlossaryTerm atlasGlossaryTerm, bool? includeTermHierarchy = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateTermAsync(Azure.Analytics.Purview.DataMap.AtlasGlossaryTerm body, bool? includeTermHierarchy = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task CreateTermAsync(Azure.Core.RequestContent content, bool? includeTermHierarchy = default(bool?), Azure.RequestContext context = null) { throw null; } public virtual Azure.Response CreateTerms(Azure.Core.RequestContent content, bool? includeTermHierarchy = default(bool?), Azure.RequestContext context = null) { throw null; } public virtual Azure.Response> CreateTerms(System.Collections.Generic.IEnumerable body, bool? includeTermHierarchy = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1288,17 +1288,17 @@ protected Glossary() { } public virtual Azure.Response PartialUpdateTerm(string termId, System.Collections.Generic.IDictionary body, bool? includeTermHierarchy = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task PartialUpdateTermAsync(string termId, Azure.Core.RequestContent content, bool? includeTermHierarchy = default(bool?), Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task> PartialUpdateTermAsync(string termId, System.Collections.Generic.IDictionary body, bool? includeTermHierarchy = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Update(string glossaryId, Azure.Analytics.Purview.DataMap.AtlasGlossary atlasGlossary, bool? ignoreTermsAndCategories = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Update(string glossaryId, Azure.Analytics.Purview.DataMap.AtlasGlossary body, bool? ignoreTermsAndCategories = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Update(string glossaryId, Azure.Core.RequestContent content, bool? ignoreTermsAndCategories = default(bool?), Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(string glossaryId, Azure.Analytics.Purview.DataMap.AtlasGlossary atlasGlossary, bool? ignoreTermsAndCategories = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(string glossaryId, Azure.Analytics.Purview.DataMap.AtlasGlossary body, bool? ignoreTermsAndCategories = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task UpdateAsync(string glossaryId, Azure.Core.RequestContent content, bool? ignoreTermsAndCategories = default(bool?), Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response UpdateCategory(string categoryId, Azure.Analytics.Purview.DataMap.AtlasGlossaryCategory atlasGlossaryCategory, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response UpdateCategory(string categoryId, Azure.Analytics.Purview.DataMap.AtlasGlossaryCategory body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response UpdateCategory(string categoryId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateCategoryAsync(string categoryId, Azure.Analytics.Purview.DataMap.AtlasGlossaryCategory atlasGlossaryCategory, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateCategoryAsync(string categoryId, Azure.Analytics.Purview.DataMap.AtlasGlossaryCategory body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task UpdateCategoryAsync(string categoryId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response UpdateTerm(string termId, Azure.Analytics.Purview.DataMap.AtlasGlossaryTerm atlasGlossaryTerm, bool? includeTermHierarchy = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response UpdateTerm(string termId, Azure.Analytics.Purview.DataMap.AtlasGlossaryTerm body, bool? includeTermHierarchy = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response UpdateTerm(string termId, Azure.Core.RequestContent content, bool? includeTermHierarchy = default(bool?), Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateTermAsync(string termId, Azure.Analytics.Purview.DataMap.AtlasGlossaryTerm atlasGlossaryTerm, bool? includeTermHierarchy = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateTermAsync(string termId, Azure.Analytics.Purview.DataMap.AtlasGlossaryTerm body, bool? includeTermHierarchy = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task UpdateTermAsync(string termId, Azure.Core.RequestContent content, bool? includeTermHierarchy = default(bool?), Azure.RequestContext context = null) { throw null; } } public partial class ImportInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel @@ -1453,9 +1453,9 @@ public partial class Relationship { protected Relationship() { } public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } - public virtual Azure.Response Create(Azure.Analytics.Purview.DataMap.AtlasRelationship atlasRelationship, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Create(Azure.Analytics.Purview.DataMap.AtlasRelationship body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Create(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> CreateAsync(Azure.Analytics.Purview.DataMap.AtlasRelationship atlasRelationship, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateAsync(Azure.Analytics.Purview.DataMap.AtlasRelationship body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task CreateAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response Delete(string guid, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(string guid, Azure.RequestContext context = null) { throw null; } @@ -1463,9 +1463,9 @@ protected Relationship() { } public virtual Azure.Response GetRelationship(string guid, bool? extendedInfo = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task GetRelationshipAsync(string guid, bool? extendedInfo, Azure.RequestContext context) { throw null; } public virtual System.Threading.Tasks.Task> GetRelationshipAsync(string guid, bool? extendedInfo = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Update(Azure.Analytics.Purview.DataMap.AtlasRelationship atlasRelationship, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Update(Azure.Analytics.Purview.DataMap.AtlasRelationship body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Update(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.Analytics.Purview.DataMap.AtlasRelationship atlasRelationship, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.Analytics.Purview.DataMap.AtlasRelationship body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task UpdateAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] @@ -1818,17 +1818,17 @@ public partial class TypeDefinition { protected TypeDefinition() { } public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } - public virtual Azure.Response BatchCreate(Azure.Analytics.Purview.DataMap.AtlasTypesDef atlasTypesDef, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response BatchCreate(Azure.Analytics.Purview.DataMap.AtlasTypesDef body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response BatchCreate(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> BatchCreateAsync(Azure.Analytics.Purview.DataMap.AtlasTypesDef atlasTypesDef, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> BatchCreateAsync(Azure.Analytics.Purview.DataMap.AtlasTypesDef body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task BatchCreateAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response BatchDelete(Azure.Analytics.Purview.DataMap.AtlasTypesDef atlasTypesDef, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response BatchDelete(Azure.Analytics.Purview.DataMap.AtlasTypesDef body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response BatchDelete(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task BatchDeleteAsync(Azure.Analytics.Purview.DataMap.AtlasTypesDef atlasTypesDef, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task BatchDeleteAsync(Azure.Analytics.Purview.DataMap.AtlasTypesDef body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task BatchDeleteAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response BatchUpdate(Azure.Analytics.Purview.DataMap.AtlasTypesDef atlasTypesDef, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response BatchUpdate(Azure.Analytics.Purview.DataMap.AtlasTypesDef body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response BatchUpdate(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> BatchUpdateAsync(Azure.Analytics.Purview.DataMap.AtlasTypesDef atlasTypesDef, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> BatchUpdateAsync(Azure.Analytics.Purview.DataMap.AtlasTypesDef body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task BatchUpdateAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response Delete(string name, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(string name, Azure.RequestContext context = null) { throw null; } diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Discovery.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Discovery.cs index 9bda0cb30e054..e4fce86155aff 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Discovery.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Discovery.cs @@ -50,30 +50,30 @@ internal Discovery(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, T } /// Get data using search. - /// The search query of advanced search request. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual async Task> QueryAsync(QueryConfig queryConfig, CancellationToken cancellationToken = default) + public virtual async Task> QueryAsync(QueryConfig body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(queryConfig, nameof(queryConfig)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = queryConfig.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await QueryAsync(content, context).ConfigureAwait(false); return Response.FromValue(QueryResult.FromResponse(response), response); } /// Get data using search. - /// The search query of advanced search request. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual Response Query(QueryConfig queryConfig, CancellationToken cancellationToken = default) + public virtual Response Query(QueryConfig body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(queryConfig, nameof(queryConfig)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = queryConfig.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = Query(content, context); return Response.FromValue(QueryResult.FromResponse(response), response); @@ -158,30 +158,30 @@ public virtual Response Query(RequestContent content, RequestContext context = n } /// Get search suggestions by query criteria. - /// The payload of suggest request. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual async Task> SuggestAsync(SuggestConfig suggestConfig, CancellationToken cancellationToken = default) + public virtual async Task> SuggestAsync(SuggestConfig body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(suggestConfig, nameof(suggestConfig)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = suggestConfig.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await SuggestAsync(content, context).ConfigureAwait(false); return Response.FromValue(SuggestResult.FromResponse(response), response); } /// Get search suggestions by query criteria. - /// The payload of suggest request. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual Response Suggest(SuggestConfig suggestConfig, CancellationToken cancellationToken = default) + public virtual Response Suggest(SuggestConfig body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(suggestConfig, nameof(suggestConfig)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = suggestConfig.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = Suggest(content, context); return Response.FromValue(SuggestResult.FromResponse(response), response); @@ -266,30 +266,30 @@ public virtual Response Suggest(RequestContent content, RequestContext context = } /// Get auto complete options. - /// The payload of autocomplete request. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual async Task> AutoCompleteAsync(AutoCompleteConfig autoCompleteConfig, CancellationToken cancellationToken = default) + public virtual async Task> AutoCompleteAsync(AutoCompleteConfig body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(autoCompleteConfig, nameof(autoCompleteConfig)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = autoCompleteConfig.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await AutoCompleteAsync(content, context).ConfigureAwait(false); return Response.FromValue(AutoCompleteResult.FromResponse(response), response); } /// Get auto complete options. - /// The payload of autocomplete request. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual Response AutoComplete(AutoCompleteConfig autoCompleteConfig, CancellationToken cancellationToken = default) + public virtual Response AutoComplete(AutoCompleteConfig body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(autoCompleteConfig, nameof(autoCompleteConfig)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = autoCompleteConfig.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = AutoComplete(content, context); return Response.FromValue(AutoCompleteResult.FromResponse(response), response); diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Discovery.xml b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Discovery.xml index 1095890f2913b..2cf3d5de93744 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Discovery.xml +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Discovery.xml @@ -9,8 +9,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); -QueryConfig queryConfig = new QueryConfig(); -Response response = await client.QueryAsync(queryConfig); +QueryConfig body = new QueryConfig(); +Response response = await client.QueryAsync(body); ]]> This sample shows how to call QueryAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); -QueryConfig queryConfig = new QueryConfig +QueryConfig body = new QueryConfig { Keywords = "", Limit = 1234, @@ -41,7 +41,7 @@ QueryConfig queryConfig = new QueryConfig Facet = default, }, }; -Response response = await client.QueryAsync(queryConfig); +Response response = await client.QueryAsync(body); ]]> @@ -52,8 +52,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); -QueryConfig queryConfig = new QueryConfig(); -Response response = client.Query(queryConfig); +QueryConfig body = new QueryConfig(); +Response response = client.Query(body); ]]> This sample shows how to call Query with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); -QueryConfig queryConfig = new QueryConfig +QueryConfig body = new QueryConfig { Keywords = "", Limit = 1234, @@ -84,7 +84,7 @@ QueryConfig queryConfig = new QueryConfig Facet = default, }, }; -Response response = client.Query(queryConfig); +Response response = client.Query(body); ]]> @@ -313,8 +313,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); -SuggestConfig suggestConfig = new SuggestConfig(); -Response response = await client.SuggestAsync(suggestConfig); +SuggestConfig body = new SuggestConfig(); +Response response = await client.SuggestAsync(body); ]]> This sample shows how to call SuggestAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); -SuggestConfig suggestConfig = new SuggestConfig +SuggestConfig body = new SuggestConfig { Keywords = "", Limit = 1234, Filter = BinaryData.FromObjectAsJson(new object()), }; -Response response = await client.SuggestAsync(suggestConfig); +Response response = await client.SuggestAsync(body); ]]> @@ -339,8 +339,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); -SuggestConfig suggestConfig = new SuggestConfig(); -Response response = client.Suggest(suggestConfig); +SuggestConfig body = new SuggestConfig(); +Response response = client.Suggest(body); ]]> This sample shows how to call Suggest with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); -SuggestConfig suggestConfig = new SuggestConfig +SuggestConfig body = new SuggestConfig { Keywords = "", Limit = 1234, Filter = BinaryData.FromObjectAsJson(new object()), }; -Response response = client.Suggest(suggestConfig); +Response response = client.Suggest(body); ]]> @@ -479,8 +479,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); -AutoCompleteConfig autoCompleteConfig = new AutoCompleteConfig(); -Response response = await client.AutoCompleteAsync(autoCompleteConfig); +AutoCompleteConfig body = new AutoCompleteConfig(); +Response response = await client.AutoCompleteAsync(body); ]]> This sample shows how to call AutoCompleteAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); -AutoCompleteConfig autoCompleteConfig = new AutoCompleteConfig +AutoCompleteConfig body = new AutoCompleteConfig { Keywords = "", Limit = 1234, Filter = BinaryData.FromObjectAsJson(new object()), }; -Response response = await client.AutoCompleteAsync(autoCompleteConfig); +Response response = await client.AutoCompleteAsync(body); ]]> @@ -505,8 +505,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); -AutoCompleteConfig autoCompleteConfig = new AutoCompleteConfig(); -Response response = client.AutoComplete(autoCompleteConfig); +AutoCompleteConfig body = new AutoCompleteConfig(); +Response response = client.AutoComplete(body); ]]> This sample shows how to call AutoComplete with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); -AutoCompleteConfig autoCompleteConfig = new AutoCompleteConfig +AutoCompleteConfig body = new AutoCompleteConfig { Keywords = "", Limit = 1234, Filter = BinaryData.FromObjectAsJson(new object()), }; -Response response = client.AutoComplete(autoCompleteConfig); +Response response = client.AutoComplete(body); ]]> diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Entity.xml b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Entity.xml index 4958aea8ad883..710a1ffe58532 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Entity.xml +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Entity.xml @@ -9,8 +9,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo(); -Response response = await client.CreateOrUpdateAsync(atlasEntityWithExtInfo); +AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo(); +Response response = await client.CreateOrUpdateAsync(body); ]]> This sample shows how to call CreateOrUpdateAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); -AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo +AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo { ReferredEntities = { @@ -96,7 +96,7 @@ AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo }, Entity = default, }; -Response response = await client.CreateOrUpdateAsync(atlasEntityWithExtInfo, businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore, collectionId: ""); +Response response = await client.CreateOrUpdateAsync(body, businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore, collectionId: ""); ]]> @@ -107,8 +107,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo(); -Response response = client.CreateOrUpdate(atlasEntityWithExtInfo); +AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo(); +Response response = client.CreateOrUpdate(body); ]]> This sample shows how to call CreateOrUpdate with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); -AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo +AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo { ReferredEntities = { @@ -194,7 +194,7 @@ AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo }, Entity = default, }; -Response response = client.CreateOrUpdate(atlasEntityWithExtInfo, businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore, collectionId: ""); +Response response = client.CreateOrUpdate(body, businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore, collectionId: ""); ]]> @@ -795,8 +795,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo = new AtlasEntitiesWithExtInfo(); -Response response = await client.BatchCreateOrUpdateAsync(atlasEntitiesWithExtInfo); +AtlasEntitiesWithExtInfo body = new AtlasEntitiesWithExtInfo(); +Response response = await client.BatchCreateOrUpdateAsync(body); ]]> This sample shows how to call BatchCreateOrUpdateAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); -AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo = new AtlasEntitiesWithExtInfo +AtlasEntitiesWithExtInfo body = new AtlasEntitiesWithExtInfo { ReferredEntities = { @@ -882,7 +882,7 @@ AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo = new AtlasEntitiesWithExtInfo }, Entities = { default }, }; -Response response = await client.BatchCreateOrUpdateAsync(atlasEntitiesWithExtInfo, collectionId: "", businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore); +Response response = await client.BatchCreateOrUpdateAsync(body, collectionId: "", businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore); ]]> @@ -893,8 +893,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo = new AtlasEntitiesWithExtInfo(); -Response response = client.BatchCreateOrUpdate(atlasEntitiesWithExtInfo); +AtlasEntitiesWithExtInfo body = new AtlasEntitiesWithExtInfo(); +Response response = client.BatchCreateOrUpdate(body); ]]> This sample shows how to call BatchCreateOrUpdate with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); -AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo = new AtlasEntitiesWithExtInfo +AtlasEntitiesWithExtInfo body = new AtlasEntitiesWithExtInfo { ReferredEntities = { @@ -980,7 +980,7 @@ AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo = new AtlasEntitiesWithExtInfo }, Entities = { default }, }; -Response response = client.BatchCreateOrUpdate(atlasEntitiesWithExtInfo, collectionId: "", businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore); +Response response = client.BatchCreateOrUpdate(body, collectionId: "", businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore); ]]> @@ -1547,8 +1547,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -ClassificationAssociateConfig classificationAssociateConfig = new ClassificationAssociateConfig(); -Response response = await client.AddClassificationAsync(classificationAssociateConfig); +ClassificationAssociateConfig body = new ClassificationAssociateConfig(); +Response response = await client.AddClassificationAsync(body); ]]> This sample shows how to call AddClassificationAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -ClassificationAssociateConfig classificationAssociateConfig = new ClassificationAssociateConfig +ClassificationAssociateConfig body = new ClassificationAssociateConfig { Classification = new AtlasClassification { @@ -1578,7 +1578,7 @@ ClassificationAssociateConfig classificationAssociateConfig = new Classification }, EntityGuids = { "" }, }; -Response response = await client.AddClassificationAsync(classificationAssociateConfig); +Response response = await client.AddClassificationAsync(body); ]]> @@ -1589,8 +1589,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -ClassificationAssociateConfig classificationAssociateConfig = new ClassificationAssociateConfig(); -Response response = client.AddClassification(classificationAssociateConfig); +ClassificationAssociateConfig body = new ClassificationAssociateConfig(); +Response response = client.AddClassification(body); ]]> This sample shows how to call AddClassification with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -ClassificationAssociateConfig classificationAssociateConfig = new ClassificationAssociateConfig +ClassificationAssociateConfig body = new ClassificationAssociateConfig { Classification = new AtlasClassification { @@ -1620,7 +1620,7 @@ ClassificationAssociateConfig classificationAssociateConfig = new Classification }, EntityGuids = { "" }, }; -Response response = client.AddClassification(classificationAssociateConfig); +Response response = client.AddClassification(body); ]]> @@ -3243,8 +3243,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo(); -Response response = await client.UpdateByUniqueAttributeAsync("", atlasEntityWithExtInfo); +AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo(); +Response response = await client.UpdateByUniqueAttributeAsync("", body); ]]> This sample shows how to call UpdateByUniqueAttributeAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo +AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo { ReferredEntities = { @@ -3330,7 +3330,7 @@ AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo }, Entity = default, }; -Response response = await client.UpdateByUniqueAttributeAsync("", atlasEntityWithExtInfo, attribute: ""); +Response response = await client.UpdateByUniqueAttributeAsync("", body, attribute: ""); ]]> @@ -3341,8 +3341,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo(); -Response response = client.UpdateByUniqueAttribute("", atlasEntityWithExtInfo); +AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo(); +Response response = client.UpdateByUniqueAttribute("", body); ]]> This sample shows how to call UpdateByUniqueAttribute with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo +AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo { ReferredEntities = { @@ -3428,7 +3428,7 @@ AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo }, Entity = default, }; -Response response = client.UpdateByUniqueAttribute("", atlasEntityWithExtInfo, attribute: ""); +Response response = client.UpdateByUniqueAttribute("", body, attribute: ""); ]]> @@ -4405,8 +4405,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -AtlasEntityHeaders atlasEntityHeaders = new AtlasEntityHeaders(); -Response> response = await client.BatchSetClassificationsAsync(atlasEntityHeaders); +AtlasEntityHeaders body = new AtlasEntityHeaders(); +Response> response = await client.BatchSetClassificationsAsync(body); ]]> This sample shows how to call BatchSetClassificationsAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -AtlasEntityHeaders atlasEntityHeaders = new AtlasEntityHeaders +AtlasEntityHeaders body = new AtlasEntityHeaders { GuidHeaderMap = { @@ -4466,7 +4466,7 @@ AtlasEntityHeaders atlasEntityHeaders = new AtlasEntityHeaders } }, }; -Response> response = await client.BatchSetClassificationsAsync(atlasEntityHeaders); +Response> response = await client.BatchSetClassificationsAsync(body); ]]> @@ -4477,8 +4477,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -AtlasEntityHeaders atlasEntityHeaders = new AtlasEntityHeaders(); -Response> response = client.BatchSetClassifications(atlasEntityHeaders); +AtlasEntityHeaders body = new AtlasEntityHeaders(); +Response> response = client.BatchSetClassifications(body); ]]> This sample shows how to call BatchSetClassifications with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -AtlasEntityHeaders atlasEntityHeaders = new AtlasEntityHeaders +AtlasEntityHeaders body = new AtlasEntityHeaders { GuidHeaderMap = { @@ -4538,7 +4538,7 @@ AtlasEntityHeaders atlasEntityHeaders = new AtlasEntityHeaders } }, }; -Response> response = client.BatchSetClassifications(atlasEntityHeaders); +Response> response = client.BatchSetClassifications(body); ]]> @@ -5709,8 +5709,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -BusinessMetadataOptions businessMetadataOptions = new BusinessMetadataOptions(null); -Response response = await client.ImportBusinessMetadataAsync(businessMetadataOptions); +BusinessMetadataOptions body = new BusinessMetadataOptions(null); +Response response = await client.ImportBusinessMetadataAsync(body); ]]> This sample shows how to call ImportBusinessMetadataAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -BusinessMetadataOptions businessMetadataOptions = new BusinessMetadataOptions(null); -Response response = await client.ImportBusinessMetadataAsync(businessMetadataOptions); +BusinessMetadataOptions body = new BusinessMetadataOptions(null); +Response response = await client.ImportBusinessMetadataAsync(body); ]]> @@ -5730,8 +5730,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -BusinessMetadataOptions businessMetadataOptions = new BusinessMetadataOptions(null); -Response response = client.ImportBusinessMetadata(businessMetadataOptions); +BusinessMetadataOptions body = new BusinessMetadataOptions(null); +Response response = client.ImportBusinessMetadata(body); ]]> This sample shows how to call ImportBusinessMetadata with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); -BusinessMetadataOptions businessMetadataOptions = new BusinessMetadataOptions(null); -Response response = client.ImportBusinessMetadata(businessMetadataOptions); +BusinessMetadataOptions body = new BusinessMetadataOptions(null); +Response response = client.ImportBusinessMetadata(body); ]]> @@ -6395,8 +6395,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); -MoveEntitiesConfig moveEntitiesConfig = new MoveEntitiesConfig(); -Response response = await client.MoveEntitiesToCollectionAsync("", moveEntitiesConfig); +MoveEntitiesConfig body = new MoveEntitiesConfig(); +Response response = await client.MoveEntitiesToCollectionAsync("", body); ]]> This sample shows how to call MoveEntitiesToCollectionAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); -MoveEntitiesConfig moveEntitiesConfig = new MoveEntitiesConfig +MoveEntitiesConfig body = new MoveEntitiesConfig { EntityGuids = { "" }, }; -Response response = await client.MoveEntitiesToCollectionAsync("", moveEntitiesConfig); +Response response = await client.MoveEntitiesToCollectionAsync("", body); ]]> @@ -6419,8 +6419,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); -MoveEntitiesConfig moveEntitiesConfig = new MoveEntitiesConfig(); -Response response = client.MoveEntitiesToCollection("", moveEntitiesConfig); +MoveEntitiesConfig body = new MoveEntitiesConfig(); +Response response = client.MoveEntitiesToCollection("", body); ]]> This sample shows how to call MoveEntitiesToCollection with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); -MoveEntitiesConfig moveEntitiesConfig = new MoveEntitiesConfig +MoveEntitiesConfig body = new MoveEntitiesConfig { EntityGuids = { "" }, }; -Response response = client.MoveEntitiesToCollection("", moveEntitiesConfig); +Response response = client.MoveEntitiesToCollection("", body); ]]> diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Glossary.xml b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Glossary.xml index 49baec132e30e..5a6a48f9976ba 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Glossary.xml +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Glossary.xml @@ -161,8 +161,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -AtlasGlossary atlasGlossary = new AtlasGlossary(); -Response response = await client.CreateAsync(atlasGlossary); +AtlasGlossary body = new AtlasGlossary(); +Response response = await client.CreateAsync(body); ]]> This sample shows how to call CreateAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -AtlasGlossary atlasGlossary = new AtlasGlossary +AtlasGlossary body = new AtlasGlossary { Guid = "", Classifications = {new AtlasClassification @@ -221,7 +221,7 @@ AtlasGlossary atlasGlossary = new AtlasGlossary }}, Usage = "", }; -Response response = await client.CreateAsync(atlasGlossary); +Response response = await client.CreateAsync(body); ]]> @@ -232,8 +232,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -AtlasGlossary atlasGlossary = new AtlasGlossary(); -Response response = client.Create(atlasGlossary); +AtlasGlossary body = new AtlasGlossary(); +Response response = client.Create(body); ]]> This sample shows how to call Create with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -AtlasGlossary atlasGlossary = new AtlasGlossary +AtlasGlossary body = new AtlasGlossary { Guid = "", Classifications = {new AtlasClassification @@ -292,7 +292,7 @@ AtlasGlossary atlasGlossary = new AtlasGlossary }}, Usage = "", }; -Response response = client.Create(atlasGlossary); +Response response = client.Create(body); ]]> @@ -979,8 +979,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory(); -Response response = await client.CreateCategoryAsync(atlasGlossaryCategory); +AtlasGlossaryCategory body = new AtlasGlossaryCategory(); +Response response = await client.CreateCategoryAsync(body); ]]> This sample shows how to call CreateCategoryAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory +AtlasGlossaryCategory body = new AtlasGlossaryCategory { Guid = "", Classifications = {new AtlasClassification @@ -1044,7 +1044,7 @@ AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory TermGuid = "", }}, }; -Response response = await client.CreateCategoryAsync(atlasGlossaryCategory); +Response response = await client.CreateCategoryAsync(body); ]]> @@ -1055,8 +1055,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory(); -Response response = client.CreateCategory(atlasGlossaryCategory); +AtlasGlossaryCategory body = new AtlasGlossaryCategory(); +Response response = client.CreateCategory(body); ]]> This sample shows how to call CreateCategory with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory +AtlasGlossaryCategory body = new AtlasGlossaryCategory { Guid = "", Classifications = {new AtlasClassification @@ -1120,7 +1120,7 @@ AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory TermGuid = "", }}, }; -Response response = client.CreateCategory(atlasGlossaryCategory); +Response response = client.CreateCategory(body); ]]> @@ -1557,8 +1557,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory(); -Response response = await client.UpdateCategoryAsync("", atlasGlossaryCategory); +AtlasGlossaryCategory body = new AtlasGlossaryCategory(); +Response response = await client.UpdateCategoryAsync("", body); ]]> This sample shows how to call UpdateCategoryAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory +AtlasGlossaryCategory body = new AtlasGlossaryCategory { Guid = "", Classifications = {new AtlasClassification @@ -1622,7 +1622,7 @@ AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory TermGuid = "", }}, }; -Response response = await client.UpdateCategoryAsync("", atlasGlossaryCategory); +Response response = await client.UpdateCategoryAsync("", body); ]]> @@ -1633,8 +1633,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory(); -Response response = client.UpdateCategory("", atlasGlossaryCategory); +AtlasGlossaryCategory body = new AtlasGlossaryCategory(); +Response response = client.UpdateCategory("", body); ]]> This sample shows how to call UpdateCategory with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory +AtlasGlossaryCategory body = new AtlasGlossaryCategory { Guid = "", Classifications = {new AtlasClassification @@ -1698,7 +1698,7 @@ AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory TermGuid = "", }}, }; -Response response = client.UpdateCategory("", atlasGlossaryCategory); +Response response = client.UpdateCategory("", body); ]]> @@ -2405,8 +2405,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm(); -Response response = await client.CreateTermAsync(atlasGlossaryTerm); +AtlasGlossaryTerm body = new AtlasGlossaryTerm(); +Response response = await client.CreateTermAsync(body); ]]> This sample shows how to call CreateTermAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm +AtlasGlossaryTerm body = new AtlasGlossaryTerm { Guid = "", Classifications = {new AtlasClassification @@ -2547,7 +2547,7 @@ AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm ValidValues = { default }, ValidValuesFor = { default }, }; -Response response = await client.CreateTermAsync(atlasGlossaryTerm, includeTermHierarchy: true); +Response response = await client.CreateTermAsync(body, includeTermHierarchy: true); ]]> @@ -2558,8 +2558,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm(); -Response response = client.CreateTerm(atlasGlossaryTerm); +AtlasGlossaryTerm body = new AtlasGlossaryTerm(); +Response response = client.CreateTerm(body); ]]> This sample shows how to call CreateTerm with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm +AtlasGlossaryTerm body = new AtlasGlossaryTerm { Guid = "", Classifications = {new AtlasClassification @@ -2700,7 +2700,7 @@ AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm ValidValues = { default }, ValidValuesFor = { default }, }; -Response response = client.CreateTerm(atlasGlossaryTerm, includeTermHierarchy: true); +Response response = client.CreateTerm(body, includeTermHierarchy: true); ]]> @@ -3837,8 +3837,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm(); -Response response = await client.UpdateTermAsync("", atlasGlossaryTerm); +AtlasGlossaryTerm body = new AtlasGlossaryTerm(); +Response response = await client.UpdateTermAsync("", body); ]]> This sample shows how to call UpdateTermAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); -AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm +AtlasGlossaryTerm body = new AtlasGlossaryTerm { Guid = "", Classifications = {new AtlasClassification @@ -3979,7 +3979,7 @@ AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm ValidValues = { default }, ValidValuesFor = { default }, }; -Response response = await client.UpdateTermAsync("", atlasGlossaryTerm, includeTermHierarchy: true); +Response response = await client.UpdateTermAsync("", body, includeTermHierarchy: true); ]]> @@ -3990,8 +3990,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm(); -Response response = client.UpdateTerm("", atlasGlossaryTerm); +AtlasGlossaryTerm body = new AtlasGlossaryTerm(); +Response response = client.UpdateTerm("", body); ]]> This sample shows how to call UpdateTerm with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); -AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm +AtlasGlossaryTerm body = new AtlasGlossaryTerm { Guid = "", Classifications = {new AtlasClassification @@ -4132,7 +4132,7 @@ AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm ValidValues = { default }, ValidValuesFor = { default }, }; -Response response = client.UpdateTerm("", atlasGlossaryTerm, includeTermHierarchy: true); +Response response = client.UpdateTerm("", body, includeTermHierarchy: true); ]]> @@ -7173,8 +7173,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -AtlasGlossary atlasGlossary = new AtlasGlossary(); -Response response = await client.UpdateAsync("", atlasGlossary); +AtlasGlossary body = new AtlasGlossary(); +Response response = await client.UpdateAsync("", body); ]]> This sample shows how to call UpdateAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); -AtlasGlossary atlasGlossary = new AtlasGlossary +AtlasGlossary body = new AtlasGlossary { Guid = "", Classifications = {new AtlasClassification @@ -7233,7 +7233,7 @@ AtlasGlossary atlasGlossary = new AtlasGlossary }}, Usage = "", }; -Response response = await client.UpdateAsync("", atlasGlossary, ignoreTermsAndCategories: true); +Response response = await client.UpdateAsync("", body, ignoreTermsAndCategories: true); ]]> @@ -7244,8 +7244,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); -AtlasGlossary atlasGlossary = new AtlasGlossary(); -Response response = client.Update("", atlasGlossary); +AtlasGlossary body = new AtlasGlossary(); +Response response = client.Update("", body); ]]> This sample shows how to call Update with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); -AtlasGlossary atlasGlossary = new AtlasGlossary +AtlasGlossary body = new AtlasGlossary { Guid = "", Classifications = {new AtlasClassification @@ -7304,7 +7304,7 @@ AtlasGlossary atlasGlossary = new AtlasGlossary }}, Usage = "", }; -Response response = client.Update("", atlasGlossary, ignoreTermsAndCategories: true); +Response response = client.Update("", body, ignoreTermsAndCategories: true); ]]> diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Relationship.xml b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Relationship.xml index 6a61cb95f88a9..a6424570245b9 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Relationship.xml +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/Relationship.xml @@ -9,8 +9,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); -AtlasRelationship atlasRelationship = new AtlasRelationship(); -Response response = await client.CreateAsync(atlasRelationship); +AtlasRelationship body = new AtlasRelationship(); +Response response = await client.CreateAsync(body); ]]> This sample shows how to call CreateAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); -AtlasRelationship atlasRelationship = new AtlasRelationship +AtlasRelationship body = new AtlasRelationship { Attributes = { @@ -47,7 +47,7 @@ AtlasRelationship atlasRelationship = new AtlasRelationship UpdatedBy = "", Version = 1234L, }; -Response response = await client.CreateAsync(atlasRelationship); +Response response = await client.CreateAsync(body); ]]> @@ -58,8 +58,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); -AtlasRelationship atlasRelationship = new AtlasRelationship(); -Response response = client.Create(atlasRelationship); +AtlasRelationship body = new AtlasRelationship(); +Response response = client.Create(body); ]]> This sample shows how to call Create with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); -AtlasRelationship atlasRelationship = new AtlasRelationship +AtlasRelationship body = new AtlasRelationship { Attributes = { @@ -96,7 +96,7 @@ AtlasRelationship atlasRelationship = new AtlasRelationship UpdatedBy = "", Version = 1234L, }; -Response response = client.Create(atlasRelationship); +Response response = client.Create(body); ]]> @@ -251,8 +251,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); -AtlasRelationship atlasRelationship = new AtlasRelationship(); -Response response = await client.UpdateAsync(atlasRelationship); +AtlasRelationship body = new AtlasRelationship(); +Response response = await client.UpdateAsync(body); ]]> This sample shows how to call UpdateAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); -AtlasRelationship atlasRelationship = new AtlasRelationship +AtlasRelationship body = new AtlasRelationship { Attributes = { @@ -289,7 +289,7 @@ AtlasRelationship atlasRelationship = new AtlasRelationship UpdatedBy = "", Version = 1234L, }; -Response response = await client.UpdateAsync(atlasRelationship); +Response response = await client.UpdateAsync(body); ]]> @@ -300,8 +300,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); -AtlasRelationship atlasRelationship = new AtlasRelationship(); -Response response = client.Update(atlasRelationship); +AtlasRelationship body = new AtlasRelationship(); +Response response = client.Update(body); ]]> This sample shows how to call Update with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); -AtlasRelationship atlasRelationship = new AtlasRelationship +AtlasRelationship body = new AtlasRelationship { Attributes = { @@ -338,7 +338,7 @@ AtlasRelationship atlasRelationship = new AtlasRelationship UpdatedBy = "", Version = 1234L, }; -Response response = client.Update(atlasRelationship); +Response response = client.Update(body); ]]> diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/TypeDefinition.xml b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/TypeDefinition.xml index fb412241d3107..895c72f05032c 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/TypeDefinition.xml +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Docs/TypeDefinition.xml @@ -3491,8 +3491,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -AtlasTypesDef atlasTypesDef = new AtlasTypesDef(); -Response response = await client.BatchCreateAsync(atlasTypesDef); +AtlasTypesDef body = new AtlasTypesDef(); +Response response = await client.BatchCreateAsync(body); ]]> This sample shows how to call BatchCreateAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -AtlasTypesDef atlasTypesDef = new AtlasTypesDef +AtlasTypesDef body = new AtlasTypesDef { BusinessMetadataDefs = {new AtlasBusinessMetadataDef { @@ -3754,7 +3754,7 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef AttributeDefs = {default}, }}, }; -Response response = await client.BatchCreateAsync(atlasTypesDef); +Response response = await client.BatchCreateAsync(body); ]]> @@ -3765,8 +3765,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -AtlasTypesDef atlasTypesDef = new AtlasTypesDef(); -Response response = client.BatchCreate(atlasTypesDef); +AtlasTypesDef body = new AtlasTypesDef(); +Response response = client.BatchCreate(body); ]]> This sample shows how to call BatchCreate with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -AtlasTypesDef atlasTypesDef = new AtlasTypesDef +AtlasTypesDef body = new AtlasTypesDef { BusinessMetadataDefs = {new AtlasBusinessMetadataDef { @@ -4028,7 +4028,7 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef AttributeDefs = {default}, }}, }; -Response response = client.BatchCreate(atlasTypesDef); +Response response = client.BatchCreate(body); ]]> @@ -5381,8 +5381,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -AtlasTypesDef atlasTypesDef = new AtlasTypesDef(); -Response response = await client.BatchUpdateAsync(atlasTypesDef); +AtlasTypesDef body = new AtlasTypesDef(); +Response response = await client.BatchUpdateAsync(body); ]]> This sample shows how to call BatchUpdateAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -AtlasTypesDef atlasTypesDef = new AtlasTypesDef +AtlasTypesDef body = new AtlasTypesDef { BusinessMetadataDefs = {new AtlasBusinessMetadataDef { @@ -5644,7 +5644,7 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef AttributeDefs = {default}, }}, }; -Response response = await client.BatchUpdateAsync(atlasTypesDef); +Response response = await client.BatchUpdateAsync(body); ]]> @@ -5655,8 +5655,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -AtlasTypesDef atlasTypesDef = new AtlasTypesDef(); -Response response = client.BatchUpdate(atlasTypesDef); +AtlasTypesDef body = new AtlasTypesDef(); +Response response = client.BatchUpdate(body); ]]> This sample shows how to call BatchUpdate with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -AtlasTypesDef atlasTypesDef = new AtlasTypesDef +AtlasTypesDef body = new AtlasTypesDef { BusinessMetadataDefs = {new AtlasBusinessMetadataDef { @@ -5918,7 +5918,7 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef AttributeDefs = {default}, }}, }; -Response response = client.BatchUpdate(atlasTypesDef); +Response response = client.BatchUpdate(body); ]]> @@ -7271,8 +7271,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -AtlasTypesDef atlasTypesDef = new AtlasTypesDef(); -Response response = await client.BatchDeleteAsync(atlasTypesDef); +AtlasTypesDef body = new AtlasTypesDef(); +Response response = await client.BatchDeleteAsync(body); ]]> This sample shows how to call BatchDeleteAsync with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -AtlasTypesDef atlasTypesDef = new AtlasTypesDef +AtlasTypesDef body = new AtlasTypesDef { BusinessMetadataDefs = {new AtlasBusinessMetadataDef { @@ -7534,7 +7534,7 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef AttributeDefs = {default}, }}, }; -Response response = await client.BatchDeleteAsync(atlasTypesDef); +Response response = await client.BatchDeleteAsync(body); ]]> @@ -7545,8 +7545,8 @@ Uri endpoint = new Uri(""); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -AtlasTypesDef atlasTypesDef = new AtlasTypesDef(); -Response response = client.BatchDelete(atlasTypesDef); +AtlasTypesDef body = new AtlasTypesDef(); +Response response = client.BatchDelete(body); ]]> This sample shows how to call BatchDelete with all parameters. "); TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); -AtlasTypesDef atlasTypesDef = new AtlasTypesDef +AtlasTypesDef body = new AtlasTypesDef { BusinessMetadataDefs = {new AtlasBusinessMetadataDef { @@ -7808,7 +7808,7 @@ AtlasTypesDef atlasTypesDef = new AtlasTypesDef AttributeDefs = {default}, }}, }; -Response response = client.BatchDelete(atlasTypesDef); +Response response = client.BatchDelete(body); ]]> diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Entity.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Entity.cs index 369c8f7276b6c..38fdb7f1c8071 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Entity.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Entity.cs @@ -60,10 +60,7 @@ internal Entity(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Toke /// int>>. /// For each contact type, the maximum number of contacts is 20. /// - /// - /// An instance of an entity along with extended info - like hive_table, - /// hive_database. - /// + /// Body parameter. /// /// Used to define the update behavior for business attributes when updating /// entities. @@ -73,13 +70,13 @@ internal Entity(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Toke /// need to move an entity to another collection. /// /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual async Task> CreateOrUpdateAsync(AtlasEntityWithExtInfo atlasEntityWithExtInfo, BusinessAttributeUpdateBehavior? businessAttributeUpdateBehavior = null, string collectionId = null, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(AtlasEntityWithExtInfo body, BusinessAttributeUpdateBehavior? businessAttributeUpdateBehavior = null, string collectionId = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(atlasEntityWithExtInfo, nameof(atlasEntityWithExtInfo)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = atlasEntityWithExtInfo.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await CreateOrUpdateAsync(content, businessAttributeUpdateBehavior?.ToString(), collectionId, context).ConfigureAwait(false); return Response.FromValue(EntityMutationResult.FromResponse(response), response); @@ -94,10 +91,7 @@ public virtual async Task> CreateOrUpdateAsync(At /// int>>. /// For each contact type, the maximum number of contacts is 20. /// - /// - /// An instance of an entity along with extended info - like hive_table, - /// hive_database. - /// + /// Body parameter. /// /// Used to define the update behavior for business attributes when updating /// entities. @@ -107,13 +101,13 @@ public virtual async Task> CreateOrUpdateAsync(At /// need to move an entity to another collection. /// /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual Response CreateOrUpdate(AtlasEntityWithExtInfo atlasEntityWithExtInfo, BusinessAttributeUpdateBehavior? businessAttributeUpdateBehavior = null, string collectionId = null, CancellationToken cancellationToken = default) + public virtual Response CreateOrUpdate(AtlasEntityWithExtInfo body, BusinessAttributeUpdateBehavior? businessAttributeUpdateBehavior = null, string collectionId = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(atlasEntityWithExtInfo, nameof(atlasEntityWithExtInfo)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = atlasEntityWithExtInfo.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = CreateOrUpdate(content, businessAttributeUpdateBehavior?.ToString(), collectionId, context); return Response.FromValue(EntityMutationResult.FromResponse(response), response); @@ -349,10 +343,7 @@ public virtual Response GetByIds(IEnumerable guid, bool? minExtInfo, boo /// For each contact type, the maximum number of contacts /// is 20. /// - /// - /// An instance of an entity along with extended info - like hive_table, - /// hive_database. - /// + /// Body parameter. /// /// The collection where entities will be moved to. Only specify a value if you /// need to move an entity to another collection. @@ -362,13 +353,13 @@ public virtual Response GetByIds(IEnumerable guid, bool? minExtInfo, boo /// entities. /// /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual async Task> BatchCreateOrUpdateAsync(AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo, string collectionId = null, BusinessAttributeUpdateBehavior? businessAttributeUpdateBehavior = null, CancellationToken cancellationToken = default) + public virtual async Task> BatchCreateOrUpdateAsync(AtlasEntitiesWithExtInfo body, string collectionId = null, BusinessAttributeUpdateBehavior? businessAttributeUpdateBehavior = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(atlasEntitiesWithExtInfo, nameof(atlasEntitiesWithExtInfo)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = atlasEntitiesWithExtInfo.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await BatchCreateOrUpdateAsync(content, collectionId, businessAttributeUpdateBehavior?.ToString(), context).ConfigureAwait(false); return Response.FromValue(EntityMutationResult.FromResponse(response), response); @@ -384,10 +375,7 @@ public virtual async Task> BatchCreateOrUpdateAsy /// For each contact type, the maximum number of contacts /// is 20. /// - /// - /// An instance of an entity along with extended info - like hive_table, - /// hive_database. - /// + /// Body parameter. /// /// The collection where entities will be moved to. Only specify a value if you /// need to move an entity to another collection. @@ -397,13 +385,13 @@ public virtual async Task> BatchCreateOrUpdateAsy /// entities. /// /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual Response BatchCreateOrUpdate(AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo, string collectionId = null, BusinessAttributeUpdateBehavior? businessAttributeUpdateBehavior = null, CancellationToken cancellationToken = default) + public virtual Response BatchCreateOrUpdate(AtlasEntitiesWithExtInfo body, string collectionId = null, BusinessAttributeUpdateBehavior? businessAttributeUpdateBehavior = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(atlasEntitiesWithExtInfo, nameof(atlasEntitiesWithExtInfo)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = atlasEntitiesWithExtInfo.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = BatchCreateOrUpdate(content, collectionId, businessAttributeUpdateBehavior?.ToString(), context); return Response.FromValue(EntityMutationResult.FromResponse(response), response); @@ -632,30 +620,30 @@ public virtual Response BatchDelete(IEnumerable guid, RequestContext con } /// Associate a classification to multiple entities in bulk. - /// The request payload for classification association. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual async Task AddClassificationAsync(ClassificationAssociateConfig classificationAssociateConfig, CancellationToken cancellationToken = default) + public virtual async Task AddClassificationAsync(ClassificationAssociateConfig body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(classificationAssociateConfig, nameof(classificationAssociateConfig)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = classificationAssociateConfig.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await AddClassificationAsync(content, context).ConfigureAwait(false); return response; } /// Associate a classification to multiple entities in bulk. - /// The request payload for classification association. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual Response AddClassification(ClassificationAssociateConfig classificationAssociateConfig, CancellationToken cancellationToken = default) + public virtual Response AddClassification(ClassificationAssociateConfig body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(classificationAssociateConfig, nameof(classificationAssociateConfig)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = classificationAssociateConfig.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = AddClassification(content, context); return response; @@ -1868,24 +1856,21 @@ public virtual Response GetByUniqueAttribute(string typeName, bool? minExtInfo, /// /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. /// /// The name of the type. - /// - /// An instance of an entity along with extended info - like hive_table, - /// hive_database. - /// + /// Body parameter. /// /// The qualified name of the entity. (This is only an example. qualifiedName can /// be changed to other unique attributes) /// /// The cancellation token to use. - /// or is null. + /// or is null. /// is an empty string, and was expected to be non-empty. /// - public virtual async Task> UpdateByUniqueAttributeAsync(string typeName, AtlasEntityWithExtInfo atlasEntityWithExtInfo, string attribute = null, CancellationToken cancellationToken = default) + public virtual async Task> UpdateByUniqueAttributeAsync(string typeName, AtlasEntityWithExtInfo body, string attribute = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); - Argument.AssertNotNull(atlasEntityWithExtInfo, nameof(atlasEntityWithExtInfo)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = atlasEntityWithExtInfo.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await UpdateByUniqueAttributeAsync(typeName, content, attribute, context).ConfigureAwait(false); return Response.FromValue(EntityMutationResult.FromResponse(response), response); @@ -1910,24 +1895,21 @@ public virtual async Task> UpdateByUniqueAttribut /// /v2/entity/uniqueAttribute/type/aType?attr:aTypeAttribute=someValue. /// /// The name of the type. - /// - /// An instance of an entity along with extended info - like hive_table, - /// hive_database. - /// + /// Body parameter. /// /// The qualified name of the entity. (This is only an example. qualifiedName can /// be changed to other unique attributes) /// /// The cancellation token to use. - /// or is null. + /// or is null. /// is an empty string, and was expected to be non-empty. /// - public virtual Response UpdateByUniqueAttribute(string typeName, AtlasEntityWithExtInfo atlasEntityWithExtInfo, string attribute = null, CancellationToken cancellationToken = default) + public virtual Response UpdateByUniqueAttribute(string typeName, AtlasEntityWithExtInfo body, string attribute = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(typeName, nameof(typeName)); - Argument.AssertNotNull(atlasEntityWithExtInfo, nameof(atlasEntityWithExtInfo)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = atlasEntityWithExtInfo.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = UpdateByUniqueAttribute(typeName, content, attribute, context); return Response.FromValue(EntityMutationResult.FromResponse(response), response); @@ -2588,15 +2570,15 @@ public virtual Response UpdateClassificationsUniqueByAttribute(string typeName, } /// Set classifications on entities in bulk. - /// An instance of an entity header map. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual async Task>> BatchSetClassificationsAsync(AtlasEntityHeaders atlasEntityHeaders, CancellationToken cancellationToken = default) + public virtual async Task>> BatchSetClassificationsAsync(AtlasEntityHeaders body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(atlasEntityHeaders, nameof(atlasEntityHeaders)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = atlasEntityHeaders.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await BatchSetClassificationsAsync(content, context).ConfigureAwait(false); IReadOnlyList value = default; @@ -2611,15 +2593,15 @@ public virtual async Task>> BatchSetClassificatio } /// Set classifications on entities in bulk. - /// An instance of an entity header map. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual Response> BatchSetClassifications(AtlasEntityHeaders atlasEntityHeaders, CancellationToken cancellationToken = default) + public virtual Response> BatchSetClassifications(AtlasEntityHeaders body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(atlasEntityHeaders, nameof(atlasEntityHeaders)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = atlasEntityHeaders.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = BatchSetClassifications(content, context); IReadOnlyList value = default; @@ -3634,30 +3616,30 @@ public virtual Response GetBusinessMetadataTemplate(RequestContext context) } /// Upload the file for creating Business Metadata in BULK. - /// Business metadata to send to the service. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual async Task> ImportBusinessMetadataAsync(BusinessMetadataOptions businessMetadataOptions, CancellationToken cancellationToken = default) + public virtual async Task> ImportBusinessMetadataAsync(BusinessMetadataOptions body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(businessMetadataOptions, nameof(businessMetadataOptions)); + Argument.AssertNotNull(body, nameof(body)); - using MultipartFormDataRequestContent content = businessMetadataOptions.ToMultipartRequestContent(); + using MultipartFormDataRequestContent content = body.ToMultipartRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await ImportBusinessMetadataAsync(content, content.ContentType, context).ConfigureAwait(false); return Response.FromValue(BulkImportResult.FromResponse(response), response); } /// Upload the file for creating Business Metadata in BULK. - /// Business metadata to send to the service. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual Response ImportBusinessMetadata(BusinessMetadataOptions businessMetadataOptions, CancellationToken cancellationToken = default) + public virtual Response ImportBusinessMetadata(BusinessMetadataOptions body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(businessMetadataOptions, nameof(businessMetadataOptions)); + Argument.AssertNotNull(body, nameof(body)); - using MultipartFormDataRequestContent content = businessMetadataOptions.ToMultipartRequestContent(); + using MultipartFormDataRequestContent content = body.ToMultipartRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = ImportBusinessMetadata(content, content.ContentType, context); return Response.FromValue(BulkImportResult.FromResponse(response), response); @@ -4661,16 +4643,16 @@ public virtual Response AddLabelsByUniqueAttribute(string typeName, RequestConte /// Move existing entities to the target collection. /// The collection where entities will be moved to. - /// MoveEntitiesOptions. + /// Body parameter. /// The cancellation token to use. - /// or is null. + /// or is null. /// - public virtual async Task> MoveEntitiesToCollectionAsync(string collectionId, MoveEntitiesConfig moveEntitiesConfig, CancellationToken cancellationToken = default) + public virtual async Task> MoveEntitiesToCollectionAsync(string collectionId, MoveEntitiesConfig body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(collectionId, nameof(collectionId)); - Argument.AssertNotNull(moveEntitiesConfig, nameof(moveEntitiesConfig)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = moveEntitiesConfig.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await MoveEntitiesToCollectionAsync(collectionId, content, context).ConfigureAwait(false); return Response.FromValue(EntityMutationResult.FromResponse(response), response); @@ -4678,16 +4660,16 @@ public virtual async Task> MoveEntitiesToCollecti /// Move existing entities to the target collection. /// The collection where entities will be moved to. - /// MoveEntitiesOptions. + /// Body parameter. /// The cancellation token to use. - /// or is null. + /// or is null. /// - public virtual Response MoveEntitiesToCollection(string collectionId, MoveEntitiesConfig moveEntitiesConfig, CancellationToken cancellationToken = default) + public virtual Response MoveEntitiesToCollection(string collectionId, MoveEntitiesConfig body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(collectionId, nameof(collectionId)); - Argument.AssertNotNull(moveEntitiesConfig, nameof(moveEntitiesConfig)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = moveEntitiesConfig.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = MoveEntitiesToCollection(collectionId, content, context); return Response.FromValue(EntityMutationResult.FromResponse(response), response); diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Glossary.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Glossary.cs index 80b03e3909711..2755c07b0e21b 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Glossary.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Glossary.cs @@ -54,12 +54,8 @@ internal Glossary(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, To /// /// Get all glossaries. Recommend using limit/offset to get pagination result. /// Recommend using 'ignoreTermsAndCategories=true' and fetch terms/categories - /// separately using - /// - /// 'GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms' - /// and - /// - /// 'GET '/datamap/api/atlas/v2/glossary/{glossaryId}/categories'. + /// separately using 'GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms' + /// and 'GET '/datamap/api/atlas/v2/glossary/{glossaryId}/categories'. /// /// The page size - by default there is no paging. /// The offset for pagination purpose. @@ -85,12 +81,8 @@ public virtual async Task>> BatchGetAsync( /// /// Get all glossaries. Recommend using limit/offset to get pagination result. /// Recommend using 'ignoreTermsAndCategories=true' and fetch terms/categories - /// separately using - /// - /// 'GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms' - /// and - /// - /// 'GET '/datamap/api/atlas/v2/glossary/{glossaryId}/categories'. + /// separately using 'GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms' + /// and 'GET '/datamap/api/atlas/v2/glossary/{glossaryId}/categories'. /// /// The page size - by default there is no paging. /// The offset for pagination purpose. @@ -116,12 +108,8 @@ public virtual Response> BatchGet(int? limit = null /// /// [Protocol Method] Get all glossaries. Recommend using limit/offset to get pagination result. /// Recommend using 'ignoreTermsAndCategories=true' and fetch terms/categories - /// separately using - /// - /// 'GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms' - /// and - /// - /// 'GET '/datamap/api/atlas/v2/glossary/{glossaryId}/categories'. + /// separately using 'GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms' + /// and 'GET '/datamap/api/atlas/v2/glossary/{glossaryId}/categories'. /// /// /// @@ -162,12 +150,8 @@ public virtual async Task BatchGetAsync(int? limit, int? offset, strin /// /// [Protocol Method] Get all glossaries. Recommend using limit/offset to get pagination result. /// Recommend using 'ignoreTermsAndCategories=true' and fetch terms/categories - /// separately using - /// - /// 'GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms' - /// and - /// - /// 'GET '/datamap/api/atlas/v2/glossary/{glossaryId}/categories'. + /// separately using 'GET /datamap/api/atlas/v2/glossary/{glossaryId}/terms' + /// and 'GET '/datamap/api/atlas/v2/glossary/{glossaryId}/categories'. /// /// /// @@ -206,30 +190,30 @@ public virtual Response BatchGet(int? limit, int? offset, string sort, bool? ign } /// Create a glossary. - /// The glossary object. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual async Task> CreateAsync(AtlasGlossary atlasGlossary, CancellationToken cancellationToken = default) + public virtual async Task> CreateAsync(AtlasGlossary body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(atlasGlossary, nameof(atlasGlossary)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = atlasGlossary.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await CreateAsync(content, context).ConfigureAwait(false); return Response.FromValue(AtlasGlossary.FromResponse(response), response); } /// Create a glossary. - /// The glossary object. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual Response Create(AtlasGlossary atlasGlossary, CancellationToken cancellationToken = default) + public virtual Response Create(AtlasGlossary body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(atlasGlossary, nameof(atlasGlossary)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = atlasGlossary.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = Create(content, context); return Response.FromValue(AtlasGlossary.FromResponse(response), response); @@ -438,30 +422,30 @@ public virtual Response CreateCategories(RequestContent content, RequestContext } /// Create a glossary category. - /// The glossary category. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual async Task> CreateCategoryAsync(AtlasGlossaryCategory atlasGlossaryCategory, CancellationToken cancellationToken = default) + public virtual async Task> CreateCategoryAsync(AtlasGlossaryCategory body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(atlasGlossaryCategory, nameof(atlasGlossaryCategory)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = atlasGlossaryCategory.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await CreateCategoryAsync(content, context).ConfigureAwait(false); return Response.FromValue(AtlasGlossaryCategory.FromResponse(response), response); } /// Create a glossary category. - /// The glossary category. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual Response CreateCategory(AtlasGlossaryCategory atlasGlossaryCategory, CancellationToken cancellationToken = default) + public virtual Response CreateCategory(AtlasGlossaryCategory body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(atlasGlossaryCategory, nameof(atlasGlossaryCategory)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = atlasGlossaryCategory.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = CreateCategory(content, context); return Response.FromValue(AtlasGlossaryCategory.FromResponse(response), response); @@ -657,17 +641,17 @@ public virtual Response GetCategory(string categoryId, RequestContext context) /// Update the given glossary category by its GUID. /// The globally unique identifier of the category. - /// The glossary category. + /// Body parameter. /// The cancellation token to use. - /// or is null. + /// or is null. /// is an empty string, and was expected to be non-empty. /// - public virtual async Task> UpdateCategoryAsync(string categoryId, AtlasGlossaryCategory atlasGlossaryCategory, CancellationToken cancellationToken = default) + public virtual async Task> UpdateCategoryAsync(string categoryId, AtlasGlossaryCategory body, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(categoryId, nameof(categoryId)); - Argument.AssertNotNull(atlasGlossaryCategory, nameof(atlasGlossaryCategory)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = atlasGlossaryCategory.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await UpdateCategoryAsync(categoryId, content, context).ConfigureAwait(false); return Response.FromValue(AtlasGlossaryCategory.FromResponse(response), response); @@ -675,17 +659,17 @@ public virtual async Task> UpdateCategoryAsync(s /// Update the given glossary category by its GUID. /// The globally unique identifier of the category. - /// The glossary category. + /// Body parameter. /// The cancellation token to use. - /// or is null. + /// or is null. /// is an empty string, and was expected to be non-empty. /// - public virtual Response UpdateCategory(string categoryId, AtlasGlossaryCategory atlasGlossaryCategory, CancellationToken cancellationToken = default) + public virtual Response UpdateCategory(string categoryId, AtlasGlossaryCategory body, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(categoryId, nameof(categoryId)); - Argument.AssertNotNull(atlasGlossaryCategory, nameof(atlasGlossaryCategory)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = atlasGlossaryCategory.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = UpdateCategory(categoryId, content, context); return Response.FromValue(AtlasGlossaryCategory.FromResponse(response), response); @@ -1290,32 +1274,32 @@ public virtual Response GetCategoryTerms(string categoryId, int? limit, int? off } /// Create a glossary term. - /// The glossary term. + /// Body parameter. /// Whether include term hierarchy. /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual async Task> CreateTermAsync(AtlasGlossaryTerm atlasGlossaryTerm, bool? includeTermHierarchy = null, CancellationToken cancellationToken = default) + public virtual async Task> CreateTermAsync(AtlasGlossaryTerm body, bool? includeTermHierarchy = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(atlasGlossaryTerm, nameof(atlasGlossaryTerm)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = atlasGlossaryTerm.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await CreateTermAsync(content, includeTermHierarchy, context).ConfigureAwait(false); return Response.FromValue(AtlasGlossaryTerm.FromResponse(response), response); } /// Create a glossary term. - /// The glossary term. + /// Body parameter. /// Whether include term hierarchy. /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual Response CreateTerm(AtlasGlossaryTerm atlasGlossaryTerm, bool? includeTermHierarchy = null, CancellationToken cancellationToken = default) + public virtual Response CreateTerm(AtlasGlossaryTerm body, bool? includeTermHierarchy = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(atlasGlossaryTerm, nameof(atlasGlossaryTerm)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = atlasGlossaryTerm.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = CreateTerm(content, includeTermHierarchy, context); return Response.FromValue(AtlasGlossaryTerm.FromResponse(response), response); @@ -1513,18 +1497,18 @@ public virtual Response GetTerm(string termId, RequestContext context) /// Update the given glossary term by its GUID. /// The globally unique identifier for glossary term. - /// The glossary term. + /// Body parameter. /// Whether include term hierarchy. /// The cancellation token to use. - /// or is null. + /// or is null. /// is an empty string, and was expected to be non-empty. /// - public virtual async Task> UpdateTermAsync(string termId, AtlasGlossaryTerm atlasGlossaryTerm, bool? includeTermHierarchy = null, CancellationToken cancellationToken = default) + public virtual async Task> UpdateTermAsync(string termId, AtlasGlossaryTerm body, bool? includeTermHierarchy = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(termId, nameof(termId)); - Argument.AssertNotNull(atlasGlossaryTerm, nameof(atlasGlossaryTerm)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = atlasGlossaryTerm.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await UpdateTermAsync(termId, content, includeTermHierarchy, context).ConfigureAwait(false); return Response.FromValue(AtlasGlossaryTerm.FromResponse(response), response); @@ -1532,18 +1516,18 @@ public virtual async Task> UpdateTermAsync(string te /// Update the given glossary term by its GUID. /// The globally unique identifier for glossary term. - /// The glossary term. + /// Body parameter. /// Whether include term hierarchy. /// The cancellation token to use. - /// or is null. + /// or is null. /// is an empty string, and was expected to be non-empty. /// - public virtual Response UpdateTerm(string termId, AtlasGlossaryTerm atlasGlossaryTerm, bool? includeTermHierarchy = null, CancellationToken cancellationToken = default) + public virtual Response UpdateTerm(string termId, AtlasGlossaryTerm body, bool? includeTermHierarchy = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(termId, nameof(termId)); - Argument.AssertNotNull(atlasGlossaryTerm, nameof(atlasGlossaryTerm)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = atlasGlossaryTerm.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = UpdateTerm(termId, content, includeTermHierarchy, context); return Response.FromValue(AtlasGlossaryTerm.FromResponse(response), response); @@ -2665,18 +2649,18 @@ public virtual Response GetGlossary(string glossaryId, RequestContext context) /// Update the given glossary. /// The globally unique identifier for glossary. - /// The glossary object. + /// Body parameter. /// Whether ignore terms and categories. /// The cancellation token to use. - /// or is null. + /// or is null. /// is an empty string, and was expected to be non-empty. /// - public virtual async Task> UpdateAsync(string glossaryId, AtlasGlossary atlasGlossary, bool? ignoreTermsAndCategories = null, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(string glossaryId, AtlasGlossary body, bool? ignoreTermsAndCategories = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); - Argument.AssertNotNull(atlasGlossary, nameof(atlasGlossary)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = atlasGlossary.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await UpdateAsync(glossaryId, content, ignoreTermsAndCategories, context).ConfigureAwait(false); return Response.FromValue(AtlasGlossary.FromResponse(response), response); @@ -2684,18 +2668,18 @@ public virtual async Task> UpdateAsync(string glossaryId /// Update the given glossary. /// The globally unique identifier for glossary. - /// The glossary object. + /// Body parameter. /// Whether ignore terms and categories. /// The cancellation token to use. - /// or is null. + /// or is null. /// is an empty string, and was expected to be non-empty. /// - public virtual Response Update(string glossaryId, AtlasGlossary atlasGlossary, bool? ignoreTermsAndCategories = null, CancellationToken cancellationToken = default) + public virtual Response Update(string glossaryId, AtlasGlossary body, bool? ignoreTermsAndCategories = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(glossaryId, nameof(glossaryId)); - Argument.AssertNotNull(atlasGlossary, nameof(atlasGlossary)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = atlasGlossary.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = Update(glossaryId, content, ignoreTermsAndCategories, context); return Response.FromValue(AtlasGlossary.FromResponse(response), response); diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Relationship.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Relationship.cs index 584290f5b3fc2..0958359785652 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Relationship.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Relationship.cs @@ -47,30 +47,30 @@ internal Relationship(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline } /// Create a new relationship between entities. - /// Atlas relationship instance. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual async Task> CreateAsync(AtlasRelationship atlasRelationship, CancellationToken cancellationToken = default) + public virtual async Task> CreateAsync(AtlasRelationship body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(atlasRelationship, nameof(atlasRelationship)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = atlasRelationship.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await CreateAsync(content, context).ConfigureAwait(false); return Response.FromValue(AtlasRelationship.FromResponse(response), response); } /// Create a new relationship between entities. - /// Atlas relationship instance. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual Response Create(AtlasRelationship atlasRelationship, CancellationToken cancellationToken = default) + public virtual Response Create(AtlasRelationship body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(atlasRelationship, nameof(atlasRelationship)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = atlasRelationship.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = Create(content, context); return Response.FromValue(AtlasRelationship.FromResponse(response), response); @@ -155,30 +155,30 @@ public virtual Response Create(RequestContent content, RequestContext context = } /// Update an existing relationship between entities. - /// Atlas relationship instance. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual async Task> UpdateAsync(AtlasRelationship atlasRelationship, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(AtlasRelationship body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(atlasRelationship, nameof(atlasRelationship)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = atlasRelationship.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await UpdateAsync(content, context).ConfigureAwait(false); return Response.FromValue(AtlasRelationship.FromResponse(response), response); } /// Update an existing relationship between entities. - /// Atlas relationship instance. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual Response Update(AtlasRelationship atlasRelationship, CancellationToken cancellationToken = default) + public virtual Response Update(AtlasRelationship body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(atlasRelationship, nameof(atlasRelationship)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = atlasRelationship.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = Update(content, context); return Response.FromValue(AtlasRelationship.FromResponse(response), response); diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TypeDefinition.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TypeDefinition.cs index adf1eea92bc49..90cbe70034295 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TypeDefinition.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/TypeDefinition.cs @@ -1777,48 +1777,38 @@ public virtual Response GetTypeDefinition(bool? includeTermTemplate, string type } } - /// - /// Create all atlas type definitions in bulk, only new definitions will be - /// created. - /// Any changes to the existing definitions will be discarded. - /// - /// The definitions of types. + /// Create all atlas type definitions in bulk. Please avoid recreating existing types. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual async Task> BatchCreateAsync(AtlasTypesDef atlasTypesDef, CancellationToken cancellationToken = default) + public virtual async Task> BatchCreateAsync(AtlasTypesDef body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(atlasTypesDef, nameof(atlasTypesDef)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = atlasTypesDef.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await BatchCreateAsync(content, context).ConfigureAwait(false); return Response.FromValue(AtlasTypesDef.FromResponse(response), response); } - /// - /// Create all atlas type definitions in bulk, only new definitions will be - /// created. - /// Any changes to the existing definitions will be discarded. - /// - /// The definitions of types. + /// Create all atlas type definitions in bulk. Please avoid recreating existing types. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual Response BatchCreate(AtlasTypesDef atlasTypesDef, CancellationToken cancellationToken = default) + public virtual Response BatchCreate(AtlasTypesDef body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(atlasTypesDef, nameof(atlasTypesDef)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = atlasTypesDef.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = BatchCreate(content, context); return Response.FromValue(AtlasTypesDef.FromResponse(response), response); } /// - /// [Protocol Method] Create all atlas type definitions in bulk, only new definitions will be - /// created. - /// Any changes to the existing definitions will be discarded. + /// [Protocol Method] Create all atlas type definitions in bulk. Please avoid recreating existing types. /// /// /// @@ -1857,9 +1847,7 @@ public virtual async Task BatchCreateAsync(RequestContent content, Req } /// - /// [Protocol Method] Create all atlas type definitions in bulk, only new definitions will be - /// created. - /// Any changes to the existing definitions will be discarded. + /// [Protocol Method] Create all atlas type definitions in bulk. Please avoid recreating existing types. /// /// /// @@ -1901,15 +1889,15 @@ public virtual Response BatchCreate(RequestContent content, RequestContext conte /// Update all types in bulk, changes detected in the type definitions would be /// persisted. /// - /// The definitions of types. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual async Task> BatchUpdateAsync(AtlasTypesDef atlasTypesDef, CancellationToken cancellationToken = default) + public virtual async Task> BatchUpdateAsync(AtlasTypesDef body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(atlasTypesDef, nameof(atlasTypesDef)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = atlasTypesDef.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await BatchUpdateAsync(content, context).ConfigureAwait(false); return Response.FromValue(AtlasTypesDef.FromResponse(response), response); @@ -1919,15 +1907,15 @@ public virtual async Task> BatchUpdateAsync(AtlasTypesDe /// Update all types in bulk, changes detected in the type definitions would be /// persisted. /// - /// The definitions of types. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual Response BatchUpdate(AtlasTypesDef atlasTypesDef, CancellationToken cancellationToken = default) + public virtual Response BatchUpdate(AtlasTypesDef body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(atlasTypesDef, nameof(atlasTypesDef)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = atlasTypesDef.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = BatchUpdate(content, context); return Response.FromValue(AtlasTypesDef.FromResponse(response), response); @@ -2014,30 +2002,30 @@ public virtual Response BatchUpdate(RequestContent content, RequestContext conte } /// Delete API for all types in bulk. - /// The definitions of types. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual async Task BatchDeleteAsync(AtlasTypesDef atlasTypesDef, CancellationToken cancellationToken = default) + public virtual async Task BatchDeleteAsync(AtlasTypesDef body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(atlasTypesDef, nameof(atlasTypesDef)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = atlasTypesDef.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = await BatchDeleteAsync(content, context).ConfigureAwait(false); return response; } /// Delete API for all types in bulk. - /// The definitions of types. + /// Body parameter. /// The cancellation token to use. - /// is null. + /// is null. /// - public virtual Response BatchDelete(AtlasTypesDef atlasTypesDef, CancellationToken cancellationToken = default) + public virtual Response BatchDelete(AtlasTypesDef body, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(atlasTypesDef, nameof(atlasTypesDef)); + Argument.AssertNotNull(body, nameof(body)); - using RequestContent content = atlasTypesDef.ToRequestContent(); + using RequestContent content = body.ToRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); Response response = BatchDelete(content, context); return response; diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Discovery.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Discovery.cs index a4a0aebb4e846..d00590016f694 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Discovery.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Discovery.cs @@ -54,8 +54,8 @@ public void Example_Discovery_Query_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - QueryConfig queryConfig = new QueryConfig(); - Response response = client.Query(queryConfig); + QueryConfig body = new QueryConfig(); + Response response = client.Query(body); } [Test] @@ -66,8 +66,8 @@ public async Task Example_Discovery_Query_ShortVersion_Convenience_Async() TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - QueryConfig queryConfig = new QueryConfig(); - Response response = await client.QueryAsync(queryConfig); + QueryConfig body = new QueryConfig(); + Response response = await client.QueryAsync(body); } [Test] @@ -272,7 +272,7 @@ public void Example_Discovery_Query_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - QueryConfig queryConfig = new QueryConfig + QueryConfig body = new QueryConfig { Keywords = "", Limit = 1234, @@ -295,7 +295,7 @@ public void Example_Discovery_Query_AllParameters_Convenience() Facet = default, }, }; - Response response = client.Query(queryConfig); + Response response = client.Query(body); } [Test] @@ -306,7 +306,7 @@ public async Task Example_Discovery_Query_AllParameters_Convenience_Async() TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - QueryConfig queryConfig = new QueryConfig + QueryConfig body = new QueryConfig { Keywords = "", Limit = 1234, @@ -329,7 +329,7 @@ public async Task Example_Discovery_Query_AllParameters_Convenience_Async() Facet = default, }, }; - Response response = await client.QueryAsync(queryConfig); + Response response = await client.QueryAsync(body); } [Test] @@ -370,8 +370,8 @@ public void Example_Discovery_Suggest_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - SuggestConfig suggestConfig = new SuggestConfig(); - Response response = client.Suggest(suggestConfig); + SuggestConfig body = new SuggestConfig(); + Response response = client.Suggest(body); } [Test] @@ -382,8 +382,8 @@ public async Task Example_Discovery_Suggest_ShortVersion_Convenience_Async() TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - SuggestConfig suggestConfig = new SuggestConfig(); - Response response = await client.SuggestAsync(suggestConfig); + SuggestConfig body = new SuggestConfig(); + Response response = await client.SuggestAsync(body); } [Test] @@ -484,13 +484,13 @@ public void Example_Discovery_Suggest_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - SuggestConfig suggestConfig = new SuggestConfig + SuggestConfig body = new SuggestConfig { Keywords = "", Limit = 1234, Filter = BinaryData.FromObjectAsJson(new object()), }; - Response response = client.Suggest(suggestConfig); + Response response = client.Suggest(body); } [Test] @@ -501,13 +501,13 @@ public async Task Example_Discovery_Suggest_AllParameters_Convenience_Async() TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - SuggestConfig suggestConfig = new SuggestConfig + SuggestConfig body = new SuggestConfig { Keywords = "", Limit = 1234, Filter = BinaryData.FromObjectAsJson(new object()), }; - Response response = await client.SuggestAsync(suggestConfig); + Response response = await client.SuggestAsync(body); } [Test] @@ -548,8 +548,8 @@ public void Example_Discovery_AutoComplete_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - AutoCompleteConfig autoCompleteConfig = new AutoCompleteConfig(); - Response response = client.AutoComplete(autoCompleteConfig); + AutoCompleteConfig body = new AutoCompleteConfig(); + Response response = client.AutoComplete(body); } [Test] @@ -560,8 +560,8 @@ public async Task Example_Discovery_AutoComplete_ShortVersion_Convenience_Async( TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - AutoCompleteConfig autoCompleteConfig = new AutoCompleteConfig(); - Response response = await client.AutoCompleteAsync(autoCompleteConfig); + AutoCompleteConfig body = new AutoCompleteConfig(); + Response response = await client.AutoCompleteAsync(body); } [Test] @@ -614,13 +614,13 @@ public void Example_Discovery_AutoComplete_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - AutoCompleteConfig autoCompleteConfig = new AutoCompleteConfig + AutoCompleteConfig body = new AutoCompleteConfig { Keywords = "", Limit = 1234, Filter = BinaryData.FromObjectAsJson(new object()), }; - Response response = client.AutoComplete(autoCompleteConfig); + Response response = client.AutoComplete(body); } [Test] @@ -631,13 +631,13 @@ public async Task Example_Discovery_AutoComplete_AllParameters_Convenience_Async TokenCredential credential = new DefaultAzureCredential(); Discovery client = new DataMapClient(endpoint, credential).GetDiscoveryClient(apiVersion: "2023-09-01"); - AutoCompleteConfig autoCompleteConfig = new AutoCompleteConfig + AutoCompleteConfig body = new AutoCompleteConfig { Keywords = "", Limit = 1234, Filter = BinaryData.FromObjectAsJson(new object()), }; - Response response = await client.AutoCompleteAsync(autoCompleteConfig); + Response response = await client.AutoCompleteAsync(body); } } } diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Entity.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Entity.cs index bb809859f3af6..3fdd99d59980c 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Entity.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Entity.cs @@ -56,8 +56,8 @@ public void Example_Entity_CreateOrUpdate_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo(); - Response response = client.CreateOrUpdate(atlasEntityWithExtInfo); + AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo(); + Response response = client.CreateOrUpdate(body); } [Test] @@ -68,8 +68,8 @@ public async Task Example_Entity_CreateOrUpdate_ShortVersion_Convenience_Async() TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo(); - Response response = await client.CreateOrUpdateAsync(atlasEntityWithExtInfo); + AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo(); + Response response = await client.CreateOrUpdateAsync(body); } [Test] @@ -404,7 +404,7 @@ public void Example_Entity_CreateOrUpdate_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo + AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo { ReferredEntities = { @@ -482,7 +482,7 @@ public void Example_Entity_CreateOrUpdate_AllParameters_Convenience() }, Entity = default, }; - Response response = client.CreateOrUpdate(atlasEntityWithExtInfo, businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore, collectionId: ""); + Response response = client.CreateOrUpdate(body, businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore, collectionId: ""); } [Test] @@ -493,7 +493,7 @@ public async Task Example_Entity_CreateOrUpdate_AllParameters_Convenience_Async( TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo + AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo { ReferredEntities = { @@ -571,7 +571,7 @@ public async Task Example_Entity_CreateOrUpdate_AllParameters_Convenience_Async( }, Entity = default, }; - Response response = await client.CreateOrUpdateAsync(atlasEntityWithExtInfo, businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore, collectionId: ""); + Response response = await client.CreateOrUpdateAsync(body, businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore, collectionId: ""); } [Test] @@ -866,8 +866,8 @@ public void Example_Entity_BatchCreateOrUpdate_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo = new AtlasEntitiesWithExtInfo(); - Response response = client.BatchCreateOrUpdate(atlasEntitiesWithExtInfo); + AtlasEntitiesWithExtInfo body = new AtlasEntitiesWithExtInfo(); + Response response = client.BatchCreateOrUpdate(body); } [Test] @@ -878,8 +878,8 @@ public async Task Example_Entity_BatchCreateOrUpdate_ShortVersion_Convenience_As TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo = new AtlasEntitiesWithExtInfo(); - Response response = await client.BatchCreateOrUpdateAsync(atlasEntitiesWithExtInfo); + AtlasEntitiesWithExtInfo body = new AtlasEntitiesWithExtInfo(); + Response response = await client.BatchCreateOrUpdateAsync(body); } [Test] @@ -1222,7 +1222,7 @@ public void Example_Entity_BatchCreateOrUpdate_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo = new AtlasEntitiesWithExtInfo + AtlasEntitiesWithExtInfo body = new AtlasEntitiesWithExtInfo { ReferredEntities = { @@ -1300,7 +1300,7 @@ public void Example_Entity_BatchCreateOrUpdate_AllParameters_Convenience() }, Entities = { default }, }; - Response response = client.BatchCreateOrUpdate(atlasEntitiesWithExtInfo, collectionId: "", businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore); + Response response = client.BatchCreateOrUpdate(body, collectionId: "", businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore); } [Test] @@ -1311,7 +1311,7 @@ public async Task Example_Entity_BatchCreateOrUpdate_AllParameters_Convenience_A TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo = new AtlasEntitiesWithExtInfo + AtlasEntitiesWithExtInfo body = new AtlasEntitiesWithExtInfo { ReferredEntities = { @@ -1389,7 +1389,7 @@ public async Task Example_Entity_BatchCreateOrUpdate_AllParameters_Convenience_A }, Entities = { default }, }; - Response response = await client.BatchCreateOrUpdateAsync(atlasEntitiesWithExtInfo, collectionId: "", businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore); + Response response = await client.BatchCreateOrUpdateAsync(body, collectionId: "", businessAttributeUpdateBehavior: BusinessAttributeUpdateBehavior.Ignore); } [Test] @@ -1640,8 +1640,8 @@ public void Example_Entity_AddClassification_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - ClassificationAssociateConfig classificationAssociateConfig = new ClassificationAssociateConfig(); - Response response = client.AddClassification(classificationAssociateConfig); + ClassificationAssociateConfig body = new ClassificationAssociateConfig(); + Response response = client.AddClassification(body); } [Test] @@ -1652,8 +1652,8 @@ public async Task Example_Entity_AddClassification_ShortVersion_Convenience_Asyn TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - ClassificationAssociateConfig classificationAssociateConfig = new ClassificationAssociateConfig(); - Response response = await client.AddClassificationAsync(classificationAssociateConfig); + ClassificationAssociateConfig body = new ClassificationAssociateConfig(); + Response response = await client.AddClassificationAsync(body); } [Test] @@ -1746,7 +1746,7 @@ public void Example_Entity_AddClassification_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - ClassificationAssociateConfig classificationAssociateConfig = new ClassificationAssociateConfig + ClassificationAssociateConfig body = new ClassificationAssociateConfig { Classification = new AtlasClassification { @@ -1768,7 +1768,7 @@ public void Example_Entity_AddClassification_AllParameters_Convenience() }, EntityGuids = { "" }, }; - Response response = client.AddClassification(classificationAssociateConfig); + Response response = client.AddClassification(body); } [Test] @@ -1779,7 +1779,7 @@ public async Task Example_Entity_AddClassification_AllParameters_Convenience_Asy TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - ClassificationAssociateConfig classificationAssociateConfig = new ClassificationAssociateConfig + ClassificationAssociateConfig body = new ClassificationAssociateConfig { Classification = new AtlasClassification { @@ -1801,7 +1801,7 @@ public async Task Example_Entity_AddClassification_AllParameters_Convenience_Asy }, EntityGuids = { "" }, }; - Response response = await client.AddClassificationAsync(classificationAssociateConfig); + Response response = await client.AddClassificationAsync(body); } [Test] @@ -3452,8 +3452,8 @@ public void Example_Entity_UpdateByUniqueAttribute_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo(); - Response response = client.UpdateByUniqueAttribute("", atlasEntityWithExtInfo); + AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo(); + Response response = client.UpdateByUniqueAttribute("", body); } [Test] @@ -3464,8 +3464,8 @@ public async Task Example_Entity_UpdateByUniqueAttribute_ShortVersion_Convenienc TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo(); - Response response = await client.UpdateByUniqueAttributeAsync("", atlasEntityWithExtInfo); + AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo(); + Response response = await client.UpdateByUniqueAttributeAsync("", body); } [Test] @@ -3800,7 +3800,7 @@ public void Example_Entity_UpdateByUniqueAttribute_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo + AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo { ReferredEntities = { @@ -3878,7 +3878,7 @@ public void Example_Entity_UpdateByUniqueAttribute_AllParameters_Convenience() }, Entity = default, }; - Response response = client.UpdateByUniqueAttribute("", atlasEntityWithExtInfo, attribute: ""); + Response response = client.UpdateByUniqueAttribute("", body, attribute: ""); } [Test] @@ -3889,7 +3889,7 @@ public async Task Example_Entity_UpdateByUniqueAttribute_AllParameters_Convenien TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - AtlasEntityWithExtInfo atlasEntityWithExtInfo = new AtlasEntityWithExtInfo + AtlasEntityWithExtInfo body = new AtlasEntityWithExtInfo { ReferredEntities = { @@ -3967,7 +3967,7 @@ public async Task Example_Entity_UpdateByUniqueAttribute_AllParameters_Convenien }, Entity = default, }; - Response response = await client.UpdateByUniqueAttributeAsync("", atlasEntityWithExtInfo, attribute: ""); + Response response = await client.UpdateByUniqueAttributeAsync("", body, attribute: ""); } [Test] @@ -4668,8 +4668,8 @@ public void Example_Entity_BatchSetClassifications_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - AtlasEntityHeaders atlasEntityHeaders = new AtlasEntityHeaders(); - Response> response = client.BatchSetClassifications(atlasEntityHeaders); + AtlasEntityHeaders body = new AtlasEntityHeaders(); + Response> response = client.BatchSetClassifications(body); } [Test] @@ -4680,8 +4680,8 @@ public async Task Example_Entity_BatchSetClassifications_ShortVersion_Convenienc TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - AtlasEntityHeaders atlasEntityHeaders = new AtlasEntityHeaders(); - Response> response = await client.BatchSetClassificationsAsync(atlasEntityHeaders); + AtlasEntityHeaders body = new AtlasEntityHeaders(); + Response> response = await client.BatchSetClassificationsAsync(body); } [Test] @@ -4860,7 +4860,7 @@ public void Example_Entity_BatchSetClassifications_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - AtlasEntityHeaders atlasEntityHeaders = new AtlasEntityHeaders + AtlasEntityHeaders body = new AtlasEntityHeaders { GuidHeaderMap = { @@ -4912,7 +4912,7 @@ public void Example_Entity_BatchSetClassifications_AllParameters_Convenience() } }, }; - Response> response = client.BatchSetClassifications(atlasEntityHeaders); + Response> response = client.BatchSetClassifications(body); } [Test] @@ -4923,7 +4923,7 @@ public async Task Example_Entity_BatchSetClassifications_AllParameters_Convenien TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - AtlasEntityHeaders atlasEntityHeaders = new AtlasEntityHeaders + AtlasEntityHeaders body = new AtlasEntityHeaders { GuidHeaderMap = { @@ -4975,7 +4975,7 @@ public async Task Example_Entity_BatchSetClassifications_AllParameters_Convenien } }, }; - Response> response = await client.BatchSetClassificationsAsync(atlasEntityHeaders); + Response> response = await client.BatchSetClassificationsAsync(body); } [Test] @@ -6074,8 +6074,8 @@ public void Example_Entity_ImportBusinessMetadata_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - BusinessMetadataOptions businessMetadataOptions = new BusinessMetadataOptions(null); - Response response = client.ImportBusinessMetadata(businessMetadataOptions); + BusinessMetadataOptions body = new BusinessMetadataOptions(null); + Response response = client.ImportBusinessMetadata(body); } [Test] @@ -6086,8 +6086,8 @@ public async Task Example_Entity_ImportBusinessMetadata_ShortVersion_Convenience TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - BusinessMetadataOptions businessMetadataOptions = new BusinessMetadataOptions(null); - Response response = await client.ImportBusinessMetadataAsync(businessMetadataOptions); + BusinessMetadataOptions body = new BusinessMetadataOptions(null); + Response response = await client.ImportBusinessMetadataAsync(body); } [Test] @@ -6148,8 +6148,8 @@ public void Example_Entity_ImportBusinessMetadata_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - BusinessMetadataOptions businessMetadataOptions = new BusinessMetadataOptions(null); - Response response = client.ImportBusinessMetadata(businessMetadataOptions); + BusinessMetadataOptions body = new BusinessMetadataOptions(null); + Response response = client.ImportBusinessMetadata(body); } [Test] @@ -6160,8 +6160,8 @@ public async Task Example_Entity_ImportBusinessMetadata_AllParameters_Convenienc TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(); - BusinessMetadataOptions businessMetadataOptions = new BusinessMetadataOptions(null); - Response response = await client.ImportBusinessMetadataAsync(businessMetadataOptions); + BusinessMetadataOptions body = new BusinessMetadataOptions(null); + Response response = await client.ImportBusinessMetadataAsync(body); } [Test] @@ -6838,8 +6838,8 @@ public void Example_Entity_MoveEntitiesToCollection_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - MoveEntitiesConfig moveEntitiesConfig = new MoveEntitiesConfig(); - Response response = client.MoveEntitiesToCollection("", moveEntitiesConfig); + MoveEntitiesConfig body = new MoveEntitiesConfig(); + Response response = client.MoveEntitiesToCollection("", body); } [Test] @@ -6850,8 +6850,8 @@ public async Task Example_Entity_MoveEntitiesToCollection_ShortVersion_Convenien TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - MoveEntitiesConfig moveEntitiesConfig = new MoveEntitiesConfig(); - Response response = await client.MoveEntitiesToCollectionAsync("", moveEntitiesConfig); + MoveEntitiesConfig body = new MoveEntitiesConfig(); + Response response = await client.MoveEntitiesToCollectionAsync("", body); } [Test] @@ -7016,11 +7016,11 @@ public void Example_Entity_MoveEntitiesToCollection_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - MoveEntitiesConfig moveEntitiesConfig = new MoveEntitiesConfig + MoveEntitiesConfig body = new MoveEntitiesConfig { EntityGuids = { "" }, }; - Response response = client.MoveEntitiesToCollection("", moveEntitiesConfig); + Response response = client.MoveEntitiesToCollection("", body); } [Test] @@ -7031,11 +7031,11 @@ public async Task Example_Entity_MoveEntitiesToCollection_AllParameters_Convenie TokenCredential credential = new DefaultAzureCredential(); Entity client = new DataMapClient(endpoint, credential).GetEntityClient(apiVersion: "2023-09-01"); - MoveEntitiesConfig moveEntitiesConfig = new MoveEntitiesConfig + MoveEntitiesConfig body = new MoveEntitiesConfig { EntityGuids = { "" }, }; - Response response = await client.MoveEntitiesToCollectionAsync("", moveEntitiesConfig); + Response response = await client.MoveEntitiesToCollectionAsync("", body); } } } diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Glossary.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Glossary.cs index 84afdfc0ef0f3..948999d47e962 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Glossary.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Glossary.cs @@ -219,8 +219,8 @@ public void Example_Glossary_Create_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossary atlasGlossary = new AtlasGlossary(); - Response response = client.Create(atlasGlossary); + AtlasGlossary body = new AtlasGlossary(); + Response response = client.Create(body); } [Test] @@ -231,8 +231,8 @@ public async Task Example_Glossary_Create_ShortVersion_Convenience_Async() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossary atlasGlossary = new AtlasGlossary(); - Response response = await client.CreateAsync(atlasGlossary); + AtlasGlossary body = new AtlasGlossary(); + Response response = await client.CreateAsync(body); } [Test] @@ -461,7 +461,7 @@ public void Example_Glossary_Create_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossary atlasGlossary = new AtlasGlossary + AtlasGlossary body = new AtlasGlossary { Guid = "", Classifications = {new AtlasClassification @@ -512,7 +512,7 @@ public void Example_Glossary_Create_AllParameters_Convenience() }}, Usage = "", }; - Response response = client.Create(atlasGlossary); + Response response = client.Create(body); } [Test] @@ -523,7 +523,7 @@ public async Task Example_Glossary_Create_AllParameters_Convenience_Async() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossary atlasGlossary = new AtlasGlossary + AtlasGlossary body = new AtlasGlossary { Guid = "", Classifications = {new AtlasClassification @@ -574,7 +574,7 @@ public async Task Example_Glossary_Create_AllParameters_Convenience_Async() }}, Usage = "", }; - Response response = await client.CreateAsync(atlasGlossary); + Response response = await client.CreateAsync(body); } [Test] @@ -1061,8 +1061,8 @@ public void Example_Glossary_CreateCategory_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory(); - Response response = client.CreateCategory(atlasGlossaryCategory); + AtlasGlossaryCategory body = new AtlasGlossaryCategory(); + Response response = client.CreateCategory(body); } [Test] @@ -1073,8 +1073,8 @@ public async Task Example_Glossary_CreateCategory_ShortVersion_Convenience_Async TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory(); - Response response = await client.CreateCategoryAsync(atlasGlossaryCategory); + AtlasGlossaryCategory body = new AtlasGlossaryCategory(); + Response response = await client.CreateCategoryAsync(body); } [Test] @@ -1323,7 +1323,7 @@ public void Example_Glossary_CreateCategory_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory + AtlasGlossaryCategory body = new AtlasGlossaryCategory { Guid = "", Classifications = {new AtlasClassification @@ -1379,7 +1379,7 @@ public void Example_Glossary_CreateCategory_AllParameters_Convenience() TermGuid = "", }}, }; - Response response = client.CreateCategory(atlasGlossaryCategory); + Response response = client.CreateCategory(body); } [Test] @@ -1390,7 +1390,7 @@ public async Task Example_Glossary_CreateCategory_AllParameters_Convenience_Asyn TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory + AtlasGlossaryCategory body = new AtlasGlossaryCategory { Guid = "", Classifications = {new AtlasClassification @@ -1446,7 +1446,7 @@ public async Task Example_Glossary_CreateCategory_AllParameters_Convenience_Asyn TermGuid = "", }}, }; - Response response = await client.CreateCategoryAsync(atlasGlossaryCategory); + Response response = await client.CreateCategoryAsync(body); } [Test] @@ -1663,8 +1663,8 @@ public void Example_Glossary_UpdateCategory_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory(); - Response response = client.UpdateCategory("", atlasGlossaryCategory); + AtlasGlossaryCategory body = new AtlasGlossaryCategory(); + Response response = client.UpdateCategory("", body); } [Test] @@ -1675,8 +1675,8 @@ public async Task Example_Glossary_UpdateCategory_ShortVersion_Convenience_Async TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory(); - Response response = await client.UpdateCategoryAsync("", atlasGlossaryCategory); + AtlasGlossaryCategory body = new AtlasGlossaryCategory(); + Response response = await client.UpdateCategoryAsync("", body); } [Test] @@ -1925,7 +1925,7 @@ public void Example_Glossary_UpdateCategory_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory + AtlasGlossaryCategory body = new AtlasGlossaryCategory { Guid = "", Classifications = {new AtlasClassification @@ -1981,7 +1981,7 @@ public void Example_Glossary_UpdateCategory_AllParameters_Convenience() TermGuid = "", }}, }; - Response response = client.UpdateCategory("", atlasGlossaryCategory); + Response response = client.UpdateCategory("", body); } [Test] @@ -1992,7 +1992,7 @@ public async Task Example_Glossary_UpdateCategory_AllParameters_Convenience_Asyn TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossaryCategory atlasGlossaryCategory = new AtlasGlossaryCategory + AtlasGlossaryCategory body = new AtlasGlossaryCategory { Guid = "", Classifications = {new AtlasClassification @@ -2048,7 +2048,7 @@ public async Task Example_Glossary_UpdateCategory_AllParameters_Convenience_Asyn TermGuid = "", }}, }; - Response response = await client.UpdateCategoryAsync("", atlasGlossaryCategory); + Response response = await client.UpdateCategoryAsync("", body); } [Test] @@ -2565,8 +2565,8 @@ public void Example_Glossary_CreateTerm_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm(); - Response response = client.CreateTerm(atlasGlossaryTerm); + AtlasGlossaryTerm body = new AtlasGlossaryTerm(); + Response response = client.CreateTerm(body); } [Test] @@ -2577,8 +2577,8 @@ public async Task Example_Glossary_CreateTerm_ShortVersion_Convenience_Async() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm(); - Response response = await client.CreateTermAsync(atlasGlossaryTerm); + AtlasGlossaryTerm body = new AtlasGlossaryTerm(); + Response response = await client.CreateTermAsync(body); } [Test] @@ -3309,7 +3309,7 @@ public void Example_Glossary_CreateTerm_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm + AtlasGlossaryTerm body = new AtlasGlossaryTerm { Guid = "", Classifications = {new AtlasClassification @@ -3442,7 +3442,7 @@ public void Example_Glossary_CreateTerm_AllParameters_Convenience() ValidValues = { default }, ValidValuesFor = { default }, }; - Response response = client.CreateTerm(atlasGlossaryTerm, includeTermHierarchy: true); + Response response = client.CreateTerm(body, includeTermHierarchy: true); } [Test] @@ -3453,7 +3453,7 @@ public async Task Example_Glossary_CreateTerm_AllParameters_Convenience_Async() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm + AtlasGlossaryTerm body = new AtlasGlossaryTerm { Guid = "", Classifications = {new AtlasClassification @@ -3586,7 +3586,7 @@ public async Task Example_Glossary_CreateTerm_AllParameters_Convenience_Async() ValidValues = { default }, ValidValuesFor = { default }, }; - Response response = await client.CreateTermAsync(atlasGlossaryTerm, includeTermHierarchy: true); + Response response = await client.CreateTermAsync(body, includeTermHierarchy: true); } [Test] @@ -4021,8 +4021,8 @@ public void Example_Glossary_UpdateTerm_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm(); - Response response = client.UpdateTerm("", atlasGlossaryTerm); + AtlasGlossaryTerm body = new AtlasGlossaryTerm(); + Response response = client.UpdateTerm("", body); } [Test] @@ -4033,8 +4033,8 @@ public async Task Example_Glossary_UpdateTerm_ShortVersion_Convenience_Async() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm(); - Response response = await client.UpdateTermAsync("", atlasGlossaryTerm); + AtlasGlossaryTerm body = new AtlasGlossaryTerm(); + Response response = await client.UpdateTermAsync("", body); } [Test] @@ -4765,7 +4765,7 @@ public void Example_Glossary_UpdateTerm_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm + AtlasGlossaryTerm body = new AtlasGlossaryTerm { Guid = "", Classifications = {new AtlasClassification @@ -4898,7 +4898,7 @@ public void Example_Glossary_UpdateTerm_AllParameters_Convenience() ValidValues = { default }, ValidValuesFor = { default }, }; - Response response = client.UpdateTerm("", atlasGlossaryTerm, includeTermHierarchy: true); + Response response = client.UpdateTerm("", body, includeTermHierarchy: true); } [Test] @@ -4909,7 +4909,7 @@ public async Task Example_Glossary_UpdateTerm_AllParameters_Convenience_Async() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - AtlasGlossaryTerm atlasGlossaryTerm = new AtlasGlossaryTerm + AtlasGlossaryTerm body = new AtlasGlossaryTerm { Guid = "", Classifications = {new AtlasClassification @@ -5042,7 +5042,7 @@ public async Task Example_Glossary_UpdateTerm_AllParameters_Convenience_Async() ValidValues = { default }, ValidValuesFor = { default }, }; - Response response = await client.UpdateTermAsync("", atlasGlossaryTerm, includeTermHierarchy: true); + Response response = await client.UpdateTermAsync("", body, includeTermHierarchy: true); } [Test] @@ -7459,8 +7459,8 @@ public void Example_Glossary_Update_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossary atlasGlossary = new AtlasGlossary(); - Response response = client.Update("", atlasGlossary); + AtlasGlossary body = new AtlasGlossary(); + Response response = client.Update("", body); } [Test] @@ -7471,8 +7471,8 @@ public async Task Example_Glossary_Update_ShortVersion_Convenience_Async() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(); - AtlasGlossary atlasGlossary = new AtlasGlossary(); - Response response = await client.UpdateAsync("", atlasGlossary); + AtlasGlossary body = new AtlasGlossary(); + Response response = await client.UpdateAsync("", body); } [Test] @@ -7701,7 +7701,7 @@ public void Example_Glossary_Update_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - AtlasGlossary atlasGlossary = new AtlasGlossary + AtlasGlossary body = new AtlasGlossary { Guid = "", Classifications = {new AtlasClassification @@ -7752,7 +7752,7 @@ public void Example_Glossary_Update_AllParameters_Convenience() }}, Usage = "", }; - Response response = client.Update("", atlasGlossary, ignoreTermsAndCategories: true); + Response response = client.Update("", body, ignoreTermsAndCategories: true); } [Test] @@ -7763,7 +7763,7 @@ public async Task Example_Glossary_Update_AllParameters_Convenience_Async() TokenCredential credential = new DefaultAzureCredential(); Glossary client = new DataMapClient(endpoint, credential).GetGlossaryClient(apiVersion: "2023-09-01"); - AtlasGlossary atlasGlossary = new AtlasGlossary + AtlasGlossary body = new AtlasGlossary { Guid = "", Classifications = {new AtlasClassification @@ -7814,7 +7814,7 @@ public async Task Example_Glossary_Update_AllParameters_Convenience_Async() }}, Usage = "", }; - Response response = await client.UpdateAsync("", atlasGlossary, ignoreTermsAndCategories: true); + Response response = await client.UpdateAsync("", body, ignoreTermsAndCategories: true); } [Test] diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Relationship.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Relationship.cs index 8713ced02df62..99462b921aedc 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Relationship.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_Relationship.cs @@ -54,8 +54,8 @@ public void Example_Relationship_Create_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); - AtlasRelationship atlasRelationship = new AtlasRelationship(); - Response response = client.Create(atlasRelationship); + AtlasRelationship body = new AtlasRelationship(); + Response response = client.Create(body); } [Test] @@ -66,8 +66,8 @@ public async Task Example_Relationship_Create_ShortVersion_Convenience_Async() TokenCredential credential = new DefaultAzureCredential(); Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); - AtlasRelationship atlasRelationship = new AtlasRelationship(); - Response response = await client.CreateAsync(atlasRelationship); + AtlasRelationship body = new AtlasRelationship(); + Response response = await client.CreateAsync(body); } [Test] @@ -198,7 +198,7 @@ public void Example_Relationship_Create_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); - AtlasRelationship atlasRelationship = new AtlasRelationship + AtlasRelationship body = new AtlasRelationship { Attributes = { @@ -227,7 +227,7 @@ public void Example_Relationship_Create_AllParameters_Convenience() UpdatedBy = "", Version = 1234L, }; - Response response = client.Create(atlasRelationship); + Response response = client.Create(body); } [Test] @@ -238,7 +238,7 @@ public async Task Example_Relationship_Create_AllParameters_Convenience_Async() TokenCredential credential = new DefaultAzureCredential(); Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); - AtlasRelationship atlasRelationship = new AtlasRelationship + AtlasRelationship body = new AtlasRelationship { Attributes = { @@ -267,7 +267,7 @@ public async Task Example_Relationship_Create_AllParameters_Convenience_Async() UpdatedBy = "", Version = 1234L, }; - Response response = await client.CreateAsync(atlasRelationship); + Response response = await client.CreateAsync(body); } [Test] @@ -308,8 +308,8 @@ public void Example_Relationship_Update_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); - AtlasRelationship atlasRelationship = new AtlasRelationship(); - Response response = client.Update(atlasRelationship); + AtlasRelationship body = new AtlasRelationship(); + Response response = client.Update(body); } [Test] @@ -320,8 +320,8 @@ public async Task Example_Relationship_Update_ShortVersion_Convenience_Async() TokenCredential credential = new DefaultAzureCredential(); Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); - AtlasRelationship atlasRelationship = new AtlasRelationship(); - Response response = await client.UpdateAsync(atlasRelationship); + AtlasRelationship body = new AtlasRelationship(); + Response response = await client.UpdateAsync(body); } [Test] @@ -452,7 +452,7 @@ public void Example_Relationship_Update_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); - AtlasRelationship atlasRelationship = new AtlasRelationship + AtlasRelationship body = new AtlasRelationship { Attributes = { @@ -481,7 +481,7 @@ public void Example_Relationship_Update_AllParameters_Convenience() UpdatedBy = "", Version = 1234L, }; - Response response = client.Update(atlasRelationship); + Response response = client.Update(body); } [Test] @@ -492,7 +492,7 @@ public async Task Example_Relationship_Update_AllParameters_Convenience_Async() TokenCredential credential = new DefaultAzureCredential(); Relationship client = new DataMapClient(endpoint, credential).GetRelationshipClient(); - AtlasRelationship atlasRelationship = new AtlasRelationship + AtlasRelationship body = new AtlasRelationship { Attributes = { @@ -521,7 +521,7 @@ public async Task Example_Relationship_Update_AllParameters_Convenience_Async() UpdatedBy = "", Version = 1234L, }; - Response response = await client.UpdateAsync(atlasRelationship); + Response response = await client.UpdateAsync(body); } [Test] diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_TypeDefinition.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_TypeDefinition.cs index fc5362b59749d..13867387e2342 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_TypeDefinition.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/tests/Generated/Samples/Samples_TypeDefinition.cs @@ -3723,8 +3723,8 @@ public void Example_TypeDefinition_BatchCreate_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - AtlasTypesDef atlasTypesDef = new AtlasTypesDef(); - Response response = client.BatchCreate(atlasTypesDef); + AtlasTypesDef body = new AtlasTypesDef(); + Response response = client.BatchCreate(body); } [Test] @@ -3735,8 +3735,8 @@ public async Task Example_TypeDefinition_BatchCreate_ShortVersion_Convenience_As TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - AtlasTypesDef atlasTypesDef = new AtlasTypesDef(); - Response response = await client.BatchCreateAsync(atlasTypesDef); + AtlasTypesDef body = new AtlasTypesDef(); + Response response = await client.BatchCreateAsync(body); } [Test] @@ -5065,7 +5065,7 @@ public void Example_TypeDefinition_BatchCreate_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - AtlasTypesDef atlasTypesDef = new AtlasTypesDef + AtlasTypesDef body = new AtlasTypesDef { BusinessMetadataDefs = {new AtlasBusinessMetadataDef { @@ -5319,7 +5319,7 @@ public void Example_TypeDefinition_BatchCreate_AllParameters_Convenience() AttributeDefs = {default}, }}, }; - Response response = client.BatchCreate(atlasTypesDef); + Response response = client.BatchCreate(body); } [Test] @@ -5330,7 +5330,7 @@ public async Task Example_TypeDefinition_BatchCreate_AllParameters_Convenience_A TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - AtlasTypesDef atlasTypesDef = new AtlasTypesDef + AtlasTypesDef body = new AtlasTypesDef { BusinessMetadataDefs = {new AtlasBusinessMetadataDef { @@ -5584,7 +5584,7 @@ public async Task Example_TypeDefinition_BatchCreate_AllParameters_Convenience_A AttributeDefs = {default}, }}, }; - Response response = await client.BatchCreateAsync(atlasTypesDef); + Response response = await client.BatchCreateAsync(body); } [Test] @@ -5625,8 +5625,8 @@ public void Example_TypeDefinition_BatchUpdate_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - AtlasTypesDef atlasTypesDef = new AtlasTypesDef(); - Response response = client.BatchUpdate(atlasTypesDef); + AtlasTypesDef body = new AtlasTypesDef(); + Response response = client.BatchUpdate(body); } [Test] @@ -5637,8 +5637,8 @@ public async Task Example_TypeDefinition_BatchUpdate_ShortVersion_Convenience_As TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - AtlasTypesDef atlasTypesDef = new AtlasTypesDef(); - Response response = await client.BatchUpdateAsync(atlasTypesDef); + AtlasTypesDef body = new AtlasTypesDef(); + Response response = await client.BatchUpdateAsync(body); } [Test] @@ -6967,7 +6967,7 @@ public void Example_TypeDefinition_BatchUpdate_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - AtlasTypesDef atlasTypesDef = new AtlasTypesDef + AtlasTypesDef body = new AtlasTypesDef { BusinessMetadataDefs = {new AtlasBusinessMetadataDef { @@ -7221,7 +7221,7 @@ public void Example_TypeDefinition_BatchUpdate_AllParameters_Convenience() AttributeDefs = {default}, }}, }; - Response response = client.BatchUpdate(atlasTypesDef); + Response response = client.BatchUpdate(body); } [Test] @@ -7232,7 +7232,7 @@ public async Task Example_TypeDefinition_BatchUpdate_AllParameters_Convenience_A TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - AtlasTypesDef atlasTypesDef = new AtlasTypesDef + AtlasTypesDef body = new AtlasTypesDef { BusinessMetadataDefs = {new AtlasBusinessMetadataDef { @@ -7486,7 +7486,7 @@ public async Task Example_TypeDefinition_BatchUpdate_AllParameters_Convenience_A AttributeDefs = {default}, }}, }; - Response response = await client.BatchUpdateAsync(atlasTypesDef); + Response response = await client.BatchUpdateAsync(body); } [Test] @@ -7525,8 +7525,8 @@ public void Example_TypeDefinition_BatchDelete_ShortVersion_Convenience() TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - AtlasTypesDef atlasTypesDef = new AtlasTypesDef(); - Response response = client.BatchDelete(atlasTypesDef); + AtlasTypesDef body = new AtlasTypesDef(); + Response response = client.BatchDelete(body); } [Test] @@ -7537,8 +7537,8 @@ public async Task Example_TypeDefinition_BatchDelete_ShortVersion_Convenience_As TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - AtlasTypesDef atlasTypesDef = new AtlasTypesDef(); - Response response = await client.BatchDeleteAsync(atlasTypesDef); + AtlasTypesDef body = new AtlasTypesDef(); + Response response = await client.BatchDeleteAsync(body); } [Test] @@ -8201,7 +8201,7 @@ public void Example_TypeDefinition_BatchDelete_AllParameters_Convenience() TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - AtlasTypesDef atlasTypesDef = new AtlasTypesDef + AtlasTypesDef body = new AtlasTypesDef { BusinessMetadataDefs = {new AtlasBusinessMetadataDef { @@ -8455,7 +8455,7 @@ public void Example_TypeDefinition_BatchDelete_AllParameters_Convenience() AttributeDefs = {default}, }}, }; - Response response = client.BatchDelete(atlasTypesDef); + Response response = client.BatchDelete(body); } [Test] @@ -8466,7 +8466,7 @@ public async Task Example_TypeDefinition_BatchDelete_AllParameters_Convenience_A TokenCredential credential = new DefaultAzureCredential(); TypeDefinition client = new DataMapClient(endpoint, credential).GetTypeDefinitionClient(); - AtlasTypesDef atlasTypesDef = new AtlasTypesDef + AtlasTypesDef body = new AtlasTypesDef { BusinessMetadataDefs = {new AtlasBusinessMetadataDef { @@ -8720,7 +8720,7 @@ public async Task Example_TypeDefinition_BatchDelete_AllParameters_Convenience_A AttributeDefs = {default}, }}, }; - Response response = await client.BatchDeleteAsync(atlasTypesDef); + Response response = await client.BatchDeleteAsync(body); } [Test] diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/tsp-location.yaml b/sdk/purview/Azure.Analytics.Purview.DataMap/tsp-location.yaml index 66f9c4b0a5c3d..2a6bc2283aa88 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/tsp-location.yaml +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/tsp-location.yaml @@ -1,5 +1,4 @@ repo: Azure/azure-rest-api-specs -commit: 0aa7ac99172545656aaae911ce13ad572ff0fac1 +commit: c8f326f5de83b0d6328f8d84c5dd2a14f8f4310b additionalDirectories: [] directory: specification/purview/Azure.Analytics.Purview.DataMap - diff --git a/sdk/translation/Azure.AI.Translation.Document/tsp-location.yaml b/sdk/translation/Azure.AI.Translation.Document/tsp-location.yaml index 63f2b5f3b0150..51be8ea521945 100644 --- a/sdk/translation/Azure.AI.Translation.Document/tsp-location.yaml +++ b/sdk/translation/Azure.AI.Translation.Document/tsp-location.yaml @@ -1,5 +1,5 @@ directory: specification/translation/Azure.AI.DocumentTranslation -commit: db63bea839f5648462c94e685d5cc96f8e8b38ba +commit: bd246a654089bc08bbb99f1dbf2c35755a51e40b repo: Azure/azure-rest-api-specs From 4c8829d05809025969d000e5de3c0fa72b59a0c4 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Thu, 11 Jul 2024 17:57:56 +0800 Subject: [PATCH 051/144] refine a new api in redis (#44948) * refine a new api in redis * fix test cases --- ...Azure.ResourceManager.Redis.netstandard2.0.cs | 10 +++++----- .../src/Generated/ArmRedisModelFactory.cs | 16 ++++++++-------- .../RedisCreateOrUpdateContent.Serialization.cs | 4 ++-- .../Models/RedisCreateOrUpdateContent.cs | 8 ++++---- .../Generated/Models/RedisPatch.Serialization.cs | 4 ++-- .../src/Generated/Models/RedisPatch.cs | 8 ++++---- .../src/Generated/RedisData.Serialization.cs | 10 +++++----- .../src/Generated/RedisData.cs | 8 ++++---- .../Azure.ResourceManager.Redis/src/autorest.md | 3 +++ .../AuthenticationFunctionalTests.cs | 8 ++++---- 10 files changed, 41 insertions(+), 38 deletions(-) diff --git a/sdk/redis/Azure.ResourceManager.Redis/api/Azure.ResourceManager.Redis.netstandard2.0.cs b/sdk/redis/Azure.ResourceManager.Redis/api/Azure.ResourceManager.Redis.netstandard2.0.cs index 983f19d15c6eb..b6576a40e428f 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/api/Azure.ResourceManager.Redis.netstandard2.0.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/api/Azure.ResourceManager.Redis.netstandard2.0.cs @@ -118,11 +118,11 @@ public partial class RedisData : Azure.ResourceManager.Models.TrackedResourceDat { public RedisData(Azure.Core.AzureLocation location, Azure.ResourceManager.Redis.Models.RedisSku sku) { } public Azure.ResourceManager.Redis.Models.RedisAccessKeys AccessKeys { get { throw null; } } - public bool? DisableAccessKeyAuthentication { get { throw null; } set { } } public bool? EnableNonSslPort { get { throw null; } set { } } public string HostName { get { throw null; } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList Instances { get { throw null; } } + public bool? IsAccessKeyAuthenticationDisabled { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList LinkedServers { get { throw null; } } public Azure.ResourceManager.Redis.Models.RedisTlsVersion? MinimumTlsVersion { get { throw null; } set { } } public int? Port { get { throw null; } } @@ -533,12 +533,12 @@ public static partial class ArmRedisModelFactory public static Azure.ResourceManager.Redis.Models.RedisCommonConfiguration RedisCommonConfiguration(bool? isRdbBackupEnabled = default(bool?), string rdbBackupFrequency = null, int? rdbBackupMaxSnapshotCount = default(int?), string rdbStorageConnectionString = null, bool? isAofBackupEnabled = default(bool?), string aofStorageConnectionString0 = null, string aofStorageConnectionString1 = null, string maxFragmentationMemoryReserved = null, string maxMemoryPolicy = null, string maxMemoryReserved = null, string maxMemoryDelta = null, string maxClients = null, string notifyKeyspaceEvents = null, string preferredDataArchiveAuthMethod = null, string preferredDataPersistenceAuthMethod = null, string zonalConfiguration = null, string authNotRequired = null, string storageSubscriptionId = null, string isAadEnabled = null, System.Collections.Generic.IDictionary additionalProperties = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.Redis.Models.RedisCreateOrUpdateContent RedisCreateOrUpdateContent(System.Collections.Generic.IEnumerable zones, Azure.Core.AzureLocation location, System.Collections.Generic.IDictionary tags, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ResourceManager.Redis.Models.RedisCommonConfiguration redisConfiguration, string redisVersion, bool? enableNonSslPort, int? replicasPerMaster, int? replicasPerPrimary, System.Collections.Generic.IDictionary tenantSettings, int? shardCount, Azure.ResourceManager.Redis.Models.RedisTlsVersion? minimumTlsVersion, Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess? publicNetworkAccess, Azure.ResourceManager.Redis.Models.UpdateChannel? updateChannel, Azure.ResourceManager.Redis.Models.RedisSku sku, Azure.Core.ResourceIdentifier subnetId, System.Net.IPAddress staticIP) { throw null; } - public static Azure.ResourceManager.Redis.Models.RedisCreateOrUpdateContent RedisCreateOrUpdateContent(System.Collections.Generic.IEnumerable zones = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Redis.Models.RedisCommonConfiguration redisConfiguration = null, string redisVersion = null, bool? enableNonSslPort = default(bool?), int? replicasPerMaster = default(int?), int? replicasPerPrimary = default(int?), System.Collections.Generic.IDictionary tenantSettings = null, int? shardCount = default(int?), Azure.ResourceManager.Redis.Models.RedisTlsVersion? minimumTlsVersion = default(Azure.ResourceManager.Redis.Models.RedisTlsVersion?), Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess?), Azure.ResourceManager.Redis.Models.UpdateChannel? updateChannel = default(Azure.ResourceManager.Redis.Models.UpdateChannel?), bool? disableAccessKeyAuthentication = default(bool?), Azure.ResourceManager.Redis.Models.RedisSku sku = null, Azure.Core.ResourceIdentifier subnetId = null, System.Net.IPAddress staticIP = null) { throw null; } + public static Azure.ResourceManager.Redis.Models.RedisCreateOrUpdateContent RedisCreateOrUpdateContent(System.Collections.Generic.IEnumerable zones = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Redis.Models.RedisCommonConfiguration redisConfiguration = null, string redisVersion = null, bool? enableNonSslPort = default(bool?), int? replicasPerMaster = default(int?), int? replicasPerPrimary = default(int?), System.Collections.Generic.IDictionary tenantSettings = null, int? shardCount = default(int?), Azure.ResourceManager.Redis.Models.RedisTlsVersion? minimumTlsVersion = default(Azure.ResourceManager.Redis.Models.RedisTlsVersion?), Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess?), Azure.ResourceManager.Redis.Models.UpdateChannel? updateChannel = default(Azure.ResourceManager.Redis.Models.UpdateChannel?), bool? isAccessKeyAuthenticationDisabled = default(bool?), Azure.ResourceManager.Redis.Models.RedisSku sku = null, Azure.Core.ResourceIdentifier subnetId = null, System.Net.IPAddress staticIP = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.Redis.RedisData RedisData(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 tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IEnumerable zones = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Redis.Models.RedisCommonConfiguration redisConfiguration = null, string redisVersion = null, bool? enableNonSslPort = default(bool?), int? replicasPerMaster = default(int?), int? replicasPerPrimary = default(int?), System.Collections.Generic.IDictionary tenantSettings = null, int? shardCount = default(int?), Azure.ResourceManager.Redis.Models.RedisTlsVersion? minimumTlsVersion = default(Azure.ResourceManager.Redis.Models.RedisTlsVersion?), Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess?), Azure.ResourceManager.Redis.Models.RedisSku sku = null, Azure.Core.ResourceIdentifier subnetId = null, System.Net.IPAddress staticIP = null, Azure.ResourceManager.Redis.Models.RedisProvisioningState? provisioningState = default(Azure.ResourceManager.Redis.Models.RedisProvisioningState?), string hostName = null, int? port = default(int?), int? sslPort = default(int?), Azure.ResourceManager.Redis.Models.RedisAccessKeys accessKeys = null, System.Collections.Generic.IEnumerable linkedServers = null, System.Collections.Generic.IEnumerable instances = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.Redis.RedisData RedisData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, System.Collections.Generic.IEnumerable zones, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ResourceManager.Redis.Models.RedisCommonConfiguration redisConfiguration, string redisVersion, bool? enableNonSslPort, int? replicasPerMaster, int? replicasPerPrimary, System.Collections.Generic.IDictionary tenantSettings, int? shardCount, Azure.ResourceManager.Redis.Models.RedisTlsVersion? minimumTlsVersion, Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess? publicNetworkAccess, Azure.ResourceManager.Redis.Models.UpdateChannel? updateChannel, Azure.ResourceManager.Redis.Models.RedisSku sku, Azure.Core.ResourceIdentifier subnetId, System.Net.IPAddress staticIP, Azure.ResourceManager.Redis.Models.RedisProvisioningState? provisioningState, string hostName, int? port, int? sslPort, Azure.ResourceManager.Redis.Models.RedisAccessKeys accessKeys, System.Collections.Generic.IEnumerable linkedServers, System.Collections.Generic.IEnumerable instances, System.Collections.Generic.IEnumerable privateEndpointConnections) { throw null; } - public static Azure.ResourceManager.Redis.RedisData RedisData(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 tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IEnumerable zones = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Redis.Models.RedisCommonConfiguration redisConfiguration = null, string redisVersion = null, bool? enableNonSslPort = default(bool?), int? replicasPerMaster = default(int?), int? replicasPerPrimary = default(int?), System.Collections.Generic.IDictionary tenantSettings = null, int? shardCount = default(int?), Azure.ResourceManager.Redis.Models.RedisTlsVersion? minimumTlsVersion = default(Azure.ResourceManager.Redis.Models.RedisTlsVersion?), Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess?), Azure.ResourceManager.Redis.Models.UpdateChannel? updateChannel = default(Azure.ResourceManager.Redis.Models.UpdateChannel?), bool? disableAccessKeyAuthentication = default(bool?), Azure.ResourceManager.Redis.Models.RedisSku sku = null, Azure.Core.ResourceIdentifier subnetId = null, System.Net.IPAddress staticIP = null, Azure.ResourceManager.Redis.Models.RedisProvisioningState? provisioningState = default(Azure.ResourceManager.Redis.Models.RedisProvisioningState?), string hostName = null, int? port = default(int?), int? sslPort = default(int?), Azure.ResourceManager.Redis.Models.RedisAccessKeys accessKeys = null, System.Collections.Generic.IEnumerable linkedServers = null, System.Collections.Generic.IEnumerable instances = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null) { throw null; } + public static Azure.ResourceManager.Redis.RedisData RedisData(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 tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IEnumerable zones = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Redis.Models.RedisCommonConfiguration redisConfiguration = null, string redisVersion = null, bool? enableNonSslPort = default(bool?), int? replicasPerMaster = default(int?), int? replicasPerPrimary = default(int?), System.Collections.Generic.IDictionary tenantSettings = null, int? shardCount = default(int?), Azure.ResourceManager.Redis.Models.RedisTlsVersion? minimumTlsVersion = default(Azure.ResourceManager.Redis.Models.RedisTlsVersion?), Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess?), Azure.ResourceManager.Redis.Models.UpdateChannel? updateChannel = default(Azure.ResourceManager.Redis.Models.UpdateChannel?), bool? isAccessKeyAuthenticationDisabled = default(bool?), Azure.ResourceManager.Redis.Models.RedisSku sku = null, Azure.Core.ResourceIdentifier subnetId = null, System.Net.IPAddress staticIP = null, Azure.ResourceManager.Redis.Models.RedisProvisioningState? provisioningState = default(Azure.ResourceManager.Redis.Models.RedisProvisioningState?), string hostName = null, int? port = default(int?), int? sslPort = default(int?), Azure.ResourceManager.Redis.Models.RedisAccessKeys accessKeys = null, System.Collections.Generic.IEnumerable linkedServers = null, System.Collections.Generic.IEnumerable instances = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null) { throw null; } public static Azure.ResourceManager.Redis.RedisFirewallRuleData RedisFirewallRuleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Net.IPAddress startIP = null, System.Net.IPAddress endIP = null) { throw null; } public static Azure.ResourceManager.Redis.Models.RedisForceRebootResult RedisForceRebootResult(string message = null) { throw null; } public static Azure.ResourceManager.Redis.Models.RedisInstanceDetails RedisInstanceDetails(int? sslPort = default(int?), int? nonSslPort = default(int?), string zone = null, int? shardId = default(int?), bool? isMaster = default(bool?), bool? isPrimary = default(bool?)) { throw null; } @@ -620,9 +620,9 @@ public RedisCommonConfiguration() { } public partial class RedisCreateOrUpdateContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public RedisCreateOrUpdateContent(Azure.Core.AzureLocation location, Azure.ResourceManager.Redis.Models.RedisSku sku) { } - public bool? DisableAccessKeyAuthentication { get { throw null; } set { } } public bool? EnableNonSslPort { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public bool? IsAccessKeyAuthenticationDisabled { get { throw null; } set { } } public Azure.Core.AzureLocation Location { get { throw null; } } public Azure.ResourceManager.Redis.Models.RedisTlsVersion? MinimumTlsVersion { get { throw null; } set { } } public Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } @@ -724,9 +724,9 @@ internal RedisOperationStatus() { } public partial class RedisPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public RedisPatch() { } - public bool? DisableAccessKeyAuthentication { get { throw null; } set { } } public bool? EnableNonSslPort { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public bool? IsAccessKeyAuthenticationDisabled { get { throw null; } set { } } public Azure.ResourceManager.Redis.Models.RedisTlsVersion? MinimumTlsVersion { get { throw null; } set { } } public Azure.ResourceManager.Redis.Models.RedisPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } public Azure.ResourceManager.Redis.Models.RedisCommonConfiguration RedisConfiguration { get { throw null; } set { } } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/ArmRedisModelFactory.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/ArmRedisModelFactory.cs index 8f1ebd17e91b2..c72b40465d465 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/ArmRedisModelFactory.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/ArmRedisModelFactory.cs @@ -46,12 +46,12 @@ public static RedisUpgradeNotification RedisUpgradeNotification(string name = nu /// Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). /// Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. /// Optional: Specifies the update channel for the monthly Redis updates your Redis Cache will receive. Caches using 'Preview' update channel get latest Redis updates at least 4 weeks ahead of 'Stable' channel caches. Default value is 'Stable'. - /// Authentication to Redis through access keys is disabled when set as true. Default value is false. + /// Authentication to Redis through access keys is disabled when set as true. Default value is false. /// The SKU of the Redis cache to deploy. /// The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. /// Static IP address. Optionally, may be specified when deploying a Redis cache inside an existing Azure Virtual Network; auto assigned by default. /// A new instance for mocking. - public static RedisCreateOrUpdateContent RedisCreateOrUpdateContent(IEnumerable zones = null, AzureLocation location = default, IDictionary tags = null, ManagedServiceIdentity identity = null, RedisCommonConfiguration redisConfiguration = null, string redisVersion = null, bool? enableNonSslPort = null, int? replicasPerMaster = null, int? replicasPerPrimary = null, IDictionary tenantSettings = null, int? shardCount = null, RedisTlsVersion? minimumTlsVersion = null, RedisPublicNetworkAccess? publicNetworkAccess = null, UpdateChannel? updateChannel = null, bool? disableAccessKeyAuthentication = null, RedisSku sku = null, ResourceIdentifier subnetId = null, IPAddress staticIP = null) + public static RedisCreateOrUpdateContent RedisCreateOrUpdateContent(IEnumerable zones = null, AzureLocation location = default, IDictionary tags = null, ManagedServiceIdentity identity = null, RedisCommonConfiguration redisConfiguration = null, string redisVersion = null, bool? enableNonSslPort = null, int? replicasPerMaster = null, int? replicasPerPrimary = null, IDictionary tenantSettings = null, int? shardCount = null, RedisTlsVersion? minimumTlsVersion = null, RedisPublicNetworkAccess? publicNetworkAccess = null, UpdateChannel? updateChannel = null, bool? isAccessKeyAuthenticationDisabled = null, RedisSku sku = null, ResourceIdentifier subnetId = null, IPAddress staticIP = null) { zones ??= new List(); tags ??= new Dictionary(); @@ -72,7 +72,7 @@ public static RedisCreateOrUpdateContent RedisCreateOrUpdateContent(IEnumerable< minimumTlsVersion, publicNetworkAccess, updateChannel, - disableAccessKeyAuthentication, + isAccessKeyAuthenticationDisabled, sku, subnetId, staticIP, @@ -147,7 +147,7 @@ public static RedisCommonConfiguration RedisCommonConfiguration(bool? isRdbBacku /// Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). /// Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. /// Optional: Specifies the update channel for the monthly Redis updates your Redis Cache will receive. Caches using 'Preview' update channel get latest Redis updates at least 4 weeks ahead of 'Stable' channel caches. Default value is 'Stable'. - /// Authentication to Redis through access keys is disabled when set as true. Default value is false. + /// Authentication to Redis through access keys is disabled when set as true. Default value is false. /// The SKU of the Redis cache to deploy. /// The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. /// Static IP address. Optionally, may be specified when deploying a Redis cache inside an existing Azure Virtual Network; auto assigned by default. @@ -160,7 +160,7 @@ public static RedisCommonConfiguration RedisCommonConfiguration(bool? isRdbBacku /// List of the Redis instances associated with the cache. /// List of private endpoint connection associated with the specified redis cache. /// A new instance for mocking. - public static RedisData RedisData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, IEnumerable zones = null, ManagedServiceIdentity identity = null, RedisCommonConfiguration redisConfiguration = null, string redisVersion = null, bool? enableNonSslPort = null, int? replicasPerMaster = null, int? replicasPerPrimary = null, IDictionary tenantSettings = null, int? shardCount = null, RedisTlsVersion? minimumTlsVersion = null, RedisPublicNetworkAccess? publicNetworkAccess = null, UpdateChannel? updateChannel = null, bool? disableAccessKeyAuthentication = null, RedisSku sku = null, ResourceIdentifier subnetId = null, IPAddress staticIP = null, RedisProvisioningState? provisioningState = null, string hostName = null, int? port = null, int? sslPort = null, RedisAccessKeys accessKeys = null, IEnumerable linkedServers = null, IEnumerable instances = null, IEnumerable privateEndpointConnections = null) + public static RedisData RedisData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, IEnumerable zones = null, ManagedServiceIdentity identity = null, RedisCommonConfiguration redisConfiguration = null, string redisVersion = null, bool? enableNonSslPort = null, int? replicasPerMaster = null, int? replicasPerPrimary = null, IDictionary tenantSettings = null, int? shardCount = null, RedisTlsVersion? minimumTlsVersion = null, RedisPublicNetworkAccess? publicNetworkAccess = null, UpdateChannel? updateChannel = null, bool? isAccessKeyAuthenticationDisabled = null, RedisSku sku = null, ResourceIdentifier subnetId = null, IPAddress staticIP = null, RedisProvisioningState? provisioningState = null, string hostName = null, int? port = null, int? sslPort = null, RedisAccessKeys accessKeys = null, IEnumerable linkedServers = null, IEnumerable instances = null, IEnumerable privateEndpointConnections = null) { tags ??= new Dictionary(); zones ??= new List(); @@ -188,7 +188,7 @@ public static RedisData RedisData(ResourceIdentifier id = null, string name = nu minimumTlsVersion, publicNetworkAccess, updateChannel, - disableAccessKeyAuthentication, + isAccessKeyAuthenticationDisabled, sku, subnetId, staticIP, @@ -490,7 +490,7 @@ public static RedisCacheAccessPolicyAssignmentData RedisCacheAccessPolicyAssignm [EditorBrowsable(EditorBrowsableState.Never)] public static RedisCreateOrUpdateContent RedisCreateOrUpdateContent(IEnumerable zones, AzureLocation location, IDictionary tags, ManagedServiceIdentity identity, RedisCommonConfiguration redisConfiguration, string redisVersion, bool? enableNonSslPort, int? replicasPerMaster, int? replicasPerPrimary, IDictionary tenantSettings, int? shardCount, RedisTlsVersion? minimumTlsVersion, RedisPublicNetworkAccess? publicNetworkAccess, UpdateChannel? updateChannel, RedisSku sku, ResourceIdentifier subnetId, IPAddress staticIP) { - return RedisCreateOrUpdateContent(zones: zones, location: location, tags: tags, identity: identity, redisConfiguration: redisConfiguration, redisVersion: redisVersion, enableNonSslPort: enableNonSslPort, replicasPerMaster: replicasPerMaster, replicasPerPrimary: replicasPerPrimary, tenantSettings: tenantSettings, shardCount: shardCount, minimumTlsVersion: minimumTlsVersion, publicNetworkAccess: publicNetworkAccess, updateChannel: updateChannel, disableAccessKeyAuthentication: default, sku: sku, subnetId: subnetId, staticIP: staticIP); + return RedisCreateOrUpdateContent(zones: zones, location: location, tags: tags, identity: identity, redisConfiguration: redisConfiguration, redisVersion: redisVersion, enableNonSslPort: enableNonSslPort, replicasPerMaster: replicasPerMaster, replicasPerPrimary: replicasPerPrimary, tenantSettings: tenantSettings, shardCount: shardCount, minimumTlsVersion: minimumTlsVersion, publicNetworkAccess: publicNetworkAccess, updateChannel: updateChannel, isAccessKeyAuthenticationDisabled: default, sku: sku, subnetId: subnetId, staticIP: staticIP); } /// Initializes a new instance of . @@ -554,7 +554,7 @@ public static RedisCommonConfiguration RedisCommonConfiguration(bool? isRdbBacku [EditorBrowsable(EditorBrowsableState.Never)] public static RedisData RedisData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, IEnumerable zones, ManagedServiceIdentity identity, RedisCommonConfiguration redisConfiguration, string redisVersion, bool? enableNonSslPort, int? replicasPerMaster, int? replicasPerPrimary, IDictionary tenantSettings, int? shardCount, RedisTlsVersion? minimumTlsVersion, RedisPublicNetworkAccess? publicNetworkAccess, UpdateChannel? updateChannel, RedisSku sku, ResourceIdentifier subnetId, IPAddress staticIP, RedisProvisioningState? provisioningState, string hostName, int? port, int? sslPort, RedisAccessKeys accessKeys, IEnumerable linkedServers, IEnumerable instances, IEnumerable privateEndpointConnections) { - return RedisData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, zones: zones, identity: identity, redisConfiguration: redisConfiguration, redisVersion: redisVersion, enableNonSslPort: enableNonSslPort, replicasPerMaster: replicasPerMaster, replicasPerPrimary: replicasPerPrimary, tenantSettings: tenantSettings, shardCount: shardCount, minimumTlsVersion: minimumTlsVersion, publicNetworkAccess: publicNetworkAccess, updateChannel: updateChannel, disableAccessKeyAuthentication: default, sku: sku, subnetId: subnetId, staticIP: staticIP, provisioningState: provisioningState, hostName: hostName, port: port, sslPort: sslPort, accessKeys: accessKeys, linkedServers: linkedServers, instances: instances, privateEndpointConnections: privateEndpointConnections); + return RedisData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, zones: zones, identity: identity, redisConfiguration: redisConfiguration, redisVersion: redisVersion, enableNonSslPort: enableNonSslPort, replicasPerMaster: replicasPerMaster, replicasPerPrimary: replicasPerPrimary, tenantSettings: tenantSettings, shardCount: shardCount, minimumTlsVersion: minimumTlsVersion, publicNetworkAccess: publicNetworkAccess, updateChannel: updateChannel, isAccessKeyAuthenticationDisabled: default, sku: sku, subnetId: subnetId, staticIP: staticIP, provisioningState: provisioningState, hostName: hostName, port: port, sslPort: sslPort, accessKeys: accessKeys, linkedServers: linkedServers, instances: instances, privateEndpointConnections: privateEndpointConnections); } } } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisCreateOrUpdateContent.Serialization.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisCreateOrUpdateContent.Serialization.cs index a3de15fe478ed..c6097f86fc0dc 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisCreateOrUpdateContent.Serialization.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisCreateOrUpdateContent.Serialization.cs @@ -114,10 +114,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WritePropertyName("updateChannel"u8); writer.WriteStringValue(UpdateChannel.Value.ToString()); } - if (Optional.IsDefined(DisableAccessKeyAuthentication)) + if (Optional.IsDefined(IsAccessKeyAuthenticationDisabled)) { writer.WritePropertyName("disableAccessKeyAuthentication"u8); - writer.WriteBooleanValue(DisableAccessKeyAuthentication.Value); + writer.WriteBooleanValue(IsAccessKeyAuthenticationDisabled.Value); } writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku, options); diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisCreateOrUpdateContent.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisCreateOrUpdateContent.cs index fbe81581449c1..c57665f72e3e5 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisCreateOrUpdateContent.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisCreateOrUpdateContent.cs @@ -78,12 +78,12 @@ public RedisCreateOrUpdateContent(AzureLocation location, RedisSku sku) /// Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). /// Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. /// Optional: Specifies the update channel for the monthly Redis updates your Redis Cache will receive. Caches using 'Preview' update channel get latest Redis updates at least 4 weeks ahead of 'Stable' channel caches. Default value is 'Stable'. - /// Authentication to Redis through access keys is disabled when set as true. Default value is false. + /// Authentication to Redis through access keys is disabled when set as true. Default value is false. /// The SKU of the Redis cache to deploy. /// The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. /// Static IP address. Optionally, may be specified when deploying a Redis cache inside an existing Azure Virtual Network; auto assigned by default. /// Keeps track of any properties unknown to the library. - internal RedisCreateOrUpdateContent(IList zones, AzureLocation location, IDictionary tags, ManagedServiceIdentity identity, RedisCommonConfiguration redisConfiguration, string redisVersion, bool? enableNonSslPort, int? replicasPerMaster, int? replicasPerPrimary, IDictionary tenantSettings, int? shardCount, RedisTlsVersion? minimumTlsVersion, RedisPublicNetworkAccess? publicNetworkAccess, UpdateChannel? updateChannel, bool? disableAccessKeyAuthentication, RedisSku sku, ResourceIdentifier subnetId, IPAddress staticIP, IDictionary serializedAdditionalRawData) + internal RedisCreateOrUpdateContent(IList zones, AzureLocation location, IDictionary tags, ManagedServiceIdentity identity, RedisCommonConfiguration redisConfiguration, string redisVersion, bool? enableNonSslPort, int? replicasPerMaster, int? replicasPerPrimary, IDictionary tenantSettings, int? shardCount, RedisTlsVersion? minimumTlsVersion, RedisPublicNetworkAccess? publicNetworkAccess, UpdateChannel? updateChannel, bool? isAccessKeyAuthenticationDisabled, RedisSku sku, ResourceIdentifier subnetId, IPAddress staticIP, IDictionary serializedAdditionalRawData) { Zones = zones; Location = location; @@ -99,7 +99,7 @@ internal RedisCreateOrUpdateContent(IList zones, AzureLocation location, MinimumTlsVersion = minimumTlsVersion; PublicNetworkAccess = publicNetworkAccess; UpdateChannel = updateChannel; - DisableAccessKeyAuthentication = disableAccessKeyAuthentication; + IsAccessKeyAuthenticationDisabled = isAccessKeyAuthenticationDisabled; Sku = sku; SubnetId = subnetId; StaticIP = staticIP; @@ -155,7 +155,7 @@ internal RedisCreateOrUpdateContent() public UpdateChannel? UpdateChannel { get; set; } /// Authentication to Redis through access keys is disabled when set as true. Default value is false. [WirePath("properties.disableAccessKeyAuthentication")] - public bool? DisableAccessKeyAuthentication { get; set; } + public bool? IsAccessKeyAuthenticationDisabled { get; set; } /// The SKU of the Redis cache to deploy. [WirePath("properties.sku")] public RedisSku Sku { get; } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisPatch.Serialization.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisPatch.Serialization.cs index 323ed2e4f308f..7de708bff1dd6 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisPatch.Serialization.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisPatch.Serialization.cs @@ -101,10 +101,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption writer.WritePropertyName("updateChannel"u8); writer.WriteStringValue(UpdateChannel.Value.ToString()); } - if (Optional.IsDefined(DisableAccessKeyAuthentication)) + if (Optional.IsDefined(IsAccessKeyAuthenticationDisabled)) { writer.WritePropertyName("disableAccessKeyAuthentication"u8); - writer.WriteBooleanValue(DisableAccessKeyAuthentication.Value); + writer.WriteBooleanValue(IsAccessKeyAuthenticationDisabled.Value); } if (Optional.IsDefined(Sku)) { diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisPatch.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisPatch.cs index c417f08bd5435..88e08b747e0c8 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisPatch.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/Models/RedisPatch.cs @@ -66,10 +66,10 @@ public RedisPatch() /// Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). /// Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. /// Optional: Specifies the update channel for the monthly Redis updates your Redis Cache will receive. Caches using 'Preview' update channel get latest Redis updates at least 4 weeks ahead of 'Stable' channel caches. Default value is 'Stable'. - /// Authentication to Redis through access keys is disabled when set as true. Default value is false. + /// Authentication to Redis through access keys is disabled when set as true. Default value is false. /// The SKU of the Redis cache to deploy. /// Keeps track of any properties unknown to the library. - internal RedisPatch(IDictionary tags, ManagedServiceIdentity identity, RedisCommonConfiguration redisConfiguration, string redisVersion, bool? enableNonSslPort, int? replicasPerMaster, int? replicasPerPrimary, IDictionary tenantSettings, int? shardCount, RedisTlsVersion? minimumTlsVersion, RedisPublicNetworkAccess? publicNetworkAccess, UpdateChannel? updateChannel, bool? disableAccessKeyAuthentication, RedisSku sku, IDictionary serializedAdditionalRawData) + internal RedisPatch(IDictionary tags, ManagedServiceIdentity identity, RedisCommonConfiguration redisConfiguration, string redisVersion, bool? enableNonSslPort, int? replicasPerMaster, int? replicasPerPrimary, IDictionary tenantSettings, int? shardCount, RedisTlsVersion? minimumTlsVersion, RedisPublicNetworkAccess? publicNetworkAccess, UpdateChannel? updateChannel, bool? isAccessKeyAuthenticationDisabled, RedisSku sku, IDictionary serializedAdditionalRawData) { Tags = tags; Identity = identity; @@ -83,7 +83,7 @@ internal RedisPatch(IDictionary tags, ManagedServiceIdentity ide MinimumTlsVersion = minimumTlsVersion; PublicNetworkAccess = publicNetworkAccess; UpdateChannel = updateChannel; - DisableAccessKeyAuthentication = disableAccessKeyAuthentication; + IsAccessKeyAuthenticationDisabled = isAccessKeyAuthenticationDisabled; Sku = sku; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -126,7 +126,7 @@ internal RedisPatch(IDictionary tags, ManagedServiceIdentity ide public UpdateChannel? UpdateChannel { get; set; } /// Authentication to Redis through access keys is disabled when set as true. Default value is false. [WirePath("properties.disableAccessKeyAuthentication")] - public bool? DisableAccessKeyAuthentication { get; set; } + public bool? IsAccessKeyAuthenticationDisabled { get; set; } /// The SKU of the Redis cache to deploy. [WirePath("properties.sku")] public RedisSku Sku { get; set; } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisData.Serialization.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisData.Serialization.cs index 6dd6aa38798b8..af5d43ec41246 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisData.Serialization.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisData.Serialization.cs @@ -138,10 +138,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WritePropertyName("updateChannel"u8); writer.WriteStringValue(UpdateChannel.Value.ToString()); } - if (Optional.IsDefined(DisableAccessKeyAuthentication)) + if (Optional.IsDefined(IsAccessKeyAuthenticationDisabled)) { writer.WritePropertyName("disableAccessKeyAuthentication"u8); - writer.WriteBooleanValue(DisableAccessKeyAuthentication.Value); + writer.WriteBooleanValue(IsAccessKeyAuthenticationDisabled.Value); } writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku, options); @@ -962,7 +962,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DisableAccessKeyAuthentication), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsAccessKeyAuthenticationDisabled), out propertyOverride); if (hasPropertyOverride) { builder.Append(" disableAccessKeyAuthentication: "); @@ -970,10 +970,10 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } else { - if (Optional.IsDefined(DisableAccessKeyAuthentication)) + if (Optional.IsDefined(IsAccessKeyAuthenticationDisabled)) { builder.Append(" disableAccessKeyAuthentication: "); - var boolValue = DisableAccessKeyAuthentication.Value == true ? "true" : "false"; + var boolValue = IsAccessKeyAuthenticationDisabled.Value == true ? "true" : "false"; builder.AppendLine($"{boolValue}"); } } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisData.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisData.cs index 20bbea08157d5..bc879c24f3309 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisData.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisData.cs @@ -88,7 +88,7 @@ public RedisData(AzureLocation location, RedisSku sku) : base(location) /// Optional: requires clients to use a specified TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). /// Whether or not public endpoint access is allowed for this cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. /// Optional: Specifies the update channel for the monthly Redis updates your Redis Cache will receive. Caches using 'Preview' update channel get latest Redis updates at least 4 weeks ahead of 'Stable' channel caches. Default value is 'Stable'. - /// Authentication to Redis through access keys is disabled when set as true. Default value is false. + /// Authentication to Redis through access keys is disabled when set as true. Default value is false. /// The SKU of the Redis cache to deploy. /// The full resource ID of a subnet in a virtual network to deploy the Redis cache in. Example format: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. /// Static IP address. Optionally, may be specified when deploying a Redis cache inside an existing Azure Virtual Network; auto assigned by default. @@ -101,7 +101,7 @@ public RedisData(AzureLocation location, RedisSku sku) : base(location) /// List of the Redis instances associated with the cache. /// List of private endpoint connection associated with the specified redis cache. /// Keeps track of any properties unknown to the library. - internal RedisData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, IList zones, ManagedServiceIdentity identity, RedisCommonConfiguration redisConfiguration, string redisVersion, bool? enableNonSslPort, int? replicasPerMaster, int? replicasPerPrimary, IDictionary tenantSettings, int? shardCount, RedisTlsVersion? minimumTlsVersion, RedisPublicNetworkAccess? publicNetworkAccess, UpdateChannel? updateChannel, bool? disableAccessKeyAuthentication, RedisSku sku, ResourceIdentifier subnetId, IPAddress staticIP, RedisProvisioningState? provisioningState, string hostName, int? port, int? sslPort, RedisAccessKeys accessKeys, IReadOnlyList linkedServers, IReadOnlyList instances, IReadOnlyList privateEndpointConnections, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal RedisData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, IList zones, ManagedServiceIdentity identity, RedisCommonConfiguration redisConfiguration, string redisVersion, bool? enableNonSslPort, int? replicasPerMaster, int? replicasPerPrimary, IDictionary tenantSettings, int? shardCount, RedisTlsVersion? minimumTlsVersion, RedisPublicNetworkAccess? publicNetworkAccess, UpdateChannel? updateChannel, bool? isAccessKeyAuthenticationDisabled, RedisSku sku, ResourceIdentifier subnetId, IPAddress staticIP, RedisProvisioningState? provisioningState, string hostName, int? port, int? sslPort, RedisAccessKeys accessKeys, IReadOnlyList linkedServers, IReadOnlyList instances, IReadOnlyList privateEndpointConnections, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Zones = zones; Identity = identity; @@ -115,7 +115,7 @@ internal RedisData(ResourceIdentifier id, string name, ResourceType resourceType MinimumTlsVersion = minimumTlsVersion; PublicNetworkAccess = publicNetworkAccess; UpdateChannel = updateChannel; - DisableAccessKeyAuthentication = disableAccessKeyAuthentication; + IsAccessKeyAuthenticationDisabled = isAccessKeyAuthenticationDisabled; Sku = sku; SubnetId = subnetId; StaticIP = staticIP; @@ -173,7 +173,7 @@ internal RedisData() public UpdateChannel? UpdateChannel { get; set; } /// Authentication to Redis through access keys is disabled when set as true. Default value is false. [WirePath("properties.disableAccessKeyAuthentication")] - public bool? DisableAccessKeyAuthentication { get; set; } + public bool? IsAccessKeyAuthenticationDisabled { get; set; } /// The SKU of the Redis cache to deploy. [WirePath("properties.sku")] public RedisSku Sku { get; set; } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/autorest.md b/sdk/redis/Azure.ResourceManager.Redis/src/autorest.md index 71c394befdfec..d3e0752de0f8b 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/autorest.md +++ b/sdk/redis/Azure.ResourceManager.Redis/src/autorest.md @@ -48,6 +48,9 @@ rename-mapping: RedisForceRebootResponse: RedisForceRebootResult RedisCacheAccessPolicyAssignment.properties.objectId: -|uuid RedisCommonPropertiesRedisConfiguration.aad-enabled: IsAadEnabled + Redis.properties.disableAccessKeyAuthentication: IsAccessKeyAuthenticationDisabled + RedisCreateParameters.properties.disableAccessKeyAuthentication: IsAccessKeyAuthenticationDisabled + RedisUpdateParameters.properties.disableAccessKeyAuthentication: IsAccessKeyAuthenticationDisabled prepend-rp-prefix: - OperationStatus diff --git a/sdk/redis/Azure.ResourceManager.Redis/tests/ScenarioTests/AuthenticationFunctionalTests.cs b/sdk/redis/Azure.ResourceManager.Redis/tests/ScenarioTests/AuthenticationFunctionalTests.cs index 48de55c1212d2..b9f320ff30801 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/tests/ScenarioTests/AuthenticationFunctionalTests.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/tests/ScenarioTests/AuthenticationFunctionalTests.cs @@ -33,7 +33,7 @@ public async Task AadTests() RedisCreateOrUpdateContent redisCreationParameters = new RedisCreateOrUpdateContent(DefaultLocation, new RedisSku(RedisSkuName.Premium, RedisSkuFamily.Premium, 1)) { - DisableAccessKeyAuthentication = true, + IsAccessKeyAuthenticationDisabled = true, RedisConfiguration = new RedisCommonConfiguration() { IsAadEnabled = "true" @@ -43,7 +43,7 @@ public async Task AadTests() // Verify cache is aad enabled and access keys authentication disabled Assert.IsTrue(string.Equals(redisResource.Data.RedisConfiguration.IsAadEnabled, "true", StringComparison.OrdinalIgnoreCase)); - Assert.IsTrue(redisResource.Data.DisableAccessKeyAuthentication); + Assert.IsTrue(redisResource.Data.IsAccessKeyAuthenticationDisabled); // List access polices RedisCacheAccessPolicyCollection accessPolicyCollection = redisResource.GetRedisCacheAccessPolicies(); @@ -135,12 +135,12 @@ public async Task AadTests() // Enable access keys authentication on cache redisCreationParameters = new RedisCreateOrUpdateContent(DefaultLocation, new RedisSku(RedisSkuName.Premium, RedisSkuFamily.Premium, 1)) { - DisableAccessKeyAuthentication = false + IsAccessKeyAuthenticationDisabled = false }; redisResource = (await Collection.CreateOrUpdateAsync(WaitUntil.Completed, redisCacheName, redisCreationParameters)).Value; // Verify access keys authentication is enabled - Assert.IsFalse(redisResource.Data.DisableAccessKeyAuthentication); + Assert.IsFalse(redisResource.Data.IsAccessKeyAuthenticationDisabled); // Disable aad on cache redisCreationParameters = new RedisCreateOrUpdateContent(DefaultLocation, new RedisSku(RedisSkuName.Premium, RedisSkuFamily.Premium, 1)) From 83882bc928f70c423927bdc3df04d2634a30fade Mon Sep 17 00:00:00 2001 From: Mingzhe Huang Date: Thu, 11 Jul 2024 23:39:02 +0800 Subject: [PATCH 052/144] fix(docs): wrong location in `System.ClientModel` (#44943) * fix(docs): wrong location in `System.ClientModel` * Update parameter description to make the meaning more clear. Co-authored-by: Jesse Squire --------- Co-authored-by: Jesse Squire --- .../src/ModelReaderWriter/IPersistableModel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/core/System.ClientModel/src/ModelReaderWriter/IPersistableModel.cs b/sdk/core/System.ClientModel/src/ModelReaderWriter/IPersistableModel.cs index 619db66beb63b..1948cd4f6f39b 100644 --- a/sdk/core/System.ClientModel/src/ModelReaderWriter/IPersistableModel.cs +++ b/sdk/core/System.ClientModel/src/ModelReaderWriter/IPersistableModel.cs @@ -29,8 +29,8 @@ public interface IPersistableModel /// /// Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service. - /// The to use. /// + /// The to consider when serializing and deserializing the model. /// The format that the model uses when communicating with the serivce. string GetFormatFromOptions(ModelReaderWriterOptions options); } From f4fbb2d6cfc14d9382354e63b2b52c2463daca7d Mon Sep 17 00:00:00 2001 From: Anne Thompson Date: Thu, 11 Jul 2024 08:41:25 -0700 Subject: [PATCH 053/144] Preparation for release of Azure.Core 1.41.0 (#44938) --- sdk/core/Azure.Core/CHANGELOG.md | 12 +++--------- sdk/core/Azure.Core/src/Azure.Core.csproj | 2 +- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/sdk/core/Azure.Core/CHANGELOG.md b/sdk/core/Azure.Core/CHANGELOG.md index 6ff2368316fc8..d992bb8e84baf 100644 --- a/sdk/core/Azure.Core/CHANGELOG.md +++ b/sdk/core/Azure.Core/CHANGELOG.md @@ -1,17 +1,11 @@ # Release History -## 1.41.0-beta.1 (Unreleased) - -### Features Added - -### Breaking Changes +## 1.41.0 (2024-07-11) ### Bugs Fixed -- Fixed an issue that could result in `BearerTokenAuthenticationPolicy` fails to refresh a token, resulting in a `OperationCanceledException`. - -- Fixed case where a GeoJSON string could not be deserialized when the BoundingBox JSON value ("bbox") was set explicitly to null ([#44835](https://github.com/Azure/azure-sdk-for-net/pull/44835)) -### Other Changes +- Fixed an issue that could result in `BearerTokenAuthenticationPolicy` fails to refresh a token, resulting in a `OperationCanceledException` ([#44882](https://github.com/Azure/azure-sdk-for-net/pull/44882)). +- Fixed case where a GeoJSON string could not be deserialized when the BoundingBox JSON value ("bbox") was set explicitly to null ([#44835](https://github.com/Azure/azure-sdk-for-net/pull/44835)). ## 1.40.0 (2024-06-06) diff --git a/sdk/core/Azure.Core/src/Azure.Core.csproj b/sdk/core/Azure.Core/src/Azure.Core.csproj index c64fe1233b111..2e24b54332e37 100644 --- a/sdk/core/Azure.Core/src/Azure.Core.csproj +++ b/sdk/core/Azure.Core/src/Azure.Core.csproj @@ -2,7 +2,7 @@ This is the implementation of the Azure Client Pipeline Microsoft Azure Client Pipeline - 1.41.0-beta.1 + 1.41.0 1.40.0 Microsoft Azure Client Pipeline From 54f02b49d2c6cb3460f5eaa320bdacc25c32ee68 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 11 Jul 2024 11:52:59 -0400 Subject: [PATCH 054/144] Update AutoRest C# version to 3.0.0-beta.20240711.1 (#44953) --- eng/Packages.Data.props | 2 +- eng/emitter-package-lock.json | 16 ++++++++-------- eng/emitter-package.json | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index af791ece308a5..53c61afeab195 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -226,7 +226,7 @@ All should have PrivateAssets="All" set so they don't become package dependencies --> - + diff --git a/eng/emitter-package-lock.json b/eng/emitter-package-lock.json index c8e923c612a90..1b900f546b036 100644 --- a/eng/emitter-package-lock.json +++ b/eng/emitter-package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20240710.2" + "@azure-tools/typespec-csharp": "0.2.0-beta.20240711.1" }, "devDependencies": { "@azure-tools/typespec-autorest": "0.43.0", @@ -22,9 +22,9 @@ } }, "node_modules/@autorest/csharp": { - "version": "3.0.0-beta.20240710.2", - "resolved": "https://registry.npmjs.org/@autorest/csharp/-/csharp-3.0.0-beta.20240710.2.tgz", - "integrity": "sha512-xFYWQjVKkid9PZRYPmch16S6SQqx094CFqMWS5T7/A3kPtXcu5IIPoyyhupaDxAZEHlEpQ70qaE/mNOlPX/acQ==" + "version": "3.0.0-beta.20240711.1", + "resolved": "https://registry.npmjs.org/@autorest/csharp/-/csharp-3.0.0-beta.20240711.1.tgz", + "integrity": "sha512-gZNbt8UqtTkTWVvmKIG6PifZRKvsvJbZk74gKvTruxxmnMJru8rct+xUwzfvio8eQmo5Z0xvrUAnSNCF7/0+DA==" }, "node_modules/@azure-tools/typespec-autorest": { "version": "0.43.0", @@ -116,11 +116,11 @@ } }, "node_modules/@azure-tools/typespec-csharp": { - "version": "0.2.0-beta.20240710.2", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-csharp/-/typespec-csharp-0.2.0-beta.20240710.2.tgz", - "integrity": "sha512-LYSWJ+vuvCjlahcGKPwrJR4uTRcJxzT7715LqDDSDQyH6RcPNVyIGOjjmlfj2AHBYI8bPnq6UgkjfecsUR2Drg==", + "version": "0.2.0-beta.20240711.1", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-csharp/-/typespec-csharp-0.2.0-beta.20240711.1.tgz", + "integrity": "sha512-Y/gYQR/cPnPYZyORTEIM7Gvh2NrWOpRlwJE5bRDUx3n0rG+bOtmbqfrLaMSav/E/EPwA4bRO6KpK84XzZYQhoA==", "dependencies": { - "@autorest/csharp": "3.0.0-beta.20240710.2", + "@autorest/csharp": "3.0.0-beta.20240711.1", "json-serialize-refs": "0.1.0-0" }, "peerDependencies": { diff --git a/eng/emitter-package.json b/eng/emitter-package.json index bfe498b005d83..cb79576a6d7fe 100644 --- a/eng/emitter-package.json +++ b/eng/emitter-package.json @@ -1,7 +1,7 @@ { "main": "dist/src/index.js", "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20240710.2" + "@azure-tools/typespec-csharp": "0.2.0-beta.20240711.1" }, "devDependencies": { "@azure-tools/typespec-autorest": "0.43.0", From 4eaf6edfdd06d671a5d0a7aeff11956c1cf96dca Mon Sep 17 00:00:00 2001 From: Anne Thompson Date: Thu, 11 Jul 2024 09:07:27 -0700 Subject: [PATCH 055/144] Preparation for release of System.ClientModel v1.1.0-beta.5 (#44939) * Preparation for release of System.ClientModel v1.1.0-beta.5 * updates per pr fb --- sdk/core/System.ClientModel/CHANGELOG.md | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/sdk/core/System.ClientModel/CHANGELOG.md b/sdk/core/System.ClientModel/CHANGELOG.md index 1b15ee56e7b9e..a0ca3f709467d 100644 --- a/sdk/core/System.ClientModel/CHANGELOG.md +++ b/sdk/core/System.ClientModel/CHANGELOG.md @@ -1,15 +1,16 @@ # Release History -## 1.1.0-beta.5 (Unreleased) +## 1.1.0-beta.5 (2024-07-11) ### Features Added -### Breaking Changes - -### Bugs Fixed +- Added `AsyncPageCollection` and `PageCollection` types as return types from paginated service operations, and `ContinuationToken` type for resuming collection state across processes. ### Other Changes +- Renamed `AsyncResultCollection` and `ResultCollection` to `AsyncCollectionResult` and `CollectionResult` to standardize use of the `Result` suffix in type names. +- Removed `AsyncPageableCollection` and `PageableCollection` that previously represented collections of items rather than collections of pages of items, and renamed `ResultPage` to `PageResult`. + ## 1.1.0-beta.4 (2024-05-16) ### Features Added @@ -19,7 +20,7 @@ - Added `AsyncPageableCollection`, `PageableCollection` and `ResultPage` for clients to return from service methods where collection values are delivered to the client over one or more service responses. - Added `SetRawResponse` method to `ClientResult` to allow the response held by the result to be changed, for example by derived types that obtain multiple responses from polling the service. -### Breaking Changes +### Other Changes - `ClientResult.GetRawResponse` will now throw `InvalidOperationException` if called before the result's raw response is set, for example by collection result types that delay sending a request to the service until the collection is enumerated. @@ -30,7 +31,7 @@ - Added protected `Apply(PipelineMessage)` method to `RequestOptions` so that derived types can extend its functionality. - Added `Create(Stream)` overload to `BinaryContent`. -### Breaking Changes +### Other Changes - Removed `[Serializable]` attribute and serialization constructor from `ClientResultException`. - Made `value` parameter nullable in `PipelineMessage.SetProperty` method. @@ -45,14 +46,11 @@ - Added an implicit cast from `string` to `ApiKeyCredential`. - Added an implicit cast from `ClientResult` to `T`. -### Breaking Changes +### Other Changes - Changed `HttpClientPipelineTransport.Shared` and `ClientRetryPolicy.Default` from static readonly fields to static properties. - Changed `PipelineResponse.Content` property from abstract to virtual. - Removed the `ResponseBufferingPolicy` and moved response buffering functionality into `PipelineTransport`. - -### Other Changes - - Made `CancellationToken` parameter passed to `BinaryContent.WriteTo` optional. ## 1.1.0-beta.1 (2024-02-01) @@ -70,7 +68,7 @@ ## 1.0.0-beta.2 (2023-12-14) -### Breaking Changes +### Other Changes - `ModelReaderWriter` and `ModelReaderWriterOptions` have moved to System.ClientModel.Primitives namespace - `JsonModelConverter` was removed. From 7bbfed89ecd7757c561a6aec4559d8f0209ae6b5 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 11 Jul 2024 13:26:32 -0400 Subject: [PATCH 056/144] Support regex/negative regex filters for stress test discovery. Add storage env defaults (#44936) Co-authored-by: Ben Broderick Phillips --- .../scripts/stress-testing/find-all-stress-packages.ps1 | 2 +- .../scripts/stress-testing/stress-test-deployment-lib.ps1 | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/eng/common/scripts/stress-testing/find-all-stress-packages.ps1 b/eng/common/scripts/stress-testing/find-all-stress-packages.ps1 index a79db98e7c968..bec510cd958a6 100644 --- a/eng/common/scripts/stress-testing/find-all-stress-packages.ps1 +++ b/eng/common/scripts/stress-testing/find-all-stress-packages.ps1 @@ -75,7 +75,7 @@ function ParseChart([string]$chartFile) { function MatchesAnnotations([hashtable]$chart, [hashtable]$filters) { foreach ($filter in $filters.GetEnumerator()) { - if (!$chart["annotations"] -or $chart["annotations"][$filter.Key] -ne $filter.Value) { + if (!$chart["annotations"] -or $chart["annotations"][$filter.Key] -notmatch $filter.Value) { return $false } } diff --git a/eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1 b/eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1 index aa426d7b4687d..c67540f3b3e5c 100644 --- a/eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1 +++ b/eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1 @@ -122,6 +122,12 @@ function DeployStressTests( } $clusterGroup = 'rg-stress-cluster-prod' $subscription = 'Azure SDK Test Resources' + } elseif ($environment -eq 'storage') { + if ($clusterGroup -or $subscription) { + Write-Warning "Overriding cluster group and subscription with defaults for 'storage' environment." + } + $clusterGroup = 'rg-stress-cluster-storage' + $subscription = 'XClient' } elseif (!$clusterGroup -or !$subscription) { throw "clusterGroup and subscription parameters must be specified when deploying to an environment that is not pg or prod." } From 08a6829c0a46226cf4535410114ced6c58488750 Mon Sep 17 00:00:00 2001 From: Anne Thompson Date: Thu, 11 Jul 2024 11:02:52 -0700 Subject: [PATCH 057/144] remove broken links from Core changelogs to address link checker issue (#44958) --- .../Microsoft.Azure.Core.Spatial.NewtonsoftJson/CHANGELOG.md | 4 ++-- sdk/core/Microsoft.Azure.Core.Spatial/CHANGELOG.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/core/Microsoft.Azure.Core.Spatial.NewtonsoftJson/CHANGELOG.md b/sdk/core/Microsoft.Azure.Core.Spatial.NewtonsoftJson/CHANGELOG.md index 30807c19755d1..dbf60e8de41c7 100644 --- a/sdk/core/Microsoft.Azure.Core.Spatial.NewtonsoftJson/CHANGELOG.md +++ b/sdk/core/Microsoft.Azure.Core.Spatial.NewtonsoftJson/CHANGELOG.md @@ -16,11 +16,11 @@ Thank you to our developer community members who helped to make the Microsoft.Spatial converters better with their contributions to this release: -- Jack Bond ([GitHub](https://github.com/jackbond)) +- Jack Bond ### Features Added -- Added converter support for the following types ([#24367](https://github.com/Azure/azure-sdk-for-net/issues/24367)): +- Added converter support for the following types: - GeographyLineString - GeographyPolygon - GeographyMultiPoint diff --git a/sdk/core/Microsoft.Azure.Core.Spatial/CHANGELOG.md b/sdk/core/Microsoft.Azure.Core.Spatial/CHANGELOG.md index 73f2d0652783d..a435508a498cd 100644 --- a/sdk/core/Microsoft.Azure.Core.Spatial/CHANGELOG.md +++ b/sdk/core/Microsoft.Azure.Core.Spatial/CHANGELOG.md @@ -16,11 +16,11 @@ Thank you to our developer community members who helped to make the Microsoft.Spatial converters better with their contributions to this release: -- Jack Bond ([GitHub](https://github.com/jackbond)) +- Jack Bond ### Features Added -- Added converter support for the following types ([#24367](https://github.com/Azure/azure-sdk-for-net/issues/24367)): +- Added converter support for the following types: - GeographyLineString - GeographyPolygon - GeographyMultiPoint From 221f8398af36c29611654f825384f73f93141f4f Mon Sep 17 00:00:00 2001 From: Jesse Squire Date: Thu, 11 Jul 2024 14:59:55 -0400 Subject: [PATCH 058/144] [Service Bus] Enforce batch limits (#44917) * [Service Bus] Enforce batch limits The focus of these changes is to add client-side logic to force the maximum size for batches when large message support is enabled and to enforce the undocumented 4,500 message limit for a single batch. --- .../Azure.Messaging.ServiceBus/CHANGELOG.md | 15 ++++-- .../src/Amqp/AmqpMessageBatch.cs | 22 ++++---- .../src/Amqp/AmqpSender.cs | 41 +++++++++++++-- .../src/Receiver/ServiceBusReceiver.cs | 9 +++- .../src/Receiver/ServiceBusReceiverOptions.cs | 14 ----- .../src/Sender/CreateMessageBatchOptions.cs | 8 +++ .../tests/Amqp/AmqpMessageBatchTests.cs | 52 +++++++++++++++++++ .../Sender/ServiceBusMessageBatchTests.cs | 2 - 8 files changed, 131 insertions(+), 32 deletions(-) diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md b/sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md index fb55ddac919fa..acde0cbc240fe 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md @@ -2,16 +2,24 @@ ## 7.18.0-beta.2 (Unreleased) +### Acknowledgments +Thank you to our developer community members who helped to make the Service Bus client library better with their contributions to this release: + +- Martin Costello _([GitHub](https://github.com/martincostello))_ + ### Features Added ### Breaking Changes ### Bugs Fixed -- Fixed an error that caused connection strings using host names without a scheme to fail parsing and be considered invalid. +- Fixed an issue that caused connection strings using host names without a scheme to fail parsing and be considered invalid. + - Fixed an issue where the scheduled enqueue time was not cleared when creating a new message from a received message. -- Fixed an error that prevented relative URIs from being used with [application properties](https://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-application-properties) in the `ServiceBusMessage.ApplicationProperties` and `ServiceBusReceivedMessage.ApplicationProperties` collections. +- Fixed an issue that prevented relative URIs from being used with [application properties](https://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-application-properties) in the `ServiceBusMessage.ApplicationProperties` and `ServiceBusReceivedMessage.ApplicationProperties` collections. + +- Fixed an issue that caused `ServiceBusMessageBatch` to accept more than the allowed 1mb batch limit when sending to Service Bus entities with large message sizes enabled. ### Other Changes @@ -19,7 +27,8 @@ - Updated the `Microsoft.Azure.Amqp` dependency to 2.6.7, which contains a fix for decoding messages with a null format code as the body. -- Instances of `ServiceBusSender` created with no explicit `ServiceBusSenderOptions` value allocate less memory. +- Improved efficiency of subclient creation, reducing allocations when no explicit options are passed. - Fixed deserialization of the lock token to take into account endianness. _(A community contribution, courtesy of [martincostello](https://github.com/martincostello))_ + ## 7.18.0-beta.1 (2024-05-08) diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Amqp/AmqpMessageBatch.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Amqp/AmqpMessageBatch.cs index f80d00b6b49f5..f8386b1a6fbb1 100755 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Amqp/AmqpMessageBatch.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Amqp/AmqpMessageBatch.cs @@ -38,7 +38,7 @@ internal class AmqpMessageBatch : TransportMessageBatch /// well as any overhead for the batch itself when sent to the Queue/Topic. /// /// - public override long MaxSizeInBytes { get; } + public override long MaxSizeInBytes => Options.MaxSizeInBytes.Value; /// /// The size of the batch, in bytes, as it will be sent to the Queue/Topic @@ -74,8 +74,7 @@ internal class AmqpMessageBatch : TransportMessageBatch /// Initializes a new instance of the class. /// /// - /// The converter to use for translating data into - /// an AMQP-specific message. + /// The converter to use for translating data into an AMQP-specific message. /// The set of options to apply to the batch. /// public AmqpMessageBatch(AmqpMessageConverter messageConverter, @@ -86,7 +85,6 @@ public AmqpMessageBatch(AmqpMessageConverter messageConverter, Argument.AssertNotNull(messageConverter, nameof(AmqpMessageConverter)); Options = options; - MaxSizeInBytes = options.MaxSizeInBytes.Value; _messageConverter = messageConverter; } @@ -104,6 +102,15 @@ public override bool TryAddMessage(ServiceBusMessage message) Argument.AssertNotNull(message, nameof(message)); Argument.AssertNotDisposed(_disposed, nameof(ServiceBusMessageBatch)); + // If the batch is full according to the message limit, then + // reject the message. + + if ((Options.MaxMessageCount.HasValue) + && (_batchMessages.Count >= Options.MaxMessageCount)) + { + return false; + } + var amqpMessage = _messageConverter.SBMessageToAmqpMessage(message); long size = 0; @@ -112,17 +119,14 @@ public override bool TryAddMessage(ServiceBusMessage message) // Initialize the size by reserving space for the batch envelope taking into account the properties from the first // message which will be used to populate properties on the batch envelope. - var messageList = new List(); - messageList.Add(amqpMessage); - var reserveOverheadMessage = _messageConverter.BuildAmqpBatchFromMessages(messageList.AsReadOnly(), forceBatch: true); + using var reserveOverheadMessage = + _messageConverter.BuildAmqpBatchFromMessages(new[] { amqpMessage }, forceBatch: true); size = _sizeBytes + reserveOverheadMessage.SerializedMessageSize + (amqpMessage.SerializedMessageSize <= MaximumBytesSmallMessage ? OverheadBytesSmallMessage : OverheadBytesLargeMessage); - - reserveOverheadMessage.Dispose(); } else { diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Amqp/AmqpSender.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Amqp/AmqpSender.cs index bec362352b3d0..ec56ccb2fa0f1 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Amqp/AmqpSender.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Amqp/AmqpSender.cs @@ -84,6 +84,21 @@ internal class AmqpSender : TransportSender /// private long? MaxMessageSize { get; set; } + /// + /// The maximum size of an AMQP message batch allowed by the associated + /// sender link. + /// + /// + /// The maximum message batch size, in bytes. + /// + private long? MaxBatchSize { get; set; } + + /// + /// The maximum number of messages to allow in a single batch. + /// + /// + private int MaxMessageCount { get; set; } + /// /// Initializes a new instance of the class. /// @@ -114,6 +129,18 @@ public AmqpSender( Argument.AssertNotNull(connectionScope, nameof(connectionScope)); Argument.AssertNotNull(retryPolicy, nameof(retryPolicy)); + // NOTE: + // This is a temporary work-around until Service Bus exposes a link property for + // the maximum batch size. The limit for batches differs from the limit for individual + // messages. Tracked by: https://github.com/Azure/azure-sdk-for-net/issues/44914 + MaxBatchSize = 1048576; + + // NOTE: + // This is a temporary work-around until Service Bus exposes a link property for + // the maximum batch size. The limit for batches differs from the limit for individual + // messages. Tracked by: https://github.com/Azure/azure-sdk-for-net/issues/44916 + MaxMessageCount = 4500; + _entityPath = entityPath; Identifier = identifier; _retryPolicy = retryPolicy; @@ -180,7 +207,7 @@ internal async ValueTask CreateMessageBatchInternalAsync( // Ensure that maximum message size has been determined; this depends on the underlying // AMQP link, so if not set, requesting the link will ensure that it is populated. - if (!MaxMessageSize.HasValue) + if ((!MaxMessageSize.HasValue) || (!MaxBatchSize.HasValue)) { await _sendLink.GetOrCreateAsync(timeout).ConfigureAwait(false); } @@ -188,9 +215,10 @@ internal async ValueTask CreateMessageBatchInternalAsync( // Ensure that there was a maximum size populated; if none was provided, // default to the maximum size allowed by the link. - options.MaxSizeInBytes ??= MaxMessageSize; + options.MaxSizeInBytes ??= MaxBatchSize; + options.MaxMessageCount ??= MaxMessageCount; - Argument.AssertInRange(options.MaxSizeInBytes.Value, ServiceBusSender.MinimumBatchSizeLimit, MaxMessageSize.Value, nameof(options.MaxSizeInBytes)); + Argument.AssertInRange(options.MaxSizeInBytes.Value, ServiceBusSender.MinimumBatchSizeLimit, MaxBatchSize.Value, nameof(options.MaxSizeInBytes)); return new AmqpMessageBatch(_messageConverter, options); } @@ -616,6 +644,13 @@ protected virtual async Task CreateLinkAndEnsureSenderStateAsyn await Task.Delay(15, cancellationToken).ConfigureAwait(false); MaxMessageSize = (long)link.Settings.MaxMessageSize; + // Update with service metadata when available: + // https://github.com/Azure/azure-sdk-for-net/issues/44914 + // https://github.com/Azure/azure-sdk-for-net/issues/44916 + + MaxBatchSize = Math.Min(MaxMessageSize.Value, MaxBatchSize.Value); + MaxMessageSize = MaxMessageSize; + ServiceBusEventSource.Log.CreateSendLinkComplete(Identifier); link.Closed += OnSenderLinkClosed; return link; diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Receiver/ServiceBusReceiver.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Receiver/ServiceBusReceiver.cs index 63b2351b29f6a..845365faccc6a 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Receiver/ServiceBusReceiver.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Receiver/ServiceBusReceiver.cs @@ -37,6 +37,9 @@ public class ServiceBusReceiver : IAsyncDisposable /// The maximum number of messages to delete in a single batch. This cap is established and enforced by the service. internal const int MaxDeleteMessageCount = 4000; + /// The set of default options to use for initialization when no explicit options were provided. + private static ServiceBusReceiverOptions s_defaultOptions; + /// /// The fully qualified Service Bus namespace that the receiver is associated with. This is likely /// to be similar to {yournamespace}.servicebus.windows.net. @@ -177,7 +180,11 @@ internal ServiceBusReceiver( Argument.AssertNotNullOrWhiteSpace(entityPath, nameof(entityPath)); connection.ThrowIfClosed(); - options = options?.Clone() ?? new ServiceBusReceiverOptions(); + // If no explicit options were provided, use the default set, creating them as needed. There is + // a benign race condition here where multiple sets of default options may be created when initializing. + // The cost of hitting the race is lower than the cost of synchronizing each access. + options ??= s_defaultOptions ??= new ServiceBusReceiverOptions(); + Identifier = string.IsNullOrEmpty(options.Identifier) ? DiagnosticUtilities.GenerateIdentifier(entityPath) : options.Identifier; _connection = connection; _retryPolicy = connection.RetryOptions.ToRetryPolicy(); diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Receiver/ServiceBusReceiverOptions.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Receiver/ServiceBusReceiverOptions.cs index 418eac0e58451..4a9f4133ec3b4 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Receiver/ServiceBusReceiverOptions.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Receiver/ServiceBusReceiverOptions.cs @@ -78,19 +78,5 @@ public int PrefetchCount /// [EditorBrowsable(EditorBrowsableState.Never)] public override string ToString() => base.ToString(); - - /// - /// Creates a new copy of the current , cloning its attributes into a new instance. - /// - /// - /// A new copy of . - internal ServiceBusReceiverOptions Clone() => - new ServiceBusReceiverOptions - { - ReceiveMode = ReceiveMode, - PrefetchCount = PrefetchCount, - SubQueue = SubQueue, - Identifier = Identifier - }; } } diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Sender/CreateMessageBatchOptions.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Sender/CreateMessageBatchOptions.cs index 7b996e3004292..f0760013c46ad 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Sender/CreateMessageBatchOptions.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Sender/CreateMessageBatchOptions.cs @@ -17,6 +17,12 @@ public class CreateMessageBatchOptions /// The requested maximum size to allow for the batch, in bytes. private long? _maxSizeInBytes; + /// + /// The maximum number of messages to allow in a single batch. + /// + /// + internal int? MaxMessageCount { get; set; } + /// /// The maximum size to allow for a single batch of messages, in bytes. /// @@ -25,9 +31,11 @@ public class CreateMessageBatchOptions /// The desired limit, in bytes, for the size of the associated service bus message batch. If null, /// the maximum size allowed by the active transport will be used. /// + /// /// /// A negative value is attempted to be set for the property. /// + /// public long? MaxSizeInBytes { get => _maxSizeInBytes; diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Amqp/AmqpMessageBatchTests.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Amqp/AmqpMessageBatchTests.cs index b589e588c4b1c..a4dddd7a542a6 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Amqp/AmqpMessageBatchTests.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Amqp/AmqpMessageBatchTests.cs @@ -199,6 +199,58 @@ public void TryAddAcceptMessagesUntilTheMaximumSizeIsReached() } } + /// + /// Verifies functionality of the + /// method. + /// + /// + [Test] + public void TryAdRespectsTheMaximumMessageCount() + { + var maximumCount = 5; + var currentIndex = -1; + var messages = new AmqpMessage[maximumCount + 1]; + var mockMessage = new Mock(); + + var mockMessageConverter = new InjectableMockConverter + { + BuildBatchFromAmqpMessagesHandler = (_s) => mockMessage.Object, + BuildAmqpMessageFromSBMessageHandler = (_s) => messages[++currentIndex] + }; + + mockMessage + .Setup(message => message.SerializedMessageSize) + .Returns(40); + + var options = new CreateMessageBatchOptions + { + MaxSizeInBytes = 50000, + MaxMessageCount = maximumCount + }; + + for (var index = 0; index < messages.Length; ++index) + { + var size = 40; + var messageToAdd = new Mock(); + messageToAdd.Setup(messageToAdd => messageToAdd.SerializedMessageSize).Returns(size); + messages[index] = messageToAdd.Object; + } + + var batch = new AmqpMessageBatch(mockMessageConverter, options); + + for (var index = 0; index < messages.Length; ++index) + { + if (index == messages.Length - 1) + { + Assert.That(batch.TryAddMessage(new ServiceBusMessage(new byte[10])), Is.False, "The final addition should not fit in the available space."); + } + else + { + Assert.That(batch.TryAddMessage(new ServiceBusMessage(new byte[10])), Is.True, $"The addition for index: { index } should fit and be accepted."); + } + } + } + /// /// Verifies functionality of the /// method. diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Sender/ServiceBusMessageBatchTests.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Sender/ServiceBusMessageBatchTests.cs index 06a46ca45437a..24bc4a6d3d5ba 100755 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Sender/ServiceBusMessageBatchTests.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Sender/ServiceBusMessageBatchTests.cs @@ -7,8 +7,6 @@ using Azure.Core.Shared; using Azure.Messaging.ServiceBus.Amqp; using Azure.Messaging.ServiceBus.Core; -using Azure.Messaging.ServiceBus.Diagnostics; -using Moq; using NUnit.Framework; namespace Azure.Messaging.ServiceBus.Tests.Sender From db1e7d276b8c633d3bc398d361f0ee68ff4f5d5a Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 11 Jul 2024 15:41:20 -0400 Subject: [PATCH 059/144] Update azure-sdk-build-tools Repository Resource Refs in Yaml files (#44859) --- eng/pipelines/mgmt.yml | 2 +- eng/pipelines/templates/stages/1es-redirect.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/mgmt.yml b/eng/pipelines/mgmt.yml index fbc0c7032f9b7..c1270ac61e57c 100644 --- a/eng/pipelines/mgmt.yml +++ b/eng/pipelines/mgmt.yml @@ -3,7 +3,7 @@ resources: - repository: azure-sdk-build-tools type: git name: internal/azure-sdk-build-tools - ref: refs/tags/azure-sdk-build-tools_20240628.1 + ref: refs/tags/azure-sdk-build-tools_20240711.1 parameters: - name: ShouldPublishToNuget diff --git a/eng/pipelines/templates/stages/1es-redirect.yml b/eng/pipelines/templates/stages/1es-redirect.yml index 45faae96606e6..22f1d10268f57 100644 --- a/eng/pipelines/templates/stages/1es-redirect.yml +++ b/eng/pipelines/templates/stages/1es-redirect.yml @@ -11,7 +11,7 @@ resources: - repository: azure-sdk-build-tools type: git name: internal/azure-sdk-build-tools - ref: refs/tags/azure-sdk-build-tools_20240628.1 + ref: refs/tags/azure-sdk-build-tools_20240711.1 parameters: - name: stages From c44f2c2d5b1fea70da2d299f9bcaa0ef18b40e66 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 11 Jul 2024 19:15:42 -0400 Subject: [PATCH 060/144] Increment version for core releases (#44964) * Increment package version after release of System.ClientModel * Increment package version after release of Azure.Core --- sdk/core/Azure.Core/CHANGELOG.md | 10 ++++++++++ sdk/core/Azure.Core/src/Azure.Core.csproj | 4 ++-- sdk/core/System.ClientModel/CHANGELOG.md | 10 ++++++++++ .../System.ClientModel/src/System.ClientModel.csproj | 2 +- 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/sdk/core/Azure.Core/CHANGELOG.md b/sdk/core/Azure.Core/CHANGELOG.md index d992bb8e84baf..060a1ebd47e04 100644 --- a/sdk/core/Azure.Core/CHANGELOG.md +++ b/sdk/core/Azure.Core/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.42.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.41.0 (2024-07-11) ### Bugs Fixed diff --git a/sdk/core/Azure.Core/src/Azure.Core.csproj b/sdk/core/Azure.Core/src/Azure.Core.csproj index 2e24b54332e37..3af572e38027c 100644 --- a/sdk/core/Azure.Core/src/Azure.Core.csproj +++ b/sdk/core/Azure.Core/src/Azure.Core.csproj @@ -2,9 +2,9 @@ This is the implementation of the Azure Client Pipeline Microsoft Azure Client Pipeline - 1.41.0 + 1.42.0-beta.1 - 1.40.0 + 1.41.0 Microsoft Azure Client Pipeline enable $(DefineConstants);AZURE_NULLABLE;HAS_INTERNALS_VISIBLE_CORE diff --git a/sdk/core/System.ClientModel/CHANGELOG.md b/sdk/core/System.ClientModel/CHANGELOG.md index a0ca3f709467d..51564926da757 100644 --- a/sdk/core/System.ClientModel/CHANGELOG.md +++ b/sdk/core/System.ClientModel/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.1.0-beta.6 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.1.0-beta.5 (2024-07-11) ### Features Added diff --git a/sdk/core/System.ClientModel/src/System.ClientModel.csproj b/sdk/core/System.ClientModel/src/System.ClientModel.csproj index 8de4e104ab615..00ec25bb56908 100644 --- a/sdk/core/System.ClientModel/src/System.ClientModel.csproj +++ b/sdk/core/System.ClientModel/src/System.ClientModel.csproj @@ -2,7 +2,7 @@ Contains building blocks for clients that call cloud services. - 1.1.0-beta.5 + 1.1.0-beta.6 1.0.0 enable From dd1b7fceaf07a44397906d5af7d9b274e49ed1fb Mon Sep 17 00:00:00 2001 From: Sean McCullough <44180881+seanmcc-msft@users.noreply.github.com> Date: Thu, 11 Jul 2024 21:13:19 -0500 Subject: [PATCH 061/144] Removed Entra App Secrets from Storage tests (#44427) --- .../Azure.Storage.Blobs.Batch/assets.json | 2 +- .../assets.json | 2 +- .../tests/ChangeFeedTestBase.cs | 2 +- sdk/storage/Azure.Storage.Blobs/assets.json | 2 +- .../tests/AppendBlobClientTests.cs | 68 +++--- .../tests/Azure.Storage.Blobs.Tests.csproj | 2 +- .../tests/BlobBaseClientTests.cs | 78 ++++--- .../tests/BlobClientTests.cs | 12 +- .../tests/BlobSasBuilderTests.cs | 4 +- .../Azure.Storage.Blobs/tests/BlobSasTests.cs | 8 +- .../Azure.Storage.Blobs/tests/BlobTestBase.cs | 14 +- .../tests/BlobTestEnvironment.cs | 3 +- .../tests/BlockBlobClientTests.cs | 102 ++++++--- .../tests/ClientBuilderExtensions.cs | 7 +- .../tests/ContainerClientTests.cs | 25 +- .../ImmutableStorageWithVersioningTests.cs | 63 +++--- .../tests/ManagedDiskFixture.cs | 5 +- .../tests/ManagedDiskTests.cs | 5 +- .../tests/PageBlobClientTests.cs | 69 +++--- .../tests/ServiceClientTests.cs | 16 +- sdk/storage/Azure.Storage.Common/assets.json | 2 +- .../tests/Shared/ClientBuilder.cs | 3 +- .../tests/Shared/KeyVaultConfiguration.cs | 8 - .../tests/Shared/ManagedDiskConfiguration.cs | 9 - .../tests/Shared/SampleTest.cs | 20 -- .../tests/Shared/StorageTestBase.cs | 14 +- .../tests/Shared/StorageTestEnvironment.cs | 8 - .../tests/Shared/TenantConfiguration.cs | 28 +-- .../Shared/TenantConfigurationBuilder.cs | 19 -- .../Shared/TestConfigurationsTemplate.xml | 213 ++++++++---------- .../assets.json | 2 +- .../tests/ClientBuilderExtensions.cs | 2 +- ...ppendBlobDirectoryToShareDirectoryTests.cs | 4 +- ...BlockBlobDirectoryToShareDirectoryTests.cs | 4 +- .../ClientBuilderExtensions.cs | 7 +- .../PageBlobDirectoryToShareDirectoryTests.cs | 4 +- ...hareDirectoryToAppendBlobDirectoryTests.cs | 4 +- ...ShareDirectoryToBlockBlobDirectoryTests.cs | 4 +- .../ShareDirectoryToPageBlobDirectoryTests.cs | 4 +- .../assets.json | 2 +- .../ShareDirectoryStartTransferCopyTests.cs | 4 +- .../Azure.Storage.DataMovement/assets.json | 2 +- .../tests/AppendBlobStorageResourceTests.cs | 30 ++- .../tests/BlockBlobStorageResourceTests.cs | 29 ++- .../tests/ClientBuilderExtensions.cs | 5 +- .../tests/PageBlobStorageResourceTests.cs | 30 ++- .../tests/Shared/DataMovementBlobTestBase.cs | 7 +- .../StartTransferSyncCopyDirectoryTests.cs | 2 +- .../Azure.Storage.Files.DataLake/assets.json | 2 +- .../tests/ClientBuilderExtensions.cs | 2 +- .../tests/DataLakeTestBase.cs | 4 +- .../tests/DataLakeTestEnvironment.cs | 7 +- .../tests/DirectoryClientTests.cs | 32 +-- .../tests/FileClientTests.cs | 12 +- .../tests/FileSystemClientTests.cs | 28 +-- .../tests/PathClientTests.cs | 6 +- .../tests/ServiceClientTests.cs | 8 +- .../Azure.Storage.Files.Shares/assets.json | 2 +- .../tests/ClientBuilderExtensions.cs | 5 +- .../tests/CopySourceAuthTests.cs | 4 +- .../tests/DirectoryClientTests.cs | 28 +-- .../tests/FileClientTests.cs | 52 +++-- .../tests/FileTestBase.cs | 3 + .../tests/ShareClientTests.cs | 12 +- sdk/storage/Azure.Storage.Queues/assets.json | 2 +- .../tests/ClientBuilderExtensions.cs | 5 +- .../tests/QueueClientTests.cs | 17 +- .../tests/QueueTestBase.cs | 13 +- .../tests/ServiceClientTests.cs | 13 +- sdk/storage/Azure.Storage.sln | 8 +- sdk/storage/storage-preview-public-msft.json | 9 + sdk/storage/test-resources-post.ps1 | 20 +- sdk/storage/tests.yml | 3 + 73 files changed, 602 insertions(+), 654 deletions(-) create mode 100644 sdk/storage/storage-preview-public-msft.json diff --git a/sdk/storage/Azure.Storage.Blobs.Batch/assets.json b/sdk/storage/Azure.Storage.Blobs.Batch/assets.json index a82847cd8dacf..1e9a6b8b7ca8c 100644 --- a/sdk/storage/Azure.Storage.Blobs.Batch/assets.json +++ b/sdk/storage/Azure.Storage.Blobs.Batch/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/storage/Azure.Storage.Blobs.Batch", - "Tag": "net/storage/Azure.Storage.Blobs.Batch_34b0b578dc" + "Tag": "net/storage/Azure.Storage.Blobs.Batch_91b5e838a2" } diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/assets.json b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/assets.json index aa65517b06a2c..004f1cc89330f 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/assets.json +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/storage/Azure.Storage.Blobs.ChangeFeed", - "Tag": "net/storage/Azure.Storage.Blobs.ChangeFeed_198f5277c7" + "Tag": "net/storage/Azure.Storage.Blobs.ChangeFeed_83537f1c55" } diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/ChangeFeedTestBase.cs b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/ChangeFeedTestBase.cs index d41bd8539b214..5feed45e60cad 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/ChangeFeedTestBase.cs +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/tests/ChangeFeedTestBase.cs @@ -90,7 +90,7 @@ public async Task GetTestContainerAsync( if (publicAccessType == default) { - publicAccessType = premium ? PublicAccessType.None : PublicAccessType.BlobContainer; + publicAccessType = PublicAccessType.None; } BlobContainerClient container = InstrumentClient(service.GetBlobContainerClient(containerName)); diff --git a/sdk/storage/Azure.Storage.Blobs/assets.json b/sdk/storage/Azure.Storage.Blobs/assets.json index ed50b4446fc0d..65d82fdcb5979 100644 --- a/sdk/storage/Azure.Storage.Blobs/assets.json +++ b/sdk/storage/Azure.Storage.Blobs/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/storage/Azure.Storage.Blobs", - "Tag": "net/storage/Azure.Storage.Blobs_62a8c8fa29" + "Tag": "net/storage/Azure.Storage.Blobs_b8e4c4ca1e" } diff --git a/sdk/storage/Azure.Storage.Blobs/tests/AppendBlobClientTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/AppendBlobClientTests.cs index 5b3237f9ece46..ca888ef89301d 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/AppendBlobClientTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/AppendBlobClientTests.cs @@ -85,7 +85,7 @@ public void Ctor_TokenAuth_Http() // Act TestHelper.AssertExpectedException( - () => new AppendBlobClient(httpUri, Tenants.GetOAuthCredential()), + () => new AppendBlobClient(httpUri, TestEnvironment.Credential), new ArgumentException("Cannot use TokenCredential without HTTPS.")); } @@ -176,7 +176,7 @@ public async Task Ctor_DefaultAudience() AppendBlobClient aadBlob = InstrumentClient(new AppendBlobClient( uriBuilder.ToUri(), - Tenants.GetOAuthCredential(), + TestEnvironment.Credential, options)); // Assert @@ -185,6 +185,7 @@ public async Task Ctor_DefaultAudience() } [RecordedTest] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_CustomAudience() { // Arrange @@ -204,7 +205,7 @@ public async Task Ctor_CustomAudience() AppendBlobClient aadBlob = InstrumentClient(new AppendBlobClient( uriBuilder.ToUri(), - Tenants.GetOAuthCredential(), + TestEnvironment.Credential, options)); // Assert @@ -213,6 +214,7 @@ public async Task Ctor_CustomAudience() } [RecordedTest] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_StorageAccountAudience() { // Arrange @@ -232,7 +234,7 @@ public async Task Ctor_StorageAccountAudience() AppendBlobClient aadBlob = InstrumentClient(new AppendBlobClient( uriBuilder.ToUri(), - Tenants.GetOAuthCredential(), + TestEnvironment.Credential, options)); // Assert @@ -575,7 +577,7 @@ public async Task CreateAsync_EncryptionScopeAccountSAS() public async Task CreateAsync_EncryptionScopeIdentitySAS() { // Arrange - BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth(TestEnvironment.Credential); await using DisposingContainer test = await GetTestContainerAsync(oauthService); Response userDelegationKey = await oauthService.GetUserDelegationKeyAsync( @@ -1291,8 +1293,6 @@ public async Task AppendBlockFromUriAsync_Min() await using DisposingContainer test = await GetTestContainerAsync(); // Arrange - await test.Container.SetAccessPolicyAsync(PublicAccessType.BlobContainer); - var data = GetRandomBuffer(Constants.KB); using (var stream = new MemoryStream(data)) @@ -1310,7 +1310,9 @@ public async Task AppendBlockFromUriAsync_Min() }; // Act - Response response = await destBlob.AppendBlockFromUriAsync(sourceBlob.Uri, options); + Response response = await destBlob.AppendBlockFromUriAsync( + sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), + options); // Ensure that we grab the whole ETag value from the service without removing the quotes Assert.AreEqual(response.Value.ETag.ToString(), $"\"{response.GetRawResponse().Headers.ETag}\""); @@ -1428,8 +1430,6 @@ public async Task AppendBlockFromUriAsync_EncryptionScope() await using DisposingContainer test = await GetTestContainerAsync(); // Arrange - await test.Container.SetAccessPolicyAsync(PublicAccessType.BlobContainer); - var data = GetRandomBuffer(Constants.KB); using (var stream = new MemoryStream(data)) @@ -1449,7 +1449,7 @@ public async Task AppendBlockFromUriAsync_EncryptionScope() // Act Response response = await destBlob.AppendBlockFromUriAsync( - sourceBlob.Uri, + sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), options); Assert.AreEqual(TestConfigDefault.EncryptionScope, response.Value.EncryptionScope); @@ -1462,8 +1462,6 @@ public async Task AppendBlockFromUriAsync_Range() await using DisposingContainer test = await GetTestContainerAsync(); // Arrange - await test.Container.SetAccessPolicyAsync(PublicAccessType.BlobContainer); - var data = GetRandomBuffer(4 * Constants.KB); using (var stream = new MemoryStream(data)) @@ -1482,7 +1480,7 @@ public async Task AppendBlockFromUriAsync_Range() // Act await destBlob.AppendBlockFromUriAsync( - sourceUri: sourceBlob.Uri, + sourceUri: sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), options: options); // Assert @@ -1500,8 +1498,6 @@ public async Task AppendBlockFromUriAsync_MD5() await using DisposingContainer test = await GetTestContainerAsync(); // Arrange - await test.Container.SetAccessPolicyAsync(PublicAccessType.BlobContainer); - var data = GetRandomBuffer(Constants.KB); using (var stream = new MemoryStream(data)) @@ -1520,7 +1516,7 @@ public async Task AppendBlockFromUriAsync_MD5() // Act await destBlob.AppendBlockFromUriAsync( - sourceUri: sourceBlob.Uri, + sourceUri: sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), options: options); } } @@ -1531,8 +1527,6 @@ public async Task AppendBlockFromUriAsync_MD5_Fail() await using DisposingContainer test = await GetTestContainerAsync(); // Arrange - await test.Container.SetAccessPolicyAsync(PublicAccessType.BlobContainer); - var data = GetRandomBuffer(Constants.KB); using (var stream = new MemoryStream(data)) @@ -1552,7 +1546,7 @@ public async Task AppendBlockFromUriAsync_MD5_Fail() // Act await TestHelper.AssertExpectedExceptionAsync( destBlob.AppendBlockFromUriAsync( - sourceUri: sourceBlob.Uri, + sourceUri: sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), options: options), actualException => Assert.AreEqual("Md5Mismatch", actualException.ErrorCode) ); @@ -1583,8 +1577,6 @@ public async Task AppendBlockFromUriAsync_AccessConditions() await using DisposingContainer test = await GetTestContainerAsync(); // Arrange - await test.Container.SetAccessPolicyAsync(PublicAccessType.BlobContainer); - var data = GetRandomBuffer(7); using (var stream = new MemoryStream(data)) @@ -1614,7 +1606,7 @@ public async Task AppendBlockFromUriAsync_AccessConditions() // Act await destBlob.AppendBlockFromUriAsync( - sourceUri: sourceBlob.Uri, + sourceUri: sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), options: options); } } @@ -1643,8 +1635,6 @@ public async Task AppendBlockFromUriAsync_AccessConditionsFail() await using DisposingContainer test = await GetTestContainerAsync(); // Arrange - await test.Container.SetAccessPolicyAsync(PublicAccessType.BlobContainer); - var data = GetRandomBuffer(7); using (var stream = new MemoryStream(data)) @@ -1674,7 +1664,7 @@ public async Task AppendBlockFromUriAsync_AccessConditionsFail() // Act await TestHelper.AssertExpectedExceptionAsync( destBlob.AppendBlockFromUriAsync( - sourceUri: sourceBlob.Uri, + sourceUri: sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), options: options), actualException => Assert.IsTrue(true) ); @@ -1689,8 +1679,6 @@ public async Task AppendBlockFromUriAsync_IfTags() await using DisposingContainer test = await GetTestContainerAsync(); // Arrange - await test.Container.SetAccessPolicyAsync(PublicAccessType.BlobContainer); - var data = GetRandomBuffer(Constants.KB); using Stream stream = new MemoryStream(data); @@ -1721,7 +1709,7 @@ public async Task AppendBlockFromUriAsync_IfTags() // Act await destBlob.AppendBlockFromUriAsync( - sourceUri: sourceBlob.Uri, + sourceUri: sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), options: options); } @@ -1732,8 +1720,6 @@ public async Task AppendBlockFromUriAsync_IfTagsFailed() await using DisposingContainer test = await GetTestContainerAsync(); // Arrange - await test.Container.SetAccessPolicyAsync(PublicAccessType.BlobContainer); - var data = GetRandomBuffer(Constants.KB); using Stream stream = new MemoryStream(data); @@ -1759,19 +1745,20 @@ public async Task AppendBlockFromUriAsync_IfTagsFailed() // Act await TestHelper.AssertExpectedExceptionAsync( destBlob.AppendBlockFromUriAsync( - sourceUri: sourceBlob.Uri, + sourceUri: sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), options: options), e => Assert.AreEqual("ConditionNotMet", e.ErrorCode)); } [RecordedTest] + // Net462 is sending the source SAS expiry unencoded to the service, while net6 and net7 sending it encoded. + // Both are valid, but make this test non-recordable. + [LiveOnly] public async Task AppendBlockFromUriAsync_NonAsciiSourceUri() { await using DisposingContainer test = await GetTestContainerAsync(); // Arrange - await test.Container.SetAccessPolicyAsync(PublicAccessType.BlobContainer); - var data = GetRandomBuffer(Constants.KB); using (var stream = new MemoryStream(data)) @@ -1790,7 +1777,7 @@ public async Task AppendBlockFromUriAsync_NonAsciiSourceUri() // Act await destBlob.AppendBlockFromUriAsync( - sourceUri: sourceBlob.Uri, + sourceUri: sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), options: options); } } @@ -1801,7 +1788,7 @@ await destBlob.AppendBlockFromUriAsync( public async Task AppendBlockFromUriAsync_SourceBearerToken() { // Arrange - BlobServiceClient serviceClient = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient serviceClient = GetServiceClient_OAuth(); await using DisposingContainer test = await GetTestContainerAsync( service: serviceClient, publicAccessType: PublicAccessType.None); @@ -1836,7 +1823,7 @@ public async Task AppendBlockFromUriAsync_SourceBearerToken() public async Task AppendBlockFromUriAsync_SourceBearerTokenFail() { // Arrange - BlobServiceClient serviceClient = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient serviceClient = GetServiceClient_OAuth(); await using DisposingContainer test = await GetTestContainerAsync( service: serviceClient, publicAccessType: PublicAccessType.None); @@ -1874,8 +1861,6 @@ public async Task AppendBlockFromUriAsync_NullOptions() await using DisposingContainer test = await GetTestContainerAsync(); // Arrange - await test.Container.SetAccessPolicyAsync(PublicAccessType.BlobContainer); - var data = GetRandomBuffer(Constants.KB); using (var stream = new MemoryStream(data)) @@ -1888,7 +1873,8 @@ public async Task AppendBlockFromUriAsync_NullOptions() await destBlob.CreateIfNotExistsAsync(); // Act - Response response = await destBlob.AppendBlockFromUriAsync(sourceBlob.Uri); + Response response = await destBlob.AppendBlockFromUriAsync( + sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1))); // Ensure that we grab the whole ETag value from the service without removing the quotes Assert.AreEqual(response.Value.ETag.ToString(), $"\"{response.GetRawResponse().Headers.ETag}\""); @@ -2146,7 +2132,7 @@ public void CanMockClientConstructors() mock = new Mock(new Uri("https://test/test"), new BlobClientOptions()).Object; mock = new Mock(new Uri("https://test/test"), Tenants.GetNewSharedKeyCredentials(), new BlobClientOptions()).Object; mock = new Mock(new Uri("https://test/test"), new AzureSasCredential("foo"), new BlobClientOptions()).Object; - mock = new Mock(new Uri("https://test/test"), Tenants.GetOAuthCredential(Tenants.TestConfigHierarchicalNamespace), new BlobClientOptions()).Object; + mock = new Mock(new Uri("https://test/test"), TestEnvironment.Credential, new BlobClientOptions()).Object; } private AppendBlobRequestConditions BuildDestinationAccessConditions( diff --git a/sdk/storage/Azure.Storage.Blobs/tests/Azure.Storage.Blobs.Tests.csproj b/sdk/storage/Azure.Storage.Blobs/tests/Azure.Storage.Blobs.Tests.csproj index f595e82c15fff..e2384ae78c802 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/Azure.Storage.Blobs.Tests.csproj +++ b/sdk/storage/Azure.Storage.Blobs/tests/Azure.Storage.Blobs.Tests.csproj @@ -16,7 +16,7 @@ - + diff --git a/sdk/storage/Azure.Storage.Blobs/tests/BlobBaseClientTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/BlobBaseClientTests.cs index 31ad90420436e..8363d568f7db7 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/BlobBaseClientTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/BlobBaseClientTests.cs @@ -144,7 +144,7 @@ public void Ctor_TokenAuth_Http() // Act TestHelper.AssertExpectedException( - () => new BlobBaseClient(httpUri, Tenants.GetOAuthCredential()), + () => new BlobBaseClient(httpUri, TestEnvironment.Credential), new ArgumentException("Cannot use TokenCredential without HTTPS.")); } @@ -204,7 +204,7 @@ public async Task Ctor_AzureSasCredential() public async Task Ctor_AzureSasCredential_UserDelegationSAS() { // Arrange - BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient oauthService = GetServiceClient_OAuth(); await using DisposingContainer test = await GetTestContainerAsync(oauthService); var client = test.Container.GetBlobClient(GetNewBlobName()); await client.UploadAsync(new MemoryStream()); @@ -266,7 +266,7 @@ public async Task Ctor_DefaultAudience() BlobBaseClient aadBlob = InstrumentClient(new BlobBaseClient( uriBuilder.ToUri(), - Tenants.GetOAuthCredential(), + TestEnvironment.Credential, options)); // Assert @@ -275,6 +275,7 @@ public async Task Ctor_DefaultAudience() } [RecordedTest] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_CustomAudience() { // Arrange @@ -298,7 +299,7 @@ public async Task Ctor_CustomAudience() BlobBaseClient aadBlob = InstrumentClient(new BlobBaseClient( uriBuilder.ToUri(), - Tenants.GetOAuthCredential(), + TestEnvironment.Credential, options)); // Assert @@ -307,6 +308,7 @@ public async Task Ctor_CustomAudience() } [RecordedTest] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_StorageAccountAudience() { // Arrange @@ -330,7 +332,7 @@ public async Task Ctor_StorageAccountAudience() BlobBaseClient aadBlob = InstrumentClient(new BlobBaseClient( uriBuilder.ToUri(), - Tenants.GetOAuthCredential(), + TestEnvironment.Credential, options)); // Assert @@ -2563,7 +2565,6 @@ public async Task StartCopyFromUriAsync_OperationAbort() await using DisposingContainer test = await GetTestContainerAsync(); // Arrange - await test.Container.SetAccessPolicyAsync(PublicAccessType.Blob); var data = GetRandomBuffer(8 * Constants.MB); BlockBlobClient srcBlob = InstrumentClient(test.Container.GetBlockBlobClient(GetNewBlobName())); @@ -2577,7 +2578,8 @@ public async Task StartCopyFromUriAsync_OperationAbort() { BlockBlobClient destBlob = InstrumentClient(destTest.Container.GetBlockBlobClient(GetNewBlobName())); - CopyFromUriOperation operation = await destBlob.StartCopyFromUriAsync(srcBlob.Uri); + CopyFromUriOperation operation = await destBlob.StartCopyFromUriAsync( + srcBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1))); // Act try @@ -2605,7 +2607,6 @@ public async Task AbortCopyFromUriAsync() await using DisposingContainer test = await GetTestContainerAsync(); // Arrange - await test.Container.SetAccessPolicyAsync(PublicAccessType.Blob); var data = GetRandomBuffer(8 * Constants.MB); BlockBlobClient srcBlob = InstrumentClient(test.Container.GetBlockBlobClient(GetNewBlobName())); @@ -2619,7 +2620,8 @@ public async Task AbortCopyFromUriAsync() { BlockBlobClient destBlob = InstrumentClient(destTest.Container.GetBlockBlobClient(GetNewBlobName())); - Operation operation = await destBlob.StartCopyFromUriAsync(srcBlob.Uri); + Operation operation = await destBlob.StartCopyFromUriAsync( + srcBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1))); // Act try @@ -2687,7 +2689,6 @@ public async Task AbortCopyFromUriAsync_Lease() await using DisposingContainer test = await GetTestContainerAsync(); // Arrange - await test.Container.SetAccessPolicyAsync(PublicAccessType.Blob); var data = GetRandomBuffer(8 * Constants.MB); BlockBlobClient srcBlob = InstrumentClient(test.Container.GetBlockBlobClient(GetNewBlobName())); @@ -2709,7 +2710,7 @@ public async Task AbortCopyFromUriAsync_Lease() Response leaseResponse = await lease.AcquireAsync(duration); Operation operation = await destBlob.StartCopyFromUriAsync( - source: srcBlob.Uri, + source: srcBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), destinationConditions: new BlobRequestConditions { LeaseId = leaseResponse.Value.LeaseId }); // Act @@ -2737,7 +2738,6 @@ public async Task AbortCopyFromUriAsync_LeaseFail() await using DisposingContainer test = await GetTestContainerAsync(); // Arrange - await test.Container.SetAccessPolicyAsync(PublicAccessType.Blob); var data = GetRandomBuffer(8 * Constants.MB); BlockBlobClient srcBlob = InstrumentClient(test.Container.GetBlockBlobClient(GetNewBlobName())); @@ -2754,7 +2754,8 @@ public async Task AbortCopyFromUriAsync_LeaseFail() await destBlob.UploadAsync(stream); } - Operation operation = await destBlob.StartCopyFromUriAsync(source: srcBlob.Uri); + Operation operation = await destBlob.StartCopyFromUriAsync( + source: srcBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1))); var leaseId = Recording.Random.NewGuid().ToString(); @@ -2810,6 +2811,8 @@ public async Task SyncCopyFromUriAsync() // Arrange BlobBaseClient srcBlob = await GetNewBlobClient(test.Container); + Uri srcBlobSasUri = srcBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)); + srcBlob = InstrumentClient(new BlobBaseClient(srcBlobSasUri, GetOptions())); BlockBlobClient destBlob = InstrumentClient(test.Container.GetBlockBlobClient(GetNewBlobName())); // Act @@ -2843,7 +2846,8 @@ public async Task SyncCopyFromUriAsync_EncryptionScope() await sourceBlob.UploadAsync(stream); // Act - Response response = await destBlob.SyncCopyFromUriAsync(sourceBlob.Uri); + Response response = await destBlob.SyncCopyFromUriAsync( + sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1))); // Assert Assert.AreEqual(TestConfigDefault.EncryptionScope, response.Value.EncryptionScope); @@ -2899,7 +2903,8 @@ public async Task SyncCopyFromUriAsync_Tags() }; // Act - Response copyResponse = await destBlob.SyncCopyFromUriAsync(srcBlob.Uri, options); + Response copyResponse = await destBlob.SyncCopyFromUriAsync( + srcBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), options); // Assert Response response = await destBlob.GetTagsAsync(); @@ -2923,7 +2928,7 @@ public async Task SyncCopyFromUriAsync_Metadata() // Act await destBlob.SyncCopyFromUriAsync( - source: srcBlob.Uri, + source: srcBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), options); // Assert @@ -2955,7 +2960,7 @@ public async Task SyncCopyFromUriAsync_Source_AccessConditions() // Act Response response = await destBlob.SyncCopyFromUriAsync( - source: srcBlob.Uri, + source: srcBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), options); // Assert @@ -3028,7 +3033,7 @@ public async Task SyncCopyFromUriAsync_Destination_AccessConditions() // Act Response response = await destBlob.SyncCopyFromUriAsync( - source: srcBlob.Uri, + source: srcBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), options); // Assert @@ -3100,7 +3105,7 @@ public async Task SyncCopyFromUriAsync_IfTags() // Act Response copyResponse = await destBlob.SyncCopyFromUriAsync( - srcBlob.Uri, + srcBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), options: options); } @@ -3124,7 +3129,7 @@ public async Task SyncCopyFromUriAsync_IfTagsFailed() // Act await TestHelper.AssertExpectedExceptionAsync( destBlob.SyncCopyFromUriAsync( - srcBlob.Uri, + srcBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), options: options), e => Assert.AreEqual("ConditionNotMet", e.ErrorCode)); } @@ -3170,7 +3175,7 @@ public async Task SyncCopyFromUriAsync_AccessTier_Cold() // Act await destBlob.SyncCopyFromUriAsync( - srcBlob.Uri, + srcBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), options); Response response = await destBlob.GetPropertiesAsync(); @@ -3226,7 +3231,8 @@ public async Task SyncCopyFromUriAsync_VersionId() BlockBlobClient destBlob = InstrumentClient(test.Container.GetBlockBlobClient(GetNewBlobName())); // Act - Response response = await destBlob.SyncCopyFromUriAsync(srcBlob.Uri); + Response response = await destBlob.SyncCopyFromUriAsync( + srcBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1))); // Assert Assert.IsNotNull(response.Value.VersionId); @@ -3237,7 +3243,7 @@ public async Task SyncCopyFromUriAsync_VersionId() public async Task SyncCopyFromUri_SourceBearerToken() { // Arrange - BlobServiceClient serviceClient = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient serviceClient = GetServiceClient_OAuth(); await using DisposingContainer test = await GetTestContainerAsync( service: serviceClient, publicAccessType: PublicAccessType.None); @@ -3275,7 +3281,7 @@ public async Task SyncCopyFromUri_SourceBearerToken() public async Task SyncCopyFromUri_SourceBearerTokenFail() { // Arrange - BlobServiceClient serviceClient = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient serviceClient = GetServiceClient_OAuth(); await using DisposingContainer test = await GetTestContainerAsync( service: serviceClient, publicAccessType: PublicAccessType.None); @@ -3587,7 +3593,7 @@ await TestHelper.AssertExpectedExceptionAsync( public async Task DeleteAsync_VersionIdentitySAS() { // Arrange - BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient oauthService = GetServiceClient_OAuth(); await using DisposingContainer test = await GetTestContainerAsync(oauthService); AppendBlobClient blob = InstrumentClient(test.Container.GetAppendBlobClient(GetNewBlobName())); Response createResponse = await blob.CreateAsync(); @@ -3618,7 +3624,7 @@ public async Task DeleteAsync_VersionIdentitySAS() public async Task DeleteAsync_VersionInvalidSAS() { // Arrange - BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient oauthService = GetServiceClient_OAuth(); await using DisposingContainer test = await GetTestContainerAsync(oauthService); AppendBlobClient blob = InstrumentClient(test.Container.GetAppendBlobClient(GetNewBlobName())); Response createResponse = await blob.CreateAsync(); @@ -3676,7 +3682,7 @@ public async Task DeleteAsync_VersionBlobSAS(BlobSasPermissions blobSasPermissio public async Task DeleteAsync_VersionBlobIdentitySAS(BlobSasPermissions blobSasPermissions) { // Arrange - BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient oauthService = GetServiceClient_OAuth(); await using DisposingContainer test = await GetTestContainerAsync(oauthService); AppendBlobClient blob = InstrumentClient(test.Container.GetAppendBlobClient(GetNewBlobName())); Response createResponse = await blob.CreateAsync(); @@ -3733,7 +3739,7 @@ public async Task DeleteAsync_VersionContainerSAS(BlobContainerSasPermissions bl public async Task DeleteAsync_VersionContainerIdentitySAS(BlobContainerSasPermissions blobContainerSasPermissions) { // Arrange - BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient oauthService = GetServiceClient_OAuth(); await using DisposingContainer test = await GetTestContainerAsync(oauthService); AppendBlobClient blob = InstrumentClient(test.Container.GetAppendBlobClient(GetNewBlobName())); Response createResponse = await blob.CreateAsync(); @@ -4254,7 +4260,7 @@ public async Task GetPropertiesAsync_ContainerSAS() [RecordedTest] public async Task GetPropertiesAsync_ContainerIdentitySAS() { - BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient oauthService = GetServiceClient_OAuth(); var containerName = GetNewContainerName(); var blobName = GetNewBlobName(); await using DisposingContainer test = await GetTestContainerAsync(containerName: containerName, service: oauthService); @@ -4417,7 +4423,7 @@ public async Task GetPropertiesAsync_BlobSasWithContentHeaders() [RecordedTest] public async Task GetPropertiesAsync_BlobIdentitySAS() { - BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient oauthService = GetServiceClient_OAuth(); var containerName = GetNewContainerName(); var blobName = GetNewBlobName(); @@ -4538,7 +4544,7 @@ public async Task GetPropertiesAsync_SnapshotSAS_Using_BlobClient() [RecordedTest] public async Task GetPropertiesAsync_SnapshotIdentitySAS() { - BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient oauthService = GetServiceClient_OAuth(); var containerName = GetNewContainerName(); var blobName = GetNewBlobName(); await using DisposingContainer test = await GetTestContainerAsync(containerName: containerName, service: oauthService); @@ -6417,7 +6423,7 @@ await TestHelper.AssertExpectedExceptionAsync( [ServiceVersion(Min = BlobClientOptions.ServiceVersion.V2019_12_12)] public async Task GetSetTagsAsync_BlobIdentityTagSas() { - BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient oauthService = GetServiceClient_OAuth(); string containerName = GetNewContainerName(); string blobName = GetNewBlobName(); await using DisposingContainer test = await GetTestContainerAsync(containerName: containerName, service: oauthService); @@ -6452,7 +6458,7 @@ public async Task GetSetTagsAsync_BlobIdentityTagSas() [ServiceVersion(Min = BlobClientOptions.ServiceVersion.V2019_12_12)] public async Task GetSetTagsAsync_InvalidBlobIdentitySas() { - BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient oauthService = GetServiceClient_OAuth(); string containerName = GetNewContainerName(); string blobName = GetNewBlobName(); await using DisposingContainer test = await GetTestContainerAsync(containerName: containerName, service: oauthService); @@ -6527,7 +6533,7 @@ await TestHelper.AssertExpectedExceptionAsync( [ServiceVersion(Min = BlobClientOptions.ServiceVersion.V2019_12_12)] public async Task GetSetTagsAsync_ContainerIdentityTagSas() { - BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient oauthService = GetServiceClient_OAuth(); string containerName = GetNewContainerName(); string blobName = GetNewBlobName(); await using DisposingContainer test = await GetTestContainerAsync(containerName: containerName, service: oauthService); @@ -6561,7 +6567,7 @@ public async Task GetSetTagsAsync_ContainerIdentityTagSas() [ServiceVersion(Min = BlobClientOptions.ServiceVersion.V2019_12_12)] public async Task GetSetTagsAsync_InvalidContainerIdentitySas() { - BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient oauthService = GetServiceClient_OAuth(); string containerName = GetNewContainerName(); string blobName = GetNewBlobName(); await using DisposingContainer test = await GetTestContainerAsync(containerName: containerName, service: oauthService); @@ -7822,7 +7828,7 @@ public void CanMockClientConstructors() mock = new Mock(new Uri("https://test/test"), new BlobClientOptions()).Object; mock = new Mock(new Uri("https://test/test"), Tenants.GetNewSharedKeyCredentials(), new BlobClientOptions()).Object; mock = new Mock(new Uri("https://test/test"), new AzureSasCredential("foo"), new BlobClientOptions()).Object; - mock = new Mock(new Uri("https://test/test"), Tenants.GetOAuthCredential(Tenants.TestConfigHierarchicalNamespace), new BlobClientOptions()).Object; + mock = new Mock(new Uri("https://test/test"), TestEnvironment.Credential, new BlobClientOptions()).Object; } [RecordedTest] diff --git a/sdk/storage/Azure.Storage.Blobs/tests/BlobClientTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/BlobClientTests.cs index 2d9d9478d2eff..4511dfd4920ef 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/BlobClientTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/BlobClientTests.cs @@ -104,7 +104,7 @@ public void Ctor_TokenAuth_Http() // Act TestHelper.AssertExpectedException( - () => new BlobClient(httpUri, Tenants.GetOAuthCredential()), + () => new BlobClient(httpUri, TestEnvironment.Credential), new ArgumentException("Cannot use TokenCredential without HTTPS.")); } @@ -218,7 +218,7 @@ public async Task Ctor_DefaultAudience() BlobClient aadBlob = InstrumentClient(new BlobClient( uriBuilder.ToUri(), - Tenants.GetOAuthCredential(), + TestEnvironment.Credential, options)); // Assert @@ -227,6 +227,7 @@ public async Task Ctor_DefaultAudience() } [RecordedTest] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_CustomAudience() { // Arrange @@ -250,7 +251,7 @@ public async Task Ctor_CustomAudience() BlobClient aadBlob = InstrumentClient(new BlobClient( uriBuilder.ToUri(), - Tenants.GetOAuthCredential(), + TestEnvironment.Credential, options)); // Assert @@ -259,6 +260,7 @@ public async Task Ctor_CustomAudience() } [RecordedTest] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_StorageAccountAudience() { // Arrange @@ -282,7 +284,7 @@ public async Task Ctor_StorageAccountAudience() BlobClient aadBlob = InstrumentClient(new BlobClient( uriBuilder.ToUri(), - Tenants.GetOAuthCredential(), + TestEnvironment.Credential, options)); // Assert @@ -1522,7 +1524,7 @@ public void CanMockClientConstructors() mock = new Mock(new Uri("https://test/test"), new BlobClientOptions()).Object; mock = new Mock(new Uri("https://test/test"), Tenants.GetNewSharedKeyCredentials(), new BlobClientOptions()).Object; mock = new Mock(new Uri("https://test/test"), new AzureSasCredential("foo"), new BlobClientOptions()).Object; - mock = new Mock(new Uri("https://test/test"), Tenants.GetOAuthCredential(Tenants.TestConfigHierarchicalNamespace), new BlobClientOptions()).Object; + mock = new Mock(new Uri("https://test/test"), TestEnvironment.Credential, new BlobClientOptions()).Object; } } } diff --git a/sdk/storage/Azure.Storage.Blobs/tests/BlobSasBuilderTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/BlobSasBuilderTests.cs index 2a81a2561d259..19696136cbccd 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/BlobSasBuilderTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/BlobSasBuilderTests.cs @@ -478,7 +478,7 @@ private BlobSasBuilder BuildBlobSasBuilder(bool includeBlob, bool includeSnapsho public async Task BlobSasBuilder_PreauthorizedAgentObjectId() { // Arrange - BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient oauthService = GetServiceClient_OAuth(); string containerName = GetNewContainerName(); string preauthorizedAgentGuid = Recording.Random.NewGuid().ToString(); @@ -516,7 +516,7 @@ public async Task BlobSasBuilder_PreauthorizedAgentObjectId() public async Task BlobSasBuilder_CorrelationId() { // Arrange - BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient oauthService = GetServiceClient_OAuth(); string containerName = GetNewContainerName(); await using DisposingContainer test = await GetTestContainerAsync(service: oauthService, containerName: containerName); diff --git a/sdk/storage/Azure.Storage.Blobs/tests/BlobSasTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/BlobSasTests.cs index caa43a5fa0c62..aa9dc7241b3eb 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/BlobSasTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/BlobSasTests.cs @@ -54,7 +54,7 @@ public async Task BlobSas_AllPermissions() public async Task BlobIdentitySas_AllPermissions() { // Arrange - BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient oauthService = GetServiceClient_OAuth(); string containerName = GetNewContainerName(); string blobName = GetNewBlobName(); await using DisposingContainer test = await GetTestContainerAsync(containerName: containerName, service: oauthService); @@ -119,7 +119,7 @@ public async Task BlobVersionSas_AllPermissions() public async Task BlobVersionIdentitySas_AllPermissions() { // Arrange - BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient oauthService = GetServiceClient_OAuth(); string containerName = GetNewContainerName(); string blobName = GetNewBlobName(); await using DisposingContainer test = await GetTestContainerAsync(containerName: containerName, service: oauthService); @@ -189,7 +189,7 @@ public async Task BlobSnapshotSas_AllPermissions() public async Task BlobSnapshotIdentitySas_AllPermissions() { // Arrange - BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient oauthService = GetServiceClient_OAuth(); string containerName = GetNewContainerName(); string blobName = GetNewBlobName(); await using DisposingContainer test = await GetTestContainerAsync(containerName: containerName, service: oauthService); @@ -253,7 +253,7 @@ public async Task ContainerSas_AllPermissions() public async Task ContainerIdentitySas_AllPermissions() { // Arrange - BlobServiceClient oauthService = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient oauthService = GetServiceClient_OAuth(); string containerName = GetNewContainerName(); string blobName = GetNewBlobName(); await using DisposingContainer test = await GetTestContainerAsync(containerName: containerName, service: oauthService); diff --git a/sdk/storage/Azure.Storage.Blobs/tests/BlobTestBase.cs b/sdk/storage/Azure.Storage.Blobs/tests/BlobTestBase.cs index 52c994a5b9a13..1a6a1aefcb6e5 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/BlobTestBase.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/BlobTestBase.cs @@ -93,13 +93,16 @@ private BlobServiceClient GetServiceClientFromOauthConfig(TenantConfiguration co return InstrumentClient( new BlobServiceClient( new Uri(config.BlobServiceEndpoint), - Tenants.GetOAuthCredential(config), + TestEnvironment.Credential, options)); } public BlobServiceClient GetServiceClient_OauthAccount_TenantDiscovery() => GetServiceClientFromOauthConfig(Tenants.TestConfigOAuth, true); + public BlobServiceClient GetServiceClient_OAuth() + => BlobsClientBuilder.GetServiceClient_OAuth(TestEnvironment.Credential); + public BlobClientOptions GetFaultyBlobConnectionOptions( int raiseAt = default, Exception raise = default, @@ -173,16 +176,13 @@ public Security.KeyVault.Keys.KeyClient GetKeyClient_TargetKeyClient() public TokenCredential GetTokenCredential_TargetKeyClient() => GetKeyClientTokenCredential(TestConfigurations.DefaultTargetKeyVault); - private static Security.KeyVault.Keys.KeyClient GetKeyClient(KeyVaultConfiguration config) + private Security.KeyVault.Keys.KeyClient GetKeyClient(KeyVaultConfiguration config) => new Security.KeyVault.Keys.KeyClient( new Uri(config.VaultEndpoint), GetKeyClientTokenCredential(config)); - private static TokenCredential GetKeyClientTokenCredential(KeyVaultConfiguration config) - => new Identity.ClientSecretCredential( - config.ActiveDirectoryTenantId, - config.ActiveDirectoryApplicationId, - config.ActiveDirectoryApplicationSecret); + private TokenCredential GetKeyClientTokenCredential(KeyVaultConfiguration config) + => TestEnvironment.Credential; public BlobServiceClient GetServiceClient_BlobServiceSas_Container( string containerName, diff --git a/sdk/storage/Azure.Storage.Blobs/tests/BlobTestEnvironment.cs b/sdk/storage/Azure.Storage.Blobs/tests/BlobTestEnvironment.cs index 69bc1fff7dbe0..55e207ee978b9 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/BlobTestEnvironment.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/BlobTestEnvironment.cs @@ -28,8 +28,7 @@ private async Task DoesOAuthWorkAsync() for (int i = 0; i < 10; i++) { BlobServiceClient serviceClient = new BlobServiceClient( - new Uri(TestConfigurations.DefaultTargetOAuthTenant.BlobServiceEndpoint), - GetOAuthCredential(TestConfigurations.DefaultTargetOAuthTenant)); + new Uri(TestConfigurations.DefaultTargetOAuthTenant.BlobServiceEndpoint), Credential); await serviceClient.GetPropertiesAsync(); var containerName = Guid.NewGuid().ToString(); var containerClient = serviceClient.GetBlobContainerClient(containerName); diff --git a/sdk/storage/Azure.Storage.Blobs/tests/BlockBlobClientTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/BlockBlobClientTests.cs index c81ebac7c123c..65b2103005cc1 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/BlockBlobClientTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/BlockBlobClientTests.cs @@ -89,7 +89,7 @@ public void Ctor_TokenAuth_Http() // Act TestHelper.AssertExpectedException( - () => new BlockBlobClient(httpUri, Tenants.GetOAuthCredential()), + () => new BlockBlobClient(httpUri, TestEnvironment.Credential), new ArgumentException("Cannot use TokenCredential without HTTPS.")); } @@ -610,7 +610,9 @@ public async Task StageBlockFromUriAsync_Min() // Act await RetryAsync( - async () => await destBlob.StageBlockFromUriAsync(sourceBlob.Uri, ToBase64(GetNewBlockName())), + async () => await destBlob.StageBlockFromUriAsync( + sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), + ToBase64(GetNewBlockName())), _retryStageBlockFromUri); } @@ -708,7 +710,9 @@ public async Task StageBlockFromUriAsync_CPK() // Act await RetryAsync( - async () => await destBlob.StageBlockFromUriAsync(sourceBlob.Uri, ToBase64(GetNewBlockName())), + async () => await destBlob.StageBlockFromUriAsync( + sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), + ToBase64(GetNewBlockName())), _retryStageBlockFromUri); } @@ -733,7 +737,7 @@ public async Task StageBlockFromUriAsync_EncryptionScope() // Act Response response = await destBlob.StageBlockFromUriAsync( - sourceBlob.Uri, + sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), ToBase64(GetNewBlockName())); // Assert @@ -765,7 +769,7 @@ public async Task StageBlockFromUriAsync_Range() // Act await RetryAsync( async () => await destBlob.StageBlockFromUriAsync( - sourceUri: sourceBlob.Uri, + sourceUri: sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), base64BlockId: ToBase64(GetNewBlockName()), options: options), _retryStageBlockFromUri); @@ -800,7 +804,7 @@ public async Task StageBlockFromUriAsync_MD5() // Act await RetryAsync( async () => await destBlob.StageBlockFromUriAsync( - sourceUri: sourceBlob.Uri, + sourceUri: sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), base64BlockId: ToBase64(GetNewBlockName()), options: options), _retryStageBlockFromUri); @@ -832,7 +836,7 @@ public async Task StageBlockFromUriAsync_MD5_Fail() await TestHelper.AssertExpectedExceptionAsync( RetryAsync( async () => await destBlob.StageBlockFromUriAsync( - sourceUri: sourceBlob.Uri, + sourceUri: sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), base64BlockId: ToBase64(GetNewBlockName()), options: options), _retryStageBlockFromUri), @@ -873,7 +877,7 @@ public async Task StageBlockFromUriAsync_Lease() // Act await RetryAsync( async () => await destBlob.StageBlockFromUriAsync( - sourceUri: sourceBlob.Uri, + sourceUri: sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), base64BlockId: ToBase64(GetNewBlockName()), options: options), _retryStageBlockFromUri); @@ -913,7 +917,7 @@ public async Task StageBlockFromUriAsync_Lease_Fail() await TestHelper.AssertExpectedExceptionAsync( RetryAsync( async () => await destBlob.StageBlockFromUriAsync( - sourceUri: sourceBlob.Uri, + sourceUri: sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), base64BlockId: ToBase64(GetNewBlockName()), options: options), _retryStageBlockFromUri), @@ -951,7 +955,7 @@ public async Task StageBlockFromUriAsync_SourceAccessConditions() // Act await RetryAsync( async () => await destBlob.StageBlockFromUriAsync( - sourceUri: sourceBlob.Uri, + sourceUri: sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), base64BlockId: ToBase64(GetNewBlockName()), options: options), _retryStageBlockFromUri); @@ -998,6 +1002,9 @@ await TestHelper.AssertExpectedExceptionAsync( } [RecordedTest] + // Net462 is sending the source SAS expiry unencoded to the service, while net6 and net7 sending it encoded. + // Both are valid, but make this test non-recordable. + [LiveOnly] public async Task StageBlockFromUriAsync_NonAsciiSourceUri() { await using DisposingContainer test = await GetTestContainerAsync(); @@ -1016,7 +1023,9 @@ public async Task StageBlockFromUriAsync_NonAsciiSourceUri() // Act await RetryAsync( - async () => await destBlob.StageBlockFromUriAsync(sourceBlob.Uri, ToBase64(GetNewBlockName())), + async () => await destBlob.StageBlockFromUriAsync( + sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), + ToBase64(GetNewBlockName())), _retryStageBlockFromUri); } @@ -1025,7 +1034,7 @@ await RetryAsync( public async Task StageBlockFromUriAsync_SourceBearerToken() { // Arrange - BlobServiceClient serviceClient = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient serviceClient = GetServiceClient_OAuth(); await using DisposingContainer test = await GetTestContainerAsync( service: serviceClient, publicAccessType: PublicAccessType.None); @@ -1064,7 +1073,7 @@ await RetryAsync( public async Task StageBlockFromUriAsync_SourceBearerTokenFail() { // Arrange - BlobServiceClient serviceClient = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient serviceClient = BlobsClientBuilder.GetServiceClient_OAuth(TestEnvironment.Credential); await using DisposingContainer test = await GetTestContainerAsync( service: serviceClient, publicAccessType: PublicAccessType.None); @@ -2767,7 +2776,8 @@ public async Task SyncUploadFromUriAsync() await sourceBlob.UploadAsync(stream, uploadOptions); // Act - Response uploadResponse = await destBlob.SyncUploadFromUriAsync(sourceBlob.Uri); + Response uploadResponse = await destBlob.SyncUploadFromUriAsync( + sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1))); // Assert Assert.AreNotEqual(default(ETag), uploadResponse.Value.ETag); @@ -2856,7 +2866,7 @@ public async Task SyncUploadFromUriAsync_SourceErrorAndStatusCode() // Act await TestHelper.AssertExpectedExceptionAsync( - destBlob.SyncUploadFromUriAsync(sourceBlob.Uri), + destBlob.SyncUploadFromUriAsync(sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1))), e => { Assert.IsTrue(e.Message.Contains("CopySourceStatusCode: 409")); @@ -2899,7 +2909,9 @@ public async Task SyncUploadFromUriAsync_OverwriteSourceBlobProperties() }; // Act - await destBlob.SyncUploadFromUriAsync(sourceBlob.Uri, options: options); + await destBlob.SyncUploadFromUriAsync( + sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), + options: options); // Assert @@ -2948,7 +2960,9 @@ public async Task SyncUploadFromUriAsync_DestinationAccessConditions() }; // Act - await destBlob.SyncUploadFromUriAsync(sourceBlob.Uri, options: options); + await destBlob.SyncUploadFromUriAsync( + sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), + options: options); // Assert @@ -2988,7 +3002,9 @@ public async Task SyncUploadFromUriAsync_DestinationAccessConditionsFailed() // Act await TestHelper.AssertExpectedExceptionAsync( - destBlob.SyncUploadFromUriAsync(sourceBlob.Uri, options: options), + destBlob.SyncUploadFromUriAsync( + sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), + options: options), e => Assert.IsTrue(BlobErrorCode.TargetConditionNotMet.ToString() == e.ErrorCode || BlobErrorCode.ConditionNotMet.ToString() == e.ErrorCode)); } @@ -3019,7 +3035,9 @@ public async Task SyncUploadFromUriAsync_SourceAccessConditions() }; // Act - await destBlob.SyncUploadFromUriAsync(sourceBlob.Uri, options: options); + await destBlob.SyncUploadFromUriAsync( + sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), + options: options); // Assert @@ -3098,7 +3116,9 @@ public async Task SyncUploadFromUriAsync_IfTags() }; // Act - await destBlob.SyncUploadFromUriAsync(sourceBlob.Uri, options: options); + await destBlob.SyncUploadFromUriAsync( + sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), + options: options); // Assert @@ -3137,7 +3157,9 @@ public async Task SyncUploadFromUriAsync_IfTagsFailed() // Act await TestHelper.AssertExpectedExceptionAsync( - destBlob.SyncUploadFromUriAsync(sourceBlob.Uri, options: options), + destBlob.SyncUploadFromUriAsync( + sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), + options: options), e => Assert.AreEqual(BlobErrorCode.ConditionNotMet.ToString(), e.ErrorCode)); } @@ -3170,7 +3192,9 @@ public async Task SyncUploadFromUriAsync_Lease() }; // Act - await destBlob.SyncUploadFromUriAsync(sourceBlob.Uri, options: options); + await destBlob.SyncUploadFromUriAsync( + sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), + options: options); // Assert @@ -3208,7 +3232,9 @@ public async Task SyncUploadFromUriAsync_LeaseFailed() // Act await TestHelper.AssertExpectedExceptionAsync( - destBlob.SyncUploadFromUriAsync(sourceBlob.Uri, options: options), + destBlob.SyncUploadFromUriAsync( + sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), + options: options), e => Assert.AreEqual(BlobErrorCode.LeaseNotPresentWithBlobOperation.ToString(), e.ErrorCode)); } @@ -3231,7 +3257,8 @@ public async Task SyncUploadFromUriAsync_CPK() await sourceBlob.UploadAsync(stream); // Act - Response response = await destBlob.SyncUploadFromUriAsync(sourceBlob.Uri); + Response response = await destBlob.SyncUploadFromUriAsync( + sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1))); // Assert Assert.AreEqual(customerProvidedKey.EncryptionKeyHash, response.Value.EncryptionKeySha256); @@ -3254,7 +3281,8 @@ public async Task SyncUploadFromUriAsync_EncryptionScope() await sourceBlob.UploadAsync(stream); // Act - Response response = await destBlob.SyncUploadFromUriAsync(sourceBlob.Uri); + Response response = await destBlob.SyncUploadFromUriAsync( + sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1))); // Assert Assert.AreEqual(TestConfigDefault.EncryptionScope, response.Value.EncryptionScope); @@ -3282,7 +3310,8 @@ public async Task SyncUploadFromUriAsync_ContentMd5() }; // Act - Response response = await destBlob.SyncUploadFromUriAsync(sourceBlob.Uri, options: options); + Response response = await destBlob.SyncUploadFromUriAsync( + sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), options: options); // Assert Assert.AreEqual(sourceContentMd5, response.Value.ContentHash); @@ -3312,7 +3341,9 @@ public async Task SyncUploadFromUriAsync_ContentMd5Failed() // Act await TestHelper.AssertExpectedExceptionAsync( - destBlob.SyncUploadFromUriAsync(sourceBlob.Uri, options: options), + destBlob.SyncUploadFromUriAsync( + sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), + options: options), e => Assert.AreEqual(BlobErrorCode.Md5Mismatch.ToString(), e.ErrorCode)); } @@ -3332,7 +3363,9 @@ public async Task SyncUploadFromUriAsync_Overwrite() await sourceBlob.UploadAsync(stream); // Act - await destBlob.SyncUploadFromUriAsync(sourceBlob.Uri, overwrite: true); + await destBlob.SyncUploadFromUriAsync( + sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), + overwrite: true); // Assert @@ -3361,7 +3394,9 @@ public async Task SyncUploadFromUriAsync_OverwriteFailed() // Act await TestHelper.AssertExpectedExceptionAsync( - destBlob.SyncUploadFromUriAsync(sourceBlob.Uri, overwrite: false), + destBlob.SyncUploadFromUriAsync( + sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), + overwrite: false), e => Assert.AreEqual(BlobErrorCode.BlobAlreadyExists.ToString(), e.ErrorCode)); } @@ -3370,7 +3405,7 @@ await TestHelper.AssertExpectedExceptionAsync( public async Task SyncUploadFromUriAsync_SourceBearerToken() { // Arrange - BlobServiceClient serviceClient = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient serviceClient = BlobsClientBuilder.GetServiceClient_OAuth(TestEnvironment.Credential); await using DisposingContainer test = await GetTestContainerAsync( service: serviceClient, publicAccessType: PublicAccessType.None); @@ -3405,7 +3440,7 @@ await destBlob.SyncUploadFromUriAsync( public async Task SyncUploadFromUriAsync_SourceBearerTokenFail() { // Arrange - BlobServiceClient serviceClient = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient serviceClient = GetServiceClient_OAuth(); await using DisposingContainer test = await GetTestContainerAsync( service: serviceClient, publicAccessType: PublicAccessType.None); @@ -3519,7 +3554,8 @@ public async Task SyncUploadFromUriAsync_AccessTier_Cold() }; // Act - await destBlob.SyncUploadFromUriAsync(sourceBlob.Uri, options); + await destBlob.SyncUploadFromUriAsync( + sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), options); // Assert Response response = await destBlob.GetPropertiesAsync(); @@ -3574,7 +3610,7 @@ public void CanMockClientConstructors() mock = new Mock(new Uri("https://test/test"), new BlobClientOptions()).Object; mock = new Mock(new Uri("https://test/test"), Tenants.GetNewSharedKeyCredentials(), new BlobClientOptions()).Object; mock = new Mock(new Uri("https://test/test"), new AzureSasCredential("foo"), new BlobClientOptions()).Object; - mock = new Mock(new Uri("https://test/test"), Tenants.GetOAuthCredential(Tenants.TestConfigHierarchicalNamespace), new BlobClientOptions()).Object; + mock = new Mock(new Uri("https://test/test"), TestEnvironment.Credential, new BlobClientOptions()).Object; } private RequestConditions BuildRequestConditions(AccessConditionParameters parameters) diff --git a/sdk/storage/Azure.Storage.Blobs/tests/ClientBuilderExtensions.cs b/sdk/storage/Azure.Storage.Blobs/tests/ClientBuilderExtensions.cs index b9b484f3acf28..5a3cb6859e03c 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/ClientBuilderExtensions.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/ClientBuilderExtensions.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; +using Azure.Core; using Azure.Storage.Blobs.Models; using Azure.Storage.Blobs.Specialized; using Azure.Storage.Test.Shared; @@ -54,8 +55,8 @@ public static BlobServiceClient GetServiceClient_PreviewAccount_SharedKey(this B public static BlobServiceClient GetServiceClient_PremiumBlobAccount_SharedKey(this BlobsClientBuilder clientBuilder) => clientBuilder.GetServiceClientFromSharedKeyConfig(clientBuilder.Tenants.TestConfigPremiumBlob); - public static BlobServiceClient GetServiceClient_OAuth(this BlobsClientBuilder clientBuilder) - => clientBuilder.GetServiceClientFromOauthConfig(clientBuilder.Tenants.TestConfigOAuth); + public static BlobServiceClient GetServiceClient_OAuth(this BlobsClientBuilder clientBuilder, TokenCredential tokenCredential) + => clientBuilder.GetServiceClientFromOauthConfig(clientBuilder.Tenants.TestConfigOAuth, tokenCredential); public static BlobServiceClient GetServiceClient_OAuthAccount_SharedKey(this BlobsClientBuilder clientBuilder) => clientBuilder.GetServiceClientFromSharedKeyConfig(clientBuilder.Tenants.TestConfigOAuth); @@ -82,7 +83,7 @@ public static async Task GetTestContainerAsync( if (publicAccessType == default) { - publicAccessType = premium ? PublicAccessType.None : PublicAccessType.BlobContainer; + publicAccessType = PublicAccessType.None; } BlobContainerClient container = clientBuilder.AzureCoreRecordedTestBase.InstrumentClient(service.GetBlobContainerClient(containerName)); diff --git a/sdk/storage/Azure.Storage.Blobs/tests/ContainerClientTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/ContainerClientTests.cs index db55dddffc336..9b7aa6ef6cdef 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/ContainerClientTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/ContainerClientTests.cs @@ -262,7 +262,7 @@ public void Ctor_TokenAuth_Http() // Act TestHelper.AssertExpectedException( - () => new BlobContainerClient(httpUri, Tenants.GetOAuthCredential()), + () => new BlobContainerClient(httpUri, TestEnvironment.Credential), new ArgumentException("Cannot use TokenCredential without HTTPS.")); } @@ -347,7 +347,7 @@ public async Task Ctor_DefaultAudience() BlobContainerClient aadContainer = InstrumentClient(new BlobContainerClient( uriBuilder.ToUri(), - Tenants.GetOAuthCredential(), + TestEnvironment.Credential, options)); // Assert @@ -356,6 +356,7 @@ public async Task Ctor_DefaultAudience() } [RecordedTest] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_CustomAudience() { // Arrange @@ -371,7 +372,7 @@ public async Task Ctor_CustomAudience() BlobContainerClient aadContainer = InstrumentClient(new BlobContainerClient( uriBuilder.ToUri(), - Tenants.GetOAuthCredential(), + TestEnvironment.Credential, options)); // Assert @@ -380,6 +381,7 @@ public async Task Ctor_CustomAudience() } [RecordedTest] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_StorageAccountAudience() { // Arrange @@ -395,7 +397,7 @@ public async Task Ctor_StorageAccountAudience() BlobContainerClient aadContainer = InstrumentClient(new BlobContainerClient( uriBuilder.ToUri(), - Tenants.GetOAuthCredential(), + TestEnvironment.Credential, options)); // Assert @@ -494,7 +496,7 @@ public async Task CreateAsync_WithOauth() { // Arrange var containerName = GetNewContainerName(); - BlobServiceClient service = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient service = GetServiceClient_OAuth(); BlobContainerClient container = InstrumentClient(service.GetBlobContainerClient(containerName)); try @@ -635,6 +637,7 @@ public async Task CreateAsync_EncryptionScopeOptions() } [RecordedTest] + [PlaybackOnly("Public access disabled on live tests accounts")] public async Task CreateAsync_PublicAccess() { // Arrange @@ -1259,7 +1262,6 @@ public async Task GetAccessPolicyAsync_EmptyAccessPolicy() await using DisposingContainer test = await GetTestContainerAsync(); // Arrange - PublicAccessType publicAccessType = PublicAccessType.BlobContainer; BlobSignedIdentifier[] signedIdentifiers = new[] { new BlobSignedIdentifier @@ -1271,7 +1273,6 @@ public async Task GetAccessPolicyAsync_EmptyAccessPolicy() // Act Response response = await test.Container.SetAccessPolicyAsync( - accessType: publicAccessType, permissions: signedIdentifiers ); @@ -1303,12 +1304,10 @@ public async Task SetAccessPolicyAsync() await using DisposingContainer test = await GetTestContainerAsync(); // Arrange - PublicAccessType publicAccessType = PublicAccessType.BlobContainer; BlobSignedIdentifier[] signedIdentifiers = BuildSignedIdentifiers(); // Act Response response = await test.Container.SetAccessPolicyAsync( - accessType: publicAccessType, permissions: signedIdentifiers ); @@ -1318,7 +1317,6 @@ public async Task SetAccessPolicyAsync() Assert.AreEqual(response.Value.ETag.ToString(), $"\"{response.GetRawResponse().Headers.ETag}\""); Response propertiesResponse = await test.Container.GetPropertiesAsync(); - Assert.AreEqual(publicAccessType, propertiesResponse.Value.PublicAccess); Response getPolicyResponse = await test.Container.GetAccessPolicyAsync(); Assert.AreEqual(1, getPolicyResponse.Value.SignedIdentifiers.Count()); @@ -1523,7 +1521,6 @@ public async Task SetAccessPolicyAsync_AccessConditions() BlobServiceClient service = GetServiceClient_SharedKey(); BlobContainerClient container = InstrumentClient(service.GetBlobContainerClient(GetNewContainerName())); await container.CreateIfNotExistsAsync(); - PublicAccessType publicAccessType = PublicAccessType.BlobContainer; BlobSignedIdentifier[] signedIdentifiers = BuildSignedIdentifiers(); parameters.LeaseId = await SetupContainerLeaseCondition(container, parameters.LeaseId, garbageLeaseId); BlobRequestConditions accessConditions = BuildContainerAccessConditions( @@ -1533,7 +1530,6 @@ public async Task SetAccessPolicyAsync_AccessConditions() // Act Response response = await container.SetAccessPolicyAsync( - accessType: publicAccessType, permissions: signedIdentifiers, conditions: accessConditions ); @@ -1577,7 +1573,6 @@ public async Task SetAccessPolicyAsync_InvalidPermissionOrder() await using DisposingContainer test = await GetTestContainerAsync(); // Arrange - PublicAccessType publicAccessType = PublicAccessType.BlobContainer; BlobSignedIdentifier[] signedIdentifiers = new[] { new BlobSignedIdentifier @@ -1594,13 +1589,11 @@ public async Task SetAccessPolicyAsync_InvalidPermissionOrder() // Act await test.Container.SetAccessPolicyAsync( - accessType: publicAccessType, permissions: signedIdentifiers ); // Assert Response propertiesResponse = await test.Container.GetPropertiesAsync(); - Assert.AreEqual(publicAccessType, propertiesResponse.Value.PublicAccess); Response response = await test.Container.GetAccessPolicyAsync(); Assert.AreEqual(1, response.Value.SignedIdentifiers.Count()); @@ -4058,7 +4051,7 @@ public void CanMockClientConstructors() mock = new Mock(new Uri("https://test/test"), new BlobClientOptions()).Object; mock = new Mock(new Uri("https://test/test"), Tenants.GetNewSharedKeyCredentials(), new BlobClientOptions()).Object; mock = new Mock(new Uri("https://test/test"), new AzureSasCredential("foo"), new BlobClientOptions()).Object; - mock = new Mock(new Uri("https://test/test"), Tenants.GetOAuthCredential(Tenants.TestConfigHierarchicalNamespace), new BlobClientOptions()).Object; + mock = new Mock(new Uri("https://test/test"), TestEnvironment.Credential, new BlobClientOptions()).Object; } #region Secondary Storage diff --git a/sdk/storage/Azure.Storage.Blobs/tests/ImmutableStorageWithVersioningTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/ImmutableStorageWithVersioningTests.cs index 76d4079eb33cf..3eac647db9cf8 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/ImmutableStorageWithVersioningTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/ImmutableStorageWithVersioningTests.cs @@ -6,16 +6,18 @@ using System.IO; using System.Linq; using System.Threading.Tasks; +using Azure.Core; using Azure.Core.TestFramework; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.Storage; +using Azure.ResourceManager.Storage.Models; using Azure.Storage.Blobs.Models; using Azure.Storage.Blobs.Specialized; using Azure.Storage.Blobs.Tests; using Azure.Storage.Sas; using Azure.Storage.Test; using Azure.Storage.Test.Shared; -using Azure.Storage.Tests.Shared; -using Microsoft.Azure.Management.Storage; -using Microsoft.Rest; using NUnit.Framework; namespace Azure.Storage.Blobs.Test @@ -29,7 +31,8 @@ public ImmutableStorageWithVersioningTests(bool async, BlobClientOptions.Service // The container is shared by all tests in this class private string _containerName; - private StorageManagementClient _storageManagementClient; + private BlobContainerResource _container; + //private StorageManagementClient _storageManagementClient; private BlobContainerClient _containerClient; @@ -39,21 +42,28 @@ public async Task GlobalSetUp() if (Mode != RecordedTestMode.Playback) { _containerName = Guid.NewGuid().ToString(); - var configuration = TestConfigurations.DefaultTargetOAuthTenant; - - string subscriptionId = configuration.SubscriptionId; - string[] scopes = new string[] { "https://management.azure.com/.default" }; - string token = await GetAuthToken(scopes, configuration); - TokenCredentials tokenCredentials = new TokenCredentials(token); - _storageManagementClient = new StorageManagementClient(tokenCredentials) { SubscriptionId = subscriptionId }; - - await _storageManagementClient.BlobContainers.CreateAsync( - resourceGroupName: configuration.ResourceGroupName, - accountName: configuration.AccountName, - containerName: _containerName, - new Microsoft.Azure.Management.Storage.Models.BlobContainer( - publicAccess: Microsoft.Azure.Management.Storage.Models.PublicAccess.Container, - immutableStorageWithVersioning: new Microsoft.Azure.Management.Storage.Models.ImmutableStorageWithVersioning(true))); + TenantConfiguration configuration = TestConfigurations.DefaultTargetOAuthTenant; + + try + { + ArmClient armClient = new ArmClient(TestEnvironment.Credential); + SubscriptionResource subscription = armClient.GetSubscriptionResource(new ResourceIdentifier($"/subscriptions/{configuration.SubscriptionId}")); + ResourceGroupResource resourceGroup = await subscription.GetResourceGroupAsync(configuration.ResourceGroupName); + StorageAccountResource storageAccount = await resourceGroup.GetStorageAccountAsync(configuration.AccountName); + BlobServiceResource blobService = storageAccount.GetBlobService(); + BlobContainerCollection blobContainerCollection = blobService.GetBlobContainers(); + BlobContainerData blobContainerData = new BlobContainerData(); + blobContainerData.ImmutableStorageWithVersioning = new ImmutableStorageWithVersioning + { + IsEnabled = true + }; + ArmOperation blobContainerCreateOperation = await blobContainerCollection.CreateOrUpdateAsync(WaitUntil.Completed, _containerName, blobContainerData); + _container = blobContainerCreateOperation.Value; + } + catch (Exception ex) + { + Console.WriteLine(ex.ToString()); + } return; } } @@ -70,8 +80,8 @@ public async Task GlobalTearDown() { if (Mode != RecordedTestMode.Playback) { - var configuration = TestConfigurations.DefaultTargetOAuthTenant; - var containerClient = new BlobServiceClient( + TenantConfiguration configuration = TestConfigurations.DefaultTargetOAuthTenant; + BlobContainerClient containerClient = new BlobServiceClient( new Uri(Tenants.TestConfigOAuth.BlobServiceEndpoint), new StorageSharedKeyCredential(Tenants.TestConfigOAuth.AccountName, Tenants.TestConfigOAuth.AccountKey)) @@ -93,10 +103,7 @@ public async Task GlobalTearDown() await blobClient.DeleteIfExistsAsync(); } - await _storageManagementClient.BlobContainers.DeleteAsync( - resourceGroupName: configuration.ResourceGroupName, - accountName: configuration.AccountName, - containerName: _containerName); + await _container.DeleteAsync(WaitUntil.Completed); } } @@ -490,7 +497,7 @@ await TestHelper.AssertExpectedExceptionAsync( blob.SetImmutabilityPolicyAsync( immutabilityPolicy: immutabilityPolicy, conditions: conditions), - e => Assert.AreEqual(BlobErrorCode.ConditionNotMet.ToString(), e.ErrorCode)); + e => Assert.AreEqual("ConditionNotMet", e.ErrorCode)); } [Test] @@ -825,7 +832,9 @@ public async Task SyncCopyFromUri_ImmutableStorageWithVersioning() }; // Act - await destBlob.SyncCopyFromUriAsync(srcBlob.Uri, options); + await destBlob.SyncCopyFromUriAsync( + srcBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), + options); // Assert Response propertiesResponse = await destBlob.GetPropertiesAsync(); diff --git a/sdk/storage/Azure.Storage.Blobs/tests/ManagedDiskFixture.cs b/sdk/storage/Azure.Storage.Blobs/tests/ManagedDiskFixture.cs index 3b0e08f68d55d..7ac4260b93a84 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/ManagedDiskFixture.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/ManagedDiskFixture.cs @@ -43,10 +43,7 @@ public override async Task SetUp() { _config = TestConfigurations.DefaultTargetManagedDisk; - TokenCredential tokenCredentials = new Identity.ClientSecretCredential( - _config.ActiveDirectoryTenantId, _config.ActiveDirectoryApplicationId, _config.ActiveDirectoryApplicationSecret); - - ArmClient client = new ArmClient(tokenCredentials, _config.SubsriptionId); + ArmClient client = new ArmClient(Environment.Credential, _config.SubsriptionId); SubscriptionResource subscription = await client.GetDefaultSubscriptionAsync(); _resourceGroup = await subscription.GetResourceGroups().GetAsync(_config.ResourceGroupName); var disks = await _resourceGroup.GetManagedDisks().GetAllAsync().ToListAsync(); diff --git a/sdk/storage/Azure.Storage.Blobs/tests/ManagedDiskTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/ManagedDiskTests.cs index 699ce95fc6a8c..2441b09c9559c 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/ManagedDiskTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/ManagedDiskTests.cs @@ -38,10 +38,10 @@ public void Setup() } [Test] - [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/30035")] public async Task CanDiffPagesBetweenSnapshots() { // Arrange + Setup(); var snapshot1Client = InstrumentClient(new PageBlobClient(snapshot1SASUri, GetOptions())); var snapshot2Client = InstrumentClient(new PageBlobClient(snapshot2SASUri, GetOptions())); @@ -74,6 +74,7 @@ public async Task CanDiffPagesBetweenSnapshots() public async Task GetManagedDiskPageRangesDiffAsync_Error() { // Arrange + Setup(); var snapshot1Client = InstrumentClient(new PageBlobClient(snapshot1SASUri, GetOptions())); // Act @@ -90,6 +91,7 @@ await TestHelper.AssertExpectedExceptionAsync( [Test] public async Task GetManagedDiskPageRangesDiffAsync_AccessConditions() { + Setup(); var snapshot2Client = InstrumentClient(new PageBlobClient(snapshot2SASUri, GetOptions())); foreach (var parameters in Reduced_AccessConditions_Data) @@ -114,6 +116,7 @@ public async Task GetManagedDiskPageRangesDiffAsync_AccessConditions() [Test] public async Task GetManagedDiskPageRangesDiffAsync_AccessConditionsFail() { + Setup(); var snapshot2Client = InstrumentClient(new PageBlobClient(snapshot2SASUri, GetOptions())); foreach (var parameters in Reduced_AccessConditions_Fail_Data) { diff --git a/sdk/storage/Azure.Storage.Blobs/tests/PageBlobClientTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/PageBlobClientTests.cs index 18f52e1630904..d85f694346f9c 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/PageBlobClientTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/PageBlobClientTests.cs @@ -92,7 +92,7 @@ public void Ctor_TokenAuth_Http() // Act TestHelper.AssertExpectedException( - () => new PageBlobClient(httpUri, Tenants.GetOAuthCredential()), + () => new PageBlobClient(httpUri, TestEnvironment.Credential), new ArgumentException("Cannot use TokenCredential without HTTPS.")); } @@ -166,7 +166,7 @@ public async Task Ctor_DefaultAudience() PageBlobClient aadBlob = InstrumentClient(new PageBlobClient( uriBuilder.ToUri(), - Tenants.GetOAuthCredential(), + TestEnvironment.Credential, options)); // Assert @@ -175,6 +175,7 @@ public async Task Ctor_DefaultAudience() } [RecordedTest] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_CustomAudience() { // Arrange @@ -194,7 +195,7 @@ public async Task Ctor_CustomAudience() PageBlobClient aadBlob = InstrumentClient(new PageBlobClient( uriBuilder.ToUri(), - Tenants.GetOAuthCredential(), + TestEnvironment.Credential, options)); // Assert @@ -203,6 +204,7 @@ public async Task Ctor_CustomAudience() } [RecordedTest] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_StorageAccountAudience() { // Arrange @@ -222,7 +224,7 @@ public async Task Ctor_StorageAccountAudience() PageBlobClient aadBlob = InstrumentClient(new PageBlobClient( uriBuilder.ToUri(), - Tenants.GetOAuthCredential(), + TestEnvironment.Credential, options)); // Assert @@ -3001,7 +3003,7 @@ public async Task StartCopyIncrementalAsync_Error() // Act await TestHelper.AssertExpectedExceptionAsync( blob.StartCopyIncrementalAsync( - sourceUri: sourceBlob.Uri, + sourceUri: sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), // dummy snapshot value. snapshot: "2019-03-29T18:12:15.6608647Z"), e => @@ -3072,7 +3074,6 @@ public async Task StartCopyIncrementalAsync_AccessConditionsFail() await using DisposingContainer test = await GetTestContainerAsync(); // Arrange - await test.Container.SetAccessPolicyAsync(PublicAccessType.BlobContainer); var data = GetRandomBuffer(Constants.KB); var expectedData = new byte[4 * Constants.KB]; data.CopyTo(expectedData, 0); @@ -3094,7 +3095,7 @@ public async Task StartCopyIncrementalAsync_AccessConditionsFail() PageBlobClient blob = InstrumentClient(test.Container.GetPageBlobClient(GetNewBlobName())); Operation operation = await blob.StartCopyIncrementalAsync( - sourceUri: sourceBlob.Uri, + sourceUri: sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), snapshot: snapshot); await operation.WaitForCompletionAsync(); parameters.NoneMatch = await SetupBlobMatchCondition(blob, parameters.NoneMatch); @@ -3344,9 +3345,6 @@ public async Task UploadPagesFromUriAsync_Min() { await using DisposingContainer test = await GetTestContainerAsync(); // Arrange - - await test.Container.SetAccessPolicyAsync(PublicAccessType.BlobContainer); - var data = GetRandomBuffer(Constants.KB); using (var stream = new MemoryStream(data)) @@ -3361,7 +3359,7 @@ public async Task UploadPagesFromUriAsync_Min() // Act Response response = await destBlob.UploadPagesFromUriAsync( - sourceUri: sourceBlob.Uri, + sourceUri: sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), sourceRange: range, range: range); @@ -3489,8 +3487,6 @@ public async Task UploadPagesFromUriAsync_EncryptionScope() await using DisposingContainer test = await GetTestContainerAsync(); // Arrange - await test.Container.SetAccessPolicyAsync(PublicAccessType.BlobContainer); - var data = GetRandomBuffer(Constants.KB); using var stream = new MemoryStream(data); @@ -3505,7 +3501,7 @@ public async Task UploadPagesFromUriAsync_EncryptionScope() // Act Response response = await destBlob.UploadPagesFromUriAsync( - sourceUri: sourceBlob.Uri, + sourceUri: sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), sourceRange: range, range: range); @@ -3519,8 +3515,6 @@ public async Task UploadPagesFromUriAsync_Range() await using DisposingContainer test = await GetTestContainerAsync(); // Arrange - await test.Container.SetAccessPolicyAsync(PublicAccessType.BlobContainer); - var data = GetRandomBuffer(4 * Constants.KB); using (var stream = new MemoryStream(data)) @@ -3535,7 +3529,7 @@ public async Task UploadPagesFromUriAsync_Range() // Act await destBlob.UploadPagesFromUriAsync( - sourceUri: sourceBlob.Uri, + sourceUri: sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), sourceRange: new HttpRange(2 * Constants.KB, 2 * Constants.KB), range: range); @@ -3554,7 +3548,6 @@ public async Task UploadPagesFromUriAsync_MD5() await using DisposingContainer test = await GetTestContainerAsync(); // Arrange - await test.Container.SetAccessPolicyAsync(PublicAccessType.BlobContainer); var data = GetRandomBuffer(Constants.KB); @@ -3575,7 +3568,7 @@ public async Task UploadPagesFromUriAsync_MD5() // Act await destBlob.UploadPagesFromUriAsync( - sourceUri: sourceBlob.Uri, + sourceUri: sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), sourceRange: range, range: range, options: options); @@ -3588,8 +3581,6 @@ public async Task UploadPagesFromUriAsync_MD5_Fail() await using DisposingContainer test = await GetTestContainerAsync(); // Arrange - await test.Container.SetAccessPolicyAsync(PublicAccessType.BlobContainer); - var data = GetRandomBuffer(Constants.KB); using (var stream = new MemoryStream(data)) @@ -3610,7 +3601,7 @@ public async Task UploadPagesFromUriAsync_MD5_Fail() // Act await TestHelper.AssertExpectedExceptionAsync( destBlob.UploadPagesFromUriAsync( - sourceUri: sourceBlob.Uri, + sourceUri: sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), sourceRange: range, range: range, options: options), @@ -3646,8 +3637,6 @@ public async Task UploadPagesFromUriAsync_AccessConditions() await using DisposingContainer test = await GetTestContainerAsync(); // Arrange - await test.Container.SetAccessPolicyAsync(PublicAccessType.BlobContainer); - var data = GetRandomBuffer(Constants.KB); using (var stream = new MemoryStream(data)) @@ -3679,7 +3668,7 @@ public async Task UploadPagesFromUriAsync_AccessConditions() // Act await destBlob.UploadPagesFromUriAsync( - sourceUri: sourceBlob.Uri, + sourceUri: sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), sourceRange: range, range: range, options: options); @@ -3688,6 +3677,9 @@ await destBlob.UploadPagesFromUriAsync( } [RecordedTest] + // Net462 is sending the source SAS expiry unencoded to the service, while net6 and net7 sending it encoded. + // Both are valid, but make this test non-recordable. + [LiveOnly] public async Task UploadPagesFromUriAsync_NonAsciiSourceUri() { await using DisposingContainer test = await GetTestContainerAsync(); @@ -3695,9 +3687,6 @@ public async Task UploadPagesFromUriAsync_NonAsciiSourceUri() // Arrange var data = GetRandomBuffer(Constants.KB); - // Arrange - await test.Container.SetAccessPolicyAsync(PublicAccessType.BlobContainer); - using (var stream = new MemoryStream(data)) { PageBlobClient sourceBlob = InstrumentClient(test.Container.GetPageBlobClient(GetNewNonAsciiBlobName())); @@ -3710,7 +3699,7 @@ public async Task UploadPagesFromUriAsync_NonAsciiSourceUri() // Act await destBlob.UploadPagesFromUriAsync( - sourceUri: sourceBlob.Uri, + sourceUri: sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), sourceRange: range, range: range); } @@ -3742,8 +3731,6 @@ public async Task UploadPagesFromUriAsync_AccessConditionsFail() await using DisposingContainer test = await GetTestContainerAsync(); // Arrange - await test.Container.SetAccessPolicyAsync(PublicAccessType.BlobContainer); - var data = GetRandomBuffer(Constants.KB); using (var stream = new MemoryStream(data)) @@ -3775,7 +3762,7 @@ public async Task UploadPagesFromUriAsync_AccessConditionsFail() // Act await TestHelper.AssertExpectedExceptionAsync( destBlob.UploadPagesFromUriAsync( - sourceUri: sourceBlob.Uri, + sourceUri: sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), sourceRange: range, range: range, options: options), @@ -3789,10 +3776,8 @@ await TestHelper.AssertExpectedExceptionAsync( [ServiceVersion(Min = BlobClientOptions.ServiceVersion.V2019_12_12)] public async Task UploadPagesFromUriAsync_IfTags() { - await using DisposingContainer test = await GetTestContainerAsync(); // Arrange - - await test.Container.SetAccessPolicyAsync(PublicAccessType.BlobContainer); + await using DisposingContainer test = await GetTestContainerAsync(); var data = GetRandomBuffer(Constants.KB); @@ -3825,7 +3810,7 @@ public async Task UploadPagesFromUriAsync_IfTags() // Act await destBlob.UploadPagesFromUriAsync( - sourceUri: sourceBlob.Uri, + sourceUri: sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), sourceRange: range, range: range, options: options); @@ -3835,10 +3820,8 @@ await destBlob.UploadPagesFromUriAsync( [ServiceVersion(Min = BlobClientOptions.ServiceVersion.V2019_12_12)] public async Task UploadPagesFromUriAsync_IfTagsFailed() { - await using DisposingContainer test = await GetTestContainerAsync(); // Arrange - - await test.Container.SetAccessPolicyAsync(PublicAccessType.BlobContainer); + await using DisposingContainer test = await GetTestContainerAsync(); var data = GetRandomBuffer(Constants.KB); @@ -3866,7 +3849,7 @@ public async Task UploadPagesFromUriAsync_IfTagsFailed() // Act await TestHelper.AssertExpectedExceptionAsync( destBlob.UploadPagesFromUriAsync( - sourceUri: sourceBlob.Uri, + sourceUri: sourceBlob.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), sourceRange: range, range: range, options: options), @@ -3878,7 +3861,7 @@ await TestHelper.AssertExpectedExceptionAsync( public async Task UploadPagesFromUriAsync_SourceBearerToken() { // Arrange - BlobServiceClient serviceClient = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient serviceClient = GetServiceClient_OAuth(); await using DisposingContainer test = await GetTestContainerAsync( service: serviceClient, publicAccessType: PublicAccessType.None); @@ -3918,7 +3901,7 @@ await destBlob.UploadPagesFromUriAsync( public async Task UploadPagesFromUriAsync_SourceBearerTokenFail() { // Arrange - BlobServiceClient serviceClient = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient serviceClient = GetServiceClient_OAuth(); await using DisposingContainer test = await GetTestContainerAsync( service: serviceClient, publicAccessType: PublicAccessType.None); @@ -4148,7 +4131,7 @@ public void CanMockClientConstructors() mock = new Mock(new Uri("https://test/test"), new BlobClientOptions()).Object; mock = new Mock(new Uri("https://test/test"), Tenants.GetNewSharedKeyCredentials(), new BlobClientOptions()).Object; mock = new Mock(new Uri("https://test/test"), new AzureSasCredential("foo"), new BlobClientOptions()).Object; - mock = new Mock(new Uri("https://test/test"), Tenants.GetOAuthCredential(Tenants.TestConfigHierarchicalNamespace), new BlobClientOptions()).Object; + mock = new Mock(new Uri("https://test/test"), TestEnvironment.Credential, new BlobClientOptions()).Object; } [RecordedTest] diff --git a/sdk/storage/Azure.Storage.Blobs/tests/ServiceClientTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/ServiceClientTests.cs index 05b25ee26d1ab..66f6dd5ee9748 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/ServiceClientTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/ServiceClientTests.cs @@ -87,7 +87,7 @@ public void Ctor_TokenAuth_Http() // Act TestHelper.AssertExpectedException( - () => new BlobServiceClient(httpUri, Tenants.GetOAuthCredential()), + () => new BlobServiceClient(httpUri, TestEnvironment.Credential), new ArgumentException("Cannot use TokenCredential without HTTPS.")); } @@ -183,7 +183,7 @@ public async Task Ctor_DefaultAudience() BlobServiceClient aadService = InstrumentClient(new BlobServiceClient( new Uri(Tenants.TestConfigOAuth.BlobServiceEndpoint), - Tenants.GetOAuthCredential(), + TestEnvironment.Credential, options)); // Assert @@ -192,6 +192,7 @@ public async Task Ctor_DefaultAudience() } [RecordedTest] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_CustomAudience() { // Arrange @@ -202,7 +203,7 @@ public async Task Ctor_CustomAudience() BlobServiceClient aadService = InstrumentClient(new BlobServiceClient( new Uri(Tenants.TestConfigOAuth.BlobServiceEndpoint), - Tenants.GetOAuthCredential(), + TestEnvironment.Credential, options)); // Assert @@ -211,6 +212,7 @@ public async Task Ctor_CustomAudience() } [RecordedTest] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_StorageAccountAudience() { // Arrange @@ -221,7 +223,7 @@ public async Task Ctor_StorageAccountAudience() BlobServiceClient aadService = InstrumentClient(new BlobServiceClient( new Uri(Tenants.TestConfigOAuth.BlobServiceEndpoint), - Tenants.GetOAuthCredential(), + TestEnvironment.Credential, options)); // Assert @@ -664,7 +666,7 @@ public async Task GetStatisticsAsync() public async Task GetUserDelegationKey() { // Arrange - BlobServiceClient service = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient service = GetServiceClient_OAuth(); // Act Response response = await service.GetUserDelegationKeyAsync(startsOn: null, expiresOn: Recording.UtcNow.AddHours(1)); @@ -689,7 +691,7 @@ await TestHelper.AssertExpectedExceptionAsync( public async Task GetUserDelegationKey_ArgumentException() { // Arrange - BlobServiceClient service = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient service = GetServiceClient_OAuth(); // Act await TestHelper.AssertExpectedExceptionAsync( @@ -1260,7 +1262,7 @@ public void CanMockClientConstructors() mock = new Mock(new Uri("https://test/test"), new BlobClientOptions()).Object; mock = new Mock(new Uri("https://test/test"), Tenants.GetNewSharedKeyCredentials(), new BlobClientOptions()).Object; mock = new Mock(new Uri("https://test/test"), new AzureSasCredential("foo"), new BlobClientOptions()).Object; - mock = new Mock(new Uri("https://test/test"), Tenants.GetOAuthCredential(Tenants.TestConfigHierarchicalNamespace), new BlobClientOptions()).Object; + mock = new Mock(new Uri("https://test/test"), TestEnvironment.Credential, new BlobClientOptions()).Object; } } } diff --git a/sdk/storage/Azure.Storage.Common/assets.json b/sdk/storage/Azure.Storage.Common/assets.json index b9ef2aaf4a108..8e6565c272d3e 100644 --- a/sdk/storage/Azure.Storage.Common/assets.json +++ b/sdk/storage/Azure.Storage.Common/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/storage/Azure.Storage.Common", - "Tag": "net/storage/Azure.Storage.Common_bb1a2d2669" + "Tag": "net/storage/Azure.Storage.Common_f61db9baba" } diff --git a/sdk/storage/Azure.Storage.Common/tests/Shared/ClientBuilder.cs b/sdk/storage/Azure.Storage.Common/tests/Shared/ClientBuilder.cs index 9155ca33a5ed5..a5f589c0f1470 100644 --- a/sdk/storage/Azure.Storage.Common/tests/Shared/ClientBuilder.cs +++ b/sdk/storage/Azure.Storage.Common/tests/Shared/ClientBuilder.cs @@ -137,11 +137,12 @@ public TServiceClient GetServiceClientFromSharedKeyConfig(TenantConfiguration co public TServiceClient GetServiceClientFromOauthConfig( TenantConfiguration config, + TokenCredential tokenCredential, TServiceClientOptions options = default) => AzureCoreRecordedTestBase.InstrumentClient( _getServiceClientTokenCredential( new Uri(GetEndpoint(config)), - Tenants.GetOAuthCredential(config), + tokenCredential, options ?? GetOptions())); public TServiceClientOptions GetOptions(bool parallelRange = false) diff --git a/sdk/storage/Azure.Storage.Common/tests/Shared/KeyVaultConfiguration.cs b/sdk/storage/Azure.Storage.Common/tests/Shared/KeyVaultConfiguration.cs index aa329692928b3..f3d6f00710c4a 100644 --- a/sdk/storage/Azure.Storage.Common/tests/Shared/KeyVaultConfiguration.cs +++ b/sdk/storage/Azure.Storage.Common/tests/Shared/KeyVaultConfiguration.cs @@ -12,10 +12,6 @@ public class KeyVaultConfiguration { public string VaultName { get; private set; } public string VaultEndpoint { get; private set; } - public string ActiveDirectoryApplicationId { get; private set; } - public string ActiveDirectoryTenantId { get; private set; } - public string ActiveDirectoryApplicationSecret { get; private set; } - public string ActiveDirectoryAuthEndpoint { get; private set; } /// /// Parse an XML representation into a TenantConfiguration value. @@ -30,10 +26,6 @@ public static KeyVaultConfiguration Parse(XElement tenant) { VaultName = Get("VaultName"), VaultEndpoint = Get("VaultEndpoint"), - ActiveDirectoryApplicationId = Get("ActiveDirectoryApplicationId"), - ActiveDirectoryApplicationSecret = Get("ActiveDirectoryApplicationSecret"), - ActiveDirectoryTenantId = Get("ActiveDirectoryTenantId"), - ActiveDirectoryAuthEndpoint = Get("ActiveDirectoryAuthEndpoint") }; } } diff --git a/sdk/storage/Azure.Storage.Common/tests/Shared/ManagedDiskConfiguration.cs b/sdk/storage/Azure.Storage.Common/tests/Shared/ManagedDiskConfiguration.cs index 3015ea5cbbba7..26152688b02bf 100644 --- a/sdk/storage/Azure.Storage.Common/tests/Shared/ManagedDiskConfiguration.cs +++ b/sdk/storage/Azure.Storage.Common/tests/Shared/ManagedDiskConfiguration.cs @@ -15,12 +15,6 @@ public class ManagedDiskConfiguration public string SubsriptionId { get; private set; } - public string ActiveDirectoryApplicationId { get; private set; } - - public string ActiveDirectoryApplicationSecret { get; private set; } - - public string ActiveDirectoryTenantId { get; private set; } - public string Location { get; private set; } public static ManagedDiskConfiguration Parse(XElement tenant) @@ -34,9 +28,6 @@ public static ManagedDiskConfiguration Parse(XElement tenant) ResourceGroupName = Get("ResourceGroupName"), SubsriptionId = Get("SubsriptionId"), Location = Get("Location"), - ActiveDirectoryApplicationId = Get("ActiveDirectoryApplicationId"), - ActiveDirectoryApplicationSecret = Get("ActiveDirectoryApplicationSecret"), - ActiveDirectoryTenantId = Get("ActiveDirectoryTenantId"), }; } } diff --git a/sdk/storage/Azure.Storage.Common/tests/Shared/SampleTest.cs b/sdk/storage/Azure.Storage.Common/tests/Shared/SampleTest.cs index fab870de5c55b..aa103dc16f56a 100644 --- a/sdk/storage/Azure.Storage.Common/tests/Shared/SampleTest.cs +++ b/sdk/storage/Azure.Storage.Common/tests/Shared/SampleTest.cs @@ -46,26 +46,6 @@ public abstract class SampleTest /// public Uri StorageAccountFileUri => new Uri(TestConfigurations.DefaultTargetTenant.FileServiceEndpoint); - /// - /// Get an Active Directory Tenant ID to use from our test settings. - /// - public string ActiveDirectoryTenantId => TestConfigurations.DefaultTargetOAuthTenant.ActiveDirectoryTenantId; - - /// - /// Get an Active Directory Application ID to use from our test settings. - /// - public string ActiveDirectoryApplicationId => TestConfigurations.DefaultTargetOAuthTenant.ActiveDirectoryApplicationId; - - /// - /// Get an Active Directory Application Secret to use from our test settings. - /// - public string ActiveDirectoryApplicationSecret => TestConfigurations.DefaultTargetOAuthTenant.ActiveDirectoryApplicationSecret; - - /// - /// Get an Active Directory Auth Endpoint to use from our test settings. - /// - public Uri ActiveDirectoryAuthEndpoint => new Uri(TestConfigurations.DefaultTargetOAuthTenant.ActiveDirectoryAuthEndpoint); - /// /// Get a blob endpoint associated with our AD application from our test settings. /// diff --git a/sdk/storage/Azure.Storage.Common/tests/Shared/StorageTestBase.cs b/sdk/storage/Azure.Storage.Common/tests/Shared/StorageTestBase.cs index a2050b43d9963..d48936904d7c2 100644 --- a/sdk/storage/Azure.Storage.Common/tests/Shared/StorageTestBase.cs +++ b/sdk/storage/Azure.Storage.Common/tests/Shared/StorageTestBase.cs @@ -385,18 +385,10 @@ public async Task GetAuthToken(string[] scopes = default, TenantConfigur return "auth token"; } - tenantConfiguration ??= Tenants.TestConfigOAuth; - - IConfidentialClientApplication application = ConfidentialClientApplicationBuilder.Create(tenantConfiguration.ActiveDirectoryApplicationId) - .WithAuthority(AzureCloudInstance.AzurePublic, tenantConfiguration.ActiveDirectoryTenantId) - .WithClientSecret(tenantConfiguration.ActiveDirectoryApplicationSecret) - .Build(); - scopes ??= new string[] { "https://storage.azure.com/.default" }; - - AcquireTokenForClientParameterBuilder result = application.AcquireTokenForClient(scopes); - AuthenticationResult authenticationResult = await result.ExecuteAsync(); - return authenticationResult.AccessToken; + TokenRequestContext tokenRequestContext = new TokenRequestContext(scopes); + AccessToken accessToken = await TestEnvironment.Credential.GetTokenAsync(tokenRequestContext, CancellationToken.None); + return accessToken.Token; } public string CreateRandomDirectory(string parentPath, string directoryName = default) diff --git a/sdk/storage/Azure.Storage.Common/tests/Shared/StorageTestEnvironment.cs b/sdk/storage/Azure.Storage.Common/tests/Shared/StorageTestEnvironment.cs index db13300df437b..4716aaabe69d4 100644 --- a/sdk/storage/Azure.Storage.Common/tests/Shared/StorageTestEnvironment.cs +++ b/sdk/storage/Azure.Storage.Common/tests/Shared/StorageTestEnvironment.cs @@ -10,13 +10,5 @@ namespace Azure.Storage.Test.Shared { public class StorageTestEnvironment : TestEnvironment { - protected TokenCredential GetOAuthCredential(TenantConfiguration tenantConfiguration) - { - return new ClientSecretCredential( - tenantConfiguration.ActiveDirectoryTenantId, - tenantConfiguration.ActiveDirectoryApplicationId, - tenantConfiguration.ActiveDirectoryApplicationSecret, - new TokenCredentialOptions() { AuthorityHost = new Uri(tenantConfiguration.ActiveDirectoryAuthEndpoint) }); - } } } diff --git a/sdk/storage/Azure.Storage.Common/tests/Shared/TenantConfiguration.cs b/sdk/storage/Azure.Storage.Common/tests/Shared/TenantConfiguration.cs index c7869136511a7..63ccb445a1f42 100644 --- a/sdk/storage/Azure.Storage.Common/tests/Shared/TenantConfiguration.cs +++ b/sdk/storage/Azure.Storage.Common/tests/Shared/TenantConfiguration.cs @@ -41,10 +41,6 @@ static TenantConfiguration() public string FileServiceSecondaryEndpoint { get; private set; } public string QueueServiceSecondaryEndpoint { get; private set; } public string TableServiceSecondaryEndpoint { get; private set; } - public string ActiveDirectoryApplicationId { get; private set; } - public string ActiveDirectoryApplicationSecret { get; private set; } - public string ActiveDirectoryTenantId { get; private set; } - public string ActiveDirectoryAuthEndpoint { get; private set; } public TenantType TenantType { get; private set; } public string ConnectionString { get; private set; } public string EncryptionScope { get; private set; } @@ -103,12 +99,6 @@ public static string Serialize(TenantConfiguration config, bool sanitize = true) config.FileServiceSecondaryEndpoint, config.QueueServiceSecondaryEndpoint, config.TableServiceSecondaryEndpoint, - config.ActiveDirectoryApplicationId, - !sanitize ? - config.ActiveDirectoryApplicationSecret : - SanitizeValue, - config.ActiveDirectoryTenantId, - config.ActiveDirectoryAuthEndpoint, config.TenantType.ToString(), !sanitize ? config.ConnectionString : @@ -158,15 +148,11 @@ public static TenantConfiguration Parse(string text) FileServiceSecondaryEndpoint = values[12], QueueServiceSecondaryEndpoint = values[13], TableServiceSecondaryEndpoint = values[14], - ActiveDirectoryApplicationId = values[15], - ActiveDirectoryApplicationSecret = values[16], - ActiveDirectoryTenantId = values[17], - ActiveDirectoryAuthEndpoint = values[18], - TenantType = ParseTenantType(values[19]), - ConnectionString = values[20], - EncryptionScope = values[21], - ResourceGroupName = values[22], - SubscriptionId = values[23] + TenantType = ParseTenantType(values[15]), + ConnectionString = values[16], + EncryptionScope = values[17], + ResourceGroupName = values[18], + SubscriptionId = values[19] }; } @@ -197,10 +183,6 @@ public static TenantConfiguration Parse(XElement tenant) FileSecurePortOverride = Get("FileSecurePortOverride"), QueueSecurePortOverride = Get("QueueSecurePortOverride"), TableSecurePortOverride = Get("TableSecurePortOverride"), - ActiveDirectoryApplicationId = Get("ActiveDirectoryApplicationId"), - ActiveDirectoryApplicationSecret = Get("ActiveDirectoryApplicationSecret"), - ActiveDirectoryTenantId = Get("ActiveDirectoryTenantId"), - ActiveDirectoryAuthEndpoint = Get("ActiveDirectoryAuthEndpoint"), ConnectionString = Get("ConnectionString"), EncryptionScope = Get("EncryptionScope"), ResourceGroupName = Get("ResourceGroupName"), diff --git a/sdk/storage/Azure.Storage.Common/tests/Shared/TenantConfigurationBuilder.cs b/sdk/storage/Azure.Storage.Common/tests/Shared/TenantConfigurationBuilder.cs index 28fe3b221d9a9..4febb10d98b0d 100644 --- a/sdk/storage/Azure.Storage.Common/tests/Shared/TenantConfigurationBuilder.cs +++ b/sdk/storage/Azure.Storage.Common/tests/Shared/TenantConfigurationBuilder.cs @@ -134,25 +134,6 @@ public StorageSharedKeyCredential GetNewHnsSharedKeyCredentials() TestConfigHierarchicalNamespace.AccountName, TestConfigHierarchicalNamespace.AccountKey); - public TokenCredential GetOAuthCredential() => - GetOAuthCredential(TestConfigOAuth); - - public TokenCredential GetOAuthCredential(TenantConfiguration config) => - GetOAuthCredential( - config.ActiveDirectoryTenantId, - config.ActiveDirectoryApplicationId, - config.ActiveDirectoryApplicationSecret, - new Uri(config.ActiveDirectoryAuthEndpoint)); - - public TokenCredential GetOAuthCredential(string tenantId, string appId, string secret, Uri authorityHost) => - Mode == RecordedTestMode.Playback ? - (TokenCredential)new StorageTestTokenCredential() : - new ClientSecretCredential( - tenantId, - appId, - secret, - new TokenCredentialOptions() { AuthorityHost = authorityHost }); - /// /// Get or create a test configuration tenant to use with our tests. /// diff --git a/sdk/storage/Azure.Storage.Common/tests/Shared/TestConfigurationsTemplate.xml b/sdk/storage/Azure.Storage.Common/tests/Shared/TestConfigurationsTemplate.xml index 46814daace44a..39fb972fb4efd 100644 --- a/sdk/storage/Azure.Storage.Common/tests/Shared/TestConfigurationsTemplate.xml +++ b/sdk/storage/Azure.Storage.Common/tests/Shared/TestConfigurationsTemplate.xml @@ -13,181 +13,166 @@ - + ProductionTenant Cloud - [ACCOUNT] - [ACCOUNT-KEY] - http://[ACCOUNT].blob.core.windows.net - http://[ACCOUNT].queue.core.windows.net - http://[ACCOUNT].table.core.windows.net - http://[ACCOUNT].file.core.windows.net - http://[ACCOUNT]-secondary.blob.core.windows.net - http://[ACCOUNT]-secondary.queue.core.windows.net - http://[ACCOUNT]-secondary.file.core.windows.net - http://[ACCOUNT]-secondary.table.core.windows.net - DefaultEndpointsProtocol=https;AccountName=[ACCOUNT];AccountKey=[ACCOUNT-KEY];EndpointSuffix=core.windows.net - [encryption scope] + ACCOUNT + ACCOUNT-KEY + http://ACCOUNT.blob.core.windows.net + http://ACCOUNT.queue.core.windows.net + http://ACCOUNT.table.core.windows.net + http://ACCOUNT.file.core.windows.net + http://ACCOUNT-secondary.blob.core.windows.net + http://ACCOUNT-secondary.queue.core.windows.net + http://ACCOUNT-secondary.file.core.windows.net + http://ACCOUNT-secondary.table.core.windows.net + DefaultEndpointsProtocol=https;AccountName=ACCOUNT;AccountKey=ACCOUNT-KEY;EndpointSuffix=core.windows.net + encryption scope - + SecondaryTenant Cloud - [RAGRS-ACCOUNT] - [RAGRS-ACCOUNT-KEY] - http://[RAGRS-ACCOUNT].blob.core.windows.net - http://[RAGRS-ACCOUNT].queue.core.windows.net - http://[RAGRS-ACCOUNT].table.core.windows.net - http://[RAGRS-ACCOUNT].file.core.windows.net - http://[RAGRS-ACCOUNT]-secondary.blob.core.windows.net - http://[RAGRS-ACCOUNT]-secondary.queue.core.windows.net - http://[RAGRS-ACCOUNT]-secondary.file.core.windows.net - http://[RAGRS-ACCOUNT]-secondary.table.core.windows.net + RAGRS-ACCOUNT + RAGRS-ACCOUNT-KEY + http://RAGRS-ACCOUNT.blob.core.windows.net + http://RAGRS-ACCOUNT.queue.core.windows.net + http://RAGRS-ACCOUNT.table.core.windows.net + http://RAGRS-ACCOUNT.file.core.windows.net + http://RAGRS-ACCOUNT-secondary.blob.core.windows.net + http://RAGRS-ACCOUNT-secondary.queue.core.windows.net + http://RAGRS-ACCOUNT-secondary.file.core.windows.net + http://RAGRS-ACCOUNT-secondary.table.core.windows.net - + OAuthTenant Cloud - [OAUTH-ACCOUNT] - [OAUTH-ACCOUNT-KEY] - [OAUTH-RESOURCE-GROUP-NAME] - [OAUTH-SUBSCRIPTION-ID] + OAUTH-ACCOUNT + OAUTH-ACCOUNT-KEY + OAUTH-RESOURCE-GROUP-NAME + OAUTH-SUBSCRIPTION-ID - [ActiveDirectoryApplicationId] - [ActiveDirectoryApplicationSecret] - [ActiveDirectoryTenantId] - https://login.microsoftonline.com/ - - http://[OAUTH-ACCOUNT].blob.core.windows.net - http://[OAUTH-ACCOUNT].queue.core.windows.net - http://[OAUTH-ACCOUNT].table.core.windows.net - http://[OAUTH-ACCOUNT].file.core.windows.net - http://[OAUTH-ACCOUNT]-secondary.blob.core.windows.net - http://[OAUTH-ACCOUNT]-secondary.queue.core.windows.net - http://[OAUTH-ACCOUNT]-secondary.file.core.windows.net - http://[OAUTH-ACCOUNT]-secondary.table.core.windows.net + http://OAUTH-ACCOUNT.blob.core.windows.net + http://OAUTH-ACCOUNT.queue.core.windows.net + http://OAUTH-ACCOUNT.table.core.windows.net + http://OAUTH-ACCOUNT.file.core.windows.net + http://OAUTH-ACCOUNT-secondary.blob.core.windows.net + http://OAUTH-ACCOUNT-secondary.queue.core.windows.net + http://OAUTH-ACCOUNT-secondary.file.core.windows.net + http://OAUTH-ACCOUNT-secondary.table.core.windows.net - + PremiumBlobTenant Cloud - [PREMIUM-ACCOUNT] - [PREMIUM-ACCOUNT-KEY] - http://[PREMIUM-ACCOUNT].blob.core.windows.net - http://[PREMIUM-ACCOUNT].queue.core.windows.net - http://[PREMIUM-ACCOUNT].table.core.windows.net - http://[PREMIUM-ACCOUNT].file.core.windows.net - http://[PREMIUM-ACCOUNT]-secondary.blob.core.windows.net - http://[PREMIUM-ACCOUNT]-secondary.queue.core.windows.net - http://[PREMIUM-ACCOUNT]-secondary.file.core.windows.net - http://[PREMIUM-ACCOUNT]-secondary.table.core.windows.net + PREMIUM-ACCOUNT + PREMIUM-ACCOUNT-KEY + http://PREMIUM-ACCOUNT.blob.core.windows.net + http://PREMIUM-ACCOUNT.queue.core.windows.net + http://PREMIUM-ACCOUNT.table.core.windows.net + http://PREMIUM-ACCOUNT.file.core.windows.net + http://PREMIUM-ACCOUNT-secondary.blob.core.windows.net + http://PREMIUM-ACCOUNT-secondary.queue.core.windows.net + http://PREMIUM-ACCOUNT-secondary.file.core.windows.net + http://PREMIUM-ACCOUNT-secondary.table.core.windows.net - + NamespaceTenant Cloud - [NAMESPACE-ACCOUNT] - [NAMESPACE-ACCOUNT-KEY] + NAMESPACE-ACCOUNT + NAMESPACE-ACCOUNT-KEY - [ActiveDirectoryApplicationId] - [ActiveDirectoryApplicationSecret] - [ActiveDirectoryTenantId] - https://login.microsoftonline.com/ - - http://[NAMESPACE-ACCOUNT].blob.core.windows.net - http://[NAMESPACE-ACCOUNT].queue.core.windows.net - http://[NAMESPACE-ACCOUNT].table.core.windows.net - http://[NAMESPACE-ACCOUNT].file.core.windows.net - http://[NAMESPACE-ACCOUNT]-secondary.blob.core.windows.net - http://[NAMESPACE-ACCOUNT]-secondary.queue.core.windows.net - http://[NAMESPACE-ACCOUNT]-secondary.file.core.windows.net - http://[NAMESPACE-ACCOUNT]-secondary.table.core.windows.net + http://NAMESPACE-ACCOUNT.blob.core.windows.net + http://NAMESPACE-ACCOUNT.queue.core.windows.net + http://NAMESPACE-ACCOUNT.table.core.windows.net + http://NAMESPACE-ACCOUNT.file.core.windows.net + http://NAMESPACE-ACCOUNT-secondary.blob.core.windows.net + http://NAMESPACE-ACCOUNT-secondary.queue.core.windows.net + http://NAMESPACE-ACCOUNT-secondary.file.core.windows.net + http://NAMESPACE-ACCOUNT-secondary.table.core.windows.net + DefaultEndpointsProtocol=https;AccountName=ACCOUNT;AccountKey=ACCOUNT-KEY;EndpointSuffix=core.windows.net + encryption scope - + ManagedDiskTenant Cloud - [ACCOUNT] - [ACCOUNT-KEY] + ACCOUNT + ACCOUNT-KEY - http://[ACCOUNT].blob.core.windows.net - http://[ACCOUNT].queue.core.windows.net - http://[ACCOUNT].table.core.windows.net - http://[ACCOUNT].file.core.windows.net - http://[ACCOUNT]-secondary.blob.core.windows.net - http://[ACCOUNT]-secondary.queue.core.windows.net - http://[ACCOUNT]-secondary.file.core.windows.net - http://[ACCOUNT]-secondary.table.core.windows.net + http://ACCOUNT.blob.core.windows.net + http://ACCOUNT.queue.core.windows.net + http://ACCOUNT.table.core.windows.net + http://ACCOUNT.file.core.windows.net + http://ACCOUNT-secondary.blob.core.windows.net + http://ACCOUNT-secondary.queue.core.windows.net + http://ACCOUNT-secondary.file.core.windows.net + http://ACCOUNT-secondary.table.core.windows.net - + SoftDeleteTenant Cloud - [ACCOUNT] - [ACCOUNT-KEY] + ACCOUNT + ACCOUNT-KEY - http://[ACCOUNT].blob.core.windows.net - http://[ACCOUNT].queue.core.windows.net - http://[ACCOUNT].table.core.windows.net - http://[ACCOUNT].file.core.windows.net - http://[ACCOUNT]-secondary.blob.core.windows.net - http://[ACCOUNT]-secondary.queue.core.windows.net - http://[ACCOUNT]-secondary.file.core.windows.net - http://[ACCOUNT]-secondary.table.core.windows.net + http://ACCOUNT.blob.core.windows.net + http://ACCOUNT.queue.core.windows.net + http://ACCOUNT.table.core.windows.net + http://ACCOUNT.file.core.windows.net + http://ACCOUNT-secondary.blob.core.windows.net + http://ACCOUNT-secondary.queue.core.windows.net + http://ACCOUNT-secondary.file.core.windows.net + http://ACCOUNT-secondary.table.core.windows.net - + PremiumFileTenant Cloud - [ACCOUNT] - [ACCOUNT-KEY] + ACCOUNT + ACCOUNT-KEY - http://[ACCOUNT].blob.core.windows.net - http://[ACCOUNT].queue.core.windows.net - http://[ACCOUNT].table.core.windows.net - http://[ACCOUNT].file.core.windows.net - http://[ACCOUNT]-secondary.blob.core.windows.net - http://[ACCOUNT]-secondary.queue.core.windows.net - http://[ACCOUNT]-secondary.file.core.windows.net - http://[ACCOUNT]-secondary.table.core.windows.net + http://ACCOUNT.blob.core.windows.net + http://ACCOUNT.queue.core.windows.net + http://ACCOUNT.table.core.windows.net + http://ACCOUNT.file.core.windows.net + http://ACCOUNT-secondary.blob.core.windows.net + http://ACCOUNT-secondary.queue.core.windows.net + http://ACCOUNT-secondary.file.core.windows.net + http://ACCOUNT-secondary.table.core.windows.net ClientsideEncryptionKeyvault - https://[KEYVAULT NAME].vault.azure.net/ - [ActiveDirectoryApplicationId] - [ActiveDirectoryTenantId] - [ActiveDirectoryApplicationSecret] - https://login.microsoftonline.com/ + https://KEYVAULT NAME.vault.azure.net/ DefaultManagedDisk - [DISK NAME PREFIX] - [RESOURECE GROUP NAME] - [SubscriptionId] - [Location] - [ActiveDirectoryApplicationId] - [ActiveDirectoryApplicationSecret] - [ActiveDirectoryTenantId] + DISK NAME PREFIX + RESOURCE GROUP NAME + SubscriptionId + Location diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/assets.json b/sdk/storage/Azure.Storage.DataMovement.Blobs/assets.json index dd04f26a79a05..145d6241cb6a4 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/assets.json +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/storage/Azure.Storage.DataMovement.Blobs", - "Tag": "net/storage/Azure.Storage.DataMovement.Blobs_db329f90cd" + "Tag": "net/storage/Azure.Storage.DataMovement.Blobs_602492e0c7" } diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/ClientBuilderExtensions.cs b/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/ClientBuilderExtensions.cs index 4e5c1d03ac65c..9972cb30afe75 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/ClientBuilderExtensions.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/ClientBuilderExtensions.cs @@ -51,7 +51,7 @@ public static async Task GetTestContainerAsync( if (publicAccessType == default) { - publicAccessType = premium ? PublicAccessType.None : PublicAccessType.BlobContainer; + publicAccessType = PublicAccessType.None; } BlobContainerClient container = clientBuilder.AzureCoreRecordedTestBase.InstrumentClient(service.GetBlobContainerClient(containerName)); diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/AppendBlobDirectoryToShareDirectoryTests.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/AppendBlobDirectoryToShareDirectoryTests.cs index 48309e94ce832..9b967aba6fe3b 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/AppendBlobDirectoryToShareDirectoryTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/AppendBlobDirectoryToShareDirectoryTests.cs @@ -147,14 +147,14 @@ protected override ShareClient GetOAuthDestinationContainerClient(string contain { ShareClientOptions options = DestinationClientBuilder.GetOptions(); options.ShareTokenIntent = ShareTokenIntent.Backup; - ShareServiceClient oauthService = DestinationClientBuilder.GetServiceClientFromOauthConfig(Tenants.TestConfigOAuth, options); + ShareServiceClient oauthService = DestinationClientBuilder.GetServiceClientFromOauthConfig(Tenants.TestConfigOAuth, TestEnvironment.Credential, options); return oauthService.GetShareClient(containerName); } protected override BlobContainerClient GetOAuthSourceContainerClient(string containerName) { BlobClientOptions options = SourceClientBuilder.GetOptions(); - BlobServiceClient oauthService = SourceClientBuilder.GetServiceClientFromOauthConfig(Tenants.TestConfigOAuth, options); + BlobServiceClient oauthService = SourceClientBuilder.GetServiceClientFromOauthConfig(Tenants.TestConfigOAuth, TestEnvironment.Credential, options); return oauthService.GetBlobContainerClient(containerName); } diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/BlockBlobDirectoryToShareDirectoryTests.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/BlockBlobDirectoryToShareDirectoryTests.cs index d3a3c8a3aee1f..cea5ea959beb8 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/BlockBlobDirectoryToShareDirectoryTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/BlockBlobDirectoryToShareDirectoryTests.cs @@ -127,14 +127,14 @@ protected override ShareClient GetOAuthDestinationContainerClient(string contain { ShareClientOptions options = DestinationClientBuilder.GetOptions(); options.ShareTokenIntent = ShareTokenIntent.Backup; - ShareServiceClient oauthService = DestinationClientBuilder.GetServiceClientFromOauthConfig(Tenants.TestConfigOAuth, options); + ShareServiceClient oauthService = DestinationClientBuilder.GetServiceClientFromOauthConfig(Tenants.TestConfigOAuth, TestEnvironment.Credential, options); return oauthService.GetShareClient(containerName); } protected override BlobContainerClient GetOAuthSourceContainerClient(string containerName) { BlobClientOptions options = SourceClientBuilder.GetOptions(); - BlobServiceClient oauthService = SourceClientBuilder.GetServiceClientFromOauthConfig(Tenants.TestConfigOAuth, options); + BlobServiceClient oauthService = SourceClientBuilder.GetServiceClientFromOauthConfig(Tenants.TestConfigOAuth, TestEnvironment.Credential, options); return oauthService.GetBlobContainerClient(containerName); } diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/ClientBuilderExtensions.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/ClientBuilderExtensions.cs index b1a2658271e52..2dbeb72fb9a96 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/ClientBuilderExtensions.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/ClientBuilderExtensions.cs @@ -19,6 +19,7 @@ using Azure.Storage.Files.Shares.Models; using Azure.Storage.Blobs; using Azure.Storage.Blobs.Models; +using Azure.Core; namespace Azure.Storage.DataMovement.Blobs.Files.Shares.Tests { @@ -68,11 +69,11 @@ public static ShareServiceClient GetServiceClient_OAuthAccount_SharedKey(this Sh clientBuilder.GetServiceClientFromSharedKeyConfig(clientBuilder.Tenants.TestConfigOAuth); public static ShareServiceClient GetServiceClient_OAuth( - this SharesClientBuilder clientBuilder, ShareClientOptions options = default) + this SharesClientBuilder clientBuilder, TokenCredential tokenCredential, ShareClientOptions options = default) { options ??= clientBuilder.GetOptions(); options.ShareTokenIntent = ShareTokenIntent.Backup; - return clientBuilder.GetServiceClientFromOauthConfig(clientBuilder.Tenants.TestConfigOAuth, options); + return clientBuilder.GetServiceClientFromOauthConfig(clientBuilder.Tenants.TestConfigOAuth, tokenCredential, options); } public static async Task GetTestShareAsync( @@ -102,7 +103,7 @@ public static async Task GetTestContainerAsync( if (publicAccessType == default) { - publicAccessType = premium ? PublicAccessType.None : PublicAccessType.BlobContainer; + publicAccessType = PublicAccessType.None; } BlobContainerClient container = clientBuilder.AzureCoreRecordedTestBase.InstrumentClient(service.GetBlobContainerClient(containerName)); diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/PageBlobDirectoryToShareDirectoryTests.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/PageBlobDirectoryToShareDirectoryTests.cs index 2c36c15dbc01d..176f5d84b1f2c 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/PageBlobDirectoryToShareDirectoryTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/PageBlobDirectoryToShareDirectoryTests.cs @@ -147,14 +147,14 @@ protected override ShareClient GetOAuthDestinationContainerClient(string contain { ShareClientOptions options = DestinationClientBuilder.GetOptions(); options.ShareTokenIntent = ShareTokenIntent.Backup; - ShareServiceClient oauthService = DestinationClientBuilder.GetServiceClientFromOauthConfig(Tenants.TestConfigOAuth, options); + ShareServiceClient oauthService = DestinationClientBuilder.GetServiceClientFromOauthConfig(Tenants.TestConfigOAuth, TestEnvironment.Credential, options); return oauthService.GetShareClient(containerName); } protected override BlobContainerClient GetOAuthSourceContainerClient(string containerName) { BlobClientOptions options = SourceClientBuilder.GetOptions(); - BlobServiceClient oauthService = SourceClientBuilder.GetServiceClientFromOauthConfig(Tenants.TestConfigOAuth, options); + BlobServiceClient oauthService = SourceClientBuilder.GetServiceClientFromOauthConfig(Tenants.TestConfigOAuth, TestEnvironment.Credential, options); return oauthService.GetBlobContainerClient(containerName); } diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/ShareDirectoryToAppendBlobDirectoryTests.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/ShareDirectoryToAppendBlobDirectoryTests.cs index 72be0ae1d09a8..67e396d03a38f 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/ShareDirectoryToAppendBlobDirectoryTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/ShareDirectoryToAppendBlobDirectoryTests.cs @@ -145,7 +145,7 @@ protected override StorageResourceContainer GetDestinationStorageResourceContain protected override BlobContainerClient GetOAuthDestinationContainerClient(string containerName) { BlobClientOptions options = DestinationClientBuilder.GetOptions(); - BlobServiceClient oauthService = DestinationClientBuilder.GetServiceClientFromOauthConfig(Tenants.TestConfigOAuth, options); + BlobServiceClient oauthService = DestinationClientBuilder.GetServiceClientFromOauthConfig(Tenants.TestConfigOAuth, TestEnvironment.Credential, options); return oauthService.GetBlobContainerClient(containerName); } @@ -153,7 +153,7 @@ protected override ShareClient GetOAuthSourceContainerClient(string containerNam { ShareClientOptions options = SourceClientBuilder.GetOptions(); options.ShareTokenIntent = ShareTokenIntent.Backup; - ShareServiceClient oauthService = SourceClientBuilder.GetServiceClientFromOauthConfig(Tenants.TestConfigOAuth, options); + ShareServiceClient oauthService = SourceClientBuilder.GetServiceClientFromOauthConfig(Tenants.TestConfigOAuth, TestEnvironment.Credential, options); return oauthService.GetShareClient(containerName); } diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/ShareDirectoryToBlockBlobDirectoryTests.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/ShareDirectoryToBlockBlobDirectoryTests.cs index 062448ba27a3b..fbc64029f46af 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/ShareDirectoryToBlockBlobDirectoryTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/ShareDirectoryToBlockBlobDirectoryTests.cs @@ -126,7 +126,7 @@ protected override StorageResourceContainer GetDestinationStorageResourceContain protected override BlobContainerClient GetOAuthDestinationContainerClient(string containerName) { BlobClientOptions options = DestinationClientBuilder.GetOptions(); - BlobServiceClient oauthService = DestinationClientBuilder.GetServiceClientFromOauthConfig(Tenants.TestConfigOAuth, options); + BlobServiceClient oauthService = DestinationClientBuilder.GetServiceClientFromOauthConfig(Tenants.TestConfigOAuth, TestEnvironment.Credential, options); return oauthService.GetBlobContainerClient(containerName); } @@ -134,7 +134,7 @@ protected override ShareClient GetOAuthSourceContainerClient(string containerNam { ShareClientOptions options = SourceClientBuilder.GetOptions(); options.ShareTokenIntent = ShareTokenIntent.Backup; - ShareServiceClient oauthService = SourceClientBuilder.GetServiceClientFromOauthConfig(Tenants.TestConfigOAuth, options); + ShareServiceClient oauthService = SourceClientBuilder.GetServiceClientFromOauthConfig(Tenants.TestConfigOAuth, TestEnvironment.Credential, options); return oauthService.GetShareClient(containerName); } diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/ShareDirectoryToPageBlobDirectoryTests.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/ShareDirectoryToPageBlobDirectoryTests.cs index fdad2d1fb9ab6..9e4b04a777d11 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/ShareDirectoryToPageBlobDirectoryTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/BlobToFileSharesTests/ShareDirectoryToPageBlobDirectoryTests.cs @@ -146,7 +146,7 @@ protected override StorageResourceContainer GetDestinationStorageResourceContain protected override BlobContainerClient GetOAuthDestinationContainerClient(string containerName) { BlobClientOptions options = DestinationClientBuilder.GetOptions(); - BlobServiceClient oauthService = DestinationClientBuilder.GetServiceClientFromOauthConfig(Tenants.TestConfigOAuth, options); + BlobServiceClient oauthService = DestinationClientBuilder.GetServiceClientFromOauthConfig(Tenants.TestConfigOAuth, TestEnvironment.Credential, options); return oauthService.GetBlobContainerClient(containerName); } @@ -154,7 +154,7 @@ protected override ShareClient GetOAuthSourceContainerClient(string containerNam { ShareClientOptions options = SourceClientBuilder.GetOptions(); options.ShareTokenIntent = ShareTokenIntent.Backup; - ShareServiceClient oauthService = SourceClientBuilder.GetServiceClientFromOauthConfig(Tenants.TestConfigOAuth, options); + ShareServiceClient oauthService = SourceClientBuilder.GetServiceClientFromOauthConfig(Tenants.TestConfigOAuth, TestEnvironment.Credential,options); return oauthService.GetShareClient(containerName); } diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/assets.json b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/assets.json index 75adfb17d6cb4..1004d17f25436 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/assets.json +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/storage/Azure.Storage.DataMovement.Files.Shares", - "Tag": "net/storage/Azure.Storage.DataMovement.Files.Shares_e86fda7f54" + "Tag": "net/storage/Azure.Storage.DataMovement.Files.Shares_feb44d2daa" } diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareDirectoryStartTransferCopyTests.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareDirectoryStartTransferCopyTests.cs index 76aea7538f6ed..077b01f442e86 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareDirectoryStartTransferCopyTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareDirectoryStartTransferCopyTests.cs @@ -96,7 +96,7 @@ protected override ShareClient GetOAuthSourceContainerClient(string containerNam { ShareClientOptions options = SourceClientBuilder.GetOptions(); options.ShareTokenIntent = ShareTokenIntent.Backup; - ShareServiceClient oauthService = SourceClientBuilder.GetServiceClientFromOauthConfig(Tenants.TestConfigOAuth, options); + ShareServiceClient oauthService = SourceClientBuilder.GetServiceClientFromOauthConfig(Tenants.TestConfigOAuth, TestEnvironment.Credential, options); return oauthService.GetShareClient(containerName); } @@ -104,7 +104,7 @@ protected override ShareClient GetOAuthDestinationContainerClient(string contain { ShareClientOptions options = DestinationClientBuilder.GetOptions(); options.ShareTokenIntent = ShareTokenIntent.Backup; - ShareServiceClient oauthService = DestinationClientBuilder.GetServiceClientFromOauthConfig(Tenants.TestConfigOAuth, options); + ShareServiceClient oauthService = DestinationClientBuilder.GetServiceClientFromOauthConfig(Tenants.TestConfigOAuth, TestEnvironment.Credential, options); return oauthService.GetShareClient(containerName); } diff --git a/sdk/storage/Azure.Storage.DataMovement/assets.json b/sdk/storage/Azure.Storage.DataMovement/assets.json index e5124384f8fae..36fd6c0dffcfb 100644 --- a/sdk/storage/Azure.Storage.DataMovement/assets.json +++ b/sdk/storage/Azure.Storage.DataMovement/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/storage/Azure.Storage.DataMovement", - "Tag": "net/storage/Azure.Storage.DataMovement_1fa7086be2" + "Tag": "net/storage/Azure.Storage.DataMovement_03db2933f4" } diff --git a/sdk/storage/Azure.Storage.DataMovement/tests/AppendBlobStorageResourceTests.cs b/sdk/storage/Azure.Storage.DataMovement/tests/AppendBlobStorageResourceTests.cs index 79c00a92e73b8..435bdf83267ac 100644 --- a/sdk/storage/Azure.Storage.DataMovement/tests/AppendBlobStorageResourceTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement/tests/AppendBlobStorageResourceTests.cs @@ -16,6 +16,7 @@ using Azure.Storage.Blobs.Specialized; using Azure.Storage.Blobs.Tests; using Azure.Storage.DataMovement.Tests; +using Azure.Storage.Sas; using Azure.Storage.Test; using DMBlobs::Azure.Storage.DataMovement.Blobs; using Moq; @@ -532,7 +533,7 @@ await destinationResource.CopyFromStreamInternalAsync( public async Task CopyFromUriAsync() { // Arrange - await using DisposingContainer testContainer = await GetTestContainerAsync(publicAccessType: PublicAccessType.BlobContainer); + await using DisposingContainer testContainer = await GetTestContainerAsync(); AppendBlobClient sourceClient = testContainer.Container.GetAppendBlobClient(GetNewBlobName()); AppendBlobClient destinationClient = testContainer.Container.GetAppendBlobClient(GetNewBlobName()); @@ -544,6 +545,10 @@ public async Task CopyFromUriAsync() await sourceClient.AppendBlockAsync(stream); } + sourceClient = InstrumentClient(new AppendBlobClient( + sourceClient.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), + GetOptions())); + AppendBlobStorageResource sourceResource = new AppendBlobStorageResource(sourceClient); AppendBlobStorageResource destinationResource = new AppendBlobStorageResource(destinationClient); @@ -561,7 +566,7 @@ public async Task CopyFromUriAsync() public async Task CopyFromUriAsync_OAuth() { // Arrange - BlobServiceClient serviceClient = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient serviceClient = GetServiceClient_OAuth(); await using DisposingContainer test = await GetTestContainerAsync( service: serviceClient, publicAccessType: PublicAccessType.None); @@ -605,7 +610,7 @@ await destinationResource.CopyFromUriAsync( public async Task CopyFromUriAsync_HttpAuthorization() { // Arrange - BlobServiceClient serviceClient = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient serviceClient = GetServiceClient_OAuth(); await using DisposingContainer test = await GetTestContainerAsync( service: serviceClient, publicAccessType: PublicAccessType.None); @@ -943,7 +948,7 @@ await destinationResource.CopyFromUriInternalAsync( public async Task CopyFromUriAsync_Error() { // Arrange - await using DisposingContainer testContainer = await GetTestContainerAsync(publicAccessType: PublicAccessType.BlobContainer); + await using DisposingContainer testContainer = await GetTestContainerAsync(); AppendBlobClient sourceClient = testContainer.Container.GetAppendBlobClient(GetNewBlobName()); AppendBlobClient destinationClient = testContainer.Container.GetAppendBlobClient(GetNewBlobName()); @@ -956,7 +961,7 @@ await TestHelper.AssertExpectedExceptionAsync( destinationResource.CopyFromUriAsync(sourceResource: sourceResource, overwrite:false, completeLength: length), e => { - Assert.IsTrue(e.Status == (int)HttpStatusCode.NotFound); + Assert.IsTrue(e.Status == (int)HttpStatusCode.Unauthorized); }); } @@ -964,7 +969,7 @@ await TestHelper.AssertExpectedExceptionAsync( public async Task CopyBlockFromUriAsync() { // Arrange - await using DisposingContainer testContainer = await GetTestContainerAsync(publicAccessType: PublicAccessType.BlobContainer); + await using DisposingContainer testContainer = await GetTestContainerAsync(); AppendBlobClient sourceClient = testContainer.Container.GetAppendBlobClient(GetNewBlobName()); await sourceClient.CreateIfNotExistsAsync(); AppendBlobClient destinationClient = testContainer.Container.GetAppendBlobClient(GetNewBlobName()); @@ -977,6 +982,9 @@ public async Task CopyBlockFromUriAsync() await sourceClient.AppendBlockAsync(stream); } + sourceClient = InstrumentClient(new AppendBlobClient( + sourceClient.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), + GetOptions())); AppendBlobStorageResource sourceResource = new AppendBlobStorageResource(sourceClient); AppendBlobStorageResource destinationResource = new AppendBlobStorageResource(destinationClient); @@ -1002,7 +1010,7 @@ await destinationResource.CopyBlockFromUriAsync( public async Task CopyBlockFromUriAsync_OAuth() { // Arrange - BlobServiceClient serviceClient = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient serviceClient = GetServiceClient_OAuth(); await using DisposingContainer test = await GetTestContainerAsync( service: serviceClient, publicAccessType: PublicAccessType.None); @@ -1067,7 +1075,7 @@ public async Task CopyBlockFromUriAsync_OAuth_Token() AppendBlobStorageResource destinationResource = new AppendBlobStorageResource(destinationClient); // Convert TokenCredential to HttpAuthorization - TokenCredential tokenCredential = Tenants.GetOAuthCredential(); + TokenCredential tokenCredential = TestEnvironment.Credential; string[] scopes = new string[] { "https://storage.azure.com/.default" }; AccessToken accessToken = await tokenCredential.GetTokenAsync(new TokenRequestContext(scopes), CancellationToken.None); StorageResourceCopyFromUriOptions options = new StorageResourceCopyFromUriOptions() @@ -1099,7 +1107,7 @@ await destinationResource.CopyBlockFromUriAsync( public async Task CopyBlockFromUriAsync_HttpAuthorization() { // Arrange - BlobServiceClient serviceClient = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient serviceClient = GetServiceClient_OAuth(); await using DisposingContainer test = await GetTestContainerAsync( service: serviceClient, publicAccessType: PublicAccessType.None); @@ -1447,7 +1455,7 @@ await destinationResource.CopyBlockFromUriInternalAsync( public async Task CopyBlockFromUriAsync_Error() { // Arrange - await using DisposingContainer testContainer = await GetTestContainerAsync(publicAccessType: PublicAccessType.BlobContainer); + await using DisposingContainer testContainer = await GetTestContainerAsync(); AppendBlobClient sourceClient = testContainer.Container.GetAppendBlobClient(GetNewBlobName()); AppendBlobClient destinationClient = testContainer.Container.GetAppendBlobClient(GetNewBlobName()); @@ -1679,7 +1687,7 @@ public async Task GetCopyAuthorizationHeaderAsync_OAuth() { // Arrange var containerName = GetNewContainerName(); - BlobServiceClient service = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient service = GetServiceClient_OAuth(); await using DisposingContainer testContainer = await GetTestContainerAsync( service, containerName, diff --git a/sdk/storage/Azure.Storage.DataMovement/tests/BlockBlobStorageResourceTests.cs b/sdk/storage/Azure.Storage.DataMovement/tests/BlockBlobStorageResourceTests.cs index a91e7adb1dcab..f33d299deb0a4 100644 --- a/sdk/storage/Azure.Storage.DataMovement/tests/BlockBlobStorageResourceTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement/tests/BlockBlobStorageResourceTests.cs @@ -15,6 +15,7 @@ using Azure.Storage.Blobs.Specialized; using Azure.Storage.Blobs.Tests; using Azure.Storage.DataMovement.Tests; +using Azure.Storage.Sas; using Azure.Storage.Test; using DMBlobs::Azure.Storage.DataMovement.Blobs; using Microsoft.CodeAnalysis; @@ -441,7 +442,7 @@ public async Task CopyFromStreamAsync_SetAccessTier() public async Task CopyFromUriAsync() { // Arrange - await using DisposingContainer testContainer = await GetTestContainerAsync(publicAccessType: PublicAccessType.BlobContainer); + await using DisposingContainer testContainer = await GetTestContainerAsync(); BlockBlobClient sourceClient = testContainer.Container.GetBlockBlobClient(GetNewBlobName()); BlockBlobClient destinationClient = testContainer.Container.GetBlockBlobClient(GetNewBlobName()); @@ -453,6 +454,10 @@ await sourceClient.UploadAsync( content: stream); } + sourceClient = InstrumentClient(new BlockBlobClient( + sourceClient.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), + GetOptions())); + BlockBlobStorageResource sourceResource = new BlockBlobStorageResource(sourceClient); BlockBlobStorageResource destinationResource = new BlockBlobStorageResource(destinationClient); @@ -470,7 +475,7 @@ await sourceClient.UploadAsync( public async Task CopyFromUriAsync_OAuth() { // Arrange - BlobServiceClient serviceClient = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient serviceClient = GetServiceClient_OAuth(); await using DisposingContainer test = await GetTestContainerAsync( service: serviceClient, publicAccessType: PublicAccessType.None); @@ -514,7 +519,7 @@ await destinationResource.CopyFromUriAsync( public async Task CopyFromUriAsync_HttpAuthorization() { // Arrange - BlobServiceClient serviceClient = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient serviceClient = GetServiceClient_OAuth(); await using DisposingContainer test = await GetTestContainerAsync( service: serviceClient, publicAccessType: PublicAccessType.None); @@ -556,7 +561,7 @@ await destinationResource.CopyFromUriAsync( public async Task CopyFromUriAsync_Error() { // Arrange - await using DisposingContainer testContainer = await GetTestContainerAsync(publicAccessType: PublicAccessType.BlobContainer); + await using DisposingContainer testContainer = await GetTestContainerAsync(); BlockBlobClient sourceClient = testContainer.Container.GetBlockBlobClient(GetNewBlobName()); BlockBlobClient destinationClient = testContainer.Container.GetBlockBlobClient(GetNewBlobName()); @@ -569,7 +574,7 @@ await TestHelper.AssertExpectedExceptionAsync( destinationResource.CopyFromUriAsync(sourceResource: sourceResource, overwrite: false, completeLength: length), e => { - Assert.IsTrue(e.Message.StartsWith("The specified blob does not exist.")); + Assert.IsTrue(e.Message.StartsWith("Server failed to authenticate the request. ")); }); } @@ -982,7 +987,7 @@ await destinationResource.CopyFromUriInternalAsync( public async Task CopyBlockFromUriAsync() { // Arrange - await using DisposingContainer testContainer = await GetTestContainerAsync(publicAccessType: PublicAccessType.BlobContainer); + await using DisposingContainer testContainer = await GetTestContainerAsync(); BlockBlobClient sourceClient = testContainer.Container.GetBlockBlobClient(GetNewBlobName()); BlockBlobClient destinationClient = testContainer.Container.GetBlockBlobClient(GetNewBlobName()); @@ -995,6 +1000,10 @@ await sourceClient.UploadAsync( content: stream); } + sourceClient = InstrumentClient(new BlockBlobClient( + sourceClient.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), + GetOptions())); + BlockBlobStorageResource sourceResource = new BlockBlobStorageResource(sourceClient); BlockBlobStorageResource destinationResource = new BlockBlobStorageResource(destinationClient); @@ -1083,7 +1092,7 @@ await sourceClient.UploadAsync( BlockBlobStorageResource destinationResource = new BlockBlobStorageResource(destinationClient); // Convert TokenCredential to HttpAuthorization - TokenCredential sourceBearerToken = Tenants.GetOAuthCredential(); + TokenCredential sourceBearerToken = TestEnvironment.Credential; string[] scopes = new string[] { "https://storage.azure.com/.default" }; AccessToken accessToken = await sourceBearerToken.GetTokenAsync(new TokenRequestContext(scopes), CancellationToken.None); StorageResourceCopyFromUriOptions options = new StorageResourceCopyFromUriOptions() @@ -1115,7 +1124,7 @@ await destinationResource.CopyBlockFromUriAsync( public async Task CopyBlockFromUriAsync_HttpAuthorization() { // Arrange - BlobServiceClient serviceClient = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient serviceClient = GetServiceClient_OAuth(); await using DisposingContainer test = await GetTestContainerAsync( service: serviceClient, publicAccessType: PublicAccessType.None); @@ -1162,7 +1171,7 @@ await destinationResource.CopyBlockFromUriAsync( public async Task CopyBlockFromUriAsync_Error() { // Arrange - await using DisposingContainer testContainer = await GetTestContainerAsync(publicAccessType: PublicAccessType.BlobContainer); + await using DisposingContainer testContainer = await GetTestContainerAsync(); BlockBlobClient sourceClient = testContainer.Container.GetBlockBlobClient(GetNewBlobName()); BlockBlobClient destinationClient = testContainer.Container.GetBlockBlobClient(GetNewBlobName()); @@ -1721,7 +1730,7 @@ public async Task GetCopyAuthorizationHeaderAsync_OAuth() { // Arrange var containerName = GetNewContainerName(); - BlobServiceClient service = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient service = GetServiceClient_OAuth(); await using DisposingContainer testContainer = await GetTestContainerAsync( service, containerName, diff --git a/sdk/storage/Azure.Storage.DataMovement/tests/ClientBuilderExtensions.cs b/sdk/storage/Azure.Storage.DataMovement/tests/ClientBuilderExtensions.cs index 9d1ae4a9521c8..fd236062c6775 100644 --- a/sdk/storage/Azure.Storage.DataMovement/tests/ClientBuilderExtensions.cs +++ b/sdk/storage/Azure.Storage.DataMovement/tests/ClientBuilderExtensions.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; +using Azure.Core; using Azure.Storage.Blobs; using Azure.Storage.Blobs.Tests; using Azure.Storage.Blobs.Models; @@ -57,8 +58,8 @@ public static BlobServiceClient GetServiceClient_PreviewAccount_SharedKey(this B public static BlobServiceClient GetServiceClient_PremiumBlobAccount_SharedKey(this BlobsClientBuilder clientBuilder) => clientBuilder.GetServiceClientFromSharedKeyConfig(clientBuilder.Tenants.TestConfigPremiumBlob); - public static BlobServiceClient GetServiceClient_OAuth(this BlobsClientBuilder clientBuilder) - => clientBuilder.GetServiceClientFromOauthConfig(clientBuilder.Tenants.TestConfigOAuth); + public static BlobServiceClient GetServiceClient_OAuth(this BlobsClientBuilder clientBuilder, TokenCredential tokenCredential) + => clientBuilder.GetServiceClientFromOauthConfig(clientBuilder.Tenants.TestConfigOAuth, tokenCredential); public static BlobServiceClient GetServiceClient_OAuthAccount_SharedKey(this BlobsClientBuilder clientBuilder) => clientBuilder.GetServiceClientFromSharedKeyConfig(clientBuilder.Tenants.TestConfigOAuth); diff --git a/sdk/storage/Azure.Storage.DataMovement/tests/PageBlobStorageResourceTests.cs b/sdk/storage/Azure.Storage.DataMovement/tests/PageBlobStorageResourceTests.cs index 586da1bd66c72..a2820cac4d521 100644 --- a/sdk/storage/Azure.Storage.DataMovement/tests/PageBlobStorageResourceTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement/tests/PageBlobStorageResourceTests.cs @@ -16,6 +16,7 @@ using Azure.Storage.Blobs.Specialized; using Azure.Storage.Blobs.Tests; using Azure.Storage.DataMovement.Tests; +using Azure.Storage.Sas; using Azure.Storage.Test; using DMBlobs::Azure.Storage.DataMovement.Blobs; using Moq; @@ -538,7 +539,7 @@ await destinationResource.CopyFromStreamInternalAsync( public async Task CopyFromUriAsync() { // Arrange - await using DisposingContainer testContainer = await GetTestContainerAsync(publicAccessType: PublicAccessType.BlobContainer); + await using DisposingContainer testContainer = await GetTestContainerAsync(); PageBlobClient sourceClient = testContainer.Container.GetPageBlobClient(GetNewBlobName()); PageBlobClient destinationClient = testContainer.Container.GetPageBlobClient(GetNewBlobName()); @@ -551,6 +552,11 @@ await sourceClient.UploadPagesAsync( content: stream, offset: 0); } + + sourceClient = InstrumentClient(new PageBlobClient( + sourceClient.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), + GetOptions())); + PageBlobStorageResource sourceResource = new PageBlobStorageResource(sourceClient); PageBlobStorageResource destinationResource = new PageBlobStorageResource(destinationClient); @@ -568,7 +574,7 @@ await sourceClient.UploadPagesAsync( public async Task CopyFromUriAsync_OAuth() { // Arrange - BlobServiceClient serviceClient = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient serviceClient = GetServiceClient_OAuth(); await using DisposingContainer test = await GetTestContainerAsync( service: serviceClient, publicAccessType: PublicAccessType.None); @@ -615,7 +621,7 @@ await destinationResource.CopyFromUriAsync( public async Task CopyFromUriAsync_HttpAuthorization() { // Arrange - BlobServiceClient serviceClient = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient serviceClient = GetServiceClient_OAuth(); await using DisposingContainer test = await GetTestContainerAsync( service: serviceClient, publicAccessType: PublicAccessType.None); @@ -971,7 +977,7 @@ await destinationResource.CopyFromUriInternalAsync( public async Task CopyFromUriAsync_Error() { // Arrange - await using DisposingContainer testContainer = await GetTestContainerAsync(publicAccessType: PublicAccessType.BlobContainer); + await using DisposingContainer testContainer = await GetTestContainerAsync(); PageBlobClient sourceClient = testContainer.Container.GetPageBlobClient(GetNewBlobName()); PageBlobClient destinationClient = testContainer.Container.GetPageBlobClient(GetNewBlobName()); long length = Constants.KB; @@ -984,7 +990,7 @@ await TestHelper.AssertExpectedExceptionAsync( destinationResource.CopyFromUriAsync(sourceResource: sourceResource, overwrite: false, completeLength: length), e => { - Assert.IsTrue(e.Status == (int)HttpStatusCode.NotFound); + Assert.IsTrue(e.Status == (int)HttpStatusCode.Unauthorized); }); } @@ -992,7 +998,7 @@ await TestHelper.AssertExpectedExceptionAsync( public async Task CopyBlockFromUriAsync() { // Arrange - await using DisposingContainer testContainer = await GetTestContainerAsync(publicAccessType: PublicAccessType.BlobContainer); + await using DisposingContainer testContainer = await GetTestContainerAsync(); PageBlobClient sourceClient = testContainer.Container.GetPageBlobClient(GetNewBlobName()); PageBlobClient destinationClient = testContainer.Container.GetPageBlobClient(GetNewBlobName()); @@ -1007,6 +1013,10 @@ await sourceClient.UploadPagesAsync( offset: 0); } + sourceClient = InstrumentClient(new PageBlobClient( + sourceClient.GenerateSasUri(BlobSasPermissions.Read, Recording.UtcNow.AddHours(1)), + GetOptions())); + PageBlobStorageResource sourceResource = new PageBlobStorageResource(sourceClient); PageBlobStorageResource destinationResource = new PageBlobStorageResource(destinationClient); @@ -1098,7 +1108,7 @@ await sourceClient.UploadPagesAsync( PageBlobStorageResource destinationResource = new PageBlobStorageResource(destinationClient); // Convert TokenCredential to HttpAuthorization - TokenCredential sourceBearerToken = Tenants.GetOAuthCredential(); + TokenCredential sourceBearerToken = TestEnvironment.Credential; string[] scopes = new string[] { "https://storage.azure.com/.default" }; AccessToken accessToken = await sourceBearerToken.GetTokenAsync(new TokenRequestContext(scopes), CancellationToken.None); StorageResourceCopyFromUriOptions options = new StorageResourceCopyFromUriOptions() @@ -1130,7 +1140,7 @@ await destinationResource.CopyBlockFromUriAsync( public async Task CopyBlockFromUriAsync_HttpAuthorization() { // Arrange - BlobServiceClient serviceClient = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient serviceClient = GetServiceClient_OAuth(); await using DisposingContainer test = await GetTestContainerAsync( service: serviceClient, publicAccessType: PublicAccessType.None); @@ -1495,7 +1505,7 @@ await destinationResource.CopyBlockFromUriInternalAsync( public async Task CopyBlockFromUriAsync_Error() { // Arrange - await using DisposingContainer testContainer = await GetTestContainerAsync(publicAccessType: PublicAccessType.BlobContainer); + await using DisposingContainer testContainer = await GetTestContainerAsync(); PageBlobClient sourceClient = testContainer.Container.GetPageBlobClient(GetNewBlobName()); PageBlobClient destinationClient = testContainer.Container.GetPageBlobClient(GetNewBlobName()); @@ -1712,7 +1722,7 @@ public async Task GetCopyAuthorizationHeaderAsync_OAuth() { // Arrange var containerName = GetNewContainerName(); - BlobServiceClient service = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient service = GetServiceClient_OAuth(); await using DisposingContainer testContainer = await GetTestContainerAsync( service, containerName, diff --git a/sdk/storage/Azure.Storage.DataMovement/tests/Shared/DataMovementBlobTestBase.cs b/sdk/storage/Azure.Storage.DataMovement/tests/Shared/DataMovementBlobTestBase.cs index d47bdaa57b156..c6b6a5e5cf369 100644 --- a/sdk/storage/Azure.Storage.DataMovement/tests/Shared/DataMovementBlobTestBase.cs +++ b/sdk/storage/Azure.Storage.DataMovement/tests/Shared/DataMovementBlobTestBase.cs @@ -104,11 +104,8 @@ private BlobServiceClient GetSecondaryReadServiceClient(TenantConfiguration conf options)); } - private static TokenCredential GetKeyClientTokenCredential(KeyVaultConfiguration config) - => new Identity.ClientSecretCredential( - config.ActiveDirectoryTenantId, - config.ActiveDirectoryApplicationId, - config.ActiveDirectoryApplicationSecret); + public BlobServiceClient GetServiceClient_OAuth() + => BlobsClientBuilder.GetServiceClient_OAuth(TestEnvironment.Credential); public BlobServiceClient GetServiceClient_BlobServiceSas_Container( string containerName, diff --git a/sdk/storage/Azure.Storage.DataMovement/tests/StartTransferSyncCopyDirectoryTests.cs b/sdk/storage/Azure.Storage.DataMovement/tests/StartTransferSyncCopyDirectoryTests.cs index 5589b66d57a4b..24b9990d569d2 100644 --- a/sdk/storage/Azure.Storage.DataMovement/tests/StartTransferSyncCopyDirectoryTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement/tests/StartTransferSyncCopyDirectoryTests.cs @@ -486,7 +486,7 @@ public async Task BlockBlobDirectoryToDirectory_OAuth() // Arrange long size = Constants.KB; int waitTimeInSec = 10; - BlobServiceClient service = BlobsClientBuilder.GetServiceClient_OAuth(); + BlobServiceClient service = GetServiceClient_OAuth(); var containerName = GetNewContainerName(); await using DisposingContainer testContainer = await GetTestContainerAsync( service, diff --git a/sdk/storage/Azure.Storage.Files.DataLake/assets.json b/sdk/storage/Azure.Storage.Files.DataLake/assets.json index 9c7dfffe8d717..597d72370ca4a 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/assets.json +++ b/sdk/storage/Azure.Storage.Files.DataLake/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/storage/Azure.Storage.Files.DataLake", - "Tag": "net/storage/Azure.Storage.Files.DataLake_aaa95f3b1a" + "Tag": "net/storage/Azure.Storage.Files.DataLake_133659189e" } diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/ClientBuilderExtensions.cs b/sdk/storage/Azure.Storage.Files.DataLake/tests/ClientBuilderExtensions.cs index 37fcd54f8072d..8a9ec7d5ecaa2 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/tests/ClientBuilderExtensions.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/ClientBuilderExtensions.cs @@ -67,7 +67,7 @@ public static async Task GetNewFileSystem( if (publicAccessType == default) { - publicAccessType = premium ? PublicAccessType.None : PublicAccessType.FileSystem; + publicAccessType = PublicAccessType.None; } DataLakeFileSystemClient fileSystem = clientBuilder.AzureCoreRecordedTestBase.InstrumentClient(service.GetFileSystemClient(fileSystemName)); diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/DataLakeTestBase.cs b/sdk/storage/Azure.Storage.Files.DataLake/tests/DataLakeTestBase.cs index 8f69b5542d2dd..60221a7f78ed7 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/tests/DataLakeTestBase.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/DataLakeTestBase.cs @@ -100,7 +100,7 @@ public DataLakeServiceClient GetServiceClientFromOauthConfig(TenantConfiguration => InstrumentClient( new DataLakeServiceClient( (new Uri(config.BlobServiceEndpoint)).ToHttps(), - Tenants.GetOAuthCredential(config), + TestEnvironment.Credential, GetOptions())); public DataLakeServiceClient GetServiceClient_OAuth() @@ -112,7 +112,7 @@ public StorageSharedKeyCredential GetStorageSharedKeyCredentials() TestConfigHierarchicalNamespace.AccountKey); public TokenCredential GetOAuthHnsCredential() - => Tenants.GetOAuthCredential(Tenants.TestConfigHierarchicalNamespace); + => TestEnvironment.Credential; public static void AssertValidStoragePathInfo(PathInfo pathInfo) { diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/DataLakeTestEnvironment.cs b/sdk/storage/Azure.Storage.Files.DataLake/tests/DataLakeTestEnvironment.cs index 7dd568f094dd3..b23d821344bfe 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/tests/DataLakeTestEnvironment.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/DataLakeTestEnvironment.cs @@ -5,6 +5,7 @@ using System.Diagnostics; using System.IO; using System.Threading.Tasks; +using Azure.Core.TestFramework; using Azure.Storage.Blobs; using Azure.Storage.Blobs.Specialized; using Azure.Storage.Sas; @@ -32,8 +33,7 @@ private async Task DoesOAuthWorkAsync() // Check flat account. For some reason we observe failures if that one doesn't work before we start datalake run. { BlobServiceClient serviceClient = new BlobServiceClient( - new Uri(TestConfigurations.DefaultTargetOAuthTenant.BlobServiceEndpoint), - GetOAuthCredential(TestConfigurations.DefaultTargetOAuthTenant)); + new Uri(TestConfigurations.DefaultTargetOAuthTenant.BlobServiceEndpoint), Credential); await serviceClient.GetPropertiesAsync(); var containerName = Guid.NewGuid().ToString(); var containerClient = serviceClient.GetBlobContainerClient(containerName); @@ -64,8 +64,7 @@ private async Task DoesOAuthWorkAsync() // Check hierarchical account. { DataLakeServiceClient serviceClient = new DataLakeServiceClient( - new Uri(TestConfigurations.DefaultTargetHierarchicalNamespaceTenant.BlobServiceEndpoint), - GetOAuthCredential(TestConfigurations.DefaultTargetHierarchicalNamespaceTenant)); + new Uri(TestConfigurations.DefaultTargetHierarchicalNamespaceTenant.BlobServiceEndpoint), Credential); await serviceClient.GetPropertiesAsync(); var fileSystemName = Guid.NewGuid().ToString(); var fileSystemClient = serviceClient.GetFileSystemClient(fileSystemName); diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/DirectoryClientTests.cs b/sdk/storage/Azure.Storage.Files.DataLake/tests/DirectoryClientTests.cs index 94571d815ccbc..5364051fe5700 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/tests/DirectoryClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/DirectoryClientTests.cs @@ -98,7 +98,7 @@ public async Task Ctor_TokenCredential() // Arrange await parentDirectory.CreateSubDirectoryAsync(directoryName); - TokenCredential tokenCredential = Tenants.GetOAuthCredential(TestConfigHierarchicalNamespace); + TokenCredential tokenCredential = TestEnvironment.Credential; Uri uri = new Uri($"{TestConfigHierarchicalNamespace.BlobServiceEndpoint}/{fileSystemName}/{parentDirectoryName}/{directoryName}").ToHttps(); DataLakeDirectoryClient directoryClient = InstrumentClient(new DataLakeDirectoryClient(uri, tokenCredential, GetOptions())); @@ -158,7 +158,7 @@ public async Task Ctor_ConnectionString_GenerateSas() public void Ctor_TokenCredential_Http() { // Arrange - TokenCredential tokenCredential = Tenants.GetOAuthCredential(TestConfigHierarchicalNamespace); + TokenCredential tokenCredential = TestEnvironment.Credential; Uri uri = new Uri(TestConfigHierarchicalNamespace.BlobServiceEndpoint).ToHttp(); // Act @@ -251,6 +251,7 @@ public async Task Ctor_DefaultAudience() } [RecordedTest] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_CustomAudience() { // Arrange @@ -279,6 +280,7 @@ public async Task Ctor_CustomAudience() } [RecordedTest] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_StorageAccountAudience() { // Arrange @@ -933,7 +935,7 @@ public async Task CreateIfNotExistsAsync_Error() // Act await TestHelper.AssertExpectedExceptionAsync( unauthorizedDirecotry.CreateIfNotExistsAsync(), - e => Assert.AreEqual("AuthenticationFailed", e.ErrorCode)); + e => Assert.AreEqual("NoAuthenticationInformation", e.ErrorCode)); } [RecordedTest] @@ -1075,7 +1077,7 @@ public async Task DeleteIfNotExistsAsync_Error() // Act await TestHelper.AssertExpectedExceptionAsync( unauthorizedDirectory.DeleteIfExistsAsync(), - e => Assert.AreEqual("AuthenticationFailed", e.ErrorCode)); + e => Assert.AreEqual("NoAuthenticationInformation", e.ErrorCode)); } [RecordedTest] @@ -2606,7 +2608,7 @@ public async Task SetAccessControlRecursiveAsync_NetworkError() DataLakeDirectoryClient rootDirectory = test.FileSystem.GetRootDirectoryClient(); await rootDirectory.SetAccessControlListAsync(ExecuteOnlyAccessControlList); - TokenCredential tokenCredential = Tenants.GetOAuthCredential(TestConfigHierarchicalNamespace); + TokenCredential tokenCredential = TestEnvironment.Credential; Uri uri = new Uri($"{TestConfigHierarchicalNamespace.BlobServiceEndpoint}/{fileSystemName}/{topDirectoryName}").ToHttps(); // Create tree as AAD App @@ -2635,7 +2637,7 @@ public async Task SetAccessControlRecursiveAsync_TaskCanceledError() DataLakeDirectoryClient rootDirectory = test.FileSystem.GetRootDirectoryClient(); await rootDirectory.SetAccessControlListAsync(ExecuteOnlyAccessControlList); - TokenCredential tokenCredential = Tenants.GetOAuthCredential(TestConfigHierarchicalNamespace); + TokenCredential tokenCredential = TestEnvironment.Credential; Uri uri = new Uri($"{TestConfigHierarchicalNamespace.BlobServiceEndpoint}/{fileSystemName}/{topDirectoryName}").ToHttps(); // Create tree as AAD App @@ -2663,7 +2665,7 @@ public async Task SetAccessControlRecursiveAsync_Error() await using DisposingFileSystem test = await GetNewFileSystem(fileSystemName: fileSystemName); await test.FileSystem.GetRootDirectoryClient().SetAccessControlListAsync(ExecuteOnlyAccessControlList); - TokenCredential tokenCredential = Tenants.GetOAuthCredential(TestConfigHierarchicalNamespace); + TokenCredential tokenCredential = TestEnvironment.Credential; Uri uri = new Uri($"{TestConfigHierarchicalNamespace.BlobServiceEndpoint}/{fileSystemName}/{topDirectoryName}").ToHttps(); // Create tree as AAD App @@ -2891,7 +2893,7 @@ public async Task UpdateAccessControlRecursiveAsync_WithProgressMonitoring_WithF await using DisposingFileSystem test = await GetNewFileSystem(fileSystemName: fileSystemName); await test.FileSystem.GetRootDirectoryClient().SetAccessControlListAsync(ExecuteOnlyAccessControlList); - TokenCredential tokenCredential = Tenants.GetOAuthCredential(TestConfigHierarchicalNamespace); + TokenCredential tokenCredential = TestEnvironment.Credential; Uri uri = new Uri($"{TestConfigHierarchicalNamespace.BlobServiceEndpoint}/{fileSystemName}/{topDirectoryName}").ToHttps(); // Create tree as AAD App @@ -3314,7 +3316,7 @@ public async Task UpdateAccessControlRecursiveAsync_NetworkError() DataLakeDirectoryClient rootDirectory = test.FileSystem.GetRootDirectoryClient(); await rootDirectory.SetAccessControlListAsync(ExecuteOnlyAccessControlList); - TokenCredential tokenCredential = Tenants.GetOAuthCredential(TestConfigHierarchicalNamespace); + TokenCredential tokenCredential = TestEnvironment.Credential; Uri uri = new Uri($"{TestConfigHierarchicalNamespace.BlobServiceEndpoint}/{fileSystemName}/{topDirectoryName}").ToHttps(); // Create tree as AAD App @@ -3343,7 +3345,7 @@ public async Task UpdateAccessControlRecursiveAsync_TaskCanceledError() DataLakeDirectoryClient rootDirectory = test.FileSystem.GetRootDirectoryClient(); await rootDirectory.SetAccessControlListAsync(ExecuteOnlyAccessControlList); - TokenCredential tokenCredential = Tenants.GetOAuthCredential(TestConfigHierarchicalNamespace); + TokenCredential tokenCredential = TestEnvironment.Credential; Uri uri = new Uri($"{TestConfigHierarchicalNamespace.BlobServiceEndpoint}/{fileSystemName}/{topDirectoryName}").ToHttps(); // Create tree as AAD App @@ -3371,7 +3373,7 @@ public async Task UpdateAccessControlRecursiveAsync_Error() await using DisposingFileSystem test = await GetNewFileSystem(fileSystemName: fileSystemName); await test.FileSystem.GetRootDirectoryClient().SetAccessControlListAsync(ExecuteOnlyAccessControlList); - TokenCredential tokenCredential = Tenants.GetOAuthCredential(TestConfigHierarchicalNamespace); + TokenCredential tokenCredential = TestEnvironment.Credential; Uri uri = new Uri($"{TestConfigHierarchicalNamespace.BlobServiceEndpoint}/{fileSystemName}/{topDirectoryName}").ToHttps(); // Create tree as AAD App @@ -4017,7 +4019,7 @@ public async Task RemoveAccessControlRecursiveAsync_NetworkError() DataLakeDirectoryClient rootDirectory = test.FileSystem.GetRootDirectoryClient(); await rootDirectory.SetAccessControlListAsync(ExecuteOnlyAccessControlList); - TokenCredential tokenCredential = Tenants.GetOAuthCredential(TestConfigHierarchicalNamespace); + TokenCredential tokenCredential = TestEnvironment.Credential; Uri uri = new Uri($"{TestConfigHierarchicalNamespace.BlobServiceEndpoint}/{fileSystemName}/{topDirectoryName}").ToHttps(); // Create tree as AAD App @@ -4046,7 +4048,7 @@ public async Task RemoveAccessControlRecursiveAsync_TaskCanceledError() DataLakeDirectoryClient rootDirectory = test.FileSystem.GetRootDirectoryClient(); await rootDirectory.SetAccessControlListAsync(ExecuteOnlyAccessControlList); - TokenCredential tokenCredential = Tenants.GetOAuthCredential(TestConfigHierarchicalNamespace); + TokenCredential tokenCredential = TestEnvironment.Credential; Uri uri = new Uri($"{TestConfigHierarchicalNamespace.BlobServiceEndpoint}/{fileSystemName}/{topDirectoryName}").ToHttps(); // Create tree as AAD App @@ -4074,7 +4076,7 @@ public async Task RemoveAccessControlRecursiveAsync_Error() await using DisposingFileSystem test = await GetNewFileSystem(fileSystemName: fileSystemName); await test.FileSystem.GetRootDirectoryClient().SetAccessControlListAsync(ExecuteOnlyAccessControlList); - TokenCredential tokenCredential = Tenants.GetOAuthCredential(TestConfigHierarchicalNamespace); + TokenCredential tokenCredential = TestEnvironment.Credential; Uri uri = new Uri($"{TestConfigHierarchicalNamespace.BlobServiceEndpoint}/{fileSystemName}/{topDirectoryName}").ToHttps(); // Create tree as AAD App @@ -6449,7 +6451,7 @@ public void CanMockClientConstructors() mock = new Mock(new Uri("https://test/test"), new DataLakeClientOptions()).Object; mock = new Mock(new Uri("https://test/test"), Tenants.GetNewHnsSharedKeyCredentials(), new DataLakeClientOptions()).Object; mock = new Mock(new Uri("https://test/test"), new AzureSasCredential("foo"), new DataLakeClientOptions()).Object; - mock = new Mock(new Uri("https://test/test"), Tenants.GetOAuthCredential(TestConfigHierarchicalNamespace), new DataLakeClientOptions()).Object; + mock = new Mock(new Uri("https://test/test"), TestEnvironment.Credential, new DataLakeClientOptions()).Object; } } } diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/FileClientTests.cs b/sdk/storage/Azure.Storage.Files.DataLake/tests/FileClientTests.cs index 7af1076179718..dade8acee12f6 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/tests/FileClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/FileClientTests.cs @@ -101,7 +101,7 @@ public async Task Ctor_TokenCredential() // Arrange await directory.CreateFileAsync(fileName); - TokenCredential tokenCredential = Tenants.GetOAuthCredential(TestConfigHierarchicalNamespace); + TokenCredential tokenCredential = TestEnvironment.Credential; Uri uri = new Uri($"{TestConfigHierarchicalNamespace.BlobServiceEndpoint}/{fileSystemName}/{directoryName}/{fileName}").ToHttps(); DataLakeFileClient fileClient = InstrumentClient(new DataLakeFileClient(uri, tokenCredential, GetOptions())); @@ -120,7 +120,7 @@ public async Task Ctor_TokenCredential() public void Ctor_TokenCredential_Http() { // Arrange - TokenCredential tokenCredential = Tenants.GetOAuthCredential(TestConfigHierarchicalNamespace); + TokenCredential tokenCredential = TestEnvironment.Credential; Uri uri = new Uri(TestConfigHierarchicalNamespace.BlobServiceEndpoint).ToHttp(); // Act @@ -254,6 +254,7 @@ public async Task Ctor_DefaultAudience() } [RecordedTest] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_CustomAudience() { // Arrange @@ -282,6 +283,7 @@ public async Task Ctor_CustomAudience() } [RecordedTest] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_StorageAccountAudience() { // Arrange @@ -867,7 +869,7 @@ public async Task CreateIfNotExistsAsync_Error() // Act await TestHelper.AssertExpectedExceptionAsync( unauthorizedFile.CreateIfNotExistsAsync(), - e => Assert.AreEqual("AuthenticationFailed", e.ErrorCode)); + e => Assert.AreEqual("NoAuthenticationInformation", e.ErrorCode)); } [RecordedTest] @@ -1054,7 +1056,7 @@ public async Task DeleteIfNotExistsAsync_Error() // Act await TestHelper.AssertExpectedExceptionAsync( unauthorizedFile.DeleteIfExistsAsync(), - e => Assert.AreEqual("AuthenticationFailed", e.ErrorCode)); + e => Assert.AreEqual("NoAuthenticationInformation", e.ErrorCode)); } [RecordedTest] @@ -6016,7 +6018,7 @@ public void CanMockClientConstructors() mock = new Mock(new Uri("https://test/test"), new DataLakeClientOptions()).Object; mock = new Mock(new Uri("https://test/test"), Tenants.GetNewHnsSharedKeyCredentials(), new DataLakeClientOptions()).Object; mock = new Mock(new Uri("https://test/test"), new AzureSasCredential("foo"), new DataLakeClientOptions()).Object; - mock = new Mock(new Uri("https://test/test"), Tenants.GetOAuthCredential(TestConfigHierarchicalNamespace), new DataLakeClientOptions()).Object; + mock = new Mock(new Uri("https://test/test"), TestEnvironment.Credential, new DataLakeClientOptions()).Object; } } } diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/FileSystemClientTests.cs b/sdk/storage/Azure.Storage.Files.DataLake/tests/FileSystemClientTests.cs index 4ba3de8f09d6c..797436ce368c6 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/tests/FileSystemClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/FileSystemClientTests.cs @@ -92,7 +92,7 @@ public async Task Ctor_TokenCredential() try { - TokenCredential tokenCredential = Tenants.GetOAuthCredential(TestConfigHierarchicalNamespace); + TokenCredential tokenCredential = TestEnvironment.Credential; Uri uri = new Uri($"{TestConfigHierarchicalNamespace.BlobServiceEndpoint}/{fileSystemName}").ToHttps(); DataLakeFileSystemClient fileSystemClient = InstrumentClient(new DataLakeFileSystemClient(uri, tokenCredential, GetOptions())); @@ -171,7 +171,7 @@ public async Task Ctor_ConnectionString_GenerateSas() public void Ctor_TokenCredential_Http() { // Arrange - TokenCredential tokenCredential = Tenants.GetOAuthCredential(TestConfigHierarchicalNamespace); + TokenCredential tokenCredential = TestEnvironment.Credential; Uri uri = new Uri(TestConfigHierarchicalNamespace.BlobServiceEndpoint).ToHttp(); // Act @@ -257,6 +257,7 @@ public async Task Ctor_DefaultAudience() } [RecordedTest] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_CustomAudience() { // Arrange @@ -281,6 +282,7 @@ public async Task Ctor_CustomAudience() } [RecordedTest] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_StorageAccountAudience() { // Arrange @@ -523,6 +525,7 @@ public async Task CreateAsync_Metadata() } [RecordedTest] + [PlaybackOnly("Public access disabled on live test accounts.")] public async Task CreateAsync_PublicAccess() { // Arrange @@ -1110,13 +1113,13 @@ public async Task GetPathsAsync_NonHns() [RecordedTest] public async Task GetPropertiesAsync() { - await using DisposingFileSystem test = await GetNewFileSystem(publicAccessType: PublicAccessType.FileSystem); + await using DisposingFileSystem test = await GetNewFileSystem(); // Act Response response = await test.FileSystem.GetPropertiesAsync(); // Assert - Assert.AreEqual(PublicAccessType.FileSystem, response.Value.PublicAccess); + Assert.AreEqual(PublicAccessType.None, response.Value.PublicAccess); } [RecordedTest] @@ -2361,19 +2364,14 @@ public async Task SetAccessPolicyAsync() await using DisposingFileSystem test = await GetNewFileSystem(); // Arrange - PublicAccessType publicAccessType = PublicAccessType.FileSystem; DataLakeSignedIdentifier[] signedIdentifiers = BuildSignedIdentifiers(); // Act await test.FileSystem.SetAccessPolicyAsync( - accessType: publicAccessType, permissions: signedIdentifiers ); // Assert - Response propertiesResponse = await test.FileSystem.GetPropertiesAsync(); - Assert.AreEqual(publicAccessType, propertiesResponse.Value.PublicAccess); - Response response = await test.FileSystem.GetAccessPolicyAsync(); Assert.AreEqual(1, response.Value.SignedIdentifiers.Count()); @@ -2417,6 +2415,7 @@ await TestHelper.AssertExpectedExceptionAsync( } [RecordedTest] + [PlaybackOnly("Public access disabled on live test accounts.")] public async Task SetAccessPolicy_PublicAccessPolicy() { await using DisposingFileSystem test = await GetNewFileSystem(); @@ -2585,7 +2584,6 @@ public async Task SetAccessPolicyAsync_StartsExpiresProperties() public async Task SetAccessPolicyAsync_Error() { // Arrange - PublicAccessType publicAccessType = PublicAccessType.FileSystem; DataLakeSignedIdentifier[] signedIdentifiers = BuildSignedIdentifiers(); DataLakeServiceClient service = DataLakeClientBuilder.GetServiceClient_Hns(); DataLakeFileSystemClient fileSystem = InstrumentClient(service.GetFileSystemClient(GetNewFileSystemName())); @@ -2593,7 +2591,6 @@ public async Task SetAccessPolicyAsync_Error() // Act await TestHelper.AssertExpectedExceptionAsync( fileSystem.SetAccessPolicyAsync( - accessType: publicAccessType, permissions: signedIdentifiers), e => Assert.AreEqual("ContainerNotFound", e.ErrorCode)); } @@ -2604,7 +2601,6 @@ public async Task SetAccessPolicyAsync_Conditions() foreach (AccessConditionParameters parameters in NoLease_Conditions_Data) { // Arrange - PublicAccessType publicAccessType = PublicAccessType.FileSystem; DataLakeSignedIdentifier[] signedIdentifiers = BuildSignedIdentifiers(); DataLakeServiceClient service = DataLakeClientBuilder.GetServiceClient_Hns(); DataLakeFileSystemClient fileSystem = InstrumentClient(service.GetFileSystemClient(GetNewFileSystemName())); @@ -2617,7 +2613,6 @@ public async Task SetAccessPolicyAsync_Conditions() // Act Response response = await fileSystem.SetAccessPolicyAsync( - accessType: publicAccessType, permissions: signedIdentifiers, conditions: conditions); @@ -2659,7 +2654,6 @@ public async Task SetAccessPolicyAsync_InvalidPermissionOrder() await using DisposingFileSystem test = await GetNewFileSystem(); // Arrange - PublicAccessType publicAccessType = PublicAccessType.FileSystem; DataLakeSignedIdentifier[] signedIdentifiers = new[] { new DataLakeSignedIdentifier @@ -2676,14 +2670,10 @@ public async Task SetAccessPolicyAsync_InvalidPermissionOrder() // Act await test.FileSystem.SetAccessPolicyAsync( - accessType: publicAccessType, permissions: signedIdentifiers ); // Assert - Response propertiesResponse = await test.FileSystem.GetPropertiesAsync(); - Assert.AreEqual(publicAccessType, propertiesResponse.Value.PublicAccess); - Response response = await test.FileSystem.GetAccessPolicyAsync(); Assert.AreEqual(1, response.Value.SignedIdentifiers.Count()); @@ -3344,7 +3334,7 @@ public void CanMockClientConstructors() mock = new Mock(new Uri("https://test/test"), new DataLakeClientOptions()).Object; mock = new Mock(new Uri("https://test/test"), Tenants.GetNewHnsSharedKeyCredentials(), new DataLakeClientOptions()).Object; mock = new Mock(new Uri("https://test/test"), new AzureSasCredential("foo"), new DataLakeClientOptions()).Object; - mock = new Mock(new Uri("https://test/test"), Tenants.GetOAuthCredential(TestConfigHierarchicalNamespace), new DataLakeClientOptions()).Object; + mock = new Mock(new Uri("https://test/test"), TestEnvironment.Credential, new DataLakeClientOptions()).Object; } private IEnumerable Conditions_Data diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/PathClientTests.cs b/sdk/storage/Azure.Storage.Files.DataLake/tests/PathClientTests.cs index 5b79e62bab961..ba4a674bfa1db 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/tests/PathClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/PathClientTests.cs @@ -77,7 +77,7 @@ public async Task Ctor_TokenCredential() string directoryName = GetNewDirectoryName(); await test.FileSystem.CreateDirectoryAsync(directoryName); - TokenCredential tokenCredential = Tenants.GetOAuthCredential(TestConfigHierarchicalNamespace); + TokenCredential tokenCredential = TestEnvironment.Credential; Uri uri = new Uri($"{TestConfigHierarchicalNamespace.BlobServiceEndpoint}/{fileSystemName}/{directoryName}").ToHttps(); DataLakePathClient pathClient = InstrumentClient(new DataLakePathClient(uri, tokenCredential, GetOptions())); @@ -133,7 +133,7 @@ public async Task Ctor_ConnectionString_GenerateSas() public void Ctor_TokenCredential_Http() { // Arrange - TokenCredential tokenCredential = Tenants.GetOAuthCredential(TestConfigHierarchicalNamespace); + TokenCredential tokenCredential = TestEnvironment.Credential; Uri uri = new Uri(TestConfigHierarchicalNamespace.BlobServiceEndpoint).ToHttp(); // Act @@ -412,7 +412,7 @@ public void CanMockClientConstructors() mock = new Mock(new Uri("https://test/test"), new DataLakeClientOptions()).Object; mock = new Mock(new Uri("https://test/test"), Tenants.GetNewHnsSharedKeyCredentials(), new DataLakeClientOptions()).Object; mock = new Mock(new Uri("https://test/test"), new AzureSasCredential("foo"), new DataLakeClientOptions()).Object; - mock = new Mock(new Uri("https://test/test"), Tenants.GetOAuthCredential(TestConfigHierarchicalNamespace), new DataLakeClientOptions()).Object; + mock = new Mock(new Uri("https://test/test"), TestEnvironment.Credential, new DataLakeClientOptions()).Object; } [RecordedTest] diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/ServiceClientTests.cs b/sdk/storage/Azure.Storage.Files.DataLake/tests/ServiceClientTests.cs index eddaab553871e..9d4227c73d613 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/tests/ServiceClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/ServiceClientTests.cs @@ -61,7 +61,7 @@ public async Task Ctor_SharedKey() public async Task Ctor_TokenCredential() { // Arrange - TokenCredential tokenCredential = Tenants.GetOAuthCredential(TestConfigHierarchicalNamespace); + TokenCredential tokenCredential = TestEnvironment.Credential; Uri uri = new Uri(TestConfigHierarchicalNamespace.BlobServiceEndpoint).ToHttps(); DataLakeServiceClient serviceClient = InstrumentClient(new DataLakeServiceClient(uri, tokenCredential, GetOptions())); @@ -131,7 +131,7 @@ public async Task Ctor_ConnectionString_GenerateSas() public void Ctor_TokenCredential_Http() { // Arrange - TokenCredential tokenCredential = Tenants.GetOAuthCredential(TestConfigHierarchicalNamespace); + TokenCredential tokenCredential = TestEnvironment.Credential; Uri uri = new Uri(TestConfigHierarchicalNamespace.BlobServiceEndpoint).ToHttp(); // Act @@ -211,6 +211,7 @@ public async Task Ctor_DefaultAudience() } [RecordedTest] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_CustomAudience() { // Arrange @@ -230,6 +231,7 @@ public async Task Ctor_CustomAudience() } [RecordedTest] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_StorageAccountAudience() { // Arrange @@ -1148,7 +1150,7 @@ public void CanMockClientConstructors() mock = new Mock(new Uri("https://test/test"), new DataLakeClientOptions()).Object; mock = new Mock(new Uri("https://test/test"), Tenants.GetNewHnsSharedKeyCredentials(), new DataLakeClientOptions()).Object; mock = new Mock(new Uri("https://test/test"), new AzureSasCredential("foo"), new DataLakeClientOptions()).Object; - mock = new Mock(new Uri("https://test/test"), Tenants.GetOAuthCredential(TestConfigHierarchicalNamespace), new DataLakeClientOptions()).Object; + mock = new Mock(new Uri("https://test/test"), TestEnvironment.Credential, new DataLakeClientOptions()).Object; } } } diff --git a/sdk/storage/Azure.Storage.Files.Shares/assets.json b/sdk/storage/Azure.Storage.Files.Shares/assets.json index 84bc3ffca974c..028402c5d0c3a 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/assets.json +++ b/sdk/storage/Azure.Storage.Files.Shares/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/storage/Azure.Storage.Files.Shares", - "Tag": "net/storage/Azure.Storage.Files.Shares_3d104d438e" + "Tag": "net/storage/Azure.Storage.Files.Shares_f7982e093b" } diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/ClientBuilderExtensions.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/ClientBuilderExtensions.cs index d264e2bfe616b..35f4f78c33aab 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/ClientBuilderExtensions.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/ClientBuilderExtensions.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; +using Azure.Core; using Azure.Storage.Files.Shares.Models; using Azure.Storage.Test.Shared; using ShareClientBuilder = Azure.Storage.Test.Shared.ClientBuilder< @@ -45,11 +46,11 @@ public static ShareServiceClient GetServiceClient_SharedKey(this ShareClientBuil => clientBuilder.GetServiceClientFromSharedKeyConfig(clientBuilder.Tenants.TestConfigDefault, options); public static ShareServiceClient GetServiceClient_OAuth( - this ShareClientBuilder clientBuilder, ShareClientOptions options = default) + this ShareClientBuilder clientBuilder, TokenCredential tokenCredential, ShareClientOptions options = default) { options ??= clientBuilder.GetOptions(); options.ShareTokenIntent = ShareTokenIntent.Backup; - return clientBuilder.GetServiceClientFromOauthConfig(clientBuilder.Tenants.TestConfigOAuth, options); + return clientBuilder.GetServiceClientFromOauthConfig(clientBuilder.Tenants.TestConfigOAuth, tokenCredential, options); } public static ShareServiceClient GetServiceClient_OAuthAccount_SharedKey(this ShareClientBuilder clientBuilder) => diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/CopySourceAuthTests.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/CopySourceAuthTests.cs index 9c257c24eb6c9..835591d681dff 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/CopySourceAuthTests.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/CopySourceAuthTests.cs @@ -32,7 +32,7 @@ public async Task UploadRangeFromUriAsync_SourceBearerToken() // Arrange BlobServiceClient blobServiceClient = InstrumentClient(new BlobServiceClient( new Uri(Tenants.TestConfigOAuth.BlobServiceEndpoint), - Tenants.GetOAuthCredential(Tenants.TestConfigOAuth), + TestEnvironment.Credential, GetBlobOptions())); BlobContainerClient containerClient = InstrumentClient(blobServiceClient.GetBlobContainerClient(GetNewShareName())); @@ -87,7 +87,7 @@ public async Task UploadRangeFromUriAsync_SourceBearerTokenFail() // Arrange BlobServiceClient blobServiceClient = InstrumentClient(new BlobServiceClient( new Uri(Tenants.TestConfigOAuth.BlobServiceEndpoint), - Tenants.GetOAuthCredential(Tenants.TestConfigOAuth), + TestEnvironment.Credential, GetBlobOptions())); BlobContainerClient containerClient = InstrumentClient(blobServiceClient.GetBlobContainerClient(GetNewShareName())); diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs index 9c30baaf95d6d..502e255f4a95c 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs @@ -123,7 +123,7 @@ public async Task Ctor_DefaultAudience() ShareDirectoryClient aadDirClient = InstrumentClient(new ShareDirectoryClient( uriBuilder.ToUri(), - Tenants.GetOAuthCredential(), + TestEnvironment.Credential, options)); // Assert @@ -132,6 +132,7 @@ public async Task Ctor_DefaultAudience() } [RecordedTest] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_CustomAudience() { // Arrange @@ -150,7 +151,7 @@ public async Task Ctor_CustomAudience() ShareDirectoryClient aadDirClient = InstrumentClient(new ShareDirectoryClient( uriBuilder.ToUri(), - Tenants.GetOAuthCredential(), + TestEnvironment.Credential, options)); // Assert @@ -159,6 +160,7 @@ public async Task Ctor_CustomAudience() } [RecordedTest] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_StorageAccountAudience() { // Arrange @@ -177,7 +179,7 @@ public async Task Ctor_StorageAccountAudience() ShareDirectoryClient aadDirClient = InstrumentClient(new ShareDirectoryClient( uriBuilder.ToUri(), - Tenants.GetOAuthCredential(), + TestEnvironment.Credential, options)); // Assert @@ -282,7 +284,7 @@ public async Task CreateAsync_OAuth() string shareName = GetNewShareName(); ShareServiceClient sharedKeyServiceClient = SharesClientBuilder.GetServiceClient_OAuthAccount_SharedKey(); await using DisposingShare sharedKeyShare = await GetTestShareAsync(sharedKeyServiceClient, shareName); - ShareServiceClient oauthServiceClient = SharesClientBuilder.GetServiceClient_OAuth(); + ShareServiceClient oauthServiceClient = GetServiceClient_OAuth(); string directoryName = GetNewDirectoryName(); ShareDirectoryClient directory = InstrumentClient(oauthServiceClient.GetShareClient(shareName).GetDirectoryClient(directoryName)); @@ -529,7 +531,7 @@ public async Task CreateIfNotExists_Error() // Act await TestHelper.AssertExpectedExceptionAsync( unauthorizedDirectory.CreateIfNotExistsAsync(), - e => Assert.AreEqual("ResourceNotFound", e.ErrorCode)); + e => Assert.AreEqual("NoAuthenticationInformation", e.ErrorCode)); } [RecordedTest] @@ -724,7 +726,7 @@ public async Task DeleteAsync_OAuth() string shareName = GetNewShareName(); ShareServiceClient sharedKeyServiceClient = SharesClientBuilder.GetServiceClient_OAuthAccount_SharedKey(); await using DisposingShare sharedKeyShare = await GetTestShareAsync(sharedKeyServiceClient, shareName); - ShareServiceClient oauthServiceClient = SharesClientBuilder.GetServiceClient_OAuth(); + ShareServiceClient oauthServiceClient = GetServiceClient_OAuth(); string directoryName = GetNewDirectoryName(); ShareDirectoryClient directory = InstrumentClient(oauthServiceClient.GetShareClient(shareName).GetDirectoryClient(directoryName)); @@ -792,7 +794,7 @@ public async Task GetPropertiesAsync_OAuth() string shareName = GetNewShareName(); ShareServiceClient sharedKeyServiceClient = SharesClientBuilder.GetServiceClient_OAuthAccount_SharedKey(); await using DisposingShare sharedKeyShare = await GetTestShareAsync(sharedKeyServiceClient, shareName); - ShareServiceClient oauthServiceClient = SharesClientBuilder.GetServiceClient_OAuth(); + ShareServiceClient oauthServiceClient = GetServiceClient_OAuth(); string directoryName = GetNewDirectoryName(); ShareDirectoryClient directory = InstrumentClient(oauthServiceClient.GetShareClient(shareName).GetDirectoryClient(directoryName)); @@ -907,7 +909,7 @@ public async Task SetHttpHeadersAsync_OAuth() string shareName = GetNewShareName(); ShareServiceClient sharedKeyServiceClient = SharesClientBuilder.GetServiceClient_OAuthAccount_SharedKey(); await using DisposingShare sharedKeyShare = await GetTestShareAsync(sharedKeyServiceClient, shareName); - ShareServiceClient oauthServiceClient = SharesClientBuilder.GetServiceClient_OAuth(); + ShareServiceClient oauthServiceClient = GetServiceClient_OAuth(); string directoryName = GetNewDirectoryName(); ShareDirectoryClient directory = InstrumentClient(oauthServiceClient.GetShareClient(shareName).GetDirectoryClient(directoryName)); @@ -1078,7 +1080,7 @@ public async Task SetMetadataAsync_OAuth() string shareName = GetNewShareName(); ShareServiceClient sharedKeyServiceClient = SharesClientBuilder.GetServiceClient_OAuthAccount_SharedKey(); await using DisposingShare sharedKeyShare = await GetTestShareAsync(sharedKeyServiceClient, shareName); - ShareServiceClient oauthServiceClient = SharesClientBuilder.GetServiceClient_OAuth(); + ShareServiceClient oauthServiceClient = GetServiceClient_OAuth(); string directoryName = GetNewDirectoryName(); ShareDirectoryClient directory = InstrumentClient(oauthServiceClient.GetShareClient(shareName).GetDirectoryClient(directoryName)); @@ -1197,7 +1199,7 @@ public async Task ListFilesAndDirectoriesSegmentAsync_OAuth() string shareName = GetNewShareName(); ShareServiceClient sharedKeyServiceClient = SharesClientBuilder.GetServiceClient_OAuthAccount_SharedKey(); await using DisposingShare sharedKeyShare = await GetTestShareAsync(sharedKeyServiceClient, shareName); - ShareServiceClient oauthServiceClient = SharesClientBuilder.GetServiceClient_OAuth(); + ShareServiceClient oauthServiceClient = GetServiceClient_OAuth(); string directoryName = GetNewDirectoryName(); ShareDirectoryClient directory = InstrumentClient(oauthServiceClient.GetShareClient(shareName).GetDirectoryClient(directoryName)); @@ -1449,7 +1451,7 @@ public async Task ListHandles_OAuth() string shareName = GetNewShareName(); ShareServiceClient sharedKeyServiceClient = SharesClientBuilder.GetServiceClient_OAuthAccount_SharedKey(); await using DisposingShare sharedKeyShare = await GetTestShareAsync(sharedKeyServiceClient, shareName); - ShareServiceClient oauthServiceClient = SharesClientBuilder.GetServiceClient_OAuth(); + ShareServiceClient oauthServiceClient = GetServiceClient_OAuth(); string directoryName = GetNewDirectoryName(); ShareDirectoryClient directory = InstrumentClient(oauthServiceClient.GetShareClient(shareName).GetDirectoryClient(directoryName)); @@ -1517,7 +1519,7 @@ public async Task ForceCloseHandles_OAuth() string shareName = GetNewShareName(); ShareServiceClient sharedKeyServiceClient = SharesClientBuilder.GetServiceClient_OAuthAccount_SharedKey(); await using DisposingShare sharedKeyShare = await GetTestShareAsync(sharedKeyServiceClient, shareName); - ShareServiceClient oauthServiceClient = SharesClientBuilder.GetServiceClient_OAuth(); + ShareServiceClient oauthServiceClient = GetServiceClient_OAuth(); string directoryName = GetNewDirectoryName(); ShareDirectoryClient directory = InstrumentClient(oauthServiceClient.GetShareClient(shareName).GetDirectoryClient(directoryName)); @@ -2413,7 +2415,7 @@ public async Task RenameAsync_OAuth() string shareName = GetNewShareName(); ShareServiceClient sharedKeyServiceClient = SharesClientBuilder.GetServiceClient_OAuthAccount_SharedKey(); await using DisposingShare sharedKeyShare = await GetTestShareAsync(sharedKeyServiceClient, shareName); - ShareServiceClient oauthServiceClient = SharesClientBuilder.GetServiceClient_OAuth(); + ShareServiceClient oauthServiceClient = GetServiceClient_OAuth(); string directoryName = GetNewDirectoryName(); string destDirectoryName = GetNewDirectoryName(); diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs index f8d12a29c50f1..434f91a45f602 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs @@ -128,7 +128,7 @@ public async Task Ctor_DefaultAudience() ShareFileClient aadFileClient = InstrumentClient(new ShareFileClient( uriBuilder.ToUri(), - Tenants.GetOAuthCredential(), + TestEnvironment.Credential, options)); // Assert @@ -137,6 +137,7 @@ public async Task Ctor_DefaultAudience() } [RecordedTest] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_CustomAudience() { // Arrange @@ -157,7 +158,7 @@ public async Task Ctor_CustomAudience() ShareFileClient aadFileClient = InstrumentClient(new ShareFileClient( uriBuilder.ToUri(), - Tenants.GetOAuthCredential(), + TestEnvironment.Credential, options)); // Assert @@ -166,6 +167,7 @@ public async Task Ctor_CustomAudience() } [RecordedTest] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_StorageAccountAudience() { // Arrange @@ -186,7 +188,7 @@ public async Task Ctor_StorageAccountAudience() ShareFileClient aadFileClient = InstrumentClient(new ShareFileClient( uriBuilder.ToUri(), - Tenants.GetOAuthCredential(), + TestEnvironment.Credential, options)); // Assert @@ -299,7 +301,7 @@ public async Task CreateAsync_OAuth() string shareName = GetNewShareName(); ShareServiceClient sharedKeyServiceClient = SharesClientBuilder.GetServiceClient_OAuthAccount_SharedKey(); await using DisposingShare sharedKeyShare = await GetTestShareAsync(sharedKeyServiceClient, shareName); - ShareServiceClient oauthServiceClient = SharesClientBuilder.GetServiceClient_OAuth(); + ShareServiceClient oauthServiceClient = GetServiceClient_OAuth(); string directoryName = GetNewDirectoryName(); ShareDirectoryClient directory = InstrumentClient(oauthServiceClient.GetShareClient(shareName).GetDirectoryClient(directoryName)); @@ -811,7 +813,7 @@ public async Task SetMetadataAsync_OAuth() string shareName = GetNewShareName(); ShareServiceClient sharedKeyServiceClient = SharesClientBuilder.GetServiceClient_OAuthAccount_SharedKey(); await using DisposingShare sharedKeyShare = await GetTestShareAsync(sharedKeyServiceClient, shareName); - ShareServiceClient oauthServiceClient = SharesClientBuilder.GetServiceClient_OAuth(); + ShareServiceClient oauthServiceClient = GetServiceClient_OAuth(); string directoryName = GetNewDirectoryName(); ShareDirectoryClient directory = InstrumentClient(oauthServiceClient.GetShareClient(shareName).GetDirectoryClient(directoryName)); @@ -939,7 +941,7 @@ public async Task GetPropertiesAsync_OAuth() string shareName = GetNewShareName(); ShareServiceClient sharedKeyServiceClient = SharesClientBuilder.GetServiceClient_OAuthAccount_SharedKey(); await using DisposingShare sharedKeyShare = await GetTestShareAsync(sharedKeyServiceClient, shareName); - ShareServiceClient oauthServiceClient = SharesClientBuilder.GetServiceClient_OAuth(); + ShareServiceClient oauthServiceClient = GetServiceClient_OAuth(); string directoryName = GetNewDirectoryName(); ShareDirectoryClient directory = InstrumentClient(oauthServiceClient.GetShareClient(shareName).GetDirectoryClient(directoryName)); @@ -1262,7 +1264,7 @@ public async Task SetHttpHeadersAsync_OAuth() string shareName = GetNewShareName(); ShareServiceClient sharedKeyServiceClient = SharesClientBuilder.GetServiceClient_OAuthAccount_SharedKey(); await using DisposingShare sharedKeyShare = await GetTestShareAsync(sharedKeyServiceClient, shareName); - ShareServiceClient oauthServiceClient = SharesClientBuilder.GetServiceClient_OAuth(); + ShareServiceClient oauthServiceClient = GetServiceClient_OAuth(); string directoryName = GetNewDirectoryName(); ShareDirectoryClient directory = InstrumentClient(oauthServiceClient.GetShareClient(shareName).GetDirectoryClient(directoryName)); @@ -1539,7 +1541,7 @@ public async Task DeleteAsync_OAuth() string shareName = GetNewShareName(); ShareServiceClient sharedKeyServiceClient = SharesClientBuilder.GetServiceClient_OAuthAccount_SharedKey(); await using DisposingShare sharedKeyShare = await GetTestShareAsync(sharedKeyServiceClient, shareName); - ShareServiceClient oauthServiceClient = SharesClientBuilder.GetServiceClient_OAuth(); + ShareServiceClient oauthServiceClient = GetServiceClient_OAuth(); string directoryName = GetNewDirectoryName(); ShareDirectoryClient directory = InstrumentClient(oauthServiceClient.GetShareClient(shareName).GetDirectoryClient(directoryName)); @@ -1653,7 +1655,7 @@ public async Task StartCopyAsync_OAuth() string shareName = GetNewShareName(); ShareServiceClient sharedKeyServiceClient = SharesClientBuilder.GetServiceClient_OAuthAccount_SharedKey(); await using DisposingShare sharedKeyShare = await GetTestShareAsync(sharedKeyServiceClient, shareName); - ShareServiceClient oauthServiceClient = SharesClientBuilder.GetServiceClient_OAuth(); + ShareServiceClient oauthServiceClient = GetServiceClient_OAuth(); string directoryName = GetNewDirectoryName(); ShareDirectoryClient directory = InstrumentClient(oauthServiceClient.GetShareClient(shareName).GetDirectoryClient(directoryName)); @@ -2251,7 +2253,7 @@ public async Task AbortCopyAsync_OAuth() string shareName = GetNewShareName(); ShareServiceClient sharedKeyServiceClient = SharesClientBuilder.GetServiceClient_OAuthAccount_SharedKey(); await using DisposingShare sharedKeyShare = await GetTestShareAsync(sharedKeyServiceClient, shareName); - ShareServiceClient oauthServiceClient = SharesClientBuilder.GetServiceClient_OAuth(); + ShareServiceClient oauthServiceClient = GetServiceClient_OAuth(); string directoryName = GetNewDirectoryName(); ShareDirectoryClient directory = InstrumentClient(oauthServiceClient.GetShareClient(shareName).GetDirectoryClient(directoryName)); @@ -2534,7 +2536,7 @@ public async Task DownloadAsync_OAuth() string shareName = GetNewShareName(); ShareServiceClient sharedKeyServiceClient = SharesClientBuilder.GetServiceClient_OAuthAccount_SharedKey(); await using DisposingShare sharedKeyShare = await GetTestShareAsync(sharedKeyServiceClient, shareName); - ShareServiceClient oauthServiceClient = SharesClientBuilder.GetServiceClient_OAuth(); + ShareServiceClient oauthServiceClient = GetServiceClient_OAuth(); string directoryName = GetNewDirectoryName(); ShareDirectoryClient directory = InstrumentClient(oauthServiceClient.GetShareClient(shareName).GetDirectoryClient(directoryName)); @@ -2857,7 +2859,7 @@ public async Task GetRangeListAsync_OAuth() string shareName = GetNewShareName(); ShareServiceClient sharedKeyServiceClient = SharesClientBuilder.GetServiceClient_OAuthAccount_SharedKey(); await using DisposingShare sharedKeyShare = await GetTestShareAsync(sharedKeyServiceClient, shareName); - ShareServiceClient oauthServiceClient = SharesClientBuilder.GetServiceClient_OAuth(); + ShareServiceClient oauthServiceClient = GetServiceClient_OAuth(); string directoryName = GetNewDirectoryName(); ShareDirectoryClient directory = InstrumentClient(oauthServiceClient.GetShareClient(shareName).GetDirectoryClient(directoryName)); @@ -3189,7 +3191,7 @@ public async Task GetRangeListDiffAsync_OAuth() string shareName = GetNewShareName(); ShareServiceClient sharedKeyServiceClient = SharesClientBuilder.GetServiceClient_OAuthAccount_SharedKey(); await using DisposingShare sharedKeyShare = await GetTestShareAsync(sharedKeyServiceClient, shareName); - ShareServiceClient oauthServiceClient = SharesClientBuilder.GetServiceClient_OAuth(); + ShareServiceClient oauthServiceClient = GetServiceClient_OAuth(); string directoryName = GetNewDirectoryName(); ShareDirectoryClient directory = InstrumentClient(oauthServiceClient.GetShareClient(shareName).GetDirectoryClient(directoryName)); @@ -3430,7 +3432,7 @@ public async Task UploadRangeAsync_OAuth() string shareName = GetNewShareName(); ShareServiceClient sharedKeyServiceClient = SharesClientBuilder.GetServiceClient_OAuthAccount_SharedKey(); await using DisposingShare sharedKeyShare = await GetTestShareAsync(sharedKeyServiceClient, shareName); - ShareServiceClient oauthServiceClient = SharesClientBuilder.GetServiceClient_OAuth(); + ShareServiceClient oauthServiceClient = GetServiceClient_OAuth(); string directoryName = GetNewDirectoryName(); ShareDirectoryClient directory = InstrumentClient(oauthServiceClient.GetShareClient(shareName).GetDirectoryClient(directoryName)); @@ -3695,7 +3697,7 @@ public async Task UploadAsync_OAuth() string shareName = GetNewShareName(); ShareServiceClient sharedKeyServiceClient = SharesClientBuilder.GetServiceClient_OAuthAccount_SharedKey(); await using DisposingShare sharedKeyShare = await GetTestShareAsync(sharedKeyServiceClient, shareName); - ShareServiceClient oauthServiceClient = SharesClientBuilder.GetServiceClient_OAuth(); + ShareServiceClient oauthServiceClient = GetServiceClient_OAuth(); string directoryName = GetNewDirectoryName(); ShareDirectoryClient directory = InstrumentClient(oauthServiceClient.GetShareClient(shareName).GetDirectoryClient(directoryName)); @@ -3951,7 +3953,7 @@ public async Task ClearRangeAsync_OAuth() string shareName = GetNewShareName(); ShareServiceClient sharedKeyServiceClient = SharesClientBuilder.GetServiceClient_OAuthAccount_SharedKey(); await using DisposingShare sharedKeyShare = await GetTestShareAsync(sharedKeyServiceClient, shareName); - ShareServiceClient oauthServiceClient = SharesClientBuilder.GetServiceClient_OAuth(); + ShareServiceClient oauthServiceClient = GetServiceClient_OAuth(); string directoryName = GetNewDirectoryName(); ShareDirectoryClient directory = InstrumentClient(oauthServiceClient.GetShareClient(shareName).GetDirectoryClient(directoryName)); @@ -4542,7 +4544,7 @@ public async Task UploadRangeFromUriAsync_OAuth() string shareName = GetNewShareName(); ShareServiceClient sharedKeyServiceClient = SharesClientBuilder.GetServiceClient_OAuthAccount_SharedKey(); await using DisposingShare sharedKeyShare = await GetTestShareAsync(sharedKeyServiceClient, shareName); - ShareServiceClient oauthServiceClient = SharesClientBuilder.GetServiceClient_OAuth(); + ShareServiceClient oauthServiceClient = GetServiceClient_OAuth(); ShareClient oauthShareClient = InstrumentClient(oauthServiceClient.GetShareClient(shareName)); // Arrange @@ -4648,7 +4650,7 @@ public async Task ListHandles_OAuth() string shareName = GetNewShareName(); ShareServiceClient sharedKeyServiceClient = SharesClientBuilder.GetServiceClient_OAuthAccount_SharedKey(); await using DisposingShare sharedKeyShare = await GetTestShareAsync(sharedKeyServiceClient, shareName); - ShareServiceClient oauthServiceClient = SharesClientBuilder.GetServiceClient_OAuth(); + ShareServiceClient oauthServiceClient = GetServiceClient_OAuth(); string directoryName = GetNewDirectoryName(); ShareDirectoryClient directory = InstrumentClient(oauthServiceClient.GetShareClient(shareName).GetDirectoryClient(directoryName)); @@ -4731,7 +4733,7 @@ public async Task ForceCloseHandles_OAuth() string shareName = GetNewShareName(); ShareServiceClient sharedKeyServiceClient = SharesClientBuilder.GetServiceClient_OAuthAccount_SharedKey(); await using DisposingShare sharedKeyShare = await GetTestShareAsync(sharedKeyServiceClient, shareName); - ShareServiceClient oauthServiceClient = SharesClientBuilder.GetServiceClient_OAuth(); + ShareServiceClient oauthServiceClient = GetServiceClient_OAuth(); string directoryName = GetNewDirectoryName(); ShareDirectoryClient directory = InstrumentClient(oauthServiceClient.GetShareClient(shareName).GetDirectoryClient(directoryName)); @@ -4830,7 +4832,7 @@ public async Task AcquireLeaseAsync_OAuth() string shareName = GetNewShareName(); ShareServiceClient sharedKeyServiceClient = SharesClientBuilder.GetServiceClient_OAuthAccount_SharedKey(); await using DisposingShare sharedKeyShare = await GetTestShareAsync(sharedKeyServiceClient, shareName); - ShareServiceClient oauthServiceClient = SharesClientBuilder.GetServiceClient_OAuth(); + ShareServiceClient oauthServiceClient = GetServiceClient_OAuth(); string directoryName = GetNewDirectoryName(); ShareDirectoryClient directory = InstrumentClient(oauthServiceClient.GetShareClient(shareName).GetDirectoryClient(directoryName)); @@ -4922,7 +4924,7 @@ public async Task ReleaseLeaseAsync_OAuth() string shareName = GetNewShareName(); ShareServiceClient sharedKeyServiceClient = SharesClientBuilder.GetServiceClient_OAuthAccount_SharedKey(); await using DisposingShare sharedKeyShare = await GetTestShareAsync(sharedKeyServiceClient, shareName); - ShareServiceClient oauthServiceClient = SharesClientBuilder.GetServiceClient_OAuth(); + ShareServiceClient oauthServiceClient = GetServiceClient_OAuth(); string directoryName = GetNewDirectoryName(); ShareDirectoryClient directory = InstrumentClient(oauthServiceClient.GetShareClient(shareName).GetDirectoryClient(directoryName)); @@ -5022,7 +5024,7 @@ public async Task ChangeLeaseAsync_OAuth() string shareName = GetNewShareName(); ShareServiceClient sharedKeyServiceClient = SharesClientBuilder.GetServiceClient_OAuthAccount_SharedKey(); await using DisposingShare sharedKeyShare = await GetTestShareAsync(sharedKeyServiceClient, shareName); - ShareServiceClient oauthServiceClient = SharesClientBuilder.GetServiceClient_OAuth(); + ShareServiceClient oauthServiceClient = GetServiceClient_OAuth(); string directoryName = GetNewDirectoryName(); ShareDirectoryClient directory = InstrumentClient(oauthServiceClient.GetShareClient(shareName).GetDirectoryClient(directoryName)); @@ -5151,7 +5153,7 @@ public async Task BreakLeaseAsync_OAuth() string shareName = GetNewShareName(); ShareServiceClient sharedKeyServiceClient = SharesClientBuilder.GetServiceClient_OAuthAccount_SharedKey(); await using DisposingShare sharedKeyShare = await GetTestShareAsync(sharedKeyServiceClient, shareName); - ShareServiceClient oauthServiceClient = SharesClientBuilder.GetServiceClient_OAuth(); + ShareServiceClient oauthServiceClient = GetServiceClient_OAuth(); string directoryName = GetNewDirectoryName(); ShareDirectoryClient directory = InstrumentClient(oauthServiceClient.GetShareClient(shareName).GetDirectoryClient(directoryName)); @@ -5300,7 +5302,7 @@ public async Task OpenWriteAsync_OAuth() string shareName = GetNewShareName(); ShareServiceClient sharedKeyServiceClient = SharesClientBuilder.GetServiceClient_OAuthAccount_SharedKey(); await using DisposingShare sharedKeyShare = await GetTestShareAsync(sharedKeyServiceClient, shareName); - ShareServiceClient oauthServiceClient = SharesClientBuilder.GetServiceClient_OAuth(); + ShareServiceClient oauthServiceClient = GetServiceClient_OAuth(); string directoryName = GetNewDirectoryName(); ShareDirectoryClient directory = InstrumentClient(oauthServiceClient.GetShareClient(shareName).GetDirectoryClient(directoryName)); @@ -6305,7 +6307,7 @@ public async Task RenameAsync_OAuth() string shareName = GetNewShareName(); ShareServiceClient sharedKeyServiceClient = SharesClientBuilder.GetServiceClient_OAuthAccount_SharedKey(); await using DisposingShare sharedKeyShare = await GetTestShareAsync(sharedKeyServiceClient, shareName); - ShareServiceClient oauthServiceClient = SharesClientBuilder.GetServiceClient_OAuth(); + ShareServiceClient oauthServiceClient = GetServiceClient_OAuth(); string directoryName = GetNewDirectoryName(); ShareDirectoryClient directory = InstrumentClient(oauthServiceClient.GetShareClient(shareName).GetDirectoryClient(directoryName)); diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/FileTestBase.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/FileTestBase.cs index 1e1ffb9e46275..a2b901bf2e383 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/FileTestBase.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/FileTestBase.cs @@ -107,6 +107,9 @@ public ShareServiceClient GetServiceClient_FileServiceSasFile(string shareName, new Uri($"{TestConfigDefault.FileServiceEndpoint}?{sasCredentials ?? GetNewFileServiceSasCredentialsFile(shareName, filePath, sharedKeyCredentials ?? Tenants.GetNewSharedKeyCredentials())}"), GetOptions())); + public ShareServiceClient GetServiceClient_OAuth() + => SharesClientBuilder.GetServiceClient_OAuth(TestEnvironment.Credential); + public SasQueryParameters GetNewAccountSasCredentials(StorageSharedKeyCredential sharedKeyCredentials = default, AccountSasResourceTypes resourceTypes = AccountSasResourceTypes.Container, AccountSasPermissions permissions = AccountSasPermissions.Create | AccountSasPermissions.Delete) diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/ShareClientTests.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/ShareClientTests.cs index 95d84b83fc57c..79a5a41809473 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/ShareClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/ShareClientTests.cs @@ -169,7 +169,7 @@ public async Task Ctor_DefaultAudience() ShareClient aadShare = InstrumentClient(new ShareClient( uriBuilder.ToUri(), - Tenants.GetOAuthCredential(), + TestEnvironment.Credential, options)); // Assert @@ -179,6 +179,7 @@ public async Task Ctor_DefaultAudience() } [RecordedTest] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_CustomAudience() { // Arrange @@ -194,7 +195,7 @@ public async Task Ctor_CustomAudience() ShareClient aadShare = InstrumentClient(new ShareClient( uriBuilder.ToUri(), - Tenants.GetOAuthCredential(), + TestEnvironment.Credential, options)); // Assert @@ -204,6 +205,7 @@ public async Task Ctor_CustomAudience() } [RecordedTest] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_StorageAccountAudience() { // Arrange @@ -219,7 +221,7 @@ public async Task Ctor_StorageAccountAudience() ShareClient aadShare = InstrumentClient(new ShareClient( uriBuilder.ToUri(), - Tenants.GetOAuthCredential(), + TestEnvironment.Credential, options)); // Assert @@ -465,7 +467,7 @@ public async Task CreateAndGetPermissionAsync_OAuth() string shareName = GetNewShareName(); ShareServiceClient sharedKeyServiceClient = SharesClientBuilder.GetServiceClient_OAuthAccount_SharedKey(); await using DisposingShare sharedKeyShare = await GetTestShareAsync(sharedKeyServiceClient, shareName); - ShareServiceClient oauthServiceClient = SharesClientBuilder.GetServiceClient_OAuth(); + ShareServiceClient oauthServiceClient = GetServiceClient_OAuth(); ShareClient share = oauthServiceClient.GetShareClient(shareName); // Arrange @@ -629,7 +631,7 @@ public async Task CreateIfNotExistsAsync_Error() // Act await TestHelper.AssertExpectedExceptionAsync( unauthorizesShareClient.CreateIfNotExistsAsync(), - e => Assert.AreEqual("ResourceNotFound", e.ErrorCode)); + e => Assert.AreEqual("NoAuthenticationInformation", e.ErrorCode)); } [RecordedTest] diff --git a/sdk/storage/Azure.Storage.Queues/assets.json b/sdk/storage/Azure.Storage.Queues/assets.json index bd4e0cd2b05bb..0e32fbc02a4bd 100644 --- a/sdk/storage/Azure.Storage.Queues/assets.json +++ b/sdk/storage/Azure.Storage.Queues/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/storage/Azure.Storage.Queues", - "Tag": "net/storage/Azure.Storage.Queues_ee3d77cf78" + "Tag": "net/storage/Azure.Storage.Queues_ef3164e0b2" } diff --git a/sdk/storage/Azure.Storage.Queues/tests/ClientBuilderExtensions.cs b/sdk/storage/Azure.Storage.Queues/tests/ClientBuilderExtensions.cs index 96a47b31d295b..2989caf9c96c8 100644 --- a/sdk/storage/Azure.Storage.Queues/tests/ClientBuilderExtensions.cs +++ b/sdk/storage/Azure.Storage.Queues/tests/ClientBuilderExtensions.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; +using Azure.Core; using QueuesClientBuilder = Azure.Storage.Test.Shared.ClientBuilder< Azure.Storage.Queues.QueueServiceClient, @@ -32,7 +33,7 @@ public static async Task GetTestQueueAsync( public static QueueServiceClient GetServiceClient_SharedKey(this QueuesClientBuilder clientBuilder, QueueClientOptions options = default) => clientBuilder.GetServiceClientFromSharedKeyConfig(clientBuilder.Tenants.TestConfigDefault, options); - public static QueueServiceClient GetServiceClient_OAuth(this QueuesClientBuilder clientBuilder, QueueClientOptions options = default) - => clientBuilder.GetServiceClientFromOauthConfig(clientBuilder.Tenants.TestConfigOAuth, options); + public static QueueServiceClient GetServiceClient_OAuth(this QueuesClientBuilder clientBuilder, TokenCredential tokenCredential, QueueClientOptions options = default) + => clientBuilder.GetServiceClientFromOauthConfig(clientBuilder.Tenants.TestConfigOAuth, tokenCredential, options); } } diff --git a/sdk/storage/Azure.Storage.Queues/tests/QueueClientTests.cs b/sdk/storage/Azure.Storage.Queues/tests/QueueClientTests.cs index 8ef3b3f3489ed..1010f466864ab 100644 --- a/sdk/storage/Azure.Storage.Queues/tests/QueueClientTests.cs +++ b/sdk/storage/Azure.Storage.Queues/tests/QueueClientTests.cs @@ -125,7 +125,7 @@ public void Ctor_Uri() public void Ctor_TokenCredential_Http() { // Arrange - TokenCredential tokenCredential = Tenants.GetOAuthCredential(Tenants.TestConfigHierarchicalNamespace); + TokenCredential tokenCredential = TestEnvironment.Credential; Uri uri = new Uri(Tenants.TestConfigPremiumBlob.BlobServiceEndpoint).ToHttp(); // Act @@ -181,7 +181,7 @@ public async Task Ctor_DefaultAudience() QueueClient aadQueue = InstrumentClient(new QueueClient( uriBuilder.ToUri(), - Tenants.GetOAuthCredential(), + TestEnvironment.Credential, options)); // Assert @@ -190,6 +190,7 @@ public async Task Ctor_DefaultAudience() } [RecordedTest] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_CustomAudience() { // Arrange @@ -205,7 +206,7 @@ public async Task Ctor_CustomAudience() QueueClient aadQueue = InstrumentClient(new QueueClient( uriBuilder.ToUri(), - Tenants.GetOAuthCredential(), + TestEnvironment.Credential, options)); // Assert @@ -214,6 +215,7 @@ public async Task Ctor_CustomAudience() } [RecordedTest] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_StorageAccountAudience() { // Arrange @@ -229,7 +231,7 @@ public async Task Ctor_StorageAccountAudience() QueueClient aadQueue = InstrumentClient(new QueueClient( uriBuilder.ToUri(), - Tenants.GetOAuthCredential(), + TestEnvironment.Credential, options)); // Assert @@ -310,7 +312,7 @@ public async Task CreateAsync_WithOauth() { // Arrange var queueName = GetNewQueueName(); - QueueServiceClient service = QueuesClientBuilder.GetServiceClient_OAuth(); + QueueServiceClient service = GetServiceClient_OAuth(); QueueClient queue = InstrumentClient(service.GetQueueClient(queueName)); try @@ -338,7 +340,7 @@ public async Task CreateAsync_WithOauthBearerChallenge() { Audience = QueueAudience.CreateQueueServiceAccountAudience("account"), }; - QueueServiceClient service = QueuesClientBuilder.GetServiceClient_OAuth(options); + QueueServiceClient service = GetServiceClient_OAuth(options); QueueClient queue = InstrumentClient(service.GetQueueClient(queueName)); try @@ -1968,13 +1970,14 @@ public async Task CanGetParentQueueServiceClient_WithAccountSAS() [RecordedTest] public void CanMockClientConstructors() { + TokenCredential mockTokenCredential = new Mock().Object; // One has to call .Object to trigger constructor. It's lazy. var mock = new Mock(TestConfigDefault.ConnectionString, "queuename", new QueueClientOptions()).Object; mock = new Mock(TestConfigDefault.ConnectionString, "queuename").Object; mock = new Mock(new Uri("https://test/test"), new QueueClientOptions()).Object; mock = new Mock(new Uri("https://test/test"), GetNewSharedKeyCredentials(), new QueueClientOptions()).Object; mock = new Mock(new Uri("https://test/test"), new AzureSasCredential("foo"), new QueueClientOptions()).Object; - mock = new Mock(new Uri("https://test/test"), Tenants.GetOAuthCredential(Tenants.TestConfigHierarchicalNamespace), new QueueClientOptions()).Object; + mock = new Mock(new Uri("https://test/test"), mockTokenCredential, new QueueClientOptions()).Object; } } } diff --git a/sdk/storage/Azure.Storage.Queues/tests/QueueTestBase.cs b/sdk/storage/Azure.Storage.Queues/tests/QueueTestBase.cs index 2059f6049bf8e..4f2e8094a8146 100644 --- a/sdk/storage/Azure.Storage.Queues/tests/QueueTestBase.cs +++ b/sdk/storage/Azure.Storage.Queues/tests/QueueTestBase.cs @@ -6,7 +6,6 @@ using System.Net; using System.Threading.Tasks; using Azure.Core; -using Azure.Core.Pipeline; using Azure.Core.TestFramework; using Azure.Storage.Queues.Models; using Azure.Storage.Sas; @@ -83,22 +82,22 @@ public QueueServiceClient GetServiceClient_QueueServiceSas(string queueName, Sto new Uri($"{TestConfigDefault.QueueServiceEndpoint}?{sasCredentials ?? GetNewQueueServiceSasCredentials(queueName, sharedKeyCredentials ?? GetNewSharedKeyCredentials())}"), GetOptions())); + public QueueServiceClient GetServiceClient_OAuth(QueueClientOptions options = default) + => QueuesClientBuilder.GetServiceClient_OAuth(TestEnvironment.Credential, options); + public Security.KeyVault.Keys.KeyClient GetKeyClient_TargetKeyClient() => GetKeyClient(TestConfigurations.DefaultTargetKeyVault); public TokenCredential GetTokenCredential_TargetKeyClient() => GetKeyClientTokenCredential(TestConfigurations.DefaultTargetKeyVault); - private static Security.KeyVault.Keys.KeyClient GetKeyClient(KeyVaultConfiguration config) + private Security.KeyVault.Keys.KeyClient GetKeyClient(KeyVaultConfiguration config) => new Security.KeyVault.Keys.KeyClient( new Uri(config.VaultEndpoint), GetKeyClientTokenCredential(config)); - private static TokenCredential GetKeyClientTokenCredential(KeyVaultConfiguration config) - => new Identity.ClientSecretCredential( - config.ActiveDirectoryTenantId, - config.ActiveDirectoryApplicationId, - config.ActiveDirectoryApplicationSecret); + private TokenCredential GetKeyClientTokenCredential(KeyVaultConfiguration config) + => TestEnvironment.Credential; public QueueServiceClient GetServiceClient_SecondaryAccount_ReadEnabledOnRetry(int numberOfReadFailuresToSimulate, out TestExceptionPolicy testExceptionPolicy, bool simulate404 = false) => GetSecondaryReadServiceClient(Tenants.TestConfigSecondary, numberOfReadFailuresToSimulate, out testExceptionPolicy, simulate404); diff --git a/sdk/storage/Azure.Storage.Queues/tests/ServiceClientTests.cs b/sdk/storage/Azure.Storage.Queues/tests/ServiceClientTests.cs index 9803bb34f07b9..140eb59095849 100644 --- a/sdk/storage/Azure.Storage.Queues/tests/ServiceClientTests.cs +++ b/sdk/storage/Azure.Storage.Queues/tests/ServiceClientTests.cs @@ -53,7 +53,7 @@ public void Ctor_ConnectionString() public void Ctor_TokenCredential_Http() { // Arrange - TokenCredential tokenCredential = Tenants.GetOAuthCredential(Tenants.TestConfigHierarchicalNamespace); + TokenCredential tokenCredential = TestEnvironment.Credential; Uri uri = new Uri(Tenants.TestConfigPremiumBlob.BlobServiceEndpoint).ToHttp(); // Act @@ -115,7 +115,7 @@ public async Task Ctor_DefaultAudience() QueueServiceClient aadService = InstrumentClient(new QueueServiceClient( new Uri(Tenants.TestConfigOAuth.QueueServiceEndpoint), - Tenants.GetOAuthCredential(), + TestEnvironment.Credential, options)); // Assert @@ -124,6 +124,7 @@ public async Task Ctor_DefaultAudience() } [RecordedTest] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_CustomAudience() { // Arrange @@ -134,7 +135,7 @@ public async Task Ctor_CustomAudience() QueueServiceClient aadService = InstrumentClient(new QueueServiceClient( new Uri(Tenants.TestConfigOAuth.QueueServiceEndpoint), - Tenants.GetOAuthCredential(), + TestEnvironment.Credential, options)); // Assert @@ -143,6 +144,7 @@ public async Task Ctor_CustomAudience() } [RecordedTest] + [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_StorageAccountAudience() { // Arrange @@ -153,7 +155,7 @@ public async Task Ctor_StorageAccountAudience() QueueServiceClient aadService = InstrumentClient(new QueueServiceClient( new Uri(Tenants.TestConfigOAuth.QueueServiceEndpoint), - Tenants.GetOAuthCredential(), + TestEnvironment.Credential, options)); // Assert @@ -613,13 +615,14 @@ public void GenerateAccountSas_WrongService_Service() [RecordedTest] public void CanMockClientConstructors() { + TokenCredential mockTokenCredential = new Mock().Object; // One has to call .Object to trigger constructor. It's lazy. var mock = new Mock(TestConfigDefault.ConnectionString, new QueueClientOptions()).Object; mock = new Mock(TestConfigDefault.ConnectionString).Object; mock = new Mock(new Uri("https://test/test"), new QueueClientOptions()).Object; mock = new Mock(new Uri("https://test/test"), GetNewSharedKeyCredentials(), new QueueClientOptions()).Object; mock = new Mock(new Uri("https://test/test"), new AzureSasCredential("foo"), new QueueClientOptions()).Object; - mock = new Mock(new Uri("https://test/test"), Tenants.GetOAuthCredential(Tenants.TestConfigHierarchicalNamespace), new QueueClientOptions()).Object; + mock = new Mock(new Uri("https://test/test"), mockTokenCredential, new QueueClientOptions()).Object; } } } diff --git a/sdk/storage/Azure.Storage.sln b/sdk/storage/Azure.Storage.sln index 19e368a8cb5a7..c8fe0e3b2fa6f 100644 --- a/sdk/storage/Azure.Storage.sln +++ b/sdk/storage/Azure.Storage.sln @@ -129,8 +129,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Storage.Blo EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Perf", "Perf", "{FBC7A205-B57A-44E7-A7CA-2E82F79A4D9C}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.Storage", "Microsoft.Azure.Management.Storage\src\Microsoft.Azure.Management.Storage.csproj", "{AD469AF8-0675-4159-A5B7-F486E48B29CE}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Test.HttpRecorder", "..\mgmtcommon\TestFramework\Microsoft.Azure.Test.HttpRecorder\Microsoft.Azure.Test.HttpRecorder.csproj", "{11D040BC-3A89-4BA1-A2C7-90A83A872555}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Rest.ClientRuntime.Azure.TestFramework", "..\mgmtcommon\TestFramework\ClientRuntime.Azure.TestFramework\Microsoft.Rest.ClientRuntime.Azure.TestFramework.csproj", "{AC65C1AC-82F8-482B-B88D-FA9E752D1BC7}" @@ -163,6 +161,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Storage.DataMovement. EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Storage.DataMovement.Blobs.Files.Shares.Tests", "Azure.Storage.DataMovement.Files.Shares\BlobToFileSharesTests\Azure.Storage.DataMovement.Blobs.Files.Shares.Tests.csproj", "{B08F17FE-7AFA-4777-B179-0FE15883EA50}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.Storage", "Azure.ResourceManager.Storage\src\Azure.ResourceManager.Storage.csproj", "{6EA8939A-537F-475E-B16C-F9E80825C6AD}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -357,6 +357,10 @@ Global {B08F17FE-7AFA-4777-B179-0FE15883EA50}.Debug|Any CPU.Build.0 = Debug|Any CPU {B08F17FE-7AFA-4777-B179-0FE15883EA50}.Release|Any CPU.ActiveCfg = Release|Any CPU {B08F17FE-7AFA-4777-B179-0FE15883EA50}.Release|Any CPU.Build.0 = Release|Any CPU + {6EA8939A-537F-475E-B16C-F9E80825C6AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6EA8939A-537F-475E-B16C-F9E80825C6AD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6EA8939A-537F-475E-B16C-F9E80825C6AD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6EA8939A-537F-475E-B16C-F9E80825C6AD}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/sdk/storage/storage-preview-public-msft.json b/sdk/storage/storage-preview-public-msft.json new file mode 100644 index 0000000000000..e35b5b7a0cd51 --- /dev/null +++ b/sdk/storage/storage-preview-public-msft.json @@ -0,0 +1,9 @@ +{ + "SubscriptionId": "23fddbc8-cb64-4b59-ba97-4c9f77c212e4", + "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "TestApplicationId": "f850650c-1fcf-4489-b46f-71af2e30d360", + "TestApplicationOid": "30511c9d-ba1a-4c7b-b422-5b543da11b3f", + "ProvisionerApplicationId": "f850650c-1fcf-4489-b46f-71af2e30d360", + "ProvisionerApplicationOid": "30511c9d-ba1a-4c7b-b422-5b543da11b3f", + "Environment": "AzureCloud" +} \ No newline at end of file diff --git a/sdk/storage/test-resources-post.ps1 b/sdk/storage/test-resources-post.ps1 index 2d19759f5d82b..1e06d517ff3f8 100644 --- a/sdk/storage/test-resources-post.ps1 +++ b/sdk/storage/test-resources-post.ps1 @@ -7,10 +7,7 @@ # is finished being deployed. The ARM template is responsible for creating the Storage accounts needed for live tests. param ( - [hashtable] $DeploymentOutputs, - [string] $TenantId, - [string] $TestApplicationId, - [string] $TestApplicationSecret + [hashtable] $DeploymentOutputs ) # outputs from the ARM deployment passed in from New-TestResources @@ -109,12 +106,8 @@ $content = Cloud $PrimaryAccountName $PrimaryAccountKey - $TestApplicationId - $TestApplicationSecret - $StorageTenantId $ResourceGroupName $SubscriptionId - https://login.microsoftonline.com/ https://$PrimaryAccountName.$PrimaryAccountBlobEndpointSuffix https://$PrimaryAccountName.$PrimaryAccountQueueEndpointSuffix https://$PrimaryAccountName.$PrimaryAccountTableEndpointSuffix @@ -130,10 +123,6 @@ $content = Cloud $DataLakeAccountName $DataLakeAccountKey - $TestApplicationId - $TestApplicationSecret - $StorageTenantId - https://login.microsoftonline.com/ https://$DataLakeAccountName.$DataLakeAccountBlobEndpointSuffix https://$DataLakeAccountName.$DataLakeAccountQueueEndpointSuffix https://$DataLakeAccountName.$DataLakeAccountFileEndpointSuffix @@ -171,10 +160,6 @@ $content = ClientsideEncryptionKeyvault $KeyVaultUri - $TestApplicationId - $TestApplicationSecret - $StorageTenantId - https://login.microsoftonline.com/ @@ -184,9 +169,6 @@ $content = $ResourceGroupName $SubscriptionId $Location - $TestApplicationId - $TestApplicationSecret - $StorageTenantId " diff --git a/sdk/storage/tests.yml b/sdk/storage/tests.yml index 6d5100c41d3b1..afd0b6eacfdc2 100644 --- a/sdk/storage/tests.yml +++ b/sdk/storage/tests.yml @@ -12,6 +12,8 @@ extends: Preview: SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources-preview) ServiceConnection: azure-sdk-tests + SubscriptionConfigurationFilePaths: + - sdk/storage/storage-preview-public-msft.json PrivatePreview: SubscriptionConfiguration: $(sub-config-storage-test-resources) Clouds: Preview @@ -30,6 +32,7 @@ extends: DYLD_LIBRARY_PATH: /usr/local/opt/openssl@3/lib ${{ if not(contains(variables['Build.DefinitionName'], 'tests-weekly')) }}: AZURE_ONLY_TEST_LATEST_SERVICE_VERSION: true + UseFederatedAuth: true TestSetupSteps: - template: /sdk/storage/tests-install-azurite.yml - bash: brew install openssl@3 From bb7bdf04a34f2106c445172b022d742d099a9cfe Mon Sep 17 00:00:00 2001 From: Jesse Squire Date: Fri, 12 Jul 2024 09:30:47 -0400 Subject: [PATCH 062/144] [KeyVault] Sample depedency versions (#44919) * [KeyVault] Sample depedency versions The focus of these changes is to bump the versions used by the sample. The current Identity reference is flagged for vulnerabilities. * Update sdk/keyvault/samples/getcert/getcert.csproj --- sdk/keyvault/samples/getcert/getcert.csproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/keyvault/samples/getcert/getcert.csproj b/sdk/keyvault/samples/getcert/getcert.csproj index 4a5f89a3229ed..c42bf31316d79 100644 --- a/sdk/keyvault/samples/getcert/getcert.csproj +++ b/sdk/keyvault/samples/getcert/getcert.csproj @@ -19,9 +19,9 @@ - - - + + + From f9ffc6b2c095d4f6dec792bba30d7b82cbb3cad8 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 12 Jul 2024 09:38:41 -0400 Subject: [PATCH 063/144] Increment package version after release of Azure.Communication.Email (#44957) --- .../Azure.Communication.Email/CHANGELOG.md | 10 ++++++++++ .../src/Azure.Communication.Email.csproj | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/sdk/communication/Azure.Communication.Email/CHANGELOG.md b/sdk/communication/Azure.Communication.Email/CHANGELOG.md index 5cd5a944f6386..a71356bf92fee 100644 --- a/sdk/communication/Azure.Communication.Email/CHANGELOG.md +++ b/sdk/communication/Azure.Communication.Email/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.1.0-beta.2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.1.0-beta.1 (2024-07-10) ### Features Added diff --git a/sdk/communication/Azure.Communication.Email/src/Azure.Communication.Email.csproj b/sdk/communication/Azure.Communication.Email/src/Azure.Communication.Email.csproj index 9acce0d190f43..3be2151f7788d 100644 --- a/sdk/communication/Azure.Communication.Email/src/Azure.Communication.Email.csproj +++ b/sdk/communication/Azure.Communication.Email/src/Azure.Communication.Email.csproj @@ -2,7 +2,7 @@ This client library enables working with the Microsoft Azure Communication Email service. Azure Communication Email Service - 1.1.0-beta.1 + 1.1.0-beta.2 1.0.1 Microsoft Azure Communication Email Service;Microsoft;Azure;Azure Communication Service;Azure Communication Email Service;Email;Communication From c6504f2963f3591d06078e85802acea7ff8ebb77 Mon Sep 17 00:00:00 2001 From: Jesse Squire Date: Fri, 12 Jul 2024 10:50:41 -0400 Subject: [PATCH 064/144] [EngSys] Clean up local debug code (#44978) The focus of these changes is to remove what appears to be local debug code that should not have made it into `main`. --- eng/service.proj | 5 ----- 1 file changed, 5 deletions(-) diff --git a/eng/service.proj b/eng/service.proj index 4fa28ff89678b..bc473731f3f12 100644 --- a/eng/service.proj +++ b/eng/service.proj @@ -72,11 +72,6 @@ - - - - - Date: Fri, 12 Jul 2024 10:51:04 -0400 Subject: [PATCH 065/144] [KeyVault] More sample dependency versions (#44920) * [KeyVault] More sample dependency versions The focus of these changes is to bump dependency versions used in the Share Link sample, moving to a non-vulnerable Identity version. Because Core is a transitive dependency, removed the explicit reference. * Update sdk/keyvault/samples/sharelink/ShareLink.csproj --- sdk/keyvault/samples/sharelink/ShareLink.csproj | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/sdk/keyvault/samples/sharelink/ShareLink.csproj b/sdk/keyvault/samples/sharelink/ShareLink.csproj index 019527f61f6e3..ca992a494cabc 100644 --- a/sdk/keyvault/samples/sharelink/ShareLink.csproj +++ b/sdk/keyvault/samples/sharelink/ShareLink.csproj @@ -16,8 +16,7 @@ true - - + @@ -30,12 +29,11 @@ - - - - + + + - + From b5043af86463e85528dc4d0a2c774a00e516d7b8 Mon Sep 17 00:00:00 2001 From: Anne Thompson Date: Fri, 12 Jul 2024 08:56:28 -0700 Subject: [PATCH 066/144] Update Core package version for Azure.Core 1.41.0 release (#44980) --- eng/Packages.Data.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index 53c61afeab195..09599b4c707df 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -108,7 +108,7 @@ - + From d220d5b460ddd2c3fa05027ccaf9ff7277ce22b6 Mon Sep 17 00:00:00 2001 From: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com> Date: Fri, 12 Jul 2024 10:33:15 -0700 Subject: [PATCH 067/144] Prepare for release (#44982) --- sdk/eventgrid/Azure.Messaging.EventGrid/CHANGELOG.md | 8 ++------ .../src/Azure.Messaging.EventGrid.csproj | 2 +- ...ailDeliveryReportReceivedEventData.Serialization.cs | 8 ++++---- ...entTrackingReportReceivedEventData.Serialization.cs | 8 ++++---- .../Azure.Messaging.EventGrid/src/autorest.md | 2 +- .../tests/ConsumeEventTests.cs | 10 +++++----- 6 files changed, 17 insertions(+), 21 deletions(-) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/CHANGELOG.md b/sdk/eventgrid/Azure.Messaging.EventGrid/CHANGELOG.md index 0f2eb98f42af4..08a8cccf37cb5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/CHANGELOG.md +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/CHANGELOG.md @@ -1,14 +1,10 @@ # Release History -## 4.25.0-beta.1 (Unreleased) - -### Features Added - -### Breaking Changes +## 4.24.1 (2024-07-16) ### Bugs Fixed -### Other Changes +- Fixed deserialization bugs in `AcsEmailEngagementTrackingReportReceivedEventData` and `AcsEmailDeliveryReportReceivedEventData` system events that caused the `DeliveryAttemptTimestamp` and `UserActionTimeStamp` properties to be null. ## 4.24.0 (2024-04-09) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Azure.Messaging.EventGrid.csproj b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Azure.Messaging.EventGrid.csproj index 045512770fc82..8eb6a0f9713f7 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Azure.Messaging.EventGrid.csproj +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Azure.Messaging.EventGrid.csproj @@ -2,7 +2,7 @@ This library can be used to publish events to Azure Event Grid and to consume events delivered by EventGrid. It also defines the event schemas for the events published to EventGrid by various Azure services. Microsoft Azure.Messaging.EventGrid client library - 4.25.0-beta.1 + 4.24.1 4.24.0 Microsoft Azure EventGrid;Event Grid;Event Grid Publishing; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailDeliveryReportReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailDeliveryReportReceivedEventData.Serialization.cs index 2ca8d3672fd41..58731f08f414d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailDeliveryReportReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailDeliveryReportReceivedEventData.Serialization.cs @@ -25,7 +25,7 @@ internal static AcsEmailDeliveryReportReceivedEventData DeserializeAcsEmailDeliv string messageId = default; AcsEmailDeliveryReportStatus? status = default; AcsEmailDeliveryReportStatusDetails deliveryStatusDetails = default; - DateTimeOffset? deliveryAttemptTimeStamp = default; + DateTimeOffset? deliveryAttemptTimestamp = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("sender"u8)) @@ -61,13 +61,13 @@ internal static AcsEmailDeliveryReportReceivedEventData DeserializeAcsEmailDeliv deliveryStatusDetails = AcsEmailDeliveryReportStatusDetails.DeserializeAcsEmailDeliveryReportStatusDetails(property.Value); continue; } - if (property.NameEquals("deliveryAttemptTimeStamp"u8)) + if (property.NameEquals("deliveryAttemptTimestamp"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - deliveryAttemptTimeStamp = property.Value.GetDateTimeOffset("O"); + deliveryAttemptTimestamp = property.Value.GetDateTimeOffset("O"); continue; } } @@ -77,7 +77,7 @@ internal static AcsEmailDeliveryReportReceivedEventData DeserializeAcsEmailDeliv messageId, status, deliveryStatusDetails, - deliveryAttemptTimeStamp); + deliveryAttemptTimestamp); } /// Deserializes the model from a raw response. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailEngagementTrackingReportReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailEngagementTrackingReportReceivedEventData.Serialization.cs index 0b948cc83358e..5e94fe7309f16 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailEngagementTrackingReportReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailEngagementTrackingReportReceivedEventData.Serialization.cs @@ -23,7 +23,7 @@ internal static AcsEmailEngagementTrackingReportReceivedEventData DeserializeAcs string sender = default; string recipient = default; string messageId = default; - DateTimeOffset? userActionTimeStamp = default; + DateTimeOffset? userActionTimestamp = default; string engagementContext = default; string userAgent = default; AcsUserEngagement? engagementType = default; @@ -44,13 +44,13 @@ internal static AcsEmailEngagementTrackingReportReceivedEventData DeserializeAcs messageId = property.Value.GetString(); continue; } - if (property.NameEquals("userActionTimeStamp"u8)) + if (property.NameEquals("userActionTimestamp"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - userActionTimeStamp = property.Value.GetDateTimeOffset("O"); + userActionTimestamp = property.Value.GetDateTimeOffset("O"); continue; } if (property.NameEquals("engagementContext"u8)) @@ -77,7 +77,7 @@ internal static AcsEmailEngagementTrackingReportReceivedEventData DeserializeAcs sender, recipient, messageId, - userActionTimeStamp, + userActionTimestamp, engagementContext, userAgent, engagementType); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md b/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md index 6d14ef9ad6a6c..0a5b3d31756e0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md @@ -4,7 +4,7 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml title: EventGridClient -require: https://github.com/Azure/azure-rest-api-specs/blob/5bc43b02efc097affda7d0bf23285f24433d6364/specification/eventgrid/data-plane/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/1b0e82df2f7f953796af2aee0372e34e00baa2d2/specification/eventgrid/data-plane/readme.md generation1-convenience-client: true model-factory-for-hlc: - MediaJobOutputAsset diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/tests/ConsumeEventTests.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/tests/ConsumeEventTests.cs index 53552c7eb3b23..1947755f7bc58 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/tests/ConsumeEventTests.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/tests/ConsumeEventTests.cs @@ -1799,7 +1799,7 @@ public void ConsumeAcsEmailDeliveryReportReceivedEvent() ""recipient"": ""test1@contoso.com"", ""messageId"": ""950850f5-bcdf-4315-b77a-6447cf56fac9"", ""status"": ""delivered"", - ""deliveryAttemptTimeStamp"": ""2023-02-09T19:46:12.2480265+00:00"", + ""deliveryAttemptTimestamp"": ""2023-02-09T19:46:12.2480265+00:00"", ""deliveryStatusDetails"": { ""statusMessage"": ""DestinationMailboxFull"" } @@ -1944,7 +1944,7 @@ public void ConsumeDicomImageCreatedEvent() ""subject"": ""{dicom-account}.dicom.azurehealthcareapis.com/v1/studies/1.2.3.4.3/series/1.2.3.4.3.9423673/instances/1.3.6.1.4.1.45096.2.296485376.2210.1633373143.864442"", ""eventType"": ""Microsoft.HealthcareApis.DicomImageCreated"", ""dataVersion"": ""1"", - ""metadataVersion"": ""1"", + ""metadataVersion"": ""1"", ""eventTime"": ""2022-09-15T01:14:04.5613214Z"", ""id"": ""d621839d-958b-4142-a638-bb966b4f7dfd"", ""data"": { @@ -1978,7 +1978,7 @@ public void ConsumeDicomImageUpdatedEvent() ""subject"": ""{dicom-account}.dicom.azurehealthcareapis.com/v1/studies/1.2.3.4.3/series/1.2.3.4.3.9423673/instances/1.3.6.1.4.1.45096.2.296485376.2210.1633373143.864442"", ""eventType"": ""Microsoft.HealthcareApis.DicomImageUpdated"", ""dataVersion"": ""1"", - ""metadataVersion"": ""1"", + ""metadataVersion"": ""1"", ""eventTime"": ""2022-09-15T01:14:04.5613214Z"", ""id"": ""d621839d-958b-4142-a638-bb966b4f7dfd"", ""data"": { @@ -2012,7 +2012,7 @@ public void ConsumeDicomImageDeletedEvent() ""subject"": ""{dicom-account}.dicom.azurehealthcareapis.com/v1/studies/1.2.3.4.3/series/1.2.3.4.3.9423673/instances/1.3.6.1.4.1.45096.2.296485376.2210.1633373143.864442"", ""eventType"": ""Microsoft.HealthcareApis.DicomImageDeleted"", ""dataVersion"": ""1"", - ""metadataVersion"": ""1"", + ""metadataVersion"": ""1"", ""eventTime"": ""2022-09-15T01:14:04.5613214Z"", ""id"": ""d621839d-958b-4142-a638-bb966b4f7dfd"", ""data"": { @@ -3689,7 +3689,7 @@ public void ConsumeCloudEventAcsEmailDeliveryReportReceivedEvent() ""deliveryStatusDetails"": { ""statusMessage"": ""DestinationMailboxFull"" }, - ""deliveryAttemptTimeStamp"": ""2023-02-09T19:46:12.2480265+00:00"" + ""deliveryAttemptTimestamp"": ""2023-02-09T19:46:12.2480265+00:00"" }, ""type"": ""Microsoft.Communication.EmailDeliveryReportReceived"", ""time"": ""2023-02-09T19:46:12.2478002Z"", From 16d7b15d53e3f30d366e216d80ade5db1b1d6fd7 Mon Sep 17 00:00:00 2001 From: minwoolee-msft <77083090+minwoolee-msft@users.noreply.github.com> Date: Fri, 12 Jul 2024 11:36:41 -0700 Subject: [PATCH 068/144] Disabling all CallingServer test as it is in the process of decomissioning (#44979) --- .../CallAutomationClientLiveTests.cs | 2 ++ .../CallAutomationClientTests.cs | 22 ++++++++++++++ .../CallConnection/CallConnectionLiveTests.cs | 5 ++++ .../CallConnection/CallConnectionTests.cs | 29 +++++++++++++++++++ .../tests/CallMedia/CallMediaLiveTests.cs | 1 + .../tests/CallMedia/CallMediaTests.cs | 6 ++-- .../CallRecording/CallRecordingLiveTests.cs | 1 + .../tests/CallRecording/CallRecordingTests.cs | 6 ++++ .../CallRecording/ContentDownloadLiveTests.cs | 4 +++ .../CallRecording/ContentDownloadTests.cs | 14 +++++++++ .../CallRecording/DeleteRecordingLiveTests.cs | 2 ++ .../CallRecording/DeleteRecordingTests.cs | 4 +++ .../Events/CallAutomationEventParserTests.cs | 10 +++++++ .../CallAutomationStreamingParserTests.cs | 4 +++ 14 files changed, 108 insertions(+), 2 deletions(-) diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/CallAutomationClient/CallAutomationClientLiveTests.cs b/sdk/communication/Azure.Communication.CallingServer/tests/CallAutomationClient/CallAutomationClientLiveTests.cs index 9c47ebd5a18ab..838b2846a6676 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/CallAutomationClient/CallAutomationClientLiveTests.cs +++ b/sdk/communication/Azure.Communication.CallingServer/tests/CallAutomationClient/CallAutomationClientLiveTests.cs @@ -15,6 +15,7 @@ public CallAutomationClientLiveTests(bool isAsync) : base(isAsync) } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public async Task CreateCallToACSGetCallAndHangUpCallTest() { /* Test case: ACS to ACS call @@ -65,6 +66,7 @@ public async Task CreateCallToACSGetCallAndHangUpCallTest() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public async Task CreateCallToPSTNGetCallAndHangUpCallTest() { /* Test case: ACS to PSTN call diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/CallAutomationClient/CallAutomationClientTests.cs b/sdk/communication/Azure.Communication.CallingServer/tests/CallAutomationClient/CallAutomationClientTests.cs index 2611327087b2d..920cb13e954ac 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/CallAutomationClient/CallAutomationClientTests.cs +++ b/sdk/communication/Azure.Communication.CallingServer/tests/CallAutomationClient/CallAutomationClientTests.cs @@ -18,6 +18,7 @@ public class CallAutomationClientTests : CallAutomationTestBase MediaStreamingAudioChannel.Mixed); [TestCaseSource(nameof(TestData_AnswerCall))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public async Task AnswerCallAsync_200OK(string incomingCallContext, Uri callbackUri) { CallAutomationClient callAutomationClient = CreateMockCallAutomationClient(200, CreateOrAnswerCallOrGetCallConnectionPayload); @@ -31,6 +32,7 @@ public async Task AnswerCallAsync_200OK(string incomingCallContext, Uri callback } [TestCaseSource(nameof(TestData_AnswerCall))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void AnswerCall_200OK(string incomingCallContext, Uri callbackUri) { CallAutomationClient callAutomationClient = CreateMockCallAutomationClient(200, CreateOrAnswerCallOrGetCallConnectionPayload); @@ -44,6 +46,7 @@ public void AnswerCall_200OK(string incomingCallContext, Uri callbackUri) } [TestCaseSource(nameof(TestData_AnswerCall))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public async Task AnswerCallWithOptionsAsync_200OK(string incomingCallContext, Uri callbackUri) { CallAutomationClient callAutomationClient = CreateMockCallAutomationClient(200, CreateOrAnswerCallOrGetCallConnectionWithMediaSubscriptionPayload); @@ -61,6 +64,7 @@ public async Task AnswerCallWithOptionsAsync_200OK(string incomingCallContext, U } [TestCaseSource(nameof(TestData_AnswerCall))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void AnswerCallWithOptions_200OK(string incomingCallContext, Uri callbackUri) { CallAutomationClient callAutomationClient = CreateMockCallAutomationClient(200, CreateOrAnswerCallOrGetCallConnectionWithMediaSubscriptionPayload); @@ -78,6 +82,7 @@ public void AnswerCallWithOptions_200OK(string incomingCallContext, Uri callback } [TestCaseSource(nameof(TestData_AnswerCall))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void AnswerCallAsync_401AuthFailed(string incomingCallContext, Uri callbackUri) { CallAutomationClient callAutomationClient = CreateMockCallAutomationClient(401); @@ -88,6 +93,7 @@ public void AnswerCallAsync_401AuthFailed(string incomingCallContext, Uri callba } [TestCaseSource(nameof(TestData_AnswerCall))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void AnswerCall_401AuthFailed(string incomingCallContext, Uri callbackUri) { CallAutomationClient callAutomationClient = CreateMockCallAutomationClient(401); @@ -98,6 +104,7 @@ public void AnswerCall_401AuthFailed(string incomingCallContext, Uri callbackUri } [TestCaseSource(nameof(TestData_RedirectCall))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public async Task RedirectCallAsync_204NoContent(string incomingCallContext, CommunicationIdentifier target) { CallAutomationClient callAutomationClient = CreateMockCallAutomationClient(204); @@ -108,6 +115,7 @@ public async Task RedirectCallAsync_204NoContent(string incomingCallContext, Com } [TestCaseSource(nameof(TestData_RedirectCall))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void RedirectCall_204NoContent(string incomingCallContext, CommunicationIdentifier target) { CallAutomationClient callAutomationClient = CreateMockCallAutomationClient(204); @@ -118,6 +126,7 @@ public void RedirectCall_204NoContent(string incomingCallContext, CommunicationI } [TestCaseSource(nameof(TestData_RedirectCall))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void RedirectCallAsync_404NotFound(string incomingCallContext, CommunicationIdentifier target) { CallAutomationClient callAutomationClient = CreateMockCallAutomationClient(404); @@ -128,6 +137,7 @@ public void RedirectCallAsync_404NotFound(string incomingCallContext, Communicat } [TestCaseSource(nameof(TestData_RedirectCall))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void RedirectCall_404NotFound(string incomingCallContext, CommunicationIdentifier target) { CallAutomationClient callAutomationClient = CreateMockCallAutomationClient(404); @@ -138,6 +148,7 @@ public void RedirectCall_404NotFound(string incomingCallContext, CommunicationId } [TestCaseSource(nameof(TestData_RejectCall))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public async Task RejectCallAsync_204NoContent(string incomingCallContext, CallRejectReason reason) { CallAutomationClient callAutomationClient = CreateMockCallAutomationClient(204); @@ -148,6 +159,7 @@ public async Task RejectCallAsync_204NoContent(string incomingCallContext, CallR } [TestCaseSource(nameof(TestData_RejectCall))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void RejectCall_204NoContent(string incomingCallContext, CallRejectReason reason) { CallAutomationClient callAutomationClient = CreateMockCallAutomationClient(204); @@ -158,6 +170,7 @@ public void RejectCall_204NoContent(string incomingCallContext, CallRejectReason } [TestCaseSource(nameof(TestData_RejectCall))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void RejectCallAsync_404NotFound(string incomingCallContext, CallRejectReason reason) { CallAutomationClient callAutomationClient = CreateMockCallAutomationClient(404); @@ -168,6 +181,7 @@ public void RejectCallAsync_404NotFound(string incomingCallContext, CallRejectRe } [TestCaseSource(nameof(TestData_RejectCall))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void RejectCall_404NotFound(string incomingCallContext, CallRejectReason reason) { CallAutomationClient callAutomationClient = CreateMockCallAutomationClient(404); @@ -178,6 +192,7 @@ public void RejectCall_404NotFound(string incomingCallContext, CallRejectReason } [TestCaseSource(nameof(TestData_CreateCall))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public async Task CreateCallAsync_201Created(CallSource source, CommunicationIdentifier[] targets, Uri callbackUri) { CallAutomationClient callAutomationClient = CreateMockCallAutomationClient(201, CreateOrAnswerCallOrGetCallConnectionPayload); @@ -192,6 +207,7 @@ public async Task CreateCallAsync_201Created(CallSource source, CommunicationIde } [TestCaseSource(nameof(TestData_CreateCall))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void CreateCall_201Created(CallSource source, CommunicationIdentifier[] targets, Uri callbackUri) { CallAutomationClient callAutomationClient = CreateMockCallAutomationClient(201, CreateOrAnswerCallOrGetCallConnectionPayload); @@ -206,6 +222,7 @@ public void CreateCall_201Created(CallSource source, CommunicationIdentifier[] t } [TestCaseSource(nameof(TestData_CreateCall))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public async Task CreateCallWithOptionsAsync_201Created(CallSource source, CommunicationIdentifier[] targets, Uri callbackUri) { CallAutomationClient callAutomationClient = CreateMockCallAutomationClient(201, CreateOrAnswerCallOrGetCallConnectionWithMediaSubscriptionPayload); @@ -228,6 +245,7 @@ public async Task CreateCallWithOptionsAsync_201Created(CallSource source, Commu } [TestCaseSource(nameof(TestData_CreateCall))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void CreateCallWithOptions_201Created(CallSource source, CommunicationIdentifier[] targets, Uri callbackUri) { CallAutomationClient callAutomationClient = CreateMockCallAutomationClient(201, CreateOrAnswerCallOrGetCallConnectionWithMediaSubscriptionPayload); @@ -250,6 +268,7 @@ public void CreateCallWithOptions_201Created(CallSource source, CommunicationIde } [TestCaseSource(nameof(TestData_CreateCall))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void CreateCallAsync_404NotFound(CallSource source, CommunicationIdentifier[] targets, Uri callbackUri) { CallAutomationClient callAutomationClient = CreateMockCallAutomationClient(404); @@ -260,6 +279,7 @@ public void CreateCallAsync_404NotFound(CallSource source, CommunicationIdentifi } [TestCaseSource(nameof(TestData_CreateCall))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void CreateCall_404NotFound(CallSource source, CommunicationIdentifier[] targets, Uri callbackUri) { CallAutomationClient callAutomationClient = CreateMockCallAutomationClient(404); @@ -270,6 +290,7 @@ public void CreateCall_404NotFound(CallSource source, CommunicationIdentifier[] } [TestCaseSource(nameof(TestData_GetCallConnection))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void GetCallConnection(string callConnectionId) { var response = new CallAutomationClient(ConnectionString).GetCallConnection(callConnectionId); @@ -279,6 +300,7 @@ public void GetCallConnection(string callConnectionId) } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void GetCallRecording() { var response = new CallAutomationClient(ConnectionString).GetCallRecording(); diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/CallConnection/CallConnectionLiveTests.cs b/sdk/communication/Azure.Communication.CallingServer/tests/CallConnection/CallConnectionLiveTests.cs index 972c6e9a853f2..6731db28d1a4a 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/CallConnection/CallConnectionLiveTests.cs +++ b/sdk/communication/Azure.Communication.CallingServer/tests/CallConnection/CallConnectionLiveTests.cs @@ -15,6 +15,7 @@ public CallConnectionLiveTests(bool isAsync) : base(isAsync) } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public async Task RemoveAPSTNUserFromAnOngoingCallTest() { /* Test case: @@ -71,6 +72,7 @@ public async Task RemoveAPSTNUserFromAnOngoingCallTest() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public async Task RemoveAPSTNUserAndAcsUserFromAnOngoingCallTest() { /* Test case: @@ -129,6 +131,7 @@ public async Task RemoveAPSTNUserAndAcsUserFromAnOngoingCallTest() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public async Task StartAGroupCallAndHangUpTest() { /* Test case: @@ -193,6 +196,7 @@ public async Task StartAGroupCallAndHangUpTest() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public async Task StartAGroupCallAndHangUpForEveryoneTest() { /* Test case: @@ -257,6 +261,7 @@ public async Task StartAGroupCallAndHangUpForEveryoneTest() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public async Task TransferACallFromOneUserToAnotherUserTest() { /* Test case: diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/CallConnection/CallConnectionTests.cs b/sdk/communication/Azure.Communication.CallingServer/tests/CallConnection/CallConnectionTests.cs index cd00799f3cde0..cc0e0429c32c6 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/CallConnection/CallConnectionTests.cs +++ b/sdk/communication/Azure.Communication.CallingServer/tests/CallConnection/CallConnectionTests.cs @@ -41,6 +41,7 @@ public class CallConnectionTests : CallAutomationTestBase private const string PhoneNumber = "+11234567"; [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public async Task GetCallConnectionPropertiesAsync_200OK() { var callConnection = CreateMockCallConnection(200, CreateOrAnswerCallOrGetCallConnectionPayload); @@ -53,6 +54,7 @@ public async Task GetCallConnectionPropertiesAsync_200OK() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void GetCallConnectionProperties_200OK() { var callConnection = CreateMockCallConnection(200, CreateOrAnswerCallOrGetCallConnectionPayload); @@ -64,6 +66,7 @@ public void GetCallConnectionProperties_200OK() verifyCallConnectionProperties(response); } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void GetCallConnectionPropertiesAsync_404NotFound() { var callConnection = CreateMockCallConnection(404); @@ -74,6 +77,7 @@ public void GetCallConnectionPropertiesAsync_404NotFound() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void GetCallConnectionProperties_404NotFound() { var callConnection = CreateMockCallConnection(404); @@ -84,6 +88,7 @@ public void GetCallConnectionProperties_404NotFound() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public async Task HangupCallAsync_204NoContent() { var callConnection = CreateMockCallConnection(204); @@ -93,6 +98,7 @@ public async Task HangupCallAsync_204NoContent() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void HangupCall_204NoContent() { var callConnection = CreateMockCallConnection(204); @@ -102,6 +108,7 @@ public void HangupCall_204NoContent() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void HangUpCallAsync_404NotFound() { var callConnection = CreateMockCallConnection(404); @@ -112,6 +119,7 @@ public void HangUpCallAsync_404NotFound() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void HangUpCall_404NotFound() { var callConnection = CreateMockCallConnection(404); @@ -122,6 +130,7 @@ public void HangUpCall_404NotFound() } [TestCaseSource(nameof(TestData_TransferCallToParticipant))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public async Task TransferCallToParticipantAsync_202Accepted(CommunicationIdentifier targetParticipant) { var callConnection = CreateMockCallConnection(202, TransferCallOrRemoveParticipantsPayload); @@ -132,6 +141,7 @@ public async Task TransferCallToParticipantAsync_202Accepted(CommunicationIdenti } [TestCaseSource(nameof(TestData_TransferCallToParticipant))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void TransferCallToParticipant_202Accepted(CommunicationIdentifier targetParticipant) { var callConnection = CreateMockCallConnection(202, TransferCallOrRemoveParticipantsPayload); @@ -142,6 +152,7 @@ public void TransferCallToParticipant_202Accepted(CommunicationIdentifier target } [TestCaseSource(nameof(TestData_TransferCallToParticipant))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void TransferCallToParticipantAsync_404NotFound(CommunicationIdentifier targetParticipant) { var callConnection = CreateMockCallConnection(404); @@ -152,6 +163,7 @@ public void TransferCallToParticipantAsync_404NotFound(CommunicationIdentifier t } [TestCaseSource(nameof(TestData_TransferCallToParticipant))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void TransferCallToParticipant_404NotFound(CommunicationIdentifier targetParticipant) { var callConnection = CreateMockCallConnection(404); @@ -162,6 +174,7 @@ public void TransferCallToParticipant_404NotFound(CommunicationIdentifier target } [TestCaseSource(nameof(TestData_AddOrRemoveParticipants))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public async Task AddParticipantsAsync_202Accepted(CommunicationIdentifier[] participantsToAdd) { var callConnection = CreateMockCallConnection(202, AddParticipantsPayload); @@ -172,6 +185,7 @@ public async Task AddParticipantsAsync_202Accepted(CommunicationIdentifier[] par } [TestCaseSource(nameof(TestData_AddOrRemoveParticipants))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void AddParticipants_202Accepted(CommunicationIdentifier[] participantsToAdd) { var callConnection = CreateMockCallConnection(202, AddParticipantsPayload); @@ -182,6 +196,7 @@ public void AddParticipants_202Accepted(CommunicationIdentifier[] participantsTo } [TestCaseSource(nameof(TestData_AddOrRemoveParticipants))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void AddParticipantsAsync_404NotFound(CommunicationIdentifier[] participantsToAdd) { var callConnection = CreateMockCallConnection(404); @@ -192,6 +207,7 @@ public void AddParticipantsAsync_404NotFound(CommunicationIdentifier[] participa } [TestCaseSource(nameof(TestData_AddOrRemoveParticipants))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void AddParticipants_404NotFound(CommunicationIdentifier[] participantsToAdd) { var callConnection = CreateMockCallConnection(404); @@ -202,6 +218,7 @@ public void AddParticipants_404NotFound(CommunicationIdentifier[] participantsTo } [TestCaseSource(nameof(TestData_GetParticipant))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public async Task GetParticipantAsync_200OK(string participantMri) { var callConnection = CreateMockCallConnection(200, GetParticipantPayload); @@ -212,6 +229,7 @@ public async Task GetParticipantAsync_200OK(string participantMri) } [TestCaseSource(nameof(TestData_GetParticipant))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void GetParticipant_200OK(string participantMri) { var callConnection = CreateMockCallConnection(200, GetParticipantPayload); @@ -222,6 +240,7 @@ public void GetParticipant_200OK(string participantMri) } [TestCaseSource(nameof(TestData_GetParticipant))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void GetParticipantAsync_404NotFound(string participantMri) { var callConnection = CreateMockCallConnection(404); @@ -232,6 +251,7 @@ public void GetParticipantAsync_404NotFound(string participantMri) } [TestCaseSource(nameof(TestData_GetParticipant))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void GetParticipant_404NotFound(string participantMri) { var callConnection = CreateMockCallConnection(404); @@ -242,6 +262,7 @@ public void GetParticipant_404NotFound(string participantMri) } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public async Task GetParticipantsAsync_200OK() { var callConnection = CreateMockCallConnection(200, GetParticipantsPayload); @@ -252,6 +273,7 @@ public async Task GetParticipantsAsync_200OK() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void GetParticipants_200OK() { var callConnection = CreateMockCallConnection(200, GetParticipantsPayload); @@ -262,6 +284,7 @@ public void GetParticipants_200OK() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void GetParticipantsAsync_404NotFound() { var callConnection = CreateMockCallConnection(404); @@ -272,6 +295,7 @@ public void GetParticipantsAsync_404NotFound() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void GetParticipants_404NotFound() { var callConnection = CreateMockCallConnection(404); @@ -282,6 +306,7 @@ public void GetParticipants_404NotFound() } [TestCaseSource(nameof(TestData_AddOrRemoveParticipants))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public async Task RemoveParticipantsAsync_202Accepted(CommunicationIdentifier[] participants) { var callConnection = CreateMockCallConnection(202, TransferCallOrRemoveParticipantsPayload); @@ -292,6 +317,7 @@ public async Task RemoveParticipantsAsync_202Accepted(CommunicationIdentifier[] } [TestCaseSource(nameof(TestData_AddOrRemoveParticipants))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void RemoveParticipants_202Accepted(CommunicationIdentifier[] participants) { var callConnection = CreateMockCallConnection(202, TransferCallOrRemoveParticipantsPayload); @@ -302,6 +328,7 @@ public void RemoveParticipants_202Accepted(CommunicationIdentifier[] participant } [TestCaseSource(nameof(TestData_AddOrRemoveParticipants))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void RemoveParticipantsAsync_404NotFound(CommunicationIdentifier[] participants) { var callConnection = CreateMockCallConnection(404); @@ -312,6 +339,7 @@ public void RemoveParticipantsAsync_404NotFound(CommunicationIdentifier[] partic } [TestCaseSource(nameof(TestData_AddOrRemoveParticipants))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void RemoveParticipants_404NotFound(CommunicationIdentifier[] participants) { var callConnection = CreateMockCallConnection(404); @@ -322,6 +350,7 @@ public void RemoveParticipants_404NotFound(CommunicationIdentifier[] participant } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void GetCallMediaTest() { var connectionId = "someId"; diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/CallMedia/CallMediaLiveTests.cs b/sdk/communication/Azure.Communication.CallingServer/tests/CallMedia/CallMediaLiveTests.cs index 17a20cd8997ab..da2a5037cb04d 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/CallMedia/CallMediaLiveTests.cs +++ b/sdk/communication/Azure.Communication.CallingServer/tests/CallMedia/CallMediaLiveTests.cs @@ -13,6 +13,7 @@ public CallMediaLiveTests(bool isAsync) : base(isAsync) { } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public async Task PlayAudio() { if (SkipCallingServerInteractionLiveTests) diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/CallMedia/CallMediaTests.cs b/sdk/communication/Azure.Communication.CallingServer/tests/CallMedia/CallMediaTests.cs index 37b07f61b2126..99b9e642aed88 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/CallMedia/CallMediaTests.cs +++ b/sdk/communication/Azure.Communication.CallingServer/tests/CallMedia/CallMediaTests.cs @@ -44,7 +44,7 @@ public void Setup() } [TestCaseSource(nameof(TestData_PlayOperationsAsync))] - + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public async Task MediaOperationsAsync_Return202Accepted(Func> operation) { if (_callMedia != null) @@ -56,7 +56,7 @@ public async Task MediaOperationsAsync_Return202Accepted(Func operation) { if (_callMedia != null) @@ -68,6 +68,7 @@ public void MediaOperations_Return202Accepted(Func operatio } [TestCaseSource(nameof(TestData_PlayOperationsAsync))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void MediaOperationsAsync_Return404NotFound(Func> operation) { CallAutomationClient callAutomationClient = CreateMockCallAutomationClient(404); @@ -80,6 +81,7 @@ public void MediaOperationsAsync_Return404NotFound(Func operation) { CallAutomationClient callAutomationClient = CreateMockCallAutomationClient(404); diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/CallRecording/CallRecordingLiveTests.cs b/sdk/communication/Azure.Communication.CallingServer/tests/CallRecording/CallRecordingLiveTests.cs index cc22617e5e3ba..c4d4214533b54 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/CallRecording/CallRecordingLiveTests.cs +++ b/sdk/communication/Azure.Communication.CallingServer/tests/CallRecording/CallRecordingLiveTests.cs @@ -13,6 +13,7 @@ public CallRecordingLiveTests(bool isAsync) : base(isAsync) { } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public async Task RecordingOperations() { if (SkipCallingServerInteractionLiveTests) diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/CallRecording/CallRecordingTests.cs b/sdk/communication/Azure.Communication.CallingServer/tests/CallRecording/CallRecordingTests.cs index 165cd6dc1a304..297d7847acb58 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/CallRecording/CallRecordingTests.cs +++ b/sdk/communication/Azure.Communication.CallingServer/tests/CallRecording/CallRecordingTests.cs @@ -21,6 +21,7 @@ public class CallRecordingTests : CallAutomationTestBase private static readonly Uri _callBackUri = new Uri("https://somecallbackurl"); [TestCaseSource(nameof(TestData_OperationsWithStatus))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void RecordingOperations_WithRecordingStatus_Success(Func operation) { CallRecording callRecording = getMockCallRecording(200, responseContent: DummyRecordingStatusResponse); @@ -31,6 +32,7 @@ public void RecordingOperations_WithRecordingStatus_Success(Func>> operation) { CallRecording callRecording = getMockCallRecording(200, responseContent: DummyRecordingStatusResponse); @@ -41,6 +43,7 @@ public async Task RecordingOperationsAsync_WithRecordingStatus_Success(Func operation) { CallRecording callRecording = getMockCallRecording(expectedStatusCode); @@ -50,6 +53,7 @@ public void RecordingOperations_ReturnsSuccess(int expectedStatusCode, HttpStatu } [TestCaseSource(nameof(TestData_OperationsAsyncSuccess))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public async Task RecordingOperationsAsync_ReturnsSuccess(int expectedStatusCode, HttpStatusCode httpStatusCode, Func> operation) { CallRecording callRecording = getMockCallRecording(expectedStatusCode); @@ -59,6 +63,7 @@ public async Task RecordingOperationsAsync_ReturnsSuccess(int expectedStatusCode } [TestCaseSource(nameof(TestData_Operations404))] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void RecordingOperation_Returns404NotFound(Func operation) { CallRecording callRecording = getMockCallRecording(404); @@ -68,6 +73,7 @@ public void RecordingOperation_Returns404NotFound(Func operation) { CallRecording callRecording = getMockCallRecording(404); diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/CallRecording/ContentDownloadLiveTests.cs b/sdk/communication/Azure.Communication.CallingServer/tests/CallRecording/ContentDownloadLiveTests.cs index afdf21fee4355..9dcc44cbe3868 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/CallRecording/ContentDownloadLiveTests.cs +++ b/sdk/communication/Azure.Communication.CallingServer/tests/CallRecording/ContentDownloadLiveTests.cs @@ -15,6 +15,7 @@ public ContentDownloadLiveTests(bool isAsync) : base(isAsync) { } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public async Task DownloadMetadata() { if (SkipCallingServerInteractionLiveTests) @@ -33,6 +34,7 @@ public async Task DownloadMetadata() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public async Task DownloadMetadata_404() { if (SkipCallingServerInteractionLiveTests) @@ -65,6 +67,7 @@ public async Task DownloadMetadata_404() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public async Task DownloadMetadataRange() { if (SkipCallingServerInteractionLiveTests) @@ -83,6 +86,7 @@ public async Task DownloadMetadataRange() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] /// This test tries to get a US stored document id from EU endpoint. /// The backend server will redirect (respond with a 302) the request to a US endpoint /// and the SDK should be able to make the new request with no error. diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/CallRecording/ContentDownloadTests.cs b/sdk/communication/Azure.Communication.CallingServer/tests/CallRecording/ContentDownloadTests.cs index 0d13619a0036d..ae749d5913122 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/CallRecording/ContentDownloadTests.cs +++ b/sdk/communication/Azure.Communication.CallingServer/tests/CallRecording/ContentDownloadTests.cs @@ -47,6 +47,7 @@ public class ContentDownloadTests : CallAutomationTestBase }; [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void DownloadMetadata_Test() { CallAutomationClient _callAutomationClient = CreateMockCallAutomationClient(200, DummyRecordingMetadata); @@ -57,6 +58,7 @@ public void DownloadMetadata_Test() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public async Task DownloadMetadataAsync_Test() { CallAutomationClient _callAutomationClient = CreateMockCallAutomationClient(200, DummyRecordingMetadata); @@ -67,6 +69,7 @@ public async Task DownloadMetadataAsync_Test() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void DownloadRecording_Test() { CallAutomationClient _callAutomationClient = CreateMockCallAutomationClient(200, _dummyRecordingStream); @@ -77,6 +80,7 @@ public void DownloadRecording_Test() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void DownloadRecordingByRanges_Test() { CallAutomationClient _callAutomationClient = CreateMockCallAutomationClient(206, _dummyRecordingStream.Take(5).ToArray(), _rangeResponseHeaders); @@ -87,6 +91,7 @@ public void DownloadRecordingByRanges_Test() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public async Task DownloadRecordingAsync_Test() { CallAutomationClient _callAutomationClient = CreateMockCallAutomationClient(200, _dummyRecordingStream); @@ -97,6 +102,7 @@ public async Task DownloadRecordingAsync_Test() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public async Task DownloadRecordingByRangesAsync_Test() { CallAutomationClient _callAutomationClient = CreateMockCallAutomationClient(206, _dummyRecordingStream.Take(5).ToArray(), _rangeResponseHeaders); @@ -107,6 +113,7 @@ public async Task DownloadRecordingByRangesAsync_Test() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void DownloadRecordingToStream_Test() { HttpHeader[] rangeHeaderResponse = new HttpHeader[] @@ -127,6 +134,7 @@ public void DownloadRecordingToStream_Test() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void DownloadRecordingToStream_ContentTransferOptions_Test() { ContentTransferOptions options = new() @@ -158,6 +166,7 @@ public void DownloadRecordingToStream_ContentTransferOptions_Test() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void DownloadNotExistentContent_Failure_Test() { CallAutomationClient _callAutomationClient = CreateMockCallAutomationClient(404); @@ -167,6 +176,7 @@ public void DownloadNotExistentContent_Failure_Test() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void DownloadNotExistentContentAsync_Failure_Test() { CallAutomationClient _callAutomationClient = CreateMockCallAutomationClient(404); @@ -176,6 +186,7 @@ public void DownloadNotExistentContentAsync_Failure_Test() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void AccessDenied_Failure_Test() { CallAutomationClient _callAutomationClient = CreateMockCallAutomationClient(401); @@ -185,6 +196,7 @@ public void AccessDenied_Failure_Test() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void AccessDeniedAsync_Failure_Test() { CallAutomationClient _callAutomationClient = CreateMockCallAutomationClient(401); @@ -194,6 +206,7 @@ public void AccessDeniedAsync_Failure_Test() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void ParallelDownloadWithInvalidRangeFirst() { MockResponse invalidResponse = new(416); // Invalid range @@ -221,6 +234,7 @@ public void ParallelDownloadWithInvalidRangeFirst() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public async Task ParallelDownloadWithInvalidRangeFirstAsync() { MockResponse invalidResponse = new(416); // Invalid range diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/CallRecording/DeleteRecordingLiveTests.cs b/sdk/communication/Azure.Communication.CallingServer/tests/CallRecording/DeleteRecordingLiveTests.cs index 30329b1d9b601..d3aacd0a9379f 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/CallRecording/DeleteRecordingLiveTests.cs +++ b/sdk/communication/Azure.Communication.CallingServer/tests/CallRecording/DeleteRecordingLiveTests.cs @@ -13,6 +13,7 @@ public DeleteRecordingLiveTests(bool isAsync) : base(isAsync) { } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public async Task DeleteRecording() { if (SkipCallingServerInteractionLiveTests) @@ -30,6 +31,7 @@ public async Task DeleteRecording() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public async Task DeleteRecording404() { if (SkipCallingServerInteractionLiveTests) diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/CallRecording/DeleteRecordingTests.cs b/sdk/communication/Azure.Communication.CallingServer/tests/CallRecording/DeleteRecordingTests.cs index 4c93c8f12b679..83f0877765a7f 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/CallRecording/DeleteRecordingTests.cs +++ b/sdk/communication/Azure.Communication.CallingServer/tests/CallRecording/DeleteRecordingTests.cs @@ -13,6 +13,7 @@ public class DeleteRecordingTests : CallAutomationTestBase private const string AmsDeleteUrl = "https://dummyurl.com/v1/objects/documentid"; [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void DeleteRecording_Returns200Ok() { CallAutomationClient callAutomationClient = CreateMockCallAutomationClient(200); @@ -21,6 +22,7 @@ public void DeleteRecording_Returns200Ok() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public async Task DeleteRecordingAsync_Returns200Ok() { CallAutomationClient callAutomationClient = CreateMockCallAutomationClient(200); @@ -29,6 +31,7 @@ public async Task DeleteRecordingAsync_Returns200Ok() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void DeleteRecording_Returns404NotFound() { CallAutomationClient callAutomationClient = CreateMockCallAutomationClient(404); @@ -39,6 +42,7 @@ public void DeleteRecording_Returns404NotFound() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void DeleteRecording_Returns401Unauthorized() { CallAutomationClient callAutomationClient = CreateMockCallAutomationClient(401); diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/Events/CallAutomationEventParserTests.cs b/sdk/communication/Azure.Communication.CallingServer/tests/Events/CallAutomationEventParserTests.cs index 88bccb3a9a905..8ed88b947b705 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/Events/CallAutomationEventParserTests.cs +++ b/sdk/communication/Azure.Communication.CallingServer/tests/Events/CallAutomationEventParserTests.cs @@ -13,6 +13,7 @@ namespace Azure.Communication.CallingServer.Tests.Events public class CallAutomationEventParserTests { [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void EventParserShouldParseEventWithEventDataAndType() { // arrange @@ -35,6 +36,7 @@ public void EventParserShouldParseEventWithEventDataAndType() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void EventParserShouldParseEventWithCloudEvent() { // arrange @@ -62,6 +64,7 @@ public void EventParserShouldParseEventWithCloudEvent() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void EventParserShouldParseEventWithBinaryData() { // arrange @@ -89,6 +92,7 @@ public void EventParserShouldParseEventWithBinaryData() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void EventParserShouldParseEventsWithCloudEvents() { // arrange @@ -132,6 +136,7 @@ public void EventParserShouldParseEventsWithCloudEvents() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void EventParserShouldParseEventsWithBinaryData() { // arrange @@ -175,6 +180,7 @@ public void EventParserShouldParseEventsWithBinaryData() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void RecordingStateChangedEventParsed_Test() { CallRecordingStateChanged @event = CommunicationCallingServerModelFactory.CallRecordingStateChanged( @@ -201,6 +207,7 @@ public void RecordingStateChangedEventParsed_Test() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void PlayCompletedEventParsed_Test() { PlayCompleted @event = CommunicationCallingServerModelFactory.PlayCompleted( @@ -225,6 +232,7 @@ public void PlayCompletedEventParsed_Test() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void PlayFailedEventParsed_Test() { PlayFailed @event = CommunicationCallingServerModelFactory.PlayFailed( @@ -249,6 +257,7 @@ public void PlayFailedEventParsed_Test() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void RecognizeCompletedEventParsed_Test() { RecognizeCompleted @event = CommunicationCallingServerModelFactory.RecognizeCompleted( @@ -282,6 +291,7 @@ public void RecognizeCompletedEventParsed_Test() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void RecognizeFailedEventParsed_Test() { RecognizeFailed @event = CommunicationCallingServerModelFactory.RecognizeFailed( diff --git a/sdk/communication/Azure.Communication.CallingServer/tests/MediaStreaming/CallAutomationStreamingParserTests.cs b/sdk/communication/Azure.Communication.CallingServer/tests/MediaStreaming/CallAutomationStreamingParserTests.cs index 1aed3c0e9cd46..8363c1c118cfb 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests/MediaStreaming/CallAutomationStreamingParserTests.cs +++ b/sdk/communication/Azure.Communication.CallingServer/tests/MediaStreaming/CallAutomationStreamingParserTests.cs @@ -10,6 +10,7 @@ namespace Azure.Communication.CallingServer.Tests.MediaStreaming internal class CallAutomationStreamingParserTests { [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void ParseMetadata_Test() { string metadataJson = "{" @@ -27,6 +28,7 @@ public void ParseMetadata_Test() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void ParseAudio_Test() { string audioJson = "{" @@ -41,6 +43,7 @@ public void ParseAudio_Test() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void ParseBinaryData() { JObject jsonData = new JObject(); @@ -56,6 +59,7 @@ public void ParseBinaryData() } [Test] + [Ignore("Disabling this test as the library is flagged for decomissioning.")] public void ParseAudioEventsWithBynaryArray() { JObject jsonAudio = new JObject(); From 88c8a9003869c490ff4a6cf28cd6df4f4b02da3d Mon Sep 17 00:00:00 2001 From: James Suplizio Date: Fri, 12 Jul 2024 12:50:48 -0700 Subject: [PATCH 069/144] Adding some verbose output to help diagnose something going awry with docs gen (#44965) * Adding some verbose output to help diagnose something going awry with docs gen * see what happens if there is no target * update commands that fail to log warnings --- doc/ApiDocGeneration/Generate-Api-Docs.ps1 | 44 ++++++++++++++++++---- 1 file changed, 37 insertions(+), 7 deletions(-) diff --git a/doc/ApiDocGeneration/Generate-Api-Docs.ps1 b/doc/ApiDocGeneration/Generate-Api-Docs.ps1 index 48405afdcd6db..be6bd0cb083c6 100644 --- a/doc/ApiDocGeneration/Generate-Api-Docs.ps1 +++ b/doc/ApiDocGeneration/Generate-Api-Docs.ps1 @@ -49,6 +49,10 @@ Param ( $ArtifactStagingDirectory ) +function Log-Warning($message) { + Write-Host "##vso[task.logissue type=warning]$message" +} + function UpdateDocIndexFiles([string]$docPath, [string] $mainJsPath) { # Update docfx.json $docfxContent = Get-Content -Path $docPath -Raw @@ -86,27 +90,53 @@ if ($LibType -eq 'management') { Write-Verbose "Package Location ${PackageLocation}" Write-Verbose "Create Directories Required for Doc Generation" +Write-Verbose "Creating ApiDir '$ApiDir'" mkdir $ApiDir +Write-Verbose "Creating ApiDependenciesDir '$ApiDependenciesDir'" mkdir $ApiDependenciesDir +Write-Verbose "Creating XmlOutDir '$XmlOutDir'" mkdir $XmlOutDir +Write-Verbose "Creating YamlOutDir '$YamlOutDir'" mkdir $YamlOutDir +Write-Verbose "Creating DocOutDir '$DocOutDir'" mkdir $DocOutDir if ($LibType -eq 'client') { Write-Verbose "Build Packages for Doc Generation - Client" - dotnet build "${RepoRoot}/eng/service.proj" /p:ServiceDirectory=$PackageLocation /p:IncludeTests=false /p:IncludeSamples=false /p:IncludePerf=false /p:IncludeStress=false /p:OutputPath=$ApiDir /p:TargetFramework=netstandard2.0 - - Write-Verbose "Include client Dependencies" - dotnet build "${RepoRoot}/eng/service.proj" /p:ServiceDirectory=$PackageLocation /p:IncludeTests=false /p:IncludeSamples=false /p:IncludePerf=false /p:IncludeStress=false /p:OutputPath=$ApiDependenciesDir /p:TargetFramework=netstandard2.0 /p:CopyLocalLockFileAssemblies=true -} - -if ($LibType -eq 'management') { + Write-Verbose "dotnet build '${RepoRoot}/eng/service.proj' /p:ServiceDirectory=$PackageLocation /p:IncludeTests=false /p:IncludeSamples=false /p:IncludePerf=false /p:IncludeStress=false /p:OutputPath=$ApiDir" + dotnet build "${RepoRoot}/eng/service.proj" /p:ServiceDirectory=$PackageLocation /p:IncludeTests=false /p:IncludeSamples=false /p:IncludePerf=false /p:IncludeStress=false /p:OutputPath=$ApiDir + if ($LASTEXITCODE -ne 0) { + Log-Warning "Build Packages for Doc Generation - Client failed with $LASTEXITCODE please see output above" + exit 0 + } + + Write-Verbose "Include Client Dependencies" + Write-Verbose "'${RepoRoot}/eng/service.proj' /p:ServiceDirectory=$PackageLocation /p:IncludeTests=false /p:IncludeSamples=false /p:IncludePerf=false /p:IncludeStress=false /p:OutputPath=$ApiDependenciesDir /p:CopyLocalLockFileAssemblies=true" + dotnet build "${RepoRoot}/eng/service.proj" /p:ServiceDirectory=$PackageLocation /p:IncludeTests=false /p:IncludeSamples=false /p:IncludePerf=false /p:IncludeStress=false /p:OutputPath=$ApiDependenciesDir /p:CopyLocalLockFileAssemblies=true + if ($LASTEXITCODE -ne 0) { + Log-Warning "Include Client Dependencies build failed with $LASTEXITCODE please see output above" + exit 0 + } +} elseif ($LibType -eq 'management') { # Management Package Write-Verbose "Build Packages for Doc Generation - Management" + Write-Verbose "dotnet msbuild '${RepoRoot}/eng/mgmt.proj' /p:scope=$PackageLocation /p:OutputPath=$ApiDir -maxcpucount:1 -nodeReuse:false" dotnet msbuild "${RepoRoot}/eng/mgmt.proj" /p:scope=$PackageLocation /p:OutputPath=$ApiDir -maxcpucount:1 -nodeReuse:false + if ($LASTEXITCODE -ne 0) { + Log-Warning "Build Packages for Doc Generation - Management failed with $LASTEXITCODE please see output above" + exit 0 + } Write-Verbose "Include Management Dependencies" + Write-Verbose "dotnet msbuild '${RepoRoot}/eng/mgmt.proj' /p:scope=$PackageLocation /p:OutputPath=$ApiDependenciesDir /p:CopyLocalLockFileAssemblies=true -maxcpucount:1 -nodeReuse:false" dotnet msbuild "${RepoRoot}/eng/mgmt.proj" /p:scope=$PackageLocation /p:OutputPath=$ApiDependenciesDir /p:CopyLocalLockFileAssemblies=true -maxcpucount:1 -nodeReuse:false + if ($LASTEXITCODE -ne 0) { + Log-Warning "Include Management Dependencies build failed with $LASTEXITCODE please see output above" + exit 0 + } +} else { + Log-Warning "'$LibType' is not a supported library type at this time." + exit 0 } Write-Verbose "Remove all unneeded artifacts from build output directory" From ea4f955a10bfd7b51e567886b56f348474d31eba Mon Sep 17 00:00:00 2001 From: Jesse Squire Date: Fri, 12 Jul 2024 16:27:15 -0400 Subject: [PATCH 070/144] [EngSys] Remove baseline error (#44985) The focus of these changes is to remove a baseline error suppression for an account that is no longer an active Microsoft contributor. --- .github/CODEOWNERS_baseline_errors.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/CODEOWNERS_baseline_errors.txt b/.github/CODEOWNERS_baseline_errors.txt index 721dc5c9e9c91..9373092cb5676 100644 --- a/.github/CODEOWNERS_baseline_errors.txt +++ b/.github/CODEOWNERS_baseline_errors.txt @@ -43,7 +43,6 @@ anand-rengasamy is an invalid user. Ensure the user exists, is public member of alex-frankel is not a public member of Azure. filizt is an invalid user. Ensure the user exists, is public member of Azure and has write permissions. sgellock is not a public member of Azure. -maertendMSFT is not a public member of Azure. wangyuantao is an invalid user. Ensure the user exists, is public member of Azure and has write permissions. bowgong is an invalid user. Ensure the user exists, is public member of Azure and has write permissions. areddish is an invalid user. Ensure the user exists, is public member of Azure and has write permissions. @@ -281,4 +280,4 @@ tmahmood-microsoft is not a public member of Azure. Aviv-Yaniv is not a public member of Azure. sakash279 is an invalid user. Ensure the user exists, is public member of Azure and has write permissions. sivethe is an invalid user. Ensure the user exists, is public member of Azure and has write permissions. -ThomasWeiss is an invalid user. Ensure the user exists, is public member of Azure and has write permissions. \ No newline at end of file +ThomasWeiss is an invalid user. Ensure the user exists, is public member of Azure and has write permissions. From 885c6bacdc6ddb74cb8db8d1dc37ff5490235b6b Mon Sep 17 00:00:00 2001 From: Jesse Squire Date: Fri, 12 Jul 2024 16:27:24 -0400 Subject: [PATCH 071/144] [CODEOWNERS] Remove invalid account (#44984) Removing a legacy account that the linter is now flagging as invalid. --- .github/CODEOWNERS | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 2a6b77608619d..349974ecafcfb 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -174,9 +174,6 @@ # ServiceLabel: %Bot Service # ServiceOwners: @sgellock -# ServiceLabel: %Cloud Shell -# ServiceOwners: @maertendMSFT - # PRLabel: %Cognitive - Language /sdk/cognitivelanguage/ @quentinRobinson @wangyuantao From 8d628748f48c16f5a3fc8f6264a239c82fe3d99d Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 12 Jul 2024 17:17:05 -0400 Subject: [PATCH 072/144] Sync eng/common directory with azure-sdk-tools for PR 8598 (#44935) * Set storage account test resources to disable blob public access * Skip adding network rules to storage accounts that don't need them during cleanup * Add succeeded check to set pipeline subnet info step * Disable network firewall by default in resource creation/removal --------- Co-authored-by: Ben Broderick Phillips --- .../TestResources/Remove-TestResources.ps1 | 2 +- .../build-test-resource-config.yml | 2 +- .../scripts/Helpers/Resource-Helpers.ps1 | 75 +++++++++++-------- 3 files changed, 47 insertions(+), 32 deletions(-) diff --git a/eng/common/TestResources/Remove-TestResources.ps1 b/eng/common/TestResources/Remove-TestResources.ps1 index 08ca9d8f5a54d..12411c4ee2aa9 100644 --- a/eng/common/TestResources/Remove-TestResources.ps1 +++ b/eng/common/TestResources/Remove-TestResources.ps1 @@ -257,7 +257,7 @@ $verifyDeleteScript = { # Get any resources that can be purged after the resource group is deleted coerced into a collection even if empty. $purgeableResources = Get-PurgeableGroupResources $ResourceGroupName -SetResourceNetworkAccessRules -ResourceGroupName $ResourceGroupName -AllowIpRanges $AllowIpRanges -Override -CI:$CI +SetResourceNetworkAccessRules -ResourceGroupName $ResourceGroupName -AllowIpRanges $AllowIpRanges -SetFirewall -CI:$CI Remove-WormStorageAccounts -GroupPrefix $ResourceGroupName -CI:$CI Log "Deleting resource group '$ResourceGroupName'" diff --git a/eng/common/TestResources/build-test-resource-config.yml b/eng/common/TestResources/build-test-resource-config.yml index 56d7fa4e96ac8..e3dd306449552 100644 --- a/eng/common/TestResources/build-test-resource-config.yml +++ b/eng/common/TestResources/build-test-resource-config.yml @@ -16,7 +16,7 @@ parameters: steps: - task: AzurePowerShell@5 displayName: Set Pipeline Subnet Info - condition: ne(variables['Pool'], '') + condition: and(succeeded(), ne(variables['Pool'], '')) env: ${{ parameters.EnvVars }} inputs: azureSubscription: azure-sdk-tests diff --git a/eng/common/scripts/Helpers/Resource-Helpers.ps1 b/eng/common/scripts/Helpers/Resource-Helpers.ps1 index 938ccfa4b55f8..fdbb44186eaf4 100644 --- a/eng/common/scripts/Helpers/Resource-Helpers.ps1 +++ b/eng/common/scripts/Helpers/Resource-Helpers.ps1 @@ -308,51 +308,66 @@ function Remove-WormStorageAccounts() { } } -function SetResourceNetworkAccessRules([string]$ResourceGroupName, [array]$AllowIpRanges, [switch]$CI) { - SetStorageNetworkAccessRules -ResourceGroupName $ResourceGroupName -AllowIpRanges $AllowIpRanges -CI:$CI +function SetResourceNetworkAccessRules([string]$ResourceGroupName, [array]$AllowIpRanges, [switch]$CI, [switch]$SetFirewall) { + SetStorageNetworkAccessRules -ResourceGroupName $ResourceGroupName -AllowIpRanges $AllowIpRanges -CI:$CI -SetFirewall:$SetFirewall } -function SetStorageNetworkAccessRules([string]$ResourceGroupName, [array]$AllowIpRanges, [switch]$CI, [switch]$Override) { +function SetStorageNetworkAccessRules([string]$ResourceGroupName, [array]$AllowIpRanges, [switch]$CI, [switch]$SetFirewall) { $clientIp = $null $storageAccounts = Retry { Get-AzResource -ResourceGroupName $ResourceGroupName -ResourceType "Microsoft.Storage/storageAccounts" } # Add client IP to storage account when running as local user. Pipeline's have their own vnet with access if ($storageAccounts) { $appliedRule = $false foreach ($account in $storageAccounts) { + $properties = Get-AzStorageAccount -ResourceGroupName $ResourceGroupName -AccountName $account.Name $rules = Get-AzStorageAccountNetworkRuleSet -ResourceGroupName $ResourceGroupName -AccountName $account.Name - if ($rules -and ($Override -or $rules.DefaultAction -eq "Allow")) { - Write-Host "Restricting network rules in storage account '$($account.Name)' to deny access by default" - Retry { Update-AzStorageAccountNetworkRuleSet -ResourceGroupName $ResourceGroupName -Name $account.Name -DefaultAction Deny } - if ($CI -and $env:PoolSubnet) { - Write-Host "Enabling access to '$($account.Name)' from pipeline subnet $($env:PoolSubnet)" - Retry { Add-AzStorageAccountNetworkRule -ResourceGroupName $ResourceGroupName -Name $account.Name -VirtualNetworkResourceId $env:PoolSubnet } - $appliedRule = $true - } - elseif ($AllowIpRanges) { - Write-Host "Enabling access to '$($account.Name)' to $($AllowIpRanges.Length) IP ranges" - $ipRanges = $AllowIpRanges | ForEach-Object { - @{ Action = 'allow'; IPAddressOrRange = $_ } - } - Retry { Update-AzStorageAccountNetworkRuleSet -ResourceGroupName $ResourceGroupName -Name $account.Name -IPRule $ipRanges | Out-Null } - $appliedRule = $true + + if ($properties.AllowBlobPublicAccess) { + Write-Host "Restricting public blob access in storage account '$($account.Name)'" + Set-AzStorageAccount -ResourceGroupName $ResourceGroupName -StorageAccountName $account.Name -AllowBlobPublicAccess $false + } + + # In override mode, we only want to capture storage accounts that have had incomplete network rules applied, + # otherwise it's not worth updating due to timing and throttling issues. + # If the network rules are deny only without any vnet/ip allowances, then we can't ever purge the storage account + # when immutable blobs need to be removed. + if (!$rules -or !$SetFirewall -or $rules.DefaultAction -eq "Allow") { + return + } + + # Add firewall rules in cases where existing rules added were incomplete to enable blob removal + Write-Host "Restricting network rules in storage account '$($account.Name)' to deny access by default" + Retry { Update-AzStorageAccountNetworkRuleSet -ResourceGroupName $ResourceGroupName -Name $account.Name -DefaultAction Deny } + if ($CI -and $env:PoolSubnet) { + Write-Host "Enabling access to '$($account.Name)' from pipeline subnet $($env:PoolSubnet)" + Retry { Add-AzStorageAccountNetworkRule -ResourceGroupName $ResourceGroupName -Name $account.Name -VirtualNetworkResourceId $env:PoolSubnet } + $appliedRule = $true + } + elseif ($AllowIpRanges) { + Write-Host "Enabling access to '$($account.Name)' to $($AllowIpRanges.Length) IP ranges" + $ipRanges = $AllowIpRanges | ForEach-Object { + @{ Action = 'allow'; IPAddressOrRange = $_ } } - elseif (!$CI) { - Write-Host "Enabling access to '$($account.Name)' from client IP" - $clientIp ??= Retry { Invoke-RestMethod -Uri 'https://icanhazip.com/' } # cloudflare owned ip site - $clientIp = $clientIp.Trim() - $ipRanges = Get-AzStorageAccountNetworkRuleSet -ResourceGroupName $ResourceGroupName -Name $account.Name - if ($ipRanges) { - foreach ($range in $ipRanges.IpRules) { - if (DoesSubnetOverlap $range.IPAddressOrRange $clientIp) { - return - } + Retry { Update-AzStorageAccountNetworkRuleSet -ResourceGroupName $ResourceGroupName -Name $account.Name -IPRule $ipRanges | Out-Null } + $appliedRule = $true + } + elseif (!$CI) { + Write-Host "Enabling access to '$($account.Name)' from client IP" + $clientIp ??= Retry { Invoke-RestMethod -Uri 'https://icanhazip.com/' } # cloudflare owned ip site + $clientIp = $clientIp.Trim() + $ipRanges = Get-AzStorageAccountNetworkRuleSet -ResourceGroupName $ResourceGroupName -Name $account.Name + if ($ipRanges) { + foreach ($range in $ipRanges.IpRules) { + if (DoesSubnetOverlap $range.IPAddressOrRange $clientIp) { + return } } - Retry { Add-AzStorageAccountNetworkRule -ResourceGroupName $ResourceGroupName -Name $account.Name -IPAddressOrRange $clientIp | Out-Null } - $appliedRule = $true } + Retry { Add-AzStorageAccountNetworkRule -ResourceGroupName $ResourceGroupName -Name $account.Name -IPAddressOrRange $clientIp | Out-Null } + $appliedRule = $true } } + if ($appliedRule) { Write-Host "Sleeping for 15 seconds to allow network rules to take effect" Start-Sleep 15 From 8efe66e2c0e8feb58554a051c0a623569295d3ff Mon Sep 17 00:00:00 2001 From: John Crim Date: Fri, 12 Jul 2024 15:21:44 -0700 Subject: [PATCH 073/144] fix(otel logging): Include ILogger CategoryName in logger output (#44754) * fix(telemetry transmission): Include ILogger CategoryName in logger output Previously this field was omitted, which was not consistent with normal ILogger behavior, or with Application Insights classic behavior. fixes: #44746 * improve(otel exporter tests): Verify that logger CategoryName is in Exception log entries * improve(live metrics): Include LogRecord.CategoryName in live metrics It's included in live metrics using app insights classic, so should be included here too. * docs(changelog): Update changelog with "add CategoryName" info --- .../CHANGELOG.md | 5 ++ .../DataCollection/DocumentHelper.cs | 14 ++++ .../DocumentTests/DocumentTestBase.cs | 9 ++- .../LiveMetrics/DocumentTests/LogTests.cs | 8 +- .../CHANGELOG.md | 13 +++- .../src/Internals/LogsHelper.cs | 6 ++ .../E2ETelemetryItemValidation/LogsTests.cs | 2 +- .../LogsHelperTests.cs | 76 ++++++++++++++++--- .../MessageDataTests.cs | 2 +- 9 files changed, 114 insertions(+), 21 deletions(-) diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/CHANGELOG.md b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/CHANGELOG.md index 5b95067073513..1bf35679963d8 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/CHANGELOG.md +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/CHANGELOG.md @@ -8,6 +8,11 @@ ### Bugs Fixed +* Added the `LogRecord.CategoryName` field to log and exception telemetry. + Previously the `CategoryName` field was omitted, which was inconsistent with + expected `ILogger` behavior, and with Application Insights classic behavior. + ([#44754](https://github.com/Azure/azure-sdk-for-net/pull/44754)) + * Fixed an issue where a `DuplicateKeyException` could be thrown if `EventId` and `EventName` were present in both `LogRecord` (`LogRecord.EventId`, `LogRecord.EventName`) and `LogRecord.Attributes`. The method now uses diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/LiveMetrics/DataCollection/DocumentHelper.cs b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/LiveMetrics/DataCollection/DocumentHelper.cs index 66a896927b929..c4727d0dbc4bb 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/LiveMetrics/DataCollection/DocumentHelper.cs +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/LiveMetrics/DataCollection/DocumentHelper.cs @@ -293,6 +293,13 @@ internal static ExceptionDocument ConvertToExceptionDocument(LogRecord logRecord int propertiesCount = 0; + var categoryName = logRecord.CategoryName; + if (!string.IsNullOrEmpty(categoryName)) + { + exceptionDocument.Properties.Add(new KeyValuePairString("CategoryName", categoryName)); + propertiesCount++; + } + foreach (KeyValuePair item in logRecord.Attributes ?? Enumerable.Empty>()) { if (item.Value != null && item.Key != "{OriginalFormat}") @@ -319,6 +326,13 @@ internal static Models.Trace ConvertToLogDocument(LogRecord logRecord) int propertiesCount = 0; + var categoryName = logRecord.CategoryName; + if (!string.IsNullOrEmpty(categoryName)) + { + traceDocument.Properties.Add(new KeyValuePairString("CategoryName", categoryName)); + propertiesCount++; + } + foreach (KeyValuePair item in logRecord.Attributes ?? Enumerable.Empty>()) { if (item.Value != null && item.Key != "{OriginalFormat}") diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/tests/Azure.Monitor.OpenTelemetry.AspNetCore.Tests/LiveMetrics/DocumentTests/DocumentTestBase.cs b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/tests/Azure.Monitor.OpenTelemetry.AspNetCore.Tests/LiveMetrics/DocumentTests/DocumentTestBase.cs index 0bfd50a283c6e..ea9416985da46 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/tests/Azure.Monitor.OpenTelemetry.AspNetCore.Tests/LiveMetrics/DocumentTests/DocumentTestBase.cs +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/tests/Azure.Monitor.OpenTelemetry.AspNetCore.Tests/LiveMetrics/DocumentTests/DocumentTestBase.cs @@ -55,17 +55,18 @@ internal void PrintActivity(Activity activity) } } - internal void VerifyCustomProperties(DocumentIngress document) + internal void VerifyCustomProperties(DocumentIngress document, int reservedPropertyCount = 0) { Assert.Equal(10, document.Properties.Count); - for (int i = 1; i <= 10; i++) + for (int i = 1; i <= (10 - reservedPropertyCount); i++) { Assert.Contains(document.Properties, x => x.Key == $"customKey{i}" && x.Value == $"customValue{i}"); } - // LiveMetrics supports a maximum of 10 Properties. #11 should not be included. - Assert.DoesNotContain(document.Properties, x => x.Key == $"customKey11" && x.Value == $"customValue11"); + // LiveMetrics supports a maximum of 10 Properties; reservedPropertyCount is the count of properties taken up by standard properties + int firstOmittedPropertyIndex = 11 - reservedPropertyCount; + Assert.DoesNotContain(document.Properties, x => x.Key == $"customKey{ firstOmittedPropertyIndex }" && x.Value == $"customValue{ firstOmittedPropertyIndex }"); } } } diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/tests/Azure.Monitor.OpenTelemetry.AspNetCore.Tests/LiveMetrics/DocumentTests/LogTests.cs b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/tests/Azure.Monitor.OpenTelemetry.AspNetCore.Tests/LiveMetrics/DocumentTests/LogTests.cs index 1a94807612bdd..c458e9a312102 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/tests/Azure.Monitor.OpenTelemetry.AspNetCore.Tests/LiveMetrics/DocumentTests/LogTests.cs +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/tests/Azure.Monitor.OpenTelemetry.AspNetCore.Tests/LiveMetrics/DocumentTests/LogTests.cs @@ -66,7 +66,9 @@ public void VerifyLogRecord(bool formatMessage) Assert.Equal("Hello {customKey1} {customKey2} {customKey3} {customKey4} {customKey5} {customKey6} {customKey7} {customKey8} {customKey9} {customKey10} {customKey11}.", logDocument.Message); } - VerifyCustomProperties(logDocument); + Assert.Equal(logCategoryName, logDocument.Properties.First(p => p.Key == "CategoryName").Value); + + VerifyCustomProperties(logDocument, 1); Assert.DoesNotContain(logDocument.Properties, x => x.Key == "{OriginalFormat}"); // The following "EXTENSION" properties are used to calculate metrics. These are not serialized. @@ -123,7 +125,9 @@ public void VerifyLogRecordWithException() Assert.Equal(typeof(System.Exception).FullName, exceptionDocument.ExceptionType); Assert.Equal("Test exception", exceptionDocument.ExceptionMessage); - VerifyCustomProperties(exceptionDocument); + Assert.Equal(logCategoryName, exceptionDocument.Properties.First(p => p.Key == "CategoryName").Value); + + VerifyCustomProperties(exceptionDocument, 1); Assert.DoesNotContain(exceptionDocument.Properties, x => x.Key == "{OriginalFormat}"); // The following "EXTENSION" properties are used to calculate metrics. These are not serialized. diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/CHANGELOG.md b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/CHANGELOG.md index de3dfaa4bcbb0..8942b94900478 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/CHANGELOG.md +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/CHANGELOG.md @@ -8,6 +8,11 @@ ### Bugs Fixed +* Added the `LogRecord.CategoryName` field to log and exception telemetry. + Previously the `CategoryName` field was omitted, which was inconsistent with + expected `ILogger` behavior, and with Application Insights classic behavior. + ([#44754](https://github.com/Azure/azure-sdk-for-net/pull/44754)) + ### Features Added * Added `LoggerProviderBuilder.AddAzureMonitorLogExporter` registration extension. @@ -96,7 +101,7 @@ of the OpenTelemetry LoggerProvider. This fix prevents data duplication in message fields and properties. ([#39308](https://github.com/Azure/azure-sdk-for-net/pull/39308)) - + * Fixed an issue related to the processing of scopes that do not conform to a key-value pair structure. ([#39453](https://github.com/Azure/azure-sdk-for-net/pull/39453)) @@ -105,7 +110,7 @@ 'SomeScopeValue' to the properties using a key that follows the pattern 'scope->*'. Additionally, 'OriginalFormatScope_*' keys were used to handle formatted strings within the scope. - * **New Behavior**: + * **New Behavior**: * Non-key-value pair scopes are no longer added to the properties, resulting in cleaner and more efficient log output. * 'OriginalFormatScope_*' keys have been removed. @@ -189,7 +194,7 @@ ([#36509](https://github.com/Azure/azure-sdk-for-net/pull/36509)) * Add `db.name` to custom properties. ([#36389](https://github.com/Azure/azure-sdk-for-net/pull/36389)) - + ### Bugs Fixed * Fixed an issue which resulted in standard metrics getting exported to backends other than Azure Monitor, when Azure Monitor metric exporter was used with other exporters such as otlp side by side. @@ -318,7 +323,7 @@ * Request and Dependency Success criteria will now be decided based on `Activity.Status` ([#31024](https://github.com/Azure/azure-sdk-for-net/pull/31024)) * Changed `AzureMonitorTraceExporter` to internal ([#31067](https://github.com/Azure/azure-sdk-for-net/pull/31067)) - + ### Bugs Fixed * Fix shared RoleName/RoleInstance between Trace and Log Exporter ([#26438](https://github.com/Azure/azure-sdk-for-net/pull/26438)) diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Internals/LogsHelper.cs b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Internals/LogsHelper.cs index c4dce94f2f3de..26b05b6e7beca 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Internals/LogsHelper.cs +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Internals/LogsHelper.cs @@ -124,6 +124,12 @@ internal static List OtelToAzureMonitorLogs(Batch batc logRecord.ForEachScope(s_processScope, properties); + var categoryName = logRecord.CategoryName; + if (!properties.ContainsKey("CategoryName") && !string.IsNullOrEmpty(categoryName)) + { + properties.Add("CategoryName", categoryName.Truncate(SchemaConstants.KVP_MaxValueLength)!); + } + if (!properties.ContainsKey("EventId") && logRecord.EventId.Id != 0) { properties.Add("EventId", logRecord.EventId.Id.ToString(CultureInfo.InvariantCulture)); diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/tests/Azure.Monitor.OpenTelemetry.Exporter.Tests/E2ETelemetryItemValidation/LogsTests.cs b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/tests/Azure.Monitor.OpenTelemetry.Exporter.Tests/E2ETelemetryItemValidation/LogsTests.cs index 3f68431f22860..6e9ac78a225c5 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/tests/Azure.Monitor.OpenTelemetry.Exporter.Tests/E2ETelemetryItemValidation/LogsTests.cs +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/tests/Azure.Monitor.OpenTelemetry.Exporter.Tests/E2ETelemetryItemValidation/LogsTests.cs @@ -83,7 +83,7 @@ public void VerifyLog(LogLevel logLevel, string expectedSeverityLevel) telemetryItem: telemetryItem!, expectedSeverityLevel: expectedSeverityLevel, expectedMessage: "Hello {name}.", - expectedMessageProperties: new Dictionary { { "EventId", "1" }, { "name", "World" }}, + expectedMessageProperties: new Dictionary { { "EventId", "1" }, { "name", "World" }, { "CategoryName", logCategoryName } }, expectedSpanId: null, expectedTraceId: null); } diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/tests/Azure.Monitor.OpenTelemetry.Exporter.Tests/LogsHelperTests.cs b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/tests/Azure.Monitor.OpenTelemetry.Exporter.Tests/LogsHelperTests.cs index 59bbd2b7e0f7d..969dbf976737e 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/tests/Azure.Monitor.OpenTelemetry.Exporter.Tests/LogsHelperTests.cs +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/tests/Azure.Monitor.OpenTelemetry.Exporter.Tests/LogsHelperTests.cs @@ -61,7 +61,7 @@ public void MessageIsSetToExceptionMessage(bool parseStateValues) Assert.Equal("tomato", name); Assert.True(properties.TryGetValue("price", out string price)); Assert.Equal("2.99", price); - Assert.Equal(3, properties.Count); + Assert.Equal(4, properties.Count); } [Fact] @@ -91,7 +91,7 @@ public void MessageIsSetToFormattedMessageWhenIncludeFormattedMessageIsSet() Assert.Equal("tomato", name); Assert.True(properties.TryGetValue("price", out string price)); Assert.Equal("2.99", price); - Assert.Equal(2, properties.Count); + Assert.Equal(3, properties.Count); } [Fact] @@ -121,7 +121,7 @@ public void MessageIsSetToOriginalFormatWhenIncludeFormattedMessageIsNotSet() Assert.Equal("tomato", name); Assert.True(properties.TryGetValue("price", out string price)); Assert.Equal("2.99", price); - Assert.Equal(2, properties.Count); + Assert.Equal(3, properties.Count); } [Theory] @@ -152,7 +152,7 @@ public void PropertiesContainFieldsFromStructuredLogs(bool parseStateValues) Assert.Equal("tomato", name); Assert.True(properties.TryGetValue("price", out string price)); Assert.Equal("2.99", price); - Assert.Equal(2, properties.Count); + Assert.Equal(3, properties.Count); } [Fact] @@ -180,7 +180,65 @@ public void PropertiesContainEventIdAndEventNameIfSetOnLog() Assert.Equal("1", eventId); Assert.True(properties.TryGetValue("EventName", out string eventName)); Assert.Equal("TestEvent", eventName); - Assert.Equal(2, properties.Count); + Assert.Equal(3, properties.Count); + } + + [Fact] + public void PropertiesContainLoggerCategoryName() + { + var logRecords = new List(); + using var loggerFactory = LoggerFactory.Create(builder => + { + builder.AddOpenTelemetry(options => + { + options.AddInMemoryExporter(logRecords); + }); + builder.AddFilter(typeof(LogsHelperTests).FullName, LogLevel.Trace); + }); + + var categoryName = nameof(LogsHelperTests); + var logger = loggerFactory.CreateLogger(categoryName); + + logger.LogInformation("Information goes here"); + + var properties = new ChangeTrackingDictionary(); + LogsHelper.GetMessageAndSetProperties(logRecords[0], properties); + + Assert.True(properties.TryGetValue("CategoryName", out string loggedCategoryName)); + Assert.Equal(categoryName, loggedCategoryName); + Assert.Single(properties); + } + + [Fact] + public void ExceptionPropertiesContainLoggerCategoryName() + { + var logRecords = new List(); + using var loggerFactory = LoggerFactory.Create(builder => + { + builder.AddOpenTelemetry(options => + { + options.AddInMemoryExporter(logRecords); + }); + builder.AddFilter(typeof(LogsHelperTests).FullName, LogLevel.Trace); + }); + + var logger = loggerFactory.CreateLogger(); + try + { + throw new Exception("Test Exception"); + } + catch (Exception ex) + { + logger.LogError(ex, "Here's an error"); + } + + var properties = new ChangeTrackingDictionary(); + var message = LogsHelper.GetMessageAndSetProperties(logRecords[0], properties); + + Assert.Equal("Test Exception", message); + + Assert.True(properties.TryGetValue("CategoryName", out string categoryName)); + Assert.EndsWith(nameof(LogsHelperTests), categoryName); } [Fact] @@ -210,7 +268,7 @@ public void LogRecordAndAttributesContainEventIdAndEventName() Assert.Equal("100", eventId); Assert.True(properties.TryGetValue("EventName", out string eventName)); Assert.Equal("TestAttributeEventName", eventName); - Assert.Equal(2, properties.Count); + Assert.Equal(3, properties.Count); } [Fact] @@ -348,13 +406,13 @@ public void VerifyHandlingOfVariousScopeDataTypes(object scopeValue) if (scopeValue != null) { - Assert.Single(properties); // Assert that there is exactly one property + Assert.Equal(2, properties.Count); // Scope property + CategoryName Assert.True(properties.TryGetValue(expectedScopeKey, out string actualScopeValue)); Assert.Equal(scopeValue.ToString(), actualScopeValue); } else { - Assert.Empty(properties); // Assert that properties are empty + Assert.Single(properties); // Single property expected (CategoryName) } } @@ -438,7 +496,7 @@ public void DuplicateKeysInLogRecordAttributesAndLogScope() var properties = new ChangeTrackingDictionary(); LogsHelper.GetMessageAndSetProperties(logRecords[0], properties); - Assert.Equal(2, properties.Count); + Assert.Equal(3, properties.Count); Assert.True(properties.TryGetValue(expectedScopeKey, out string actualScopeValue)); Assert.Equal(expectedScopeValue, actualScopeValue); Assert.True(properties.TryGetValue("attributeKey", out string actualAttributeValue)); diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/tests/Azure.Monitor.OpenTelemetry.Exporter.Tests/MessageDataTests.cs b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/tests/Azure.Monitor.OpenTelemetry.Exporter.Tests/MessageDataTests.cs index ebeacb8c1d83b..a26f8d7da911f 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/tests/Azure.Monitor.OpenTelemetry.Exporter.Tests/MessageDataTests.cs +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/tests/Azure.Monitor.OpenTelemetry.Exporter.Tests/MessageDataTests.cs @@ -41,7 +41,7 @@ public void ValidateMessageData(LogLevel logLevel) Assert.Equal("Log Message", messageData.Message); Assert.Equal(LogsHelper.GetSeverityLevel(logLevel), messageData.SeverityLevel); - Assert.Empty(messageData.Properties); + Assert.Single(messageData.Properties); // CategoryName property expected Assert.Empty(messageData.Measurements); } } From 44a7708f1aface319e49f54d45fa4a6fa2dbbca0 Mon Sep 17 00:00:00 2001 From: Timothy Mothra Date: Fri, 12 Jul 2024 16:22:40 -0700 Subject: [PATCH 074/144] prep exporter release 1.4.0-beta1 (#44981) --- .../Azure.Monitor.OpenTelemetry.Exporter/CHANGELOG.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/CHANGELOG.md b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/CHANGELOG.md index 8942b94900478..01c1ef5efb5c2 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/CHANGELOG.md +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/CHANGELOG.md @@ -1,10 +1,6 @@ # Release History -## 1.4.0-beta.1 (Unreleased) - -### Features Added - -### Breaking Changes +## 1.4.0-beta.1 (2024-07-12) ### Bugs Fixed From 909fcadeb8e5b42356434c0dcd9e9bd9b47f0648 Mon Sep 17 00:00:00 2001 From: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com> Date: Sat, 13 Jul 2024 08:02:15 -0700 Subject: [PATCH 075/144] Fix EventGrid Namespaces readme (#44992) --- .../Azure.Messaging.EventGrid.Namespaces/samples/README.md | 2 +- .../samples/Sample1_Namespaces.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/samples/README.md b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/samples/README.md index 4935bd00d90bd..481112556c392 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/samples/README.md +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/samples/README.md @@ -12,4 +12,4 @@ description: Samples for the Azure.Messaging.EventGrid.Namespaces client library # Azure Event Grid SDK Samples Before starting, take a look at the Azure Event Grid [README](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/README.md) for more information on how to create an Event Grid custom topic or domain using the Azure portal/Azure CLI, and retrieving the designated endpoint and credential. -- [Working with an Event Grid Namespace] +- [Using Namespace Topics](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/samples/Sample1_Namespaces.md) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/samples/Sample1_Namespaces.md b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/samples/Sample1_Namespaces.md index ff1213005b6d3..cde7b66c9dd23 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/samples/Sample1_Namespaces.md +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/samples/Sample1_Namespaces.md @@ -1,8 +1,8 @@ # Using Namespace Topics -Namespace topics are a new feature currently in public preview that allow you to publish and receive events directly from Azure Event Grid +Namespace topics allow you to publish and receive events directly from Azure Event Grid without the need to integrate with another service such as Storage Queues or Service Bus for event delivery. Namespace topics can be -interacted with using the `EventGridClient`. +interacted with using the `EventGridSenderClient` and the `EventGridReceiverClient`. ```C# Snippet:CreateNamespaceClient // Construct the client using an Endpoint for a namespace as well as the shared access key From 6c0e71b8af9c97e751a90cec6917a0212f68a4af Mon Sep 17 00:00:00 2001 From: subhra231 Date: Sat, 13 Jul 2024 08:02:58 -0700 Subject: [PATCH 076/144] update Versions of the packages (#44988) --- eng/Packages.Data.props | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index 09599b4c707df..be343287cbc94 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -369,14 +369,14 @@ - - + + - - - - - + + + + + From 7e4ebf9975fe7f067bc1a1bd6a7d2fbdc5ef3d92 Mon Sep 17 00:00:00 2001 From: VIPRAY JAIN <118152689+vipray-ms@users.noreply.github.com> Date: Mon, 15 Jul 2024 15:19:35 +0530 Subject: [PATCH 077/144] Updating dotnet sdk for NewRelic (#44852) --- .github/CODEOWNERS | 6 + .../CHANGELOG.md | 19 +- ...er.NewRelicObservability.netstandard2.0.cs | 232 ++++++- .../Samples/Sample_NewRelicMonitorResource.cs | 193 ++++-- ...ample_NewRelicMonitorResourceCollection.cs | 24 +- ...NewRelicMonitoredSubscriptionCollection.cs | 201 ++++++ ...e_NewRelicMonitoredSubscriptionResource.cs | 112 ++++ ..._NewRelicObservabilityTagRuleCollection.cs | 40 +- ...le_NewRelicObservabilityTagRuleResource.cs | 24 +- .../Sample_SubscriptionResourceExtensions.cs | 27 +- ...sourceManager.NewRelicObservability.csproj | 2 +- .../NewRelicObservabilityBillingCycle.cs | 2 - .../src/Custom/Models/NewRelicPlanDetails.cs | 18 + .../src/Custom/NewRelicMonitorResource.cs | 87 +++ .../ArmNewRelicObservabilityModelFactory.cs | 130 +++- .../MockableNewRelicObservabilityArmClient.cs | 12 + ...RelicObservabilityResourceGroupResource.cs | 4 +- ...wRelicObservabilitySubscriptionResource.cs | 16 +- .../NewRelicObservabilityExtensions.cs | 39 +- .../Internal/BicepSerializationHelpers.cs | 58 ++ .../Generated/Internal/WirePathAttribute.cs | 27 + ...licMonitoredSubscriptionOperationSource.cs | 38 ++ ...tnerResourcesListResponse.Serialization.cs | 212 ++++++ .../ConnectedPartnerResourcesListResponse.cs | 70 ++ ...inkedResourceListResponse.Serialization.cs | 213 ++++++ .../Models/LinkedResourceListResponse.cs | 71 ++ .../MarketplaceSaaSInfo.Serialization.cs | 305 +++++++++ .../Generated/Models/MarketplaceSaaSInfo.cs | 86 +++ .../MonitoredSubscriptionConfigurationName.cs | 48 ++ .../MonitoredSubscriptionPatchOperation.cs | 60 ++ ...ubscriptionPropertiesList.Serialization.cs | 212 ++++++ .../MonitoredSubscriptionPropertiesList.cs | 70 ++ ...NewRelicAccountProperties.Serialization.cs | 89 +++ .../Models/NewRelicAccountProperties.cs | 4 + ...wRelicAccountResourceData.Serialization.cs | 158 +++++ .../Models/NewRelicAccountResourceData.cs | 8 +- ...ewRelicAccountsListResult.Serialization.cs | 57 ++ .../Models/NewRelicAppServicesGetContent.cs | 2 + ...elicAppServicesListResult.Serialization.cs | 57 ++ ...NewRelicBillingInfoResult.Serialization.cs | 189 ++++++ .../Models/NewRelicBillingInfoResult.cs | 71 ++ ...nectedPartnerResourceInfo.Serialization.cs | 159 +++++ .../NewRelicConnectedPartnerResourceInfo.cs | 66 ++ ...PartnerResourceProperties.Serialization.cs | 261 ++++++++ ...RelicConnectedPartnerResourceProperties.cs | 82 +++ .../Models/NewRelicHostsGetContent.cs | 2 + .../Models/NewRelicMetricsContent.cs | 1 + .../Models/NewRelicMetricsStatusContent.cs | 2 + ...wRelicMetricsStatusResult.Serialization.cs | 55 ++ .../Models/NewRelicMetricsStatusResult.cs | 1 + ...MonitorResourceListResult.Serialization.cs | 57 ++ .../Models/NewRelicMonitorResourcePatch.cs | 7 + ...nitoredResourceListResult.Serialization.cs | 201 ++++++ ...=> NewRelicMonitoredResourceListResult.cs} | 14 +- ...MonitoredSubscriptionInfo.Serialization.cs | 257 ++++++++ .../NewRelicMonitoredSubscriptionInfo.cs | 81 +++ ...redSubscriptionProperties.Serialization.cs | 238 +++++++ ...NewRelicMonitoredSubscriptionProperties.cs | 77 +++ .../Models/NewRelicMonitoringStatus.cs | 57 ++ ...ewRelicMonitoringTagRules.Serialization.cs | 219 +++++++ .../Models/NewRelicMonitoringTagRules.cs | 76 +++ ...cObservabilityAccountInfo.Serialization.cs | 79 +++ .../NewRelicObservabilityAccountInfo.cs | 7 +- ...servabilityAppServiceInfo.Serialization.cs | 79 +++ .../NewRelicObservabilityAppServiceInfo.cs | 3 + ...ObservabilityFilteringTag.Serialization.cs | 79 +++ .../NewRelicObservabilityFilteringTag.cs | 3 + ...elicObservabilityLogRules.Serialization.cs | 87 +++ .../Models/NewRelicObservabilityLogRules.cs | 4 + ...cObservabilityMetricRules.Serialization.cs | 80 +++ .../NewRelicObservabilityMetricRules.cs | 3 + ...nitoredResourceListResult.Serialization.cs | 144 ----- ...rvabilityOrganizationInfo.Serialization.cs | 41 ++ .../NewRelicObservabilityOrganizationInfo.cs | 1 + ...vabilityTagRuleListResult.Serialization.cs | 57 ++ .../NewRelicObservabilityTagRulePatch.cs | 2 + ...elicObservabilityUserInfo.Serialization.cs | 133 ++++ .../Models/NewRelicObservabilityUserInfo.cs | 5 + ...abilityVmExtensionPayload.Serialization.cs | 41 ++ ...NewRelicObservabilityVmExtensionPayload.cs | 1 + ...bilityVmHostsListResponse.Serialization.cs | 57 ++ ...wRelicObservabilityVmInfo.Serialization.cs | 79 +++ .../Models/NewRelicObservabilityVmInfo.cs | 3 + ...cOrganizationResourceData.Serialization.cs | 135 ++++ .../NewRelicOrganizationResourceData.cs | 3 + ...icOrganizationsListResult.Serialization.cs | 57 ++ .../Models/NewRelicPlanData.Serialization.cs | 119 ++++ .../src/Generated/Models/NewRelicPlanData.cs | 3 + ...ewRelicPlanDataListResult.Serialization.cs | 57 ++ .../NewRelicPlanDetails.Serialization.cs | 107 +++- .../Generated/Models/NewRelicPlanDetails.cs | 14 +- ...elicResourceMonitorResult.Serialization.cs | 109 ++++ .../Models/NewRelicResourceMonitorResult.cs | 5 + ...licSingleSignOnProperties.Serialization.cs | 86 +++ .../Models/NewRelicSingleSignOnProperties.cs | 4 + .../Models/NewRelicSwitchBillingContent.cs | 4 + .../PartnerBillingEntity.Serialization.cs | 197 ++++++ .../Generated/Models/PartnerBillingEntity.cs | 71 ++ .../src/Generated/NewRelicMonitorResource.cs | 353 ++++++++-- .../NewRelicMonitorResourceCollection.cs | 20 +- ...wRelicMonitorResourceData.Serialization.cs | 382 +++++++++++ .../Generated/NewRelicMonitorResourceData.cs | 24 +- ...NewRelicMonitoredSubscriptionCollection.cs | 466 ++++++++++++++ ...MonitoredSubscriptionData.Serialization.cs | 268 ++++++++ .../NewRelicMonitoredSubscriptionData.cs | 76 +++ ...toredSubscriptionResource.Serialization.cs | 26 + .../NewRelicMonitoredSubscriptionResource.cs | 348 ++++++++++ .../NewRelicObservabilityTagRuleCollection.cs | 20 +- ...cObservabilityTagRuleData.Serialization.cs | 119 ++++ .../NewRelicObservabilityTagRuleData.cs | 3 + .../NewRelicObservabilityTagRuleResource.cs | 12 +- .../RestOperations/AccountsRestOperations.cs | 2 +- .../BillingInfoRestOperations.cs | 133 ++++ ...ConnectedPartnerResourcesRestOperations.cs | 228 +++++++ .../MonitoredSubscriptionsRestOperations.cs | 605 ++++++++++++++++++ .../RestOperations/MonitorsRestOperations.cs | 224 ++++++- .../OrganizationsRestOperations.cs | 2 +- .../RestOperations/PlansRestOperations.cs | 2 +- .../RestOperations/TagRulesRestOperations.cs | 2 +- .../src/autorest.md | 21 +- 120 files changed, 10088 insertions(+), 413 deletions(-) create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/samples/Generated/Samples/Sample_NewRelicMonitoredSubscriptionCollection.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/samples/Generated/Samples/Sample_NewRelicMonitoredSubscriptionResource.cs rename sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/{Generated => Custom}/Models/NewRelicObservabilityBillingCycle.cs (99%) create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Custom/Models/NewRelicPlanDetails.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Custom/NewRelicMonitorResource.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Internal/BicepSerializationHelpers.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Internal/WirePathAttribute.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/LongRunningOperation/NewRelicMonitoredSubscriptionOperationSource.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/ConnectedPartnerResourcesListResponse.Serialization.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/ConnectedPartnerResourcesListResponse.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/LinkedResourceListResponse.Serialization.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/LinkedResourceListResponse.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MarketplaceSaaSInfo.Serialization.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MarketplaceSaaSInfo.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MonitoredSubscriptionConfigurationName.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MonitoredSubscriptionPatchOperation.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MonitoredSubscriptionPropertiesList.Serialization.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MonitoredSubscriptionPropertiesList.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicBillingInfoResult.Serialization.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicBillingInfoResult.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicConnectedPartnerResourceInfo.Serialization.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicConnectedPartnerResourceInfo.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicConnectedPartnerResourceProperties.Serialization.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicConnectedPartnerResourceProperties.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredResourceListResult.Serialization.cs rename sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/{NewRelicObservabilityMonitoredResourceListResult.cs => NewRelicMonitoredResourceListResult.cs} (81%) create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredSubscriptionInfo.Serialization.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredSubscriptionInfo.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredSubscriptionProperties.Serialization.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredSubscriptionProperties.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoringStatus.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoringTagRules.Serialization.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoringTagRules.cs delete mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityMonitoredResourceListResult.Serialization.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/PartnerBillingEntity.Serialization.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/PartnerBillingEntity.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitoredSubscriptionCollection.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitoredSubscriptionData.Serialization.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitoredSubscriptionData.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitoredSubscriptionResource.Serialization.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitoredSubscriptionResource.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/BillingInfoRestOperations.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/ConnectedPartnerResourcesRestOperations.cs create mode 100644 sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/MonitoredSubscriptionsRestOperations.cs diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 349974ecafcfb..f9f576b9be93a 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -968,6 +968,12 @@ # ServiceLabel: %Network - Front Door %Mgmt # ServiceOwners: @ptnan7 +# PRLabel: %New Relic +/sdk/newrelicobservability/Azure.ResourceManager.*/ @dipeshbhakat-microsoft @vipray-ms + +# ServiceLabel: %New Relic %Mgmt +# ServiceOwners: @dipeshbhakat-microsoft @vipray-ms + # PRLabel: %Nginx /sdk/nginx/Azure.ResourceManager.*/ @jamesfan1 @bangbingsyb @spencerofwiti diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/CHANGELOG.md b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/CHANGELOG.md index 8104b482ed428..6523e075d15e0 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/CHANGELOG.md +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/CHANGELOG.md @@ -1,22 +1,23 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.1.0 (2024-07-05) ### Features Added -- Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. - -### Breaking Changes - -### Bugs Fixed +- Upgraded api-version tag from 'package-2022-07-01' to 'package-2024-03-01'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/07d286359f828bbc7901e86288a5d62b48ae2052/specification/newrelic/resource-manager/readme.md. +- Added `ArmOperation.Rehydrate` and `ArmOperation.Rehydrate` static methods to rehydrate a long-running operation. +- Enabled the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. ### Other Changes +- Upgraded Azure.Core from 1.36.0 to 1.40.0 +- Upgraded Azure.ResourceManager from 1.9.0 to 1.12.0 + ## 1.0.1 (2023-11-29) ### Features Added -- Enable mocking for extension methods, refer this [document](https://aka.ms/azsdk/net/mocking) for more details. +- Enabled mocking for extension methods, refer this [document](https://aka.ms/azsdk/net/mocking) for more details. ### Other Changes @@ -40,7 +41,7 @@ Polishing since last public beta release: ### Features Added -- Enable the model factory feature for model mocking, more information can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-mocking-factory-builder). +- Enabled the model factory feature for model mocking, more information can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-mocking-factory-builder). ### Other Changes @@ -61,4 +62,4 @@ This package follows the [new Azure SDK guidelines](https://azure.github.io/azur This package is a Public Preview version, so expect incompatible changes in subsequent releases as we improve the product. To provide feedback, submit an issue in our [Azure SDK for .NET GitHub repo](https://github.com/Azure/azure-sdk-for-net/issues). -> NOTE: For more information about unified authentication, please refer to [Microsoft Azure Identity documentation for .NET](https://docs.microsoft.com//dotnet/api/overview/azure/identity-readme?view=azure-dotnet). +> NOTE: For more information about unified authentication, please refer to [Microsoft Azure Identity documentation for .NET](https://docs.microsoft.com//dotnet/api/overview/azure/identity-readme?view=azure-dotnet). \ No newline at end of file diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/api/Azure.ResourceManager.NewRelicObservability.netstandard2.0.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/api/Azure.ResourceManager.NewRelicObservability.netstandard2.0.cs index 4b2136d1200fd..74eec33803e7e 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/api/Azure.ResourceManager.NewRelicObservability.netstandard2.0.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/api/Azure.ResourceManager.NewRelicObservability.netstandard2.0.cs @@ -1,5 +1,51 @@ namespace Azure.ResourceManager.NewRelicObservability { + public partial class NewRelicMonitoredSubscriptionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected NewRelicMonitoredSubscriptionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, Azure.ResourceManager.NewRelicObservability.Models.MonitoredSubscriptionConfigurationName configurationName, Azure.ResourceManager.NewRelicObservability.NewRelicMonitoredSubscriptionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NewRelicObservability.Models.MonitoredSubscriptionConfigurationName configurationName, Azure.ResourceManager.NewRelicObservability.NewRelicMonitoredSubscriptionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(Azure.ResourceManager.NewRelicObservability.Models.MonitoredSubscriptionConfigurationName configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(Azure.ResourceManager.NewRelicObservability.Models.MonitoredSubscriptionConfigurationName configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(Azure.ResourceManager.NewRelicObservability.Models.MonitoredSubscriptionConfigurationName configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(Azure.ResourceManager.NewRelicObservability.Models.MonitoredSubscriptionConfigurationName configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(Azure.ResourceManager.NewRelicObservability.Models.MonitoredSubscriptionConfigurationName configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(Azure.ResourceManager.NewRelicObservability.Models.MonitoredSubscriptionConfigurationName configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class NewRelicMonitoredSubscriptionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NewRelicMonitoredSubscriptionData() { } + public Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitoredSubscriptionProperties Properties { get { throw null; } set { } } + Azure.ResourceManager.NewRelicObservability.NewRelicMonitoredSubscriptionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NewRelicObservability.NewRelicMonitoredSubscriptionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NewRelicMonitoredSubscriptionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected NewRelicMonitoredSubscriptionResource() { } + public virtual Azure.ResourceManager.NewRelicObservability.NewRelicMonitoredSubscriptionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string monitorName, Azure.ResourceManager.NewRelicObservability.Models.MonitoredSubscriptionConfigurationName configurationName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NewRelicObservability.NewRelicMonitoredSubscriptionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NewRelicObservability.NewRelicMonitoredSubscriptionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NewRelicObservability.NewRelicMonitoredSubscriptionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NewRelicObservability.NewRelicMonitoredSubscriptionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class NewRelicMonitorResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; @@ -15,14 +61,23 @@ protected NewRelicMonitorResource() { } public virtual Azure.Pageable GetAppServices(Azure.ResourceManager.NewRelicObservability.Models.NewRelicAppServicesGetContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetAppServicesAsync(Azure.ResourceManager.NewRelicObservability.Models.NewRelicAppServicesGetContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetBillingInfo(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetBillingInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetConnectedPartnerResources(string body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetConnectedPartnerResourcesAsync(string body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetHosts(Azure.ResourceManager.NewRelicObservability.Models.NewRelicHostsGetContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetHostsAsync(Azure.ResourceManager.NewRelicObservability.Models.NewRelicHostsGetContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetLinkedResources(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetLinkedResourcesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetMetricRules(Azure.ResourceManager.NewRelicObservability.Models.NewRelicMetricsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetMetricRulesAsync(Azure.ResourceManager.NewRelicObservability.Models.NewRelicMetricsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetMetricStatus(Azure.ResourceManager.NewRelicObservability.Models.NewRelicMetricsStatusContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetMetricStatusAsync(Azure.ResourceManager.NewRelicObservability.Models.NewRelicMetricsStatusContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetMonitoredResources(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetMonitoredResourcesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetNewRelicMonitoredSubscription(Azure.ResourceManager.NewRelicObservability.Models.MonitoredSubscriptionConfigurationName configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetNewRelicMonitoredSubscriptionAsync(Azure.ResourceManager.NewRelicObservability.Models.MonitoredSubscriptionConfigurationName configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NewRelicObservability.NewRelicMonitoredSubscriptionCollection GetNewRelicMonitoredSubscriptions() { throw null; } public virtual Azure.Response GetNewRelicObservabilityTagRule(string ruleSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetNewRelicObservabilityTagRuleAsync(string ruleSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.NewRelicObservability.NewRelicObservabilityTagRuleCollection GetNewRelicObservabilityTagRules() { throw null; } @@ -37,8 +92,10 @@ protected NewRelicMonitorResource() { } Azure.ResourceManager.NewRelicObservability.NewRelicMonitorResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - public virtual Azure.Response Update(Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitorResourcePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitorResourcePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitorResourcePatch patch, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitorResourcePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitorResourcePatch patch, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitorResourcePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response VmHostPayload(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> VmHostPayloadAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -73,6 +130,8 @@ public NewRelicMonitorResourceData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityOrgCreationSource? OrgCreationSource { get { throw null; } set { } } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicPlanDetails PlanData { get { throw null; } set { } } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState? ProvisioningState { get { throw null; } } + public string SaaSAzureSubscriptionStatus { get { throw null; } set { } } + public string SubscriptionState { get { throw null; } set { } } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityUserInfo UserInfo { get { throw null; } set { } } Azure.ResourceManager.NewRelicObservability.NewRelicMonitorResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -84,6 +143,7 @@ public static partial class NewRelicObservabilityExtensions { public static Azure.Pageable GetNewRelicAccounts(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string userEmail, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetNewRelicAccountsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string userEmail, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.NewRelicObservability.NewRelicMonitoredSubscriptionResource GetNewRelicMonitoredSubscriptionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.NewRelicObservability.NewRelicMonitorResource GetNewRelicMonitorResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetNewRelicMonitorResource(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetNewRelicMonitorResourceAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -150,6 +210,7 @@ namespace Azure.ResourceManager.NewRelicObservability.Mocking public partial class MockableNewRelicObservabilityArmClient : Azure.ResourceManager.ArmResource { protected MockableNewRelicObservabilityArmClient() { } + public virtual Azure.ResourceManager.NewRelicObservability.NewRelicMonitoredSubscriptionResource GetNewRelicMonitoredSubscriptionResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.NewRelicObservability.NewRelicMonitorResource GetNewRelicMonitorResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.NewRelicObservability.NewRelicObservabilityTagRuleResource GetNewRelicObservabilityTagRuleResource(Azure.Core.ResourceIdentifier id) { throw null; } } @@ -177,12 +238,21 @@ namespace Azure.ResourceManager.NewRelicObservability.Models { public static partial class ArmNewRelicObservabilityModelFactory { + public static Azure.ResourceManager.NewRelicObservability.Models.MarketplaceSaaSInfo MarketplaceSaaSInfo(string marketplaceSubscriptionId = null, string marketplaceSubscriptionName = null, string marketplaceResourceId = null, string marketplaceStatus = null, string billedAzureSubscriptionId = null) { throw null; } public static Azure.ResourceManager.NewRelicObservability.Models.NewRelicAccountResourceData NewRelicAccountResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string organizationId = null, string accountId = null, string accountName = null, Azure.Core.AzureLocation? region = default(Azure.Core.AzureLocation?)) { throw null; } public static Azure.ResourceManager.NewRelicObservability.Models.NewRelicAppServicesGetContent NewRelicAppServicesGetContent(System.Collections.Generic.IEnumerable azureResourceIds = null, string userEmail = null) { throw null; } + public static Azure.ResourceManager.NewRelicObservability.Models.NewRelicBillingInfoResult NewRelicBillingInfoResult(Azure.ResourceManager.NewRelicObservability.Models.MarketplaceSaaSInfo marketplaceSaasInfo = null, Azure.ResourceManager.NewRelicObservability.Models.PartnerBillingEntity partnerBillingEntity = null) { throw null; } + public static Azure.ResourceManager.NewRelicObservability.Models.NewRelicConnectedPartnerResourceInfo NewRelicConnectedPartnerResourceInfo(Azure.ResourceManager.NewRelicObservability.Models.NewRelicConnectedPartnerResourceProperties properties = null) { throw null; } + public static Azure.ResourceManager.NewRelicObservability.Models.NewRelicConnectedPartnerResourceProperties NewRelicConnectedPartnerResourceProperties(string accountName = null, string accountId = null, string azureResourceId = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?)) { throw null; } public static Azure.ResourceManager.NewRelicObservability.Models.NewRelicHostsGetContent NewRelicHostsGetContent(System.Collections.Generic.IEnumerable vmIds = null, string userEmail = null) { throw null; } public static Azure.ResourceManager.NewRelicObservability.Models.NewRelicMetricsStatusContent NewRelicMetricsStatusContent(System.Collections.Generic.IEnumerable azureResourceIds = null, string userEmail = null) { throw null; } public static Azure.ResourceManager.NewRelicObservability.Models.NewRelicMetricsStatusResult NewRelicMetricsStatusResult(System.Collections.Generic.IEnumerable azureResourceIds = null) { throw null; } - public static Azure.ResourceManager.NewRelicObservability.NewRelicMonitorResourceData NewRelicMonitorResourceData(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 tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState? provisioningState = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMonitoringStatus? monitoringStatus = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMonitoringStatus?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMarketplaceSubscriptionStatus? marketplaceSubscriptionStatus = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMarketplaceSubscriptionStatus?), string marketplaceSubscriptionId = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicAccountProperties newRelicAccountProperties = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityUserInfo userInfo = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicPlanDetails planData = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicLiftrResourceCategory? liftrResourceCategory = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicLiftrResourceCategory?), int? liftrResourcePreference = default(int?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityOrgCreationSource? orgCreationSource = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityOrgCreationSource?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityAccountCreationSource? accountCreationSource = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityAccountCreationSource?)) { throw null; } + public static Azure.ResourceManager.NewRelicObservability.NewRelicMonitoredSubscriptionData NewRelicMonitoredSubscriptionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitoredSubscriptionProperties properties = null) { throw null; } + public static Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitoredSubscriptionProperties NewRelicMonitoredSubscriptionProperties(Azure.ResourceManager.NewRelicObservability.Models.MonitoredSubscriptionPatchOperation? patchOperation = default(Azure.ResourceManager.NewRelicObservability.Models.MonitoredSubscriptionPatchOperation?), System.Collections.Generic.IEnumerable monitoredSubscriptionList = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState? provisioningState = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState?)) { throw null; } + public static Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitoringTagRules NewRelicMonitoringTagRules(Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState? provisioningState = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityLogRules logRules = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMetricRules metricRules = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.NewRelicObservability.NewRelicMonitorResourceData NewRelicMonitorResourceData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState? provisioningState, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMonitoringStatus? monitoringStatus, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMarketplaceSubscriptionStatus? marketplaceSubscriptionStatus, string marketplaceSubscriptionId, Azure.ResourceManager.NewRelicObservability.Models.NewRelicAccountProperties newRelicAccountProperties, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityUserInfo userInfo, Azure.ResourceManager.NewRelicObservability.Models.NewRelicPlanDetails planData, Azure.ResourceManager.NewRelicObservability.Models.NewRelicLiftrResourceCategory? liftrResourceCategory, int? liftrResourcePreference, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityOrgCreationSource? orgCreationSource, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityAccountCreationSource? accountCreationSource) { throw null; } + public static Azure.ResourceManager.NewRelicObservability.NewRelicMonitorResourceData NewRelicMonitorResourceData(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 tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState? provisioningState = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMonitoringStatus? monitoringStatus = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMonitoringStatus?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMarketplaceSubscriptionStatus? marketplaceSubscriptionStatus = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMarketplaceSubscriptionStatus?), string marketplaceSubscriptionId = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicAccountProperties newRelicAccountProperties = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityUserInfo userInfo = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicPlanDetails planData = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicLiftrResourceCategory? liftrResourceCategory = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicLiftrResourceCategory?), int? liftrResourcePreference = default(int?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityOrgCreationSource? orgCreationSource = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityOrgCreationSource?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityAccountCreationSource? accountCreationSource = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityAccountCreationSource?), string subscriptionState = null, string saaSAzureSubscriptionStatus = null) { throw null; } public static Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityAppServiceInfo NewRelicObservabilityAppServiceInfo(Azure.Core.ResourceIdentifier azureResourceId = null, string agentVersion = null, string agentStatus = null) { throw null; } public static Azure.ResourceManager.NewRelicObservability.NewRelicObservabilityTagRuleData NewRelicObservabilityTagRuleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState? provisioningState = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityLogRules logRules = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMetricRules metricRules = null) { throw null; } public static Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityVmExtensionPayload NewRelicObservabilityVmExtensionPayload(string ingestionKey = null) { throw null; } @@ -191,6 +261,59 @@ public static partial class ArmNewRelicObservabilityModelFactory public static Azure.ResourceManager.NewRelicObservability.Models.NewRelicPlanData NewRelicPlanData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicPlanDetails planData = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityOrgCreationSource? orgCreationSource = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityOrgCreationSource?), Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityAccountCreationSource? accountCreationSource = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityAccountCreationSource?)) { throw null; } public static Azure.ResourceManager.NewRelicObservability.Models.NewRelicResourceMonitorResult NewRelicResourceMonitorResult(Azure.Core.ResourceIdentifier id = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilitySendingMetricsStatus? sendingMetrics = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilitySendingMetricsStatus?), string reasonForMetricsStatus = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilitySendingLogsStatus? sendingLogs = default(Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilitySendingLogsStatus?), string reasonForLogsStatus = null) { throw null; } public static Azure.ResourceManager.NewRelicObservability.Models.NewRelicSwitchBillingContent NewRelicSwitchBillingContent(Azure.Core.ResourceIdentifier azureResourceId = null, string organizationId = null, Azure.ResourceManager.NewRelicObservability.Models.NewRelicPlanDetails planData = null, string userEmail = null) { throw null; } + public static Azure.ResourceManager.NewRelicObservability.Models.PartnerBillingEntity PartnerBillingEntity(string organizationId = null, string organizationName = null) { throw null; } + } + public partial class MarketplaceSaaSInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal MarketplaceSaaSInfo() { } + public string BilledAzureSubscriptionId { get { throw null; } } + public string MarketplaceResourceId { get { throw null; } } + public string MarketplaceStatus { get { throw null; } } + public string MarketplaceSubscriptionId { get { throw null; } } + public string MarketplaceSubscriptionName { get { throw null; } } + Azure.ResourceManager.NewRelicObservability.Models.MarketplaceSaaSInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NewRelicObservability.Models.MarketplaceSaaSInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MonitoredSubscriptionConfigurationName : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MonitoredSubscriptionConfigurationName(string value) { throw null; } + public static Azure.ResourceManager.NewRelicObservability.Models.MonitoredSubscriptionConfigurationName Default { get { throw null; } } + public bool Equals(Azure.ResourceManager.NewRelicObservability.Models.MonitoredSubscriptionConfigurationName 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.NewRelicObservability.Models.MonitoredSubscriptionConfigurationName left, Azure.ResourceManager.NewRelicObservability.Models.MonitoredSubscriptionConfigurationName right) { throw null; } + public static implicit operator Azure.ResourceManager.NewRelicObservability.Models.MonitoredSubscriptionConfigurationName (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NewRelicObservability.Models.MonitoredSubscriptionConfigurationName left, Azure.ResourceManager.NewRelicObservability.Models.MonitoredSubscriptionConfigurationName right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MonitoredSubscriptionPatchOperation : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MonitoredSubscriptionPatchOperation(string value) { throw null; } + public static Azure.ResourceManager.NewRelicObservability.Models.MonitoredSubscriptionPatchOperation Active { get { throw null; } } + public static Azure.ResourceManager.NewRelicObservability.Models.MonitoredSubscriptionPatchOperation AddBegin { get { throw null; } } + public static Azure.ResourceManager.NewRelicObservability.Models.MonitoredSubscriptionPatchOperation AddComplete { get { throw null; } } + public static Azure.ResourceManager.NewRelicObservability.Models.MonitoredSubscriptionPatchOperation DeleteBegin { get { throw null; } } + public static Azure.ResourceManager.NewRelicObservability.Models.MonitoredSubscriptionPatchOperation DeleteComplete { get { throw null; } } + public bool Equals(Azure.ResourceManager.NewRelicObservability.Models.MonitoredSubscriptionPatchOperation 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.NewRelicObservability.Models.MonitoredSubscriptionPatchOperation left, Azure.ResourceManager.NewRelicObservability.Models.MonitoredSubscriptionPatchOperation right) { throw null; } + public static implicit operator Azure.ResourceManager.NewRelicObservability.Models.MonitoredSubscriptionPatchOperation (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NewRelicObservability.Models.MonitoredSubscriptionPatchOperation left, Azure.ResourceManager.NewRelicObservability.Models.MonitoredSubscriptionPatchOperation right) { throw null; } + public override string ToString() { throw null; } } public partial class NewRelicAccountProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -229,6 +352,40 @@ public NewRelicAppServicesGetContent(string userEmail) { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class NewRelicBillingInfoResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NewRelicBillingInfoResult() { } + public Azure.ResourceManager.NewRelicObservability.Models.MarketplaceSaaSInfo MarketplaceSaasInfo { get { throw null; } } + public Azure.ResourceManager.NewRelicObservability.Models.PartnerBillingEntity PartnerBillingEntity { get { throw null; } } + Azure.ResourceManager.NewRelicObservability.Models.NewRelicBillingInfoResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NewRelicObservability.Models.NewRelicBillingInfoResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NewRelicConnectedPartnerResourceInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NewRelicConnectedPartnerResourceInfo() { } + public Azure.ResourceManager.NewRelicObservability.Models.NewRelicConnectedPartnerResourceProperties Properties { get { throw null; } } + Azure.ResourceManager.NewRelicObservability.Models.NewRelicConnectedPartnerResourceInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NewRelicObservability.Models.NewRelicConnectedPartnerResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NewRelicConnectedPartnerResourceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NewRelicConnectedPartnerResourceProperties() { } + public string AccountId { get { throw null; } } + public string AccountName { get { throw null; } } + public string AzureResourceId { get { throw null; } } + public Azure.Core.AzureLocation? Location { get { throw null; } } + Azure.ResourceManager.NewRelicObservability.Models.NewRelicConnectedPartnerResourceProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NewRelicObservability.Models.NewRelicConnectedPartnerResourceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class NewRelicHostsGetContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NewRelicHostsGetContent(string userEmail) { } @@ -289,6 +446,63 @@ internal NewRelicMetricsStatusResult() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class NewRelicMonitoredSubscriptionInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NewRelicMonitoredSubscriptionInfo() { } + public string Error { get { throw null; } set { } } + public Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitoringStatus? Status { get { throw null; } set { } } + public string SubscriptionId { get { throw null; } set { } } + public Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitoringTagRules TagRules { get { throw null; } set { } } + Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitoredSubscriptionInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitoredSubscriptionInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NewRelicMonitoredSubscriptionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NewRelicMonitoredSubscriptionProperties() { } + public System.Collections.Generic.IList MonitoredSubscriptionList { get { throw null; } } + public Azure.ResourceManager.NewRelicObservability.Models.MonitoredSubscriptionPatchOperation? PatchOperation { get { throw null; } set { } } + public Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState? ProvisioningState { get { throw null; } } + Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitoredSubscriptionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitoredSubscriptionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NewRelicMonitoringStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NewRelicMonitoringStatus(string value) { throw null; } + public static Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitoringStatus Active { get { throw null; } } + public static Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitoringStatus Deleting { get { throw null; } } + public static Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitoringStatus Failed { get { throw null; } } + public static Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitoringStatus InProgress { get { throw null; } } + public bool Equals(Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitoringStatus 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.NewRelicObservability.Models.NewRelicMonitoringStatus left, Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitoringStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitoringStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitoringStatus left, Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitoringStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class NewRelicMonitoringTagRules : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NewRelicMonitoringTagRules() { } + public Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityLogRules LogRules { get { throw null; } set { } } + public Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityMetricRules MetricRules { get { throw null; } set { } } + public Azure.ResourceManager.NewRelicObservability.Models.NewRelicProvisioningState? ProvisioningState { get { throw null; } } + Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitoringTagRules System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NewRelicObservability.Models.NewRelicMonitoringTagRules System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class NewRelicMonitorResourcePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NewRelicMonitorResourcePatch() { } @@ -695,6 +909,7 @@ public partial class NewRelicPlanDetails : System.ClientModel.Primitives.IJsonMo public NewRelicPlanDetails() { } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityBillingCycle? BillingCycle { get { throw null; } set { } } public System.DateTimeOffset? EffectiveOn { get { throw null; } set { } } + public string NewRelicPlanBillingCycle { get { throw null; } set { } } public string PlanDetails { get { throw null; } set { } } public Azure.ResourceManager.NewRelicObservability.Models.NewRelicObservabilityUsageType? UsageType { get { throw null; } set { } } Azure.ResourceManager.NewRelicObservability.Models.NewRelicPlanDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -788,4 +1003,15 @@ public NewRelicSwitchBillingContent(string userEmail) { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class PartnerBillingEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PartnerBillingEntity() { } + public string OrganizationId { get { throw null; } } + public string OrganizationName { get { throw null; } } + Azure.ResourceManager.NewRelicObservability.Models.PartnerBillingEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NewRelicObservability.Models.PartnerBillingEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/samples/Generated/Samples/Sample_NewRelicMonitorResource.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/samples/Generated/Samples/Sample_NewRelicMonitorResource.cs index 68f991ccba4ae..0710fc49b2d6c 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/samples/Generated/Samples/Sample_NewRelicMonitorResource.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/samples/Generated/Samples/Sample_NewRelicMonitorResource.cs @@ -12,6 +12,7 @@ using Azure.ResourceManager.Models; using Azure.ResourceManager.NewRelicObservability.Models; using Azure.ResourceManager.Resources; +using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.NewRelicObservability.Samples { @@ -22,7 +23,7 @@ public partial class Sample_NewRelicMonitorResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNewRelicMonitorResources_MonitorsListBySubscriptionMaximumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListBySubscription_MaximumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/Monitors_ListBySubscription_MaximumSet_Gen.json // this example is just showing the usage of "Monitors_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -32,7 +33,7 @@ public async Task GetNewRelicMonitorResources_MonitorsListBySubscriptionMaximumS // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "hfmjmpyqgezxkp"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -54,7 +55,7 @@ public async Task GetNewRelicMonitorResources_MonitorsListBySubscriptionMaximumS [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_MonitorsGetMaximumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_Get_MaximumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/Monitors_Get_MaximumSet_Gen.json // this example is just showing the usage of "Monitors_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -64,7 +65,7 @@ public async Task Get_MonitorsGetMaximumSetGen() // this example assumes you already have this NewRelicMonitorResource created on azure // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource - string subscriptionId = "hfmjmpyqgezxkp"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgNewRelic"; string monitorName = "cdlymktqw"; ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); @@ -85,7 +86,7 @@ public async Task Get_MonitorsGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_MonitorsUpdateMaximumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_Update_MaximumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/Monitors_Update_MaximumSet_Gen.json // this example is just showing the usage of "Monitors_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +96,7 @@ public async Task Update_MonitorsUpdateMaximumSetGen() // this example assumes you already have this NewRelicMonitorResource created on azure // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource - string subscriptionId = "hfmjmpyqgezxkp"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgNewRelic"; string monitorName = "cdlymktqw"; ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); @@ -144,14 +145,15 @@ public async Task Update_MonitorsUpdateMaximumSetGen() PlanData = new NewRelicPlanDetails() { UsageType = NewRelicObservabilityUsageType.Payg, - BillingCycle = NewRelicObservabilityBillingCycle.Yearly, + NewRelicPlanBillingCycle = "Yearly", PlanDetails = "tbbiaga", EffectiveOn = DateTimeOffset.Parse("2022-12-05T14:11:37.786Z"), }, OrgCreationSource = NewRelicObservabilityOrgCreationSource.Liftr, AccountCreationSource = NewRelicObservabilityAccountCreationSource.Liftr, }; - NewRelicMonitorResource result = await newRelicMonitorResource.UpdateAsync(patch); + ArmOperation lro = await newRelicMonitorResource.UpdateAsync(WaitUntil.Completed, patch); + NewRelicMonitorResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance @@ -165,7 +167,7 @@ public async Task Update_MonitorsUpdateMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_MonitorsDeleteMaximumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_Delete_MaximumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/Monitors_Delete_MaximumSet_Gen.json // this example is just showing the usage of "Monitors_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -175,7 +177,7 @@ public async Task Delete_MonitorsDeleteMaximumSetGen() // this example assumes you already have this NewRelicMonitorResource created on azure // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource - string subscriptionId = "ddqonpqwjr"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgopenapi"; string monitorName = "ipxmlcbonyxtolzejcjshkmlron"; ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); @@ -193,7 +195,7 @@ public async Task Delete_MonitorsDeleteMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_MonitorsDeleteMinimumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_Delete_MinimumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/Monitors_Delete_MinimumSet_Gen.json // this example is just showing the usage of "Monitors_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -203,7 +205,7 @@ public async Task Delete_MonitorsDeleteMinimumSetGen() // this example assumes you already have this NewRelicMonitorResource created on azure // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource - string subscriptionId = "ddqonpqwjr"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgopenapi"; string monitorName = "ipxmlcbonyxtolzejcjshkmlron"; ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); @@ -221,7 +223,7 @@ public async Task Delete_MonitorsDeleteMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetMetricRules_MonitorsGetMetricRulesMaximumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_GetMetricRules_MaximumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/Monitors_GetMetricRules_MaximumSet_Gen.json // this example is just showing the usage of "Monitors_GetMetricRules" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -231,7 +233,7 @@ public async Task GetMetricRules_MonitorsGetMetricRulesMaximumSetGen() // this example assumes you already have this NewRelicMonitorResource created on azure // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource - string subscriptionId = "nqmcgifgaqlf"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgNewRelic"; string monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); @@ -249,7 +251,7 @@ public async Task GetMetricRules_MonitorsGetMetricRulesMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetMetricRules_MonitorsGetMetricRulesMinimumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_GetMetricRules_MinimumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/Monitors_GetMetricRules_MinimumSet_Gen.json // this example is just showing the usage of "Monitors_GetMetricRules" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -259,7 +261,7 @@ public async Task GetMetricRules_MonitorsGetMetricRulesMinimumSetGen() // this example assumes you already have this NewRelicMonitorResource created on azure // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource - string subscriptionId = "nqmcgifgaqlf"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgNewRelic"; string monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); @@ -277,7 +279,7 @@ public async Task GetMetricRules_MonitorsGetMetricRulesMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetMetricStatus_MonitorsGetMetricStatusMaximumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_GetMetricStatus_MaximumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/Monitors_GetMetricStatus_MaximumSet_Gen.json // this example is just showing the usage of "Monitors_GetMetricStatus" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -287,7 +289,7 @@ public async Task GetMetricStatus_MonitorsGetMetricStatusMaximumSetGen() // this example assumes you already have this NewRelicMonitorResource created on azure // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource - string subscriptionId = "nqmcgifgaqlf"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgNewRelic"; string monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); @@ -298,7 +300,7 @@ public async Task GetMetricStatus_MonitorsGetMetricStatusMaximumSetGen() { AzureResourceIds = { -"enfghpfw" +"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/NewRelic.Observability/monitors/fhcjxnxumkdlgpwanewtkdnyuz" }, }; NewRelicMetricsStatusResult result = await newRelicMonitorResource.GetMetricStatusAsync(content); @@ -311,7 +313,7 @@ public async Task GetMetricStatus_MonitorsGetMetricStatusMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetMetricStatus_MonitorsGetMetricStatusMinimumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_GetMetricStatus_MinimumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/Monitors_GetMetricStatus_MinimumSet_Gen.json // this example is just showing the usage of "Monitors_GetMetricStatus" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -321,14 +323,20 @@ public async Task GetMetricStatus_MonitorsGetMetricStatusMinimumSetGen() // this example assumes you already have this NewRelicMonitorResource created on azure // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource - string subscriptionId = "nqmcgifgaqlf"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgNewRelic"; string monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); NewRelicMonitorResource newRelicMonitorResource = client.GetNewRelicMonitorResource(newRelicMonitorResourceId); // invoke the operation - NewRelicMetricsStatusContent content = new NewRelicMetricsStatusContent("ruxvg@xqkmdhrnoo.hlmbpm"); + NewRelicMetricsStatusContent content = new NewRelicMetricsStatusContent("ruxvg@xqkmdhrnoo.hlmbpm") + { + AzureResourceIds = +{ +"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/NewRelic.Observability/monitors/fhcjxnxumkdlgpwanewtkdnyuz" +}, + }; NewRelicMetricsStatusResult result = await newRelicMonitorResource.GetMetricStatusAsync(content); Console.WriteLine($"Succeeded: {result}"); @@ -339,7 +347,7 @@ public async Task GetMetricStatus_MonitorsGetMetricStatusMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAppServices_MonitorsListAppServicesMaximumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListAppServices_MaximumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/Monitors_ListAppServices_MaximumSet_Gen.json // this example is just showing the usage of "Monitors_ListAppServices" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -349,7 +357,7 @@ public async Task GetAppServices_MonitorsListAppServicesMaximumSetGen() // this example assumes you already have this NewRelicMonitorResource created on azure // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource - string subscriptionId = "nqmcgifgaqlf"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgNewRelic"; string monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); @@ -360,7 +368,7 @@ public async Task GetAppServices_MonitorsListAppServicesMaximumSetGen() { AzureResourceIds = { -new ResourceIdentifier("pvzrksrmzowobuhxpwiotnpcvjbu") +new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/NewRelic.Observability/monitors/fhcjxnxumkdlgpwanewtkdnyuz") }, }; await foreach (NewRelicObservabilityAppServiceInfo item in newRelicMonitorResource.GetAppServicesAsync(content)) @@ -376,7 +384,7 @@ public async Task GetAppServices_MonitorsListAppServicesMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAppServices_MonitorsListAppServicesMinimumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListAppServices_MinimumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/Monitors_ListAppServices_MinimumSet_Gen.json // this example is just showing the usage of "Monitors_ListAppServices" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -386,14 +394,20 @@ public async Task GetAppServices_MonitorsListAppServicesMinimumSetGen() // this example assumes you already have this NewRelicMonitorResource created on azure // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource - string subscriptionId = "nqmcgifgaqlf"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgNewRelic"; string monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); NewRelicMonitorResource newRelicMonitorResource = client.GetNewRelicMonitorResource(newRelicMonitorResourceId); // invoke the operation and iterate over the result - NewRelicAppServicesGetContent content = new NewRelicAppServicesGetContent("ruxvg@xqkmdhrnoo.hlmbpm"); + NewRelicAppServicesGetContent content = new NewRelicAppServicesGetContent("ruxvg@xqkmdhrnoo.hlmbpm") + { + AzureResourceIds = +{ +new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/NewRelic.Observability/monitors/fhcjxnxumkdlgpwanewtkdnyuz") +}, + }; await foreach (NewRelicObservabilityAppServiceInfo item in newRelicMonitorResource.GetAppServicesAsync(content)) { Console.WriteLine($"Succeeded: {item}"); @@ -407,7 +421,7 @@ public async Task GetAppServices_MonitorsListAppServicesMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task SwitchBilling_MonitorsSwitchBillingMaximumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_SwitchBilling_MaximumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/Monitors_SwitchBilling_MaximumSet_Gen.json // this example is just showing the usage of "Monitors_SwitchBilling" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -417,7 +431,7 @@ public async Task SwitchBilling_MonitorsSwitchBillingMaximumSetGen() // this example assumes you already have this NewRelicMonitorResource created on azure // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource - string subscriptionId = "nqmcgifgaqlf"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgNewRelic"; string monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); @@ -426,12 +440,12 @@ public async Task SwitchBilling_MonitorsSwitchBillingMaximumSetGen() // invoke the operation NewRelicSwitchBillingContent content = new NewRelicSwitchBillingContent("ruxvg@xqkmdhrnoo.hlmbpm") { - AzureResourceId = new ResourceIdentifier("enfghpfw"), + AzureResourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/NewRelic.Observability/monitors/fhcjxnxumkdlgpwanewtkdnyuz"), OrganizationId = "k", PlanData = new NewRelicPlanDetails() { UsageType = NewRelicObservabilityUsageType.Payg, - BillingCycle = NewRelicObservabilityBillingCycle.Yearly, + NewRelicPlanBillingCycle = "Yearly", PlanDetails = "tbbiaga", EffectiveOn = DateTimeOffset.Parse("2022-12-05T14:11:37.786Z"), }, @@ -450,7 +464,7 @@ public async Task SwitchBilling_MonitorsSwitchBillingMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task SwitchBilling_MonitorsSwitchBillingMinimumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_SwitchBilling_MinimumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/Monitors_SwitchBilling_MinimumSet_Gen.json // this example is just showing the usage of "Monitors_SwitchBilling" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -460,7 +474,7 @@ public async Task SwitchBilling_MonitorsSwitchBillingMinimumSetGen() // this example assumes you already have this NewRelicMonitorResource created on azure // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource - string subscriptionId = "nqmcgifgaqlf"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgNewRelic"; string monitorName = "fhcjxnxumkdlgpwanewtkdnyuz"; ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); @@ -482,7 +496,7 @@ public async Task SwitchBilling_MonitorsSwitchBillingMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetHosts_MonitorsListHostsMaximumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListHosts_MaximumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/Monitors_ListHosts_MaximumSet_Gen.json // this example is just showing the usage of "Monitors_ListHosts" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -492,7 +506,7 @@ public async Task GetHosts_MonitorsListHostsMaximumSetGen() // this example assumes you already have this NewRelicMonitorResource created on azure // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource - string subscriptionId = "ddqonpqwjr"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgopenapi"; string monitorName = "ipxmlcbonyxtolzejcjshkmlron"; ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); @@ -519,7 +533,7 @@ public async Task GetHosts_MonitorsListHostsMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetHosts_MonitorsListHostsMinimumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListHosts_MinimumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/Monitors_ListHosts_MinimumSet_Gen.json // this example is just showing the usage of "Monitors_ListHosts" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -529,7 +543,7 @@ public async Task GetHosts_MonitorsListHostsMinimumSetGen() // this example assumes you already have this NewRelicMonitorResource created on azure // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource - string subscriptionId = "ddqonpqwjr"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgopenapi"; string monitorName = "ipxmlcbonyxtolzejcjshkmlron"; ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); @@ -556,7 +570,7 @@ public async Task GetHosts_MonitorsListHostsMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetMonitoredResources_MonitorsListMonitoredResourcesMaximumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListMonitoredResources_MaximumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/Monitors_ListMonitoredResources_MaximumSet_Gen.json // this example is just showing the usage of "Monitors_ListMonitoredResources" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -566,7 +580,7 @@ public async Task GetMonitoredResources_MonitorsListMonitoredResourcesMaximumSet // this example assumes you already have this NewRelicMonitorResource created on azure // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource - string subscriptionId = "ddqonpqwjr"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgopenapi"; string monitorName = "ipxmlcbonyxtolzejcjshkmlron"; ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); @@ -586,7 +600,7 @@ public async Task GetMonitoredResources_MonitorsListMonitoredResourcesMaximumSet [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetMonitoredResources_MonitorsListMonitoredResourcesMinimumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListMonitoredResources_MinimumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/Monitors_ListMonitoredResources_MinimumSet_Gen.json // this example is just showing the usage of "Monitors_ListMonitoredResources" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -596,7 +610,7 @@ public async Task GetMonitoredResources_MonitorsListMonitoredResourcesMinimumSet // this example assumes you already have this NewRelicMonitorResource created on azure // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource - string subscriptionId = "ddqonpqwjr"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgopenapi"; string monitorName = "ipxmlcbonyxtolzejcjshkmlron"; ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); @@ -611,12 +625,42 @@ public async Task GetMonitoredResources_MonitorsListMonitoredResourcesMinimumSet Console.WriteLine($"Succeeded"); } + // Monitors_ListLinkedResources + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetLinkedResources_MonitorsListLinkedResources() + { + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/LinkedResources_List.json + // this example is just showing the usage of "Monitors_ListLinkedResources" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NewRelicMonitorResource created on azure + // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string monitorName = "myMonitor"; + ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); + NewRelicMonitorResource newRelicMonitorResource = client.GetNewRelicMonitorResource(newRelicMonitorResourceId); + + // invoke the operation and iterate over the result + await foreach (SubResource item in newRelicMonitorResource.GetLinkedResourcesAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + // Monitors_VmHostPayload_MaximumSet_Gen [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task VmHostPayload_MonitorsVmHostPayloadMaximumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_VmHostPayload_MaximumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/Monitors_VmHostPayload_MaximumSet_Gen.json // this example is just showing the usage of "Monitors_VmHostPayload" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -626,7 +670,7 @@ public async Task VmHostPayload_MonitorsVmHostPayloadMaximumSetGen() // this example assumes you already have this NewRelicMonitorResource created on azure // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource - string subscriptionId = "ddqonpqwjr"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgopenapi"; string monitorName = "ipxmlcbonyxtolzejcjshkmlron"; ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); @@ -643,7 +687,7 @@ public async Task VmHostPayload_MonitorsVmHostPayloadMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task VmHostPayload_MonitorsVmHostPayloadMinimumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_VmHostPayload_MinimumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/Monitors_VmHostPayload_MinimumSet_Gen.json // this example is just showing the usage of "Monitors_VmHostPayload" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -653,7 +697,7 @@ public async Task VmHostPayload_MonitorsVmHostPayloadMinimumSetGen() // this example assumes you already have this NewRelicMonitorResource created on azure // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource - string subscriptionId = "ddqonpqwjr"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgopenapi"; string monitorName = "ipxmlcbonyxtolzejcjshkmlron"; ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); @@ -664,5 +708,62 @@ public async Task VmHostPayload_MonitorsVmHostPayloadMinimumSetGen() Console.WriteLine($"Succeeded: {result}"); } + + // BillingInfo_Get + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetBillingInfo_BillingInfoGet() + { + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/BillingInfo_Get.json + // this example is just showing the usage of "BillingInfo_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NewRelicMonitorResource created on azure + // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string monitorName = "myMonitor"; + ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); + NewRelicMonitorResource newRelicMonitorResource = client.GetNewRelicMonitorResource(newRelicMonitorResourceId); + + // invoke the operation + NewRelicBillingInfoResult result = await newRelicMonitorResource.GetBillingInfoAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + // ConnectedPartnerResources_List + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetConnectedPartnerResources_ConnectedPartnerResourcesList() + { + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/ConnectedPartnerResources_List.json + // this example is just showing the usage of "ConnectedPartnerResources_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NewRelicMonitorResource created on azure + // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string monitorName = "myMonitor"; + ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); + NewRelicMonitorResource newRelicMonitorResource = client.GetNewRelicMonitorResource(newRelicMonitorResourceId); + + // invoke the operation and iterate over the result + await foreach (NewRelicConnectedPartnerResourceInfo item in newRelicMonitorResource.GetConnectedPartnerResourcesAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/samples/Generated/Samples/Sample_NewRelicMonitorResourceCollection.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/samples/Generated/Samples/Sample_NewRelicMonitorResourceCollection.cs index 4dac08228be62..bc76164b22f1f 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/samples/Generated/Samples/Sample_NewRelicMonitorResourceCollection.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/samples/Generated/Samples/Sample_NewRelicMonitorResourceCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_NewRelicMonitorResourceCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_MonitorsListByResourceGroupMaximumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_ListByResourceGroup_MaximumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/Monitors_ListByResourceGroup_MaximumSet_Gen.json // this example is just showing the usage of "Monitors_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -32,7 +32,7 @@ public async Task GetAll_MonitorsListByResourceGroupMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "hfmjmpyqgezxkp"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgNewRelic"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -58,7 +58,7 @@ public async Task GetAll_MonitorsListByResourceGroupMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_MonitorsGetMaximumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_Get_MaximumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/Monitors_Get_MaximumSet_Gen.json // this example is just showing the usage of "Monitors_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -68,7 +68,7 @@ public async Task Get_MonitorsGetMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "hfmjmpyqgezxkp"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgNewRelic"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -92,7 +92,7 @@ public async Task Get_MonitorsGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_MonitorsGetMaximumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_Get_MaximumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/Monitors_Get_MaximumSet_Gen.json // this example is just showing the usage of "Monitors_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -102,7 +102,7 @@ public async Task Exists_MonitorsGetMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "hfmjmpyqgezxkp"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgNewRelic"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -122,7 +122,7 @@ public async Task Exists_MonitorsGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_MonitorsGetMaximumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_Get_MaximumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/Monitors_Get_MaximumSet_Gen.json // this example is just showing the usage of "Monitors_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -132,7 +132,7 @@ public async Task GetIfExists_MonitorsGetMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "hfmjmpyqgezxkp"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgNewRelic"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -164,7 +164,7 @@ public async Task GetIfExists_MonitorsGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_MonitorsCreateOrUpdateMaximumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_CreateOrUpdate_MaximumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/Monitors_CreateOrUpdate_MaximumSet_Gen.json // this example is just showing the usage of "Monitors_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -174,7 +174,7 @@ public async Task CreateOrUpdate_MonitorsCreateOrUpdateMaximumSetGen() // this example assumes you already have this ResourceGroupResource created on azure // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "hfmjmpyqgezxkp"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgNewRelic"; ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); @@ -222,12 +222,14 @@ public async Task CreateOrUpdate_MonitorsCreateOrUpdateMaximumSetGen() PlanData = new NewRelicPlanDetails() { UsageType = NewRelicObservabilityUsageType.Payg, - BillingCycle = NewRelicObservabilityBillingCycle.Yearly, + NewRelicPlanBillingCycle = "Yearly", PlanDetails = "tbbiaga", EffectiveOn = DateTimeOffset.Parse("2022-12-05T14:11:37.786Z"), }, OrgCreationSource = NewRelicObservabilityOrgCreationSource.Liftr, AccountCreationSource = NewRelicObservabilityAccountCreationSource.Liftr, + SubscriptionState = "Suspended", + SaaSAzureSubscriptionStatus = "Subscribed", Tags = { ["key6976"] = "oaxfhf", diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/samples/Generated/Samples/Sample_NewRelicMonitoredSubscriptionCollection.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/samples/Generated/Samples/Sample_NewRelicMonitoredSubscriptionCollection.cs new file mode 100644 index 0000000000000..c602bfd8b4181 --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/samples/Generated/Samples/Sample_NewRelicMonitoredSubscriptionCollection.cs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.NewRelicObservability.Models; + +namespace Azure.ResourceManager.NewRelicObservability.Samples +{ + public partial class Sample_NewRelicMonitoredSubscriptionCollection + { + // Monitors_GetMonitoredSubscriptions + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_MonitorsGetMonitoredSubscriptions() + { + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/MonitoredSubscriptions_List.json + // this example is just showing the usage of "MonitoredSubscriptions_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NewRelicMonitorResource created on azure + // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string monitorName = "myMonitor"; + ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); + NewRelicMonitorResource newRelicMonitorResource = client.GetNewRelicMonitorResource(newRelicMonitorResourceId); + + // get the collection of this NewRelicMonitoredSubscriptionResource + NewRelicMonitoredSubscriptionCollection collection = newRelicMonitorResource.GetNewRelicMonitoredSubscriptions(); + + // invoke the operation and iterate over the result + await foreach (NewRelicMonitoredSubscriptionResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NewRelicMonitoredSubscriptionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Monitors_GetMonitoredSubscriptions + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_MonitorsGetMonitoredSubscriptions() + { + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/MonitoredSubscriptions_Get.json + // this example is just showing the usage of "MonitoredSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NewRelicMonitorResource created on azure + // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string monitorName = "myMonitor"; + ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); + NewRelicMonitorResource newRelicMonitorResource = client.GetNewRelicMonitorResource(newRelicMonitorResourceId); + + // get the collection of this NewRelicMonitoredSubscriptionResource + NewRelicMonitoredSubscriptionCollection collection = newRelicMonitorResource.GetNewRelicMonitoredSubscriptions(); + + // invoke the operation + MonitoredSubscriptionConfigurationName configurationName = MonitoredSubscriptionConfigurationName.Default; + NewRelicMonitoredSubscriptionResource result = await collection.GetAsync(configurationName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NewRelicMonitoredSubscriptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Monitors_GetMonitoredSubscriptions + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_MonitorsGetMonitoredSubscriptions() + { + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/MonitoredSubscriptions_Get.json + // this example is just showing the usage of "MonitoredSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NewRelicMonitorResource created on azure + // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string monitorName = "myMonitor"; + ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); + NewRelicMonitorResource newRelicMonitorResource = client.GetNewRelicMonitorResource(newRelicMonitorResourceId); + + // get the collection of this NewRelicMonitoredSubscriptionResource + NewRelicMonitoredSubscriptionCollection collection = newRelicMonitorResource.GetNewRelicMonitoredSubscriptions(); + + // invoke the operation + MonitoredSubscriptionConfigurationName configurationName = MonitoredSubscriptionConfigurationName.Default; + bool result = await collection.ExistsAsync(configurationName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Monitors_GetMonitoredSubscriptions + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_MonitorsGetMonitoredSubscriptions() + { + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/MonitoredSubscriptions_Get.json + // this example is just showing the usage of "MonitoredSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NewRelicMonitorResource created on azure + // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string monitorName = "myMonitor"; + ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); + NewRelicMonitorResource newRelicMonitorResource = client.GetNewRelicMonitorResource(newRelicMonitorResourceId); + + // get the collection of this NewRelicMonitoredSubscriptionResource + NewRelicMonitoredSubscriptionCollection collection = newRelicMonitorResource.GetNewRelicMonitoredSubscriptions(); + + // invoke the operation + MonitoredSubscriptionConfigurationName configurationName = MonitoredSubscriptionConfigurationName.Default; + NullableResponse response = await collection.GetIfExistsAsync(configurationName); + NewRelicMonitoredSubscriptionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NewRelicMonitoredSubscriptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Monitors_AddMonitoredSubscriptions + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_MonitorsAddMonitoredSubscriptions() + { + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/MonitoredSubscriptions_CreateOrUpdate.json + // this example is just showing the usage of "MonitoredSubscriptions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NewRelicMonitorResource created on azure + // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string monitorName = "myMonitor"; + ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); + NewRelicMonitorResource newRelicMonitorResource = client.GetNewRelicMonitorResource(newRelicMonitorResourceId); + + // get the collection of this NewRelicMonitoredSubscriptionResource + NewRelicMonitoredSubscriptionCollection collection = newRelicMonitorResource.GetNewRelicMonitoredSubscriptions(); + + // invoke the operation + MonitoredSubscriptionConfigurationName configurationName = MonitoredSubscriptionConfigurationName.Default; + NewRelicMonitoredSubscriptionData data = new NewRelicMonitoredSubscriptionData(); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, configurationName, data); + NewRelicMonitoredSubscriptionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NewRelicMonitoredSubscriptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/samples/Generated/Samples/Sample_NewRelicMonitoredSubscriptionResource.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/samples/Generated/Samples/Sample_NewRelicMonitoredSubscriptionResource.cs new file mode 100644 index 0000000000000..c4d8a67784f9a --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/samples/Generated/Samples/Sample_NewRelicMonitoredSubscriptionResource.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.NewRelicObservability.Models; + +namespace Azure.ResourceManager.NewRelicObservability.Samples +{ + public partial class Sample_NewRelicMonitoredSubscriptionResource + { + // Monitors_GetMonitoredSubscriptions + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_MonitorsGetMonitoredSubscriptions() + { + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/MonitoredSubscriptions_Get.json + // this example is just showing the usage of "MonitoredSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NewRelicMonitoredSubscriptionResource created on azure + // for more information of creating NewRelicMonitoredSubscriptionResource, please refer to the document of NewRelicMonitoredSubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string monitorName = "myMonitor"; + MonitoredSubscriptionConfigurationName configurationName = MonitoredSubscriptionConfigurationName.Default; + ResourceIdentifier newRelicMonitoredSubscriptionResourceId = NewRelicMonitoredSubscriptionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName, configurationName); + NewRelicMonitoredSubscriptionResource newRelicMonitoredSubscription = client.GetNewRelicMonitoredSubscriptionResource(newRelicMonitoredSubscriptionResourceId); + + // invoke the operation + NewRelicMonitoredSubscriptionResource result = await newRelicMonitoredSubscription.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NewRelicMonitoredSubscriptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Monitors_UpdateMonitoredSubscriptions + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_MonitorsUpdateMonitoredSubscriptions() + { + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/MonitoredSubscriptions_Update.json + // this example is just showing the usage of "MonitoredSubscriptions_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NewRelicMonitoredSubscriptionResource created on azure + // for more information of creating NewRelicMonitoredSubscriptionResource, please refer to the document of NewRelicMonitoredSubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string monitorName = "myMonitor"; + MonitoredSubscriptionConfigurationName configurationName = MonitoredSubscriptionConfigurationName.Default; + ResourceIdentifier newRelicMonitoredSubscriptionResourceId = NewRelicMonitoredSubscriptionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName, configurationName); + NewRelicMonitoredSubscriptionResource newRelicMonitoredSubscription = client.GetNewRelicMonitoredSubscriptionResource(newRelicMonitoredSubscriptionResourceId); + + // invoke the operation + NewRelicMonitoredSubscriptionData data = new NewRelicMonitoredSubscriptionData(); + ArmOperation lro = await newRelicMonitoredSubscription.UpdateAsync(WaitUntil.Completed, data); + NewRelicMonitoredSubscriptionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NewRelicMonitoredSubscriptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Monitors_DeleteMonitoredSubscriptions + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_MonitorsDeleteMonitoredSubscriptions() + { + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/MonitoredSubscriptions_Delete.json + // this example is just showing the usage of "MonitoredSubscriptions_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NewRelicMonitoredSubscriptionResource created on azure + // for more information of creating NewRelicMonitoredSubscriptionResource, please refer to the document of NewRelicMonitoredSubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string monitorName = "myMonitor"; + MonitoredSubscriptionConfigurationName configurationName = MonitoredSubscriptionConfigurationName.Default; + ResourceIdentifier newRelicMonitoredSubscriptionResourceId = NewRelicMonitoredSubscriptionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName, configurationName); + NewRelicMonitoredSubscriptionResource newRelicMonitoredSubscription = client.GetNewRelicMonitoredSubscriptionResource(newRelicMonitoredSubscriptionResourceId); + + // invoke the operation + await newRelicMonitoredSubscription.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/samples/Generated/Samples/Sample_NewRelicObservabilityTagRuleCollection.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/samples/Generated/Samples/Sample_NewRelicObservabilityTagRuleCollection.cs index 0fc0c4b9c3f0e..85873c625f659 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/samples/Generated/Samples/Sample_NewRelicObservabilityTagRuleCollection.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/samples/Generated/Samples/Sample_NewRelicObservabilityTagRuleCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_NewRelicObservabilityTagRuleCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_TagRulesListByNewRelicMonitorResourceMaximumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_ListByNewRelicMonitorResource_MaximumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/TagRules_ListByNewRelicMonitorResource_MaximumSet_Gen.json // this example is just showing the usage of "TagRules_ListByNewRelicMonitorResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task GetAll_TagRulesListByNewRelicMonitorResourceMaximumSetGen() // this example assumes you already have this NewRelicMonitorResource created on azure // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource - string subscriptionId = "ddqonpqwjr"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgopenapi"; string monitorName = "ipxmlcbonyxtolzejcjshkmlron"; ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); @@ -57,7 +57,7 @@ public async Task GetAll_TagRulesListByNewRelicMonitorResourceMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_TagRulesListByNewRelicMonitorResourceMinimumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_ListByNewRelicMonitorResource_MinimumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/TagRules_ListByNewRelicMonitorResource_MinimumSet_Gen.json // this example is just showing the usage of "TagRules_ListByNewRelicMonitorResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -67,7 +67,7 @@ public async Task GetAll_TagRulesListByNewRelicMonitorResourceMinimumSetGen() // this example assumes you already have this NewRelicMonitorResource created on azure // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource - string subscriptionId = "ddqonpqwjr"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgopenapi"; string monitorName = "ipxmlcbonyxtolzejcjshkmlron"; ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); @@ -94,7 +94,7 @@ public async Task GetAll_TagRulesListByNewRelicMonitorResourceMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_TagRulesGetMaximumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Get_MaximumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/TagRules_Get_MaximumSet_Gen.json // this example is just showing the usage of "TagRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -104,7 +104,7 @@ public async Task Get_TagRulesGetMaximumSetGen() // this example assumes you already have this NewRelicMonitorResource created on azure // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource - string subscriptionId = "ddqonpqwjr"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgopenapi"; string monitorName = "ipxmlcbonyxtolzejcjshkmlron"; ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); @@ -129,7 +129,7 @@ public async Task Get_TagRulesGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_TagRulesGetMaximumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Get_MaximumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/TagRules_Get_MaximumSet_Gen.json // this example is just showing the usage of "TagRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -139,7 +139,7 @@ public async Task Exists_TagRulesGetMaximumSetGen() // this example assumes you already have this NewRelicMonitorResource created on azure // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource - string subscriptionId = "ddqonpqwjr"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgopenapi"; string monitorName = "ipxmlcbonyxtolzejcjshkmlron"; ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); @@ -160,7 +160,7 @@ public async Task Exists_TagRulesGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_TagRulesGetMaximumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Get_MaximumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/TagRules_Get_MaximumSet_Gen.json // this example is just showing the usage of "TagRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -170,7 +170,7 @@ public async Task GetIfExists_TagRulesGetMaximumSetGen() // this example assumes you already have this NewRelicMonitorResource created on azure // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource - string subscriptionId = "ddqonpqwjr"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgopenapi"; string monitorName = "ipxmlcbonyxtolzejcjshkmlron"; ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); @@ -203,7 +203,7 @@ public async Task GetIfExists_TagRulesGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_TagRulesGetMinimumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Get_MinimumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/TagRules_Get_MinimumSet_Gen.json // this example is just showing the usage of "TagRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -213,7 +213,7 @@ public async Task Get_TagRulesGetMinimumSetGen() // this example assumes you already have this NewRelicMonitorResource created on azure // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource - string subscriptionId = "ddqonpqwjr"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgopenapi"; string monitorName = "ipxmlcbonyxtolzejcjshkmlron"; ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); @@ -238,7 +238,7 @@ public async Task Get_TagRulesGetMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_TagRulesGetMinimumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Get_MinimumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/TagRules_Get_MinimumSet_Gen.json // this example is just showing the usage of "TagRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -248,7 +248,7 @@ public async Task Exists_TagRulesGetMinimumSetGen() // this example assumes you already have this NewRelicMonitorResource created on azure // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource - string subscriptionId = "ddqonpqwjr"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgopenapi"; string monitorName = "ipxmlcbonyxtolzejcjshkmlron"; ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); @@ -269,7 +269,7 @@ public async Task Exists_TagRulesGetMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_TagRulesGetMinimumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Get_MinimumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/TagRules_Get_MinimumSet_Gen.json // this example is just showing the usage of "TagRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -279,7 +279,7 @@ public async Task GetIfExists_TagRulesGetMinimumSetGen() // this example assumes you already have this NewRelicMonitorResource created on azure // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource - string subscriptionId = "ddqonpqwjr"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgopenapi"; string monitorName = "ipxmlcbonyxtolzejcjshkmlron"; ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); @@ -312,7 +312,7 @@ public async Task GetIfExists_TagRulesGetMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_TagRulesCreateOrUpdateMaximumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_CreateOrUpdate_MaximumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/TagRules_CreateOrUpdate_MaximumSet_Gen.json // this example is just showing the usage of "TagRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -322,7 +322,7 @@ public async Task CreateOrUpdate_TagRulesCreateOrUpdateMaximumSetGen() // this example assumes you already have this NewRelicMonitorResource created on azure // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource - string subscriptionId = "ddqonpqwjr"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgopenapi"; string monitorName = "ipxmlcbonyxtolzejcjshkmlron"; ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); @@ -379,7 +379,7 @@ public async Task CreateOrUpdate_TagRulesCreateOrUpdateMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_TagRulesCreateOrUpdateMinimumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_CreateOrUpdate_MinimumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/TagRules_CreateOrUpdate_MinimumSet_Gen.json // this example is just showing the usage of "TagRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -389,7 +389,7 @@ public async Task CreateOrUpdate_TagRulesCreateOrUpdateMinimumSetGen() // this example assumes you already have this NewRelicMonitorResource created on azure // for more information of creating NewRelicMonitorResource, please refer to the document of NewRelicMonitorResource - string subscriptionId = "ddqonpqwjr"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgopenapi"; string monitorName = "ipxmlcbonyxtolzejcjshkmlron"; ResourceIdentifier newRelicMonitorResourceId = NewRelicMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/samples/Generated/Samples/Sample_NewRelicObservabilityTagRuleResource.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/samples/Generated/Samples/Sample_NewRelicObservabilityTagRuleResource.cs index f7f8a881a653c..8e149694d12b3 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/samples/Generated/Samples/Sample_NewRelicObservabilityTagRuleResource.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/samples/Generated/Samples/Sample_NewRelicObservabilityTagRuleResource.cs @@ -20,7 +20,7 @@ public partial class Sample_NewRelicObservabilityTagRuleResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_TagRulesGetMaximumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Get_MaximumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/TagRules_Get_MaximumSet_Gen.json // this example is just showing the usage of "TagRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task Get_TagRulesGetMaximumSetGen() // this example assumes you already have this NewRelicObservabilityTagRuleResource created on azure // for more information of creating NewRelicObservabilityTagRuleResource, please refer to the document of NewRelicObservabilityTagRuleResource - string subscriptionId = "ddqonpqwjr"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgopenapi"; string monitorName = "ipxmlcbonyxtolzejcjshkmlron"; string ruleSetName = "bxcantgzggsepbhqmedjqyrqeezmfb"; @@ -52,7 +52,7 @@ public async Task Get_TagRulesGetMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_TagRulesGetMinimumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Get_MinimumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/TagRules_Get_MinimumSet_Gen.json // this example is just showing the usage of "TagRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -62,7 +62,7 @@ public async Task Get_TagRulesGetMinimumSetGen() // this example assumes you already have this NewRelicObservabilityTagRuleResource created on azure // for more information of creating NewRelicObservabilityTagRuleResource, please refer to the document of NewRelicObservabilityTagRuleResource - string subscriptionId = "ddqonpqwjr"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgopenapi"; string monitorName = "ipxmlcbonyxtolzejcjshkmlron"; string ruleSetName = "bxcantgzggsepbhqmedjqyrqeezmfb"; @@ -84,7 +84,7 @@ public async Task Get_TagRulesGetMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_TagRulesDeleteMaximumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Delete_MaximumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/TagRules_Delete_MaximumSet_Gen.json // this example is just showing the usage of "TagRules_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -94,7 +94,7 @@ public async Task Delete_TagRulesDeleteMaximumSetGen() // this example assumes you already have this NewRelicObservabilityTagRuleResource created on azure // for more information of creating NewRelicObservabilityTagRuleResource, please refer to the document of NewRelicObservabilityTagRuleResource - string subscriptionId = "ddqonpqwjr"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgopenapi"; string monitorName = "ipxmlcbonyxtolzejcjshkmlron"; string ruleSetName = "bxcantgzggsepbhqmedjqyrqeezmfb"; @@ -112,7 +112,7 @@ public async Task Delete_TagRulesDeleteMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_TagRulesDeleteMinimumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Delete_MinimumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/TagRules_Delete_MinimumSet_Gen.json // this example is just showing the usage of "TagRules_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Delete_TagRulesDeleteMinimumSetGen() // this example assumes you already have this NewRelicObservabilityTagRuleResource created on azure // for more information of creating NewRelicObservabilityTagRuleResource, please refer to the document of NewRelicObservabilityTagRuleResource - string subscriptionId = "ddqonpqwjr"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgopenapi"; string monitorName = "ipxmlcbonyxtolzejcjshkmlron"; string ruleSetName = "bxcantgzggsepbhqmedjqyrqeezmfb"; @@ -140,7 +140,7 @@ public async Task Delete_TagRulesDeleteMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_TagRulesUpdateMaximumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Update_MaximumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/TagRules_Update_MaximumSet_Gen.json // this example is just showing the usage of "TagRules_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -150,7 +150,7 @@ public async Task Update_TagRulesUpdateMaximumSetGen() // this example assumes you already have this NewRelicObservabilityTagRuleResource created on azure // for more information of creating NewRelicObservabilityTagRuleResource, please refer to the document of NewRelicObservabilityTagRuleResource - string subscriptionId = "ddqonpqwjr"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgopenapi"; string monitorName = "ipxmlcbonyxtolzejcjshkmlron"; string ruleSetName = "bxcantgzggsepbhqmedjqyrqeezmfb"; @@ -203,7 +203,7 @@ public async Task Update_TagRulesUpdateMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_TagRulesUpdateMinimumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Update_MinimumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/TagRules_Update_MinimumSet_Gen.json // this example is just showing the usage of "TagRules_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -213,7 +213,7 @@ public async Task Update_TagRulesUpdateMinimumSetGen() // this example assumes you already have this NewRelicObservabilityTagRuleResource created on azure // for more information of creating NewRelicObservabilityTagRuleResource, please refer to the document of NewRelicObservabilityTagRuleResource - string subscriptionId = "ddqonpqwjr"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "rgopenapi"; string monitorName = "ipxmlcbonyxtolzejcjshkmlron"; string ruleSetName = "bxcantgzggsepbhqmedjqyrqeezmfb"; diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 807bbcf3312d7..6e078d0522801 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_SubscriptionResourceExtensions [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNewRelicAccounts_AccountsListMaximumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Accounts_List_MaximumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/Accounts_List_MaximumSet_Gen.json // this example is just showing the usage of "Accounts_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -31,7 +31,7 @@ public async Task GetNewRelicAccounts_AccountsListMaximumSetGen() // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "nqmcgifgaqlf"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -51,7 +51,7 @@ public async Task GetNewRelicAccounts_AccountsListMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNewRelicAccounts_AccountsListMinimumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Accounts_List_MinimumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/Accounts_List_MinimumSet_Gen.json // this example is just showing the usage of "Accounts_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -61,7 +61,7 @@ public async Task GetNewRelicAccounts_AccountsListMinimumSetGen() // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "nqmcgifgaqlf"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -81,7 +81,7 @@ public async Task GetNewRelicAccounts_AccountsListMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNewRelicOrganizations_OrganizationsListMaximumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Organizations_List_MaximumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/Organizations_List_MaximumSet_Gen.json // this example is just showing the usage of "Organizations_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task GetNewRelicOrganizations_OrganizationsListMaximumSetGen() // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "nqmcgifgaqlf"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -111,7 +111,7 @@ public async Task GetNewRelicOrganizations_OrganizationsListMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNewRelicOrganizations_OrganizationsListMinimumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Organizations_List_MinimumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/Organizations_List_MinimumSet_Gen.json // this example is just showing the usage of "Organizations_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -121,7 +121,7 @@ public async Task GetNewRelicOrganizations_OrganizationsListMinimumSetGen() // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "nqmcgifgaqlf"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -141,7 +141,7 @@ public async Task GetNewRelicOrganizations_OrganizationsListMinimumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNewRelicPlans_PlansListMaximumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Plans_List_MaximumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/Plans_List_MaximumSet_Gen.json // this example is just showing the usage of "Plans_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -151,7 +151,7 @@ public async Task GetNewRelicPlans_PlansListMaximumSetGen() // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "hfmjmpyqgezxkp"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -171,7 +171,7 @@ public async Task GetNewRelicPlans_PlansListMaximumSetGen() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNewRelicPlans_PlansListMinimumSetGen() { - // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Plans_List_MinimumSet_Gen.json + // Generated from example definition: specification/newrelic/resource-manager/NewRelic.Observability/stable/2024-03-01/examples/Plans_List_MinimumSet_Gen.json // this example is just showing the usage of "Plans_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -181,12 +181,13 @@ public async Task GetNewRelicPlans_PlansListMinimumSetGen() // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "nqmcgifgaqlf"; + string subscriptionId = "00000000-0000-0000-0000-000000000000"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation and iterate over the result - await foreach (NewRelicPlanData item in subscriptionResource.GetNewRelicPlansAsync()) + string organizationId = "hilawwjz"; + await foreach (NewRelicPlanData item in subscriptionResource.GetNewRelicPlansAsync(organizationId: organizationId)) { Console.WriteLine($"Succeeded: {item}"); } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Azure.ResourceManager.NewRelicObservability.csproj b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Azure.ResourceManager.NewRelicObservability.csproj index 10e394d95cd1a..52b658f17d70f 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Azure.ResourceManager.NewRelicObservability.csproj +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Azure.ResourceManager.NewRelicObservability.csproj @@ -1,6 +1,6 @@ - 1.1.0-beta.1 + 1.1.0 1.0.1 Azure.ResourceManager.NewRelicObservability diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityBillingCycle.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Custom/Models/NewRelicObservabilityBillingCycle.cs similarity index 99% rename from sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityBillingCycle.cs rename to sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Custom/Models/NewRelicObservabilityBillingCycle.cs index b00cb7d17f938..5a6e93dd72e78 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityBillingCycle.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Custom/Models/NewRelicObservabilityBillingCycle.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Custom/Models/NewRelicPlanDetails.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Custom/Models/NewRelicPlanDetails.cs new file mode 100644 index 0000000000000..a8781b35d2f92 --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Custom/Models/NewRelicPlanDetails.cs @@ -0,0 +1,18 @@ +// 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.NewRelicObservability.Models +{ + /// Plan data of NewRelic Monitor resource. + public partial class NewRelicPlanDetails + { + /// Different billing cycles like Monthly/Weekly. + public NewRelicObservabilityBillingCycle? BillingCycle { get => new NewRelicObservabilityBillingCycle(NewRelicPlanBillingCycle); set => NewRelicPlanBillingCycle = value.ToString(); } + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Custom/NewRelicMonitorResource.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Custom/NewRelicMonitorResource.cs new file mode 100644 index 0000000000000..f788d4ebcf33f --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Custom/NewRelicMonitorResource.cs @@ -0,0 +1,87 @@ +// 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.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NewRelicObservability.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.NewRelicObservability +{ + /// + /// A Class representing a NewRelicMonitorResource along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetNewRelicMonitorResource method. + /// Otherwise you can get one from its parent resource using the GetNewRelicMonitorResource method. + /// + public partial class NewRelicMonitorResource : ArmResource + { + /// + /// Update a NewRelicMonitorResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName} + /// + /// + /// Operation Id + /// Monitors_Update + /// + /// + /// Default Api Version + /// 2022-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(NewRelicMonitorResourcePatch patch, CancellationToken cancellationToken) + { + ArmOperation result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new NewRelicMonitorResource(Client, result.Value.Data), result.GetRawResponse()); + } + + /// + /// Update a NewRelicMonitorResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName} + /// + /// + /// Operation Id + /// Monitors_Update + /// + /// + /// Default Api Version + /// 2022-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual Response Update(NewRelicMonitorResourcePatch patch, CancellationToken cancellationToken) + { + ArmOperation result = Update(WaitUntil.Completed, patch, cancellationToken); + return Response.FromValue(new NewRelicMonitorResource(Client, result.Value.Data), result.GetRawResponse()); + } + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/ArmNewRelicObservabilityModelFactory.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/ArmNewRelicObservabilityModelFactory.cs index 380c2fa907f0b..2657f15edea46 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/ArmNewRelicObservabilityModelFactory.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/ArmNewRelicObservabilityModelFactory.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using Azure.Core; using Azure.ResourceManager.Models; @@ -24,7 +25,7 @@ public static partial class ArmNewRelicObservabilityModelFactory /// organization id. /// account id. /// account name. - /// region. + /// Region where New Relic account is present. /// A new instance for mocking. public static NewRelicAccountResourceData NewRelicAccountResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string organizationId = null, string accountId = null, string accountName = null, AzureLocation? region = null) { @@ -59,8 +60,10 @@ public static NewRelicAccountResourceData NewRelicAccountResourceData(ResourceId /// Liftr resource preference. The priority of the resource. /// Source of org creation. /// Source of account creation. + /// State of the Azure Subscription containing the monitor resource. + /// Status of Azure Subscription where Marketplace SaaS is located. /// A new instance for mocking. - public static NewRelicMonitorResourceData NewRelicMonitorResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, NewRelicProvisioningState? provisioningState = null, NewRelicObservabilityMonitoringStatus? monitoringStatus = null, NewRelicObservabilityMarketplaceSubscriptionStatus? marketplaceSubscriptionStatus = null, string marketplaceSubscriptionId = null, NewRelicAccountProperties newRelicAccountProperties = null, NewRelicObservabilityUserInfo userInfo = null, NewRelicPlanDetails planData = null, NewRelicLiftrResourceCategory? liftrResourceCategory = null, int? liftrResourcePreference = null, NewRelicObservabilityOrgCreationSource? orgCreationSource = null, NewRelicObservabilityAccountCreationSource? accountCreationSource = null) + public static NewRelicMonitorResourceData NewRelicMonitorResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, NewRelicProvisioningState? provisioningState = null, NewRelicObservabilityMonitoringStatus? monitoringStatus = null, NewRelicObservabilityMarketplaceSubscriptionStatus? marketplaceSubscriptionStatus = null, string marketplaceSubscriptionId = null, NewRelicAccountProperties newRelicAccountProperties = null, NewRelicObservabilityUserInfo userInfo = null, NewRelicPlanDetails planData = null, NewRelicLiftrResourceCategory? liftrResourceCategory = null, int? liftrResourcePreference = null, NewRelicObservabilityOrgCreationSource? orgCreationSource = null, NewRelicObservabilityAccountCreationSource? accountCreationSource = null, string subscriptionState = null, string saaSAzureSubscriptionStatus = null) { tags ??= new Dictionary(); @@ -83,6 +86,8 @@ public static NewRelicMonitorResourceData NewRelicMonitorResourceData(ResourceId liftrResourcePreference, orgCreationSource, accountCreationSource, + subscriptionState, + saaSAzureSubscriptionStatus, serializedAdditionalRawData: null); } @@ -222,6 +227,61 @@ public static NewRelicResourceMonitorResult NewRelicResourceMonitorResult(Resour serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// Marketplace Subscription details. + /// Partner Billing Entity details: Organization Info. + /// A new instance for mocking. + public static NewRelicBillingInfoResult NewRelicBillingInfoResult(MarketplaceSaaSInfo marketplaceSaasInfo = null, PartnerBillingEntity partnerBillingEntity = null) + { + return new NewRelicBillingInfoResult(marketplaceSaasInfo, partnerBillingEntity, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Marketplace Subscription Id. This is a GUID-formatted string. + /// Marketplace Subscription Details: SAAS Name. + /// Marketplace Subscription Details: Resource URI. + /// Marketplace Subscription Details: SaaS Subscription Status. + /// The Azure Subscription ID to which the Marketplace Subscription belongs and gets billed into. + /// A new instance for mocking. + public static MarketplaceSaaSInfo MarketplaceSaaSInfo(string marketplaceSubscriptionId = null, string marketplaceSubscriptionName = null, string marketplaceResourceId = null, string marketplaceStatus = null, string billedAzureSubscriptionId = null) + { + return new MarketplaceSaaSInfo( + marketplaceSubscriptionId, + marketplaceSubscriptionName, + marketplaceResourceId, + marketplaceStatus, + billedAzureSubscriptionId, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The New Relic Organization Id. + /// The New Relic Organization Name. + /// A new instance for mocking. + public static PartnerBillingEntity PartnerBillingEntity(string organizationId = null, string organizationName = null) + { + return new PartnerBillingEntity(organizationId, organizationName, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Connected Partner Resource Properties. + /// A new instance for mocking. + public static NewRelicConnectedPartnerResourceInfo NewRelicConnectedPartnerResourceInfo(NewRelicConnectedPartnerResourceProperties properties = null) + { + return new NewRelicConnectedPartnerResourceInfo(properties, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// NewRelic account name. + /// NewRelic Account Id. + /// The azure resource Id of the deployment. + /// The location of the deployment. + /// A new instance for mocking. + public static NewRelicConnectedPartnerResourceProperties NewRelicConnectedPartnerResourceProperties(string accountName = null, string accountId = null, string azureResourceId = null, AzureLocation? location = null) + { + return new NewRelicConnectedPartnerResourceProperties(accountName, accountId, azureResourceId, location, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -244,6 +304,46 @@ public static NewRelicObservabilityTagRuleData NewRelicObservabilityTagRuleData( serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// Provisioning State of the resource. + /// Set of rules for sending logs for the Monitor resource. + /// Set of rules for sending metrics for the Monitor resource. + /// A new instance for mocking. + public static NewRelicMonitoringTagRules NewRelicMonitoringTagRules(NewRelicProvisioningState? provisioningState = null, NewRelicObservabilityLogRules logRules = null, NewRelicObservabilityMetricRules metricRules = null) + { + return new NewRelicMonitoringTagRules(provisioningState, logRules, metricRules, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The request to update subscriptions needed to be monitored by the NewRelic monitor resource. + /// A new instance for mocking. + public static NewRelicMonitoredSubscriptionData NewRelicMonitoredSubscriptionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, NewRelicMonitoredSubscriptionProperties properties = null) + { + return new NewRelicMonitoredSubscriptionData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The operation for the patch on the resource. + /// List of subscriptions and the state of the monitoring. + /// Provisioning State of the resource. + /// A new instance for mocking. + public static NewRelicMonitoredSubscriptionProperties NewRelicMonitoredSubscriptionProperties(MonitoredSubscriptionPatchOperation? patchOperation = null, IEnumerable monitoredSubscriptionList = null, NewRelicProvisioningState? provisioningState = null) + { + monitoredSubscriptionList ??= new List(); + + return new NewRelicMonitoredSubscriptionProperties(patchOperation, monitoredSubscriptionList?.ToList(), provisioningState, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// Ingestion key of the account. /// A new instance for mocking. @@ -251,5 +351,31 @@ public static NewRelicObservabilityVmExtensionPayload NewRelicObservabilityVmExt { return new NewRelicObservabilityVmExtensionPayload(ingestionKey, serializedAdditionalRawData: null); } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The managed service identities assigned to this resource. + /// Provisioning State of the resource. + /// MonitoringStatus of the resource. + /// NewRelic Organization properties of the resource. + /// Marketplace Subscription Id. + /// MarketplaceSubscriptionStatus of the resource. + /// User Info. + /// Plan details. + /// Liftr resource category. + /// Liftr resource preference. The priority of the resource. + /// Source of org creation. + /// Source of account creation. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static NewRelicMonitorResourceData NewRelicMonitorResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, NewRelicProvisioningState? provisioningState, NewRelicObservabilityMonitoringStatus? monitoringStatus, NewRelicObservabilityMarketplaceSubscriptionStatus? marketplaceSubscriptionStatus, string marketplaceSubscriptionId, NewRelicAccountProperties newRelicAccountProperties, NewRelicObservabilityUserInfo userInfo, NewRelicPlanDetails planData, NewRelicLiftrResourceCategory? liftrResourceCategory, int? liftrResourcePreference, NewRelicObservabilityOrgCreationSource? orgCreationSource, NewRelicObservabilityAccountCreationSource? accountCreationSource) + { + return NewRelicMonitorResourceData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, identity: identity, provisioningState: provisioningState, monitoringStatus: monitoringStatus, marketplaceSubscriptionStatus: marketplaceSubscriptionStatus, marketplaceSubscriptionId: marketplaceSubscriptionId, newRelicAccountProperties: newRelicAccountProperties, userInfo: userInfo, planData: planData, liftrResourceCategory: liftrResourceCategory, liftrResourcePreference: liftrResourcePreference, orgCreationSource: orgCreationSource, accountCreationSource: accountCreationSource, subscriptionState: default, saaSAzureSubscriptionStatus: default); + } } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Extensions/MockableNewRelicObservabilityArmClient.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Extensions/MockableNewRelicObservabilityArmClient.cs index 96b84482638b3..3c13013153912 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Extensions/MockableNewRelicObservabilityArmClient.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Extensions/MockableNewRelicObservabilityArmClient.cs @@ -57,5 +57,17 @@ public virtual NewRelicObservabilityTagRuleResource GetNewRelicObservabilityTagR NewRelicObservabilityTagRuleResource.ValidateResourceId(id); return new NewRelicObservabilityTagRuleResource(Client, id); } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual NewRelicMonitoredSubscriptionResource GetNewRelicMonitoredSubscriptionResource(ResourceIdentifier id) + { + NewRelicMonitoredSubscriptionResource.ValidateResourceId(id); + return new NewRelicMonitoredSubscriptionResource(Client, id); + } } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Extensions/MockableNewRelicObservabilityResourceGroupResource.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Extensions/MockableNewRelicObservabilityResourceGroupResource.cs index da01f72881340..bff2e5c1e4e79 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Extensions/MockableNewRelicObservabilityResourceGroupResource.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Extensions/MockableNewRelicObservabilityResourceGroupResource.cs @@ -53,7 +53,7 @@ public virtual NewRelicMonitorResourceCollection GetNewRelicMonitorResources() /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task> GetNewRelicMonitorR /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Extensions/MockableNewRelicObservabilitySubscriptionResource.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Extensions/MockableNewRelicObservabilitySubscriptionResource.cs index b04e49c4facdc..57f5087b7a1a5 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Extensions/MockableNewRelicObservabilitySubscriptionResource.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Extensions/MockableNewRelicObservabilitySubscriptionResource.cs @@ -66,7 +66,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// @@ -97,7 +97,7 @@ public virtual AsyncPageable GetNewRelicAccountsAsy /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// @@ -128,7 +128,7 @@ public virtual Pageable GetNewRelicAccounts(string /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -158,7 +158,7 @@ public virtual AsyncPageable GetNewRelicMonitorResource /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -188,7 +188,7 @@ public virtual Pageable GetNewRelicMonitorResources(Can /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// @@ -219,7 +219,7 @@ public virtual AsyncPageable GetNewRelicOrgani /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// @@ -250,7 +250,7 @@ public virtual Pageable GetNewRelicOrganizatio /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// @@ -278,7 +278,7 @@ public virtual AsyncPageable GetNewRelicPlansAsync(string acco /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Extensions/NewRelicObservabilityExtensions.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Extensions/NewRelicObservabilityExtensions.cs index a92286947c1d6..9e0307b6d16be 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Extensions/NewRelicObservabilityExtensions.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Extensions/NewRelicObservabilityExtensions.cs @@ -71,6 +71,25 @@ public static NewRelicObservabilityTagRuleResource GetNewRelicObservabilityTagRu return GetMockableNewRelicObservabilityArmClient(client).GetNewRelicObservabilityTagRuleResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static NewRelicMonitoredSubscriptionResource GetNewRelicMonitoredSubscriptionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableNewRelicObservabilityArmClient(client).GetNewRelicMonitoredSubscriptionResource(id); + } + /// /// Gets a collection of NewRelicMonitorResources in the ResourceGroupResource. /// @@ -101,7 +120,7 @@ public static NewRelicMonitorResourceCollection GetNewRelicMonitorResources(this /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -139,7 +158,7 @@ public static async Task> GetNewRelicMonitorRe /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -177,7 +196,7 @@ public static Response GetNewRelicMonitorResource(this /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// @@ -211,7 +230,7 @@ public static AsyncPageable GetNewRelicAccountsAsyn /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// @@ -245,7 +264,7 @@ public static Pageable GetNewRelicAccounts(this Sub /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -281,7 +300,7 @@ public static AsyncPageable GetNewRelicMonitorResources /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -317,7 +336,7 @@ public static Pageable GetNewRelicMonitorResources(this /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// @@ -351,7 +370,7 @@ public static AsyncPageable GetNewRelicOrganiz /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// @@ -385,7 +404,7 @@ public static Pageable GetNewRelicOrganization /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// @@ -419,7 +438,7 @@ public static AsyncPageable GetNewRelicPlansAsync(this Subscri /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Internal/BicepSerializationHelpers.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Internal/BicepSerializationHelpers.cs new file mode 100644 index 0000000000000..d7990e4bc98a0 --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Internal/BicepSerializationHelpers.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text; + +namespace Azure.ResourceManager.NewRelicObservability +{ + internal static class BicepSerializationHelpers + { + public static void AppendChildObject(StringBuilder stringBuilder, object childObject, ModelReaderWriterOptions options, int spaces, bool indentFirstLine, string formattedPropertyName) + { + string indent = new string(' ', spaces); + int emptyObjectLength = 2 + spaces + Environment.NewLine.Length + Environment.NewLine.Length; + int length = stringBuilder.Length; + bool inMultilineString = false; + + BinaryData data = ModelReaderWriter.Write(childObject, options); + string[] lines = data.ToString().Split(Environment.NewLine.ToCharArray(), StringSplitOptions.RemoveEmptyEntries); + for (int i = 0; i < lines.Length; i++) + { + string line = lines[i]; + if (inMultilineString) + { + if (line.Contains("'''")) + { + inMultilineString = false; + } + stringBuilder.AppendLine(line); + continue; + } + if (line.Contains("'''")) + { + inMultilineString = true; + stringBuilder.AppendLine($"{indent}{line}"); + continue; + } + if (i == 0 && !indentFirstLine) + { + stringBuilder.AppendLine($"{line}"); + } + else + { + stringBuilder.AppendLine($"{indent}{line}"); + } + } + if (stringBuilder.Length == length + emptyObjectLength) + { + stringBuilder.Length = stringBuilder.Length - emptyObjectLength - formattedPropertyName.Length; + } + } + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Internal/WirePathAttribute.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Internal/WirePathAttribute.cs new file mode 100644 index 0000000000000..7da47797c8c1b --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Internal/WirePathAttribute.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.NewRelicObservability +{ + [AttributeUsage(AttributeTargets.Property)] + internal class WirePathAttribute : Attribute + { + private string _wirePath; + + public WirePathAttribute(string wirePath) + { + _wirePath = wirePath; + } + + public override string ToString() + { + return _wirePath; + } + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/LongRunningOperation/NewRelicMonitoredSubscriptionOperationSource.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/LongRunningOperation/NewRelicMonitoredSubscriptionOperationSource.cs new file mode 100644 index 0000000000000..59797be64ba47 --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/LongRunningOperation/NewRelicMonitoredSubscriptionOperationSource.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.NewRelicObservability +{ + internal class NewRelicMonitoredSubscriptionOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal NewRelicMonitoredSubscriptionOperationSource(ArmClient client) + { + _client = client; + } + + NewRelicMonitoredSubscriptionResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = NewRelicMonitoredSubscriptionData.DeserializeNewRelicMonitoredSubscriptionData(document.RootElement); + return new NewRelicMonitoredSubscriptionResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = NewRelicMonitoredSubscriptionData.DeserializeNewRelicMonitoredSubscriptionData(document.RootElement); + return new NewRelicMonitoredSubscriptionResource(_client, data); + } + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/ConnectedPartnerResourcesListResponse.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/ConnectedPartnerResourcesListResponse.Serialization.cs new file mode 100644 index 0000000000000..9067904aad901 --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/ConnectedPartnerResourcesListResponse.Serialization.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NewRelicObservability.Models +{ + internal partial class ConnectedPartnerResourcesListResponse : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectedPartnerResourcesListResponse)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ConnectedPartnerResourcesListResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectedPartnerResourcesListResponse)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConnectedPartnerResourcesListResponse(document.RootElement, options); + } + + internal static ConnectedPartnerResourcesListResponse DeserializeConnectedPartnerResourcesListResponse(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NewRelicConnectedPartnerResourceInfo.DeserializeNewRelicConnectedPartnerResourceInfo(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ConnectedPartnerResourcesListResponse(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ConnectedPartnerResourcesListResponse)} does not support writing '{options.Format}' format."); + } + } + + ConnectedPartnerResourcesListResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeConnectedPartnerResourcesListResponse(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConnectedPartnerResourcesListResponse)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/ConnectedPartnerResourcesListResponse.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/ConnectedPartnerResourcesListResponse.cs new file mode 100644 index 0000000000000..0283591027dca --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/ConnectedPartnerResourcesListResponse.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NewRelicObservability.Models +{ + /// List of all active newrelic deployments. + internal partial class ConnectedPartnerResourcesListResponse + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ConnectedPartnerResourcesListResponse() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Results of a list operation. + /// Link to the next set of results, if any. + /// Keeps track of any properties unknown to the library. + internal ConnectedPartnerResourcesListResponse(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Results of a list operation. + public IReadOnlyList Value { get; } + /// Link to the next set of results, if any. + public string NextLink { get; } + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/LinkedResourceListResponse.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/LinkedResourceListResponse.Serialization.cs new file mode 100644 index 0000000000000..ac87944e955d6 --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/LinkedResourceListResponse.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.NewRelicObservability.Models +{ + internal partial class LinkedResourceListResponse : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LinkedResourceListResponse)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + JsonSerializer.Serialize(writer, item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + LinkedResourceListResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LinkedResourceListResponse)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLinkedResourceListResponse(document.RootElement, options); + } + + internal static LinkedResourceListResponse DeserializeLinkedResourceListResponse(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(JsonSerializer.Deserialize(item.GetRawText())); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LinkedResourceListResponse(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(LinkedResourceListResponse)} does not support writing '{options.Format}' format."); + } + } + + LinkedResourceListResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeLinkedResourceListResponse(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LinkedResourceListResponse)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/LinkedResourceListResponse.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/LinkedResourceListResponse.cs new file mode 100644 index 0000000000000..0c73823cbae30 --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/LinkedResourceListResponse.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.NewRelicObservability.Models +{ + /// Response of a list operation. + internal partial class LinkedResourceListResponse + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal LinkedResourceListResponse() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Results of a list operation. + /// Link to the next set of results, if any. + /// Keeps track of any properties unknown to the library. + internal LinkedResourceListResponse(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Results of a list operation. + public IReadOnlyList Value { get; } + /// Link to the next set of results, if any. + public string NextLink { get; } + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MarketplaceSaaSInfo.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MarketplaceSaaSInfo.Serialization.cs new file mode 100644 index 0000000000000..cfe2b460f78ba --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MarketplaceSaaSInfo.Serialization.cs @@ -0,0 +1,305 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NewRelicObservability.Models +{ + public partial class MarketplaceSaaSInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MarketplaceSaaSInfo)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(MarketplaceSubscriptionId)) + { + writer.WritePropertyName("marketplaceSubscriptionId"u8); + writer.WriteStringValue(MarketplaceSubscriptionId); + } + if (Optional.IsDefined(MarketplaceSubscriptionName)) + { + writer.WritePropertyName("marketplaceSubscriptionName"u8); + writer.WriteStringValue(MarketplaceSubscriptionName); + } + if (Optional.IsDefined(MarketplaceResourceId)) + { + writer.WritePropertyName("marketplaceResourceId"u8); + writer.WriteStringValue(MarketplaceResourceId); + } + if (Optional.IsDefined(MarketplaceStatus)) + { + writer.WritePropertyName("marketplaceStatus"u8); + writer.WriteStringValue(MarketplaceStatus); + } + if (Optional.IsDefined(BilledAzureSubscriptionId)) + { + writer.WritePropertyName("billedAzureSubscriptionId"u8); + writer.WriteStringValue(BilledAzureSubscriptionId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + MarketplaceSaaSInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MarketplaceSaaSInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMarketplaceSaaSInfo(document.RootElement, options); + } + + internal static MarketplaceSaaSInfo DeserializeMarketplaceSaaSInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string marketplaceSubscriptionId = default; + string marketplaceSubscriptionName = default; + string marketplaceResourceId = default; + string marketplaceStatus = default; + string billedAzureSubscriptionId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("marketplaceSubscriptionId"u8)) + { + marketplaceSubscriptionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("marketplaceSubscriptionName"u8)) + { + marketplaceSubscriptionName = property.Value.GetString(); + continue; + } + if (property.NameEquals("marketplaceResourceId"u8)) + { + marketplaceResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("marketplaceStatus"u8)) + { + marketplaceStatus = property.Value.GetString(); + continue; + } + if (property.NameEquals("billedAzureSubscriptionId"u8)) + { + billedAzureSubscriptionId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MarketplaceSaaSInfo( + marketplaceSubscriptionId, + marketplaceSubscriptionName, + marketplaceResourceId, + marketplaceStatus, + billedAzureSubscriptionId, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MarketplaceSubscriptionId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" marketplaceSubscriptionId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MarketplaceSubscriptionId)) + { + builder.Append(" marketplaceSubscriptionId: "); + if (MarketplaceSubscriptionId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{MarketplaceSubscriptionId}'''"); + } + else + { + builder.AppendLine($"'{MarketplaceSubscriptionId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MarketplaceSubscriptionName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" marketplaceSubscriptionName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MarketplaceSubscriptionName)) + { + builder.Append(" marketplaceSubscriptionName: "); + if (MarketplaceSubscriptionName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{MarketplaceSubscriptionName}'''"); + } + else + { + builder.AppendLine($"'{MarketplaceSubscriptionName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MarketplaceResourceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" marketplaceResourceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MarketplaceResourceId)) + { + builder.Append(" marketplaceResourceId: "); + if (MarketplaceResourceId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{MarketplaceResourceId}'''"); + } + else + { + builder.AppendLine($"'{MarketplaceResourceId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MarketplaceStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" marketplaceStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MarketplaceStatus)) + { + builder.Append(" marketplaceStatus: "); + if (MarketplaceStatus.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{MarketplaceStatus}'''"); + } + else + { + builder.AppendLine($"'{MarketplaceStatus}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(BilledAzureSubscriptionId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" billedAzureSubscriptionId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(BilledAzureSubscriptionId)) + { + builder.Append(" billedAzureSubscriptionId: "); + if (BilledAzureSubscriptionId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{BilledAzureSubscriptionId}'''"); + } + else + { + builder.AppendLine($"'{BilledAzureSubscriptionId}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(MarketplaceSaaSInfo)} does not support writing '{options.Format}' format."); + } + } + + MarketplaceSaaSInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeMarketplaceSaaSInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MarketplaceSaaSInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MarketplaceSaaSInfo.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MarketplaceSaaSInfo.cs new file mode 100644 index 0000000000000..11fd3ca1b125c --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MarketplaceSaaSInfo.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NewRelicObservability.Models +{ + /// Marketplace SAAS Info of the resource. + public partial class MarketplaceSaaSInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal MarketplaceSaaSInfo() + { + } + + /// Initializes a new instance of . + /// Marketplace Subscription Id. This is a GUID-formatted string. + /// Marketplace Subscription Details: SAAS Name. + /// Marketplace Subscription Details: Resource URI. + /// Marketplace Subscription Details: SaaS Subscription Status. + /// The Azure Subscription ID to which the Marketplace Subscription belongs and gets billed into. + /// Keeps track of any properties unknown to the library. + internal MarketplaceSaaSInfo(string marketplaceSubscriptionId, string marketplaceSubscriptionName, string marketplaceResourceId, string marketplaceStatus, string billedAzureSubscriptionId, IDictionary serializedAdditionalRawData) + { + MarketplaceSubscriptionId = marketplaceSubscriptionId; + MarketplaceSubscriptionName = marketplaceSubscriptionName; + MarketplaceResourceId = marketplaceResourceId; + MarketplaceStatus = marketplaceStatus; + BilledAzureSubscriptionId = billedAzureSubscriptionId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Marketplace Subscription Id. This is a GUID-formatted string. + [WirePath("marketplaceSubscriptionId")] + public string MarketplaceSubscriptionId { get; } + /// Marketplace Subscription Details: SAAS Name. + [WirePath("marketplaceSubscriptionName")] + public string MarketplaceSubscriptionName { get; } + /// Marketplace Subscription Details: Resource URI. + [WirePath("marketplaceResourceId")] + public string MarketplaceResourceId { get; } + /// Marketplace Subscription Details: SaaS Subscription Status. + [WirePath("marketplaceStatus")] + public string MarketplaceStatus { get; } + /// The Azure Subscription ID to which the Marketplace Subscription belongs and gets billed into. + [WirePath("billedAzureSubscriptionId")] + public string BilledAzureSubscriptionId { get; } + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MonitoredSubscriptionConfigurationName.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MonitoredSubscriptionConfigurationName.cs new file mode 100644 index 0000000000000..4c692243400d2 --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MonitoredSubscriptionConfigurationName.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NewRelicObservability.Models +{ + /// The MonitoredSubscriptionConfigurationName. + public readonly partial struct MonitoredSubscriptionConfigurationName : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MonitoredSubscriptionConfigurationName(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DefaultValue = "default"; + + /// default. + public static MonitoredSubscriptionConfigurationName Default { get; } = new MonitoredSubscriptionConfigurationName(DefaultValue); + /// Determines if two values are the same. + public static bool operator ==(MonitoredSubscriptionConfigurationName left, MonitoredSubscriptionConfigurationName right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MonitoredSubscriptionConfigurationName left, MonitoredSubscriptionConfigurationName right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MonitoredSubscriptionConfigurationName(string value) => new MonitoredSubscriptionConfigurationName(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MonitoredSubscriptionConfigurationName other && Equals(other); + /// + public bool Equals(MonitoredSubscriptionConfigurationName other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MonitoredSubscriptionPatchOperation.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MonitoredSubscriptionPatchOperation.cs new file mode 100644 index 0000000000000..359a4e7a00e0f --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MonitoredSubscriptionPatchOperation.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NewRelicObservability.Models +{ + /// The operation for the patch on the resource. + public readonly partial struct MonitoredSubscriptionPatchOperation : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MonitoredSubscriptionPatchOperation(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AddBeginValue = "AddBegin"; + private const string AddCompleteValue = "AddComplete"; + private const string DeleteBeginValue = "DeleteBegin"; + private const string DeleteCompleteValue = "DeleteComplete"; + private const string ActiveValue = "Active"; + + /// AddBegin. + public static MonitoredSubscriptionPatchOperation AddBegin { get; } = new MonitoredSubscriptionPatchOperation(AddBeginValue); + /// AddComplete. + public static MonitoredSubscriptionPatchOperation AddComplete { get; } = new MonitoredSubscriptionPatchOperation(AddCompleteValue); + /// DeleteBegin. + public static MonitoredSubscriptionPatchOperation DeleteBegin { get; } = new MonitoredSubscriptionPatchOperation(DeleteBeginValue); + /// DeleteComplete. + public static MonitoredSubscriptionPatchOperation DeleteComplete { get; } = new MonitoredSubscriptionPatchOperation(DeleteCompleteValue); + /// Active. + public static MonitoredSubscriptionPatchOperation Active { get; } = new MonitoredSubscriptionPatchOperation(ActiveValue); + /// Determines if two values are the same. + public static bool operator ==(MonitoredSubscriptionPatchOperation left, MonitoredSubscriptionPatchOperation right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MonitoredSubscriptionPatchOperation left, MonitoredSubscriptionPatchOperation right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MonitoredSubscriptionPatchOperation(string value) => new MonitoredSubscriptionPatchOperation(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MonitoredSubscriptionPatchOperation other && Equals(other); + /// + public bool Equals(MonitoredSubscriptionPatchOperation other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MonitoredSubscriptionPropertiesList.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MonitoredSubscriptionPropertiesList.Serialization.cs new file mode 100644 index 0000000000000..f9d530a877c32 --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MonitoredSubscriptionPropertiesList.Serialization.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NewRelicObservability.Models +{ + internal partial class MonitoredSubscriptionPropertiesList : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MonitoredSubscriptionPropertiesList)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + MonitoredSubscriptionPropertiesList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MonitoredSubscriptionPropertiesList)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMonitoredSubscriptionPropertiesList(document.RootElement, options); + } + + internal static MonitoredSubscriptionPropertiesList DeserializeMonitoredSubscriptionPropertiesList(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NewRelicMonitoredSubscriptionData.DeserializeNewRelicMonitoredSubscriptionData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MonitoredSubscriptionPropertiesList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(MonitoredSubscriptionPropertiesList)} does not support writing '{options.Format}' format."); + } + } + + MonitoredSubscriptionPropertiesList IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeMonitoredSubscriptionPropertiesList(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MonitoredSubscriptionPropertiesList)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MonitoredSubscriptionPropertiesList.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MonitoredSubscriptionPropertiesList.cs new file mode 100644 index 0000000000000..83d555882f259 --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/MonitoredSubscriptionPropertiesList.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NewRelicObservability.Models +{ + /// The MonitoredSubscriptionPropertiesList. + internal partial class MonitoredSubscriptionPropertiesList + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal MonitoredSubscriptionPropertiesList() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal MonitoredSubscriptionPropertiesList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets the value. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public string NextLink { get; } + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAccountProperties.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAccountProperties.Serialization.cs index b0ab189eaa176..1773c90cb595f 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAccountProperties.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAccountProperties.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -133,6 +134,92 @@ internal static NewRelicAccountProperties DeserializeNewRelicAccountProperties(J return new NewRelicAccountProperties(userId, accountInfo, organizationInfo, singleSignOnProperties, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UserId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" userId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UserId)) + { + builder.Append(" userId: "); + if (UserId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{UserId}'''"); + } + else + { + builder.AppendLine($"'{UserId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AccountInfo), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" accountInfo: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AccountInfo)) + { + builder.Append(" accountInfo: "); + BicepSerializationHelpers.AppendChildObject(builder, AccountInfo, options, 2, false, " accountInfo: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("OrganizationId", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" organizationInfo: "); + builder.AppendLine("{"); + builder.Append(" organizationId: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(OrganizationInfo)) + { + builder.Append(" organizationInfo: "); + BicepSerializationHelpers.AppendChildObject(builder, OrganizationInfo, options, 2, false, " organizationInfo: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SingleSignOnProperties), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" singleSignOnProperties: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SingleSignOnProperties)) + { + builder.Append(" singleSignOnProperties: "); + BicepSerializationHelpers.AppendChildObject(builder, SingleSignOnProperties, options, 2, false, " singleSignOnProperties: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -141,6 +228,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterO { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NewRelicAccountProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAccountProperties.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAccountProperties.cs index 8f9b282b44ee7..ae69a383546e2 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAccountProperties.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAccountProperties.cs @@ -66,12 +66,15 @@ internal NewRelicAccountProperties(string userId, NewRelicObservabilityAccountIn } /// User id. + [WirePath("userId")] public string UserId { get; set; } /// NewRelic Account Information. + [WirePath("accountInfo")] public NewRelicObservabilityAccountInfo AccountInfo { get; set; } /// NewRelic Organization Information. internal NewRelicObservabilityOrganizationInfo OrganizationInfo { get; set; } /// Organization id. + [WirePath("organizationInfo.organizationId")] public string OrganizationId { get => OrganizationInfo is null ? default : OrganizationInfo.OrganizationId; @@ -84,6 +87,7 @@ public string OrganizationId } /// date when plan was applied. + [WirePath("singleSignOnProperties")] public NewRelicSingleSignOnProperties SingleSignOnProperties { get; set; } } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAccountResourceData.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAccountResourceData.Serialization.cs index 0364fe56d8835..32ccb38cbc394 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAccountResourceData.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAccountResourceData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -198,6 +199,161 @@ internal static NewRelicAccountResourceData DeserializeNewRelicAccountResourceDa serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OrganizationId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" organizationId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OrganizationId)) + { + builder.Append(" organizationId: "); + if (OrganizationId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{OrganizationId}'''"); + } + else + { + builder.AppendLine($"'{OrganizationId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AccountId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" accountId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AccountId)) + { + builder.Append(" accountId: "); + if (AccountId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AccountId}'''"); + } + else + { + builder.AppendLine($"'{AccountId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AccountName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" accountName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AccountName)) + { + builder.Append(" accountName: "); + if (AccountName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AccountName}'''"); + } + else + { + builder.AppendLine($"'{AccountName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Region), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" region: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Region)) + { + builder.Append(" region: "); + builder.AppendLine($"'{Region.Value.ToString()}'"); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -206,6 +362,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrite { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NewRelicAccountResourceData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAccountResourceData.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAccountResourceData.cs index 6a037d40da818..7f2af3d44fb66 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAccountResourceData.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAccountResourceData.cs @@ -60,7 +60,7 @@ public NewRelicAccountResourceData() /// organization id. /// account id. /// account name. - /// region. + /// Region where New Relic account is present. /// Keeps track of any properties unknown to the library. internal NewRelicAccountResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string organizationId, string accountId, string accountName, AzureLocation? region, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { @@ -72,12 +72,16 @@ internal NewRelicAccountResourceData(ResourceIdentifier id, string name, Resourc } /// organization id. + [WirePath("properties.organizationId")] public string OrganizationId { get; set; } /// account id. + [WirePath("properties.accountId")] public string AccountId { get; set; } /// account name. + [WirePath("properties.accountName")] public string AccountName { get; set; } - /// region. + /// Region where New Relic account is present. + [WirePath("properties.region")] public AzureLocation? Region { get; set; } } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAccountsListResult.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAccountsListResult.Serialization.cs index 0431d1ba01283..69603112eb790 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAccountsListResult.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAccountsListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -110,6 +112,59 @@ internal static NewRelicAccountsListResult DeserializeNewRelicAccountsListResult return new NewRelicAccountsListResult(value, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + builder.AppendLine($"'{NextLink.AbsoluteUri}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -118,6 +173,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriter { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NewRelicAccountsListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAppServicesGetContent.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAppServicesGetContent.cs index d5c54518b93a9..0154670c03471 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAppServicesGetContent.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAppServicesGetContent.cs @@ -74,8 +74,10 @@ internal NewRelicAppServicesGetContent() } /// Azure resource IDs. + [WirePath("azureResourceIds")] public IList AzureResourceIds { get; } /// User Email. + [WirePath("userEmail")] public string UserEmail { get; } } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAppServicesListResult.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAppServicesListResult.Serialization.cs index 817273792fc47..cfcf96e5a60d9 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAppServicesListResult.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicAppServicesListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -110,6 +112,59 @@ internal static NewRelicAppServicesListResult DeserializeNewRelicAppServicesList return new NewRelicAppServicesListResult(value, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + builder.AppendLine($"'{NextLink.AbsoluteUri}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -118,6 +173,8 @@ BinaryData IPersistableModel.Write(ModelReaderWri { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NewRelicAppServicesListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicBillingInfoResult.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicBillingInfoResult.Serialization.cs new file mode 100644 index 0000000000000..f4ca254b065f4 --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicBillingInfoResult.Serialization.cs @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NewRelicObservability.Models +{ + public partial class NewRelicBillingInfoResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NewRelicBillingInfoResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(MarketplaceSaasInfo)) + { + writer.WritePropertyName("marketplaceSaasInfo"u8); + writer.WriteObjectValue(MarketplaceSaasInfo, options); + } + if (Optional.IsDefined(PartnerBillingEntity)) + { + writer.WritePropertyName("partnerBillingEntity"u8); + writer.WriteObjectValue(PartnerBillingEntity, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + NewRelicBillingInfoResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NewRelicBillingInfoResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNewRelicBillingInfoResult(document.RootElement, options); + } + + internal static NewRelicBillingInfoResult DeserializeNewRelicBillingInfoResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MarketplaceSaaSInfo marketplaceSaasInfo = default; + PartnerBillingEntity partnerBillingEntity = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("marketplaceSaasInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + marketplaceSaasInfo = MarketplaceSaaSInfo.DeserializeMarketplaceSaaSInfo(property.Value, options); + continue; + } + if (property.NameEquals("partnerBillingEntity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + partnerBillingEntity = PartnerBillingEntity.DeserializePartnerBillingEntity(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NewRelicBillingInfoResult(marketplaceSaasInfo, partnerBillingEntity, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MarketplaceSaasInfo), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" marketplaceSaasInfo: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MarketplaceSaasInfo)) + { + builder.Append(" marketplaceSaasInfo: "); + BicepSerializationHelpers.AppendChildObject(builder, MarketplaceSaasInfo, options, 2, false, " marketplaceSaasInfo: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PartnerBillingEntity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" partnerBillingEntity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PartnerBillingEntity)) + { + builder.Append(" partnerBillingEntity: "); + BicepSerializationHelpers.AppendChildObject(builder, PartnerBillingEntity, options, 2, false, " partnerBillingEntity: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(NewRelicBillingInfoResult)} does not support writing '{options.Format}' format."); + } + } + + NewRelicBillingInfoResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeNewRelicBillingInfoResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NewRelicBillingInfoResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicBillingInfoResult.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicBillingInfoResult.cs new file mode 100644 index 0000000000000..29052bfb9d9c5 --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicBillingInfoResult.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NewRelicObservability.Models +{ + /// Marketplace Subscription and Organization details to which resource gets billed into. + public partial class NewRelicBillingInfoResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal NewRelicBillingInfoResult() + { + } + + /// Initializes a new instance of . + /// Marketplace Subscription details. + /// Partner Billing Entity details: Organization Info. + /// Keeps track of any properties unknown to the library. + internal NewRelicBillingInfoResult(MarketplaceSaaSInfo marketplaceSaasInfo, PartnerBillingEntity partnerBillingEntity, IDictionary serializedAdditionalRawData) + { + MarketplaceSaasInfo = marketplaceSaasInfo; + PartnerBillingEntity = partnerBillingEntity; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Marketplace Subscription details. + [WirePath("marketplaceSaasInfo")] + public MarketplaceSaaSInfo MarketplaceSaasInfo { get; } + /// Partner Billing Entity details: Organization Info. + [WirePath("partnerBillingEntity")] + public PartnerBillingEntity PartnerBillingEntity { get; } + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicConnectedPartnerResourceInfo.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicConnectedPartnerResourceInfo.Serialization.cs new file mode 100644 index 0000000000000..7ac37a387f34b --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicConnectedPartnerResourceInfo.Serialization.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NewRelicObservability.Models +{ + public partial class NewRelicConnectedPartnerResourceInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NewRelicConnectedPartnerResourceInfo)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + NewRelicConnectedPartnerResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NewRelicConnectedPartnerResourceInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNewRelicConnectedPartnerResourceInfo(document.RootElement, options); + } + + internal static NewRelicConnectedPartnerResourceInfo DeserializeNewRelicConnectedPartnerResourceInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NewRelicConnectedPartnerResourceProperties properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = NewRelicConnectedPartnerResourceProperties.DeserializeNewRelicConnectedPartnerResourceProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NewRelicConnectedPartnerResourceInfo(properties, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Properties), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" properties: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Properties)) + { + builder.Append(" properties: "); + BicepSerializationHelpers.AppendChildObject(builder, Properties, options, 2, false, " properties: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(NewRelicConnectedPartnerResourceInfo)} does not support writing '{options.Format}' format."); + } + } + + NewRelicConnectedPartnerResourceInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeNewRelicConnectedPartnerResourceInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NewRelicConnectedPartnerResourceInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicConnectedPartnerResourceInfo.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicConnectedPartnerResourceInfo.cs new file mode 100644 index 0000000000000..032c798cd92c5 --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicConnectedPartnerResourceInfo.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NewRelicObservability.Models +{ + /// Connected Partner Resources List Format. + public partial class NewRelicConnectedPartnerResourceInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal NewRelicConnectedPartnerResourceInfo() + { + } + + /// Initializes a new instance of . + /// Connected Partner Resource Properties. + /// Keeps track of any properties unknown to the library. + internal NewRelicConnectedPartnerResourceInfo(NewRelicConnectedPartnerResourceProperties properties, IDictionary serializedAdditionalRawData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Connected Partner Resource Properties. + [WirePath("properties")] + public NewRelicConnectedPartnerResourceProperties Properties { get; } + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicConnectedPartnerResourceProperties.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicConnectedPartnerResourceProperties.Serialization.cs new file mode 100644 index 0000000000000..a3127e7b1194f --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicConnectedPartnerResourceProperties.Serialization.cs @@ -0,0 +1,261 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NewRelicObservability.Models +{ + public partial class NewRelicConnectedPartnerResourceProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NewRelicConnectedPartnerResourceProperties)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(AccountName)) + { + writer.WritePropertyName("accountName"u8); + writer.WriteStringValue(AccountName); + } + if (Optional.IsDefined(AccountId)) + { + writer.WritePropertyName("accountId"u8); + writer.WriteStringValue(AccountId); + } + if (Optional.IsDefined(AzureResourceId)) + { + writer.WritePropertyName("azureResourceId"u8); + writer.WriteStringValue(AzureResourceId); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + NewRelicConnectedPartnerResourceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NewRelicConnectedPartnerResourceProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNewRelicConnectedPartnerResourceProperties(document.RootElement, options); + } + + internal static NewRelicConnectedPartnerResourceProperties DeserializeNewRelicConnectedPartnerResourceProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string accountName = default; + string accountId = default; + string azureResourceId = default; + AzureLocation? location = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("accountName"u8)) + { + accountName = property.Value.GetString(); + continue; + } + if (property.NameEquals("accountId"u8)) + { + accountId = property.Value.GetString(); + continue; + } + if (property.NameEquals("azureResourceId"u8)) + { + azureResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("location"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NewRelicConnectedPartnerResourceProperties(accountName, accountId, azureResourceId, location, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AccountName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" accountName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AccountName)) + { + builder.Append(" accountName: "); + if (AccountName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AccountName}'''"); + } + else + { + builder.AppendLine($"'{AccountName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AccountId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" accountId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AccountId)) + { + builder.Append(" accountId: "); + if (AccountId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AccountId}'''"); + } + else + { + builder.AppendLine($"'{AccountId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AzureResourceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" azureResourceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AzureResourceId)) + { + builder.Append(" azureResourceId: "); + if (AzureResourceId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AzureResourceId}'''"); + } + else + { + builder.AppendLine($"'{AzureResourceId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" location: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Location)) + { + builder.Append(" location: "); + builder.AppendLine($"'{Location.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(NewRelicConnectedPartnerResourceProperties)} does not support writing '{options.Format}' format."); + } + } + + NewRelicConnectedPartnerResourceProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeNewRelicConnectedPartnerResourceProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NewRelicConnectedPartnerResourceProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicConnectedPartnerResourceProperties.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicConnectedPartnerResourceProperties.cs new file mode 100644 index 0000000000000..db157cc54d225 --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicConnectedPartnerResourceProperties.cs @@ -0,0 +1,82 @@ +// 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.NewRelicObservability.Models +{ + /// Connected Partner Resource Properties. + public partial class NewRelicConnectedPartnerResourceProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal NewRelicConnectedPartnerResourceProperties() + { + } + + /// Initializes a new instance of . + /// NewRelic account name. + /// NewRelic Account Id. + /// The azure resource Id of the deployment. + /// The location of the deployment. + /// Keeps track of any properties unknown to the library. + internal NewRelicConnectedPartnerResourceProperties(string accountName, string accountId, string azureResourceId, AzureLocation? location, IDictionary serializedAdditionalRawData) + { + AccountName = accountName; + AccountId = accountId; + AzureResourceId = azureResourceId; + Location = location; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// NewRelic account name. + [WirePath("accountName")] + public string AccountName { get; } + /// NewRelic Account Id. + [WirePath("accountId")] + public string AccountId { get; } + /// The azure resource Id of the deployment. + [WirePath("azureResourceId")] + public string AzureResourceId { get; } + /// The location of the deployment. + [WirePath("location")] + public AzureLocation? Location { get; } + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicHostsGetContent.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicHostsGetContent.cs index e12d579eb8c4a..299b39f08b8dd 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicHostsGetContent.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicHostsGetContent.cs @@ -74,8 +74,10 @@ internal NewRelicHostsGetContent() } /// VM resource IDs. + [WirePath("vmIds")] public IList VmIds { get; } /// User Email. + [WirePath("userEmail")] public string UserEmail { get; } } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMetricsContent.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMetricsContent.cs index 53a8112c4ad5f..8614eddb2737e 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMetricsContent.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMetricsContent.cs @@ -70,6 +70,7 @@ internal NewRelicMetricsContent() } /// User Email. + [WirePath("userEmail")] public string UserEmail { get; } } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMetricsStatusContent.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMetricsStatusContent.cs index 2f34c60398c30..0b0ae3fe3a5c2 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMetricsStatusContent.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMetricsStatusContent.cs @@ -73,8 +73,10 @@ internal NewRelicMetricsStatusContent() } /// Azure resource IDs. + [WirePath("azureResourceIds")] public IList AzureResourceIds { get; } /// User Email. + [WirePath("userEmail")] public string UserEmail { get; } } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMetricsStatusResult.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMetricsStatusResult.Serialization.cs index e0f32c468f124..615e3c2d28d32 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMetricsStatusResult.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMetricsStatusResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -102,6 +104,57 @@ internal static NewRelicMetricsStatusResult DeserializeNewRelicMetricsStatusResu return new NewRelicMetricsStatusResult(azureResourceIds ?? new ChangeTrackingList(), serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AzureResourceIds), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" azureResourceIds: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(AzureResourceIds)) + { + if (AzureResourceIds.Any()) + { + builder.Append(" azureResourceIds: "); + builder.AppendLine("["); + foreach (var item in AzureResourceIds) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -110,6 +163,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrite { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NewRelicMetricsStatusResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMetricsStatusResult.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMetricsStatusResult.cs index 7b07be6da29c4..eec83f0e1a594 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMetricsStatusResult.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMetricsStatusResult.cs @@ -61,6 +61,7 @@ internal NewRelicMetricsStatusResult(IReadOnlyList azureResourceIds, IDi } /// Azure resource IDs. + [WirePath("azureResourceIds")] public IReadOnlyList AzureResourceIds { get; } } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitorResourceListResult.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitorResourceListResult.Serialization.cs index 4d4bea9364a0f..53fa3cc013d54 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitorResourceListResult.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitorResourceListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -110,6 +112,59 @@ internal static NewRelicMonitorResourceListResult DeserializeNewRelicMonitorReso return new NewRelicMonitorResourceListResult(value, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + builder.AppendLine($"'{NextLink.AbsoluteUri}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -118,6 +173,8 @@ BinaryData IPersistableModel.Write(ModelReade { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NewRelicMonitorResourceListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitorResourcePatch.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitorResourcePatch.cs index a1ff4947f82e9..6ee55d258c761 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitorResourcePatch.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitorResourcePatch.cs @@ -74,18 +74,25 @@ internal NewRelicMonitorResourcePatch(ManagedServiceIdentity identity, IDictiona } /// The managed service identities assigned to this resource. + [WirePath("identity")] public ManagedServiceIdentity Identity { get; set; } /// Resource tags. + [WirePath("tags")] public IDictionary Tags { get; } /// MarketplaceSubscriptionStatus of the resource. + [WirePath("properties.newRelicAccountProperties")] public NewRelicAccountProperties NewRelicAccountProperties { get; set; } /// User Info. + [WirePath("properties.userInfo")] public NewRelicObservabilityUserInfo UserInfo { get; set; } /// Plan details. + [WirePath("properties.planData")] public NewRelicPlanDetails PlanData { get; set; } /// Source of org creation. + [WirePath("properties.orgCreationSource")] public NewRelicObservabilityOrgCreationSource? OrgCreationSource { get; set; } /// Source of account creation. + [WirePath("properties.accountCreationSource")] public NewRelicObservabilityAccountCreationSource? AccountCreationSource { get; set; } } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredResourceListResult.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredResourceListResult.Serialization.cs new file mode 100644 index 0000000000000..3bcaec4743072 --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredResourceListResult.Serialization.cs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NewRelicObservability.Models +{ + internal partial class NewRelicMonitoredResourceListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NewRelicMonitoredResourceListResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + NewRelicMonitoredResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NewRelicMonitoredResourceListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNewRelicMonitoredResourceListResult(document.RootElement, options); + } + + internal static NewRelicMonitoredResourceListResult DeserializeNewRelicMonitoredResourceListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NewRelicResourceMonitorResult.DeserializeNewRelicResourceMonitorResult(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NewRelicMonitoredResourceListResult(value, nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + builder.AppendLine($"'{NextLink.AbsoluteUri}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(NewRelicMonitoredResourceListResult)} does not support writing '{options.Format}' format."); + } + } + + NewRelicMonitoredResourceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeNewRelicMonitoredResourceListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NewRelicMonitoredResourceListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityMonitoredResourceListResult.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredResourceListResult.cs similarity index 81% rename from sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityMonitoredResourceListResult.cs rename to sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredResourceListResult.cs index 86b9c84c77cc8..10d013436cbc4 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityMonitoredResourceListResult.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredResourceListResult.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.NewRelicObservability.Models { /// List of all the resources being monitored by NewRelic monitor resource. - internal partial class NewRelicObservabilityMonitoredResourceListResult + internal partial class NewRelicMonitoredResourceListResult { /// /// Keeps track of any properties unknown to the library. @@ -46,29 +46,29 @@ internal partial class NewRelicObservabilityMonitoredResourceListResult /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . + /// Initializes a new instance of . /// The MonitoredResource items on this page. /// is null. - internal NewRelicObservabilityMonitoredResourceListResult(IEnumerable value) + internal NewRelicMonitoredResourceListResult(IEnumerable value) { Argument.AssertNotNull(value, nameof(value)); Value = value.ToList(); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The MonitoredResource items on this page. /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal NewRelicObservabilityMonitoredResourceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + internal NewRelicMonitoredResourceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal NewRelicObservabilityMonitoredResourceListResult() + /// Initializes a new instance of for deserialization. + internal NewRelicMonitoredResourceListResult() { } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredSubscriptionInfo.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredSubscriptionInfo.Serialization.cs new file mode 100644 index 0000000000000..e4291c2467617 --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredSubscriptionInfo.Serialization.cs @@ -0,0 +1,257 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NewRelicObservability.Models +{ + public partial class NewRelicMonitoredSubscriptionInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NewRelicMonitoredSubscriptionInfo)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(SubscriptionId)) + { + writer.WritePropertyName("subscriptionId"u8); + writer.WriteStringValue(SubscriptionId); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + writer.WriteStringValue(Error); + } + if (Optional.IsDefined(TagRules)) + { + writer.WritePropertyName("tagRules"u8); + writer.WriteObjectValue(TagRules, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + NewRelicMonitoredSubscriptionInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NewRelicMonitoredSubscriptionInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNewRelicMonitoredSubscriptionInfo(document.RootElement, options); + } + + internal static NewRelicMonitoredSubscriptionInfo DeserializeNewRelicMonitoredSubscriptionInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string subscriptionId = default; + NewRelicMonitoringStatus? status = default; + string error = default; + NewRelicMonitoringTagRules tagRules = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("subscriptionId"u8)) + { + subscriptionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new NewRelicMonitoringStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("error"u8)) + { + error = property.Value.GetString(); + continue; + } + if (property.NameEquals("tagRules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tagRules = NewRelicMonitoringTagRules.DeserializeNewRelicMonitoringTagRules(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NewRelicMonitoredSubscriptionInfo(subscriptionId, status, error, tagRules, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SubscriptionId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SubscriptionId)) + { + builder.Append(" subscriptionId: "); + if (SubscriptionId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SubscriptionId}'''"); + } + else + { + builder.AppendLine($"'{SubscriptionId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" status: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Status)) + { + builder.Append(" status: "); + builder.AppendLine($"'{Status.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Error), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" error: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Error)) + { + builder.Append(" error: "); + if (Error.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Error}'''"); + } + else + { + builder.AppendLine($"'{Error}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TagRules), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tagRules: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TagRules)) + { + builder.Append(" tagRules: "); + BicepSerializationHelpers.AppendChildObject(builder, TagRules, options, 2, false, " tagRules: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(NewRelicMonitoredSubscriptionInfo)} does not support writing '{options.Format}' format."); + } + } + + NewRelicMonitoredSubscriptionInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeNewRelicMonitoredSubscriptionInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NewRelicMonitoredSubscriptionInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredSubscriptionInfo.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredSubscriptionInfo.cs new file mode 100644 index 0000000000000..8c9c2a70ee416 --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredSubscriptionInfo.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NewRelicObservability.Models +{ + /// The list of subscriptions and it's monitoring status by current NewRelic monitor. + public partial class NewRelicMonitoredSubscriptionInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public NewRelicMonitoredSubscriptionInfo() + { + } + + /// Initializes a new instance of . + /// The subscriptionId to be monitored. + /// The state of monitoring. + /// The reason of not monitoring the subscription. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal NewRelicMonitoredSubscriptionInfo(string subscriptionId, NewRelicMonitoringStatus? status, string error, NewRelicMonitoringTagRules tagRules, IDictionary serializedAdditionalRawData) + { + SubscriptionId = subscriptionId; + Status = status; + Error = error; + TagRules = tagRules; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The subscriptionId to be monitored. + [WirePath("subscriptionId")] + public string SubscriptionId { get; set; } + /// The state of monitoring. + [WirePath("status")] + public NewRelicMonitoringStatus? Status { get; set; } + /// The reason of not monitoring the subscription. + [WirePath("error")] + public string Error { get; set; } + /// The resource-specific properties for this resource. + [WirePath("tagRules")] + public NewRelicMonitoringTagRules TagRules { get; set; } + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredSubscriptionProperties.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredSubscriptionProperties.Serialization.cs new file mode 100644 index 0000000000000..323cd8693ba80 --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredSubscriptionProperties.Serialization.cs @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NewRelicObservability.Models +{ + public partial class NewRelicMonitoredSubscriptionProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NewRelicMonitoredSubscriptionProperties)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(PatchOperation)) + { + writer.WritePropertyName("patchOperation"u8); + writer.WriteStringValue(PatchOperation.Value.ToString()); + } + if (Optional.IsCollectionDefined(MonitoredSubscriptionList)) + { + writer.WritePropertyName("monitoredSubscriptionList"u8); + writer.WriteStartArray(); + foreach (var item in MonitoredSubscriptionList) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + NewRelicMonitoredSubscriptionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NewRelicMonitoredSubscriptionProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNewRelicMonitoredSubscriptionProperties(document.RootElement, options); + } + + internal static NewRelicMonitoredSubscriptionProperties DeserializeNewRelicMonitoredSubscriptionProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MonitoredSubscriptionPatchOperation? patchOperation = default; + IList monitoredSubscriptionList = default; + NewRelicProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("patchOperation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + patchOperation = new MonitoredSubscriptionPatchOperation(property.Value.GetString()); + continue; + } + if (property.NameEquals("monitoredSubscriptionList"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NewRelicMonitoredSubscriptionInfo.DeserializeNewRelicMonitoredSubscriptionInfo(item, options)); + } + monitoredSubscriptionList = array; + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new NewRelicProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NewRelicMonitoredSubscriptionProperties(patchOperation, monitoredSubscriptionList ?? new ChangeTrackingList(), provisioningState, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PatchOperation), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" patchOperation: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PatchOperation)) + { + builder.Append(" patchOperation: "); + builder.AppendLine($"'{PatchOperation.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MonitoredSubscriptionList), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" monitoredSubscriptionList: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(MonitoredSubscriptionList)) + { + if (MonitoredSubscriptionList.Any()) + { + builder.Append(" monitoredSubscriptionList: "); + builder.AppendLine("["); + foreach (var item in MonitoredSubscriptionList) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " monitoredSubscriptionList: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + builder.AppendLine($"'{ProvisioningState.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(NewRelicMonitoredSubscriptionProperties)} does not support writing '{options.Format}' format."); + } + } + + NewRelicMonitoredSubscriptionProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeNewRelicMonitoredSubscriptionProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NewRelicMonitoredSubscriptionProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredSubscriptionProperties.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredSubscriptionProperties.cs new file mode 100644 index 0000000000000..9db29e15f3653 --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoredSubscriptionProperties.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NewRelicObservability.Models +{ + /// The request to update subscriptions needed to be monitored by the NewRelic monitor resource. + public partial class NewRelicMonitoredSubscriptionProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public NewRelicMonitoredSubscriptionProperties() + { + MonitoredSubscriptionList = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The operation for the patch on the resource. + /// List of subscriptions and the state of the monitoring. + /// Provisioning State of the resource. + /// Keeps track of any properties unknown to the library. + internal NewRelicMonitoredSubscriptionProperties(MonitoredSubscriptionPatchOperation? patchOperation, IList monitoredSubscriptionList, NewRelicProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + PatchOperation = patchOperation; + MonitoredSubscriptionList = monitoredSubscriptionList; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The operation for the patch on the resource. + [WirePath("patchOperation")] + public MonitoredSubscriptionPatchOperation? PatchOperation { get; set; } + /// List of subscriptions and the state of the monitoring. + [WirePath("monitoredSubscriptionList")] + public IList MonitoredSubscriptionList { get; } + /// Provisioning State of the resource. + [WirePath("provisioningState")] + public NewRelicProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoringStatus.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoringStatus.cs new file mode 100644 index 0000000000000..9b36e0218fd49 --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoringStatus.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NewRelicObservability.Models +{ + /// The state of monitoring. + public readonly partial struct NewRelicMonitoringStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NewRelicMonitoringStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InProgressValue = "InProgress"; + private const string ActiveValue = "Active"; + private const string FailedValue = "Failed"; + private const string DeletingValue = "Deleting"; + + /// InProgress. + public static NewRelicMonitoringStatus InProgress { get; } = new NewRelicMonitoringStatus(InProgressValue); + /// Active. + public static NewRelicMonitoringStatus Active { get; } = new NewRelicMonitoringStatus(ActiveValue); + /// Failed. + public static NewRelicMonitoringStatus Failed { get; } = new NewRelicMonitoringStatus(FailedValue); + /// Deleting. + public static NewRelicMonitoringStatus Deleting { get; } = new NewRelicMonitoringStatus(DeletingValue); + /// Determines if two values are the same. + public static bool operator ==(NewRelicMonitoringStatus left, NewRelicMonitoringStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NewRelicMonitoringStatus left, NewRelicMonitoringStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator NewRelicMonitoringStatus(string value) => new NewRelicMonitoringStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NewRelicMonitoringStatus other && Equals(other); + /// + public bool Equals(NewRelicMonitoringStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoringTagRules.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoringTagRules.Serialization.cs new file mode 100644 index 0000000000000..92bbc6dc74e3b --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoringTagRules.Serialization.cs @@ -0,0 +1,219 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NewRelicObservability.Models +{ + public partial class NewRelicMonitoringTagRules : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NewRelicMonitoringTagRules)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsDefined(LogRules)) + { + writer.WritePropertyName("logRules"u8); + writer.WriteObjectValue(LogRules, options); + } + if (Optional.IsDefined(MetricRules)) + { + writer.WritePropertyName("metricRules"u8); + writer.WriteObjectValue(MetricRules, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + NewRelicMonitoringTagRules IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NewRelicMonitoringTagRules)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNewRelicMonitoringTagRules(document.RootElement, options); + } + + internal static NewRelicMonitoringTagRules DeserializeNewRelicMonitoringTagRules(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NewRelicProvisioningState? provisioningState = default; + NewRelicObservabilityLogRules logRules = default; + NewRelicObservabilityMetricRules metricRules = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new NewRelicProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("logRules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + logRules = NewRelicObservabilityLogRules.DeserializeNewRelicObservabilityLogRules(property.Value, options); + continue; + } + if (property.NameEquals("metricRules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + metricRules = NewRelicObservabilityMetricRules.DeserializeNewRelicObservabilityMetricRules(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NewRelicMonitoringTagRules(provisioningState, logRules, metricRules, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + builder.AppendLine($"'{ProvisioningState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LogRules), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" logRules: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LogRules)) + { + builder.Append(" logRules: "); + BicepSerializationHelpers.AppendChildObject(builder, LogRules, options, 2, false, " logRules: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MetricRules), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" metricRules: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MetricRules)) + { + builder.Append(" metricRules: "); + BicepSerializationHelpers.AppendChildObject(builder, MetricRules, options, 2, false, " metricRules: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(NewRelicMonitoringTagRules)} does not support writing '{options.Format}' format."); + } + } + + NewRelicMonitoringTagRules IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeNewRelicMonitoringTagRules(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NewRelicMonitoringTagRules)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoringTagRules.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoringTagRules.cs new file mode 100644 index 0000000000000..e27f2c656013a --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicMonitoringTagRules.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NewRelicObservability.Models +{ + /// The resource-specific properties for this resource. + public partial class NewRelicMonitoringTagRules + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public NewRelicMonitoringTagRules() + { + } + + /// Initializes a new instance of . + /// Provisioning State of the resource. + /// Set of rules for sending logs for the Monitor resource. + /// Set of rules for sending metrics for the Monitor resource. + /// Keeps track of any properties unknown to the library. + internal NewRelicMonitoringTagRules(NewRelicProvisioningState? provisioningState, NewRelicObservabilityLogRules logRules, NewRelicObservabilityMetricRules metricRules, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + LogRules = logRules; + MetricRules = metricRules; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Provisioning State of the resource. + [WirePath("provisioningState")] + public NewRelicProvisioningState? ProvisioningState { get; } + /// Set of rules for sending logs for the Monitor resource. + [WirePath("logRules")] + public NewRelicObservabilityLogRules LogRules { get; set; } + /// Set of rules for sending metrics for the Monitor resource. + [WirePath("metricRules")] + public NewRelicObservabilityMetricRules MetricRules { get; set; } + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityAccountInfo.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityAccountInfo.Serialization.cs index 9c920ea371633..dcf13516d0765 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityAccountInfo.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityAccountInfo.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -114,6 +115,82 @@ internal static NewRelicObservabilityAccountInfo DeserializeNewRelicObservabilit return new NewRelicObservabilityAccountInfo(accountId, ingestionKey, region, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AccountId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" accountId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AccountId)) + { + builder.Append(" accountId: "); + if (AccountId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AccountId}'''"); + } + else + { + builder.AppendLine($"'{AccountId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IngestionKey), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" ingestionKey: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IngestionKey)) + { + builder.Append(" ingestionKey: "); + if (IngestionKey.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{IngestionKey}'''"); + } + else + { + builder.AppendLine($"'{IngestionKey}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Region), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" region: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Region)) + { + builder.Append(" region: "); + builder.AppendLine($"'{Region.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -122,6 +199,8 @@ BinaryData IPersistableModel.Write(ModelReader { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NewRelicObservabilityAccountInfo)} does not support writing '{options.Format}' format."); } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityAccountInfo.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityAccountInfo.cs index 42881614c06e1..254c3ec8b0448 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityAccountInfo.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityAccountInfo.cs @@ -54,7 +54,7 @@ public NewRelicObservabilityAccountInfo() /// Initializes a new instance of . /// Account id. /// ingestion key of account. - /// NewRelic account region. + /// Region where New Relic account is present. /// Keeps track of any properties unknown to the library. internal NewRelicObservabilityAccountInfo(string accountId, string ingestionKey, AzureLocation? region, IDictionary serializedAdditionalRawData) { @@ -65,10 +65,13 @@ internal NewRelicObservabilityAccountInfo(string accountId, string ingestionKey, } /// Account id. + [WirePath("accountId")] public string AccountId { get; set; } /// ingestion key of account. + [WirePath("ingestionKey")] public string IngestionKey { get; set; } - /// NewRelic account region. + /// Region where New Relic account is present. + [WirePath("region")] public AzureLocation? Region { get; set; } } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityAppServiceInfo.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityAppServiceInfo.Serialization.cs index b8ba5a91deab9..3f8cb260f9447 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityAppServiceInfo.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityAppServiceInfo.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -114,6 +115,82 @@ internal static NewRelicObservabilityAppServiceInfo DeserializeNewRelicObservabi return new NewRelicObservabilityAppServiceInfo(azureResourceId, agentVersion, agentStatus, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AzureResourceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" azureResourceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AzureResourceId)) + { + builder.Append(" azureResourceId: "); + builder.AppendLine($"'{AzureResourceId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AgentVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" agentVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AgentVersion)) + { + builder.Append(" agentVersion: "); + if (AgentVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AgentVersion}'''"); + } + else + { + builder.AppendLine($"'{AgentVersion}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AgentStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" agentStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AgentStatus)) + { + builder.Append(" agentStatus: "); + if (AgentStatus.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AgentStatus}'''"); + } + else + { + builder.AppendLine($"'{AgentStatus}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -122,6 +199,8 @@ BinaryData IPersistableModel.Write(ModelRea { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NewRelicObservabilityAppServiceInfo)} does not support writing '{options.Format}' format."); } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityAppServiceInfo.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityAppServiceInfo.cs index bc4bb89ac4c62..dea3393063e7b 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityAppServiceInfo.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityAppServiceInfo.cs @@ -65,10 +65,13 @@ internal NewRelicObservabilityAppServiceInfo(ResourceIdentifier azureResourceId, } /// Azure App service resource ID. + [WirePath("azureResourceId")] public ResourceIdentifier AzureResourceId { get; } /// Version of the NewRelic agent installed on the App service. + [WirePath("agentVersion")] public string AgentVersion { get; } /// Status of the NewRelic agent installed on the App service. + [WirePath("agentStatus")] public string AgentStatus { get; } } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityFilteringTag.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityFilteringTag.Serialization.cs index 0754575fec770..5f7c585841662 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityFilteringTag.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityFilteringTag.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -114,6 +115,82 @@ internal static NewRelicObservabilityFilteringTag DeserializeNewRelicObservabili return new NewRelicObservabilityFilteringTag(name, value, action, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + if (Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Value}'''"); + } + else + { + builder.AppendLine($"'{Value}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Action), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" action: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Action)) + { + builder.Append(" action: "); + builder.AppendLine($"'{Action.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -122,6 +199,8 @@ BinaryData IPersistableModel.Write(ModelReade { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NewRelicObservabilityFilteringTag)} does not support writing '{options.Format}' format."); } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityFilteringTag.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityFilteringTag.cs index 8d0b44f66a858..04432e54ae61f 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityFilteringTag.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityFilteringTag.cs @@ -64,10 +64,13 @@ internal NewRelicObservabilityFilteringTag(string name, string value, NewRelicOb } /// The name (also known as the key) of the tag. + [WirePath("name")] public string Name { get; set; } /// The value of the tag. + [WirePath("value")] public string Value { get; set; } /// Valid actions for a filtering tag. Exclusion takes priority over inclusion. + [WirePath("action")] public NewRelicObservabilityTagAction? Action { get; set; } } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityLogRules.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityLogRules.Serialization.cs index bfc5e3211765d..14c74b2aad4d2 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityLogRules.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityLogRules.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -147,6 +149,89 @@ internal static NewRelicObservabilityLogRules DeserializeNewRelicObservabilityLo return new NewRelicObservabilityLogRules(sendAadLogs, sendSubscriptionLogs, sendActivityLogs, filteringTags ?? new ChangeTrackingList(), serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SendAadLogs), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sendAadLogs: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SendAadLogs)) + { + builder.Append(" sendAadLogs: "); + builder.AppendLine($"'{SendAadLogs.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SendSubscriptionLogs), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sendSubscriptionLogs: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SendSubscriptionLogs)) + { + builder.Append(" sendSubscriptionLogs: "); + builder.AppendLine($"'{SendSubscriptionLogs.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SendActivityLogs), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sendActivityLogs: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SendActivityLogs)) + { + builder.Append(" sendActivityLogs: "); + builder.AppendLine($"'{SendActivityLogs.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(FilteringTags), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" filteringTags: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(FilteringTags)) + { + if (FilteringTags.Any()) + { + builder.Append(" filteringTags: "); + builder.AppendLine("["); + foreach (var item in FilteringTags) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " filteringTags: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -155,6 +240,8 @@ BinaryData IPersistableModel.Write(ModelReaderWri { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NewRelicObservabilityLogRules)} does not support writing '{options.Format}' format."); } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityLogRules.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityLogRules.cs index 635435e3f6750..ca72c3329d223 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityLogRules.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityLogRules.cs @@ -70,15 +70,19 @@ internal NewRelicObservabilityLogRules(NewRelicObservabilitySendAadLogsStatus? s } /// Flag specifying if AAD logs should be sent for the Monitor resource. + [WirePath("sendAadLogs")] public NewRelicObservabilitySendAadLogsStatus? SendAadLogs { get; set; } /// Flag specifying if subscription logs should be sent for the Monitor resource. + [WirePath("sendSubscriptionLogs")] public NewRelicObservabilitySendSubscriptionLogsStatus? SendSubscriptionLogs { get; set; } /// Flag specifying if activity logs from Azure resources should be sent for the Monitor resource. + [WirePath("sendActivityLogs")] public NewRelicObservabilitySendActivityLogsStatus? SendActivityLogs { get; set; } /// /// List of filtering tags to be used for capturing logs. This only takes effect if SendActivityLogs flag is enabled. If empty, all resources will be captured. /// If only Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are specified, the rules will only include resources with the associated tags. /// + [WirePath("filteringTags")] public IList FilteringTags { get; } } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityMetricRules.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityMetricRules.Serialization.cs index 5f9245d492047..570534a8b5dea 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityMetricRules.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityMetricRules.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -128,6 +130,82 @@ internal static NewRelicObservabilityMetricRules DeserializeNewRelicObservabilit return new NewRelicObservabilityMetricRules(sendMetrics, filteringTags ?? new ChangeTrackingList(), userEmail, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SendMetrics), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sendMetrics: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SendMetrics)) + { + builder.Append(" sendMetrics: "); + builder.AppendLine($"'{SendMetrics.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(FilteringTags), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" filteringTags: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(FilteringTags)) + { + if (FilteringTags.Any()) + { + builder.Append(" filteringTags: "); + builder.AppendLine("["); + foreach (var item in FilteringTags) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " filteringTags: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UserEmail), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" userEmail: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UserEmail)) + { + builder.Append(" userEmail: "); + if (UserEmail.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{UserEmail}'''"); + } + else + { + builder.AppendLine($"'{UserEmail}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -136,6 +214,8 @@ BinaryData IPersistableModel.Write(ModelReader { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NewRelicObservabilityMetricRules)} does not support writing '{options.Format}' format."); } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityMetricRules.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityMetricRules.cs index ff627ca97c0de..6c26bff934627 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityMetricRules.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityMetricRules.cs @@ -65,10 +65,13 @@ internal NewRelicObservabilityMetricRules(NewRelicObservabilitySendMetricsStatus } /// Flag specifying if metrics should be sent for the Monitor resource. + [WirePath("sendMetrics")] public NewRelicObservabilitySendMetricsStatus? SendMetrics { get; set; } /// List of filtering tags to be used for capturing metrics. + [WirePath("filteringTags")] public IList FilteringTags { get; } /// User Email. + [WirePath("userEmail")] public string UserEmail { get; set; } } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityMonitoredResourceListResult.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityMonitoredResourceListResult.Serialization.cs deleted file mode 100644 index 5cd9ff20dbfbb..0000000000000 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityMonitoredResourceListResult.Serialization.cs +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.NewRelicObservability.Models -{ - internal partial class NewRelicObservabilityMonitoredResourceListResult : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(NewRelicObservabilityMonitoredResourceListResult)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink.AbsoluteUri); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - NewRelicObservabilityMonitoredResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(NewRelicObservabilityMonitoredResourceListResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeNewRelicObservabilityMonitoredResourceListResult(document.RootElement, options); - } - - internal static NewRelicObservabilityMonitoredResourceListResult DeserializeNewRelicObservabilityMonitoredResourceListResult(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - Uri nextLink = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(NewRelicResourceMonitorResult.DeserializeNewRelicResourceMonitorResult(item, options)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - nextLink = new Uri(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new NewRelicObservabilityMonitoredResourceListResult(value, nextLink, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(NewRelicObservabilityMonitoredResourceListResult)} does not support writing '{options.Format}' format."); - } - } - - NewRelicObservabilityMonitoredResourceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeNewRelicObservabilityMonitoredResourceListResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(NewRelicObservabilityMonitoredResourceListResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityOrganizationInfo.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityOrganizationInfo.Serialization.cs index b7c934457d0f2..6b3b46a1f2e5d 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityOrganizationInfo.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityOrganizationInfo.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -88,6 +89,44 @@ internal static NewRelicObservabilityOrganizationInfo DeserializeNewRelicObserva return new NewRelicObservabilityOrganizationInfo(organizationId, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OrganizationId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" organizationId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OrganizationId)) + { + builder.Append(" organizationId: "); + if (OrganizationId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{OrganizationId}'''"); + } + else + { + builder.AppendLine($"'{OrganizationId}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -96,6 +135,8 @@ BinaryData IPersistableModel.Write(ModelR { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NewRelicObservabilityOrganizationInfo)} does not support writing '{options.Format}' format."); } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityOrganizationInfo.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityOrganizationInfo.cs index d8cab0c77b322..754b43f8be202 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityOrganizationInfo.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityOrganizationInfo.cs @@ -60,6 +60,7 @@ internal NewRelicObservabilityOrganizationInfo(string organizationId, IDictionar } /// Organization id. + [WirePath("organizationId")] public string OrganizationId { get; set; } } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityTagRuleListResult.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityTagRuleListResult.Serialization.cs index d1a31c28690c3..20c899aab0ec6 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityTagRuleListResult.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityTagRuleListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -110,6 +112,59 @@ internal static NewRelicObservabilityTagRuleListResult DeserializeNewRelicObserv return new NewRelicObservabilityTagRuleListResult(value, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + builder.AppendLine($"'{NextLink.AbsoluteUri}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -118,6 +173,8 @@ BinaryData IPersistableModel.Write(Model { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NewRelicObservabilityTagRuleListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityTagRulePatch.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityTagRulePatch.cs index f5949ae2bd089..168b72d91d0c2 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityTagRulePatch.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityTagRulePatch.cs @@ -62,8 +62,10 @@ internal NewRelicObservabilityTagRulePatch(NewRelicObservabilityLogRules logRule } /// Set of rules for sending logs for the Monitor resource. + [WirePath("properties.logRules")] public NewRelicObservabilityLogRules LogRules { get; set; } /// Set of rules for sending metrics for the Monitor resource. + [WirePath("properties.metricRules")] public NewRelicObservabilityMetricRules MetricRules { get; set; } } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityUserInfo.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityUserInfo.Serialization.cs index a91cb4a64d1df..778ec93690639 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityUserInfo.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityUserInfo.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -138,6 +139,136 @@ internal static NewRelicObservabilityUserInfo DeserializeNewRelicObservabilityUs serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(FirstName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" firstName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(FirstName)) + { + builder.Append(" firstName: "); + if (FirstName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{FirstName}'''"); + } + else + { + builder.AppendLine($"'{FirstName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LastName)) + { + builder.Append(" lastName: "); + if (LastName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{LastName}'''"); + } + else + { + builder.AppendLine($"'{LastName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EmailAddress), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" emailAddress: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EmailAddress)) + { + builder.Append(" emailAddress: "); + if (EmailAddress.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{EmailAddress}'''"); + } + else + { + builder.AppendLine($"'{EmailAddress}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PhoneNumber), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" phoneNumber: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PhoneNumber)) + { + builder.Append(" phoneNumber: "); + if (PhoneNumber.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PhoneNumber}'''"); + } + else + { + builder.AppendLine($"'{PhoneNumber}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Country), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" country: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Country)) + { + builder.Append(" country: "); + if (Country.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Country}'''"); + } + else + { + builder.AppendLine($"'{Country}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -146,6 +277,8 @@ BinaryData IPersistableModel.Write(ModelReaderWri { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NewRelicObservabilityUserInfo)} does not support writing '{options.Format}' format."); } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityUserInfo.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityUserInfo.cs index 87fb8e48d07d1..c2d3aceef037e 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityUserInfo.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityUserInfo.cs @@ -68,14 +68,19 @@ internal NewRelicObservabilityUserInfo(string firstName, string lastName, string } /// First name. + [WirePath("firstName")] public string FirstName { get; set; } /// Last name. + [WirePath("lastName")] public string LastName { get; set; } /// User Email. + [WirePath("emailAddress")] public string EmailAddress { get; set; } /// Contact phone number. + [WirePath("phoneNumber")] public string PhoneNumber { get; set; } /// country if user. + [WirePath("country")] public string Country { get; set; } } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityVmExtensionPayload.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityVmExtensionPayload.Serialization.cs index f28d4c452abbc..dd62511fab620 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityVmExtensionPayload.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityVmExtensionPayload.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -88,6 +89,44 @@ internal static NewRelicObservabilityVmExtensionPayload DeserializeNewRelicObser return new NewRelicObservabilityVmExtensionPayload(ingestionKey, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IngestionKey), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" ingestionKey: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IngestionKey)) + { + builder.Append(" ingestionKey: "); + if (IngestionKey.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{IngestionKey}'''"); + } + else + { + builder.AppendLine($"'{IngestionKey}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -96,6 +135,8 @@ BinaryData IPersistableModel.Write(Mode { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NewRelicObservabilityVmExtensionPayload)} does not support writing '{options.Format}' format."); } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityVmExtensionPayload.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityVmExtensionPayload.cs index 768f721915ebf..2e45e937f3835 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityVmExtensionPayload.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityVmExtensionPayload.cs @@ -60,6 +60,7 @@ internal NewRelicObservabilityVmExtensionPayload(string ingestionKey, IDictionar } /// Ingestion key of the account. + [WirePath("ingestionKey")] public string IngestionKey { get; } } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityVmHostsListResponse.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityVmHostsListResponse.Serialization.cs index d111fdb2827ba..f5a0ad32eee8a 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityVmHostsListResponse.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityVmHostsListResponse.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -110,6 +112,59 @@ internal static NewRelicObservabilityVmHostsListResponse DeserializeNewRelicObse return new NewRelicObservabilityVmHostsListResponse(value, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + builder.AppendLine($"'{NextLink.AbsoluteUri}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -118,6 +173,8 @@ BinaryData IPersistableModel.Write(Mod { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NewRelicObservabilityVmHostsListResponse)} does not support writing '{options.Format}' format."); } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityVmInfo.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityVmInfo.Serialization.cs index 64012a7a1a4fa..20abb24fd54d2 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityVmInfo.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityVmInfo.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -114,6 +115,82 @@ internal static NewRelicObservabilityVmInfo DeserializeNewRelicObservabilityVmIn return new NewRelicObservabilityVmInfo(vmId, agentVersion, agentStatus, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VmId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" vmId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(VmId)) + { + builder.Append(" vmId: "); + builder.AppendLine($"'{VmId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AgentVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" agentVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AgentVersion)) + { + builder.Append(" agentVersion: "); + if (AgentVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AgentVersion}'''"); + } + else + { + builder.AppendLine($"'{AgentVersion}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AgentStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" agentStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AgentStatus)) + { + builder.Append(" agentStatus: "); + if (AgentStatus.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AgentStatus}'''"); + } + else + { + builder.AppendLine($"'{AgentStatus}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -122,6 +199,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrite { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NewRelicObservabilityVmInfo)} does not support writing '{options.Format}' format."); } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityVmInfo.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityVmInfo.cs index e853bb25487f6..3cf04b6012794 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityVmInfo.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicObservabilityVmInfo.cs @@ -65,10 +65,13 @@ internal NewRelicObservabilityVmInfo(ResourceIdentifier vmId, string agentVersio } /// Azure VM resource ID. + [WirePath("vmId")] public ResourceIdentifier VmId { get; } /// Version of the NewRelic agent installed on the VM. + [WirePath("agentVersion")] public string AgentVersion { get; } /// Status of the NewRelic agent installed on the VM. + [WirePath("agentStatus")] public string AgentStatus { get; } } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicOrganizationResourceData.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicOrganizationResourceData.Serialization.cs index 5647f3508e808..ff3c3f95519e3 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicOrganizationResourceData.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicOrganizationResourceData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -186,6 +187,138 @@ internal static NewRelicOrganizationResourceData DeserializeNewRelicOrganization serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OrganizationId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" organizationId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OrganizationId)) + { + builder.Append(" organizationId: "); + if (OrganizationId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{OrganizationId}'''"); + } + else + { + builder.AppendLine($"'{OrganizationId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OrganizationName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" organizationName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OrganizationName)) + { + builder.Append(" organizationName: "); + if (OrganizationName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{OrganizationName}'''"); + } + else + { + builder.AppendLine($"'{OrganizationName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(BillingSource), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" billingSource: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(BillingSource)) + { + builder.Append(" billingSource: "); + builder.AppendLine($"'{BillingSource.Value.ToString()}'"); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -194,6 +327,8 @@ BinaryData IPersistableModel.Write(ModelReader { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NewRelicOrganizationResourceData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicOrganizationResourceData.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicOrganizationResourceData.cs index 3176b40c0bba9..76835bc35a0f0 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicOrganizationResourceData.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicOrganizationResourceData.cs @@ -70,10 +70,13 @@ internal NewRelicOrganizationResourceData(ResourceIdentifier id, string name, Re } /// organization id. + [WirePath("properties.organizationId")] public string OrganizationId { get; set; } /// organization name. + [WirePath("properties.organizationName")] public string OrganizationName { get; set; } /// Billing source. + [WirePath("properties.billingSource")] public NewRelicObservabilityBillingSource? BillingSource { get; set; } } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicOrganizationsListResult.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicOrganizationsListResult.Serialization.cs index 31f48ec07b4e2..8312b302ff3ae 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicOrganizationsListResult.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicOrganizationsListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -110,6 +112,59 @@ internal static NewRelicOrganizationsListResult DeserializeNewRelicOrganizations return new NewRelicOrganizationsListResult(value, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + builder.AppendLine($"'{NextLink.AbsoluteUri}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -118,6 +173,8 @@ BinaryData IPersistableModel.Write(ModelReaderW { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NewRelicOrganizationsListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicPlanData.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicPlanData.Serialization.cs index bee0569d80f6c..99ebe67f19bb1 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicPlanData.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicPlanData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -194,6 +195,122 @@ internal static NewRelicPlanData DeserializeNewRelicPlanData(JsonElement element serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PlanData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" planData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PlanData)) + { + builder.Append(" planData: "); + BicepSerializationHelpers.AppendChildObject(builder, PlanData, options, 4, false, " planData: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OrgCreationSource), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" orgCreationSource: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OrgCreationSource)) + { + builder.Append(" orgCreationSource: "); + builder.AppendLine($"'{OrgCreationSource.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AccountCreationSource), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" accountCreationSource: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AccountCreationSource)) + { + builder.Append(" accountCreationSource: "); + builder.AppendLine($"'{AccountCreationSource.Value.ToString()}'"); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -202,6 +319,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions op { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NewRelicPlanData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicPlanData.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicPlanData.cs index c20af10240468..42852478a5336 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicPlanData.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicPlanData.cs @@ -70,10 +70,13 @@ internal NewRelicPlanData(ResourceIdentifier id, string name, ResourceType resou } /// Plan details. + [WirePath("properties.planData")] public NewRelicPlanDetails PlanData { get; set; } /// Source of org creation. + [WirePath("properties.orgCreationSource")] public NewRelicObservabilityOrgCreationSource? OrgCreationSource { get; set; } /// Source of account creation. + [WirePath("properties.accountCreationSource")] public NewRelicObservabilityAccountCreationSource? AccountCreationSource { get; set; } } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicPlanDataListResult.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicPlanDataListResult.Serialization.cs index 4c6bfedb81d96..1c4883899efb9 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicPlanDataListResult.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicPlanDataListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -110,6 +112,59 @@ internal static NewRelicPlanDataListResult DeserializeNewRelicPlanDataListResult return new NewRelicPlanDataListResult(value, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + builder.AppendLine($"'{NextLink.AbsoluteUri}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -118,6 +173,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriter { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NewRelicPlanDataListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicPlanDetails.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicPlanDetails.Serialization.cs index aa83eb4fb5f5e..4f3afbe1ef77f 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicPlanDetails.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicPlanDetails.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -31,10 +32,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("usageType"u8); writer.WriteStringValue(UsageType.Value.ToString()); } - if (Optional.IsDefined(BillingCycle)) + if (Optional.IsDefined(NewRelicPlanBillingCycle)) { writer.WritePropertyName("billingCycle"u8); - writer.WriteStringValue(BillingCycle.Value.ToString()); + writer.WriteStringValue(NewRelicPlanBillingCycle); } if (Optional.IsDefined(PlanDetails)) { @@ -85,7 +86,7 @@ internal static NewRelicPlanDetails DeserializeNewRelicPlanDetails(JsonElement e return null; } NewRelicObservabilityUsageType? usageType = default; - NewRelicObservabilityBillingCycle? billingCycle = default; + string billingCycle = default; string planDetails = default; DateTimeOffset? effectiveDate = default; IDictionary serializedAdditionalRawData = default; @@ -103,11 +104,7 @@ internal static NewRelicPlanDetails DeserializeNewRelicPlanDetails(JsonElement e } if (property.NameEquals("billingCycle"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - billingCycle = new NewRelicObservabilityBillingCycle(property.Value.GetString()); + billingCycle = property.Value.GetString(); continue; } if (property.NameEquals("planDetails"u8)) @@ -133,6 +130,98 @@ internal static NewRelicPlanDetails DeserializeNewRelicPlanDetails(JsonElement e return new NewRelicPlanDetails(usageType, billingCycle, planDetails, effectiveDate, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UsageType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" usageType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UsageType)) + { + builder.Append(" usageType: "); + builder.AppendLine($"'{UsageType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NewRelicPlanBillingCycle), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" billingCycle: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NewRelicPlanBillingCycle)) + { + builder.Append(" billingCycle: "); + if (NewRelicPlanBillingCycle.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NewRelicPlanBillingCycle}'''"); + } + else + { + builder.AppendLine($"'{NewRelicPlanBillingCycle}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PlanDetails), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" planDetails: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PlanDetails)) + { + builder.Append(" planDetails: "); + if (PlanDetails.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PlanDetails}'''"); + } + else + { + builder.AppendLine($"'{PlanDetails}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EffectiveOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" effectiveDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EffectiveOn)) + { + builder.Append(" effectiveDate: "); + var formattedDateTimeString = TypeFormatters.ToString(EffectiveOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -141,6 +230,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NewRelicPlanDetails)} does not support writing '{options.Format}' format."); } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicPlanDetails.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicPlanDetails.cs index 24249858ed417..e542be5caaa1d 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicPlanDetails.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicPlanDetails.cs @@ -52,26 +52,30 @@ public NewRelicPlanDetails() /// Initializes a new instance of . /// Different usage type like PAYG/COMMITTED. this could be enum. - /// Different billing cycles like MONTHLY/WEEKLY. this could be enum. + /// Different billing cycles like Monthly/Weekly. /// plan id as published by NewRelic. /// date when plan was applied. /// Keeps track of any properties unknown to the library. - internal NewRelicPlanDetails(NewRelicObservabilityUsageType? usageType, NewRelicObservabilityBillingCycle? billingCycle, string planDetails, DateTimeOffset? effectiveOn, IDictionary serializedAdditionalRawData) + internal NewRelicPlanDetails(NewRelicObservabilityUsageType? usageType, string newRelicPlanBillingCycle, string planDetails, DateTimeOffset? effectiveOn, IDictionary serializedAdditionalRawData) { UsageType = usageType; - BillingCycle = billingCycle; + NewRelicPlanBillingCycle = newRelicPlanBillingCycle; PlanDetails = planDetails; EffectiveOn = effectiveOn; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Different usage type like PAYG/COMMITTED. this could be enum. + [WirePath("usageType")] public NewRelicObservabilityUsageType? UsageType { get; set; } - /// Different billing cycles like MONTHLY/WEEKLY. this could be enum. - public NewRelicObservabilityBillingCycle? BillingCycle { get; set; } + /// Different billing cycles like Monthly/Weekly. + [WirePath("billingCycle")] + public string NewRelicPlanBillingCycle { get; set; } /// plan id as published by NewRelic. + [WirePath("planDetails")] public string PlanDetails { get; set; } /// date when plan was applied. + [WirePath("effectiveDate")] public DateTimeOffset? EffectiveOn { get; set; } } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicResourceMonitorResult.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicResourceMonitorResult.Serialization.cs index 57fc38a2d343a..60d1c5559ac23 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicResourceMonitorResult.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicResourceMonitorResult.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -150,6 +151,112 @@ internal static NewRelicResourceMonitorResult DeserializeNewRelicResourceMonitor serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SendingMetrics), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sendingMetrics: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SendingMetrics)) + { + builder.Append(" sendingMetrics: "); + builder.AppendLine($"'{SendingMetrics.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ReasonForMetricsStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" reasonForMetricsStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ReasonForMetricsStatus)) + { + builder.Append(" reasonForMetricsStatus: "); + if (ReasonForMetricsStatus.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ReasonForMetricsStatus}'''"); + } + else + { + builder.AppendLine($"'{ReasonForMetricsStatus}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SendingLogs), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sendingLogs: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SendingLogs)) + { + builder.Append(" sendingLogs: "); + builder.AppendLine($"'{SendingLogs.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ReasonForLogsStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" reasonForLogsStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ReasonForLogsStatus)) + { + builder.Append(" reasonForLogsStatus: "); + if (ReasonForLogsStatus.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ReasonForLogsStatus}'''"); + } + else + { + builder.AppendLine($"'{ReasonForLogsStatus}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -158,6 +265,8 @@ BinaryData IPersistableModel.Write(ModelReaderWri { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NewRelicResourceMonitorResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicResourceMonitorResult.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicResourceMonitorResult.cs index 5124cb5ffdf26..8070764e7dd4e 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicResourceMonitorResult.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicResourceMonitorResult.cs @@ -69,14 +69,19 @@ internal NewRelicResourceMonitorResult(ResourceIdentifier id, NewRelicObservabil } /// The ARM id of the resource. + [WirePath("id")] public ResourceIdentifier Id { get; } /// Flag indicating if resource is sending metrics to NewRelic. + [WirePath("sendingMetrics")] public NewRelicObservabilitySendingMetricsStatus? SendingMetrics { get; } /// Reason for why the resource is sending metrics (or why it is not sending). + [WirePath("reasonForMetricsStatus")] public string ReasonForMetricsStatus { get; } /// Flag indicating if resource is sending logs to NewRelic. + [WirePath("sendingLogs")] public NewRelicObservabilitySendingLogsStatus? SendingLogs { get; } /// Reason for why the resource is sending logs (or why it is not sending). + [WirePath("reasonForLogsStatus")] public string ReasonForLogsStatus { get; } } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicSingleSignOnProperties.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicSingleSignOnProperties.Serialization.cs index e49a1144a0b47..241fe8960df01 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicSingleSignOnProperties.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicSingleSignOnProperties.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -133,6 +134,89 @@ internal static NewRelicSingleSignOnProperties DeserializeNewRelicSingleSignOnPr return new NewRelicSingleSignOnProperties(singleSignOnState, enterpriseAppId, singleSignOnUrl, provisioningState, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SingleSignOnState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" singleSignOnState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SingleSignOnState)) + { + builder.Append(" singleSignOnState: "); + builder.AppendLine($"'{SingleSignOnState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EnterpriseAppId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enterpriseAppId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EnterpriseAppId)) + { + builder.Append(" enterpriseAppId: "); + if (EnterpriseAppId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{EnterpriseAppId}'''"); + } + else + { + builder.AppendLine($"'{EnterpriseAppId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SingleSignOnUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" singleSignOnUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SingleSignOnUri)) + { + builder.Append(" singleSignOnUrl: "); + builder.AppendLine($"'{SingleSignOnUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + builder.AppendLine($"'{ProvisioningState.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -141,6 +225,8 @@ BinaryData IPersistableModel.Write(ModelReaderWr { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NewRelicSingleSignOnProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicSingleSignOnProperties.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicSingleSignOnProperties.cs index a171457697c03..b7a3f513b6203 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicSingleSignOnProperties.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicSingleSignOnProperties.cs @@ -66,12 +66,16 @@ internal NewRelicSingleSignOnProperties(NewRelicSingleSignOnState? singleSignOnS } /// Single sign-on state. + [WirePath("singleSignOnState")] public NewRelicSingleSignOnState? SingleSignOnState { get; set; } /// The Id of the Enterprise App used for Single sign-on. + [WirePath("enterpriseAppId")] public string EnterpriseAppId { get; set; } /// The login URL specific to this NewRelic Organization. + [WirePath("singleSignOnUrl")] public Uri SingleSignOnUri { get; set; } /// Provisioning state. + [WirePath("provisioningState")] public NewRelicProvisioningState? ProvisioningState { get; set; } } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicSwitchBillingContent.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicSwitchBillingContent.cs index 60d347de1514e..bc7fe8ccfffd6 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicSwitchBillingContent.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/NewRelicSwitchBillingContent.cs @@ -77,12 +77,16 @@ internal NewRelicSwitchBillingContent() } /// Azure resource Id. + [WirePath("azureResourceId")] public ResourceIdentifier AzureResourceId { get; set; } /// Organization id. + [WirePath("organizationId")] public string OrganizationId { get; set; } /// Plan details. + [WirePath("planData")] public NewRelicPlanDetails PlanData { get; set; } /// User Email. + [WirePath("userEmail")] public string UserEmail { get; } } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/PartnerBillingEntity.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/PartnerBillingEntity.Serialization.cs new file mode 100644 index 0000000000000..5f59b8fca81ba --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/PartnerBillingEntity.Serialization.cs @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NewRelicObservability.Models +{ + public partial class PartnerBillingEntity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PartnerBillingEntity)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(OrganizationId)) + { + writer.WritePropertyName("organizationId"u8); + writer.WriteStringValue(OrganizationId); + } + if (Optional.IsDefined(OrganizationName)) + { + writer.WritePropertyName("organizationName"u8); + writer.WriteStringValue(OrganizationName); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + PartnerBillingEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PartnerBillingEntity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePartnerBillingEntity(document.RootElement, options); + } + + internal static PartnerBillingEntity DeserializePartnerBillingEntity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string organizationId = default; + string organizationName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("organizationId"u8)) + { + organizationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("organizationName"u8)) + { + organizationName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PartnerBillingEntity(organizationId, organizationName, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OrganizationId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" organizationId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OrganizationId)) + { + builder.Append(" organizationId: "); + if (OrganizationId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{OrganizationId}'''"); + } + else + { + builder.AppendLine($"'{OrganizationId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OrganizationName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" organizationName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OrganizationName)) + { + builder.Append(" organizationName: "); + if (OrganizationName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{OrganizationName}'''"); + } + else + { + builder.AppendLine($"'{OrganizationName}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(PartnerBillingEntity)} does not support writing '{options.Format}' format."); + } + } + + PartnerBillingEntity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializePartnerBillingEntity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PartnerBillingEntity)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/PartnerBillingEntity.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/PartnerBillingEntity.cs new file mode 100644 index 0000000000000..51c56a64c2419 --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/Models/PartnerBillingEntity.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NewRelicObservability.Models +{ + /// Partner Billing details associated with the resource. + public partial class PartnerBillingEntity + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal PartnerBillingEntity() + { + } + + /// Initializes a new instance of . + /// The New Relic Organization Id. + /// The New Relic Organization Name. + /// Keeps track of any properties unknown to the library. + internal PartnerBillingEntity(string organizationId, string organizationName, IDictionary serializedAdditionalRawData) + { + OrganizationId = organizationId; + OrganizationName = organizationName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The New Relic Organization Id. + [WirePath("organizationId")] + public string OrganizationId { get; } + /// The New Relic Organization Name. + [WirePath("organizationName")] + public string OrganizationName { get; } + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitorResource.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitorResource.cs index 83dee99ea3efe..b77d91546178e 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitorResource.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitorResource.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.Globalization; +using System.Text.Json; using System.Threading; using System.Threading.Tasks; using Autorest.CSharp.Core; @@ -15,6 +16,7 @@ using Azure.Core.Pipeline; using Azure.ResourceManager.NewRelicObservability.Models; using Azure.ResourceManager.Resources; +using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.NewRelicObservability { @@ -38,6 +40,10 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ClientDiagnostics _newRelicMonitorResourceMonitorsClientDiagnostics; private readonly MonitorsRestOperations _newRelicMonitorResourceMonitorsRestClient; + private readonly ClientDiagnostics _billingInfoClientDiagnostics; + private readonly BillingInfoRestOperations _billingInfoRestClient; + private readonly ClientDiagnostics _connectedPartnerResourcesClientDiagnostics; + private readonly ConnectedPartnerResourcesRestOperations _connectedPartnerResourcesRestClient; private readonly NewRelicMonitorResourceData _data; /// Gets the resource type for the operations. @@ -65,6 +71,10 @@ internal NewRelicMonitorResource(ArmClient client, ResourceIdentifier id) : base _newRelicMonitorResourceMonitorsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NewRelicObservability", ResourceType.Namespace, Diagnostics); TryGetApiVersion(ResourceType, out string newRelicMonitorResourceMonitorsApiVersion); _newRelicMonitorResourceMonitorsRestClient = new MonitorsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, newRelicMonitorResourceMonitorsApiVersion); + _billingInfoClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NewRelicObservability", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _billingInfoRestClient = new BillingInfoRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + _connectedPartnerResourcesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NewRelicObservability", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _connectedPartnerResourcesRestClient = new ConnectedPartnerResourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); #if DEBUG ValidateResourceId(Id); #endif @@ -111,7 +121,7 @@ public virtual NewRelicObservabilityTagRuleCollection GetNewRelicObservabilityTa /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -142,7 +152,7 @@ public virtual async Task> GetNew /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -160,6 +170,71 @@ public virtual Response GetNewRelicObserva return GetNewRelicObservabilityTagRules().Get(ruleSetName, cancellationToken); } + /// Gets a collection of NewRelicMonitoredSubscriptionResources in the NewRelicMonitorResource. + /// An object representing collection of NewRelicMonitoredSubscriptionResources and their operations over a NewRelicMonitoredSubscriptionResource. + public virtual NewRelicMonitoredSubscriptionCollection GetNewRelicMonitoredSubscriptions() + { + return GetCachedClient(client => new NewRelicMonitoredSubscriptionCollection(client, Id)); + } + + /// + /// List the subscriptions currently being monitored by the NewRelic monitor resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName} + /// + /// + /// Operation Id + /// MonitoredSubscriptions_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The configuration name. Only 'default' value is supported. + /// The cancellation token to use. + [ForwardsClientCalls] + public virtual async Task> GetNewRelicMonitoredSubscriptionAsync(MonitoredSubscriptionConfigurationName configurationName, CancellationToken cancellationToken = default) + { + return await GetNewRelicMonitoredSubscriptions().GetAsync(configurationName, cancellationToken).ConfigureAwait(false); + } + + /// + /// List the subscriptions currently being monitored by the NewRelic monitor resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName} + /// + /// + /// Operation Id + /// MonitoredSubscriptions_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The configuration name. Only 'default' value is supported. + /// The cancellation token to use. + [ForwardsClientCalls] + public virtual Response GetNewRelicMonitoredSubscription(MonitoredSubscriptionConfigurationName configurationName, CancellationToken cancellationToken = default) + { + return GetNewRelicMonitoredSubscriptions().Get(configurationName, cancellationToken); + } + /// /// Get a NewRelicMonitorResource /// @@ -173,7 +248,7 @@ public virtual Response GetNewRelicObserva /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -213,7 +288,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -253,7 +328,7 @@ public virtual Response Get(CancellationToken cancellat /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -299,7 +374,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -345,7 +420,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string userEmail, Cancel /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -353,10 +428,11 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string userEmail, Cancel /// /// /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The resource properties to be updated. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(NewRelicMonitorResourcePatch patch, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, NewRelicMonitorResourcePatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); @@ -365,7 +441,10 @@ public virtual async Task> UpdateAsync(NewReli try { var response = await _newRelicMonitorResourceMonitorsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new NewRelicMonitorResource(Client, response.Value), response.GetRawResponse()); + var operation = new NewRelicObservabilityArmOperation(new NewRelicMonitorResourceOperationSource(Client), _newRelicMonitorResourceMonitorsClientDiagnostics, Pipeline, _newRelicMonitorResourceMonitorsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; } catch (Exception e) { @@ -387,7 +466,7 @@ public virtual async Task> UpdateAsync(NewReli /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -395,10 +474,11 @@ public virtual async Task> UpdateAsync(NewReli /// /// /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The resource properties to be updated. /// The cancellation token to use. /// is null. - public virtual Response Update(NewRelicMonitorResourcePatch patch, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, NewRelicMonitorResourcePatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); @@ -407,7 +487,10 @@ public virtual Response Update(NewRelicMonitorResourceP try { var response = _newRelicMonitorResourceMonitorsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); - return Response.FromValue(new NewRelicMonitorResource(Client, response.Value), response.GetRawResponse()); + var operation = new NewRelicObservabilityArmOperation(new NewRelicMonitorResourceOperationSource(Client), _newRelicMonitorResourceMonitorsClientDiagnostics, Pipeline, _newRelicMonitorResourceMonitorsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; } catch (Exception e) { @@ -429,7 +512,7 @@ public virtual Response Update(NewRelicMonitorResourceP /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -471,7 +554,7 @@ public virtual async Task> GetMetricR /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -513,7 +596,7 @@ public virtual Response GetMetricRules(NewReli /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -555,7 +638,7 @@ public virtual async Task> GetMetricStatus /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -597,7 +680,7 @@ public virtual Response GetMetricStatus(NewRelicMet /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -631,7 +714,7 @@ public virtual AsyncPageable GetAppServices /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -665,7 +748,7 @@ public virtual Pageable GetAppServices(NewR /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -707,7 +790,7 @@ public virtual async Task> SwitchBillingAsync( /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -749,7 +832,7 @@ public virtual Response SwitchBilling(NewRelicSwitchBil /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -783,7 +866,7 @@ public virtual AsyncPageable GetHostsAsync(NewRelic /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -817,7 +900,7 @@ public virtual Pageable GetHosts(NewRelicHostsGetCo /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -847,7 +930,7 @@ public virtual AsyncPageable GetMonitoredResource /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -864,6 +947,66 @@ public virtual Pageable GetMonitoredResources(Can return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => NewRelicResourceMonitorResult.DeserializeNewRelicResourceMonitorResult(e), _newRelicMonitorResourceMonitorsClientDiagnostics, Pipeline, "NewRelicMonitorResource.GetMonitoredResources", "value", "nextLink", cancellationToken); } + /// + /// List all Azure resources associated to the same NewRelic organization and account as the target resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/listLinkedResources + /// + /// + /// Operation Id + /// Monitors_ListLinkedResources + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetLinkedResourcesAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _newRelicMonitorResourceMonitorsRestClient.CreateListLinkedResourcesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _newRelicMonitorResourceMonitorsRestClient.CreateListLinkedResourcesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), _newRelicMonitorResourceMonitorsClientDiagnostics, Pipeline, "NewRelicMonitorResource.GetLinkedResources", "value", "nextLink", cancellationToken); + } + + /// + /// List all Azure resources associated to the same NewRelic organization and account as the target resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/listLinkedResources + /// + /// + /// Operation Id + /// Monitors_ListLinkedResources + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetLinkedResources(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _newRelicMonitorResourceMonitorsRestClient.CreateListLinkedResourcesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _newRelicMonitorResourceMonitorsRestClient.CreateListLinkedResourcesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), _newRelicMonitorResourceMonitorsClientDiagnostics, Pipeline, "NewRelicMonitorResource.GetLinkedResources", "value", "nextLink", cancellationToken); + } + /// /// Returns the payload that needs to be passed in the request body for installing NewRelic agent on a VM. /// @@ -877,7 +1020,7 @@ public virtual Pageable GetMonitoredResources(Can /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -915,7 +1058,7 @@ public virtual async Task> VmH /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -940,6 +1083,128 @@ public virtual Response VmHostPayload(C } } + /// + /// Get marketplace info mapped to the given monitor. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/getBillingInfo + /// + /// + /// Operation Id + /// BillingInfo_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetBillingInfoAsync(CancellationToken cancellationToken = default) + { + using var scope = _billingInfoClientDiagnostics.CreateScope("NewRelicMonitorResource.GetBillingInfo"); + scope.Start(); + try + { + var response = await _billingInfoRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get marketplace info mapped to the given monitor. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/getBillingInfo + /// + /// + /// Operation Id + /// BillingInfo_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetBillingInfo(CancellationToken cancellationToken = default) + { + using var scope = _billingInfoClientDiagnostics.CreateScope("NewRelicMonitorResource.GetBillingInfo"); + scope.Start(); + try + { + var response = _billingInfoRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List of all active deployments that are associated with the marketplace subscription linked to the given monitor. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/listConnectedPartnerResources + /// + /// + /// Operation Id + /// ConnectedPartnerResources_List + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// + /// Email Id of the user. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetConnectedPartnerResourcesAsync(string body = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _connectedPartnerResourcesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _connectedPartnerResourcesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => NewRelicConnectedPartnerResourceInfo.DeserializeNewRelicConnectedPartnerResourceInfo(e), _connectedPartnerResourcesClientDiagnostics, Pipeline, "NewRelicMonitorResource.GetConnectedPartnerResources", "value", "nextLink", cancellationToken); + } + + /// + /// List of all active deployments that are associated with the marketplace subscription linked to the given monitor. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/listConnectedPartnerResources + /// + /// + /// Operation Id + /// ConnectedPartnerResources_List + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// + /// Email Id of the user. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetConnectedPartnerResources(string body = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _connectedPartnerResourcesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _connectedPartnerResourcesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => NewRelicConnectedPartnerResourceInfo.DeserializeNewRelicConnectedPartnerResourceInfo(e), _connectedPartnerResourcesClientDiagnostics, Pipeline, "NewRelicMonitorResource.GetConnectedPartnerResources", "value", "nextLink", cancellationToken); + } + /// /// Add a tag to the current resource. /// @@ -953,7 +1218,7 @@ public virtual Response VmHostPayload(C /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -991,8 +1256,8 @@ public virtual async Task> AddTagAsync(string patch.Tags.Add(tag); } patch.Tags[key] = value; - var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return result; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); } } catch (Exception e) @@ -1015,7 +1280,7 @@ public virtual async Task> AddTagAsync(string /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -1053,8 +1318,8 @@ public virtual Response AddTag(string key, string value patch.Tags.Add(tag); } patch.Tags[key] = value; - var result = Update(patch, cancellationToken: cancellationToken); - return result; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); } } catch (Exception e) @@ -1077,7 +1342,7 @@ public virtual Response AddTag(string key, string value /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -1110,8 +1375,8 @@ public virtual async Task> SetTagsAsync(IDicti var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; var patch = new NewRelicMonitorResourcePatch(); patch.Tags.ReplaceWith(tags); - var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return result; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); } } catch (Exception e) @@ -1134,7 +1399,7 @@ public virtual async Task> SetTagsAsync(IDicti /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -1167,8 +1432,8 @@ public virtual Response SetTags(IDictionary SetTags(IDictionary /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -1227,8 +1492,8 @@ public virtual async Task> RemoveTagAsync(stri patch.Tags.Add(tag); } patch.Tags.Remove(key); - var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return result; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); } } catch (Exception e) @@ -1251,7 +1516,7 @@ public virtual async Task> RemoveTagAsync(stri /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -1287,8 +1552,8 @@ public virtual Response RemoveTag(string key, Cancellat patch.Tags.Add(tag); } patch.Tags.Remove(key); - var result = Update(patch, cancellationToken: cancellationToken); - return result; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); } } catch (Exception e) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitorResourceCollection.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitorResourceCollection.cs index 6e7ea73bb5ece..30d259e778b19 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitorResourceCollection.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitorResourceCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string mon /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string monitorName, Cancell /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTo /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancel /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string monitorName, Cancel /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string monitorName, CancellationToken cance /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitorResourceData.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitorResourceData.Serialization.cs index c29fbfdcfc4ed..f1d5ae782134f 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitorResourceData.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitorResourceData.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -123,6 +125,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WritePropertyName("accountCreationSource"u8); writer.WriteStringValue(AccountCreationSource.Value.ToString()); } + if (Optional.IsDefined(SubscriptionState)) + { + writer.WritePropertyName("subscriptionState"u8); + writer.WriteStringValue(SubscriptionState); + } + if (Optional.IsDefined(SaaSAzureSubscriptionStatus)) + { + writer.WritePropertyName("saaSAzureSubscriptionStatus"u8); + writer.WriteStringValue(SaaSAzureSubscriptionStatus); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -180,6 +192,8 @@ internal static NewRelicMonitorResourceData DeserializeNewRelicMonitorResourceDa int? liftrResourcePreference = default; NewRelicObservabilityOrgCreationSource? orgCreationSource = default; NewRelicObservabilityAccountCreationSource? accountCreationSource = default; + string subscriptionState = default; + string saaSAzureSubscriptionStatus = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -340,6 +354,16 @@ internal static NewRelicMonitorResourceData DeserializeNewRelicMonitorResourceDa accountCreationSource = new NewRelicObservabilityAccountCreationSource(property0.Value.GetString()); continue; } + if (property0.NameEquals("subscriptionState"u8)) + { + subscriptionState = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("saaSAzureSubscriptionStatus"u8)) + { + saaSAzureSubscriptionStatus = property0.Value.GetString(); + continue; + } } continue; } @@ -368,9 +392,365 @@ internal static NewRelicMonitorResourceData DeserializeNewRelicMonitorResourceDa liftrResourcePreference, orgCreationSource, accountCreationSource, + subscriptionState, + saaSAzureSubscriptionStatus, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" location: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" location: "); + builder.AppendLine($"'{Location.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Tags), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tags: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags.Any()) + { + builder.Append(" tags: "); + builder.AppendLine("{"); + foreach (var item in Tags) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + if (item.Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{item.Value}'''"); + } + else + { + builder.AppendLine($"'{item.Value}'"); + } + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Identity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" identity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Identity)) + { + builder.Append(" identity: "); + BicepSerializationHelpers.AppendChildObject(builder, Identity, options, 2, false, " identity: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + builder.AppendLine($"'{ProvisioningState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MonitoringStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" monitoringStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MonitoringStatus)) + { + builder.Append(" monitoringStatus: "); + builder.AppendLine($"'{MonitoringStatus.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MarketplaceSubscriptionStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" marketplaceSubscriptionStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MarketplaceSubscriptionStatus)) + { + builder.Append(" marketplaceSubscriptionStatus: "); + builder.AppendLine($"'{MarketplaceSubscriptionStatus.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MarketplaceSubscriptionId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" marketplaceSubscriptionId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MarketplaceSubscriptionId)) + { + builder.Append(" marketplaceSubscriptionId: "); + if (MarketplaceSubscriptionId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{MarketplaceSubscriptionId}'''"); + } + else + { + builder.AppendLine($"'{MarketplaceSubscriptionId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NewRelicAccountProperties), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" newRelicAccountProperties: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NewRelicAccountProperties)) + { + builder.Append(" newRelicAccountProperties: "); + BicepSerializationHelpers.AppendChildObject(builder, NewRelicAccountProperties, options, 4, false, " newRelicAccountProperties: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UserInfo), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" userInfo: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UserInfo)) + { + builder.Append(" userInfo: "); + BicepSerializationHelpers.AppendChildObject(builder, UserInfo, options, 4, false, " userInfo: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PlanData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" planData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PlanData)) + { + builder.Append(" planData: "); + BicepSerializationHelpers.AppendChildObject(builder, PlanData, options, 4, false, " planData: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LiftrResourceCategory), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" liftrResourceCategory: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LiftrResourceCategory)) + { + builder.Append(" liftrResourceCategory: "); + builder.AppendLine($"'{LiftrResourceCategory.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LiftrResourcePreference), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" liftrResourcePreference: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LiftrResourcePreference)) + { + builder.Append(" liftrResourcePreference: "); + builder.AppendLine($"{LiftrResourcePreference.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OrgCreationSource), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" orgCreationSource: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OrgCreationSource)) + { + builder.Append(" orgCreationSource: "); + builder.AppendLine($"'{OrgCreationSource.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AccountCreationSource), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" accountCreationSource: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AccountCreationSource)) + { + builder.Append(" accountCreationSource: "); + builder.AppendLine($"'{AccountCreationSource.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SubscriptionState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SubscriptionState)) + { + builder.Append(" subscriptionState: "); + if (SubscriptionState.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SubscriptionState}'''"); + } + else + { + builder.AppendLine($"'{SubscriptionState}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SaaSAzureSubscriptionStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" saaSAzureSubscriptionStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SaaSAzureSubscriptionStatus)) + { + builder.Append(" saaSAzureSubscriptionStatus: "); + if (SaaSAzureSubscriptionStatus.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SaaSAzureSubscriptionStatus}'''"); + } + else + { + builder.AppendLine($"'{SaaSAzureSubscriptionStatus}'"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -379,6 +759,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrite { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NewRelicMonitorResourceData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitorResourceData.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitorResourceData.cs index 4edd9c2ad0698..3becd5235266d 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitorResourceData.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitorResourceData.cs @@ -76,8 +76,10 @@ public NewRelicMonitorResourceData(AzureLocation location) : base(location) /// Liftr resource preference. The priority of the resource. /// Source of org creation. /// Source of account creation. + /// State of the Azure Subscription containing the monitor resource. + /// Status of Azure Subscription where Marketplace SaaS is located. /// Keeps track of any properties unknown to the library. - internal NewRelicMonitorResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, NewRelicProvisioningState? provisioningState, NewRelicObservabilityMonitoringStatus? monitoringStatus, NewRelicObservabilityMarketplaceSubscriptionStatus? marketplaceSubscriptionStatus, string marketplaceSubscriptionId, NewRelicAccountProperties newRelicAccountProperties, NewRelicObservabilityUserInfo userInfo, NewRelicPlanDetails planData, NewRelicLiftrResourceCategory? liftrResourceCategory, int? liftrResourcePreference, NewRelicObservabilityOrgCreationSource? orgCreationSource, NewRelicObservabilityAccountCreationSource? accountCreationSource, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal NewRelicMonitorResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, NewRelicProvisioningState? provisioningState, NewRelicObservabilityMonitoringStatus? monitoringStatus, NewRelicObservabilityMarketplaceSubscriptionStatus? marketplaceSubscriptionStatus, string marketplaceSubscriptionId, NewRelicAccountProperties newRelicAccountProperties, NewRelicObservabilityUserInfo userInfo, NewRelicPlanDetails planData, NewRelicLiftrResourceCategory? liftrResourceCategory, int? liftrResourcePreference, NewRelicObservabilityOrgCreationSource? orgCreationSource, NewRelicObservabilityAccountCreationSource? accountCreationSource, string subscriptionState, string saaSAzureSubscriptionStatus, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Identity = identity; ProvisioningState = provisioningState; @@ -91,6 +93,8 @@ internal NewRelicMonitorResourceData(ResourceIdentifier id, string name, Resourc LiftrResourcePreference = liftrResourcePreference; OrgCreationSource = orgCreationSource; AccountCreationSource = accountCreationSource; + SubscriptionState = subscriptionState; + SaaSAzureSubscriptionStatus = saaSAzureSubscriptionStatus; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -100,28 +104,46 @@ internal NewRelicMonitorResourceData() } /// The managed service identities assigned to this resource. + [WirePath("identity")] public ManagedServiceIdentity Identity { get; set; } /// Provisioning State of the resource. + [WirePath("properties.provisioningState")] public NewRelicProvisioningState? ProvisioningState { get; } /// MonitoringStatus of the resource. + [WirePath("properties.monitoringStatus")] public NewRelicObservabilityMonitoringStatus? MonitoringStatus { get; } /// NewRelic Organization properties of the resource. + [WirePath("properties.marketplaceSubscriptionStatus")] public NewRelicObservabilityMarketplaceSubscriptionStatus? MarketplaceSubscriptionStatus { get; } /// Marketplace Subscription Id. + [WirePath("properties.marketplaceSubscriptionId")] public string MarketplaceSubscriptionId { get; } /// MarketplaceSubscriptionStatus of the resource. + [WirePath("properties.newRelicAccountProperties")] public NewRelicAccountProperties NewRelicAccountProperties { get; set; } /// User Info. + [WirePath("properties.userInfo")] public NewRelicObservabilityUserInfo UserInfo { get; set; } /// Plan details. + [WirePath("properties.planData")] public NewRelicPlanDetails PlanData { get; set; } /// Liftr resource category. + [WirePath("properties.liftrResourceCategory")] public NewRelicLiftrResourceCategory? LiftrResourceCategory { get; } /// Liftr resource preference. The priority of the resource. + [WirePath("properties.liftrResourcePreference")] public int? LiftrResourcePreference { get; } /// Source of org creation. + [WirePath("properties.orgCreationSource")] public NewRelicObservabilityOrgCreationSource? OrgCreationSource { get; set; } /// Source of account creation. + [WirePath("properties.accountCreationSource")] public NewRelicObservabilityAccountCreationSource? AccountCreationSource { get; set; } + /// State of the Azure Subscription containing the monitor resource. + [WirePath("properties.subscriptionState")] + public string SubscriptionState { get; set; } + /// Status of Azure Subscription where Marketplace SaaS is located. + [WirePath("properties.saaSAzureSubscriptionStatus")] + public string SaaSAzureSubscriptionStatus { get; set; } } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitoredSubscriptionCollection.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitoredSubscriptionCollection.cs new file mode 100644 index 0000000000000..9cb75db43db90 --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitoredSubscriptionCollection.cs @@ -0,0 +1,466 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NewRelicObservability.Models; + +namespace Azure.ResourceManager.NewRelicObservability +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetNewRelicMonitoredSubscriptions method from an instance of . + /// + public partial class NewRelicMonitoredSubscriptionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _newRelicMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics; + private readonly MonitoredSubscriptionsRestOperations _newRelicMonitoredSubscriptionMonitoredSubscriptionsRestClient; + + /// Initializes a new instance of the class for mocking. + protected NewRelicMonitoredSubscriptionCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal NewRelicMonitoredSubscriptionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _newRelicMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NewRelicObservability", NewRelicMonitoredSubscriptionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(NewRelicMonitoredSubscriptionResource.ResourceType, out string newRelicMonitoredSubscriptionMonitoredSubscriptionsApiVersion); + _newRelicMonitoredSubscriptionMonitoredSubscriptionsRestClient = new MonitoredSubscriptionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, newRelicMonitoredSubscriptionMonitoredSubscriptionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != NewRelicMonitorResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, NewRelicMonitorResource.ResourceType), nameof(id)); + } + + /// + /// Add the subscriptions that should be monitored by the NewRelic monitor resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName} + /// + /// + /// Operation Id + /// MonitoredSubscriptions_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The configuration name. Only 'default' value is supported. + /// The to use. + /// The cancellation token to use. + /// is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, MonitoredSubscriptionConfigurationName configurationName, NewRelicMonitoredSubscriptionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _newRelicMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics.CreateScope("NewRelicMonitoredSubscriptionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _newRelicMonitoredSubscriptionMonitoredSubscriptionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, data, cancellationToken).ConfigureAwait(false); + var operation = new NewRelicObservabilityArmOperation(new NewRelicMonitoredSubscriptionOperationSource(Client), _newRelicMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics, Pipeline, _newRelicMonitoredSubscriptionMonitoredSubscriptionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add the subscriptions that should be monitored by the NewRelic monitor resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName} + /// + /// + /// Operation Id + /// MonitoredSubscriptions_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The configuration name. Only 'default' value is supported. + /// The to use. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, MonitoredSubscriptionConfigurationName configurationName, NewRelicMonitoredSubscriptionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _newRelicMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics.CreateScope("NewRelicMonitoredSubscriptionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _newRelicMonitoredSubscriptionMonitoredSubscriptionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, data, cancellationToken); + var operation = new NewRelicObservabilityArmOperation(new NewRelicMonitoredSubscriptionOperationSource(Client), _newRelicMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics, Pipeline, _newRelicMonitoredSubscriptionMonitoredSubscriptionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List the subscriptions currently being monitored by the NewRelic monitor resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName} + /// + /// + /// Operation Id + /// MonitoredSubscriptions_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The configuration name. Only 'default' value is supported. + /// The cancellation token to use. + public virtual async Task> GetAsync(MonitoredSubscriptionConfigurationName configurationName, CancellationToken cancellationToken = default) + { + using var scope = _newRelicMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics.CreateScope("NewRelicMonitoredSubscriptionCollection.Get"); + scope.Start(); + try + { + var response = await _newRelicMonitoredSubscriptionMonitoredSubscriptionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NewRelicMonitoredSubscriptionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List the subscriptions currently being monitored by the NewRelic monitor resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName} + /// + /// + /// Operation Id + /// MonitoredSubscriptions_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The configuration name. Only 'default' value is supported. + /// The cancellation token to use. + public virtual Response Get(MonitoredSubscriptionConfigurationName configurationName, CancellationToken cancellationToken = default) + { + using var scope = _newRelicMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics.CreateScope("NewRelicMonitoredSubscriptionCollection.Get"); + scope.Start(); + try + { + var response = _newRelicMonitoredSubscriptionMonitoredSubscriptionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NewRelicMonitoredSubscriptionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List the subscriptions currently being monitored by the NewRelic monitor resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions + /// + /// + /// Operation Id + /// MonitoredSubscriptions_List + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _newRelicMonitoredSubscriptionMonitoredSubscriptionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _newRelicMonitoredSubscriptionMonitoredSubscriptionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NewRelicMonitoredSubscriptionResource(Client, NewRelicMonitoredSubscriptionData.DeserializeNewRelicMonitoredSubscriptionData(e)), _newRelicMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics, Pipeline, "NewRelicMonitoredSubscriptionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List the subscriptions currently being monitored by the NewRelic monitor resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions + /// + /// + /// Operation Id + /// MonitoredSubscriptions_List + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _newRelicMonitoredSubscriptionMonitoredSubscriptionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _newRelicMonitoredSubscriptionMonitoredSubscriptionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NewRelicMonitoredSubscriptionResource(Client, NewRelicMonitoredSubscriptionData.DeserializeNewRelicMonitoredSubscriptionData(e)), _newRelicMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics, Pipeline, "NewRelicMonitoredSubscriptionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName} + /// + /// + /// Operation Id + /// MonitoredSubscriptions_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The configuration name. Only 'default' value is supported. + /// The cancellation token to use. + public virtual async Task> ExistsAsync(MonitoredSubscriptionConfigurationName configurationName, CancellationToken cancellationToken = default) + { + using var scope = _newRelicMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics.CreateScope("NewRelicMonitoredSubscriptionCollection.Exists"); + scope.Start(); + try + { + var response = await _newRelicMonitoredSubscriptionMonitoredSubscriptionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName} + /// + /// + /// Operation Id + /// MonitoredSubscriptions_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The configuration name. Only 'default' value is supported. + /// The cancellation token to use. + public virtual Response Exists(MonitoredSubscriptionConfigurationName configurationName, CancellationToken cancellationToken = default) + { + using var scope = _newRelicMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics.CreateScope("NewRelicMonitoredSubscriptionCollection.Exists"); + scope.Start(); + try + { + var response = _newRelicMonitoredSubscriptionMonitoredSubscriptionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName} + /// + /// + /// Operation Id + /// MonitoredSubscriptions_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The configuration name. Only 'default' value is supported. + /// The cancellation token to use. + public virtual async Task> GetIfExistsAsync(MonitoredSubscriptionConfigurationName configurationName, CancellationToken cancellationToken = default) + { + using var scope = _newRelicMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics.CreateScope("NewRelicMonitoredSubscriptionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _newRelicMonitoredSubscriptionMonitoredSubscriptionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new NewRelicMonitoredSubscriptionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName} + /// + /// + /// Operation Id + /// MonitoredSubscriptions_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The configuration name. Only 'default' value is supported. + /// The cancellation token to use. + public virtual NullableResponse GetIfExists(MonitoredSubscriptionConfigurationName configurationName, CancellationToken cancellationToken = default) + { + using var scope = _newRelicMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics.CreateScope("NewRelicMonitoredSubscriptionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _newRelicMonitoredSubscriptionMonitoredSubscriptionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new NewRelicMonitoredSubscriptionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitoredSubscriptionData.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitoredSubscriptionData.Serialization.cs new file mode 100644 index 0000000000000..f2ffedd8d89d4 --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitoredSubscriptionData.Serialization.cs @@ -0,0 +1,268 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NewRelicObservability.Models; + +namespace Azure.ResourceManager.NewRelicObservability +{ + public partial class NewRelicMonitoredSubscriptionData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NewRelicMonitoredSubscriptionData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + NewRelicMonitoredSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NewRelicMonitoredSubscriptionData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNewRelicMonitoredSubscriptionData(document.RootElement, options); + } + + internal static NewRelicMonitoredSubscriptionData DeserializeNewRelicMonitoredSubscriptionData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NewRelicMonitoredSubscriptionProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = NewRelicMonitoredSubscriptionProperties.DeserializeNewRelicMonitoredSubscriptionProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NewRelicMonitoredSubscriptionData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Properties), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" properties: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Properties)) + { + builder.Append(" properties: "); + BicepSerializationHelpers.AppendChildObject(builder, Properties, options, 2, false, " properties: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(NewRelicMonitoredSubscriptionData)} does not support writing '{options.Format}' format."); + } + } + + NewRelicMonitoredSubscriptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeNewRelicMonitoredSubscriptionData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NewRelicMonitoredSubscriptionData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitoredSubscriptionData.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitoredSubscriptionData.cs new file mode 100644 index 0000000000000..8f795fba11ae4 --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitoredSubscriptionData.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NewRelicObservability.Models; + +namespace Azure.ResourceManager.NewRelicObservability +{ + /// + /// A class representing the NewRelicMonitoredSubscription data model. + /// The request to update subscriptions needed to be monitored by the NewRelic monitor resource. + /// + public partial class NewRelicMonitoredSubscriptionData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public NewRelicMonitoredSubscriptionData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The request to update subscriptions needed to be monitored by the NewRelic monitor resource. + /// Keeps track of any properties unknown to the library. + internal NewRelicMonitoredSubscriptionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, NewRelicMonitoredSubscriptionProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The request to update subscriptions needed to be monitored by the NewRelic monitor resource. + [WirePath("properties")] + public NewRelicMonitoredSubscriptionProperties Properties { get; set; } + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitoredSubscriptionResource.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitoredSubscriptionResource.Serialization.cs new file mode 100644 index 0000000000000..2799528c027e2 --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitoredSubscriptionResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.NewRelicObservability +{ + public partial class NewRelicMonitoredSubscriptionResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + NewRelicMonitoredSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + NewRelicMonitoredSubscriptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitoredSubscriptionResource.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitoredSubscriptionResource.cs new file mode 100644 index 0000000000000..430e8197493c1 --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitoredSubscriptionResource.cs @@ -0,0 +1,348 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NewRelicObservability.Models; + +namespace Azure.ResourceManager.NewRelicObservability +{ + /// + /// A Class representing a NewRelicMonitoredSubscription along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetNewRelicMonitoredSubscriptionResource method. + /// Otherwise you can get one from its parent resource using the GetNewRelicMonitoredSubscription method. + /// + public partial class NewRelicMonitoredSubscriptionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The monitorName. + /// The configurationName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string monitorName, MonitoredSubscriptionConfigurationName configurationName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _newRelicMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics; + private readonly MonitoredSubscriptionsRestOperations _newRelicMonitoredSubscriptionMonitoredSubscriptionsRestClient; + private readonly NewRelicMonitoredSubscriptionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "NewRelic.Observability/monitors/monitoredSubscriptions"; + + /// Initializes a new instance of the class for mocking. + protected NewRelicMonitoredSubscriptionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal NewRelicMonitoredSubscriptionResource(ArmClient client, NewRelicMonitoredSubscriptionData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal NewRelicMonitoredSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _newRelicMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NewRelicObservability", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string newRelicMonitoredSubscriptionMonitoredSubscriptionsApiVersion); + _newRelicMonitoredSubscriptionMonitoredSubscriptionsRestClient = new MonitoredSubscriptionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, newRelicMonitoredSubscriptionMonitoredSubscriptionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual NewRelicMonitoredSubscriptionData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// List the subscriptions currently being monitored by the NewRelic monitor resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName} + /// + /// + /// Operation Id + /// MonitoredSubscriptions_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _newRelicMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics.CreateScope("NewRelicMonitoredSubscriptionResource.Get"); + scope.Start(); + try + { + var response = await _newRelicMonitoredSubscriptionMonitoredSubscriptionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NewRelicMonitoredSubscriptionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List the subscriptions currently being monitored by the NewRelic monitor resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName} + /// + /// + /// Operation Id + /// MonitoredSubscriptions_Get + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _newRelicMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics.CreateScope("NewRelicMonitoredSubscriptionResource.Get"); + scope.Start(); + try + { + var response = _newRelicMonitoredSubscriptionMonitoredSubscriptionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NewRelicMonitoredSubscriptionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the subscriptions that are being monitored by the NewRelic monitor resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName} + /// + /// + /// Operation Id + /// MonitoredSubscriptions_Delete + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _newRelicMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics.CreateScope("NewRelicMonitoredSubscriptionResource.Delete"); + scope.Start(); + try + { + var response = await _newRelicMonitoredSubscriptionMonitoredSubscriptionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new NewRelicObservabilityArmOperation(_newRelicMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics, Pipeline, _newRelicMonitoredSubscriptionMonitoredSubscriptionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the subscriptions that are being monitored by the NewRelic monitor resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName} + /// + /// + /// Operation Id + /// MonitoredSubscriptions_Delete + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _newRelicMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics.CreateScope("NewRelicMonitoredSubscriptionResource.Delete"); + scope.Start(); + try + { + var response = _newRelicMonitoredSubscriptionMonitoredSubscriptionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new NewRelicObservabilityArmOperation(_newRelicMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics, Pipeline, _newRelicMonitoredSubscriptionMonitoredSubscriptionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the subscriptions that are being monitored by the NewRelic monitor resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName} + /// + /// + /// Operation Id + /// MonitoredSubscriptions_Update + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The to use. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, NewRelicMonitoredSubscriptionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _newRelicMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics.CreateScope("NewRelicMonitoredSubscriptionResource.Update"); + scope.Start(); + try + { + var response = await _newRelicMonitoredSubscriptionMonitoredSubscriptionsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new NewRelicObservabilityArmOperation(new NewRelicMonitoredSubscriptionOperationSource(Client), _newRelicMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics, Pipeline, _newRelicMonitoredSubscriptionMonitoredSubscriptionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the subscriptions that are being monitored by the NewRelic monitor resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}/monitoredSubscriptions/{configurationName} + /// + /// + /// Operation Id + /// MonitoredSubscriptions_Update + /// + /// + /// Default Api Version + /// 2024-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The to use. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, NewRelicMonitoredSubscriptionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _newRelicMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics.CreateScope("NewRelicMonitoredSubscriptionResource.Update"); + scope.Start(); + try + { + var response = _newRelicMonitoredSubscriptionMonitoredSubscriptionsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new NewRelicObservabilityArmOperation(new NewRelicMonitoredSubscriptionOperationSource(Client), _newRelicMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics, Pipeline, _newRelicMonitoredSubscriptionMonitoredSubscriptionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicObservabilityTagRuleCollection.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicObservabilityTagRuleCollection.cs index 272271232075f..ab9f05824e526 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicObservabilityTagRuleCollection.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicObservabilityTagRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Cr /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string ruleSet /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(C /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancellatio /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string ruleSetName, Cancel /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string ruleSetName, CancellationToken cance /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicObservabilityTagRuleData.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicObservabilityTagRuleData.Serialization.cs index bfd470e86e9f0..5ec472840ea0d 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicObservabilityTagRuleData.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicObservabilityTagRuleData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -195,6 +196,122 @@ internal static NewRelicObservabilityTagRuleData DeserializeNewRelicObservabilit serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + builder.AppendLine($"'{ProvisioningState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LogRules), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" logRules: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LogRules)) + { + builder.Append(" logRules: "); + BicepSerializationHelpers.AppendChildObject(builder, LogRules, options, 4, false, " logRules: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MetricRules), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" metricRules: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MetricRules)) + { + builder.Append(" metricRules: "); + BicepSerializationHelpers.AppendChildObject(builder, MetricRules, options, 4, false, " metricRules: "); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -203,6 +320,8 @@ BinaryData IPersistableModel.Write(ModelReader { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NewRelicObservabilityTagRuleData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicObservabilityTagRuleData.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicObservabilityTagRuleData.cs index 3f8ad4ce05eaa..bfbd1f2966375 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicObservabilityTagRuleData.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicObservabilityTagRuleData.cs @@ -74,10 +74,13 @@ internal NewRelicObservabilityTagRuleData(ResourceIdentifier id, string name, Re } /// Provisioning State of the resource. + [WirePath("properties.provisioningState")] public NewRelicProvisioningState? ProvisioningState { get; } /// Set of rules for sending logs for the Monitor resource. + [WirePath("properties.logRules")] public NewRelicObservabilityLogRules LogRules { get; set; } /// Set of rules for sending metrics for the Monitor resource. + [WirePath("properties.metricRules")] public NewRelicObservabilityMetricRules MetricRules { get; set; } } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicObservabilityTagRuleResource.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicObservabilityTagRuleResource.cs index cd6ac9d1da9e4..bf72c29e9630a 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicObservabilityTagRuleResource.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicObservabilityTagRuleResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationTo /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource @@ -308,7 +308,7 @@ public virtual async Task> Update /// /// /// Default Api Version - /// 2022-07-01 + /// 2024-03-01 /// /// /// Resource diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/AccountsRestOperations.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/AccountsRestOperations.cs index d6ebe432c0b75..1ade40335f781 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/AccountsRestOperations.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/AccountsRestOperations.cs @@ -32,7 +32,7 @@ public AccountsRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-07-01"; + _apiVersion = apiVersion ?? "2024-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/BillingInfoRestOperations.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/BillingInfoRestOperations.cs new file mode 100644 index 0000000000000..636c65ad9dbff --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/BillingInfoRestOperations.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NewRelicObservability.Models; + +namespace Azure.ResourceManager.NewRelicObservability +{ + internal partial class BillingInfoRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of BillingInfoRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public BillingInfoRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string monitorName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/NewRelic.Observability/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/getBillingInfo", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string monitorName) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/NewRelic.Observability/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/getBillingInfo", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get marketplace info mapped to the given monitor. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Monitors resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, monitorName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NewRelicBillingInfoResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = NewRelicBillingInfoResult.DeserializeNewRelicBillingInfoResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get marketplace info mapped to the given monitor. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Monitors resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, monitorName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NewRelicBillingInfoResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = NewRelicBillingInfoResult.DeserializeNewRelicBillingInfoResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/ConnectedPartnerResourcesRestOperations.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/ConnectedPartnerResourcesRestOperations.cs new file mode 100644 index 0000000000000..ffc1d771f44ec --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/ConnectedPartnerResourcesRestOperations.cs @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NewRelicObservability.Models; + +namespace Azure.ResourceManager.NewRelicObservability +{ + internal partial class ConnectedPartnerResourcesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ConnectedPartnerResourcesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ConnectedPartnerResourcesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string monitorName, string body) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/NewRelic.Observability/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/listConnectedPartnerResources", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string monitorName, string body) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/NewRelic.Observability/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/listConnectedPartnerResources", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (body != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteStringValue(body); + request.Content = content; + } + _userAgent.Apply(message); + return message; + } + + /// List of all active deployments that are associated with the marketplace subscription linked to the given monitor. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Monitors resource. + /// Email Id of the user. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string monitorName, string body = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, monitorName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ConnectedPartnerResourcesListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ConnectedPartnerResourcesListResponse.DeserializeConnectedPartnerResourcesListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List of all active deployments that are associated with the marketplace subscription linked to the given monitor. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Monitors resource. + /// Email Id of the user. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string monitorName, string body = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, monitorName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ConnectedPartnerResourcesListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ConnectedPartnerResourcesListResponse.DeserializeConnectedPartnerResourcesListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, string body) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, string body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List of all active deployments that are associated with the marketplace subscription linked to the given monitor. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Monitors resource. + /// Email Id of the user. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, string body = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, monitorName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ConnectedPartnerResourcesListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ConnectedPartnerResourcesListResponse.DeserializeConnectedPartnerResourcesListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List of all active deployments that are associated with the marketplace subscription linked to the given monitor. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Monitors resource. + /// Email Id of the user. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, string body = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, monitorName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ConnectedPartnerResourcesListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ConnectedPartnerResourcesListResponse.DeserializeConnectedPartnerResourcesListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/MonitoredSubscriptionsRestOperations.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/MonitoredSubscriptionsRestOperations.cs new file mode 100644 index 0000000000000..8404346585180 --- /dev/null +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/MonitoredSubscriptionsRestOperations.cs @@ -0,0 +1,605 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NewRelicObservability.Models; + +namespace Azure.ResourceManager.NewRelicObservability +{ + internal partial class MonitoredSubscriptionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of MonitoredSubscriptionsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public MonitoredSubscriptionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string monitorName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/NewRelic.Observability/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/monitoredSubscriptions", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string monitorName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/NewRelic.Observability/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/monitoredSubscriptions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List the subscriptions currently being monitored by the NewRelic monitor resource. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Monitors resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, monitorName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MonitoredSubscriptionPropertiesList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MonitoredSubscriptionPropertiesList.DeserializeMonitoredSubscriptionPropertiesList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List the subscriptions currently being monitored by the NewRelic monitor resource. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Monitors resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, monitorName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MonitoredSubscriptionPropertiesList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = MonitoredSubscriptionPropertiesList.DeserializeMonitoredSubscriptionPropertiesList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string monitorName, MonitoredSubscriptionConfigurationName configurationName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/NewRelic.Observability/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/monitoredSubscriptions/", false); + uri.AppendPath(configurationName.ToString(), true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string monitorName, MonitoredSubscriptionConfigurationName configurationName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/NewRelic.Observability/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/monitoredSubscriptions/", false); + uri.AppendPath(configurationName.ToString(), true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List the subscriptions currently being monitored by the NewRelic monitor resource. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Monitors resource. + /// The configuration name. Only 'default' value is supported. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string monitorName, MonitoredSubscriptionConfigurationName configurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, monitorName, configurationName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NewRelicMonitoredSubscriptionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = NewRelicMonitoredSubscriptionData.DeserializeNewRelicMonitoredSubscriptionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((NewRelicMonitoredSubscriptionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// List the subscriptions currently being monitored by the NewRelic monitor resource. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Monitors resource. + /// The configuration name. Only 'default' value is supported. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string monitorName, MonitoredSubscriptionConfigurationName configurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, monitorName, configurationName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NewRelicMonitoredSubscriptionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = NewRelicMonitoredSubscriptionData.DeserializeNewRelicMonitoredSubscriptionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((NewRelicMonitoredSubscriptionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string monitorName, MonitoredSubscriptionConfigurationName configurationName, NewRelicMonitoredSubscriptionData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/NewRelic.Observability/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/monitoredSubscriptions/", false); + uri.AppendPath(configurationName.ToString(), true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string monitorName, MonitoredSubscriptionConfigurationName configurationName, NewRelicMonitoredSubscriptionData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/NewRelic.Observability/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/monitoredSubscriptions/", false); + uri.AppendPath(configurationName.ToString(), true); + 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(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Add the subscriptions that should be monitored by the NewRelic monitor resource. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Monitors resource. + /// The configuration name. Only 'default' value is supported. + /// The to use. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string monitorName, MonitoredSubscriptionConfigurationName configurationName, NewRelicMonitoredSubscriptionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, monitorName, configurationName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Add the subscriptions that should be monitored by the NewRelic monitor resource. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Monitors resource. + /// The configuration name. Only 'default' value is supported. + /// The to use. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string monitorName, MonitoredSubscriptionConfigurationName configurationName, NewRelicMonitoredSubscriptionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, monitorName, configurationName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string monitorName, MonitoredSubscriptionConfigurationName configurationName, NewRelicMonitoredSubscriptionData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/NewRelic.Observability/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/monitoredSubscriptions/", false); + uri.AppendPath(configurationName.ToString(), true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string monitorName, MonitoredSubscriptionConfigurationName configurationName, NewRelicMonitoredSubscriptionData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/NewRelic.Observability/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/monitoredSubscriptions/", false); + uri.AppendPath(configurationName.ToString(), true); + 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(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates the subscriptions that are being monitored by the NewRelic monitor resource. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Monitors resource. + /// The configuration name. Only 'default' value is supported. + /// The to use. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string monitorName, MonitoredSubscriptionConfigurationName configurationName, NewRelicMonitoredSubscriptionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, monitorName, configurationName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates the subscriptions that are being monitored by the NewRelic monitor resource. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Monitors resource. + /// The configuration name. Only 'default' value is supported. + /// The to use. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string monitorName, MonitoredSubscriptionConfigurationName configurationName, NewRelicMonitoredSubscriptionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, monitorName, configurationName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string monitorName, MonitoredSubscriptionConfigurationName configurationName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/NewRelic.Observability/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/monitoredSubscriptions/", false); + uri.AppendPath(configurationName.ToString(), true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string monitorName, MonitoredSubscriptionConfigurationName configurationName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/NewRelic.Observability/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/monitoredSubscriptions/", false); + uri.AppendPath(configurationName.ToString(), true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Updates the subscriptions that are being monitored by the NewRelic monitor resource. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Monitors resource. + /// The configuration name. Only 'default' value is supported. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string monitorName, MonitoredSubscriptionConfigurationName configurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, monitorName, configurationName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates the subscriptions that are being monitored by the NewRelic monitor resource. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Monitors resource. + /// The configuration name. Only 'default' value is supported. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string monitorName, MonitoredSubscriptionConfigurationName configurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, monitorName, configurationName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string monitorName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string monitorName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List the subscriptions currently being monitored by the NewRelic monitor resource. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Monitors resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, monitorName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MonitoredSubscriptionPropertiesList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MonitoredSubscriptionPropertiesList.DeserializeMonitoredSubscriptionPropertiesList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List the subscriptions currently being monitored by the NewRelic monitor resource. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Monitors resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, monitorName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MonitoredSubscriptionPropertiesList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = MonitoredSubscriptionPropertiesList.DeserializeMonitoredSubscriptionPropertiesList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/MonitorsRestOperations.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/MonitorsRestOperations.cs index af72861390cf2..9aa3fc5038365 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/MonitorsRestOperations.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/MonitorsRestOperations.cs @@ -32,7 +32,7 @@ public MonitorsRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-07-01"; + _apiVersion = apiVersion ?? "2024-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -434,7 +434,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string monitorName, NewRelicMonitorResourcePatch patch, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string monitorName, NewRelicMonitorResourcePatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -446,12 +446,8 @@ public async Task> UpdateAsync(string subs switch (message.Response.Status) { case 200: - { - NewRelicMonitorResourceData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = NewRelicMonitorResourceData.DeserializeNewRelicMonitorResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } @@ -465,7 +461,7 @@ public async Task> UpdateAsync(string subs /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string monitorName, NewRelicMonitorResourcePatch patch, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string monitorName, NewRelicMonitorResourcePatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -477,12 +473,8 @@ public Response Update(string subscriptionId, strin switch (message.Response.Status) { case 200: - { - NewRelicMonitorResourceData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = NewRelicMonitorResourceData.DeserializeNewRelicMonitorResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } @@ -1139,7 +1131,7 @@ internal HttpMessage CreateListMonitoredResourcesRequest(string subscriptionId, /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListMonitoredResourcesAsync(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + public async Task> ListMonitoredResourcesAsync(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -1151,9 +1143,9 @@ public async Task> Li { case 200: { - NewRelicObservabilityMonitoredResourceListResult value = default; + NewRelicMonitoredResourceListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = NewRelicObservabilityMonitoredResourceListResult.DeserializeNewRelicObservabilityMonitoredResourceListResult(document.RootElement); + value = NewRelicMonitoredResourceListResult.DeserializeNewRelicMonitoredResourceListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1168,7 +1160,7 @@ public async Task> Li /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListMonitoredResources(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + public Response ListMonitoredResources(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -1180,9 +1172,103 @@ public Response ListMonitoredR { case 200: { - NewRelicObservabilityMonitoredResourceListResult value = default; + NewRelicMonitoredResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = NewRelicMonitoredResourceListResult.DeserializeNewRelicMonitoredResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListLinkedResourcesRequestUri(string subscriptionId, string resourceGroupName, string monitorName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/NewRelic.Observability/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/listLinkedResources", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListLinkedResourcesRequest(string subscriptionId, string resourceGroupName, string monitorName) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/NewRelic.Observability/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/listLinkedResources", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all Azure resources associated to the same NewRelic organization and account as the target resource. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Monitors resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListLinkedResourcesAsync(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + + using var message = CreateListLinkedResourcesRequest(subscriptionId, resourceGroupName, monitorName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + LinkedResourceListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = LinkedResourceListResponse.DeserializeLinkedResourceListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all Azure resources associated to the same NewRelic organization and account as the target resource. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Monitors resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListLinkedResources(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + + using var message = CreateListLinkedResourcesRequest(subscriptionId, resourceGroupName, monitorName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + LinkedResourceListResponse value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = NewRelicObservabilityMonitoredResourceListResult.DeserializeNewRelicObservabilityMonitoredResourceListResult(document.RootElement); + value = LinkedResourceListResponse.DeserializeLinkedResourceListResponse(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1646,7 +1732,7 @@ internal HttpMessage CreateListMonitoredResourcesNextPageRequest(string nextLink /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListMonitoredResourcesNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + public async Task> ListMonitoredResourcesNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -1659,9 +1745,9 @@ public async Task> Li { case 200: { - NewRelicObservabilityMonitoredResourceListResult value = default; + NewRelicMonitoredResourceListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = NewRelicObservabilityMonitoredResourceListResult.DeserializeNewRelicObservabilityMonitoredResourceListResult(document.RootElement); + value = NewRelicMonitoredResourceListResult.DeserializeNewRelicMonitoredResourceListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1677,7 +1763,7 @@ public async Task> Li /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListMonitoredResourcesNextPage(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + public Response ListMonitoredResourcesNextPage(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -1690,9 +1776,93 @@ public Response ListMonitoredR { case 200: { - NewRelicObservabilityMonitoredResourceListResult value = default; + NewRelicMonitoredResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = NewRelicMonitoredResourceListResult.DeserializeNewRelicMonitoredResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListLinkedResourcesNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string monitorName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListLinkedResourcesNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string monitorName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all Azure resources associated to the same NewRelic organization and account as the target resource. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Monitors resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListLinkedResourcesNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + + using var message = CreateListLinkedResourcesNextPageRequest(nextLink, subscriptionId, resourceGroupName, monitorName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + LinkedResourceListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = LinkedResourceListResponse.DeserializeLinkedResourceListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all Azure resources associated to the same NewRelic organization and account as the target resource. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of the Monitors resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListLinkedResourcesNextPage(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + + using var message = CreateListLinkedResourcesNextPageRequest(nextLink, subscriptionId, resourceGroupName, monitorName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + LinkedResourceListResponse value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = NewRelicObservabilityMonitoredResourceListResult.DeserializeNewRelicObservabilityMonitoredResourceListResult(document.RootElement); + value = LinkedResourceListResponse.DeserializeLinkedResourceListResponse(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/OrganizationsRestOperations.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/OrganizationsRestOperations.cs index 75f9d31014be1..f8f749f82ad40 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/OrganizationsRestOperations.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/OrganizationsRestOperations.cs @@ -32,7 +32,7 @@ public OrganizationsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-07-01"; + _apiVersion = apiVersion ?? "2024-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/PlansRestOperations.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/PlansRestOperations.cs index a6bd51eec7b8d..d554c8dccf395 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/PlansRestOperations.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/PlansRestOperations.cs @@ -32,7 +32,7 @@ public PlansRestOperations(HttpPipeline pipeline, string applicationId, Uri endp { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-07-01"; + _apiVersion = apiVersion ?? "2024-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/TagRulesRestOperations.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/TagRulesRestOperations.cs index baea4bdba3328..4e976677c7b70 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/TagRulesRestOperations.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/RestOperations/TagRulesRestOperations.cs @@ -32,7 +32,7 @@ public TagRulesRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-07-01"; + _apiVersion = apiVersion ?? "2024-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/autorest.md b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/autorest.md index dbeac93b49419..bc370ae4c384b 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/autorest.md +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/autorest.md @@ -7,7 +7,8 @@ azure-arm: true csharp: true library-name: Newrelic namespace: Azure.ResourceManager.NewRelicObservability -require: https://github.com/Azure/azure-rest-api-specs/blob/fd0b301360d7f83dee9dec5afe3fff77b90b79f6/specification/newrelic/resource-manager/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/07d286359f828bbc7901e86288a5d62b48ae2052/specification/newrelic/resource-manager/readme.md +#tag: package-2024-03-01 output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: @@ -17,9 +18,10 @@ skip-csproj: true modelerfour: flatten-payloads: false use-model-reader-writer: true +enable-bicep-serialization: true -# mgmt-debug: -# show-serialized-names: true +#mgmt-debug: +# show-serialized-names: true format-by-name-rules: 'tenantId': 'uuid' @@ -100,6 +102,7 @@ rename-mapping: AppServicesGetRequest.azureResourceIds: -|arm-id AppServiceInfo.azureResourceId: -|arm-id AppServicesListResponse: NewRelicAppServicesListResult + BillingInfoResponse: NewRelicBillingInfoResult AzureStorageBlobContainerEndpointProperties: StorageBlobContainerEndpointProperties AzureStorageBlobContainerNewrelicEndpointProperties.StorageAccountResourceId: -|arm-id HostsGetRequest: NewRelicHostsGetContent @@ -118,7 +121,7 @@ rename-mapping: MetricsStatusResponse: NewRelicMetricsStatusResult MonitoredResource: NewRelicResourceMonitorResult MonitoredResource.id: -|arm-id - MonitoredResourceListResponse: NewRelicObservabilityMonitoredResourceListResult + MonitoredResourceListResponse: NewRelicMonitoredResourceListResult MonitoringStatus.Disabled: IsDisabled MonitoringStatus.Enabled: IsEnabled NewrelicAgentData.LocalIPAddress: -|ip-address @@ -127,6 +130,7 @@ rename-mapping: Project: NewRelicProject PlanDataListResponse: NewRelicPlanDataListResult PlanData: NewRelicPlanDetails + PlanData.billingCycle: NewRelicPlanBillingCycle PlanDataResource: NewRelicPlanData OrganizationResource: NewRelicOrganizationResourceData SendAadLogsStatus.Disabled: IsDisabled @@ -144,6 +148,15 @@ rename-mapping: SwitchBillingRequest: NewRelicSwitchBillingContent SwitchBillingRequest.azureResourceId: -|arm-id VMInfo.vmId: -|arm-id + MonitoredSubscriptionProperties: NewRelicMonitoredSubscription + ConfigurationName: MonitoredSubscriptionConfigurationName + ConnectedPartnerResourceProperties: NewRelicConnectedPartnerResourceProperties + ConnectedPartnerResourcesListFormat: NewRelicConnectedPartnerResourceInfo + PatchOperation: MonitoredSubscriptionPatchOperation + Status: NewRelicMonitoringStatus + SubscriptionList: NewRelicMonitoredSubscriptionProperties + MonitoredSubscription: NewRelicMonitoredSubscriptionInfo + MonitoringTagRulesProperties: NewRelicMonitoringTagRules override-operation-name: Accounts_List: GetNewRelicAccounts From d50f72f2f2eda8a058e459c0776ead8835e283fd Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Mon, 15 Jul 2024 09:48:38 -0400 Subject: [PATCH 078/144] Increment package version after release of Azure.ResourceManager.Redis (#44997) --- sdk/redis/Azure.ResourceManager.Redis/CHANGELOG.md | 10 ++++++++++ .../src/Azure.ResourceManager.Redis.csproj | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/sdk/redis/Azure.ResourceManager.Redis/CHANGELOG.md b/sdk/redis/Azure.ResourceManager.Redis/CHANGELOG.md index e41cce37ae2a2..193fb8b7c8b00 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/CHANGELOG.md +++ b/sdk/redis/Azure.ResourceManager.Redis/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.5.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.4.0 (2024-07-11) ### Features Added diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Azure.ResourceManager.Redis.csproj b/sdk/redis/Azure.ResourceManager.Redis/src/Azure.ResourceManager.Redis.csproj index 618ff638d561e..04fcea2d32ac0 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Azure.ResourceManager.Redis.csproj +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Azure.ResourceManager.Redis.csproj @@ -1,8 +1,8 @@ - 1.4.0 + 1.5.0-beta.1 - 1.3.3 + 1.4.0 Azure.ResourceManager.Redis Microsoft Azure Resource Manager client SDK for Azure resource provider Microsoft.Cache Redis. azure;management;arm;resource manager;redis From 11140466539bc2dfe3efeba574310fc6d386fa36 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Mon, 15 Jul 2024 09:50:31 -0400 Subject: [PATCH 079/144] Increment package version after release of Azure.ResourceManager.NewRelicObservability (#45001) --- .../CHANGELOG.md | 12 +++++++++++- ...zure.ResourceManager.NewRelicObservability.csproj | 4 ++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/CHANGELOG.md b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/CHANGELOG.md index 6523e075d15e0..603fca9b04c83 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/CHANGELOG.md +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.2.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.1.0 (2024-07-05) ### Features Added @@ -62,4 +72,4 @@ This package follows the [new Azure SDK guidelines](https://azure.github.io/azur This package is a Public Preview version, so expect incompatible changes in subsequent releases as we improve the product. To provide feedback, submit an issue in our [Azure SDK for .NET GitHub repo](https://github.com/Azure/azure-sdk-for-net/issues). -> NOTE: For more information about unified authentication, please refer to [Microsoft Azure Identity documentation for .NET](https://docs.microsoft.com//dotnet/api/overview/azure/identity-readme?view=azure-dotnet). \ No newline at end of file +> NOTE: For more information about unified authentication, please refer to [Microsoft Azure Identity documentation for .NET](https://docs.microsoft.com//dotnet/api/overview/azure/identity-readme?view=azure-dotnet). diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Azure.ResourceManager.NewRelicObservability.csproj b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Azure.ResourceManager.NewRelicObservability.csproj index 52b658f17d70f..5a249adb0941a 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Azure.ResourceManager.NewRelicObservability.csproj +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Azure.ResourceManager.NewRelicObservability.csproj @@ -1,8 +1,8 @@ - 1.1.0 + 1.2.0-beta.1 - 1.0.1 + 1.1.0 Azure.ResourceManager.NewRelicObservability Azure Resource Manager client SDK for Azure resource provider Newrelic. azure;management;arm;resource manager;newrelic From 7105c91093769bfb5a5d985d2750ee7e4654b663 Mon Sep 17 00:00:00 2001 From: Jesse Squire Date: Mon, 15 Jul 2024 11:35:11 -0400 Subject: [PATCH 080/144] [CODEOWNERS] Removing Pallavi's ownership (#45006) The focus of these changes is to remove ownership areas for Pallavi, as their account is no longer associated with Microsoft. --- .github/CODEOWNERS | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index f9f576b9be93a..b658a7c44eb49 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -208,10 +208,10 @@ # ServiceOwners: @dipidoo @longli0 @ShaoAnLin @lulululululu @leareai @Han-msft # PRLabel: %Cognitive - Form Recognizer -/sdk/documentintelligence/ @kinelski @pallavit @joseharriaga +/sdk/documentintelligence/ @kinelski @joseharriaga # PRLabel: %Cognitive - Form Recognizer -/sdk/formrecognizer/ @kinelski @pallavit @joseharriaga +/sdk/formrecognizer/ @kinelski @joseharriaga # ServiceLabel: %Cognitive - Form Recognizer # AzureSdkOwners: @kinelski @@ -375,7 +375,7 @@ # ServiceOwners: @dkkapur # PRLabel: %Container Registry -/sdk/containerregistry/ @ShivangiReja @pallavit @annelo-msft @Azure/azsdk-acr +/sdk/containerregistry/ @ShivangiReja @annelo-msft @Azure/azsdk-acr # ServiceLabel: %Container Registry # AzureSdkOwners: @ShivangiReja @@ -550,7 +550,7 @@ # ServiceOwners: @Azure/azure-iot-cli-triage # PRLabel: %KeyVault -/sdk/keyvault/ @heaths @schaabs @Azure/azsdk-keyvault +/sdk/keyvault/ @heaths @schaabs @JonathanCrd @jsquire @christothes # ServiceLabel: %KeyVault # AzureSdkOwners: @heaths @@ -617,17 +617,17 @@ # ServiceOwners: @kpiteira # PRLabel: %Monitor -/sdk/monitor/ci.yml @nisha-bhatia @JoshLove-msft @pallavit @Azure/azure-sdk-write-monitor-data-plane +/sdk/monitor/ci.yml @nisha-bhatia @JoshLove-msft @Azure/azure-sdk-write-monitor-data-plane # PRLabel: %Monitor -/sdk/monitor/Azure.Monitor.Ingestion/ @nisha-bhatia @JoshLove-msft @pallavit @Azure/azure-sdk-write-monitor-data-plane +/sdk/monitor/Azure.Monitor.Ingestion/ @nisha-bhatia @JoshLove-msft @Azure/azure-sdk-write-monitor-data-plane # ServiceLabel: %Monitor # AzureSdkOwners: @nisha-bhatia # ServiceOwners: @SameergMS @dadunl @AzMonEssential @AzmonAlerts @AzmonActionG @AzmonLogA # PRLabel: %Monitor - Query -/sdk/monitor/Azure.Monitor.Query/ @nisha-bhatia @JoshLove-msft @pallavit @Azure/azure-sdk-write-monitor-data-plane +/sdk/monitor/Azure.Monitor.Query/ @nisha-bhatia @JoshLove-msft @Azure/azure-sdk-write-monitor-data-plane # ServiceLabel: %Monitor - Query # AzureSdkOwners: @nisha-bhatia From b10e21dcfb5c19992cdcedd15e9531fab2db34d4 Mon Sep 17 00:00:00 2001 From: Amanda Nguyen <48961492+amnguye@users.noreply.github.com> Date: Mon, 15 Jul 2024 10:51:56 -0700 Subject: [PATCH 081/144] [Storage] Fix for truncating URL paths with "#" (#44941) * WIP - still need to record tests * Recordings * Cleanup * Fixed recordings * Added fix for Shares and Datalake, Updated tests to use OAuth, Updated Changelogs * Rerecord files tests * Merge and record tests --- sdk/storage/Azure.Storage.Blobs/CHANGELOG.md | 1 + sdk/storage/Azure.Storage.Blobs/assets.json | 2 +- .../Azure.Storage.Blobs/src/BlobUriBuilder.cs | 2 +- .../tests/BlobBaseClientTests.cs | 32 +++++++++ .../Azure.Storage.Files.DataLake/CHANGELOG.md | 1 + .../Azure.Storage.Files.DataLake/assets.json | 2 +- .../src/DataLakeUriBuilder.cs | 2 +- .../tests/DirectoryClientTests.cs | 28 ++++++++ .../tests/FileClientTests.cs | 33 +++++++++ .../Azure.Storage.Files.Shares/CHANGELOG.md | 1 + .../Azure.Storage.Files.Shares/assets.json | 2 +- .../src/ShareUriBuilder.cs | 2 +- .../tests/DirectoryClientTests.cs | 27 ++++++++ .../tests/FileClientTests.cs | 68 ++++++++++++++----- 14 files changed, 181 insertions(+), 22 deletions(-) diff --git a/sdk/storage/Azure.Storage.Blobs/CHANGELOG.md b/sdk/storage/Azure.Storage.Blobs/CHANGELOG.md index cee8ee19e8932..16c2f2781fad0 100644 --- a/sdk/storage/Azure.Storage.Blobs/CHANGELOG.md +++ b/sdk/storage/Azure.Storage.Blobs/CHANGELOG.md @@ -7,6 +7,7 @@ ### Breaking Changes ### Bugs Fixed +- Fixed bug where storage clients when constructed with URLs with '#' character would truncate the blob name at the '#'. ### Other Changes diff --git a/sdk/storage/Azure.Storage.Blobs/assets.json b/sdk/storage/Azure.Storage.Blobs/assets.json index 65d82fdcb5979..46a74dc97b014 100644 --- a/sdk/storage/Azure.Storage.Blobs/assets.json +++ b/sdk/storage/Azure.Storage.Blobs/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/storage/Azure.Storage.Blobs", - "Tag": "net/storage/Azure.Storage.Blobs_b8e4c4ca1e" + "Tag": "net/storage/Azure.Storage.Blobs_be75b1430c" } diff --git a/sdk/storage/Azure.Storage.Blobs/src/BlobUriBuilder.cs b/sdk/storage/Azure.Storage.Blobs/src/BlobUriBuilder.cs index aa506a6f8c951..1457fe29a13ac 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/BlobUriBuilder.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/BlobUriBuilder.cs @@ -204,7 +204,7 @@ public BlobUriBuilder(Uri uri, bool trimBlobNameSlashes) // Find the account, container, & blob names (if any) if (!string.IsNullOrEmpty(uri.AbsolutePath)) { - var path = uri.GetPath(); + var path = string.Concat(uri.GetPath(), uri.Fragment); var startIndex = 0; diff --git a/sdk/storage/Azure.Storage.Blobs/tests/BlobBaseClientTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/BlobBaseClientTests.cs index 8363d568f7db7..218105b7d38cd 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/BlobBaseClientTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/BlobBaseClientTests.cs @@ -104,6 +104,38 @@ public async Task Ctor_ConnectionStringEscapeBlobName() Assert.AreEqual(uploadResponse.Value.ETag, propertiesResponse.Value.ETag); } + [RecordedTest] + public async Task Ctor_EscapeBlobName() + { + // Arrange + string blobName = "!*'();[]:@&%=+$,/#äÄöÖüÜß"; + await using DisposingContainer test = await GetTestContainerAsync(); + var data = GetRandomBuffer(Constants.KB); + BlobClient blob = InstrumentClient(test.Container.GetBlobClient(blobName)); + ETag originalEtag; + using (var stream = new MemoryStream(data)) + { + BlobContentInfo info = await blob.UploadAsync(stream); + originalEtag = info.ETag; + } + + // Act + BlobUriBuilder uriBuilder = new BlobUriBuilder(new Uri(Tenants.TestConfigOAuth.BlobServiceEndpoint)) + { + BlobContainerName = blob.BlobContainerName, + BlobName = blobName + }; + BlobBaseClient freshBlobClient = InstrumentClient(new BlobBaseClient( + uriBuilder.ToUri(), + TestEnvironment.Credential, + GetOptions())); + + // Assert + Assert.AreEqual(blobName, freshBlobClient.Name); + BlobProperties propertiesResponse = await freshBlobClient.GetPropertiesAsync(); + Assert.AreEqual(originalEtag, propertiesResponse.ETag); + } + [RecordedTest] public void Ctor_Uri() { diff --git a/sdk/storage/Azure.Storage.Files.DataLake/CHANGELOG.md b/sdk/storage/Azure.Storage.Files.DataLake/CHANGELOG.md index 23694b6f65c04..876725a114639 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/CHANGELOG.md +++ b/sdk/storage/Azure.Storage.Files.DataLake/CHANGELOG.md @@ -7,6 +7,7 @@ ### Breaking Changes ### Bugs Fixed +- Fixed bug where storage clients when constructed with URLs with '#' character would truncate the path at the '#'. ### Other Changes diff --git a/sdk/storage/Azure.Storage.Files.DataLake/assets.json b/sdk/storage/Azure.Storage.Files.DataLake/assets.json index 597d72370ca4a..442889d04be63 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/assets.json +++ b/sdk/storage/Azure.Storage.Files.DataLake/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/storage/Azure.Storage.Files.DataLake", - "Tag": "net/storage/Azure.Storage.Files.DataLake_133659189e" + "Tag": "net/storage/Azure.Storage.Files.DataLake_186c14971d" } diff --git a/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeUriBuilder.cs b/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeUriBuilder.cs index ae789de151eac..8b65f6e888127 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeUriBuilder.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeUriBuilder.cs @@ -181,7 +181,7 @@ public DataLakeUriBuilder(Uri uri) // Find the share & directory/file path (if any) if (!string.IsNullOrEmpty(uri.AbsolutePath)) { - var path = uri.GetPath(); + var path = string.Concat(uri.GetPath(), uri.Fragment); var startIndex = 0; diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/DirectoryClientTests.cs b/sdk/storage/Azure.Storage.Files.DataLake/tests/DirectoryClientTests.cs index 5364051fe5700..74ccc69379729 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/tests/DirectoryClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/DirectoryClientTests.cs @@ -337,6 +337,34 @@ await TestHelper.AssertExpectedExceptionAsync( e => Assert.AreEqual("InvalidAuthenticationInfo", e.ErrorCode)); } + [RecordedTest] + public async Task Ctor_EscapeName() + { + // Arrange + string directoryName = "!*'();[]:@&%=+$,#äÄöÖüÜß"; + await using DisposingFileSystem test = await GetNewFileSystem(); + int size = Constants.KB; + var data = GetRandomBuffer(size); + DataLakeDirectoryClient directory = InstrumentClient(test.Container.GetDirectoryClient(directoryName)); + await directory.CreateAsync(); + + // Act + DataLakeUriBuilder uriBuilder = new DataLakeUriBuilder(new Uri(Tenants.TestConfigHierarchicalNamespace.BlobServiceEndpoint)) + { + FileSystemName = directory.FileSystemName, + DirectoryOrFilePath = directoryName + }; + DataLakeDirectoryClient freshDirectoryClient = InstrumentClient(new DataLakeDirectoryClient( + uriBuilder.ToUri(), + TestEnvironment.Credential, + GetOptions())); + + // Assert + bool exists = await freshDirectoryClient.ExistsAsync(); + Assert.True(exists); + Assert.AreEqual(directoryName, freshDirectoryClient.Name); + } + [RecordedTest] [TestCase(false)] [TestCase(true)] diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/FileClientTests.cs b/sdk/storage/Azure.Storage.Files.DataLake/tests/FileClientTests.cs index dade8acee12f6..b08033e1be0e0 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/tests/FileClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/FileClientTests.cs @@ -340,6 +340,39 @@ await TestHelper.AssertExpectedExceptionAsync( e => Assert.AreEqual("InvalidAuthenticationInfo", e.ErrorCode)); } + [RecordedTest] + public async Task Ctor_EscapeName() + { + // Arrange + string fileName = "!*'();[]:@&%=+$,#äÄöÖüÜß"; + await using DisposingFileSystem test = await GetNewFileSystem(); + int size = Constants.KB; + var data = GetRandomBuffer(size); + DataLakeFileClient file = InstrumentClient(test.Container.GetFileClient(fileName)); + ETag originalEtag; + using (var stream = new MemoryStream(data)) + { + PathInfo info = await file.UploadAsync(stream); + originalEtag = info.ETag; + } + + // Act + DataLakeUriBuilder uriBuilder = new DataLakeUriBuilder(new Uri(Tenants.TestConfigHierarchicalNamespace.BlobServiceEndpoint)) + { + FileSystemName = file.FileSystemName, + DirectoryOrFilePath = fileName + }; + DataLakeFileClient freshFileClient = InstrumentClient(new DataLakeFileClient( + uriBuilder.ToUri(), + TestEnvironment.Credential, + GetOptions())); + + // Assert + Assert.AreEqual(fileName, freshFileClient.Name); + PathProperties propertiesResponse = await freshFileClient.GetPropertiesAsync(); + Assert.AreEqual(originalEtag, propertiesResponse.ETag); + } + [RecordedTest] [TestCase(false)] [TestCase(true)] diff --git a/sdk/storage/Azure.Storage.Files.Shares/CHANGELOG.md b/sdk/storage/Azure.Storage.Files.Shares/CHANGELOG.md index 03edc6c7b700f..3c5f19c01376a 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/CHANGELOG.md +++ b/sdk/storage/Azure.Storage.Files.Shares/CHANGELOG.md @@ -7,6 +7,7 @@ ### Breaking Changes ### Bugs Fixed +- Fixed bug where storage clients when constructed with URLs with '#' character would truncate the path at the '#'. ### Other Changes diff --git a/sdk/storage/Azure.Storage.Files.Shares/assets.json b/sdk/storage/Azure.Storage.Files.Shares/assets.json index 028402c5d0c3a..07a2406439a2a 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/assets.json +++ b/sdk/storage/Azure.Storage.Files.Shares/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/storage/Azure.Storage.Files.Shares", - "Tag": "net/storage/Azure.Storage.Files.Shares_f7982e093b" + "Tag": "net/storage/Azure.Storage.Files.Shares_093f14c48d" } diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/ShareUriBuilder.cs b/sdk/storage/Azure.Storage.Files.Shares/src/ShareUriBuilder.cs index 38d0830aa5743..99ec7f24621f6 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/ShareUriBuilder.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/ShareUriBuilder.cs @@ -174,7 +174,7 @@ public ShareUriBuilder(Uri uri) if (!string.IsNullOrEmpty(uri.AbsolutePath)) { // If path starts with a slash, remove it - var path = uri.GetPath(); + var path = string.Concat(uri.GetPath(), uri.Fragment); var startIndex = 0; diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs index 502e255f4a95c..216204f198cc8 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Threading.Tasks; using Azure.Core.TestFramework; @@ -215,6 +216,32 @@ await TestHelper.AssertExpectedExceptionAsync( e => Assert.AreEqual("InvalidAuthenticationInfo", e.ErrorCode)); } + [RecordedTest] + public async Task Ctor_EscapeDirectoryName() + { + // Arrange + string directoryName = "$=;!#öÖ"; + await using DisposingShare test = await GetTestShareAsync(); + int size = Constants.KB; + var data = GetRandomBuffer(size); + ShareDirectoryClient directory = InstrumentClient(test.Share.GetDirectoryClient(directoryName)); + await directory.CreateAsync(); + + // Act + ShareUriBuilder uriBuilder = new ShareUriBuilder(new Uri(Tenants.TestConfigOAuth.FileServiceEndpoint)) + { + ShareName = directory.ShareName, + DirectoryOrFilePath = directoryName + }; + ShareDirectoryClient freshDirectoryClient = InstrumentClient(new ShareDirectoryClient( + uriBuilder.ToUri(), + TestEnvironment.Credential, + GetOptions())); + + // Assert + Assert.AreEqual(directoryName, freshDirectoryClient.Name); + } + [RecordedTest] public void DirectoryPathsParsing() { diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs index 434f91a45f602..822df9b47c81c 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs @@ -117,7 +117,7 @@ public async Task Ctor_DefaultAudience() ShareFileClient fileClient = directoryClient.GetFileClient(GetNewFileName()); await fileClient.CreateAsync(Constants.KB); - // Act - Create new blob client with the OAuth Credential and Audience + // Act - Create new Share client with the OAuth Credential and Audience ShareClientOptions options = GetOptionsWithAudience(ShareAudience.DefaultAudience); ShareUriBuilder uriBuilder = new ShareUriBuilder(new Uri(Tenants.TestConfigOAuth.FileServiceEndpoint)) @@ -147,7 +147,7 @@ public async Task Ctor_CustomAudience() ShareFileClient fileClient = directoryClient.GetFileClient(GetNewFileName()); await fileClient.CreateAsync(Constants.KB); - // Act - Create new blob client with the OAuth Credential and Audience + // Act - Create new Share client with the OAuth Credential and Audience ShareClientOptions options = GetOptionsWithAudience(new ShareAudience($"https://{test.Share.AccountName}.file.core.windows.net/")); ShareUriBuilder uriBuilder = new ShareUriBuilder(new Uri(Tenants.TestConfigOAuth.FileServiceEndpoint)) @@ -177,7 +177,7 @@ public async Task Ctor_StorageAccountAudience() ShareFileClient fileClient = directoryClient.GetFileClient(GetNewFileName()); await fileClient.CreateAsync(Constants.KB); - // Act - Create new blob client with the OAuth Credential and Audience + // Act - Create new Share client with the OAuth Credential and Audience ShareClientOptions options = GetOptionsWithAudience(ShareAudience.CreateShareServiceAccountAudience(test.Share.AccountName)); ShareUriBuilder uriBuilder = new ShareUriBuilder(new Uri(Tenants.TestConfigOAuth.FileServiceEndpoint)) @@ -196,6 +196,42 @@ public async Task Ctor_StorageAccountAudience() Assert.IsNotNull(exists); } + [RecordedTest] + public async Task Ctor_EscapeFileName() + { + // Arrange + string fileName = "$=;!#öÖ"; + await using DisposingShare test = await GetTestShareAsync(); + int size = Constants.KB; + var data = GetRandomBuffer(size); + ShareFileClient file = InstrumentClient(test.Share.GetRootDirectoryClient().GetFileClient(fileName)); + ETag originalEtag; + await file.CreateAsync(size); + using (var stream = new MemoryStream(data)) + { + ShareFileUploadInfo info = await file.UploadAsync(stream); + originalEtag = info.ETag; + } + + // Act + ShareUriBuilder uriBuilder = new ShareUriBuilder(new Uri(Tenants.TestConfigOAuth.FileServiceEndpoint)) + { + ShareName = test.Share.Name, + DirectoryOrFilePath = fileName + }; + ShareClientOptions options = GetOptions(); + options.ShareTokenIntent = ShareTokenIntent.Backup; + ShareFileClient freshFileClient = InstrumentClient(new ShareFileClient( + uriBuilder.ToUri(), + TestEnvironment.Credential, + options)); + + // Assert + Assert.AreEqual(fileName, freshFileClient.Name); + ShareFileProperties propertiesResponse = await freshFileClient.GetPropertiesAsync(); + Assert.AreEqual(originalEtag, propertiesResponse.ETag); + } + [RecordedTest] public async Task Ctor_AudienceError() { @@ -206,8 +242,8 @@ public async Task Ctor_AudienceError() ShareFileClient fileClient = directoryClient.GetFileClient(GetNewFileName()); await fileClient.CreateAsync(Constants.KB); - // Act - Create new blob client with the OAuth Credential and Audience - ShareClientOptions options = GetOptionsWithAudience(new ShareAudience("https://badaudience.blob.core.windows.net")); + // Act - Create new Share client with the OAuth Credential and Audience + ShareClientOptions options = GetOptionsWithAudience(new ShareAudience("https://badaudience.Share.core.windows.net")); ShareUriBuilder uriBuilder = new ShareUriBuilder(new Uri(Tenants.TestConfigOAuth.FileServiceEndpoint)) { @@ -4037,7 +4073,7 @@ public async Task ClearRangeAsync_TrailingDot() [TestCase(30 * Constants.KB)] [TestCase(50 * Constants.KB)] [TestCase(501 * Constants.KB)] - public async Task UploadAsync_SmallBlobs(int size) => + public async Task UploadAsync_SmallShares(int size) => // Use a 1KB threshold so we get a lot of individual blocks await UploadAndVerify(size, Constants.KB); @@ -4047,7 +4083,7 @@ public async Task UploadAsync_SmallBlobs(int size) => [TestCase(257 * Constants.MB)] [TestCase(1 * Constants.GB)] [Explicit("https://github.com/Azure/azure-sdk-for-net/issues/9120")] - public async Task UploadAsync_LargeBlobs(int size) => + public async Task UploadAsync_LargeShares(int size) => // TODO: #6781 We don't want to add 1GB of random data in the recordings await UploadAndVerify(size, Constants.MB); @@ -6342,19 +6378,19 @@ public void CanGenerateSas_ClientConstructors() { // Arrange var constants = TestConstants.Create(this); - var blobEndpoint = new Uri("https://127.0.0.1/" + constants.Sas.Account); - var blobSecondaryEndpoint = new Uri("https://127.0.0.1/" + constants.Sas.Account + "-secondary"); - var storageConnectionString = new StorageConnectionString(constants.Sas.SharedKeyCredential, fileStorageUri: (blobEndpoint, blobSecondaryEndpoint)); + var ShareEndpoint = new Uri("https://127.0.0.1/" + constants.Sas.Account); + var ShareSecondaryEndpoint = new Uri("https://127.0.0.1/" + constants.Sas.Account + "-secondary"); + var storageConnectionString = new StorageConnectionString(constants.Sas.SharedKeyCredential, fileStorageUri: (ShareEndpoint, ShareSecondaryEndpoint)); string connectionString = storageConnectionString.ToString(true); - // Act - ShareDirectoryClient(string connectionString, string blobContainerName, string blobName) + // Act - ShareDirectoryClient(string connectionString, string ShareContainerName, string ShareName) ShareFileClient directory = InstrumentClient(new ShareFileClient( connectionString, GetNewShareName(), GetNewDirectoryName())); Assert.IsTrue(directory.CanGenerateSasUri); - // Act - ShareFileClient(string connectionString, string blobContainerName, string blobName, BlobClientOptions options) + // Act - ShareFileClient(string connectionString, string ShareContainerName, string ShareName, ShareClientOptions options) ShareFileClient directory2 = InstrumentClient(new ShareFileClient( connectionString, GetNewShareName(), @@ -6362,15 +6398,15 @@ public void CanGenerateSas_ClientConstructors() GetOptions())); Assert.IsTrue(directory2.CanGenerateSasUri); - // Act - ShareFileClient(Uri blobContainerUri, BlobClientOptions options = default) + // Act - ShareFileClient(Uri ShareContainerUri, ShareClientOptions options = default) ShareFileClient directory3 = InstrumentClient(new ShareFileClient( - blobEndpoint, + ShareEndpoint, GetOptions())); Assert.IsFalse(directory3.CanGenerateSasUri); - // Act - ShareFileClient(Uri blobContainerUri, StorageSharedKeyCredential credential, BlobClientOptions options = default) + // Act - ShareFileClient(Uri ShareContainerUri, StorageSharedKeyCredential credential, ShareClientOptions options = default) ShareFileClient directory4 = InstrumentClient(new ShareFileClient( - blobEndpoint, + ShareEndpoint, constants.Sas.SharedKeyCredential, GetOptions())); Assert.IsTrue(directory4.CanGenerateSasUri); From c425976060bf2426415323d4ca13f64b616669d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20C=C3=A1rdenas?= Date: Mon, 15 Jul 2024 11:05:48 -0700 Subject: [PATCH 082/144] [Azure.Data.Tables] DeleteEntity overload (#44986) * overload method * Update API * Update samples * Update changelog * Fix error in parameter description --- sdk/tables/Azure.Data.Tables/CHANGELOG.md | 11 +++++ .../api/Azure.Data.Tables.netstandard2.0.cs | 2 + .../samples/Sample2CreateDeleteEntities.md | 7 +++ .../Azure.Data.Tables/src/TableClient.cs | 46 +++++++++++++++++++ .../src/TableTransactionActionType.cs | 4 +- .../samples/Sample2_CreateDeleteEntities.cs | 24 +++++++--- .../Sample2_CreateDeleteEntitiesAsync.cs | 3 ++ 7 files changed, 90 insertions(+), 7 deletions(-) diff --git a/sdk/tables/Azure.Data.Tables/CHANGELOG.md b/sdk/tables/Azure.Data.Tables/CHANGELOG.md index 60158b921fae7..8f987811ad61a 100644 --- a/sdk/tables/Azure.Data.Tables/CHANGELOG.md +++ b/sdk/tables/Azure.Data.Tables/CHANGELOG.md @@ -1,5 +1,16 @@ # Release History +## 12.8.4 + +### Features Added +- Overload the `DeleteEntity` method to allow an `ITableEntity` object as parameter. + +### Breaking Changes + +### Bugs Fixed + +### Other changes + ## 12.9.0-beta.1 (Unreleased) ### Features Added diff --git a/sdk/tables/Azure.Data.Tables/api/Azure.Data.Tables.netstandard2.0.cs b/sdk/tables/Azure.Data.Tables/api/Azure.Data.Tables.netstandard2.0.cs index 220d2f4d71c7f..556936064b8b3 100644 --- a/sdk/tables/Azure.Data.Tables/api/Azure.Data.Tables.netstandard2.0.cs +++ b/sdk/tables/Azure.Data.Tables/api/Azure.Data.Tables.netstandard2.0.cs @@ -30,7 +30,9 @@ public TableClient(System.Uri endpoint, string tableName, Azure.Data.Tables.Tabl public static string CreateQueryFilter(System.Linq.Expressions.Expression> filter) { throw null; } public virtual Azure.Response Delete(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response DeleteEntity(Azure.Data.Tables.ITableEntity entity, Azure.ETag ifMatch = default(Azure.ETag), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response DeleteEntity(string partitionKey, string rowKey, Azure.ETag ifMatch = default(Azure.ETag), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteEntityAsync(Azure.Data.Tables.ITableEntity entity, Azure.ETag ifMatch = default(Azure.ETag), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteEntityAsync(string partitionKey, string rowKey, Azure.ETag ifMatch = default(Azure.ETag), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Uri GenerateSasUri(Azure.Data.Tables.Sas.TableSasBuilder builder) { throw null; } public virtual System.Uri GenerateSasUri(Azure.Data.Tables.Sas.TableSasPermissions permissions, System.DateTimeOffset expiresOn) { throw null; } diff --git a/sdk/tables/Azure.Data.Tables/samples/Sample2CreateDeleteEntities.md b/sdk/tables/Azure.Data.Tables/samples/Sample2CreateDeleteEntities.md index 4725ba7191c93..ef81b37f0dda2 100644 --- a/sdk/tables/Azure.Data.Tables/samples/Sample2CreateDeleteEntities.md +++ b/sdk/tables/Azure.Data.Tables/samples/Sample2CreateDeleteEntities.md @@ -95,3 +95,10 @@ To delete an entity, invoke `DeleteEntity` and pass in its partition and row key // Delete the entity given the partition and row key. tableClient.DeleteEntity(partitionKey, rowKey); ``` + +Alternatively, you can pass a `TableEntity`object. + +```C# Snippet:TablesSample2DeleteEntityUsingObject +// Delete an entity given a TableEntity object +tableClient.DeleteEntity(tableEntity); +``` diff --git a/sdk/tables/Azure.Data.Tables/src/TableClient.cs b/sdk/tables/Azure.Data.Tables/src/TableClient.cs index b1cd3bce1f1a4..e419daaa295b6 100644 --- a/sdk/tables/Azure.Data.Tables/src/TableClient.cs +++ b/sdk/tables/Azure.Data.Tables/src/TableClient.cs @@ -1297,6 +1297,31 @@ public virtual async Task DeleteEntityAsync( CancellationToken cancellationToken = default) => await DeleteEntityInternal(true, partitionKey, rowKey, ifMatch, cancellationToken).ConfigureAwait(false); + /// + /// Deletes the specified table entity. + /// + /// Note: This method should not fail because the entity does not exist, however if delete operations are submitted in a , the transaction will fail if the entity does not exist. + /// The table entity to delete. + /// + /// The If-Match value to be used for optimistic concurrency. + /// If is specified, the operation will be executed unconditionally. + /// If the value is specified, the operation will fail with a status of 412 (Precondition Failed) + /// if the value of the entity in the table does not match. + /// The default is to delete unconditionally. + /// + /// A controlling the request lifetime. + /// The server returned an error. See for details returned from the server. + /// The indicating the result of the operation. + + public virtual async Task DeleteEntityAsync( + ITableEntity entity, + ETag ifMatch = default, + CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(entity, nameof(entity)); + return await DeleteEntityInternal(true, entity.PartitionKey, entity.RowKey, ifMatch, cancellationToken).ConfigureAwait(false); + } + /// /// Deletes the specified table entity. /// @@ -1316,6 +1341,27 @@ public virtual async Task DeleteEntityAsync( public virtual Response DeleteEntity(string partitionKey, string rowKey, ETag ifMatch = default, CancellationToken cancellationToken = default) => DeleteEntityInternal(false, partitionKey, rowKey, ifMatch, cancellationToken).EnsureCompleted(); + /// + /// Deletes the specified table entity. + /// + /// Note: This method should not fail because the entity does not exist, however if delete operations are submitted in a , the transaction will fail if the entity does not exist. + /// The table entity to delete. + /// + /// The If-Match value to be used for optimistic concurrency. + /// If is specified, the operation will be executed unconditionally. + /// If the value is specified, the operation will fail with a status of 412 (Precondition Failed) + /// if the value of the entity in the table does not match. + /// The default is to delete unconditionally. + /// + /// A controlling the request lifetime. + /// The server returned an error. See for details returned from the server. + /// The indicating the result of the operation. + public virtual Response DeleteEntity(ITableEntity entity, ETag ifMatch = default, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(entity, nameof(entity)); + return DeleteEntityInternal(false, entity.PartitionKey, entity.RowKey, ifMatch, cancellationToken).EnsureCompleted(); + } + internal async Task DeleteEntityInternal( bool async, string partitionKey, diff --git a/sdk/tables/Azure.Data.Tables/src/TableTransactionActionType.cs b/sdk/tables/Azure.Data.Tables/src/TableTransactionActionType.cs index 743381e1bff1f..d3bdb38fd22da 100644 --- a/sdk/tables/Azure.Data.Tables/src/TableTransactionActionType.cs +++ b/sdk/tables/Azure.Data.Tables/src/TableTransactionActionType.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using System.Threading; + namespace Azure.Data.Tables { /// @@ -21,7 +23,7 @@ public enum TableTransactionActionType /// UpdateReplace, /// - /// Delete the entity. This is equivalent to + /// Delete the entity. This is equivalent to /// Delete, /// diff --git a/sdk/tables/Azure.Data.Tables/tests/samples/Sample2_CreateDeleteEntities.cs b/sdk/tables/Azure.Data.Tables/tests/samples/Sample2_CreateDeleteEntities.cs index 24467f0fa2cc7..4034f9af72da9 100644 --- a/sdk/tables/Azure.Data.Tables/tests/samples/Sample2_CreateDeleteEntities.cs +++ b/sdk/tables/Azure.Data.Tables/tests/samples/Sample2_CreateDeleteEntities.cs @@ -5,13 +5,15 @@ using Azure.Core.TestFramework; using NUnit.Framework; using Azure.Data.Tables.Tests; +using System.Xml; namespace Azure.Data.Tables.Samples { public partial class TablesSamples : TablesTestEnvironment { - [Test] - public void CreateDeleteEntity() + [TestCase(true)] + [TestCase(false)] + public void CreateDeleteEntity(bool useEntity) { string storageUri = StorageUri; string accountName = StorageAccountName; @@ -95,10 +97,20 @@ public void CreateDeleteEntity() Console.WriteLine($"{marker.PartitionKey}, {marker.RowKey}, {marker.Product}, {marker.Price}, {marker.Quantity}"); #endregion - #region Snippet:TablesSample2DeleteEntity - // Delete the entity given the partition and row key. - tableClient.DeleteEntity(partitionKey, rowKey); - #endregion + if (useEntity) + { + #region Snippet:TablesSample2DeleteEntity + // Delete the entity given the partition and row key. + tableClient.DeleteEntity(partitionKey, rowKey); + #endregion + } + else + { + #region Snippet:TablesSample2DeleteEntityUsingObject + // Delete an entity given a TableEntity object + tableClient.DeleteEntity(tableEntity); + #endregion + } tableClient.Delete(); } diff --git a/sdk/tables/Azure.Data.Tables/tests/samples/Sample2_CreateDeleteEntitiesAsync.cs b/sdk/tables/Azure.Data.Tables/tests/samples/Sample2_CreateDeleteEntitiesAsync.cs index f074a7ff9d878..c2d7365fefc18 100644 --- a/sdk/tables/Azure.Data.Tables/tests/samples/Sample2_CreateDeleteEntitiesAsync.cs +++ b/sdk/tables/Azure.Data.Tables/tests/samples/Sample2_CreateDeleteEntitiesAsync.cs @@ -61,6 +61,9 @@ public async Task CreateDeleteEntitiesAsync() // Delete the entity given the partition and row key. await client.DeleteEntityAsync(partitionKey, rowKey); + + // Delete the strong entity given the entity object. + await client.DeleteEntityAsync(strongEntity); await client.DeleteAsync(); } From a250e77054e0d5c1f5e539dcd53c902ad3d35159 Mon Sep 17 00:00:00 2001 From: Madalyn Redding <66138537+m-redding@users.noreply.github.com> Date: Mon, 15 Jul 2024 14:29:35 -0400 Subject: [PATCH 083/144] [Schema Registry] Default SchemaFormat to the Content-Type header value (#45007) * fixes * fixes * clean up client --- .../src/ContentType.cs | 58 ------------------- .../src/Generated/SchemaRegistryClient.cs | 28 ++++----- .../src/SchemaFormat.cs | 39 +++++++------ .../src/SchemaRegistryClient.cs | 8 +-- .../tests/SchemaFormatTests.cs | 36 ++++++++++-- 5 files changed, 70 insertions(+), 99 deletions(-) delete mode 100644 sdk/schemaregistry/Azure.Data.SchemaRegistry/src/ContentType.cs diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/ContentType.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/ContentType.cs deleted file mode 100644 index 70d53c6aa38e9..0000000000000 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/ContentType.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.ComponentModel; - -namespace Azure.Data.SchemaRegistry -{ - /// The SerializationType. - internal readonly partial struct ContentType : IEquatable - { - private const string AvroValue = "application/json; serialization=Avro"; - private const string JsonValue = "application/json; serialization=json"; - private const string CustomValue = "text/plain; charset=utf-8"; - private const string ProtobufValue = "text/vnd.ms.protobuf"; - - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ContentType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - /// application/json; serialization=Avro. - public static ContentType Avro { get; } = new ContentType(AvroValue); - - /// application/json; serialization=json. - public static ContentType Json { get; } = new ContentType(JsonValue); - - /// text/plain; charset=utf-8. - public static ContentType Custom { get; } = new ContentType(CustomValue); - - ///// text/vnd.ms.protobuf. - //[CodeGenMember("TextVndMsProtobuf")] - //public static ContentType Protobuf { get; } = new ContentType(ProtobufValue); - - /// Determines if two values are the same. - public static bool operator ==(ContentType left, ContentType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ContentType left, ContentType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ContentType(string value) => new ContentType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ContentType other && Equals(other); - /// - public bool Equals(ContentType 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/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/SchemaRegistryClient.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/SchemaRegistryClient.cs index 09f5d7667091f..c0025b3094b96 100644 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/SchemaRegistryClient.cs +++ b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/Generated/SchemaRegistryClient.cs @@ -267,7 +267,7 @@ internal virtual Response GetSchemaByVersion(string groupName, string schemaName /// , or is null. /// or is an empty string, and was expected to be non-empty. /// Gets the properties referencing an existing schema within the specified schema group, as matched by schema content comparison. - internal virtual async Task GetSchemaPropertiesByContentAsync(string groupName, string schemaName, BinaryData schemaContent, Core.ContentType contentType, CancellationToken cancellationToken = default) + internal virtual async Task GetSchemaPropertiesByContentAsync(string groupName, string schemaName, BinaryData schemaContent, ContentType contentType, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); @@ -288,7 +288,7 @@ internal virtual async Task GetSchemaPropertiesByContentAsync(string g /// , or is null. /// or is an empty string, and was expected to be non-empty. /// Gets the properties referencing an existing schema within the specified schema group, as matched by schema content comparison. - internal virtual Response GetSchemaPropertiesByContent(string groupName, string schemaName, BinaryData schemaContent, Core.ContentType contentType, CancellationToken cancellationToken = default) + internal virtual Response GetSchemaPropertiesByContent(string groupName, string schemaName, BinaryData schemaContent, ContentType contentType, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); @@ -310,7 +310,7 @@ internal virtual Response GetSchemaPropertiesByContent(string groupName, string /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -324,7 +324,7 @@ internal virtual Response GetSchemaPropertiesByContent(string groupName, string /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - internal virtual async Task GetSchemaPropertiesByContentAsync(string groupName, string schemaName, RequestContent content, Core.ContentType contentType, RequestContext context = null) + internal virtual async Task GetSchemaPropertiesByContentAsync(string groupName, string schemaName, RequestContent content, ContentType contentType, RequestContext context = null) { Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); @@ -354,7 +354,7 @@ internal virtual async Task GetSchemaPropertiesByContentAsync(string g /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -368,7 +368,7 @@ internal virtual async Task GetSchemaPropertiesByContentAsync(string g /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - internal virtual Response GetSchemaPropertiesByContent(string groupName, string schemaName, RequestContent content, Core.ContentType contentType, RequestContext context = null) + internal virtual Response GetSchemaPropertiesByContent(string groupName, string schemaName, RequestContent content, ContentType contentType, RequestContext context = null) { Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); @@ -397,7 +397,7 @@ internal virtual Response GetSchemaPropertiesByContent(string groupName, string /// , or is null. /// or is an empty string, and was expected to be non-empty. /// Register new schema. If schema of specified name does not exist in specified group, schema is created at version 1. If schema of specified name exists already in specified group, schema is created at latest version + 1. - internal virtual async Task RegisterSchemaAsync(string groupName, string schemaName, BinaryData schemaContent, Core.ContentType contentType, CancellationToken cancellationToken = default) + internal virtual async Task RegisterSchemaAsync(string groupName, string schemaName, BinaryData schemaContent, ContentType contentType, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); @@ -418,7 +418,7 @@ internal virtual async Task RegisterSchemaAsync(string groupName, stri /// , or is null. /// or is an empty string, and was expected to be non-empty. /// Register new schema. If schema of specified name does not exist in specified group, schema is created at version 1. If schema of specified name exists already in specified group, schema is created at latest version + 1. - internal virtual Response RegisterSchema(string groupName, string schemaName, BinaryData schemaContent, Core.ContentType contentType, CancellationToken cancellationToken = default) + internal virtual Response RegisterSchema(string groupName, string schemaName, BinaryData schemaContent, ContentType contentType, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); @@ -440,7 +440,7 @@ internal virtual Response RegisterSchema(string groupName, string schemaName, Bi /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -454,7 +454,7 @@ internal virtual Response RegisterSchema(string groupName, string schemaName, Bi /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - internal virtual async Task RegisterSchemaAsync(string groupName, string schemaName, RequestContent content, Core.ContentType contentType, RequestContext context = null) + internal virtual async Task RegisterSchemaAsync(string groupName, string schemaName, RequestContent content, ContentType contentType, RequestContext context = null) { Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); @@ -484,7 +484,7 @@ internal virtual async Task RegisterSchemaAsync(string groupName, stri /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -498,7 +498,7 @@ internal virtual async Task RegisterSchemaAsync(string groupName, stri /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - internal virtual Response RegisterSchema(string groupName, string schemaName, RequestContent content, Core.ContentType contentType, RequestContext context = null) + internal virtual Response RegisterSchema(string groupName, string schemaName, RequestContent content, ContentType contentType, RequestContext context = null) { Argument.AssertNotNullOrEmpty(groupName, nameof(groupName)); Argument.AssertNotNullOrEmpty(schemaName, nameof(schemaName)); @@ -760,7 +760,7 @@ internal HttpMessage CreateGetSchemaByVersionRequest(string groupName, string sc return message; } - internal HttpMessage CreateGetSchemaPropertiesByContentRequest(string groupName, string schemaName, RequestContent content, Core.ContentType contentType, RequestContext context) + internal HttpMessage CreateGetSchemaPropertiesByContentRequest(string groupName, string schemaName, RequestContent content, ContentType contentType, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier204); var request = message.Request; @@ -781,7 +781,7 @@ internal HttpMessage CreateGetSchemaPropertiesByContentRequest(string groupName, return message; } - internal HttpMessage CreateRegisterSchemaRequest(string groupName, string schemaName, RequestContent content, Core.ContentType contentType, RequestContext context) + internal HttpMessage CreateRegisterSchemaRequest(string groupName, string schemaName, RequestContent content, ContentType contentType, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier204); var request = message.Request; diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/SchemaFormat.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/SchemaFormat.cs index 03ba90fa7f16e..9617295b5e368 100644 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/SchemaFormat.cs +++ b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/SchemaFormat.cs @@ -3,6 +3,7 @@ using System; using System.ComponentModel; +using Azure.Core; namespace Azure.Data.SchemaRegistry { @@ -16,9 +17,16 @@ namespace Azure.Data.SchemaRegistry private const string CustomValue = "Custom"; private const string ProtobufValue = "Protobuf"; - private const string AvroContentType = "Avro"; - private const string JsonContentType = "Json"; - private const string ProtobufContentType = "vnd.ms.protobuf"; + // Temporary until autorest bug is fixed + private const string AvroContentType = "application/json; serialization=Avro"; + private const string JsonContentType = "application/json; serialization=Json"; + private const string CustomContentType = "text/plain; charset=utf-8"; + private const string ProtobufContentType = "text/vnd.ms.protobuf"; + + private const string AvroContentTypeValue = "Avro"; + private const string JsonContentTypeValue = "Json"; + private const string CustomContentTypeValue = "utf-8"; + private const string ProtobufContentTypeValue = "vnd.ms.protobuf"; /// Initializes a new instance of . /// is null. @@ -63,37 +71,34 @@ internal ContentType ToContentType() switch (_value) { case AvroValue: - return ContentType.Avro; + return new ContentType(AvroContentType); case JsonValue: - return ContentType.Json; + return new ContentType(JsonContentType); //case ProtobufValue: - // return ContentType.Protobuf; + // return new ContentType(ProtobufContentType); default: - return ContentType.Custom; + return new ContentType(CustomContentType); } } internal static SchemaFormat FromContentType(string contentTypeValue) { var contentTypeParameterValue = contentTypeValue.Split('='); - var contentSubType = contentTypeValue.Split('/'); if (contentTypeParameterValue.Length > 1) { switch (contentTypeParameterValue[1]) { - case AvroContentType: - return SchemaFormat.Avro; - case JsonContentType: - return SchemaFormat.Json; + case AvroContentTypeValue: + return Avro; + case JsonContentTypeValue: + return Json; + case CustomContentTypeValue: + return Custom; default: break; } } - return contentSubType[1] switch - { - //ProtobufContentType => SchemaFormat.Protobuf, - _ => SchemaFormat.Custom, - }; + return new SchemaFormat(contentTypeValue); } } } diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/SchemaRegistryClient.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/SchemaRegistryClient.cs index 7149b2aaa0b62..88e76bf40cd8d 100644 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/SchemaRegistryClient.cs +++ b/sdk/schemaregistry/Azure.Data.SchemaRegistry/src/SchemaRegistryClient.cs @@ -133,11 +133,11 @@ private async Task> RegisterSchemaInternalAsync( Response response; if (async) { - response = await RegisterSchemaAsync(groupName, schemaName, new BinaryData(schemaDefinition), new Core.ContentType(format.ToContentType().ToString()), cancellationToken).ConfigureAwait(false); + response = await RegisterSchemaAsync(groupName, schemaName, new BinaryData(schemaDefinition), format.ToContentType(), cancellationToken).ConfigureAwait(false); } else { - response = RegisterSchema(groupName, schemaName, new BinaryData(schemaDefinition), new Core.ContentType(format.ToContentType().ToString()), cancellationToken); + response = RegisterSchema(groupName, schemaName, new BinaryData(schemaDefinition), format.ToContentType(), cancellationToken); } var schemaIdHeader = response.Headers.TryGetValue("Schema-Id", out string idHeader) ? idHeader : null; @@ -210,11 +210,11 @@ private async Task> GetSchemaPropertiesInternalAsync( Response response; if (async) { - response = await GetSchemaPropertiesByContentAsync(groupName, schemaName, new BinaryData(schemaDefinition), new Core.ContentType(format.ToContentType().ToString()), cancellationToken).ConfigureAwait(false); + response = await GetSchemaPropertiesByContentAsync(groupName, schemaName, new BinaryData(schemaDefinition), format.ToContentType().ToString(), cancellationToken).ConfigureAwait(false); } else { - response = GetSchemaPropertiesByContent(groupName, schemaName, new BinaryData(schemaDefinition), new Core.ContentType(format.ToContentType().ToString()), cancellationToken); + response = GetSchemaPropertiesByContent(groupName, schemaName, new BinaryData(schemaDefinition), format.ToContentType(), cancellationToken); } var schemaIdHeader = response.Headers.TryGetValue("Schema-Id", out string idHeader) ? idHeader : null; diff --git a/sdk/schemaregistry/Azure.Data.SchemaRegistry/tests/SchemaFormatTests.cs b/sdk/schemaregistry/Azure.Data.SchemaRegistry/tests/SchemaFormatTests.cs index fe348c5e0f4bc..db21edd9bdd4f 100644 --- a/sdk/schemaregistry/Azure.Data.SchemaRegistry/tests/SchemaFormatTests.cs +++ b/sdk/schemaregistry/Azure.Data.SchemaRegistry/tests/SchemaFormatTests.cs @@ -8,6 +8,11 @@ namespace Azure.Data.SchemaRegistry.Tests { public class SchemaFormatTests { + private const string AvroContentType = "application/json; serialization=Avro"; + private const string JsonContentType = "application/json; serialization=Json"; + private const string CustomContentType = "text/plain; charset=utf-8"; + private const string ProtobufContentType = "text/vnd.ms.protobuf"; + [Test] public void VerifyAvroFormat() { @@ -26,6 +31,12 @@ public void VerifyCustomFormat() Assert.AreEqual("Custom", SchemaFormat.Custom.ToString()); } + [Test] + public void VerifyDefault() + { + Assert.AreEqual("MyValue", (new SchemaFormat("MyValue")).ToString()); + } + //[Test] //public void VerifyProtobufFormat() //{ @@ -35,19 +46,25 @@ public void VerifyCustomFormat() [Test] public void VerifyAvroToContentType() { - Assert.AreEqual(ContentType.Avro, SchemaFormat.Avro.ToContentType()); + Assert.AreEqual(AvroContentType, SchemaFormat.Avro.ToContentType()); } [Test] public void VerifyJsonToContentType() { - Assert.AreEqual(ContentType.Json, SchemaFormat.Json.ToContentType()); + Assert.AreEqual(JsonContentType, SchemaFormat.Json.ToContentType()); } [Test] public void VerifyCustomToContentType() { - Assert.AreEqual(ContentType.Custom, SchemaFormat.Custom.ToContentType()); + Assert.AreEqual(CustomContentType, SchemaFormat.Custom.ToContentType()); + } + + [Test] + public void VerifyDefaultToContentType() + { + Assert.AreEqual(CustomContentType, (new SchemaFormat("MyValue")).ToContentType()); } //[Test] @@ -59,24 +76,31 @@ public void VerifyCustomToContentType() [Test] public void VerifyAvroFromContentType() { - var fromContentType = SchemaFormat.FromContentType("application/json; serialization=Avro"); + var fromContentType = SchemaFormat.FromContentType(AvroContentType); Assert.AreEqual(SchemaFormat.Avro, fromContentType); } [Test] public void VerifyJsonFromContentType() { - var fromContentType = SchemaFormat.FromContentType("application/json; serialization=Json"); + var fromContentType = SchemaFormat.FromContentType(JsonContentType); Assert.AreEqual(SchemaFormat.Json, fromContentType); } [Test] public void VerifyCustomFromContentType() { - var fromContentType = SchemaFormat.FromContentType("text/plain; charset=utf-8"); + var fromContentType = SchemaFormat.FromContentType(CustomContentType); Assert.AreEqual(SchemaFormat.Custom, fromContentType); } + [Test] + public void VerifyDefaultFromContentType() + { + var fromContentType = SchemaFormat.FromContentType("MyValue"); + Assert.AreEqual(new SchemaFormat("MyValue"), fromContentType); + } + //[Test] //public void VerifyProtobufFromContentType() //{ From bcb978483bf9c6c26613643abdf32207da254adf Mon Sep 17 00:00:00 2001 From: James Suplizio Date: Mon, 15 Jul 2024 11:36:43 -0700 Subject: [PATCH 084/144] Add Update Remove-Item command line options (#45010) --- doc/ApiDocGeneration/Generate-Api-Docs.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/ApiDocGeneration/Generate-Api-Docs.ps1 b/doc/ApiDocGeneration/Generate-Api-Docs.ps1 index be6bd0cb083c6..57f4823b4b0ca 100644 --- a/doc/ApiDocGeneration/Generate-Api-Docs.ps1 +++ b/doc/ApiDocGeneration/Generate-Api-Docs.ps1 @@ -140,7 +140,7 @@ if ($LibType -eq 'client') { } Write-Verbose "Remove all unneeded artifacts from build output directory" -Remove-Item –Path "${ApiDir}/*" -Include * -Exclude "${ArtifactName}.dll", "${ArtifactName}.xml" +Remove-Item –Path "${ApiDir}/*" -Include * -Exclude "${ArtifactName}.dll", "${ArtifactName}.xml" -Recurse -Force Write-Verbose "Initialize Frameworks File" & "${MDocTool}" fx-bootstrap "${FrameworkDir}" From 502cf897233aa2906870b19f94010f6fa6188700 Mon Sep 17 00:00:00 2001 From: Timothy Mothra Date: Mon, 15 Jul 2024 13:37:17 -0700 Subject: [PATCH 085/144] update integration test with CategoryName (#44989) --- .../DistroWebAppLiveTests.cs | 20 +- .../DistroWebAppLiveTests/VerifyDistro.json | 96 ++++---- ...oTwoResources_UsingDistroWithExporter.json | 198 ++++++++--------- ...fySendingToTwoResources_UsingExporter.json | 206 +++++++++--------- .../TelemetryValidationHelper.cs | 1 + 5 files changed, 265 insertions(+), 256 deletions(-) diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/tests/Azure.Monitor.OpenTelemetry.AspNetCore.Integration.Tests/DistroWebAppLiveTests.cs b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/tests/Azure.Monitor.OpenTelemetry.AspNetCore.Integration.Tests/DistroWebAppLiveTests.cs index 0198b4501bf5b..99494f0e375a9 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/tests/Azure.Monitor.OpenTelemetry.AspNetCore.Integration.Tests/DistroWebAppLiveTests.cs +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/tests/Azure.Monitor.OpenTelemetry.AspNetCore.Integration.Tests/DistroWebAppLiveTests.cs @@ -41,6 +41,7 @@ public class DistroWebAppLiveTests : BaseLiveTest { "service.version", TestServiceVersion } }; + private const string TestLogCategoryName = "CustomCategoryName"; private const string TestLogMessage = "Message via ILogger"; // DEVELOPER TIP: Can pass RecordedTestMode.Live into the base ctor to run this test with a live resource. This is recommended for local development. @@ -65,9 +66,10 @@ public async Task VerifyDistro() .ConfigureResource(x => x.AddAttributes(_testResourceAttributes)); using var app = builder.Build(); - app.MapGet("/", () => + app.MapGet("/", (ILoggerFactory loggerFactory) => { - app.Logger.LogInformation(TestLogMessage); + var logger = loggerFactory.CreateLogger(TestLogCategoryName); + logger.LogInformation(TestLogMessage); return "Response from Test Server"; }); @@ -146,9 +148,10 @@ public async Task VerifySendingToTwoResources_UsingExporter() .ConfigureResource(x => x.AddAttributes(_testResourceAttributes)); using var app = builder.Build(); - app.MapGet("/", () => + app.MapGet("/", (ILoggerFactory loggerFactory) => { - app.Logger.LogInformation(TestLogMessage); + var logger = loggerFactory.CreateLogger(TestLogCategoryName); + logger.LogInformation(TestLogMessage); return "Response from Test Server"; }); @@ -206,9 +209,10 @@ public async Task VerifySendingToTwoResources_UsingDistroWithExporter() .ConfigureResource(x => x.AddAttributes(_testResourceAttributes)); using var app = builder.Build(); - app.MapGet("/", () => + app.MapGet("/", (ILoggerFactory loggerFactory) => { - app.Logger.LogInformation(TestLogMessage); + var logger = loggerFactory.CreateLogger(TestLogCategoryName); + logger.LogInformation(TestLogMessage); return "Response from Test Server"; }); @@ -363,6 +367,10 @@ await QueryAndVerifyTrace( ClientIP = "0.0.0.0", Type = "AppTraces", AppRoleInstance = TestServiceInstance, + Properties = new List> + { + new("CategoryName", TestLogCategoryName), + } }); } diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/tests/Azure.Monitor.OpenTelemetry.AspNetCore.Integration.Tests/SessionRecords/DistroWebAppLiveTests/VerifyDistro.json b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/tests/Azure.Monitor.OpenTelemetry.AspNetCore.Integration.Tests/SessionRecords/DistroWebAppLiveTests/VerifyDistro.json index c4f4ddd313c00..4481abbaf9905 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/tests/Azure.Monitor.OpenTelemetry.AspNetCore.Integration.Tests/SessionRecords/DistroWebAppLiveTests/VerifyDistro.json +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/tests/Azure.Monitor.OpenTelemetry.AspNetCore.Integration.Tests/SessionRecords/DistroWebAppLiveTests/VerifyDistro.json @@ -8,7 +8,7 @@ "Authorization": "Sanitized", "Content-Length": "196", "Content-Type": "application/json", - "traceparent": "00-91e4d92f316e891834d49cbee90c5089-b23ab6cff2327111-00", + "traceparent": "00-39084d7e6c08a98e4650f7944ca58e4d-128354d4cbd0b0c5-00", "User-Agent": "azsdk-net-Monitor.Query/1.1.0 (.NET 7.0.20; Microsoft Windows 10.0.22631)", "x-ms-client-request-id": "Sanitized", "x-ms-return-client-request-id": "true" @@ -22,12 +22,12 @@ "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", "Connection": "keep-alive", - "Content-Length": "2509", + "Content-Length": "2510", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 20 Jun 2024 23:40:34 GMT", + "Date": "Fri, 12 Jul 2024 22:49:54 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-7b5b6f666d-cvqng", + "Via": "1.1 draft-oms-6474b844f8-m5hqw", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -203,21 +203,21 @@ "rows": [ [ "33d8a320-00c3-4ec8-a6a4-8692b07a6841", - "2024-06-20T23:38:07.6049141Z", - "ab1d314b41df92d4", + "2024-07-12T22:43:36.900795Z", + "b26e739d8ffb31d7", "localhost:9998", "HTTP", "GET /", "http://localhost:9998/", true, "200", - 3.2012, + 145.9972, "<250ms", "{\"CustomProperty1\":\"Value1\",\"_MS.ProcessedByMetricExtractors\":\"(Name: X,Ver:'1.1')\"}", null, "", - "49f75e59566d6ca854855deb28cdd910", - "49f75e59566d6ca854855deb28cdd910", + "88df56a070a8fa9ed7e6cb8405f0be62", + "88df56a070a8fa9ed7e6cb8405f0be62", "", "", "", @@ -236,7 +236,7 @@ "Other", "a98f261a-124b-425a-931e-8dc00af2e65c", "53e1f7f0-9975-4995-830a-414a26e9450a", - "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240620-d", + "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240712-d", 1, "", "", @@ -257,7 +257,7 @@ "Authorization": "Sanitized", "Content-Length": "191", "Content-Type": "application/json", - "traceparent": "00-e7dec5e978db5cd85fe10225207ca53e-23628ed99ff50bbe-00", + "traceparent": "00-bcbcdc220f0dc46ea52db25547f6303f-749971ae1336f3f6-00", "User-Agent": "azsdk-net-Monitor.Query/1.1.0 (.NET 7.0.20; Microsoft Windows 10.0.22631)", "x-ms-client-request-id": "Sanitized", "x-ms-return-client-request-id": "true" @@ -271,12 +271,12 @@ "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", "Connection": "keep-alive", - "Content-Length": "2478", + "Content-Length": "2479", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 20 Jun 2024 23:40:35 GMT", + "Date": "Fri, 12 Jul 2024 22:49:55 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-7b5b6f666d-hbzt8", + "Via": "1.1 draft-oms-6474b844f8-8jw8q", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -452,21 +452,21 @@ "rows": [ [ "33d8a320-00c3-4ec8-a6a4-8692b07a6841", - "2024-06-20T23:38:07.6069422Z", - "f59fc5d195101154", + "2024-07-12T22:43:36.9744069Z", + "6db4861ec0f7cedd", "", "GET /", "http://localhost:9998/", true, "200", - 1.0316, + 73.4357, "<250ms", - "{\"CustomProperty1\":\"Value1\",\"_MS.ProcessedByMetricExtractors\":\"(Name: X,Ver:'1.1')\"}", + "{\"_MS.ProcessedByMetricExtractors\":\"(Name: X,Ver:'1.1')\",\"CustomProperty1\":\"Value1\"}", null, "GET /", - "49f75e59566d6ca854855deb28cdd910", + "88df56a070a8fa9ed7e6cb8405f0be62", null, - "ab1d314b41df92d4", + "b26e739d8ffb31d7", "", "", "", @@ -485,7 +485,7 @@ "Other", "a98f261a-124b-425a-931e-8dc00af2e65c", "53e1f7f0-9975-4995-830a-414a26e9450a", - "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240620-d", + "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240712-d", 1, "", "", @@ -506,7 +506,7 @@ "Authorization": "Sanitized", "Content-Length": "270", "Content-Type": "application/json", - "traceparent": "00-d004d3534c1f9572811a03f4136b0be4-13bc094187e356e6-00", + "traceparent": "00-0016118a7d142d7803fdcdf21eb1a029-0d03fdd4f72151d5-00", "User-Agent": "azsdk-net-Monitor.Query/1.1.0 (.NET 7.0.20; Microsoft Windows 10.0.22631)", "x-ms-client-request-id": "Sanitized", "x-ms-return-client-request-id": "true" @@ -522,10 +522,10 @@ "Connection": "keep-alive", "Content-Length": "2132", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 20 Jun 2024 23:40:36 GMT", + "Date": "Fri, 12 Jul 2024 22:49:56 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-7b5b6f666d-2ndcs", + "Via": "1.1 draft-oms-6474b844f8-wm6g9", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -669,13 +669,13 @@ "rows": [ [ "33d8a320-00c3-4ec8-a6a4-8692b07a6841", - "2024-06-20T23:38:07.7470491Z", + "2024-07-12T22:43:37.2919595Z", "http.client.request.duration", 1, - 0.0032012, - 0.0032012, - 0.0032012, - "{\"http.request.method\":\"GET\",\"http.response.status_code\":\"200\",\"network.protocol.version\":\"1.1\",\"server.address\":\"localhost\",\"server.port\":\"9998\",\"url.scheme\":\"http\"}", + 0.1459972, + 0.1459972, + 0.1459972, + "{\"http.request.method\":\"GET\",\"http.response.status_code\":\"200\",\"network.protocol.version\":\"1.1\",\"url.scheme\":\"http\",\"server.address\":\"localhost\",\"server.port\":\"9998\"}", "", "", "", @@ -697,7 +697,7 @@ "Other", "a98f261a-124b-425a-931e-8dc00af2e65c", "53e1f7f0-9975-4995-830a-414a26e9450a", - "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240620-d", + "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240712-d", "Azure", "AppMetrics", "/subscriptions/65b2f83e-7bf1-4be3-bafc-3a4163265a52/resourcegroups/tileetest06201346/providers/microsoft.insights/components/te3fca6a3c26958b8-ai-1" @@ -715,7 +715,7 @@ "Authorization": "Sanitized", "Content-Length": "197", "Content-Type": "application/json", - "traceparent": "00-97130055a95be55ee769ca1921b9fe80-bfa8201509ec52c9-00", + "traceparent": "00-8f31c80b660885bc5768137d884d9434-80726cb90013c743-00", "User-Agent": "azsdk-net-Monitor.Query/1.1.0 (.NET 7.0.20; Microsoft Windows 10.0.22631)", "x-ms-client-request-id": "Sanitized", "x-ms-return-client-request-id": "true" @@ -731,10 +731,10 @@ "Connection": "keep-alive", "Content-Length": "2095", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 20 Jun 2024 23:40:36 GMT", + "Date": "Fri, 12 Jul 2024 22:49:57 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-7b5b6f666d-2mmkv", + "Via": "1.1 draft-oms-6474b844f8-rs48d", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -878,12 +878,12 @@ "rows": [ [ "33d8a320-00c3-4ec8-a6a4-8692b07a6841", - "2024-06-20T23:38:07.7470476Z", + "2024-07-12T22:43:37.2919001Z", "http.server.request.duration", 1, - 0.0010316, - 0.0010316, - 0.0010316, + 0.0734357, + 0.0734357, + 0.0734357, "{\"http.request.method\":\"GET\",\"http.response.status_code\":\"200\",\"http.route\":\"/\",\"network.protocol.version\":\"1.1\",\"url.scheme\":\"http\"}", "", "", @@ -906,7 +906,7 @@ "Other", "a98f261a-124b-425a-931e-8dc00af2e65c", "53e1f7f0-9975-4995-830a-414a26e9450a", - "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240620-d", + "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240712-d", "Azure", "AppMetrics", "/subscriptions/65b2f83e-7bf1-4be3-bafc-3a4163265a52/resourcegroups/tileetest06201346/providers/microsoft.insights/components/te3fca6a3c26958b8-ai-1" @@ -924,7 +924,7 @@ "Authorization": "Sanitized", "Content-Length": "190", "Content-Type": "application/json", - "traceparent": "00-4616a7a123b4b8c65808030089bff917-46e2955ad7d2c952-00", + "traceparent": "00-6b3485882c81bb860d803ea604ca83a0-4e29cfb9c77cfec8-00", "User-Agent": "azsdk-net-Monitor.Query/1.1.0 (.NET 7.0.20; Microsoft Windows 10.0.22631)", "x-ms-client-request-id": "Sanitized", "x-ms-return-client-request-id": "true" @@ -938,12 +938,12 @@ "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", "Connection": "keep-alive", - "Content-Length": "2046", + "Content-Length": "2085", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 20 Jun 2024 23:40:37 GMT", + "Date": "Fri, 12 Jul 2024 22:49:57 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-7b5b6f666d-dm6qg", + "Via": "1.1 draft-oms-6474b844f8-7srrx", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -1091,14 +1091,14 @@ "rows": [ [ "33d8a320-00c3-4ec8-a6a4-8692b07a6841", - "2024-06-20T23:38:07.6078709Z", + "2024-07-12T22:43:37.0354416Z", "Message via ILogger", 1, - null, + "{\"CategoryName\":\"CustomCategoryName\"}", null, "", - "49f75e59566d6ca854855deb28cdd910", - "f59fc5d195101154", + "88df56a070a8fa9ed7e6cb8405f0be62", + "6db4861ec0f7cedd", "", "", "", @@ -1117,7 +1117,7 @@ "Other", "a98f261a-124b-425a-931e-8dc00af2e65c", "53e1f7f0-9975-4995-830a-414a26e9450a", - "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240620-d", + "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240712-d", 1, "", "", @@ -1134,7 +1134,7 @@ "Variables": { "CONNECTION_STRING": "InstrumentationKey=53e1f7f0-9975-4995-830a-414a26e9450a;IngestionEndpoint=https://westus-0.in.applicationinsights.azure.com/;LiveEndpoint=https://westus.livediagnostics.monitor.azure.com/;ApplicationId=a98f261a-124b-425a-931e-8dc00af2e65c", "LOGS_ENDPOINT": "https://api.loganalytics.io", - "RandomSeed": "189119610", + "RandomSeed": "1747479826", "WORKSPACE_ID": "33d8a320-00c3-4ec8-a6a4-8692b07a6841" } } diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/tests/Azure.Monitor.OpenTelemetry.AspNetCore.Integration.Tests/SessionRecords/DistroWebAppLiveTests/VerifySendingToTwoResources_UsingDistroWithExporter.json b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/tests/Azure.Monitor.OpenTelemetry.AspNetCore.Integration.Tests/SessionRecords/DistroWebAppLiveTests/VerifySendingToTwoResources_UsingDistroWithExporter.json index 38cf49b52eb7a..a9f1e2b4f3de8 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/tests/Azure.Monitor.OpenTelemetry.AspNetCore.Integration.Tests/SessionRecords/DistroWebAppLiveTests/VerifySendingToTwoResources_UsingDistroWithExporter.json +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/tests/Azure.Monitor.OpenTelemetry.AspNetCore.Integration.Tests/SessionRecords/DistroWebAppLiveTests/VerifySendingToTwoResources_UsingDistroWithExporter.json @@ -8,7 +8,7 @@ "Authorization": "Sanitized", "Content-Length": "196", "Content-Type": "application/json", - "traceparent": "00-cb98f5b02dc5f3ff84e7a32af28c5a7e-c6526cbe7179e642-00", + "traceparent": "00-b69f44f37f197bccaff1ba4a6e9dd105-2500c2ffda260f5d-00", "User-Agent": "azsdk-net-Monitor.Query/1.1.0 (.NET 7.0.20; Microsoft Windows 10.0.22631)", "x-ms-client-request-id": "Sanitized", "x-ms-return-client-request-id": "true" @@ -21,14 +21,14 @@ "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", - "Age": "4", + "Age": "5", "Connection": "keep-alive", - "Content-Length": "2509", + "Content-Length": "2510", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 20 Jun 2024 23:40:39 GMT", + "Date": "Fri, 12 Jul 2024 22:49:59 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-7b5b6f666d-rfz8k", + "Via": "1.1 draft-oms-6474b844f8-7gpj6", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -204,21 +204,21 @@ "rows": [ [ "33d8a320-00c3-4ec8-a6a4-8692b07a6841", - "2024-06-20T23:38:07.6049141Z", - "ab1d314b41df92d4", + "2024-07-12T22:43:36.900795Z", + "b26e739d8ffb31d7", "localhost:9998", "HTTP", "GET /", "http://localhost:9998/", true, "200", - 3.2012, + 145.9972, "<250ms", "{\"CustomProperty1\":\"Value1\",\"_MS.ProcessedByMetricExtractors\":\"(Name: X,Ver:'1.1')\"}", null, "", - "49f75e59566d6ca854855deb28cdd910", - "49f75e59566d6ca854855deb28cdd910", + "88df56a070a8fa9ed7e6cb8405f0be62", + "88df56a070a8fa9ed7e6cb8405f0be62", "", "", "", @@ -237,7 +237,7 @@ "Other", "a98f261a-124b-425a-931e-8dc00af2e65c", "53e1f7f0-9975-4995-830a-414a26e9450a", - "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240620-d", + "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240712-d", 1, "", "", @@ -258,7 +258,7 @@ "Authorization": "Sanitized", "Content-Length": "191", "Content-Type": "application/json", - "traceparent": "00-ccd62427e6ba884e3fe7273759a0dbf8-eea5ead633f9d41b-00", + "traceparent": "00-8182dd32813ba7ef98e34131c5de9f0b-e3442aede2a4e3cd-00", "User-Agent": "azsdk-net-Monitor.Query/1.1.0 (.NET 7.0.20; Microsoft Windows 10.0.22631)", "x-ms-client-request-id": "Sanitized", "x-ms-return-client-request-id": "true" @@ -271,14 +271,14 @@ "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", - "Age": "3", + "Age": "4", "Connection": "keep-alive", - "Content-Length": "2478", + "Content-Length": "2479", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 20 Jun 2024 23:40:39 GMT", + "Date": "Fri, 12 Jul 2024 22:49:59 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-7b5b6f666d-ndnlv", + "Via": "1.1 draft-oms-6474b844f8-pj9g5", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -454,21 +454,21 @@ "rows": [ [ "33d8a320-00c3-4ec8-a6a4-8692b07a6841", - "2024-06-20T23:38:07.6069422Z", - "f59fc5d195101154", + "2024-07-12T22:43:36.9744069Z", + "6db4861ec0f7cedd", "", "GET /", "http://localhost:9998/", true, "200", - 1.0316, + 73.4357, "<250ms", - "{\"CustomProperty1\":\"Value1\",\"_MS.ProcessedByMetricExtractors\":\"(Name: X,Ver:'1.1')\"}", + "{\"_MS.ProcessedByMetricExtractors\":\"(Name: X,Ver:'1.1')\",\"CustomProperty1\":\"Value1\"}", null, "GET /", - "49f75e59566d6ca854855deb28cdd910", + "88df56a070a8fa9ed7e6cb8405f0be62", null, - "ab1d314b41df92d4", + "b26e739d8ffb31d7", "", "", "", @@ -487,7 +487,7 @@ "Other", "a98f261a-124b-425a-931e-8dc00af2e65c", "53e1f7f0-9975-4995-830a-414a26e9450a", - "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240620-d", + "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240712-d", 1, "", "", @@ -508,7 +508,7 @@ "Authorization": "Sanitized", "Content-Length": "270", "Content-Type": "application/json", - "traceparent": "00-98a946b28bcc98a6daf0234460728dea-506f293be5e24bc9-00", + "traceparent": "00-affba1ad223668f2a7b5ba91abe2ec8f-17fa56057cc44ed7-00", "User-Agent": "azsdk-net-Monitor.Query/1.1.0 (.NET 7.0.20; Microsoft Windows 10.0.22631)", "x-ms-client-request-id": "Sanitized", "x-ms-return-client-request-id": "true" @@ -521,14 +521,14 @@ "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", - "Age": "2", + "Age": "3", "Connection": "keep-alive", "Content-Length": "2132", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 20 Jun 2024 23:40:39 GMT", + "Date": "Fri, 12 Jul 2024 22:49:59 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-7b5b6f666d-kf5sl", + "Via": "1.1 draft-oms-6474b844f8-cs2x7", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -672,13 +672,13 @@ "rows": [ [ "33d8a320-00c3-4ec8-a6a4-8692b07a6841", - "2024-06-20T23:38:07.7470491Z", + "2024-07-12T22:43:37.2919595Z", "http.client.request.duration", 1, - 0.0032012, - 0.0032012, - 0.0032012, - "{\"http.request.method\":\"GET\",\"http.response.status_code\":\"200\",\"network.protocol.version\":\"1.1\",\"server.address\":\"localhost\",\"server.port\":\"9998\",\"url.scheme\":\"http\"}", + 0.1459972, + 0.1459972, + 0.1459972, + "{\"http.request.method\":\"GET\",\"http.response.status_code\":\"200\",\"network.protocol.version\":\"1.1\",\"url.scheme\":\"http\",\"server.address\":\"localhost\",\"server.port\":\"9998\"}", "", "", "", @@ -700,7 +700,7 @@ "Other", "a98f261a-124b-425a-931e-8dc00af2e65c", "53e1f7f0-9975-4995-830a-414a26e9450a", - "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240620-d", + "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240712-d", "Azure", "AppMetrics", "/subscriptions/65b2f83e-7bf1-4be3-bafc-3a4163265a52/resourcegroups/tileetest06201346/providers/microsoft.insights/components/te3fca6a3c26958b8-ai-1" @@ -718,7 +718,7 @@ "Authorization": "Sanitized", "Content-Length": "197", "Content-Type": "application/json", - "traceparent": "00-9c590aea153faa849bad30b0b38e3a06-4d5b141cf259fcdb-00", + "traceparent": "00-35a3022b31342ab3093d0a1b9b0ebfc0-e2c9f91f6928ea10-00", "User-Agent": "azsdk-net-Monitor.Query/1.1.0 (.NET 7.0.20; Microsoft Windows 10.0.22631)", "x-ms-client-request-id": "Sanitized", "x-ms-return-client-request-id": "true" @@ -735,10 +735,10 @@ "Connection": "keep-alive", "Content-Length": "2095", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 20 Jun 2024 23:40:39 GMT", + "Date": "Fri, 12 Jul 2024 22:49:59 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-7b5b6f666d-4dbzq", + "Via": "1.1 draft-oms-6474b844f8-64qp5", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -882,12 +882,12 @@ "rows": [ [ "33d8a320-00c3-4ec8-a6a4-8692b07a6841", - "2024-06-20T23:38:07.7470476Z", + "2024-07-12T22:43:37.2919001Z", "http.server.request.duration", 1, - 0.0010316, - 0.0010316, - 0.0010316, + 0.0734357, + 0.0734357, + 0.0734357, "{\"http.request.method\":\"GET\",\"http.response.status_code\":\"200\",\"http.route\":\"/\",\"network.protocol.version\":\"1.1\",\"url.scheme\":\"http\"}", "", "", @@ -910,7 +910,7 @@ "Other", "a98f261a-124b-425a-931e-8dc00af2e65c", "53e1f7f0-9975-4995-830a-414a26e9450a", - "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240620-d", + "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240712-d", "Azure", "AppMetrics", "/subscriptions/65b2f83e-7bf1-4be3-bafc-3a4163265a52/resourcegroups/tileetest06201346/providers/microsoft.insights/components/te3fca6a3c26958b8-ai-1" @@ -928,7 +928,7 @@ "Authorization": "Sanitized", "Content-Length": "190", "Content-Type": "application/json", - "traceparent": "00-47d96e92b9d466a1f67ba201e9941ea9-baffbb4e3bbf9170-00", + "traceparent": "00-3bd3051a303c9f00379ab0997445db0a-5b5e7b710e9b2848-00", "User-Agent": "azsdk-net-Monitor.Query/1.1.0 (.NET 7.0.20; Microsoft Windows 10.0.22631)", "x-ms-client-request-id": "Sanitized", "x-ms-return-client-request-id": "true" @@ -943,12 +943,12 @@ "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", "Age": "2", "Connection": "keep-alive", - "Content-Length": "2046", + "Content-Length": "2085", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 20 Jun 2024 23:40:39 GMT", + "Date": "Fri, 12 Jul 2024 22:49:59 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-7b5b6f666d-h5dtt", + "Via": "1.1 draft-oms-6474b844f8-2fblx", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -1096,14 +1096,14 @@ "rows": [ [ "33d8a320-00c3-4ec8-a6a4-8692b07a6841", - "2024-06-20T23:38:07.6078709Z", + "2024-07-12T22:43:37.0354416Z", "Message via ILogger", 1, - null, + "{\"CategoryName\":\"CustomCategoryName\"}", null, "", - "49f75e59566d6ca854855deb28cdd910", - "f59fc5d195101154", + "88df56a070a8fa9ed7e6cb8405f0be62", + "6db4861ec0f7cedd", "", "", "", @@ -1122,7 +1122,7 @@ "Other", "a98f261a-124b-425a-931e-8dc00af2e65c", "53e1f7f0-9975-4995-830a-414a26e9450a", - "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240620-d", + "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240712-d", 1, "", "", @@ -1143,7 +1143,7 @@ "Authorization": "Sanitized", "Content-Length": "196", "Content-Type": "application/json", - "traceparent": "00-2b6ea86956e61a3a26674174d635da52-e785257810c46647-00", + "traceparent": "00-91d0b3546e100a2f9cd1a5c5e2a15ac0-86c7a4b301b1ca64-00", "User-Agent": "azsdk-net-Monitor.Query/1.1.0 (.NET 7.0.20; Microsoft Windows 10.0.22631)", "x-ms-client-request-id": "Sanitized", "x-ms-return-client-request-id": "true" @@ -1157,12 +1157,12 @@ "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", "Connection": "keep-alive", - "Content-Length": "2509", + "Content-Length": "2510", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 20 Jun 2024 23:40:40 GMT", + "Date": "Fri, 12 Jul 2024 22:50:00 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-7b5b6f666d-jwk2r", + "Via": "1.1 draft-oms-6474b844f8-m9n7b", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -1338,21 +1338,21 @@ "rows": [ [ "e1407f81-4e84-4943-843a-0494dd4700e5", - "2024-06-20T23:38:07.6049141Z", - "ab1d314b41df92d4", + "2024-07-12T22:40:48.0771341Z", + "b1f082e24522023c", "localhost:9998", "HTTP", "GET /", "http://localhost:9998/", true, "200", - 3.2012, + 28.1063, "<250ms", "{\"CustomProperty1\":\"Value1\",\"_MS.ProcessedByMetricExtractors\":\"(Name: X,Ver:'1.1')\"}", null, "", - "49f75e59566d6ca854855deb28cdd910", - "49f75e59566d6ca854855deb28cdd910", + "da17bd8bf70b642749424a4cf85651b1", + "da17bd8bf70b642749424a4cf85651b1", "", "", "", @@ -1371,7 +1371,7 @@ "Other", "d64e2b0b-7f11-41ec-b85e-5bd69ee688e2", "3f8e759a-2c28-4cc7-b260-9b343fb2a3ff", - "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240620-d", + "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240712-d", 1, "", "", @@ -1392,7 +1392,7 @@ "Authorization": "Sanitized", "Content-Length": "191", "Content-Type": "application/json", - "traceparent": "00-6b7bf1f2d33f97fd204b2404d01e86bc-ce25cacff1f058c1-00", + "traceparent": "00-5ffa35bd8e51e2a1dc1e9912b3648927-7a6a13d2c7a3f90c-00", "User-Agent": "azsdk-net-Monitor.Query/1.1.0 (.NET 7.0.20; Microsoft Windows 10.0.22631)", "x-ms-client-request-id": "Sanitized", "x-ms-return-client-request-id": "true" @@ -1407,12 +1407,12 @@ "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", "Age": "4", "Connection": "keep-alive", - "Content-Length": "2478", + "Content-Length": "2479", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 20 Jun 2024 23:40:40 GMT", + "Date": "Fri, 12 Jul 2024 22:50:00 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-7b5b6f666d-lpmfk", + "Via": "1.1 draft-oms-6474b844f8-2fblx", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -1588,21 +1588,21 @@ "rows": [ [ "33d8a320-00c3-4ec8-a6a4-8692b07a6841", - "2024-06-20T23:38:07.6069422Z", - "f59fc5d195101154", + "2024-07-12T22:43:36.9744069Z", + "6db4861ec0f7cedd", "", "GET /", "http://localhost:9998/", true, "200", - 1.0316, + 73.4357, "<250ms", - "{\"CustomProperty1\":\"Value1\",\"_MS.ProcessedByMetricExtractors\":\"(Name: X,Ver:'1.1')\"}", + "{\"_MS.ProcessedByMetricExtractors\":\"(Name: X,Ver:'1.1')\",\"CustomProperty1\":\"Value1\"}", null, "GET /", - "49f75e59566d6ca854855deb28cdd910", + "88df56a070a8fa9ed7e6cb8405f0be62", null, - "ab1d314b41df92d4", + "b26e739d8ffb31d7", "", "", "", @@ -1621,7 +1621,7 @@ "Other", "a98f261a-124b-425a-931e-8dc00af2e65c", "53e1f7f0-9975-4995-830a-414a26e9450a", - "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240620-d", + "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240712-d", 1, "", "", @@ -1642,7 +1642,7 @@ "Authorization": "Sanitized", "Content-Length": "270", "Content-Type": "application/json", - "traceparent": "00-0d0bdf7c6f38c262785a4b9a67e45619-171ab26f7284caa2-00", + "traceparent": "00-2b10c0831b5b208afc2680dbfc254e02-8f3c1a2f3ad1db6a-00", "User-Agent": "azsdk-net-Monitor.Query/1.1.0 (.NET 7.0.20; Microsoft Windows 10.0.22631)", "x-ms-client-request-id": "Sanitized", "x-ms-return-client-request-id": "true" @@ -1659,10 +1659,10 @@ "Connection": "keep-alive", "Content-Length": "2132", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 20 Jun 2024 23:40:40 GMT", + "Date": "Fri, 12 Jul 2024 22:50:00 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-7b5b6f666d-f7x45", + "Via": "1.1 draft-oms-6474b844f8-m8vk7", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -1806,13 +1806,13 @@ "rows": [ [ "33d8a320-00c3-4ec8-a6a4-8692b07a6841", - "2024-06-20T23:38:07.7470491Z", + "2024-07-12T22:43:37.2919595Z", "http.client.request.duration", 1, - 0.0032012, - 0.0032012, - 0.0032012, - "{\"http.request.method\":\"GET\",\"http.response.status_code\":\"200\",\"network.protocol.version\":\"1.1\",\"server.address\":\"localhost\",\"server.port\":\"9998\",\"url.scheme\":\"http\"}", + 0.1459972, + 0.1459972, + 0.1459972, + "{\"http.request.method\":\"GET\",\"http.response.status_code\":\"200\",\"network.protocol.version\":\"1.1\",\"url.scheme\":\"http\",\"server.address\":\"localhost\",\"server.port\":\"9998\"}", "", "", "", @@ -1834,7 +1834,7 @@ "Other", "a98f261a-124b-425a-931e-8dc00af2e65c", "53e1f7f0-9975-4995-830a-414a26e9450a", - "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240620-d", + "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240712-d", "Azure", "AppMetrics", "/subscriptions/65b2f83e-7bf1-4be3-bafc-3a4163265a52/resourcegroups/tileetest06201346/providers/microsoft.insights/components/te3fca6a3c26958b8-ai-1" @@ -1852,7 +1852,7 @@ "Authorization": "Sanitized", "Content-Length": "197", "Content-Type": "application/json", - "traceparent": "00-c3f0ab352cec3cc7ede0b948491ba4ea-90eacc47ead0f788-00", + "traceparent": "00-6e7065b9b04f900606e8ad6ad7bc05e4-a414ca5ffcd7524f-00", "User-Agent": "azsdk-net-Monitor.Query/1.1.0 (.NET 7.0.20; Microsoft Windows 10.0.22631)", "x-ms-client-request-id": "Sanitized", "x-ms-return-client-request-id": "true" @@ -1869,10 +1869,10 @@ "Connection": "keep-alive", "Content-Length": "2095", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 20 Jun 2024 23:40:40 GMT", + "Date": "Fri, 12 Jul 2024 22:50:00 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-7b5b6f666d-2vz2j", + "Via": "1.1 draft-oms-6474b844f8-nw2hn", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -2016,12 +2016,12 @@ "rows": [ [ "33d8a320-00c3-4ec8-a6a4-8692b07a6841", - "2024-06-20T23:38:07.7470476Z", + "2024-07-12T22:43:37.2919001Z", "http.server.request.duration", 1, - 0.0010316, - 0.0010316, - 0.0010316, + 0.0734357, + 0.0734357, + 0.0734357, "{\"http.request.method\":\"GET\",\"http.response.status_code\":\"200\",\"http.route\":\"/\",\"network.protocol.version\":\"1.1\",\"url.scheme\":\"http\"}", "", "", @@ -2044,7 +2044,7 @@ "Other", "a98f261a-124b-425a-931e-8dc00af2e65c", "53e1f7f0-9975-4995-830a-414a26e9450a", - "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240620-d", + "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240712-d", "Azure", "AppMetrics", "/subscriptions/65b2f83e-7bf1-4be3-bafc-3a4163265a52/resourcegroups/tileetest06201346/providers/microsoft.insights/components/te3fca6a3c26958b8-ai-1" @@ -2062,7 +2062,7 @@ "Authorization": "Sanitized", "Content-Length": "190", "Content-Type": "application/json", - "traceparent": "00-98f71adb3262079e63219698670af63b-ccff674be0a96c56-00", + "traceparent": "00-7a538d7654cf4a437de33a0718f15cf1-957239c9add556c4-00", "User-Agent": "azsdk-net-Monitor.Query/1.1.0 (.NET 7.0.20; Microsoft Windows 10.0.22631)", "x-ms-client-request-id": "Sanitized", "x-ms-return-client-request-id": "true" @@ -2075,14 +2075,14 @@ "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", - "Age": "3", + "Age": "2", "Connection": "keep-alive", - "Content-Length": "2046", + "Content-Length": "2085", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 20 Jun 2024 23:40:40 GMT", + "Date": "Fri, 12 Jul 2024 22:50:00 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-7b5b6f666d-hdkrt", + "Via": "1.1 draft-oms-6474b844f8-54pdj", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -2230,14 +2230,14 @@ "rows": [ [ "33d8a320-00c3-4ec8-a6a4-8692b07a6841", - "2024-06-20T23:38:07.6078709Z", + "2024-07-12T22:43:37.0354416Z", "Message via ILogger", 1, - null, + "{\"CategoryName\":\"CustomCategoryName\"}", null, "", - "49f75e59566d6ca854855deb28cdd910", - "f59fc5d195101154", + "88df56a070a8fa9ed7e6cb8405f0be62", + "6db4861ec0f7cedd", "", "", "", @@ -2256,7 +2256,7 @@ "Other", "a98f261a-124b-425a-931e-8dc00af2e65c", "53e1f7f0-9975-4995-830a-414a26e9450a", - "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240620-d", + "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240712-d", 1, "", "", @@ -2273,7 +2273,7 @@ "Variables": { "CONNECTION_STRING": "InstrumentationKey=53e1f7f0-9975-4995-830a-414a26e9450a;IngestionEndpoint=https://westus-0.in.applicationinsights.azure.com/;LiveEndpoint=https://westus.livediagnostics.monitor.azure.com/;ApplicationId=a98f261a-124b-425a-931e-8dc00af2e65c", "LOGS_ENDPOINT": "https://api.loganalytics.io", - "RandomSeed": "1272071237", + "RandomSeed": "568610538", "SECONDARY_CONNECTION_STRING": "InstrumentationKey=3f8e759a-2c28-4cc7-b260-9b343fb2a3ff;IngestionEndpoint=https://westus-0.in.applicationinsights.azure.com/;LiveEndpoint=https://westus.livediagnostics.monitor.azure.com/;ApplicationId=d64e2b0b-7f11-41ec-b85e-5bd69ee688e2", "SECONDARY_WORKSPACE_ID": "e1407f81-4e84-4943-843a-0494dd4700e5", "WORKSPACE_ID": "33d8a320-00c3-4ec8-a6a4-8692b07a6841" diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/tests/Azure.Monitor.OpenTelemetry.AspNetCore.Integration.Tests/SessionRecords/DistroWebAppLiveTests/VerifySendingToTwoResources_UsingExporter.json b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/tests/Azure.Monitor.OpenTelemetry.AspNetCore.Integration.Tests/SessionRecords/DistroWebAppLiveTests/VerifySendingToTwoResources_UsingExporter.json index 0f09d42ec4250..e0ac10051e4d3 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/tests/Azure.Monitor.OpenTelemetry.AspNetCore.Integration.Tests/SessionRecords/DistroWebAppLiveTests/VerifySendingToTwoResources_UsingExporter.json +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/tests/Azure.Monitor.OpenTelemetry.AspNetCore.Integration.Tests/SessionRecords/DistroWebAppLiveTests/VerifySendingToTwoResources_UsingExporter.json @@ -8,7 +8,7 @@ "Authorization": "Sanitized", "Content-Length": "196", "Content-Type": "application/json", - "traceparent": "00-57e7e49f34248b18f932ef0d54e599d6-9075399c1c71f2e5-00", + "traceparent": "00-e034c8a6a98c8d278f7e58dffbd8bcde-659a31d74338cab1-00", "User-Agent": "azsdk-net-Monitor.Query/1.1.0 (.NET 7.0.20; Microsoft Windows 10.0.22631)", "x-ms-client-request-id": "Sanitized", "x-ms-return-client-request-id": "true" @@ -23,12 +23,12 @@ "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", "Age": "7", "Connection": "keep-alive", - "Content-Length": "2509", + "Content-Length": "2510", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 20 Jun 2024 23:40:42 GMT", + "Date": "Fri, 12 Jul 2024 22:50:02 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-7b5b6f666d-ngvmg", + "Via": "1.1 draft-oms-6474b844f8-n6m7r", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -204,21 +204,21 @@ "rows": [ [ "33d8a320-00c3-4ec8-a6a4-8692b07a6841", - "2024-06-20T23:38:07.6049141Z", - "ab1d314b41df92d4", + "2024-07-12T22:43:36.900795Z", + "b26e739d8ffb31d7", "localhost:9998", "HTTP", "GET /", "http://localhost:9998/", true, "200", - 3.2012, + 145.9972, "<250ms", "{\"CustomProperty1\":\"Value1\",\"_MS.ProcessedByMetricExtractors\":\"(Name: X,Ver:'1.1')\"}", null, "", - "49f75e59566d6ca854855deb28cdd910", - "49f75e59566d6ca854855deb28cdd910", + "88df56a070a8fa9ed7e6cb8405f0be62", + "88df56a070a8fa9ed7e6cb8405f0be62", "", "", "", @@ -237,7 +237,7 @@ "Other", "a98f261a-124b-425a-931e-8dc00af2e65c", "53e1f7f0-9975-4995-830a-414a26e9450a", - "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240620-d", + "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240712-d", 1, "", "", @@ -258,7 +258,7 @@ "Authorization": "Sanitized", "Content-Length": "191", "Content-Type": "application/json", - "traceparent": "00-ba7d29737dc48d753e7e0a359ff2443f-5ac7b1f3dc5c6eba-00", + "traceparent": "00-382e9d532e7a9bd1b92effe408a56870-4a00858d89e05493-00", "User-Agent": "azsdk-net-Monitor.Query/1.1.0 (.NET 7.0.20; Microsoft Windows 10.0.22631)", "x-ms-client-request-id": "Sanitized", "x-ms-return-client-request-id": "true" @@ -273,12 +273,12 @@ "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", "Age": "7", "Connection": "keep-alive", - "Content-Length": "2478", + "Content-Length": "2479", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 20 Jun 2024 23:40:42 GMT", + "Date": "Fri, 12 Jul 2024 22:50:02 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-7b5b6f666d-n8xrf", + "Via": "1.1 draft-oms-6474b844f8-7q5l7", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -454,21 +454,21 @@ "rows": [ [ "33d8a320-00c3-4ec8-a6a4-8692b07a6841", - "2024-06-20T23:38:07.6069422Z", - "f59fc5d195101154", + "2024-07-12T22:43:36.9744069Z", + "6db4861ec0f7cedd", "", "GET /", "http://localhost:9998/", true, "200", - 1.0316, + 73.4357, "<250ms", - "{\"CustomProperty1\":\"Value1\",\"_MS.ProcessedByMetricExtractors\":\"(Name: X,Ver:'1.1')\"}", + "{\"_MS.ProcessedByMetricExtractors\":\"(Name: X,Ver:'1.1')\",\"CustomProperty1\":\"Value1\"}", null, "GET /", - "49f75e59566d6ca854855deb28cdd910", + "88df56a070a8fa9ed7e6cb8405f0be62", null, - "ab1d314b41df92d4", + "b26e739d8ffb31d7", "", "", "", @@ -487,7 +487,7 @@ "Other", "a98f261a-124b-425a-931e-8dc00af2e65c", "53e1f7f0-9975-4995-830a-414a26e9450a", - "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240620-d", + "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240712-d", 1, "", "", @@ -508,7 +508,7 @@ "Authorization": "Sanitized", "Content-Length": "270", "Content-Type": "application/json", - "traceparent": "00-bdc64e39629f1dd4abfe9db09af0f3f3-ebc337fd1d87acbc-00", + "traceparent": "00-d53b72dc4e77fd45c9348f97a79c8400-6139fe35455d6635-00", "User-Agent": "azsdk-net-Monitor.Query/1.1.0 (.NET 7.0.20; Microsoft Windows 10.0.22631)", "x-ms-client-request-id": "Sanitized", "x-ms-return-client-request-id": "true" @@ -521,14 +521,14 @@ "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", - "Age": "6", + "Age": "5", "Connection": "keep-alive", "Content-Length": "2132", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 20 Jun 2024 23:40:42 GMT", + "Date": "Fri, 12 Jul 2024 22:50:02 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-7b5b6f666d-fkfg9", + "Via": "1.1 draft-oms-6474b844f8-rvd75", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -672,13 +672,13 @@ "rows": [ [ "33d8a320-00c3-4ec8-a6a4-8692b07a6841", - "2024-06-20T23:38:07.7470491Z", + "2024-07-12T22:43:37.2919595Z", "http.client.request.duration", 1, - 0.0032012, - 0.0032012, - 0.0032012, - "{\"http.request.method\":\"GET\",\"http.response.status_code\":\"200\",\"network.protocol.version\":\"1.1\",\"server.address\":\"localhost\",\"server.port\":\"9998\",\"url.scheme\":\"http\"}", + 0.1459972, + 0.1459972, + 0.1459972, + "{\"http.request.method\":\"GET\",\"http.response.status_code\":\"200\",\"network.protocol.version\":\"1.1\",\"url.scheme\":\"http\",\"server.address\":\"localhost\",\"server.port\":\"9998\"}", "", "", "", @@ -700,7 +700,7 @@ "Other", "a98f261a-124b-425a-931e-8dc00af2e65c", "53e1f7f0-9975-4995-830a-414a26e9450a", - "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240620-d", + "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240712-d", "Azure", "AppMetrics", "/subscriptions/65b2f83e-7bf1-4be3-bafc-3a4163265a52/resourcegroups/tileetest06201346/providers/microsoft.insights/components/te3fca6a3c26958b8-ai-1" @@ -718,7 +718,7 @@ "Authorization": "Sanitized", "Content-Length": "197", "Content-Type": "application/json", - "traceparent": "00-d69474605e5869905fc535202f3b4138-7312277c9eee7b3b-00", + "traceparent": "00-fa66cf14c56e09bb156960387f2c3e72-096fcff2db0b7549-00", "User-Agent": "azsdk-net-Monitor.Query/1.1.0 (.NET 7.0.20; Microsoft Windows 10.0.22631)", "x-ms-client-request-id": "Sanitized", "x-ms-return-client-request-id": "true" @@ -731,14 +731,14 @@ "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", - "Age": "6", + "Age": "5", "Connection": "keep-alive", "Content-Length": "2095", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 20 Jun 2024 23:40:43 GMT", + "Date": "Fri, 12 Jul 2024 22:50:02 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-7b5b6f666d-gv2rt", + "Via": "1.1 draft-oms-6474b844f8-cklbx", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -882,12 +882,12 @@ "rows": [ [ "33d8a320-00c3-4ec8-a6a4-8692b07a6841", - "2024-06-20T23:38:07.7470476Z", + "2024-07-12T22:43:37.2919001Z", "http.server.request.duration", 1, - 0.0010316, - 0.0010316, - 0.0010316, + 0.0734357, + 0.0734357, + 0.0734357, "{\"http.request.method\":\"GET\",\"http.response.status_code\":\"200\",\"http.route\":\"/\",\"network.protocol.version\":\"1.1\",\"url.scheme\":\"http\"}", "", "", @@ -910,7 +910,7 @@ "Other", "a98f261a-124b-425a-931e-8dc00af2e65c", "53e1f7f0-9975-4995-830a-414a26e9450a", - "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240620-d", + "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240712-d", "Azure", "AppMetrics", "/subscriptions/65b2f83e-7bf1-4be3-bafc-3a4163265a52/resourcegroups/tileetest06201346/providers/microsoft.insights/components/te3fca6a3c26958b8-ai-1" @@ -928,7 +928,7 @@ "Authorization": "Sanitized", "Content-Length": "190", "Content-Type": "application/json", - "traceparent": "00-bdd15bbca13a084d23c01ec87c63b086-a607c7f69c30fe60-00", + "traceparent": "00-4309c33089a7babd472cf0143cabf4a5-3e054d85a3cb2db8-00", "User-Agent": "azsdk-net-Monitor.Query/1.1.0 (.NET 7.0.20; Microsoft Windows 10.0.22631)", "x-ms-client-request-id": "Sanitized", "x-ms-return-client-request-id": "true" @@ -941,14 +941,14 @@ "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", - "Age": "6", + "Age": "4", "Connection": "keep-alive", - "Content-Length": "2046", + "Content-Length": "2085", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 20 Jun 2024 23:40:43 GMT", + "Date": "Fri, 12 Jul 2024 22:50:02 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-7b5b6f666d-wgp5f", + "Via": "1.1 draft-oms-6474b844f8-d796r", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -1096,14 +1096,14 @@ "rows": [ [ "33d8a320-00c3-4ec8-a6a4-8692b07a6841", - "2024-06-20T23:38:07.6078709Z", + "2024-07-12T22:43:37.0354416Z", "Message via ILogger", 1, - null, + "{\"CategoryName\":\"CustomCategoryName\"}", null, "", - "49f75e59566d6ca854855deb28cdd910", - "f59fc5d195101154", + "88df56a070a8fa9ed7e6cb8405f0be62", + "6db4861ec0f7cedd", "", "", "", @@ -1122,7 +1122,7 @@ "Other", "a98f261a-124b-425a-931e-8dc00af2e65c", "53e1f7f0-9975-4995-830a-414a26e9450a", - "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240620-d", + "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240712-d", 1, "", "", @@ -1143,7 +1143,7 @@ "Authorization": "Sanitized", "Content-Length": "196", "Content-Type": "application/json", - "traceparent": "00-01afbdba32bb35377f53c2423cee82fc-5ce03edded15bcf5-00", + "traceparent": "00-9ae58476a9f044c5a504b8fa0651465a-0078d4012b276cc3-00", "User-Agent": "azsdk-net-Monitor.Query/1.1.0 (.NET 7.0.20; Microsoft Windows 10.0.22631)", "x-ms-client-request-id": "Sanitized", "x-ms-return-client-request-id": "true" @@ -1156,14 +1156,14 @@ "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", - "Age": "4", + "Age": "2", "Connection": "keep-alive", - "Content-Length": "2509", + "Content-Length": "2510", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 20 Jun 2024 23:40:44 GMT", + "Date": "Fri, 12 Jul 2024 22:50:02 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-7b5b6f666d-f4knk", + "Via": "1.1 draft-oms-6474b844f8-v7k4x", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -1339,21 +1339,21 @@ "rows": [ [ "e1407f81-4e84-4943-843a-0494dd4700e5", - "2024-06-20T23:38:07.6049141Z", - "ab1d314b41df92d4", + "2024-07-12T22:40:48.0771341Z", + "b1f082e24522023c", "localhost:9998", "HTTP", "GET /", "http://localhost:9998/", true, "200", - 3.2012, + 28.1063, "<250ms", "{\"CustomProperty1\":\"Value1\",\"_MS.ProcessedByMetricExtractors\":\"(Name: X,Ver:'1.1')\"}", null, "", - "49f75e59566d6ca854855deb28cdd910", - "49f75e59566d6ca854855deb28cdd910", + "da17bd8bf70b642749424a4cf85651b1", + "da17bd8bf70b642749424a4cf85651b1", "", "", "", @@ -1372,7 +1372,7 @@ "Other", "d64e2b0b-7f11-41ec-b85e-5bd69ee688e2", "3f8e759a-2c28-4cc7-b260-9b343fb2a3ff", - "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240620-d", + "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240712-d", 1, "", "", @@ -1393,7 +1393,7 @@ "Authorization": "Sanitized", "Content-Length": "191", "Content-Type": "application/json", - "traceparent": "00-3a1d9637caf4f11f74132bada9365f2b-5af9377180d125d7-00", + "traceparent": "00-643924ba575f43c58c04c1dbf1f122b8-3ff834e42d789bbf-00", "User-Agent": "azsdk-net-Monitor.Query/1.1.0 (.NET 7.0.20; Microsoft Windows 10.0.22631)", "x-ms-client-request-id": "Sanitized", "x-ms-return-client-request-id": "true" @@ -1406,14 +1406,14 @@ "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", - "Age": "8", + "Age": "7", "Connection": "keep-alive", - "Content-Length": "2478", + "Content-Length": "2479", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 20 Jun 2024 23:40:44 GMT", + "Date": "Fri, 12 Jul 2024 22:50:03 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-7b5b6f666d-2ntjc", + "Via": "1.1 draft-oms-6474b844f8-wfjk2", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -1589,21 +1589,21 @@ "rows": [ [ "33d8a320-00c3-4ec8-a6a4-8692b07a6841", - "2024-06-20T23:38:07.6069422Z", - "f59fc5d195101154", + "2024-07-12T22:43:36.9744069Z", + "6db4861ec0f7cedd", "", "GET /", "http://localhost:9998/", true, "200", - 1.0316, + 73.4357, "<250ms", - "{\"CustomProperty1\":\"Value1\",\"_MS.ProcessedByMetricExtractors\":\"(Name: X,Ver:'1.1')\"}", + "{\"_MS.ProcessedByMetricExtractors\":\"(Name: X,Ver:'1.1')\",\"CustomProperty1\":\"Value1\"}", null, "GET /", - "49f75e59566d6ca854855deb28cdd910", + "88df56a070a8fa9ed7e6cb8405f0be62", null, - "ab1d314b41df92d4", + "b26e739d8ffb31d7", "", "", "", @@ -1622,7 +1622,7 @@ "Other", "a98f261a-124b-425a-931e-8dc00af2e65c", "53e1f7f0-9975-4995-830a-414a26e9450a", - "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240620-d", + "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240712-d", 1, "", "", @@ -1643,7 +1643,7 @@ "Authorization": "Sanitized", "Content-Length": "270", "Content-Type": "application/json", - "traceparent": "00-452f0aa72750a9e74d94883dd46ef2e3-3a2067989b2bb0d6-00", + "traceparent": "00-65adc3c82e28329a6aabd75723ce4594-f12a568e9d6a15c6-00", "User-Agent": "azsdk-net-Monitor.Query/1.1.0 (.NET 7.0.20; Microsoft Windows 10.0.22631)", "x-ms-client-request-id": "Sanitized", "x-ms-return-client-request-id": "true" @@ -1656,14 +1656,14 @@ "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", - "Age": "9", + "Age": "6", "Connection": "keep-alive", "Content-Length": "2132", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 20 Jun 2024 23:40:46 GMT", + "Date": "Fri, 12 Jul 2024 22:50:03 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-7b5b6f666d-bhfm7", + "Via": "1.1 draft-oms-6474b844f8-nks9v", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -1807,13 +1807,13 @@ "rows": [ [ "33d8a320-00c3-4ec8-a6a4-8692b07a6841", - "2024-06-20T23:38:07.7470491Z", + "2024-07-12T22:43:37.2919595Z", "http.client.request.duration", 1, - 0.0032012, - 0.0032012, - 0.0032012, - "{\"http.request.method\":\"GET\",\"http.response.status_code\":\"200\",\"network.protocol.version\":\"1.1\",\"server.address\":\"localhost\",\"server.port\":\"9998\",\"url.scheme\":\"http\"}", + 0.1459972, + 0.1459972, + 0.1459972, + "{\"http.request.method\":\"GET\",\"http.response.status_code\":\"200\",\"network.protocol.version\":\"1.1\",\"url.scheme\":\"http\",\"server.address\":\"localhost\",\"server.port\":\"9998\"}", "", "", "", @@ -1835,7 +1835,7 @@ "Other", "a98f261a-124b-425a-931e-8dc00af2e65c", "53e1f7f0-9975-4995-830a-414a26e9450a", - "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240620-d", + "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240712-d", "Azure", "AppMetrics", "/subscriptions/65b2f83e-7bf1-4be3-bafc-3a4163265a52/resourcegroups/tileetest06201346/providers/microsoft.insights/components/te3fca6a3c26958b8-ai-1" @@ -1853,7 +1853,7 @@ "Authorization": "Sanitized", "Content-Length": "197", "Content-Type": "application/json", - "traceparent": "00-ec7a46230ef027f977d39bd04f72ee65-a39c57b244b426de-00", + "traceparent": "00-7a20c4dbc445cbc5a11d6aae8d7d2ccb-b93f517e3913391d-00", "User-Agent": "azsdk-net-Monitor.Query/1.1.0 (.NET 7.0.20; Microsoft Windows 10.0.22631)", "x-ms-client-request-id": "Sanitized", "x-ms-return-client-request-id": "true" @@ -1866,14 +1866,14 @@ "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", - "Age": "9", + "Age": "5", "Connection": "keep-alive", "Content-Length": "2095", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 20 Jun 2024 23:40:46 GMT", + "Date": "Fri, 12 Jul 2024 22:50:03 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-7b5b6f666d-ndnlv", + "Via": "1.1 draft-oms-6474b844f8-fvfkq", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -2017,12 +2017,12 @@ "rows": [ [ "33d8a320-00c3-4ec8-a6a4-8692b07a6841", - "2024-06-20T23:38:07.7470476Z", + "2024-07-12T22:43:37.2919001Z", "http.server.request.duration", 1, - 0.0010316, - 0.0010316, - 0.0010316, + 0.0734357, + 0.0734357, + 0.0734357, "{\"http.request.method\":\"GET\",\"http.response.status_code\":\"200\",\"http.route\":\"/\",\"network.protocol.version\":\"1.1\",\"url.scheme\":\"http\"}", "", "", @@ -2045,7 +2045,7 @@ "Other", "a98f261a-124b-425a-931e-8dc00af2e65c", "53e1f7f0-9975-4995-830a-414a26e9450a", - "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240620-d", + "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240712-d", "Azure", "AppMetrics", "/subscriptions/65b2f83e-7bf1-4be3-bafc-3a4163265a52/resourcegroups/tileetest06201346/providers/microsoft.insights/components/te3fca6a3c26958b8-ai-1" @@ -2063,7 +2063,7 @@ "Authorization": "Sanitized", "Content-Length": "190", "Content-Type": "application/json", - "traceparent": "00-0bd0e3f232218051fc97864e3e1d16ee-77f98a07170f401a-00", + "traceparent": "00-7f475174ad5d71051c6079899e4ca3f9-01c33c75ac0b37ec-00", "User-Agent": "azsdk-net-Monitor.Query/1.1.0 (.NET 7.0.20; Microsoft Windows 10.0.22631)", "x-ms-client-request-id": "Sanitized", "x-ms-return-client-request-id": "true" @@ -2076,14 +2076,14 @@ "ResponseHeaders": { "Access-Control-Allow-Origin": "*", "Access-Control-Expose-Headers": "Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location", - "Age": "8", + "Age": "5", "Connection": "keep-alive", - "Content-Length": "2046", + "Content-Length": "2085", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 20 Jun 2024 23:40:46 GMT", + "Date": "Fri, 12 Jul 2024 22:50:03 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "Vary": "Accept-Encoding", - "Via": "1.1 draft-oms-7b5b6f666d-wvvw7", + "Via": "1.1 draft-oms-6474b844f8-fmvws", "X-Content-Type-Options": "nosniff" }, "ResponseBody": { @@ -2231,14 +2231,14 @@ "rows": [ [ "33d8a320-00c3-4ec8-a6a4-8692b07a6841", - "2024-06-20T23:38:07.6078709Z", + "2024-07-12T22:43:37.0354416Z", "Message via ILogger", 1, - null, + "{\"CategoryName\":\"CustomCategoryName\"}", null, "", - "49f75e59566d6ca854855deb28cdd910", - "f59fc5d195101154", + "88df56a070a8fa9ed7e6cb8405f0be62", + "6db4861ec0f7cedd", "", "", "", @@ -2257,7 +2257,7 @@ "Other", "a98f261a-124b-425a-931e-8dc00af2e65c", "53e1f7f0-9975-4995-830a-414a26e9450a", - "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240620-d", + "dotnet7.0.20:otel1.9.0:ext1.4.0-alpha.20240712-d", 1, "", "", @@ -2274,7 +2274,7 @@ "Variables": { "CONNECTION_STRING": "InstrumentationKey=53e1f7f0-9975-4995-830a-414a26e9450a;IngestionEndpoint=https://westus-0.in.applicationinsights.azure.com/;LiveEndpoint=https://westus.livediagnostics.monitor.azure.com/;ApplicationId=a98f261a-124b-425a-931e-8dc00af2e65c", "LOGS_ENDPOINT": "https://api.loganalytics.io", - "RandomSeed": "1814202155", + "RandomSeed": "305523145", "SECONDARY_CONNECTION_STRING": "InstrumentationKey=3f8e759a-2c28-4cc7-b260-9b343fb2a3ff;IngestionEndpoint=https://westus-0.in.applicationinsights.azure.com/;LiveEndpoint=https://westus.livediagnostics.monitor.azure.com/;ApplicationId=d64e2b0b-7f11-41ec-b85e-5bd69ee688e2", "SECONDARY_WORKSPACE_ID": "e1407f81-4e84-4943-843a-0494dd4700e5", "WORKSPACE_ID": "33d8a320-00c3-4ec8-a6a4-8692b07a6841" diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/tests/Azure.Monitor.OpenTelemetry.AspNetCore.Integration.Tests/TelemetryValidationHelper.cs b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/tests/Azure.Monitor.OpenTelemetry.AspNetCore.Integration.Tests/TelemetryValidationHelper.cs index 571e484bf2753..34e28fd2f5ab7 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/tests/Azure.Monitor.OpenTelemetry.AspNetCore.Integration.Tests/TelemetryValidationHelper.cs +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/tests/Azure.Monitor.OpenTelemetry.AspNetCore.Integration.Tests/TelemetryValidationHelper.cs @@ -129,6 +129,7 @@ public struct ExpectedAppMetric public struct ExpectedAppTrace { public string Message { get; set; } + public List> Properties { get; set; } public string SeverityLevel { get; set; } public string AppVersion { get; set; } public string AppRoleName { get; set; } From 02e59ee0f23a3c7ce67f716f7c82a9d48cb8aea0 Mon Sep 17 00:00:00 2001 From: Sean McCullough <44180881+seanmcc-msft@users.noreply.github.com> Date: Mon, 15 Jul 2024 17:02:59 -0500 Subject: [PATCH 086/144] Reenabled live Audience tests (#44972) --- sdk/storage/Azure.Storage.Blobs/tests/AppendBlobClientTests.cs | 2 -- sdk/storage/Azure.Storage.Blobs/tests/BlobBaseClientTests.cs | 2 -- sdk/storage/Azure.Storage.Blobs/tests/BlobClientTests.cs | 2 -- sdk/storage/Azure.Storage.Blobs/tests/ContainerClientTests.cs | 2 -- sdk/storage/Azure.Storage.Blobs/tests/PageBlobClientTests.cs | 2 -- sdk/storage/Azure.Storage.Blobs/tests/ServiceClientTests.cs | 2 -- .../Azure.Storage.Files.DataLake/tests/DirectoryClientTests.cs | 2 -- .../Azure.Storage.Files.DataLake/tests/FileClientTests.cs | 2 -- .../Azure.Storage.Files.DataLake/tests/FileSystemClientTests.cs | 2 -- .../Azure.Storage.Files.DataLake/tests/ServiceClientTests.cs | 2 -- .../Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs | 2 -- sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs | 2 -- .../Azure.Storage.Files.Shares/tests/ShareClientTests.cs | 2 -- sdk/storage/Azure.Storage.Queues/tests/QueueClientTests.cs | 2 -- sdk/storage/Azure.Storage.Queues/tests/ServiceClientTests.cs | 2 -- 15 files changed, 30 deletions(-) diff --git a/sdk/storage/Azure.Storage.Blobs/tests/AppendBlobClientTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/AppendBlobClientTests.cs index ca888ef89301d..6db4a7a334f21 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/AppendBlobClientTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/AppendBlobClientTests.cs @@ -185,7 +185,6 @@ public async Task Ctor_DefaultAudience() } [RecordedTest] - [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_CustomAudience() { // Arrange @@ -214,7 +213,6 @@ public async Task Ctor_CustomAudience() } [RecordedTest] - [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_StorageAccountAudience() { // Arrange diff --git a/sdk/storage/Azure.Storage.Blobs/tests/BlobBaseClientTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/BlobBaseClientTests.cs index 218105b7d38cd..14116ab039dd3 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/BlobBaseClientTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/BlobBaseClientTests.cs @@ -307,7 +307,6 @@ public async Task Ctor_DefaultAudience() } [RecordedTest] - [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_CustomAudience() { // Arrange @@ -340,7 +339,6 @@ public async Task Ctor_CustomAudience() } [RecordedTest] - [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_StorageAccountAudience() { // Arrange diff --git a/sdk/storage/Azure.Storage.Blobs/tests/BlobClientTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/BlobClientTests.cs index 4511dfd4920ef..03c64e94dc04c 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/BlobClientTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/BlobClientTests.cs @@ -227,7 +227,6 @@ public async Task Ctor_DefaultAudience() } [RecordedTest] - [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_CustomAudience() { // Arrange @@ -260,7 +259,6 @@ public async Task Ctor_CustomAudience() } [RecordedTest] - [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_StorageAccountAudience() { // Arrange diff --git a/sdk/storage/Azure.Storage.Blobs/tests/ContainerClientTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/ContainerClientTests.cs index 9b7aa6ef6cdef..bee3930a6238c 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/ContainerClientTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/ContainerClientTests.cs @@ -356,7 +356,6 @@ public async Task Ctor_DefaultAudience() } [RecordedTest] - [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_CustomAudience() { // Arrange @@ -381,7 +380,6 @@ public async Task Ctor_CustomAudience() } [RecordedTest] - [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_StorageAccountAudience() { // Arrange diff --git a/sdk/storage/Azure.Storage.Blobs/tests/PageBlobClientTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/PageBlobClientTests.cs index d85f694346f9c..b3e799d151643 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/PageBlobClientTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/PageBlobClientTests.cs @@ -175,7 +175,6 @@ public async Task Ctor_DefaultAudience() } [RecordedTest] - [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_CustomAudience() { // Arrange @@ -204,7 +203,6 @@ public async Task Ctor_CustomAudience() } [RecordedTest] - [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_StorageAccountAudience() { // Arrange diff --git a/sdk/storage/Azure.Storage.Blobs/tests/ServiceClientTests.cs b/sdk/storage/Azure.Storage.Blobs/tests/ServiceClientTests.cs index 66f6dd5ee9748..5de7d8fa8c248 100644 --- a/sdk/storage/Azure.Storage.Blobs/tests/ServiceClientTests.cs +++ b/sdk/storage/Azure.Storage.Blobs/tests/ServiceClientTests.cs @@ -192,7 +192,6 @@ public async Task Ctor_DefaultAudience() } [RecordedTest] - [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_CustomAudience() { // Arrange @@ -212,7 +211,6 @@ public async Task Ctor_CustomAudience() } [RecordedTest] - [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_StorageAccountAudience() { // Arrange diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/DirectoryClientTests.cs b/sdk/storage/Azure.Storage.Files.DataLake/tests/DirectoryClientTests.cs index 74ccc69379729..2705c87152f19 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/tests/DirectoryClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/DirectoryClientTests.cs @@ -251,7 +251,6 @@ public async Task Ctor_DefaultAudience() } [RecordedTest] - [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_CustomAudience() { // Arrange @@ -280,7 +279,6 @@ public async Task Ctor_CustomAudience() } [RecordedTest] - [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_StorageAccountAudience() { // Arrange diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/FileClientTests.cs b/sdk/storage/Azure.Storage.Files.DataLake/tests/FileClientTests.cs index b08033e1be0e0..6d9f0d5750800 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/tests/FileClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/FileClientTests.cs @@ -254,7 +254,6 @@ public async Task Ctor_DefaultAudience() } [RecordedTest] - [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_CustomAudience() { // Arrange @@ -283,7 +282,6 @@ public async Task Ctor_CustomAudience() } [RecordedTest] - [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_StorageAccountAudience() { // Arrange diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/FileSystemClientTests.cs b/sdk/storage/Azure.Storage.Files.DataLake/tests/FileSystemClientTests.cs index 797436ce368c6..86b325c6d7551 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/tests/FileSystemClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/FileSystemClientTests.cs @@ -257,7 +257,6 @@ public async Task Ctor_DefaultAudience() } [RecordedTest] - [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_CustomAudience() { // Arrange @@ -282,7 +281,6 @@ public async Task Ctor_CustomAudience() } [RecordedTest] - [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_StorageAccountAudience() { // Arrange diff --git a/sdk/storage/Azure.Storage.Files.DataLake/tests/ServiceClientTests.cs b/sdk/storage/Azure.Storage.Files.DataLake/tests/ServiceClientTests.cs index 9d4227c73d613..b69becd8f7557 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/tests/ServiceClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/tests/ServiceClientTests.cs @@ -211,7 +211,6 @@ public async Task Ctor_DefaultAudience() } [RecordedTest] - [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_CustomAudience() { // Arrange @@ -231,7 +230,6 @@ public async Task Ctor_CustomAudience() } [RecordedTest] - [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_StorageAccountAudience() { // Arrange diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs index 216204f198cc8..193f10ea19204 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/DirectoryClientTests.cs @@ -133,7 +133,6 @@ public async Task Ctor_DefaultAudience() } [RecordedTest] - [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_CustomAudience() { // Arrange @@ -161,7 +160,6 @@ public async Task Ctor_CustomAudience() } [RecordedTest] - [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_StorageAccountAudience() { // Arrange diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs index 822df9b47c81c..139d13587abe0 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/FileClientTests.cs @@ -137,7 +137,6 @@ public async Task Ctor_DefaultAudience() } [RecordedTest] - [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_CustomAudience() { // Arrange @@ -167,7 +166,6 @@ public async Task Ctor_CustomAudience() } [RecordedTest] - [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_StorageAccountAudience() { // Arrange diff --git a/sdk/storage/Azure.Storage.Files.Shares/tests/ShareClientTests.cs b/sdk/storage/Azure.Storage.Files.Shares/tests/ShareClientTests.cs index 79a5a41809473..dd7372cbb1805 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/tests/ShareClientTests.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/tests/ShareClientTests.cs @@ -179,7 +179,6 @@ public async Task Ctor_DefaultAudience() } [RecordedTest] - [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_CustomAudience() { // Arrange @@ -205,7 +204,6 @@ public async Task Ctor_CustomAudience() } [RecordedTest] - [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_StorageAccountAudience() { // Arrange diff --git a/sdk/storage/Azure.Storage.Queues/tests/QueueClientTests.cs b/sdk/storage/Azure.Storage.Queues/tests/QueueClientTests.cs index 1010f466864ab..55be617330259 100644 --- a/sdk/storage/Azure.Storage.Queues/tests/QueueClientTests.cs +++ b/sdk/storage/Azure.Storage.Queues/tests/QueueClientTests.cs @@ -190,7 +190,6 @@ public async Task Ctor_DefaultAudience() } [RecordedTest] - [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_CustomAudience() { // Arrange @@ -215,7 +214,6 @@ public async Task Ctor_CustomAudience() } [RecordedTest] - [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_StorageAccountAudience() { // Arrange diff --git a/sdk/storage/Azure.Storage.Queues/tests/ServiceClientTests.cs b/sdk/storage/Azure.Storage.Queues/tests/ServiceClientTests.cs index 140eb59095849..09e5c0f2849f8 100644 --- a/sdk/storage/Azure.Storage.Queues/tests/ServiceClientTests.cs +++ b/sdk/storage/Azure.Storage.Queues/tests/ServiceClientTests.cs @@ -124,7 +124,6 @@ public async Task Ctor_DefaultAudience() } [RecordedTest] - [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_CustomAudience() { // Arrange @@ -144,7 +143,6 @@ public async Task Ctor_CustomAudience() } [RecordedTest] - [PlaybackOnly("https://github.com/Azure/azure-sdk-for-net/issues/44967")] public async Task Ctor_StorageAccountAudience() { // Arrange From a5cc0788dd3f88e5e3295589531ec571f8f6c155 Mon Sep 17 00:00:00 2001 From: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com> Date: Mon, 15 Jul 2024 15:28:08 -0700 Subject: [PATCH 087/144] Cncf namespace samples (#44994) * Add CNCF sample * Update readme * new recordings * event * recording * Use dynamic --- eng/Packages.Data.props | 1 + .../Azure.Messaging.EventGrid.Namespaces.sln | 7 +++ .../assets.json | 2 +- .../samples/README.md | 1 + .../samples/Sample2_CNCF.md | 36 +++++++++++++ ...essaging.EventGrid.Namespaces.Tests.csproj | 1 + .../tests/EventGridClientLiveTests.cs | 53 +++++++++++++++++++ 7 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/samples/Sample2_CNCF.md diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index be343287cbc94..402c727b039e9 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -273,6 +273,7 @@ + diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/Azure.Messaging.EventGrid.Namespaces.sln b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/Azure.Messaging.EventGrid.Namespaces.sln index 072dd53b1526e..6f8fe308b86f1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/Azure.Messaging.EventGrid.Namespaces.sln +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/Azure.Messaging.EventGrid.Namespaces.sln @@ -8,6 +8,13 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Messaging.EventGrid.N EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Messaging.EventGrid.Namespaces.Tests", "tests\Azure.Messaging.EventGrid.Namespaces.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{5E3752BC-2C04-499F-B2C4-28426B3C344A}" + ProjectSection(SolutionItems) = preProject + samples\README.md = samples\README.md + samples\Sample1_Namespaces.md = samples\Sample1_Namespaces.md + samples\Sample2_CNCF.md = samples\Sample2_CNCF.md + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/assets.json b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/assets.json index caac76dbc0168..f7625acde0108 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/assets.json +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/eventgrid/Azure.Messaging.EventGrid.Namespaces", - "Tag": "net/eventgrid/Azure.Messaging.EventGrid.Namespaces_dcc4c4a164" + "Tag": "net/eventgrid/Azure.Messaging.EventGrid.Namespaces_bf72309699" } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/samples/README.md b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/samples/README.md index 481112556c392..67847a43dcd24 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/samples/README.md +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/samples/README.md @@ -13,3 +13,4 @@ description: Samples for the Azure.Messaging.EventGrid.Namespaces client library Before starting, take a look at the Azure Event Grid [README](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/README.md) for more information on how to create an Event Grid custom topic or domain using the Azure portal/Azure CLI, and retrieving the designated endpoint and credential. - [Using Namespace Topics](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/samples/Sample1_Namespaces.md) +- [Using the Cloud Native CloudEvent type] diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/samples/Sample2_CNCF.md b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/samples/Sample2_CNCF.md new file mode 100644 index 0000000000000..83e075c5063c0 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/samples/Sample2_CNCF.md @@ -0,0 +1,36 @@ +# Using the Cloud Native CloudEvent type + +It is possible to publish and receive the CloudNative CloudEvent type found in the [CloudNative.CloudEvents library](https://www.nuget.org/packages/CloudNative.CloudEvents) using the Azure Event Grid Namespaces client library. +First we create a `CloudEvent` object and publish it to the namespace topic using the `EventGridSenderClient`. + +```C# Snippet:SendCNCFEvent +var evt = new CloudNative.CloudEvents.CloudEvent +{ + Source = new Uri("http://localHost"), + Type = "type", + Data = new TestModel { Name = "Bob", Age = 18 }, + Id = Recording.Random.NewGuid().ToString() +}; +var jsonFormatter = new JsonEventFormatter(); +var sender = new EventGridSenderClient(new Uri(namespaceTopicHost), topicName, new AzureKeyCredential(namespaceKey)); +await sender.SendEventAsync(RequestContent.Create(jsonFormatter.EncodeStructuredModeMessage(evt, out _))); +``` + +Next, we receive the events using the `EventGridReceiverClient`. + +```C# Snippet:ReceiveCNCFEvent +var receiver = new EventGridReceiverClient(new Uri(namespaceTopicHost), topicName, subscriptionName, new AzureKeyCredential(namespaceKey)); +Response response = await receiver.ReceiveAsync(maxEvents: 1, maxWaitTime: TimeSpan.FromSeconds(10), new RequestContext()); + +var eventResponse = response.Content.ToDynamicFromJson(JsonPropertyNames.CamelCase).Value[0]; +var receivedCloudEvent = jsonFormatter.DecodeStructuredModeMessage( + Encoding.UTF8.GetBytes(eventResponse.Event.ToString()), + new ContentType("application/cloudevents+json"), + null); +``` + +Finally, we acknowledge the event using the lock token. + +```C# Snippet:AcknowledgeCNCFEvent +AcknowledgeResult acknowledgeResult = await receiver.AcknowledgeAsync(new string[] { eventResponse.BrokerProperties.LockToken.ToString() }); +``` diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/tests/Azure.Messaging.EventGrid.Namespaces.Tests.csproj b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/tests/Azure.Messaging.EventGrid.Namespaces.Tests.csproj index fbdca36f737dc..d629891e73de9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/tests/Azure.Messaging.EventGrid.Namespaces.Tests.csproj +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/tests/Azure.Messaging.EventGrid.Namespaces.Tests.csproj @@ -17,6 +17,7 @@ + diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/tests/EventGridClientLiveTests.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/tests/EventGridClientLiveTests.cs index fdf3123b10ec1..955987d853b5e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/tests/EventGridClientLiveTests.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/tests/EventGridClientLiveTests.cs @@ -4,11 +4,16 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Text; using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Serialization; using Azure.Core.TestFramework; using Azure.Identity; using Azure.Messaging.EventGrid.Namespaces; +using CloudNative.CloudEvents.SystemTextJson; using NUnit.Framework; +using ContentType = System.Net.Mime.ContentType; namespace Azure.Messaging.EventGrid.Tests { @@ -284,6 +289,54 @@ public async Task Acknowledge() Assert.IsEmpty(acknowledgeResult.FailedLockTokens); } + [RecordedTest] + public async Task RoundTripCNCFEvent() + { + var namespaceTopicHost = TestEnvironment.NamespaceTopicHost; + var namespaceKey = TestEnvironment.NamespaceKey; + var topicName = TestEnvironment.NamespaceTopicName; + var subscriptionName = TestEnvironment.NamespaceSubscriptionName; + + #region Snippet:SendCNCFEvent + var evt = new CloudNative.CloudEvents.CloudEvent + { + Source = new Uri("http://localHost"), + Type = "type", + Data = new TestModel { Name = "Bob", Age = 18 }, + Id = Recording.Random.NewGuid().ToString() + }; + var jsonFormatter = new JsonEventFormatter(); +#if SNIPPET + var sender = new EventGridSenderClient(new Uri(namespaceTopicHost), topicName, new AzureKeyCredential(namespaceKey)); +#else + var sender = InstrumentClient(new EventGridSenderClient(new Uri(namespaceTopicHost), topicName, new AzureKeyCredential(namespaceKey), InstrumentClientOptions(new EventGridSenderClientOptions()))); +#endif + await sender.SendEventAsync(RequestContent.Create(jsonFormatter.EncodeStructuredModeMessage(evt, out _))); + #endregion + #region Snippet:ReceiveCNCFEvent +#if SNIPPET + var receiver = new EventGridReceiverClient(new Uri(namespaceTopicHost), topicName, subscriptionName, new AzureKeyCredential(namespaceKey)); +#else + var receiver = InstrumentClient(new EventGridReceiverClient(new Uri(namespaceTopicHost), topicName, subscriptionName, new AzureKeyCredential(namespaceKey), InstrumentClientOptions(new EventGridReceiverClientOptions()))); +#endif + Response response = await receiver.ReceiveAsync(maxEvents: 1, maxWaitTime: TimeSpan.FromSeconds(10), new RequestContext()); + + var eventResponse = response.Content.ToDynamicFromJson(JsonPropertyNames.CamelCase).Value[0]; + var receivedCloudEvent = jsonFormatter.DecodeStructuredModeMessage( + Encoding.UTF8.GetBytes(eventResponse.Event.ToString()), + new ContentType("application/cloudevents+json"), + null); + #endregion + Assert.AreEqual(evt.Source, receivedCloudEvent.Source); + Assert.AreEqual(evt.Type, receivedCloudEvent.Type); + Assert.AreEqual(evt.Id, receivedCloudEvent.Id); + + #region Snippet:AcknowledgeCNCFEvent + AcknowledgeResult acknowledgeResult = await receiver.AcknowledgeAsync(new string[] { eventResponse.BrokerProperties.LockToken.ToString() }); + #endregion + Assert.IsEmpty(acknowledgeResult.FailedLockTokens); + } + public class TestModel { public string Name { get; set; } From 8dd8d775de03432e2d4392039f9aeabc922b73d1 Mon Sep 17 00:00:00 2001 From: Amanda Nguyen <48961492+amnguye@users.noreply.github.com> Date: Mon, 15 Jul 2024 15:42:09 -0700 Subject: [PATCH 088/144] [Storage] [WebJobs] Added test for Blob Path for various blob names to check for blob name validation (#45015) * Added test for Blob Path for possible blob names, to ensure paths are not truncated * CI changelog error * Fix CI change log part 2 --- .../CHANGELOG.md | 1 + .../tests/BlobPathTests.cs | 32 +++++++++++++++++++ .../CHANGELOG.md | 11 +++++-- .../CHANGELOG.md | 2 +- .../CHANGELOG.md | 9 +----- 5 files changed, 44 insertions(+), 11 deletions(-) create mode 100644 sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/tests/BlobPathTests.cs diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/CHANGELOG.md b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/CHANGELOG.md index 7e526da586302..5906f03422abc 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/CHANGELOG.md +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/CHANGELOG.md @@ -7,6 +7,7 @@ ### Breaking Changes ### Bugs Fixed +- Bumped version of Azure.Storage.Blobs to resolve issue where Blob Path was being truncated at '#' character. ### Other Changes diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/tests/BlobPathTests.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/tests/BlobPathTests.cs new file mode 100644 index 0000000000000..4efb6ab532ad1 --- /dev/null +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/tests/BlobPathTests.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Storage.Blobs; +using NUnit.Framework; + +namespace Microsoft.Azure.WebJobs.Extensions.Storage.Blobs.Tests +{ + public class BlobPathTests + { + [Test] + [TestCase("blobName")] + [TestCase("blob_Name")] + [TestCase("blob_Nam/e324324.txt")] + [TestCase("!*'();[]:@&%=+$,/#äÄöÖüÜß")] + public void BlobPathTryParseAbsUrl(string blobName) + { + string uriStr = "https://account.blob.core.windows.net/container/" + blobName; + if (BlobPath.TryParseAbsUrl(uriStr, out BlobPath path)) + { + Assert.AreEqual(blobName, path.BlobName); + } + else + { + Assert.Fail("Failed to parse blob name"); + } + } + } +} diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/CHANGELOG.md b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/CHANGELOG.md index 36e9ae6e255c8..64b7a1e68449c 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/CHANGELOG.md +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/CHANGELOG.md @@ -1,7 +1,14 @@ # Release History -## 5.0.0-beta.3 (2021-03-09) -- This release contains bug fixes to improve quality. +## 5.0.0-beta.3 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes ## 5.0.0-beta.2 (2021-02-09) - This release contains bug fixes to improve quality. diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/CHANGELOG.md b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/CHANGELOG.md index 2daf625f3628a..faebfb83f19f8 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/CHANGELOG.md +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/CHANGELOG.md @@ -7,7 +7,7 @@ ### Breaking Changes ### Bugs Fixed - +- When grabbing Queue Metrics for amount of messages, will now use the QueueTriggerMetrics.QueueLength instead of the ApproximateMessagesCount for less stale metrics. ### Other Changes ## 5.3.0 (2024-04-18) diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage/CHANGELOG.md b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage/CHANGELOG.md index 9856fffaa65ca..c39a05e7be2bd 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage/CHANGELOG.md +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage/CHANGELOG.md @@ -1,14 +1,7 @@ # Release History ## 5.4.0-beta.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes +Please refer to [`Microsoft.Azure.WebJobs.Extension.Storage.Blobs`](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/CHANGELOG.md) and [`Microsoft.Azure.WebJobs.Extension.Storage.Queues`](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/CHANGELOG.md) for detailed list of changes. ## 5.3.0 (2024-04-18) Please refer to [`Microsoft.Azure.WebJobs.Extension.Storage.Blobs`](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/CHANGELOG.md) and [`Microsoft.Azure.WebJobs.Extension.Storage.Queues`](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/CHANGELOG.md) for detailed list of changes. From f2df745c4a863c971c53f0de3403a0eb28dfb452 Mon Sep 17 00:00:00 2001 From: Travis Wilson <35748617+trrwilson@users.noreply.github.com> Date: Mon, 15 Jul 2024 17:29:48 -0700 Subject: [PATCH 089/144] Azure OpenAI: sample/snippet update (request options for On Your Data) (#44956) * Update README.md The 'options' is needed to use own data and Search engine: ChatCompletion completion = chatClient.CompleteChat( [ new UserChatMessage("How to troubleshoot high cpu at user pool level"), ], options); * sample->snippet update --------- Co-authored-by: Liwei Yin <43456062+Liwei-Yin@users.noreply.github.com> --- sdk/openai/Azure.AI.OpenAI/README.md | 3 ++- sdk/openai/Azure.AI.OpenAI/tests/Samples/02_Oyd.cs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sdk/openai/Azure.AI.OpenAI/README.md b/sdk/openai/Azure.AI.OpenAI/README.md index 16ec38b6e5f37..a2171e446cd8a 100644 --- a/sdk/openai/Azure.AI.OpenAI/README.md +++ b/sdk/openai/Azure.AI.OpenAI/README.md @@ -373,7 +373,8 @@ options.AddDataSource(new AzureSearchChatDataSource() ChatCompletion completion = chatClient.CompleteChat( [ new UserChatMessage("What are the best-selling Contoso products this month?"), - ]); + ], + options); AzureChatMessageContext onYourDataContext = completion.GetAzureMessageContext(); diff --git a/sdk/openai/Azure.AI.OpenAI/tests/Samples/02_Oyd.cs b/sdk/openai/Azure.AI.OpenAI/tests/Samples/02_Oyd.cs index 6540194f11cf3..1537703f7ba60 100644 --- a/sdk/openai/Azure.AI.OpenAI/tests/Samples/02_Oyd.cs +++ b/sdk/openai/Azure.AI.OpenAI/tests/Samples/02_Oyd.cs @@ -45,7 +45,8 @@ public void OnYourDataSearch() ChatCompletion completion = chatClient.CompleteChat( [ new UserChatMessage("What are the best-selling Contoso products this month?"), - ]); + ], + options); AzureChatMessageContext onYourDataContext = completion.GetAzureMessageContext(); From 8615c80a598271e755389cf3a8ca5d2a21c2a081 Mon Sep 17 00:00:00 2001 From: Sean McCullough <44180881+seanmcc-msft@users.noreply.github.com> Date: Mon, 15 Jul 2024 19:42:51 -0500 Subject: [PATCH 090/144] Storage STG 94 GA release (#45018) --- sdk/storage/Azure.Storage.Blobs.Batch/CHANGELOG.md | 9 ++------- .../src/Azure.Storage.Blobs.Batch.csproj | 2 +- sdk/storage/Azure.Storage.Blobs.ChangeFeed/CHANGELOG.md | 9 ++------- sdk/storage/Azure.Storage.Blobs/CHANGELOG.md | 7 ++----- .../Azure.Storage.Blobs/src/Azure.Storage.Blobs.csproj | 2 +- sdk/storage/Azure.Storage.Common/CHANGELOG.md | 9 ++------- .../Azure.Storage.Common/src/Azure.Storage.Common.csproj | 2 +- sdk/storage/Azure.Storage.Files.DataLake/CHANGELOG.md | 7 ++----- .../src/Azure.Storage.Files.DataLake.csproj | 2 +- sdk/storage/Azure.Storage.Files.Shares/CHANGELOG.md | 7 ++----- .../src/Azure.Storage.Files.Shares.csproj | 2 +- sdk/storage/Azure.Storage.Queues/CHANGELOG.md | 9 ++------- .../Azure.Storage.Queues/src/Azure.Storage.Queues.csproj | 2 +- 13 files changed, 20 insertions(+), 49 deletions(-) diff --git a/sdk/storage/Azure.Storage.Blobs.Batch/CHANGELOG.md b/sdk/storage/Azure.Storage.Blobs.Batch/CHANGELOG.md index c7acd42bd30b3..59070294f1296 100644 --- a/sdk/storage/Azure.Storage.Blobs.Batch/CHANGELOG.md +++ b/sdk/storage/Azure.Storage.Blobs.Batch/CHANGELOG.md @@ -1,14 +1,9 @@ # Release History -## 12.18.0-beta.2 (Unreleased) +## 12.18.0 (2024-07-16) ### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- Includes all features from 12.18.0-beta.1. ## 12.18.0-beta.1 (2024-06-11) - Added support for service version 2024-08-04. diff --git a/sdk/storage/Azure.Storage.Blobs.Batch/src/Azure.Storage.Blobs.Batch.csproj b/sdk/storage/Azure.Storage.Blobs.Batch/src/Azure.Storage.Blobs.Batch.csproj index 6de26072bf276..056207c70c94b 100644 --- a/sdk/storage/Azure.Storage.Blobs.Batch/src/Azure.Storage.Blobs.Batch.csproj +++ b/sdk/storage/Azure.Storage.Blobs.Batch/src/Azure.Storage.Blobs.Batch.csproj @@ -4,7 +4,7 @@ Microsoft Azure.Storage.Blobs.Batch client library - 12.18.0-beta.2 + 12.18.0 12.17.0 BlobSDK;$(DefineConstants) diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/CHANGELOG.md b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/CHANGELOG.md index 35996dc4790c8..e758048ef9774 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/CHANGELOG.md +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/CHANGELOG.md @@ -1,14 +1,9 @@ # Release History -## 12.0.0-preview.46 (Unreleased) +## 12.0.0-preview.46 (2024-07-16) ### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- This release contains bug fixes to improve quality. ## 12.0.0-preview.45 (2024-06-11) - Added support for service version 2024-08-04. diff --git a/sdk/storage/Azure.Storage.Blobs/CHANGELOG.md b/sdk/storage/Azure.Storage.Blobs/CHANGELOG.md index 16c2f2781fad0..a3cc6fd2e94d9 100644 --- a/sdk/storage/Azure.Storage.Blobs/CHANGELOG.md +++ b/sdk/storage/Azure.Storage.Blobs/CHANGELOG.md @@ -1,16 +1,13 @@ # Release History -## 12.21.0-beta.2 (Unreleased) +## 12.21.0 (2024-07-16) ### Features Added - -### Breaking Changes +- Includes all features from 12.21.0-beta.1. ### Bugs Fixed - Fixed bug where storage clients when constructed with URLs with '#' character would truncate the blob name at the '#'. -### Other Changes - ## 12.21.0-beta.1 (2024-06-11) - Added support for service version 2024-08-04. - Added BlobContainerClient.GetAccountInfo(), .GetAccountInfoAsync(), BlobBaseClient.GetAccountInfo(), and .GetAccountInfoAsync() APIs. diff --git a/sdk/storage/Azure.Storage.Blobs/src/Azure.Storage.Blobs.csproj b/sdk/storage/Azure.Storage.Blobs/src/Azure.Storage.Blobs.csproj index 8e985d9ce384b..fb9114e806167 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/Azure.Storage.Blobs.csproj +++ b/sdk/storage/Azure.Storage.Blobs/src/Azure.Storage.Blobs.csproj @@ -4,7 +4,7 @@ Microsoft Azure.Storage.Blobs client library - 12.21.0-beta.2 + 12.21.0 12.20.0 BlobSDK;$(DefineConstants) diff --git a/sdk/storage/Azure.Storage.Common/CHANGELOG.md b/sdk/storage/Azure.Storage.Common/CHANGELOG.md index 4b6ca86ed5ac6..82c5ffa002096 100644 --- a/sdk/storage/Azure.Storage.Common/CHANGELOG.md +++ b/sdk/storage/Azure.Storage.Common/CHANGELOG.md @@ -1,14 +1,9 @@ # Release History -## 12.20.0-beta.2 (Unreleased) +## 12.20.0 (2024-07-16) ### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- Includes all features from 12.20.0-beta.1. ## 12.20.0-beta.1 (2024-06-11) - This release contains bug fixes to improve quality. diff --git a/sdk/storage/Azure.Storage.Common/src/Azure.Storage.Common.csproj b/sdk/storage/Azure.Storage.Common/src/Azure.Storage.Common.csproj index fe1145d45d490..7d4c05b15048b 100644 --- a/sdk/storage/Azure.Storage.Common/src/Azure.Storage.Common.csproj +++ b/sdk/storage/Azure.Storage.Common/src/Azure.Storage.Common.csproj @@ -4,7 +4,7 @@ Microsoft Azure.Storage.Common client library - 12.20.0-beta.2 + 12.20.0 12.19.0 CommonSDK;$(DefineConstants) diff --git a/sdk/storage/Azure.Storage.Files.DataLake/CHANGELOG.md b/sdk/storage/Azure.Storage.Files.DataLake/CHANGELOG.md index 876725a114639..9e20267eefdce 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/CHANGELOG.md +++ b/sdk/storage/Azure.Storage.Files.DataLake/CHANGELOG.md @@ -1,16 +1,13 @@ # Release History -## 12.19.0-beta.2 (Unreleased) +## 12.19.0 (2024-07-16) ### Features Added - -### Breaking Changes +- Includes all features from 12.19.0-beta.1. ### Bugs Fixed - Fixed bug where storage clients when constructed with URLs with '#' character would truncate the path at the '#'. -### Other Changes - ## 12.19.0-beta.1 (2024-06-11) - Added support for service version 2024-08-04. - Added more detailed messaging for authorization failure cases. diff --git a/sdk/storage/Azure.Storage.Files.DataLake/src/Azure.Storage.Files.DataLake.csproj b/sdk/storage/Azure.Storage.Files.DataLake/src/Azure.Storage.Files.DataLake.csproj index 022ac2a84a57e..b88e736686795 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/src/Azure.Storage.Files.DataLake.csproj +++ b/sdk/storage/Azure.Storage.Files.DataLake/src/Azure.Storage.Files.DataLake.csproj @@ -4,7 +4,7 @@ Microsoft Azure.Storage.Files.DataLake client library - 12.19.0-beta.2 + 12.19.0 12.18.0 DataLakeSDK;$(DefineConstants) diff --git a/sdk/storage/Azure.Storage.Files.Shares/CHANGELOG.md b/sdk/storage/Azure.Storage.Files.Shares/CHANGELOG.md index 3c5f19c01376a..d03036065af12 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/CHANGELOG.md +++ b/sdk/storage/Azure.Storage.Files.Shares/CHANGELOG.md @@ -1,16 +1,13 @@ # Release History -## 12.19.0-beta.2 (Unreleased) +## 12.19.0 (2024-07-16) ### Features Added - -### Breaking Changes +- Includes all features from 12.19.0-beta.1. ### Bugs Fixed - Fixed bug where storage clients when constructed with URLs with '#' character would truncate the path at the '#'. -### Other Changes - ## 12.19.0-beta.1 (2024-06-11) - Added support for service version 2024-08-04. - Added more detailed messaging for authorization failure cases. diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/Azure.Storage.Files.Shares.csproj b/sdk/storage/Azure.Storage.Files.Shares/src/Azure.Storage.Files.Shares.csproj index c47aa6389cea4..c1c0c689862a7 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/Azure.Storage.Files.Shares.csproj +++ b/sdk/storage/Azure.Storage.Files.Shares/src/Azure.Storage.Files.Shares.csproj @@ -4,7 +4,7 @@ Microsoft Azure.Storage.Files.Shares client library - 12.19.0-beta.2 + 12.19.0 12.18.0 FileSDK;$(DefineConstants) diff --git a/sdk/storage/Azure.Storage.Queues/CHANGELOG.md b/sdk/storage/Azure.Storage.Queues/CHANGELOG.md index 54cebd1ea9002..d66c860abd2c8 100644 --- a/sdk/storage/Azure.Storage.Queues/CHANGELOG.md +++ b/sdk/storage/Azure.Storage.Queues/CHANGELOG.md @@ -1,14 +1,9 @@ # Release History -## 12.19.0-beta.2 (Unreleased) +## 12.19.0 (2024-07-16) ### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- Includes all features from 12.19.0-beta.1. ## 12.19.0-beta.1 (2024-06-11) - Added support for service version 2024-08-04. diff --git a/sdk/storage/Azure.Storage.Queues/src/Azure.Storage.Queues.csproj b/sdk/storage/Azure.Storage.Queues/src/Azure.Storage.Queues.csproj index 3d7b97237ede7..4459e1832c649 100644 --- a/sdk/storage/Azure.Storage.Queues/src/Azure.Storage.Queues.csproj +++ b/sdk/storage/Azure.Storage.Queues/src/Azure.Storage.Queues.csproj @@ -4,7 +4,7 @@ Microsoft Azure.Storage.Queues client library - 12.19.0-beta.2 + 12.19.0 12.18.0 QueueSDK;$(DefineConstants) From 442f867b186146a0fa292888d8a7b80a9dfd9db0 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 16 Jul 2024 02:59:33 -0400 Subject: [PATCH 091/144] Update AutoRest C# version to 3.0.0-beta.20240715.1 (#45020) * Update Generator Version 3.0.0-beta.20240715.1 * Update SDK codes co_de_1 * remove unused configuration.json and tspCodeModel.json --------- Co-authored-by: FAREAST\chunyu --- eng/Packages.Data.props | 2 +- eng/emitter-package-lock.json | 34 ++++++++++++++----- eng/emitter-package.json | 2 +- .../{src/Generated => }/Configuration.json | 8 ++--- .../{src/Generated => }/tspCodeModel.json | 0 5 files changed, 32 insertions(+), 14 deletions(-) rename sdk/communication/Azure.Communication.Messages/{src/Generated => }/Configuration.json (91%) rename sdk/communication/Azure.Communication.Messages/{src/Generated => }/tspCodeModel.json (100%) diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index 402c727b039e9..4b17bfec9c115 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -226,7 +226,7 @@ All should have PrivateAssets="All" set so they don't become package dependencies --> - + diff --git a/eng/emitter-package-lock.json b/eng/emitter-package-lock.json index 1b900f546b036..dd64c67b7fd1c 100644 --- a/eng/emitter-package-lock.json +++ b/eng/emitter-package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20240711.1" + "@azure-tools/typespec-csharp": "0.2.0-beta.20240715.1" }, "devDependencies": { "@azure-tools/typespec-autorest": "0.43.0", @@ -22,9 +22,9 @@ } }, "node_modules/@autorest/csharp": { - "version": "3.0.0-beta.20240711.1", - "resolved": "https://registry.npmjs.org/@autorest/csharp/-/csharp-3.0.0-beta.20240711.1.tgz", - "integrity": "sha512-gZNbt8UqtTkTWVvmKIG6PifZRKvsvJbZk74gKvTruxxmnMJru8rct+xUwzfvio8eQmo5Z0xvrUAnSNCF7/0+DA==" + "version": "3.0.0-beta.20240715.1", + "resolved": "https://registry.npmjs.org/@autorest/csharp/-/csharp-3.0.0-beta.20240715.1.tgz", + "integrity": "sha512-3a/C33rCp1z7zxXZ+tTdlApgBDRZfPZjuwEEnWaYsMnhx0CQ7nD1Z7cM+r7QLqbeFrBtLW0Wg11/ElupCLYwZw==" }, "node_modules/@azure-tools/typespec-autorest": { "version": "0.43.0", @@ -116,11 +116,12 @@ } }, "node_modules/@azure-tools/typespec-csharp": { - "version": "0.2.0-beta.20240711.1", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-csharp/-/typespec-csharp-0.2.0-beta.20240711.1.tgz", - "integrity": "sha512-Y/gYQR/cPnPYZyORTEIM7Gvh2NrWOpRlwJE5bRDUx3n0rG+bOtmbqfrLaMSav/E/EPwA4bRO6KpK84XzZYQhoA==", + "version": "0.2.0-beta.20240715.1", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-csharp/-/typespec-csharp-0.2.0-beta.20240715.1.tgz", + "integrity": "sha512-uPfOE4Jq6GbDPrIjBBqMvRxuTrFs7SZG70HoUWhjYw/xhsmT8Kh/JxjYfAJEeC4sdcMXUh93j7/6rqyNXpAFMw==", "dependencies": { - "@autorest/csharp": "3.0.0-beta.20240711.1", + "@autorest/csharp": "3.0.0-beta.20240715.1", + "@typespec/http-client-csharp": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js-test-autorest/npm/registry/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20240712.1.tgz", "json-serialize-refs": "0.1.0-0" }, "peerDependencies": { @@ -261,6 +262,23 @@ "@typespec/compiler": "~0.57.0" } }, + "node_modules/@typespec/http-client-csharp": { + "version": "0.1.9-alpha.20240712.1", + "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js-test-autorest/npm/registry/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20240712.1.tgz", + "integrity": "sha512-hmlnbLiP4XoNa46QRzQMXfFAf0G5KB32G4Ut0QTlkx7NYhWxKviNPiG0H6RcxM5FeuHqxWorX0kBEAYySHj95w==", + "dependencies": { + "json-serialize-refs": "0.1.0-0" + }, + "peerDependencies": { + "@azure-tools/typespec-azure-core": ">=0.36.0 <1.0.0", + "@azure-tools/typespec-client-generator-core": ">=0.36.0 <1.0.0", + "@typespec/compiler": ">=0.50.0 <1.0.0", + "@typespec/http": ">=0.50.0 <1.0.0", + "@typespec/openapi": ">=0.50.0 <1.0.0", + "@typespec/rest": ">=0.50.0 <1.0.0", + "@typespec/versioning": ">=0.50.0 <1.0.0" + } + }, "node_modules/@typespec/openapi": { "version": "0.57.0", "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-0.57.0.tgz", diff --git a/eng/emitter-package.json b/eng/emitter-package.json index cb79576a6d7fe..23c25aa7c1b8a 100644 --- a/eng/emitter-package.json +++ b/eng/emitter-package.json @@ -1,7 +1,7 @@ { "main": "dist/src/index.js", "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20240711.1" + "@azure-tools/typespec-csharp": "0.2.0-beta.20240715.1" }, "devDependencies": { "@azure-tools/typespec-autorest": "0.43.0", diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/Configuration.json b/sdk/communication/Azure.Communication.Messages/Configuration.json similarity index 91% rename from sdk/communication/Azure.Communication.Messages/src/Generated/Configuration.json rename to sdk/communication/Azure.Communication.Messages/Configuration.json index c38716c9bcc5e..d4f46001482b3 100644 --- a/sdk/communication/Azure.Communication.Messages/src/Generated/Configuration.json +++ b/sdk/communication/Azure.Communication.Messages/Configuration.json @@ -2,11 +2,11 @@ "output-folder": ".", "namespace": "Azure.Communication.Messages", "library-name": "Azure.Communication.Messages", + "model-namespace": false, + "flavor": "azure", + "use-model-reader-writer": true, "shared-source-folders": [ "../../TempTypeSpecFiles/Communication.Messages/node_modules/@autorest/csharp/Generator.Shared", "../../TempTypeSpecFiles/Communication.Messages/node_modules/@autorest/csharp/Azure.Core.Shared" - ], - "model-namespace": false, - "flavor": "azure", - "use-model-reader-writer": true + ] } diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/tspCodeModel.json b/sdk/communication/Azure.Communication.Messages/tspCodeModel.json similarity index 100% rename from sdk/communication/Azure.Communication.Messages/src/Generated/tspCodeModel.json rename to sdk/communication/Azure.Communication.Messages/tspCodeModel.json From b48a2347e72d4d17bb22a83128664553ba78c59e Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 16 Jul 2024 09:56:56 -0400 Subject: [PATCH 092/144] Increment package version after release of Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents (#45011) --- .../CHANGELOG.md | 10 ++++++++++ ...zure.WebJobs.Extensions.AuthenticationEvents.csproj | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/CHANGELOG.md b/sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/CHANGELOG.md index 936833eda6c30..bcdec88c7c412 100644 --- a/sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/CHANGELOG.md +++ b/sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.1.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.0.1 (2024-06-25) ### Other Changes diff --git a/sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/src/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents.csproj b/sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/src/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents.csproj index 47299e92932aa..4c70212975b6a 100644 --- a/sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/src/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents.csproj +++ b/sdk/entra/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents/src/Microsoft.Azure.WebJobs.Extensions.AuthenticationEvents.csproj @@ -2,7 +2,9 @@ $(RequiredTargetFrameworks) true - 1.0.1 + 1.1.0-beta.1 + + 1.0.1 Triggers for Azure AD Authentication event custom extensions. Lets you focus on your business logic. From 328c2d13ee840b2288068b104edabf3beef569a5 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 16 Jul 2024 10:33:08 -0400 Subject: [PATCH 093/144] Update AutoRest C# version to 3.0.0-beta.20240716.2 (#45027) * Update Generator Version 3.0.0-beta.20240716.2 * Update SDK codes de_he_2 * Update SDK codes he_me_3 * Update SDK codes st_wo_6 * Update SDK codes ad_co_0 * Update SDK codes mi_pu_4 * Update SDK codes pu_sq_5 * fix compilation error due to parameter name changes --------- Co-authored-by: Mingzhe Huang (from Dev Box) --- eng/Packages.Data.props | 2 +- eng/emitter-package-lock.json | 16 +- eng/emitter-package.json | 2 +- .../AzureCommunicationServicesRestClient.cs | 112 ++--- .../src/Generated/CallConnectionRestClient.cs | 168 ++++---- .../src/Generated/CallDialogRestClient.cs | 56 +-- .../src/Generated/CallMediaRestClient.cs | 392 +++++++++--------- .../src/CallAutomationClient.cs | 4 +- .../Generated/CallConnectionsRestClient.cs | 84 ++-- .../src/Generated/ContentRestClient.cs | 56 +-- .../src/Generated/ServerCallingRestClient.cs | 112 ++--- .../Generated/DigitalTwinModelsRestClient.cs | 92 ++-- .../src/Generated/DigitalTwinsRestClient.cs | 102 ++--- .../src/Generated/EventRoutesRestClient.cs | 96 ++--- .../src/Generated/QueryRestClient.cs | 6 +- .../src/Generated/ConfigurationRestClient.cs | 28 +- .../src/Generated/DevicesRestClient.cs | 28 +- .../src/Generated/ModulesRestClient.cs | 28 +- .../src/Generated/RenderRestClient.cs | 96 ++--- .../src/Generated/SearchRestClient.cs | 168 ++++---- .../Generated/MixedRealityStsRestClient.cs | 18 +- .../src/Generated/DocumentsRestClient.cs | 84 ++-- .../src/Generated/SkillsetsRestClient.cs | 28 +- .../src/BlobServiceClient.cs | 4 +- .../src/Generated/ServiceRestClient.cs | 28 +- .../src/Generated/FileRestClient.cs | 216 +++++----- .../src/Generated/ServiceRestClient.cs | 28 +- .../src/Generated/ShareRestClient.cs | 144 +++---- .../src/ShareClient.cs | 28 +- .../src/ShareFileClient.cs | 48 +-- .../src/ShareLeaseClient.cs | 8 +- .../src/ShareServiceClient.cs | 4 +- .../src/Generated/ServiceRestClient.cs | 28 +- .../src/QueueServiceClient.cs | 4 +- 34 files changed, 1159 insertions(+), 1159 deletions(-) diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index 4b17bfec9c115..a11d616993155 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -226,7 +226,7 @@ All should have PrivateAssets="All" set so they don't become package dependencies --> - + diff --git a/eng/emitter-package-lock.json b/eng/emitter-package-lock.json index dd64c67b7fd1c..cb550726ab329 100644 --- a/eng/emitter-package-lock.json +++ b/eng/emitter-package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20240715.1" + "@azure-tools/typespec-csharp": "0.2.0-beta.20240716.2" }, "devDependencies": { "@azure-tools/typespec-autorest": "0.43.0", @@ -22,9 +22,9 @@ } }, "node_modules/@autorest/csharp": { - "version": "3.0.0-beta.20240715.1", - "resolved": "https://registry.npmjs.org/@autorest/csharp/-/csharp-3.0.0-beta.20240715.1.tgz", - "integrity": "sha512-3a/C33rCp1z7zxXZ+tTdlApgBDRZfPZjuwEEnWaYsMnhx0CQ7nD1Z7cM+r7QLqbeFrBtLW0Wg11/ElupCLYwZw==" + "version": "3.0.0-beta.20240716.2", + "resolved": "https://registry.npmjs.org/@autorest/csharp/-/csharp-3.0.0-beta.20240716.2.tgz", + "integrity": "sha512-41B3k1dYg/LX5QrdepgKH6TvmKK5LLW+u+a5fp4GmbJSMPWVkubmrq3u+7VlNOUex050/f+qRG5hjuCV+Ghhmw==" }, "node_modules/@azure-tools/typespec-autorest": { "version": "0.43.0", @@ -116,11 +116,11 @@ } }, "node_modules/@azure-tools/typespec-csharp": { - "version": "0.2.0-beta.20240715.1", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-csharp/-/typespec-csharp-0.2.0-beta.20240715.1.tgz", - "integrity": "sha512-uPfOE4Jq6GbDPrIjBBqMvRxuTrFs7SZG70HoUWhjYw/xhsmT8Kh/JxjYfAJEeC4sdcMXUh93j7/6rqyNXpAFMw==", + "version": "0.2.0-beta.20240716.2", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-csharp/-/typespec-csharp-0.2.0-beta.20240716.2.tgz", + "integrity": "sha512-7Oa7i0J2TmcP3BFMHMzjSfQbp1hFQkLTNn1FUxAv8vNJaYTtP3Y2d5JZ2vTTrpULHsF8T3CwdQ1pGTS6xVk5iQ==", "dependencies": { - "@autorest/csharp": "3.0.0-beta.20240715.1", + "@autorest/csharp": "3.0.0-beta.20240716.2", "@typespec/http-client-csharp": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js-test-autorest/npm/registry/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20240712.1.tgz", "json-serialize-refs": "0.1.0-0" }, diff --git a/eng/emitter-package.json b/eng/emitter-package.json index 23c25aa7c1b8a..76956d3f26eb6 100644 --- a/eng/emitter-package.json +++ b/eng/emitter-package.json @@ -1,7 +1,7 @@ { "main": "dist/src/index.js", "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20240715.1" + "@azure-tools/typespec-csharp": "0.2.0-beta.20240716.2" }, "devDependencies": { "@azure-tools/typespec-autorest": "0.43.0", diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/AzureCommunicationServicesRestClient.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/AzureCommunicationServicesRestClient.cs index 12d9ad6706db7..30b3c24f2578d 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/AzureCommunicationServicesRestClient.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/AzureCommunicationServicesRestClient.cs @@ -37,7 +37,7 @@ public AzureCommunicationServicesRestClient(ClientDiagnostics clientDiagnostics, _apiVersion = apiVersion ?? throw new ArgumentNullException(nameof(apiVersion)); } - internal HttpMessage CreateCreateCallRequest(CreateCallRequestInternal createCallRequest) + internal HttpMessage CreateCreateCallRequest(CreateCallRequestInternal createCallRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -52,23 +52,23 @@ internal HttpMessage CreateCreateCallRequest(CreateCallRequestInternal createCal request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(createCallRequest); + content.JsonWriter.WriteObjectValue(createCallRequestInternal); request.Content = content; return message; } /// Create an outbound call. - /// The create call request. + /// The create call request. /// The cancellation token to use. - /// is null. - public async Task> CreateCallAsync(CreateCallRequestInternal createCallRequest, CancellationToken cancellationToken = default) + /// is null. + public async Task> CreateCallAsync(CreateCallRequestInternal createCallRequestInternal, CancellationToken cancellationToken = default) { - if (createCallRequest == null) + if (createCallRequestInternal == null) { - throw new ArgumentNullException(nameof(createCallRequest)); + throw new ArgumentNullException(nameof(createCallRequestInternal)); } - using var message = CreateCreateCallRequest(createCallRequest); + using var message = CreateCreateCallRequest(createCallRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -85,17 +85,17 @@ public async Task> CreateCallAsync(Cr } /// Create an outbound call. - /// The create call request. + /// The create call request. /// The cancellation token to use. - /// is null. - public Response CreateCall(CreateCallRequestInternal createCallRequest, CancellationToken cancellationToken = default) + /// is null. + public Response CreateCall(CreateCallRequestInternal createCallRequestInternal, CancellationToken cancellationToken = default) { - if (createCallRequest == null) + if (createCallRequestInternal == null) { - throw new ArgumentNullException(nameof(createCallRequest)); + throw new ArgumentNullException(nameof(createCallRequestInternal)); } - using var message = CreateCreateCallRequest(createCallRequest); + using var message = CreateCreateCallRequest(createCallRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -111,7 +111,7 @@ public Response CreateCall(CreateCallRequestIn } } - internal HttpMessage CreateAnswerCallRequest(AnswerCallRequestInternal answerCallRequest) + internal HttpMessage CreateAnswerCallRequest(AnswerCallRequestInternal answerCallRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -126,24 +126,24 @@ internal HttpMessage CreateAnswerCallRequest(AnswerCallRequestInternal answerCal request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(answerCallRequest); + content.JsonWriter.WriteObjectValue(answerCallRequestInternal); request.Content = content; return message; } /// Answer a Call. - /// The answer call request. + /// The answer call request. /// The cancellation token to use. - /// is null. + /// is null. /// Answer a call using the IncomingCallContext from Event Grid. - public async Task> AnswerCallAsync(AnswerCallRequestInternal answerCallRequest, CancellationToken cancellationToken = default) + public async Task> AnswerCallAsync(AnswerCallRequestInternal answerCallRequestInternal, CancellationToken cancellationToken = default) { - if (answerCallRequest == null) + if (answerCallRequestInternal == null) { - throw new ArgumentNullException(nameof(answerCallRequest)); + throw new ArgumentNullException(nameof(answerCallRequestInternal)); } - using var message = CreateAnswerCallRequest(answerCallRequest); + using var message = CreateAnswerCallRequest(answerCallRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -160,18 +160,18 @@ public async Task> AnswerCallAsync(An } /// Answer a Call. - /// The answer call request. + /// The answer call request. /// The cancellation token to use. - /// is null. + /// is null. /// Answer a call using the IncomingCallContext from Event Grid. - public Response AnswerCall(AnswerCallRequestInternal answerCallRequest, CancellationToken cancellationToken = default) + public Response AnswerCall(AnswerCallRequestInternal answerCallRequestInternal, CancellationToken cancellationToken = default) { - if (answerCallRequest == null) + if (answerCallRequestInternal == null) { - throw new ArgumentNullException(nameof(answerCallRequest)); + throw new ArgumentNullException(nameof(answerCallRequestInternal)); } - using var message = CreateAnswerCallRequest(answerCallRequest); + using var message = CreateAnswerCallRequest(answerCallRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -187,7 +187,7 @@ public Response AnswerCall(AnswerCallRequestIn } } - internal HttpMessage CreateRedirectCallRequest(RedirectCallRequestInternal redirectCallRequest) + internal HttpMessage CreateRedirectCallRequest(RedirectCallRequestInternal redirectCallRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -202,23 +202,23 @@ internal HttpMessage CreateRedirectCallRequest(RedirectCallRequestInternal redir request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(redirectCallRequest); + content.JsonWriter.WriteObjectValue(redirectCallRequestInternal); request.Content = content; return message; } /// Redirect a call. - /// The redirect call request. + /// The redirect call request. /// The cancellation token to use. - /// is null. - public async Task RedirectCallAsync(RedirectCallRequestInternal redirectCallRequest, CancellationToken cancellationToken = default) + /// is null. + public async Task RedirectCallAsync(RedirectCallRequestInternal redirectCallRequestInternal, CancellationToken cancellationToken = default) { - if (redirectCallRequest == null) + if (redirectCallRequestInternal == null) { - throw new ArgumentNullException(nameof(redirectCallRequest)); + throw new ArgumentNullException(nameof(redirectCallRequestInternal)); } - using var message = CreateRedirectCallRequest(redirectCallRequest); + using var message = CreateRedirectCallRequest(redirectCallRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -230,17 +230,17 @@ public async Task RedirectCallAsync(RedirectCallRequestInternal redire } /// Redirect a call. - /// The redirect call request. + /// The redirect call request. /// The cancellation token to use. - /// is null. - public Response RedirectCall(RedirectCallRequestInternal redirectCallRequest, CancellationToken cancellationToken = default) + /// is null. + public Response RedirectCall(RedirectCallRequestInternal redirectCallRequestInternal, CancellationToken cancellationToken = default) { - if (redirectCallRequest == null) + if (redirectCallRequestInternal == null) { - throw new ArgumentNullException(nameof(redirectCallRequest)); + throw new ArgumentNullException(nameof(redirectCallRequestInternal)); } - using var message = CreateRedirectCallRequest(redirectCallRequest); + using var message = CreateRedirectCallRequest(redirectCallRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -251,7 +251,7 @@ public Response RedirectCall(RedirectCallRequestInternal redirectCallRequest, Ca } } - internal HttpMessage CreateRejectCallRequest(RejectCallRequestInternal rejectCallRequest) + internal HttpMessage CreateRejectCallRequest(RejectCallRequestInternal rejectCallRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -266,23 +266,23 @@ internal HttpMessage CreateRejectCallRequest(RejectCallRequestInternal rejectCal request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(rejectCallRequest); + content.JsonWriter.WriteObjectValue(rejectCallRequestInternal); request.Content = content; return message; } /// Reject the call. - /// The reject call request. + /// The reject call request. /// The cancellation token to use. - /// is null. - public async Task RejectCallAsync(RejectCallRequestInternal rejectCallRequest, CancellationToken cancellationToken = default) + /// is null. + public async Task RejectCallAsync(RejectCallRequestInternal rejectCallRequestInternal, CancellationToken cancellationToken = default) { - if (rejectCallRequest == null) + if (rejectCallRequestInternal == null) { - throw new ArgumentNullException(nameof(rejectCallRequest)); + throw new ArgumentNullException(nameof(rejectCallRequestInternal)); } - using var message = CreateRejectCallRequest(rejectCallRequest); + using var message = CreateRejectCallRequest(rejectCallRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -294,17 +294,17 @@ public async Task RejectCallAsync(RejectCallRequestInternal rejectCall } /// Reject the call. - /// The reject call request. + /// The reject call request. /// The cancellation token to use. - /// is null. - public Response RejectCall(RejectCallRequestInternal rejectCallRequest, CancellationToken cancellationToken = default) + /// is null. + public Response RejectCall(RejectCallRequestInternal rejectCallRequestInternal, CancellationToken cancellationToken = default) { - if (rejectCallRequest == null) + if (rejectCallRequestInternal == null) { - throw new ArgumentNullException(nameof(rejectCallRequest)); + throw new ArgumentNullException(nameof(rejectCallRequestInternal)); } - using var message = CreateRejectCallRequest(rejectCallRequest); + using var message = CreateRejectCallRequest(rejectCallRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/CallConnectionRestClient.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/CallConnectionRestClient.cs index 4cb37cb1dcb23..831f28de3d56c 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/CallConnectionRestClient.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/CallConnectionRestClient.cs @@ -227,7 +227,7 @@ public Response TerminateCall(string callConnectionId, CancellationToken cancell } } - internal HttpMessage CreateTransferToParticipantRequest(string callConnectionId, TransferToParticipantRequestInternal transferToParticipantRequest) + internal HttpMessage CreateTransferToParticipantRequest(string callConnectionId, TransferToParticipantRequestInternal transferToParticipantRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -244,28 +244,28 @@ internal HttpMessage CreateTransferToParticipantRequest(string callConnectionId, request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(transferToParticipantRequest); + content.JsonWriter.WriteObjectValue(transferToParticipantRequestInternal); request.Content = content; return message; } /// Transfer the call to a participant. /// The call connection id. - /// The transfer to participant request. + /// The transfer to participant request. /// The cancellation token to use. - /// or is null. - public async Task> TransferToParticipantAsync(string callConnectionId, TransferToParticipantRequestInternal transferToParticipantRequest, CancellationToken cancellationToken = default) + /// or is null. + public async Task> TransferToParticipantAsync(string callConnectionId, TransferToParticipantRequestInternal transferToParticipantRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (transferToParticipantRequest == null) + if (transferToParticipantRequestInternal == null) { - throw new ArgumentNullException(nameof(transferToParticipantRequest)); + throw new ArgumentNullException(nameof(transferToParticipantRequestInternal)); } - using var message = CreateTransferToParticipantRequest(callConnectionId, transferToParticipantRequest); + using var message = CreateTransferToParticipantRequest(callConnectionId, transferToParticipantRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -283,21 +283,21 @@ public async Task> TransferToParticipa /// Transfer the call to a participant. /// The call connection id. - /// The transfer to participant request. + /// The transfer to participant request. /// The cancellation token to use. - /// or is null. - public Response TransferToParticipant(string callConnectionId, TransferToParticipantRequestInternal transferToParticipantRequest, CancellationToken cancellationToken = default) + /// or is null. + public Response TransferToParticipant(string callConnectionId, TransferToParticipantRequestInternal transferToParticipantRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (transferToParticipantRequest == null) + if (transferToParticipantRequestInternal == null) { - throw new ArgumentNullException(nameof(transferToParticipantRequest)); + throw new ArgumentNullException(nameof(transferToParticipantRequestInternal)); } - using var message = CreateTransferToParticipantRequest(callConnectionId, transferToParticipantRequest); + using var message = CreateTransferToParticipantRequest(callConnectionId, transferToParticipantRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -383,7 +383,7 @@ public Response GetParticipants(string callConn } } - internal HttpMessage CreateAddParticipantRequest(string callConnectionId, AddParticipantRequestInternal addParticipantRequest) + internal HttpMessage CreateAddParticipantRequest(string callConnectionId, AddParticipantRequestInternal addParticipantRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -400,28 +400,28 @@ internal HttpMessage CreateAddParticipantRequest(string callConnectionId, AddPar request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(addParticipantRequest); + content.JsonWriter.WriteObjectValue(addParticipantRequestInternal); request.Content = content; return message; } /// Add a participant to the call. /// The call connection Id. - /// The to use. + /// The to use. /// The cancellation token to use. - /// or is null. - public async Task> AddParticipantAsync(string callConnectionId, AddParticipantRequestInternal addParticipantRequest, CancellationToken cancellationToken = default) + /// or is null. + public async Task> AddParticipantAsync(string callConnectionId, AddParticipantRequestInternal addParticipantRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (addParticipantRequest == null) + if (addParticipantRequestInternal == null) { - throw new ArgumentNullException(nameof(addParticipantRequest)); + throw new ArgumentNullException(nameof(addParticipantRequestInternal)); } - using var message = CreateAddParticipantRequest(callConnectionId, addParticipantRequest); + using var message = CreateAddParticipantRequest(callConnectionId, addParticipantRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -439,21 +439,21 @@ public async Task> AddParticipantAsync( /// Add a participant to the call. /// The call connection Id. - /// The to use. + /// The to use. /// The cancellation token to use. - /// or is null. - public Response AddParticipant(string callConnectionId, AddParticipantRequestInternal addParticipantRequest, CancellationToken cancellationToken = default) + /// or is null. + public Response AddParticipant(string callConnectionId, AddParticipantRequestInternal addParticipantRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (addParticipantRequest == null) + if (addParticipantRequestInternal == null) { - throw new ArgumentNullException(nameof(addParticipantRequest)); + throw new ArgumentNullException(nameof(addParticipantRequestInternal)); } - using var message = CreateAddParticipantRequest(callConnectionId, addParticipantRequest); + using var message = CreateAddParticipantRequest(callConnectionId, addParticipantRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -469,7 +469,7 @@ public Response AddParticipant(string callConnec } } - internal HttpMessage CreateRemoveParticipantRequest(string callConnectionId, RemoveParticipantRequestInternal removeParticipantRequest) + internal HttpMessage CreateRemoveParticipantRequest(string callConnectionId, RemoveParticipantRequestInternal removeParticipantRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -486,28 +486,28 @@ internal HttpMessage CreateRemoveParticipantRequest(string callConnectionId, Rem request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(removeParticipantRequest); + content.JsonWriter.WriteObjectValue(removeParticipantRequestInternal); request.Content = content; return message; } /// Remove a participant from the call using identifier. /// The call connection id. - /// The participant to be removed from the call. + /// The participant to be removed from the call. /// The cancellation token to use. - /// or is null. - public async Task> RemoveParticipantAsync(string callConnectionId, RemoveParticipantRequestInternal removeParticipantRequest, CancellationToken cancellationToken = default) + /// or is null. + public async Task> RemoveParticipantAsync(string callConnectionId, RemoveParticipantRequestInternal removeParticipantRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (removeParticipantRequest == null) + if (removeParticipantRequestInternal == null) { - throw new ArgumentNullException(nameof(removeParticipantRequest)); + throw new ArgumentNullException(nameof(removeParticipantRequestInternal)); } - using var message = CreateRemoveParticipantRequest(callConnectionId, removeParticipantRequest); + using var message = CreateRemoveParticipantRequest(callConnectionId, removeParticipantRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -525,21 +525,21 @@ public async Task> RemoveParticipant /// Remove a participant from the call using identifier. /// The call connection id. - /// The participant to be removed from the call. + /// The participant to be removed from the call. /// The cancellation token to use. - /// or is null. - public Response RemoveParticipant(string callConnectionId, RemoveParticipantRequestInternal removeParticipantRequest, CancellationToken cancellationToken = default) + /// or is null. + public Response RemoveParticipant(string callConnectionId, RemoveParticipantRequestInternal removeParticipantRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (removeParticipantRequest == null) + if (removeParticipantRequestInternal == null) { - throw new ArgumentNullException(nameof(removeParticipantRequest)); + throw new ArgumentNullException(nameof(removeParticipantRequestInternal)); } - using var message = CreateRemoveParticipantRequest(callConnectionId, removeParticipantRequest); + using var message = CreateRemoveParticipantRequest(callConnectionId, removeParticipantRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -555,7 +555,7 @@ public Response RemoveParticipant(string call } } - internal HttpMessage CreateMuteRequest(string callConnectionId, MuteParticipantsRequestInternal muteParticipantsRequest) + internal HttpMessage CreateMuteRequest(string callConnectionId, MuteParticipantsRequestInternal muteParticipantsRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -572,28 +572,28 @@ internal HttpMessage CreateMuteRequest(string callConnectionId, MuteParticipants request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(muteParticipantsRequest); + content.JsonWriter.WriteObjectValue(muteParticipantsRequestInternal); request.Content = content; return message; } /// Mute participants from the call using identifier. /// The call connection id. - /// The participants to be muted from the call. + /// The participants to be muted from the call. /// The cancellation token to use. - /// or is null. - public async Task> MuteAsync(string callConnectionId, MuteParticipantsRequestInternal muteParticipantsRequest, CancellationToken cancellationToken = default) + /// or is null. + public async Task> MuteAsync(string callConnectionId, MuteParticipantsRequestInternal muteParticipantsRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (muteParticipantsRequest == null) + if (muteParticipantsRequestInternal == null) { - throw new ArgumentNullException(nameof(muteParticipantsRequest)); + throw new ArgumentNullException(nameof(muteParticipantsRequestInternal)); } - using var message = CreateMuteRequest(callConnectionId, muteParticipantsRequest); + using var message = CreateMuteRequest(callConnectionId, muteParticipantsRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -611,21 +611,21 @@ public async Task> MuteAsync(string callConnecti /// Mute participants from the call using identifier. /// The call connection id. - /// The participants to be muted from the call. + /// The participants to be muted from the call. /// The cancellation token to use. - /// or is null. - public Response Mute(string callConnectionId, MuteParticipantsRequestInternal muteParticipantsRequest, CancellationToken cancellationToken = default) + /// or is null. + public Response Mute(string callConnectionId, MuteParticipantsRequestInternal muteParticipantsRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (muteParticipantsRequest == null) + if (muteParticipantsRequestInternal == null) { - throw new ArgumentNullException(nameof(muteParticipantsRequest)); + throw new ArgumentNullException(nameof(muteParticipantsRequestInternal)); } - using var message = CreateMuteRequest(callConnectionId, muteParticipantsRequest); + using var message = CreateMuteRequest(callConnectionId, muteParticipantsRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -641,7 +641,7 @@ public Response Mute(string callConnectionId, MutePartici } } - internal HttpMessage CreateUnmuteRequest(string callConnectionId, UnmuteParticipantsRequestInternal unmuteParticipantsRequest) + internal HttpMessage CreateUnmuteRequest(string callConnectionId, UnmuteParticipantsRequestInternal unmuteParticipantsRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -658,28 +658,28 @@ internal HttpMessage CreateUnmuteRequest(string callConnectionId, UnmuteParticip request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(unmuteParticipantsRequest); + content.JsonWriter.WriteObjectValue(unmuteParticipantsRequestInternal); request.Content = content; return message; } /// Unmute participants from the call using identifier. /// The call connection id. - /// The participants to be unmuted from the call. + /// The participants to be unmuted from the call. /// The cancellation token to use. - /// or is null. - public async Task> UnmuteAsync(string callConnectionId, UnmuteParticipantsRequestInternal unmuteParticipantsRequest, CancellationToken cancellationToken = default) + /// or is null. + public async Task> UnmuteAsync(string callConnectionId, UnmuteParticipantsRequestInternal unmuteParticipantsRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (unmuteParticipantsRequest == null) + if (unmuteParticipantsRequestInternal == null) { - throw new ArgumentNullException(nameof(unmuteParticipantsRequest)); + throw new ArgumentNullException(nameof(unmuteParticipantsRequestInternal)); } - using var message = CreateUnmuteRequest(callConnectionId, unmuteParticipantsRequest); + using var message = CreateUnmuteRequest(callConnectionId, unmuteParticipantsRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -697,21 +697,21 @@ public async Task> UnmuteAsync(string callConn /// Unmute participants from the call using identifier. /// The call connection id. - /// The participants to be unmuted from the call. + /// The participants to be unmuted from the call. /// The cancellation token to use. - /// or is null. - public Response Unmute(string callConnectionId, UnmuteParticipantsRequestInternal unmuteParticipantsRequest, CancellationToken cancellationToken = default) + /// or is null. + public Response Unmute(string callConnectionId, UnmuteParticipantsRequestInternal unmuteParticipantsRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (unmuteParticipantsRequest == null) + if (unmuteParticipantsRequestInternal == null) { - throw new ArgumentNullException(nameof(unmuteParticipantsRequest)); + throw new ArgumentNullException(nameof(unmuteParticipantsRequestInternal)); } - using var message = CreateUnmuteRequest(callConnectionId, unmuteParticipantsRequest); + using var message = CreateUnmuteRequest(callConnectionId, unmuteParticipantsRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -727,7 +727,7 @@ public Response Unmute(string callConnectionId, UnmuteP } } - internal HttpMessage CreateCancelAddParticipantRequest(string callConnectionId, CancelAddParticipantRequestInternal cancelAddParticipantRequest) + internal HttpMessage CreateCancelAddParticipantRequest(string callConnectionId, CancelAddParticipantRequestInternal cancelAddParticipantRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -744,28 +744,28 @@ internal HttpMessage CreateCancelAddParticipantRequest(string callConnectionId, request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(cancelAddParticipantRequest); + content.JsonWriter.WriteObjectValue(cancelAddParticipantRequestInternal); request.Content = content; return message; } /// Cancel add participant operation. /// The call connection Id. - /// Cancellation request. + /// Cancellation request. /// The cancellation token to use. - /// or is null. - public async Task> CancelAddParticipantAsync(string callConnectionId, CancelAddParticipantRequestInternal cancelAddParticipantRequest, CancellationToken cancellationToken = default) + /// or is null. + public async Task> CancelAddParticipantAsync(string callConnectionId, CancelAddParticipantRequestInternal cancelAddParticipantRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (cancelAddParticipantRequest == null) + if (cancelAddParticipantRequestInternal == null) { - throw new ArgumentNullException(nameof(cancelAddParticipantRequest)); + throw new ArgumentNullException(nameof(cancelAddParticipantRequestInternal)); } - using var message = CreateCancelAddParticipantRequest(callConnectionId, cancelAddParticipantRequest); + using var message = CreateCancelAddParticipantRequest(callConnectionId, cancelAddParticipantRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -783,21 +783,21 @@ public async Task> CancelAddParti /// Cancel add participant operation. /// The call connection Id. - /// Cancellation request. + /// Cancellation request. /// The cancellation token to use. - /// or is null. - public Response CancelAddParticipant(string callConnectionId, CancelAddParticipantRequestInternal cancelAddParticipantRequest, CancellationToken cancellationToken = default) + /// or is null. + public Response CancelAddParticipant(string callConnectionId, CancelAddParticipantRequestInternal cancelAddParticipantRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (cancelAddParticipantRequest == null) + if (cancelAddParticipantRequestInternal == null) { - throw new ArgumentNullException(nameof(cancelAddParticipantRequest)); + throw new ArgumentNullException(nameof(cancelAddParticipantRequestInternal)); } - using var message = CreateCancelAddParticipantRequest(callConnectionId, cancelAddParticipantRequest); + using var message = CreateCancelAddParticipantRequest(callConnectionId, cancelAddParticipantRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/CallDialogRestClient.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/CallDialogRestClient.cs index 454884aa67448..a82b7a6ce2e0e 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/CallDialogRestClient.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/CallDialogRestClient.cs @@ -37,7 +37,7 @@ public CallDialogRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pi _apiVersion = apiVersion ?? throw new ArgumentNullException(nameof(apiVersion)); } - internal HttpMessage CreateStartDialogRequest(string callConnectionId, string dialogId, StartDialogRequestInternal startDialogRequest) + internal HttpMessage CreateStartDialogRequest(string callConnectionId, string dialogId, StartDialogRequestInternal startDialogRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -53,7 +53,7 @@ internal HttpMessage CreateStartDialogRequest(string callConnectionId, string di request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(startDialogRequest); + content.JsonWriter.WriteObjectValue(startDialogRequestInternal); request.Content = content; return message; } @@ -61,11 +61,11 @@ internal HttpMessage CreateStartDialogRequest(string callConnectionId, string di /// Start a dialog targeting a particular participant on the call. /// The call connection id. /// The dialog id. - /// The start dialog request. + /// The start dialog request. /// The cancellation token to use. - /// , or is null. + /// , or is null. /// Start a dialog. - public async Task> StartDialogAsync(string callConnectionId, string dialogId, StartDialogRequestInternal startDialogRequest, CancellationToken cancellationToken = default) + public async Task> StartDialogAsync(string callConnectionId, string dialogId, StartDialogRequestInternal startDialogRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { @@ -75,12 +75,12 @@ public async Task> StartDialogAsync(string { throw new ArgumentNullException(nameof(dialogId)); } - if (startDialogRequest == null) + if (startDialogRequestInternal == null) { - throw new ArgumentNullException(nameof(startDialogRequest)); + throw new ArgumentNullException(nameof(startDialogRequestInternal)); } - using var message = CreateStartDialogRequest(callConnectionId, dialogId, startDialogRequest); + using var message = CreateStartDialogRequest(callConnectionId, dialogId, startDialogRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -99,11 +99,11 @@ public async Task> StartDialogAsync(string /// Start a dialog targeting a particular participant on the call. /// The call connection id. /// The dialog id. - /// The start dialog request. + /// The start dialog request. /// The cancellation token to use. - /// , or is null. + /// , or is null. /// Start a dialog. - public Response StartDialog(string callConnectionId, string dialogId, StartDialogRequestInternal startDialogRequest, CancellationToken cancellationToken = default) + public Response StartDialog(string callConnectionId, string dialogId, StartDialogRequestInternal startDialogRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { @@ -113,12 +113,12 @@ public Response StartDialog(string callConnectionId { throw new ArgumentNullException(nameof(dialogId)); } - if (startDialogRequest == null) + if (startDialogRequestInternal == null) { - throw new ArgumentNullException(nameof(startDialogRequest)); + throw new ArgumentNullException(nameof(startDialogRequestInternal)); } - using var message = CreateStartDialogRequest(callConnectionId, dialogId, startDialogRequest); + using var message = CreateStartDialogRequest(callConnectionId, dialogId, startDialogRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -211,7 +211,7 @@ public Response StopDialog(string callConnectionId, string dialogId, string oper } } - internal HttpMessage CreateUpdateDialogRequest(string callConnectionId, string dialogId, UpdateDialogRequestInternal updateDialogRequest) + internal HttpMessage CreateUpdateDialogRequest(string callConnectionId, string dialogId, UpdateDialogRequestInternal updateDialogRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -227,7 +227,7 @@ internal HttpMessage CreateUpdateDialogRequest(string callConnectionId, string d request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(updateDialogRequest); + content.JsonWriter.WriteObjectValue(updateDialogRequestInternal); request.Content = content; return message; } @@ -235,11 +235,11 @@ internal HttpMessage CreateUpdateDialogRequest(string callConnectionId, string d /// Update an ongoing dialog in a call. /// The call connection id. /// The dialog id. - /// The update dialog request. + /// The update dialog request. /// The cancellation token to use. - /// , or is null. + /// , or is null. /// Update a dialog. - public async Task UpdateDialogAsync(string callConnectionId, string dialogId, UpdateDialogRequestInternal updateDialogRequest, CancellationToken cancellationToken = default) + public async Task UpdateDialogAsync(string callConnectionId, string dialogId, UpdateDialogRequestInternal updateDialogRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { @@ -249,12 +249,12 @@ public async Task UpdateDialogAsync(string callConnectionId, string di { throw new ArgumentNullException(nameof(dialogId)); } - if (updateDialogRequest == null) + if (updateDialogRequestInternal == null) { - throw new ArgumentNullException(nameof(updateDialogRequest)); + throw new ArgumentNullException(nameof(updateDialogRequestInternal)); } - using var message = CreateUpdateDialogRequest(callConnectionId, dialogId, updateDialogRequest); + using var message = CreateUpdateDialogRequest(callConnectionId, dialogId, updateDialogRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -268,11 +268,11 @@ public async Task UpdateDialogAsync(string callConnectionId, string di /// Update an ongoing dialog in a call. /// The call connection id. /// The dialog id. - /// The update dialog request. + /// The update dialog request. /// The cancellation token to use. - /// , or is null. + /// , or is null. /// Update a dialog. - public Response UpdateDialog(string callConnectionId, string dialogId, UpdateDialogRequestInternal updateDialogRequest, CancellationToken cancellationToken = default) + public Response UpdateDialog(string callConnectionId, string dialogId, UpdateDialogRequestInternal updateDialogRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { @@ -282,12 +282,12 @@ public Response UpdateDialog(string callConnectionId, string dialogId, UpdateDia { throw new ArgumentNullException(nameof(dialogId)); } - if (updateDialogRequest == null) + if (updateDialogRequestInternal == null) { - throw new ArgumentNullException(nameof(updateDialogRequest)); + throw new ArgumentNullException(nameof(updateDialogRequestInternal)); } - using var message = CreateUpdateDialogRequest(callConnectionId, dialogId, updateDialogRequest); + using var message = CreateUpdateDialogRequest(callConnectionId, dialogId, updateDialogRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/CallMediaRestClient.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/CallMediaRestClient.cs index 48a8007fa02dc..ec699000f7581 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/CallMediaRestClient.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/CallMediaRestClient.cs @@ -37,7 +37,7 @@ public CallMediaRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pip _apiVersion = apiVersion ?? throw new ArgumentNullException(nameof(apiVersion)); } - internal HttpMessage CreatePlayRequest(string callConnectionId, PlayRequestInternal playRequest) + internal HttpMessage CreatePlayRequest(string callConnectionId, PlayRequestInternal playRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -52,28 +52,28 @@ internal HttpMessage CreatePlayRequest(string callConnectionId, PlayRequestInter request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(playRequest); + content.JsonWriter.WriteObjectValue(playRequestInternal); request.Content = content; return message; } /// Plays audio to participants in the call. /// The call connection id. - /// play request payload. + /// play request payload. /// The cancellation token to use. - /// or is null. - public async Task PlayAsync(string callConnectionId, PlayRequestInternal playRequest, CancellationToken cancellationToken = default) + /// or is null. + public async Task PlayAsync(string callConnectionId, PlayRequestInternal playRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (playRequest == null) + if (playRequestInternal == null) { - throw new ArgumentNullException(nameof(playRequest)); + throw new ArgumentNullException(nameof(playRequestInternal)); } - using var message = CreatePlayRequest(callConnectionId, playRequest); + using var message = CreatePlayRequest(callConnectionId, playRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -86,21 +86,21 @@ public async Task PlayAsync(string callConnectionId, PlayRequestIntern /// Plays audio to participants in the call. /// The call connection id. - /// play request payload. + /// play request payload. /// The cancellation token to use. - /// or is null. - public Response Play(string callConnectionId, PlayRequestInternal playRequest, CancellationToken cancellationToken = default) + /// or is null. + public Response Play(string callConnectionId, PlayRequestInternal playRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (playRequest == null) + if (playRequestInternal == null) { - throw new ArgumentNullException(nameof(playRequest)); + throw new ArgumentNullException(nameof(playRequestInternal)); } - using var message = CreatePlayRequest(callConnectionId, playRequest); + using var message = CreatePlayRequest(callConnectionId, playRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -111,7 +111,7 @@ public Response Play(string callConnectionId, PlayRequestInternal playRequest, C } } - internal HttpMessage CreateStartTranscriptionRequest(string callConnectionId, StartTranscriptionRequestInternal startTranscriptionRequest) + internal HttpMessage CreateStartTranscriptionRequest(string callConnectionId, StartTranscriptionRequestInternal startTranscriptionRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -126,28 +126,28 @@ internal HttpMessage CreateStartTranscriptionRequest(string callConnectionId, St request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(startTranscriptionRequest); + content.JsonWriter.WriteObjectValue(startTranscriptionRequestInternal); request.Content = content; return message; } /// Starts transcription in the call. /// The call connection id. - /// The to use. + /// The to use. /// The cancellation token to use. - /// or is null. - public async Task StartTranscriptionAsync(string callConnectionId, StartTranscriptionRequestInternal startTranscriptionRequest, CancellationToken cancellationToken = default) + /// or is null. + public async Task StartTranscriptionAsync(string callConnectionId, StartTranscriptionRequestInternal startTranscriptionRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (startTranscriptionRequest == null) + if (startTranscriptionRequestInternal == null) { - throw new ArgumentNullException(nameof(startTranscriptionRequest)); + throw new ArgumentNullException(nameof(startTranscriptionRequestInternal)); } - using var message = CreateStartTranscriptionRequest(callConnectionId, startTranscriptionRequest); + using var message = CreateStartTranscriptionRequest(callConnectionId, startTranscriptionRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -160,21 +160,21 @@ public async Task StartTranscriptionAsync(string callConnectionId, Sta /// Starts transcription in the call. /// The call connection id. - /// The to use. + /// The to use. /// The cancellation token to use. - /// or is null. - public Response StartTranscription(string callConnectionId, StartTranscriptionRequestInternal startTranscriptionRequest, CancellationToken cancellationToken = default) + /// or is null. + public Response StartTranscription(string callConnectionId, StartTranscriptionRequestInternal startTranscriptionRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (startTranscriptionRequest == null) + if (startTranscriptionRequestInternal == null) { - throw new ArgumentNullException(nameof(startTranscriptionRequest)); + throw new ArgumentNullException(nameof(startTranscriptionRequestInternal)); } - using var message = CreateStartTranscriptionRequest(callConnectionId, startTranscriptionRequest); + using var message = CreateStartTranscriptionRequest(callConnectionId, startTranscriptionRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -185,7 +185,7 @@ public Response StartTranscription(string callConnectionId, StartTranscriptionRe } } - internal HttpMessage CreateStopTranscriptionRequest(string callConnectionId, StopTranscriptionRequestInternal stopTranscriptionRequest) + internal HttpMessage CreateStopTranscriptionRequest(string callConnectionId, StopTranscriptionRequestInternal stopTranscriptionRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -200,28 +200,28 @@ internal HttpMessage CreateStopTranscriptionRequest(string callConnectionId, Sto request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(stopTranscriptionRequest); + content.JsonWriter.WriteObjectValue(stopTranscriptionRequestInternal); request.Content = content; return message; } /// Stops transcription in the call. /// The call connection id. - /// stop transcription request payload. + /// stop transcription request payload. /// The cancellation token to use. - /// or is null. - public async Task StopTranscriptionAsync(string callConnectionId, StopTranscriptionRequestInternal stopTranscriptionRequest, CancellationToken cancellationToken = default) + /// or is null. + public async Task StopTranscriptionAsync(string callConnectionId, StopTranscriptionRequestInternal stopTranscriptionRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (stopTranscriptionRequest == null) + if (stopTranscriptionRequestInternal == null) { - throw new ArgumentNullException(nameof(stopTranscriptionRequest)); + throw new ArgumentNullException(nameof(stopTranscriptionRequestInternal)); } - using var message = CreateStopTranscriptionRequest(callConnectionId, stopTranscriptionRequest); + using var message = CreateStopTranscriptionRequest(callConnectionId, stopTranscriptionRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -234,21 +234,21 @@ public async Task StopTranscriptionAsync(string callConnectionId, Stop /// Stops transcription in the call. /// The call connection id. - /// stop transcription request payload. + /// stop transcription request payload. /// The cancellation token to use. - /// or is null. - public Response StopTranscription(string callConnectionId, StopTranscriptionRequestInternal stopTranscriptionRequest, CancellationToken cancellationToken = default) + /// or is null. + public Response StopTranscription(string callConnectionId, StopTranscriptionRequestInternal stopTranscriptionRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (stopTranscriptionRequest == null) + if (stopTranscriptionRequestInternal == null) { - throw new ArgumentNullException(nameof(stopTranscriptionRequest)); + throw new ArgumentNullException(nameof(stopTranscriptionRequestInternal)); } - using var message = CreateStopTranscriptionRequest(callConnectionId, stopTranscriptionRequest); + using var message = CreateStopTranscriptionRequest(callConnectionId, stopTranscriptionRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -319,7 +319,7 @@ public Response CancelAllMediaOperations(string callConnectionId, CancellationTo } } - internal HttpMessage CreateRecognizeRequest(string callConnectionId, RecognizeRequestInternal recognizeRequest) + internal HttpMessage CreateRecognizeRequest(string callConnectionId, RecognizeRequestInternal recognizeRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -334,28 +334,28 @@ internal HttpMessage CreateRecognizeRequest(string callConnectionId, RecognizeRe request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(recognizeRequest); + content.JsonWriter.WriteObjectValue(recognizeRequestInternal); request.Content = content; return message; } /// Recognize media from call. /// The call connection id. - /// The media recognize request. + /// The media recognize request. /// The cancellation token to use. - /// or is null. - public async Task RecognizeAsync(string callConnectionId, RecognizeRequestInternal recognizeRequest, CancellationToken cancellationToken = default) + /// or is null. + public async Task RecognizeAsync(string callConnectionId, RecognizeRequestInternal recognizeRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (recognizeRequest == null) + if (recognizeRequestInternal == null) { - throw new ArgumentNullException(nameof(recognizeRequest)); + throw new ArgumentNullException(nameof(recognizeRequestInternal)); } - using var message = CreateRecognizeRequest(callConnectionId, recognizeRequest); + using var message = CreateRecognizeRequest(callConnectionId, recognizeRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -368,21 +368,21 @@ public async Task RecognizeAsync(string callConnectionId, RecognizeReq /// Recognize media from call. /// The call connection id. - /// The media recognize request. + /// The media recognize request. /// The cancellation token to use. - /// or is null. - public Response Recognize(string callConnectionId, RecognizeRequestInternal recognizeRequest, CancellationToken cancellationToken = default) + /// or is null. + public Response Recognize(string callConnectionId, RecognizeRequestInternal recognizeRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (recognizeRequest == null) + if (recognizeRequestInternal == null) { - throw new ArgumentNullException(nameof(recognizeRequest)); + throw new ArgumentNullException(nameof(recognizeRequestInternal)); } - using var message = CreateRecognizeRequest(callConnectionId, recognizeRequest); + using var message = CreateRecognizeRequest(callConnectionId, recognizeRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -393,7 +393,7 @@ public Response Recognize(string callConnectionId, RecognizeRequestInternal reco } } - internal HttpMessage CreateStartContinuousDtmfRecognitionRequest(string callConnectionId, ContinuousDtmfRecognitionRequestInternal continuousDtmfRecognitionRequest) + internal HttpMessage CreateStartContinuousDtmfRecognitionRequest(string callConnectionId, ContinuousDtmfRecognitionRequestInternal continuousDtmfRecognitionRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -408,28 +408,28 @@ internal HttpMessage CreateStartContinuousDtmfRecognitionRequest(string callConn request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(continuousDtmfRecognitionRequest); + content.JsonWriter.WriteObjectValue(continuousDtmfRecognitionRequestInternal); request.Content = content; return message; } /// Start continuous Dtmf recognition by subscribing to tones. /// The call connection id. - /// The continuous recognize request. + /// The continuous recognize request. /// The cancellation token to use. - /// or is null. - public async Task StartContinuousDtmfRecognitionAsync(string callConnectionId, ContinuousDtmfRecognitionRequestInternal continuousDtmfRecognitionRequest, CancellationToken cancellationToken = default) + /// or is null. + public async Task StartContinuousDtmfRecognitionAsync(string callConnectionId, ContinuousDtmfRecognitionRequestInternal continuousDtmfRecognitionRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (continuousDtmfRecognitionRequest == null) + if (continuousDtmfRecognitionRequestInternal == null) { - throw new ArgumentNullException(nameof(continuousDtmfRecognitionRequest)); + throw new ArgumentNullException(nameof(continuousDtmfRecognitionRequestInternal)); } - using var message = CreateStartContinuousDtmfRecognitionRequest(callConnectionId, continuousDtmfRecognitionRequest); + using var message = CreateStartContinuousDtmfRecognitionRequest(callConnectionId, continuousDtmfRecognitionRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -442,21 +442,21 @@ public async Task StartContinuousDtmfRecognitionAsync(string callConne /// Start continuous Dtmf recognition by subscribing to tones. /// The call connection id. - /// The continuous recognize request. + /// The continuous recognize request. /// The cancellation token to use. - /// or is null. - public Response StartContinuousDtmfRecognition(string callConnectionId, ContinuousDtmfRecognitionRequestInternal continuousDtmfRecognitionRequest, CancellationToken cancellationToken = default) + /// or is null. + public Response StartContinuousDtmfRecognition(string callConnectionId, ContinuousDtmfRecognitionRequestInternal continuousDtmfRecognitionRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (continuousDtmfRecognitionRequest == null) + if (continuousDtmfRecognitionRequestInternal == null) { - throw new ArgumentNullException(nameof(continuousDtmfRecognitionRequest)); + throw new ArgumentNullException(nameof(continuousDtmfRecognitionRequestInternal)); } - using var message = CreateStartContinuousDtmfRecognitionRequest(callConnectionId, continuousDtmfRecognitionRequest); + using var message = CreateStartContinuousDtmfRecognitionRequest(callConnectionId, continuousDtmfRecognitionRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -467,7 +467,7 @@ public Response StartContinuousDtmfRecognition(string callConnectionId, Continuo } } - internal HttpMessage CreateStopContinuousDtmfRecognitionRequest(string callConnectionId, ContinuousDtmfRecognitionRequestInternal continuousDtmfRecognitionRequest) + internal HttpMessage CreateStopContinuousDtmfRecognitionRequest(string callConnectionId, ContinuousDtmfRecognitionRequestInternal continuousDtmfRecognitionRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -482,28 +482,28 @@ internal HttpMessage CreateStopContinuousDtmfRecognitionRequest(string callConne request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(continuousDtmfRecognitionRequest); + content.JsonWriter.WriteObjectValue(continuousDtmfRecognitionRequestInternal); request.Content = content; return message; } /// Stop continuous Dtmf recognition by unsubscribing to tones. /// The call connection id. - /// The continuous recognize request. + /// The continuous recognize request. /// The cancellation token to use. - /// or is null. - public async Task StopContinuousDtmfRecognitionAsync(string callConnectionId, ContinuousDtmfRecognitionRequestInternal continuousDtmfRecognitionRequest, CancellationToken cancellationToken = default) + /// or is null. + public async Task StopContinuousDtmfRecognitionAsync(string callConnectionId, ContinuousDtmfRecognitionRequestInternal continuousDtmfRecognitionRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (continuousDtmfRecognitionRequest == null) + if (continuousDtmfRecognitionRequestInternal == null) { - throw new ArgumentNullException(nameof(continuousDtmfRecognitionRequest)); + throw new ArgumentNullException(nameof(continuousDtmfRecognitionRequestInternal)); } - using var message = CreateStopContinuousDtmfRecognitionRequest(callConnectionId, continuousDtmfRecognitionRequest); + using var message = CreateStopContinuousDtmfRecognitionRequest(callConnectionId, continuousDtmfRecognitionRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -516,21 +516,21 @@ public async Task StopContinuousDtmfRecognitionAsync(string callConnec /// Stop continuous Dtmf recognition by unsubscribing to tones. /// The call connection id. - /// The continuous recognize request. + /// The continuous recognize request. /// The cancellation token to use. - /// or is null. - public Response StopContinuousDtmfRecognition(string callConnectionId, ContinuousDtmfRecognitionRequestInternal continuousDtmfRecognitionRequest, CancellationToken cancellationToken = default) + /// or is null. + public Response StopContinuousDtmfRecognition(string callConnectionId, ContinuousDtmfRecognitionRequestInternal continuousDtmfRecognitionRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (continuousDtmfRecognitionRequest == null) + if (continuousDtmfRecognitionRequestInternal == null) { - throw new ArgumentNullException(nameof(continuousDtmfRecognitionRequest)); + throw new ArgumentNullException(nameof(continuousDtmfRecognitionRequestInternal)); } - using var message = CreateStopContinuousDtmfRecognitionRequest(callConnectionId, continuousDtmfRecognitionRequest); + using var message = CreateStopContinuousDtmfRecognitionRequest(callConnectionId, continuousDtmfRecognitionRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -541,7 +541,7 @@ public Response StopContinuousDtmfRecognition(string callConnectionId, Continuou } } - internal HttpMessage CreateSendDtmfTonesRequest(string callConnectionId, SendDtmfTonesRequestInternal sendDtmfTonesRequest) + internal HttpMessage CreateSendDtmfTonesRequest(string callConnectionId, SendDtmfTonesRequestInternal sendDtmfTonesRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -558,28 +558,28 @@ internal HttpMessage CreateSendDtmfTonesRequest(string callConnectionId, SendDtm request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(sendDtmfTonesRequest); + content.JsonWriter.WriteObjectValue(sendDtmfTonesRequestInternal); request.Content = content; return message; } /// Send dtmf tones. /// The call connection id. - /// The send dtmf tones request. + /// The send dtmf tones request. /// The cancellation token to use. - /// or is null. - public async Task> SendDtmfTonesAsync(string callConnectionId, SendDtmfTonesRequestInternal sendDtmfTonesRequest, CancellationToken cancellationToken = default) + /// or is null. + public async Task> SendDtmfTonesAsync(string callConnectionId, SendDtmfTonesRequestInternal sendDtmfTonesRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (sendDtmfTonesRequest == null) + if (sendDtmfTonesRequestInternal == null) { - throw new ArgumentNullException(nameof(sendDtmfTonesRequest)); + throw new ArgumentNullException(nameof(sendDtmfTonesRequestInternal)); } - using var message = CreateSendDtmfTonesRequest(callConnectionId, sendDtmfTonesRequest); + using var message = CreateSendDtmfTonesRequest(callConnectionId, sendDtmfTonesRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -597,21 +597,21 @@ public async Task> SendDtmfTonesAsync(string callC /// Send dtmf tones. /// The call connection id. - /// The send dtmf tones request. + /// The send dtmf tones request. /// The cancellation token to use. - /// or is null. - public Response SendDtmfTones(string callConnectionId, SendDtmfTonesRequestInternal sendDtmfTonesRequest, CancellationToken cancellationToken = default) + /// or is null. + public Response SendDtmfTones(string callConnectionId, SendDtmfTonesRequestInternal sendDtmfTonesRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (sendDtmfTonesRequest == null) + if (sendDtmfTonesRequestInternal == null) { - throw new ArgumentNullException(nameof(sendDtmfTonesRequest)); + throw new ArgumentNullException(nameof(sendDtmfTonesRequestInternal)); } - using var message = CreateSendDtmfTonesRequest(callConnectionId, sendDtmfTonesRequest); + using var message = CreateSendDtmfTonesRequest(callConnectionId, sendDtmfTonesRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -627,7 +627,7 @@ public Response SendDtmfTones(string callConnectionId, Send } } - internal HttpMessage CreateUpdateTranscriptionRequest(string callConnectionId, UpdateTranscriptionRequestInternal updateTranscriptionRequest) + internal HttpMessage CreateUpdateTranscriptionRequest(string callConnectionId, UpdateTranscriptionRequestInternal updateTranscriptionRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -642,29 +642,29 @@ internal HttpMessage CreateUpdateTranscriptionRequest(string callConnectionId, U request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(updateTranscriptionRequest); + content.JsonWriter.WriteObjectValue(updateTranscriptionRequestInternal); request.Content = content; return message; } /// UpdateTranscription Api. /// The call connection id. - /// The UpdateTranscription request. + /// The UpdateTranscription request. /// The cancellation token to use. - /// or is null. + /// or is null. /// API to change transcription language. - public async Task UpdateTranscriptionAsync(string callConnectionId, UpdateTranscriptionRequestInternal updateTranscriptionRequest, CancellationToken cancellationToken = default) + public async Task UpdateTranscriptionAsync(string callConnectionId, UpdateTranscriptionRequestInternal updateTranscriptionRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (updateTranscriptionRequest == null) + if (updateTranscriptionRequestInternal == null) { - throw new ArgumentNullException(nameof(updateTranscriptionRequest)); + throw new ArgumentNullException(nameof(updateTranscriptionRequestInternal)); } - using var message = CreateUpdateTranscriptionRequest(callConnectionId, updateTranscriptionRequest); + using var message = CreateUpdateTranscriptionRequest(callConnectionId, updateTranscriptionRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -677,22 +677,22 @@ public async Task UpdateTranscriptionAsync(string callConnectionId, Up /// UpdateTranscription Api. /// The call connection id. - /// The UpdateTranscription request. + /// The UpdateTranscription request. /// The cancellation token to use. - /// or is null. + /// or is null. /// API to change transcription language. - public Response UpdateTranscription(string callConnectionId, UpdateTranscriptionRequestInternal updateTranscriptionRequest, CancellationToken cancellationToken = default) + public Response UpdateTranscription(string callConnectionId, UpdateTranscriptionRequestInternal updateTranscriptionRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (updateTranscriptionRequest == null) + if (updateTranscriptionRequestInternal == null) { - throw new ArgumentNullException(nameof(updateTranscriptionRequest)); + throw new ArgumentNullException(nameof(updateTranscriptionRequestInternal)); } - using var message = CreateUpdateTranscriptionRequest(callConnectionId, updateTranscriptionRequest); + using var message = CreateUpdateTranscriptionRequest(callConnectionId, updateTranscriptionRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -703,7 +703,7 @@ public Response UpdateTranscription(string callConnectionId, UpdateTranscription } } - internal HttpMessage CreateHoldRequest(string callConnectionId, HoldRequestInternal holdRequest) + internal HttpMessage CreateHoldRequest(string callConnectionId, HoldRequestInternal holdRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -718,28 +718,28 @@ internal HttpMessage CreateHoldRequest(string callConnectionId, HoldRequestInter request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(holdRequest); + content.JsonWriter.WriteObjectValue(holdRequestInternal); request.Content = content; return message; } /// Hold participant from the call using identifier. /// The call connection id. - /// The participants to be hold from the call. + /// The participants to be hold from the call. /// The cancellation token to use. - /// or is null. - public async Task HoldAsync(string callConnectionId, HoldRequestInternal holdRequest, CancellationToken cancellationToken = default) + /// or is null. + public async Task HoldAsync(string callConnectionId, HoldRequestInternal holdRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (holdRequest == null) + if (holdRequestInternal == null) { - throw new ArgumentNullException(nameof(holdRequest)); + throw new ArgumentNullException(nameof(holdRequestInternal)); } - using var message = CreateHoldRequest(callConnectionId, holdRequest); + using var message = CreateHoldRequest(callConnectionId, holdRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -752,21 +752,21 @@ public async Task HoldAsync(string callConnectionId, HoldRequestIntern /// Hold participant from the call using identifier. /// The call connection id. - /// The participants to be hold from the call. + /// The participants to be hold from the call. /// The cancellation token to use. - /// or is null. - public Response Hold(string callConnectionId, HoldRequestInternal holdRequest, CancellationToken cancellationToken = default) + /// or is null. + public Response Hold(string callConnectionId, HoldRequestInternal holdRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (holdRequest == null) + if (holdRequestInternal == null) { - throw new ArgumentNullException(nameof(holdRequest)); + throw new ArgumentNullException(nameof(holdRequestInternal)); } - using var message = CreateHoldRequest(callConnectionId, holdRequest); + using var message = CreateHoldRequest(callConnectionId, holdRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -777,7 +777,7 @@ public Response Hold(string callConnectionId, HoldRequestInternal holdRequest, C } } - internal HttpMessage CreateUnholdRequest(string callConnectionId, UnholdRequestInternal unholdRequest) + internal HttpMessage CreateUnholdRequest(string callConnectionId, UnholdRequestInternal unholdRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -792,28 +792,28 @@ internal HttpMessage CreateUnholdRequest(string callConnectionId, UnholdRequestI request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(unholdRequest); + content.JsonWriter.WriteObjectValue(unholdRequestInternal); request.Content = content; return message; } /// Unhold participants from the call using identifier. /// The call connection id. - /// The participants to be hold from the call. + /// The participants to be hold from the call. /// The cancellation token to use. - /// or is null. - public async Task UnholdAsync(string callConnectionId, UnholdRequestInternal unholdRequest, CancellationToken cancellationToken = default) + /// or is null. + public async Task UnholdAsync(string callConnectionId, UnholdRequestInternal unholdRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (unholdRequest == null) + if (unholdRequestInternal == null) { - throw new ArgumentNullException(nameof(unholdRequest)); + throw new ArgumentNullException(nameof(unholdRequestInternal)); } - using var message = CreateUnholdRequest(callConnectionId, unholdRequest); + using var message = CreateUnholdRequest(callConnectionId, unholdRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -826,21 +826,21 @@ public async Task UnholdAsync(string callConnectionId, UnholdRequestIn /// Unhold participants from the call using identifier. /// The call connection id. - /// The participants to be hold from the call. + /// The participants to be hold from the call. /// The cancellation token to use. - /// or is null. - public Response Unhold(string callConnectionId, UnholdRequestInternal unholdRequest, CancellationToken cancellationToken = default) + /// or is null. + public Response Unhold(string callConnectionId, UnholdRequestInternal unholdRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (unholdRequest == null) + if (unholdRequestInternal == null) { - throw new ArgumentNullException(nameof(unholdRequest)); + throw new ArgumentNullException(nameof(unholdRequestInternal)); } - using var message = CreateUnholdRequest(callConnectionId, unholdRequest); + using var message = CreateUnholdRequest(callConnectionId, unholdRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -851,7 +851,7 @@ public Response Unhold(string callConnectionId, UnholdRequestInternal unholdRequ } } - internal HttpMessage CreateStartHoldMusicRequest(string callConnectionId, StartHoldMusicRequestInternal startHoldMusicRequest) + internal HttpMessage CreateStartHoldMusicRequest(string callConnectionId, StartHoldMusicRequestInternal startHoldMusicRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -866,28 +866,28 @@ internal HttpMessage CreateStartHoldMusicRequest(string callConnectionId, StartH request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(startHoldMusicRequest); + content.JsonWriter.WriteObjectValue(startHoldMusicRequestInternal); request.Content = content; return message; } /// Hold participant from the call using identifier. /// The call connection id. - /// The participants to be hold from the call. + /// The participants to be hold from the call. /// The cancellation token to use. - /// or is null. - public async Task StartHoldMusicAsync(string callConnectionId, StartHoldMusicRequestInternal startHoldMusicRequest, CancellationToken cancellationToken = default) + /// or is null. + public async Task StartHoldMusicAsync(string callConnectionId, StartHoldMusicRequestInternal startHoldMusicRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (startHoldMusicRequest == null) + if (startHoldMusicRequestInternal == null) { - throw new ArgumentNullException(nameof(startHoldMusicRequest)); + throw new ArgumentNullException(nameof(startHoldMusicRequestInternal)); } - using var message = CreateStartHoldMusicRequest(callConnectionId, startHoldMusicRequest); + using var message = CreateStartHoldMusicRequest(callConnectionId, startHoldMusicRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -900,21 +900,21 @@ public async Task StartHoldMusicAsync(string callConnectionId, StartHo /// Hold participant from the call using identifier. /// The call connection id. - /// The participants to be hold from the call. + /// The participants to be hold from the call. /// The cancellation token to use. - /// or is null. - public Response StartHoldMusic(string callConnectionId, StartHoldMusicRequestInternal startHoldMusicRequest, CancellationToken cancellationToken = default) + /// or is null. + public Response StartHoldMusic(string callConnectionId, StartHoldMusicRequestInternal startHoldMusicRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (startHoldMusicRequest == null) + if (startHoldMusicRequestInternal == null) { - throw new ArgumentNullException(nameof(startHoldMusicRequest)); + throw new ArgumentNullException(nameof(startHoldMusicRequestInternal)); } - using var message = CreateStartHoldMusicRequest(callConnectionId, startHoldMusicRequest); + using var message = CreateStartHoldMusicRequest(callConnectionId, startHoldMusicRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -925,7 +925,7 @@ public Response StartHoldMusic(string callConnectionId, StartHoldMusicRequestInt } } - internal HttpMessage CreateStopHoldMusicRequest(string callConnectionId, StopHoldMusicRequestInternal stopHoldMusicRequest) + internal HttpMessage CreateStopHoldMusicRequest(string callConnectionId, StopHoldMusicRequestInternal stopHoldMusicRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -940,28 +940,28 @@ internal HttpMessage CreateStopHoldMusicRequest(string callConnectionId, StopHol request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(stopHoldMusicRequest); + content.JsonWriter.WriteObjectValue(stopHoldMusicRequestInternal); request.Content = content; return message; } /// Unhold participants from the call using identifier. /// The call connection id. - /// The participants to be hold from the call. + /// The participants to be hold from the call. /// The cancellation token to use. - /// or is null. - public async Task StopHoldMusicAsync(string callConnectionId, StopHoldMusicRequestInternal stopHoldMusicRequest, CancellationToken cancellationToken = default) + /// or is null. + public async Task StopHoldMusicAsync(string callConnectionId, StopHoldMusicRequestInternal stopHoldMusicRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (stopHoldMusicRequest == null) + if (stopHoldMusicRequestInternal == null) { - throw new ArgumentNullException(nameof(stopHoldMusicRequest)); + throw new ArgumentNullException(nameof(stopHoldMusicRequestInternal)); } - using var message = CreateStopHoldMusicRequest(callConnectionId, stopHoldMusicRequest); + using var message = CreateStopHoldMusicRequest(callConnectionId, stopHoldMusicRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -974,21 +974,21 @@ public async Task StopHoldMusicAsync(string callConnectionId, StopHold /// Unhold participants from the call using identifier. /// The call connection id. - /// The participants to be hold from the call. + /// The participants to be hold from the call. /// The cancellation token to use. - /// or is null. - public Response StopHoldMusic(string callConnectionId, StopHoldMusicRequestInternal stopHoldMusicRequest, CancellationToken cancellationToken = default) + /// or is null. + public Response StopHoldMusic(string callConnectionId, StopHoldMusicRequestInternal stopHoldMusicRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (stopHoldMusicRequest == null) + if (stopHoldMusicRequestInternal == null) { - throw new ArgumentNullException(nameof(stopHoldMusicRequest)); + throw new ArgumentNullException(nameof(stopHoldMusicRequestInternal)); } - using var message = CreateStopHoldMusicRequest(callConnectionId, stopHoldMusicRequest); + using var message = CreateStopHoldMusicRequest(callConnectionId, stopHoldMusicRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -999,7 +999,7 @@ public Response StopHoldMusic(string callConnectionId, StopHoldMusicRequestInter } } - internal HttpMessage CreateStartMediaStreamingRequest(string callConnectionId, StartMediaStreamingRequestInternal startMediaStreamingRequest) + internal HttpMessage CreateStartMediaStreamingRequest(string callConnectionId, StartMediaStreamingRequestInternal startMediaStreamingRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1014,29 +1014,29 @@ internal HttpMessage CreateStartMediaStreamingRequest(string callConnectionId, S request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(startMediaStreamingRequest); + content.JsonWriter.WriteObjectValue(startMediaStreamingRequestInternal); request.Content = content; return message; } /// Starts media streaming in the call. /// The call connection id. - /// The to use. + /// The to use. /// The cancellation token to use. - /// or is null. + /// or is null. /// Starts media streaming in the call. - public async Task StartMediaStreamingAsync(string callConnectionId, StartMediaStreamingRequestInternal startMediaStreamingRequest, CancellationToken cancellationToken = default) + public async Task StartMediaStreamingAsync(string callConnectionId, StartMediaStreamingRequestInternal startMediaStreamingRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (startMediaStreamingRequest == null) + if (startMediaStreamingRequestInternal == null) { - throw new ArgumentNullException(nameof(startMediaStreamingRequest)); + throw new ArgumentNullException(nameof(startMediaStreamingRequestInternal)); } - using var message = CreateStartMediaStreamingRequest(callConnectionId, startMediaStreamingRequest); + using var message = CreateStartMediaStreamingRequest(callConnectionId, startMediaStreamingRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -1049,22 +1049,22 @@ public async Task StartMediaStreamingAsync(string callConnectionId, St /// Starts media streaming in the call. /// The call connection id. - /// The to use. + /// The to use. /// The cancellation token to use. - /// or is null. + /// or is null. /// Starts media streaming in the call. - public Response StartMediaStreaming(string callConnectionId, StartMediaStreamingRequestInternal startMediaStreamingRequest, CancellationToken cancellationToken = default) + public Response StartMediaStreaming(string callConnectionId, StartMediaStreamingRequestInternal startMediaStreamingRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (startMediaStreamingRequest == null) + if (startMediaStreamingRequestInternal == null) { - throw new ArgumentNullException(nameof(startMediaStreamingRequest)); + throw new ArgumentNullException(nameof(startMediaStreamingRequestInternal)); } - using var message = CreateStartMediaStreamingRequest(callConnectionId, startMediaStreamingRequest); + using var message = CreateStartMediaStreamingRequest(callConnectionId, startMediaStreamingRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -1075,7 +1075,7 @@ public Response StartMediaStreaming(string callConnectionId, StartMediaStreaming } } - internal HttpMessage CreateStopMediaStreamingRequest(string callConnectionId, StopMediaStreamingRequestInternal stopMediaStreamingRequest) + internal HttpMessage CreateStopMediaStreamingRequest(string callConnectionId, StopMediaStreamingRequestInternal stopMediaStreamingRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1090,29 +1090,29 @@ internal HttpMessage CreateStopMediaStreamingRequest(string callConnectionId, St request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(stopMediaStreamingRequest); + content.JsonWriter.WriteObjectValue(stopMediaStreamingRequestInternal); request.Content = content; return message; } /// Stops media streaming in the call. /// The call connection id. - /// stop media streaming request payload. + /// stop media streaming request payload. /// The cancellation token to use. - /// or is null. + /// or is null. /// Stops media streaming in the call. - public async Task StopMediaStreamingAsync(string callConnectionId, StopMediaStreamingRequestInternal stopMediaStreamingRequest, CancellationToken cancellationToken = default) + public async Task StopMediaStreamingAsync(string callConnectionId, StopMediaStreamingRequestInternal stopMediaStreamingRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (stopMediaStreamingRequest == null) + if (stopMediaStreamingRequestInternal == null) { - throw new ArgumentNullException(nameof(stopMediaStreamingRequest)); + throw new ArgumentNullException(nameof(stopMediaStreamingRequestInternal)); } - using var message = CreateStopMediaStreamingRequest(callConnectionId, stopMediaStreamingRequest); + using var message = CreateStopMediaStreamingRequest(callConnectionId, stopMediaStreamingRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -1125,22 +1125,22 @@ public async Task StopMediaStreamingAsync(string callConnectionId, Sto /// Stops media streaming in the call. /// The call connection id. - /// stop media streaming request payload. + /// stop media streaming request payload. /// The cancellation token to use. - /// or is null. + /// or is null. /// Stops media streaming in the call. - public Response StopMediaStreaming(string callConnectionId, StopMediaStreamingRequestInternal stopMediaStreamingRequest, CancellationToken cancellationToken = default) + public Response StopMediaStreaming(string callConnectionId, StopMediaStreamingRequestInternal stopMediaStreamingRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (stopMediaStreamingRequest == null) + if (stopMediaStreamingRequestInternal == null) { - throw new ArgumentNullException(nameof(stopMediaStreamingRequest)); + throw new ArgumentNullException(nameof(stopMediaStreamingRequestInternal)); } - using var message = CreateStopMediaStreamingRequest(callConnectionId, stopMediaStreamingRequest); + using var message = CreateStopMediaStreamingRequest(callConnectionId, stopMediaStreamingRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/communication/Azure.Communication.CallingServer/src/CallAutomationClient.cs b/sdk/communication/Azure.Communication.CallingServer/src/CallAutomationClient.cs index 7818abb58da65..081098c4f441e 100644 --- a/sdk/communication/Azure.Communication.CallingServer/src/CallAutomationClient.cs +++ b/sdk/communication/Azure.Communication.CallingServer/src/CallAutomationClient.cs @@ -338,7 +338,7 @@ public virtual async Task> CreateCallAsync(CreateCall CreateCallRequestInternal request = CreateCallRequest(options); var createCallResponse = await ServerCallingRestClient.CreateCallAsync( - createCallRequest: request, + createCallRequestInternal: request, cancellationToken: cancellationToken ).ConfigureAwait(false); @@ -391,7 +391,7 @@ public virtual Response CreateCall(CreateCallOptions options, CreateCallRequestInternal request = CreateCallRequest(options); var createCallResponse = ServerCallingRestClient.CreateCall( - createCallRequest: request, + createCallRequestInternal: request, cancellationToken: cancellationToken ); diff --git a/sdk/communication/Azure.Communication.CallingServer/src/Generated/CallConnectionsRestClient.cs b/sdk/communication/Azure.Communication.CallingServer/src/Generated/CallConnectionsRestClient.cs index 0fe3dfe46e4a9..43663262e69b1 100644 --- a/sdk/communication/Azure.Communication.CallingServer/src/Generated/CallConnectionsRestClient.cs +++ b/sdk/communication/Azure.Communication.CallingServer/src/Generated/CallConnectionsRestClient.cs @@ -225,7 +225,7 @@ public Response TerminateCall(string callConnectionId, CancellationToken cancell } } - internal HttpMessage CreateTransferToParticipantRequest(string callConnectionId, TransferToParticipantRequestInternal transferToParticipantRequest) + internal HttpMessage CreateTransferToParticipantRequest(string callConnectionId, TransferToParticipantRequestInternal transferToParticipantRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -242,28 +242,28 @@ internal HttpMessage CreateTransferToParticipantRequest(string callConnectionId, request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(transferToParticipantRequest); + content.JsonWriter.WriteObjectValue(transferToParticipantRequestInternal); request.Content = content; return message; } /// Transfer the call to a participant. /// The call connection id. - /// The transfer to participant request. + /// The transfer to participant request. /// The cancellation token to use. - /// or is null. - public async Task> TransferToParticipantAsync(string callConnectionId, TransferToParticipantRequestInternal transferToParticipantRequest, CancellationToken cancellationToken = default) + /// or is null. + public async Task> TransferToParticipantAsync(string callConnectionId, TransferToParticipantRequestInternal transferToParticipantRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (transferToParticipantRequest == null) + if (transferToParticipantRequestInternal == null) { - throw new ArgumentNullException(nameof(transferToParticipantRequest)); + throw new ArgumentNullException(nameof(transferToParticipantRequestInternal)); } - using var message = CreateTransferToParticipantRequest(callConnectionId, transferToParticipantRequest); + using var message = CreateTransferToParticipantRequest(callConnectionId, transferToParticipantRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -281,21 +281,21 @@ public async Task> TransferToParticipa /// Transfer the call to a participant. /// The call connection id. - /// The transfer to participant request. + /// The transfer to participant request. /// The cancellation token to use. - /// or is null. - public Response TransferToParticipant(string callConnectionId, TransferToParticipantRequestInternal transferToParticipantRequest, CancellationToken cancellationToken = default) + /// or is null. + public Response TransferToParticipant(string callConnectionId, TransferToParticipantRequestInternal transferToParticipantRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (transferToParticipantRequest == null) + if (transferToParticipantRequestInternal == null) { - throw new ArgumentNullException(nameof(transferToParticipantRequest)); + throw new ArgumentNullException(nameof(transferToParticipantRequestInternal)); } - using var message = CreateTransferToParticipantRequest(callConnectionId, transferToParticipantRequest); + using var message = CreateTransferToParticipantRequest(callConnectionId, transferToParticipantRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -381,7 +381,7 @@ public Response GetParticipants(string callConn } } - internal HttpMessage CreateAddParticipantRequest(string callConnectionId, AddParticipantsRequestInternal addParticipantsRequest) + internal HttpMessage CreateAddParticipantRequest(string callConnectionId, AddParticipantsRequestInternal addParticipantsRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -398,28 +398,28 @@ internal HttpMessage CreateAddParticipantRequest(string callConnectionId, AddPar request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(addParticipantsRequest); + content.JsonWriter.WriteObjectValue(addParticipantsRequestInternal); request.Content = content; return message; } /// Add participants to the call. /// The call connection Id. - /// The add participants request. + /// The add participants request. /// The cancellation token to use. - /// or is null. - public async Task> AddParticipantAsync(string callConnectionId, AddParticipantsRequestInternal addParticipantsRequest, CancellationToken cancellationToken = default) + /// or is null. + public async Task> AddParticipantAsync(string callConnectionId, AddParticipantsRequestInternal addParticipantsRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (addParticipantsRequest == null) + if (addParticipantsRequestInternal == null) { - throw new ArgumentNullException(nameof(addParticipantsRequest)); + throw new ArgumentNullException(nameof(addParticipantsRequestInternal)); } - using var message = CreateAddParticipantRequest(callConnectionId, addParticipantsRequest); + using var message = CreateAddParticipantRequest(callConnectionId, addParticipantsRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -437,21 +437,21 @@ public async Task> AddParticipantAsync /// Add participants to the call. /// The call connection Id. - /// The add participants request. + /// The add participants request. /// The cancellation token to use. - /// or is null. - public Response AddParticipant(string callConnectionId, AddParticipantsRequestInternal addParticipantsRequest, CancellationToken cancellationToken = default) + /// or is null. + public Response AddParticipant(string callConnectionId, AddParticipantsRequestInternal addParticipantsRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (addParticipantsRequest == null) + if (addParticipantsRequestInternal == null) { - throw new ArgumentNullException(nameof(addParticipantsRequest)); + throw new ArgumentNullException(nameof(addParticipantsRequestInternal)); } - using var message = CreateAddParticipantRequest(callConnectionId, addParticipantsRequest); + using var message = CreateAddParticipantRequest(callConnectionId, addParticipantsRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -467,7 +467,7 @@ public Response AddParticipant(string callConne } } - internal HttpMessage CreateRemoveParticipantsRequest(string callConnectionId, RemoveParticipantsRequestInternal removeParticipantsRequest) + internal HttpMessage CreateRemoveParticipantsRequest(string callConnectionId, RemoveParticipantsRequestInternal removeParticipantsRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -484,28 +484,28 @@ internal HttpMessage CreateRemoveParticipantsRequest(string callConnectionId, Re request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(removeParticipantsRequest); + content.JsonWriter.WriteObjectValue(removeParticipantsRequestInternal); request.Content = content; return message; } /// Remove participant from the call using identifier. /// The call connection id. - /// The participants to be removed from the call. + /// The participants to be removed from the call. /// The cancellation token to use. - /// or is null. - public async Task> RemoveParticipantsAsync(string callConnectionId, RemoveParticipantsRequestInternal removeParticipantsRequest, CancellationToken cancellationToken = default) + /// or is null. + public async Task> RemoveParticipantsAsync(string callConnectionId, RemoveParticipantsRequestInternal removeParticipantsRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (removeParticipantsRequest == null) + if (removeParticipantsRequestInternal == null) { - throw new ArgumentNullException(nameof(removeParticipantsRequest)); + throw new ArgumentNullException(nameof(removeParticipantsRequestInternal)); } - using var message = CreateRemoveParticipantsRequest(callConnectionId, removeParticipantsRequest); + using var message = CreateRemoveParticipantsRequest(callConnectionId, removeParticipantsRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -523,21 +523,21 @@ public async Task> RemoveParticipantsAsync(st /// Remove participant from the call using identifier. /// The call connection id. - /// The participants to be removed from the call. + /// The participants to be removed from the call. /// The cancellation token to use. - /// or is null. - public Response RemoveParticipants(string callConnectionId, RemoveParticipantsRequestInternal removeParticipantsRequest, CancellationToken cancellationToken = default) + /// or is null. + public Response RemoveParticipants(string callConnectionId, RemoveParticipantsRequestInternal removeParticipantsRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (removeParticipantsRequest == null) + if (removeParticipantsRequestInternal == null) { - throw new ArgumentNullException(nameof(removeParticipantsRequest)); + throw new ArgumentNullException(nameof(removeParticipantsRequestInternal)); } - using var message = CreateRemoveParticipantsRequest(callConnectionId, removeParticipantsRequest); + using var message = CreateRemoveParticipantsRequest(callConnectionId, removeParticipantsRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/communication/Azure.Communication.CallingServer/src/Generated/ContentRestClient.cs b/sdk/communication/Azure.Communication.CallingServer/src/Generated/ContentRestClient.cs index a675a79ca68f8..2925d05f422b8 100644 --- a/sdk/communication/Azure.Communication.CallingServer/src/Generated/ContentRestClient.cs +++ b/sdk/communication/Azure.Communication.CallingServer/src/Generated/ContentRestClient.cs @@ -37,7 +37,7 @@ public ContentRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipel _apiVersion = apiVersion ?? throw new ArgumentNullException(nameof(apiVersion)); } - internal HttpMessage CreatePlayRequest(string callConnectionId, PlayRequestInternal playRequest) + internal HttpMessage CreatePlayRequest(string callConnectionId, PlayRequestInternal playRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -51,28 +51,28 @@ internal HttpMessage CreatePlayRequest(string callConnectionId, PlayRequestInter request.Uri = uri; request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(playRequest); + content.JsonWriter.WriteObjectValue(playRequestInternal); request.Content = content; return message; } /// Plays audio to participants in the call. /// The to use. - /// The to use. + /// The to use. /// The cancellation token to use. - /// or is null. - public async Task PlayAsync(string callConnectionId, PlayRequestInternal playRequest, CancellationToken cancellationToken = default) + /// or is null. + public async Task PlayAsync(string callConnectionId, PlayRequestInternal playRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (playRequest == null) + if (playRequestInternal == null) { - throw new ArgumentNullException(nameof(playRequest)); + throw new ArgumentNullException(nameof(playRequestInternal)); } - using var message = CreatePlayRequest(callConnectionId, playRequest); + using var message = CreatePlayRequest(callConnectionId, playRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -85,21 +85,21 @@ public async Task PlayAsync(string callConnectionId, PlayRequestIntern /// Plays audio to participants in the call. /// The to use. - /// The to use. + /// The to use. /// The cancellation token to use. - /// or is null. - public Response Play(string callConnectionId, PlayRequestInternal playRequest, CancellationToken cancellationToken = default) + /// or is null. + public Response Play(string callConnectionId, PlayRequestInternal playRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (playRequest == null) + if (playRequestInternal == null) { - throw new ArgumentNullException(nameof(playRequest)); + throw new ArgumentNullException(nameof(playRequestInternal)); } - using var message = CreatePlayRequest(callConnectionId, playRequest); + using var message = CreatePlayRequest(callConnectionId, playRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -169,7 +169,7 @@ public Response CancelAllMediaOperations(string callConnectionId, CancellationTo } } - internal HttpMessage CreateRecognizeRequest(string callConnectionId, RecognizeRequestInternal recognizeRequest) + internal HttpMessage CreateRecognizeRequest(string callConnectionId, RecognizeRequestInternal recognizeRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -183,28 +183,28 @@ internal HttpMessage CreateRecognizeRequest(string callConnectionId, RecognizeRe request.Uri = uri; request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(recognizeRequest); + content.JsonWriter.WriteObjectValue(recognizeRequestInternal); request.Content = content; return message; } /// Recognize media from call. /// The call connection id. - /// The media recognize request. + /// The media recognize request. /// The cancellation token to use. - /// or is null. - public async Task RecognizeAsync(string callConnectionId, RecognizeRequestInternal recognizeRequest, CancellationToken cancellationToken = default) + /// or is null. + public async Task RecognizeAsync(string callConnectionId, RecognizeRequestInternal recognizeRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (recognizeRequest == null) + if (recognizeRequestInternal == null) { - throw new ArgumentNullException(nameof(recognizeRequest)); + throw new ArgumentNullException(nameof(recognizeRequestInternal)); } - using var message = CreateRecognizeRequest(callConnectionId, recognizeRequest); + using var message = CreateRecognizeRequest(callConnectionId, recognizeRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -217,21 +217,21 @@ public async Task RecognizeAsync(string callConnectionId, RecognizeReq /// Recognize media from call. /// The call connection id. - /// The media recognize request. + /// The media recognize request. /// The cancellation token to use. - /// or is null. - public Response Recognize(string callConnectionId, RecognizeRequestInternal recognizeRequest, CancellationToken cancellationToken = default) + /// or is null. + public Response Recognize(string callConnectionId, RecognizeRequestInternal recognizeRequestInternal, CancellationToken cancellationToken = default) { if (callConnectionId == null) { throw new ArgumentNullException(nameof(callConnectionId)); } - if (recognizeRequest == null) + if (recognizeRequestInternal == null) { - throw new ArgumentNullException(nameof(recognizeRequest)); + throw new ArgumentNullException(nameof(recognizeRequestInternal)); } - using var message = CreateRecognizeRequest(callConnectionId, recognizeRequest); + using var message = CreateRecognizeRequest(callConnectionId, recognizeRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/communication/Azure.Communication.CallingServer/src/Generated/ServerCallingRestClient.cs b/sdk/communication/Azure.Communication.CallingServer/src/Generated/ServerCallingRestClient.cs index 6b253bdf1be83..535960e7d04ca 100644 --- a/sdk/communication/Azure.Communication.CallingServer/src/Generated/ServerCallingRestClient.cs +++ b/sdk/communication/Azure.Communication.CallingServer/src/Generated/ServerCallingRestClient.cs @@ -37,7 +37,7 @@ public ServerCallingRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline _apiVersion = apiVersion ?? throw new ArgumentNullException(nameof(apiVersion)); } - internal HttpMessage CreateCreateCallRequest(CreateCallRequestInternal createCallRequest) + internal HttpMessage CreateCreateCallRequest(CreateCallRequestInternal createCallRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -52,23 +52,23 @@ internal HttpMessage CreateCreateCallRequest(CreateCallRequestInternal createCal request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(createCallRequest); + content.JsonWriter.WriteObjectValue(createCallRequestInternal); request.Content = content; return message; } /// Create an outbound call. - /// The create call request. + /// The create call request. /// The cancellation token to use. - /// is null. - public async Task> CreateCallAsync(CreateCallRequestInternal createCallRequest, CancellationToken cancellationToken = default) + /// is null. + public async Task> CreateCallAsync(CreateCallRequestInternal createCallRequestInternal, CancellationToken cancellationToken = default) { - if (createCallRequest == null) + if (createCallRequestInternal == null) { - throw new ArgumentNullException(nameof(createCallRequest)); + throw new ArgumentNullException(nameof(createCallRequestInternal)); } - using var message = CreateCreateCallRequest(createCallRequest); + using var message = CreateCreateCallRequest(createCallRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -85,17 +85,17 @@ public async Task> CreateCallAsync(Cr } /// Create an outbound call. - /// The create call request. + /// The create call request. /// The cancellation token to use. - /// is null. - public Response CreateCall(CreateCallRequestInternal createCallRequest, CancellationToken cancellationToken = default) + /// is null. + public Response CreateCall(CreateCallRequestInternal createCallRequestInternal, CancellationToken cancellationToken = default) { - if (createCallRequest == null) + if (createCallRequestInternal == null) { - throw new ArgumentNullException(nameof(createCallRequest)); + throw new ArgumentNullException(nameof(createCallRequestInternal)); } - using var message = CreateCreateCallRequest(createCallRequest); + using var message = CreateCreateCallRequest(createCallRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -111,7 +111,7 @@ public Response CreateCall(CreateCallRequestIn } } - internal HttpMessage CreateAnswerCallRequest(AnswerCallRequestInternal answerCallRequest) + internal HttpMessage CreateAnswerCallRequest(AnswerCallRequestInternal answerCallRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -126,24 +126,24 @@ internal HttpMessage CreateAnswerCallRequest(AnswerCallRequestInternal answerCal request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(answerCallRequest); + content.JsonWriter.WriteObjectValue(answerCallRequestInternal); request.Content = content; return message; } /// Answer a Call. - /// The answer call request. + /// The answer call request. /// The cancellation token to use. - /// is null. + /// is null. /// Answer a call using the IncomingCallContext from Event Grid. - public async Task> AnswerCallAsync(AnswerCallRequestInternal answerCallRequest, CancellationToken cancellationToken = default) + public async Task> AnswerCallAsync(AnswerCallRequestInternal answerCallRequestInternal, CancellationToken cancellationToken = default) { - if (answerCallRequest == null) + if (answerCallRequestInternal == null) { - throw new ArgumentNullException(nameof(answerCallRequest)); + throw new ArgumentNullException(nameof(answerCallRequestInternal)); } - using var message = CreateAnswerCallRequest(answerCallRequest); + using var message = CreateAnswerCallRequest(answerCallRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -160,18 +160,18 @@ public async Task> AnswerCallAsync(An } /// Answer a Call. - /// The answer call request. + /// The answer call request. /// The cancellation token to use. - /// is null. + /// is null. /// Answer a call using the IncomingCallContext from Event Grid. - public Response AnswerCall(AnswerCallRequestInternal answerCallRequest, CancellationToken cancellationToken = default) + public Response AnswerCall(AnswerCallRequestInternal answerCallRequestInternal, CancellationToken cancellationToken = default) { - if (answerCallRequest == null) + if (answerCallRequestInternal == null) { - throw new ArgumentNullException(nameof(answerCallRequest)); + throw new ArgumentNullException(nameof(answerCallRequestInternal)); } - using var message = CreateAnswerCallRequest(answerCallRequest); + using var message = CreateAnswerCallRequest(answerCallRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -187,7 +187,7 @@ public Response AnswerCall(AnswerCallRequestIn } } - internal HttpMessage CreateRedirectCallRequest(RedirectCallRequestInternal redirectCallRequest) + internal HttpMessage CreateRedirectCallRequest(RedirectCallRequestInternal redirectCallRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -201,23 +201,23 @@ internal HttpMessage CreateRedirectCallRequest(RedirectCallRequestInternal redir request.Headers.Add("Repeatability-First-Sent", DateTimeOffset.Now, "R"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(redirectCallRequest); + content.JsonWriter.WriteObjectValue(redirectCallRequestInternal); request.Content = content; return message; } /// Redirect a call. - /// The to use. + /// The to use. /// The cancellation token to use. - /// is null. - public async Task RedirectCallAsync(RedirectCallRequestInternal redirectCallRequest, CancellationToken cancellationToken = default) + /// is null. + public async Task RedirectCallAsync(RedirectCallRequestInternal redirectCallRequestInternal, CancellationToken cancellationToken = default) { - if (redirectCallRequest == null) + if (redirectCallRequestInternal == null) { - throw new ArgumentNullException(nameof(redirectCallRequest)); + throw new ArgumentNullException(nameof(redirectCallRequestInternal)); } - using var message = CreateRedirectCallRequest(redirectCallRequest); + using var message = CreateRedirectCallRequest(redirectCallRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -229,17 +229,17 @@ public async Task RedirectCallAsync(RedirectCallRequestInternal redire } /// Redirect a call. - /// The to use. + /// The to use. /// The cancellation token to use. - /// is null. - public Response RedirectCall(RedirectCallRequestInternal redirectCallRequest, CancellationToken cancellationToken = default) + /// is null. + public Response RedirectCall(RedirectCallRequestInternal redirectCallRequestInternal, CancellationToken cancellationToken = default) { - if (redirectCallRequest == null) + if (redirectCallRequestInternal == null) { - throw new ArgumentNullException(nameof(redirectCallRequest)); + throw new ArgumentNullException(nameof(redirectCallRequestInternal)); } - using var message = CreateRedirectCallRequest(redirectCallRequest); + using var message = CreateRedirectCallRequest(redirectCallRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -250,7 +250,7 @@ public Response RedirectCall(RedirectCallRequestInternal redirectCallRequest, Ca } } - internal HttpMessage CreateRejectCallRequest(RejectCallRequestInternal rejectCallRequest) + internal HttpMessage CreateRejectCallRequest(RejectCallRequestInternal rejectCallRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -264,23 +264,23 @@ internal HttpMessage CreateRejectCallRequest(RejectCallRequestInternal rejectCal request.Headers.Add("Repeatability-First-Sent", DateTimeOffset.Now, "R"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(rejectCallRequest); + content.JsonWriter.WriteObjectValue(rejectCallRequestInternal); request.Content = content; return message; } /// Reject the call. - /// The reject call request. + /// The reject call request. /// The cancellation token to use. - /// is null. - public async Task RejectCallAsync(RejectCallRequestInternal rejectCallRequest, CancellationToken cancellationToken = default) + /// is null. + public async Task RejectCallAsync(RejectCallRequestInternal rejectCallRequestInternal, CancellationToken cancellationToken = default) { - if (rejectCallRequest == null) + if (rejectCallRequestInternal == null) { - throw new ArgumentNullException(nameof(rejectCallRequest)); + throw new ArgumentNullException(nameof(rejectCallRequestInternal)); } - using var message = CreateRejectCallRequest(rejectCallRequest); + using var message = CreateRejectCallRequest(rejectCallRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -292,17 +292,17 @@ public async Task RejectCallAsync(RejectCallRequestInternal rejectCall } /// Reject the call. - /// The reject call request. + /// The reject call request. /// The cancellation token to use. - /// is null. - public Response RejectCall(RejectCallRequestInternal rejectCallRequest, CancellationToken cancellationToken = default) + /// is null. + public Response RejectCall(RejectCallRequestInternal rejectCallRequestInternal, CancellationToken cancellationToken = default) { - if (rejectCallRequest == null) + if (rejectCallRequestInternal == null) { - throw new ArgumentNullException(nameof(rejectCallRequest)); + throw new ArgumentNullException(nameof(rejectCallRequestInternal)); } - using var message = CreateRejectCallRequest(rejectCallRequest); + using var message = CreateRejectCallRequest(rejectCallRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/DigitalTwinModelsRestClient.cs b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/DigitalTwinModelsRestClient.cs index ba2281f130577..228df56b63e5f 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/DigitalTwinModelsRestClient.cs +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/DigitalTwinModelsRestClient.cs @@ -38,7 +38,7 @@ public DigitalTwinModelsRestClient(ClientDiagnostics clientDiagnostics, HttpPipe _apiVersion = apiVersion ?? throw new ArgumentNullException(nameof(apiVersion)); } - internal HttpMessage CreateAddRequest(IEnumerable models, CreateModelsOptions digitalTwinModelsAddOptions) + internal HttpMessage CreateAddRequest(IEnumerable models, CreateModelsOptions createModelsOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -79,17 +79,17 @@ internal HttpMessage CreateAddRequest(IEnumerable models, CreateModelsOp /// * ModelAlreadyExists - The model provided already exists. /// /// An array of models to add. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. /// is null. - public async Task>> AddAsync(IEnumerable models, CreateModelsOptions digitalTwinModelsAddOptions = null, CancellationToken cancellationToken = default) + public async Task>> AddAsync(IEnumerable models, CreateModelsOptions createModelsOptions = null, CancellationToken cancellationToken = default) { if (models == null) { throw new ArgumentNullException(nameof(models)); } - using var message = CreateAddRequest(models, digitalTwinModelsAddOptions); + using var message = CreateAddRequest(models, createModelsOptions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -123,17 +123,17 @@ public async Task>> AddAsync(IEnum /// * ModelAlreadyExists - The model provided already exists. /// /// An array of models to add. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. /// is null. - public Response> Add(IEnumerable models, CreateModelsOptions digitalTwinModelsAddOptions = null, CancellationToken cancellationToken = default) + public Response> Add(IEnumerable models, CreateModelsOptions createModelsOptions = null, CancellationToken cancellationToken = default) { if (models == null) { throw new ArgumentNullException(nameof(models)); } - using var message = CreateAddRequest(models, digitalTwinModelsAddOptions); + using var message = CreateAddRequest(models, createModelsOptions); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -154,7 +154,7 @@ public Response> Add(IEnumerable mo } } - internal HttpMessage CreateListRequest(IEnumerable dependenciesFor, bool? includeModelDefinition, GetModelsOptions digitalTwinModelsListOptions) + internal HttpMessage CreateListRequest(IEnumerable dependenciesFor, bool? includeModelDefinition, GetModelsOptions getModelsOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -175,9 +175,9 @@ internal HttpMessage CreateListRequest(IEnumerable dependenciesFor, bool } uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - if (digitalTwinModelsListOptions?.MaxItemsPerPage != null) + if (getModelsOptions?.MaxItemsPerPage != null) { - request.Headers.Add("max-items-per-page", digitalTwinModelsListOptions.MaxItemsPerPage.Value); + request.Headers.Add("max-items-per-page", getModelsOptions.MaxItemsPerPage.Value); } request.Headers.Add("Accept", "application/json"); return message; @@ -195,11 +195,11 @@ internal HttpMessage CreateListRequest(IEnumerable dependenciesFor, bool /// /// If specified, only return the set of the specified models along with their dependencies. If omitted, all models are retrieved. /// When true the model definition will be returned as part of the result. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. - public async Task> ListAsync(IEnumerable dependenciesFor = null, bool? includeModelDefinition = null, GetModelsOptions digitalTwinModelsListOptions = null, CancellationToken cancellationToken = default) + public async Task> ListAsync(IEnumerable dependenciesFor = null, bool? includeModelDefinition = null, GetModelsOptions getModelsOptions = null, CancellationToken cancellationToken = default) { - using var message = CreateListRequest(dependenciesFor, includeModelDefinition, digitalTwinModelsListOptions); + using var message = CreateListRequest(dependenciesFor, includeModelDefinition, getModelsOptions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -227,11 +227,11 @@ public async Task> ListAsync(IEnu /// /// If specified, only return the set of the specified models along with their dependencies. If omitted, all models are retrieved. /// When true the model definition will be returned as part of the result. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. - public Response List(IEnumerable dependenciesFor = null, bool? includeModelDefinition = null, GetModelsOptions digitalTwinModelsListOptions = null, CancellationToken cancellationToken = default) + public Response List(IEnumerable dependenciesFor = null, bool? includeModelDefinition = null, GetModelsOptions getModelsOptions = null, CancellationToken cancellationToken = default) { - using var message = CreateListRequest(dependenciesFor, includeModelDefinition, digitalTwinModelsListOptions); + using var message = CreateListRequest(dependenciesFor, includeModelDefinition, getModelsOptions); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -247,7 +247,7 @@ public Response List(IEnumerable d } } - internal HttpMessage CreateGetByIdRequest(string id, bool? includeModelDefinition, GetModelOptions digitalTwinModelsGetByIdOptions) + internal HttpMessage CreateGetByIdRequest(string id, bool? includeModelDefinition, GetModelOptions getModelOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -278,17 +278,17 @@ internal HttpMessage CreateGetByIdRequest(string id, bool? includeModelDefinitio /// /// The id for the model. The id is globally unique and case sensitive. /// When true the model definition will be returned as part of the result. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. /// is null. - public async Task> GetByIdAsync(string id, bool? includeModelDefinition = null, GetModelOptions digitalTwinModelsGetByIdOptions = null, CancellationToken cancellationToken = default) + public async Task> GetByIdAsync(string id, bool? includeModelDefinition = null, GetModelOptions getModelOptions = null, CancellationToken cancellationToken = default) { if (id == null) { throw new ArgumentNullException(nameof(id)); } - using var message = CreateGetByIdRequest(id, includeModelDefinition, digitalTwinModelsGetByIdOptions); + using var message = CreateGetByIdRequest(id, includeModelDefinition, getModelOptions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -316,17 +316,17 @@ public async Task> GetByIdAsync(string id, bool? /// /// The id for the model. The id is globally unique and case sensitive. /// When true the model definition will be returned as part of the result. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. /// is null. - public Response GetById(string id, bool? includeModelDefinition = null, GetModelOptions digitalTwinModelsGetByIdOptions = null, CancellationToken cancellationToken = default) + public Response GetById(string id, bool? includeModelDefinition = null, GetModelOptions getModelOptions = null, CancellationToken cancellationToken = default) { if (id == null) { throw new ArgumentNullException(nameof(id)); } - using var message = CreateGetByIdRequest(id, includeModelDefinition, digitalTwinModelsGetByIdOptions); + using var message = CreateGetByIdRequest(id, includeModelDefinition, getModelOptions); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -342,7 +342,7 @@ public Response GetById(string id, bool? includeModelDefi } } - internal HttpMessage CreateUpdateRequest(string id, IEnumerable updateModel, DecommissionModelOptions digitalTwinModelsUpdateOptions) + internal HttpMessage CreateUpdateRequest(string id, IEnumerable updateModel, DecommissionModelOptions decommissionModelOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -386,10 +386,10 @@ internal HttpMessage CreateUpdateRequest(string id, IEnumerable updateMo /// /// The id for the model. The id is globally unique and case sensitive. /// An update specification described by JSON Patch. Only the decommissioned property can be replaced. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. /// or is null. - public async Task UpdateAsync(string id, IEnumerable updateModel, DecommissionModelOptions digitalTwinModelsUpdateOptions = null, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string id, IEnumerable updateModel, DecommissionModelOptions decommissionModelOptions = null, CancellationToken cancellationToken = default) { if (id == null) { @@ -400,7 +400,7 @@ public async Task UpdateAsync(string id, IEnumerable updateMod throw new ArgumentNullException(nameof(updateModel)); } - using var message = CreateUpdateRequest(id, updateModel, digitalTwinModelsUpdateOptions); + using var message = CreateUpdateRequest(id, updateModel, decommissionModelOptions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -426,10 +426,10 @@ public async Task UpdateAsync(string id, IEnumerable updateMod /// /// The id for the model. The id is globally unique and case sensitive. /// An update specification described by JSON Patch. Only the decommissioned property can be replaced. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. /// or is null. - public Response Update(string id, IEnumerable updateModel, DecommissionModelOptions digitalTwinModelsUpdateOptions = null, CancellationToken cancellationToken = default) + public Response Update(string id, IEnumerable updateModel, DecommissionModelOptions decommissionModelOptions = null, CancellationToken cancellationToken = default) { if (id == null) { @@ -440,7 +440,7 @@ public Response Update(string id, IEnumerable updateModel, DecommissionM throw new ArgumentNullException(nameof(updateModel)); } - using var message = CreateUpdateRequest(id, updateModel, digitalTwinModelsUpdateOptions); + using var message = CreateUpdateRequest(id, updateModel, decommissionModelOptions); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -451,7 +451,7 @@ public Response Update(string id, IEnumerable updateModel, DecommissionM } } - internal HttpMessage CreateDeleteRequest(string id, DeleteModelOptions digitalTwinModelsDeleteOptions) + internal HttpMessage CreateDeleteRequest(string id, DeleteModelOptions deleteModelOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -479,17 +479,17 @@ internal HttpMessage CreateDeleteRequest(string id, DeleteModelOptions digitalTw /// * ModelReferencesNotDeleted - The model refers to models that are not deleted. /// /// The id for the model. The id is globally unique and case sensitive. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. /// is null. - public async Task DeleteAsync(string id, DeleteModelOptions digitalTwinModelsDeleteOptions = null, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string id, DeleteModelOptions deleteModelOptions = null, CancellationToken cancellationToken = default) { if (id == null) { throw new ArgumentNullException(nameof(id)); } - using var message = CreateDeleteRequest(id, digitalTwinModelsDeleteOptions); + using var message = CreateDeleteRequest(id, deleteModelOptions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -513,17 +513,17 @@ public async Task DeleteAsync(string id, DeleteModelOptions digitalTwi /// * ModelReferencesNotDeleted - The model refers to models that are not deleted. /// /// The id for the model. The id is globally unique and case sensitive. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. /// is null. - public Response Delete(string id, DeleteModelOptions digitalTwinModelsDeleteOptions = null, CancellationToken cancellationToken = default) + public Response Delete(string id, DeleteModelOptions deleteModelOptions = null, CancellationToken cancellationToken = default) { if (id == null) { throw new ArgumentNullException(nameof(id)); } - using var message = CreateDeleteRequest(id, digitalTwinModelsDeleteOptions); + using var message = CreateDeleteRequest(id, deleteModelOptions); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -534,7 +534,7 @@ public Response Delete(string id, DeleteModelOptions digitalTwinModelsDeleteOpti } } - internal HttpMessage CreateListNextPageRequest(string nextLink, IEnumerable dependenciesFor, bool? includeModelDefinition, GetModelsOptions digitalTwinModelsListOptions) + internal HttpMessage CreateListNextPageRequest(string nextLink, IEnumerable dependenciesFor, bool? includeModelDefinition, GetModelsOptions getModelsOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -543,9 +543,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, IEnumerable The URL to the next page of results. /// If specified, only return the set of the specified models along with their dependencies. If omitted, all models are retrieved. /// When true the model definition will be returned as part of the result. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. /// is null. - public async Task> ListNextPageAsync(string nextLink, IEnumerable dependenciesFor = null, bool? includeModelDefinition = null, GetModelsOptions digitalTwinModelsListOptions = null, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, IEnumerable dependenciesFor = null, bool? includeModelDefinition = null, GetModelsOptions getModelsOptions = null, CancellationToken cancellationToken = default) { if (nextLink == null) { throw new ArgumentNullException(nameof(nextLink)); } - using var message = CreateListNextPageRequest(nextLink, dependenciesFor, includeModelDefinition, digitalTwinModelsListOptions); + using var message = CreateListNextPageRequest(nextLink, dependenciesFor, includeModelDefinition, getModelsOptions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -603,17 +603,17 @@ public async Task> ListNextPageAs /// The URL to the next page of results. /// If specified, only return the set of the specified models along with their dependencies. If omitted, all models are retrieved. /// When true the model definition will be returned as part of the result. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. /// is null. - public Response ListNextPage(string nextLink, IEnumerable dependenciesFor = null, bool? includeModelDefinition = null, GetModelsOptions digitalTwinModelsListOptions = null, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, IEnumerable dependenciesFor = null, bool? includeModelDefinition = null, GetModelsOptions getModelsOptions = null, CancellationToken cancellationToken = default) { if (nextLink == null) { throw new ArgumentNullException(nameof(nextLink)); } - using var message = CreateListNextPageRequest(nextLink, dependenciesFor, includeModelDefinition, digitalTwinModelsListOptions); + using var message = CreateListNextPageRequest(nextLink, dependenciesFor, includeModelDefinition, getModelsOptions); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/DigitalTwinsRestClient.cs b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/DigitalTwinsRestClient.cs index 46ad9cafadc06..a3d22ed0579c1 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/DigitalTwinsRestClient.cs +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/DigitalTwinsRestClient.cs @@ -38,7 +38,7 @@ public DigitalTwinsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline _apiVersion = apiVersion ?? throw new ArgumentNullException(nameof(apiVersion)); } - internal HttpMessage CreateGetByIdRequest(string id, GetDigitalTwinOptions digitalTwinsGetByIdOptions) + internal HttpMessage CreateGetByIdRequest(string id, GetDigitalTwinOptions getDigitalTwinOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -53,7 +53,7 @@ internal HttpMessage CreateGetByIdRequest(string id, GetDigitalTwinOptions digit return message; } - internal HttpMessage CreateDeleteRequest(string id, DeleteDigitalTwinOptions digitalTwinsDeleteOptions) + internal HttpMessage CreateDeleteRequest(string id, DeleteDigitalTwinOptions deleteDigitalTwinOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -64,9 +64,9 @@ internal HttpMessage CreateDeleteRequest(string id, DeleteDigitalTwinOptions dig uri.AppendPath(id, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - if (digitalTwinsDeleteOptions?.IfMatch != null) + if (deleteDigitalTwinOptions?.IfMatch != null) { - request.Headers.Add("If-Match", digitalTwinsDeleteOptions.IfMatch); + request.Headers.Add("If-Match", deleteDigitalTwinOptions.IfMatch); } request.Headers.Add("Accept", "application/json"); return message; @@ -85,17 +85,17 @@ internal HttpMessage CreateDeleteRequest(string id, DeleteDigitalTwinOptions dig /// * PreconditionFailed - The precondition check (If-Match or If-None-Match) failed. /// /// The id of the digital twin. The id is unique within the service and case sensitive. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. /// is null. - public async Task DeleteAsync(string id, DeleteDigitalTwinOptions digitalTwinsDeleteOptions = null, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string id, DeleteDigitalTwinOptions deleteDigitalTwinOptions = null, CancellationToken cancellationToken = default) { if (id == null) { throw new ArgumentNullException(nameof(id)); } - using var message = CreateDeleteRequest(id, digitalTwinsDeleteOptions); + using var message = CreateDeleteRequest(id, deleteDigitalTwinOptions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -119,17 +119,17 @@ public async Task DeleteAsync(string id, DeleteDigitalTwinOptions digi /// * PreconditionFailed - The precondition check (If-Match or If-None-Match) failed. /// /// The id of the digital twin. The id is unique within the service and case sensitive. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. /// is null. - public Response Delete(string id, DeleteDigitalTwinOptions digitalTwinsDeleteOptions = null, CancellationToken cancellationToken = default) + public Response Delete(string id, DeleteDigitalTwinOptions deleteDigitalTwinOptions = null, CancellationToken cancellationToken = default) { if (id == null) { throw new ArgumentNullException(nameof(id)); } - using var message = CreateDeleteRequest(id, digitalTwinsDeleteOptions); + using var message = CreateDeleteRequest(id, deleteDigitalTwinOptions); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -140,7 +140,7 @@ public Response Delete(string id, DeleteDigitalTwinOptions digitalTwinsDeleteOpt } } - internal HttpMessage CreateUpdateRequest(string id, IEnumerable patchDocument, UpdateDigitalTwinOptions digitalTwinsUpdateOptions) + internal HttpMessage CreateUpdateRequest(string id, IEnumerable patchDocument, UpdateDigitalTwinOptions updateDigitalTwinOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -151,9 +151,9 @@ internal HttpMessage CreateUpdateRequest(string id, IEnumerable patchDoc uri.AppendPath(id, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - if (digitalTwinsUpdateOptions?.IfMatch != null) + if (updateDigitalTwinOptions?.IfMatch != null) { - request.Headers.Add("If-Match", digitalTwinsUpdateOptions.IfMatch); + request.Headers.Add("If-Match", updateDigitalTwinOptions.IfMatch); } request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json-patch+json"); @@ -173,7 +173,7 @@ internal HttpMessage CreateUpdateRequest(string id, IEnumerable patchDoc return message; } - internal HttpMessage CreateGetRelationshipByIdRequest(string id, string relationshipId, GetRelationshipOptions digitalTwinsGetRelationshipByIdOptions) + internal HttpMessage CreateGetRelationshipByIdRequest(string id, string relationshipId, GetRelationshipOptions getRelationshipOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -190,7 +190,7 @@ internal HttpMessage CreateGetRelationshipByIdRequest(string id, string relation return message; } - internal HttpMessage CreateAddRelationshipRequest(string id, string relationshipId, object relationship, CreateOrReplaceRelationshipOptions digitalTwinsAddRelationshipOptions) + internal HttpMessage CreateAddRelationshipRequest(string id, string relationshipId, object relationship, CreateOrReplaceRelationshipOptions createOrReplaceRelationshipOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -203,9 +203,9 @@ internal HttpMessage CreateAddRelationshipRequest(string id, string relationship uri.AppendPath(relationshipId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - if (digitalTwinsAddRelationshipOptions?.IfNoneMatch != null) + if (createOrReplaceRelationshipOptions?.IfNoneMatch != null) { - request.Headers.Add("If-None-Match", digitalTwinsAddRelationshipOptions.IfNoneMatch); + request.Headers.Add("If-None-Match", createOrReplaceRelationshipOptions.IfNoneMatch); } request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); @@ -215,7 +215,7 @@ internal HttpMessage CreateAddRelationshipRequest(string id, string relationship return message; } - internal HttpMessage CreateDeleteRelationshipRequest(string id, string relationshipId, DeleteRelationshipOptions digitalTwinsDeleteRelationshipOptions) + internal HttpMessage CreateDeleteRelationshipRequest(string id, string relationshipId, DeleteRelationshipOptions deleteRelationshipOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -228,9 +228,9 @@ internal HttpMessage CreateDeleteRelationshipRequest(string id, string relations uri.AppendPath(relationshipId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - if (digitalTwinsDeleteRelationshipOptions?.IfMatch != null) + if (deleteRelationshipOptions?.IfMatch != null) { - request.Headers.Add("If-Match", digitalTwinsDeleteRelationshipOptions.IfMatch); + request.Headers.Add("If-Match", deleteRelationshipOptions.IfMatch); } request.Headers.Add("Accept", "application/json"); return message; @@ -250,10 +250,10 @@ internal HttpMessage CreateDeleteRelationshipRequest(string id, string relations /// /// The id of the digital twin. The id is unique within the service and case sensitive. /// The id of the relationship. The id is unique within the digital twin and case sensitive. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. /// or is null. - public async Task DeleteRelationshipAsync(string id, string relationshipId, DeleteRelationshipOptions digitalTwinsDeleteRelationshipOptions = null, CancellationToken cancellationToken = default) + public async Task DeleteRelationshipAsync(string id, string relationshipId, DeleteRelationshipOptions deleteRelationshipOptions = null, CancellationToken cancellationToken = default) { if (id == null) { @@ -264,7 +264,7 @@ public async Task DeleteRelationshipAsync(string id, string relationsh throw new ArgumentNullException(nameof(relationshipId)); } - using var message = CreateDeleteRelationshipRequest(id, relationshipId, digitalTwinsDeleteRelationshipOptions); + using var message = CreateDeleteRelationshipRequest(id, relationshipId, deleteRelationshipOptions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -289,10 +289,10 @@ public async Task DeleteRelationshipAsync(string id, string relationsh /// /// The id of the digital twin. The id is unique within the service and case sensitive. /// The id of the relationship. The id is unique within the digital twin and case sensitive. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. /// or is null. - public Response DeleteRelationship(string id, string relationshipId, DeleteRelationshipOptions digitalTwinsDeleteRelationshipOptions = null, CancellationToken cancellationToken = default) + public Response DeleteRelationship(string id, string relationshipId, DeleteRelationshipOptions deleteRelationshipOptions = null, CancellationToken cancellationToken = default) { if (id == null) { @@ -303,7 +303,7 @@ public Response DeleteRelationship(string id, string relationshipId, DeleteRelat throw new ArgumentNullException(nameof(relationshipId)); } - using var message = CreateDeleteRelationshipRequest(id, relationshipId, digitalTwinsDeleteRelationshipOptions); + using var message = CreateDeleteRelationshipRequest(id, relationshipId, deleteRelationshipOptions); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -314,7 +314,7 @@ public Response DeleteRelationship(string id, string relationshipId, DeleteRelat } } - internal HttpMessage CreateUpdateRelationshipRequest(string id, string relationshipId, IEnumerable patchDocument, UpdateRelationshipOptions digitalTwinsUpdateRelationshipOptions) + internal HttpMessage CreateUpdateRelationshipRequest(string id, string relationshipId, IEnumerable patchDocument, UpdateRelationshipOptions updateRelationshipOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -327,9 +327,9 @@ internal HttpMessage CreateUpdateRelationshipRequest(string id, string relations uri.AppendPath(relationshipId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - if (digitalTwinsUpdateRelationshipOptions?.IfMatch != null) + if (updateRelationshipOptions?.IfMatch != null) { - request.Headers.Add("If-Match", digitalTwinsUpdateRelationshipOptions.IfMatch); + request.Headers.Add("If-Match", updateRelationshipOptions.IfMatch); } request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json-patch+json"); @@ -349,7 +349,7 @@ internal HttpMessage CreateUpdateRelationshipRequest(string id, string relations return message; } - internal HttpMessage CreateListRelationshipsRequest(string id, string relationshipName, GetRelationshipsOptions digitalTwinsListRelationshipsOptions) + internal HttpMessage CreateListRelationshipsRequest(string id, string relationshipName, GetRelationshipsOptions getRelationshipsOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -369,7 +369,7 @@ internal HttpMessage CreateListRelationshipsRequest(string id, string relationsh return message; } - internal HttpMessage CreateListIncomingRelationshipsRequest(string id, GetIncomingRelationshipsOptions digitalTwinsListIncomingRelationshipsOptions) + internal HttpMessage CreateListIncomingRelationshipsRequest(string id, GetIncomingRelationshipsOptions getIncomingRelationshipsOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -395,17 +395,17 @@ internal HttpMessage CreateListIncomingRelationshipsRequest(string id, GetIncomi /// * DigitalTwinNotFound - The digital twin was not found. /// /// The id of the digital twin. The id is unique within the service and case sensitive. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. /// is null. - public async Task> ListIncomingRelationshipsAsync(string id, GetIncomingRelationshipsOptions digitalTwinsListIncomingRelationshipsOptions = null, CancellationToken cancellationToken = default) + public async Task> ListIncomingRelationshipsAsync(string id, GetIncomingRelationshipsOptions getIncomingRelationshipsOptions = null, CancellationToken cancellationToken = default) { if (id == null) { throw new ArgumentNullException(nameof(id)); } - using var message = CreateListIncomingRelationshipsRequest(id, digitalTwinsListIncomingRelationshipsOptions); + using var message = CreateListIncomingRelationshipsRequest(id, getIncomingRelationshipsOptions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -431,17 +431,17 @@ public async Task> ListIncomingRelation /// * DigitalTwinNotFound - The digital twin was not found. /// /// The id of the digital twin. The id is unique within the service and case sensitive. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. /// is null. - public Response ListIncomingRelationships(string id, GetIncomingRelationshipsOptions digitalTwinsListIncomingRelationshipsOptions = null, CancellationToken cancellationToken = default) + public Response ListIncomingRelationships(string id, GetIncomingRelationshipsOptions getIncomingRelationshipsOptions = null, CancellationToken cancellationToken = default) { if (id == null) { throw new ArgumentNullException(nameof(id)); } - using var message = CreateListIncomingRelationshipsRequest(id, digitalTwinsListIncomingRelationshipsOptions); + using var message = CreateListIncomingRelationshipsRequest(id, getIncomingRelationshipsOptions); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -457,7 +457,7 @@ public Response ListIncomingRelationships(string } } - internal HttpMessage CreateSendTelemetryRequest(string id, string messageId, object telemetry, string telemetrySourceTime, PublishTelemetryOptions digitalTwinsSendTelemetryOptions) + internal HttpMessage CreateSendTelemetryRequest(string id, string messageId, object telemetry, string telemetrySourceTime, PublishTelemetryOptions publishTelemetryOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -482,7 +482,7 @@ internal HttpMessage CreateSendTelemetryRequest(string id, string messageId, obj return message; } - internal HttpMessage CreateSendComponentTelemetryRequest(string id, string componentPath, string messageId, object telemetry, string telemetrySourceTime, PublishComponentTelemetryOptions digitalTwinsSendComponentTelemetryOptions) + internal HttpMessage CreateSendComponentTelemetryRequest(string id, string componentPath, string messageId, object telemetry, string telemetrySourceTime, PublishComponentTelemetryOptions publishComponentTelemetryOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -509,7 +509,7 @@ internal HttpMessage CreateSendComponentTelemetryRequest(string id, string compo return message; } - internal HttpMessage CreateGetComponentRequest(string id, string componentPath, GetComponentOptions digitalTwinsGetComponentOptions) + internal HttpMessage CreateGetComponentRequest(string id, string componentPath, GetComponentOptions getComponentOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -526,7 +526,7 @@ internal HttpMessage CreateGetComponentRequest(string id, string componentPath, return message; } - internal HttpMessage CreateUpdateComponentRequest(string id, string componentPath, IEnumerable patchDocument, UpdateComponentOptions digitalTwinsUpdateComponentOptions) + internal HttpMessage CreateUpdateComponentRequest(string id, string componentPath, IEnumerable patchDocument, UpdateComponentOptions updateComponentOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -539,9 +539,9 @@ internal HttpMessage CreateUpdateComponentRequest(string id, string componentPat uri.AppendPath(componentPath, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - if (digitalTwinsUpdateComponentOptions?.IfMatch != null) + if (updateComponentOptions?.IfMatch != null) { - request.Headers.Add("If-Match", digitalTwinsUpdateComponentOptions.IfMatch); + request.Headers.Add("If-Match", updateComponentOptions.IfMatch); } request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json-patch+json"); @@ -561,7 +561,7 @@ internal HttpMessage CreateUpdateComponentRequest(string id, string componentPat return message; } - internal HttpMessage CreateListRelationshipsNextPageRequest(string nextLink, string id, string relationshipName, GetRelationshipsOptions digitalTwinsListRelationshipsOptions) + internal HttpMessage CreateListRelationshipsNextPageRequest(string nextLink, string id, string relationshipName, GetRelationshipsOptions getRelationshipsOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -574,7 +574,7 @@ internal HttpMessage CreateListRelationshipsNextPageRequest(string nextLink, str return message; } - internal HttpMessage CreateListIncomingRelationshipsNextPageRequest(string nextLink, string id, GetIncomingRelationshipsOptions digitalTwinsListIncomingRelationshipsOptions) + internal HttpMessage CreateListIncomingRelationshipsNextPageRequest(string nextLink, string id, GetIncomingRelationshipsOptions getIncomingRelationshipsOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -598,10 +598,10 @@ internal HttpMessage CreateListIncomingRelationshipsNextPageRequest(string nextL /// /// The URL to the next page of results. /// The id of the digital twin. The id is unique within the service and case sensitive. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. /// or is null. - public async Task> ListIncomingRelationshipsNextPageAsync(string nextLink, string id, GetIncomingRelationshipsOptions digitalTwinsListIncomingRelationshipsOptions = null, CancellationToken cancellationToken = default) + public async Task> ListIncomingRelationshipsNextPageAsync(string nextLink, string id, GetIncomingRelationshipsOptions getIncomingRelationshipsOptions = null, CancellationToken cancellationToken = default) { if (nextLink == null) { @@ -612,7 +612,7 @@ public async Task> ListIncomingRelation throw new ArgumentNullException(nameof(id)); } - using var message = CreateListIncomingRelationshipsNextPageRequest(nextLink, id, digitalTwinsListIncomingRelationshipsOptions); + using var message = CreateListIncomingRelationshipsNextPageRequest(nextLink, id, getIncomingRelationshipsOptions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -639,10 +639,10 @@ public async Task> ListIncomingRelation /// /// The URL to the next page of results. /// The id of the digital twin. The id is unique within the service and case sensitive. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. /// or is null. - public Response ListIncomingRelationshipsNextPage(string nextLink, string id, GetIncomingRelationshipsOptions digitalTwinsListIncomingRelationshipsOptions = null, CancellationToken cancellationToken = default) + public Response ListIncomingRelationshipsNextPage(string nextLink, string id, GetIncomingRelationshipsOptions getIncomingRelationshipsOptions = null, CancellationToken cancellationToken = default) { if (nextLink == null) { @@ -653,7 +653,7 @@ public Response ListIncomingRelationshipsNextPag throw new ArgumentNullException(nameof(id)); } - using var message = CreateListIncomingRelationshipsNextPageRequest(nextLink, id, digitalTwinsListIncomingRelationshipsOptions); + using var message = CreateListIncomingRelationshipsNextPageRequest(nextLink, id, getIncomingRelationshipsOptions); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/EventRoutesRestClient.cs b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/EventRoutesRestClient.cs index b0a5d6fed11b7..88700b9554205 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/EventRoutesRestClient.cs +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/EventRoutesRestClient.cs @@ -37,7 +37,7 @@ public EventRoutesRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline p _apiVersion = apiVersion ?? throw new ArgumentNullException(nameof(apiVersion)); } - internal HttpMessage CreateListRequest(GetDigitalTwinsEventRoutesOptions eventRoutesListOptions) + internal HttpMessage CreateListRequest(GetDigitalTwinsEventRoutesOptions getDigitalTwinsEventRoutesOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -47,9 +47,9 @@ internal HttpMessage CreateListRequest(GetDigitalTwinsEventRoutesOptions eventRo uri.AppendPath("/eventroutes", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - if (eventRoutesListOptions?.MaxItemsPerPage != null) + if (getDigitalTwinsEventRoutesOptions?.MaxItemsPerPage != null) { - request.Headers.Add("max-items-per-page", eventRoutesListOptions.MaxItemsPerPage.Value); + request.Headers.Add("max-items-per-page", getDigitalTwinsEventRoutesOptions.MaxItemsPerPage.Value); } request.Headers.Add("Accept", "application/json"); return message; @@ -60,11 +60,11 @@ internal HttpMessage CreateListRequest(GetDigitalTwinsEventRoutesOptions eventRo /// Status codes: /// * 200 OK /// - /// Parameter group. + /// Parameter group. /// The cancellation token to use. - public async Task> ListAsync(GetDigitalTwinsEventRoutesOptions eventRoutesListOptions = null, CancellationToken cancellationToken = default) + public async Task> ListAsync(GetDigitalTwinsEventRoutesOptions getDigitalTwinsEventRoutesOptions = null, CancellationToken cancellationToken = default) { - using var message = CreateListRequest(eventRoutesListOptions); + using var message = CreateListRequest(getDigitalTwinsEventRoutesOptions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -85,11 +85,11 @@ public async Task> ListAsync(GetDigit /// Status codes: /// * 200 OK /// - /// Parameter group. + /// Parameter group. /// The cancellation token to use. - public Response List(GetDigitalTwinsEventRoutesOptions eventRoutesListOptions = null, CancellationToken cancellationToken = default) + public Response List(GetDigitalTwinsEventRoutesOptions getDigitalTwinsEventRoutesOptions = null, CancellationToken cancellationToken = default) { - using var message = CreateListRequest(eventRoutesListOptions); + using var message = CreateListRequest(getDigitalTwinsEventRoutesOptions); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -105,7 +105,7 @@ public Response List(GetDigitalTwinsEventRoute } } - internal HttpMessage CreateGetByIdRequest(string id, GetDigitalTwinsEventRouteOptions eventRoutesGetByIdOptions) + internal HttpMessage CreateGetByIdRequest(string id, GetDigitalTwinsEventRouteOptions getDigitalTwinsEventRouteOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -128,17 +128,17 @@ internal HttpMessage CreateGetByIdRequest(string id, GetDigitalTwinsEventRouteOp /// * EventRouteNotFound - The event route was not found. /// /// The id for an event route. The id is unique within event routes and case sensitive. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. /// is null. - public async Task> GetByIdAsync(string id, GetDigitalTwinsEventRouteOptions eventRoutesGetByIdOptions = null, CancellationToken cancellationToken = default) + public async Task> GetByIdAsync(string id, GetDigitalTwinsEventRouteOptions getDigitalTwinsEventRouteOptions = null, CancellationToken cancellationToken = default) { if (id == null) { throw new ArgumentNullException(nameof(id)); } - using var message = CreateGetByIdRequest(id, eventRoutesGetByIdOptions); + using var message = CreateGetByIdRequest(id, getDigitalTwinsEventRouteOptions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -162,17 +162,17 @@ public async Task> GetByIdAsync(string id, GetD /// * EventRouteNotFound - The event route was not found. /// /// The id for an event route. The id is unique within event routes and case sensitive. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. /// is null. - public Response GetById(string id, GetDigitalTwinsEventRouteOptions eventRoutesGetByIdOptions = null, CancellationToken cancellationToken = default) + public Response GetById(string id, GetDigitalTwinsEventRouteOptions getDigitalTwinsEventRouteOptions = null, CancellationToken cancellationToken = default) { if (id == null) { throw new ArgumentNullException(nameof(id)); } - using var message = CreateGetByIdRequest(id, eventRoutesGetByIdOptions); + using var message = CreateGetByIdRequest(id, getDigitalTwinsEventRouteOptions); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -188,7 +188,7 @@ public Response GetById(string id, GetDigitalTwinsEventR } } - internal HttpMessage CreateAddRequest(string id, DigitalTwinsEventRoute eventRoute, CreateOrReplaceEventRouteOptions eventRoutesAddOptions) + internal HttpMessage CreateAddRequest(string id, DigitalTwinsEventRoute digitalTwinsEventRoute, CreateOrReplaceEventRouteOptions createOrReplaceEventRouteOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -202,7 +202,7 @@ internal HttpMessage CreateAddRequest(string id, DigitalTwinsEventRoute eventRou request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(eventRoute); + content.JsonWriter.WriteObjectValue(digitalTwinsEventRoute); request.Content = content; return message; } @@ -218,22 +218,22 @@ internal HttpMessage CreateAddRequest(string id, DigitalTwinsEventRoute eventRou /// * LimitExceeded - The maximum number of event routes allowed has been reached. /// /// The id for an event route. The id is unique within event routes and case sensitive. - /// The event route data. - /// Parameter group. + /// The event route data. + /// Parameter group. /// The cancellation token to use. - /// or is null. - public async Task AddAsync(string id, DigitalTwinsEventRoute eventRoute, CreateOrReplaceEventRouteOptions eventRoutesAddOptions = null, CancellationToken cancellationToken = default) + /// or is null. + public async Task AddAsync(string id, DigitalTwinsEventRoute digitalTwinsEventRoute, CreateOrReplaceEventRouteOptions createOrReplaceEventRouteOptions = null, CancellationToken cancellationToken = default) { if (id == null) { throw new ArgumentNullException(nameof(id)); } - if (eventRoute == null) + if (digitalTwinsEventRoute == null) { - throw new ArgumentNullException(nameof(eventRoute)); + throw new ArgumentNullException(nameof(digitalTwinsEventRoute)); } - using var message = CreateAddRequest(id, eventRoute, eventRoutesAddOptions); + using var message = CreateAddRequest(id, digitalTwinsEventRoute, createOrReplaceEventRouteOptions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -255,22 +255,22 @@ public async Task AddAsync(string id, DigitalTwinsEventRoute eventRout /// * LimitExceeded - The maximum number of event routes allowed has been reached. /// /// The id for an event route. The id is unique within event routes and case sensitive. - /// The event route data. - /// Parameter group. + /// The event route data. + /// Parameter group. /// The cancellation token to use. - /// or is null. - public Response Add(string id, DigitalTwinsEventRoute eventRoute, CreateOrReplaceEventRouteOptions eventRoutesAddOptions = null, CancellationToken cancellationToken = default) + /// or is null. + public Response Add(string id, DigitalTwinsEventRoute digitalTwinsEventRoute, CreateOrReplaceEventRouteOptions createOrReplaceEventRouteOptions = null, CancellationToken cancellationToken = default) { if (id == null) { throw new ArgumentNullException(nameof(id)); } - if (eventRoute == null) + if (digitalTwinsEventRoute == null) { - throw new ArgumentNullException(nameof(eventRoute)); + throw new ArgumentNullException(nameof(digitalTwinsEventRoute)); } - using var message = CreateAddRequest(id, eventRoute, eventRoutesAddOptions); + using var message = CreateAddRequest(id, digitalTwinsEventRoute, createOrReplaceEventRouteOptions); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -281,7 +281,7 @@ public Response Add(string id, DigitalTwinsEventRoute eventRoute, CreateOrReplac } } - internal HttpMessage CreateDeleteRequest(string id, DeleteEventRouteOptions eventRoutesDeleteOptions) + internal HttpMessage CreateDeleteRequest(string id, DeleteEventRouteOptions deleteEventRouteOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -304,17 +304,17 @@ internal HttpMessage CreateDeleteRequest(string id, DeleteEventRouteOptions even /// * EventRouteNotFound - The event route was not found. /// /// The id for an event route. The id is unique within event routes and case sensitive. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. /// is null. - public async Task DeleteAsync(string id, DeleteEventRouteOptions eventRoutesDeleteOptions = null, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string id, DeleteEventRouteOptions deleteEventRouteOptions = null, CancellationToken cancellationToken = default) { if (id == null) { throw new ArgumentNullException(nameof(id)); } - using var message = CreateDeleteRequest(id, eventRoutesDeleteOptions); + using var message = CreateDeleteRequest(id, deleteEventRouteOptions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -333,17 +333,17 @@ public async Task DeleteAsync(string id, DeleteEventRouteOptions event /// * EventRouteNotFound - The event route was not found. /// /// The id for an event route. The id is unique within event routes and case sensitive. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. /// is null. - public Response Delete(string id, DeleteEventRouteOptions eventRoutesDeleteOptions = null, CancellationToken cancellationToken = default) + public Response Delete(string id, DeleteEventRouteOptions deleteEventRouteOptions = null, CancellationToken cancellationToken = default) { if (id == null) { throw new ArgumentNullException(nameof(id)); } - using var message = CreateDeleteRequest(id, eventRoutesDeleteOptions); + using var message = CreateDeleteRequest(id, deleteEventRouteOptions); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -354,7 +354,7 @@ public Response Delete(string id, DeleteEventRouteOptions eventRoutesDeleteOptio } } - internal HttpMessage CreateListNextPageRequest(string nextLink, GetDigitalTwinsEventRoutesOptions eventRoutesListOptions) + internal HttpMessage CreateListNextPageRequest(string nextLink, GetDigitalTwinsEventRoutesOptions getDigitalTwinsEventRoutesOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -363,9 +363,9 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, GetDigitalTwinsE uri.Reset(_endpoint); uri.AppendRawNextLink(nextLink, false); request.Uri = uri; - if (eventRoutesListOptions?.MaxItemsPerPage != null) + if (getDigitalTwinsEventRoutesOptions?.MaxItemsPerPage != null) { - request.Headers.Add("max-items-per-page", eventRoutesListOptions.MaxItemsPerPage.Value); + request.Headers.Add("max-items-per-page", getDigitalTwinsEventRoutesOptions.MaxItemsPerPage.Value); } request.Headers.Add("Accept", "application/json"); return message; @@ -377,17 +377,17 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, GetDigitalTwinsE /// * 200 OK /// /// The URL to the next page of results. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. /// is null. - public async Task> ListNextPageAsync(string nextLink, GetDigitalTwinsEventRoutesOptions eventRoutesListOptions = null, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, GetDigitalTwinsEventRoutesOptions getDigitalTwinsEventRoutesOptions = null, CancellationToken cancellationToken = default) { if (nextLink == null) { throw new ArgumentNullException(nameof(nextLink)); } - using var message = CreateListNextPageRequest(nextLink, eventRoutesListOptions); + using var message = CreateListNextPageRequest(nextLink, getDigitalTwinsEventRoutesOptions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -409,17 +409,17 @@ public async Task> ListNextPageAsync( /// * 200 OK /// /// The URL to the next page of results. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. /// is null. - public Response ListNextPage(string nextLink, GetDigitalTwinsEventRoutesOptions eventRoutesListOptions = null, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, GetDigitalTwinsEventRoutesOptions getDigitalTwinsEventRoutesOptions = null, CancellationToken cancellationToken = default) { if (nextLink == null) { throw new ArgumentNullException(nameof(nextLink)); } - using var message = CreateListNextPageRequest(nextLink, eventRoutesListOptions); + using var message = CreateListNextPageRequest(nextLink, getDigitalTwinsEventRoutesOptions); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/QueryRestClient.cs b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/QueryRestClient.cs index 40f6fbf0f00cd..57b5da76a719c 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/QueryRestClient.cs +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/Generated/QueryRestClient.cs @@ -37,7 +37,7 @@ public QueryRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipelin _apiVersion = apiVersion ?? throw new ArgumentNullException(nameof(apiVersion)); } - internal HttpMessage CreateQueryTwinsRequest(QuerySpecification querySpecification, QueryOptions queryTwinsOptions) + internal HttpMessage CreateQueryTwinsRequest(QuerySpecification querySpecification, QueryOptions queryOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -47,9 +47,9 @@ internal HttpMessage CreateQueryTwinsRequest(QuerySpecification querySpecificati uri.AppendPath("/query", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - if (queryTwinsOptions?.MaxItemsPerPage != null) + if (queryOptions?.MaxItemsPerPage != null) { - request.Headers.Add("max-items-per-page", queryTwinsOptions.MaxItemsPerPage.Value); + request.Headers.Add("max-items-per-page", queryOptions.MaxItemsPerPage.Value); } request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); diff --git a/sdk/iot/Azure.IoT.Hub.Service/src/Generated/ConfigurationRestClient.cs b/sdk/iot/Azure.IoT.Hub.Service/src/Generated/ConfigurationRestClient.cs index 1a8f657dbc63d..66ed8a4be9b3f 100644 --- a/sdk/iot/Azure.IoT.Hub.Service/src/Generated/ConfigurationRestClient.cs +++ b/sdk/iot/Azure.IoT.Hub.Service/src/Generated/ConfigurationRestClient.cs @@ -108,7 +108,7 @@ public Response Get(string id, CancellationToken cancellation } } - internal HttpMessage CreateCreateOrUpdateRequest(string id, TwinConfiguration configuration, string ifMatch) + internal HttpMessage CreateCreateOrUpdateRequest(string id, TwinConfiguration twinConfiguration, string ifMatch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -126,29 +126,29 @@ internal HttpMessage CreateCreateOrUpdateRequest(string id, TwinConfiguration co request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(configuration); + content.JsonWriter.WriteObjectValue(twinConfiguration); request.Content = content; return message; } /// Creates or updates a configuration on the IoT Hub for automatic device/module management. Configuration identifier and Content cannot be updated. /// The unique identifier of the configuration. - /// The configuration to be created or updated. + /// The configuration to be created or updated. /// The string representing a weak ETag for the configuration, as per RFC7232. This should not be set when creating a configuration, but may be set when updating a configuration. /// The cancellation token to use. - /// or is null. - public async Task> CreateOrUpdateAsync(string id, TwinConfiguration configuration, string ifMatch = null, CancellationToken cancellationToken = default) + /// or is null. + public async Task> CreateOrUpdateAsync(string id, TwinConfiguration twinConfiguration, string ifMatch = null, CancellationToken cancellationToken = default) { if (id == null) { throw new ArgumentNullException(nameof(id)); } - if (configuration == null) + if (twinConfiguration == null) { - throw new ArgumentNullException(nameof(configuration)); + throw new ArgumentNullException(nameof(twinConfiguration)); } - using var message = CreateCreateOrUpdateRequest(id, configuration, ifMatch); + using var message = CreateCreateOrUpdateRequest(id, twinConfiguration, ifMatch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -167,22 +167,22 @@ public async Task> CreateOrUpdateAsync(string id, Tw /// Creates or updates a configuration on the IoT Hub for automatic device/module management. Configuration identifier and Content cannot be updated. /// The unique identifier of the configuration. - /// The configuration to be created or updated. + /// The configuration to be created or updated. /// The string representing a weak ETag for the configuration, as per RFC7232. This should not be set when creating a configuration, but may be set when updating a configuration. /// The cancellation token to use. - /// or is null. - public Response CreateOrUpdate(string id, TwinConfiguration configuration, string ifMatch = null, CancellationToken cancellationToken = default) + /// or is null. + public Response CreateOrUpdate(string id, TwinConfiguration twinConfiguration, string ifMatch = null, CancellationToken cancellationToken = default) { if (id == null) { throw new ArgumentNullException(nameof(id)); } - if (configuration == null) + if (twinConfiguration == null) { - throw new ArgumentNullException(nameof(configuration)); + throw new ArgumentNullException(nameof(twinConfiguration)); } - using var message = CreateCreateOrUpdateRequest(id, configuration, ifMatch); + using var message = CreateCreateOrUpdateRequest(id, twinConfiguration, ifMatch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/iot/Azure.IoT.Hub.Service/src/Generated/DevicesRestClient.cs b/sdk/iot/Azure.IoT.Hub.Service/src/Generated/DevicesRestClient.cs index dbd6bff3acebf..2f1ea19831731 100644 --- a/sdk/iot/Azure.IoT.Hub.Service/src/Generated/DevicesRestClient.cs +++ b/sdk/iot/Azure.IoT.Hub.Service/src/Generated/DevicesRestClient.cs @@ -178,7 +178,7 @@ public Response GetIdentity(string id, CancellationToken cancell } } - internal HttpMessage CreateCreateOrUpdateIdentityRequest(string id, DeviceIdentity device, string ifMatch) + internal HttpMessage CreateCreateOrUpdateIdentityRequest(string id, DeviceIdentity deviceIdentity, string ifMatch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -196,29 +196,29 @@ internal HttpMessage CreateCreateOrUpdateIdentityRequest(string id, DeviceIdenti request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(device); + content.JsonWriter.WriteObjectValue(deviceIdentity); request.Content = content; return message; } /// Creates or updates the identity of a device in the identity registry of the IoT Hub. /// The unique identifier of the device. - /// The contents of the device identity. + /// The contents of the device identity. /// The string representing a weak ETag for the device identity, as per RFC7232. This should not be set when creating a device, but may be set when updating a device. /// The cancellation token to use. - /// or is null. - public async Task> CreateOrUpdateIdentityAsync(string id, DeviceIdentity device, string ifMatch = null, CancellationToken cancellationToken = default) + /// or is null. + public async Task> CreateOrUpdateIdentityAsync(string id, DeviceIdentity deviceIdentity, string ifMatch = null, CancellationToken cancellationToken = default) { if (id == null) { throw new ArgumentNullException(nameof(id)); } - if (device == null) + if (deviceIdentity == null) { - throw new ArgumentNullException(nameof(device)); + throw new ArgumentNullException(nameof(deviceIdentity)); } - using var message = CreateCreateOrUpdateIdentityRequest(id, device, ifMatch); + using var message = CreateCreateOrUpdateIdentityRequest(id, deviceIdentity, ifMatch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -236,22 +236,22 @@ public async Task> CreateOrUpdateIdentityAsync(string i /// Creates or updates the identity of a device in the identity registry of the IoT Hub. /// The unique identifier of the device. - /// The contents of the device identity. + /// The contents of the device identity. /// The string representing a weak ETag for the device identity, as per RFC7232. This should not be set when creating a device, but may be set when updating a device. /// The cancellation token to use. - /// or is null. - public Response CreateOrUpdateIdentity(string id, DeviceIdentity device, string ifMatch = null, CancellationToken cancellationToken = default) + /// or is null. + public Response CreateOrUpdateIdentity(string id, DeviceIdentity deviceIdentity, string ifMatch = null, CancellationToken cancellationToken = default) { if (id == null) { throw new ArgumentNullException(nameof(id)); } - if (device == null) + if (deviceIdentity == null) { - throw new ArgumentNullException(nameof(device)); + throw new ArgumentNullException(nameof(deviceIdentity)); } - using var message = CreateCreateOrUpdateIdentityRequest(id, device, ifMatch); + using var message = CreateCreateOrUpdateIdentityRequest(id, deviceIdentity, ifMatch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/iot/Azure.IoT.Hub.Service/src/Generated/ModulesRestClient.cs b/sdk/iot/Azure.IoT.Hub.Service/src/Generated/ModulesRestClient.cs index ec9c02b96fd60..427f204eb437a 100644 --- a/sdk/iot/Azure.IoT.Hub.Service/src/Generated/ModulesRestClient.cs +++ b/sdk/iot/Azure.IoT.Hub.Service/src/Generated/ModulesRestClient.cs @@ -483,7 +483,7 @@ public Response GetIdentity(string id, string mid, CancellationT } } - internal HttpMessage CreateCreateOrUpdateIdentityRequest(string id, string mid, ModuleIdentity module, string ifMatch) + internal HttpMessage CreateCreateOrUpdateIdentityRequest(string id, string mid, ModuleIdentity moduleIdentity, string ifMatch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -503,7 +503,7 @@ internal HttpMessage CreateCreateOrUpdateIdentityRequest(string id, string mid, request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(module); + content.JsonWriter.WriteObjectValue(moduleIdentity); request.Content = content; return message; } @@ -511,11 +511,11 @@ internal HttpMessage CreateCreateOrUpdateIdentityRequest(string id, string mid, /// Creates or updates the module identity for a device in the IoT Hub. The moduleId and generationId cannot be updated by the user. /// The unique identifier of the device. /// The unique identifier of the module. - /// The module identity. + /// The module identity. /// The string representing a weak ETag for the module, as per RFC7232. This should not be set when creating a module, but may be set when updating a module. /// The cancellation token to use. - /// , or is null. - public async Task> CreateOrUpdateIdentityAsync(string id, string mid, ModuleIdentity module, string ifMatch = null, CancellationToken cancellationToken = default) + /// , or is null. + public async Task> CreateOrUpdateIdentityAsync(string id, string mid, ModuleIdentity moduleIdentity, string ifMatch = null, CancellationToken cancellationToken = default) { if (id == null) { @@ -525,12 +525,12 @@ public async Task> CreateOrUpdateIdentityAsync(string i { throw new ArgumentNullException(nameof(mid)); } - if (module == null) + if (moduleIdentity == null) { - throw new ArgumentNullException(nameof(module)); + throw new ArgumentNullException(nameof(moduleIdentity)); } - using var message = CreateCreateOrUpdateIdentityRequest(id, mid, module, ifMatch); + using var message = CreateCreateOrUpdateIdentityRequest(id, mid, moduleIdentity, ifMatch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -550,11 +550,11 @@ public async Task> CreateOrUpdateIdentityAsync(string i /// Creates or updates the module identity for a device in the IoT Hub. The moduleId and generationId cannot be updated by the user. /// The unique identifier of the device. /// The unique identifier of the module. - /// The module identity. + /// The module identity. /// The string representing a weak ETag for the module, as per RFC7232. This should not be set when creating a module, but may be set when updating a module. /// The cancellation token to use. - /// , or is null. - public Response CreateOrUpdateIdentity(string id, string mid, ModuleIdentity module, string ifMatch = null, CancellationToken cancellationToken = default) + /// , or is null. + public Response CreateOrUpdateIdentity(string id, string mid, ModuleIdentity moduleIdentity, string ifMatch = null, CancellationToken cancellationToken = default) { if (id == null) { @@ -564,12 +564,12 @@ public Response CreateOrUpdateIdentity(string id, string mid, Mo { throw new ArgumentNullException(nameof(mid)); } - if (module == null) + if (moduleIdentity == null) { - throw new ArgumentNullException(nameof(module)); + throw new ArgumentNullException(nameof(moduleIdentity)); } - using var message = CreateCreateOrUpdateIdentityRequest(id, mid, module, ifMatch); + using var message = CreateCreateOrUpdateIdentityRequest(id, mid, moduleIdentity, ifMatch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/maps/Azure.Maps.Rendering/src/Generated/RenderRestClient.cs b/sdk/maps/Azure.Maps.Rendering/src/Generated/RenderRestClient.cs index bd4d92cfa3a30..1481ac3f5fd25 100644 --- a/sdk/maps/Azure.Maps.Rendering/src/Generated/RenderRestClient.cs +++ b/sdk/maps/Azure.Maps.Rendering/src/Generated/RenderRestClient.cs @@ -43,7 +43,7 @@ public RenderRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeli _apiVersion = apiVersion ?? throw new ArgumentNullException(nameof(apiVersion)); } - internal HttpMessage CreateGetMapTileRequest(MapTileSetId tilesetId, MapTileIndex tileIndex, DateTimeOffset? timeStamp, MapTileSize? tileSize, string language, LocalizedMapView? localizedMapView) + internal HttpMessage CreateGetMapTileRequest(MapTileSetId tilesetId, MapTileIndex mapTileIndex, DateTimeOffset? timeStamp, MapTileSize? tileSize, string language, LocalizedMapView? localizedMapView) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -53,9 +53,9 @@ internal HttpMessage CreateGetMapTileRequest(MapTileSetId tilesetId, MapTileInde uri.AppendPath("/map/tile", false); uri.AppendQuery("api-version", _apiVersion, true); uri.AppendQuery("tilesetId", tilesetId.ToString(), true); - uri.AppendQuery("zoom", tileIndex.Z, true); - uri.AppendQuery("x", tileIndex.X, true); - uri.AppendQuery("y", tileIndex.Y, true); + uri.AppendQuery("zoom", mapTileIndex.Z, true); + uri.AppendQuery("x", mapTileIndex.X, true); + uri.AppendQuery("y", mapTileIndex.Y, true); if (timeStamp != null) { uri.AppendQuery("timeStamp", timeStamp.Value, "O", true); @@ -87,7 +87,7 @@ internal HttpMessage CreateGetMapTileRequest(MapTileSetId tilesetId, MapTileInde /// The Get Map Tiles API allows users to request map tiles in vector or raster formats typically to be integrated into a map control or SDK. Some example tiles that can be requested are Azure Maps road tiles, real-time Weather Radar tiles or the map tiles created using [Azure Maps Creator](https://aka.ms/amcreator). By default, Azure Maps uses vector tiles for its web map control (Web SDK) and Android SDK. /// /// A tileset is a collection of raster or vector data broken up into a uniform grid of square tiles at preset zoom levels. Every tileset has a **tilesetId** to use when making requests. The **tilesetId** for tilesets created using [Azure Maps Creator](https://aka.ms/amcreator) are generated through the [Tileset Create API](https://docs.microsoft.com/rest/api/maps-creator/tileset). The ready-to-use tilesets supplied by Azure Maps are listed below. For example, microsoft.base. - /// Parameter group. + /// Parameter group. /// /// The desired date and time of the requested tile. This parameter must be specified in the standard date-time format (e.g. 2019-11-14T16:03:00-08:00), as defined by [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601). This parameter is only supported when tilesetId parameter is set to one of the values below. /// @@ -106,15 +106,15 @@ internal HttpMessage CreateGetMapTileRequest(MapTileSetId tilesetId, MapTileInde /// Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the available Views. /// /// The cancellation token to use. - /// is null. - public async Task> GetMapTileAsync(MapTileSetId tilesetId, MapTileIndex tileIndex, DateTimeOffset? timeStamp = null, MapTileSize? tileSize = null, string language = null, LocalizedMapView? localizedMapView = null, CancellationToken cancellationToken = default) + /// is null. + public async Task> GetMapTileAsync(MapTileSetId tilesetId, MapTileIndex mapTileIndex, DateTimeOffset? timeStamp = null, MapTileSize? tileSize = null, string language = null, LocalizedMapView? localizedMapView = null, CancellationToken cancellationToken = default) { - if (tileIndex == null) + if (mapTileIndex == null) { - throw new ArgumentNullException(nameof(tileIndex)); + throw new ArgumentNullException(nameof(mapTileIndex)); } - using var message = CreateGetMapTileRequest(tilesetId, tileIndex, timeStamp, tileSize, language, localizedMapView); + using var message = CreateGetMapTileRequest(tilesetId, mapTileIndex, timeStamp, tileSize, language, localizedMapView); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new RenderGetMapTileHeaders(message.Response); switch (message.Response.Status) @@ -135,7 +135,7 @@ public async Task> GetMapTi /// The Get Map Tiles API allows users to request map tiles in vector or raster formats typically to be integrated into a map control or SDK. Some example tiles that can be requested are Azure Maps road tiles, real-time Weather Radar tiles or the map tiles created using [Azure Maps Creator](https://aka.ms/amcreator). By default, Azure Maps uses vector tiles for its web map control (Web SDK) and Android SDK. /// /// A tileset is a collection of raster or vector data broken up into a uniform grid of square tiles at preset zoom levels. Every tileset has a **tilesetId** to use when making requests. The **tilesetId** for tilesets created using [Azure Maps Creator](https://aka.ms/amcreator) are generated through the [Tileset Create API](https://docs.microsoft.com/rest/api/maps-creator/tileset). The ready-to-use tilesets supplied by Azure Maps are listed below. For example, microsoft.base. - /// Parameter group. + /// Parameter group. /// /// The desired date and time of the requested tile. This parameter must be specified in the standard date-time format (e.g. 2019-11-14T16:03:00-08:00), as defined by [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601). This parameter is only supported when tilesetId parameter is set to one of the values below. /// @@ -154,15 +154,15 @@ public async Task> GetMapTi /// Please refer to [Supported Views](https://aka.ms/AzureMapsLocalizationViews) for details and to see the available Views. /// /// The cancellation token to use. - /// is null. - public ResponseWithHeaders GetMapTile(MapTileSetId tilesetId, MapTileIndex tileIndex, DateTimeOffset? timeStamp = null, MapTileSize? tileSize = null, string language = null, LocalizedMapView? localizedMapView = null, CancellationToken cancellationToken = default) + /// is null. + public ResponseWithHeaders GetMapTile(MapTileSetId tilesetId, MapTileIndex mapTileIndex, DateTimeOffset? timeStamp = null, MapTileSize? tileSize = null, string language = null, LocalizedMapView? localizedMapView = null, CancellationToken cancellationToken = default) { - if (tileIndex == null) + if (mapTileIndex == null) { - throw new ArgumentNullException(nameof(tileIndex)); + throw new ArgumentNullException(nameof(mapTileIndex)); } - using var message = CreateGetMapTileRequest(tilesetId, tileIndex, timeStamp, tileSize, language, localizedMapView); + using var message = CreateGetMapTileRequest(tilesetId, mapTileIndex, timeStamp, tileSize, language, localizedMapView); _pipeline.Send(message, cancellationToken); var headers = new RenderGetMapTileHeaders(message.Response); switch (message.Response.Status) @@ -336,7 +336,7 @@ public Response GetMapAttribution(MapTileSetId tilesetId, int zo } } - internal HttpMessage CreateGetMapStateTileRequest(string statesetId, MapTileIndex tileIndex) + internal HttpMessage CreateGetMapStateTileRequest(string statesetId, MapTileIndex mapTileIndex) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -345,9 +345,9 @@ internal HttpMessage CreateGetMapStateTileRequest(string statesetId, MapTileInde uri.Reset(_endpoint); uri.AppendPath("/map/statetile", false); uri.AppendQuery("api-version", _apiVersion, true); - uri.AppendQuery("zoom", tileIndex.Z, true); - uri.AppendQuery("x", tileIndex.X, true); - uri.AppendQuery("y", tileIndex.Y, true); + uri.AppendQuery("zoom", mapTileIndex.Z, true); + uri.AppendQuery("x", mapTileIndex.X, true); + uri.AppendQuery("y", mapTileIndex.Y, true); uri.AppendQuery("statesetId", statesetId, true); request.Uri = uri; if (_clientId != null) @@ -364,21 +364,21 @@ internal HttpMessage CreateGetMapStateTileRequest(string statesetId, MapTileInde /// Fetches state tiles in vector format typically to be integrated into indoor maps module of map control or SDK. The map control will call this API after user turns on dynamic styling (see [Zoom Levels and Tile Grid](https://docs.microsoft.com/azure/location-based-services/zoom-levels-and-tile-grid)) /// /// The stateset id. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. - /// or is null. - public async Task> GetMapStateTileAsync(string statesetId, MapTileIndex tileIndex, CancellationToken cancellationToken = default) + /// or is null. + public async Task> GetMapStateTileAsync(string statesetId, MapTileIndex mapTileIndex, CancellationToken cancellationToken = default) { if (statesetId == null) { throw new ArgumentNullException(nameof(statesetId)); } - if (tileIndex == null) + if (mapTileIndex == null) { - throw new ArgumentNullException(nameof(tileIndex)); + throw new ArgumentNullException(nameof(mapTileIndex)); } - using var message = CreateGetMapStateTileRequest(statesetId, tileIndex); + using var message = CreateGetMapStateTileRequest(statesetId, mapTileIndex); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new RenderGetMapStateTileHeaders(message.Response); switch (message.Response.Status) @@ -399,21 +399,21 @@ public async Task> Get /// Fetches state tiles in vector format typically to be integrated into indoor maps module of map control or SDK. The map control will call this API after user turns on dynamic styling (see [Zoom Levels and Tile Grid](https://docs.microsoft.com/azure/location-based-services/zoom-levels-and-tile-grid)) /// /// The stateset id. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. - /// or is null. - public ResponseWithHeaders GetMapStateTile(string statesetId, MapTileIndex tileIndex, CancellationToken cancellationToken = default) + /// or is null. + public ResponseWithHeaders GetMapStateTile(string statesetId, MapTileIndex mapTileIndex, CancellationToken cancellationToken = default) { if (statesetId == null) { throw new ArgumentNullException(nameof(statesetId)); } - if (tileIndex == null) + if (mapTileIndex == null) { - throw new ArgumentNullException(nameof(tileIndex)); + throw new ArgumentNullException(nameof(mapTileIndex)); } - using var message = CreateGetMapStateTileRequest(statesetId, tileIndex); + using var message = CreateGetMapStateTileRequest(statesetId, mapTileIndex); _pipeline.Send(message, cancellationToken); var headers = new RenderGetMapStateTileHeaders(message.Response); switch (message.Response.Status) @@ -1247,7 +1247,7 @@ public Response GetCopyrightFromBoundingBox(ResponseFormat form } } - internal HttpMessage CreateGetCopyrightForTileRequest(ResponseFormat format, MapTileIndex tileIndex, IncludeText? includeText) + internal HttpMessage CreateGetCopyrightForTileRequest(ResponseFormat format, MapTileIndex mapTileIndex, IncludeText? includeText) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1257,9 +1257,9 @@ internal HttpMessage CreateGetCopyrightForTileRequest(ResponseFormat format, Map uri.AppendPath("/map/copyright/tile/", false); uri.AppendPath(format.ToString(), true); uri.AppendQuery("api-version", _apiVersion, true); - uri.AppendQuery("zoom", tileIndex.Z, true); - uri.AppendQuery("x", tileIndex.X, true); - uri.AppendQuery("y", tileIndex.Y, true); + uri.AppendQuery("zoom", mapTileIndex.Z, true); + uri.AppendQuery("x", mapTileIndex.X, true); + uri.AppendQuery("y", mapTileIndex.Y, true); if (includeText != null) { uri.AppendQuery("text", includeText.Value.ToString(), true); @@ -1280,18 +1280,18 @@ internal HttpMessage CreateGetCopyrightForTileRequest(ResponseFormat format, Map /// Returns the copyright information for a given tile. To obtain the copyright information for a particular tile, the request should specify the tile's zoom level and x and y coordinates (see: Zoom Levels and Tile Grid). /// /// Desired format of the response. Value can be either _json_ or _xml_. The default value is AutoRest.CSharp.Output.Models.Types.EnumTypeValue. - /// Parameter group. + /// Parameter group. /// Yes/no value to exclude textual data from response. Only images and country/region names will be in response. /// The cancellation token to use. - /// is null. - public async Task> GetCopyrightForTileAsync(ResponseFormat format, MapTileIndex tileIndex, IncludeText? includeText = null, CancellationToken cancellationToken = default) + /// is null. + public async Task> GetCopyrightForTileAsync(ResponseFormat format, MapTileIndex mapTileIndex, IncludeText? includeText = null, CancellationToken cancellationToken = default) { - if (tileIndex == null) + if (mapTileIndex == null) { - throw new ArgumentNullException(nameof(tileIndex)); + throw new ArgumentNullException(nameof(mapTileIndex)); } - using var message = CreateGetCopyrightForTileRequest(format, tileIndex, includeText); + using var message = CreateGetCopyrightForTileRequest(format, mapTileIndex, includeText); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -1314,18 +1314,18 @@ public async Task> GetCopyrightForTileAsync(ResponseFo /// Returns the copyright information for a given tile. To obtain the copyright information for a particular tile, the request should specify the tile's zoom level and x and y coordinates (see: Zoom Levels and Tile Grid). /// /// Desired format of the response. Value can be either _json_ or _xml_. The default value is AutoRest.CSharp.Output.Models.Types.EnumTypeValue. - /// Parameter group. + /// Parameter group. /// Yes/no value to exclude textual data from response. Only images and country/region names will be in response. /// The cancellation token to use. - /// is null. - public Response GetCopyrightForTile(ResponseFormat format, MapTileIndex tileIndex, IncludeText? includeText = null, CancellationToken cancellationToken = default) + /// is null. + public Response GetCopyrightForTile(ResponseFormat format, MapTileIndex mapTileIndex, IncludeText? includeText = null, CancellationToken cancellationToken = default) { - if (tileIndex == null) + if (mapTileIndex == null) { - throw new ArgumentNullException(nameof(tileIndex)); + throw new ArgumentNullException(nameof(mapTileIndex)); } - using var message = CreateGetCopyrightForTileRequest(format, tileIndex, includeText); + using var message = CreateGetCopyrightForTileRequest(format, mapTileIndex, includeText); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/maps/Azure.Maps.Search/src/Generated/SearchRestClient.cs b/sdk/maps/Azure.Maps.Search/src/Generated/SearchRestClient.cs index ca02d112901c8..f3cb220f2d6be 100644 --- a/sdk/maps/Azure.Maps.Search/src/Generated/SearchRestClient.cs +++ b/sdk/maps/Azure.Maps.Search/src/Generated/SearchRestClient.cs @@ -2931,7 +2931,7 @@ public Response SearchAlongRoute(ResponseFormat format, str } } - internal HttpMessage CreateFuzzySearchBatchSyncRequest(JsonFormat format, BatchRequestInternal batchRequest) + internal HttpMessage CreateFuzzySearchBatchSyncRequest(JsonFormat format, BatchRequestInternal batchRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -2949,7 +2949,7 @@ internal HttpMessage CreateFuzzySearchBatchSyncRequest(JsonFormat format, BatchR request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Common.Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(batchRequest); + content.JsonWriter.WriteObjectValue(batchRequestInternal); request.Content = content; return message; } @@ -3105,17 +3105,17 @@ internal HttpMessage CreateFuzzySearchBatchSyncRequest(JsonFormat format, BatchR /// ``` /// /// Desired format of the response. Only `json` format is supported. The default value is AutoRest.CSharp.Output.Models.Types.EnumTypeValue. - /// The list of search fuzzy queries/requests to process. The list can contain a max of 10,000 queries and must contain at least 1 query. + /// The list of search fuzzy queries/requests to process. The list can contain a max of 10,000 queries and must contain at least 1 query. /// The cancellation token to use. - /// is null. - public async Task> FuzzySearchBatchSyncAsync(JsonFormat format, BatchRequestInternal batchRequest, CancellationToken cancellationToken = default) + /// is null. + public async Task> FuzzySearchBatchSyncAsync(JsonFormat format, BatchRequestInternal batchRequestInternal, CancellationToken cancellationToken = default) { - if (batchRequest == null) + if (batchRequestInternal == null) { - throw new ArgumentNullException(nameof(batchRequest)); + throw new ArgumentNullException(nameof(batchRequestInternal)); } - using var message = CreateFuzzySearchBatchSyncRequest(format, batchRequest); + using var message = CreateFuzzySearchBatchSyncRequest(format, batchRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -3282,17 +3282,17 @@ public async Task> FuzzySearchBatchSyncAsync( /// ``` /// /// Desired format of the response. Only `json` format is supported. The default value is AutoRest.CSharp.Output.Models.Types.EnumTypeValue. - /// The list of search fuzzy queries/requests to process. The list can contain a max of 10,000 queries and must contain at least 1 query. + /// The list of search fuzzy queries/requests to process. The list can contain a max of 10,000 queries and must contain at least 1 query. /// The cancellation token to use. - /// is null. - public Response FuzzySearchBatchSync(JsonFormat format, BatchRequestInternal batchRequest, CancellationToken cancellationToken = default) + /// is null. + public Response FuzzySearchBatchSync(JsonFormat format, BatchRequestInternal batchRequestInternal, CancellationToken cancellationToken = default) { - if (batchRequest == null) + if (batchRequestInternal == null) { - throw new ArgumentNullException(nameof(batchRequest)); + throw new ArgumentNullException(nameof(batchRequestInternal)); } - using var message = CreateFuzzySearchBatchSyncRequest(format, batchRequest); + using var message = CreateFuzzySearchBatchSyncRequest(format, batchRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -3308,7 +3308,7 @@ public Response FuzzySearchBatchSync(JsonFormat format } } - internal HttpMessage CreateFuzzySearchBatchRequest(JsonFormat format, BatchRequestInternal batchRequest) + internal HttpMessage CreateFuzzySearchBatchRequest(JsonFormat format, BatchRequestInternal batchRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -3326,7 +3326,7 @@ internal HttpMessage CreateFuzzySearchBatchRequest(JsonFormat format, BatchReque request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Common.Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(batchRequest); + content.JsonWriter.WriteObjectValue(batchRequestInternal); request.Content = content; return message; } @@ -3482,17 +3482,17 @@ internal HttpMessage CreateFuzzySearchBatchRequest(JsonFormat format, BatchReque /// ``` /// /// Desired format of the response. Only `json` format is supported. The default value is AutoRest.CSharp.Output.Models.Types.EnumTypeValue. - /// The list of search fuzzy queries/requests to process. The list can contain a max of 10,000 queries and must contain at least 1 query. + /// The list of search fuzzy queries/requests to process. The list can contain a max of 10,000 queries and must contain at least 1 query. /// The cancellation token to use. - /// is null. - public async Task> FuzzySearchBatchAsync(JsonFormat format, BatchRequestInternal batchRequest, CancellationToken cancellationToken = default) + /// is null. + public async Task> FuzzySearchBatchAsync(JsonFormat format, BatchRequestInternal batchRequestInternal, CancellationToken cancellationToken = default) { - if (batchRequest == null) + if (batchRequestInternal == null) { - throw new ArgumentNullException(nameof(batchRequest)); + throw new ArgumentNullException(nameof(batchRequestInternal)); } - using var message = CreateFuzzySearchBatchRequest(format, batchRequest); + using var message = CreateFuzzySearchBatchRequest(format, batchRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new SearchFuzzySearchBatchHeaders(message.Response); switch (message.Response.Status) @@ -3656,17 +3656,17 @@ public async Task> FuzzySearc /// ``` /// /// Desired format of the response. Only `json` format is supported. The default value is AutoRest.CSharp.Output.Models.Types.EnumTypeValue. - /// The list of search fuzzy queries/requests to process. The list can contain a max of 10,000 queries and must contain at least 1 query. + /// The list of search fuzzy queries/requests to process. The list can contain a max of 10,000 queries and must contain at least 1 query. /// The cancellation token to use. - /// is null. - public ResponseWithHeaders FuzzySearchBatch(JsonFormat format, BatchRequestInternal batchRequest, CancellationToken cancellationToken = default) + /// is null. + public ResponseWithHeaders FuzzySearchBatch(JsonFormat format, BatchRequestInternal batchRequestInternal, CancellationToken cancellationToken = default) { - if (batchRequest == null) + if (batchRequestInternal == null) { - throw new ArgumentNullException(nameof(batchRequest)); + throw new ArgumentNullException(nameof(batchRequestInternal)); } - using var message = CreateFuzzySearchBatchRequest(format, batchRequest); + using var message = CreateFuzzySearchBatchRequest(format, batchRequestInternal); _pipeline.Send(message, cancellationToken); var headers = new SearchFuzzySearchBatchHeaders(message.Response); switch (message.Response.Status) @@ -4044,7 +4044,7 @@ public ResponseWithHeaders GetFuzzySearchBatch } } - internal HttpMessage CreateSearchAddressBatchSyncRequest(JsonFormat format, BatchRequestInternal batchRequest) + internal HttpMessage CreateSearchAddressBatchSyncRequest(JsonFormat format, BatchRequestInternal batchRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -4062,7 +4062,7 @@ internal HttpMessage CreateSearchAddressBatchSyncRequest(JsonFormat format, Batc request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Common.Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(batchRequest); + content.JsonWriter.WriteObjectValue(batchRequestInternal); request.Content = content; return message; } @@ -4210,17 +4210,17 @@ internal HttpMessage CreateSearchAddressBatchSyncRequest(JsonFormat format, Batc /// ``` /// /// Desired format of the response. Only `json` format is supported. The default value is AutoRest.CSharp.Output.Models.Types.EnumTypeValue. - /// The list of address geocoding queries/requests to process. The list can contain a max of 10,000 queries and must contain at least 1 query. + /// The list of address geocoding queries/requests to process. The list can contain a max of 10,000 queries and must contain at least 1 query. /// The cancellation token to use. - /// is null. - public async Task> SearchAddressBatchSyncAsync(JsonFormat format, BatchRequestInternal batchRequest, CancellationToken cancellationToken = default) + /// is null. + public async Task> SearchAddressBatchSyncAsync(JsonFormat format, BatchRequestInternal batchRequestInternal, CancellationToken cancellationToken = default) { - if (batchRequest == null) + if (batchRequestInternal == null) { - throw new ArgumentNullException(nameof(batchRequest)); + throw new ArgumentNullException(nameof(batchRequestInternal)); } - using var message = CreateSearchAddressBatchSyncRequest(format, batchRequest); + using var message = CreateSearchAddressBatchSyncRequest(format, batchRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -4379,17 +4379,17 @@ public async Task> SearchAddressBatchSyncAsyn /// ``` /// /// Desired format of the response. Only `json` format is supported. The default value is AutoRest.CSharp.Output.Models.Types.EnumTypeValue. - /// The list of address geocoding queries/requests to process. The list can contain a max of 10,000 queries and must contain at least 1 query. + /// The list of address geocoding queries/requests to process. The list can contain a max of 10,000 queries and must contain at least 1 query. /// The cancellation token to use. - /// is null. - public Response SearchAddressBatchSync(JsonFormat format, BatchRequestInternal batchRequest, CancellationToken cancellationToken = default) + /// is null. + public Response SearchAddressBatchSync(JsonFormat format, BatchRequestInternal batchRequestInternal, CancellationToken cancellationToken = default) { - if (batchRequest == null) + if (batchRequestInternal == null) { - throw new ArgumentNullException(nameof(batchRequest)); + throw new ArgumentNullException(nameof(batchRequestInternal)); } - using var message = CreateSearchAddressBatchSyncRequest(format, batchRequest); + using var message = CreateSearchAddressBatchSyncRequest(format, batchRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -4405,7 +4405,7 @@ public Response SearchAddressBatchSync(JsonFormat form } } - internal HttpMessage CreateSearchAddressBatchRequest(JsonFormat format, BatchRequestInternal batchRequest) + internal HttpMessage CreateSearchAddressBatchRequest(JsonFormat format, BatchRequestInternal batchRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -4423,7 +4423,7 @@ internal HttpMessage CreateSearchAddressBatchRequest(JsonFormat format, BatchReq request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Common.Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(batchRequest); + content.JsonWriter.WriteObjectValue(batchRequestInternal); request.Content = content; return message; } @@ -4571,17 +4571,17 @@ internal HttpMessage CreateSearchAddressBatchRequest(JsonFormat format, BatchReq /// ``` /// /// Desired format of the response. Only `json` format is supported. The default value is AutoRest.CSharp.Output.Models.Types.EnumTypeValue. - /// The list of address geocoding queries/requests to process. The list can contain a max of 10,000 queries and must contain at least 1 query. + /// The list of address geocoding queries/requests to process. The list can contain a max of 10,000 queries and must contain at least 1 query. /// The cancellation token to use. - /// is null. - public async Task> SearchAddressBatchAsync(JsonFormat format, BatchRequestInternal batchRequest, CancellationToken cancellationToken = default) + /// is null. + public async Task> SearchAddressBatchAsync(JsonFormat format, BatchRequestInternal batchRequestInternal, CancellationToken cancellationToken = default) { - if (batchRequest == null) + if (batchRequestInternal == null) { - throw new ArgumentNullException(nameof(batchRequest)); + throw new ArgumentNullException(nameof(batchRequestInternal)); } - using var message = CreateSearchAddressBatchRequest(format, batchRequest); + using var message = CreateSearchAddressBatchRequest(format, batchRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new SearchSearchAddressBatchHeaders(message.Response); switch (message.Response.Status) @@ -4737,17 +4737,17 @@ public async Task> SearchAd /// ``` /// /// Desired format of the response. Only `json` format is supported. The default value is AutoRest.CSharp.Output.Models.Types.EnumTypeValue. - /// The list of address geocoding queries/requests to process. The list can contain a max of 10,000 queries and must contain at least 1 query. + /// The list of address geocoding queries/requests to process. The list can contain a max of 10,000 queries and must contain at least 1 query. /// The cancellation token to use. - /// is null. - public ResponseWithHeaders SearchAddressBatch(JsonFormat format, BatchRequestInternal batchRequest, CancellationToken cancellationToken = default) + /// is null. + public ResponseWithHeaders SearchAddressBatch(JsonFormat format, BatchRequestInternal batchRequestInternal, CancellationToken cancellationToken = default) { - if (batchRequest == null) + if (batchRequestInternal == null) { - throw new ArgumentNullException(nameof(batchRequest)); + throw new ArgumentNullException(nameof(batchRequestInternal)); } - using var message = CreateSearchAddressBatchRequest(format, batchRequest); + using var message = CreateSearchAddressBatchRequest(format, batchRequestInternal); _pipeline.Send(message, cancellationToken); var headers = new SearchSearchAddressBatchHeaders(message.Response); switch (message.Response.Status) @@ -5109,7 +5109,7 @@ public ResponseWithHeaders GetSearchAddressB } } - internal HttpMessage CreateReverseSearchAddressBatchSyncRequest(JsonFormat format, BatchRequestInternal batchRequest) + internal HttpMessage CreateReverseSearchAddressBatchSyncRequest(JsonFormat format, BatchRequestInternal batchRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -5127,7 +5127,7 @@ internal HttpMessage CreateReverseSearchAddressBatchSyncRequest(JsonFormat forma request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Common.Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(batchRequest); + content.JsonWriter.WriteObjectValue(batchRequestInternal); request.Content = content; return message; } @@ -5277,17 +5277,17 @@ internal HttpMessage CreateReverseSearchAddressBatchSyncRequest(JsonFormat forma /// ``` /// /// Desired format of the response. Only `json` format is supported. The default value is AutoRest.CSharp.Output.Models.Types.EnumTypeValue. - /// The list of reverse geocoding queries/requests to process. The list can contain a max of 10,000 queries and must contain at least 1 query. + /// The list of reverse geocoding queries/requests to process. The list can contain a max of 10,000 queries and must contain at least 1 query. /// The cancellation token to use. - /// is null. - public async Task> ReverseSearchAddressBatchSyncAsync(JsonFormat format, BatchRequestInternal batchRequest, CancellationToken cancellationToken = default) + /// is null. + public async Task> ReverseSearchAddressBatchSyncAsync(JsonFormat format, BatchRequestInternal batchRequestInternal, CancellationToken cancellationToken = default) { - if (batchRequest == null) + if (batchRequestInternal == null) { - throw new ArgumentNullException(nameof(batchRequest)); + throw new ArgumentNullException(nameof(batchRequestInternal)); } - using var message = CreateReverseSearchAddressBatchSyncRequest(format, batchRequest); + using var message = CreateReverseSearchAddressBatchSyncRequest(format, batchRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -5448,17 +5448,17 @@ public async Task> ReverseSearchAddres /// ``` /// /// Desired format of the response. Only `json` format is supported. The default value is AutoRest.CSharp.Output.Models.Types.EnumTypeValue. - /// The list of reverse geocoding queries/requests to process. The list can contain a max of 10,000 queries and must contain at least 1 query. + /// The list of reverse geocoding queries/requests to process. The list can contain a max of 10,000 queries and must contain at least 1 query. /// The cancellation token to use. - /// is null. - public Response ReverseSearchAddressBatchSync(JsonFormat format, BatchRequestInternal batchRequest, CancellationToken cancellationToken = default) + /// is null. + public Response ReverseSearchAddressBatchSync(JsonFormat format, BatchRequestInternal batchRequestInternal, CancellationToken cancellationToken = default) { - if (batchRequest == null) + if (batchRequestInternal == null) { - throw new ArgumentNullException(nameof(batchRequest)); + throw new ArgumentNullException(nameof(batchRequestInternal)); } - using var message = CreateReverseSearchAddressBatchSyncRequest(format, batchRequest); + using var message = CreateReverseSearchAddressBatchSyncRequest(format, batchRequestInternal); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -5474,7 +5474,7 @@ public Response ReverseSearchAddressBatchSync(J } } - internal HttpMessage CreateReverseSearchAddressBatchRequest(JsonFormat format, BatchRequestInternal batchRequest) + internal HttpMessage CreateReverseSearchAddressBatchRequest(JsonFormat format, BatchRequestInternal batchRequestInternal) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -5492,7 +5492,7 @@ internal HttpMessage CreateReverseSearchAddressBatchRequest(JsonFormat format, B request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Common.Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(batchRequest); + content.JsonWriter.WriteObjectValue(batchRequestInternal); request.Content = content; return message; } @@ -5642,17 +5642,17 @@ internal HttpMessage CreateReverseSearchAddressBatchRequest(JsonFormat format, B /// ``` /// /// Desired format of the response. Only `json` format is supported. The default value is AutoRest.CSharp.Output.Models.Types.EnumTypeValue. - /// The list of reverse geocoding queries/requests to process. The list can contain a max of 10,000 queries and must contain at least 1 query. + /// The list of reverse geocoding queries/requests to process. The list can contain a max of 10,000 queries and must contain at least 1 query. /// The cancellation token to use. - /// is null. - public async Task> ReverseSearchAddressBatchAsync(JsonFormat format, BatchRequestInternal batchRequest, CancellationToken cancellationToken = default) + /// is null. + public async Task> ReverseSearchAddressBatchAsync(JsonFormat format, BatchRequestInternal batchRequestInternal, CancellationToken cancellationToken = default) { - if (batchRequest == null) + if (batchRequestInternal == null) { - throw new ArgumentNullException(nameof(batchRequest)); + throw new ArgumentNullException(nameof(batchRequestInternal)); } - using var message = CreateReverseSearchAddressBatchRequest(format, batchRequest); + using var message = CreateReverseSearchAddressBatchRequest(format, batchRequestInternal); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new SearchReverseSearchAddressBatchHeaders(message.Response); switch (message.Response.Status) @@ -5810,17 +5810,17 @@ public async Task> R /// ``` /// /// Desired format of the response. Only `json` format is supported. The default value is AutoRest.CSharp.Output.Models.Types.EnumTypeValue. - /// The list of reverse geocoding queries/requests to process. The list can contain a max of 10,000 queries and must contain at least 1 query. + /// The list of reverse geocoding queries/requests to process. The list can contain a max of 10,000 queries and must contain at least 1 query. /// The cancellation token to use. - /// is null. - public ResponseWithHeaders ReverseSearchAddressBatch(JsonFormat format, BatchRequestInternal batchRequest, CancellationToken cancellationToken = default) + /// is null. + public ResponseWithHeaders ReverseSearchAddressBatch(JsonFormat format, BatchRequestInternal batchRequestInternal, CancellationToken cancellationToken = default) { - if (batchRequest == null) + if (batchRequestInternal == null) { - throw new ArgumentNullException(nameof(batchRequest)); + throw new ArgumentNullException(nameof(batchRequestInternal)); } - using var message = CreateReverseSearchAddressBatchRequest(format, batchRequest); + using var message = CreateReverseSearchAddressBatchRequest(format, batchRequestInternal); _pipeline.Send(message, cancellationToken); var headers = new SearchReverseSearchAddressBatchHeaders(message.Response); switch (message.Response.Status) diff --git a/sdk/mixedreality/Azure.MixedReality.Authentication/src/Generated/MixedRealityStsRestClient.cs b/sdk/mixedreality/Azure.MixedReality.Authentication/src/Generated/MixedRealityStsRestClient.cs index 5a2f0e403fb35..6c27029dac1eb 100644 --- a/sdk/mixedreality/Azure.MixedReality.Authentication/src/Generated/MixedRealityStsRestClient.cs +++ b/sdk/mixedreality/Azure.MixedReality.Authentication/src/Generated/MixedRealityStsRestClient.cs @@ -37,7 +37,7 @@ public MixedRealityStsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeli _apiVersion = apiVersion ?? throw new ArgumentNullException(nameof(apiVersion)); } - internal HttpMessage CreateGetTokenRequest(Guid accountId, MixedRealityTokenRequestOptions tokenRequestOptions) + internal HttpMessage CreateGetTokenRequest(Guid accountId, MixedRealityTokenRequestOptions mixedRealityTokenRequestOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -49,9 +49,9 @@ internal HttpMessage CreateGetTokenRequest(Guid accountId, MixedRealityTokenRequ uri.AppendPath("/token", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - if (tokenRequestOptions?.ClientRequestId != null) + if (mixedRealityTokenRequestOptions?.ClientRequestId != null) { - request.Headers.Add("X-MRC-CV", tokenRequestOptions.ClientRequestId); + request.Headers.Add("X-MRC-CV", mixedRealityTokenRequestOptions.ClientRequestId); } request.Headers.Add("Accept", "application/json"); return message; @@ -59,11 +59,11 @@ internal HttpMessage CreateGetTokenRequest(Guid accountId, MixedRealityTokenRequ /// Gets an access token to be used with Mixed Reality services. /// The Mixed Reality account identifier. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. - public async Task> GetTokenAsync(Guid accountId, MixedRealityTokenRequestOptions tokenRequestOptions = null, CancellationToken cancellationToken = default) + public async Task> GetTokenAsync(Guid accountId, MixedRealityTokenRequestOptions mixedRealityTokenRequestOptions = null, CancellationToken cancellationToken = default) { - using var message = CreateGetTokenRequest(accountId, tokenRequestOptions); + using var message = CreateGetTokenRequest(accountId, mixedRealityTokenRequestOptions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new MixedRealityStsGetTokenHeaders(message.Response); switch (message.Response.Status) @@ -82,11 +82,11 @@ public async Task Gets an access token to be used with Mixed Reality services. /// The Mixed Reality account identifier. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. - public ResponseWithHeaders GetToken(Guid accountId, MixedRealityTokenRequestOptions tokenRequestOptions = null, CancellationToken cancellationToken = default) + public ResponseWithHeaders GetToken(Guid accountId, MixedRealityTokenRequestOptions mixedRealityTokenRequestOptions = null, CancellationToken cancellationToken = default) { - using var message = CreateGetTokenRequest(accountId, tokenRequestOptions); + using var message = CreateGetTokenRequest(accountId, mixedRealityTokenRequestOptions); _pipeline.Send(message, cancellationToken); var headers = new MixedRealityStsGetTokenHeaders(message.Response); switch (message.Response.Status) diff --git a/sdk/search/Azure.Search.Documents/src/Generated/DocumentsRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/DocumentsRestClient.cs index f6b4319938109..f86ce480b4b98 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/DocumentsRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/DocumentsRestClient.cs @@ -103,7 +103,7 @@ public Response Count(CancellationToken cancellationToken = default) } } - internal HttpMessage CreateSearchPostRequest(SearchOptions searchRequest) + internal HttpMessage CreateSearchPostRequest(SearchOptions searchOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -119,23 +119,23 @@ internal HttpMessage CreateSearchPostRequest(SearchOptions searchRequest) request.Headers.Add("Accept", "application/json; odata.metadata=none"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(searchRequest); + content.JsonWriter.WriteObjectValue(searchOptions); request.Content = content; return message; } /// Searches for documents in the index. - /// The definition of the Search request. + /// The definition of the Search request. /// The cancellation token to use. - /// is null. - public async Task> SearchPostAsync(SearchOptions searchRequest, CancellationToken cancellationToken = default) + /// is null. + public async Task> SearchPostAsync(SearchOptions searchOptions, CancellationToken cancellationToken = default) { - if (searchRequest == null) + if (searchOptions == null) { - throw new ArgumentNullException(nameof(searchRequest)); + throw new ArgumentNullException(nameof(searchOptions)); } - using var message = CreateSearchPostRequest(searchRequest); + using var message = CreateSearchPostRequest(searchOptions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -152,17 +152,17 @@ public async Task> SearchPostAsync(SearchOptions } /// Searches for documents in the index. - /// The definition of the Search request. + /// The definition of the Search request. /// The cancellation token to use. - /// is null. - public Response SearchPost(SearchOptions searchRequest, CancellationToken cancellationToken = default) + /// is null. + public Response SearchPost(SearchOptions searchOptions, CancellationToken cancellationToken = default) { - if (searchRequest == null) + if (searchOptions == null) { - throw new ArgumentNullException(nameof(searchRequest)); + throw new ArgumentNullException(nameof(searchOptions)); } - using var message = CreateSearchPostRequest(searchRequest); + using var message = CreateSearchPostRequest(searchOptions); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -281,7 +281,7 @@ public Response> Get(string key, IEnumerable } } - internal HttpMessage CreateSuggestPostRequest(SuggestOptions suggestRequest) + internal HttpMessage CreateSuggestPostRequest(SuggestOptions suggestOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -297,23 +297,23 @@ internal HttpMessage CreateSuggestPostRequest(SuggestOptions suggestRequest) request.Headers.Add("Accept", "application/json; odata.metadata=none"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(suggestRequest); + content.JsonWriter.WriteObjectValue(suggestOptions); request.Content = content; return message; } /// Suggests documents in the index that match the given partial query text. - /// The Suggest request. + /// The Suggest request. /// The cancellation token to use. - /// is null. - public async Task> SuggestPostAsync(SuggestOptions suggestRequest, CancellationToken cancellationToken = default) + /// is null. + public async Task> SuggestPostAsync(SuggestOptions suggestOptions, CancellationToken cancellationToken = default) { - if (suggestRequest == null) + if (suggestOptions == null) { - throw new ArgumentNullException(nameof(suggestRequest)); + throw new ArgumentNullException(nameof(suggestOptions)); } - using var message = CreateSuggestPostRequest(suggestRequest); + using var message = CreateSuggestPostRequest(suggestOptions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -330,17 +330,17 @@ public async Task> SuggestPostAsync(SuggestOpti } /// Suggests documents in the index that match the given partial query text. - /// The Suggest request. + /// The Suggest request. /// The cancellation token to use. - /// is null. - public Response SuggestPost(SuggestOptions suggestRequest, CancellationToken cancellationToken = default) + /// is null. + public Response SuggestPost(SuggestOptions suggestOptions, CancellationToken cancellationToken = default) { - if (suggestRequest == null) + if (suggestOptions == null) { - throw new ArgumentNullException(nameof(suggestRequest)); + throw new ArgumentNullException(nameof(suggestOptions)); } - using var message = CreateSuggestPostRequest(suggestRequest); + using var message = CreateSuggestPostRequest(suggestOptions); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -433,7 +433,7 @@ public Response Index(IndexBatch batch, CancellationToken } } - internal HttpMessage CreateAutocompletePostRequest(AutocompleteOptions autocompleteRequest) + internal HttpMessage CreateAutocompletePostRequest(AutocompleteOptions autocompleteOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -449,23 +449,23 @@ internal HttpMessage CreateAutocompletePostRequest(AutocompleteOptions autocompl request.Headers.Add("Accept", "application/json; odata.metadata=none"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(autocompleteRequest); + content.JsonWriter.WriteObjectValue(autocompleteOptions); request.Content = content; return message; } /// Autocompletes incomplete query terms based on input text and matching terms in the index. - /// The definition of the Autocomplete request. + /// The definition of the Autocomplete request. /// The cancellation token to use. - /// is null. - public async Task> AutocompletePostAsync(AutocompleteOptions autocompleteRequest, CancellationToken cancellationToken = default) + /// is null. + public async Task> AutocompletePostAsync(AutocompleteOptions autocompleteOptions, CancellationToken cancellationToken = default) { - if (autocompleteRequest == null) + if (autocompleteOptions == null) { - throw new ArgumentNullException(nameof(autocompleteRequest)); + throw new ArgumentNullException(nameof(autocompleteOptions)); } - using var message = CreateAutocompletePostRequest(autocompleteRequest); + using var message = CreateAutocompletePostRequest(autocompleteOptions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -482,17 +482,17 @@ public async Task> AutocompletePostAsync(Autocompl } /// Autocompletes incomplete query terms based on input text and matching terms in the index. - /// The definition of the Autocomplete request. + /// The definition of the Autocomplete request. /// The cancellation token to use. - /// is null. - public Response AutocompletePost(AutocompleteOptions autocompleteRequest, CancellationToken cancellationToken = default) + /// is null. + public Response AutocompletePost(AutocompleteOptions autocompleteOptions, CancellationToken cancellationToken = default) { - if (autocompleteRequest == null) + if (autocompleteOptions == null) { - throw new ArgumentNullException(nameof(autocompleteRequest)); + throw new ArgumentNullException(nameof(autocompleteOptions)); } - using var message = CreateAutocompletePostRequest(autocompleteRequest); + using var message = CreateAutocompletePostRequest(autocompleteOptions); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/SkillsetsRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/SkillsetsRestClient.cs index bd041fd4340a4..2cbb5a7f66d5c 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/SkillsetsRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/SkillsetsRestClient.cs @@ -429,7 +429,7 @@ public Response Create(SearchIndexerSkillset skillset, Ca } } - internal HttpMessage CreateResetSkillsRequest(string skillsetName, ResetSkillsOptions skillNames) + internal HttpMessage CreateResetSkillsRequest(string skillsetName, ResetSkillsOptions resetSkillsOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -444,28 +444,28 @@ internal HttpMessage CreateResetSkillsRequest(string skillsetName, ResetSkillsOp request.Headers.Add("Accept", "application/json; odata.metadata=minimal"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(skillNames); + content.JsonWriter.WriteObjectValue(resetSkillsOptions); request.Content = content; return message; } /// Reset an existing skillset in a search service. /// The name of the skillset to reset. - /// The names of skills to reset. + /// The names of skills to reset. /// The cancellation token to use. - /// or is null. - public async Task ResetSkillsAsync(string skillsetName, ResetSkillsOptions skillNames, CancellationToken cancellationToken = default) + /// or is null. + public async Task ResetSkillsAsync(string skillsetName, ResetSkillsOptions resetSkillsOptions, CancellationToken cancellationToken = default) { if (skillsetName == null) { throw new ArgumentNullException(nameof(skillsetName)); } - if (skillNames == null) + if (resetSkillsOptions == null) { - throw new ArgumentNullException(nameof(skillNames)); + throw new ArgumentNullException(nameof(resetSkillsOptions)); } - using var message = CreateResetSkillsRequest(skillsetName, skillNames); + using var message = CreateResetSkillsRequest(skillsetName, resetSkillsOptions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -478,21 +478,21 @@ public async Task ResetSkillsAsync(string skillsetName, ResetSkillsOpt /// Reset an existing skillset in a search service. /// The name of the skillset to reset. - /// The names of skills to reset. + /// The names of skills to reset. /// The cancellation token to use. - /// or is null. - public Response ResetSkills(string skillsetName, ResetSkillsOptions skillNames, CancellationToken cancellationToken = default) + /// or is null. + public Response ResetSkills(string skillsetName, ResetSkillsOptions resetSkillsOptions, CancellationToken cancellationToken = default) { if (skillsetName == null) { throw new ArgumentNullException(nameof(skillsetName)); } - if (skillNames == null) + if (resetSkillsOptions == null) { - throw new ArgumentNullException(nameof(skillNames)); + throw new ArgumentNullException(nameof(resetSkillsOptions)); } - using var message = CreateResetSkillsRequest(skillsetName, skillNames); + using var message = CreateResetSkillsRequest(skillsetName, resetSkillsOptions); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/storage/Azure.Storage.Blobs/src/BlobServiceClient.cs b/sdk/storage/Azure.Storage.Blobs/src/BlobServiceClient.cs index c0b0954ac9079..cc867bcdce9d9 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/BlobServiceClient.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/BlobServiceClient.cs @@ -1276,14 +1276,14 @@ private async Task SetPropertiesInternal( if (async) { response = await ServiceRestClient.SetPropertiesAsync( - storageServiceProperties: properties, + blobServiceProperties: properties, cancellationToken: cancellationToken) .ConfigureAwait(false); } else { response = ServiceRestClient.SetProperties( - storageServiceProperties: properties, + blobServiceProperties: properties, cancellationToken: cancellationToken); } diff --git a/sdk/storage/Azure.Storage.Blobs/src/Generated/ServiceRestClient.cs b/sdk/storage/Azure.Storage.Blobs/src/Generated/ServiceRestClient.cs index f7a0d8f2a3425..e274940f81e8d 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/Generated/ServiceRestClient.cs +++ b/sdk/storage/Azure.Storage.Blobs/src/Generated/ServiceRestClient.cs @@ -41,7 +41,7 @@ public ServiceRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipel _version = version ?? throw new ArgumentNullException(nameof(version)); } - internal HttpMessage CreateSetPropertiesRequest(BlobServiceProperties storageServiceProperties, int? timeout) + internal HttpMessage CreateSetPropertiesRequest(BlobServiceProperties blobServiceProperties, int? timeout) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -60,24 +60,24 @@ internal HttpMessage CreateSetPropertiesRequest(BlobServiceProperties storageSer request.Headers.Add("Accept", "application/xml"); request.Headers.Add("Content-Type", "application/xml"); var content = new XmlWriterContent(); - content.XmlWriter.WriteObjectValue(storageServiceProperties, "StorageServiceProperties"); + content.XmlWriter.WriteObjectValue(blobServiceProperties, "StorageServiceProperties"); request.Content = content; return message; } /// Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - /// The StorageService properties. + /// The StorageService properties. /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. /// The cancellation token to use. - /// is null. - public async Task> SetPropertiesAsync(BlobServiceProperties storageServiceProperties, int? timeout = null, CancellationToken cancellationToken = default) + /// is null. + public async Task> SetPropertiesAsync(BlobServiceProperties blobServiceProperties, int? timeout = null, CancellationToken cancellationToken = default) { - if (storageServiceProperties == null) + if (blobServiceProperties == null) { - throw new ArgumentNullException(nameof(storageServiceProperties)); + throw new ArgumentNullException(nameof(blobServiceProperties)); } - using var message = CreateSetPropertiesRequest(storageServiceProperties, timeout); + using var message = CreateSetPropertiesRequest(blobServiceProperties, timeout); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new ServiceSetPropertiesHeaders(message.Response); switch (message.Response.Status) @@ -90,18 +90,18 @@ public async Task> SetPropertie } /// Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - /// The StorageService properties. + /// The StorageService properties. /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. /// The cancellation token to use. - /// is null. - public ResponseWithHeaders SetProperties(BlobServiceProperties storageServiceProperties, int? timeout = null, CancellationToken cancellationToken = default) + /// is null. + public ResponseWithHeaders SetProperties(BlobServiceProperties blobServiceProperties, int? timeout = null, CancellationToken cancellationToken = default) { - if (storageServiceProperties == null) + if (blobServiceProperties == null) { - throw new ArgumentNullException(nameof(storageServiceProperties)); + throw new ArgumentNullException(nameof(blobServiceProperties)); } - using var message = CreateSetPropertiesRequest(storageServiceProperties, timeout); + using var message = CreateSetPropertiesRequest(blobServiceProperties, timeout); _pipeline.Send(message, cancellationToken); var headers = new ServiceSetPropertiesHeaders(message.Response); switch (message.Response.Status) diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/FileRestClient.cs b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/FileRestClient.cs index 311768d7eb11d..88def29500e07 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/FileRestClient.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/FileRestClient.cs @@ -52,7 +52,7 @@ public FileRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline _allowSourceTrailingDot = allowSourceTrailingDot; } - internal HttpMessage CreateCreateRequest(long fileContentLength, string fileAttributes, int? timeout, IDictionary metadata, string filePermission, string filePermissionKey, string fileCreationTime, string fileLastWriteTime, string fileChangeTime, FileHttpHeaders fileHttpHeaders, ShareFileRequestConditions leaseAccessConditions) + internal HttpMessage CreateCreateRequest(long fileContentLength, string fileAttributes, int? timeout, IDictionary metadata, string filePermission, string filePermissionKey, string fileCreationTime, string fileLastWriteTime, string fileChangeTime, FileHttpHeaders fileHttpHeaders, ShareFileRequestConditions shareFileRequestConditions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -120,9 +120,9 @@ internal HttpMessage CreateCreateRequest(long fileContentLength, string fileAttr { request.Headers.Add("x-ms-file-change-time", fileChangeTime); } - if (leaseAccessConditions?.LeaseId != null) + if (shareFileRequestConditions?.LeaseId != null) { - request.Headers.Add("x-ms-lease-id", leaseAccessConditions.LeaseId); + request.Headers.Add("x-ms-lease-id", shareFileRequestConditions.LeaseId); } if (_fileRequestIntent != null) { @@ -143,17 +143,17 @@ internal HttpMessage CreateCreateRequest(long fileContentLength, string fileAttr /// Last write time for the file/directory. Default value: Now. /// Change time for the file/directory. Default value: Now. /// Parameter group. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. /// is null. - public async Task> CreateAsync(long fileContentLength, string fileAttributes, int? timeout = null, IDictionary metadata = null, string filePermission = null, string filePermissionKey = null, string fileCreationTime = null, string fileLastWriteTime = null, string fileChangeTime = null, FileHttpHeaders fileHttpHeaders = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public async Task> CreateAsync(long fileContentLength, string fileAttributes, int? timeout = null, IDictionary metadata = null, string filePermission = null, string filePermissionKey = null, string fileCreationTime = null, string fileLastWriteTime = null, string fileChangeTime = null, FileHttpHeaders fileHttpHeaders = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { if (fileAttributes == null) { throw new ArgumentNullException(nameof(fileAttributes)); } - using var message = CreateCreateRequest(fileContentLength, fileAttributes, timeout, metadata, filePermission, filePermissionKey, fileCreationTime, fileLastWriteTime, fileChangeTime, fileHttpHeaders, leaseAccessConditions); + using var message = CreateCreateRequest(fileContentLength, fileAttributes, timeout, metadata, filePermission, filePermissionKey, fileCreationTime, fileLastWriteTime, fileChangeTime, fileHttpHeaders, shareFileRequestConditions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new FileCreateHeaders(message.Response); switch (message.Response.Status) @@ -176,17 +176,17 @@ public async Task> CreateAsync(long fileC /// Last write time for the file/directory. Default value: Now. /// Change time for the file/directory. Default value: Now. /// Parameter group. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. /// is null. - public ResponseWithHeaders Create(long fileContentLength, string fileAttributes, int? timeout = null, IDictionary metadata = null, string filePermission = null, string filePermissionKey = null, string fileCreationTime = null, string fileLastWriteTime = null, string fileChangeTime = null, FileHttpHeaders fileHttpHeaders = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public ResponseWithHeaders Create(long fileContentLength, string fileAttributes, int? timeout = null, IDictionary metadata = null, string filePermission = null, string filePermissionKey = null, string fileCreationTime = null, string fileLastWriteTime = null, string fileChangeTime = null, FileHttpHeaders fileHttpHeaders = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { if (fileAttributes == null) { throw new ArgumentNullException(nameof(fileAttributes)); } - using var message = CreateCreateRequest(fileContentLength, fileAttributes, timeout, metadata, filePermission, filePermissionKey, fileCreationTime, fileLastWriteTime, fileChangeTime, fileHttpHeaders, leaseAccessConditions); + using var message = CreateCreateRequest(fileContentLength, fileAttributes, timeout, metadata, filePermission, filePermissionKey, fileCreationTime, fileLastWriteTime, fileChangeTime, fileHttpHeaders, shareFileRequestConditions); _pipeline.Send(message, cancellationToken); var headers = new FileCreateHeaders(message.Response); switch (message.Response.Status) @@ -198,7 +198,7 @@ public ResponseWithHeaders Create(long fileContentLength, str } } - internal HttpMessage CreateDownloadRequest(int? timeout, string range, bool? rangeGetContentMD5, ShareFileRequestConditions leaseAccessConditions) + internal HttpMessage CreateDownloadRequest(int? timeout, string range, bool? rangeGetContentMD5, ShareFileRequestConditions shareFileRequestConditions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -224,9 +224,9 @@ internal HttpMessage CreateDownloadRequest(int? timeout, string range, bool? ran { request.Headers.Add("x-ms-range-get-content-md5", rangeGetContentMD5.Value); } - if (leaseAccessConditions?.LeaseId != null) + if (shareFileRequestConditions?.LeaseId != null) { - request.Headers.Add("x-ms-lease-id", leaseAccessConditions.LeaseId); + request.Headers.Add("x-ms-lease-id", shareFileRequestConditions.LeaseId); } if (_fileRequestIntent != null) { @@ -240,11 +240,11 @@ internal HttpMessage CreateDownloadRequest(int? timeout, string range, bool? ran /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. /// Return file data only from the specified byte range. /// When this header is set to true and specified together with the Range header, the service returns the MD5 hash for the range, as long as the range is less than or equal to 4 MB in size. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. - public async Task> DownloadAsync(int? timeout = null, string range = null, bool? rangeGetContentMD5 = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public async Task> DownloadAsync(int? timeout = null, string range = null, bool? rangeGetContentMD5 = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { - using var message = CreateDownloadRequest(timeout, range, rangeGetContentMD5, leaseAccessConditions); + using var message = CreateDownloadRequest(timeout, range, rangeGetContentMD5, shareFileRequestConditions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new FileDownloadHeaders(message.Response); switch (message.Response.Status) @@ -264,11 +264,11 @@ public async Task> DownloadAsyn /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. /// Return file data only from the specified byte range. /// When this header is set to true and specified together with the Range header, the service returns the MD5 hash for the range, as long as the range is less than or equal to 4 MB in size. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. - public ResponseWithHeaders Download(int? timeout = null, string range = null, bool? rangeGetContentMD5 = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public ResponseWithHeaders Download(int? timeout = null, string range = null, bool? rangeGetContentMD5 = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { - using var message = CreateDownloadRequest(timeout, range, rangeGetContentMD5, leaseAccessConditions); + using var message = CreateDownloadRequest(timeout, range, rangeGetContentMD5, shareFileRequestConditions); _pipeline.Send(message, cancellationToken); var headers = new FileDownloadHeaders(message.Response); switch (message.Response.Status) @@ -284,7 +284,7 @@ public ResponseWithHeaders Download(int? timeout = } } - internal HttpMessage CreateGetPropertiesRequest(string sharesnapshot, int? timeout, ShareFileRequestConditions leaseAccessConditions) + internal HttpMessage CreateGetPropertiesRequest(string sharesnapshot, int? timeout, ShareFileRequestConditions shareFileRequestConditions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -305,9 +305,9 @@ internal HttpMessage CreateGetPropertiesRequest(string sharesnapshot, int? timeo request.Headers.Add("x-ms-allow-trailing-dot", _allowTrailingDot.Value); } request.Headers.Add("x-ms-version", _version); - if (leaseAccessConditions?.LeaseId != null) + if (shareFileRequestConditions?.LeaseId != null) { - request.Headers.Add("x-ms-lease-id", leaseAccessConditions.LeaseId); + request.Headers.Add("x-ms-lease-id", shareFileRequestConditions.LeaseId); } if (_fileRequestIntent != null) { @@ -320,11 +320,11 @@ internal HttpMessage CreateGetPropertiesRequest(string sharesnapshot, int? timeo /// Returns all user-defined metadata, standard HTTP properties, and system properties for the file. It does not return the content of the file. /// The snapshot parameter is an opaque DateTime value that, when present, specifies the share snapshot to query. /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. - public async Task> GetPropertiesAsync(string sharesnapshot = null, int? timeout = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public async Task> GetPropertiesAsync(string sharesnapshot = null, int? timeout = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { - using var message = CreateGetPropertiesRequest(sharesnapshot, timeout, leaseAccessConditions); + using var message = CreateGetPropertiesRequest(sharesnapshot, timeout, shareFileRequestConditions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new FileGetPropertiesHeaders(message.Response); switch (message.Response.Status) @@ -339,11 +339,11 @@ public async Task> GetPropertiesAs /// Returns all user-defined metadata, standard HTTP properties, and system properties for the file. It does not return the content of the file. /// The snapshot parameter is an opaque DateTime value that, when present, specifies the share snapshot to query. /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. - public ResponseWithHeaders GetProperties(string sharesnapshot = null, int? timeout = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public ResponseWithHeaders GetProperties(string sharesnapshot = null, int? timeout = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { - using var message = CreateGetPropertiesRequest(sharesnapshot, timeout, leaseAccessConditions); + using var message = CreateGetPropertiesRequest(sharesnapshot, timeout, shareFileRequestConditions); _pipeline.Send(message, cancellationToken); var headers = new FileGetPropertiesHeaders(message.Response); switch (message.Response.Status) @@ -355,7 +355,7 @@ public ResponseWithHeaders GetProperties(string shares } } - internal HttpMessage CreateDeleteRequest(int? timeout, ShareFileRequestConditions leaseAccessConditions) + internal HttpMessage CreateDeleteRequest(int? timeout, ShareFileRequestConditions shareFileRequestConditions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -372,9 +372,9 @@ internal HttpMessage CreateDeleteRequest(int? timeout, ShareFileRequestCondition request.Headers.Add("x-ms-allow-trailing-dot", _allowTrailingDot.Value); } request.Headers.Add("x-ms-version", _version); - if (leaseAccessConditions?.LeaseId != null) + if (shareFileRequestConditions?.LeaseId != null) { - request.Headers.Add("x-ms-lease-id", leaseAccessConditions.LeaseId); + request.Headers.Add("x-ms-lease-id", shareFileRequestConditions.LeaseId); } if (_fileRequestIntent != null) { @@ -386,11 +386,11 @@ internal HttpMessage CreateDeleteRequest(int? timeout, ShareFileRequestCondition /// removes the file from the storage account. /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. - public async Task> DeleteAsync(int? timeout = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public async Task> DeleteAsync(int? timeout = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { - using var message = CreateDeleteRequest(timeout, leaseAccessConditions); + using var message = CreateDeleteRequest(timeout, shareFileRequestConditions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new FileDeleteHeaders(message.Response); switch (message.Response.Status) @@ -404,11 +404,11 @@ public async Task> DeleteAsync(int? timeo /// removes the file from the storage account. /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. - public ResponseWithHeaders Delete(int? timeout = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public ResponseWithHeaders Delete(int? timeout = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { - using var message = CreateDeleteRequest(timeout, leaseAccessConditions); + using var message = CreateDeleteRequest(timeout, shareFileRequestConditions); _pipeline.Send(message, cancellationToken); var headers = new FileDeleteHeaders(message.Response); switch (message.Response.Status) @@ -420,7 +420,7 @@ public ResponseWithHeaders Delete(int? timeout = null, ShareF } } - internal HttpMessage CreateSetHttpHeadersRequest(string fileAttributes, int? timeout, long? fileContentLength, string filePermission, string filePermissionKey, string fileCreationTime, string fileLastWriteTime, string fileChangeTime, FileHttpHeaders fileHttpHeaders, ShareFileRequestConditions leaseAccessConditions) + internal HttpMessage CreateSetHttpHeadersRequest(string fileAttributes, int? timeout, long? fileContentLength, string filePermission, string filePermissionKey, string fileCreationTime, string fileLastWriteTime, string fileChangeTime, FileHttpHeaders fileHttpHeaders, ShareFileRequestConditions shareFileRequestConditions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -483,9 +483,9 @@ internal HttpMessage CreateSetHttpHeadersRequest(string fileAttributes, int? tim { request.Headers.Add("x-ms-file-change-time", fileChangeTime); } - if (leaseAccessConditions?.LeaseId != null) + if (shareFileRequestConditions?.LeaseId != null) { - request.Headers.Add("x-ms-lease-id", leaseAccessConditions.LeaseId); + request.Headers.Add("x-ms-lease-id", shareFileRequestConditions.LeaseId); } if (_allowTrailingDot != null) { @@ -509,17 +509,17 @@ internal HttpMessage CreateSetHttpHeadersRequest(string fileAttributes, int? tim /// Last write time for the file/directory. Default value: Now. /// Change time for the file/directory. Default value: Now. /// Parameter group. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. /// is null. - public async Task> SetHttpHeadersAsync(string fileAttributes, int? timeout = null, long? fileContentLength = null, string filePermission = null, string filePermissionKey = null, string fileCreationTime = null, string fileLastWriteTime = null, string fileChangeTime = null, FileHttpHeaders fileHttpHeaders = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public async Task> SetHttpHeadersAsync(string fileAttributes, int? timeout = null, long? fileContentLength = null, string filePermission = null, string filePermissionKey = null, string fileCreationTime = null, string fileLastWriteTime = null, string fileChangeTime = null, FileHttpHeaders fileHttpHeaders = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { if (fileAttributes == null) { throw new ArgumentNullException(nameof(fileAttributes)); } - using var message = CreateSetHttpHeadersRequest(fileAttributes, timeout, fileContentLength, filePermission, filePermissionKey, fileCreationTime, fileLastWriteTime, fileChangeTime, fileHttpHeaders, leaseAccessConditions); + using var message = CreateSetHttpHeadersRequest(fileAttributes, timeout, fileContentLength, filePermission, filePermissionKey, fileCreationTime, fileLastWriteTime, fileChangeTime, fileHttpHeaders, shareFileRequestConditions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new FileSetHttpHeadersHeaders(message.Response); switch (message.Response.Status) @@ -541,17 +541,17 @@ public async Task> SetHttpHeaders /// Last write time for the file/directory. Default value: Now. /// Change time for the file/directory. Default value: Now. /// Parameter group. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. /// is null. - public ResponseWithHeaders SetHttpHeaders(string fileAttributes, int? timeout = null, long? fileContentLength = null, string filePermission = null, string filePermissionKey = null, string fileCreationTime = null, string fileLastWriteTime = null, string fileChangeTime = null, FileHttpHeaders fileHttpHeaders = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public ResponseWithHeaders SetHttpHeaders(string fileAttributes, int? timeout = null, long? fileContentLength = null, string filePermission = null, string filePermissionKey = null, string fileCreationTime = null, string fileLastWriteTime = null, string fileChangeTime = null, FileHttpHeaders fileHttpHeaders = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { if (fileAttributes == null) { throw new ArgumentNullException(nameof(fileAttributes)); } - using var message = CreateSetHttpHeadersRequest(fileAttributes, timeout, fileContentLength, filePermission, filePermissionKey, fileCreationTime, fileLastWriteTime, fileChangeTime, fileHttpHeaders, leaseAccessConditions); + using var message = CreateSetHttpHeadersRequest(fileAttributes, timeout, fileContentLength, filePermission, filePermissionKey, fileCreationTime, fileLastWriteTime, fileChangeTime, fileHttpHeaders, shareFileRequestConditions); _pipeline.Send(message, cancellationToken); var headers = new FileSetHttpHeadersHeaders(message.Response); switch (message.Response.Status) @@ -563,7 +563,7 @@ public ResponseWithHeaders SetHttpHeaders(string file } } - internal HttpMessage CreateSetMetadataRequest(int? timeout, IDictionary metadata, ShareFileRequestConditions leaseAccessConditions) + internal HttpMessage CreateSetMetadataRequest(int? timeout, IDictionary metadata, ShareFileRequestConditions shareFileRequestConditions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -581,9 +581,9 @@ internal HttpMessage CreateSetMetadataRequest(int? timeout, IDictionary Updates user-defined metadata for the specified file. /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. /// A name-value pair to associate with a file storage object. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. - public async Task> SetMetadataAsync(int? timeout = null, IDictionary metadata = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public async Task> SetMetadataAsync(int? timeout = null, IDictionary metadata = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { - using var message = CreateSetMetadataRequest(timeout, metadata, leaseAccessConditions); + using var message = CreateSetMetadataRequest(timeout, metadata, shareFileRequestConditions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new FileSetMetadataHeaders(message.Response); switch (message.Response.Status) @@ -619,11 +619,11 @@ public async Task> SetMetadataAsync( /// Updates user-defined metadata for the specified file. /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. /// A name-value pair to associate with a file storage object. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. - public ResponseWithHeaders SetMetadata(int? timeout = null, IDictionary metadata = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public ResponseWithHeaders SetMetadata(int? timeout = null, IDictionary metadata = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { - using var message = CreateSetMetadataRequest(timeout, metadata, leaseAccessConditions); + using var message = CreateSetMetadataRequest(timeout, metadata, shareFileRequestConditions); _pipeline.Send(message, cancellationToken); var headers = new FileSetMetadataHeaders(message.Response); switch (message.Response.Status) @@ -866,7 +866,7 @@ public ResponseWithHeaders ChangeLease(string leaseId, i } } - internal HttpMessage CreateBreakLeaseRequest(int? timeout, ShareFileRequestConditions leaseAccessConditions) + internal HttpMessage CreateBreakLeaseRequest(int? timeout, ShareFileRequestConditions shareFileRequestConditions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -880,9 +880,9 @@ internal HttpMessage CreateBreakLeaseRequest(int? timeout, ShareFileRequestCondi } request.Uri = uri; request.Headers.Add("x-ms-lease-action", "break"); - if (leaseAccessConditions?.LeaseId != null) + if (shareFileRequestConditions?.LeaseId != null) { - request.Headers.Add("x-ms-lease-id", leaseAccessConditions.LeaseId); + request.Headers.Add("x-ms-lease-id", shareFileRequestConditions.LeaseId); } request.Headers.Add("x-ms-version", _version); if (_allowTrailingDot != null) @@ -899,11 +899,11 @@ internal HttpMessage CreateBreakLeaseRequest(int? timeout, ShareFileRequestCondi /// [Update] The Lease File operation establishes and manages a lock on a file for write and delete operations. /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. - public async Task> BreakLeaseAsync(int? timeout = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public async Task> BreakLeaseAsync(int? timeout = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { - using var message = CreateBreakLeaseRequest(timeout, leaseAccessConditions); + using var message = CreateBreakLeaseRequest(timeout, shareFileRequestConditions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new FileBreakLeaseHeaders(message.Response); switch (message.Response.Status) @@ -917,11 +917,11 @@ public async Task> BreakLeaseAsync(in /// [Update] The Lease File operation establishes and manages a lock on a file for write and delete operations. /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. - public ResponseWithHeaders BreakLease(int? timeout = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public ResponseWithHeaders BreakLease(int? timeout = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { - using var message = CreateBreakLeaseRequest(timeout, leaseAccessConditions); + using var message = CreateBreakLeaseRequest(timeout, shareFileRequestConditions); _pipeline.Send(message, cancellationToken); var headers = new FileBreakLeaseHeaders(message.Response); switch (message.Response.Status) @@ -933,7 +933,7 @@ public ResponseWithHeaders BreakLease(int? timeout = null } } - internal HttpMessage CreateUploadRangeRequest(string range, ShareFileRangeWriteType fileRangeWrite, long contentLength, int? timeout, byte[] contentMD5, FileLastWrittenMode? fileLastWrittenMode, Stream optionalbody, ShareFileRequestConditions leaseAccessConditions) + internal HttpMessage CreateUploadRangeRequest(string range, ShareFileRangeWriteType fileRangeWrite, long contentLength, int? timeout, byte[] contentMD5, FileLastWrittenMode? fileLastWrittenMode, Stream optionalbody, ShareFileRequestConditions shareFileRequestConditions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -949,9 +949,9 @@ internal HttpMessage CreateUploadRangeRequest(string range, ShareFileRangeWriteT request.Headers.Add("x-ms-range", range); request.Headers.Add("x-ms-write", fileRangeWrite.ToSerialString()); request.Headers.Add("x-ms-version", _version); - if (leaseAccessConditions?.LeaseId != null) + if (shareFileRequestConditions?.LeaseId != null) { - request.Headers.Add("x-ms-lease-id", leaseAccessConditions.LeaseId); + request.Headers.Add("x-ms-lease-id", shareFileRequestConditions.LeaseId); } if (fileLastWrittenMode != null) { @@ -987,17 +987,17 @@ internal HttpMessage CreateUploadRangeRequest(string range, ShareFileRangeWriteT /// An MD5 hash of the content. This hash is used to verify the integrity of the data during transport. When the Content-MD5 header is specified, the File service compares the hash of the content that has arrived with the header value that was sent. If the two hashes do not match, the operation will fail with error code 400 (Bad Request). /// If the file last write time should be preserved or overwritten. /// Initial data. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. /// is null. - public async Task> UploadRangeAsync(string range, ShareFileRangeWriteType fileRangeWrite, long contentLength, int? timeout = null, byte[] contentMD5 = null, FileLastWrittenMode? fileLastWrittenMode = null, Stream optionalbody = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public async Task> UploadRangeAsync(string range, ShareFileRangeWriteType fileRangeWrite, long contentLength, int? timeout = null, byte[] contentMD5 = null, FileLastWrittenMode? fileLastWrittenMode = null, Stream optionalbody = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { if (range == null) { throw new ArgumentNullException(nameof(range)); } - using var message = CreateUploadRangeRequest(range, fileRangeWrite, contentLength, timeout, contentMD5, fileLastWrittenMode, optionalbody, leaseAccessConditions); + using var message = CreateUploadRangeRequest(range, fileRangeWrite, contentLength, timeout, contentMD5, fileLastWrittenMode, optionalbody, shareFileRequestConditions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new FileUploadRangeHeaders(message.Response); switch (message.Response.Status) @@ -1017,17 +1017,17 @@ public async Task> UploadRangeAsync( /// An MD5 hash of the content. This hash is used to verify the integrity of the data during transport. When the Content-MD5 header is specified, the File service compares the hash of the content that has arrived with the header value that was sent. If the two hashes do not match, the operation will fail with error code 400 (Bad Request). /// If the file last write time should be preserved or overwritten. /// Initial data. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. /// is null. - public ResponseWithHeaders UploadRange(string range, ShareFileRangeWriteType fileRangeWrite, long contentLength, int? timeout = null, byte[] contentMD5 = null, FileLastWrittenMode? fileLastWrittenMode = null, Stream optionalbody = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public ResponseWithHeaders UploadRange(string range, ShareFileRangeWriteType fileRangeWrite, long contentLength, int? timeout = null, byte[] contentMD5 = null, FileLastWrittenMode? fileLastWrittenMode = null, Stream optionalbody = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { if (range == null) { throw new ArgumentNullException(nameof(range)); } - using var message = CreateUploadRangeRequest(range, fileRangeWrite, contentLength, timeout, contentMD5, fileLastWrittenMode, optionalbody, leaseAccessConditions); + using var message = CreateUploadRangeRequest(range, fileRangeWrite, contentLength, timeout, contentMD5, fileLastWrittenMode, optionalbody, shareFileRequestConditions); _pipeline.Send(message, cancellationToken); var headers = new FileUploadRangeHeaders(message.Response); switch (message.Response.Status) @@ -1039,7 +1039,7 @@ public ResponseWithHeaders UploadRange(string range, Sha } } - internal HttpMessage CreateUploadRangeFromURLRequest(string range, string copySource, long contentLength, int? timeout, string sourceRange, byte[] sourceContentCrc64, string copySourceAuthorization, FileLastWrittenMode? fileLastWrittenMode, SourceModifiedAccessConditions sourceModifiedAccessConditions, ShareFileRequestConditions leaseAccessConditions) + internal HttpMessage CreateUploadRangeFromURLRequest(string range, string copySource, long contentLength, int? timeout, string sourceRange, byte[] sourceContentCrc64, string copySourceAuthorization, FileLastWrittenMode? fileLastWrittenMode, SourceModifiedAccessConditions sourceModifiedAccessConditions, ShareFileRequestConditions shareFileRequestConditions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1072,9 +1072,9 @@ internal HttpMessage CreateUploadRangeFromURLRequest(string range, string copySo request.Headers.Add("x-ms-source-if-none-match-crc64", sourceModifiedAccessConditions.SourceIfNoneMatchCrc64, "D"); } request.Headers.Add("x-ms-version", _version); - if (leaseAccessConditions?.LeaseId != null) + if (shareFileRequestConditions?.LeaseId != null) { - request.Headers.Add("x-ms-lease-id", leaseAccessConditions.LeaseId); + request.Headers.Add("x-ms-lease-id", shareFileRequestConditions.LeaseId); } if (copySourceAuthorization != null) { @@ -1110,10 +1110,10 @@ internal HttpMessage CreateUploadRangeFromURLRequest(string range, string copySo /// Only Bearer type is supported. Credentials should be a valid OAuth access token to copy source. /// If the file last write time should be preserved or overwritten. /// Parameter group. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. /// or is null. - public async Task> UploadRangeFromURLAsync(string range, string copySource, long contentLength, int? timeout = null, string sourceRange = null, byte[] sourceContentCrc64 = null, string copySourceAuthorization = null, FileLastWrittenMode? fileLastWrittenMode = null, SourceModifiedAccessConditions sourceModifiedAccessConditions = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public async Task> UploadRangeFromURLAsync(string range, string copySource, long contentLength, int? timeout = null, string sourceRange = null, byte[] sourceContentCrc64 = null, string copySourceAuthorization = null, FileLastWrittenMode? fileLastWrittenMode = null, SourceModifiedAccessConditions sourceModifiedAccessConditions = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { if (range == null) { @@ -1124,7 +1124,7 @@ public async Task> UploadRang throw new ArgumentNullException(nameof(copySource)); } - using var message = CreateUploadRangeFromURLRequest(range, copySource, contentLength, timeout, sourceRange, sourceContentCrc64, copySourceAuthorization, fileLastWrittenMode, sourceModifiedAccessConditions, leaseAccessConditions); + using var message = CreateUploadRangeFromURLRequest(range, copySource, contentLength, timeout, sourceRange, sourceContentCrc64, copySourceAuthorization, fileLastWrittenMode, sourceModifiedAccessConditions, shareFileRequestConditions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new FileUploadRangeFromURLHeaders(message.Response); switch (message.Response.Status) @@ -1146,10 +1146,10 @@ public async Task> UploadRang /// Only Bearer type is supported. Credentials should be a valid OAuth access token to copy source. /// If the file last write time should be preserved or overwritten. /// Parameter group. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. /// or is null. - public ResponseWithHeaders UploadRangeFromURL(string range, string copySource, long contentLength, int? timeout = null, string sourceRange = null, byte[] sourceContentCrc64 = null, string copySourceAuthorization = null, FileLastWrittenMode? fileLastWrittenMode = null, SourceModifiedAccessConditions sourceModifiedAccessConditions = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public ResponseWithHeaders UploadRangeFromURL(string range, string copySource, long contentLength, int? timeout = null, string sourceRange = null, byte[] sourceContentCrc64 = null, string copySourceAuthorization = null, FileLastWrittenMode? fileLastWrittenMode = null, SourceModifiedAccessConditions sourceModifiedAccessConditions = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { if (range == null) { @@ -1160,7 +1160,7 @@ public ResponseWithHeaders UploadRangeFromURL(str throw new ArgumentNullException(nameof(copySource)); } - using var message = CreateUploadRangeFromURLRequest(range, copySource, contentLength, timeout, sourceRange, sourceContentCrc64, copySourceAuthorization, fileLastWrittenMode, sourceModifiedAccessConditions, leaseAccessConditions); + using var message = CreateUploadRangeFromURLRequest(range, copySource, contentLength, timeout, sourceRange, sourceContentCrc64, copySourceAuthorization, fileLastWrittenMode, sourceModifiedAccessConditions, shareFileRequestConditions); _pipeline.Send(message, cancellationToken); var headers = new FileUploadRangeFromURLHeaders(message.Response); switch (message.Response.Status) @@ -1172,7 +1172,7 @@ public ResponseWithHeaders UploadRangeFromURL(str } } - internal HttpMessage CreateGetRangeListRequest(string sharesnapshot, string prevsharesnapshot, int? timeout, string range, bool? supportRename, ShareFileRequestConditions leaseAccessConditions) + internal HttpMessage CreateGetRangeListRequest(string sharesnapshot, string prevsharesnapshot, int? timeout, string range, bool? supportRename, ShareFileRequestConditions shareFileRequestConditions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1198,9 +1198,9 @@ internal HttpMessage CreateGetRangeListRequest(string sharesnapshot, string prev { request.Headers.Add("x-ms-range", range); } - if (leaseAccessConditions?.LeaseId != null) + if (shareFileRequestConditions?.LeaseId != null) { - request.Headers.Add("x-ms-lease-id", leaseAccessConditions.LeaseId); + request.Headers.Add("x-ms-lease-id", shareFileRequestConditions.LeaseId); } if (_allowTrailingDot != null) { @@ -1224,11 +1224,11 @@ internal HttpMessage CreateGetRangeListRequest(string sharesnapshot, string prev /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. /// Specifies the range of bytes over which to list ranges, inclusively. /// This header is allowed only when PrevShareSnapshot query parameter is set. Determines whether the changed ranges for a file that has been renamed or moved between the target snapshot (or the live file) and the previous snapshot should be listed. If the value is true, the valid changed ranges for the file will be returned. If the value is false, the operation will result in a failure with 409 (Conflict) response. The default value is false. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. - public async Task> GetRangeListAsync(string sharesnapshot = null, string prevsharesnapshot = null, int? timeout = null, string range = null, bool? supportRename = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public async Task> GetRangeListAsync(string sharesnapshot = null, string prevsharesnapshot = null, int? timeout = null, string range = null, bool? supportRename = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { - using var message = CreateGetRangeListRequest(sharesnapshot, prevsharesnapshot, timeout, range, supportRename, leaseAccessConditions); + using var message = CreateGetRangeListRequest(sharesnapshot, prevsharesnapshot, timeout, range, supportRename, shareFileRequestConditions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new FileGetRangeListHeaders(message.Response); switch (message.Response.Status) @@ -1254,11 +1254,11 @@ public async Task The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. /// Specifies the range of bytes over which to list ranges, inclusively. /// This header is allowed only when PrevShareSnapshot query parameter is set. Determines whether the changed ranges for a file that has been renamed or moved between the target snapshot (or the live file) and the previous snapshot should be listed. If the value is true, the valid changed ranges for the file will be returned. If the value is false, the operation will result in a failure with 409 (Conflict) response. The default value is false. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. - public ResponseWithHeaders GetRangeList(string sharesnapshot = null, string prevsharesnapshot = null, int? timeout = null, string range = null, bool? supportRename = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public ResponseWithHeaders GetRangeList(string sharesnapshot = null, string prevsharesnapshot = null, int? timeout = null, string range = null, bool? supportRename = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { - using var message = CreateGetRangeListRequest(sharesnapshot, prevsharesnapshot, timeout, range, supportRename, leaseAccessConditions); + using var message = CreateGetRangeListRequest(sharesnapshot, prevsharesnapshot, timeout, range, supportRename, shareFileRequestConditions); _pipeline.Send(message, cancellationToken); var headers = new FileGetRangeListHeaders(message.Response); switch (message.Response.Status) @@ -1278,7 +1278,7 @@ public ResponseWithHeaders GetRange } } - internal HttpMessage CreateStartCopyRequest(string copySource, int? timeout, IDictionary metadata, string filePermission, string filePermissionKey, CopyFileSmbInfo copyFileSmbInfo, ShareFileRequestConditions leaseAccessConditions) + internal HttpMessage CreateStartCopyRequest(string copySource, int? timeout, IDictionary metadata, string filePermission, string filePermissionKey, CopyFileSmbInfo copyFileSmbInfo, ShareFileRequestConditions shareFileRequestConditions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1332,9 +1332,9 @@ internal HttpMessage CreateStartCopyRequest(string copySource, int? timeout, IDi { request.Headers.Add("x-ms-file-copy-set-archive", copyFileSmbInfo.SetArchiveAttribute.Value); } - if (leaseAccessConditions?.LeaseId != null) + if (shareFileRequestConditions?.LeaseId != null) { - request.Headers.Add("x-ms-lease-id", leaseAccessConditions.LeaseId); + request.Headers.Add("x-ms-lease-id", shareFileRequestConditions.LeaseId); } if (_allowTrailingDot != null) { @@ -1359,17 +1359,17 @@ internal HttpMessage CreateStartCopyRequest(string copySource, int? timeout, IDi /// If specified the permission (security descriptor) shall be set for the directory/file. This header can be used if Permission size is <= 8KB, else x-ms-file-permission-key header shall be used. Default value: Inherit. If SDDL is specified as input, it must have owner, group and dacl. Note: Only one of the x-ms-file-permission or x-ms-file-permission-key should be specified. /// Key of the permission to be set for the directory/file. Note: Only one of the x-ms-file-permission or x-ms-file-permission-key should be specified. /// Parameter group. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. /// is null. - public async Task> StartCopyAsync(string copySource, int? timeout = null, IDictionary metadata = null, string filePermission = null, string filePermissionKey = null, CopyFileSmbInfo copyFileSmbInfo = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public async Task> StartCopyAsync(string copySource, int? timeout = null, IDictionary metadata = null, string filePermission = null, string filePermissionKey = null, CopyFileSmbInfo copyFileSmbInfo = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { if (copySource == null) { throw new ArgumentNullException(nameof(copySource)); } - using var message = CreateStartCopyRequest(copySource, timeout, metadata, filePermission, filePermissionKey, copyFileSmbInfo, leaseAccessConditions); + using var message = CreateStartCopyRequest(copySource, timeout, metadata, filePermission, filePermissionKey, copyFileSmbInfo, shareFileRequestConditions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new FileStartCopyHeaders(message.Response); switch (message.Response.Status) @@ -1388,17 +1388,17 @@ public async Task> StartCopyAsync(stri /// If specified the permission (security descriptor) shall be set for the directory/file. This header can be used if Permission size is <= 8KB, else x-ms-file-permission-key header shall be used. Default value: Inherit. If SDDL is specified as input, it must have owner, group and dacl. Note: Only one of the x-ms-file-permission or x-ms-file-permission-key should be specified. /// Key of the permission to be set for the directory/file. Note: Only one of the x-ms-file-permission or x-ms-file-permission-key should be specified. /// Parameter group. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. /// is null. - public ResponseWithHeaders StartCopy(string copySource, int? timeout = null, IDictionary metadata = null, string filePermission = null, string filePermissionKey = null, CopyFileSmbInfo copyFileSmbInfo = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public ResponseWithHeaders StartCopy(string copySource, int? timeout = null, IDictionary metadata = null, string filePermission = null, string filePermissionKey = null, CopyFileSmbInfo copyFileSmbInfo = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { if (copySource == null) { throw new ArgumentNullException(nameof(copySource)); } - using var message = CreateStartCopyRequest(copySource, timeout, metadata, filePermission, filePermissionKey, copyFileSmbInfo, leaseAccessConditions); + using var message = CreateStartCopyRequest(copySource, timeout, metadata, filePermission, filePermissionKey, copyFileSmbInfo, shareFileRequestConditions); _pipeline.Send(message, cancellationToken); var headers = new FileStartCopyHeaders(message.Response); switch (message.Response.Status) @@ -1410,7 +1410,7 @@ public ResponseWithHeaders StartCopy(string copySource, in } } - internal HttpMessage CreateAbortCopyRequest(string copyId, int? timeout, ShareFileRequestConditions leaseAccessConditions) + internal HttpMessage CreateAbortCopyRequest(string copyId, int? timeout, ShareFileRequestConditions shareFileRequestConditions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1426,9 +1426,9 @@ internal HttpMessage CreateAbortCopyRequest(string copyId, int? timeout, ShareFi request.Uri = uri; request.Headers.Add("x-ms-copy-action", "abort"); request.Headers.Add("x-ms-version", _version); - if (leaseAccessConditions?.LeaseId != null) + if (shareFileRequestConditions?.LeaseId != null) { - request.Headers.Add("x-ms-lease-id", leaseAccessConditions.LeaseId); + request.Headers.Add("x-ms-lease-id", shareFileRequestConditions.LeaseId); } if (_allowTrailingDot != null) { @@ -1445,17 +1445,17 @@ internal HttpMessage CreateAbortCopyRequest(string copyId, int? timeout, ShareFi /// Aborts a pending Copy File operation, and leaves a destination file with zero length and full metadata. /// The copy identifier provided in the x-ms-copy-id header of the original Copy File operation. /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. /// is null. - public async Task> AbortCopyAsync(string copyId, int? timeout = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public async Task> AbortCopyAsync(string copyId, int? timeout = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { if (copyId == null) { throw new ArgumentNullException(nameof(copyId)); } - using var message = CreateAbortCopyRequest(copyId, timeout, leaseAccessConditions); + using var message = CreateAbortCopyRequest(copyId, timeout, shareFileRequestConditions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new FileAbortCopyHeaders(message.Response); switch (message.Response.Status) @@ -1470,17 +1470,17 @@ public async Task> AbortCopyAsync(stri /// Aborts a pending Copy File operation, and leaves a destination file with zero length and full metadata. /// The copy identifier provided in the x-ms-copy-id header of the original Copy File operation. /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. /// is null. - public ResponseWithHeaders AbortCopy(string copyId, int? timeout = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public ResponseWithHeaders AbortCopy(string copyId, int? timeout = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { if (copyId == null) { throw new ArgumentNullException(nameof(copyId)); } - using var message = CreateAbortCopyRequest(copyId, timeout, leaseAccessConditions); + using var message = CreateAbortCopyRequest(copyId, timeout, shareFileRequestConditions); _pipeline.Send(message, cancellationToken); var headers = new FileAbortCopyHeaders(message.Response); switch (message.Response.Status) diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/ServiceRestClient.cs b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/ServiceRestClient.cs index 7f585a313d408..afe51d0302174 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/ServiceRestClient.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/ServiceRestClient.cs @@ -40,7 +40,7 @@ public ServiceRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipel _version = version ?? throw new ArgumentNullException(nameof(version)); } - internal HttpMessage CreateSetPropertiesRequest(ShareServiceProperties storageServiceProperties, int? timeout) + internal HttpMessage CreateSetPropertiesRequest(ShareServiceProperties shareServiceProperties, int? timeout) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -59,24 +59,24 @@ internal HttpMessage CreateSetPropertiesRequest(ShareServiceProperties storageSe request.Headers.Add("Accept", "application/xml"); request.Headers.Add("Content-Type", "application/xml"); var content = new XmlWriterContent(); - content.XmlWriter.WriteObjectValue(storageServiceProperties, "StorageServiceProperties"); + content.XmlWriter.WriteObjectValue(shareServiceProperties, "StorageServiceProperties"); request.Content = content; return message; } /// Sets properties for a storage account's File service endpoint, including properties for Storage Analytics metrics and CORS (Cross-Origin Resource Sharing) rules. - /// The StorageService properties. + /// The StorageService properties. /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. /// The cancellation token to use. - /// is null. - public async Task> SetPropertiesAsync(ShareServiceProperties storageServiceProperties, int? timeout = null, CancellationToken cancellationToken = default) + /// is null. + public async Task> SetPropertiesAsync(ShareServiceProperties shareServiceProperties, int? timeout = null, CancellationToken cancellationToken = default) { - if (storageServiceProperties == null) + if (shareServiceProperties == null) { - throw new ArgumentNullException(nameof(storageServiceProperties)); + throw new ArgumentNullException(nameof(shareServiceProperties)); } - using var message = CreateSetPropertiesRequest(storageServiceProperties, timeout); + using var message = CreateSetPropertiesRequest(shareServiceProperties, timeout); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new ServiceSetPropertiesHeaders(message.Response); switch (message.Response.Status) @@ -89,18 +89,18 @@ public async Task> SetPropertie } /// Sets properties for a storage account's File service endpoint, including properties for Storage Analytics metrics and CORS (Cross-Origin Resource Sharing) rules. - /// The StorageService properties. + /// The StorageService properties. /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. /// The cancellation token to use. - /// is null. - public ResponseWithHeaders SetProperties(ShareServiceProperties storageServiceProperties, int? timeout = null, CancellationToken cancellationToken = default) + /// is null. + public ResponseWithHeaders SetProperties(ShareServiceProperties shareServiceProperties, int? timeout = null, CancellationToken cancellationToken = default) { - if (storageServiceProperties == null) + if (shareServiceProperties == null) { - throw new ArgumentNullException(nameof(storageServiceProperties)); + throw new ArgumentNullException(nameof(shareServiceProperties)); } - using var message = CreateSetPropertiesRequest(storageServiceProperties, timeout); + using var message = CreateSetPropertiesRequest(shareServiceProperties, timeout); _pipeline.Send(message, cancellationToken); var headers = new ServiceSetPropertiesHeaders(message.Response); switch (message.Response.Status) diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/ShareRestClient.cs b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/ShareRestClient.cs index 1845a43a18239..ee9a57104058f 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/Generated/ShareRestClient.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/Generated/ShareRestClient.cs @@ -132,7 +132,7 @@ public ResponseWithHeaders Create(int? timeout = null, IDict } } - internal HttpMessage CreateGetPropertiesRequest(string sharesnapshot, int? timeout, ShareFileRequestConditions leaseAccessConditions) + internal HttpMessage CreateGetPropertiesRequest(string sharesnapshot, int? timeout, ShareFileRequestConditions shareFileRequestConditions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -150,9 +150,9 @@ internal HttpMessage CreateGetPropertiesRequest(string sharesnapshot, int? timeo } request.Uri = uri; request.Headers.Add("x-ms-version", _version); - if (leaseAccessConditions?.LeaseId != null) + if (shareFileRequestConditions?.LeaseId != null) { - request.Headers.Add("x-ms-lease-id", leaseAccessConditions.LeaseId); + request.Headers.Add("x-ms-lease-id", shareFileRequestConditions.LeaseId); } request.Headers.Add("Accept", "application/xml"); return message; @@ -161,11 +161,11 @@ internal HttpMessage CreateGetPropertiesRequest(string sharesnapshot, int? timeo /// Returns all user-defined metadata and system properties for the specified share or share snapshot. The data returned does not include the share's list of files. /// The snapshot parameter is an opaque DateTime value that, when present, specifies the share snapshot to query. /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. - public async Task> GetPropertiesAsync(string sharesnapshot = null, int? timeout = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public async Task> GetPropertiesAsync(string sharesnapshot = null, int? timeout = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { - using var message = CreateGetPropertiesRequest(sharesnapshot, timeout, leaseAccessConditions); + using var message = CreateGetPropertiesRequest(sharesnapshot, timeout, shareFileRequestConditions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new ShareGetPropertiesHeaders(message.Response); switch (message.Response.Status) @@ -180,11 +180,11 @@ public async Task> GetPropertiesA /// Returns all user-defined metadata and system properties for the specified share or share snapshot. The data returned does not include the share's list of files. /// The snapshot parameter is an opaque DateTime value that, when present, specifies the share snapshot to query. /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. - public ResponseWithHeaders GetProperties(string sharesnapshot = null, int? timeout = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public ResponseWithHeaders GetProperties(string sharesnapshot = null, int? timeout = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { - using var message = CreateGetPropertiesRequest(sharesnapshot, timeout, leaseAccessConditions); + using var message = CreateGetPropertiesRequest(sharesnapshot, timeout, shareFileRequestConditions); _pipeline.Send(message, cancellationToken); var headers = new ShareGetPropertiesHeaders(message.Response); switch (message.Response.Status) @@ -196,7 +196,7 @@ public ResponseWithHeaders GetProperties(string share } } - internal HttpMessage CreateDeleteRequest(string sharesnapshot, int? timeout, DeleteSnapshotsOptionType? deleteSnapshots, ShareFileRequestConditions leaseAccessConditions) + internal HttpMessage CreateDeleteRequest(string sharesnapshot, int? timeout, DeleteSnapshotsOptionType? deleteSnapshots, ShareFileRequestConditions shareFileRequestConditions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -218,9 +218,9 @@ internal HttpMessage CreateDeleteRequest(string sharesnapshot, int? timeout, Del { request.Headers.Add("x-ms-delete-snapshots", deleteSnapshots.Value.ToSerialString()); } - if (leaseAccessConditions?.LeaseId != null) + if (shareFileRequestConditions?.LeaseId != null) { - request.Headers.Add("x-ms-lease-id", leaseAccessConditions.LeaseId); + request.Headers.Add("x-ms-lease-id", shareFileRequestConditions.LeaseId); } request.Headers.Add("Accept", "application/xml"); return message; @@ -230,11 +230,11 @@ internal HttpMessage CreateDeleteRequest(string sharesnapshot, int? timeout, Del /// The snapshot parameter is an opaque DateTime value that, when present, specifies the share snapshot to query. /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. /// Specifies the option include to delete the base share and all of its snapshots. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. - public async Task> DeleteAsync(string sharesnapshot = null, int? timeout = null, DeleteSnapshotsOptionType? deleteSnapshots = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public async Task> DeleteAsync(string sharesnapshot = null, int? timeout = null, DeleteSnapshotsOptionType? deleteSnapshots = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { - using var message = CreateDeleteRequest(sharesnapshot, timeout, deleteSnapshots, leaseAccessConditions); + using var message = CreateDeleteRequest(sharesnapshot, timeout, deleteSnapshots, shareFileRequestConditions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new ShareDeleteHeaders(message.Response); switch (message.Response.Status) @@ -250,11 +250,11 @@ public async Task> DeleteAsync(string sh /// The snapshot parameter is an opaque DateTime value that, when present, specifies the share snapshot to query. /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. /// Specifies the option include to delete the base share and all of its snapshots. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. - public ResponseWithHeaders Delete(string sharesnapshot = null, int? timeout = null, DeleteSnapshotsOptionType? deleteSnapshots = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public ResponseWithHeaders Delete(string sharesnapshot = null, int? timeout = null, DeleteSnapshotsOptionType? deleteSnapshots = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { - using var message = CreateDeleteRequest(sharesnapshot, timeout, deleteSnapshots, leaseAccessConditions); + using var message = CreateDeleteRequest(sharesnapshot, timeout, deleteSnapshots, shareFileRequestConditions); _pipeline.Send(message, cancellationToken); var headers = new ShareDeleteHeaders(message.Response); switch (message.Response.Status) @@ -569,7 +569,7 @@ public ResponseWithHeaders RenewLease(string leaseId, in } } - internal HttpMessage CreateBreakLeaseRequest(int? timeout, int? breakPeriod, string sharesnapshot, ShareFileRequestConditions leaseAccessConditions) + internal HttpMessage CreateBreakLeaseRequest(int? timeout, int? breakPeriod, string sharesnapshot, ShareFileRequestConditions shareFileRequestConditions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -592,9 +592,9 @@ internal HttpMessage CreateBreakLeaseRequest(int? timeout, int? breakPeriod, str { request.Headers.Add("x-ms-lease-break-period", breakPeriod.Value); } - if (leaseAccessConditions?.LeaseId != null) + if (shareFileRequestConditions?.LeaseId != null) { - request.Headers.Add("x-ms-lease-id", leaseAccessConditions.LeaseId); + request.Headers.Add("x-ms-lease-id", shareFileRequestConditions.LeaseId); } request.Headers.Add("x-ms-version", _version); request.Headers.Add("Accept", "application/xml"); @@ -605,11 +605,11 @@ internal HttpMessage CreateBreakLeaseRequest(int? timeout, int? breakPeriod, str /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. /// For a break operation, proposed duration the lease should continue before it is broken, in seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. If longer, the time remaining on the lease is used. A new lease will not be available before the break period has expired, but the lease may be held for longer than the break period. If this header does not appear with a break operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks immediately. /// The snapshot parameter is an opaque DateTime value that, when present, specifies the share snapshot to query. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. - public async Task> BreakLeaseAsync(int? timeout = null, int? breakPeriod = null, string sharesnapshot = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public async Task> BreakLeaseAsync(int? timeout = null, int? breakPeriod = null, string sharesnapshot = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { - using var message = CreateBreakLeaseRequest(timeout, breakPeriod, sharesnapshot, leaseAccessConditions); + using var message = CreateBreakLeaseRequest(timeout, breakPeriod, sharesnapshot, shareFileRequestConditions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new ShareBreakLeaseHeaders(message.Response); switch (message.Response.Status) @@ -625,11 +625,11 @@ public async Task> BreakLeaseAsync(i /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. /// For a break operation, proposed duration the lease should continue before it is broken, in seconds, between 0 and 60. This break period is only used if it is shorter than the time remaining on the lease. If longer, the time remaining on the lease is used. A new lease will not be available before the break period has expired, but the lease may be held for longer than the break period. If this header does not appear with a break operation, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks immediately. /// The snapshot parameter is an opaque DateTime value that, when present, specifies the share snapshot to query. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. - public ResponseWithHeaders BreakLease(int? timeout = null, int? breakPeriod = null, string sharesnapshot = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public ResponseWithHeaders BreakLease(int? timeout = null, int? breakPeriod = null, string sharesnapshot = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { - using var message = CreateBreakLeaseRequest(timeout, breakPeriod, sharesnapshot, leaseAccessConditions); + using var message = CreateBreakLeaseRequest(timeout, breakPeriod, sharesnapshot, shareFileRequestConditions); _pipeline.Send(message, cancellationToken); var headers = new ShareBreakLeaseHeaders(message.Response); switch (message.Response.Status) @@ -857,7 +857,7 @@ public ResponseWithHeaders GetPermis } } - internal HttpMessage CreateSetPropertiesRequest(int? timeout, int? quota, ShareAccessTier? accessTier, ShareRootSquash? rootSquash, bool? enableSnapshotVirtualDirectoryAccess, ShareFileRequestConditions leaseAccessConditions) + internal HttpMessage CreateSetPropertiesRequest(int? timeout, int? quota, ShareAccessTier? accessTier, ShareRootSquash? rootSquash, bool? enableSnapshotVirtualDirectoryAccess, ShareFileRequestConditions shareFileRequestConditions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -880,9 +880,9 @@ internal HttpMessage CreateSetPropertiesRequest(int? timeout, int? quota, ShareA { request.Headers.Add("x-ms-access-tier", accessTier.Value.ToString()); } - if (leaseAccessConditions?.LeaseId != null) + if (shareFileRequestConditions?.LeaseId != null) { - request.Headers.Add("x-ms-lease-id", leaseAccessConditions.LeaseId); + request.Headers.Add("x-ms-lease-id", shareFileRequestConditions.LeaseId); } if (rootSquash != null) { @@ -902,11 +902,11 @@ internal HttpMessage CreateSetPropertiesRequest(int? timeout, int? quota, ShareA /// Specifies the access tier of the share. /// Root squash to set on the share. Only valid for NFS shares. /// The ? to use. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. - public async Task> SetPropertiesAsync(int? timeout = null, int? quota = null, ShareAccessTier? accessTier = null, ShareRootSquash? rootSquash = null, bool? enableSnapshotVirtualDirectoryAccess = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public async Task> SetPropertiesAsync(int? timeout = null, int? quota = null, ShareAccessTier? accessTier = null, ShareRootSquash? rootSquash = null, bool? enableSnapshotVirtualDirectoryAccess = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { - using var message = CreateSetPropertiesRequest(timeout, quota, accessTier, rootSquash, enableSnapshotVirtualDirectoryAccess, leaseAccessConditions); + using var message = CreateSetPropertiesRequest(timeout, quota, accessTier, rootSquash, enableSnapshotVirtualDirectoryAccess, shareFileRequestConditions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new ShareSetPropertiesHeaders(message.Response); switch (message.Response.Status) @@ -924,11 +924,11 @@ public async Task> SetPropertiesA /// Specifies the access tier of the share. /// Root squash to set on the share. Only valid for NFS shares. /// The ? to use. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. - public ResponseWithHeaders SetProperties(int? timeout = null, int? quota = null, ShareAccessTier? accessTier = null, ShareRootSquash? rootSquash = null, bool? enableSnapshotVirtualDirectoryAccess = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public ResponseWithHeaders SetProperties(int? timeout = null, int? quota = null, ShareAccessTier? accessTier = null, ShareRootSquash? rootSquash = null, bool? enableSnapshotVirtualDirectoryAccess = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { - using var message = CreateSetPropertiesRequest(timeout, quota, accessTier, rootSquash, enableSnapshotVirtualDirectoryAccess, leaseAccessConditions); + using var message = CreateSetPropertiesRequest(timeout, quota, accessTier, rootSquash, enableSnapshotVirtualDirectoryAccess, shareFileRequestConditions); _pipeline.Send(message, cancellationToken); var headers = new ShareSetPropertiesHeaders(message.Response); switch (message.Response.Status) @@ -940,7 +940,7 @@ public ResponseWithHeaders SetProperties(int? timeout } } - internal HttpMessage CreateSetMetadataRequest(int? timeout, IDictionary metadata, ShareFileRequestConditions leaseAccessConditions) + internal HttpMessage CreateSetMetadataRequest(int? timeout, IDictionary metadata, ShareFileRequestConditions shareFileRequestConditions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -959,9 +959,9 @@ internal HttpMessage CreateSetMetadataRequest(int? timeout, IDictionary Sets one or more user-defined name-value pairs for the specified share. /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. /// A name-value pair to associate with a file storage object. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. - public async Task> SetMetadataAsync(int? timeout = null, IDictionary metadata = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public async Task> SetMetadataAsync(int? timeout = null, IDictionary metadata = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { - using var message = CreateSetMetadataRequest(timeout, metadata, leaseAccessConditions); + using var message = CreateSetMetadataRequest(timeout, metadata, shareFileRequestConditions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new ShareSetMetadataHeaders(message.Response); switch (message.Response.Status) @@ -989,11 +989,11 @@ public async Task> SetMetadataAsync /// Sets one or more user-defined name-value pairs for the specified share. /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. /// A name-value pair to associate with a file storage object. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. - public ResponseWithHeaders SetMetadata(int? timeout = null, IDictionary metadata = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public ResponseWithHeaders SetMetadata(int? timeout = null, IDictionary metadata = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { - using var message = CreateSetMetadataRequest(timeout, metadata, leaseAccessConditions); + using var message = CreateSetMetadataRequest(timeout, metadata, shareFileRequestConditions); _pipeline.Send(message, cancellationToken); var headers = new ShareSetMetadataHeaders(message.Response); switch (message.Response.Status) @@ -1005,7 +1005,7 @@ public ResponseWithHeaders SetMetadata(int? timeout = n } } - internal HttpMessage CreateGetAccessPolicyRequest(int? timeout, ShareFileRequestConditions leaseAccessConditions) + internal HttpMessage CreateGetAccessPolicyRequest(int? timeout, ShareFileRequestConditions shareFileRequestConditions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1020,9 +1020,9 @@ internal HttpMessage CreateGetAccessPolicyRequest(int? timeout, ShareFileRequest } request.Uri = uri; request.Headers.Add("x-ms-version", _version); - if (leaseAccessConditions?.LeaseId != null) + if (shareFileRequestConditions?.LeaseId != null) { - request.Headers.Add("x-ms-lease-id", leaseAccessConditions.LeaseId); + request.Headers.Add("x-ms-lease-id", shareFileRequestConditions.LeaseId); } request.Headers.Add("Accept", "application/xml"); return message; @@ -1030,11 +1030,11 @@ internal HttpMessage CreateGetAccessPolicyRequest(int? timeout, ShareFileRequest /// Returns information about stored access policies specified on the share. /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. - public async Task, ShareGetAccessPolicyHeaders>> GetAccessPolicyAsync(int? timeout = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public async Task, ShareGetAccessPolicyHeaders>> GetAccessPolicyAsync(int? timeout = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { - using var message = CreateGetAccessPolicyRequest(timeout, leaseAccessConditions); + using var message = CreateGetAccessPolicyRequest(timeout, shareFileRequestConditions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new ShareGetAccessPolicyHeaders(message.Response); switch (message.Response.Status) @@ -1061,11 +1061,11 @@ public async Task, Shar /// Returns information about stored access policies specified on the share. /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. - public ResponseWithHeaders, ShareGetAccessPolicyHeaders> GetAccessPolicy(int? timeout = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public ResponseWithHeaders, ShareGetAccessPolicyHeaders> GetAccessPolicy(int? timeout = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { - using var message = CreateGetAccessPolicyRequest(timeout, leaseAccessConditions); + using var message = CreateGetAccessPolicyRequest(timeout, shareFileRequestConditions); _pipeline.Send(message, cancellationToken); var headers = new ShareGetAccessPolicyHeaders(message.Response); switch (message.Response.Status) @@ -1090,7 +1090,7 @@ public ResponseWithHeaders, ShareGetAccessP } } - internal HttpMessage CreateSetAccessPolicyRequest(int? timeout, IEnumerable shareAcl, ShareFileRequestConditions leaseAccessConditions) + internal HttpMessage CreateSetAccessPolicyRequest(int? timeout, IEnumerable shareAcl, ShareFileRequestConditions shareFileRequestConditions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1105,9 +1105,9 @@ internal HttpMessage CreateSetAccessPolicyRequest(int? timeout, IEnumerable Sets a stored access policy for use with shared access signatures. /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. /// The ACL for the share. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. - public async Task> SetAccessPolicyAsync(int? timeout = null, IEnumerable shareAcl = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public async Task> SetAccessPolicyAsync(int? timeout = null, IEnumerable shareAcl = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { - using var message = CreateSetAccessPolicyRequest(timeout, shareAcl, leaseAccessConditions); + using var message = CreateSetAccessPolicyRequest(timeout, shareAcl, shareFileRequestConditions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new ShareSetAccessPolicyHeaders(message.Response); switch (message.Response.Status) @@ -1147,11 +1147,11 @@ public async Task> SetAccessPol /// Sets a stored access policy for use with shared access signatures. /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. /// The ACL for the share. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. - public ResponseWithHeaders SetAccessPolicy(int? timeout = null, IEnumerable shareAcl = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public ResponseWithHeaders SetAccessPolicy(int? timeout = null, IEnumerable shareAcl = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { - using var message = CreateSetAccessPolicyRequest(timeout, shareAcl, leaseAccessConditions); + using var message = CreateSetAccessPolicyRequest(timeout, shareAcl, shareFileRequestConditions); _pipeline.Send(message, cancellationToken); var headers = new ShareSetAccessPolicyHeaders(message.Response); switch (message.Response.Status) @@ -1163,7 +1163,7 @@ public ResponseWithHeaders SetAccessPolicy(int? tim } } - internal HttpMessage CreateGetStatisticsRequest(int? timeout, ShareFileRequestConditions leaseAccessConditions) + internal HttpMessage CreateGetStatisticsRequest(int? timeout, ShareFileRequestConditions shareFileRequestConditions) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1178,9 +1178,9 @@ internal HttpMessage CreateGetStatisticsRequest(int? timeout, ShareFileRequestCo } request.Uri = uri; request.Headers.Add("x-ms-version", _version); - if (leaseAccessConditions?.LeaseId != null) + if (shareFileRequestConditions?.LeaseId != null) { - request.Headers.Add("x-ms-lease-id", leaseAccessConditions.LeaseId); + request.Headers.Add("x-ms-lease-id", shareFileRequestConditions.LeaseId); } request.Headers.Add("Accept", "application/xml"); return message; @@ -1188,11 +1188,11 @@ internal HttpMessage CreateGetStatisticsRequest(int? timeout, ShareFileRequestCo /// Retrieves statistics related to the share. /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. - public async Task> GetStatisticsAsync(int? timeout = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public async Task> GetStatisticsAsync(int? timeout = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { - using var message = CreateGetStatisticsRequest(timeout, leaseAccessConditions); + using var message = CreateGetStatisticsRequest(timeout, shareFileRequestConditions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new ShareGetStatisticsHeaders(message.Response); switch (message.Response.Status) @@ -1214,11 +1214,11 @@ public async Task Retrieves statistics related to the share. /// The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>. - /// Parameter group. + /// Parameter group. /// The cancellation token to use. - public ResponseWithHeaders GetStatistics(int? timeout = null, ShareFileRequestConditions leaseAccessConditions = null, CancellationToken cancellationToken = default) + public ResponseWithHeaders GetStatistics(int? timeout = null, ShareFileRequestConditions shareFileRequestConditions = null, CancellationToken cancellationToken = default) { - using var message = CreateGetStatisticsRequest(timeout, leaseAccessConditions); + using var message = CreateGetStatisticsRequest(timeout, shareFileRequestConditions); _pipeline.Send(message, cancellationToken); var headers = new ShareGetStatisticsHeaders(message.Response); switch (message.Response.Status) diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/ShareClient.cs b/sdk/storage/Azure.Storage.Files.Shares/src/ShareClient.cs index 8e8bd32d3781b..b9a5f2101ee2c 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/ShareClient.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/ShareClient.cs @@ -1649,7 +1649,7 @@ internal async Task DeleteInternal( { response = await ShareRestClient.DeleteAsync( deleteSnapshots: shareSnapshotsDeleteOption.ToShareSnapshotsDeleteOptionInternal(), - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken) .ConfigureAwait(false); } @@ -1657,7 +1657,7 @@ internal async Task DeleteInternal( { response = ShareRestClient.Delete( deleteSnapshots: shareSnapshotsDeleteOption.ToShareSnapshotsDeleteOptionInternal(), - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken); } @@ -1866,14 +1866,14 @@ private async Task> GetPropertiesInternal( if (async) { response = await ShareRestClient.GetPropertiesAsync( - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken) .ConfigureAwait(false); } else { response = ShareRestClient.GetProperties( - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken); } @@ -2047,7 +2047,7 @@ internal virtual async Task> SetPropertiesInternal( accessTier: accessTier, rootSquash: rootSquash, enableSnapshotVirtualDirectoryAccess: enableSnapshotVirtualDirectoryAccess, - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken) .ConfigureAwait(false); } @@ -2058,7 +2058,7 @@ internal virtual async Task> SetPropertiesInternal( accessTier: accessTier, rootSquash: rootSquash, enableSnapshotVirtualDirectoryAccess: enableSnapshotVirtualDirectoryAccess, - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken); } @@ -2454,7 +2454,7 @@ private async Task> SetMetadataInternal( { response = await ShareRestClient.SetMetadataAsync( metadata: metadata, - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken) .ConfigureAwait(false); } @@ -2462,7 +2462,7 @@ private async Task> SetMetadataInternal( { response = ShareRestClient.SetMetadata( metadata: metadata, - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken); } @@ -2667,14 +2667,14 @@ private async Task>> GetAccessPolicy if (async) { response = await ShareRestClient.GetAccessPolicyAsync( - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken) .ConfigureAwait(false); } else { response = ShareRestClient.GetAccessPolicy( - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken); } @@ -2915,7 +2915,7 @@ private async Task> SetAccessPolicyInternal( { response = await ShareRestClient.SetAccessPolicyAsync( shareAcl: permissions, - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken) .ConfigureAwait(false); } @@ -2923,7 +2923,7 @@ private async Task> SetAccessPolicyInternal( { response = ShareRestClient.SetAccessPolicy( shareAcl: permissions, - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken); } @@ -3119,14 +3119,14 @@ private async Task> GetStatisticsInternal( if (async) { response = await ShareRestClient.GetStatisticsAsync( - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken) .ConfigureAwait(false); } else { response = ShareRestClient.GetStatistics( - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken); } diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/ShareFileClient.cs b/sdk/storage/Azure.Storage.Files.Shares/src/ShareFileClient.cs index 5091d1b47a2c4..771a4f1d59ee2 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/ShareFileClient.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/ShareFileClient.cs @@ -870,7 +870,7 @@ private async Task> CreateInternal( filePermission: filePermission, filePermissionKey: smbProps.FilePermissionKey, fileHttpHeaders: httpHeaders.ToFileHttpHeaders(), - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken) .ConfigureAwait(false); } @@ -886,7 +886,7 @@ private async Task> CreateInternal( filePermission: filePermission, filePermissionKey: smbProps.FilePermissionKey, fileHttpHeaders: httpHeaders.ToFileHttpHeaders(), - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken); } @@ -1654,7 +1654,7 @@ private async Task> StartCopyInternal( filePermission: filePermission, filePermissionKey: smbProperties?.FilePermissionKey, copyFileSmbInfo: copyFileSmbInfo, - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken) .ConfigureAwait(false); } @@ -1666,7 +1666,7 @@ private async Task> StartCopyInternal( filePermission: filePermission, filePermissionKey: smbProperties?.FilePermissionKey, copyFileSmbInfo: copyFileSmbInfo, - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken); } @@ -1885,7 +1885,7 @@ private async Task AbortCopyInternal( { response = await FileRestClient.AbortCopyAsync( copyId: copyId, - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken) .ConfigureAwait(false); } @@ -1893,7 +1893,7 @@ private async Task AbortCopyInternal( { response = FileRestClient.AbortCopy( copyId: copyId, - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken); } @@ -2414,7 +2414,7 @@ await ContentHasher.AssertResponseHashMatchInternal( response = await FileRestClient.DownloadAsync( range: pageRange == default ? null : pageRange.ToString(), rangeGetContentMD5: transferValidationOverride?.ChecksumAlgorithm.ResolveAuto() == StorageChecksumAlgorithm.MD5 ? true : null, - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken) .ConfigureAwait(false); } @@ -2423,7 +2423,7 @@ await ContentHasher.AssertResponseHashMatchInternal( response = FileRestClient.Download( range: pageRange == default ? null : pageRange.ToString(), rangeGetContentMD5: transferValidationOverride?.ChecksumAlgorithm.ResolveAuto() == StorageChecksumAlgorithm.MD5 ? true : null, - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken); } @@ -2970,14 +2970,14 @@ private async Task DeleteInternal( if (async) { response = await FileRestClient.DeleteAsync( - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken) .ConfigureAwait(false); } else { response = FileRestClient.Delete( - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken); } @@ -3190,14 +3190,14 @@ private async Task> GetPropertiesInternal( if (async) { response = await FileRestClient.GetPropertiesAsync( - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken) .ConfigureAwait(false); } else { response = FileRestClient.GetProperties( - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken); } @@ -3531,7 +3531,7 @@ private async Task> SetHttpHeadersInternal( filePermissionKey: smbProps.FilePermissionKey, fileChangeTime: smbProps.FileChangedOn.ToFileDateTimeString(), fileHttpHeaders: httpHeaders.ToFileHttpHeaders(), - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken) .ConfigureAwait(false); } @@ -3546,7 +3546,7 @@ private async Task> SetHttpHeadersInternal( filePermissionKey: smbProps.FilePermissionKey, fileChangeTime: smbProps.FileChangedOn.ToFileDateTimeString(), fileHttpHeaders: httpHeaders.ToFileHttpHeaders(), - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken); } @@ -3771,7 +3771,7 @@ private async Task> SetMetadataInternal( { response = await FileRestClient.SetMetadataAsync( metadata: metadata, - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken) .ConfigureAwait(false); } @@ -3779,7 +3779,7 @@ private async Task> SetMetadataInternal( { response = FileRestClient.SetMetadata( metadata: metadata, - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken); } @@ -3937,7 +3937,7 @@ private async Task> ClearRangeInternal( contentLength: 0, // TODO remove this optionalbody: new MemoryStream(), - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken) .ConfigureAwait(false); } @@ -3949,7 +3949,7 @@ private async Task> ClearRangeInternal( contentLength: 0, // TODO remove this optionalbody: new MemoryStream(), - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken); } @@ -4432,7 +4432,7 @@ internal async Task> UploadRangeInternal( fileLastWrittenMode: fileLastWrittenMode, optionalbody: content, contentMD5: hashResult?.MD5AsArray, - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken) .ConfigureAwait(false); } @@ -4445,7 +4445,7 @@ internal async Task> UploadRangeInternal( fileLastWrittenMode: fileLastWrittenMode, optionalbody: content, contentMD5: hashResult?.MD5AsArray, - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken); } @@ -4834,7 +4834,7 @@ private async Task> UploadRangeFromUriInternal( sourceRange: sourceRange.ToString(), copySourceAuthorization: sourceAuthentication?.ToString(), fileLastWrittenMode: fileLastWrittenMode, - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken) .ConfigureAwait(false); } @@ -4847,7 +4847,7 @@ private async Task> UploadRangeFromUriInternal( sourceRange: sourceRange.ToString(), copySourceAuthorization: sourceAuthentication?.ToString(), fileLastWrittenMode: fileLastWrittenMode, - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken); } @@ -5619,7 +5619,7 @@ private async Task> GetRangeListInternal( prevsharesnapshot: previousSnapshot, supportRename: supportRename, range: range?.ToString(), - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken) .ConfigureAwait(false); } @@ -5630,7 +5630,7 @@ private async Task> GetRangeListInternal( prevsharesnapshot: previousSnapshot, supportRename: supportRename, range: range?.ToString(), - leaseAccessConditions: conditions, + shareFileRequestConditions: conditions, cancellationToken: cancellationToken); } diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/ShareLeaseClient.cs b/sdk/storage/Azure.Storage.Files.Shares/src/ShareLeaseClient.cs index 3f1ea0458790b..32a8e1935a552 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/ShareLeaseClient.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/ShareLeaseClient.cs @@ -861,14 +861,14 @@ private async Task> BreakInternal( if (async) { response = await FileClient.FileRestClient.BreakLeaseAsync( - leaseAccessConditions: null, + shareFileRequestConditions: null, cancellationToken: cancellationToken) .ConfigureAwait(false); } else { response = FileClient.FileRestClient.BreakLease( - leaseAccessConditions: null, + shareFileRequestConditions: null, cancellationToken: cancellationToken); } @@ -884,7 +884,7 @@ private async Task> BreakInternal( { response = await ShareClient.ShareRestClient.BreakLeaseAsync( breakPeriod: null, - leaseAccessConditions: null, + shareFileRequestConditions: null, cancellationToken: cancellationToken) .ConfigureAwait(false); } @@ -892,7 +892,7 @@ private async Task> BreakInternal( { response = ShareClient.ShareRestClient.BreakLease( breakPeriod: null, - leaseAccessConditions: null, + shareFileRequestConditions: null, cancellationToken: cancellationToken); } diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/ShareServiceClient.cs b/sdk/storage/Azure.Storage.Files.Shares/src/ShareServiceClient.cs index 83b764accd8c9..2f624c8317558 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/ShareServiceClient.cs +++ b/sdk/storage/Azure.Storage.Files.Shares/src/ShareServiceClient.cs @@ -819,14 +819,14 @@ private async Task SetPropertiesInternal( if (async) { response = await ServiceRestClient.SetPropertiesAsync( - storageServiceProperties: properties, + shareServiceProperties: properties, cancellationToken: cancellationToken) .ConfigureAwait(false); } else { response = ServiceRestClient.SetProperties( - storageServiceProperties: properties, + shareServiceProperties: properties, cancellationToken: cancellationToken); } diff --git a/sdk/storage/Azure.Storage.Queues/src/Generated/ServiceRestClient.cs b/sdk/storage/Azure.Storage.Queues/src/Generated/ServiceRestClient.cs index e1e13e3b7f13c..385b2bcedede5 100644 --- a/sdk/storage/Azure.Storage.Queues/src/Generated/ServiceRestClient.cs +++ b/sdk/storage/Azure.Storage.Queues/src/Generated/ServiceRestClient.cs @@ -40,7 +40,7 @@ public ServiceRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipel _version = version ?? throw new ArgumentNullException(nameof(version)); } - internal HttpMessage CreateSetPropertiesRequest(QueueServiceProperties storageServiceProperties, int? timeout) + internal HttpMessage CreateSetPropertiesRequest(QueueServiceProperties queueServiceProperties, int? timeout) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -59,24 +59,24 @@ internal HttpMessage CreateSetPropertiesRequest(QueueServiceProperties storageSe request.Headers.Add("Accept", "application/xml"); request.Headers.Add("Content-Type", "application/xml"); var content = new XmlWriterContent(); - content.XmlWriter.WriteObjectValue(storageServiceProperties, "StorageServiceProperties"); + content.XmlWriter.WriteObjectValue(queueServiceProperties, "StorageServiceProperties"); request.Content = content; return message; } /// Sets properties for a storage account's Queue service endpoint, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - /// The StorageService properties. + /// The StorageService properties. /// The The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting Timeouts for Queue Service Operations.</a>. /// The cancellation token to use. - /// is null. - public async Task> SetPropertiesAsync(QueueServiceProperties storageServiceProperties, int? timeout = null, CancellationToken cancellationToken = default) + /// is null. + public async Task> SetPropertiesAsync(QueueServiceProperties queueServiceProperties, int? timeout = null, CancellationToken cancellationToken = default) { - if (storageServiceProperties == null) + if (queueServiceProperties == null) { - throw new ArgumentNullException(nameof(storageServiceProperties)); + throw new ArgumentNullException(nameof(queueServiceProperties)); } - using var message = CreateSetPropertiesRequest(storageServiceProperties, timeout); + using var message = CreateSetPropertiesRequest(queueServiceProperties, timeout); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new ServiceSetPropertiesHeaders(message.Response); switch (message.Response.Status) @@ -89,18 +89,18 @@ public async Task> SetPropertie } /// Sets properties for a storage account's Queue service endpoint, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. - /// The StorageService properties. + /// The StorageService properties. /// The The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations>Setting Timeouts for Queue Service Operations.</a>. /// The cancellation token to use. - /// is null. - public ResponseWithHeaders SetProperties(QueueServiceProperties storageServiceProperties, int? timeout = null, CancellationToken cancellationToken = default) + /// is null. + public ResponseWithHeaders SetProperties(QueueServiceProperties queueServiceProperties, int? timeout = null, CancellationToken cancellationToken = default) { - if (storageServiceProperties == null) + if (queueServiceProperties == null) { - throw new ArgumentNullException(nameof(storageServiceProperties)); + throw new ArgumentNullException(nameof(queueServiceProperties)); } - using var message = CreateSetPropertiesRequest(storageServiceProperties, timeout); + using var message = CreateSetPropertiesRequest(queueServiceProperties, timeout); _pipeline.Send(message, cancellationToken); var headers = new ServiceSetPropertiesHeaders(message.Response); switch (message.Response.Status) diff --git a/sdk/storage/Azure.Storage.Queues/src/QueueServiceClient.cs b/sdk/storage/Azure.Storage.Queues/src/QueueServiceClient.cs index 1afb4df923509..041cab4cc2b69 100644 --- a/sdk/storage/Azure.Storage.Queues/src/QueueServiceClient.cs +++ b/sdk/storage/Azure.Storage.Queues/src/QueueServiceClient.cs @@ -718,14 +718,14 @@ private async Task SetPropertiesInternal( if (async) { response = await _serviceRestClient.SetPropertiesAsync( - storageServiceProperties: properties, + queueServiceProperties: properties, cancellationToken: cancellationToken) .ConfigureAwait(false); } else { response = _serviceRestClient.SetProperties( - storageServiceProperties: properties, + queueServiceProperties: properties, cancellationToken: cancellationToken); } From 000c7f5d090026e220d6a1fb869847e5bcfeb9e9 Mon Sep 17 00:00:00 2001 From: James Suplizio Date: Tue, 16 Jul 2024 09:26:13 -0700 Subject: [PATCH 094/144] Temporarily disable MSDocs publishing for Azure.Messaging.EventGrid.SystemEvents (#45033) --- sdk/eventgrid/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sdk/eventgrid/ci.yml b/sdk/eventgrid/ci.yml index ef7a694d0ceb9..f7864ab0ab301 100644 --- a/sdk/eventgrid/ci.yml +++ b/sdk/eventgrid/ci.yml @@ -47,5 +47,10 @@ extends: safeName: AzureMessagingEventGridNamespaces - name: Azure.Messaging.EventGrid.SystemEvents safeName: AzureMessagingEventGridSystemEvents + # MSDocs are being temporarily disabled because of an issue with MSDocs generation. + # The following issue is being used to track reenabling MSDocs publishing when + # the MSDocs issue is fixed. + # https://github.com/Azure/azure-sdk-for-net/issues/45032 + skipPublishDocMs: true From 79cf575484d10369011d101e0bc4bea8e6eec882 Mon Sep 17 00:00:00 2001 From: Timothy Mothra Date: Tue, 16 Jul 2024 09:57:37 -0700 Subject: [PATCH 095/144] [AzureMonitor] add links to docs in the Readme (#45017) * add links to docs in the Readme * pr feedback --- .../Azure.Monitor.OpenTelemetry.AspNetCore/README.md | 8 ++++++++ .../Azure.Monitor.OpenTelemetry.Exporter/README.md | 10 ++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/README.md b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/README.md index fe89c699a182c..507590ee40f64 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/README.md +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/README.md @@ -45,6 +45,14 @@ The Azure Monitor Distro is a distribution of the .NET OpenTelemetry SDK with in * [Azure Monitor Exporter](https://www.nuget.org/packages/Azure.Monitor.OpenTelemetry.Exporter/) allows sending traces, metrics, and logs data to Azure Monitor. +### Migrating from Application Insights SDK? + +If you are currently using the Application Insights SDK and want to migrate to OpenTelemetry, please follow our [migration guide](https://learn.microsoft.com/azure/azure-monitor/app/opentelemetry-dotnet-migrate?tabs=aspnetcore). + +### Already using OpenTelemetry? + +If you are currently using OpenTelemetry and want to send telemetry data to Azure Monitor, please follow our [getting started guide](https://learn.microsoft.com/azure/azure-monitor/app/opentelemetry-enable?tabs=aspnetcore). + ### Install the package #### Latest Version: [![Nuget](https://img.shields.io/nuget/vpre/Azure.Monitor.OpenTelemetry.AspNetCore.svg)](https://www.nuget.org/packages/Azure.Monitor.OpenTelemetry.AspNetCore/) diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/README.md b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/README.md index adf8f88d26355..be13c36ce0f71 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/README.md +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/README.md @@ -1,7 +1,5 @@ # Azure Monitor Exporter client library for .NET - - The [OpenTelemetry .NET](https://github.com/open-telemetry/opentelemetry-dotnet) exporters which send [telemetry data](https://docs.microsoft.com/azure/azure-monitor/app/data-model) to [Azure Monitor](https://docs.microsoft.com/azure/azure-monitor/app/app-insights-overview) following the [OpenTelemetry Specification](https://github.com/open-telemetry/opentelemetry-specification). ## Getting started @@ -11,6 +9,14 @@ The [OpenTelemetry .NET](https://github.com/open-telemetry/opentelemetry-dotnet) - **Azure Subscription:** To use Azure services, including Azure Monitor Exporter for [OpenTelemetry .NET](https://github.com/open-telemetry/opentelemetry-dotnet), you'll need a subscription. If you do not have an existing Azure account, you may sign up for a [free trial](https://azure.microsoft.com/free/dotnet/) or use your [Visual Studio Subscription](https://visualstudio.microsoft.com/subscriptions/) benefits when you [create an account](https://azure.microsoft.com/account). - **Azure Application Insights Connection String:** To send telemetry data to the monitoring service you'll need connection string from Azure Application Insights. If you are not familiar with creating Azure resources, you may wish to follow the step-by-step guide for [Create an Application Insights resource](https://docs.microsoft.com/azure/azure-monitor/app/create-new-resource) and [copy the connection string](https://docs.microsoft.com/azure/azure-monitor/app/sdk-connection-string?tabs=net#find-your-connection-string). +### Migrating from Application Insights SDK + +If you are currently using the Application Insights SDK and want to migrate to OpenTelemetry, please follow our [migration guide](https://learn.microsoft.com/azure/azure-monitor/app/opentelemetry-dotnet-migrate?tabs=console). + +### Already using OpenTelemetry? + +If you are currently using OpenTelemetry and want to send telemetry data to Azure Monitor, please follow our [getting started guide](https://learn.microsoft.com/azure/azure-monitor/app/opentelemetry-enable?tabs=net). + ### Install the package #### Latest Version: [![Nuget](https://img.shields.io/nuget/vpre/Azure.Monitor.OpenTelemetry.Exporter.svg)](https://www.nuget.org/packages/Azure.Monitor.OpenTelemetry.Exporter/) From 1de7cef80c9da5410fe0b2fd8be6e44d4cb1de4a Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Tue, 16 Jul 2024 12:28:38 -0500 Subject: [PATCH 096/144] Remove duplicate SYSTEM_ACCESSTOKEN (#45004) --- sdk/identity/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/identity/tests.yml b/sdk/identity/tests.yml index d730fc591ac9d..b50399ae61650 100644 --- a/sdk/identity/tests.yml +++ b/sdk/identity/tests.yml @@ -32,5 +32,5 @@ extends: - $(sub-config-identity-test-resources) ServiceConnection: azure-sdk-tests EnvVars: - SYSTEM_ACCESSTOKEN: $(System.AccessToken) - UseFederatedAuth: true \ No newline at end of file + ARM_OIDC_TOKEN: $(ARM_OIDC_TOKEN) + UseFederatedAuth: true From 0984ae3e01b8194a31c35844561987030777d735 Mon Sep 17 00:00:00 2001 From: Alexey Rodionov Date: Tue, 16 Jul 2024 11:11:12 -0700 Subject: [PATCH 097/144] Fixing target base scale instance concurrency for queues (#44661) * Fixing target base scale instance concurrency for queues * New commit * Adding changelog notes * Fix --------- Co-authored-by: Amanda Nguyen --- .../CHANGELOG.md | 8 ++------ .../src/Shared/Queues/QueueTargetScaler.cs | 4 ++-- .../CHANGELOG.md | 7 ++----- .../tests/QueueTargetScalerTests.cs | 2 +- 4 files changed, 7 insertions(+), 14 deletions(-) diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/CHANGELOG.md b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/CHANGELOG.md index 5906f03422abc..cc4de68fcd802 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/CHANGELOG.md +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/CHANGELOG.md @@ -2,15 +2,11 @@ ## 5.4.0-beta.1 (Unreleased) -### Features Added - -### Breaking Changes - ### Bugs Fixed +- Rely on PeekMessagesAsync when calculating message queue length +- Fixing target base scale instance concurrency for queues - Bumped version of Azure.Storage.Blobs to resolve issue where Blob Path was being truncated at '#' character. -### Other Changes - ## 5.3.0 (2024-04-18) - Includes all features from 5.3.0-beta.1. - Bumped Azure.Identity dependency to 1.11.1 to resolve secruity vulnerability. diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/Queues/QueueTargetScaler.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/Queues/QueueTargetScaler.cs index 6da40f64a5b6b..d89c8fab535a4 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/Queues/QueueTargetScaler.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Common/src/Shared/Queues/QueueTargetScaler.cs @@ -55,11 +55,11 @@ public async Task GetScaleResultAsync(TargetScalerContext co internal TargetScalerResult GetScaleResultInternal(TargetScalerContext context, int queueLength) { - int concurrency = !context.InstanceConcurrency.HasValue ? _options.BatchSize : context.InstanceConcurrency.Value; + int concurrency = !context.InstanceConcurrency.HasValue ? _options.BatchSize + _options.NewBatchThreshold : context.InstanceConcurrency.Value; if (concurrency < 0) { - throw new ArgumentOutOfRangeException($"Concurrency value='{concurrency}' used for target based scale must be > 0"); + throw new ArgumentOutOfRangeException($"Concurrency value='{concurrency}' used for target based scale must be > 0."); } int targetWorkerCount = (int)Math.Ceiling(queueLength / (decimal)concurrency); diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/CHANGELOG.md b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/CHANGELOG.md index faebfb83f19f8..0dfcb541ea1ae 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/CHANGELOG.md +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/CHANGELOG.md @@ -2,13 +2,10 @@ ## 5.4.0-beta.1 (Unreleased) -### Features Added - -### Breaking Changes - ### Bugs Fixed +- Rely on PeekMessagesAsync when calculating message queue length +- Fixing target base scale instance concurrency for queues - When grabbing Queue Metrics for amount of messages, will now use the QueueTriggerMetrics.QueueLength instead of the ApproximateMessagesCount for less stale metrics. -### Other Changes ## 5.3.0 (2024-04-18) - Includes all features from 5.3.0-beta.1. diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/tests/QueueTargetScalerTests.cs b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/tests/QueueTargetScalerTests.cs index 410be2e6e7494..cb69be0ca7774 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/tests/QueueTargetScalerTests.cs +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/tests/QueueTargetScalerTests.cs @@ -32,7 +32,7 @@ public void Setup() [TestCase(160, 20, 8)] public void QueueTargetScaler_Returns_Expected(int queueLength, int? concurrency, int expectedTargetWorkerCount) { - QueuesOptions options = new QueuesOptions { BatchSize = 16 }; + QueuesOptions options = new QueuesOptions { BatchSize = 8, NewBatchThreshold = 8 }; TargetScalerContext context = new TargetScalerContext { From 4ab13870fd579ee109c4400ee3a6717bf9595b88 Mon Sep 17 00:00:00 2001 From: Meredith Monticello Date: Tue, 16 Jul 2024 12:01:54 -0700 Subject: [PATCH 098/144] [Azure.Communication.Messages] Update README (#44987) * Update Azure.Communication.Messages README --- .../Azure.Communication.Messages/README.md | 46 ++++++++++++------- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/sdk/communication/Azure.Communication.Messages/README.md b/sdk/communication/Azure.Communication.Messages/README.md index e1f9ad39537d9..93ab5c55fb7cc 100644 --- a/sdk/communication/Azure.Communication.Messages/README.md +++ b/sdk/communication/Azure.Communication.Messages/README.md @@ -19,8 +19,10 @@ You need an [Azure subscription][azure_sub] and a [Communication Service Resourc To create a new Communication Service, you can use the [Azure Portal][communication_resource_create_portal], the [Azure PowerShell][communication_resource_create_power_shell], or the [.NET management client library][communication_resource_create_net]. +You must register your WhatsApp business account and have an active channel before sending messages. See [Quickstart: Register WhatsApp business account][azuredocs_register_waba] for more details + ### Key concepts -`NotificationMessagesClient` provides the functionality to send notification messages . +`NotificationMessagesClient` provides the functionality to send notification messages. ### Using statements ```C# @@ -28,23 +30,29 @@ using Azure.Communication.Messages; ``` ### Authenticate the client -#### Connection String +#### Connection string + +The NotificationMessagesClient is used for sending messages. +The MessageTemplateClient is used for retrieving template information. + +For simplicity, this example uses a connection string to authenticate. In production environments, we recommend using Microsoft Entra ID. + Messages clients can be authenticated using the connection string acquired from an Azure Communication Resource in the [Azure Portal][azure_portal]. ```C# -var connectionString = ""; // Find your Communication Services resource in the Azure portal +var connectionString = ""; // Find your Communication Services resource in the Azure portal NotificationMessagesClient notificationMessagesClient = new NotificationMessagesClient(connectionString); MessageTemplateClient messageTemplateClient = new MessageTemplateClient(connectionString); ``` ## Examples -### Send an Notification Message +### Send a notification message To send a notification message, call the `Send` or `SendAsync` function from the `NotificationMessagesClient`. #### Send a text message ```C# // Create the recipient list, currently only one recipient is supported -var recipient = new List { "" }; +var recipient = new List { "" }; var textContent = new = new TextNotificationContent(new Guid(""), recipient, "Come on everyone, let's go for lunch together."); SendMessageResult result = await notificationMessagesClient.SendAsync(textContent); Console.WriteLine($"Message id: {result.Receipts[0].MessageId}"); @@ -53,7 +61,7 @@ Console.WriteLine($"Message id: {result.Receipts[0].MessageId}"); #### Send a template message ```C# // Create the recipient list, currently only one recipient is supported -var recipient = new List { "" }; +var recipient = new List { "" }; string templateName = "sample_template"; string templateLanguage = "en_us"; var messageTemplate = new MessageTemplate(templateName, templateLanguage); @@ -65,7 +73,7 @@ Console.WriteLine($"Message id: {result.Receipts[0].MessageId}"); #### Send a media message ```C# // Create the recipient list, currently only one recipient is supported -var recipient = new List { "" }; +var recipient = new List { "" }; var uri = new Uri("https://aka.ms/acsicon1"); var mediaContent = new MediaNotificationContent(channelRegistrationId, recipientList, uri); SendMessageResult result = await notificationMessagesClient.SendAsync(mediaContent); @@ -73,8 +81,7 @@ Console.WriteLine($"Message id: {result.Receipts[0].MessageId}"); ``` ### Retrieve templates -To retrieve templates, call the `GetMessages` or `GetMessagesAsync` function from the `MessageTemplateClient`. - +To retrieve templates, call the `GetTemplates` or `GetTemplatesAsync` function from the `MessageTemplateClient`. ```C# AsyncPageable templates = messageTemplateClient.GetTemplatesAsync(channelId); @@ -88,8 +95,10 @@ await foreach (MessageTemplateItem template in templates) A `RequestFailedException` is thrown as a service response for any unsuccessful requests. The exception contains information about what response code was returned from the service. ## Next steps -- Read more about Messages in Azure Communication Services (Link to be added). -- Read more about how to set up Event Grid subscription for new message and message delivery status (Link to be added). +- Read more about Messages in Azure Communication Services at [Advanced Messaging for WhatsApp in Azure Communication Services][azuredocs_whatsapp_overview]. +- Read more about how to set up an Event Grid subscription to receive messages and message delivery statuses at [Quickstart: Handle Advanced Messaging events][azuredocs_eventgrid_setup]. +- Read more about how to use templates at [Send WhatsApp template messages][azuredocs_templates]. +- For a set-by-step guide on how to use the Messages APIs, see [Quickstart: Send WhatsApp Messages using Advanced Messages][azuredocs_quickstart]]. ## Contributing @@ -100,15 +109,20 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [source]: https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/communication/Azure.Communication.Messages/src [package]: https://www.nuget.org/packages/Azure.Communication.Messages -[product_docs]: https://docs.microsoft.com/azure/communication-services/overview +[product_docs]: https://learn.microsoft.com/azure/communication-services/overview [nuget]: https://www.nuget.org [azure_sub]: https://azure.microsoft.com/free/dotnet/ -[communication_resource_docs]: https://docs.microsoft.com/azure/communication-services/quickstarts/create-communication-resource?tabs=windows&pivots=platform-azp -[communication_resource_create_portal]: https://docs.microsoft.com/azure/communication-services/quickstarts/create-communication-resource?tabs=windows&pivots=platform-azp -[communication_resource_create_power_shell]: https://docs.microsoft.com/powershell/module/az.communication/new-azcommunicationservice -[communication_resource_create_net]: https://docs.microsoft.com/azure/communication-services/quickstarts/create-communication-resource?tabs=windows&pivots=platform-net +[communication_resource_docs]: https://learn.microsoft.com/azure/communication-services/quickstarts/create-communication-resource?tabs=windows&pivots=platform-azp +[communication_resource_create_portal]: https://learn.microsoft.com/azure/communication-services/quickstarts/create-communication-resource?tabs=windows&pivots=platform-azp +[communication_resource_create_power_shell]: https://learn.microsoft.com/powershell/module/az.communication/new-azcommunicationservice +[communication_resource_create_net]: https://learn.microsoft.com/azure/communication-services/quickstarts/create-communication-resource?tabs=windows&pivots=platform-net [azure_portal]: https://portal.azure.com [cla]: https://cla.microsoft.com [coc]: https://opensource.microsoft.com/codeofconduct [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq [coc_contact]: mailto:opencode@microsoft.com +[azuredocs_whatsapp_overview]: https://learn.microsoft.com/azure/communication-services/concepts/advanced-messaging/whatsapp/whatsapp-overview +[azuredocs_eventgrid_setup]: https://learn.microsoft.com/azure/communication-services/quickstarts/advanced-messaging/whatsapp/handle-advanced-messaging-events +[azuredocs_register_waba]: https://learn.microsoft.com/azure/communication-services/quickstarts/advanced-messaging/whatsapp/connect-whatsapp-business-account +[azuredocs_templates]: https://learn.microsoft.com/azure/communication-services/concepts/advanced-messaging/whatsapp/template-messages +[azuredocs_quickstart]: https://learn.microsoft.com/azure/communication-services/quickstarts/advanced-messaging/whatsapp/get-started?pivots=programming-language-csharp From af0cf7f202e18e10288bee2a1729b020d25679e5 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 16 Jul 2024 15:19:24 -0400 Subject: [PATCH 099/144] Increment package version after release of Azure.Monitor.OpenTelemetry.Exporter (#45037) --- .../Azure.Monitor.OpenTelemetry.Exporter/CHANGELOG.md | 10 ++++++++++ .../src/Azure.Monitor.OpenTelemetry.Exporter.csproj | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/CHANGELOG.md b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/CHANGELOG.md index 01c1ef5efb5c2..77333d17769fb 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/CHANGELOG.md +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.4.0-beta.2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.4.0-beta.1 (2024-07-12) ### Bugs Fixed diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Azure.Monitor.OpenTelemetry.Exporter.csproj b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Azure.Monitor.OpenTelemetry.Exporter.csproj index a59574d296fca..0c86ed01f3d39 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Azure.Monitor.OpenTelemetry.Exporter.csproj +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/Azure.Monitor.OpenTelemetry.Exporter.csproj @@ -2,7 +2,7 @@ An OpenTelemetry .NET exporter that exports to Azure Monitor AzureMonitor OpenTelemetry Exporter - 1.4.0-beta.1 + 1.4.0-beta.2 1.3.0 Azure Monitor OpenTelemetry Exporter ApplicationInsights From a7dca2b903424a0ec12a762d096daf2c784aa7af Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 16 Jul 2024 16:07:00 -0400 Subject: [PATCH 100/144] Increment version for storage releases (#45039) --- sdk/storage/Azure.Storage.Blobs.Batch/CHANGELOG.md | 10 ++++++++++ .../src/Azure.Storage.Blobs.Batch.csproj | 4 ++-- .../Azure.Storage.Blobs.ChangeFeed/CHANGELOG.md | 10 ++++++++++ .../src/Azure.Storage.Blobs.ChangeFeed.csproj | 2 +- sdk/storage/Azure.Storage.Blobs/CHANGELOG.md | 10 ++++++++++ .../Azure.Storage.Blobs/src/Azure.Storage.Blobs.csproj | 4 ++-- sdk/storage/Azure.Storage.Common/CHANGELOG.md | 10 ++++++++++ .../src/Azure.Storage.Common.csproj | 4 ++-- sdk/storage/Azure.Storage.Files.DataLake/CHANGELOG.md | 10 ++++++++++ .../src/Azure.Storage.Files.DataLake.csproj | 4 ++-- sdk/storage/Azure.Storage.Files.Shares/CHANGELOG.md | 10 ++++++++++ .../src/Azure.Storage.Files.Shares.csproj | 4 ++-- sdk/storage/Azure.Storage.Queues/CHANGELOG.md | 10 ++++++++++ .../src/Azure.Storage.Queues.csproj | 4 ++-- 14 files changed, 83 insertions(+), 13 deletions(-) diff --git a/sdk/storage/Azure.Storage.Blobs.Batch/CHANGELOG.md b/sdk/storage/Azure.Storage.Blobs.Batch/CHANGELOG.md index 59070294f1296..6e96f38d1ec2b 100644 --- a/sdk/storage/Azure.Storage.Blobs.Batch/CHANGELOG.md +++ b/sdk/storage/Azure.Storage.Blobs.Batch/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 12.19.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 12.18.0 (2024-07-16) ### Features Added diff --git a/sdk/storage/Azure.Storage.Blobs.Batch/src/Azure.Storage.Blobs.Batch.csproj b/sdk/storage/Azure.Storage.Blobs.Batch/src/Azure.Storage.Blobs.Batch.csproj index 056207c70c94b..7320e363f5f38 100644 --- a/sdk/storage/Azure.Storage.Blobs.Batch/src/Azure.Storage.Blobs.Batch.csproj +++ b/sdk/storage/Azure.Storage.Blobs.Batch/src/Azure.Storage.Blobs.Batch.csproj @@ -4,9 +4,9 @@ Microsoft Azure.Storage.Blobs.Batch client library - 12.18.0 + 12.19.0-beta.1 - 12.17.0 + 12.18.0 BlobSDK;$(DefineConstants) Microsoft Azure Storage Blobs Batching;Batch blob;Batch operation;BlobBatchClient;BlobBatch;Microsoft;Azure;Blobs;Blob;Storage;StorageScalable;$(PackageCommonTags) diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/CHANGELOG.md b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/CHANGELOG.md index e758048ef9774..e89830863f760 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/CHANGELOG.md +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 12.0.0-preview.47 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 12.0.0-preview.46 (2024-07-16) ### Features Added diff --git a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Azure.Storage.Blobs.ChangeFeed.csproj b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Azure.Storage.Blobs.ChangeFeed.csproj index 905ccf99d0719..d98828f2cc798 100644 --- a/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Azure.Storage.Blobs.ChangeFeed.csproj +++ b/sdk/storage/Azure.Storage.Blobs.ChangeFeed/src/Azure.Storage.Blobs.ChangeFeed.csproj @@ -4,7 +4,7 @@ Microsoft Azure.Storage.Blobs.ChangeFeed client library - 12.0.0-preview.46 + 12.0.0-preview.47 ChangeFeedSDK;$(DefineConstants) Microsoft Azure Change Feed;Microsoft;Azure;Storage;StorageScalable;$(PackageCommonTags) diff --git a/sdk/storage/Azure.Storage.Blobs/CHANGELOG.md b/sdk/storage/Azure.Storage.Blobs/CHANGELOG.md index a3cc6fd2e94d9..ac0a011a6f75d 100644 --- a/sdk/storage/Azure.Storage.Blobs/CHANGELOG.md +++ b/sdk/storage/Azure.Storage.Blobs/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 12.22.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 12.21.0 (2024-07-16) ### Features Added diff --git a/sdk/storage/Azure.Storage.Blobs/src/Azure.Storage.Blobs.csproj b/sdk/storage/Azure.Storage.Blobs/src/Azure.Storage.Blobs.csproj index fb9114e806167..6e0e031308eff 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/Azure.Storage.Blobs.csproj +++ b/sdk/storage/Azure.Storage.Blobs/src/Azure.Storage.Blobs.csproj @@ -4,9 +4,9 @@ Microsoft Azure.Storage.Blobs client library - 12.21.0 + 12.22.0-beta.1 - 12.20.0 + 12.21.0 BlobSDK;$(DefineConstants) Microsoft Azure Storage Blobs;Microsoft;Azure;Blobs;Blob;Storage;StorageScalable;$(PackageCommonTags) true diff --git a/sdk/storage/Azure.Storage.Common/CHANGELOG.md b/sdk/storage/Azure.Storage.Common/CHANGELOG.md index 82c5ffa002096..47be03adb2b6e 100644 --- a/sdk/storage/Azure.Storage.Common/CHANGELOG.md +++ b/sdk/storage/Azure.Storage.Common/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 12.21.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 12.20.0 (2024-07-16) ### Features Added diff --git a/sdk/storage/Azure.Storage.Common/src/Azure.Storage.Common.csproj b/sdk/storage/Azure.Storage.Common/src/Azure.Storage.Common.csproj index 7d4c05b15048b..fc0871aa4cb3d 100644 --- a/sdk/storage/Azure.Storage.Common/src/Azure.Storage.Common.csproj +++ b/sdk/storage/Azure.Storage.Common/src/Azure.Storage.Common.csproj @@ -4,9 +4,9 @@ Microsoft Azure.Storage.Common client library - 12.20.0 + 12.21.0-beta.1 - 12.19.0 + 12.20.0 CommonSDK;$(DefineConstants) Microsoft Azure Storage Common, Microsoft, Azure, StorageScalable, azureofficial diff --git a/sdk/storage/Azure.Storage.Files.DataLake/CHANGELOG.md b/sdk/storage/Azure.Storage.Files.DataLake/CHANGELOG.md index 9e20267eefdce..7e3d81e5bde85 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/CHANGELOG.md +++ b/sdk/storage/Azure.Storage.Files.DataLake/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 12.20.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 12.19.0 (2024-07-16) ### Features Added diff --git a/sdk/storage/Azure.Storage.Files.DataLake/src/Azure.Storage.Files.DataLake.csproj b/sdk/storage/Azure.Storage.Files.DataLake/src/Azure.Storage.Files.DataLake.csproj index b88e736686795..f5e5ce071b35f 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/src/Azure.Storage.Files.DataLake.csproj +++ b/sdk/storage/Azure.Storage.Files.DataLake/src/Azure.Storage.Files.DataLake.csproj @@ -4,9 +4,9 @@ Microsoft Azure.Storage.Files.DataLake client library - 12.19.0 + 12.20.0-beta.1 - 12.18.0 + 12.19.0 DataLakeSDK;$(DefineConstants) Microsoft Azure Storage Files;Microsoft;Azure;File;Files;Data Lake;Storage;StorageScalable;$(PackageCommonTags) true diff --git a/sdk/storage/Azure.Storage.Files.Shares/CHANGELOG.md b/sdk/storage/Azure.Storage.Files.Shares/CHANGELOG.md index d03036065af12..08056b6ed32f6 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/CHANGELOG.md +++ b/sdk/storage/Azure.Storage.Files.Shares/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 12.20.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 12.19.0 (2024-07-16) ### Features Added diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/Azure.Storage.Files.Shares.csproj b/sdk/storage/Azure.Storage.Files.Shares/src/Azure.Storage.Files.Shares.csproj index c1c0c689862a7..7f6bdebd8cc0f 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/Azure.Storage.Files.Shares.csproj +++ b/sdk/storage/Azure.Storage.Files.Shares/src/Azure.Storage.Files.Shares.csproj @@ -4,9 +4,9 @@ Microsoft Azure.Storage.Files.Shares client library - 12.19.0 + 12.20.0-beta.1 - 12.18.0 + 12.19.0 FileSDK;$(DefineConstants) Microsoft Azure Storage Files;Microsoft;Azure;File;Files;Storage;StorageScalable;$(PackageCommonTags) true diff --git a/sdk/storage/Azure.Storage.Queues/CHANGELOG.md b/sdk/storage/Azure.Storage.Queues/CHANGELOG.md index d66c860abd2c8..cc3d2c24b83cc 100644 --- a/sdk/storage/Azure.Storage.Queues/CHANGELOG.md +++ b/sdk/storage/Azure.Storage.Queues/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 12.20.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 12.19.0 (2024-07-16) ### Features Added diff --git a/sdk/storage/Azure.Storage.Queues/src/Azure.Storage.Queues.csproj b/sdk/storage/Azure.Storage.Queues/src/Azure.Storage.Queues.csproj index 4459e1832c649..69ac3606e4a24 100644 --- a/sdk/storage/Azure.Storage.Queues/src/Azure.Storage.Queues.csproj +++ b/sdk/storage/Azure.Storage.Queues/src/Azure.Storage.Queues.csproj @@ -4,9 +4,9 @@ Microsoft Azure.Storage.Queues client library - 12.19.0 + 12.20.0-beta.1 - 12.18.0 + 12.19.0 QueueSDK;$(DefineConstants) Microsoft Azure Storage Queues;Microsoft;Azure;Queues;Queue;Storage;StorageScalable;$(PackageCommonTags) From 4f551eb7a0f5db62e351d140661f0df73d077c5a Mon Sep 17 00:00:00 2001 From: Wes Haggard Date: Tue, 16 Jul 2024 13:16:26 -0700 Subject: [PATCH 101/144] Update Preview Test Sub to use new connection (#45035) In order to get both deployment and clean-up working we need to have a connection that points at the right subscription. Today azure-sdk-tests points to the name Test Sub but I created azure-sdk-tests-preview connection which points to the Preview Test Sub. This will fix the clean-up step which is currently failing for things deployed in Preview. --- eng/pipelines/templates/stages/archetype-sdk-tests.yml | 2 +- sdk/storage/storage-preview-public-msft.json | 9 --------- sdk/storage/tests.yml | 4 +--- 3 files changed, 2 insertions(+), 13 deletions(-) delete mode 100644 sdk/storage/storage-preview-public-msft.json diff --git a/eng/pipelines/templates/stages/archetype-sdk-tests.yml b/eng/pipelines/templates/stages/archetype-sdk-tests.yml index 686116accac59..65f3a21060165 100644 --- a/eng/pipelines/templates/stages/archetype-sdk-tests.yml +++ b/eng/pipelines/templates/stages/archetype-sdk-tests.yml @@ -60,7 +60,7 @@ parameters: - eng/common/TestResources/sub-config/AzurePublicMsft.json Preview: SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources-preview) - ServiceConnection: azure-sdk-tests + ServiceConnection: azure-sdk-tests-preview Canary: SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) Location: 'eastus2euap' diff --git a/sdk/storage/storage-preview-public-msft.json b/sdk/storage/storage-preview-public-msft.json deleted file mode 100644 index e35b5b7a0cd51..0000000000000 --- a/sdk/storage/storage-preview-public-msft.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "SubscriptionId": "23fddbc8-cb64-4b59-ba97-4c9f77c212e4", - "TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", - "TestApplicationId": "f850650c-1fcf-4489-b46f-71af2e30d360", - "TestApplicationOid": "30511c9d-ba1a-4c7b-b422-5b543da11b3f", - "ProvisionerApplicationId": "f850650c-1fcf-4489-b46f-71af2e30d360", - "ProvisionerApplicationOid": "30511c9d-ba1a-4c7b-b422-5b543da11b3f", - "Environment": "AzureCloud" -} \ No newline at end of file diff --git a/sdk/storage/tests.yml b/sdk/storage/tests.yml index afd0b6eacfdc2..89d19a3c55a3e 100644 --- a/sdk/storage/tests.yml +++ b/sdk/storage/tests.yml @@ -11,9 +11,7 @@ extends: CloudConfig: Preview: SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources-preview) - ServiceConnection: azure-sdk-tests - SubscriptionConfigurationFilePaths: - - sdk/storage/storage-preview-public-msft.json + ServiceConnection: azure-sdk-tests-preview PrivatePreview: SubscriptionConfiguration: $(sub-config-storage-test-resources) Clouds: Preview From b378d9d2a6103f2601627463a42608c24b01db31 Mon Sep 17 00:00:00 2001 From: Amanda Nguyen <48961492+amnguye@users.noreply.github.com> Date: Tue, 16 Jul 2024 13:39:12 -0700 Subject: [PATCH 102/144] Bumped Storage, Blobs, and Queues package dependency version (#45016) --- eng/Packages.Data.props | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index a11d616993155..52ff0f57b1934 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -125,9 +125,9 @@ - - - + + + From 1b61b172157308884119a0f141ea5765c8ae9bf4 Mon Sep 17 00:00:00 2001 From: Amanda Nguyen <48961492+amnguye@users.noreply.github.com> Date: Tue, 16 Jul 2024 13:41:42 -0700 Subject: [PATCH 103/144] [Storage] [DataMovement] Improve checking on part completion for pause/stop/completion status (#45038) * WIP * Make CI happy * Revert "Make CI happy" This reverts commit a7e80cfc27850b62075ea05c22475080ed79b7f4. * WIP * Cleanup * More cleanup --- .../src/JobPartInternal.cs | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/sdk/storage/Azure.Storage.DataMovement/src/JobPartInternal.cs b/sdk/storage/Azure.Storage.DataMovement/src/JobPartInternal.cs index 979268acf8492..d0ca5e0d5a64f 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/JobPartInternal.cs +++ b/sdk/storage/Azure.Storage.DataMovement/src/JobPartInternal.cs @@ -127,8 +127,11 @@ internal abstract class JobPartInternal /// public SyncAsyncEventHandler SingleTransferCompletedEventHandler { get; internal set; } - private List> _chunkTasks; - private List> _chunkTaskSources; + /// + /// Represents the current state of the job part. + /// + private int _currentChunkCount; + private int _completedChunkCount; protected bool _queueingTasks = false; /// @@ -195,8 +198,8 @@ internal JobPartInternal( StorageResourceCreationPreference.FailIfExists : createMode; Length = length; - _chunkTasks = new List>(); - _chunkTaskSources = new List>(); + _currentChunkCount = 0; + _completedChunkCount = 0; } public void SetQueueChunkDelegate(QueueChunkDelegate chunkDelegate) @@ -212,26 +215,20 @@ public void SetQueueChunkDelegate(QueueChunkDelegate chunkDelegate) /// public async Task QueueChunkToChannelAsync(Func chunkTask) { - // Attach TaskCompletionSource - TaskCompletionSource chunkCompleted = new TaskCompletionSource( - false, - TaskCreationOptions.RunContinuationsAsynchronously); - _chunkTaskSources.Add(chunkCompleted); - _chunkTasks.Add(chunkCompleted.Task); - + Interlocked.Increment(ref _currentChunkCount); await QueueChunk( async () => { try { await Task.Run(chunkTask).ConfigureAwait(false); - chunkCompleted.SetResult(true); - await CheckAndUpdateCancellationStateAsync().ConfigureAwait(false); } catch (Exception ex) { await InvokeFailedArg(ex).ConfigureAwait(false); } + Interlocked.Increment(ref _completedChunkCount); + await CheckAndUpdateCancellationStateAsync().ConfigureAwait(false); }).ConfigureAwait(false); } @@ -570,7 +567,7 @@ internal async Task CheckAndUpdateCancellationStateAsync() if (JobPartStatus.State == DataTransferState.Pausing || JobPartStatus.State == DataTransferState.Stopping) { - if (!_queueingTasks && _chunkTasks.All((Task task) => (task.IsCompleted))) + if (!_queueingTasks && _currentChunkCount == _completedChunkCount) { DataTransferState newState = JobPartStatus.State == DataTransferState.Pausing ? DataTransferState.Paused : From 3dcd049fba8b4c834a0023eb3997c5ce02bb0a23 Mon Sep 17 00:00:00 2001 From: Amanda Nguyen <48961492+amnguye@users.noreply.github.com> Date: Tue, 16 Jul 2024 13:42:04 -0700 Subject: [PATCH 104/144] Updated Changelog for DataMovement July Release (#45040) --- .../CHANGELOG.md | 16 +++++++++----- .../CHANGELOG.md | 21 ++++++++++++++----- .../Azure.Storage.DataMovement/CHANGELOG.md | 6 +----- 3 files changed, 28 insertions(+), 15 deletions(-) diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/CHANGELOG.md b/sdk/storage/Azure.Storage.DataMovement.Blobs/CHANGELOG.md index b77709e121ad7..bc55ab2ec7e6d 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/CHANGELOG.md +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/CHANGELOG.md @@ -1,14 +1,20 @@ # Release History -## 12.0.0-beta.5 (Unreleased) +## 12.0.0-beta.5 (2024-07-16) ### Features Added +- Added ability to preserve Blob Metadata and properties on Blob to Blob copy. +- Added ability to preserve Blob Type on Blob Container to Blob Container copy. ### Breaking Changes - -### Bugs Fixed - -### Other Changes +- Changed `BlobStorageResourceOptions` members to be wrapped by `DataTransferProperty` type to allow preserving. The following members are affected: + - `BlobStorageResourceOptions.ContentType` + - `BlobStorageResourceOptions.ContentLanguage` + - `BlobStorageResourceOptions.ContentEncoding` + - `BlobStorageResourceOptions.ContentDisposition` + - `BlobStorageResourceOptions.CacheControl` + - `BlobStorageResourceOptions.Metadata` +- Changed `BlobStorageResourceContainerOptions.BlobType` from `Azure.Storage.Blobs.Models.BlobType` to `DataTransferProperty` ## 12.0.0-beta.4 (2023-12-05) diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/CHANGELOG.md b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/CHANGELOG.md index 9c262aafcf95f..7e53f808f734e 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/CHANGELOG.md +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/CHANGELOG.md @@ -1,16 +1,27 @@ # Release History -## 12.0.0-beta.2 (Unreleased) +## 12.0.0-beta.2 (2024-07-16) ### Features Added - Improved upload and copying chunking strategy for large Share Files to improve speed +- Added ability to preserve Share File Metadata, properties, and Permissions on Share File to Share File copy. ### Breaking Changes - Removed `DownloadTransferValidationOptions` and `UploadTransferValidationOptions` from `ShareFileStorageResourceOptions`. - -### Bugs Fixed - -### Other Changes + - Removed `ShareFileStorageResourceOptions.SmbProperties`, use the following instead: + - `ShareFileStorageResourceOptions.FilePermissionKey` + - `ShareFileStorageResourceOptions.FileAttributes` + - `ShareFileStorageResourceOptions.FileCreatedOn` + - `ShareFileStorageResourceOptions.FileLastWrittenOn` + - `ShareFileStorageResourceOptions.FileChangedOn` + - Removed `ShareFileStorageResourceOptions.HttpHeaders`, use the following instead: + - `ShareFileStorageResourceOptions.ContentType` + - `ShareFileStorageResourceOptions.ContentLanguage` + - `ShareFileStorageResourceOptions.ContentEncoding` + - `ShareFileStorageResourceOptions.ContentDisposition` + - `ShareFileStorageResourceOptions.CacheControl` + - Changed `ShareFileStorageResourceOptions.FileMetadata` and `DirectoryMetadata` to be wrapped by `DataTransferProperty` type to allow preserving. + - Removed `ShareFileStorageResourceOptions.FilePermissionKey` and `FilePermissions` use `ShareFileStorageResourceOptions.FilePermissions` instead.` ## 12.0.0-beta.1 (2023-12-05) diff --git a/sdk/storage/Azure.Storage.DataMovement/CHANGELOG.md b/sdk/storage/Azure.Storage.DataMovement/CHANGELOG.md index 2f1f3fe4ebc15..051ce16e2c9de 100644 --- a/sdk/storage/Azure.Storage.DataMovement/CHANGELOG.md +++ b/sdk/storage/Azure.Storage.DataMovement/CHANGELOG.md @@ -1,8 +1,6 @@ # Release History -## 12.0.0-beta.5 (Unreleased) - -### Features Added +## 12.0.0-beta.5 (2024-07-16) ### Breaking Changes - Renamed `StorageResourceProperties` to `StorageResourceItemProperties` @@ -14,8 +12,6 @@ ### Bugs Fixed - Fixed a bug where `ChannelClosedException` could occur and be sent as an event to `ItemTransferFailed` when there was a failure during a transfer. -### Other Changes - ## 12.0.0-beta.4 (2023-12-05) ### Features Added From 2a9cffa4c592e985551393f760e8b761ddba29ba Mon Sep 17 00:00:00 2001 From: Timothy Mothra Date: Tue, 16 Jul 2024 14:01:12 -0700 Subject: [PATCH 105/144] [AzureMonitorDistro] prep distro 1.3.0-beta.1 (#44991) * prep distro 1.3.0-beta.1 * change to package reference --- eng/Packages.Data.props | 2 +- .../Azure.Monitor.OpenTelemetry.AspNetCore/CHANGELOG.md | 6 +----- .../src/Azure.Monitor.OpenTelemetry.AspNetCore.csproj | 4 ++-- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index 52ff0f57b1934..243f386cc0228 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -119,7 +119,7 @@ - + diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/CHANGELOG.md b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/CHANGELOG.md index 1bf35679963d8..a380513489b4b 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/CHANGELOG.md +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/CHANGELOG.md @@ -1,10 +1,6 @@ # Release History -## 1.3.0-beta.1 (Unreleased) - -### Features Added - -### Breaking Changes +## 1.3.0-beta.1 (2024-07-12) ### Bugs Fixed diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/Azure.Monitor.OpenTelemetry.AspNetCore.csproj b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/Azure.Monitor.OpenTelemetry.AspNetCore.csproj index bb2fac3efb9ea..b30fa13910e06 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/Azure.Monitor.OpenTelemetry.AspNetCore.csproj +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/Azure.Monitor.OpenTelemetry.AspNetCore.csproj @@ -23,10 +23,10 @@ - + - + From 3c581b37c988a5bb1db7e3719beeb25081a40395 Mon Sep 17 00:00:00 2001 From: Amanda Nguyen <48961492+amnguye@users.noreply.github.com> Date: Tue, 16 Jul 2024 15:50:37 -0700 Subject: [PATCH 106/144] Changed DataMovement Blobs and File Shares to use package dependency, Added File Shares to packages.data.props (#45042) --- eng/Packages.Data.props | 1 + .../src/Azure.Storage.DataMovement.Blobs.csproj | 4 ++-- .../src/Azure.Storage.DataMovement.Files.Shares.csproj | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index 243f386cc0228..bbc8f05f91064 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -128,6 +128,7 @@ + diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/src/Azure.Storage.DataMovement.Blobs.csproj b/sdk/storage/Azure.Storage.DataMovement.Blobs/src/Azure.Storage.DataMovement.Blobs.csproj index d0ec61ade002b..ffe22148d4c27 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/src/Azure.Storage.DataMovement.Blobs.csproj +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/src/Azure.Storage.DataMovement.Blobs.csproj @@ -19,8 +19,8 @@ - - + + diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/Azure.Storage.DataMovement.Files.Shares.csproj b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/Azure.Storage.DataMovement.Files.Shares.csproj index d3afcbe79c9ee..92f8eac3daf10 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/Azure.Storage.DataMovement.Files.Shares.csproj +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/Azure.Storage.DataMovement.Files.Shares.csproj @@ -20,8 +20,8 @@ - - + + From 4e073bb0d545288c5b1420203756fca441bcd427 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 16 Jul 2024 19:41:21 -0400 Subject: [PATCH 107/144] Increment package version after release of Azure.Monitor.OpenTelemetry.AspNetCore (#45043) --- .../CHANGELOG.md | 10 ++++++++++ .../src/Azure.Monitor.OpenTelemetry.AspNetCore.csproj | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/CHANGELOG.md b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/CHANGELOG.md index a380513489b4b..ef424e84bb437 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/CHANGELOG.md +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.3.0-beta.2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.3.0-beta.1 (2024-07-12) ### Bugs Fixed diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/Azure.Monitor.OpenTelemetry.AspNetCore.csproj b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/Azure.Monitor.OpenTelemetry.AspNetCore.csproj index b30fa13910e06..2474f074dc023 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/Azure.Monitor.OpenTelemetry.AspNetCore.csproj +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/src/Azure.Monitor.OpenTelemetry.AspNetCore.csproj @@ -2,7 +2,7 @@ An OpenTelemetry .NET distro that exports to Azure Monitor AzureMonitor OpenTelemetry ASP.NET Core Distro - 1.3.0-beta.1 + 1.3.0-beta.2 1.2.0 Azure Monitor OpenTelemetry Exporter Distro ApplicationInsights From 8f514a8f3810078aaf97e32f9d2691cd17b2b0e2 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 16 Jul 2024 22:29:04 -0400 Subject: [PATCH 108/144] Increment version for storage releases (#45045) --- .../Azure.Storage.DataMovement.Blobs/CHANGELOG.md | 10 ++++++++++ .../src/Azure.Storage.DataMovement.Blobs.csproj | 4 ++-- .../CHANGELOG.md | 10 ++++++++++ .../src/Azure.Storage.DataMovement.Files.Shares.csproj | 2 +- sdk/storage/Azure.Storage.DataMovement/CHANGELOG.md | 10 ++++++++++ .../src/Azure.Storage.DataMovement.csproj | 2 +- 6 files changed, 34 insertions(+), 4 deletions(-) diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/CHANGELOG.md b/sdk/storage/Azure.Storage.DataMovement.Blobs/CHANGELOG.md index bc55ab2ec7e6d..b8c13a528fa6a 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/CHANGELOG.md +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 12.0.0-beta.6 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 12.0.0-beta.5 (2024-07-16) ### Features Added diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/src/Azure.Storage.DataMovement.Blobs.csproj b/sdk/storage/Azure.Storage.DataMovement.Blobs/src/Azure.Storage.DataMovement.Blobs.csproj index ffe22148d4c27..6098dcd8ba33d 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/src/Azure.Storage.DataMovement.Blobs.csproj +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/src/Azure.Storage.DataMovement.Blobs.csproj @@ -1,10 +1,10 @@ - + $(RequiredTargetFrameworks);net6.0 Microsoft Azure.Storage.DataMovement.Blobs client library - 12.0.0-beta.5 + 12.0.0-beta.6 BlobDataMovementSDK;$(DefineConstants) Microsoft Azure Storage DataMovement, DataMovement, Microsoft, Azure, StorageScalable, azureofficial diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/CHANGELOG.md b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/CHANGELOG.md index 7e53f808f734e..664ec5a9186e9 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/CHANGELOG.md +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 12.0.0-beta.3 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 12.0.0-beta.2 (2024-07-16) ### Features Added diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/Azure.Storage.DataMovement.Files.Shares.csproj b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/Azure.Storage.DataMovement.Files.Shares.csproj index 92f8eac3daf10..df9fee2556b5e 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/Azure.Storage.DataMovement.Files.Shares.csproj +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/Azure.Storage.DataMovement.Files.Shares.csproj @@ -5,7 +5,7 @@ Microsoft Azure.Storage.DataMovement.Files.Shares client library - 12.0.0-beta.2 + 12.0.0-beta.3 ShareDataMovementSDK;$(DefineConstants) Microsoft Azure Storage DataMovement, DataMovement, Microsoft, Azure, StorageScalable, azureofficial diff --git a/sdk/storage/Azure.Storage.DataMovement/CHANGELOG.md b/sdk/storage/Azure.Storage.DataMovement/CHANGELOG.md index 051ce16e2c9de..dc6c809afb7d1 100644 --- a/sdk/storage/Azure.Storage.DataMovement/CHANGELOG.md +++ b/sdk/storage/Azure.Storage.DataMovement/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 12.0.0-beta.6 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 12.0.0-beta.5 (2024-07-16) ### Breaking Changes diff --git a/sdk/storage/Azure.Storage.DataMovement/src/Azure.Storage.DataMovement.csproj b/sdk/storage/Azure.Storage.DataMovement/src/Azure.Storage.DataMovement.csproj index 145f83a334020..5aaf548493b15 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/Azure.Storage.DataMovement.csproj +++ b/sdk/storage/Azure.Storage.DataMovement/src/Azure.Storage.DataMovement.csproj @@ -4,7 +4,7 @@ Microsoft Azure.Storage.DataMovement client library - 12.0.0-beta.5 + 12.0.0-beta.6 DataMovementSDK;$(DefineConstants) Microsoft Azure Storage Common DataMovement, Microsoft, Azure, StorageScalable, azureofficial From 374ca1cc5f7034b8d3e3e157b5f7cfc8eeb01bab Mon Sep 17 00:00:00 2001 From: Amanda Nguyen <48961492+amnguye@users.noreply.github.com> Date: Wed, 17 Jul 2024 08:04:41 -0700 Subject: [PATCH 109/144] [Storage] [Webjobs Extension] Updated changelog to prepare for WebJobs Storage Extension release (#45041) --- .../CHANGELOG.md | 4 ++-- .../Microsoft.Azure.WebJobs.Extensions.Storage.Blobs.csproj | 2 +- .../CHANGELOG.md | 2 +- .../Microsoft.Azure.WebJobs.Extensions.Storage.Queues.csproj | 2 +- .../Microsoft.Azure.WebJobs.Extensions.Storage/CHANGELOG.md | 4 +++- .../src/Microsoft.Azure.WebJobs.Extensions.Storage.csproj | 2 +- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/CHANGELOG.md b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/CHANGELOG.md index cc4de68fcd802..fc00db6eb6388 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/CHANGELOG.md +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 5.4.0-beta.1 (Unreleased) +## 5.3.1 (2024-07-17) ### Bugs Fixed - Rely on PeekMessagesAsync when calculating message queue length @@ -9,7 +9,7 @@ ## 5.3.0 (2024-04-18) - Includes all features from 5.3.0-beta.1. -- Bumped Azure.Identity dependency to 1.11.1 to resolve secruity vulnerability. +- Bumped Azure.Identity dependency to 1.11.1 to resolve security vulnerability. ## 5.3.0-beta.1 (2024-04-15) - This release contains bug fixes to improve quality. diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs.csproj b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs.csproj index 703ce870390f1..9e207395e24cf 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs.csproj +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs.csproj @@ -3,7 +3,7 @@ $(RequiredTargetFrameworks) - 5.4.0-beta.1 + 5.3.1 5.3.0 This extension adds bindings for Storage diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/CHANGELOG.md b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/CHANGELOG.md index 0dfcb541ea1ae..ac342da08c236 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/CHANGELOG.md +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 5.4.0-beta.1 (Unreleased) +## 5.3.1 (2024-07-17) ### Bugs Fixed - Rely on PeekMessagesAsync when calculating message queue length diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/Microsoft.Azure.WebJobs.Extensions.Storage.Queues.csproj b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/Microsoft.Azure.WebJobs.Extensions.Storage.Queues.csproj index 03cee10fdcf11..ee665f3767b51 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/Microsoft.Azure.WebJobs.Extensions.Storage.Queues.csproj +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/Microsoft.Azure.WebJobs.Extensions.Storage.Queues.csproj @@ -3,7 +3,7 @@ $(RequiredTargetFrameworks) - 5.4.0-beta.1 + 5.3.1 5.3.0 This extension adds bindings for Storage diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage/CHANGELOG.md b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage/CHANGELOG.md index c39a05e7be2bd..665929906e39c 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage/CHANGELOG.md +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 5.4.0-beta.1 (Unreleased) +## 5.3.1 (2024-07-17) + +### Other Changes Please refer to [`Microsoft.Azure.WebJobs.Extension.Storage.Blobs`](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/CHANGELOG.md) and [`Microsoft.Azure.WebJobs.Extension.Storage.Queues`](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/CHANGELOG.md) for detailed list of changes. ## 5.3.0 (2024-04-18) diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage/src/Microsoft.Azure.WebJobs.Extensions.Storage.csproj b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage/src/Microsoft.Azure.WebJobs.Extensions.Storage.csproj index 8f33123c86e9f..f100506c5f3ff 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage/src/Microsoft.Azure.WebJobs.Extensions.Storage.csproj +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage/src/Microsoft.Azure.WebJobs.Extensions.Storage.csproj @@ -3,7 +3,7 @@ $(RequiredTargetFrameworks) - 5.4.0-beta.1 + 5.3.1 5.3.0 false From b0ca6d6ede0eea345f1327551467c8fde11fe186 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 17 Jul 2024 12:35:17 -0400 Subject: [PATCH 110/144] Increment version for storage releases (#45054) --- .../CHANGELOG.md | 10 ++++++++++ ...osoft.Azure.WebJobs.Extensions.Storage.Blobs.csproj | 4 ++-- .../CHANGELOG.md | 10 ++++++++++ ...soft.Azure.WebJobs.Extensions.Storage.Queues.csproj | 4 ++-- .../CHANGELOG.md | 10 ++++++++++ .../Microsoft.Azure.WebJobs.Extensions.Storage.csproj | 4 ++-- 6 files changed, 36 insertions(+), 6 deletions(-) diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/CHANGELOG.md b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/CHANGELOG.md index fc00db6eb6388..df9dffe7f5df6 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/CHANGELOG.md +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 5.4.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 5.3.1 (2024-07-17) ### Bugs Fixed diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs.csproj b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs.csproj index 9e207395e24cf..d0c581bb81a05 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs.csproj +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs.csproj @@ -3,9 +3,9 @@ $(RequiredTargetFrameworks) - 5.3.1 + 5.4.0-beta.1 - 5.3.0 + 5.3.1 This extension adds bindings for Storage $(NoWarn);IDT002;IDT003 diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/CHANGELOG.md b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/CHANGELOG.md index ac342da08c236..f537e8531f2f9 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/CHANGELOG.md +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 5.4.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 5.3.1 (2024-07-17) ### Bugs Fixed diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/Microsoft.Azure.WebJobs.Extensions.Storage.Queues.csproj b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/Microsoft.Azure.WebJobs.Extensions.Storage.Queues.csproj index ee665f3767b51..a90f4ae411692 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/Microsoft.Azure.WebJobs.Extensions.Storage.Queues.csproj +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Queues/src/Microsoft.Azure.WebJobs.Extensions.Storage.Queues.csproj @@ -3,9 +3,9 @@ $(RequiredTargetFrameworks) - 5.3.1 + 5.4.0-beta.1 - 5.3.0 + 5.3.1 This extension adds bindings for Storage $(NoWarn);IDT002 diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage/CHANGELOG.md b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage/CHANGELOG.md index 665929906e39c..5dc386f0929e1 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage/CHANGELOG.md +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 5.4.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 5.3.1 (2024-07-17) ### Other Changes diff --git a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage/src/Microsoft.Azure.WebJobs.Extensions.Storage.csproj b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage/src/Microsoft.Azure.WebJobs.Extensions.Storage.csproj index f100506c5f3ff..ea9b2c37138a8 100644 --- a/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage/src/Microsoft.Azure.WebJobs.Extensions.Storage.csproj +++ b/sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage/src/Microsoft.Azure.WebJobs.Extensions.Storage.csproj @@ -3,9 +3,9 @@ $(RequiredTargetFrameworks) - 5.3.1 + 5.4.0-beta.1 - 5.3.0 + 5.3.1 false This extension adds bindings for Storage From 0ac2d02bd611e02b83717b4ef3a865f29bc8ffe6 Mon Sep 17 00:00:00 2001 From: subhra231 Date: Wed, 17 Jul 2024 10:37:32 -0700 Subject: [PATCH 111/144] Update Changelog and readme files to include --prerelease (#45047) * Update Changelog File to include release date. * Update Readme to add --prerelease option --- .../CHANGELOG.md | 11 ++--------- .../Microsoft.CoreWCF.Azure.StorageQueues/README.md | 2 +- .../Microsoft.WCF.Azure.StorageQueues/CHANGELOG.md | 11 ++--------- .../Microsoft.WCF.Azure.StorageQueues/README.md | 2 +- 4 files changed, 6 insertions(+), 20 deletions(-) diff --git a/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/CHANGELOG.md b/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/CHANGELOG.md index cf585f38e7358..4b1e50f4acaa8 100644 --- a/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/CHANGELOG.md +++ b/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/CHANGELOG.md @@ -1,14 +1,7 @@ # Release History -## 1.0.0-beta.1 (Unreleased) +## 1.0.0-beta.1 (2024-07-17) ### Features Added -- Added support to CoreWCF service for Azure Queue Storage to receive requests from clients as a modern replacement to using MSMQ. - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - +- Added support to CoreWCF service for Azure Queue Storage to receive requests from clients as a modern replacement to using MSMQ. \ No newline at end of file diff --git a/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/README.md b/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/README.md index 290bc714b4240..23a257a087a5e 100644 --- a/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/README.md +++ b/sdk/extension-wcf/Microsoft.CoreWCF.Azure.StorageQueues/README.md @@ -9,7 +9,7 @@ CoreWCF Azure Queue Storage is the service side library that will help existing Install the Microsoft.CoreWCF.Azure.StorageQueues library for .NET with [NuGet][nuget]: ```dotnetcli -dotnet add package Microsoft.CoreWCF.Azure.StorageQueues +dotnet add package Microsoft.CoreWCF.Azure.StorageQueues --prerelease ``` ### Prerequisites diff --git a/sdk/extension-wcf/Microsoft.WCF.Azure.StorageQueues/CHANGELOG.md b/sdk/extension-wcf/Microsoft.WCF.Azure.StorageQueues/CHANGELOG.md index 4d79c9abc888e..444ef95ae849d 100644 --- a/sdk/extension-wcf/Microsoft.WCF.Azure.StorageQueues/CHANGELOG.md +++ b/sdk/extension-wcf/Microsoft.WCF.Azure.StorageQueues/CHANGELOG.md @@ -1,14 +1,7 @@ # Release History -## 1.0.0-beta.1 (Unreleased) +## 1.0.0-beta.1 (2024-07-17) ### Features Added -- Added support to enable WCF clients to be able to send requests to a CoreWCF service which uses Azure Queue Storage as a transport as a modern replacement to using MSMQ. - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - +- Added support to enable WCF clients to be able to send requests to a CoreWCF service which uses Azure Queue Storage as a transport as a modern replacement to using MSMQ. \ No newline at end of file diff --git a/sdk/extension-wcf/Microsoft.WCF.Azure.StorageQueues/README.md b/sdk/extension-wcf/Microsoft.WCF.Azure.StorageQueues/README.md index bddfefdd4849a..86c5b5b46aa76 100644 --- a/sdk/extension-wcf/Microsoft.WCF.Azure.StorageQueues/README.md +++ b/sdk/extension-wcf/Microsoft.WCF.Azure.StorageQueues/README.md @@ -9,7 +9,7 @@ WCF Azure Queue Storage client is the client side library that will enable WCF c Install the Microsoft.WCF.Azure.StorageQueues.Client library for .NET with [NuGet][nuget]: ```dotnetcli -dotnet add package Microsoft.WCF.Azure.StorageQueues.Client +dotnet add package Microsoft.WCF.Azure.StorageQueues.Client --prerelease ``` ### Prerequisites From 8571d3cee79f104b4445a5e588b92deb17d7d48a Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 17 Jul 2024 15:36:23 -0400 Subject: [PATCH 112/144] Increment package version after release of Azure.Messaging.EventGrid (#45056) --- sdk/eventgrid/Azure.Messaging.EventGrid/CHANGELOG.md | 10 ++++++++++ .../src/Azure.Messaging.EventGrid.csproj | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/CHANGELOG.md b/sdk/eventgrid/Azure.Messaging.EventGrid/CHANGELOG.md index 08a8cccf37cb5..952bebd6a3220 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/CHANGELOG.md +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 4.25.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 4.24.1 (2024-07-16) ### Bugs Fixed diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Azure.Messaging.EventGrid.csproj b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Azure.Messaging.EventGrid.csproj index 8eb6a0f9713f7..2d3d6f8ea6a63 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Azure.Messaging.EventGrid.csproj +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Azure.Messaging.EventGrid.csproj @@ -2,9 +2,9 @@ This library can be used to publish events to Azure Event Grid and to consume events delivered by EventGrid. It also defines the event schemas for the events published to EventGrid by various Azure services. Microsoft Azure.Messaging.EventGrid client library - 4.24.1 + 4.25.0-beta.1 - 4.24.0 + 4.24.1 Microsoft Azure EventGrid;Event Grid;Event Grid Publishing; true $(RequiredTargetFrameworks) From 65da6f2116b041f052d286d740d21a65510ab396 Mon Sep 17 00:00:00 2001 From: ShivangiReja <45216704+ShivangiReja@users.noreply.github.com> Date: Wed, 17 Jul 2024 13:13:32 -0700 Subject: [PATCH 113/144] [Search] GA Features for API Version 2024-07-01 (#44485) * [Search] GA Features for API Version 2024-07-01 --- .../Azure.Search.Documents/CHANGELOG.md | 36 +- .../Azure.Search.Documents.netstandard2.0.cs | 634 +++--------------- sdk/search/Azure.Search.Documents/assets.json | 2 +- .../samples/Sample04_FieldBuilderIgnore.md | 1 - ...e07_VectorSearch_UsingReducedEmbeddings.md | 8 +- ...7_VectorSearch_UsingSemanticHybridQuery.md | 1 - ...VectorSearch_UsingVectorizableTextQuery.md | 8 +- .../samples/Sample08_SemanticSearch.md | 2 - .../src/Azure.Search.Documents.csproj | 2 +- .../Batching/SearchIndexingBufferedSender.cs | 6 +- .../src/Generated/AliasesRestClient.cs | 413 ------------ .../src/Generated/DataSourcesRestClient.cs | 18 +- .../src/Generated/DocumentsRestClient.cs | 2 +- .../src/Generated/IndexersRestClient.cs | 100 +-- .../src/Generated/IndexesRestClient.cs | 2 +- ...IServicesVisionParameters.Serialization.cs | 112 ---- .../Models/AIServicesVisionParameters.cs | 57 -- ...IServicesVisionVectorizer.Serialization.cs | 80 --- .../Models/AIServicesVisionVectorizer.cs | 38 -- .../Models/AIStudioModelCatalogName.cs | 63 -- .../AnalyzeTextOptions.Serialization.cs | 5 - .../Generated/Models/AnalyzeTextOptions.cs | 12 +- ...MachineLearningParameters.Serialization.cs | 183 ----- .../Models/AzureMachineLearningParameters.cs | 52 -- ...AzureMachineLearningSkill.Serialization.cs | 278 -------- .../Models/AzureMachineLearningSkill.cs | 44 -- ...MachineLearningVectorizer.Serialization.cs | 80 --- .../Models/AzureMachineLearningVectorizer.cs | 38 -- ...AzureOpenAIEmbeddingSkill.Serialization.cs | 10 +- .../Models/AzureOpenAIEmbeddingSkill.cs | 14 +- .../Generated/Models/AzureOpenAIModelName.cs | 3 - .../AzureOpenAIVectorizer.Serialization.cs | 10 +- .../Generated/Models/AzureOpenAIVectorizer.cs | 18 +- ...enAIVectorizerParameters.Serialization.cs} | 20 +- ....cs => AzureOpenAIVectorizerParameters.cs} | 22 +- ...ryQuantizationCompression.Serialization.cs | 103 +++ .../Models/BinaryQuantizationCompression.cs | 35 + .../Models/CustomNormalizer.Serialization.cs | 116 ---- .../src/Generated/Models/CustomNormalizer.cs | 45 -- .../src/Generated/Models/CustomVectorizer.cs | 38 -- ...taDeletionDetectionPolicy.Serialization.cs | 1 - .../Models/DataDeletionDetectionPolicy.cs | 2 +- .../Models/DocumentDebugInfo.Serialization.cs | 44 -- .../src/Generated/Models/DocumentDebugInfo.cs | 28 - .../Models/HybridCountAndFacetMode.cs | 51 -- .../Models/HybridSearch.Serialization.cs | 79 --- .../src/Generated/Models/HybridSearch.cs | 32 - .../IndexerExecutionResult.Serialization.cs | 23 - .../Models/IndexerExecutionResult.cs | 10 +- .../Models/IndexerExecutionStatusDetail.cs | 48 -- .../Models/IndexerState.Serialization.cs | 106 --- .../src/Generated/Models/IndexerState.cs | 27 - .../src/Generated/Models/IndexingMode.cs | 46 -- .../Models/IndexingParametersConfiguration.cs | 4 +- .../Models/KnowledgeStore.Serialization.cs | 40 +- .../src/Generated/Models/KnowledgeStore.cs | 18 +- .../Generated/Models/LexicalAnalyzerName.cs | 2 +- .../Models/LexicalNormalizer.Serialization.cs | 58 -- .../src/Generated/Models/LexicalNormalizer.cs | 43 -- .../Generated/Models/LexicalNormalizerName.cs | 60 -- .../Models/ListAliasesResult.Serialization.cs | 46 -- .../src/Generated/Models/ListAliasesResult.cs | 33 - ...teDeletionDetectionPolicy.Serialization.cs | 57 -- ...veBlobSoftDeleteDeletionDetectionPolicy.cs | 26 - .../{LineEnding.cs => OcrLineEnding.cs} | 30 +- .../Models/OcrSkill.Serialization.cs | 4 +- .../src/Generated/Models/OcrSkill.cs | 4 +- .../Generated/Models/QueryCaptionResult.cs | 2 +- .../src/Generated/Models/QueryDebugMode.cs | 51 -- .../src/Generated/Models/QueryLanguage.cs | 261 ------- ...sultDocumentRerankerInput.Serialization.cs | 52 -- .../QueryResultDocumentRerankerInput.cs | 36 - ...sultDocumentSemanticField.Serialization.cs | 50 -- .../QueryResultDocumentSemanticField.cs | 32 - .../src/Generated/Models/QuerySpellerType.cs | 51 -- .../ResetDocumentOptions.Serialization.cs | 49 -- .../Generated/Models/ResetDocumentOptions.cs | 34 - .../ResetSkillsOptions.Serialization.cs | 39 -- .../Generated/Models/ResetSkillsOptions.cs | 31 - ...rQuantizationCompression.Serialization.cs} | 12 +- ...on.cs => ScalarQuantizationCompression.cs} | 18 +- ...larQuantizationParameters.Serialization.cs | 4 +- .../Models/ScalarQuantizationParameters.cs | 4 +- .../Models/SearchAlias.Serialization.cs | 87 --- .../src/Generated/Models/SearchAlias.cs | 46 -- .../SearchDocumentsResult.Serialization.cs | 40 +- .../Generated/Models/SearchDocumentsResult.cs | 18 +- .../Models/SearchField.Serialization.cs | 24 - .../src/Generated/Models/SearchField.cs | 4 +- .../Models/SearchIndex.Serialization.cs | 26 - .../src/Generated/Models/SearchIndex.cs | 8 +- .../Models/SearchIndexer.Serialization.cs | 26 +- .../src/Generated/Models/SearchIndexer.cs | 6 +- .../SearchIndexerCache.Serialization.cs | 106 --- .../Generated/Models/SearchIndexerCache.cs | 41 -- ...dexerDataSourceConnection.Serialization.cs | 24 - .../SearchIndexerDataSourceConnection.cs | 18 +- .../Models/SearchIndexerDataSourceType.cs | 3 - ...rDataUserAssignedIdentity.Serialization.cs | 4 +- .../SearchIndexerDataUserAssignedIdentity.cs | 7 +- ...chIndexerIndexProjection.Serialization.cs} | 10 +- ...ons.cs => SearchIndexerIndexProjection.cs} | 10 +- ...rKnowledgeStoreParameters.Serialization.cs | 74 -- .../SearchIndexerKnowledgeStoreParameters.cs | 10 +- .../SearchIndexerSkill.Serialization.cs | 2 - .../Generated/Models/SearchIndexerSkill.cs | 2 +- .../SearchIndexerSkillset.Serialization.cs | 8 +- .../Generated/Models/SearchIndexerSkillset.cs | 12 +- .../Models/SearchOptions.Serialization.cs | 208 ++---- .../src/Generated/Models/SearchOptions.cs | 2 - ...archResourceEncryptionKey.Serialization.cs | 25 +- .../Models/SearchResourceEncryptionKey.cs | 14 +- .../Models/SearchResult.Serialization.cs | 24 +- .../src/Generated/Models/SearchResult.cs | 7 +- .../SearchScoreThreshold.Serialization.cs | 65 -- .../Generated/Models/SearchScoreThreshold.cs | 33 - .../SearchServiceCounters.Serialization.cs | 7 - .../Generated/Models/SearchServiceCounters.cs | 9 +- .../Models/SemanticDebugInfo.Serialization.cs | 85 --- .../src/Generated/Models/SemanticDebugInfo.cs | 44 -- .../Generated/Models/SemanticErrorReason.cs | 2 +- .../Generated/Models/SemanticFieldState.cs | 54 -- .../src/Generated/Models/TokenFilterName.cs | 2 +- .../UnknownLexicalNormalizer.Serialization.cs | 66 -- .../Models/UnknownLexicalNormalizer.cs | 23 - .../UnknownVectorQuery.Serialization.cs | 18 +- .../Generated/Models/UnknownVectorQuery.cs | 7 +- ...nVectorSearchCompression.Serialization.cs} | 14 +- ...n.cs => UnknownVectorSearchCompression.cs} | 10 +- ...ownVectorSearchVectorizer.Serialization.cs | 2 +- .../Models/UnknownVectorSearchVectorizer.cs | 4 +- .../UnknownVectorThreshold.Serialization.cs | 57 -- .../Models/UnknownVectorThreshold.cs | 20 - .../Models/VectorQuery.Serialization.cs | 7 - .../src/Generated/Models/VectorQuery.cs | 16 +- .../src/Generated/Models/VectorQueryKind.cs | 6 - .../Models/VectorSearch.Serialization.cs | 8 +- .../src/Generated/Models/VectorSearch.cs | 18 +- ... VectorSearchCompression.Serialization.cs} | 15 +- ...guration.cs => VectorSearchCompression.cs} | 29 +- .../Models/VectorSearchCompressionKind.cs | 3 + ...pe.cs => VectorSearchCompressionTarget.cs} | 24 +- .../VectorSearchProfile.Serialization.cs | 8 +- .../Generated/Models/VectorSearchProfile.cs | 16 +- .../VectorSearchVectorizer.Serialization.cs | 6 +- .../Models/VectorSearchVectorizer.cs | 21 +- .../Models/VectorSearchVectorizerKind.cs | 6 - ...VectorSimilarityThreshold.Serialization.cs | 65 -- .../Models/VectorSimilarityThreshold.cs | 33 - .../Models/VectorThreshold.Serialization.cs | 56 -- .../src/Generated/Models/VectorThreshold.cs | 32 - .../Generated/Models/VectorThresholdKind.cs | 51 -- ...torizableImageBinaryQuery.Serialization.cs | 162 ----- .../Models/VectorizableImageBinaryQuery.cs | 41 -- ...VectorizableImageUrlQuery.Serialization.cs | 167 ----- .../Models/VectorizableImageUrlQuery.cs | 43 -- .../VectorizableTextQuery.Serialization.cs | 16 - .../Generated/Models/VectorizableTextQuery.cs | 7 +- .../Models/VectorizedQuery.Serialization.cs | 16 - .../src/Generated/Models/VectorizedQuery.cs | 7 +- .../VisionVectorizeSkill.Serialization.cs | 154 ----- .../Generated/Models/VisionVectorizeSkill.cs | 47 -- .../Models/WebApiSkill.Serialization.cs | 113 ++-- .../src/Generated/Models/WebApiSkill.cs | 44 +- ...n.cs => WebApiVectorizer.Serialization.cs} | 20 +- .../src/Generated/Models/WebApiVectorizer.cs | 38 ++ ...bApiVectorizerParameters.Serialization.cs} | 14 +- ...eters.cs => WebApiVectorizerParameters.cs} | 13 +- .../src/Generated/SearchModelFactory.cs | 85 +-- .../src/Generated/SearchServiceRestClient.cs | 2 +- .../src/Generated/SkillsetsRestClient.cs | 99 +-- .../src/Generated/SynonymMapsRestClient.cs | 2 +- .../src/Indexes/Models/AnalyzeTextOptions.cs | 13 - .../Models/AzureMachineLearningSkill.cs | 101 --- .../Models/IndexerChangeTrackingState.cs | 36 - .../src/Indexes/Models/IndexerState.cs | 51 -- .../src/Indexes/Models/IndexingMode.cs | 18 - .../Indexes/Models/LexicalNormalizerName.cs | 28 - .../src/Indexes/Models/ResetSkillsOptions.cs | 18 - .../src/Indexes/Models/SearchAlias.cs | 33 - .../src/Indexes/Models/SearchField.cs | 9 - .../src/Indexes/Models/SearchIndex.cs | 6 - .../src/Indexes/Models/SearchIndexerCache.cs | 24 - .../src/Indexes/Models/SimpleField.cs | 8 - .../Indexes/Models/VectorSearchCompression.cs | 11 + .../Indexes/Models/VectorSearchVectorizer.cs | 11 + .../src/Indexes/Models/WebApiSkill.cs | 35 + .../src/Indexes/SearchIndexClient.Aliases.cs | 271 -------- .../SearchIndexerClient.DataSources.cs | 61 -- .../Indexes/SearchIndexerClient.SkillSets.cs | 183 ----- .../src/Indexes/SearchIndexerClient.cs | 196 ------ .../src/Indexes/SimpleFieldAttribute.cs | 13 - .../src/Models/ResetDocumentOptions.cs | 16 - .../src/Models/SearchModelFactory.cs | 79 +-- .../src/Models/SearchResult.cs | 15 - .../src/Options/SearchOptions.cs | 66 +- .../src/Options/SemanticSearchOptions.cs | 13 - .../src/SearchClientBuilderExtensions.cs | 43 ++ .../src/SearchClientOptions.cs | 14 +- .../src/Utilities/Constants.cs | 5 - .../Azure.Search.Documents/src/autorest.md | 39 +- .../tests/DocumentOperations/SearchTests.cs | 17 - .../DocumentOperations/VectorSearchTests.cs | 10 - .../tests/FieldBuilderTests.cs | 11 - .../tests/Models/DataSourceTests.cs | 2 +- .../tests/Models/ReflectableModel.cs | 3 - .../tests/Models/SearchIndexTests.cs | 2 +- .../tests/Models/SearchIndexerTests.cs | 2 +- .../tests/Models/SkillsetTests.cs | 2 +- .../tests/Samples/Sample01_HelloWorld.cs | 1 - .../Samples/Sample04_FieldBuilderIgnore.cs | 1 - ...ple07_VectorSearch_SemanticHybridSearch.cs | 2 - ...Sample07_VectorSearch_UsingFieldBuilder.cs | 1 - ...e07_VectorSearch_UsingReducedEmbeddings.cs | 9 +- ...VectorSearch_UsingVectorizableTextQuery.cs | 9 +- .../tests/Samples/Sample08_SemanticSearch.cs | 3 - .../tests/SearchIndexClientTests.cs | 32 - .../tests/SearchIndexerClientTests.cs | 11 +- .../tests/SearchableFieldAttributeTests.cs | 7 - .../tests/SimpleFieldAttributeTests.cs | 3 - .../tests/Utilities/SearchResources.Data.cs | 2 +- .../Utilities/SearchResourcesSample.Data.cs | 2 +- .../tests/Utilities/SearchTestBase.cs | 2 +- 223 files changed, 920 insertions(+), 7917 deletions(-) delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/AliasesRestClient.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/AIServicesVisionParameters.Serialization.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/AIServicesVisionParameters.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/AIServicesVisionVectorizer.Serialization.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/AIServicesVisionVectorizer.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/AIStudioModelCatalogName.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningParameters.Serialization.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningParameters.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningSkill.Serialization.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningSkill.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningVectorizer.Serialization.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningVectorizer.cs rename sdk/search/Azure.Search.Documents/src/Generated/Models/{AzureOpenAIParameters.Serialization.cs => AzureOpenAIVectorizerParameters.Serialization.cs} (83%) rename sdk/search/Azure.Search.Documents/src/Generated/Models/{AzureOpenAIParameters.cs => AzureOpenAIVectorizerParameters.cs} (75%) create mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/BinaryQuantizationCompression.Serialization.cs create mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/BinaryQuantizationCompression.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/CustomNormalizer.Serialization.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/CustomNormalizer.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/CustomVectorizer.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentDebugInfo.Serialization.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentDebugInfo.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/HybridCountAndFacetMode.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/HybridSearch.Serialization.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/HybridSearch.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionStatusDetail.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerState.Serialization.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerState.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/IndexingMode.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/LexicalNormalizer.Serialization.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/LexicalNormalizer.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/LexicalNormalizerName.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/ListAliasesResult.Serialization.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/ListAliasesResult.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/NativeBlobSoftDeleteDeletionDetectionPolicy.Serialization.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/NativeBlobSoftDeleteDeletionDetectionPolicy.cs rename sdk/search/Azure.Search.Documents/src/Generated/Models/{LineEnding.cs => OcrLineEnding.cs} (54%) delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/QueryDebugMode.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/QueryLanguage.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentRerankerInput.Serialization.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentRerankerInput.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentSemanticField.Serialization.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentSemanticField.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/QuerySpellerType.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/ResetDocumentOptions.Serialization.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/ResetDocumentOptions.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/ResetSkillsOptions.Serialization.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/ResetSkillsOptions.cs rename sdk/search/Azure.Search.Documents/src/Generated/Models/{ScalarQuantizationCompressionConfiguration.Serialization.cs => ScalarQuantizationCompression.Serialization.cs} (86%) rename sdk/search/Azure.Search.Documents/src/Generated/Models/{ScalarQuantizationCompressionConfiguration.cs => ScalarQuantizationCompression.cs} (68%) delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/SearchAlias.Serialization.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/SearchAlias.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerCache.Serialization.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerCache.cs rename sdk/search/Azure.Search.Documents/src/Generated/Models/{SearchIndexerIndexProjections.Serialization.cs => SearchIndexerIndexProjection.Serialization.cs} (86%) rename sdk/search/Azure.Search.Documents/src/Generated/Models/{SearchIndexerIndexProjections.cs => SearchIndexerIndexProjection.cs} (80%) delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerKnowledgeStoreParameters.Serialization.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/SearchScoreThreshold.Serialization.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/SearchScoreThreshold.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticDebugInfo.Serialization.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticDebugInfo.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticFieldState.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownLexicalNormalizer.Serialization.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownLexicalNormalizer.cs rename sdk/search/Azure.Search.Documents/src/Generated/Models/{UnknownVectorSearchCompressionConfiguration.Serialization.cs => UnknownVectorSearchCompression.Serialization.cs} (84%) rename sdk/search/Azure.Search.Documents/src/Generated/Models/{UnknownVectorSearchCompressionConfiguration.cs => UnknownVectorSearchCompression.cs} (68%) delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorThreshold.Serialization.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorThreshold.cs rename sdk/search/Azure.Search.Documents/src/Generated/Models/{VectorSearchCompressionConfiguration.Serialization.cs => VectorSearchCompression.Serialization.cs} (76%) rename sdk/search/Azure.Search.Documents/src/Generated/Models/{VectorSearchCompressionConfiguration.cs => VectorSearchCompression.cs} (68%) rename sdk/search/Azure.Search.Documents/src/Generated/Models/{VectorSearchCompressionTargetDataType.cs => VectorSearchCompressionTarget.cs} (63%) delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSimilarityThreshold.Serialization.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSimilarityThreshold.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/VectorThreshold.Serialization.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/VectorThreshold.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/VectorThresholdKind.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageBinaryQuery.Serialization.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageBinaryQuery.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageUrlQuery.Serialization.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageUrlQuery.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/VisionVectorizeSkill.Serialization.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/VisionVectorizeSkill.cs rename sdk/search/Azure.Search.Documents/src/Generated/Models/{CustomVectorizer.Serialization.cs => WebApiVectorizer.Serialization.cs} (76%) create mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiVectorizer.cs rename sdk/search/Azure.Search.Documents/src/Generated/Models/{CustomWebApiParameters.Serialization.cs => WebApiVectorizerParameters.Serialization.cs} (91%) rename sdk/search/Azure.Search.Documents/src/Generated/Models/{CustomWebApiParameters.cs => WebApiVectorizerParameters.cs} (87%) delete mode 100644 sdk/search/Azure.Search.Documents/src/Indexes/Models/AzureMachineLearningSkill.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Indexes/Models/IndexerChangeTrackingState.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Indexes/Models/IndexerState.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Indexes/Models/IndexingMode.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Indexes/Models/LexicalNormalizerName.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Indexes/Models/ResetSkillsOptions.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Indexes/Models/SearchAlias.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Indexes/Models/SearchIndexerCache.cs create mode 100644 sdk/search/Azure.Search.Documents/src/Indexes/Models/VectorSearchCompression.cs create mode 100644 sdk/search/Azure.Search.Documents/src/Indexes/Models/VectorSearchVectorizer.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexClient.Aliases.cs delete mode 100644 sdk/search/Azure.Search.Documents/src/Models/ResetDocumentOptions.cs diff --git a/sdk/search/Azure.Search.Documents/CHANGELOG.md b/sdk/search/Azure.Search.Documents/CHANGELOG.md index 87d3282904bcd..4f3b10bb446e2 100644 --- a/sdk/search/Azure.Search.Documents/CHANGELOG.md +++ b/sdk/search/Azure.Search.Documents/CHANGELOG.md @@ -1,14 +1,42 @@ # Release History -## 11.6.0-beta.5 (Unreleased) +## 11.6.0 (2024-07-17) ### Features Added +- Added support for `2024-07-01` service version. +- `SemanticSearchOptions` now supports `SemanticQuery`, which allows for specifying a semantic query that is only used + for semantic reranking. +- `VectorQuery` now supports `Oversampling` and `Weight`, which allows for specifying richer configurations on how + vector queries affect search results. +- Added support for `VectorizableTextQuery`, which allows for passing a text-based query that is vectorized service-side + by `VectorSearchVectorizer`s configured on the index so that vectorization doesn't need to happen before querying. +- Added support for "bring your own endpoint" with `VectorSearchVectorizer`, with implementations `AzureOpenAIVectorizer` + and `WebApiVectorizer`. This enables the service to use a user-provided configuration for vectorizing text, rather + than requiring all client-side calls to vectorize before querying, allowing for easier standardization of vectorization. +- Added support for compression with `VectorSearchCompression`, with implementations `BinaryQuantizationCompression` + and `ScalarQuantizationCompression`. This allows for reducing the size of vectors in the index, which can reduce + storage costs and improve querying performance. +- Added support for `VectorEncodingFormat`, which allows for specifying the encoding format of the vector data. +- Added support for `AzureOpenAIEmbeddingSkill`, which is a skill that uses the Azure OpenAI service to create text + embeddings during indexing. +- Added support for index projections with `SearchIndexerIndexProjection`, which allows for specifying how indexed + documents are projected in the index (or indexes). +- Added support for "narrow" types in `SearchFieldDataType`. This allows for specifying smaller types for vector fields + to reduce storage costs and improve querying performance. +- Added support for `SearchIndexerDataIdentity`, which allows for specifying the identity for the data source for the + indexer. +- `SearchField` and `SearchableField` now support `IsStored` and `VectorEncodingFormat` configurations. `IsStored` allows + for specifying behaviors on how the index will retain vector data (enabling the ability to reduce storage costs), and + `VectorEncodingFormat` allows for specifying the encoding format of the vector data. +- `OcrSkill` now supports `LineEnding`, which allows for specifying the line ending character used by the OCR skill. +- `SplitSkill` now supports `MaximumPagesToTake` and `PageOverlapLength`, which allows for specifying how the split + skill behaves when splitting documents into pages. +- `SearchServiceLimits` now supports `MaxStoragePerIndexInBytes`, which shows the maximum storage allowed per index. ### Breaking Changes -### Bugs Fixed - -### Other Changes +- All service concepts that have been in preview but not included in the `2024-07-01` GA have been removed. This + includes concepts such as index aliases, normalizers, Azure Machine Learning skills, hybrid search, and more. ## 11.6.0-beta.4 (2024-05-06) diff --git a/sdk/search/Azure.Search.Documents/api/Azure.Search.Documents.netstandard2.0.cs b/sdk/search/Azure.Search.Documents/api/Azure.Search.Documents.netstandard2.0.cs index d950c97b75ee7..39c50e6d61047 100644 --- a/sdk/search/Azure.Search.Documents/api/Azure.Search.Documents.netstandard2.0.cs +++ b/sdk/search/Azure.Search.Documents/api/Azure.Search.Documents.netstandard2.0.cs @@ -79,7 +79,7 @@ public SearchClient(System.Uri endpoint, string indexName, Azure.Core.TokenCrede } public partial class SearchClientOptions : Azure.Core.ClientOptions { - public SearchClientOptions(Azure.Search.Documents.SearchClientOptions.ServiceVersion version = Azure.Search.Documents.SearchClientOptions.ServiceVersion.V2024_05_01_Preview) { } + public SearchClientOptions(Azure.Search.Documents.SearchClientOptions.ServiceVersion version = Azure.Search.Documents.SearchClientOptions.ServiceVersion.V2024_07_01) { } public Azure.Search.Documents.SearchAudience? Audience { get { throw null; } set { } } public Azure.Core.Serialization.ObjectSerializer Serializer { get { throw null; } set { } } public Azure.Search.Documents.SearchClientOptions.ServiceVersion Version { get { throw null; } } @@ -87,7 +87,7 @@ public enum ServiceVersion { V2020_06_30 = 1, V2023_11_01 = 2, - V2024_05_01_Preview = 3, + V2024_07_01 = 3, } } public static partial class SearchFilter @@ -151,12 +151,9 @@ public SearchOptions() { } public System.Collections.Generic.IList HighlightFields { get { throw null; } } public string HighlightPostTag { get { throw null; } set { } } public string HighlightPreTag { get { throw null; } set { } } - public Azure.Search.Documents.Models.HybridSearch HybridSearch { get { throw null; } set { } } public bool? IncludeTotalCount { get { throw null; } set { } } public double? MinimumCoverage { get { throw null; } set { } } public System.Collections.Generic.IList OrderBy { get { throw null; } } - public Azure.Search.Documents.Models.QueryLanguage? QueryLanguage { get { throw null; } set { } } - public Azure.Search.Documents.Models.QuerySpellerType? QuerySpeller { get { throw null; } set { } } public Azure.Search.Documents.Models.SearchQueryType? QueryType { get { throw null; } set { } } public System.Collections.Generic.IList ScoringParameters { get { throw null; } } public string ScoringProfile { get { throw null; } set { } } @@ -218,20 +215,14 @@ public SearchIndexClient(System.Uri endpoint, Azure.Core.TokenCredential tokenCr public virtual string ServiceName { get { throw null; } } public virtual Azure.Response> AnalyzeText(string indexName, Azure.Search.Documents.Indexes.Models.AnalyzeTextOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task>> AnalyzeTextAsync(string indexName, Azure.Search.Documents.Indexes.Models.AnalyzeTextOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateAlias(Azure.Search.Documents.Indexes.Models.SearchAlias alias, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateAliasAsync(Azure.Search.Documents.Indexes.Models.SearchAlias alias, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateIndex(Azure.Search.Documents.Indexes.Models.SearchIndex index, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateIndexAsync(Azure.Search.Documents.Indexes.Models.SearchIndex index, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateOrUpdateAlias(string aliasName, Azure.Search.Documents.Indexes.Models.SearchAlias alias, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAliasAsync(string aliasName, Azure.Search.Documents.Indexes.Models.SearchAlias alias, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateOrUpdateIndex(Azure.Search.Documents.Indexes.Models.SearchIndex index, bool allowIndexDowntime = false, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateOrUpdateIndexAsync(Azure.Search.Documents.Indexes.Models.SearchIndex index, bool allowIndexDowntime = false, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateOrUpdateSynonymMap(Azure.Search.Documents.Indexes.Models.SynonymMap synonymMap, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateOrUpdateSynonymMapAsync(Azure.Search.Documents.Indexes.Models.SynonymMap synonymMap, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateSynonymMap(Azure.Search.Documents.Indexes.Models.SynonymMap synonymMap, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateSynonymMapAsync(Azure.Search.Documents.Indexes.Models.SynonymMap synonymMap, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response DeleteAlias(string aliasName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAliasAsync(string aliasName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response DeleteIndex(Azure.Search.Documents.Indexes.Models.SearchIndex index, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response DeleteIndex(string indexName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteIndexAsync(Azure.Search.Documents.Indexes.Models.SearchIndex index, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -240,10 +231,6 @@ public SearchIndexClient(System.Uri endpoint, Azure.Core.TokenCredential tokenCr public virtual Azure.Response DeleteSynonymMap(string synonymMapName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteSynonymMapAsync(Azure.Search.Documents.Indexes.Models.SynonymMap synonymMap, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteSynonymMapAsync(string synonymMapName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetAlias(string aliasName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAliasAsync(string aliasName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAliases(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAliasesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetIndex(string indexName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetIndexAsync(string indexName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetIndexes(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -276,32 +263,12 @@ public SearchIndexerClient(System.Uri endpoint, Azure.Core.TokenCredential token public virtual System.Threading.Tasks.Task> CreateDataSourceConnectionAsync(Azure.Search.Documents.Indexes.Models.SearchIndexerDataSourceConnection dataSourceConnection, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateIndexer(Azure.Search.Documents.Indexes.Models.SearchIndexer indexer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateIndexerAsync(Azure.Search.Documents.Indexes.Models.SearchIndexer indexer, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateOrUpdateDataSourceConnection(Azure.Search.Documents.Indexes.Models.SearchIndexerDataSourceConnection dataSourceConnection, bool onlyIfUnchanged = false, bool? ignoreCacheResetRequirements = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual Azure.Response CreateOrUpdateDataSourceConnection(Azure.Search.Documents.Indexes.Models.SearchIndexerDataSourceConnection dataSourceConnection, bool onlyIfUnchanged, System.Threading.CancellationToken cancellationToken) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateDataSourceConnectionAsync(Azure.Search.Documents.Indexes.Models.SearchIndexerDataSourceConnection dataSourceConnection, bool onlyIfUnchanged = false, bool? ignoreCacheResetRequirements = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual System.Threading.Tasks.Task> CreateOrUpdateDataSourceConnectionAsync(Azure.Search.Documents.Indexes.Models.SearchIndexerDataSourceConnection dataSourceConnection, bool onlyIfUnchanged, System.Threading.CancellationToken cancellationToken) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual Azure.Response CreateOrUpdateIndexer(Azure.Search.Documents.Indexes.Models.SearchIndexer indexer, bool onlyIfUnchanged, bool disableCacheReprocessingChangeDetection, bool ignoreCacheResetRequirements, System.Threading.CancellationToken cancellationToken) { throw null; } - public virtual Azure.Response CreateOrUpdateIndexer(Azure.Search.Documents.Indexes.Models.SearchIndexer indexer, bool onlyIfUnchanged = false, bool? ignoreCacheResetRequirements = default(bool?), bool? disableCacheReprocessingChangeDetection = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual Azure.Response CreateOrUpdateIndexer(Azure.Search.Documents.Indexes.Models.SearchIndexer indexer, bool onlyIfUnchanged, System.Threading.CancellationToken cancellationToken) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual System.Threading.Tasks.Task> CreateOrUpdateIndexerAsync(Azure.Search.Documents.Indexes.Models.SearchIndexer indexer, bool onlyIfUnchanged, bool disableCacheReprocessingChangeDetection, bool ignoreCacheResetRequirements, System.Threading.CancellationToken cancellationToken) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateIndexerAsync(Azure.Search.Documents.Indexes.Models.SearchIndexer indexer, bool onlyIfUnchanged = false, bool? ignoreCacheResetRequirements = default(bool?), bool? disableCacheReprocessingChangeDetection = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual System.Threading.Tasks.Task> CreateOrUpdateIndexerAsync(Azure.Search.Documents.Indexes.Models.SearchIndexer indexer, bool onlyIfUnchanged, System.Threading.CancellationToken cancellationToken) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual Azure.Response CreateOrUpdateSkillset(Azure.Search.Documents.Indexes.Models.SearchIndexerSkillset skillset, bool onlyIfUnchanged, bool disableCacheReprocessingChangeDetection, bool ignoreCacheResetRequirements, System.Threading.CancellationToken cancellationToken) { throw null; } - public virtual Azure.Response CreateOrUpdateSkillset(Azure.Search.Documents.Indexes.Models.SearchIndexerSkillset skillset, bool onlyIfUnchanged = false, bool? ignoreCacheResetRequirements = default(bool?), bool? disableCacheReprocessingChangeDetection = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual Azure.Response CreateOrUpdateSkillset(Azure.Search.Documents.Indexes.Models.SearchIndexerSkillset skillset, bool onlyIfUnchanged, System.Threading.CancellationToken cancellationToken) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual System.Threading.Tasks.Task> CreateOrUpdateSkillsetAsync(Azure.Search.Documents.Indexes.Models.SearchIndexerSkillset skillset, bool onlyIfUnchanged, bool disableCacheReprocessingChangeDetection, bool ignoreCacheResetRequirements, System.Threading.CancellationToken cancellationToken) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateSkillsetAsync(Azure.Search.Documents.Indexes.Models.SearchIndexerSkillset skillset, bool onlyIfUnchanged = false, bool? ignoreCacheResetRequirements = default(bool?), bool? disableCacheReprocessingChangeDetection = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual System.Threading.Tasks.Task> CreateOrUpdateSkillsetAsync(Azure.Search.Documents.Indexes.Models.SearchIndexerSkillset skillset, bool onlyIfUnchanged, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual Azure.Response CreateOrUpdateDataSourceConnection(Azure.Search.Documents.Indexes.Models.SearchIndexerDataSourceConnection dataSourceConnection, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateDataSourceConnectionAsync(Azure.Search.Documents.Indexes.Models.SearchIndexerDataSourceConnection dataSourceConnection, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateOrUpdateIndexer(Azure.Search.Documents.Indexes.Models.SearchIndexer indexer, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateIndexerAsync(Azure.Search.Documents.Indexes.Models.SearchIndexer indexer, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateOrUpdateSkillset(Azure.Search.Documents.Indexes.Models.SearchIndexerSkillset skillset, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateSkillsetAsync(Azure.Search.Documents.Indexes.Models.SearchIndexerSkillset skillset, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateSkillset(Azure.Search.Documents.Indexes.Models.SearchIndexerSkillset skillset, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateSkillsetAsync(Azure.Search.Documents.Indexes.Models.SearchIndexerSkillset skillset, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response DeleteDataSourceConnection(Azure.Search.Documents.Indexes.Models.SearchIndexerDataSourceConnection dataSourceConnection, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -336,12 +303,8 @@ public SearchIndexerClient(System.Uri endpoint, Azure.Core.TokenCredential token public virtual System.Threading.Tasks.Task>> GetSkillsetNamesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response> GetSkillsets(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task>> GetSkillsetsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response ResetDocuments(string indexerName, bool? overwrite = default(bool?), Azure.Search.Documents.Models.ResetDocumentOptions resetDocumentOptions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task ResetDocumentsAsync(string indexerName, bool? overwrite = default(bool?), Azure.Search.Documents.Models.ResetDocumentOptions resetDocumentOptions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response ResetIndexer(string indexerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task ResetIndexerAsync(string indexerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response ResetSkills(string skillsetName, Azure.Search.Documents.Models.ResetSkillsOptions resetSkillsOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task ResetSkillsAsync(string skillsetName, Azure.Search.Documents.Models.ResetSkillsOptions resetSkillsOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RunIndexer(string indexerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task RunIndexerAsync(string indexerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -354,7 +317,6 @@ public SimpleFieldAttribute() { } public bool IsHidden { get { throw null; } set { } } public bool IsKey { get { throw null; } set { } } public bool IsSortable { get { throw null; } set { } } - public string NormalizerName { get { throw null; } set { } } } [System.AttributeUsageAttribute(System.AttributeTargets.Field | System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)] public partial class VectorSearchFieldAttribute : System.Attribute @@ -369,41 +331,6 @@ public VectorSearchFieldAttribute() { } } namespace Azure.Search.Documents.Indexes.Models { - public partial class AIServicesVisionParameters - { - public AIServicesVisionParameters(string modelVersion, System.Uri resourceUri) { } - public string ApiKey { get { throw null; } set { } } - public Azure.Search.Documents.Indexes.Models.SearchIndexerDataIdentity AuthIdentity { get { throw null; } set { } } - public string ModelVersion { get { throw null; } set { } } - public System.Uri ResourceUri { get { throw null; } set { } } - } - public partial class AIServicesVisionVectorizer : Azure.Search.Documents.Indexes.Models.VectorSearchVectorizer - { - public AIServicesVisionVectorizer(string name) : base (default(string)) { } - public Azure.Search.Documents.Indexes.Models.AIServicesVisionParameters AIServicesVisionParameters { get { throw null; } set { } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct AIStudioModelCatalogName : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public AIStudioModelCatalogName(string value) { throw null; } - public static Azure.Search.Documents.Indexes.Models.AIStudioModelCatalogName CohereEmbedV3English { get { throw null; } } - public static Azure.Search.Documents.Indexes.Models.AIStudioModelCatalogName CohereEmbedV3Multilingual { get { throw null; } } - public static Azure.Search.Documents.Indexes.Models.AIStudioModelCatalogName FacebookDinoV2ImageEmbeddingsViTBase { get { throw null; } } - public static Azure.Search.Documents.Indexes.Models.AIStudioModelCatalogName FacebookDinoV2ImageEmbeddingsViTGiant { get { throw null; } } - public static Azure.Search.Documents.Indexes.Models.AIStudioModelCatalogName OpenAIClipImageTextEmbeddingsVitBasePatch32 { get { throw null; } } - public static Azure.Search.Documents.Indexes.Models.AIStudioModelCatalogName OpenAIClipImageTextEmbeddingsViTLargePatch14336 { get { throw null; } } - public bool Equals(Azure.Search.Documents.Indexes.Models.AIStudioModelCatalogName 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.Search.Documents.Indexes.Models.AIStudioModelCatalogName left, Azure.Search.Documents.Indexes.Models.AIStudioModelCatalogName right) { throw null; } - public static implicit operator Azure.Search.Documents.Indexes.Models.AIStudioModelCatalogName (string value) { throw null; } - public static bool operator !=(Azure.Search.Documents.Indexes.Models.AIStudioModelCatalogName left, Azure.Search.Documents.Indexes.Models.AIStudioModelCatalogName right) { throw null; } - public override string ToString() { throw null; } - } public partial class AnalyzedTokenInfo { internal AnalyzedTokenInfo() { } @@ -416,11 +343,9 @@ public partial class AnalyzeTextOptions { public AnalyzeTextOptions(string text) { } public AnalyzeTextOptions(string text, Azure.Search.Documents.Indexes.Models.LexicalAnalyzerName analyzerName) { } - public AnalyzeTextOptions(string text, Azure.Search.Documents.Indexes.Models.LexicalNormalizerName normalizerName) { } public AnalyzeTextOptions(string text, Azure.Search.Documents.Indexes.Models.LexicalTokenizerName tokenizerName) { } public Azure.Search.Documents.Indexes.Models.LexicalAnalyzerName? AnalyzerName { get { throw null; } } public System.Collections.Generic.IList CharFilters { get { throw null; } } - public Azure.Search.Documents.Indexes.Models.LexicalNormalizerName? NormalizerName { get { throw null; } } public string Text { get { throw null; } } public System.Collections.Generic.IList TokenFilters { get { throw null; } } public Azure.Search.Documents.Indexes.Models.LexicalTokenizerName? TokenizerName { get { throw null; } } @@ -430,38 +355,12 @@ public partial class AsciiFoldingTokenFilter : Azure.Search.Documents.Indexes.Mo public AsciiFoldingTokenFilter(string name) { } public bool? PreserveOriginal { get { throw null; } set { } } } - public partial class AzureMachineLearningParameters - { - public AzureMachineLearningParameters(System.Uri scoringUri) { } - public string AuthenticationKey { get { throw null; } set { } } - public Azure.Search.Documents.Indexes.Models.AIStudioModelCatalogName? ModelName { get { throw null; } set { } } - public string Region { get { throw null; } set { } } - public string ResourceId { get { throw null; } set { } } - public System.Uri ScoringUri { get { throw null; } set { } } - public System.TimeSpan? Timeout { get { throw null; } set { } } - } - public partial class AzureMachineLearningSkill : Azure.Search.Documents.Indexes.Models.SearchIndexerSkill - { - public AzureMachineLearningSkill(System.Collections.Generic.IEnumerable inputs, System.Collections.Generic.IEnumerable outputs, Azure.Core.ResourceIdentifier resourceId, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?)) { } - public AzureMachineLearningSkill(System.Collections.Generic.IEnumerable inputs, System.Collections.Generic.IEnumerable outputs, System.Uri scoringUri, string authenticationKey = null) { } - public string AuthenticationKey { get { throw null; } } - public int? DegreeOfParallelism { get { throw null; } set { } } - public Azure.Core.AzureLocation? Location { get { throw null; } } - public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } - public System.Uri ScoringUri { get { throw null; } } - public System.TimeSpan? Timeout { get { throw null; } set { } } - } - public partial class AzureMachineLearningVectorizer : Azure.Search.Documents.Indexes.Models.VectorSearchVectorizer - { - public AzureMachineLearningVectorizer(string name) : base (default(string)) { } - public Azure.Search.Documents.Indexes.Models.AzureMachineLearningParameters AMLParameters { get { throw null; } set { } } - } public partial class AzureOpenAIEmbeddingSkill : Azure.Search.Documents.Indexes.Models.SearchIndexerSkill { public AzureOpenAIEmbeddingSkill(System.Collections.Generic.IEnumerable inputs, System.Collections.Generic.IEnumerable outputs) { } public string ApiKey { get { throw null; } set { } } - public Azure.Search.Documents.Indexes.Models.SearchIndexerDataIdentity AuthIdentity { get { throw null; } set { } } - public string DeploymentId { get { throw null; } set { } } + public Azure.Search.Documents.Indexes.Models.SearchIndexerDataIdentity AuthenticationIdentity { get { throw null; } set { } } + public string DeploymentName { get { throw null; } set { } } public int? Dimensions { get { throw null; } set { } } public Azure.Search.Documents.Indexes.Models.AzureOpenAIModelName? ModelName { get { throw null; } set { } } public System.Uri ResourceUri { get { throw null; } set { } } @@ -472,7 +371,6 @@ public AzureOpenAIEmbeddingSkill(System.Collections.Generic.IEnumerable @@ -726,27 +628,6 @@ public CustomEntityLookupSkill(System.Collections.Generic.IEnumerable CharFilters { get { throw null; } } - public System.Collections.Generic.IList TokenFilters { get { throw null; } } - } - public partial class CustomVectorizer : Azure.Search.Documents.Indexes.Models.VectorSearchVectorizer - { - public CustomVectorizer(string name) : base (default(string)) { } - public Azure.Search.Documents.Indexes.Models.CustomWebApiParameters CustomWebApiParameters { get { throw null; } set { } } - } - public partial class CustomWebApiParameters - { - public CustomWebApiParameters() { } - public Azure.Search.Documents.Indexes.Models.SearchIndexerDataIdentity AuthIdentity { get { throw null; } set { } } - public string AuthResourceId { get { throw null; } set { } } - public System.Collections.Generic.IDictionary HttpHeaders { get { throw null; } } - public string HttpMethod { get { throw null; } set { } } - public System.TimeSpan? Timeout { get { throw null; } set { } } - public System.Uri Uri { get { throw null; } set { } } - } public partial class DataChangeDetectionPolicy { internal DataChangeDetectionPolicy() { } @@ -1056,14 +937,6 @@ public ImageAnalysisSkill(System.Collections.Generic.IEnumerable { @@ -1085,7 +958,6 @@ internal IndexerChangeTrackingState() { } public partial class IndexerExecutionResult { internal IndexerExecutionResult() { } - public Azure.Search.Documents.Indexes.Models.IndexerState CurrentState { get { throw null; } } public System.DateTimeOffset? EndTime { get { throw null; } } public string ErrorMessage { get { throw null; } } public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } @@ -1095,7 +967,6 @@ internal IndexerExecutionResult() { } public int ItemCount { get { throw null; } } public System.DateTimeOffset? StartTime { get { throw null; } } public Azure.Search.Documents.Indexes.Models.IndexerExecutionStatus Status { get { throw null; } } - public Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail? StatusDetail { get { throw null; } } public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } } public enum IndexerExecutionStatus @@ -1105,55 +976,12 @@ public enum IndexerExecutionStatus InProgress = 2, Reset = 3, } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct IndexerExecutionStatusDetail : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public IndexerExecutionStatusDetail(string value) { throw null; } - public static Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail ResetDocs { get { throw null; } } - public bool Equals(Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail 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.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail left, Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail right) { throw null; } - public static implicit operator Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail (string value) { throw null; } - public static bool operator !=(Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail left, Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail right) { throw null; } - public override string ToString() { throw null; } - } - public partial class IndexerState - { - internal IndexerState() { } - public Azure.Search.Documents.Indexes.Models.IndexerChangeTrackingState ChangeTrackingState { get { throw null; } } - public Azure.Search.Documents.Indexes.Models.IndexingMode? Mode { get { throw null; } } - public System.Collections.Generic.IReadOnlyList ResetDataSourceDocumentIds { get { throw null; } } - public System.Collections.Generic.IReadOnlyList ResetDocumentKeys { get { throw null; } } - } public enum IndexerStatus { Unknown = 0, Error = 1, Running = 2, } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct IndexingMode : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public IndexingMode(string value) { throw null; } - public static Azure.Search.Documents.Indexes.Models.IndexingMode AllDocuments { get { throw null; } } - public static Azure.Search.Documents.Indexes.Models.IndexingMode ResetDocuments { get { throw null; } } - public bool Equals(Azure.Search.Documents.Indexes.Models.IndexingMode 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.Search.Documents.Indexes.Models.IndexingMode left, Azure.Search.Documents.Indexes.Models.IndexingMode right) { throw null; } - public static implicit operator Azure.Search.Documents.Indexes.Models.IndexingMode (string value) { throw null; } - public static bool operator !=(Azure.Search.Documents.Indexes.Models.IndexingMode left, Azure.Search.Documents.Indexes.Models.IndexingMode right) { throw null; } - public override string ToString() { throw null; } - } public partial class IndexingParameters { public IndexingParameters() { } @@ -1291,8 +1119,6 @@ public KeywordTokenizer(string name) { } public partial class KnowledgeStore { public KnowledgeStore(string storageConnectionString, System.Collections.Generic.IEnumerable projections) { } - public Azure.Search.Documents.Indexes.Models.SearchIndexerDataIdentity Identity { get { throw null; } set { } } - public Azure.Search.Documents.Indexes.Models.SearchIndexerKnowledgeStoreParameters Parameters { get { throw null; } set { } } public System.Collections.Generic.IList Projections { get { throw null; } } public string StorageConnectionString { get { throw null; } set { } } } @@ -1551,40 +1377,6 @@ public static partial class Values public const string ZhHantMicrosoft = "zh-Hant.microsoft"; } } - public partial class LexicalNormalizer - { - public LexicalNormalizer(string name) { } - public string Name { get { throw null; } set { } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct LexicalNormalizerName : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public LexicalNormalizerName(string value) { throw null; } - public static Azure.Search.Documents.Indexes.Models.LexicalNormalizerName AsciiFolding { get { throw null; } } - public static Azure.Search.Documents.Indexes.Models.LexicalNormalizerName Elision { get { throw null; } } - public static Azure.Search.Documents.Indexes.Models.LexicalNormalizerName Lowercase { get { throw null; } } - public static Azure.Search.Documents.Indexes.Models.LexicalNormalizerName Standard { get { throw null; } } - public static Azure.Search.Documents.Indexes.Models.LexicalNormalizerName Uppercase { get { throw null; } } - public bool Equals(Azure.Search.Documents.Indexes.Models.LexicalNormalizerName 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.Search.Documents.Indexes.Models.LexicalNormalizerName left, Azure.Search.Documents.Indexes.Models.LexicalNormalizerName right) { throw null; } - public static implicit operator Azure.Search.Documents.Indexes.Models.LexicalNormalizerName (string value) { throw null; } - public static bool operator !=(Azure.Search.Documents.Indexes.Models.LexicalNormalizerName left, Azure.Search.Documents.Indexes.Models.LexicalNormalizerName right) { throw null; } - public override string ToString() { throw null; } - public static partial class Values - { - public const string AsciiFolding = "asciifolding"; - public const string Elision = "elision"; - public const string Lowercase = "lowercase"; - public const string Standard = "standard"; - public const string Uppercase = "uppercase"; - } - } public partial class LexicalTokenizer { internal LexicalTokenizer() { } @@ -1625,26 +1417,6 @@ public LimitTokenFilter(string name) { } public bool? ConsumeAllTokens { get { throw null; } set { } } public int? MaxTokenCount { get { throw null; } set { } } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct LineEnding : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public LineEnding(string value) { throw null; } - public static Azure.Search.Documents.Indexes.Models.LineEnding CarriageReturn { get { throw null; } } - public static Azure.Search.Documents.Indexes.Models.LineEnding CarriageReturnLineFeed { get { throw null; } } - public static Azure.Search.Documents.Indexes.Models.LineEnding LineFeed { get { throw null; } } - public static Azure.Search.Documents.Indexes.Models.LineEnding Space { get { throw null; } } - public bool Equals(Azure.Search.Documents.Indexes.Models.LineEnding 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.Search.Documents.Indexes.Models.LineEnding left, Azure.Search.Documents.Indexes.Models.LineEnding right) { throw null; } - public static implicit operator Azure.Search.Documents.Indexes.Models.LineEnding (string value) { throw null; } - public static bool operator !=(Azure.Search.Documents.Indexes.Models.LineEnding left, Azure.Search.Documents.Indexes.Models.LineEnding right) { throw null; } - public override string ToString() { throw null; } - } public partial class LuceneStandardAnalyzer : Azure.Search.Documents.Indexes.Models.LexicalAnalyzer { public LuceneStandardAnalyzer(string name) { } @@ -1786,10 +1558,6 @@ public enum MicrosoftTokenizerLanguage Urdu = 40, Vietnamese = 41, } - public partial class NativeBlobSoftDeleteDeletionDetectionPolicy : Azure.Search.Documents.Indexes.Models.DataDeletionDetectionPolicy - { - public NativeBlobSoftDeleteDeletionDetectionPolicy() { } - } public partial class NGramTokenFilter : Azure.Search.Documents.Indexes.Models.TokenFilter { public NGramTokenFilter(string name) { } @@ -1803,11 +1571,31 @@ public NGramTokenizer(string name) { } public int? MinGram { get { throw null; } set { } } public System.Collections.Generic.IList TokenChars { get { throw null; } } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct OcrLineEnding : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public OcrLineEnding(string value) { throw null; } + public static Azure.Search.Documents.Indexes.Models.OcrLineEnding CarriageReturn { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.OcrLineEnding CarriageReturnLineFeed { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.OcrLineEnding LineFeed { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.OcrLineEnding Space { get { throw null; } } + public bool Equals(Azure.Search.Documents.Indexes.Models.OcrLineEnding 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.Search.Documents.Indexes.Models.OcrLineEnding left, Azure.Search.Documents.Indexes.Models.OcrLineEnding right) { throw null; } + public static implicit operator Azure.Search.Documents.Indexes.Models.OcrLineEnding (string value) { throw null; } + public static bool operator !=(Azure.Search.Documents.Indexes.Models.OcrLineEnding left, Azure.Search.Documents.Indexes.Models.OcrLineEnding right) { throw null; } + public override string ToString() { throw null; } + } public partial class OcrSkill : Azure.Search.Documents.Indexes.Models.SearchIndexerSkill { public OcrSkill(System.Collections.Generic.IEnumerable inputs, System.Collections.Generic.IEnumerable outputs) { } public Azure.Search.Documents.Indexes.Models.OcrSkillLanguage? DefaultLanguageCode { get { throw null; } set { } } - public Azure.Search.Documents.Indexes.Models.LineEnding? LineEnding { get { throw null; } set { } } + public Azure.Search.Documents.Indexes.Models.OcrLineEnding? LineEnding { get { throw null; } set { } } public bool? ShouldDetectOrientation { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] @@ -2117,15 +1905,15 @@ public PiiDetectionSkill(System.Collections.Generic.IEnumerable SynonymMapNames { get { throw null; } } } - public partial class SearchAlias - { - public SearchAlias(string name, System.Collections.Generic.IEnumerable indexes) { } - public SearchAlias(string name, string index) { } - public Azure.ETag? ETag { get { throw null; } } - public System.Collections.Generic.IList Indexes { get { throw null; } } - public string Name { get { throw null; } set { } } - } public partial class SearchField { public SearchField(string name, Azure.Search.Documents.Indexes.Models.SearchFieldDataType type) { } @@ -2187,7 +1967,6 @@ public SearchField(string name, Azure.Search.Documents.Indexes.Models.SearchFiel public bool? IsSortable { get { throw null; } set { } } public bool? IsStored { get { throw null; } set { } } public string Name { get { throw null; } } - public Azure.Search.Documents.Indexes.Models.LexicalNormalizerName? NormalizerName { get { throw null; } set { } } public Azure.Search.Documents.Indexes.Models.LexicalAnalyzerName? SearchAnalyzerName { get { throw null; } set { } } public System.Collections.Generic.IList SynonymMapNames { get { throw null; } } public Azure.Search.Documents.Indexes.Models.SearchFieldDataType Type { get { throw null; } } @@ -2246,7 +2025,6 @@ public SearchIndex(string name, System.Collections.Generic.IEnumerable Fields { get { throw null; } set { } } public string Name { get { throw null; } } - public System.Collections.Generic.IList Normalizers { get { throw null; } } public System.Collections.Generic.IList ScoringProfiles { get { throw null; } } public Azure.Search.Documents.Indexes.Models.SemanticSearch SemanticSearch { get { throw null; } set { } } public Azure.Search.Documents.Indexes.Models.SimilarityAlgorithm Similarity { get { throw null; } set { } } @@ -2258,7 +2036,6 @@ public SearchIndex(string name, System.Collections.Generic.IEnumerable selectors) { } + public SearchIndexerIndexProjection(System.Collections.Generic.IEnumerable selectors) { } public Azure.Search.Documents.Indexes.Models.SearchIndexerIndexProjectionsParameters Parameters { get { throw null; } set { } } public System.Collections.Generic.IList Selectors { get { throw null; } } } @@ -2365,12 +2133,6 @@ public SearchIndexerIndexProjectionsParameters() { } public System.Collections.Generic.IDictionary AdditionalProperties { get { throw null; } } public Azure.Search.Documents.Indexes.Models.IndexProjectionMode? ProjectionMode { get { throw null; } set { } } } - public partial class SearchIndexerKnowledgeStoreParameters - { - public SearchIndexerKnowledgeStoreParameters() { } - public System.Collections.Generic.IDictionary AdditionalProperties { get { throw null; } } - public bool? SynthesizeGeneratedKeyName { get { throw null; } set { } } - } public partial class SearchIndexerLimits { internal SearchIndexerLimits() { } @@ -2394,7 +2156,7 @@ public SearchIndexerSkillset(string name, System.Collections.Generic.IEnumerable public string Description { get { throw null; } set { } } public Azure.Search.Documents.Indexes.Models.SearchResourceEncryptionKey EncryptionKey { get { throw null; } set { } } public Azure.ETag? ETag { get { throw null; } set { } } - public Azure.Search.Documents.Indexes.Models.SearchIndexerIndexProjections IndexProjections { get { throw null; } set { } } + public Azure.Search.Documents.Indexes.Models.SearchIndexerIndexProjection IndexProjection { get { throw null; } set { } } public Azure.Search.Documents.Indexes.Models.KnowledgeStore KnowledgeStore { get { throw null; } set { } } public string Name { get { throw null; } set { } } public System.Collections.Generic.IList Skills { get { throw null; } } @@ -2434,7 +2196,6 @@ public partial class SearchResourceEncryptionKey public SearchResourceEncryptionKey(System.Uri vaultUri, string keyName, string keyVersion) { } public string ApplicationId { get { throw null; } set { } } public string ApplicationSecret { get { throw null; } set { } } - public Azure.Search.Documents.Indexes.Models.SearchIndexerDataIdentity Identity { get { throw null; } set { } } public string KeyName { get { throw null; } } public string KeyVersion { get { throw null; } } public System.Uri VaultUri { get { throw null; } } @@ -2442,7 +2203,6 @@ public SearchResourceEncryptionKey(System.Uri vaultUri, string keyName, string k public partial class SearchServiceCounters { internal SearchServiceCounters() { } - public Azure.Search.Documents.Indexes.Models.SearchResourceCounter AliasCounter { get { throw null; } } public Azure.Search.Documents.Indexes.Models.SearchResourceCounter DataSourceCounter { get { throw null; } } public Azure.Search.Documents.Indexes.Models.SearchResourceCounter DocumentCounter { get { throw null; } } public Azure.Search.Documents.Indexes.Models.SearchResourceCounter IndexCounter { get { throw null; } } @@ -2586,7 +2346,6 @@ public SimpleField(string name, Azure.Search.Documents.Indexes.Models.SearchFiel public bool IsHidden { get { throw null; } set { } } public bool IsKey { get { throw null; } set { } } public bool IsSortable { get { throw null; } set { } } - public Azure.Search.Documents.Indexes.Models.LexicalNormalizerName? NormalizerName { get { throw null; } set { } } } public partial class SnowballTokenFilter : Azure.Search.Documents.Indexes.Models.TokenFilter { @@ -3047,7 +2806,7 @@ public partial class VectorSearch { public VectorSearch() { } public System.Collections.Generic.IList Algorithms { get { throw null; } } - public System.Collections.Generic.IList Compressions { get { throw null; } } + public System.Collections.Generic.IList Compressions { get { throw null; } } public System.Collections.Generic.IList Profiles { get { throw null; } } public System.Collections.Generic.IList Vectorizers { get { throw null; } } } @@ -3076,28 +2835,28 @@ protected VectorSearchAlgorithmConfiguration(string name) { } public static bool operator !=(Azure.Search.Documents.Indexes.Models.VectorSearchAlgorithmMetric left, Azure.Search.Documents.Indexes.Models.VectorSearchAlgorithmMetric right) { throw null; } public override string ToString() { throw null; } } - public abstract partial class VectorSearchCompressionConfiguration + public abstract partial class VectorSearchCompression { - protected VectorSearchCompressionConfiguration(string name) { } + protected VectorSearchCompression(string compressionName) { } + public string CompressionName { get { throw null; } } public double? DefaultOversampling { get { throw null; } set { } } - public string Name { get { throw null; } set { } } public bool? RerankWithOriginalVectors { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct VectorSearchCompressionTargetDataType : System.IEquatable + public readonly partial struct VectorSearchCompressionTarget : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public VectorSearchCompressionTargetDataType(string value) { throw null; } - public static Azure.Search.Documents.Indexes.Models.VectorSearchCompressionTargetDataType Int8 { get { throw null; } } - public bool Equals(Azure.Search.Documents.Indexes.Models.VectorSearchCompressionTargetDataType other) { throw null; } + public VectorSearchCompressionTarget(string value) { throw null; } + public static Azure.Search.Documents.Indexes.Models.VectorSearchCompressionTarget Int8 { get { throw null; } } + public bool Equals(Azure.Search.Documents.Indexes.Models.VectorSearchCompressionTarget 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.Search.Documents.Indexes.Models.VectorSearchCompressionTargetDataType left, Azure.Search.Documents.Indexes.Models.VectorSearchCompressionTargetDataType right) { throw null; } - public static implicit operator Azure.Search.Documents.Indexes.Models.VectorSearchCompressionTargetDataType (string value) { throw null; } - public static bool operator !=(Azure.Search.Documents.Indexes.Models.VectorSearchCompressionTargetDataType left, Azure.Search.Documents.Indexes.Models.VectorSearchCompressionTargetDataType right) { throw null; } + public static bool operator ==(Azure.Search.Documents.Indexes.Models.VectorSearchCompressionTarget left, Azure.Search.Documents.Indexes.Models.VectorSearchCompressionTarget right) { throw null; } + public static implicit operator Azure.Search.Documents.Indexes.Models.VectorSearchCompressionTarget (string value) { throw null; } + public static bool operator !=(Azure.Search.Documents.Indexes.Models.VectorSearchCompressionTarget left, Azure.Search.Documents.Indexes.Models.VectorSearchCompressionTarget right) { throw null; } public override string ToString() { throw null; } } public partial class VectorSearchField : Azure.Search.Documents.Indexes.Models.SearchFieldTemplate @@ -3113,19 +2872,14 @@ public partial class VectorSearchProfile { public VectorSearchProfile(string name, string algorithmConfigurationName) { } public string AlgorithmConfigurationName { get { throw null; } set { } } - public string CompressionConfigurationName { get { throw null; } set { } } + public string CompressionName { get { throw null; } set { } } public string Name { get { throw null; } set { } } - public string Vectorizer { get { throw null; } set { } } + public string VectorizerName { get { throw null; } set { } } } public abstract partial class VectorSearchVectorizer { - protected VectorSearchVectorizer(string name) { } - public string Name { get { throw null; } set { } } - } - public partial class VisionVectorizeSkill : Azure.Search.Documents.Indexes.Models.SearchIndexerSkill - { - public VisionVectorizeSkill(System.Collections.Generic.IEnumerable inputs, System.Collections.Generic.IEnumerable outputs, string modelVersion) { } - public string ModelVersion { get { throw null; } set { } } + protected VectorSearchVectorizer(string vectorizerName) { } + public string VectorizerName { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct VisualFeature : System.IEquatable @@ -3162,6 +2916,21 @@ public WebApiSkill(System.Collections.Generic.IEnumerable HttpHeaders { get { throw null; } } + public string HttpMethod { get { throw null; } set { } } + public System.TimeSpan? Timeout { get { throw null; } set { } } + public System.Uri Uri { get { throw null; } set { } } + } public partial class WordDelimiterTokenFilter : Azure.Search.Documents.Indexes.Models.TokenFilter { public WordDelimiterTokenFilter(string name) { } @@ -3197,11 +2966,6 @@ internal AutocompleteResults() { } public double? Coverage { get { throw null; } } public System.Collections.Generic.IReadOnlyList Results { get { throw null; } } } - public partial class DocumentDebugInfo - { - internal DocumentDebugInfo() { } - public Azure.Search.Documents.Models.SemanticDebugInfo Semantic { get { throw null; } } - } public partial class FacetResult : System.Collections.Generic.IEnumerable>, System.Collections.Generic.IReadOnlyCollection>, System.Collections.Generic.IReadOnlyDictionary, System.Collections.IEnumerable { internal FacetResult() { } @@ -3226,30 +2990,6 @@ public enum FacetType Value = 0, Range = 1, } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct HybridCountAndFacetMode : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public HybridCountAndFacetMode(string value) { throw null; } - public static Azure.Search.Documents.Models.HybridCountAndFacetMode CountAllResults { get { throw null; } } - public static Azure.Search.Documents.Models.HybridCountAndFacetMode CountRetrievableResults { get { throw null; } } - public bool Equals(Azure.Search.Documents.Models.HybridCountAndFacetMode 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.Search.Documents.Models.HybridCountAndFacetMode left, Azure.Search.Documents.Models.HybridCountAndFacetMode right) { throw null; } - public static implicit operator Azure.Search.Documents.Models.HybridCountAndFacetMode (string value) { throw null; } - public static bool operator !=(Azure.Search.Documents.Models.HybridCountAndFacetMode left, Azure.Search.Documents.Models.HybridCountAndFacetMode right) { throw null; } - public override string ToString() { throw null; } - } - public partial class HybridSearch - { - public HybridSearch() { } - public Azure.Search.Documents.Models.HybridCountAndFacetMode? CountAndFacetMode { get { throw null; } set { } } - public int? MaxTextRecallSize { get { throw null; } set { } } - } public partial class IndexActionCompletedEventArgs : Azure.Search.Documents.Models.IndexActionEventArgs { public IndexActionCompletedEventArgs(Azure.Search.Documents.SearchIndexingBufferedSender sender, Azure.Search.Documents.Models.IndexDocumentsAction action, Azure.Search.Documents.Models.IndexingResult result, bool isRunningSynchronously, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) : base (default(Azure.Search.Documents.SearchIndexingBufferedSender), default(Azure.Search.Documents.Models.IndexDocumentsAction), default(bool), default(System.Threading.CancellationToken)) { } @@ -3380,143 +3120,6 @@ internal QueryCaptionResult() { } public static bool operator !=(Azure.Search.Documents.Models.QueryCaptionType left, Azure.Search.Documents.Models.QueryCaptionType right) { throw null; } public override string ToString() { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct QueryDebugMode : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public QueryDebugMode(string value) { throw null; } - public static Azure.Search.Documents.Models.QueryDebugMode Disabled { get { throw null; } } - public static Azure.Search.Documents.Models.QueryDebugMode Semantic { get { throw null; } } - public bool Equals(Azure.Search.Documents.Models.QueryDebugMode 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.Search.Documents.Models.QueryDebugMode left, Azure.Search.Documents.Models.QueryDebugMode right) { throw null; } - public static implicit operator Azure.Search.Documents.Models.QueryDebugMode (string value) { throw null; } - public static bool operator !=(Azure.Search.Documents.Models.QueryDebugMode left, Azure.Search.Documents.Models.QueryDebugMode right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct QueryLanguage : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public QueryLanguage(string value) { throw null; } - public static Azure.Search.Documents.Models.QueryLanguage ArEg { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage ArJo { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage ArKw { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage ArMa { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage ArSa { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage BgBg { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage BnIn { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage CaEs { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage CsCz { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage DaDk { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage DeDe { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage ElGr { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage EnAu { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage EnCa { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage EnGb { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage EnIn { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage EnUs { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage EsEs { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage EsMx { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage EtEe { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage EuEs { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage FaAe { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage FiFi { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage FrCa { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage FrFr { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage GaIe { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage GlEs { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage GuIn { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage HeIl { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage HiIn { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage HrBa { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage HrHr { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage HuHu { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage HyAm { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage IdId { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage IsIs { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage ItIt { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage JaJp { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage KnIn { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage KoKr { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage LtLt { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage LvLv { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage MlIn { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage MrIn { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage MsBn { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage MsMy { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage NbNo { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage NlBe { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage NlNl { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage None { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage NoNo { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage PaIn { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage PlPl { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage PtBr { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage PtPt { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage RoRo { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage RuRu { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage SkSk { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage SlSl { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage SrBa { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage SrMe { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage SrRs { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage SvSe { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage TaIn { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage TeIn { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage ThTh { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage TrTr { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage UkUa { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage UrPk { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage ViVn { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage ZhCn { get { throw null; } } - public static Azure.Search.Documents.Models.QueryLanguage ZhTw { get { throw null; } } - public bool Equals(Azure.Search.Documents.Models.QueryLanguage 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.Search.Documents.Models.QueryLanguage left, Azure.Search.Documents.Models.QueryLanguage right) { throw null; } - public static implicit operator Azure.Search.Documents.Models.QueryLanguage (string value) { throw null; } - public static bool operator !=(Azure.Search.Documents.Models.QueryLanguage left, Azure.Search.Documents.Models.QueryLanguage right) { throw null; } - public override string ToString() { throw null; } - } - public partial class QueryResultDocumentRerankerInput - { - internal QueryResultDocumentRerankerInput() { } - public string Content { get { throw null; } } - public string Keywords { get { throw null; } } - public string Title { get { throw null; } } - } - public partial class QueryResultDocumentSemanticField - { - internal QueryResultDocumentSemanticField() { } - public string Name { get { throw null; } } - public Azure.Search.Documents.Models.SemanticFieldState? State { get { throw null; } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct QuerySpellerType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public QuerySpellerType(string value) { throw null; } - public static Azure.Search.Documents.Models.QuerySpellerType Lexicon { get { throw null; } } - public static Azure.Search.Documents.Models.QuerySpellerType None { get { throw null; } } - public bool Equals(Azure.Search.Documents.Models.QuerySpellerType 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.Search.Documents.Models.QuerySpellerType left, Azure.Search.Documents.Models.QuerySpellerType right) { throw null; } - public static implicit operator Azure.Search.Documents.Models.QuerySpellerType (string value) { throw null; } - public static bool operator !=(Azure.Search.Documents.Models.QuerySpellerType left, Azure.Search.Documents.Models.QuerySpellerType right) { throw null; } - public override string ToString() { throw null; } - } public partial class RangeFacetResult where T : struct { public RangeFacetResult(long count, T? from, T? to) { } @@ -3524,17 +3127,6 @@ public RangeFacetResult(long count, T? from, T? to) { } public T? From { get { throw null; } } public T? To { get { throw null; } } } - public partial class ResetDocumentOptions - { - public ResetDocumentOptions() { } - public System.Collections.Generic.IList DataSourceDocumentIds { get { throw null; } } - public System.Collections.Generic.IList DocumentKeys { get { throw null; } } - } - public partial class ResetSkillsOptions - { - public ResetSkillsOptions() { } - public System.Collections.Generic.IList SkillNames { get { throw null; } } - } public enum ScoringStatistics { Local = 0, @@ -3594,23 +3186,17 @@ public static partial class SearchModelFactory public static Azure.Search.Documents.Indexes.Models.CognitiveServicesAccount CognitiveServicesAccount(string oDataType, string description) { throw null; } public static Azure.Search.Documents.Indexes.Models.DataChangeDetectionPolicy DataChangeDetectionPolicy(string oDataType) { throw null; } public static Azure.Search.Documents.Indexes.Models.DataDeletionDetectionPolicy DataDeletionDetectionPolicy(string oDataType) { throw null; } - public static Azure.Search.Documents.Models.DocumentDebugInfo DocumentDebugInfo(Azure.Search.Documents.Models.SemanticDebugInfo semantic = null) { throw null; } public static Azure.Search.Documents.Models.FacetResult FacetResult(long? count = default(long?), System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } public static Azure.Search.Documents.Models.IndexDocumentsResult IndexDocumentsResult(System.Collections.Generic.IEnumerable results) { throw null; } - public static Azure.Search.Documents.Indexes.Models.IndexerChangeTrackingState IndexerChangeTrackingState(string allDocumentsInitialState, string allDocumentsFinalState, string resetDocumentsInitialState, string resetDocumentsFinalState) { throw null; } - public static Azure.Search.Documents.Indexes.Models.IndexerExecutionResult IndexerExecutionResult(Azure.Search.Documents.Indexes.Models.IndexerExecutionStatus status = Azure.Search.Documents.Indexes.Models.IndexerExecutionStatus.TransientFailure, Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail? statusDetail = default(Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail?), Azure.Search.Documents.Indexes.Models.IndexerState currentState = null, string errorMessage = null, System.DateTimeOffset? startTime = default(System.DateTimeOffset?), System.DateTimeOffset? endTime = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable errors = null, System.Collections.Generic.IEnumerable warnings = null, int itemCount = 0, int failedItemCount = 0, string initialTrackingState = null, string finalTrackingState = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Search.Documents.Indexes.Models.IndexerExecutionResult IndexerExecutionResult(Azure.Search.Documents.Indexes.Models.IndexerExecutionStatus status = Azure.Search.Documents.Indexes.Models.IndexerExecutionStatus.TransientFailure, string errorMessage = null, System.DateTimeOffset? startTime = default(System.DateTimeOffset?), System.DateTimeOffset? endTime = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable errors = null, System.Collections.Generic.IEnumerable warnings = null, int itemCount = 0, int failedItemCount = 0, string initialTrackingState = null, string finalTrackingState = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Search.Documents.Indexes.Models.IndexerExecutionResult IndexerExecutionResult(Azure.Search.Documents.Indexes.Models.IndexerExecutionStatus status, string errorMessage, System.DateTimeOffset? startTime, System.DateTimeOffset? endTime, System.Collections.Generic.IReadOnlyList errors, System.Collections.Generic.IReadOnlyList warnings, int itemCount, int failedItemCount, string initialTrackingState, string finalTrackingState) { throw null; } - public static Azure.Search.Documents.Indexes.Models.IndexerState IndexerState(Azure.Search.Documents.Indexes.Models.IndexingMode? mode = default(Azure.Search.Documents.Indexes.Models.IndexingMode?), string allDocumentsInitialChangeTrackingState = null, string allDocumentsFinalChangeTrackingState = null, string resetDocumentsInitialChangeTrackingState = null, string resetDocumentsFinalChangeTrackingState = null, System.Collections.Generic.IEnumerable resetDocumentKeys = null, System.Collections.Generic.IEnumerable resetDataSourceDocumentIds = null) { throw null; } public static Azure.Search.Documents.Models.IndexingResult IndexingResult(string key, string errorMessage, bool succeeded, int status) { throw null; } public static Azure.Search.Documents.Indexes.Models.LexicalAnalyzer LexicalAnalyzer(string oDataType, string name) { throw null; } public static Azure.Search.Documents.Indexes.Models.LexicalTokenizer LexicalTokenizer(string oDataType, string name) { throw null; } public static Azure.Search.Documents.Models.QueryAnswerResult QueryAnswerResult(double? score = default(double?), string key = null, string text = null, string highlights = null, System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } public static Azure.Search.Documents.Models.QueryCaptionResult QueryCaptionResult(string text = null, string highlights = null, System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } - public static Azure.Search.Documents.Models.QueryResultDocumentRerankerInput QueryResultDocumentRerankerInput(string title = null, string content = null, string keywords = null) { throw null; } - public static Azure.Search.Documents.Models.QueryResultDocumentSemanticField QueryResultDocumentSemanticField(string name = null, Azure.Search.Documents.Models.SemanticFieldState? state = default(Azure.Search.Documents.Models.SemanticFieldState?)) { throw null; } public static Azure.Search.Documents.Indexes.Models.ScoringFunction ScoringFunction(string type, string fieldName, double boost, Azure.Search.Documents.Indexes.Models.ScoringFunctionInterpolation? interpolation) { throw null; } public static Azure.Search.Documents.Indexes.Models.SearchIndexerError SearchIndexerError(string key, string errorMessage, int statusCode, string name, string details, string documentationLink) { throw null; } public static Azure.Search.Documents.Indexes.Models.SearchIndexerLimits SearchIndexerLimits(System.TimeSpan? maxRunTime, long? maxDocumentExtractionSize, long? maxDocumentContentCharactersToExtract) { throw null; } @@ -3634,15 +3220,12 @@ public static partial class SearchModelFactory public static Azure.Search.Documents.Indexes.Models.SearchServiceCounters SearchServiceCounters(Azure.Search.Documents.Indexes.Models.SearchResourceCounter documentCounter, Azure.Search.Documents.Indexes.Models.SearchResourceCounter indexCounter, Azure.Search.Documents.Indexes.Models.SearchResourceCounter indexerCounter, Azure.Search.Documents.Indexes.Models.SearchResourceCounter dataSourceCounter, Azure.Search.Documents.Indexes.Models.SearchResourceCounter storageSizeCounter, Azure.Search.Documents.Indexes.Models.SearchResourceCounter synonymMapCounter) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Search.Documents.Indexes.Models.SearchServiceCounters SearchServiceCounters(Azure.Search.Documents.Indexes.Models.SearchResourceCounter documentCounter, Azure.Search.Documents.Indexes.Models.SearchResourceCounter indexCounter, Azure.Search.Documents.Indexes.Models.SearchResourceCounter indexerCounter, Azure.Search.Documents.Indexes.Models.SearchResourceCounter dataSourceCounter, Azure.Search.Documents.Indexes.Models.SearchResourceCounter storageSizeCounter, Azure.Search.Documents.Indexes.Models.SearchResourceCounter synonymMapCounter, Azure.Search.Documents.Indexes.Models.SearchResourceCounter skillsetCounter) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Search.Documents.Indexes.Models.SearchServiceCounters SearchServiceCounters(Azure.Search.Documents.Indexes.Models.SearchResourceCounter documentCounter = null, Azure.Search.Documents.Indexes.Models.SearchResourceCounter indexCounter = null, Azure.Search.Documents.Indexes.Models.SearchResourceCounter indexerCounter = null, Azure.Search.Documents.Indexes.Models.SearchResourceCounter dataSourceCounter = null, Azure.Search.Documents.Indexes.Models.SearchResourceCounter storageSizeCounter = null, Azure.Search.Documents.Indexes.Models.SearchResourceCounter synonymMapCounter = null, Azure.Search.Documents.Indexes.Models.SearchResourceCounter skillsetCounter = null, Azure.Search.Documents.Indexes.Models.SearchResourceCounter vectorIndexSizeCounter = null) { throw null; } - public static Azure.Search.Documents.Indexes.Models.SearchServiceCounters SearchServiceCounters(Azure.Search.Documents.Indexes.Models.SearchResourceCounter aliasCounter = null, Azure.Search.Documents.Indexes.Models.SearchResourceCounter documentCounter = null, Azure.Search.Documents.Indexes.Models.SearchResourceCounter indexCounter = null, Azure.Search.Documents.Indexes.Models.SearchResourceCounter indexerCounter = null, Azure.Search.Documents.Indexes.Models.SearchResourceCounter dataSourceCounter = null, Azure.Search.Documents.Indexes.Models.SearchResourceCounter storageSizeCounter = null, Azure.Search.Documents.Indexes.Models.SearchResourceCounter synonymMapCounter = null, Azure.Search.Documents.Indexes.Models.SearchResourceCounter skillsetCounter = null, Azure.Search.Documents.Indexes.Models.SearchResourceCounter vectorIndexSizeCounter = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Search.Documents.Indexes.Models.SearchServiceLimits SearchServiceLimits(int? maxFieldsPerIndex, int? maxFieldNestingDepthPerIndex, int? maxComplexCollectionFieldsPerIndex, int? maxComplexObjectsInCollectionsPerDocument) { throw null; } public static Azure.Search.Documents.Indexes.Models.SearchServiceLimits SearchServiceLimits(int? maxFieldsPerIndex = default(int?), int? maxFieldNestingDepthPerIndex = default(int?), int? maxComplexCollectionFieldsPerIndex = default(int?), int? maxComplexObjectsInCollectionsPerDocument = default(int?), long? maxStoragePerIndexInBytes = default(long?)) { throw null; } public static Azure.Search.Documents.Indexes.Models.SearchServiceStatistics SearchServiceStatistics(Azure.Search.Documents.Indexes.Models.SearchServiceCounters counters, Azure.Search.Documents.Indexes.Models.SearchServiceLimits limits) { throw null; } public static Azure.Search.Documents.Models.SearchSuggestion SearchSuggestion(T document, string text) { throw null; } - public static Azure.Search.Documents.Models.SemanticDebugInfo SemanticDebugInfo(Azure.Search.Documents.Models.QueryResultDocumentSemanticField titleField = null, System.Collections.Generic.IEnumerable contentFields = null, System.Collections.Generic.IEnumerable keywordFields = null, Azure.Search.Documents.Models.QueryResultDocumentRerankerInput rerankerInput = null) { throw null; } public static Azure.Search.Documents.Models.SemanticSearchResult SemanticSearchResult(double? rerankerScore, System.Collections.Generic.IReadOnlyList captions) { throw null; } public static Azure.Search.Documents.Models.SemanticSearchResults SemanticSearchResults(System.Collections.Generic.IReadOnlyList answers, Azure.Search.Documents.Models.SemanticErrorReason? errorReason, Azure.Search.Documents.Models.SemanticSearchResultsType? resultsType) { throw null; } public static Azure.Search.Documents.Indexes.Models.SimilarityAlgorithm SimilarityAlgorithm(string oDataType) { throw null; } @@ -3680,30 +3263,16 @@ public partial class SearchResult { internal SearchResult() { } public T Document { get { throw null; } } - public System.Collections.Generic.IList DocumentDebugInfo { get { throw null; } } public System.Collections.Generic.IDictionary> Highlights { get { throw null; } } public double? Score { get { throw null; } } public Azure.Search.Documents.Models.SemanticSearchResult SemanticSearch { get { throw null; } } } - public partial class SearchScoreThreshold : Azure.Search.Documents.Models.VectorThreshold - { - public SearchScoreThreshold(double value) { } - public double Value { get { throw null; } set { } } - } public partial class SearchSuggestion { internal SearchSuggestion() { } public T Document { get { throw null; } } public string Text { get { throw null; } } } - public partial class SemanticDebugInfo - { - internal SemanticDebugInfo() { } - public System.Collections.Generic.IReadOnlyList ContentFields { get { throw null; } } - public System.Collections.Generic.IReadOnlyList KeywordFields { get { throw null; } } - public Azure.Search.Documents.Models.QueryResultDocumentRerankerInput RerankerInput { get { throw null; } } - public Azure.Search.Documents.Models.QueryResultDocumentSemanticField TitleField { get { throw null; } } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct SemanticErrorMode : System.IEquatable { @@ -3741,35 +3310,14 @@ internal SemanticDebugInfo() { } public static bool operator !=(Azure.Search.Documents.Models.SemanticErrorReason left, Azure.Search.Documents.Models.SemanticErrorReason right) { throw null; } public override string ToString() { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct SemanticFieldState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public SemanticFieldState(string value) { throw null; } - public static Azure.Search.Documents.Models.SemanticFieldState Partial { get { throw null; } } - public static Azure.Search.Documents.Models.SemanticFieldState Unused { get { throw null; } } - public static Azure.Search.Documents.Models.SemanticFieldState Used { get { throw null; } } - public bool Equals(Azure.Search.Documents.Models.SemanticFieldState 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.Search.Documents.Models.SemanticFieldState left, Azure.Search.Documents.Models.SemanticFieldState right) { throw null; } - public static implicit operator Azure.Search.Documents.Models.SemanticFieldState (string value) { throw null; } - public static bool operator !=(Azure.Search.Documents.Models.SemanticFieldState left, Azure.Search.Documents.Models.SemanticFieldState right) { throw null; } - public override string ToString() { throw null; } - } public partial class SemanticSearchOptions { public SemanticSearchOptions() { } - public Azure.Search.Documents.Models.QueryDebugMode? Debug { get { throw null; } set { } } public Azure.Search.Documents.Models.SemanticErrorMode? ErrorMode { get { throw null; } set { } } public System.TimeSpan? MaxWait { get { throw null; } set { } } public Azure.Search.Documents.Models.QueryAnswer QueryAnswer { get { throw null; } set { } } public Azure.Search.Documents.Models.QueryCaption QueryCaption { get { throw null; } set { } } public string SemanticConfigurationName { get { throw null; } set { } } - public System.Collections.Generic.IList SemanticFields { get { throw null; } } public string SemanticQuery { get { throw null; } set { } } } public partial class SemanticSearchResult @@ -3833,16 +3381,6 @@ public ValueFacetResult(long count, T value) { } public static bool operator !=(Azure.Search.Documents.Models.VectorFilterMode left, Azure.Search.Documents.Models.VectorFilterMode right) { throw null; } public override string ToString() { throw null; } } - public partial class VectorizableImageBinaryQuery : Azure.Search.Documents.Models.VectorQuery - { - public VectorizableImageBinaryQuery() { } - public string Base64Image { get { throw null; } set { } } - } - public partial class VectorizableImageUrlQuery : Azure.Search.Documents.Models.VectorQuery - { - public VectorizableImageUrlQuery() { } - public System.Uri Url { get { throw null; } set { } } - } public partial class VectorizableTextQuery : Azure.Search.Documents.Models.VectorQuery { public VectorizableTextQuery(string text) { } @@ -3860,7 +3398,6 @@ protected VectorQuery() { } public System.Collections.Generic.IList Fields { get { throw null; } } public int? KNearestNeighborsCount { get { throw null; } set { } } public double? Oversampling { get { throw null; } set { } } - public Azure.Search.Documents.Models.VectorThreshold Threshold { get { throw null; } set { } } public float? Weight { get { throw null; } set { } } } public partial class VectorSearchOptions @@ -3869,15 +3406,6 @@ public VectorSearchOptions() { } public Azure.Search.Documents.Models.VectorFilterMode? FilterMode { get { throw null; } set { } } public System.Collections.Generic.IList Queries { get { throw null; } } } - public partial class VectorSimilarityThreshold : Azure.Search.Documents.Models.VectorThreshold - { - public VectorSimilarityThreshold(double value) { } - public double Value { get { throw null; } set { } } - } - public abstract partial class VectorThreshold - { - protected VectorThreshold() { } - } } namespace Microsoft.Extensions.Azure { @@ -3887,5 +3415,7 @@ public static partial class SearchClientBuilderExtensions public static Azure.Core.Extensions.IAzureClientBuilder AddSearchClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddSearchIndexClient(this TBuilder builder, System.Uri endpoint, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddSearchIndexClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddSearchIndexerClient(this TBuilder builder, System.Uri endpoint, Azure.AzureKeyCredential credential) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilder { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddSearchIndexerClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } } } diff --git a/sdk/search/Azure.Search.Documents/assets.json b/sdk/search/Azure.Search.Documents/assets.json index 16f79264e79b5..aafd0fe3cdc6a 100644 --- a/sdk/search/Azure.Search.Documents/assets.json +++ b/sdk/search/Azure.Search.Documents/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/search/Azure.Search.Documents", - "Tag": "net/search/Azure.Search.Documents_52c4e21bfa" + "Tag": "net/search/Azure.Search.Documents_cd3c397d05" } diff --git a/sdk/search/Azure.Search.Documents/samples/Sample04_FieldBuilderIgnore.md b/sdk/search/Azure.Search.Documents/samples/Sample04_FieldBuilderIgnore.md index 4e1d3abe45675..fbf1b051ef4e8 100644 --- a/sdk/search/Azure.Search.Documents/samples/Sample04_FieldBuilderIgnore.md +++ b/sdk/search/Azure.Search.Documents/samples/Sample04_FieldBuilderIgnore.md @@ -102,7 +102,6 @@ SearchIndex index = new SearchIndex("movies") SearchableField genreField = new SearchableField("genre") { AnalyzerName = LexicalAnalyzerName.Values.EnLucene, - NormalizerName = LexicalNormalizerName.Lowercase, IsFacetable = true, IsFilterable = true }; diff --git a/sdk/search/Azure.Search.Documents/samples/Sample07_VectorSearch_UsingReducedEmbeddings.md b/sdk/search/Azure.Search.Documents/samples/Sample07_VectorSearch_UsingReducedEmbeddings.md index 68d5d1654c3e2..e91fce3841615 100644 --- a/sdk/search/Azure.Search.Documents/samples/Sample07_VectorSearch_UsingReducedEmbeddings.md +++ b/sdk/search/Azure.Search.Documents/samples/Sample07_VectorSearch_UsingReducedEmbeddings.md @@ -13,7 +13,7 @@ We will create an instace of `SearchIndex` and define `Hotel` fields. ```C# Snippet:Azure_Search_Documents_Tests_Samples_Sample07_Reduced_Vector_Search_Index string vectorSearchProfileName = "my-vector-profile"; string vectorSearchHnswConfig = "my-hsnw-vector-config"; -string deploymentId = "my-text-embedding-3-small"; +string deploymentName = "my-text-embedding-3-small"; int modelDimensions = 256; // Here's the reduced model dimensions string indexName = "hotel"; @@ -34,7 +34,7 @@ SearchIndex searchIndex = new(indexName) { new VectorSearchProfile(vectorSearchProfileName, vectorSearchHnswConfig) { - Vectorizer = "openai" + VectorizerName = "openai" } }, Algorithms = @@ -45,11 +45,11 @@ SearchIndex searchIndex = new(indexName) { new AzureOpenAIVectorizer("openai") { - AzureOpenAIParameters = new AzureOpenAIParameters() + Parameters = new AzureOpenAIVectorizerParameters() { ResourceUri = new Uri(Environment.GetEnvironmentVariable("OPENAI_ENDPOINT")), ApiKey = Environment.GetEnvironmentVariable("OPENAI_KEY"), - DeploymentId = deploymentId, + DeploymentName = deploymentName, ModelName = AzureOpenAIModelName.TextEmbedding3Small } } diff --git a/sdk/search/Azure.Search.Documents/samples/Sample07_VectorSearch_UsingSemanticHybridQuery.md b/sdk/search/Azure.Search.Documents/samples/Sample07_VectorSearch_UsingSemanticHybridQuery.md index acca19e1a1531..bdb591056f590 100644 --- a/sdk/search/Azure.Search.Documents/samples/Sample07_VectorSearch_UsingSemanticHybridQuery.md +++ b/sdk/search/Azure.Search.Documents/samples/Sample07_VectorSearch_UsingSemanticHybridQuery.md @@ -178,7 +178,6 @@ SearchResults response = await searchClient.SearchAsync( QueryCaption = new(QueryCaptionType.Extractive), QueryAnswer = new(QueryAnswerType.Extractive) }, - QueryLanguage = QueryLanguage.EnUs, QueryType = SearchQueryType.Semantic, }); diff --git a/sdk/search/Azure.Search.Documents/samples/Sample07_VectorSearch_UsingVectorizableTextQuery.md b/sdk/search/Azure.Search.Documents/samples/Sample07_VectorSearch_UsingVectorizableTextQuery.md index 0d9170915fa52..bf390ab2b1d61 100644 --- a/sdk/search/Azure.Search.Documents/samples/Sample07_VectorSearch_UsingVectorizableTextQuery.md +++ b/sdk/search/Azure.Search.Documents/samples/Sample07_VectorSearch_UsingVectorizableTextQuery.md @@ -11,7 +11,7 @@ We will create an instace of `SearchIndex` and define `Hotel` fields. ```C# Snippet:Azure_Search_Documents_Tests_Samples_Sample07_Vector_Search_Index_UsingVectorizableTextQuery string vectorSearchProfileName = "my-vector-profile"; string vectorSearchHnswConfig = "my-hsnw-vector-config"; -string deploymentId = "text-embedding-ada-002"; +string deploymentName = "text-embedding-ada-002"; int modelDimensions = 1536; string indexName = "hotel"; @@ -32,7 +32,7 @@ SearchIndex searchIndex = new(indexName) { new VectorSearchProfile(vectorSearchProfileName, vectorSearchHnswConfig) { - Vectorizer = "openai" + VectorizerName = "openai" } }, Algorithms = @@ -43,11 +43,11 @@ SearchIndex searchIndex = new(indexName) { new AzureOpenAIVectorizer("openai") { - AzureOpenAIParameters = new AzureOpenAIParameters() + Parameters = new AzureOpenAIVectorizerParameters() { ResourceUri = new Uri(Environment.GetEnvironmentVariable("OPENAI_ENDPOINT")), ApiKey = Environment.GetEnvironmentVariable("OPENAI_KEY"), - DeploymentId = deploymentId, + DeploymentName = deploymentName, ModelName = AzureOpenAIModelName.TextEmbeddingAda002 } } diff --git a/sdk/search/Azure.Search.Documents/samples/Sample08_SemanticSearch.md b/sdk/search/Azure.Search.Documents/samples/Sample08_SemanticSearch.md index 0d16a6cda6604..d06941df28b5f 100644 --- a/sdk/search/Azure.Search.Documents/samples/Sample08_SemanticSearch.md +++ b/sdk/search/Azure.Search.Documents/samples/Sample08_SemanticSearch.md @@ -125,7 +125,6 @@ SearchResults response = await searchClient.SearchAsync( QueryCaption = new(QueryCaptionType.Extractive), QueryAnswer = new(QueryAnswerType.Extractive) }, - QueryLanguage = QueryLanguage.EnUs, QueryType = SearchQueryType.Semantic }); @@ -177,7 +176,6 @@ SearchResults response = await searchClient.SearchAsync( QueryAnswer = new(QueryAnswerType.Extractive), SemanticQuery = "Is there any hotel located on the main commercial artery of the city in the heart of New York?" }, - QueryLanguage = QueryLanguage.EnUs, }); int count = 0; diff --git a/sdk/search/Azure.Search.Documents/src/Azure.Search.Documents.csproj b/sdk/search/Azure.Search.Documents/src/Azure.Search.Documents.csproj index 93d233bb99bcf..61eee85fb9532 100644 --- a/sdk/search/Azure.Search.Documents/src/Azure.Search.Documents.csproj +++ b/sdk/search/Azure.Search.Documents/src/Azure.Search.Documents.csproj @@ -1,7 +1,7 @@ Microsoft Azure.Search.Documents client library - 11.6.0-beta.5 + 11.6.0 11.5.1 diff --git a/sdk/search/Azure.Search.Documents/src/Batching/SearchIndexingBufferedSender.cs b/sdk/search/Azure.Search.Documents/src/Batching/SearchIndexingBufferedSender.cs index c30acb3eae4b7..8a5c01e65ede4 100644 --- a/sdk/search/Azure.Search.Documents/src/Batching/SearchIndexingBufferedSender.cs +++ b/sdk/search/Azure.Search.Documents/src/Batching/SearchIndexingBufferedSender.cs @@ -144,7 +144,7 @@ public SearchIndexingBufferedSender( /// #pragma warning disable CA1816 // Dispose methods should call SuppressFinalize void IDisposable.Dispose() => - DisposeAsync(async: false).EnsureCompleted(); + DisposeInternalAsync(async: false).EnsureCompleted(); #pragma warning restore CA1816 // Dispose methods should call SuppressFinalize /// @@ -155,7 +155,7 @@ void IDisposable.Dispose() => /// #pragma warning disable CA1816 // Dispose methods should call SuppressFinalize async ValueTask IAsyncDisposable.DisposeAsync() => - await DisposeAsync(async: true).ConfigureAwait(false); + await DisposeInternalAsync(async: true).ConfigureAwait(false); #pragma warning restore CA1816 // Dispose methods should call SuppressFinalize /// @@ -165,7 +165,7 @@ async ValueTask IAsyncDisposable.DisposeAsync() => /// /// Whether to call this sync or async. /// A Task that will wait until we're disposed. - internal async Task DisposeAsync(bool async) + internal async Task DisposeInternalAsync(bool async) { if (Interlocked.CompareExchange(ref _disposed, 1, 0) == 0) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/AliasesRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/AliasesRestClient.cs deleted file mode 100644 index 0be9b01ecc3a4..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/AliasesRestClient.cs +++ /dev/null @@ -1,413 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.Search.Documents.Indexes.Models; - -namespace Azure.Search.Documents -{ - internal partial class AliasesRestClient - { - private readonly HttpPipeline _pipeline; - private readonly string _endpoint; - private readonly Guid? _xMsClientRequestId; - private readonly string _apiVersion; - - /// The ClientDiagnostics is used to provide tracing support for the client library. - internal ClientDiagnostics ClientDiagnostics { get; } - - /// Initializes a new instance of AliasesRestClient. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The endpoint URL of the search service. - /// The tracking ID sent with the request to help with debugging. - /// Api Version. - /// , , or is null. - public AliasesRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2024-05-01-preview") - { - ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? throw new ArgumentNullException(nameof(endpoint)); - _xMsClientRequestId = xMsClientRequestId; - _apiVersion = apiVersion ?? throw new ArgumentNullException(nameof(apiVersion)); - } - - internal HttpMessage CreateCreateRequest(SearchAlias @alias) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); - uri.AppendPath("/aliases", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json; odata.metadata=minimal"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(@alias); - request.Content = content; - return message; - } - - /// Creates a new search alias. - /// The definition of the alias to create. - /// The cancellation token to use. - /// is null. - public async Task> CreateAsync(SearchAlias @alias, CancellationToken cancellationToken = default) - { - if (@alias == null) - { - throw new ArgumentNullException(nameof(@alias)); - } - - using var message = CreateCreateRequest(@alias); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 201: - { - SearchAlias value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = SearchAlias.DeserializeSearchAlias(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Creates a new search alias. - /// The definition of the alias to create. - /// The cancellation token to use. - /// is null. - public Response Create(SearchAlias @alias, CancellationToken cancellationToken = default) - { - if (@alias == null) - { - throw new ArgumentNullException(nameof(@alias)); - } - - using var message = CreateCreateRequest(@alias); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 201: - { - SearchAlias value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = SearchAlias.DeserializeSearchAlias(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListRequest() - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); - uri.AppendPath("/aliases", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json; odata.metadata=minimal"); - return message; - } - - /// Lists all aliases available for a search service. - /// The cancellation token to use. - public async Task> ListAsync(CancellationToken cancellationToken = default) - { - using var message = CreateListRequest(); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - ListAliasesResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ListAliasesResult.DeserializeListAliasesResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists all aliases available for a search service. - /// The cancellation token to use. - public Response List(CancellationToken cancellationToken = default) - { - using var message = CreateListRequest(); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - ListAliasesResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ListAliasesResult.DeserializeListAliasesResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCreateOrUpdateRequest(string aliasName, SearchAlias @alias, string ifMatch, string ifNoneMatch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); - uri.AppendPath("/aliases('", false); - uri.AppendPath(aliasName, true); - uri.AppendPath("')", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - if (ifMatch != null) - { - request.Headers.Add("If-Match", ifMatch); - } - if (ifNoneMatch != null) - { - request.Headers.Add("If-None-Match", ifNoneMatch); - } - request.Headers.Add("Prefer", "return=representation"); - request.Headers.Add("Accept", "application/json; odata.metadata=minimal"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(@alias); - request.Content = content; - return message; - } - - /// Creates a new search alias or updates an alias if it already exists. - /// The definition of the alias to create or update. - /// The definition of the alias to create or update. - /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. - /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// The cancellation token to use. - /// or is null. - public async Task> CreateOrUpdateAsync(string aliasName, SearchAlias @alias, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - if (aliasName == null) - { - throw new ArgumentNullException(nameof(aliasName)); - } - if (@alias == null) - { - throw new ArgumentNullException(nameof(@alias)); - } - - using var message = CreateCreateOrUpdateRequest(aliasName, @alias, ifMatch, ifNoneMatch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - { - SearchAlias value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = SearchAlias.DeserializeSearchAlias(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Creates a new search alias or updates an alias if it already exists. - /// The definition of the alias to create or update. - /// The definition of the alias to create or update. - /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. - /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// The cancellation token to use. - /// or is null. - public Response CreateOrUpdate(string aliasName, SearchAlias @alias, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - if (aliasName == null) - { - throw new ArgumentNullException(nameof(aliasName)); - } - if (@alias == null) - { - throw new ArgumentNullException(nameof(@alias)); - } - - using var message = CreateCreateOrUpdateRequest(aliasName, @alias, ifMatch, ifNoneMatch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - { - SearchAlias value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = SearchAlias.DeserializeSearchAlias(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string aliasName, string ifMatch, string ifNoneMatch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); - uri.AppendPath("/aliases('", false); - uri.AppendPath(aliasName, true); - uri.AppendPath("')", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - if (ifMatch != null) - { - request.Headers.Add("If-Match", ifMatch); - } - if (ifNoneMatch != null) - { - request.Headers.Add("If-None-Match", ifNoneMatch); - } - request.Headers.Add("Accept", "application/json; odata.metadata=minimal"); - return message; - } - - /// Deletes a search alias and its associated mapping to an index. This operation is permanent, with no recovery option. The mapped index is untouched by this operation. - /// The name of the alias to delete. - /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. - /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// The cancellation token to use. - /// is null. - public async Task DeleteAsync(string aliasName, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - if (aliasName == null) - { - throw new ArgumentNullException(nameof(aliasName)); - } - - using var message = CreateDeleteRequest(aliasName, ifMatch, ifNoneMatch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 204: - case 404: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes a search alias and its associated mapping to an index. This operation is permanent, with no recovery option. The mapped index is untouched by this operation. - /// The name of the alias to delete. - /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. - /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// The cancellation token to use. - /// is null. - public Response Delete(string aliasName, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - if (aliasName == null) - { - throw new ArgumentNullException(nameof(aliasName)); - } - - using var message = CreateDeleteRequest(aliasName, ifMatch, ifNoneMatch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 204: - case 404: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string aliasName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); - uri.AppendPath("/aliases('", false); - uri.AppendPath(aliasName, true); - uri.AppendPath("')", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json; odata.metadata=minimal"); - return message; - } - - /// Retrieves an alias definition. - /// The name of the alias to retrieve. - /// The cancellation token to use. - /// is null. - public async Task> GetAsync(string aliasName, CancellationToken cancellationToken = default) - { - if (aliasName == null) - { - throw new ArgumentNullException(nameof(aliasName)); - } - - using var message = CreateGetRequest(aliasName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SearchAlias value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = SearchAlias.DeserializeSearchAlias(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Retrieves an alias definition. - /// The name of the alias to retrieve. - /// The cancellation token to use. - /// is null. - public Response Get(string aliasName, CancellationToken cancellationToken = default) - { - if (aliasName == null) - { - throw new ArgumentNullException(nameof(aliasName)); - } - - using var message = CreateGetRequest(aliasName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SearchAlias value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = SearchAlias.DeserializeSearchAlias(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/DataSourcesRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/DataSourcesRestClient.cs index 92d8c9916a50d..dc074f6c6e40a 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/DataSourcesRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/DataSourcesRestClient.cs @@ -32,7 +32,7 @@ internal partial class DataSourcesRestClient /// The tracking ID sent with the request to help with debugging. /// Api Version. /// , , or is null. - public DataSourcesRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2024-05-01-preview") + public DataSourcesRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2024-07-01") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); @@ -41,7 +41,7 @@ public DataSourcesRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline p _apiVersion = apiVersion ?? throw new ArgumentNullException(nameof(apiVersion)); } - internal HttpMessage CreateCreateOrUpdateRequest(string dataSourceName, SearchIndexerDataSourceConnection dataSource, string ifMatch, string ifNoneMatch, bool? skipIndexerResetRequirementForCache) + internal HttpMessage CreateCreateOrUpdateRequest(string dataSourceName, SearchIndexerDataSourceConnection dataSource, string ifMatch, string ifNoneMatch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -52,10 +52,6 @@ internal HttpMessage CreateCreateOrUpdateRequest(string dataSourceName, SearchIn uri.AppendPath(dataSourceName, true); uri.AppendPath("')", false); uri.AppendQuery("api-version", _apiVersion, true); - if (skipIndexerResetRequirementForCache != null) - { - uri.AppendQuery("ignoreResetRequirements", skipIndexerResetRequirementForCache.Value, true); - } request.Uri = uri; if (ifMatch != null) { @@ -79,10 +75,9 @@ internal HttpMessage CreateCreateOrUpdateRequest(string dataSourceName, SearchIn /// The definition of the datasource to create or update. /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// Ignores cache reset requirements. /// The cancellation token to use. /// or is null. - public async Task> CreateOrUpdateAsync(string dataSourceName, SearchIndexerDataSourceConnection dataSource, string ifMatch = null, string ifNoneMatch = null, bool? skipIndexerResetRequirementForCache = null, CancellationToken cancellationToken = default) + public async Task> CreateOrUpdateAsync(string dataSourceName, SearchIndexerDataSourceConnection dataSource, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { if (dataSourceName == null) { @@ -93,7 +88,7 @@ public async Task> CreateOrUpdateAsy throw new ArgumentNullException(nameof(dataSource)); } - using var message = CreateCreateOrUpdateRequest(dataSourceName, dataSource, ifMatch, ifNoneMatch, skipIndexerResetRequirementForCache); + using var message = CreateCreateOrUpdateRequest(dataSourceName, dataSource, ifMatch, ifNoneMatch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -115,10 +110,9 @@ public async Task> CreateOrUpdateAsy /// The definition of the datasource to create or update. /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// Ignores cache reset requirements. /// The cancellation token to use. /// or is null. - public Response CreateOrUpdate(string dataSourceName, SearchIndexerDataSourceConnection dataSource, string ifMatch = null, string ifNoneMatch = null, bool? skipIndexerResetRequirementForCache = null, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string dataSourceName, SearchIndexerDataSourceConnection dataSource, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { if (dataSourceName == null) { @@ -129,7 +123,7 @@ public Response CreateOrUpdate(string dataSou throw new ArgumentNullException(nameof(dataSource)); } - using var message = CreateCreateOrUpdateRequest(dataSourceName, dataSource, ifMatch, ifNoneMatch, skipIndexerResetRequirementForCache); + using var message = CreateCreateOrUpdateRequest(dataSourceName, dataSource, ifMatch, ifNoneMatch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/DocumentsRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/DocumentsRestClient.cs index f86ce480b4b98..735dd1c0c5c38 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/DocumentsRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/DocumentsRestClient.cs @@ -36,7 +36,7 @@ internal partial class DocumentsRestClient /// Api Version. /// , , , or is null. /// is an empty string, and was expected to be non-empty. - public DocumentsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string indexName, Guid? xMsClientRequestId = null, string apiVersion = "2024-05-01-preview") + public DocumentsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string indexName, Guid? xMsClientRequestId = null, string apiVersion = "2024-07-01") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/IndexersRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/IndexersRestClient.cs index 6501aa941e7a7..aa690713035b8 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/IndexersRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/IndexersRestClient.cs @@ -12,7 +12,6 @@ using Azure.Core; using Azure.Core.Pipeline; using Azure.Search.Documents.Indexes.Models; -using Azure.Search.Documents.Models; namespace Azure.Search.Documents { @@ -33,7 +32,7 @@ internal partial class IndexersRestClient /// The tracking ID sent with the request to help with debugging. /// Api Version. /// , , or is null. - public IndexersRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2024-05-01-preview") + public IndexersRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2024-07-01") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); @@ -102,81 +101,6 @@ public Response Reset(string indexerName, CancellationToken cancellationToken = } } - internal HttpMessage CreateResetDocsRequest(string indexerName, bool? overwrite, ResetDocumentOptions keysOrIds) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); - uri.AppendPath("/indexers('", false); - uri.AppendPath(indexerName, true); - uri.AppendPath("')/search.resetdocs", false); - if (overwrite != null) - { - uri.AppendQuery("overwrite", overwrite.Value, true); - } - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json; odata.metadata=minimal"); - if (keysOrIds != null) - { - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(keysOrIds); - request.Content = content; - } - return message; - } - - /// Resets specific documents in the datasource to be selectively re-ingested by the indexer. - /// The name of the indexer to reset documents for. - /// If false, keys or ids will be appended to existing ones. If true, only the keys or ids in this payload will be queued to be re-ingested. - /// The to use. - /// The cancellation token to use. - /// is null. - public async Task ResetDocsAsync(string indexerName, bool? overwrite = null, ResetDocumentOptions keysOrIds = null, CancellationToken cancellationToken = default) - { - if (indexerName == null) - { - throw new ArgumentNullException(nameof(indexerName)); - } - - using var message = CreateResetDocsRequest(indexerName, overwrite, keysOrIds); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Resets specific documents in the datasource to be selectively re-ingested by the indexer. - /// The name of the indexer to reset documents for. - /// If false, keys or ids will be appended to existing ones. If true, only the keys or ids in this payload will be queued to be re-ingested. - /// The to use. - /// The cancellation token to use. - /// is null. - public Response ResetDocs(string indexerName, bool? overwrite = null, ResetDocumentOptions keysOrIds = null, CancellationToken cancellationToken = default) - { - if (indexerName == null) - { - throw new ArgumentNullException(nameof(indexerName)); - } - - using var message = CreateResetDocsRequest(indexerName, overwrite, keysOrIds); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - internal HttpMessage CreateRunRequest(string indexerName) { var message = _pipeline.CreateMessage(); @@ -237,7 +161,7 @@ public Response Run(string indexerName, CancellationToken cancellationToken = de } } - internal HttpMessage CreateCreateOrUpdateRequest(string indexerName, SearchIndexer indexer, string ifMatch, string ifNoneMatch, bool? skipIndexerResetRequirementForCache, bool? disableCacheReprocessingChangeDetection) + internal HttpMessage CreateCreateOrUpdateRequest(string indexerName, SearchIndexer indexer, string ifMatch, string ifNoneMatch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -248,14 +172,6 @@ internal HttpMessage CreateCreateOrUpdateRequest(string indexerName, SearchIndex uri.AppendPath(indexerName, true); uri.AppendPath("')", false); uri.AppendQuery("api-version", _apiVersion, true); - if (skipIndexerResetRequirementForCache != null) - { - uri.AppendQuery("ignoreResetRequirements", skipIndexerResetRequirementForCache.Value, true); - } - if (disableCacheReprocessingChangeDetection != null) - { - uri.AppendQuery("disableCacheReprocessingChangeDetection", disableCacheReprocessingChangeDetection.Value, true); - } request.Uri = uri; if (ifMatch != null) { @@ -279,11 +195,9 @@ internal HttpMessage CreateCreateOrUpdateRequest(string indexerName, SearchIndex /// The definition of the indexer to create or update. /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// Ignores cache reset requirements. - /// Disables cache reprocessing change detection. /// The cancellation token to use. /// or is null. - public async Task> CreateOrUpdateAsync(string indexerName, SearchIndexer indexer, string ifMatch = null, string ifNoneMatch = null, bool? skipIndexerResetRequirementForCache = null, bool? disableCacheReprocessingChangeDetection = null, CancellationToken cancellationToken = default) + public async Task> CreateOrUpdateAsync(string indexerName, SearchIndexer indexer, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { if (indexerName == null) { @@ -294,7 +208,7 @@ public async Task> CreateOrUpdateAsync(string indexerNam throw new ArgumentNullException(nameof(indexer)); } - using var message = CreateCreateOrUpdateRequest(indexerName, indexer, ifMatch, ifNoneMatch, skipIndexerResetRequirementForCache, disableCacheReprocessingChangeDetection); + using var message = CreateCreateOrUpdateRequest(indexerName, indexer, ifMatch, ifNoneMatch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -316,11 +230,9 @@ public async Task> CreateOrUpdateAsync(string indexerNam /// The definition of the indexer to create or update. /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// Ignores cache reset requirements. - /// Disables cache reprocessing change detection. /// The cancellation token to use. /// or is null. - public Response CreateOrUpdate(string indexerName, SearchIndexer indexer, string ifMatch = null, string ifNoneMatch = null, bool? skipIndexerResetRequirementForCache = null, bool? disableCacheReprocessingChangeDetection = null, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string indexerName, SearchIndexer indexer, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { if (indexerName == null) { @@ -331,7 +243,7 @@ public Response CreateOrUpdate(string indexerName, SearchIndexer throw new ArgumentNullException(nameof(indexer)); } - using var message = CreateCreateOrUpdateRequest(indexerName, indexer, ifMatch, ifNoneMatch, skipIndexerResetRequirementForCache, disableCacheReprocessingChangeDetection); + using var message = CreateCreateOrUpdateRequest(indexerName, indexer, ifMatch, ifNoneMatch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/IndexesRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/IndexesRestClient.cs index 81a7679c9a41a..2280480e9e27b 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/IndexesRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/IndexesRestClient.cs @@ -32,7 +32,7 @@ internal partial class IndexesRestClient /// The tracking ID sent with the request to help with debugging. /// Api Version. /// , , or is null. - public IndexesRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2024-05-01-preview") + public IndexesRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2024-07-01") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AIServicesVisionParameters.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AIServicesVisionParameters.Serialization.cs deleted file mode 100644 index 4f640c436afe2..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AIServicesVisionParameters.Serialization.cs +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.Search.Documents.Indexes.Models -{ - public partial class AIServicesVisionParameters : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (ModelVersion != null) - { - writer.WritePropertyName("modelVersion"u8); - writer.WriteStringValue(ModelVersion); - } - else - { - writer.WriteNull("modelVersion"); - } - writer.WritePropertyName("resourceUri"u8); - writer.WriteStringValue(ResourceUri.AbsoluteUri); - if (Optional.IsDefined(ApiKey)) - { - writer.WritePropertyName("apiKey"u8); - writer.WriteStringValue(ApiKey); - } - if (Optional.IsDefined(AuthIdentity)) - { - if (AuthIdentity != null) - { - writer.WritePropertyName("authIdentity"u8); - writer.WriteObjectValue(AuthIdentity); - } - else - { - writer.WriteNull("authIdentity"); - } - } - writer.WriteEndObject(); - } - - internal static AIServicesVisionParameters DeserializeAIServicesVisionParameters(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string modelVersion = default; - Uri resourceUri = default; - string apiKey = default; - SearchIndexerDataIdentity authIdentity = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("modelVersion"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - modelVersion = null; - continue; - } - modelVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("resourceUri"u8)) - { - resourceUri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("apiKey"u8)) - { - apiKey = property.Value.GetString(); - continue; - } - if (property.NameEquals("authIdentity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - authIdentity = null; - continue; - } - authIdentity = SearchIndexerDataIdentity.DeserializeSearchIndexerDataIdentity(property.Value); - continue; - } - } - return new AIServicesVisionParameters(modelVersion, resourceUri, apiKey, authIdentity); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static AIServicesVisionParameters FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeAIServicesVisionParameters(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AIServicesVisionParameters.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AIServicesVisionParameters.cs deleted file mode 100644 index 0009bf7e1e56b..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AIServicesVisionParameters.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.Search.Documents.Indexes.Models -{ - /// Specifies the AI Services Vision parameters for vectorizing a query image or text. - public partial class AIServicesVisionParameters - { - /// Initializes a new instance of . - /// The version of the model to use when calling the AI Services Vision service. It will default to the latest available when not specified. - /// The resource URI of the AI Services resource. - /// is null. - public AIServicesVisionParameters(string modelVersion, Uri resourceUri) - { - Argument.AssertNotNull(resourceUri, nameof(resourceUri)); - - ModelVersion = modelVersion; - ResourceUri = resourceUri; - } - - /// Initializes a new instance of . - /// The version of the model to use when calling the AI Services Vision service. It will default to the latest available when not specified. - /// The resource URI of the AI Services resource. - /// API key of the designated AI Services resource. - /// - /// The user-assigned managed identity used for outbound connections. If an authResourceId is provided and it's not specified, the system-assigned managed identity is used. On updates to the index, if the identity is unspecified, the value remains unchanged. If set to "none", the value of this property is cleared. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - internal AIServicesVisionParameters(string modelVersion, Uri resourceUri, string apiKey, SearchIndexerDataIdentity authIdentity) - { - ModelVersion = modelVersion; - ResourceUri = resourceUri; - ApiKey = apiKey; - AuthIdentity = authIdentity; - } - - /// The version of the model to use when calling the AI Services Vision service. It will default to the latest available when not specified. - public string ModelVersion { get; set; } - /// The resource URI of the AI Services resource. - public Uri ResourceUri { get; set; } - /// API key of the designated AI Services resource. - public string ApiKey { get; set; } - /// - /// The user-assigned managed identity used for outbound connections. If an authResourceId is provided and it's not specified, the system-assigned managed identity is used. On updates to the index, if the identity is unspecified, the value remains unchanged. If set to "none", the value of this property is cleared. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - public SearchIndexerDataIdentity AuthIdentity { get; set; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AIServicesVisionVectorizer.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AIServicesVisionVectorizer.Serialization.cs deleted file mode 100644 index 19e9e761c2b9c..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AIServicesVisionVectorizer.Serialization.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Search.Documents.Indexes.Models -{ - public partial class AIServicesVisionVectorizer : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(AIServicesVisionParameters)) - { - writer.WritePropertyName("aiServicesVisionParameters"u8); - writer.WriteObjectValue(AIServicesVisionParameters); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - writer.WriteEndObject(); - } - - internal static AIServicesVisionVectorizer DeserializeAIServicesVisionVectorizer(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - AIServicesVisionParameters aiServicesVisionParameters = default; - string name = default; - VectorSearchVectorizerKind kind = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("aiServicesVisionParameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - aiServicesVisionParameters = AIServicesVisionParameters.DeserializeAIServicesVisionParameters(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("kind"u8)) - { - kind = new VectorSearchVectorizerKind(property.Value.GetString()); - continue; - } - } - return new AIServicesVisionVectorizer(name, kind, aiServicesVisionParameters); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new AIServicesVisionVectorizer FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeAIServicesVisionVectorizer(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AIServicesVisionVectorizer.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AIServicesVisionVectorizer.cs deleted file mode 100644 index 571ffe2d49776..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AIServicesVisionVectorizer.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.Search.Documents.Indexes.Models -{ - /// Specifies the AI Services Vision parameters for vectorizing a query image or text. - public partial class AIServicesVisionVectorizer : VectorSearchVectorizer - { - /// Initializes a new instance of . - /// The name to associate with this particular vectorization method. - /// is null. - public AIServicesVisionVectorizer(string name) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - - Kind = VectorSearchVectorizerKind.AIServicesVision; - } - - /// Initializes a new instance of . - /// The name to associate with this particular vectorization method. - /// The name of the kind of vectorization method being configured for use with vector search. - /// Contains the parameters specific to AI Services Vision embedding vectorization. - internal AIServicesVisionVectorizer(string name, VectorSearchVectorizerKind kind, AIServicesVisionParameters aiServicesVisionParameters) : base(name, kind) - { - AIServicesVisionParameters = aiServicesVisionParameters; - Kind = kind; - } - - /// Contains the parameters specific to AI Services Vision embedding vectorization. - public AIServicesVisionParameters AIServicesVisionParameters { get; set; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AIStudioModelCatalogName.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AIStudioModelCatalogName.cs deleted file mode 100644 index a39bd282dc8d8..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AIStudioModelCatalogName.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.Search.Documents.Indexes.Models -{ - /// The name of the embedding model from the Azure AI Studio Catalog that will be called. - public readonly partial struct AIStudioModelCatalogName : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public AIStudioModelCatalogName(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string OpenAIClipImageTextEmbeddingsVitBasePatch32Value = "OpenAI-CLIP-Image-Text-Embeddings-vit-base-patch32"; - private const string OpenAIClipImageTextEmbeddingsViTLargePatch14336Value = "OpenAI-CLIP-Image-Text-Embeddings-ViT-Large-Patch14-336"; - private const string FacebookDinoV2ImageEmbeddingsViTBaseValue = "Facebook-DinoV2-Image-Embeddings-ViT-Base"; - private const string FacebookDinoV2ImageEmbeddingsViTGiantValue = "Facebook-DinoV2-Image-Embeddings-ViT-Giant"; - private const string CohereEmbedV3EnglishValue = "Cohere-embed-v3-english"; - private const string CohereEmbedV3MultilingualValue = "Cohere-embed-v3-multilingual"; - - /// OpenAI-CLIP-Image-Text-Embeddings-vit-base-patch32. - public static AIStudioModelCatalogName OpenAIClipImageTextEmbeddingsVitBasePatch32 { get; } = new AIStudioModelCatalogName(OpenAIClipImageTextEmbeddingsVitBasePatch32Value); - /// OpenAI-CLIP-Image-Text-Embeddings-ViT-Large-Patch14-336. - public static AIStudioModelCatalogName OpenAIClipImageTextEmbeddingsViTLargePatch14336 { get; } = new AIStudioModelCatalogName(OpenAIClipImageTextEmbeddingsViTLargePatch14336Value); - /// Facebook-DinoV2-Image-Embeddings-ViT-Base. - public static AIStudioModelCatalogName FacebookDinoV2ImageEmbeddingsViTBase { get; } = new AIStudioModelCatalogName(FacebookDinoV2ImageEmbeddingsViTBaseValue); - /// Facebook-DinoV2-Image-Embeddings-ViT-Giant. - public static AIStudioModelCatalogName FacebookDinoV2ImageEmbeddingsViTGiant { get; } = new AIStudioModelCatalogName(FacebookDinoV2ImageEmbeddingsViTGiantValue); - /// Cohere-embed-v3-english. - public static AIStudioModelCatalogName CohereEmbedV3English { get; } = new AIStudioModelCatalogName(CohereEmbedV3EnglishValue); - /// Cohere-embed-v3-multilingual. - public static AIStudioModelCatalogName CohereEmbedV3Multilingual { get; } = new AIStudioModelCatalogName(CohereEmbedV3MultilingualValue); - /// Determines if two values are the same. - public static bool operator ==(AIStudioModelCatalogName left, AIStudioModelCatalogName right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(AIStudioModelCatalogName left, AIStudioModelCatalogName right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator AIStudioModelCatalogName(string value) => new AIStudioModelCatalogName(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AIStudioModelCatalogName other && Equals(other); - /// - public bool Equals(AIStudioModelCatalogName other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AnalyzeTextOptions.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AnalyzeTextOptions.Serialization.cs index f3416858af7ff..2235bef4a688d 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AnalyzeTextOptions.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/AnalyzeTextOptions.Serialization.cs @@ -27,11 +27,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("tokenizer"u8); writer.WriteStringValue(TokenizerName.Value.ToString()); } - if (Optional.IsDefined(NormalizerName)) - { - writer.WritePropertyName("normalizer"u8); - writer.WriteStringValue(NormalizerName.Value.ToString()); - } if (Optional.IsCollectionDefined(TokenFilters)) { writer.WritePropertyName("tokenFilters"u8); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AnalyzeTextOptions.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AnalyzeTextOptions.cs index e05de3bfdeb8e..688a7d301346e 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AnalyzeTextOptions.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/AnalyzeTextOptions.cs @@ -27,17 +27,15 @@ public AnalyzeTextOptions(string text) /// Initializes a new instance of . /// The text to break into tokens. - /// The name of the analyzer to use to break the given text. - /// The name of the tokenizer to use to break the given text. - /// The name of the normalizer to use to normalize the given text. - /// An optional list of token filters to use when breaking the given text. - /// An optional list of character filters to use when breaking the given text. - internal AnalyzeTextOptions(string text, LexicalAnalyzerName? analyzerName, LexicalTokenizerName? tokenizerName, LexicalNormalizerName? normalizerName, IList tokenFilters, IList charFilters) + /// The name of the analyzer to use to break the given text. If this parameter is not specified, you must specify a tokenizer instead. The tokenizer and analyzer parameters are mutually exclusive. + /// The name of the tokenizer to use to break the given text. If this parameter is not specified, you must specify an analyzer instead. The tokenizer and analyzer parameters are mutually exclusive. + /// An optional list of token filters to use when breaking the given text. This parameter can only be set when using the tokenizer parameter. + /// An optional list of character filters to use when breaking the given text. This parameter can only be set when using the tokenizer parameter. + internal AnalyzeTextOptions(string text, LexicalAnalyzerName? analyzerName, LexicalTokenizerName? tokenizerName, IList tokenFilters, IList charFilters) { Text = text; AnalyzerName = analyzerName; TokenizerName = tokenizerName; - NormalizerName = normalizerName; TokenFilters = tokenFilters; CharFilters = charFilters; } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningParameters.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningParameters.Serialization.cs deleted file mode 100644 index 90e61a6cdd1a6..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningParameters.Serialization.cs +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.Search.Documents.Indexes.Models -{ - public partial class AzureMachineLearningParameters : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (ScoringUri != null) - { - writer.WritePropertyName("uri"u8); - writer.WriteStringValue(ScoringUri.AbsoluteUri); - } - else - { - writer.WriteNull("uri"); - } - if (Optional.IsDefined(AuthenticationKey)) - { - if (AuthenticationKey != null) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(AuthenticationKey); - } - else - { - writer.WriteNull("key"); - } - } - if (Optional.IsDefined(ResourceId)) - { - if (ResourceId != null) - { - writer.WritePropertyName("resourceId"u8); - writer.WriteStringValue(ResourceId); - } - else - { - writer.WriteNull("resourceId"); - } - } - if (Optional.IsDefined(Timeout)) - { - if (Timeout != null) - { - writer.WritePropertyName("timeout"u8); - writer.WriteStringValue(Timeout.Value, "P"); - } - else - { - writer.WriteNull("timeout"); - } - } - if (Optional.IsDefined(Region)) - { - if (Region != null) - { - writer.WritePropertyName("region"u8); - writer.WriteStringValue(Region); - } - else - { - writer.WriteNull("region"); - } - } - if (Optional.IsDefined(ModelName)) - { - writer.WritePropertyName("modelName"u8); - writer.WriteStringValue(ModelName.Value.ToString()); - } - writer.WriteEndObject(); - } - - internal static AzureMachineLearningParameters DeserializeAzureMachineLearningParameters(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Uri uri = default; - string key = default; - string resourceId = default; - TimeSpan? timeout = default; - string region = default; - AIStudioModelCatalogName? modelName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("uri"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - uri = null; - continue; - } - uri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("key"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - key = null; - continue; - } - key = property.Value.GetString(); - continue; - } - if (property.NameEquals("resourceId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - resourceId = null; - continue; - } - resourceId = property.Value.GetString(); - continue; - } - if (property.NameEquals("timeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - timeout = null; - continue; - } - timeout = property.Value.GetTimeSpan("P"); - continue; - } - if (property.NameEquals("region"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - region = null; - continue; - } - region = property.Value.GetString(); - continue; - } - if (property.NameEquals("modelName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - modelName = new AIStudioModelCatalogName(property.Value.GetString()); - continue; - } - } - return new AzureMachineLearningParameters( - uri, - key, - resourceId, - timeout, - region, - modelName); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static AzureMachineLearningParameters FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeAzureMachineLearningParameters(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningParameters.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningParameters.cs deleted file mode 100644 index 98d1b67d46aea..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningParameters.cs +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.Search.Documents.Indexes.Models -{ - /// Specifies the properties for connecting to an AML vectorizer. - public partial class AzureMachineLearningParameters - { - /// Initializes a new instance of . - /// (Required for no authentication or key authentication) The scoring URI of the AML service to which the JSON payload will be sent. Only the https URI scheme is allowed. - public AzureMachineLearningParameters(Uri scoringUri) - { - ScoringUri = scoringUri; - } - - /// Initializes a new instance of . - /// (Required for no authentication or key authentication) The scoring URI of the AML service to which the JSON payload will be sent. Only the https URI scheme is allowed. - /// (Required for key authentication) The key for the AML service. - /// (Required for token authentication). The Azure Resource Manager resource ID of the AML service. It should be in the format subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.MachineLearningServices/workspaces/{workspace-name}/services/{service_name}. - /// (Optional) When specified, indicates the timeout for the http client making the API call. - /// (Optional for token authentication). The region the AML service is deployed in. - /// The name of the embedding model from the Azure AI Studio Catalog that is deployed at the provided endpoint. - internal AzureMachineLearningParameters(Uri scoringUri, string authenticationKey, string resourceId, TimeSpan? timeout, string region, AIStudioModelCatalogName? modelName) - { - ScoringUri = scoringUri; - AuthenticationKey = authenticationKey; - ResourceId = resourceId; - Timeout = timeout; - Region = region; - ModelName = modelName; - } - - /// (Required for no authentication or key authentication) The scoring URI of the AML service to which the JSON payload will be sent. Only the https URI scheme is allowed. - public Uri ScoringUri { get; set; } - /// (Required for key authentication) The key for the AML service. - public string AuthenticationKey { get; set; } - /// (Required for token authentication). The Azure Resource Manager resource ID of the AML service. It should be in the format subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.MachineLearningServices/workspaces/{workspace-name}/services/{service_name}. - public string ResourceId { get; set; } - /// (Optional) When specified, indicates the timeout for the http client making the API call. - public TimeSpan? Timeout { get; set; } - /// (Optional for token authentication). The region the AML service is deployed in. - public string Region { get; set; } - /// The name of the embedding model from the Azure AI Studio Catalog that is deployed at the provided endpoint. - public AIStudioModelCatalogName? ModelName { get; set; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningSkill.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningSkill.Serialization.cs deleted file mode 100644 index 3e61c144e65fd..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningSkill.Serialization.cs +++ /dev/null @@ -1,278 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.Search.Documents.Indexes.Models -{ - public partial class AzureMachineLearningSkill : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ScoringUri)) - { - if (ScoringUri != null) - { - writer.WritePropertyName("uri"u8); - writer.WriteStringValue(ScoringUri.AbsoluteUri); - } - else - { - writer.WriteNull("uri"); - } - } - if (Optional.IsDefined(AuthenticationKey)) - { - if (AuthenticationKey != null) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(AuthenticationKey); - } - else - { - writer.WriteNull("key"); - } - } - if (Optional.IsDefined(RawResourceId)) - { - if (RawResourceId != null) - { - writer.WritePropertyName("resourceId"u8); - writer.WriteStringValue(RawResourceId); - } - else - { - writer.WriteNull("resourceId"); - } - } - if (Optional.IsDefined(Timeout)) - { - if (Timeout != null) - { - writer.WritePropertyName("timeout"u8); - writer.WriteStringValue(Timeout.Value, "P"); - } - else - { - writer.WriteNull("timeout"); - } - } - if (Optional.IsDefined(RawLocation)) - { - if (RawLocation != null) - { - writer.WritePropertyName("region"u8); - writer.WriteStringValue(RawLocation); - } - else - { - writer.WriteNull("region"); - } - } - if (Optional.IsDefined(DegreeOfParallelism)) - { - if (DegreeOfParallelism != null) - { - writer.WritePropertyName("degreeOfParallelism"u8); - writer.WriteNumberValue(DegreeOfParallelism.Value); - } - else - { - writer.WriteNull("degreeOfParallelism"); - } - } - writer.WritePropertyName("@odata.type"u8); - writer.WriteStringValue(ODataType); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Context)) - { - writer.WritePropertyName("context"u8); - writer.WriteStringValue(Context); - } - writer.WritePropertyName("inputs"u8); - writer.WriteStartArray(); - foreach (var item in Inputs) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("outputs"u8); - writer.WriteStartArray(); - foreach (var item in Outputs) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WriteEndObject(); - } - - internal static AzureMachineLearningSkill DeserializeAzureMachineLearningSkill(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Uri uri = default; - string key = default; - string resourceId = default; - TimeSpan? timeout = default; - string region = default; - int? degreeOfParallelism = default; - string odataType = default; - string name = default; - string description = default; - string context = default; - IList inputs = default; - IList outputs = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("uri"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - uri = null; - continue; - } - uri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("key"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - key = null; - continue; - } - key = property.Value.GetString(); - continue; - } - if (property.NameEquals("resourceId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - resourceId = null; - continue; - } - resourceId = property.Value.GetString(); - continue; - } - if (property.NameEquals("timeout"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - timeout = null; - continue; - } - timeout = property.Value.GetTimeSpan("P"); - continue; - } - if (property.NameEquals("region"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - region = null; - continue; - } - region = property.Value.GetString(); - continue; - } - if (property.NameEquals("degreeOfParallelism"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - degreeOfParallelism = null; - continue; - } - degreeOfParallelism = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("@odata.type"u8)) - { - odataType = property.Value.GetString(); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("context"u8)) - { - context = property.Value.GetString(); - continue; - } - if (property.NameEquals("inputs"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(InputFieldMappingEntry.DeserializeInputFieldMappingEntry(item)); - } - inputs = array; - continue; - } - if (property.NameEquals("outputs"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(OutputFieldMappingEntry.DeserializeOutputFieldMappingEntry(item)); - } - outputs = array; - continue; - } - } - return new AzureMachineLearningSkill( - odataType, - name, - description, - context, - inputs, - outputs, - uri, - key, - resourceId, - timeout, - region, - degreeOfParallelism); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new AzureMachineLearningSkill FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeAzureMachineLearningSkill(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningSkill.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningSkill.cs deleted file mode 100644 index a8485c08910d7..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningSkill.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.Search.Documents.Indexes.Models -{ - /// The AML skill allows you to extend AI enrichment with a custom Azure Machine Learning (AML) model. Once an AML model is trained and deployed, an AML skill integrates it into AI enrichment. - public partial class AzureMachineLearningSkill : SearchIndexerSkill - { - /// Initializes a new instance of . - /// A URI fragment specifying the type of skill. - /// The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. - /// The description of the skill which describes the inputs, outputs, and usage of the skill. - /// Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. - /// Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - /// The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - /// (Required for no authentication or key authentication) The scoring URI of the AML service to which the JSON payload will be sent. Only the https URI scheme is allowed. - /// (Required for key authentication) The key for the AML service. - /// (Required for token authentication). The Azure Resource Manager resource ID of the AML service. It should be in the format subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.MachineLearningServices/workspaces/{workspace-name}/services/{service_name}. - /// (Optional) When specified, indicates the timeout for the http client making the API call. - /// (Optional for token authentication). The region the AML service is deployed in. - /// (Optional) When specified, indicates the number of calls the indexer will make in parallel to the endpoint you have provided. You can decrease this value if your endpoint is failing under too high of a request load, or raise it if your endpoint is able to accept more requests and you would like an increase in the performance of the indexer. If not set, a default value of 5 is used. The degreeOfParallelism can be set to a maximum of 10 and a minimum of 1. - internal AzureMachineLearningSkill(string oDataType, string name, string description, string context, IList inputs, IList outputs, Uri scoringUri, string authenticationKey, string rawResourceId, TimeSpan? timeout, string rawLocation, int? degreeOfParallelism) : base(oDataType, name, description, context, inputs, outputs) - { - ScoringUri = scoringUri; - AuthenticationKey = authenticationKey; - RawResourceId = rawResourceId; - Timeout = timeout; - RawLocation = rawLocation; - DegreeOfParallelism = degreeOfParallelism; - ODataType = oDataType ?? "#Microsoft.Skills.Custom.AmlSkill"; - } - /// (Optional) When specified, indicates the timeout for the http client making the API call. - public TimeSpan? Timeout { get; set; } - /// (Optional) When specified, indicates the number of calls the indexer will make in parallel to the endpoint you have provided. You can decrease this value if your endpoint is failing under too high of a request load, or raise it if your endpoint is able to accept more requests and you would like an increase in the performance of the indexer. If not set, a default value of 5 is used. The degreeOfParallelism can be set to a maximum of 10 and a minimum of 1. - public int? DegreeOfParallelism { get; set; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningVectorizer.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningVectorizer.Serialization.cs deleted file mode 100644 index 3425f3fcadd6a..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningVectorizer.Serialization.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Search.Documents.Indexes.Models -{ - public partial class AzureMachineLearningVectorizer : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(AMLParameters)) - { - writer.WritePropertyName("amlParameters"u8); - writer.WriteObjectValue(AMLParameters); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - writer.WriteEndObject(); - } - - internal static AzureMachineLearningVectorizer DeserializeAzureMachineLearningVectorizer(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - AzureMachineLearningParameters amlParameters = default; - string name = default; - VectorSearchVectorizerKind kind = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("amlParameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - amlParameters = AzureMachineLearningParameters.DeserializeAzureMachineLearningParameters(property.Value); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("kind"u8)) - { - kind = new VectorSearchVectorizerKind(property.Value.GetString()); - continue; - } - } - return new AzureMachineLearningVectorizer(name, kind, amlParameters); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new AzureMachineLearningVectorizer FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeAzureMachineLearningVectorizer(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningVectorizer.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningVectorizer.cs deleted file mode 100644 index 884920750f349..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningVectorizer.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.Search.Documents.Indexes.Models -{ - /// Specifies an Azure Machine Learning endpoint deployed via the Azure AI Studio Model Catalog for generating the vector embedding of a query string. - public partial class AzureMachineLearningVectorizer : VectorSearchVectorizer - { - /// Initializes a new instance of . - /// The name to associate with this particular vectorization method. - /// is null. - public AzureMachineLearningVectorizer(string name) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - - Kind = VectorSearchVectorizerKind.AML; - } - - /// Initializes a new instance of . - /// The name to associate with this particular vectorization method. - /// The name of the kind of vectorization method being configured for use with vector search. - /// Specifies the properties of the AML vectorizer. - internal AzureMachineLearningVectorizer(string name, VectorSearchVectorizerKind kind, AzureMachineLearningParameters amlParameters) : base(name, kind) - { - AMLParameters = amlParameters; - Kind = kind; - } - - /// Specifies the properties of the AML vectorizer. - public AzureMachineLearningParameters AMLParameters { get; set; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIEmbeddingSkill.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIEmbeddingSkill.Serialization.cs index 4ef9fa67bbc68..ac23ccb14245c 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIEmbeddingSkill.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIEmbeddingSkill.Serialization.cs @@ -34,22 +34,22 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("resourceUri"u8); writer.WriteStringValue(ResourceUri.AbsoluteUri); } - if (Optional.IsDefined(DeploymentId)) + if (Optional.IsDefined(DeploymentName)) { writer.WritePropertyName("deploymentId"u8); - writer.WriteStringValue(DeploymentId); + writer.WriteStringValue(DeploymentName); } if (Optional.IsDefined(ApiKey)) { writer.WritePropertyName("apiKey"u8); writer.WriteStringValue(ApiKey); } - if (Optional.IsDefined(AuthIdentity)) + if (Optional.IsDefined(AuthenticationIdentity)) { - if (AuthIdentity != null) + if (AuthenticationIdentity != null) { writer.WritePropertyName("authIdentity"u8); - writer.WriteObjectValue(AuthIdentity); + writer.WriteObjectValue(AuthenticationIdentity); } else { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIEmbeddingSkill.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIEmbeddingSkill.cs index ef9a3b6f4e2b5..0f9de43318f32 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIEmbeddingSkill.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIEmbeddingSkill.cs @@ -34,21 +34,21 @@ public AzureOpenAIEmbeddingSkill(IEnumerable inputs, IEn /// The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. /// The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models. /// The resource URI of the Azure OpenAI resource. - /// ID of the Azure OpenAI model deployment on the designated resource. + /// ID of the Azure OpenAI model deployment on the designated resource. /// API key of the designated Azure OpenAI resource. - /// + /// /// The user-assigned managed identity used for outbound connections. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// /// The name of the embedding model that is deployed at the provided deploymentId path. - internal AzureOpenAIEmbeddingSkill(string oDataType, string name, string description, string context, IList inputs, IList outputs, int? dimensions, Uri resourceUri, string deploymentId, string apiKey, SearchIndexerDataIdentity authIdentity, AzureOpenAIModelName? modelName) : base(oDataType, name, description, context, inputs, outputs) + internal AzureOpenAIEmbeddingSkill(string oDataType, string name, string description, string context, IList inputs, IList outputs, int? dimensions, Uri resourceUri, string deploymentName, string apiKey, SearchIndexerDataIdentity authenticationIdentity, AzureOpenAIModelName? modelName) : base(oDataType, name, description, context, inputs, outputs) { Dimensions = dimensions; ResourceUri = resourceUri; - DeploymentId = deploymentId; + DeploymentName = deploymentName; ApiKey = apiKey; - AuthIdentity = authIdentity; + AuthenticationIdentity = authenticationIdentity; ModelName = modelName; ODataType = oDataType ?? "#Microsoft.Skills.Text.AzureOpenAIEmbeddingSkill"; } @@ -58,7 +58,7 @@ internal AzureOpenAIEmbeddingSkill(string oDataType, string name, string descrip /// The resource URI of the Azure OpenAI resource. public Uri ResourceUri { get; set; } /// ID of the Azure OpenAI model deployment on the designated resource. - public string DeploymentId { get; set; } + public string DeploymentName { get; set; } /// API key of the designated Azure OpenAI resource. public string ApiKey { get; set; } /// @@ -66,7 +66,7 @@ internal AzureOpenAIEmbeddingSkill(string oDataType, string name, string descrip /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// - public SearchIndexerDataIdentity AuthIdentity { get; set; } + public SearchIndexerDataIdentity AuthenticationIdentity { get; set; } /// The name of the embedding model that is deployed at the provided deploymentId path. public AzureOpenAIModelName? ModelName { get; set; } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIModelName.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIModelName.cs index 98b6d6cabd965..3e360a0ee115e 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIModelName.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIModelName.cs @@ -25,7 +25,6 @@ public AzureOpenAIModelName(string value) private const string TextEmbeddingAda002Value = "text-embedding-ada-002"; private const string TextEmbedding3LargeValue = "text-embedding-3-large"; private const string TextEmbedding3SmallValue = "text-embedding-3-small"; - private const string ExperimentalValue = "experimental"; /// text-embedding-ada-002. public static AzureOpenAIModelName TextEmbeddingAda002 { get; } = new AzureOpenAIModelName(TextEmbeddingAda002Value); @@ -33,8 +32,6 @@ public AzureOpenAIModelName(string value) public static AzureOpenAIModelName TextEmbedding3Large { get; } = new AzureOpenAIModelName(TextEmbedding3LargeValue); /// text-embedding-3-small. public static AzureOpenAIModelName TextEmbedding3Small { get; } = new AzureOpenAIModelName(TextEmbedding3SmallValue); - /// experimental. - public static AzureOpenAIModelName Experimental { get; } = new AzureOpenAIModelName(ExperimentalValue); /// Determines if two values are the same. public static bool operator ==(AzureOpenAIModelName left, AzureOpenAIModelName right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIVectorizer.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIVectorizer.Serialization.cs index 14505c71c2194..195e803075524 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIVectorizer.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIVectorizer.Serialization.cs @@ -15,13 +15,13 @@ public partial class AzureOpenAIVectorizer : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(AzureOpenAIParameters)) + if (Optional.IsDefined(Parameters)) { writer.WritePropertyName("azureOpenAIParameters"u8); - writer.WriteObjectValue(AzureOpenAIParameters); + writer.WriteObjectValue(Parameters); } writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); + writer.WriteStringValue(VectorizerName); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); writer.WriteEndObject(); @@ -33,7 +33,7 @@ internal static AzureOpenAIVectorizer DeserializeAzureOpenAIVectorizer(JsonEleme { return null; } - AzureOpenAIParameters azureOpenAIParameters = default; + AzureOpenAIVectorizerParameters azureOpenAIParameters = default; string name = default; VectorSearchVectorizerKind kind = default; foreach (var property in element.EnumerateObject()) @@ -44,7 +44,7 @@ internal static AzureOpenAIVectorizer DeserializeAzureOpenAIVectorizer(JsonEleme { continue; } - azureOpenAIParameters = AzureOpenAIParameters.DeserializeAzureOpenAIParameters(property.Value); + azureOpenAIParameters = AzureOpenAIVectorizerParameters.DeserializeAzureOpenAIVectorizerParameters(property.Value); continue; } if (property.NameEquals("name"u8)) diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIVectorizer.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIVectorizer.cs index c310739603b6a..8e7280613ed0c 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIVectorizer.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIVectorizer.cs @@ -13,26 +13,26 @@ namespace Azure.Search.Documents.Indexes.Models public partial class AzureOpenAIVectorizer : VectorSearchVectorizer { /// Initializes a new instance of . - /// The name to associate with this particular vectorization method. - /// is null. - public AzureOpenAIVectorizer(string name) : base(name) + /// The name to associate with this particular vectorization method. + /// is null. + public AzureOpenAIVectorizer(string vectorizerName) : base(vectorizerName) { - Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(vectorizerName, nameof(vectorizerName)); Kind = VectorSearchVectorizerKind.AzureOpenAI; } /// Initializes a new instance of . - /// The name to associate with this particular vectorization method. + /// The name to associate with this particular vectorization method. /// The name of the kind of vectorization method being configured for use with vector search. - /// Contains the parameters specific to Azure OpenAI embedding vectorization. - internal AzureOpenAIVectorizer(string name, VectorSearchVectorizerKind kind, AzureOpenAIParameters azureOpenAIParameters) : base(name, kind) + /// Contains the parameters specific to Azure OpenAI embedding vectorization. + internal AzureOpenAIVectorizer(string vectorizerName, VectorSearchVectorizerKind kind, AzureOpenAIVectorizerParameters parameters) : base(vectorizerName, kind) { - AzureOpenAIParameters = azureOpenAIParameters; + Parameters = parameters; Kind = kind; } /// Contains the parameters specific to Azure OpenAI embedding vectorization. - public AzureOpenAIParameters AzureOpenAIParameters { get; set; } + public AzureOpenAIVectorizerParameters Parameters { get; set; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIParameters.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIVectorizerParameters.Serialization.cs similarity index 83% rename from sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIParameters.Serialization.cs rename to sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIVectorizerParameters.Serialization.cs index efa95ab6e2f5c..ba9e814ea874f 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIParameters.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIVectorizerParameters.Serialization.cs @@ -11,7 +11,7 @@ namespace Azure.Search.Documents.Indexes.Models { - public partial class AzureOpenAIParameters : IUtf8JsonSerializable + public partial class AzureOpenAIVectorizerParameters : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -21,22 +21,22 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("resourceUri"u8); writer.WriteStringValue(ResourceUri.AbsoluteUri); } - if (Optional.IsDefined(DeploymentId)) + if (Optional.IsDefined(DeploymentName)) { writer.WritePropertyName("deploymentId"u8); - writer.WriteStringValue(DeploymentId); + writer.WriteStringValue(DeploymentName); } if (Optional.IsDefined(ApiKey)) { writer.WritePropertyName("apiKey"u8); writer.WriteStringValue(ApiKey); } - if (Optional.IsDefined(AuthIdentity)) + if (Optional.IsDefined(AuthenticationIdentity)) { - if (AuthIdentity != null) + if (AuthenticationIdentity != null) { writer.WritePropertyName("authIdentity"u8); - writer.WriteObjectValue(AuthIdentity); + writer.WriteObjectValue(AuthenticationIdentity); } else { @@ -51,7 +51,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static AzureOpenAIParameters DeserializeAzureOpenAIParameters(JsonElement element) + internal static AzureOpenAIVectorizerParameters DeserializeAzureOpenAIVectorizerParameters(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -103,15 +103,15 @@ internal static AzureOpenAIParameters DeserializeAzureOpenAIParameters(JsonEleme continue; } } - return new AzureOpenAIParameters(resourceUri, deploymentId, apiKey, authIdentity, modelName); + return new AzureOpenAIVectorizerParameters(resourceUri, deploymentId, apiKey, authIdentity, modelName); } /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static AzureOpenAIParameters FromResponse(Response response) + internal static AzureOpenAIVectorizerParameters FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeAzureOpenAIParameters(document.RootElement); + return DeserializeAzureOpenAIVectorizerParameters(document.RootElement); } /// Convert into a . diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIParameters.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIVectorizerParameters.cs similarity index 75% rename from sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIParameters.cs rename to sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIVectorizerParameters.cs index 33725e89005ff..9243c5e40dfcb 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIParameters.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIVectorizerParameters.cs @@ -10,36 +10,36 @@ namespace Azure.Search.Documents.Indexes.Models { /// Specifies the parameters for connecting to the Azure OpenAI resource. - public partial class AzureOpenAIParameters + public partial class AzureOpenAIVectorizerParameters { - /// Initializes a new instance of . - public AzureOpenAIParameters() + /// Initializes a new instance of . + public AzureOpenAIVectorizerParameters() { } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The resource URI of the Azure OpenAI resource. - /// ID of the Azure OpenAI model deployment on the designated resource. + /// ID of the Azure OpenAI model deployment on the designated resource. /// API key of the designated Azure OpenAI resource. - /// + /// /// The user-assigned managed identity used for outbound connections. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// /// The name of the embedding model that is deployed at the provided deploymentId path. - internal AzureOpenAIParameters(Uri resourceUri, string deploymentId, string apiKey, SearchIndexerDataIdentity authIdentity, AzureOpenAIModelName? modelName) + internal AzureOpenAIVectorizerParameters(Uri resourceUri, string deploymentName, string apiKey, SearchIndexerDataIdentity authenticationIdentity, AzureOpenAIModelName? modelName) { ResourceUri = resourceUri; - DeploymentId = deploymentId; + DeploymentName = deploymentName; ApiKey = apiKey; - AuthIdentity = authIdentity; + AuthenticationIdentity = authenticationIdentity; ModelName = modelName; } /// The resource URI of the Azure OpenAI resource. public Uri ResourceUri { get; set; } /// ID of the Azure OpenAI model deployment on the designated resource. - public string DeploymentId { get; set; } + public string DeploymentName { get; set; } /// API key of the designated Azure OpenAI resource. public string ApiKey { get; set; } /// @@ -47,7 +47,7 @@ internal AzureOpenAIParameters(Uri resourceUri, string deploymentId, string apiK /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// - public SearchIndexerDataIdentity AuthIdentity { get; set; } + public SearchIndexerDataIdentity AuthenticationIdentity { get; set; } /// The name of the embedding model that is deployed at the provided deploymentId path. public AzureOpenAIModelName? ModelName { get; set; } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/BinaryQuantizationCompression.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/BinaryQuantizationCompression.Serialization.cs new file mode 100644 index 0000000000000..37d081cb707e0 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/BinaryQuantizationCompression.Serialization.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Search.Documents.Indexes.Models +{ + public partial class BinaryQuantizationCompression : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(CompressionName); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); + if (Optional.IsDefined(RerankWithOriginalVectors)) + { + writer.WritePropertyName("rerankWithOriginalVectors"u8); + writer.WriteBooleanValue(RerankWithOriginalVectors.Value); + } + if (Optional.IsDefined(DefaultOversampling)) + { + if (DefaultOversampling != null) + { + writer.WritePropertyName("defaultOversampling"u8); + writer.WriteNumberValue(DefaultOversampling.Value); + } + else + { + writer.WriteNull("defaultOversampling"); + } + } + writer.WriteEndObject(); + } + + internal static BinaryQuantizationCompression DeserializeBinaryQuantizationCompression(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + VectorSearchCompressionKind kind = default; + bool? rerankWithOriginalVectors = default; + double? defaultOversampling = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("kind"u8)) + { + kind = new VectorSearchCompressionKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("rerankWithOriginalVectors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + rerankWithOriginalVectors = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("defaultOversampling"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + defaultOversampling = null; + continue; + } + defaultOversampling = property.Value.GetDouble(); + continue; + } + } + return new BinaryQuantizationCompression(name, kind, rerankWithOriginalVectors, defaultOversampling); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new BinaryQuantizationCompression FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBinaryQuantizationCompression(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/BinaryQuantizationCompression.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/BinaryQuantizationCompression.cs new file mode 100644 index 0000000000000..bb4b2a87dbd25 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/BinaryQuantizationCompression.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Search.Documents.Indexes.Models +{ + /// Contains configuration options specific to the binary quantization compression method used during indexing and querying. + public partial class BinaryQuantizationCompression : VectorSearchCompression + { + /// Initializes a new instance of . + /// The name to associate with this particular configuration. + /// is null. + public BinaryQuantizationCompression(string compressionName) : base(compressionName) + { + Argument.AssertNotNull(compressionName, nameof(compressionName)); + + Kind = VectorSearchCompressionKind.BinaryQuantization; + } + + /// Initializes a new instance of . + /// The name to associate with this particular configuration. + /// The name of the kind of compression method being configured for use with vector search. + /// If set to true, once the ordered set of results calculated using compressed vectors are obtained, they will be reranked again by recalculating the full-precision similarity scores. This will improve recall at the expense of latency. + /// Default oversampling factor. Oversampling will internally request more documents (specified by this multiplier) in the initial search. This increases the set of results that will be reranked using recomputed similarity scores from full-precision vectors. Minimum value is 1, meaning no oversampling (1x). This parameter can only be set when rerankWithOriginalVectors is true. Higher values improve recall at the expense of latency. + internal BinaryQuantizationCompression(string compressionName, VectorSearchCompressionKind kind, bool? rerankWithOriginalVectors, double? defaultOversampling) : base(compressionName, kind, rerankWithOriginalVectors, defaultOversampling) + { + Kind = kind; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomNormalizer.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomNormalizer.Serialization.cs deleted file mode 100644 index 5d13697add04e..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomNormalizer.Serialization.cs +++ /dev/null @@ -1,116 +0,0 @@ -// 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.Search.Documents.Indexes.Models -{ - public partial class CustomNormalizer : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(TokenFilters)) - { - writer.WritePropertyName("tokenFilters"u8); - writer.WriteStartArray(); - foreach (var item in TokenFilters) - { - writer.WriteStringValue(item.ToString()); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(CharFilters)) - { - writer.WritePropertyName("charFilters"u8); - writer.WriteStartArray(); - foreach (var item in CharFilters) - { - writer.WriteStringValue(item.ToString()); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("@odata.type"u8); - writer.WriteStringValue(ODataType); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WriteEndObject(); - } - - internal static CustomNormalizer DeserializeCustomNormalizer(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList tokenFilters = default; - IList charFilters = default; - string odataType = default; - string name = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("tokenFilters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(new TokenFilterName(item.GetString())); - } - tokenFilters = array; - continue; - } - if (property.NameEquals("charFilters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(new CharFilterName(item.GetString())); - } - charFilters = array; - continue; - } - if (property.NameEquals("@odata.type"u8)) - { - odataType = property.Value.GetString(); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - } - return new CustomNormalizer(odataType, name, tokenFilters ?? new ChangeTrackingList(), charFilters ?? new ChangeTrackingList()); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new CustomNormalizer FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomNormalizer(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomNormalizer.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomNormalizer.cs deleted file mode 100644 index df041df222cc6..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomNormalizer.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.Search.Documents.Indexes.Models -{ - /// Allows you to configure normalization for filterable, sortable, and facetable fields, which by default operate with strict matching. This is a user-defined configuration consisting of at least one or more filters, which modify the token that is stored. - public partial class CustomNormalizer : LexicalNormalizer - { - /// Initializes a new instance of . - /// The name of the normalizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. It cannot end in '.microsoft' nor '.lucene', nor be named 'asciifolding', 'standard', 'lowercase', 'uppercase', or 'elision'. - /// is null. - public CustomNormalizer(string name) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - - TokenFilters = new ChangeTrackingList(); - CharFilters = new ChangeTrackingList(); - ODataType = "#Microsoft.Azure.Search.CustomNormalizer"; - } - - /// Initializes a new instance of . - /// A URI fragment specifying the type of normalizer. - /// The name of the normalizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. It cannot end in '.microsoft' nor '.lucene', nor be named 'asciifolding', 'standard', 'lowercase', 'uppercase', or 'elision'. - /// A list of token filters used to filter out or modify the input token. For example, you can specify a lowercase filter that converts all characters to lowercase. The filters are run in the order in which they are listed. - /// A list of character filters used to prepare input text before it is processed. For instance, they can replace certain characters or symbols. The filters are run in the order in which they are listed. - internal CustomNormalizer(string oDataType, string name, IList tokenFilters, IList charFilters) : base(oDataType, name) - { - TokenFilters = tokenFilters; - CharFilters = charFilters; - ODataType = oDataType ?? "#Microsoft.Azure.Search.CustomNormalizer"; - } - - /// A list of token filters used to filter out or modify the input token. For example, you can specify a lowercase filter that converts all characters to lowercase. The filters are run in the order in which they are listed. - public IList TokenFilters { get; } - /// A list of character filters used to prepare input text before it is processed. For instance, they can replace certain characters or symbols. The filters are run in the order in which they are listed. - public IList CharFilters { get; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomVectorizer.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomVectorizer.cs deleted file mode 100644 index e0055cc33b97f..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomVectorizer.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.Search.Documents.Indexes.Models -{ - /// Specifies a user-defined vectorizer for generating the vector embedding of a query string. Integration of an external vectorizer is achieved using the custom Web API interface of a skillset. - public partial class CustomVectorizer : VectorSearchVectorizer - { - /// Initializes a new instance of . - /// The name to associate with this particular vectorization method. - /// is null. - public CustomVectorizer(string name) : base(name) - { - Argument.AssertNotNull(name, nameof(name)); - - Kind = VectorSearchVectorizerKind.CustomWebApi; - } - - /// Initializes a new instance of . - /// The name to associate with this particular vectorization method. - /// The name of the kind of vectorization method being configured for use with vector search. - /// Specifies the properties of the user-defined vectorizer. - internal CustomVectorizer(string name, VectorSearchVectorizerKind kind, CustomWebApiParameters customWebApiParameters) : base(name, kind) - { - CustomWebApiParameters = customWebApiParameters; - Kind = kind; - } - - /// Specifies the properties of the user-defined vectorizer. - public CustomWebApiParameters CustomWebApiParameters { get; set; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/DataDeletionDetectionPolicy.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/DataDeletionDetectionPolicy.Serialization.cs index c578cd762c2f0..3975605c802ac 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/DataDeletionDetectionPolicy.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/DataDeletionDetectionPolicy.Serialization.cs @@ -31,7 +31,6 @@ internal static DataDeletionDetectionPolicy DeserializeDataDeletionDetectionPoli { switch (discriminator.GetString()) { - case "#Microsoft.Azure.Search.NativeBlobSoftDeleteDeletionDetectionPolicy": return NativeBlobSoftDeleteDeletionDetectionPolicy.DeserializeNativeBlobSoftDeleteDeletionDetectionPolicy(element); case "#Microsoft.Azure.Search.SoftDeleteColumnDeletionDetectionPolicy": return SoftDeleteColumnDeletionDetectionPolicy.DeserializeSoftDeleteColumnDeletionDetectionPolicy(element); } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/DataDeletionDetectionPolicy.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/DataDeletionDetectionPolicy.cs index b586a85a237ee..cf740ada873d1 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/DataDeletionDetectionPolicy.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/DataDeletionDetectionPolicy.cs @@ -10,7 +10,7 @@ namespace Azure.Search.Documents.Indexes.Models /// /// Base type for data deletion detection policies. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include . /// public partial class DataDeletionDetectionPolicy { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentDebugInfo.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentDebugInfo.Serialization.cs deleted file mode 100644 index 41cfea5bf6fd2..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentDebugInfo.Serialization.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; - -namespace Azure.Search.Documents.Models -{ - public partial class DocumentDebugInfo - { - internal static DocumentDebugInfo DeserializeDocumentDebugInfo(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - SemanticDebugInfo semantic = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("semantic"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - semantic = SemanticDebugInfo.DeserializeSemanticDebugInfo(property.Value); - continue; - } - } - return new DocumentDebugInfo(semantic); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static DocumentDebugInfo FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeDocumentDebugInfo(document.RootElement); - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentDebugInfo.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentDebugInfo.cs deleted file mode 100644 index d01ecd031741e..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentDebugInfo.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Search.Documents.Models -{ - /// Contains debugging information that can be used to further explore your search results. - public partial class DocumentDebugInfo - { - /// Initializes a new instance of . - internal DocumentDebugInfo() - { - } - - /// Initializes a new instance of . - /// Contains debugging information specific to semantic ranking requests. - internal DocumentDebugInfo(SemanticDebugInfo semantic) - { - Semantic = semantic; - } - - /// Contains debugging information specific to semantic ranking requests. - public SemanticDebugInfo Semantic { get; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/HybridCountAndFacetMode.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/HybridCountAndFacetMode.cs deleted file mode 100644 index 3f0ce7ae73edd..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/HybridCountAndFacetMode.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.Search.Documents.Models -{ - /// Determines whether the count and facets should includes all documents that matched the search query, or only the documents that are retrieved within the 'maxTextRecallSize' window. The default value is 'countAllResults'. - public readonly partial struct HybridCountAndFacetMode : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public HybridCountAndFacetMode(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string CountRetrievableResultsValue = "countRetrievableResults"; - private const string CountAllResultsValue = "countAllResults"; - - /// Only include documents that were matched within the 'maxTextRecallSize' retrieval window when computing 'count' and 'facets'. - public static HybridCountAndFacetMode CountRetrievableResults { get; } = new HybridCountAndFacetMode(CountRetrievableResultsValue); - /// Include all documents that were matched by the search query when computing 'count' and 'facets', regardless of whether or not those documents are within the 'maxTextRecallSize' retrieval window. - public static HybridCountAndFacetMode CountAllResults { get; } = new HybridCountAndFacetMode(CountAllResultsValue); - /// Determines if two values are the same. - public static bool operator ==(HybridCountAndFacetMode left, HybridCountAndFacetMode right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(HybridCountAndFacetMode left, HybridCountAndFacetMode right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator HybridCountAndFacetMode(string value) => new HybridCountAndFacetMode(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is HybridCountAndFacetMode other && Equals(other); - /// - public bool Equals(HybridCountAndFacetMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/HybridSearch.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/HybridSearch.Serialization.cs deleted file mode 100644 index 157b1bb82ac08..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/HybridSearch.Serialization.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Search.Documents.Models -{ - public partial class HybridSearch : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(MaxTextRecallSize)) - { - writer.WritePropertyName("maxTextRecallSize"u8); - writer.WriteNumberValue(MaxTextRecallSize.Value); - } - if (Optional.IsDefined(CountAndFacetMode)) - { - writer.WritePropertyName("countAndFacetMode"u8); - writer.WriteStringValue(CountAndFacetMode.Value.ToString()); - } - writer.WriteEndObject(); - } - - internal static HybridSearch DeserializeHybridSearch(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - int? maxTextRecallSize = default; - HybridCountAndFacetMode? countAndFacetMode = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("maxTextRecallSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxTextRecallSize = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("countAndFacetMode"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - countAndFacetMode = new HybridCountAndFacetMode(property.Value.GetString()); - continue; - } - } - return new HybridSearch(maxTextRecallSize, countAndFacetMode); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static HybridSearch FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeHybridSearch(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/HybridSearch.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/HybridSearch.cs deleted file mode 100644 index 94476d1759562..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/HybridSearch.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Search.Documents.Models -{ - /// TThe query parameters to configure hybrid search behaviors. - public partial class HybridSearch - { - /// Initializes a new instance of . - public HybridSearch() - { - } - - /// Initializes a new instance of . - /// Determines the maximum number of documents to be retrieved by the text query portion of a hybrid search request. Those documents will be combined with the documents matching the vector queries to produce a single final list of results. Choosing a larger maxTextRecallSize value will allow retrieving and paging through more documents (using the top and skip parameters), at the cost of higher resource utilization and higher latency. The value needs to be between 1 and 10,000. Default is 1000. - /// Determines whether the count and facets should includes all documents that matched the search query, or only the documents that are retrieved within the 'maxTextRecallSize' window. - internal HybridSearch(int? maxTextRecallSize, HybridCountAndFacetMode? countAndFacetMode) - { - MaxTextRecallSize = maxTextRecallSize; - CountAndFacetMode = countAndFacetMode; - } - - /// Determines the maximum number of documents to be retrieved by the text query portion of a hybrid search request. Those documents will be combined with the documents matching the vector queries to produce a single final list of results. Choosing a larger maxTextRecallSize value will allow retrieving and paging through more documents (using the top and skip parameters), at the cost of higher resource utilization and higher latency. The value needs to be between 1 and 10,000. Default is 1000. - public int? MaxTextRecallSize { get; set; } - /// Determines whether the count and facets should includes all documents that matched the search query, or only the documents that are retrieved within the 'maxTextRecallSize' window. - public HybridCountAndFacetMode? CountAndFacetMode { get; set; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionResult.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionResult.Serialization.cs index 5864ef96aae4a..e33511c23fe28 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionResult.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionResult.Serialization.cs @@ -20,8 +20,6 @@ internal static IndexerExecutionResult DeserializeIndexerExecutionResult(JsonEle return null; } IndexerExecutionStatus status = default; - IndexerExecutionStatusDetail? statusDetail = default; - IndexerState currentState = default; string errorMessage = default; DateTimeOffset? startTime = default; DateTimeOffset? endTime = default; @@ -38,25 +36,6 @@ internal static IndexerExecutionResult DeserializeIndexerExecutionResult(JsonEle status = property.Value.GetString().ToIndexerExecutionStatus(); continue; } - if (property.NameEquals("statusDetail"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - statusDetail = null; - continue; - } - statusDetail = new IndexerExecutionStatusDetail(property.Value.GetString()); - continue; - } - if (property.NameEquals("currentState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - currentState = IndexerState.DeserializeIndexerState(property.Value); - continue; - } if (property.NameEquals("errorMessage"u8)) { errorMessage = property.Value.GetString(); @@ -124,8 +103,6 @@ internal static IndexerExecutionResult DeserializeIndexerExecutionResult(JsonEle } return new IndexerExecutionResult( status, - statusDetail, - currentState, errorMessage, startTime, endTime, diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionResult.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionResult.cs index 16d5530e3ad34..2c30043dc608c 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionResult.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionResult.cs @@ -31,8 +31,6 @@ internal IndexerExecutionResult(IndexerExecutionStatus status, IEnumerable Initializes a new instance of . /// The outcome of this indexer execution. - /// The outcome of this indexer execution. - /// All of the state that defines and dictates the indexer's current execution. /// The error message indicating the top-level error, if any. /// The start time of this indexer execution. /// The end time of this indexer execution, if the execution has already completed. @@ -42,11 +40,9 @@ internal IndexerExecutionResult(IndexerExecutionStatus status, IEnumerable The number of items that failed to be indexed during this indexer execution. /// Change tracking state with which an indexer execution started. /// Change tracking state with which an indexer execution finished. - internal IndexerExecutionResult(IndexerExecutionStatus status, IndexerExecutionStatusDetail? statusDetail, IndexerState currentState, string errorMessage, DateTimeOffset? startTime, DateTimeOffset? endTime, IReadOnlyList errors, IReadOnlyList warnings, int itemCount, int failedItemCount, string initialTrackingState, string finalTrackingState) + internal IndexerExecutionResult(IndexerExecutionStatus status, string errorMessage, DateTimeOffset? startTime, DateTimeOffset? endTime, IReadOnlyList errors, IReadOnlyList warnings, int itemCount, int failedItemCount, string initialTrackingState, string finalTrackingState) { Status = status; - StatusDetail = statusDetail; - CurrentState = currentState; ErrorMessage = errorMessage; StartTime = startTime; EndTime = endTime; @@ -60,10 +56,6 @@ internal IndexerExecutionResult(IndexerExecutionStatus status, IndexerExecutionS /// The outcome of this indexer execution. public IndexerExecutionStatus Status { get; } - /// The outcome of this indexer execution. - public IndexerExecutionStatusDetail? StatusDetail { get; } - /// All of the state that defines and dictates the indexer's current execution. - public IndexerState CurrentState { get; } /// The error message indicating the top-level error, if any. public string ErrorMessage { get; } /// The start time of this indexer execution. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionStatusDetail.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionStatusDetail.cs deleted file mode 100644 index 3897647d7a021..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionStatusDetail.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.Search.Documents.Indexes.Models -{ - /// Details the status of an individual indexer execution. - public readonly partial struct IndexerExecutionStatusDetail : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public IndexerExecutionStatusDetail(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ResetDocsValue = "resetDocs"; - - /// Indicates that the reset that occurred was for a call to ResetDocs. - public static IndexerExecutionStatusDetail ResetDocs { get; } = new IndexerExecutionStatusDetail(ResetDocsValue); - /// Determines if two values are the same. - public static bool operator ==(IndexerExecutionStatusDetail left, IndexerExecutionStatusDetail right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(IndexerExecutionStatusDetail left, IndexerExecutionStatusDetail right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator IndexerExecutionStatusDetail(string value) => new IndexerExecutionStatusDetail(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is IndexerExecutionStatusDetail other && Equals(other); - /// - public bool Equals(IndexerExecutionStatusDetail other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerState.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerState.Serialization.cs deleted file mode 100644 index 1763bb997cee8..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerState.Serialization.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; - -namespace Azure.Search.Documents.Indexes.Models -{ - public partial class IndexerState - { - internal static IndexerState DeserializeIndexerState(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IndexingMode? mode = default; - string allDocsInitialChangeTrackingState = default; - string allDocsFinalChangeTrackingState = default; - string resetDocsInitialChangeTrackingState = default; - string resetDocsFinalChangeTrackingState = default; - IReadOnlyList resetDocumentKeys = default; - IReadOnlyList resetDatasourceDocumentIds = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("mode"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - mode = new IndexingMode(property.Value.GetString()); - continue; - } - if (property.NameEquals("allDocsInitialChangeTrackingState"u8)) - { - allDocsInitialChangeTrackingState = property.Value.GetString(); - continue; - } - if (property.NameEquals("allDocsFinalChangeTrackingState"u8)) - { - allDocsFinalChangeTrackingState = property.Value.GetString(); - continue; - } - if (property.NameEquals("resetDocsInitialChangeTrackingState"u8)) - { - resetDocsInitialChangeTrackingState = property.Value.GetString(); - continue; - } - if (property.NameEquals("resetDocsFinalChangeTrackingState"u8)) - { - resetDocsFinalChangeTrackingState = property.Value.GetString(); - continue; - } - if (property.NameEquals("resetDocumentKeys"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - resetDocumentKeys = array; - continue; - } - if (property.NameEquals("resetDatasourceDocumentIds"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - resetDatasourceDocumentIds = array; - continue; - } - } - return new IndexerState( - mode, - allDocsInitialChangeTrackingState, - allDocsFinalChangeTrackingState, - resetDocsInitialChangeTrackingState, - resetDocsFinalChangeTrackingState, - resetDocumentKeys ?? new ChangeTrackingList(), - resetDatasourceDocumentIds ?? new ChangeTrackingList()); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static IndexerState FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeIndexerState(document.RootElement); - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerState.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerState.cs deleted file mode 100644 index 8047262f3e4f0..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerState.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; - -namespace Azure.Search.Documents.Indexes.Models -{ - /// Represents all of the state that defines and dictates the indexer's current execution. - public partial class IndexerState - { - /// Initializes a new instance of . - internal IndexerState() - { - ResetDocumentKeys = new ChangeTrackingList(); - ResetDataSourceDocumentIds = new ChangeTrackingList(); - } - - /// The mode the indexer is running in. - public IndexingMode? Mode { get; } - /// The list of document keys that have been reset. The document key is the document's unique identifier for the data in the search index. The indexer will prioritize selectively re-ingesting these keys. - public IReadOnlyList ResetDocumentKeys { get; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexingMode.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexingMode.cs deleted file mode 100644 index edef8e49a9f13..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexingMode.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.Search.Documents.Indexes.Models -{ - /// Represents the mode the indexer is executing in. - public readonly partial struct IndexingMode : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public IndexingMode(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AllDocumentsValue = "indexingAllDocs"; - private const string ResetDocumentsValue = "indexingResetDocs"; - /// Determines if two values are the same. - public static bool operator ==(IndexingMode left, IndexingMode right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(IndexingMode left, IndexingMode right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator IndexingMode(string value) => new IndexingMode(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is IndexingMode other && Equals(other); - /// - public bool Equals(IndexingMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexingParametersConfiguration.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexingParametersConfiguration.cs index 1d46ffc6fc1b6..d71817c7b4b58 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexingParametersConfiguration.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexingParametersConfiguration.cs @@ -24,7 +24,7 @@ public IndexingParametersConfiguration() /// Comma-delimited list of filename extensions to select when processing from Azure blob storage. For example, you could focus indexing on specific application files ".docx, .pptx, .msg" to specifically include those file types. /// For Azure blobs, set to false if you want to continue indexing when an unsupported content type is encountered, and you don't know all the content types (file extensions) in advance. /// For Azure blobs, set to false if you want to continue indexing if a document fails indexing. - /// For Azure blobs, set this property to true to still index storage metadata for blob content that is too large to process. Oversized blobs are treated as errors by default. For limits on blob size, see https://docs.microsoft.com/azure/search/search-limits-quotas-capacity. + /// For Azure blobs, set this property to true to still index storage metadata for blob content that is too large to process. Oversized blobs are treated as errors by default. For limits on blob size, see https://learn.microsoft.com/azure/search/search-limits-quotas-capacity. /// For CSV blobs, specifies a comma-delimited list of column headers, useful for mapping source fields to destination fields in an index. /// For CSV blobs, specifies the end-of-line single-character delimiter for CSV files where each line starts a new document (for example, "|"). /// For CSV blobs, indicates that the first (non-blank) line of each blob contains headers. @@ -67,7 +67,7 @@ internal IndexingParametersConfiguration(BlobIndexerParsingMode? parsingMode, st public bool? FailOnUnsupportedContentType { get; set; } /// For Azure blobs, set to false if you want to continue indexing if a document fails indexing. public bool? FailOnUnprocessableDocument { get; set; } - /// For Azure blobs, set this property to true to still index storage metadata for blob content that is too large to process. Oversized blobs are treated as errors by default. For limits on blob size, see https://docs.microsoft.com/azure/search/search-limits-quotas-capacity. + /// For Azure blobs, set this property to true to still index storage metadata for blob content that is too large to process. Oversized blobs are treated as errors by default. For limits on blob size, see https://learn.microsoft.com/azure/search/search-limits-quotas-capacity. public bool? IndexStorageMetadataOnlyForOversizedDocuments { get; set; } /// For CSV blobs, specifies a comma-delimited list of column headers, useful for mapping source fields to destination fields in an index. public string DelimitedTextHeaders { get; set; } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeStore.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeStore.Serialization.cs index 2c6e1e3b0627e..07b8d4e0b94ad 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeStore.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeStore.Serialization.cs @@ -25,23 +25,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteObjectValue(item); } writer.WriteEndArray(); - if (Optional.IsDefined(Identity)) - { - if (Identity != null) - { - writer.WritePropertyName("identity"u8); - writer.WriteObjectValue(Identity); - } - else - { - writer.WriteNull("identity"); - } - } - if (Optional.IsDefined(Parameters)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteObjectValue(Parameters); - } writer.WriteEndObject(); } @@ -53,8 +36,6 @@ internal static KnowledgeStore DeserializeKnowledgeStore(JsonElement element) } string storageConnectionString = default; IList projections = default; - SearchIndexerDataIdentity identity = default; - SearchIndexerKnowledgeStoreParameters parameters = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("storageConnectionString"u8)) @@ -72,27 +53,8 @@ internal static KnowledgeStore DeserializeKnowledgeStore(JsonElement element) projections = array; continue; } - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - identity = null; - continue; - } - identity = SearchIndexerDataIdentity.DeserializeSearchIndexerDataIdentity(property.Value); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - parameters = SearchIndexerKnowledgeStoreParameters.DeserializeSearchIndexerKnowledgeStoreParameters(property.Value); - continue; - } } - return new KnowledgeStore(storageConnectionString, projections, identity, parameters); + return new KnowledgeStore(storageConnectionString, projections); } /// Deserializes the model from a raw response. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeStore.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeStore.cs index 64d90d0c5341c..8b17e5afc2c7f 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeStore.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeStore.cs @@ -30,31 +30,15 @@ public KnowledgeStore(string storageConnectionString, IEnumerable Initializes a new instance of . /// The connection string to the storage account projections will be stored in. /// A list of additional projections to perform during indexing. - /// - /// The user-assigned managed identity used for connections to Azure Storage when writing knowledge store projections. If the connection string indicates an identity (ResourceId) and it's not specified, the system-assigned managed identity is used. On updates to the indexer, if the identity is unspecified, the value remains unchanged. If set to "none", the value of this property is cleared. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - /// A dictionary of knowledge store-specific configuration properties. Each name is the name of a specific property. Each value must be of a primitive type. - internal KnowledgeStore(string storageConnectionString, IList projections, SearchIndexerDataIdentity identity, SearchIndexerKnowledgeStoreParameters parameters) + internal KnowledgeStore(string storageConnectionString, IList projections) { StorageConnectionString = storageConnectionString; Projections = projections; - Identity = identity; - Parameters = parameters; } /// The connection string to the storage account projections will be stored in. public string StorageConnectionString { get; set; } /// A list of additional projections to perform during indexing. public IList Projections { get; } - /// - /// The user-assigned managed identity used for connections to Azure Storage when writing knowledge store projections. If the connection string indicates an identity (ResourceId) and it's not specified, the system-assigned managed identity is used. On updates to the indexer, if the identity is unspecified, the value remains unchanged. If set to "none", the value of this property is cleared. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - public SearchIndexerDataIdentity Identity { get; set; } - /// A dictionary of knowledge store-specific configuration properties. Each name is the name of a specific property. Each value must be of a primitive type. - public SearchIndexerKnowledgeStoreParameters Parameters { get; set; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/LexicalAnalyzerName.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/LexicalAnalyzerName.cs index 4f3e433895090..2aa9639dfcdf3 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/LexicalAnalyzerName.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/LexicalAnalyzerName.cs @@ -290,7 +290,7 @@ public LexicalAnalyzerName(string value) public static LexicalAnalyzerName ViMicrosoft { get; } = new LexicalAnalyzerName(ViMicrosoftValue); /// Standard Lucene analyzer. public static LexicalAnalyzerName StandardLucene { get; } = new LexicalAnalyzerName(StandardLuceneValue); - /// Standard ASCII Folding Lucene analyzer. See https://docs.microsoft.com/rest/api/searchservice/Custom-analyzers-in-Azure-Search#Analyzers. + /// Standard ASCII Folding Lucene analyzer. See https://learn.microsoft.com/rest/api/searchservice/Custom-analyzers-in-Azure-Search#Analyzers. public static LexicalAnalyzerName StandardAsciiFoldingLucene { get; } = new LexicalAnalyzerName(StandardAsciiFoldingLuceneValue); /// Treats the entire content of a field as a single token. This is useful for data like zip codes, ids, and some product names. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/core/KeywordAnalyzer.html. public static LexicalAnalyzerName Keyword { get; } = new LexicalAnalyzerName(KeywordValue); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/LexicalNormalizer.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/LexicalNormalizer.Serialization.cs deleted file mode 100644 index 54247fcfd8d17..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/LexicalNormalizer.Serialization.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Search.Documents.Models; - -namespace Azure.Search.Documents.Indexes.Models -{ - public partial class LexicalNormalizer : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("@odata.type"u8); - writer.WriteStringValue(ODataType); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WriteEndObject(); - } - - internal static LexicalNormalizer DeserializeLexicalNormalizer(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("@odata.type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "#Microsoft.Azure.Search.CustomNormalizer": return CustomNormalizer.DeserializeCustomNormalizer(element); - } - } - return UnknownLexicalNormalizer.DeserializeUnknownLexicalNormalizer(element); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static LexicalNormalizer FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeLexicalNormalizer(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/LexicalNormalizer.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/LexicalNormalizer.cs deleted file mode 100644 index 4f5638a8dc949..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/LexicalNormalizer.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.Search.Documents.Indexes.Models -{ - /// - /// Base type for normalizers. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . - /// - public partial class LexicalNormalizer - { - /// Initializes a new instance of . - /// The name of the normalizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. It cannot end in '.microsoft' nor '.lucene', nor be named 'asciifolding', 'standard', 'lowercase', 'uppercase', or 'elision'. - /// is null. - public LexicalNormalizer(string name) - { - Argument.AssertNotNull(name, nameof(name)); - - Name = name; - } - - /// Initializes a new instance of . - /// A URI fragment specifying the type of normalizer. - /// The name of the normalizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. It cannot end in '.microsoft' nor '.lucene', nor be named 'asciifolding', 'standard', 'lowercase', 'uppercase', or 'elision'. - internal LexicalNormalizer(string oDataType, string name) - { - ODataType = oDataType; - Name = name; - } - - /// A URI fragment specifying the type of normalizer. - internal string ODataType { get; set; } - /// The name of the normalizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. It cannot end in '.microsoft' nor '.lucene', nor be named 'asciifolding', 'standard', 'lowercase', 'uppercase', or 'elision'. - public string Name { get; set; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/LexicalNormalizerName.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/LexicalNormalizerName.cs deleted file mode 100644 index f53cc8e86d7a0..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/LexicalNormalizerName.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.Search.Documents.Indexes.Models -{ - /// Defines the names of all text normalizers supported by the search engine. - public readonly partial struct LexicalNormalizerName : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public LexicalNormalizerName(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AsciiFoldingValue = "asciifolding"; - private const string ElisionValue = "elision"; - private const string LowercaseValue = "lowercase"; - private const string StandardValue = "standard"; - private const string UppercaseValue = "uppercase"; - - /// Converts alphabetic, numeric, and symbolic Unicode characters which are not in the first 127 ASCII characters (the "Basic Latin" Unicode block) into their ASCII equivalents, if such equivalents exist. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/ASCIIFoldingFilter.html. - public static LexicalNormalizerName AsciiFolding { get; } = new LexicalNormalizerName(AsciiFoldingValue); - /// Removes elisions. For example, "l'avion" (the plane) will be converted to "avion" (plane). See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/util/ElisionFilter.html. - public static LexicalNormalizerName Elision { get; } = new LexicalNormalizerName(ElisionValue); - /// Normalizes token text to lowercase. See https://lucene.apache.org/core/6_6_1/analyzers-common/org/apache/lucene/analysis/core/LowerCaseFilter.html. - public static LexicalNormalizerName Lowercase { get; } = new LexicalNormalizerName(LowercaseValue); - /// Standard normalizer, which consists of lowercase and asciifolding. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/reverse/ReverseStringFilter.html. - public static LexicalNormalizerName Standard { get; } = new LexicalNormalizerName(StandardValue); - /// Normalizes token text to uppercase. See https://lucene.apache.org/core/6_6_1/analyzers-common/org/apache/lucene/analysis/core/UpperCaseFilter.html. - public static LexicalNormalizerName Uppercase { get; } = new LexicalNormalizerName(UppercaseValue); - /// Determines if two values are the same. - public static bool operator ==(LexicalNormalizerName left, LexicalNormalizerName right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(LexicalNormalizerName left, LexicalNormalizerName right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator LexicalNormalizerName(string value) => new LexicalNormalizerName(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is LexicalNormalizerName other && Equals(other); - /// - public bool Equals(LexicalNormalizerName other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ListAliasesResult.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ListAliasesResult.Serialization.cs deleted file mode 100644 index 7cf21b95bd1aa..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/ListAliasesResult.Serialization.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; - -namespace Azure.Search.Documents.Indexes.Models -{ - internal partial class ListAliasesResult - { - internal static ListAliasesResult DeserializeListAliasesResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(SearchAlias.DeserializeSearchAlias(item)); - } - value = array; - continue; - } - } - return new ListAliasesResult(value); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static ListAliasesResult FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeListAliasesResult(document.RootElement); - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ListAliasesResult.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ListAliasesResult.cs deleted file mode 100644 index fa7098882a440..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/ListAliasesResult.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Linq; - -namespace Azure.Search.Documents.Indexes.Models -{ - /// Response from a List Aliases request. If successful, it includes the associated index mappings for all aliases. - internal partial class ListAliasesResult - { - /// Initializes a new instance of . - /// The aliases in the Search service. - internal ListAliasesResult(IEnumerable aliases) - { - Aliases = aliases.ToList(); - } - - /// Initializes a new instance of . - /// The aliases in the Search service. - internal ListAliasesResult(IReadOnlyList aliases) - { - Aliases = aliases; - } - - /// The aliases in the Search service. - public IReadOnlyList Aliases { get; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/NativeBlobSoftDeleteDeletionDetectionPolicy.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/NativeBlobSoftDeleteDeletionDetectionPolicy.Serialization.cs deleted file mode 100644 index d5e23e62afb12..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/NativeBlobSoftDeleteDeletionDetectionPolicy.Serialization.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Search.Documents.Indexes.Models -{ - public partial class NativeBlobSoftDeleteDeletionDetectionPolicy : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("@odata.type"u8); - writer.WriteStringValue(ODataType); - writer.WriteEndObject(); - } - - internal static NativeBlobSoftDeleteDeletionDetectionPolicy DeserializeNativeBlobSoftDeleteDeletionDetectionPolicy(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string odataType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("@odata.type"u8)) - { - odataType = property.Value.GetString(); - continue; - } - } - return new NativeBlobSoftDeleteDeletionDetectionPolicy(odataType); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new NativeBlobSoftDeleteDeletionDetectionPolicy FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeNativeBlobSoftDeleteDeletionDetectionPolicy(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/NativeBlobSoftDeleteDeletionDetectionPolicy.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/NativeBlobSoftDeleteDeletionDetectionPolicy.cs deleted file mode 100644 index 959cb8a79fcfe..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/NativeBlobSoftDeleteDeletionDetectionPolicy.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Search.Documents.Indexes.Models -{ - /// Defines a data deletion detection policy utilizing Azure Blob Storage's native soft delete feature for deletion detection. - public partial class NativeBlobSoftDeleteDeletionDetectionPolicy : DataDeletionDetectionPolicy - { - /// Initializes a new instance of . - public NativeBlobSoftDeleteDeletionDetectionPolicy() - { - ODataType = "#Microsoft.Azure.Search.NativeBlobSoftDeleteDeletionDetectionPolicy"; - } - - /// Initializes a new instance of . - /// A URI fragment specifying the type of data deletion detection policy. - internal NativeBlobSoftDeleteDeletionDetectionPolicy(string oDataType) : base(oDataType) - { - ODataType = oDataType ?? "#Microsoft.Azure.Search.NativeBlobSoftDeleteDeletionDetectionPolicy"; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/LineEnding.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/OcrLineEnding.cs similarity index 54% rename from sdk/search/Azure.Search.Documents/src/Generated/Models/LineEnding.cs rename to sdk/search/Azure.Search.Documents/src/Generated/Models/OcrLineEnding.cs index a40f3ae888001..eb96d8eb9f17c 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/LineEnding.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/OcrLineEnding.cs @@ -11,13 +11,13 @@ namespace Azure.Search.Documents.Indexes.Models { /// Defines the sequence of characters to use between the lines of text recognized by the OCR skill. The default value is "space". - public readonly partial struct LineEnding : IEquatable + public readonly partial struct OcrLineEnding : IEquatable { private readonly string _value; - /// Initializes a new instance of . + /// Initializes a new instance of . /// is null. - public LineEnding(string value) + public OcrLineEnding(string value) { _value = value ?? throw new ArgumentNullException(nameof(value)); } @@ -28,25 +28,25 @@ public LineEnding(string value) private const string CarriageReturnLineFeedValue = "carriageReturnLineFeed"; /// Lines are separated by a single space character. - public static LineEnding Space { get; } = new LineEnding(SpaceValue); + public static OcrLineEnding Space { get; } = new OcrLineEnding(SpaceValue); /// Lines are separated by a carriage return ('\r') character. - public static LineEnding CarriageReturn { get; } = new LineEnding(CarriageReturnValue); + public static OcrLineEnding CarriageReturn { get; } = new OcrLineEnding(CarriageReturnValue); /// Lines are separated by a single line feed ('\n') character. - public static LineEnding LineFeed { get; } = new LineEnding(LineFeedValue); + public static OcrLineEnding LineFeed { get; } = new OcrLineEnding(LineFeedValue); /// Lines are separated by a carriage return and a line feed ('\r\n') character. - public static LineEnding CarriageReturnLineFeed { get; } = new LineEnding(CarriageReturnLineFeedValue); - /// Determines if two values are the same. - public static bool operator ==(LineEnding left, LineEnding right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(LineEnding left, LineEnding right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator LineEnding(string value) => new LineEnding(value); + public static OcrLineEnding CarriageReturnLineFeed { get; } = new OcrLineEnding(CarriageReturnLineFeedValue); + /// Determines if two values are the same. + public static bool operator ==(OcrLineEnding left, OcrLineEnding right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OcrLineEnding left, OcrLineEnding right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator OcrLineEnding(string value) => new OcrLineEnding(value); /// [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is LineEnding other && Equals(other); + public override bool Equals(object obj) => obj is OcrLineEnding other && Equals(other); /// - public bool Equals(LineEnding other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + public bool Equals(OcrLineEnding other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); /// [EditorBrowsable(EditorBrowsableState.Never)] diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/OcrSkill.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/OcrSkill.Serialization.cs index 2639b289bedb0..57c38542ff52f 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/OcrSkill.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/OcrSkill.Serialization.cs @@ -87,7 +87,7 @@ internal static OcrSkill DeserializeOcrSkill(JsonElement element) } OcrSkillLanguage? defaultLanguageCode = default; bool? detectOrientation = default; - LineEnding? lineEnding = default; + OcrLineEnding? lineEnding = default; string odataType = default; string name = default; string description = default; @@ -122,7 +122,7 @@ internal static OcrSkill DeserializeOcrSkill(JsonElement element) { continue; } - lineEnding = new LineEnding(property.Value.GetString()); + lineEnding = new OcrLineEnding(property.Value.GetString()); continue; } if (property.NameEquals("@odata.type"u8)) diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/OcrSkill.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/OcrSkill.cs index 752a83cf65354..07a1c82086862 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/OcrSkill.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/OcrSkill.cs @@ -35,7 +35,7 @@ public OcrSkill(IEnumerable inputs, IEnumerable A value indicating which language code to use. Default is `en`. /// A value indicating to turn orientation detection on or not. Default is false. /// Defines the sequence of characters to use between the lines of text recognized by the OCR skill. The default value is "space". - internal OcrSkill(string oDataType, string name, string description, string context, IList inputs, IList outputs, OcrSkillLanguage? defaultLanguageCode, bool? shouldDetectOrientation, LineEnding? lineEnding) : base(oDataType, name, description, context, inputs, outputs) + internal OcrSkill(string oDataType, string name, string description, string context, IList inputs, IList outputs, OcrSkillLanguage? defaultLanguageCode, bool? shouldDetectOrientation, OcrLineEnding? lineEnding) : base(oDataType, name, description, context, inputs, outputs) { DefaultLanguageCode = defaultLanguageCode; ShouldDetectOrientation = shouldDetectOrientation; @@ -43,6 +43,6 @@ internal OcrSkill(string oDataType, string name, string description, string cont ODataType = oDataType ?? "#Microsoft.Skills.Vision.OcrSkill"; } /// Defines the sequence of characters to use between the lines of text recognized by the OCR skill. The default value is "space". - public LineEnding? LineEnding { get; set; } + public OcrLineEnding? LineEnding { get; set; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryCaptionResult.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryCaptionResult.cs index 6df7c9704821d..e87f89ad78b4c 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryCaptionResult.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryCaptionResult.cs @@ -9,7 +9,7 @@ namespace Azure.Search.Documents.Models { - /// Captions are the most representative passages from the document relatively to the search query. They are often used as document summary. Captions are only returned for queries of type 'semantic'.. + /// Captions are the most representative passages from the document relatively to the search query. They are often used as document summary. Captions are only returned for queries of type `semantic`. public partial class QueryCaptionResult { /// Initializes a new instance of . diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryDebugMode.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryDebugMode.cs deleted file mode 100644 index 4627e6fab6855..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryDebugMode.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.Search.Documents.Models -{ - /// Enables a debugging tool that can be used to further explore your search results. - public readonly partial struct QueryDebugMode : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public QueryDebugMode(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string DisabledValue = "disabled"; - private const string SemanticValue = "semantic"; - - /// No query debugging information will be returned. - public static QueryDebugMode Disabled { get; } = new QueryDebugMode(DisabledValue); - /// Allows the user to further explore their reranked results. - public static QueryDebugMode Semantic { get; } = new QueryDebugMode(SemanticValue); - /// Determines if two values are the same. - public static bool operator ==(QueryDebugMode left, QueryDebugMode right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(QueryDebugMode left, QueryDebugMode right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator QueryDebugMode(string value) => new QueryDebugMode(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is QueryDebugMode other && Equals(other); - /// - public bool Equals(QueryDebugMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryLanguage.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryLanguage.cs deleted file mode 100644 index d0b1c58d39254..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryLanguage.cs +++ /dev/null @@ -1,261 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.Search.Documents.Models -{ - /// The language of the query. - public readonly partial struct QueryLanguage : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public QueryLanguage(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NoneValue = "none"; - private const string EnUsValue = "en-us"; - private const string EnGbValue = "en-gb"; - private const string EnInValue = "en-in"; - private const string EnCaValue = "en-ca"; - private const string EnAuValue = "en-au"; - private const string FrFrValue = "fr-fr"; - private const string FrCaValue = "fr-ca"; - private const string DeDeValue = "de-de"; - private const string EsEsValue = "es-es"; - private const string EsMxValue = "es-mx"; - private const string ZhCnValue = "zh-cn"; - private const string ZhTwValue = "zh-tw"; - private const string PtBrValue = "pt-br"; - private const string PtPtValue = "pt-pt"; - private const string ItItValue = "it-it"; - private const string JaJpValue = "ja-jp"; - private const string KoKrValue = "ko-kr"; - private const string RuRuValue = "ru-ru"; - private const string CsCzValue = "cs-cz"; - private const string NlBeValue = "nl-be"; - private const string NlNlValue = "nl-nl"; - private const string HuHuValue = "hu-hu"; - private const string PlPlValue = "pl-pl"; - private const string SvSeValue = "sv-se"; - private const string TrTrValue = "tr-tr"; - private const string HiInValue = "hi-in"; - private const string ArSaValue = "ar-sa"; - private const string ArEgValue = "ar-eg"; - private const string ArMaValue = "ar-ma"; - private const string ArKwValue = "ar-kw"; - private const string ArJoValue = "ar-jo"; - private const string DaDkValue = "da-dk"; - private const string NoNoValue = "no-no"; - private const string BgBgValue = "bg-bg"; - private const string HrHrValue = "hr-hr"; - private const string HrBaValue = "hr-ba"; - private const string MsMyValue = "ms-my"; - private const string MsBnValue = "ms-bn"; - private const string SlSlValue = "sl-sl"; - private const string TaInValue = "ta-in"; - private const string ViVnValue = "vi-vn"; - private const string ElGrValue = "el-gr"; - private const string RoRoValue = "ro-ro"; - private const string IsIsValue = "is-is"; - private const string IdIdValue = "id-id"; - private const string ThThValue = "th-th"; - private const string LtLtValue = "lt-lt"; - private const string UkUaValue = "uk-ua"; - private const string LvLvValue = "lv-lv"; - private const string EtEeValue = "et-ee"; - private const string CaEsValue = "ca-es"; - private const string FiFiValue = "fi-fi"; - private const string SrBaValue = "sr-ba"; - private const string SrMeValue = "sr-me"; - private const string SrRsValue = "sr-rs"; - private const string SkSkValue = "sk-sk"; - private const string NbNoValue = "nb-no"; - private const string HyAmValue = "hy-am"; - private const string BnInValue = "bn-in"; - private const string EuEsValue = "eu-es"; - private const string GlEsValue = "gl-es"; - private const string GuInValue = "gu-in"; - private const string HeIlValue = "he-il"; - private const string GaIeValue = "ga-ie"; - private const string KnInValue = "kn-in"; - private const string MlInValue = "ml-in"; - private const string MrInValue = "mr-in"; - private const string FaAeValue = "fa-ae"; - private const string PaInValue = "pa-in"; - private const string TeInValue = "te-in"; - private const string UrPkValue = "ur-pk"; - - /// Query language not specified. - public static QueryLanguage None { get; } = new QueryLanguage(NoneValue); - /// Query language value for English (United States). - public static QueryLanguage EnUs { get; } = new QueryLanguage(EnUsValue); - /// Query language value for English (Great Britain). - public static QueryLanguage EnGb { get; } = new QueryLanguage(EnGbValue); - /// Query language value for English (India). - public static QueryLanguage EnIn { get; } = new QueryLanguage(EnInValue); - /// Query language value for English (Canada). - public static QueryLanguage EnCa { get; } = new QueryLanguage(EnCaValue); - /// Query language value for English (Australia). - public static QueryLanguage EnAu { get; } = new QueryLanguage(EnAuValue); - /// Query language value for French (France). - public static QueryLanguage FrFr { get; } = new QueryLanguage(FrFrValue); - /// Query language value for French (Canada). - public static QueryLanguage FrCa { get; } = new QueryLanguage(FrCaValue); - /// Query language value for German (Germany). - public static QueryLanguage DeDe { get; } = new QueryLanguage(DeDeValue); - /// Query language value for Spanish (Spain). - public static QueryLanguage EsEs { get; } = new QueryLanguage(EsEsValue); - /// Query language value for Spanish (Mexico). - public static QueryLanguage EsMx { get; } = new QueryLanguage(EsMxValue); - /// Query language value for Chinese (China). - public static QueryLanguage ZhCn { get; } = new QueryLanguage(ZhCnValue); - /// Query language value for Chinese (Taiwan). - public static QueryLanguage ZhTw { get; } = new QueryLanguage(ZhTwValue); - /// Query language value for Portuguese (Brazil). - public static QueryLanguage PtBr { get; } = new QueryLanguage(PtBrValue); - /// Query language value for Portuguese (Portugal). - public static QueryLanguage PtPt { get; } = new QueryLanguage(PtPtValue); - /// Query language value for Italian (Italy). - public static QueryLanguage ItIt { get; } = new QueryLanguage(ItItValue); - /// Query language value for Japanese (Japan). - public static QueryLanguage JaJp { get; } = new QueryLanguage(JaJpValue); - /// Query language value for Korean (Korea). - public static QueryLanguage KoKr { get; } = new QueryLanguage(KoKrValue); - /// Query language value for Russian (Russia). - public static QueryLanguage RuRu { get; } = new QueryLanguage(RuRuValue); - /// Query language value for Czech (Czech Republic). - public static QueryLanguage CsCz { get; } = new QueryLanguage(CsCzValue); - /// Query language value for Dutch (Belgium). - public static QueryLanguage NlBe { get; } = new QueryLanguage(NlBeValue); - /// Query language value for Dutch (Netherlands). - public static QueryLanguage NlNl { get; } = new QueryLanguage(NlNlValue); - /// Query language value for Hungarian (Hungary). - public static QueryLanguage HuHu { get; } = new QueryLanguage(HuHuValue); - /// Query language value for Polish (Poland). - public static QueryLanguage PlPl { get; } = new QueryLanguage(PlPlValue); - /// Query language value for Swedish (Sweden). - public static QueryLanguage SvSe { get; } = new QueryLanguage(SvSeValue); - /// Query language value for Turkish (Turkey). - public static QueryLanguage TrTr { get; } = new QueryLanguage(TrTrValue); - /// Query language value for Hindi (India). - public static QueryLanguage HiIn { get; } = new QueryLanguage(HiInValue); - /// Query language value for Arabic (Saudi Arabia). - public static QueryLanguage ArSa { get; } = new QueryLanguage(ArSaValue); - /// Query language value for Arabic (Egypt). - public static QueryLanguage ArEg { get; } = new QueryLanguage(ArEgValue); - /// Query language value for Arabic (Morocco). - public static QueryLanguage ArMa { get; } = new QueryLanguage(ArMaValue); - /// Query language value for Arabic (Kuwait). - public static QueryLanguage ArKw { get; } = new QueryLanguage(ArKwValue); - /// Query language value for Arabic (Jordan). - public static QueryLanguage ArJo { get; } = new QueryLanguage(ArJoValue); - /// Query language value for Danish (Denmark). - public static QueryLanguage DaDk { get; } = new QueryLanguage(DaDkValue); - /// Query language value for Norwegian (Norway). - public static QueryLanguage NoNo { get; } = new QueryLanguage(NoNoValue); - /// Query language value for Bulgarian (Bulgaria). - public static QueryLanguage BgBg { get; } = new QueryLanguage(BgBgValue); - /// Query language value for Croatian (Croatia). - public static QueryLanguage HrHr { get; } = new QueryLanguage(HrHrValue); - /// Query language value for Croatian (Bosnia and Herzegovina). - public static QueryLanguage HrBa { get; } = new QueryLanguage(HrBaValue); - /// Query language value for Malay (Malaysia). - public static QueryLanguage MsMy { get; } = new QueryLanguage(MsMyValue); - /// Query language value for Malay (Brunei Darussalam). - public static QueryLanguage MsBn { get; } = new QueryLanguage(MsBnValue); - /// Query language value for Slovenian (Slovenia). - public static QueryLanguage SlSl { get; } = new QueryLanguage(SlSlValue); - /// Query language value for Tamil (India). - public static QueryLanguage TaIn { get; } = new QueryLanguage(TaInValue); - /// Query language value for Vietnamese (Viet Nam). - public static QueryLanguage ViVn { get; } = new QueryLanguage(ViVnValue); - /// Query language value for Greek (Greece). - public static QueryLanguage ElGr { get; } = new QueryLanguage(ElGrValue); - /// Query language value for Romanian (Romania). - public static QueryLanguage RoRo { get; } = new QueryLanguage(RoRoValue); - /// Query language value for Icelandic (Iceland). - public static QueryLanguage IsIs { get; } = new QueryLanguage(IsIsValue); - /// Query language value for Indonesian (Indonesia). - public static QueryLanguage IdId { get; } = new QueryLanguage(IdIdValue); - /// Query language value for Thai (Thailand). - public static QueryLanguage ThTh { get; } = new QueryLanguage(ThThValue); - /// Query language value for Lithuanian (Lithuania). - public static QueryLanguage LtLt { get; } = new QueryLanguage(LtLtValue); - /// Query language value for Ukrainian (Ukraine). - public static QueryLanguage UkUa { get; } = new QueryLanguage(UkUaValue); - /// Query language value for Latvian (Latvia). - public static QueryLanguage LvLv { get; } = new QueryLanguage(LvLvValue); - /// Query language value for Estonian (Estonia). - public static QueryLanguage EtEe { get; } = new QueryLanguage(EtEeValue); - /// Query language value for Catalan. - public static QueryLanguage CaEs { get; } = new QueryLanguage(CaEsValue); - /// Query language value for Finnish (Finland). - public static QueryLanguage FiFi { get; } = new QueryLanguage(FiFiValue); - /// Query language value for Serbian (Bosnia and Herzegovina). - public static QueryLanguage SrBa { get; } = new QueryLanguage(SrBaValue); - /// Query language value for Serbian (Montenegro). - public static QueryLanguage SrMe { get; } = new QueryLanguage(SrMeValue); - /// Query language value for Serbian (Serbia). - public static QueryLanguage SrRs { get; } = new QueryLanguage(SrRsValue); - /// Query language value for Slovak (Slovakia). - public static QueryLanguage SkSk { get; } = new QueryLanguage(SkSkValue); - /// Query language value for Norwegian (Norway). - public static QueryLanguage NbNo { get; } = new QueryLanguage(NbNoValue); - /// Query language value for Armenian (Armenia). - public static QueryLanguage HyAm { get; } = new QueryLanguage(HyAmValue); - /// Query language value for Bengali (India). - public static QueryLanguage BnIn { get; } = new QueryLanguage(BnInValue); - /// Query language value for Basque. - public static QueryLanguage EuEs { get; } = new QueryLanguage(EuEsValue); - /// Query language value for Galician. - public static QueryLanguage GlEs { get; } = new QueryLanguage(GlEsValue); - /// Query language value for Gujarati (India). - public static QueryLanguage GuIn { get; } = new QueryLanguage(GuInValue); - /// Query language value for Hebrew (Israel). - public static QueryLanguage HeIl { get; } = new QueryLanguage(HeIlValue); - /// Query language value for Irish (Ireland). - public static QueryLanguage GaIe { get; } = new QueryLanguage(GaIeValue); - /// Query language value for Kannada (India). - public static QueryLanguage KnIn { get; } = new QueryLanguage(KnInValue); - /// Query language value for Malayalam (India). - public static QueryLanguage MlIn { get; } = new QueryLanguage(MlInValue); - /// Query language value for Marathi (India). - public static QueryLanguage MrIn { get; } = new QueryLanguage(MrInValue); - /// Query language value for Persian (U.A.E.). - public static QueryLanguage FaAe { get; } = new QueryLanguage(FaAeValue); - /// Query language value for Punjabi (India). - public static QueryLanguage PaIn { get; } = new QueryLanguage(PaInValue); - /// Query language value for Telugu (India). - public static QueryLanguage TeIn { get; } = new QueryLanguage(TeInValue); - /// Query language value for Urdu (Pakistan). - public static QueryLanguage UrPk { get; } = new QueryLanguage(UrPkValue); - /// Determines if two values are the same. - public static bool operator ==(QueryLanguage left, QueryLanguage right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(QueryLanguage left, QueryLanguage right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator QueryLanguage(string value) => new QueryLanguage(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is QueryLanguage other && Equals(other); - /// - public bool Equals(QueryLanguage other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentRerankerInput.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentRerankerInput.Serialization.cs deleted file mode 100644 index 4959fde95be97..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentRerankerInput.Serialization.cs +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; - -namespace Azure.Search.Documents.Models -{ - public partial class QueryResultDocumentRerankerInput - { - internal static QueryResultDocumentRerankerInput DeserializeQueryResultDocumentRerankerInput(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string title = default; - string content = default; - string keywords = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("title"u8)) - { - title = property.Value.GetString(); - continue; - } - if (property.NameEquals("content"u8)) - { - content = property.Value.GetString(); - continue; - } - if (property.NameEquals("keywords"u8)) - { - keywords = property.Value.GetString(); - continue; - } - } - return new QueryResultDocumentRerankerInput(title, content, keywords); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static QueryResultDocumentRerankerInput FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeQueryResultDocumentRerankerInput(document.RootElement); - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentRerankerInput.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentRerankerInput.cs deleted file mode 100644 index 2980704e7d3cc..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentRerankerInput.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Search.Documents.Models -{ - /// The raw concatenated strings that were sent to the semantic enrichment process. - public partial class QueryResultDocumentRerankerInput - { - /// Initializes a new instance of . - internal QueryResultDocumentRerankerInput() - { - } - - /// Initializes a new instance of . - /// The raw string for the title field that was used for semantic enrichment. - /// The raw concatenated strings for the content fields that were used for semantic enrichment. - /// The raw concatenated strings for the keyword fields that were used for semantic enrichment. - internal QueryResultDocumentRerankerInput(string title, string content, string keywords) - { - Title = title; - Content = content; - Keywords = keywords; - } - - /// The raw string for the title field that was used for semantic enrichment. - public string Title { get; } - /// The raw concatenated strings for the content fields that were used for semantic enrichment. - public string Content { get; } - /// The raw concatenated strings for the keyword fields that were used for semantic enrichment. - public string Keywords { get; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentSemanticField.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentSemanticField.Serialization.cs deleted file mode 100644 index 31b3746ce65de..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentSemanticField.Serialization.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; - -namespace Azure.Search.Documents.Models -{ - public partial class QueryResultDocumentSemanticField - { - internal static QueryResultDocumentSemanticField DeserializeQueryResultDocumentSemanticField(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - SemanticFieldState? state = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("state"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - state = new SemanticFieldState(property.Value.GetString()); - continue; - } - } - return new QueryResultDocumentSemanticField(name, state); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static QueryResultDocumentSemanticField FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeQueryResultDocumentSemanticField(document.RootElement); - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentSemanticField.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentSemanticField.cs deleted file mode 100644 index 6d05204a9fc26..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentSemanticField.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Search.Documents.Models -{ - /// Description of fields that were sent to the semantic enrichment process, as well as how they were used. - public partial class QueryResultDocumentSemanticField - { - /// Initializes a new instance of . - internal QueryResultDocumentSemanticField() - { - } - - /// Initializes a new instance of . - /// The name of the field that was sent to the semantic enrichment process. - /// The way the field was used for the semantic enrichment process (fully used, partially used, or unused). - internal QueryResultDocumentSemanticField(string name, SemanticFieldState? state) - { - Name = name; - State = state; - } - - /// The name of the field that was sent to the semantic enrichment process. - public string Name { get; } - /// The way the field was used for the semantic enrichment process (fully used, partially used, or unused). - public SemanticFieldState? State { get; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/QuerySpellerType.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/QuerySpellerType.cs deleted file mode 100644 index 686b19c1d7175..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/QuerySpellerType.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.Search.Documents.Models -{ - /// Improve search recall by spell-correcting individual search query terms. - public readonly partial struct QuerySpellerType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public QuerySpellerType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NoneValue = "none"; - private const string LexiconValue = "lexicon"; - - /// Speller not enabled. - public static QuerySpellerType None { get; } = new QuerySpellerType(NoneValue); - /// Speller corrects individual query terms using a static lexicon for the language specified by the queryLanguage parameter. - public static QuerySpellerType Lexicon { get; } = new QuerySpellerType(LexiconValue); - /// Determines if two values are the same. - public static bool operator ==(QuerySpellerType left, QuerySpellerType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(QuerySpellerType left, QuerySpellerType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator QuerySpellerType(string value) => new QuerySpellerType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is QuerySpellerType other && Equals(other); - /// - public bool Equals(QuerySpellerType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ResetDocumentOptions.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ResetDocumentOptions.Serialization.cs deleted file mode 100644 index d80cf96ab34ae..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/ResetDocumentOptions.Serialization.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Search.Documents.Models -{ - public partial class ResetDocumentOptions : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(DocumentKeys)) - { - writer.WritePropertyName("documentKeys"u8); - writer.WriteStartArray(); - foreach (var item in DocumentKeys) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(DataSourceDocumentIds)) - { - writer.WritePropertyName("datasourceDocumentIds"u8); - writer.WriteStartArray(); - foreach (var item in DataSourceDocumentIds) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ResetDocumentOptions.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ResetDocumentOptions.cs deleted file mode 100644 index dbd74a1ae1f4e..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/ResetDocumentOptions.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; - -namespace Azure.Search.Documents.Models -{ - /// The DocumentKeysOrIds. - public partial class ResetDocumentOptions - { - /// Initializes a new instance of . - public ResetDocumentOptions() - { - DocumentKeys = new ChangeTrackingList(); - DataSourceDocumentIds = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// document keys to be reset. - /// datasource document identifiers to be reset. - internal ResetDocumentOptions(IList documentKeys, IList dataSourceDocumentIds) - { - DocumentKeys = documentKeys; - DataSourceDocumentIds = dataSourceDocumentIds; - } - - /// document keys to be reset. - public IList DocumentKeys { get; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ResetSkillsOptions.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ResetSkillsOptions.Serialization.cs deleted file mode 100644 index defcd28822f04..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/ResetSkillsOptions.Serialization.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Search.Documents.Models -{ - public partial class ResetSkillsOptions : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(SkillNames)) - { - writer.WritePropertyName("skillNames"u8); - writer.WriteStartArray(); - foreach (var item in SkillNames) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ResetSkillsOptions.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ResetSkillsOptions.cs deleted file mode 100644 index 3cfade9e4f976..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/ResetSkillsOptions.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; - -namespace Azure.Search.Documents.Models -{ - /// The SkillNames. - public partial class ResetSkillsOptions - { - /// Initializes a new instance of . - public ResetSkillsOptions() - { - SkillNames = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// the names of skills to be reset. - internal ResetSkillsOptions(IList skillNames) - { - SkillNames = skillNames; - } - - /// the names of skills to be reset. - public IList SkillNames { get; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationCompressionConfiguration.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationCompression.Serialization.cs similarity index 86% rename from sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationCompressionConfiguration.Serialization.cs rename to sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationCompression.Serialization.cs index 56f6115126e8b..f8c17f5097195 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationCompressionConfiguration.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationCompression.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.Search.Documents.Indexes.Models { - public partial class ScalarQuantizationCompressionConfiguration : IUtf8JsonSerializable + public partial class ScalarQuantizationCompression : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -21,7 +21,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteObjectValue(Parameters); } writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); + writer.WriteStringValue(CompressionName); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); if (Optional.IsDefined(RerankWithOriginalVectors)) @@ -44,7 +44,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static ScalarQuantizationCompressionConfiguration DeserializeScalarQuantizationCompressionConfiguration(JsonElement element) + internal static ScalarQuantizationCompression DeserializeScalarQuantizationCompression(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -96,15 +96,15 @@ internal static ScalarQuantizationCompressionConfiguration DeserializeScalarQuan continue; } } - return new ScalarQuantizationCompressionConfiguration(name, kind, rerankWithOriginalVectors, defaultOversampling, scalarQuantizationParameters); + return new ScalarQuantizationCompression(name, kind, rerankWithOriginalVectors, defaultOversampling, scalarQuantizationParameters); } /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new ScalarQuantizationCompressionConfiguration FromResponse(Response response) + internal static new ScalarQuantizationCompression FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeScalarQuantizationCompressionConfiguration(document.RootElement); + return DeserializeScalarQuantizationCompression(document.RootElement); } /// Convert into a . diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationCompressionConfiguration.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationCompression.cs similarity index 68% rename from sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationCompressionConfiguration.cs rename to sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationCompression.cs index 36e37f02d0b6b..ffc036d4c1cd0 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationCompressionConfiguration.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationCompression.cs @@ -10,25 +10,25 @@ namespace Azure.Search.Documents.Indexes.Models { /// Contains configuration options specific to the scalar quantization compression method used during indexing and querying. - public partial class ScalarQuantizationCompressionConfiguration : VectorSearchCompressionConfiguration + public partial class ScalarQuantizationCompression : VectorSearchCompression { - /// Initializes a new instance of . - /// The name to associate with this particular configuration. - /// is null. - public ScalarQuantizationCompressionConfiguration(string name) : base(name) + /// Initializes a new instance of . + /// The name to associate with this particular configuration. + /// is null. + public ScalarQuantizationCompression(string compressionName) : base(compressionName) { - Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(compressionName, nameof(compressionName)); Kind = VectorSearchCompressionKind.ScalarQuantization; } - /// Initializes a new instance of . - /// The name to associate with this particular configuration. + /// Initializes a new instance of . + /// The name to associate with this particular configuration. /// The name of the kind of compression method being configured for use with vector search. /// If set to true, once the ordered set of results calculated using compressed vectors are obtained, they will be reranked again by recalculating the full-precision similarity scores. This will improve recall at the expense of latency. /// Default oversampling factor. Oversampling will internally request more documents (specified by this multiplier) in the initial search. This increases the set of results that will be reranked using recomputed similarity scores from full-precision vectors. Minimum value is 1, meaning no oversampling (1x). This parameter can only be set when rerankWithOriginalVectors is true. Higher values improve recall at the expense of latency. /// Contains the parameters specific to Scalar Quantization. - internal ScalarQuantizationCompressionConfiguration(string name, VectorSearchCompressionKind kind, bool? rerankWithOriginalVectors, double? defaultOversampling, ScalarQuantizationParameters parameters) : base(name, kind, rerankWithOriginalVectors, defaultOversampling) + internal ScalarQuantizationCompression(string compressionName, VectorSearchCompressionKind kind, bool? rerankWithOriginalVectors, double? defaultOversampling, ScalarQuantizationParameters parameters) : base(compressionName, kind, rerankWithOriginalVectors, defaultOversampling) { Parameters = parameters; Kind = kind; diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationParameters.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationParameters.Serialization.cs index 182678bef1be3..95c46db2dfae8 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationParameters.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationParameters.Serialization.cs @@ -36,7 +36,7 @@ internal static ScalarQuantizationParameters DeserializeScalarQuantizationParame { return null; } - VectorSearchCompressionTargetDataType? quantizedDataType = default; + VectorSearchCompressionTarget? quantizedDataType = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("quantizedDataType"u8)) @@ -46,7 +46,7 @@ internal static ScalarQuantizationParameters DeserializeScalarQuantizationParame quantizedDataType = null; continue; } - quantizedDataType = new VectorSearchCompressionTargetDataType(property.Value.GetString()); + quantizedDataType = new VectorSearchCompressionTarget(property.Value.GetString()); continue; } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationParameters.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationParameters.cs index 15a76a620c23f..c687a6d3994d8 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationParameters.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/ScalarQuantizationParameters.cs @@ -17,12 +17,12 @@ public ScalarQuantizationParameters() /// Initializes a new instance of . /// The quantized data type of compressed vector values. - internal ScalarQuantizationParameters(VectorSearchCompressionTargetDataType? quantizedDataType) + internal ScalarQuantizationParameters(VectorSearchCompressionTarget? quantizedDataType) { QuantizedDataType = quantizedDataType; } /// The quantized data type of compressed vector values. - public VectorSearchCompressionTargetDataType? QuantizedDataType { get; set; } + public VectorSearchCompressionTarget? QuantizedDataType { get; set; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchAlias.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchAlias.Serialization.cs deleted file mode 100644 index 1f708f5b26c4d..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchAlias.Serialization.cs +++ /dev/null @@ -1,87 +0,0 @@ -// 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.Search.Documents.Indexes.Models -{ - public partial class SearchAlias : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("indexes"u8); - writer.WriteStartArray(); - foreach (var item in Indexes) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - if (Optional.IsDefined(_etag)) - { - writer.WritePropertyName("@odata.etag"u8); - writer.WriteStringValue(_etag); - } - writer.WriteEndObject(); - } - - internal static SearchAlias DeserializeSearchAlias(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - IList indexes = default; - string odataEtag = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("indexes"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - indexes = array; - continue; - } - if (property.NameEquals("@odata.etag"u8)) - { - odataEtag = property.Value.GetString(); - continue; - } - } - return new SearchAlias(name, indexes, odataEtag); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static SearchAlias FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeSearchAlias(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchAlias.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchAlias.cs deleted file mode 100644 index d0d00e756de96..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchAlias.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Azure.Search.Documents.Indexes.Models -{ - /// Represents an index alias, which describes a mapping from the alias name to an index. The alias name can be used in place of the index name for supported operations. - public partial class SearchAlias - { - /// Initializes a new instance of . - /// The name of the alias. - /// The name of the index this alias maps to. Only one index name may be specified. - /// or is null. - public SearchAlias(string name, IEnumerable indexes) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(indexes, nameof(indexes)); - - Name = name; - Indexes = indexes.ToList(); - } - - /// Initializes a new instance of . - /// The name of the alias. - /// The name of the index this alias maps to. Only one index name may be specified. - /// The ETag of the alias. - internal SearchAlias(string name, IList indexes, string etag) - { - Name = name; - Indexes = indexes; - _etag = etag; - } - - /// The name of the alias. - public string Name { get; set; } - /// The name of the index this alias maps to. Only one index name may be specified. - public IList Indexes { get; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchDocumentsResult.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchDocumentsResult.Serialization.cs index 940a3b5e92f08..7c024b5354900 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchDocumentsResult.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchDocumentsResult.Serialization.cs @@ -23,10 +23,10 @@ internal static SearchDocumentsResult DeserializeSearchDocumentsResult(JsonEleme IReadOnlyDictionary> searchFacets = default; IReadOnlyList searchAnswers = default; SearchOptions searchNextPageParameters = default; - SemanticErrorReason? searchSemanticPartialResponseReason = default; - SemanticSearchResultsType? searchSemanticPartialResponseType = default; IReadOnlyList value = default; string odataNextLink = default; + SemanticErrorReason? searchSemanticPartialResponseReason = default; + SemanticSearchResultsType? searchSemanticPartialResponseType = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("@odata.count"u8)) @@ -97,6 +97,21 @@ internal static SearchDocumentsResult DeserializeSearchDocumentsResult(JsonEleme searchNextPageParameters = SearchOptions.DeserializeSearchOptions(property.Value); continue; } + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SearchResult.DeserializeSearchResult(item)); + } + value = array; + continue; + } + if (property.NameEquals("@odata.nextLink"u8)) + { + odataNextLink = property.Value.GetString(); + continue; + } if (property.NameEquals("@search.semanticPartialResponseReason"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -115,21 +130,6 @@ internal static SearchDocumentsResult DeserializeSearchDocumentsResult(JsonEleme searchSemanticPartialResponseType = new SemanticSearchResultsType(property.Value.GetString()); continue; } - if (property.NameEquals("value"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(SearchResult.DeserializeSearchResult(item)); - } - value = array; - continue; - } - if (property.NameEquals("@odata.nextLink"u8)) - { - odataNextLink = property.Value.GetString(); - continue; - } } return new SearchDocumentsResult( odataCount, @@ -137,10 +137,10 @@ internal static SearchDocumentsResult DeserializeSearchDocumentsResult(JsonEleme searchFacets ?? new ChangeTrackingDictionary>(), searchAnswers ?? new ChangeTrackingList(), searchNextPageParameters, - searchSemanticPartialResponseReason, - searchSemanticPartialResponseType, value, - odataNextLink); + odataNextLink, + searchSemanticPartialResponseReason, + searchSemanticPartialResponseType); } /// Deserializes the model from a raw response. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchDocumentsResult.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchDocumentsResult.cs index e7d7732c831a0..dd01afb9b5564 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchDocumentsResult.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchDocumentsResult.cs @@ -28,21 +28,21 @@ internal SearchDocumentsResult(IEnumerable results) /// The facet query results for the search operation, organized as a collection of buckets for each faceted field; null if the query did not include any facet expressions. /// The answers query results for the search operation; null if the answers query parameter was not specified or set to 'none'. /// Continuation JSON payload returned when the query can't return all the requested results in a single response. You can use this JSON along with @odata.nextLink to formulate another POST Search request to get the next part of the search response. - /// Reason that a partial response was returned for a semantic ranking request. - /// Type of partial response that was returned for a semantic ranking request. /// The sequence of results returned by the query. /// Continuation URL returned when the query can't return all the requested results in a single response. You can use this URL to formulate another GET or POST Search request to get the next part of the search response. Make sure to use the same verb (GET or POST) as the request that produced this response. - internal SearchDocumentsResult(long? count, double? coverage, IReadOnlyDictionary> facets, IReadOnlyList answers, SearchOptions nextPageParameters, SemanticErrorReason? semanticPartialResponseReason, SemanticSearchResultsType? semanticPartialResponseType, IReadOnlyList results, string nextLink) + /// Reason that a partial response was returned for a semantic ranking request. + /// Type of partial response that was returned for a semantic ranking request. + internal SearchDocumentsResult(long? count, double? coverage, IReadOnlyDictionary> facets, IReadOnlyList answers, SearchOptions nextPageParameters, IReadOnlyList results, string nextLink, SemanticErrorReason? semanticPartialResponseReason, SemanticSearchResultsType? semanticPartialResponseType) { Count = count; Coverage = coverage; Facets = facets; Answers = answers; NextPageParameters = nextPageParameters; - SemanticPartialResponseReason = semanticPartialResponseReason; - SemanticPartialResponseType = semanticPartialResponseType; Results = results; NextLink = nextLink; + SemanticPartialResponseReason = semanticPartialResponseReason; + SemanticPartialResponseType = semanticPartialResponseType; } /// The total count of results found by the search operation, or null if the count was not requested. If present, the count may be greater than the number of results in this response. This can happen if you use the $top or $skip parameters, or if the query can't return all the requested documents in a single response. @@ -55,13 +55,13 @@ internal SearchDocumentsResult(long? count, double? coverage, IReadOnlyDictionar public IReadOnlyList Answers { get; } /// Continuation JSON payload returned when the query can't return all the requested results in a single response. You can use this JSON along with @odata.nextLink to formulate another POST Search request to get the next part of the search response. public SearchOptions NextPageParameters { get; } - /// Reason that a partial response was returned for a semantic ranking request. - public SemanticErrorReason? SemanticPartialResponseReason { get; } - /// Type of partial response that was returned for a semantic ranking request. - public SemanticSearchResultsType? SemanticPartialResponseType { get; } /// The sequence of results returned by the query. public IReadOnlyList Results { get; } /// Continuation URL returned when the query can't return all the requested results in a single response. You can use this URL to formulate another GET or POST Search request to get the next part of the search response. Make sure to use the same verb (GET or POST) as the request that produced this response. public string NextLink { get; } + /// Reason that a partial response was returned for a semantic ranking request. + public SemanticErrorReason? SemanticPartialResponseReason { get; } + /// Type of partial response that was returned for a semantic ranking request. + public SemanticSearchResultsType? SemanticPartialResponseType { get; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchField.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchField.Serialization.cs index e819df4548b63..443ba9279fb82 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchField.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchField.Serialization.cs @@ -91,18 +91,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("indexAnalyzer"); } } - if (Optional.IsDefined(NormalizerName)) - { - if (NormalizerName != null) - { - writer.WritePropertyName("normalizer"u8); - writer.WriteStringValue(NormalizerName.Value.ToString()); - } - else - { - writer.WriteNull("normalizer"); - } - } if (Optional.IsDefined(VectorSearchDimensions)) { if (VectorSearchDimensions != null) @@ -180,7 +168,6 @@ internal static SearchField DeserializeSearchField(JsonElement element) LexicalAnalyzerName? analyzer = default; LexicalAnalyzerName? searchAnalyzer = default; LexicalAnalyzerName? indexAnalyzer = default; - LexicalNormalizerName? normalizer = default; int? dimensions = default; string vectorSearchProfile = default; VectorEncodingFormat? vectorEncoding = default; @@ -291,16 +278,6 @@ internal static SearchField DeserializeSearchField(JsonElement element) indexAnalyzer = new LexicalAnalyzerName(property.Value.GetString()); continue; } - if (property.NameEquals("normalizer"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - normalizer = null; - continue; - } - normalizer = new LexicalNormalizerName(property.Value.GetString()); - continue; - } if (property.NameEquals("dimensions"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -373,7 +350,6 @@ internal static SearchField DeserializeSearchField(JsonElement element) analyzer, searchAnalyzer, indexAnalyzer, - normalizer, dimensions, vectorSearchProfile, vectorEncoding, diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchField.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchField.cs index 4bbad7499be62..84373ab1c2d14 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchField.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchField.cs @@ -26,13 +26,12 @@ public partial class SearchField /// The name of the analyzer to use for the field. This option can be used only with searchable fields and it can't be set together with either searchAnalyzer or indexAnalyzer. Once the analyzer is chosen, it cannot be changed for the field. Must be null for complex fields. /// The name of the analyzer used at search time for the field. This option can be used only with searchable fields. It must be set together with indexAnalyzer and it cannot be set together with the analyzer option. This property cannot be set to the name of a language analyzer; use the analyzer property instead if you need a language analyzer. This analyzer can be updated on an existing field. Must be null for complex fields. /// The name of the analyzer used at indexing time for the field. This option can be used only with searchable fields. It must be set together with searchAnalyzer and it cannot be set together with the analyzer option. This property cannot be set to the name of a language analyzer; use the analyzer property instead if you need a language analyzer. Once the analyzer is chosen, it cannot be changed for the field. Must be null for complex fields. - /// The name of the normalizer to use for the field. This option can be used only with fields with filterable, sortable, or facetable enabled. Once the normalizer is chosen, it cannot be changed for the field. Must be null for complex fields. /// The dimensionality of the vector field. /// The name of the vector search profile that specifies the algorithm and vectorizer to use when searching the vector field. /// The encoding format to interpret the field contents. /// A list of the names of synonym maps to associate with this field. This option can be used only with searchable fields. Currently only one synonym map per field is supported. Assigning a synonym map to a field ensures that query terms targeting that field are expanded at query-time using the rules in the synonym map. This attribute can be changed on existing fields. Must be null or an empty collection for complex fields. /// A list of sub-fields if this is a field of type Edm.ComplexType or Collection(Edm.ComplexType). Must be null or empty for simple fields. - internal SearchField(string name, SearchFieldDataType type, bool? isKey, bool? isRetrievable, bool? isStored, bool? isSearchable, bool? isFilterable, bool? isSortable, bool? isFacetable, LexicalAnalyzerName? analyzerName, LexicalAnalyzerName? searchAnalyzerName, LexicalAnalyzerName? indexAnalyzerName, LexicalNormalizerName? normalizerName, int? vectorSearchDimensions, string vectorSearchProfileName, VectorEncodingFormat? vectorEncodingFormat, IList synonymMapNames, IList fields) + internal SearchField(string name, SearchFieldDataType type, bool? isKey, bool? isRetrievable, bool? isStored, bool? isSearchable, bool? isFilterable, bool? isSortable, bool? isFacetable, LexicalAnalyzerName? analyzerName, LexicalAnalyzerName? searchAnalyzerName, LexicalAnalyzerName? indexAnalyzerName, int? vectorSearchDimensions, string vectorSearchProfileName, VectorEncodingFormat? vectorEncodingFormat, IList synonymMapNames, IList fields) { Name = name; Type = type; @@ -46,7 +45,6 @@ internal SearchField(string name, SearchFieldDataType type, bool? isKey, bool? i AnalyzerName = analyzerName; SearchAnalyzerName = searchAnalyzerName; IndexAnalyzerName = indexAnalyzerName; - NormalizerName = normalizerName; VectorSearchDimensions = vectorSearchDimensions; VectorSearchProfileName = vectorSearchProfileName; VectorEncodingFormat = vectorEncodingFormat; diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndex.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndex.Serialization.cs index 8417ab52413fa..9bfe7bde639f5 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndex.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndex.Serialization.cs @@ -102,16 +102,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndArray(); } - if (Optional.IsCollectionDefined(Normalizers)) - { - writer.WritePropertyName("normalizers"u8); - writer.WriteStartArray(); - foreach (var item in Normalizers) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } if (Optional.IsDefined(EncryptionKey)) { if (EncryptionKey != null) @@ -177,7 +167,6 @@ internal static SearchIndex DeserializeSearchIndex(JsonElement element) IList tokenizers = default; IList tokenFilters = default; IList charFilters = default; - IList normalizers = default; SearchResourceEncryptionKey encryptionKey = default; SimilarityAlgorithm similarity = default; SemanticSearch semantic = default; @@ -299,20 +288,6 @@ internal static SearchIndex DeserializeSearchIndex(JsonElement element) charFilters = array; continue; } - if (property.NameEquals("normalizers"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(LexicalNormalizer.DeserializeLexicalNormalizer(item)); - } - normalizers = array; - continue; - } if (property.NameEquals("encryptionKey"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -369,7 +344,6 @@ internal static SearchIndex DeserializeSearchIndex(JsonElement element) tokenizers ?? new ChangeTrackingList(), tokenFilters ?? new ChangeTrackingList(), charFilters ?? new ChangeTrackingList(), - normalizers ?? new ChangeTrackingList(), encryptionKey, similarity, semantic, diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndex.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndex.cs index dfaafc2d25533..b8d1928fa3ffe 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndex.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndex.cs @@ -41,11 +41,6 @@ public partial class SearchIndex /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// - /// - /// The normalizers for the index. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . - /// /// A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your data when you want full assurance that no one, not even Microsoft, can decrypt your data. Once you have encrypted your data, it will always remain encrypted. The search service will ignore attempts to set this property to null. You can change this property as needed if you want to rotate your encryption key; Your data will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019. /// /// The type of similarity algorithm to be used when scoring and ranking the documents matching a search query. The similarity algorithm can only be defined at index creation time and cannot be modified on existing indexes. If null, the ClassicSimilarity algorithm is used. @@ -55,7 +50,7 @@ public partial class SearchIndex /// Defines parameters for a search index that influence semantic capabilities. /// Contains configuration options related to vector search. /// The ETag of the index. - internal SearchIndex(string name, IList fields, IList scoringProfiles, string defaultScoringProfile, CorsOptions corsOptions, IList suggesters, IList analyzers, IList tokenizers, IList tokenFilters, IList charFilters, IList normalizers, SearchResourceEncryptionKey encryptionKey, SimilarityAlgorithm similarity, SemanticSearch semanticSearch, VectorSearch vectorSearch, string etag) + internal SearchIndex(string name, IList fields, IList scoringProfiles, string defaultScoringProfile, CorsOptions corsOptions, IList suggesters, IList analyzers, IList tokenizers, IList tokenFilters, IList charFilters, SearchResourceEncryptionKey encryptionKey, SimilarityAlgorithm similarity, SemanticSearch semanticSearch, VectorSearch vectorSearch, string etag) { Name = name; _fields = fields; @@ -67,7 +62,6 @@ internal SearchIndex(string name, IList fields, IList(), disabled, odataEtag, - encryptionKey, - cache); + encryptionKey); } /// Deserializes the model from a raw response. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexer.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexer.cs index 2d851fc20771f..6c5887698ed92 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexer.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexer.cs @@ -44,8 +44,7 @@ public SearchIndexer(string name, string dataSourceName, string targetIndexName) /// A value indicating whether the indexer is disabled. Default is false. /// The ETag of the indexer. /// A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your indexer definition (as well as indexer execution status) when you want full assurance that no one, not even Microsoft, can decrypt them. Once you have encrypted your indexer definition, it will always remain encrypted. The search service will ignore attempts to set this property to null. You can change this property as needed if you want to rotate your encryption key; Your indexer definition (and indexer execution status) will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019. - /// Adds caching to an enrichment pipeline to allow for incremental modification steps without having to rebuild the index every time. - internal SearchIndexer(string name, string description, string dataSourceName, string skillsetName, string targetIndexName, IndexingSchedule schedule, IndexingParameters parameters, IList fieldMappings, IList outputFieldMappings, bool? isDisabled, string etag, SearchResourceEncryptionKey encryptionKey, SearchIndexerCache cache) + internal SearchIndexer(string name, string description, string dataSourceName, string skillsetName, string targetIndexName, IndexingSchedule schedule, IndexingParameters parameters, IList fieldMappings, IList outputFieldMappings, bool? isDisabled, string etag, SearchResourceEncryptionKey encryptionKey) { Name = name; Description = description; @@ -59,7 +58,6 @@ internal SearchIndexer(string name, string description, string dataSourceName, s IsDisabled = isDisabled; _etag = etag; EncryptionKey = encryptionKey; - Cache = cache; } /// The name of the indexer. @@ -80,7 +78,5 @@ internal SearchIndexer(string name, string description, string dataSourceName, s public bool? IsDisabled { get; set; } /// A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your indexer definition (as well as indexer execution status) when you want full assurance that no one, not even Microsoft, can decrypt them. Once you have encrypted your indexer definition, it will always remain encrypted. The search service will ignore attempts to set this property to null. You can change this property as needed if you want to rotate your encryption key; Your indexer definition (and indexer execution status) will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019. public SearchResourceEncryptionKey EncryptionKey { get; set; } - /// Adds caching to an enrichment pipeline to allow for incremental modification steps without having to rebuild the index every time. - public SearchIndexerCache Cache { get; set; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerCache.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerCache.Serialization.cs deleted file mode 100644 index c6b2927aa0e29..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerCache.Serialization.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Search.Documents.Indexes.Models -{ - public partial class SearchIndexerCache : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(StorageConnectionString)) - { - writer.WritePropertyName("storageConnectionString"u8); - writer.WriteStringValue(StorageConnectionString); - } - if (Optional.IsDefined(EnableReprocessing)) - { - if (EnableReprocessing != null) - { - writer.WritePropertyName("enableReprocessing"u8); - writer.WriteBooleanValue(EnableReprocessing.Value); - } - else - { - writer.WriteNull("enableReprocessing"); - } - } - if (Optional.IsDefined(Identity)) - { - if (Identity != null) - { - writer.WritePropertyName("identity"u8); - writer.WriteObjectValue(Identity); - } - else - { - writer.WriteNull("identity"); - } - } - writer.WriteEndObject(); - } - - internal static SearchIndexerCache DeserializeSearchIndexerCache(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string storageConnectionString = default; - bool? enableReprocessing = default; - SearchIndexerDataIdentity identity = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("storageConnectionString"u8)) - { - storageConnectionString = property.Value.GetString(); - continue; - } - if (property.NameEquals("enableReprocessing"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - enableReprocessing = null; - continue; - } - enableReprocessing = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - identity = null; - continue; - } - identity = SearchIndexerDataIdentity.DeserializeSearchIndexerDataIdentity(property.Value); - continue; - } - } - return new SearchIndexerCache(storageConnectionString, enableReprocessing, identity); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static SearchIndexerCache FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeSearchIndexerCache(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerCache.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerCache.cs deleted file mode 100644 index bddd36fa0a5a3..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerCache.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Search.Documents.Indexes.Models -{ - /// The SearchIndexerCache. - public partial class SearchIndexerCache - { - /// Initializes a new instance of . - public SearchIndexerCache() - { - } - - /// Initializes a new instance of . - /// The connection string to the storage account where the cache data will be persisted. - /// Specifies whether incremental reprocessing is enabled. - /// - /// The user-assigned managed identity used for connections to the enrichment cache. If the connection string indicates an identity (ResourceId) and it's not specified, the system-assigned managed identity is used. On updates to the indexer, if the identity is unspecified, the value remains unchanged. If set to "none", the value of this property is cleared. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - internal SearchIndexerCache(string storageConnectionString, bool? enableReprocessing, SearchIndexerDataIdentity identity) - { - StorageConnectionString = storageConnectionString; - EnableReprocessing = enableReprocessing; - Identity = identity; - } - /// Specifies whether incremental reprocessing is enabled. - public bool? EnableReprocessing { get; set; } - /// - /// The user-assigned managed identity used for connections to the enrichment cache. If the connection string indicates an identity (ResourceId) and it's not specified, the system-assigned managed identity is used. On updates to the indexer, if the identity is unspecified, the value remains unchanged. If set to "none", the value of this property is cleared. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - public SearchIndexerDataIdentity Identity { get; set; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceConnection.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceConnection.Serialization.cs index 30705c4422419..6c603e3cca010 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceConnection.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceConnection.Serialization.cs @@ -28,18 +28,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteObjectValue(CredentialsInternal); writer.WritePropertyName("container"u8); writer.WriteObjectValue(Container); - if (Optional.IsDefined(Identity)) - { - if (Identity != null) - { - writer.WritePropertyName("identity"u8); - writer.WriteObjectValue(Identity); - } - else - { - writer.WriteNull("identity"); - } - } if (Optional.IsDefined(DataChangeDetectionPolicy)) { if (DataChangeDetectionPolicy != null) @@ -95,7 +83,6 @@ internal static SearchIndexerDataSourceConnection DeserializeSearchIndexerDataSo SearchIndexerDataSourceType type = default; DataSourceCredentials credentials = default; SearchIndexerDataContainer container = default; - SearchIndexerDataIdentity identity = default; DataChangeDetectionPolicy dataChangeDetectionPolicy = default; DataDeletionDetectionPolicy dataDeletionDetectionPolicy = default; string odataEtag = default; @@ -127,16 +114,6 @@ internal static SearchIndexerDataSourceConnection DeserializeSearchIndexerDataSo container = SearchIndexerDataContainer.DeserializeSearchIndexerDataContainer(property.Value); continue; } - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - identity = null; - continue; - } - identity = SearchIndexerDataIdentity.DeserializeSearchIndexerDataIdentity(property.Value); - continue; - } if (property.NameEquals("dataChangeDetectionPolicy"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -179,7 +156,6 @@ internal static SearchIndexerDataSourceConnection DeserializeSearchIndexerDataSo type, credentials, container, - identity, dataChangeDetectionPolicy, dataDeletionDetectionPolicy, odataEtag, diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceConnection.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceConnection.cs index 675a4a69a7bf4..2ade373a02d46 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceConnection.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceConnection.cs @@ -18,11 +18,6 @@ public partial class SearchIndexerDataSourceConnection /// The type of the datasource. /// Credentials for the datasource. /// The data container for the datasource. - /// - /// An explicit managed identity to use for this datasource. If not specified and the connection string is a managed identity, the system-assigned managed identity is used. If not specified, the value remains unchanged. If "none" is specified, the value of this property is cleared. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// /// /// The data change detection policy for the datasource. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. @@ -31,18 +26,17 @@ public partial class SearchIndexerDataSourceConnection /// /// The data deletion detection policy for the datasource. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include . /// /// The ETag of the data source. /// A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your datasource definition when you want full assurance that no one, not even Microsoft, can decrypt your data source definition. Once you have encrypted your data source definition, it will always remain encrypted. The search service will ignore attempts to set this property to null. You can change this property as needed if you want to rotate your encryption key; Your datasource definition will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019. - internal SearchIndexerDataSourceConnection(string name, string description, SearchIndexerDataSourceType type, DataSourceCredentials credentialsInternal, SearchIndexerDataContainer container, SearchIndexerDataIdentity identity, DataChangeDetectionPolicy dataChangeDetectionPolicy, DataDeletionDetectionPolicy dataDeletionDetectionPolicy, string etag, SearchResourceEncryptionKey encryptionKey) + internal SearchIndexerDataSourceConnection(string name, string description, SearchIndexerDataSourceType type, DataSourceCredentials credentialsInternal, SearchIndexerDataContainer container, DataChangeDetectionPolicy dataChangeDetectionPolicy, DataDeletionDetectionPolicy dataDeletionDetectionPolicy, string etag, SearchResourceEncryptionKey encryptionKey) { Name = name; Description = description; Type = type; CredentialsInternal = credentialsInternal; Container = container; - Identity = identity; DataChangeDetectionPolicy = dataChangeDetectionPolicy; DataDeletionDetectionPolicy = dataDeletionDetectionPolicy; _etag = etag; @@ -58,12 +52,6 @@ internal SearchIndexerDataSourceConnection(string name, string description, Sear /// The data container for the datasource. public SearchIndexerDataContainer Container { get; set; } /// - /// An explicit managed identity to use for this datasource. If not specified and the connection string is a managed identity, the system-assigned managed identity is used. If not specified, the value remains unchanged. If "none" is specified, the value of this property is cleared. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - public SearchIndexerDataIdentity Identity { get; set; } - /// /// The data change detection policy for the datasource. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . @@ -72,7 +60,7 @@ internal SearchIndexerDataSourceConnection(string name, string description, Sear /// /// The data deletion detection policy for the datasource. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include . /// public DataDeletionDetectionPolicy DataDeletionDetectionPolicy { get; set; } /// A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your datasource definition when you want full assurance that no one, not even Microsoft, can decrypt your data source definition. Once you have encrypted your data source definition, it will always remain encrypted. The search service will ignore attempts to set this property to null. You can change this property as needed if you want to rotate your encryption key; Your datasource definition will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceType.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceType.cs index 304f7115735d2..d26fcef065b66 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceType.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceType.cs @@ -28,7 +28,6 @@ public SearchIndexerDataSourceType(string value) private const string AzureTableValue = "azuretable"; private const string MySqlValue = "mysql"; private const string AdlsGen2Value = "adlsgen2"; - private const string OneLakeValue = "onelake"; /// Indicates an Azure SQL datasource. public static SearchIndexerDataSourceType AzureSql { get; } = new SearchIndexerDataSourceType(AzureSqlValue); @@ -42,8 +41,6 @@ public SearchIndexerDataSourceType(string value) public static SearchIndexerDataSourceType MySql { get; } = new SearchIndexerDataSourceType(MySqlValue); /// Indicates an ADLS Gen2 datasource. public static SearchIndexerDataSourceType AdlsGen2 { get; } = new SearchIndexerDataSourceType(AdlsGen2Value); - /// Indicates a Microsoft Fabric OneLake datasource. - public static SearchIndexerDataSourceType OneLake { get; } = new SearchIndexerDataSourceType(OneLakeValue); /// Determines if two values are the same. public static bool operator ==(SearchIndexerDataSourceType left, SearchIndexerDataSourceType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataUserAssignedIdentity.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataUserAssignedIdentity.Serialization.cs index 37073e1fbe7ef..d369f328ed298 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataUserAssignedIdentity.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataUserAssignedIdentity.Serialization.cs @@ -28,13 +28,13 @@ internal static SearchIndexerDataUserAssignedIdentity DeserializeSearchIndexerDa { return null; } - string userAssignedIdentity = default; + ResourceIdentifier userAssignedIdentity = default; string odataType = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("userAssignedIdentity"u8)) { - userAssignedIdentity = property.Value.GetString(); + userAssignedIdentity = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("@odata.type"u8)) diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataUserAssignedIdentity.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataUserAssignedIdentity.cs index 6a23cd5538cba..e1d03e6a8fa3b 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataUserAssignedIdentity.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataUserAssignedIdentity.cs @@ -6,6 +6,7 @@ #nullable disable using System; +using Azure.Core; namespace Azure.Search.Documents.Indexes.Models { @@ -15,7 +16,7 @@ public partial class SearchIndexerDataUserAssignedIdentity : SearchIndexerDataId /// Initializes a new instance of . /// The fully qualified Azure resource Id of a user assigned managed identity typically in the form "/subscriptions/12345678-1234-1234-1234-1234567890ab/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId" that should have been assigned to the search service. /// is null. - public SearchIndexerDataUserAssignedIdentity(string userAssignedIdentity) + public SearchIndexerDataUserAssignedIdentity(ResourceIdentifier userAssignedIdentity) { Argument.AssertNotNull(userAssignedIdentity, nameof(userAssignedIdentity)); @@ -26,13 +27,13 @@ public SearchIndexerDataUserAssignedIdentity(string userAssignedIdentity) /// Initializes a new instance of . /// A URI fragment specifying the type of identity. /// The fully qualified Azure resource Id of a user assigned managed identity typically in the form "/subscriptions/12345678-1234-1234-1234-1234567890ab/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId" that should have been assigned to the search service. - internal SearchIndexerDataUserAssignedIdentity(string oDataType, string userAssignedIdentity) : base(oDataType) + internal SearchIndexerDataUserAssignedIdentity(string oDataType, ResourceIdentifier userAssignedIdentity) : base(oDataType) { UserAssignedIdentity = userAssignedIdentity; ODataType = oDataType ?? "#Microsoft.Azure.Search.DataUserAssignedIdentity"; } /// The fully qualified Azure resource Id of a user assigned managed identity typically in the form "/subscriptions/12345678-1234-1234-1234-1234567890ab/resourceGroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId" that should have been assigned to the search service. - public string UserAssignedIdentity { get; set; } + public ResourceIdentifier UserAssignedIdentity { get; set; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerIndexProjections.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerIndexProjection.Serialization.cs similarity index 86% rename from sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerIndexProjections.Serialization.cs rename to sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerIndexProjection.Serialization.cs index f94b7a1bc3427..4c27085191bce 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerIndexProjections.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerIndexProjection.Serialization.cs @@ -11,7 +11,7 @@ namespace Azure.Search.Documents.Indexes.Models { - public partial class SearchIndexerIndexProjections : IUtf8JsonSerializable + public partial class SearchIndexerIndexProjection : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -31,7 +31,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static SearchIndexerIndexProjections DeserializeSearchIndexerIndexProjections(JsonElement element) + internal static SearchIndexerIndexProjection DeserializeSearchIndexerIndexProjection(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -61,15 +61,15 @@ internal static SearchIndexerIndexProjections DeserializeSearchIndexerIndexProje continue; } } - return new SearchIndexerIndexProjections(selectors, parameters); + return new SearchIndexerIndexProjection(selectors, parameters); } /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static SearchIndexerIndexProjections FromResponse(Response response) + internal static SearchIndexerIndexProjection FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeSearchIndexerIndexProjections(document.RootElement); + return DeserializeSearchIndexerIndexProjection(document.RootElement); } /// Convert into a . diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerIndexProjections.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerIndexProjection.cs similarity index 80% rename from sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerIndexProjections.cs rename to sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerIndexProjection.cs index b96026d5e0520..3ce3c39f5fe1b 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerIndexProjections.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerIndexProjection.cs @@ -12,22 +12,22 @@ namespace Azure.Search.Documents.Indexes.Models { /// Definition of additional projections to secondary search indexes. - public partial class SearchIndexerIndexProjections + public partial class SearchIndexerIndexProjection { - /// Initializes a new instance of . + /// Initializes a new instance of . /// A list of projections to be performed to secondary search indexes. /// is null. - public SearchIndexerIndexProjections(IEnumerable selectors) + public SearchIndexerIndexProjection(IEnumerable selectors) { Argument.AssertNotNull(selectors, nameof(selectors)); Selectors = selectors.ToList(); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// A list of projections to be performed to secondary search indexes. /// A dictionary of index projection-specific configuration properties. Each name is the name of a specific property. Each value must be of a primitive type. - internal SearchIndexerIndexProjections(IList selectors, SearchIndexerIndexProjectionsParameters parameters) + internal SearchIndexerIndexProjection(IList selectors, SearchIndexerIndexProjectionsParameters parameters) { Selectors = selectors; Parameters = parameters; diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerKnowledgeStoreParameters.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerKnowledgeStoreParameters.Serialization.cs deleted file mode 100644 index 7d406a2aaeebb..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerKnowledgeStoreParameters.Serialization.cs +++ /dev/null @@ -1,74 +0,0 @@ -// 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.Search.Documents.Indexes.Models -{ - public partial class SearchIndexerKnowledgeStoreParameters : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(SynthesizeGeneratedKeyName)) - { - writer.WritePropertyName("synthesizeGeneratedKeyName"u8); - writer.WriteBooleanValue(SynthesizeGeneratedKeyName.Value); - } - foreach (var item in AdditionalProperties) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - - internal static SearchIndexerKnowledgeStoreParameters DeserializeSearchIndexerKnowledgeStoreParameters(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - bool? synthesizeGeneratedKeyName = default; - IDictionary additionalProperties = default; - Dictionary additionalPropertiesDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("synthesizeGeneratedKeyName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - synthesizeGeneratedKeyName = property.Value.GetBoolean(); - continue; - } - additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); - } - additionalProperties = additionalPropertiesDictionary; - return new SearchIndexerKnowledgeStoreParameters(synthesizeGeneratedKeyName, additionalProperties); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static SearchIndexerKnowledgeStoreParameters FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeSearchIndexerKnowledgeStoreParameters(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerKnowledgeStoreParameters.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerKnowledgeStoreParameters.cs index 6c30d9beacdd6..20cb27b57f4b4 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerKnowledgeStoreParameters.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerKnowledgeStoreParameters.cs @@ -10,10 +10,10 @@ namespace Azure.Search.Documents.Indexes.Models { /// A dictionary of knowledge store-specific configuration properties. Each name is the name of a specific property. Each value must be of a primitive type. - public partial class SearchIndexerKnowledgeStoreParameters + internal partial class SearchIndexerKnowledgeStoreParameters { /// Initializes a new instance of . - public SearchIndexerKnowledgeStoreParameters() + internal SearchIndexerKnowledgeStoreParameters() { AdditionalProperties = new ChangeTrackingDictionary(); } @@ -21,15 +21,15 @@ public SearchIndexerKnowledgeStoreParameters() /// Initializes a new instance of . /// Whether or not projections should synthesize a generated key name if one isn't already present. /// Additional Properties. - internal SearchIndexerKnowledgeStoreParameters(bool? synthesizeGeneratedKeyName, IDictionary additionalProperties) + internal SearchIndexerKnowledgeStoreParameters(bool? synthesizeGeneratedKeyName, IReadOnlyDictionary additionalProperties) { SynthesizeGeneratedKeyName = synthesizeGeneratedKeyName; AdditionalProperties = additionalProperties; } /// Whether or not projections should synthesize a generated key name if one isn't already present. - public bool? SynthesizeGeneratedKeyName { get; set; } + public bool? SynthesizeGeneratedKeyName { get; } /// Additional Properties. - public IDictionary AdditionalProperties { get; } + public IReadOnlyDictionary AdditionalProperties { get; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.Serialization.cs index ab55a8bad84a8..7f8370507a332 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.Serialization.cs @@ -60,7 +60,6 @@ internal static SearchIndexerSkill DeserializeSearchIndexerSkill(JsonElement ele { switch (discriminator.GetString()) { - case "#Microsoft.Skills.Custom.AmlSkill": return AzureMachineLearningSkill.DeserializeAzureMachineLearningSkill(element); case "#Microsoft.Skills.Custom.WebApiSkill": return WebApiSkill.DeserializeWebApiSkill(element); case "#Microsoft.Skills.Text.AzureOpenAIEmbeddingSkill": return AzureOpenAIEmbeddingSkill.DeserializeAzureOpenAIEmbeddingSkill(element); case "#Microsoft.Skills.Text.CustomEntityLookupSkill": return CustomEntityLookupSkill.DeserializeCustomEntityLookupSkill(element); @@ -80,7 +79,6 @@ internal static SearchIndexerSkill DeserializeSearchIndexerSkill(JsonElement ele case "#Microsoft.Skills.Util.ShaperSkill": return ShaperSkill.DeserializeShaperSkill(element); case "#Microsoft.Skills.Vision.ImageAnalysisSkill": return ImageAnalysisSkill.DeserializeImageAnalysisSkill(element); case "#Microsoft.Skills.Vision.OcrSkill": return OcrSkill.DeserializeOcrSkill(element); - case "#Microsoft.Skills.Vision.VectorizeSkill": return VisionVectorizeSkill.DeserializeVisionVectorizeSkill(element); } } return UnknownSearchIndexerSkill.DeserializeUnknownSearchIndexerSkill(element); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.cs index 654052bfd6d70..c32248d2910a2 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.cs @@ -14,7 +14,7 @@ namespace Azure.Search.Documents.Indexes.Models /// /// Base type for skills. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , and . + /// The available derived classes include , , , , , , , , , , , , , , , and . /// public partial class SearchIndexerSkill { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkillset.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkillset.Serialization.cs index a79815a3a4a6b..8e95a7268c463 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkillset.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkillset.Serialization.cs @@ -40,10 +40,10 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("knowledgeStore"u8); writer.WriteObjectValue(KnowledgeStore); } - if (Optional.IsDefined(IndexProjections)) + if (Optional.IsDefined(IndexProjection)) { writer.WritePropertyName("indexProjections"u8); - writer.WriteObjectValue(IndexProjections); + writer.WriteObjectValue(IndexProjection); } if (Optional.IsDefined(_etag)) { @@ -76,7 +76,7 @@ internal static SearchIndexerSkillset DeserializeSearchIndexerSkillset(JsonEleme IList skills = default; CognitiveServicesAccount cognitiveServices = default; KnowledgeStore knowledgeStore = default; - SearchIndexerIndexProjections indexProjections = default; + SearchIndexerIndexProjection indexProjections = default; string odataEtag = default; SearchResourceEncryptionKey encryptionKey = default; foreach (var property in element.EnumerateObject()) @@ -125,7 +125,7 @@ internal static SearchIndexerSkillset DeserializeSearchIndexerSkillset(JsonEleme { continue; } - indexProjections = SearchIndexerIndexProjections.DeserializeSearchIndexerIndexProjections(property.Value); + indexProjections = SearchIndexerIndexProjection.DeserializeSearchIndexerIndexProjection(property.Value); continue; } if (property.NameEquals("@odata.etag"u8)) diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkillset.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkillset.cs index 0b7116b2981c7..e62f84e717be2 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkillset.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkillset.cs @@ -19,7 +19,7 @@ public partial class SearchIndexerSkillset /// /// A list of skills in the skillset. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , and . + /// The available derived classes include , , , , , , , , , , , , , , , and . /// /// or is null. public SearchIndexerSkillset(string name, IEnumerable skills) @@ -37,7 +37,7 @@ public SearchIndexerSkillset(string name, IEnumerable skills /// /// A list of skills in the skillset. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , , , , , , and . + /// The available derived classes include , , , , , , , , , , , , , , , and . /// /// /// Details about the Azure AI service to be used when running skills. @@ -45,17 +45,17 @@ public SearchIndexerSkillset(string name, IEnumerable skills /// The available derived classes include and . /// /// Definition of additional projections to Azure blob, table, or files, of enriched data. - /// Definition of additional projections to secondary search index(es). + /// Definition of additional projections to secondary search index(es). /// The ETag of the skillset. /// A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your skillset definition when you want full assurance that no one, not even Microsoft, can decrypt your skillset definition. Once you have encrypted your skillset definition, it will always remain encrypted. The search service will ignore attempts to set this property to null. You can change this property as needed if you want to rotate your encryption key; Your skillset definition will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019. - internal SearchIndexerSkillset(string name, string description, IList skills, CognitiveServicesAccount cognitiveServicesAccount, KnowledgeStore knowledgeStore, SearchIndexerIndexProjections indexProjections, string etag, SearchResourceEncryptionKey encryptionKey) + internal SearchIndexerSkillset(string name, string description, IList skills, CognitiveServicesAccount cognitiveServicesAccount, KnowledgeStore knowledgeStore, SearchIndexerIndexProjection indexProjection, string etag, SearchResourceEncryptionKey encryptionKey) { Name = name; Description = description; Skills = skills; CognitiveServicesAccount = cognitiveServicesAccount; KnowledgeStore = knowledgeStore; - IndexProjections = indexProjections; + IndexProjection = indexProjection; _etag = etag; EncryptionKey = encryptionKey; } @@ -73,7 +73,7 @@ internal SearchIndexerSkillset(string name, string description, IList Definition of additional projections to Azure blob, table, or files, of enriched data. public KnowledgeStore KnowledgeStore { get; set; } /// Definition of additional projections to secondary search index(es). - public SearchIndexerIndexProjections IndexProjections { get; set; } + public SearchIndexerIndexProjection IndexProjection { get; set; } /// A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your skillset definition when you want full assurance that no one, not even Microsoft, can decrypt your skillset definition. Once you have encrypted your skillset definition, it will always remain encrypted. The search service will ignore attempts to set this property to null. You can change this property as needed if you want to rotate your encryption key; Your skillset definition will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019. public SearchResourceEncryptionKey EncryptionKey { get; set; } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchOptions.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchOptions.Serialization.cs index 2b34ce6289fbc..fdad8d3756b40 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchOptions.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchOptions.Serialization.cs @@ -92,10 +92,35 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("scoringProfile"u8); writer.WriteStringValue(ScoringProfile); } - if (Optional.IsDefined(SemanticQuery)) + if (Optional.IsDefined(SearchText)) { - writer.WritePropertyName("semanticQuery"u8); - writer.WriteStringValue(SemanticQuery); + writer.WritePropertyName("search"u8); + writer.WriteStringValue(SearchText); + } + if (Optional.IsDefined(SearchFieldsRaw)) + { + writer.WritePropertyName("searchFields"u8); + writer.WriteStringValue(SearchFieldsRaw); + } + if (Optional.IsDefined(SearchMode)) + { + writer.WritePropertyName("searchMode"u8); + writer.WriteStringValue(SearchMode.Value.ToSerialString()); + } + if (Optional.IsDefined(SelectRaw)) + { + writer.WritePropertyName("select"u8); + writer.WriteStringValue(SelectRaw); + } + if (Optional.IsDefined(Skip)) + { + writer.WritePropertyName("skip"u8); + writer.WriteNumberValue(Skip.Value); + } + if (Optional.IsDefined(Size)) + { + writer.WritePropertyName("top"u8); + writer.WriteNumberValue(Size.Value); } if (Optional.IsDefined(SemanticConfigurationName)) { @@ -119,66 +144,21 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("semanticMaxWaitInMilliseconds"); } } - if (Optional.IsDefined(Debug)) - { - writer.WritePropertyName("debug"u8); - writer.WriteStringValue(Debug.Value.ToString()); - } - if (Optional.IsDefined(SearchText)) - { - writer.WritePropertyName("search"u8); - writer.WriteStringValue(SearchText); - } - if (Optional.IsDefined(SearchFieldsRaw)) - { - writer.WritePropertyName("searchFields"u8); - writer.WriteStringValue(SearchFieldsRaw); - } - if (Optional.IsDefined(SearchMode)) - { - writer.WritePropertyName("searchMode"u8); - writer.WriteStringValue(SearchMode.Value.ToSerialString()); - } - if (Optional.IsDefined(QueryLanguage)) - { - writer.WritePropertyName("queryLanguage"u8); - writer.WriteStringValue(QueryLanguage.Value.ToString()); - } - if (Optional.IsDefined(QuerySpeller)) + if (Optional.IsDefined(SemanticQuery)) { - writer.WritePropertyName("speller"u8); - writer.WriteStringValue(QuerySpeller.Value.ToString()); + writer.WritePropertyName("semanticQuery"u8); + writer.WriteStringValue(SemanticQuery); } if (Optional.IsDefined(QueryAnswerRaw)) { writer.WritePropertyName("answers"u8); writer.WriteStringValue(QueryAnswerRaw); } - if (Optional.IsDefined(SelectRaw)) - { - writer.WritePropertyName("select"u8); - writer.WriteStringValue(SelectRaw); - } - if (Optional.IsDefined(Skip)) - { - writer.WritePropertyName("skip"u8); - writer.WriteNumberValue(Skip.Value); - } - if (Optional.IsDefined(Size)) - { - writer.WritePropertyName("top"u8); - writer.WriteNumberValue(Size.Value); - } if (Optional.IsDefined(QueryCaptionRaw)) { writer.WritePropertyName("captions"u8); writer.WriteStringValue(QueryCaptionRaw); } - if (Optional.IsDefined(SemanticFieldsRaw)) - { - writer.WritePropertyName("semanticFields"u8); - writer.WriteStringValue(SemanticFieldsRaw); - } if (Optional.IsCollectionDefined(VectorQueries)) { writer.WritePropertyName("vectorQueries"u8); @@ -194,11 +174,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("vectorFilterMode"u8); writer.WriteStringValue(FilterMode.Value.ToString()); } - if (Optional.IsDefined(HybridSearch)) - { - writer.WritePropertyName("hybridSearch"u8); - writer.WriteObjectValue(HybridSearch); - } writer.WriteEndObject(); } @@ -221,25 +196,20 @@ internal static SearchOptions DeserializeSearchOptions(JsonElement element) string sessionId = default; IList scoringParameters = default; string scoringProfile = default; - string semanticQuery = default; - string semanticConfiguration = default; - SemanticErrorMode? semanticErrorHandling = default; - int? semanticMaxWaitInMilliseconds = default; - QueryDebugMode? debug = default; string search = default; string searchFields = default; SearchMode? searchMode = default; - QueryLanguage? queryLanguage = default; - QuerySpellerType? speller = default; - string answers = default; string select = default; int? skip = default; int? top = default; + string semanticConfiguration = default; + SemanticErrorMode? semanticErrorHandling = default; + int? semanticMaxWaitInMilliseconds = default; + string semanticQuery = default; + string answers = default; string captions = default; - string semanticFields = default; IList vectorQueries = default; VectorFilterMode? vectorFilterMode = default; - HybridSearch hybridSearch = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("count"u8)) @@ -341,79 +311,75 @@ internal static SearchOptions DeserializeSearchOptions(JsonElement element) scoringProfile = property.Value.GetString(); continue; } - if (property.NameEquals("semanticQuery"u8)) + if (property.NameEquals("search"u8)) { - semanticQuery = property.Value.GetString(); + search = property.Value.GetString(); continue; } - if (property.NameEquals("semanticConfiguration"u8)) + if (property.NameEquals("searchFields"u8)) { - semanticConfiguration = property.Value.GetString(); + searchFields = property.Value.GetString(); continue; } - if (property.NameEquals("semanticErrorHandling"u8)) + if (property.NameEquals("searchMode"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - semanticErrorHandling = new SemanticErrorMode(property.Value.GetString()); + searchMode = property.Value.GetString().ToSearchMode(); continue; } - if (property.NameEquals("semanticMaxWaitInMilliseconds"u8)) + if (property.NameEquals("select"u8)) + { + select = property.Value.GetString(); + continue; + } + if (property.NameEquals("skip"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - semanticMaxWaitInMilliseconds = null; continue; } - semanticMaxWaitInMilliseconds = property.Value.GetInt32(); + skip = property.Value.GetInt32(); continue; } - if (property.NameEquals("debug"u8)) + if (property.NameEquals("top"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - debug = new QueryDebugMode(property.Value.GetString()); - continue; - } - if (property.NameEquals("search"u8)) - { - search = property.Value.GetString(); + top = property.Value.GetInt32(); continue; } - if (property.NameEquals("searchFields"u8)) + if (property.NameEquals("semanticConfiguration"u8)) { - searchFields = property.Value.GetString(); + semanticConfiguration = property.Value.GetString(); continue; } - if (property.NameEquals("searchMode"u8)) + if (property.NameEquals("semanticErrorHandling"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - searchMode = property.Value.GetString().ToSearchMode(); + semanticErrorHandling = new SemanticErrorMode(property.Value.GetString()); continue; } - if (property.NameEquals("queryLanguage"u8)) + if (property.NameEquals("semanticMaxWaitInMilliseconds"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + semanticMaxWaitInMilliseconds = null; continue; } - queryLanguage = new QueryLanguage(property.Value.GetString()); + semanticMaxWaitInMilliseconds = property.Value.GetInt32(); continue; } - if (property.NameEquals("speller"u8)) + if (property.NameEquals("semanticQuery"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - speller = new QuerySpellerType(property.Value.GetString()); + semanticQuery = property.Value.GetString(); continue; } if (property.NameEquals("answers"u8)) @@ -421,39 +387,11 @@ internal static SearchOptions DeserializeSearchOptions(JsonElement element) answers = property.Value.GetString(); continue; } - if (property.NameEquals("select"u8)) - { - select = property.Value.GetString(); - continue; - } - if (property.NameEquals("skip"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - skip = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("top"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - top = property.Value.GetInt32(); - continue; - } if (property.NameEquals("captions"u8)) { captions = property.Value.GetString(); continue; } - if (property.NameEquals("semanticFields"u8)) - { - semanticFields = property.Value.GetString(); - continue; - } if (property.NameEquals("vectorQueries"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -477,15 +415,6 @@ internal static SearchOptions DeserializeSearchOptions(JsonElement element) vectorFilterMode = new VectorFilterMode(property.Value.GetString()); continue; } - if (property.NameEquals("hybridSearch"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - hybridSearch = HybridSearch.DeserializeHybridSearch(property.Value); - continue; - } } return new SearchOptions( count, @@ -501,25 +430,20 @@ internal static SearchOptions DeserializeSearchOptions(JsonElement element) sessionId, scoringParameters ?? new ChangeTrackingList(), scoringProfile, - semanticQuery, - semanticConfiguration, - semanticErrorHandling, - semanticMaxWaitInMilliseconds, - debug, search, searchFields, searchMode, - queryLanguage, - speller, - answers, select, skip, top, + semanticConfiguration, + semanticErrorHandling, + semanticMaxWaitInMilliseconds, + semanticQuery, + answers, captions, - semanticFields, vectorQueries ?? new ChangeTrackingList(), - vectorFilterMode, - hybridSearch); + vectorFilterMode); } /// Deserializes the model from a raw response. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchOptions.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchOptions.cs index 658a7d2f4873b..ae9139b8aac7e 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchOptions.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchOptions.cs @@ -38,7 +38,5 @@ public SearchOptions() public SearchMode? SearchMode { get; set; } /// The number of search results to skip. This value cannot be greater than 100,000. If you need to scan documents in sequence, but cannot use skip due to this limitation, consider using orderby on a totally-ordered key and filter with a range query instead. public int? Skip { get; set; } - /// The query parameters to configure hybrid search behaviors. - public HybridSearch HybridSearch { get; set; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResourceEncryptionKey.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResourceEncryptionKey.Serialization.cs index 6f1eb715d6d60..02d9ffbf383fc 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResourceEncryptionKey.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResourceEncryptionKey.Serialization.cs @@ -26,18 +26,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("accessCredentials"u8); writer.WriteObjectValue(AccessCredentialsInternal); } - if (Optional.IsDefined(Identity)) - { - if (Identity != null) - { - writer.WritePropertyName("identity"u8); - writer.WriteObjectValue(Identity); - } - else - { - writer.WriteNull("identity"); - } - } writer.WriteEndObject(); } @@ -51,7 +39,6 @@ internal static SearchResourceEncryptionKey DeserializeSearchResourceEncryptionK string keyVaultKeyVersion = default; string keyVaultUri = default; AzureActiveDirectoryApplicationCredentials accessCredentials = default; - SearchIndexerDataIdentity identity = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("keyVaultKeyName"u8)) @@ -78,18 +65,8 @@ internal static SearchResourceEncryptionKey DeserializeSearchResourceEncryptionK accessCredentials = AzureActiveDirectoryApplicationCredentials.DeserializeAzureActiveDirectoryApplicationCredentials(property.Value); continue; } - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - identity = null; - continue; - } - identity = SearchIndexerDataIdentity.DeserializeSearchIndexerDataIdentity(property.Value); - continue; - } } - return new SearchResourceEncryptionKey(keyVaultKeyName, keyVaultKeyVersion, keyVaultUri, accessCredentials, identity); + return new SearchResourceEncryptionKey(keyVaultKeyName, keyVaultKeyVersion, keyVaultUri, accessCredentials); } /// Deserializes the model from a raw response. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResourceEncryptionKey.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResourceEncryptionKey.cs index bbb9e6c17fa17..3a51a4463def6 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResourceEncryptionKey.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResourceEncryptionKey.cs @@ -17,24 +17,12 @@ public partial class SearchResourceEncryptionKey /// The version of your Azure Key Vault key to be used to encrypt your data at rest. /// The URI of your Azure Key Vault, also referred to as DNS name, that contains the key to be used to encrypt your data at rest. An example URI might be `https://my-keyvault-name.vault.azure.net`. /// Optional Azure Active Directory credentials used for accessing your Azure Key Vault. Not required if using managed identity instead. - /// - /// An explicit managed identity to use for this encryption key. If not specified and the access credentials property is null, the system-assigned managed identity is used. On update to the resource, if the explicit identity is unspecified, it remains unchanged. If "none" is specified, the value of this property is cleared. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - internal SearchResourceEncryptionKey(string keyName, string keyVersion, string vaultUri, AzureActiveDirectoryApplicationCredentials accessCredentialsInternal, SearchIndexerDataIdentity identity) + internal SearchResourceEncryptionKey(string keyName, string keyVersion, string vaultUri, AzureActiveDirectoryApplicationCredentials accessCredentialsInternal) { KeyName = keyName; KeyVersion = keyVersion; _vaultUri = vaultUri; AccessCredentialsInternal = accessCredentialsInternal; - Identity = identity; } - /// - /// An explicit managed identity to use for this encryption key. If not specified and the access credentials property is null, the system-assigned managed identity is used. On update to the resource, if the explicit identity is unspecified, it remains unchanged. If "none" is specified, the value of this property is cleared. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - public SearchIndexerDataIdentity Identity { get; set; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResult.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResult.Serialization.cs index c9b3b6dd852a6..48e14dfe0c398 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResult.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResult.Serialization.cs @@ -22,7 +22,6 @@ internal static SearchResult DeserializeSearchResult(JsonElement element) double? searchRerankerScore = default; IReadOnlyDictionary> searchHighlights = default; IReadOnlyList searchCaptions = default; - IReadOnlyList searchDocumentDebugInfo = default; IReadOnlyDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -83,31 +82,10 @@ internal static SearchResult DeserializeSearchResult(JsonElement element) searchCaptions = array; continue; } - if (property.NameEquals("@search.documentDebugInfo"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - searchDocumentDebugInfo = null; - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(Models.DocumentDebugInfo.DeserializeDocumentDebugInfo(item)); - } - searchDocumentDebugInfo = array; - continue; - } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; - return new SearchResult( - searchScore, - searchRerankerScore, - searchHighlights ?? new ChangeTrackingDictionary>(), - searchCaptions ?? new ChangeTrackingList(), - searchDocumentDebugInfo ?? new ChangeTrackingList(), - additionalProperties); + return new SearchResult(searchScore, searchRerankerScore, searchHighlights ?? new ChangeTrackingDictionary>(), searchCaptions ?? new ChangeTrackingList(), additionalProperties); } /// Deserializes the model from a raw response. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResult.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResult.cs index 57fab92fcd80c..981acaed0624c 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResult.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResult.cs @@ -19,7 +19,6 @@ internal SearchResult(double score) Score = score; Highlights = new ChangeTrackingDictionary>(); Captions = new ChangeTrackingList(); - DocumentDebugInfo = new ChangeTrackingList(); AdditionalProperties = new ChangeTrackingDictionary(); } @@ -28,15 +27,13 @@ internal SearchResult(double score) /// The relevance score computed by the semantic ranker for the top search results. Search results are sorted by the RerankerScore first and then by the Score. RerankerScore is only returned for queries of type 'semantic'. /// Text fragments from the document that indicate the matching search terms, organized by each applicable field; null if hit highlighting was not enabled for the query. /// Captions are the most representative passages from the document relatively to the search query. They are often used as document summary. Captions are only returned for queries of type 'semantic'. - /// Contains debugging information that can be used to further explore your search results. /// Additional Properties. - internal SearchResult(double score, double? rerankerScore, IReadOnlyDictionary> highlights, IReadOnlyList captions, IReadOnlyList documentDebugInfo, IReadOnlyDictionary additionalProperties) + internal SearchResult(double score, double? rerankerScore, IReadOnlyDictionary> highlights, IReadOnlyList captions, IReadOnlyDictionary additionalProperties) { Score = score; RerankerScore = rerankerScore; Highlights = highlights; Captions = captions; - DocumentDebugInfo = documentDebugInfo; AdditionalProperties = additionalProperties; } @@ -48,8 +45,6 @@ internal SearchResult(double score, double? rerankerScore, IReadOnlyDictionary> Highlights { get; } /// Captions are the most representative passages from the document relatively to the search query. They are often used as document summary. Captions are only returned for queries of type 'semantic'. public IReadOnlyList Captions { get; } - /// Contains debugging information that can be used to further explore your search results. - public IReadOnlyList DocumentDebugInfo { get; } /// Additional Properties. public IReadOnlyDictionary AdditionalProperties { get; } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchScoreThreshold.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchScoreThreshold.Serialization.cs deleted file mode 100644 index f2b5a82bbdb06..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchScoreThreshold.Serialization.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Search.Documents.Models -{ - public partial class SearchScoreThreshold : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("value"u8); - writer.WriteNumberValue(Value); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - writer.WriteEndObject(); - } - - internal static SearchScoreThreshold DeserializeSearchScoreThreshold(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - double value = default; - VectorThresholdKind kind = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - value = property.Value.GetDouble(); - continue; - } - if (property.NameEquals("kind"u8)) - { - kind = new VectorThresholdKind(property.Value.GetString()); - continue; - } - } - return new SearchScoreThreshold(kind, value); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new SearchScoreThreshold FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeSearchScoreThreshold(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchScoreThreshold.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchScoreThreshold.cs deleted file mode 100644 index c4187e5820ae2..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchScoreThreshold.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Search.Documents.Models -{ - /// The results of the vector query will filter based on the '@search.score' value. Note this is the @search.score returned as part of the search response. The threshold direction will be chosen for higher @search.score. - public partial class SearchScoreThreshold : VectorThreshold - { - /// Initializes a new instance of . - /// The threshold will filter based on the '@search.score' value. Note this is the @search.score returned as part of the search response. The threshold direction will be chosen for higher @search.score. - public SearchScoreThreshold(double value) - { - Value = value; - Kind = VectorThresholdKind.SearchScore; - } - - /// Initializes a new instance of . - /// The kind of threshold used to filter vector queries. - /// The threshold will filter based on the '@search.score' value. Note this is the @search.score returned as part of the search response. The threshold direction will be chosen for higher @search.score. - internal SearchScoreThreshold(VectorThresholdKind kind, double value) : base(kind) - { - Value = value; - Kind = kind; - } - - /// The threshold will filter based on the '@search.score' value. Note this is the @search.score returned as part of the search response. The threshold direction will be chosen for higher @search.score. - public double Value { get; set; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchServiceCounters.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchServiceCounters.Serialization.cs index 16a4c2345a078..47b2b352e890d 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchServiceCounters.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchServiceCounters.Serialization.cs @@ -17,7 +17,6 @@ internal static SearchServiceCounters DeserializeSearchServiceCounters(JsonEleme { return null; } - SearchResourceCounter aliasesCount = default; SearchResourceCounter documentCount = default; SearchResourceCounter indexesCount = default; SearchResourceCounter indexersCount = default; @@ -28,11 +27,6 @@ internal static SearchServiceCounters DeserializeSearchServiceCounters(JsonEleme SearchResourceCounter vectorIndexSize = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("aliasesCount"u8)) - { - aliasesCount = SearchResourceCounter.DeserializeSearchResourceCounter(property.Value); - continue; - } if (property.NameEquals("documentCount"u8)) { documentCount = SearchResourceCounter.DeserializeSearchResourceCounter(property.Value); @@ -75,7 +69,6 @@ internal static SearchServiceCounters DeserializeSearchServiceCounters(JsonEleme } } return new SearchServiceCounters( - aliasesCount, documentCount, indexesCount, indexersCount, diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchServiceCounters.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchServiceCounters.cs index c63049576a303..043299a1a217e 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchServiceCounters.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchServiceCounters.cs @@ -13,7 +13,6 @@ namespace Azure.Search.Documents.Indexes.Models public partial class SearchServiceCounters { /// Initializes a new instance of . - /// Total number of aliases. /// Total number of documents across all indexes in the service. /// Total number of indexes. /// Total number of indexers. @@ -22,10 +21,9 @@ public partial class SearchServiceCounters /// Total number of synonym maps. /// Total number of skillsets. /// Total memory consumption of all vector indexes within the service, in bytes. - /// , , , , , , , or is null. - internal SearchServiceCounters(SearchResourceCounter aliasCounter, SearchResourceCounter documentCounter, SearchResourceCounter indexCounter, SearchResourceCounter indexerCounter, SearchResourceCounter dataSourceCounter, SearchResourceCounter storageSizeCounter, SearchResourceCounter synonymMapCounter, SearchResourceCounter skillsetCounter, SearchResourceCounter vectorIndexSizeCounter) + /// , , , , , , or is null. + internal SearchServiceCounters(SearchResourceCounter documentCounter, SearchResourceCounter indexCounter, SearchResourceCounter indexerCounter, SearchResourceCounter dataSourceCounter, SearchResourceCounter storageSizeCounter, SearchResourceCounter synonymMapCounter, SearchResourceCounter skillsetCounter, SearchResourceCounter vectorIndexSizeCounter) { - Argument.AssertNotNull(aliasCounter, nameof(aliasCounter)); Argument.AssertNotNull(documentCounter, nameof(documentCounter)); Argument.AssertNotNull(indexCounter, nameof(indexCounter)); Argument.AssertNotNull(indexerCounter, nameof(indexerCounter)); @@ -35,7 +33,6 @@ internal SearchServiceCounters(SearchResourceCounter aliasCounter, SearchResourc Argument.AssertNotNull(skillsetCounter, nameof(skillsetCounter)); Argument.AssertNotNull(vectorIndexSizeCounter, nameof(vectorIndexSizeCounter)); - AliasCounter = aliasCounter; DocumentCounter = documentCounter; IndexCounter = indexCounter; IndexerCounter = indexerCounter; @@ -46,8 +43,6 @@ internal SearchServiceCounters(SearchResourceCounter aliasCounter, SearchResourc VectorIndexSizeCounter = vectorIndexSizeCounter; } - /// Total number of aliases. - public SearchResourceCounter AliasCounter { get; } /// Total number of documents across all indexes in the service. public SearchResourceCounter DocumentCounter { get; } /// Total number of indexes. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticDebugInfo.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticDebugInfo.Serialization.cs deleted file mode 100644 index d7d08f89a1423..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticDebugInfo.Serialization.cs +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; - -namespace Azure.Search.Documents.Models -{ - public partial class SemanticDebugInfo - { - internal static SemanticDebugInfo DeserializeSemanticDebugInfo(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - QueryResultDocumentSemanticField titleField = default; - IReadOnlyList contentFields = default; - IReadOnlyList keywordFields = default; - QueryResultDocumentRerankerInput rerankerInput = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("titleField"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - titleField = QueryResultDocumentSemanticField.DeserializeQueryResultDocumentSemanticField(property.Value); - continue; - } - if (property.NameEquals("contentFields"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(QueryResultDocumentSemanticField.DeserializeQueryResultDocumentSemanticField(item)); - } - contentFields = array; - continue; - } - if (property.NameEquals("keywordFields"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(QueryResultDocumentSemanticField.DeserializeQueryResultDocumentSemanticField(item)); - } - keywordFields = array; - continue; - } - if (property.NameEquals("rerankerInput"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - rerankerInput = QueryResultDocumentRerankerInput.DeserializeQueryResultDocumentRerankerInput(property.Value); - continue; - } - } - return new SemanticDebugInfo(titleField, contentFields ?? new ChangeTrackingList(), keywordFields ?? new ChangeTrackingList(), rerankerInput); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static SemanticDebugInfo FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeSemanticDebugInfo(document.RootElement); - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticDebugInfo.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticDebugInfo.cs deleted file mode 100644 index 6f15066b9bbe3..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticDebugInfo.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; - -namespace Azure.Search.Documents.Models -{ - /// The SemanticDebugInfo. - public partial class SemanticDebugInfo - { - /// Initializes a new instance of . - internal SemanticDebugInfo() - { - ContentFields = new ChangeTrackingList(); - KeywordFields = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// The title field that was sent to the semantic enrichment process, as well as how it was used. - /// The content fields that were sent to the semantic enrichment process, as well as how they were used. - /// The keyword fields that were sent to the semantic enrichment process, as well as how they were used. - /// The raw concatenated strings that were sent to the semantic enrichment process. - internal SemanticDebugInfo(QueryResultDocumentSemanticField titleField, IReadOnlyList contentFields, IReadOnlyList keywordFields, QueryResultDocumentRerankerInput rerankerInput) - { - TitleField = titleField; - ContentFields = contentFields; - KeywordFields = keywordFields; - RerankerInput = rerankerInput; - } - - /// The title field that was sent to the semantic enrichment process, as well as how it was used. - public QueryResultDocumentSemanticField TitleField { get; } - /// The content fields that were sent to the semantic enrichment process, as well as how they were used. - public IReadOnlyList ContentFields { get; } - /// The keyword fields that were sent to the semantic enrichment process, as well as how they were used. - public IReadOnlyList KeywordFields { get; } - /// The raw concatenated strings that were sent to the semantic enrichment process. - public QueryResultDocumentRerankerInput RerankerInput { get; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticErrorReason.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticErrorReason.cs index f0a283b4620b0..6a52eed89efeb 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticErrorReason.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticErrorReason.cs @@ -26,7 +26,7 @@ public SemanticErrorReason(string value) private const string CapacityOverloadedValue = "capacityOverloaded"; private const string TransientValue = "transient"; - /// If 'semanticMaxWaitInMilliseconds' was set and the semantic processing duration exceeded that value. Only the base results were returned. + /// If `semanticMaxWaitInMilliseconds` was set and the semantic processing duration exceeded that value. Only the base results were returned. public static SemanticErrorReason MaxWaitExceeded { get; } = new SemanticErrorReason(MaxWaitExceededValue); /// The request was throttled. Only the base results were returned. public static SemanticErrorReason CapacityOverloaded { get; } = new SemanticErrorReason(CapacityOverloadedValue); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticFieldState.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticFieldState.cs deleted file mode 100644 index ee41326df8cd1..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticFieldState.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.Search.Documents.Models -{ - /// The way the field was used for the semantic enrichment process. - public readonly partial struct SemanticFieldState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SemanticFieldState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string UsedValue = "used"; - private const string UnusedValue = "unused"; - private const string PartialValue = "partial"; - - /// The field was fully used for semantic enrichment. - public static SemanticFieldState Used { get; } = new SemanticFieldState(UsedValue); - /// The field was not used for semantic enrichment. - public static SemanticFieldState Unused { get; } = new SemanticFieldState(UnusedValue); - /// The field was partially used for semantic enrichment. - public static SemanticFieldState Partial { get; } = new SemanticFieldState(PartialValue); - /// Determines if two values are the same. - public static bool operator ==(SemanticFieldState left, SemanticFieldState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SemanticFieldState left, SemanticFieldState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator SemanticFieldState(string value) => new SemanticFieldState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SemanticFieldState other && Equals(other); - /// - public bool Equals(SemanticFieldState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/TokenFilterName.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/TokenFilterName.cs index 37823872aef5f..2c7101eb58515 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/TokenFilterName.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/TokenFilterName.cs @@ -111,7 +111,7 @@ public TokenFilterName(string value) public static TokenFilterName Snowball { get; } = new TokenFilterName(SnowballValue); /// Normalizes the Unicode representation of Sorani text. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/ckb/SoraniNormalizationFilter.html. public static TokenFilterName SoraniNormalization { get; } = new TokenFilterName(SoraniNormalizationValue); - /// Language specific stemming filter. See https://docs.microsoft.com/rest/api/searchservice/Custom-analyzers-in-Azure-Search#TokenFilters. + /// Language specific stemming filter. See https://learn.microsoft.com/rest/api/searchservice/Custom-analyzers-in-Azure-Search#TokenFilters. public static TokenFilterName Stemmer { get; } = new TokenFilterName(StemmerValue); /// Removes stop words from a token stream. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/core/StopFilter.html. public static TokenFilterName Stopwords { get; } = new TokenFilterName(StopwordsValue); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownLexicalNormalizer.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownLexicalNormalizer.Serialization.cs deleted file mode 100644 index baf969295278f..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownLexicalNormalizer.Serialization.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.Search.Documents.Indexes.Models; - -namespace Azure.Search.Documents.Models -{ - internal partial class UnknownLexicalNormalizer : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("@odata.type"u8); - writer.WriteStringValue(ODataType); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WriteEndObject(); - } - - internal static UnknownLexicalNormalizer DeserializeUnknownLexicalNormalizer(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string odataType = "Unknown"; - string name = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("@odata.type"u8)) - { - odataType = property.Value.GetString(); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - } - return new UnknownLexicalNormalizer(odataType, name); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new UnknownLexicalNormalizer FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeUnknownLexicalNormalizer(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownLexicalNormalizer.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownLexicalNormalizer.cs deleted file mode 100644 index 0805ebc85bc69..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownLexicalNormalizer.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using Azure.Search.Documents.Indexes.Models; - -namespace Azure.Search.Documents.Models -{ - /// Unknown version of LexicalNormalizer. - internal partial class UnknownLexicalNormalizer : LexicalNormalizer - { - /// Initializes a new instance of . - /// A URI fragment specifying the type of normalizer. - /// The name of the normalizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. It cannot end in '.microsoft' nor '.lucene', nor be named 'asciifolding', 'standard', 'lowercase', 'uppercase', or 'elision'. - internal UnknownLexicalNormalizer(string oDataType, string name) : base(oDataType, name) - { - ODataType = oDataType ?? "Unknown"; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorQuery.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorQuery.Serialization.cs index f394363037e4e..8f161f311fa7d 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorQuery.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorQuery.Serialization.cs @@ -42,11 +42,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("weight"u8); writer.WriteNumberValue(Weight.Value); } - if (Optional.IsDefined(Threshold)) - { - writer.WritePropertyName("threshold"u8); - writer.WriteObjectValue(Threshold); - } writer.WriteEndObject(); } @@ -62,7 +57,6 @@ internal static UnknownVectorQuery DeserializeUnknownVectorQuery(JsonElement ele bool? exhaustive = default; double? oversampling = default; float? weight = default; - VectorThreshold threshold = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("kind"u8)) @@ -111,15 +105,6 @@ internal static UnknownVectorQuery DeserializeUnknownVectorQuery(JsonElement ele weight = property.Value.GetSingle(); continue; } - if (property.NameEquals("threshold"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - threshold = VectorThreshold.DeserializeVectorThreshold(property.Value); - continue; - } } return new UnknownVectorQuery( kind, @@ -127,8 +112,7 @@ internal static UnknownVectorQuery DeserializeUnknownVectorQuery(JsonElement ele fields, exhaustive, oversampling, - weight, - threshold); + weight); } /// Deserializes the model from a raw response. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorQuery.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorQuery.cs index ce63d0fc11e48..d87adc7730008 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorQuery.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorQuery.cs @@ -17,12 +17,7 @@ internal partial class UnknownVectorQuery : VectorQuery /// When true, triggers an exhaustive k-nearest neighbor search across all vectors within the vector index. Useful for scenarios where exact matches are critical, such as determining ground truth values. /// Oversampling factor. Minimum value is 1. It overrides the 'defaultOversampling' parameter configured in the index definition. It can be set only when 'rerankWithOriginalVectors' is true. This parameter is only permitted when a compression method is used on the underlying vector field. /// Relative weight of the vector query when compared to other vector query and/or the text query within the same search request. This value is used when combining the results of multiple ranking lists produced by the different vector queries and/or the results retrieved through the text query. The higher the weight, the higher the documents that matched that query will be in the final ranking. Default is 1.0 and the value needs to be a positive number larger than zero. - /// - /// The threshold used for vector queries. Note this can only be set if all 'fields' use the same similarity metric. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - internal UnknownVectorQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, VectorThreshold threshold) : base(kind, kNearestNeighborsCount, fieldsRaw, exhaustive, oversampling, weight, threshold) + internal UnknownVectorQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight) : base(kind, kNearestNeighborsCount, fieldsRaw, exhaustive, oversampling, weight) { Kind = kind; } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchCompressionConfiguration.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchCompression.Serialization.cs similarity index 84% rename from sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchCompressionConfiguration.Serialization.cs rename to sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchCompression.Serialization.cs index 51a79283ac888..735c75b9e7b59 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchCompressionConfiguration.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchCompression.Serialization.cs @@ -11,13 +11,13 @@ namespace Azure.Search.Documents.Models { - internal partial class UnknownVectorSearchCompressionConfiguration : IUtf8JsonSerializable + internal partial class UnknownVectorSearchCompression : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); + writer.WriteStringValue(CompressionName); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); if (Optional.IsDefined(RerankWithOriginalVectors)) @@ -40,7 +40,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static UnknownVectorSearchCompressionConfiguration DeserializeUnknownVectorSearchCompressionConfiguration(JsonElement element) + internal static UnknownVectorSearchCompression DeserializeUnknownVectorSearchCompression(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -82,22 +82,22 @@ internal static UnknownVectorSearchCompressionConfiguration DeserializeUnknownVe continue; } } - return new UnknownVectorSearchCompressionConfiguration(name, kind, rerankWithOriginalVectors, defaultOversampling); + return new UnknownVectorSearchCompression(name, kind, rerankWithOriginalVectors, defaultOversampling); } /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new UnknownVectorSearchCompressionConfiguration FromResponse(Response response) + internal static new UnknownVectorSearchCompression FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeUnknownVectorSearchCompressionConfiguration(document.RootElement); + return DeserializeUnknownVectorSearchCompression(document.RootElement); } /// Convert into a . internal override RequestContent ToRequestContent() { var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); + content.JsonWriter.WriteObjectValue(this); return content; } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchCompressionConfiguration.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchCompression.cs similarity index 68% rename from sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchCompressionConfiguration.cs rename to sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchCompression.cs index 9e3887fe2c428..125ebc32210f2 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchCompressionConfiguration.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchCompression.cs @@ -9,15 +9,15 @@ namespace Azure.Search.Documents.Models { - /// Unknown version of VectorSearchCompressionConfiguration. - internal partial class UnknownVectorSearchCompressionConfiguration : VectorSearchCompressionConfiguration + /// Unknown version of VectorSearchCompression. + internal partial class UnknownVectorSearchCompression : VectorSearchCompression { - /// Initializes a new instance of . - /// The name to associate with this particular configuration. + /// Initializes a new instance of . + /// The name to associate with this particular configuration. /// The name of the kind of compression method being configured for use with vector search. /// If set to true, once the ordered set of results calculated using compressed vectors are obtained, they will be reranked again by recalculating the full-precision similarity scores. This will improve recall at the expense of latency. /// Default oversampling factor. Oversampling will internally request more documents (specified by this multiplier) in the initial search. This increases the set of results that will be reranked using recomputed similarity scores from full-precision vectors. Minimum value is 1, meaning no oversampling (1x). This parameter can only be set when rerankWithOriginalVectors is true. Higher values improve recall at the expense of latency. - internal UnknownVectorSearchCompressionConfiguration(string name, VectorSearchCompressionKind kind, bool? rerankWithOriginalVectors, double? defaultOversampling) : base(name, kind, rerankWithOriginalVectors, defaultOversampling) + internal UnknownVectorSearchCompression(string compressionName, VectorSearchCompressionKind kind, bool? rerankWithOriginalVectors, double? defaultOversampling) : base(compressionName, kind, rerankWithOriginalVectors, defaultOversampling) { Kind = kind; } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchVectorizer.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchVectorizer.Serialization.cs index 2b29b5c1be05e..9a7df0125f35a 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchVectorizer.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchVectorizer.Serialization.cs @@ -17,7 +17,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); + writer.WriteStringValue(VectorizerName); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); writer.WriteEndObject(); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchVectorizer.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchVectorizer.cs index cb62ff9d0943b..6ade9464f87f5 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchVectorizer.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorSearchVectorizer.cs @@ -13,9 +13,9 @@ namespace Azure.Search.Documents.Models internal partial class UnknownVectorSearchVectorizer : VectorSearchVectorizer { /// Initializes a new instance of . - /// The name to associate with this particular vectorization method. + /// The name to associate with this particular vectorization method. /// The name of the kind of vectorization method being configured for use with vector search. - internal UnknownVectorSearchVectorizer(string name, VectorSearchVectorizerKind kind) : base(name, kind) + internal UnknownVectorSearchVectorizer(string vectorizerName, VectorSearchVectorizerKind kind) : base(vectorizerName, kind) { Kind = kind; } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorThreshold.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorThreshold.Serialization.cs deleted file mode 100644 index bb1cdede2881c..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorThreshold.Serialization.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Search.Documents.Models -{ - internal partial class UnknownVectorThreshold : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - writer.WriteEndObject(); - } - - internal static UnknownVectorThreshold DeserializeUnknownVectorThreshold(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - VectorThresholdKind kind = "Unknown"; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("kind"u8)) - { - kind = new VectorThresholdKind(property.Value.GetString()); - continue; - } - } - return new UnknownVectorThreshold(kind); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new UnknownVectorThreshold FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeUnknownVectorThreshold(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorThreshold.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorThreshold.cs deleted file mode 100644 index d67082e14caee..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorThreshold.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Search.Documents.Models -{ - /// Unknown version of VectorThreshold. - internal partial class UnknownVectorThreshold : VectorThreshold - { - /// Initializes a new instance of . - /// The kind of threshold used to filter vector queries. - internal UnknownVectorThreshold(VectorThresholdKind kind) : base(kind) - { - Kind = kind; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQuery.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQuery.Serialization.cs index 2265d14e8c85c..5704b0c652937 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQuery.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQuery.Serialization.cs @@ -42,11 +42,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("weight"u8); writer.WriteNumberValue(Weight.Value); } - if (Optional.IsDefined(Threshold)) - { - writer.WritePropertyName("threshold"u8); - writer.WriteObjectValue(Threshold); - } writer.WriteEndObject(); } @@ -60,8 +55,6 @@ internal static VectorQuery DeserializeVectorQuery(JsonElement element) { switch (discriminator.GetString()) { - case "imageBinary": return VectorizableImageBinaryQuery.DeserializeVectorizableImageBinaryQuery(element); - case "imageUrl": return VectorizableImageUrlQuery.DeserializeVectorizableImageUrlQuery(element); case "text": return VectorizableTextQuery.DeserializeVectorizableTextQuery(element); case "vector": return VectorizedQuery.DeserializeVectorizedQuery(element); } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQuery.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQuery.cs index 01b0892527f50..bff7655efbe5c 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQuery.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQuery.cs @@ -10,7 +10,7 @@ namespace Azure.Search.Documents.Models /// /// The query parameters for vector and hybrid search queries. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . + /// The available derived classes include and . /// public abstract partial class VectorQuery { @@ -26,12 +26,7 @@ protected VectorQuery() /// When true, triggers an exhaustive k-nearest neighbor search across all vectors within the vector index. Useful for scenarios where exact matches are critical, such as determining ground truth values. /// Oversampling factor. Minimum value is 1. It overrides the 'defaultOversampling' parameter configured in the index definition. It can be set only when 'rerankWithOriginalVectors' is true. This parameter is only permitted when a compression method is used on the underlying vector field. /// Relative weight of the vector query when compared to other vector query and/or the text query within the same search request. This value is used when combining the results of multiple ranking lists produced by the different vector queries and/or the results retrieved through the text query. The higher the weight, the higher the documents that matched that query will be in the final ranking. Default is 1.0 and the value needs to be a positive number larger than zero. - /// - /// The threshold used for vector queries. Note this can only be set if all 'fields' use the same similarity metric. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - internal VectorQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, VectorThreshold threshold) + internal VectorQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight) { Kind = kind; KNearestNeighborsCount = kNearestNeighborsCount; @@ -39,7 +34,6 @@ internal VectorQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string f Exhaustive = exhaustive; Oversampling = oversampling; Weight = weight; - Threshold = threshold; } /// The kind of vector query being performed. @@ -52,11 +46,5 @@ internal VectorQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string f public double? Oversampling { get; set; } /// Relative weight of the vector query when compared to other vector query and/or the text query within the same search request. This value is used when combining the results of multiple ranking lists produced by the different vector queries and/or the results retrieved through the text query. The higher the weight, the higher the documents that matched that query will be in the final ranking. Default is 1.0 and the value needs to be a positive number larger than zero. public float? Weight { get; set; } - /// - /// The threshold used for vector queries. Note this can only be set if all 'fields' use the same similarity metric. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - public VectorThreshold Threshold { get; set; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQueryKind.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQueryKind.cs index 7033d26cddae1..8a071216cd4e9 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQueryKind.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQueryKind.cs @@ -24,17 +24,11 @@ public VectorQueryKind(string value) private const string VectorValue = "vector"; private const string TextValue = "text"; - private const string ImageUrlValue = "imageUrl"; - private const string ImageBinaryValue = "imageBinary"; /// Vector query where a raw vector value is provided. public static VectorQueryKind Vector { get; } = new VectorQueryKind(VectorValue); /// Vector query where a text value that needs to be vectorized is provided. public static VectorQueryKind Text { get; } = new VectorQueryKind(TextValue); - /// Vector query where an url that represents an image value that needs to be vectorized is provided. - public static VectorQueryKind ImageUrl { get; } = new VectorQueryKind(ImageUrlValue); - /// Vector query where a base 64 encoded binary of an image that needs to be vectorized is provided. - public static VectorQueryKind ImageBinary { get; } = new VectorQueryKind(ImageBinaryValue); /// Determines if two values are the same. public static bool operator ==(VectorQueryKind left, VectorQueryKind right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearch.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearch.Serialization.cs index 149b155125ced..90d91d0a2e861 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearch.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearch.Serialization.cs @@ -68,7 +68,7 @@ internal static VectorSearch DeserializeVectorSearch(JsonElement element) IList profiles = default; IList algorithms = default; IList vectorizers = default; - IList compressions = default; + IList compressions = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("profiles"u8)) @@ -119,16 +119,16 @@ internal static VectorSearch DeserializeVectorSearch(JsonElement element) { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(VectorSearchCompressionConfiguration.DeserializeVectorSearchCompressionConfiguration(item)); + array.Add(VectorSearchCompression.DeserializeVectorSearchCompression(item)); } compressions = array; continue; } } - return new VectorSearch(profiles ?? new ChangeTrackingList(), algorithms ?? new ChangeTrackingList(), vectorizers ?? new ChangeTrackingList(), compressions ?? new ChangeTrackingList()); + return new VectorSearch(profiles ?? new ChangeTrackingList(), algorithms ?? new ChangeTrackingList(), vectorizers ?? new ChangeTrackingList(), compressions ?? new ChangeTrackingList()); } /// Deserializes the model from a raw response. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearch.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearch.cs index 6cfca8afaf890..d7012eb5bcb12 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearch.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearch.cs @@ -18,7 +18,7 @@ public VectorSearch() Profiles = new ChangeTrackingList(); Algorithms = new ChangeTrackingList(); Vectorizers = new ChangeTrackingList(); - Compressions = new ChangeTrackingList(); + Compressions = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -31,14 +31,14 @@ public VectorSearch() /// /// Contains configuration options on how to vectorize text vector queries. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . + /// The available derived classes include and . /// /// /// Contains configuration options specific to the compression method used during indexing or querying. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . /// - internal VectorSearch(IList profiles, IList algorithms, IList vectorizers, IList compressions) + internal VectorSearch(IList profiles, IList algorithms, IList vectorizers, IList compressions) { Profiles = profiles; Algorithms = algorithms; @@ -57,14 +57,14 @@ internal VectorSearch(IList profiles, IList /// Contains configuration options on how to vectorize text vector queries. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . + /// The available derived classes include and . /// public IList Vectorizers { get; } /// /// Contains configuration options specific to the compression method used during indexing or querying. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . /// - public IList Compressions { get; } + public IList Compressions { get; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompressionConfiguration.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompression.Serialization.cs similarity index 76% rename from sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompressionConfiguration.Serialization.cs rename to sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompression.Serialization.cs index 26cb1600482e7..ef82bd90736bf 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompressionConfiguration.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompression.Serialization.cs @@ -11,13 +11,13 @@ namespace Azure.Search.Documents.Indexes.Models { - public partial class VectorSearchCompressionConfiguration : IUtf8JsonSerializable + public partial class VectorSearchCompression : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); + writer.WriteStringValue(CompressionName); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); if (Optional.IsDefined(RerankWithOriginalVectors)) @@ -40,7 +40,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static VectorSearchCompressionConfiguration DeserializeVectorSearchCompressionConfiguration(JsonElement element) + internal static VectorSearchCompression DeserializeVectorSearchCompression(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -50,18 +50,19 @@ internal static VectorSearchCompressionConfiguration DeserializeVectorSearchComp { switch (discriminator.GetString()) { - case "scalarQuantization": return ScalarQuantizationCompressionConfiguration.DeserializeScalarQuantizationCompressionConfiguration(element); + case "binaryQuantization": return BinaryQuantizationCompression.DeserializeBinaryQuantizationCompression(element); + case "scalarQuantization": return ScalarQuantizationCompression.DeserializeScalarQuantizationCompression(element); } } - return UnknownVectorSearchCompressionConfiguration.DeserializeUnknownVectorSearchCompressionConfiguration(element); + return UnknownVectorSearchCompression.DeserializeUnknownVectorSearchCompression(element); } /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static VectorSearchCompressionConfiguration FromResponse(Response response) + internal static VectorSearchCompression FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeVectorSearchCompressionConfiguration(document.RootElement); + return DeserializeVectorSearchCompression(document.RootElement); } /// Convert into a . diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompressionConfiguration.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompression.cs similarity index 68% rename from sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompressionConfiguration.cs rename to sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompression.cs index 46ceca3206d40..d76881b85ec77 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompressionConfiguration.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompression.cs @@ -11,36 +11,33 @@ namespace Azure.Search.Documents.Indexes.Models { /// /// Contains configuration options specific to the compression method used during indexing or querying. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . /// - public abstract partial class VectorSearchCompressionConfiguration + public abstract partial class VectorSearchCompression { - /// Initializes a new instance of . - /// The name to associate with this particular configuration. - /// is null. - protected VectorSearchCompressionConfiguration(string name) + /// Initializes a new instance of . + /// The name to associate with this particular configuration. + /// is null. + protected VectorSearchCompression(string compressionName) { - Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(compressionName, nameof(compressionName)); - Name = name; + CompressionName = compressionName; } - /// Initializes a new instance of . - /// The name to associate with this particular configuration. + /// Initializes a new instance of . + /// The name to associate with this particular configuration. /// The name of the kind of compression method being configured for use with vector search. /// If set to true, once the ordered set of results calculated using compressed vectors are obtained, they will be reranked again by recalculating the full-precision similarity scores. This will improve recall at the expense of latency. /// Default oversampling factor. Oversampling will internally request more documents (specified by this multiplier) in the initial search. This increases the set of results that will be reranked using recomputed similarity scores from full-precision vectors. Minimum value is 1, meaning no oversampling (1x). This parameter can only be set when rerankWithOriginalVectors is true. Higher values improve recall at the expense of latency. - internal VectorSearchCompressionConfiguration(string name, VectorSearchCompressionKind kind, bool? rerankWithOriginalVectors, double? defaultOversampling) + internal VectorSearchCompression(string compressionName, VectorSearchCompressionKind kind, bool? rerankWithOriginalVectors, double? defaultOversampling) { - Name = name; + CompressionName = compressionName; Kind = kind; RerankWithOriginalVectors = rerankWithOriginalVectors; DefaultOversampling = defaultOversampling; } - - /// The name to associate with this particular configuration. - public string Name { get; set; } /// The name of the kind of compression method being configured for use with vector search. internal VectorSearchCompressionKind Kind { get; set; } /// If set to true, once the ordered set of results calculated using compressed vectors are obtained, they will be reranked again by recalculating the full-precision similarity scores. This will improve recall at the expense of latency. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompressionKind.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompressionKind.cs index bd50e15c46263..efb6bba29a1f2 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompressionKind.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompressionKind.cs @@ -23,9 +23,12 @@ public VectorSearchCompressionKind(string value) } private const string ScalarQuantizationValue = "scalarQuantization"; + private const string BinaryQuantizationValue = "binaryQuantization"; /// Scalar Quantization, a type of compression method. In scalar quantization, the original vectors values are compressed to a narrower type by discretizing and representing each component of a vector using a reduced set of quantized values, thereby reducing the overall data size. public static VectorSearchCompressionKind ScalarQuantization { get; } = new VectorSearchCompressionKind(ScalarQuantizationValue); + /// Binary Quantization, a type of compression method. In binary quantization, the original vectors values are compressed to the narrower binary type by discretizing and representing each component of a vector using binary values, thereby reducing the overall data size. + public static VectorSearchCompressionKind BinaryQuantization { get; } = new VectorSearchCompressionKind(BinaryQuantizationValue); /// Determines if two values are the same. public static bool operator ==(VectorSearchCompressionKind left, VectorSearchCompressionKind right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompressionTargetDataType.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompressionTarget.cs similarity index 63% rename from sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompressionTargetDataType.cs rename to sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompressionTarget.cs index e454ced254051..88b24e9db1232 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompressionTargetDataType.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchCompressionTarget.cs @@ -11,13 +11,13 @@ namespace Azure.Search.Documents.Indexes.Models { /// The quantized data type of compressed vector values. - public readonly partial struct VectorSearchCompressionTargetDataType : IEquatable + public readonly partial struct VectorSearchCompressionTarget : IEquatable { private readonly string _value; - /// Initializes a new instance of . + /// Initializes a new instance of . /// is null. - public VectorSearchCompressionTargetDataType(string value) + public VectorSearchCompressionTarget(string value) { _value = value ?? throw new ArgumentNullException(nameof(value)); } @@ -25,19 +25,19 @@ public VectorSearchCompressionTargetDataType(string value) private const string Int8Value = "int8"; /// int8. - public static VectorSearchCompressionTargetDataType Int8 { get; } = new VectorSearchCompressionTargetDataType(Int8Value); - /// Determines if two values are the same. - public static bool operator ==(VectorSearchCompressionTargetDataType left, VectorSearchCompressionTargetDataType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(VectorSearchCompressionTargetDataType left, VectorSearchCompressionTargetDataType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator VectorSearchCompressionTargetDataType(string value) => new VectorSearchCompressionTargetDataType(value); + public static VectorSearchCompressionTarget Int8 { get; } = new VectorSearchCompressionTarget(Int8Value); + /// Determines if two values are the same. + public static bool operator ==(VectorSearchCompressionTarget left, VectorSearchCompressionTarget right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(VectorSearchCompressionTarget left, VectorSearchCompressionTarget right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator VectorSearchCompressionTarget(string value) => new VectorSearchCompressionTarget(value); /// [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is VectorSearchCompressionTargetDataType other && Equals(other); + public override bool Equals(object obj) => obj is VectorSearchCompressionTarget other && Equals(other); /// - public bool Equals(VectorSearchCompressionTargetDataType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + public bool Equals(VectorSearchCompressionTarget other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); /// [EditorBrowsable(EditorBrowsableState.Never)] diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchProfile.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchProfile.Serialization.cs index 00dd429a8897b..d883e50ce6547 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchProfile.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchProfile.Serialization.cs @@ -19,15 +19,15 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStringValue(Name); writer.WritePropertyName("algorithm"u8); writer.WriteStringValue(AlgorithmConfigurationName); - if (Optional.IsDefined(Vectorizer)) + if (Optional.IsDefined(VectorizerName)) { writer.WritePropertyName("vectorizer"u8); - writer.WriteStringValue(Vectorizer); + writer.WriteStringValue(VectorizerName); } - if (Optional.IsDefined(CompressionConfigurationName)) + if (Optional.IsDefined(CompressionName)) { writer.WritePropertyName("compression"u8); - writer.WriteStringValue(CompressionConfigurationName); + writer.WriteStringValue(CompressionName); } writer.WriteEndObject(); } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchProfile.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchProfile.cs index 53859ee27e2a1..fc545f7077ba1 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchProfile.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchProfile.cs @@ -28,23 +28,23 @@ public VectorSearchProfile(string name, string algorithmConfigurationName) /// Initializes a new instance of . /// The name to associate with this particular vector search profile. /// The name of the vector search algorithm configuration that specifies the algorithm and optional parameters. - /// The name of the kind of vectorization method being configured for use with vector search. - /// The name of the compression method configuration that specifies the compression method and optional parameters. - internal VectorSearchProfile(string name, string algorithmConfigurationName, string vectorizer, string compressionConfigurationName) + /// The name of the vectorization being configured for use with vector search. + /// The name of the compression method configuration that specifies the compression method and optional parameters. + internal VectorSearchProfile(string name, string algorithmConfigurationName, string vectorizerName, string compressionName) { Name = name; AlgorithmConfigurationName = algorithmConfigurationName; - Vectorizer = vectorizer; - CompressionConfigurationName = compressionConfigurationName; + VectorizerName = vectorizerName; + CompressionName = compressionName; } /// The name to associate with this particular vector search profile. public string Name { get; set; } /// The name of the vector search algorithm configuration that specifies the algorithm and optional parameters. public string AlgorithmConfigurationName { get; set; } - /// The name of the kind of vectorization method being configured for use with vector search. - public string Vectorizer { get; set; } + /// The name of the vectorization being configured for use with vector search. + public string VectorizerName { get; set; } /// The name of the compression method configuration that specifies the compression method and optional parameters. - public string CompressionConfigurationName { get; set; } + public string CompressionName { get; set; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchVectorizer.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchVectorizer.Serialization.cs index e384ae6de8ec5..576c0c26b04b3 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchVectorizer.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchVectorizer.Serialization.cs @@ -17,7 +17,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); + writer.WriteStringValue(VectorizerName); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); writer.WriteEndObject(); @@ -33,10 +33,8 @@ internal static VectorSearchVectorizer DeserializeVectorSearchVectorizer(JsonEle { switch (discriminator.GetString()) { - case "aiServicesVision": return AIServicesVisionVectorizer.DeserializeAIServicesVisionVectorizer(element); - case "aml": return AzureMachineLearningVectorizer.DeserializeAzureMachineLearningVectorizer(element); case "azureOpenAI": return AzureOpenAIVectorizer.DeserializeAzureOpenAIVectorizer(element); - case "customWebApi": return CustomVectorizer.DeserializeCustomVectorizer(element); + case "customWebApi": return WebApiVectorizer.DeserializeWebApiVectorizer(element); } } return UnknownVectorSearchVectorizer.DeserializeUnknownVectorSearchVectorizer(element); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchVectorizer.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchVectorizer.cs index 1baabeb601ec4..a5b227d68b2db 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchVectorizer.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchVectorizer.cs @@ -12,31 +12,28 @@ namespace Azure.Search.Documents.Indexes.Models /// /// Specifies the vectorization method to be used during query time. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . + /// The available derived classes include and . /// public abstract partial class VectorSearchVectorizer { /// Initializes a new instance of . - /// The name to associate with this particular vectorization method. - /// is null. - protected VectorSearchVectorizer(string name) + /// The name to associate with this particular vectorization method. + /// is null. + protected VectorSearchVectorizer(string vectorizerName) { - Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(vectorizerName, nameof(vectorizerName)); - Name = name; + VectorizerName = vectorizerName; } /// Initializes a new instance of . - /// The name to associate with this particular vectorization method. + /// The name to associate with this particular vectorization method. /// The name of the kind of vectorization method being configured for use with vector search. - internal VectorSearchVectorizer(string name, VectorSearchVectorizerKind kind) + internal VectorSearchVectorizer(string vectorizerName, VectorSearchVectorizerKind kind) { - Name = name; + VectorizerName = vectorizerName; Kind = kind; } - - /// The name to associate with this particular vectorization method. - public string Name { get; set; } /// The name of the kind of vectorization method being configured for use with vector search. internal VectorSearchVectorizerKind Kind { get; set; } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchVectorizerKind.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchVectorizerKind.cs index a49caa1396a2f..493e5dc0a0b71 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchVectorizerKind.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchVectorizerKind.cs @@ -24,17 +24,11 @@ public VectorSearchVectorizerKind(string value) private const string AzureOpenAIValue = "azureOpenAI"; private const string CustomWebApiValue = "customWebApi"; - private const string AIServicesVisionValue = "aiServicesVision"; - private const string AMLValue = "aml"; /// Generate embeddings using an Azure OpenAI resource at query time. public static VectorSearchVectorizerKind AzureOpenAI { get; } = new VectorSearchVectorizerKind(AzureOpenAIValue); /// Generate embeddings using a custom web endpoint at query time. public static VectorSearchVectorizerKind CustomWebApi { get; } = new VectorSearchVectorizerKind(CustomWebApiValue); - /// Generate embeddings for an image or text input at query time using the Azure AI Services Vision Vectorize API. - public static VectorSearchVectorizerKind AIServicesVision { get; } = new VectorSearchVectorizerKind(AIServicesVisionValue); - /// Generate embeddings using an Azure Machine Learning endpoint deployed via the Azure AI Studio Model Catalog at query time. - public static VectorSearchVectorizerKind AML { get; } = new VectorSearchVectorizerKind(AMLValue); /// Determines if two values are the same. public static bool operator ==(VectorSearchVectorizerKind left, VectorSearchVectorizerKind right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSimilarityThreshold.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSimilarityThreshold.Serialization.cs deleted file mode 100644 index 7fbc15968ada8..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSimilarityThreshold.Serialization.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Search.Documents.Models -{ - public partial class VectorSimilarityThreshold : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("value"u8); - writer.WriteNumberValue(Value); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - writer.WriteEndObject(); - } - - internal static VectorSimilarityThreshold DeserializeVectorSimilarityThreshold(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - double value = default; - VectorThresholdKind kind = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - value = property.Value.GetDouble(); - continue; - } - if (property.NameEquals("kind"u8)) - { - kind = new VectorThresholdKind(property.Value.GetString()); - continue; - } - } - return new VectorSimilarityThreshold(kind, value); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new VectorSimilarityThreshold FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeVectorSimilarityThreshold(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSimilarityThreshold.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSimilarityThreshold.cs deleted file mode 100644 index 404a47badb0ad..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSimilarityThreshold.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Search.Documents.Models -{ - /// The results of the vector query will be filtered based on the vector similarity metric. Note this is the canonical definition of similarity metric, not the 'distance' version. The threshold direction (larger or smaller) will be chosen automatically according to the metric used by the field. - public partial class VectorSimilarityThreshold : VectorThreshold - { - /// Initializes a new instance of . - /// The threshold will filter based on the similarity metric value. Note this is the canonical definition of similarity metric, not the 'distance' version. The threshold direction (larger or smaller) will be chosen automatically according to the metric used by the field. - public VectorSimilarityThreshold(double value) - { - Value = value; - Kind = VectorThresholdKind.VectorSimilarity; - } - - /// Initializes a new instance of . - /// The kind of threshold used to filter vector queries. - /// The threshold will filter based on the similarity metric value. Note this is the canonical definition of similarity metric, not the 'distance' version. The threshold direction (larger or smaller) will be chosen automatically according to the metric used by the field. - internal VectorSimilarityThreshold(VectorThresholdKind kind, double value) : base(kind) - { - Value = value; - Kind = kind; - } - - /// The threshold will filter based on the similarity metric value. Note this is the canonical definition of similarity metric, not the 'distance' version. The threshold direction (larger or smaller) will be chosen automatically according to the metric used by the field. - public double Value { get; set; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorThreshold.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorThreshold.Serialization.cs deleted file mode 100644 index 887e095c02b5d..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorThreshold.Serialization.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Search.Documents.Models -{ - public partial class VectorThreshold : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - writer.WriteEndObject(); - } - - internal static VectorThreshold DeserializeVectorThreshold(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("kind", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "searchScore": return SearchScoreThreshold.DeserializeSearchScoreThreshold(element); - case "vectorSimilarity": return VectorSimilarityThreshold.DeserializeVectorSimilarityThreshold(element); - } - } - return UnknownVectorThreshold.DeserializeUnknownVectorThreshold(element); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static VectorThreshold FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeVectorThreshold(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorThreshold.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorThreshold.cs deleted file mode 100644 index d02a782f340ca..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorThreshold.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Search.Documents.Models -{ - /// - /// The threshold used for vector queries. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - public abstract partial class VectorThreshold - { - /// Initializes a new instance of . - protected VectorThreshold() - { - } - - /// Initializes a new instance of . - /// The kind of threshold used to filter vector queries. - internal VectorThreshold(VectorThresholdKind kind) - { - Kind = kind; - } - - /// The kind of threshold used to filter vector queries. - internal VectorThresholdKind Kind { get; set; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorThresholdKind.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorThresholdKind.cs deleted file mode 100644 index 1992982d3e175..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorThresholdKind.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.Search.Documents.Models -{ - /// The kind of vector query being performed. - internal readonly partial struct VectorThresholdKind : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public VectorThresholdKind(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string VectorSimilarityValue = "vectorSimilarity"; - private const string SearchScoreValue = "searchScore"; - - /// The results of the vector query will be filtered based on the vector similarity metric. Note this is the canonical definition of similarity metric, not the 'distance' version. The threshold direction (larger or smaller) will be chosen automatically according to the metric used by the field. - public static VectorThresholdKind VectorSimilarity { get; } = new VectorThresholdKind(VectorSimilarityValue); - /// The results of the vector query will filter based on the '@search.score' value. Note this is the @search.score returned as part of the search response. The threshold direction will be chosen for higher @search.score. - public static VectorThresholdKind SearchScore { get; } = new VectorThresholdKind(SearchScoreValue); - /// Determines if two values are the same. - public static bool operator ==(VectorThresholdKind left, VectorThresholdKind right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(VectorThresholdKind left, VectorThresholdKind right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator VectorThresholdKind(string value) => new VectorThresholdKind(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is VectorThresholdKind other && Equals(other); - /// - public bool Equals(VectorThresholdKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageBinaryQuery.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageBinaryQuery.Serialization.cs deleted file mode 100644 index 403e02db994b0..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageBinaryQuery.Serialization.cs +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.Search.Documents.Models -{ - public partial class VectorizableImageBinaryQuery : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Base64Image)) - { - writer.WritePropertyName("base64Image"u8); - writer.WriteStringValue(Base64Image); - } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(KNearestNeighborsCount)) - { - writer.WritePropertyName("k"u8); - writer.WriteNumberValue(KNearestNeighborsCount.Value); - } - if (Optional.IsDefined(FieldsRaw)) - { - writer.WritePropertyName("fields"u8); - writer.WriteStringValue(FieldsRaw); - } - if (Optional.IsDefined(Exhaustive)) - { - writer.WritePropertyName("exhaustive"u8); - writer.WriteBooleanValue(Exhaustive.Value); - } - if (Optional.IsDefined(Oversampling)) - { - writer.WritePropertyName("oversampling"u8); - writer.WriteNumberValue(Oversampling.Value); - } - if (Optional.IsDefined(Weight)) - { - writer.WritePropertyName("weight"u8); - writer.WriteNumberValue(Weight.Value); - } - if (Optional.IsDefined(Threshold)) - { - writer.WritePropertyName("threshold"u8); - writer.WriteObjectValue(Threshold); - } - writer.WriteEndObject(); - } - - internal static VectorizableImageBinaryQuery DeserializeVectorizableImageBinaryQuery(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string base64Image = default; - VectorQueryKind kind = default; - int? k = default; - string fields = default; - bool? exhaustive = default; - double? oversampling = default; - float? weight = default; - VectorThreshold threshold = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("base64Image"u8)) - { - base64Image = property.Value.GetString(); - continue; - } - if (property.NameEquals("kind"u8)) - { - kind = new VectorQueryKind(property.Value.GetString()); - continue; - } - if (property.NameEquals("k"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - k = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("fields"u8)) - { - fields = property.Value.GetString(); - continue; - } - if (property.NameEquals("exhaustive"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - exhaustive = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("oversampling"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - oversampling = property.Value.GetDouble(); - continue; - } - if (property.NameEquals("weight"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - weight = property.Value.GetSingle(); - continue; - } - if (property.NameEquals("threshold"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - threshold = VectorThreshold.DeserializeVectorThreshold(property.Value); - continue; - } - } - return new VectorizableImageBinaryQuery( - kind, - k, - fields, - exhaustive, - oversampling, - weight, - threshold, - base64Image); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new VectorizableImageBinaryQuery FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeVectorizableImageBinaryQuery(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageBinaryQuery.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageBinaryQuery.cs deleted file mode 100644 index 3e5721dcbe581..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageBinaryQuery.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.Search.Documents.Models -{ - /// The query parameters to use for vector search when a base 64 encoded binary of an image that needs to be vectorized is provided. - public partial class VectorizableImageBinaryQuery : VectorQuery - { - /// Initializes a new instance of . - public VectorizableImageBinaryQuery() - { - Kind = VectorQueryKind.ImageBinary; - } - - /// Initializes a new instance of . - /// The kind of vector query being performed. - /// Number of nearest neighbors to return as top hits. - /// Vector Fields of type Collection(Edm.Single) to be included in the vector searched. - /// When true, triggers an exhaustive k-nearest neighbor search across all vectors within the vector index. Useful for scenarios where exact matches are critical, such as determining ground truth values. - /// Oversampling factor. Minimum value is 1. It overrides the 'defaultOversampling' parameter configured in the index definition. It can be set only when 'rerankWithOriginalVectors' is true. This parameter is only permitted when a compression method is used on the underlying vector field. - /// Relative weight of the vector query when compared to other vector query and/or the text query within the same search request. This value is used when combining the results of multiple ranking lists produced by the different vector queries and/or the results retrieved through the text query. The higher the weight, the higher the documents that matched that query will be in the final ranking. Default is 1.0 and the value needs to be a positive number larger than zero. - /// - /// The threshold used for vector queries. Note this can only be set if all 'fields' use the same similarity metric. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - /// The base 64 encoded binary of an image to be vectorized to perform a vector search query. - internal VectorizableImageBinaryQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, VectorThreshold threshold, string base64Image) : base(kind, kNearestNeighborsCount, fieldsRaw, exhaustive, oversampling, weight, threshold) - { - Base64Image = base64Image; - Kind = kind; - } - - /// The base 64 encoded binary of an image to be vectorized to perform a vector search query. - public string Base64Image { get; set; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageUrlQuery.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageUrlQuery.Serialization.cs deleted file mode 100644 index c662215000b19..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageUrlQuery.Serialization.cs +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.Search.Documents.Models -{ - public partial class VectorizableImageUrlQuery : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Url)) - { - writer.WritePropertyName("url"u8); - writer.WriteStringValue(Url.AbsoluteUri); - } - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(KNearestNeighborsCount)) - { - writer.WritePropertyName("k"u8); - writer.WriteNumberValue(KNearestNeighborsCount.Value); - } - if (Optional.IsDefined(FieldsRaw)) - { - writer.WritePropertyName("fields"u8); - writer.WriteStringValue(FieldsRaw); - } - if (Optional.IsDefined(Exhaustive)) - { - writer.WritePropertyName("exhaustive"u8); - writer.WriteBooleanValue(Exhaustive.Value); - } - if (Optional.IsDefined(Oversampling)) - { - writer.WritePropertyName("oversampling"u8); - writer.WriteNumberValue(Oversampling.Value); - } - if (Optional.IsDefined(Weight)) - { - writer.WritePropertyName("weight"u8); - writer.WriteNumberValue(Weight.Value); - } - if (Optional.IsDefined(Threshold)) - { - writer.WritePropertyName("threshold"u8); - writer.WriteObjectValue(Threshold); - } - writer.WriteEndObject(); - } - - internal static VectorizableImageUrlQuery DeserializeVectorizableImageUrlQuery(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Uri url = default; - VectorQueryKind kind = default; - int? k = default; - string fields = default; - bool? exhaustive = default; - double? oversampling = default; - float? weight = default; - VectorThreshold threshold = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("url"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - url = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("kind"u8)) - { - kind = new VectorQueryKind(property.Value.GetString()); - continue; - } - if (property.NameEquals("k"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - k = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("fields"u8)) - { - fields = property.Value.GetString(); - continue; - } - if (property.NameEquals("exhaustive"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - exhaustive = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("oversampling"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - oversampling = property.Value.GetDouble(); - continue; - } - if (property.NameEquals("weight"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - weight = property.Value.GetSingle(); - continue; - } - if (property.NameEquals("threshold"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - threshold = VectorThreshold.DeserializeVectorThreshold(property.Value); - continue; - } - } - return new VectorizableImageUrlQuery( - kind, - k, - fields, - exhaustive, - oversampling, - weight, - threshold, - url); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new VectorizableImageUrlQuery FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeVectorizableImageUrlQuery(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageUrlQuery.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageUrlQuery.cs deleted file mode 100644 index 25292f74bdb33..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageUrlQuery.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.Search.Documents.Models -{ - /// The query parameters to use for vector search when an url that represents an image value that needs to be vectorized is provided. - public partial class VectorizableImageUrlQuery : VectorQuery - { - /// Initializes a new instance of . - public VectorizableImageUrlQuery() - { - Kind = VectorQueryKind.ImageUrl; - } - - /// Initializes a new instance of . - /// The kind of vector query being performed. - /// Number of nearest neighbors to return as top hits. - /// Vector Fields of type Collection(Edm.Single) to be included in the vector searched. - /// When true, triggers an exhaustive k-nearest neighbor search across all vectors within the vector index. Useful for scenarios where exact matches are critical, such as determining ground truth values. - /// Oversampling factor. Minimum value is 1. It overrides the 'defaultOversampling' parameter configured in the index definition. It can be set only when 'rerankWithOriginalVectors' is true. This parameter is only permitted when a compression method is used on the underlying vector field. - /// Relative weight of the vector query when compared to other vector query and/or the text query within the same search request. This value is used when combining the results of multiple ranking lists produced by the different vector queries and/or the results retrieved through the text query. The higher the weight, the higher the documents that matched that query will be in the final ranking. Default is 1.0 and the value needs to be a positive number larger than zero. - /// - /// The threshold used for vector queries. Note this can only be set if all 'fields' use the same similarity metric. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - /// The URL of an image to be vectorized to perform a vector search query. - internal VectorizableImageUrlQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, VectorThreshold threshold, Uri url) : base(kind, kNearestNeighborsCount, fieldsRaw, exhaustive, oversampling, weight, threshold) - { - Url = url; - Kind = kind; - } - - /// The URL of an image to be vectorized to perform a vector search query. - public Uri Url { get; set; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableTextQuery.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableTextQuery.Serialization.cs index 7401b079d9bb6..ce5672d165c05 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableTextQuery.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableTextQuery.Serialization.cs @@ -44,11 +44,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("weight"u8); writer.WriteNumberValue(Weight.Value); } - if (Optional.IsDefined(Threshold)) - { - writer.WritePropertyName("threshold"u8); - writer.WriteObjectValue(Threshold); - } writer.WriteEndObject(); } @@ -65,7 +60,6 @@ internal static VectorizableTextQuery DeserializeVectorizableTextQuery(JsonEleme bool? exhaustive = default; double? oversampling = default; float? weight = default; - VectorThreshold threshold = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("text"u8)) @@ -119,15 +113,6 @@ internal static VectorizableTextQuery DeserializeVectorizableTextQuery(JsonEleme weight = property.Value.GetSingle(); continue; } - if (property.NameEquals("threshold"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - threshold = VectorThreshold.DeserializeVectorThreshold(property.Value); - continue; - } } return new VectorizableTextQuery( kind, @@ -136,7 +121,6 @@ internal static VectorizableTextQuery DeserializeVectorizableTextQuery(JsonEleme exhaustive, oversampling, weight, - threshold, text); } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableTextQuery.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableTextQuery.cs index d7e68f00f1a50..98f5d63a1dab5 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableTextQuery.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableTextQuery.cs @@ -30,13 +30,8 @@ public VectorizableTextQuery(string text) /// When true, triggers an exhaustive k-nearest neighbor search across all vectors within the vector index. Useful for scenarios where exact matches are critical, such as determining ground truth values. /// Oversampling factor. Minimum value is 1. It overrides the 'defaultOversampling' parameter configured in the index definition. It can be set only when 'rerankWithOriginalVectors' is true. This parameter is only permitted when a compression method is used on the underlying vector field. /// Relative weight of the vector query when compared to other vector query and/or the text query within the same search request. This value is used when combining the results of multiple ranking lists produced by the different vector queries and/or the results retrieved through the text query. The higher the weight, the higher the documents that matched that query will be in the final ranking. Default is 1.0 and the value needs to be a positive number larger than zero. - /// - /// The threshold used for vector queries. Note this can only be set if all 'fields' use the same similarity metric. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// /// The text to be vectorized to perform a vector search query. - internal VectorizableTextQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, VectorThreshold threshold, string text) : base(kind, kNearestNeighborsCount, fieldsRaw, exhaustive, oversampling, weight, threshold) + internal VectorizableTextQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, string text) : base(kind, kNearestNeighborsCount, fieldsRaw, exhaustive, oversampling, weight) { Text = text; Kind = kind; diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizedQuery.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizedQuery.Serialization.cs index 04114875e98d8..305a3b8749cd1 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizedQuery.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizedQuery.Serialization.cs @@ -50,11 +50,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("weight"u8); writer.WriteNumberValue(Weight.Value); } - if (Optional.IsDefined(Threshold)) - { - writer.WritePropertyName("threshold"u8); - writer.WriteObjectValue(Threshold); - } writer.WriteEndObject(); } @@ -71,7 +66,6 @@ internal static VectorizedQuery DeserializeVectorizedQuery(JsonElement element) bool? exhaustive = default; double? oversampling = default; float? weight = default; - VectorThreshold threshold = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("vector"u8)) @@ -136,15 +130,6 @@ internal static VectorizedQuery DeserializeVectorizedQuery(JsonElement element) weight = property.Value.GetSingle(); continue; } - if (property.NameEquals("threshold"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - threshold = VectorThreshold.DeserializeVectorThreshold(property.Value); - continue; - } } return new VectorizedQuery( kind, @@ -153,7 +138,6 @@ internal static VectorizedQuery DeserializeVectorizedQuery(JsonElement element) exhaustive, oversampling, weight, - threshold, vector); } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizedQuery.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizedQuery.cs index 8ff651c36b4ba..144935b8c0111 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizedQuery.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizedQuery.cs @@ -27,13 +27,8 @@ public VectorizedQuery(ReadOnlyMemory vector) /// When true, triggers an exhaustive k-nearest neighbor search across all vectors within the vector index. Useful for scenarios where exact matches are critical, such as determining ground truth values. /// Oversampling factor. Minimum value is 1. It overrides the 'defaultOversampling' parameter configured in the index definition. It can be set only when 'rerankWithOriginalVectors' is true. This parameter is only permitted when a compression method is used on the underlying vector field. /// Relative weight of the vector query when compared to other vector query and/or the text query within the same search request. This value is used when combining the results of multiple ranking lists produced by the different vector queries and/or the results retrieved through the text query. The higher the weight, the higher the documents that matched that query will be in the final ranking. Default is 1.0 and the value needs to be a positive number larger than zero. - /// - /// The threshold used for vector queries. Note this can only be set if all 'fields' use the same similarity metric. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// /// The vector representation of a search query. - internal VectorizedQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, VectorThreshold threshold, ReadOnlyMemory vector) : base(kind, kNearestNeighborsCount, fieldsRaw, exhaustive, oversampling, weight, threshold) + internal VectorizedQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, ReadOnlyMemory vector) : base(kind, kNearestNeighborsCount, fieldsRaw, exhaustive, oversampling, weight) { Vector = vector; Kind = kind; diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VisionVectorizeSkill.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VisionVectorizeSkill.Serialization.cs deleted file mode 100644 index 92b359ec244f1..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VisionVectorizeSkill.Serialization.cs +++ /dev/null @@ -1,154 +0,0 @@ -// 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.Search.Documents.Indexes.Models -{ - public partial class VisionVectorizeSkill : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (ModelVersion != null) - { - writer.WritePropertyName("modelVersion"u8); - writer.WriteStringValue(ModelVersion); - } - else - { - writer.WriteNull("modelVersion"); - } - writer.WritePropertyName("@odata.type"u8); - writer.WriteStringValue(ODataType); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsDefined(Context)) - { - writer.WritePropertyName("context"u8); - writer.WriteStringValue(Context); - } - writer.WritePropertyName("inputs"u8); - writer.WriteStartArray(); - foreach (var item in Inputs) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("outputs"u8); - writer.WriteStartArray(); - foreach (var item in Outputs) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - writer.WriteEndObject(); - } - - internal static VisionVectorizeSkill DeserializeVisionVectorizeSkill(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string modelVersion = default; - string odataType = default; - string name = default; - string description = default; - string context = default; - IList inputs = default; - IList outputs = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("modelVersion"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - modelVersion = null; - continue; - } - modelVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("@odata.type"u8)) - { - odataType = property.Value.GetString(); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("context"u8)) - { - context = property.Value.GetString(); - continue; - } - if (property.NameEquals("inputs"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(InputFieldMappingEntry.DeserializeInputFieldMappingEntry(item)); - } - inputs = array; - continue; - } - if (property.NameEquals("outputs"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(OutputFieldMappingEntry.DeserializeOutputFieldMappingEntry(item)); - } - outputs = array; - continue; - } - } - return new VisionVectorizeSkill( - odataType, - name, - description, - context, - inputs, - outputs, - modelVersion); - } - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new VisionVectorizeSkill FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeVisionVectorizeSkill(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this); - return content; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VisionVectorizeSkill.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VisionVectorizeSkill.cs deleted file mode 100644 index 18d17e3a7e810..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VisionVectorizeSkill.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.Search.Documents.Indexes.Models -{ - /// Allows you to generate a vector embedding for a given image or text input using the Azure AI Services Vision Vectorize API. - public partial class VisionVectorizeSkill : SearchIndexerSkill - { - /// Initializes a new instance of . - /// Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - /// The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - /// The version of the model to use when calling the AI Services Vision service. It will default to the latest available when not specified. - /// or is null. - public VisionVectorizeSkill(IEnumerable inputs, IEnumerable outputs, string modelVersion) : base(inputs, outputs) - { - Argument.AssertNotNull(inputs, nameof(inputs)); - Argument.AssertNotNull(outputs, nameof(outputs)); - - ModelVersion = modelVersion; - ODataType = "#Microsoft.Skills.Vision.VectorizeSkill"; - } - - /// Initializes a new instance of . - /// A URI fragment specifying the type of skill. - /// The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. - /// The description of the skill which describes the inputs, outputs, and usage of the skill. - /// Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. - /// Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - /// The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - /// The version of the model to use when calling the AI Services Vision service. It will default to the latest available when not specified. - internal VisionVectorizeSkill(string oDataType, string name, string description, string context, IList inputs, IList outputs, string modelVersion) : base(oDataType, name, description, context, inputs, outputs) - { - ModelVersion = modelVersion; - ODataType = oDataType ?? "#Microsoft.Skills.Vision.VectorizeSkill"; - } - - /// The version of the model to use when calling the AI Services Vision service. It will default to the latest available when not specified. - public string ModelVersion { get; set; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiSkill.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiSkill.Serialization.cs index 4da54c3053bc9..9ef70f34f5db2 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiSkill.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiSkill.Serialization.cs @@ -17,43 +17,6 @@ public partial class WebApiSkill : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - writer.WritePropertyName("uri"u8); - writer.WriteStringValue(Uri); - if (Optional.IsCollectionDefined(HttpHeaders)) - { - if (HttpHeaders != null) - { - writer.WritePropertyName("httpHeaders"u8); - writer.WriteStartObject(); - foreach (var item in HttpHeaders) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("httpHeaders"); - } - } - if (Optional.IsDefined(HttpMethod)) - { - writer.WritePropertyName("httpMethod"u8); - writer.WriteStringValue(HttpMethod); - } - if (Optional.IsDefined(Timeout)) - { - if (Timeout != null) - { - writer.WritePropertyName("timeout"u8); - writer.WriteStringValue(Timeout.Value, "P"); - } - else - { - writer.WriteNull("timeout"); - } - } if (Optional.IsDefined(BatchSize)) { if (BatchSize != null) @@ -78,6 +41,32 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("degreeOfParallelism"); } } + if (Optional.IsDefined(Uri)) + { + writer.WritePropertyName("uri"u8); + writer.WriteStringValue(Uri); + } + if (Optional.IsCollectionDefined(HttpHeaders)) + { + writer.WritePropertyName("httpHeaders"u8); + writer.WriteStartObject(); + foreach (var item in HttpHeaders) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(HttpMethod)) + { + writer.WritePropertyName("httpMethod"u8); + writer.WriteStringValue(HttpMethod); + } + if (Optional.IsDefined(Timeout)) + { + writer.WritePropertyName("timeout"u8); + writer.WriteStringValue(Timeout.Value, "P"); + } if (Optional.IsDefined(AuthResourceId)) { if (AuthResourceId != null) @@ -142,12 +131,12 @@ internal static WebApiSkill DeserializeWebApiSkill(JsonElement element) { return null; } + int? batchSize = default; + int? degreeOfParallelism = default; string uri = default; IDictionary httpHeaders = default; string httpMethod = default; TimeSpan? timeout = default; - int? batchSize = default; - int? degreeOfParallelism = default; ResourceIdentifier authResourceId = default; SearchIndexerDataIdentity authIdentity = default; string odataType = default; @@ -158,6 +147,26 @@ internal static WebApiSkill DeserializeWebApiSkill(JsonElement element) IList outputs = default; foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("batchSize"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + batchSize = null; + continue; + } + batchSize = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("degreeOfParallelism"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + degreeOfParallelism = null; + continue; + } + degreeOfParallelism = property.Value.GetInt32(); + continue; + } if (property.NameEquals("uri"u8)) { uri = property.Value.GetString(); @@ -167,7 +176,6 @@ internal static WebApiSkill DeserializeWebApiSkill(JsonElement element) { if (property.Value.ValueKind == JsonValueKind.Null) { - httpHeaders = null; continue; } Dictionary dictionary = new Dictionary(); @@ -187,32 +195,11 @@ internal static WebApiSkill DeserializeWebApiSkill(JsonElement element) { if (property.Value.ValueKind == JsonValueKind.Null) { - timeout = null; continue; } timeout = property.Value.GetTimeSpan("P"); continue; } - if (property.NameEquals("batchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - batchSize = null; - continue; - } - batchSize = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("degreeOfParallelism"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - degreeOfParallelism = null; - continue; - } - degreeOfParallelism = property.Value.GetInt32(); - continue; - } if (property.NameEquals("authResourceId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -281,12 +268,12 @@ internal static WebApiSkill DeserializeWebApiSkill(JsonElement element) context, inputs, outputs, + batchSize, + degreeOfParallelism, uri, httpHeaders ?? new ChangeTrackingDictionary(), httpMethod, timeout, - batchSize, - degreeOfParallelism, authResourceId, authIdentity); } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiSkill.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiSkill.cs index 19550ceaac938..894a0823224ee 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiSkill.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiSkill.cs @@ -14,22 +14,6 @@ namespace Azure.Search.Documents.Indexes.Models /// A skill that can call a Web API endpoint, allowing you to extend a skillset by having it call your custom code. public partial class WebApiSkill : SearchIndexerSkill { - /// Initializes a new instance of . - /// Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - /// The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - /// The url for the Web API. - /// , or is null. - public WebApiSkill(IEnumerable inputs, IEnumerable outputs, string uri) : base(inputs, outputs) - { - Argument.AssertNotNull(inputs, nameof(inputs)); - Argument.AssertNotNull(outputs, nameof(outputs)); - Argument.AssertNotNull(uri, nameof(uri)); - - Uri = uri; - HttpHeaders = new ChangeTrackingDictionary(); - ODataType = "#Microsoft.Skills.Custom.WebApiSkill"; - } - /// Initializes a new instance of . /// A URI fragment specifying the type of skill. /// The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. @@ -37,42 +21,40 @@ public WebApiSkill(IEnumerable inputs, IEnumerable Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. /// Inputs of the skills could be a column in the source data set, or the output of an upstream skill. /// The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - /// The url for the Web API. - /// The headers required to make the http request. - /// The method for the http request. - /// The desired timeout for the request. Default is 30 seconds. /// The desired batch size which indicates number of documents. /// If set, the number of parallel calls that can be made to the Web API. - /// Applies to custom skills that connect to external code in an Azure function or some other application that provides the transformations. This value should be the application ID created for the function or app when it was registered with Azure Active Directory. When specified, the custom skill connects to the function or app using a managed ID (either system or user-assigned) of the search service and the access token of the function or app, using this value as the resource id for creating the scope of the access token. + /// The URI of the Web API providing the vectorizer. + /// The headers required to make the HTTP request. + /// The method for the HTTP request. + /// The desired timeout for the request. Default is 30 seconds. + /// Applies to custom endpoints that connect to external code in an Azure function or some other application that provides the transformations. This value should be the application ID created for the function or app when it was registered with Azure Active Directory. When specified, the vectorization connects to the function or app using a managed ID (either system or user-assigned) of the search service and the access token of the function or app, using this value as the resource id for creating the scope of the access token. /// /// The user-assigned managed identity used for outbound connections. If an authResourceId is provided and it's not specified, the system-assigned managed identity is used. On updates to the indexer, if the identity is unspecified, the value remains unchanged. If set to "none", the value of this property is cleared. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// - internal WebApiSkill(string oDataType, string name, string description, string context, IList inputs, IList outputs, string uri, IDictionary httpHeaders, string httpMethod, TimeSpan? timeout, int? batchSize, int? degreeOfParallelism, ResourceIdentifier authResourceId, SearchIndexerDataIdentity authIdentity) : base(oDataType, name, description, context, inputs, outputs) + internal WebApiSkill(string oDataType, string name, string description, string context, IList inputs, IList outputs, int? batchSize, int? degreeOfParallelism, string uri, IDictionary httpHeaders, string httpMethod, TimeSpan? timeout, ResourceIdentifier authResourceId, SearchIndexerDataIdentity authIdentity) : base(oDataType, name, description, context, inputs, outputs) { + BatchSize = batchSize; + DegreeOfParallelism = degreeOfParallelism; Uri = uri; HttpHeaders = httpHeaders; HttpMethod = httpMethod; Timeout = timeout; - BatchSize = batchSize; - DegreeOfParallelism = degreeOfParallelism; AuthResourceId = authResourceId; AuthIdentity = authIdentity; ODataType = oDataType ?? "#Microsoft.Skills.Custom.WebApiSkill"; } - /// The url for the Web API. - public string Uri { get; set; } - /// The method for the http request. - public string HttpMethod { get; set; } - /// The desired timeout for the request. Default is 30 seconds. - public TimeSpan? Timeout { get; set; } /// The desired batch size which indicates number of documents. public int? BatchSize { get; set; } /// If set, the number of parallel calls that can be made to the Web API. public int? DegreeOfParallelism { get; set; } - /// Applies to custom skills that connect to external code in an Azure function or some other application that provides the transformations. This value should be the application ID created for the function or app when it was registered with Azure Active Directory. When specified, the custom skill connects to the function or app using a managed ID (either system or user-assigned) of the search service and the access token of the function or app, using this value as the resource id for creating the scope of the access token. + /// The method for the HTTP request. + public string HttpMethod { get; set; } + /// The desired timeout for the request. Default is 30 seconds. + public TimeSpan? Timeout { get; set; } + /// Applies to custom endpoints that connect to external code in an Azure function or some other application that provides the transformations. This value should be the application ID created for the function or app when it was registered with Azure Active Directory. When specified, the vectorization connects to the function or app using a managed ID (either system or user-assigned) of the search service and the access token of the function or app, using this value as the resource id for creating the scope of the access token. public ResourceIdentifier AuthResourceId { get; set; } /// /// The user-assigned managed identity used for outbound connections. If an authResourceId is provided and it's not specified, the system-assigned managed identity is used. On updates to the indexer, if the identity is unspecified, the value remains unchanged. If set to "none", the value of this property is cleared. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomVectorizer.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiVectorizer.Serialization.cs similarity index 76% rename from sdk/search/Azure.Search.Documents/src/Generated/Models/CustomVectorizer.Serialization.cs rename to sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiVectorizer.Serialization.cs index 138283607f04f..4cb76a9c9cc08 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomVectorizer.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiVectorizer.Serialization.cs @@ -10,30 +10,30 @@ namespace Azure.Search.Documents.Indexes.Models { - public partial class CustomVectorizer : IUtf8JsonSerializable + public partial class WebApiVectorizer : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(CustomWebApiParameters)) + if (Optional.IsDefined(Parameters)) { writer.WritePropertyName("customWebApiParameters"u8); - writer.WriteObjectValue(CustomWebApiParameters); + writer.WriteObjectValue(Parameters); } writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); + writer.WriteStringValue(VectorizerName); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); writer.WriteEndObject(); } - internal static CustomVectorizer DeserializeCustomVectorizer(JsonElement element) + internal static WebApiVectorizer DeserializeWebApiVectorizer(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { return null; } - CustomWebApiParameters customWebApiParameters = default; + WebApiVectorizerParameters customWebApiParameters = default; string name = default; VectorSearchVectorizerKind kind = default; foreach (var property in element.EnumerateObject()) @@ -44,7 +44,7 @@ internal static CustomVectorizer DeserializeCustomVectorizer(JsonElement element { continue; } - customWebApiParameters = CustomWebApiParameters.DeserializeCustomWebApiParameters(property.Value); + customWebApiParameters = WebApiVectorizerParameters.DeserializeWebApiVectorizerParameters(property.Value); continue; } if (property.NameEquals("name"u8)) @@ -58,15 +58,15 @@ internal static CustomVectorizer DeserializeCustomVectorizer(JsonElement element continue; } } - return new CustomVectorizer(name, kind, customWebApiParameters); + return new WebApiVectorizer(name, kind, customWebApiParameters); } /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new CustomVectorizer FromResponse(Response response) + internal static new WebApiVectorizer FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomVectorizer(document.RootElement); + return DeserializeWebApiVectorizer(document.RootElement); } /// Convert into a . diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiVectorizer.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiVectorizer.cs new file mode 100644 index 0000000000000..e605e98da9a73 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiVectorizer.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Search.Documents.Indexes.Models +{ + /// Specifies a user-defined vectorizer for generating the vector embedding of a query string. Integration of an external vectorizer is achieved using the custom Web API interface of a skillset. + public partial class WebApiVectorizer : VectorSearchVectorizer + { + /// Initializes a new instance of . + /// The name to associate with this particular vectorization method. + /// is null. + public WebApiVectorizer(string vectorizerName) : base(vectorizerName) + { + Argument.AssertNotNull(vectorizerName, nameof(vectorizerName)); + + Kind = VectorSearchVectorizerKind.CustomWebApi; + } + + /// Initializes a new instance of . + /// The name to associate with this particular vectorization method. + /// The name of the kind of vectorization method being configured for use with vector search. + /// Specifies the properties of the user-defined vectorizer. + internal WebApiVectorizer(string vectorizerName, VectorSearchVectorizerKind kind, WebApiVectorizerParameters parameters) : base(vectorizerName, kind) + { + Parameters = parameters; + Kind = kind; + } + + /// Specifies the properties of the user-defined vectorizer. + public WebApiVectorizerParameters Parameters { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomWebApiParameters.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiVectorizerParameters.Serialization.cs similarity index 91% rename from sdk/search/Azure.Search.Documents/src/Generated/Models/CustomWebApiParameters.Serialization.cs rename to sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiVectorizerParameters.Serialization.cs index 784a2059b4f49..f2902ca14629d 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomWebApiParameters.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiVectorizerParameters.Serialization.cs @@ -12,7 +12,7 @@ namespace Azure.Search.Documents.Indexes.Models { - public partial class CustomWebApiParameters : IUtf8JsonSerializable + public partial class WebApiVectorizerParameters : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -70,7 +70,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static CustomWebApiParameters DeserializeCustomWebApiParameters(JsonElement element) + internal static WebApiVectorizerParameters DeserializeWebApiVectorizerParameters(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -80,7 +80,7 @@ internal static CustomWebApiParameters DeserializeCustomWebApiParameters(JsonEle IDictionary httpHeaders = default; string httpMethod = default; TimeSpan? timeout = default; - string authResourceId = default; + ResourceIdentifier authResourceId = default; SearchIndexerDataIdentity authIdentity = default; foreach (var property in element.EnumerateObject()) { @@ -128,7 +128,7 @@ internal static CustomWebApiParameters DeserializeCustomWebApiParameters(JsonEle authResourceId = null; continue; } - authResourceId = property.Value.GetString(); + authResourceId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("authIdentity"u8)) @@ -142,7 +142,7 @@ internal static CustomWebApiParameters DeserializeCustomWebApiParameters(JsonEle continue; } } - return new CustomWebApiParameters( + return new WebApiVectorizerParameters( uri, httpHeaders ?? new ChangeTrackingDictionary(), httpMethod, @@ -153,10 +153,10 @@ internal static CustomWebApiParameters DeserializeCustomWebApiParameters(JsonEle /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static CustomWebApiParameters FromResponse(Response response) + internal static WebApiVectorizerParameters FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomWebApiParameters(document.RootElement); + return DeserializeWebApiVectorizerParameters(document.RootElement); } /// Convert into a . diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomWebApiParameters.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiVectorizerParameters.cs similarity index 87% rename from sdk/search/Azure.Search.Documents/src/Generated/Models/CustomWebApiParameters.cs rename to sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiVectorizerParameters.cs index 8e645e442ca95..8290bcf426749 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomWebApiParameters.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiVectorizerParameters.cs @@ -7,19 +7,20 @@ using System; using System.Collections.Generic; +using Azure.Core; namespace Azure.Search.Documents.Indexes.Models { /// Specifies the properties for connecting to a user-defined vectorizer. - public partial class CustomWebApiParameters + public partial class WebApiVectorizerParameters { - /// Initializes a new instance of . - public CustomWebApiParameters() + /// Initializes a new instance of . + public WebApiVectorizerParameters() { HttpHeaders = new ChangeTrackingDictionary(); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The URI of the Web API providing the vectorizer. /// The headers required to make the HTTP request. /// The method for the HTTP request. @@ -30,7 +31,7 @@ public CustomWebApiParameters() /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// - internal CustomWebApiParameters(Uri uri, IDictionary httpHeaders, string httpMethod, TimeSpan? timeout, string authResourceId, SearchIndexerDataIdentity authIdentity) + internal WebApiVectorizerParameters(Uri uri, IDictionary httpHeaders, string httpMethod, TimeSpan? timeout, ResourceIdentifier authResourceId, SearchIndexerDataIdentity authIdentity) { Uri = uri; HttpHeaders = httpHeaders; @@ -49,7 +50,7 @@ internal CustomWebApiParameters(Uri uri, IDictionary httpHeaders /// The desired timeout for the request. Default is 30 seconds. public TimeSpan? Timeout { get; set; } /// Applies to custom endpoints that connect to external code in an Azure function or some other application that provides the transformations. This value should be the application ID created for the function or app when it was registered with Azure Active Directory. When specified, the vectorization connects to the function or app using a managed ID (either system or user-assigned) of the search service and the access token of the function or app, using this value as the resource id for creating the scope of the access token. - public string AuthResourceId { get; set; } + public ResourceIdentifier AuthResourceId { get; set; } /// /// The user-assigned managed identity used for outbound connections. If an authResourceId is provided and it's not specified, the system-assigned managed identity is used. On updates to the indexer, if the identity is unspecified, the value remains unchanged. If set to "none", the value of this property is cleared. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/SearchModelFactory.cs b/sdk/search/Azure.Search.Documents/src/Generated/SearchModelFactory.cs index 5627feb7fbce2..6949f97f9c093 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/SearchModelFactory.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/SearchModelFactory.cs @@ -41,47 +41,6 @@ public static QueryCaptionResult QueryCaptionResult(string text = null, string h return new QueryCaptionResult(text, highlights, additionalProperties); } - /// Initializes a new instance of . - /// Contains debugging information specific to semantic ranking requests. - /// A new instance for mocking. - public static DocumentDebugInfo DocumentDebugInfo(SemanticDebugInfo semantic = null) - { - return new DocumentDebugInfo(semantic); - } - - /// Initializes a new instance of . - /// The title field that was sent to the semantic enrichment process, as well as how it was used. - /// The content fields that were sent to the semantic enrichment process, as well as how they were used. - /// The keyword fields that were sent to the semantic enrichment process, as well as how they were used. - /// The raw concatenated strings that were sent to the semantic enrichment process. - /// A new instance for mocking. - public static SemanticDebugInfo SemanticDebugInfo(QueryResultDocumentSemanticField titleField = null, IEnumerable contentFields = null, IEnumerable keywordFields = null, QueryResultDocumentRerankerInput rerankerInput = null) - { - contentFields ??= new List(); - keywordFields ??= new List(); - - return new SemanticDebugInfo(titleField, contentFields?.ToList(), keywordFields?.ToList(), rerankerInput); - } - - /// Initializes a new instance of . - /// The name of the field that was sent to the semantic enrichment process. - /// The way the field was used for the semantic enrichment process (fully used, partially used, or unused). - /// A new instance for mocking. - public static QueryResultDocumentSemanticField QueryResultDocumentSemanticField(string name = null, SemanticFieldState? state = null) - { - return new QueryResultDocumentSemanticField(name, state); - } - - /// Initializes a new instance of . - /// The raw string for the title field that was used for semantic enrichment. - /// The raw concatenated strings for the content fields that were used for semantic enrichment. - /// The raw concatenated strings for the keyword fields that were used for semantic enrichment. - /// A new instance for mocking. - public static QueryResultDocumentRerankerInput QueryResultDocumentRerankerInput(string title = null, string content = null, string keywords = null) - { - return new QueryResultDocumentRerankerInput(title, content, keywords); - } - /// Initializes a new instance of . /// A value indicating the percentage of the index that was considered by the autocomplete request, or null if minimumCoverage was not specified in the request. /// The list of returned Autocompleted items. @@ -106,40 +65,6 @@ public static SearchIndexerStatus SearchIndexerStatus(IndexerStatus status = def return new SearchIndexerStatus(status, lastResult, executionHistory?.ToList(), limits); } - /// Initializes a new instance of . - /// The outcome of this indexer execution. - /// The outcome of this indexer execution. - /// All of the state that defines and dictates the indexer's current execution. - /// The error message indicating the top-level error, if any. - /// The start time of this indexer execution. - /// The end time of this indexer execution, if the execution has already completed. - /// The item-level indexing errors. - /// The item-level indexing warnings. - /// The number of items that were processed during this indexer execution. This includes both successfully processed items and items where indexing was attempted but failed. - /// The number of items that failed to be indexed during this indexer execution. - /// Change tracking state with which an indexer execution started. - /// Change tracking state with which an indexer execution finished. - /// A new instance for mocking. - public static IndexerExecutionResult IndexerExecutionResult(IndexerExecutionStatus status = default, IndexerExecutionStatusDetail? statusDetail = null, IndexerState currentState = null, string errorMessage = null, DateTimeOffset? startTime = null, DateTimeOffset? endTime = null, IEnumerable errors = null, IEnumerable warnings = null, int itemCount = default, int failedItemCount = default, string initialTrackingState = null, string finalTrackingState = null) - { - errors ??= new List(); - warnings ??= new List(); - - return new IndexerExecutionResult( - status, - statusDetail, - currentState, - errorMessage, - startTime, - endTime, - errors?.ToList(), - warnings?.ToList(), - itemCount, - failedItemCount, - initialTrackingState, - finalTrackingState); - } - /// Initializes a new instance of . /// The number of documents in the index. /// The amount of storage in bytes consumed by the index. @@ -151,7 +76,6 @@ public static SearchIndexStatistics SearchIndexStatistics(long documentCount = d } /// Initializes a new instance of . - /// Total number of aliases. /// Total number of documents across all indexes in the service. /// Total number of indexes. /// Total number of indexers. @@ -160,14 +84,10 @@ public static SearchIndexStatistics SearchIndexStatistics(long documentCount = d /// Total number of synonym maps. /// Total number of skillsets. /// Total memory consumption of all vector indexes within the service, in bytes. - /// , , , , , , , or is null. + /// , , , , , , or is null. /// A new instance for mocking. - public static SearchServiceCounters SearchServiceCounters(SearchResourceCounter aliasCounter = null, SearchResourceCounter documentCounter = null, SearchResourceCounter indexCounter = null, SearchResourceCounter indexerCounter = null, SearchResourceCounter dataSourceCounter = null, SearchResourceCounter storageSizeCounter = null, SearchResourceCounter synonymMapCounter = null, SearchResourceCounter skillsetCounter = null, SearchResourceCounter vectorIndexSizeCounter = null) + public static SearchServiceCounters SearchServiceCounters(SearchResourceCounter documentCounter = null, SearchResourceCounter indexCounter = null, SearchResourceCounter indexerCounter = null, SearchResourceCounter dataSourceCounter = null, SearchResourceCounter storageSizeCounter = null, SearchResourceCounter synonymMapCounter = null, SearchResourceCounter skillsetCounter = null, SearchResourceCounter vectorIndexSizeCounter = null) { - if (aliasCounter == null) - { - throw new ArgumentNullException(nameof(aliasCounter)); - } if (documentCounter == null) { throw new ArgumentNullException(nameof(documentCounter)); @@ -202,7 +122,6 @@ public static SearchServiceCounters SearchServiceCounters(SearchResourceCounter } return new SearchServiceCounters( - aliasCounter, documentCounter, indexCounter, indexerCounter, diff --git a/sdk/search/Azure.Search.Documents/src/Generated/SearchServiceRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/SearchServiceRestClient.cs index 403c486ff89cd..6f23aac2a79e3 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/SearchServiceRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/SearchServiceRestClient.cs @@ -32,7 +32,7 @@ internal partial class SearchServiceRestClient /// The tracking ID sent with the request to help with debugging. /// Api Version. /// , , or is null. - public SearchServiceRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2024-05-01-preview") + public SearchServiceRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2024-07-01") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/SkillsetsRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/SkillsetsRestClient.cs index 2cbb5a7f66d5c..d1d928d398212 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/SkillsetsRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/SkillsetsRestClient.cs @@ -12,7 +12,6 @@ using Azure.Core; using Azure.Core.Pipeline; using Azure.Search.Documents.Indexes.Models; -using Azure.Search.Documents.Models; namespace Azure.Search.Documents { @@ -33,7 +32,7 @@ internal partial class SkillsetsRestClient /// The tracking ID sent with the request to help with debugging. /// Api Version. /// , , or is null. - public SkillsetsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2024-05-01-preview") + public SkillsetsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2024-07-01") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); @@ -42,7 +41,7 @@ public SkillsetsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pip _apiVersion = apiVersion ?? throw new ArgumentNullException(nameof(apiVersion)); } - internal HttpMessage CreateCreateOrUpdateRequest(string skillsetName, SearchIndexerSkillset skillset, string ifMatch, string ifNoneMatch, bool? skipIndexerResetRequirementForCache, bool? disableCacheReprocessingChangeDetection) + internal HttpMessage CreateCreateOrUpdateRequest(string skillsetName, SearchIndexerSkillset skillset, string ifMatch, string ifNoneMatch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -53,14 +52,6 @@ internal HttpMessage CreateCreateOrUpdateRequest(string skillsetName, SearchInde uri.AppendPath(skillsetName, true); uri.AppendPath("')", false); uri.AppendQuery("api-version", _apiVersion, true); - if (skipIndexerResetRequirementForCache != null) - { - uri.AppendQuery("ignoreResetRequirements", skipIndexerResetRequirementForCache.Value, true); - } - if (disableCacheReprocessingChangeDetection != null) - { - uri.AppendQuery("disableCacheReprocessingChangeDetection", disableCacheReprocessingChangeDetection.Value, true); - } request.Uri = uri; if (ifMatch != null) { @@ -84,11 +75,9 @@ internal HttpMessage CreateCreateOrUpdateRequest(string skillsetName, SearchInde /// The skillset containing one or more skills to create or update in a search service. /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// Ignores cache reset requirements. - /// Disables cache reprocessing change detection. /// The cancellation token to use. /// or is null. - public async Task> CreateOrUpdateAsync(string skillsetName, SearchIndexerSkillset skillset, string ifMatch = null, string ifNoneMatch = null, bool? skipIndexerResetRequirementForCache = null, bool? disableCacheReprocessingChangeDetection = null, CancellationToken cancellationToken = default) + public async Task> CreateOrUpdateAsync(string skillsetName, SearchIndexerSkillset skillset, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { if (skillsetName == null) { @@ -99,7 +88,7 @@ public async Task> CreateOrUpdateAsync(string sk throw new ArgumentNullException(nameof(skillset)); } - using var message = CreateCreateOrUpdateRequest(skillsetName, skillset, ifMatch, ifNoneMatch, skipIndexerResetRequirementForCache, disableCacheReprocessingChangeDetection); + using var message = CreateCreateOrUpdateRequest(skillsetName, skillset, ifMatch, ifNoneMatch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -121,11 +110,9 @@ public async Task> CreateOrUpdateAsync(string sk /// The skillset containing one or more skills to create or update in a search service. /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. - /// Ignores cache reset requirements. - /// Disables cache reprocessing change detection. /// The cancellation token to use. /// or is null. - public Response CreateOrUpdate(string skillsetName, SearchIndexerSkillset skillset, string ifMatch = null, string ifNoneMatch = null, bool? skipIndexerResetRequirementForCache = null, bool? disableCacheReprocessingChangeDetection = null, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string skillsetName, SearchIndexerSkillset skillset, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { if (skillsetName == null) { @@ -136,7 +123,7 @@ public Response CreateOrUpdate(string skillsetName, Searc throw new ArgumentNullException(nameof(skillset)); } - using var message = CreateCreateOrUpdateRequest(skillsetName, skillset, ifMatch, ifNoneMatch, skipIndexerResetRequirementForCache, disableCacheReprocessingChangeDetection); + using var message = CreateCreateOrUpdateRequest(skillsetName, skillset, ifMatch, ifNoneMatch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -428,79 +415,5 @@ public Response Create(SearchIndexerSkillset skillset, Ca throw new RequestFailedException(message.Response); } } - - internal HttpMessage CreateResetSkillsRequest(string skillsetName, ResetSkillsOptions resetSkillsOptions) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.AppendRaw(_endpoint, false); - uri.AppendPath("/skillsets('", false); - uri.AppendPath(skillsetName, true); - uri.AppendPath("')/search.resetskills", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json; odata.metadata=minimal"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(resetSkillsOptions); - request.Content = content; - return message; - } - - /// Reset an existing skillset in a search service. - /// The name of the skillset to reset. - /// The names of skills to reset. - /// The cancellation token to use. - /// or is null. - public async Task ResetSkillsAsync(string skillsetName, ResetSkillsOptions resetSkillsOptions, CancellationToken cancellationToken = default) - { - if (skillsetName == null) - { - throw new ArgumentNullException(nameof(skillsetName)); - } - if (resetSkillsOptions == null) - { - throw new ArgumentNullException(nameof(resetSkillsOptions)); - } - - using var message = CreateResetSkillsRequest(skillsetName, resetSkillsOptions); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Reset an existing skillset in a search service. - /// The name of the skillset to reset. - /// The names of skills to reset. - /// The cancellation token to use. - /// or is null. - public Response ResetSkills(string skillsetName, ResetSkillsOptions resetSkillsOptions, CancellationToken cancellationToken = default) - { - if (skillsetName == null) - { - throw new ArgumentNullException(nameof(skillsetName)); - } - if (resetSkillsOptions == null) - { - throw new ArgumentNullException(nameof(resetSkillsOptions)); - } - - using var message = CreateResetSkillsRequest(skillsetName, resetSkillsOptions); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/SynonymMapsRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/SynonymMapsRestClient.cs index 489d8451bf0af..2b99ecca311b0 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/SynonymMapsRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/SynonymMapsRestClient.cs @@ -32,7 +32,7 @@ internal partial class SynonymMapsRestClient /// The tracking ID sent with the request to help with debugging. /// Api Version. /// , , or is null. - public SynonymMapsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2024-05-01-preview") + public SynonymMapsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2024-07-01") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/Models/AnalyzeTextOptions.cs b/sdk/search/Azure.Search.Documents/src/Indexes/Models/AnalyzeTextOptions.cs index b986eb0279453..fb022a4810767 100644 --- a/sdk/search/Azure.Search.Documents/src/Indexes/Models/AnalyzeTextOptions.cs +++ b/sdk/search/Azure.Search.Documents/src/Indexes/Models/AnalyzeTextOptions.cs @@ -28,15 +28,6 @@ public AnalyzeTextOptions(string text, LexicalAnalyzerName analyzerName) : this( public AnalyzeTextOptions(string text, LexicalTokenizerName tokenizerName) : this(text) => TokenizerName = tokenizerName; - /// - /// Initializes a new instance of AnalyzeRequest. - /// - /// Required text to break into tokens. - /// The name of the tokenizer to use to break the given . - /// is null. - public AnalyzeTextOptions(string text, LexicalNormalizerName normalizerName) : this(text) - => NormalizerName = normalizerName; - /// The name of the analyzer to use to break the given text. [CodeGenMember("Analyzer")] public LexicalAnalyzerName? AnalyzerName { get; } @@ -45,10 +36,6 @@ public AnalyzeTextOptions(string text, LexicalNormalizerName normalizerName) : t [CodeGenMember("Tokenizer")] public LexicalTokenizerName? TokenizerName { get; } - /// The name of the normalizer to use to normalize the given text. - [CodeGenMember("Normalizer")] - public LexicalNormalizerName? NormalizerName { get; } - /// An optional list of token filters to use when breaking the given text. public IList TokenFilters { get; } diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/Models/AzureMachineLearningSkill.cs b/sdk/search/Azure.Search.Documents/src/Indexes/Models/AzureMachineLearningSkill.cs deleted file mode 100644 index 588fd76cd4cc2..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Indexes/Models/AzureMachineLearningSkill.cs +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Search.Documents.Indexes.Models -{ - /// - /// AzureMachineLearningSkill allows you to extend AI enrichment with a - /// custom Azure Machine Learning (AML) model. - /// Once an AML model is trained and deployed, - /// an AML skill integrates it into AI enrichment. - /// - public partial class AzureMachineLearningSkill - { - /// The key for the Azure Machine Learning service. This is required for key-based authentication. - [CodeGenMember("AuthenticationKey")] - public string AuthenticationKey { get; } - - /// The scoring URI of the Azure Machine Learning service to which the JSON payload will be sent. - /// This is required when using no authentication or key-based authentication. - /// Only the https URI scheme is allowed. - /// - [CodeGenMember("ScoringUri")] - public Uri ScoringUri { get; } - - [CodeGenMember("ResourceId")] - internal string RawResourceId - { - get => ResourceId?.ToString(); - set => ResourceId = (value == null) ? null : new ResourceIdentifier(value); - } - - /// The Azure Resource Manager resource ID of the Azure Machine Learning service. - /// This is required for token-based authentication. - /// It should be in the format "subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.MachineLearningServices/workspaces/{workspace-name}/services/{service_name}". - /// - public ResourceIdentifier ResourceId { get; private set; } - - [CodeGenMember("Region")] - internal string RawLocation - { - get => Location?.ToString(); - set => Location = (value == null) ? default : new AzureLocation(value); - } - - /// The region the Azure Machine Learning service is deployed in. - /// This is optional for token-based authentication. - /// - public AzureLocation? Location { get; private set; } - - /// - /// Initializes a new instance of the class. - /// - /// Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - /// The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - /// The key for the AML service. - /// The scoring URI of the AML service to which the JSON payload will be sent. Only the https URI scheme is allowed. - public AzureMachineLearningSkill(IEnumerable inputs, IEnumerable outputs, Uri scoringUri, string authenticationKey = default) : - this(inputs, outputs) - { - ScoringUri = scoringUri ?? throw new ArgumentNullException(nameof(scoringUri)); - AuthenticationKey = authenticationKey; - } - - /// - /// Initializes a new instance of the class. - /// - /// Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - /// The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - /// The Azure Resource Manager resource Id of the AML service. - /// It should be in the format subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.MachineLearningServices/workspaces/{workspace-name}/services/{service_name}. - /// The region the AML service is deployed in. - public AzureMachineLearningSkill(IEnumerable inputs, IEnumerable outputs, ResourceIdentifier resourceId, AzureLocation? location = default) : - this(inputs, outputs) - { - ResourceId = resourceId ?? throw new ArgumentNullException(nameof(resourceId)); - Location = location; - } - - /// Initializes a new instance of AmlSkill. - /// Inputs of the skills could be a column in the source data set, or the output of an upstream skill. - /// The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. - /// or is null. - internal AzureMachineLearningSkill(IEnumerable inputs, IEnumerable outputs) : base(inputs, outputs) - { - if (inputs == null) - { - throw new ArgumentNullException(nameof(inputs)); - } - if (outputs == null) - { - throw new ArgumentNullException(nameof(outputs)); - } - - ODataType = "#Microsoft.Skills.Custom.AmlSkill"; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/Models/IndexerChangeTrackingState.cs b/sdk/search/Azure.Search.Documents/src/Indexes/Models/IndexerChangeTrackingState.cs deleted file mode 100644 index 3a4506b3114d6..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Indexes/Models/IndexerChangeTrackingState.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Azure.Search.Documents.Indexes.Models -{ - /// Represents the change tracking state during an indexer's execution. - public class IndexerChangeTrackingState - { - /// - /// Initializes a new instance of the class. - /// - /// Change tracking state used when indexing starts on all documents in the datasource. - /// Change tracking state value when indexing finishes on all documents in the datasource. - /// Change tracking state used when indexing starts on select, reset documents in the datasource. - /// Change tracking state value when indexing finishes on select, reset documents in the datasource. - internal IndexerChangeTrackingState(string allDocumentsInitialState, string allDocumentsFinalState, string resetDocumentsInitialState, string resetDocumentsFinalState) - { - AllDocumentsInitialState = allDocumentsInitialState; - AllDocumentsFinalState = allDocumentsFinalState; - ResetDocumentsInitialState = resetDocumentsInitialState; - ResetDocumentsFinalState = resetDocumentsFinalState; - } - - /// Change tracking state used when indexing starts on all documents in the datasource. - public string AllDocumentsInitialState { get; } - - /// Change tracking state value when indexing finishes on all documents in the datasource. - public string AllDocumentsFinalState { get; } - - /// Change tracking state used when indexing starts on select, reset documents in the datasource. - public string ResetDocumentsInitialState { get; } - - /// Change tracking state value when indexing finishes on select, reset documents in the datasource. - public string ResetDocumentsFinalState { get; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/Models/IndexerState.cs b/sdk/search/Azure.Search.Documents/src/Indexes/Models/IndexerState.cs deleted file mode 100644 index 0c23b3955f35b..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Indexes/Models/IndexerState.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Search.Documents.Indexes.Models -{ - /// Represents all of the state that defines and dictates the indexer's current execution. - [CodeGenModel("IndexerCurrentState")] - public partial class IndexerState - { - /// Change tracking state used when indexing starts on all documents in the datasource. - internal string AllDocsInitialChangeTrackingState => ChangeTrackingState.AllDocumentsInitialState; - - /// Change tracking state value when indexing finishes on all documents in the datasource. - internal string AllDocsFinalChangeTrackingState => ChangeTrackingState.AllDocumentsFinalState; - - /// Change tracking state used when indexing starts on select, reset documents in the datasource. - internal string ResetDocsInitialChangeTrackingState => ChangeTrackingState.ResetDocumentsInitialState ; - - /// Change tracking state value when indexing finishes on select, reset documents in the datasource. - internal string ResetDocsFinalChangeTrackingState => ChangeTrackingState.ResetDocumentsFinalState ; - - /// - /// Change tracking state for an indexer's execution. - /// - public IndexerChangeTrackingState ChangeTrackingState { get; } - - /// The list of datasource document ids that have been reset. The datasource document id is the unique identifier for the data in the datasource. The indexer will prioritize selectively re-ingesting these ids. - [CodeGenMember("ResetDatasourceDocumentIds")] - public IReadOnlyList ResetDataSourceDocumentIds { get; } - - /// Initializes a new instance of IndexerState. - /// The mode the indexer is running in. - /// Change tracking state used when indexing starts on all documents in the datasource. - /// Change tracking state value when indexing finishes on all documents in the datasource. - /// Change tracking state used when indexing starts on select, reset documents in the datasource. - /// Change tracking state value when indexing finishes on select, reset documents in the datasource. - /// The list of document keys that have been reset. The document key is the document's unique identifier for the data in the search index. The indexer will prioritize selectively re-ingesting these keys. - /// The list of datasource document ids that have been reset. The datasource document id is the unique identifier for the data in the datasource. The indexer will prioritize selectively re-ingesting these ids. - internal IndexerState(IndexingMode? mode, string allDocumentsInitialChangeTrackingState, string allDocumentsFinalChangeTrackingState, string resetDocumentsInitialChangeTrackingState, string resetDocumentsFinalChangeTrackingState, IReadOnlyList resetDocumentKeys, IReadOnlyList resetDataSourceDocumentIds) - { - Mode = mode; - ResetDocumentKeys = resetDocumentKeys; - ResetDataSourceDocumentIds = resetDataSourceDocumentIds; - - ChangeTrackingState = new IndexerChangeTrackingState(allDocumentsInitialChangeTrackingState, allDocumentsFinalChangeTrackingState, resetDocumentsInitialChangeTrackingState, resetDocumentsFinalChangeTrackingState); - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/Models/IndexingMode.cs b/sdk/search/Azure.Search.Documents/src/Indexes/Models/IndexingMode.cs deleted file mode 100644 index 50261a3647314..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Indexes/Models/IndexingMode.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Core; - -namespace Azure.Search.Documents.Indexes.Models -{ - public readonly partial struct IndexingMode - { - /// The indexer is indexing all documents in the datasource. - [CodeGenMember("IndexingAllDocs")] - public static IndexingMode AllDocuments { get; } = new IndexingMode(AllDocumentsValue); - - /// The indexer is indexing selective, reset documents in the datasource. The documents being indexed are defined on indexer status. - [CodeGenMember("IndexingResetDocs")] - public static IndexingMode ResetDocuments { get; } = new IndexingMode(ResetDocumentsValue); - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/Models/LexicalNormalizerName.cs b/sdk/search/Azure.Search.Documents/src/Indexes/Models/LexicalNormalizerName.cs deleted file mode 100644 index 53d593d695414..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Indexes/Models/LexicalNormalizerName.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Azure.Search.Documents.Indexes.Models -{ - public readonly partial struct LexicalNormalizerName - { -#pragma warning disable CA1034 // Nested types should not be visible - /// - /// The values of all declared properties as string constants. - /// These can be used in , and anywhere else constants are required. - /// - public static class Values - { - /// Converts alphabetic, numeric, and symbolic Unicode characters which are not in the first 127 ASCII characters (the "Basic Latin" Unicode block) into their ASCII equivalents, if such equivalents exist. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/ASCIIFoldingFilter.html. - public const string AsciiFolding = LexicalNormalizerName.AsciiFoldingValue; - /// Removes elisions. For example, "l'avion" (the plane) will be converted to "avion" (plane). See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/util/ElisionFilter.html. - public const string Elision = LexicalNormalizerName.ElisionValue; - /// Normalizes token text to lowercase. See https://lucene.apache.org/core/6_6_1/analyzers-common/org/apache/lucene/analysis/core/LowerCaseFilter.html. - public const string Lowercase = LexicalNormalizerName.LowercaseValue; - /// Standard normalizer, which consists of lowercase and asciifolding. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/reverse/ReverseStringFilter.html. - public const string Standard = LexicalNormalizerName.StandardValue; - /// Normalizes token text to uppercase. See https://lucene.apache.org/core/6_6_1/analyzers-common/org/apache/lucene/analysis/core/UpperCaseFilter.html. - public const string Uppercase = LexicalNormalizerName.UppercaseValue; - } -#pragma warning restore CA1034 // Nested types should not be visible - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/Models/ResetSkillsOptions.cs b/sdk/search/Azure.Search.Documents/src/Indexes/Models/ResetSkillsOptions.cs deleted file mode 100644 index 934e1d03d0102..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Indexes/Models/ResetSkillsOptions.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.Text; -using Azure.Core; - -namespace Azure.Search.Documents.Models -{ - /// - /// The skills to reset. - /// - [CodeGenModel("SkillNames")] - public partial class ResetSkillsOptions - { - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/Models/SearchAlias.cs b/sdk/search/Azure.Search.Documents/src/Indexes/Models/SearchAlias.cs deleted file mode 100644 index b37dac4798184..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Indexes/Models/SearchAlias.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Collections.Generic; -using System; -using Azure.Core; - -namespace Azure.Search.Documents.Indexes.Models -{ - public partial class SearchAlias - { - [CodeGenMember("ETag")] - private readonly string _etag; - - /// - /// The of the . - /// - public ETag? ETag - { - get => _etag is null ? null : new ETag(_etag); - } - - /// Initializes a new instance of SearchAlias. - /// The name of the alias. - /// The name of the index this alias maps to. - /// or is null. - public SearchAlias(string name, string index) - { - Name = name ?? throw new ArgumentNullException(nameof(name)); - Indexes = (index != null) ? new List { index } : throw new ArgumentNullException(nameof(index)); - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/Models/SearchField.cs b/sdk/search/Azure.Search.Documents/src/Indexes/Models/SearchField.cs index 75eb3b69aaa69..a0b829879c3e1 100644 --- a/sdk/search/Azure.Search.Documents/src/Indexes/Models/SearchField.cs +++ b/sdk/search/Azure.Search.Documents/src/Indexes/Models/SearchField.cs @@ -185,15 +185,6 @@ public bool? IsHidden [CodeGenMember("IndexAnalyzer")] public LexicalAnalyzerName? IndexAnalyzerName { get; set; } - /// - /// The name of the normalizer to use for the field. - /// This option can be used only with fields with filterable, sortable, or facetable enabled. - /// Once the normalizer is chosen, it cannot be changed for the field. - /// Must be null for complex fields. - /// - [CodeGenMember("Normalizer")] - public LexicalNormalizerName? NormalizerName { get; set; } - // TODO: Remove "overrides" for collection properties when https://github.com/Azure/autorest.csharp/issues/521 is fixed. /// diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/Models/SearchIndex.cs b/sdk/search/Azure.Search.Documents/src/Indexes/Models/SearchIndex.cs index dc237860abfb4..77da7d674e294 100644 --- a/sdk/search/Azure.Search.Documents/src/Indexes/Models/SearchIndex.cs +++ b/sdk/search/Azure.Search.Documents/src/Indexes/Models/SearchIndex.cs @@ -49,7 +49,6 @@ public SearchIndex(string name, IEnumerable fields) Suggesters = new ChangeTrackingList(); TokenFilters = new ChangeTrackingList(); Tokenizers = new ChangeTrackingList(); - Normalizers = new ChangeTrackingList(); } /// @@ -149,11 +148,6 @@ public IList Fields /// public IList Tokenizers { get; } - /// - /// Gets the normalizers for the index. - /// - public IList Normalizers { get; } - /// /// The of the . /// diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/Models/SearchIndexerCache.cs b/sdk/search/Azure.Search.Documents/src/Indexes/Models/SearchIndexerCache.cs deleted file mode 100644 index a2c30b9af532d..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Indexes/Models/SearchIndexerCache.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.Text; - -namespace Azure.Search.Documents.Indexes.Models -{ - public partial class SearchIndexerCache - { - /// The connection string to the storage account where the cache data will be persisted. - private string StorageConnectionString { get; set; } - - /// - /// Sets the for the Search indexer cache. - /// - /// The storage connection string. - public void SetStorageConnectionString(string storageConnectionString) - { - StorageConnectionString = storageConnectionString; - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/Models/SimpleField.cs b/sdk/search/Azure.Search.Documents/src/Indexes/Models/SimpleField.cs index ac21207612546..158e1c687cd51 100644 --- a/sdk/search/Azure.Search.Documents/src/Indexes/Models/SimpleField.cs +++ b/sdk/search/Azure.Search.Documents/src/Indexes/Models/SimpleField.cs @@ -59,13 +59,6 @@ public SimpleField(string name, SearchFieldDataType type) : base(name, type) /// public bool IsSortable { get; set; } - /// - /// The name of the normalizer to use for the field. - /// This option can be used only with fields with filterable, sortable, or facetable enabled. Once the normalizer is chosen, it cannot be changed for the field. - /// Must be null for complex fields. - /// - public LexicalNormalizerName? NormalizerName { get; set; } - /// private protected override void Save(SearchField field) { @@ -74,7 +67,6 @@ private protected override void Save(SearchField field) field.IsFilterable = IsFilterable; field.IsFacetable = IsFacetable; field.IsSortable = IsSortable; - field.NormalizerName = NormalizerName; // Use a SearchableField instead, which will override this property. // The service will return Searchable == false for all non-searchable simple types. diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/Models/VectorSearchCompression.cs b/sdk/search/Azure.Search.Documents/src/Indexes/Models/VectorSearchCompression.cs new file mode 100644 index 0000000000000..89aba1520093c --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Indexes/Models/VectorSearchCompression.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.Search.Documents.Indexes.Models +{ + public abstract partial class VectorSearchCompression + { + /// Gets the name associated with this particular configuration. + public string CompressionName { get; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/Models/VectorSearchVectorizer.cs b/sdk/search/Azure.Search.Documents/src/Indexes/Models/VectorSearchVectorizer.cs new file mode 100644 index 0000000000000..4e3e99e73167e --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Indexes/Models/VectorSearchVectorizer.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.Search.Documents.Indexes.Models +{ + public abstract partial class VectorSearchVectorizer + { + /// Gets the name associated with this particular vectorization method. + public string VectorizerName { get; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/Models/WebApiSkill.cs b/sdk/search/Azure.Search.Documents/src/Indexes/Models/WebApiSkill.cs index 394a5b29129ce..9045264b98575 100644 --- a/sdk/search/Azure.Search.Documents/src/Indexes/Models/WebApiSkill.cs +++ b/sdk/search/Azure.Search.Documents/src/Indexes/Models/WebApiSkill.cs @@ -1,14 +1,49 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using System; using System.Collections.Generic; +using System.ComponentModel; using Azure.Core; namespace Azure.Search.Documents.Indexes.Models { public partial class WebApiSkill { + /// Initializes a new instance of . + /// Inputs of the skills could be a column in the source data set, or the output of an upstream skill. + /// The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. + /// The url for the Web API. + /// , or is null. + public WebApiSkill(IEnumerable inputs, IEnumerable outputs, string uri) : base(inputs, outputs) + { + Argument.AssertNotNull(inputs, nameof(inputs)); + Argument.AssertNotNull(outputs, nameof(outputs)); + Argument.AssertNotNull(uri, nameof(uri)); + + Uri = uri; + HttpHeaders = new ChangeTrackingDictionary(); + ODataType = "#Microsoft.Skills.Custom.WebApiSkill"; + } + + /// Initializes a new instance of . + /// Inputs of the skills could be a column in the source data set, or the output of an upstream skill. + /// The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. + /// or is null. + internal WebApiSkill(IEnumerable inputs, IEnumerable outputs) : base(inputs, outputs) + { + Argument.AssertNotNull(inputs, nameof(inputs)); + Argument.AssertNotNull(outputs, nameof(outputs)); + + HttpHeaders = new ChangeTrackingDictionary(); + ODataType = "#Microsoft.Skills.Custom.WebApiSkill"; + } + /// The headers required to make the http request. public IDictionary HttpHeaders { get; } + + /// The URI of the Web API providing the vectorizer. + [CodeGenMember("Url")] + public string Uri { get; set; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexClient.Aliases.cs b/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexClient.Aliases.cs deleted file mode 100644 index 50c64738d7fe9..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexClient.Aliases.cs +++ /dev/null @@ -1,271 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.Search.Documents.Indexes.Models; - -namespace Azure.Search.Documents.Indexes -{ - /// - /// Azure Cognitive Search client that can be used to manage indexes on a Search service. - /// - public partial class SearchIndexClient - { - private AliasesRestClient _aliasesRestClient; - - /// - /// Gets the generated to make requests. - /// - private AliasesRestClient AliasesClient => LazyInitializer.EnsureInitialized(ref _aliasesRestClient, () => new AliasesRestClient( - _clientDiagnostics, - _pipeline, - Endpoint.AbsoluteUri, - null, - _version.ToVersionString()) - ); - - /// - /// Creates a new search alias. - /// - /// The definition of the alias to create. - /// Optional to propagate notifications that the operation should be canceled. - /// created by the service. - public virtual Response CreateAlias(SearchAlias alias, CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexClient)}.{nameof(CreateAlias)}"); - scope.Start(); - try - { - return AliasesClient.Create(alias, cancellationToken); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - - /// - /// Creates a new search alias. - /// - /// The definition of the alias to create. - /// Optional to propagate notifications that the operation should be canceled. - /// created by the service. - public virtual async Task> CreateAliasAsync(SearchAlias alias, CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexClient)}.{nameof(CreateAlias)}"); - scope.Start(); - try - { - return await AliasesClient.CreateAsync(alias, cancellationToken).ConfigureAwait(false); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - - /// - /// Creates a new search alias or updates an alias if it already exists. - /// - /// The name of the alias to create or update. - /// The definition of the alias to create or update. - /// - /// True to throw a if the does not match the current alias version; - /// otherwise, the current version will be overwritten. - /// - /// Optional to propagate notifications that the operation should be canceled. - /// defined by aliasName. - public virtual Response CreateOrUpdateAlias(string aliasName, SearchAlias alias, bool onlyIfUnchanged = false, CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexClient)}.{nameof(CreateOrUpdateAlias)}"); - scope.Start(); - try - { - return AliasesClient.CreateOrUpdate(aliasName, alias, onlyIfUnchanged ? alias.ETag?.ToString() : null, null, cancellationToken); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - - /// - /// Creates a new search alias or updates an alias if it already exists. - /// - /// The name of the alias to create or update. - /// The definition of the alias to create or update. - /// - /// True to throw a if the does not match the current alias version; - /// otherwise, the current version will be overwritten. - /// - /// Optional to propagate notifications that the operation should be canceled. - /// defined by aliasName. - public virtual async Task> CreateOrUpdateAliasAsync(string aliasName, SearchAlias alias, bool onlyIfUnchanged = false, CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexClient)}.{nameof(CreateOrUpdateAlias)}"); - scope.Start(); - try - { - return await AliasesClient.CreateOrUpdateAsync(aliasName, alias, onlyIfUnchanged ? alias.ETag?.ToString() : null, null, cancellationToken).ConfigureAwait(false); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - - /// - /// Deletes a search alias and its associated mapping to an index. This operation is permanent, with no recovery option. The mapped index is untouched by this operation. - /// - /// The name of the alias to delete. - /// Optional to propagate notifications that the operation should be canceled. - /// from the service. - public virtual Response DeleteAlias(string aliasName, CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexClient)}.{nameof(DeleteAlias)}"); - scope.Start(); - try - { - return AliasesClient.Delete(aliasName, null, null, cancellationToken); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - - /// - /// Deletes a search alias and its associated mapping to an index. This operation is permanent, with no recovery option. The mapped index is untouched by this operation. - /// - /// The name of the alias to delete. - /// Optional to propagate notifications that the operation should be canceled. - /// from the service. - public virtual async Task DeleteAliasAsync(string aliasName, CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexClient)}.{nameof(DeleteAlias)}"); - scope.Start(); - try - { - return await AliasesClient.DeleteAsync(aliasName, null, null, cancellationToken).ConfigureAwait(false); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - - /// - /// Retrieves an alias definition. - /// - /// The name of the alias to retrieve. - /// Optional to propagate notifications that the operation should be canceled. - /// defined by aliasName. - public virtual Response GetAlias(string aliasName, CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexClient)}.{nameof(GetAlias)}"); - scope.Start(); - try - { - return AliasesClient.Get(aliasName, cancellationToken); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - - /// - /// Retrieves an alias definition. - /// - /// The name of the alias to retrieve. - /// Optional to propagate notifications that the operation should be canceled. - /// defined by aliasName. - public virtual async Task> GetAliasAsync(string aliasName, CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexClient)}.{nameof(GetAlias)}"); - scope.Start(); - try - { - return await AliasesClient.GetAsync(aliasName, cancellationToken).ConfigureAwait(false); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - - /// - /// Gets a list of all alias definitions available for a search service. - /// - /// Optional to propagate notifications that the operation should be canceled. - /// The from the server containing a list of objects. - /// Thrown when a failure is returned by the Search service. - public virtual Pageable GetAliases(CancellationToken cancellationToken = default) - { - return PageResponseEnumerator.CreateEnumerable((continuationToken) => - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexClient)}.{nameof(GetAliases)}"); - scope.Start(); - try - { - if (continuationToken != null) - { - throw new NotSupportedException("A continuation token is unsupported."); - } - - Response result = AliasesClient.List(cancellationToken); - - return Page.FromValues(result.Value.Aliases, null, result.GetRawResponse()); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - }); - } - - /// - /// Gets a list of all alias definitions available for a search service. - /// - /// Optional to propagate notifications that the operation should be canceled. - /// The from the server containing a list of objects. - /// Thrown when a failure is returned by the Search service. - public virtual AsyncPageable GetAliasesAsync(CancellationToken cancellationToken = default) - { - return PageResponseEnumerator.CreateAsyncEnumerable(async (continuationToken) => - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexClient)}.{nameof(GetAliases)}"); - scope.Start(); - try - { - if (continuationToken != null) - { - throw new NotSupportedException("A continuation token is unsupported."); - } - - Response result = await AliasesClient.ListAsync(cancellationToken).ConfigureAwait(false); - - return Page.FromValues(result.Value.Aliases, null, result.GetRawResponse()); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - }); - } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexerClient.DataSources.cs b/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexerClient.DataSources.cs index 561c0b27e8585..15d93bf7ae011 100644 --- a/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexerClient.DataSources.cs +++ b/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexerClient.DataSources.cs @@ -115,38 +115,9 @@ public virtual async Task> CreateDat /// /// Thrown when is null. /// Thrown when a failure is returned by the Search service. - [EditorBrowsable(EditorBrowsableState.Never)] -#pragma warning disable AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - public virtual Response CreateOrUpdateDataSourceConnection( -#pragma warning restore AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - SearchIndexerDataSourceConnection dataSourceConnection, - bool onlyIfUnchanged, - CancellationToken cancellationToken) => CreateOrUpdateDataSourceConnection( - dataSourceConnection, - onlyIfUnchanged, - ignoreCacheResetRequirements: null, - cancellationToken); - - /// - /// Creates a new data source or updates an existing data source connection. - /// - /// Required. The to create or update. - /// - /// True to throw a if the does not match the current service version; - /// otherwise, the current service version will be overwritten. - /// - /// True if the cache reset requirements should be ignored. - /// Optional to propagate notifications that the operation should be canceled. - /// - /// The from the server containing the that was created. - /// This may differ slightly from what was passed in since the service may return back properties set to their default values. - /// - /// Thrown when is null. - /// Thrown when a failure is returned by the Search service. public virtual Response CreateOrUpdateDataSourceConnection( SearchIndexerDataSourceConnection dataSourceConnection, bool onlyIfUnchanged = false, - bool? ignoreCacheResetRequirements = null, CancellationToken cancellationToken = default) { // The REST client uses a different parameter name that would be confusing to reference. @@ -161,7 +132,6 @@ public virtual Response CreateOrUpdateDataSou dataSourceConnection, onlyIfUnchanged ? dataSourceConnection?.ETag?.ToString() : null, null, - ignoreCacheResetRequirements, cancellationToken); } catch (Exception ex) @@ -186,39 +156,9 @@ public virtual Response CreateOrUpdateDataSou /// /// Thrown when is null. /// Thrown when a failure is returned by the Search service. - [EditorBrowsable(EditorBrowsableState.Never)] -#pragma warning disable AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - public virtual async Task> CreateOrUpdateDataSourceConnectionAsync( -#pragma warning restore AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - SearchIndexerDataSourceConnection dataSourceConnection, - bool onlyIfUnchanged, - CancellationToken cancellationToken) => await CreateOrUpdateDataSourceConnectionAsync( - dataSourceConnection, - onlyIfUnchanged, - ignoreCacheResetRequirements: null, - cancellationToken) - .ConfigureAwait(false); - - /// - /// Creates a new data source or updates an existing data source connection. - /// - /// Required. The to create or update. - /// - /// True to throw a if the does not match the current service version; - /// otherwise, the current service version will be overwritten. - /// - /// True if the cache reset requirements should be ignored. - /// Optional to propagate notifications that the operation should be canceled. - /// - /// The from the server containing the that was created. - /// This may differ slightly from what was passed in since the service may return back properties set to their default values. - /// - /// Thrown when is null. - /// Thrown when a failure is returned by the Search service. public virtual async Task> CreateOrUpdateDataSourceConnectionAsync( SearchIndexerDataSourceConnection dataSourceConnection, bool onlyIfUnchanged = false, - bool? ignoreCacheResetRequirements = null, CancellationToken cancellationToken = default) { // The REST client uses a different parameter name that would be confusing to reference. @@ -233,7 +173,6 @@ public virtual async Task> CreateOrU dataSourceConnection, onlyIfUnchanged ? dataSourceConnection?.ETag?.ToString() : null, null, - ignoreCacheResetRequirements, cancellationToken) .ConfigureAwait(false); } diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexerClient.SkillSets.cs b/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexerClient.SkillSets.cs index 2edc48d0345a1..e7d94a9906f8e 100644 --- a/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexerClient.SkillSets.cs +++ b/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexerClient.SkillSets.cs @@ -110,73 +110,9 @@ public virtual async Task> CreateSkillsetAsync( /// /// Thrown when is null. /// Thrown when a failure is returned by the Search service. - [EditorBrowsable(EditorBrowsableState.Never)] -#pragma warning disable AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - public virtual Response CreateOrUpdateSkillset( -#pragma warning restore AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - SearchIndexerSkillset skillset, - bool onlyIfUnchanged, - CancellationToken cancellationToken) => CreateOrUpdateSkillset( - skillset, - onlyIfUnchanged, - ignoreCacheResetRequirements: null, - disableCacheReprocessingChangeDetection: null, - cancellationToken); - - /// - /// Creates a new skillset or updates an existing skillset. - /// - /// Required. The to create or update. - /// - /// True to throw a if the does not match the current service version; - /// otherwise, the current service version will be overwritten. - /// - /// Disables cache reprocessing change detection. - /// Ignores cache reset requirements. - /// Optional to propagate notifications that the operation should be canceled. - /// - /// The from the server containing the that was created. - /// This may differ slightly from what was passed in since the service may return back properties set to their default values. - /// - /// Thrown when is null. - /// Thrown when a failure is returned by the Search service. - [EditorBrowsable(EditorBrowsableState.Never)] -#pragma warning disable AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - public virtual Response CreateOrUpdateSkillset( -#pragma warning restore AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - SearchIndexerSkillset skillset, - bool onlyIfUnchanged, - bool disableCacheReprocessingChangeDetection, - bool ignoreCacheResetRequirements, - CancellationToken cancellationToken) => CreateOrUpdateSkillset( - skillset, - onlyIfUnchanged, - ignoreCacheResetRequirements, - disableCacheReprocessingChangeDetection, - cancellationToken); - - /// - /// Creates a new skillset or updates an existing skillset. - /// - /// Required. The to create or update. - /// - /// True to throw a if the does not match the current service version; - /// otherwise, the current service version will be overwritten. - /// - /// Ignores cache reset requirements. - /// Disables cache reprocessing change detection. - /// Optional to propagate notifications that the operation should be canceled. - /// - /// The from the server containing the that was created. - /// This may differ slightly from what was passed in since the service may return back properties set to their default values. - /// - /// Thrown when is null. - /// Thrown when a failure is returned by the Search service. public virtual Response CreateOrUpdateSkillset( SearchIndexerSkillset skillset, bool onlyIfUnchanged = false, - bool? ignoreCacheResetRequirements = null, - bool? disableCacheReprocessingChangeDetection = null, CancellationToken cancellationToken = default) { // The REST client uses a different parameter name that would be confusing to reference. @@ -191,8 +127,6 @@ public virtual Response CreateOrUpdateSkillset( skillset, onlyIfUnchanged ? skillset?.ETag?.ToString() : null, null, - ignoreCacheResetRequirements, - disableCacheReprocessingChangeDetection, cancellationToken); } catch (Exception ex) @@ -217,74 +151,9 @@ public virtual Response CreateOrUpdateSkillset( /// /// Thrown when is null. /// Thrown when a failure is returned by the Search service. - [EditorBrowsable(EditorBrowsableState.Never)] -#pragma warning disable AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - public virtual async Task> CreateOrUpdateSkillsetAsync( -#pragma warning restore AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - SearchIndexerSkillset skillset, - bool onlyIfUnchanged, - CancellationToken cancellationToken) => await CreateOrUpdateSkillsetAsync( - skillset, - onlyIfUnchanged, - ignoreCacheResetRequirements: null, - disableCacheReprocessingChangeDetection: null, - cancellationToken). - ConfigureAwait(false); - - /// - /// Creates a new skillset or updates an existing skillset. - /// - /// Required. The to create or update. - /// - /// True to throw a if the does not match the current service version; - /// otherwise, the current service version will be overwritten. - /// - /// Ignores cache reset requirements. - /// Disables cache reprocessing change detection. - /// Optional to propagate notifications that the operation should be canceled. - /// - /// The from the server containing the that was created. - /// This may differ slightly from what was passed in since the service may return back properties set to their default values. - /// - /// Thrown when is null. - /// Thrown when a failure is returned by the Search service. - [EditorBrowsable(EditorBrowsableState.Never)] -#pragma warning disable AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - public virtual async Task> CreateOrUpdateSkillsetAsync( -#pragma warning restore AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - SearchIndexerSkillset skillset, - bool onlyIfUnchanged, - bool disableCacheReprocessingChangeDetection, - bool ignoreCacheResetRequirements, - CancellationToken cancellationToken) => await CreateOrUpdateSkillsetAsync( - skillset, - onlyIfUnchanged, - ignoreCacheResetRequirements, - disableCacheReprocessingChangeDetection, - cancellationToken).ConfigureAwait(false); - - /// - /// Creates a new skillset or updates an existing skillset. - /// - /// Required. The to create or update. - /// - /// True to throw a if the does not match the current service version; - /// otherwise, the current service version will be overwritten. - /// - /// Ignores cache reset requirements. - /// Disables cache reprocessing change detection. - /// Optional to propagate notifications that the operation should be canceled. - /// - /// The from the server containing the that was created. - /// This may differ slightly from what was passed in since the service may return back properties set to their default values. - /// - /// Thrown when is null. - /// Thrown when a failure is returned by the Search service. public virtual async Task> CreateOrUpdateSkillsetAsync( SearchIndexerSkillset skillset, bool onlyIfUnchanged = false, - bool? ignoreCacheResetRequirements = null, - bool? disableCacheReprocessingChangeDetection = null, CancellationToken cancellationToken = default) { // The REST client uses a different parameter name that would be confusing to reference. @@ -299,8 +168,6 @@ public virtual async Task> CreateOrUpdateSkillse skillset, onlyIfUnchanged ? skillset?.ETag?.ToString() : null, null, - ignoreCacheResetRequirements, - disableCacheReprocessingChangeDetection, cancellationToken) .ConfigureAwait(false); } @@ -620,55 +487,5 @@ public virtual async Task>> GetSkillsetNamesAsync throw; } } - - /// - /// Resets skills in an existing skillset in a search service. - /// - /// The name of the skillset to reset. - /// Options for the reset skills operation. - /// Optional to propagate notifications that the operation should be canceled. - /// A indicating the status of the operation. - public virtual Response ResetSkills( - string skillsetName, - ResetSkillsOptions resetSkillsOptions, - CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexerClient)}.{nameof(ResetSkills)}"); - scope.Start(); - try - { - return SkillsetsClient.ResetSkills(skillsetName, resetSkillsOptions, cancellationToken); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - - /// - /// Resets skills in an existing skillset in a search service. - /// - /// The name of the skillset to reset. - /// Options for the reset skills operation. - /// Optional to propagate notifications that the operation should be canceled. - /// A indicating the status of the operation. - public virtual async Task ResetSkillsAsync( - string skillsetName, - ResetSkillsOptions resetSkillsOptions, - CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexerClient)}.{nameof(ResetSkills)}"); - scope.Start(); - try - { - return await SkillsetsClient.ResetSkillsAsync(skillsetName, resetSkillsOptions, cancellationToken).ConfigureAwait(false); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } } } diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexerClient.cs b/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexerClient.cs index ca68395ea1a5c..3e2d460d368f3 100644 --- a/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexerClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexerClient.cs @@ -222,73 +222,9 @@ public virtual async Task> CreateIndexerAsync( /// /// Thrown when is null. /// Thrown when a failure is returned by the Search service. - [EditorBrowsable(EditorBrowsableState.Never)] -#pragma warning disable AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - public virtual Response CreateOrUpdateIndexer( -#pragma warning restore AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - SearchIndexer indexer, - bool onlyIfUnchanged, - CancellationToken cancellationToken) => CreateOrUpdateIndexer( - indexer, - onlyIfUnchanged, - ignoreCacheResetRequirements: null, - disableCacheReprocessingChangeDetection: null, - cancellationToken); - - /// - /// Creates a new indexer or updates an existing indexer. - /// - /// Required. The to create or update. - /// - /// True to throw a if the does not match the current service version; - /// otherwise, the current service version will be overwritten. - /// - /// Disables cache reprocessing change detection. - /// Ignores cache reset requirements. - /// Optional to propagate notifications that the operation should be canceled. - /// - /// The from the server containing the created. - /// This may differ slightly from what was passed into the service. - /// - /// Thrown when is null. - /// Thrown when a failure is returned by the Search service. - [EditorBrowsable(EditorBrowsableState.Never)] -#pragma warning disable AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - public virtual Response CreateOrUpdateIndexer( -#pragma warning restore AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - SearchIndexer indexer, - bool onlyIfUnchanged, - bool disableCacheReprocessingChangeDetection, - bool ignoreCacheResetRequirements, - CancellationToken cancellationToken) => CreateOrUpdateIndexer( - indexer, - onlyIfUnchanged, - ignoreCacheResetRequirements, - disableCacheReprocessingChangeDetection, - cancellationToken); - - /// - /// Creates a new indexer or updates an existing indexer. - /// - /// Required. The to create or update. - /// - /// True to throw a if the does not match the current service version; - /// otherwise, the current service version will be overwritten. - /// - /// Ignores cache reset requirements. - /// Disables cache reprocessing change detection. - /// Optional to propagate notifications that the operation should be canceled. - /// - /// The from the server containing the created. - /// This may differ slightly from what was passed into the service. - /// - /// Thrown when is null. - /// Thrown when a failure is returned by the Search service. public virtual Response CreateOrUpdateIndexer( SearchIndexer indexer, bool onlyIfUnchanged = false, - bool? ignoreCacheResetRequirements = null, - bool? disableCacheReprocessingChangeDetection = null, CancellationToken cancellationToken = default) { // The REST client uses a different parameter name that would be confusing to reference. @@ -303,8 +239,6 @@ public virtual Response CreateOrUpdateIndexer( indexer, onlyIfUnchanged ? indexer?.ETag?.ToString() : null, null, - ignoreCacheResetRequirements, - disableCacheReprocessingChangeDetection, cancellationToken); } catch (Exception ex) @@ -329,74 +263,9 @@ public virtual Response CreateOrUpdateIndexer( /// /// Thrown when is null. /// Thrown when a failure is returned by the Search service. - [EditorBrowsable(EditorBrowsableState.Never)] -#pragma warning disable AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - public virtual async Task> CreateOrUpdateIndexerAsync( -#pragma warning restore AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - SearchIndexer indexer, - bool onlyIfUnchanged, - CancellationToken cancellationToken) => await CreateOrUpdateIndexerAsync( - indexer, - onlyIfUnchanged, - ignoreCacheResetRequirements: null, - disableCacheReprocessingChangeDetection: null, - cancellationToken). - ConfigureAwait(false); - - /// - /// Creates a new indexer or updates an existing indexer. - /// - /// Required. The to create or update. - /// - /// True to throw a if the does not match the current service version; - /// otherwise, the current service version will be overwritten. - /// - /// Disables cache reprocessing change detection. - /// Ignores cache reset requirements. - /// Optional to propagate notifications that the operation should be canceled. - /// - /// The from the server containing the created. - /// This may differ slightly from what was passed into the service. - /// - /// Thrown when is null. - /// Thrown when a failure is returned by the Search service. - [EditorBrowsable(EditorBrowsableState.Never)] -#pragma warning disable AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - public virtual async Task> CreateOrUpdateIndexerAsync( -#pragma warning restore AZC0002 // DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken. - SearchIndexer indexer, - bool onlyIfUnchanged, - bool disableCacheReprocessingChangeDetection, - bool ignoreCacheResetRequirements, - CancellationToken cancellationToken) => await CreateOrUpdateIndexerAsync( - indexer, - onlyIfUnchanged, - ignoreCacheResetRequirements, - disableCacheReprocessingChangeDetection, - cancellationToken).ConfigureAwait(false); - - /// - /// Creates a new indexer or updates an existing indexer. - /// - /// Required. The to create or update. - /// - /// True to throw a if the does not match the current service version; - /// otherwise, the current service version will be overwritten. - /// - /// Ignores cache reset requirements. - /// Disables cache reprocessing change detection. - /// Optional to propagate notifications that the operation should be canceled. - /// - /// The from the server containing the created. - /// This may differ slightly from what was passed into the service. - /// - /// Thrown when is null. - /// Thrown when a failure is returned by the Search service. public virtual async Task> CreateOrUpdateIndexerAsync( SearchIndexer indexer, bool onlyIfUnchanged = false, - bool? ignoreCacheResetRequirements = null, - bool? disableCacheReprocessingChangeDetection = null, CancellationToken cancellationToken = default) { // The REST client uses a different parameter name that would be confusing to reference. @@ -411,8 +280,6 @@ public virtual async Task> CreateOrUpdateIndexerAsync( indexer, onlyIfUnchanged ? indexer?.ETag?.ToString() : null, null, - ignoreCacheResetRequirements, - disableCacheReprocessingChangeDetection, cancellationToken) .ConfigureAwait(false); } @@ -897,68 +764,5 @@ public virtual async Task RunIndexerAsync( throw; } } - - /// - /// Resets specific documents in the datasource to be selectively re-ingested by the indexer. - /// - /// The name of the indexer to reset documents for. - /// If false, keys or ids will be appended to existing ones. If true, only the keys or ids in this payload will be queued to be re-ingested. - /// The reset options to use. - /// Optional to propagate notifications that the operation should be canceled. - /// A representing the result of the asynchronous operation. - public virtual Response ResetDocuments( - string indexerName, - bool? overwrite = null, - ResetDocumentOptions resetDocumentOptions = null, - CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexerClient)}.{nameof(ResetDocuments)}"); - scope.Start(); - try - { - return IndexersClient.ResetDocs( - indexerName, - overwrite, - resetDocumentOptions, - cancellationToken); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } - - /// - /// Resets specific documents in the datasource to be selectively re-ingested by the indexer. - /// - /// The name of the indexer to reset documents for. - /// If false, keys or ids will be appended to existing ones. If true, only the keys or ids in this payload will be queued to be re-ingested. - /// The reset options to use. - /// Optional to propagate notifications that the operation should be canceled. - /// A representing the result of the asynchronous operation. - public virtual async Task ResetDocumentsAsync( - string indexerName, - bool? overwrite = null, - ResetDocumentOptions resetDocumentOptions = null, - CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexerClient)}.{nameof(ResetDocuments)}"); - scope.Start(); - try - { - return await IndexersClient.ResetDocsAsync( - indexerName, - overwrite, - resetDocumentOptions, - cancellationToken) - .ConfigureAwait(false); - } - catch (Exception ex) - { - scope.Failed(ex); - throw; - } - } } } diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/SimpleFieldAttribute.cs b/sdk/search/Azure.Search.Documents/src/Indexes/SimpleFieldAttribute.cs index eb9ba4d387fba..d48c027de2b49 100644 --- a/sdk/search/Azure.Search.Documents/src/Indexes/SimpleFieldAttribute.cs +++ b/sdk/search/Azure.Search.Documents/src/Indexes/SimpleFieldAttribute.cs @@ -50,14 +50,6 @@ public class SimpleFieldAttribute : Attribute, ISearchFieldAttribute /// public bool IsSortable { get; set; } - /// - /// The name of the normalizer to use for the field. - /// This option can be used only with fields with filterable, sortable, or facetable enabled. Once the normalizer is chosen, it cannot be changed for the field. - /// Must be null for complex fields. - /// - /// String values from LexicalAnalyzerName. - public string NormalizerName { get; set; } - /// void ISearchFieldAttribute.SetField(SearchField field) => SetField(field); @@ -76,11 +68,6 @@ private protected void SetField(SearchField field) // The service will return Searchable == false for all non-searchable simple types. field.IsSearchable = false; } - - if (NormalizerName != null) - { - field.NormalizerName = NormalizerName; - } } } } diff --git a/sdk/search/Azure.Search.Documents/src/Models/ResetDocumentOptions.cs b/sdk/search/Azure.Search.Documents/src/Models/ResetDocumentOptions.cs deleted file mode 100644 index dc9ae0af7d33c..0000000000000 --- a/sdk/search/Azure.Search.Documents/src/Models/ResetDocumentOptions.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.Search.Documents.Models -{ - [CodeGenModel("DocumentKeysOrIds")] - public partial class ResetDocumentOptions - { - /// DataSource document identifiers to be reset. - [CodeGenMember("DatasourceDocumentIds")] - public IList DataSourceDocumentIds { get; } - } -} diff --git a/sdk/search/Azure.Search.Documents/src/Models/SearchModelFactory.cs b/sdk/search/Azure.Search.Documents/src/Models/SearchModelFactory.cs index 5facdd630f772..00f2b57daccc1 100644 --- a/sdk/search/Azure.Search.Documents/src/Models/SearchModelFactory.cs +++ b/sdk/search/Azure.Search.Documents/src/Models/SearchModelFactory.cs @@ -82,7 +82,7 @@ public static IndexerExecutionResult IndexerExecutionResult( int failedItemCount, string initialTrackingState, string finalTrackingState) => - new IndexerExecutionResult(status, null, null, errorMessage, startTime, endTime, errors, warnings, itemCount, failedItemCount, initialTrackingState, finalTrackingState); + new IndexerExecutionResult(status, errorMessage, startTime, endTime, errors, warnings, itemCount, failedItemCount, initialTrackingState, finalTrackingState); /// Initializes a new instance of IndexerExecutionResult. /// The outcome of this indexer execution. @@ -112,7 +112,7 @@ public static IndexerExecutionResult IndexerExecutionResult( errors ??= new List(); warnings ??= new List(); - return new IndexerExecutionResult(status, null, null, errorMessage, startTime, endTime, errors?.ToList(), warnings?.ToList(), itemCount, failedItemCount, initialTrackingState, finalTrackingState); + return new IndexerExecutionResult(status, errorMessage, startTime, endTime, errors?.ToList(), warnings?.ToList(), itemCount, failedItemCount, initialTrackingState, finalTrackingState); } /// Initializes a new instance of LexicalAnalyzer. @@ -251,7 +251,7 @@ public static SearchServiceCounters SearchServiceCounters( SearchResourceCounter dataSourceCounter, SearchResourceCounter storageSizeCounter, SearchResourceCounter synonymMapCounter) => - new SearchServiceCounters(null, documentCounter, indexCounter, indexerCounter, dataSourceCounter, storageSizeCounter, synonymMapCounter, skillsetCounter: null, null); + new SearchServiceCounters(documentCounter, indexCounter, indexerCounter, dataSourceCounter, storageSizeCounter, synonymMapCounter, skillsetCounter: null, null); /// Initializes a new instance of SearchServiceCounters. /// Total number of documents across all indexes in the service. @@ -271,29 +271,7 @@ public static SearchServiceCounters SearchServiceCounters( SearchResourceCounter storageSizeCounter, SearchResourceCounter synonymMapCounter, SearchResourceCounter skillsetCounter) => - new SearchServiceCounters(null, documentCounter, indexCounter, indexerCounter, dataSourceCounter, storageSizeCounter, synonymMapCounter, skillsetCounter, null); - - // Initializes a new instance of SearchServiceCounters. - /// Total number of documents across all indexes in the service. - /// Total number of indexes. - /// Total number of indexers. - /// Total number of data sources. - /// Total size of used storage in bytes. - /// Total number of synonym maps. - /// Total number of skillsets. - /// Total memory consumption of all vector indexes within the service, in bytes. - /// A new instance for mocking. - [EditorBrowsable(EditorBrowsableState.Never)] - public static SearchServiceCounters SearchServiceCounters( - SearchResourceCounter documentCounter = null, - SearchResourceCounter indexCounter = null, - SearchResourceCounter indexerCounter = null, - SearchResourceCounter dataSourceCounter = null, - SearchResourceCounter storageSizeCounter = null, - SearchResourceCounter synonymMapCounter = null, - SearchResourceCounter skillsetCounter = null, - SearchResourceCounter vectorIndexSizeCounter = null) => - new SearchServiceCounters(null, documentCounter, indexCounter, indexerCounter, dataSourceCounter, storageSizeCounter, synonymMapCounter, skillsetCounter, vectorIndexSizeCounter); + new SearchServiceCounters(documentCounter, indexCounter, indexerCounter, dataSourceCounter, storageSizeCounter, synonymMapCounter, skillsetCounter, null); /// Initializes a new instance of SearchServiceLimits. /// The maximum allowed fields per index. @@ -397,54 +375,5 @@ public static IndexingResult IndexingResult( bool succeeded, int status) => new IndexingResult(key, errorMessage, succeeded, status); - - /// Initializes a new instance of IndexerState. - /// The mode the indexer is running in. - /// Change tracking state used when indexing starts on all documents in the datasource. - /// Change tracking state value when indexing finishes on all documents in the datasource. - /// Change tracking state used when indexing starts on select, reset documents in the datasource. - /// Change tracking state value when indexing finishes on select, reset documents in the datasource. - /// The list of document keys that have been reset. The document key is the document's unique identifier for the data in the search index. The indexer will prioritize selectively re-ingesting these keys. - /// The list of datasource document ids that have been reset. The datasource document id is the unique identifier for the data in the datasource. The indexer will prioritize selectively re-ingesting these ids. - /// A new instance for mocking. - public static IndexerState IndexerState( - IndexingMode? mode = null, - string allDocumentsInitialChangeTrackingState = null, - string allDocumentsFinalChangeTrackingState = null, - string resetDocumentsInitialChangeTrackingState = null, - string resetDocumentsFinalChangeTrackingState = null, - IEnumerable resetDocumentKeys = null, - IEnumerable resetDataSourceDocumentIds = null) - { - resetDocumentKeys ??= new List(); - resetDataSourceDocumentIds ??= new List(); - - return new IndexerState( - mode, - allDocumentsInitialChangeTrackingState, - allDocumentsFinalChangeTrackingState, - resetDocumentsInitialChangeTrackingState, - resetDocumentsFinalChangeTrackingState, - resetDocumentKeys?.ToList(), - resetDataSourceDocumentIds?.ToList()); - } - - /// - /// Initializes a new instance of the class. - /// - /// Change tracking state used when indexing starts on all documents in the datasource. - /// Change tracking state value when indexing finishes on all documents in the datasource. - /// Change tracking state used when indexing starts on select, reset documents in the datasource. - /// Change tracking state value when indexing finishes on select, reset documents in the datasource. - public static IndexerChangeTrackingState IndexerChangeTrackingState( - string allDocumentsInitialState, - string allDocumentsFinalState, - string resetDocumentsInitialState, - string resetDocumentsFinalState) => - new IndexerChangeTrackingState( - allDocumentsInitialState, - allDocumentsFinalState, - resetDocumentsInitialState, - resetDocumentsFinalState); } } diff --git a/sdk/search/Azure.Search.Documents/src/Models/SearchResult.cs b/sdk/search/Azure.Search.Documents/src/Models/SearchResult.cs index 22a85a0fb242c..ac57a07b7d8bb 100644 --- a/sdk/search/Azure.Search.Documents/src/Models/SearchResult.cs +++ b/sdk/search/Azure.Search.Documents/src/Models/SearchResult.cs @@ -46,11 +46,6 @@ public class SearchResult /// public SemanticSearchResult SemanticSearch { get; internal set; } - /// - /// Contains debugging information that can be used to further explore your search results. - /// - public IList DocumentDebugInfo { get; internal set; } - /// /// The document found by the search query. /// @@ -124,16 +119,6 @@ internal static async Task> DeserializeAsync( } result.SemanticSearch.Captions = captionResults; } - else if (prop.NameEquals(Constants.SearchDocumentDebugInfoKeyJson.EncodedUtf8Bytes) && - prop.Value.ValueKind != JsonValueKind.Null) - { - result.DocumentDebugInfo = new List(); - - foreach (JsonElement documentDebugInfoValue in prop.Value.EnumerateArray()) - { - result.DocumentDebugInfo.Add(Models.DocumentDebugInfo.DeserializeDocumentDebugInfo(documentDebugInfoValue)); - } - } } // Deserialize the model diff --git a/sdk/search/Azure.Search.Documents/src/Options/SearchOptions.cs b/sdk/search/Azure.Search.Documents/src/Options/SearchOptions.cs index 805bb24b1898d..468911de3f93f 100644 --- a/sdk/search/Azure.Search.Documents/src/Options/SearchOptions.cs +++ b/sdk/search/Azure.Search.Documents/src/Options/SearchOptions.cs @@ -33,30 +33,25 @@ public partial class SearchOptions /// A value to be used to create a sticky session, which can help getting more consistent results. As long as the same sessionId is used, a best-effort attempt will be made to target the same replica set. Be wary that reusing the same sessionID values repeatedly can interfere with the load balancing of the requests across replicas and adversely affect the performance of the search service. The value used as sessionId cannot start with a '_' character. /// The list of parameter values to be used in scoring functions (for example, referencePointParameter) using the format name-values. For example, if the scoring profile defines a function with a parameter called 'mylocation' the parameter string would be "mylocation--122.2,44.8" (without the quotes). /// The name of a scoring profile to evaluate match scores for matching documents in order to sort the results. - /// Allows setting a separate search query that will be solely used for semantic reranking, semantic captions and semantic answers. Is useful for scenarios where there is a need to use different queries between the base retrieval and ranking phase, and the L2 semantic phase. - /// The name of a semantic configuration that will be used when processing documents for queries of type semantic. - /// Allows the user to choose whether a semantic call should fail completely, or to return partial results (default). - /// Allows the user to set an upper bound on the amount of time it takes for semantic enrichment to finish processing before the request fails. - /// Enables a debugging tool that can be used to further explore your reranked results. /// A full-text search query expression; Use "*" or omit this parameter to match all documents. /// The comma-separated list of field names to which to scope the full-text search. When using fielded search (fieldName:searchExpression) in a full Lucene query, the field names of each fielded search expression take precedence over any field names listed in this parameter. /// A value that specifies whether any or all of the search terms must be matched in order to count the document as a match. - /// A value that specifies the language of the search query. - /// A value that specified the type of the speller to use to spell-correct individual search query terms. - /// A value that specifies whether answers should be returned as part of the search response. /// The comma-separated list of fields to retrieve. If unspecified, all fields marked as retrievable in the schema are included. /// The number of search results to skip. This value cannot be greater than 100,000. If you need to scan documents in sequence, but cannot use skip due to this limitation, consider using orderby on a totally-ordered key and filter with a range query instead. /// The number of search results to retrieve. This can be used in conjunction with $skip to implement client-side paging of search results. If results are truncated due to server-side paging, the response will include a continuation token that can be used to issue another Search request for the next page of results. + /// The name of a semantic configuration that will be used when processing documents for queries of type semantic. + /// Allows the user to choose whether a semantic call should fail completely (default / current behavior), or to return partial results. + /// Allows the user to set an upper bound on the amount of time it takes for semantic enrichment to finish processing before the request fails. + /// Allows setting a separate search query that will be solely used for semantic reranking, semantic captions and semantic answers. Is useful for scenarios where there is a need to use different queries between the base retrieval and ranking phase, and the L2 semantic phase. + /// A value that specifies whether answers should be returned as part of the search response. /// A value that specifies whether captions should be returned as part of the search response. - /// The comma-separated list of field names used for semantic ranking. /// /// The query parameters for vector and hybrid search queries. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . + /// The available derived classes include and . /// - /// Determines whether or not filters are applied before or after the vector search is performed. Default is 'preFilter'. - /// The query parameters to configure hybrid search behaviors. - internal SearchOptions(bool? includeTotalCount, IList facets, string filter, string highlightFieldsRaw, string highlightPostTag, string highlightPreTag, double? minimumCoverage, string orderByRaw, SearchQueryType? queryType, ScoringStatistics? scoringStatistics, string sessionId, IList scoringParameters, string scoringProfile, string semanticQuery, string semanticConfigurationName, SemanticErrorMode? semanticErrorMode, int? semanticMaxWaitInMilliseconds, QueryDebugMode? debug, string searchText, string searchFieldsRaw, SearchMode? searchMode, QueryLanguage? queryLanguage, QuerySpellerType? querySpeller, string queryAnswerRaw, string selectRaw, int? skip, int? size, string queryCaptionRaw, string semanticFieldsRaw, IList vectorQueries, VectorFilterMode? filterMode, HybridSearch hybridSearch) + /// Determines whether or not filters are applied before or after the vector search is performed. Default is 'preFilter' for new indexes. + internal SearchOptions(bool? includeTotalCount, IList facets, string filter, string highlightFieldsRaw, string highlightPostTag, string highlightPreTag, double? minimumCoverage, string orderByRaw, SearchQueryType? queryType, ScoringStatistics? scoringStatistics, string sessionId, IList scoringParameters, string scoringProfile, string searchText, string searchFieldsRaw, SearchMode? searchMode, string selectRaw, int? skip, int? size, string semanticConfigurationName, SemanticErrorMode? semanticErrorMode, int? semanticMaxWaitInMilliseconds, string semanticQuery, string queryAnswerRaw, string queryCaptionRaw, IList vectorQueries, VectorFilterMode? filterMode) { IncludeTotalCount = includeTotalCount; Facets = facets; @@ -77,10 +72,8 @@ internal SearchOptions(bool? includeTotalCount, IList facets, string fil SelectRaw = selectRaw; Skip = skip; Size = size; - QueryLanguage = queryLanguage; - QuerySpeller = querySpeller; - SemanticSearch = (semanticConfigurationName != null || semanticErrorMode != null || semanticMaxWaitInMilliseconds != null || queryAnswerRaw != null || queryCaptionRaw != null || semanticQuery != null || semanticFieldsRaw != null || debug != null) ? new SemanticSearchOptions() : null; + SemanticSearch = (semanticConfigurationName != null || semanticErrorMode != null || semanticMaxWaitInMilliseconds != null || queryAnswerRaw != null || queryCaptionRaw != null || semanticQuery != null) ? new SemanticSearchOptions() : null; if (SemanticSearch != null) { SemanticSearch.QueryAnswer = queryAnswerRaw != null ? new QueryAnswer() : null; @@ -92,13 +85,10 @@ internal SearchOptions(bool? includeTotalCount, IList facets, string fil QueryAnswerRaw = queryAnswerRaw; QueryCaptionRaw = queryCaptionRaw; SemanticQuery = semanticQuery; - SemanticFieldsRaw = semanticFieldsRaw; - Debug = debug; VectorSearch = (vectorQueries != null || filterMode != null) ? new VectorSearchOptions() : null; VectorQueries = vectorQueries; FilterMode = filterMode; - HybridSearch = hybridSearch; } /// @@ -240,14 +230,6 @@ internal string OrderByRaw [CodeGenMember("ScoringParameters")] public IList ScoringParameters { get; internal set; } = new List(); - /// A value that specifies the language of the search query. - [CodeGenMember("QueryLanguage")] - public QueryLanguage? QueryLanguage { get; set; } - - /// A value that specifies the type of the speller to use to spell-correct individual search query terms. - [CodeGenMember("Speller")] - public QuerySpellerType? QuerySpeller { get; set; } - /// Options for performing Semantic Search. public SemanticSearchOptions SemanticSearch { get; set; } @@ -296,20 +278,6 @@ private string QueryCaptionRaw } } - /// The comma-separated list of field names used for semantic ranking. - [CodeGenMember("SemanticFields")] - private string SemanticFieldsRaw - { - get { return SemanticSearch?.SemanticFieldsRaw; } - set - { - if (SemanticSearch != null) - { - SemanticSearch.SemanticFieldsRaw = value; - } - } - } - /// Allows setting a separate search query that will be solely used for semantic reranking, semantic captions and semantic answers. Is useful for scenarios where there is a need to use different queries between the base retrieval and ranking phase, and the L2 semantic phase. [CodeGenMember("SemanticQuery")] private string SemanticQuery @@ -324,20 +292,6 @@ private string SemanticQuery } } - /// Enables a debugging tool that can be used to further explore your reranked results. - [CodeGenMember("Debug")] - private QueryDebugMode? Debug - { - get { return SemanticSearch?.Debug; } - set - { - if (SemanticSearch != null) - { - SemanticSearch.Debug = value; - } - } - } - /// Allows the user to choose whether a semantic call should fail completely (default / current behavior), or to return partial results. [CodeGenMember("SemanticErrorHandling")] private SemanticErrorMode? SemanticErrorMode @@ -424,8 +378,6 @@ private static void Copy(SearchOptions source, SearchOptions destination) destination.SessionId = source.SessionId; destination.Size = source.Size; destination.Skip = source.Skip; - destination.QueryLanguage = source.QueryLanguage; - destination.QuerySpeller = source.QuerySpeller; destination.SemanticSearch = source.SemanticSearch; destination.VectorSearch = source.VectorSearch; } diff --git a/sdk/search/Azure.Search.Documents/src/Options/SemanticSearchOptions.cs b/sdk/search/Azure.Search.Documents/src/Options/SemanticSearchOptions.cs index 58950ebd7bf95..bdcde49c97ec3 100644 --- a/sdk/search/Azure.Search.Documents/src/Options/SemanticSearchOptions.cs +++ b/sdk/search/Azure.Search.Documents/src/Options/SemanticSearchOptions.cs @@ -31,22 +31,9 @@ public partial class SemanticSearchOptions /// public QueryCaption QueryCaption { get; set; } - /// The list of field names used for semantic search. - public IList SemanticFields { get; internal set; } = new List(); - - /// Join SemanticFields so it can be sent as a comma-separated string. - internal string SemanticFieldsRaw - { - get => SemanticFields.CommaJoin(); - set => SemanticFields = SearchExtensions.CommaSplit(value); - } - /// Allows setting a separate search query that will be solely used for semantic reranking, semantic captions and semantic answers. Is useful for scenarios where there is a need to use different queries between the base retrieval and ranking phase, and the L2 semantic phase. public string SemanticQuery { get; set; } - /// Enables a debugging tool that can be used to further explore your reranked results. - public QueryDebugMode? Debug { get; set; } - /// Allows the user to choose whether a semantic call should fail completely (default / current behavior), or to return partial results. public SemanticErrorMode? ErrorMode { get; set; } diff --git a/sdk/search/Azure.Search.Documents/src/SearchClientBuilderExtensions.cs b/sdk/search/Azure.Search.Documents/src/SearchClientBuilderExtensions.cs index f7638a9de0cf2..307727734f5cf 100644 --- a/sdk/search/Azure.Search.Documents/src/SearchClientBuilderExtensions.cs +++ b/sdk/search/Azure.Search.Documents/src/SearchClientBuilderExtensions.cs @@ -105,5 +105,48 @@ public static IAzureClientBuilder AddSea TConfiguration configuration) where TBuilder : IAzureClientFactoryBuilderWithConfiguration => builder.RegisterClientFactory(configuration); + + /// + /// Registers a instance with the + /// provided and . + /// + /// Type of the client factory builder. + /// The client factory builder. + /// + /// Required. The URI endpoint of the Search Service. This is likely + /// to be similar to "https://{search_service}.search.windows.net". + /// The URI must use HTTPS. + /// + /// + /// Required. The API key credential used to authenticate requests + /// against the search service. You need to use an admin key to + /// modify the documents in a Search Index. See + /// Create and manage api-keys for an Azure Cognitive Search service + /// for more information about API keys in Azure Cognitive Search. + /// + /// An Azure client builder. + public static IAzureClientBuilder AddSearchIndexerClient( + this TBuilder builder, + Uri endpoint, + AzureKeyCredential credential) + where TBuilder : IAzureClientFactoryBuilder => + builder.RegisterClientFactory( + options => new SearchIndexerClient(endpoint, credential, options)); + + /// + /// Registers a instance with connection + /// options loaded from the provided + /// instance. + /// + /// Type of the client factory builder. + /// Type of the configuration. + /// The client factory builder. + /// The client configuration. + /// An Azure client builder. + public static IAzureClientBuilder AddSearchIndexerClient( + this TBuilder builder, + TConfiguration configuration) + where TBuilder : IAzureClientFactoryBuilderWithConfiguration => + builder.RegisterClientFactory(configuration); } } diff --git a/sdk/search/Azure.Search.Documents/src/SearchClientOptions.cs b/sdk/search/Azure.Search.Documents/src/SearchClientOptions.cs index 8443de3765e50..0c831e73c7c99 100644 --- a/sdk/search/Azure.Search.Documents/src/SearchClientOptions.cs +++ b/sdk/search/Azure.Search.Documents/src/SearchClientOptions.cs @@ -27,26 +27,26 @@ public enum ServiceVersion { #pragma warning disable CA1707 // Identifiers should not contain underscores /// - /// The 2020_06_30 version of the Azure Cognitive Search service. + /// The 2020-06-30 version of the Azure Cognitive Search service. /// V2020_06_30 = 1, /// - /// The 2023_11_01 version of the Azure Cognitive Search service. + /// The 2023-11-01 version of the Azure Cognitive Search service. /// V2023_11_01 = 2, /// - /// The 2024_05_01_preview version of the Azure Cognitive Search service. + /// The 2024-07-01 version of the Azure Cognitive Search service. /// - V2024_05_01_Preview = 3, + V2024_07_01 = 3, #pragma warning restore CA1707 } /// /// The Latest service version supported by this client library. /// - internal const ServiceVersion LatestVersion = ServiceVersion.V2024_05_01_Preview; + internal const ServiceVersion LatestVersion = ServiceVersion.V2024_07_01; /// /// The service version to use when creating continuation tokens that @@ -200,7 +200,7 @@ public static SearchClientOptions.ServiceVersion Validate(this SearchClientOptio { SearchClientOptions.ServiceVersion.V2020_06_30 => version, SearchClientOptions.ServiceVersion.V2023_11_01 => version, - SearchClientOptions.ServiceVersion.V2024_05_01_Preview => version, + SearchClientOptions.ServiceVersion.V2024_07_01 => version, _ => throw CreateInvalidVersionException(version) }; @@ -224,7 +224,7 @@ public static string ToVersionString(this SearchClientOptions.ServiceVersion ver { SearchClientOptions.ServiceVersion.V2020_06_30 => "2020-06-30", SearchClientOptions.ServiceVersion.V2023_11_01 => "2023-11-01", - SearchClientOptions.ServiceVersion.V2024_05_01_Preview => "2024-05-01-preview", + SearchClientOptions.ServiceVersion.V2024_07_01 => "2024-07-01", _ => throw CreateInvalidVersionException(version) }; diff --git a/sdk/search/Azure.Search.Documents/src/Utilities/Constants.cs b/sdk/search/Azure.Search.Documents/src/Utilities/Constants.cs index 2248966f2278b..1b7b4f7f2f04e 100644 --- a/sdk/search/Azure.Search.Documents/src/Utilities/Constants.cs +++ b/sdk/search/Azure.Search.Documents/src/Utilities/Constants.cs @@ -96,11 +96,6 @@ internal static class Constants /// public static readonly JsonEncodedText SearchCaptionsKeyJson = JsonEncodedText.Encode("@search.captions"); - /// - /// The @search.captions key. - /// - public static readonly JsonEncodedText SearchDocumentDebugInfoKeyJson = JsonEncodedText.Encode("@search.documentDebugInfo"); - /// /// The @search.action key. /// diff --git a/sdk/search/Azure.Search.Documents/src/autorest.md b/sdk/search/Azure.Search.Documents/src/autorest.md index fd26a59f9434b..266b5d2ebaab2 100644 --- a/sdk/search/Azure.Search.Documents/src/autorest.md +++ b/sdk/search/Azure.Search.Documents/src/autorest.md @@ -11,8 +11,8 @@ See the [Contributing guidelines](https://github.com/Azure/azure-sdk-for-net/blo ```yaml title: SearchServiceClient input-file: - - https://github.com/Azure/azure-rest-api-specs/blob/5a1fe448805429403c38a2637ee32c82ba755530/specification/search/data-plane/Azure.Search/preview/2024-05-01-preview/searchindex.json - - https://github.com/Azure/azure-rest-api-specs/blob/5a1fe448805429403c38a2637ee32c82ba755530/specification/search/data-plane/Azure.Search/preview/2024-05-01-preview/searchservice.json + - https://github.com/Azure/azure-rest-api-specs/blob/dc27f9b32787533cd4d07fe0de5245f2f8354dbe/specification/search/data-plane/Azure.Search/stable/2024-07-01/searchindex.json + - https://github.com/Azure/azure-rest-api-specs/blob/dc27f9b32787533cd4d07fe0de5245f2f8354dbe/specification/search/data-plane/Azure.Search/stable/2024-07-01/searchservice.json generation1-convenience-client: true deserialize-null-collection-as-null-value: true ``` @@ -81,6 +81,41 @@ directive: $.additionalProperties = true; ``` +### Archboard feedback for 2024-07-01 + +```yaml +directive: +- from: "searchservice.json" + where: $.definitions + transform: > + $.AzureOpenAIParameters["x-ms-client-name"] = "AzureOpenAIVectorizerParameters"; + $.AzureOpenAIParameters.properties.authIdentity["x-ms-client-name"] = "AuthenticationIdentity"; + $.AzureOpenAIParameters.properties.resourceUri["x-ms-client-name"] = "resourceUri"; + + $.VectorSearchVectorizer.properties.name["x-ms-client-name"] = "VectorizerName"; + $.AzureOpenAIVectorizer.properties.azureOpenAIParameters["x-ms-client-name"] = "Parameters"; + + $.ScalarQuantizationVectorSearchCompressionConfiguration["x-ms-client-name"] = "ScalarQuantizationCompression"; + $.BinaryQuantizationVectorSearchCompressionConfiguration["x-ms-client-name"] = "BinaryQuantizationCompression"; + $.VectorSearchCompressionConfiguration["x-ms-client-name"] = "VectorSearchCompression"; + $.VectorSearchCompressionConfiguration.properties.name["x-ms-client-name"] = "CompressionName"; + $.VectorSearchProfile.properties.compression["x-ms-client-name"] = "CompressionName"; + + $.OcrSkillLineEnding["x-ms-client-name"] = "OcrLineEnding"; + $.OcrSkillLineEnding["x-ms-enum"].name = "OcrLineEnding"; + + $.SearchIndexerDataUserAssignedIdentity.properties.userAssignedIdentity["x-ms-format"] = "arm-id"; + $.SearchIndexerIndexProjections["x-ms-client-name"] = "SearchIndexerIndexProjection"; + $.SearchIndexerSkillset.properties.indexProjections["x-ms-client-name"] = "indexProjection"; + + $.VectorSearchCompressionTargetDataType["x-ms-client-name"] = "VectorSearchCompressionTarget"; + $.VectorSearchCompressionTargetDataType["x-ms-enum"].name = "VectorSearchCompressionTarget"; + + $.WebApiVectorizer.properties.customWebApiParameters["x-ms-client-name"] = "Parameters"; + $.WebApiParameters["x-ms-client-name"] = "WebApiVectorizerParameters"; + $.WebApiParameters.properties.uri["x-ms-client-name"] = "uri"; +``` + ### Change VectorizableImageUrlQuery.Url type to Uri ```yaml diff --git a/sdk/search/Azure.Search.Documents/tests/DocumentOperations/SearchTests.cs b/sdk/search/Azure.Search.Documents/tests/DocumentOperations/SearchTests.cs index f12f7aa34d9b4..9d298c507f863 100644 --- a/sdk/search/Azure.Search.Documents/tests/DocumentOperations/SearchTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/DocumentOperations/SearchTests.cs @@ -237,23 +237,6 @@ await AssertKeysEqual( "1", "5"); } - [Test] - public async Task TestNormalizer() - { - await using SearchResources resources = await SearchResources.GetSharedHotelsIndexAsync(this); - Response> response = - await resources.GetQueryClient().SearchAsync( - null, - new SearchOptions - { - Filter = "address/city eq 'New york'" - }); - await AssertKeysEqual( - response, - h => h.Document.HotelId, - "5", "9"); - } - [Test] public async Task HitHighlighting() { diff --git a/sdk/search/Azure.Search.Documents/tests/DocumentOperations/VectorSearchTests.cs b/sdk/search/Azure.Search.Documents/tests/DocumentOperations/VectorSearchTests.cs index add1a5626c76a..b6c0900f25bb6 100644 --- a/sdk/search/Azure.Search.Documents/tests/DocumentOperations/VectorSearchTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/DocumentOperations/VectorSearchTests.cs @@ -13,7 +13,6 @@ namespace Azure.Search.Documents.Tests { - [ClientTestFixture(SearchClientOptions.ServiceVersion.V2023_11_01, SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public partial class VectorSearchTests : SearchTestBase { public VectorSearchTests(bool async, SearchClientOptions.ServiceVersion serviceVersion) @@ -103,7 +102,6 @@ await AssertKeysEqual( } [Test] - [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] [PlaybackOnly("The availability of Semantic Search is limited to specific regions, as indicated in the list provided here: https://azure.microsoft.com/explore/global-infrastructure/products-by-region/?products=search. Due to this limitation, the deployment of resources for weekly test pipeline for setting the \"semanticSearch\": \"free\" fails in the UsGov and China cloud regions.")] public async Task SemanticHybridSearch() { @@ -129,7 +127,6 @@ public async Task SemanticHybridSearch() }, QueryType = SearchQueryType.Semantic, Select = { "hotelId", "hotelName", "description", "category" }, - QueryLanguage = QueryLanguage.EnUs }); Assert.NotNull(response.SemanticSearch.Answers); @@ -239,7 +236,6 @@ public async Task UpdateExistingIndexToAddVectorFields() } [Test] - [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public async Task UpdatingVectorProfileNameThrows() { await using SearchResources resources = SearchResources.CreateWithNoIndexes(this); @@ -316,7 +312,6 @@ public async Task CanContinueWithNextPage() } [Test] - [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public async Task VectorFieldNotStoredNotHiddenThrows() { await using SearchResources resources = SearchResources.CreateWithNoIndexes(this); @@ -354,7 +349,6 @@ public async Task VectorFieldNotStoredNotHiddenThrows() } [Test] - [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public async Task VectorFieldStoredNotHidden() { await using SearchResources resources = SearchResources.CreateWithNoIndexes(this); @@ -391,7 +385,6 @@ public async Task VectorFieldStoredNotHidden() } [Test] - [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public async Task VectorFieldStoredAndHidden() { await using SearchResources resources = SearchResources.CreateWithNoIndexes(this); @@ -428,7 +421,6 @@ public async Task VectorFieldStoredAndHidden() } [Test] - [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public async Task CannotUpdateIsStoredAfterIndexCreation() { await using SearchResources resources = SearchResources.CreateWithNoIndexes(this); @@ -472,7 +464,6 @@ public async Task CannotUpdateIsStoredAfterIndexCreation() } [Test] - [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public async Task CanUpdateIsHiddenAfterIndexCreation() { await using SearchResources resources = SearchResources.CreateWithNoIndexes(this); @@ -513,7 +504,6 @@ public async Task CanUpdateIsHiddenAfterIndexCreation() } [Test] - [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public async Task CreateIndexUsingFieldBuilder() { await using SearchResources resources = SearchResources.CreateWithNoIndexes(this); diff --git a/sdk/search/Azure.Search.Documents/tests/FieldBuilderTests.cs b/sdk/search/Azure.Search.Documents/tests/FieldBuilderTests.cs index 8f9b2408ec83c..bd3a647b1e08b 100644 --- a/sdk/search/Azure.Search.Documents/tests/FieldBuilderTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/FieldBuilderTests.cs @@ -232,7 +232,6 @@ public void ReportsIsSearchableOnlyOnPropertiesWithIsSearchableAttribute(Type mo fields.OnlyTrueFor( field => field.IsSearchable.GetValueOrDefault(false), nameof(ReflectableModel.Text), - nameof(ReflectableModel.TextWithNormalizer), nameof(ReflectableModel.MoreText), nameof(ReflectableModel.Complex) + "/" + nameof(ReflectableComplexObject.Name), nameof(ReflectableModel.Complex) + "/" + nameof(ReflectableComplexObject.Address) + "/" + nameof(ReflectableAddress.City), @@ -264,7 +263,6 @@ public void IsFilterableOnlyOnPropertiesWithIsFilterableAttribute(Type modelType fields.OnlyTrueFor( field => field.IsFilterable.GetValueOrDefault(false), nameof(ReflectableModel.FilterableText), - nameof(ReflectableModel.TextWithNormalizer), nameof(ReflectableModel.Complex) + "/" + nameof(ReflectableComplexObject.Rating), nameof(ReflectableModel.Complex) + "/" + nameof(ReflectableComplexObject.Address) + "/" + nameof(ReflectableAddress.Country), nameof(ReflectableModel.ComplexArray) + "/" + nameof(ReflectableComplexObject.Rating), @@ -345,15 +343,6 @@ public void IndexAnalyzerSetOnlyOnPropertiesWithIndexAnalyzerAttribute(Type mode nameof(ReflectableModel.TextWithIndexAnalyzer)); } - [TestCaseSource(nameof(TestModelTypeTestData))] - public void NormalizerSetOnlyOnPropertiesWithNormalizerAttribute(Type modelType) - { - var fields = new FieldMap(BuildForType(modelType)); - fields.OnlyTrueFor( - field => field.NormalizerName == LexicalNormalizerName.Lowercase, - nameof(ReflectableModel.TextWithNormalizer)); - } - [TestCaseSource(nameof(TestModelTypeTestData))] public void SynonymMapsSetOnlyOnPropertiesWithSynonymMapsAttribute(Type modelType) { diff --git a/sdk/search/Azure.Search.Documents/tests/Models/DataSourceTests.cs b/sdk/search/Azure.Search.Documents/tests/Models/DataSourceTests.cs index 37d687c9f8b9f..5edcbc97f2bd7 100644 --- a/sdk/search/Azure.Search.Documents/tests/Models/DataSourceTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/Models/DataSourceTests.cs @@ -13,7 +13,7 @@ public class DataSourceTests [TestCase("\"0123abcd\"", "\"0123abcd\"")] public void ParsesETag(string value, string expected) { - SearchIndexerDataSourceConnection sut = new(null, null, SearchIndexerDataSourceType.AzureBlob, null, null, null, null, null, value, null); + SearchIndexerDataSourceConnection sut = new(null, null, SearchIndexerDataSourceType.AzureBlob, null, null, null, null, value, null); Assert.AreEqual(expected, sut.ETag?.ToString()); } } diff --git a/sdk/search/Azure.Search.Documents/tests/Models/ReflectableModel.cs b/sdk/search/Azure.Search.Documents/tests/Models/ReflectableModel.cs index 86192ebbac9c0..bf68a4154f556 100644 --- a/sdk/search/Azure.Search.Documents/tests/Models/ReflectableModel.cs +++ b/sdk/search/Azure.Search.Documents/tests/Models/ReflectableModel.cs @@ -99,9 +99,6 @@ public class ReflectableModel [SearchableField(IndexAnalyzerName = LexicalAnalyzerName.Values.Whitespace)] public string TextWithIndexAnalyzer { get; set; } - [SearchableField(IsFilterable = true, NormalizerName = LexicalNormalizerName.Values.Lowercase)] - public string TextWithNormalizer { get; set; } - public string[] StringArray { get; set; } public IList StringIList { get; set; } diff --git a/sdk/search/Azure.Search.Documents/tests/Models/SearchIndexTests.cs b/sdk/search/Azure.Search.Documents/tests/Models/SearchIndexTests.cs index b71ad556d129f..aa26a4fb6163c 100644 --- a/sdk/search/Azure.Search.Documents/tests/Models/SearchIndexTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/Models/SearchIndexTests.cs @@ -14,7 +14,7 @@ public class SearchIndexTests [TestCase("\"0123abcd\"", "\"0123abcd\"")] public void ParsesETag(string value, string expected) { - SearchIndex sut = new SearchIndex(null, new SearchField[0], null, null, null, null, null, null, null, null, null, null, null, null, null, value); + SearchIndex sut = new SearchIndex(null, new SearchField[0], null, null, null, null, null, null, null, null, null, null, null, null, value); Assert.AreEqual(expected, sut.ETag?.ToString()); } diff --git a/sdk/search/Azure.Search.Documents/tests/Models/SearchIndexerTests.cs b/sdk/search/Azure.Search.Documents/tests/Models/SearchIndexerTests.cs index dfdda90105cd2..d67a5623ae91f 100644 --- a/sdk/search/Azure.Search.Documents/tests/Models/SearchIndexerTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/Models/SearchIndexerTests.cs @@ -13,7 +13,7 @@ public class SearchIndexerTests [TestCase("\"0123abcd\"", "\"0123abcd\"")] public void ParsesETag(string value, string expected) { - SearchIndexer sut = new SearchIndexer(null, null, null, null, null, null, null, null, null, null, value, null, null); + SearchIndexer sut = new SearchIndexer(null, null, null, null, null, null, null, null, null, null, value, null); Assert.AreEqual(expected, sut.ETag?.ToString()); } } diff --git a/sdk/search/Azure.Search.Documents/tests/Models/SkillsetTests.cs b/sdk/search/Azure.Search.Documents/tests/Models/SkillsetTests.cs index a6e64f5997c36..b39e74fec8c1b 100644 --- a/sdk/search/Azure.Search.Documents/tests/Models/SkillsetTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/Models/SkillsetTests.cs @@ -13,7 +13,7 @@ public class SkillsetTests [TestCase("\"0123abcd\"", "\"0123abcd\"")] public void ParsesETag(string value, string expected) { - SearchIndexerSkillset sut = new(name: null, description: null, skills: null, cognitiveServicesAccount: null, knowledgeStore: null, indexProjections: null, etag: value, encryptionKey: null); + SearchIndexerSkillset sut = new(name: null, description: null, skills: null, cognitiveServicesAccount: null, knowledgeStore: null, indexProjection: null, etag: value, encryptionKey: null); Assert.AreEqual(expected, sut.ETag?.ToString()); } diff --git a/sdk/search/Azure.Search.Documents/tests/Samples/Sample01_HelloWorld.cs b/sdk/search/Azure.Search.Documents/tests/Samples/Sample01_HelloWorld.cs index 958ea8f989572..89654f97e1551 100644 --- a/sdk/search/Azure.Search.Documents/tests/Samples/Sample01_HelloWorld.cs +++ b/sdk/search/Azure.Search.Documents/tests/Samples/Sample01_HelloWorld.cs @@ -18,7 +18,6 @@ namespace Azure.Search.Documents.Tests.Samples { - [ClientTestFixture(SearchClientOptions.ServiceVersion.V2024_05_01_Preview), ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public partial class HelloWorld : SearchTestBase { public HelloWorld(bool async, SearchClientOptions.ServiceVersion serviceVersion) diff --git a/sdk/search/Azure.Search.Documents/tests/Samples/Sample04_FieldBuilderIgnore.cs b/sdk/search/Azure.Search.Documents/tests/Samples/Sample04_FieldBuilderIgnore.cs index ba331de858860..fda9173f5f189 100644 --- a/sdk/search/Azure.Search.Documents/tests/Samples/Sample04_FieldBuilderIgnore.cs +++ b/sdk/search/Azure.Search.Documents/tests/Samples/Sample04_FieldBuilderIgnore.cs @@ -76,7 +76,6 @@ public async Task CreateIndex() SearchableField genreField = new SearchableField("genre") { AnalyzerName = LexicalAnalyzerName.Values.EnLucene, - NormalizerName = LexicalNormalizerName.Lowercase, IsFacetable = true, IsFilterable = true }; diff --git a/sdk/search/Azure.Search.Documents/tests/Samples/Sample07_VectorSearch_SemanticHybridSearch.cs b/sdk/search/Azure.Search.Documents/tests/Samples/Sample07_VectorSearch_SemanticHybridSearch.cs index 7970bf72d50ea..6865ce47dedac 100644 --- a/sdk/search/Azure.Search.Documents/tests/Samples/Sample07_VectorSearch_SemanticHybridSearch.cs +++ b/sdk/search/Azure.Search.Documents/tests/Samples/Sample07_VectorSearch_SemanticHybridSearch.cs @@ -13,7 +13,6 @@ namespace Azure.Search.Documents.Tests.Samples.VectorSearch { - [ClientTestFixture(SearchClientOptions.ServiceVersion.V2024_05_01_Preview), ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public partial class VectorSemanticHybridSearch : SearchTestBase { public VectorSemanticHybridSearch(bool async, SearchClientOptions.ServiceVersion serviceVersion) @@ -58,7 +57,6 @@ public async Task SemanticHybridSearch() QueryCaption = new(QueryCaptionType.Extractive), QueryAnswer = new(QueryAnswerType.Extractive) }, - QueryLanguage = QueryLanguage.EnUs, QueryType = SearchQueryType.Semantic, }); diff --git a/sdk/search/Azure.Search.Documents/tests/Samples/Sample07_VectorSearch_UsingFieldBuilder.cs b/sdk/search/Azure.Search.Documents/tests/Samples/Sample07_VectorSearch_UsingFieldBuilder.cs index 7e1d1863870eb..4cb3e27978708 100644 --- a/sdk/search/Azure.Search.Documents/tests/Samples/Sample07_VectorSearch_UsingFieldBuilder.cs +++ b/sdk/search/Azure.Search.Documents/tests/Samples/Sample07_VectorSearch_UsingFieldBuilder.cs @@ -11,7 +11,6 @@ namespace Azure.Search.Documents.Tests.Samples.VectorSearch { - [ClientTestFixture(SearchClientOptions.ServiceVersion.V2024_05_01_Preview), ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public partial class VectorSearchUsingFieldBuilder : SearchTestBase { public VectorSearchUsingFieldBuilder(bool async, SearchClientOptions.ServiceVersion serviceVersion) diff --git a/sdk/search/Azure.Search.Documents/tests/Samples/Sample07_VectorSearch_UsingReducedEmbeddings.cs b/sdk/search/Azure.Search.Documents/tests/Samples/Sample07_VectorSearch_UsingReducedEmbeddings.cs index f76b21f1293dd..9fa3cc7076700 100644 --- a/sdk/search/Azure.Search.Documents/tests/Samples/Sample07_VectorSearch_UsingReducedEmbeddings.cs +++ b/sdk/search/Azure.Search.Documents/tests/Samples/Sample07_VectorSearch_UsingReducedEmbeddings.cs @@ -13,7 +13,6 @@ namespace Azure.Search.Documents.Tests.Samples.VectorSearch { - [ClientTestFixture(SearchClientOptions.ServiceVersion.V2024_05_01_Preview), ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public partial class VectorSearchUsingReducedEmbeddings : SearchTestBase { public VectorSearchUsingReducedEmbeddings(bool async, SearchClientOptions.ServiceVersion serviceVersion) @@ -82,7 +81,7 @@ private async Task CreateIndex(SearchResources resources, str #region Snippet:Azure_Search_Documents_Tests_Samples_Sample07_Reduced_Vector_Search_Index string vectorSearchProfileName = "my-vector-profile"; string vectorSearchHnswConfig = "my-hsnw-vector-config"; - string deploymentId = "my-text-embedding-3-small"; + string deploymentName = "my-text-embedding-3-small"; int modelDimensions = 256; // Here's the reduced model dimensions string indexName = "hotel"; @@ -106,7 +105,7 @@ private async Task CreateIndex(SearchResources resources, str { new VectorSearchProfile(vectorSearchProfileName, vectorSearchHnswConfig) { - Vectorizer = "openai" + VectorizerName = "openai" } }, Algorithms = @@ -117,11 +116,11 @@ private async Task CreateIndex(SearchResources resources, str { new AzureOpenAIVectorizer("openai") { - AzureOpenAIParameters = new AzureOpenAIParameters() + Parameters = new AzureOpenAIVectorizerParameters() { ResourceUri = new Uri(Environment.GetEnvironmentVariable("OPENAI_ENDPOINT")), ApiKey = Environment.GetEnvironmentVariable("OPENAI_KEY"), - DeploymentId = deploymentId, + DeploymentName = deploymentName, ModelName = AzureOpenAIModelName.TextEmbedding3Small } } diff --git a/sdk/search/Azure.Search.Documents/tests/Samples/Sample07_VectorSearch_UsingVectorizableTextQuery.cs b/sdk/search/Azure.Search.Documents/tests/Samples/Sample07_VectorSearch_UsingVectorizableTextQuery.cs index d5a9939fb4b76..ff010b2b217a5 100644 --- a/sdk/search/Azure.Search.Documents/tests/Samples/Sample07_VectorSearch_UsingVectorizableTextQuery.cs +++ b/sdk/search/Azure.Search.Documents/tests/Samples/Sample07_VectorSearch_UsingVectorizableTextQuery.cs @@ -11,7 +11,6 @@ namespace Azure.Search.Documents.Tests.Samples.VectorSearch { - [ClientTestFixture(SearchClientOptions.ServiceVersion.V2024_05_01_Preview), ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public partial class VectorSearchUsingVectorizableTextQuery : SearchTestBase { public VectorSearchUsingVectorizableTextQuery(bool async, SearchClientOptions.ServiceVersion serviceVersion) @@ -264,7 +263,7 @@ private async Task CreateIndex(SearchResources resources, str #region Snippet:Azure_Search_Documents_Tests_Samples_Sample07_Vector_Search_Index_UsingVectorizableTextQuery string vectorSearchProfileName = "my-vector-profile"; string vectorSearchHnswConfig = "my-hsnw-vector-config"; - string deploymentId = "text-embedding-ada-002"; + string deploymentName = "text-embedding-ada-002"; int modelDimensions = 1536; string indexName = "hotel"; @@ -288,7 +287,7 @@ private async Task CreateIndex(SearchResources resources, str { new VectorSearchProfile(vectorSearchProfileName, vectorSearchHnswConfig) { - Vectorizer = "openai" + VectorizerName = "openai" } }, Algorithms = @@ -299,11 +298,11 @@ private async Task CreateIndex(SearchResources resources, str { new AzureOpenAIVectorizer("openai") { - AzureOpenAIParameters = new AzureOpenAIParameters() + Parameters = new AzureOpenAIVectorizerParameters() { ResourceUri = new Uri(Environment.GetEnvironmentVariable("OPENAI_ENDPOINT")), ApiKey = Environment.GetEnvironmentVariable("OPENAI_KEY"), - DeploymentId = deploymentId, + DeploymentName = deploymentName, ModelName = AzureOpenAIModelName.TextEmbeddingAda002 } } diff --git a/sdk/search/Azure.Search.Documents/tests/Samples/Sample08_SemanticSearch.cs b/sdk/search/Azure.Search.Documents/tests/Samples/Sample08_SemanticSearch.cs index 5031c03c53e74..9df0cdb6da4bd 100644 --- a/sdk/search/Azure.Search.Documents/tests/Samples/Sample08_SemanticSearch.cs +++ b/sdk/search/Azure.Search.Documents/tests/Samples/Sample08_SemanticSearch.cs @@ -12,7 +12,6 @@ namespace Azure.Search.Documents.Tests.Samples { - [ClientTestFixture(SearchClientOptions.ServiceVersion.V2024_05_01_Preview), ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public partial class SemanticSearch : SearchTestBase { public SemanticSearch(bool async, SearchClientOptions.ServiceVersion serviceVersion) @@ -45,7 +44,6 @@ public async Task SemanticSearchTest() QueryCaption = new(QueryCaptionType.Extractive), QueryAnswer = new(QueryAnswerType.Extractive) }, - QueryLanguage = QueryLanguage.EnUs, QueryType = SearchQueryType.Semantic }); @@ -114,7 +112,6 @@ public async Task SearchUsingSemanticQuery() QueryAnswer = new(QueryAnswerType.Extractive), SemanticQuery = "Is there any hotel located on the main commercial artery of the city in the heart of New York?" }, - QueryLanguage = QueryLanguage.EnUs, }); int count = 0; diff --git a/sdk/search/Azure.Search.Documents/tests/SearchIndexClientTests.cs b/sdk/search/Azure.Search.Documents/tests/SearchIndexClientTests.cs index 324677deede4d..07500a5066a92 100644 --- a/sdk/search/Azure.Search.Documents/tests/SearchIndexClientTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/SearchIndexClientTests.cs @@ -15,7 +15,6 @@ namespace Azure.Search.Documents.Tests { - [ClientTestFixture(SearchClientOptions.ServiceVersion.V2023_11_01, SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public class SearchIndexClientTests : SearchTestBase { public SearchIndexClientTests(bool async, SearchClientOptions.ServiceVersion serviceVersion) @@ -108,8 +107,6 @@ static string GetDuplicates(IEnumerable values) } } - [Test] - [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public async Task GetServiceStatistics() { await using SearchResources resources = await SearchResources.GetSharedHotelsIndexAsync(this); @@ -145,8 +142,6 @@ public void CreateIndexParameterValidation() Assert.AreEqual("index", ex.ParamName); } - [Test] - [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public async Task CreateIndex() { await using SearchResources resources = SearchResources.CreateWithNoIndexes(this); @@ -180,8 +175,6 @@ public void UpdateIndexParameterValidation() Assert.AreEqual("index", ex.ParamName); } - [Test] - [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public async Task UpdateIndex() { await using SearchResources resources = SearchResources.CreateWithNoIndexes(this); @@ -452,31 +445,6 @@ public async Task AnalyzeText() Assert.AreEqual(new[] { "The", "quick", "brown", "fox", "jumped", "over", "the", "lazy", "dog." }, tokens.Select(t => t.Token)); } - [Test] - [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] - public async Task AnalyzeTextWithNormalizer() - { - await using SearchResources resources = await SearchResources.GetSharedHotelsIndexAsync(this); - - SearchIndexClient client = resources.GetIndexClient(); - - AnalyzeTextOptions request = new("I dARe YoU tO reAd It IN A nORmAl vOiCE.", LexicalNormalizerName.Lowercase); - - Response> result = await client.AnalyzeTextAsync(resources.IndexName, request); - IReadOnlyList tokens = result.Value; - - Assert.AreEqual(1, tokens.Count); - Assert.AreEqual("i dare you to read it in a normal voice.", tokens[0].Token); - - request = new("Item ① in my ⑽ point rant is that 75⁰F is uncomfortably warm.", LexicalNormalizerName.AsciiFolding); - - result = await client.AnalyzeTextAsync(resources.IndexName, request); - tokens = result.Value; - - Assert.AreEqual(1, tokens.Count); - Assert.AreEqual("Item 1 in my (10) point rant is that 750F is uncomfortably warm.", tokens[0].Token); - } - [Test] public async Task SetScoringProfile() { diff --git a/sdk/search/Azure.Search.Documents/tests/SearchIndexerClientTests.cs b/sdk/search/Azure.Search.Documents/tests/SearchIndexerClientTests.cs index 66c608fe77af1..fdd919f293819 100644 --- a/sdk/search/Azure.Search.Documents/tests/SearchIndexerClientTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/SearchIndexerClientTests.cs @@ -13,7 +13,6 @@ namespace Azure.Search.Documents.Tests { - [ClientTestFixture(SearchClientOptions.ServiceVersion.V2023_11_01, SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public class SearchIndexerClientTests : SearchTestBase { public SearchIndexerClientTests(bool async, SearchClientOptions.ServiceVersion serviceVersion) @@ -629,11 +628,8 @@ private async Task TestSkillsetAsync(SearchIndexerClient client, SearchIndexerSk } [Test] - [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2024_05_01_Preview)] public async Task RoundtripAllSkills() { - // BUGBUG: https://github.com/Azure/azure-sdk-for-net/issues/15108 - await using SearchResources resources = SearchResources.CreateWithNoIndexes(this); SearchIndexerClient client = resources.GetIndexerClient(new SearchClientOptions(ServiceVersion)); @@ -654,9 +650,7 @@ SearchIndexerSkill CreateSkill(Type t, string[] inputNames, string[] outputNames Type _ when t == typeof(TextTranslationSkill) => new TextTranslationSkill(inputs, outputs, TextTranslationSkillLanguage.En), Type _ when t == typeof(WebApiSkill) => new WebApiSkill(inputs, outputs, "https://microsoft.com"), - Type _ when t == typeof(AzureMachineLearningSkill) => new AzureMachineLearningSkill(inputs, outputs, new Uri("https://microsoft.com")), - Type _ when t == typeof(AzureOpenAIEmbeddingSkill) => new AzureOpenAIEmbeddingSkill(inputs, outputs) { ResourceUri = new Uri("https://test-sample.openai.azure.com"), ApiKey = "api-key", DeploymentId = "model", ModelName = "text-embedding-3-large" }, - Type _ when t == typeof(VisionVectorizeSkill) => new VisionVectorizeSkill(inputs, outputs, "latest"), + Type _ when t == typeof(AzureOpenAIEmbeddingSkill) => new AzureOpenAIEmbeddingSkill(inputs, outputs) { ResourceUri = new Uri("https://test-sample.openai.azure.com"), ApiKey = "api-key", DeploymentName = "model", ModelName = "text-embedding-3-large" }, _ => (SearchIndexerSkill)Activator.CreateInstance(t, new object[] { inputs, outputs }), }; } @@ -718,10 +712,7 @@ SentimentSkill CreateSentimentSkill(SentimentSkill.SkillVersion skillVersion) Type _ when t == typeof(SplitSkill) => CreateSkill(t, new[] { "text", "languageCode" }, new[] { "textItems" }), Type _ when t == typeof(TextTranslationSkill) => CreateSkill(t, new[] { "text", "toLanguageCode", "fromLanguageCode" }, new[] { "translatedText", "translatedToLanguageCode", "translatedFromLanguageCode" }), Type _ when t == typeof(WebApiSkill) => CreateSkill(t, new[] { "input" }, new[] { "output" }), - Type _ when t == typeof(AzureMachineLearningSkill) => CreateSkill(t, new[] { "input" }, new[] { "output" }), Type _ when t == typeof(AzureOpenAIEmbeddingSkill) => CreateSkill(t, new[] { "text" }, new[] { "embedding" }), - Type _ when t == typeof(VisionVectorizeSkill) => - TestEnvironment.AzureEnvironment != "AzureUSGovernment" ? CreateSkill(t, new[] { "image" }, new[] { "vector" }) : null, _ => throw new NotSupportedException($"{t.FullName}"), }) .Where(skill => skill != null) diff --git a/sdk/search/Azure.Search.Documents/tests/SearchableFieldAttributeTests.cs b/sdk/search/Azure.Search.Documents/tests/SearchableFieldAttributeTests.cs index 9f7ee5aac1bf5..a201876386bee 100644 --- a/sdk/search/Azure.Search.Documents/tests/SearchableFieldAttributeTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/SearchableFieldAttributeTests.cs @@ -21,7 +21,6 @@ public void CreatesEquivalentField( [Values(null, "AnalyzerName")] string analyzerName, [Values(null, "SearchAnalyzerName")] string searchAnalyzerName, [Values(null, "IndexAnalyzerName")] string indexAnalyzerName, - [Values(null, "NormalizerName")] string normalizerName, [Values(null, new[] { "synonynMapName" })] string[] synonymMapNames) { SearchableFieldAttribute sut = new SearchableFieldAttribute @@ -48,11 +47,6 @@ public void CreatesEquivalentField( sut.IndexAnalyzerName = indexAnalyzerName; } - if (normalizerName != null) - { - sut.NormalizerName = normalizerName; - } - if (synonymMapNames != null) { sut.SynonymMapNames = synonymMapNames; @@ -72,7 +66,6 @@ public void CreatesEquivalentField( Assert.AreEqual(analyzerName, field.AnalyzerName?.ToString()); Assert.AreEqual(searchAnalyzerName, field.SearchAnalyzerName?.ToString()); Assert.AreEqual(indexAnalyzerName, field.IndexAnalyzerName?.ToString()); - Assert.AreEqual(normalizerName, field.NormalizerName?.ToString()); Assert.AreEqual(synonymMapNames ?? Array.Empty(), field.SynonymMapNames); } } diff --git a/sdk/search/Azure.Search.Documents/tests/SimpleFieldAttributeTests.cs b/sdk/search/Azure.Search.Documents/tests/SimpleFieldAttributeTests.cs index e5bd6ba6612ae..9e4d5676d5f12 100644 --- a/sdk/search/Azure.Search.Documents/tests/SimpleFieldAttributeTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/SimpleFieldAttributeTests.cs @@ -49,7 +49,6 @@ public void IsSearchableNotOverwritten() ISearchFieldAttribute attribute = new SearchableFieldAttribute { AnalyzerName = LexicalAnalyzerName.Values.EnLucene, - NormalizerName = LexicalNormalizerName.Values.Lowercase, IsFilterable = true, IsSortable = true, }; @@ -67,7 +66,6 @@ public void IsSearchableNotOverwritten() Assert.AreEqual(LexicalAnalyzerName.EnLucene.ToString(), field.AnalyzerName?.ToString()); Assert.IsNull(field.IndexAnalyzerName); Assert.IsNull(field.SearchAnalyzerName); - Assert.AreEqual(LexicalNormalizerName.Lowercase.ToString(), field.NormalizerName?.ToString()); Assert.IsEmpty(field.SynonymMapNames); // Make sure that if a SimpleFieldAttribute were also specified, it does not overwrite IsSearchable @@ -90,7 +88,6 @@ public void IsSearchableNotOverwritten() Assert.AreEqual(LexicalAnalyzerName.EnLucene.ToString(), field.AnalyzerName?.ToString()); Assert.IsNull(field.IndexAnalyzerName); Assert.IsNull(field.SearchAnalyzerName); - Assert.AreEqual(LexicalNormalizerName.Lowercase.ToString(), field.NormalizerName?.ToString()); Assert.IsEmpty(field.SynonymMapNames); } } diff --git a/sdk/search/Azure.Search.Documents/tests/Utilities/SearchResources.Data.cs b/sdk/search/Azure.Search.Documents/tests/Utilities/SearchResources.Data.cs index df40a91bdc531..846568a5dc9b5 100644 --- a/sdk/search/Azure.Search.Documents/tests/Utilities/SearchResources.Data.cs +++ b/sdk/search/Azure.Search.Documents/tests/Utilities/SearchResources.Data.cs @@ -53,7 +53,7 @@ internal static SearchIndex GetHotelIndex(string name) => Fields = { new SearchableField("streetAddress"), - new SearchableField("city") { IsFilterable = true, IsSortable = true, IsFacetable = true, NormalizerName = LexicalNormalizerName.Lowercase }, + new SearchableField("city") { IsFilterable = true, IsSortable = true, IsFacetable = true }, new SearchableField("stateProvince") { IsFilterable = true, IsSortable = true, IsFacetable = true }, new SearchableField("country") { IsFilterable = true, IsSortable = true, IsFacetable = true }, new SearchableField("postalCode") { IsFilterable = true, IsSortable = true, IsFacetable = true }, diff --git a/sdk/search/Azure.Search.Documents/tests/Utilities/SearchResourcesSample.Data.cs b/sdk/search/Azure.Search.Documents/tests/Utilities/SearchResourcesSample.Data.cs index 379e2371f514f..480c775afdd57 100644 --- a/sdk/search/Azure.Search.Documents/tests/Utilities/SearchResourcesSample.Data.cs +++ b/sdk/search/Azure.Search.Documents/tests/Utilities/SearchResourcesSample.Data.cs @@ -51,7 +51,7 @@ internal static SearchIndex GetHotelIndex(string name) => Fields = { new SearchableField("StreetAddress"), - new SearchableField("City") { IsFilterable = true, IsSortable = true, IsFacetable = true, NormalizerName = LexicalNormalizerName.Lowercase }, + new SearchableField("City") { IsFilterable = true, IsSortable = true, IsFacetable = true }, new SearchableField("StateProvince") { IsFilterable = true, IsSortable = true, IsFacetable = true }, new SearchableField("Country") { IsFilterable = true, IsSortable = true, IsFacetable = true }, new SearchableField("PostalCode") { IsFilterable = true, IsSortable = true, IsFacetable = true }, diff --git a/sdk/search/Azure.Search.Documents/tests/Utilities/SearchTestBase.cs b/sdk/search/Azure.Search.Documents/tests/Utilities/SearchTestBase.cs index c834826e54485..d66b64e6aff6b 100644 --- a/sdk/search/Azure.Search.Documents/tests/Utilities/SearchTestBase.cs +++ b/sdk/search/Azure.Search.Documents/tests/Utilities/SearchTestBase.cs @@ -23,7 +23,7 @@ namespace Azure.Search.Documents.Tests /// Base class for Search unit tests that adds shared infrastructure on top /// of the Azure.Core testing framework. /// - [ClientTestFixture(SearchClientOptions.ServiceVersion.V2023_11_01)] + [ClientTestFixture(SearchClientOptions.ServiceVersion.V2024_07_01)] public abstract partial class SearchTestBase : RecordedTestBase { /// From c58120378e3c9c1a9cc3096f3d22033db88323eb Mon Sep 17 00:00:00 2001 From: Timothy Mothra Date: Wed, 17 Jul 2024 16:18:17 -0700 Subject: [PATCH 114/144] [AzureMonitor] add Log Scopes example to Readme (#44749) * add Log Scopes example to Readme * pr feedback * add AzureMonitor to example code * pr feedback * Update sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/README.md Co-authored-by: Cijo Thomas * add another test * pr feedback * pr feedback * Update sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/README.md Co-authored-by: Rajkumar Rangaraj * fix * pr feedback --------- Co-authored-by: Cijo Thomas Co-authored-by: Rajkumar Rangaraj --- .../README.md | 33 +++++++++++++++ .../README.md | 37 +++++++++++++++++ .../E2ETelemetryItemValidation/LogsTests.cs | 31 ++++++++++---- .../LogsHelperTests.cs | 41 +++++++++++++++++++ 4 files changed, 135 insertions(+), 7 deletions(-) diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/README.md b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/README.md index 507590ee40f64..70c2b0c3fa57b 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/README.md +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/README.md @@ -301,6 +301,39 @@ The Azure Monitor Distro is a distribution package that facilitates users in sen Refer to [`Program.cs`](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/monitor/Azure.Monitor.OpenTelemetry.AspNetCore/tests/Azure.Monitor.OpenTelemetry.AspNetCore.Demo/Program.cs) for a complete demo. +### Log Scopes + +Log [scopes](https://learn.microsoft.com/dotnet/core/extensions/logging#log-scopes) allow you to add additional properties to the logs generated by your application. +Although the Azure Monitor Distro does support scopes, this feature is off by default in OpenTelemetry. +To leverage log scopes, you must explicitly enable them. + +To include the scope with your logs, set `OpenTelemetryLoggerOptions.IncludeScopes` to `true` in your application's configuration: +```csharp +builder.Services.Configure((loggingOptions) => +{ + loggingOptions.IncludeScopes = true; +}); +``` + +When using `ILogger` scopes, use a `List>` or `IReadOnlyList>` as the state for best performance. +All logs written within the context of the scope will include the specified information. +Azure Monitor will add these scope values to the Log's CustomProperties. +```csharp +List> scope = +[ + new("scopeKey", "scopeValue") +]; + +using (logger.BeginScope(scope)) +{ + logger.LogInformation("Example message."); +} +``` + +In scenarios involving multiple scopes or a single scope with multiple key-value pairs, if duplicate keys are present, +only the first occurrence of the key-value pair from the outermost scope will be recorded. +However, when the same key is utilized both within a logging scope and directly in the log statement, the value specified in the log message template will take precedence. + ## Troubleshooting The Azure Monitor Distro uses EventSource for its own internal logging. The logs are available to any EventListener by opting into the source named "OpenTelemetry-AzureMonitor-Exporter". diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/README.md b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/README.md index be13c36ce0f71..5e2cfb962c06c 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/README.md +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/README.md @@ -141,6 +141,43 @@ For more information on the OpenTelemetry project, please review the [OpenTeleme Refer to [`Program.cs`](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/tests/Azure.Monitor.OpenTelemetry.Exporter.Demo/Program.cs) for a complete demo. +### Log Scopes + +Log [scopes](https://learn.microsoft.com/dotnet/core/extensions/logging#log-scopes) allow you to add additional properties to the logs generated by your application. +Although the Azure Monitor Exporter does support scopes, this feature is off by default in OpenTelemetry. +To leverage log scopes, you must explicitly enable them. + +To include the scope with your logs, set `OpenTelemetryLoggerOptions.IncludeScopes` to `true` in your application's configuration: +```csharp +var loggerFactory = LoggerFactory.Create(builder => +{ + builder.AddOpenTelemetry(options => + { + options.AddAzureMonitorLogExporter(o => o.ConnectionString = "InstrumentationKey=00000000-0000-0000-0000-000000000000"); + options.IncludeScopes = true; + }); +}); +``` + +When using `ILogger` scopes, use a `List>` or `IReadOnlyList>` as the state for best performance. +All logs written within the context of the scope will include the specified information. +Azure Monitor will add these scope values to the Log's CustomProperties. +```csharp +List> scope = +[ + new("scopeKey", "scopeValue") +]; + +using (logger.BeginScope(scope)) +{ + logger.LogInformation("Example message."); +} +``` + +In scenarios involving multiple scopes or a single scope with multiple key-value pairs, if duplicate keys are present, +only the first occurrence of the key-value pair from the outermost scope will be recorded. +However, when the same key is utilized both within a logging scope and directly in the log statement, the value specified in the log message template will take precedence. + ## Troubleshooting The Azure Monitor exporter uses EventSource for its own internal logging. The exporter logs are available to any EventListener by opting into the source named "OpenTelemetry-AzureMonitor-Exporter". diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/tests/Azure.Monitor.OpenTelemetry.Exporter.Tests/E2ETelemetryItemValidation/LogsTests.cs b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/tests/Azure.Monitor.OpenTelemetry.Exporter.Tests/E2ETelemetryItemValidation/LogsTests.cs index 6e9ac78a225c5..d80dd9064fbfd 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/tests/Azure.Monitor.OpenTelemetry.Exporter.Tests/E2ETelemetryItemValidation/LogsTests.cs +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/tests/Azure.Monitor.OpenTelemetry.Exporter.Tests/E2ETelemetryItemValidation/LogsTests.cs @@ -57,6 +57,7 @@ public void VerifyLog(LogLevel logLevel, string expectedSeverityLevel) .AddFilter(logCategoryName, logLevel) .AddOpenTelemetry(options => { + options.IncludeScopes = true; options.SetResourceBuilder(ResourceBuilder.CreateDefault().AddAttributes(testResourceAttributes)); options.AddAzureMonitorLogExporterForTest(out telemetryItems); }); @@ -64,12 +65,28 @@ public void VerifyLog(LogLevel logLevel, string expectedSeverityLevel) // ACT var logger = loggerFactory.CreateLogger(logCategoryName); - logger.Log( - logLevel: logLevel, - eventId: 1, - exception: null, - message: "Hello {name}.", - args: new object[] { "World" }); + + List> scope1 = new() + { + new("scopeKey1", "scopeValue1"), + new("scopeKey1", "scopeValue2") + }; + + List> scope2 = new() + { + new("scopeKey1", "scopeValue3") + }; + + using (logger.BeginScope(scope1)) + using (logger.BeginScope(scope2)) + { + logger.Log( + logLevel: logLevel, + eventId: 1, + exception: null, + message: "Hello {name}.", + args: new object[] { "World" }); + } // CLEANUP loggerFactory.Dispose(); @@ -83,7 +100,7 @@ public void VerifyLog(LogLevel logLevel, string expectedSeverityLevel) telemetryItem: telemetryItem!, expectedSeverityLevel: expectedSeverityLevel, expectedMessage: "Hello {name}.", - expectedMessageProperties: new Dictionary { { "EventId", "1" }, { "name", "World" }, { "CategoryName", logCategoryName } }, + expectedMessageProperties: new Dictionary { { "EventId", "1" }, { "name", "World" }, { "CategoryName", logCategoryName }, { "scopeKey1", "scopeValue1" } }, expectedSpanId: null, expectedTraceId: null); } diff --git a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/tests/Azure.Monitor.OpenTelemetry.Exporter.Tests/LogsHelperTests.cs b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/tests/Azure.Monitor.OpenTelemetry.Exporter.Tests/LogsHelperTests.cs index 969dbf976737e..87bbbc96535ef 100644 --- a/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/tests/Azure.Monitor.OpenTelemetry.Exporter.Tests/LogsHelperTests.cs +++ b/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/tests/Azure.Monitor.OpenTelemetry.Exporter.Tests/LogsHelperTests.cs @@ -503,6 +503,47 @@ public void DuplicateKeysInLogRecordAttributesAndLogScope() Assert.Equal(expectedAttributeValue, actualAttributeValue); } + [Fact] + public void DuplicateKeysInLogRecordAttributesAndLogScope2() + { + // Arrange. + var logRecords = new List(1); + using var loggerFactory = LoggerFactory.Create(builder => + { + builder.AddOpenTelemetry(options => + { + options.IncludeScopes = true; + options.AddInMemoryExporter(logRecords); + }); + }); + + var logger = loggerFactory.CreateLogger("Some category"); + + const string expectedScopeKey = "Some scope key"; + const string expectedScopeValue = "Some scope value"; + const string duplicateScopeValue = "Some duplicate scope value"; + const string duplicateScopeValue2 = "Another duplicate scope value"; + + // Act. + using (logger.BeginScope(new List> + { + new KeyValuePair(expectedScopeKey, expectedScopeValue), + new KeyValuePair(expectedScopeKey, duplicateScopeValue), + })) + { + logger.LogInformation($"Some log information message. {{{expectedScopeKey}}}.", duplicateScopeValue2); + } + + // Assert. + var logRecord = logRecords.Single(); + var properties = new ChangeTrackingDictionary(); + LogsHelper.GetMessageAndSetProperties(logRecords[0], properties); + + Assert.Equal(2, properties.Count); + Assert.True(properties.TryGetValue(expectedScopeKey, out string actualScopeValue)); + Assert.Equal(duplicateScopeValue2, actualScopeValue); + } + private class CustomObject { public override string ToString() From 090ea968785f42b4602082ee40d6a5b85ae3f6e3 Mon Sep 17 00:00:00 2001 From: Arthur Ma Date: Thu, 18 Jul 2024 07:51:28 +0800 Subject: [PATCH 115/144] Prepare release for mysql 1.1.0 (#45051) --- .../Azure.ResourceManager.MySql/CHANGELOG.md | 20 ++-- ...mple_AdvancedThreatProtectionCollection.cs | 12 +-- ...Sample_AdvancedThreatProtectionResource.cs | 6 +- ...lexibleServerAadAdministratorCollection.cs | 10 +- ...lFlexibleServerAadAdministratorResource.cs | 6 +- ...ple_MySqlFlexibleServerBackupCollection.cs | 10 +- ...ample_MySqlFlexibleServerBackupResource.cs | 4 +- ...e_MySqlFlexibleServerBackupV2Collection.cs | 10 +- ...ple_MySqlFlexibleServerBackupV2Resource.cs | 4 +- .../Sample_MySqlFlexibleServerCollection.cs | 24 ++--- ...qlFlexibleServerConfigurationCollection.cs | 10 +- ...ySqlFlexibleServerConfigurationResource.cs | 4 +- ...e_MySqlFlexibleServerDatabaseCollection.cs | 10 +- ...ple_MySqlFlexibleServerDatabaseResource.cs | 6 +- ...SqlFlexibleServerFirewallRuleCollection.cs | 10 +- ...MySqlFlexibleServerFirewallRuleResource.cs | 6 +- ...ySqlFlexibleServerMaintenanceCollection.cs | 8 +- ..._MySqlFlexibleServerMaintenanceResource.cs | 4 +- .../Sample_MySqlFlexibleServerResource.cs | 36 +++---- ...ySqlFlexibleServersCapabilityCollection.cs | 8 +- ..._MySqlFlexibleServersCapabilityResource.cs | 2 +- .../Sample_SubscriptionResourceExtensions.cs | 10 +- .../Sample_TenantResourceExtensions.cs | 2 +- .../src/Azure.ResourceManager.MySql.csproj | 2 +- .../AdvancedThreatProtectionCollection.cs | 20 ++-- .../AdvancedThreatProtectionResource.cs | 8 +- .../Extensions/FlexibleServersExtensions.cs | 36 +++---- ...SqlFlexibleServersResourceGroupResource.cs | 4 +- ...ySqlFlexibleServersSubscriptionResource.cs | 28 ++--- ...kableMySqlFlexibleServersTenantResource.cs | 4 +- ...lexibleServerAadAdministratorCollection.cs | 20 ++-- ...lFlexibleServerAadAdministratorResource.cs | 12 +-- .../MySqlFlexibleServerBackupCollection.cs | 20 ++-- .../MySqlFlexibleServerBackupResource.cs | 8 +- .../MySqlFlexibleServerBackupV2Collection.cs | 20 ++-- .../MySqlFlexibleServerBackupV2Resource.cs | 8 +- .../MySqlFlexibleServerCollection.cs | 24 ++--- ...qlFlexibleServerConfigurationCollection.cs | 20 ++-- ...ySqlFlexibleServerConfigurationResource.cs | 8 +- .../MySqlFlexibleServerDatabaseCollection.cs | 20 ++-- .../MySqlFlexibleServerDatabaseResource.cs | 12 +-- ...SqlFlexibleServerFirewallRuleCollection.cs | 20 ++-- ...MySqlFlexibleServerFirewallRuleResource.cs | 12 +-- ...ySqlFlexibleServerMaintenanceCollection.cs | 16 +-- .../MySqlFlexibleServerMaintenanceResource.cs | 8 +- .../Generated/MySqlFlexibleServerResource.cs | 100 +++++++++--------- ...ySqlFlexibleServersCapabilityCollection.cs | 16 +-- .../MySqlFlexibleServersCapabilityResource.cs | 4 +- ...dThreatProtectionSettingsRestOperations.cs | 2 +- .../AzureADAdministratorsRestOperations.cs | 2 +- .../BackupAndExportRestOperations.cs | 2 +- .../RestOperations/BackupsRestOperations.cs | 2 +- .../CheckNameAvailabilityRestOperations.cs | 2 +- ...ailabilityWithoutLocationRestOperations.cs | 2 +- ...VirtualNetworkSubnetUsageRestOperations.cs | 2 +- .../ConfigurationsRestOperations.cs | 2 +- .../RestOperations/DatabasesRestOperations.cs | 2 +- .../FirewallRulesRestOperations.cs | 2 +- .../GetPrivateDnsZoneSuffixRestOperations.cs | 2 +- ...LocationBasedCapabilitiesRestOperations.cs | 2 +- ...ocationBasedCapabilitySetRestOperations.cs | 2 +- .../RestOperations/LogFilesRestOperations.cs | 2 +- .../LongRunningBackupRestOperations.cs | 2 +- .../LongRunningBackupsRestOperations.cs | 2 +- .../MaintenancesRestOperations.cs | 2 +- .../OperationResultsRestOperations.cs | 2 +- .../RestOperations/ReplicasRestOperations.cs | 2 +- .../ServersMigrationRestOperations.cs | 2 +- .../RestOperations/ServersRestOperations.cs | 2 +- .../src/autorest.md | 8 +- 70 files changed, 361 insertions(+), 361 deletions(-) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/CHANGELOG.md b/sdk/mysql/Azure.ResourceManager.MySql/CHANGELOG.md index a931d064e206c..ad09426856746 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/CHANGELOG.md +++ b/sdk/mysql/Azure.ResourceManager.MySql/CHANGELOG.md @@ -1,24 +1,26 @@ # Release History -## 1.1.0-beta.6 (Unreleased) +## 1.1.0 (2024-07-18) ### Features Added -### Breaking Changes - -### Bugs Fixed +- Upgraded api-version tag from 'package-flexibleserver-2021-05-01' to 'package-flexibleserver-2024-01-01'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/928047803788f7377fa003a26ba2bdc2e0fcccc0/specification/mysql/resource-manager/readme.md. +- Added `ArmOperation.Rehydrate` and `ArmOperation.Rehydrate` static methods to rehydrate a long-running operation. ### Other Changes +- Upgraded Azure.Core from 1.28.0 to 1.41.0 +- Upgraded Azure.ResourceManager from 1.4.0 to 1.12.0 + ## 1.1.0-beta.5 (2024-03-14) ### Features Added -- Upgraded api-version tag from 'package-2020-01-01;package-flexibleserver-2023-06-01-preview' to 'package-2020-01-01;package-flexibleserver-2023-12-01-preview'. Tag detail available at https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/mysql/Azure.ResourceManager.MySql/src/autorest.md +- Upgraded api-version tag from 'package-flexibleserver-2023-06-01-preview' to 'package-flexibleserver-2023-12-01-preview'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/c45a7f47c1901149828eb8a33c74898c554659c0/specification/mysql/resource-manager/readme.md. ### Breaking Changes -- Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. +- Enabled the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. ### Other Changes @@ -29,7 +31,7 @@ ### Features Added -- Enable mocking for extension methods, refer this [document](https://aka.ms/azsdk/net/mocking) for more details. +- Enabled mocking for extension methods, refer this [document](https://aka.ms/azsdk/net/mocking) for more details. ### Other Changes @@ -53,7 +55,7 @@ ### Features Added -- Enable the model factory feature for model mocking, more information can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-mocking-factory-builder). +- Enabled the model factory feature for model mocking, more information can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-mocking-factory-builder). ### Other Changes @@ -117,4 +119,4 @@ This package follows the [new Azure SDK guidelines](https://azure.github.io/azur This package is a Public Preview version, so expect incompatible changes in subsequent releases as we improve the product. To provide feedback, submit an issue in our [Azure SDK for .NET GitHub repo](https://github.com/Azure/azure-sdk-for-net/issues). -> NOTE: For more information about unified authentication, please refer to [Microsoft Azure Identity documentation for .NET](https://docs.microsoft.com//dotnet/api/overview/azure/identity-readme?view=azure-dotnet). +> NOTE: For more information about unified authentication, please refer to [Microsoft Azure Identity documentation for .NET](https://docs.microsoft.com//dotnet/api/overview/azure/identity-readme?view=azure-dotnet). \ No newline at end of file diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_AdvancedThreatProtectionCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_AdvancedThreatProtectionCollection.cs index ee6cf824d5f1b..9f57bf87d4200 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_AdvancedThreatProtectionCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_AdvancedThreatProtectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_AdvancedThreatProtectionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAServerSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-12-01-preview/examples/AdvancedThreatProtectionSettingsGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsGet.json // this example is just showing the usage of "AdvancedThreatProtectionSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetAServerSAdvancedThreatProtectionSettings() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAServerSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-12-01-preview/examples/AdvancedThreatProtectionSettingsGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsGet.json // this example is just showing the usage of "AdvancedThreatProtectionSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Exists_GetAServerSAdvancedThreatProtectionSettings() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAServerSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-12-01-preview/examples/AdvancedThreatProtectionSettingsGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsGet.json // this example is just showing the usage of "AdvancedThreatProtectionSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetIfExists_GetAServerSAdvancedThreatProtectionSettings() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_DisableAServerSAdvancedThreatProtectionSettingsWithAllParametersUsingPUT() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-12-01-preview/examples/AdvancedThreatProtectionSettingsPutDisabled.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsPutDisabled.json // this example is just showing the usage of "AdvancedThreatProtectionSettings_UpdatePut" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -169,7 +169,7 @@ public async Task CreateOrUpdate_DisableAServerSAdvancedThreatProtectionSettings [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_EnableAServerSAdvancedThreatProtectionSettingsUsingPUT() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-12-01-preview/examples/AdvancedThreatProtectionSettingsPutEnabled.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsPutEnabled.json // this example is just showing the usage of "AdvancedThreatProtectionSettings_UpdatePut" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -209,7 +209,7 @@ public async Task CreateOrUpdate_EnableAServerSAdvancedThreatProtectionSettingsU [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetListOfServerSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-12-01-preview/examples/AdvancedThreatProtectionSettingsList.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsList.json // this example is just showing the usage of "AdvancedThreatProtectionSettings_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_AdvancedThreatProtectionResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_AdvancedThreatProtectionResource.cs index 45dff25f9dfcb..68caf102958a4 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_AdvancedThreatProtectionResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_AdvancedThreatProtectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_AdvancedThreatProtectionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAServerSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-12-01-preview/examples/AdvancedThreatProtectionSettingsGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsGet.json // this example is just showing the usage of "AdvancedThreatProtectionSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_GetAServerSAdvancedThreatProtectionSettings() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_DisableAServerSAdvancedThreatProtectionSettingsWithAllParameters() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-12-01-preview/examples/AdvancedThreatProtectionSettingsPatchDisabled.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsPatchDisabled.json // this example is just showing the usage of "AdvancedThreatProtectionSettings_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task Update_DisableAServerSAdvancedThreatProtectionSettingsWithAllP [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_EnableAServerSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-12-01-preview/examples/AdvancedThreatProtectionSettingsPatchEnabled.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/AdvancedThreatProtectionSettingsPatchEnabled.json // this example is just showing the usage of "AdvancedThreatProtectionSettings_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerAadAdministratorCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerAadAdministratorCollection.cs index 7f8f095e90328..0ddf199bf1192 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerAadAdministratorCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerAadAdministratorCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MySqlFlexibleServerAadAdministratorCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateAnAzureAdAdministrator() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-01-preview/examples/AzureADAdministratorCreate.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/stable/2023-12-30/examples/AzureADAdministratorCreate.json // this example is just showing the usage of "AzureADAdministrators_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -64,7 +64,7 @@ public async Task CreateOrUpdate_CreateAnAzureAdAdministrator() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAnAzureAdAdministrator() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-01-preview/examples/AzureADAdministratorGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/stable/2023-12-30/examples/AzureADAdministratorGet.json // this example is just showing the usage of "AzureADAdministrators_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -99,7 +99,7 @@ public async Task Get_GetAnAzureAdAdministrator() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAnAzureAdAdministrator() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-01-preview/examples/AzureADAdministratorGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/stable/2023-12-30/examples/AzureADAdministratorGet.json // this example is just showing the usage of "AzureADAdministrators_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -130,7 +130,7 @@ public async Task Exists_GetAnAzureAdAdministrator() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAnAzureAdAdministrator() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-01-preview/examples/AzureADAdministratorGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/stable/2023-12-30/examples/AzureADAdministratorGet.json // this example is just showing the usage of "AzureADAdministrators_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -173,7 +173,7 @@ public async Task GetIfExists_GetAnAzureAdAdministrator() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAzureADAdministratorsInAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-01-preview/examples/AzureADAdministratorsListByServer.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/stable/2023-12-30/examples/AzureADAdministratorsListByServer.json // this example is just showing the usage of "AzureADAdministrators_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerAadAdministratorResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerAadAdministratorResource.cs index b8a31a75138e6..d3402352a3d3e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerAadAdministratorResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerAadAdministratorResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MySqlFlexibleServerAadAdministratorResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateAnAzureAdAdministrator() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-01-preview/examples/AzureADAdministratorCreate.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/stable/2023-12-30/examples/AzureADAdministratorCreate.json // this example is just showing the usage of "AzureADAdministrators_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -61,7 +61,7 @@ public async Task Update_CreateAnAzureAdAdministrator() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAnAzureAdAdministrator() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-01-preview/examples/AzureADAdministratorDelete.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/stable/2023-12-30/examples/AzureADAdministratorDelete.json // this example is just showing the usage of "AzureADAdministrators_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task Delete_DeleteAnAzureAdAdministrator() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAnAzureAdAdministrator() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/preview/2023-06-01-preview/examples/AzureADAdministratorGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/AAD/stable/2023-12-30/examples/AzureADAdministratorGet.json // this example is just showing the usage of "AzureADAdministrators_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerBackupCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerBackupCollection.cs index 327fbe42beeed..b115b6a1254c5 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerBackupCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerBackupCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_MySqlFlexibleServerBackupCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateBackupForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/BackupPut.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/BackupPut.json // this example is just showing the usage of "Backups_Put" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task CreateOrUpdate_CreateBackupForAServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetABackupForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/BackupGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/BackupGet.json // this example is just showing the usage of "Backups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,7 +90,7 @@ public async Task Get_GetABackupForAServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetABackupForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/BackupGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/BackupGet.json // this example is just showing the usage of "Backups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -121,7 +121,7 @@ public async Task Exists_GetABackupForAServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetABackupForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/BackupGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/BackupGet.json // this example is just showing the usage of "Backups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -164,7 +164,7 @@ public async Task GetIfExists_GetABackupForAServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListBackupsForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/BackupsListByServer.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/BackupsListByServer.json // this example is just showing the usage of "Backups_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerBackupResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerBackupResource.cs index 5d8bbdfdb4c0b..6554a9b316163 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerBackupResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerBackupResource.cs @@ -19,7 +19,7 @@ public partial class Sample_MySqlFlexibleServerBackupResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateBackupForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/BackupPut.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/BackupPut.json // this example is just showing the usage of "Backups_Put" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Update_CreateBackupForAServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetABackupForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/BackupGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/BackupGet.json // this example is just showing the usage of "Backups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerBackupV2Collection.cs b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerBackupV2Collection.cs index 02d0b08e1a9d1..0058739802bf0 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerBackupV2Collection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerBackupV2Collection.cs @@ -19,7 +19,7 @@ public partial class Sample_MySqlFlexibleServerBackupV2Collection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateBackupForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/LongRunningBackup.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/LongRunningBackup.json // this example is just showing the usage of "LongRunningBackup_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task CreateOrUpdate_CreateBackupForAServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetABackupForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/LongRunningBackupGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/LongRunningBackupGet.json // this example is just showing the usage of "LongRunningBackups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_GetABackupForAServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetABackupForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/LongRunningBackupGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/LongRunningBackupGet.json // this example is just showing the usage of "LongRunningBackups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Exists_GetABackupForAServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetABackupForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/LongRunningBackupGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/LongRunningBackupGet.json // this example is just showing the usage of "LongRunningBackups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -165,7 +165,7 @@ public async Task GetIfExists_GetABackupForAServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListBackupsForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/LongRunningBackupsListByServer.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/LongRunningBackupsListByServer.json // this example is just showing the usage of "LongRunningBackups_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerBackupV2Resource.cs b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerBackupV2Resource.cs index 4aaecece6b82e..05e2044bfb0ca 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerBackupV2Resource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerBackupV2Resource.cs @@ -19,7 +19,7 @@ public partial class Sample_MySqlFlexibleServerBackupV2Resource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateBackupForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/LongRunningBackup.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/LongRunningBackup.json // this example is just showing the usage of "LongRunningBackup_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Update_CreateBackupForAServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetABackupForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/LongRunningBackupGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/LongRunningBackupGet.json // this example is just showing the usage of "LongRunningBackups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerCollection.cs index 44c74a46876cb..ccab762800917 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_MySqlFlexibleServerCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateANewServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-12-01-preview/examples/ServerCreate.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerCreate.json // this example is just showing the usage of "Servers_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -87,7 +87,7 @@ public async Task CreateOrUpdate_CreateANewServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateAReplicaServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-12-01-preview/examples/ServerCreateReplica.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerCreateReplica.json // this example is just showing the usage of "Servers_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -127,7 +127,7 @@ public async Task CreateOrUpdate_CreateAReplicaServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateAServerAsAPointInTimeRestore() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-12-01-preview/examples/ServerCreateWithPointInTimeRestore.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerCreateWithPointInTimeRestore.json // this example is just showing the usage of "Servers_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -173,7 +173,7 @@ public async Task CreateOrUpdate_CreateAServerAsAPointInTimeRestore() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateAServerWithByok() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-12-01-preview/examples/ServerCreateWithBYOK.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerCreateWithBYOK.json // this example is just showing the usage of "Servers_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -253,7 +253,7 @@ public async Task CreateOrUpdate_CreateAServerWithByok() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-12-01-preview/examples/ServerGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerGet.json // this example is just showing the usage of "Servers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -287,7 +287,7 @@ public async Task Get_GetAServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-12-01-preview/examples/ServerGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerGet.json // this example is just showing the usage of "Servers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -317,7 +317,7 @@ public async Task Exists_GetAServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-12-01-preview/examples/ServerGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerGet.json // this example is just showing the usage of "Servers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -359,7 +359,7 @@ public async Task GetIfExists_GetAServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAServerWithVnet() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-12-01-preview/examples/ServerGetWithVnet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerGetWithVnet.json // this example is just showing the usage of "Servers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -393,7 +393,7 @@ public async Task Get_GetAServerWithVnet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAServerWithVnet() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-12-01-preview/examples/ServerGetWithVnet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerGetWithVnet.json // this example is just showing the usage of "Servers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -423,7 +423,7 @@ public async Task Exists_GetAServerWithVnet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAServerWithVnet() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-12-01-preview/examples/ServerGetWithVnet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerGetWithVnet.json // this example is just showing the usage of "Servers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -465,7 +465,7 @@ public async Task GetIfExists_GetAServerWithVnet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListServersInAResourceGroup() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-12-01-preview/examples/ServersListByResourceGroup.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServersListByResourceGroup.json // this example is just showing the usage of "Servers_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -501,7 +501,7 @@ public async Task GetAll_ListServersInAResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetReplicas_ListReplicasForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-12-01-preview/examples/ReplicasListByServer.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ReplicasListByServer.json // this example is just showing the usage of "Replicas_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerConfigurationCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerConfigurationCollection.cs index bd5941b25a892..c89d4b417a03d 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerConfigurationCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerConfigurationCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MySqlFlexibleServerConfigurationCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ConfigurationCreateOrUpdate() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationCreateOrUpdate.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2023-12-30/examples/ConfigurationCreateOrUpdate.json // this example is just showing the usage of "Configurations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -61,7 +61,7 @@ public async Task CreateOrUpdate_ConfigurationCreateOrUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAConfiguration() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2023-12-30/examples/ConfigurationGet.json // this example is just showing the usage of "Configurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -96,7 +96,7 @@ public async Task Get_GetAConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAConfiguration() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2023-12-30/examples/ConfigurationGet.json // this example is just showing the usage of "Configurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -127,7 +127,7 @@ public async Task Exists_GetAConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAConfiguration() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2023-12-30/examples/ConfigurationGet.json // this example is just showing the usage of "Configurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -170,7 +170,7 @@ public async Task GetIfExists_GetAConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAllConfigurationsForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationsListByServer.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2023-12-30/examples/ConfigurationsListByServer.json // this example is just showing the usage of "Configurations_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerConfigurationResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerConfigurationResource.cs index 224962238905f..02713f3753b46 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerConfigurationResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerConfigurationResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MySqlFlexibleServerConfigurationResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateAUserConfiguration() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationUpdate.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2023-12-30/examples/ConfigurationUpdate.json // this example is just showing the usage of "Configurations_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task Update_UpdateAUserConfiguration() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAConfiguration() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2023-12-30/examples/ConfigurationGet.json // this example is just showing the usage of "Configurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerDatabaseCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerDatabaseCollection.cs index 2d10af1459199..73c06b4bc3a4a 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerDatabaseCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerDatabaseCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_MySqlFlexibleServerDatabaseCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateADatabase() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-01-preview/examples/DatabaseCreate.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/stable/2023-12-30/examples/DatabaseCreate.json // this example is just showing the usage of "Databases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task CreateOrUpdate_CreateADatabase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetADatabase() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-01-preview/examples/DatabaseGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/stable/2023-12-30/examples/DatabaseGet.json // this example is just showing the usage of "Databases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task Get_GetADatabase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetADatabase() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-01-preview/examples/DatabaseGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/stable/2023-12-30/examples/DatabaseGet.json // this example is just showing the usage of "Databases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task Exists_GetADatabase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetADatabase() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-01-preview/examples/DatabaseGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/stable/2023-12-30/examples/DatabaseGet.json // this example is just showing the usage of "Databases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -169,7 +169,7 @@ public async Task GetIfExists_GetADatabase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListDatabasesInAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-01-preview/examples/DatabasesListByServer.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/stable/2023-12-30/examples/DatabasesListByServer.json // this example is just showing the usage of "Databases_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerDatabaseResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerDatabaseResource.cs index 7c64e82eafc86..27abb68a9fc66 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerDatabaseResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerDatabaseResource.cs @@ -19,7 +19,7 @@ public partial class Sample_MySqlFlexibleServerDatabaseResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateADatabase() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-01-preview/examples/DatabaseCreate.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/stable/2023-12-30/examples/DatabaseCreate.json // this example is just showing the usage of "Databases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task Update_CreateADatabase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteADatabase() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-01-preview/examples/DatabaseDelete.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/stable/2023-12-30/examples/DatabaseDelete.json // this example is just showing the usage of "Databases_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Delete_DeleteADatabase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetADatabase() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/preview/2023-06-01-preview/examples/DatabaseGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Databases/stable/2023-12-30/examples/DatabaseGet.json // this example is just showing the usage of "Databases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerFirewallRuleCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerFirewallRuleCollection.cs index faedaac4de0fe..de80bffb3bea5 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerFirewallRuleCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerFirewallRuleCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MySqlFlexibleServerFirewallRuleCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateAFirewallRule() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-01-preview/examples/FirewallRuleCreate.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/stable/2023-12-30/examples/FirewallRuleCreate.json // this example is just showing the usage of "FirewallRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task CreateOrUpdate_CreateAFirewallRule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAFirewallRule() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-01-preview/examples/FirewallRuleGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/stable/2023-12-30/examples/FirewallRuleGet.json // this example is just showing the usage of "FirewallRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_GetAFirewallRule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAFirewallRule() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-01-preview/examples/FirewallRuleGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/stable/2023-12-30/examples/FirewallRuleGet.json // this example is just showing the usage of "FirewallRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_GetAFirewallRule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAFirewallRule() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-01-preview/examples/FirewallRuleGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/stable/2023-12-30/examples/FirewallRuleGet.json // this example is just showing the usage of "FirewallRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_GetAFirewallRule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAllFirewallRulesInAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-01-preview/examples/FirewallRulesListByServer.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/stable/2023-12-30/examples/FirewallRulesListByServer.json // this example is just showing the usage of "FirewallRules_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerFirewallRuleResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerFirewallRuleResource.cs index 2af233a92bb8e..910945223c77a 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerFirewallRuleResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerFirewallRuleResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MySqlFlexibleServerFirewallRuleResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateAFirewallRule() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-01-preview/examples/FirewallRuleCreate.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/stable/2023-12-30/examples/FirewallRuleCreate.json // this example is just showing the usage of "FirewallRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Update_CreateAFirewallRule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAFirewallRule() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-01-preview/examples/FirewallRuleDelete.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/stable/2023-12-30/examples/FirewallRuleDelete.json // this example is just showing the usage of "FirewallRules_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task Delete_DeleteAFirewallRule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAFirewallRule() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/preview/2023-06-01-preview/examples/FirewallRuleGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Firewall/stable/2023-12-30/examples/FirewallRuleGet.json // this example is just showing the usage of "FirewallRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerMaintenanceCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerMaintenanceCollection.cs index 785891e13357b..9683a1ce3a905 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerMaintenanceCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerMaintenanceCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_MySqlFlexibleServerMaintenanceCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ReadAMaintenance() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Maintenance/preview/2023-10-01-preview/examples/MaintenanceRead.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Maintenance/stable/2023-12-30/examples/MaintenanceRead.json // this example is just showing the usage of "Maintenances_Read" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_ReadAMaintenance() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ReadAMaintenance() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Maintenance/preview/2023-10-01-preview/examples/MaintenanceRead.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Maintenance/stable/2023-12-30/examples/MaintenanceRead.json // this example is just showing the usage of "Maintenances_Read" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Exists_ReadAMaintenance() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_ReadAMaintenance() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Maintenance/preview/2023-10-01-preview/examples/MaintenanceRead.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Maintenance/stable/2023-12-30/examples/MaintenanceRead.json // this example is just showing the usage of "Maintenances_Read" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,7 +128,7 @@ public async Task GetIfExists_ReadAMaintenance() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListMaintenancesOnAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Maintenance/preview/2023-10-01-preview/examples/MaintenancesListByServer.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Maintenance/stable/2023-12-30/examples/MaintenancesListByServer.json // this example is just showing the usage of "Maintenances_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerMaintenanceResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerMaintenanceResource.cs index 256a6bc53f160..2bed241ec5212 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerMaintenanceResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerMaintenanceResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MySqlFlexibleServerMaintenanceResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ReadAMaintenance() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Maintenance/preview/2023-10-01-preview/examples/MaintenanceRead.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Maintenance/stable/2023-12-30/examples/MaintenanceRead.json // this example is just showing the usage of "Maintenances_Read" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_ReadAMaintenance() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateMaintenanceOnAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Maintenance/preview/2023-10-01-preview/examples/MaintenanceUpdate.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Maintenance/stable/2023-12-30/examples/MaintenanceUpdate.json // this example is just showing the usage of "Maintenances_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerResource.cs index 496a18d7ec733..24715119dbc82 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServerResource.cs @@ -22,7 +22,7 @@ public partial class Sample_MySqlFlexibleServerResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateBackupAndExport_CreateAndExportBackup() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/BackupAndExport.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/BackupAndExport.json // this example is just showing the usage of "BackupAndExport_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task CreateBackupAndExport_CreateAndExportBackup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ValidateBackup_ValidateBackup() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/preview/2023-10-01-preview/examples/ValidateBackup.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Backups/stable/2023-12-30/examples/ValidateBackup.json // this example is just showing the usage of "BackupAndExport_ValidateBackup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -81,7 +81,7 @@ public async Task ValidateBackup_ValidateBackup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task UpdateConfigurations_ConfigurationList() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/preview/2023-06-01-preview/examples/ConfigurationsBatchUpdate.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/Configurations/stable/2023-12-30/examples/ConfigurationsBatchUpdate.json // this example is just showing the usage of "Configurations_BatchUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -125,7 +125,7 @@ public async Task UpdateConfigurations_ConfigurationList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-12-01-preview/examples/ServerUpdate.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerUpdate.json // this example is just showing the usage of "Servers_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -171,7 +171,7 @@ public async Task Update_UpdateAServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateServerCustomerMaintenanceWindow() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-12-01-preview/examples/ServerUpdateWithCustomerMaintenanceWindow.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerUpdateWithCustomerMaintenanceWindow.json // this example is just showing the usage of "Servers_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -213,7 +213,7 @@ public async Task Update_UpdateServerCustomerMaintenanceWindow() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateServerWithByok() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-12-01-preview/examples/ServerUpdateWithBYOK.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerUpdateWithBYOK.json // this example is just showing the usage of "Servers_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -263,7 +263,7 @@ public async Task Update_UpdateServerWithByok() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-12-01-preview/examples/ServerDelete.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerDelete.json // this example is just showing the usage of "Servers_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -290,7 +290,7 @@ public async Task Delete_DeleteAServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-12-01-preview/examples/ServerGet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerGet.json // this example is just showing the usage of "Servers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -321,7 +321,7 @@ public async Task Get_GetAServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAServerWithVnet() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-12-01-preview/examples/ServerGetWithVnet.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerGetWithVnet.json // this example is just showing the usage of "Servers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -352,7 +352,7 @@ public async Task Get_GetAServerWithVnet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetMySqlFlexibleServers_ListServersInASubscription() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-12-01-preview/examples/ServersList.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServersList.json // this example is just showing the usage of "Servers_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -384,7 +384,7 @@ public async Task GetMySqlFlexibleServers_ListServersInASubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Failover_RestartAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-12-01-preview/examples/ServerFailover.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerFailover.json // this example is just showing the usage of "Servers_Failover" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -411,7 +411,7 @@ public async Task Failover_RestartAServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ValidateEstimateHighAvailability_ValidateAValidationAndEstimationOfHighAvailability() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-12-01-preview/examples/ServerValidateEstimateHighAvailability.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerValidateEstimateHighAvailability.json // this example is just showing the usage of "Servers_ValidateEstimateHighAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -442,7 +442,7 @@ public async Task ValidateEstimateHighAvailability_ValidateAValidationAndEstimat [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Restart_RestartAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-12-01-preview/examples/ServerRestart.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerRestart.json // this example is just showing the usage of "Servers_Restart" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -474,7 +474,7 @@ public async Task Restart_RestartAServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Start_StartAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-12-01-preview/examples/ServerStart.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerStart.json // this example is just showing the usage of "Servers_Start" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -501,7 +501,7 @@ public async Task Start_StartAServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Stop_StopAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-12-01-preview/examples/ServerStop.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerStop.json // this example is just showing the usage of "Servers_Stop" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -528,7 +528,7 @@ public async Task Stop_StopAServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ResetGtid_ResetGTIDOnAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-12-01-preview/examples/ServerResetGtid.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/ServerResetGtid.json // this example is just showing the usage of "Servers_ResetGtid" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -559,7 +559,7 @@ public async Task ResetGtid_ResetGTIDOnAServer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CutoverMigrationServersMigration_CutoverMigrationForMySQLImport() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/preview/2023-12-01-preview/examples/CutoverMigration.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers/stable/2023-12-30/examples/CutoverMigration.json // this example is just showing the usage of "ServersMigration_CutoverMigration" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -591,7 +591,7 @@ public async Task CutoverMigrationServersMigration_CutoverMigrationForMySQLImpor [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetLogFiles_ListAllServerLogFilesForAServer() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/LogFiles/preview/2023-06-01-preview/examples/LogFilesListByServer.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/LogFiles/stable/2023-12-30/examples/LogFilesListByServer.json // this example is just showing the usage of "LogFiles_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServersCapabilityCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServersCapabilityCollection.cs index 366b6dcbb5ab2..515c25a247488 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServersCapabilityCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServersCapabilityCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MySqlFlexibleServersCapabilityCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_CapabilitySetsResult() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2023-12-01-preview/examples/CapabilitySetListByLocation.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CapabilitySetListByLocation.json // this example is just showing the usage of "LocationBasedCapabilitySet_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_CapabilitySetsResult() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_CapabilityResult() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2023-12-01-preview/examples/CapabilitySetByLocation.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CapabilitySetByLocation.json // this example is just showing the usage of "LocationBasedCapabilitySet_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,7 +90,7 @@ public async Task Get_CapabilityResult() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_CapabilityResult() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2023-12-01-preview/examples/CapabilitySetByLocation.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CapabilitySetByLocation.json // this example is just showing the usage of "LocationBasedCapabilitySet_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +120,7 @@ public async Task Exists_CapabilityResult() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_CapabilityResult() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2023-12-01-preview/examples/CapabilitySetByLocation.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CapabilitySetByLocation.json // this example is just showing the usage of "LocationBasedCapabilitySet_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServersCapabilityResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServersCapabilityResource.cs index 8579775497ab8..cf4ab29579c5f 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServersCapabilityResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_MySqlFlexibleServersCapabilityResource.cs @@ -19,7 +19,7 @@ public partial class Sample_MySqlFlexibleServersCapabilityResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_CapabilityResult() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2023-12-01-preview/examples/CapabilitySetByLocation.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CapabilitySetByLocation.json // this example is just showing the usage of "LocationBasedCapabilitySet_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index a2ab64e8ad066..04f233285008d 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_SubscriptionResourceExtensions [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetLocationBasedCapabilities_CapabilitiesList() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2023-12-01-preview/examples/CapabilitiesByLocationList.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CapabilitiesByLocationList.json // this example is just showing the usage of "LocationBasedCapabilities_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task GetLocationBasedCapabilities_CapabilitiesList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ExecuteCheckVirtualNetworkSubnetUsage_CheckVirtualNetworkSubnetUsage() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2023-12-01-preview/examples/CheckVirtualNetworkSubnetUsage.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CheckVirtualNetworkSubnetUsage.json // this example is just showing the usage of "CheckVirtualNetworkSubnetUsage_Execute" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task ExecuteCheckVirtualNetworkSubnetUsage_CheckVirtualNetworkSubne [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckMySqlFlexibleServerNameAvailability_CheckNameAvailability() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2023-12-01-preview/examples/CheckNameAvailability.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CheckNameAvailability.json // this example is just showing the usage of "CheckNameAvailability_Execute" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -110,7 +110,7 @@ public async Task CheckMySqlFlexibleServerNameAvailability_CheckNameAvailability [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckMySqlFlexibleServerNameAvailabilityWithoutLocation_CheckNameAvailability() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2023-12-01-preview/examples/CheckNameAvailability.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/CheckNameAvailability.json // this example is just showing the usage of "CheckNameAvailabilityWithoutLocation_Execute" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -139,7 +139,7 @@ public async Task CheckMySqlFlexibleServerNameAvailabilityWithoutLocation_CheckN [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetOperationResult_OperationResultsGet() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2023-12-01-preview/examples/OperationResults_Get.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/OperationResults_Get.json // this example is just showing the usage of "OperationResults_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_TenantResourceExtensions.cs b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_TenantResourceExtensions.cs index 46ea31625285a..f8d10c91d0170 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_TenantResourceExtensions.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/samples/Generated/Samples/Sample_TenantResourceExtensions.cs @@ -20,7 +20,7 @@ public partial class Sample_TenantResourceExtensions [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ExecuteGetPrivateDnsZoneSuffix_GetPrivateDnsZoneSuffix() { - // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/preview/2023-12-01-preview/examples/GetPrivateDnsZoneSuffix.json + // Generated from example definition: specification/mysql/resource-manager/Microsoft.DBforMySQL/ServiceOperations/stable/2023-12-30/examples/GetPrivateDnsZoneSuffix.json // this example is just showing the usage of "GetPrivateDnsZoneSuffix_Execute" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Azure.ResourceManager.MySql.csproj b/sdk/mysql/Azure.ResourceManager.MySql/src/Azure.ResourceManager.MySql.csproj index 0ac89ada63f7e..7a1e33b73507b 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Azure.ResourceManager.MySql.csproj +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Azure.ResourceManager.MySql.csproj @@ -1,6 +1,6 @@ - 1.1.0-beta.6 + 1.1.0 1.0.1 Azure.ResourceManager.MySql diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/AdvancedThreatProtectionCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/AdvancedThreatProtectionCollection.cs index e8816aae2bb0f..45e9c02ad6a8e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/AdvancedThreatProtectionCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/AdvancedThreatProtectionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task> Create /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -159,7 +159,7 @@ public virtual ArmOperation CreateOrUpdate(Wai /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -200,7 +200,7 @@ public virtual async Task> GetAsync(A /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response Get(AdvancedThreatProt /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual AsyncPageable GetAllAsync(Cance /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Pageable GetAll(CancellationTok /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -340,7 +340,7 @@ public virtual async Task> ExistsAsync(AdvancedThreatProtectionNa /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -379,7 +379,7 @@ public virtual Response Exists(AdvancedThreatProtectionName advancedThreat /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -420,7 +420,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/AdvancedThreatProtectionResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/AdvancedThreatProtectionResource.cs index fc717089cf395..8bdadebc36851 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/AdvancedThreatProtectionResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/AdvancedThreatProtectionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task> Update /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Extensions/FlexibleServersExtensions.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Extensions/FlexibleServersExtensions.cs index cca842ebb1741..2975b2c9421da 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Extensions/FlexibleServersExtensions.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Extensions/FlexibleServersExtensions.cs @@ -258,7 +258,7 @@ public static MySqlFlexibleServerCollection GetMySqlFlexibleServers(this Resourc /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -296,7 +296,7 @@ public static async Task> GetMySqlFlexible /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -352,7 +352,7 @@ public static MySqlFlexibleServersCapabilityCollection GetMySqlFlexibleServersCa /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -391,7 +391,7 @@ public static async Task> GetMy /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -430,7 +430,7 @@ public static Response GetMySqlFlexibleS /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -466,7 +466,7 @@ public static AsyncPageable GetMySqlFlexibleServers /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -502,7 +502,7 @@ public static Pageable GetMySqlFlexibleServers(this /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// @@ -535,7 +535,7 @@ public static AsyncPageable GetLocation /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// @@ -568,7 +568,7 @@ public static Pageable GetLocationBased /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// @@ -601,7 +601,7 @@ public static async Task /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// @@ -634,7 +634,7 @@ public static Response Execu /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// @@ -667,7 +667,7 @@ public static async Task> Ch /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// @@ -700,7 +700,7 @@ public static Response CheckMySqlFlex /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// @@ -732,7 +732,7 @@ public static async Task> Ch /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// @@ -764,7 +764,7 @@ public static Response CheckMySqlFlex /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// @@ -798,7 +798,7 @@ public static async Task> GetOperationRe /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// @@ -832,7 +832,7 @@ public static Response GetOperationResult(this Su /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// @@ -863,7 +863,7 @@ public static async Task /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Extensions/MockableMySqlFlexibleServersResourceGroupResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Extensions/MockableMySqlFlexibleServersResourceGroupResource.cs index c61bd0529fe18..253a4fb7ab5c3 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Extensions/MockableMySqlFlexibleServersResourceGroupResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Extensions/MockableMySqlFlexibleServersResourceGroupResource.cs @@ -53,7 +53,7 @@ public virtual MySqlFlexibleServerCollection GetMySqlFlexibleServers() /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task> GetMySqlFlexibl /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Extensions/MockableMySqlFlexibleServersSubscriptionResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Extensions/MockableMySqlFlexibleServersSubscriptionResource.cs index e567bc9f817b8..518dca6e15ff0 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Extensions/MockableMySqlFlexibleServersSubscriptionResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Extensions/MockableMySqlFlexibleServersSubscriptionResource.cs @@ -83,7 +83,7 @@ public virtual MySqlFlexibleServersCapabilityCollection GetMySqlFlexibleServersC /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> GetM /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -147,7 +147,7 @@ public virtual Response GetMySqlFlexible /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -177,7 +177,7 @@ public virtual AsyncPageable GetMySqlFlexibleServer /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual Pageable GetMySqlFlexibleServers(Can /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// @@ -234,7 +234,7 @@ public virtual AsyncPageable GetLocatio /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// @@ -261,7 +261,7 @@ public virtual Pageable GetLocationBase /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// @@ -300,7 +300,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// @@ -339,7 +339,7 @@ public virtual Response Exec /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// @@ -378,7 +378,7 @@ public virtual async Task> C /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// @@ -417,7 +417,7 @@ public virtual Response CheckMySqlFle /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// @@ -455,7 +455,7 @@ public virtual async Task> C /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// @@ -493,7 +493,7 @@ public virtual Response CheckMySqlFle /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// @@ -533,7 +533,7 @@ public virtual async Task> GetOperationR /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Extensions/MockableMySqlFlexibleServersTenantResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Extensions/MockableMySqlFlexibleServersTenantResource.cs index 5b934a8b7a214..e9198e9c3a37d 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Extensions/MockableMySqlFlexibleServersTenantResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/Extensions/MockableMySqlFlexibleServersTenantResource.cs @@ -54,7 +54,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// @@ -88,7 +88,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerAadAdministratorCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerAadAdministratorCollection.cs index bb51bc3a3a6bd..00be7936126f1 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerAadAdministratorCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerAadAdministratorCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -159,7 +159,7 @@ public virtual ArmOperation CreateO /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -200,7 +200,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response Get(MySqlFl /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual AsyncPageable GetAll /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Pageable GetAll(Canc /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -340,7 +340,7 @@ public virtual async Task> ExistsAsync(MySqlFlexibleServerAdminis /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -379,7 +379,7 @@ public virtual Response Exists(MySqlFlexibleServerAdministratorName admini /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -420,7 +420,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerAadAdministratorResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerAadAdministratorResource.cs index 3c9def6104c9c..5a565e90fd591 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerAadAdministratorResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerAadAdministratorResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Cancell /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupCollection.cs index f41595c697a37..6dd9d033ee06c 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Creat /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string backupName /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Canc /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationTo /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string backupName, Cancell /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string backupName, CancellationToken cancel /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupResource.cs index dee68c0660023..9aec86dbc0aa0 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task> Updat /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupV2Collection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupV2Collection.cs index dc86c8db3aa98..76c606199e45d 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupV2Collection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupV2Collection.cs @@ -69,7 +69,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -118,7 +118,7 @@ public virtual async Task> Cre /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string backupNa /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(Ca /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll(Cancellation /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string backupName, Cancell /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string backupName, CancellationToken cancel /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupV2Resource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupV2Resource.cs index fec64bcaaf23a..7b5c16d760e92 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupV2Resource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupV2Resource.cs @@ -106,7 +106,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -146,7 +146,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -186,7 +186,7 @@ public virtual Response Get(CancellationTok /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -232,7 +232,7 @@ public virtual async Task> Upd /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerCollection.cs index 26628d1774a74..f2c5df8ffa56c 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerCollection.cs @@ -69,7 +69,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -118,7 +118,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string serverName, Canc /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// @@ -348,7 +348,7 @@ public virtual AsyncPageable GetReplicasAsync(strin /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// @@ -379,7 +379,7 @@ public virtual Pageable GetReplicas(string serverNa /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -422,7 +422,7 @@ public virtual async Task> ExistsAsync(string serverName, Cancell /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -465,7 +465,7 @@ public virtual Response Exists(string serverName, CancellationToken cancel /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -510,7 +510,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerConfigurationCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerConfigurationCollection.cs index 472e8b7fe1f91..61bcfd718bc35 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerConfigurationCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerConfigurationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string con /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsy /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(string /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string configurationName, /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string configurationName, CancellationToken /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerConfigurationResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerConfigurationResource.cs index d19e43eb9d4e4..e4adc25ae9b89 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerConfigurationResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerConfigurationResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cancellati /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerDatabaseCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerDatabaseCollection.cs index 5110bea08288c..bbe4a648e560d 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerDatabaseCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerDatabaseCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Cre /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string database /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Ca /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancellation /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string databaseName, Cance /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string databaseName, CancellationToken canc /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerDatabaseResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerDatabaseResource.cs index 84810c9102f4d..6801dace96310 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerDatabaseResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerDatabaseResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationTok /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> Upd /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerFirewallRuleCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerFirewallRuleCollection.cs index 71b6961b3438d..3dba39f4e9834 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerFirewallRuleCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerFirewallRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpd /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string fire /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsyn /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancella /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string firewallRuleName, C /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string firewallRuleName, CancellationToken /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerFirewallRuleResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerFirewallRuleResource.cs index 48caaa5055518..4d9eb8bdce96d 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerFirewallRuleResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerFirewallRuleResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cancellatio /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerMaintenanceCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerMaintenanceCollection.cs index 569d1c7585508..db495fa99bc2f 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerMaintenanceCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerMaintenanceCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string maint /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(Cancellat /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string maintenanceName, Ca /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string maintenanceName, CancellationToken c /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerMaintenanceResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerMaintenanceResource.cs index 531554dd3f8b7..3453e3c8d919c 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerMaintenanceResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerMaintenanceResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Cancellation /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerResource.cs index 0b0499a7c8965..fb1e2460ee582 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerResource.cs @@ -128,7 +128,7 @@ public virtual MySqlFlexibleServerAadAdministratorCollection GetMySqlFlexibleSer /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -157,7 +157,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -193,7 +193,7 @@ public virtual MySqlFlexibleServerBackupCollection GetMySqlFlexibleServerBackups /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task> GetMySqlF /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -262,7 +262,7 @@ public virtual MySqlFlexibleServerBackupV2Collection GetMySqlFlexibleServerBacku /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -293,7 +293,7 @@ public virtual async Task> GetMySq /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -331,7 +331,7 @@ public virtual MySqlFlexibleServerConfigurationCollection GetMySqlFlexibleServer /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -362,7 +362,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual MySqlFlexibleServerDatabaseCollection GetMySqlFlexibleServerDatab /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -431,7 +431,7 @@ public virtual async Task> GetMySq /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -469,7 +469,7 @@ public virtual MySqlFlexibleServerFirewallRuleCollection GetMySqlFlexibleServerF /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -500,7 +500,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -538,7 +538,7 @@ public virtual AdvancedThreatProtectionCollection GetAdvancedThreatProtections() /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -567,7 +567,7 @@ public virtual async Task> GetAdvance /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -603,7 +603,7 @@ public virtual MySqlFlexibleServerMaintenanceCollection GetMySqlFlexibleServerMa /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -634,7 +634,7 @@ public virtual async Task> GetM /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// Resource @@ -665,7 +665,7 @@ public virtual Response GetMySqlFlexible /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -705,7 +705,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -745,7 +745,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -787,7 +787,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -829,7 +829,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -875,7 +875,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -921,7 +921,7 @@ public virtual ArmOperation Update(WaitUntil waitUn /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// @@ -963,7 +963,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// @@ -1005,7 +1005,7 @@ public virtual ArmOperation CreateBack /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// @@ -1039,7 +1039,7 @@ public virtual async Task> Val /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2023-12-30 /// /// /// @@ -1073,7 +1073,7 @@ public virtual Response ValidateBackup( /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -1119,7 +1119,7 @@ public virtual async Task> Updat /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// Resource @@ -1165,7 +1165,7 @@ public virtual ArmOperation UpdateConfigurati /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -1207,7 +1207,7 @@ public virtual async Task FailoverAsync(WaitUntil waitUntil, Cance /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -1249,7 +1249,7 @@ public virtual ArmOperation Failover(WaitUntil waitUntil, CancellationToken canc /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -1291,7 +1291,7 @@ public virtual async Task> Valida /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -1333,7 +1333,7 @@ public virtual Response ValidateEstimateHi /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -1379,7 +1379,7 @@ public virtual async Task RestartAsync(WaitUntil waitUntil, MySqlF /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -1425,7 +1425,7 @@ public virtual ArmOperation Restart(WaitUntil waitUntil, MySqlFlexibleServerRest /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -1467,7 +1467,7 @@ public virtual async Task StartAsync(WaitUntil waitUntil, Cancella /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -1509,7 +1509,7 @@ public virtual ArmOperation Start(WaitUntil waitUntil, CancellationToken cancell /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -1551,7 +1551,7 @@ public virtual async Task StopAsync(WaitUntil waitUntil, Cancellat /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -1593,7 +1593,7 @@ public virtual ArmOperation Stop(WaitUntil waitUntil, CancellationToken cancella /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -1639,7 +1639,7 @@ public virtual async Task ResetGtidAsync(WaitUntil waitUntil, MySq /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -1685,7 +1685,7 @@ public virtual ArmOperation ResetGtid(WaitUntil waitUntil, MySqlFlexibleServerGt /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// @@ -1723,7 +1723,7 @@ public virtual async Task> CutoverMigr /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// @@ -1761,7 +1761,7 @@ public virtual ArmOperation CutoverMigrationServers /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// @@ -1787,7 +1787,7 @@ public virtual AsyncPageable GetLogFilesAsync(Cancel /// /// /// Default Api Version - /// 2023-06-01-preview + /// 2023-12-30 /// /// /// @@ -1813,7 +1813,7 @@ public virtual Pageable GetLogFiles(CancellationToke /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -1875,7 +1875,7 @@ public virtual async Task> AddTagAsync(str /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -1937,7 +1937,7 @@ public virtual Response AddTag(string key, string v /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -1994,7 +1994,7 @@ public virtual async Task> SetTagsAsync(ID /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -2051,7 +2051,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -2111,7 +2111,7 @@ public virtual async Task> RemoveTagAsync( /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServersCapabilityCollection.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServersCapabilityCollection.cs index e641c487b79b1..ca34891d168ed 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServersCapabilityCollection.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServersCapabilityCollection.cs @@ -68,7 +68,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -158,7 +158,7 @@ public virtual Response Get(string capab /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -188,7 +188,7 @@ public virtual AsyncPageable GetAllAsync /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -218,7 +218,7 @@ public virtual Pageable GetAll(Cancellat /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -261,7 +261,7 @@ public virtual async Task> ExistsAsync(string capabilitySetName, /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -304,7 +304,7 @@ public virtual Response Exists(string capabilitySetName, CancellationToken /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -349,7 +349,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServersCapabilityResource.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServersCapabilityResource.cs index 956b50d736f26..95e0bea7b9875 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServersCapabilityResource.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServersCapabilityResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2023-12-01-preview + /// 2023-12-30 /// /// /// Resource diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/AdvancedThreatProtectionSettingsRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/AdvancedThreatProtectionSettingsRestOperations.cs index 5e433c0bb55a9..65f4e8d32e322 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/AdvancedThreatProtectionSettingsRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/AdvancedThreatProtectionSettingsRestOperations.cs @@ -32,7 +32,7 @@ public AdvancedThreatProtectionSettingsRestOperations(HttpPipeline pipeline, str { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-12-01-preview"; + _apiVersion = apiVersion ?? "2023-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/AzureADAdministratorsRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/AzureADAdministratorsRestOperations.cs index 6ce79de2948e2..b93a070a248a1 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/AzureADAdministratorsRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/AzureADAdministratorsRestOperations.cs @@ -32,7 +32,7 @@ public AzureADAdministratorsRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01-preview"; + _apiVersion = apiVersion ?? "2023-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/BackupAndExportRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/BackupAndExportRestOperations.cs index 55f10318b9094..394107e91ed1a 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/BackupAndExportRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/BackupAndExportRestOperations.cs @@ -32,7 +32,7 @@ public BackupAndExportRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-10-01-preview"; + _apiVersion = apiVersion ?? "2023-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/BackupsRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/BackupsRestOperations.cs index 214eef5e2f157..c65e5c3306206 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/BackupsRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/BackupsRestOperations.cs @@ -32,7 +32,7 @@ public BackupsRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-10-01-preview"; + _apiVersion = apiVersion ?? "2023-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/CheckNameAvailabilityRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/CheckNameAvailabilityRestOperations.cs index a30074c99dae8..e21b75fd56f59 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/CheckNameAvailabilityRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/CheckNameAvailabilityRestOperations.cs @@ -32,7 +32,7 @@ public CheckNameAvailabilityRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-12-01-preview"; + _apiVersion = apiVersion ?? "2023-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/CheckNameAvailabilityWithoutLocationRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/CheckNameAvailabilityWithoutLocationRestOperations.cs index e853c8a88106f..f4cd8d92c8fda 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/CheckNameAvailabilityWithoutLocationRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/CheckNameAvailabilityWithoutLocationRestOperations.cs @@ -32,7 +32,7 @@ public CheckNameAvailabilityWithoutLocationRestOperations(HttpPipeline pipeline, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-12-01-preview"; + _apiVersion = apiVersion ?? "2023-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/CheckVirtualNetworkSubnetUsageRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/CheckVirtualNetworkSubnetUsageRestOperations.cs index 6ecaaa6ae5feb..53511c0ed29cb 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/CheckVirtualNetworkSubnetUsageRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/CheckVirtualNetworkSubnetUsageRestOperations.cs @@ -32,7 +32,7 @@ public CheckVirtualNetworkSubnetUsageRestOperations(HttpPipeline pipeline, strin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-12-01-preview"; + _apiVersion = apiVersion ?? "2023-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/ConfigurationsRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/ConfigurationsRestOperations.cs index 2ba986bda649d..b032c28b5c358 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/ConfigurationsRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/ConfigurationsRestOperations.cs @@ -32,7 +32,7 @@ public ConfigurationsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01-preview"; + _apiVersion = apiVersion ?? "2023-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/DatabasesRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/DatabasesRestOperations.cs index c7aa697e0769e..39f753d4a1d05 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/DatabasesRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/DatabasesRestOperations.cs @@ -32,7 +32,7 @@ public DatabasesRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01-preview"; + _apiVersion = apiVersion ?? "2023-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/FirewallRulesRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/FirewallRulesRestOperations.cs index 4f2403f8b5ac5..d90a28d02906c 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/FirewallRulesRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/FirewallRulesRestOperations.cs @@ -32,7 +32,7 @@ public FirewallRulesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01-preview"; + _apiVersion = apiVersion ?? "2023-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/GetPrivateDnsZoneSuffixRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/GetPrivateDnsZoneSuffixRestOperations.cs index 947c61d5b77fe..16e4a511ca124 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/GetPrivateDnsZoneSuffixRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/GetPrivateDnsZoneSuffixRestOperations.cs @@ -32,7 +32,7 @@ public GetPrivateDnsZoneSuffixRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-12-01-preview"; + _apiVersion = apiVersion ?? "2023-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/LocationBasedCapabilitiesRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/LocationBasedCapabilitiesRestOperations.cs index f2cb7a3aee969..1ecf65ece7fae 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/LocationBasedCapabilitiesRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/LocationBasedCapabilitiesRestOperations.cs @@ -32,7 +32,7 @@ public LocationBasedCapabilitiesRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-12-01-preview"; + _apiVersion = apiVersion ?? "2023-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/LocationBasedCapabilitySetRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/LocationBasedCapabilitySetRestOperations.cs index 8671dc661c01b..5fbd06571ffaa 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/LocationBasedCapabilitySetRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/LocationBasedCapabilitySetRestOperations.cs @@ -32,7 +32,7 @@ public LocationBasedCapabilitySetRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-12-01-preview"; + _apiVersion = apiVersion ?? "2023-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/LogFilesRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/LogFilesRestOperations.cs index 0f1f647928376..0608d01ce2dd7 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/LogFilesRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/LogFilesRestOperations.cs @@ -32,7 +32,7 @@ public LogFilesRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-06-01-preview"; + _apiVersion = apiVersion ?? "2023-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/LongRunningBackupRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/LongRunningBackupRestOperations.cs index 8be0f6058d497..91264145e3324 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/LongRunningBackupRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/LongRunningBackupRestOperations.cs @@ -30,7 +30,7 @@ public LongRunningBackupRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-10-01-preview"; + _apiVersion = apiVersion ?? "2023-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/LongRunningBackupsRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/LongRunningBackupsRestOperations.cs index c023e10601c6f..be47809b5d743 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/LongRunningBackupsRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/LongRunningBackupsRestOperations.cs @@ -32,7 +32,7 @@ public LongRunningBackupsRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-10-01-preview"; + _apiVersion = apiVersion ?? "2023-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/MaintenancesRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/MaintenancesRestOperations.cs index 188abba730f16..57dc822651163 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/MaintenancesRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/MaintenancesRestOperations.cs @@ -32,7 +32,7 @@ public MaintenancesRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-10-01-preview"; + _apiVersion = apiVersion ?? "2023-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/OperationResultsRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/OperationResultsRestOperations.cs index 39fbb5249b688..449169a3ed967 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/OperationResultsRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/OperationResultsRestOperations.cs @@ -32,7 +32,7 @@ public OperationResultsRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-12-01-preview"; + _apiVersion = apiVersion ?? "2023-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/ReplicasRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/ReplicasRestOperations.cs index 8f34a38ec41b3..8875807c7e7be 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/ReplicasRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/ReplicasRestOperations.cs @@ -32,7 +32,7 @@ public ReplicasRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-12-01-preview"; + _apiVersion = apiVersion ?? "2023-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/ServersMigrationRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/ServersMigrationRestOperations.cs index 4cd381c4fead2..bb57de9f3d38d 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/ServersMigrationRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/ServersMigrationRestOperations.cs @@ -30,7 +30,7 @@ public ServersMigrationRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-12-01-preview"; + _apiVersion = apiVersion ?? "2023-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/ServersRestOperations.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/ServersRestOperations.cs index 2c9f3492c4e64..90739f6b28864 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/ServersRestOperations.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/RestOperations/ServersRestOperations.cs @@ -32,7 +32,7 @@ public ServersRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-12-01-preview"; + _apiVersion = apiVersion ?? "2023-12-30"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/autorest.md b/sdk/mysql/Azure.ResourceManager.MySql/src/autorest.md index 7be70977b42c3..ca0d26e1e5af2 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/autorest.md +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/autorest.md @@ -14,7 +14,7 @@ use-model-reader-writer: true batch: - tag: package-2020-01-01 - - tag: package-flexibleserver-2023-12-01-preview + - tag: package-flexibleserver-2024-01-01 ``` ``` yaml $(tag) == 'package-2020-01-01' @@ -185,11 +185,9 @@ directive: ``` -``` yaml $(tag) == 'package-flexibleserver-2023-12-01-preview' -input-file: -- https://github.com/Azure/azure-rest-api-specs/blob/c45a7f47c1901149828eb8a33c74898c554659c0/specification/common-types/resource-management/v5/privatelinks.json +``` yaml $(tag) == 'package-flexibleserver-2024-01-01' namespace: Azure.ResourceManager.MySql.FlexibleServers -require: https://github.com/Azure/azure-rest-api-specs/blob/c45a7f47c1901149828eb8a33c74898c554659c0/specification/mysql/resource-manager/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/928047803788f7377fa003a26ba2bdc2e0fcccc0/specification/mysql/resource-manager/readme.md output-folder: $(this-folder)/MySqlFlexibleServers/Generated sample-gen: output-folder: $(this-folder)/../samples/Generated From da8fb5cadd1556211e6827513dd67b1b70359ebe Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 18 Jul 2024 09:23:04 -0400 Subject: [PATCH 116/144] Increment package version after release of Azure.ResourceManager.MySql (#45067) --- sdk/mysql/Azure.ResourceManager.MySql/CHANGELOG.md | 12 +++++++++++- .../src/Azure.ResourceManager.MySql.csproj | 4 ++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/sdk/mysql/Azure.ResourceManager.MySql/CHANGELOG.md b/sdk/mysql/Azure.ResourceManager.MySql/CHANGELOG.md index ad09426856746..08b062e0a2762 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/CHANGELOG.md +++ b/sdk/mysql/Azure.ResourceManager.MySql/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.2.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.1.0 (2024-07-18) ### Features Added @@ -119,4 +129,4 @@ This package follows the [new Azure SDK guidelines](https://azure.github.io/azur This package is a Public Preview version, so expect incompatible changes in subsequent releases as we improve the product. To provide feedback, submit an issue in our [Azure SDK for .NET GitHub repo](https://github.com/Azure/azure-sdk-for-net/issues). -> NOTE: For more information about unified authentication, please refer to [Microsoft Azure Identity documentation for .NET](https://docs.microsoft.com//dotnet/api/overview/azure/identity-readme?view=azure-dotnet). \ No newline at end of file +> NOTE: For more information about unified authentication, please refer to [Microsoft Azure Identity documentation for .NET](https://docs.microsoft.com//dotnet/api/overview/azure/identity-readme?view=azure-dotnet). diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/Azure.ResourceManager.MySql.csproj b/sdk/mysql/Azure.ResourceManager.MySql/src/Azure.ResourceManager.MySql.csproj index 7a1e33b73507b..844d3099e04e9 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/Azure.ResourceManager.MySql.csproj +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/Azure.ResourceManager.MySql.csproj @@ -1,8 +1,8 @@ - 1.1.0 + 1.2.0-beta.1 - 1.0.1 + 1.1.0 Azure.ResourceManager.MySql Microsoft Azure Resource Manager client SDK for Azure resource provider Microsoft.DBforMySQL. azure;management;arm;resource manager;mysql From e7f5a9173ae510ee6a9598bb8d7a5752e3202eff Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 18 Jul 2024 09:23:28 -0400 Subject: [PATCH 117/144] Increment package version after release of Azure.Search.Documents (#45062) --- sdk/search/Azure.Search.Documents/CHANGELOG.md | 10 ++++++++++ .../src/Azure.Search.Documents.csproj | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/sdk/search/Azure.Search.Documents/CHANGELOG.md b/sdk/search/Azure.Search.Documents/CHANGELOG.md index 4f3b10bb446e2..df66ebdebc966 100644 --- a/sdk/search/Azure.Search.Documents/CHANGELOG.md +++ b/sdk/search/Azure.Search.Documents/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 11.7.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 11.6.0 (2024-07-17) ### Features Added diff --git a/sdk/search/Azure.Search.Documents/src/Azure.Search.Documents.csproj b/sdk/search/Azure.Search.Documents/src/Azure.Search.Documents.csproj index 61eee85fb9532..91aa966280c02 100644 --- a/sdk/search/Azure.Search.Documents/src/Azure.Search.Documents.csproj +++ b/sdk/search/Azure.Search.Documents/src/Azure.Search.Documents.csproj @@ -1,9 +1,9 @@ Microsoft Azure.Search.Documents client library - 11.6.0 + 11.7.0-beta.1 - 11.5.1 + 11.6.0 This is the Azure Cognitive Search client library for developing .NET applications with rich search experiences. It enables you to query your From b7af93c33076c8c050e0f61e8c6ad47570ec5fc2 Mon Sep 17 00:00:00 2001 From: Minghao Chen <30464227+HarveyLink@users.noreply.github.com> Date: Thu, 18 Jul 2024 22:14:18 +0800 Subject: [PATCH 118/144] [AppService] Bump api version to 2023-12-01 (#43706) --- .vscode/cspell.json | 6 +- .../Azure.ResourceManager.AppService.sln | 14 - .../CHANGELOG.md | 26 +- ...sourceManager.AppService.netstandard2.0.cs | 2414 +++++++- .../Sample_AppCertificateCollection.cs | 10 +- .../Samples/Sample_AppCertificateResource.cs | 8 +- .../Sample_AppServiceCertificateCollection.cs | 204 + ...le_AppServiceCertificateOrderCollection.cs | 217 + ...mple_AppServiceCertificateOrderResource.cs | 405 ++ .../Sample_AppServiceCertificateResource.cs | 115 + .../Sample_AppServiceDomainCollection.cs | 247 + .../Sample_AppServiceDomainResource.cs | 205 +- .../Sample_AppServiceEnvironmentCollection.cs | 201 + .../Sample_AppServiceEnvironmentResource.cs | 490 +- .../Sample_AppServicePlanCollection.cs | 10 +- .../Samples/Sample_AppServicePlanResource.cs | 8 +- ...le_AseV3NetworkingConfigurationResource.cs | 85 + ...mple_CertificateOrderDetectorCollection.cs | 8 +- ...Sample_CertificateOrderDetectorResource.cs | 2 +- ...le_CustomDnsSuffixConfigurationResource.cs | 114 + .../Samples/Sample_DeletedSiteCollection.cs | 6 +- .../Samples/Sample_DeletedSiteResource.cs | 8 +- ...ple_DomainOwnershipIdentifierCollection.cs | 203 + ...ample_DomainOwnershipIdentifierResource.cs | 113 + ...le_HostingEnvironmentDetectorCollection.cs | 8 +- ...mple_HostingEnvironmentDetectorResource.cs | 2 +- ...HostingEnvironmentMultiRolePoolResource.cs | 243 + ...mentPrivateEndpointConnectionCollection.cs | 208 + ...onmentPrivateEndpointConnectionResource.cs | 120 + ..._HostingEnvironmentWorkerPoolCollection.cs | 204 + ...le_HostingEnvironmentWorkerPoolResource.cs | 212 + .../Sample_KubeEnvironmentCollection.cs | 10 +- .../Samples/Sample_KubeEnvironmentResource.cs | 8 +- .../Sample_ResourceGroupResourceExtensions.cs | 2 +- ...asicPublishingCredentialsPolicyResource.cs | 4 +- ...asicPublishingCredentialsPolicyResource.cs | 4 +- .../Samples/Sample_SiteBackupCollection.cs | 163 + .../Samples/Sample_SiteBackupResource.cs | 182 + .../Sample_SiteConfigAppsettingCollection.cs | 8 +- .../Sample_SiteConfigAppsettingResource.cs | 2 +- .../Samples/Sample_SiteDetectorCollection.cs | 16 +- .../Samples/Sample_SiteDetectorResource.cs | 4 +- ...Sample_SiteDiagnosticAnalysisCollection.cs | 16 +- .../Sample_SiteDiagnosticAnalysisResource.cs | 8 +- .../Sample_SiteDiagnosticCollection.cs | 16 +- ...Sample_SiteDiagnosticDetectorCollection.cs | 16 +- .../Sample_SiteDiagnosticDetectorResource.cs | 8 +- .../Samples/Sample_SiteDiagnosticResource.cs | 4 +- .../Samples/Sample_SiteInstanceCollection.cs | 6 +- .../Samples/Sample_SiteInstanceResource.cs | 2 +- ...SitePrivateEndpointConnectionCollection.cs | 12 +- ...e_SitePrivateEndpointConnectionResource.cs | 10 +- .../Sample_SiteSlotDetectorCollection.cs | 16 +- .../Sample_SiteSlotDetectorResource.cs | 4 +- ...le_SiteSlotDiagnosticAnalysisCollection.cs | 16 +- ...mple_SiteSlotDiagnosticAnalysisResource.cs | 8 +- .../Sample_SiteSlotDiagnosticCollection.cs | 16 +- ...le_SiteSlotDiagnosticDetectorCollection.cs | 16 +- ...mple_SiteSlotDiagnosticDetectorResource.cs | 8 +- .../Sample_SiteSlotDiagnosticResource.cs | 4 +- .../Sample_SiteSlotInstanceCollection.cs | 6 +- .../Sample_SiteSlotInstanceResource.cs | 2 +- ...SlotPrivateEndpointConnectionCollection.cs | 12 +- ...teSlotPrivateEndpointConnectionResource.cs | 10 +- .../Sample_SiteSlotWorkflowCollection.cs | 167 + .../Sample_SiteSlotWorkflowResource.cs | 50 + .../Samples/Sample_SiteWorkflowCollection.cs | 163 + .../Samples/Sample_SiteWorkflowResource.cs | 49 + ...e_StaticSiteBasicAuthPropertyCollection.cs | 209 + ...ple_StaticSiteBasicAuthPropertyResource.cs | 92 + .../Sample_StaticSiteBuildCollection.cs | 8 +- ...icSiteBuildDatabaseConnectionCollection.cs | 211 + ...aticSiteBuildDatabaseConnectionResource.cs | 147 + ..._StaticSiteBuildLinkedBackendCollection.cs | 209 + ...le_StaticSiteBuildLinkedBackendResource.cs | 152 + .../Samples/Sample_StaticSiteBuildResource.cs | 48 +- ...eBuildUserProvidedFunctionAppCollection.cs | 10 +- ...iteBuildUserProvidedFunctionAppResource.cs | 6 +- .../Samples/Sample_StaticSiteCollection.cs | 10 +- ...taticSiteCustomDomainOverviewCollection.cs | 10 +- ..._StaticSiteCustomDomainOverviewResource.cs | 8 +- ..._StaticSiteDatabaseConnectionCollection.cs | 206 + ...le_StaticSiteDatabaseConnectionResource.cs | 143 + ...ample_StaticSiteLinkedBackendCollection.cs | 204 + .../Sample_StaticSiteLinkedBackendResource.cs | 148 + ...SitePrivateEndpointConnectionCollection.cs | 14 +- ...icSitePrivateEndpointConnectionResource.cs | 10 +- .../Samples/Sample_StaticSiteResource.cs | 69 +- ...icSiteUserProvidedFunctionAppCollection.cs | 10 +- ...aticSiteUserProvidedFunctionAppResource.cs | 6 +- .../Sample_SubscriptionResourceExtensions.cs | 253 +- .../Sample_TenantResourceExtensions.cs | 14 +- .../Sample_TopLevelDomainCollection.cs | 8 +- .../Samples/Sample_TopLevelDomainResource.cs | 4 +- .../Sample_WebAppRequestHistoryCollection.cs | 179 + .../Sample_WebAppRequestHistoryResource.cs | 53 + .../Samples/Sample_WebSiteCollection.cs | 417 ++ .../Samples/Sample_WebSiteConfigResource.cs | 130 + ...eFtpPublishingCredentialsPolicyResource.cs | 4 +- .../Samples/Sample_WebSiteResource.cs | 893 ++- ...e_WebSiteResourceHealthMetadataResource.cs | 2 +- .../Samples/Sample_WebSiteSlotCollection.cs | 259 + ...e_WebSiteSlotConfigAppSettingCollection.cs | 8 +- ...ple_WebSiteSlotConfigAppSettingResource.cs | 2 +- ...tFtpPublishingCredentialsPolicyResource.cs | 4 +- .../Samples/Sample_WebSiteSlotResource.cs | 317 +- ...bSiteSlotResourceHealthMetadataResource.cs | 2 +- .../Sample_WorkflowRunActionCollection.cs | 171 + ...e_WorkflowRunActionRepetitionCollection.cs | 175 + ...ple_WorkflowRunActionRepetitionResource.cs | 87 + .../Sample_WorkflowRunActionResource.cs | 85 + ...kflowRunActionScopeRepetitionCollection.cs | 175 + ...orkflowRunActionScopeRepetitionResource.cs | 52 + .../Samples/Sample_WorkflowRunCollection.cs | 167 + .../Samples/Sample_WorkflowRunResource.cs | 79 + .../Sample_WorkflowTriggerCollection.cs | 167 + ...Sample_WorkflowTriggerHistoryCollection.cs | 171 + .../Sample_WorkflowTriggerHistoryResource.cs | 81 + .../Samples/Sample_WorkflowTriggerResource.cs | 138 + .../Sample_WorkflowVersionCollection.cs | 167 + .../Samples/Sample_WorkflowVersionResource.cs | 50 + .../Azure.ResourceManager.AppService.csproj | 2 +- .../AppServiceEnvironmentResource.cs | 6 - .../src/Customization/HostNameBindingData.cs | 1 - ...mentPrivateEndpointConnectionCollection.cs | 87 + ...onmentPrivateEndpointConnectionResource.cs | 81 + .../Models/AppServiceCertificateEmail.cs | 16 + .../Models/AppServiceOperation.cs | 18 + .../Models/AppServiceSupportedTlsVersion.cs | 1 - ...erviceTableStorageApplicationLogsConfig.cs | 1 - .../Models/CertificateOrderAction.cs | 16 + .../Models/CsmDeploymentStatus.cs | 17 + .../Models/CustomHostnameAnalysisResult.cs | 15 + ...EnvelopeRemotePrivateEndpointConnection.cs | 14 + .../Customization/Models/WorkflowHealth.cs | 15 + .../RestOperations/WebAppsRestOperations.cs | 13 +- ...SitePrivateEndpointConnectionCollection.cs | 81 + .../SitePrivateEndpointConnectionResource.cs | 74 + ...SlotPrivateEndpointConnectionCollection.cs | 81 + ...teSlotPrivateEndpointConnectionResource.cs | 75 + ...SitePrivateEndpointConnectionCollection.cs | 81 + ...icSitePrivateEndpointConnectionResource.cs | 75 + .../WebSiteInstanceStatusData.cs | 2 - .../src/Customization/WebSiteResource.cs | 7 - .../src/Customization/WebSiteSlotResource.cs | 7 - ...bSiteSlotTriggeredWebJobHistoryResource.cs | 3 - .../WebSiteSlotTriggeredWebJobResource.cs | 4 +- .../WebSiteTriggeredWebJobHistoryResource.cs | 3 - .../WebSiteTriggeredwebJobResource.cs | 2 - .../src/Generated/AppCertificateCollection.cs | 20 +- .../src/Generated/AppCertificateResource.cs | 12 +- .../AppServiceCertificateCollection.cs | 20 +- .../AppServiceCertificateOrderCollection.cs | 20 +- .../AppServiceCertificateOrderResource.cs | 52 +- .../AppServiceCertificateResource.cs | 12 +- .../Generated/AppServiceDomainCollection.cs | 20 +- .../src/Generated/AppServiceDomainResource.cs | 96 +- .../AppServiceEnvironmentCollection.cs | 20 +- ...AppServiceEnvironmentData.Serialization.cs | 124 + .../Generated/AppServiceEnvironmentData.cs | 22 +- .../AppServiceEnvironmentResource.cs | 255 +- .../src/Generated/AppServicePlanCollection.cs | 20 +- .../AppServicePlanData.Serialization.cs | 31 + .../src/Generated/AppServicePlanData.cs | 7 +- ...ybridConnectionNamespaceRelayCollection.cs | 12 +- ...nHybridConnectionNamespaceRelayResource.cs | 16 +- .../src/Generated/AppServicePlanResource.cs | 48 +- ...ePlanVirtualNetworkConnectionCollection.cs | 16 +- ...rtualNetworkConnectionGatewayCollection.cs | 16 +- ...VirtualNetworkConnectionGatewayResource.cs | 8 +- ...icePlanVirtualNetworkConnectionResource.cs | 24 +- .../AppServiceSourceControlCollection.cs | 20 +- .../AppServiceSourceControlResource.cs | 8 +- .../Generated/ArmAppServiceModelFactory.cs | 1257 +++- ...tworkingConfigurationData.Serialization.cs | 99 + .../AseV3NetworkingConfigurationData.cs | 17 +- .../AseV3NetworkingConfigurationResource.cs | 8 +- .../CertificateOrderDetectorCollection.cs | 16 +- .../CertificateOrderDetectorResource.cs | 4 +- ...nsSuffixConfigurationData.Serialization.cs | 457 ++ .../CustomDnsSuffixConfigurationData.cs | 101 + ...ffixConfigurationResource.Serialization.cs | 26 + .../CustomDnsSuffixConfigurationResource.cs | 354 ++ .../src/Generated/DeletedSiteCollection.cs | 16 +- .../src/Generated/DeletedSiteResource.cs | 8 +- .../DomainOwnershipIdentifierCollection.cs | 20 +- .../DomainOwnershipIdentifierResource.cs | 12 +- .../Extensions/AppServiceExtensions.cs | 726 ++- .../Extensions/MockableAppServiceArmClient.cs | 216 + ...MockableAppServiceResourceGroupResource.cs | 36 +- .../MockableAppServiceSubscriptionResource.cs | 280 +- .../MockableAppServiceTenantResource.cs | 36 +- .../HostingEnvironmentDetectorCollection.cs | 16 +- .../HostingEnvironmentDetectorResource.cs | 4 +- ...HostingEnvironmentMultiRolePoolResource.cs | 28 +- ...mentPrivateEndpointConnectionCollection.cs | 45 +- ...onmentPrivateEndpointConnectionResource.cs | 37 +- ...tingEnvironmentRecommendationCollection.cs | 12 +- ...ostingEnvironmentRecommendationResource.cs | 8 +- .../HostingEnvironmentWorkerPoolCollection.cs | 20 +- .../HostingEnvironmentWorkerPoolResource.cs | 24 +- .../HybridConnectionLimitResource.cs | 4 +- .../Generated/KubeEnvironmentCollection.cs | 20 +- .../KubeEnvironmentData.Serialization.cs | 66 + .../src/Generated/KubeEnvironmentData.cs | 12 +- .../src/Generated/KubeEnvironmentResource.cs | 12 +- .../src/Generated/LogsSiteConfigResource.cs | 8 +- .../Generated/LogsSiteSlotConfigResource.cs | 8 +- .../CsmDeploymentStatusOperationSource.cs | 30 + ...icSiteBuildLinkedBackendOperationSource.cs | 38 + .../StaticSiteLinkedBackendOperationSource.cs | 38 + .../Generated/MigrateMySqlStatusResource.cs | 4 +- .../Models/AppDaprConfig.Serialization.cs | 353 ++ .../src/Generated/Models/AppDaprConfig.cs | 96 + .../src/Generated/Models/AppDaprLogLevel.cs | 57 + .../AppServiceAseRegion.Serialization.cs | 545 ++ .../Generated/Models/AppServiceAseRegion.cs | 104 + ...ppServiceCertificateEmail.Serialization.cs | 141 +- .../Models/AppServiceCertificateEmail.cs | 11 +- ...ppServiceEnvironmentPatch.Serialization.cs | 124 + .../Models/AppServiceEnvironmentPatch.cs | 22 +- ...viceEnvironmentProperties.Serialization.cs | 124 + .../Models/AppServiceEnvironmentProperties.cs | 22 +- ...ppServiceEnvironmentUpgradeAvailability.cs | 51 + .../AppServiceEnvironmentUpgradePreference.cs | 57 + .../src/Generated/Models/AppServiceKind.cs | 51 + .../AppServiceOperation.Serialization.cs | 21 +- .../Generated/Models/AppServiceOperation.cs | 3 - .../AppServicePlanPatch.Serialization.cs | 31 + .../Generated/Models/AppServicePlanPatch.cs | 7 +- .../src/Generated/Models/AppServiceSkuName.cs | 3 + ...pServiceStorageAccessInfo.Serialization.cs | 31 + .../Models/AppServiceStorageAccessInfo.cs | 7 +- .../Models/AppServiceStorageProtocol.cs | 54 + .../Models/AppServiceSupportedTlsVersion.cs | 3 + .../Models/AppServiceTlsCipherSuite.cs | 96 + .../AseRegionCollection.Serialization.cs | 205 + .../Generated/Models/AseRegionCollection.cs | 80 + .../CertificateOrderAction.Serialization.cs | 145 +- .../Models/CertificateOrderAction.cs | 11 +- ...ontainerAppsConfiguration.Serialization.cs | 340 ++ .../Models/ContainerAppsConfiguration.cs | 91 + .../Models/Correlation.Serialization.cs | 163 + .../src/Generated/Models/Correlation.cs | 66 + .../CsmDeploymentStatus.Serialization.cs | 577 ++ .../Generated/Models/CsmDeploymentStatus.cs | 106 + ...eploymentStatusCollection.Serialization.cs | 205 + .../Models/CsmDeploymentStatusCollection.cs | 80 + ...nsSuffixProvisioningState.Serialization.cs | 32 + .../CustomDnsSuffixProvisioningState.cs | 22 + .../Generated/Models/CustomDomainStatus.cs | 3 + ...tomHostnameAnalysisResult.Serialization.cs | 2 +- .../Models/CustomHostnameAnalysisResult.cs | 3 - .../CustomHostnameSites.Serialization.cs | 409 ++ .../Generated/Models/CustomHostnameSites.cs | 88 + ...omHostnameSitesCollection.Serialization.cs | 205 + .../Models/CustomHostnameSitesCollection.cs | 80 + ...abaseConnectionCollection.Serialization.cs | 205 + .../Models/DatabaseConnectionCollection.cs | 80 + .../Generated/Models/DeploymentBuildStatus.cs | 84 + .../Models/EnterpriseGradeCdnStatus.cs | 57 + .../Models/ExpressionTraces.Serialization.cs | 249 + .../src/Generated/Models/ExpressionTraces.cs | 103 + ...ccessControlConfiguration.Serialization.cs | 249 + .../Models/FlowAccessControlConfiguration.cs | 81 + ...ontrolConfigurationPolicy.Serialization.cs | 211 + .../FlowAccessControlConfigurationPolicy.cs | 82 + .../Models/FlowEndpoints.Serialization.cs | 226 + .../src/Generated/Models/FlowEndpoints.cs | 73 + ...lowEndpointsConfiguration.Serialization.cs | 189 + .../Models/FlowEndpointsConfiguration.cs | 71 + ...ctionAppAlwaysReadyConfig.Serialization.cs | 193 + .../Models/FunctionAppAlwaysReadyConfig.cs | 71 + .../Models/FunctionAppConfig.Serialization.cs | 222 + .../src/Generated/Models/FunctionAppConfig.cs | 88 + ...FunctionAppResourceConfig.Serialization.cs | 193 + .../Models/FunctionAppResourceConfig.cs | 71 + .../FunctionAppRuntime.Serialization.cs | 205 + .../Generated/Models/FunctionAppRuntime.cs | 71 + .../Models/FunctionAppRuntimeName.cs | 63 + ...ionAppScaleAndConcurrency.Serialization.cs | 273 + .../Models/FunctionAppScaleAndConcurrency.cs | 93 + .../FunctionAppStorage.Serialization.cs | 219 + .../Generated/Models/FunctionAppStorage.cs | 76 + ...tionAppStorageAccountAuthenticationType.cs | 54 + ...nAppStorageAuthentication.Serialization.cs | 227 + .../FunctionAppStorageAuthentication.cs | 76 + .../Models/FunctionAppStorageType.cs | 48 + .../FunctionsDeployment.Serialization.cs | 159 + .../Generated/Models/FunctionsDeployment.cs | 66 + ...aleAndConcurrencyTriggers.Serialization.cs | 162 + .../FunctionsScaleAndConcurrencyTriggers.cs | 77 + ...ndConcurrencyTriggersHttp.Serialization.cs | 159 + ...unctionsScaleAndConcurrencyTriggersHttp.cs | 66 + .../KubeEnvironmentPatch.Serialization.cs | 31 + .../Generated/Models/KubeEnvironmentPatch.cs | 7 +- ...henticationAccessPolicies.Serialization.cs | 180 + .../OpenAuthenticationAccessPolicies.cs | 67 + ...uthenticationAccessPolicy.Serialization.cs | 208 + .../Models/OpenAuthenticationAccessPolicy.cs | 72 + ...AuthenticationPolicyClaim.Serialization.cs | 197 + .../Models/OpenAuthenticationPolicyClaim.cs | 71 + .../Models/OpenAuthenticationProviderType.cs | 48 + ...urrenceScheduleOccurrence.Serialization.cs | 189 + .../Models/RecurrenceScheduleOccurrence.cs | 71 + .../RequestHistoryListResult.Serialization.cs | 212 + .../Models/RequestHistoryListResult.cs | 70 + ...ceNameAvailabilityContent.Serialization.cs | 13 +- .../Models/ResourceNameAvailabilityContent.cs | 7 +- ...PrivateEndpointConnection.Serialization.cs | 2 +- ...EnvelopeRemotePrivateEndpointConnection.cs | 3 - .../src/Generated/Models/SiteAuthSettings.cs | 4 +- .../SiteConfigProperties.Serialization.cs | 213 + .../Generated/Models/SiteConfigProperties.cs | 34 +- .../SiteContainerAuthType.Serialization.cs | 32 + .../Generated/Models/SiteContainerAuthType.cs | 22 + .../SiteContainerCollection.Serialization.cs | 205 + .../Models/SiteContainerCollection.cs | 80 + .../SiteContainerVolumeMount.Serialization.cs | 256 + .../Models/SiteContainerVolumeMount.cs | 94 + .../src/Generated/Models/SiteDefaultAction.cs | 51 + .../Models/SiteDnsConfig.Serialization.cs | 353 ++ .../src/Generated/Models/SiteDnsConfig.cs | 92 + .../Models/SitePatchInfo.Serialization.cs | 31 + .../src/Generated/Models/SitePatchInfo.cs | 7 +- .../Models/StaticSiteBasicAuthName.cs | 48 + ...cAuthPropertiesCollection.Serialization.cs | 205 + ...StaticSiteBasicAuthPropertiesCollection.cs | 80 + ...ConfigurationFileOverview.Serialization.cs | 231 + ...baseConnectionConfigurationFileOverview.cs | 76 + ...atabaseConnectionOverview.Serialization.cs | 316 + .../StaticSiteDatabaseConnectionOverview.cs | 88 + ...aseConnectionPatchContent.Serialization.cs | 174 + ...taticSiteDatabaseConnectionPatchContent.cs | 82 + ...aticSiteLinkedBackendInfo.Serialization.cs | 262 + .../Models/StaticSiteLinkedBackendInfo.cs | 81 + ...eLinkedBackendsCollection.Serialization.cs | 205 + .../StaticSiteLinkedBackendsCollection.cs | 80 + .../Models/StaticSitePatch.Serialization.cs | 166 +- .../src/Generated/Models/StaticSitePatch.cs | 26 +- .../Models/WebAppContentHash.Serialization.cs | 197 + .../src/Generated/Models/WebAppContentHash.cs | 71 + .../Models/WebAppContentLink.Serialization.cs | 296 + .../src/Generated/Models/WebAppContentLink.cs | 115 + .../Models/WebAppDayOfWeek.Serialization.cs | 38 + .../src/Generated/Models/WebAppDayOfWeek.cs | 28 + ...WebAppEnvironmentVariable.Serialization.cs | 191 + .../Models/WebAppEnvironmentVariable.cs | 84 + .../Models/WebAppErrorInfo.Serialization.cs | 160 + .../src/Generated/Models/WebAppErrorInfo.cs | 76 + .../WebAppErrorProperties.Serialization.cs | 197 + .../Generated/Models/WebAppErrorProperties.cs | 71 + .../WebAppErrorResponse.Serialization.cs | 159 + .../Generated/Models/WebAppErrorResponse.cs | 66 + .../Models/WebAppIPAddress.Serialization.cs | 163 + .../src/Generated/Models/WebAppIPAddress.cs | 66 + .../WebAppIPAddressRange.Serialization.cs | 163 + .../Generated/Models/WebAppIPAddressRange.cs | 66 + .../Models/WebAppJsonSchema.Serialization.cs | 197 + .../src/Generated/Models/WebAppJsonSchema.cs | 71 + .../src/Generated/Models/WebAppKeyType.cs | 54 + .../Generated/Models/WebAppParameterType.cs | 72 + .../Models/WebAppRequest.Serialization.cs | 230 + .../src/Generated/Models/WebAppRequest.cs | 105 + ...pRequestHistoryProperties.Serialization.cs | 251 + .../Models/WebAppRequestHistoryProperties.cs | 81 + .../Models/WebAppResponse.Serialization.cs | 226 + .../src/Generated/Models/WebAppResponse.cs | 105 + .../WebAppRetryHistory.Serialization.cs | 333 + .../Generated/Models/WebAppRetryHistory.cs | 102 + ...ebAppRunActionCorrelation.Serialization.cs | 259 + .../Models/WebAppRunActionCorrelation.cs | 35 + .../WebAppRunCorrelation.Serialization.cs | 225 + .../Generated/Models/WebAppRunCorrelation.cs | 72 + .../Models/WorkflowArtifacts.Serialization.cs | 203 + .../src/Generated/Models/WorkflowArtifacts.cs | 136 + .../Models/WorkflowContent.Serialization.cs | 267 + .../src/Generated/Models/WorkflowContent.cs | 139 + .../Models/WorkflowData.Serialization.cs | 842 +++ .../src/Generated/Models/WorkflowData.cs | 180 + ...orkflowEnvelopeCollection.Serialization.cs | 205 + .../Models/WorkflowEnvelopeCollection.cs | 80 + ...orkflowEnvelopeProperties.Serialization.cs | 264 + .../Models/WorkflowEnvelopeProperties.cs | 106 + .../WorkflowExpression.Serialization.cs | 279 + .../Generated/Models/WorkflowExpression.cs | 111 + ...pressionResourceErrorInfo.Serialization.cs | 240 + .../WorkflowExpressionResourceErrorInfo.cs | 52 + .../WorkflowExpressionRoot.Serialization.cs | 319 + .../Models/WorkflowExpressionRoot.cs | 37 + .../Models/WorkflowHealth.Serialization.cs | 179 + .../src/Generated/Models/WorkflowHealth.cs | 75 + .../WorkflowHealthState.Serialization.cs | 32 + .../Generated/Models/WorkflowHealthState.cs | 22 + .../WorkflowOutputContent.Serialization.cs | 310 + .../Generated/Models/WorkflowOutputContent.cs | 66 + .../Models/WorkflowProvisioningState.cs | 111 + .../Models/WorkflowRecurrenceFrequency.cs | 69 + ...orkflowRecurrenceSchedule.Serialization.cs | 376 ++ .../Models/WorkflowRecurrenceSchedule.cs | 91 + ...owRegenerateActionContent.Serialization.cs | 126 + .../Models/WorkflowRegenerateActionContent.cs | 66 + ...WorkflowResourceReference.Serialization.cs | 208 + .../Models/WorkflowResourceReference.cs | 77 + ...rkflowRunActionListResult.Serialization.cs | 212 + .../Models/WorkflowRunActionListResult.cs | 70 + ...itionDefinitionCollection.Serialization.cs | 212 + ...RunActionRepetitionDefinitionCollection.cs | 70 + ...wRunActionRepetitionIndex.Serialization.cs | 183 + .../WorkflowRunActionRepetitionIndex.cs | 78 + .../WorkflowRunListResult.Serialization.cs | 212 + .../Generated/Models/WorkflowRunListResult.cs | 70 + .../WorkflowRunTrigger.Serialization.cs | 610 ++ .../Generated/Models/WorkflowRunTrigger.cs | 253 + .../Models/WorkflowSku.Serialization.cs | 179 + .../src/Generated/Models/WorkflowSku.cs | 78 + .../src/Generated/Models/WorkflowSkuName.cs | 63 + .../src/Generated/Models/WorkflowState.cs | 63 + .../src/Generated/Models/WorkflowStatus.cs | 84 + ...orkflowTriggerCallbackUri.Serialization.cs | 364 ++ .../Models/WorkflowTriggerCallbackUri.cs | 92 + ...wTriggerHistoryListResult.Serialization.cs | 212 + .../WorkflowTriggerHistoryListResult.cs | 70 + ...gerListCallbackUriQueries.Serialization.cs | 305 + .../WorkflowTriggerListCallbackUriQueries.cs | 86 + ...WorkflowTriggerListResult.Serialization.cs | 212 + .../Models/WorkflowTriggerListResult.cs | 70 + .../WorkflowTriggerProvisioningState.cs | 99 + ...WorkflowTriggerRecurrence.Serialization.cs | 328 + .../Models/WorkflowTriggerRecurrence.cs | 91 + ...WorkflowVersionListResult.Serialization.cs | 212 + .../Models/WorkflowVersionListResult.cs | 70 + .../src/Generated/NetworkFeatureCollection.cs | 12 +- .../src/Generated/NetworkFeatureResource.cs | 4 +- .../src/Generated/PublishingUserResource.cs | 8 +- ...pServiceCertificateOrdersRestOperations.cs | 2 +- .../AppServiceEnvironmentsRestOperations.cs | 490 +- .../AppServicePlansRestOperations.cs | 2 +- ...tificateOrdersDiagnosticsRestOperations.cs | 2 +- ...icateRegistrationProviderRestOperations.cs | 2 +- .../CertificatesRestOperations.cs | 2 +- .../DeletedWebAppsRestOperations.cs | 2 +- .../DiagnosticsRestOperations.cs | 2 +- ...omainRegistrationProviderRestOperations.cs | 2 +- .../RestOperations/DomainsRestOperations.cs | 96 +- .../GetUsagesInLocationRestOperations.cs | 201 + .../RestOperations/GlobalRestOperations.cs | 2 +- .../KubeEnvironmentsRestOperations.cs | 2 +- .../RestOperations/ProviderRestOperations.cs | 2 +- .../RecommendationsRestOperations.cs | 2 +- .../ResourceHealthMetadataRestOperations.cs | 2 +- .../StaticSitesRestOperations.cs | 5358 ++++++++++++++--- .../TopLevelDomainsRestOperations.cs | 2 +- .../RestOperations/WebAppsRestOperations.cs | 2972 ++++++++- .../WebSiteManagementRestOperations.cs | 322 +- ...petitionsRequestHistoriesRestOperations.cs | 401 ++ ...kflowRunActionRepetitionsRestOperations.cs | 607 ++ ...RunActionScopeRepetitionsRestOperations.cs | 381 ++ .../WorkflowRunActionsRestOperations.cs | 599 ++ .../WorkflowRunsRestOperations.cs | 465 ++ .../WorkflowTriggerHistoriesRestOperations.cs | 493 ++ .../WorkflowTriggersRestOperations.cs | 687 +++ .../WorkflowVersionsRestOperations.cs | 353 ++ .../RestOperations/WorkflowsRestOperations.cs | 238 + ...asicPublishingCredentialsPolicyResource.cs | 8 +- ...asicPublishingCredentialsPolicyResource.cs | 8 +- .../src/Generated/SiteBackupCollection.cs | 16 +- .../src/Generated/SiteBackupResource.cs | 16 +- .../SiteConfigAppsettingCollection.cs | 16 +- .../Generated/SiteConfigAppsettingResource.cs | 4 +- .../Generated/SiteConfigData.Serialization.cs | 213 + .../src/Generated/SiteConfigData.cs | 34 +- .../Generated/SiteConfigSnapshotCollection.cs | 12 +- .../Generated/SiteConfigSnapshotResource.cs | 8 +- .../src/Generated/SiteContainerCollection.cs | 497 ++ .../SiteContainerData.Serialization.cs | 726 +++ .../src/Generated/SiteContainerData.cs | 138 + .../SiteContainerResource.Serialization.cs | 26 + .../src/Generated/SiteContainerResource.cs | 355 ++ .../src/Generated/SiteDeploymentCollection.cs | 20 +- .../src/Generated/SiteDeploymentResource.cs | 16 +- .../src/Generated/SiteDetectorCollection.cs | 16 +- .../src/Generated/SiteDetectorResource.cs | 4 +- .../SiteDiagnosticAnalysisCollection.cs | 16 +- .../SiteDiagnosticAnalysisResource.cs | 8 +- .../src/Generated/SiteDiagnosticCollection.cs | 16 +- .../SiteDiagnosticDetectorCollection.cs | 16 +- .../SiteDiagnosticDetectorResource.cs | 8 +- .../src/Generated/SiteDiagnosticResource.cs | 12 +- ...SiteDomainOwnershipIdentifierCollection.cs | 20 +- .../SiteDomainOwnershipIdentifierResource.cs | 12 +- .../src/Generated/SiteExtensionResource.cs | 12 +- .../src/Generated/SiteFunctionCollection.cs | 20 +- .../src/Generated/SiteFunctionResource.cs | 28 +- .../SiteHostNameBindingCollection.cs | 20 +- .../Generated/SiteHostNameBindingResource.cs | 12 +- ...ybridConnectionNamespaceRelayCollection.cs | 16 +- ...eHybridConnectionNamespaceRelayResource.cs | 12 +- .../src/Generated/SiteInstanceCollection.cs | 16 +- .../SiteInstanceExtensionResource.cs | 12 +- .../SiteInstanceProcessCollection.cs | 16 +- .../SiteInstanceProcessModuleCollection.cs | 16 +- .../SiteInstanceProcessModuleResource.cs | 4 +- .../Generated/SiteInstanceProcessResource.cs | 20 +- .../src/Generated/SiteInstanceResource.cs | 8 +- .../Generated/SiteNetworkConfigResource.cs | 16 +- ...SitePrivateEndpointConnectionCollection.cs | 45 +- .../SitePrivateEndpointConnectionResource.cs | 37 +- .../src/Generated/SiteProcessCollection.cs | 16 +- .../Generated/SiteProcessModuleCollection.cs | 16 +- .../Generated/SiteProcessModuleResource.cs | 4 +- .../src/Generated/SiteProcessResource.cs | 20 +- .../SitePublicCertificateCollection.cs | 20 +- .../SitePublicCertificateResource.cs | 12 +- .../Generated/SiteRecommendationCollection.cs | 12 +- .../Generated/SiteRecommendationResource.cs | 8 +- .../src/Generated/SiteSlotBackupCollection.cs | 16 +- .../src/Generated/SiteSlotBackupResource.cs | 16 +- .../SiteSlotConfigSnapshotCollection.cs | 12 +- .../SiteSlotConfigSnapshotResource.cs | 8 +- .../Generated/SiteSlotDeploymentCollection.cs | 20 +- .../Generated/SiteSlotDeploymentResource.cs | 16 +- .../Generated/SiteSlotDetectorCollection.cs | 16 +- .../src/Generated/SiteSlotDetectorResource.cs | 4 +- .../SiteSlotDiagnosticAnalysisCollection.cs | 16 +- .../SiteSlotDiagnosticAnalysisResource.cs | 8 +- .../Generated/SiteSlotDiagnosticCollection.cs | 16 +- .../SiteSlotDiagnosticDetectorCollection.cs | 16 +- .../SiteSlotDiagnosticDetectorResource.cs | 8 +- .../Generated/SiteSlotDiagnosticResource.cs | 12 +- ...SlotDomainOwnershipIdentifierCollection.cs | 20 +- ...teSlotDomainOwnershipIdentifierResource.cs | 12 +- .../Generated/SiteSlotExtensionResource.cs | 12 +- .../Generated/SiteSlotFunctionCollection.cs | 20 +- .../src/Generated/SiteSlotFunctionResource.cs | 28 +- .../SiteSlotHostNameBindingCollection.cs | 20 +- .../SiteSlotHostNameBindingResource.cs | 12 +- ...ybridConnectionNamespaceRelayCollection.cs | 16 +- ...tHybridConnectionNamespaceRelayResource.cs | 12 +- .../Generated/SiteSlotInstanceCollection.cs | 16 +- .../SiteSlotInstanceExtensionResource.cs | 12 +- .../SiteSlotInstanceProcessCollection.cs | 16 +- ...SiteSlotInstanceProcessModuleCollection.cs | 16 +- .../SiteSlotInstanceProcessModuleResource.cs | 4 +- .../SiteSlotInstanceProcessResource.cs | 20 +- .../src/Generated/SiteSlotInstanceResource.cs | 8 +- .../SiteSlotNetworkConfigResource.cs | 16 +- ...SlotPrivateEndpointConnectionCollection.cs | 45 +- ...teSlotPrivateEndpointConnectionResource.cs | 37 +- .../Generated/SiteSlotProcessCollection.cs | 16 +- .../SiteSlotProcessModuleCollection.cs | 16 +- .../SiteSlotProcessModuleResource.cs | 4 +- .../src/Generated/SiteSlotProcessResource.cs | 20 +- .../SiteSlotSiteContainerCollection.cs | 497 ++ ...SlotSiteContainerResource.Serialization.cs | 26 + .../SiteSlotSiteContainerResource.cs | 356 ++ ...eSlotVirtualNetworkConnectionCollection.cs | 20 +- ...rtualNetworkConnectionGatewayCollection.cs | 16 +- ...VirtualNetworkConnectionGatewayResource.cs | 8 +- ...iteSlotVirtualNetworkConnectionResource.cs | 16 +- .../Generated/SiteSlotWorkflowCollection.cs | 395 ++ .../SiteSlotWorkflowResource.Serialization.cs | 26 + .../src/Generated/SiteSlotWorkflowResource.cs | 172 + .../SiteVirtualNetworkConnectionCollection.cs | 20 +- ...rtualNetworkConnectionGatewayCollection.cs | 16 +- ...VirtualNetworkConnectionGatewayResource.cs | 8 +- .../SiteVirtualNetworkConnectionResource.cs | 16 +- .../src/Generated/SiteWorkflowCollection.cs | 395 ++ .../SiteWorkflowResource.Serialization.cs | 26 + .../src/Generated/SiteWorkflowResource.cs | 171 + .../src/Generated/SlotConfigNamesResource.cs | 8 +- .../StaticSiteBasicAuthPropertyCollection.cs | 470 ++ ...SiteBasicAuthPropertyData.Serialization.cs | 488 ++ .../StaticSiteBasicAuthPropertyData.cs | 101 + ...BasicAuthPropertyResource.Serialization.cs | 26 + .../StaticSiteBasicAuthPropertyResource.cs | 268 + .../Generated/StaticSiteBuildCollection.cs | 16 +- .../StaticSiteBuildData.Serialization.cs | 98 + .../src/Generated/StaticSiteBuildData.cs | 14 +- ...icSiteBuildDatabaseConnectionCollection.cs | 497 ++ ...atabaseConnectionResource.Serialization.cs | 26 + ...aticSiteBuildDatabaseConnectionResource.cs | 421 ++ .../StaticSiteBuildLinkedBackendCollection.cs | 493 ++ ...uildLinkedBackendResource.Serialization.cs | 26 + .../StaticSiteBuildLinkedBackendResource.cs | 446 ++ .../src/Generated/StaticSiteBuildResource.cs | 234 +- ...eBuildUserProvidedFunctionAppCollection.cs | 20 +- ...iteBuildUserProvidedFunctionAppResource.cs | 12 +- .../src/Generated/StaticSiteCollection.cs | 20 +- ...taticSiteCustomDomainOverviewCollection.cs | 20 +- .../StaticSiteCustomDomainOverviewResource.cs | 16 +- .../Generated/StaticSiteData.Serialization.cs | 166 +- .../src/Generated/StaticSiteData.cs | 26 +- .../StaticSiteDatabaseConnectionCollection.cs | 497 ++ ...iteDatabaseConnectionData.Serialization.cs | 476 ++ .../StaticSiteDatabaseConnectionData.cs | 102 + ...atabaseConnectionResource.Serialization.cs | 26 + .../StaticSiteDatabaseConnectionResource.cs | 420 ++ .../StaticSiteLinkedBackendCollection.cs | 493 ++ ...aticSiteLinkedBackendData.Serialization.cs | 422 ++ .../Generated/StaticSiteLinkedBackendData.cs | 95 + ...SiteLinkedBackendResource.Serialization.cs | 26 + .../StaticSiteLinkedBackendResource.cs | 445 ++ ...SitePrivateEndpointConnectionCollection.cs | 45 +- ...icSitePrivateEndpointConnectionResource.cs | 37 +- .../src/Generated/StaticSiteResource.cs | 351 +- ...icSiteUserProvidedFunctionAppCollection.cs | 20 +- ...aticSiteUserProvidedFunctionAppResource.cs | 12 +- .../src/Generated/TopLevelDomainCollection.cs | 16 +- .../src/Generated/TopLevelDomainResource.cs | 8 +- .../TriggeredWebJobData.Serialization.cs | 67 + .../src/Generated/TriggeredWebJobData.cs | 12 +- .../WebAppRequestHistoryCollection.cs | 395 ++ .../WebAppRequestHistoryData.Serialization.cs | 354 ++ .../src/Generated/WebAppRequestHistoryData.cs | 84 + ...AppRequestHistoryResource.Serialization.cs | 26 + .../Generated/WebAppRequestHistoryResource.cs | 175 + .../src/Generated/WebSiteCollection.cs | 20 +- ...WebSiteConfigConnectionStringCollection.cs | 16 +- .../WebSiteConfigConnectionStringResource.cs | 4 +- .../src/Generated/WebSiteConfigResource.cs | 20 +- .../WebSiteContinuousWebJobCollection.cs | 16 +- .../WebSiteContinuousWebJobResource.cs | 16 +- .../Generated/WebSiteData.Serialization.cs | 357 ++ .../src/Generated/WebSiteData.cs | 57 +- .../Generated/WebSiteExtensionCollection.cs | 20 +- .../src/Generated/WebSiteExtensionResource.cs | 12 +- ...eFtpPublishingCredentialsPolicyResource.cs | 8 +- .../WebSiteHybridConnectionCollection.cs | 16 +- .../WebSiteHybridConnectionResource.cs | 12 +- .../WebSitePremierAddonCollection.cs | 16 +- .../Generated/WebSitePremierAddonResource.cs | 12 +- .../Generated/WebSitePrivateAccessResource.cs | 8 +- .../src/Generated/WebSiteResource.cs | 1517 ++++- .../WebSiteResourceHealthMetadataResource.cs | 4 +- .../src/Generated/WebSiteSlotCollection.cs | 20 +- .../WebSiteSlotConfigAppSettingCollection.cs | 16 +- .../WebSiteSlotConfigAppSettingResource.cs | 4 +- ...iteSlotConfigConnectionStringCollection.cs | 16 +- ...bSiteSlotConfigConnectionStringResource.cs | 4 +- .../Generated/WebSiteSlotConfigResource.cs | 20 +- .../WebSiteSlotContinuousWebJobCollection.cs | 16 +- .../WebSiteSlotContinuousWebJobResource.cs | 16 +- .../WebSiteSlotExtensionCollection.cs | 20 +- .../Generated/WebSiteSlotExtensionResource.cs | 12 +- ...tFtpPublishingCredentialsPolicyResource.cs | 8 +- .../WebSiteSlotHybridConnectionCollection.cs | 16 +- .../WebSiteSlotHybridConnectionResource.cs | 12 +- .../WebSiteSlotPremierAddOnCollection.cs | 16 +- .../WebSiteSlotPremierAddOnResource.cs | 12 +- .../WebSiteSlotPrivateAccessResource.cs | 8 +- .../WebSiteSlotPublicCertificateCollection.cs | 20 +- .../WebSiteSlotPublicCertificateResource.cs | 12 +- .../src/Generated/WebSiteSlotResource.cs | 850 ++- ...bSiteSlotResourceHealthMetadataResource.cs | 4 +- .../WebSiteSlotSourceControlResource.cs | 16 +- .../WebSiteSlotTriggeredWebJobCollection.cs | 16 +- ...iteSlotTriggeredWebJobHistoryCollection.cs | 16 +- ...bSiteSlotTriggeredWebJobHistoryResource.cs | 4 +- .../WebSiteSlotTriggeredWebJobResource.cs | 16 +- .../Generated/WebSiteSlotWebJobCollection.cs | 16 +- .../Generated/WebSiteSlotWebJobResource.cs | 4 +- .../Generated/WebSiteSourceControlResource.cs | 16 +- ...WebSiteTriggeredWebJobHistoryCollection.cs | 16 +- .../WebSiteTriggeredWebJobHistoryResource.cs | 4 +- .../WebSiteTriggeredwebJobCollection.cs | 16 +- .../WebSiteTriggeredwebJobResource.cs | 16 +- .../src/Generated/WebSiteWebJobCollection.cs | 16 +- .../src/Generated/WebSiteWebJobResource.cs | 4 +- .../WorkflowEnvelopeData.Serialization.cs | 334 + .../src/Generated/WorkflowEnvelopeData.cs | 86 + .../Generated/WorkflowRunActionCollection.cs | 399 ++ .../WorkflowRunActionData.Serialization.cs | 639 ++ .../src/Generated/WorkflowRunActionData.cs | 185 + .../WorkflowRunActionRepetitionCollection.cs | 395 ++ ...nRepetitionDefinitionData.Serialization.cs | 880 +++ ...rkflowRunActionRepetitionDefinitionData.cs | 272 + ...nActionRepetitionResource.Serialization.cs | 26 + .../WorkflowRunActionRepetitionResource.cs | 305 + ...WorkflowRunActionResource.Serialization.cs | 26 + .../Generated/WorkflowRunActionResource.cs | 373 ++ ...kflowRunActionScopeRepetitionCollection.cs | 395 ++ ...onScopeRepetitionResource.Serialization.cs | 26 + ...orkflowRunActionScopeRepetitionResource.cs | 174 + .../src/Generated/WorkflowRunCollection.cs | 404 ++ .../WorkflowRunData.Serialization.cs | 671 +++ .../src/Generated/WorkflowRunData.cs | 167 + .../WorkflowRunResource.Serialization.cs | 26 + .../src/Generated/WorkflowRunResource.cs | 317 + .../Generated/WorkflowTriggerCollection.cs | 404 ++ .../WorkflowTriggerData.Serialization.cs | 538 ++ .../src/Generated/WorkflowTriggerData.cs | 116 + .../WorkflowTriggerHistoryCollection.cs | 399 ++ ...orkflowTriggerHistoryData.Serialization.cs | 651 ++ .../Generated/WorkflowTriggerHistoryData.cs | 166 + ...lowTriggerHistoryResource.Serialization.cs | 26 + .../WorkflowTriggerHistoryResource.cs | 257 + .../WorkflowTriggerResource.Serialization.cs | 26 + .../src/Generated/WorkflowTriggerResource.cs | 478 ++ .../Generated/WorkflowVersionCollection.cs | 402 ++ .../WorkflowVersionData.Serialization.cs | 750 +++ .../src/Generated/WorkflowVersionData.cs | 169 + .../WorkflowVersionResource.Serialization.cs | 26 + .../src/Generated/WorkflowVersionResource.cs | 172 + .../src/autorest.md | 160 +- 705 files changed, 86539 insertions(+), 3996 deletions(-) create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateOrderCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateOrderResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceDomainCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceEnvironmentCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AseV3NetworkingConfigurationResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_CustomDnsSuffixConfigurationResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DomainOwnershipIdentifierCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DomainOwnershipIdentifierResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentMultiRolePoolResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentPrivateEndpointConnectionCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentPrivateEndpointConnectionResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentWorkerPoolCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentWorkerPoolResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteBackupCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteBackupResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotWorkflowCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotWorkflowResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteWorkflowCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteWorkflowResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBasicAuthPropertyCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBasicAuthPropertyResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildDatabaseConnectionCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildDatabaseConnectionResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildLinkedBackendCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildLinkedBackendResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteDatabaseConnectionCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteDatabaseConnectionResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteLinkedBackendCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteLinkedBackendResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebAppRequestHistoryCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebAppRequestHistoryResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteConfigResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionRepetitionCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionRepetitionResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionScopeRepetitionCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionScopeRepetitionResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerHistoryCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerHistoryResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowVersionCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowVersionResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Customization/HostingEnvironmentPrivateEndpointConnectionCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Customization/HostingEnvironmentPrivateEndpointConnectionResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/AppServiceCertificateEmail.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/AppServiceOperation.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/CertificateOrderAction.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/CsmDeploymentStatus.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/CustomHostnameAnalysisResult.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/WorkflowHealth.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Customization/SitePrivateEndpointConnectionCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Customization/SitePrivateEndpointConnectionResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Customization/SiteSlotPrivateEndpointConnectionCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Customization/SiteSlotPrivateEndpointConnectionResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Customization/StaticSitePrivateEndpointConnectionCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Customization/StaticSitePrivateEndpointConnectionResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/CustomDnsSuffixConfigurationData.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/CustomDnsSuffixConfigurationData.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/CustomDnsSuffixConfigurationResource.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/CustomDnsSuffixConfigurationResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/LongRunningOperation/CsmDeploymentStatusOperationSource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/LongRunningOperation/StaticSiteBuildLinkedBackendOperationSource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/LongRunningOperation/StaticSiteLinkedBackendOperationSource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppDaprConfig.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppDaprConfig.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppDaprLogLevel.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceAseRegion.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceAseRegion.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentUpgradeAvailability.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentUpgradePreference.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceKind.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceStorageProtocol.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceTlsCipherSuite.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AseRegionCollection.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AseRegionCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ContainerAppsConfiguration.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ContainerAppsConfiguration.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/Correlation.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/Correlation.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CsmDeploymentStatus.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CsmDeploymentStatus.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CsmDeploymentStatusCollection.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CsmDeploymentStatusCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomDnsSuffixProvisioningState.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomDnsSuffixProvisioningState.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameSites.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameSites.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameSitesCollection.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameSitesCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/DatabaseConnectionCollection.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/DatabaseConnectionCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/DeploymentBuildStatus.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/EnterpriseGradeCdnStatus.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ExpressionTraces.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ExpressionTraces.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowAccessControlConfiguration.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowAccessControlConfiguration.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowAccessControlConfigurationPolicy.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowAccessControlConfigurationPolicy.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowEndpoints.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowEndpoints.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowEndpointsConfiguration.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowEndpointsConfiguration.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppAlwaysReadyConfig.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppAlwaysReadyConfig.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppConfig.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppConfig.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppResourceConfig.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppResourceConfig.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppRuntime.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppRuntime.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppRuntimeName.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppScaleAndConcurrency.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppScaleAndConcurrency.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorage.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorage.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorageAccountAuthenticationType.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorageAuthentication.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorageAuthentication.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorageType.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsDeployment.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsDeployment.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsScaleAndConcurrencyTriggers.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsScaleAndConcurrencyTriggers.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsScaleAndConcurrencyTriggersHttp.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsScaleAndConcurrencyTriggersHttp.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationAccessPolicies.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationAccessPolicies.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationAccessPolicy.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationAccessPolicy.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationPolicyClaim.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationPolicyClaim.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationProviderType.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/RecurrenceScheduleOccurrence.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/RecurrenceScheduleOccurrence.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/RequestHistoryListResult.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/RequestHistoryListResult.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerAuthType.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerAuthType.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerCollection.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerVolumeMount.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerVolumeMount.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteDefaultAction.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteDnsConfig.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteDnsConfig.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteBasicAuthName.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteBasicAuthPropertiesCollection.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteBasicAuthPropertiesCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionConfigurationFileOverview.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionConfigurationFileOverview.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionOverview.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionOverview.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionPatchContent.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionPatchContent.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteLinkedBackendInfo.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteLinkedBackendInfo.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteLinkedBackendsCollection.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteLinkedBackendsCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppContentHash.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppContentHash.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppContentLink.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppContentLink.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppDayOfWeek.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppDayOfWeek.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppEnvironmentVariable.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppEnvironmentVariable.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorInfo.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorInfo.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorProperties.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorProperties.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorResponse.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorResponse.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppIPAddress.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppIPAddress.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppIPAddressRange.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppIPAddressRange.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppJsonSchema.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppJsonSchema.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppKeyType.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppParameterType.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRequest.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRequest.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRequestHistoryProperties.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRequestHistoryProperties.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppResponse.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppResponse.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRetryHistory.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRetryHistory.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRunActionCorrelation.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRunActionCorrelation.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRunCorrelation.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRunCorrelation.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowArtifacts.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowArtifacts.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowContent.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowContent.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowData.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowData.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowEnvelopeCollection.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowEnvelopeCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowEnvelopeProperties.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowEnvelopeProperties.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpression.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpression.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpressionResourceErrorInfo.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpressionResourceErrorInfo.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpressionRoot.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpressionRoot.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowHealth.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowHealth.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowHealthState.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowHealthState.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowOutputContent.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowOutputContent.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowProvisioningState.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRecurrenceFrequency.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRecurrenceSchedule.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRecurrenceSchedule.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRegenerateActionContent.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRegenerateActionContent.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowResourceReference.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowResourceReference.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionListResult.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionListResult.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionRepetitionDefinitionCollection.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionRepetitionDefinitionCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionRepetitionIndex.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionRepetitionIndex.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunListResult.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunListResult.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunTrigger.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunTrigger.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowSku.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowSku.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowSkuName.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowState.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowStatus.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerCallbackUri.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerCallbackUri.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerHistoryListResult.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerHistoryListResult.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerListCallbackUriQueries.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerListCallbackUriQueries.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerListResult.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerListResult.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerProvisioningState.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerRecurrence.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerRecurrence.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowVersionListResult.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowVersionListResult.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/GetUsagesInLocationRestOperations.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowRunActionRepetitionsRequestHistoriesRestOperations.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowRunActionRepetitionsRestOperations.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowRunActionScopeRepetitionsRestOperations.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowRunActionsRestOperations.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowRunsRestOperations.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowTriggerHistoriesRestOperations.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowTriggersRestOperations.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowVersionsRestOperations.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowsRestOperations.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerData.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerData.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerResource.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotSiteContainerCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotSiteContainerResource.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotSiteContainerResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotWorkflowCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotWorkflowResource.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotWorkflowResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteWorkflowCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteWorkflowResource.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteWorkflowResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyData.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyData.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyResource.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildDatabaseConnectionCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildDatabaseConnectionResource.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildDatabaseConnectionResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildLinkedBackendCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildLinkedBackendResource.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildLinkedBackendResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionData.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionData.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionResource.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendData.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendData.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendResource.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryData.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryData.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryResource.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowEnvelopeData.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowEnvelopeData.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionData.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionData.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionDefinitionData.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionDefinitionData.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionResource.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionResource.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionScopeRepetitionCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionScopeRepetitionResource.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionScopeRepetitionResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunData.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunData.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunResource.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerData.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerData.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryData.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryData.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryResource.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerResource.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerResource.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionCollection.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionData.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionData.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionResource.Serialization.cs create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionResource.cs diff --git a/.vscode/cspell.json b/.vscode/cspell.json index 6a867c8d4cc9c..73ae7f41a7e75 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -1327,7 +1327,11 @@ "Guage", "Plex", "Vstsrm", - "Localizable" + "Localizable", + "Dapr", + "TLSAES", + "Unregistering", + "Diffie" ] }, { diff --git a/sdk/websites/Azure.ResourceManager.AppService/Azure.ResourceManager.AppService.sln b/sdk/websites/Azure.ResourceManager.AppService/Azure.ResourceManager.AppService.sln index 3f800167a6bc2..84b4396b58de8 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/Azure.ResourceManager.AppService.sln +++ b/sdk/websites/Azure.ResourceManager.AppService/Azure.ResourceManager.AppService.sln @@ -6,8 +6,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.AppSe EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.AppService.Tests", "tests\Azure.ResourceManager.AppService.Tests.csproj", "{738C0769-57F8-439C-8078-54498A030BA0}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Core.TestFramework", "..\..\core\Azure.Core.TestFramework\src\Azure.Core.TestFramework.csproj", "{DF15D10D-3646-447E-B00B-49506D142322}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.AppService.Samples", "samples\Azure.ResourceManager.AppService.Samples.csproj", "{C5B419AD-A4F3-45D1-AD7E-6D85595169A8}" EndProject Global @@ -44,18 +42,6 @@ Global {738C0769-57F8-439C-8078-54498A030BA0}.Release|x64.Build.0 = Release|Any CPU {738C0769-57F8-439C-8078-54498A030BA0}.Release|x86.ActiveCfg = Release|Any CPU {738C0769-57F8-439C-8078-54498A030BA0}.Release|x86.Build.0 = Release|Any CPU - {DF15D10D-3646-447E-B00B-49506D142322}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DF15D10D-3646-447E-B00B-49506D142322}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DF15D10D-3646-447E-B00B-49506D142322}.Debug|x64.ActiveCfg = Debug|Any CPU - {DF15D10D-3646-447E-B00B-49506D142322}.Debug|x64.Build.0 = Debug|Any CPU - {DF15D10D-3646-447E-B00B-49506D142322}.Debug|x86.ActiveCfg = Debug|Any CPU - {DF15D10D-3646-447E-B00B-49506D142322}.Debug|x86.Build.0 = Debug|Any CPU - {DF15D10D-3646-447E-B00B-49506D142322}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DF15D10D-3646-447E-B00B-49506D142322}.Release|Any CPU.Build.0 = Release|Any CPU - {DF15D10D-3646-447E-B00B-49506D142322}.Release|x64.ActiveCfg = Release|Any CPU - {DF15D10D-3646-447E-B00B-49506D142322}.Release|x64.Build.0 = Release|Any CPU - {DF15D10D-3646-447E-B00B-49506D142322}.Release|x86.ActiveCfg = Release|Any CPU - {DF15D10D-3646-447E-B00B-49506D142322}.Release|x86.Build.0 = Release|Any CPU {C5B419AD-A4F3-45D1-AD7E-6D85595169A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C5B419AD-A4F3-45D1-AD7E-6D85595169A8}.Debug|Any CPU.Build.0 = Debug|Any CPU {C5B419AD-A4F3-45D1-AD7E-6D85595169A8}.Debug|x64.ActiveCfg = Debug|Any CPU diff --git a/sdk/websites/Azure.ResourceManager.AppService/CHANGELOG.md b/sdk/websites/Azure.ResourceManager.AppService/CHANGELOG.md index e952468949010..6bd662ed4bf0c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/CHANGELOG.md +++ b/sdk/websites/Azure.ResourceManager.AppService/CHANGELOG.md @@ -1,33 +1,35 @@ # Release History -## 1.1.0-beta.6 (Unreleased) +## 1.2.0 (2024-07-19) ### Features Added -### Breaking Changes -- Fix null Id deserialization problem for 'WebSiteResource.GetAllHybridConnectionDataAsync()' and 'WebSiteSlotResource.GetAllHybridConnectionSlotDataAsync()', to use 'WebSiteResource.GetHybridConnectionsAsync()' and 'WebSiteSlotResource.GetHybridConnectionsSlotAsync()' instead. - -### Bugs Fixed +- Added `ArmOperation.Rehydrate` and `ArmOperation.Rehydrate` static methods to rehydrate a long-running operation. +- Upgraded api-version tag from 'package-2021-02' to 'package-2023-12'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/928047803788f7377fa003a26ba2bdc2e0fcccc0/specification/web/resource-manager/readme.md ### Other Changes +- Upgraded Azure.Core from 1.31.0 to 1.41.0 +- Upgraded Azure.ResourceManager from 1.5.0 to 1.12.0 + ## 1.1.0-beta.5 (2024-04-19) ### Features Added -- Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. +- Enabled the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. ### Bugs Fixed -- Add `200` to the response code of the `SyncFunctionTriggers` +- Added `200` to the response code of the `SyncFunctionTriggers` - SiteFunctionResource.GetFunctionKeysAsync /SiteSlotFunctionResource.GetFunctionKeysSlotAsync fixed: can not populated with function keys -- Add more enum values for `TriggeredWebJobStatus` +- Added more enum values for `TriggeredWebJobStatus` ## 1.1.0-beta.4 (2023-11-30) ### Features Added -- Enable mocking for extension methods, refer this [document](https://aka.ms/azsdk/net/mocking) for more details. +- Enabled mocking for extension methods, refer this [document](https://aka.ms/azsdk/net/mocking) for more details. + ### Other ChangesGetHybridConnectionsAsync - Upgraded dependent `Azure.ResourceManager` to 1.9.0. @@ -36,7 +38,7 @@ ### Bugs Fixed -- Due to `HealthCheckUri` not being a valid URI, add a new property `HealthCheckUriString` to replace it in order to fix the URI format issue. +- Due to `HealthCheckUri` not being a valid URI, added a new property `HealthCheckUriString` to replace it in order to fix the URI format issue. ## 1.1.0-beta.2 (2023-09-06) @@ -50,7 +52,7 @@ ### Features Added -- Enable the model factory feature for model mocking, more information can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-mocking-factory-builder). +- Enabled the model factory feature for model mocking, more information can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-mocking-factory-builder). - Added `AppCertificateData.ThumbprintString` to return the hexadecimal string representation of the SHA-1 hash of the certificate. `AppCertificateData.Thumbprint` has been hidden but is still available. - Added `AppServiceVirtualNetworkData.CertThumbprintString` to return the hexadecimal string representation of the SHA-1 hash of the certificate. @@ -303,4 +305,4 @@ This package follows the [new Azure SDK guidelines](https://azure.github.io/azur This package is a Public Preview version, so expect incompatible changes in subsequent releases as we improve the product. To provide feedback, submit an issue in our [Azure SDK for .NET GitHub repo](https://github.com/Azure/azure-sdk-for-net/issues). -> NOTE: For more information about unified authentication, please refer to [Microsoft Azure Identity documentation for .NET](https://docs.microsoft.com//dotnet/api/overview/azure/identity-readme?view=azure-dotnet). +> NOTE: For more information about unified authentication, please refer to [Microsoft Azure Identity documentation for .NET](https://docs.microsoft.com//dotnet/api/overview/azure/identity-readme?view=azure-dotnet). \ No newline at end of file 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 bc0d5f96607ba..5c863357616fc 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 @@ -309,6 +309,8 @@ protected AppServiceDomainResource() { } Azure.ResourceManager.AppService.AppServiceDomainData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response TransferOut(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> TransferOutAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Update(Azure.ResourceManager.AppService.Models.AppServiceDomainPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.AppService.Models.AppServiceDomainPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -333,6 +335,7 @@ public partial class AppServiceEnvironmentData : Azure.ResourceManager.Models.Tr { public AppServiceEnvironmentData(Azure.Core.AzureLocation location) { } public System.Collections.Generic.IList ClusterSettings { get { throw null; } } + public Azure.ResourceManager.AppService.CustomDnsSuffixConfigurationData CustomDnsSuffixConfiguration { get { throw null; } set { } } public int? DedicatedHostCount { get { throw null; } set { } } public string DnsSuffix { get { throw null; } set { } } public int? FrontEndScaleFactor { get { throw null; } set { } } @@ -345,8 +348,11 @@ public AppServiceEnvironmentData(Azure.Core.AzureLocation location) { } public int? MaximumNumberOfMachines { get { throw null; } } public int? MultiRoleCount { get { throw null; } } public string MultiSize { get { throw null; } set { } } + public Azure.ResourceManager.AppService.AseV3NetworkingConfigurationData NetworkingConfiguration { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.ProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.AppService.Models.HostingEnvironmentStatus? Status { get { throw null; } } + public Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradeAvailability? UpgradeAvailability { get { throw null; } } + public Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradePreference? UpgradePreference { get { throw null; } set { } } public System.Collections.Generic.IList UserWhitelistedIPRanges { get { throw null; } } public Azure.ResourceManager.AppService.Models.AppServiceVirtualNetworkProfile VirtualNetwork { get { throw null; } set { } } Azure.ResourceManager.AppService.AppServiceEnvironmentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -375,6 +381,7 @@ protected AppServiceEnvironmentResource() { } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetCapacities(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetCapacitiesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppService.CustomDnsSuffixConfigurationResource GetCustomDnsSuffixConfiguration() { throw null; } public virtual Azure.Pageable GetDiagnostics(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetDiagnosticsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetDiagnosticsItem(string diagnosticsName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -417,8 +424,12 @@ protected AppServiceEnvironmentResource() { } Azure.ResourceManager.AppService.AppServiceEnvironmentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response TestUpgradeAvailableNotification(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task TestUpgradeAvailableNotificationAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Update(Azure.ResourceManager.AppService.Models.AppServiceEnvironmentPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.AppService.Models.AppServiceEnvironmentPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Upgrade(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task UpgradeAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public static partial class AppServiceExtensions { @@ -476,6 +487,8 @@ public static partial class AppServiceExtensions public static System.Threading.Tasks.Task> GetAppServiceSourceControlAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, string sourceControlType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.AppService.AppServiceSourceControlResource GetAppServiceSourceControlResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.AppServiceSourceControlCollection GetAppServiceSourceControls(this Azure.ResourceManager.Resources.TenantResource tenantResource) { throw null; } + public static Azure.Pageable GetAseRegions(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetAseRegionsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.AppService.AseV3NetworkingConfigurationResource GetAseV3NetworkingConfigurationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Pageable GetAvailableStacksOnPremProviders(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.AppService.Models.ProviderOSTypeSelected? osTypeSelected = default(Azure.ResourceManager.AppService.Models.ProviderOSTypeSelected?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetAvailableStacksOnPremProvidersAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.AppService.Models.ProviderOSTypeSelected? osTypeSelected = default(Azure.ResourceManager.AppService.Models.ProviderOSTypeSelected?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -486,6 +499,9 @@ public static partial class AppServiceExtensions public static Azure.ResourceManager.AppService.CertificateOrderDetectorResource GetCertificateOrderDetectorResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetControlCenterSsoRequestDomain(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetControlCenterSsoRequestDomainAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.AppService.CustomDnsSuffixConfigurationResource GetCustomDnsSuffixConfigurationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Pageable GetCustomHostNameSites(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string hostname = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetCustomHostNameSitesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string hostname = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response GetDeletedSite(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string deletedSiteId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetDeletedSiteAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string deletedSiteId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.AppService.DeletedSiteResource GetDeletedSiteResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -501,6 +517,8 @@ public static partial class AppServiceExtensions public static Azure.AsyncPageable GetFunctionAppStacksProvidersAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, Azure.ResourceManager.AppService.Models.ProviderStackOSType? stackOSType = default(Azure.ResourceManager.AppService.Models.ProviderStackOSType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Pageable GetGeoRegions(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.AppService.Models.AppServiceSkuName? sku = default(Azure.ResourceManager.AppService.Models.AppServiceSkuName?), bool? linuxWorkersEnabled = default(bool?), bool? xenonWorkersEnabled = default(bool?), bool? linuxDynamicWorkersEnabled = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetGeoRegionsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.AppService.Models.AppServiceSkuName? sku = default(Azure.ResourceManager.AppService.Models.AppServiceSkuName?), bool? linuxWorkersEnabled = default(bool?), bool? xenonWorkersEnabled = default(bool?), bool? linuxDynamicWorkersEnabled = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Pageable GetGetUsagesInLocations(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetGetUsagesInLocationsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.AppService.HostingEnvironmentDetectorResource GetHostingEnvironmentDetectorResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.HostingEnvironmentMultiRolePoolResource GetHostingEnvironmentMultiRolePoolResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.HostingEnvironmentPrivateEndpointConnectionResource GetHostingEnvironmentPrivateEndpointConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -534,6 +552,7 @@ public static partial class AppServiceExtensions public static Azure.ResourceManager.AppService.SiteBackupResource GetSiteBackupResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.SiteConfigAppsettingResource GetSiteConfigAppsettingResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.SiteConfigSnapshotResource GetSiteConfigSnapshotResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppService.SiteContainerResource GetSiteContainerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.SiteDeploymentResource GetSiteDeploymentResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.SiteDetectorResource GetSiteDetectorResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.SiteDiagnosticAnalysisResource GetSiteDiagnosticAnalysisResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -574,18 +593,26 @@ public static partial class AppServiceExtensions public static Azure.ResourceManager.AppService.SiteSlotPrivateEndpointConnectionResource GetSiteSlotPrivateEndpointConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.SiteSlotProcessModuleResource GetSiteSlotProcessModuleResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.SiteSlotProcessResource GetSiteSlotProcessResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppService.SiteSlotSiteContainerResource GetSiteSlotSiteContainerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.SiteSlotVirtualNetworkConnectionGatewayResource GetSiteSlotVirtualNetworkConnectionGatewayResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.SiteSlotVirtualNetworkConnectionResource GetSiteSlotVirtualNetworkConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppService.SiteSlotWorkflowResource GetSiteSlotWorkflowResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.SiteVirtualNetworkConnectionGatewayResource GetSiteVirtualNetworkConnectionGatewayResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.SiteVirtualNetworkConnectionResource GetSiteVirtualNetworkConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppService.SiteWorkflowResource GetSiteWorkflowResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetSkus(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetSkusAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.AppService.SlotConfigNamesResource GetSlotConfigNamesResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetStaticSite(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetStaticSiteAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.AppService.StaticSiteBasicAuthPropertyResource GetStaticSiteBasicAuthPropertyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppService.StaticSiteBuildDatabaseConnectionResource GetStaticSiteBuildDatabaseConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppService.StaticSiteBuildLinkedBackendResource GetStaticSiteBuildLinkedBackendResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.StaticSiteBuildResource GetStaticSiteBuildResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.StaticSiteBuildUserProvidedFunctionAppResource GetStaticSiteBuildUserProvidedFunctionAppResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.StaticSiteCustomDomainOverviewResource GetStaticSiteCustomDomainOverviewResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppService.StaticSiteDatabaseConnectionResource GetStaticSiteDatabaseConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppService.StaticSiteLinkedBackendResource GetStaticSiteLinkedBackendResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.StaticSitePrivateEndpointConnectionResource GetStaticSitePrivateEndpointConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.StaticSiteResource GetStaticSiteResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.StaticSiteCollection GetStaticSites(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } @@ -596,6 +623,7 @@ public static partial class AppServiceExtensions public static System.Threading.Tasks.Task> GetTopLevelDomainAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.AppService.TopLevelDomainResource GetTopLevelDomainResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.TopLevelDomainCollection GetTopLevelDomains(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource) { throw null; } + public static Azure.ResourceManager.AppService.WebAppRequestHistoryResource GetWebAppRequestHistoryResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Pageable GetWebAppStacksByLocation(this Azure.ResourceManager.Resources.TenantResource tenantResource, Azure.Core.AzureLocation location, Azure.ResourceManager.AppService.Models.ProviderStackOSType? stackOSType = default(Azure.ResourceManager.AppService.Models.ProviderStackOSType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetWebAppStacksByLocationAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, Azure.Core.AzureLocation location, Azure.ResourceManager.AppService.Models.ProviderStackOSType? stackOSType = default(Azure.ResourceManager.AppService.Models.ProviderStackOSType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Pageable GetWebAppStacksProviders(this Azure.ResourceManager.Resources.TenantResource tenantResource, Azure.ResourceManager.AppService.Models.ProviderStackOSType? stackOSType = default(Azure.ResourceManager.AppService.Models.ProviderStackOSType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -635,6 +663,13 @@ public static partial class AppServiceExtensions public static Azure.ResourceManager.AppService.WebSiteTriggeredWebJobHistoryResource GetWebSiteTriggeredWebJobHistoryResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.WebSiteTriggeredwebJobResource GetWebSiteTriggeredwebJobResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.AppService.WebSiteWebJobResource GetWebSiteWebJobResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppService.WorkflowRunActionRepetitionResource GetWorkflowRunActionRepetitionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppService.WorkflowRunActionResource GetWorkflowRunActionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppService.WorkflowRunActionScopeRepetitionResource GetWorkflowRunActionScopeRepetitionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppService.WorkflowRunResource GetWorkflowRunResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppService.WorkflowTriggerHistoryResource GetWorkflowTriggerHistoryResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppService.WorkflowTriggerResource GetWorkflowTriggerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.AppService.WorkflowVersionResource GetWorkflowVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response PreviewStaticSiteWorkflow(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.AppService.Models.StaticSitesWorkflowPreviewContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> PreviewStaticSiteWorkflowAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.AppService.Models.StaticSitesWorkflowPreviewContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response ResetAllRecommendationFilters(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -693,6 +728,7 @@ public AppServicePlanData(Azure.Core.AzureLocation location) { } public int? MaximumElasticWorkerCount { get { throw null; } set { } } public int? MaximumNumberOfWorkers { get { throw null; } } public int? NumberOfSites { get { throw null; } } + public int? NumberOfWorkers { get { throw null; } } public Azure.ResourceManager.AppService.Models.ProvisioningState? ProvisioningState { get { throw null; } } public string ResourceGroup { get { throw null; } } public Azure.ResourceManager.AppService.Models.AppServiceSkuDescription Sku { get { throw null; } set { } } @@ -949,7 +985,10 @@ public partial class AseV3NetworkingConfigurationData : Azure.ResourceManager.Mo public AseV3NetworkingConfigurationData() { } public bool? AllowNewPrivateEndpointConnections { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList ExternalInboundIPAddresses { get { throw null; } } + public string InboundIPAddressOverride { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList InternalInboundIPAddresses { get { throw null; } } + public bool? IsFtpEnabled { get { throw null; } set { } } + public bool? IsRemoteDebugEnabled { get { throw null; } set { } } public string Kind { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList LinuxOutboundIPAddresses { get { throw null; } } public System.Collections.Generic.IReadOnlyList WindowsOutboundIPAddresses { get { throw null; } } @@ -1037,6 +1076,40 @@ public CsmPublishingCredentialsPoliciesEntityData() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class CustomDnsSuffixConfigurationData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CustomDnsSuffixConfigurationData() { } + public System.Uri CertificateUri { get { throw null; } set { } } + public string DnsSuffix { get { throw null; } set { } } + public string KeyVaultReferenceIdentity { get { throw null; } set { } } + public string Kind { get { throw null; } set { } } + public string ProvisioningDetails { get { throw null; } } + public Azure.ResourceManager.AppService.Models.CustomDnsSuffixProvisioningState? ProvisioningState { get { throw null; } } + Azure.ResourceManager.AppService.CustomDnsSuffixConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.CustomDnsSuffixConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CustomDnsSuffixConfigurationResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected CustomDnsSuffixConfigurationResource() { } + public virtual Azure.ResourceManager.AppService.CustomDnsSuffixConfigurationData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.CustomDnsSuffixConfigurationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.CustomDnsSuffixConfigurationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppService.CustomDnsSuffixConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.CustomDnsSuffixConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DeletedSiteCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected DeletedSiteCollection() { } @@ -1242,8 +1315,12 @@ protected HostingEnvironmentMultiRolePoolResource() { } public partial class HostingEnvironmentPrivateEndpointConnectionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected HostingEnvironmentPrivateEndpointConnectionCollection() { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1272,8 +1349,12 @@ protected HostingEnvironmentPrivateEndpointConnectionResource() { } Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class HostingEnvironmentRecommendationCollection : Azure.ResourceManager.ArmCollection { @@ -1437,8 +1518,10 @@ public KubeEnvironmentData(Azure.Core.AzureLocation location) { } public Azure.Core.ResourceIdentifier AksResourceId { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.AppLogsConfiguration AppLogsConfiguration { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.ArcConfiguration ArcConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.ContainerAppsConfiguration ContainerAppsConfiguration { get { throw null; } set { } } public string DefaultDomain { get { throw null; } } public string DeploymentErrors { get { throw null; } } + public string EnvironmentType { get { throw null; } set { } } public Azure.ResourceManager.Resources.Models.ExtendedLocation ExtendedLocation { get { throw null; } set { } } public bool? IsInternalLoadBalancerEnabled { get { throw null; } set { } } public string Kind { get { throw null; } set { } } @@ -1908,12 +1991,14 @@ public SiteConfigData() { } public Azure.ResourceManager.AppService.Models.AppServiceCorsSettings Cors { get { throw null; } set { } } public System.Collections.Generic.IList DefaultDocuments { get { throw null; } set { } } public string DocumentRoot { get { throw null; } set { } } + public int? ElasticWebAppScaleLimit { get { throw null; } set { } } public System.Collections.Generic.IList ExperimentsRampUpRules { get { throw null; } } public Azure.ResourceManager.AppService.Models.AppServiceFtpsState? FtpsState { get { throw null; } set { } } public int? FunctionAppScaleLimit { get { throw null; } set { } } public System.Collections.Generic.IList HandlerMappings { get { throw null; } set { } } public string HealthCheckPath { get { throw null; } set { } } public System.Collections.Generic.IList IPSecurityRestrictions { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.SiteDefaultAction? IPSecurityRestrictionsDefaultAction { get { throw null; } set { } } public bool? IsAlwaysOn { get { throw null; } set { } } public bool? IsAutoHealEnabled { get { throw null; } set { } } public bool? IsDetailedErrorLoggingEnabled { get { throw null; } set { } } @@ -1937,7 +2022,9 @@ public SiteConfigData() { } public Azure.ResourceManager.AppService.Models.SiteMachineKey MachineKey { get { throw null; } } public Azure.ResourceManager.AppService.Models.ManagedPipelineMode? ManagedPipelineMode { get { throw null; } set { } } public int? ManagedServiceIdentityId { get { throw null; } set { } } + public System.Collections.Generic.IList Metadata { get { throw null; } set { } } public int? MinimumElasticInstanceCount { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite? MinTlsCipherSuite { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion? MinTlsVersion { get { throw null; } set { } } public string NetFrameworkVersion { get { throw null; } set { } } public string NodeVersion { get { throw null; } set { } } @@ -1952,6 +2039,7 @@ public SiteConfigData() { } public string RemoteDebuggingVersion { get { throw null; } set { } } public System.DateTimeOffset? RequestTracingExpirationOn { get { throw null; } set { } } public System.Collections.Generic.IList ScmIPSecurityRestrictions { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.SiteDefaultAction? ScmIPSecurityRestrictionsDefaultAction { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion? ScmMinTlsVersion { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.ScmType? ScmType { get { throw null; } set { } } public string TracingOptions { get { throw null; } set { } } @@ -1996,6 +2084,64 @@ protected SiteConfigSnapshotResource() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class SiteContainerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected SiteContainerCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string containerName, Azure.ResourceManager.AppService.SiteContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string containerName, Azure.ResourceManager.AppService.SiteContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string containerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string containerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string containerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string containerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string containerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string containerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class SiteContainerData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SiteContainerData() { } + public Azure.ResourceManager.AppService.Models.SiteContainerAuthType? AuthType { get { throw null; } set { } } + public System.DateTimeOffset? CreatedOn { get { throw null; } } + public System.Collections.Generic.IList EnvironmentVariables { get { throw null; } } + public string Image { get { throw null; } set { } } + public bool? IsMain { get { throw null; } set { } } + public string Kind { get { throw null; } set { } } + public System.DateTimeOffset? LastModifiedOn { get { throw null; } } + public string PasswordSecret { get { throw null; } set { } } + public string StartUpCommand { get { throw null; } set { } } + public string TargetPort { get { throw null; } set { } } + public string UserManagedIdentityClientId { get { throw null; } set { } } + public string UserName { get { throw null; } set { } } + public System.Collections.Generic.IList VolumeMounts { get { throw null; } } + Azure.ResourceManager.AppService.SiteContainerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.SiteContainerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SiteContainerResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected SiteContainerResource() { } + public virtual Azure.ResourceManager.AppService.SiteContainerData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string containerName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppService.SiteContainerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.SiteContainerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.SiteContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.SiteContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class SiteDeploymentCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected SiteDeploymentCollection() { } @@ -2520,8 +2666,12 @@ protected SiteNetworkConfigResource() { } public partial class SitePrivateEndpointConnectionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected SitePrivateEndpointConnectionCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -2550,8 +2700,12 @@ protected SitePrivateEndpointConnectionResource() { } Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class SiteProcessCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -3228,8 +3382,12 @@ protected SiteSlotNetworkConfigResource() { } public partial class SiteSlotPrivateEndpointConnectionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected SiteSlotPrivateEndpointConnectionCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -3258,8 +3416,12 @@ protected SiteSlotPrivateEndpointConnectionResource() { } Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class SiteSlotProcessCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -3330,6 +3492,42 @@ protected SiteSlotProcessResource() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class SiteSlotSiteContainerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected SiteSlotSiteContainerCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string containerName, Azure.ResourceManager.AppService.SiteContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string containerName, Azure.ResourceManager.AppService.SiteContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string containerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string containerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string containerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string containerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string containerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string containerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class SiteSlotSiteContainerResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected SiteSlotSiteContainerResource() { } + public virtual Azure.ResourceManager.AppService.SiteContainerData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string slot, string containerName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppService.SiteContainerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.SiteContainerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.SiteContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.SiteContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class SiteSlotVirtualNetworkConnectionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected SiteSlotVirtualNetworkConnectionCollection() { } @@ -3398,6 +3596,36 @@ protected SiteSlotVirtualNetworkConnectionResource() { } public virtual Azure.Response Update(Azure.ResourceManager.AppService.AppServiceVirtualNetworkData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.AppService.AppServiceVirtualNetworkData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class SiteSlotWorkflowCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected SiteSlotWorkflowCollection() { } + public virtual Azure.Response Exists(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class SiteSlotWorkflowResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected SiteSlotWorkflowResource() { } + public virtual Azure.ResourceManager.AppService.WorkflowEnvelopeData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string slot, string workflowName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppService.WorkflowEnvelopeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.WorkflowEnvelopeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class SiteSourceControlData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SiteSourceControlData() { } @@ -3483,6 +3711,36 @@ protected SiteVirtualNetworkConnectionResource() { } public virtual Azure.Response Update(Azure.ResourceManager.AppService.AppServiceVirtualNetworkData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.AppService.AppServiceVirtualNetworkData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class SiteWorkflowCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected SiteWorkflowCollection() { } + public virtual Azure.Response Exists(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class SiteWorkflowResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected SiteWorkflowResource() { } + public virtual Azure.ResourceManager.AppService.WorkflowEnvelopeData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string workflowName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppService.WorkflowEnvelopeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.WorkflowEnvelopeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class SlotConfigNamesResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; @@ -3513,6 +3771,55 @@ public SlotConfigNamesResourceData() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class StaticSiteBasicAuthPropertyCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected StaticSiteBasicAuthPropertyCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.StaticSiteBasicAuthName basicAuthName, Azure.ResourceManager.AppService.StaticSiteBasicAuthPropertyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.StaticSiteBasicAuthName basicAuthName, Azure.ResourceManager.AppService.StaticSiteBasicAuthPropertyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(Azure.ResourceManager.AppService.Models.StaticSiteBasicAuthName basicAuthName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(Azure.ResourceManager.AppService.Models.StaticSiteBasicAuthName basicAuthName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(Azure.ResourceManager.AppService.Models.StaticSiteBasicAuthName basicAuthName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(Azure.ResourceManager.AppService.Models.StaticSiteBasicAuthName basicAuthName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(Azure.ResourceManager.AppService.Models.StaticSiteBasicAuthName basicAuthName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(Azure.ResourceManager.AppService.Models.StaticSiteBasicAuthName basicAuthName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class StaticSiteBasicAuthPropertyData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public StaticSiteBasicAuthPropertyData() { } + public string ApplicableEnvironmentsMode { get { throw null; } set { } } + public System.Collections.Generic.IList Environments { get { throw null; } } + public string Kind { get { throw null; } set { } } + public string Password { get { throw null; } set { } } + public string SecretState { get { throw null; } } + public System.Uri SecretUri { get { throw null; } set { } } + Azure.ResourceManager.AppService.StaticSiteBasicAuthPropertyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.StaticSiteBasicAuthPropertyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class StaticSiteBasicAuthPropertyResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected StaticSiteBasicAuthPropertyResource() { } + public virtual Azure.ResourceManager.AppService.StaticSiteBasicAuthPropertyData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, Azure.ResourceManager.AppService.Models.StaticSiteBasicAuthName basicAuthName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppService.StaticSiteBasicAuthPropertyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.StaticSiteBasicAuthPropertyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.StaticSiteBasicAuthPropertyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.StaticSiteBasicAuthPropertyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class StaticSiteBuildCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected StaticSiteBuildCollection() { } @@ -3533,9 +3840,11 @@ public partial class StaticSiteBuildData : Azure.ResourceManager.Models.Resource public StaticSiteBuildData() { } public string BuildId { get { throw null; } } public System.DateTimeOffset? CreatedOn { get { throw null; } } + public System.Collections.Generic.IReadOnlyList DatabaseConnections { get { throw null; } } public string Hostname { get { throw null; } } public string Kind { get { throw null; } set { } } public System.DateTimeOffset? LastUpdatedOn { get { throw null; } } + public System.Collections.Generic.IReadOnlyList LinkedBackends { get { throw null; } } public string PullRequestTitle { get { throw null; } } public string SourceBranch { get { throw null; } } public Azure.ResourceManager.AppService.Models.StaticSiteBuildStatus? Status { get { throw null; } } @@ -3546,6 +3855,82 @@ public StaticSiteBuildData() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class StaticSiteBuildDatabaseConnectionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected StaticSiteBuildDatabaseConnectionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string databaseConnectionName, Azure.ResourceManager.AppService.StaticSiteDatabaseConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string databaseConnectionName, Azure.ResourceManager.AppService.StaticSiteDatabaseConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string databaseConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string databaseConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string databaseConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string databaseConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string databaseConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string databaseConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class StaticSiteBuildDatabaseConnectionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected StaticSiteBuildDatabaseConnectionResource() { } + public virtual Azure.ResourceManager.AppService.StaticSiteDatabaseConnectionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetBuildDatabaseConnectionWithDetails(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetBuildDatabaseConnectionWithDetailsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppService.StaticSiteDatabaseConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.StaticSiteDatabaseConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.AppService.Models.StaticSiteDatabaseConnectionPatchContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.AppService.Models.StaticSiteDatabaseConnectionPatchContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class StaticSiteBuildLinkedBackendCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected StaticSiteBuildLinkedBackendCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string linkedBackendName, Azure.ResourceManager.AppService.StaticSiteLinkedBackendData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string linkedBackendName, Azure.ResourceManager.AppService.StaticSiteLinkedBackendData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string linkedBackendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string linkedBackendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string linkedBackendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string linkedBackendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string linkedBackendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string linkedBackendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class StaticSiteBuildLinkedBackendResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected StaticSiteBuildLinkedBackendResource() { } + public virtual Azure.ResourceManager.AppService.StaticSiteLinkedBackendData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string environmentName, string linkedBackendName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, bool? isCleaningAuthConfig = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, bool? isCleaningAuthConfig = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppService.StaticSiteLinkedBackendData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.StaticSiteLinkedBackendData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.StaticSiteLinkedBackendData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.StaticSiteLinkedBackendData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation ValidateBackendForBuild(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.StaticSiteLinkedBackendData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ValidateBackendForBuildAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.StaticSiteLinkedBackendData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class StaticSiteBuildResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; @@ -3563,12 +3948,20 @@ protected StaticSiteBuildResource() { } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetBuildDatabaseConnectionsWithDetails(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetBuildDatabaseConnectionsWithDetailsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetFunctionAppSettings(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetFunctionAppSettingsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetFunctions(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetFunctionsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetStaticSiteBuildAppSettings(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetStaticSiteBuildAppSettingsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetStaticSiteBuildDatabaseConnection(string databaseConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetStaticSiteBuildDatabaseConnectionAsync(string databaseConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppService.StaticSiteBuildDatabaseConnectionCollection GetStaticSiteBuildDatabaseConnections() { throw null; } + public virtual Azure.Response GetStaticSiteBuildLinkedBackend(string linkedBackendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetStaticSiteBuildLinkedBackendAsync(string linkedBackendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppService.StaticSiteBuildLinkedBackendCollection GetStaticSiteBuildLinkedBackends() { throw null; } public virtual Azure.Response GetStaticSiteBuildUserProvidedFunctionApp(string functionAppName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetStaticSiteBuildUserProvidedFunctionAppAsync(string functionAppName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppService.StaticSiteBuildUserProvidedFunctionAppCollection GetStaticSiteBuildUserProvidedFunctionApps() { throw null; } @@ -3692,12 +4085,16 @@ public StaticSiteData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.AppService.Models.StaticSiteBuildProperties BuildProperties { get { throw null; } set { } } public string ContentDistributionEndpoint { get { throw null; } } public System.Collections.Generic.IReadOnlyList CustomDomains { get { throw null; } } + public System.Collections.Generic.IReadOnlyList DatabaseConnections { get { throw null; } } public string DefaultHostname { get { throw null; } } + public Azure.ResourceManager.AppService.Models.EnterpriseGradeCdnStatus? EnterpriseGradeCdnStatus { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public string KeyVaultReferenceIdentity { get { throw null; } } public string Kind { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList LinkedBackends { get { throw null; } } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } - public string Provider { get { throw null; } } + public string Provider { get { throw null; } set { } } + public string PublicNetworkAccess { get { throw null; } set { } } public string RepositoryToken { get { throw null; } set { } } public System.Uri RepositoryUri { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.AppServiceSkuDescription Sku { get { throw null; } set { } } @@ -3710,11 +4107,120 @@ public StaticSiteData(Azure.Core.AzureLocation location) { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class StaticSiteDatabaseConnectionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected StaticSiteDatabaseConnectionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string databaseConnectionName, Azure.ResourceManager.AppService.StaticSiteDatabaseConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string databaseConnectionName, Azure.ResourceManager.AppService.StaticSiteDatabaseConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string databaseConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string databaseConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string databaseConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string databaseConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string databaseConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string databaseConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class StaticSiteDatabaseConnectionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public StaticSiteDatabaseConnectionData() { } + public System.Collections.Generic.IReadOnlyList ConfigurationFiles { get { throw null; } } + public string ConnectionIdentity { get { throw null; } set { } } + public string ConnectionString { get { throw null; } set { } } + public string Kind { get { throw null; } set { } } + public string Region { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + Azure.ResourceManager.AppService.StaticSiteDatabaseConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.StaticSiteDatabaseConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class StaticSiteDatabaseConnectionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected StaticSiteDatabaseConnectionResource() { } + public virtual Azure.ResourceManager.AppService.StaticSiteDatabaseConnectionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDatabaseConnectionWithDetails(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDatabaseConnectionWithDetailsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppService.StaticSiteDatabaseConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.StaticSiteDatabaseConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.AppService.Models.StaticSiteDatabaseConnectionPatchContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.AppService.Models.StaticSiteDatabaseConnectionPatchContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class StaticSiteLinkedBackendCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected StaticSiteLinkedBackendCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string linkedBackendName, Azure.ResourceManager.AppService.StaticSiteLinkedBackendData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string linkedBackendName, Azure.ResourceManager.AppService.StaticSiteLinkedBackendData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string linkedBackendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string linkedBackendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string linkedBackendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string linkedBackendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string linkedBackendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string linkedBackendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class StaticSiteLinkedBackendData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public StaticSiteLinkedBackendData() { } + public Azure.Core.ResourceIdentifier BackendResourceId { get { throw null; } set { } } + public System.DateTimeOffset? CreatedOn { get { throw null; } } + public string Kind { get { throw null; } set { } } + public string ProvisioningState { get { throw null; } } + public string Region { get { throw null; } set { } } + Azure.ResourceManager.AppService.StaticSiteLinkedBackendData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.StaticSiteLinkedBackendData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class StaticSiteLinkedBackendResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected StaticSiteLinkedBackendResource() { } + public virtual Azure.ResourceManager.AppService.StaticSiteLinkedBackendData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string linkedBackendName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, bool? isCleaningAuthConfig = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, bool? isCleaningAuthConfig = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppService.StaticSiteLinkedBackendData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.StaticSiteLinkedBackendData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.StaticSiteLinkedBackendData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.StaticSiteLinkedBackendData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation ValidateBackend(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.StaticSiteLinkedBackendData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ValidateBackendAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.StaticSiteLinkedBackendData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class StaticSitePrivateEndpointConnectionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected StaticSitePrivateEndpointConnectionCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -3743,8 +4249,12 @@ protected StaticSitePrivateEndpointConnectionResource() { } Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionApprovalRequestInfo info, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.RemotePrivateEndpointConnectionARMResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class StaticSiteResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -3773,18 +4283,29 @@ protected StaticSiteResource() { } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetConfiguredRoles(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetConfiguredRolesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetDatabaseConnectionsWithDetails(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDatabaseConnectionsWithDetailsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetFunctionAppSettings(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetFunctionAppSettingsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetPrivateLinkResources(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetPrivateLinkResourcesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppService.StaticSiteBasicAuthPropertyCollection GetStaticSiteBasicAuthProperties() { throw null; } + public virtual Azure.Response GetStaticSiteBasicAuthProperty(Azure.ResourceManager.AppService.Models.StaticSiteBasicAuthName basicAuthName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetStaticSiteBasicAuthPropertyAsync(Azure.ResourceManager.AppService.Models.StaticSiteBasicAuthName basicAuthName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetStaticSiteBuild(string environmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetStaticSiteBuildAsync(string environmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppService.StaticSiteBuildCollection GetStaticSiteBuilds() { throw null; } public virtual Azure.Response GetStaticSiteCustomDomainOverview(string domainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetStaticSiteCustomDomainOverviewAsync(string domainName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppService.StaticSiteCustomDomainOverviewCollection GetStaticSiteCustomDomainOverviews() { throw null; } + public virtual Azure.Response GetStaticSiteDatabaseConnection(string databaseConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetStaticSiteDatabaseConnectionAsync(string databaseConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppService.StaticSiteDatabaseConnectionCollection GetStaticSiteDatabaseConnections() { throw null; } public virtual Azure.Pageable GetStaticSiteFunctions(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetStaticSiteFunctionsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetStaticSiteLinkedBackend(string linkedBackendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetStaticSiteLinkedBackendAsync(string linkedBackendName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppService.StaticSiteLinkedBackendCollection GetStaticSiteLinkedBackends() { throw null; } public virtual Azure.Response GetStaticSitePrivateEndpointConnection(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetStaticSitePrivateEndpointConnectionAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppService.StaticSitePrivateEndpointConnectionCollection GetStaticSitePrivateEndpointConnections() { throw null; } @@ -3928,9 +4449,11 @@ public TriggeredWebJobData() { } public string Error { get { throw null; } set { } } public System.Uri ExtraInfoUri { get { throw null; } set { } } public System.Uri HistoryUri { get { throw null; } set { } } + public bool? IsStorageAccountRequired { get { throw null; } set { } } public bool? IsUsingSdk { get { throw null; } set { } } public string Kind { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.TriggeredJobRun LatestRun { get { throw null; } set { } } + public string PublicNetworkAccess { get { throw null; } set { } } public string RunCommand { get { throw null; } set { } } public System.Uri SchedulerLogsUri { get { throw null; } set { } } public System.Collections.Generic.IDictionary Settings { get { throw null; } } @@ -3985,6 +4508,46 @@ public WebAppDeploymentData() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class WebAppRequestHistoryCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected WebAppRequestHistoryCollection() { } + public virtual Azure.Response Exists(string requestHistoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string requestHistoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string requestHistoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string requestHistoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string requestHistoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string requestHistoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class WebAppRequestHistoryData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WebAppRequestHistoryData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.AppService.Models.WebAppRequestHistoryProperties Properties { get { throw null; } set { } } + Azure.ResourceManager.AppService.WebAppRequestHistoryData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.WebAppRequestHistoryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WebAppRequestHistoryResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected WebAppRequestHistoryResource() { } + public virtual Azure.ResourceManager.AppService.WebAppRequestHistoryData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName, string requestHistoryName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppService.WebAppRequestHistoryData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.WebAppRequestHistoryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class WebJobData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public WebJobData() { } @@ -4131,9 +4694,12 @@ public WebSiteData(Azure.Core.AzureLocation location) { } public int? ContainerSize { get { throw null; } set { } } public string CustomDomainVerificationId { get { throw null; } set { } } public int? DailyMemoryTimeQuota { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.AppDaprConfig DaprConfig { get { throw null; } set { } } public string DefaultHostName { get { throw null; } } + public Azure.ResourceManager.AppService.Models.SiteDnsConfig DnsConfiguration { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList EnabledHostNames { get { throw null; } } public Azure.ResourceManager.Resources.Models.ExtendedLocation ExtendedLocation { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.FunctionAppConfig FunctionAppConfig { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.HostingEnvironmentProfile HostingEnvironmentProfile { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList HostNames { get { throw null; } } public System.Collections.Generic.IList HostNameSslStates { get { throw null; } } @@ -4149,15 +4715,22 @@ public WebSiteData(Azure.Core.AzureLocation location) { } public bool? IsReserved { get { throw null; } set { } } public bool? IsScmSiteAlsoStopped { get { throw null; } set { } } public bool? IsStorageAccountRequired { get { throw null; } set { } } + public bool? IsVnetBackupRestoreEnabled { get { throw null; } set { } } + public bool? IsVnetContentShareEnabled { get { throw null; } set { } } + public bool? IsVnetImagePullEnabled { get { throw null; } set { } } + public bool? IsVnetRouteAllEnabled { get { throw null; } set { } } public bool? IsXenon { get { throw null; } set { } } public string KeyVaultReferenceIdentity { get { throw null; } set { } } public string Kind { get { throw null; } set { } } public System.DateTimeOffset? LastModifiedTimeUtc { get { throw null; } } + public string ManagedEnvironmentId { get { throw null; } set { } } public int? MaxNumberOfWorkers { get { throw null; } } public string OutboundIPAddresses { get { throw null; } } public string PossibleOutboundIPAddresses { get { throw null; } } + public string PublicNetworkAccess { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.RedundancyMode? RedundancyMode { get { throw null; } set { } } public string RepositorySiteName { get { throw null; } } + public Azure.ResourceManager.AppService.Models.FunctionAppResourceConfig ResourceConfig { get { throw null; } set { } } public string ResourceGroup { get { throw null; } } public Azure.ResourceManager.AppService.Models.SiteConfigProperties SiteConfig { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.SlotSwapStatus SlotSwapStatus { get { throw null; } } @@ -4167,6 +4740,7 @@ public WebSiteData(Azure.Core.AzureLocation location) { } public System.Collections.Generic.IReadOnlyList TrafficManagerHostNames { get { throw null; } } public Azure.ResourceManager.AppService.Models.AppServiceUsageState? UsageState { get { throw null; } } public Azure.Core.ResourceIdentifier VirtualNetworkSubnetId { get { throw null; } set { } } + public string WorkloadProfileName { get { throw null; } set { } } Azure.ResourceManager.AppService.WebSiteData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.AppService.WebSiteData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4336,6 +4910,8 @@ protected WebSiteResource() { } public virtual System.Threading.Tasks.Task ApplySlotConfigToProductionAsync(Azure.ResourceManager.AppService.Models.CsmSlotEntity slotSwapEntity, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Backup(Azure.ResourceManager.AppService.Models.WebAppBackupInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> BackupAsync(Azure.ResourceManager.AppService.Models.WebAppBackupInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateOneDeployOperation(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOneDeployOperationAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateOrUpdateHostSecret(string keyType, string keyName, Azure.ResourceManager.AppService.Models.WebAppKeyInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateOrUpdateHostSecretAsync(string keyType, string keyName, Azure.ResourceManager.AppService.Models.WebAppKeyInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name) { throw null; } @@ -4345,6 +4921,8 @@ protected WebSiteResource() { } public virtual System.Threading.Tasks.Task DeleteBackupConfigurationAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response DeleteHostSecret(string keyType, string keyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteHostSecretAsync(string keyType, string keyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response DeployWorkflowArtifacts(Azure.ResourceManager.AppService.Models.WorkflowArtifacts workflowArtifacts = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeployWorkflowArtifactsAsync(Azure.ResourceManager.AppService.Models.WorkflowArtifacts workflowArtifacts = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response DisableAllForWebAppRecommendation(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DisableAllForWebAppRecommendationAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response DiscoverBackup(Azure.ResourceManager.AppService.Models.RestoreRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -4373,6 +4951,8 @@ protected WebSiteResource() { } public virtual System.Threading.Tasks.Task> GetAuthSettingsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetAuthSettingsV2(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAuthSettingsV2Async(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetAuthSettingsV2WithoutSecrets(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAuthSettingsV2WithoutSecretsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetAzureStorageAccounts(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAzureStorageAccountsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetBackupConfiguration(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -4404,10 +4984,16 @@ protected WebSiteResource() { } public virtual Azure.AsyncPageable GetNetworkTracesAsync(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetNetworkTracesV2(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetNetworkTracesV2Async(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetOneDeployStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetOneDeployStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetPerfMonCounters(string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetPerfMonCountersAsync(string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetPrivateLinkResources(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetPrivateLinkResourcesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation GetProductionSiteDeploymentStatus(Azure.WaitUntil waitUntil, string deploymentStatusId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetProductionSiteDeploymentStatusAsync(Azure.WaitUntil waitUntil, string deploymentStatusId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetProductionSiteDeploymentStatuses(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetProductionSiteDeploymentStatusesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation GetPublishingCredentials(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetPublishingCredentialsAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetPublishingProfileXmlWithSecrets(Azure.ResourceManager.AppService.Models.CsmPublishingProfile publishingProfileOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -4421,6 +5007,9 @@ protected WebSiteResource() { } public virtual Azure.Response GetSiteConfigAppsetting(string appSettingKey, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetSiteConfigAppsettingAsync(string appSettingKey, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppService.SiteConfigAppsettingCollection GetSiteConfigAppsettings() { throw null; } + public virtual Azure.Response GetSiteContainer(string containerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSiteContainerAsync(string containerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppService.SiteContainerCollection GetSiteContainers() { throw null; } public virtual Azure.Response GetSiteDeployment(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetSiteDeploymentAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppService.SiteDeploymentCollection GetSiteDeployments() { throw null; } @@ -4466,6 +5055,9 @@ protected WebSiteResource() { } public virtual Azure.Response GetSiteVirtualNetworkConnection(string vnetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetSiteVirtualNetworkConnectionAsync(string vnetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppService.SiteVirtualNetworkConnectionCollection GetSiteVirtualNetworkConnections() { throw null; } + public virtual Azure.Response GetSiteWorkflow(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSiteWorkflowAsync(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppService.SiteWorkflowCollection GetSiteWorkflows() { throw null; } public virtual Azure.ResourceManager.AppService.SlotConfigNamesResource GetSlotConfigNamesResource() { throw null; } public virtual Azure.Pageable GetSlotDifferencesFromProduction(Azure.ResourceManager.AppService.Models.CsmSlotEntity slotSwapEntity, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetSlotDifferencesFromProductionAsync(Azure.ResourceManager.AppService.Models.CsmSlotEntity slotSwapEntity, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -4513,12 +5105,25 @@ protected WebSiteResource() { } public virtual Azure.Response GetWebSiteWebJob(string webJobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetWebSiteWebJobAsync(string webJobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppService.WebSiteWebJobCollection GetWebSiteWebJobs() { throw null; } + public virtual Azure.Response GetWorkflowRun(string workflowName, string runName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetWorkflowRunAsync(string workflowName, string runName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppService.WorkflowRunCollection GetWorkflowRuns(string workflowName) { throw null; } + public virtual Azure.Response GetWorkflowsConnections(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetWorkflowsConnectionsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetWorkflowTrigger(string workflowName, string triggerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetWorkflowTriggerAsync(string workflowName, string triggerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppService.WorkflowTriggerCollection GetWorkflowTriggers(string workflowName) { throw null; } + public virtual Azure.Response GetWorkflowVersion(string workflowName, string versionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetWorkflowVersionAsync(string workflowName, string versionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppService.WorkflowVersionCollection GetWorkflowVersions(string workflowName) { throw null; } public virtual Azure.Response IsCloneable(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> IsCloneableAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation MigrateMySql(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.MigrateMySqlContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> MigrateMySqlAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.AppService.Models.MigrateMySqlContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation MigrateStorage(Azure.WaitUntil waitUntil, string subscriptionName, Azure.ResourceManager.AppService.Models.StorageMigrationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> MigrateStorageAsync(Azure.WaitUntil waitUntil, string subscriptionName, Azure.ResourceManager.AppService.Models.StorageMigrationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RegenerateAccessKeyWorkflow(string workflowName, Azure.ResourceManager.AppService.Models.WorkflowRegenerateActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task RegenerateAccessKeyWorkflowAsync(string workflowName, Azure.ResourceManager.AppService.Models.WorkflowRegenerateActionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response ResetAllFiltersForWebAppRecommendation(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task ResetAllFiltersForWebAppRecommendationAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response ResetProductionSlotConfig(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -4576,6 +5181,8 @@ protected WebSiteResource() { } public virtual System.Threading.Tasks.Task> UpdateMetadataAsync(Azure.ResourceManager.AppService.Models.AppServiceConfigurationDictionary metadata, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response UpdateSitePushSettings(Azure.ResourceManager.AppService.Models.WebAppPushSettings pushSettings, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateSitePushSettingsAsync(Azure.ResourceManager.AppService.Models.WebAppPushSettings pushSettings, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ValidateWorkflow(string workflowName, Azure.ResourceManager.AppService.Models.WorkflowData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ValidateWorkflowAsync(string workflowName, Azure.ResourceManager.AppService.Models.WorkflowData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class WebSiteResourceHealthMetadataResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -4918,6 +5525,8 @@ protected WebSiteSlotResource() { } public virtual System.Threading.Tasks.Task DeleteBackupConfigurationSlotAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response DeleteHostSecretSlot(string keyType, string keyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteHostSecretSlotAsync(string keyType, string keyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response DeployWorkflowArtifactsSlot(Azure.ResourceManager.AppService.Models.WorkflowArtifacts workflowArtifacts = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeployWorkflowArtifactsSlotAsync(Azure.ResourceManager.AppService.Models.WorkflowArtifacts workflowArtifacts = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response DiscoverBackupSlot(Azure.ResourceManager.AppService.Models.RestoreRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> DiscoverBackupSlotAsync(Azure.ResourceManager.AppService.Models.RestoreRequestInfo info, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GenerateNewSitePublishingPasswordSlot(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -4944,6 +5553,8 @@ protected WebSiteSlotResource() { } public virtual System.Threading.Tasks.Task> GetAuthSettingsSlotAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetAuthSettingsV2Slot(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAuthSettingsV2SlotAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetAuthSettingsV2WithoutSecretsSlot(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAuthSettingsV2WithoutSecretsSlotAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetAzureStorageAccountsSlot(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAzureStorageAccountsSlotAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetBackupConfigurationSlot(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -5021,11 +5632,21 @@ protected WebSiteSlotResource() { } public virtual Azure.Response GetSiteSlotProcess(string processId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetSiteSlotProcessAsync(string processId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppService.SiteSlotProcessCollection GetSiteSlotProcesses() { throw null; } + public virtual Azure.Response GetSiteSlotSiteContainer(string containerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSiteSlotSiteContainerAsync(string containerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppService.SiteSlotSiteContainerCollection GetSiteSlotSiteContainers() { throw null; } public virtual Azure.Response GetSiteSlotVirtualNetworkConnection(string vnetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetSiteSlotVirtualNetworkConnectionAsync(string vnetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppService.SiteSlotVirtualNetworkConnectionCollection GetSiteSlotVirtualNetworkConnections() { throw null; } + public virtual Azure.Response GetSiteSlotWorkflow(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSiteSlotWorkflowAsync(string workflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppService.SiteSlotWorkflowCollection GetSiteSlotWorkflows() { throw null; } public virtual Azure.Pageable GetSlotDifferencesSlot(Azure.ResourceManager.AppService.Models.CsmSlotEntity slotSwapEntity, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetSlotDifferencesSlotAsync(Azure.ResourceManager.AppService.Models.CsmSlotEntity slotSwapEntity, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetSlotSiteDeploymentStatusesSlot(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetSlotSiteDeploymentStatusesSlotAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation GetSlotSiteDeploymentStatusSlot(Azure.WaitUntil waitUntil, string deploymentStatusId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSlotSiteDeploymentStatusSlotAsync(Azure.WaitUntil waitUntil, string deploymentStatusId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetSlotSnapshots(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetSlotSnapshotsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetSlotSnapshotsFromDRSecondary(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -5073,6 +5694,8 @@ protected WebSiteSlotResource() { } public virtual Azure.Response GetWebSiteTriggeredwebJob(string webJobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetWebSiteTriggeredwebJobAsync(string webJobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppService.WebSiteTriggeredwebJobCollection GetWebSiteTriggeredwebJobs() { throw null; } + public virtual Azure.Response GetWorkflowsConnectionsSlot(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetWorkflowsConnectionsSlotAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response IsCloneableSlot(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> IsCloneableSlotAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response ResetSlotConfigurationSlot(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -5391,6 +6014,382 @@ protected WebSiteWebJobResource() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class WorkflowEnvelopeData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WorkflowEnvelopeData() { } + public string Kind { get { throw null; } } + public Azure.Core.AzureLocation? Location { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowEnvelopeProperties Properties { get { throw null; } } + Azure.ResourceManager.AppService.WorkflowEnvelopeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.WorkflowEnvelopeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowRunActionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected WorkflowRunActionCollection() { } + public virtual Azure.Response Exists(string actionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string actionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string actionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(int? top = default(int?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(int? top = default(int?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string actionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string actionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string actionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class WorkflowRunActionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WorkflowRunActionData() { } + public string Code { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WebAppRunActionCorrelation Correlation { get { throw null; } } + public System.DateTimeOffset? EndOn { get { throw null; } } + public System.BinaryData Error { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WebAppContentLink InputsLink { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WebAppContentLink OutputsLink { get { throw null; } } + public System.Collections.Generic.IReadOnlyList RetryHistory { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowStatus? Status { get { throw null; } } + public System.BinaryData TrackedProperties { get { throw null; } } + public string TrackingId { get { throw null; } } + Azure.ResourceManager.AppService.WorkflowRunActionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.WorkflowRunActionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowRunActionRepetitionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected WorkflowRunActionRepetitionCollection() { } + public virtual Azure.Response Exists(string repetitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string repetitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string repetitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string repetitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string repetitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string repetitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class WorkflowRunActionRepetitionDefinitionData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WorkflowRunActionRepetitionDefinitionData(Azure.Core.AzureLocation location) { } + public string Code { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.WebAppRunActionCorrelation Correlation { get { throw null; } set { } } + public System.DateTimeOffset? EndOn { get { throw null; } set { } } + public System.BinaryData Error { get { throw null; } set { } } + public System.BinaryData Inputs { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WebAppContentLink InputsLink { get { throw null; } } + public int? IterationCount { get { throw null; } set { } } + public System.BinaryData Outputs { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WebAppContentLink OutputsLink { get { throw null; } } + public System.Collections.Generic.IList RepetitionIndexes { get { throw null; } } + public System.Collections.Generic.IList RetryHistory { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.WorkflowStatus? Status { get { throw null; } set { } } + public System.BinaryData TrackedProperties { get { throw null; } } + public string TrackingId { get { throw null; } } + Azure.ResourceManager.AppService.WorkflowRunActionRepetitionDefinitionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.WorkflowRunActionRepetitionDefinitionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowRunActionRepetitionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected WorkflowRunActionRepetitionResource() { } + public virtual Azure.ResourceManager.AppService.WorkflowRunActionRepetitionDefinitionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetExpressionTraces(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetExpressionTracesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppService.WebAppRequestHistoryCollection GetWebAppRequestHistories() { throw null; } + public virtual Azure.Response GetWebAppRequestHistory(string requestHistoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetWebAppRequestHistoryAsync(string requestHistoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppService.WorkflowRunActionRepetitionDefinitionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.WorkflowRunActionRepetitionDefinitionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowRunActionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected WorkflowRunActionResource() { } + public virtual Azure.ResourceManager.AppService.WorkflowRunActionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetExpressionTraces(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetExpressionTracesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetWorkflowRunActionRepetition(string repetitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetWorkflowRunActionRepetitionAsync(string repetitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppService.WorkflowRunActionRepetitionCollection GetWorkflowRunActionRepetitions() { throw null; } + public virtual Azure.Response GetWorkflowRunActionScopeRepetition(string repetitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetWorkflowRunActionScopeRepetitionAsync(string repetitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppService.WorkflowRunActionScopeRepetitionCollection GetWorkflowRunActionScopeRepetitions() { throw null; } + Azure.ResourceManager.AppService.WorkflowRunActionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.WorkflowRunActionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowRunActionScopeRepetitionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected WorkflowRunActionScopeRepetitionCollection() { } + public virtual Azure.Response Exists(string repetitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string repetitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string repetitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string repetitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string repetitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string repetitionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class WorkflowRunActionScopeRepetitionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected WorkflowRunActionScopeRepetitionResource() { } + public virtual Azure.ResourceManager.AppService.WorkflowRunActionRepetitionDefinitionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppService.WorkflowRunActionRepetitionDefinitionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.WorkflowRunActionRepetitionDefinitionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowRunCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected WorkflowRunCollection() { } + public virtual Azure.Response Exists(string runName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string runName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string runName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(int? top = default(int?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(int? top = default(int?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string runName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string runName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string runName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class WorkflowRunData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WorkflowRunData() { } + public string Code { get { throw null; } } + public string CorrelationClientTrackingId { get { throw null; } } + public string CorrelationId { get { throw null; } } + public System.DateTimeOffset? EndOn { get { throw null; } } + public System.BinaryData Error { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Outputs { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowRunTrigger Response { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowStatus? Status { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowRunTrigger Trigger { get { throw null; } } + public System.DateTimeOffset? WaitEndOn { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowResourceReference Workflow { get { throw null; } } + Azure.ResourceManager.AppService.WorkflowRunData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.WorkflowRunData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowRunResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected WorkflowRunResource() { } + public virtual Azure.ResourceManager.AppService.WorkflowRunData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response Cancel(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CancelAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetWorkflowRunAction(string actionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetWorkflowRunActionAsync(string actionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppService.WorkflowRunActionCollection GetWorkflowRunActions() { throw null; } + Azure.ResourceManager.AppService.WorkflowRunData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.WorkflowRunData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowTriggerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected WorkflowTriggerCollection() { } + public virtual Azure.Response Exists(string triggerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string triggerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string triggerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(int? top = default(int?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(int? top = default(int?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string triggerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string triggerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string triggerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class WorkflowTriggerData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WorkflowTriggerData() { } + public System.DateTimeOffset? ChangedOn { get { throw null; } } + public System.DateTimeOffset? CreatedOn { get { throw null; } } + public System.DateTimeOffset? LastExecutionOn { get { throw null; } } + public System.DateTimeOffset? NextExecutionOn { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowTriggerRecurrence Recurrence { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowState? State { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowStatus? Status { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowResourceReference Workflow { get { throw null; } } + Azure.ResourceManager.AppService.WorkflowTriggerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.WorkflowTriggerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowTriggerHistoryCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected WorkflowTriggerHistoryCollection() { } + public virtual Azure.Response Exists(string historyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string historyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string historyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(int? top = default(int?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(int? top = default(int?), string filter = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string historyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string historyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string historyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class WorkflowTriggerHistoryData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WorkflowTriggerHistoryData() { } + public string Code { get { throw null; } } + public string CorrelationClientTrackingId { get { throw null; } } + public System.DateTimeOffset? EndOn { get { throw null; } } + public System.BinaryData Error { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WebAppContentLink InputsLink { get { throw null; } } + public bool? IsFired { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WebAppContentLink OutputsLink { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowResourceReference Run { get { throw null; } } + public System.DateTimeOffset? ScheduledOn { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowStatus? Status { get { throw null; } } + public string TrackingId { get { throw null; } } + Azure.ResourceManager.AppService.WorkflowTriggerHistoryData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.WorkflowTriggerHistoryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowTriggerHistoryResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected WorkflowTriggerHistoryResource() { } + public virtual Azure.ResourceManager.AppService.WorkflowTriggerHistoryData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, string historyName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Resubmit(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ResubmitAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppService.WorkflowTriggerHistoryData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.WorkflowTriggerHistoryData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowTriggerResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected WorkflowTriggerResource() { } + public virtual Azure.ResourceManager.AppService.WorkflowTriggerData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetCallbackUrl(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetCallbackUrlAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetSchemaJson(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSchemaJsonAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.AppService.WorkflowTriggerHistoryCollection GetWorkflowTriggerHistories() { throw null; } + public virtual Azure.Response GetWorkflowTriggerHistory(string historyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetWorkflowTriggerHistoryAsync(string historyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Run(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task RunAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppService.WorkflowTriggerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.WorkflowTriggerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowVersionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected WorkflowVersionCollection() { } + public virtual Azure.Response Exists(string versionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string versionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string versionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string versionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string versionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string versionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class WorkflowVersionData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WorkflowVersionData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.AppService.Models.FlowAccessControlConfiguration AccessControl { get { throw null; } set { } } + public string AccessEndpoint { get { throw null; } } + public System.DateTimeOffset? ChangedOn { get { throw null; } } + public System.DateTimeOffset? CreatedOn { get { throw null; } } + public System.BinaryData Definition { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.FlowEndpointsConfiguration EndpointsConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.WorkflowResourceReference IntegrationAccount { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Parameters { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowSku Sku { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowState? State { get { throw null; } set { } } + public string Version { get { throw null; } } + Azure.ResourceManager.AppService.WorkflowVersionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.WorkflowVersionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowVersionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected WorkflowVersionResource() { } + public virtual Azure.ResourceManager.AppService.WorkflowVersionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string workflowName, string versionId) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.AppService.WorkflowVersionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.WorkflowVersionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } } namespace Azure.ResourceManager.AppService.Mocking { @@ -5409,6 +6408,7 @@ protected MockableAppServiceArmClient() { } public virtual Azure.ResourceManager.AppService.AppServiceSourceControlResource GetAppServiceSourceControlResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.AseV3NetworkingConfigurationResource GetAseV3NetworkingConfigurationResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.CertificateOrderDetectorResource GetCertificateOrderDetectorResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppService.CustomDnsSuffixConfigurationResource GetCustomDnsSuffixConfigurationResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.DeletedSiteResource GetDeletedSiteResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.DomainOwnershipIdentifierResource GetDomainOwnershipIdentifierResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.HostingEnvironmentDetectorResource GetHostingEnvironmentDetectorResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -5428,6 +6428,7 @@ protected MockableAppServiceArmClient() { } public virtual Azure.ResourceManager.AppService.SiteBackupResource GetSiteBackupResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.SiteConfigAppsettingResource GetSiteConfigAppsettingResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.SiteConfigSnapshotResource GetSiteConfigSnapshotResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppService.SiteContainerResource GetSiteContainerResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.SiteDeploymentResource GetSiteDeploymentResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.SiteDetectorResource GetSiteDetectorResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.SiteDiagnosticAnalysisResource GetSiteDiagnosticAnalysisResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -5468,18 +6469,27 @@ protected MockableAppServiceArmClient() { } public virtual Azure.ResourceManager.AppService.SiteSlotPrivateEndpointConnectionResource GetSiteSlotPrivateEndpointConnectionResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.SiteSlotProcessModuleResource GetSiteSlotProcessModuleResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.SiteSlotProcessResource GetSiteSlotProcessResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppService.SiteSlotSiteContainerResource GetSiteSlotSiteContainerResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.SiteSlotVirtualNetworkConnectionGatewayResource GetSiteSlotVirtualNetworkConnectionGatewayResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.SiteSlotVirtualNetworkConnectionResource GetSiteSlotVirtualNetworkConnectionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppService.SiteSlotWorkflowResource GetSiteSlotWorkflowResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.SiteVirtualNetworkConnectionGatewayResource GetSiteVirtualNetworkConnectionGatewayResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.SiteVirtualNetworkConnectionResource GetSiteVirtualNetworkConnectionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppService.SiteWorkflowResource GetSiteWorkflowResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.SlotConfigNamesResource GetSlotConfigNamesResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppService.StaticSiteBasicAuthPropertyResource GetStaticSiteBasicAuthPropertyResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppService.StaticSiteBuildDatabaseConnectionResource GetStaticSiteBuildDatabaseConnectionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppService.StaticSiteBuildLinkedBackendResource GetStaticSiteBuildLinkedBackendResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.StaticSiteBuildResource GetStaticSiteBuildResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.StaticSiteBuildUserProvidedFunctionAppResource GetStaticSiteBuildUserProvidedFunctionAppResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.StaticSiteCustomDomainOverviewResource GetStaticSiteCustomDomainOverviewResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppService.StaticSiteDatabaseConnectionResource GetStaticSiteDatabaseConnectionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppService.StaticSiteLinkedBackendResource GetStaticSiteLinkedBackendResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.StaticSitePrivateEndpointConnectionResource GetStaticSitePrivateEndpointConnectionResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.StaticSiteResource GetStaticSiteResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.StaticSiteUserProvidedFunctionAppResource GetStaticSiteUserProvidedFunctionAppResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.TopLevelDomainResource GetTopLevelDomainResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppService.WebAppRequestHistoryResource GetWebAppRequestHistoryResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.WebSiteConfigConnectionStringResource GetWebSiteConfigConnectionStringResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.WebSiteConfigResource GetWebSiteConfigResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.WebSiteContinuousWebJobResource GetWebSiteContinuousWebJobResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -5510,6 +6520,13 @@ protected MockableAppServiceArmClient() { } public virtual Azure.ResourceManager.AppService.WebSiteTriggeredWebJobHistoryResource GetWebSiteTriggeredWebJobHistoryResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.WebSiteTriggeredwebJobResource GetWebSiteTriggeredwebJobResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.AppService.WebSiteWebJobResource GetWebSiteWebJobResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppService.WorkflowRunActionRepetitionResource GetWorkflowRunActionRepetitionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppService.WorkflowRunActionResource GetWorkflowRunActionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppService.WorkflowRunActionScopeRepetitionResource GetWorkflowRunActionScopeRepetitionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppService.WorkflowRunResource GetWorkflowRunResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppService.WorkflowTriggerHistoryResource GetWorkflowTriggerHistoryResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppService.WorkflowTriggerResource GetWorkflowTriggerResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.AppService.WorkflowVersionResource GetWorkflowVersionResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableAppServiceResourceGroupResource : Azure.ResourceManager.ArmResource { @@ -5570,12 +6587,16 @@ protected MockableAppServiceSubscriptionResource() { } public virtual Azure.AsyncPageable GetAppServiceEnvironmentsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetAppServicePlans(bool? detailed = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetAppServicePlansAsync(bool? detailed = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAseRegions(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAseRegionsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetAvailableStacksOnPremProviders(Azure.ResourceManager.AppService.Models.ProviderOSTypeSelected? osTypeSelected = default(Azure.ResourceManager.AppService.Models.ProviderOSTypeSelected?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetAvailableStacksOnPremProvidersAsync(Azure.ResourceManager.AppService.Models.ProviderOSTypeSelected? osTypeSelected = default(Azure.ResourceManager.AppService.Models.ProviderOSTypeSelected?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetBillingMeters(string billingLocation = null, string osType = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetBillingMetersAsync(string billingLocation = null, string osType = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetControlCenterSsoRequestDomain(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetControlCenterSsoRequestDomainAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetCustomHostNameSites(string hostname = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetCustomHostNameSitesAsync(string hostname = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetDeletedSite(string deletedSiteId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDeletedSiteAsync(string deletedSiteId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.AppService.DeletedSiteCollection GetDeletedSites() { throw null; } @@ -5585,6 +6606,8 @@ protected MockableAppServiceSubscriptionResource() { } public virtual System.Threading.Tasks.Task> GetDeletedWebAppByLocationDeletedWebAppAsync(Azure.Core.AzureLocation location, string deletedSiteId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetGeoRegions(Azure.ResourceManager.AppService.Models.AppServiceSkuName? sku = default(Azure.ResourceManager.AppService.Models.AppServiceSkuName?), bool? linuxWorkersEnabled = default(bool?), bool? xenonWorkersEnabled = default(bool?), bool? linuxDynamicWorkersEnabled = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetGeoRegionsAsync(Azure.ResourceManager.AppService.Models.AppServiceSkuName? sku = default(Azure.ResourceManager.AppService.Models.AppServiceSkuName?), bool? linuxWorkersEnabled = default(bool?), bool? xenonWorkersEnabled = default(bool?), bool? linuxDynamicWorkersEnabled = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetGetUsagesInLocations(Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetGetUsagesInLocationsAsync(Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetKubeEnvironments(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetKubeEnvironmentsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetPremierAddOnOffers(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -5697,6 +6720,42 @@ public AppCertificatePatch() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class AppDaprConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AppDaprConfig() { } + public string AppId { get { throw null; } set { } } + public int? AppPort { get { throw null; } set { } } + public int? HttpMaxRequestSize { get { throw null; } set { } } + public int? HttpReadBufferSize { get { throw null; } set { } } + public bool? IsApiLoggingEnabled { get { throw null; } set { } } + public bool? IsEnabled { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.AppDaprLogLevel? LogLevel { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.AppDaprConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.AppDaprConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AppDaprLogLevel : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AppDaprLogLevel(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.AppDaprLogLevel Debug { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppDaprLogLevel Error { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppDaprLogLevel Info { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppDaprLogLevel Warn { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.AppDaprLogLevel 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.AppService.Models.AppDaprLogLevel left, Azure.ResourceManager.AppService.Models.AppDaprLogLevel right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.AppDaprLogLevel (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.AppDaprLogLevel left, Azure.ResourceManager.AppService.Models.AppDaprLogLevel right) { throw null; } + public override string ToString() { throw null; } + } public partial class AppInsightsWebAppStackSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AppInsightsWebAppStackSettings() { } @@ -5875,6 +6934,22 @@ internal AppServiceArmPlan() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class AppServiceAseRegion : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AppServiceAseRegion() { } + public System.Collections.Generic.IList AvailableOS { get { throw null; } } + public System.Collections.Generic.IList AvailableSku { get { throw null; } } + public string DisplayName { get { throw null; } } + public bool? IsDedicatedHostEnabled { get { throw null; } } + public bool? IsStandard { get { throw null; } } + public bool? IsZoneRedundantEnabled { get { throw null; } } + public string Kind { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.AppServiceAseRegion System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.AppServiceAseRegion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class AppServiceBillingMeter : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AppServiceBillingMeter() { } @@ -5940,6 +7015,7 @@ public partial class AppServiceCertificateEmail : Azure.ResourceManager.Models.R { public AppServiceCertificateEmail() { } public string EmailId { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public string Kind { get { throw null; } set { } } public System.DateTimeOffset? TimeStamp { get { throw null; } set { } } Azure.ResourceManager.AppService.Models.AppServiceCertificateEmail System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6205,6 +7281,7 @@ public partial class AppServiceEnvironmentPatch : Azure.ResourceManager.Models.R { public AppServiceEnvironmentPatch() { } public System.Collections.Generic.IList ClusterSettings { get { throw null; } } + public Azure.ResourceManager.AppService.CustomDnsSuffixConfigurationData CustomDnsSuffixConfiguration { get { throw null; } set { } } public int? DedicatedHostCount { get { throw null; } set { } } public string DnsSuffix { get { throw null; } set { } } public int? FrontEndScaleFactor { get { throw null; } set { } } @@ -6217,8 +7294,11 @@ public AppServiceEnvironmentPatch() { } public int? MaximumNumberOfMachines { get { throw null; } } public int? MultiRoleCount { get { throw null; } } public string MultiSize { get { throw null; } set { } } + public Azure.ResourceManager.AppService.AseV3NetworkingConfigurationData NetworkingConfiguration { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.ProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.AppService.Models.HostingEnvironmentStatus? Status { get { throw null; } } + public Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradeAvailability? UpgradeAvailability { get { throw null; } } + public Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradePreference? UpgradePreference { get { throw null; } set { } } public System.Collections.Generic.IList UserWhitelistedIPRanges { get { throw null; } } public Azure.ResourceManager.AppService.Models.AppServiceVirtualNetworkProfile VirtualNetwork { get { throw null; } set { } } Azure.ResourceManager.AppService.Models.AppServiceEnvironmentPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6231,6 +7311,7 @@ public partial class AppServiceEnvironmentProperties : System.ClientModel.Primit { public AppServiceEnvironmentProperties(Azure.ResourceManager.AppService.Models.AppServiceVirtualNetworkProfile virtualNetwork) { } public System.Collections.Generic.IList ClusterSettings { get { throw null; } } + public Azure.ResourceManager.AppService.CustomDnsSuffixConfigurationData CustomDnsSuffixConfiguration { get { throw null; } set { } } public int? DedicatedHostCount { get { throw null; } set { } } public string DnsSuffix { get { throw null; } set { } } public int? FrontEndScaleFactor { get { throw null; } set { } } @@ -6242,8 +7323,11 @@ public AppServiceEnvironmentProperties(Azure.ResourceManager.AppService.Models.A public int? MaximumNumberOfMachines { get { throw null; } } public int? MultiRoleCount { get { throw null; } } public string MultiSize { get { throw null; } set { } } + public Azure.ResourceManager.AppService.AseV3NetworkingConfigurationData NetworkingConfiguration { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.ProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.AppService.Models.HostingEnvironmentStatus? Status { get { throw null; } } + public Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradeAvailability? UpgradeAvailability { get { throw null; } } + public Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradePreference? UpgradePreference { get { throw null; } set { } } public System.Collections.Generic.IList UserWhitelistedIPRanges { get { throw null; } } public Azure.ResourceManager.AppService.Models.AppServiceVirtualNetworkProfile VirtualNetwork { get { throw null; } set { } } Azure.ResourceManager.AppService.Models.AppServiceEnvironmentProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -6252,6 +7336,44 @@ public AppServiceEnvironmentProperties(Azure.ResourceManager.AppService.Models.A string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AppServiceEnvironmentUpgradeAvailability : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AppServiceEnvironmentUpgradeAvailability(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradeAvailability None { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradeAvailability Ready { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradeAvailability 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.AppService.Models.AppServiceEnvironmentUpgradeAvailability left, Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradeAvailability right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradeAvailability (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradeAvailability left, Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradeAvailability right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AppServiceEnvironmentUpgradePreference : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AppServiceEnvironmentUpgradePreference(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradePreference Early { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradePreference Late { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradePreference Manual { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradePreference None { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradePreference 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.AppService.Models.AppServiceEnvironmentUpgradePreference left, Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradePreference right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradePreference (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradePreference left, Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradePreference right) { throw null; } + public override string ToString() { throw null; } + } public partial class AppServiceFacebookProvider : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AppServiceFacebookProvider() { } @@ -6439,6 +7561,24 @@ public AppServiceIPSecurityRestriction() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AppServiceKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AppServiceKind(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.AppServiceKind Stateful { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceKind Stateless { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.AppServiceKind 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.AppService.Models.AppServiceKind left, Azure.ResourceManager.AppService.Models.AppServiceKind right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.AppServiceKind (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.AppServiceKind left, Azure.ResourceManager.AppService.Models.AppServiceKind right) { throw null; } + public override string ToString() { throw null; } + } public partial class AppServiceNameValuePair : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AppServiceNameValuePair() { } @@ -6493,6 +7633,7 @@ public AppServicePlanPatch() { } public int? MaximumElasticWorkerCount { get { throw null; } set { } } public int? MaximumNumberOfWorkers { get { throw null; } } public int? NumberOfSites { get { throw null; } } + public int? NumberOfWorkers { get { throw null; } } public Azure.ResourceManager.AppService.Models.ProvisioningState? ProvisioningState { get { throw null; } } public string ResourceGroup { get { throw null; } } public System.DateTimeOffset? SpotExpirationOn { get { throw null; } set { } } @@ -6647,6 +7788,7 @@ public AppServiceSkuDescription() { } public static Azure.ResourceManager.AppService.Models.AppServiceSkuName Dynamic { get { throw null; } } public static Azure.ResourceManager.AppService.Models.AppServiceSkuName ElasticIsolated { get { throw null; } } public static Azure.ResourceManager.AppService.Models.AppServiceSkuName ElasticPremium { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceSkuName FlexConsumption { get { throw null; } } public static Azure.ResourceManager.AppService.Models.AppServiceSkuName Free { get { throw null; } } public static Azure.ResourceManager.AppService.Models.AppServiceSkuName Isolated { get { throw null; } } public static Azure.ResourceManager.AppService.Models.AppServiceSkuName IsolatedV2 { get { throw null; } } @@ -6705,6 +7847,7 @@ public AppServiceStorageAccessInfo() { } public string AccessKey { get { throw null; } set { } } public string AccountName { get { throw null; } set { } } public string MountPath { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.AppServiceStorageProtocol? Protocol { get { throw null; } set { } } public string ShareName { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.AppServiceStorageAccountState? State { get { throw null; } } public Azure.ResourceManager.AppService.Models.AppServiceStorageType? StorageType { get { throw null; } set { } } @@ -6721,6 +7864,25 @@ public enum AppServiceStorageAccountState InvalidShare = 2, NotValidated = 3, } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AppServiceStorageProtocol : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AppServiceStorageProtocol(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.AppServiceStorageProtocol Http { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceStorageProtocol Nfs { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceStorageProtocol Smb { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.AppServiceStorageProtocol 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.AppService.Models.AppServiceStorageProtocol left, Azure.ResourceManager.AppService.Models.AppServiceStorageProtocol right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.AppServiceStorageProtocol (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.AppServiceStorageProtocol left, Azure.ResourceManager.AppService.Models.AppServiceStorageProtocol right) { throw null; } + public override string ToString() { throw null; } + } public enum AppServiceStorageType { AzureFiles = 0, @@ -6732,6 +7894,7 @@ public enum AppServiceStorageType private readonly object _dummy; private readonly int _dummyPrimitive; public AppServiceSupportedTlsVersion(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion One3 { get { throw null; } } public static Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion Tls1_0 { get { throw null; } } public static Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion Tls1_1 { get { throw null; } } public static Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion Tls1_2 { get { throw null; } } @@ -6762,6 +7925,39 @@ public AppServiceTableStorageApplicationLogsConfig(System.Uri SasUri) { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AppServiceTlsCipherSuite : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AppServiceTlsCipherSuite(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite TlsAes128GcmSha256 { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite TlsAes256GcmSha384 { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite TlsECDiffieHellmanECDsaWithAes128CbcSha256 { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite TlsECDiffieHellmanECDsaWithAes128GcmSha256 { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite TlsECDiffieHellmanECDsaWithAes256GcmSha384 { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite TlsECDiffieHellmanRsaWithAes128CbcSha { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite TlsECDiffieHellmanRsaWithAes128CbcSha256 { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite TlsECDiffieHellmanRsaWithAes128GcmSha256 { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite TlsECDiffieHellmanRsaWithAes256CbcSha { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite TlsECDiffieHellmanRsaWithAes256CbcSha384 { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite TlsECDiffieHellmanRsaWithAes256GcmSha384 { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite TlsRsaWithAes128CbcSha { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite TlsRsaWithAes128CbcSha256 { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite TlsRsaWithAes128GcmSha256 { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite TlsRsaWithAes256CbcSha { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite TlsRsaWithAes256CbcSha256 { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite TlsRsaWithAes256GcmSha384 { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite 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.AppService.Models.AppServiceTlsCipherSuite left, Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite left, Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite right) { throw null; } + public override string ToString() { throw null; } + } public partial class AppServiceTokenStore : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AppServiceTokenStore() { } @@ -6958,10 +8154,11 @@ public static partial class ArmAppServiceModelFactory public static Azure.ResourceManager.AppService.Models.AppInsightsWebAppStackSettings AppInsightsWebAppStackSettings(bool? isSupported = default(bool?), bool? isDefaultOff = default(bool?)) { throw null; } public static Azure.ResourceManager.AppService.Models.ApplicationStackResource ApplicationStackResource(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string stackName = null, string display = null, string dependency = null, System.Collections.Generic.IEnumerable majorVersions = null, System.Collections.Generic.IEnumerable frameworks = null, System.Collections.Generic.IEnumerable isDeprecated = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.AppServiceArmPlan AppServiceArmPlan(string name = null, string publisher = null, string product = null, string promotionCode = null, string version = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.AppServiceAseRegion AppServiceAseRegion(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string displayName = null, bool? isStandard = default(bool?), bool? isDedicatedHostEnabled = default(bool?), bool? isZoneRedundantEnabled = default(bool?), System.Collections.Generic.IEnumerable availableSku = null, System.Collections.Generic.IEnumerable availableOS = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.AppServiceBillingMeter AppServiceBillingMeter(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Guid? meterId = default(System.Guid?), Azure.Core.AzureLocation? billingLocation = default(Azure.Core.AzureLocation?), string shortName = null, string friendlyName = null, string osType = null, double? multiplier = default(double?), string kind = null) { throw null; } public static Azure.ResourceManager.AppService.AppServiceCertificateData AppServiceCertificateData(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 tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.Core.ResourceIdentifier keyVaultId = null, string keyVaultSecretName = null, Azure.ResourceManager.AppService.Models.KeyVaultSecretStatus? provisioningState = default(Azure.ResourceManager.AppService.Models.KeyVaultSecretStatus?), string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.AppServiceCertificateDetails AppServiceCertificateDetails(int? version = default(int?), string serialNumber = null, string thumbprintString = null, string subject = null, System.DateTimeOffset? notBefore = default(System.DateTimeOffset?), System.DateTimeOffset? notAfter = default(System.DateTimeOffset?), string signatureAlgorithm = null, string issuer = null, string rawData = null) { throw null; } - public static Azure.ResourceManager.AppService.Models.AppServiceCertificateEmail AppServiceCertificateEmail(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string emailId = null, System.DateTimeOffset? timeStamp = default(System.DateTimeOffset?), string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.AppServiceCertificateEmail AppServiceCertificateEmail(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string emailId = null, System.DateTimeOffset? timeStamp = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.AppService.AppServiceCertificateOrderData AppServiceCertificateOrderData(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 tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IDictionary certificates = null, string distinguishedName = null, string domainVerificationToken = null, int? validityInYears = default(int?), int? keySize = default(int?), Azure.ResourceManager.AppService.Models.CertificateProductType? productType = default(Azure.ResourceManager.AppService.Models.CertificateProductType?), bool? isAutoRenew = default(bool?), Azure.ResourceManager.AppService.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.ProvisioningState?), Azure.ResourceManager.AppService.Models.CertificateOrderStatus? status = default(Azure.ResourceManager.AppService.Models.CertificateOrderStatus?), Azure.ResourceManager.AppService.Models.AppServiceCertificateDetails signedCertificate = null, string csr = null, Azure.ResourceManager.AppService.Models.AppServiceCertificateDetails intermediate = null, Azure.ResourceManager.AppService.Models.AppServiceCertificateDetails root = null, string serialNumber = null, System.DateTimeOffset? lastCertificateIssuedOn = default(System.DateTimeOffset?), System.DateTimeOffset? expireOn = default(System.DateTimeOffset?), bool? isPrivateKeyExternal = default(bool?), System.Collections.Generic.IEnumerable appServiceCertificateNotRenewableReasons = null, System.DateTimeOffset? nextAutoRenewTimeStamp = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.CertificateOrderContact contact = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.AppServiceCertificateOrderPatch AppServiceCertificateOrderPatch(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 certificates = null, string distinguishedName = null, string domainVerificationToken = null, int? validityInYears = default(int?), int? keySize = default(int?), Azure.ResourceManager.AppService.Models.CertificateProductType? productType = default(Azure.ResourceManager.AppService.Models.CertificateProductType?), bool? isAutoRenew = default(bool?), Azure.ResourceManager.AppService.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.ProvisioningState?), Azure.ResourceManager.AppService.Models.CertificateOrderStatus? status = default(Azure.ResourceManager.AppService.Models.CertificateOrderStatus?), Azure.ResourceManager.AppService.Models.AppServiceCertificateDetails signedCertificate = null, string csr = null, Azure.ResourceManager.AppService.Models.AppServiceCertificateDetails intermediate = null, Azure.ResourceManager.AppService.Models.AppServiceCertificateDetails root = null, string serialNumber = null, System.DateTimeOffset? lastCertificateIssuanceOn = default(System.DateTimeOffset?), System.DateTimeOffset? expireOn = default(System.DateTimeOffset?), bool? isPrivateKeyExternal = default(bool?), System.Collections.Generic.IEnumerable appServiceCertificateNotRenewableReasons = null, System.DateTimeOffset? nextAutoRenewalTimeStamp = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.CertificateOrderContact contact = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.AppServiceCertificatePatch AppServiceCertificatePatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.ResourceIdentifier keyVaultId = null, string keyVaultSecretName = null, Azure.ResourceManager.AppService.Models.KeyVaultSecretStatus? provisioningState = default(Azure.ResourceManager.AppService.Models.KeyVaultSecretStatus?), string kind = null) { throw null; } @@ -6974,22 +8171,22 @@ public static partial class ArmAppServiceModelFactory public static Azure.ResourceManager.AppService.Models.AppServiceEndpointDependency AppServiceEndpointDependency(string domainName = null, System.Collections.Generic.IEnumerable endpointDetails = null) { throw null; } public static Azure.ResourceManager.AppService.Models.AppServiceEndpointDetail AppServiceEndpointDetail(System.Net.IPAddress ipAddress = null, int? port = default(int?), double? latency = default(double?), bool? isAccessible = default(bool?)) { throw null; } public static Azure.ResourceManager.AppService.Models.AppServiceEnvironmentAddressResult AppServiceEnvironmentAddressResult(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Net.IPAddress serviceIPAddress = null, System.Net.IPAddress internalIPAddress = null, System.Collections.Generic.IEnumerable outboundIPAddresses = null, System.Collections.Generic.IEnumerable virtualIPMappings = null, string kind = null) { throw null; } - public static Azure.ResourceManager.AppService.AppServiceEnvironmentData AppServiceEnvironmentData(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 tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.AppService.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.ProvisioningState?), Azure.ResourceManager.AppService.Models.HostingEnvironmentStatus? status = default(Azure.ResourceManager.AppService.Models.HostingEnvironmentStatus?), Azure.ResourceManager.AppService.Models.AppServiceVirtualNetworkProfile virtualNetwork = null, Azure.ResourceManager.AppService.Models.LoadBalancingMode? internalLoadBalancingMode = default(Azure.ResourceManager.AppService.Models.LoadBalancingMode?), string multiSize = null, int? multiRoleCount = default(int?), int? ipSslAddressCount = default(int?), string dnsSuffix = null, int? maximumNumberOfMachines = default(int?), int? frontEndScaleFactor = default(int?), bool? isSuspended = default(bool?), System.Collections.Generic.IEnumerable clusterSettings = null, System.Collections.Generic.IEnumerable userWhitelistedIPRanges = null, bool? hasLinuxWorkers = default(bool?), int? dedicatedHostCount = default(int?), bool? isZoneRedundant = default(bool?), string kind = null) { throw null; } - public static Azure.ResourceManager.AppService.Models.AppServiceEnvironmentPatch AppServiceEnvironmentPatch(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.ProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.ProvisioningState?), Azure.ResourceManager.AppService.Models.HostingEnvironmentStatus? status = default(Azure.ResourceManager.AppService.Models.HostingEnvironmentStatus?), Azure.ResourceManager.AppService.Models.AppServiceVirtualNetworkProfile virtualNetwork = null, Azure.ResourceManager.AppService.Models.LoadBalancingMode? internalLoadBalancingMode = default(Azure.ResourceManager.AppService.Models.LoadBalancingMode?), string multiSize = null, int? multiRoleCount = default(int?), int? ipSslAddressCount = default(int?), string dnsSuffix = null, int? maximumNumberOfMachines = default(int?), int? frontEndScaleFactor = default(int?), bool? isSuspended = default(bool?), System.Collections.Generic.IEnumerable clusterSettings = null, System.Collections.Generic.IEnumerable userWhitelistedIPRanges = null, bool? hasLinuxWorkers = default(bool?), int? dedicatedHostCount = default(int?), bool? isZoneRedundant = default(bool?), string kind = null) { throw null; } - public static Azure.ResourceManager.AppService.Models.AppServiceEnvironmentProperties AppServiceEnvironmentProperties(Azure.ResourceManager.AppService.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.ProvisioningState?), Azure.ResourceManager.AppService.Models.HostingEnvironmentStatus? status = default(Azure.ResourceManager.AppService.Models.HostingEnvironmentStatus?), Azure.ResourceManager.AppService.Models.AppServiceVirtualNetworkProfile virtualNetwork = null, Azure.ResourceManager.AppService.Models.LoadBalancingMode? internalLoadBalancingMode = default(Azure.ResourceManager.AppService.Models.LoadBalancingMode?), string multiSize = null, int? multiRoleCount = default(int?), int? ipSslAddressCount = default(int?), string dnsSuffix = null, int? maximumNumberOfMachines = default(int?), int? frontEndScaleFactor = default(int?), bool? isSuspended = default(bool?), System.Collections.Generic.IEnumerable clusterSettings = null, System.Collections.Generic.IEnumerable userWhitelistedIPRanges = null, bool? hasLinuxWorkers = default(bool?), int? dedicatedHostCount = default(int?), bool? isZoneRedundant = default(bool?)) { throw null; } + public static Azure.ResourceManager.AppService.AppServiceEnvironmentData AppServiceEnvironmentData(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 tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.AppService.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.ProvisioningState?), Azure.ResourceManager.AppService.Models.HostingEnvironmentStatus? status = default(Azure.ResourceManager.AppService.Models.HostingEnvironmentStatus?), Azure.ResourceManager.AppService.Models.AppServiceVirtualNetworkProfile virtualNetwork = null, Azure.ResourceManager.AppService.Models.LoadBalancingMode? internalLoadBalancingMode = default(Azure.ResourceManager.AppService.Models.LoadBalancingMode?), string multiSize = null, int? multiRoleCount = default(int?), int? ipSslAddressCount = default(int?), string dnsSuffix = null, int? maximumNumberOfMachines = default(int?), int? frontEndScaleFactor = default(int?), bool? isSuspended = default(bool?), System.Collections.Generic.IEnumerable clusterSettings = null, System.Collections.Generic.IEnumerable userWhitelistedIPRanges = null, bool? hasLinuxWorkers = default(bool?), Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradePreference? upgradePreference = default(Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradePreference?), int? dedicatedHostCount = default(int?), bool? isZoneRedundant = default(bool?), Azure.ResourceManager.AppService.CustomDnsSuffixConfigurationData customDnsSuffixConfiguration = null, Azure.ResourceManager.AppService.AseV3NetworkingConfigurationData networkingConfiguration = null, Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradeAvailability? upgradeAvailability = default(Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradeAvailability?), string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.AppServiceEnvironmentPatch AppServiceEnvironmentPatch(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.ProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.ProvisioningState?), Azure.ResourceManager.AppService.Models.HostingEnvironmentStatus? status = default(Azure.ResourceManager.AppService.Models.HostingEnvironmentStatus?), Azure.ResourceManager.AppService.Models.AppServiceVirtualNetworkProfile virtualNetwork = null, Azure.ResourceManager.AppService.Models.LoadBalancingMode? internalLoadBalancingMode = default(Azure.ResourceManager.AppService.Models.LoadBalancingMode?), string multiSize = null, int? multiRoleCount = default(int?), int? ipSslAddressCount = default(int?), string dnsSuffix = null, int? maximumNumberOfMachines = default(int?), int? frontEndScaleFactor = default(int?), bool? isSuspended = default(bool?), System.Collections.Generic.IEnumerable clusterSettings = null, System.Collections.Generic.IEnumerable userWhitelistedIPRanges = null, bool? hasLinuxWorkers = default(bool?), Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradePreference? upgradePreference = default(Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradePreference?), int? dedicatedHostCount = default(int?), bool? isZoneRedundant = default(bool?), Azure.ResourceManager.AppService.CustomDnsSuffixConfigurationData customDnsSuffixConfiguration = null, Azure.ResourceManager.AppService.AseV3NetworkingConfigurationData networkingConfiguration = null, Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradeAvailability? upgradeAvailability = default(Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradeAvailability?), string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.AppServiceEnvironmentProperties AppServiceEnvironmentProperties(Azure.ResourceManager.AppService.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.ProvisioningState?), Azure.ResourceManager.AppService.Models.HostingEnvironmentStatus? status = default(Azure.ResourceManager.AppService.Models.HostingEnvironmentStatus?), Azure.ResourceManager.AppService.Models.AppServiceVirtualNetworkProfile virtualNetwork = null, Azure.ResourceManager.AppService.Models.LoadBalancingMode? internalLoadBalancingMode = default(Azure.ResourceManager.AppService.Models.LoadBalancingMode?), string multiSize = null, int? multiRoleCount = default(int?), int? ipSslAddressCount = default(int?), string dnsSuffix = null, int? maximumNumberOfMachines = default(int?), int? frontEndScaleFactor = default(int?), bool? isSuspended = default(bool?), System.Collections.Generic.IEnumerable clusterSettings = null, System.Collections.Generic.IEnumerable userWhitelistedIPRanges = null, bool? hasLinuxWorkers = default(bool?), Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradePreference? upgradePreference = default(Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradePreference?), int? dedicatedHostCount = default(int?), bool? isZoneRedundant = default(bool?), Azure.ResourceManager.AppService.CustomDnsSuffixConfigurationData customDnsSuffixConfiguration = null, Azure.ResourceManager.AppService.AseV3NetworkingConfigurationData networkingConfiguration = null, Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradeAvailability? upgradeAvailability = default(Azure.ResourceManager.AppService.Models.AppServiceEnvironmentUpgradeAvailability?)) { throw null; } public static Azure.ResourceManager.AppService.Models.AppServiceGeoRegion AppServiceGeoRegion(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, string displayName = null, string orgDomain = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.AppServiceHostName AppServiceHostName(string name = null, System.Collections.Generic.IEnumerable siteNames = null, string azureResourceName = null, Azure.ResourceManager.AppService.Models.AppServiceResourceType? azureResourceType = default(Azure.ResourceManager.AppService.Models.AppServiceResourceType?), Azure.ResourceManager.AppService.Models.CustomHostNameDnsRecordType? customHostNameDnsRecordType = default(Azure.ResourceManager.AppService.Models.CustomHostNameDnsRecordType?), Azure.ResourceManager.AppService.Models.AppServiceHostNameType? hostNameType = default(Azure.ResourceManager.AppService.Models.AppServiceHostNameType?)) { throw null; } public static Azure.ResourceManager.AppService.AppServiceIdentifierData AppServiceIdentifierData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string value = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.AppServiceOperation AppServiceOperation(string id = null, string name = null, Azure.ResourceManager.AppService.Models.AppServiceOperationStatus? status = default(Azure.ResourceManager.AppService.Models.AppServiceOperationStatus?), System.Collections.Generic.IEnumerable errors = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? modifiedOn = default(System.DateTimeOffset?), System.DateTimeOffset? expireOn = default(System.DateTimeOffset?), System.Guid? geoMasterOperationId = default(System.Guid?)) { throw null; } - public static Azure.ResourceManager.AppService.AppServicePlanData AppServicePlanData(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 tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.AppService.Models.AppServiceSkuDescription sku = null, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, string workerTierName = null, Azure.ResourceManager.AppService.Models.AppServicePlanStatus? status = default(Azure.ResourceManager.AppService.Models.AppServicePlanStatus?), string subscription = null, Azure.ResourceManager.AppService.Models.HostingEnvironmentProfile hostingEnvironmentProfile = null, int? maximumNumberOfWorkers = default(int?), string geoRegion = null, bool? isPerSiteScaling = default(bool?), bool? isElasticScaleEnabled = default(bool?), int? maximumElasticWorkerCount = default(int?), int? numberOfSites = default(int?), bool? isSpot = default(bool?), System.DateTimeOffset? spotExpireOn = default(System.DateTimeOffset?), System.DateTimeOffset? freeOfferExpireOn = default(System.DateTimeOffset?), string resourceGroup = null, bool? isReserved = default(bool?), bool? isXenon = default(bool?), bool? isHyperV = default(bool?), int? targetWorkerCount = default(int?), int? targetWorkerSizeId = default(int?), Azure.ResourceManager.AppService.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.ProvisioningState?), Azure.ResourceManager.AppService.Models.KubeEnvironmentProfile kubeEnvironmentProfile = null, bool? isZoneRedundant = default(bool?), string kind = null) { throw null; } - public static Azure.ResourceManager.AppService.Models.AppServicePlanPatch AppServicePlanPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string workerTierName = null, Azure.ResourceManager.AppService.Models.AppServicePlanStatus? status = default(Azure.ResourceManager.AppService.Models.AppServicePlanStatus?), string subscription = null, Azure.ResourceManager.AppService.Models.HostingEnvironmentProfile hostingEnvironmentProfile = null, int? maximumNumberOfWorkers = default(int?), string geoRegion = null, bool? isPerSiteScaling = default(bool?), bool? isElasticScaleEnabled = default(bool?), int? maximumElasticWorkerCount = default(int?), int? numberOfSites = default(int?), bool? isSpot = default(bool?), System.DateTimeOffset? spotExpirationOn = default(System.DateTimeOffset?), System.DateTimeOffset? freeOfferExpirationOn = default(System.DateTimeOffset?), string resourceGroup = null, bool? isReserved = default(bool?), bool? isXenon = default(bool?), bool? isHyperV = default(bool?), int? targetWorkerCount = default(int?), int? targetWorkerSizeId = default(int?), Azure.ResourceManager.AppService.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.ProvisioningState?), Azure.ResourceManager.AppService.Models.KubeEnvironmentProfile kubeEnvironmentProfile = null, bool? isZoneRedundant = default(bool?), string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.AppServicePlanData AppServicePlanData(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 tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.AppService.Models.AppServiceSkuDescription sku = null, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, string workerTierName = null, Azure.ResourceManager.AppService.Models.AppServicePlanStatus? status = default(Azure.ResourceManager.AppService.Models.AppServicePlanStatus?), string subscription = null, Azure.ResourceManager.AppService.Models.HostingEnvironmentProfile hostingEnvironmentProfile = null, int? maximumNumberOfWorkers = default(int?), int? numberOfWorkers = default(int?), string geoRegion = null, bool? isPerSiteScaling = default(bool?), bool? isElasticScaleEnabled = default(bool?), int? maximumElasticWorkerCount = default(int?), int? numberOfSites = default(int?), bool? isSpot = default(bool?), System.DateTimeOffset? spotExpireOn = default(System.DateTimeOffset?), System.DateTimeOffset? freeOfferExpireOn = default(System.DateTimeOffset?), string resourceGroup = null, bool? isReserved = default(bool?), bool? isXenon = default(bool?), bool? isHyperV = default(bool?), int? targetWorkerCount = default(int?), int? targetWorkerSizeId = default(int?), Azure.ResourceManager.AppService.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.ProvisioningState?), Azure.ResourceManager.AppService.Models.KubeEnvironmentProfile kubeEnvironmentProfile = null, bool? isZoneRedundant = default(bool?), string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.AppServicePlanPatch AppServicePlanPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string workerTierName = null, Azure.ResourceManager.AppService.Models.AppServicePlanStatus? status = default(Azure.ResourceManager.AppService.Models.AppServicePlanStatus?), string subscription = null, Azure.ResourceManager.AppService.Models.HostingEnvironmentProfile hostingEnvironmentProfile = null, int? maximumNumberOfWorkers = default(int?), int? numberOfWorkers = default(int?), string geoRegion = null, bool? isPerSiteScaling = default(bool?), bool? isElasticScaleEnabled = default(bool?), int? maximumElasticWorkerCount = default(int?), int? numberOfSites = default(int?), bool? isSpot = default(bool?), System.DateTimeOffset? spotExpirationOn = default(System.DateTimeOffset?), System.DateTimeOffset? freeOfferExpirationOn = default(System.DateTimeOffset?), string resourceGroup = null, bool? isReserved = default(bool?), bool? isXenon = default(bool?), bool? isHyperV = default(bool?), int? targetWorkerCount = default(int?), int? targetWorkerSizeId = default(int?), Azure.ResourceManager.AppService.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.ProvisioningState?), Azure.ResourceManager.AppService.Models.KubeEnvironmentProfile kubeEnvironmentProfile = null, bool? isZoneRedundant = default(bool?), string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.AppServicePoolSkuInfo AppServicePoolSkuInfo(Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ResourceManager.AppService.Models.AppServiceSkuDescription sku = null, Azure.ResourceManager.AppService.Models.AppServiceSkuCapacity capacity = null) { throw null; } public static Azure.ResourceManager.AppService.Models.AppServicePrivateLinkResourceData AppServicePrivateLinkResourceData(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.AppServicePrivateLinkResourceProperties properties = null) { throw null; } public static Azure.ResourceManager.AppService.Models.AppServicePrivateLinkResourceProperties AppServicePrivateLinkResourceProperties(string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null) { throw null; } public static Azure.ResourceManager.AppService.Models.AppServiceRecommendation AppServiceRecommendation(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.Guid? recommendationId = default(System.Guid?), Azure.Core.ResourceIdentifier resourceId = null, Azure.ResourceManager.AppService.Models.ResourceScopeType? resourceScope = default(Azure.ResourceManager.AppService.Models.ResourceScopeType?), string ruleName = null, string displayName = null, string message = null, Azure.ResourceManager.AppService.Models.NotificationLevel? level = default(Azure.ResourceManager.AppService.Models.NotificationLevel?), Azure.ResourceManager.AppService.Models.RecommendationChannel? channels = default(Azure.ResourceManager.AppService.Models.RecommendationChannel?), System.Collections.Generic.IEnumerable categoryTags = null, string actionName = null, int? enabled = default(int?), System.Collections.Generic.IEnumerable states = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), System.DateTimeOffset? nextNotificationOn = default(System.DateTimeOffset?), System.DateTimeOffset? notificationExpirationOn = default(System.DateTimeOffset?), System.DateTimeOffset? notifiedOn = default(System.DateTimeOffset?), double? score = default(double?), bool? isDynamic = default(bool?), string extensionName = null, string bladeName = null, string forwardLink = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.AppServiceSkuResult AppServiceSkuResult(Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), System.Collections.Generic.IEnumerable skus = null) { throw null; } public static Azure.ResourceManager.AppService.AppServiceSourceControlData AppServiceSourceControlData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string token = null, string tokenSecret = null, string refreshToken = null, System.DateTimeOffset? expireOn = default(System.DateTimeOffset?), string kind = null) { throw null; } - public static Azure.ResourceManager.AppService.Models.AppServiceStorageAccessInfo AppServiceStorageAccessInfo(Azure.ResourceManager.AppService.Models.AppServiceStorageType? storageType = default(Azure.ResourceManager.AppService.Models.AppServiceStorageType?), string accountName = null, string shareName = null, string accessKey = null, string mountPath = null, Azure.ResourceManager.AppService.Models.AppServiceStorageAccountState? state = default(Azure.ResourceManager.AppService.Models.AppServiceStorageAccountState?)) { throw null; } + public static Azure.ResourceManager.AppService.Models.AppServiceStorageAccessInfo AppServiceStorageAccessInfo(Azure.ResourceManager.AppService.Models.AppServiceStorageType? storageType = default(Azure.ResourceManager.AppService.Models.AppServiceStorageType?), string accountName = null, string shareName = null, string accessKey = null, string mountPath = null, Azure.ResourceManager.AppService.Models.AppServiceStorageAccountState? state = default(Azure.ResourceManager.AppService.Models.AppServiceStorageAccountState?), Azure.ResourceManager.AppService.Models.AppServiceStorageProtocol? protocol = default(Azure.ResourceManager.AppService.Models.AppServiceStorageProtocol?)) { throw null; } public static Azure.ResourceManager.AppService.Models.AppServiceUsage AppServiceUsage(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string displayName = null, string resourceName = null, string unit = null, long? currentValue = default(long?), long? limit = default(long?), System.DateTimeOffset? nextResetOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.ComputeModeOption? computeMode = default(Azure.ResourceManager.AppService.Models.ComputeModeOption?), string siteMode = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.AppServiceValidateContent AppServiceValidateContent(string name = null, Azure.ResourceManager.AppService.Models.ValidateResourceType validateResourceType = default(Azure.ResourceManager.AppService.Models.ValidateResourceType), Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.Core.ResourceIdentifier serverFarmId = null, string skuName = null, bool? needLinuxWorkers = default(bool?), bool? isSpot = default(bool?), int? capacity = default(int?), string hostingEnvironment = null, bool? isXenon = default(bool?), System.Uri containerRegistryBaseUri = null, string containerRegistryUsername = null, string containerRegistryPassword = null, string containerImageRepository = null, string containerImageTag = null, string containerImagePlatform = null, Azure.ResourceManager.AppService.Models.AppServiceEnvironmentProperties appServiceEnvironment = null) { throw null; } public static Azure.ResourceManager.AppService.Models.AppServiceValidateResult AppServiceValidateResult(string status = null, Azure.ResourceManager.AppService.Models.ValidateResponseError error = null) { throw null; } @@ -7001,17 +8198,20 @@ public static partial class ArmAppServiceModelFactory public static Azure.ResourceManager.AppService.Models.AppServiceVirtualNetworkValidationContent AppServiceVirtualNetworkValidationContent(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string vnetResourceGroup = null, string vnetName = null, string vnetSubnetName = null, Azure.Core.ResourceIdentifier subnetResourceId = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.AppServiceWorkerPoolData AppServiceWorkerPoolData(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.AppServiceSkuDescription sku = null, int? workerSizeId = default(int?), Azure.ResourceManager.AppService.Models.ComputeModeOption? computeMode = default(Azure.ResourceManager.AppService.Models.ComputeModeOption?), string workerSize = null, int? workerCount = default(int?), System.Collections.Generic.IEnumerable instanceNames = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.AppSnapshot AppSnapshot(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string time = null, string kind = null) { throw null; } - public static Azure.ResourceManager.AppService.AseV3NetworkingConfigurationData AseV3NetworkingConfigurationData(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.IEnumerable windowsOutboundIPAddresses = null, System.Collections.Generic.IEnumerable linuxOutboundIPAddresses = null, System.Collections.Generic.IEnumerable externalInboundIPAddresses = null, System.Collections.Generic.IEnumerable internalInboundIPAddresses = null, bool? allowNewPrivateEndpointConnections = default(bool?), string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.AseV3NetworkingConfigurationData AseV3NetworkingConfigurationData(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.IEnumerable windowsOutboundIPAddresses = null, System.Collections.Generic.IEnumerable linuxOutboundIPAddresses = null, System.Collections.Generic.IEnumerable externalInboundIPAddresses = null, System.Collections.Generic.IEnumerable internalInboundIPAddresses = null, bool? allowNewPrivateEndpointConnections = default(bool?), bool? isFtpEnabled = default(bool?), bool? isRemoteDebugEnabled = default(bool?), string inboundIPAddressOverride = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.AzureStoragePropertyDictionary AzureStoragePropertyDictionary(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.Models.CertificateOrderAction CertificateOrderAction(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.CertificateOrderActionType? actionType = default(Azure.ResourceManager.AppService.Models.CertificateOrderActionType?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.CertificateOrderAction CertificateOrderAction(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.CertificateOrderActionType? actionType = default(Azure.ResourceManager.AppService.Models.CertificateOrderActionType?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?)) { throw null; } 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.CsmDeploymentStatus CsmDeploymentStatus(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string deploymentId = null, Azure.ResourceManager.AppService.Models.DeploymentBuildStatus? status = default(Azure.ResourceManager.AppService.Models.DeploymentBuildStatus?), int? numberOfInstancesInProgress = default(int?), int? numberOfInstancesSuccessful = default(int?), int? numberOfInstancesFailed = default(int?), System.Collections.Generic.IEnumerable failedInstancesLogs = null, System.Collections.Generic.IEnumerable errors = 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; } + public static Azure.ResourceManager.AppService.CustomDnsSuffixConfigurationData CustomDnsSuffixConfigurationData(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.CustomDnsSuffixProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.CustomDnsSuffixProvisioningState?), string provisioningDetails = null, string dnsSuffix = null, System.Uri certificateUri = null, string keyVaultReferenceIdentity = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.CustomHostnameAnalysisResult CustomHostnameAnalysisResult(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? isHostnameAlreadyVerified = default(bool?), Azure.ResourceManager.AppService.Models.DnsVerificationTestResult? customDomainVerificationTest = default(Azure.ResourceManager.AppService.Models.DnsVerificationTestResult?), Azure.ResponseError customDomainVerificationFailureInfo = null, bool? hasConflictOnScaleUnit = default(bool?), bool? hasConflictAcrossSubscription = default(bool?), string conflictingAppResourceId = null, System.Collections.Generic.IEnumerable cNameRecords = null, System.Collections.Generic.IEnumerable txtRecords = null, System.Collections.Generic.IEnumerable aRecords = null, System.Collections.Generic.IEnumerable alternateCNameRecords = null, System.Collections.Generic.IEnumerable alternateTxtRecords = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.CustomHostnameSites CustomHostnameSites(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string customHostname = null, string region = null, System.Collections.Generic.IEnumerable siteResourceIds = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.DataProviderKeyValuePair DataProviderKeyValuePair(string key = null, System.BinaryData value = null) { throw null; } public static Azure.ResourceManager.AppService.Models.DataProviderMetadata DataProviderMetadata(string providerName = null, System.Collections.Generic.IEnumerable propertyBag = null) { throw null; } public static Azure.ResourceManager.AppService.Models.DeletedAppRestoreContent DeletedAppRestoreContent(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.ResourceIdentifier deletedSiteId = null, bool? recoverConfiguration = default(bool?), string snapshotTime = null, bool? useDRSecondary = default(bool?), string kind = null) { throw null; } @@ -7044,8 +8244,8 @@ public static partial class ArmAppServiceModelFactory public static Azure.ResourceManager.AppService.Models.HybridConnectionKey HybridConnectionKey(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string sendKeyName = null, string sendKeyValue = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.HybridConnectionLimitData HybridConnectionLimitData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, int? current = default(int?), int? maximum = default(int?), string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.InboundEnvironmentEndpoint InboundEnvironmentEndpoint(string description = null, System.Collections.Generic.IEnumerable endpoints = null, System.Collections.Generic.IEnumerable ports = null) { throw null; } - public static Azure.ResourceManager.AppService.KubeEnvironmentData KubeEnvironmentData(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 tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, Azure.ResourceManager.AppService.Models.KubeEnvironmentProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.KubeEnvironmentProvisioningState?), string deploymentErrors = null, bool? isInternalLoadBalancerEnabled = default(bool?), string defaultDomain = null, string staticIP = null, Azure.ResourceManager.AppService.Models.ArcConfiguration arcConfiguration = null, Azure.ResourceManager.AppService.Models.AppLogsConfiguration appLogsConfiguration = null, Azure.Core.ResourceIdentifier aksResourceId = null, string kind = null) { throw null; } - public static Azure.ResourceManager.AppService.Models.KubeEnvironmentPatch KubeEnvironmentPatch(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.KubeEnvironmentProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.KubeEnvironmentProvisioningState?), string deploymentErrors = null, bool? isInternalLoadBalancerEnabled = default(bool?), string defaultDomain = null, string staticIP = null, Azure.ResourceManager.AppService.Models.ArcConfiguration arcConfiguration = null, Azure.ResourceManager.AppService.Models.AppLogsConfiguration appLogsConfiguration = null, Azure.Core.ResourceIdentifier aksResourceId = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.KubeEnvironmentData KubeEnvironmentData(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 tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, Azure.ResourceManager.AppService.Models.KubeEnvironmentProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.KubeEnvironmentProvisioningState?), string deploymentErrors = null, bool? isInternalLoadBalancerEnabled = default(bool?), string defaultDomain = null, string staticIP = null, string environmentType = null, Azure.ResourceManager.AppService.Models.ArcConfiguration arcConfiguration = null, Azure.ResourceManager.AppService.Models.AppLogsConfiguration appLogsConfiguration = null, Azure.ResourceManager.AppService.Models.ContainerAppsConfiguration containerAppsConfiguration = null, Azure.Core.ResourceIdentifier aksResourceId = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.KubeEnvironmentPatch KubeEnvironmentPatch(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.KubeEnvironmentProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.KubeEnvironmentProvisioningState?), string deploymentErrors = null, bool? isInternalLoadBalancerEnabled = default(bool?), string defaultDomain = null, string staticIP = null, Azure.ResourceManager.AppService.Models.ArcConfiguration arcConfiguration = null, Azure.ResourceManager.AppService.Models.AppLogsConfiguration appLogsConfiguration = null, Azure.ResourceManager.AppService.Models.ContainerAppsConfiguration containerAppsConfiguration = null, Azure.Core.ResourceIdentifier aksResourceId = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.KubeEnvironmentProfile KubeEnvironmentProfile(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?)) { throw null; } public static Azure.ResourceManager.AppService.Models.LinuxJavaContainerSettings LinuxJavaContainerSettings(string java11Runtime = null, string java8Runtime = null, bool? isPreview = default(bool?), bool? isDeprecated = default(bool?), bool? isHidden = default(bool?), System.DateTimeOffset? endOfLifeOn = default(System.DateTimeOffset?), bool? isAutoUpdate = default(bool?), bool? isEarlyAccess = default(bool?)) { throw null; } public static Azure.ResourceManager.AppService.Models.LocalizableString LocalizableString(string value = null, string localizedValue = null) { throw null; } @@ -7072,6 +8272,7 @@ public static partial class ArmAppServiceModelFactory public static Azure.ResourceManager.AppService.PublicCertificateData PublicCertificateData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, byte[] blob = null, Azure.ResourceManager.AppService.Models.PublicCertificateLocation? publicCertificateLocation = default(Azure.ResourceManager.AppService.Models.PublicCertificateLocation?), string thumbprintString = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.PublishingUserData PublishingUserData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string publishingUserName = null, string publishingPassword = null, string publishingPasswordHash = null, string publishingPasswordHashSalt = null, System.Uri scmUri = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.RecommendationRuleData RecommendationRuleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string recommendationName = null, string displayName = null, string message = null, System.Guid? recommendationId = default(System.Guid?), string description = null, string actionName = null, Azure.ResourceManager.AppService.Models.NotificationLevel? level = default(Azure.ResourceManager.AppService.Models.NotificationLevel?), Azure.ResourceManager.AppService.Models.RecommendationChannel? channels = default(Azure.ResourceManager.AppService.Models.RecommendationChannel?), System.Collections.Generic.IEnumerable categoryTags = null, bool? isDynamic = default(bool?), string extensionName = null, string bladeName = null, string forwardLink = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.RecurrenceScheduleOccurrence RecurrenceScheduleOccurrence(Azure.ResourceManager.AppService.Models.WebAppDayOfWeek? day = default(Azure.ResourceManager.AppService.Models.WebAppDayOfWeek?), int? occurrence = default(int?)) { throw null; } public static Azure.ResourceManager.AppService.Models.ReissueCertificateOrderContent ReissueCertificateOrderContent(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, int? keySize = default(int?), int? delayExistingRevokeInHours = default(int?), string csr = null, bool? isPrivateKeyExternal = default(bool?), string kind = null) { throw null; } public static Azure.ResourceManager.AppService.RelayServiceConnectionEntityData RelayServiceConnectionEntityData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string entityName = null, string entityConnectionString = null, string resourceConnectionString = null, string hostname = null, int? port = default(int?), System.Uri biztalkUri = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.RemotePrivateEndpointConnection RemotePrivateEndpointConnection(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string provisioningState = null, Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.AppService.Models.PrivateLinkConnectionState privateLinkServiceConnectionState = null, System.Collections.Generic.IEnumerable ipAddresses = null, string kind = null) { throw null; } @@ -7081,7 +8282,7 @@ public static partial class ArmAppServiceModelFactory public static Azure.ResourceManager.AppService.Models.ResourceMetricAvailability ResourceMetricAvailability(string timeGrain = null, string retention = null) { throw null; } public static Azure.ResourceManager.AppService.Models.ResourceMetricDefinition ResourceMetricDefinition(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string unit = null, string primaryAggregationType = null, System.Collections.Generic.IEnumerable metricAvailabilities = null, System.Uri resourceUri = null, System.Collections.Generic.IReadOnlyDictionary properties = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.ResourceNameAvailability ResourceNameAvailability(bool? isNameAvailable = default(bool?), Azure.ResourceManager.AppService.Models.InAvailabilityReasonType? reason = default(Azure.ResourceManager.AppService.Models.InAvailabilityReasonType?), string message = null) { throw null; } - public static Azure.ResourceManager.AppService.Models.ResourceNameAvailabilityContent ResourceNameAvailabilityContent(string name = null, Azure.ResourceManager.AppService.Models.CheckNameResourceType resourceType = default(Azure.ResourceManager.AppService.Models.CheckNameResourceType), bool? isFqdn = default(bool?)) { throw null; } + public static Azure.ResourceManager.AppService.Models.ResourceNameAvailabilityContent ResourceNameAvailabilityContent(string name = null, Azure.ResourceManager.AppService.Models.CheckNameResourceType resourceType = default(Azure.ResourceManager.AppService.Models.CheckNameResourceType), bool? isFqdn = default(bool?), string environmentId = null) { throw null; } public static Azure.ResourceManager.AppService.Models.ResponseMessageEnvelopeRemotePrivateEndpointConnection ResponseMessageEnvelopeRemotePrivateEndpointConnection(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IReadOnlyDictionary tags = null, Azure.ResourceManager.AppService.Models.AppServiceArmPlan plan = null, Azure.ResourceManager.AppService.Models.RemotePrivateEndpointConnection properties = null, Azure.ResourceManager.AppService.Models.AppServiceSkuDescription sku = null, string status = null, Azure.ResponseError error = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, System.Collections.Generic.IEnumerable zones = null) { throw null; } public static Azure.ResourceManager.AppService.Models.RestoreRequestInfo RestoreRequestInfo(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Uri storageAccountUri = null, string blobName = null, bool? canOverwrite = default(bool?), string siteName = null, System.Collections.Generic.IEnumerable databases = null, bool? ignoreConflictingHostNames = default(bool?), bool? ignoreDatabases = default(bool?), string appServicePlan = null, Azure.ResourceManager.AppService.Models.BackupRestoreOperationType? operationType = default(Azure.ResourceManager.AppService.Models.BackupRestoreOperationType?), bool? adjustConnectionStrings = default(bool?), string hostingEnvironment = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.ServiceSpecification ServiceSpecification(System.Collections.Generic.IEnumerable metricSpecifications = null, System.Collections.Generic.IEnumerable logSpecifications = null) { throw null; } @@ -7089,14 +8290,16 @@ public static partial class ArmAppServiceModelFactory public static Azure.ResourceManager.AppService.Models.SiteAuthSettingsV2 SiteAuthSettingsV2(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.AuthPlatform platform = null, Azure.ResourceManager.AppService.Models.GlobalValidation globalValidation = null, Azure.ResourceManager.AppService.Models.AppServiceIdentityProviders identityProviders = null, Azure.ResourceManager.AppService.Models.WebAppLoginInfo login = null, Azure.ResourceManager.AppService.Models.AppServiceHttpSettings httpSettings = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.SiteCloneability SiteCloneability(Azure.ResourceManager.AppService.Models.CloneAbilityResult? result = default(Azure.ResourceManager.AppService.Models.CloneAbilityResult?), System.Collections.Generic.IEnumerable blockingFeatures = null, System.Collections.Generic.IEnumerable unsupportedFeatures = null, System.Collections.Generic.IEnumerable blockingCharacteristics = null) { throw null; } public static Azure.ResourceManager.AppService.Models.SiteCloneabilityCriterion SiteCloneabilityCriterion(string name = null, string description = null) { throw null; } - public static Azure.ResourceManager.AppService.SiteConfigData SiteConfigData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, int? numberOfWorkers = default(int?), System.Collections.Generic.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 = default(bool?), System.DateTimeOffset? requestTracingExpirationOn = default(System.DateTimeOffset?), bool? isRemoteDebuggingEnabled = default(bool?), string remoteDebuggingVersion = null, bool? isHttpLoggingEnabled = default(bool?), bool? useManagedIdentityCreds = default(bool?), string acrUserManagedIdentityId = null, int? logsDirectorySizeLimit = default(int?), bool? isDetailedErrorLoggingEnabled = default(bool?), string publishingUsername = null, System.Collections.Generic.IEnumerable appSettings = null, System.Collections.Generic.IEnumerable connectionStrings = null, Azure.ResourceManager.AppService.Models.SiteMachineKey machineKey = null, System.Collections.Generic.IEnumerable handlerMappings = null, string documentRoot = null, Azure.ResourceManager.AppService.Models.ScmType? scmType = default(Azure.ResourceManager.AppService.Models.ScmType?), bool? use32BitWorkerProcess = default(bool?), bool? isWebSocketsEnabled = default(bool?), bool? isAlwaysOn = default(bool?), string javaVersion = null, string javaContainer = null, string javaContainerVersion = null, string appCommandLine = null, Azure.ResourceManager.AppService.Models.ManagedPipelineMode? managedPipelineMode = default(Azure.ResourceManager.AppService.Models.ManagedPipelineMode?), System.Collections.Generic.IEnumerable virtualApplications = null, Azure.ResourceManager.AppService.Models.SiteLoadBalancing? loadBalancing = default(Azure.ResourceManager.AppService.Models.SiteLoadBalancing?), System.Collections.Generic.IEnumerable experimentsRampUpRules = null, Azure.ResourceManager.AppService.Models.SiteLimits limits = null, bool? isAutoHealEnabled = default(bool?), Azure.ResourceManager.AppService.Models.AutoHealRules autoHealRules = null, string tracingOptions = null, string vnetName = null, bool? isVnetRouteAllEnabled = default(bool?), int? vnetPrivatePortsCount = default(int?), Azure.ResourceManager.AppService.Models.AppServiceCorsSettings cors = null, Azure.ResourceManager.AppService.Models.WebAppPushSettings push = null, System.Uri apiDefinitionUri = null, string apiManagementConfigId = null, string autoSwapSlotName = null, bool? isLocalMySqlEnabled = default(bool?), int? managedServiceIdentityId = default(int?), int? xManagedServiceIdentityId = default(int?), string keyVaultReferenceIdentity = null, System.Collections.Generic.IEnumerable ipSecurityRestrictions = null, System.Collections.Generic.IEnumerable scmIPSecurityRestrictions = null, bool? allowIPSecurityRestrictionsForScmToUseMain = default(bool?), bool? isHttp20Enabled = default(bool?), Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion? minTlsVersion = default(Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion?), Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion? scmMinTlsVersion = default(Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion?), Azure.ResourceManager.AppService.Models.AppServiceFtpsState? ftpsState = default(Azure.ResourceManager.AppService.Models.AppServiceFtpsState?), int? preWarmedInstanceCount = default(int?), int? functionAppScaleLimit = default(int?), string healthCheckPath = null, bool? isFunctionsRuntimeScaleMonitoringEnabled = default(bool?), string websiteTimeZone = null, int? minimumElasticInstanceCount = default(int?), System.Collections.Generic.IDictionary azureStorageAccounts = null, string publicNetworkAccess = null, string kind = null) { throw null; } - public static Azure.ResourceManager.AppService.Models.SiteConfigProperties SiteConfigProperties(int? numberOfWorkers = default(int?), System.Collections.Generic.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 = default(bool?), System.DateTimeOffset? requestTracingExpirationOn = default(System.DateTimeOffset?), bool? isRemoteDebuggingEnabled = default(bool?), string remoteDebuggingVersion = null, bool? isHttpLoggingEnabled = default(bool?), bool? useManagedIdentityCreds = default(bool?), string acrUserManagedIdentityId = null, int? logsDirectorySizeLimit = default(int?), bool? isDetailedErrorLoggingEnabled = default(bool?), string publishingUsername = null, System.Collections.Generic.IEnumerable appSettings = null, System.Collections.Generic.IEnumerable connectionStrings = null, Azure.ResourceManager.AppService.Models.SiteMachineKey machineKey = null, System.Collections.Generic.IEnumerable handlerMappings = null, string documentRoot = null, Azure.ResourceManager.AppService.Models.ScmType? scmType = default(Azure.ResourceManager.AppService.Models.ScmType?), bool? use32BitWorkerProcess = default(bool?), bool? isWebSocketsEnabled = default(bool?), bool? isAlwaysOn = default(bool?), string javaVersion = null, string javaContainer = null, string javaContainerVersion = null, string appCommandLine = null, Azure.ResourceManager.AppService.Models.ManagedPipelineMode? managedPipelineMode = default(Azure.ResourceManager.AppService.Models.ManagedPipelineMode?), System.Collections.Generic.IEnumerable virtualApplications = null, Azure.ResourceManager.AppService.Models.SiteLoadBalancing? loadBalancing = default(Azure.ResourceManager.AppService.Models.SiteLoadBalancing?), System.Collections.Generic.IEnumerable experimentsRampUpRules = null, Azure.ResourceManager.AppService.Models.SiteLimits limits = null, bool? isAutoHealEnabled = default(bool?), Azure.ResourceManager.AppService.Models.AutoHealRules autoHealRules = null, string tracingOptions = null, string vnetName = null, bool? isVnetRouteAllEnabled = default(bool?), int? vnetPrivatePortsCount = default(int?), Azure.ResourceManager.AppService.Models.AppServiceCorsSettings cors = null, Azure.ResourceManager.AppService.Models.WebAppPushSettings push = null, System.Uri apiDefinitionUri = null, string apiManagementConfigId = null, string autoSwapSlotName = null, bool? isLocalMySqlEnabled = default(bool?), int? managedServiceIdentityId = default(int?), int? xManagedServiceIdentityId = default(int?), string keyVaultReferenceIdentity = null, System.Collections.Generic.IEnumerable ipSecurityRestrictions = null, System.Collections.Generic.IEnumerable scmIPSecurityRestrictions = null, bool? allowIPSecurityRestrictionsForScmToUseMain = default(bool?), bool? isHttp20Enabled = default(bool?), Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion? minTlsVersion = default(Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion?), Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion? scmMinTlsVersion = default(Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion?), Azure.ResourceManager.AppService.Models.AppServiceFtpsState? ftpsState = default(Azure.ResourceManager.AppService.Models.AppServiceFtpsState?), int? preWarmedInstanceCount = default(int?), int? functionAppScaleLimit = default(int?), string healthCheckPath = null, bool? isFunctionsRuntimeScaleMonitoringEnabled = default(bool?), string websiteTimeZone = null, int? minimumElasticInstanceCount = default(int?), System.Collections.Generic.IDictionary azureStorageAccounts = null, string publicNetworkAccess = null) { throw null; } + public static Azure.ResourceManager.AppService.SiteConfigData SiteConfigData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, int? numberOfWorkers = default(int?), System.Collections.Generic.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 = default(bool?), System.DateTimeOffset? requestTracingExpirationOn = default(System.DateTimeOffset?), bool? isRemoteDebuggingEnabled = default(bool?), string remoteDebuggingVersion = null, bool? isHttpLoggingEnabled = default(bool?), bool? useManagedIdentityCreds = default(bool?), string acrUserManagedIdentityId = null, int? logsDirectorySizeLimit = default(int?), bool? isDetailedErrorLoggingEnabled = default(bool?), string publishingUsername = null, System.Collections.Generic.IEnumerable appSettings = null, System.Collections.Generic.IEnumerable metadata = null, System.Collections.Generic.IEnumerable connectionStrings = null, Azure.ResourceManager.AppService.Models.SiteMachineKey machineKey = null, System.Collections.Generic.IEnumerable handlerMappings = null, string documentRoot = null, Azure.ResourceManager.AppService.Models.ScmType? scmType = default(Azure.ResourceManager.AppService.Models.ScmType?), bool? use32BitWorkerProcess = default(bool?), bool? isWebSocketsEnabled = default(bool?), bool? isAlwaysOn = default(bool?), string javaVersion = null, string javaContainer = null, string javaContainerVersion = null, string appCommandLine = null, Azure.ResourceManager.AppService.Models.ManagedPipelineMode? managedPipelineMode = default(Azure.ResourceManager.AppService.Models.ManagedPipelineMode?), System.Collections.Generic.IEnumerable virtualApplications = null, Azure.ResourceManager.AppService.Models.SiteLoadBalancing? loadBalancing = default(Azure.ResourceManager.AppService.Models.SiteLoadBalancing?), System.Collections.Generic.IEnumerable experimentsRampUpRules = null, Azure.ResourceManager.AppService.Models.SiteLimits limits = null, bool? isAutoHealEnabled = default(bool?), Azure.ResourceManager.AppService.Models.AutoHealRules autoHealRules = null, string tracingOptions = null, string vnetName = null, bool? isVnetRouteAllEnabled = default(bool?), int? vnetPrivatePortsCount = default(int?), Azure.ResourceManager.AppService.Models.AppServiceCorsSettings cors = null, Azure.ResourceManager.AppService.Models.WebAppPushSettings push = null, System.Uri apiDefinitionUri = null, string apiManagementConfigId = null, string autoSwapSlotName = null, bool? isLocalMySqlEnabled = default(bool?), int? managedServiceIdentityId = default(int?), int? xManagedServiceIdentityId = default(int?), string keyVaultReferenceIdentity = null, System.Collections.Generic.IEnumerable ipSecurityRestrictions = null, Azure.ResourceManager.AppService.Models.SiteDefaultAction? ipSecurityRestrictionsDefaultAction = default(Azure.ResourceManager.AppService.Models.SiteDefaultAction?), System.Collections.Generic.IEnumerable scmIPSecurityRestrictions = null, Azure.ResourceManager.AppService.Models.SiteDefaultAction? scmIPSecurityRestrictionsDefaultAction = default(Azure.ResourceManager.AppService.Models.SiteDefaultAction?), bool? allowIPSecurityRestrictionsForScmToUseMain = default(bool?), bool? isHttp20Enabled = default(bool?), Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion? minTlsVersion = default(Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion?), Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite? minTlsCipherSuite = default(Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite?), Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion? scmMinTlsVersion = default(Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion?), Azure.ResourceManager.AppService.Models.AppServiceFtpsState? ftpsState = default(Azure.ResourceManager.AppService.Models.AppServiceFtpsState?), int? preWarmedInstanceCount = default(int?), int? functionAppScaleLimit = default(int?), int? elasticWebAppScaleLimit = default(int?), string healthCheckPath = null, bool? isFunctionsRuntimeScaleMonitoringEnabled = default(bool?), string websiteTimeZone = null, int? minimumElasticInstanceCount = default(int?), System.Collections.Generic.IDictionary azureStorageAccounts = null, string publicNetworkAccess = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.SiteConfigProperties SiteConfigProperties(int? numberOfWorkers = default(int?), System.Collections.Generic.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 = default(bool?), System.DateTimeOffset? requestTracingExpirationOn = default(System.DateTimeOffset?), bool? isRemoteDebuggingEnabled = default(bool?), string remoteDebuggingVersion = null, bool? isHttpLoggingEnabled = default(bool?), bool? useManagedIdentityCreds = default(bool?), string acrUserManagedIdentityId = null, int? logsDirectorySizeLimit = default(int?), bool? isDetailedErrorLoggingEnabled = default(bool?), string publishingUsername = null, System.Collections.Generic.IEnumerable appSettings = null, System.Collections.Generic.IEnumerable metadata = null, System.Collections.Generic.IEnumerable connectionStrings = null, Azure.ResourceManager.AppService.Models.SiteMachineKey machineKey = null, System.Collections.Generic.IEnumerable handlerMappings = null, string documentRoot = null, Azure.ResourceManager.AppService.Models.ScmType? scmType = default(Azure.ResourceManager.AppService.Models.ScmType?), bool? use32BitWorkerProcess = default(bool?), bool? isWebSocketsEnabled = default(bool?), bool? isAlwaysOn = default(bool?), string javaVersion = null, string javaContainer = null, string javaContainerVersion = null, string appCommandLine = null, Azure.ResourceManager.AppService.Models.ManagedPipelineMode? managedPipelineMode = default(Azure.ResourceManager.AppService.Models.ManagedPipelineMode?), System.Collections.Generic.IEnumerable virtualApplications = null, Azure.ResourceManager.AppService.Models.SiteLoadBalancing? loadBalancing = default(Azure.ResourceManager.AppService.Models.SiteLoadBalancing?), System.Collections.Generic.IEnumerable experimentsRampUpRules = null, Azure.ResourceManager.AppService.Models.SiteLimits limits = null, bool? isAutoHealEnabled = default(bool?), Azure.ResourceManager.AppService.Models.AutoHealRules autoHealRules = null, string tracingOptions = null, string vnetName = null, bool? isVnetRouteAllEnabled = default(bool?), int? vnetPrivatePortsCount = default(int?), Azure.ResourceManager.AppService.Models.AppServiceCorsSettings cors = null, Azure.ResourceManager.AppService.Models.WebAppPushSettings push = null, System.Uri apiDefinitionUri = null, string apiManagementConfigId = null, string autoSwapSlotName = null, bool? isLocalMySqlEnabled = default(bool?), int? managedServiceIdentityId = default(int?), int? xManagedServiceIdentityId = default(int?), string keyVaultReferenceIdentity = null, System.Collections.Generic.IEnumerable ipSecurityRestrictions = null, Azure.ResourceManager.AppService.Models.SiteDefaultAction? ipSecurityRestrictionsDefaultAction = default(Azure.ResourceManager.AppService.Models.SiteDefaultAction?), System.Collections.Generic.IEnumerable scmIPSecurityRestrictions = null, Azure.ResourceManager.AppService.Models.SiteDefaultAction? scmIPSecurityRestrictionsDefaultAction = default(Azure.ResourceManager.AppService.Models.SiteDefaultAction?), bool? allowIPSecurityRestrictionsForScmToUseMain = default(bool?), bool? isHttp20Enabled = default(bool?), Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion? minTlsVersion = default(Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion?), Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite? minTlsCipherSuite = default(Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite?), Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion? scmMinTlsVersion = default(Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion?), Azure.ResourceManager.AppService.Models.AppServiceFtpsState? ftpsState = default(Azure.ResourceManager.AppService.Models.AppServiceFtpsState?), int? preWarmedInstanceCount = default(int?), int? functionAppScaleLimit = default(int?), int? elasticWebAppScaleLimit = default(int?), string healthCheckPath = null, bool? isFunctionsRuntimeScaleMonitoringEnabled = default(bool?), string websiteTimeZone = null, int? minimumElasticInstanceCount = default(int?), System.Collections.Generic.IDictionary azureStorageAccounts = null, string publicNetworkAccess = null) { throw null; } public static Azure.ResourceManager.AppService.Models.SiteConfigPropertiesDictionary SiteConfigPropertiesDictionary(bool? use32BitWorkerProcess = default(bool?), string linuxFxVersion = null, string javaVersion = null, string powerShellVersion = null) { throw null; } public static Azure.ResourceManager.AppService.Models.SiteConfigurationSnapshotInfo SiteConfigurationSnapshotInfo(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.DateTimeOffset? snapshotTakenOn = default(System.DateTimeOffset?), int? snapshotId = default(int?), string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.SiteContainerData SiteContainerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string image = null, string targetPort = null, bool? isMain = default(bool?), string startUpCommand = null, Azure.ResourceManager.AppService.Models.SiteContainerAuthType? authType = default(Azure.ResourceManager.AppService.Models.SiteContainerAuthType?), string userName = null, string passwordSecret = null, string userManagedIdentityClientId = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastModifiedOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable volumeMounts = null, System.Collections.Generic.IEnumerable environmentVariables = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.SiteDnsConfig SiteDnsConfig(System.Collections.Generic.IEnumerable dnsServers = null, string dnsAltServer = null, int? dnsRetryAttemptTimeout = default(int?), int? dnsRetryAttemptCount = default(int?), int? dnsMaxCacheTimeout = default(int?), bool? dnsLegacySortOrder = default(bool?)) { throw null; } public static Azure.ResourceManager.AppService.SiteExtensionInfoData SiteExtensionInfoData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string extensionId = null, string title = null, Azure.ResourceManager.AppService.Models.SiteExtensionType? extensionType = default(Azure.ResourceManager.AppService.Models.SiteExtensionType?), string summary = null, string description = null, string version = null, System.Uri extensionUri = null, System.Uri projectUri = null, System.Uri iconUri = null, System.Uri licenseUri = null, System.Uri feedUri = null, System.Collections.Generic.IEnumerable authors = null, string installerCommandLineParams = null, System.DateTimeOffset? publishedOn = default(System.DateTimeOffset?), int? downloadCount = default(int?), bool? localIsLatestVersion = default(bool?), string localPath = null, System.DateTimeOffset? installedOn = default(System.DateTimeOffset?), string provisioningState = null, string comment = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.SiteLogsConfigData SiteLogsConfigData(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.ApplicationLogsConfig applicationLogs = null, Azure.ResourceManager.AppService.Models.AppServiceHttpLogsConfig httpLogs = null, bool? isFailedRequestsTracingEnabled = default(bool?), bool? isDetailedErrorMessagesEnabled = default(bool?), string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.SiteMachineKey SiteMachineKey(string validation = null, string validationKey = null, string decryption = null, string decryptionKey = null) { throw null; } - public static Azure.ResourceManager.AppService.Models.SitePatchInfo SitePatchInfo(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string state = null, System.Collections.Generic.IEnumerable hostNames = null, string repositorySiteName = null, Azure.ResourceManager.AppService.Models.AppServiceUsageState? usageState = default(Azure.ResourceManager.AppService.Models.AppServiceUsageState?), bool? isEnabled = default(bool?), System.Collections.Generic.IEnumerable enabledHostNames = null, Azure.ResourceManager.AppService.Models.WebSiteAvailabilityState? availabilityState = default(Azure.ResourceManager.AppService.Models.WebSiteAvailabilityState?), System.Collections.Generic.IEnumerable hostNameSslStates = null, Azure.Core.ResourceIdentifier serverFarmId = null, bool? isReserved = default(bool?), bool? isXenon = default(bool?), bool? isHyperV = default(bool?), System.DateTimeOffset? lastModifiedOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.SiteConfigProperties siteConfig = null, System.Collections.Generic.IEnumerable trafficManagerHostNames = null, bool? isScmSiteAlsoStopped = default(bool?), string targetSwapSlot = null, Azure.ResourceManager.AppService.Models.HostingEnvironmentProfile hostingEnvironmentProfile = null, bool? isClientAffinityEnabled = default(bool?), bool? isClientCertEnabled = default(bool?), Azure.ResourceManager.AppService.Models.ClientCertMode? clientCertMode = default(Azure.ResourceManager.AppService.Models.ClientCertMode?), string clientCertExclusionPaths = null, bool? isHostNameDisabled = default(bool?), string customDomainVerificationId = null, string outboundIPAddresses = null, string possibleOutboundIPAddresses = null, int? containerSize = default(int?), int? dailyMemoryTimeQuota = default(int?), System.DateTimeOffset? suspendOn = default(System.DateTimeOffset?), int? maxNumberOfWorkers = default(int?), Azure.ResourceManager.AppService.Models.CloningInfo cloningInfo = null, string resourceGroup = null, bool? isDefaultContainer = default(bool?), string defaultHostName = null, Azure.ResourceManager.AppService.Models.SlotSwapStatus slotSwapStatus = null, bool? isHttpsOnly = default(bool?), Azure.ResourceManager.AppService.Models.RedundancyMode? redundancyMode = default(Azure.ResourceManager.AppService.Models.RedundancyMode?), System.Guid? inProgressOperationId = default(System.Guid?), bool? isStorageAccountRequired = default(bool?), string keyVaultReferenceIdentity = null, Azure.Core.ResourceIdentifier virtualNetworkSubnetId = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.SitePatchInfo SitePatchInfo(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string state = null, System.Collections.Generic.IEnumerable hostNames = null, string repositorySiteName = null, Azure.ResourceManager.AppService.Models.AppServiceUsageState? usageState = default(Azure.ResourceManager.AppService.Models.AppServiceUsageState?), bool? isEnabled = default(bool?), System.Collections.Generic.IEnumerable enabledHostNames = null, Azure.ResourceManager.AppService.Models.WebSiteAvailabilityState? availabilityState = default(Azure.ResourceManager.AppService.Models.WebSiteAvailabilityState?), System.Collections.Generic.IEnumerable hostNameSslStates = null, Azure.Core.ResourceIdentifier serverFarmId = null, bool? isReserved = default(bool?), bool? isXenon = default(bool?), bool? isHyperV = default(bool?), System.DateTimeOffset? lastModifiedOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.SiteDnsConfig dnsConfiguration = null, Azure.ResourceManager.AppService.Models.SiteConfigProperties siteConfig = null, System.Collections.Generic.IEnumerable trafficManagerHostNames = null, bool? isScmSiteAlsoStopped = default(bool?), string targetSwapSlot = null, Azure.ResourceManager.AppService.Models.HostingEnvironmentProfile hostingEnvironmentProfile = null, bool? isClientAffinityEnabled = default(bool?), bool? isClientCertEnabled = default(bool?), Azure.ResourceManager.AppService.Models.ClientCertMode? clientCertMode = default(Azure.ResourceManager.AppService.Models.ClientCertMode?), string clientCertExclusionPaths = null, bool? isHostNameDisabled = default(bool?), string customDomainVerificationId = null, string outboundIPAddresses = null, string possibleOutboundIPAddresses = null, int? containerSize = default(int?), int? dailyMemoryTimeQuota = default(int?), System.DateTimeOffset? suspendOn = default(System.DateTimeOffset?), int? maxNumberOfWorkers = default(int?), Azure.ResourceManager.AppService.Models.CloningInfo cloningInfo = null, string resourceGroup = null, bool? isDefaultContainer = default(bool?), string defaultHostName = null, Azure.ResourceManager.AppService.Models.SlotSwapStatus slotSwapStatus = null, bool? isHttpsOnly = default(bool?), Azure.ResourceManager.AppService.Models.RedundancyMode? redundancyMode = default(Azure.ResourceManager.AppService.Models.RedundancyMode?), System.Guid? inProgressOperationId = default(System.Guid?), bool? isStorageAccountRequired = default(bool?), string keyVaultReferenceIdentity = null, Azure.Core.ResourceIdentifier virtualNetworkSubnetId = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.SitePhpErrorLogFlag SitePhpErrorLogFlag(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string localLogErrors = null, string masterLogErrors = null, string localLogErrorsMaxLength = null, string masterLogErrorsMaxLength = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.SiteSeal SiteSeal(string html = null) { throw null; } public static Azure.ResourceManager.AppService.SiteSourceControlData SiteSourceControlData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Uri repoUri = null, string branch = null, bool? isManualIntegration = default(bool?), bool? isGitHubAction = default(bool?), bool? isDeploymentRollbackEnabled = default(bool?), bool? isMercurial = default(bool?), Azure.ResourceManager.AppService.Models.GitHubActionConfiguration gitHubActionConfiguration = null, string kind = null) { throw null; } @@ -7105,12 +8308,18 @@ public static partial class ArmAppServiceModelFactory public static Azure.ResourceManager.AppService.Models.SlotSwapStatus SlotSwapStatus(System.DateTimeOffset? timestampUtc = default(System.DateTimeOffset?), string sourceSlotName = null, string destinationSlotName = null) { throw null; } public static Azure.ResourceManager.AppService.Models.SnapshotRestoreRequest SnapshotRestoreRequest(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string snapshotTime = null, Azure.ResourceManager.AppService.Models.SnapshotRecoverySource recoverySource = null, bool? canOverwrite = default(bool?), bool? recoverConfiguration = default(bool?), bool? ignoreConflictingHostNames = default(bool?), bool? useDRSecondary = default(bool?), string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.StampCapacity StampCapacity(string name = null, long? availableCapacity = default(long?), long? totalCapacity = default(long?), string unit = null, Azure.ResourceManager.AppService.Models.ComputeModeOption? computeMode = default(Azure.ResourceManager.AppService.Models.ComputeModeOption?), Azure.ResourceManager.AppService.Models.WorkerSizeOption? workerSize = default(Azure.ResourceManager.AppService.Models.WorkerSizeOption?), int? workerSizeId = default(int?), bool? excludeFromCapacityAllocation = default(bool?), bool? isApplicableForAllComputeModes = default(bool?), string siteMode = null, bool? isLinux = default(bool?)) { throw null; } - public static Azure.ResourceManager.AppService.StaticSiteBuildData StaticSiteBuildData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string buildId = null, string sourceBranch = null, string pullRequestTitle = null, string hostname = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastUpdatedOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.StaticSiteBuildStatus? status = default(Azure.ResourceManager.AppService.Models.StaticSiteBuildStatus?), System.Collections.Generic.IEnumerable userProvidedFunctionApps = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.StaticSiteBasicAuthPropertyData StaticSiteBasicAuthPropertyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string password = null, System.Uri secretUri = null, string applicableEnvironmentsMode = null, System.Collections.Generic.IEnumerable environments = null, string secretState = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.StaticSiteBuildData StaticSiteBuildData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string buildId = null, string sourceBranch = null, string pullRequestTitle = null, string hostname = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastUpdatedOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.StaticSiteBuildStatus? status = default(Azure.ResourceManager.AppService.Models.StaticSiteBuildStatus?), System.Collections.Generic.IEnumerable userProvidedFunctionApps = null, System.Collections.Generic.IEnumerable linkedBackends = null, System.Collections.Generic.IEnumerable databaseConnections = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.StaticSiteCustomDomainContent StaticSiteCustomDomainContent(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string validationMethod = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.StaticSiteCustomDomainOverviewData StaticSiteCustomDomainOverviewData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string domainName = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.CustomDomainStatus? status = default(Azure.ResourceManager.AppService.Models.CustomDomainStatus?), string validationToken = null, string errorMessage = null, string kind = null) { throw null; } - public static Azure.ResourceManager.AppService.StaticSiteData StaticSiteData(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 tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.AppService.Models.AppServiceSkuDescription sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string defaultHostname = null, System.Uri repositoryUri = null, string branch = null, System.Collections.Generic.IEnumerable customDomains = null, string repositoryToken = null, Azure.ResourceManager.AppService.Models.StaticSiteBuildProperties buildProperties = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.AppService.Models.StagingEnvironmentPolicy? stagingEnvironmentPolicy = default(Azure.ResourceManager.AppService.Models.StagingEnvironmentPolicy?), bool? allowConfigFileUpdates = default(bool?), Azure.ResourceManager.AppService.Models.StaticSiteTemplate templateProperties = null, string contentDistributionEndpoint = null, string keyVaultReferenceIdentity = null, System.Collections.Generic.IEnumerable userProvidedFunctionApps = null, string provider = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.StaticSiteData StaticSiteData(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 tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.AppService.Models.AppServiceSkuDescription sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, string defaultHostname = null, System.Uri repositoryUri = null, string branch = null, System.Collections.Generic.IEnumerable customDomains = null, string repositoryToken = null, Azure.ResourceManager.AppService.Models.StaticSiteBuildProperties buildProperties = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.AppService.Models.StagingEnvironmentPolicy? stagingEnvironmentPolicy = default(Azure.ResourceManager.AppService.Models.StagingEnvironmentPolicy?), bool? allowConfigFileUpdates = default(bool?), Azure.ResourceManager.AppService.Models.StaticSiteTemplate templateProperties = null, string contentDistributionEndpoint = null, string keyVaultReferenceIdentity = null, System.Collections.Generic.IEnumerable userProvidedFunctionApps = null, System.Collections.Generic.IEnumerable linkedBackends = null, string provider = null, Azure.ResourceManager.AppService.Models.EnterpriseGradeCdnStatus? enterpriseGradeCdnStatus = default(Azure.ResourceManager.AppService.Models.EnterpriseGradeCdnStatus?), string publicNetworkAccess = null, System.Collections.Generic.IEnumerable databaseConnections = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.StaticSiteDatabaseConnectionConfigurationFileOverview StaticSiteDatabaseConnectionConfigurationFileOverview(string fileName = null, string contents = null, string staticSiteDatabaseConnectionConfigurationFileOverviewType = null) { throw null; } + public static Azure.ResourceManager.AppService.StaticSiteDatabaseConnectionData StaticSiteDatabaseConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.ResourceIdentifier resourceId = null, string connectionIdentity = null, string connectionString = null, string region = null, System.Collections.Generic.IEnumerable configurationFiles = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.StaticSiteDatabaseConnectionOverview StaticSiteDatabaseConnectionOverview(Azure.Core.ResourceIdentifier resourceId = null, string connectionIdentity = null, string region = null, System.Collections.Generic.IEnumerable configurationFiles = null, string name = null) { throw null; } public static Azure.ResourceManager.AppService.Models.StaticSiteFunctionOverview StaticSiteFunctionOverview(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string functionName = null, Azure.ResourceManager.AppService.Models.FunctionTriggerType? triggerType = default(Azure.ResourceManager.AppService.Models.FunctionTriggerType?), string kind = null) { throw null; } - public static Azure.ResourceManager.AppService.Models.StaticSitePatch StaticSitePatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string defaultHostname = null, System.Uri repositoryUri = null, string branch = null, System.Collections.Generic.IEnumerable customDomains = null, string repositoryToken = null, Azure.ResourceManager.AppService.Models.StaticSiteBuildProperties buildProperties = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.AppService.Models.StagingEnvironmentPolicy? stagingEnvironmentPolicy = default(Azure.ResourceManager.AppService.Models.StagingEnvironmentPolicy?), bool? allowConfigFileUpdates = default(bool?), Azure.ResourceManager.AppService.Models.StaticSiteTemplate templateProperties = null, string contentDistributionEndpoint = null, string keyVaultReferenceIdentity = null, System.Collections.Generic.IEnumerable userProvidedFunctionApps = null, string provider = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.StaticSiteLinkedBackendData StaticSiteLinkedBackendData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.ResourceIdentifier backendResourceId = null, string region = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string provisioningState = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.StaticSiteLinkedBackendInfo StaticSiteLinkedBackendInfo(string backendResourceId = null, string region = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string provisioningState = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.StaticSitePatch StaticSitePatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string defaultHostname = null, System.Uri repositoryUri = null, string branch = null, System.Collections.Generic.IEnumerable customDomains = null, string repositoryToken = null, Azure.ResourceManager.AppService.Models.StaticSiteBuildProperties buildProperties = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.AppService.Models.StagingEnvironmentPolicy? stagingEnvironmentPolicy = default(Azure.ResourceManager.AppService.Models.StagingEnvironmentPolicy?), bool? allowConfigFileUpdates = default(bool?), Azure.ResourceManager.AppService.Models.StaticSiteTemplate templateProperties = null, string contentDistributionEndpoint = null, string keyVaultReferenceIdentity = null, System.Collections.Generic.IEnumerable userProvidedFunctionApps = null, System.Collections.Generic.IEnumerable linkedBackends = null, string provider = null, Azure.ResourceManager.AppService.Models.EnterpriseGradeCdnStatus? enterpriseGradeCdnStatus = default(Azure.ResourceManager.AppService.Models.EnterpriseGradeCdnStatus?), string publicNetworkAccess = null, System.Collections.Generic.IEnumerable databaseConnections = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.StaticSiteResetContent StaticSiteResetContent(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string repositoryToken = null, bool? shouldUpdateRepository = default(bool?), string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.StaticSiteStringList StaticSiteStringList(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.IEnumerable properties = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.StaticSitesWorkflowPreview StaticSitesWorkflowPreview(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string path = null, string contents = null, string kind = null) { throw null; } @@ -7126,14 +8335,18 @@ public static partial class ArmAppServiceModelFactory public static Azure.ResourceManager.AppService.Models.TldLegalAgreement TldLegalAgreement(string agreementKey = null, string title = null, string content = null, System.Uri uri = null) { throw null; } public static Azure.ResourceManager.AppService.TopLevelDomainData TopLevelDomainData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? isDomainPrivacySupported = default(bool?), string kind = null) { throw null; } public static Azure.ResourceManager.AppService.TriggeredJobHistoryData TriggeredJobHistoryData(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.IEnumerable runs = null, string kind = null) { throw null; } - public static Azure.ResourceManager.AppService.TriggeredWebJobData TriggeredWebJobData(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.TriggeredJobRun latestRun = null, System.Uri historyUri = null, System.Uri schedulerLogsUri = 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.TriggeredWebJobData TriggeredWebJobData(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.TriggeredJobRun latestRun = null, System.Uri historyUri = null, System.Uri schedulerLogsUri = 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?), string publicNetworkAccess = null, bool? isStorageAccountRequired = default(bool?), System.Collections.Generic.IDictionary settings = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.ValidateResponseError ValidateResponseError(string code = null, string message = null) { throw null; } public static Azure.ResourceManager.AppService.Models.VirtualNetworkValidationFailureDetails VirtualNetworkValidationFailureDetails(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string message = null, bool? isFailed = default(bool?), System.Collections.Generic.IEnumerable failedTests = null, System.Collections.Generic.IEnumerable warnings = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.VirtualNetworkValidationTestFailure VirtualNetworkValidationTestFailure(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string testName = null, string details = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.WebAppBackupData WebAppBackupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, int? backupId = default(int?), System.Uri storageAccountUri = null, string blobName = null, string backupName = null, Azure.ResourceManager.AppService.Models.WebAppBackupStatus? status = default(Azure.ResourceManager.AppService.Models.WebAppBackupStatus?), long? sizeInBytes = default(long?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string log = null, System.Collections.Generic.IEnumerable databases = null, bool? isScheduled = default(bool?), System.DateTimeOffset? lastRestoreOn = default(System.DateTimeOffset?), System.DateTimeOffset? finishedOn = default(System.DateTimeOffset?), string correlationId = null, long? websiteSizeInBytes = default(long?), string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.WebAppBackupInfo WebAppBackupInfo(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string backupName = null, bool? isEnabled = default(bool?), System.Uri storageAccountUri = null, Azure.ResourceManager.AppService.Models.WebAppBackupSchedule backupSchedule = null, System.Collections.Generic.IEnumerable databases = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.WebAppBackupSchedule WebAppBackupSchedule(int frequencyInterval = 0, Azure.ResourceManager.AppService.Models.BackupFrequencyUnit frequencyUnit = Azure.ResourceManager.AppService.Models.BackupFrequencyUnit.Day, bool shouldKeepAtLeastOneBackup = false, int retentionPeriodInDays = 0, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastExecutedOn = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.AppService.Models.WebAppContentHash WebAppContentHash(string algorithm = null, string value = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.WebAppContentLink WebAppContentLink(System.Uri uri = null, string contentVersion = null, long? contentSize = default(long?), Azure.ResourceManager.AppService.Models.WebAppContentHash contentHash = null, System.BinaryData metadata = null) { throw null; } public static Azure.ResourceManager.AppService.WebAppDeploymentData WebAppDeploymentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, int? status = default(int?), string message = null, string author = null, string deployer = null, string authorEmail = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), bool? isActive = default(bool?), string details = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.WebAppErrorInfo WebAppErrorInfo(string code = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.WebAppJsonSchema WebAppJsonSchema(string title = null, string content = null) { throw null; } public static Azure.ResourceManager.AppService.Models.WebAppMajorVersion WebAppMajorVersion(string displayText = null, string value = null, System.Collections.Generic.IEnumerable minorVersions = null) { throw null; } public static Azure.ResourceManager.AppService.Models.WebAppMinorVersion WebAppMinorVersion(string displayText = null, string value = null, Azure.ResourceManager.AppService.Models.WebAppRuntimes stackSettings = null) { throw null; } public static Azure.ResourceManager.AppService.Models.WebAppMSDeploy WebAppMSDeploy(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Uri packageUri = null, string connectionString = null, string dbType = null, System.Uri setParametersXmlFileUri = null, System.Collections.Generic.IDictionary setParameters = null, bool? skipAppData = default(bool?), bool? isAppOffline = default(bool?), string kind = null) { throw null; } @@ -7141,14 +8354,36 @@ public static partial class ArmAppServiceModelFactory public static Azure.ResourceManager.AppService.Models.WebAppMSDeployLogEntry WebAppMSDeployLogEntry(System.DateTimeOffset? time = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.WebAppMSDeployLogEntryType? entryType = default(Azure.ResourceManager.AppService.Models.WebAppMSDeployLogEntryType?), string message = null) { throw null; } public static Azure.ResourceManager.AppService.Models.WebAppNetworkTrace WebAppNetworkTrace(string path = null, string status = null, string message = null) { throw null; } public static Azure.ResourceManager.AppService.Models.WebAppPushSettings WebAppPushSettings(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? isPushEnabled = default(bool?), string tagWhitelistJson = null, string tagsRequiringAuth = null, string dynamicTagsJson = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.WebAppRequestHistoryData WebAppRequestHistoryData(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 tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.AppService.Models.WebAppRequestHistoryProperties properties = null) { throw null; } public static Azure.ResourceManager.AppService.Models.WebAppRuntimes WebAppRuntimes(Azure.ResourceManager.AppService.Models.WebAppRuntimeSettings linuxRuntimeSettings = null, Azure.ResourceManager.AppService.Models.WebAppRuntimeSettings windowsRuntimeSettings = null, Azure.ResourceManager.AppService.Models.LinuxJavaContainerSettings linuxContainerSettings = null, Azure.ResourceManager.AppService.Models.WindowsJavaContainerSettings windowsContainerSettings = null) { throw null; } public static Azure.ResourceManager.AppService.Models.WebAppRuntimeSettings WebAppRuntimeSettings(string runtimeVersion = null, bool? isRemoteDebuggingSupported = default(bool?), Azure.ResourceManager.AppService.Models.AppInsightsWebAppStackSettings appInsightsSettings = null, Azure.ResourceManager.AppService.Models.GitHubActionWebAppStackSettings gitHubActionSettings = null, bool? isPreview = default(bool?), bool? isDeprecated = default(bool?), bool? isHidden = default(bool?), System.DateTimeOffset? endOfLifeOn = default(System.DateTimeOffset?), bool? isAutoUpdate = default(bool?), bool? isEarlyAccess = default(bool?)) { throw null; } public static Azure.ResourceManager.AppService.Models.WebAppStack WebAppStack(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string displayText = null, string value = null, System.Collections.Generic.IEnumerable majorVersions = null, Azure.ResourceManager.AppService.Models.StackPreferredOS? preferredOS = default(Azure.ResourceManager.AppService.Models.StackPreferredOS?), string kind = null) { throw null; } public static Azure.ResourceManager.AppService.WebJobData WebJobData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = 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.WebSiteAnalysisDefinitionData WebSiteAnalysisDefinitionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string description = null, string kind = null) { throw null; } - public static Azure.ResourceManager.AppService.WebSiteData WebSiteData(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 tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, string state = null, System.Collections.Generic.IEnumerable hostNames = null, string repositorySiteName = null, Azure.ResourceManager.AppService.Models.AppServiceUsageState? usageState = default(Azure.ResourceManager.AppService.Models.AppServiceUsageState?), bool? isEnabled = default(bool?), System.Collections.Generic.IEnumerable enabledHostNames = null, Azure.ResourceManager.AppService.Models.WebSiteAvailabilityState? availabilityState = default(Azure.ResourceManager.AppService.Models.WebSiteAvailabilityState?), System.Collections.Generic.IEnumerable hostNameSslStates = null, Azure.Core.ResourceIdentifier appServicePlanId = null, bool? isReserved = default(bool?), bool? isXenon = default(bool?), bool? isHyperV = default(bool?), System.DateTimeOffset? lastModifiedTimeUtc = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.SiteConfigProperties siteConfig = null, System.Collections.Generic.IEnumerable trafficManagerHostNames = null, bool? isScmSiteAlsoStopped = default(bool?), string targetSwapSlot = null, Azure.ResourceManager.AppService.Models.HostingEnvironmentProfile hostingEnvironmentProfile = null, bool? isClientAffinityEnabled = default(bool?), bool? isClientCertEnabled = default(bool?), Azure.ResourceManager.AppService.Models.ClientCertMode? clientCertMode = default(Azure.ResourceManager.AppService.Models.ClientCertMode?), string clientCertExclusionPaths = null, bool? isHostNameDisabled = default(bool?), string customDomainVerificationId = null, string outboundIPAddresses = null, string possibleOutboundIPAddresses = null, int? containerSize = default(int?), int? dailyMemoryTimeQuota = default(int?), System.DateTimeOffset? suspendOn = default(System.DateTimeOffset?), int? maxNumberOfWorkers = default(int?), Azure.ResourceManager.AppService.Models.CloningInfo cloningInfo = null, string resourceGroup = null, bool? isDefaultContainer = default(bool?), string defaultHostName = null, Azure.ResourceManager.AppService.Models.SlotSwapStatus slotSwapStatus = null, bool? isHttpsOnly = default(bool?), Azure.ResourceManager.AppService.Models.RedundancyMode? redundancyMode = default(Azure.ResourceManager.AppService.Models.RedundancyMode?), System.Guid? inProgressOperationId = default(System.Guid?), bool? isStorageAccountRequired = default(bool?), string keyVaultReferenceIdentity = null, Azure.Core.ResourceIdentifier virtualNetworkSubnetId = null, string kind = null) { throw null; } + public static Azure.ResourceManager.AppService.WebSiteData WebSiteData(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 tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null, string state = null, System.Collections.Generic.IEnumerable hostNames = null, string repositorySiteName = null, Azure.ResourceManager.AppService.Models.AppServiceUsageState? usageState = default(Azure.ResourceManager.AppService.Models.AppServiceUsageState?), bool? isEnabled = default(bool?), System.Collections.Generic.IEnumerable enabledHostNames = null, Azure.ResourceManager.AppService.Models.WebSiteAvailabilityState? availabilityState = default(Azure.ResourceManager.AppService.Models.WebSiteAvailabilityState?), System.Collections.Generic.IEnumerable hostNameSslStates = null, Azure.Core.ResourceIdentifier appServicePlanId = null, bool? isReserved = default(bool?), bool? isXenon = default(bool?), bool? isHyperV = default(bool?), System.DateTimeOffset? lastModifiedTimeUtc = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.SiteDnsConfig dnsConfiguration = null, bool? isVnetRouteAllEnabled = default(bool?), bool? isVnetImagePullEnabled = default(bool?), bool? isVnetContentShareEnabled = default(bool?), bool? isVnetBackupRestoreEnabled = default(bool?), Azure.ResourceManager.AppService.Models.SiteConfigProperties siteConfig = null, Azure.ResourceManager.AppService.Models.FunctionAppConfig functionAppConfig = null, Azure.ResourceManager.AppService.Models.AppDaprConfig daprConfig = null, string workloadProfileName = null, Azure.ResourceManager.AppService.Models.FunctionAppResourceConfig resourceConfig = null, System.Collections.Generic.IEnumerable trafficManagerHostNames = null, bool? isScmSiteAlsoStopped = default(bool?), string targetSwapSlot = null, Azure.ResourceManager.AppService.Models.HostingEnvironmentProfile hostingEnvironmentProfile = null, bool? isClientAffinityEnabled = default(bool?), bool? isClientCertEnabled = default(bool?), Azure.ResourceManager.AppService.Models.ClientCertMode? clientCertMode = default(Azure.ResourceManager.AppService.Models.ClientCertMode?), string clientCertExclusionPaths = null, bool? isHostNameDisabled = default(bool?), string customDomainVerificationId = null, string outboundIPAddresses = null, string possibleOutboundIPAddresses = null, int? containerSize = default(int?), int? dailyMemoryTimeQuota = default(int?), System.DateTimeOffset? suspendOn = default(System.DateTimeOffset?), int? maxNumberOfWorkers = default(int?), Azure.ResourceManager.AppService.Models.CloningInfo cloningInfo = null, string resourceGroup = null, bool? isDefaultContainer = default(bool?), string defaultHostName = null, Azure.ResourceManager.AppService.Models.SlotSwapStatus slotSwapStatus = null, bool? isHttpsOnly = default(bool?), Azure.ResourceManager.AppService.Models.RedundancyMode? redundancyMode = default(Azure.ResourceManager.AppService.Models.RedundancyMode?), System.Guid? inProgressOperationId = default(System.Guid?), string publicNetworkAccess = null, bool? isStorageAccountRequired = default(bool?), string keyVaultReferenceIdentity = null, Azure.Core.ResourceIdentifier virtualNetworkSubnetId = null, string managedEnvironmentId = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.WebSiteInstanceStatusData WebSiteInstanceStatusData(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.SiteRuntimeState? state = default(Azure.ResourceManager.AppService.Models.SiteRuntimeState?), System.Uri statusUri = null, System.Uri detectorUri = null, System.Uri consoleUri = null, string healthCheckUrlString = null, System.Collections.Generic.IDictionary containers = null, string kind = null) { throw null; } public static Azure.ResourceManager.AppService.Models.WindowsJavaContainerSettings WindowsJavaContainerSettings(string javaContainer = null, string javaContainerVersion = null, bool? isPreview = default(bool?), bool? isDeprecated = default(bool?), bool? isHidden = default(bool?), System.DateTimeOffset? endOfLifeOn = default(System.DateTimeOffset?), bool? isAutoUpdate = default(bool?), bool? isEarlyAccess = default(bool?)) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowData WorkflowData(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 tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.AppService.Models.WorkflowProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.WorkflowProvisioningState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? changedOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.WorkflowState? state = default(Azure.ResourceManager.AppService.Models.WorkflowState?), string version = null, string accessEndpoint = null, Azure.ResourceManager.AppService.Models.FlowEndpointsConfiguration endpointsConfiguration = null, Azure.ResourceManager.AppService.Models.FlowAccessControlConfiguration accessControl = null, Azure.ResourceManager.AppService.Models.WorkflowSku sku = null, Azure.ResourceManager.AppService.Models.WorkflowResourceReference integrationAccount = null, Azure.ResourceManager.AppService.Models.WorkflowResourceReference integrationServiceEnvironment = null, System.BinaryData definition = null, System.Collections.Generic.IDictionary parameters = null, Azure.ResourceManager.AppService.Models.AppServiceKind? kind = default(Azure.ResourceManager.AppService.Models.AppServiceKind?)) { throw null; } + public static Azure.ResourceManager.AppService.WorkflowEnvelopeData WorkflowEnvelopeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string kind = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), Azure.ResourceManager.AppService.Models.WorkflowEnvelopeProperties properties = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowEnvelopeProperties WorkflowEnvelopeProperties(System.Collections.Generic.IReadOnlyDictionary files = null, Azure.ResourceManager.AppService.Models.WorkflowState? flowState = default(Azure.ResourceManager.AppService.Models.WorkflowState?), Azure.ResourceManager.AppService.Models.WorkflowHealth health = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowExpression WorkflowExpression(string text = null, System.BinaryData value = null, System.Collections.Generic.IEnumerable subexpressions = null, Azure.ResourceManager.AppService.Models.WorkflowExpressionResourceErrorInfo error = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowExpressionResourceErrorInfo WorkflowExpressionResourceErrorInfo(string code = null, string message = null, System.Collections.Generic.IEnumerable details = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowExpressionRoot WorkflowExpressionRoot(string text = null, System.BinaryData value = null, System.Collections.Generic.IEnumerable subexpressions = null, Azure.ResourceManager.AppService.Models.WorkflowExpressionResourceErrorInfo error = null, string path = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowHealth WorkflowHealth(Azure.ResourceManager.AppService.Models.WorkflowHealthState state = Azure.ResourceManager.AppService.Models.WorkflowHealthState.Unknown, Azure.ResponseError error = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowOutputContent WorkflowOutputContent(Azure.ResourceManager.AppService.Models.WebAppParameterType? webAppParameterType = default(Azure.ResourceManager.AppService.Models.WebAppParameterType?), System.BinaryData value = null, System.BinaryData metadata = null, string description = null, System.BinaryData error = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowRecurrenceSchedule WorkflowRecurrenceSchedule(System.Collections.Generic.IEnumerable minutes = null, System.Collections.Generic.IEnumerable hours = null, System.Collections.Generic.IEnumerable weekDays = null, System.Collections.Generic.IEnumerable monthDays = null, System.Collections.Generic.IEnumerable monthlyOccurrences = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowResourceReference WorkflowResourceReference(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?)) { throw null; } + public static Azure.ResourceManager.AppService.WorkflowRunActionData WorkflowRunActionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.WorkflowStatus? status = default(Azure.ResourceManager.AppService.Models.WorkflowStatus?), string code = null, System.BinaryData error = null, string trackingId = null, Azure.ResourceManager.AppService.Models.WebAppRunActionCorrelation correlation = null, Azure.ResourceManager.AppService.Models.WebAppContentLink inputsLink = null, Azure.ResourceManager.AppService.Models.WebAppContentLink outputsLink = null, System.BinaryData trackedProperties = null, System.Collections.Generic.IEnumerable retryHistory = null) { throw null; } + public static Azure.ResourceManager.AppService.WorkflowRunActionRepetitionDefinitionData WorkflowRunActionRepetitionDefinitionData(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 tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.WebAppRunActionCorrelation correlation = null, Azure.ResourceManager.AppService.Models.WorkflowStatus? status = default(Azure.ResourceManager.AppService.Models.WorkflowStatus?), string code = null, System.BinaryData error = null, string trackingId = null, System.BinaryData inputs = null, Azure.ResourceManager.AppService.Models.WebAppContentLink inputsLink = null, System.BinaryData outputs = null, Azure.ResourceManager.AppService.Models.WebAppContentLink outputsLink = null, System.BinaryData trackedProperties = null, System.Collections.Generic.IEnumerable retryHistory = null, int? iterationCount = default(int?), System.Collections.Generic.IEnumerable repetitionIndexes = null) { throw null; } + public static Azure.ResourceManager.AppService.WorkflowRunData WorkflowRunData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.DateTimeOffset? waitEndOn = default(System.DateTimeOffset?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.WorkflowStatus? status = default(Azure.ResourceManager.AppService.Models.WorkflowStatus?), string code = null, System.BinaryData error = null, string correlationId = null, string correlationClientTrackingId = null, Azure.ResourceManager.AppService.Models.WorkflowResourceReference workflow = null, Azure.ResourceManager.AppService.Models.WorkflowRunTrigger trigger = null, System.Collections.Generic.IReadOnlyDictionary outputs = null, Azure.ResourceManager.AppService.Models.WorkflowRunTrigger response = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowRunTrigger WorkflowRunTrigger(string name = null, System.BinaryData inputs = null, Azure.ResourceManager.AppService.Models.WebAppContentLink inputsLink = null, System.BinaryData outputs = null, Azure.ResourceManager.AppService.Models.WebAppContentLink outputsLink = null, System.DateTimeOffset? scheduledOn = default(System.DateTimeOffset?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), string trackingId = null, string correlationClientTrackingId = null, string code = null, Azure.ResourceManager.AppService.Models.WorkflowStatus? status = default(Azure.ResourceManager.AppService.Models.WorkflowStatus?), System.BinaryData error = null, System.BinaryData trackedProperties = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowSku WorkflowSku(Azure.ResourceManager.AppService.Models.WorkflowSkuName name = default(Azure.ResourceManager.AppService.Models.WorkflowSkuName), Azure.ResourceManager.AppService.Models.WorkflowResourceReference plan = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerCallbackUri WorkflowTriggerCallbackUri(string value = null, string method = null, string basePath = null, string relativePath = null, System.Collections.Generic.IEnumerable relativePathParameters = null, Azure.ResourceManager.AppService.Models.WorkflowTriggerListCallbackUriQueries queries = null) { throw null; } + public static Azure.ResourceManager.AppService.WorkflowTriggerData WorkflowTriggerData(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.WorkflowTriggerProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? changedOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.WorkflowState? state = default(Azure.ResourceManager.AppService.Models.WorkflowState?), Azure.ResourceManager.AppService.Models.WorkflowStatus? status = default(Azure.ResourceManager.AppService.Models.WorkflowStatus?), System.DateTimeOffset? lastExecutionOn = default(System.DateTimeOffset?), System.DateTimeOffset? nextExecutionOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.WorkflowTriggerRecurrence recurrence = null, Azure.ResourceManager.AppService.Models.WorkflowResourceReference workflow = null) { throw null; } + public static Azure.ResourceManager.AppService.WorkflowTriggerHistoryData WorkflowTriggerHistoryData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), System.DateTimeOffset? scheduledOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.WorkflowStatus? status = default(Azure.ResourceManager.AppService.Models.WorkflowStatus?), string code = null, System.BinaryData error = null, string trackingId = null, string correlationClientTrackingId = null, Azure.ResourceManager.AppService.Models.WebAppContentLink inputsLink = null, Azure.ResourceManager.AppService.Models.WebAppContentLink outputsLink = null, bool? isFired = default(bool?), Azure.ResourceManager.AppService.Models.WorkflowResourceReference run = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerListCallbackUriQueries WorkflowTriggerListCallbackUriQueries(string apiVersion = null, string sasPermission = null, string sasVersion = null, string sasSignature = null, string sasTimestamp = null) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerRecurrence WorkflowTriggerRecurrence(Azure.ResourceManager.AppService.Models.WorkflowRecurrenceFrequency? frequency = default(Azure.ResourceManager.AppService.Models.WorkflowRecurrenceFrequency?), int? interval = default(int?), string startTime = null, string endTime = null, string timeZone = null, Azure.ResourceManager.AppService.Models.WorkflowRecurrenceSchedule schedule = null) { throw null; } + public static Azure.ResourceManager.AppService.WorkflowVersionData WorkflowVersionData(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 tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.AppService.Models.WorkflowProvisioningState? provisioningState = default(Azure.ResourceManager.AppService.Models.WorkflowProvisioningState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? changedOn = default(System.DateTimeOffset?), Azure.ResourceManager.AppService.Models.WorkflowState? state = default(Azure.ResourceManager.AppService.Models.WorkflowState?), string version = null, string accessEndpoint = null, Azure.ResourceManager.AppService.Models.FlowEndpointsConfiguration endpointsConfiguration = null, Azure.ResourceManager.AppService.Models.FlowAccessControlConfiguration accessControl = null, Azure.ResourceManager.AppService.Models.WorkflowSku sku = null, Azure.ResourceManager.AppService.Models.WorkflowResourceReference integrationAccount = null, System.BinaryData definition = null, System.Collections.Generic.IDictionary parameters = null) { throw null; } } public enum ArtifactStorageType { @@ -7260,6 +8495,7 @@ public partial class CertificateOrderAction : Azure.ResourceManager.Models.Resou public CertificateOrderAction() { } public Azure.ResourceManager.AppService.Models.CertificateOrderActionType? ActionType { get { throw null; } } public System.DateTimeOffset? CreatedOn { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public string Kind { get { throw null; } set { } } Azure.ResourceManager.AppService.Models.CertificateOrderAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -7470,6 +8706,21 @@ public ConnStringValueTypePair(string value, Azure.ResourceManager.AppService.Mo string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ContainerAppsConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ContainerAppsConfiguration() { } + public string AppSubnetResourceId { get { throw null; } set { } } + public string ControlPlaneSubnetResourceId { get { throw null; } set { } } + public string DaprAIInstrumentationKey { get { throw null; } set { } } + public string DockerBridgeCidr { get { throw null; } set { } } + public string PlatformReservedCidr { get { throw null; } set { } } + public string PlatformReservedDnsIP { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.ContainerAppsConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.ContainerAppsConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ContainerCpuStatistics : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerCpuStatistics() { } @@ -7567,6 +8818,23 @@ public enum CookieExpirationConvention FixedTime = 0, IdentityProviderDerived = 1, } + public partial class CsmDeploymentStatus : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CsmDeploymentStatus() { } + public string DeploymentId { get { throw null; } set { } } + public System.Collections.Generic.IList Errors { get { throw null; } } + public System.Collections.Generic.IList FailedInstancesLogs { get { throw null; } } + public string Kind { get { throw null; } set { } } + public int? NumberOfInstancesFailed { get { throw null; } set { } } + public int? NumberOfInstancesInProgress { get { throw null; } set { } } + public int? NumberOfInstancesSuccessful { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.DeploymentBuildStatus? Status { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.CsmDeploymentStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.CsmDeploymentStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class CsmOperationDescription : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal CsmOperationDescription() { } @@ -7630,6 +8898,13 @@ internal CsmUsageQuota() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public enum CustomDnsSuffixProvisioningState + { + Succeeded = 0, + Failed = 1, + Degraded = 2, + InProgress = 3, + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct CustomDomainStatus : System.IEquatable { @@ -7641,6 +8916,7 @@ internal CsmUsageQuota() { } public static Azure.ResourceManager.AppService.Models.CustomDomainStatus Failed { get { throw null; } } public static Azure.ResourceManager.AppService.Models.CustomDomainStatus Ready { get { throw null; } } public static Azure.ResourceManager.AppService.Models.CustomDomainStatus RetrievingValidationToken { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.CustomDomainStatus Unhealthy { get { throw null; } } public static Azure.ResourceManager.AppService.Models.CustomDomainStatus Validating { get { throw null; } } public bool Equals(Azure.ResourceManager.AppService.Models.CustomDomainStatus other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -7678,6 +8954,19 @@ public enum CustomHostNameDnsRecordType CName = 0, A = 1, } + public partial class CustomHostnameSites : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CustomHostnameSites() { } + public string CustomHostname { get { throw null; } set { } } + public string Kind { get { throw null; } set { } } + public string Region { get { throw null; } set { } } + public System.Collections.Generic.IList SiteResourceIds { get { throw null; } } + Azure.ResourceManager.AppService.Models.CustomHostnameSites System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.CustomHostnameSites System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class CustomOpenIdConnectProvider : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public CustomOpenIdConnectProvider() { } @@ -7761,6 +9050,35 @@ public DeletedAppRestoreContent() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DeploymentBuildStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DeploymentBuildStatus(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.DeploymentBuildStatus BuildAborted { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.DeploymentBuildStatus BuildFailed { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.DeploymentBuildStatus BuildInProgress { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.DeploymentBuildStatus BuildPending { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.DeploymentBuildStatus BuildRequestReceived { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.DeploymentBuildStatus BuildSuccessful { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.DeploymentBuildStatus PostBuildRestartRequired { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.DeploymentBuildStatus RuntimeFailed { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.DeploymentBuildStatus RuntimeStarting { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.DeploymentBuildStatus RuntimeSuccessful { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.DeploymentBuildStatus StartPolling { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.DeploymentBuildStatus StartPollingWithRestart { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.DeploymentBuildStatus TimedOut { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.DeploymentBuildStatus 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.AppService.Models.DeploymentBuildStatus left, Azure.ResourceManager.AppService.Models.DeploymentBuildStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.DeploymentBuildStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.DeploymentBuildStatus left, Azure.ResourceManager.AppService.Models.DeploymentBuildStatus right) { throw null; } + public override string ToString() { throw null; } + } public partial class DetectorAbnormalTimePeriod : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DetectorAbnormalTimePeriod() { } @@ -8064,6 +9382,26 @@ public DomainRecommendationSearchContent() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EnterpriseGradeCdnStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EnterpriseGradeCdnStatus(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.EnterpriseGradeCdnStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.EnterpriseGradeCdnStatus Disabling { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.EnterpriseGradeCdnStatus Enabled { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.EnterpriseGradeCdnStatus Enabling { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.EnterpriseGradeCdnStatus 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.AppService.Models.EnterpriseGradeCdnStatus left, Azure.ResourceManager.AppService.Models.EnterpriseGradeCdnStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.EnterpriseGradeCdnStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.EnterpriseGradeCdnStatus left, Azure.ResourceManager.AppService.Models.EnterpriseGradeCdnStatus right) { throw null; } + public override string ToString() { throw null; } + } public partial class FileSystemHttpLogsConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public FileSystemHttpLogsConfig() { } @@ -8076,6 +9414,52 @@ public FileSystemHttpLogsConfig() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class FlowAccessControlConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FlowAccessControlConfiguration() { } + public Azure.ResourceManager.AppService.Models.FlowAccessControlConfigurationPolicy Actions { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.FlowAccessControlConfigurationPolicy Contents { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.FlowAccessControlConfigurationPolicy Triggers { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.FlowAccessControlConfigurationPolicy WorkflowManagement { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.FlowAccessControlConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.FlowAccessControlConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FlowAccessControlConfigurationPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FlowAccessControlConfigurationPolicy() { } + public System.Collections.Generic.IList AllowedCallerIPAddresses { get { throw null; } } + public System.Collections.Generic.IDictionary OpenAuthenticationPolicyList { get { throw null; } } + Azure.ResourceManager.AppService.Models.FlowAccessControlConfigurationPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.FlowAccessControlConfigurationPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FlowEndpoints : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FlowEndpoints() { } + public System.Collections.Generic.IList AccessEndpointIPAddresses { get { throw null; } } + public System.Collections.Generic.IList OutgoingIPAddresses { get { throw null; } } + Azure.ResourceManager.AppService.Models.FlowEndpoints System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.FlowEndpoints System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FlowEndpointsConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FlowEndpointsConfiguration() { } + public Azure.ResourceManager.AppService.Models.FlowEndpoints Connector { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.FlowEndpoints Workflow { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.FlowEndpointsConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.FlowEndpointsConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public enum ForwardProxyConvention { NoProxy = 0, @@ -8087,6 +9471,29 @@ public enum FrontEndServiceType NodePort = 0, LoadBalancer = 1, } + public partial class FunctionAppAlwaysReadyConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FunctionAppAlwaysReadyConfig() { } + public float? InstanceCount { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.FunctionAppAlwaysReadyConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.FunctionAppAlwaysReadyConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FunctionAppConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FunctionAppConfig() { } + public Azure.ResourceManager.AppService.Models.FunctionAppStorage DeploymentStorage { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.FunctionAppRuntime Runtime { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.FunctionAppScaleAndConcurrency ScaleAndConcurrency { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.FunctionAppConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.FunctionAppConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class FunctionAppHostKeys : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal FunctionAppHostKeys() { } @@ -8123,6 +9530,50 @@ internal FunctionAppMinorVersion() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class FunctionAppResourceConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FunctionAppResourceConfig() { } + public double? Cpu { get { throw null; } set { } } + public string Memory { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.FunctionAppResourceConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.FunctionAppResourceConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FunctionAppRuntime : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FunctionAppRuntime() { } + public Azure.ResourceManager.AppService.Models.FunctionAppRuntimeName? Name { get { throw null; } set { } } + public string Version { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.FunctionAppRuntime System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.FunctionAppRuntime System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FunctionAppRuntimeName : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FunctionAppRuntimeName(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.FunctionAppRuntimeName Custom { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.FunctionAppRuntimeName DotnetIsolated { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.FunctionAppRuntimeName Java { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.FunctionAppRuntimeName Node { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.FunctionAppRuntimeName Powershell { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.FunctionAppRuntimeName Python { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.FunctionAppRuntimeName 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.AppService.Models.FunctionAppRuntimeName left, Azure.ResourceManager.AppService.Models.FunctionAppRuntimeName right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.FunctionAppRuntimeName (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.FunctionAppRuntimeName left, Azure.ResourceManager.AppService.Models.FunctionAppRuntimeName right) { throw null; } + public override string ToString() { throw null; } + } public partial class FunctionAppRuntimes : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal FunctionAppRuntimes() { } @@ -8157,6 +9608,19 @@ internal FunctionAppRuntimeSettings() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class FunctionAppScaleAndConcurrency : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FunctionAppScaleAndConcurrency() { } + public System.Collections.Generic.IList AlwaysReady { get { throw null; } } + public float? HttpPerInstanceConcurrency { get { throw null; } set { } } + public float? InstanceMemoryMB { get { throw null; } set { } } + public float? MaximumInstanceCount { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.FunctionAppScaleAndConcurrency System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.FunctionAppScaleAndConcurrency System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class FunctionAppStack : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public FunctionAppStack() { } @@ -8172,6 +9636,66 @@ public FunctionAppStack() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class FunctionAppStorage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FunctionAppStorage() { } + public Azure.ResourceManager.AppService.Models.FunctionAppStorageAuthentication Authentication { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.FunctionAppStorageType? StorageType { get { throw null; } set { } } + public System.Uri Value { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.FunctionAppStorage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.FunctionAppStorage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FunctionAppStorageAccountAuthenticationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FunctionAppStorageAccountAuthenticationType(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.FunctionAppStorageAccountAuthenticationType StorageAccountConnectionString { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.FunctionAppStorageAccountAuthenticationType SystemAssignedIdentity { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.FunctionAppStorageAccountAuthenticationType UserAssignedIdentity { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.FunctionAppStorageAccountAuthenticationType 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.AppService.Models.FunctionAppStorageAccountAuthenticationType left, Azure.ResourceManager.AppService.Models.FunctionAppStorageAccountAuthenticationType right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.FunctionAppStorageAccountAuthenticationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.FunctionAppStorageAccountAuthenticationType left, Azure.ResourceManager.AppService.Models.FunctionAppStorageAccountAuthenticationType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class FunctionAppStorageAuthentication : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FunctionAppStorageAuthentication() { } + public Azure.ResourceManager.AppService.Models.FunctionAppStorageAccountAuthenticationType? AuthenticationType { get { throw null; } set { } } + public string StorageAccountConnectionStringName { get { throw null; } set { } } + public string UserAssignedIdentityResourceId { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.FunctionAppStorageAuthentication System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.FunctionAppStorageAuthentication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FunctionAppStorageType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FunctionAppStorageType(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.FunctionAppStorageType BlobContainer { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.FunctionAppStorageType 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.AppService.Models.FunctionAppStorageType left, Azure.ResourceManager.AppService.Models.FunctionAppStorageType right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.FunctionAppStorageType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.FunctionAppStorageType left, Azure.ResourceManager.AppService.Models.FunctionAppStorageType right) { throw null; } + public override string ToString() { throw null; } + } public partial class FunctionSecrets : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal FunctionSecrets() { } @@ -8428,6 +9952,7 @@ public KubeEnvironmentPatch() { } public Azure.Core.ResourceIdentifier AksResourceId { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.AppLogsConfiguration AppLogsConfiguration { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.ArcConfiguration ArcConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.ContainerAppsConfiguration ContainerAppsConfiguration { get { throw null; } set { } } public string DefaultDomain { get { throw null; } } public string DeploymentErrors { get { throw null; } } public bool? IsInternalLoadBalancerEnabled { get { throw null; } set { } } @@ -8648,6 +10173,45 @@ public enum NotificationLevel Information = 2, NonUrgentSuggestion = 3, } + public partial class OpenAuthenticationAccessPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OpenAuthenticationAccessPolicy() { } + public System.Collections.Generic.IList Claims { get { throw null; } } + public Azure.ResourceManager.AppService.Models.OpenAuthenticationProviderType? ProviderType { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.OpenAuthenticationAccessPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.OpenAuthenticationAccessPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class OpenAuthenticationPolicyClaim : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public OpenAuthenticationPolicyClaim() { } + public string Name { get { throw null; } set { } } + public string Value { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.OpenAuthenticationPolicyClaim System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.OpenAuthenticationPolicyClaim System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct OpenAuthenticationProviderType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public OpenAuthenticationProviderType(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.OpenAuthenticationProviderType AAD { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.OpenAuthenticationProviderType 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.AppService.Models.OpenAuthenticationProviderType left, Azure.ResourceManager.AppService.Models.OpenAuthenticationProviderType right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.OpenAuthenticationProviderType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.OpenAuthenticationProviderType left, Azure.ResourceManager.AppService.Models.OpenAuthenticationProviderType right) { throw null; } + public override string ToString() { throw null; } + } public partial class OpenIdConnectClientCredential : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public OpenIdConnectClientCredential() { } @@ -8969,6 +10533,17 @@ public enum RecommendationChannel Webhook = 3, All = 4, } + public partial class RecurrenceScheduleOccurrence : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RecurrenceScheduleOccurrence() { } + public Azure.ResourceManager.AppService.Models.WebAppDayOfWeek? Day { get { throw null; } } + public int? Occurrence { get { throw null; } } + Azure.ResourceManager.AppService.Models.RecurrenceScheduleOccurrence System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.RecurrenceScheduleOccurrence System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public enum RedundancyMode { None = 0, @@ -9117,6 +10692,7 @@ internal ResourceNameAvailability() { } public partial class ResourceNameAvailabilityContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ResourceNameAvailabilityContent(string name, Azure.ResourceManager.AppService.Models.CheckNameResourceType resourceType) { } + public string EnvironmentId { get { throw null; } set { } } public bool? IsFqdn { get { throw null; } set { } } public string Name { get { throw null; } } public Azure.ResourceManager.AppService.Models.CheckNameResourceType ResourceType { get { throw null; } } @@ -9342,12 +10918,14 @@ public SiteConfigProperties() { } public Azure.ResourceManager.AppService.Models.AppServiceCorsSettings Cors { get { throw null; } set { } } public System.Collections.Generic.IList DefaultDocuments { get { throw null; } set { } } public string DocumentRoot { get { throw null; } set { } } + public int? ElasticWebAppScaleLimit { get { throw null; } set { } } public System.Collections.Generic.IList ExperimentsRampUpRules { get { throw null; } } public Azure.ResourceManager.AppService.Models.AppServiceFtpsState? FtpsState { get { throw null; } set { } } public int? FunctionAppScaleLimit { get { throw null; } set { } } public System.Collections.Generic.IList HandlerMappings { get { throw null; } set { } } public string HealthCheckPath { get { throw null; } set { } } public System.Collections.Generic.IList IPSecurityRestrictions { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.SiteDefaultAction? IPSecurityRestrictionsDefaultAction { get { throw null; } set { } } public bool? IsAlwaysOn { get { throw null; } set { } } public bool? IsAutoHealEnabled { get { throw null; } set { } } public bool? IsDetailedErrorLoggingEnabled { get { throw null; } set { } } @@ -9370,7 +10948,9 @@ public SiteConfigProperties() { } public Azure.ResourceManager.AppService.Models.SiteMachineKey MachineKey { get { throw null; } } public Azure.ResourceManager.AppService.Models.ManagedPipelineMode? ManagedPipelineMode { get { throw null; } set { } } public int? ManagedServiceIdentityId { get { throw null; } set { } } + public System.Collections.Generic.IList Metadata { get { throw null; } set { } } public int? MinimumElasticInstanceCount { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.AppServiceTlsCipherSuite? MinTlsCipherSuite { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion? MinTlsVersion { get { throw null; } set { } } public string NetFrameworkVersion { get { throw null; } set { } } public string NodeVersion { get { throw null; } set { } } @@ -9385,6 +10965,7 @@ public SiteConfigProperties() { } public string RemoteDebuggingVersion { get { throw null; } set { } } public System.DateTimeOffset? RequestTracingExpirationOn { get { throw null; } set { } } public System.Collections.Generic.IList ScmIPSecurityRestrictions { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.SiteDefaultAction? ScmIPSecurityRestrictionsDefaultAction { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.AppServiceSupportedTlsVersion? ScmMinTlsVersion { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.ScmType? ScmType { get { throw null; } set { } } public string TracingOptions { get { throw null; } set { } } @@ -9427,6 +11008,59 @@ public SiteConfigurationSnapshotInfo() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public enum SiteContainerAuthType + { + Anonymous = 0, + UserCredentials = 1, + SystemIdentity = 2, + UserAssigned = 3, + } + public partial class SiteContainerVolumeMount : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SiteContainerVolumeMount(string volumeSubPath, string containerMountPath) { } + public string ContainerMountPath { get { throw null; } set { } } + public string Data { get { throw null; } set { } } + public bool? IsReadOnly { get { throw null; } set { } } + public string VolumeSubPath { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.SiteContainerVolumeMount System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.SiteContainerVolumeMount System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SiteDefaultAction : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SiteDefaultAction(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.SiteDefaultAction Allow { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.SiteDefaultAction Deny { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.SiteDefaultAction 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.AppService.Models.SiteDefaultAction left, Azure.ResourceManager.AppService.Models.SiteDefaultAction right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.SiteDefaultAction (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.SiteDefaultAction left, Azure.ResourceManager.AppService.Models.SiteDefaultAction right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SiteDnsConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SiteDnsConfig() { } + public string DnsAltServer { get { throw null; } set { } } + public bool? DnsLegacySortOrder { get { throw null; } } + public int? DnsMaxCacheTimeout { get { throw null; } set { } } + public int? DnsRetryAttemptCount { get { throw null; } set { } } + public int? DnsRetryAttemptTimeout { get { throw null; } set { } } + public System.Collections.Generic.IList DnsServers { get { throw null; } } + Azure.ResourceManager.AppService.Models.SiteDnsConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.SiteDnsConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public enum SiteExtensionType { Gallery = 0, @@ -9477,6 +11111,7 @@ public SitePatchInfo() { } public string CustomDomainVerificationId { get { throw null; } set { } } public int? DailyMemoryTimeQuota { get { throw null; } set { } } public string DefaultHostName { get { throw null; } } + public Azure.ResourceManager.AppService.Models.SiteDnsConfig DnsConfiguration { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList EnabledHostNames { get { throw null; } } public Azure.ResourceManager.AppService.Models.HostingEnvironmentProfile HostingEnvironmentProfile { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList HostNames { get { throw null; } } @@ -9690,6 +11325,23 @@ internal StampCapacity() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct StaticSiteBasicAuthName : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public StaticSiteBasicAuthName(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.StaticSiteBasicAuthName Default { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.StaticSiteBasicAuthName 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.AppService.Models.StaticSiteBasicAuthName left, Azure.ResourceManager.AppService.Models.StaticSiteBasicAuthName right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.StaticSiteBasicAuthName (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.StaticSiteBasicAuthName left, Azure.ResourceManager.AppService.Models.StaticSiteBasicAuthName right) { throw null; } + public override string ToString() { throw null; } + } public partial class StaticSiteBuildProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public StaticSiteBuildProperties() { } @@ -9741,6 +11393,45 @@ public StaticSiteCustomDomainContent() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class StaticSiteDatabaseConnectionConfigurationFileOverview : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal StaticSiteDatabaseConnectionConfigurationFileOverview() { } + public string Contents { get { throw null; } } + public string FileName { get { throw null; } } + public string StaticSiteDatabaseConnectionConfigurationFileOverviewType { get { throw null; } } + Azure.ResourceManager.AppService.Models.StaticSiteDatabaseConnectionConfigurationFileOverview System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.StaticSiteDatabaseConnectionConfigurationFileOverview System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class StaticSiteDatabaseConnectionOverview : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal StaticSiteDatabaseConnectionOverview() { } + public System.Collections.Generic.IReadOnlyList ConfigurationFiles { get { throw null; } } + public string ConnectionIdentity { get { throw null; } } + public string Name { get { throw null; } } + public string Region { get { throw null; } } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } + Azure.ResourceManager.AppService.Models.StaticSiteDatabaseConnectionOverview System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.StaticSiteDatabaseConnectionOverview System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class StaticSiteDatabaseConnectionPatchContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public StaticSiteDatabaseConnectionPatchContent() { } + public string ConnectionIdentity { get { throw null; } set { } } + public string ConnectionString { get { throw null; } set { } } + public string Region { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.StaticSiteDatabaseConnectionPatchContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.StaticSiteDatabaseConnectionPatchContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class StaticSiteFunctionOverview : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public StaticSiteFunctionOverview() { } @@ -9753,6 +11444,19 @@ public StaticSiteFunctionOverview() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class StaticSiteLinkedBackendInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal StaticSiteLinkedBackendInfo() { } + public string BackendResourceId { get { throw null; } } + public System.DateTimeOffset? CreatedOn { get { throw null; } } + public string ProvisioningState { get { throw null; } } + public string Region { get { throw null; } } + Azure.ResourceManager.AppService.Models.StaticSiteLinkedBackendInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.StaticSiteLinkedBackendInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class StaticSitePatch : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public StaticSitePatch() { } @@ -9761,11 +11465,15 @@ public StaticSitePatch() { } public Azure.ResourceManager.AppService.Models.StaticSiteBuildProperties BuildProperties { get { throw null; } set { } } public string ContentDistributionEndpoint { get { throw null; } } public System.Collections.Generic.IReadOnlyList CustomDomains { get { throw null; } } + public System.Collections.Generic.IReadOnlyList DatabaseConnections { get { throw null; } } public string DefaultHostname { get { throw null; } } + public Azure.ResourceManager.AppService.Models.EnterpriseGradeCdnStatus? EnterpriseGradeCdnStatus { get { throw null; } set { } } public string KeyVaultReferenceIdentity { get { throw null; } } public string Kind { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList LinkedBackends { get { throw null; } } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } - public string Provider { get { throw null; } } + public string Provider { get { throw null; } set { } } + public string PublicNetworkAccess { get { throw null; } set { } } public string RepositoryToken { get { throw null; } set { } } public System.Uri RepositoryUri { get { throw null; } set { } } public Azure.ResourceManager.AppService.Models.StagingEnvironmentPolicy? StagingEnvironmentPolicy { get { throw null; } set { } } @@ -10160,6 +11868,31 @@ public enum WebAppBackupStatus DeleteFailed = 8, Deleted = 9, } + public partial class WebAppContentHash : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WebAppContentHash() { } + public string Algorithm { get { throw null; } } + public string Value { get { throw null; } } + Azure.ResourceManager.AppService.Models.WebAppContentHash System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WebAppContentHash System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WebAppContentLink : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WebAppContentLink() { } + public Azure.ResourceManager.AppService.Models.WebAppContentHash ContentHash { get { throw null; } } + public long? ContentSize { get { throw null; } } + public string ContentVersion { get { throw null; } } + public System.BinaryData Metadata { get { throw null; } } + public System.Uri Uri { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.WebAppContentLink System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WebAppContentLink System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class WebAppCookieExpiration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public WebAppCookieExpiration() { } @@ -10171,6 +11904,79 @@ public WebAppCookieExpiration() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public enum WebAppDayOfWeek + { + Sunday = 0, + Monday = 1, + Tuesday = 2, + Wednesday = 3, + Thursday = 4, + Friday = 5, + Saturday = 6, + } + public partial class WebAppEnvironmentVariable : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WebAppEnvironmentVariable(string name, string value) { } + public string Name { get { throw null; } set { } } + public string Value { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.WebAppEnvironmentVariable System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WebAppEnvironmentVariable System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WebAppErrorInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WebAppErrorInfo() { } + public string Code { get { throw null; } } + Azure.ResourceManager.AppService.Models.WebAppErrorInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WebAppErrorInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WebAppErrorProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WebAppErrorProperties() { } + public string Code { get { throw null; } set { } } + public string Message { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.WebAppErrorProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WebAppErrorProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WebAppIPAddress : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WebAppIPAddress() { } + public string Address { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.WebAppIPAddress System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WebAppIPAddress System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WebAppIPAddressRange : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WebAppIPAddressRange() { } + public string AddressRange { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.WebAppIPAddressRange System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WebAppIPAddressRange System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WebAppJsonSchema : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WebAppJsonSchema() { } + public string Content { get { throw null; } } + public string Title { get { throw null; } } + Azure.ResourceManager.AppService.Models.WebAppJsonSchema System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WebAppJsonSchema System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class WebAppKeyInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public WebAppKeyInfo() { } @@ -10198,6 +12004,25 @@ public WebAppKeyInfoProperties() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct WebAppKeyType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WebAppKeyType(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.WebAppKeyType NotSpecified { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WebAppKeyType Primary { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WebAppKeyType Secondary { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.WebAppKeyType 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.AppService.Models.WebAppKeyType left, Azure.ResourceManager.AppService.Models.WebAppKeyType right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.WebAppKeyType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.WebAppKeyType left, Azure.ResourceManager.AppService.Models.WebAppKeyType right) { throw null; } + public override string ToString() { throw null; } + } public partial class WebAppLoginInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public WebAppLoginInfo() { } @@ -10303,6 +12128,31 @@ internal WebAppNetworkTrace() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct WebAppParameterType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WebAppParameterType(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.WebAppParameterType Array { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WebAppParameterType Bool { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WebAppParameterType Float { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WebAppParameterType Int { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WebAppParameterType NotSpecified { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WebAppParameterType Object { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WebAppParameterType SecureObject { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WebAppParameterType SecureString { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WebAppParameterType String { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.WebAppParameterType 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.AppService.Models.WebAppParameterType left, Azure.ResourceManager.AppService.Models.WebAppParameterType right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.WebAppParameterType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.WebAppParameterType left, Azure.ResourceManager.AppService.Models.WebAppParameterType right) { throw null; } + public override string ToString() { throw null; } + } public partial class WebAppPushSettings : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public WebAppPushSettings() { } @@ -10317,6 +12167,79 @@ public WebAppPushSettings() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class WebAppRequest : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WebAppRequest() { } + public System.BinaryData Headers { get { throw null; } set { } } + public string Method { get { throw null; } set { } } + public System.Uri Uri { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.WebAppRequest System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WebAppRequest System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WebAppRequestHistoryProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WebAppRequestHistoryProperties() { } + public System.DateTimeOffset? EndOn { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.WebAppRequest Request { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.WebAppResponse Response { get { throw null; } set { } } + public System.DateTimeOffset? StartOn { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.WebAppRequestHistoryProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WebAppRequestHistoryProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WebAppResponse : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WebAppResponse() { } + public Azure.ResourceManager.AppService.Models.WebAppContentLink BodyLink { get { throw null; } set { } } + public System.BinaryData Headers { get { throw null; } set { } } + public int? StatusCode { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.WebAppResponse System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WebAppResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WebAppRetryHistory : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WebAppRetryHistory() { } + public string ClientRequestId { get { throw null; } set { } } + public string Code { get { throw null; } set { } } + public System.DateTimeOffset? EndOn { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.WebAppErrorProperties ErrorInfo { get { throw null; } set { } } + public string ServiceRequestId { get { throw null; } set { } } + public System.DateTimeOffset? StartOn { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.WebAppRetryHistory System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WebAppRetryHistory System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WebAppRunActionCorrelation : Azure.ResourceManager.AppService.Models.WebAppRunCorrelation, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WebAppRunActionCorrelation() { } + public string ActionTrackingId { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.WebAppRunActionCorrelation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WebAppRunActionCorrelation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WebAppRunCorrelation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WebAppRunCorrelation() { } + public System.Collections.Generic.IList ClientKeywords { get { throw null; } } + public string ClientTrackingId { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.WebAppRunCorrelation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WebAppRunCorrelation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class WebAppRuntimes : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal WebAppRuntimes() { } @@ -10407,4 +12330,421 @@ public enum WorkerSizeOption NestedSmallLinux = 10, Default = 11, } + public partial class WorkflowArtifacts : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WorkflowArtifacts() { } + public System.BinaryData AppSettings { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Files { get { throw null; } } + public System.Collections.Generic.IList FilesToDelete { get { throw null; } } + Azure.ResourceManager.AppService.Models.WorkflowArtifacts System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WorkflowArtifacts System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WorkflowContent() { } + public string Description { get { throw null; } set { } } + public System.BinaryData Metadata { get { throw null; } set { } } + public System.BinaryData Value { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.WebAppParameterType? WebAppParameterType { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.WorkflowContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WorkflowContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WorkflowData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.AppService.Models.FlowAccessControlConfiguration AccessControl { get { throw null; } set { } } + public string AccessEndpoint { get { throw null; } } + public System.DateTimeOffset? ChangedOn { get { throw null; } } + public System.DateTimeOffset? CreatedOn { get { throw null; } } + public System.BinaryData Definition { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.FlowEndpointsConfiguration EndpointsConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.WorkflowResourceReference IntegrationAccount { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.WorkflowResourceReference IntegrationServiceEnvironment { get { throw null; } set { } } + public Azure.ResourceManager.AppService.Models.AppServiceKind? Kind { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Parameters { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowSku Sku { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowState? State { get { throw null; } set { } } + public string Version { get { throw null; } } + Azure.ResourceManager.AppService.Models.WorkflowData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WorkflowData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowEnvelopeProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WorkflowEnvelopeProperties() { } + public System.Collections.Generic.IReadOnlyDictionary Files { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowState? FlowState { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowHealth Health { get { throw null; } } + Azure.ResourceManager.AppService.Models.WorkflowEnvelopeProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WorkflowEnvelopeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowExpression : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WorkflowExpression() { } + public Azure.ResourceManager.AppService.Models.WorkflowExpressionResourceErrorInfo Error { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Subexpressions { get { throw null; } } + public string Text { get { throw null; } } + public System.BinaryData Value { get { throw null; } } + Azure.ResourceManager.AppService.Models.WorkflowExpression System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WorkflowExpression System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowExpressionResourceErrorInfo : Azure.ResourceManager.AppService.Models.WebAppErrorInfo, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WorkflowExpressionResourceErrorInfo() { } + public System.Collections.Generic.IReadOnlyList Details { get { throw null; } } + public string Message { get { throw null; } } + Azure.ResourceManager.AppService.Models.WorkflowExpressionResourceErrorInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WorkflowExpressionResourceErrorInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowExpressionRoot : Azure.ResourceManager.AppService.Models.WorkflowExpression, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WorkflowExpressionRoot() { } + public string Path { get { throw null; } } + Azure.ResourceManager.AppService.Models.WorkflowExpressionRoot System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WorkflowExpressionRoot System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowHealth : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WorkflowHealth() { } + public Azure.ResponseError Error { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowHealthState State { get { throw null; } } + Azure.ResourceManager.AppService.Models.WorkflowHealth System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WorkflowHealth System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public enum WorkflowHealthState + { + Unknown = 0, + NotSpecified = 1, + Healthy = 2, + Unhealthy = 3, + } + public partial class WorkflowOutputContent : Azure.ResourceManager.AppService.Models.WorkflowContent, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WorkflowOutputContent() { } + public System.BinaryData Error { get { throw null; } } + Azure.ResourceManager.AppService.Models.WorkflowOutputContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WorkflowOutputContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct WorkflowProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WorkflowProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Completed { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Created { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Deleted { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState InProgress { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Moving { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState NotSpecified { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Pending { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Ready { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Registered { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Registering { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Renewing { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Running { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Unregistered { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Unregistering { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Updating { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowProvisioningState Waiting { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.WorkflowProvisioningState 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.AppService.Models.WorkflowProvisioningState left, Azure.ResourceManager.AppService.Models.WorkflowProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.WorkflowProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.WorkflowProvisioningState left, Azure.ResourceManager.AppService.Models.WorkflowProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct WorkflowRecurrenceFrequency : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WorkflowRecurrenceFrequency(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowRecurrenceFrequency Day { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowRecurrenceFrequency Hour { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowRecurrenceFrequency Minute { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowRecurrenceFrequency Month { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowRecurrenceFrequency NotSpecified { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowRecurrenceFrequency Second { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowRecurrenceFrequency Week { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowRecurrenceFrequency Year { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.WorkflowRecurrenceFrequency 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.AppService.Models.WorkflowRecurrenceFrequency left, Azure.ResourceManager.AppService.Models.WorkflowRecurrenceFrequency right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.WorkflowRecurrenceFrequency (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.WorkflowRecurrenceFrequency left, Azure.ResourceManager.AppService.Models.WorkflowRecurrenceFrequency right) { throw null; } + public override string ToString() { throw null; } + } + public partial class WorkflowRecurrenceSchedule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WorkflowRecurrenceSchedule() { } + public System.Collections.Generic.IReadOnlyList Hours { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Minutes { get { throw null; } } + public System.Collections.Generic.IReadOnlyList MonthDays { get { throw null; } } + public System.Collections.Generic.IReadOnlyList MonthlyOccurrences { get { throw null; } } + public System.Collections.Generic.IReadOnlyList WeekDays { get { throw null; } } + Azure.ResourceManager.AppService.Models.WorkflowRecurrenceSchedule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WorkflowRecurrenceSchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowRegenerateActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WorkflowRegenerateActionContent() { } + public Azure.ResourceManager.AppService.Models.WebAppKeyType? KeyType { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.WorkflowRegenerateActionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WorkflowRegenerateActionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowResourceReference : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WorkflowResourceReference() { } + public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } } + public string Name { get { throw null; } } + public Azure.Core.ResourceType? ResourceType { get { throw null; } } + Azure.ResourceManager.AppService.Models.WorkflowResourceReference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WorkflowResourceReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowRunActionRepetitionIndex : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public WorkflowRunActionRepetitionIndex(int itemIndex) { } + public int ItemIndex { get { throw null; } set { } } + public string ScopeName { get { throw null; } set { } } + Azure.ResourceManager.AppService.Models.WorkflowRunActionRepetitionIndex System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WorkflowRunActionRepetitionIndex System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowRunTrigger : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WorkflowRunTrigger() { } + public string Code { get { throw null; } } + public string CorrelationClientTrackingId { get { throw null; } } + public System.DateTimeOffset? EndOn { get { throw null; } } + public System.BinaryData Error { get { throw null; } } + public System.BinaryData Inputs { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WebAppContentLink InputsLink { get { throw null; } } + public string Name { get { throw null; } } + public System.BinaryData Outputs { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WebAppContentLink OutputsLink { get { throw null; } } + public System.DateTimeOffset? ScheduledOn { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowStatus? Status { get { throw null; } } + public System.BinaryData TrackedProperties { get { throw null; } } + public string TrackingId { get { throw null; } } + Azure.ResourceManager.AppService.Models.WorkflowRunTrigger System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WorkflowRunTrigger System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowSku : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WorkflowSku() { } + public Azure.ResourceManager.AppService.Models.WorkflowSkuName Name { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowResourceReference Plan { get { throw null; } } + Azure.ResourceManager.AppService.Models.WorkflowSku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WorkflowSku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct WorkflowSkuName : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WorkflowSkuName(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowSkuName Basic { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowSkuName Free { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowSkuName NotSpecified { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowSkuName Premium { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowSkuName Shared { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowSkuName Standard { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.WorkflowSkuName 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.AppService.Models.WorkflowSkuName left, Azure.ResourceManager.AppService.Models.WorkflowSkuName right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.WorkflowSkuName (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.WorkflowSkuName left, Azure.ResourceManager.AppService.Models.WorkflowSkuName right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct WorkflowState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WorkflowState(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowState Completed { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowState Deleted { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowState Disabled { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowState Enabled { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowState NotSpecified { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowState Suspended { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.WorkflowState 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.AppService.Models.WorkflowState left, Azure.ResourceManager.AppService.Models.WorkflowState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.WorkflowState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.WorkflowState left, Azure.ResourceManager.AppService.Models.WorkflowState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct WorkflowStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WorkflowStatus(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowStatus Aborted { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowStatus Cancelled { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowStatus Failed { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowStatus Faulted { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowStatus Ignored { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowStatus NotSpecified { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowStatus Paused { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowStatus Running { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowStatus Skipped { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowStatus Succeeded { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowStatus Suspended { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowStatus TimedOut { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowStatus Waiting { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.WorkflowStatus 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.AppService.Models.WorkflowStatus left, Azure.ResourceManager.AppService.Models.WorkflowStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.WorkflowStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.WorkflowStatus left, Azure.ResourceManager.AppService.Models.WorkflowStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class WorkflowTriggerCallbackUri : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WorkflowTriggerCallbackUri() { } + public string BasePath { get { throw null; } } + public string Method { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowTriggerListCallbackUriQueries Queries { get { throw null; } } + public string RelativePath { get { throw null; } } + public System.Collections.Generic.IReadOnlyList RelativePathParameters { get { throw null; } } + public string Value { get { throw null; } } + Azure.ResourceManager.AppService.Models.WorkflowTriggerCallbackUri System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WorkflowTriggerCallbackUri System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class WorkflowTriggerListCallbackUriQueries : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WorkflowTriggerListCallbackUriQueries() { } + public string ApiVersion { get { throw null; } } + public string SasPermission { get { throw null; } } + public string SasSignature { get { throw null; } } + public string SasTimestamp { get { throw null; } } + public string SasVersion { get { throw null; } } + Azure.ResourceManager.AppService.Models.WorkflowTriggerListCallbackUriQueries System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WorkflowTriggerListCallbackUriQueries System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct WorkflowTriggerProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public WorkflowTriggerProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState Completed { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState Created { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState Deleted { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState Moving { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState NotSpecified { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState Ready { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState Registered { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState Registering { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState Running { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState Unregistered { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState Unregistering { get { throw null; } } + public static Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState 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.AppService.Models.WorkflowTriggerProvisioningState left, Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState left, Azure.ResourceManager.AppService.Models.WorkflowTriggerProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class WorkflowTriggerRecurrence : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal WorkflowTriggerRecurrence() { } + public string EndTime { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowRecurrenceFrequency? Frequency { get { throw null; } } + public int? Interval { get { throw null; } } + public Azure.ResourceManager.AppService.Models.WorkflowRecurrenceSchedule Schedule { get { throw null; } } + public string StartTime { get { throw null; } } + public string TimeZone { get { throw null; } } + Azure.ResourceManager.AppService.Models.WorkflowTriggerRecurrence System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.AppService.Models.WorkflowTriggerRecurrence System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppCertificateCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppCertificateCollection.cs index 5fb26127641ba..f34738037776c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppCertificateCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppCertificateCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_AppCertificateCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListCertificatesByResourceGroup() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListCertificatesByResourceGroup.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListCertificatesByResourceGroup.json // this example is just showing the usage of "Certificates_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_ListCertificatesByResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetCertificate() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetCertificate.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetCertificate.json // this example is just showing the usage of "Certificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,7 +90,7 @@ public async Task Get_GetCertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetCertificate() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetCertificate.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetCertificate.json // this example is just showing the usage of "Certificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +120,7 @@ public async Task Exists_GetCertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetCertificate() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetCertificate.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetCertificate.json // this example is just showing the usage of "Certificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -162,7 +162,7 @@ public async Task GetIfExists_GetCertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateCertificate() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/CreateOrUpdateCertificate.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CreateOrUpdateCertificate.json // this example is just showing the usage of "Certificates_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppCertificateResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppCertificateResource.cs index b5785192ff003..303daaeeb802d 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppCertificateResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppCertificateResource.cs @@ -21,7 +21,7 @@ public partial class Sample_AppCertificateResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAppCertificates_ListCertificatesForSubscription() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListCertificates.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListCertificates.json // this example is just showing the usage of "Certificates_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task GetAppCertificates_ListCertificatesForSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetCertificate() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetCertificate.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetCertificate.json // this example is just showing the usage of "Certificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Get_GetCertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteCertificate() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/DeleteCertificate.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DeleteCertificate.json // this example is just showing the usage of "Certificates_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -111,7 +111,7 @@ public async Task Delete_DeleteCertificate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PatchCertificate() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/PatchCertificate.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/PatchCertificate.json // this example is just showing the usage of "Certificates_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateCollection.cs new file mode 100644 index 0000000000000..09600eaf308c4 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateCollection.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_AppServiceCertificateCollection + { + // List certificates by App Service Certificate + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListCertificatesByAppServiceCertificate() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/ListCertificatesByAppServiceCertificateOrder.json + // this example is just showing the usage of "AppServiceCertificateOrders_ListCertificates" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateOrderResource created on azure + // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string certificateOrderName = "SampleCertificateOrderName"; + ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName); + AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId); + + // get the collection of this AppServiceCertificateResource + AppServiceCertificateCollection collection = appServiceCertificateOrder.GetAppServiceCertificates(); + + // invoke the operation and iterate over the result + await foreach (AppServiceCertificateResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceCertificateData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get App Service Certificate + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAppServiceCertificate() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/GetAppServiceCertificate.json + // this example is just showing the usage of "AppServiceCertificateOrders_GetCertificate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateOrderResource created on azure + // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string certificateOrderName = "SampleCertificateOrderName"; + ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName); + AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId); + + // get the collection of this AppServiceCertificateResource + AppServiceCertificateCollection collection = appServiceCertificateOrder.GetAppServiceCertificates(); + + // invoke the operation + string name = "SampleCertName1"; + AppServiceCertificateResource result = await collection.GetAsync(name); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceCertificateData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get App Service Certificate + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetAppServiceCertificate() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/GetAppServiceCertificate.json + // this example is just showing the usage of "AppServiceCertificateOrders_GetCertificate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateOrderResource created on azure + // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string certificateOrderName = "SampleCertificateOrderName"; + ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName); + AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId); + + // get the collection of this AppServiceCertificateResource + AppServiceCertificateCollection collection = appServiceCertificateOrder.GetAppServiceCertificates(); + + // invoke the operation + string name = "SampleCertName1"; + bool result = await collection.ExistsAsync(name); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get App Service Certificate + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetAppServiceCertificate() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/GetAppServiceCertificate.json + // this example is just showing the usage of "AppServiceCertificateOrders_GetCertificate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateOrderResource created on azure + // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string certificateOrderName = "SampleCertificateOrderName"; + ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName); + AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId); + + // get the collection of this AppServiceCertificateResource + AppServiceCertificateCollection collection = appServiceCertificateOrder.GetAppServiceCertificates(); + + // invoke the operation + string name = "SampleCertName1"; + NullableResponse response = await collection.GetIfExistsAsync(name); + AppServiceCertificateResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceCertificateData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Create Certificate + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateCertificate() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/CreateAppServiceCertificate.json + // this example is just showing the usage of "AppServiceCertificateOrders_CreateOrUpdateCertificate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateOrderResource created on azure + // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string certificateOrderName = "SampleCertificateOrderName"; + ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName); + AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId); + + // get the collection of this AppServiceCertificateResource + AppServiceCertificateCollection collection = appServiceCertificateOrder.GetAppServiceCertificates(); + + // invoke the operation + string name = "SampleCertName1"; + AppServiceCertificateData data = new AppServiceCertificateData(new AzureLocation("Global")) + { + KeyVaultId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), + KeyVaultSecretName = "SampleSecretName1", + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); + AppServiceCertificateResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceCertificateData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateOrderCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateOrderCollection.cs new file mode 100644 index 0000000000000..cd522972e0f27 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateOrderCollection.cs @@ -0,0 +1,217 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_AppServiceCertificateOrderCollection + { + // List App Service Certificate orders by resource group + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListAppServiceCertificateOrdersByResourceGroup() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/ListAppServiceCertificateOrdersByResourceGroup.json + // this example is just showing the usage of "AppServiceCertificateOrders_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AppServiceCertificateOrderResource + AppServiceCertificateOrderCollection collection = resourceGroupResource.GetAppServiceCertificateOrders(); + + // invoke the operation and iterate over the result + await foreach (AppServiceCertificateOrderResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceCertificateOrderData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get App Service Certificate Order + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAppServiceCertificateOrder() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/GetAppServiceCertificateOrder.json + // this example is just showing the usage of "AppServiceCertificateOrders_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AppServiceCertificateOrderResource + AppServiceCertificateOrderCollection collection = resourceGroupResource.GetAppServiceCertificateOrders(); + + // invoke the operation + string certificateOrderName = "SampleCertificateOrderName"; + AppServiceCertificateOrderResource result = await collection.GetAsync(certificateOrderName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceCertificateOrderData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get App Service Certificate Order + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetAppServiceCertificateOrder() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/GetAppServiceCertificateOrder.json + // this example is just showing the usage of "AppServiceCertificateOrders_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AppServiceCertificateOrderResource + AppServiceCertificateOrderCollection collection = resourceGroupResource.GetAppServiceCertificateOrders(); + + // invoke the operation + string certificateOrderName = "SampleCertificateOrderName"; + bool result = await collection.ExistsAsync(certificateOrderName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get App Service Certificate Order + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetAppServiceCertificateOrder() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/GetAppServiceCertificateOrder.json + // this example is just showing the usage of "AppServiceCertificateOrders_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AppServiceCertificateOrderResource + AppServiceCertificateOrderCollection collection = resourceGroupResource.GetAppServiceCertificateOrders(); + + // invoke the operation + string certificateOrderName = "SampleCertificateOrderName"; + NullableResponse response = await collection.GetIfExistsAsync(certificateOrderName); + AppServiceCertificateOrderResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceCertificateOrderData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Create Certificate order + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateCertificateOrder() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/CreateAppServiceCertificateOrder.json + // this example is just showing the usage of "AppServiceCertificateOrders_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AppServiceCertificateOrderResource + AppServiceCertificateOrderCollection collection = resourceGroupResource.GetAppServiceCertificateOrders(); + + // invoke the operation + string certificateOrderName = "SampleCertificateOrderName"; + AppServiceCertificateOrderData data = new AppServiceCertificateOrderData(new AzureLocation("Global")) + { + Certificates = +{ +["SampleCertName1"] = new AppServiceCertificateProperties() +{ +KeyVaultId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), +KeyVaultSecretName = "SampleSecretName1", +}, +["SampleCertName2"] = new AppServiceCertificateProperties() +{ +KeyVaultId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), +KeyVaultSecretName = "SampleSecretName2", +}, +}, + DistinguishedName = "CN=SampleCustomDomain.com", + ValidityInYears = 2, + KeySize = 2048, + ProductType = CertificateProductType.StandardDomainValidatedSsl, + IsAutoRenew = true, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, certificateOrderName, data); + AppServiceCertificateOrderResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceCertificateOrderData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateOrderResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateOrderResource.cs new file mode 100644 index 0000000000000..c75bbdfd42232 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateOrderResource.cs @@ -0,0 +1,405 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_AppServiceCertificateOrderResource + { + // List App Service Certificate orders by subscription + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAppServiceCertificateOrders_ListAppServiceCertificateOrdersBySubscription() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/ListAppServiceCertificateOrdersBySubscription.json + // this example is just showing the usage of "AppServiceCertificateOrders_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (AppServiceCertificateOrderResource item in subscriptionResource.GetAppServiceCertificateOrdersAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceCertificateOrderData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get App Service Certificate Order + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAppServiceCertificateOrder() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/GetAppServiceCertificateOrder.json + // this example is just showing the usage of "AppServiceCertificateOrders_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateOrderResource created on azure + // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string certificateOrderName = "SampleCertificateOrderName"; + ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName); + AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId); + + // invoke the operation + AppServiceCertificateOrderResource result = await appServiceCertificateOrder.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceCertificateOrderData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Delete App Service Certificate Order + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteAppServiceCertificateOrder() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/DeleteAppServiceCertificateOrder.json + // this example is just showing the usage of "AppServiceCertificateOrders_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateOrderResource created on azure + // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string certificateOrderName = "SampleCertificateOrderName"; + ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName); + AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId); + + // invoke the operation + await appServiceCertificateOrder.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Update Certificate order + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_UpdateCertificateOrder() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/UpdateAppServiceCertificateOrder.json + // this example is just showing the usage of "AppServiceCertificateOrders_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateOrderResource created on azure + // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string certificateOrderName = "SampleCertificateOrderName"; + ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName); + AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId); + + // invoke the operation + AppServiceCertificateOrderPatch patch = new AppServiceCertificateOrderPatch() + { + Certificates = +{ +["SampleCertName1"] = new AppServiceCertificateProperties() +{ +KeyVaultId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), +KeyVaultSecretName = "SampleSecretName1", +}, +["SampleCertName2"] = new AppServiceCertificateProperties() +{ +KeyVaultId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), +KeyVaultSecretName = "SampleSecretName2", +}, +}, + DistinguishedName = "CN=SampleCustomDomain.com", + ValidityInYears = 2, + KeySize = 2048, + ProductType = CertificateProductType.StandardDomainValidatedSsl, + IsAutoRenew = true, + }; + AppServiceCertificateOrderResource result = await appServiceCertificateOrder.UpdateAsync(patch); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceCertificateOrderData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Reissue App Service Certificate Order + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Reissue_ReissueAppServiceCertificateOrder() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/ReissueAppServiceCertificateOrder.json + // this example is just showing the usage of "AppServiceCertificateOrders_Reissue" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateOrderResource created on azure + // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string certificateOrderName = "SampleCertificateOrderName"; + ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName); + AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId); + + // invoke the operation + ReissueCertificateOrderContent content = new ReissueCertificateOrderContent() + { + KeySize = 2048, + DelayExistingRevokeInHours = 2, + Csr = "CSR1223238Value", + IsPrivateKeyExternal = false, + }; + await appServiceCertificateOrder.ReissueAsync(content); + + Console.WriteLine($"Succeeded"); + } + + // Renew App Service Certificate Order + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Renew_RenewAppServiceCertificateOrder() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/RenewAppServiceCertificateOrder.json + // this example is just showing the usage of "AppServiceCertificateOrders_Renew" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateOrderResource created on azure + // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string certificateOrderName = "SampleCertificateOrderName"; + ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName); + AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId); + + // invoke the operation + RenewCertificateOrderContent content = new RenewCertificateOrderContent() + { + KeySize = 2048, + Csr = "CSR1223238Value", + IsPrivateKeyExternal = false, + }; + await appServiceCertificateOrder.RenewAsync(content); + + Console.WriteLine($"Succeeded"); + } + + // Resend App Service Certificate Order email + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task ResendEmail_ResendAppServiceCertificateOrderEmail() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/ResendAppServiceCertificateOrderEmail.json + // this example is just showing the usage of "AppServiceCertificateOrders_ResendEmail" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateOrderResource created on azure + // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string certificateOrderName = "SampleCertificateOrderName"; + ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName); + AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId); + + // invoke the operation + await appServiceCertificateOrder.ResendEmailAsync(); + + Console.WriteLine($"Succeeded"); + } + + // Resend Domain Ownership verification email + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task ResendRequestEmails_ResendDomainOwnershipVerificationEmail() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/ResendDomainOwnershipVerificationEmail.json + // this example is just showing the usage of "AppServiceCertificateOrders_ResendRequestEmails" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateOrderResource created on azure + // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string certificateOrderName = "SampleCertificateOrderName"; + ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName); + AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId); + + // invoke the operation + AppServiceDomainNameIdentifier nameIdentifier = new AppServiceDomainNameIdentifier() + { + Name = "Domain name", + }; + await appServiceCertificateOrder.ResendRequestEmailsAsync(nameIdentifier); + + Console.WriteLine($"Succeeded"); + } + + // Retrieve Site Seal + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task RetrieveSiteSeal_RetrieveSiteSeal() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/RetrieveSiteSeal.json + // this example is just showing the usage of "AppServiceCertificateOrders_RetrieveSiteSeal" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateOrderResource created on azure + // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string certificateOrderName = "SampleCertOrder"; + ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName); + AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId); + + // invoke the operation + SiteSealContent content = new SiteSealContent() + { + IsLightTheme = true, + Locale = "en-us", + }; + SiteSeal result = await appServiceCertificateOrder.RetrieveSiteSealAsync(content); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Verify Domain Ownership + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task VerifyDomainOwnership_VerifyDomainOwnership() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/VerifyDomainOwnership.json + // this example is just showing the usage of "AppServiceCertificateOrders_VerifyDomainOwnership" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateOrderResource created on azure + // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string certificateOrderName = "SampleCertificateOrderName"; + ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName); + AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId); + + // invoke the operation + await appServiceCertificateOrder.VerifyDomainOwnershipAsync(); + + Console.WriteLine($"Succeeded"); + } + + // Retrieve Certificate Order Actions + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task RetrieveCertificateActions_RetrieveCertificateOrderActions() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/RetrieveCertificateOrderActions.json + // this example is just showing the usage of "AppServiceCertificateOrders_RetrieveCertificateActions" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateOrderResource created on azure + // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "SampleCertOrder"; + ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId); + + // invoke the operation and iterate over the result + await foreach (CertificateOrderAction item in appServiceCertificateOrder.RetrieveCertificateActionsAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Retrieve Certificate Email History + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task RetrieveCertificateEmailHistory_RetrieveCertificateEmailHistory() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/RetrieveCertificateEmailHistory.json + // this example is just showing the usage of "AppServiceCertificateOrders_RetrieveCertificateEmailHistory" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateOrderResource created on azure + // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "SampleCertOrder"; + ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId); + + // invoke the operation and iterate over the result + await foreach (AppServiceCertificateEmail item in appServiceCertificateOrder.RetrieveCertificateEmailHistoryAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateResource.cs new file mode 100644 index 0000000000000..8731fb76e4e26 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateResource.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_AppServiceCertificateResource + { + // Get App Service Certificate + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAppServiceCertificate() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/GetAppServiceCertificate.json + // this example is just showing the usage of "AppServiceCertificateOrders_GetCertificate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateResource created on azure + // for more information of creating AppServiceCertificateResource, please refer to the document of AppServiceCertificateResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string certificateOrderName = "SampleCertificateOrderName"; + string name = "SampleCertName1"; + ResourceIdentifier appServiceCertificateResourceId = AppServiceCertificateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName, name); + AppServiceCertificateResource appServiceCertificate = client.GetAppServiceCertificateResource(appServiceCertificateResourceId); + + // invoke the operation + AppServiceCertificateResource result = await appServiceCertificate.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceCertificateData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Delete App Service Certificate + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteAppServiceCertificate() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/DeleteAppServiceCertificate.json + // this example is just showing the usage of "AppServiceCertificateOrders_DeleteCertificate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateResource created on azure + // for more information of creating AppServiceCertificateResource, please refer to the document of AppServiceCertificateResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string certificateOrderName = "SampleCertificateOrderName"; + string name = "SampleCertName1"; + ResourceIdentifier appServiceCertificateResourceId = AppServiceCertificateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName, name); + AppServiceCertificateResource appServiceCertificate = client.GetAppServiceCertificateResource(appServiceCertificateResourceId); + + // invoke the operation + await appServiceCertificate.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Update Certificate + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_UpdateCertificate() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/UpdateAppServiceCertificate.json + // this example is just showing the usage of "AppServiceCertificateOrders_UpdateCertificate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceCertificateResource created on azure + // for more information of creating AppServiceCertificateResource, please refer to the document of AppServiceCertificateResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string certificateOrderName = "SampleCertificateOrderName"; + string name = "SampleCertName1"; + ResourceIdentifier appServiceCertificateResourceId = AppServiceCertificateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName, name); + AppServiceCertificateResource appServiceCertificate = client.GetAppServiceCertificateResource(appServiceCertificateResourceId); + + // invoke the operation + AppServiceCertificatePatch patch = new AppServiceCertificatePatch() + { + KeyVaultId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), + KeyVaultSecretName = "SampleSecretName1", + }; + AppServiceCertificateResource result = await appServiceCertificate.UpdateAsync(patch); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceCertificateData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceDomainCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceDomainCollection.cs new file mode 100644 index 0000000000000..c0763248e1b70 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceDomainCollection.cs @@ -0,0 +1,247 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_AppServiceDomainCollection + { + // List domains by resource group + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListDomainsByResourceGroup() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/ListDomainsByResourceGroup.json + // this example is just showing the usage of "Domains_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AppServiceDomainResource + AppServiceDomainCollection collection = resourceGroupResource.GetAppServiceDomains(); + + // invoke the operation and iterate over the result + await foreach (AppServiceDomainResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceDomainData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get Domain + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetDomain() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/GetDomain.json + // this example is just showing the usage of "Domains_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AppServiceDomainResource + AppServiceDomainCollection collection = resourceGroupResource.GetAppServiceDomains(); + + // invoke the operation + string domainName = "example.com"; + AppServiceDomainResource result = await collection.GetAsync(domainName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceDomainData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get Domain + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetDomain() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/GetDomain.json + // this example is just showing the usage of "Domains_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AppServiceDomainResource + AppServiceDomainCollection collection = resourceGroupResource.GetAppServiceDomains(); + + // invoke the operation + string domainName = "example.com"; + bool result = await collection.ExistsAsync(domainName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get Domain + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetDomain() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/GetDomain.json + // this example is just showing the usage of "Domains_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AppServiceDomainResource + AppServiceDomainCollection collection = resourceGroupResource.GetAppServiceDomains(); + + // invoke the operation + string domainName = "example.com"; + NullableResponse response = await collection.GetIfExistsAsync(domainName); + AppServiceDomainResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceDomainData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Create App Service Domain + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateAppServiceDomain() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/CreateAppServiceDomain.json + // this example is just showing the usage of "Domains_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AppServiceDomainResource + AppServiceDomainCollection collection = resourceGroupResource.GetAppServiceDomains(); + + // invoke the operation + string domainName = "example.com"; + AppServiceDomainData data = new AppServiceDomainData(new AzureLocation("global")) + { + ContactAdmin = new RegistrationContactInfo("admin@email.com", "John", "Doe", "1-245-534-2242") + { + AddressMailing = new RegistrationAddressInfo("3400 State St", "Chicago", "United States", "67098", "IL"), + Fax = "1-245-534-2242", + JobTitle = "Admin", + NameMiddle = "", + Organization = "Microsoft Inc.", + }, + ContactBilling = new RegistrationContactInfo("billing@email.com", "John", "Doe", "1-245-534-2242") + { + AddressMailing = new RegistrationAddressInfo("3400 State St", "Chicago", "United States", "67098", "IL"), + Fax = "1-245-534-2242", + JobTitle = "Billing", + NameMiddle = "", + Organization = "Microsoft Inc.", + }, + ContactRegistrant = new RegistrationContactInfo("registrant@email.com", "John", "Doe", "1-245-534-2242") + { + AddressMailing = new RegistrationAddressInfo("3400 State St", "Chicago", "United States", "67098", "IL"), + Fax = "1-245-534-2242", + JobTitle = "Registrant", + NameMiddle = "", + Organization = "Microsoft Inc.", + }, + ContactTech = new RegistrationContactInfo("tech@email.com", "John", "Doe", "1-245-534-2242") + { + AddressMailing = new RegistrationAddressInfo("3400 State St", "Chicago", "United States", "67098", "IL"), + Fax = "1-245-534-2242", + JobTitle = "Tech", + NameMiddle = "", + Organization = "Microsoft Inc.", + }, + IsDomainPrivacyEnabled = false, + IsAutoRenew = true, + Consent = new DomainPurchaseConsent() + { + AgreementKeys = +{ +"agreementKey1" +}, + AgreedBy = "192.0.2.1", + AgreedOn = DateTimeOffset.Parse("2021-09-10T19:30:53Z"), + }, + DnsType = AppServiceDnsType.DefaultDomainRegistrarDns, + AuthCode = "exampleAuthCode", + Tags = +{ +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, domainName, data); + AppServiceDomainResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceDomainData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceDomainResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceDomainResource.cs index 88c07cba0f152..1aa38cb29c0f4 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceDomainResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceDomainResource.cs @@ -9,17 +9,189 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Resources; namespace Azure.ResourceManager.AppService.Samples { public partial class Sample_AppServiceDomainResource { + // List domains by subscription + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAppServiceDomains_ListDomainsBySubscription() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/ListDomainsBySubscription.json + // this example is just showing the usage of "Domains_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (AppServiceDomainResource item in subscriptionResource.GetAppServiceDomainsAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceDomainData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get Domain + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetDomain() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/GetDomain.json + // this example is just showing the usage of "Domains_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceDomainResource created on azure + // for more information of creating AppServiceDomainResource, please refer to the document of AppServiceDomainResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string domainName = "example.com"; + ResourceIdentifier appServiceDomainResourceId = AppServiceDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName); + AppServiceDomainResource appServiceDomain = client.GetAppServiceDomainResource(appServiceDomainResourceId); + + // invoke the operation + AppServiceDomainResource result = await appServiceDomain.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceDomainData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Delete App Service Domain + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteAppServiceDomain() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/DeleteAppServiceDomain.json + // this example is just showing the usage of "Domains_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceDomainResource created on azure + // for more information of creating AppServiceDomainResource, please refer to the document of AppServiceDomainResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string domainName = "example.com"; + ResourceIdentifier appServiceDomainResourceId = AppServiceDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName); + AppServiceDomainResource appServiceDomain = client.GetAppServiceDomainResource(appServiceDomainResourceId); + + // invoke the operation + bool? forceHardDeleteDomain = true; + await appServiceDomain.DeleteAsync(WaitUntil.Completed, forceHardDeleteDomain: forceHardDeleteDomain); + + Console.WriteLine($"Succeeded"); + } + + // Update App Service Domain + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_UpdateAppServiceDomain() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/UpdateAppServiceDomain.json + // this example is just showing the usage of "Domains_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceDomainResource created on azure + // for more information of creating AppServiceDomainResource, please refer to the document of AppServiceDomainResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string domainName = "example.com"; + ResourceIdentifier appServiceDomainResourceId = AppServiceDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName); + AppServiceDomainResource appServiceDomain = client.GetAppServiceDomainResource(appServiceDomainResourceId); + + // invoke the operation + AppServiceDomainPatch patch = new AppServiceDomainPatch() + { + ContactAdmin = new RegistrationContactInfo("admin@email.com", "John", "Doe", "1-245-534-2242") + { + AddressMailing = new RegistrationAddressInfo("3400 State St", "Chicago", "United States", "67098", "IL"), + Fax = "1-245-534-2242", + JobTitle = "Admin", + NameMiddle = "", + Organization = "Microsoft Inc.", + }, + ContactBilling = new RegistrationContactInfo("billing@email.com", "John", "Doe", "1-245-534-2242") + { + AddressMailing = new RegistrationAddressInfo("3400 State St", "Chicago", "United States", "67098", "IL"), + Fax = "1-245-534-2242", + JobTitle = "Billing", + NameMiddle = "", + Organization = "Microsoft Inc.", + }, + ContactRegistrant = new RegistrationContactInfo("registrant@email.com", "John", "Doe", "1-245-534-2242") + { + AddressMailing = new RegistrationAddressInfo("3400 State St", "Chicago", "United States", "67098", "IL"), + Fax = "1-245-534-2242", + JobTitle = "Registrant", + NameMiddle = "", + Organization = "Microsoft Inc.", + }, + ContactTech = new RegistrationContactInfo("tech@email.com", "John", "Doe", "1-245-534-2242") + { + AddressMailing = new RegistrationAddressInfo("3400 State St", "Chicago", "United States", "67098", "IL"), + Fax = "1-245-534-2242", + JobTitle = "Tech", + NameMiddle = "", + Organization = "Microsoft Inc.", + }, + IsDomainPrivacyEnabled = false, + IsAutoRenew = true, + Consent = new DomainPurchaseConsent() + { + AgreementKeys = +{ +"agreementKey1" +}, + AgreedBy = "192.0.2.1", + AgreedOn = DateTimeOffset.Parse("2021-09-10T19:30:53Z"), + }, + DnsType = AppServiceDnsType.DefaultDomainRegistrarDns, + AuthCode = "exampleAuthCode", + }; + AppServiceDomainResource result = await appServiceDomain.UpdateAsync(patch); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceDomainData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + // Renew an existing domain [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Renew_RenewAnExistingDomain() { - // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-02-01/examples/RenewDomain.json + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/RenewDomain.json // this example is just showing the usage of "Domains_Renew" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -40,5 +212,36 @@ public async Task Renew_RenewAnExistingDomain() Console.WriteLine($"Succeeded"); } + + // Transfer out domain + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task TransferOut_TransferOutDomain() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/TransferOutDomain.json + // this example is just showing the usage of "Domains_TransferOut" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceDomainResource created on azure + // for more information of creating AppServiceDomainResource, please refer to the document of AppServiceDomainResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string domainName = "example.com"; + ResourceIdentifier appServiceDomainResourceId = AppServiceDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName); + AppServiceDomainResource appServiceDomain = client.GetAppServiceDomainResource(appServiceDomainResourceId); + + // invoke the operation + AppServiceDomainResource result = await appServiceDomain.TransferOutAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceDomainData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceEnvironmentCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceEnvironmentCollection.cs new file mode 100644 index 0000000000000..c631dbd9c6bdf --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceEnvironmentCollection.cs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_AppServiceEnvironmentCollection + { + // Get all App Service Environments in a resource group. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_GetAllAppServiceEnvironmentsInAResourceGroup() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_ListByResourceGroup.json + // this example is just showing the usage of "AppServiceEnvironments_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AppServiceEnvironmentResource + AppServiceEnvironmentCollection collection = resourceGroupResource.GetAppServiceEnvironments(); + + // invoke the operation and iterate over the result + await foreach (AppServiceEnvironmentResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceEnvironmentData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get the properties of an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetThePropertiesOfAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_Get.json + // this example is just showing the usage of "AppServiceEnvironments_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AppServiceEnvironmentResource + AppServiceEnvironmentCollection collection = resourceGroupResource.GetAppServiceEnvironments(); + + // invoke the operation + string name = "test-ase"; + AppServiceEnvironmentResource result = await collection.GetAsync(name); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceEnvironmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get the properties of an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetThePropertiesOfAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_Get.json + // this example is just showing the usage of "AppServiceEnvironments_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AppServiceEnvironmentResource + AppServiceEnvironmentCollection collection = resourceGroupResource.GetAppServiceEnvironments(); + + // invoke the operation + string name = "test-ase"; + bool result = await collection.ExistsAsync(name); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get the properties of an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetThePropertiesOfAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_Get.json + // this example is just showing the usage of "AppServiceEnvironments_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AppServiceEnvironmentResource + AppServiceEnvironmentCollection collection = resourceGroupResource.GetAppServiceEnvironments(); + + // invoke the operation + string name = "test-ase"; + NullableResponse response = await collection.GetIfExistsAsync(name); + AppServiceEnvironmentResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceEnvironmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Create or update an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_CreateOrUpdate.json + // this example is just showing the usage of "AppServiceEnvironments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AppServiceEnvironmentResource + AppServiceEnvironmentCollection collection = resourceGroupResource.GetAppServiceEnvironments(); + + // invoke the operation + string name = "test-ase"; + AppServiceEnvironmentData data = new AppServiceEnvironmentData(new AzureLocation("South Central US")) + { + VirtualNetwork = new AppServiceVirtualNetworkProfile(new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/delegated")), + Kind = "Asev3", + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); + AppServiceEnvironmentResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceEnvironmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceEnvironmentResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceEnvironmentResource.cs index 1337819550f72..884e49036dd01 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceEnvironmentResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceEnvironmentResource.cs @@ -10,17 +10,259 @@ using Azure.Core; using Azure.Identity; using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Resources; namespace Azure.ResourceManager.AppService.Samples { public partial class Sample_AppServiceEnvironmentResource { - // Get Inbound Network Dependencies Endpoints + // Get all App Service Environments for a subscription. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetInboundNetworkDependenciesEndpoints_GetInboundNetworkDependenciesEndpoints() + public async Task GetAppServiceEnvironments_GetAllAppServiceEnvironmentsForASubscription() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetInboundNetworkDependenciesEndpoints.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_List.json + // this example is just showing the usage of "AppServiceEnvironments_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (AppServiceEnvironmentResource item in subscriptionResource.GetAppServiceEnvironmentsAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceEnvironmentData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get the properties of an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetThePropertiesOfAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_Get.json + // this example is just showing the usage of "AppServiceEnvironments_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // invoke the operation + AppServiceEnvironmentResource result = await appServiceEnvironment.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceEnvironmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Delete an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_Delete.json + // this example is just showing the usage of "AppServiceEnvironments_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // invoke the operation + await appServiceEnvironment.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Create or update an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_CreateOrUpdateAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_Update.json + // this example is just showing the usage of "AppServiceEnvironments_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // invoke the operation + AppServiceEnvironmentPatch patch = new AppServiceEnvironmentPatch() + { + VirtualNetwork = new AppServiceVirtualNetworkProfile(new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-subnet/subnets/delegated")), + FrontEndScaleFactor = 20, + }; + AppServiceEnvironmentResource result = await appServiceEnvironment.UpdateAsync(patch); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceEnvironmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get the used, available, and total worker capacity an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetCapacities_GetTheUsedAvailableAndTotalWorkerCapacityAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_ListCapacities.json + // this example is just showing the usage of "AppServiceEnvironments_ListCapacities" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // invoke the operation and iterate over the result + await foreach (StampCapacity item in appServiceEnvironment.GetCapacitiesAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get IP addresses assigned to an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetVipInfo_GetIPAddressesAssignedToAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_GetVipInfo.json + // this example is just showing the usage of "AppServiceEnvironments_GetVipInfo" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // invoke the operation + AppServiceEnvironmentAddressResult result = await appServiceEnvironment.GetVipInfoAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get diagnostic information for an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetDiagnostics_GetDiagnosticInformationForAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_ListDiagnostics.json + // this example is just showing the usage of "AppServiceEnvironments_ListDiagnostics" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // invoke the operation and iterate over the result + await foreach (HostingEnvironmentDiagnostics item in appServiceEnvironment.GetDiagnosticsAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get a diagnostics item for an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetDiagnosticsItem_GetADiagnosticsItemForAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_GetDiagnosticsItem.json + // this example is just showing the usage of "AppServiceEnvironments_GetDiagnosticsItem" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // invoke the operation + string diagnosticsName = "test-diagnostic"; + HostingEnvironmentDiagnostics result = await appServiceEnvironment.GetDiagnosticsItemAsync(diagnosticsName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get the network endpoints of all inbound dependencies of an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetInboundNetworkDependenciesEndpoints_GetTheNetworkEndpointsOfAllInboundDependenciesOfAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetInboundNetworkDependenciesEndpoints.json // this example is just showing the usage of "AppServiceEnvironments_GetInboundNetworkDependenciesEndpoints" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -45,12 +287,96 @@ public async Task GetInboundNetworkDependenciesEndpoints_GetInboundNetworkDepend Console.WriteLine($"Succeeded"); } - // Get Outbound Network Dependencies Endpoints + // Send a test notification that an upgrade is available for this App Service Environment + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task TestUpgradeAvailableNotification_SendATestNotificationThatAnUpgradeIsAvailableForThisAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_TestUpgradeAvailableNotification.json + // this example is just showing the usage of "AppServiceEnvironments_TestUpgradeAvailableNotification" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "SampleHostingEnvironment"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // invoke the operation + await appServiceEnvironment.TestUpgradeAvailableNotificationAsync(); + + Console.WriteLine($"Succeeded"); + } + + // Initiate an upgrade on an App Service Environment + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Upgrade_InitiateAnUpgradeOnAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_Upgrade.json + // this example is just showing the usage of "AppServiceEnvironments_Upgrade" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "SampleHostingEnvironment"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // invoke the operation + await appServiceEnvironment.UpgradeAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // List all currently running operations on the App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetOperations_ListAllCurrentlyRunningOperationsOnTheAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_ListOperations.json + // this example is just showing the usage of "AppServiceEnvironments_ListOperations" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // invoke the operation and iterate over the result + await foreach (AppServiceOperation item in appServiceEnvironment.GetOperationsAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get the network endpoints of all outbound dependencies of an App Service Environment. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetOutboundNetworkDependenciesEndpoints_GetOutboundNetworkDependenciesEndpoints() + public async Task GetOutboundNetworkDependenciesEndpoints_GetTheNetworkEndpointsOfAllOutboundDependenciesOfAnAppServiceEnvironment() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetOutboundNetworkDependenciesEndpoints.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetOutboundNetworkDependenciesEndpoints.json // this example is just showing the usage of "AppServiceEnvironments_GetOutboundNetworkDependenciesEndpoints" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -74,5 +400,157 @@ public async Task GetOutboundNetworkDependenciesEndpoints_GetOutboundNetworkDepe Console.WriteLine($"Succeeded"); } + + // Gets the private link resources. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetPrivateLinkResources_GetsThePrivateLinkResources() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_GetPrivateLinkResources.json + // this example is just showing the usage of "AppServiceEnvironments_GetPrivateLinkResources" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // invoke the operation and iterate over the result + await foreach (AppServicePrivateLinkResourceData item in appServiceEnvironment.GetPrivateLinkResourcesAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Reboot all machines in an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Reboot_RebootAllMachinesInAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_Reboot.json + // this example is just showing the usage of "AppServiceEnvironments_Reboot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // invoke the operation + await appServiceEnvironment.RebootAsync(); + + Console.WriteLine($"Succeeded"); + } + + // Get all App Service plans in an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAppServicePlans_GetAllAppServicePlansInAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_ListAppServicePlans.json + // this example is just showing the usage of "AppServiceEnvironments_ListAppServicePlans" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // invoke the operation and iterate over the result + await foreach (AppServicePlanResource item in appServiceEnvironment.GetAppServicePlansAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServicePlanData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get all apps in an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAllWebAppData_GetAllAppsInAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_ListWebApps.json + // this example is just showing the usage of "AppServiceEnvironments_ListWebApps" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // invoke the operation and iterate over the result + await foreach (WebSiteData item in appServiceEnvironment.GetAllWebAppDataAsync()) + { + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {item.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get global usage metrics of an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetUsages_GetGlobalUsageMetricsOfAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_ListUsages.json + // this example is just showing the usage of "AppServiceEnvironments_ListUsages" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // invoke the operation and iterate over the result + await foreach (CsmUsageQuota item in appServiceEnvironment.GetUsagesAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServicePlanCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServicePlanCollection.cs index 0812f60ab4f53..06f5a3eed8115 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServicePlanCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServicePlanCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_AppServicePlanCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAppServicePlansByResourceGroup() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListAppServicePlansByResourceGroup.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListAppServicePlansByResourceGroup.json // this example is just showing the usage of "AppServicePlans_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ListAppServicePlansByResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppServicePlan() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetAppServicePlan.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetAppServicePlan.json // this example is just showing the usage of "AppServicePlans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_GetAppServicePlan() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppServicePlan() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetAppServicePlan.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetAppServicePlan.json // this example is just showing the usage of "AppServicePlans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -121,7 +121,7 @@ public async Task Exists_GetAppServicePlan() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppServicePlan() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetAppServicePlan.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetAppServicePlan.json // this example is just showing the usage of "AppServicePlans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +163,7 @@ public async Task GetIfExists_GetAppServicePlan() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateAppServicePlan() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/CreateOrUpdateAppServicePlan.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CreateOrUpdateAppServicePlan.json // this example is just showing the usage of "AppServicePlans_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServicePlanResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServicePlanResource.cs index dfeee5c4c25e7..653713dbc8753 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServicePlanResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServicePlanResource.cs @@ -21,7 +21,7 @@ public partial class Sample_AppServicePlanResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAppServicePlans_ListAppServicePlans() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListAppServicePlans.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListAppServicePlans.json // this example is just showing the usage of "AppServicePlans_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task GetAppServicePlans_ListAppServicePlans() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppServicePlan() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetAppServicePlan.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetAppServicePlan.json // this example is just showing the usage of "AppServicePlans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Get_GetAppServicePlan() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAppServicePlan() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/DeleteAppServicePlan.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DeleteAppServicePlan.json // this example is just showing the usage of "AppServicePlans_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -111,7 +111,7 @@ public async Task Delete_DeleteAppServicePlan() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PatchServicePlan() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/PatchAppServicePlan.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/PatchAppServicePlan.json // this example is just showing the usage of "AppServicePlans_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AseV3NetworkingConfigurationResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AseV3NetworkingConfigurationResource.cs new file mode 100644 index 0000000000000..08757dd3e2025 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AseV3NetworkingConfigurationResource.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_AseV3NetworkingConfigurationResource + { + // Get networking configuration of an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetNetworkingConfigurationOfAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_GetAseV3NetworkingConfiguration.json + // this example is just showing the usage of "AppServiceEnvironments_GetAseV3NetworkingConfiguration" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AseV3NetworkingConfigurationResource created on azure + // for more information of creating AseV3NetworkingConfigurationResource, please refer to the document of AseV3NetworkingConfigurationResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier aseV3NetworkingConfigurationResourceId = AseV3NetworkingConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AseV3NetworkingConfigurationResource aseV3NetworkingConfiguration = client.GetAseV3NetworkingConfigurationResource(aseV3NetworkingConfigurationResourceId); + + // invoke the operation + AseV3NetworkingConfigurationResource result = await aseV3NetworkingConfiguration.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AseV3NetworkingConfigurationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Update networking configuration of an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_UpdateNetworkingConfigurationOfAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_UpdateAseNetworkingConfiguration.json + // this example is just showing the usage of "AppServiceEnvironments_UpdateAseNetworkingConfiguration" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AseV3NetworkingConfigurationResource created on azure + // for more information of creating AseV3NetworkingConfigurationResource, please refer to the document of AseV3NetworkingConfigurationResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier aseV3NetworkingConfigurationResourceId = AseV3NetworkingConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AseV3NetworkingConfigurationResource aseV3NetworkingConfiguration = client.GetAseV3NetworkingConfigurationResource(aseV3NetworkingConfigurationResourceId); + + // invoke the operation + AseV3NetworkingConfigurationData data = new AseV3NetworkingConfigurationData() + { + IsFtpEnabled = true, + IsRemoteDebugEnabled = true, + }; + ArmOperation lro = await aseV3NetworkingConfiguration.CreateOrUpdateAsync(WaitUntil.Completed, data); + AseV3NetworkingConfigurationResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AseV3NetworkingConfigurationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_CertificateOrderDetectorCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_CertificateOrderDetectorCollection.cs index d7f26c3dd08bd..266a3bba1bd6b 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_CertificateOrderDetectorCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_CertificateOrderDetectorCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_CertificateOrderDetectorCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAppServiceCertificateDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2021-02-01/examples/Diagnostics_ListAppServiceCertificateOrderDetectorResponse.json + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/Diagnostics_ListAppServiceCertificateOrderDetectorResponse.json // this example is just showing the usage of "CertificateOrdersDiagnostics_ListAppServiceCertificateOrderDetectorResponse" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_ListAppServiceCertificateDetectorResponse() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppServiceCertificateOrderDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2021-02-01/examples/Diagnostics_GetAppServiceCertificateOrderDetectorResponse.json + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/Diagnostics_GetAppServiceCertificateOrderDetectorResponse.json // this example is just showing the usage of "CertificateOrdersDiagnostics_GetAppServiceCertificateOrderDetectorResponse" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_GetAppServiceCertificateOrderDetectorResponse() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppServiceCertificateOrderDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2021-02-01/examples/Diagnostics_GetAppServiceCertificateOrderDetectorResponse.json + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/Diagnostics_GetAppServiceCertificateOrderDetectorResponse.json // this example is just showing the usage of "CertificateOrdersDiagnostics_GetAppServiceCertificateOrderDetectorResponse" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Exists_GetAppServiceCertificateOrderDetectorResponse() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppServiceCertificateOrderDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2021-02-01/examples/Diagnostics_GetAppServiceCertificateOrderDetectorResponse.json + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/Diagnostics_GetAppServiceCertificateOrderDetectorResponse.json // this example is just showing the usage of "CertificateOrdersDiagnostics_GetAppServiceCertificateOrderDetectorResponse" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_CertificateOrderDetectorResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_CertificateOrderDetectorResource.cs index e2d77a52fe9eb..dbb1a1a101ecc 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_CertificateOrderDetectorResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_CertificateOrderDetectorResource.cs @@ -19,7 +19,7 @@ public partial class Sample_CertificateOrderDetectorResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppServiceCertificateOrderDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2021-02-01/examples/Diagnostics_GetAppServiceCertificateOrderDetectorResponse.json + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/Diagnostics_GetAppServiceCertificateOrderDetectorResponse.json // this example is just showing the usage of "CertificateOrdersDiagnostics_GetAppServiceCertificateOrderDetectorResponse" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_CustomDnsSuffixConfigurationResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_CustomDnsSuffixConfigurationResource.cs new file mode 100644 index 0000000000000..3dec6239065bc --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_CustomDnsSuffixConfigurationResource.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_CustomDnsSuffixConfigurationResource + { + // Get ASE custom DNS suffix configuration + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetASECustomDNSSuffixConfiguration() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetAseCustomDnsSuffixConfiguration.json + // this example is just showing the usage of "AppServiceEnvironments_GetAseCustomDnsSuffixConfiguration" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this CustomDnsSuffixConfigurationResource created on azure + // for more information of creating CustomDnsSuffixConfigurationResource, please refer to the document of CustomDnsSuffixConfigurationResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier customDnsSuffixConfigurationResourceId = CustomDnsSuffixConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + CustomDnsSuffixConfigurationResource customDnsSuffixConfiguration = client.GetCustomDnsSuffixConfigurationResource(customDnsSuffixConfigurationResourceId); + + // invoke the operation + CustomDnsSuffixConfigurationResource result = await customDnsSuffixConfiguration.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + CustomDnsSuffixConfigurationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Update ASE custom DNS suffix configuration + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_UpdateASECustomDNSSuffixConfiguration() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/UpdateAseCustomDnsSuffixConfiguration.json + // this example is just showing the usage of "AppServiceEnvironments_UpdateAseCustomDnsSuffixConfiguration" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this CustomDnsSuffixConfigurationResource created on azure + // for more information of creating CustomDnsSuffixConfigurationResource, please refer to the document of CustomDnsSuffixConfigurationResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier customDnsSuffixConfigurationResourceId = CustomDnsSuffixConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + CustomDnsSuffixConfigurationResource customDnsSuffixConfiguration = client.GetCustomDnsSuffixConfigurationResource(customDnsSuffixConfigurationResourceId); + + // invoke the operation + CustomDnsSuffixConfigurationData data = new CustomDnsSuffixConfigurationData() + { + DnsSuffix = "contoso.com", + CertificateUri = new Uri("https://test-kv.vault.azure.net/secrets/contosocert"), + KeyVaultReferenceIdentity = "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/test-rg/providers/microsoft.managedidentity/userassignedidentities/test-user-mi", + }; + ArmOperation lro = await customDnsSuffixConfiguration.CreateOrUpdateAsync(WaitUntil.Completed, data); + CustomDnsSuffixConfigurationResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + CustomDnsSuffixConfigurationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Delete ASE custom DNS suffix configuration + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteASECustomDNSSuffixConfiguration() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DeleteAseCustomDnsSuffixConfiguration.json + // this example is just showing the usage of "AppServiceEnvironments_DeleteAseCustomDnsSuffixConfiguration" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this CustomDnsSuffixConfigurationResource created on azure + // for more information of creating CustomDnsSuffixConfigurationResource, please refer to the document of CustomDnsSuffixConfigurationResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier customDnsSuffixConfigurationResourceId = CustomDnsSuffixConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + CustomDnsSuffixConfigurationResource customDnsSuffixConfiguration = client.GetCustomDnsSuffixConfigurationResource(customDnsSuffixConfigurationResourceId); + + // invoke the operation + ArmOperation lro = await customDnsSuffixConfiguration.DeleteAsync(WaitUntil.Completed); + BinaryData result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DeletedSiteCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DeletedSiteCollection.cs index 506a73ce23861..7d8e3a3e3e1a5 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DeletedSiteCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DeletedSiteCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_DeletedSiteCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDeletedWebApp() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetDeletedWebApp.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetDeletedWebApp.json // this example is just showing the usage of "Global_GetDeletedWebApp" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Get_GetDeletedWebApp() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetDeletedWebApp() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetDeletedWebApp.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetDeletedWebApp.json // this example is just showing the usage of "Global_GetDeletedWebApp" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task Exists_GetDeletedWebApp() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetDeletedWebApp() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetDeletedWebApp.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetDeletedWebApp.json // this example is just showing the usage of "Global_GetDeletedWebApp" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DeletedSiteResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DeletedSiteResource.cs index 5eabeaedeaa88..8b5719debc9b8 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DeletedSiteResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DeletedSiteResource.cs @@ -21,7 +21,7 @@ public partial class Sample_DeletedSiteResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetDeletedSitesByLocation_ListDeletedWebAppByLocation() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListDeletedWebAppsByLocation.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListDeletedWebAppsByLocation.json // this example is just showing the usage of "DeletedWebApps_ListByLocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task GetDeletedSitesByLocation_ListDeletedWebAppByLocation() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetDeletedWebAppByLocationDeletedWebApp_GetDeletedWebAppByLocation() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetDeletedWebAppByLocation.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetDeletedWebAppByLocation.json // this example is just showing the usage of "DeletedWebApps_GetDeletedWebAppByLocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task GetDeletedWebAppByLocationDeletedWebApp_GetDeletedWebAppByLoca [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDeletedWebApp() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetDeletedWebApp.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetDeletedWebApp.json // this example is just showing the usage of "Global_GetDeletedWebApp" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -115,7 +115,7 @@ public async Task Get_GetDeletedWebApp() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetDeletedWebAppSnapshots_GetDeletedWebAppSnapshots() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetDeletedWebAppSnapshots.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetDeletedWebAppSnapshots.json // this example is just showing the usage of "Global_GetDeletedWebAppSnapshots" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DomainOwnershipIdentifierCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DomainOwnershipIdentifierCollection.cs new file mode 100644 index 0000000000000..8c77d30b7a4f4 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DomainOwnershipIdentifierCollection.cs @@ -0,0 +1,203 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_DomainOwnershipIdentifierCollection + { + // List Domain Ownership Identifiers + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListDomainOwnershipIdentifiers() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/ListDomainOwnershipIdentifiers.json + // this example is just showing the usage of "Domains_ListOwnershipIdentifiers" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceDomainResource created on azure + // for more information of creating AppServiceDomainResource, please refer to the document of AppServiceDomainResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string domainName = "example.com"; + ResourceIdentifier appServiceDomainResourceId = AppServiceDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName); + AppServiceDomainResource appServiceDomain = client.GetAppServiceDomainResource(appServiceDomainResourceId); + + // get the collection of this DomainOwnershipIdentifierResource + DomainOwnershipIdentifierCollection collection = appServiceDomain.GetDomainOwnershipIdentifiers(); + + // invoke the operation and iterate over the result + await foreach (DomainOwnershipIdentifierResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DomainOwnershipIdentifierData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get Domain Ownership Identifier + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetDomainOwnershipIdentifier() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/GetDomainOwnershipIdentifier.json + // this example is just showing the usage of "Domains_GetOwnershipIdentifier" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceDomainResource created on azure + // for more information of creating AppServiceDomainResource, please refer to the document of AppServiceDomainResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string domainName = "example.com"; + ResourceIdentifier appServiceDomainResourceId = AppServiceDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName); + AppServiceDomainResource appServiceDomain = client.GetAppServiceDomainResource(appServiceDomainResourceId); + + // get the collection of this DomainOwnershipIdentifierResource + DomainOwnershipIdentifierCollection collection = appServiceDomain.GetDomainOwnershipIdentifiers(); + + // invoke the operation + string name = "SampleOwnershipId"; + DomainOwnershipIdentifierResource result = await collection.GetAsync(name); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DomainOwnershipIdentifierData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get Domain Ownership Identifier + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetDomainOwnershipIdentifier() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/GetDomainOwnershipIdentifier.json + // this example is just showing the usage of "Domains_GetOwnershipIdentifier" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceDomainResource created on azure + // for more information of creating AppServiceDomainResource, please refer to the document of AppServiceDomainResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string domainName = "example.com"; + ResourceIdentifier appServiceDomainResourceId = AppServiceDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName); + AppServiceDomainResource appServiceDomain = client.GetAppServiceDomainResource(appServiceDomainResourceId); + + // get the collection of this DomainOwnershipIdentifierResource + DomainOwnershipIdentifierCollection collection = appServiceDomain.GetDomainOwnershipIdentifiers(); + + // invoke the operation + string name = "SampleOwnershipId"; + bool result = await collection.ExistsAsync(name); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get Domain Ownership Identifier + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetDomainOwnershipIdentifier() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/GetDomainOwnershipIdentifier.json + // this example is just showing the usage of "Domains_GetOwnershipIdentifier" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceDomainResource created on azure + // for more information of creating AppServiceDomainResource, please refer to the document of AppServiceDomainResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string domainName = "example.com"; + ResourceIdentifier appServiceDomainResourceId = AppServiceDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName); + AppServiceDomainResource appServiceDomain = client.GetAppServiceDomainResource(appServiceDomainResourceId); + + // get the collection of this DomainOwnershipIdentifierResource + DomainOwnershipIdentifierCollection collection = appServiceDomain.GetDomainOwnershipIdentifiers(); + + // invoke the operation + string name = "SampleOwnershipId"; + NullableResponse response = await collection.GetIfExistsAsync(name); + DomainOwnershipIdentifierResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DomainOwnershipIdentifierData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Create App Service Domain OwnershipIdentifier + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateAppServiceDomainOwnershipIdentifier() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/CreateAppServiceDomainOwnershipIdentifier.json + // this example is just showing the usage of "Domains_CreateOrUpdateOwnershipIdentifier" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceDomainResource created on azure + // for more information of creating AppServiceDomainResource, please refer to the document of AppServiceDomainResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string domainName = "example.com"; + ResourceIdentifier appServiceDomainResourceId = AppServiceDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName); + AppServiceDomainResource appServiceDomain = client.GetAppServiceDomainResource(appServiceDomainResourceId); + + // get the collection of this DomainOwnershipIdentifierResource + DomainOwnershipIdentifierCollection collection = appServiceDomain.GetDomainOwnershipIdentifiers(); + + // invoke the operation + string name = "SampleOwnershipId"; + DomainOwnershipIdentifierData data = new DomainOwnershipIdentifierData() + { + OwnershipId = "SampleOwnershipId", + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); + DomainOwnershipIdentifierResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DomainOwnershipIdentifierData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DomainOwnershipIdentifierResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DomainOwnershipIdentifierResource.cs new file mode 100644 index 0000000000000..e1b5e3793b58a --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DomainOwnershipIdentifierResource.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_DomainOwnershipIdentifierResource + { + // Get Domain Ownership Identifier + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetDomainOwnershipIdentifier() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/GetDomainOwnershipIdentifier.json + // this example is just showing the usage of "Domains_GetOwnershipIdentifier" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DomainOwnershipIdentifierResource created on azure + // for more information of creating DomainOwnershipIdentifierResource, please refer to the document of DomainOwnershipIdentifierResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string domainName = "example.com"; + string name = "SampleOwnershipId"; + ResourceIdentifier domainOwnershipIdentifierResourceId = DomainOwnershipIdentifierResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName, name); + DomainOwnershipIdentifierResource domainOwnershipIdentifier = client.GetDomainOwnershipIdentifierResource(domainOwnershipIdentifierResourceId); + + // invoke the operation + DomainOwnershipIdentifierResource result = await domainOwnershipIdentifier.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DomainOwnershipIdentifierData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Delete App Service Domain Ownership Identifier + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteAppServiceDomainOwnershipIdentifier() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/DeleteAppServiceDomainOwnershipIdentifier.json + // this example is just showing the usage of "Domains_DeleteOwnershipIdentifier" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DomainOwnershipIdentifierResource created on azure + // for more information of creating DomainOwnershipIdentifierResource, please refer to the document of DomainOwnershipIdentifierResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string domainName = "example.com"; + string name = "ownershipIdentifier"; + ResourceIdentifier domainOwnershipIdentifierResourceId = DomainOwnershipIdentifierResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName, name); + DomainOwnershipIdentifierResource domainOwnershipIdentifier = client.GetDomainOwnershipIdentifierResource(domainOwnershipIdentifierResourceId); + + // invoke the operation + await domainOwnershipIdentifier.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Update App Service Domain OwnershipIdentifier + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_UpdateAppServiceDomainOwnershipIdentifier() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/UpdateAppServiceDomainOwnershipIdentifier.json + // this example is just showing the usage of "Domains_UpdateOwnershipIdentifier" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DomainOwnershipIdentifierResource created on azure + // for more information of creating DomainOwnershipIdentifierResource, please refer to the document of DomainOwnershipIdentifierResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string domainName = "example.com"; + string name = "SampleOwnershipId"; + ResourceIdentifier domainOwnershipIdentifierResourceId = DomainOwnershipIdentifierResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName, name); + DomainOwnershipIdentifierResource domainOwnershipIdentifier = client.GetDomainOwnershipIdentifierResource(domainOwnershipIdentifierResourceId); + + // invoke the operation + DomainOwnershipIdentifierData data = new DomainOwnershipIdentifierData() + { + OwnershipId = "SampleOwnershipId", + }; + DomainOwnershipIdentifierResource result = await domainOwnershipIdentifier.UpdateAsync(data); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DomainOwnershipIdentifierData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentDetectorCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentDetectorCollection.cs index e156e212919ec..7bb311252d9e6 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentDetectorCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentDetectorCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_HostingEnvironmentDetectorCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetAppServiceEnvironmentDetectorResponses() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListHostingEnvironmentDetectorResponses.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ListHostingEnvironmentDetectorResponses.json // this example is just showing the usage of "Diagnostics_ListHostingEnvironmentDetectorResponses" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_GetAppServiceEnvironmentDetectorResponses() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppServiceEnvironmentDetectorResponses() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetHostingEnvironmentDetectorResponse.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetHostingEnvironmentDetectorResponse.json // this example is just showing the usage of "Diagnostics_GetHostingEnvironmentDetectorResponse" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_GetAppServiceEnvironmentDetectorResponses() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppServiceEnvironmentDetectorResponses() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetHostingEnvironmentDetectorResponse.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetHostingEnvironmentDetectorResponse.json // this example is just showing the usage of "Diagnostics_GetHostingEnvironmentDetectorResponse" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Exists_GetAppServiceEnvironmentDetectorResponses() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppServiceEnvironmentDetectorResponses() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetHostingEnvironmentDetectorResponse.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetHostingEnvironmentDetectorResponse.json // this example is just showing the usage of "Diagnostics_GetHostingEnvironmentDetectorResponse" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentDetectorResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentDetectorResource.cs index 8c08a61b5a1d9..d0defde492e5b 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentDetectorResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentDetectorResource.cs @@ -19,7 +19,7 @@ public partial class Sample_HostingEnvironmentDetectorResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppServiceEnvironmentDetectorResponses() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetHostingEnvironmentDetectorResponse.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetHostingEnvironmentDetectorResponse.json // this example is just showing the usage of "Diagnostics_GetHostingEnvironmentDetectorResponse" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentMultiRolePoolResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentMultiRolePoolResource.cs new file mode 100644 index 0000000000000..7b3ef7f036969 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentMultiRolePoolResource.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_HostingEnvironmentMultiRolePoolResource + { + // Get properties of a multi-role pool. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetPropertiesOfAMultiRolePool() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_GetMultiRolePool.json + // this example is just showing the usage of "AppServiceEnvironments_GetMultiRolePool" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HostingEnvironmentMultiRolePoolResource created on azure + // for more information of creating HostingEnvironmentMultiRolePoolResource, please refer to the document of HostingEnvironmentMultiRolePoolResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier hostingEnvironmentMultiRolePoolResourceId = HostingEnvironmentMultiRolePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + HostingEnvironmentMultiRolePoolResource hostingEnvironmentMultiRolePool = client.GetHostingEnvironmentMultiRolePoolResource(hostingEnvironmentMultiRolePoolResourceId); + + // invoke the operation + HostingEnvironmentMultiRolePoolResource result = await hostingEnvironmentMultiRolePool.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceWorkerPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Create or update a multi-role pool. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateAMultiRolePool() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_CreateOrUpdateMultiRolePool.json + // this example is just showing the usage of "AppServiceEnvironments_CreateOrUpdateMultiRolePool" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HostingEnvironmentMultiRolePoolResource created on azure + // for more information of creating HostingEnvironmentMultiRolePoolResource, please refer to the document of HostingEnvironmentMultiRolePoolResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier hostingEnvironmentMultiRolePoolResourceId = HostingEnvironmentMultiRolePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + HostingEnvironmentMultiRolePoolResource hostingEnvironmentMultiRolePool = client.GetHostingEnvironmentMultiRolePoolResource(hostingEnvironmentMultiRolePoolResourceId); + + // invoke the operation + AppServiceWorkerPoolData data = new AppServiceWorkerPoolData() + { + WorkerSize = "Medium", + WorkerCount = 3, + }; + ArmOperation lro = await hostingEnvironmentMultiRolePool.CreateOrUpdateAsync(WaitUntil.Completed, data); + HostingEnvironmentMultiRolePoolResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceWorkerPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Create or update a multi-role pool. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_CreateOrUpdateAMultiRolePool() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_CreateOrUpdateMultiRolePool.json + // this example is just showing the usage of "AppServiceEnvironments_UpdateMultiRolePool" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HostingEnvironmentMultiRolePoolResource created on azure + // for more information of creating HostingEnvironmentMultiRolePoolResource, please refer to the document of HostingEnvironmentMultiRolePoolResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier hostingEnvironmentMultiRolePoolResourceId = HostingEnvironmentMultiRolePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + HostingEnvironmentMultiRolePoolResource hostingEnvironmentMultiRolePool = client.GetHostingEnvironmentMultiRolePoolResource(hostingEnvironmentMultiRolePoolResourceId); + + // invoke the operation + AppServiceWorkerPoolData data = new AppServiceWorkerPoolData() + { + WorkerSize = "Medium", + WorkerCount = 3, + }; + HostingEnvironmentMultiRolePoolResource result = await hostingEnvironmentMultiRolePool.UpdateAsync(data); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceWorkerPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get metric definitions for a specific instance of a multi-role pool of an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetMultiRolePoolInstanceMetricDefinitions_GetMetricDefinitionsForASpecificInstanceOfAMultiRolePoolOfAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_ListMultiRolePoolInstanceMetricDefinitions.json + // this example is just showing the usage of "AppServiceEnvironments_ListMultiRolePoolInstanceMetricDefinitions" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HostingEnvironmentMultiRolePoolResource created on azure + // for more information of creating HostingEnvironmentMultiRolePoolResource, please refer to the document of HostingEnvironmentMultiRolePoolResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier hostingEnvironmentMultiRolePoolResourceId = HostingEnvironmentMultiRolePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + HostingEnvironmentMultiRolePoolResource hostingEnvironmentMultiRolePool = client.GetHostingEnvironmentMultiRolePoolResource(hostingEnvironmentMultiRolePoolResourceId); + + // invoke the operation and iterate over the result + string instance = "10.7.1.8"; + await foreach (ResourceMetricDefinition item in hostingEnvironmentMultiRolePool.GetMultiRolePoolInstanceMetricDefinitionsAsync(instance)) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get metric definitions for a multi-role pool of an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetMultiRoleMetricDefinitions_GetMetricDefinitionsForAMultiRolePoolOfAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_ListMultiRoleMetricDefinitions.json + // this example is just showing the usage of "AppServiceEnvironments_ListMultiRoleMetricDefinitions" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HostingEnvironmentMultiRolePoolResource created on azure + // for more information of creating HostingEnvironmentMultiRolePoolResource, please refer to the document of HostingEnvironmentMultiRolePoolResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier hostingEnvironmentMultiRolePoolResourceId = HostingEnvironmentMultiRolePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + HostingEnvironmentMultiRolePoolResource hostingEnvironmentMultiRolePool = client.GetHostingEnvironmentMultiRolePoolResource(hostingEnvironmentMultiRolePoolResourceId); + + // invoke the operation and iterate over the result + await foreach (ResourceMetricDefinition item in hostingEnvironmentMultiRolePool.GetMultiRoleMetricDefinitionsAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get available SKUs for scaling a multi-role pool. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetMultiRolePoolSkus_GetAvailableSKUsForScalingAMultiRolePool() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_ListMultiRolePoolSkus.json + // this example is just showing the usage of "AppServiceEnvironments_ListMultiRolePoolSkus" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HostingEnvironmentMultiRolePoolResource created on azure + // for more information of creating HostingEnvironmentMultiRolePoolResource, please refer to the document of HostingEnvironmentMultiRolePoolResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier hostingEnvironmentMultiRolePoolResourceId = HostingEnvironmentMultiRolePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + HostingEnvironmentMultiRolePoolResource hostingEnvironmentMultiRolePool = client.GetHostingEnvironmentMultiRolePoolResource(hostingEnvironmentMultiRolePoolResourceId); + + // invoke the operation and iterate over the result + await foreach (AppServicePoolSkuInfo item in hostingEnvironmentMultiRolePool.GetMultiRolePoolSkusAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get usage metrics for a multi-role pool of an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetMultiRoleUsages_GetUsageMetricsForAMultiRolePoolOfAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_ListMultiRoleUsages.json + // this example is just showing the usage of "AppServiceEnvironments_ListMultiRoleUsages" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HostingEnvironmentMultiRolePoolResource created on azure + // for more information of creating HostingEnvironmentMultiRolePoolResource, please refer to the document of HostingEnvironmentMultiRolePoolResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier hostingEnvironmentMultiRolePoolResourceId = HostingEnvironmentMultiRolePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + HostingEnvironmentMultiRolePoolResource hostingEnvironmentMultiRolePool = client.GetHostingEnvironmentMultiRolePoolResource(hostingEnvironmentMultiRolePoolResourceId); + + // invoke the operation and iterate over the result + await foreach (AppServiceUsage item in hostingEnvironmentMultiRolePool.GetMultiRoleUsagesAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentPrivateEndpointConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentPrivateEndpointConnectionCollection.cs new file mode 100644 index 0000000000000..5c4d3fc020bd5 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentPrivateEndpointConnectionCollection.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_HostingEnvironmentPrivateEndpointConnectionCollection + { + // Gets the list of private endpoints associated with a hosting environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_GetsTheListOfPrivateEndpointsAssociatedWithAHostingEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_GetPrivateEndpointConnectionList.json + // this example is just showing the usage of "AppServiceEnvironments_GetPrivateEndpointConnectionList" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // get the collection of this HostingEnvironmentPrivateEndpointConnectionResource + HostingEnvironmentPrivateEndpointConnectionCollection collection = appServiceEnvironment.GetHostingEnvironmentPrivateEndpointConnections(); + + // invoke the operation and iterate over the result + await foreach (HostingEnvironmentPrivateEndpointConnectionResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + RemotePrivateEndpointConnectionARMResourceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Gets a private endpoint connection. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetsAPrivateEndpointConnection() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_GetPrivateEndpointConnection.json + // this example is just showing the usage of "AppServiceEnvironments_GetPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // get the collection of this HostingEnvironmentPrivateEndpointConnectionResource + HostingEnvironmentPrivateEndpointConnectionCollection collection = appServiceEnvironment.GetHostingEnvironmentPrivateEndpointConnections(); + + // invoke the operation + string privateEndpointConnectionName = "fa38656c-034e-43d8-adce-fe06ce039c98"; + HostingEnvironmentPrivateEndpointConnectionResource result = await collection.GetAsync(privateEndpointConnectionName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + RemotePrivateEndpointConnectionARMResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Gets a private endpoint connection. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetsAPrivateEndpointConnection() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_GetPrivateEndpointConnection.json + // this example is just showing the usage of "AppServiceEnvironments_GetPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // get the collection of this HostingEnvironmentPrivateEndpointConnectionResource + HostingEnvironmentPrivateEndpointConnectionCollection collection = appServiceEnvironment.GetHostingEnvironmentPrivateEndpointConnections(); + + // invoke the operation + string privateEndpointConnectionName = "fa38656c-034e-43d8-adce-fe06ce039c98"; + bool result = await collection.ExistsAsync(privateEndpointConnectionName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Gets a private endpoint connection. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetsAPrivateEndpointConnection() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_GetPrivateEndpointConnection.json + // this example is just showing the usage of "AppServiceEnvironments_GetPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // get the collection of this HostingEnvironmentPrivateEndpointConnectionResource + HostingEnvironmentPrivateEndpointConnectionCollection collection = appServiceEnvironment.GetHostingEnvironmentPrivateEndpointConnections(); + + // invoke the operation + string privateEndpointConnectionName = "fa38656c-034e-43d8-adce-fe06ce039c98"; + NullableResponse response = await collection.GetIfExistsAsync(privateEndpointConnectionName); + HostingEnvironmentPrivateEndpointConnectionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + RemotePrivateEndpointConnectionARMResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Approves or rejects a private endpoint connection. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_ApprovesOrRejectsAPrivateEndpointConnection() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_ApproveOrRejectPrivateEndpointConnection.json + // this example is just showing the usage of "AppServiceEnvironments_ApproveOrRejectPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // get the collection of this HostingEnvironmentPrivateEndpointConnectionResource + HostingEnvironmentPrivateEndpointConnectionCollection collection = appServiceEnvironment.GetHostingEnvironmentPrivateEndpointConnections(); + + // invoke the operation + string privateEndpointConnectionName = "fa38656c-034e-43d8-adce-fe06ce039c98"; + RemotePrivateEndpointConnectionARMResourceData data = new RemotePrivateEndpointConnectionARMResourceData() + { + PrivateLinkServiceConnectionState = new PrivateLinkConnectionState() + { + Status = "Approved", + Description = "Approved by johndoe@company.com", + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, privateEndpointConnectionName, data); + HostingEnvironmentPrivateEndpointConnectionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + RemotePrivateEndpointConnectionARMResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentPrivateEndpointConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentPrivateEndpointConnectionResource.cs new file mode 100644 index 0000000000000..89da0d5a1e019 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentPrivateEndpointConnectionResource.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_HostingEnvironmentPrivateEndpointConnectionResource + { + // Gets a private endpoint connection. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetsAPrivateEndpointConnection() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_GetPrivateEndpointConnection.json + // this example is just showing the usage of "AppServiceEnvironments_GetPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HostingEnvironmentPrivateEndpointConnectionResource created on azure + // for more information of creating HostingEnvironmentPrivateEndpointConnectionResource, please refer to the document of HostingEnvironmentPrivateEndpointConnectionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + string privateEndpointConnectionName = "fa38656c-034e-43d8-adce-fe06ce039c98"; + ResourceIdentifier hostingEnvironmentPrivateEndpointConnectionResourceId = HostingEnvironmentPrivateEndpointConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, privateEndpointConnectionName); + HostingEnvironmentPrivateEndpointConnectionResource hostingEnvironmentPrivateEndpointConnection = client.GetHostingEnvironmentPrivateEndpointConnectionResource(hostingEnvironmentPrivateEndpointConnectionResourceId); + + // invoke the operation + HostingEnvironmentPrivateEndpointConnectionResource result = await hostingEnvironmentPrivateEndpointConnection.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + RemotePrivateEndpointConnectionARMResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Approves or rejects a private endpoint connection. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_ApprovesOrRejectsAPrivateEndpointConnection() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_ApproveOrRejectPrivateEndpointConnection.json + // this example is just showing the usage of "AppServiceEnvironments_ApproveOrRejectPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HostingEnvironmentPrivateEndpointConnectionResource created on azure + // for more information of creating HostingEnvironmentPrivateEndpointConnectionResource, please refer to the document of HostingEnvironmentPrivateEndpointConnectionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + string privateEndpointConnectionName = "fa38656c-034e-43d8-adce-fe06ce039c98"; + ResourceIdentifier hostingEnvironmentPrivateEndpointConnectionResourceId = HostingEnvironmentPrivateEndpointConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, privateEndpointConnectionName); + HostingEnvironmentPrivateEndpointConnectionResource hostingEnvironmentPrivateEndpointConnection = client.GetHostingEnvironmentPrivateEndpointConnectionResource(hostingEnvironmentPrivateEndpointConnectionResourceId); + + // invoke the operation + RemotePrivateEndpointConnectionARMResourceData data = new RemotePrivateEndpointConnectionARMResourceData() + { + PrivateLinkServiceConnectionState = new PrivateLinkConnectionState() + { + Status = "Approved", + Description = "Approved by johndoe@company.com", + }, + }; + ArmOperation lro = await hostingEnvironmentPrivateEndpointConnection.UpdateAsync(WaitUntil.Completed, data); + HostingEnvironmentPrivateEndpointConnectionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + RemotePrivateEndpointConnectionARMResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Deletes a private endpoint connection. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeletesAPrivateEndpointConnection() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_DeletePrivateEndpointConnection.json + // this example is just showing the usage of "AppServiceEnvironments_DeletePrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HostingEnvironmentPrivateEndpointConnectionResource created on azure + // for more information of creating HostingEnvironmentPrivateEndpointConnectionResource, please refer to the document of HostingEnvironmentPrivateEndpointConnectionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + string privateEndpointConnectionName = "fa38656c-034e-43d8-adce-fe06ce039c98"; + ResourceIdentifier hostingEnvironmentPrivateEndpointConnectionResourceId = HostingEnvironmentPrivateEndpointConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, privateEndpointConnectionName); + HostingEnvironmentPrivateEndpointConnectionResource hostingEnvironmentPrivateEndpointConnection = client.GetHostingEnvironmentPrivateEndpointConnectionResource(hostingEnvironmentPrivateEndpointConnectionResourceId); + + // invoke the operation + ArmOperation lro = await hostingEnvironmentPrivateEndpointConnection.DeleteAsync(WaitUntil.Completed); + BinaryData result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentWorkerPoolCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentWorkerPoolCollection.cs new file mode 100644 index 0000000000000..7396b3db2faa3 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentWorkerPoolCollection.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_HostingEnvironmentWorkerPoolCollection + { + // Get all worker pools of an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_GetAllWorkerPoolsOfAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_ListWorkerPools.json + // this example is just showing the usage of "AppServiceEnvironments_ListWorkerPools" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // get the collection of this HostingEnvironmentWorkerPoolResource + HostingEnvironmentWorkerPoolCollection collection = appServiceEnvironment.GetHostingEnvironmentWorkerPools(); + + // invoke the operation and iterate over the result + await foreach (HostingEnvironmentWorkerPoolResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceWorkerPoolData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get properties of a worker pool. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetPropertiesOfAWorkerPool() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_GetWorkerPool.json + // this example is just showing the usage of "AppServiceEnvironments_GetWorkerPool" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // get the collection of this HostingEnvironmentWorkerPoolResource + HostingEnvironmentWorkerPoolCollection collection = appServiceEnvironment.GetHostingEnvironmentWorkerPools(); + + // invoke the operation + string workerPoolName = "workerPool1"; + HostingEnvironmentWorkerPoolResource result = await collection.GetAsync(workerPoolName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceWorkerPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get properties of a worker pool. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetPropertiesOfAWorkerPool() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_GetWorkerPool.json + // this example is just showing the usage of "AppServiceEnvironments_GetWorkerPool" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // get the collection of this HostingEnvironmentWorkerPoolResource + HostingEnvironmentWorkerPoolCollection collection = appServiceEnvironment.GetHostingEnvironmentWorkerPools(); + + // invoke the operation + string workerPoolName = "workerPool1"; + bool result = await collection.ExistsAsync(workerPoolName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get properties of a worker pool. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetPropertiesOfAWorkerPool() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_GetWorkerPool.json + // this example is just showing the usage of "AppServiceEnvironments_GetWorkerPool" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // get the collection of this HostingEnvironmentWorkerPoolResource + HostingEnvironmentWorkerPoolCollection collection = appServiceEnvironment.GetHostingEnvironmentWorkerPools(); + + // invoke the operation + string workerPoolName = "workerPool1"; + NullableResponse response = await collection.GetIfExistsAsync(workerPoolName); + HostingEnvironmentWorkerPoolResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceWorkerPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Get properties of a worker pool. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_GetPropertiesOfAWorkerPool() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_CreateOrUpdateWorkerPool.json + // this example is just showing the usage of "AppServiceEnvironments_CreateOrUpdateWorkerPool" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AppServiceEnvironmentResource created on azure + // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId); + + // get the collection of this HostingEnvironmentWorkerPoolResource + HostingEnvironmentWorkerPoolCollection collection = appServiceEnvironment.GetHostingEnvironmentWorkerPools(); + + // invoke the operation + string workerPoolName = "0"; + AppServiceWorkerPoolData data = new AppServiceWorkerPoolData() + { + WorkerSize = "Small", + WorkerCount = 3, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, workerPoolName, data); + HostingEnvironmentWorkerPoolResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceWorkerPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentWorkerPoolResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentWorkerPoolResource.cs new file mode 100644 index 0000000000000..f4b460ae2698f --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentWorkerPoolResource.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_HostingEnvironmentWorkerPoolResource + { + // Get properties of a worker pool. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetPropertiesOfAWorkerPool() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_GetWorkerPool.json + // this example is just showing the usage of "AppServiceEnvironments_GetWorkerPool" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HostingEnvironmentWorkerPoolResource created on azure + // for more information of creating HostingEnvironmentWorkerPoolResource, please refer to the document of HostingEnvironmentWorkerPoolResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + string workerPoolName = "workerPool1"; + ResourceIdentifier hostingEnvironmentWorkerPoolResourceId = HostingEnvironmentWorkerPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workerPoolName); + HostingEnvironmentWorkerPoolResource hostingEnvironmentWorkerPool = client.GetHostingEnvironmentWorkerPoolResource(hostingEnvironmentWorkerPoolResourceId); + + // invoke the operation + HostingEnvironmentWorkerPoolResource result = await hostingEnvironmentWorkerPool.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceWorkerPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get properties of a worker pool. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_GetPropertiesOfAWorkerPool() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_CreateOrUpdateWorkerPool.json + // this example is just showing the usage of "AppServiceEnvironments_UpdateWorkerPool" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HostingEnvironmentWorkerPoolResource created on azure + // for more information of creating HostingEnvironmentWorkerPoolResource, please refer to the document of HostingEnvironmentWorkerPoolResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + string workerPoolName = "0"; + ResourceIdentifier hostingEnvironmentWorkerPoolResourceId = HostingEnvironmentWorkerPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workerPoolName); + HostingEnvironmentWorkerPoolResource hostingEnvironmentWorkerPool = client.GetHostingEnvironmentWorkerPoolResource(hostingEnvironmentWorkerPoolResourceId); + + // invoke the operation + AppServiceWorkerPoolData data = new AppServiceWorkerPoolData() + { + WorkerSize = "Small", + WorkerCount = 3, + }; + HostingEnvironmentWorkerPoolResource result = await hostingEnvironmentWorkerPool.UpdateAsync(data); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AppServiceWorkerPoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get metric definitions for a specific instance of a worker pool of an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetWorkerPoolInstanceMetricDefinitions_GetMetricDefinitionsForASpecificInstanceOfAWorkerPoolOfAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_ListWorkerPoolInstanceMetricDefinitions.json + // this example is just showing the usage of "AppServiceEnvironments_ListWorkerPoolInstanceMetricDefinitions" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HostingEnvironmentWorkerPoolResource created on azure + // for more information of creating HostingEnvironmentWorkerPoolResource, please refer to the document of HostingEnvironmentWorkerPoolResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + string workerPoolName = "0"; + ResourceIdentifier hostingEnvironmentWorkerPoolResourceId = HostingEnvironmentWorkerPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workerPoolName); + HostingEnvironmentWorkerPoolResource hostingEnvironmentWorkerPool = client.GetHostingEnvironmentWorkerPoolResource(hostingEnvironmentWorkerPoolResourceId); + + // invoke the operation and iterate over the result + string instance = "10.8.0.7"; + await foreach (ResourceMetricDefinition item in hostingEnvironmentWorkerPool.GetWorkerPoolInstanceMetricDefinitionsAsync(instance)) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get metric definitions for a worker pool of an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetWebWorkerMetricDefinitions_GetMetricDefinitionsForAWorkerPoolOfAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_ListWebWorkerMetricDefinitions.json + // this example is just showing the usage of "AppServiceEnvironments_ListWebWorkerMetricDefinitions" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HostingEnvironmentWorkerPoolResource created on azure + // for more information of creating HostingEnvironmentWorkerPoolResource, please refer to the document of HostingEnvironmentWorkerPoolResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + string workerPoolName = "0"; + ResourceIdentifier hostingEnvironmentWorkerPoolResourceId = HostingEnvironmentWorkerPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workerPoolName); + HostingEnvironmentWorkerPoolResource hostingEnvironmentWorkerPool = client.GetHostingEnvironmentWorkerPoolResource(hostingEnvironmentWorkerPoolResourceId); + + // invoke the operation and iterate over the result + await foreach (ResourceMetricDefinition item in hostingEnvironmentWorkerPool.GetWebWorkerMetricDefinitionsAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get available SKUs for scaling a worker pool. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetWorkerPoolSkus_GetAvailableSKUsForScalingAWorkerPool() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_ListWorkerPoolSkus.json + // this example is just showing the usage of "AppServiceEnvironments_ListWorkerPoolSkus" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HostingEnvironmentWorkerPoolResource created on azure + // for more information of creating HostingEnvironmentWorkerPoolResource, please refer to the document of HostingEnvironmentWorkerPoolResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + string workerPoolName = "workerPool1"; + ResourceIdentifier hostingEnvironmentWorkerPoolResourceId = HostingEnvironmentWorkerPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workerPoolName); + HostingEnvironmentWorkerPoolResource hostingEnvironmentWorkerPool = client.GetHostingEnvironmentWorkerPoolResource(hostingEnvironmentWorkerPoolResourceId); + + // invoke the operation and iterate over the result + await foreach (AppServicePoolSkuInfo item in hostingEnvironmentWorkerPool.GetWorkerPoolSkusAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get usage metrics for a worker pool of an App Service Environment. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetWebWorkerUsages_GetUsageMetricsForAWorkerPoolOfAnAppServiceEnvironment() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AppServiceEnvironments_ListWebWorkerUsages.json + // this example is just showing the usage of "AppServiceEnvironments_ListWebWorkerUsages" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HostingEnvironmentWorkerPoolResource created on azure + // for more information of creating HostingEnvironmentWorkerPoolResource, please refer to the document of HostingEnvironmentWorkerPoolResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-rg"; + string name = "test-ase"; + string workerPoolName = "0"; + ResourceIdentifier hostingEnvironmentWorkerPoolResourceId = HostingEnvironmentWorkerPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workerPoolName); + HostingEnvironmentWorkerPoolResource hostingEnvironmentWorkerPool = client.GetHostingEnvironmentWorkerPoolResource(hostingEnvironmentWorkerPoolResourceId); + + // invoke the operation and iterate over the result + await foreach (AppServiceUsage item in hostingEnvironmentWorkerPool.GetWebWorkerUsagesAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_KubeEnvironmentCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_KubeEnvironmentCollection.cs index 88c6659686180..f17ba3903342f 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_KubeEnvironmentCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_KubeEnvironmentCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_KubeEnvironmentCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListKubeEnvironmentsByResourceGroup() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/KubeEnvironments_ListByResourceGroup.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/KubeEnvironments_ListByResourceGroup.json // this example is just showing the usage of "KubeEnvironments_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_ListKubeEnvironmentsByResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetKubeEnvironmentsByName() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/KubeEnvironments_Get.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/KubeEnvironments_Get.json // this example is just showing the usage of "KubeEnvironments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,7 +90,7 @@ public async Task Get_GetKubeEnvironmentsByName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetKubeEnvironmentsByName() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/KubeEnvironments_Get.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/KubeEnvironments_Get.json // this example is just showing the usage of "KubeEnvironments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +120,7 @@ public async Task Exists_GetKubeEnvironmentsByName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetKubeEnvironmentsByName() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/KubeEnvironments_Get.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/KubeEnvironments_Get.json // this example is just showing the usage of "KubeEnvironments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -162,7 +162,7 @@ public async Task GetIfExists_GetKubeEnvironmentsByName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateKubeEnvironments() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/KubeEnvironments_CreateOrUpdate.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/KubeEnvironments_CreateOrUpdate.json // this example is just showing the usage of "KubeEnvironments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_KubeEnvironmentResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_KubeEnvironmentResource.cs index 6df8e08220bff..b711c90418dce 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_KubeEnvironmentResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_KubeEnvironmentResource.cs @@ -21,7 +21,7 @@ public partial class Sample_KubeEnvironmentResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetKubeEnvironments_ListKubeEnvironmentsBySubscription() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/KubeEnvironments_ListBySubscription.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/KubeEnvironments_ListBySubscription.json // this example is just showing the usage of "KubeEnvironments_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task GetKubeEnvironments_ListKubeEnvironmentsBySubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetKubeEnvironmentsByName() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/KubeEnvironments_Get.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/KubeEnvironments_Get.json // this example is just showing the usage of "KubeEnvironments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Get_GetKubeEnvironmentsByName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteKubeEnvironmentByName() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/KubeEnvironments_Delete.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/KubeEnvironments_Delete.json // this example is just showing the usage of "KubeEnvironments_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -111,7 +111,7 @@ public async Task Delete_DeleteKubeEnvironmentByName() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateKubeEnvironments() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/KubeEnvironments_Update.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/KubeEnvironments_Update.json // this example is just showing the usage of "KubeEnvironments_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs index 965ea13989e8f..1d5f77a046579 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs @@ -20,7 +20,7 @@ public partial class Sample_ResourceGroupResourceExtensions [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAllResourceHealthMetadataData_ListResourceHealthMetadataForAResourceGroup() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListResourceHealthMetadataByResourceGroup.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListResourceHealthMetadataByResourceGroup.json // this example is just showing the usage of "ResourceHealthMetadata_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ScmSiteBasicPublishingCredentialsPolicyResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ScmSiteBasicPublishingCredentialsPolicyResource.cs index f14a6d120ba6f..dbc539394344c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ScmSiteBasicPublishingCredentialsPolicyResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ScmSiteBasicPublishingCredentialsPolicyResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ScmSiteBasicPublishingCredentialsPolicyResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSCMAllowed() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetPublishingCredentialsPolicy.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetPublishingCredentialsPolicy.json // this example is just showing the usage of "WebApps_GetScmAllowed" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_GetSCMAllowed() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_UpdateSCMAllowed() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/UpdatePublishingCredentialsPolicy.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/UpdatePublishingCredentialsPolicy.json // this example is just showing the usage of "WebApps_UpdateScmAllowed" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ScmSiteSlotBasicPublishingCredentialsPolicyResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ScmSiteSlotBasicPublishingCredentialsPolicyResource.cs index 6aae22f83557f..a628b6049a3a0 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ScmSiteSlotBasicPublishingCredentialsPolicyResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ScmSiteSlotBasicPublishingCredentialsPolicyResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ScmSiteSlotBasicPublishingCredentialsPolicyResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSCMAllowed() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetPublishingCredentialsPolicySlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetPublishingCredentialsPolicySlot.json // this example is just showing the usage of "WebApps_GetScmAllowedSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_GetSCMAllowed() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_UpdateSCMAllowed() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/UpdatePublishingCredentialsPolicySlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/UpdatePublishingCredentialsPolicySlot.json // this example is just showing the usage of "WebApps_UpdateScmAllowedSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteBackupCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteBackupCollection.cs new file mode 100644 index 0000000000000..d3119738bd2b9 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteBackupCollection.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_SiteBackupCollection + { + // List web app backups + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListWebAppBackups() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListWebAppBackups.json + // this example is just showing the usage of "WebApps_ListBackups" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this SiteBackupResource + SiteBackupCollection collection = webSite.GetSiteBackups(); + + // invoke the operation and iterate over the result + await foreach (SiteBackupResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppBackupData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get web app backup + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetWebAppBackup() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebAppBackup.json + // this example is just showing the usage of "WebApps_GetBackupStatus" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this SiteBackupResource + SiteBackupCollection collection = webSite.GetSiteBackups(); + + // invoke the operation + string backupId = "12345"; + SiteBackupResource result = await collection.GetAsync(backupId); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppBackupData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get web app backup + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetWebAppBackup() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebAppBackup.json + // this example is just showing the usage of "WebApps_GetBackupStatus" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this SiteBackupResource + SiteBackupCollection collection = webSite.GetSiteBackups(); + + // invoke the operation + string backupId = "12345"; + bool result = await collection.ExistsAsync(backupId); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get web app backup + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetWebAppBackup() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebAppBackup.json + // this example is just showing the usage of "WebApps_GetBackupStatus" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this SiteBackupResource + SiteBackupCollection collection = webSite.GetSiteBackups(); + + // invoke the operation + string backupId = "12345"; + NullableResponse response = await collection.GetIfExistsAsync(backupId); + SiteBackupResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppBackupData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteBackupResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteBackupResource.cs new file mode 100644 index 0000000000000..156a605d1aa4e --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteBackupResource.cs @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_SiteBackupResource + { + // Get web app backup + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetWebAppBackup() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebAppBackup.json + // this example is just showing the usage of "WebApps_GetBackupStatus" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SiteBackupResource created on azure + // for more information of creating SiteBackupResource, please refer to the document of SiteBackupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + string backupId = "12345"; + ResourceIdentifier siteBackupResourceId = SiteBackupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, backupId); + SiteBackupResource siteBackup = client.GetSiteBackupResource(siteBackupResourceId); + + // invoke the operation + SiteBackupResource result = await siteBackup.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppBackupData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Delete web app backup + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteWebAppBackup() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DeleteWebAppBackup.json + // this example is just showing the usage of "WebApps_DeleteBackup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SiteBackupResource created on azure + // for more information of creating SiteBackupResource, please refer to the document of SiteBackupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + string backupId = "12345"; + ResourceIdentifier siteBackupResourceId = SiteBackupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, backupId); + SiteBackupResource siteBackup = client.GetSiteBackupResource(siteBackupResourceId); + + // invoke the operation + await siteBackup.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Get web app backup with secrets + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetBackupStatusSecrets_GetWebAppBackupWithSecrets() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebAppBackupWithSecrets.json + // this example is just showing the usage of "WebApps_ListBackupStatusSecrets" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SiteBackupResource created on azure + // for more information of creating SiteBackupResource, please refer to the document of SiteBackupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + string backupId = "12345"; + ResourceIdentifier siteBackupResourceId = SiteBackupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, backupId); + SiteBackupResource siteBackup = client.GetSiteBackupResource(siteBackupResourceId); + + // invoke the operation + WebAppBackupInfo info = new WebAppBackupInfo() + { + BackupName = "abcdwe", + IsEnabled = true, + StorageAccountUri = new Uri("DefaultEndpointsProtocol=https;AccountName=storagesample;AccountKey="), + BackupSchedule = new WebAppBackupSchedule(7, BackupFrequencyUnit.Day, true, 30) + { + StartOn = DateTimeOffset.Parse("2022-09-02T17:33:11.641Z"), + }, + Databases = +{ +new AppServiceDatabaseBackupSetting(AppServiceDatabaseType.SqlAzure) +{ +Name = "backenddb", +ConnectionStringName = "backend", +ConnectionString = "DSN=data-source-name[;SERVER=value] [;PWD=value] [;UID=value] [;=]", +},new AppServiceDatabaseBackupSetting(AppServiceDatabaseType.SqlAzure) +{ +Name = "statsdb", +ConnectionStringName = "stats", +ConnectionString = "DSN=data-source-name[;SERVER=value] [;PWD=value] [;UID=value] [;=]", +} +}, + }; + SiteBackupResource result = await siteBackup.GetBackupStatusSecretsAsync(info); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppBackupData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Restore web app from backup + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Restore_RestoreWebAppFromBackup() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/RestoreWebAppBackup.json + // this example is just showing the usage of "WebApps_Restore" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SiteBackupResource created on azure + // for more information of creating SiteBackupResource, please refer to the document of SiteBackupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + string backupId = "123244"; + ResourceIdentifier siteBackupResourceId = SiteBackupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, backupId); + SiteBackupResource siteBackup = client.GetSiteBackupResource(siteBackupResourceId); + + // invoke the operation + RestoreRequestInfo info = new RestoreRequestInfo() + { + StorageAccountUri = new Uri("DefaultEndpointsProtocol=https;AccountName=storagesample;AccountKey="), + CanOverwrite = true, + SiteName = "sitef6141", + Databases = +{ +new AppServiceDatabaseBackupSetting(AppServiceDatabaseType.SqlAzure) +{ +Name = "backenddb", +ConnectionStringName = "backend", +ConnectionString = "DSN=data-source-name[;SERVER=value] [;PWD=value] [;UID=value] [;=]", +},new AppServiceDatabaseBackupSetting(AppServiceDatabaseType.SqlAzure) +{ +Name = "statsdb", +ConnectionStringName = "stats", +ConnectionString = "DSN=data-source-name[;SERVER=value] [;PWD=value] [;UID=value] [;=]", +} +}, + }; + await siteBackup.RestoreAsync(WaitUntil.Completed, info); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteConfigAppsettingCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteConfigAppsettingCollection.cs index 2f6e420c28161..94420b9951802 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteConfigAppsettingCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteConfigAppsettingCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SiteConfigAppsettingCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetAzureKeyVaultReferencesForAppSettings() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetKeyVaultReferencesForAppSettings.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetKeyVaultReferencesForAppSettings.json // this example is just showing the usage of "WebApps_GetAppSettingsKeyVaultReferences" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_GetAzureKeyVaultReferencesForAppSettings() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAzureKeyVaultAppSettingReference() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetKeyVaultReferencesForAppSetting.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetKeyVaultReferencesForAppSetting.json // this example is just showing the usage of "WebApps_GetAppSettingKeyVaultReference" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_GetAzureKeyVaultAppSettingReference() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAzureKeyVaultAppSettingReference() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetKeyVaultReferencesForAppSetting.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetKeyVaultReferencesForAppSetting.json // this example is just showing the usage of "WebApps_GetAppSettingKeyVaultReference" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Exists_GetAzureKeyVaultAppSettingReference() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAzureKeyVaultAppSettingReference() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetKeyVaultReferencesForAppSetting.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetKeyVaultReferencesForAppSetting.json // this example is just showing the usage of "WebApps_GetAppSettingKeyVaultReference" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteConfigAppsettingResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteConfigAppsettingResource.cs index b2cbbf3fc4258..95f020252ae1e 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteConfigAppsettingResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteConfigAppsettingResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SiteConfigAppsettingResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAzureKeyVaultAppSettingReference() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetKeyVaultReferencesForAppSetting.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetKeyVaultReferencesForAppSetting.json // this example is just showing the usage of "WebApps_GetAppSettingKeyVaultReference" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDetectorCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDetectorCollection.cs index aaad52320efa7..98f8d08df3cc0 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDetectorCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDetectorCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SiteDetectorCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetAppDetectorResponses() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteDetectorResponses.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ListSiteDetectorResponses.json // this example is just showing the usage of "Diagnostics_ListSiteDetectorResponses" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_GetAppDetectorResponses() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetAppSlotDetectorResponses() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteDetectorResponsesSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ListSiteDetectorResponsesSlot.json // this example is just showing the usage of "Diagnostics_ListSiteDetectorResponses" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task GetAll_GetAppSlotDetectorResponses() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponse.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorResponse.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorResponse" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,7 +128,7 @@ public async Task Get_GetAppDetectorResponse() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponse.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorResponse.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorResponse" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -159,7 +159,7 @@ public async Task Exists_GetAppDetectorResponse() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponse.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorResponse.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorResponse" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -202,7 +202,7 @@ public async Task GetIfExists_GetAppDetectorResponse() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppSlotDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorResponse" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -237,7 +237,7 @@ public async Task Get_GetAppSlotDetectorResponse() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppSlotDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorResponse" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -268,7 +268,7 @@ public async Task Exists_GetAppSlotDetectorResponse() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppSlotDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorResponse" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDetectorResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDetectorResource.cs index 8d90406e90778..cf9c52a03a4f6 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDetectorResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDetectorResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SiteDetectorResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponse.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorResponse.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorResponse" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_GetAppDetectorResponse() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppSlotDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorResponse" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticAnalysisCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticAnalysisCollection.cs index 8567e699bd1a2..321f6c07873ab 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticAnalysisCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticAnalysisCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SiteDiagnosticAnalysisCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAppAnalyses() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteAnalyses.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ListSiteAnalyses.json // this example is just showing the usage of "Diagnostics_ListSiteAnalyses" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ListAppAnalyses() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAppSlotAnalyses() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteAnalysesSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ListSiteAnalysesSlot.json // this example is just showing the usage of "Diagnostics_ListSiteAnalyses" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task GetAll_ListAppSlotAnalyses() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysis.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteAnalysis.json // this example is just showing the usage of "Diagnostics_GetSiteAnalysis" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -131,7 +131,7 @@ public async Task Get_GetAppAnalysis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysis.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteAnalysis.json // this example is just showing the usage of "Diagnostics_GetSiteAnalysis" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +163,7 @@ public async Task Exists_GetAppAnalysis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysis.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteAnalysis.json // this example is just showing the usage of "Diagnostics_GetSiteAnalysis" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -207,7 +207,7 @@ public async Task GetIfExists_GetAppAnalysis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppSlotAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysisSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteAnalysisSlot.json // this example is just showing the usage of "Diagnostics_GetSiteAnalysis" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -243,7 +243,7 @@ public async Task Get_GetAppSlotAnalysis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppSlotAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysisSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteAnalysisSlot.json // this example is just showing the usage of "Diagnostics_GetSiteAnalysis" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -275,7 +275,7 @@ public async Task Exists_GetAppSlotAnalysis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppSlotAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysisSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteAnalysisSlot.json // this example is just showing the usage of "Diagnostics_GetSiteAnalysis" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticAnalysisResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticAnalysisResource.cs index 8af543b2081a6..025efedc3dd43 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticAnalysisResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticAnalysisResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SiteDiagnosticAnalysisResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysis.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteAnalysis.json // this example is just showing the usage of "Diagnostics_GetSiteAnalysis" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Get_GetAppAnalysis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppSlotAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysisSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteAnalysisSlot.json // this example is just showing the usage of "Diagnostics_GetSiteAnalysis" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Get_GetAppSlotAnalysis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Execute_ExecuteSiteAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ExecuteSiteAnalysis.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ExecuteSiteAnalysis.json // this example is just showing the usage of "Diagnostics_ExecuteSiteAnalysis" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -115,7 +115,7 @@ public async Task Execute_ExecuteSiteAnalysis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Execute_ExecuteSiteSlotAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ExecuteSiteAnalysisSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ExecuteSiteAnalysisSlot.json // this example is just showing the usage of "Diagnostics_ExecuteSiteAnalysis" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticCollection.cs index 98faeaf8c19b4..4a26e6680fc54 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SiteDiagnosticCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAppDiagnosticCategories() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteDiagnosticCategories.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ListSiteDiagnosticCategories.json // this example is just showing the usage of "Diagnostics_ListSiteDiagnosticCategories" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_ListAppDiagnosticCategories() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAppSlotDiagnosticCategories() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteDiagnosticCategoriesSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ListSiteDiagnosticCategoriesSlot.json // this example is just showing the usage of "Diagnostics_ListSiteDiagnosticCategories" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task GetAll_ListAppSlotDiagnosticCategories() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppDiagnosticCategory() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategory.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDiagnosticCategory.json // this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategory" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,7 +128,7 @@ public async Task Get_GetAppDiagnosticCategory() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppDiagnosticCategory() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategory.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDiagnosticCategory.json // this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategory" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -159,7 +159,7 @@ public async Task Exists_GetAppDiagnosticCategory() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppDiagnosticCategory() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategory.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDiagnosticCategory.json // this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategory" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -202,7 +202,7 @@ public async Task GetIfExists_GetAppDiagnosticCategory() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppSlotDiagnosticCategory() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json // this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategory" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -237,7 +237,7 @@ public async Task Get_GetAppSlotDiagnosticCategory() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppSlotDiagnosticCategory() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json // this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategory" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -268,7 +268,7 @@ public async Task Exists_GetAppSlotDiagnosticCategory() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppSlotDiagnosticCategory() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json // this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategory" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticDetectorCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticDetectorCollection.cs index f62441e07e023..6f21149580ef6 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticDetectorCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticDetectorCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SiteDiagnosticDetectorCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAppDetectors() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteDetectors.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ListSiteDetectors.json // this example is just showing the usage of "Diagnostics_ListSiteDetectors" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ListAppDetectors() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAppSlotDetectors() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteDetectorsSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ListSiteDetectorsSlot.json // this example is just showing the usage of "Diagnostics_ListSiteDetectors" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task GetAll_ListAppSlotDetectors() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetector.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetector.json // this example is just showing the usage of "Diagnostics_GetSiteDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -131,7 +131,7 @@ public async Task Get_GetAppDetector() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetector.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetector.json // this example is just showing the usage of "Diagnostics_GetSiteDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +163,7 @@ public async Task Exists_GetAppDetector() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetector.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetector.json // this example is just showing the usage of "Diagnostics_GetSiteDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -207,7 +207,7 @@ public async Task GetIfExists_GetAppDetector() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppSlotDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorSlot.json // this example is just showing the usage of "Diagnostics_GetSiteDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -243,7 +243,7 @@ public async Task Get_GetAppSlotDetector() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppSlotDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorSlot.json // this example is just showing the usage of "Diagnostics_GetSiteDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -275,7 +275,7 @@ public async Task Exists_GetAppSlotDetector() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppSlotDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorSlot.json // this example is just showing the usage of "Diagnostics_GetSiteDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticDetectorResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticDetectorResource.cs index 15a7ac2bbed5d..d9f6ea5703869 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticDetectorResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticDetectorResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SiteDiagnosticDetectorResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetector.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetector.json // this example is just showing the usage of "Diagnostics_GetSiteDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Get_GetAppDetector() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppSlotDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorSlot.json // this example is just showing the usage of "Diagnostics_GetSiteDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Get_GetAppSlotDetector() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Execute_ExecuteSiteDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ExecuteSiteDetector.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ExecuteSiteDetector.json // this example is just showing the usage of "Diagnostics_ExecuteSiteDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -115,7 +115,7 @@ public async Task Execute_ExecuteSiteDetector() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Execute_ExecuteSiteSlotDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ExecuteSiteDetectorSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ExecuteSiteDetectorSlot.json // this example is just showing the usage of "Diagnostics_ExecuteSiteDetector" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticResource.cs index d73535cea1ced..4cf8daf8596e0 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SiteDiagnosticResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppDiagnosticCategory() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategory.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDiagnosticCategory.json // this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategory" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_GetAppDiagnosticCategory() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppSlotDiagnosticCategory() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json // this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategory" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteInstanceCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteInstanceCollection.cs index 71b19f9b11594..681bea8753000 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteInstanceCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteInstanceCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SiteInstanceCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSiteInstanceInfo() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSiteInstanceInfo.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSiteInstanceInfo.json // this example is just showing the usage of "WebApps_GetInstanceInfo" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_GetSiteInstanceInfo() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetSiteInstanceInfo() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSiteInstanceInfo.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSiteInstanceInfo.json // this example is just showing the usage of "WebApps_GetInstanceInfo" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Exists_GetSiteInstanceInfo() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetSiteInstanceInfo() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSiteInstanceInfo.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSiteInstanceInfo.json // this example is just showing the usage of "WebApps_GetInstanceInfo" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteInstanceResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteInstanceResource.cs index 599ebeecf82ab..198a5b40de52c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteInstanceResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteInstanceResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SiteInstanceResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSiteInstanceInfo() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSiteInstanceInfo.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSiteInstanceInfo.json // this example is just showing the usage of "WebApps_GetInstanceInfo" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SitePrivateEndpointConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SitePrivateEndpointConnectionCollection.cs index a3afab1e02aab..2886837a6753c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SitePrivateEndpointConnectionCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SitePrivateEndpointConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SitePrivateEndpointConnectionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnection.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSitePrivateEndpointConnection.json // this example is just showing the usage of "WebApps_GetPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetAPrivateEndpointConnectionForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnection.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSitePrivateEndpointConnection.json // this example is just showing the usage of "WebApps_GetPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Exists_GetAPrivateEndpointConnectionForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnection.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSitePrivateEndpointConnection.json // this example is just showing the usage of "WebApps_GetPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetIfExists_GetAPrivateEndpointConnectionForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApprovesOrRejectsAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ApproveRejectSitePrivateEndpointConnection.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ApproveRejectSitePrivateEndpointConnection.json // this example is just showing the usage of "WebApps_ApproveOrRejectPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -150,7 +150,7 @@ public async Task CreateOrUpdate_ApprovesOrRejectsAPrivateEndpointConnectionForA // invoke the operation string privateEndpointConnectionName = "connection"; - PrivateLinkConnectionApprovalRequestInfo info = new PrivateLinkConnectionApprovalRequestInfo() + RemotePrivateEndpointConnectionARMResourceData data = new RemotePrivateEndpointConnectionARMResourceData() { PrivateLinkServiceConnectionState = new PrivateLinkConnectionState() { @@ -159,7 +159,7 @@ public async Task CreateOrUpdate_ApprovesOrRejectsAPrivateEndpointConnectionForA ActionsRequired = "", }, }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, privateEndpointConnectionName, info); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, privateEndpointConnectionName, data); SitePrivateEndpointConnectionResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SitePrivateEndpointConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SitePrivateEndpointConnectionResource.cs index 1c6c5111fa774..16be95e108895 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SitePrivateEndpointConnectionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SitePrivateEndpointConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SitePrivateEndpointConnectionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnection.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSitePrivateEndpointConnection.json // this example is just showing the usage of "WebApps_GetPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_GetAPrivateEndpointConnectionForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApprovesOrRejectsAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ApproveRejectSitePrivateEndpointConnection.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ApproveRejectSitePrivateEndpointConnection.json // this example is just showing the usage of "WebApps_ApproveOrRejectPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -70,7 +70,7 @@ public async Task Update_ApprovesOrRejectsAPrivateEndpointConnectionForASite() SitePrivateEndpointConnectionResource sitePrivateEndpointConnection = client.GetSitePrivateEndpointConnectionResource(sitePrivateEndpointConnectionResourceId); // invoke the operation - PrivateLinkConnectionApprovalRequestInfo info = new PrivateLinkConnectionApprovalRequestInfo() + RemotePrivateEndpointConnectionARMResourceData data = new RemotePrivateEndpointConnectionARMResourceData() { PrivateLinkServiceConnectionState = new PrivateLinkConnectionState() { @@ -79,7 +79,7 @@ public async Task Update_ApprovesOrRejectsAPrivateEndpointConnectionForASite() ActionsRequired = "", }, }; - ArmOperation lro = await sitePrivateEndpointConnection.UpdateAsync(WaitUntil.Completed, info); + ArmOperation lro = await sitePrivateEndpointConnection.UpdateAsync(WaitUntil.Completed, data); SitePrivateEndpointConnectionResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well @@ -94,7 +94,7 @@ public async Task Update_ApprovesOrRejectsAPrivateEndpointConnectionForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/DeleteSitePrivateEndpointConnection.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DeleteSitePrivateEndpointConnection.json // this example is just showing the usage of "WebApps_DeletePrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDetectorCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDetectorCollection.cs index dcb4785d9221e..e160856bc7aea 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDetectorCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDetectorCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SiteSlotDetectorCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetAppDetectorResponses() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteDetectorResponses.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ListSiteDetectorResponses.json // this example is just showing the usage of "Diagnostics_ListSiteDetectorResponsesSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_GetAppDetectorResponses() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetAppSlotDetectorResponses() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteDetectorResponsesSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ListSiteDetectorResponsesSlot.json // this example is just showing the usage of "Diagnostics_ListSiteDetectorResponsesSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task GetAll_GetAppSlotDetectorResponses() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponse.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorResponse.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorResponseSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -131,7 +131,7 @@ public async Task Get_GetAppDetectorResponse() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponse.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorResponse.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorResponseSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +163,7 @@ public async Task Exists_GetAppDetectorResponse() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponse.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorResponse.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorResponseSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -207,7 +207,7 @@ public async Task GetIfExists_GetAppDetectorResponse() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppSlotDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorResponseSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -243,7 +243,7 @@ public async Task Get_GetAppSlotDetectorResponse() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppSlotDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorResponseSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -275,7 +275,7 @@ public async Task Exists_GetAppSlotDetectorResponse() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppSlotDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorResponseSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDetectorResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDetectorResource.cs index 7aa4f183d79d1..aca8b51904ff8 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDetectorResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDetectorResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SiteSlotDetectorResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponse.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorResponse.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorResponseSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_GetAppDetectorResponse() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppSlotDetectorResponse() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorResponseSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticAnalysisCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticAnalysisCollection.cs index 84f3ce19b9101..398447faf86a7 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticAnalysisCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticAnalysisCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SiteSlotDiagnosticAnalysisCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAppAnalyses() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteAnalyses.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ListSiteAnalyses.json // this example is just showing the usage of "Diagnostics_ListSiteAnalysesSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task GetAll_ListAppAnalyses() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAppSlotAnalyses() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteAnalysesSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ListSiteAnalysesSlot.json // this example is just showing the usage of "Diagnostics_ListSiteAnalysesSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -97,7 +97,7 @@ public async Task GetAll_ListAppSlotAnalyses() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysis.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteAnalysis.json // this example is just showing the usage of "Diagnostics_GetSiteAnalysisSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -134,7 +134,7 @@ public async Task Get_GetAppAnalysis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysis.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteAnalysis.json // this example is just showing the usage of "Diagnostics_GetSiteAnalysisSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -167,7 +167,7 @@ public async Task Exists_GetAppAnalysis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysis.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteAnalysis.json // this example is just showing the usage of "Diagnostics_GetSiteAnalysisSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -212,7 +212,7 @@ public async Task GetIfExists_GetAppAnalysis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppSlotAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysisSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteAnalysisSlot.json // this example is just showing the usage of "Diagnostics_GetSiteAnalysisSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -249,7 +249,7 @@ public async Task Get_GetAppSlotAnalysis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppSlotAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysisSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteAnalysisSlot.json // this example is just showing the usage of "Diagnostics_GetSiteAnalysisSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -282,7 +282,7 @@ public async Task Exists_GetAppSlotAnalysis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppSlotAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysisSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteAnalysisSlot.json // this example is just showing the usage of "Diagnostics_GetSiteAnalysisSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticAnalysisResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticAnalysisResource.cs index e84b9bda4be38..6237c2a1816d4 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticAnalysisResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticAnalysisResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SiteSlotDiagnosticAnalysisResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysis.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteAnalysis.json // this example is just showing the usage of "Diagnostics_GetSiteAnalysisSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_GetAppAnalysis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppSlotAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysisSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteAnalysisSlot.json // this example is just showing the usage of "Diagnostics_GetSiteAnalysisSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task Get_GetAppSlotAnalysis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ExecuteSiteAnalysisSlot_ExecuteSiteAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ExecuteSiteAnalysis.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ExecuteSiteAnalysis.json // this example is just showing the usage of "Diagnostics_ExecuteSiteAnalysisSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task ExecuteSiteAnalysisSlot_ExecuteSiteAnalysis() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ExecuteSiteAnalysisSlot_ExecuteSiteSlotAnalysis() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ExecuteSiteAnalysisSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ExecuteSiteAnalysisSlot.json // this example is just showing the usage of "Diagnostics_ExecuteSiteAnalysisSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticCollection.cs index 8a5868d16506f..840eaee88734c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SiteSlotDiagnosticCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAppDiagnosticCategories() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteDiagnosticCategories.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ListSiteDiagnosticCategories.json // this example is just showing the usage of "Diagnostics_ListSiteDiagnosticCategoriesSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ListAppDiagnosticCategories() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAppSlotDiagnosticCategories() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteDiagnosticCategoriesSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ListSiteDiagnosticCategoriesSlot.json // this example is just showing the usage of "Diagnostics_ListSiteDiagnosticCategoriesSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task GetAll_ListAppSlotDiagnosticCategories() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppDiagnosticCategory() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategory.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDiagnosticCategory.json // this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategorySlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -131,7 +131,7 @@ public async Task Get_GetAppDiagnosticCategory() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppDiagnosticCategory() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategory.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDiagnosticCategory.json // this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategorySlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +163,7 @@ public async Task Exists_GetAppDiagnosticCategory() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppDiagnosticCategory() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategory.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDiagnosticCategory.json // this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategorySlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -207,7 +207,7 @@ public async Task GetIfExists_GetAppDiagnosticCategory() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppSlotDiagnosticCategory() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json // this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategorySlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -243,7 +243,7 @@ public async Task Get_GetAppSlotDiagnosticCategory() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppSlotDiagnosticCategory() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json // this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategorySlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -275,7 +275,7 @@ public async Task Exists_GetAppSlotDiagnosticCategory() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppSlotDiagnosticCategory() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json // this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategorySlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticDetectorCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticDetectorCollection.cs index 616decce60186..7fcb9296e6faf 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticDetectorCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticDetectorCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SiteSlotDiagnosticDetectorCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAppDetectors() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteDetectors.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ListSiteDetectors.json // this example is just showing the usage of "Diagnostics_ListSiteDetectorsSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,7 +58,7 @@ public async Task GetAll_ListAppDetectors() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAppSlotDetectors() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteDetectorsSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ListSiteDetectorsSlot.json // this example is just showing the usage of "Diagnostics_ListSiteDetectorsSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -97,7 +97,7 @@ public async Task GetAll_ListAppSlotDetectors() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetector.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetector.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -134,7 +134,7 @@ public async Task Get_GetAppDetector() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetector.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetector.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -167,7 +167,7 @@ public async Task Exists_GetAppDetector() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetector.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetector.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -212,7 +212,7 @@ public async Task GetIfExists_GetAppDetector() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppSlotDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorSlot.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -249,7 +249,7 @@ public async Task Get_GetAppSlotDetector() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAppSlotDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorSlot.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -282,7 +282,7 @@ public async Task Exists_GetAppSlotDetector() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAppSlotDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorSlot.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticDetectorResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticDetectorResource.cs index 722cb050b612b..9e5534c1a4e06 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticDetectorResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticDetectorResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SiteSlotDiagnosticDetectorResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetector.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetector.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_GetAppDetector() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppSlotDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDetectorSlot.json // this example is just showing the usage of "Diagnostics_GetSiteDetectorSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task Get_GetAppSlotDetector() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ExecuteSiteDetectorSlot_ExecuteSiteDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ExecuteSiteDetector.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ExecuteSiteDetector.json // this example is just showing the usage of "Diagnostics_ExecuteSiteDetectorSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -118,7 +118,7 @@ public async Task ExecuteSiteDetectorSlot_ExecuteSiteDetector() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ExecuteSiteDetectorSlot_ExecuteSiteSlotDetector() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ExecuteSiteDetectorSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_ExecuteSiteDetectorSlot.json // this example is just showing the usage of "Diagnostics_ExecuteSiteDetectorSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticResource.cs index d0445feab79f4..547510bb2e001 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SiteSlotDiagnosticResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppDiagnosticCategory() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategory.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDiagnosticCategory.json // this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategorySlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_GetAppDiagnosticCategory() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAppSlotDiagnosticCategory() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json // this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategorySlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotInstanceCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotInstanceCollection.cs index adcd27e8e73b9..efe70c8d2239c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotInstanceCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotInstanceCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SiteSlotInstanceCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSiteInstanceInfo() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSiteInstanceInfo.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSiteInstanceInfo.json // this example is just showing the usage of "WebApps_GetInstanceInfoSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetSiteInstanceInfo() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetSiteInstanceInfo() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSiteInstanceInfo.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSiteInstanceInfo.json // this example is just showing the usage of "WebApps_GetInstanceInfoSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -87,7 +87,7 @@ public async Task Exists_GetSiteInstanceInfo() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetSiteInstanceInfo() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSiteInstanceInfo.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSiteInstanceInfo.json // this example is just showing the usage of "WebApps_GetInstanceInfoSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotInstanceResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotInstanceResource.cs index 9f124dafd646d..c0a7b79d34c4b 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotInstanceResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotInstanceResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SiteSlotInstanceResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSiteInstanceInfo() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSiteInstanceInfo.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSiteInstanceInfo.json // this example is just showing the usage of "WebApps_GetInstanceInfoSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotPrivateEndpointConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotPrivateEndpointConnectionCollection.cs index c57165f009298..b564b969e5155 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotPrivateEndpointConnectionCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotPrivateEndpointConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SiteSlotPrivateEndpointConnectionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnectionSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSitePrivateEndpointConnectionSlot.json // this example is just showing the usage of "WebApps_GetPrivateEndpointConnectionSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task Get_GetAPrivateEndpointConnectionForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnectionSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSitePrivateEndpointConnectionSlot.json // this example is just showing the usage of "WebApps_GetPrivateEndpointConnectionSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task Exists_GetAPrivateEndpointConnectionForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnectionSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSitePrivateEndpointConnectionSlot.json // this example is just showing the usage of "WebApps_GetPrivateEndpointConnectionSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -132,7 +132,7 @@ public async Task GetIfExists_GetAPrivateEndpointConnectionForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApprovesOrRejectsAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ApproveRejectSitePrivateEndpointConnectionSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ApproveRejectSitePrivateEndpointConnectionSlot.json // this example is just showing the usage of "WebApps_ApproveOrRejectPrivateEndpointConnectionSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -154,7 +154,7 @@ public async Task CreateOrUpdate_ApprovesOrRejectsAPrivateEndpointConnectionForA // invoke the operation string privateEndpointConnectionName = "connection"; - PrivateLinkConnectionApprovalRequestInfo info = new PrivateLinkConnectionApprovalRequestInfo() + RemotePrivateEndpointConnectionARMResourceData data = new RemotePrivateEndpointConnectionARMResourceData() { PrivateLinkServiceConnectionState = new PrivateLinkConnectionState() { @@ -163,7 +163,7 @@ public async Task CreateOrUpdate_ApprovesOrRejectsAPrivateEndpointConnectionForA ActionsRequired = "", }, }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, privateEndpointConnectionName, info); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, privateEndpointConnectionName, data); SiteSlotPrivateEndpointConnectionResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotPrivateEndpointConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotPrivateEndpointConnectionResource.cs index 6bc0ff9966ddf..90b7d67b8a62a 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotPrivateEndpointConnectionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotPrivateEndpointConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SiteSlotPrivateEndpointConnectionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnectionSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSitePrivateEndpointConnectionSlot.json // this example is just showing the usage of "WebApps_GetPrivateEndpointConnectionSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Get_GetAPrivateEndpointConnectionForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApprovesOrRejectsAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ApproveRejectSitePrivateEndpointConnectionSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ApproveRejectSitePrivateEndpointConnectionSlot.json // this example is just showing the usage of "WebApps_ApproveOrRejectPrivateEndpointConnectionSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -72,7 +72,7 @@ public async Task Update_ApprovesOrRejectsAPrivateEndpointConnectionForASite() SiteSlotPrivateEndpointConnectionResource siteSlotPrivateEndpointConnection = client.GetSiteSlotPrivateEndpointConnectionResource(siteSlotPrivateEndpointConnectionResourceId); // invoke the operation - PrivateLinkConnectionApprovalRequestInfo info = new PrivateLinkConnectionApprovalRequestInfo() + RemotePrivateEndpointConnectionARMResourceData data = new RemotePrivateEndpointConnectionARMResourceData() { PrivateLinkServiceConnectionState = new PrivateLinkConnectionState() { @@ -81,7 +81,7 @@ public async Task Update_ApprovesOrRejectsAPrivateEndpointConnectionForASite() ActionsRequired = "", }, }; - ArmOperation lro = await siteSlotPrivateEndpointConnection.UpdateAsync(WaitUntil.Completed, info); + ArmOperation lro = await siteSlotPrivateEndpointConnection.UpdateAsync(WaitUntil.Completed, data); SiteSlotPrivateEndpointConnectionResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well @@ -96,7 +96,7 @@ public async Task Update_ApprovesOrRejectsAPrivateEndpointConnectionForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/DeleteSitePrivateEndpointConnectionSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DeleteSitePrivateEndpointConnectionSlot.json // this example is just showing the usage of "WebApps_DeletePrivateEndpointConnectionSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotWorkflowCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotWorkflowCollection.cs new file mode 100644 index 0000000000000..8e76353ade46f --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotWorkflowCollection.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_SiteSlotWorkflowCollection + { + // List the workflows Slot + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListTheWorkflowsSlot() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListWorkflows.json + // this example is just showing the usage of "WebApps_ListInstanceWorkflowsSlot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteSlotResource created on azure + // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "testsite2"; + string slot = "staging"; + ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot); + WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId); + + // get the collection of this SiteSlotWorkflowResource + SiteSlotWorkflowCollection collection = webSiteSlot.GetSiteSlotWorkflows(); + + // invoke the operation and iterate over the result + await foreach (SiteSlotWorkflowResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowEnvelopeData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // GET a workflow Slot + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GETAWorkflowSlot() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWorkflow.json + // this example is just showing the usage of "WebApps_GetInstanceWorkflowSlot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteSlotResource created on azure + // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "testsite2"; + string slot = "staging"; + ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot); + WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId); + + // get the collection of this SiteSlotWorkflowResource + SiteSlotWorkflowCollection collection = webSiteSlot.GetSiteSlotWorkflows(); + + // invoke the operation + string workflowName = "stateful1"; + SiteSlotWorkflowResource result = await collection.GetAsync(workflowName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowEnvelopeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // GET a workflow Slot + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GETAWorkflowSlot() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWorkflow.json + // this example is just showing the usage of "WebApps_GetInstanceWorkflowSlot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteSlotResource created on azure + // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "testsite2"; + string slot = "staging"; + ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot); + WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId); + + // get the collection of this SiteSlotWorkflowResource + SiteSlotWorkflowCollection collection = webSiteSlot.GetSiteSlotWorkflows(); + + // invoke the operation + string workflowName = "stateful1"; + bool result = await collection.ExistsAsync(workflowName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // GET a workflow Slot + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GETAWorkflowSlot() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWorkflow.json + // this example is just showing the usage of "WebApps_GetInstanceWorkflowSlot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteSlotResource created on azure + // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "testsite2"; + string slot = "staging"; + ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot); + WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId); + + // get the collection of this SiteSlotWorkflowResource + SiteSlotWorkflowCollection collection = webSiteSlot.GetSiteSlotWorkflows(); + + // invoke the operation + string workflowName = "stateful1"; + NullableResponse response = await collection.GetIfExistsAsync(workflowName); + SiteSlotWorkflowResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowEnvelopeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotWorkflowResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotWorkflowResource.cs new file mode 100644 index 0000000000000..ea1154da9880f --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotWorkflowResource.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_SiteSlotWorkflowResource + { + // GET a workflow Slot + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GETAWorkflowSlot() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWorkflow.json + // this example is just showing the usage of "WebApps_GetInstanceWorkflowSlot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SiteSlotWorkflowResource created on azure + // for more information of creating SiteSlotWorkflowResource, please refer to the document of SiteSlotWorkflowResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "testsite2"; + string slot = "staging"; + string workflowName = "stateful1"; + ResourceIdentifier siteSlotWorkflowResourceId = SiteSlotWorkflowResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot, workflowName); + SiteSlotWorkflowResource siteSlotWorkflow = client.GetSiteSlotWorkflowResource(siteSlotWorkflowResourceId); + + // invoke the operation + SiteSlotWorkflowResource result = await siteSlotWorkflow.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowEnvelopeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteWorkflowCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteWorkflowCollection.cs new file mode 100644 index 0000000000000..ad5834a0b0528 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteWorkflowCollection.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_SiteWorkflowCollection + { + // List the workflows + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListTheWorkflows() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListWorkflows.json + // this example is just showing the usage of "WebApps_ListWorkflows" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "testsite2"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this SiteWorkflowResource + SiteWorkflowCollection collection = webSite.GetSiteWorkflows(); + + // invoke the operation and iterate over the result + await foreach (SiteWorkflowResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowEnvelopeData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // GET a workflow + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GETAWorkflow() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWorkflow.json + // this example is just showing the usage of "WebApps_GetWorkflow" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "testsite2"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this SiteWorkflowResource + SiteWorkflowCollection collection = webSite.GetSiteWorkflows(); + + // invoke the operation + string workflowName = "stateful1"; + SiteWorkflowResource result = await collection.GetAsync(workflowName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowEnvelopeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // GET a workflow + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GETAWorkflow() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWorkflow.json + // this example is just showing the usage of "WebApps_GetWorkflow" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "testsite2"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this SiteWorkflowResource + SiteWorkflowCollection collection = webSite.GetSiteWorkflows(); + + // invoke the operation + string workflowName = "stateful1"; + bool result = await collection.ExistsAsync(workflowName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // GET a workflow + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GETAWorkflow() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWorkflow.json + // this example is just showing the usage of "WebApps_GetWorkflow" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "testsite2"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this SiteWorkflowResource + SiteWorkflowCollection collection = webSite.GetSiteWorkflows(); + + // invoke the operation + string workflowName = "stateful1"; + NullableResponse response = await collection.GetIfExistsAsync(workflowName); + SiteWorkflowResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowEnvelopeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteWorkflowResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteWorkflowResource.cs new file mode 100644 index 0000000000000..daf75b2bb2ff0 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteWorkflowResource.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_SiteWorkflowResource + { + // GET a workflow + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GETAWorkflow() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWorkflow.json + // this example is just showing the usage of "WebApps_GetWorkflow" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SiteWorkflowResource created on azure + // for more information of creating SiteWorkflowResource, please refer to the document of SiteWorkflowResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "testsite2"; + string workflowName = "stateful1"; + ResourceIdentifier siteWorkflowResourceId = SiteWorkflowResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName); + SiteWorkflowResource siteWorkflow = client.GetSiteWorkflowResource(siteWorkflowResourceId); + + // invoke the operation + SiteWorkflowResource result = await siteWorkflow.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowEnvelopeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBasicAuthPropertyCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBasicAuthPropertyCollection.cs new file mode 100644 index 0000000000000..4bc0ba825051f --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBasicAuthPropertyCollection.cs @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_StaticSiteBasicAuthPropertyCollection + { + // Lists the basic auth properties for a static site. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListsTheBasicAuthPropertiesForAStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListStaticSiteBasicAuth.json + // this example is just showing the usage of "StaticSites_ListBasicAuth" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteResource created on azure + // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId); + + // get the collection of this StaticSiteBasicAuthPropertyResource + StaticSiteBasicAuthPropertyCollection collection = staticSite.GetStaticSiteBasicAuthProperties(); + + // invoke the operation and iterate over the result + await foreach (StaticSiteBasicAuthPropertyResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteBasicAuthPropertyData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Gets the basic auth properties for a static site. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetsTheBasicAuthPropertiesForAStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteBasicAuth.json + // this example is just showing the usage of "StaticSites_GetBasicAuth" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteResource created on azure + // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId); + + // get the collection of this StaticSiteBasicAuthPropertyResource + StaticSiteBasicAuthPropertyCollection collection = staticSite.GetStaticSiteBasicAuthProperties(); + + // invoke the operation + StaticSiteBasicAuthName basicAuthName = StaticSiteBasicAuthName.Default; + StaticSiteBasicAuthPropertyResource result = await collection.GetAsync(basicAuthName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteBasicAuthPropertyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Gets the basic auth properties for a static site. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetsTheBasicAuthPropertiesForAStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteBasicAuth.json + // this example is just showing the usage of "StaticSites_GetBasicAuth" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteResource created on azure + // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId); + + // get the collection of this StaticSiteBasicAuthPropertyResource + StaticSiteBasicAuthPropertyCollection collection = staticSite.GetStaticSiteBasicAuthProperties(); + + // invoke the operation + StaticSiteBasicAuthName basicAuthName = StaticSiteBasicAuthName.Default; + bool result = await collection.ExistsAsync(basicAuthName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Gets the basic auth properties for a static site. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetsTheBasicAuthPropertiesForAStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteBasicAuth.json + // this example is just showing the usage of "StaticSites_GetBasicAuth" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteResource created on azure + // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId); + + // get the collection of this StaticSiteBasicAuthPropertyResource + StaticSiteBasicAuthPropertyCollection collection = staticSite.GetStaticSiteBasicAuthProperties(); + + // invoke the operation + StaticSiteBasicAuthName basicAuthName = StaticSiteBasicAuthName.Default; + NullableResponse response = await collection.GetIfExistsAsync(basicAuthName); + StaticSiteBasicAuthPropertyResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteBasicAuthPropertyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Creates or updates basic auth properties for a static site. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreatesOrUpdatesBasicAuthPropertiesForAStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CreateOrUpdateStaticSiteBasicAuth.json + // this example is just showing the usage of "StaticSites_CreateOrUpdateBasicAuth" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteResource created on azure + // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId); + + // get the collection of this StaticSiteBasicAuthPropertyResource + StaticSiteBasicAuthPropertyCollection collection = staticSite.GetStaticSiteBasicAuthProperties(); + + // invoke the operation + StaticSiteBasicAuthName basicAuthName = StaticSiteBasicAuthName.Default; + StaticSiteBasicAuthPropertyData data = new StaticSiteBasicAuthPropertyData() + { + Password = "**********************", + SecretUri = null, + ApplicableEnvironmentsMode = "AllEnvironments", + Environments = +{ +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, basicAuthName, data); + StaticSiteBasicAuthPropertyResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteBasicAuthPropertyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBasicAuthPropertyResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBasicAuthPropertyResource.cs new file mode 100644 index 0000000000000..ef70639557cfa --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBasicAuthPropertyResource.cs @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_StaticSiteBasicAuthPropertyResource + { + // Gets the basic auth properties for a static site. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetsTheBasicAuthPropertiesForAStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteBasicAuth.json + // this example is just showing the usage of "StaticSites_GetBasicAuth" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBasicAuthPropertyResource created on azure + // for more information of creating StaticSiteBasicAuthPropertyResource, please refer to the document of StaticSiteBasicAuthPropertyResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + StaticSiteBasicAuthName basicAuthName = StaticSiteBasicAuthName.Default; + ResourceIdentifier staticSiteBasicAuthPropertyResourceId = StaticSiteBasicAuthPropertyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, basicAuthName); + StaticSiteBasicAuthPropertyResource staticSiteBasicAuthProperty = client.GetStaticSiteBasicAuthPropertyResource(staticSiteBasicAuthPropertyResourceId); + + // invoke the operation + StaticSiteBasicAuthPropertyResource result = await staticSiteBasicAuthProperty.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteBasicAuthPropertyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Creates or updates basic auth properties for a static site. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_CreatesOrUpdatesBasicAuthPropertiesForAStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CreateOrUpdateStaticSiteBasicAuth.json + // this example is just showing the usage of "StaticSites_CreateOrUpdateBasicAuth" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBasicAuthPropertyResource created on azure + // for more information of creating StaticSiteBasicAuthPropertyResource, please refer to the document of StaticSiteBasicAuthPropertyResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + StaticSiteBasicAuthName basicAuthName = StaticSiteBasicAuthName.Default; + ResourceIdentifier staticSiteBasicAuthPropertyResourceId = StaticSiteBasicAuthPropertyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, basicAuthName); + StaticSiteBasicAuthPropertyResource staticSiteBasicAuthProperty = client.GetStaticSiteBasicAuthPropertyResource(staticSiteBasicAuthPropertyResourceId); + + // invoke the operation + StaticSiteBasicAuthPropertyData data = new StaticSiteBasicAuthPropertyData() + { + Password = "**********************", + SecretUri = null, + ApplicableEnvironmentsMode = "AllEnvironments", + Environments = +{ +}, + }; + ArmOperation lro = await staticSiteBasicAuthProperty.UpdateAsync(WaitUntil.Completed, data); + StaticSiteBasicAuthPropertyResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteBasicAuthPropertyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildCollection.cs index 598ab030f6a11..bb22cbcdccb7d 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_StaticSiteBuildCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetAllBuildsForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSiteBuilds.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteBuilds.json // this example is just showing the usage of "StaticSites_GetStaticSiteBuilds" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_GetAllBuildsForAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSiteBuild.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteBuild.json // this example is just showing the usage of "StaticSites_GetStaticSiteBuild" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_GetAStaticSiteBuild() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSiteBuild.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteBuild.json // this example is just showing the usage of "StaticSites_GetStaticSiteBuild" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Exists_GetAStaticSiteBuild() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSiteBuild.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteBuild.json // this example is just showing the usage of "StaticSites_GetStaticSiteBuild" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildDatabaseConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildDatabaseConnectionCollection.cs new file mode 100644 index 0000000000000..b590ced193deb --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildDatabaseConnectionCollection.cs @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_StaticSiteBuildDatabaseConnectionCollection + { + // List overviews of database connections for the static site build. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListOverviewsOfDatabaseConnectionsForTheStaticSiteBuild() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteBuildDatabaseConnections.json + // this example is just showing the usage of "StaticSites_GetBuildDatabaseConnections" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildResource created on azure + // for more information of creating StaticSiteBuildResource, please refer to the document of StaticSiteBuildResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "default"; + ResourceIdentifier staticSiteBuildResourceId = StaticSiteBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName); + StaticSiteBuildResource staticSiteBuild = client.GetStaticSiteBuildResource(staticSiteBuildResourceId); + + // get the collection of this StaticSiteBuildDatabaseConnectionResource + StaticSiteBuildDatabaseConnectionCollection collection = staticSiteBuild.GetStaticSiteBuildDatabaseConnections(); + + // invoke the operation and iterate over the result + await foreach (StaticSiteBuildDatabaseConnectionResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteDatabaseConnectionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get overview of database connections for the static site build. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetOverviewOfDatabaseConnectionsForTheStaticSiteBuild() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteBuildDatabaseConnection.json + // this example is just showing the usage of "StaticSites_GetBuildDatabaseConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildResource created on azure + // for more information of creating StaticSiteBuildResource, please refer to the document of StaticSiteBuildResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "default"; + ResourceIdentifier staticSiteBuildResourceId = StaticSiteBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName); + StaticSiteBuildResource staticSiteBuild = client.GetStaticSiteBuildResource(staticSiteBuildResourceId); + + // get the collection of this StaticSiteBuildDatabaseConnectionResource + StaticSiteBuildDatabaseConnectionCollection collection = staticSiteBuild.GetStaticSiteBuildDatabaseConnections(); + + // invoke the operation + string databaseConnectionName = "default"; + StaticSiteBuildDatabaseConnectionResource result = await collection.GetAsync(databaseConnectionName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteDatabaseConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get overview of database connections for the static site build. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetOverviewOfDatabaseConnectionsForTheStaticSiteBuild() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteBuildDatabaseConnection.json + // this example is just showing the usage of "StaticSites_GetBuildDatabaseConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildResource created on azure + // for more information of creating StaticSiteBuildResource, please refer to the document of StaticSiteBuildResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "default"; + ResourceIdentifier staticSiteBuildResourceId = StaticSiteBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName); + StaticSiteBuildResource staticSiteBuild = client.GetStaticSiteBuildResource(staticSiteBuildResourceId); + + // get the collection of this StaticSiteBuildDatabaseConnectionResource + StaticSiteBuildDatabaseConnectionCollection collection = staticSiteBuild.GetStaticSiteBuildDatabaseConnections(); + + // invoke the operation + string databaseConnectionName = "default"; + bool result = await collection.ExistsAsync(databaseConnectionName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get overview of database connections for the static site build. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetOverviewOfDatabaseConnectionsForTheStaticSiteBuild() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteBuildDatabaseConnection.json + // this example is just showing the usage of "StaticSites_GetBuildDatabaseConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildResource created on azure + // for more information of creating StaticSiteBuildResource, please refer to the document of StaticSiteBuildResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "default"; + ResourceIdentifier staticSiteBuildResourceId = StaticSiteBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName); + StaticSiteBuildResource staticSiteBuild = client.GetStaticSiteBuildResource(staticSiteBuildResourceId); + + // get the collection of this StaticSiteBuildDatabaseConnectionResource + StaticSiteBuildDatabaseConnectionCollection collection = staticSiteBuild.GetStaticSiteBuildDatabaseConnections(); + + // invoke the operation + string databaseConnectionName = "default"; + NullableResponse response = await collection.GetIfExistsAsync(databaseConnectionName); + StaticSiteBuildDatabaseConnectionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteDatabaseConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Create or update a database connection for a static site build + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateADatabaseConnectionForAStaticSiteBuild() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CreateOrUpdateStaticSiteBuildDatabaseConnection.json + // this example is just showing the usage of "StaticSites_CreateOrUpdateBuildDatabaseConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildResource created on azure + // for more information of creating StaticSiteBuildResource, please refer to the document of StaticSiteBuildResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "default"; + ResourceIdentifier staticSiteBuildResourceId = StaticSiteBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName); + StaticSiteBuildResource staticSiteBuild = client.GetStaticSiteBuildResource(staticSiteBuildResourceId); + + // get the collection of this StaticSiteBuildDatabaseConnectionResource + StaticSiteBuildDatabaseConnectionCollection collection = staticSiteBuild.GetStaticSiteBuildDatabaseConnections(); + + // invoke the operation + string databaseConnectionName = "default"; + StaticSiteDatabaseConnectionData data = new StaticSiteDatabaseConnectionData() + { + ResourceId = new ResourceIdentifier("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/databaseRG/providers/Microsoft.DocumentDB/databaseAccounts/exampleDatabaseName"), + ConnectionIdentity = "SystemAssigned", + ConnectionString = "AccountEndpoint=https://exampleDatabaseName.documents.azure.com:443/;Database=mydb;", + Region = "West US 2", + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, databaseConnectionName, data); + StaticSiteBuildDatabaseConnectionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteDatabaseConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildDatabaseConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildDatabaseConnectionResource.cs new file mode 100644 index 0000000000000..275fe096b82d2 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildDatabaseConnectionResource.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_StaticSiteBuildDatabaseConnectionResource + { + // Get overview of database connections for the static site build. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetOverviewOfDatabaseConnectionsForTheStaticSiteBuild() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteBuildDatabaseConnection.json + // this example is just showing the usage of "StaticSites_GetBuildDatabaseConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildDatabaseConnectionResource created on azure + // for more information of creating StaticSiteBuildDatabaseConnectionResource, please refer to the document of StaticSiteBuildDatabaseConnectionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "default"; + string databaseConnectionName = "default"; + ResourceIdentifier staticSiteBuildDatabaseConnectionResourceId = StaticSiteBuildDatabaseConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName, databaseConnectionName); + StaticSiteBuildDatabaseConnectionResource staticSiteBuildDatabaseConnection = client.GetStaticSiteBuildDatabaseConnectionResource(staticSiteBuildDatabaseConnectionResourceId); + + // invoke the operation + StaticSiteBuildDatabaseConnectionResource result = await staticSiteBuildDatabaseConnection.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteDatabaseConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Delete a database connection from a static site build. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteADatabaseConnectionFromAStaticSiteBuild() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DeleteStaticSiteBuildDatabaseConnection.json + // this example is just showing the usage of "StaticSites_DeleteBuildDatabaseConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildDatabaseConnectionResource created on azure + // for more information of creating StaticSiteBuildDatabaseConnectionResource, please refer to the document of StaticSiteBuildDatabaseConnectionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "default"; + string databaseConnectionName = "default"; + ResourceIdentifier staticSiteBuildDatabaseConnectionResourceId = StaticSiteBuildDatabaseConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName, databaseConnectionName); + StaticSiteBuildDatabaseConnectionResource staticSiteBuildDatabaseConnection = client.GetStaticSiteBuildDatabaseConnectionResource(staticSiteBuildDatabaseConnectionResourceId); + + // invoke the operation + await staticSiteBuildDatabaseConnection.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Patch a database connection for a static site build + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_PatchADatabaseConnectionForAStaticSiteBuild() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/PatchStaticSiteBuildDatabaseConnection.json + // this example is just showing the usage of "StaticSites_UpdateBuildDatabaseConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildDatabaseConnectionResource created on azure + // for more information of creating StaticSiteBuildDatabaseConnectionResource, please refer to the document of StaticSiteBuildDatabaseConnectionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "default"; + string databaseConnectionName = "default"; + ResourceIdentifier staticSiteBuildDatabaseConnectionResourceId = StaticSiteBuildDatabaseConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName, databaseConnectionName); + StaticSiteBuildDatabaseConnectionResource staticSiteBuildDatabaseConnection = client.GetStaticSiteBuildDatabaseConnectionResource(staticSiteBuildDatabaseConnectionResourceId); + + // invoke the operation + StaticSiteDatabaseConnectionPatchContent content = new StaticSiteDatabaseConnectionPatchContent(); + StaticSiteBuildDatabaseConnectionResource result = await staticSiteBuildDatabaseConnection.UpdateAsync(content); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteDatabaseConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get details of database connections for the static site build. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetBuildDatabaseConnectionWithDetails_GetDetailsOfDatabaseConnectionsForTheStaticSiteBuild() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteBuildDatabaseConnectionWithDetails.json + // this example is just showing the usage of "StaticSites_GetBuildDatabaseConnectionWithDetails" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildDatabaseConnectionResource created on azure + // for more information of creating StaticSiteBuildDatabaseConnectionResource, please refer to the document of StaticSiteBuildDatabaseConnectionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "default"; + string databaseConnectionName = "default"; + ResourceIdentifier staticSiteBuildDatabaseConnectionResourceId = StaticSiteBuildDatabaseConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName, databaseConnectionName); + StaticSiteBuildDatabaseConnectionResource staticSiteBuildDatabaseConnection = client.GetStaticSiteBuildDatabaseConnectionResource(staticSiteBuildDatabaseConnectionResourceId); + + // invoke the operation + StaticSiteBuildDatabaseConnectionResource result = await staticSiteBuildDatabaseConnection.GetBuildDatabaseConnectionWithDetailsAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteDatabaseConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildLinkedBackendCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildLinkedBackendCollection.cs new file mode 100644 index 0000000000000..3b83e18064370 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildLinkedBackendCollection.cs @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_StaticSiteBuildLinkedBackendCollection + { + // Get details of the linked backends registered with a static site build. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_GetDetailsOfTheLinkedBackendsRegisteredWithAStaticSiteBuild() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetLinkedBackendsForStaticSiteBuild.json + // this example is just showing the usage of "StaticSites_GetLinkedBackendsForBuild" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildResource created on azure + // for more information of creating StaticSiteBuildResource, please refer to the document of StaticSiteBuildResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "default"; + ResourceIdentifier staticSiteBuildResourceId = StaticSiteBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName); + StaticSiteBuildResource staticSiteBuild = client.GetStaticSiteBuildResource(staticSiteBuildResourceId); + + // get the collection of this StaticSiteBuildLinkedBackendResource + StaticSiteBuildLinkedBackendCollection collection = staticSiteBuild.GetStaticSiteBuildLinkedBackends(); + + // invoke the operation and iterate over the result + await foreach (StaticSiteBuildLinkedBackendResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteLinkedBackendData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get details of the linked backend registered with a static site build by name. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetDetailsOfTheLinkedBackendRegisteredWithAStaticSiteBuildByName() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetLinkedBackendForStaticSiteBuild.json + // this example is just showing the usage of "StaticSites_GetLinkedBackendForBuild" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildResource created on azure + // for more information of creating StaticSiteBuildResource, please refer to the document of StaticSiteBuildResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "default"; + ResourceIdentifier staticSiteBuildResourceId = StaticSiteBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName); + StaticSiteBuildResource staticSiteBuild = client.GetStaticSiteBuildResource(staticSiteBuildResourceId); + + // get the collection of this StaticSiteBuildLinkedBackendResource + StaticSiteBuildLinkedBackendCollection collection = staticSiteBuild.GetStaticSiteBuildLinkedBackends(); + + // invoke the operation + string linkedBackendName = "testBackend"; + StaticSiteBuildLinkedBackendResource result = await collection.GetAsync(linkedBackendName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteLinkedBackendData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get details of the linked backend registered with a static site build by name. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetDetailsOfTheLinkedBackendRegisteredWithAStaticSiteBuildByName() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetLinkedBackendForStaticSiteBuild.json + // this example is just showing the usage of "StaticSites_GetLinkedBackendForBuild" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildResource created on azure + // for more information of creating StaticSiteBuildResource, please refer to the document of StaticSiteBuildResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "default"; + ResourceIdentifier staticSiteBuildResourceId = StaticSiteBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName); + StaticSiteBuildResource staticSiteBuild = client.GetStaticSiteBuildResource(staticSiteBuildResourceId); + + // get the collection of this StaticSiteBuildLinkedBackendResource + StaticSiteBuildLinkedBackendCollection collection = staticSiteBuild.GetStaticSiteBuildLinkedBackends(); + + // invoke the operation + string linkedBackendName = "testBackend"; + bool result = await collection.ExistsAsync(linkedBackendName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get details of the linked backend registered with a static site build by name. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetDetailsOfTheLinkedBackendRegisteredWithAStaticSiteBuildByName() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetLinkedBackendForStaticSiteBuild.json + // this example is just showing the usage of "StaticSites_GetLinkedBackendForBuild" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildResource created on azure + // for more information of creating StaticSiteBuildResource, please refer to the document of StaticSiteBuildResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "default"; + ResourceIdentifier staticSiteBuildResourceId = StaticSiteBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName); + StaticSiteBuildResource staticSiteBuild = client.GetStaticSiteBuildResource(staticSiteBuildResourceId); + + // get the collection of this StaticSiteBuildLinkedBackendResource + StaticSiteBuildLinkedBackendCollection collection = staticSiteBuild.GetStaticSiteBuildLinkedBackends(); + + // invoke the operation + string linkedBackendName = "testBackend"; + NullableResponse response = await collection.GetIfExistsAsync(linkedBackendName); + StaticSiteBuildLinkedBackendResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteLinkedBackendData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Link a backend to a static site build + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_LinkABackendToAStaticSiteBuild() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/LinkBackendToStaticSiteBuild.json + // this example is just showing the usage of "StaticSites_LinkBackendToBuild" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildResource created on azure + // for more information of creating StaticSiteBuildResource, please refer to the document of StaticSiteBuildResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "default"; + ResourceIdentifier staticSiteBuildResourceId = StaticSiteBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName); + StaticSiteBuildResource staticSiteBuild = client.GetStaticSiteBuildResource(staticSiteBuildResourceId); + + // get the collection of this StaticSiteBuildLinkedBackendResource + StaticSiteBuildLinkedBackendCollection collection = staticSiteBuild.GetStaticSiteBuildLinkedBackends(); + + // invoke the operation + string linkedBackendName = "testBackend"; + StaticSiteLinkedBackendData data = new StaticSiteLinkedBackendData() + { + BackendResourceId = new ResourceIdentifier("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/backendRg/providers/Microsoft.Web/sites/testBackend"), + Region = "West US 2", + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, linkedBackendName, data); + StaticSiteBuildLinkedBackendResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteLinkedBackendData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildLinkedBackendResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildLinkedBackendResource.cs new file mode 100644 index 0000000000000..3e928e49fa8e4 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildLinkedBackendResource.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_StaticSiteBuildLinkedBackendResource + { + // Validate if backend can be linked to static site build. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task ValidateBackendForBuild_ValidateIfBackendCanBeLinkedToStaticSiteBuild() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ValidateLinkedBackendForStaticSiteBuild.json + // this example is just showing the usage of "StaticSites_ValidateBackendForBuild" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildLinkedBackendResource created on azure + // for more information of creating StaticSiteBuildLinkedBackendResource, please refer to the document of StaticSiteBuildLinkedBackendResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "default"; + string linkedBackendName = "testBackend"; + ResourceIdentifier staticSiteBuildLinkedBackendResourceId = StaticSiteBuildLinkedBackendResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName, linkedBackendName); + StaticSiteBuildLinkedBackendResource staticSiteBuildLinkedBackend = client.GetStaticSiteBuildLinkedBackendResource(staticSiteBuildLinkedBackendResourceId); + + // invoke the operation + StaticSiteLinkedBackendData data = new StaticSiteLinkedBackendData() + { + BackendResourceId = new ResourceIdentifier("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/backendRg/providers/Microsoft.Web/sites/testBackend"), + Region = "West US 2", + }; + await staticSiteBuildLinkedBackend.ValidateBackendForBuildAsync(WaitUntil.Completed, data); + + Console.WriteLine($"Succeeded"); + } + + // Get details of the linked backend registered with a static site build by name. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetDetailsOfTheLinkedBackendRegisteredWithAStaticSiteBuildByName() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetLinkedBackendForStaticSiteBuild.json + // this example is just showing the usage of "StaticSites_GetLinkedBackendForBuild" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildLinkedBackendResource created on azure + // for more information of creating StaticSiteBuildLinkedBackendResource, please refer to the document of StaticSiteBuildLinkedBackendResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "default"; + string linkedBackendName = "testBackend"; + ResourceIdentifier staticSiteBuildLinkedBackendResourceId = StaticSiteBuildLinkedBackendResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName, linkedBackendName); + StaticSiteBuildLinkedBackendResource staticSiteBuildLinkedBackend = client.GetStaticSiteBuildLinkedBackendResource(staticSiteBuildLinkedBackendResourceId); + + // invoke the operation + StaticSiteBuildLinkedBackendResource result = await staticSiteBuildLinkedBackend.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteLinkedBackendData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Link a backend to a static site build + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_LinkABackendToAStaticSiteBuild() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/LinkBackendToStaticSiteBuild.json + // this example is just showing the usage of "StaticSites_LinkBackendToBuild" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildLinkedBackendResource created on azure + // for more information of creating StaticSiteBuildLinkedBackendResource, please refer to the document of StaticSiteBuildLinkedBackendResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "default"; + string linkedBackendName = "testBackend"; + ResourceIdentifier staticSiteBuildLinkedBackendResourceId = StaticSiteBuildLinkedBackendResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName, linkedBackendName); + StaticSiteBuildLinkedBackendResource staticSiteBuildLinkedBackend = client.GetStaticSiteBuildLinkedBackendResource(staticSiteBuildLinkedBackendResourceId); + + // invoke the operation + StaticSiteLinkedBackendData data = new StaticSiteLinkedBackendData() + { + BackendResourceId = new ResourceIdentifier("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/backendRg/providers/Microsoft.Web/sites/testBackend"), + Region = "West US 2", + }; + ArmOperation lro = await staticSiteBuildLinkedBackend.UpdateAsync(WaitUntil.Completed, data); + StaticSiteBuildLinkedBackendResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteLinkedBackendData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Unlink a backend from a static site build. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_UnlinkABackendFromAStaticSiteBuild() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/UnlinkBackendFromStaticSiteBuild.json + // this example is just showing the usage of "StaticSites_UnlinkBackendFromBuild" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildLinkedBackendResource created on azure + // for more information of creating StaticSiteBuildLinkedBackendResource, please refer to the document of StaticSiteBuildLinkedBackendResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "12"; + string linkedBackendName = "testBackend"; + ResourceIdentifier staticSiteBuildLinkedBackendResourceId = StaticSiteBuildLinkedBackendResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName, linkedBackendName); + StaticSiteBuildLinkedBackendResource staticSiteBuildLinkedBackend = client.GetStaticSiteBuildLinkedBackendResource(staticSiteBuildLinkedBackendResourceId); + + // invoke the operation + await staticSiteBuildLinkedBackend.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildResource.cs index 5eeee0dff457a..f9e1ce6666e72 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildResource.cs @@ -20,7 +20,7 @@ public partial class Sample_StaticSiteBuildResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSiteBuild.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteBuild.json // this example is just showing the usage of "StaticSites_GetStaticSiteBuild" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_GetAStaticSiteBuild() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/DeleteStaticSiteBuild.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DeleteStaticSiteBuild.json // this example is just showing the usage of "StaticSites_DeleteStaticSiteBuild" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Delete_DeleteAStaticSiteBuild() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdateAppSettings_CreatesOrUpdatesTheFunctionAppSettingsOfAStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/CreateOrUpdateStaticSiteBuildAppSettings.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CreateOrUpdateStaticSiteBuildAppSettings.json // this example is just showing the usage of "StaticSites_CreateOrUpdateStaticSiteBuildAppSettings" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -116,7 +116,7 @@ public async Task CreateOrUpdateAppSettings_CreatesOrUpdatesTheFunctionAppSettin [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdateFunctionAppSettings_CreatesOrUpdatesTheFunctionAppSettingsOfAStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/CreateOrUpdateStaticSiteBuildFunctionAppSettings.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CreateOrUpdateStaticSiteBuildFunctionAppSettings.json // this example is just showing the usage of "StaticSites_CreateOrUpdateStaticSiteBuildFunctionAppSettings" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -152,7 +152,7 @@ public async Task CreateOrUpdateFunctionAppSettings_CreatesOrUpdatesTheFunctionA [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetFunctions_GetsTheFunctionsOfAParticularStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListStaticSiteBuildFunctions.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListStaticSiteBuildFunctions.json // this example is just showing the usage of "StaticSites_ListStaticSiteBuildFunctions" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -183,7 +183,7 @@ public async Task GetFunctions_GetsTheFunctionsOfAParticularStaticSiteBuild() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetStaticSiteBuildAppSettings_GetAppSettingsOfAStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListStaticSiteBuildAppSettings.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListStaticSiteBuildAppSettings.json // this example is just showing the usage of "StaticSites_ListStaticSiteBuildAppSettings" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -211,7 +211,7 @@ public async Task GetStaticSiteBuildAppSettings_GetAppSettingsOfAStaticSiteBuild [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetFunctionAppSettings_GetFunctionAppSettingsOfAStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListStaticSiteBuildFunctionAppSettings.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListStaticSiteBuildFunctionAppSettings.json // this example is just showing the usage of "StaticSites_ListStaticSiteBuildFunctionAppSettings" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -234,12 +234,44 @@ public async Task GetFunctionAppSettings_GetFunctionAppSettingsOfAStaticSiteBuil Console.WriteLine($"Succeeded: {result}"); } + // List full details of database connections for the static site build. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetBuildDatabaseConnectionsWithDetails_ListFullDetailsOfDatabaseConnectionsForTheStaticSiteBuild() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteBuildDatabaseConnectionsWithDetails.json + // this example is just showing the usage of "StaticSites_GetBuildDatabaseConnectionsWithDetails" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteBuildResource created on azure + // for more information of creating StaticSiteBuildResource, please refer to the document of StaticSiteBuildResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string environmentName = "default"; + ResourceIdentifier staticSiteBuildResourceId = StaticSiteBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName); + StaticSiteBuildResource staticSiteBuild = client.GetStaticSiteBuildResource(staticSiteBuildResourceId); + + // invoke the operation and iterate over the result + await foreach (StaticSiteDatabaseConnectionData item in staticSiteBuild.GetBuildDatabaseConnectionsWithDetailsAsync()) + { + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {item.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + // Deploy a site from a zipped package to a particular static site build [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateZipDeployment_DeployASiteFromAZippedPackageToAParticularStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/StaticSiteBuildZipDeploy.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/StaticSiteBuildZipDeploy.json // this example is just showing the usage of "StaticSites_CreateZipDeploymentForStaticSiteBuild" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildUserProvidedFunctionAppCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildUserProvidedFunctionAppCollection.cs index 03d017d58af08..7e92a4709e626 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildUserProvidedFunctionAppCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildUserProvidedFunctionAppCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_StaticSiteBuildUserProvidedFunctionAppCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetDetailsOfTheUserProvidedFunctionAppsRegisteredWithAStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetUserProvidedFunctionAppsForStaticSiteBuild.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetUserProvidedFunctionAppsForStaticSiteBuild.json // this example is just showing the usage of "StaticSites_GetUserProvidedFunctionAppsForStaticSiteBuild" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_GetDetailsOfTheUserProvidedFunctionAppsRegisteredWithAS [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithAStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetUserProvidedFunctionAppForStaticSiteBuild.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetUserProvidedFunctionAppForStaticSiteBuild.json // this example is just showing the usage of "StaticSites_GetUserProvidedFunctionAppForStaticSiteBuild" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Get_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithAStati [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithAStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetUserProvidedFunctionAppForStaticSiteBuild.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetUserProvidedFunctionAppForStaticSiteBuild.json // this example is just showing the usage of "StaticSites_GetUserProvidedFunctionAppForStaticSiteBuild" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -125,7 +125,7 @@ public async Task Exists_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithASt [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithAStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetUserProvidedFunctionAppForStaticSiteBuild.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetUserProvidedFunctionAppForStaticSiteBuild.json // this example is just showing the usage of "StaticSites_GetUserProvidedFunctionAppForStaticSiteBuild" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -169,7 +169,7 @@ public async Task GetIfExists_GetDetailsOfTheUserProvidedFunctionAppRegisteredWi [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_RegisterAUserProvidedFunctionAppWithAStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/RegisterUserProvidedFunctionAppWithStaticSiteBuild.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/RegisterUserProvidedFunctionAppWithStaticSiteBuild.json // this example is just showing the usage of "StaticSites_RegisterUserProvidedFunctionAppWithStaticSiteBuild" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildUserProvidedFunctionAppResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildUserProvidedFunctionAppResource.cs index 3eefdd64d9529..fa56ac81e6cab 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildUserProvidedFunctionAppResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildUserProvidedFunctionAppResource.cs @@ -19,7 +19,7 @@ public partial class Sample_StaticSiteBuildUserProvidedFunctionAppResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithAStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetUserProvidedFunctionAppForStaticSiteBuild.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetUserProvidedFunctionAppForStaticSiteBuild.json // this example is just showing the usage of "StaticSites_GetUserProvidedFunctionAppForStaticSiteBuild" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithAStati [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_RegisterAUserProvidedFunctionAppWithAStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/RegisterUserProvidedFunctionAppWithStaticSiteBuild.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/RegisterUserProvidedFunctionAppWithStaticSiteBuild.json // this example is just showing the usage of "StaticSites_RegisterUserProvidedFunctionAppWithStaticSiteBuild" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Update_RegisterAUserProvidedFunctionAppWithAStaticSiteBuild() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DetachTheUserProvidedFunctionAppFromTheStaticSiteBuild() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/DetachUserProvidedFunctionAppFromStaticSiteBuild.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DetachUserProvidedFunctionAppFromStaticSiteBuild.json // this example is just showing the usage of "StaticSites_DetachUserProvidedFunctionAppFromStaticSiteBuild" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteCollection.cs index f1ba0dbd95e62..09958f2ed2180 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_StaticSiteCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetStaticSitesForAResourceGroup() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSites.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSites.json // this example is just showing the usage of "StaticSites_GetStaticSitesByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_GetStaticSitesForAResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDetailsForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSite.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSite.json // this example is just showing the usage of "StaticSites_GetStaticSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_GetDetailsForAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetDetailsForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSite.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSite.json // this example is just showing the usage of "StaticSites_GetStaticSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -121,7 +121,7 @@ public async Task Exists_GetDetailsForAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetDetailsForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSite.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSite.json // this example is just showing the usage of "StaticSites_GetStaticSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +163,7 @@ public async Task GetIfExists_GetDetailsForAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/CreateOrUpdateStaticSite.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CreateOrUpdateStaticSite.json // this example is just showing the usage of "StaticSites_CreateOrUpdateStaticSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteCustomDomainOverviewCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteCustomDomainOverviewCollection.cs index 42c8e97a48766..245215f5b9567 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteCustomDomainOverviewCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteCustomDomainOverviewCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_StaticSiteCustomDomainOverviewCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListCustomDomainsForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSiteCustomDomains.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteCustomDomains.json // this example is just showing the usage of "StaticSites_ListStaticSiteCustomDomains" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ListCustomDomainsForAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetCustomDomainForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSiteCustomDomain.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteCustomDomain.json // this example is just showing the usage of "StaticSites_GetStaticSiteCustomDomain" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_GetCustomDomainForAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetCustomDomainForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSiteCustomDomain.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteCustomDomain.json // this example is just showing the usage of "StaticSites_GetStaticSiteCustomDomain" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_GetCustomDomainForAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetCustomDomainForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSiteCustomDomain.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteCustomDomain.json // this example is just showing the usage of "StaticSites_GetStaticSiteCustomDomain" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_GetCustomDomainForAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateACustomDomainForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/CreateOrUpdateStaticSiteCustomDomain.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CreateOrUpdateStaticSiteCustomDomain.json // this example is just showing the usage of "StaticSites_CreateOrUpdateStaticSiteCustomDomain" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteCustomDomainOverviewResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteCustomDomainOverviewResource.cs index 11365c3fd8427..90e3d5720700e 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteCustomDomainOverviewResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteCustomDomainOverviewResource.cs @@ -20,7 +20,7 @@ public partial class Sample_StaticSiteCustomDomainOverviewResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetCustomDomainForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSiteCustomDomain.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteCustomDomain.json // this example is just showing the usage of "StaticSites_GetStaticSiteCustomDomain" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_GetCustomDomainForAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateACustomDomainForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/CreateOrUpdateStaticSiteCustomDomain.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CreateOrUpdateStaticSiteCustomDomain.json // this example is just showing the usage of "StaticSites_CreateOrUpdateStaticSiteCustomDomain" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Update_CreateOrUpdateACustomDomainForAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteACustomDomainForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/DeleteStaticSiteCustomDomain.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DeleteStaticSiteCustomDomain.json // this example is just showing the usage of "StaticSites_DeleteStaticSiteCustomDomain" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -114,7 +114,7 @@ public async Task Delete_DeleteACustomDomainForAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ValidateCustomDomainCanBeAddedToStaticSite_ValidateACustomDomainForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ValidateStaticSiteCustomDomain.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ValidateStaticSiteCustomDomain.json // this example is just showing the usage of "StaticSites_ValidateCustomDomainCanBeAddedToStaticSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteDatabaseConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteDatabaseConnectionCollection.cs new file mode 100644 index 0000000000000..f3815b0690776 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteDatabaseConnectionCollection.cs @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_StaticSiteDatabaseConnectionCollection + { + // List overviews of database connections for the static site. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListOverviewsOfDatabaseConnectionsForTheStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteDatabaseConnections.json + // this example is just showing the usage of "StaticSites_GetDatabaseConnections" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteResource created on azure + // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId); + + // get the collection of this StaticSiteDatabaseConnectionResource + StaticSiteDatabaseConnectionCollection collection = staticSite.GetStaticSiteDatabaseConnections(); + + // invoke the operation and iterate over the result + await foreach (StaticSiteDatabaseConnectionResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteDatabaseConnectionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get overview of database connections for the static site. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetOverviewOfDatabaseConnectionsForTheStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteDatabaseConnection.json + // this example is just showing the usage of "StaticSites_GetDatabaseConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteResource created on azure + // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId); + + // get the collection of this StaticSiteDatabaseConnectionResource + StaticSiteDatabaseConnectionCollection collection = staticSite.GetStaticSiteDatabaseConnections(); + + // invoke the operation + string databaseConnectionName = "default"; + StaticSiteDatabaseConnectionResource result = await collection.GetAsync(databaseConnectionName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteDatabaseConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get overview of database connections for the static site. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetOverviewOfDatabaseConnectionsForTheStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteDatabaseConnection.json + // this example is just showing the usage of "StaticSites_GetDatabaseConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteResource created on azure + // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId); + + // get the collection of this StaticSiteDatabaseConnectionResource + StaticSiteDatabaseConnectionCollection collection = staticSite.GetStaticSiteDatabaseConnections(); + + // invoke the operation + string databaseConnectionName = "default"; + bool result = await collection.ExistsAsync(databaseConnectionName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get overview of database connections for the static site. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetOverviewOfDatabaseConnectionsForTheStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteDatabaseConnection.json + // this example is just showing the usage of "StaticSites_GetDatabaseConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteResource created on azure + // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId); + + // get the collection of this StaticSiteDatabaseConnectionResource + StaticSiteDatabaseConnectionCollection collection = staticSite.GetStaticSiteDatabaseConnections(); + + // invoke the operation + string databaseConnectionName = "default"; + NullableResponse response = await collection.GetIfExistsAsync(databaseConnectionName); + StaticSiteDatabaseConnectionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteDatabaseConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Create or update a database connection for a static site + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateADatabaseConnectionForAStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CreateOrUpdateStaticSiteDatabaseConnection.json + // this example is just showing the usage of "StaticSites_CreateOrUpdateDatabaseConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteResource created on azure + // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId); + + // get the collection of this StaticSiteDatabaseConnectionResource + StaticSiteDatabaseConnectionCollection collection = staticSite.GetStaticSiteDatabaseConnections(); + + // invoke the operation + string databaseConnectionName = "default"; + StaticSiteDatabaseConnectionData data = new StaticSiteDatabaseConnectionData() + { + ResourceId = new ResourceIdentifier("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/databaseRG/providers/Microsoft.DocumentDB/databaseAccounts/exampleDatabaseName"), + ConnectionIdentity = "SystemAssigned", + ConnectionString = "AccountEndpoint=https://exampleDatabaseName.documents.azure.com:443/;Database=mydb;", + Region = "West US 2", + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, databaseConnectionName, data); + StaticSiteDatabaseConnectionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteDatabaseConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteDatabaseConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteDatabaseConnectionResource.cs new file mode 100644 index 0000000000000..969b9b17f48ac --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteDatabaseConnectionResource.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_StaticSiteDatabaseConnectionResource + { + // Get overview of database connections for the static site. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetOverviewOfDatabaseConnectionsForTheStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteDatabaseConnection.json + // this example is just showing the usage of "StaticSites_GetDatabaseConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteDatabaseConnectionResource created on azure + // for more information of creating StaticSiteDatabaseConnectionResource, please refer to the document of StaticSiteDatabaseConnectionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string databaseConnectionName = "default"; + ResourceIdentifier staticSiteDatabaseConnectionResourceId = StaticSiteDatabaseConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, databaseConnectionName); + StaticSiteDatabaseConnectionResource staticSiteDatabaseConnection = client.GetStaticSiteDatabaseConnectionResource(staticSiteDatabaseConnectionResourceId); + + // invoke the operation + StaticSiteDatabaseConnectionResource result = await staticSiteDatabaseConnection.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteDatabaseConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Delete a database connection from a static site. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteADatabaseConnectionFromAStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DeleteStaticSiteDatabaseConnection.json + // this example is just showing the usage of "StaticSites_DeleteDatabaseConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteDatabaseConnectionResource created on azure + // for more information of creating StaticSiteDatabaseConnectionResource, please refer to the document of StaticSiteDatabaseConnectionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string databaseConnectionName = "default"; + ResourceIdentifier staticSiteDatabaseConnectionResourceId = StaticSiteDatabaseConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, databaseConnectionName); + StaticSiteDatabaseConnectionResource staticSiteDatabaseConnection = client.GetStaticSiteDatabaseConnectionResource(staticSiteDatabaseConnectionResourceId); + + // invoke the operation + await staticSiteDatabaseConnection.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Patch a database connection for a static site + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_PatchADatabaseConnectionForAStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/PatchStaticSiteDatabaseConnection.json + // this example is just showing the usage of "StaticSites_UpdateDatabaseConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteDatabaseConnectionResource created on azure + // for more information of creating StaticSiteDatabaseConnectionResource, please refer to the document of StaticSiteDatabaseConnectionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string databaseConnectionName = "default"; + ResourceIdentifier staticSiteDatabaseConnectionResourceId = StaticSiteDatabaseConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, databaseConnectionName); + StaticSiteDatabaseConnectionResource staticSiteDatabaseConnection = client.GetStaticSiteDatabaseConnectionResource(staticSiteDatabaseConnectionResourceId); + + // invoke the operation + StaticSiteDatabaseConnectionPatchContent content = new StaticSiteDatabaseConnectionPatchContent(); + StaticSiteDatabaseConnectionResource result = await staticSiteDatabaseConnection.UpdateAsync(content); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteDatabaseConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get details of database connections for the static site. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetDatabaseConnectionWithDetails_GetDetailsOfDatabaseConnectionsForTheStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteDatabaseConnectionWithDetails.json + // this example is just showing the usage of "StaticSites_GetDatabaseConnectionWithDetails" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteDatabaseConnectionResource created on azure + // for more information of creating StaticSiteDatabaseConnectionResource, please refer to the document of StaticSiteDatabaseConnectionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string databaseConnectionName = "default"; + ResourceIdentifier staticSiteDatabaseConnectionResourceId = StaticSiteDatabaseConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, databaseConnectionName); + StaticSiteDatabaseConnectionResource staticSiteDatabaseConnection = client.GetStaticSiteDatabaseConnectionResource(staticSiteDatabaseConnectionResourceId); + + // invoke the operation + StaticSiteDatabaseConnectionResource result = await staticSiteDatabaseConnection.GetDatabaseConnectionWithDetailsAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteDatabaseConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteLinkedBackendCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteLinkedBackendCollection.cs new file mode 100644 index 0000000000000..a36f4640d4315 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteLinkedBackendCollection.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_StaticSiteLinkedBackendCollection + { + // Get details of the linked backends registered with a static site. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_GetDetailsOfTheLinkedBackendsRegisteredWithAStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetLinkedBackendsForStaticSite.json + // this example is just showing the usage of "StaticSites_GetLinkedBackends" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteResource created on azure + // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId); + + // get the collection of this StaticSiteLinkedBackendResource + StaticSiteLinkedBackendCollection collection = staticSite.GetStaticSiteLinkedBackends(); + + // invoke the operation and iterate over the result + await foreach (StaticSiteLinkedBackendResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteLinkedBackendData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get details of the linked backend registered with a static site by name. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetDetailsOfTheLinkedBackendRegisteredWithAStaticSiteByName() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetLinkedBackendForStaticSite.json + // this example is just showing the usage of "StaticSites_GetLinkedBackend" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteResource created on azure + // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId); + + // get the collection of this StaticSiteLinkedBackendResource + StaticSiteLinkedBackendCollection collection = staticSite.GetStaticSiteLinkedBackends(); + + // invoke the operation + string linkedBackendName = "testBackend"; + StaticSiteLinkedBackendResource result = await collection.GetAsync(linkedBackendName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteLinkedBackendData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get details of the linked backend registered with a static site by name. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetDetailsOfTheLinkedBackendRegisteredWithAStaticSiteByName() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetLinkedBackendForStaticSite.json + // this example is just showing the usage of "StaticSites_GetLinkedBackend" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteResource created on azure + // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId); + + // get the collection of this StaticSiteLinkedBackendResource + StaticSiteLinkedBackendCollection collection = staticSite.GetStaticSiteLinkedBackends(); + + // invoke the operation + string linkedBackendName = "testBackend"; + bool result = await collection.ExistsAsync(linkedBackendName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get details of the linked backend registered with a static site by name. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetDetailsOfTheLinkedBackendRegisteredWithAStaticSiteByName() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetLinkedBackendForStaticSite.json + // this example is just showing the usage of "StaticSites_GetLinkedBackend" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteResource created on azure + // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId); + + // get the collection of this StaticSiteLinkedBackendResource + StaticSiteLinkedBackendCollection collection = staticSite.GetStaticSiteLinkedBackends(); + + // invoke the operation + string linkedBackendName = "testBackend"; + NullableResponse response = await collection.GetIfExistsAsync(linkedBackendName); + StaticSiteLinkedBackendResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteLinkedBackendData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Link a backend to a static site + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_LinkABackendToAStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/LinkBackendToStaticSite.json + // this example is just showing the usage of "StaticSites_LinkBackend" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteResource created on azure + // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId); + + // get the collection of this StaticSiteLinkedBackendResource + StaticSiteLinkedBackendCollection collection = staticSite.GetStaticSiteLinkedBackends(); + + // invoke the operation + string linkedBackendName = "testBackend"; + StaticSiteLinkedBackendData data = new StaticSiteLinkedBackendData() + { + BackendResourceId = new ResourceIdentifier("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/backendRg/providers/Microsoft.Web/sites/testBackend"), + Region = "West US 2", + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, linkedBackendName, data); + StaticSiteLinkedBackendResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteLinkedBackendData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteLinkedBackendResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteLinkedBackendResource.cs new file mode 100644 index 0000000000000..a091f9a43bf0a --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteLinkedBackendResource.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_StaticSiteLinkedBackendResource + { + // Validate if backend can be linked to static site. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task ValidateBackend_ValidateIfBackendCanBeLinkedToStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ValidateLinkedBackendForStaticSite.json + // this example is just showing the usage of "StaticSites_ValidateBackend" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteLinkedBackendResource created on azure + // for more information of creating StaticSiteLinkedBackendResource, please refer to the document of StaticSiteLinkedBackendResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string linkedBackendName = "testBackend"; + ResourceIdentifier staticSiteLinkedBackendResourceId = StaticSiteLinkedBackendResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, linkedBackendName); + StaticSiteLinkedBackendResource staticSiteLinkedBackend = client.GetStaticSiteLinkedBackendResource(staticSiteLinkedBackendResourceId); + + // invoke the operation + StaticSiteLinkedBackendData data = new StaticSiteLinkedBackendData() + { + BackendResourceId = new ResourceIdentifier("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/backendRg/providers/Microsoft.Web/sites/testBackend"), + Region = "West US 2", + }; + await staticSiteLinkedBackend.ValidateBackendAsync(WaitUntil.Completed, data); + + Console.WriteLine($"Succeeded"); + } + + // Get details of the linked backend registered with a static site by name. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetDetailsOfTheLinkedBackendRegisteredWithAStaticSiteByName() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetLinkedBackendForStaticSite.json + // this example is just showing the usage of "StaticSites_GetLinkedBackend" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteLinkedBackendResource created on azure + // for more information of creating StaticSiteLinkedBackendResource, please refer to the document of StaticSiteLinkedBackendResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string linkedBackendName = "testBackend"; + ResourceIdentifier staticSiteLinkedBackendResourceId = StaticSiteLinkedBackendResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, linkedBackendName); + StaticSiteLinkedBackendResource staticSiteLinkedBackend = client.GetStaticSiteLinkedBackendResource(staticSiteLinkedBackendResourceId); + + // invoke the operation + StaticSiteLinkedBackendResource result = await staticSiteLinkedBackend.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteLinkedBackendData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Link a backend to a static site + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_LinkABackendToAStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/LinkBackendToStaticSite.json + // this example is just showing the usage of "StaticSites_LinkBackend" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteLinkedBackendResource created on azure + // for more information of creating StaticSiteLinkedBackendResource, please refer to the document of StaticSiteLinkedBackendResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string linkedBackendName = "testBackend"; + ResourceIdentifier staticSiteLinkedBackendResourceId = StaticSiteLinkedBackendResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, linkedBackendName); + StaticSiteLinkedBackendResource staticSiteLinkedBackend = client.GetStaticSiteLinkedBackendResource(staticSiteLinkedBackendResourceId); + + // invoke the operation + StaticSiteLinkedBackendData data = new StaticSiteLinkedBackendData() + { + BackendResourceId = new ResourceIdentifier("/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/backendRg/providers/Microsoft.Web/sites/testBackend"), + Region = "West US 2", + }; + ArmOperation lro = await staticSiteLinkedBackend.UpdateAsync(WaitUntil.Completed, data); + StaticSiteLinkedBackendResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + StaticSiteLinkedBackendData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Unlink a backend from a static site. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_UnlinkABackendFromAStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/UnlinkBackendFromStaticSite.json + // this example is just showing the usage of "StaticSites_UnlinkBackend" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteLinkedBackendResource created on azure + // for more information of creating StaticSiteLinkedBackendResource, please refer to the document of StaticSiteLinkedBackendResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + string linkedBackendName = "testBackend"; + ResourceIdentifier staticSiteLinkedBackendResourceId = StaticSiteLinkedBackendResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, linkedBackendName); + StaticSiteLinkedBackendResource staticSiteLinkedBackend = client.GetStaticSiteLinkedBackendResource(staticSiteLinkedBackendResourceId); + + // invoke the operation + await staticSiteLinkedBackend.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSitePrivateEndpointConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSitePrivateEndpointConnectionCollection.cs index 58528eaa74acd..a1ecd59ccc82c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSitePrivateEndpointConnectionCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSitePrivateEndpointConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_StaticSitePrivateEndpointConnectionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetAListOfPrivateEndpointConnectionsAssociatedWithASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnectionList.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSitePrivateEndpointConnectionList.json // this example is just showing the usage of "StaticSites_GetPrivateEndpointConnectionList" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_GetAListOfPrivateEndpointConnectionsAssociatedWithASite [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnection.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSitePrivateEndpointConnection.json // this example is just showing the usage of "StaticSites_GetPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_GetAPrivateEndpointConnectionForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnection.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSitePrivateEndpointConnection.json // this example is just showing the usage of "StaticSites_GetPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_GetAPrivateEndpointConnectionForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnection.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSitePrivateEndpointConnection.json // this example is just showing the usage of "StaticSites_GetPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_GetAPrivateEndpointConnectionForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApprovesOrRejectsAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ApproveRejectSitePrivateEndpointConnection.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ApproveRejectSitePrivateEndpointConnection.json // this example is just showing the usage of "StaticSites_ApproveOrRejectPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -187,7 +187,7 @@ public async Task CreateOrUpdate_ApprovesOrRejectsAPrivateEndpointConnectionForA // invoke the operation string privateEndpointConnectionName = "connection"; - PrivateLinkConnectionApprovalRequestInfo info = new PrivateLinkConnectionApprovalRequestInfo() + RemotePrivateEndpointConnectionARMResourceData data = new RemotePrivateEndpointConnectionARMResourceData() { PrivateLinkServiceConnectionState = new PrivateLinkConnectionState() { @@ -196,7 +196,7 @@ public async Task CreateOrUpdate_ApprovesOrRejectsAPrivateEndpointConnectionForA ActionsRequired = "", }, }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, privateEndpointConnectionName, info); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, privateEndpointConnectionName, data); StaticSitePrivateEndpointConnectionResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSitePrivateEndpointConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSitePrivateEndpointConnectionResource.cs index 6fbce2bfea852..60cf3e583ad63 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSitePrivateEndpointConnectionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSitePrivateEndpointConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_StaticSitePrivateEndpointConnectionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnection.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSitePrivateEndpointConnection.json // this example is just showing the usage of "StaticSites_GetPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_GetAPrivateEndpointConnectionForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApprovesOrRejectsAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ApproveRejectSitePrivateEndpointConnection.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ApproveRejectSitePrivateEndpointConnection.json // this example is just showing the usage of "StaticSites_ApproveOrRejectPrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -70,7 +70,7 @@ public async Task Update_ApprovesOrRejectsAPrivateEndpointConnectionForASite() StaticSitePrivateEndpointConnectionResource staticSitePrivateEndpointConnection = client.GetStaticSitePrivateEndpointConnectionResource(staticSitePrivateEndpointConnectionResourceId); // invoke the operation - PrivateLinkConnectionApprovalRequestInfo info = new PrivateLinkConnectionApprovalRequestInfo() + RemotePrivateEndpointConnectionARMResourceData data = new RemotePrivateEndpointConnectionARMResourceData() { PrivateLinkServiceConnectionState = new PrivateLinkConnectionState() { @@ -79,7 +79,7 @@ public async Task Update_ApprovesOrRejectsAPrivateEndpointConnectionForASite() ActionsRequired = "", }, }; - ArmOperation lro = await staticSitePrivateEndpointConnection.UpdateAsync(WaitUntil.Completed, info); + ArmOperation lro = await staticSitePrivateEndpointConnection.UpdateAsync(WaitUntil.Completed, data); StaticSitePrivateEndpointConnectionResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well @@ -94,7 +94,7 @@ public async Task Update_ApprovesOrRejectsAPrivateEndpointConnectionForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAPrivateEndpointConnectionForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/DeleteSitePrivateEndpointConnection.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DeleteSitePrivateEndpointConnection.json // this example is just showing the usage of "StaticSites_DeletePrivateEndpointConnection" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteResource.cs index b19f6dfc5fc11..c88eef37badd5 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteResource.cs @@ -21,7 +21,7 @@ public partial class Sample_StaticSiteResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetStaticSites_GetAllStaticSitesInASubscription() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetAllStaticSites.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetAllStaticSites.json // this example is just showing the usage of "StaticSites_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task GetStaticSites_GetAllStaticSitesInASubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDetailsForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSite.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSite.json // this example is just showing the usage of "StaticSites_GetStaticSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Get_GetDetailsForAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/DeleteStaticSite.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DeleteStaticSite.json // this example is just showing the usage of "StaticSites_DeleteStaticSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -111,7 +111,7 @@ public async Task Delete_DeleteAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PatchAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/PatchStaticSite.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/PatchStaticSite.json // this example is just showing the usage of "StaticSites_UpdateStaticSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -143,7 +143,7 @@ public async Task Update_PatchAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetUsers_ListUsersForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListStaticSiteUsers.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListStaticSiteUsers.json // this example is just showing the usage of "StaticSites_ListStaticSiteUsers" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -174,7 +174,7 @@ public async Task GetUsers_ListUsersForAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task DeleteUser_DeleteAUserForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/DeleteStaticSiteUser.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DeleteStaticSiteUser.json // this example is just showing the usage of "StaticSites_DeleteStaticSiteUser" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -203,7 +203,7 @@ public async Task DeleteUser_DeleteAUserForAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task UpdateUser_CreateOrUpdateAUserForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/UpdateStaticSiteUser.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/UpdateStaticSiteUser.json // this example is just showing the usage of "StaticSites_UpdateStaticSiteUser" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -236,7 +236,7 @@ public async Task UpdateUser_CreateOrUpdateAUserForAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdateAppSettings_CreatesOrUpdatesTheAppSettingsOfAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/CreateOrUpdateStaticSiteAppSettings.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CreateOrUpdateStaticSiteAppSettings.json // this example is just showing the usage of "StaticSites_CreateOrUpdateStaticSiteAppSettings" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -271,7 +271,7 @@ public async Task CreateOrUpdateAppSettings_CreatesOrUpdatesTheAppSettingsOfASta [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdateFunctionAppSettings_CreatesOrUpdatesTheFunctionAppSettingsOfAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/CreateOrUpdateStaticSiteFunctionAppSettings.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CreateOrUpdateStaticSiteFunctionAppSettings.json // this example is just showing the usage of "StaticSites_CreateOrUpdateStaticSiteFunctionAppSettings" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -306,7 +306,7 @@ public async Task CreateOrUpdateFunctionAppSettings_CreatesOrUpdatesTheFunctionA [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateUserRolesInvitationLink_CreateAnInvitationLinkForAUserForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/CreateUserRolesInvitationLink.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CreateUserRolesInvitationLink.json // this example is just showing the usage of "StaticSites_CreateUserRolesInvitationLink" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -341,7 +341,7 @@ public async Task CreateUserRolesInvitationLink_CreateAnInvitationLinkForAUserFo [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Detach_DetachAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/DetachStaticSite.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DetachStaticSite.json // this example is just showing the usage of "StaticSites_DetachStaticSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -368,7 +368,7 @@ public async Task Detach_DetachAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetStaticSiteFunctions_GetsTheFunctionsOfAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListStaticSiteFunctions.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListStaticSiteFunctions.json // this example is just showing the usage of "StaticSites_ListStaticSiteFunctions" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -398,7 +398,7 @@ public async Task GetStaticSiteFunctions_GetsTheFunctionsOfAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAppSettings_GetAppSettingsOfAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListStaticSiteAppSettings.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListStaticSiteAppSettings.json // this example is just showing the usage of "StaticSites_ListStaticSiteAppSettings" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -425,7 +425,7 @@ public async Task GetAppSettings_GetAppSettingsOfAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetConfiguredRoles_ListsTheConfiguredRolesForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListStaticSiteConfiguredRoles.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListStaticSiteConfiguredRoles.json // this example is just showing the usage of "StaticSites_ListStaticSiteConfiguredRoles" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -452,7 +452,7 @@ public async Task GetConfiguredRoles_ListsTheConfiguredRolesForAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetFunctionAppSettings_GetFunctionAppSettingsOfAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListStaticSiteFunctionAppSettings.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListStaticSiteFunctionAppSettings.json // this example is just showing the usage of "StaticSites_ListStaticSiteFunctionAppSettings" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -479,7 +479,7 @@ public async Task GetFunctionAppSettings_GetFunctionAppSettingsOfAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetStaticSiteSecrets_ListSecretsForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListStaticSiteSecrets.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListStaticSiteSecrets.json // this example is just showing the usage of "StaticSites_ListStaticSiteSecrets" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -506,7 +506,7 @@ public async Task GetStaticSiteSecrets_ListSecretsForAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetPrivateLinkResources_GetPrivateLinkResourcesOfASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateLinkResources.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSitePrivateLinkResources.json // this example is just showing the usage of "StaticSites_GetPrivateLinkResources" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -536,7 +536,7 @@ public async Task GetPrivateLinkResources_GetPrivateLinkResourcesOfASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ResetApiKey_ResetTheApiKeyForAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ResetStaticSiteApiKey.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ResetStaticSiteApiKey.json // this example is just showing the usage of "StaticSites_ResetStaticSiteApiKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -563,12 +563,43 @@ public async Task ResetApiKey_ResetTheApiKeyForAStaticSite() Console.WriteLine($"Succeeded"); } + // List full details of database connections for the static site. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetDatabaseConnectionsWithDetails_ListFullDetailsOfDatabaseConnectionsForTheStaticSite() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetStaticSiteDatabaseConnectionsWithDetails.json + // this example is just showing the usage of "StaticSites_GetDatabaseConnectionsWithDetails" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this StaticSiteResource created on azure + // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testStaticSite0"; + ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId); + + // invoke the operation and iterate over the result + await foreach (StaticSiteDatabaseConnectionData item in staticSite.GetDatabaseConnectionsWithDetailsAsync()) + { + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {item.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + // Deploy a site from a zipped package [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateZipDeploymentForStaticSite_DeployASiteFromAZippedPackage() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/StaticSiteZipDeploy.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/StaticSiteZipDeploy.json // this example is just showing the usage of "StaticSites_CreateZipDeploymentForStaticSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteUserProvidedFunctionAppCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteUserProvidedFunctionAppCollection.cs index a4bc603512756..fe182a4f46223 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteUserProvidedFunctionAppCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteUserProvidedFunctionAppCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_StaticSiteUserProvidedFunctionAppCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetDetailsOfTheUserProvidedFunctionAppsRegisteredWithAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetUserProvidedFunctionAppsForStaticSite.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetUserProvidedFunctionAppsForStaticSite.json // this example is just showing the usage of "StaticSites_GetUserProvidedFunctionAppsForStaticSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_GetDetailsOfTheUserProvidedFunctionAppsRegisteredWithAS [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetUserProvidedFunctionAppForStaticSite.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetUserProvidedFunctionAppForStaticSite.json // this example is just showing the usage of "StaticSites_GetUserProvidedFunctionAppForStaticSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithAStati [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetUserProvidedFunctionAppForStaticSite.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetUserProvidedFunctionAppForStaticSite.json // this example is just showing the usage of "StaticSites_GetUserProvidedFunctionAppForStaticSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Exists_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithASt [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetUserProvidedFunctionAppForStaticSite.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetUserProvidedFunctionAppForStaticSite.json // this example is just showing the usage of "StaticSites_GetUserProvidedFunctionAppForStaticSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -165,7 +165,7 @@ public async Task GetIfExists_GetDetailsOfTheUserProvidedFunctionAppRegisteredWi [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_RegisterAUserProvidedFunctionAppWithAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/RegisterUserProvidedFunctionAppWithStaticSite.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/RegisterUserProvidedFunctionAppWithStaticSite.json // this example is just showing the usage of "StaticSites_RegisterUserProvidedFunctionAppWithStaticSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteUserProvidedFunctionAppResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteUserProvidedFunctionAppResource.cs index f8115fe5672b2..829ecea369c12 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteUserProvidedFunctionAppResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteUserProvidedFunctionAppResource.cs @@ -19,7 +19,7 @@ public partial class Sample_StaticSiteUserProvidedFunctionAppResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetUserProvidedFunctionAppForStaticSite.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetUserProvidedFunctionAppForStaticSite.json // this example is just showing the usage of "StaticSites_GetUserProvidedFunctionAppForStaticSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithAStati [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_RegisterAUserProvidedFunctionAppWithAStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/RegisterUserProvidedFunctionAppWithStaticSite.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/RegisterUserProvidedFunctionAppWithStaticSite.json // this example is just showing the usage of "StaticSites_RegisterUserProvidedFunctionAppWithStaticSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,7 +90,7 @@ public async Task Update_RegisterAUserProvidedFunctionAppWithAStaticSite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DetachTheUserProvidedFunctionAppFromTheStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/DetachUserProvidedFunctionAppFromStaticSite.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DetachUserProvidedFunctionAppFromStaticSite.json // this example is just showing the usage of "StaticSites_DetachUserProvidedFunctionAppFromStaticSite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 34d78cd14c49f..05152db06f55c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -16,12 +16,145 @@ namespace Azure.ResourceManager.AppService.Samples { public partial class Sample_SubscriptionResourceExtensions { + // Validate App Service Certificate purchase information by subscription + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task ValidateAppServiceCertificateOrderPurchaseInformation_ValidateAppServiceCertificatePurchaseInformationBySubscription() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/ValidateAppServiceCertificatePurchaseInformationBySubscription.json + // this example is just showing the usage of "AppServiceCertificateOrders_ValidatePurchaseInformation" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AppServiceCertificateOrderData data = new AppServiceCertificateOrderData(new AzureLocation("Global")) + { + Certificates = +{ +["SampleCertName1"] = new AppServiceCertificateProperties() +{ +KeyVaultId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), +KeyVaultSecretName = "SampleSecretName1", +}, +["SampleCertName2"] = new AppServiceCertificateProperties() +{ +KeyVaultId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"), +KeyVaultSecretName = "SampleSecretName2", +}, +}, + DistinguishedName = "CN=SampleCustomDomain.com", + ValidityInYears = 2, + KeySize = 2048, + ProductType = CertificateProductType.StandardDomainValidatedSsl, + IsAutoRenew = true, + }; + await subscriptionResource.ValidateAppServiceCertificateOrderPurchaseInformationAsync(data); + + Console.WriteLine($"Succeeded"); + } + + // Check domain availability + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CheckAppServiceDomainRegistrationAvailability_CheckDomainAvailability() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/CheckDomainAvailability.json + // this example is just showing the usage of "Domains_CheckAvailability" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AppServiceDomainNameIdentifier identifier = new AppServiceDomainNameIdentifier() + { + Name = "abcd.com", + }; + DomainAvailabilityCheckResult result = await subscriptionResource.CheckAppServiceDomainRegistrationAvailabilityAsync(identifier); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get Domain Control Center Sso Request + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetControlCenterSsoRequestDomain_GetDomainControlCenterSsoRequest() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/GetDomainControlCenterSsoRequest.json + // this example is just showing the usage of "Domains_GetControlCenterSsoRequest" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + DomainControlCenterSsoRequestInfo result = await subscriptionResource.GetControlCenterSsoRequestDomainAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + // List domain recommendations + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAppServiceDomainRecommendations_ListDomainRecommendations() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/ListDomainRecommendations.json + // this example is just showing the usage of "Domains_ListRecommendations" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + DomainRecommendationSearchContent content = new DomainRecommendationSearchContent() + { + Keywords = "example1", + MaxDomainRecommendations = 10, + }; + await foreach (AppServiceDomainNameIdentifier item in subscriptionResource.GetAppServiceDomainRecommendationsAsync(content)) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + // List ResourceHealthMetadata for a subscription [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAllResourceHealthMetadata_ListResourceHealthMetadataForASubscription() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListResourceHealthMetadataBySubscription.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListResourceHealthMetadataBySubscription.json // this example is just showing the usage of "ResourceHealthMetadata_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -45,12 +178,97 @@ public async Task GetAllResourceHealthMetadata_ListResourceHealthMetadataForASub Console.WriteLine($"Succeeded"); } + // Get custom hostnames under subscription + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetCustomHostNameSites_GetCustomHostnamesUnderSubscription() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListCustomHostNameSites.json + // this example is just showing the usage of "ListCustomHostNameSites" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (CustomHostnameSites item in subscriptionResource.GetCustomHostNameSitesAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get specific custom hostname under subscription + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetCustomHostNameSites_GetSpecificCustomHostnameUnderSubscription() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListCustomSpecificHostNameSites.json + // this example is just showing the usage of "ListCustomHostNameSites" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + string hostname = "www.example.com"; + await foreach (CustomHostnameSites item in subscriptionResource.GetCustomHostNameSitesAsync(hostname: hostname)) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + + // List aseregions + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAseRegions_ListAseregions() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListAseRegions.json + // this example is just showing the usage of "ListAseRegions" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (AppServiceAseRegion item in subscriptionResource.GetAseRegionsAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + // VerifyHostingEnvironmentVnet [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task VerifyHostingEnvironmentVnet_VerifyHostingEnvironmentVnet() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/VerifyHostingEnvironmentVnet.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/VerifyHostingEnvironmentVnet.json // this example is just showing the usage of "VerifyHostingEnvironmentVnet" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -76,12 +294,41 @@ public async Task VerifyHostingEnvironmentVnet_VerifyHostingEnvironmentVnet() Console.WriteLine($"Succeeded: {result}"); } + // Get usages in location for subscription + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetGetUsagesInLocations_GetUsagesInLocationForSubscription() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetUsagesInLocation.json + // this example is just showing the usage of "GetUsagesInLocation_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + AzureLocation location = new AzureLocation("West US"); + await foreach (CsmUsageQuota item in subscriptionResource.GetGetUsagesInLocationsAsync(location)) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + // Generates a preview workflow file for the static site [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task PreviewStaticSiteWorkflow_GeneratesAPreviewWorkflowFileForTheStaticSite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GenerateStaticSiteWorkflowPreview.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GenerateStaticSiteWorkflowPreview.json // this example is just showing the usage of "StaticSites_PreviewWorkflow" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_TenantResourceExtensions.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_TenantResourceExtensions.cs index 06001376938d6..787f296339e8c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_TenantResourceExtensions.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_TenantResourceExtensions.cs @@ -20,7 +20,7 @@ public partial class Sample_TenantResourceExtensions [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetOperationsCertificateRegistrationProviders_ListOperations() { - // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2021-02-01/examples/ListOperations.json + // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2023-12-01/examples/ListOperations.json // this example is just showing the usage of "CertificateRegistrationProvider_ListOperations" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -46,7 +46,7 @@ public async Task GetOperationsCertificateRegistrationProviders_ListOperations() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetOperationsDomainRegistrationProviders_ListOperations() { - // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-02-01/examples/ListOperations.json + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/ListOperations.json // this example is just showing the usage of "DomainRegistrationProvider_ListOperations" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -72,7 +72,7 @@ public async Task GetOperationsDomainRegistrationProviders_ListOperations() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetFunctionAppStacksProviders_GetFunctionAppStacks() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetFunctionAppStacks.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetFunctionAppStacks.json // this example is just showing the usage of "Provider_GetFunctionAppStacks" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -98,7 +98,7 @@ public async Task GetFunctionAppStacksProviders_GetFunctionAppStacks() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetFunctionAppStacksForLocationProviders_GetLocationsFunctionAppStacks() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetFunctionAppStacksForLocation.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetFunctionAppStacksForLocation.json // this example is just showing the usage of "Provider_GetFunctionAppStacksForLocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -125,7 +125,7 @@ public async Task GetFunctionAppStacksForLocationProviders_GetLocationsFunctionA [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetWebAppStacksByLocation_GetLocationsWebAppStacks() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetWebAppStacksForLocation.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebAppStacksForLocation.json // this example is just showing the usage of "Provider_GetWebAppStacksForLocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -152,7 +152,7 @@ public async Task GetWebAppStacksByLocation_GetLocationsWebAppStacks() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetOperationsProviders_ListOperations() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListOperations.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListOperations.json // this example is just showing the usage of "Provider_ListOperations" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -178,7 +178,7 @@ public async Task GetOperationsProviders_ListOperations() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetWebAppStacksProviders_GetWebAppStacks() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetWebAppStacks.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebAppStacks.json // this example is just showing the usage of "Provider_GetWebAppStacks" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_TopLevelDomainCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_TopLevelDomainCollection.cs index fc2117cac3baf..fa1d506447de6 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_TopLevelDomainCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_TopLevelDomainCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_TopLevelDomainCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListTopLevelDomains() { - // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-02-01/examples/ListTopLevelDomains.json + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/ListTopLevelDomains.json // this example is just showing the usage of "TopLevelDomains_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task GetAll_ListTopLevelDomains() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetTopLevelDomain() { - // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-02-01/examples/GetTopLevelDomain.json + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/GetTopLevelDomain.json // this example is just showing the usage of "TopLevelDomains_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task Get_GetTopLevelDomain() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetTopLevelDomain() { - // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-02-01/examples/GetTopLevelDomain.json + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/GetTopLevelDomain.json // this example is just showing the usage of "TopLevelDomains_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -117,7 +117,7 @@ public async Task Exists_GetTopLevelDomain() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetTopLevelDomain() { - // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-02-01/examples/GetTopLevelDomain.json + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/GetTopLevelDomain.json // this example is just showing the usage of "TopLevelDomains_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_TopLevelDomainResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_TopLevelDomainResource.cs index 4f317ce049b80..840c7e08a18ec 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_TopLevelDomainResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_TopLevelDomainResource.cs @@ -20,7 +20,7 @@ public partial class Sample_TopLevelDomainResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetTopLevelDomain() { - // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-02-01/examples/GetTopLevelDomain.json + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/GetTopLevelDomain.json // this example is just showing the usage of "TopLevelDomains_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_GetTopLevelDomain() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAgreements_ListTopLevelDomainAgreements() { - // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-02-01/examples/ListTopLevelDomainAgreements.json + // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2023-12-01/examples/ListTopLevelDomainAgreements.json // this example is just showing the usage of "TopLevelDomains_ListAgreements" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebAppRequestHistoryCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebAppRequestHistoryCollection.cs new file mode 100644 index 0000000000000..40ed24c5c37e4 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebAppRequestHistoryCollection.cs @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WebAppRequestHistoryCollection + { + // List repetition request history + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListRepetitionRequestHistory() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActionRepetitionsRequestHistories_List.json + // this example is just showing the usage of "WorkflowRunActionRepetitionsRequestHistories_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunActionRepetitionResource created on azure + // for more information of creating WorkflowRunActionRepetitionResource, please refer to the document of WorkflowRunActionRepetitionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + string workflowName = "test-workflow"; + string runName = "08586776228332053161046300351"; + string actionName = "HTTP_Webhook"; + string repetitionName = "000001"; + ResourceIdentifier workflowRunActionRepetitionResourceId = WorkflowRunActionRepetitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + WorkflowRunActionRepetitionResource workflowRunActionRepetition = client.GetWorkflowRunActionRepetitionResource(workflowRunActionRepetitionResourceId); + + // get the collection of this WebAppRequestHistoryResource + WebAppRequestHistoryCollection collection = workflowRunActionRepetition.GetWebAppRequestHistories(); + + // invoke the operation and iterate over the result + await foreach (WebAppRequestHistoryResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppRequestHistoryData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get a repetition request history + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetARepetitionRequestHistory() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActionRepetitionsRequestHistories_Get.json + // this example is just showing the usage of "WorkflowRunActionRepetitionsRequestHistories_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunActionRepetitionResource created on azure + // for more information of creating WorkflowRunActionRepetitionResource, please refer to the document of WorkflowRunActionRepetitionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + string workflowName = "test-workflow"; + string runName = "08586776228332053161046300351"; + string actionName = "HTTP_Webhook"; + string repetitionName = "000001"; + ResourceIdentifier workflowRunActionRepetitionResourceId = WorkflowRunActionRepetitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + WorkflowRunActionRepetitionResource workflowRunActionRepetition = client.GetWorkflowRunActionRepetitionResource(workflowRunActionRepetitionResourceId); + + // get the collection of this WebAppRequestHistoryResource + WebAppRequestHistoryCollection collection = workflowRunActionRepetition.GetWebAppRequestHistories(); + + // invoke the operation + string requestHistoryName = "08586611142732800686"; + WebAppRequestHistoryResource result = await collection.GetAsync(requestHistoryName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppRequestHistoryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get a repetition request history + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetARepetitionRequestHistory() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActionRepetitionsRequestHistories_Get.json + // this example is just showing the usage of "WorkflowRunActionRepetitionsRequestHistories_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunActionRepetitionResource created on azure + // for more information of creating WorkflowRunActionRepetitionResource, please refer to the document of WorkflowRunActionRepetitionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + string workflowName = "test-workflow"; + string runName = "08586776228332053161046300351"; + string actionName = "HTTP_Webhook"; + string repetitionName = "000001"; + ResourceIdentifier workflowRunActionRepetitionResourceId = WorkflowRunActionRepetitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + WorkflowRunActionRepetitionResource workflowRunActionRepetition = client.GetWorkflowRunActionRepetitionResource(workflowRunActionRepetitionResourceId); + + // get the collection of this WebAppRequestHistoryResource + WebAppRequestHistoryCollection collection = workflowRunActionRepetition.GetWebAppRequestHistories(); + + // invoke the operation + string requestHistoryName = "08586611142732800686"; + bool result = await collection.ExistsAsync(requestHistoryName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get a repetition request history + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetARepetitionRequestHistory() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActionRepetitionsRequestHistories_Get.json + // this example is just showing the usage of "WorkflowRunActionRepetitionsRequestHistories_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunActionRepetitionResource created on azure + // for more information of creating WorkflowRunActionRepetitionResource, please refer to the document of WorkflowRunActionRepetitionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + string workflowName = "test-workflow"; + string runName = "08586776228332053161046300351"; + string actionName = "HTTP_Webhook"; + string repetitionName = "000001"; + ResourceIdentifier workflowRunActionRepetitionResourceId = WorkflowRunActionRepetitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + WorkflowRunActionRepetitionResource workflowRunActionRepetition = client.GetWorkflowRunActionRepetitionResource(workflowRunActionRepetitionResourceId); + + // get the collection of this WebAppRequestHistoryResource + WebAppRequestHistoryCollection collection = workflowRunActionRepetition.GetWebAppRequestHistories(); + + // invoke the operation + string requestHistoryName = "08586611142732800686"; + NullableResponse response = await collection.GetIfExistsAsync(requestHistoryName); + WebAppRequestHistoryResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppRequestHistoryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebAppRequestHistoryResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebAppRequestHistoryResource.cs new file mode 100644 index 0000000000000..7e3ba305cdb75 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebAppRequestHistoryResource.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WebAppRequestHistoryResource + { + // Get a repetition request history + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetARepetitionRequestHistory() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActionRepetitionsRequestHistories_Get.json + // this example is just showing the usage of "WorkflowRunActionRepetitionsRequestHistories_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebAppRequestHistoryResource created on azure + // for more information of creating WebAppRequestHistoryResource, please refer to the document of WebAppRequestHistoryResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + string workflowName = "test-workflow"; + string runName = "08586776228332053161046300351"; + string actionName = "HTTP_Webhook"; + string repetitionName = "000001"; + string requestHistoryName = "08586611142732800686"; + ResourceIdentifier webAppRequestHistoryResourceId = WebAppRequestHistoryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName, requestHistoryName); + WebAppRequestHistoryResource webAppRequestHistory = client.GetWebAppRequestHistoryResource(webAppRequestHistoryResourceId); + + // invoke the operation + WebAppRequestHistoryResource result = await webAppRequestHistory.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebAppRequestHistoryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteCollection.cs new file mode 100644 index 0000000000000..d112cdb6df3be --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteCollection.cs @@ -0,0 +1,417 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WebSiteCollection + { + // List Web Apps by Resource group + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListWebAppsByResourceGroup() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListWebAppsByResourceGroup.json + // this example is just showing the usage of "WebApps_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WebSiteResource + WebSiteCollection collection = resourceGroupResource.GetWebSites(); + + // invoke the operation and iterate over the result + await foreach (WebSiteResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebSiteData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get Web App + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetWebApp() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebApp.json + // this example is just showing the usage of "WebApps_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WebSiteResource + WebSiteCollection collection = resourceGroupResource.GetWebSites(); + + // invoke the operation + string name = "sitef6141"; + WebSiteResource result = await collection.GetAsync(name); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebSiteData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get Web App + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetWebApp() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebApp.json + // this example is just showing the usage of "WebApps_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WebSiteResource + WebSiteCollection collection = resourceGroupResource.GetWebSites(); + + // invoke the operation + string name = "sitef6141"; + bool result = await collection.ExistsAsync(name); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get Web App + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetWebApp() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebApp.json + // this example is just showing the usage of "WebApps_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WebSiteResource + WebSiteCollection collection = resourceGroupResource.GetWebSites(); + + // invoke the operation + string name = "sitef6141"; + NullableResponse response = await collection.GetIfExistsAsync(name); + WebSiteResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebSiteData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Clone web app + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CloneWebApp() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CloneWebApp.json + // this example is just showing the usage of "WebApps_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WebSiteResource + WebSiteCollection collection = resourceGroupResource.GetWebSites(); + + // invoke the operation + string name = "sitef6141"; + WebSiteData data = new WebSiteData(new AzureLocation("East US")) + { + CloningInfo = new CloningInfo(new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg456/providers/Microsoft.Web/sites/srcsiteg478")) + { + CanOverwrite = false, + CloneCustomHostNames = true, + CloneSourceControl = true, + SourceWebAppLocation = new AzureLocation("West Europe"), + HostingEnvironment = "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg456/providers/Microsoft.Web/hostingenvironments/aseforsites", + AppSettingsOverrides = +{ +["Setting1"] = "NewValue1", +["Setting3"] = "NewValue5", +}, + ConfigureLoadBalancing = false, + }, + Kind = "app", + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); + WebSiteResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebSiteData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Create or Update Flex Consumption function app + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateFlexConsumptionFunctionApp() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CreateOrUpdateFunctionAppFlexConsumption.json + // this example is just showing the usage of "WebApps_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WebSiteResource + WebSiteCollection collection = resourceGroupResource.GetWebSites(); + + // invoke the operation + string name = "sitef6141"; + WebSiteData data = new WebSiteData(new AzureLocation("East US")) + { + SiteConfig = new SiteConfigProperties() + { + AppSettings = +{ +new AppServiceNameValuePair() +{ +Name = "AzureWebJobsStorage", +Value = "DefaultEndpointsProtocol=https;AccountName=StorageAccountName;AccountKey=Sanitized;EndpointSuffix=core.windows.net", +},new AppServiceNameValuePair() +{ +Name = "APPLICATIONINSIGHTS_CONNECTION_STRING", +Value = "InstrumentationKey=Sanitized;IngestionEndpoint=Sanitized;LiveEndpoint=Sanitized", +} +}, + }, + FunctionAppConfig = new FunctionAppConfig() + { + DeploymentStorage = new FunctionAppStorage() + { + StorageType = FunctionAppStorageType.BlobContainer, + Value = new Uri("https://storageAccountName.blob.core.windows.net/containername"), + Authentication = new FunctionAppStorageAuthentication() + { + AuthenticationType = FunctionAppStorageAccountAuthenticationType.StorageAccountConnectionString, + StorageAccountConnectionStringName = "TheAppSettingName", + }, + }, + Runtime = new FunctionAppRuntime() + { + Name = FunctionAppRuntimeName.Python, + Version = "3.11", + }, + ScaleAndConcurrency = new FunctionAppScaleAndConcurrency() + { + MaximumInstanceCount = 100, + InstanceMemoryMB = 2048, + }, + }, + Kind = "functionapp,linux", + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); + WebSiteResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebSiteData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Create or Update Flex Consumption function app with details + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateFlexConsumptionFunctionAppWithDetails() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CreateOrUpdateFunctionAppFlexConsumptionWithDetails.json + // this example is just showing the usage of "WebApps_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WebSiteResource + WebSiteCollection collection = resourceGroupResource.GetWebSites(); + + // invoke the operation + string name = "sitef6141"; + WebSiteData data = new WebSiteData(new AzureLocation("East US")) + { + SiteConfig = new SiteConfigProperties() + { + AppSettings = +{ +new AppServiceNameValuePair() +{ +Name = "AzureWebJobsStorage", +Value = "DefaultEndpointsProtocol=https;AccountName=StorageAccountName;AccountKey=Sanitized;EndpointSuffix=core.windows.net", +},new AppServiceNameValuePair() +{ +Name = "APPLICATIONINSIGHTS_CONNECTION_STRING", +Value = "InstrumentationKey=Sanitized;IngestionEndpoint=Sanitized;LiveEndpoint=Sanitized", +} +}, + }, + FunctionAppConfig = new FunctionAppConfig() + { + DeploymentStorage = new FunctionAppStorage() + { + StorageType = FunctionAppStorageType.BlobContainer, + Value = new Uri("https://storageAccountName.blob.core.windows.net/containername"), + Authentication = new FunctionAppStorageAuthentication() + { + AuthenticationType = FunctionAppStorageAccountAuthenticationType.StorageAccountConnectionString, + StorageAccountConnectionStringName = "TheAppSettingName", + }, + }, + Runtime = new FunctionAppRuntime() + { + Name = FunctionAppRuntimeName.Python, + Version = "3.11", + }, + ScaleAndConcurrency = new FunctionAppScaleAndConcurrency() + { + AlwaysReady = +{ +new FunctionAppAlwaysReadyConfig() +{ +Name = "http", +InstanceCount = 2, +} +}, + MaximumInstanceCount = 100, + InstanceMemoryMB = 2048, + HttpPerInstanceConcurrency = 16, + }, + }, + Kind = "functionapp,linux", + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); + WebSiteResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebSiteData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Create or Update web app + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateWebApp() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CreateOrUpdateWebApp.json + // this example is just showing the usage of "WebApps_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this WebSiteResource + WebSiteCollection collection = resourceGroupResource.GetWebSites(); + + // invoke the operation + string name = "sitef6141"; + WebSiteData data = new WebSiteData(new AzureLocation("East US")) + { + AppServicePlanId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp"), + Kind = "app", + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); + WebSiteResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebSiteData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteConfigResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteConfigResource.cs new file mode 100644 index 0000000000000..079e2ef73bc15 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteConfigResource.cs @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WebSiteConfigResource + { + // Get Site Config + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetSiteConfig() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSiteConfig.json + // this example is just showing the usage of "WebApps_GetConfiguration" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteConfigResource created on azure + // for more information of creating WebSiteConfigResource, please refer to the document of WebSiteConfigResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteConfigResourceId = WebSiteConfigResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteConfigResource webSiteConfig = client.GetWebSiteConfigResource(webSiteConfigResourceId); + + // invoke the operation + WebSiteConfigResource result = await webSiteConfig.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SiteConfigData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Update Site Config + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_UpdateSiteConfig() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/UpdateSiteConfig.json + // this example is just showing the usage of "WebApps_CreateOrUpdateConfiguration" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteConfigResource created on azure + // for more information of creating WebSiteConfigResource, please refer to the document of WebSiteConfigResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteConfigResourceId = WebSiteConfigResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteConfigResource webSiteConfig = client.GetWebSiteConfigResource(webSiteConfigResourceId); + + // invoke the operation + SiteConfigData data = new SiteConfigData() + { + NumberOfWorkers = 1, + DefaultDocuments = +{ +"Default.htm","Default.html","Default.asp","index.htm","index.html","iisstart.htm","default.aspx","index.php","hostingstart.html" +}, + NetFrameworkVersion = "v4.0", + PhpVersion = "5.6", + PythonVersion = "", + NodeVersion = "", + PowerShellVersion = "", + LinuxFxVersion = "", + IsRequestTracingEnabled = false, + IsRemoteDebuggingEnabled = false, + IsHttpLoggingEnabled = false, + UseManagedIdentityCreds = false, + LogsDirectorySizeLimit = 35, + IsDetailedErrorLoggingEnabled = false, + Use32BitWorkerProcess = true, + IsWebSocketsEnabled = false, + IsAlwaysOn = false, + AppCommandLine = "", + ManagedPipelineMode = ManagedPipelineMode.Integrated, + VirtualApplications = +{ +new VirtualApplication() +{ +VirtualPath = "/", +PhysicalPath = "site\\wwwroot", +IsPreloadEnabled = false, +} +}, + LoadBalancing = SiteLoadBalancing.LeastRequests, + IsAutoHealEnabled = false, + VnetName = "", + IsVnetRouteAllEnabled = false, + VnetPrivatePortsCount = 0, + IsHttp20Enabled = false, + MinTlsVersion = AppServiceSupportedTlsVersion.Tls1_2, + ScmMinTlsVersion = AppServiceSupportedTlsVersion.Tls1_2, + FtpsState = AppServiceFtpsState.AllAllowed, + FunctionAppScaleLimit = 0, + IsFunctionsRuntimeScaleMonitoringEnabled = false, + MinimumElasticInstanceCount = 0, + AzureStorageAccounts = +{ +}, + }; + ArmOperation lro = await webSiteConfig.CreateOrUpdateAsync(WaitUntil.Completed, data); + WebSiteConfigResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SiteConfigData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteFtpPublishingCredentialsPolicyResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteFtpPublishingCredentialsPolicyResource.cs index 9fd1d87a63fc1..4dfc7654a27b9 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteFtpPublishingCredentialsPolicyResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteFtpPublishingCredentialsPolicyResource.cs @@ -19,7 +19,7 @@ public partial class Sample_WebSiteFtpPublishingCredentialsPolicyResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetFTPAllowed() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetPublishingCredentialsPolicy.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetPublishingCredentialsPolicy.json // this example is just showing the usage of "WebApps_GetFtpAllowed" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_GetFTPAllowed() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_UpdateFTPAllowed() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/UpdatePublishingCredentialsPolicy.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/UpdatePublishingCredentialsPolicy.json // this example is just showing the usage of "WebApps_UpdateFtpAllowed" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteResource.cs index b77cb3b47ffb1..d5d6b3a204fb0 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteResource.cs @@ -11,17 +11,665 @@ using Azure.Core; using Azure.Identity; using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Resources; namespace Azure.ResourceManager.AppService.Samples { public partial class Sample_WebSiteResource { + // List Web apps for subscription + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetWebSites_ListWebAppsForSubscription() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListWebApps.json + // this example is just showing the usage of "WebApps_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (WebSiteResource item in subscriptionResource.GetWebSitesAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebSiteData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get Web App + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetWebApp() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebApp.json + // this example is just showing the usage of "WebApps_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + WebSiteResource result = await webSite.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebSiteData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Delete Web app + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteWebApp() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DeleteWebApp.json + // this example is just showing the usage of "WebApps_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + await webSite.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Update web app + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_UpdateWebApp() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/UpdateWebApp.json + // this example is just showing the usage of "WebApps_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + SitePatchInfo info = new SitePatchInfo() + { + ServerFarmId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp"), + }; + WebSiteResource result = await webSite.UpdateAsync(info); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebSiteData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Analyze custom hostname for webapp. + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task AnalyzeCustomHostname_AnalyzeCustomHostnameForWebapp() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AnalyzeCustomHostName.json + // this example is just showing the usage of "WebApps_AnalyzeCustomHostname" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + CustomHostnameAnalysisResult result = await webSite.AnalyzeCustomHostnameAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Apply web app slot config + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task ApplySlotConfigToProduction_ApplyWebAppSlotConfig() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ApplySlotConfig.json + // this example is just showing the usage of "WebApps_ApplySlotConfigToProduction" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + CsmSlotEntity slotSwapEntity = new CsmSlotEntity("staging", true); + await webSite.ApplySlotConfigToProductionAsync(slotSwapEntity); + + Console.WriteLine($"Succeeded"); + } + + // Backup web app + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Backup_BackupWebApp() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/BackupWebApp.json + // this example is just showing the usage of "WebApps_Backup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + WebAppBackupInfo info = new WebAppBackupInfo() + { + BackupName = "abcdwe", + IsEnabled = true, + StorageAccountUri = new Uri("DefaultEndpointsProtocol=https;AccountName=storagesample;AccountKey="), + BackupSchedule = new WebAppBackupSchedule(7, BackupFrequencyUnit.Day, true, 30) + { + StartOn = DateTimeOffset.Parse("2022-09-02T17:33:11.641Z"), + }, + Databases = +{ +new AppServiceDatabaseBackupSetting(AppServiceDatabaseType.SqlAzure) +{ +Name = "backenddb", +ConnectionStringName = "backend", +ConnectionString = "DSN=data-source-name[;SERVER=value] [;PWD=value] [;UID=value] [;=]", +},new AppServiceDatabaseBackupSetting(AppServiceDatabaseType.SqlAzure) +{ +Name = "statsdb", +ConnectionStringName = "stats", +ConnectionString = "DSN=data-source-name[;SERVER=value] [;PWD=value] [;UID=value] [;=]", +} +}, + }; + WebAppBackupData result = await webSite.BackupAsync(info); + + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {result.Id}"); + } + + // List web app configurations + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAllConfigurationData_ListWebAppConfigurations() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListWebAppConfigurations.json + // this example is just showing the usage of "WebApps_ListConfigurations" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation and iterate over the result + await foreach (SiteConfigData item in webSite.GetAllConfigurationDataAsync()) + { + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {item.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Update App Settings + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task UpdateApplicationSettings_UpdateAppSettings() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/UpdateAppSettings.json + // this example is just showing the usage of "WebApps_UpdateApplicationSettings" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + AppServiceConfigurationDictionary appSettings = new AppServiceConfigurationDictionary() + { + Properties = +{ +["Setting1"] = "Value1", +["Setting2"] = "Value2", +}, + }; + AppServiceConfigurationDictionary result = await webSite.UpdateApplicationSettingsAsync(appSettings); + + Console.WriteLine($"Succeeded: {result}"); + } + + // List App Settings + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetApplicationSettings_ListAppSettings() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListAppSettings.json + // this example is just showing the usage of "WebApps_ListApplicationSettings" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + AppServiceConfigurationDictionary result = await webSite.GetApplicationSettingsAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Update Auth Settings + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task UpdateAuthSettings_UpdateAuthSettings() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/UpdateAuthSettings.json + // this example is just showing the usage of "WebApps_UpdateAuthSettings" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + SiteAuthSettings siteAuthSettings = new SiteAuthSettings() + { + IsEnabled = true, + RuntimeVersion = "~1", + UnauthenticatedClientAction = UnauthenticatedClientAction.RedirectToLoginPage, + IsTokenStoreEnabled = true, + AllowedExternalRedirectUrls = +{ +"sitef6141.customdomain.net","sitef6141.customdomain.info" +}, + DefaultProvider = BuiltInAuthenticationProvider.Google, + TokenRefreshExtensionHours = 120, + ClientId = "42d795a9-8abb-4d06-8534-39528af40f8e.apps.googleusercontent.com", + }; + SiteAuthSettings result = await webSite.UpdateAuthSettingsAsync(siteAuthSettings); + + Console.WriteLine($"Succeeded: {result}"); + } + + // List Auth Settings + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAuthSettings_ListAuthSettings() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListAuthSettings.json + // this example is just showing the usage of "WebApps_GetAuthSettings" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + SiteAuthSettings result = await webSite.GetAuthSettingsAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + // List Auth Settings without Secrets + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAuthSettingsV2WithoutSecrets_ListAuthSettingsWithoutSecrets() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetAuthSettingsV2WithoutSecrets.json + // this example is just showing the usage of "WebApps_GetAuthSettingsV2WithoutSecrets" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + SiteAuthSettingsV2 result = await webSite.GetAuthSettingsV2WithoutSecretsAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Update Auth Settings V2 + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task UpdateAuthSettingsV2_UpdateAuthSettingsV2() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/UpdateAuthSettingsV2.json + // this example is just showing the usage of "WebApps_UpdateAuthSettingsV2" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + SiteAuthSettingsV2 siteAuthSettingsV2 = new SiteAuthSettingsV2() + { + Platform = new AuthPlatform() + { + IsEnabled = true, + RuntimeVersion = "~1", + ConfigFilePath = "/auth/config.json", + }, + GlobalValidation = new GlobalValidation() + { + IsAuthenticationRequired = true, + UnauthenticatedClientAction = UnauthenticatedClientActionV2.Return403, + ExcludedPaths = +{ +"/nosecrets/Path" +}, + }, + IdentityProviders = new AppServiceIdentityProviders() + { + Google = new AppServiceGoogleProvider() + { + IsEnabled = true, + Registration = new ClientRegistration() + { + ClientId = "42d795a9-8abb-4d06-8534-39528af40f8e.apps.googleusercontent.com", + ClientSecretSettingName = "ClientSecret", + }, + LoginScopes = +{ +"admin" +}, + ValidationAllowedAudiences = +{ +"https://example.com" +}, + }, + }, + Login = new WebAppLoginInfo() + { + RoutesLogoutEndpoint = "https://app.com/logout", + TokenStore = new AppServiceTokenStore() + { + IsEnabled = true, + TokenRefreshExtensionHours = 96, + FileSystemDirectory = "/wwwroot/sites/example", + }, + PreserveUrlFragmentsForLogins = true, + AllowedExternalRedirectUrls = +{ +"https://someurl.com" +}, + CookieExpiration = new WebAppCookieExpiration() + { + Convention = CookieExpirationConvention.IdentityProviderDerived, + TimeToExpiration = "2022:09-01T00:00Z", + }, + Nonce = new LoginFlowNonceSettings() + { + ValidateNonce = true, + }, + }, + HttpSettings = new AppServiceHttpSettings() + { + IsHttpsRequired = true, + RoutesApiPrefix = "/authv2/", + ForwardProxy = new AppServiceForwardProxy() + { + Convention = ForwardProxyConvention.Standard, + CustomHostHeaderName = "authHeader", + CustomProtoHeaderName = "customProtoHeader", + }, + }, + }; + SiteAuthSettingsV2 result = await webSite.UpdateAuthSettingsV2Async(siteAuthSettingsV2); + + Console.WriteLine($"Succeeded: {result}"); + } + + // List Auth Settings V2 + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAuthSettingsV2_ListAuthSettingsV2() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListAuthSettingsV2.json + // this example is just showing the usage of "WebApps_GetAuthSettingsV2" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + SiteAuthSettingsV2 result = await webSite.GetAuthSettingsV2Async(); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Update Azure Storage Accounts + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task UpdateAzureStorageAccounts_UpdateAzureStorageAccounts() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/UpdateAzureStorageAccounts.json + // this example is just showing the usage of "WebApps_UpdateAzureStorageAccounts" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + AzureStoragePropertyDictionary azureStorageAccounts = new AzureStoragePropertyDictionary() + { + Properties = +{ +["account1"] = new AppServiceStorageAccessInfo() +{ +StorageType = AppServiceStorageType.AzureFiles, +AccountName = "testsa", +ShareName = "web", +AccessKey = "26515^%@#*", +MountPath = "/mounts/a/files", +}, +}, + }; + AzureStoragePropertyDictionary result = await webSite.UpdateAzureStorageAccountsAsync(azureStorageAccounts); + + Console.WriteLine($"Succeeded: {result}"); + } + + // List Deployment Status + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetProductionSiteDeploymentStatuses_ListDeploymentStatus() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListSiteDeploymentStatus.json + // this example is just showing the usage of "WebApps_ListProductionSiteDeploymentStatuses" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testSite"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation and iterate over the result + await foreach (CsmDeploymentStatus item in webSite.GetProductionSiteDeploymentStatusesAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get Deployment Status + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetProductionSiteDeploymentStatus_GetDeploymentStatus() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSiteDeploymentStatus.json + // this example is just showing the usage of "WebApps_GetProductionSiteDeploymentStatus" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testSite"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + string deploymentStatusId = "eacfd68b-3bbd-4ad9-99c5-98614d89c8e5"; + ArmOperation lro = await webSite.GetProductionSiteDeploymentStatusAsync(WaitUntil.Completed, deploymentStatusId); + CsmDeploymentStatus result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + // List backups [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAllSiteBackupData_ListBackups() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListSlotBackups.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListSlotBackups.json // this example is just showing the usage of "WebApps_ListSiteBackups" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +700,7 @@ public async Task GetAllSiteBackupData_ListBackups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkTraceOperation_GetTheCurrentStatusOfANetworkTraceOperationForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetWebSiteNetworkTraceOperation.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebSiteNetworkTraceOperation.json // this example is just showing the usage of "WebApps_GetNetworkTraceOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -83,7 +731,7 @@ public async Task GetNetworkTraceOperation_GetTheCurrentStatusOfANetworkTraceOpe [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task StartWebSiteNetworkTraceOperation_StartANewNetworkTraceOperationForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/StartWebSiteNetworkTraceOperation.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/StartWebSiteNetworkTraceOperation.json // this example is just showing the usage of "WebApps_StartWebSiteNetworkTraceOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -112,7 +760,7 @@ public async Task StartWebSiteNetworkTraceOperation_StartANewNetworkTraceOperati [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task StopWebSiteNetworkTrace_StopACurrentlyRunningNetworkTraceOperationForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/StopWebSiteNetworkTrace.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/StopWebSiteNetworkTrace.json // this example is just showing the usage of "WebApps_StopWebSiteNetworkTrace" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -139,7 +787,7 @@ public async Task StopWebSiteNetworkTrace_StopACurrentlyRunningNetworkTraceOpera [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkTraces_GetNetworkTracesForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetWebSiteNetworkTraces.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebSiteNetworkTraces.json // this example is just showing the usage of "WebApps_GetNetworkTraces" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -170,7 +818,7 @@ public async Task GetNetworkTraces_GetNetworkTracesForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkTraceOperationV2_GetTheCurrentStatusOfANetworkTraceOperationForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetWebSiteNetworkTraceOperation.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebSiteNetworkTraceOperation.json // this example is just showing the usage of "WebApps_GetNetworkTraceOperationV2" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -201,7 +849,7 @@ public async Task GetNetworkTraceOperationV2_GetTheCurrentStatusOfANetworkTraceO [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkTracesV2_GetNetworkTracesForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetWebSiteNetworkTraces.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebSiteNetworkTraces.json // this example is just showing the usage of "WebApps_GetNetworkTracesV2" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -232,7 +880,7 @@ public async Task GetNetworkTracesV2_GetNetworkTracesForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetPrivateLinkResources_GetPrivateLinkResourcesOfASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateLinkResources.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSitePrivateLinkResources.json // this example is just showing the usage of "WebApps_GetPrivateLinkResources" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -262,7 +910,7 @@ public async Task GetPrivateLinkResources_GetPrivateLinkResourcesOfASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task StartNetworkTrace_StartANewNetworkTraceOperationForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/StartWebSiteNetworkTraceOperation.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/StartWebSiteNetworkTraceOperation.json // this example is just showing the usage of "WebApps_StartNetworkTrace" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -291,7 +939,7 @@ public async Task StartNetworkTrace_StartANewNetworkTraceOperationForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task StopNetworkTrace_StopACurrentlyRunningNetworkTraceOperationForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/StopWebSiteNetworkTrace.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/StopWebSiteNetworkTrace.json // this example is just showing the usage of "WebApps_StopNetworkTrace" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -312,5 +960,230 @@ public async Task StopNetworkTrace_StopACurrentlyRunningNetworkTraceOperationFor Console.WriteLine($"Succeeded"); } + + // Delete workflow artifacts + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task DeployWorkflowArtifacts_DeleteWorkflowArtifacts() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DeleteDeployWorkflowArtifacts.json + // this example is just showing the usage of "WebApps_DeployWorkflowArtifacts" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "testsite2"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + WorkflowArtifacts workflowArtifacts = new WorkflowArtifacts() + { + FilesToDelete = +{ +"test/workflow.json","test/" +}, + }; + await webSite.DeployWorkflowArtifactsAsync(workflowArtifacts: workflowArtifacts); + + Console.WriteLine($"Succeeded"); + } + + // Deploys workflow artifacts + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task DeployWorkflowArtifacts_DeploysWorkflowArtifacts() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/PostDeployWorkflowArtifacts.json + // this example is just showing the usage of "WebApps_DeployWorkflowArtifacts" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "testsite2"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + WorkflowArtifacts workflowArtifacts = new WorkflowArtifacts() + { + AppSettings = BinaryData.FromObjectAsJson(new Dictionary() + { + ["eventHub_connectionString"] = "Endpoint=sb://example.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=EXAMPLE1a2b3c4d5e6fEXAMPLE=" + }), + Files = +{ +["connections.json"] = BinaryData.FromObjectAsJson(new Dictionary() +{ +["managedApiConnections"] = new Dictionary() +{ +}, +["serviceProviderConnections"] = new Dictionary() +{ +["eventHub"] = new Dictionary() +{ +["displayName"] = "example1", +["parameterValues"] = new Dictionary() +{ +["connectionString"] = "@appsetting('eventHub_connectionString')"}, +["serviceProvider"] = new Dictionary() +{ +["id"] = "/serviceProviders/eventHub"}}}}), +["test1/workflow.json"] = BinaryData.FromObjectAsJson(new Dictionary() +{ +["definition"] = new Dictionary() +{ +["$schema"] = "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", +["actions"] = new Dictionary() +{ +}, +["contentVersion"] = "1.0.0.0", +["outputs"] = new Dictionary() +{ +}, +["triggers"] = new Dictionary() +{ +["When_events_are_available_in_Event_hub"] = new Dictionary() +{ +["type"] = "ServiceProvider", +["inputs"] = new Dictionary() +{ +["parameters"] = new Dictionary() +{ +["eventHubName"] = "test123"}, +["serviceProviderConfiguration"] = new Dictionary() +{ +["operationId"] = "receiveEvents", +["connectionName"] = "eventHub", +["serviceProviderId"] = "/serviceProviders/eventHub"}}, +["splitOn"] = "@triggerOutputs()?['body']"}}}, +["kind"] = "Stateful"}), +}, + }; + await webSite.DeployWorkflowArtifactsAsync(workflowArtifacts: workflowArtifacts); + + Console.WriteLine($"Succeeded"); + } + + // List the Instance Workflows Configuration Connections + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetWorkflowsConnections_ListTheInstanceWorkflowsConfigurationConnections() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListWorkflowsConfigurationConnections.json + // this example is just showing the usage of "WebApps_ListWorkflowsConnections" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "testsite2"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + WorkflowEnvelopeData result = await webSite.GetWorkflowsConnectionsAsync(); + + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {result.Id}"); + } + + // Regenerate the callback URL access key for request triggers + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task RegenerateAccessKeyWorkflow_RegenerateTheCallbackURLAccessKeyForRequestTriggers() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Workflows_RegenerateAccessKey.json + // this example is just showing the usage of "Workflows_RegenerateAccessKey" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + string workflowName = "testWorkflowName"; + WorkflowRegenerateActionContent content = new WorkflowRegenerateActionContent() + { + KeyType = WebAppKeyType.Primary, + }; + await webSite.RegenerateAccessKeyWorkflowAsync(workflowName, content); + + Console.WriteLine($"Succeeded"); + } + + // Validate a workflow + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task ValidateWorkflow_ValidateAWorkflow() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/Workflows_Validate.json + // this example is just showing the usage of "Workflows_Validate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // invoke the operation + string workflowName = "test-workflow"; + WorkflowData data = new WorkflowData(new AzureLocation("placeholder")) + { + Definition = BinaryData.FromObjectAsJson(new Dictionary() + { + ["$schema"] = "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", + ["actions"] = new Dictionary() + { + }, + ["contentVersion"] = "1.0.0.0", + ["outputs"] = new Dictionary() + { + }, + ["parameters"] = new Dictionary() + { + }, + ["triggers"] = new Dictionary() + { + } + }), + Kind = AppServiceKind.Stateful, + }; + await webSite.ValidateWorkflowAsync(workflowName, data); + + Console.WriteLine($"Succeeded"); + } } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteResourceHealthMetadataResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteResourceHealthMetadataResource.cs index 1eaef0c4cd4f8..2706f6aeb4c78 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteResourceHealthMetadataResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteResourceHealthMetadataResource.cs @@ -19,7 +19,7 @@ public partial class Sample_WebSiteResourceHealthMetadataResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetResourceHealthMetadata() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetResourceHealthMetadataBySite.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetResourceHealthMetadataBySite.json // this example is just showing the usage of "ResourceHealthMetadata_GetBySite" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotCollection.cs new file mode 100644 index 0000000000000..9100ae8990c97 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotCollection.cs @@ -0,0 +1,259 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WebSiteSlotCollection + { + // List Web App Slots + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListWebAppSlots() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListWebAppSlots.json + // this example is just showing the usage of "WebApps_ListSlots" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this WebSiteSlotResource + WebSiteSlotCollection collection = webSite.GetWebSiteSlots(); + + // invoke the operation and iterate over the result + await foreach (WebSiteSlotResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebSiteData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get Web App Slot + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetWebAppSlot() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebAppSlot.json + // this example is just showing the usage of "WebApps_GetSlot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this WebSiteSlotResource + WebSiteSlotCollection collection = webSite.GetWebSiteSlots(); + + // invoke the operation + string slot = "staging"; + WebSiteSlotResource result = await collection.GetAsync(slot); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebSiteData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get Web App Slot + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetWebAppSlot() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebAppSlot.json + // this example is just showing the usage of "WebApps_GetSlot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this WebSiteSlotResource + WebSiteSlotCollection collection = webSite.GetWebSiteSlots(); + + // invoke the operation + string slot = "staging"; + bool result = await collection.ExistsAsync(slot); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get Web App Slot + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetWebAppSlot() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebAppSlot.json + // this example is just showing the usage of "WebApps_GetSlot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this WebSiteSlotResource + WebSiteSlotCollection collection = webSite.GetWebSiteSlots(); + + // invoke the operation + string slot = "staging"; + NullableResponse response = await collection.GetIfExistsAsync(slot); + WebSiteSlotResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebSiteData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // Clone web app slot + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CloneWebAppSlot() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CloneWebAppSlot.json + // this example is just showing the usage of "WebApps_CreateOrUpdateSlot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this WebSiteSlotResource + WebSiteSlotCollection collection = webSite.GetWebSiteSlots(); + + // invoke the operation + string slot = "staging"; + WebSiteData data = new WebSiteData(new AzureLocation("East US")) + { + CloningInfo = new CloningInfo(new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg456/providers/Microsoft.Web/sites/srcsiteg478/slot/qa")) + { + CanOverwrite = false, + CloneCustomHostNames = true, + CloneSourceControl = true, + SourceWebAppLocation = new AzureLocation("West Europe"), + HostingEnvironment = "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg456/providers/Microsoft.Web/hostingenvironments/aseforsites", + AppSettingsOverrides = +{ +["Setting1"] = "NewValue1", +["Setting3"] = "NewValue5", +}, + ConfigureLoadBalancing = false, + }, + Kind = "app", + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, slot, data); + WebSiteSlotResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebSiteData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Create or Update Web App Slot + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateWebAppSlot() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/CreateOrUpdateWebAppSlot.json + // this example is just showing the usage of "WebApps_CreateOrUpdateSlot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this WebSiteSlotResource + WebSiteSlotCollection collection = webSite.GetWebSiteSlots(); + + // invoke the operation + string slot = "staging"; + WebSiteData data = new WebSiteData(new AzureLocation("East US")) + { + AppServicePlanId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp"), + Kind = "app", + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, slot, data); + WebSiteSlotResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebSiteData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotConfigAppSettingCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotConfigAppSettingCollection.cs index 21cb49889d92c..53c072a7d5108 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotConfigAppSettingCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotConfigAppSettingCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_WebSiteSlotConfigAppSettingCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetAzureKeyVaultReferencesForAppSettingsForSlot() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetKeyVaultReferencesForAppSettingsSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetKeyVaultReferencesForAppSettingsSlot.json // this example is just showing the usage of "WebApps_GetAppSettingsKeyVaultReferencesSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_GetAzureKeyVaultReferencesForAppSettingsForSlot() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAzureKeyVaultSlotAppSettingReference() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetKeyVaultReferencesForAppSettingSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetKeyVaultReferencesForAppSettingSlot.json // this example is just showing the usage of "WebApps_GetAppSettingKeyVaultReferenceSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Get_GetAzureKeyVaultSlotAppSettingReference() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAzureKeyVaultSlotAppSettingReference() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetKeyVaultReferencesForAppSettingSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetKeyVaultReferencesForAppSettingSlot.json // this example is just showing the usage of "WebApps_GetAppSettingKeyVaultReferenceSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -125,7 +125,7 @@ public async Task Exists_GetAzureKeyVaultSlotAppSettingReference() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAzureKeyVaultSlotAppSettingReference() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetKeyVaultReferencesForAppSettingSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetKeyVaultReferencesForAppSettingSlot.json // this example is just showing the usage of "WebApps_GetAppSettingKeyVaultReferenceSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotConfigAppSettingResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotConfigAppSettingResource.cs index 4e8b4fb08795a..bdf388da8441d 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotConfigAppSettingResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotConfigAppSettingResource.cs @@ -19,7 +19,7 @@ public partial class Sample_WebSiteSlotConfigAppSettingResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAzureKeyVaultSlotAppSettingReference() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetKeyVaultReferencesForAppSettingSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetKeyVaultReferencesForAppSettingSlot.json // this example is just showing the usage of "WebApps_GetAppSettingKeyVaultReferenceSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotFtpPublishingCredentialsPolicyResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotFtpPublishingCredentialsPolicyResource.cs index 4cd228adb61dc..371021097930a 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotFtpPublishingCredentialsPolicyResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotFtpPublishingCredentialsPolicyResource.cs @@ -19,7 +19,7 @@ public partial class Sample_WebSiteSlotFtpPublishingCredentialsPolicyResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetFTPAllowed() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetPublishingCredentialsPolicySlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetPublishingCredentialsPolicySlot.json // this example is just showing the usage of "WebApps_GetFtpAllowedSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_GetFTPAllowed() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_UpdateFTPAllowed() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/UpdatePublishingCredentialsPolicySlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/UpdatePublishingCredentialsPolicySlot.json // this example is just showing the usage of "WebApps_UpdateFtpAllowedSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotResource.cs index 08590fc21e670..b719c908b435a 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotResource.cs @@ -16,12 +16,197 @@ namespace Azure.ResourceManager.AppService.Samples { public partial class Sample_WebSiteSlotResource { + // Get Web App Slot + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetWebAppSlot() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebAppSlot.json + // this example is just showing the usage of "WebApps_GetSlot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteSlotResource created on azure + // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + string slot = "staging"; + ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot); + WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId); + + // invoke the operation + WebSiteSlotResource result = await webSiteSlot.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebSiteData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Delete Web App Slot + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteWebAppSlot() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/DeleteWebAppSlot.json + // this example is just showing the usage of "WebApps_DeleteSlot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteSlotResource created on azure + // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + string slot = "staging"; + ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot); + WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId); + + // invoke the operation + await webSiteSlot.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Update Web App Slot + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_UpdateWebAppSlot() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/UpdateWebAppSlot.json + // this example is just showing the usage of "WebApps_UpdateSlot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteSlotResource created on azure + // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + string slot = "staging"; + ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot); + WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId); + + // invoke the operation + SitePatchInfo info = new SitePatchInfo() + { + ServerFarmId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp"), + }; + WebSiteSlotResource result = await webSiteSlot.UpdateAsync(info); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WebSiteData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Analyze custom hostname for slot + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task AnalyzeCustomHostnameSlot_AnalyzeCustomHostnameForSlot() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/AnalyzeCustomHostNameSlot.json + // this example is just showing the usage of "WebApps_AnalyzeCustomHostnameSlot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteSlotResource created on azure + // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "sitef6141"; + string slot = "staging"; + ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot); + WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId); + + // invoke the operation + CustomHostnameAnalysisResult result = await webSiteSlot.AnalyzeCustomHostnameSlotAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + // List Deployment Status Slot + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetSlotSiteDeploymentStatusesSlot_ListDeploymentStatusSlot() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListSiteDeploymentStatusSlot.json + // this example is just showing the usage of "WebApps_ListSlotSiteDeploymentStatusesSlot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteSlotResource created on azure + // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testSite"; + string slot = "stage"; + ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot); + WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId); + + // invoke the operation and iterate over the result + await foreach (CsmDeploymentStatus item in webSiteSlot.GetSlotSiteDeploymentStatusesSlotAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get Deployment Status Slot + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetSlotSiteDeploymentStatusSlot_GetDeploymentStatusSlot() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSiteDeploymentStatusSlot.json + // this example is just showing the usage of "WebApps_GetSlotSiteDeploymentStatusSlot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteSlotResource created on azure + // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "rg"; + string name = "testSite"; + string slot = "stage"; + ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot); + WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId); + + // invoke the operation + string deploymentStatusId = "eacfd68b-3bbd-4ad9-99c5-98614d89c8e5"; + ArmOperation lro = await webSiteSlot.GetSlotSiteDeploymentStatusSlotAsync(WaitUntil.Completed, deploymentStatusId); + CsmDeploymentStatus result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + // List backups [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAllSiteBackupSlotData_ListBackups() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListSlotBackups.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListSlotBackups.json // this example is just showing the usage of "WebApps_ListSiteBackupsSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +238,7 @@ public async Task GetAllSiteBackupSlotData_ListBackups() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkTraceOperationSlot_GetTheCurrentStatusOfANetworkTraceOperationForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetWebSiteNetworkTraceOperation.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebSiteNetworkTraceOperation.json // this example is just showing the usage of "WebApps_GetNetworkTraceOperationSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +270,7 @@ public async Task GetNetworkTraceOperationSlot_GetTheCurrentStatusOfANetworkTrac [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task StartWebSiteNetworkTraceOperationSlot_StartANewNetworkTraceOperationForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/StartWebSiteNetworkTraceOperation.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/StartWebSiteNetworkTraceOperation.json // this example is just showing the usage of "WebApps_StartWebSiteNetworkTraceOperationSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -115,7 +300,7 @@ public async Task StartWebSiteNetworkTraceOperationSlot_StartANewNetworkTraceOpe [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task StopWebSiteNetworkTraceSlot_StopACurrentlyRunningNetworkTraceOperationForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/StopWebSiteNetworkTrace.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/StopWebSiteNetworkTrace.json // this example is just showing the usage of "WebApps_StopWebSiteNetworkTraceSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -143,7 +328,7 @@ public async Task StopWebSiteNetworkTraceSlot_StopACurrentlyRunningNetworkTraceO [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkTracesSlot_GetNetworkTracesForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetWebSiteNetworkTraces.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebSiteNetworkTraces.json // this example is just showing the usage of "WebApps_GetNetworkTracesSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -175,7 +360,7 @@ public async Task GetNetworkTracesSlot_GetNetworkTracesForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkTraceOperationSlotV2_GetTheCurrentStatusOfANetworkTraceOperationForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetWebSiteNetworkTraceOperation.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebSiteNetworkTraceOperation.json // this example is just showing the usage of "WebApps_GetNetworkTraceOperationSlotV2" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -207,7 +392,7 @@ public async Task GetNetworkTraceOperationSlotV2_GetTheCurrentStatusOfANetworkTr [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkTracesSlotV2_GetNetworkTracesForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetWebSiteNetworkTraces.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetWebSiteNetworkTraces.json // this example is just showing the usage of "WebApps_GetNetworkTracesSlotV2" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -239,7 +424,7 @@ public async Task GetNetworkTracesSlotV2_GetNetworkTracesForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetPrivateLinkResourcesSlot_GetPrivateLinkResourcesOfASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateLinkResourcesSlot.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetSitePrivateLinkResourcesSlot.json // this example is just showing the usage of "WebApps_GetPrivateLinkResourcesSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -270,7 +455,7 @@ public async Task GetPrivateLinkResourcesSlot_GetPrivateLinkResourcesOfASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task StartNetworkTraceSlot_StartANewNetworkTraceOperationForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/StartWebSiteNetworkTraceOperation.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/StartWebSiteNetworkTraceOperation.json // this example is just showing the usage of "WebApps_StartNetworkTraceSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -300,7 +485,7 @@ public async Task StartNetworkTraceSlot_StartANewNetworkTraceOperationForASite() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task StopNetworkTraceSlot_StopACurrentlyRunningNetworkTraceOperationForASite() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/StopWebSiteNetworkTrace.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/StopWebSiteNetworkTrace.json // this example is just showing the usage of "WebApps_StopNetworkTraceSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -322,5 +507,117 @@ public async Task StopNetworkTraceSlot_StopACurrentlyRunningNetworkTraceOperatio Console.WriteLine($"Succeeded"); } + + // Deploys workflow artifacts slot + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task DeployWorkflowArtifactsSlot_DeploysWorkflowArtifactsSlot() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/PostDeployWorkflowArtifactsSlot.json + // this example is just showing the usage of "WebApps_DeployWorkflowArtifactsSlot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteSlotResource created on azure + // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "testsite2"; + string slot = "testsSlot"; + ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot); + WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId); + + // invoke the operation + WorkflowArtifacts workflowArtifacts = new WorkflowArtifacts() + { + AppSettings = BinaryData.FromObjectAsJson(new Dictionary() + { + ["eventHub_connectionString"] = "Endpoint=sb://example.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=EXAMPLE1a2b3c4d5e6fEXAMPLE=" + }), + Files = +{ +["connections.json"] = BinaryData.FromObjectAsJson(new Dictionary() +{ +["managedApiConnections"] = new Dictionary() +{ +}, +["serviceProviderConnections"] = new Dictionary() +{ +["eventHub"] = new Dictionary() +{ +["displayName"] = "example1", +["parameterValues"] = new Dictionary() +{ +["connectionString"] = "@appsetting('eventHub_connectionString')"}, +["serviceProvider"] = new Dictionary() +{ +["id"] = "/serviceProviders/eventHub"}}}}), +["test1/workflow.json"] = BinaryData.FromObjectAsJson(new Dictionary() +{ +["definition"] = new Dictionary() +{ +["$schema"] = "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", +["actions"] = new Dictionary() +{ +}, +["contentVersion"] = "1.0.0.0", +["outputs"] = new Dictionary() +{ +}, +["triggers"] = new Dictionary() +{ +["When_events_are_available_in_Event_hub"] = new Dictionary() +{ +["type"] = "ServiceProvider", +["inputs"] = new Dictionary() +{ +["parameters"] = new Dictionary() +{ +["eventHubName"] = "test123"}, +["serviceProviderConfiguration"] = new Dictionary() +{ +["operationId"] = "receiveEvents", +["connectionName"] = "eventHub", +["serviceProviderId"] = "/serviceProviders/eventHub"}}, +["splitOn"] = "@triggerOutputs()?['body']"}}}, +["kind"] = "Stateful"}), +}, + }; + await webSiteSlot.DeployWorkflowArtifactsSlotAsync(workflowArtifacts: workflowArtifacts); + + Console.WriteLine($"Succeeded"); + } + + // List the Instance Workflows Configuration Connections Slot + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetWorkflowsConnectionsSlot_ListTheInstanceWorkflowsConfigurationConnectionsSlot() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/ListWorkflowsConfigurationConnections.json + // this example is just showing the usage of "WebApps_ListWorkflowsConnectionsSlot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteSlotResource created on azure + // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testrg123"; + string name = "testsite2"; + string slot = "staging"; + ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot); + WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId); + + // invoke the operation + WorkflowEnvelopeData result = await webSiteSlot.GetWorkflowsConnectionsSlotAsync(); + + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {result.Id}"); + } } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotResourceHealthMetadataResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotResourceHealthMetadataResource.cs index c1b15fe7741ea..f0605f2e90055 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotResourceHealthMetadataResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotResourceHealthMetadataResource.cs @@ -19,7 +19,7 @@ public partial class Sample_WebSiteSlotResourceHealthMetadataResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetResourceHealthMetadata() { - // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetResourceHealthMetadataBySite.json + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/GetResourceHealthMetadataBySite.json // this example is just showing the usage of "ResourceHealthMetadata_GetBySiteSlot" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionCollection.cs new file mode 100644 index 0000000000000..a9de422257c11 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionCollection.cs @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WorkflowRunActionCollection + { + // List a workflow run actions + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListAWorkflowRunActions() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActions_List.json + // this example is just showing the usage of "WorkflowRunActions_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunResource created on azure + // for more information of creating WorkflowRunResource, please refer to the document of WorkflowRunResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + string workflowName = "test-workflow"; + string runName = "08586676746934337772206998657CU22"; + ResourceIdentifier workflowRunResourceId = WorkflowRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName); + WorkflowRunResource workflowRun = client.GetWorkflowRunResource(workflowRunResourceId); + + // get the collection of this WorkflowRunActionResource + WorkflowRunActionCollection collection = workflowRun.GetWorkflowRunActions(); + + // invoke the operation and iterate over the result + await foreach (WorkflowRunActionResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowRunActionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get a workflow run action + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAWorkflowRunAction() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActions_Get.json + // this example is just showing the usage of "WorkflowRunActions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunResource created on azure + // for more information of creating WorkflowRunResource, please refer to the document of WorkflowRunResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + string workflowName = "test-workflow"; + string runName = "08586676746934337772206998657CU22"; + ResourceIdentifier workflowRunResourceId = WorkflowRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName); + WorkflowRunResource workflowRun = client.GetWorkflowRunResource(workflowRunResourceId); + + // get the collection of this WorkflowRunActionResource + WorkflowRunActionCollection collection = workflowRun.GetWorkflowRunActions(); + + // invoke the operation + string actionName = "HTTP"; + WorkflowRunActionResource result = await collection.GetAsync(actionName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowRunActionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get a workflow run action + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetAWorkflowRunAction() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActions_Get.json + // this example is just showing the usage of "WorkflowRunActions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunResource created on azure + // for more information of creating WorkflowRunResource, please refer to the document of WorkflowRunResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + string workflowName = "test-workflow"; + string runName = "08586676746934337772206998657CU22"; + ResourceIdentifier workflowRunResourceId = WorkflowRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName); + WorkflowRunResource workflowRun = client.GetWorkflowRunResource(workflowRunResourceId); + + // get the collection of this WorkflowRunActionResource + WorkflowRunActionCollection collection = workflowRun.GetWorkflowRunActions(); + + // invoke the operation + string actionName = "HTTP"; + bool result = await collection.ExistsAsync(actionName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get a workflow run action + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetAWorkflowRunAction() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActions_Get.json + // this example is just showing the usage of "WorkflowRunActions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunResource created on azure + // for more information of creating WorkflowRunResource, please refer to the document of WorkflowRunResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + string workflowName = "test-workflow"; + string runName = "08586676746934337772206998657CU22"; + ResourceIdentifier workflowRunResourceId = WorkflowRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName); + WorkflowRunResource workflowRun = client.GetWorkflowRunResource(workflowRunResourceId); + + // get the collection of this WorkflowRunActionResource + WorkflowRunActionCollection collection = workflowRun.GetWorkflowRunActions(); + + // invoke the operation + string actionName = "HTTP"; + NullableResponse response = await collection.GetIfExistsAsync(actionName); + WorkflowRunActionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowRunActionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionRepetitionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionRepetitionCollection.cs new file mode 100644 index 0000000000000..b95f12d9267fa --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionRepetitionCollection.cs @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WorkflowRunActionRepetitionCollection + { + // List repetitions + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListRepetitions() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActionRepetitions_List.json + // this example is just showing the usage of "WorkflowRunActionRepetitions_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunActionResource created on azure + // for more information of creating WorkflowRunActionResource, please refer to the document of WorkflowRunActionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testFlow"; + string runName = "08586776228332053161046300351"; + string actionName = "testAction"; + ResourceIdentifier workflowRunActionResourceId = WorkflowRunActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + WorkflowRunActionResource workflowRunAction = client.GetWorkflowRunActionResource(workflowRunActionResourceId); + + // get the collection of this WorkflowRunActionRepetitionResource + WorkflowRunActionRepetitionCollection collection = workflowRunAction.GetWorkflowRunActionRepetitions(); + + // invoke the operation and iterate over the result + await foreach (WorkflowRunActionRepetitionResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowRunActionRepetitionDefinitionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get a repetition + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetARepetition() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActionRepetitions_Get.json + // this example is just showing the usage of "WorkflowRunActionRepetitions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunActionResource created on azure + // for more information of creating WorkflowRunActionResource, please refer to the document of WorkflowRunActionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testFlow"; + string runName = "08586776228332053161046300351"; + string actionName = "testAction"; + ResourceIdentifier workflowRunActionResourceId = WorkflowRunActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + WorkflowRunActionResource workflowRunAction = client.GetWorkflowRunActionResource(workflowRunActionResourceId); + + // get the collection of this WorkflowRunActionRepetitionResource + WorkflowRunActionRepetitionCollection collection = workflowRunAction.GetWorkflowRunActionRepetitions(); + + // invoke the operation + string repetitionName = "000001"; + WorkflowRunActionRepetitionResource result = await collection.GetAsync(repetitionName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowRunActionRepetitionDefinitionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get a repetition + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetARepetition() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActionRepetitions_Get.json + // this example is just showing the usage of "WorkflowRunActionRepetitions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunActionResource created on azure + // for more information of creating WorkflowRunActionResource, please refer to the document of WorkflowRunActionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testFlow"; + string runName = "08586776228332053161046300351"; + string actionName = "testAction"; + ResourceIdentifier workflowRunActionResourceId = WorkflowRunActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + WorkflowRunActionResource workflowRunAction = client.GetWorkflowRunActionResource(workflowRunActionResourceId); + + // get the collection of this WorkflowRunActionRepetitionResource + WorkflowRunActionRepetitionCollection collection = workflowRunAction.GetWorkflowRunActionRepetitions(); + + // invoke the operation + string repetitionName = "000001"; + bool result = await collection.ExistsAsync(repetitionName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get a repetition + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetARepetition() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActionRepetitions_Get.json + // this example is just showing the usage of "WorkflowRunActionRepetitions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunActionResource created on azure + // for more information of creating WorkflowRunActionResource, please refer to the document of WorkflowRunActionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testFlow"; + string runName = "08586776228332053161046300351"; + string actionName = "testAction"; + ResourceIdentifier workflowRunActionResourceId = WorkflowRunActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + WorkflowRunActionResource workflowRunAction = client.GetWorkflowRunActionResource(workflowRunActionResourceId); + + // get the collection of this WorkflowRunActionRepetitionResource + WorkflowRunActionRepetitionCollection collection = workflowRunAction.GetWorkflowRunActionRepetitions(); + + // invoke the operation + string repetitionName = "000001"; + NullableResponse response = await collection.GetIfExistsAsync(repetitionName); + WorkflowRunActionRepetitionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowRunActionRepetitionDefinitionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionRepetitionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionRepetitionResource.cs new file mode 100644 index 0000000000000..31eb2602b1e11 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionRepetitionResource.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WorkflowRunActionRepetitionResource + { + // Get a repetition + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetARepetition() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActionRepetitions_Get.json + // this example is just showing the usage of "WorkflowRunActionRepetitions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunActionRepetitionResource created on azure + // for more information of creating WorkflowRunActionRepetitionResource, please refer to the document of WorkflowRunActionRepetitionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testFlow"; + string runName = "08586776228332053161046300351"; + string actionName = "testAction"; + string repetitionName = "000001"; + ResourceIdentifier workflowRunActionRepetitionResourceId = WorkflowRunActionRepetitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + WorkflowRunActionRepetitionResource workflowRunActionRepetition = client.GetWorkflowRunActionRepetitionResource(workflowRunActionRepetitionResourceId); + + // invoke the operation + WorkflowRunActionRepetitionResource result = await workflowRunActionRepetition.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowRunActionRepetitionDefinitionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // List expression traces for a repetition + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetExpressionTraces_ListExpressionTracesForARepetition() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActionRepetitions_ListExpressionTraces.json + // this example is just showing the usage of "WorkflowRunActionRepetitions_ListExpressionTraces" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunActionRepetitionResource created on azure + // for more information of creating WorkflowRunActionRepetitionResource, please refer to the document of WorkflowRunActionRepetitionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testFlow"; + string runName = "08586776228332053161046300351"; + string actionName = "testAction"; + string repetitionName = "000001"; + ResourceIdentifier workflowRunActionRepetitionResourceId = WorkflowRunActionRepetitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + WorkflowRunActionRepetitionResource workflowRunActionRepetition = client.GetWorkflowRunActionRepetitionResource(workflowRunActionRepetitionResourceId); + + // invoke the operation and iterate over the result + await foreach (WorkflowExpressionRoot item in workflowRunActionRepetition.GetExpressionTracesAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionResource.cs new file mode 100644 index 0000000000000..4da1db2251126 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionResource.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WorkflowRunActionResource + { + // Get a workflow run action + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAWorkflowRunAction() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActions_Get.json + // this example is just showing the usage of "WorkflowRunActions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunActionResource created on azure + // for more information of creating WorkflowRunActionResource, please refer to the document of WorkflowRunActionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + string workflowName = "test-workflow"; + string runName = "08586676746934337772206998657CU22"; + string actionName = "HTTP"; + ResourceIdentifier workflowRunActionResourceId = WorkflowRunActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + WorkflowRunActionResource workflowRunAction = client.GetWorkflowRunActionResource(workflowRunActionResourceId); + + // invoke the operation + WorkflowRunActionResource result = await workflowRunAction.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowRunActionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // List expression traces + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetExpressionTraces_ListExpressionTraces() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActions_ListExpressionTraces.json + // this example is just showing the usage of "WorkflowRunActions_ListExpressionTraces" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunActionResource created on azure + // for more information of creating WorkflowRunActionResource, please refer to the document of WorkflowRunActionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testFlow"; + string runName = "08586776228332053161046300351"; + string actionName = "testAction"; + ResourceIdentifier workflowRunActionResourceId = WorkflowRunActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + WorkflowRunActionResource workflowRunAction = client.GetWorkflowRunActionResource(workflowRunActionResourceId); + + // invoke the operation and iterate over the result + await foreach (WorkflowExpressionRoot item in workflowRunAction.GetExpressionTracesAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionScopeRepetitionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionScopeRepetitionCollection.cs new file mode 100644 index 0000000000000..381c93ad67442 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionScopeRepetitionCollection.cs @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WorkflowRunActionScopeRepetitionCollection + { + // List the scoped repetitions + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListTheScopedRepetitions() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActionScopeRepetitions_List.json + // this example is just showing the usage of "WorkflowRunActionScopeRepetitions_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunActionResource created on azure + // for more information of creating WorkflowRunActionResource, please refer to the document of WorkflowRunActionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testFlow"; + string runName = "08586776228332053161046300351"; + string actionName = "for_each"; + ResourceIdentifier workflowRunActionResourceId = WorkflowRunActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + WorkflowRunActionResource workflowRunAction = client.GetWorkflowRunActionResource(workflowRunActionResourceId); + + // get the collection of this WorkflowRunActionScopeRepetitionResource + WorkflowRunActionScopeRepetitionCollection collection = workflowRunAction.GetWorkflowRunActionScopeRepetitions(); + + // invoke the operation and iterate over the result + await foreach (WorkflowRunActionScopeRepetitionResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowRunActionRepetitionDefinitionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get a scoped repetition + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAScopedRepetition() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActionScopeRepetitions_Get.json + // this example is just showing the usage of "WorkflowRunActionScopeRepetitions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunActionResource created on azure + // for more information of creating WorkflowRunActionResource, please refer to the document of WorkflowRunActionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testFlow"; + string runName = "08586776228332053161046300351"; + string actionName = "for_each"; + ResourceIdentifier workflowRunActionResourceId = WorkflowRunActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + WorkflowRunActionResource workflowRunAction = client.GetWorkflowRunActionResource(workflowRunActionResourceId); + + // get the collection of this WorkflowRunActionScopeRepetitionResource + WorkflowRunActionScopeRepetitionCollection collection = workflowRunAction.GetWorkflowRunActionScopeRepetitions(); + + // invoke the operation + string repetitionName = "000000"; + WorkflowRunActionScopeRepetitionResource result = await collection.GetAsync(repetitionName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowRunActionRepetitionDefinitionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get a scoped repetition + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetAScopedRepetition() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActionScopeRepetitions_Get.json + // this example is just showing the usage of "WorkflowRunActionScopeRepetitions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunActionResource created on azure + // for more information of creating WorkflowRunActionResource, please refer to the document of WorkflowRunActionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testFlow"; + string runName = "08586776228332053161046300351"; + string actionName = "for_each"; + ResourceIdentifier workflowRunActionResourceId = WorkflowRunActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + WorkflowRunActionResource workflowRunAction = client.GetWorkflowRunActionResource(workflowRunActionResourceId); + + // get the collection of this WorkflowRunActionScopeRepetitionResource + WorkflowRunActionScopeRepetitionCollection collection = workflowRunAction.GetWorkflowRunActionScopeRepetitions(); + + // invoke the operation + string repetitionName = "000000"; + bool result = await collection.ExistsAsync(repetitionName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get a scoped repetition + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetAScopedRepetition() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActionScopeRepetitions_Get.json + // this example is just showing the usage of "WorkflowRunActionScopeRepetitions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunActionResource created on azure + // for more information of creating WorkflowRunActionResource, please refer to the document of WorkflowRunActionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testFlow"; + string runName = "08586776228332053161046300351"; + string actionName = "for_each"; + ResourceIdentifier workflowRunActionResourceId = WorkflowRunActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + WorkflowRunActionResource workflowRunAction = client.GetWorkflowRunActionResource(workflowRunActionResourceId); + + // get the collection of this WorkflowRunActionScopeRepetitionResource + WorkflowRunActionScopeRepetitionCollection collection = workflowRunAction.GetWorkflowRunActionScopeRepetitions(); + + // invoke the operation + string repetitionName = "000000"; + NullableResponse response = await collection.GetIfExistsAsync(repetitionName); + WorkflowRunActionScopeRepetitionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowRunActionRepetitionDefinitionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionScopeRepetitionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionScopeRepetitionResource.cs new file mode 100644 index 0000000000000..e29adf7ab3859 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionScopeRepetitionResource.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WorkflowRunActionScopeRepetitionResource + { + // Get a scoped repetition + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAScopedRepetition() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRunActionScopeRepetitions_Get.json + // this example is just showing the usage of "WorkflowRunActionScopeRepetitions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunActionScopeRepetitionResource created on azure + // for more information of creating WorkflowRunActionScopeRepetitionResource, please refer to the document of WorkflowRunActionScopeRepetitionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testFlow"; + string runName = "08586776228332053161046300351"; + string actionName = "for_each"; + string repetitionName = "000000"; + ResourceIdentifier workflowRunActionScopeRepetitionResourceId = WorkflowRunActionScopeRepetitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + WorkflowRunActionScopeRepetitionResource workflowRunActionScopeRepetition = client.GetWorkflowRunActionScopeRepetitionResource(workflowRunActionScopeRepetitionResourceId); + + // invoke the operation + WorkflowRunActionScopeRepetitionResource result = await workflowRunActionScopeRepetition.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowRunActionRepetitionDefinitionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunCollection.cs new file mode 100644 index 0000000000000..81f3e81574bf3 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunCollection.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WorkflowRunCollection + { + // List workflow runs + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListWorkflowRuns() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRuns_List.json + // this example is just showing the usage of "WorkflowRuns_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this WorkflowRunResource + string workflowName = "test-workflow"; + WorkflowRunCollection collection = webSite.GetWorkflowRuns(workflowName); + + // invoke the operation and iterate over the result + await foreach (WorkflowRunResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowRunData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get a run for a workflow + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetARunForAWorkflow() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRuns_Get.json + // this example is just showing the usage of "WorkflowRuns_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this WorkflowRunResource + string workflowName = "test-workflow"; + WorkflowRunCollection collection = webSite.GetWorkflowRuns(workflowName); + + // invoke the operation + string runName = "08586676746934337772206998657CU22"; + WorkflowRunResource result = await collection.GetAsync(runName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowRunData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get a run for a workflow + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetARunForAWorkflow() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRuns_Get.json + // this example is just showing the usage of "WorkflowRuns_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this WorkflowRunResource + string workflowName = "test-workflow"; + WorkflowRunCollection collection = webSite.GetWorkflowRuns(workflowName); + + // invoke the operation + string runName = "08586676746934337772206998657CU22"; + bool result = await collection.ExistsAsync(runName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get a run for a workflow + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetARunForAWorkflow() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRuns_Get.json + // this example is just showing the usage of "WorkflowRuns_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this WorkflowRunResource + string workflowName = "test-workflow"; + WorkflowRunCollection collection = webSite.GetWorkflowRuns(workflowName); + + // invoke the operation + string runName = "08586676746934337772206998657CU22"; + NullableResponse response = await collection.GetIfExistsAsync(runName); + WorkflowRunResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowRunData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunResource.cs new file mode 100644 index 0000000000000..5b619006d1d0a --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunResource.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WorkflowRunResource + { + // Get a run for a workflow + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetARunForAWorkflow() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRuns_Get.json + // this example is just showing the usage of "WorkflowRuns_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunResource created on azure + // for more information of creating WorkflowRunResource, please refer to the document of WorkflowRunResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + string workflowName = "test-workflow"; + string runName = "08586676746934337772206998657CU22"; + ResourceIdentifier workflowRunResourceId = WorkflowRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName); + WorkflowRunResource workflowRun = client.GetWorkflowRunResource(workflowRunResourceId); + + // invoke the operation + WorkflowRunResource result = await workflowRun.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowRunData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Cancel a workflow run + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Cancel_CancelAWorkflowRun() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowRuns_Cancel.json + // this example is just showing the usage of "WorkflowRuns_Cancel" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowRunResource created on azure + // for more information of creating WorkflowRunResource, please refer to the document of WorkflowRunResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + string workflowName = "test-workflow"; + string runName = "08586676746934337772206998657CU22"; + ResourceIdentifier workflowRunResourceId = WorkflowRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName); + WorkflowRunResource workflowRun = client.GetWorkflowRunResource(workflowRunResourceId); + + // invoke the operation + await workflowRun.CancelAsync(); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerCollection.cs new file mode 100644 index 0000000000000..502c17035643c --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerCollection.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WorkflowTriggerCollection + { + // List workflow triggers + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListWorkflowTriggers() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowTriggers_List.json + // this example is just showing the usage of "WorkflowTriggers_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this WorkflowTriggerResource + string workflowName = "test-workflow"; + WorkflowTriggerCollection collection = webSite.GetWorkflowTriggers(workflowName); + + // invoke the operation and iterate over the result + await foreach (WorkflowTriggerResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowTriggerData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get a workflow trigger + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAWorkflowTrigger() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowTriggers_Get.json + // this example is just showing the usage of "WorkflowTriggers_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this WorkflowTriggerResource + string workflowName = "test-workflow"; + WorkflowTriggerCollection collection = webSite.GetWorkflowTriggers(workflowName); + + // invoke the operation + string triggerName = "manual"; + WorkflowTriggerResource result = await collection.GetAsync(triggerName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowTriggerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get a workflow trigger + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetAWorkflowTrigger() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowTriggers_Get.json + // this example is just showing the usage of "WorkflowTriggers_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this WorkflowTriggerResource + string workflowName = "test-workflow"; + WorkflowTriggerCollection collection = webSite.GetWorkflowTriggers(workflowName); + + // invoke the operation + string triggerName = "manual"; + bool result = await collection.ExistsAsync(triggerName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get a workflow trigger + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetAWorkflowTrigger() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowTriggers_Get.json + // this example is just showing the usage of "WorkflowTriggers_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this WorkflowTriggerResource + string workflowName = "test-workflow"; + WorkflowTriggerCollection collection = webSite.GetWorkflowTriggers(workflowName); + + // invoke the operation + string triggerName = "manual"; + NullableResponse response = await collection.GetIfExistsAsync(triggerName); + WorkflowTriggerResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowTriggerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerHistoryCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerHistoryCollection.cs new file mode 100644 index 0000000000000..7dec98f6fdb7e --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerHistoryCollection.cs @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WorkflowTriggerHistoryCollection + { + // List a workflow trigger history + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListAWorkflowTriggerHistory() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowTriggerHistories_List.json + // this example is just showing the usage of "WorkflowTriggerHistories_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowTriggerResource created on azure + // for more information of creating WorkflowTriggerResource, please refer to the document of WorkflowTriggerResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testWorkflowName"; + string triggerName = "testTriggerName"; + ResourceIdentifier workflowTriggerResourceId = WorkflowTriggerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, triggerName); + WorkflowTriggerResource workflowTrigger = client.GetWorkflowTriggerResource(workflowTriggerResourceId); + + // get the collection of this WorkflowTriggerHistoryResource + WorkflowTriggerHistoryCollection collection = workflowTrigger.GetWorkflowTriggerHistories(); + + // invoke the operation and iterate over the result + await foreach (WorkflowTriggerHistoryResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowTriggerHistoryData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get a workflow trigger history + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAWorkflowTriggerHistory() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowTriggerHistories_Get.json + // this example is just showing the usage of "WorkflowTriggerHistories_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowTriggerResource created on azure + // for more information of creating WorkflowTriggerResource, please refer to the document of WorkflowTriggerResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testWorkflowName"; + string triggerName = "testTriggerName"; + ResourceIdentifier workflowTriggerResourceId = WorkflowTriggerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, triggerName); + WorkflowTriggerResource workflowTrigger = client.GetWorkflowTriggerResource(workflowTriggerResourceId); + + // get the collection of this WorkflowTriggerHistoryResource + WorkflowTriggerHistoryCollection collection = workflowTrigger.GetWorkflowTriggerHistories(); + + // invoke the operation + string historyName = "08586676746934337772206998657CU22"; + WorkflowTriggerHistoryResource result = await collection.GetAsync(historyName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowTriggerHistoryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get a workflow trigger history + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetAWorkflowTriggerHistory() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowTriggerHistories_Get.json + // this example is just showing the usage of "WorkflowTriggerHistories_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowTriggerResource created on azure + // for more information of creating WorkflowTriggerResource, please refer to the document of WorkflowTriggerResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testWorkflowName"; + string triggerName = "testTriggerName"; + ResourceIdentifier workflowTriggerResourceId = WorkflowTriggerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, triggerName); + WorkflowTriggerResource workflowTrigger = client.GetWorkflowTriggerResource(workflowTriggerResourceId); + + // get the collection of this WorkflowTriggerHistoryResource + WorkflowTriggerHistoryCollection collection = workflowTrigger.GetWorkflowTriggerHistories(); + + // invoke the operation + string historyName = "08586676746934337772206998657CU22"; + bool result = await collection.ExistsAsync(historyName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get a workflow trigger history + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetAWorkflowTriggerHistory() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowTriggerHistories_Get.json + // this example is just showing the usage of "WorkflowTriggerHistories_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowTriggerResource created on azure + // for more information of creating WorkflowTriggerResource, please refer to the document of WorkflowTriggerResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testWorkflowName"; + string triggerName = "testTriggerName"; + ResourceIdentifier workflowTriggerResourceId = WorkflowTriggerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, triggerName); + WorkflowTriggerResource workflowTrigger = client.GetWorkflowTriggerResource(workflowTriggerResourceId); + + // get the collection of this WorkflowTriggerHistoryResource + WorkflowTriggerHistoryCollection collection = workflowTrigger.GetWorkflowTriggerHistories(); + + // invoke the operation + string historyName = "08586676746934337772206998657CU22"; + NullableResponse response = await collection.GetIfExistsAsync(historyName); + WorkflowTriggerHistoryResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowTriggerHistoryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerHistoryResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerHistoryResource.cs new file mode 100644 index 0000000000000..76ce4b7bc4534 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerHistoryResource.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WorkflowTriggerHistoryResource + { + // Get a workflow trigger history + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAWorkflowTriggerHistory() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowTriggerHistories_Get.json + // this example is just showing the usage of "WorkflowTriggerHistories_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowTriggerHistoryResource created on azure + // for more information of creating WorkflowTriggerHistoryResource, please refer to the document of WorkflowTriggerHistoryResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testWorkflowName"; + string triggerName = "testTriggerName"; + string historyName = "08586676746934337772206998657CU22"; + ResourceIdentifier workflowTriggerHistoryResourceId = WorkflowTriggerHistoryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, triggerName, historyName); + WorkflowTriggerHistoryResource workflowTriggerHistory = client.GetWorkflowTriggerHistoryResource(workflowTriggerHistoryResourceId); + + // invoke the operation + WorkflowTriggerHistoryResource result = await workflowTriggerHistory.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowTriggerHistoryData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Resubmit a workflow run based on the trigger history + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Resubmit_ResubmitAWorkflowRunBasedOnTheTriggerHistory() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowTriggerHistories_Resubmit.json + // this example is just showing the usage of "WorkflowTriggerHistories_Resubmit" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowTriggerHistoryResource created on azure + // for more information of creating WorkflowTriggerHistoryResource, please refer to the document of WorkflowTriggerHistoryResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testWorkflowName"; + string triggerName = "testTriggerName"; + string historyName = "testHistoryName"; + ResourceIdentifier workflowTriggerHistoryResourceId = WorkflowTriggerHistoryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, triggerName, historyName); + WorkflowTriggerHistoryResource workflowTriggerHistory = client.GetWorkflowTriggerHistoryResource(workflowTriggerHistoryResourceId); + + // invoke the operation + await workflowTriggerHistory.ResubmitAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerResource.cs new file mode 100644 index 0000000000000..79536e1265a47 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerResource.cs @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WorkflowTriggerResource + { + // Get a workflow trigger + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAWorkflowTrigger() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowTriggers_Get.json + // this example is just showing the usage of "WorkflowTriggers_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowTriggerResource created on azure + // for more information of creating WorkflowTriggerResource, please refer to the document of WorkflowTriggerResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + string workflowName = "test-workflow"; + string triggerName = "manual"; + ResourceIdentifier workflowTriggerResourceId = WorkflowTriggerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, triggerName); + WorkflowTriggerResource workflowTrigger = client.GetWorkflowTriggerResource(workflowTriggerResourceId); + + // invoke the operation + WorkflowTriggerResource result = await workflowTrigger.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowTriggerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get the callback URL for a trigger + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetCallbackUrl_GetTheCallbackURLForATrigger() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowTriggers_ListCallbackUrl.json + // this example is just showing the usage of "WorkflowTriggers_ListCallbackUrl" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowTriggerResource created on azure + // for more information of creating WorkflowTriggerResource, please refer to the document of WorkflowTriggerResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + string workflowName = "test-workflow"; + string triggerName = "manual"; + ResourceIdentifier workflowTriggerResourceId = WorkflowTriggerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, triggerName); + WorkflowTriggerResource workflowTrigger = client.GetWorkflowTriggerResource(workflowTriggerResourceId); + + // invoke the operation + WorkflowTriggerCallbackUri result = await workflowTrigger.GetCallbackUrlAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Run a workflow trigger + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Run_RunAWorkflowTrigger() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowTriggers_Run.json + // this example is just showing the usage of "WorkflowTriggers_Run" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowTriggerResource created on azure + // for more information of creating WorkflowTriggerResource, please refer to the document of WorkflowTriggerResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + string workflowName = "test-workflow"; + string triggerName = "recurrence"; + ResourceIdentifier workflowTriggerResourceId = WorkflowTriggerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, triggerName); + WorkflowTriggerResource workflowTrigger = client.GetWorkflowTriggerResource(workflowTriggerResourceId); + + // invoke the operation + await workflowTrigger.RunAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // Get trigger schema + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetSchemaJson_GetTriggerSchema() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowTriggers_GetSchemaJson.json + // this example is just showing the usage of "WorkflowTriggers_GetSchemaJson" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowTriggerResource created on azure + // for more information of creating WorkflowTriggerResource, please refer to the document of WorkflowTriggerResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "testResourceGroup"; + string name = "test-name"; + string workflowName = "testWorkflow"; + string triggerName = "testTrigger"; + ResourceIdentifier workflowTriggerResourceId = WorkflowTriggerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, triggerName); + WorkflowTriggerResource workflowTrigger = client.GetWorkflowTriggerResource(workflowTriggerResourceId); + + // invoke the operation + WebAppJsonSchema result = await workflowTrigger.GetSchemaJsonAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowVersionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowVersionCollection.cs new file mode 100644 index 0000000000000..a38139e4fc125 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowVersionCollection.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WorkflowVersionCollection + { + // List a workflows versions + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListAWorkflowsVersions() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowVersions_List.json + // this example is just showing the usage of "WorkflowVersions_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this WorkflowVersionResource + string workflowName = "test-workflow"; + WorkflowVersionCollection collection = webSite.GetWorkflowVersions(workflowName); + + // invoke the operation and iterate over the result + await foreach (WorkflowVersionResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowVersionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get a workflow version + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAWorkflowVersion() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowVersions_Get.json + // this example is just showing the usage of "WorkflowVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this WorkflowVersionResource + string workflowName = "test-workflow"; + WorkflowVersionCollection collection = webSite.GetWorkflowVersions(workflowName); + + // invoke the operation + string versionId = "08586676824806722526"; + WorkflowVersionResource result = await collection.GetAsync(versionId); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get a workflow version + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetAWorkflowVersion() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowVersions_Get.json + // this example is just showing the usage of "WorkflowVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this WorkflowVersionResource + string workflowName = "test-workflow"; + WorkflowVersionCollection collection = webSite.GetWorkflowVersions(workflowName); + + // invoke the operation + string versionId = "08586676824806722526"; + bool result = await collection.ExistsAsync(versionId); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get a workflow version + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetAWorkflowVersion() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowVersions_Get.json + // this example is just showing the usage of "WorkflowVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WebSiteResource created on azure + // for more information of creating WebSiteResource, please refer to the document of WebSiteResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId); + + // get the collection of this WorkflowVersionResource + string workflowName = "test-workflow"; + WorkflowVersionCollection collection = webSite.GetWorkflowVersions(workflowName); + + // invoke the operation + string versionId = "08586676824806722526"; + NullableResponse response = await collection.GetIfExistsAsync(versionId); + WorkflowVersionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowVersionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowVersionResource.cs new file mode 100644 index 0000000000000..4bd08632619a7 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowVersionResource.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.AppService.Samples +{ + public partial class Sample_WorkflowVersionResource + { + // Get a workflow version + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAWorkflowVersion() + { + // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-12-01/examples/WorkflowVersions_Get.json + // this example is just showing the usage of "WorkflowVersions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkflowVersionResource created on azure + // for more information of creating WorkflowVersionResource, please refer to the document of WorkflowVersionResource + string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; + string resourceGroupName = "test-resource-group"; + string name = "test-name"; + string workflowName = "test-workflow"; + string versionId = "08586676824806722526"; + ResourceIdentifier workflowVersionResourceId = WorkflowVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, versionId); + WorkflowVersionResource workflowVersion = client.GetWorkflowVersionResource(workflowVersionResourceId); + + // invoke the operation + WorkflowVersionResource result = await workflowVersion.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + WorkflowVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Azure.ResourceManager.AppService.csproj b/sdk/websites/Azure.ResourceManager.AppService/src/Azure.ResourceManager.AppService.csproj index 2a3d9e1197eca..5ea669422a988 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Azure.ResourceManager.AppService.csproj +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Azure.ResourceManager.AppService.csproj @@ -1,6 +1,6 @@ - 1.1.0-beta.6 + 1.2.0 1.0.2 Azure.ResourceManager.AppService diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/AppServiceEnvironmentResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/AppServiceEnvironmentResource.cs index 843fa6b3a52c5..03d13c97c9529 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/AppServiceEnvironmentResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/AppServiceEnvironmentResource.cs @@ -4,15 +4,9 @@ #nullable disable using System; -using System.Globalization; -using System.Linq; using System.Threading; using System.Threading.Tasks; -using Azure; using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.AppService.Models; using Azure.ResourceManager.Resources; namespace Azure.ResourceManager.AppService diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/HostNameBindingData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/HostNameBindingData.cs index 34bf810a410f3..c5ed5e8caaaae 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/HostNameBindingData.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/HostNameBindingData.cs @@ -3,7 +3,6 @@ using System; using System.ComponentModel; -using System.Runtime.CompilerServices; namespace Azure.ResourceManager.AppService { diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/HostingEnvironmentPrivateEndpointConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/HostingEnvironmentPrivateEndpointConnectionCollection.cs new file mode 100644 index 0000000000000..c03bf6087a07c --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/HostingEnvironmentPrivateEndpointConnectionCollection.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Net; +using System.Threading; +using System.Threading.Tasks; +using System.Xml.Linq; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetHostingEnvironmentPrivateEndpointConnections method from an instance of . + /// + public partial class HostingEnvironmentPrivateEndpointConnectionCollection + { + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// AppServiceEnvironments_ApproveOrRejectPrivateEndpointConnection + /// + /// + /// Default Api Version + /// 2021-02-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The to use. + /// The to use. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken) + => await CreateOrUpdateAsync(waitUntil, privateEndpointConnectionName, new RemotePrivateEndpointConnectionARMResourceData(info.Id, info.Name, info.ResourceType, info.SystemData, null, null, info.PrivateLinkServiceConnectionState, new List(), info.Kind, null), cancellationToken).ConfigureAwait(false); + + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// AppServiceEnvironments_ApproveOrRejectPrivateEndpointConnection + /// + /// + /// Default Api Version + /// 2021-02-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The to use. + /// The to use. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + => CreateOrUpdate(waitUntil, privateEndpointConnectionName, new RemotePrivateEndpointConnectionARMResourceData(info.Id, info.Name, info.ResourceType, info.SystemData, null, null, info.PrivateLinkServiceConnectionState, new List(), info.Kind, null), cancellationToken); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/HostingEnvironmentPrivateEndpointConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/HostingEnvironmentPrivateEndpointConnectionResource.cs new file mode 100644 index 0000000000000..a1b8b7b3a0c52 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/HostingEnvironmentPrivateEndpointConnectionResource.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a HostingEnvironmentPrivateEndpointConnection along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetHostingEnvironmentPrivateEndpointConnectionResource method. + /// Otherwise you can get one from its parent resource using the GetHostingEnvironmentPrivateEndpointConnection method. + /// + public partial class HostingEnvironmentPrivateEndpointConnectionResource + { + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// AppServiceEnvironments_ApproveOrRejectPrivateEndpointConnection + /// + /// + /// Default Api Version + /// 2021-02-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The to use. + /// The cancellation token to use. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> UpdateAsync(WaitUntil waitUntil, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken) + => await UpdateAsync(waitUntil, new RemotePrivateEndpointConnectionARMResourceData(_data.Id, _data.Name, _data.ResourceType, _data.SystemData, _data.ProvisioningState, _data.PrivateEndpoint, info.PrivateLinkServiceConnectionState, _data.IPAddresses, info.Kind, null), cancellationToken).ConfigureAwait(false); + + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// AppServiceEnvironments_ApproveOrRejectPrivateEndpointConnection + /// + /// + /// Default Api Version + /// 2021-02-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The to use. + /// The cancellation token to use. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ArmOperation Update(WaitUntil waitUntil, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken) + => Update(waitUntil, new RemotePrivateEndpointConnectionARMResourceData(_data.Id, _data.Name, _data.ResourceType, _data.SystemData, _data.ProvisioningState, _data.PrivateEndpoint, info.PrivateLinkServiceConnectionState, _data.IPAddresses, info.Kind, null), cancellationToken); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/AppServiceCertificateEmail.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/AppServiceCertificateEmail.cs new file mode 100644 index 0000000000000..aaaaec052d48a --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/AppServiceCertificateEmail.cs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.ComponentModel; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService.Models +{ + [CodeGenModel(Usage = new[] { "input" })] + public partial class AppServiceCertificateEmail : ResourceData + { + [EditorBrowsable(EditorBrowsableState.Never)] + public string Kind { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/AppServiceOperation.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/AppServiceOperation.cs new file mode 100644 index 0000000000000..5d35f53d5833a --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/AppServiceOperation.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// An operation on a resource. + public partial class AppServiceOperation + { + // Remove this customization when this issue is fixed: https://github.com/Azure/autorest.csharp/issues/4798 + /// Any errors associate with the operation. + [WirePath("errors")] + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/AppServiceSupportedTlsVersion.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/AppServiceSupportedTlsVersion.cs index 25d6d379a06d6..737352371467e 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/AppServiceSupportedTlsVersion.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/AppServiceSupportedTlsVersion.cs @@ -4,7 +4,6 @@ #nullable disable using System; -using System.ComponentModel; using Azure.Core; namespace Azure.ResourceManager.AppService.Models diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/AppServiceTableStorageApplicationLogsConfig.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/AppServiceTableStorageApplicationLogsConfig.cs index 08dbff636ef5a..d74ea1578ff50 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/AppServiceTableStorageApplicationLogsConfig.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/AppServiceTableStorageApplicationLogsConfig.cs @@ -5,7 +5,6 @@ using System; using System.ComponentModel; -using Azure.Core; namespace Azure.ResourceManager.AppService.Models { diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/CertificateOrderAction.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/CertificateOrderAction.cs new file mode 100644 index 0000000000000..f620c6c10fa54 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/CertificateOrderAction.cs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.ComponentModel; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService.Models +{ + [CodeGenModel(Usage = new[] { "input" })] + public partial class CertificateOrderAction : ResourceData + { + [EditorBrowsable(EditorBrowsableState.Never)] + public string Kind { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/CsmDeploymentStatus.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/CsmDeploymentStatus.cs new file mode 100644 index 0000000000000..19be30570f834 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/CsmDeploymentStatus.cs @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class CsmDeploymentStatus + { + // Remove this customization when this issue is fixed: https://github.com/Azure/autorest.csharp/issues/4798 + /// List of errors. + [WirePath("properties.errors")] + public IList Errors { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/CustomHostnameAnalysisResult.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/CustomHostnameAnalysisResult.cs new file mode 100644 index 0000000000000..a5a475a0225b8 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/CustomHostnameAnalysisResult.cs @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class CustomHostnameAnalysisResult + { + // Remove this customization when this issue is fixed: https://github.com/Azure/autorest.csharp/issues/4798 + /// Raw failure information if DNS verification fails. + [WirePath("properties.customDomainVerificationFailureInfo")] + public ResponseError CustomDomainVerificationFailureInfo { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.cs new file mode 100644 index 0000000000000..8842963612a19 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.cs @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class ResponseMessageEnvelopeRemotePrivateEndpointConnection + { + /// Azure-AsyncOperation Error info. + [WirePath("error")] + public ResponseError Error { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/WorkflowHealth.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/WorkflowHealth.cs new file mode 100644 index 0000000000000..968adadfd88e9 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/WorkflowHealth.cs @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowHealth + { + // Remove this customization when this issue is fixed: https://github.com/Azure/autorest.csharp/issues/4798 + /// Gets or sets the workflow error. + [WirePath("error")] + public ResponseError Error { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/RestOperations/WebAppsRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/RestOperations/WebAppsRestOperations.cs index 921888ce59ae4..333f6964993a3 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/RestOperations/WebAppsRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/RestOperations/WebAppsRestOperations.cs @@ -1,15 +1,12 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using System; -using System.Collections.Generic; -using System.Text; -using System.Threading.Tasks; -using System.Threading; -using Azure.ResourceManager.AppService.Models; using System.Text.Json; -using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; using Azure.Core; +using Azure.ResourceManager.AppService.Models; namespace Azure.ResourceManager.AppService { @@ -157,4 +154,4 @@ public Response ListFunctionKeys(string subsc } } } -} +} \ No newline at end of file diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/SitePrivateEndpointConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/SitePrivateEndpointConnectionCollection.cs new file mode 100644 index 0000000000000..109eb864d5310 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/SitePrivateEndpointConnectionCollection.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Net; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class SitePrivateEndpointConnectionCollection + { + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// WebApps_ApproveOrRejectPrivateEndpointConnection + /// + /// + /// Default Api Version + /// 2021-02-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The to use. + /// The to use. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken) + => await CreateOrUpdateAsync(waitUntil, privateEndpointConnectionName, new RemotePrivateEndpointConnectionARMResourceData(info.Id, info.Name, info.ResourceType, info.SystemData, null, null, info.PrivateLinkServiceConnectionState, new List(), info.Kind, null), cancellationToken).ConfigureAwait(false); + + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// WebApps_ApproveOrRejectPrivateEndpointConnection + /// + /// + /// Default Api Version + /// 2021-02-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The to use. + /// The to use. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken) + => CreateOrUpdate(waitUntil, privateEndpointConnectionName, new RemotePrivateEndpointConnectionARMResourceData(info.Id, info.Name, info.ResourceType, info.SystemData, null, null, info.PrivateLinkServiceConnectionState, new List(), info.Kind, null), cancellationToken); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/SitePrivateEndpointConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/SitePrivateEndpointConnectionResource.cs new file mode 100644 index 0000000000000..ae247f612f01e --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/SitePrivateEndpointConnectionResource.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class SitePrivateEndpointConnectionResource + { + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// WebApps_ApproveOrRejectPrivateEndpointConnection + /// + /// + /// Default Api Version + /// 2021-02-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The to use. + /// The cancellation token to use. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> UpdateAsync(WaitUntil waitUntil, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken) + => await UpdateAsync(waitUntil, new RemotePrivateEndpointConnectionARMResourceData(_data.Id, _data.Name, _data.ResourceType, _data.SystemData, _data.ProvisioningState, _data.PrivateEndpoint, info.PrivateLinkServiceConnectionState, _data.IPAddresses, info.Kind, null), cancellationToken).ConfigureAwait(false); + + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// WebApps_ApproveOrRejectPrivateEndpointConnection + /// + /// + /// Default Api Version + /// 2021-02-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The to use. + /// The cancellation token to use. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ArmOperation Update(WaitUntil waitUntil, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken) + => Update(waitUntil, new RemotePrivateEndpointConnectionARMResourceData(_data.Id, _data.Name, _data.ResourceType, _data.SystemData, _data.ProvisioningState, _data.PrivateEndpoint, info.PrivateLinkServiceConnectionState, _data.IPAddresses, info.Kind, null), cancellationToken); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/SiteSlotPrivateEndpointConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/SiteSlotPrivateEndpointConnectionCollection.cs new file mode 100644 index 0000000000000..66e437d6be107 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/SiteSlotPrivateEndpointConnectionCollection.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Net; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class SiteSlotPrivateEndpointConnectionCollection + { + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// WebApps_ApproveOrRejectPrivateEndpointConnectionSlot + /// + /// + /// Default Api Version + /// 2021-02-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The to use. + /// The to use. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken) + => await CreateOrUpdateAsync(waitUntil, privateEndpointConnectionName, new RemotePrivateEndpointConnectionARMResourceData(info.Id, info.Name, info.ResourceType, info.SystemData, null, null, info.PrivateLinkServiceConnectionState, new List(), info.Kind, null), cancellationToken).ConfigureAwait(false); + + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// WebApps_ApproveOrRejectPrivateEndpointConnectionSlot + /// + /// + /// Default Api Version + /// 2021-02-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The to use. + /// The to use. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken) + => CreateOrUpdate(waitUntil, privateEndpointConnectionName, new RemotePrivateEndpointConnectionARMResourceData(info.Id, info.Name, info.ResourceType, info.SystemData, null, null, info.PrivateLinkServiceConnectionState, new List(), info.Kind, null), cancellationToken); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/SiteSlotPrivateEndpointConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/SiteSlotPrivateEndpointConnectionResource.cs new file mode 100644 index 0000000000000..5a76c376d4219 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/SiteSlotPrivateEndpointConnectionResource.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class SiteSlotPrivateEndpointConnectionResource + { + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// WebApps_ApproveOrRejectPrivateEndpointConnectionSlot + /// + /// + /// Default Api Version + /// 2021-02-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The to use. + /// The cancellation token to use. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> UpdateAsync(WaitUntil waitUntil, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken) + => await UpdateAsync(waitUntil, new RemotePrivateEndpointConnectionARMResourceData(_data.Id, _data.Name, _data.ResourceType, _data.SystemData, _data.ProvisioningState, _data.PrivateEndpoint, info.PrivateLinkServiceConnectionState, _data.IPAddresses, info.Kind, null), cancellationToken).ConfigureAwait(false); + + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// WebApps_ApproveOrRejectPrivateEndpointConnectionSlot + /// + /// + /// Default Api Version + /// 2021-02-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The to use. + /// The cancellation token to use. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ArmOperation Update(WaitUntil waitUntil, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken) + => Update(waitUntil, new RemotePrivateEndpointConnectionARMResourceData(_data.Id, _data.Name, _data.ResourceType, _data.SystemData, _data.ProvisioningState, _data.PrivateEndpoint, info.PrivateLinkServiceConnectionState, _data.IPAddresses, info.Kind, null), cancellationToken); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/StaticSitePrivateEndpointConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/StaticSitePrivateEndpointConnectionCollection.cs new file mode 100644 index 0000000000000..516912eaf57c1 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/StaticSitePrivateEndpointConnectionCollection.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Net; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class StaticSitePrivateEndpointConnectionCollection + { + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// StaticSites_ApproveOrRejectPrivateEndpointConnection + /// + /// + /// Default Api Version + /// 2021-02-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the private endpoint connection. + /// Request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken) + => await CreateOrUpdateAsync(waitUntil, privateEndpointConnectionName, new RemotePrivateEndpointConnectionARMResourceData(info.Id, info.Name, info.ResourceType, info.SystemData, null, null, info.PrivateLinkServiceConnectionState, new List(), info.Kind, null), cancellationToken).ConfigureAwait(false); + + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// StaticSites_ApproveOrRejectPrivateEndpointConnection + /// + /// + /// Default Api Version + /// 2021-02-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the private endpoint connection. + /// Request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken) + => CreateOrUpdate(waitUntil, privateEndpointConnectionName, new RemotePrivateEndpointConnectionARMResourceData(info.Id, info.Name, info.ResourceType, info.SystemData, null, null, info.PrivateLinkServiceConnectionState, new List(), info.Kind, null), cancellationToken); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/StaticSitePrivateEndpointConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/StaticSitePrivateEndpointConnectionResource.cs new file mode 100644 index 0000000000000..32c585f17657c --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/StaticSitePrivateEndpointConnectionResource.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class StaticSitePrivateEndpointConnectionResource + { + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// StaticSites_ApproveOrRejectPrivateEndpointConnection + /// + /// + /// Default Api Version + /// 2021-02-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Request body. + /// The cancellation token to use. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task> UpdateAsync(WaitUntil waitUntil, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken) + => await UpdateAsync(waitUntil, new RemotePrivateEndpointConnectionARMResourceData(_data.Id, _data.Name, _data.ResourceType, _data.SystemData, _data.ProvisioningState, _data.PrivateEndpoint, info.PrivateLinkServiceConnectionState, _data.IPAddresses, info.Kind, null), cancellationToken).ConfigureAwait(false); + + /// + /// Description for Approves or rejects a private endpoint connection + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// StaticSites_ApproveOrRejectPrivateEndpointConnection + /// + /// + /// Default Api Version + /// 2021-02-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Request body. + /// The cancellation token to use. + /// is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ArmOperation Update(WaitUntil waitUntil, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken) + => Update(waitUntil, new RemotePrivateEndpointConnectionARMResourceData(_data.Id, _data.Name, _data.ResourceType, _data.SystemData, _data.ProvisioningState, _data.PrivateEndpoint, info.PrivateLinkServiceConnectionState, _data.IPAddresses, info.Kind, null), cancellationToken); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteInstanceStatusData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteInstanceStatusData.cs index f1cfefceffcb3..4ba27fa3bf07f 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteInstanceStatusData.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteInstanceStatusData.cs @@ -2,9 +2,7 @@ // Licensed under the MIT License. using System; -using System.Collections.Generic; using System.ComponentModel; -using System.Text; namespace Azure.ResourceManager.AppService { diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteResource.cs index 5780a9bae44df..ace4be763970a 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteResource.cs @@ -4,17 +4,10 @@ #nullable disable using System; -using System.Collections.Generic; using System.ComponentModel; -using System.Globalization; -using System.IO; using System.Threading; using System.Threading.Tasks; -using Azure; using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.AppService.Models; using Azure.ResourceManager.Resources; namespace Azure.ResourceManager.AppService diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteSlotResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteSlotResource.cs index 0da91a7f2cf46..5e05b62d4ff9b 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteSlotResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteSlotResource.cs @@ -4,17 +4,10 @@ #nullable disable using System; -using System.Collections.Generic; using System.ComponentModel; -using System.Globalization; -using System.IO; using System.Threading; using System.Threading.Tasks; -using Azure; using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.AppService.Models; namespace Azure.ResourceManager.AppService { diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteSlotTriggeredWebJobHistoryResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteSlotTriggeredWebJobHistoryResource.cs index be6a422cf417a..10e241abf7cc5 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteSlotTriggeredWebJobHistoryResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteSlotTriggeredWebJobHistoryResource.cs @@ -2,9 +2,6 @@ // Licensed under the MIT License. #nullable disable -using System; -using System.Collections.Generic; -using System.Text; using Azure.Core; namespace Azure.ResourceManager.AppService diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteSlotTriggeredWebJobResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteSlotTriggeredWebJobResource.cs index f7cdbd7097812..6ff648537e086 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteSlotTriggeredWebJobResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteSlotTriggeredWebJobResource.cs @@ -4,10 +4,8 @@ #nullable disable using System; -using System.Collections.Generic; -using System.Text; -using System.Threading.Tasks; using System.Threading; +using System.Threading.Tasks; using Azure.Core; namespace Azure.ResourceManager.AppService diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteTriggeredWebJobHistoryResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteTriggeredWebJobHistoryResource.cs index 211371ac4c6b7..1e62a1a5cb074 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteTriggeredWebJobHistoryResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteTriggeredWebJobHistoryResource.cs @@ -3,9 +3,6 @@ #nullable disable -using System; -using System.Collections.Generic; -using System.Text; using Azure.Core; namespace Azure.ResourceManager.AppService diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteTriggeredwebJobResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteTriggeredwebJobResource.cs index 50551889cf7aa..06bd659edaa0c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteTriggeredwebJobResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/WebSiteTriggeredwebJobResource.cs @@ -4,8 +4,6 @@ #nullable disable using System; -using System.Collections.Generic; -using System.Text; using System.Threading; using System.Threading.Tasks; using Azure.Core; diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppCertificateCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppCertificateCollection.cs index ca8f8d5ea11c7..124afe53e70ba 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppCertificateCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppCertificateCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(string name /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string name, CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppCertificateResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppCertificateResource.cs index ebea65ab843e0..4265b5ba9d317 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppCertificateResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppCertificateResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAsync(AppCerti /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateCollection.cs index 908ecb0891251..11bbba0cd9e04 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string name, Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateOrderCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateOrderCollection.cs index ef6623da02946..89412667472f3 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateOrderCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateOrderCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string certifica /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string certificateOrderNam /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string certificateOrderName, CancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateOrderResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateOrderResource.cs index 4ef0df0656c6c..bfdbcf738010a 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateOrderResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateOrderResource.cs @@ -110,7 +110,7 @@ public virtual AppServiceCertificateCollection GetAppServiceCertificates() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAppService /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -179,7 +179,7 @@ public virtual CertificateOrderDetectorCollection GetCertificateOrderDetectors() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetCertifi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -247,7 +247,7 @@ public virtual Response GetCertificateOrderDet /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -287,7 +287,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -327,7 +327,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -371,7 +371,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -415,7 +415,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -457,7 +457,7 @@ public virtual async Task> UpdateAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -499,7 +499,7 @@ public virtual Response Update(AppServiceCer /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -541,7 +541,7 @@ public virtual async Task ReissueAsync(ReissueCertificateOrderContent /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -583,7 +583,7 @@ public virtual Response Reissue(ReissueCertificateOrderContent content, Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -625,7 +625,7 @@ public virtual async Task RenewAsync(RenewCertificateOrderContent cont /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -667,7 +667,7 @@ public virtual Response Renew(RenewCertificateOrderContent content, Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -705,7 +705,7 @@ public virtual async Task ResendEmailAsync(CancellationToken cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -743,7 +743,7 @@ public virtual Response ResendEmail(CancellationToken cancellationToken = defaul /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -785,7 +785,7 @@ public virtual async Task ResendRequestEmailsAsync(AppServiceDomainNam /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -827,7 +827,7 @@ public virtual Response ResendRequestEmails(AppServiceDomainNameIdentifier nameI /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -869,7 +869,7 @@ public virtual async Task> RetrieveSiteSealAsync(SiteSealCont /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -911,7 +911,7 @@ public virtual Response RetrieveSiteSeal(SiteSealContent content, Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -949,7 +949,7 @@ public virtual async Task VerifyDomainOwnershipAsync(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -987,7 +987,7 @@ public virtual Response VerifyDomainOwnership(CancellationToken cancellationToke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1016,7 +1016,7 @@ public virtual AsyncPageable RetrieveCertificateActionsA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1045,7 +1045,7 @@ public virtual Pageable RetrieveCertificateActions(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1074,7 +1074,7 @@ public virtual AsyncPageable RetrieveCertificateEmai /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateResource.cs index a854272bb62e1..879deb56ea4f8 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAsync(A /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceDomainCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceDomainCollection.cs index cbb85219f2ac9..b29028c505db7 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceDomainCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceDomainCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdate /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string do /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string domainName, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string domainName, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string domainName, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceDomainResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceDomainResource.cs index 2bee5a5425df4..609e66738b11f 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceDomainResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceDomainResource.cs @@ -109,7 +109,7 @@ public virtual DomainOwnershipIdentifierCollection GetDomainOwnershipIdentifiers /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetDomain /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -171,7 +171,7 @@ public virtual Response GetDomainOwnershipIde /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -251,7 +251,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -296,7 +296,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? f /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -341,7 +341,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? forceHardDeleteDom /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -383,7 +383,7 @@ public virtual async Task> UpdateAsync(AppSer /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -425,7 +425,7 @@ public virtual Response Update(AppServiceDomainPatch p /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -463,7 +463,7 @@ public virtual async Task RenewAsync(CancellationToken cancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -487,5 +487,81 @@ public virtual Response Renew(CancellationToken cancellationToken = default) throw; } } + + /// + /// Transfer out domain to another registrar + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/transferOut + /// + /// + /// Operation Id + /// Domains_TransferOut + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> TransferOutAsync(CancellationToken cancellationToken = default) + { + using var scope = _appServiceDomainDomainsClientDiagnostics.CreateScope("AppServiceDomainResource.TransferOut"); + scope.Start(); + try + { + var response = await _appServiceDomainDomainsRestClient.TransferOutAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new AppServiceDomainResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Transfer out domain to another registrar + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/transferOut + /// + /// + /// Operation Id + /// Domains_TransferOut + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response TransferOut(CancellationToken cancellationToken = default) + { + using var scope = _appServiceDomainDomainsClientDiagnostics.CreateScope("AppServiceDomainResource.TransferOut"); + scope.Start(); + try + { + var response = _appServiceDomainDomainsRestClient.TransferOut(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new AppServiceDomainResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentCollection.cs index 22dc6fa11af7e..4da6548c6f9c6 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string name, Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentData.Serialization.cs index 3f5f1824a7e07..c922d0dee61ab 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentData.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentData.Serialization.cs @@ -150,6 +150,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WritePropertyName("hasLinuxWorkers"u8); writer.WriteBooleanValue(HasLinuxWorkers.Value); } + if (Optional.IsDefined(UpgradePreference)) + { + writer.WritePropertyName("upgradePreference"u8); + writer.WriteStringValue(UpgradePreference.Value.ToString()); + } if (Optional.IsDefined(DedicatedHostCount)) { writer.WritePropertyName("dedicatedHostCount"u8); @@ -160,6 +165,21 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WritePropertyName("zoneRedundant"u8); writer.WriteBooleanValue(IsZoneRedundant.Value); } + if (Optional.IsDefined(CustomDnsSuffixConfiguration)) + { + writer.WritePropertyName("customDnsSuffixConfiguration"u8); + writer.WriteObjectValue(CustomDnsSuffixConfiguration, options); + } + if (Optional.IsDefined(NetworkingConfiguration)) + { + writer.WritePropertyName("networkingConfiguration"u8); + writer.WriteObjectValue(NetworkingConfiguration, options); + } + if (options.Format != "W" && Optional.IsDefined(UpgradeAvailability)) + { + writer.WritePropertyName("upgradeAvailability"u8); + writer.WriteStringValue(UpgradeAvailability.Value.ToString()); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -220,8 +240,12 @@ internal static AppServiceEnvironmentData DeserializeAppServiceEnvironmentData(J IList clusterSettings = default; IList userWhitelistedIPRanges = default; bool? hasLinuxWorkers = default; + AppServiceEnvironmentUpgradePreference? upgradePreference = default; int? dedicatedHostCount = default; bool? zoneRedundant = default; + CustomDnsSuffixConfigurationData customDnsSuffixConfiguration = default; + AseV3NetworkingConfigurationData networkingConfiguration = default; + AppServiceEnvironmentUpgradeAvailability? upgradeAvailability = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -411,6 +435,15 @@ internal static AppServiceEnvironmentData DeserializeAppServiceEnvironmentData(J hasLinuxWorkers = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("upgradePreference"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + upgradePreference = new AppServiceEnvironmentUpgradePreference(property0.Value.GetString()); + continue; + } if (property0.NameEquals("dedicatedHostCount"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -429,6 +462,33 @@ internal static AppServiceEnvironmentData DeserializeAppServiceEnvironmentData(J zoneRedundant = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("customDnsSuffixConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + customDnsSuffixConfiguration = CustomDnsSuffixConfigurationData.DeserializeCustomDnsSuffixConfigurationData(property0.Value, options); + continue; + } + if (property0.NameEquals("networkingConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkingConfiguration = AseV3NetworkingConfigurationData.DeserializeAseV3NetworkingConfigurationData(property0.Value, options); + continue; + } + if (property0.NameEquals("upgradeAvailability"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + upgradeAvailability = new AppServiceEnvironmentUpgradeAvailability(property0.Value.GetString()); + continue; + } } continue; } @@ -459,8 +519,12 @@ internal static AppServiceEnvironmentData DeserializeAppServiceEnvironmentData(J clusterSettings ?? new ChangeTrackingList(), userWhitelistedIPRanges ?? new ChangeTrackingList(), hasLinuxWorkers, + upgradePreference, dedicatedHostCount, zoneRedundant, + customDnsSuffixConfiguration, + networkingConfiguration, + upgradeAvailability, kind, serializedAdditionalRawData); } @@ -860,6 +924,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UpgradePreference), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" upgradePreference: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UpgradePreference)) + { + builder.Append(" upgradePreference: "); + builder.AppendLine($"'{UpgradePreference.Value.ToString()}'"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DedicatedHostCount), out propertyOverride); if (hasPropertyOverride) { @@ -891,6 +970,51 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CustomDnsSuffixConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" customDnsSuffixConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CustomDnsSuffixConfiguration)) + { + builder.Append(" customDnsSuffixConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, CustomDnsSuffixConfiguration, options, 4, false, " customDnsSuffixConfiguration: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NetworkingConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" networkingConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NetworkingConfiguration)) + { + builder.Append(" networkingConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, NetworkingConfiguration, options, 4, false, " networkingConfiguration: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UpgradeAvailability), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" upgradeAvailability: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UpgradeAvailability)) + { + builder.Append(" upgradeAvailability: "); + builder.AppendLine($"'{UpgradeAvailability.Value.ToString()}'"); + } + } + builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentData.cs index 1ef631910c4a8..cdf4c7164e048 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentData.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentData.cs @@ -83,11 +83,15 @@ public AppServiceEnvironmentData(AzureLocation location) : base(location) /// Custom settings for changing the behavior of the App Service Environment. /// User added ip ranges to whitelist on ASE db. /// Flag that displays whether an ASE has linux workers or not. + /// Upgrade Preference. /// Dedicated Host Count. /// Whether or not this App Service Environment is zone-redundant. + /// Full view of the custom domain suffix configuration for ASEv3. + /// Full view of networking configuration for an ASE. + /// Whether an upgrade is available for this App Service Environment. /// Kind of resource. /// Keeps track of any properties unknown to the library. - internal AppServiceEnvironmentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ProvisioningState? provisioningState, HostingEnvironmentStatus? status, AppServiceVirtualNetworkProfile virtualNetwork, LoadBalancingMode? internalLoadBalancingMode, string multiSize, int? multiRoleCount, int? ipSslAddressCount, string dnsSuffix, int? maximumNumberOfMachines, int? frontEndScaleFactor, bool? isSuspended, IList clusterSettings, IList userWhitelistedIPRanges, bool? hasLinuxWorkers, int? dedicatedHostCount, bool? isZoneRedundant, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal AppServiceEnvironmentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ProvisioningState? provisioningState, HostingEnvironmentStatus? status, AppServiceVirtualNetworkProfile virtualNetwork, LoadBalancingMode? internalLoadBalancingMode, string multiSize, int? multiRoleCount, int? ipSslAddressCount, string dnsSuffix, int? maximumNumberOfMachines, int? frontEndScaleFactor, bool? isSuspended, IList clusterSettings, IList userWhitelistedIPRanges, bool? hasLinuxWorkers, AppServiceEnvironmentUpgradePreference? upgradePreference, int? dedicatedHostCount, bool? isZoneRedundant, CustomDnsSuffixConfigurationData customDnsSuffixConfiguration, AseV3NetworkingConfigurationData networkingConfiguration, AppServiceEnvironmentUpgradeAvailability? upgradeAvailability, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { ProvisioningState = provisioningState; Status = status; @@ -103,8 +107,12 @@ internal AppServiceEnvironmentData(ResourceIdentifier id, string name, ResourceT ClusterSettings = clusterSettings; UserWhitelistedIPRanges = userWhitelistedIPRanges; HasLinuxWorkers = hasLinuxWorkers; + UpgradePreference = upgradePreference; DedicatedHostCount = dedicatedHostCount; IsZoneRedundant = isZoneRedundant; + CustomDnsSuffixConfiguration = customDnsSuffixConfiguration; + NetworkingConfiguration = networkingConfiguration; + UpgradeAvailability = upgradeAvailability; Kind = kind; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -159,12 +167,24 @@ internal AppServiceEnvironmentData() /// Flag that displays whether an ASE has linux workers or not. [WirePath("properties.hasLinuxWorkers")] public bool? HasLinuxWorkers { get; } + /// Upgrade Preference. + [WirePath("properties.upgradePreference")] + public AppServiceEnvironmentUpgradePreference? UpgradePreference { get; set; } /// Dedicated Host Count. [WirePath("properties.dedicatedHostCount")] public int? DedicatedHostCount { get; set; } /// Whether or not this App Service Environment is zone-redundant. [WirePath("properties.zoneRedundant")] public bool? IsZoneRedundant { get; set; } + /// Full view of the custom domain suffix configuration for ASEv3. + [WirePath("properties.customDnsSuffixConfiguration")] + public CustomDnsSuffixConfigurationData CustomDnsSuffixConfiguration { get; set; } + /// Full view of networking configuration for an ASE. + [WirePath("properties.networkingConfiguration")] + public AseV3NetworkingConfigurationData NetworkingConfiguration { get; set; } + /// Whether an upgrade is available for this App Service Environment. + [WirePath("properties.upgradeAvailability")] + public AppServiceEnvironmentUpgradeAvailability? UpgradeAvailability { get; } /// Kind of resource. [WirePath("kind")] public string Kind { get; set; } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentResource.cs index 8fe4c55b7a80f..bd14c278a78df 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentResource.cs @@ -119,7 +119,7 @@ public virtual HostingEnvironmentDetectorCollection GetHostingEnvironmentDetecto /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -153,7 +153,7 @@ public virtual async Task> GetHosti /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -174,6 +174,13 @@ public virtual Response GetHostingEnvironmen return GetHostingEnvironmentDetectors().Get(detectorName, startTime, endTime, timeGrain, cancellationToken); } + /// Gets an object representing a CustomDnsSuffixConfigurationResource along with the instance operations that can be performed on it in the AppServiceEnvironment. + /// Returns a object. + public virtual CustomDnsSuffixConfigurationResource GetCustomDnsSuffixConfiguration() + { + return new CustomDnsSuffixConfigurationResource(Client, Id.AppendChildResource("configurations", "customdnssuffix")); + } + /// Gets an object representing a AseV3NetworkingConfigurationResource along with the instance operations that can be performed on it in the AppServiceEnvironment. /// Returns a object. public virtual AseV3NetworkingConfigurationResource GetAseV3NetworkingConfiguration() @@ -208,7 +215,7 @@ public virtual HostingEnvironmentWorkerPoolCollection GetHostingEnvironmentWorke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -239,7 +246,7 @@ public virtual async Task> GetHos /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -277,7 +284,7 @@ public virtual HostingEnvironmentPrivateEndpointConnectionCollection GetHostingE /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -308,7 +315,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -346,7 +353,7 @@ public virtual HostingEnvironmentRecommendationCollection GetHostingEnvironmentR /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -379,7 +386,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -412,7 +419,7 @@ public virtual Response GetHostingEnvi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -452,7 +459,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -492,7 +499,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -535,7 +542,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? f /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -578,7 +585,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? forceDelete = null /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -620,7 +627,7 @@ public virtual async Task> UpdateAsync(A /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -662,7 +669,7 @@ public virtual Response Update(AppServiceEnvironm /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -688,7 +695,7 @@ public virtual AsyncPageable GetCapacitiesAsync(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -714,7 +721,7 @@ public virtual Pageable GetCapacities(CancellationToken cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -748,7 +755,7 @@ public virtual async Task> GetVipIn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -782,7 +789,7 @@ public virtual Response GetVipInfo(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -811,7 +818,7 @@ public virtual AsyncPageable GetDiagnosticsAsync( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -840,7 +847,7 @@ public virtual Pageable GetDiagnostics(Cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -879,7 +886,7 @@ public virtual async Task> GetDiagnostic /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -918,7 +925,7 @@ public virtual Response GetDiagnosticsItem(string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -948,7 +955,7 @@ public virtual AsyncPageable GetInboundNetworkDepend /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -965,6 +972,166 @@ public virtual Pageable GetInboundNetworkDependencie return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => InboundEnvironmentEndpoint.DeserializeInboundEnvironmentEndpoint(e), _appServiceEnvironmentClientDiagnostics, Pipeline, "AppServiceEnvironmentResource.GetInboundNetworkDependenciesEndpoints", "value", "nextLink", cancellationToken); } + /// + /// Send a test notification that an upgrade is available for this App Service Environment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/testUpgradeAvailableNotification + /// + /// + /// Operation Id + /// AppServiceEnvironments_TestUpgradeAvailableNotification + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task TestUpgradeAvailableNotificationAsync(CancellationToken cancellationToken = default) + { + using var scope = _appServiceEnvironmentClientDiagnostics.CreateScope("AppServiceEnvironmentResource.TestUpgradeAvailableNotification"); + scope.Start(); + try + { + var response = await _appServiceEnvironmentRestClient.TestUpgradeAvailableNotificationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Send a test notification that an upgrade is available for this App Service Environment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/testUpgradeAvailableNotification + /// + /// + /// Operation Id + /// AppServiceEnvironments_TestUpgradeAvailableNotification + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response TestUpgradeAvailableNotification(CancellationToken cancellationToken = default) + { + using var scope = _appServiceEnvironmentClientDiagnostics.CreateScope("AppServiceEnvironmentResource.TestUpgradeAvailableNotification"); + scope.Start(); + try + { + var response = _appServiceEnvironmentRestClient.TestUpgradeAvailableNotification(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Initiate an upgrade of an App Service Environment if one is available. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/upgrade + /// + /// + /// Operation Id + /// AppServiceEnvironments_Upgrade + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task UpgradeAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _appServiceEnvironmentClientDiagnostics.CreateScope("AppServiceEnvironmentResource.Upgrade"); + scope.Start(); + try + { + var response = await _appServiceEnvironmentRestClient.UpgradeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(_appServiceEnvironmentClientDiagnostics, Pipeline, _appServiceEnvironmentRestClient.CreateUpgradeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Initiate an upgrade of an App Service Environment if one is available. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/upgrade + /// + /// + /// Operation Id + /// AppServiceEnvironments_Upgrade + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Upgrade(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _appServiceEnvironmentClientDiagnostics.CreateScope("AppServiceEnvironmentResource.Upgrade"); + scope.Start(); + try + { + var response = _appServiceEnvironmentRestClient.Upgrade(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new AppServiceArmOperation(_appServiceEnvironmentClientDiagnostics, Pipeline, _appServiceEnvironmentRestClient.CreateUpgradeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Description for List all currently running operations on the App Service Environment. /// @@ -978,7 +1145,7 @@ public virtual Pageable GetInboundNetworkDependencie /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1007,7 +1174,7 @@ public virtual AsyncPageable GetOperationsAsync(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1036,7 +1203,7 @@ public virtual Pageable GetOperations(CancellationToken can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1066,7 +1233,7 @@ public virtual AsyncPageable GetOutboundNetworkDepe /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1096,7 +1263,7 @@ public virtual Pageable GetOutboundNetworkDependenc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1125,7 +1292,7 @@ public virtual AsyncPageable GetPrivateLinkRe /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1154,7 +1321,7 @@ public virtual Pageable GetPrivateLinkResourc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1192,7 +1359,7 @@ public virtual async Task RebootAsync(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1230,7 +1397,7 @@ public virtual Response Reboot(CancellationToken cancellationToken = default) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1260,7 +1427,7 @@ public virtual AsyncPageable GetAppServicePlansAsync(Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1290,7 +1457,7 @@ public virtual Pageable GetAppServicePlans(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1321,7 +1488,7 @@ public virtual AsyncPageable GetUsagesAsync(string filter = null, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1352,7 +1519,7 @@ public virtual Pageable GetUsages(string filter = null, Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1380,7 +1547,7 @@ public virtual AsyncPageable GetHistoryForHostingEnvir /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1408,7 +1575,7 @@ public virtual Pageable GetHistoryForHostingEnvironmen /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1440,7 +1607,7 @@ public virtual AsyncPageable GetRecommendedRulesForHos /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1472,7 +1639,7 @@ public virtual Pageable GetRecommendedRulesForHostingE /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1510,7 +1677,7 @@ public virtual async Task DisableAllForHostingEnvironmentRecommendatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1548,7 +1715,7 @@ public virtual Response DisableAllForHostingEnvironmentRecommendation(string env /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1586,7 +1753,7 @@ public virtual async Task ResetAllFiltersForHostingEnvironmentRecommen /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanCollection.cs index cc94166be4a02..66e721f83cdbd 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string name /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string name, CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanData.Serialization.cs index 76806472f82df..abc9a3b34e4f8 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanData.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanData.Serialization.cs @@ -113,6 +113,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("maximumNumberOfWorkers"u8); writer.WriteNumberValue(MaximumNumberOfWorkers.Value); } + if (options.Format != "W" && Optional.IsDefined(NumberOfWorkers)) + { + writer.WritePropertyName("numberOfWorkers"u8); + writer.WriteNumberValue(NumberOfWorkers.Value); + } if (options.Format != "W" && Optional.IsDefined(GeoRegion)) { writer.WritePropertyName("geoRegion"u8); @@ -272,6 +277,7 @@ internal static AppServicePlanData DeserializeAppServicePlanData(JsonElement ele string subscription = default; HostingEnvironmentProfile hostingEnvironmentProfile = default; int? maximumNumberOfWorkers = default; + int? numberOfWorkers = default; string geoRegion = default; bool? perSiteScaling = default; bool? elasticScaleEnabled = default; @@ -406,6 +412,15 @@ internal static AppServicePlanData DeserializeAppServicePlanData(JsonElement ele maximumNumberOfWorkers = property0.Value.GetInt32(); continue; } + if (property0.NameEquals("numberOfWorkers"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + numberOfWorkers = property0.Value.GetInt32(); + continue; + } if (property0.NameEquals("geoRegion"u8)) { geoRegion = property0.Value.GetString(); @@ -577,6 +592,7 @@ internal static AppServicePlanData DeserializeAppServicePlanData(JsonElement ele subscription, hostingEnvironmentProfile, maximumNumberOfWorkers, + numberOfWorkers, geoRegion, perSiteScaling, elasticScaleEnabled, @@ -857,6 +873,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NumberOfWorkers), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" numberOfWorkers: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NumberOfWorkers)) + { + builder.Append(" numberOfWorkers: "); + builder.AppendLine($"{NumberOfWorkers.Value}"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GeoRegion), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanData.cs index 0df390b456421..94d7314af06ff 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanData.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanData.cs @@ -72,6 +72,7 @@ public AppServicePlanData(AzureLocation location) : base(location) /// App Service plan subscription. /// Specification for the App Service Environment to use for the App Service plan. /// Maximum number of instances that can be assigned to this App Service plan. + /// The number of instances that are assigned to this App Service plan. /// Geographical location for the App Service plan. /// /// If <code>true</code>, apps assigned to this App Service plan can be scaled independently. @@ -97,7 +98,7 @@ public AppServicePlanData(AzureLocation location) : base(location) /// /// Kind of resource. /// Keeps track of any properties unknown to the library. - 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, IDictionary serializedAdditionalRawData) : 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, int? numberOfWorkers, 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, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Sku = sku; ExtendedLocation = extendedLocation; @@ -106,6 +107,7 @@ internal AppServicePlanData(ResourceIdentifier id, string name, ResourceType res Subscription = subscription; HostingEnvironmentProfile = hostingEnvironmentProfile; MaximumNumberOfWorkers = maximumNumberOfWorkers; + NumberOfWorkers = numberOfWorkers; GeoRegion = geoRegion; IsPerSiteScaling = isPerSiteScaling; IsElasticScaleEnabled = isElasticScaleEnabled; @@ -153,6 +155,9 @@ internal AppServicePlanData() /// Maximum number of instances that can be assigned to this App Service plan. [WirePath("properties.maximumNumberOfWorkers")] public int? MaximumNumberOfWorkers { get; } + /// The number of instances that are assigned to this App Service plan. + [WirePath("properties.numberOfWorkers")] + public int? NumberOfWorkers { get; } /// Geographical location for the App Service plan. [WirePath("properties.geoRegion")] public string GeoRegion { get; } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanHybridConnectionNamespaceRelayCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanHybridConnectionNamespaceRelayCollection.cs index 830e99597febb..290ca8e989799 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanHybridConnectionNamespaceRelayCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanHybridConnectionNamespaceRelayCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -108,7 +108,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -155,7 +155,7 @@ public virtual Response Ge /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -200,7 +200,7 @@ public virtual async Task> ExistsAsync(string namespaceName, stri /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -245,7 +245,7 @@ public virtual Response Exists(string namespaceName, string relayName, Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -292,7 +292,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanHybridConnectionNamespaceRelayResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanHybridConnectionNamespaceRelayResource.cs index d8d211613afbc..00c83143576d6 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanHybridConnectionNamespaceRelayResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanHybridConnectionNamespaceRelayResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response Ge /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -310,7 +310,7 @@ public virtual async Task> GetHybridConnectionKeys /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -348,7 +348,7 @@ public virtual Response GetHybridConnectionKeys(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -378,7 +378,7 @@ public virtual AsyncPageable GetWebAppsByHybridConnectionAsync(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanResource.cs index 30b75cb4ce6c1..cfcc57bff0d85 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanResource.cs @@ -110,7 +110,7 @@ public virtual AppServicePlanHybridConnectionNamespaceRelayCollection GetAppServ /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -188,7 +188,7 @@ public virtual AppServicePlanVirtualNetworkConnectionCollection GetAppServicePla /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -219,7 +219,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response GetAppSe /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -290,7 +290,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -330,7 +330,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -374,7 +374,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -418,7 +418,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -460,7 +460,7 @@ public virtual async Task> UpdateAsync(AppServi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -502,7 +502,7 @@ public virtual Response Update(AppServicePlanPatch patch /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -531,7 +531,7 @@ public virtual AsyncPageable GetCapabilitiesAsync(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -560,7 +560,7 @@ public virtual Pageable GetCapabilities(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -590,7 +590,7 @@ public virtual AsyncPageable GetHybridConnectionRelaysAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -620,7 +620,7 @@ public virtual Pageable GetHybridConnectionRelays(Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -659,7 +659,7 @@ public virtual async Task RestartWebAppsAsync(bool? softRestart = null /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -698,7 +698,7 @@ public virtual Response RestartWebApps(bool? softRestart = null, CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -731,7 +731,7 @@ public virtual AsyncPageable GetWebAppsAsync(string skipToken = nul /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -764,7 +764,7 @@ public virtual Pageable GetWebApps(string skipToken = null, string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -802,7 +802,7 @@ public virtual async Task> GetServerFarmSkusAsync(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -840,7 +840,7 @@ public virtual Response GetServerFarmSkus(CancellationToken cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -871,7 +871,7 @@ public virtual AsyncPageable GetUsagesAsync(string filter = null, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -902,7 +902,7 @@ public virtual Pageable GetUsages(string filter = null, Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -941,7 +941,7 @@ public virtual async Task RebootWorkerAsync(string workerName, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionCollection.cs index a7d865f88448a..c714f30d98e98 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(stri /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual AsyncPageable Get /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual Pageable GetAll(C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual async Task> ExistsAsync(string vnetName, Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -298,7 +298,7 @@ public virtual Response Exists(string vnetName, CancellationToken cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -343,7 +343,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionGatewayCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionGatewayCollection.cs index fbe4f13d37bd0..fdc34281472b3 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionGatewayCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionGatewayCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -296,7 +296,7 @@ public virtual async Task> ExistsAsync(string gatewayName, Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -339,7 +339,7 @@ public virtual Response Exists(string gatewayName, CancellationToken cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -384,7 +384,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionGatewayResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionGatewayResource.cs index c133f49d82759..aa4545a382fca 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionGatewayResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionGatewayResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -230,7 +230,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionResource.cs index f9f6ab2791811..72951fc87981d 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionResource.cs @@ -110,7 +110,7 @@ public virtual AppServicePlanVirtualNetworkConnectionGatewayCollection GetAppSer /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -281,7 +281,7 @@ public virtual AsyncPageable GetRoutesForVnetAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -310,7 +310,7 @@ public virtual Pageable GetRoutesForVnet(Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -351,7 +351,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -392,7 +392,7 @@ public virtual Response CreateOrUpdateVnetRoute(s /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -431,7 +431,7 @@ public virtual async Task DeleteVnetRouteAsync(string routeName, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -470,7 +470,7 @@ public virtual Response DeleteVnetRoute(string routeName, CancellationToken canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -511,7 +511,7 @@ public virtual async Task> UpdateVnetRou /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceSourceControlCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceSourceControlCollection.cs index d28eb31fe3d54..132de37450d7c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceSourceControlCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceSourceControlCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string sourceContro /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll(CancellationToke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string sourceControlType, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string sourceControlType, CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceSourceControlResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceSourceControlResource.cs index fe8c2b25d8ea5..97c794c217391 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceSourceControlResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceSourceControlResource.cs @@ -99,7 +99,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -179,7 +179,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task> UpdateA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ArmAppServiceModelFactory.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ArmAppServiceModelFactory.cs index aac85ad334168..5a5807e66e9fb 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ArmAppServiceModelFactory.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ArmAppServiceModelFactory.cs @@ -311,9 +311,8 @@ public static SiteSeal SiteSeal(string html = null) /// The systemData. /// Action type. /// Time at which the certificate action was performed. - /// Kind of resource. /// A new instance for mocking. - public static CertificateOrderAction CertificateOrderAction(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, CertificateOrderActionType? actionType = null, DateTimeOffset? createdOn = null, string kind = null) + public static CertificateOrderAction CertificateOrderAction(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, CertificateOrderActionType? actionType = null, DateTimeOffset? createdOn = null) { return new CertificateOrderAction( id, @@ -322,7 +321,6 @@ public static CertificateOrderAction CertificateOrderAction(ResourceIdentifier i systemData, actionType, createdOn, - kind, serializedAdditionalRawData: null); } @@ -333,9 +331,8 @@ public static CertificateOrderAction CertificateOrderAction(ResourceIdentifier i /// The systemData. /// Email id. /// Time stamp. - /// Kind of resource. /// A new instance for mocking. - public static AppServiceCertificateEmail AppServiceCertificateEmail(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string emailId = null, DateTimeOffset? timeStamp = null, string kind = null) + public static AppServiceCertificateEmail AppServiceCertificateEmail(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string emailId = null, DateTimeOffset? timeStamp = null) { return new AppServiceCertificateEmail( id, @@ -344,7 +341,6 @@ public static AppServiceCertificateEmail AppServiceCertificateEmail(ResourceIden systemData, emailId, timeStamp, - kind, serializedAdditionalRawData: null); } @@ -808,11 +804,15 @@ public static TldLegalAgreement TldLegalAgreement(string agreementKey = null, st /// Custom settings for changing the behavior of the App Service Environment. /// User added ip ranges to whitelist on ASE db. /// Flag that displays whether an ASE has linux workers or not. + /// Upgrade Preference. /// Dedicated Host Count. /// Whether or not this App Service Environment is zone-redundant. + /// Full view of the custom domain suffix configuration for ASEv3. + /// Full view of networking configuration for an ASE. + /// Whether an upgrade is available for this App Service Environment. /// Kind of resource. /// A new instance for mocking. - public static AppServiceEnvironmentData AppServiceEnvironmentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ProvisioningState? provisioningState = null, HostingEnvironmentStatus? status = null, AppServiceVirtualNetworkProfile virtualNetwork = null, LoadBalancingMode? internalLoadBalancingMode = null, string multiSize = null, int? multiRoleCount = null, int? ipSslAddressCount = null, string dnsSuffix = null, int? maximumNumberOfMachines = null, int? frontEndScaleFactor = null, bool? isSuspended = null, IEnumerable clusterSettings = null, IEnumerable userWhitelistedIPRanges = null, bool? hasLinuxWorkers = null, int? dedicatedHostCount = null, bool? isZoneRedundant = null, string kind = null) + public static AppServiceEnvironmentData AppServiceEnvironmentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ProvisioningState? provisioningState = null, HostingEnvironmentStatus? status = null, AppServiceVirtualNetworkProfile virtualNetwork = null, LoadBalancingMode? internalLoadBalancingMode = null, string multiSize = null, int? multiRoleCount = null, int? ipSslAddressCount = null, string dnsSuffix = null, int? maximumNumberOfMachines = null, int? frontEndScaleFactor = null, bool? isSuspended = null, IEnumerable clusterSettings = null, IEnumerable userWhitelistedIPRanges = null, bool? hasLinuxWorkers = null, AppServiceEnvironmentUpgradePreference? upgradePreference = null, int? dedicatedHostCount = null, bool? isZoneRedundant = null, CustomDnsSuffixConfigurationData customDnsSuffixConfiguration = null, AseV3NetworkingConfigurationData networkingConfiguration = null, AppServiceEnvironmentUpgradeAvailability? upgradeAvailability = null, string kind = null) { tags ??= new Dictionary(); clusterSettings ??= new List(); @@ -839,8 +839,12 @@ public static AppServiceEnvironmentData AppServiceEnvironmentData(ResourceIdenti clusterSettings?.ToList(), userWhitelistedIPRanges?.ToList(), hasLinuxWorkers, + upgradePreference, dedicatedHostCount, isZoneRedundant, + customDnsSuffixConfiguration, + networkingConfiguration, + upgradeAvailability, kind, serializedAdditionalRawData: null); } @@ -863,10 +867,14 @@ public static AppServiceEnvironmentData AppServiceEnvironmentData(ResourceIdenti /// Custom settings for changing the behavior of the App Service Environment. /// User added ip ranges to whitelist on ASE db. /// Flag that displays whether an ASE has linux workers or not. + /// Upgrade Preference. /// Dedicated Host Count. /// Whether or not this App Service Environment is zone-redundant. + /// Full view of the custom domain suffix configuration for ASEv3. + /// Full view of networking configuration for an ASE. + /// Whether an upgrade is available for this App Service Environment. /// A new instance for mocking. - public static AppServiceEnvironmentProperties AppServiceEnvironmentProperties(ProvisioningState? provisioningState = null, HostingEnvironmentStatus? status = null, AppServiceVirtualNetworkProfile virtualNetwork = null, LoadBalancingMode? internalLoadBalancingMode = null, string multiSize = null, int? multiRoleCount = null, int? ipSslAddressCount = null, string dnsSuffix = null, int? maximumNumberOfMachines = null, int? frontEndScaleFactor = null, bool? isSuspended = null, IEnumerable clusterSettings = null, IEnumerable userWhitelistedIPRanges = null, bool? hasLinuxWorkers = null, int? dedicatedHostCount = null, bool? isZoneRedundant = null) + public static AppServiceEnvironmentProperties AppServiceEnvironmentProperties(ProvisioningState? provisioningState = null, HostingEnvironmentStatus? status = null, AppServiceVirtualNetworkProfile virtualNetwork = null, LoadBalancingMode? internalLoadBalancingMode = null, string multiSize = null, int? multiRoleCount = null, int? ipSslAddressCount = null, string dnsSuffix = null, int? maximumNumberOfMachines = null, int? frontEndScaleFactor = null, bool? isSuspended = null, IEnumerable clusterSettings = null, IEnumerable userWhitelistedIPRanges = null, bool? hasLinuxWorkers = null, AppServiceEnvironmentUpgradePreference? upgradePreference = null, int? dedicatedHostCount = null, bool? isZoneRedundant = null, CustomDnsSuffixConfigurationData customDnsSuffixConfiguration = null, AseV3NetworkingConfigurationData networkingConfiguration = null, AppServiceEnvironmentUpgradeAvailability? upgradeAvailability = null) { clusterSettings ??= new List(); userWhitelistedIPRanges ??= new List(); @@ -886,8 +894,12 @@ public static AppServiceEnvironmentProperties AppServiceEnvironmentProperties(Pr clusterSettings?.ToList(), userWhitelistedIPRanges?.ToList(), hasLinuxWorkers, + upgradePreference, dedicatedHostCount, isZoneRedundant, + customDnsSuffixConfiguration, + networkingConfiguration, + upgradeAvailability, serializedAdditionalRawData: null); } @@ -902,6 +914,73 @@ public static AppServiceVirtualNetworkProfile AppServiceVirtualNetworkProfile(Re return new AppServiceVirtualNetworkProfile(id, name, resourceType, subnet, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// + /// The default custom domain suffix to use for all sites deployed on the ASE. + /// The URL referencing the Azure Key Vault certificate secret that should be used as the default SSL/TLS certificate for sites with the custom domain suffix. + /// The user-assigned identity to use for resolving the key vault certificate reference. If not specified, the system-assigned ASE identity will be used if available. + /// Kind of resource. + /// A new instance for mocking. + public static CustomDnsSuffixConfigurationData CustomDnsSuffixConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, CustomDnsSuffixProvisioningState? provisioningState = null, string provisioningDetails = null, string dnsSuffix = null, Uri certificateUri = null, string keyVaultReferenceIdentity = null, string kind = null) + { + return new CustomDnsSuffixConfigurationData( + id, + name, + resourceType, + systemData, + provisioningState, + provisioningDetails, + dnsSuffix, + certificateUri, + keyVaultReferenceIdentity, + kind, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// + /// + /// + /// Property to enable and disable new private endpoint connection creation on ASE. + /// Property to enable and disable FTP on ASEV3. + /// Property to enable and disable Remote Debug on ASEV3. + /// Customer provided Inbound IP Address. Only able to be set on Ase create. + /// Kind of resource. + /// A new instance for mocking. + public static AseV3NetworkingConfigurationData AseV3NetworkingConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable windowsOutboundIPAddresses = null, IEnumerable linuxOutboundIPAddresses = null, IEnumerable externalInboundIPAddresses = null, IEnumerable internalInboundIPAddresses = null, bool? allowNewPrivateEndpointConnections = null, bool? isFtpEnabled = null, bool? isRemoteDebugEnabled = null, string inboundIPAddressOverride = null, string kind = null) + { + windowsOutboundIPAddresses ??= new List(); + linuxOutboundIPAddresses ??= new List(); + externalInboundIPAddresses ??= new List(); + internalInboundIPAddresses ??= new List(); + + return new AseV3NetworkingConfigurationData( + id, + name, + resourceType, + systemData, + windowsOutboundIPAddresses?.ToList(), + linuxOutboundIPAddresses?.ToList(), + externalInboundIPAddresses?.ToList(), + internalInboundIPAddresses?.ToList(), + allowNewPrivateEndpointConnections, + isFtpEnabled, + isRemoteDebugEnabled, + inboundIPAddressOverride, + kind, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -924,11 +1003,15 @@ public static AppServiceVirtualNetworkProfile AppServiceVirtualNetworkProfile(Re /// Custom settings for changing the behavior of the App Service Environment. /// User added ip ranges to whitelist on ASE db. /// Flag that displays whether an ASE has linux workers or not. + /// Upgrade Preference. /// Dedicated Host Count. /// Whether or not this App Service Environment is zone-redundant. + /// Full view of the custom domain suffix configuration for ASEv3. + /// Full view of networking configuration for an ASE. + /// Whether an upgrade is available for this App Service Environment. /// Kind of resource. /// A new instance for mocking. - public static AppServiceEnvironmentPatch AppServiceEnvironmentPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ProvisioningState? provisioningState = null, HostingEnvironmentStatus? status = null, AppServiceVirtualNetworkProfile virtualNetwork = null, LoadBalancingMode? internalLoadBalancingMode = null, string multiSize = null, int? multiRoleCount = null, int? ipSslAddressCount = null, string dnsSuffix = null, int? maximumNumberOfMachines = null, int? frontEndScaleFactor = null, bool? isSuspended = null, IEnumerable clusterSettings = null, IEnumerable userWhitelistedIPRanges = null, bool? hasLinuxWorkers = null, int? dedicatedHostCount = null, bool? isZoneRedundant = null, string kind = null) + public static AppServiceEnvironmentPatch AppServiceEnvironmentPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ProvisioningState? provisioningState = null, HostingEnvironmentStatus? status = null, AppServiceVirtualNetworkProfile virtualNetwork = null, LoadBalancingMode? internalLoadBalancingMode = null, string multiSize = null, int? multiRoleCount = null, int? ipSslAddressCount = null, string dnsSuffix = null, int? maximumNumberOfMachines = null, int? frontEndScaleFactor = null, bool? isSuspended = null, IEnumerable clusterSettings = null, IEnumerable userWhitelistedIPRanges = null, bool? hasLinuxWorkers = null, AppServiceEnvironmentUpgradePreference? upgradePreference = null, int? dedicatedHostCount = null, bool? isZoneRedundant = null, CustomDnsSuffixConfigurationData customDnsSuffixConfiguration = null, AseV3NetworkingConfigurationData networkingConfiguration = null, AppServiceEnvironmentUpgradeAvailability? upgradeAvailability = null, string kind = null) { clusterSettings ??= new List(); userWhitelistedIPRanges ??= new List(); @@ -952,8 +1035,12 @@ public static AppServiceEnvironmentPatch AppServiceEnvironmentPatch(ResourceIden clusterSettings?.ToList(), userWhitelistedIPRanges?.ToList(), hasLinuxWorkers, + upgradePreference, dedicatedHostCount, isZoneRedundant, + customDnsSuffixConfiguration, + networkingConfiguration, + upgradeAvailability, kind, serializedAdditionalRawData: null); } @@ -1025,39 +1112,6 @@ public static AppServiceEnvironmentAddressResult AppServiceEnvironmentAddressRes serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// - /// - /// - /// - /// Property to enable and disable new private endpoint connection creation on ASE. - /// Kind of resource. - /// A new instance for mocking. - public static AseV3NetworkingConfigurationData AseV3NetworkingConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable windowsOutboundIPAddresses = null, IEnumerable linuxOutboundIPAddresses = null, IEnumerable externalInboundIPAddresses = null, IEnumerable internalInboundIPAddresses = null, bool? allowNewPrivateEndpointConnections = null, string kind = null) - { - windowsOutboundIPAddresses ??= new List(); - linuxOutboundIPAddresses ??= new List(); - externalInboundIPAddresses ??= new List(); - internalInboundIPAddresses ??= new List(); - - return new AseV3NetworkingConfigurationData( - id, - name, - resourceType, - systemData, - windowsOutboundIPAddresses?.ToList(), - linuxOutboundIPAddresses?.ToList(), - externalInboundIPAddresses?.ToList(), - internalInboundIPAddresses?.ToList(), - allowNewPrivateEndpointConnections, - kind, - serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// Name/identifier of the diagnostics. /// Diagnostics output. @@ -1283,26 +1337,6 @@ public static RemotePrivateEndpointConnectionARMResourceData RemotePrivateEndpoi serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The state of a private link connection. - /// Kind of resource. - /// A new instance for mocking. - public static PrivateLinkConnectionApprovalRequestInfo PrivateLinkConnectionApprovalRequestInfo(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, PrivateLinkConnectionState privateLinkServiceConnectionState = null, string kind = null) - { - return new PrivateLinkConnectionApprovalRequestInfo( - id, - name, - resourceType, - systemData, - privateLinkServiceConnectionState, - kind, - serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The id. /// The name. @@ -1348,6 +1382,7 @@ public static AppServicePrivateLinkResourceProperties AppServicePrivateLinkResou /// App Service plan subscription. /// Specification for the App Service Environment to use for the App Service plan. /// Maximum number of instances that can be assigned to this App Service plan. + /// The number of instances that are assigned to this App Service plan. /// Geographical location for the App Service plan. /// /// If <code>true</code>, apps assigned to this App Service plan can be scaled independently. @@ -1373,7 +1408,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, 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, int? numberOfWorkers = 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(); @@ -1391,6 +1426,7 @@ public static AppServicePlanData AppServicePlanData(ResourceIdentifier id = null subscription, hostingEnvironmentProfile, maximumNumberOfWorkers, + numberOfWorkers, geoRegion, isPerSiteScaling, isElasticScaleEnabled, @@ -1457,7 +1493,16 @@ public static KubeEnvironmentProfile KubeEnvironmentProfile(ResourceIdentifier i /// Obsolete: Hyper-V sandbox. /// Hyper-V sandbox. /// Last time the app was modified, in UTC. Read-only. + /// Property to configure various DNS related settings for a site. + /// Virtual Network Route All enabled. This causes all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied. + /// To enable pulling image over Virtual Network. + /// To enable accessing content over virtual network. + /// To enable Backup and Restore operations over virtual network. /// Configuration of the app. + /// Configuration specific of the Azure Function app. + /// Dapr configuration of the app. + /// Workload profile name for function app to execute on. + /// Function app resource requirements. /// Azure Traffic Manager hostnames associated with the app. Read-only. /// <code>true</code> to stop SCM (KUDU) site when the app is stopped; otherwise, <code>false</code>. The default is <code>false</code>. /// Specifies which deployment slot this app will swap into. Read-only. @@ -1496,15 +1541,17 @@ public static KubeEnvironmentProfile KubeEnvironmentProfile(ResourceIdentifier i /// /// Site redundancy mode. /// Specifies an operation id if this site has a pending operation. + /// Property to allow or block all public traffic. Allowed Values: 'Enabled', 'Disabled' or an empty string. /// Checks if Customer provided storage account is required. /// Identity to use for Key Vault Reference authentication. /// /// Azure Resource Manager ID of the Virtual network and subnet to be joined by Regional VNET Integration. /// This must be of the form /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} /// + /// Azure Resource Manager ID of the customer's selected Managed Environment on which to host this app. This must be of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}. /// 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, 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) + 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, SiteDnsConfig dnsConfiguration = null, bool? isVnetRouteAllEnabled = null, bool? isVnetImagePullEnabled = null, bool? isVnetContentShareEnabled = null, bool? isVnetBackupRestoreEnabled = null, SiteConfigProperties siteConfig = null, FunctionAppConfig functionAppConfig = null, AppDaprConfig daprConfig = null, string workloadProfileName = null, FunctionAppResourceConfig resourceConfig = 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, string publicNetworkAccess = null, bool? isStorageAccountRequired = null, string keyVaultReferenceIdentity = null, ResourceIdentifier virtualNetworkSubnetId = null, string managedEnvironmentId = null, string kind = null) { tags ??= new Dictionary(); hostNames ??= new List(); @@ -1534,7 +1581,16 @@ public static WebSiteData WebSiteData(ResourceIdentifier id = null, string name isXenon, isHyperV, lastModifiedTimeUtc, + dnsConfiguration, + isVnetRouteAllEnabled, + isVnetImagePullEnabled, + isVnetContentShareEnabled, + isVnetBackupRestoreEnabled, siteConfig, + functionAppConfig, + daprConfig, + workloadProfileName, + resourceConfig, trafficManagerHostNames?.ToList(), isScmSiteAlsoStopped, targetSwapSlot, @@ -1559,13 +1615,37 @@ public static WebSiteData WebSiteData(ResourceIdentifier id = null, string name isHttpsOnly, redundancyMode, inProgressOperationId, + publicNetworkAccess, isStorageAccountRequired, keyVaultReferenceIdentity, virtualNetworkSubnetId, + managedEnvironmentId, kind, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// List of custom DNS servers to be used by an app for lookups. Maximum 5 dns servers can be set. + /// Alternate DNS server to be used by apps. This property replicates the WEBSITE_DNS_ALT_SERVER app setting. + /// Timeout for a single dns lookup in seconds. Allowed range: 1-30. Default is 3. + /// Total number of retries for dns lookup. Allowed range: 1-5. Default is 3. + /// Custom time for DNS to be cached in seconds. Allowed range: 0-60. Default is 30 seconds. 0 means caching disabled. + /// Indicates that sites using Virtual network custom DNS servers are still sorting the list of DNS servers. Read-Only. + /// A new instance for mocking. + public static SiteDnsConfig SiteDnsConfig(IEnumerable dnsServers = null, string dnsAltServer = null, int? dnsRetryAttemptTimeout = null, int? dnsRetryAttemptCount = null, int? dnsMaxCacheTimeout = null, bool? dnsLegacySortOrder = null) + { + dnsServers ??= new List(); + + return new SiteDnsConfig( + dnsServers?.ToList(), + dnsAltServer, + dnsRetryAttemptTimeout, + dnsRetryAttemptCount, + dnsMaxCacheTimeout, + dnsLegacySortOrder, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// Number of workers. /// Default documents. @@ -1587,6 +1667,7 @@ public static WebSiteData WebSiteData(ResourceIdentifier id = null, string name /// <code>true</code> if detailed error logging is enabled; otherwise, <code>false</code>. /// Publishing user name. /// Application settings. + /// Application metadata. This property cannot be retrieved, since it may contain secrets. /// Connection strings. /// Site MachineKey. /// Handler mappings. @@ -1620,10 +1701,13 @@ public static WebSiteData WebSiteData(ResourceIdentifier id = null, string name /// Explicit Managed Service Identity Id. /// Identity to use for Key Vault Reference authentication. /// IP security restrictions for main. + /// Default action for main access restriction if no rules are matched. /// IP security restrictions for scm. + /// Default action for scm access restriction if no rules are matched. /// 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. + /// The minimum strength TLS cipher suite allowed for an application. /// ScmMinTlsVersion: configures the minimum version of TLS required for SSL requests for SCM site. /// State of FTP / FTPS service. /// @@ -1634,6 +1718,10 @@ public static WebSiteData WebSiteData(ResourceIdentifier id = null, string name /// Maximum number of workers that a site can scale out to. /// This setting only applies to the Consumption and Elastic Premium Plans /// + /// + /// Maximum number of workers that a site can scale out to. + /// This setting only applies to apps in plans where ElasticScaleEnabled is <code>true</code> + /// /// Health check path. /// /// Gets or sets a value indicating whether functions runtime scale monitoring is enabled. When enabled, @@ -1648,10 +1736,11 @@ public static WebSiteData WebSiteData(ResourceIdentifier id = null, string name /// 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) + 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 metadata = 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, SiteDefaultAction? ipSecurityRestrictionsDefaultAction = null, IEnumerable scmIPSecurityRestrictions = null, SiteDefaultAction? scmIPSecurityRestrictionsDefaultAction = null, bool? allowIPSecurityRestrictionsForScmToUseMain = null, bool? isHttp20Enabled = null, AppServiceSupportedTlsVersion? minTlsVersion = null, AppServiceTlsCipherSuite? minTlsCipherSuite = null, AppServiceSupportedTlsVersion? scmMinTlsVersion = null, AppServiceFtpsState? ftpsState = null, int? preWarmedInstanceCount = null, int? functionAppScaleLimit = null, int? elasticWebAppScaleLimit = 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(); + metadata ??= new List(); connectionStrings ??= new List(); handlerMappings ??= new List(); virtualApplications ??= new List(); @@ -1681,6 +1770,7 @@ public static SiteConfigProperties SiteConfigProperties(int? numberOfWorkers = n isDetailedErrorLoggingEnabled, publishingUsername, appSettings?.ToList(), + metadata?.ToList(), connectionStrings?.ToList(), machineKey, handlerMappings?.ToList(), @@ -1714,14 +1804,18 @@ public static SiteConfigProperties SiteConfigProperties(int? numberOfWorkers = n xManagedServiceIdentityId, keyVaultReferenceIdentity, ipSecurityRestrictions?.ToList(), + ipSecurityRestrictionsDefaultAction, scmIPSecurityRestrictions?.ToList(), + scmIPSecurityRestrictionsDefaultAction, allowIPSecurityRestrictionsForScmToUseMain, isHttp20Enabled, minTlsVersion, + minTlsCipherSuite, scmMinTlsVersion, ftpsState, preWarmedInstanceCount, functionAppScaleLimit, + elasticWebAppScaleLimit, healthCheckPath, isFunctionsRuntimeScaleMonitoringEnabled, websiteTimeZone, @@ -1780,8 +1874,9 @@ public static WebAppPushSettings WebAppPushSettings(ResourceIdentifier id = null /// Access key for the storage account. /// Path to mount the storage within the site's runtime environment. /// State of the storage account. + /// Mounting protocol to use for the storage account. /// A new instance for mocking. - public static AppServiceStorageAccessInfo AppServiceStorageAccessInfo(AppServiceStorageType? storageType = null, string accountName = null, string shareName = null, string accessKey = null, string mountPath = null, AppServiceStorageAccountState? state = null) + public static AppServiceStorageAccessInfo AppServiceStorageAccessInfo(AppServiceStorageType? storageType = null, string accountName = null, string shareName = null, string accessKey = null, string mountPath = null, AppServiceStorageAccountState? state = null, AppServiceStorageProtocol? protocol = null) { return new AppServiceStorageAccessInfo( storageType, @@ -1790,6 +1885,7 @@ public static AppServiceStorageAccessInfo AppServiceStorageAccessInfo(AppService accessKey, mountPath, state, + protocol, serializedAdditionalRawData: null); } @@ -1840,6 +1936,7 @@ public static LocalizableString LocalizableString(string value = null, string lo /// App Service plan subscription. /// Specification for the App Service Environment to use for the App Service plan. /// Maximum number of instances that can be assigned to this App Service plan. + /// The number of instances that are assigned to this App Service plan. /// Geographical location for the App Service plan. /// /// If <code>true</code>, apps assigned to this App Service plan can be scaled independently. @@ -1865,7 +1962,7 @@ public static LocalizableString LocalizableString(string value = null, string lo /// /// Kind of resource. /// A new instance for mocking. - public static AppServicePlanPatch AppServicePlanPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = 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? spotExpirationOn = null, DateTimeOffset? freeOfferExpirationOn = 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 AppServicePlanPatch AppServicePlanPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string workerTierName = null, AppServicePlanStatus? status = null, string subscription = null, HostingEnvironmentProfile hostingEnvironmentProfile = null, int? maximumNumberOfWorkers = null, int? numberOfWorkers = null, string geoRegion = null, bool? isPerSiteScaling = null, bool? isElasticScaleEnabled = null, int? maximumElasticWorkerCount = null, int? numberOfSites = null, bool? isSpot = null, DateTimeOffset? spotExpirationOn = null, DateTimeOffset? freeOfferExpirationOn = 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) { return new AppServicePlanPatch( id, @@ -1877,6 +1974,7 @@ public static AppServicePlanPatch AppServicePlanPatch(ResourceIdentifier id = nu subscription, hostingEnvironmentProfile, maximumNumberOfWorkers, + numberOfWorkers, geoRegion, isPerSiteScaling, isElasticScaleEnabled, @@ -2439,6 +2537,7 @@ public static AppSnapshot AppSnapshot(ResourceIdentifier id = null, string name /// Only visible within Vnet/Subnet. /// Default Domain Name for the cluster. /// Static IP of the KubeEnvironment. + /// Type of Kubernetes Environment. Only supported for Container App Environments with value as Managed. /// /// Cluster configuration which determines the ARC cluster /// components types. Eg: Choosing between BuildService kind, @@ -2449,10 +2548,11 @@ public static AppSnapshot AppSnapshot(ResourceIdentifier id = null, string name /// app logs to a destination. Currently only "log-analytics" is /// supported /// + /// Cluster configuration for Container Apps Environments to configure Dapr Instrumentation Key and VNET Configuration. /// /// 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, 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, string environmentType = null, ArcConfiguration arcConfiguration = null, AppLogsConfiguration appLogsConfiguration = null, ContainerAppsConfiguration containerAppsConfiguration = null, ResourceIdentifier aksResourceId = null, string kind = null) { tags ??= new Dictionary(); @@ -2469,8 +2569,10 @@ public static KubeEnvironmentData KubeEnvironmentData(ResourceIdentifier id = nu isInternalLoadBalancerEnabled, defaultDomain, staticIP, + environmentType, arcConfiguration, appLogsConfiguration, + containerAppsConfiguration, aksResourceId, kind, serializedAdditionalRawData: null); @@ -2496,10 +2598,11 @@ public static KubeEnvironmentData KubeEnvironmentData(ResourceIdentifier id = nu /// app logs to a destination. Currently only "log-analytics" is /// supported /// + /// Cluster configuration for Container Apps Environments to configure Dapr Instrumentation Key and VNET Configuration. /// /// Kind of resource. /// A new instance for mocking. - public static KubeEnvironmentPatch KubeEnvironmentPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = 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 KubeEnvironmentPatch KubeEnvironmentPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, KubeEnvironmentProvisioningState? provisioningState = null, string deploymentErrors = null, bool? isInternalLoadBalancerEnabled = null, string defaultDomain = null, string staticIP = null, ArcConfiguration arcConfiguration = null, AppLogsConfiguration appLogsConfiguration = null, ContainerAppsConfiguration containerAppsConfiguration = null, ResourceIdentifier aksResourceId = null, string kind = null) { return new KubeEnvironmentPatch( id, @@ -2513,6 +2616,7 @@ public static KubeEnvironmentPatch KubeEnvironmentPatch(ResourceIdentifier id = staticIP, arcConfiguration, appLogsConfiguration, + containerAppsConfiguration, aksResourceId, kind, serializedAdditionalRawData: null); @@ -3046,10 +3150,11 @@ public static AppServiceBillingMeter AppServiceBillingMeter(ResourceIdentifier i /// Resource name to verify. /// Resource type used for verification. /// Is fully qualified domain name. + /// Azure Resource Manager ID of the customer's selected Container Apps Environment on which to host the Function app. This must be of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}. /// A new instance for mocking. - public static ResourceNameAvailabilityContent ResourceNameAvailabilityContent(string name = null, CheckNameResourceType resourceType = default, bool? isFqdn = null) + public static ResourceNameAvailabilityContent ResourceNameAvailabilityContent(string name = null, CheckNameResourceType resourceType = default, bool? isFqdn = null, string environmentId = null) { - return new ResourceNameAvailabilityContent(name, resourceType, isFqdn, serializedAdditionalRawData: null); + return new ResourceNameAvailabilityContent(name, resourceType, isFqdn, environmentId, serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -3062,6 +3167,52 @@ public static ResourceNameAvailability ResourceNameAvailability(bool? isNameAvai return new ResourceNameAvailability(isNameAvailable, reason, message, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// + /// + /// Kind of resource. + /// A new instance for mocking. + public static CustomHostnameSites CustomHostnameSites(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string customHostname = null, string region = null, IEnumerable siteResourceIds = null, string kind = null) + { + siteResourceIds ??= new List(); + + return new CustomHostnameSites( + id, + name, + resourceType, + systemData, + customHostname, + region, + siteResourceIds?.ToList(), + kind, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// String representation of the identity. + /// Kind of resource. + /// A new instance for mocking. + public static AppServiceIdentifierData AppServiceIdentifierData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string value = null, string kind = null) + { + return new AppServiceIdentifierData( + id, + name, + resourceType, + systemData, + value, + kind, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// Available regions. /// Available App Service Environments with full descriptions of the environments. @@ -3109,22 +3260,35 @@ public static HostingEnvironmentDeploymentInfo HostingEnvironmentDeploymentInfo( return new HostingEnvironmentDeploymentInfo(name, location, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// String representation of the identity. + /// Display name for region. + /// Is region standard. + /// Dedicated host enabled. + /// Zone redundant deployment enabled. + /// Available Skus in region. + /// Available OSs in region. /// Kind of resource. - /// A new instance for mocking. - public static AppServiceIdentifierData AppServiceIdentifierData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string value = null, string kind = null) + /// A new instance for mocking. + public static AppServiceAseRegion AppServiceAseRegion(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, bool? isStandard = null, bool? isDedicatedHostEnabled = null, bool? isZoneRedundantEnabled = null, IEnumerable availableSku = null, IEnumerable availableOS = null, string kind = null) { - return new AppServiceIdentifierData( + availableSku ??= new List(); + availableOS ??= new List(); + + return new AppServiceAseRegion( id, name, resourceType, systemData, - value, + displayName, + isStandard, + isDedicatedHostEnabled, + isZoneRedundantEnabled, + availableSku?.ToList(), + availableOS?.ToList(), kind, serializedAdditionalRawData: null); } @@ -3408,15 +3572,21 @@ public static StaticSitesWorkflowPreview StaticSitesWorkflowPreview(ResourceIden /// The content distribution endpoint for the static site. /// Identity to use for Key Vault Reference authentication. /// User provided function apps registered with the static site. + /// Backends linked to the static side. /// The provider that submitted the last deployment to the primary environment of the static site. + /// State indicating the status of the enterprise grade CDN serving traffic to the static web app. + /// State indicating whether public traffic are allowed or not for a static web app. Allowed Values: 'Enabled', 'Disabled' or an empty string. + /// Database connections for 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, 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, IEnumerable linkedBackends = null, string provider = null, EnterpriseGradeCdnStatus? enterpriseGradeCdnStatus = null, string publicNetworkAccess = null, IEnumerable databaseConnections = null, string kind = null) { tags ??= new Dictionary(); customDomains ??= new List(); privateEndpointConnections ??= new List(); userProvidedFunctionApps ??= new List(); + linkedBackends ??= new List(); + databaseConnections ??= new List(); return new StaticSiteData( id, @@ -3440,7 +3610,11 @@ public static StaticSiteData StaticSiteData(ResourceIdentifier id = null, string contentDistributionEndpoint, keyVaultReferenceIdentity, userProvidedFunctionApps?.ToList(), + linkedBackends?.ToList(), provider, + enterpriseGradeCdnStatus, + publicNetworkAccess, + databaseConnections?.ToList(), kind, serializedAdditionalRawData: null); } @@ -3552,6 +3726,47 @@ public static StaticSiteUserProvidedFunctionAppData StaticSiteUserProvidedFuncti serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The resource id of the backend linked to the static site. + /// The region of the backend linked to the static site. + /// The date and time on which the backend was linked to the static site. + /// The provisioning state of the linking process. + /// A new instance for mocking. + public static StaticSiteLinkedBackendInfo StaticSiteLinkedBackendInfo(string backendResourceId = null, string region = null, DateTimeOffset? createdOn = null, string provisioningState = null) + { + return new StaticSiteLinkedBackendInfo(backendResourceId, region, createdOn, provisioningState, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The resource id of the database. + /// If present, the identity is used in conjunction with connection string to connect to the database. Use of the system-assigned managed identity is indicated with the string 'SystemAssigned', while use of a user-assigned managed identity is indicated with the resource id of the managed identity resource. + /// The region of the database resource. + /// A list of configuration files associated with this database connection. + /// If present, the name of this database connection resource. + /// A new instance for mocking. + public static StaticSiteDatabaseConnectionOverview StaticSiteDatabaseConnectionOverview(ResourceIdentifier resourceId = null, string connectionIdentity = null, string region = null, IEnumerable configurationFiles = null, string name = null) + { + configurationFiles ??= new List(); + + return new StaticSiteDatabaseConnectionOverview( + resourceId, + connectionIdentity, + region, + configurationFiles?.ToList(), + name, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The name of the configuration file. + /// The Base64 encoding of the file contents. + /// The type of configuration file. + /// A new instance for mocking. + public static StaticSiteDatabaseConnectionConfigurationFileOverview StaticSiteDatabaseConnectionConfigurationFileOverview(string fileName = null, string contents = null, string staticSiteDatabaseConnectionConfigurationFileOverviewType = null) + { + return new StaticSiteDatabaseConnectionConfigurationFileOverview(fileName, contents, staticSiteDatabaseConnectionConfigurationFileOverviewType, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -3570,14 +3785,20 @@ public static StaticSiteUserProvidedFunctionAppData StaticSiteUserProvidedFuncti /// The content distribution endpoint for the static site. /// Identity to use for Key Vault Reference authentication. /// User provided function apps registered with the static site. + /// Backends linked to the static side. /// The provider that submitted the last deployment to the primary environment of the static site. + /// State indicating the status of the enterprise grade CDN serving traffic to the static web app. + /// State indicating whether public traffic are allowed or not for a static web app. Allowed Values: 'Enabled', 'Disabled' or an empty string. + /// Database connections for the static site. /// Kind of resource. /// A new instance for mocking. - public static StaticSitePatch StaticSitePatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = 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 StaticSitePatch StaticSitePatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = 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, IEnumerable linkedBackends = null, string provider = null, EnterpriseGradeCdnStatus? enterpriseGradeCdnStatus = null, string publicNetworkAccess = null, IEnumerable databaseConnections = null, string kind = null) { customDomains ??= new List(); privateEndpointConnections ??= new List(); userProvidedFunctionApps ??= new List(); + linkedBackends ??= new List(); + databaseConnections ??= new List(); return new StaticSitePatch( id, @@ -3597,7 +3818,11 @@ public static StaticSitePatch StaticSitePatch(ResourceIdentifier id = null, stri contentDistributionEndpoint, keyVaultReferenceIdentity, userProvidedFunctionApps?.ToList(), + linkedBackends?.ToList(), provider, + enterpriseGradeCdnStatus, + publicNetworkAccess, + databaseConnections?.ToList(), kind, serializedAdditionalRawData: null); } @@ -3641,11 +3866,15 @@ public static StaticSiteUser StaticSiteUser(ResourceIdentifier id = null, string /// When this build was updated. /// The status of the static site build. /// User provided function apps registered with the static site build. + /// Backends linked to the static side build. + /// Database connections for the static site build. /// Kind of resource. /// A new instance for mocking. - public static StaticSiteBuildData StaticSiteBuildData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string buildId = null, string sourceBranch = null, string pullRequestTitle = null, string hostname = null, DateTimeOffset? createdOn = null, DateTimeOffset? lastUpdatedOn = null, StaticSiteBuildStatus? status = null, IEnumerable userProvidedFunctionApps = null, string kind = null) + public static StaticSiteBuildData StaticSiteBuildData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string buildId = null, string sourceBranch = null, string pullRequestTitle = null, string hostname = null, DateTimeOffset? createdOn = null, DateTimeOffset? lastUpdatedOn = null, StaticSiteBuildStatus? status = null, IEnumerable userProvidedFunctionApps = null, IEnumerable linkedBackends = null, IEnumerable databaseConnections = null, string kind = null) { userProvidedFunctionApps ??= new List(); + linkedBackends ??= new List(); + databaseConnections ??= new List(); return new StaticSiteBuildData( id, @@ -3660,6 +3889,8 @@ public static StaticSiteBuildData StaticSiteBuildData(ResourceIdentifier id = nu lastUpdatedOn, status, userProvidedFunctionApps?.ToList(), + linkedBackends?.ToList(), + databaseConnections?.ToList(), kind, serializedAdditionalRawData: null); } @@ -3686,6 +3917,36 @@ public static AppServiceConfigurationDictionary AppServiceConfigurationDictionar serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource id of the database. + /// If present, the identity is used in conjunction with connection string to connect to the database. Use of the system-assigned managed identity is indicated with the string 'SystemAssigned', while use of a user-assigned managed identity is indicated with the resource id of the managed identity resource. + /// The connection string to use to connect to the database. + /// The region of the database resource. + /// A list of configuration files associated with this database connection. + /// Kind of resource. + /// A new instance for mocking. + public static StaticSiteDatabaseConnectionData StaticSiteDatabaseConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceIdentifier resourceId = null, string connectionIdentity = null, string connectionString = null, string region = null, IEnumerable configurationFiles = null, string kind = null) + { + configurationFiles ??= new List(); + + return new StaticSiteDatabaseConnectionData( + id, + name, + resourceType, + systemData, + resourceId, + connectionIdentity, + connectionString, + region, + configurationFiles?.ToList(), + kind, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -3736,6 +3997,36 @@ public static StaticSiteZipDeployment StaticSiteZipDeployment(ResourceIdentifier serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The password for basic auth. + /// Url to the secret in Key Vault. + /// State indicating if basic auth is enabled and for what environments it is active. + /// The list of enabled environments for Basic Auth if ApplicableEnvironmentsMode is set to SpecifiedEnvironments. + /// State indicating if basic auth has a secret and what type it is. + /// Kind of resource. + /// A new instance for mocking. + public static StaticSiteBasicAuthPropertyData StaticSiteBasicAuthPropertyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string password = null, Uri secretUri = null, string applicableEnvironmentsMode = null, IEnumerable environments = null, string secretState = null, string kind = null) + { + environments ??= new List(); + + return new StaticSiteBasicAuthPropertyData( + id, + name, + resourceType, + systemData, + password, + secretUri, + applicableEnvironmentsMode, + environments?.ToList(), + secretState, + kind, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -3878,6 +4169,32 @@ public static StaticSiteResetContent StaticSiteResetContent(ResourceIdentifier i serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource id of the backend linked to the static site. + /// The region of the backend linked to the static site. + /// The date and time on which the backend was linked to the static site. + /// The provisioning state of the linking process. + /// Kind of resource. + /// A new instance for mocking. + public static StaticSiteLinkedBackendData StaticSiteLinkedBackendData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceIdentifier backendResourceId = null, string region = null, DateTimeOffset? createdOn = null, string provisioningState = null, string kind = null) + { + return new StaticSiteLinkedBackendData( + id, + name, + resourceType, + systemData, + backendResourceId, + region, + createdOn, + provisioningState, + kind, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -3900,6 +4217,7 @@ public static StaticSiteResetContent StaticSiteResetContent(ResourceIdentifier i /// Obsolete: Hyper-V sandbox. /// Hyper-V sandbox. /// Last time the app was modified, in UTC. Read-only. + /// Property to configure various DNS related settings for a site. /// Configuration of the app. /// Azure Traffic Manager hostnames associated with the app. Read-only. /// <code>true</code> to stop SCM (KUDU) site when the app is stopped; otherwise, <code>false</code>. The default is <code>false</code>. @@ -3947,7 +4265,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, 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, SiteDnsConfig dnsConfiguration = 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(); @@ -3973,6 +4291,7 @@ public static SitePatchInfo SitePatchInfo(ResourceIdentifier id = null, string n isXenon, isHyperV, lastModifiedOn, + dnsConfiguration, siteConfig, trafficManagerHostNames?.ToList(), isScmSiteAlsoStopped, @@ -4239,6 +4558,7 @@ public static CsmPublishingCredentialsPoliciesEntityData CsmPublishingCredential /// <code>true</code> if detailed error logging is enabled; otherwise, <code>false</code>. /// Publishing user name. /// Application settings. + /// Application metadata. This property cannot be retrieved, since it may contain secrets. /// Connection strings. /// Site MachineKey. /// Handler mappings. @@ -4272,10 +4592,13 @@ public static CsmPublishingCredentialsPoliciesEntityData CsmPublishingCredential /// Explicit Managed Service Identity Id. /// Identity to use for Key Vault Reference authentication. /// IP security restrictions for main. + /// Default action for main access restriction if no rules are matched. /// IP security restrictions for scm. + /// Default action for scm access restriction if no rules are matched. /// 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. + /// The minimum strength TLS cipher suite allowed for an application. /// ScmMinTlsVersion: configures the minimum version of TLS required for SSL requests for SCM site. /// State of FTP / FTPS service. /// @@ -4286,6 +4609,10 @@ public static CsmPublishingCredentialsPoliciesEntityData CsmPublishingCredential /// Maximum number of workers that a site can scale out to. /// This setting only applies to the Consumption and Elastic Premium Plans /// + /// + /// Maximum number of workers that a site can scale out to. + /// This setting only applies to apps in plans where ElasticScaleEnabled is <code>true</code> + /// /// Health check path. /// /// Gets or sets a value indicating whether functions runtime scale monitoring is enabled. When enabled, @@ -4301,10 +4628,11 @@ public static CsmPublishingCredentialsPoliciesEntityData CsmPublishingCredential /// 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) + 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 metadata = 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, SiteDefaultAction? ipSecurityRestrictionsDefaultAction = null, IEnumerable scmIPSecurityRestrictions = null, SiteDefaultAction? scmIPSecurityRestrictionsDefaultAction = null, bool? allowIPSecurityRestrictionsForScmToUseMain = null, bool? isHttp20Enabled = null, AppServiceSupportedTlsVersion? minTlsVersion = null, AppServiceTlsCipherSuite? minTlsCipherSuite = null, AppServiceSupportedTlsVersion? scmMinTlsVersion = null, AppServiceFtpsState? ftpsState = null, int? preWarmedInstanceCount = null, int? functionAppScaleLimit = null, int? elasticWebAppScaleLimit = 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(); + metadata ??= new List(); connectionStrings ??= new List(); handlerMappings ??= new List(); virtualApplications ??= new List(); @@ -4338,6 +4666,7 @@ public static SiteConfigData SiteConfigData(ResourceIdentifier id = null, string isDetailedErrorLoggingEnabled, publishingUsername, appSettings?.ToList(), + metadata?.ToList(), connectionStrings?.ToList(), machineKey, handlerMappings?.ToList(), @@ -4371,14 +4700,18 @@ public static SiteConfigData SiteConfigData(ResourceIdentifier id = null, string xManagedServiceIdentityId, keyVaultReferenceIdentity, ipSecurityRestrictions?.ToList(), + ipSecurityRestrictionsDefaultAction, scmIPSecurityRestrictions?.ToList(), + scmIPSecurityRestrictionsDefaultAction, allowIPSecurityRestrictionsForScmToUseMain, isHttp20Enabled, minTlsVersion, + minTlsCipherSuite, scmMinTlsVersion, ftpsState, preWarmedInstanceCount, functionAppScaleLimit, + elasticWebAppScaleLimit, healthCheckPath, isFunctionsRuntimeScaleMonitoringEnabled, websiteTimeZone, @@ -4443,7 +4776,7 @@ public static SiteConfigData SiteConfigData(ResourceIdentifier id = null, string /// /// Gets a value indicating whether the issuer should be a valid HTTPS url and be validated as such. /// - /// Allowed audience values to consider when validating JWTs issued by + /// Allowed audience values to consider when validating JSON Web Tokens issued by /// Azure Active Directory. Note that the <code>ClientID</code> value is always considered an /// allowed audience, regardless of this setting. /// @@ -4831,6 +5164,41 @@ public static ContinuousWebJobData ContinuousWebJobData(ResourceIdentifier id = serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Deployment operation id. + /// Deployment build status. + /// Number of site instances currently being provisioned. + /// Number of site instances provisioned successfully. + /// Number of site instances failed to provision. + /// List of URLs pointing to logs for instances which failed to provision. + /// List of errors. + /// Kind of resource. + /// A new instance for mocking. + public static CsmDeploymentStatus CsmDeploymentStatus(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string deploymentId = null, DeploymentBuildStatus? status = null, int? numberOfInstancesInProgress = null, int? numberOfInstancesSuccessful = null, int? numberOfInstancesFailed = null, IEnumerable failedInstancesLogs = null, IEnumerable errors = null, string kind = null) + { + failedInstancesLogs ??= new List(); + errors ??= new List(); + + return new CsmDeploymentStatus( + id, + name, + resourceType, + systemData, + deploymentId, + status, + numberOfInstancesInProgress, + numberOfInstancesSuccessful, + numberOfInstancesFailed, + failedInstancesLogs?.ToList(), + errors?.ToList(), + kind, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -5737,20 +6105,65 @@ public static SnapshotRestoreRequest SnapshotRestoreRequest(ResourceIdentifier i serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// Site extension ID. - /// - /// Site extension type. - /// Summary description. - /// Detailed description. - /// Version information. - /// Extension URL. - /// Project URL. - /// Icon URL. + /// Image Name. + /// Target Port. + /// <code>true</code> if the container is the main site container; <code>false</code> otherwise. + /// StartUp Command. + /// Auth Type. + /// User Name. + /// Password Secret. + /// UserManagedIdentity ClientId. + /// Created Time. + /// Last Modified Time. + /// List of volume mounts. + /// List of environment variables. + /// Kind of resource. + /// A new instance for mocking. + public static SiteContainerData SiteContainerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string image = null, string targetPort = null, bool? isMain = null, string startUpCommand = null, SiteContainerAuthType? authType = null, string userName = null, string passwordSecret = null, string userManagedIdentityClientId = null, DateTimeOffset? createdOn = null, DateTimeOffset? lastModifiedOn = null, IEnumerable volumeMounts = null, IEnumerable environmentVariables = null, string kind = null) + { + volumeMounts ??= new List(); + environmentVariables ??= new List(); + + return new SiteContainerData( + id, + name, + resourceType, + systemData, + image, + targetPort, + isMain, + startUpCommand, + authType, + userName, + passwordSecret, + userManagedIdentityClientId, + createdOn, + lastModifiedOn, + volumeMounts?.ToList(), + environmentVariables?.ToList(), + kind, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Site extension ID. + /// + /// Site extension type. + /// Summary description. + /// Detailed description. + /// Version information. + /// Extension URL. + /// Project URL. + /// Icon URL. /// License URL. /// Feed URL. /// List of authors. @@ -5875,10 +6288,12 @@ public static SiteSourceControlData SiteSourceControlData(ResourceIdentifier id /// Job type. /// Error information. /// Using SDK?. + /// Property to allow or block all public traffic. Allowed Values: 'Enabled', 'Disabled' or an empty string. + /// Checks if Customer provided storage account is required. /// Job settings. /// Kind of resource. /// A new instance for mocking. - public static TriggeredWebJobData TriggeredWebJobData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, TriggeredJobRun latestRun = null, Uri historyUri = null, Uri schedulerLogsUri = null, string runCommand = null, Uri uri = null, Uri extraInfoUri = null, WebJobType? webJobType = null, string error = null, bool? isUsingSdk = null, IDictionary settings = null, string kind = null) + public static TriggeredWebJobData TriggeredWebJobData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, TriggeredJobRun latestRun = null, Uri historyUri = null, Uri schedulerLogsUri = null, string runCommand = null, Uri uri = null, Uri extraInfoUri = null, WebJobType? webJobType = null, string error = null, bool? isUsingSdk = null, string publicNetworkAccess = null, bool? isStorageAccountRequired = null, IDictionary settings = null, string kind = null) { settings ??= new Dictionary(); @@ -5896,6 +6311,8 @@ public static TriggeredWebJobData TriggeredWebJobData(ResourceIdentifier id = nu webJobType, error, isUsingSdk, + publicNetworkAccess, + isStorageAccountRequired, settings, kind, serializedAdditionalRawData: null); @@ -5956,5 +6373,657 @@ public static WebJobData WebJobData(ResourceIdentifier id = null, string name = kind, serializedAdditionalRawData: null); } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource kind. + /// The resource location. + /// Additional workflow properties. + /// A new instance for mocking. + public static WorkflowEnvelopeData WorkflowEnvelopeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string kind = null, AzureLocation? location = null, WorkflowEnvelopeProperties properties = null) + { + return new WorkflowEnvelopeData( + id, + name, + resourceType, + systemData, + kind, + location, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets or sets the files. + /// Gets or sets the state of the workflow. + /// Gets or sets workflow health. + /// A new instance for mocking. + public static WorkflowEnvelopeProperties WorkflowEnvelopeProperties(IReadOnlyDictionary files = null, WorkflowState? flowState = null, WorkflowHealth health = null) + { + files ??= new Dictionary(); + + return new WorkflowEnvelopeProperties(files, flowState, health, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets or sets the workflow health state. + /// Gets or sets the workflow error. + /// A new instance for mocking. + public static WorkflowHealth WorkflowHealth(WorkflowHealthState state = default, ResponseError error = null) + { + return new WorkflowHealth(state, error, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Gets the wait end time. + /// Gets the start time. + /// Gets the end time. + /// Gets the status. + /// Gets the code. + /// Gets the error. + /// Gets the correlation id. + /// The run correlation. + /// Gets the reference to workflow version. + /// Gets the fired trigger. + /// Gets the outputs. + /// Gets the response of the flow run. + /// A new instance for mocking. + public static WorkflowRunData WorkflowRunData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? waitEndOn = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, WorkflowStatus? status = null, string code = null, BinaryData error = null, string correlationId = null, string correlationClientTrackingId = null, WorkflowResourceReference workflow = null, WorkflowRunTrigger trigger = null, IReadOnlyDictionary outputs = null, WorkflowRunTrigger response = null) + { + outputs ??= new Dictionary(); + + return new WorkflowRunData( + id, + name, + resourceType, + systemData, + waitEndOn, + startOn, + endOn, + status, + code, + error, + correlationId, + correlationClientTrackingId != null ? new Correlation(correlationClientTrackingId, serializedAdditionalRawData: null) : null, + workflow, + trigger, + outputs, + response, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The resource id. + /// Gets the resource name. + /// Gets the resource type. + /// A new instance for mocking. + public static WorkflowResourceReference WorkflowResourceReference(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null) + { + return new WorkflowResourceReference(id, name, resourceType, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets the name. + /// Gets the inputs. + /// Gets the link to inputs. + /// Gets the outputs. + /// Gets the link to outputs. + /// Gets the scheduled time. + /// Gets the start time. + /// Gets the end time. + /// Gets the tracking id. + /// The run correlation. + /// Gets the code. + /// Gets the status. + /// Gets the error. + /// Gets the tracked properties. + /// A new instance for mocking. + public static WorkflowRunTrigger WorkflowRunTrigger(string name = null, BinaryData inputs = null, WebAppContentLink inputsLink = null, BinaryData outputs = null, WebAppContentLink outputsLink = null, DateTimeOffset? scheduledOn = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, string trackingId = null, string correlationClientTrackingId = null, string code = null, WorkflowStatus? status = null, BinaryData error = null, BinaryData trackedProperties = null) + { + return new WorkflowRunTrigger( + name, + inputs, + inputsLink, + outputs, + outputsLink, + scheduledOn, + startOn, + endOn, + trackingId, + correlationClientTrackingId != null ? new Correlation(correlationClientTrackingId, serializedAdditionalRawData: null) : null, + code, + status, + error, + trackedProperties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The content link URI. + /// The content version. + /// The content size. + /// The content hash. + /// The metadata. + /// A new instance for mocking. + public static WebAppContentLink WebAppContentLink(Uri uri = null, string contentVersion = null, long? contentSize = null, WebAppContentHash contentHash = null, BinaryData metadata = null) + { + return new WebAppContentLink( + uri, + contentVersion, + contentSize, + contentHash, + metadata, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The algorithm of the content hash. + /// The value of the content hash. + /// A new instance for mocking. + public static WebAppContentHash WebAppContentHash(string algorithm = null, string value = null) + { + return new WebAppContentHash(algorithm, value, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The type. + /// The value. + /// The metadata. + /// The description. + /// Gets the error. + /// A new instance for mocking. + public static WorkflowOutputContent WorkflowOutputContent(WebAppParameterType? webAppParameterType = null, BinaryData value = null, BinaryData metadata = null, string description = null, BinaryData error = null) + { + return new WorkflowOutputContent( + webAppParameterType, + value, + metadata, + description, + serializedAdditionalRawData: null, + error); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Gets the start time. + /// Gets the end time. + /// Gets the status. + /// Gets the code. + /// Gets the error. + /// Gets the tracking id. + /// The correlation properties. + /// Gets the link to inputs. + /// Gets the link to outputs. + /// Gets the tracked properties. + /// Gets the retry histories. + /// A new instance for mocking. + public static WorkflowRunActionData WorkflowRunActionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, WorkflowStatus? status = null, string code = null, BinaryData error = null, string trackingId = null, WebAppRunActionCorrelation correlation = null, WebAppContentLink inputsLink = null, WebAppContentLink outputsLink = null, BinaryData trackedProperties = null, IEnumerable retryHistory = null) + { + retryHistory ??= new List(); + + return new WorkflowRunActionData( + id, + name, + resourceType, + systemData, + startOn, + endOn, + status, + code, + error, + trackingId, + correlation, + inputsLink, + outputsLink, + trackedProperties, + retryHistory?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The text. + /// Anything. + /// The sub expressions. + /// The azure resource error info. + /// The path. + /// A new instance for mocking. + public static WorkflowExpressionRoot WorkflowExpressionRoot(string text = null, BinaryData value = null, IEnumerable subexpressions = null, WorkflowExpressionResourceErrorInfo error = null, string path = null) + { + subexpressions ??= new List(); + + return new WorkflowExpressionRoot( + text, + value, + subexpressions?.ToList(), + error, + serializedAdditionalRawData: null, + path); + } + + /// Initializes a new instance of . + /// The text. + /// Anything. + /// The sub expressions. + /// The azure resource error info. + /// A new instance for mocking. + public static WorkflowExpression WorkflowExpression(string text = null, BinaryData value = null, IEnumerable subexpressions = null, WorkflowExpressionResourceErrorInfo error = null) + { + subexpressions ??= new List(); + + return new WorkflowExpression(text, value, subexpressions?.ToList(), error, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The error code. + /// The error message. + /// The error details. + /// A new instance for mocking. + public static WorkflowExpressionResourceErrorInfo WorkflowExpressionResourceErrorInfo(string code = null, string message = null, IEnumerable details = null) + { + details ??= new List(); + + return new WorkflowExpressionResourceErrorInfo(code, serializedAdditionalRawData: null, message, details?.ToList()); + } + + /// Initializes a new instance of . + /// The error code. + /// A new instance for mocking. + public static WebAppErrorInfo WebAppErrorInfo(string code = null) + { + return new WebAppErrorInfo(code, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The start time of the workflow scope repetition. + /// The end time of the workflow scope repetition. + /// The correlation properties. + /// The status of the workflow scope repetition. + /// The workflow scope repetition code. + /// Anything. + /// Gets the tracking id. + /// Gets the inputs. + /// Gets the link to inputs. + /// Gets the outputs. + /// Gets the link to outputs. + /// Gets the tracked properties. + /// Gets the retry histories. + /// + /// The repetition indexes. + /// A new instance for mocking. + public static WorkflowRunActionRepetitionDefinitionData WorkflowRunActionRepetitionDefinitionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, WebAppRunActionCorrelation correlation = null, WorkflowStatus? status = null, string code = null, BinaryData error = null, string trackingId = null, BinaryData inputs = null, WebAppContentLink inputsLink = null, BinaryData outputs = null, WebAppContentLink outputsLink = null, BinaryData trackedProperties = null, IEnumerable retryHistory = null, int? iterationCount = null, IEnumerable repetitionIndexes = null) + { + tags ??= new Dictionary(); + retryHistory ??= new List(); + repetitionIndexes ??= new List(); + + return new WorkflowRunActionRepetitionDefinitionData( + id, + name, + resourceType, + systemData, + tags, + location, + startOn, + endOn, + correlation, + status, + code, + error, + trackingId, + inputs, + inputsLink, + outputs, + outputsLink, + trackedProperties, + retryHistory?.ToList(), + iterationCount, + repetitionIndexes?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The request history properties. + /// A new instance for mocking. + public static WebAppRequestHistoryData WebAppRequestHistoryData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, WebAppRequestHistoryProperties properties = null) + { + tags ??= new Dictionary(); + + return new WebAppRequestHistoryData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Gets the provisioning state. + /// Gets the created time. + /// Gets the changed time. + /// Gets the state. + /// Gets the status. + /// Gets the last execution time. + /// Gets the next execution time. + /// Gets the workflow trigger recurrence. + /// Gets the reference to workflow. + /// A new instance for mocking. + public static WorkflowTriggerData WorkflowTriggerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, WorkflowTriggerProvisioningState? provisioningState = null, DateTimeOffset? createdOn = null, DateTimeOffset? changedOn = null, WorkflowState? state = null, WorkflowStatus? status = null, DateTimeOffset? lastExecutionOn = null, DateTimeOffset? nextExecutionOn = null, WorkflowTriggerRecurrence recurrence = null, WorkflowResourceReference workflow = null) + { + return new WorkflowTriggerData( + id, + name, + resourceType, + systemData, + provisioningState, + createdOn, + changedOn, + state, + status, + lastExecutionOn, + nextExecutionOn, + recurrence, + workflow, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The frequency. + /// The interval. + /// The start time. + /// The end time. + /// The time zone. + /// The recurrence schedule. + /// A new instance for mocking. + public static WorkflowTriggerRecurrence WorkflowTriggerRecurrence(WorkflowRecurrenceFrequency? frequency = null, int? interval = null, string startTime = null, string endTime = null, string timeZone = null, WorkflowRecurrenceSchedule schedule = null) + { + return new WorkflowTriggerRecurrence( + frequency, + interval, + startTime, + endTime, + timeZone, + schedule, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The minutes. + /// The hours. + /// The days of the week. + /// The month days. + /// The monthly occurrences. + /// A new instance for mocking. + public static WorkflowRecurrenceSchedule WorkflowRecurrenceSchedule(IEnumerable minutes = null, IEnumerable hours = null, IEnumerable weekDays = null, IEnumerable monthDays = null, IEnumerable monthlyOccurrences = null) + { + minutes ??= new List(); + hours ??= new List(); + weekDays ??= new List(); + monthDays ??= new List(); + monthlyOccurrences ??= new List(); + + return new WorkflowRecurrenceSchedule( + minutes?.ToList(), + hours?.ToList(), + weekDays?.ToList(), + monthDays?.ToList(), + monthlyOccurrences?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The day of the week. + /// The occurrence. + /// A new instance for mocking. + public static RecurrenceScheduleOccurrence RecurrenceScheduleOccurrence(WebAppDayOfWeek? day = null, int? occurrence = null) + { + return new RecurrenceScheduleOccurrence(day, occurrence, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Gets the start time. + /// Gets the end time. + /// The scheduled time. + /// Gets the status. + /// Gets the code. + /// Gets the error. + /// Gets the tracking id. + /// The run correlation. + /// Gets the link to input parameters. + /// Gets the link to output parameters. + /// The value indicating whether trigger was fired. + /// Gets the reference to workflow run. + /// A new instance for mocking. + public static WorkflowTriggerHistoryData WorkflowTriggerHistoryData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, DateTimeOffset? scheduledOn = null, WorkflowStatus? status = null, string code = null, BinaryData error = null, string trackingId = null, string correlationClientTrackingId = null, WebAppContentLink inputsLink = null, WebAppContentLink outputsLink = null, bool? isFired = null, WorkflowResourceReference run = null) + { + return new WorkflowTriggerHistoryData( + id, + name, + resourceType, + systemData, + startOn, + endOn, + scheduledOn, + status, + code, + error, + trackingId, + correlationClientTrackingId != null ? new Correlation(correlationClientTrackingId, serializedAdditionalRawData: null) : null, + inputsLink, + outputsLink, + isFired, + run, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets the workflow trigger callback URL. + /// Gets the workflow trigger callback URL HTTP method. + /// Gets the workflow trigger callback URL base path. + /// Gets the workflow trigger callback URL relative path. + /// Gets the workflow trigger callback URL relative path parameters. + /// Gets the workflow trigger callback URL query parameters. + /// A new instance for mocking. + public static WorkflowTriggerCallbackUri WorkflowTriggerCallbackUri(string value = null, string method = null, string basePath = null, string relativePath = null, IEnumerable relativePathParameters = null, WorkflowTriggerListCallbackUriQueries queries = null) + { + relativePathParameters ??= new List(); + + return new WorkflowTriggerCallbackUri( + value, + method, + basePath, + relativePath, + relativePathParameters?.ToList(), + queries, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The api version. + /// The SAS permissions. + /// The SAS version. + /// The SAS signature. + /// The SAS timestamp. + /// A new instance for mocking. + public static WorkflowTriggerListCallbackUriQueries WorkflowTriggerListCallbackUriQueries(string apiVersion = null, string sasPermission = null, string sasVersion = null, string sasSignature = null, string sasTimestamp = null) + { + return new WorkflowTriggerListCallbackUriQueries( + apiVersion, + sasPermission, + sasVersion, + sasSignature, + sasTimestamp, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The JSON title. + /// The JSON content. + /// A new instance for mocking. + public static WebAppJsonSchema WebAppJsonSchema(string title = null, string content = null) + { + return new WebAppJsonSchema(title, content, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Managed service identity. + /// Gets the provisioning state. + /// Gets the created time. + /// Gets the changed time. + /// The state. + /// Gets the version. + /// Gets the access endpoint. + /// The endpoints configuration. + /// The access control configuration. + /// The sku. + /// The integration account. + /// The integration service environment. + /// The definition. + /// The parameters. + /// The workflow kind. + /// A new instance for mocking. + public static WorkflowData WorkflowData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, WorkflowProvisioningState? provisioningState = null, DateTimeOffset? createdOn = null, DateTimeOffset? changedOn = null, WorkflowState? state = null, string version = null, string accessEndpoint = null, FlowEndpointsConfiguration endpointsConfiguration = null, FlowAccessControlConfiguration accessControl = null, WorkflowSku sku = null, WorkflowResourceReference integrationAccount = null, WorkflowResourceReference integrationServiceEnvironment = null, BinaryData definition = null, IDictionary parameters = null, AppServiceKind? kind = null) + { + tags ??= new Dictionary(); + parameters ??= new Dictionary(); + + return new WorkflowData( + id, + name, + resourceType, + systemData, + tags, + location, + identity, + provisioningState, + createdOn, + changedOn, + state, + version, + accessEndpoint, + endpointsConfiguration, + accessControl, + sku, + integrationAccount, + integrationServiceEnvironment, + definition, + parameters, + kind, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The name. + /// The reference to plan. + /// A new instance for mocking. + public static WorkflowSku WorkflowSku(WorkflowSkuName name = default, WorkflowResourceReference plan = null) + { + return new WorkflowSku(name, plan, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The provisioning state. + /// Gets the created time. + /// Gets the changed time. + /// The state. + /// Gets the version. + /// Gets the access endpoint. + /// The endpoints configuration. + /// The access control configuration. + /// The sku. + /// The integration account. + /// The definition. + /// The parameters. + /// A new instance for mocking. + public static WorkflowVersionData WorkflowVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, WorkflowProvisioningState? provisioningState = null, DateTimeOffset? createdOn = null, DateTimeOffset? changedOn = null, WorkflowState? state = null, string version = null, string accessEndpoint = null, FlowEndpointsConfiguration endpointsConfiguration = null, FlowAccessControlConfiguration accessControl = null, WorkflowSku sku = null, WorkflowResourceReference integrationAccount = null, BinaryData definition = null, IDictionary parameters = null) + { + tags ??= new Dictionary(); + parameters ??= new Dictionary(); + + return new WorkflowVersionData( + id, + name, + resourceType, + systemData, + tags, + location, + provisioningState, + createdOn, + changedOn, + state, + version, + accessEndpoint, + endpointsConfiguration, + accessControl, + sku, + integrationAccount, + definition, + parameters, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The state of a private link connection. + /// Kind of resource. + /// A new instance for mocking. + public static PrivateLinkConnectionApprovalRequestInfo PrivateLinkConnectionApprovalRequestInfo(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, PrivateLinkConnectionState privateLinkServiceConnectionState = null, string kind = null) + { + return new PrivateLinkConnectionApprovalRequestInfo( + id, + name, + resourceType, + systemData, + privateLinkServiceConnectionState, + kind, + serializedAdditionalRawData: null); + } } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AseV3NetworkingConfigurationData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AseV3NetworkingConfigurationData.Serialization.cs index d60707e10d2af..8cfaf9f3c72be 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AseV3NetworkingConfigurationData.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AseV3NetworkingConfigurationData.Serialization.cs @@ -122,6 +122,21 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WritePropertyName("allowNewPrivateEndpointConnections"u8); writer.WriteBooleanValue(AllowNewPrivateEndpointConnections.Value); } + if (Optional.IsDefined(IsFtpEnabled)) + { + writer.WritePropertyName("ftpEnabled"u8); + writer.WriteBooleanValue(IsFtpEnabled.Value); + } + if (Optional.IsDefined(IsRemoteDebugEnabled)) + { + writer.WritePropertyName("remoteDebugEnabled"u8); + writer.WriteBooleanValue(IsRemoteDebugEnabled.Value); + } + if (Optional.IsDefined(InboundIPAddressOverride)) + { + writer.WritePropertyName("inboundIpAddressOverride"u8); + writer.WriteStringValue(InboundIPAddressOverride); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -171,6 +186,9 @@ internal static AseV3NetworkingConfigurationData DeserializeAseV3NetworkingConfi IReadOnlyList externalInboundIPAddresses = default; IReadOnlyList internalInboundIPAddresses = default; bool? allowNewPrivateEndpointConnections = default; + bool? ftpEnabled = default; + bool? remoteDebugEnabled = default; + string inboundIPAddressOverride = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -306,6 +324,29 @@ internal static AseV3NetworkingConfigurationData DeserializeAseV3NetworkingConfi allowNewPrivateEndpointConnections = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("ftpEnabled"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ftpEnabled = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("remoteDebugEnabled"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + remoteDebugEnabled = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("inboundIpAddressOverride"u8)) + { + inboundIPAddressOverride = property0.Value.GetString(); + continue; + } } continue; } @@ -325,6 +366,9 @@ internal static AseV3NetworkingConfigurationData DeserializeAseV3NetworkingConfi externalInboundIPAddresses ?? new ChangeTrackingList(), internalInboundIPAddresses ?? new ChangeTrackingList(), allowNewPrivateEndpointConnections, + ftpEnabled, + remoteDebugEnabled, + inboundIPAddressOverride, kind, serializedAdditionalRawData); } @@ -546,6 +590,61 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsFtpEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" ftpEnabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsFtpEnabled)) + { + builder.Append(" ftpEnabled: "); + var boolValue = IsFtpEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsRemoteDebugEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" remoteDebugEnabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsRemoteDebugEnabled)) + { + builder.Append(" remoteDebugEnabled: "); + var boolValue = IsRemoteDebugEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(InboundIPAddressOverride), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" inboundIpAddressOverride: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(InboundIPAddressOverride)) + { + builder.Append(" inboundIpAddressOverride: "); + if (InboundIPAddressOverride.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{InboundIPAddressOverride}'''"); + } + else + { + builder.AppendLine($"'{InboundIPAddressOverride}'"); + } + } + } + builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AseV3NetworkingConfigurationData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AseV3NetworkingConfigurationData.cs index 71c38103010a6..bba84f58a6a20 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AseV3NetworkingConfigurationData.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AseV3NetworkingConfigurationData.cs @@ -70,15 +70,21 @@ public AseV3NetworkingConfigurationData() /// /// /// Property to enable and disable new private endpoint connection creation on ASE. + /// Property to enable and disable FTP on ASEV3. + /// Property to enable and disable Remote Debug on ASEV3. + /// Customer provided Inbound IP Address. Only able to be set on Ase create. /// Kind of resource. /// Keeps track of any properties unknown to the library. - internal AseV3NetworkingConfigurationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IReadOnlyList windowsOutboundIPAddresses, IReadOnlyList linuxOutboundIPAddresses, IReadOnlyList externalInboundIPAddresses, IReadOnlyList internalInboundIPAddresses, bool? allowNewPrivateEndpointConnections, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal AseV3NetworkingConfigurationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IReadOnlyList windowsOutboundIPAddresses, IReadOnlyList linuxOutboundIPAddresses, IReadOnlyList externalInboundIPAddresses, IReadOnlyList internalInboundIPAddresses, bool? allowNewPrivateEndpointConnections, bool? isFtpEnabled, bool? isRemoteDebugEnabled, string inboundIPAddressOverride, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { WindowsOutboundIPAddresses = windowsOutboundIPAddresses; LinuxOutboundIPAddresses = linuxOutboundIPAddresses; ExternalInboundIPAddresses = externalInboundIPAddresses; InternalInboundIPAddresses = internalInboundIPAddresses; AllowNewPrivateEndpointConnections = allowNewPrivateEndpointConnections; + IsFtpEnabled = isFtpEnabled; + IsRemoteDebugEnabled = isRemoteDebugEnabled; + InboundIPAddressOverride = inboundIPAddressOverride; Kind = kind; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -98,6 +104,15 @@ internal AseV3NetworkingConfigurationData(ResourceIdentifier id, string name, Re /// Property to enable and disable new private endpoint connection creation on ASE. [WirePath("properties.allowNewPrivateEndpointConnections")] public bool? AllowNewPrivateEndpointConnections { get; set; } + /// Property to enable and disable FTP on ASEV3. + [WirePath("properties.ftpEnabled")] + public bool? IsFtpEnabled { get; set; } + /// Property to enable and disable Remote Debug on ASEV3. + [WirePath("properties.remoteDebugEnabled")] + public bool? IsRemoteDebugEnabled { get; set; } + /// Customer provided Inbound IP Address. Only able to be set on Ase create. + [WirePath("properties.inboundIpAddressOverride")] + public string InboundIPAddressOverride { get; set; } /// Kind of resource. [WirePath("kind")] public string Kind { get; set; } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AseV3NetworkingConfigurationResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AseV3NetworkingConfigurationResource.cs index 15212fb9c18f7..59bb3aa2de8d8 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AseV3NetworkingConfigurationResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AseV3NetworkingConfigurationResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(CancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task> Cr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CertificateOrderDetectorCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CertificateOrderDetectorCollection.cs index 72d574ee225fa..557a49bfb5f4c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CertificateOrderDetectorCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CertificateOrderDetectorCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task> GetAsync(s /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -160,7 +160,7 @@ public virtual Response Get(string detectorNam /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -190,7 +190,7 @@ public virtual AsyncPageable GetAllAsync(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -220,7 +220,7 @@ public virtual Pageable GetAll(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual async Task> ExistsAsync(string detectorName, DateT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Response Exists(string detectorName, DateTimeOffset? startT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CertificateOrderDetectorResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CertificateOrderDetectorResource.cs index d67f546765d73..89e67212d2119 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CertificateOrderDetectorResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CertificateOrderDetectorResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(D /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CustomDnsSuffixConfigurationData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CustomDnsSuffixConfigurationData.Serialization.cs new file mode 100644 index 0000000000000..43932ebb4871d --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CustomDnsSuffixConfigurationData.Serialization.cs @@ -0,0 +1,457 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class CustomDnsSuffixConfigurationData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomDnsSuffixConfigurationData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); + } + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToSerialString()); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningDetails)) + { + writer.WritePropertyName("provisioningDetails"u8); + writer.WriteStringValue(ProvisioningDetails); + } + if (Optional.IsDefined(DnsSuffix)) + { + writer.WritePropertyName("dnsSuffix"u8); + writer.WriteStringValue(DnsSuffix); + } + if (Optional.IsDefined(CertificateUri)) + { + writer.WritePropertyName("certificateUrl"u8); + writer.WriteStringValue(CertificateUri.AbsoluteUri); + } + if (Optional.IsDefined(KeyVaultReferenceIdentity)) + { + writer.WritePropertyName("keyVaultReferenceIdentity"u8); + writer.WriteStringValue(KeyVaultReferenceIdentity); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + CustomDnsSuffixConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomDnsSuffixConfigurationData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomDnsSuffixConfigurationData(document.RootElement, options); + } + + internal static CustomDnsSuffixConfigurationData DeserializeCustomDnsSuffixConfigurationData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string kind = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + CustomDnsSuffixProvisioningState? provisioningState = default; + string provisioningDetails = default; + string dnsSuffix = default; + Uri certificateUrl = default; + string keyVaultReferenceIdentity = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kind"u8)) + { + kind = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = property0.Value.GetString().ToCustomDnsSuffixProvisioningState(); + continue; + } + if (property0.NameEquals("provisioningDetails"u8)) + { + provisioningDetails = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("dnsSuffix"u8)) + { + dnsSuffix = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("certificateUrl"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + certificateUrl = new Uri(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("keyVaultReferenceIdentity"u8)) + { + keyVaultReferenceIdentity = property0.Value.GetString(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CustomDnsSuffixConfigurationData( + id, + name, + type, + systemData, + provisioningState, + provisioningDetails, + dnsSuffix, + certificateUrl, + keyVaultReferenceIdentity, + kind, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Kind), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" kind: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Kind)) + { + builder.Append(" kind: "); + if (Kind.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Kind}'''"); + } + else + { + builder.AppendLine($"'{Kind}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + builder.AppendLine($"'{ProvisioningState.Value.ToSerialString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningDetails), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningDetails: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningDetails)) + { + builder.Append(" provisioningDetails: "); + if (ProvisioningDetails.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ProvisioningDetails}'''"); + } + else + { + builder.AppendLine($"'{ProvisioningDetails}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DnsSuffix), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" dnsSuffix: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DnsSuffix)) + { + builder.Append(" dnsSuffix: "); + if (DnsSuffix.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DnsSuffix}'''"); + } + else + { + builder.AppendLine($"'{DnsSuffix}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CertificateUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" certificateUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CertificateUri)) + { + builder.Append(" certificateUrl: "); + builder.AppendLine($"'{CertificateUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(KeyVaultReferenceIdentity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" keyVaultReferenceIdentity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(KeyVaultReferenceIdentity)) + { + builder.Append(" keyVaultReferenceIdentity: "); + if (KeyVaultReferenceIdentity.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{KeyVaultReferenceIdentity}'''"); + } + else + { + builder.AppendLine($"'{KeyVaultReferenceIdentity}'"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(CustomDnsSuffixConfigurationData)} does not support writing '{options.Format}' format."); + } + } + + CustomDnsSuffixConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCustomDnsSuffixConfigurationData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomDnsSuffixConfigurationData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CustomDnsSuffixConfigurationData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CustomDnsSuffixConfigurationData.cs new file mode 100644 index 0000000000000..2f527bad44ca1 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CustomDnsSuffixConfigurationData.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing the CustomDnsSuffixConfiguration data model. + /// Full view of the custom domain suffix configuration for ASEv3. + /// + public partial class CustomDnsSuffixConfigurationData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public CustomDnsSuffixConfigurationData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// + /// The default custom domain suffix to use for all sites deployed on the ASE. + /// The URL referencing the Azure Key Vault certificate secret that should be used as the default SSL/TLS certificate for sites with the custom domain suffix. + /// The user-assigned identity to use for resolving the key vault certificate reference. If not specified, the system-assigned ASE identity will be used if available. + /// Kind of resource. + /// Keeps track of any properties unknown to the library. + internal CustomDnsSuffixConfigurationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, CustomDnsSuffixProvisioningState? provisioningState, string provisioningDetails, string dnsSuffix, Uri certificateUri, string keyVaultReferenceIdentity, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + ProvisioningState = provisioningState; + ProvisioningDetails = provisioningDetails; + DnsSuffix = dnsSuffix; + CertificateUri = certificateUri; + KeyVaultReferenceIdentity = keyVaultReferenceIdentity; + Kind = kind; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets the provisioning state. + [WirePath("properties.provisioningState")] + public CustomDnsSuffixProvisioningState? ProvisioningState { get; } + /// Gets the provisioning details. + [WirePath("properties.provisioningDetails")] + public string ProvisioningDetails { get; } + /// The default custom domain suffix to use for all sites deployed on the ASE. + [WirePath("properties.dnsSuffix")] + public string DnsSuffix { get; set; } + /// The URL referencing the Azure Key Vault certificate secret that should be used as the default SSL/TLS certificate for sites with the custom domain suffix. + [WirePath("properties.certificateUrl")] + public Uri CertificateUri { get; set; } + /// The user-assigned identity to use for resolving the key vault certificate reference. If not specified, the system-assigned ASE identity will be used if available. + [WirePath("properties.keyVaultReferenceIdentity")] + public string KeyVaultReferenceIdentity { get; set; } + /// Kind of resource. + [WirePath("kind")] + public string Kind { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CustomDnsSuffixConfigurationResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CustomDnsSuffixConfigurationResource.Serialization.cs new file mode 100644 index 0000000000000..f0daa40f56ea7 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CustomDnsSuffixConfigurationResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppService +{ + public partial class CustomDnsSuffixConfigurationResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + CustomDnsSuffixConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + CustomDnsSuffixConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CustomDnsSuffixConfigurationResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CustomDnsSuffixConfigurationResource.cs new file mode 100644 index 0000000000000..996a1f23234e8 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CustomDnsSuffixConfigurationResource.cs @@ -0,0 +1,354 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a CustomDnsSuffixConfiguration along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetCustomDnsSuffixConfigurationResource method. + /// Otherwise you can get one from its parent resource using the GetCustomDnsSuffixConfiguration method. + /// + public partial class CustomDnsSuffixConfigurationResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/customdnssuffix"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _customDnsSuffixConfigurationAppServiceEnvironmentsClientDiagnostics; + private readonly AppServiceEnvironmentsRestOperations _customDnsSuffixConfigurationAppServiceEnvironmentsRestClient; + private readonly CustomDnsSuffixConfigurationData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Web/hostingEnvironments/configurations"; + + /// Initializes a new instance of the class for mocking. + protected CustomDnsSuffixConfigurationResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal CustomDnsSuffixConfigurationResource(ArmClient client, CustomDnsSuffixConfigurationData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal CustomDnsSuffixConfigurationResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _customDnsSuffixConfigurationAppServiceEnvironmentsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string customDnsSuffixConfigurationAppServiceEnvironmentsApiVersion); + _customDnsSuffixConfigurationAppServiceEnvironmentsRestClient = new AppServiceEnvironmentsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, customDnsSuffixConfigurationAppServiceEnvironmentsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual CustomDnsSuffixConfigurationData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get Custom Dns Suffix configuration of an App Service Environment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/customdnssuffix + /// + /// + /// Operation Id + /// AppServiceEnvironments_GetAseCustomDnsSuffixConfiguration + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _customDnsSuffixConfigurationAppServiceEnvironmentsClientDiagnostics.CreateScope("CustomDnsSuffixConfigurationResource.Get"); + scope.Start(); + try + { + var response = await _customDnsSuffixConfigurationAppServiceEnvironmentsRestClient.GetAseCustomDnsSuffixConfigurationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new CustomDnsSuffixConfigurationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get Custom Dns Suffix configuration of an App Service Environment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/customdnssuffix + /// + /// + /// Operation Id + /// AppServiceEnvironments_GetAseCustomDnsSuffixConfiguration + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _customDnsSuffixConfigurationAppServiceEnvironmentsClientDiagnostics.CreateScope("CustomDnsSuffixConfigurationResource.Get"); + scope.Start(); + try + { + var response = _customDnsSuffixConfigurationAppServiceEnvironmentsRestClient.GetAseCustomDnsSuffixConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new CustomDnsSuffixConfigurationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete Custom Dns Suffix configuration of an App Service Environment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/customdnssuffix + /// + /// + /// Operation Id + /// AppServiceEnvironments_DeleteAseCustomDnsSuffixConfiguration + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _customDnsSuffixConfigurationAppServiceEnvironmentsClientDiagnostics.CreateScope("CustomDnsSuffixConfigurationResource.Delete"); + scope.Start(); + try + { + var response = await _customDnsSuffixConfigurationAppServiceEnvironmentsRestClient.DeleteAseCustomDnsSuffixConfigurationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken).ConfigureAwait(false); + var uri = _customDnsSuffixConfigurationAppServiceEnvironmentsRestClient.CreateDeleteAseCustomDnsSuffixConfigurationRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete Custom Dns Suffix configuration of an App Service Environment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/customdnssuffix + /// + /// + /// Operation Id + /// AppServiceEnvironments_DeleteAseCustomDnsSuffixConfiguration + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _customDnsSuffixConfigurationAppServiceEnvironmentsClientDiagnostics.CreateScope("CustomDnsSuffixConfigurationResource.Delete"); + scope.Start(); + try + { + var response = _customDnsSuffixConfigurationAppServiceEnvironmentsRestClient.DeleteAseCustomDnsSuffixConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken); + var uri = _customDnsSuffixConfigurationAppServiceEnvironmentsRestClient.CreateDeleteAseCustomDnsSuffixConfigurationRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update Custom Dns Suffix configuration of an App Service Environment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/customdnssuffix + /// + /// + /// Operation Id + /// AppServiceEnvironments_UpdateAseCustomDnsSuffixConfiguration + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The to use. + /// The cancellation token to use. + /// is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, CustomDnsSuffixConfigurationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _customDnsSuffixConfigurationAppServiceEnvironmentsClientDiagnostics.CreateScope("CustomDnsSuffixConfigurationResource.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _customDnsSuffixConfigurationAppServiceEnvironmentsRestClient.UpdateAseCustomDnsSuffixConfigurationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken).ConfigureAwait(false); + var uri = _customDnsSuffixConfigurationAppServiceEnvironmentsRestClient.CreateUpdateAseCustomDnsSuffixConfigurationRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(Response.FromValue(new CustomDnsSuffixConfigurationResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update Custom Dns Suffix configuration of an App Service Environment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/configurations/customdnssuffix + /// + /// + /// Operation Id + /// AppServiceEnvironments_UpdateAseCustomDnsSuffixConfiguration + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The to use. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, CustomDnsSuffixConfigurationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _customDnsSuffixConfigurationAppServiceEnvironmentsClientDiagnostics.CreateScope("CustomDnsSuffixConfigurationResource.CreateOrUpdate"); + scope.Start(); + try + { + var response = _customDnsSuffixConfigurationAppServiceEnvironmentsRestClient.UpdateAseCustomDnsSuffixConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken); + var uri = _customDnsSuffixConfigurationAppServiceEnvironmentsRestClient.CreateUpdateAseCustomDnsSuffixConfigurationRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(Response.FromValue(new CustomDnsSuffixConfigurationResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DeletedSiteCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DeletedSiteCollection.cs index 43fd23dd40785..3575a85a3cf4c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DeletedSiteCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DeletedSiteCollection.cs @@ -70,7 +70,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> GetAsync(string deleted /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -160,7 +160,7 @@ public virtual Response Get(string deletedSiteId, Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -190,7 +190,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -220,7 +220,7 @@ public virtual Pageable GetAll(CancellationToken cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -263,7 +263,7 @@ public virtual async Task> ExistsAsync(string deletedSiteId, Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -306,7 +306,7 @@ public virtual Response Exists(string deletedSiteId, CancellationToken can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual async Task> GetIfExistsAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DeletedSiteResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DeletedSiteResource.cs index 4ba063204d3a3..6e7842988243d 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DeletedSiteResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DeletedSiteResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(CancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual AsyncPageable GetDeletedWebAppSnapshotsAsync(Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DomainOwnershipIdentifierCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DomainOwnershipIdentifierCollection.cs index 02162eb430401..6054e6941160a 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DomainOwnershipIdentifierCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DomainOwnershipIdentifierCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> Creat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string name, Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DomainOwnershipIdentifierResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DomainOwnershipIdentifierResource.cs index a41cc1fbdebc8..be9edaf57b357 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DomainOwnershipIdentifierResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DomainOwnershipIdentifierResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/AppServiceExtensions.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/AppServiceExtensions.cs index 6709a0ca395b4..2b5cf35517da2 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/AppServiceExtensions.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/AppServiceExtensions.cs @@ -228,6 +228,25 @@ public static AppServiceEnvironmentResource GetAppServiceEnvironmentResource(thi return GetMockableAppServiceArmClient(client).GetAppServiceEnvironmentResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static CustomDnsSuffixConfigurationResource GetCustomDnsSuffixConfigurationResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppServiceArmClient(client).GetCustomDnsSuffixConfigurationResource(id); + } + /// /// Gets an object representing an along with the instance operations that can be performed on it but with no data. /// You can use to create an from its components. @@ -893,6 +912,44 @@ public static StaticSiteBuildResource GetStaticSiteBuildResource(this ArmClient return GetMockableAppServiceArmClient(client).GetStaticSiteBuildResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static StaticSiteBuildDatabaseConnectionResource GetStaticSiteBuildDatabaseConnectionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppServiceArmClient(client).GetStaticSiteBuildDatabaseConnectionResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static StaticSiteDatabaseConnectionResource GetStaticSiteDatabaseConnectionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppServiceArmClient(client).GetStaticSiteDatabaseConnectionResource(id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -931,6 +988,25 @@ public static StaticSiteUserProvidedFunctionAppResource GetStaticSiteUserProvide return GetMockableAppServiceArmClient(client).GetStaticSiteUserProvidedFunctionAppResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static StaticSiteBasicAuthPropertyResource GetStaticSiteBasicAuthPropertyResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppServiceArmClient(client).GetStaticSiteBasicAuthPropertyResource(id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -950,6 +1026,44 @@ public static StaticSiteCustomDomainOverviewResource GetStaticSiteCustomDomainOv return GetMockableAppServiceArmClient(client).GetStaticSiteCustomDomainOverviewResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static StaticSiteLinkedBackendResource GetStaticSiteLinkedBackendResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppServiceArmClient(client).GetStaticSiteLinkedBackendResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static StaticSiteBuildLinkedBackendResource GetStaticSiteBuildLinkedBackendResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppServiceArmClient(client).GetStaticSiteBuildLinkedBackendResource(id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -1957,6 +2071,44 @@ public static WebSiteSlotPublicCertificateResource GetWebSiteSlotPublicCertifica return GetMockableAppServiceArmClient(client).GetWebSiteSlotPublicCertificateResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static SiteContainerResource GetSiteContainerResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppServiceArmClient(client).GetSiteContainerResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static SiteSlotSiteContainerResource GetSiteSlotSiteContainerResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppServiceArmClient(client).GetSiteSlotSiteContainerResource(id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -2109,6 +2261,196 @@ public static WebSiteWebJobResource GetWebSiteWebJobResource(this ArmClient clie return GetMockableAppServiceArmClient(client).GetWebSiteWebJobResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static SiteSlotWorkflowResource GetSiteSlotWorkflowResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppServiceArmClient(client).GetSiteSlotWorkflowResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static SiteWorkflowResource GetSiteWorkflowResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppServiceArmClient(client).GetSiteWorkflowResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static WorkflowRunResource GetWorkflowRunResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppServiceArmClient(client).GetWorkflowRunResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static WorkflowRunActionResource GetWorkflowRunActionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppServiceArmClient(client).GetWorkflowRunActionResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static WorkflowRunActionRepetitionResource GetWorkflowRunActionRepetitionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppServiceArmClient(client).GetWorkflowRunActionRepetitionResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static WorkflowRunActionScopeRepetitionResource GetWorkflowRunActionScopeRepetitionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppServiceArmClient(client).GetWorkflowRunActionScopeRepetitionResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static WebAppRequestHistoryResource GetWebAppRequestHistoryResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppServiceArmClient(client).GetWebAppRequestHistoryResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static WorkflowTriggerResource GetWorkflowTriggerResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppServiceArmClient(client).GetWorkflowTriggerResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static WorkflowTriggerHistoryResource GetWorkflowTriggerHistoryResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppServiceArmClient(client).GetWorkflowTriggerHistoryResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static WorkflowVersionResource GetWorkflowVersionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableAppServiceArmClient(client).GetWorkflowVersionResource(id); + } + /// /// Gets a collection of AppServiceCertificateOrderResources in the ResourceGroupResource. /// @@ -2139,7 +2481,7 @@ public static AppServiceCertificateOrderCollection GetAppServiceCertificateOrder /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2177,7 +2519,7 @@ public static async Task> GetAppSer /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2232,7 +2574,7 @@ public static AppServiceDomainCollection GetAppServiceDomains(this ResourceGroup /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2270,7 +2612,7 @@ public static async Task> GetAppServiceDomain /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2325,7 +2667,7 @@ public static AppServiceEnvironmentCollection GetAppServiceEnvironments(this Res /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2363,7 +2705,7 @@ public static async Task> GetAppServiceE /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2418,7 +2760,7 @@ public static AppServicePlanCollection GetAppServicePlans(this ResourceGroupReso /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2456,7 +2798,7 @@ public static async Task> GetAppServicePlanAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2511,7 +2853,7 @@ public static AppCertificateCollection GetAppCertificates(this ResourceGroupReso /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2549,7 +2891,7 @@ public static async Task> GetAppCertificateAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2604,7 +2946,7 @@ public static KubeEnvironmentCollection GetKubeEnvironments(this ResourceGroupRe /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2642,7 +2984,7 @@ public static async Task> GetKubeEnvironmentAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2697,7 +3039,7 @@ public static StaticSiteCollection GetStaticSites(this ResourceGroupResource res /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2735,7 +3077,7 @@ public static async Task> GetStaticSiteAsync(this R /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2790,7 +3132,7 @@ public static WebSiteCollection GetWebSites(this ResourceGroupResource resourceG /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2828,7 +3170,7 @@ public static async Task> GetWebSiteAsync(this Resourc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2866,7 +3208,7 @@ public static Response GetWebSite(this ResourceGroupResource re /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2898,7 +3240,7 @@ public static async Task> ValidateAsync(this /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2947,7 +3289,7 @@ public static TopLevelDomainCollection GetTopLevelDomains(this SubscriptionResou /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2985,7 +3327,7 @@ public static async Task> GetTopLevelDomainAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3040,7 +3382,7 @@ public static DeletedSiteCollection GetDeletedSites(this SubscriptionResource su /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3078,7 +3420,7 @@ public static async Task> GetDeletedSiteAsync(this /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3116,7 +3458,7 @@ public static Response GetDeletedSite(this SubscriptionReso /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3152,7 +3494,7 @@ public static AsyncPageable GetAppServiceCer /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3188,7 +3530,7 @@ public static Pageable GetAppServiceCertific /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3220,7 +3562,7 @@ public static async Task ValidateAppServiceCertificateOrderPurchaseInf /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3252,7 +3594,7 @@ public static Response ValidateAppServiceCertificateOrderPurchaseInformation(thi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3284,7 +3626,7 @@ public static async Task> CheckAppServic /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3316,7 +3658,7 @@ public static Response CheckAppServiceDomainRegis /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3352,7 +3694,7 @@ public static AsyncPageable GetAppServiceDomainsAsync( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3388,7 +3730,7 @@ public static Pageable GetAppServiceDomains(this Subsc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3419,7 +3761,7 @@ public static async Task> GetControl /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3450,7 +3792,7 @@ public static Response GetControlCenterSsoReq /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3483,7 +3825,7 @@ public static AsyncPageable GetAppServiceDomainR /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3516,7 +3858,7 @@ public static Pageable GetAppServiceDomainRecomm /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3552,7 +3894,7 @@ public static AsyncPageable GetAppServiceEnvironm /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3588,7 +3930,7 @@ public static Pageable GetAppServiceEnvironments( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3628,7 +3970,7 @@ public static AsyncPageable GetAppServicePlansAsync(this /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3668,7 +4010,7 @@ public static Pageable GetAppServicePlans(this Subscript /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3705,7 +4047,7 @@ public static AsyncPageable GetAppCertificatesAsync(this /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3742,7 +4084,7 @@ public static Pageable GetAppCertificates(this Subscript /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3779,7 +4121,7 @@ public static AsyncPageable GetDeletedSitesByLocationAsync( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3816,7 +4158,7 @@ public static Pageable GetDeletedSitesByLocation(this Subsc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3854,7 +4196,7 @@ public static async Task> GetDeletedWebAppByLocati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3892,7 +4234,7 @@ public static Response GetDeletedWebAppByLocationDeletedWeb /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3928,7 +4270,7 @@ public static AsyncPageable GetKubeEnvironmentsAsync(th /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3964,7 +4306,7 @@ public static Pageable GetKubeEnvironments(this Subscri /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3997,7 +4339,7 @@ public static AsyncPageable GetAvailableStacksOnPremPr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4030,7 +4372,7 @@ public static Pageable GetAvailableStacksOnPremProvide /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4064,7 +4406,7 @@ public static AsyncPageable GetRecommendationsAsync(th /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4098,7 +4440,7 @@ public static Pageable GetRecommendations(this Subscri /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4129,7 +4471,7 @@ public static async Task ResetAllRecommendationFiltersAsync(this Subsc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4160,7 +4502,7 @@ public static Response ResetAllRecommendationFilters(this SubscriptionResource s /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4193,7 +4535,7 @@ public static async Task DisableAppServiceRecommendationAsync(this Sub /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4226,7 +4568,7 @@ public static Response DisableAppServiceRecommendation(this SubscriptionResource /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4258,7 +4600,7 @@ public static AsyncPageable GetAllResourceHealthMeta /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4290,7 +4632,7 @@ public static Pageable GetAllResourceHealthMetadata( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4324,7 +4666,7 @@ public static AsyncPageable GetBillingMetersAsync(this S /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4358,7 +4700,7 @@ public static Pageable GetBillingMeters(this Subscriptio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4390,7 +4732,7 @@ public static async Task> CheckAppServiceName /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4409,6 +4751,72 @@ public static Response CheckAppServiceNameAvailability return GetMockableAppServiceSubscriptionResource(subscriptionResource).CheckAppServiceNameAvailability(content, cancellationToken); } + /// + /// Get custom hostnames under this subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Web/customhostnameSites + /// + /// + /// Operation Id + /// ListCustomHostNameSites + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Specific hostname. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetCustomHostNameSitesAsync(this SubscriptionResource subscriptionResource, string hostname = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableAppServiceSubscriptionResource(subscriptionResource).GetCustomHostNameSitesAsync(hostname, cancellationToken); + } + + /// + /// Get custom hostnames under this subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Web/customhostnameSites + /// + /// + /// Operation Id + /// ListCustomHostNameSites + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Specific hostname. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetCustomHostNameSites(this SubscriptionResource subscriptionResource, string hostname = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableAppServiceSubscriptionResource(subscriptionResource).GetCustomHostNameSites(hostname, cancellationToken); + } + /// /// Description for Gets list of available geo regions plus ministamps /// @@ -4422,7 +4830,7 @@ public static Response CheckAppServiceNameAvailability /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4453,7 +4861,7 @@ public static async Task> GetAppServiceD /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4471,6 +4879,70 @@ public static Response GetAppServiceDeploymentLoc return GetMockableAppServiceSubscriptionResource(subscriptionResource).GetAppServiceDeploymentLocations(cancellationToken); } + /// + /// Description for get a list of available ASE regions and its supported Skus. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Web/aseRegions + /// + /// + /// Operation Id + /// ListAseRegions + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetAseRegionsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableAppServiceSubscriptionResource(subscriptionResource).GetAseRegionsAsync(cancellationToken); + } + + /// + /// Description for get a list of available ASE regions and its supported Skus. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Web/aseRegions + /// + /// + /// Operation Id + /// ListAseRegions + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetAseRegions(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableAppServiceSubscriptionResource(subscriptionResource).GetAseRegions(cancellationToken); + } + /// /// Description for Get a list of available geographical regions. /// @@ -4484,7 +4956,7 @@ public static Response GetAppServiceDeploymentLoc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4520,7 +4992,7 @@ public static AsyncPageable GetGeoRegionsAsync(this Subscri /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4556,7 +5028,7 @@ public static Pageable GetGeoRegions(this SubscriptionResou /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4588,7 +5060,7 @@ public static AsyncPageable GetPremierAddOnOffersAsync(this S /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4620,7 +5092,7 @@ public static Pageable GetPremierAddOnOffers(this Subscriptio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4651,7 +5123,7 @@ public static async Task> GetSkusAsync(this Subscr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4682,7 +5154,7 @@ public static Response GetSkus(this SubscriptionResource su /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4714,7 +5186,7 @@ public static async Task> Verif /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4733,6 +5205,72 @@ public static Response VerifyHostingEnvi return GetMockableAppServiceSubscriptionResource(subscriptionResource).VerifyHostingEnvironmentVnet(content, cancellationToken); } + /// + /// List usages in cores for all skus used by a subscription in a given location, for a specific quota type. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/usages + /// + /// + /// Operation Id + /// GetUsagesInLocation_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetGetUsagesInLocationsAsync(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableAppServiceSubscriptionResource(subscriptionResource).GetGetUsagesInLocationsAsync(location, cancellationToken); + } + + /// + /// List usages in cores for all skus used by a subscription in a given location, for a specific quota type. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/usages + /// + /// + /// Operation Id + /// GetUsagesInLocation_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetGetUsagesInLocations(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableAppServiceSubscriptionResource(subscriptionResource).GetGetUsagesInLocations(location, cancellationToken); + } + /// /// Description for Generates a preview workflow file for the static site /// @@ -4746,7 +5284,7 @@ public static Response VerifyHostingEnvi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4779,7 +5317,7 @@ public static async Task> PreviewStaticSite /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4812,7 +5350,7 @@ public static Response PreviewStaticSiteWorkflow(thi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4848,7 +5386,7 @@ public static AsyncPageable GetStaticSitesAsync(this Subscri /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4884,7 +5422,7 @@ public static Pageable GetStaticSites(this SubscriptionResou /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4920,7 +5458,7 @@ public static AsyncPageable GetWebSitesAsync(this SubscriptionR /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4990,7 +5528,7 @@ public static AppServiceSourceControlCollection GetAppServiceSourceControls(this /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5028,7 +5566,7 @@ public static async Task> GetAppServic /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5066,7 +5604,7 @@ public static Response GetAppServiceSourceContr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5098,7 +5636,7 @@ public static AsyncPageable GetOperationsCertificateReg /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5130,7 +5668,7 @@ public static Pageable GetOperationsCertificateRegistra /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5162,7 +5700,7 @@ public static AsyncPageable GetOperationsDomainRegistra /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5194,7 +5732,7 @@ public static Pageable GetOperationsDomainRegistrationP /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5227,7 +5765,7 @@ public static AsyncPageable GetAvailableStacksProvider /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5260,7 +5798,7 @@ public static Pageable GetAvailableStacksProviders(thi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5293,7 +5831,7 @@ public static AsyncPageable GetFunctionAppStacksProvidersAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5326,7 +5864,7 @@ public static Pageable GetFunctionAppStacksProviders(this Tena /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5360,7 +5898,7 @@ public static AsyncPageable GetFunctionAppStacksForLocationPro /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5394,7 +5932,7 @@ public static Pageable GetFunctionAppStacksForLocationProvider /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5428,7 +5966,7 @@ public static AsyncPageable GetWebAppStacksByLocationAsync(this Ten /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5462,7 +6000,7 @@ public static Pageable GetWebAppStacksByLocation(this TenantResourc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5494,7 +6032,7 @@ public static AsyncPageable GetOperationsProvidersAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5526,7 +6064,7 @@ public static Pageable GetOperationsProviders(this Tena /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5559,7 +6097,7 @@ public static AsyncPageable GetWebAppStacksProvidersAsync(this Tena /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/MockableAppServiceArmClient.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/MockableAppServiceArmClient.cs index adb98651f1bb5..e3636bc820a5c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/MockableAppServiceArmClient.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/MockableAppServiceArmClient.cs @@ -154,6 +154,18 @@ public virtual AppServiceEnvironmentResource GetAppServiceEnvironmentResource(Re return new AppServiceEnvironmentResource(Client, id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual CustomDnsSuffixConfigurationResource GetCustomDnsSuffixConfigurationResource(ResourceIdentifier id) + { + CustomDnsSuffixConfigurationResource.ValidateResourceId(id); + return new CustomDnsSuffixConfigurationResource(Client, id); + } + /// /// Gets an object representing an along with the instance operations that can be performed on it but with no data. /// You can use to create an from its components. @@ -574,6 +586,30 @@ public virtual StaticSiteBuildResource GetStaticSiteBuildResource(ResourceIdenti return new StaticSiteBuildResource(Client, id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual StaticSiteBuildDatabaseConnectionResource GetStaticSiteBuildDatabaseConnectionResource(ResourceIdentifier id) + { + StaticSiteBuildDatabaseConnectionResource.ValidateResourceId(id); + return new StaticSiteBuildDatabaseConnectionResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual StaticSiteDatabaseConnectionResource GetStaticSiteDatabaseConnectionResource(ResourceIdentifier id) + { + StaticSiteDatabaseConnectionResource.ValidateResourceId(id); + return new StaticSiteDatabaseConnectionResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -598,6 +634,18 @@ public virtual StaticSiteUserProvidedFunctionAppResource GetStaticSiteUserProvid return new StaticSiteUserProvidedFunctionAppResource(Client, id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual StaticSiteBasicAuthPropertyResource GetStaticSiteBasicAuthPropertyResource(ResourceIdentifier id) + { + StaticSiteBasicAuthPropertyResource.ValidateResourceId(id); + return new StaticSiteBasicAuthPropertyResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -610,6 +658,30 @@ public virtual StaticSiteCustomDomainOverviewResource GetStaticSiteCustomDomainO return new StaticSiteCustomDomainOverviewResource(Client, id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual StaticSiteLinkedBackendResource GetStaticSiteLinkedBackendResource(ResourceIdentifier id) + { + StaticSiteLinkedBackendResource.ValidateResourceId(id); + return new StaticSiteLinkedBackendResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual StaticSiteBuildLinkedBackendResource GetStaticSiteBuildLinkedBackendResource(ResourceIdentifier id) + { + StaticSiteBuildLinkedBackendResource.ValidateResourceId(id); + return new StaticSiteBuildLinkedBackendResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -1246,6 +1318,30 @@ public virtual WebSiteSlotPublicCertificateResource GetWebSiteSlotPublicCertific return new WebSiteSlotPublicCertificateResource(Client, id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual SiteContainerResource GetSiteContainerResource(ResourceIdentifier id) + { + SiteContainerResource.ValidateResourceId(id); + return new SiteContainerResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual SiteSlotSiteContainerResource GetSiteSlotSiteContainerResource(ResourceIdentifier id) + { + SiteSlotSiteContainerResource.ValidateResourceId(id); + return new SiteSlotSiteContainerResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -1341,5 +1437,125 @@ public virtual WebSiteWebJobResource GetWebSiteWebJobResource(ResourceIdentifier WebSiteWebJobResource.ValidateResourceId(id); return new WebSiteWebJobResource(Client, id); } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual SiteSlotWorkflowResource GetSiteSlotWorkflowResource(ResourceIdentifier id) + { + SiteSlotWorkflowResource.ValidateResourceId(id); + return new SiteSlotWorkflowResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual SiteWorkflowResource GetSiteWorkflowResource(ResourceIdentifier id) + { + SiteWorkflowResource.ValidateResourceId(id); + return new SiteWorkflowResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual WorkflowRunResource GetWorkflowRunResource(ResourceIdentifier id) + { + WorkflowRunResource.ValidateResourceId(id); + return new WorkflowRunResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual WorkflowRunActionResource GetWorkflowRunActionResource(ResourceIdentifier id) + { + WorkflowRunActionResource.ValidateResourceId(id); + return new WorkflowRunActionResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual WorkflowRunActionRepetitionResource GetWorkflowRunActionRepetitionResource(ResourceIdentifier id) + { + WorkflowRunActionRepetitionResource.ValidateResourceId(id); + return new WorkflowRunActionRepetitionResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual WorkflowRunActionScopeRepetitionResource GetWorkflowRunActionScopeRepetitionResource(ResourceIdentifier id) + { + WorkflowRunActionScopeRepetitionResource.ValidateResourceId(id); + return new WorkflowRunActionScopeRepetitionResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual WebAppRequestHistoryResource GetWebAppRequestHistoryResource(ResourceIdentifier id) + { + WebAppRequestHistoryResource.ValidateResourceId(id); + return new WebAppRequestHistoryResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual WorkflowTriggerResource GetWorkflowTriggerResource(ResourceIdentifier id) + { + WorkflowTriggerResource.ValidateResourceId(id); + return new WorkflowTriggerResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual WorkflowTriggerHistoryResource GetWorkflowTriggerHistoryResource(ResourceIdentifier id) + { + WorkflowTriggerHistoryResource.ValidateResourceId(id); + return new WorkflowTriggerHistoryResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual WorkflowVersionResource GetWorkflowVersionResource(ResourceIdentifier id) + { + WorkflowVersionResource.ValidateResourceId(id); + return new WorkflowVersionResource(Client, id); + } } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/MockableAppServiceResourceGroupResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/MockableAppServiceResourceGroupResource.cs index ed705c9a07c91..34262535500e7 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/MockableAppServiceResourceGroupResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/MockableAppServiceResourceGroupResource.cs @@ -66,7 +66,7 @@ public virtual AppServiceCertificateOrderCollection GetAppServiceCertificateOrde /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -97,7 +97,7 @@ public virtual async Task> GetAppSe /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -135,7 +135,7 @@ public virtual AppServiceDomainCollection GetAppServiceDomains() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual async Task> GetAppServiceDomai /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -204,7 +204,7 @@ public virtual AppServiceEnvironmentCollection GetAppServiceEnvironments() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -235,7 +235,7 @@ public virtual async Task> GetAppService /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -273,7 +273,7 @@ public virtual AppServicePlanCollection GetAppServicePlans() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -304,7 +304,7 @@ public virtual async Task> GetAppServicePlanAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -342,7 +342,7 @@ public virtual AppCertificateCollection GetAppCertificates() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -373,7 +373,7 @@ public virtual async Task> GetAppCertificateAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -411,7 +411,7 @@ public virtual KubeEnvironmentCollection GetKubeEnvironments() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -442,7 +442,7 @@ public virtual async Task> GetKubeEnvironmentA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -480,7 +480,7 @@ public virtual StaticSiteCollection GetStaticSites() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -511,7 +511,7 @@ public virtual async Task> GetStaticSiteAsync(strin /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -549,7 +549,7 @@ public virtual WebSiteCollection GetWebSites() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -580,7 +580,7 @@ public virtual async Task> GetWebSiteAsync(string name /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -611,7 +611,7 @@ public virtual Response GetWebSite(string name, CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -649,7 +649,7 @@ public virtual async Task> ValidateAsync(AppS /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/MockableAppServiceSubscriptionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/MockableAppServiceSubscriptionResource.cs index 7c387626132f9..755a191dacb19 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/MockableAppServiceSubscriptionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/MockableAppServiceSubscriptionResource.cs @@ -44,6 +44,8 @@ public partial class MockableAppServiceSubscriptionResource : ArmResource private ResourceHealthMetadataRestOperations _resourceHealthMetadataRestClient; private ClientDiagnostics _defaultClientDiagnostics; private WebSiteManagementRestOperations _defaultRestClient; + private ClientDiagnostics _getUsagesInLocationClientDiagnostics; + private GetUsagesInLocationRestOperations _getUsagesInLocationRestClient; private ClientDiagnostics _staticSitesClientDiagnostics; private StaticSitesRestOperations _staticSitesRestClient; private ClientDiagnostics _staticSiteClientDiagnostics; @@ -89,6 +91,8 @@ internal MockableAppServiceSubscriptionResource(ArmClient client, ResourceIdenti private ResourceHealthMetadataRestOperations ResourceHealthMetadataRestClient => _resourceHealthMetadataRestClient ??= new ResourceHealthMetadataRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private ClientDiagnostics DefaultClientDiagnostics => _defaultClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.AppService", ProviderConstants.DefaultProviderNamespace, Diagnostics); private WebSiteManagementRestOperations DefaultRestClient => _defaultRestClient ??= new WebSiteManagementRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + private ClientDiagnostics GetUsagesInLocationClientDiagnostics => _getUsagesInLocationClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.AppService", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private GetUsagesInLocationRestOperations GetUsagesInLocationRestClient => _getUsagesInLocationRestClient ??= new GetUsagesInLocationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private ClientDiagnostics StaticSitesClientDiagnostics => _staticSitesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.AppService", ProviderConstants.DefaultProviderNamespace, Diagnostics); private StaticSitesRestOperations StaticSitesRestClient => _staticSitesRestClient ??= new StaticSitesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private ClientDiagnostics StaticSiteClientDiagnostics => _staticSiteClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.AppService", StaticSiteResource.ResourceType.Namespace, Diagnostics); @@ -122,7 +126,7 @@ public virtual TopLevelDomainCollection GetTopLevelDomains() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -153,7 +157,7 @@ public virtual async Task> GetTopLevelDomainAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -191,7 +195,7 @@ public virtual DeletedSiteCollection GetDeletedSites() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -222,7 +226,7 @@ public virtual async Task> GetDeletedSiteAsync(str /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +257,7 @@ public virtual Response GetDeletedSite(string deletedSiteId /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -283,7 +287,7 @@ public virtual AsyncPageable GetAppServiceCe /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -313,7 +317,7 @@ public virtual Pageable GetAppServiceCertifi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -351,7 +355,7 @@ public virtual async Task ValidateAppServiceCertificateOrderPurchaseIn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -389,7 +393,7 @@ public virtual Response ValidateAppServiceCertificateOrderPurchaseInformation(Ap /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -427,7 +431,7 @@ public virtual async Task> CheckAppServi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -465,7 +469,7 @@ public virtual Response CheckAppServiceDomainRegi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -495,7 +499,7 @@ public virtual AsyncPageable GetAppServiceDomainsAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -525,7 +529,7 @@ public virtual Pageable GetAppServiceDomains(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -559,7 +563,7 @@ public virtual async Task> GetContro /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -593,7 +597,7 @@ public virtual Response GetControlCenterSsoRe /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -623,7 +627,7 @@ public virtual AsyncPageable GetAppServiceDomain /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -653,7 +657,7 @@ public virtual Pageable GetAppServiceDomainRecom /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -683,7 +687,7 @@ public virtual AsyncPageable GetAppServiceEnviron /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -713,7 +717,7 @@ public virtual Pageable GetAppServiceEnvironments /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -747,7 +751,7 @@ public virtual AsyncPageable GetAppServicePlansAsync(boo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -781,7 +785,7 @@ public virtual Pageable GetAppServicePlans(bool? detaile /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -812,7 +816,7 @@ public virtual AsyncPageable GetAppCertificatesAsync(str /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -843,7 +847,7 @@ public virtual Pageable GetAppCertificates(string filter /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -874,7 +878,7 @@ public virtual AsyncPageable GetDeletedSitesByLocationAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -905,7 +909,7 @@ public virtual Pageable GetDeletedSitesByLocation(AzureLoca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -949,7 +953,7 @@ public virtual async Task> GetDeletedWebAppByLocat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -993,7 +997,7 @@ public virtual Response GetDeletedWebAppByLocationDeletedWe /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1023,7 +1027,7 @@ public virtual AsyncPageable GetKubeEnvironmentsAsync(C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1053,7 +1057,7 @@ public virtual Pageable GetKubeEnvironments(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1080,7 +1084,7 @@ public virtual AsyncPageable GetAvailableStacksOnPremP /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1107,7 +1111,7 @@ public virtual Pageable GetAvailableStacksOnPremProvid /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1135,7 +1139,7 @@ public virtual AsyncPageable GetRecommendationsAsync(b /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1163,7 +1167,7 @@ public virtual Pageable GetRecommendations(bool? featu /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1197,7 +1201,7 @@ public virtual async Task ResetAllRecommendationFiltersAsync(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1231,7 +1235,7 @@ public virtual Response ResetAllRecommendationFilters(CancellationToken cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1270,7 +1274,7 @@ public virtual async Task DisableAppServiceRecommendationAsync(string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1309,7 +1313,7 @@ public virtual Response DisableAppServiceRecommendation(string name, Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1335,7 +1339,7 @@ public virtual AsyncPageable GetAllResourceHealthMet /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1361,7 +1365,7 @@ public virtual Pageable GetAllResourceHealthMetadata /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1389,7 +1393,7 @@ public virtual AsyncPageable GetBillingMetersAsync(strin /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1417,7 +1421,7 @@ public virtual Pageable GetBillingMeters(string billingL /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1455,7 +1459,7 @@ public virtual async Task> CheckAppServiceNam /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1480,6 +1484,60 @@ public virtual Response CheckAppServiceNameAvailabilit } } + /// + /// Get custom hostnames under this subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Web/customhostnameSites + /// + /// + /// Operation Id + /// ListCustomHostNameSites + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// Specific hostname. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetCustomHostNameSitesAsync(string hostname = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => DefaultRestClient.CreateListCustomHostNameSitesRequest(Id.SubscriptionId, hostname); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DefaultRestClient.CreateListCustomHostNameSitesNextPageRequest(nextLink, Id.SubscriptionId, hostname); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => CustomHostnameSites.DeserializeCustomHostnameSites(e), DefaultClientDiagnostics, Pipeline, "MockableAppServiceSubscriptionResource.GetCustomHostNameSites", "value", "nextLink", cancellationToken); + } + + /// + /// Get custom hostnames under this subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Web/customhostnameSites + /// + /// + /// Operation Id + /// ListCustomHostNameSites + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// Specific hostname. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetCustomHostNameSites(string hostname = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => DefaultRestClient.CreateListCustomHostNameSitesRequest(Id.SubscriptionId, hostname); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DefaultRestClient.CreateListCustomHostNameSitesNextPageRequest(nextLink, Id.SubscriptionId, hostname); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => CustomHostnameSites.DeserializeCustomHostnameSites(e), DefaultClientDiagnostics, Pipeline, "MockableAppServiceSubscriptionResource.GetCustomHostNameSites", "value", "nextLink", cancellationToken); + } + /// /// Description for Gets list of available geo regions plus ministamps /// @@ -1493,7 +1551,7 @@ public virtual Response CheckAppServiceNameAvailabilit /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1527,7 +1585,7 @@ public virtual async Task> GetAppService /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1548,6 +1606,58 @@ public virtual Response GetAppServiceDeploymentLo } } + /// + /// Description for get a list of available ASE regions and its supported Skus. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Web/aseRegions + /// + /// + /// Operation Id + /// ListAseRegions + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAseRegionsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => DefaultRestClient.CreateListAseRegionsRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DefaultRestClient.CreateListAseRegionsNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => AppServiceAseRegion.DeserializeAppServiceAseRegion(e), DefaultClientDiagnostics, Pipeline, "MockableAppServiceSubscriptionResource.GetAseRegions", "value", "nextLink", cancellationToken); + } + + /// + /// Description for get a list of available ASE regions and its supported Skus. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Web/aseRegions + /// + /// + /// Operation Id + /// ListAseRegions + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAseRegions(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => DefaultRestClient.CreateListAseRegionsRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DefaultRestClient.CreateListAseRegionsNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => AppServiceAseRegion.DeserializeAppServiceAseRegion(e), DefaultClientDiagnostics, Pipeline, "MockableAppServiceSubscriptionResource.GetAseRegions", "value", "nextLink", cancellationToken); + } + /// /// Description for Get a list of available geographical regions. /// @@ -1561,7 +1671,7 @@ public virtual Response GetAppServiceDeploymentLo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1591,7 +1701,7 @@ public virtual AsyncPageable GetGeoRegionsAsync(AppServiceS /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1621,7 +1731,7 @@ public virtual Pageable GetGeoRegions(AppServiceSkuName? sk /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1647,7 +1757,7 @@ public virtual AsyncPageable GetPremierAddOnOffersAsync(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1673,7 +1783,7 @@ public virtual Pageable GetPremierAddOnOffers(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1707,7 +1817,7 @@ public virtual async Task> GetSkusAsync(Cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1741,7 +1851,7 @@ public virtual Response GetSkus(CancellationToken cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1779,7 +1889,7 @@ public virtual async Task> Veri /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1804,6 +1914,60 @@ public virtual Response VerifyHostingEnv } } + /// + /// List usages in cores for all skus used by a subscription in a given location, for a specific quota type. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/usages + /// + /// + /// Operation Id + /// GetUsagesInLocation_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// The name of the Azure region. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetGetUsagesInLocationsAsync(AzureLocation location, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => GetUsagesInLocationRestClient.CreateListRequest(Id.SubscriptionId, location); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => GetUsagesInLocationRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, location); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => CsmUsageQuota.DeserializeCsmUsageQuota(e), GetUsagesInLocationClientDiagnostics, Pipeline, "MockableAppServiceSubscriptionResource.GetGetUsagesInLocations", "value", "nextLink", cancellationToken); + } + + /// + /// List usages in cores for all skus used by a subscription in a given location, for a specific quota type. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/usages + /// + /// + /// Operation Id + /// GetUsagesInLocation_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// The name of the Azure region. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetGetUsagesInLocations(AzureLocation location, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => GetUsagesInLocationRestClient.CreateListRequest(Id.SubscriptionId, location); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => GetUsagesInLocationRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, location); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => CsmUsageQuota.DeserializeCsmUsageQuota(e), GetUsagesInLocationClientDiagnostics, Pipeline, "MockableAppServiceSubscriptionResource.GetGetUsagesInLocations", "value", "nextLink", cancellationToken); + } + /// /// Description for Generates a preview workflow file for the static site /// @@ -1817,7 +1981,7 @@ public virtual Response VerifyHostingEnv /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1856,7 +2020,7 @@ public virtual async Task> PreviewStaticSit /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1895,7 +2059,7 @@ public virtual Response PreviewStaticSiteWorkflow(Az /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1925,7 +2089,7 @@ public virtual AsyncPageable GetStaticSitesAsync(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1955,7 +2119,7 @@ public virtual Pageable GetStaticSites(CancellationToken can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1985,7 +2149,7 @@ public virtual AsyncPageable GetWebSitesAsync(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/MockableAppServiceTenantResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/MockableAppServiceTenantResource.cs index b703e2ab27ccf..71fbb1b1274bc 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/MockableAppServiceTenantResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Extensions/MockableAppServiceTenantResource.cs @@ -77,7 +77,7 @@ public virtual AppServiceSourceControlCollection GetAppServiceSourceControls() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -108,7 +108,7 @@ public virtual async Task> GetAppServi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual Response GetAppServiceSourceCont /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -165,7 +165,7 @@ public virtual AsyncPageable GetOperationsCertificateRe /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -191,7 +191,7 @@ public virtual Pageable GetOperationsCertificateRegistr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -217,7 +217,7 @@ public virtual AsyncPageable GetOperationsDomainRegistr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -243,7 +243,7 @@ public virtual Pageable GetOperationsDomainRegistration /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -270,7 +270,7 @@ public virtual AsyncPageable GetAvailableStacksProvide /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -297,7 +297,7 @@ public virtual Pageable GetAvailableStacksProviders(Pr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -324,7 +324,7 @@ public virtual AsyncPageable GetFunctionAppStacksProvidersAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -351,7 +351,7 @@ public virtual Pageable GetFunctionAppStacksProviders(Provider /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -379,7 +379,7 @@ public virtual AsyncPageable GetFunctionAppStacksForLocationPr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -407,7 +407,7 @@ public virtual Pageable GetFunctionAppStacksForLocationProvide /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -435,7 +435,7 @@ public virtual AsyncPageable GetWebAppStacksByLocationAsync(AzureLo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -463,7 +463,7 @@ public virtual Pageable GetWebAppStacksByLocation(AzureLocation loc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -489,7 +489,7 @@ public virtual AsyncPageable GetOperationsProvidersAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -515,7 +515,7 @@ public virtual Pageable GetOperationsProviders(Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -542,7 +542,7 @@ public virtual AsyncPageable GetWebAppStacksProvidersAsync(Provider /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentDetectorCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentDetectorCollection.cs index b95fbd4ceb00a..972a2801f0b70 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentDetectorCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentDetectorCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -160,7 +160,7 @@ public virtual Response Get(string detectorN /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -190,7 +190,7 @@ public virtual AsyncPageable GetAllAsync(Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -220,7 +220,7 @@ public virtual Pageable GetAll(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual async Task> ExistsAsync(string detectorName, DateT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Response Exists(string detectorName, DateTimeOffset? startT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentDetectorResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentDetectorResource.cs index afeb4ca2c0868..49391b159af90 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentDetectorResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentDetectorResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentMultiRolePoolResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentMultiRolePoolResource.cs index 63e149c91635a..47fc5984a49a9 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentMultiRolePoolResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentMultiRolePoolResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task> Upd /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual Response Update(AppServi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual ArmOperation CreateOrUpd /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -389,7 +389,7 @@ public virtual AsyncPageable GetMultiRolePoolInstanceM /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -420,7 +420,7 @@ public virtual Pageable GetMultiRolePoolInstanceMetric /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -450,7 +450,7 @@ public virtual AsyncPageable GetMultiRoleMetricDefinit /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -480,7 +480,7 @@ public virtual Pageable GetMultiRoleMetricDefinitions( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -510,7 +510,7 @@ public virtual AsyncPageable GetMultiRolePoolSkusAsync(Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -540,7 +540,7 @@ public virtual Pageable GetMultiRolePoolSkus(Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -570,7 +570,7 @@ public virtual AsyncPageable GetMultiRoleUsagesAsync(Cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentPrivateEndpointConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentPrivateEndpointConnectionCollection.cs index 71365c8fbcdf2..33bd83378f9d5 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentPrivateEndpointConnectionCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentPrivateEndpointConnectionCollection.cs @@ -14,7 +14,6 @@ using Autorest.CSharp.Core; using Azure.Core; using Azure.Core.Pipeline; -using Azure.ResourceManager.AppService.Models; namespace Azure.ResourceManager.AppService { @@ -65,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -75,21 +74,21 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The to use. - /// The to use. + /// The to use. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); using var scope = _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsClientDiagnostics.CreateScope("HostingEnvironmentPrivateEndpointConnectionCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsRestClient.ApproveOrRejectPrivateEndpointConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, info, cancellationToken).ConfigureAwait(false); - var operation = new AppServiceArmOperation(new HostingEnvironmentPrivateEndpointConnectionOperationSource(Client), _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsClientDiagnostics, Pipeline, _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, info).Request, response, OperationFinalStateVia.Location); + var response = await _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsRestClient.ApproveOrRejectPrivateEndpointConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(new HostingEnvironmentPrivateEndpointConnectionOperationSource(Client), _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsClientDiagnostics, Pipeline, _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -114,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -124,21 +123,21 @@ public virtual async Task /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The to use. - /// The to use. + /// The to use. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); using var scope = _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsClientDiagnostics.CreateScope("HostingEnvironmentPrivateEndpointConnectionCollection.CreateOrUpdate"); scope.Start(); try { - var response = _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsRestClient.ApproveOrRejectPrivateEndpointConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, info, cancellationToken); - var operation = new AppServiceArmOperation(new HostingEnvironmentPrivateEndpointConnectionOperationSource(Client), _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsClientDiagnostics, Pipeline, _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, info).Request, response, OperationFinalStateVia.Location); + var response = _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsRestClient.ApproveOrRejectPrivateEndpointConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data, cancellationToken); + var operation = new AppServiceArmOperation(new HostingEnvironmentPrivateEndpointConnectionOperationSource(Client), _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsClientDiagnostics, Pipeline, _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -163,7 +162,7 @@ public virtual ArmOperation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +207,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +252,7 @@ public virtual Response Get /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -283,7 +282,7 @@ public virtual AsyncPageable /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -313,7 +312,7 @@ public virtual Pageable Get /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -356,7 +355,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -399,7 +398,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -444,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentPrivateEndpointConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentPrivateEndpointConnectionResource.cs index d2f9c8bbe2244..97b3b8769ac56 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentPrivateEndpointConnectionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentPrivateEndpointConnectionResource.cs @@ -11,7 +11,6 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Core.Pipeline; -using Azure.ResourceManager.AppService.Models; namespace Azure.ResourceManager.AppService { @@ -102,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +141,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +181,7 @@ public virtual Response Get /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -224,7 +223,7 @@ public virtual async Task> DeleteAsync(WaitUntil waitUn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -266,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -275,19 +274,19 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, Cancellation /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The to use. + /// The to use. /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); using var scope = _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsClientDiagnostics.CreateScope("HostingEnvironmentPrivateEndpointConnectionResource.Update"); scope.Start(); try { - var response = await _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsRestClient.ApproveOrRejectPrivateEndpointConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, info, cancellationToken).ConfigureAwait(false); - var operation = new AppServiceArmOperation(new HostingEnvironmentPrivateEndpointConnectionOperationSource(Client), _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsClientDiagnostics, Pipeline, _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, info).Request, response, OperationFinalStateVia.Location); + var response = await _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsRestClient.ApproveOrRejectPrivateEndpointConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(new HostingEnvironmentPrivateEndpointConnectionOperationSource(Client), _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsClientDiagnostics, Pipeline, _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -312,7 +311,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -321,19 +320,19 @@ public virtual async Task /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The to use. + /// The to use. /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); using var scope = _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsClientDiagnostics.CreateScope("HostingEnvironmentPrivateEndpointConnectionResource.Update"); scope.Start(); try { - var response = _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsRestClient.ApproveOrRejectPrivateEndpointConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, info, cancellationToken); - var operation = new AppServiceArmOperation(new HostingEnvironmentPrivateEndpointConnectionOperationSource(Client), _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsClientDiagnostics, Pipeline, _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, info).Request, response, OperationFinalStateVia.Location); + var response = _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsRestClient.ApproveOrRejectPrivateEndpointConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppServiceArmOperation(new HostingEnvironmentPrivateEndpointConnectionOperationSource(Client), _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsClientDiagnostics, Pipeline, _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentRecommendationCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentRecommendationCollection.cs index b9ceb07582cb0..5a9c7ea5beec3 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentRecommendationCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentRecommendationCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -108,7 +108,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -155,7 +155,7 @@ public virtual Response Get(string nam /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -200,7 +200,7 @@ public virtual async Task> ExistsAsync(string name, bool? updateS /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -245,7 +245,7 @@ public virtual Response Exists(string name, bool? updateSeen = null, strin /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -292,7 +292,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentRecommendationResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentRecommendationResource.cs index e7356fa8edea9..6036fac96c847 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentRecommendationResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentRecommendationResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -185,7 +185,7 @@ public virtual Response Get(bool? upda /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DisableRecommendationForHostingEnvironmentAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentWorkerPoolCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentWorkerPoolCollection.cs index 6f12ccfdae25a..563013c0867c9 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentWorkerPoolCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentWorkerPoolCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Cr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string workerP /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string workerPoolName, Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string workerPoolName, CancellationToken ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentWorkerPoolResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentWorkerPoolResource.cs index 95b3bb40b7351..c9aebb1afbebc 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentWorkerPoolResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentWorkerPoolResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task> Update /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual Response Update(AppServiceW /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -298,7 +298,7 @@ public virtual AsyncPageable GetWorkerPoolInstanceMetr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -329,7 +329,7 @@ public virtual Pageable GetWorkerPoolInstanceMetricDef /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual AsyncPageable GetWebWorkerMetricDefinit /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -389,7 +389,7 @@ public virtual Pageable GetWebWorkerMetricDefinitions( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -419,7 +419,7 @@ public virtual AsyncPageable GetWorkerPoolSkusAsync(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual Pageable GetWorkerPoolSkus(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -479,7 +479,7 @@ public virtual AsyncPageable GetWebWorkerUsagesAsync(Cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HybridConnectionLimitResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HybridConnectionLimitResource.cs index 48a306b7c966d..01d6e67de9726 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HybridConnectionLimitResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HybridConnectionLimitResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentCollection.cs index ef866f2c13d9f..bfbc531460cfb 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string nam /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string name, CancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentData.Serialization.cs index 0d6f8e9bb50dd..13c0b5d8b2f04 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentData.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentData.Serialization.cs @@ -101,6 +101,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("staticIp"u8); writer.WriteStringValue(StaticIP); } + if (Optional.IsDefined(EnvironmentType)) + { + writer.WritePropertyName("environmentType"u8); + writer.WriteStringValue(EnvironmentType); + } if (Optional.IsDefined(ArcConfiguration)) { writer.WritePropertyName("arcConfiguration"u8); @@ -111,6 +116,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("appLogsConfiguration"u8); writer.WriteObjectValue(AppLogsConfiguration, options); } + if (Optional.IsDefined(ContainerAppsConfiguration)) + { + writer.WritePropertyName("containerAppsConfiguration"u8); + writer.WriteObjectValue(ContainerAppsConfiguration, options); + } if (Optional.IsDefined(AksResourceId)) { writer.WritePropertyName("aksResourceID"u8); @@ -168,8 +178,10 @@ internal static KubeEnvironmentData DeserializeKubeEnvironmentData(JsonElement e bool? internalLoadBalancerEnabled = default; string defaultDomain = default; string staticIP = default; + string environmentType = default; ArcConfiguration arcConfiguration = default; AppLogsConfiguration appLogsConfiguration = default; + ContainerAppsConfiguration containerAppsConfiguration = default; ResourceIdentifier aksResourceId = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -274,6 +286,11 @@ internal static KubeEnvironmentData DeserializeKubeEnvironmentData(JsonElement e staticIP = property0.Value.GetString(); continue; } + if (property0.NameEquals("environmentType"u8)) + { + environmentType = property0.Value.GetString(); + continue; + } if (property0.NameEquals("arcConfiguration"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -292,6 +309,15 @@ internal static KubeEnvironmentData DeserializeKubeEnvironmentData(JsonElement e appLogsConfiguration = AppLogsConfiguration.DeserializeAppLogsConfiguration(property0.Value, options); continue; } + if (property0.NameEquals("containerAppsConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + containerAppsConfiguration = ContainerAppsConfiguration.DeserializeContainerAppsConfiguration(property0.Value, options); + continue; + } if (property0.NameEquals("aksResourceID"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -323,8 +349,10 @@ internal static KubeEnvironmentData DeserializeKubeEnvironmentData(JsonElement e internalLoadBalancerEnabled, defaultDomain, staticIP, + environmentType, arcConfiguration, appLogsConfiguration, + containerAppsConfiguration, aksResourceId, kind, serializedAdditionalRawData); @@ -583,6 +611,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EnvironmentType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" environmentType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EnvironmentType)) + { + builder.Append(" environmentType: "); + if (EnvironmentType.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{EnvironmentType}'''"); + } + else + { + builder.AppendLine($"'{EnvironmentType}'"); + } + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ArcConfiguration), out propertyOverride); if (hasPropertyOverride) { @@ -613,6 +664,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ContainerAppsConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" containerAppsConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ContainerAppsConfiguration)) + { + builder.Append(" containerAppsConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, ContainerAppsConfiguration, options, 4, false, " containerAppsConfiguration: "); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AksResourceId), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentData.cs index b0e4ccd0a0b0b..038058c4f08d6 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentData.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentData.cs @@ -71,6 +71,7 @@ public KubeEnvironmentData(AzureLocation location) : base(location) /// Only visible within Vnet/Subnet. /// Default Domain Name for the cluster. /// Static IP of the KubeEnvironment. + /// Type of Kubernetes Environment. Only supported for Container App Environments with value as Managed. /// /// Cluster configuration which determines the ARC cluster /// components types. Eg: Choosing between BuildService kind, @@ -81,10 +82,11 @@ public KubeEnvironmentData(AzureLocation location) : base(location) /// app logs to a destination. Currently only "log-analytics" is /// supported /// + /// Cluster configuration for Container Apps Environments to configure Dapr Instrumentation Key and VNET Configuration. /// /// Kind of resource. /// Keeps track of any properties unknown to the library. - 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, IDictionary serializedAdditionalRawData) : 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, string environmentType, ArcConfiguration arcConfiguration, AppLogsConfiguration appLogsConfiguration, ContainerAppsConfiguration containerAppsConfiguration, ResourceIdentifier aksResourceId, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { ExtendedLocation = extendedLocation; ProvisioningState = provisioningState; @@ -92,8 +94,10 @@ internal KubeEnvironmentData(ResourceIdentifier id, string name, ResourceType re IsInternalLoadBalancerEnabled = isInternalLoadBalancerEnabled; DefaultDomain = defaultDomain; StaticIP = staticIP; + EnvironmentType = environmentType; ArcConfiguration = arcConfiguration; AppLogsConfiguration = appLogsConfiguration; + ContainerAppsConfiguration = containerAppsConfiguration; AksResourceId = aksResourceId; Kind = kind; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -122,6 +126,9 @@ internal KubeEnvironmentData() /// Static IP of the KubeEnvironment. [WirePath("properties.staticIp")] public string StaticIP { get; set; } + /// Type of Kubernetes Environment. Only supported for Container App Environments with value as Managed. + [WirePath("properties.environmentType")] + public string EnvironmentType { get; set; } /// /// Cluster configuration which determines the ARC cluster /// components types. Eg: Choosing between BuildService kind, @@ -136,6 +143,9 @@ internal KubeEnvironmentData() /// [WirePath("properties.appLogsConfiguration")] public AppLogsConfiguration AppLogsConfiguration { get; set; } + /// Cluster configuration for Container Apps Environments to configure Dapr Instrumentation Key and VNET Configuration. + [WirePath("properties.containerAppsConfiguration")] + public ContainerAppsConfiguration ContainerAppsConfiguration { get; set; } /// Gets or sets the aks resource id. [WirePath("properties.aksResourceID")] public ResourceIdentifier AksResourceId { get; set; } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentResource.cs index 89ee8ce530c32..6226bced4d273 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -308,7 +308,7 @@ public virtual async Task> UpdateAsync(KubeEnv /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LogsSiteConfigResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LogsSiteConfigResource.cs index 4fa107b04d27f..36cf053f2e4ad 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LogsSiteConfigResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LogsSiteConfigResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LogsSiteSlotConfigResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LogsSiteSlotConfigResource.cs index a82aac0c52af6..a460baafd4ad4 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LogsSiteSlotConfigResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LogsSiteSlotConfigResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LongRunningOperation/CsmDeploymentStatusOperationSource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LongRunningOperation/CsmDeploymentStatusOperationSource.cs new file mode 100644 index 0000000000000..b5307231f02d3 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LongRunningOperation/CsmDeploymentStatusOperationSource.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + internal class CsmDeploymentStatusOperationSource : IOperationSource + { + CsmDeploymentStatus IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return CsmDeploymentStatus.DeserializeCsmDeploymentStatus(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return CsmDeploymentStatus.DeserializeCsmDeploymentStatus(document.RootElement); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LongRunningOperation/StaticSiteBuildLinkedBackendOperationSource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LongRunningOperation/StaticSiteBuildLinkedBackendOperationSource.cs new file mode 100644 index 0000000000000..feee6efd51057 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LongRunningOperation/StaticSiteBuildLinkedBackendOperationSource.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.AppService +{ + internal class StaticSiteBuildLinkedBackendOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal StaticSiteBuildLinkedBackendOperationSource(ArmClient client) + { + _client = client; + } + + StaticSiteBuildLinkedBackendResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = StaticSiteLinkedBackendData.DeserializeStaticSiteLinkedBackendData(document.RootElement); + return new StaticSiteBuildLinkedBackendResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = StaticSiteLinkedBackendData.DeserializeStaticSiteLinkedBackendData(document.RootElement); + return new StaticSiteBuildLinkedBackendResource(_client, data); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LongRunningOperation/StaticSiteLinkedBackendOperationSource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LongRunningOperation/StaticSiteLinkedBackendOperationSource.cs new file mode 100644 index 0000000000000..d986032d816ea --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LongRunningOperation/StaticSiteLinkedBackendOperationSource.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.AppService +{ + internal class StaticSiteLinkedBackendOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal StaticSiteLinkedBackendOperationSource(ArmClient client) + { + _client = client; + } + + StaticSiteLinkedBackendResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = StaticSiteLinkedBackendData.DeserializeStaticSiteLinkedBackendData(document.RootElement); + return new StaticSiteLinkedBackendResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = StaticSiteLinkedBackendData.DeserializeStaticSiteLinkedBackendData(document.RootElement); + return new StaticSiteLinkedBackendResource(_client, data); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/MigrateMySqlStatusResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/MigrateMySqlStatusResource.cs index 27581ff51bbd2..5cc7eccb8da19 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/MigrateMySqlStatusResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/MigrateMySqlStatusResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppDaprConfig.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppDaprConfig.Serialization.cs new file mode 100644 index 0000000000000..ba4eeef22c7c8 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppDaprConfig.Serialization.cs @@ -0,0 +1,353 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class AppDaprConfig : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AppDaprConfig)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(IsEnabled)) + { + writer.WritePropertyName("enabled"u8); + writer.WriteBooleanValue(IsEnabled.Value); + } + if (Optional.IsDefined(AppId)) + { + writer.WritePropertyName("appId"u8); + writer.WriteStringValue(AppId); + } + if (Optional.IsDefined(AppPort)) + { + writer.WritePropertyName("appPort"u8); + writer.WriteNumberValue(AppPort.Value); + } + if (Optional.IsDefined(HttpReadBufferSize)) + { + writer.WritePropertyName("httpReadBufferSize"u8); + writer.WriteNumberValue(HttpReadBufferSize.Value); + } + if (Optional.IsDefined(HttpMaxRequestSize)) + { + writer.WritePropertyName("httpMaxRequestSize"u8); + writer.WriteNumberValue(HttpMaxRequestSize.Value); + } + if (Optional.IsDefined(LogLevel)) + { + writer.WritePropertyName("logLevel"u8); + writer.WriteStringValue(LogLevel.Value.ToString()); + } + if (Optional.IsDefined(IsApiLoggingEnabled)) + { + writer.WritePropertyName("enableApiLogging"u8); + writer.WriteBooleanValue(IsApiLoggingEnabled.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AppDaprConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AppDaprConfig)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAppDaprConfig(document.RootElement, options); + } + + internal static AppDaprConfig DeserializeAppDaprConfig(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? enabled = default; + string appId = default; + int? appPort = default; + int? httpReadBufferSize = default; + int? httpMaxRequestSize = default; + AppDaprLogLevel? logLevel = default; + bool? enableApiLogging = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("enabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("appId"u8)) + { + appId = property.Value.GetString(); + continue; + } + if (property.NameEquals("appPort"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + appPort = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("httpReadBufferSize"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + httpReadBufferSize = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("httpMaxRequestSize"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + httpMaxRequestSize = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("logLevel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + logLevel = new AppDaprLogLevel(property.Value.GetString()); + continue; + } + if (property.NameEquals("enableApiLogging"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableApiLogging = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AppDaprConfig( + enabled, + appId, + appPort, + httpReadBufferSize, + httpMaxRequestSize, + logLevel, + enableApiLogging, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsEnabled)) + { + builder.Append(" enabled: "); + var boolValue = IsEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AppId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" appId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AppId)) + { + builder.Append(" appId: "); + if (AppId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AppId}'''"); + } + else + { + builder.AppendLine($"'{AppId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AppPort), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" appPort: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AppPort)) + { + builder.Append(" appPort: "); + builder.AppendLine($"{AppPort.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(HttpReadBufferSize), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" httpReadBufferSize: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(HttpReadBufferSize)) + { + builder.Append(" httpReadBufferSize: "); + builder.AppendLine($"{HttpReadBufferSize.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(HttpMaxRequestSize), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" httpMaxRequestSize: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(HttpMaxRequestSize)) + { + builder.Append(" httpMaxRequestSize: "); + builder.AppendLine($"{HttpMaxRequestSize.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LogLevel), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" logLevel: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LogLevel)) + { + builder.Append(" logLevel: "); + builder.AppendLine($"'{LogLevel.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsApiLoggingEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enableApiLogging: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsApiLoggingEnabled)) + { + builder.Append(" enableApiLogging: "); + var boolValue = IsApiLoggingEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(AppDaprConfig)} does not support writing '{options.Format}' format."); + } + } + + AppDaprConfig IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAppDaprConfig(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AppDaprConfig)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppDaprConfig.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppDaprConfig.cs new file mode 100644 index 0000000000000..d2d5c13e63a67 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppDaprConfig.cs @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// App Dapr configuration. + public partial class AppDaprConfig + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AppDaprConfig() + { + } + + /// Initializes a new instance of . + /// Boolean indicating if the Dapr side car is enabled. + /// Dapr application identifier. + /// Tells Dapr which port your application is listening on. + /// Dapr max size of http header read buffer in KB to handle when sending multi-KB headers. Default is 65KB. + /// Increasing max size of request body http servers parameter in MB to handle uploading of big files. Default is 4 MB. + /// Sets the log level for the Dapr sidecar. Allowed values are debug, info, warn, error. Default is info. + /// Enables API logging for the Dapr sidecar. + /// Keeps track of any properties unknown to the library. + internal AppDaprConfig(bool? isEnabled, string appId, int? appPort, int? httpReadBufferSize, int? httpMaxRequestSize, AppDaprLogLevel? logLevel, bool? isApiLoggingEnabled, IDictionary serializedAdditionalRawData) + { + IsEnabled = isEnabled; + AppId = appId; + AppPort = appPort; + HttpReadBufferSize = httpReadBufferSize; + HttpMaxRequestSize = httpMaxRequestSize; + LogLevel = logLevel; + IsApiLoggingEnabled = isApiLoggingEnabled; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Boolean indicating if the Dapr side car is enabled. + [WirePath("enabled")] + public bool? IsEnabled { get; set; } + /// Dapr application identifier. + [WirePath("appId")] + public string AppId { get; set; } + /// Tells Dapr which port your application is listening on. + [WirePath("appPort")] + public int? AppPort { get; set; } + /// Dapr max size of http header read buffer in KB to handle when sending multi-KB headers. Default is 65KB. + [WirePath("httpReadBufferSize")] + public int? HttpReadBufferSize { get; set; } + /// Increasing max size of request body http servers parameter in MB to handle uploading of big files. Default is 4 MB. + [WirePath("httpMaxRequestSize")] + public int? HttpMaxRequestSize { get; set; } + /// Sets the log level for the Dapr sidecar. Allowed values are debug, info, warn, error. Default is info. + [WirePath("logLevel")] + public AppDaprLogLevel? LogLevel { get; set; } + /// Enables API logging for the Dapr sidecar. + [WirePath("enableApiLogging")] + public bool? IsApiLoggingEnabled { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppDaprLogLevel.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppDaprLogLevel.cs new file mode 100644 index 0000000000000..c7cfc02778cd5 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppDaprLogLevel.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Sets the log level for the Dapr sidecar. Allowed values are debug, info, warn, error. Default is info. + public readonly partial struct AppDaprLogLevel : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AppDaprLogLevel(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InfoValue = "info"; + private const string DebugValue = "debug"; + private const string WarnValue = "warn"; + private const string ErrorValue = "error"; + + /// info. + public static AppDaprLogLevel Info { get; } = new AppDaprLogLevel(InfoValue); + /// debug. + public static AppDaprLogLevel Debug { get; } = new AppDaprLogLevel(DebugValue); + /// warn. + public static AppDaprLogLevel Warn { get; } = new AppDaprLogLevel(WarnValue); + /// error. + public static AppDaprLogLevel Error { get; } = new AppDaprLogLevel(ErrorValue); + /// Determines if two values are the same. + public static bool operator ==(AppDaprLogLevel left, AppDaprLogLevel right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AppDaprLogLevel left, AppDaprLogLevel right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AppDaprLogLevel(string value) => new AppDaprLogLevel(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AppDaprLogLevel other && Equals(other); + /// + public bool Equals(AppDaprLogLevel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceAseRegion.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceAseRegion.Serialization.cs new file mode 100644 index 0000000000000..92318ec073bff --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceAseRegion.Serialization.cs @@ -0,0 +1,545 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class AppServiceAseRegion : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AppServiceAseRegion)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); + } + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (options.Format != "W" && Optional.IsDefined(IsStandard)) + { + writer.WritePropertyName("standard"u8); + writer.WriteBooleanValue(IsStandard.Value); + } + if (options.Format != "W" && Optional.IsDefined(IsDedicatedHostEnabled)) + { + writer.WritePropertyName("dedicatedHost"u8); + writer.WriteBooleanValue(IsDedicatedHostEnabled.Value); + } + if (options.Format != "W" && Optional.IsDefined(IsZoneRedundantEnabled)) + { + writer.WritePropertyName("zoneRedundant"u8); + writer.WriteBooleanValue(IsZoneRedundantEnabled.Value); + } + if (Optional.IsCollectionDefined(AvailableSku)) + { + writer.WritePropertyName("availableSku"u8); + writer.WriteStartArray(); + foreach (var item in AvailableSku) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(AvailableOS)) + { + writer.WritePropertyName("availableOS"u8); + writer.WriteStartArray(); + foreach (var item in AvailableOS) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AppServiceAseRegion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AppServiceAseRegion)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAppServiceAseRegion(document.RootElement, options); + } + + internal static AppServiceAseRegion DeserializeAppServiceAseRegion(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string kind = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + string displayName = default; + bool? standard = default; + bool? dedicatedHost = default; + bool? zoneRedundant = default; + IList availableSku = default; + IList availableOS = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kind"u8)) + { + kind = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("displayName"u8)) + { + displayName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("standard"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + standard = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("dedicatedHost"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dedicatedHost = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("zoneRedundant"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + zoneRedundant = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("availableSku"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + availableSku = array; + continue; + } + if (property0.NameEquals("availableOS"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + availableOS = array; + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AppServiceAseRegion( + id, + name, + type, + systemData, + displayName, + standard, + dedicatedHost, + zoneRedundant, + availableSku ?? new ChangeTrackingList(), + availableOS ?? new ChangeTrackingList(), + kind, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Kind), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" kind: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Kind)) + { + builder.Append(" kind: "); + if (Kind.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Kind}'''"); + } + else + { + builder.AppendLine($"'{Kind}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DisplayName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" displayName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DisplayName)) + { + builder.Append(" displayName: "); + if (DisplayName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DisplayName}'''"); + } + else + { + builder.AppendLine($"'{DisplayName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsStandard), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" standard: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsStandard)) + { + builder.Append(" standard: "); + var boolValue = IsStandard.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsDedicatedHostEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" dedicatedHost: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsDedicatedHostEnabled)) + { + builder.Append(" dedicatedHost: "); + var boolValue = IsDedicatedHostEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsZoneRedundantEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" zoneRedundant: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsZoneRedundantEnabled)) + { + builder.Append(" zoneRedundant: "); + var boolValue = IsZoneRedundantEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AvailableSku), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" availableSku: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(AvailableSku)) + { + if (AvailableSku.Any()) + { + builder.Append(" availableSku: "); + builder.AppendLine("["); + foreach (var item in AvailableSku) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AvailableOS), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" availableOS: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(AvailableOS)) + { + if (AvailableOS.Any()) + { + builder.Append(" availableOS: "); + builder.AppendLine("["); + foreach (var item in AvailableOS) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(AppServiceAseRegion)} does not support writing '{options.Format}' format."); + } + } + + AppServiceAseRegion IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAppServiceAseRegion(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AppServiceAseRegion)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceAseRegion.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceAseRegion.cs new file mode 100644 index 0000000000000..cfc077c2ad92d --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceAseRegion.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService.Models +{ + /// ASE region. + public partial class AppServiceAseRegion : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AppServiceAseRegion() + { + AvailableSku = new ChangeTrackingList(); + AvailableOS = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Display name for region. + /// Is region standard. + /// Dedicated host enabled. + /// Zone redundant deployment enabled. + /// Available Skus in region. + /// Available OSs in region. + /// Kind of resource. + /// Keeps track of any properties unknown to the library. + internal AppServiceAseRegion(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string displayName, bool? isStandard, bool? isDedicatedHostEnabled, bool? isZoneRedundantEnabled, IList availableSku, IList availableOS, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + DisplayName = displayName; + IsStandard = isStandard; + IsDedicatedHostEnabled = isDedicatedHostEnabled; + IsZoneRedundantEnabled = isZoneRedundantEnabled; + AvailableSku = availableSku; + AvailableOS = availableOS; + Kind = kind; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Display name for region. + [WirePath("properties.displayName")] + public string DisplayName { get; } + /// Is region standard. + [WirePath("properties.standard")] + public bool? IsStandard { get; } + /// Dedicated host enabled. + [WirePath("properties.dedicatedHost")] + public bool? IsDedicatedHostEnabled { get; } + /// Zone redundant deployment enabled. + [WirePath("properties.zoneRedundant")] + public bool? IsZoneRedundantEnabled { get; } + /// Available Skus in region. + [WirePath("properties.availableSku")] + public IList AvailableSku { get; } + /// Available OSs in region. + [WirePath("properties.availableOS")] + public IList AvailableOS { get; } + /// Kind of resource. + [WirePath("kind")] + public string Kind { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceCertificateEmail.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceCertificateEmail.Serialization.cs index cc6d52d5bb21e..ea1dfeae3136c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceCertificateEmail.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceCertificateEmail.Serialization.cs @@ -28,10 +28,15 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe } writer.WriteStartObject(); - if (Optional.IsDefined(Kind)) + if (Optional.IsDefined(EmailId)) + { + writer.WritePropertyName("emailId"u8); + writer.WriteStringValue(EmailId); + } + if (Optional.IsDefined(TimeStamp)) { - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind); + writer.WritePropertyName("timeStamp"u8); + writer.WriteStringValue(TimeStamp.Value, "O"); } if (options.Format != "W") { @@ -53,19 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WritePropertyName("systemData"u8); JsonSerializer.Serialize(writer, SystemData); } - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(EmailId)) - { - writer.WritePropertyName("emailId"u8); - writer.WriteStringValue(EmailId); - } - if (Optional.IsDefined(TimeStamp)) - { - writer.WritePropertyName("timeStamp"u8); - writer.WriteStringValue(TimeStamp.Value, "O"); - } - writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -104,20 +96,28 @@ internal static AppServiceCertificateEmail DeserializeAppServiceCertificateEmail { return null; } - string kind = default; + string emailId = default; + DateTimeOffset? timeStamp = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; SystemData systemData = default; - string emailId = default; - DateTimeOffset? timeStamp = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("kind"u8)) + if (property.NameEquals("emailId"u8)) { - kind = property.Value.GetString(); + emailId = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeStamp"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeStamp = property.Value.GetDateTimeOffset("O"); continue; } if (property.NameEquals("id"u8)) @@ -144,32 +144,6 @@ internal static AppServiceCertificateEmail DeserializeAppServiceCertificateEmail systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("emailId"u8)) - { - emailId = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("timeStamp"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - timeStamp = property0.Value.GetDateTimeOffset("O"); - continue; - } - } - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -183,7 +157,6 @@ internal static AppServiceCertificateEmail DeserializeAppServiceCertificateEmail systemData, emailId, timeStamp, - kind, serializedAdditionalRawData); } @@ -221,101 +194,75 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Kind), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EmailId), out propertyOverride); if (hasPropertyOverride) { - builder.Append(" kind: "); + builder.Append(" emailId: "); builder.AppendLine(propertyOverride); } else { - if (Optional.IsDefined(Kind)) + if (Optional.IsDefined(EmailId)) { - builder.Append(" kind: "); - if (Kind.Contains(Environment.NewLine)) + builder.Append(" emailId: "); + if (EmailId.Contains(Environment.NewLine)) { builder.AppendLine("'''"); - builder.AppendLine($"{Kind}'''"); + builder.AppendLine($"{EmailId}'''"); } else { - builder.AppendLine($"'{Kind}'"); + builder.AppendLine($"'{EmailId}'"); } } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" id: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Id)) - { - builder.Append(" id: "); - builder.AppendLine($"'{Id.ToString()}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TimeStamp), out propertyOverride); if (hasPropertyOverride) { - builder.Append(" systemData: "); + builder.Append(" timeStamp: "); builder.AppendLine(propertyOverride); } else { - if (Optional.IsDefined(SystemData)) + if (Optional.IsDefined(TimeStamp)) { - builder.Append(" systemData: "); - builder.AppendLine($"'{SystemData.ToString()}'"); + builder.Append(" timeStamp: "); + var formattedDateTimeString = TypeFormatters.ToString(TimeStamp.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); } } - builder.Append(" properties:"); - builder.AppendLine(" {"); - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EmailId), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); if (hasPropertyOverride) { - builder.Append(" emailId: "); + builder.Append(" id: "); builder.AppendLine(propertyOverride); } else { - if (Optional.IsDefined(EmailId)) + if (Optional.IsDefined(Id)) { - builder.Append(" emailId: "); - if (EmailId.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{EmailId}'''"); - } - else - { - builder.AppendLine($"'{EmailId}'"); - } + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TimeStamp), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); if (hasPropertyOverride) { - builder.Append(" timeStamp: "); + builder.Append(" systemData: "); builder.AppendLine(propertyOverride); } else { - if (Optional.IsDefined(TimeStamp)) + if (Optional.IsDefined(SystemData)) { - builder.Append(" timeStamp: "); - var formattedDateTimeString = TypeFormatters.ToString(TimeStamp.Value, "o"); - builder.AppendLine($"'{formattedDateTimeString}'"); + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); } } - builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceCertificateEmail.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceCertificateEmail.cs index c768852aad328..3a4e23b3df939 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceCertificateEmail.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceCertificateEmail.cs @@ -59,24 +59,19 @@ public AppServiceCertificateEmail() /// The systemData. /// Email id. /// Time stamp. - /// Kind of resource. /// Keeps track of any properties unknown to the library. - internal AppServiceCertificateEmail(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string emailId, DateTimeOffset? timeStamp, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal AppServiceCertificateEmail(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string emailId, DateTimeOffset? timeStamp, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { EmailId = emailId; TimeStamp = timeStamp; - Kind = kind; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Email id. - [WirePath("properties.emailId")] + [WirePath("emailId")] public string EmailId { get; set; } /// Time stamp. - [WirePath("properties.timeStamp")] + [WirePath("timeStamp")] public DateTimeOffset? TimeStamp { get; set; } - /// Kind of resource. - [WirePath("kind")] - public string Kind { get; set; } } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentPatch.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentPatch.Serialization.cs index 4e82be33197ab..a36fea17931a6 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentPatch.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentPatch.Serialization.cs @@ -136,6 +136,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WritePropertyName("hasLinuxWorkers"u8); writer.WriteBooleanValue(HasLinuxWorkers.Value); } + if (Optional.IsDefined(UpgradePreference)) + { + writer.WritePropertyName("upgradePreference"u8); + writer.WriteStringValue(UpgradePreference.Value.ToString()); + } if (Optional.IsDefined(DedicatedHostCount)) { writer.WritePropertyName("dedicatedHostCount"u8); @@ -146,6 +151,21 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WritePropertyName("zoneRedundant"u8); writer.WriteBooleanValue(IsZoneRedundant.Value); } + if (Optional.IsDefined(CustomDnsSuffixConfiguration)) + { + writer.WritePropertyName("customDnsSuffixConfiguration"u8); + writer.WriteObjectValue(CustomDnsSuffixConfiguration, options); + } + if (Optional.IsDefined(NetworkingConfiguration)) + { + writer.WritePropertyName("networkingConfiguration"u8); + writer.WriteObjectValue(NetworkingConfiguration, options); + } + if (options.Format != "W" && Optional.IsDefined(UpgradeAvailability)) + { + writer.WritePropertyName("upgradeAvailability"u8); + writer.WriteStringValue(UpgradeAvailability.Value.ToString()); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -204,8 +224,12 @@ internal static AppServiceEnvironmentPatch DeserializeAppServiceEnvironmentPatch IList clusterSettings = default; IList userWhitelistedIPRanges = default; bool? hasLinuxWorkers = default; + AppServiceEnvironmentUpgradePreference? upgradePreference = default; int? dedicatedHostCount = default; bool? zoneRedundant = default; + CustomDnsSuffixConfigurationData customDnsSuffixConfiguration = default; + AseV3NetworkingConfigurationData networkingConfiguration = default; + AppServiceEnvironmentUpgradeAvailability? upgradeAvailability = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -376,6 +400,15 @@ internal static AppServiceEnvironmentPatch DeserializeAppServiceEnvironmentPatch hasLinuxWorkers = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("upgradePreference"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + upgradePreference = new AppServiceEnvironmentUpgradePreference(property0.Value.GetString()); + continue; + } if (property0.NameEquals("dedicatedHostCount"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -394,6 +427,33 @@ internal static AppServiceEnvironmentPatch DeserializeAppServiceEnvironmentPatch zoneRedundant = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("customDnsSuffixConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + customDnsSuffixConfiguration = CustomDnsSuffixConfigurationData.DeserializeCustomDnsSuffixConfigurationData(property0.Value, options); + continue; + } + if (property0.NameEquals("networkingConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkingConfiguration = AseV3NetworkingConfigurationData.DeserializeAseV3NetworkingConfigurationData(property0.Value, options); + continue; + } + if (property0.NameEquals("upgradeAvailability"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + upgradeAvailability = new AppServiceEnvironmentUpgradeAvailability(property0.Value.GetString()); + continue; + } } continue; } @@ -422,8 +482,12 @@ internal static AppServiceEnvironmentPatch DeserializeAppServiceEnvironmentPatch clusterSettings ?? new ChangeTrackingList(), userWhitelistedIPRanges ?? new ChangeTrackingList(), hasLinuxWorkers, + upgradePreference, dedicatedHostCount, zoneRedundant, + customDnsSuffixConfiguration, + networkingConfiguration, + upgradeAvailability, kind, serializedAdditionalRawData); } @@ -774,6 +838,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UpgradePreference), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" upgradePreference: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UpgradePreference)) + { + builder.Append(" upgradePreference: "); + builder.AppendLine($"'{UpgradePreference.Value.ToString()}'"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DedicatedHostCount), out propertyOverride); if (hasPropertyOverride) { @@ -805,6 +884,51 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CustomDnsSuffixConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" customDnsSuffixConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CustomDnsSuffixConfiguration)) + { + builder.Append(" customDnsSuffixConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, CustomDnsSuffixConfiguration, options, 4, false, " customDnsSuffixConfiguration: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NetworkingConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" networkingConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NetworkingConfiguration)) + { + builder.Append(" networkingConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, NetworkingConfiguration, options, 4, false, " networkingConfiguration: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UpgradeAvailability), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" upgradeAvailability: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UpgradeAvailability)) + { + builder.Append(" upgradeAvailability: "); + builder.AppendLine($"'{UpgradeAvailability.Value.ToString()}'"); + } + } + builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentPatch.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentPatch.cs index 1617071c6e01e..b292e4b9e4db8 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentPatch.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentPatch.cs @@ -76,11 +76,15 @@ public AppServiceEnvironmentPatch() /// Custom settings for changing the behavior of the App Service Environment. /// User added ip ranges to whitelist on ASE db. /// Flag that displays whether an ASE has linux workers or not. + /// Upgrade Preference. /// Dedicated Host Count. /// Whether or not this App Service Environment is zone-redundant. + /// Full view of the custom domain suffix configuration for ASEv3. + /// Full view of networking configuration for an ASE. + /// Whether an upgrade is available for this App Service Environment. /// Kind of resource. /// Keeps track of any properties unknown to the library. - internal AppServiceEnvironmentPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ProvisioningState? provisioningState, HostingEnvironmentStatus? status, AppServiceVirtualNetworkProfile virtualNetwork, LoadBalancingMode? internalLoadBalancingMode, string multiSize, int? multiRoleCount, int? ipSslAddressCount, string dnsSuffix, int? maximumNumberOfMachines, int? frontEndScaleFactor, bool? isSuspended, IList clusterSettings, IList userWhitelistedIPRanges, bool? hasLinuxWorkers, int? dedicatedHostCount, bool? isZoneRedundant, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal AppServiceEnvironmentPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ProvisioningState? provisioningState, HostingEnvironmentStatus? status, AppServiceVirtualNetworkProfile virtualNetwork, LoadBalancingMode? internalLoadBalancingMode, string multiSize, int? multiRoleCount, int? ipSslAddressCount, string dnsSuffix, int? maximumNumberOfMachines, int? frontEndScaleFactor, bool? isSuspended, IList clusterSettings, IList userWhitelistedIPRanges, bool? hasLinuxWorkers, AppServiceEnvironmentUpgradePreference? upgradePreference, int? dedicatedHostCount, bool? isZoneRedundant, CustomDnsSuffixConfigurationData customDnsSuffixConfiguration, AseV3NetworkingConfigurationData networkingConfiguration, AppServiceEnvironmentUpgradeAvailability? upgradeAvailability, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { ProvisioningState = provisioningState; Status = status; @@ -96,8 +100,12 @@ internal AppServiceEnvironmentPatch(ResourceIdentifier id, string name, Resource ClusterSettings = clusterSettings; UserWhitelistedIPRanges = userWhitelistedIPRanges; HasLinuxWorkers = hasLinuxWorkers; + UpgradePreference = upgradePreference; DedicatedHostCount = dedicatedHostCount; IsZoneRedundant = isZoneRedundant; + CustomDnsSuffixConfiguration = customDnsSuffixConfiguration; + NetworkingConfiguration = networkingConfiguration; + UpgradeAvailability = upgradeAvailability; Kind = kind; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -147,12 +155,24 @@ internal AppServiceEnvironmentPatch(ResourceIdentifier id, string name, Resource /// Flag that displays whether an ASE has linux workers or not. [WirePath("properties.hasLinuxWorkers")] public bool? HasLinuxWorkers { get; } + /// Upgrade Preference. + [WirePath("properties.upgradePreference")] + public AppServiceEnvironmentUpgradePreference? UpgradePreference { get; set; } /// Dedicated Host Count. [WirePath("properties.dedicatedHostCount")] public int? DedicatedHostCount { get; set; } /// Whether or not this App Service Environment is zone-redundant. [WirePath("properties.zoneRedundant")] public bool? IsZoneRedundant { get; set; } + /// Full view of the custom domain suffix configuration for ASEv3. + [WirePath("properties.customDnsSuffixConfiguration")] + public CustomDnsSuffixConfigurationData CustomDnsSuffixConfiguration { get; set; } + /// Full view of networking configuration for an ASE. + [WirePath("properties.networkingConfiguration")] + public AseV3NetworkingConfigurationData NetworkingConfiguration { get; set; } + /// Whether an upgrade is available for this App Service Environment. + [WirePath("properties.upgradeAvailability")] + public AppServiceEnvironmentUpgradeAvailability? UpgradeAvailability { get; } /// Kind of resource. [WirePath("kind")] public string Kind { get; set; } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentProperties.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentProperties.Serialization.cs index 9d93148e6ccdc..e2c2bb6540422 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentProperties.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentProperties.Serialization.cs @@ -105,6 +105,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WritePropertyName("hasLinuxWorkers"u8); writer.WriteBooleanValue(HasLinuxWorkers.Value); } + if (Optional.IsDefined(UpgradePreference)) + { + writer.WritePropertyName("upgradePreference"u8); + writer.WriteStringValue(UpgradePreference.Value.ToString()); + } if (Optional.IsDefined(DedicatedHostCount)) { writer.WritePropertyName("dedicatedHostCount"u8); @@ -115,6 +120,21 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WritePropertyName("zoneRedundant"u8); writer.WriteBooleanValue(IsZoneRedundant.Value); } + if (Optional.IsDefined(CustomDnsSuffixConfiguration)) + { + writer.WritePropertyName("customDnsSuffixConfiguration"u8); + writer.WriteObjectValue(CustomDnsSuffixConfiguration, options); + } + if (Optional.IsDefined(NetworkingConfiguration)) + { + writer.WritePropertyName("networkingConfiguration"u8); + writer.WriteObjectValue(NetworkingConfiguration, options); + } + if (options.Format != "W" && Optional.IsDefined(UpgradeAvailability)) + { + writer.WritePropertyName("upgradeAvailability"u8); + writer.WriteStringValue(UpgradeAvailability.Value.ToString()); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -167,8 +187,12 @@ internal static AppServiceEnvironmentProperties DeserializeAppServiceEnvironment IList clusterSettings = default; IList userWhitelistedIPRanges = default; bool? hasLinuxWorkers = default; + AppServiceEnvironmentUpgradePreference? upgradePreference = default; int? dedicatedHostCount = default; bool? zoneRedundant = default; + CustomDnsSuffixConfigurationData customDnsSuffixConfiguration = default; + AseV3NetworkingConfigurationData networkingConfiguration = default; + AppServiceEnvironmentUpgradeAvailability? upgradeAvailability = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -297,6 +321,15 @@ internal static AppServiceEnvironmentProperties DeserializeAppServiceEnvironment hasLinuxWorkers = property.Value.GetBoolean(); continue; } + if (property.NameEquals("upgradePreference"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + upgradePreference = new AppServiceEnvironmentUpgradePreference(property.Value.GetString()); + continue; + } if (property.NameEquals("dedicatedHostCount"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -315,6 +348,33 @@ internal static AppServiceEnvironmentProperties DeserializeAppServiceEnvironment zoneRedundant = property.Value.GetBoolean(); continue; } + if (property.NameEquals("customDnsSuffixConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + customDnsSuffixConfiguration = CustomDnsSuffixConfigurationData.DeserializeCustomDnsSuffixConfigurationData(property.Value, options); + continue; + } + if (property.NameEquals("networkingConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkingConfiguration = AseV3NetworkingConfigurationData.DeserializeAseV3NetworkingConfigurationData(property.Value, options); + continue; + } + if (property.NameEquals("upgradeAvailability"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + upgradeAvailability = new AppServiceEnvironmentUpgradeAvailability(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -336,8 +396,12 @@ internal static AppServiceEnvironmentProperties DeserializeAppServiceEnvironment clusterSettings ?? new ChangeTrackingList(), userWhitelistedIPRanges ?? new ChangeTrackingList(), hasLinuxWorkers, + upgradePreference, dedicatedHostCount, zoneRedundant, + customDnsSuffixConfiguration, + networkingConfiguration, + upgradeAvailability, serializedAdditionalRawData); } @@ -609,6 +673,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UpgradePreference), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" upgradePreference: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UpgradePreference)) + { + builder.Append(" upgradePreference: "); + builder.AppendLine($"'{UpgradePreference.Value.ToString()}'"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DedicatedHostCount), out propertyOverride); if (hasPropertyOverride) { @@ -640,6 +719,51 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CustomDnsSuffixConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" customDnsSuffixConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CustomDnsSuffixConfiguration)) + { + builder.Append(" customDnsSuffixConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, CustomDnsSuffixConfiguration, options, 2, false, " customDnsSuffixConfiguration: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NetworkingConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" networkingConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NetworkingConfiguration)) + { + builder.Append(" networkingConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, NetworkingConfiguration, options, 2, false, " networkingConfiguration: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UpgradeAvailability), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" upgradeAvailability: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UpgradeAvailability)) + { + builder.Append(" upgradeAvailability: "); + builder.AppendLine($"'{UpgradeAvailability.Value.ToString()}'"); + } + } + builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentProperties.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentProperties.cs index fe7e8ea1abbfa..27365bc7c298a 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentProperties.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentProperties.cs @@ -75,10 +75,14 @@ public AppServiceEnvironmentProperties(AppServiceVirtualNetworkProfile virtualNe /// Custom settings for changing the behavior of the App Service Environment. /// User added ip ranges to whitelist on ASE db. /// Flag that displays whether an ASE has linux workers or not. + /// Upgrade Preference. /// Dedicated Host Count. /// Whether or not this App Service Environment is zone-redundant. + /// Full view of the custom domain suffix configuration for ASEv3. + /// Full view of networking configuration for an ASE. + /// Whether an upgrade is available for this App Service Environment. /// Keeps track of any properties unknown to the library. - internal AppServiceEnvironmentProperties(ProvisioningState? provisioningState, HostingEnvironmentStatus? status, AppServiceVirtualNetworkProfile virtualNetwork, LoadBalancingMode? internalLoadBalancingMode, string multiSize, int? multiRoleCount, int? ipSslAddressCount, string dnsSuffix, int? maximumNumberOfMachines, int? frontEndScaleFactor, bool? isSuspended, IList clusterSettings, IList userWhitelistedIPRanges, bool? hasLinuxWorkers, int? dedicatedHostCount, bool? isZoneRedundant, IDictionary serializedAdditionalRawData) + internal AppServiceEnvironmentProperties(ProvisioningState? provisioningState, HostingEnvironmentStatus? status, AppServiceVirtualNetworkProfile virtualNetwork, LoadBalancingMode? internalLoadBalancingMode, string multiSize, int? multiRoleCount, int? ipSslAddressCount, string dnsSuffix, int? maximumNumberOfMachines, int? frontEndScaleFactor, bool? isSuspended, IList clusterSettings, IList userWhitelistedIPRanges, bool? hasLinuxWorkers, AppServiceEnvironmentUpgradePreference? upgradePreference, int? dedicatedHostCount, bool? isZoneRedundant, CustomDnsSuffixConfigurationData customDnsSuffixConfiguration, AseV3NetworkingConfigurationData networkingConfiguration, AppServiceEnvironmentUpgradeAvailability? upgradeAvailability, IDictionary serializedAdditionalRawData) { ProvisioningState = provisioningState; Status = status; @@ -94,8 +98,12 @@ internal AppServiceEnvironmentProperties(ProvisioningState? provisioningState, H ClusterSettings = clusterSettings; UserWhitelistedIPRanges = userWhitelistedIPRanges; HasLinuxWorkers = hasLinuxWorkers; + UpgradePreference = upgradePreference; DedicatedHostCount = dedicatedHostCount; IsZoneRedundant = isZoneRedundant; + CustomDnsSuffixConfiguration = customDnsSuffixConfiguration; + NetworkingConfiguration = networkingConfiguration; + UpgradeAvailability = upgradeAvailability; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -149,11 +157,23 @@ internal AppServiceEnvironmentProperties() /// Flag that displays whether an ASE has linux workers or not. [WirePath("hasLinuxWorkers")] public bool? HasLinuxWorkers { get; } + /// Upgrade Preference. + [WirePath("upgradePreference")] + public AppServiceEnvironmentUpgradePreference? UpgradePreference { get; set; } /// Dedicated Host Count. [WirePath("dedicatedHostCount")] public int? DedicatedHostCount { get; set; } /// Whether or not this App Service Environment is zone-redundant. [WirePath("zoneRedundant")] public bool? IsZoneRedundant { get; set; } + /// Full view of the custom domain suffix configuration for ASEv3. + [WirePath("customDnsSuffixConfiguration")] + public CustomDnsSuffixConfigurationData CustomDnsSuffixConfiguration { get; set; } + /// Full view of networking configuration for an ASE. + [WirePath("networkingConfiguration")] + public AseV3NetworkingConfigurationData NetworkingConfiguration { get; set; } + /// Whether an upgrade is available for this App Service Environment. + [WirePath("upgradeAvailability")] + public AppServiceEnvironmentUpgradeAvailability? UpgradeAvailability { get; } } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentUpgradeAvailability.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentUpgradeAvailability.cs new file mode 100644 index 0000000000000..cdf31ca0089c6 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentUpgradeAvailability.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.AppService.Models +{ + /// Whether an upgrade is available for this App Service Environment. + public readonly partial struct AppServiceEnvironmentUpgradeAvailability : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AppServiceEnvironmentUpgradeAvailability(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string ReadyValue = "Ready"; + + /// No upgrade is currently available for this App Service Environment. + public static AppServiceEnvironmentUpgradeAvailability None { get; } = new AppServiceEnvironmentUpgradeAvailability(NoneValue); + /// An upgrade is ready to be manually initiated on this App Service Environment. + public static AppServiceEnvironmentUpgradeAvailability Ready { get; } = new AppServiceEnvironmentUpgradeAvailability(ReadyValue); + /// Determines if two values are the same. + public static bool operator ==(AppServiceEnvironmentUpgradeAvailability left, AppServiceEnvironmentUpgradeAvailability right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AppServiceEnvironmentUpgradeAvailability left, AppServiceEnvironmentUpgradeAvailability right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AppServiceEnvironmentUpgradeAvailability(string value) => new AppServiceEnvironmentUpgradeAvailability(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AppServiceEnvironmentUpgradeAvailability other && Equals(other); + /// + public bool Equals(AppServiceEnvironmentUpgradeAvailability other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentUpgradePreference.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentUpgradePreference.cs new file mode 100644 index 0000000000000..3a56a7209458f --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceEnvironmentUpgradePreference.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Upgrade Preference. + public readonly partial struct AppServiceEnvironmentUpgradePreference : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AppServiceEnvironmentUpgradePreference(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string EarlyValue = "Early"; + private const string LateValue = "Late"; + private const string ManualValue = "Manual"; + + /// No preference on when this App Service Environment will be upgraded. + public static AppServiceEnvironmentUpgradePreference None { get; } = new AppServiceEnvironmentUpgradePreference(NoneValue); + /// This App Service Environment will be upgraded before others in the same region that have Upgrade Preference 'Late'. + public static AppServiceEnvironmentUpgradePreference Early { get; } = new AppServiceEnvironmentUpgradePreference(EarlyValue); + /// This App Service Environment will be upgraded after others in the same region that have Upgrade Preference 'Early'. + public static AppServiceEnvironmentUpgradePreference Late { get; } = new AppServiceEnvironmentUpgradePreference(LateValue); + /// ASEv3 only. Once an upgrade is available, this App Service Environment will wait 10 days for the upgrade to be manually initiated. After 10 days the upgrade will begin automatically. + public static AppServiceEnvironmentUpgradePreference Manual { get; } = new AppServiceEnvironmentUpgradePreference(ManualValue); + /// Determines if two values are the same. + public static bool operator ==(AppServiceEnvironmentUpgradePreference left, AppServiceEnvironmentUpgradePreference right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AppServiceEnvironmentUpgradePreference left, AppServiceEnvironmentUpgradePreference right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AppServiceEnvironmentUpgradePreference(string value) => new AppServiceEnvironmentUpgradePreference(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AppServiceEnvironmentUpgradePreference other && Equals(other); + /// + public bool Equals(AppServiceEnvironmentUpgradePreference other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceKind.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceKind.cs new file mode 100644 index 0000000000000..c374d40533409 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceKind.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.AppService.Models +{ + /// The workflow kind. + public readonly partial struct AppServiceKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AppServiceKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StatefulValue = "Stateful"; + private const string StatelessValue = "Stateless"; + + /// Stateful. + public static AppServiceKind Stateful { get; } = new AppServiceKind(StatefulValue); + /// Stateless. + public static AppServiceKind Stateless { get; } = new AppServiceKind(StatelessValue); + /// Determines if two values are the same. + public static bool operator ==(AppServiceKind left, AppServiceKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AppServiceKind left, AppServiceKind right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AppServiceKind(string value) => new AppServiceKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AppServiceKind other && Equals(other); + /// + public bool Equals(AppServiceKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceOperation.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceOperation.Serialization.cs index 8f85055ff01e9..0132e70c048e9 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceOperation.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceOperation.Serialization.cs @@ -49,6 +49,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteStartArray(); foreach (var item in Errors) { + if (item == null) + { + writer.WriteNullValue(); + continue; + } JsonSerializer.Serialize(writer, item); } writer.WriteEndArray(); @@ -151,7 +156,14 @@ internal static AppServiceOperation DeserializeAppServiceOperation(JsonElement e List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(JsonSerializer.Deserialize(item.GetRawText())); + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(JsonSerializer.Deserialize(item.GetRawText())); + } } errors = array; continue; @@ -298,7 +310,12 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) builder.AppendLine("["); foreach (var item in Errors) { - BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " errors: "); + if (item == null) + { + builder.Append("null"); + continue; + } + builder.AppendLine($" '{item.ToString()}'"); } builder.AppendLine(" ]"); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceOperation.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceOperation.cs index 46d4e57b94b24..58b6ecd6707c7 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceOperation.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceOperation.cs @@ -83,9 +83,6 @@ internal AppServiceOperation(string id, string name, AppServiceOperationStatus? /// The current status of the operation. [WirePath("status")] public AppServiceOperationStatus? Status { get; } - /// Any errors associate with the operation. - [WirePath("errors")] - public IReadOnlyList Errors { get; } /// Time when operation has started. [WirePath("createdTime")] public DateTimeOffset? CreatedOn { get; } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServicePlanPatch.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServicePlanPatch.Serialization.cs index 577ad88732779..035f86eee8a97 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServicePlanPatch.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServicePlanPatch.Serialization.cs @@ -80,6 +80,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("maximumNumberOfWorkers"u8); writer.WriteNumberValue(MaximumNumberOfWorkers.Value); } + if (options.Format != "W" && Optional.IsDefined(NumberOfWorkers)) + { + writer.WritePropertyName("numberOfWorkers"u8); + writer.WriteNumberValue(NumberOfWorkers.Value); + } if (options.Format != "W" && Optional.IsDefined(GeoRegion)) { writer.WritePropertyName("geoRegion"u8); @@ -214,6 +219,7 @@ internal static AppServicePlanPatch DeserializeAppServicePlanPatch(JsonElement e string subscription = default; HostingEnvironmentProfile hostingEnvironmentProfile = default; int? maximumNumberOfWorkers = default; + int? numberOfWorkers = default; string geoRegion = default; bool? perSiteScaling = default; bool? elasticScaleEnabled = default; @@ -310,6 +316,15 @@ internal static AppServicePlanPatch DeserializeAppServicePlanPatch(JsonElement e maximumNumberOfWorkers = property0.Value.GetInt32(); continue; } + if (property0.NameEquals("numberOfWorkers"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + numberOfWorkers = property0.Value.GetInt32(); + continue; + } if (property0.NameEquals("geoRegion"u8)) { geoRegion = property0.Value.GetString(); @@ -474,6 +489,7 @@ internal static AppServicePlanPatch DeserializeAppServicePlanPatch(JsonElement e subscription, hostingEnvironmentProfile, maximumNumberOfWorkers, + numberOfWorkers, geoRegion, perSiteScaling, elasticScaleEnabled, @@ -675,6 +691,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NumberOfWorkers), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" numberOfWorkers: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NumberOfWorkers)) + { + builder.Append(" numberOfWorkers: "); + builder.AppendLine($"{NumberOfWorkers.Value}"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GeoRegion), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServicePlanPatch.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServicePlanPatch.cs index b68b0fc9218c6..a9acd038eafd2 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServicePlanPatch.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServicePlanPatch.cs @@ -62,6 +62,7 @@ public AppServicePlanPatch() /// App Service plan subscription. /// Specification for the App Service Environment to use for the App Service plan. /// Maximum number of instances that can be assigned to this App Service plan. + /// The number of instances that are assigned to this App Service plan. /// Geographical location for the App Service plan. /// /// If <code>true</code>, apps assigned to this App Service plan can be scaled independently. @@ -87,13 +88,14 @@ public AppServicePlanPatch() /// /// Kind of resource. /// Keeps track of any properties unknown to the library. - internal AppServicePlanPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string workerTierName, AppServicePlanStatus? status, string subscription, HostingEnvironmentProfile hostingEnvironmentProfile, int? maximumNumberOfWorkers, string geoRegion, bool? isPerSiteScaling, bool? isElasticScaleEnabled, int? maximumElasticWorkerCount, int? numberOfSites, bool? isSpot, DateTimeOffset? spotExpirationOn, DateTimeOffset? freeOfferExpirationOn, string resourceGroup, bool? isReserved, bool? isXenon, bool? isHyperV, int? targetWorkerCount, int? targetWorkerSizeId, ProvisioningState? provisioningState, KubeEnvironmentProfile kubeEnvironmentProfile, bool? isZoneRedundant, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal AppServicePlanPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string workerTierName, AppServicePlanStatus? status, string subscription, HostingEnvironmentProfile hostingEnvironmentProfile, int? maximumNumberOfWorkers, int? numberOfWorkers, string geoRegion, bool? isPerSiteScaling, bool? isElasticScaleEnabled, int? maximumElasticWorkerCount, int? numberOfSites, bool? isSpot, DateTimeOffset? spotExpirationOn, DateTimeOffset? freeOfferExpirationOn, string resourceGroup, bool? isReserved, bool? isXenon, bool? isHyperV, int? targetWorkerCount, int? targetWorkerSizeId, ProvisioningState? provisioningState, KubeEnvironmentProfile kubeEnvironmentProfile, bool? isZoneRedundant, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { WorkerTierName = workerTierName; Status = status; Subscription = subscription; HostingEnvironmentProfile = hostingEnvironmentProfile; MaximumNumberOfWorkers = maximumNumberOfWorkers; + NumberOfWorkers = numberOfWorkers; GeoRegion = geoRegion; IsPerSiteScaling = isPerSiteScaling; IsElasticScaleEnabled = isElasticScaleEnabled; @@ -130,6 +132,9 @@ internal AppServicePlanPatch(ResourceIdentifier id, string name, ResourceType re /// Maximum number of instances that can be assigned to this App Service plan. [WirePath("properties.maximumNumberOfWorkers")] public int? MaximumNumberOfWorkers { get; } + /// The number of instances that are assigned to this App Service plan. + [WirePath("properties.numberOfWorkers")] + public int? NumberOfWorkers { get; } /// Geographical location for the App Service plan. [WirePath("properties.geoRegion")] public string GeoRegion { get; } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceSkuName.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceSkuName.cs index e798b34de2fd0..e0f8208fd85ab 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceSkuName.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceSkuName.cs @@ -35,6 +35,7 @@ public AppServiceSkuName(string value) private const string PremiumContainerValue = "PremiumContainer"; private const string ElasticPremiumValue = "ElasticPremium"; private const string ElasticIsolatedValue = "ElasticIsolated"; + private const string FlexConsumptionValue = "FlexConsumption"; /// Free. public static AppServiceSkuName Free { get; } = new AppServiceSkuName(FreeValue); @@ -62,6 +63,8 @@ public AppServiceSkuName(string value) public static AppServiceSkuName ElasticPremium { get; } = new AppServiceSkuName(ElasticPremiumValue); /// ElasticIsolated. public static AppServiceSkuName ElasticIsolated { get; } = new AppServiceSkuName(ElasticIsolatedValue); + /// FlexConsumption. + public static AppServiceSkuName FlexConsumption { get; } = new AppServiceSkuName(FlexConsumptionValue); /// Determines if two values are the same. public static bool operator ==(AppServiceSkuName left, AppServiceSkuName right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceStorageAccessInfo.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceStorageAccessInfo.Serialization.cs index 7bd0d0f52b942..af218991832ca 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceStorageAccessInfo.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceStorageAccessInfo.Serialization.cs @@ -57,6 +57,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WritePropertyName("state"u8); writer.WriteStringValue(State.Value.ToSerialString()); } + if (Optional.IsDefined(Protocol)) + { + writer.WritePropertyName("protocol"u8); + writer.WriteStringValue(Protocol.Value.ToString()); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -101,6 +106,7 @@ internal static AppServiceStorageAccessInfo DeserializeAppServiceStorageAccessIn string accessKey = default; string mountPath = default; AppServiceStorageAccountState? state = default; + AppServiceStorageProtocol? protocol = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -143,6 +149,15 @@ internal static AppServiceStorageAccessInfo DeserializeAppServiceStorageAccessIn state = property.Value.GetString().ToAppServiceStorageAccountState(); continue; } + if (property.NameEquals("protocol"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + protocol = new AppServiceStorageProtocol(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -156,6 +171,7 @@ internal static AppServiceStorageAccessInfo DeserializeAppServiceStorageAccessIn accessKey, mountPath, state, + protocol, serializedAdditionalRawData); } @@ -292,6 +308,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Protocol), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" protocol: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Protocol)) + { + builder.Append(" protocol: "); + builder.AppendLine($"'{Protocol.Value.ToString()}'"); + } + } + builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceStorageAccessInfo.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceStorageAccessInfo.cs index 825ca9507713c..9ce629526b2d6 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceStorageAccessInfo.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceStorageAccessInfo.cs @@ -57,8 +57,9 @@ public AppServiceStorageAccessInfo() /// Access key for the storage account. /// Path to mount the storage within the site's runtime environment. /// State of the storage account. + /// Mounting protocol to use for the storage account. /// Keeps track of any properties unknown to the library. - internal AppServiceStorageAccessInfo(AppServiceStorageType? storageType, string accountName, string shareName, string accessKey, string mountPath, AppServiceStorageAccountState? state, IDictionary serializedAdditionalRawData) + internal AppServiceStorageAccessInfo(AppServiceStorageType? storageType, string accountName, string shareName, string accessKey, string mountPath, AppServiceStorageAccountState? state, AppServiceStorageProtocol? protocol, IDictionary serializedAdditionalRawData) { StorageType = storageType; AccountName = accountName; @@ -66,6 +67,7 @@ internal AppServiceStorageAccessInfo(AppServiceStorageType? storageType, string AccessKey = accessKey; MountPath = mountPath; State = state; + Protocol = protocol; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -87,5 +89,8 @@ internal AppServiceStorageAccessInfo(AppServiceStorageType? storageType, string /// State of the storage account. [WirePath("state")] public AppServiceStorageAccountState? State { get; } + /// Mounting protocol to use for the storage account. + [WirePath("protocol")] + public AppServiceStorageProtocol? Protocol { get; set; } } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceStorageProtocol.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceStorageProtocol.cs new file mode 100644 index 0000000000000..7f99ac5a60fb9 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceStorageProtocol.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.AppService.Models +{ + /// Mounting protocol to use for the storage account. + public readonly partial struct AppServiceStorageProtocol : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AppServiceStorageProtocol(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SmbValue = "Smb"; + private const string HttpValue = "Http"; + private const string NfsValue = "Nfs"; + + /// Smb. + public static AppServiceStorageProtocol Smb { get; } = new AppServiceStorageProtocol(SmbValue); + /// Http. + public static AppServiceStorageProtocol Http { get; } = new AppServiceStorageProtocol(HttpValue); + /// Nfs. + public static AppServiceStorageProtocol Nfs { get; } = new AppServiceStorageProtocol(NfsValue); + /// Determines if two values are the same. + public static bool operator ==(AppServiceStorageProtocol left, AppServiceStorageProtocol right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AppServiceStorageProtocol left, AppServiceStorageProtocol right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AppServiceStorageProtocol(string value) => new AppServiceStorageProtocol(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AppServiceStorageProtocol other && Equals(other); + /// + public bool Equals(AppServiceStorageProtocol other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceSupportedTlsVersion.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceSupportedTlsVersion.cs index 68fb8f7896801..cff486fc89fa0 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceSupportedTlsVersion.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceSupportedTlsVersion.cs @@ -25,6 +25,9 @@ public AppServiceSupportedTlsVersion(string value) private const string Tls1_0Value = "1.0"; private const string Tls1_1Value = "1.1"; private const string Tls1_2Value = "1.2"; + private const string One3Value = "1.3"; + /// 1.3. + public static AppServiceSupportedTlsVersion One3 { get; } = new AppServiceSupportedTlsVersion(One3Value); /// Determines if two values are the same. public static bool operator ==(AppServiceSupportedTlsVersion left, AppServiceSupportedTlsVersion right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceTlsCipherSuite.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceTlsCipherSuite.cs new file mode 100644 index 0000000000000..e9f9b240407e2 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceTlsCipherSuite.cs @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The minimum strength TLS cipher suite allowed for an application. + public readonly partial struct AppServiceTlsCipherSuite : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AppServiceTlsCipherSuite(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TlsAes256GcmSha384Value = "TLS_AES_256_GCM_SHA384"; + private const string TlsAes128GcmSha256Value = "TLS_AES_128_GCM_SHA256"; + private const string TlsECDiffieHellmanECDsaWithAes256GcmSha384Value = "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"; + private const string TlsECDiffieHellmanECDsaWithAes128CbcSha256Value = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256"; + private const string TlsECDiffieHellmanECDsaWithAes128GcmSha256Value = "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256"; + private const string TlsECDiffieHellmanRsaWithAes256GcmSha384Value = "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"; + private const string TlsECDiffieHellmanRsaWithAes128GcmSha256Value = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"; + private const string TlsECDiffieHellmanRsaWithAes256CbcSha384Value = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384"; + private const string TlsECDiffieHellmanRsaWithAes128CbcSha256Value = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"; + private const string TlsECDiffieHellmanRsaWithAes256CbcShaValue = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA"; + private const string TlsECDiffieHellmanRsaWithAes128CbcShaValue = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA"; + private const string TlsRsaWithAes256GcmSha384Value = "TLS_RSA_WITH_AES_256_GCM_SHA384"; + private const string TlsRsaWithAes128GcmSha256Value = "TLS_RSA_WITH_AES_128_GCM_SHA256"; + private const string TlsRsaWithAes256CbcSha256Value = "TLS_RSA_WITH_AES_256_CBC_SHA256"; + private const string TlsRsaWithAes128CbcSha256Value = "TLS_RSA_WITH_AES_128_CBC_SHA256"; + private const string TlsRsaWithAes256CbcShaValue = "TLS_RSA_WITH_AES_256_CBC_SHA"; + private const string TlsRsaWithAes128CbcShaValue = "TLS_RSA_WITH_AES_128_CBC_SHA"; + + /// TLS_AES_256_GCM_SHA384. + public static AppServiceTlsCipherSuite TlsAes256GcmSha384 { get; } = new AppServiceTlsCipherSuite(TlsAes256GcmSha384Value); + /// TLS_AES_128_GCM_SHA256. + public static AppServiceTlsCipherSuite TlsAes128GcmSha256 { get; } = new AppServiceTlsCipherSuite(TlsAes128GcmSha256Value); + /// TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384. + public static AppServiceTlsCipherSuite TlsECDiffieHellmanECDsaWithAes256GcmSha384 { get; } = new AppServiceTlsCipherSuite(TlsECDiffieHellmanECDsaWithAes256GcmSha384Value); + /// TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256. + public static AppServiceTlsCipherSuite TlsECDiffieHellmanECDsaWithAes128CbcSha256 { get; } = new AppServiceTlsCipherSuite(TlsECDiffieHellmanECDsaWithAes128CbcSha256Value); + /// TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256. + public static AppServiceTlsCipherSuite TlsECDiffieHellmanECDsaWithAes128GcmSha256 { get; } = new AppServiceTlsCipherSuite(TlsECDiffieHellmanECDsaWithAes128GcmSha256Value); + /// TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384. + public static AppServiceTlsCipherSuite TlsECDiffieHellmanRsaWithAes256GcmSha384 { get; } = new AppServiceTlsCipherSuite(TlsECDiffieHellmanRsaWithAes256GcmSha384Value); + /// TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256. + public static AppServiceTlsCipherSuite TlsECDiffieHellmanRsaWithAes128GcmSha256 { get; } = new AppServiceTlsCipherSuite(TlsECDiffieHellmanRsaWithAes128GcmSha256Value); + /// TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384. + public static AppServiceTlsCipherSuite TlsECDiffieHellmanRsaWithAes256CbcSha384 { get; } = new AppServiceTlsCipherSuite(TlsECDiffieHellmanRsaWithAes256CbcSha384Value); + /// TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256. + public static AppServiceTlsCipherSuite TlsECDiffieHellmanRsaWithAes128CbcSha256 { get; } = new AppServiceTlsCipherSuite(TlsECDiffieHellmanRsaWithAes128CbcSha256Value); + /// TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA. + public static AppServiceTlsCipherSuite TlsECDiffieHellmanRsaWithAes256CbcSha { get; } = new AppServiceTlsCipherSuite(TlsECDiffieHellmanRsaWithAes256CbcShaValue); + /// TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA. + public static AppServiceTlsCipherSuite TlsECDiffieHellmanRsaWithAes128CbcSha { get; } = new AppServiceTlsCipherSuite(TlsECDiffieHellmanRsaWithAes128CbcShaValue); + /// TLS_RSA_WITH_AES_256_GCM_SHA384. + public static AppServiceTlsCipherSuite TlsRsaWithAes256GcmSha384 { get; } = new AppServiceTlsCipherSuite(TlsRsaWithAes256GcmSha384Value); + /// TLS_RSA_WITH_AES_128_GCM_SHA256. + public static AppServiceTlsCipherSuite TlsRsaWithAes128GcmSha256 { get; } = new AppServiceTlsCipherSuite(TlsRsaWithAes128GcmSha256Value); + /// TLS_RSA_WITH_AES_256_CBC_SHA256. + public static AppServiceTlsCipherSuite TlsRsaWithAes256CbcSha256 { get; } = new AppServiceTlsCipherSuite(TlsRsaWithAes256CbcSha256Value); + /// TLS_RSA_WITH_AES_128_CBC_SHA256. + public static AppServiceTlsCipherSuite TlsRsaWithAes128CbcSha256 { get; } = new AppServiceTlsCipherSuite(TlsRsaWithAes128CbcSha256Value); + /// TLS_RSA_WITH_AES_256_CBC_SHA. + public static AppServiceTlsCipherSuite TlsRsaWithAes256CbcSha { get; } = new AppServiceTlsCipherSuite(TlsRsaWithAes256CbcShaValue); + /// TLS_RSA_WITH_AES_128_CBC_SHA. + public static AppServiceTlsCipherSuite TlsRsaWithAes128CbcSha { get; } = new AppServiceTlsCipherSuite(TlsRsaWithAes128CbcShaValue); + /// Determines if two values are the same. + public static bool operator ==(AppServiceTlsCipherSuite left, AppServiceTlsCipherSuite right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AppServiceTlsCipherSuite left, AppServiceTlsCipherSuite right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AppServiceTlsCipherSuite(string value) => new AppServiceTlsCipherSuite(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AppServiceTlsCipherSuite other && Equals(other); + /// + public bool Equals(AppServiceTlsCipherSuite other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AseRegionCollection.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AseRegionCollection.Serialization.cs new file mode 100644 index 0000000000000..d79d51957067f --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AseRegionCollection.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class AseRegionCollection : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AseRegionCollection)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + AseRegionCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AseRegionCollection)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAseRegionCollection(document.RootElement, options); + } + + internal static AseRegionCollection DeserializeAseRegionCollection(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AppServiceAseRegion.DeserializeAppServiceAseRegion(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AseRegionCollection(value, nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(AseRegionCollection)} does not support writing '{options.Format}' format."); + } + } + + AseRegionCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeAseRegionCollection(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AseRegionCollection)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AseRegionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AseRegionCollection.cs new file mode 100644 index 0000000000000..3472ea406358e --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AseRegionCollection.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Collection of ASE regions. + internal partial class AseRegionCollection + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Collection of resources. + /// is null. + internal AseRegionCollection(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// Collection of resources. + /// Link to next page of resources. + /// Keeps track of any properties unknown to the library. + internal AseRegionCollection(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AseRegionCollection() + { + } + + /// Collection of resources. + public IReadOnlyList Value { get; } + /// Link to next page of resources. + public string NextLink { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CertificateOrderAction.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CertificateOrderAction.Serialization.cs index fef8ef883c631..db136e5e28fb2 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CertificateOrderAction.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CertificateOrderAction.Serialization.cs @@ -28,10 +28,15 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader } writer.WriteStartObject(); - if (Optional.IsDefined(Kind)) + if (options.Format != "W" && Optional.IsDefined(ActionType)) + { + writer.WritePropertyName("actionType"u8); + writer.WriteStringValue(ActionType.Value.ToSerialString()); + } + if (options.Format != "W" && Optional.IsDefined(CreatedOn)) { - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind); + writer.WritePropertyName("createdAt"u8); + writer.WriteStringValue(CreatedOn.Value, "O"); } if (options.Format != "W") { @@ -53,19 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WritePropertyName("systemData"u8); JsonSerializer.Serialize(writer, SystemData); } - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(ActionType)) - { - writer.WritePropertyName("actionType"u8); - writer.WriteStringValue(ActionType.Value.ToSerialString()); - } - if (options.Format != "W" && Optional.IsDefined(CreatedOn)) - { - writer.WritePropertyName("createdAt"u8); - writer.WriteStringValue(CreatedOn.Value, "O"); - } - writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -104,20 +96,32 @@ internal static CertificateOrderAction DeserializeCertificateOrderAction(JsonEle { return null; } - string kind = default; + CertificateOrderActionType? actionType = default; + DateTimeOffset? createdAt = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; SystemData systemData = default; - CertificateOrderActionType? actionType = default; - DateTimeOffset? createdAt = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("kind"u8)) + if (property.NameEquals("actionType"u8)) { - kind = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + actionType = property.Value.GetString().ToCertificateOrderActionType(); + continue; + } + if (property.NameEquals("createdAt"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createdAt = property.Value.GetDateTimeOffset("O"); continue; } if (property.NameEquals("id"u8)) @@ -144,36 +148,6 @@ internal static CertificateOrderAction DeserializeCertificateOrderAction(JsonEle systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("actionType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - actionType = property0.Value.GetString().ToCertificateOrderActionType(); - continue; - } - if (property0.NameEquals("createdAt"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - createdAt = property0.Value.GetDateTimeOffset("O"); - continue; - } - } - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -187,7 +161,6 @@ internal static CertificateOrderAction DeserializeCertificateOrderAction(JsonEle systemData, actionType, createdAt, - kind, serializedAdditionalRawData); } @@ -225,93 +198,67 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Kind), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" kind: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Kind)) - { - builder.Append(" kind: "); - if (Kind.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{Kind}'''"); - } - else - { - builder.AppendLine($"'{Kind}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ActionType), out propertyOverride); if (hasPropertyOverride) { - builder.Append(" id: "); + builder.Append(" actionType: "); builder.AppendLine(propertyOverride); } else { - if (Optional.IsDefined(Id)) + if (Optional.IsDefined(ActionType)) { - builder.Append(" id: "); - builder.AppendLine($"'{Id.ToString()}'"); + builder.Append(" actionType: "); + builder.AppendLine($"'{ActionType.Value.ToSerialString()}'"); } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CreatedOn), out propertyOverride); if (hasPropertyOverride) { - builder.Append(" systemData: "); + builder.Append(" createdAt: "); builder.AppendLine(propertyOverride); } else { - if (Optional.IsDefined(SystemData)) + if (Optional.IsDefined(CreatedOn)) { - builder.Append(" systemData: "); - builder.AppendLine($"'{SystemData.ToString()}'"); + builder.Append(" createdAt: "); + var formattedDateTimeString = TypeFormatters.ToString(CreatedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); } } - builder.Append(" properties:"); - builder.AppendLine(" {"); - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ActionType), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); if (hasPropertyOverride) { - builder.Append(" actionType: "); + builder.Append(" id: "); builder.AppendLine(propertyOverride); } else { - if (Optional.IsDefined(ActionType)) + if (Optional.IsDefined(Id)) { - builder.Append(" actionType: "); - builder.AppendLine($"'{ActionType.Value.ToSerialString()}'"); + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CreatedOn), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); if (hasPropertyOverride) { - builder.Append(" createdAt: "); + builder.Append(" systemData: "); builder.AppendLine(propertyOverride); } else { - if (Optional.IsDefined(CreatedOn)) + if (Optional.IsDefined(SystemData)) { - builder.Append(" createdAt: "); - var formattedDateTimeString = TypeFormatters.ToString(CreatedOn.Value, "o"); - builder.AppendLine($"'{formattedDateTimeString}'"); + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); } } - builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CertificateOrderAction.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CertificateOrderAction.cs index 9d50465b51b08..57b0ee2d63f3f 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CertificateOrderAction.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CertificateOrderAction.cs @@ -59,24 +59,19 @@ public CertificateOrderAction() /// The systemData. /// Action type. /// Time at which the certificate action was performed. - /// Kind of resource. /// Keeps track of any properties unknown to the library. - internal CertificateOrderAction(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, CertificateOrderActionType? actionType, DateTimeOffset? createdOn, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal CertificateOrderAction(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, CertificateOrderActionType? actionType, DateTimeOffset? createdOn, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { ActionType = actionType; CreatedOn = createdOn; - Kind = kind; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Action type. - [WirePath("properties.actionType")] + [WirePath("actionType")] public CertificateOrderActionType? ActionType { get; } /// Time at which the certificate action was performed. - [WirePath("properties.createdAt")] + [WirePath("createdAt")] public DateTimeOffset? CreatedOn { get; } - /// Kind of resource. - [WirePath("kind")] - public string Kind { get; set; } } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ContainerAppsConfiguration.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ContainerAppsConfiguration.Serialization.cs new file mode 100644 index 0000000000000..4b5738584bbbc --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ContainerAppsConfiguration.Serialization.cs @@ -0,0 +1,340 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class ContainerAppsConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerAppsConfiguration)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(DaprAIInstrumentationKey)) + { + writer.WritePropertyName("daprAIInstrumentationKey"u8); + writer.WriteStringValue(DaprAIInstrumentationKey); + } + if (Optional.IsDefined(PlatformReservedCidr)) + { + writer.WritePropertyName("platformReservedCidr"u8); + writer.WriteStringValue(PlatformReservedCidr); + } + if (Optional.IsDefined(PlatformReservedDnsIP)) + { + writer.WritePropertyName("platformReservedDnsIP"u8); + writer.WriteStringValue(PlatformReservedDnsIP); + } + if (Optional.IsDefined(ControlPlaneSubnetResourceId)) + { + writer.WritePropertyName("controlPlaneSubnetResourceId"u8); + writer.WriteStringValue(ControlPlaneSubnetResourceId); + } + if (Optional.IsDefined(AppSubnetResourceId)) + { + writer.WritePropertyName("appSubnetResourceId"u8); + writer.WriteStringValue(AppSubnetResourceId); + } + if (Optional.IsDefined(DockerBridgeCidr)) + { + writer.WritePropertyName("dockerBridgeCidr"u8); + writer.WriteStringValue(DockerBridgeCidr); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ContainerAppsConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ContainerAppsConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeContainerAppsConfiguration(document.RootElement, options); + } + + internal static ContainerAppsConfiguration DeserializeContainerAppsConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string daprAIInstrumentationKey = default; + string platformReservedCidr = default; + string platformReservedDnsIP = default; + string controlPlaneSubnetResourceId = default; + string appSubnetResourceId = default; + string dockerBridgeCidr = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("daprAIInstrumentationKey"u8)) + { + daprAIInstrumentationKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("platformReservedCidr"u8)) + { + platformReservedCidr = property.Value.GetString(); + continue; + } + if (property.NameEquals("platformReservedDnsIP"u8)) + { + platformReservedDnsIP = property.Value.GetString(); + continue; + } + if (property.NameEquals("controlPlaneSubnetResourceId"u8)) + { + controlPlaneSubnetResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("appSubnetResourceId"u8)) + { + appSubnetResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("dockerBridgeCidr"u8)) + { + dockerBridgeCidr = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ContainerAppsConfiguration( + daprAIInstrumentationKey, + platformReservedCidr, + platformReservedDnsIP, + controlPlaneSubnetResourceId, + appSubnetResourceId, + dockerBridgeCidr, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DaprAIInstrumentationKey), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" daprAIInstrumentationKey: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DaprAIInstrumentationKey)) + { + builder.Append(" daprAIInstrumentationKey: "); + if (DaprAIInstrumentationKey.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DaprAIInstrumentationKey}'''"); + } + else + { + builder.AppendLine($"'{DaprAIInstrumentationKey}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PlatformReservedCidr), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" platformReservedCidr: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PlatformReservedCidr)) + { + builder.Append(" platformReservedCidr: "); + if (PlatformReservedCidr.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PlatformReservedCidr}'''"); + } + else + { + builder.AppendLine($"'{PlatformReservedCidr}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PlatformReservedDnsIP), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" platformReservedDnsIP: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PlatformReservedDnsIP)) + { + builder.Append(" platformReservedDnsIP: "); + if (PlatformReservedDnsIP.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PlatformReservedDnsIP}'''"); + } + else + { + builder.AppendLine($"'{PlatformReservedDnsIP}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ControlPlaneSubnetResourceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" controlPlaneSubnetResourceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ControlPlaneSubnetResourceId)) + { + builder.Append(" controlPlaneSubnetResourceId: "); + if (ControlPlaneSubnetResourceId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ControlPlaneSubnetResourceId}'''"); + } + else + { + builder.AppendLine($"'{ControlPlaneSubnetResourceId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AppSubnetResourceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" appSubnetResourceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AppSubnetResourceId)) + { + builder.Append(" appSubnetResourceId: "); + if (AppSubnetResourceId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AppSubnetResourceId}'''"); + } + else + { + builder.AppendLine($"'{AppSubnetResourceId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DockerBridgeCidr), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" dockerBridgeCidr: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DockerBridgeCidr)) + { + builder.Append(" dockerBridgeCidr: "); + if (DockerBridgeCidr.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DockerBridgeCidr}'''"); + } + else + { + builder.AppendLine($"'{DockerBridgeCidr}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ContainerAppsConfiguration)} does not support writing '{options.Format}' format."); + } + } + + ContainerAppsConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeContainerAppsConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ContainerAppsConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ContainerAppsConfiguration.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ContainerAppsConfiguration.cs new file mode 100644 index 0000000000000..670f50ccdef55 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ContainerAppsConfiguration.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The ContainerAppsConfiguration. + public partial class ContainerAppsConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ContainerAppsConfiguration() + { + } + + /// Initializes a new instance of . + /// Azure Monitor instrumentation key used by Dapr to export Service to Service communication telemetry. + /// IP range in CIDR notation that can be reserved for environment infrastructure IP addresses. It must not overlap with any other Subnet IP ranges. + /// An IP address from the IP range defined by platformReservedCidr that will be reserved for the internal DNS server. + /// Resource ID of a subnet for control plane infrastructure components. This subnet must be in the same VNET as the subnet defined in appSubnetResourceId. Must not overlap with the IP range defined in platformReservedCidr, if defined. + /// Resource ID of a subnet for control plane infrastructure components. This subnet must be in the same VNET as the subnet defined in appSubnetResourceId. Must not overlap with the IP range defined in platformReservedCidr, if defined. + /// CIDR notation IP range assigned to the Docker bridge network. It must not overlap with any Subnet IP ranges or the IP range defined in platformReservedCidr, if defined. + /// Keeps track of any properties unknown to the library. + internal ContainerAppsConfiguration(string daprAIInstrumentationKey, string platformReservedCidr, string platformReservedDnsIP, string controlPlaneSubnetResourceId, string appSubnetResourceId, string dockerBridgeCidr, IDictionary serializedAdditionalRawData) + { + DaprAIInstrumentationKey = daprAIInstrumentationKey; + PlatformReservedCidr = platformReservedCidr; + PlatformReservedDnsIP = platformReservedDnsIP; + ControlPlaneSubnetResourceId = controlPlaneSubnetResourceId; + AppSubnetResourceId = appSubnetResourceId; + DockerBridgeCidr = dockerBridgeCidr; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Azure Monitor instrumentation key used by Dapr to export Service to Service communication telemetry. + [WirePath("daprAIInstrumentationKey")] + public string DaprAIInstrumentationKey { get; set; } + /// IP range in CIDR notation that can be reserved for environment infrastructure IP addresses. It must not overlap with any other Subnet IP ranges. + [WirePath("platformReservedCidr")] + public string PlatformReservedCidr { get; set; } + /// An IP address from the IP range defined by platformReservedCidr that will be reserved for the internal DNS server. + [WirePath("platformReservedDnsIP")] + public string PlatformReservedDnsIP { get; set; } + /// Resource ID of a subnet for control plane infrastructure components. This subnet must be in the same VNET as the subnet defined in appSubnetResourceId. Must not overlap with the IP range defined in platformReservedCidr, if defined. + [WirePath("controlPlaneSubnetResourceId")] + public string ControlPlaneSubnetResourceId { get; set; } + /// Resource ID of a subnet for control plane infrastructure components. This subnet must be in the same VNET as the subnet defined in appSubnetResourceId. Must not overlap with the IP range defined in platformReservedCidr, if defined. + [WirePath("appSubnetResourceId")] + public string AppSubnetResourceId { get; set; } + /// CIDR notation IP range assigned to the Docker bridge network. It must not overlap with any Subnet IP ranges or the IP range defined in platformReservedCidr, if defined. + [WirePath("dockerBridgeCidr")] + public string DockerBridgeCidr { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/Correlation.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/Correlation.Serialization.cs new file mode 100644 index 0000000000000..01ebb784e5c2b --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/Correlation.Serialization.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class Correlation : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(Correlation)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(ClientTrackingId)) + { + writer.WritePropertyName("clientTrackingId"u8); + writer.WriteStringValue(ClientTrackingId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + Correlation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(Correlation)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCorrelation(document.RootElement, options); + } + + internal static Correlation DeserializeCorrelation(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string clientTrackingId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("clientTrackingId"u8)) + { + clientTrackingId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new Correlation(clientTrackingId, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientTrackingId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientTrackingId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientTrackingId)) + { + builder.Append(" clientTrackingId: "); + if (ClientTrackingId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientTrackingId}'''"); + } + else + { + builder.AppendLine($"'{ClientTrackingId}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(Correlation)} does not support writing '{options.Format}' format."); + } + } + + Correlation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCorrelation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(Correlation)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/Correlation.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/Correlation.cs new file mode 100644 index 0000000000000..d85797096aaa9 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/Correlation.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The correlation property. + internal partial class Correlation + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal Correlation() + { + } + + /// Initializes a new instance of . + /// The client tracking id. + /// Keeps track of any properties unknown to the library. + internal Correlation(string clientTrackingId, IDictionary serializedAdditionalRawData) + { + ClientTrackingId = clientTrackingId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The client tracking id. + [WirePath("clientTrackingId")] + public string ClientTrackingId { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CsmDeploymentStatus.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CsmDeploymentStatus.Serialization.cs new file mode 100644 index 0000000000000..bf25eb32a5dc9 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CsmDeploymentStatus.Serialization.cs @@ -0,0 +1,577 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class CsmDeploymentStatus : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CsmDeploymentStatus)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); + } + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(DeploymentId)) + { + writer.WritePropertyName("deploymentId"u8); + writer.WriteStringValue(DeploymentId); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(NumberOfInstancesInProgress)) + { + writer.WritePropertyName("numberOfInstancesInProgress"u8); + writer.WriteNumberValue(NumberOfInstancesInProgress.Value); + } + if (Optional.IsDefined(NumberOfInstancesSuccessful)) + { + writer.WritePropertyName("numberOfInstancesSuccessful"u8); + writer.WriteNumberValue(NumberOfInstancesSuccessful.Value); + } + if (Optional.IsDefined(NumberOfInstancesFailed)) + { + writer.WritePropertyName("numberOfInstancesFailed"u8); + writer.WriteNumberValue(NumberOfInstancesFailed.Value); + } + if (Optional.IsCollectionDefined(FailedInstancesLogs)) + { + writer.WritePropertyName("failedInstancesLogs"u8); + writer.WriteStartArray(); + foreach (var item in FailedInstancesLogs) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + if (item == null) + { + writer.WriteNullValue(); + continue; + } + JsonSerializer.Serialize(writer, item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + CsmDeploymentStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CsmDeploymentStatus)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCsmDeploymentStatus(document.RootElement, options); + } + + internal static CsmDeploymentStatus DeserializeCsmDeploymentStatus(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string kind = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + string deploymentId = default; + DeploymentBuildStatus? status = default; + int? numberOfInstancesInProgress = default; + int? numberOfInstancesSuccessful = default; + int? numberOfInstancesFailed = default; + IList failedInstancesLogs = default; + IList errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kind"u8)) + { + kind = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("deploymentId"u8)) + { + deploymentId = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("status"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new DeploymentBuildStatus(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("numberOfInstancesInProgress"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + numberOfInstancesInProgress = property0.Value.GetInt32(); + continue; + } + if (property0.NameEquals("numberOfInstancesSuccessful"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + numberOfInstancesSuccessful = property0.Value.GetInt32(); + continue; + } + if (property0.NameEquals("numberOfInstancesFailed"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + numberOfInstancesFailed = property0.Value.GetInt32(); + continue; + } + if (property0.NameEquals("failedInstancesLogs"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + failedInstancesLogs = array; + continue; + } + if (property0.NameEquals("errors"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(JsonSerializer.Deserialize(item.GetRawText())); + } + } + errors = array; + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CsmDeploymentStatus( + id, + name, + type, + systemData, + deploymentId, + status, + numberOfInstancesInProgress, + numberOfInstancesSuccessful, + numberOfInstancesFailed, + failedInstancesLogs ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), + kind, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Kind), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" kind: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Kind)) + { + builder.Append(" kind: "); + if (Kind.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Kind}'''"); + } + else + { + builder.AppendLine($"'{Kind}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DeploymentId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" deploymentId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DeploymentId)) + { + builder.Append(" deploymentId: "); + if (DeploymentId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DeploymentId}'''"); + } + else + { + builder.AppendLine($"'{DeploymentId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" status: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Status)) + { + builder.Append(" status: "); + builder.AppendLine($"'{Status.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NumberOfInstancesInProgress), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" numberOfInstancesInProgress: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NumberOfInstancesInProgress)) + { + builder.Append(" numberOfInstancesInProgress: "); + builder.AppendLine($"{NumberOfInstancesInProgress.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NumberOfInstancesSuccessful), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" numberOfInstancesSuccessful: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NumberOfInstancesSuccessful)) + { + builder.Append(" numberOfInstancesSuccessful: "); + builder.AppendLine($"{NumberOfInstancesSuccessful.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NumberOfInstancesFailed), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" numberOfInstancesFailed: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NumberOfInstancesFailed)) + { + builder.Append(" numberOfInstancesFailed: "); + builder.AppendLine($"{NumberOfInstancesFailed.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(FailedInstancesLogs), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" failedInstancesLogs: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(FailedInstancesLogs)) + { + if (FailedInstancesLogs.Any()) + { + builder.Append(" failedInstancesLogs: "); + builder.AppendLine("["); + foreach (var item in FailedInstancesLogs) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Errors), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" errors: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Errors)) + { + if (Errors.Any()) + { + builder.Append(" errors: "); + builder.AppendLine("["); + foreach (var item in Errors) + { + if (item == null) + { + builder.Append("null"); + continue; + } + builder.AppendLine($" '{item.ToString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(CsmDeploymentStatus)} does not support writing '{options.Format}' format."); + } + } + + CsmDeploymentStatus IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCsmDeploymentStatus(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CsmDeploymentStatus)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CsmDeploymentStatus.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CsmDeploymentStatus.cs new file mode 100644 index 0000000000000..f84317febef87 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CsmDeploymentStatus.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Deployment status response payload. + public partial class CsmDeploymentStatus : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public CsmDeploymentStatus() + { + FailedInstancesLogs = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Deployment operation id. + /// Deployment build status. + /// Number of site instances currently being provisioned. + /// Number of site instances provisioned successfully. + /// Number of site instances failed to provision. + /// List of URLs pointing to logs for instances which failed to provision. + /// List of errors. + /// Kind of resource. + /// Keeps track of any properties unknown to the library. + internal CsmDeploymentStatus(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string deploymentId, DeploymentBuildStatus? status, int? numberOfInstancesInProgress, int? numberOfInstancesSuccessful, int? numberOfInstancesFailed, IList failedInstancesLogs, IList errors, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + DeploymentId = deploymentId; + Status = status; + NumberOfInstancesInProgress = numberOfInstancesInProgress; + NumberOfInstancesSuccessful = numberOfInstancesSuccessful; + NumberOfInstancesFailed = numberOfInstancesFailed; + FailedInstancesLogs = failedInstancesLogs; + Errors = errors; + Kind = kind; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Deployment operation id. + [WirePath("properties.deploymentId")] + public string DeploymentId { get; set; } + /// Deployment build status. + [WirePath("properties.status")] + public DeploymentBuildStatus? Status { get; set; } + /// Number of site instances currently being provisioned. + [WirePath("properties.numberOfInstancesInProgress")] + public int? NumberOfInstancesInProgress { get; set; } + /// Number of site instances provisioned successfully. + [WirePath("properties.numberOfInstancesSuccessful")] + public int? NumberOfInstancesSuccessful { get; set; } + /// Number of site instances failed to provision. + [WirePath("properties.numberOfInstancesFailed")] + public int? NumberOfInstancesFailed { get; set; } + /// List of URLs pointing to logs for instances which failed to provision. + [WirePath("properties.failedInstancesLogs")] + public IList FailedInstancesLogs { get; } + /// Kind of resource. + [WirePath("kind")] + public string Kind { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CsmDeploymentStatusCollection.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CsmDeploymentStatusCollection.Serialization.cs new file mode 100644 index 0000000000000..3599b9e6fc7a5 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CsmDeploymentStatusCollection.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class CsmDeploymentStatusCollection : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CsmDeploymentStatusCollection)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + CsmDeploymentStatusCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CsmDeploymentStatusCollection)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCsmDeploymentStatusCollection(document.RootElement, options); + } + + internal static CsmDeploymentStatusCollection DeserializeCsmDeploymentStatusCollection(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CsmDeploymentStatus.DeserializeCsmDeploymentStatus(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CsmDeploymentStatusCollection(value, nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(CsmDeploymentStatusCollection)} does not support writing '{options.Format}' format."); + } + } + + CsmDeploymentStatusCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCsmDeploymentStatusCollection(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CsmDeploymentStatusCollection)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CsmDeploymentStatusCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CsmDeploymentStatusCollection.cs new file mode 100644 index 0000000000000..8440d1f7f6eda --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CsmDeploymentStatusCollection.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Deployment status collection ARM resource. + internal partial class CsmDeploymentStatusCollection + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Collection of resources. + /// is null. + internal CsmDeploymentStatusCollection(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// Collection of resources. + /// Link to next page of resources. + /// Keeps track of any properties unknown to the library. + internal CsmDeploymentStatusCollection(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CsmDeploymentStatusCollection() + { + } + + /// Collection of resources. + public IReadOnlyList Value { get; } + /// Link to next page of resources. + public string NextLink { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomDnsSuffixProvisioningState.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomDnsSuffixProvisioningState.Serialization.cs new file mode 100644 index 0000000000000..c13df5de71968 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomDnsSuffixProvisioningState.Serialization.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.AppService.Models +{ + internal static partial class CustomDnsSuffixProvisioningStateExtensions + { + public static string ToSerialString(this CustomDnsSuffixProvisioningState value) => value switch + { + CustomDnsSuffixProvisioningState.Succeeded => "Succeeded", + CustomDnsSuffixProvisioningState.Failed => "Failed", + CustomDnsSuffixProvisioningState.Degraded => "Degraded", + CustomDnsSuffixProvisioningState.InProgress => "InProgress", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown CustomDnsSuffixProvisioningState value.") + }; + + public static CustomDnsSuffixProvisioningState ToCustomDnsSuffixProvisioningState(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Succeeded")) return CustomDnsSuffixProvisioningState.Succeeded; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Failed")) return CustomDnsSuffixProvisioningState.Failed; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Degraded")) return CustomDnsSuffixProvisioningState.Degraded; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "InProgress")) return CustomDnsSuffixProvisioningState.InProgress; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown CustomDnsSuffixProvisioningState value."); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomDnsSuffixProvisioningState.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomDnsSuffixProvisioningState.cs new file mode 100644 index 0000000000000..4dcdd4d073232 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomDnsSuffixProvisioningState.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppService.Models +{ + /// The CustomDnsSuffixProvisioningState. + public enum CustomDnsSuffixProvisioningState + { + /// Succeeded. + Succeeded, + /// Failed. + Failed, + /// Degraded. + Degraded, + /// InProgress. + InProgress + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomDomainStatus.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomDomainStatus.cs index f37c1318dcb12..6cdde79a4c6e4 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomDomainStatus.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomDomainStatus.cs @@ -28,6 +28,7 @@ public CustomDomainStatus(string value) private const string ReadyValue = "Ready"; private const string FailedValue = "Failed"; private const string DeletingValue = "Deleting"; + private const string UnhealthyValue = "Unhealthy"; /// RetrievingValidationToken. public static CustomDomainStatus RetrievingValidationToken { get; } = new CustomDomainStatus(RetrievingValidationTokenValue); @@ -41,6 +42,8 @@ public CustomDomainStatus(string value) public static CustomDomainStatus Failed { get; } = new CustomDomainStatus(FailedValue); /// Deleting. public static CustomDomainStatus Deleting { get; } = new CustomDomainStatus(DeletingValue); + /// Unhealthy. + public static CustomDomainStatus Unhealthy { get; } = new CustomDomainStatus(UnhealthyValue); /// Determines if two values are the same. public static bool operator ==(CustomDomainStatus left, CustomDomainStatus right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameAnalysisResult.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameAnalysisResult.Serialization.cs index fa141b4b97ad0..2663f2602174b 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameAnalysisResult.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameAnalysisResult.Serialization.cs @@ -513,7 +513,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) if (Optional.IsDefined(CustomDomainVerificationFailureInfo)) { builder.Append(" customDomainVerificationFailureInfo: "); - BicepSerializationHelpers.AppendChildObject(builder, CustomDomainVerificationFailureInfo, options, 4, false, " customDomainVerificationFailureInfo: "); + builder.AppendLine($"'{CustomDomainVerificationFailureInfo.ToString()}'"); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameAnalysisResult.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameAnalysisResult.cs index c8587a6012e65..4f7db866748b7 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameAnalysisResult.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameAnalysisResult.cs @@ -98,9 +98,6 @@ internal CustomHostnameAnalysisResult(ResourceIdentifier id, string name, Resour /// DNS verification test result. [WirePath("properties.customDomainVerificationTest")] public DnsVerificationTestResult? CustomDomainVerificationTest { get; } - /// Raw failure information if DNS verification fails. - [WirePath("properties.customDomainVerificationFailureInfo")] - public ResponseError CustomDomainVerificationFailureInfo { get; } /// <code>true</code> if there is a conflict on a scale unit; otherwise, <code>false</code>. [WirePath("properties.hasConflictOnScaleUnit")] public bool? HasConflictOnScaleUnit { get; } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameSites.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameSites.Serialization.cs new file mode 100644 index 0000000000000..88b06e94172a5 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameSites.Serialization.cs @@ -0,0 +1,409 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class CustomHostnameSites : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomHostnameSites)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); + } + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(CustomHostname)) + { + writer.WritePropertyName("customHostname"u8); + writer.WriteStringValue(CustomHostname); + } + if (Optional.IsDefined(Region)) + { + writer.WritePropertyName("region"u8); + writer.WriteStringValue(Region); + } + if (Optional.IsCollectionDefined(SiteResourceIds)) + { + writer.WritePropertyName("siteResourceIds"u8); + writer.WriteStartArray(); + foreach (var item in SiteResourceIds) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + CustomHostnameSites IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomHostnameSites)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomHostnameSites(document.RootElement, options); + } + + internal static CustomHostnameSites DeserializeCustomHostnameSites(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string kind = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + string customHostname = default; + string region = default; + IList siteResourceIds = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kind"u8)) + { + kind = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("customHostname"u8)) + { + customHostname = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("region"u8)) + { + region = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("siteResourceIds"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(AppServiceIdentifierData.DeserializeAppServiceIdentifierData(item, options)); + } + siteResourceIds = array; + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CustomHostnameSites( + id, + name, + type, + systemData, + customHostname, + region, + siteResourceIds ?? new ChangeTrackingList(), + kind, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Kind), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" kind: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Kind)) + { + builder.Append(" kind: "); + if (Kind.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Kind}'''"); + } + else + { + builder.AppendLine($"'{Kind}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CustomHostname), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" customHostname: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CustomHostname)) + { + builder.Append(" customHostname: "); + if (CustomHostname.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{CustomHostname}'''"); + } + else + { + builder.AppendLine($"'{CustomHostname}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Region), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" region: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Region)) + { + builder.Append(" region: "); + if (Region.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Region}'''"); + } + else + { + builder.AppendLine($"'{Region}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SiteResourceIds), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" siteResourceIds: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(SiteResourceIds)) + { + if (SiteResourceIds.Any()) + { + builder.Append(" siteResourceIds: "); + builder.AppendLine("["); + foreach (var item in SiteResourceIds) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " siteResourceIds: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(CustomHostnameSites)} does not support writing '{options.Format}' format."); + } + } + + CustomHostnameSites IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCustomHostnameSites(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomHostnameSites)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameSites.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameSites.cs new file mode 100644 index 0000000000000..4c9342791aa30 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameSites.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService.Models +{ + /// A hostname and its assigned sites. + public partial class CustomHostnameSites : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public CustomHostnameSites() + { + SiteResourceIds = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// + /// + /// Kind of resource. + /// Keeps track of any properties unknown to the library. + internal CustomHostnameSites(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string customHostname, string region, IList siteResourceIds, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + CustomHostname = customHostname; + Region = region; + SiteResourceIds = siteResourceIds; + Kind = kind; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the custom hostname. + [WirePath("properties.customHostname")] + public string CustomHostname { get; set; } + /// Gets or sets the region. + [WirePath("properties.region")] + public string Region { get; set; } + /// Gets the site resource ids. + [WirePath("properties.siteResourceIds")] + public IList SiteResourceIds { get; } + /// Kind of resource. + [WirePath("kind")] + public string Kind { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameSitesCollection.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameSitesCollection.Serialization.cs new file mode 100644 index 0000000000000..33736c6e94355 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameSitesCollection.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class CustomHostnameSitesCollection : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomHostnameSitesCollection)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + CustomHostnameSitesCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomHostnameSitesCollection)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomHostnameSitesCollection(document.RootElement, options); + } + + internal static CustomHostnameSitesCollection DeserializeCustomHostnameSitesCollection(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CustomHostnameSites.DeserializeCustomHostnameSites(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CustomHostnameSitesCollection(value, nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(CustomHostnameSitesCollection)} does not support writing '{options.Format}' format."); + } + } + + CustomHostnameSitesCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeCustomHostnameSitesCollection(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomHostnameSitesCollection)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameSitesCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameSitesCollection.cs new file mode 100644 index 0000000000000..5273527cf415a --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/CustomHostnameSitesCollection.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Collection of custom hostname sites. + internal partial class CustomHostnameSitesCollection + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Collection of resources. + /// is null. + internal CustomHostnameSitesCollection(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// Collection of resources. + /// Link to next page of resources. + /// Keeps track of any properties unknown to the library. + internal CustomHostnameSitesCollection(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CustomHostnameSitesCollection() + { + } + + /// Collection of resources. + public IReadOnlyList Value { get; } + /// Link to next page of resources. + public string NextLink { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/DatabaseConnectionCollection.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/DatabaseConnectionCollection.Serialization.cs new file mode 100644 index 0000000000000..fceb1f9e58505 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/DatabaseConnectionCollection.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class DatabaseConnectionCollection : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatabaseConnectionCollection)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + DatabaseConnectionCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatabaseConnectionCollection)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDatabaseConnectionCollection(document.RootElement, options); + } + + internal static DatabaseConnectionCollection DeserializeDatabaseConnectionCollection(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DatabaseConnectionCollection(value, nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DatabaseConnectionCollection)} does not support writing '{options.Format}' format."); + } + } + + DatabaseConnectionCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeDatabaseConnectionCollection(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DatabaseConnectionCollection)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/DatabaseConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/DatabaseConnectionCollection.cs new file mode 100644 index 0000000000000..547128c1b2d5b --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/DatabaseConnectionCollection.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Collection of static site database connections. + internal partial class DatabaseConnectionCollection + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Collection of resources. + /// is null. + internal DatabaseConnectionCollection(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// Collection of resources. + /// Link to next page of resources. + /// Keeps track of any properties unknown to the library. + internal DatabaseConnectionCollection(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DatabaseConnectionCollection() + { + } + + /// Collection of resources. + public IReadOnlyList Value { get; } + /// Link to next page of resources. + public string NextLink { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/DeploymentBuildStatus.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/DeploymentBuildStatus.cs new file mode 100644 index 0000000000000..5d2735293ba21 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/DeploymentBuildStatus.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Deployment build status. + public readonly partial struct DeploymentBuildStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DeploymentBuildStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TimedOutValue = "TimedOut"; + private const string RuntimeFailedValue = "RuntimeFailed"; + private const string BuildAbortedValue = "BuildAborted"; + private const string BuildFailedValue = "BuildFailed"; + private const string BuildRequestReceivedValue = "BuildRequestReceived"; + private const string BuildPendingValue = "BuildPending"; + private const string BuildInProgressValue = "BuildInProgress"; + private const string BuildSuccessfulValue = "BuildSuccessful"; + private const string PostBuildRestartRequiredValue = "PostBuildRestartRequired"; + private const string StartPollingValue = "StartPolling"; + private const string StartPollingWithRestartValue = "StartPollingWithRestart"; + private const string RuntimeStartingValue = "RuntimeStarting"; + private const string RuntimeSuccessfulValue = "RuntimeSuccessful"; + + /// TimedOut. + public static DeploymentBuildStatus TimedOut { get; } = new DeploymentBuildStatus(TimedOutValue); + /// RuntimeFailed. + public static DeploymentBuildStatus RuntimeFailed { get; } = new DeploymentBuildStatus(RuntimeFailedValue); + /// BuildAborted. + public static DeploymentBuildStatus BuildAborted { get; } = new DeploymentBuildStatus(BuildAbortedValue); + /// BuildFailed. + public static DeploymentBuildStatus BuildFailed { get; } = new DeploymentBuildStatus(BuildFailedValue); + /// BuildRequestReceived. + public static DeploymentBuildStatus BuildRequestReceived { get; } = new DeploymentBuildStatus(BuildRequestReceivedValue); + /// BuildPending. + public static DeploymentBuildStatus BuildPending { get; } = new DeploymentBuildStatus(BuildPendingValue); + /// BuildInProgress. + public static DeploymentBuildStatus BuildInProgress { get; } = new DeploymentBuildStatus(BuildInProgressValue); + /// BuildSuccessful. + public static DeploymentBuildStatus BuildSuccessful { get; } = new DeploymentBuildStatus(BuildSuccessfulValue); + /// PostBuildRestartRequired. + public static DeploymentBuildStatus PostBuildRestartRequired { get; } = new DeploymentBuildStatus(PostBuildRestartRequiredValue); + /// StartPolling. + public static DeploymentBuildStatus StartPolling { get; } = new DeploymentBuildStatus(StartPollingValue); + /// StartPollingWithRestart. + public static DeploymentBuildStatus StartPollingWithRestart { get; } = new DeploymentBuildStatus(StartPollingWithRestartValue); + /// RuntimeStarting. + public static DeploymentBuildStatus RuntimeStarting { get; } = new DeploymentBuildStatus(RuntimeStartingValue); + /// RuntimeSuccessful. + public static DeploymentBuildStatus RuntimeSuccessful { get; } = new DeploymentBuildStatus(RuntimeSuccessfulValue); + /// Determines if two values are the same. + public static bool operator ==(DeploymentBuildStatus left, DeploymentBuildStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DeploymentBuildStatus left, DeploymentBuildStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DeploymentBuildStatus(string value) => new DeploymentBuildStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DeploymentBuildStatus other && Equals(other); + /// + public bool Equals(DeploymentBuildStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/EnterpriseGradeCdnStatus.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/EnterpriseGradeCdnStatus.cs new file mode 100644 index 0000000000000..34475b2d12901 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/EnterpriseGradeCdnStatus.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// State indicating the status of the enterprise grade CDN serving traffic to the static web app. + public readonly partial struct EnterpriseGradeCdnStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EnterpriseGradeCdnStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string EnablingValue = "Enabling"; + private const string DisabledValue = "Disabled"; + private const string DisablingValue = "Disabling"; + + /// Enabled. + public static EnterpriseGradeCdnStatus Enabled { get; } = new EnterpriseGradeCdnStatus(EnabledValue); + /// Enabling. + public static EnterpriseGradeCdnStatus Enabling { get; } = new EnterpriseGradeCdnStatus(EnablingValue); + /// Disabled. + public static EnterpriseGradeCdnStatus Disabled { get; } = new EnterpriseGradeCdnStatus(DisabledValue); + /// Disabling. + public static EnterpriseGradeCdnStatus Disabling { get; } = new EnterpriseGradeCdnStatus(DisablingValue); + /// Determines if two values are the same. + public static bool operator ==(EnterpriseGradeCdnStatus left, EnterpriseGradeCdnStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EnterpriseGradeCdnStatus left, EnterpriseGradeCdnStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator EnterpriseGradeCdnStatus(string value) => new EnterpriseGradeCdnStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EnterpriseGradeCdnStatus other && Equals(other); + /// + public bool Equals(EnterpriseGradeCdnStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ExpressionTraces.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ExpressionTraces.Serialization.cs new file mode 100644 index 0000000000000..84be0f54b681f --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ExpressionTraces.Serialization.cs @@ -0,0 +1,249 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class ExpressionTraces : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExpressionTraces)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Value); +#else + using (JsonDocument document = JsonDocument.Parse(Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsCollectionDefined(Inputs)) + { + writer.WritePropertyName("inputs"u8); + writer.WriteStartArray(); + foreach (var item in Inputs) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ExpressionTraces IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExpressionTraces)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExpressionTraces(document.RootElement, options); + } + + internal static ExpressionTraces DeserializeExpressionTraces(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BinaryData value = default; + IReadOnlyList inputs = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + value = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("inputs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(WorkflowExpressionRoot.DeserializeWorkflowExpressionRoot(item, options)); + } + inputs = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExpressionTraces(value, inputs ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + builder.AppendLine($"'{Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Inputs), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" inputs: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Inputs)) + { + if (Inputs.Any()) + { + builder.Append(" inputs: "); + builder.AppendLine("["); + foreach (var item in Inputs) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " inputs: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ExpressionTraces)} does not support writing '{options.Format}' format."); + } + } + + ExpressionTraces IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeExpressionTraces(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExpressionTraces)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ExpressionTraces.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ExpressionTraces.cs new file mode 100644 index 0000000000000..9973977999503 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ExpressionTraces.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The expression traces. + internal partial class ExpressionTraces + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ExpressionTraces() + { + Inputs = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Anything. + /// + /// The link used to get the next page of recommendations. + /// Keeps track of any properties unknown to the library. + internal ExpressionTraces(BinaryData value, IReadOnlyList inputs, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + Inputs = inputs; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// Anything + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public BinaryData Value { get; } + /// Gets the inputs. + public IReadOnlyList Inputs { get; } + /// The link used to get the next page of recommendations. + public string NextLink { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowAccessControlConfiguration.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowAccessControlConfiguration.Serialization.cs new file mode 100644 index 0000000000000..0d24cef279d3a --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowAccessControlConfiguration.Serialization.cs @@ -0,0 +1,249 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class FlowAccessControlConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FlowAccessControlConfiguration)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Triggers)) + { + writer.WritePropertyName("triggers"u8); + writer.WriteObjectValue(Triggers, options); + } + if (Optional.IsDefined(Contents)) + { + writer.WritePropertyName("contents"u8); + writer.WriteObjectValue(Contents, options); + } + if (Optional.IsDefined(Actions)) + { + writer.WritePropertyName("actions"u8); + writer.WriteObjectValue(Actions, options); + } + if (Optional.IsDefined(WorkflowManagement)) + { + writer.WritePropertyName("workflowManagement"u8); + writer.WriteObjectValue(WorkflowManagement, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + FlowAccessControlConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FlowAccessControlConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFlowAccessControlConfiguration(document.RootElement, options); + } + + internal static FlowAccessControlConfiguration DeserializeFlowAccessControlConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FlowAccessControlConfigurationPolicy triggers = default; + FlowAccessControlConfigurationPolicy contents = default; + FlowAccessControlConfigurationPolicy actions = default; + FlowAccessControlConfigurationPolicy workflowManagement = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("triggers"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + triggers = FlowAccessControlConfigurationPolicy.DeserializeFlowAccessControlConfigurationPolicy(property.Value, options); + continue; + } + if (property.NameEquals("contents"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + contents = FlowAccessControlConfigurationPolicy.DeserializeFlowAccessControlConfigurationPolicy(property.Value, options); + continue; + } + if (property.NameEquals("actions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + actions = FlowAccessControlConfigurationPolicy.DeserializeFlowAccessControlConfigurationPolicy(property.Value, options); + continue; + } + if (property.NameEquals("workflowManagement"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + workflowManagement = FlowAccessControlConfigurationPolicy.DeserializeFlowAccessControlConfigurationPolicy(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FlowAccessControlConfiguration(triggers, contents, actions, workflowManagement, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Triggers), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" triggers: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Triggers)) + { + builder.Append(" triggers: "); + BicepSerializationHelpers.AppendChildObject(builder, Triggers, options, 2, false, " triggers: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Contents), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" contents: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Contents)) + { + builder.Append(" contents: "); + BicepSerializationHelpers.AppendChildObject(builder, Contents, options, 2, false, " contents: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Actions), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" actions: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Actions)) + { + builder.Append(" actions: "); + BicepSerializationHelpers.AppendChildObject(builder, Actions, options, 2, false, " actions: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(WorkflowManagement), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" workflowManagement: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(WorkflowManagement)) + { + builder.Append(" workflowManagement: "); + BicepSerializationHelpers.AppendChildObject(builder, WorkflowManagement, options, 2, false, " workflowManagement: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(FlowAccessControlConfiguration)} does not support writing '{options.Format}' format."); + } + } + + FlowAccessControlConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeFlowAccessControlConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FlowAccessControlConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowAccessControlConfiguration.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowAccessControlConfiguration.cs new file mode 100644 index 0000000000000..183eb5e7c1556 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowAccessControlConfiguration.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The access control configuration. + public partial class FlowAccessControlConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FlowAccessControlConfiguration() + { + } + + /// Initializes a new instance of . + /// The access control configuration for invoking workflow triggers. + /// The access control configuration for accessing workflow run contents. + /// The access control configuration for workflow actions. + /// The access control configuration for workflow management. + /// Keeps track of any properties unknown to the library. + internal FlowAccessControlConfiguration(FlowAccessControlConfigurationPolicy triggers, FlowAccessControlConfigurationPolicy contents, FlowAccessControlConfigurationPolicy actions, FlowAccessControlConfigurationPolicy workflowManagement, IDictionary serializedAdditionalRawData) + { + Triggers = triggers; + Contents = contents; + Actions = actions; + WorkflowManagement = workflowManagement; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The access control configuration for invoking workflow triggers. + [WirePath("triggers")] + public FlowAccessControlConfigurationPolicy Triggers { get; set; } + /// The access control configuration for accessing workflow run contents. + [WirePath("contents")] + public FlowAccessControlConfigurationPolicy Contents { get; set; } + /// The access control configuration for workflow actions. + [WirePath("actions")] + public FlowAccessControlConfigurationPolicy Actions { get; set; } + /// The access control configuration for workflow management. + [WirePath("workflowManagement")] + public FlowAccessControlConfigurationPolicy WorkflowManagement { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowAccessControlConfigurationPolicy.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowAccessControlConfigurationPolicy.Serialization.cs new file mode 100644 index 0000000000000..ccf5eade8c3b0 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowAccessControlConfigurationPolicy.Serialization.cs @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class FlowAccessControlConfigurationPolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FlowAccessControlConfigurationPolicy)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(AllowedCallerIPAddresses)) + { + writer.WritePropertyName("allowedCallerIpAddresses"u8); + writer.WriteStartArray(); + foreach (var item in AllowedCallerIPAddresses) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(OpenAuthenticationPolicies)) + { + writer.WritePropertyName("openAuthenticationPolicies"u8); + writer.WriteObjectValue(OpenAuthenticationPolicies, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + FlowAccessControlConfigurationPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FlowAccessControlConfigurationPolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFlowAccessControlConfigurationPolicy(document.RootElement, options); + } + + internal static FlowAccessControlConfigurationPolicy DeserializeFlowAccessControlConfigurationPolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList allowedCallerIPAddresses = default; + OpenAuthenticationAccessPolicies openAuthenticationPolicies = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("allowedCallerIpAddresses"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(WebAppIPAddressRange.DeserializeWebAppIPAddressRange(item, options)); + } + allowedCallerIPAddresses = array; + continue; + } + if (property.NameEquals("openAuthenticationPolicies"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + openAuthenticationPolicies = OpenAuthenticationAccessPolicies.DeserializeOpenAuthenticationAccessPolicies(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FlowAccessControlConfigurationPolicy(allowedCallerIPAddresses ?? new ChangeTrackingList(), openAuthenticationPolicies, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AllowedCallerIPAddresses), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" allowedCallerIpAddresses: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(AllowedCallerIPAddresses)) + { + if (AllowedCallerIPAddresses.Any()) + { + builder.Append(" allowedCallerIpAddresses: "); + builder.AppendLine("["); + foreach (var item in AllowedCallerIPAddresses) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " allowedCallerIpAddresses: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("OpenAuthenticationPolicyList", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" openAuthenticationPolicies: "); + builder.AppendLine("{"); + builder.Append(" policies: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(OpenAuthenticationPolicies)) + { + builder.Append(" openAuthenticationPolicies: "); + BicepSerializationHelpers.AppendChildObject(builder, OpenAuthenticationPolicies, options, 2, false, " openAuthenticationPolicies: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(FlowAccessControlConfigurationPolicy)} does not support writing '{options.Format}' format."); + } + } + + FlowAccessControlConfigurationPolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeFlowAccessControlConfigurationPolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FlowAccessControlConfigurationPolicy)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowAccessControlConfigurationPolicy.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowAccessControlConfigurationPolicy.cs new file mode 100644 index 0000000000000..b50329ade1937 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowAccessControlConfigurationPolicy.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The access control configuration policy. + public partial class FlowAccessControlConfigurationPolicy + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FlowAccessControlConfigurationPolicy() + { + AllowedCallerIPAddresses = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The allowed caller IP address ranges. + /// The authentication policies for workflow. + /// Keeps track of any properties unknown to the library. + internal FlowAccessControlConfigurationPolicy(IList allowedCallerIPAddresses, OpenAuthenticationAccessPolicies openAuthenticationPolicies, IDictionary serializedAdditionalRawData) + { + AllowedCallerIPAddresses = allowedCallerIPAddresses; + OpenAuthenticationPolicies = openAuthenticationPolicies; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The allowed caller IP address ranges. + [WirePath("allowedCallerIpAddresses")] + public IList AllowedCallerIPAddresses { get; } + /// The authentication policies for workflow. + internal OpenAuthenticationAccessPolicies OpenAuthenticationPolicies { get; set; } + /// Open authentication policies. + [WirePath("openAuthenticationPolicies.policies")] + public IDictionary OpenAuthenticationPolicyList + { + get + { + if (OpenAuthenticationPolicies is null) + OpenAuthenticationPolicies = new OpenAuthenticationAccessPolicies(); + return OpenAuthenticationPolicies.OpenAuthenticationPolicyList; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowEndpoints.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowEndpoints.Serialization.cs new file mode 100644 index 0000000000000..afb855ece967c --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowEndpoints.Serialization.cs @@ -0,0 +1,226 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class FlowEndpoints : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FlowEndpoints)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(OutgoingIPAddresses)) + { + writer.WritePropertyName("outgoingIpAddresses"u8); + writer.WriteStartArray(); + foreach (var item in OutgoingIPAddresses) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(AccessEndpointIPAddresses)) + { + writer.WritePropertyName("accessEndpointIpAddresses"u8); + writer.WriteStartArray(); + foreach (var item in AccessEndpointIPAddresses) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + FlowEndpoints IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FlowEndpoints)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFlowEndpoints(document.RootElement, options); + } + + internal static FlowEndpoints DeserializeFlowEndpoints(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList outgoingIPAddresses = default; + IList accessEndpointIPAddresses = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("outgoingIpAddresses"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(WebAppIPAddress.DeserializeWebAppIPAddress(item, options)); + } + outgoingIPAddresses = array; + continue; + } + if (property.NameEquals("accessEndpointIpAddresses"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(WebAppIPAddress.DeserializeWebAppIPAddress(item, options)); + } + accessEndpointIPAddresses = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FlowEndpoints(outgoingIPAddresses ?? new ChangeTrackingList(), accessEndpointIPAddresses ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OutgoingIPAddresses), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" outgoingIpAddresses: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(OutgoingIPAddresses)) + { + if (OutgoingIPAddresses.Any()) + { + builder.Append(" outgoingIpAddresses: "); + builder.AppendLine("["); + foreach (var item in OutgoingIPAddresses) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " outgoingIpAddresses: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AccessEndpointIPAddresses), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" accessEndpointIpAddresses: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(AccessEndpointIPAddresses)) + { + if (AccessEndpointIPAddresses.Any()) + { + builder.Append(" accessEndpointIpAddresses: "); + builder.AppendLine("["); + foreach (var item in AccessEndpointIPAddresses) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " accessEndpointIpAddresses: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(FlowEndpoints)} does not support writing '{options.Format}' format."); + } + } + + FlowEndpoints IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeFlowEndpoints(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FlowEndpoints)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowEndpoints.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowEndpoints.cs new file mode 100644 index 0000000000000..752a877ee0411 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowEndpoints.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The flow endpoints configuration. + public partial class FlowEndpoints + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FlowEndpoints() + { + OutgoingIPAddresses = new ChangeTrackingList(); + AccessEndpointIPAddresses = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The outgoing ip address. + /// The access endpoint ip address. + /// Keeps track of any properties unknown to the library. + internal FlowEndpoints(IList outgoingIPAddresses, IList accessEndpointIPAddresses, IDictionary serializedAdditionalRawData) + { + OutgoingIPAddresses = outgoingIPAddresses; + AccessEndpointIPAddresses = accessEndpointIPAddresses; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The outgoing ip address. + [WirePath("outgoingIpAddresses")] + public IList OutgoingIPAddresses { get; } + /// The access endpoint ip address. + [WirePath("accessEndpointIpAddresses")] + public IList AccessEndpointIPAddresses { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowEndpointsConfiguration.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowEndpointsConfiguration.Serialization.cs new file mode 100644 index 0000000000000..34ed980e3e06d --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowEndpointsConfiguration.Serialization.cs @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class FlowEndpointsConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FlowEndpointsConfiguration)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Workflow)) + { + writer.WritePropertyName("workflow"u8); + writer.WriteObjectValue(Workflow, options); + } + if (Optional.IsDefined(Connector)) + { + writer.WritePropertyName("connector"u8); + writer.WriteObjectValue(Connector, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + FlowEndpointsConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FlowEndpointsConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFlowEndpointsConfiguration(document.RootElement, options); + } + + internal static FlowEndpointsConfiguration DeserializeFlowEndpointsConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FlowEndpoints workflow = default; + FlowEndpoints connector = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("workflow"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + workflow = FlowEndpoints.DeserializeFlowEndpoints(property.Value, options); + continue; + } + if (property.NameEquals("connector"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connector = FlowEndpoints.DeserializeFlowEndpoints(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FlowEndpointsConfiguration(workflow, connector, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Workflow), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" workflow: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Workflow)) + { + builder.Append(" workflow: "); + BicepSerializationHelpers.AppendChildObject(builder, Workflow, options, 2, false, " workflow: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Connector), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" connector: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Connector)) + { + builder.Append(" connector: "); + BicepSerializationHelpers.AppendChildObject(builder, Connector, options, 2, false, " connector: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(FlowEndpointsConfiguration)} does not support writing '{options.Format}' format."); + } + } + + FlowEndpointsConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeFlowEndpointsConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FlowEndpointsConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowEndpointsConfiguration.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowEndpointsConfiguration.cs new file mode 100644 index 0000000000000..723b65a645e39 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FlowEndpointsConfiguration.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The endpoints configuration. + public partial class FlowEndpointsConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FlowEndpointsConfiguration() + { + } + + /// Initializes a new instance of . + /// The workflow endpoints. + /// The connector endpoints. + /// Keeps track of any properties unknown to the library. + internal FlowEndpointsConfiguration(FlowEndpoints workflow, FlowEndpoints connector, IDictionary serializedAdditionalRawData) + { + Workflow = workflow; + Connector = connector; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The workflow endpoints. + [WirePath("workflow")] + public FlowEndpoints Workflow { get; set; } + /// The connector endpoints. + [WirePath("connector")] + public FlowEndpoints Connector { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppAlwaysReadyConfig.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppAlwaysReadyConfig.Serialization.cs new file mode 100644 index 0000000000000..97ff94d59c1e6 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppAlwaysReadyConfig.Serialization.cs @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class FunctionAppAlwaysReadyConfig : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionAppAlwaysReadyConfig)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(InstanceCount)) + { + writer.WritePropertyName("instanceCount"u8); + writer.WriteNumberValue(InstanceCount.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + FunctionAppAlwaysReadyConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionAppAlwaysReadyConfig)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFunctionAppAlwaysReadyConfig(document.RootElement, options); + } + + internal static FunctionAppAlwaysReadyConfig DeserializeFunctionAppAlwaysReadyConfig(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + float? instanceCount = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("instanceCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + instanceCount = property.Value.GetSingle(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FunctionAppAlwaysReadyConfig(name, instanceCount, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(InstanceCount), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" instanceCount: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(InstanceCount)) + { + builder.Append(" instanceCount: "); + builder.AppendLine($"'{InstanceCount.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(FunctionAppAlwaysReadyConfig)} does not support writing '{options.Format}' format."); + } + } + + FunctionAppAlwaysReadyConfig IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeFunctionAppAlwaysReadyConfig(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FunctionAppAlwaysReadyConfig)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppAlwaysReadyConfig.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppAlwaysReadyConfig.cs new file mode 100644 index 0000000000000..2d4c4cc33edbb --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppAlwaysReadyConfig.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Sets the number of 'Always Ready' instances for a function group or a specific function. + public partial class FunctionAppAlwaysReadyConfig + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FunctionAppAlwaysReadyConfig() + { + } + + /// Initializes a new instance of . + /// Either a function group or a function name is required. For additional information see https://aka.ms/flexconsumption/alwaysready. + /// Sets the number of 'Always Ready' instances for a given function group or a specific function. For additional information see https://aka.ms/flexconsumption/alwaysready. + /// Keeps track of any properties unknown to the library. + internal FunctionAppAlwaysReadyConfig(string name, float? instanceCount, IDictionary serializedAdditionalRawData) + { + Name = name; + InstanceCount = instanceCount; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Either a function group or a function name is required. For additional information see https://aka.ms/flexconsumption/alwaysready. + [WirePath("name")] + public string Name { get; set; } + /// Sets the number of 'Always Ready' instances for a given function group or a specific function. For additional information see https://aka.ms/flexconsumption/alwaysready. + [WirePath("instanceCount")] + public float? InstanceCount { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppConfig.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppConfig.Serialization.cs new file mode 100644 index 0000000000000..d768e7576d703 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppConfig.Serialization.cs @@ -0,0 +1,222 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class FunctionAppConfig : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionAppConfig)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Deployment)) + { + writer.WritePropertyName("deployment"u8); + writer.WriteObjectValue(Deployment, options); + } + if (Optional.IsDefined(Runtime)) + { + writer.WritePropertyName("runtime"u8); + writer.WriteObjectValue(Runtime, options); + } + if (Optional.IsDefined(ScaleAndConcurrency)) + { + writer.WritePropertyName("scaleAndConcurrency"u8); + writer.WriteObjectValue(ScaleAndConcurrency, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + FunctionAppConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionAppConfig)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFunctionAppConfig(document.RootElement, options); + } + + internal static FunctionAppConfig DeserializeFunctionAppConfig(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FunctionsDeployment deployment = default; + FunctionAppRuntime runtime = default; + FunctionAppScaleAndConcurrency scaleAndConcurrency = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("deployment"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + deployment = FunctionsDeployment.DeserializeFunctionsDeployment(property.Value, options); + continue; + } + if (property.NameEquals("runtime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + runtime = FunctionAppRuntime.DeserializeFunctionAppRuntime(property.Value, options); + continue; + } + if (property.NameEquals("scaleAndConcurrency"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scaleAndConcurrency = FunctionAppScaleAndConcurrency.DeserializeFunctionAppScaleAndConcurrency(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FunctionAppConfig(deployment, runtime, scaleAndConcurrency, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("DeploymentStorage", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" deployment: "); + builder.AppendLine("{"); + builder.Append(" storage: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Deployment)) + { + builder.Append(" deployment: "); + BicepSerializationHelpers.AppendChildObject(builder, Deployment, options, 2, false, " deployment: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Runtime), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" runtime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Runtime)) + { + builder.Append(" runtime: "); + BicepSerializationHelpers.AppendChildObject(builder, Runtime, options, 2, false, " runtime: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScaleAndConcurrency), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scaleAndConcurrency: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ScaleAndConcurrency)) + { + builder.Append(" scaleAndConcurrency: "); + BicepSerializationHelpers.AppendChildObject(builder, ScaleAndConcurrency, options, 2, false, " scaleAndConcurrency: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(FunctionAppConfig)} does not support writing '{options.Format}' format."); + } + } + + FunctionAppConfig IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeFunctionAppConfig(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FunctionAppConfig)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppConfig.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppConfig.cs new file mode 100644 index 0000000000000..78a5c2ec6f8a3 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppConfig.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Function app configuration. + public partial class FunctionAppConfig + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FunctionAppConfig() + { + } + + /// Initializes a new instance of . + /// Function app deployment configuration. + /// Function app runtime settings. + /// Function app scale and concurrency settings. + /// Keeps track of any properties unknown to the library. + internal FunctionAppConfig(FunctionsDeployment deployment, FunctionAppRuntime runtime, FunctionAppScaleAndConcurrency scaleAndConcurrency, IDictionary serializedAdditionalRawData) + { + Deployment = deployment; + Runtime = runtime; + ScaleAndConcurrency = scaleAndConcurrency; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Function app deployment configuration. + internal FunctionsDeployment Deployment { get; set; } + /// Storage for deployed package used by the function app. + [WirePath("deployment.storage")] + public FunctionAppStorage DeploymentStorage + { + get => Deployment is null ? default : Deployment.Storage; + set + { + if (Deployment is null) + Deployment = new FunctionsDeployment(); + Deployment.Storage = value; + } + } + + /// Function app runtime settings. + [WirePath("runtime")] + public FunctionAppRuntime Runtime { get; set; } + /// Function app scale and concurrency settings. + [WirePath("scaleAndConcurrency")] + public FunctionAppScaleAndConcurrency ScaleAndConcurrency { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppResourceConfig.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppResourceConfig.Serialization.cs new file mode 100644 index 0000000000000..67b0120a16b5f --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppResourceConfig.Serialization.cs @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class FunctionAppResourceConfig : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionAppResourceConfig)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Cpu)) + { + writer.WritePropertyName("cpu"u8); + writer.WriteNumberValue(Cpu.Value); + } + if (Optional.IsDefined(Memory)) + { + writer.WritePropertyName("memory"u8); + writer.WriteStringValue(Memory); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + FunctionAppResourceConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionAppResourceConfig)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFunctionAppResourceConfig(document.RootElement, options); + } + + internal static FunctionAppResourceConfig DeserializeFunctionAppResourceConfig(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + double? cpu = default; + string memory = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("cpu"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cpu = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("memory"u8)) + { + memory = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FunctionAppResourceConfig(cpu, memory, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Cpu), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" cpu: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Cpu)) + { + builder.Append(" cpu: "); + builder.AppendLine($"'{Cpu.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Memory), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" memory: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Memory)) + { + builder.Append(" memory: "); + if (Memory.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Memory}'''"); + } + else + { + builder.AppendLine($"'{Memory}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(FunctionAppResourceConfig)} does not support writing '{options.Format}' format."); + } + } + + FunctionAppResourceConfig IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeFunctionAppResourceConfig(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FunctionAppResourceConfig)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppResourceConfig.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppResourceConfig.cs new file mode 100644 index 0000000000000..f2117cea9fc31 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppResourceConfig.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Function app resource requirements. + public partial class FunctionAppResourceConfig + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FunctionAppResourceConfig() + { + } + + /// Initializes a new instance of . + /// Required CPU in cores, e.g. 0.5. + /// Required memory, e.g. "1Gi". + /// Keeps track of any properties unknown to the library. + internal FunctionAppResourceConfig(double? cpu, string memory, IDictionary serializedAdditionalRawData) + { + Cpu = cpu; + Memory = memory; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Required CPU in cores, e.g. 0.5. + [WirePath("cpu")] + public double? Cpu { get; set; } + /// Required memory, e.g. "1Gi". + [WirePath("memory")] + public string Memory { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppRuntime.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppRuntime.Serialization.cs new file mode 100644 index 0000000000000..1e9b80919235b --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppRuntime.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class FunctionAppRuntime : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionAppRuntime)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name.Value.ToString()); + } + if (Optional.IsDefined(Version)) + { + if (Version != null) + { + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + } + else + { + writer.WriteNull("version"); + } + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + FunctionAppRuntime IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionAppRuntime)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFunctionAppRuntime(document.RootElement, options); + } + + internal static FunctionAppRuntime DeserializeFunctionAppRuntime(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FunctionAppRuntimeName? name = default; + string version = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = new FunctionAppRuntimeName(property.Value.GetString()); + continue; + } + if (property.NameEquals("version"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + version = null; + continue; + } + version = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FunctionAppRuntime(name, version, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + builder.AppendLine($"'{Name.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Version), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" version: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Version)) + { + builder.Append(" version: "); + if (Version.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Version}'''"); + } + else + { + builder.AppendLine($"'{Version}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(FunctionAppRuntime)} does not support writing '{options.Format}' format."); + } + } + + FunctionAppRuntime IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeFunctionAppRuntime(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FunctionAppRuntime)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppRuntime.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppRuntime.cs new file mode 100644 index 0000000000000..9256113196f54 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppRuntime.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Function app runtime name and version. + public partial class FunctionAppRuntime + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FunctionAppRuntime() + { + } + + /// Initializes a new instance of . + /// Function app runtime name. Available options: dotnet-isolated, node, java, powershell, python, custom. + /// Function app runtime version. Example: 8 (for dotnet-isolated). + /// Keeps track of any properties unknown to the library. + internal FunctionAppRuntime(FunctionAppRuntimeName? name, string version, IDictionary serializedAdditionalRawData) + { + Name = name; + Version = version; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Function app runtime name. Available options: dotnet-isolated, node, java, powershell, python, custom. + [WirePath("name")] + public FunctionAppRuntimeName? Name { get; set; } + /// Function app runtime version. Example: 8 (for dotnet-isolated). + [WirePath("version")] + public string Version { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppRuntimeName.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppRuntimeName.cs new file mode 100644 index 0000000000000..48dbc0741cc0f --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppRuntimeName.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Function app runtime name. Available options: dotnet-isolated, node, java, powershell, python, custom. + public readonly partial struct FunctionAppRuntimeName : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FunctionAppRuntimeName(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DotnetIsolatedValue = "dotnet-isolated"; + private const string NodeValue = "node"; + private const string JavaValue = "java"; + private const string PowershellValue = "powershell"; + private const string PythonValue = "python"; + private const string CustomValue = "custom"; + + /// dotnet-isolated. + public static FunctionAppRuntimeName DotnetIsolated { get; } = new FunctionAppRuntimeName(DotnetIsolatedValue); + /// node. + public static FunctionAppRuntimeName Node { get; } = new FunctionAppRuntimeName(NodeValue); + /// java. + public static FunctionAppRuntimeName Java { get; } = new FunctionAppRuntimeName(JavaValue); + /// powershell. + public static FunctionAppRuntimeName Powershell { get; } = new FunctionAppRuntimeName(PowershellValue); + /// python. + public static FunctionAppRuntimeName Python { get; } = new FunctionAppRuntimeName(PythonValue); + /// custom. + public static FunctionAppRuntimeName Custom { get; } = new FunctionAppRuntimeName(CustomValue); + /// Determines if two values are the same. + public static bool operator ==(FunctionAppRuntimeName left, FunctionAppRuntimeName right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FunctionAppRuntimeName left, FunctionAppRuntimeName right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator FunctionAppRuntimeName(string value) => new FunctionAppRuntimeName(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FunctionAppRuntimeName other && Equals(other); + /// + public bool Equals(FunctionAppRuntimeName other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppScaleAndConcurrency.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppScaleAndConcurrency.Serialization.cs new file mode 100644 index 0000000000000..3a7caaa98a043 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppScaleAndConcurrency.Serialization.cs @@ -0,0 +1,273 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class FunctionAppScaleAndConcurrency : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionAppScaleAndConcurrency)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(AlwaysReady)) + { + writer.WritePropertyName("alwaysReady"u8); + writer.WriteStartArray(); + foreach (var item in AlwaysReady) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(MaximumInstanceCount)) + { + writer.WritePropertyName("maximumInstanceCount"u8); + writer.WriteNumberValue(MaximumInstanceCount.Value); + } + if (Optional.IsDefined(InstanceMemoryMB)) + { + writer.WritePropertyName("instanceMemoryMB"u8); + writer.WriteNumberValue(InstanceMemoryMB.Value); + } + if (Optional.IsDefined(Triggers)) + { + writer.WritePropertyName("triggers"u8); + writer.WriteObjectValue(Triggers, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + FunctionAppScaleAndConcurrency IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionAppScaleAndConcurrency)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFunctionAppScaleAndConcurrency(document.RootElement, options); + } + + internal static FunctionAppScaleAndConcurrency DeserializeFunctionAppScaleAndConcurrency(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList alwaysReady = default; + float? maximumInstanceCount = default; + float? instanceMemoryMB = default; + FunctionsScaleAndConcurrencyTriggers triggers = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("alwaysReady"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(FunctionAppAlwaysReadyConfig.DeserializeFunctionAppAlwaysReadyConfig(item, options)); + } + alwaysReady = array; + continue; + } + if (property.NameEquals("maximumInstanceCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maximumInstanceCount = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("instanceMemoryMB"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + instanceMemoryMB = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("triggers"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + triggers = FunctionsScaleAndConcurrencyTriggers.DeserializeFunctionsScaleAndConcurrencyTriggers(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FunctionAppScaleAndConcurrency(alwaysReady ?? new ChangeTrackingList(), maximumInstanceCount, instanceMemoryMB, triggers, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AlwaysReady), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" alwaysReady: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(AlwaysReady)) + { + if (AlwaysReady.Any()) + { + builder.Append(" alwaysReady: "); + builder.AppendLine("["); + foreach (var item in AlwaysReady) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " alwaysReady: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MaximumInstanceCount), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" maximumInstanceCount: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MaximumInstanceCount)) + { + builder.Append(" maximumInstanceCount: "); + builder.AppendLine($"'{MaximumInstanceCount.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(InstanceMemoryMB), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" instanceMemoryMB: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(InstanceMemoryMB)) + { + builder.Append(" instanceMemoryMB: "); + builder.AppendLine($"'{InstanceMemoryMB.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("HttpPerInstanceConcurrency", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" triggers: "); + builder.AppendLine("{"); + builder.AppendLine(" http: {"); + builder.Append(" perInstanceConcurrency: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Triggers)) + { + builder.Append(" triggers: "); + BicepSerializationHelpers.AppendChildObject(builder, Triggers, options, 2, false, " triggers: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(FunctionAppScaleAndConcurrency)} does not support writing '{options.Format}' format."); + } + } + + FunctionAppScaleAndConcurrency IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeFunctionAppScaleAndConcurrency(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FunctionAppScaleAndConcurrency)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppScaleAndConcurrency.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppScaleAndConcurrency.cs new file mode 100644 index 0000000000000..f2329273c9d0a --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppScaleAndConcurrency.cs @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Scale and concurrency settings for the function app. + public partial class FunctionAppScaleAndConcurrency + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FunctionAppScaleAndConcurrency() + { + AlwaysReady = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// 'Always Ready' configuration for the function app. + /// The maximum number of instances for the function app. + /// Set the amount of memory allocated to each instance of the function app in MB. CPU and network bandwidth are allocated proportionally. + /// Scale and concurrency settings for the function app triggers. + /// Keeps track of any properties unknown to the library. + internal FunctionAppScaleAndConcurrency(IList alwaysReady, float? maximumInstanceCount, float? instanceMemoryMB, FunctionsScaleAndConcurrencyTriggers triggers, IDictionary serializedAdditionalRawData) + { + AlwaysReady = alwaysReady; + MaximumInstanceCount = maximumInstanceCount; + InstanceMemoryMB = instanceMemoryMB; + Triggers = triggers; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// 'Always Ready' configuration for the function app. + [WirePath("alwaysReady")] + public IList AlwaysReady { get; } + /// The maximum number of instances for the function app. + [WirePath("maximumInstanceCount")] + public float? MaximumInstanceCount { get; set; } + /// Set the amount of memory allocated to each instance of the function app in MB. CPU and network bandwidth are allocated proportionally. + [WirePath("instanceMemoryMB")] + public float? InstanceMemoryMB { get; set; } + /// Scale and concurrency settings for the function app triggers. + internal FunctionsScaleAndConcurrencyTriggers Triggers { get; set; } + /// The maximum number of concurrent HTTP trigger invocations per instance. + [WirePath("triggers.http.perInstanceConcurrency")] + public float? HttpPerInstanceConcurrency + { + get => Triggers is null ? default : Triggers.HttpPerInstanceConcurrency; + set + { + if (Triggers is null) + Triggers = new FunctionsScaleAndConcurrencyTriggers(); + Triggers.HttpPerInstanceConcurrency = value; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorage.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorage.Serialization.cs new file mode 100644 index 0000000000000..f1b6a97f001a5 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorage.Serialization.cs @@ -0,0 +1,219 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class FunctionAppStorage : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionAppStorage)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(StorageType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(StorageType.Value.ToString()); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value.AbsoluteUri); + } + if (Optional.IsDefined(Authentication)) + { + writer.WritePropertyName("authentication"u8); + writer.WriteObjectValue(Authentication, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + FunctionAppStorage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionAppStorage)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFunctionAppStorage(document.RootElement, options); + } + + internal static FunctionAppStorage DeserializeFunctionAppStorage(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FunctionAppStorageType? type = default; + Uri value = default; + FunctionAppStorageAuthentication authentication = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new FunctionAppStorageType(property.Value.GetString()); + continue; + } + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + value = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("authentication"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authentication = FunctionAppStorageAuthentication.DeserializeFunctionAppStorageAuthentication(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FunctionAppStorage(type, value, authentication, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StorageType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StorageType)) + { + builder.Append(" type: "); + builder.AppendLine($"'{StorageType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + builder.AppendLine($"'{Value.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Authentication), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" authentication: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Authentication)) + { + builder.Append(" authentication: "); + BicepSerializationHelpers.AppendChildObject(builder, Authentication, options, 2, false, " authentication: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(FunctionAppStorage)} does not support writing '{options.Format}' format."); + } + } + + FunctionAppStorage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeFunctionAppStorage(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FunctionAppStorage)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorage.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorage.cs new file mode 100644 index 0000000000000..83adf690ba4ce --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorage.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Storage for deployed package used by the function app. + public partial class FunctionAppStorage + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FunctionAppStorage() + { + } + + /// Initializes a new instance of . + /// Property to select Azure Storage type. Available options: blobContainer. + /// Property to set the URL for the selected Azure Storage type. Example: For blobContainer, the value could be https://<storageAccountName>.blob.core.windows.net/<containerName>. + /// Authentication method to access the storage account for deployment. + /// Keeps track of any properties unknown to the library. + internal FunctionAppStorage(FunctionAppStorageType? storageType, Uri value, FunctionAppStorageAuthentication authentication, IDictionary serializedAdditionalRawData) + { + StorageType = storageType; + Value = value; + Authentication = authentication; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Property to select Azure Storage type. Available options: blobContainer. + [WirePath("type")] + public FunctionAppStorageType? StorageType { get; set; } + /// Property to set the URL for the selected Azure Storage type. Example: For blobContainer, the value could be https://<storageAccountName>.blob.core.windows.net/<containerName>. + [WirePath("value")] + public Uri Value { get; set; } + /// Authentication method to access the storage account for deployment. + [WirePath("authentication")] + public FunctionAppStorageAuthentication Authentication { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorageAccountAuthenticationType.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorageAccountAuthenticationType.cs new file mode 100644 index 0000000000000..57607a6231047 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorageAccountAuthenticationType.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.AppService.Models +{ + /// Property to select authentication type to access the selected storage account. Available options: SystemAssignedIdentity, UserAssignedIdentity, StorageAccountConnectionString. + public readonly partial struct FunctionAppStorageAccountAuthenticationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FunctionAppStorageAccountAuthenticationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SystemAssignedIdentityValue = "SystemAssignedIdentity"; + private const string UserAssignedIdentityValue = "UserAssignedIdentity"; + private const string StorageAccountConnectionStringValue = "StorageAccountConnectionString"; + + /// SystemAssignedIdentity. + public static FunctionAppStorageAccountAuthenticationType SystemAssignedIdentity { get; } = new FunctionAppStorageAccountAuthenticationType(SystemAssignedIdentityValue); + /// UserAssignedIdentity. + public static FunctionAppStorageAccountAuthenticationType UserAssignedIdentity { get; } = new FunctionAppStorageAccountAuthenticationType(UserAssignedIdentityValue); + /// StorageAccountConnectionString. + public static FunctionAppStorageAccountAuthenticationType StorageAccountConnectionString { get; } = new FunctionAppStorageAccountAuthenticationType(StorageAccountConnectionStringValue); + /// Determines if two values are the same. + public static bool operator ==(FunctionAppStorageAccountAuthenticationType left, FunctionAppStorageAccountAuthenticationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FunctionAppStorageAccountAuthenticationType left, FunctionAppStorageAccountAuthenticationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator FunctionAppStorageAccountAuthenticationType(string value) => new FunctionAppStorageAccountAuthenticationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FunctionAppStorageAccountAuthenticationType other && Equals(other); + /// + public bool Equals(FunctionAppStorageAccountAuthenticationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorageAuthentication.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorageAuthentication.Serialization.cs new file mode 100644 index 0000000000000..62e538180164e --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorageAuthentication.Serialization.cs @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class FunctionAppStorageAuthentication : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionAppStorageAuthentication)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(AuthenticationType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(AuthenticationType.Value.ToString()); + } + if (Optional.IsDefined(UserAssignedIdentityResourceId)) + { + writer.WritePropertyName("userAssignedIdentityResourceId"u8); + writer.WriteStringValue(UserAssignedIdentityResourceId); + } + if (Optional.IsDefined(StorageAccountConnectionStringName)) + { + writer.WritePropertyName("storageAccountConnectionStringName"u8); + writer.WriteStringValue(StorageAccountConnectionStringName); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + FunctionAppStorageAuthentication IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionAppStorageAuthentication)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFunctionAppStorageAuthentication(document.RootElement, options); + } + + internal static FunctionAppStorageAuthentication DeserializeFunctionAppStorageAuthentication(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FunctionAppStorageAccountAuthenticationType? type = default; + string userAssignedIdentityResourceId = default; + string storageAccountConnectionStringName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new FunctionAppStorageAccountAuthenticationType(property.Value.GetString()); + continue; + } + if (property.NameEquals("userAssignedIdentityResourceId"u8)) + { + userAssignedIdentityResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageAccountConnectionStringName"u8)) + { + storageAccountConnectionStringName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FunctionAppStorageAuthentication(type, userAssignedIdentityResourceId, storageAccountConnectionStringName, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AuthenticationType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AuthenticationType)) + { + builder.Append(" type: "); + builder.AppendLine($"'{AuthenticationType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UserAssignedIdentityResourceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" userAssignedIdentityResourceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UserAssignedIdentityResourceId)) + { + builder.Append(" userAssignedIdentityResourceId: "); + if (UserAssignedIdentityResourceId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{UserAssignedIdentityResourceId}'''"); + } + else + { + builder.AppendLine($"'{UserAssignedIdentityResourceId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StorageAccountConnectionStringName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" storageAccountConnectionStringName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StorageAccountConnectionStringName)) + { + builder.Append(" storageAccountConnectionStringName: "); + if (StorageAccountConnectionStringName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{StorageAccountConnectionStringName}'''"); + } + else + { + builder.AppendLine($"'{StorageAccountConnectionStringName}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(FunctionAppStorageAuthentication)} does not support writing '{options.Format}' format."); + } + } + + FunctionAppStorageAuthentication IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeFunctionAppStorageAuthentication(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FunctionAppStorageAuthentication)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorageAuthentication.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorageAuthentication.cs new file mode 100644 index 0000000000000..ec4fa9f9af517 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorageAuthentication.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Authentication method to access the storage account for deployment. + public partial class FunctionAppStorageAuthentication + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FunctionAppStorageAuthentication() + { + } + + /// Initializes a new instance of . + /// Property to select authentication type to access the selected storage account. Available options: SystemAssignedIdentity, UserAssignedIdentity, StorageAccountConnectionString. + /// Use this property for UserAssignedIdentity. Set the resource ID of the identity. Do not set a value for this property when using other authentication type. + /// Use this property for StorageAccountConnectionString. Set the name of the app setting that has the storage account connection string. Do not set a value for this property when using other authentication type. + /// Keeps track of any properties unknown to the library. + internal FunctionAppStorageAuthentication(FunctionAppStorageAccountAuthenticationType? authenticationType, string userAssignedIdentityResourceId, string storageAccountConnectionStringName, IDictionary serializedAdditionalRawData) + { + AuthenticationType = authenticationType; + UserAssignedIdentityResourceId = userAssignedIdentityResourceId; + StorageAccountConnectionStringName = storageAccountConnectionStringName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Property to select authentication type to access the selected storage account. Available options: SystemAssignedIdentity, UserAssignedIdentity, StorageAccountConnectionString. + [WirePath("type")] + public FunctionAppStorageAccountAuthenticationType? AuthenticationType { get; set; } + /// Use this property for UserAssignedIdentity. Set the resource ID of the identity. Do not set a value for this property when using other authentication type. + [WirePath("userAssignedIdentityResourceId")] + public string UserAssignedIdentityResourceId { get; set; } + /// Use this property for StorageAccountConnectionString. Set the name of the app setting that has the storage account connection string. Do not set a value for this property when using other authentication type. + [WirePath("storageAccountConnectionStringName")] + public string StorageAccountConnectionStringName { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorageType.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorageType.cs new file mode 100644 index 0000000000000..e040beb0719fc --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionAppStorageType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Property to select Azure Storage type. Available options: blobContainer. + public readonly partial struct FunctionAppStorageType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FunctionAppStorageType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string BlobContainerValue = "blobContainer"; + + /// blobContainer. + public static FunctionAppStorageType BlobContainer { get; } = new FunctionAppStorageType(BlobContainerValue); + /// Determines if two values are the same. + public static bool operator ==(FunctionAppStorageType left, FunctionAppStorageType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FunctionAppStorageType left, FunctionAppStorageType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator FunctionAppStorageType(string value) => new FunctionAppStorageType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FunctionAppStorageType other && Equals(other); + /// + public bool Equals(FunctionAppStorageType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsDeployment.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsDeployment.Serialization.cs new file mode 100644 index 0000000000000..4c8b050f7a358 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsDeployment.Serialization.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class FunctionsDeployment : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionsDeployment)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Storage)) + { + writer.WritePropertyName("storage"u8); + writer.WriteObjectValue(Storage, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + FunctionsDeployment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionsDeployment)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFunctionsDeployment(document.RootElement, options); + } + + internal static FunctionsDeployment DeserializeFunctionsDeployment(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FunctionAppStorage storage = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("storage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + storage = FunctionAppStorage.DeserializeFunctionAppStorage(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FunctionsDeployment(storage, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Storage), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" storage: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Storage)) + { + builder.Append(" storage: "); + BicepSerializationHelpers.AppendChildObject(builder, Storage, options, 2, false, " storage: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(FunctionsDeployment)} does not support writing '{options.Format}' format."); + } + } + + FunctionsDeployment IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeFunctionsDeployment(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FunctionsDeployment)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsDeployment.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsDeployment.cs new file mode 100644 index 0000000000000..e8f6b2a9f3c2e --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsDeployment.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Configuration section for the function app deployment. + internal partial class FunctionsDeployment + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FunctionsDeployment() + { + } + + /// Initializes a new instance of . + /// Storage for deployed package used by the function app. + /// Keeps track of any properties unknown to the library. + internal FunctionsDeployment(FunctionAppStorage storage, IDictionary serializedAdditionalRawData) + { + Storage = storage; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Storage for deployed package used by the function app. + [WirePath("storage")] + public FunctionAppStorage Storage { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsScaleAndConcurrencyTriggers.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsScaleAndConcurrencyTriggers.Serialization.cs new file mode 100644 index 0000000000000..8b581cbbc4848 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsScaleAndConcurrencyTriggers.Serialization.cs @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class FunctionsScaleAndConcurrencyTriggers : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionsScaleAndConcurrencyTriggers)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Http)) + { + writer.WritePropertyName("http"u8); + writer.WriteObjectValue(Http, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + FunctionsScaleAndConcurrencyTriggers IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionsScaleAndConcurrencyTriggers)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFunctionsScaleAndConcurrencyTriggers(document.RootElement, options); + } + + internal static FunctionsScaleAndConcurrencyTriggers DeserializeFunctionsScaleAndConcurrencyTriggers(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FunctionsScaleAndConcurrencyTriggersHttp http = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("http"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + http = FunctionsScaleAndConcurrencyTriggersHttp.DeserializeFunctionsScaleAndConcurrencyTriggersHttp(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FunctionsScaleAndConcurrencyTriggers(http, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("HttpPerInstanceConcurrency", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" http: "); + builder.AppendLine("{"); + builder.Append(" perInstanceConcurrency: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Http)) + { + builder.Append(" http: "); + BicepSerializationHelpers.AppendChildObject(builder, Http, options, 2, false, " http: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(FunctionsScaleAndConcurrencyTriggers)} does not support writing '{options.Format}' format."); + } + } + + FunctionsScaleAndConcurrencyTriggers IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeFunctionsScaleAndConcurrencyTriggers(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FunctionsScaleAndConcurrencyTriggers)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsScaleAndConcurrencyTriggers.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsScaleAndConcurrencyTriggers.cs new file mode 100644 index 0000000000000..ff97cda7d66b1 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsScaleAndConcurrencyTriggers.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Scale and concurrency settings for the function app triggers. + internal partial class FunctionsScaleAndConcurrencyTriggers + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FunctionsScaleAndConcurrencyTriggers() + { + } + + /// Initializes a new instance of . + /// Scale and concurrency settings for the HTTP trigger. + /// Keeps track of any properties unknown to the library. + internal FunctionsScaleAndConcurrencyTriggers(FunctionsScaleAndConcurrencyTriggersHttp http, IDictionary serializedAdditionalRawData) + { + Http = http; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Scale and concurrency settings for the HTTP trigger. + internal FunctionsScaleAndConcurrencyTriggersHttp Http { get; set; } + /// The maximum number of concurrent HTTP trigger invocations per instance. + [WirePath("http.perInstanceConcurrency")] + public float? HttpPerInstanceConcurrency + { + get => Http is null ? default : Http.PerInstanceConcurrency; + set + { + if (Http is null) + Http = new FunctionsScaleAndConcurrencyTriggersHttp(); + Http.PerInstanceConcurrency = value; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsScaleAndConcurrencyTriggersHttp.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsScaleAndConcurrencyTriggersHttp.Serialization.cs new file mode 100644 index 0000000000000..4466a5bb90bbe --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsScaleAndConcurrencyTriggersHttp.Serialization.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class FunctionsScaleAndConcurrencyTriggersHttp : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionsScaleAndConcurrencyTriggersHttp)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(PerInstanceConcurrency)) + { + writer.WritePropertyName("perInstanceConcurrency"u8); + writer.WriteNumberValue(PerInstanceConcurrency.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + FunctionsScaleAndConcurrencyTriggersHttp IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FunctionsScaleAndConcurrencyTriggersHttp)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFunctionsScaleAndConcurrencyTriggersHttp(document.RootElement, options); + } + + internal static FunctionsScaleAndConcurrencyTriggersHttp DeserializeFunctionsScaleAndConcurrencyTriggersHttp(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + float? perInstanceConcurrency = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("perInstanceConcurrency"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + perInstanceConcurrency = property.Value.GetSingle(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FunctionsScaleAndConcurrencyTriggersHttp(perInstanceConcurrency, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PerInstanceConcurrency), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" perInstanceConcurrency: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PerInstanceConcurrency)) + { + builder.Append(" perInstanceConcurrency: "); + builder.AppendLine($"'{PerInstanceConcurrency.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(FunctionsScaleAndConcurrencyTriggersHttp)} does not support writing '{options.Format}' format."); + } + } + + FunctionsScaleAndConcurrencyTriggersHttp IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeFunctionsScaleAndConcurrencyTriggersHttp(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FunctionsScaleAndConcurrencyTriggersHttp)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsScaleAndConcurrencyTriggersHttp.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsScaleAndConcurrencyTriggersHttp.cs new file mode 100644 index 0000000000000..1ea3a501e0f67 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/FunctionsScaleAndConcurrencyTriggersHttp.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Scale and concurrency settings for the HTTP trigger. + internal partial class FunctionsScaleAndConcurrencyTriggersHttp + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FunctionsScaleAndConcurrencyTriggersHttp() + { + } + + /// Initializes a new instance of . + /// The maximum number of concurrent HTTP trigger invocations per instance. + /// Keeps track of any properties unknown to the library. + internal FunctionsScaleAndConcurrencyTriggersHttp(float? perInstanceConcurrency, IDictionary serializedAdditionalRawData) + { + PerInstanceConcurrency = perInstanceConcurrency; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The maximum number of concurrent HTTP trigger invocations per instance. + [WirePath("perInstanceConcurrency")] + public float? PerInstanceConcurrency { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/KubeEnvironmentPatch.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/KubeEnvironmentPatch.Serialization.cs index b0b647b9c1c28..f9a4c55cc225c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/KubeEnvironmentPatch.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/KubeEnvironmentPatch.Serialization.cs @@ -90,6 +90,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WritePropertyName("appLogsConfiguration"u8); writer.WriteObjectValue(AppLogsConfiguration, options); } + if (Optional.IsDefined(ContainerAppsConfiguration)) + { + writer.WritePropertyName("containerAppsConfiguration"u8); + writer.WriteObjectValue(ContainerAppsConfiguration, options); + } if (Optional.IsDefined(AksResourceId)) { writer.WritePropertyName("aksResourceID"u8); @@ -146,6 +151,7 @@ internal static KubeEnvironmentPatch DeserializeKubeEnvironmentPatch(JsonElement string staticIP = default; ArcConfiguration arcConfiguration = default; AppLogsConfiguration appLogsConfiguration = default; + ContainerAppsConfiguration containerAppsConfiguration = default; ResourceIdentifier aksResourceId = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -240,6 +246,15 @@ internal static KubeEnvironmentPatch DeserializeKubeEnvironmentPatch(JsonElement appLogsConfiguration = AppLogsConfiguration.DeserializeAppLogsConfiguration(property0.Value, options); continue; } + if (property0.NameEquals("containerAppsConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + containerAppsConfiguration = ContainerAppsConfiguration.DeserializeContainerAppsConfiguration(property0.Value, options); + continue; + } if (property0.NameEquals("aksResourceID"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -270,6 +285,7 @@ internal static KubeEnvironmentPatch DeserializeKubeEnvironmentPatch(JsonElement staticIP, arcConfiguration, appLogsConfiguration, + containerAppsConfiguration, aksResourceId, kind, serializedAdditionalRawData); @@ -494,6 +510,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ContainerAppsConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" containerAppsConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ContainerAppsConfiguration)) + { + builder.Append(" containerAppsConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, ContainerAppsConfiguration, options, 4, false, " containerAppsConfiguration: "); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AksResourceId), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/KubeEnvironmentPatch.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/KubeEnvironmentPatch.cs index 0d97e15f9587d..4da93740195ac 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/KubeEnvironmentPatch.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/KubeEnvironmentPatch.cs @@ -72,10 +72,11 @@ public KubeEnvironmentPatch() /// app logs to a destination. Currently only "log-analytics" is /// supported /// + /// Cluster configuration for Container Apps Environments to configure Dapr Instrumentation Key and VNET Configuration. /// /// Kind of resource. /// Keeps track of any properties unknown to the library. - internal KubeEnvironmentPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, KubeEnvironmentProvisioningState? provisioningState, string deploymentErrors, bool? isInternalLoadBalancerEnabled, string defaultDomain, string staticIP, ArcConfiguration arcConfiguration, AppLogsConfiguration appLogsConfiguration, ResourceIdentifier aksResourceId, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal KubeEnvironmentPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, KubeEnvironmentProvisioningState? provisioningState, string deploymentErrors, bool? isInternalLoadBalancerEnabled, string defaultDomain, string staticIP, ArcConfiguration arcConfiguration, AppLogsConfiguration appLogsConfiguration, ContainerAppsConfiguration containerAppsConfiguration, ResourceIdentifier aksResourceId, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { ProvisioningState = provisioningState; DeploymentErrors = deploymentErrors; @@ -84,6 +85,7 @@ internal KubeEnvironmentPatch(ResourceIdentifier id, string name, ResourceType r StaticIP = staticIP; ArcConfiguration = arcConfiguration; AppLogsConfiguration = appLogsConfiguration; + ContainerAppsConfiguration = containerAppsConfiguration; AksResourceId = aksResourceId; Kind = kind; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -118,6 +120,9 @@ internal KubeEnvironmentPatch(ResourceIdentifier id, string name, ResourceType r /// [WirePath("properties.appLogsConfiguration")] public AppLogsConfiguration AppLogsConfiguration { get; set; } + /// Cluster configuration for Container Apps Environments to configure Dapr Instrumentation Key and VNET Configuration. + [WirePath("properties.containerAppsConfiguration")] + public ContainerAppsConfiguration ContainerAppsConfiguration { get; set; } /// Gets or sets the aks resource id. [WirePath("properties.aksResourceID")] public ResourceIdentifier AksResourceId { get; set; } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationAccessPolicies.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationAccessPolicies.Serialization.cs new file mode 100644 index 0000000000000..515d8d60d7000 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationAccessPolicies.Serialization.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class OpenAuthenticationAccessPolicies : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OpenAuthenticationAccessPolicies)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(OpenAuthenticationPolicyList)) + { + writer.WritePropertyName("policies"u8); + writer.WriteStartObject(); + foreach (var item in OpenAuthenticationPolicyList) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + OpenAuthenticationAccessPolicies IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OpenAuthenticationAccessPolicies)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOpenAuthenticationAccessPolicies(document.RootElement, options); + } + + internal static OpenAuthenticationAccessPolicies DeserializeOpenAuthenticationAccessPolicies(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary policies = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("policies"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, OpenAuthenticationAccessPolicy.DeserializeOpenAuthenticationAccessPolicy(property0.Value, options)); + } + policies = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OpenAuthenticationAccessPolicies(policies ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OpenAuthenticationPolicyList), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" policies: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(OpenAuthenticationPolicyList)) + { + if (OpenAuthenticationPolicyList.Any()) + { + builder.Append(" policies: "); + builder.AppendLine("{"); + foreach (var item in OpenAuthenticationPolicyList) + { + builder.Append($" '{item.Key}': "); + BicepSerializationHelpers.AppendChildObject(builder, item.Value, options, 4, false, " policies: "); + } + builder.AppendLine(" }"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(OpenAuthenticationAccessPolicies)} does not support writing '{options.Format}' format."); + } + } + + OpenAuthenticationAccessPolicies IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeOpenAuthenticationAccessPolicies(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OpenAuthenticationAccessPolicies)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationAccessPolicies.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationAccessPolicies.cs new file mode 100644 index 0000000000000..84ef11c6064c8 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationAccessPolicies.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// AuthenticationPolicy of type Open. + internal partial class OpenAuthenticationAccessPolicies + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public OpenAuthenticationAccessPolicies() + { + OpenAuthenticationPolicyList = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Open authentication policies. + /// Keeps track of any properties unknown to the library. + internal OpenAuthenticationAccessPolicies(IDictionary openAuthenticationPolicyList, IDictionary serializedAdditionalRawData) + { + OpenAuthenticationPolicyList = openAuthenticationPolicyList; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Open authentication policies. + [WirePath("policies")] + public IDictionary OpenAuthenticationPolicyList { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationAccessPolicy.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationAccessPolicy.Serialization.cs new file mode 100644 index 0000000000000..390a25a69d445 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationAccessPolicy.Serialization.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class OpenAuthenticationAccessPolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OpenAuthenticationAccessPolicy)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(ProviderType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ProviderType.Value.ToString()); + } + if (Optional.IsCollectionDefined(Claims)) + { + writer.WritePropertyName("claims"u8); + writer.WriteStartArray(); + foreach (var item in Claims) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + OpenAuthenticationAccessPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OpenAuthenticationAccessPolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOpenAuthenticationAccessPolicy(document.RootElement, options); + } + + internal static OpenAuthenticationAccessPolicy DeserializeOpenAuthenticationAccessPolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + OpenAuthenticationProviderType? type = default; + IList claims = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new OpenAuthenticationProviderType(property.Value.GetString()); + continue; + } + if (property.NameEquals("claims"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(OpenAuthenticationPolicyClaim.DeserializeOpenAuthenticationPolicyClaim(item, options)); + } + claims = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OpenAuthenticationAccessPolicy(type, claims ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProviderType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProviderType)) + { + builder.Append(" type: "); + builder.AppendLine($"'{ProviderType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Claims), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" claims: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Claims)) + { + if (Claims.Any()) + { + builder.Append(" claims: "); + builder.AppendLine("["); + foreach (var item in Claims) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " claims: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(OpenAuthenticationAccessPolicy)} does not support writing '{options.Format}' format."); + } + } + + OpenAuthenticationAccessPolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeOpenAuthenticationAccessPolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OpenAuthenticationAccessPolicy)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationAccessPolicy.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationAccessPolicy.cs new file mode 100644 index 0000000000000..0b2fc6b015898 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationAccessPolicy.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Open authentication access policy defined by user. + public partial class OpenAuthenticationAccessPolicy + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public OpenAuthenticationAccessPolicy() + { + Claims = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Type of provider for OAuth. + /// The access policy claims. + /// Keeps track of any properties unknown to the library. + internal OpenAuthenticationAccessPolicy(OpenAuthenticationProviderType? providerType, IList claims, IDictionary serializedAdditionalRawData) + { + ProviderType = providerType; + Claims = claims; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Type of provider for OAuth. + [WirePath("type")] + public OpenAuthenticationProviderType? ProviderType { get; set; } + /// The access policy claims. + [WirePath("claims")] + public IList Claims { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationPolicyClaim.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationPolicyClaim.Serialization.cs new file mode 100644 index 0000000000000..a4520e9a2071f --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationPolicyClaim.Serialization.cs @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class OpenAuthenticationPolicyClaim : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OpenAuthenticationPolicyClaim)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + OpenAuthenticationPolicyClaim IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OpenAuthenticationPolicyClaim)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOpenAuthenticationPolicyClaim(document.RootElement, options); + } + + internal static OpenAuthenticationPolicyClaim DeserializeOpenAuthenticationPolicyClaim(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OpenAuthenticationPolicyClaim(name, value, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + if (Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Value}'''"); + } + else + { + builder.AppendLine($"'{Value}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(OpenAuthenticationPolicyClaim)} does not support writing '{options.Format}' format."); + } + } + + OpenAuthenticationPolicyClaim IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeOpenAuthenticationPolicyClaim(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OpenAuthenticationPolicyClaim)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationPolicyClaim.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationPolicyClaim.cs new file mode 100644 index 0000000000000..ebd32ac6add08 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationPolicyClaim.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Open authentication policy claim. + public partial class OpenAuthenticationPolicyClaim + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public OpenAuthenticationPolicyClaim() + { + } + + /// Initializes a new instance of . + /// The name of the claim. + /// The value of the claim. + /// Keeps track of any properties unknown to the library. + internal OpenAuthenticationPolicyClaim(string name, string value, IDictionary serializedAdditionalRawData) + { + Name = name; + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The name of the claim. + [WirePath("name")] + public string Name { get; set; } + /// The value of the claim. + [WirePath("value")] + public string Value { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationProviderType.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationProviderType.cs new file mode 100644 index 0000000000000..33ca4da368601 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/OpenAuthenticationProviderType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Open authentication policy provider type. + public readonly partial struct OpenAuthenticationProviderType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public OpenAuthenticationProviderType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AADValue = "AAD"; + + /// AAD. + public static OpenAuthenticationProviderType AAD { get; } = new OpenAuthenticationProviderType(AADValue); + /// Determines if two values are the same. + public static bool operator ==(OpenAuthenticationProviderType left, OpenAuthenticationProviderType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OpenAuthenticationProviderType left, OpenAuthenticationProviderType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator OpenAuthenticationProviderType(string value) => new OpenAuthenticationProviderType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is OpenAuthenticationProviderType other && Equals(other); + /// + public bool Equals(OpenAuthenticationProviderType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/RecurrenceScheduleOccurrence.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/RecurrenceScheduleOccurrence.Serialization.cs new file mode 100644 index 0000000000000..779aa0990a2f1 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/RecurrenceScheduleOccurrence.Serialization.cs @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class RecurrenceScheduleOccurrence : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RecurrenceScheduleOccurrence)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Day)) + { + writer.WritePropertyName("day"u8); + writer.WriteStringValue(Day.Value.ToSerialString()); + } + if (Optional.IsDefined(Occurrence)) + { + writer.WritePropertyName("occurrence"u8); + writer.WriteNumberValue(Occurrence.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + RecurrenceScheduleOccurrence IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RecurrenceScheduleOccurrence)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRecurrenceScheduleOccurrence(document.RootElement, options); + } + + internal static RecurrenceScheduleOccurrence DeserializeRecurrenceScheduleOccurrence(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + WebAppDayOfWeek? day = default; + int? occurrence = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("day"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + day = property.Value.GetString().ToWebAppDayOfWeek(); + continue; + } + if (property.NameEquals("occurrence"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + occurrence = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RecurrenceScheduleOccurrence(day, occurrence, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Day), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" day: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Day)) + { + builder.Append(" day: "); + builder.AppendLine($"'{Day.Value.ToSerialString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Occurrence), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" occurrence: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Occurrence)) + { + builder.Append(" occurrence: "); + builder.AppendLine($"{Occurrence.Value}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(RecurrenceScheduleOccurrence)} does not support writing '{options.Format}' format."); + } + } + + RecurrenceScheduleOccurrence IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeRecurrenceScheduleOccurrence(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RecurrenceScheduleOccurrence)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/RecurrenceScheduleOccurrence.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/RecurrenceScheduleOccurrence.cs new file mode 100644 index 0000000000000..93dab7f46cc89 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/RecurrenceScheduleOccurrence.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The recurrence schedule occurrence. + public partial class RecurrenceScheduleOccurrence + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal RecurrenceScheduleOccurrence() + { + } + + /// Initializes a new instance of . + /// The day of the week. + /// The occurrence. + /// Keeps track of any properties unknown to the library. + internal RecurrenceScheduleOccurrence(WebAppDayOfWeek? day, int? occurrence, IDictionary serializedAdditionalRawData) + { + Day = day; + Occurrence = occurrence; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The day of the week. + [WirePath("day")] + public WebAppDayOfWeek? Day { get; } + /// The occurrence. + [WirePath("occurrence")] + public int? Occurrence { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/RequestHistoryListResult.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/RequestHistoryListResult.Serialization.cs new file mode 100644 index 0000000000000..f7702dcd586b6 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/RequestHistoryListResult.Serialization.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class RequestHistoryListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RequestHistoryListResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + RequestHistoryListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RequestHistoryListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRequestHistoryListResult(document.RootElement, options); + } + + internal static RequestHistoryListResult DeserializeRequestHistoryListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(WebAppRequestHistoryData.DeserializeWebAppRequestHistoryData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RequestHistoryListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(RequestHistoryListResult)} does not support writing '{options.Format}' format."); + } + } + + RequestHistoryListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeRequestHistoryListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RequestHistoryListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/RequestHistoryListResult.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/RequestHistoryListResult.cs new file mode 100644 index 0000000000000..ec11970a2b1b2 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/RequestHistoryListResult.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The list of workflow request histories. + internal partial class RequestHistoryListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal RequestHistoryListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// A list of workflow request histories. + /// The URL to get the next set of results. + /// Keeps track of any properties unknown to the library. + internal RequestHistoryListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// A list of workflow request histories. + public IReadOnlyList Value { get; } + /// The URL to get the next set of results. + public string NextLink { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResourceNameAvailabilityContent.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResourceNameAvailabilityContent.Serialization.cs index a3714d6688482..0b5b974e2b759 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResourceNameAvailabilityContent.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResourceNameAvailabilityContent.Serialization.cs @@ -35,6 +35,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WritePropertyName("isFqdn"u8); writer.WriteBooleanValue(IsFqdn.Value); } + if (Optional.IsDefined(EnvironmentId)) + { + writer.WritePropertyName("environmentId"u8); + writer.WriteStringValue(EnvironmentId); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -76,6 +81,7 @@ internal static ResourceNameAvailabilityContent DeserializeResourceNameAvailabil string name = default; CheckNameResourceType type = default; bool? isFqdn = default; + string environmentId = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -99,13 +105,18 @@ internal static ResourceNameAvailabilityContent DeserializeResourceNameAvailabil isFqdn = property.Value.GetBoolean(); continue; } + if (property.NameEquals("environmentId"u8)) + { + environmentId = property.Value.GetString(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new ResourceNameAvailabilityContent(name, type, isFqdn, serializedAdditionalRawData); + return new ResourceNameAvailabilityContent(name, type, isFqdn, environmentId, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResourceNameAvailabilityContent.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResourceNameAvailabilityContent.cs index 273d646be9be8..2dfe44ed08c32 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResourceNameAvailabilityContent.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResourceNameAvailabilityContent.cs @@ -61,12 +61,14 @@ public ResourceNameAvailabilityContent(string name, CheckNameResourceType resour /// Resource name to verify. /// Resource type used for verification. /// Is fully qualified domain name. + /// Azure Resource Manager ID of the customer's selected Container Apps Environment on which to host the Function app. This must be of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}. /// Keeps track of any properties unknown to the library. - internal ResourceNameAvailabilityContent(string name, CheckNameResourceType resourceType, bool? isFqdn, IDictionary serializedAdditionalRawData) + internal ResourceNameAvailabilityContent(string name, CheckNameResourceType resourceType, bool? isFqdn, string environmentId, IDictionary serializedAdditionalRawData) { Name = name; ResourceType = resourceType; IsFqdn = isFqdn; + EnvironmentId = environmentId; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -84,5 +86,8 @@ internal ResourceNameAvailabilityContent() /// Is fully qualified domain name. [WirePath("isFqdn")] public bool? IsFqdn { get; set; } + /// Azure Resource Manager ID of the customer's selected Container Apps Environment on which to host the Function app. This must be of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}. + [WirePath("environmentId")] + public string EnvironmentId { get; set; } } } 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 0c7bd20aa8401..7319982a922c1 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 @@ -459,7 +459,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) if (Optional.IsDefined(Error)) { builder.Append(" error: "); - BicepSerializationHelpers.AppendChildObject(builder, Error, options, 2, false, " error: "); + builder.AppendLine($"'{Error.ToString()}'"); } } 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 8c9b608a16286..f06782dd50c21 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.cs @@ -101,9 +101,6 @@ internal ResponseMessageEnvelopeRemotePrivateEndpointConnection(ResourceIdentifi /// Azure-AsyncOperation Status info. [WirePath("status")] public string Status { get; } - /// Azure-AsyncOperation Error info. - [WirePath("error")] - public ResponseError Error { get; } /// MSI resource. [WirePath("identity")] public ManagedServiceIdentity Identity { get; } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteAuthSettings.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteAuthSettings.cs index 6b5fbbbaddb01..43ef6b8d9e830 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteAuthSettings.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteAuthSettings.cs @@ -113,7 +113,7 @@ public SiteAuthSettings() /// /// Gets a value indicating whether the issuer should be a valid HTTPS url and be validated as such. /// - /// Allowed audience values to consider when validating JWTs issued by + /// Allowed audience values to consider when validating JSON Web Tokens issued by /// Azure Active Directory. Note that the <code>ClientID</code> value is always considered an /// allowed audience, regardless of this setting. /// @@ -339,7 +339,7 @@ internal SiteAuthSettings(ResourceIdentifier id, string name, ResourceType resou [WirePath("properties.validateIssuer")] public bool? ValidateIssuer { get; set; } /// - /// Allowed audience values to consider when validating JWTs issued by + /// Allowed audience values to consider when validating JSON Web Tokens issued by /// Azure Active Directory. Note that the <code>ClientID</code> value is always considered an /// allowed audience, regardless of this setting. /// diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteConfigProperties.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteConfigProperties.Serialization.cs index ea73c6537fdf9..10b4297c8d1c3 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteConfigProperties.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteConfigProperties.Serialization.cs @@ -278,6 +278,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteNull("appSettings"); } } + if (Optional.IsCollectionDefined(Metadata)) + { + if (Metadata != null) + { + writer.WritePropertyName("metadata"u8); + writer.WriteStartArray(); + foreach (var item in Metadata) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("metadata"); + } + } if (Optional.IsCollectionDefined(ConnectionStrings)) { if (ConnectionStrings != null) @@ -694,6 +711,18 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteNull("ipSecurityRestrictions"); } } + if (Optional.IsDefined(IPSecurityRestrictionsDefaultAction)) + { + if (IPSecurityRestrictionsDefaultAction != null) + { + writer.WritePropertyName("ipSecurityRestrictionsDefaultAction"u8); + writer.WriteStringValue(IPSecurityRestrictionsDefaultAction.Value.ToString()); + } + else + { + writer.WriteNull("ipSecurityRestrictionsDefaultAction"); + } + } if (Optional.IsCollectionDefined(ScmIPSecurityRestrictions)) { if (ScmIPSecurityRestrictions != null) @@ -711,6 +740,18 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteNull("scmIpSecurityRestrictions"); } } + if (Optional.IsDefined(ScmIPSecurityRestrictionsDefaultAction)) + { + if (ScmIPSecurityRestrictionsDefaultAction != null) + { + writer.WritePropertyName("scmIpSecurityRestrictionsDefaultAction"u8); + writer.WriteStringValue(ScmIPSecurityRestrictionsDefaultAction.Value.ToString()); + } + else + { + writer.WriteNull("scmIpSecurityRestrictionsDefaultAction"); + } + } if (Optional.IsDefined(AllowIPSecurityRestrictionsForScmToUseMain)) { if (AllowIPSecurityRestrictionsForScmToUseMain != null) @@ -747,6 +788,18 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteNull("minTlsVersion"); } } + if (Optional.IsDefined(MinTlsCipherSuite)) + { + if (MinTlsCipherSuite != null) + { + writer.WritePropertyName("minTlsCipherSuite"u8); + writer.WriteStringValue(MinTlsCipherSuite.Value.ToString()); + } + else + { + writer.WriteNull("minTlsCipherSuite"); + } + } if (Optional.IsDefined(ScmMinTlsVersion)) { if (ScmMinTlsVersion != null) @@ -795,6 +848,18 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteNull("functionAppScaleLimit"); } } + if (Optional.IsDefined(ElasticWebAppScaleLimit)) + { + if (ElasticWebAppScaleLimit != null) + { + writer.WritePropertyName("elasticWebAppScaleLimit"u8); + writer.WriteNumberValue(ElasticWebAppScaleLimit.Value); + } + else + { + writer.WriteNull("elasticWebAppScaleLimit"); + } + } if (Optional.IsDefined(HealthCheckPath)) { if (HealthCheckPath != null) @@ -931,6 +996,7 @@ internal static SiteConfigProperties DeserializeSiteConfigProperties(JsonElement bool? detailedErrorLoggingEnabled = default; string publishingUsername = default; IList appSettings = default; + IList metadata = default; IList connectionStrings = default; SiteMachineKey machineKey = default; IList handlerMappings = default; @@ -964,14 +1030,18 @@ internal static SiteConfigProperties DeserializeSiteConfigProperties(JsonElement int? xManagedServiceIdentityId = default; string keyVaultReferenceIdentity = default; IList ipSecurityRestrictions = default; + SiteDefaultAction? ipSecurityRestrictionsDefaultAction = default; IList scmIPSecurityRestrictions = default; + SiteDefaultAction? scmIPSecurityRestrictionsDefaultAction = default; bool? scmIPSecurityRestrictionsUseMain = default; bool? http20Enabled = default; AppServiceSupportedTlsVersion? minTlsVersion = default; + AppServiceTlsCipherSuite? minTlsCipherSuite = default; AppServiceSupportedTlsVersion? scmMinTlsVersion = default; AppServiceFtpsState? ftpsState = default; int? preWarmedInstanceCount = default; int? functionAppScaleLimit = default; + int? elasticWebAppScaleLimit = default; string healthCheckPath = default; bool? functionsRuntimeScaleMonitoringEnabled = default; string websiteTimeZone = default; @@ -1192,6 +1262,21 @@ internal static SiteConfigProperties DeserializeSiteConfigProperties(JsonElement appSettings = array; continue; } + if (property.NameEquals("metadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + metadata = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AppServiceNameValuePair.DeserializeAppServiceNameValuePair(item, options)); + } + metadata = array; + continue; + } if (property.NameEquals("connectionStrings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -1542,6 +1627,16 @@ internal static SiteConfigProperties DeserializeSiteConfigProperties(JsonElement ipSecurityRestrictions = array; continue; } + if (property.NameEquals("ipSecurityRestrictionsDefaultAction"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + ipSecurityRestrictionsDefaultAction = null; + continue; + } + ipSecurityRestrictionsDefaultAction = new SiteDefaultAction(property.Value.GetString()); + continue; + } if (property.NameEquals("scmIpSecurityRestrictions"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -1557,6 +1652,16 @@ internal static SiteConfigProperties DeserializeSiteConfigProperties(JsonElement scmIPSecurityRestrictions = array; continue; } + if (property.NameEquals("scmIpSecurityRestrictionsDefaultAction"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + scmIPSecurityRestrictionsDefaultAction = null; + continue; + } + scmIPSecurityRestrictionsDefaultAction = new SiteDefaultAction(property.Value.GetString()); + continue; + } if (property.NameEquals("scmIpSecurityRestrictionsUseMain"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -1587,6 +1692,16 @@ internal static SiteConfigProperties DeserializeSiteConfigProperties(JsonElement minTlsVersion = new AppServiceSupportedTlsVersion(property.Value.GetString()); continue; } + if (property.NameEquals("minTlsCipherSuite"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + minTlsCipherSuite = null; + continue; + } + minTlsCipherSuite = new AppServiceTlsCipherSuite(property.Value.GetString()); + continue; + } if (property.NameEquals("scmMinTlsVersion"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -1627,6 +1742,16 @@ internal static SiteConfigProperties DeserializeSiteConfigProperties(JsonElement functionAppScaleLimit = property.Value.GetInt32(); continue; } + if (property.NameEquals("elasticWebAppScaleLimit"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + elasticWebAppScaleLimit = null; + continue; + } + elasticWebAppScaleLimit = property.Value.GetInt32(); + continue; + } if (property.NameEquals("healthCheckPath"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -1719,6 +1844,7 @@ internal static SiteConfigProperties DeserializeSiteConfigProperties(JsonElement detailedErrorLoggingEnabled, publishingUsername, appSettings ?? new ChangeTrackingList(), + metadata ?? new ChangeTrackingList(), connectionStrings ?? new ChangeTrackingList(), machineKey, handlerMappings ?? new ChangeTrackingList(), @@ -1752,14 +1878,18 @@ internal static SiteConfigProperties DeserializeSiteConfigProperties(JsonElement xManagedServiceIdentityId, keyVaultReferenceIdentity, ipSecurityRestrictions ?? new ChangeTrackingList(), + ipSecurityRestrictionsDefaultAction, scmIPSecurityRestrictions ?? new ChangeTrackingList(), + scmIPSecurityRestrictionsDefaultAction, scmIPSecurityRestrictionsUseMain, http20Enabled, minTlsVersion, + minTlsCipherSuite, scmMinTlsVersion, ftpsState, preWarmedInstanceCount, functionAppScaleLimit, + elasticWebAppScaleLimit, healthCheckPath, functionsRuntimeScaleMonitoringEnabled, websiteTimeZone, @@ -2195,6 +2325,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Metadata), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" metadata: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Metadata)) + { + if (Metadata.Any()) + { + builder.Append(" metadata: "); + builder.AppendLine("["); + foreach (var item in Metadata) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " metadata: "); + } + builder.AppendLine(" ]"); + } + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ConnectionStrings), out propertyOverride); if (hasPropertyOverride) { @@ -2809,6 +2962,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IPSecurityRestrictionsDefaultAction), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" ipSecurityRestrictionsDefaultAction: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IPSecurityRestrictionsDefaultAction)) + { + builder.Append(" ipSecurityRestrictionsDefaultAction: "); + builder.AppendLine($"'{IPSecurityRestrictionsDefaultAction.Value.ToString()}'"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScmIPSecurityRestrictions), out propertyOverride); if (hasPropertyOverride) { @@ -2832,6 +3000,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScmIPSecurityRestrictionsDefaultAction), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scmIpSecurityRestrictionsDefaultAction: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ScmIPSecurityRestrictionsDefaultAction)) + { + builder.Append(" scmIpSecurityRestrictionsDefaultAction: "); + builder.AppendLine($"'{ScmIPSecurityRestrictionsDefaultAction.Value.ToString()}'"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AllowIPSecurityRestrictionsForScmToUseMain), out propertyOverride); if (hasPropertyOverride) { @@ -2879,6 +3062,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MinTlsCipherSuite), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" minTlsCipherSuite: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MinTlsCipherSuite)) + { + builder.Append(" minTlsCipherSuite: "); + builder.AppendLine($"'{MinTlsCipherSuite.Value.ToString()}'"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScmMinTlsVersion), out propertyOverride); if (hasPropertyOverride) { @@ -2939,6 +3137,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ElasticWebAppScaleLimit), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" elasticWebAppScaleLimit: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ElasticWebAppScaleLimit)) + { + builder.Append(" elasticWebAppScaleLimit: "); + builder.AppendLine($"{ElasticWebAppScaleLimit.Value}"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(HealthCheckPath), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteConfigProperties.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteConfigProperties.cs index 7279f3b43e837..3477cc4e78055 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteConfigProperties.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteConfigProperties.cs @@ -50,6 +50,7 @@ public SiteConfigProperties() { DefaultDocuments = new ChangeTrackingList(); AppSettings = new ChangeTrackingList(); + Metadata = new ChangeTrackingList(); ConnectionStrings = new ChangeTrackingList(); HandlerMappings = new ChangeTrackingList(); VirtualApplications = new ChangeTrackingList(); @@ -79,6 +80,7 @@ public SiteConfigProperties() /// <code>true</code> if detailed error logging is enabled; otherwise, <code>false</code>. /// Publishing user name. /// Application settings. + /// Application metadata. This property cannot be retrieved, since it may contain secrets. /// Connection strings. /// Site MachineKey. /// Handler mappings. @@ -112,10 +114,13 @@ public SiteConfigProperties() /// Explicit Managed Service Identity Id. /// Identity to use for Key Vault Reference authentication. /// IP security restrictions for main. + /// Default action for main access restriction if no rules are matched. /// IP security restrictions for scm. + /// Default action for scm access restriction if no rules are matched. /// 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. + /// The minimum strength TLS cipher suite allowed for an application. /// ScmMinTlsVersion: configures the minimum version of TLS required for SSL requests for SCM site. /// State of FTP / FTPS service. /// @@ -126,6 +131,10 @@ public SiteConfigProperties() /// Maximum number of workers that a site can scale out to. /// This setting only applies to the Consumption and Elastic Premium Plans /// + /// + /// Maximum number of workers that a site can scale out to. + /// This setting only applies to apps in plans where ElasticScaleEnabled is <code>true</code> + /// /// Health check path. /// /// Gets or sets a value indicating whether functions runtime scale monitoring is enabled. When enabled, @@ -140,7 +149,7 @@ public SiteConfigProperties() /// List of Azure Storage Accounts. /// Property to allow or block all public traffic. /// Keeps track of any properties unknown to the library. - internal SiteConfigProperties(int? numberOfWorkers, IList defaultDocuments, string netFrameworkVersion, string phpVersion, string pythonVersion, string nodeVersion, string powerShellVersion, string linuxFxVersion, string windowsFxVersion, bool? isRequestTracingEnabled, DateTimeOffset? requestTracingExpirationOn, bool? isRemoteDebuggingEnabled, string remoteDebuggingVersion, bool? isHttpLoggingEnabled, bool? useManagedIdentityCreds, string acrUserManagedIdentityId, int? logsDirectorySizeLimit, bool? isDetailedErrorLoggingEnabled, string publishingUsername, IList appSettings, IList connectionStrings, SiteMachineKey machineKey, IList handlerMappings, string documentRoot, ScmType? scmType, bool? use32BitWorkerProcess, bool? isWebSocketsEnabled, bool? isAlwaysOn, string javaVersion, string javaContainer, string javaContainerVersion, string appCommandLine, ManagedPipelineMode? managedPipelineMode, IList virtualApplications, SiteLoadBalancing? loadBalancing, RoutingRuleExperiments experiments, SiteLimits limits, bool? isAutoHealEnabled, AutoHealRules autoHealRules, string tracingOptions, string vnetName, bool? isVnetRouteAllEnabled, int? vnetPrivatePortsCount, AppServiceCorsSettings cors, WebAppPushSettings push, AppServiceApiDefinitionInfo apiDefinition, ApiManagementConfig apiManagementConfig, string autoSwapSlotName, bool? isLocalMySqlEnabled, int? managedServiceIdentityId, int? xManagedServiceIdentityId, string keyVaultReferenceIdentity, IList ipSecurityRestrictions, IList scmIPSecurityRestrictions, bool? allowIPSecurityRestrictionsForScmToUseMain, bool? isHttp20Enabled, AppServiceSupportedTlsVersion? minTlsVersion, AppServiceSupportedTlsVersion? scmMinTlsVersion, AppServiceFtpsState? ftpsState, int? preWarmedInstanceCount, int? functionAppScaleLimit, string healthCheckPath, bool? isFunctionsRuntimeScaleMonitoringEnabled, string websiteTimeZone, int? minimumElasticInstanceCount, IDictionary azureStorageAccounts, string publicNetworkAccess, IDictionary serializedAdditionalRawData) + internal SiteConfigProperties(int? numberOfWorkers, IList defaultDocuments, string netFrameworkVersion, string phpVersion, string pythonVersion, string nodeVersion, string powerShellVersion, string linuxFxVersion, string windowsFxVersion, bool? isRequestTracingEnabled, DateTimeOffset? requestTracingExpirationOn, bool? isRemoteDebuggingEnabled, string remoteDebuggingVersion, bool? isHttpLoggingEnabled, bool? useManagedIdentityCreds, string acrUserManagedIdentityId, int? logsDirectorySizeLimit, bool? isDetailedErrorLoggingEnabled, string publishingUsername, IList appSettings, IList metadata, IList connectionStrings, SiteMachineKey machineKey, IList handlerMappings, string documentRoot, ScmType? scmType, bool? use32BitWorkerProcess, bool? isWebSocketsEnabled, bool? isAlwaysOn, string javaVersion, string javaContainer, string javaContainerVersion, string appCommandLine, ManagedPipelineMode? managedPipelineMode, IList virtualApplications, SiteLoadBalancing? loadBalancing, RoutingRuleExperiments experiments, SiteLimits limits, bool? isAutoHealEnabled, AutoHealRules autoHealRules, string tracingOptions, string vnetName, bool? isVnetRouteAllEnabled, int? vnetPrivatePortsCount, AppServiceCorsSettings cors, WebAppPushSettings push, AppServiceApiDefinitionInfo apiDefinition, ApiManagementConfig apiManagementConfig, string autoSwapSlotName, bool? isLocalMySqlEnabled, int? managedServiceIdentityId, int? xManagedServiceIdentityId, string keyVaultReferenceIdentity, IList ipSecurityRestrictions, SiteDefaultAction? ipSecurityRestrictionsDefaultAction, IList scmIPSecurityRestrictions, SiteDefaultAction? scmIPSecurityRestrictionsDefaultAction, bool? allowIPSecurityRestrictionsForScmToUseMain, bool? isHttp20Enabled, AppServiceSupportedTlsVersion? minTlsVersion, AppServiceTlsCipherSuite? minTlsCipherSuite, AppServiceSupportedTlsVersion? scmMinTlsVersion, AppServiceFtpsState? ftpsState, int? preWarmedInstanceCount, int? functionAppScaleLimit, int? elasticWebAppScaleLimit, string healthCheckPath, bool? isFunctionsRuntimeScaleMonitoringEnabled, string websiteTimeZone, int? minimumElasticInstanceCount, IDictionary azureStorageAccounts, string publicNetworkAccess, IDictionary serializedAdditionalRawData) { NumberOfWorkers = numberOfWorkers; DefaultDocuments = defaultDocuments; @@ -162,6 +171,7 @@ internal SiteConfigProperties(int? numberOfWorkers, IList defaultDocumen IsDetailedErrorLoggingEnabled = isDetailedErrorLoggingEnabled; PublishingUsername = publishingUsername; AppSettings = appSettings; + Metadata = metadata; ConnectionStrings = connectionStrings; MachineKey = machineKey; HandlerMappings = handlerMappings; @@ -195,14 +205,18 @@ internal SiteConfigProperties(int? numberOfWorkers, IList defaultDocumen XManagedServiceIdentityId = xManagedServiceIdentityId; KeyVaultReferenceIdentity = keyVaultReferenceIdentity; IPSecurityRestrictions = ipSecurityRestrictions; + IPSecurityRestrictionsDefaultAction = ipSecurityRestrictionsDefaultAction; ScmIPSecurityRestrictions = scmIPSecurityRestrictions; + ScmIPSecurityRestrictionsDefaultAction = scmIPSecurityRestrictionsDefaultAction; AllowIPSecurityRestrictionsForScmToUseMain = allowIPSecurityRestrictionsForScmToUseMain; IsHttp20Enabled = isHttp20Enabled; MinTlsVersion = minTlsVersion; + MinTlsCipherSuite = minTlsCipherSuite; ScmMinTlsVersion = scmMinTlsVersion; FtpsState = ftpsState; PreWarmedInstanceCount = preWarmedInstanceCount; FunctionAppScaleLimit = functionAppScaleLimit; + ElasticWebAppScaleLimit = elasticWebAppScaleLimit; HealthCheckPath = healthCheckPath; IsFunctionsRuntimeScaleMonitoringEnabled = isFunctionsRuntimeScaleMonitoringEnabled; WebsiteTimeZone = websiteTimeZone; @@ -272,6 +286,9 @@ internal SiteConfigProperties(int? numberOfWorkers, IList defaultDocumen /// Application settings. [WirePath("appSettings")] public IList AppSettings { get; set; } + /// Application metadata. This property cannot be retrieved, since it may contain secrets. + [WirePath("metadata")] + public IList Metadata { get; set; } /// Connection strings. [WirePath("connectionStrings")] public IList ConnectionStrings { get; set; } @@ -406,9 +423,15 @@ public string ApiManagementConfigId /// IP security restrictions for main. [WirePath("ipSecurityRestrictions")] public IList IPSecurityRestrictions { get; set; } + /// Default action for main access restriction if no rules are matched. + [WirePath("ipSecurityRestrictionsDefaultAction")] + public SiteDefaultAction? IPSecurityRestrictionsDefaultAction { get; set; } /// IP security restrictions for scm. [WirePath("scmIpSecurityRestrictions")] public IList ScmIPSecurityRestrictions { get; set; } + /// Default action for scm access restriction if no rules are matched. + [WirePath("scmIpSecurityRestrictionsDefaultAction")] + public SiteDefaultAction? ScmIPSecurityRestrictionsDefaultAction { get; set; } /// IP security restrictions for scm to use main. [WirePath("scmIpSecurityRestrictionsUseMain")] public bool? AllowIPSecurityRestrictionsForScmToUseMain { get; set; } @@ -418,6 +441,9 @@ public string ApiManagementConfigId /// MinTlsVersion: configures the minimum version of TLS required for SSL requests. [WirePath("minTlsVersion")] public AppServiceSupportedTlsVersion? MinTlsVersion { get; set; } + /// The minimum strength TLS cipher suite allowed for an application. + [WirePath("minTlsCipherSuite")] + public AppServiceTlsCipherSuite? MinTlsCipherSuite { get; set; } /// ScmMinTlsVersion: configures the minimum version of TLS required for SSL requests for SCM site. [WirePath("scmMinTlsVersion")] public AppServiceSupportedTlsVersion? ScmMinTlsVersion { get; set; } @@ -436,6 +462,12 @@ public string ApiManagementConfigId /// [WirePath("functionAppScaleLimit")] public int? FunctionAppScaleLimit { get; set; } + /// + /// Maximum number of workers that a site can scale out to. + /// This setting only applies to apps in plans where ElasticScaleEnabled is <code>true</code> + /// + [WirePath("elasticWebAppScaleLimit")] + public int? ElasticWebAppScaleLimit { get; set; } /// Health check path. [WirePath("healthCheckPath")] public string HealthCheckPath { get; set; } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerAuthType.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerAuthType.Serialization.cs new file mode 100644 index 0000000000000..44e55d62d4cfd --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerAuthType.Serialization.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.AppService.Models +{ + internal static partial class SiteContainerAuthTypeExtensions + { + public static string ToSerialString(this SiteContainerAuthType value) => value switch + { + SiteContainerAuthType.Anonymous => "Anonymous", + SiteContainerAuthType.UserCredentials => "UserCredentials", + SiteContainerAuthType.SystemIdentity => "SystemIdentity", + SiteContainerAuthType.UserAssigned => "UserAssigned", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SiteContainerAuthType value.") + }; + + public static SiteContainerAuthType ToSiteContainerAuthType(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Anonymous")) return SiteContainerAuthType.Anonymous; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "UserCredentials")) return SiteContainerAuthType.UserCredentials; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "SystemIdentity")) return SiteContainerAuthType.SystemIdentity; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "UserAssigned")) return SiteContainerAuthType.UserAssigned; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SiteContainerAuthType value."); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerAuthType.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerAuthType.cs new file mode 100644 index 0000000000000..8d4b027c4077d --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerAuthType.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppService.Models +{ + /// Auth Type. + public enum SiteContainerAuthType + { + /// Anonymous. + Anonymous, + /// UserCredentials. + UserCredentials, + /// SystemIdentity. + SystemIdentity, + /// UserAssigned. + UserAssigned + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerCollection.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerCollection.Serialization.cs new file mode 100644 index 0000000000000..b8375ab31b27c --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerCollection.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class SiteContainerCollection : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SiteContainerCollection)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + SiteContainerCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SiteContainerCollection)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSiteContainerCollection(document.RootElement, options); + } + + internal static SiteContainerCollection DeserializeSiteContainerCollection(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SiteContainerData.DeserializeSiteContainerData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SiteContainerCollection(value, nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(SiteContainerCollection)} does not support writing '{options.Format}' format."); + } + } + + SiteContainerCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSiteContainerCollection(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SiteContainerCollection)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerCollection.cs new file mode 100644 index 0000000000000..3def47fb38b9e --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerCollection.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Collection of site containers. + internal partial class SiteContainerCollection + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Collection of resources. + /// is null. + internal SiteContainerCollection(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// Collection of resources. + /// Link to next page of resources. + /// Keeps track of any properties unknown to the library. + internal SiteContainerCollection(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SiteContainerCollection() + { + } + + /// Collection of resources. + public IReadOnlyList Value { get; } + /// Link to next page of resources. + public string NextLink { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerVolumeMount.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerVolumeMount.Serialization.cs new file mode 100644 index 0000000000000..71fd12c6b8be9 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerVolumeMount.Serialization.cs @@ -0,0 +1,256 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class SiteContainerVolumeMount : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SiteContainerVolumeMount)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("volumeSubPath"u8); + writer.WriteStringValue(VolumeSubPath); + writer.WritePropertyName("containerMountPath"u8); + writer.WriteStringValue(ContainerMountPath); + if (Optional.IsDefined(Data)) + { + writer.WritePropertyName("data"u8); + writer.WriteStringValue(Data); + } + if (Optional.IsDefined(IsReadOnly)) + { + writer.WritePropertyName("readOnly"u8); + writer.WriteBooleanValue(IsReadOnly.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + SiteContainerVolumeMount IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SiteContainerVolumeMount)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSiteContainerVolumeMount(document.RootElement, options); + } + + internal static SiteContainerVolumeMount DeserializeSiteContainerVolumeMount(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string volumeSubPath = default; + string containerMountPath = default; + string data = default; + bool? readOnly = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("volumeSubPath"u8)) + { + volumeSubPath = property.Value.GetString(); + continue; + } + if (property.NameEquals("containerMountPath"u8)) + { + containerMountPath = property.Value.GetString(); + continue; + } + if (property.NameEquals("data"u8)) + { + data = property.Value.GetString(); + continue; + } + if (property.NameEquals("readOnly"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + readOnly = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SiteContainerVolumeMount(volumeSubPath, containerMountPath, data, readOnly, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VolumeSubPath), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" volumeSubPath: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(VolumeSubPath)) + { + builder.Append(" volumeSubPath: "); + if (VolumeSubPath.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{VolumeSubPath}'''"); + } + else + { + builder.AppendLine($"'{VolumeSubPath}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ContainerMountPath), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" containerMountPath: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ContainerMountPath)) + { + builder.Append(" containerMountPath: "); + if (ContainerMountPath.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ContainerMountPath}'''"); + } + else + { + builder.AppendLine($"'{ContainerMountPath}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Data), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" data: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Data)) + { + builder.Append(" data: "); + if (Data.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Data}'''"); + } + else + { + builder.AppendLine($"'{Data}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsReadOnly), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" readOnly: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsReadOnly)) + { + builder.Append(" readOnly: "); + var boolValue = IsReadOnly.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(SiteContainerVolumeMount)} does not support writing '{options.Format}' format."); + } + } + + SiteContainerVolumeMount IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSiteContainerVolumeMount(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SiteContainerVolumeMount)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerVolumeMount.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerVolumeMount.cs new file mode 100644 index 0000000000000..1accded9c6389 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteContainerVolumeMount.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The SiteContainerVolumeMount. + public partial class SiteContainerVolumeMount + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Sub path in the volume where volume is mounted from. + /// Target path on the container where volume is mounted on. + /// or is null. + public SiteContainerVolumeMount(string volumeSubPath, string containerMountPath) + { + Argument.AssertNotNull(volumeSubPath, nameof(volumeSubPath)); + Argument.AssertNotNull(containerMountPath, nameof(containerMountPath)); + + VolumeSubPath = volumeSubPath; + ContainerMountPath = containerMountPath; + } + + /// Initializes a new instance of . + /// Sub path in the volume where volume is mounted from. + /// Target path on the container where volume is mounted on. + /// Config Data to be mounted on the volume. + /// Boolean to specify if the mount is read only on the container. + /// Keeps track of any properties unknown to the library. + internal SiteContainerVolumeMount(string volumeSubPath, string containerMountPath, string data, bool? isReadOnly, IDictionary serializedAdditionalRawData) + { + VolumeSubPath = volumeSubPath; + ContainerMountPath = containerMountPath; + Data = data; + IsReadOnly = isReadOnly; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SiteContainerVolumeMount() + { + } + + /// Sub path in the volume where volume is mounted from. + [WirePath("volumeSubPath")] + public string VolumeSubPath { get; set; } + /// Target path on the container where volume is mounted on. + [WirePath("containerMountPath")] + public string ContainerMountPath { get; set; } + /// Config Data to be mounted on the volume. + [WirePath("data")] + public string Data { get; set; } + /// Boolean to specify if the mount is read only on the container. + [WirePath("readOnly")] + public bool? IsReadOnly { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteDefaultAction.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteDefaultAction.cs new file mode 100644 index 0000000000000..3b618a5ffb14f --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteDefaultAction.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.AppService.Models +{ + /// Default action for main access restriction if no rules are matched. + public readonly partial struct SiteDefaultAction : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SiteDefaultAction(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AllowValue = "Allow"; + private const string DenyValue = "Deny"; + + /// Allow. + public static SiteDefaultAction Allow { get; } = new SiteDefaultAction(AllowValue); + /// Deny. + public static SiteDefaultAction Deny { get; } = new SiteDefaultAction(DenyValue); + /// Determines if two values are the same. + public static bool operator ==(SiteDefaultAction left, SiteDefaultAction right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SiteDefaultAction left, SiteDefaultAction right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SiteDefaultAction(string value) => new SiteDefaultAction(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SiteDefaultAction other && Equals(other); + /// + public bool Equals(SiteDefaultAction other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteDnsConfig.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteDnsConfig.Serialization.cs new file mode 100644 index 0000000000000..8c194de2c8d83 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteDnsConfig.Serialization.cs @@ -0,0 +1,353 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class SiteDnsConfig : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SiteDnsConfig)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(DnsServers)) + { + writer.WritePropertyName("dnsServers"u8); + writer.WriteStartArray(); + foreach (var item in DnsServers) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(DnsAltServer)) + { + writer.WritePropertyName("dnsAltServer"u8); + writer.WriteStringValue(DnsAltServer); + } + if (Optional.IsDefined(DnsRetryAttemptTimeout)) + { + writer.WritePropertyName("dnsRetryAttemptTimeout"u8); + writer.WriteNumberValue(DnsRetryAttemptTimeout.Value); + } + if (Optional.IsDefined(DnsRetryAttemptCount)) + { + writer.WritePropertyName("dnsRetryAttemptCount"u8); + writer.WriteNumberValue(DnsRetryAttemptCount.Value); + } + if (Optional.IsDefined(DnsMaxCacheTimeout)) + { + writer.WritePropertyName("dnsMaxCacheTimeout"u8); + writer.WriteNumberValue(DnsMaxCacheTimeout.Value); + } + if (options.Format != "W" && Optional.IsDefined(DnsLegacySortOrder)) + { + writer.WritePropertyName("dnsLegacySortOrder"u8); + writer.WriteBooleanValue(DnsLegacySortOrder.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + SiteDnsConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SiteDnsConfig)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSiteDnsConfig(document.RootElement, options); + } + + internal static SiteDnsConfig DeserializeSiteDnsConfig(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList dnsServers = default; + string dnsAltServer = default; + int? dnsRetryAttemptTimeout = default; + int? dnsRetryAttemptCount = default; + int? dnsMaxCacheTimeout = default; + bool? dnsLegacySortOrder = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dnsServers"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + dnsServers = array; + continue; + } + if (property.NameEquals("dnsAltServer"u8)) + { + dnsAltServer = property.Value.GetString(); + continue; + } + if (property.NameEquals("dnsRetryAttemptTimeout"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dnsRetryAttemptTimeout = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("dnsRetryAttemptCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dnsRetryAttemptCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("dnsMaxCacheTimeout"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dnsMaxCacheTimeout = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("dnsLegacySortOrder"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dnsLegacySortOrder = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SiteDnsConfig( + dnsServers ?? new ChangeTrackingList(), + dnsAltServer, + dnsRetryAttemptTimeout, + dnsRetryAttemptCount, + dnsMaxCacheTimeout, + dnsLegacySortOrder, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DnsServers), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" dnsServers: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(DnsServers)) + { + if (DnsServers.Any()) + { + builder.Append(" dnsServers: "); + builder.AppendLine("["); + foreach (var item in DnsServers) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DnsAltServer), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" dnsAltServer: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DnsAltServer)) + { + builder.Append(" dnsAltServer: "); + if (DnsAltServer.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DnsAltServer}'''"); + } + else + { + builder.AppendLine($"'{DnsAltServer}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DnsRetryAttemptTimeout), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" dnsRetryAttemptTimeout: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DnsRetryAttemptTimeout)) + { + builder.Append(" dnsRetryAttemptTimeout: "); + builder.AppendLine($"{DnsRetryAttemptTimeout.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DnsRetryAttemptCount), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" dnsRetryAttemptCount: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DnsRetryAttemptCount)) + { + builder.Append(" dnsRetryAttemptCount: "); + builder.AppendLine($"{DnsRetryAttemptCount.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DnsMaxCacheTimeout), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" dnsMaxCacheTimeout: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DnsMaxCacheTimeout)) + { + builder.Append(" dnsMaxCacheTimeout: "); + builder.AppendLine($"{DnsMaxCacheTimeout.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DnsLegacySortOrder), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" dnsLegacySortOrder: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DnsLegacySortOrder)) + { + builder.Append(" dnsLegacySortOrder: "); + var boolValue = DnsLegacySortOrder.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(SiteDnsConfig)} does not support writing '{options.Format}' format."); + } + } + + SiteDnsConfig IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSiteDnsConfig(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SiteDnsConfig)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteDnsConfig.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteDnsConfig.cs new file mode 100644 index 0000000000000..9d472159cbf55 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SiteDnsConfig.cs @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The SiteDnsConfig. + public partial class SiteDnsConfig + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SiteDnsConfig() + { + DnsServers = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// List of custom DNS servers to be used by an app for lookups. Maximum 5 dns servers can be set. + /// Alternate DNS server to be used by apps. This property replicates the WEBSITE_DNS_ALT_SERVER app setting. + /// Timeout for a single dns lookup in seconds. Allowed range: 1-30. Default is 3. + /// Total number of retries for dns lookup. Allowed range: 1-5. Default is 3. + /// Custom time for DNS to be cached in seconds. Allowed range: 0-60. Default is 30 seconds. 0 means caching disabled. + /// Indicates that sites using Virtual network custom DNS servers are still sorting the list of DNS servers. Read-Only. + /// Keeps track of any properties unknown to the library. + internal SiteDnsConfig(IList dnsServers, string dnsAltServer, int? dnsRetryAttemptTimeout, int? dnsRetryAttemptCount, int? dnsMaxCacheTimeout, bool? dnsLegacySortOrder, IDictionary serializedAdditionalRawData) + { + DnsServers = dnsServers; + DnsAltServer = dnsAltServer; + DnsRetryAttemptTimeout = dnsRetryAttemptTimeout; + DnsRetryAttemptCount = dnsRetryAttemptCount; + DnsMaxCacheTimeout = dnsMaxCacheTimeout; + DnsLegacySortOrder = dnsLegacySortOrder; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// List of custom DNS servers to be used by an app for lookups. Maximum 5 dns servers can be set. + [WirePath("dnsServers")] + public IList DnsServers { get; } + /// Alternate DNS server to be used by apps. This property replicates the WEBSITE_DNS_ALT_SERVER app setting. + [WirePath("dnsAltServer")] + public string DnsAltServer { get; set; } + /// Timeout for a single dns lookup in seconds. Allowed range: 1-30. Default is 3. + [WirePath("dnsRetryAttemptTimeout")] + public int? DnsRetryAttemptTimeout { get; set; } + /// Total number of retries for dns lookup. Allowed range: 1-5. Default is 3. + [WirePath("dnsRetryAttemptCount")] + public int? DnsRetryAttemptCount { get; set; } + /// Custom time for DNS to be cached in seconds. Allowed range: 0-60. Default is 30 seconds. 0 means caching disabled. + [WirePath("dnsMaxCacheTimeout")] + public int? DnsMaxCacheTimeout { get; set; } + /// Indicates that sites using Virtual network custom DNS servers are still sorting the list of DNS servers. Read-Only. + [WirePath("dnsLegacySortOrder")] + public bool? DnsLegacySortOrder { 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 52f2db0769ec7..350b7da3c95e4 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 @@ -141,6 +141,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt writer.WritePropertyName("lastModifiedTimeUtc"u8); writer.WriteStringValue(LastModifiedOn.Value, "O"); } + if (Optional.IsDefined(DnsConfiguration)) + { + writer.WritePropertyName("dnsConfiguration"u8); + writer.WriteObjectValue(DnsConfiguration, options); + } if (Optional.IsDefined(SiteConfig)) { writer.WritePropertyName("siteConfig"u8); @@ -344,6 +349,7 @@ internal static SitePatchInfo DeserializeSitePatchInfo(JsonElement element, Mode bool? isXenon = default; bool? hyperV = default; DateTimeOffset? lastModifiedTimeUtc = default; + SiteDnsConfig dnsConfiguration = default; SiteConfigProperties siteConfig = default; IReadOnlyList trafficManagerHostNames = default; bool? scmSiteAlsoStopped = default; @@ -547,6 +553,15 @@ internal static SitePatchInfo DeserializeSitePatchInfo(JsonElement element, Mode lastModifiedTimeUtc = property0.Value.GetDateTimeOffset("O"); continue; } + if (property0.NameEquals("dnsConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dnsConfiguration = SiteDnsConfig.DeserializeSiteDnsConfig(property0.Value, options); + continue; + } if (property0.NameEquals("siteConfig"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -800,6 +815,7 @@ internal static SitePatchInfo DeserializeSitePatchInfo(JsonElement element, Mode isXenon, hyperV, lastModifiedTimeUtc, + dnsConfiguration, siteConfig, trafficManagerHostNames ?? new ChangeTrackingList(), scmSiteAlsoStopped, @@ -1202,6 +1218,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DnsConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" dnsConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DnsConfiguration)) + { + builder.Append(" dnsConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, DnsConfiguration, options, 4, false, " dnsConfiguration: "); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SiteConfig), out propertyOverride); if (hasPropertyOverride) { 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 1e83277912077..a8dfcea222233 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SitePatchInfo.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/SitePatchInfo.cs @@ -78,6 +78,7 @@ public SitePatchInfo() /// Obsolete: Hyper-V sandbox. /// Hyper-V sandbox. /// Last time the app was modified, in UTC. Read-only. + /// Property to configure various DNS related settings for a site. /// Configuration of the app. /// Azure Traffic Manager hostnames associated with the app. Read-only. /// <code>true</code> to stop SCM (KUDU) site when the app is stopped; otherwise, <code>false</code>. The default is <code>false</code>. @@ -125,7 +126,7 @@ public SitePatchInfo() /// /// Kind of resource. /// Keeps track of any properties unknown to the library. - 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, IDictionary serializedAdditionalRawData) : 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, SiteDnsConfig dnsConfiguration, 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, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { Identity = identity; State = state; @@ -141,6 +142,7 @@ internal SitePatchInfo(ResourceIdentifier id, string name, ResourceType resource IsXenon = isXenon; IsHyperV = isHyperV; LastModifiedOn = lastModifiedOn; + DnsConfiguration = dnsConfiguration; SiteConfig = siteConfig; TrafficManagerHostNames = trafficManagerHostNames; IsScmSiteAlsoStopped = isScmSiteAlsoStopped; @@ -218,6 +220,9 @@ internal SitePatchInfo(ResourceIdentifier id, string name, ResourceType resource /// Last time the app was modified, in UTC. Read-only. [WirePath("properties.lastModifiedTimeUtc")] public DateTimeOffset? LastModifiedOn { get; } + /// Property to configure various DNS related settings for a site. + [WirePath("properties.dnsConfiguration")] + public SiteDnsConfig DnsConfiguration { get; set; } /// Configuration of the app. [WirePath("properties.siteConfig")] public SiteConfigProperties SiteConfig { get; set; } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteBasicAuthName.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteBasicAuthName.cs new file mode 100644 index 0000000000000..82e2f2864f616 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteBasicAuthName.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The StaticSiteBasicAuthName. + public readonly partial struct StaticSiteBasicAuthName : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public StaticSiteBasicAuthName(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DefaultValue = "default"; + + /// default. + public static StaticSiteBasicAuthName Default { get; } = new StaticSiteBasicAuthName(DefaultValue); + /// Determines if two values are the same. + public static bool operator ==(StaticSiteBasicAuthName left, StaticSiteBasicAuthName right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(StaticSiteBasicAuthName left, StaticSiteBasicAuthName right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator StaticSiteBasicAuthName(string value) => new StaticSiteBasicAuthName(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is StaticSiteBasicAuthName other && Equals(other); + /// + public bool Equals(StaticSiteBasicAuthName other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteBasicAuthPropertiesCollection.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteBasicAuthPropertiesCollection.Serialization.cs new file mode 100644 index 0000000000000..1b182d3a1048e --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteBasicAuthPropertiesCollection.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class StaticSiteBasicAuthPropertiesCollection : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StaticSiteBasicAuthPropertiesCollection)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + StaticSiteBasicAuthPropertiesCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StaticSiteBasicAuthPropertiesCollection)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStaticSiteBasicAuthPropertiesCollection(document.RootElement, options); + } + + internal static StaticSiteBasicAuthPropertiesCollection DeserializeStaticSiteBasicAuthPropertiesCollection(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(StaticSiteBasicAuthPropertyData.DeserializeStaticSiteBasicAuthPropertyData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StaticSiteBasicAuthPropertiesCollection(value, nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(StaticSiteBasicAuthPropertiesCollection)} does not support writing '{options.Format}' format."); + } + } + + StaticSiteBasicAuthPropertiesCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeStaticSiteBasicAuthPropertiesCollection(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StaticSiteBasicAuthPropertiesCollection)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteBasicAuthPropertiesCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteBasicAuthPropertiesCollection.cs new file mode 100644 index 0000000000000..ff8b7d7c23283 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteBasicAuthPropertiesCollection.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Collection of static site basic auth. + internal partial class StaticSiteBasicAuthPropertiesCollection + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Collection of resources. + /// is null. + internal StaticSiteBasicAuthPropertiesCollection(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// Collection of resources. + /// Link to next page of resources. + /// Keeps track of any properties unknown to the library. + internal StaticSiteBasicAuthPropertiesCollection(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal StaticSiteBasicAuthPropertiesCollection() + { + } + + /// Collection of resources. + public IReadOnlyList Value { get; } + /// Link to next page of resources. + public string NextLink { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionConfigurationFileOverview.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionConfigurationFileOverview.Serialization.cs new file mode 100644 index 0000000000000..d366fb946f2f1 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionConfigurationFileOverview.Serialization.cs @@ -0,0 +1,231 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class StaticSiteDatabaseConnectionConfigurationFileOverview : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StaticSiteDatabaseConnectionConfigurationFileOverview)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(FileName)) + { + writer.WritePropertyName("fileName"u8); + writer.WriteStringValue(FileName); + } + if (options.Format != "W" && Optional.IsDefined(Contents)) + { + writer.WritePropertyName("contents"u8); + writer.WriteStringValue(Contents); + } + if (options.Format != "W" && Optional.IsDefined(StaticSiteDatabaseConnectionConfigurationFileOverviewType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(StaticSiteDatabaseConnectionConfigurationFileOverviewType); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + StaticSiteDatabaseConnectionConfigurationFileOverview IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StaticSiteDatabaseConnectionConfigurationFileOverview)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStaticSiteDatabaseConnectionConfigurationFileOverview(document.RootElement, options); + } + + internal static StaticSiteDatabaseConnectionConfigurationFileOverview DeserializeStaticSiteDatabaseConnectionConfigurationFileOverview(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string fileName = default; + string contents = default; + string type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("fileName"u8)) + { + fileName = property.Value.GetString(); + continue; + } + if (property.NameEquals("contents"u8)) + { + contents = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StaticSiteDatabaseConnectionConfigurationFileOverview(fileName, contents, type, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(FileName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" fileName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(FileName)) + { + builder.Append(" fileName: "); + if (FileName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{FileName}'''"); + } + else + { + builder.AppendLine($"'{FileName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Contents), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" contents: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Contents)) + { + builder.Append(" contents: "); + if (Contents.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Contents}'''"); + } + else + { + builder.AppendLine($"'{Contents}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StaticSiteDatabaseConnectionConfigurationFileOverviewType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StaticSiteDatabaseConnectionConfigurationFileOverviewType)) + { + builder.Append(" type: "); + if (StaticSiteDatabaseConnectionConfigurationFileOverviewType.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{StaticSiteDatabaseConnectionConfigurationFileOverviewType}'''"); + } + else + { + builder.AppendLine($"'{StaticSiteDatabaseConnectionConfigurationFileOverviewType}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(StaticSiteDatabaseConnectionConfigurationFileOverview)} does not support writing '{options.Format}' format."); + } + } + + StaticSiteDatabaseConnectionConfigurationFileOverview IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeStaticSiteDatabaseConnectionConfigurationFileOverview(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StaticSiteDatabaseConnectionConfigurationFileOverview)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionConfigurationFileOverview.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionConfigurationFileOverview.cs new file mode 100644 index 0000000000000..348e653f803ca --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionConfigurationFileOverview.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// A database connection configuration file. + public partial class StaticSiteDatabaseConnectionConfigurationFileOverview + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal StaticSiteDatabaseConnectionConfigurationFileOverview() + { + } + + /// Initializes a new instance of . + /// The name of the configuration file. + /// The Base64 encoding of the file contents. + /// The type of configuration file. + /// Keeps track of any properties unknown to the library. + internal StaticSiteDatabaseConnectionConfigurationFileOverview(string fileName, string contents, string staticSiteDatabaseConnectionConfigurationFileOverviewType, IDictionary serializedAdditionalRawData) + { + FileName = fileName; + Contents = contents; + StaticSiteDatabaseConnectionConfigurationFileOverviewType = staticSiteDatabaseConnectionConfigurationFileOverviewType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The name of the configuration file. + [WirePath("fileName")] + public string FileName { get; } + /// The Base64 encoding of the file contents. + [WirePath("contents")] + public string Contents { get; } + /// The type of configuration file. + [WirePath("type")] + public string StaticSiteDatabaseConnectionConfigurationFileOverviewType { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionOverview.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionOverview.Serialization.cs new file mode 100644 index 0000000000000..171a2d42af6fd --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionOverview.Serialization.cs @@ -0,0 +1,316 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class StaticSiteDatabaseConnectionOverview : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StaticSiteDatabaseConnectionOverview)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ResourceId)) + { + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + } + if (options.Format != "W" && Optional.IsDefined(ConnectionIdentity)) + { + writer.WritePropertyName("connectionIdentity"u8); + writer.WriteStringValue(ConnectionIdentity); + } + if (options.Format != "W" && Optional.IsDefined(Region)) + { + writer.WritePropertyName("region"u8); + writer.WriteStringValue(Region); + } + if (options.Format != "W" && Optional.IsCollectionDefined(ConfigurationFiles)) + { + writer.WritePropertyName("configurationFiles"u8); + writer.WriteStartArray(); + foreach (var item in ConfigurationFiles) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + StaticSiteDatabaseConnectionOverview IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StaticSiteDatabaseConnectionOverview)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStaticSiteDatabaseConnectionOverview(document.RootElement, options); + } + + internal static StaticSiteDatabaseConnectionOverview DeserializeStaticSiteDatabaseConnectionOverview(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier resourceId = default; + string connectionIdentity = default; + string region = default; + IReadOnlyList configurationFiles = default; + string name = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("connectionIdentity"u8)) + { + connectionIdentity = property.Value.GetString(); + continue; + } + if (property.NameEquals("region"u8)) + { + region = property.Value.GetString(); + continue; + } + if (property.NameEquals("configurationFiles"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(StaticSiteDatabaseConnectionConfigurationFileOverview.DeserializeStaticSiteDatabaseConnectionConfigurationFileOverview(item, options)); + } + configurationFiles = array; + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StaticSiteDatabaseConnectionOverview( + resourceId, + connectionIdentity, + region, + configurationFiles ?? new ChangeTrackingList(), + name, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceId)) + { + builder.Append(" resourceId: "); + builder.AppendLine($"'{ResourceId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ConnectionIdentity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" connectionIdentity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ConnectionIdentity)) + { + builder.Append(" connectionIdentity: "); + if (ConnectionIdentity.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ConnectionIdentity}'''"); + } + else + { + builder.AppendLine($"'{ConnectionIdentity}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Region), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" region: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Region)) + { + builder.Append(" region: "); + if (Region.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Region}'''"); + } + else + { + builder.AppendLine($"'{Region}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ConfigurationFiles), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" configurationFiles: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ConfigurationFiles)) + { + if (ConfigurationFiles.Any()) + { + builder.Append(" configurationFiles: "); + builder.AppendLine("["); + foreach (var item in ConfigurationFiles) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " configurationFiles: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(StaticSiteDatabaseConnectionOverview)} does not support writing '{options.Format}' format."); + } + } + + StaticSiteDatabaseConnectionOverview IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeStaticSiteDatabaseConnectionOverview(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StaticSiteDatabaseConnectionOverview)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionOverview.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionOverview.cs new file mode 100644 index 0000000000000..ba5711c578162 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionOverview.cs @@ -0,0 +1,88 @@ +// 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.AppService.Models +{ + /// Static Site Database Connection overview. + public partial class StaticSiteDatabaseConnectionOverview + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal StaticSiteDatabaseConnectionOverview() + { + ConfigurationFiles = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The resource id of the database. + /// If present, the identity is used in conjunction with connection string to connect to the database. Use of the system-assigned managed identity is indicated with the string 'SystemAssigned', while use of a user-assigned managed identity is indicated with the resource id of the managed identity resource. + /// The region of the database resource. + /// A list of configuration files associated with this database connection. + /// If present, the name of this database connection resource. + /// Keeps track of any properties unknown to the library. + internal StaticSiteDatabaseConnectionOverview(ResourceIdentifier resourceId, string connectionIdentity, string region, IReadOnlyList configurationFiles, string name, IDictionary serializedAdditionalRawData) + { + ResourceId = resourceId; + ConnectionIdentity = connectionIdentity; + Region = region; + ConfigurationFiles = configurationFiles; + Name = name; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource id of the database. + [WirePath("resourceId")] + public ResourceIdentifier ResourceId { get; } + /// If present, the identity is used in conjunction with connection string to connect to the database. Use of the system-assigned managed identity is indicated with the string 'SystemAssigned', while use of a user-assigned managed identity is indicated with the resource id of the managed identity resource. + [WirePath("connectionIdentity")] + public string ConnectionIdentity { get; } + /// The region of the database resource. + [WirePath("region")] + public string Region { get; } + /// A list of configuration files associated with this database connection. + [WirePath("configurationFiles")] + public IReadOnlyList ConfigurationFiles { get; } + /// If present, the name of this database connection resource. + [WirePath("name")] + public string Name { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionPatchContent.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionPatchContent.Serialization.cs new file mode 100644 index 0000000000000..87eaf285bc521 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionPatchContent.Serialization.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class StaticSiteDatabaseConnectionPatchContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StaticSiteDatabaseConnectionPatchContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(ResourceId)) + { + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + } + if (Optional.IsDefined(ConnectionIdentity)) + { + writer.WritePropertyName("connectionIdentity"u8); + writer.WriteStringValue(ConnectionIdentity); + } + if (Optional.IsDefined(ConnectionString)) + { + writer.WritePropertyName("connectionString"u8); + writer.WriteStringValue(ConnectionString); + } + if (Optional.IsDefined(Region)) + { + writer.WritePropertyName("region"u8); + writer.WriteStringValue(Region); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + StaticSiteDatabaseConnectionPatchContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StaticSiteDatabaseConnectionPatchContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStaticSiteDatabaseConnectionPatchContent(document.RootElement, options); + } + + internal static StaticSiteDatabaseConnectionPatchContent DeserializeStaticSiteDatabaseConnectionPatchContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier resourceId = default; + string connectionIdentity = default; + string connectionString = default; + string region = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("resourceId"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceId = new ResourceIdentifier(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("connectionIdentity"u8)) + { + connectionIdentity = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("connectionString"u8)) + { + connectionString = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("region"u8)) + { + region = property0.Value.GetString(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StaticSiteDatabaseConnectionPatchContent(resourceId, connectionIdentity, connectionString, region, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(StaticSiteDatabaseConnectionPatchContent)} does not support writing '{options.Format}' format."); + } + } + + StaticSiteDatabaseConnectionPatchContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeStaticSiteDatabaseConnectionPatchContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StaticSiteDatabaseConnectionPatchContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionPatchContent.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionPatchContent.cs new file mode 100644 index 0000000000000..1963d8a95971d --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteDatabaseConnectionPatchContent.cs @@ -0,0 +1,82 @@ +// 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.AppService.Models +{ + /// Static Site Database Connection Request Properties resource when patching. + public partial class StaticSiteDatabaseConnectionPatchContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public StaticSiteDatabaseConnectionPatchContent() + { + } + + /// Initializes a new instance of . + /// The resource id of the database. + /// If present, the identity is used in conjunction with connection string to connect to the database. Use of the system-assigned managed identity is indicated with the string 'SystemAssigned', while use of a user-assigned managed identity is indicated with the resource id of the managed identity resource. + /// The connection string to use to connect to the database. + /// The region of the database resource. + /// Keeps track of any properties unknown to the library. + internal StaticSiteDatabaseConnectionPatchContent(ResourceIdentifier resourceId, string connectionIdentity, string connectionString, string region, IDictionary serializedAdditionalRawData) + { + ResourceId = resourceId; + ConnectionIdentity = connectionIdentity; + ConnectionString = connectionString; + Region = region; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource id of the database. + [WirePath("properties.resourceId")] + public ResourceIdentifier ResourceId { get; set; } + /// If present, the identity is used in conjunction with connection string to connect to the database. Use of the system-assigned managed identity is indicated with the string 'SystemAssigned', while use of a user-assigned managed identity is indicated with the resource id of the managed identity resource. + [WirePath("properties.connectionIdentity")] + public string ConnectionIdentity { get; set; } + /// The connection string to use to connect to the database. + [WirePath("properties.connectionString")] + public string ConnectionString { get; set; } + /// The region of the database resource. + [WirePath("properties.region")] + public string Region { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteLinkedBackendInfo.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteLinkedBackendInfo.Serialization.cs new file mode 100644 index 0000000000000..ec566bf720a70 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteLinkedBackendInfo.Serialization.cs @@ -0,0 +1,262 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class StaticSiteLinkedBackendInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StaticSiteLinkedBackendInfo)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(BackendResourceId)) + { + writer.WritePropertyName("backendResourceId"u8); + writer.WriteStringValue(BackendResourceId); + } + if (Optional.IsDefined(Region)) + { + writer.WritePropertyName("region"u8); + writer.WriteStringValue(Region); + } + if (options.Format != "W" && Optional.IsDefined(CreatedOn)) + { + writer.WritePropertyName("createdOn"u8); + writer.WriteStringValue(CreatedOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + StaticSiteLinkedBackendInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StaticSiteLinkedBackendInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStaticSiteLinkedBackendInfo(document.RootElement, options); + } + + internal static StaticSiteLinkedBackendInfo DeserializeStaticSiteLinkedBackendInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string backendResourceId = default; + string region = default; + DateTimeOffset? createdOn = default; + string provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("backendResourceId"u8)) + { + backendResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("region"u8)) + { + region = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdOn"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createdOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + provisioningState = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StaticSiteLinkedBackendInfo(backendResourceId, region, createdOn, provisioningState, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(BackendResourceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" backendResourceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(BackendResourceId)) + { + builder.Append(" backendResourceId: "); + if (BackendResourceId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{BackendResourceId}'''"); + } + else + { + builder.AppendLine($"'{BackendResourceId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Region), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" region: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Region)) + { + builder.Append(" region: "); + if (Region.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Region}'''"); + } + else + { + builder.AppendLine($"'{Region}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CreatedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" createdOn: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CreatedOn)) + { + builder.Append(" createdOn: "); + var formattedDateTimeString = TypeFormatters.ToString(CreatedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + if (ProvisioningState.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ProvisioningState}'''"); + } + else + { + builder.AppendLine($"'{ProvisioningState}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(StaticSiteLinkedBackendInfo)} does not support writing '{options.Format}' format."); + } + } + + StaticSiteLinkedBackendInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeStaticSiteLinkedBackendInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StaticSiteLinkedBackendInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteLinkedBackendInfo.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteLinkedBackendInfo.cs new file mode 100644 index 0000000000000..a6ff94a5d2d8c --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteLinkedBackendInfo.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Static Site Linked Backend ARM resource. + public partial class StaticSiteLinkedBackendInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal StaticSiteLinkedBackendInfo() + { + } + + /// Initializes a new instance of . + /// The resource id of the backend linked to the static site. + /// The region of the backend linked to the static site. + /// The date and time on which the backend was linked to the static site. + /// The provisioning state of the linking process. + /// Keeps track of any properties unknown to the library. + internal StaticSiteLinkedBackendInfo(string backendResourceId, string region, DateTimeOffset? createdOn, string provisioningState, IDictionary serializedAdditionalRawData) + { + BackendResourceId = backendResourceId; + Region = region; + CreatedOn = createdOn; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource id of the backend linked to the static site. + [WirePath("backendResourceId")] + public string BackendResourceId { get; } + /// The region of the backend linked to the static site. + [WirePath("region")] + public string Region { get; } + /// The date and time on which the backend was linked to the static site. + [WirePath("createdOn")] + public DateTimeOffset? CreatedOn { get; } + /// The provisioning state of the linking process. + [WirePath("provisioningState")] + public string ProvisioningState { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteLinkedBackendsCollection.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteLinkedBackendsCollection.Serialization.cs new file mode 100644 index 0000000000000..3f1283e5336da --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteLinkedBackendsCollection.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class StaticSiteLinkedBackendsCollection : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StaticSiteLinkedBackendsCollection)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + StaticSiteLinkedBackendsCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StaticSiteLinkedBackendsCollection)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStaticSiteLinkedBackendsCollection(document.RootElement, options); + } + + internal static StaticSiteLinkedBackendsCollection DeserializeStaticSiteLinkedBackendsCollection(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(StaticSiteLinkedBackendData.DeserializeStaticSiteLinkedBackendData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StaticSiteLinkedBackendsCollection(value, nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(StaticSiteLinkedBackendsCollection)} does not support writing '{options.Format}' format."); + } + } + + StaticSiteLinkedBackendsCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeStaticSiteLinkedBackendsCollection(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StaticSiteLinkedBackendsCollection)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteLinkedBackendsCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteLinkedBackendsCollection.cs new file mode 100644 index 0000000000000..8de89d3abfe26 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSiteLinkedBackendsCollection.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Collection of static site linked backends. + internal partial class StaticSiteLinkedBackendsCollection + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Collection of resources. + /// is null. + internal StaticSiteLinkedBackendsCollection(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// Collection of resources. + /// Link to next page of resources. + /// Keeps track of any properties unknown to the library. + internal StaticSiteLinkedBackendsCollection(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal StaticSiteLinkedBackendsCollection() + { + } + + /// Collection of resources. + public IReadOnlyList Value { get; } + /// Link to next page of resources. + public string NextLink { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSitePatch.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSitePatch.Serialization.cs index 6d1195f4d8fa0..96a795df915ec 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSitePatch.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSitePatch.Serialization.cs @@ -136,11 +136,41 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsDefined(Provider)) + if (options.Format != "W" && Optional.IsCollectionDefined(LinkedBackends)) + { + writer.WritePropertyName("linkedBackends"u8); + writer.WriteStartArray(); + foreach (var item in LinkedBackends) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Provider)) { writer.WritePropertyName("provider"u8); writer.WriteStringValue(Provider); } + if (Optional.IsDefined(EnterpriseGradeCdnStatus)) + { + writer.WritePropertyName("enterpriseGradeCdnStatus"u8); + writer.WriteStringValue(EnterpriseGradeCdnStatus.Value.ToString()); + } + if (Optional.IsDefined(PublicNetworkAccess)) + { + writer.WritePropertyName("publicNetworkAccess"u8); + writer.WriteStringValue(PublicNetworkAccess); + } + if (options.Format != "W" && Optional.IsCollectionDefined(DatabaseConnections)) + { + writer.WritePropertyName("databaseConnections"u8); + writer.WriteStartArray(); + foreach (var item in DatabaseConnections) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -198,7 +228,11 @@ internal static StaticSitePatch DeserializeStaticSitePatch(JsonElement element, string contentDistributionEndpoint = default; string keyVaultReferenceIdentity = default; IReadOnlyList userProvidedFunctionApps = default; + IReadOnlyList linkedBackends = default; string provider = default; + EnterpriseGradeCdnStatus? enterpriseGradeCdnStatus = default; + string publicNetworkAccess = default; + IReadOnlyList databaseConnections = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -353,11 +387,53 @@ internal static StaticSitePatch DeserializeStaticSitePatch(JsonElement element, userProvidedFunctionApps = array; continue; } + if (property0.NameEquals("linkedBackends"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(StaticSiteLinkedBackendInfo.DeserializeStaticSiteLinkedBackendInfo(item, options)); + } + linkedBackends = array; + continue; + } if (property0.NameEquals("provider"u8)) { provider = property0.Value.GetString(); continue; } + if (property0.NameEquals("enterpriseGradeCdnStatus"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enterpriseGradeCdnStatus = new EnterpriseGradeCdnStatus(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("publicNetworkAccess"u8)) + { + publicNetworkAccess = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("databaseConnections"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(StaticSiteDatabaseConnectionOverview.DeserializeStaticSiteDatabaseConnectionOverview(item, options)); + } + databaseConnections = array; + continue; + } } continue; } @@ -385,7 +461,11 @@ internal static StaticSitePatch DeserializeStaticSitePatch(JsonElement element, contentDistributionEndpoint, keyVaultReferenceIdentity, userProvidedFunctionApps ?? new ChangeTrackingList(), + linkedBackends ?? new ChangeTrackingList(), provider, + enterpriseGradeCdnStatus, + publicNetworkAccess, + databaseConnections ?? new ChangeTrackingList(), kind, serializedAdditionalRawData); } @@ -752,6 +832,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LinkedBackends), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" linkedBackends: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(LinkedBackends)) + { + if (LinkedBackends.Any()) + { + builder.Append(" linkedBackends: "); + builder.AppendLine("["); + foreach (var item in LinkedBackends) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " linkedBackends: "); + } + builder.AppendLine(" ]"); + } + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Provider), out propertyOverride); if (hasPropertyOverride) { @@ -775,6 +878,67 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EnterpriseGradeCdnStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enterpriseGradeCdnStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EnterpriseGradeCdnStatus)) + { + builder.Append(" enterpriseGradeCdnStatus: "); + builder.AppendLine($"'{EnterpriseGradeCdnStatus.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublicNetworkAccess), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" publicNetworkAccess: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PublicNetworkAccess)) + { + builder.Append(" publicNetworkAccess: "); + if (PublicNetworkAccess.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PublicNetworkAccess}'''"); + } + else + { + builder.AppendLine($"'{PublicNetworkAccess}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DatabaseConnections), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" databaseConnections: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(DatabaseConnections)) + { + if (DatabaseConnections.Any()) + { + builder.Append(" databaseConnections: "); + builder.AppendLine("["); + foreach (var item in DatabaseConnections) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " databaseConnections: "); + } + builder.AppendLine(" ]"); + } + } + } + builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSitePatch.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSitePatch.cs index 827a73fc5057b..30c0ee47b2e3f 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSitePatch.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/StaticSitePatch.cs @@ -53,6 +53,8 @@ public StaticSitePatch() CustomDomains = new ChangeTrackingList(); PrivateEndpointConnections = new ChangeTrackingList(); UserProvidedFunctionApps = new ChangeTrackingList(); + LinkedBackends = new ChangeTrackingList(); + DatabaseConnections = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -73,10 +75,14 @@ public StaticSitePatch() /// The content distribution endpoint for the static site. /// Identity to use for Key Vault Reference authentication. /// User provided function apps registered with the static site. + /// Backends linked to the static side. /// The provider that submitted the last deployment to the primary environment of the static site. + /// State indicating the status of the enterprise grade CDN serving traffic to the static web app. + /// State indicating whether public traffic are allowed or not for a static web app. Allowed Values: 'Enabled', 'Disabled' or an empty string. + /// Database connections for the static site. /// Kind of resource. /// Keeps track of any properties unknown to the library. - internal StaticSitePatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, 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, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal StaticSitePatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, 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, IReadOnlyList linkedBackends, string provider, EnterpriseGradeCdnStatus? enterpriseGradeCdnStatus, string publicNetworkAccess, IReadOnlyList databaseConnections, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { DefaultHostname = defaultHostname; RepositoryUri = repositoryUri; @@ -91,7 +97,11 @@ internal StaticSitePatch(ResourceIdentifier id, string name, ResourceType resour ContentDistributionEndpoint = contentDistributionEndpoint; KeyVaultReferenceIdentity = keyVaultReferenceIdentity; UserProvidedFunctionApps = userProvidedFunctionApps; + LinkedBackends = linkedBackends; Provider = provider; + EnterpriseGradeCdnStatus = enterpriseGradeCdnStatus; + PublicNetworkAccess = publicNetworkAccess; + DatabaseConnections = databaseConnections; Kind = kind; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -135,9 +145,21 @@ internal StaticSitePatch(ResourceIdentifier id, string name, ResourceType resour /// User provided function apps registered with the static site. [WirePath("properties.userProvidedFunctionApps")] public IReadOnlyList UserProvidedFunctionApps { get; } + /// Backends linked to the static side. + [WirePath("properties.linkedBackends")] + public IReadOnlyList LinkedBackends { get; } /// The provider that submitted the last deployment to the primary environment of the static site. [WirePath("properties.provider")] - public string Provider { get; } + public string Provider { get; set; } + /// State indicating the status of the enterprise grade CDN serving traffic to the static web app. + [WirePath("properties.enterpriseGradeCdnStatus")] + public EnterpriseGradeCdnStatus? EnterpriseGradeCdnStatus { get; set; } + /// State indicating whether public traffic are allowed or not for a static web app. Allowed Values: 'Enabled', 'Disabled' or an empty string. + [WirePath("properties.publicNetworkAccess")] + public string PublicNetworkAccess { get; set; } + /// Database connections for the static site. + [WirePath("properties.databaseConnections")] + public IReadOnlyList DatabaseConnections { get; } /// Kind of resource. [WirePath("kind")] public string Kind { get; set; } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppContentHash.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppContentHash.Serialization.cs new file mode 100644 index 0000000000000..3193339c63299 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppContentHash.Serialization.cs @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WebAppContentHash : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppContentHash)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Algorithm)) + { + writer.WritePropertyName("algorithm"u8); + writer.WriteStringValue(Algorithm); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WebAppContentHash IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppContentHash)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebAppContentHash(document.RootElement, options); + } + + internal static WebAppContentHash DeserializeWebAppContentHash(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string algorithm = default; + string value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("algorithm"u8)) + { + algorithm = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebAppContentHash(algorithm, value, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Algorithm), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" algorithm: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Algorithm)) + { + builder.Append(" algorithm: "); + if (Algorithm.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Algorithm}'''"); + } + else + { + builder.AppendLine($"'{Algorithm}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + if (Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Value}'''"); + } + else + { + builder.AppendLine($"'{Value}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WebAppContentHash)} does not support writing '{options.Format}' format."); + } + } + + WebAppContentHash IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWebAppContentHash(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebAppContentHash)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppContentHash.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppContentHash.cs new file mode 100644 index 0000000000000..d86b03167fdba --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppContentHash.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The content hash. + public partial class WebAppContentHash + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WebAppContentHash() + { + } + + /// Initializes a new instance of . + /// The algorithm of the content hash. + /// The value of the content hash. + /// Keeps track of any properties unknown to the library. + internal WebAppContentHash(string algorithm, string value, IDictionary serializedAdditionalRawData) + { + Algorithm = algorithm; + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The algorithm of the content hash. + [WirePath("algorithm")] + public string Algorithm { get; } + /// The value of the content hash. + [WirePath("value")] + public string Value { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppContentLink.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppContentLink.Serialization.cs new file mode 100644 index 0000000000000..2722517caf2be --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppContentLink.Serialization.cs @@ -0,0 +1,296 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WebAppContentLink : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppContentLink)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Uri)) + { + writer.WritePropertyName("uri"u8); + writer.WriteStringValue(Uri.AbsoluteUri); + } + if (options.Format != "W" && Optional.IsDefined(ContentVersion)) + { + writer.WritePropertyName("contentVersion"u8); + writer.WriteStringValue(ContentVersion); + } + if (options.Format != "W" && Optional.IsDefined(ContentSize)) + { + writer.WritePropertyName("contentSize"u8); + writer.WriteNumberValue(ContentSize.Value); + } + if (options.Format != "W" && Optional.IsDefined(ContentHash)) + { + writer.WritePropertyName("contentHash"u8); + writer.WriteObjectValue(ContentHash, options); + } + if (options.Format != "W" && Optional.IsDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Metadata); +#else + using (JsonDocument document = JsonDocument.Parse(Metadata)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WebAppContentLink IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppContentLink)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebAppContentLink(document.RootElement, options); + } + + internal static WebAppContentLink DeserializeWebAppContentLink(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Uri uri = default; + string contentVersion = default; + long? contentSize = default; + WebAppContentHash contentHash = default; + BinaryData metadata = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("uri"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + uri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("contentVersion"u8)) + { + contentVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("contentSize"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + contentSize = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("contentHash"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + contentHash = WebAppContentHash.DeserializeWebAppContentHash(property.Value, options); + continue; + } + if (property.NameEquals("metadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + metadata = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebAppContentLink( + uri, + contentVersion, + contentSize, + contentHash, + metadata, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Uri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" uri: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Uri)) + { + builder.Append(" uri: "); + builder.AppendLine($"'{Uri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ContentVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" contentVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ContentVersion)) + { + builder.Append(" contentVersion: "); + if (ContentVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ContentVersion}'''"); + } + else + { + builder.AppendLine($"'{ContentVersion}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ContentSize), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" contentSize: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ContentSize)) + { + builder.Append(" contentSize: "); + builder.AppendLine($"'{ContentSize.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ContentHash), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" contentHash: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ContentHash)) + { + builder.Append(" contentHash: "); + BicepSerializationHelpers.AppendChildObject(builder, ContentHash, options, 2, false, " contentHash: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Metadata), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" metadata: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Metadata)) + { + builder.Append(" metadata: "); + builder.AppendLine($"'{Metadata.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WebAppContentLink)} does not support writing '{options.Format}' format."); + } + } + + WebAppContentLink IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWebAppContentLink(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebAppContentLink)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppContentLink.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppContentLink.cs new file mode 100644 index 0000000000000..811ee1172acd6 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppContentLink.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The content link. + public partial class WebAppContentLink + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WebAppContentLink() + { + } + + /// Initializes a new instance of . + /// The content link URI. + /// The content version. + /// The content size. + /// The content hash. + /// The metadata. + /// Keeps track of any properties unknown to the library. + internal WebAppContentLink(Uri uri, string contentVersion, long? contentSize, WebAppContentHash contentHash, BinaryData metadata, IDictionary serializedAdditionalRawData) + { + Uri = uri; + ContentVersion = contentVersion; + ContentSize = contentSize; + ContentHash = contentHash; + Metadata = metadata; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The content link URI. + [WirePath("uri")] + public Uri Uri { get; set; } + /// The content version. + [WirePath("contentVersion")] + public string ContentVersion { get; } + /// The content size. + [WirePath("contentSize")] + public long? ContentSize { get; } + /// The content hash. + [WirePath("contentHash")] + public WebAppContentHash ContentHash { get; } + /// + /// The metadata. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("metadata")] + public BinaryData Metadata { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppDayOfWeek.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppDayOfWeek.Serialization.cs new file mode 100644 index 0000000000000..2a45df0620c59 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppDayOfWeek.Serialization.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.AppService.Models +{ + internal static partial class WebAppDayOfWeekExtensions + { + public static string ToSerialString(this WebAppDayOfWeek value) => value switch + { + WebAppDayOfWeek.Sunday => "Sunday", + WebAppDayOfWeek.Monday => "Monday", + WebAppDayOfWeek.Tuesday => "Tuesday", + WebAppDayOfWeek.Wednesday => "Wednesday", + WebAppDayOfWeek.Thursday => "Thursday", + WebAppDayOfWeek.Friday => "Friday", + WebAppDayOfWeek.Saturday => "Saturday", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown WebAppDayOfWeek value.") + }; + + public static WebAppDayOfWeek ToWebAppDayOfWeek(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Sunday")) return WebAppDayOfWeek.Sunday; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Monday")) return WebAppDayOfWeek.Monday; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Tuesday")) return WebAppDayOfWeek.Tuesday; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Wednesday")) return WebAppDayOfWeek.Wednesday; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Thursday")) return WebAppDayOfWeek.Thursday; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Friday")) return WebAppDayOfWeek.Friday; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Saturday")) return WebAppDayOfWeek.Saturday; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown WebAppDayOfWeek value."); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppDayOfWeek.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppDayOfWeek.cs new file mode 100644 index 0000000000000..4154f6f807b90 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppDayOfWeek.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppService.Models +{ + /// The day of the week. + public enum WebAppDayOfWeek + { + /// Sunday. + Sunday, + /// Monday. + Monday, + /// Tuesday. + Tuesday, + /// Wednesday. + Wednesday, + /// Thursday. + Thursday, + /// Friday. + Friday, + /// Saturday. + Saturday + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppEnvironmentVariable.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppEnvironmentVariable.Serialization.cs new file mode 100644 index 0000000000000..ba53457e725b3 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppEnvironmentVariable.Serialization.cs @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WebAppEnvironmentVariable : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppEnvironmentVariable)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WebAppEnvironmentVariable IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppEnvironmentVariable)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebAppEnvironmentVariable(document.RootElement, options); + } + + internal static WebAppEnvironmentVariable DeserializeWebAppEnvironmentVariable(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebAppEnvironmentVariable(name, value, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + if (Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Value}'''"); + } + else + { + builder.AppendLine($"'{Value}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WebAppEnvironmentVariable)} does not support writing '{options.Format}' format."); + } + } + + WebAppEnvironmentVariable IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWebAppEnvironmentVariable(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebAppEnvironmentVariable)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppEnvironmentVariable.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppEnvironmentVariable.cs new file mode 100644 index 0000000000000..fbd6793faa545 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppEnvironmentVariable.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; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The WebAppEnvironmentVariable. + public partial class WebAppEnvironmentVariable + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Environment variable name. + /// Environment variable value. + /// or is null. + public WebAppEnvironmentVariable(string name, string value) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(value, nameof(value)); + + Name = name; + Value = value; + } + + /// Initializes a new instance of . + /// Environment variable name. + /// Environment variable value. + /// Keeps track of any properties unknown to the library. + internal WebAppEnvironmentVariable(string name, string value, IDictionary serializedAdditionalRawData) + { + Name = name; + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal WebAppEnvironmentVariable() + { + } + + /// Environment variable name. + [WirePath("name")] + public string Name { get; set; } + /// Environment variable value. + [WirePath("value")] + public string Value { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorInfo.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorInfo.Serialization.cs new file mode 100644 index 0000000000000..29b06e387b54e --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorInfo.Serialization.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WebAppErrorInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppErrorInfo)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WebAppErrorInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppErrorInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebAppErrorInfo(document.RootElement, options); + } + + internal static WebAppErrorInfo DeserializeWebAppErrorInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string code = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebAppErrorInfo(code, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Code), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" code: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Code)) + { + builder.Append(" code: "); + if (Code.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Code}'''"); + } + else + { + builder.AppendLine($"'{Code}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WebAppErrorInfo)} does not support writing '{options.Format}' format."); + } + } + + WebAppErrorInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWebAppErrorInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebAppErrorInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorInfo.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorInfo.cs new file mode 100644 index 0000000000000..a193cb924c77c --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorInfo.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The error info. + public partial class WebAppErrorInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The error code. + /// is null. + internal WebAppErrorInfo(string code) + { + Argument.AssertNotNull(code, nameof(code)); + + Code = code; + } + + /// Initializes a new instance of . + /// The error code. + /// Keeps track of any properties unknown to the library. + internal WebAppErrorInfo(string code, IDictionary serializedAdditionalRawData) + { + Code = code; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal WebAppErrorInfo() + { + } + + /// The error code. + [WirePath("code")] + public string Code { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorProperties.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorProperties.Serialization.cs new file mode 100644 index 0000000000000..6286da71dad86 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorProperties.Serialization.cs @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WebAppErrorProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppErrorProperties)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + } + if (Optional.IsDefined(Message)) + { + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WebAppErrorProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppErrorProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebAppErrorProperties(document.RootElement, options); + } + + internal static WebAppErrorProperties DeserializeWebAppErrorProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string code = default; + string message = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebAppErrorProperties(code, message, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Code), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" code: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Code)) + { + builder.Append(" code: "); + if (Code.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Code}'''"); + } + else + { + builder.AppendLine($"'{Code}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Message), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" message: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Message)) + { + builder.Append(" message: "); + if (Message.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Message}'''"); + } + else + { + builder.AppendLine($"'{Message}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WebAppErrorProperties)} does not support writing '{options.Format}' format."); + } + } + + WebAppErrorProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWebAppErrorProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebAppErrorProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorProperties.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorProperties.cs new file mode 100644 index 0000000000000..9072caf930975 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorProperties.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Error properties indicate why the Logic service was not able to process the incoming request. The reason is provided in the error message. + public partial class WebAppErrorProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WebAppErrorProperties() + { + } + + /// Initializes a new instance of . + /// Error code. + /// Error message indicating why the operation failed. + /// Keeps track of any properties unknown to the library. + internal WebAppErrorProperties(string code, string message, IDictionary serializedAdditionalRawData) + { + Code = code; + Message = message; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Error code. + [WirePath("code")] + public string Code { get; set; } + /// Error message indicating why the operation failed. + [WirePath("message")] + public string Message { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorResponse.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorResponse.Serialization.cs new file mode 100644 index 0000000000000..7bbde4c4a495b --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorResponse.Serialization.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class WebAppErrorResponse : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppErrorResponse)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(ErrorInfo)) + { + writer.WritePropertyName("error"u8); + writer.WriteObjectValue(ErrorInfo, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WebAppErrorResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppErrorResponse)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebAppErrorResponse(document.RootElement, options); + } + + internal static WebAppErrorResponse DeserializeWebAppErrorResponse(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + WebAppErrorProperties error = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = WebAppErrorProperties.DeserializeWebAppErrorProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebAppErrorResponse(error, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ErrorInfo), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" error: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ErrorInfo)) + { + builder.Append(" error: "); + BicepSerializationHelpers.AppendChildObject(builder, ErrorInfo, options, 2, false, " error: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WebAppErrorResponse)} does not support writing '{options.Format}' format."); + } + } + + WebAppErrorResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWebAppErrorResponse(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebAppErrorResponse)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorResponse.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorResponse.cs new file mode 100644 index 0000000000000..7083b83389a8d --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppErrorResponse.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Error response indicates Logic service is not able to process the incoming request. The error property contains the error details. + internal partial class WebAppErrorResponse + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WebAppErrorResponse() + { + } + + /// Initializes a new instance of . + /// The error properties. + /// Keeps track of any properties unknown to the library. + internal WebAppErrorResponse(WebAppErrorProperties errorInfo, IDictionary serializedAdditionalRawData) + { + ErrorInfo = errorInfo; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The error properties. + [WirePath("error")] + public WebAppErrorProperties ErrorInfo { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppIPAddress.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppIPAddress.Serialization.cs new file mode 100644 index 0000000000000..ed3f1e54a4bc4 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppIPAddress.Serialization.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WebAppIPAddress : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppIPAddress)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Address)) + { + writer.WritePropertyName("address"u8); + writer.WriteStringValue(Address); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WebAppIPAddress IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppIPAddress)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebAppIPAddress(document.RootElement, options); + } + + internal static WebAppIPAddress DeserializeWebAppIPAddress(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string address = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("address"u8)) + { + address = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebAppIPAddress(address, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Address), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" address: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Address)) + { + builder.Append(" address: "); + if (Address.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Address}'''"); + } + else + { + builder.AppendLine($"'{Address}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WebAppIPAddress)} does not support writing '{options.Format}' format."); + } + } + + WebAppIPAddress IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWebAppIPAddress(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebAppIPAddress)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppIPAddress.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppIPAddress.cs new file mode 100644 index 0000000000000..7031977fadfe7 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppIPAddress.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The ip address. + public partial class WebAppIPAddress + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WebAppIPAddress() + { + } + + /// Initializes a new instance of . + /// The address. + /// Keeps track of any properties unknown to the library. + internal WebAppIPAddress(string address, IDictionary serializedAdditionalRawData) + { + Address = address; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The address. + [WirePath("address")] + public string Address { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppIPAddressRange.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppIPAddressRange.Serialization.cs new file mode 100644 index 0000000000000..0696b32b2c26c --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppIPAddressRange.Serialization.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WebAppIPAddressRange : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppIPAddressRange)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(AddressRange)) + { + writer.WritePropertyName("addressRange"u8); + writer.WriteStringValue(AddressRange); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WebAppIPAddressRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppIPAddressRange)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebAppIPAddressRange(document.RootElement, options); + } + + internal static WebAppIPAddressRange DeserializeWebAppIPAddressRange(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string addressRange = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("addressRange"u8)) + { + addressRange = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebAppIPAddressRange(addressRange, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AddressRange), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" addressRange: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AddressRange)) + { + builder.Append(" addressRange: "); + if (AddressRange.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AddressRange}'''"); + } + else + { + builder.AppendLine($"'{AddressRange}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WebAppIPAddressRange)} does not support writing '{options.Format}' format."); + } + } + + WebAppIPAddressRange IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWebAppIPAddressRange(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebAppIPAddressRange)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppIPAddressRange.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppIPAddressRange.cs new file mode 100644 index 0000000000000..a3422194d260f --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppIPAddressRange.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The ip address range. + public partial class WebAppIPAddressRange + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WebAppIPAddressRange() + { + } + + /// Initializes a new instance of . + /// The IP address range. + /// Keeps track of any properties unknown to the library. + internal WebAppIPAddressRange(string addressRange, IDictionary serializedAdditionalRawData) + { + AddressRange = addressRange; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The IP address range. + [WirePath("addressRange")] + public string AddressRange { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppJsonSchema.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppJsonSchema.Serialization.cs new file mode 100644 index 0000000000000..8f6358f1c7734 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppJsonSchema.Serialization.cs @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WebAppJsonSchema : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppJsonSchema)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Title)) + { + writer.WritePropertyName("title"u8); + writer.WriteStringValue(Title); + } + if (Optional.IsDefined(Content)) + { + writer.WritePropertyName("content"u8); + writer.WriteStringValue(Content); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WebAppJsonSchema IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppJsonSchema)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebAppJsonSchema(document.RootElement, options); + } + + internal static WebAppJsonSchema DeserializeWebAppJsonSchema(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string title = default; + string content = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("title"u8)) + { + title = property.Value.GetString(); + continue; + } + if (property.NameEquals("content"u8)) + { + content = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebAppJsonSchema(title, content, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Title), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" title: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Title)) + { + builder.Append(" title: "); + if (Title.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Title}'''"); + } + else + { + builder.AppendLine($"'{Title}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Content), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" content: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Content)) + { + builder.Append(" content: "); + if (Content.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Content}'''"); + } + else + { + builder.AppendLine($"'{Content}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WebAppJsonSchema)} does not support writing '{options.Format}' format."); + } + } + + WebAppJsonSchema IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWebAppJsonSchema(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebAppJsonSchema)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppJsonSchema.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppJsonSchema.cs new file mode 100644 index 0000000000000..e60e72629b24b --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppJsonSchema.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The JSON schema. + public partial class WebAppJsonSchema + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WebAppJsonSchema() + { + } + + /// Initializes a new instance of . + /// The JSON title. + /// The JSON content. + /// Keeps track of any properties unknown to the library. + internal WebAppJsonSchema(string title, string content, IDictionary serializedAdditionalRawData) + { + Title = title; + Content = content; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The JSON title. + [WirePath("title")] + public string Title { get; } + /// The JSON content. + [WirePath("content")] + public string Content { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppKeyType.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppKeyType.cs new file mode 100644 index 0000000000000..c30912db8ed5b --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppKeyType.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.AppService.Models +{ + /// The key type. + public readonly partial struct WebAppKeyType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public WebAppKeyType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSpecifiedValue = "NotSpecified"; + private const string PrimaryValue = "Primary"; + private const string SecondaryValue = "Secondary"; + + /// NotSpecified. + public static WebAppKeyType NotSpecified { get; } = new WebAppKeyType(NotSpecifiedValue); + /// Primary. + public static WebAppKeyType Primary { get; } = new WebAppKeyType(PrimaryValue); + /// Secondary. + public static WebAppKeyType Secondary { get; } = new WebAppKeyType(SecondaryValue); + /// Determines if two values are the same. + public static bool operator ==(WebAppKeyType left, WebAppKeyType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WebAppKeyType left, WebAppKeyType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator WebAppKeyType(string value) => new WebAppKeyType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WebAppKeyType other && Equals(other); + /// + public bool Equals(WebAppKeyType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppParameterType.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppParameterType.cs new file mode 100644 index 0000000000000..abc31f7d82cb7 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppParameterType.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The parameter type. + public readonly partial struct WebAppParameterType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public WebAppParameterType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSpecifiedValue = "NotSpecified"; + private const string StringValue = "String"; + private const string SecureStringValue = "SecureString"; + private const string IntValue = "Int"; + private const string FloatValue = "Float"; + private const string BoolValue = "Bool"; + private const string ArrayValue = "Array"; + private const string ObjectValue = "Object"; + private const string SecureObjectValue = "SecureObject"; + + /// NotSpecified. + public static WebAppParameterType NotSpecified { get; } = new WebAppParameterType(NotSpecifiedValue); + /// String. + public static WebAppParameterType String { get; } = new WebAppParameterType(StringValue); + /// SecureString. + public static WebAppParameterType SecureString { get; } = new WebAppParameterType(SecureStringValue); + /// Int. + public static WebAppParameterType Int { get; } = new WebAppParameterType(IntValue); + /// Float. + public static WebAppParameterType Float { get; } = new WebAppParameterType(FloatValue); + /// Bool. + public static WebAppParameterType Bool { get; } = new WebAppParameterType(BoolValue); + /// Array. + public static WebAppParameterType Array { get; } = new WebAppParameterType(ArrayValue); + /// Object. + public static WebAppParameterType Object { get; } = new WebAppParameterType(ObjectValue); + /// SecureObject. + public static WebAppParameterType SecureObject { get; } = new WebAppParameterType(SecureObjectValue); + /// Determines if two values are the same. + public static bool operator ==(WebAppParameterType left, WebAppParameterType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WebAppParameterType left, WebAppParameterType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator WebAppParameterType(string value) => new WebAppParameterType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WebAppParameterType other && Equals(other); + /// + public bool Equals(WebAppParameterType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRequest.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRequest.Serialization.cs new file mode 100644 index 0000000000000..2e7022a0721c4 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRequest.Serialization.cs @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WebAppRequest : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppRequest)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Headers)) + { + writer.WritePropertyName("headers"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Headers); +#else + using (JsonDocument document = JsonDocument.Parse(Headers)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsDefined(Uri)) + { + writer.WritePropertyName("uri"u8); + writer.WriteStringValue(Uri.AbsoluteUri); + } + if (Optional.IsDefined(Method)) + { + writer.WritePropertyName("method"u8); + writer.WriteStringValue(Method); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WebAppRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppRequest)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebAppRequest(document.RootElement, options); + } + + internal static WebAppRequest DeserializeWebAppRequest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BinaryData headers = default; + Uri uri = default; + string method = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("headers"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + headers = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("uri"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + uri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("method"u8)) + { + method = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebAppRequest(headers, uri, method, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Headers), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" headers: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Headers)) + { + builder.Append(" headers: "); + builder.AppendLine($"'{Headers.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Uri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" uri: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Uri)) + { + builder.Append(" uri: "); + builder.AppendLine($"'{Uri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Method), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" method: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Method)) + { + builder.Append(" method: "); + if (Method.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Method}'''"); + } + else + { + builder.AppendLine($"'{Method}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WebAppRequest)} does not support writing '{options.Format}' format."); + } + } + + WebAppRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWebAppRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebAppRequest)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRequest.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRequest.cs new file mode 100644 index 0000000000000..b3e7c43ff46da --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRequest.cs @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// A request. + public partial class WebAppRequest + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WebAppRequest() + { + } + + /// Initializes a new instance of . + /// A list of all the headers attached to the request. + /// The destination for the request. + /// The HTTP method used for the request. + /// Keeps track of any properties unknown to the library. + internal WebAppRequest(BinaryData headers, Uri uri, string method, IDictionary serializedAdditionalRawData) + { + Headers = headers; + Uri = uri; + Method = method; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// A list of all the headers attached to the request. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("headers")] + public BinaryData Headers { get; set; } + /// The destination for the request. + [WirePath("uri")] + public Uri Uri { get; set; } + /// The HTTP method used for the request. + [WirePath("method")] + public string Method { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRequestHistoryProperties.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRequestHistoryProperties.Serialization.cs new file mode 100644 index 0000000000000..f7188375dae41 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRequestHistoryProperties.Serialization.cs @@ -0,0 +1,251 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WebAppRequestHistoryProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppRequestHistoryProperties)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(StartOn)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartOn.Value, "O"); + } + if (Optional.IsDefined(EndOn)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndOn.Value, "O"); + } + if (Optional.IsDefined(Request)) + { + writer.WritePropertyName("request"u8); + writer.WriteObjectValue(Request, options); + } + if (Optional.IsDefined(Response)) + { + writer.WritePropertyName("response"u8); + writer.WriteObjectValue(Response, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WebAppRequestHistoryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppRequestHistoryProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebAppRequestHistoryProperties(document.RootElement, options); + } + + internal static WebAppRequestHistoryProperties DeserializeWebAppRequestHistoryProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? startTime = default; + DateTimeOffset? endTime = default; + WebAppRequest request = default; + WebAppResponse response = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("request"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + request = WebAppRequest.DeserializeWebAppRequest(property.Value, options); + continue; + } + if (property.NameEquals("response"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + response = WebAppResponse.DeserializeWebAppResponse(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebAppRequestHistoryProperties(startTime, endTime, request, response, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StartOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" startTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StartOn)) + { + builder.Append(" startTime: "); + var formattedDateTimeString = TypeFormatters.ToString(StartOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EndOn)) + { + builder.Append(" endTime: "); + var formattedDateTimeString = TypeFormatters.ToString(EndOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Request), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" request: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Request)) + { + builder.Append(" request: "); + BicepSerializationHelpers.AppendChildObject(builder, Request, options, 2, false, " request: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Response), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" response: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Response)) + { + builder.Append(" response: "); + BicepSerializationHelpers.AppendChildObject(builder, Response, options, 2, false, " response: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WebAppRequestHistoryProperties)} does not support writing '{options.Format}' format."); + } + } + + WebAppRequestHistoryProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWebAppRequestHistoryProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebAppRequestHistoryProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRequestHistoryProperties.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRequestHistoryProperties.cs new file mode 100644 index 0000000000000..9c72b9a0952d2 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRequestHistoryProperties.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The request history. + public partial class WebAppRequestHistoryProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WebAppRequestHistoryProperties() + { + } + + /// Initializes a new instance of . + /// The time the request started. + /// The time the request ended. + /// The request. + /// The response. + /// Keeps track of any properties unknown to the library. + internal WebAppRequestHistoryProperties(DateTimeOffset? startOn, DateTimeOffset? endOn, WebAppRequest request, WebAppResponse response, IDictionary serializedAdditionalRawData) + { + StartOn = startOn; + EndOn = endOn; + Request = request; + Response = response; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The time the request started. + [WirePath("startTime")] + public DateTimeOffset? StartOn { get; set; } + /// The time the request ended. + [WirePath("endTime")] + public DateTimeOffset? EndOn { get; set; } + /// The request. + [WirePath("request")] + public WebAppRequest Request { get; set; } + /// The response. + [WirePath("response")] + public WebAppResponse Response { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppResponse.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppResponse.Serialization.cs new file mode 100644 index 0000000000000..8dab17885f8b4 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppResponse.Serialization.cs @@ -0,0 +1,226 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WebAppResponse : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppResponse)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Headers)) + { + writer.WritePropertyName("headers"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Headers); +#else + using (JsonDocument document = JsonDocument.Parse(Headers)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsDefined(StatusCode)) + { + writer.WritePropertyName("statusCode"u8); + writer.WriteNumberValue(StatusCode.Value); + } + if (Optional.IsDefined(BodyLink)) + { + writer.WritePropertyName("bodyLink"u8); + writer.WriteObjectValue(BodyLink, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WebAppResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppResponse)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebAppResponse(document.RootElement, options); + } + + internal static WebAppResponse DeserializeWebAppResponse(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BinaryData headers = default; + int? statusCode = default; + WebAppContentLink bodyLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("headers"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + headers = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("statusCode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + statusCode = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("bodyLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + bodyLink = WebAppContentLink.DeserializeWebAppContentLink(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebAppResponse(headers, statusCode, bodyLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Headers), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" headers: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Headers)) + { + builder.Append(" headers: "); + builder.AppendLine($"'{Headers.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StatusCode), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" statusCode: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StatusCode)) + { + builder.Append(" statusCode: "); + builder.AppendLine($"{StatusCode.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(BodyLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" bodyLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(BodyLink)) + { + builder.Append(" bodyLink: "); + BicepSerializationHelpers.AppendChildObject(builder, BodyLink, options, 2, false, " bodyLink: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WebAppResponse)} does not support writing '{options.Format}' format."); + } + } + + WebAppResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWebAppResponse(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebAppResponse)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppResponse.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppResponse.cs new file mode 100644 index 0000000000000..e445dff6c7545 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppResponse.cs @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// A response. + public partial class WebAppResponse + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WebAppResponse() + { + } + + /// Initializes a new instance of . + /// A list of all the headers attached to the response. + /// The status code of the response. + /// Details on the location of the body content. + /// Keeps track of any properties unknown to the library. + internal WebAppResponse(BinaryData headers, int? statusCode, WebAppContentLink bodyLink, IDictionary serializedAdditionalRawData) + { + Headers = headers; + StatusCode = statusCode; + BodyLink = bodyLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// A list of all the headers attached to the response. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("headers")] + public BinaryData Headers { get; set; } + /// The status code of the response. + [WirePath("statusCode")] + public int? StatusCode { get; set; } + /// Details on the location of the body content. + [WirePath("bodyLink")] + public WebAppContentLink BodyLink { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRetryHistory.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRetryHistory.Serialization.cs new file mode 100644 index 0000000000000..7c6c4ebf61a9f --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRetryHistory.Serialization.cs @@ -0,0 +1,333 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WebAppRetryHistory : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppRetryHistory)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(StartOn)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartOn.Value, "O"); + } + if (Optional.IsDefined(EndOn)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndOn.Value, "O"); + } + if (Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + } + if (Optional.IsDefined(ClientRequestId)) + { + writer.WritePropertyName("clientRequestId"u8); + writer.WriteStringValue(ClientRequestId); + } + if (Optional.IsDefined(ServiceRequestId)) + { + writer.WritePropertyName("serviceRequestId"u8); + writer.WriteStringValue(ServiceRequestId); + } + if (Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + writer.WriteObjectValue(Error, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WebAppRetryHistory IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppRetryHistory)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebAppRetryHistory(document.RootElement, options); + } + + internal static WebAppRetryHistory DeserializeWebAppRetryHistory(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? startTime = default; + DateTimeOffset? endTime = default; + string code = default; + string clientRequestId = default; + string serviceRequestId = default; + WebAppErrorResponse error = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("clientRequestId"u8)) + { + clientRequestId = property.Value.GetString(); + continue; + } + if (property.NameEquals("serviceRequestId"u8)) + { + serviceRequestId = property.Value.GetString(); + continue; + } + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = WebAppErrorResponse.DeserializeWebAppErrorResponse(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebAppRetryHistory( + startTime, + endTime, + code, + clientRequestId, + serviceRequestId, + error, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StartOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" startTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StartOn)) + { + builder.Append(" startTime: "); + var formattedDateTimeString = TypeFormatters.ToString(StartOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EndOn)) + { + builder.Append(" endTime: "); + var formattedDateTimeString = TypeFormatters.ToString(EndOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Code), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" code: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Code)) + { + builder.Append(" code: "); + if (Code.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Code}'''"); + } + else + { + builder.AppendLine($"'{Code}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientRequestId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientRequestId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientRequestId)) + { + builder.Append(" clientRequestId: "); + if (ClientRequestId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientRequestId}'''"); + } + else + { + builder.AppendLine($"'{ClientRequestId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ServiceRequestId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serviceRequestId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ServiceRequestId)) + { + builder.Append(" serviceRequestId: "); + if (ServiceRequestId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ServiceRequestId}'''"); + } + else + { + builder.AppendLine($"'{ServiceRequestId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("ErrorInfo", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" error: "); + builder.AppendLine("{"); + builder.Append(" error: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Error)) + { + builder.Append(" error: "); + BicepSerializationHelpers.AppendChildObject(builder, Error, options, 2, false, " error: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WebAppRetryHistory)} does not support writing '{options.Format}' format."); + } + } + + WebAppRetryHistory IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWebAppRetryHistory(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebAppRetryHistory)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRetryHistory.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRetryHistory.cs new file mode 100644 index 0000000000000..499e184739408 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRetryHistory.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The retry history. + public partial class WebAppRetryHistory + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WebAppRetryHistory() + { + } + + /// Initializes a new instance of . + /// Gets the start time. + /// Gets the end time. + /// Gets the status code. + /// Gets the client request Id. + /// Gets the service request Id. + /// Gets the error response. + /// Keeps track of any properties unknown to the library. + internal WebAppRetryHistory(DateTimeOffset? startOn, DateTimeOffset? endOn, string code, string clientRequestId, string serviceRequestId, WebAppErrorResponse error, IDictionary serializedAdditionalRawData) + { + StartOn = startOn; + EndOn = endOn; + Code = code; + ClientRequestId = clientRequestId; + ServiceRequestId = serviceRequestId; + Error = error; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets the start time. + [WirePath("startTime")] + public DateTimeOffset? StartOn { get; set; } + /// Gets the end time. + [WirePath("endTime")] + public DateTimeOffset? EndOn { get; set; } + /// Gets the status code. + [WirePath("code")] + public string Code { get; set; } + /// Gets the client request Id. + [WirePath("clientRequestId")] + public string ClientRequestId { get; set; } + /// Gets the service request Id. + [WirePath("serviceRequestId")] + public string ServiceRequestId { get; set; } + /// Gets the error response. + internal WebAppErrorResponse Error { get; set; } + /// The error properties. + [WirePath("error.error")] + public WebAppErrorProperties ErrorInfo + { + get => Error is null ? default : Error.ErrorInfo; + set + { + if (Error is null) + Error = new WebAppErrorResponse(); + Error.ErrorInfo = value; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRunActionCorrelation.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRunActionCorrelation.Serialization.cs new file mode 100644 index 0000000000000..a2b340820bf02 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRunActionCorrelation.Serialization.cs @@ -0,0 +1,259 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WebAppRunActionCorrelation : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppRunActionCorrelation)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(ActionTrackingId)) + { + writer.WritePropertyName("actionTrackingId"u8); + writer.WriteStringValue(ActionTrackingId); + } + if (Optional.IsDefined(ClientTrackingId)) + { + writer.WritePropertyName("clientTrackingId"u8); + writer.WriteStringValue(ClientTrackingId); + } + if (Optional.IsCollectionDefined(ClientKeywords)) + { + writer.WritePropertyName("clientKeywords"u8); + writer.WriteStartArray(); + foreach (var item in ClientKeywords) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WebAppRunActionCorrelation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppRunActionCorrelation)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebAppRunActionCorrelation(document.RootElement, options); + } + + internal static WebAppRunActionCorrelation DeserializeWebAppRunActionCorrelation(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string actionTrackingId = default; + string clientTrackingId = default; + IList clientKeywords = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("actionTrackingId"u8)) + { + actionTrackingId = property.Value.GetString(); + continue; + } + if (property.NameEquals("clientTrackingId"u8)) + { + clientTrackingId = property.Value.GetString(); + continue; + } + if (property.NameEquals("clientKeywords"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + clientKeywords = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebAppRunActionCorrelation(clientTrackingId, clientKeywords ?? new ChangeTrackingList(), serializedAdditionalRawData, actionTrackingId); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ActionTrackingId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" actionTrackingId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ActionTrackingId)) + { + builder.Append(" actionTrackingId: "); + if (ActionTrackingId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ActionTrackingId}'''"); + } + else + { + builder.AppendLine($"'{ActionTrackingId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientTrackingId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientTrackingId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientTrackingId)) + { + builder.Append(" clientTrackingId: "); + if (ClientTrackingId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientTrackingId}'''"); + } + else + { + builder.AppendLine($"'{ClientTrackingId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientKeywords), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientKeywords: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ClientKeywords)) + { + if (ClientKeywords.Any()) + { + builder.Append(" clientKeywords: "); + builder.AppendLine("["); + foreach (var item in ClientKeywords) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WebAppRunActionCorrelation)} does not support writing '{options.Format}' format."); + } + } + + WebAppRunActionCorrelation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWebAppRunActionCorrelation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebAppRunActionCorrelation)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRunActionCorrelation.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRunActionCorrelation.cs new file mode 100644 index 0000000000000..58612adc12453 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRunActionCorrelation.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The workflow run action correlation properties. + public partial class WebAppRunActionCorrelation : WebAppRunCorrelation + { + /// Initializes a new instance of . + public WebAppRunActionCorrelation() + { + } + + /// Initializes a new instance of . + /// The client tracking identifier. + /// The client keywords. + /// Keeps track of any properties unknown to the library. + /// The action tracking identifier. + internal WebAppRunActionCorrelation(string clientTrackingId, IList clientKeywords, IDictionary serializedAdditionalRawData, string actionTrackingId) : base(clientTrackingId, clientKeywords, serializedAdditionalRawData) + { + ActionTrackingId = actionTrackingId; + } + + /// The action tracking identifier. + [WirePath("actionTrackingId")] + public string ActionTrackingId { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRunCorrelation.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRunCorrelation.Serialization.cs new file mode 100644 index 0000000000000..cfa05a6b80a16 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRunCorrelation.Serialization.cs @@ -0,0 +1,225 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WebAppRunCorrelation : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppRunCorrelation)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(ClientTrackingId)) + { + writer.WritePropertyName("clientTrackingId"u8); + writer.WriteStringValue(ClientTrackingId); + } + if (Optional.IsCollectionDefined(ClientKeywords)) + { + writer.WritePropertyName("clientKeywords"u8); + writer.WriteStartArray(); + foreach (var item in ClientKeywords) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WebAppRunCorrelation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppRunCorrelation)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebAppRunCorrelation(document.RootElement, options); + } + + internal static WebAppRunCorrelation DeserializeWebAppRunCorrelation(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string clientTrackingId = default; + IList clientKeywords = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("clientTrackingId"u8)) + { + clientTrackingId = property.Value.GetString(); + continue; + } + if (property.NameEquals("clientKeywords"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + clientKeywords = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebAppRunCorrelation(clientTrackingId, clientKeywords ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientTrackingId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientTrackingId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientTrackingId)) + { + builder.Append(" clientTrackingId: "); + if (ClientTrackingId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientTrackingId}'''"); + } + else + { + builder.AppendLine($"'{ClientTrackingId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientKeywords), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientKeywords: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ClientKeywords)) + { + if (ClientKeywords.Any()) + { + builder.Append(" clientKeywords: "); + builder.AppendLine("["); + foreach (var item in ClientKeywords) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WebAppRunCorrelation)} does not support writing '{options.Format}' format."); + } + } + + WebAppRunCorrelation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWebAppRunCorrelation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebAppRunCorrelation)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRunCorrelation.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRunCorrelation.cs new file mode 100644 index 0000000000000..084a5a7ca1961 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WebAppRunCorrelation.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The correlation properties. + public partial class WebAppRunCorrelation + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WebAppRunCorrelation() + { + ClientKeywords = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The client tracking identifier. + /// The client keywords. + /// Keeps track of any properties unknown to the library. + internal WebAppRunCorrelation(string clientTrackingId, IList clientKeywords, IDictionary serializedAdditionalRawData) + { + ClientTrackingId = clientTrackingId; + ClientKeywords = clientKeywords; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The client tracking identifier. + [WirePath("clientTrackingId")] + public string ClientTrackingId { get; set; } + /// The client keywords. + [WirePath("clientKeywords")] + public IList ClientKeywords { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowArtifacts.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowArtifacts.Serialization.cs new file mode 100644 index 0000000000000..e9cb8f0e10492 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowArtifacts.Serialization.cs @@ -0,0 +1,203 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowArtifacts : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowArtifacts)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(AppSettings)) + { + writer.WritePropertyName("appSettings"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(AppSettings); +#else + using (JsonDocument document = JsonDocument.Parse(AppSettings)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsCollectionDefined(Files)) + { + writer.WritePropertyName("files"u8); + writer.WriteStartObject(); + foreach (var item in Files) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(FilesToDelete)) + { + writer.WritePropertyName("filesToDelete"u8); + writer.WriteStartArray(); + foreach (var item in FilesToDelete) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowArtifacts IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowArtifacts)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowArtifacts(document.RootElement, options); + } + + internal static WorkflowArtifacts DeserializeWorkflowArtifacts(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BinaryData appSettings = default; + IDictionary files = default; + IList filesToDelete = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("appSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + appSettings = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("files"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + files = dictionary; + continue; + } + if (property.NameEquals("filesToDelete"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + filesToDelete = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowArtifacts(appSettings, files ?? new ChangeTrackingDictionary(), filesToDelete ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(WorkflowArtifacts)} does not support writing '{options.Format}' format."); + } + } + + WorkflowArtifacts IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowArtifacts(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowArtifacts)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowArtifacts.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowArtifacts.cs new file mode 100644 index 0000000000000..ccb3e8b3d5b78 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowArtifacts.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The workflow filter. + public partial class WorkflowArtifacts + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WorkflowArtifacts() + { + Files = new ChangeTrackingDictionary(); + FilesToDelete = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Application settings of the workflow. + /// Files of the app. + /// Files of the app to delete. + /// Keeps track of any properties unknown to the library. + internal WorkflowArtifacts(BinaryData appSettings, IDictionary files, IList filesToDelete, IDictionary serializedAdditionalRawData) + { + AppSettings = appSettings; + Files = files; + FilesToDelete = filesToDelete; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// Application settings of the workflow. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("appSettings")] + public BinaryData AppSettings { get; set; } + /// + /// Files of the app. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("files")] + public IDictionary Files { get; } + /// Files of the app to delete. + [WirePath("filesToDelete")] + public IList FilesToDelete { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowContent.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowContent.Serialization.cs new file mode 100644 index 0000000000000..0d770663a1004 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowContent.Serialization.cs @@ -0,0 +1,267 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(WebAppParameterType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(WebAppParameterType.Value.ToString()); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Value); +#else + using (JsonDocument document = JsonDocument.Parse(Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Metadata); +#else + using (JsonDocument document = JsonDocument.Parse(Metadata)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowContent(document.RootElement, options); + } + + internal static WorkflowContent DeserializeWorkflowContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + WebAppParameterType? type = default; + BinaryData value = default; + BinaryData metadata = default; + string description = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new WebAppParameterType(property.Value.GetString()); + continue; + } + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + value = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("metadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + metadata = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowContent(type, value, metadata, description, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(WebAppParameterType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(WebAppParameterType)) + { + builder.Append(" type: "); + builder.AppendLine($"'{WebAppParameterType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + builder.AppendLine($"'{Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Metadata), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" metadata: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Metadata)) + { + builder.Append(" metadata: "); + builder.AppendLine($"'{Metadata.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowContent)} does not support writing '{options.Format}' format."); + } + } + + WorkflowContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowContent.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowContent.cs new file mode 100644 index 0000000000000..0c7d0ff584e23 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowContent.cs @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The workflow parameters. + public partial class WorkflowContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WorkflowContent() + { + } + + /// Initializes a new instance of . + /// The type. + /// The value. + /// The metadata. + /// The description. + /// Keeps track of any properties unknown to the library. + internal WorkflowContent(WebAppParameterType? webAppParameterType, BinaryData value, BinaryData metadata, string description, IDictionary serializedAdditionalRawData) + { + WebAppParameterType = webAppParameterType; + Value = value; + Metadata = metadata; + Description = description; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The type. + [WirePath("type")] + public WebAppParameterType? WebAppParameterType { get; set; } + /// + /// The value. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("value")] + public BinaryData Value { get; set; } + /// + /// The metadata. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("metadata")] + public BinaryData Metadata { get; set; } + /// The description. + [WirePath("description")] + public string Description { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowData.Serialization.cs new file mode 100644 index 0000000000000..4d310d3d9adfb --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowData.Serialization.cs @@ -0,0 +1,842 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + JsonSerializer.Serialize(writer, Identity); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(CreatedOn)) + { + writer.WritePropertyName("createdTime"u8); + writer.WriteStringValue(CreatedOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(ChangedOn)) + { + writer.WritePropertyName("changedTime"u8); + writer.WriteStringValue(ChangedOn.Value, "O"); + } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + } + if (options.Format != "W" && Optional.IsDefined(AccessEndpoint)) + { + writer.WritePropertyName("accessEndpoint"u8); + writer.WriteStringValue(AccessEndpoint); + } + if (Optional.IsDefined(EndpointsConfiguration)) + { + writer.WritePropertyName("endpointsConfiguration"u8); + writer.WriteObjectValue(EndpointsConfiguration, options); + } + if (Optional.IsDefined(AccessControl)) + { + writer.WritePropertyName("accessControl"u8); + writer.WriteObjectValue(AccessControl, options); + } + if (options.Format != "W" && Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku, options); + } + if (Optional.IsDefined(IntegrationAccount)) + { + writer.WritePropertyName("integrationAccount"u8); + writer.WriteObjectValue(IntegrationAccount, options); + } + if (Optional.IsDefined(IntegrationServiceEnvironment)) + { + writer.WritePropertyName("integrationServiceEnvironment"u8); + writer.WriteObjectValue(IntegrationServiceEnvironment, options); + } + if (Optional.IsDefined(Definition)) + { + writer.WritePropertyName("definition"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Definition); +#else + using (JsonDocument document = JsonDocument.Parse(Definition)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsCollectionDefined(Parameters)) + { + writer.WritePropertyName("parameters"u8); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.Value.ToString()); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowData(document.RootElement, options); + } + + internal static WorkflowData DeserializeWorkflowData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ManagedServiceIdentity identity = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + WorkflowProvisioningState? provisioningState = default; + DateTimeOffset? createdTime = default; + DateTimeOffset? changedTime = default; + WorkflowState? state = default; + string version = default; + string accessEndpoint = default; + FlowEndpointsConfiguration endpointsConfiguration = default; + FlowAccessControlConfiguration accessControl = default; + WorkflowSku sku = default; + WorkflowResourceReference integrationAccount = default; + WorkflowResourceReference integrationServiceEnvironment = default; + BinaryData definition = default; + IDictionary parameters = default; + AppServiceKind? kind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new WorkflowProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("createdTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createdTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("changedTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + changedTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("state"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new WorkflowState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("version"u8)) + { + version = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("accessEndpoint"u8)) + { + accessEndpoint = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("endpointsConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endpointsConfiguration = FlowEndpointsConfiguration.DeserializeFlowEndpointsConfiguration(property0.Value, options); + continue; + } + if (property0.NameEquals("accessControl"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + accessControl = FlowAccessControlConfiguration.DeserializeFlowAccessControlConfiguration(property0.Value, options); + continue; + } + if (property0.NameEquals("sku"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sku = WorkflowSku.DeserializeWorkflowSku(property0.Value, options); + continue; + } + if (property0.NameEquals("integrationAccount"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + integrationAccount = WorkflowResourceReference.DeserializeWorkflowResourceReference(property0.Value, options); + continue; + } + if (property0.NameEquals("integrationServiceEnvironment"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + integrationServiceEnvironment = WorkflowResourceReference.DeserializeWorkflowResourceReference(property0.Value, options); + continue; + } + if (property0.NameEquals("definition"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + definition = BinaryData.FromString(property0.Value.GetRawText()); + continue; + } + if (property0.NameEquals("parameters"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + dictionary.Add(property1.Name, WorkflowContent.DeserializeWorkflowContent(property1.Value, options)); + } + parameters = dictionary; + continue; + } + if (property0.NameEquals("kind"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + kind = new AppServiceKind(property0.Value.GetString()); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + identity, + provisioningState, + createdTime, + changedTime, + state, + version, + accessEndpoint, + endpointsConfiguration, + accessControl, + sku, + integrationAccount, + integrationServiceEnvironment, + definition, + parameters ?? new ChangeTrackingDictionary(), + kind, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" location: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" location: "); + builder.AppendLine($"'{Location.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Tags), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tags: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags.Any()) + { + builder.Append(" tags: "); + builder.AppendLine("{"); + foreach (var item in Tags) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + if (item.Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{item.Value}'''"); + } + else + { + builder.AppendLine($"'{item.Value}'"); + } + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Identity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" identity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Identity)) + { + builder.Append(" identity: "); + BicepSerializationHelpers.AppendChildObject(builder, Identity, options, 2, false, " identity: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + builder.AppendLine($"'{ProvisioningState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CreatedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" createdTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CreatedOn)) + { + builder.Append(" createdTime: "); + var formattedDateTimeString = TypeFormatters.ToString(CreatedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ChangedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" changedTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ChangedOn)) + { + builder.Append(" changedTime: "); + var formattedDateTimeString = TypeFormatters.ToString(ChangedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(State), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" state: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(State)) + { + builder.Append(" state: "); + builder.AppendLine($"'{State.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Version), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" version: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Version)) + { + builder.Append(" version: "); + if (Version.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Version}'''"); + } + else + { + builder.AppendLine($"'{Version}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AccessEndpoint), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" accessEndpoint: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AccessEndpoint)) + { + builder.Append(" accessEndpoint: "); + if (AccessEndpoint.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AccessEndpoint}'''"); + } + else + { + builder.AppendLine($"'{AccessEndpoint}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndpointsConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endpointsConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EndpointsConfiguration)) + { + builder.Append(" endpointsConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, EndpointsConfiguration, options, 4, false, " endpointsConfiguration: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AccessControl), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" accessControl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AccessControl)) + { + builder.Append(" accessControl: "); + BicepSerializationHelpers.AppendChildObject(builder, AccessControl, options, 4, false, " accessControl: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Sku), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sku: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Sku)) + { + builder.Append(" sku: "); + BicepSerializationHelpers.AppendChildObject(builder, Sku, options, 4, false, " sku: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IntegrationAccount), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" integrationAccount: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IntegrationAccount)) + { + builder.Append(" integrationAccount: "); + BicepSerializationHelpers.AppendChildObject(builder, IntegrationAccount, options, 4, false, " integrationAccount: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IntegrationServiceEnvironment), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" integrationServiceEnvironment: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IntegrationServiceEnvironment)) + { + builder.Append(" integrationServiceEnvironment: "); + BicepSerializationHelpers.AppendChildObject(builder, IntegrationServiceEnvironment, options, 4, false, " integrationServiceEnvironment: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Definition), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" definition: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Definition)) + { + builder.Append(" definition: "); + builder.AppendLine($"'{Definition.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Parameters), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" parameters: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Parameters)) + { + if (Parameters.Any()) + { + builder.Append(" parameters: "); + builder.AppendLine("{"); + foreach (var item in Parameters) + { + builder.Append($" '{item.Key}': "); + BicepSerializationHelpers.AppendChildObject(builder, item.Value, options, 6, false, " parameters: "); + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Kind), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" kind: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Kind)) + { + builder.Append(" kind: "); + builder.AppendLine($"'{Kind.Value.ToString()}'"); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowData)} does not support writing '{options.Format}' format."); + } + } + + WorkflowData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowData.cs new file mode 100644 index 0000000000000..9009700010418 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowData.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The workflow type. + public partial class WorkflowData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public WorkflowData(AzureLocation location) : base(location) + { + Parameters = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Managed service identity. + /// Gets the provisioning state. + /// Gets the created time. + /// Gets the changed time. + /// The state. + /// Gets the version. + /// Gets the access endpoint. + /// The endpoints configuration. + /// The access control configuration. + /// The sku. + /// The integration account. + /// The integration service environment. + /// The definition. + /// The parameters. + /// The workflow kind. + /// Keeps track of any properties unknown to the library. + internal WorkflowData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, WorkflowProvisioningState? provisioningState, DateTimeOffset? createdOn, DateTimeOffset? changedOn, WorkflowState? state, string version, string accessEndpoint, FlowEndpointsConfiguration endpointsConfiguration, FlowAccessControlConfiguration accessControl, WorkflowSku sku, WorkflowResourceReference integrationAccount, WorkflowResourceReference integrationServiceEnvironment, BinaryData definition, IDictionary parameters, AppServiceKind? kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Identity = identity; + ProvisioningState = provisioningState; + CreatedOn = createdOn; + ChangedOn = changedOn; + State = state; + Version = version; + AccessEndpoint = accessEndpoint; + EndpointsConfiguration = endpointsConfiguration; + AccessControl = accessControl; + Sku = sku; + IntegrationAccount = integrationAccount; + IntegrationServiceEnvironment = integrationServiceEnvironment; + Definition = definition; + Parameters = parameters; + Kind = kind; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal WorkflowData() + { + } + + /// Managed service identity. + [WirePath("identity")] + public ManagedServiceIdentity Identity { get; set; } + /// Gets the provisioning state. + [WirePath("properties.provisioningState")] + public WorkflowProvisioningState? ProvisioningState { get; } + /// Gets the created time. + [WirePath("properties.createdTime")] + public DateTimeOffset? CreatedOn { get; } + /// Gets the changed time. + [WirePath("properties.changedTime")] + public DateTimeOffset? ChangedOn { get; } + /// The state. + [WirePath("properties.state")] + public WorkflowState? State { get; set; } + /// Gets the version. + [WirePath("properties.version")] + public string Version { get; } + /// Gets the access endpoint. + [WirePath("properties.accessEndpoint")] + public string AccessEndpoint { get; } + /// The endpoints configuration. + [WirePath("properties.endpointsConfiguration")] + public FlowEndpointsConfiguration EndpointsConfiguration { get; set; } + /// The access control configuration. + [WirePath("properties.accessControl")] + public FlowAccessControlConfiguration AccessControl { get; set; } + /// The sku. + [WirePath("properties.sku")] + public WorkflowSku Sku { get; } + /// The integration account. + [WirePath("properties.integrationAccount")] + public WorkflowResourceReference IntegrationAccount { get; set; } + /// The integration service environment. + [WirePath("properties.integrationServiceEnvironment")] + public WorkflowResourceReference IntegrationServiceEnvironment { get; set; } + /// + /// The definition. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("properties.definition")] + public BinaryData Definition { get; set; } + /// The parameters. + [WirePath("properties.parameters")] + public IDictionary Parameters { get; } + /// The workflow kind. + [WirePath("properties.kind")] + public AppServiceKind? Kind { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowEnvelopeCollection.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowEnvelopeCollection.Serialization.cs new file mode 100644 index 0000000000000..ec2e0edc6cc82 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowEnvelopeCollection.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class WorkflowEnvelopeCollection : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowEnvelopeCollection)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowEnvelopeCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowEnvelopeCollection)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowEnvelopeCollection(document.RootElement, options); + } + + internal static WorkflowEnvelopeCollection DeserializeWorkflowEnvelopeCollection(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(WorkflowEnvelopeData.DeserializeWorkflowEnvelopeData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowEnvelopeCollection(value, nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowEnvelopeCollection)} does not support writing '{options.Format}' format."); + } + } + + WorkflowEnvelopeCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowEnvelopeCollection(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowEnvelopeCollection)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowEnvelopeCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowEnvelopeCollection.cs new file mode 100644 index 0000000000000..ea13f067de0dc --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowEnvelopeCollection.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Collection of Kudu workflow information elements. + internal partial class WorkflowEnvelopeCollection + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Collection of resources. + /// is null. + internal WorkflowEnvelopeCollection(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// Collection of resources. + /// Link to next page of resources. + /// Keeps track of any properties unknown to the library. + internal WorkflowEnvelopeCollection(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal WorkflowEnvelopeCollection() + { + } + + /// Collection of resources. + public IReadOnlyList Value { get; } + /// Link to next page of resources. + public string NextLink { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowEnvelopeProperties.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowEnvelopeProperties.Serialization.cs new file mode 100644 index 0000000000000..80659f6d97295 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowEnvelopeProperties.Serialization.cs @@ -0,0 +1,264 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowEnvelopeProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowEnvelopeProperties)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Files)) + { + writer.WritePropertyName("files"u8); + writer.WriteStartObject(); + foreach (var item in Files) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(FlowState)) + { + writer.WritePropertyName("flowState"u8); + writer.WriteStringValue(FlowState.Value.ToString()); + } + if (Optional.IsDefined(Health)) + { + writer.WritePropertyName("health"u8); + writer.WriteObjectValue(Health, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowEnvelopeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowEnvelopeProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowEnvelopeProperties(document.RootElement, options); + } + + internal static WorkflowEnvelopeProperties DeserializeWorkflowEnvelopeProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyDictionary files = default; + WorkflowState? flowState = default; + WorkflowHealth health = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("files"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + files = dictionary; + continue; + } + if (property.NameEquals("flowState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + flowState = new WorkflowState(property.Value.GetString()); + continue; + } + if (property.NameEquals("health"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + health = WorkflowHealth.DeserializeWorkflowHealth(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowEnvelopeProperties(files ?? new ChangeTrackingDictionary(), flowState, health, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Files), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" files: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Files)) + { + if (Files.Any()) + { + builder.Append(" files: "); + builder.AppendLine("{"); + foreach (var item in Files) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + builder.AppendLine($"'{item.Value.ToString()}'"); + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(FlowState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" flowState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(FlowState)) + { + builder.Append(" flowState: "); + builder.AppendLine($"'{FlowState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Health), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" health: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Health)) + { + builder.Append(" health: "); + BicepSerializationHelpers.AppendChildObject(builder, Health, options, 2, false, " health: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowEnvelopeProperties)} does not support writing '{options.Format}' format."); + } + } + + WorkflowEnvelopeProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowEnvelopeProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowEnvelopeProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowEnvelopeProperties.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowEnvelopeProperties.cs new file mode 100644 index 0000000000000..2ac03fe175437 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowEnvelopeProperties.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Additional workflow properties. + public partial class WorkflowEnvelopeProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WorkflowEnvelopeProperties() + { + Files = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Gets or sets the files. + /// Gets or sets the state of the workflow. + /// Gets or sets workflow health. + /// Keeps track of any properties unknown to the library. + internal WorkflowEnvelopeProperties(IReadOnlyDictionary files, WorkflowState? flowState, WorkflowHealth health, IDictionary serializedAdditionalRawData) + { + Files = files; + FlowState = flowState; + Health = health; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// Gets or sets the files. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("files")] + public IReadOnlyDictionary Files { get; } + /// Gets or sets the state of the workflow. + [WirePath("flowState")] + public WorkflowState? FlowState { get; } + /// Gets or sets workflow health. + [WirePath("health")] + public WorkflowHealth Health { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpression.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpression.Serialization.cs new file mode 100644 index 0000000000000..5c97641e84ddb --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpression.Serialization.cs @@ -0,0 +1,279 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowExpression : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowExpression)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Text)) + { + writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Value); +#else + using (JsonDocument document = JsonDocument.Parse(Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsCollectionDefined(Subexpressions)) + { + writer.WritePropertyName("subexpressions"u8); + writer.WriteStartArray(); + foreach (var item in Subexpressions) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + writer.WriteObjectValue(Error, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowExpression IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowExpression)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowExpression(document.RootElement, options); + } + + internal static WorkflowExpression DeserializeWorkflowExpression(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string text = default; + BinaryData value = default; + IReadOnlyList subexpressions = default; + WorkflowExpressionResourceErrorInfo error = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("text"u8)) + { + text = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + value = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("subexpressions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DeserializeWorkflowExpression(item, options)); + } + subexpressions = array; + continue; + } + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = WorkflowExpressionResourceErrorInfo.DeserializeWorkflowExpressionResourceErrorInfo(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowExpression(text, value, subexpressions ?? new ChangeTrackingList(), error, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Text), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" text: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Text)) + { + builder.Append(" text: "); + if (Text.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Text}'''"); + } + else + { + builder.AppendLine($"'{Text}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + builder.AppendLine($"'{Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Subexpressions), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subexpressions: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Subexpressions)) + { + if (Subexpressions.Any()) + { + builder.Append(" subexpressions: "); + builder.AppendLine("["); + foreach (var item in Subexpressions) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " subexpressions: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Error), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" error: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Error)) + { + builder.Append(" error: "); + BicepSerializationHelpers.AppendChildObject(builder, Error, options, 2, false, " error: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowExpression)} does not support writing '{options.Format}' format."); + } + } + + WorkflowExpression IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowExpression(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowExpression)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpression.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpression.cs new file mode 100644 index 0000000000000..ade94d63413c8 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpression.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The expression. + public partial class WorkflowExpression + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WorkflowExpression() + { + Subexpressions = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The text. + /// Anything. + /// The sub expressions. + /// The azure resource error info. + /// Keeps track of any properties unknown to the library. + internal WorkflowExpression(string text, BinaryData value, IReadOnlyList subexpressions, WorkflowExpressionResourceErrorInfo error, IDictionary serializedAdditionalRawData) + { + Text = text; + Value = value; + Subexpressions = subexpressions; + Error = error; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The text. + [WirePath("text")] + public string Text { get; } + /// + /// Anything + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("value")] + public BinaryData Value { get; } + /// The sub expressions. + [WirePath("subexpressions")] + public IReadOnlyList Subexpressions { get; } + /// The azure resource error info. + [WirePath("error")] + public WorkflowExpressionResourceErrorInfo Error { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpressionResourceErrorInfo.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpressionResourceErrorInfo.Serialization.cs new file mode 100644 index 0000000000000..ee2dfed8c831b --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpressionResourceErrorInfo.Serialization.cs @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowExpressionResourceErrorInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowExpressionResourceErrorInfo)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + if (Optional.IsCollectionDefined(Details)) + { + writer.WritePropertyName("details"u8); + writer.WriteStartArray(); + foreach (var item in Details) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowExpressionResourceErrorInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowExpressionResourceErrorInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowExpressionResourceErrorInfo(document.RootElement, options); + } + + internal static WorkflowExpressionResourceErrorInfo DeserializeWorkflowExpressionResourceErrorInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string message = default; + IReadOnlyList details = default; + string code = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("details"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DeserializeWorkflowExpressionResourceErrorInfo(item, options)); + } + details = array; + continue; + } + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowExpressionResourceErrorInfo(code, serializedAdditionalRawData, message, details ?? new ChangeTrackingList()); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Message), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" message: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Message)) + { + builder.Append(" message: "); + if (Message.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Message}'''"); + } + else + { + builder.AppendLine($"'{Message}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Details), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" details: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Details)) + { + if (Details.Any()) + { + builder.Append(" details: "); + builder.AppendLine("["); + foreach (var item in Details) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " details: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Code), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" code: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Code)) + { + builder.Append(" code: "); + if (Code.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Code}'''"); + } + else + { + builder.AppendLine($"'{Code}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowExpressionResourceErrorInfo)} does not support writing '{options.Format}' format."); + } + } + + WorkflowExpressionResourceErrorInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowExpressionResourceErrorInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowExpressionResourceErrorInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpressionResourceErrorInfo.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpressionResourceErrorInfo.cs new file mode 100644 index 0000000000000..149f518b4d1df --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpressionResourceErrorInfo.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The azure resource error info. + public partial class WorkflowExpressionResourceErrorInfo : WebAppErrorInfo + { + /// Initializes a new instance of . + /// The error code. + /// The error message. + /// or is null. + internal WorkflowExpressionResourceErrorInfo(string code, string message) : base(code) + { + Argument.AssertNotNull(code, nameof(code)); + Argument.AssertNotNull(message, nameof(message)); + + Message = message; + Details = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The error code. + /// Keeps track of any properties unknown to the library. + /// The error message. + /// The error details. + internal WorkflowExpressionResourceErrorInfo(string code, IDictionary serializedAdditionalRawData, string message, IReadOnlyList details) : base(code, serializedAdditionalRawData) + { + Message = message; + Details = details; + } + + /// Initializes a new instance of for deserialization. + internal WorkflowExpressionResourceErrorInfo() + { + } + + /// The error message. + [WirePath("message")] + public string Message { get; } + /// The error details. + [WirePath("details")] + public IReadOnlyList Details { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpressionRoot.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpressionRoot.Serialization.cs new file mode 100644 index 0000000000000..44bfd04854d29 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpressionRoot.Serialization.cs @@ -0,0 +1,319 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowExpressionRoot : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowExpressionRoot)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Path)) + { + writer.WritePropertyName("path"u8); + writer.WriteStringValue(Path); + } + if (Optional.IsDefined(Text)) + { + writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Value); +#else + using (JsonDocument document = JsonDocument.Parse(Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsCollectionDefined(Subexpressions)) + { + writer.WritePropertyName("subexpressions"u8); + writer.WriteStartArray(); + foreach (var item in Subexpressions) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + writer.WriteObjectValue(Error, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowExpressionRoot IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowExpressionRoot)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowExpressionRoot(document.RootElement, options); + } + + internal static WorkflowExpressionRoot DeserializeWorkflowExpressionRoot(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string path = default; + string text = default; + BinaryData value = default; + IReadOnlyList subexpressions = default; + WorkflowExpressionResourceErrorInfo error = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("path"u8)) + { + path = property.Value.GetString(); + continue; + } + if (property.NameEquals("text"u8)) + { + text = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + value = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("subexpressions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DeserializeWorkflowExpression(item, options)); + } + subexpressions = array; + continue; + } + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = WorkflowExpressionResourceErrorInfo.DeserializeWorkflowExpressionResourceErrorInfo(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowExpressionRoot( + text, + value, + subexpressions ?? new ChangeTrackingList(), + error, + serializedAdditionalRawData, + path); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Path), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" path: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Path)) + { + builder.Append(" path: "); + if (Path.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Path}'''"); + } + else + { + builder.AppendLine($"'{Path}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Text), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" text: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Text)) + { + builder.Append(" text: "); + if (Text.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Text}'''"); + } + else + { + builder.AppendLine($"'{Text}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + builder.AppendLine($"'{Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Subexpressions), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subexpressions: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Subexpressions)) + { + if (Subexpressions.Any()) + { + builder.Append(" subexpressions: "); + builder.AppendLine("["); + foreach (var item in Subexpressions) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " subexpressions: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Error), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" error: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Error)) + { + builder.Append(" error: "); + BicepSerializationHelpers.AppendChildObject(builder, Error, options, 2, false, " error: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowExpressionRoot)} does not support writing '{options.Format}' format."); + } + } + + WorkflowExpressionRoot IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowExpressionRoot(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowExpressionRoot)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpressionRoot.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpressionRoot.cs new file mode 100644 index 0000000000000..a04037661713e --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowExpressionRoot.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The expression root. + public partial class WorkflowExpressionRoot : WorkflowExpression + { + /// Initializes a new instance of . + internal WorkflowExpressionRoot() + { + } + + /// Initializes a new instance of . + /// The text. + /// Anything. + /// The sub expressions. + /// The azure resource error info. + /// Keeps track of any properties unknown to the library. + /// The path. + internal WorkflowExpressionRoot(string text, BinaryData value, IReadOnlyList subexpressions, WorkflowExpressionResourceErrorInfo error, IDictionary serializedAdditionalRawData, string path) : base(text, value, subexpressions, error, serializedAdditionalRawData) + { + Path = path; + } + + /// The path. + [WirePath("path")] + public string Path { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowHealth.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowHealth.Serialization.cs new file mode 100644 index 0000000000000..d8e009af1c620 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowHealth.Serialization.cs @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowHealth : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowHealth)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.ToSerialString()); + if (Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + JsonSerializer.Serialize(writer, Error); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowHealth IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowHealth)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowHealth(document.RootElement, options); + } + + internal static WorkflowHealth DeserializeWorkflowHealth(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + WorkflowHealthState state = default; + ResponseError error = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("state"u8)) + { + state = property.Value.GetString().ToWorkflowHealthState(); + continue; + } + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowHealth(state, error, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(State), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" state: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" state: "); + builder.AppendLine($"'{State.ToSerialString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Error), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" error: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Error)) + { + builder.Append(" error: "); + builder.AppendLine($"'{Error.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowHealth)} does not support writing '{options.Format}' format."); + } + } + + WorkflowHealth IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowHealth(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowHealth)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowHealth.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowHealth.cs new file mode 100644 index 0000000000000..34452a6026900 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowHealth.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Represents the workflow health. + public partial class WorkflowHealth + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Gets or sets the workflow health state. + internal WorkflowHealth(WorkflowHealthState state) + { + State = state; + } + + /// Initializes a new instance of . + /// Gets or sets the workflow health state. + /// Gets or sets the workflow error. + /// Keeps track of any properties unknown to the library. + internal WorkflowHealth(WorkflowHealthState state, ResponseError error, IDictionary serializedAdditionalRawData) + { + State = state; + Error = error; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal WorkflowHealth() + { + } + + /// Gets or sets the workflow health state. + [WirePath("state")] + public WorkflowHealthState State { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowHealthState.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowHealthState.Serialization.cs new file mode 100644 index 0000000000000..970c0d3b638c3 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowHealthState.Serialization.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.AppService.Models +{ + internal static partial class WorkflowHealthStateExtensions + { + public static string ToSerialString(this WorkflowHealthState value) => value switch + { + WorkflowHealthState.Unknown => "Unknown", + WorkflowHealthState.NotSpecified => "NotSpecified", + WorkflowHealthState.Healthy => "Healthy", + WorkflowHealthState.Unhealthy => "Unhealthy", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown WorkflowHealthState value.") + }; + + public static WorkflowHealthState ToWorkflowHealthState(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Unknown")) return WorkflowHealthState.Unknown; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "NotSpecified")) return WorkflowHealthState.NotSpecified; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Healthy")) return WorkflowHealthState.Healthy; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Unhealthy")) return WorkflowHealthState.Unhealthy; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown WorkflowHealthState value."); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowHealthState.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowHealthState.cs new file mode 100644 index 0000000000000..fa0f425141d2a --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowHealthState.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.AppService.Models +{ + /// Gets or sets the workflow health state. + public enum WorkflowHealthState + { + /// Unknown. + Unknown, + /// NotSpecified. + NotSpecified, + /// Healthy. + Healthy, + /// Unhealthy. + Unhealthy + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowOutputContent.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowOutputContent.Serialization.cs new file mode 100644 index 0000000000000..12f251bbb8ac6 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowOutputContent.Serialization.cs @@ -0,0 +1,310 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowOutputContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowOutputContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Error); +#else + using (JsonDocument document = JsonDocument.Parse(Error)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsDefined(WebAppParameterType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(WebAppParameterType.Value.ToString()); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Value); +#else + using (JsonDocument document = JsonDocument.Parse(Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Metadata); +#else + using (JsonDocument document = JsonDocument.Parse(Metadata)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowOutputContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowOutputContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowOutputContent(document.RootElement, options); + } + + internal static WorkflowOutputContent DeserializeWorkflowOutputContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BinaryData error = default; + WebAppParameterType? type = default; + BinaryData value = default; + BinaryData metadata = default; + string description = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new WebAppParameterType(property.Value.GetString()); + continue; + } + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + value = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("metadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + metadata = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowOutputContent( + type, + value, + metadata, + description, + serializedAdditionalRawData, + error); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Error), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" error: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Error)) + { + builder.Append(" error: "); + builder.AppendLine($"'{Error.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(WebAppParameterType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(WebAppParameterType)) + { + builder.Append(" type: "); + builder.AppendLine($"'{WebAppParameterType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + builder.AppendLine($"'{Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Metadata), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" metadata: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Metadata)) + { + builder.Append(" metadata: "); + builder.AppendLine($"'{Metadata.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowOutputContent)} does not support writing '{options.Format}' format."); + } + } + + WorkflowOutputContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowOutputContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowOutputContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowOutputContent.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowOutputContent.cs new file mode 100644 index 0000000000000..37a2500196ebe --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowOutputContent.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The workflow output parameter. + public partial class WorkflowOutputContent : WorkflowContent + { + /// Initializes a new instance of . + public WorkflowOutputContent() + { + } + + /// Initializes a new instance of . + /// The type. + /// The value. + /// The metadata. + /// The description. + /// Keeps track of any properties unknown to the library. + /// Gets the error. + internal WorkflowOutputContent(WebAppParameterType? webAppParameterType, BinaryData value, BinaryData metadata, string description, IDictionary serializedAdditionalRawData, BinaryData error) : base(webAppParameterType, value, metadata, description, serializedAdditionalRawData) + { + Error = error; + } + + /// + /// Gets the error. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("error")] + public BinaryData Error { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowProvisioningState.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowProvisioningState.cs new file mode 100644 index 0000000000000..8da83d96372ec --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowProvisioningState.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The workflow provisioning state. + public readonly partial struct WorkflowProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public WorkflowProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSpecifiedValue = "NotSpecified"; + private const string AcceptedValue = "Accepted"; + private const string RunningValue = "Running"; + private const string ReadyValue = "Ready"; + private const string CreatingValue = "Creating"; + private const string CreatedValue = "Created"; + private const string DeletingValue = "Deleting"; + private const string DeletedValue = "Deleted"; + private const string CanceledValue = "Canceled"; + private const string FailedValue = "Failed"; + private const string SucceededValue = "Succeeded"; + private const string MovingValue = "Moving"; + private const string UpdatingValue = "Updating"; + private const string RegisteringValue = "Registering"; + private const string RegisteredValue = "Registered"; + private const string UnregisteringValue = "Unregistering"; + private const string UnregisteredValue = "Unregistered"; + private const string CompletedValue = "Completed"; + private const string RenewingValue = "Renewing"; + private const string PendingValue = "Pending"; + private const string WaitingValue = "Waiting"; + private const string InProgressValue = "InProgress"; + + /// NotSpecified. + public static WorkflowProvisioningState NotSpecified { get; } = new WorkflowProvisioningState(NotSpecifiedValue); + /// Accepted. + public static WorkflowProvisioningState Accepted { get; } = new WorkflowProvisioningState(AcceptedValue); + /// Running. + public static WorkflowProvisioningState Running { get; } = new WorkflowProvisioningState(RunningValue); + /// Ready. + public static WorkflowProvisioningState Ready { get; } = new WorkflowProvisioningState(ReadyValue); + /// Creating. + public static WorkflowProvisioningState Creating { get; } = new WorkflowProvisioningState(CreatingValue); + /// Created. + public static WorkflowProvisioningState Created { get; } = new WorkflowProvisioningState(CreatedValue); + /// Deleting. + public static WorkflowProvisioningState Deleting { get; } = new WorkflowProvisioningState(DeletingValue); + /// Deleted. + public static WorkflowProvisioningState Deleted { get; } = new WorkflowProvisioningState(DeletedValue); + /// Canceled. + public static WorkflowProvisioningState Canceled { get; } = new WorkflowProvisioningState(CanceledValue); + /// Failed. + public static WorkflowProvisioningState Failed { get; } = new WorkflowProvisioningState(FailedValue); + /// Succeeded. + public static WorkflowProvisioningState Succeeded { get; } = new WorkflowProvisioningState(SucceededValue); + /// Moving. + public static WorkflowProvisioningState Moving { get; } = new WorkflowProvisioningState(MovingValue); + /// Updating. + public static WorkflowProvisioningState Updating { get; } = new WorkflowProvisioningState(UpdatingValue); + /// Registering. + public static WorkflowProvisioningState Registering { get; } = new WorkflowProvisioningState(RegisteringValue); + /// Registered. + public static WorkflowProvisioningState Registered { get; } = new WorkflowProvisioningState(RegisteredValue); + /// Unregistering. + public static WorkflowProvisioningState Unregistering { get; } = new WorkflowProvisioningState(UnregisteringValue); + /// Unregistered. + public static WorkflowProvisioningState Unregistered { get; } = new WorkflowProvisioningState(UnregisteredValue); + /// Completed. + public static WorkflowProvisioningState Completed { get; } = new WorkflowProvisioningState(CompletedValue); + /// Renewing. + public static WorkflowProvisioningState Renewing { get; } = new WorkflowProvisioningState(RenewingValue); + /// Pending. + public static WorkflowProvisioningState Pending { get; } = new WorkflowProvisioningState(PendingValue); + /// Waiting. + public static WorkflowProvisioningState Waiting { get; } = new WorkflowProvisioningState(WaitingValue); + /// InProgress. + public static WorkflowProvisioningState InProgress { get; } = new WorkflowProvisioningState(InProgressValue); + /// Determines if two values are the same. + public static bool operator ==(WorkflowProvisioningState left, WorkflowProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WorkflowProvisioningState left, WorkflowProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator WorkflowProvisioningState(string value) => new WorkflowProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WorkflowProvisioningState other && Equals(other); + /// + public bool Equals(WorkflowProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRecurrenceFrequency.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRecurrenceFrequency.cs new file mode 100644 index 0000000000000..d95d87b8a6f07 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRecurrenceFrequency.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The recurrence frequency. + public readonly partial struct WorkflowRecurrenceFrequency : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public WorkflowRecurrenceFrequency(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSpecifiedValue = "NotSpecified"; + private const string SecondValue = "Second"; + private const string MinuteValue = "Minute"; + private const string HourValue = "Hour"; + private const string DayValue = "Day"; + private const string WeekValue = "Week"; + private const string MonthValue = "Month"; + private const string YearValue = "Year"; + + /// NotSpecified. + public static WorkflowRecurrenceFrequency NotSpecified { get; } = new WorkflowRecurrenceFrequency(NotSpecifiedValue); + /// Second. + public static WorkflowRecurrenceFrequency Second { get; } = new WorkflowRecurrenceFrequency(SecondValue); + /// Minute. + public static WorkflowRecurrenceFrequency Minute { get; } = new WorkflowRecurrenceFrequency(MinuteValue); + /// Hour. + public static WorkflowRecurrenceFrequency Hour { get; } = new WorkflowRecurrenceFrequency(HourValue); + /// Day. + public static WorkflowRecurrenceFrequency Day { get; } = new WorkflowRecurrenceFrequency(DayValue); + /// Week. + public static WorkflowRecurrenceFrequency Week { get; } = new WorkflowRecurrenceFrequency(WeekValue); + /// Month. + public static WorkflowRecurrenceFrequency Month { get; } = new WorkflowRecurrenceFrequency(MonthValue); + /// Year. + public static WorkflowRecurrenceFrequency Year { get; } = new WorkflowRecurrenceFrequency(YearValue); + /// Determines if two values are the same. + public static bool operator ==(WorkflowRecurrenceFrequency left, WorkflowRecurrenceFrequency right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WorkflowRecurrenceFrequency left, WorkflowRecurrenceFrequency right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator WorkflowRecurrenceFrequency(string value) => new WorkflowRecurrenceFrequency(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WorkflowRecurrenceFrequency other && Equals(other); + /// + public bool Equals(WorkflowRecurrenceFrequency other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRecurrenceSchedule.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRecurrenceSchedule.Serialization.cs new file mode 100644 index 0000000000000..c60bfb05e2ef8 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRecurrenceSchedule.Serialization.cs @@ -0,0 +1,376 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowRecurrenceSchedule : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRecurrenceSchedule)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Minutes)) + { + writer.WritePropertyName("minutes"u8); + writer.WriteStartArray(); + foreach (var item in Minutes) + { + writer.WriteNumberValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Hours)) + { + writer.WritePropertyName("hours"u8); + writer.WriteStartArray(); + foreach (var item in Hours) + { + writer.WriteNumberValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(WeekDays)) + { + writer.WritePropertyName("weekDays"u8); + writer.WriteStartArray(); + foreach (var item in WeekDays) + { + writer.WriteStringValue(item.ToSerialString()); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(MonthDays)) + { + writer.WritePropertyName("monthDays"u8); + writer.WriteStartArray(); + foreach (var item in MonthDays) + { + writer.WriteNumberValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(MonthlyOccurrences)) + { + writer.WritePropertyName("monthlyOccurrences"u8); + writer.WriteStartArray(); + foreach (var item in MonthlyOccurrences) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowRecurrenceSchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRecurrenceSchedule)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowRecurrenceSchedule(document.RootElement, options); + } + + internal static WorkflowRecurrenceSchedule DeserializeWorkflowRecurrenceSchedule(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList minutes = default; + IReadOnlyList hours = default; + IReadOnlyList weekDays = default; + IReadOnlyList monthDays = default; + IReadOnlyList monthlyOccurrences = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("minutes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetInt32()); + } + minutes = array; + continue; + } + if (property.NameEquals("hours"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetInt32()); + } + hours = array; + continue; + } + if (property.NameEquals("weekDays"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString().ToWebAppDayOfWeek()); + } + weekDays = array; + continue; + } + if (property.NameEquals("monthDays"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetInt32()); + } + monthDays = array; + continue; + } + if (property.NameEquals("monthlyOccurrences"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(RecurrenceScheduleOccurrence.DeserializeRecurrenceScheduleOccurrence(item, options)); + } + monthlyOccurrences = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowRecurrenceSchedule( + minutes ?? new ChangeTrackingList(), + hours ?? new ChangeTrackingList(), + weekDays ?? new ChangeTrackingList(), + monthDays ?? new ChangeTrackingList(), + monthlyOccurrences ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Minutes), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" minutes: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Minutes)) + { + if (Minutes.Any()) + { + builder.Append(" minutes: "); + builder.AppendLine("["); + foreach (var item in Minutes) + { + builder.AppendLine($" {item}"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Hours), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" hours: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Hours)) + { + if (Hours.Any()) + { + builder.Append(" hours: "); + builder.AppendLine("["); + foreach (var item in Hours) + { + builder.AppendLine($" {item}"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(WeekDays), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" weekDays: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(WeekDays)) + { + if (WeekDays.Any()) + { + builder.Append(" weekDays: "); + builder.AppendLine("["); + foreach (var item in WeekDays) + { + builder.AppendLine($" '{item.ToSerialString()}'"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MonthDays), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" monthDays: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(MonthDays)) + { + if (MonthDays.Any()) + { + builder.Append(" monthDays: "); + builder.AppendLine("["); + foreach (var item in MonthDays) + { + builder.AppendLine($" {item}"); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MonthlyOccurrences), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" monthlyOccurrences: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(MonthlyOccurrences)) + { + if (MonthlyOccurrences.Any()) + { + builder.Append(" monthlyOccurrences: "); + builder.AppendLine("["); + foreach (var item in MonthlyOccurrences) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " monthlyOccurrences: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowRecurrenceSchedule)} does not support writing '{options.Format}' format."); + } + } + + WorkflowRecurrenceSchedule IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowRecurrenceSchedule(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowRecurrenceSchedule)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRecurrenceSchedule.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRecurrenceSchedule.cs new file mode 100644 index 0000000000000..36200ebfbe77a --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRecurrenceSchedule.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The recurrence schedule. + public partial class WorkflowRecurrenceSchedule + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WorkflowRecurrenceSchedule() + { + Minutes = new ChangeTrackingList(); + Hours = new ChangeTrackingList(); + WeekDays = new ChangeTrackingList(); + MonthDays = new ChangeTrackingList(); + MonthlyOccurrences = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The minutes. + /// The hours. + /// The days of the week. + /// The month days. + /// The monthly occurrences. + /// Keeps track of any properties unknown to the library. + internal WorkflowRecurrenceSchedule(IReadOnlyList minutes, IReadOnlyList hours, IReadOnlyList weekDays, IReadOnlyList monthDays, IReadOnlyList monthlyOccurrences, IDictionary serializedAdditionalRawData) + { + Minutes = minutes; + Hours = hours; + WeekDays = weekDays; + MonthDays = monthDays; + MonthlyOccurrences = monthlyOccurrences; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The minutes. + [WirePath("minutes")] + public IReadOnlyList Minutes { get; } + /// The hours. + [WirePath("hours")] + public IReadOnlyList Hours { get; } + /// The days of the week. + [WirePath("weekDays")] + public IReadOnlyList WeekDays { get; } + /// The month days. + [WirePath("monthDays")] + public IReadOnlyList MonthDays { get; } + /// The monthly occurrences. + [WirePath("monthlyOccurrences")] + public IReadOnlyList MonthlyOccurrences { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRegenerateActionContent.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRegenerateActionContent.Serialization.cs new file mode 100644 index 0000000000000..331b9ae1e8784 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRegenerateActionContent.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowRegenerateActionContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRegenerateActionContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(KeyType)) + { + writer.WritePropertyName("keyType"u8); + writer.WriteStringValue(KeyType.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowRegenerateActionContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRegenerateActionContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowRegenerateActionContent(document.RootElement, options); + } + + internal static WorkflowRegenerateActionContent DeserializeWorkflowRegenerateActionContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + WebAppKeyType? keyType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("keyType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + keyType = new WebAppKeyType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowRegenerateActionContent(keyType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(WorkflowRegenerateActionContent)} does not support writing '{options.Format}' format."); + } + } + + WorkflowRegenerateActionContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowRegenerateActionContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowRegenerateActionContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRegenerateActionContent.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRegenerateActionContent.cs new file mode 100644 index 0000000000000..bcf6bf790270a --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRegenerateActionContent.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The access key regenerate action content. + public partial class WorkflowRegenerateActionContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WorkflowRegenerateActionContent() + { + } + + /// Initializes a new instance of . + /// The key type. + /// Keeps track of any properties unknown to the library. + internal WorkflowRegenerateActionContent(WebAppKeyType? keyType, IDictionary serializedAdditionalRawData) + { + KeyType = keyType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The key type. + [WirePath("keyType")] + public WebAppKeyType? KeyType { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowResourceReference.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowResourceReference.Serialization.cs new file mode 100644 index 0000000000000..e5dab9b89c6a5 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowResourceReference.Serialization.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowResourceReference : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowResourceReference)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W" && Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W" && Optional.IsDefined(ResourceType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowResourceReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowResourceReference)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowResourceReference(document.RootElement, options); + } + + internal static WorkflowResourceReference DeserializeWorkflowResourceReference(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType? type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new ResourceType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowResourceReference(id, name, type, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowResourceReference)} does not support writing '{options.Format}' format."); + } + } + + WorkflowResourceReference IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowResourceReference(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowResourceReference)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowResourceReference.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowResourceReference.cs new file mode 100644 index 0000000000000..d8d6494ce2e65 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowResourceReference.cs @@ -0,0 +1,77 @@ +// 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.AppService.Models +{ + /// The resource reference. + public partial class WorkflowResourceReference + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public WorkflowResourceReference() + { + } + + /// Initializes a new instance of . + /// The resource id. + /// Gets the resource name. + /// Gets the resource type. + /// Keeps track of any properties unknown to the library. + internal WorkflowResourceReference(ResourceIdentifier id, string name, ResourceType? resourceType, IDictionary serializedAdditionalRawData) + { + Id = id; + Name = name; + ResourceType = resourceType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource id. + [WirePath("id")] + public ResourceIdentifier Id { get; set; } + /// Gets the resource name. + [WirePath("name")] + public string Name { get; } + /// Gets the resource type. + [WirePath("type")] + public ResourceType? ResourceType { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionListResult.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionListResult.Serialization.cs new file mode 100644 index 0000000000000..db593e5601a91 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionListResult.Serialization.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class WorkflowRunActionListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRunActionListResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowRunActionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRunActionListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowRunActionListResult(document.RootElement, options); + } + + internal static WorkflowRunActionListResult DeserializeWorkflowRunActionListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(WorkflowRunActionData.DeserializeWorkflowRunActionData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowRunActionListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowRunActionListResult)} does not support writing '{options.Format}' format."); + } + } + + WorkflowRunActionListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowRunActionListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowRunActionListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionListResult.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionListResult.cs new file mode 100644 index 0000000000000..f3267563f4ff7 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionListResult.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The list of workflow run actions. + internal partial class WorkflowRunActionListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WorkflowRunActionListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// A list of workflow run actions. + /// The URL to get the next set of results. + /// Keeps track of any properties unknown to the library. + internal WorkflowRunActionListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// A list of workflow run actions. + public IReadOnlyList Value { get; } + /// The URL to get the next set of results. + public string NextLink { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionRepetitionDefinitionCollection.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionRepetitionDefinitionCollection.Serialization.cs new file mode 100644 index 0000000000000..a481b47a9d82b --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionRepetitionDefinitionCollection.Serialization.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class WorkflowRunActionRepetitionDefinitionCollection : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRunActionRepetitionDefinitionCollection)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowRunActionRepetitionDefinitionCollection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRunActionRepetitionDefinitionCollection)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowRunActionRepetitionDefinitionCollection(document.RootElement, options); + } + + internal static WorkflowRunActionRepetitionDefinitionCollection DeserializeWorkflowRunActionRepetitionDefinitionCollection(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string nextLink = default; + IReadOnlyList value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(WorkflowRunActionRepetitionDefinitionData.DeserializeWorkflowRunActionRepetitionDefinitionData(item, options)); + } + value = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowRunActionRepetitionDefinitionCollection(nextLink, value ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowRunActionRepetitionDefinitionCollection)} does not support writing '{options.Format}' format."); + } + } + + WorkflowRunActionRepetitionDefinitionCollection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowRunActionRepetitionDefinitionCollection(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowRunActionRepetitionDefinitionCollection)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionRepetitionDefinitionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionRepetitionDefinitionCollection.cs new file mode 100644 index 0000000000000..ac1785513f11b --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionRepetitionDefinitionCollection.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// A collection of workflow run action repetitions. + internal partial class WorkflowRunActionRepetitionDefinitionCollection + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WorkflowRunActionRepetitionDefinitionCollection() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The link used to get the next page of recommendations. + /// + /// Keeps track of any properties unknown to the library. + internal WorkflowRunActionRepetitionDefinitionCollection(string nextLink, IReadOnlyList value, IDictionary serializedAdditionalRawData) + { + NextLink = nextLink; + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The link used to get the next page of recommendations. + public string NextLink { get; } + /// Gets the value. + public IReadOnlyList Value { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionRepetitionIndex.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionRepetitionIndex.Serialization.cs new file mode 100644 index 0000000000000..1b879cfe5e6f9 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionRepetitionIndex.Serialization.cs @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowRunActionRepetitionIndex : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRunActionRepetitionIndex)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(ScopeName)) + { + writer.WritePropertyName("scopeName"u8); + writer.WriteStringValue(ScopeName); + } + writer.WritePropertyName("itemIndex"u8); + writer.WriteNumberValue(ItemIndex); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowRunActionRepetitionIndex IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRunActionRepetitionIndex)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowRunActionRepetitionIndex(document.RootElement, options); + } + + internal static WorkflowRunActionRepetitionIndex DeserializeWorkflowRunActionRepetitionIndex(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string scopeName = default; + int itemIndex = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("scopeName"u8)) + { + scopeName = property.Value.GetString(); + continue; + } + if (property.NameEquals("itemIndex"u8)) + { + itemIndex = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowRunActionRepetitionIndex(scopeName, itemIndex, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScopeName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scopeName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ScopeName)) + { + builder.Append(" scopeName: "); + if (ScopeName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ScopeName}'''"); + } + else + { + builder.AppendLine($"'{ScopeName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ItemIndex), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" itemIndex: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" itemIndex: "); + builder.AppendLine($"{ItemIndex}"); + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowRunActionRepetitionIndex)} does not support writing '{options.Format}' format."); + } + } + + WorkflowRunActionRepetitionIndex IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowRunActionRepetitionIndex(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowRunActionRepetitionIndex)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionRepetitionIndex.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionRepetitionIndex.cs new file mode 100644 index 0000000000000..ae96281d37e81 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunActionRepetitionIndex.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The workflow run action repetition index. + public partial class WorkflowRunActionRepetitionIndex + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The index. + public WorkflowRunActionRepetitionIndex(int itemIndex) + { + ItemIndex = itemIndex; + } + + /// Initializes a new instance of . + /// The scope. + /// The index. + /// Keeps track of any properties unknown to the library. + internal WorkflowRunActionRepetitionIndex(string scopeName, int itemIndex, IDictionary serializedAdditionalRawData) + { + ScopeName = scopeName; + ItemIndex = itemIndex; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal WorkflowRunActionRepetitionIndex() + { + } + + /// The scope. + [WirePath("scopeName")] + public string ScopeName { get; set; } + /// The index. + [WirePath("itemIndex")] + public int ItemIndex { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunListResult.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunListResult.Serialization.cs new file mode 100644 index 0000000000000..cff22f4b50b9d --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunListResult.Serialization.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class WorkflowRunListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRunListResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowRunListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRunListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowRunListResult(document.RootElement, options); + } + + internal static WorkflowRunListResult DeserializeWorkflowRunListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(WorkflowRunData.DeserializeWorkflowRunData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowRunListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowRunListResult)} does not support writing '{options.Format}' format."); + } + } + + WorkflowRunListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowRunListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowRunListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunListResult.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunListResult.cs new file mode 100644 index 0000000000000..48183ea3d1fdf --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunListResult.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The list of workflow runs. + internal partial class WorkflowRunListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WorkflowRunListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// A list of workflow runs. + /// The URL to get the next set of results. + /// Keeps track of any properties unknown to the library. + internal WorkflowRunListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// A list of workflow runs. + public IReadOnlyList Value { get; } + /// The URL to get the next set of results. + public string NextLink { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunTrigger.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunTrigger.Serialization.cs new file mode 100644 index 0000000000000..7c8c46353c0d5 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunTrigger.Serialization.cs @@ -0,0 +1,610 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowRunTrigger : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRunTrigger)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W" && Optional.IsDefined(Inputs)) + { + writer.WritePropertyName("inputs"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Inputs); +#else + using (JsonDocument document = JsonDocument.Parse(Inputs)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (options.Format != "W" && Optional.IsDefined(InputsLink)) + { + writer.WritePropertyName("inputsLink"u8); + writer.WriteObjectValue(InputsLink, options); + } + if (options.Format != "W" && Optional.IsDefined(Outputs)) + { + writer.WritePropertyName("outputs"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Outputs); +#else + using (JsonDocument document = JsonDocument.Parse(Outputs)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (options.Format != "W" && Optional.IsDefined(OutputsLink)) + { + writer.WritePropertyName("outputsLink"u8); + writer.WriteObjectValue(OutputsLink, options); + } + if (options.Format != "W" && Optional.IsDefined(ScheduledOn)) + { + writer.WritePropertyName("scheduledTime"u8); + writer.WriteStringValue(ScheduledOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(StartOn)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(EndOn)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(TrackingId)) + { + writer.WritePropertyName("trackingId"u8); + writer.WriteStringValue(TrackingId); + } + if (Optional.IsDefined(Correlation)) + { + writer.WritePropertyName("correlation"u8); + writer.WriteObjectValue(Correlation, options); + } + if (options.Format != "W" && Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Error); +#else + using (JsonDocument document = JsonDocument.Parse(Error)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (options.Format != "W" && Optional.IsDefined(TrackedProperties)) + { + writer.WritePropertyName("trackedProperties"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(TrackedProperties); +#else + using (JsonDocument document = JsonDocument.Parse(TrackedProperties)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowRunTrigger IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRunTrigger)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowRunTrigger(document.RootElement, options); + } + + internal static WorkflowRunTrigger DeserializeWorkflowRunTrigger(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + BinaryData inputs = default; + WebAppContentLink inputsLink = default; + BinaryData outputs = default; + WebAppContentLink outputsLink = default; + DateTimeOffset? scheduledTime = default; + DateTimeOffset? startTime = default; + DateTimeOffset? endTime = default; + string trackingId = default; + Correlation correlation = default; + string code = default; + WorkflowStatus? status = default; + BinaryData error = default; + BinaryData trackedProperties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("inputs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inputs = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("inputsLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inputsLink = WebAppContentLink.DeserializeWebAppContentLink(property.Value, options); + continue; + } + if (property.NameEquals("outputs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + outputs = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("outputsLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + outputsLink = WebAppContentLink.DeserializeWebAppContentLink(property.Value, options); + continue; + } + if (property.NameEquals("scheduledTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scheduledTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("trackingId"u8)) + { + trackingId = property.Value.GetString(); + continue; + } + if (property.NameEquals("correlation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + correlation = Correlation.DeserializeCorrelation(property.Value, options); + continue; + } + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new WorkflowStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("trackedProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + trackedProperties = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowRunTrigger( + name, + inputs, + inputsLink, + outputs, + outputsLink, + scheduledTime, + startTime, + endTime, + trackingId, + correlation, + code, + status, + error, + trackedProperties, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Inputs), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" inputs: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Inputs)) + { + builder.Append(" inputs: "); + builder.AppendLine($"'{Inputs.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(InputsLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" inputsLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(InputsLink)) + { + builder.Append(" inputsLink: "); + BicepSerializationHelpers.AppendChildObject(builder, InputsLink, options, 2, false, " inputsLink: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Outputs), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" outputs: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Outputs)) + { + builder.Append(" outputs: "); + builder.AppendLine($"'{Outputs.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OutputsLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" outputsLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OutputsLink)) + { + builder.Append(" outputsLink: "); + BicepSerializationHelpers.AppendChildObject(builder, OutputsLink, options, 2, false, " outputsLink: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScheduledOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scheduledTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ScheduledOn)) + { + builder.Append(" scheduledTime: "); + var formattedDateTimeString = TypeFormatters.ToString(ScheduledOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StartOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" startTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StartOn)) + { + builder.Append(" startTime: "); + var formattedDateTimeString = TypeFormatters.ToString(StartOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EndOn)) + { + builder.Append(" endTime: "); + var formattedDateTimeString = TypeFormatters.ToString(EndOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TrackingId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" trackingId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TrackingId)) + { + builder.Append(" trackingId: "); + if (TrackingId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TrackingId}'''"); + } + else + { + builder.AppendLine($"'{TrackingId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("CorrelationClientTrackingId", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" correlation: "); + builder.AppendLine("{"); + builder.Append(" clientTrackingId: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Correlation)) + { + builder.Append(" correlation: "); + BicepSerializationHelpers.AppendChildObject(builder, Correlation, options, 2, false, " correlation: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Code), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" code: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Code)) + { + builder.Append(" code: "); + if (Code.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Code}'''"); + } + else + { + builder.AppendLine($"'{Code}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" status: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Status)) + { + builder.Append(" status: "); + builder.AppendLine($"'{Status.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Error), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" error: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Error)) + { + builder.Append(" error: "); + builder.AppendLine($"'{Error.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TrackedProperties), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" trackedProperties: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TrackedProperties)) + { + builder.Append(" trackedProperties: "); + builder.AppendLine($"'{TrackedProperties.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowRunTrigger)} does not support writing '{options.Format}' format."); + } + } + + WorkflowRunTrigger IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowRunTrigger(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowRunTrigger)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunTrigger.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunTrigger.cs new file mode 100644 index 0000000000000..718461a0f40a5 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowRunTrigger.cs @@ -0,0 +1,253 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The workflow run trigger. + public partial class WorkflowRunTrigger + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WorkflowRunTrigger() + { + } + + /// Initializes a new instance of . + /// Gets the name. + /// Gets the inputs. + /// Gets the link to inputs. + /// Gets the outputs. + /// Gets the link to outputs. + /// Gets the scheduled time. + /// Gets the start time. + /// Gets the end time. + /// Gets the tracking id. + /// The run correlation. + /// Gets the code. + /// Gets the status. + /// Gets the error. + /// Gets the tracked properties. + /// Keeps track of any properties unknown to the library. + internal WorkflowRunTrigger(string name, BinaryData inputs, WebAppContentLink inputsLink, BinaryData outputs, WebAppContentLink outputsLink, DateTimeOffset? scheduledOn, DateTimeOffset? startOn, DateTimeOffset? endOn, string trackingId, Correlation correlation, string code, WorkflowStatus? status, BinaryData error, BinaryData trackedProperties, IDictionary serializedAdditionalRawData) + { + Name = name; + Inputs = inputs; + InputsLink = inputsLink; + Outputs = outputs; + OutputsLink = outputsLink; + ScheduledOn = scheduledOn; + StartOn = startOn; + EndOn = endOn; + TrackingId = trackingId; + Correlation = correlation; + Code = code; + Status = status; + Error = error; + TrackedProperties = trackedProperties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets the name. + [WirePath("name")] + public string Name { get; } + /// + /// Gets the inputs. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("inputs")] + public BinaryData Inputs { get; } + /// Gets the link to inputs. + [WirePath("inputsLink")] + public WebAppContentLink InputsLink { get; } + /// + /// Gets the outputs. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("outputs")] + public BinaryData Outputs { get; } + /// Gets the link to outputs. + [WirePath("outputsLink")] + public WebAppContentLink OutputsLink { get; } + /// Gets the scheduled time. + [WirePath("scheduledTime")] + public DateTimeOffset? ScheduledOn { get; } + /// Gets the start time. + [WirePath("startTime")] + public DateTimeOffset? StartOn { get; } + /// Gets the end time. + [WirePath("endTime")] + public DateTimeOffset? EndOn { get; } + /// Gets the tracking id. + [WirePath("trackingId")] + public string TrackingId { get; } + /// The run correlation. + internal Correlation Correlation { get; } + /// The client tracking id. + [WirePath("correlation.clientTrackingId")] + public string CorrelationClientTrackingId + { + get => Correlation?.ClientTrackingId; + } + + /// Gets the code. + [WirePath("code")] + public string Code { get; } + /// Gets the status. + [WirePath("status")] + public WorkflowStatus? Status { get; } + /// + /// Gets the error. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("error")] + public BinaryData Error { get; } + /// + /// Gets the tracked properties. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("trackedProperties")] + public BinaryData TrackedProperties { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowSku.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowSku.Serialization.cs new file mode 100644 index 0000000000000..a159e85f2ee2a --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowSku.Serialization.cs @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowSku : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowSku)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name.ToString()); + if (Optional.IsDefined(Plan)) + { + writer.WritePropertyName("plan"u8); + writer.WriteObjectValue(Plan, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowSku)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowSku(document.RootElement, options); + } + + internal static WorkflowSku DeserializeWorkflowSku(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + WorkflowSkuName name = default; + WorkflowResourceReference plan = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = new WorkflowSkuName(property.Value.GetString()); + continue; + } + if (property.NameEquals("plan"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + plan = WorkflowResourceReference.DeserializeWorkflowResourceReference(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowSku(name, plan, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" name: "); + builder.AppendLine($"'{Name.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Plan), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" plan: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Plan)) + { + builder.Append(" plan: "); + BicepSerializationHelpers.AppendChildObject(builder, Plan, options, 2, false, " plan: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowSku)} does not support writing '{options.Format}' format."); + } + } + + WorkflowSku IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowSku(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowSku)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowSku.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowSku.cs new file mode 100644 index 0000000000000..e0c92ec2fd611 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowSku.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The sku type. + public partial class WorkflowSku + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The name. + internal WorkflowSku(WorkflowSkuName name) + { + Name = name; + } + + /// Initializes a new instance of . + /// The name. + /// The reference to plan. + /// Keeps track of any properties unknown to the library. + internal WorkflowSku(WorkflowSkuName name, WorkflowResourceReference plan, IDictionary serializedAdditionalRawData) + { + Name = name; + Plan = plan; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal WorkflowSku() + { + } + + /// The name. + [WirePath("name")] + public WorkflowSkuName Name { get; } + /// The reference to plan. + [WirePath("plan")] + public WorkflowResourceReference Plan { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowSkuName.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowSkuName.cs new file mode 100644 index 0000000000000..6aa709d9c1acd --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowSkuName.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The sku name. + public readonly partial struct WorkflowSkuName : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public WorkflowSkuName(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSpecifiedValue = "NotSpecified"; + private const string FreeValue = "Free"; + private const string SharedValue = "Shared"; + private const string BasicValue = "Basic"; + private const string StandardValue = "Standard"; + private const string PremiumValue = "Premium"; + + /// NotSpecified. + public static WorkflowSkuName NotSpecified { get; } = new WorkflowSkuName(NotSpecifiedValue); + /// Free. + public static WorkflowSkuName Free { get; } = new WorkflowSkuName(FreeValue); + /// Shared. + public static WorkflowSkuName Shared { get; } = new WorkflowSkuName(SharedValue); + /// Basic. + public static WorkflowSkuName Basic { get; } = new WorkflowSkuName(BasicValue); + /// Standard. + public static WorkflowSkuName Standard { get; } = new WorkflowSkuName(StandardValue); + /// Premium. + public static WorkflowSkuName Premium { get; } = new WorkflowSkuName(PremiumValue); + /// Determines if two values are the same. + public static bool operator ==(WorkflowSkuName left, WorkflowSkuName right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WorkflowSkuName left, WorkflowSkuName right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator WorkflowSkuName(string value) => new WorkflowSkuName(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WorkflowSkuName other && Equals(other); + /// + public bool Equals(WorkflowSkuName other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowState.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowState.cs new file mode 100644 index 0000000000000..a0abb065a660b --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowState.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The workflow state. + public readonly partial struct WorkflowState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public WorkflowState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSpecifiedValue = "NotSpecified"; + private const string CompletedValue = "Completed"; + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + private const string DeletedValue = "Deleted"; + private const string SuspendedValue = "Suspended"; + + /// NotSpecified. + public static WorkflowState NotSpecified { get; } = new WorkflowState(NotSpecifiedValue); + /// Completed. + public static WorkflowState Completed { get; } = new WorkflowState(CompletedValue); + /// Enabled. + public static WorkflowState Enabled { get; } = new WorkflowState(EnabledValue); + /// Disabled. + public static WorkflowState Disabled { get; } = new WorkflowState(DisabledValue); + /// Deleted. + public static WorkflowState Deleted { get; } = new WorkflowState(DeletedValue); + /// Suspended. + public static WorkflowState Suspended { get; } = new WorkflowState(SuspendedValue); + /// Determines if two values are the same. + public static bool operator ==(WorkflowState left, WorkflowState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WorkflowState left, WorkflowState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator WorkflowState(string value) => new WorkflowState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WorkflowState other && Equals(other); + /// + public bool Equals(WorkflowState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowStatus.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowStatus.cs new file mode 100644 index 0000000000000..46130c550be77 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowStatus.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The workflow status. + public readonly partial struct WorkflowStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public WorkflowStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSpecifiedValue = "NotSpecified"; + private const string PausedValue = "Paused"; + private const string RunningValue = "Running"; + private const string WaitingValue = "Waiting"; + private const string SucceededValue = "Succeeded"; + private const string SkippedValue = "Skipped"; + private const string SuspendedValue = "Suspended"; + private const string CancelledValue = "Cancelled"; + private const string FailedValue = "Failed"; + private const string FaultedValue = "Faulted"; + private const string TimedOutValue = "TimedOut"; + private const string AbortedValue = "Aborted"; + private const string IgnoredValue = "Ignored"; + + /// NotSpecified. + public static WorkflowStatus NotSpecified { get; } = new WorkflowStatus(NotSpecifiedValue); + /// Paused. + public static WorkflowStatus Paused { get; } = new WorkflowStatus(PausedValue); + /// Running. + public static WorkflowStatus Running { get; } = new WorkflowStatus(RunningValue); + /// Waiting. + public static WorkflowStatus Waiting { get; } = new WorkflowStatus(WaitingValue); + /// Succeeded. + public static WorkflowStatus Succeeded { get; } = new WorkflowStatus(SucceededValue); + /// Skipped. + public static WorkflowStatus Skipped { get; } = new WorkflowStatus(SkippedValue); + /// Suspended. + public static WorkflowStatus Suspended { get; } = new WorkflowStatus(SuspendedValue); + /// Cancelled. + public static WorkflowStatus Cancelled { get; } = new WorkflowStatus(CancelledValue); + /// Failed. + public static WorkflowStatus Failed { get; } = new WorkflowStatus(FailedValue); + /// Faulted. + public static WorkflowStatus Faulted { get; } = new WorkflowStatus(FaultedValue); + /// TimedOut. + public static WorkflowStatus TimedOut { get; } = new WorkflowStatus(TimedOutValue); + /// Aborted. + public static WorkflowStatus Aborted { get; } = new WorkflowStatus(AbortedValue); + /// Ignored. + public static WorkflowStatus Ignored { get; } = new WorkflowStatus(IgnoredValue); + /// Determines if two values are the same. + public static bool operator ==(WorkflowStatus left, WorkflowStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WorkflowStatus left, WorkflowStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator WorkflowStatus(string value) => new WorkflowStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WorkflowStatus other && Equals(other); + /// + public bool Equals(WorkflowStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerCallbackUri.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerCallbackUri.Serialization.cs new file mode 100644 index 0000000000000..85bf240d197b3 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerCallbackUri.Serialization.cs @@ -0,0 +1,364 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowTriggerCallbackUri : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowTriggerCallbackUri)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + } + if (options.Format != "W" && Optional.IsDefined(Method)) + { + writer.WritePropertyName("method"u8); + writer.WriteStringValue(Method); + } + if (options.Format != "W" && Optional.IsDefined(BasePath)) + { + writer.WritePropertyName("basePath"u8); + writer.WriteStringValue(BasePath); + } + if (options.Format != "W" && Optional.IsDefined(RelativePath)) + { + writer.WritePropertyName("relativePath"u8); + writer.WriteStringValue(RelativePath); + } + if (Optional.IsCollectionDefined(RelativePathParameters)) + { + writer.WritePropertyName("relativePathParameters"u8); + writer.WriteStartArray(); + foreach (var item in RelativePathParameters) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Queries)) + { + writer.WritePropertyName("queries"u8); + writer.WriteObjectValue(Queries, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowTriggerCallbackUri IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowTriggerCallbackUri)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowTriggerCallbackUri(document.RootElement, options); + } + + internal static WorkflowTriggerCallbackUri DeserializeWorkflowTriggerCallbackUri(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string value = default; + string method = default; + string basePath = default; + string relativePath = default; + IReadOnlyList relativePathParameters = default; + WorkflowTriggerListCallbackUriQueries queries = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (property.NameEquals("method"u8)) + { + method = property.Value.GetString(); + continue; + } + if (property.NameEquals("basePath"u8)) + { + basePath = property.Value.GetString(); + continue; + } + if (property.NameEquals("relativePath"u8)) + { + relativePath = property.Value.GetString(); + continue; + } + if (property.NameEquals("relativePathParameters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + relativePathParameters = array; + continue; + } + if (property.NameEquals("queries"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + queries = WorkflowTriggerListCallbackUriQueries.DeserializeWorkflowTriggerListCallbackUriQueries(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowTriggerCallbackUri( + value, + method, + basePath, + relativePath, + relativePathParameters ?? new ChangeTrackingList(), + queries, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + if (Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Value}'''"); + } + else + { + builder.AppendLine($"'{Value}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Method), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" method: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Method)) + { + builder.Append(" method: "); + if (Method.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Method}'''"); + } + else + { + builder.AppendLine($"'{Method}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(BasePath), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" basePath: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(BasePath)) + { + builder.Append(" basePath: "); + if (BasePath.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{BasePath}'''"); + } + else + { + builder.AppendLine($"'{BasePath}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RelativePath), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" relativePath: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(RelativePath)) + { + builder.Append(" relativePath: "); + if (RelativePath.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{RelativePath}'''"); + } + else + { + builder.AppendLine($"'{RelativePath}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RelativePathParameters), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" relativePathParameters: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(RelativePathParameters)) + { + if (RelativePathParameters.Any()) + { + builder.Append(" relativePathParameters: "); + builder.AppendLine("["); + foreach (var item in RelativePathParameters) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Queries), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" queries: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Queries)) + { + builder.Append(" queries: "); + BicepSerializationHelpers.AppendChildObject(builder, Queries, options, 2, false, " queries: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowTriggerCallbackUri)} does not support writing '{options.Format}' format."); + } + } + + WorkflowTriggerCallbackUri IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowTriggerCallbackUri(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowTriggerCallbackUri)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerCallbackUri.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerCallbackUri.cs new file mode 100644 index 0000000000000..c50d2eeec6f76 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerCallbackUri.cs @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The workflow trigger callback URL. + public partial class WorkflowTriggerCallbackUri + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WorkflowTriggerCallbackUri() + { + RelativePathParameters = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Gets the workflow trigger callback URL. + /// Gets the workflow trigger callback URL HTTP method. + /// Gets the workflow trigger callback URL base path. + /// Gets the workflow trigger callback URL relative path. + /// Gets the workflow trigger callback URL relative path parameters. + /// Gets the workflow trigger callback URL query parameters. + /// Keeps track of any properties unknown to the library. + internal WorkflowTriggerCallbackUri(string value, string method, string basePath, string relativePath, IReadOnlyList relativePathParameters, WorkflowTriggerListCallbackUriQueries queries, IDictionary serializedAdditionalRawData) + { + Value = value; + Method = method; + BasePath = basePath; + RelativePath = relativePath; + RelativePathParameters = relativePathParameters; + Queries = queries; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets the workflow trigger callback URL. + [WirePath("value")] + public string Value { get; } + /// Gets the workflow trigger callback URL HTTP method. + [WirePath("method")] + public string Method { get; } + /// Gets the workflow trigger callback URL base path. + [WirePath("basePath")] + public string BasePath { get; } + /// Gets the workflow trigger callback URL relative path. + [WirePath("relativePath")] + public string RelativePath { get; } + /// Gets the workflow trigger callback URL relative path parameters. + [WirePath("relativePathParameters")] + public IReadOnlyList RelativePathParameters { get; } + /// Gets the workflow trigger callback URL query parameters. + [WirePath("queries")] + public WorkflowTriggerListCallbackUriQueries Queries { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerHistoryListResult.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerHistoryListResult.Serialization.cs new file mode 100644 index 0000000000000..ea42a35b65fff --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerHistoryListResult.Serialization.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class WorkflowTriggerHistoryListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowTriggerHistoryListResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowTriggerHistoryListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowTriggerHistoryListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowTriggerHistoryListResult(document.RootElement, options); + } + + internal static WorkflowTriggerHistoryListResult DeserializeWorkflowTriggerHistoryListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(WorkflowTriggerHistoryData.DeserializeWorkflowTriggerHistoryData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowTriggerHistoryListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowTriggerHistoryListResult)} does not support writing '{options.Format}' format."); + } + } + + WorkflowTriggerHistoryListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowTriggerHistoryListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowTriggerHistoryListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerHistoryListResult.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerHistoryListResult.cs new file mode 100644 index 0000000000000..a995127f50bf2 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerHistoryListResult.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The list of workflow trigger histories. + internal partial class WorkflowTriggerHistoryListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WorkflowTriggerHistoryListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// A list of workflow trigger histories. + /// The URL to get the next set of results. + /// Keeps track of any properties unknown to the library. + internal WorkflowTriggerHistoryListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// A list of workflow trigger histories. + public IReadOnlyList Value { get; } + /// The URL to get the next set of results. + public string NextLink { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerListCallbackUriQueries.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerListCallbackUriQueries.Serialization.cs new file mode 100644 index 0000000000000..f960f52e06121 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerListCallbackUriQueries.Serialization.cs @@ -0,0 +1,305 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowTriggerListCallbackUriQueries : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowTriggerListCallbackUriQueries)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(ApiVersion)) + { + writer.WritePropertyName("api-version"u8); + writer.WriteStringValue(ApiVersion); + } + if (Optional.IsDefined(SasPermission)) + { + writer.WritePropertyName("sp"u8); + writer.WriteStringValue(SasPermission); + } + if (Optional.IsDefined(SasVersion)) + { + writer.WritePropertyName("sv"u8); + writer.WriteStringValue(SasVersion); + } + if (Optional.IsDefined(SasSignature)) + { + writer.WritePropertyName("sig"u8); + writer.WriteStringValue(SasSignature); + } + if (Optional.IsDefined(SasTimestamp)) + { + writer.WritePropertyName("se"u8); + writer.WriteStringValue(SasTimestamp); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowTriggerListCallbackUriQueries IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowTriggerListCallbackUriQueries)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowTriggerListCallbackUriQueries(document.RootElement, options); + } + + internal static WorkflowTriggerListCallbackUriQueries DeserializeWorkflowTriggerListCallbackUriQueries(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string apiVersion = default; + string sp = default; + string sv = default; + string sig = default; + string se = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("api-version"u8)) + { + apiVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("sp"u8)) + { + sp = property.Value.GetString(); + continue; + } + if (property.NameEquals("sv"u8)) + { + sv = property.Value.GetString(); + continue; + } + if (property.NameEquals("sig"u8)) + { + sig = property.Value.GetString(); + continue; + } + if (property.NameEquals("se"u8)) + { + se = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowTriggerListCallbackUriQueries( + apiVersion, + sp, + sv, + sig, + se, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApiVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" api-version: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApiVersion)) + { + builder.Append(" api-version: "); + if (ApiVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApiVersion}'''"); + } + else + { + builder.AppendLine($"'{ApiVersion}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SasPermission), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sp: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SasPermission)) + { + builder.Append(" sp: "); + if (SasPermission.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SasPermission}'''"); + } + else + { + builder.AppendLine($"'{SasPermission}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SasVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sv: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SasVersion)) + { + builder.Append(" sv: "); + if (SasVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SasVersion}'''"); + } + else + { + builder.AppendLine($"'{SasVersion}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SasSignature), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sig: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SasSignature)) + { + builder.Append(" sig: "); + if (SasSignature.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SasSignature}'''"); + } + else + { + builder.AppendLine($"'{SasSignature}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SasTimestamp), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" se: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SasTimestamp)) + { + builder.Append(" se: "); + if (SasTimestamp.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SasTimestamp}'''"); + } + else + { + builder.AppendLine($"'{SasTimestamp}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowTriggerListCallbackUriQueries)} does not support writing '{options.Format}' format."); + } + } + + WorkflowTriggerListCallbackUriQueries IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowTriggerListCallbackUriQueries(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowTriggerListCallbackUriQueries)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerListCallbackUriQueries.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerListCallbackUriQueries.cs new file mode 100644 index 0000000000000..b3a7e6c83ea75 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerListCallbackUriQueries.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// Gets the workflow trigger callback URL query parameters. + public partial class WorkflowTriggerListCallbackUriQueries + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WorkflowTriggerListCallbackUriQueries() + { + } + + /// Initializes a new instance of . + /// The api version. + /// The SAS permissions. + /// The SAS version. + /// The SAS signature. + /// The SAS timestamp. + /// Keeps track of any properties unknown to the library. + internal WorkflowTriggerListCallbackUriQueries(string apiVersion, string sasPermission, string sasVersion, string sasSignature, string sasTimestamp, IDictionary serializedAdditionalRawData) + { + ApiVersion = apiVersion; + SasPermission = sasPermission; + SasVersion = sasVersion; + SasSignature = sasSignature; + SasTimestamp = sasTimestamp; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The api version. + [WirePath("api-version")] + public string ApiVersion { get; } + /// The SAS permissions. + [WirePath("sp")] + public string SasPermission { get; } + /// The SAS version. + [WirePath("sv")] + public string SasVersion { get; } + /// The SAS signature. + [WirePath("sig")] + public string SasSignature { get; } + /// The SAS timestamp. + [WirePath("se")] + public string SasTimestamp { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerListResult.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerListResult.Serialization.cs new file mode 100644 index 0000000000000..15d8b58efed1d --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerListResult.Serialization.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class WorkflowTriggerListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowTriggerListResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowTriggerListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowTriggerListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowTriggerListResult(document.RootElement, options); + } + + internal static WorkflowTriggerListResult DeserializeWorkflowTriggerListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(WorkflowTriggerData.DeserializeWorkflowTriggerData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowTriggerListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowTriggerListResult)} does not support writing '{options.Format}' format."); + } + } + + WorkflowTriggerListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowTriggerListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowTriggerListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerListResult.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerListResult.cs new file mode 100644 index 0000000000000..e5877ddbc0e35 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerListResult.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The list of workflow triggers. + internal partial class WorkflowTriggerListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WorkflowTriggerListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// A list of workflow triggers. + /// The URL to get the next set of results. + /// Keeps track of any properties unknown to the library. + internal WorkflowTriggerListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// A list of workflow triggers. + public IReadOnlyList Value { get; } + /// The URL to get the next set of results. + public string NextLink { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerProvisioningState.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerProvisioningState.cs new file mode 100644 index 0000000000000..e9f5a3c542f0c --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerProvisioningState.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The workflow trigger provisioning state. + public readonly partial struct WorkflowTriggerProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public WorkflowTriggerProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSpecifiedValue = "NotSpecified"; + private const string AcceptedValue = "Accepted"; + private const string RunningValue = "Running"; + private const string ReadyValue = "Ready"; + private const string CreatingValue = "Creating"; + private const string CreatedValue = "Created"; + private const string DeletingValue = "Deleting"; + private const string DeletedValue = "Deleted"; + private const string CanceledValue = "Canceled"; + private const string FailedValue = "Failed"; + private const string SucceededValue = "Succeeded"; + private const string MovingValue = "Moving"; + private const string UpdatingValue = "Updating"; + private const string RegisteringValue = "Registering"; + private const string RegisteredValue = "Registered"; + private const string UnregisteringValue = "Unregistering"; + private const string UnregisteredValue = "Unregistered"; + private const string CompletedValue = "Completed"; + + /// NotSpecified. + public static WorkflowTriggerProvisioningState NotSpecified { get; } = new WorkflowTriggerProvisioningState(NotSpecifiedValue); + /// Accepted. + public static WorkflowTriggerProvisioningState Accepted { get; } = new WorkflowTriggerProvisioningState(AcceptedValue); + /// Running. + public static WorkflowTriggerProvisioningState Running { get; } = new WorkflowTriggerProvisioningState(RunningValue); + /// Ready. + public static WorkflowTriggerProvisioningState Ready { get; } = new WorkflowTriggerProvisioningState(ReadyValue); + /// Creating. + public static WorkflowTriggerProvisioningState Creating { get; } = new WorkflowTriggerProvisioningState(CreatingValue); + /// Created. + public static WorkflowTriggerProvisioningState Created { get; } = new WorkflowTriggerProvisioningState(CreatedValue); + /// Deleting. + public static WorkflowTriggerProvisioningState Deleting { get; } = new WorkflowTriggerProvisioningState(DeletingValue); + /// Deleted. + public static WorkflowTriggerProvisioningState Deleted { get; } = new WorkflowTriggerProvisioningState(DeletedValue); + /// Canceled. + public static WorkflowTriggerProvisioningState Canceled { get; } = new WorkflowTriggerProvisioningState(CanceledValue); + /// Failed. + public static WorkflowTriggerProvisioningState Failed { get; } = new WorkflowTriggerProvisioningState(FailedValue); + /// Succeeded. + public static WorkflowTriggerProvisioningState Succeeded { get; } = new WorkflowTriggerProvisioningState(SucceededValue); + /// Moving. + public static WorkflowTriggerProvisioningState Moving { get; } = new WorkflowTriggerProvisioningState(MovingValue); + /// Updating. + public static WorkflowTriggerProvisioningState Updating { get; } = new WorkflowTriggerProvisioningState(UpdatingValue); + /// Registering. + public static WorkflowTriggerProvisioningState Registering { get; } = new WorkflowTriggerProvisioningState(RegisteringValue); + /// Registered. + public static WorkflowTriggerProvisioningState Registered { get; } = new WorkflowTriggerProvisioningState(RegisteredValue); + /// Unregistering. + public static WorkflowTriggerProvisioningState Unregistering { get; } = new WorkflowTriggerProvisioningState(UnregisteringValue); + /// Unregistered. + public static WorkflowTriggerProvisioningState Unregistered { get; } = new WorkflowTriggerProvisioningState(UnregisteredValue); + /// Completed. + public static WorkflowTriggerProvisioningState Completed { get; } = new WorkflowTriggerProvisioningState(CompletedValue); + /// Determines if two values are the same. + public static bool operator ==(WorkflowTriggerProvisioningState left, WorkflowTriggerProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WorkflowTriggerProvisioningState left, WorkflowTriggerProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator WorkflowTriggerProvisioningState(string value) => new WorkflowTriggerProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WorkflowTriggerProvisioningState other && Equals(other); + /// + public bool Equals(WorkflowTriggerProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerRecurrence.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerRecurrence.Serialization.cs new file mode 100644 index 0000000000000..fa1646161cd7e --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerRecurrence.Serialization.cs @@ -0,0 +1,328 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class WorkflowTriggerRecurrence : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowTriggerRecurrence)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Frequency)) + { + writer.WritePropertyName("frequency"u8); + writer.WriteStringValue(Frequency.Value.ToString()); + } + if (Optional.IsDefined(Interval)) + { + writer.WritePropertyName("interval"u8); + writer.WriteNumberValue(Interval.Value); + } + if (Optional.IsDefined(StartTime)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartTime); + } + if (Optional.IsDefined(EndTime)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndTime); + } + if (Optional.IsDefined(TimeZone)) + { + writer.WritePropertyName("timeZone"u8); + writer.WriteStringValue(TimeZone); + } + if (Optional.IsDefined(Schedule)) + { + writer.WritePropertyName("schedule"u8); + writer.WriteObjectValue(Schedule, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowTriggerRecurrence IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowTriggerRecurrence)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowTriggerRecurrence(document.RootElement, options); + } + + internal static WorkflowTriggerRecurrence DeserializeWorkflowTriggerRecurrence(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + WorkflowRecurrenceFrequency? frequency = default; + int? interval = default; + string startTime = default; + string endTime = default; + string timeZone = default; + WorkflowRecurrenceSchedule schedule = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("frequency"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + frequency = new WorkflowRecurrenceFrequency(property.Value.GetString()); + continue; + } + if (property.NameEquals("interval"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + interval = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("startTime"u8)) + { + startTime = property.Value.GetString(); + continue; + } + if (property.NameEquals("endTime"u8)) + { + endTime = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeZone"u8)) + { + timeZone = property.Value.GetString(); + continue; + } + if (property.NameEquals("schedule"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schedule = WorkflowRecurrenceSchedule.DeserializeWorkflowRecurrenceSchedule(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowTriggerRecurrence( + frequency, + interval, + startTime, + endTime, + timeZone, + schedule, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Frequency), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" frequency: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Frequency)) + { + builder.Append(" frequency: "); + builder.AppendLine($"'{Frequency.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Interval), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" interval: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Interval)) + { + builder.Append(" interval: "); + builder.AppendLine($"{Interval.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StartTime), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" startTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StartTime)) + { + builder.Append(" startTime: "); + if (StartTime.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{StartTime}'''"); + } + else + { + builder.AppendLine($"'{StartTime}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndTime), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EndTime)) + { + builder.Append(" endTime: "); + if (EndTime.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{EndTime}'''"); + } + else + { + builder.AppendLine($"'{EndTime}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TimeZone), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" timeZone: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TimeZone)) + { + builder.Append(" timeZone: "); + if (TimeZone.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TimeZone}'''"); + } + else + { + builder.AppendLine($"'{TimeZone}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Schedule), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" schedule: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Schedule)) + { + builder.Append(" schedule: "); + BicepSerializationHelpers.AppendChildObject(builder, Schedule, options, 2, false, " schedule: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowTriggerRecurrence)} does not support writing '{options.Format}' format."); + } + } + + WorkflowTriggerRecurrence IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowTriggerRecurrence(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowTriggerRecurrence)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerRecurrence.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerRecurrence.cs new file mode 100644 index 0000000000000..44a929fb03215 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowTriggerRecurrence.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The workflow trigger recurrence. + public partial class WorkflowTriggerRecurrence + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WorkflowTriggerRecurrence() + { + } + + /// Initializes a new instance of . + /// The frequency. + /// The interval. + /// The start time. + /// The end time. + /// The time zone. + /// The recurrence schedule. + /// Keeps track of any properties unknown to the library. + internal WorkflowTriggerRecurrence(WorkflowRecurrenceFrequency? frequency, int? interval, string startTime, string endTime, string timeZone, WorkflowRecurrenceSchedule schedule, IDictionary serializedAdditionalRawData) + { + Frequency = frequency; + Interval = interval; + StartTime = startTime; + EndTime = endTime; + TimeZone = timeZone; + Schedule = schedule; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The frequency. + [WirePath("frequency")] + public WorkflowRecurrenceFrequency? Frequency { get; } + /// The interval. + [WirePath("interval")] + public int? Interval { get; } + /// The start time. + [WirePath("startTime")] + public string StartTime { get; } + /// The end time. + [WirePath("endTime")] + public string EndTime { get; } + /// The time zone. + [WirePath("timeZone")] + public string TimeZone { get; } + /// The recurrence schedule. + [WirePath("schedule")] + public WorkflowRecurrenceSchedule Schedule { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowVersionListResult.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowVersionListResult.Serialization.cs new file mode 100644 index 0000000000000..9e558cc323839 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowVersionListResult.Serialization.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + internal partial class WorkflowVersionListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowVersionListResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowVersionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowVersionListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowVersionListResult(document.RootElement, options); + } + + internal static WorkflowVersionListResult DeserializeWorkflowVersionListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(WorkflowVersionData.DeserializeWorkflowVersionData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowVersionListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowVersionListResult)} does not support writing '{options.Format}' format."); + } + } + + WorkflowVersionListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowVersionListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowVersionListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowVersionListResult.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowVersionListResult.cs new file mode 100644 index 0000000000000..84b2594d0c0a3 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/WorkflowVersionListResult.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.AppService.Models +{ + /// The list of workflow versions. + internal partial class WorkflowVersionListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WorkflowVersionListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// A list of workflow versions. + /// The URL to get the next set of results. + /// Keeps track of any properties unknown to the library. + internal WorkflowVersionListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// A list of workflow versions. + public IReadOnlyList Value { get; } + /// The URL to get the next set of results. + public string NextLink { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/NetworkFeatureCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/NetworkFeatureCollection.cs index 0c8b4b52cf821..19dc2be19fd07 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/NetworkFeatureCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/NetworkFeatureCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -106,7 +106,7 @@ public virtual async Task> GetAsync(string view /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -151,7 +151,7 @@ public virtual Response Get(string view, CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -194,7 +194,7 @@ public virtual async Task> ExistsAsync(string view, CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -237,7 +237,7 @@ public virtual Response Exists(string view, CancellationToken cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/NetworkFeatureResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/NetworkFeatureResource.cs index 433c33c5b29c9..d1b2340c7a8f5 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/NetworkFeatureResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/NetworkFeatureResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/PublishingUserResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/PublishingUserResource.cs index 1e8565ca026ad..355c64023671b 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/PublishingUserResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/PublishingUserResource.cs @@ -98,7 +98,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -138,7 +138,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -178,7 +178,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/AppServiceCertificateOrdersRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/AppServiceCertificateOrdersRestOperations.cs index 68d17cbd5731e..721d08dad9f9f 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/AppServiceCertificateOrdersRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/AppServiceCertificateOrdersRestOperations.cs @@ -33,7 +33,7 @@ public AppServiceCertificateOrdersRestOperations(HttpPipeline pipeline, string a { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/AppServiceEnvironmentsRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/AppServiceEnvironmentsRestOperations.cs index 680b66c9ad464..0700d57cfa600 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/AppServiceEnvironmentsRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/AppServiceEnvironmentsRestOperations.cs @@ -33,7 +33,7 @@ public AppServiceEnvironmentsRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -777,6 +777,300 @@ public Response GetVipInfo(string subscripti } } + internal RequestUriBuilder CreateGetAseCustomDnsSuffixConfigurationRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/hostingEnvironments/", false); + uri.AppendPath(name, true); + uri.AppendPath("/configurations/customdnssuffix", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetAseCustomDnsSuffixConfigurationRequest(string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/hostingEnvironments/", false); + uri.AppendPath(name, true); + uri.AppendPath("/configurations/customdnssuffix", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get Custom Dns Suffix configuration of an App Service Environment. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the App Service Environment. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAseCustomDnsSuffixConfigurationAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetAseCustomDnsSuffixConfigurationRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CustomDnsSuffixConfigurationData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CustomDnsSuffixConfigurationData.DeserializeCustomDnsSuffixConfigurationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((CustomDnsSuffixConfigurationData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get Custom Dns Suffix configuration of an App Service Environment. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the App Service Environment. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetAseCustomDnsSuffixConfiguration(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetAseCustomDnsSuffixConfigurationRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CustomDnsSuffixConfigurationData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CustomDnsSuffixConfigurationData.DeserializeCustomDnsSuffixConfigurationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((CustomDnsSuffixConfigurationData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateAseCustomDnsSuffixConfigurationRequestUri(string subscriptionId, string resourceGroupName, string name, CustomDnsSuffixConfigurationData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/hostingEnvironments/", false); + uri.AppendPath(name, true); + uri.AppendPath("/configurations/customdnssuffix", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateAseCustomDnsSuffixConfigurationRequest(string subscriptionId, string resourceGroupName, string name, CustomDnsSuffixConfigurationData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/hostingEnvironments/", false); + uri.AppendPath(name, true); + uri.AppendPath("/configurations/customdnssuffix", 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(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update Custom Dns Suffix configuration of an App Service Environment. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the App Service Environment. + /// The to use. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAseCustomDnsSuffixConfigurationAsync(string subscriptionId, string resourceGroupName, string name, CustomDnsSuffixConfigurationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateAseCustomDnsSuffixConfigurationRequest(subscriptionId, resourceGroupName, name, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CustomDnsSuffixConfigurationData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CustomDnsSuffixConfigurationData.DeserializeCustomDnsSuffixConfigurationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update Custom Dns Suffix configuration of an App Service Environment. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the App Service Environment. + /// The to use. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response UpdateAseCustomDnsSuffixConfiguration(string subscriptionId, string resourceGroupName, string name, CustomDnsSuffixConfigurationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateAseCustomDnsSuffixConfigurationRequest(subscriptionId, resourceGroupName, name, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CustomDnsSuffixConfigurationData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CustomDnsSuffixConfigurationData.DeserializeCustomDnsSuffixConfigurationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteAseCustomDnsSuffixConfigurationRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/hostingEnvironments/", false); + uri.AppendPath(name, true); + uri.AppendPath("/configurations/customdnssuffix", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteAseCustomDnsSuffixConfigurationRequest(string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/hostingEnvironments/", false); + uri.AppendPath(name, true); + uri.AppendPath("/configurations/customdnssuffix", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete Custom Dns Suffix configuration of an App Service Environment. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the App Service Environment. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> DeleteAseCustomDnsSuffixConfigurationAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateDeleteAseCustomDnsSuffixConfigurationRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + { + BinaryData value = default; + value = await BinaryData.FromStreamAsync(message.Response.ContentStream).ConfigureAwait(false); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete Custom Dns Suffix configuration of an App Service Environment. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the App Service Environment. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response DeleteAseCustomDnsSuffixConfiguration(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateDeleteAseCustomDnsSuffixConfigurationRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + { + BinaryData value = default; + value = BinaryData.FromStream(message.Response.ContentStream); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateGetAseV3NetworkingConfigurationRequestUri(string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); @@ -1955,6 +2249,174 @@ public Response ListMultiRolePoolSkus(string su } } + internal RequestUriBuilder CreateTestUpgradeAvailableNotificationRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/hostingEnvironments/", false); + uri.AppendPath(name, true); + uri.AppendPath("/testUpgradeAvailableNotification", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateTestUpgradeAvailableNotificationRequest(string subscriptionId, string resourceGroupName, string name) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/hostingEnvironments/", false); + uri.AppendPath(name, true); + uri.AppendPath("/testUpgradeAvailableNotification", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Send a test notification that an upgrade is available for this App Service Environment. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the App Service Environment. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task TestUpgradeAvailableNotificationAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateTestUpgradeAvailableNotificationRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Send a test notification that an upgrade is available for this App Service Environment. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the App Service Environment. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response TestUpgradeAvailableNotification(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateTestUpgradeAvailableNotificationRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpgradeRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/hostingEnvironments/", false); + uri.AppendPath(name, true); + uri.AppendPath("/upgrade", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpgradeRequest(string subscriptionId, string resourceGroupName, string name) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/hostingEnvironments/", false); + uri.AppendPath(name, true); + uri.AppendPath("/upgrade", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Initiate an upgrade of an App Service Environment if one is available. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the App Service Environment. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpgradeAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateUpgradeRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Initiate an upgrade of an App Service Environment if one is available. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the App Service Environment. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Upgrade(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateUpgradeRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListMultiRoleUsagesRequestUri(string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); @@ -2445,7 +2907,7 @@ public Response GetPrivateEndpoi } } - internal RequestUriBuilder CreateApproveOrRejectPrivateEndpointConnectionRequestUri(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info) + internal RequestUriBuilder CreateApproveOrRejectPrivateEndpointConnectionRequestUri(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2461,7 +2923,7 @@ internal RequestUriBuilder CreateApproveOrRejectPrivateEndpointConnectionRequest return uri; } - internal HttpMessage CreateApproveOrRejectPrivateEndpointConnectionRequest(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info) + internal HttpMessage CreateApproveOrRejectPrivateEndpointConnectionRequest(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -2481,7 +2943,7 @@ internal HttpMessage CreateApproveOrRejectPrivateEndpointConnectionRequest(strin request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(info, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); request.Content = content; _userAgent.Apply(message); return message; @@ -2492,19 +2954,19 @@ internal HttpMessage CreateApproveOrRejectPrivateEndpointConnectionRequest(strin /// Name of the resource group to which the resource belongs. /// Name of the App Service Environment. /// The to use. - /// The to use. + /// The to use. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task ApproveOrRejectPrivateEndpointConnectionAsync(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + public async Task ApproveOrRejectPrivateEndpointConnectionAsync(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateApproveOrRejectPrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName, info); + using var message = CreateApproveOrRejectPrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -2521,19 +2983,19 @@ public async Task ApproveOrRejectPrivateEndpointConnectionAsync(string /// Name of the resource group to which the resource belongs. /// Name of the App Service Environment. /// The to use. - /// The to use. + /// The to use. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response ApproveOrRejectPrivateEndpointConnection(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + public Response ApproveOrRejectPrivateEndpointConnection(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateApproveOrRejectPrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName, info); + using var message = CreateApproveOrRejectPrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/AppServicePlansRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/AppServicePlansRestOperations.cs index 7ee5d3f358506..4eb1037a9c7e9 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/AppServicePlansRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/AppServicePlansRestOperations.cs @@ -33,7 +33,7 @@ public AppServicePlansRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/CertificateOrdersDiagnosticsRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/CertificateOrdersDiagnosticsRestOperations.cs index 41643a60ef3bb..bf668319f3286 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/CertificateOrdersDiagnosticsRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/CertificateOrdersDiagnosticsRestOperations.cs @@ -32,7 +32,7 @@ public CertificateOrdersDiagnosticsRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/CertificateRegistrationProviderRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/CertificateRegistrationProviderRestOperations.cs index d0e3f3cd8834f..419d5c44e623c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/CertificateRegistrationProviderRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/CertificateRegistrationProviderRestOperations.cs @@ -32,7 +32,7 @@ public CertificateRegistrationProviderRestOperations(HttpPipeline pipeline, stri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/CertificatesRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/CertificatesRestOperations.cs index 612a2c91b3099..3458d417d160e 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/CertificatesRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/CertificatesRestOperations.cs @@ -32,7 +32,7 @@ public CertificatesRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/DeletedWebAppsRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/DeletedWebAppsRestOperations.cs index 1937d12df7be4..ee6794236ac8b 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/DeletedWebAppsRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/DeletedWebAppsRestOperations.cs @@ -32,7 +32,7 @@ public DeletedWebAppsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/DiagnosticsRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/DiagnosticsRestOperations.cs index dc1be39e9a721..8d476d8ce93a0 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/DiagnosticsRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/DiagnosticsRestOperations.cs @@ -32,7 +32,7 @@ public DiagnosticsRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/DomainRegistrationProviderRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/DomainRegistrationProviderRestOperations.cs index 1ab2849d62cbb..551cc1a8a51d6 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/DomainRegistrationProviderRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/DomainRegistrationProviderRestOperations.cs @@ -32,7 +32,7 @@ public DomainRegistrationProviderRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/DomainsRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/DomainsRestOperations.cs index 33d24a4ed5723..a4fe0e7a8d92e 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/DomainsRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/DomainsRestOperations.cs @@ -32,7 +32,7 @@ public DomainsRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -1428,6 +1428,100 @@ public Response Renew(string subscriptionId, string resourceGroupName, string do } } + internal RequestUriBuilder CreateTransferOutRequestUri(string subscriptionId, string resourceGroupName, string domainName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DomainRegistration/domains/", false); + uri.AppendPath(domainName, true); + uri.AppendPath("/transferOut", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateTransferOutRequest(string subscriptionId, string resourceGroupName, string domainName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DomainRegistration/domains/", false); + uri.AppendPath(domainName, true); + uri.AppendPath("/transferOut", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Transfer out domain to another registrar. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of domain. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> TransferOutAsync(string subscriptionId, string resourceGroupName, string domainName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + + using var message = CreateTransferOutRequest(subscriptionId, resourceGroupName, domainName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AppServiceDomainData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AppServiceDomainData.DeserializeAppServiceDomainData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Transfer out domain to another registrar. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of domain. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response TransferOut(string subscriptionId, string resourceGroupName, string domainName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + + using var message = CreateTransferOutRequest(subscriptionId, resourceGroupName, domainName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AppServiceDomainData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AppServiceDomainData.DeserializeAppServiceDomainData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId) { var uri = new RawRequestUriBuilder(); diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/GetUsagesInLocationRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/GetUsagesInLocationRestOperations.cs new file mode 100644 index 0000000000000..cafc73e821095 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/GetUsagesInLocationRestOperations.cs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + internal partial class GetUsagesInLocationRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of GetUsagesInLocationRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public GetUsagesInLocationRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-12-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, AzureLocation location) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Web/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/usages", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, AzureLocation location) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Web/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/usages", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List usages in cores for all skus used by a subscription in a given location, for a specific quota type. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// The name of the Azure region. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListRequest(subscriptionId, location); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CsmUsageQuotaListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CsmUsageQuotaListResult.DeserializeCsmUsageQuotaListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List usages in cores for all skus used by a subscription in a given location, for a specific quota type. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// The name of the Azure region. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListRequest(subscriptionId, location); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CsmUsageQuotaListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CsmUsageQuotaListResult.DeserializeCsmUsageQuotaListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, AzureLocation location) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, AzureLocation location) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List usages in cores for all skus used by a subscription in a given location, for a specific quota type. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// The name of the Azure region. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, location); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CsmUsageQuotaListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CsmUsageQuotaListResult.DeserializeCsmUsageQuotaListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List usages in cores for all skus used by a subscription in a given location, for a specific quota type. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// The name of the Azure region. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, location); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CsmUsageQuotaListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CsmUsageQuotaListResult.DeserializeCsmUsageQuotaListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/GlobalRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/GlobalRestOperations.cs index 77b5a125d4fec..546a696d5071d 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/GlobalRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/GlobalRestOperations.cs @@ -33,7 +33,7 @@ public GlobalRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/KubeEnvironmentsRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/KubeEnvironmentsRestOperations.cs index f01294a0f8000..0a7cccdac0e6c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/KubeEnvironmentsRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/KubeEnvironmentsRestOperations.cs @@ -32,7 +32,7 @@ public KubeEnvironmentsRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/ProviderRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/ProviderRestOperations.cs index 4fe6c974c5a40..5048488eb260e 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/ProviderRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/ProviderRestOperations.cs @@ -32,7 +32,7 @@ public ProviderRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/RecommendationsRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/RecommendationsRestOperations.cs index 06bf731ff8656..3da8379f17753 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/RecommendationsRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/RecommendationsRestOperations.cs @@ -32,7 +32,7 @@ public RecommendationsRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/ResourceHealthMetadataRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/ResourceHealthMetadataRestOperations.cs index 1c3af539ae6f6..8a3afb21970e2 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/ResourceHealthMetadataRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/ResourceHealthMetadataRestOperations.cs @@ -32,7 +32,7 @@ public ResourceHealthMetadataRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/StaticSitesRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/StaticSitesRestOperations.cs index f89518983b9b3..6f2f0973dda22 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/StaticSitesRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/StaticSitesRestOperations.cs @@ -32,7 +32,7 @@ public StaticSitesRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -1494,7 +1494,7 @@ public Response CreateOrUpdateStaticSiteBuild } } - internal RequestUriBuilder CreateListStaticSiteBuildFunctionsRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName) + internal RequestUriBuilder CreateGetBuildDatabaseConnectionsRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1506,12 +1506,12 @@ internal RequestUriBuilder CreateListStaticSiteBuildFunctionsRequestUri(string s uri.AppendPath(name, true); uri.AppendPath("/builds/", false); uri.AppendPath(environmentName, true); - uri.AppendPath("/functions", false); + uri.AppendPath("/databaseConnections", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListStaticSiteBuildFunctionsRequest(string subscriptionId, string resourceGroupName, string name, string environmentName) + internal HttpMessage CreateGetBuildDatabaseConnectionsRequest(string subscriptionId, string resourceGroupName, string name, string environmentName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1526,7 +1526,7 @@ internal HttpMessage CreateListStaticSiteBuildFunctionsRequest(string subscripti uri.AppendPath(name, true); uri.AppendPath("/builds/", false); uri.AppendPath(environmentName, true); - uri.AppendPath("/functions", false); + uri.AppendPath("/databaseConnections", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -1534,7 +1534,7 @@ internal HttpMessage CreateListStaticSiteBuildFunctionsRequest(string subscripti return message; } - /// Description for Gets the functions of a particular static site build. + /// Returns overviews of database connections for a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. @@ -1542,22 +1542,22 @@ internal HttpMessage CreateListStaticSiteBuildFunctionsRequest(string subscripti /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListStaticSiteBuildFunctionsAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + public async Task> GetBuildDatabaseConnectionsAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - using var message = CreateListStaticSiteBuildFunctionsRequest(subscriptionId, resourceGroupName, name, environmentName); + using var message = CreateGetBuildDatabaseConnectionsRequest(subscriptionId, resourceGroupName, name, environmentName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - StaticSiteFunctionOverviewListResult value = default; + DatabaseConnectionCollection value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StaticSiteFunctionOverviewListResult.DeserializeStaticSiteFunctionOverviewListResult(document.RootElement); + value = DatabaseConnectionCollection.DeserializeDatabaseConnectionCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1565,7 +1565,7 @@ public async Task> ListStaticSite } } - /// Description for Gets the functions of a particular static site build. + /// Returns overviews of database connections for a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. @@ -1573,22 +1573,22 @@ public async Task> ListStaticSite /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response ListStaticSiteBuildFunctions(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + public Response GetBuildDatabaseConnections(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - using var message = CreateListStaticSiteBuildFunctionsRequest(subscriptionId, resourceGroupName, name, environmentName); + using var message = CreateGetBuildDatabaseConnectionsRequest(subscriptionId, resourceGroupName, name, environmentName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - StaticSiteFunctionOverviewListResult value = default; + DatabaseConnectionCollection value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StaticSiteFunctionOverviewListResult.DeserializeStaticSiteFunctionOverviewListResult(document.RootElement); + value = DatabaseConnectionCollection.DeserializeDatabaseConnectionCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1596,7 +1596,7 @@ public Response ListStaticSiteBuildFunctio } } - internal RequestUriBuilder CreateListStaticSiteBuildAppSettingsRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName) + internal RequestUriBuilder CreateGetBuildDatabaseConnectionRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1608,16 +1608,17 @@ internal RequestUriBuilder CreateListStaticSiteBuildAppSettingsRequestUri(string uri.AppendPath(name, true); uri.AppendPath("/builds/", false); uri.AppendPath(environmentName, true); - uri.AppendPath("/listAppSettings", false); + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListStaticSiteBuildAppSettingsRequest(string subscriptionId, string resourceGroupName, string name, string environmentName) + internal HttpMessage CreateGetBuildDatabaseConnectionRequest(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -1628,7 +1629,8 @@ internal HttpMessage CreateListStaticSiteBuildAppSettingsRequest(string subscrip uri.AppendPath(name, true); uri.AppendPath("/builds/", false); uri.AppendPath(environmentName, true); - uri.AppendPath("/listAppSettings", false); + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -1636,69 +1638,77 @@ internal HttpMessage CreateListStaticSiteBuildAppSettingsRequest(string subscrip return message; } - /// Description for Gets the application settings of a static site build. + /// Returns overview of a database connection for a static site build by name. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. /// The stage site identifier. + /// Name of the database connection. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListStaticSiteBuildAppSettingsAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetBuildDatabaseConnectionAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); - using var message = CreateListStaticSiteBuildAppSettingsRequest(subscriptionId, resourceGroupName, name, environmentName); + using var message = CreateGetBuildDatabaseConnectionRequest(subscriptionId, resourceGroupName, name, environmentName, databaseConnectionName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - AppServiceConfigurationDictionary value = default; + StaticSiteDatabaseConnectionData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + value = StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((StaticSiteDatabaseConnectionData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Description for Gets the application settings of a static site build. + /// Returns overview of a database connection for a static site build by name. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. /// The stage site identifier. + /// Name of the database connection. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response ListStaticSiteBuildAppSettings(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetBuildDatabaseConnection(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); - using var message = CreateListStaticSiteBuildAppSettingsRequest(subscriptionId, resourceGroupName, name, environmentName); + using var message = CreateGetBuildDatabaseConnectionRequest(subscriptionId, resourceGroupName, name, environmentName, databaseConnectionName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - AppServiceConfigurationDictionary value = default; + StaticSiteDatabaseConnectionData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + value = StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((StaticSiteDatabaseConnectionData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListStaticSiteBuildFunctionAppSettingsRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName) + internal RequestUriBuilder CreateCreateOrUpdateBuildDatabaseConnectionRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName, StaticSiteDatabaseConnectionData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1710,16 +1720,17 @@ internal RequestUriBuilder CreateListStaticSiteBuildFunctionAppSettingsRequestUr uri.AppendPath(name, true); uri.AppendPath("/builds/", false); uri.AppendPath(environmentName, true); - uri.AppendPath("/listFunctionAppSettings", false); + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListStaticSiteBuildFunctionAppSettingsRequest(string subscriptionId, string resourceGroupName, string name, string environmentName) + internal HttpMessage CreateCreateOrUpdateBuildDatabaseConnectionRequest(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName, StaticSiteDatabaseConnectionData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -1730,38 +1741,47 @@ internal HttpMessage CreateListStaticSiteBuildFunctionAppSettingsRequest(string uri.AppendPath(name, true); uri.AppendPath("/builds/", false); uri.AppendPath(environmentName, true); - uri.AppendPath("/listFunctionAppSettings", false); + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); 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(data, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Description for Gets the application settings of a static site build. + /// Description for Create or update a database connection for a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. /// The stage site identifier. + /// Name of the database connection. + /// A JSON representation of the database connection request properties. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListStaticSiteBuildFunctionAppSettingsAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateBuildDatabaseConnectionAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName, StaticSiteDatabaseConnectionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateListStaticSiteBuildFunctionAppSettingsRequest(subscriptionId, resourceGroupName, name, environmentName); + using var message = CreateCreateOrUpdateBuildDatabaseConnectionRequest(subscriptionId, resourceGroupName, name, environmentName, databaseConnectionName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - AppServiceConfigurationDictionary value = default; + StaticSiteDatabaseConnectionData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + value = StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1769,30 +1789,34 @@ public async Task> ListStaticSiteBui } } - /// Description for Gets the application settings of a static site build. + /// Description for Create or update a database connection for a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. /// The stage site identifier. + /// Name of the database connection. + /// A JSON representation of the database connection request properties. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response ListStaticSiteBuildFunctionAppSettings(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdateBuildDatabaseConnection(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName, StaticSiteDatabaseConnectionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateListStaticSiteBuildFunctionAppSettingsRequest(subscriptionId, resourceGroupName, name, environmentName); + using var message = CreateCreateOrUpdateBuildDatabaseConnectionRequest(subscriptionId, resourceGroupName, name, environmentName, databaseConnectionName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - AppServiceConfigurationDictionary value = default; + StaticSiteDatabaseConnectionData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + value = StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1800,7 +1824,7 @@ public Response ListStaticSiteBuildFunctionAp } } - internal RequestUriBuilder CreateGetUserProvidedFunctionAppsForStaticSiteBuildRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName) + internal RequestUriBuilder CreateDeleteBuildDatabaseConnectionRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1812,16 +1836,17 @@ internal RequestUriBuilder CreateGetUserProvidedFunctionAppsForStaticSiteBuildRe uri.AppendPath(name, true); uri.AppendPath("/builds/", false); uri.AppendPath(environmentName, true); - uri.AppendPath("/userProvidedFunctionApps", false); + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetUserProvidedFunctionAppsForStaticSiteBuildRequest(string subscriptionId, string resourceGroupName, string name, string environmentName) + internal HttpMessage CreateDeleteBuildDatabaseConnectionRequest(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -1832,7 +1857,8 @@ internal HttpMessage CreateGetUserProvidedFunctionAppsForStaticSiteBuildRequest( uri.AppendPath(name, true); uri.AppendPath("/builds/", false); uri.AppendPath(environmentName, true); - uri.AppendPath("/userProvidedFunctionApps", false); + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -1840,69 +1866,65 @@ internal HttpMessage CreateGetUserProvidedFunctionAppsForStaticSiteBuildRequest( return message; } - /// Description for Gets the details of the user provided function apps registered with a static site build. + /// Delete a database connection for a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. /// The stage site identifier. + /// Name of the database connection. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetUserProvidedFunctionAppsForStaticSiteBuildAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteBuildDatabaseConnectionAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); - using var message = CreateGetUserProvidedFunctionAppsForStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName); + using var message = CreateDeleteBuildDatabaseConnectionRequest(subscriptionId, resourceGroupName, name, environmentName, databaseConnectionName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - StaticSiteUserProvidedFunctionAppsListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StaticSiteUserProvidedFunctionAppsListResult.DeserializeStaticSiteUserProvidedFunctionAppsListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Description for Gets the details of the user provided function apps registered with a static site build. + /// Delete a database connection for a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. /// The stage site identifier. + /// Name of the database connection. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetUserProvidedFunctionAppsForStaticSiteBuild(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response DeleteBuildDatabaseConnection(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); - using var message = CreateGetUserProvidedFunctionAppsForStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName); + using var message = CreateDeleteBuildDatabaseConnectionRequest(subscriptionId, resourceGroupName, name, environmentName, databaseConnectionName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - StaticSiteUserProvidedFunctionAppsListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StaticSiteUserProvidedFunctionAppsListResult.DeserializeStaticSiteUserProvidedFunctionAppsListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetUserProvidedFunctionAppForStaticSiteBuildRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName) + internal RequestUriBuilder CreateUpdateBuildDatabaseConnectionRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName, StaticSiteDatabaseConnectionPatchContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1914,17 +1936,17 @@ internal RequestUriBuilder CreateGetUserProvidedFunctionAppForStaticSiteBuildReq uri.AppendPath(name, true); uri.AppendPath("/builds/", false); uri.AppendPath(environmentName, true); - uri.AppendPath("/userProvidedFunctionApps/", false); - uri.AppendPath(functionAppName, true); + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetUserProvidedFunctionAppForStaticSiteBuildRequest(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName) + internal HttpMessage CreateUpdateBuildDatabaseConnectionRequest(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName, StaticSiteDatabaseConnectionPatchContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -1935,86 +1957,90 @@ internal HttpMessage CreateGetUserProvidedFunctionAppForStaticSiteBuildRequest(s uri.AppendPath(name, true); uri.AppendPath("/builds/", false); uri.AppendPath(environmentName, true); - uri.AppendPath("/userProvidedFunctionApps/", false); - uri.AppendPath(functionAppName, true); + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; _userAgent.Apply(message); return message; } - /// Description for Gets the details of the user provided function app registered with a static site build. + /// Description for Create or update a database connection for a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. /// The stage site identifier. - /// Name of the function app registered with the static site build. + /// Name of the database connection. + /// A JSON representation of the database connection request properties. /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task> GetUserProvidedFunctionAppForStaticSiteBuildAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName, CancellationToken cancellationToken = default) + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> UpdateBuildDatabaseConnectionAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName, StaticSiteDatabaseConnectionPatchContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateGetUserProvidedFunctionAppForStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName, functionAppName); + using var message = CreateUpdateBuildDatabaseConnectionRequest(subscriptionId, resourceGroupName, name, environmentName, databaseConnectionName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - StaticSiteUserProvidedFunctionAppData value = default; + StaticSiteDatabaseConnectionData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StaticSiteUserProvidedFunctionAppData.DeserializeStaticSiteUserProvidedFunctionAppData(document.RootElement); + value = StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((StaticSiteUserProvidedFunctionAppData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Description for Gets the details of the user provided function app registered with a static site build. + /// Description for Create or update a database connection for a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. /// The stage site identifier. - /// Name of the function app registered with the static site build. + /// Name of the database connection. + /// A JSON representation of the database connection request properties. /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response GetUserProvidedFunctionAppForStaticSiteBuild(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName, CancellationToken cancellationToken = default) + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response UpdateBuildDatabaseConnection(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName, StaticSiteDatabaseConnectionPatchContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateGetUserProvidedFunctionAppForStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName, functionAppName); + using var message = CreateUpdateBuildDatabaseConnectionRequest(subscriptionId, resourceGroupName, name, environmentName, databaseConnectionName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - StaticSiteUserProvidedFunctionAppData value = default; + StaticSiteDatabaseConnectionData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StaticSiteUserProvidedFunctionAppData.DeserializeStaticSiteUserProvidedFunctionAppData(document.RootElement); + value = StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((StaticSiteUserProvidedFunctionAppData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateRegisterUserProvidedFunctionAppWithStaticSiteBuildRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName, StaticSiteUserProvidedFunctionAppData data, bool? isForced) + internal RequestUriBuilder CreateGetBuildDatabaseConnectionWithDetailsRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2026,21 +2052,18 @@ internal RequestUriBuilder CreateRegisterUserProvidedFunctionAppWithStaticSiteBu uri.AppendPath(name, true); uri.AppendPath("/builds/", false); uri.AppendPath(environmentName, true); - uri.AppendPath("/userProvidedFunctionApps/", false); - uri.AppendPath(functionAppName, true); - if (isForced != null) - { - uri.AppendQuery("isForced", isForced.Value, true); - } + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); + uri.AppendPath("/show", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateRegisterUserProvidedFunctionAppWithStaticSiteBuildRequest(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName, StaticSiteUserProvidedFunctionAppData data, bool? isForced) + internal HttpMessage CreateGetBuildDatabaseConnectionWithDetailsRequest(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -2051,88 +2074,83 @@ internal HttpMessage CreateRegisterUserProvidedFunctionAppWithStaticSiteBuildReq uri.AppendPath(name, true); uri.AppendPath("/builds/", false); uri.AppendPath(environmentName, true); - uri.AppendPath("/userProvidedFunctionApps/", false); - uri.AppendPath(functionAppName, true); - if (isForced != null) - { - uri.AppendQuery("isForced", isForced.Value, true); - } + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); + uri.AppendPath("/show", 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(data, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Description for Register a user provided function app with a static site build. + /// Returns details of a database connection for a static site build by name. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. /// The stage site identifier. - /// Name of the function app to register with the static site build. - /// A JSON representation of the user provided function app properties. See example. - /// Specify <code>true</code> to force the update of the auth configuration on the function app even if an AzureStaticWebApps provider is already configured on the function app. The default is <code>false</code>. + /// Name of the database connection. /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task RegisterUserProvidedFunctionAppWithStaticSiteBuildAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName, StaticSiteUserProvidedFunctionAppData data, bool? isForced = null, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetBuildDatabaseConnectionWithDetailsAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); - using var message = CreateRegisterUserProvidedFunctionAppWithStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName, functionAppName, data, isForced); + using var message = CreateGetBuildDatabaseConnectionWithDetailsRequest(subscriptionId, resourceGroupName, name, environmentName, databaseConnectionName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + StaticSiteDatabaseConnectionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Description for Register a user provided function app with a static site build. + /// Returns details of a database connection for a static site build by name. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. /// The stage site identifier. - /// Name of the function app to register with the static site build. - /// A JSON representation of the user provided function app properties. See example. - /// Specify <code>true</code> to force the update of the auth configuration on the function app even if an AzureStaticWebApps provider is already configured on the function app. The default is <code>false</code>. + /// Name of the database connection. /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response RegisterUserProvidedFunctionAppWithStaticSiteBuild(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName, StaticSiteUserProvidedFunctionAppData data, bool? isForced = null, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetBuildDatabaseConnectionWithDetails(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); - using var message = CreateRegisterUserProvidedFunctionAppWithStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName, functionAppName, data, isForced); + using var message = CreateGetBuildDatabaseConnectionWithDetailsRequest(subscriptionId, resourceGroupName, name, environmentName, databaseConnectionName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + StaticSiteDatabaseConnectionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDetachUserProvidedFunctionAppFromStaticSiteBuildRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName) + internal RequestUriBuilder CreateListStaticSiteBuildFunctionsRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2144,17 +2162,16 @@ internal RequestUriBuilder CreateDetachUserProvidedFunctionAppFromStaticSiteBuil uri.AppendPath(name, true); uri.AppendPath("/builds/", false); uri.AppendPath(environmentName, true); - uri.AppendPath("/userProvidedFunctionApps/", false); - uri.AppendPath(functionAppName, true); + uri.AppendPath("/functions", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDetachUserProvidedFunctionAppFromStaticSiteBuildRequest(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName) + internal HttpMessage CreateListStaticSiteBuildFunctionsRequest(string subscriptionId, string resourceGroupName, string name, string environmentName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -2165,8 +2182,7 @@ internal HttpMessage CreateDetachUserProvidedFunctionAppFromStaticSiteBuildReque uri.AppendPath(name, true); uri.AppendPath("/builds/", false); uri.AppendPath(environmentName, true); - uri.AppendPath("/userProvidedFunctionApps/", false); - uri.AppendPath(functionAppName, true); + uri.AppendPath("/functions", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -2174,65 +2190,69 @@ internal HttpMessage CreateDetachUserProvidedFunctionAppFromStaticSiteBuildReque return message; } - /// Description for Detach the user provided function app from the static site build. + /// Description for Gets the functions of a particular static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. /// The stage site identifier. - /// Name of the function app registered with the static site build. /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task DetachUserProvidedFunctionAppFromStaticSiteBuildAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListStaticSiteBuildFunctionsAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); - using var message = CreateDetachUserProvidedFunctionAppFromStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName, functionAppName); + using var message = CreateListStaticSiteBuildFunctionsRequest(subscriptionId, resourceGroupName, name, environmentName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 204: - return message.Response; + { + StaticSiteFunctionOverviewListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteFunctionOverviewListResult.DeserializeStaticSiteFunctionOverviewListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Description for Detach the user provided function app from the static site build. + /// Description for Gets the functions of a particular static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. /// The stage site identifier. - /// Name of the function app registered with the static site build. /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response DetachUserProvidedFunctionAppFromStaticSiteBuild(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListStaticSiteBuildFunctions(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); - using var message = CreateDetachUserProvidedFunctionAppFromStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName, functionAppName); + using var message = CreateListStaticSiteBuildFunctionsRequest(subscriptionId, resourceGroupName, name, environmentName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 204: - return message.Response; + { + StaticSiteFunctionOverviewListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteFunctionOverviewListResult.DeserializeStaticSiteFunctionOverviewListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateZipDeploymentForStaticSiteBuildRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName, StaticSiteZipDeployment staticSiteZipDeploymentEnvelope) + internal RequestUriBuilder CreateListStaticSiteBuildAppSettingsRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2244,12 +2264,12 @@ internal RequestUriBuilder CreateCreateZipDeploymentForStaticSiteBuildRequestUri uri.AppendPath(name, true); uri.AppendPath("/builds/", false); uri.AppendPath(environmentName, true); - uri.AppendPath("/zipdeploy", false); + uri.AppendPath("/listAppSettings", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateZipDeploymentForStaticSiteBuildRequest(string subscriptionId, string resourceGroupName, string name, string environmentName, StaticSiteZipDeployment staticSiteZipDeploymentEnvelope) + internal HttpMessage CreateListStaticSiteBuildAppSettingsRequest(string subscriptionId, string resourceGroupName, string name, string environmentName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -2264,77 +2284,77 @@ internal HttpMessage CreateCreateZipDeploymentForStaticSiteBuildRequest(string s uri.AppendPath(name, true); uri.AppendPath("/builds/", false); uri.AppendPath(environmentName, true); - uri.AppendPath("/zipdeploy", false); + uri.AppendPath("/listAppSettings", 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(staticSiteZipDeploymentEnvelope, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Description for Deploys zipped content to a specific environment of a static site. + /// Description for Gets the application settings of a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// Name of the environment. - /// A JSON representation of the StaticSiteZipDeployment properties. See example. + /// The stage site identifier. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateZipDeploymentForStaticSiteBuildAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, StaticSiteZipDeployment staticSiteZipDeploymentEnvelope, CancellationToken cancellationToken = default) + public async Task> ListStaticSiteBuildAppSettingsAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - Argument.AssertNotNull(staticSiteZipDeploymentEnvelope, nameof(staticSiteZipDeploymentEnvelope)); - using var message = CreateCreateZipDeploymentForStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope); + using var message = CreateListStaticSiteBuildAppSettingsRequest(subscriptionId, resourceGroupName, name, environmentName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + AppServiceConfigurationDictionary value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Description for Deploys zipped content to a specific environment of a static site. + /// Description for Gets the application settings of a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// Name of the environment. - /// A JSON representation of the StaticSiteZipDeployment properties. See example. + /// The stage site identifier. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response CreateZipDeploymentForStaticSiteBuild(string subscriptionId, string resourceGroupName, string name, string environmentName, StaticSiteZipDeployment staticSiteZipDeploymentEnvelope, CancellationToken cancellationToken = default) + public Response ListStaticSiteBuildAppSettings(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - Argument.AssertNotNull(staticSiteZipDeploymentEnvelope, nameof(staticSiteZipDeploymentEnvelope)); - using var message = CreateCreateZipDeploymentForStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope); + using var message = CreateListStaticSiteBuildAppSettingsRequest(subscriptionId, resourceGroupName, name, environmentName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + AppServiceConfigurationDictionary value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateOrUpdateStaticSiteAppSettingsRequestUri(string subscriptionId, string resourceGroupName, string name, AppServiceConfigurationDictionary appSettings) + internal RequestUriBuilder CreateListStaticSiteBuildFunctionAppSettingsRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2344,16 +2364,18 @@ internal RequestUriBuilder CreateCreateOrUpdateStaticSiteAppSettingsRequestUri(s uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/config/appsettings", false); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/listFunctionAppSettings", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateOrUpdateStaticSiteAppSettingsRequest(string subscriptionId, string resourceGroupName, string name, AppServiceConfigurationDictionary appSettings) + internal HttpMessage CreateListStaticSiteBuildFunctionAppSettingsRequest(string subscriptionId, string resourceGroupName, string name, string environmentName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -2362,34 +2384,32 @@ internal HttpMessage CreateCreateOrUpdateStaticSiteAppSettingsRequest(string sub uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/config/appsettings", false); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/listFunctionAppSettings", 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(appSettings, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Description for Creates or updates the app settings of a static site. + /// Description for Gets the application settings of a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// The dictionary containing the static site app settings to update. + /// The stage site identifier. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> CreateOrUpdateStaticSiteAppSettingsAsync(string subscriptionId, string resourceGroupName, string name, AppServiceConfigurationDictionary appSettings, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListStaticSiteBuildFunctionAppSettingsAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(appSettings, nameof(appSettings)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - using var message = CreateCreateOrUpdateStaticSiteAppSettingsRequest(subscriptionId, resourceGroupName, name, appSettings); + using var message = CreateListStaticSiteBuildFunctionAppSettingsRequest(subscriptionId, resourceGroupName, name, environmentName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -2405,22 +2425,22 @@ public async Task> CreateOrUpdateSta } } - /// Description for Creates or updates the app settings of a static site. + /// Description for Gets the application settings of a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// The dictionary containing the static site app settings to update. + /// The stage site identifier. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdateStaticSiteAppSettings(string subscriptionId, string resourceGroupName, string name, AppServiceConfigurationDictionary appSettings, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListStaticSiteBuildFunctionAppSettings(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(appSettings, nameof(appSettings)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - using var message = CreateCreateOrUpdateStaticSiteAppSettingsRequest(subscriptionId, resourceGroupName, name, appSettings); + using var message = CreateListStaticSiteBuildFunctionAppSettingsRequest(subscriptionId, resourceGroupName, name, environmentName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -2436,7 +2456,7 @@ public Response CreateOrUpdateStaticSiteAppSe } } - internal RequestUriBuilder CreateCreateOrUpdateStaticSiteFunctionAppSettingsRequestUri(string subscriptionId, string resourceGroupName, string name, AppServiceConfigurationDictionary appSettings) + internal RequestUriBuilder CreateGetBuildDatabaseConnectionsWithDetailsRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2446,16 +2466,18 @@ internal RequestUriBuilder CreateCreateOrUpdateStaticSiteFunctionAppSettingsRequ uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/config/functionappsettings", false); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/showDatabaseConnections", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateOrUpdateStaticSiteFunctionAppSettingsRequest(string subscriptionId, string resourceGroupName, string name, AppServiceConfigurationDictionary appSettings) + internal HttpMessage CreateGetBuildDatabaseConnectionsWithDetailsRequest(string subscriptionId, string resourceGroupName, string name, string environmentName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -2464,42 +2486,40 @@ internal HttpMessage CreateCreateOrUpdateStaticSiteFunctionAppSettingsRequest(st uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/config/functionappsettings", false); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/showDatabaseConnections", 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(appSettings, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Description for Creates or updates the function app settings of a static site. + /// Returns details of database connections for a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// The dictionary containing the static site function app settings to update. + /// The stage site identifier. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> CreateOrUpdateStaticSiteFunctionAppSettingsAsync(string subscriptionId, string resourceGroupName, string name, AppServiceConfigurationDictionary appSettings, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetBuildDatabaseConnectionsWithDetailsAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(appSettings, nameof(appSettings)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - using var message = CreateCreateOrUpdateStaticSiteFunctionAppSettingsRequest(subscriptionId, resourceGroupName, name, appSettings); + using var message = CreateGetBuildDatabaseConnectionsWithDetailsRequest(subscriptionId, resourceGroupName, name, environmentName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - AppServiceConfigurationDictionary value = default; + DatabaseConnectionCollection value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + value = DatabaseConnectionCollection.DeserializeDatabaseConnectionCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -2507,30 +2527,30 @@ public async Task> CreateOrUpdateSta } } - /// Description for Creates or updates the function app settings of a static site. + /// Returns details of database connections for a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// The dictionary containing the static site function app settings to update. + /// The stage site identifier. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdateStaticSiteFunctionAppSettings(string subscriptionId, string resourceGroupName, string name, AppServiceConfigurationDictionary appSettings, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetBuildDatabaseConnectionsWithDetails(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(appSettings, nameof(appSettings)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - using var message = CreateCreateOrUpdateStaticSiteFunctionAppSettingsRequest(subscriptionId, resourceGroupName, name, appSettings); + using var message = CreateGetBuildDatabaseConnectionsWithDetailsRequest(subscriptionId, resourceGroupName, name, environmentName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - AppServiceConfigurationDictionary value = default; + DatabaseConnectionCollection value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + value = DatabaseConnectionCollection.DeserializeDatabaseConnectionCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -2538,7 +2558,7 @@ public Response CreateOrUpdateStaticSiteFunct } } - internal RequestUriBuilder CreateCreateUserRolesInvitationLinkRequestUri(string subscriptionId, string resourceGroupName, string name, StaticSiteUserInvitationContent content) + internal RequestUriBuilder CreateGetUserProvidedFunctionAppsForStaticSiteBuildRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2548,16 +2568,18 @@ internal RequestUriBuilder CreateCreateUserRolesInvitationLinkRequestUri(string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/createUserInvitation", false); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/userProvidedFunctionApps", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateUserRolesInvitationLinkRequest(string subscriptionId, string resourceGroupName, string name, StaticSiteUserInvitationContent content) + internal HttpMessage CreateGetUserProvidedFunctionAppsForStaticSiteBuildRequest(string subscriptionId, string resourceGroupName, string name, string environmentName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -2566,42 +2588,40 @@ internal HttpMessage CreateCreateUserRolesInvitationLinkRequest(string subscript uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/createUserInvitation", false); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/userProvidedFunctionApps", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); - request.Content = content0; _userAgent.Apply(message); return message; } - /// Description for Creates an invitation link for a user with the role. + /// Description for Gets the details of the user provided function apps registered with a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// The to use. + /// The stage site identifier. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> CreateUserRolesInvitationLinkAsync(string subscriptionId, string resourceGroupName, string name, StaticSiteUserInvitationContent content, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetUserProvidedFunctionAppsForStaticSiteBuildAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - using var message = CreateCreateUserRolesInvitationLinkRequest(subscriptionId, resourceGroupName, name, content); + using var message = CreateGetUserProvidedFunctionAppsForStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - StaticSiteUserInvitationResult value = default; + StaticSiteUserProvidedFunctionAppsListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StaticSiteUserInvitationResult.DeserializeStaticSiteUserInvitationResult(document.RootElement); + value = StaticSiteUserProvidedFunctionAppsListResult.DeserializeStaticSiteUserProvidedFunctionAppsListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -2609,30 +2629,30 @@ public async Task> CreateUserRolesInvit } } - /// Description for Creates an invitation link for a user with the role. + /// Description for Gets the details of the user provided function apps registered with a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// The to use. + /// The stage site identifier. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response CreateUserRolesInvitationLink(string subscriptionId, string resourceGroupName, string name, StaticSiteUserInvitationContent content, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetUserProvidedFunctionAppsForStaticSiteBuild(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - using var message = CreateCreateUserRolesInvitationLinkRequest(subscriptionId, resourceGroupName, name, content); + using var message = CreateGetUserProvidedFunctionAppsForStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - StaticSiteUserInvitationResult value = default; + StaticSiteUserProvidedFunctionAppsListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StaticSiteUserInvitationResult.DeserializeStaticSiteUserInvitationResult(document.RootElement); + value = StaticSiteUserProvidedFunctionAppsListResult.DeserializeStaticSiteUserProvidedFunctionAppsListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -2640,7 +2660,7 @@ public Response CreateUserRolesInvitationLink(st } } - internal RequestUriBuilder CreateListStaticSiteCustomDomainsRequestUri(string subscriptionId, string resourceGroupName, string name) + internal RequestUriBuilder CreateGetUserProvidedFunctionAppForStaticSiteBuildRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2650,12 +2670,15 @@ internal RequestUriBuilder CreateListStaticSiteCustomDomainsRequestUri(string su uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/customDomains", false); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/userProvidedFunctionApps/", false); + uri.AppendPath(functionAppName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListStaticSiteCustomDomainsRequest(string subscriptionId, string resourceGroupName, string name) + internal HttpMessage CreateGetUserProvidedFunctionAppForStaticSiteBuildRequest(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -2668,7 +2691,10 @@ internal HttpMessage CreateListStaticSiteCustomDomainsRequest(string subscriptio uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/customDomains", false); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/userProvidedFunctionApps/", false); + uri.AppendPath(functionAppName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -2676,65 +2702,77 @@ internal HttpMessage CreateListStaticSiteCustomDomainsRequest(string subscriptio return message; } - /// Description for Gets all static site custom domains for a particular static site. + /// Description for Gets the details of the user provided function app registered with a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. - /// Name of the static site resource to search in. + /// Name of the static site. + /// The stage site identifier. + /// Name of the function app registered with the static site build. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListStaticSiteCustomDomainsAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetUserProvidedFunctionAppForStaticSiteBuildAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); - using var message = CreateListStaticSiteCustomDomainsRequest(subscriptionId, resourceGroupName, name); + using var message = CreateGetUserProvidedFunctionAppForStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName, functionAppName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - StaticSiteCustomDomainOverviewListResult value = default; + StaticSiteUserProvidedFunctionAppData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StaticSiteCustomDomainOverviewListResult.DeserializeStaticSiteCustomDomainOverviewListResult(document.RootElement); + value = StaticSiteUserProvidedFunctionAppData.DeserializeStaticSiteUserProvidedFunctionAppData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((StaticSiteUserProvidedFunctionAppData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Description for Gets all static site custom domains for a particular static site. + /// Description for Gets the details of the user provided function app registered with a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. - /// Name of the static site resource to search in. + /// Name of the static site. + /// The stage site identifier. + /// Name of the function app registered with the static site build. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListStaticSiteCustomDomains(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetUserProvidedFunctionAppForStaticSiteBuild(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); - using var message = CreateListStaticSiteCustomDomainsRequest(subscriptionId, resourceGroupName, name); + using var message = CreateGetUserProvidedFunctionAppForStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName, functionAppName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - StaticSiteCustomDomainOverviewListResult value = default; + StaticSiteUserProvidedFunctionAppData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StaticSiteCustomDomainOverviewListResult.DeserializeStaticSiteCustomDomainOverviewListResult(document.RootElement); + value = StaticSiteUserProvidedFunctionAppData.DeserializeStaticSiteUserProvidedFunctionAppData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((StaticSiteUserProvidedFunctionAppData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetStaticSiteCustomDomainRequestUri(string subscriptionId, string resourceGroupName, string name, string domainName) + internal RequestUriBuilder CreateRegisterUserProvidedFunctionAppWithStaticSiteBuildRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName, StaticSiteUserProvidedFunctionAppData data, bool? isForced) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2744,17 +2782,23 @@ internal RequestUriBuilder CreateGetStaticSiteCustomDomainRequestUri(string subs uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/customDomains/", false); - uri.AppendPath(domainName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/userProvidedFunctionApps/", false); + uri.AppendPath(functionAppName, true); + if (isForced != null) + { + uri.AppendQuery("isForced", isForced.Value, true); + } uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetStaticSiteCustomDomainRequest(string subscriptionId, string resourceGroupName, string name, string domainName) + internal HttpMessage CreateRegisterUserProvidedFunctionAppWithStaticSiteBuildRequest(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName, StaticSiteUserProvidedFunctionAppData data, bool? isForced) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -2763,82 +2807,90 @@ internal HttpMessage CreateGetStaticSiteCustomDomainRequest(string subscriptionI uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/customDomains/", false); - uri.AppendPath(domainName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/userProvidedFunctionApps/", false); + uri.AppendPath(functionAppName, true); + if (isForced != null) + { + uri.AppendQuery("isForced", isForced.Value, true); + } uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; } - /// Description for Gets an existing custom domain for a particular static site. + /// Description for Register a user provided function app with a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. - /// Name of the static site resource to search in. - /// The custom domain name. + /// Name of the static site. + /// The stage site identifier. + /// Name of the function app to register with the static site build. + /// A JSON representation of the user provided function app properties. See example. + /// Specify <code>true</code> to force the update of the auth configuration on the function app even if an AzureStaticWebApps provider is already configured on the function app. The default is <code>false</code>. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetStaticSiteCustomDomainAsync(string subscriptionId, string resourceGroupName, string name, string domainName, CancellationToken cancellationToken = default) + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task RegisterUserProvidedFunctionAppWithStaticSiteBuildAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName, StaticSiteUserProvidedFunctionAppData data, bool? isForced = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetStaticSiteCustomDomainRequest(subscriptionId, resourceGroupName, name, domainName); + using var message = CreateRegisterUserProvidedFunctionAppWithStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName, functionAppName, data, isForced); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - StaticSiteCustomDomainOverviewData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StaticSiteCustomDomainOverviewData.DeserializeStaticSiteCustomDomainOverviewData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((StaticSiteCustomDomainOverviewData)null, message.Response); + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Description for Gets an existing custom domain for a particular static site. + /// Description for Register a user provided function app with a static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. - /// Name of the static site resource to search in. - /// The custom domain name. + /// Name of the static site. + /// The stage site identifier. + /// Name of the function app to register with the static site build. + /// A JSON representation of the user provided function app properties. See example. + /// Specify <code>true</code> to force the update of the auth configuration on the function app even if an AzureStaticWebApps provider is already configured on the function app. The default is <code>false</code>. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetStaticSiteCustomDomain(string subscriptionId, string resourceGroupName, string name, string domainName, CancellationToken cancellationToken = default) + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response RegisterUserProvidedFunctionAppWithStaticSiteBuild(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName, StaticSiteUserProvidedFunctionAppData data, bool? isForced = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetStaticSiteCustomDomainRequest(subscriptionId, resourceGroupName, name, domainName); + using var message = CreateRegisterUserProvidedFunctionAppWithStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName, functionAppName, data, isForced); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - StaticSiteCustomDomainOverviewData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StaticSiteCustomDomainOverviewData.DeserializeStaticSiteCustomDomainOverviewData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((StaticSiteCustomDomainOverviewData)null, message.Response); + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateOrUpdateStaticSiteCustomDomainRequestUri(string subscriptionId, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainContent content) + internal RequestUriBuilder CreateDetachUserProvidedFunctionAppFromStaticSiteBuildRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2848,17 +2900,19 @@ internal RequestUriBuilder CreateCreateOrUpdateStaticSiteCustomDomainRequestUri( uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/customDomains/", false); - uri.AppendPath(domainName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/userProvidedFunctionApps/", false); + uri.AppendPath(functionAppName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateOrUpdateStaticSiteCustomDomainRequest(string subscriptionId, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainContent content) + internal HttpMessage CreateDetachUserProvidedFunctionAppFromStaticSiteBuildRequest(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -2867,78 +2921,76 @@ internal HttpMessage CreateCreateOrUpdateStaticSiteCustomDomainRequest(string su uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/customDomains/", false); - uri.AppendPath(domainName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/userProvidedFunctionApps/", false); + uri.AppendPath(functionAppName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); - request.Content = content0; _userAgent.Apply(message); return message; } - /// Description for Creates a new static site custom domain in an existing resource group and static site. + /// Description for Detach the user provided function app from the static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// The custom domain to create. - /// A JSON representation of the static site custom domain request properties. See example. + /// The stage site identifier. + /// Name of the function app registered with the static site build. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateStaticSiteCustomDomainAsync(string subscriptionId, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainContent content, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DetachUserProvidedFunctionAppFromStaticSiteBuildAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); - using var message = CreateCreateOrUpdateStaticSiteCustomDomainRequest(subscriptionId, resourceGroupName, name, domainName, content); + using var message = CreateDetachUserProvidedFunctionAppFromStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName, functionAppName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Description for Creates a new static site custom domain in an existing resource group and static site. + /// Description for Detach the user provided function app from the static site build. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// The custom domain to create. - /// A JSON representation of the static site custom domain request properties. See example. + /// The stage site identifier. + /// Name of the function app registered with the static site build. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdateStaticSiteCustomDomain(string subscriptionId, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainContent content, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response DetachUserProvidedFunctionAppFromStaticSiteBuild(string subscriptionId, string resourceGroupName, string name, string environmentName, string functionAppName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); - using var message = CreateCreateOrUpdateStaticSiteCustomDomainRequest(subscriptionId, resourceGroupName, name, domainName, content); + using var message = CreateDetachUserProvidedFunctionAppFromStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName, functionAppName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDeleteStaticSiteCustomDomainRequestUri(string subscriptionId, string resourceGroupName, string name, string domainName) + internal RequestUriBuilder CreateCreateZipDeploymentForStaticSiteBuildRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName, StaticSiteZipDeployment staticSiteZipDeploymentEnvelope) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2948,17 +3000,18 @@ internal RequestUriBuilder CreateDeleteStaticSiteCustomDomainRequestUri(string s uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/customDomains/", false); - uri.AppendPath(domainName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/zipdeploy", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDeleteStaticSiteCustomDomainRequest(string subscriptionId, string resourceGroupName, string name, string domainName) + internal HttpMessage CreateCreateZipDeploymentForStaticSiteBuildRequest(string subscriptionId, string resourceGroupName, string name, string environmentName, StaticSiteZipDeployment staticSiteZipDeploymentEnvelope) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -2967,31 +3020,38 @@ internal HttpMessage CreateDeleteStaticSiteCustomDomainRequest(string subscripti uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/customDomains/", false); - uri.AppendPath(domainName, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/zipdeploy", 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(staticSiteZipDeploymentEnvelope, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Description for Deletes a custom domain. + /// Description for Deploys zipped content to a specific environment of a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// The custom domain to delete. + /// Name of the environment. + /// A JSON representation of the StaticSiteZipDeployment properties. See example. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteStaticSiteCustomDomainAsync(string subscriptionId, string resourceGroupName, string name, string domainName, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateZipDeploymentForStaticSiteBuildAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, StaticSiteZipDeployment staticSiteZipDeploymentEnvelope, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNull(staticSiteZipDeploymentEnvelope, nameof(staticSiteZipDeploymentEnvelope)); - using var message = CreateDeleteStaticSiteCustomDomainRequest(subscriptionId, resourceGroupName, name, domainName); + using var message = CreateCreateZipDeploymentForStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -3003,22 +3063,24 @@ public async Task DeleteStaticSiteCustomDomainAsync(string subscriptio } } - /// Description for Deletes a custom domain. + /// Description for Deploys zipped content to a specific environment of a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// The custom domain to delete. + /// Name of the environment. + /// A JSON representation of the StaticSiteZipDeployment properties. See example. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response DeleteStaticSiteCustomDomain(string subscriptionId, string resourceGroupName, string name, string domainName, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateZipDeploymentForStaticSiteBuild(string subscriptionId, string resourceGroupName, string name, string environmentName, StaticSiteZipDeployment staticSiteZipDeploymentEnvelope, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNull(staticSiteZipDeploymentEnvelope, nameof(staticSiteZipDeploymentEnvelope)); - using var message = CreateDeleteStaticSiteCustomDomainRequest(subscriptionId, resourceGroupName, name, domainName); + using var message = CreateCreateZipDeploymentForStaticSiteBuildRequest(subscriptionId, resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -3030,7 +3092,7 @@ public Response DeleteStaticSiteCustomDomain(string subscriptionId, string resou } } - internal RequestUriBuilder CreateValidateCustomDomainCanBeAddedToStaticSiteRequestUri(string subscriptionId, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainContent content) + internal RequestUriBuilder CreateCreateOrUpdateStaticSiteAppSettingsRequestUri(string subscriptionId, string resourceGroupName, string name, AppServiceConfigurationDictionary appSettings) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -3040,18 +3102,16 @@ internal RequestUriBuilder CreateValidateCustomDomainCanBeAddedToStaticSiteReque uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/customDomains/", false); - uri.AppendPath(domainName, true); - uri.AppendPath("/validate", false); + uri.AppendPath("/config/appsettings", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateValidateCustomDomainCanBeAddedToStaticSiteRequest(string subscriptionId, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainContent content) + internal HttpMessage CreateCreateOrUpdateStaticSiteAppSettingsRequest(string subscriptionId, string resourceGroupName, string name, AppServiceConfigurationDictionary appSettings) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -3060,79 +3120,81 @@ internal HttpMessage CreateValidateCustomDomainCanBeAddedToStaticSiteRequest(str uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/customDomains/", false); - uri.AppendPath(domainName, true); - uri.AppendPath("/validate", false); + uri.AppendPath("/config/appsettings", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); - request.Content = content0; + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(appSettings, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Description for Validates a particular custom domain can be added to a static site. + /// Description for Creates or updates the app settings of a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// The custom domain to validate. - /// A JSON representation of the static site custom domain request properties. See example. + /// The dictionary containing the static site app settings to update. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task ValidateCustomDomainCanBeAddedToStaticSiteAsync(string subscriptionId, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainContent content, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateStaticSiteAppSettingsAsync(string subscriptionId, string resourceGroupName, string name, AppServiceConfigurationDictionary appSettings, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(appSettings, nameof(appSettings)); - using var message = CreateValidateCustomDomainCanBeAddedToStaticSiteRequest(subscriptionId, resourceGroupName, name, domainName, content); + using var message = CreateCreateOrUpdateStaticSiteAppSettingsRequest(subscriptionId, resourceGroupName, name, appSettings); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + AppServiceConfigurationDictionary value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Description for Validates a particular custom domain can be added to a static site. + /// Description for Creates or updates the app settings of a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// The custom domain to validate. - /// A JSON representation of the static site custom domain request properties. See example. + /// The dictionary containing the static site app settings to update. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response ValidateCustomDomainCanBeAddedToStaticSite(string subscriptionId, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainContent content, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdateStaticSiteAppSettings(string subscriptionId, string resourceGroupName, string name, AppServiceConfigurationDictionary appSettings, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(appSettings, nameof(appSettings)); - using var message = CreateValidateCustomDomainCanBeAddedToStaticSiteRequest(subscriptionId, resourceGroupName, name, domainName, content); + using var message = CreateCreateOrUpdateStaticSiteAppSettingsRequest(subscriptionId, resourceGroupName, name, appSettings); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + AppServiceConfigurationDictionary value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDetachStaticSiteRequestUri(string subscriptionId, string resourceGroupName, string name) + internal RequestUriBuilder CreateListBasicAuthRequestUri(string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -3142,16 +3204,16 @@ internal RequestUriBuilder CreateDetachStaticSiteRequestUri(string subscriptionI uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/detach", false); + uri.AppendPath("/basicAuth", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDetachStaticSiteRequest(string subscriptionId, string resourceGroupName, string name) + internal HttpMessage CreateListBasicAuthRequest(string subscriptionId, string resourceGroupName, string name) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -3160,7 +3222,7 @@ internal HttpMessage CreateDetachStaticSiteRequest(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/detach", false); + uri.AppendPath("/basicAuth", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -3168,57 +3230,65 @@ internal HttpMessage CreateDetachStaticSiteRequest(string subscriptionId, string return message; } - /// Description for Detaches a static site. + /// Description for Gets the basic auth properties for a static site as a collection. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. - /// Name of the static site to detach. + /// Name of the static site. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task DetachStaticSiteAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public async Task> ListBasicAuthAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateDetachStaticSiteRequest(subscriptionId, resourceGroupName, name); + using var message = CreateListBasicAuthRequest(subscriptionId, resourceGroupName, name); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + StaticSiteBasicAuthPropertiesCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteBasicAuthPropertiesCollection.DeserializeStaticSiteBasicAuthPropertiesCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Description for Detaches a static site. + /// Description for Gets the basic auth properties for a static site as a collection. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. - /// Name of the static site to detach. + /// Name of the static site. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response DetachStaticSite(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public Response ListBasicAuth(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateDetachStaticSiteRequest(subscriptionId, resourceGroupName, name); + using var message = CreateListBasicAuthRequest(subscriptionId, resourceGroupName, name); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + StaticSiteBasicAuthPropertiesCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteBasicAuthPropertiesCollection.DeserializeStaticSiteBasicAuthPropertiesCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListStaticSiteFunctionsRequestUri(string subscriptionId, string resourceGroupName, string name) + internal RequestUriBuilder CreateGetBasicAuthRequestUri(string subscriptionId, string resourceGroupName, string name, StaticSiteBasicAuthName basicAuthName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -3228,12 +3298,13 @@ internal RequestUriBuilder CreateListStaticSiteFunctionsRequestUri(string subscr uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/functions", false); + uri.AppendPath("/basicAuth/", false); + uri.AppendPath(basicAuthName.ToString(), true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListStaticSiteFunctionsRequest(string subscriptionId, string resourceGroupName, string name) + internal HttpMessage CreateGetBasicAuthRequest(string subscriptionId, string resourceGroupName, string name, StaticSiteBasicAuthName basicAuthName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -3246,7 +3317,8 @@ internal HttpMessage CreateListStaticSiteFunctionsRequest(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/functions", false); + uri.AppendPath("/basicAuth/", false); + uri.AppendPath(basicAuthName.ToString(), true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -3254,65 +3326,71 @@ internal HttpMessage CreateListStaticSiteFunctionsRequest(string subscriptionId, return message; } - /// Description for Gets the functions of a static site. + /// Description for Gets the basic auth properties for a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. + /// name of the basic auth entry. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListStaticSiteFunctionsAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public async Task> GetBasicAuthAsync(string subscriptionId, string resourceGroupName, string name, StaticSiteBasicAuthName basicAuthName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListStaticSiteFunctionsRequest(subscriptionId, resourceGroupName, name); + using var message = CreateGetBasicAuthRequest(subscriptionId, resourceGroupName, name, basicAuthName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - StaticSiteFunctionOverviewListResult value = default; + StaticSiteBasicAuthPropertyData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StaticSiteFunctionOverviewListResult.DeserializeStaticSiteFunctionOverviewListResult(document.RootElement); + value = StaticSiteBasicAuthPropertyData.DeserializeStaticSiteBasicAuthPropertyData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((StaticSiteBasicAuthPropertyData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Description for Gets the functions of a static site. + /// Description for Gets the basic auth properties for a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. + /// name of the basic auth entry. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListStaticSiteFunctions(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public Response GetBasicAuth(string subscriptionId, string resourceGroupName, string name, StaticSiteBasicAuthName basicAuthName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListStaticSiteFunctionsRequest(subscriptionId, resourceGroupName, name); + using var message = CreateGetBasicAuthRequest(subscriptionId, resourceGroupName, name, basicAuthName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - StaticSiteFunctionOverviewListResult value = default; + StaticSiteBasicAuthPropertyData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StaticSiteFunctionOverviewListResult.DeserializeStaticSiteFunctionOverviewListResult(document.RootElement); + value = StaticSiteBasicAuthPropertyData.DeserializeStaticSiteBasicAuthPropertyData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((StaticSiteBasicAuthPropertyData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListStaticSiteAppSettingsRequestUri(string subscriptionId, string resourceGroupName, string name) + internal RequestUriBuilder CreateCreateOrUpdateBasicAuthRequestUri(string subscriptionId, string resourceGroupName, string name, StaticSiteBasicAuthName basicAuthName, StaticSiteBasicAuthPropertyData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -3322,16 +3400,17 @@ internal RequestUriBuilder CreateListStaticSiteAppSettingsRequestUri(string subs uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/listAppSettings", false); + uri.AppendPath("/basicAuth/", false); + uri.AppendPath(basicAuthName.ToString(), true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListStaticSiteAppSettingsRequest(string subscriptionId, string resourceGroupName, string name) + internal HttpMessage CreateCreateOrUpdateBasicAuthRequest(string subscriptionId, string resourceGroupName, string name, StaticSiteBasicAuthName basicAuthName, StaticSiteBasicAuthPropertyData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -3340,36 +3419,44 @@ internal HttpMessage CreateListStaticSiteAppSettingsRequest(string subscriptionI uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/listAppSettings", false); + uri.AppendPath("/basicAuth/", false); + uri.AppendPath(basicAuthName.ToString(), true); 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(data, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Description for Gets the application settings of a static site. + /// Description for Adds or updates basic auth for a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. + /// name of the basic auth entry. + /// A JSON representation of the basic auth properties. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListStaticSiteAppSettingsAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public async Task> CreateOrUpdateBasicAuthAsync(string subscriptionId, string resourceGroupName, string name, StaticSiteBasicAuthName basicAuthName, StaticSiteBasicAuthPropertyData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateListStaticSiteAppSettingsRequest(subscriptionId, resourceGroupName, name); + using var message = CreateCreateOrUpdateBasicAuthRequest(subscriptionId, resourceGroupName, name, basicAuthName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - AppServiceConfigurationDictionary value = default; + StaticSiteBasicAuthPropertyData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + value = StaticSiteBasicAuthPropertyData.DeserializeStaticSiteBasicAuthPropertyData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -3377,28 +3464,31 @@ public async Task> ListStaticSiteApp } } - /// Description for Gets the application settings of a static site. + /// Description for Adds or updates basic auth for a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. + /// name of the basic auth entry. + /// A JSON representation of the basic auth properties. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListStaticSiteAppSettings(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public Response CreateOrUpdateBasicAuth(string subscriptionId, string resourceGroupName, string name, StaticSiteBasicAuthName basicAuthName, StaticSiteBasicAuthPropertyData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateListStaticSiteAppSettingsRequest(subscriptionId, resourceGroupName, name); + using var message = CreateCreateOrUpdateBasicAuthRequest(subscriptionId, resourceGroupName, name, basicAuthName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - AppServiceConfigurationDictionary value = default; + StaticSiteBasicAuthPropertyData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + value = StaticSiteBasicAuthPropertyData.DeserializeStaticSiteBasicAuthPropertyData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -3406,7 +3496,7 @@ public Response ListStaticSiteAppSettings(str } } - internal RequestUriBuilder CreateListStaticSiteConfiguredRolesRequestUri(string subscriptionId, string resourceGroupName, string name) + internal RequestUriBuilder CreateCreateOrUpdateStaticSiteFunctionAppSettingsRequestUri(string subscriptionId, string resourceGroupName, string name, AppServiceConfigurationDictionary appSettings) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -3416,16 +3506,16 @@ internal RequestUriBuilder CreateListStaticSiteConfiguredRolesRequestUri(string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/listConfiguredRoles", false); + uri.AppendPath("/config/functionappsettings", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListStaticSiteConfiguredRolesRequest(string subscriptionId, string resourceGroupName, string name) + internal HttpMessage CreateCreateOrUpdateStaticSiteFunctionAppSettingsRequest(string subscriptionId, string resourceGroupName, string name, AppServiceConfigurationDictionary appSettings) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -3434,36 +3524,42 @@ internal HttpMessage CreateListStaticSiteConfiguredRolesRequest(string subscript uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/listConfiguredRoles", false); + uri.AppendPath("/config/functionappsettings", 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(appSettings, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Description for Lists the roles configured for the static site. + /// Description for Creates or updates the function app settings of a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. + /// The dictionary containing the static site function app settings to update. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListStaticSiteConfiguredRolesAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public async Task> CreateOrUpdateStaticSiteFunctionAppSettingsAsync(string subscriptionId, string resourceGroupName, string name, AppServiceConfigurationDictionary appSettings, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(appSettings, nameof(appSettings)); - using var message = CreateListStaticSiteConfiguredRolesRequest(subscriptionId, resourceGroupName, name); + using var message = CreateCreateOrUpdateStaticSiteFunctionAppSettingsRequest(subscriptionId, resourceGroupName, name, appSettings); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - StaticSiteStringList value = default; + AppServiceConfigurationDictionary value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StaticSiteStringList.DeserializeStaticSiteStringList(document.RootElement); + value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -3471,28 +3567,30 @@ public async Task> ListStaticSiteConfiguredRolesA } } - /// Description for Lists the roles configured for the static site. + /// Description for Creates or updates the function app settings of a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. + /// The dictionary containing the static site function app settings to update. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListStaticSiteConfiguredRoles(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public Response CreateOrUpdateStaticSiteFunctionAppSettings(string subscriptionId, string resourceGroupName, string name, AppServiceConfigurationDictionary appSettings, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(appSettings, nameof(appSettings)); - using var message = CreateListStaticSiteConfiguredRolesRequest(subscriptionId, resourceGroupName, name); + using var message = CreateCreateOrUpdateStaticSiteFunctionAppSettingsRequest(subscriptionId, resourceGroupName, name, appSettings); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - StaticSiteStringList value = default; + AppServiceConfigurationDictionary value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StaticSiteStringList.DeserializeStaticSiteStringList(document.RootElement); + value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -3500,7 +3598,7 @@ public Response ListStaticSiteConfiguredRoles(string subsc } } - internal RequestUriBuilder CreateListStaticSiteFunctionAppSettingsRequestUri(string subscriptionId, string resourceGroupName, string name) + internal RequestUriBuilder CreateCreateUserRolesInvitationLinkRequestUri(string subscriptionId, string resourceGroupName, string name, StaticSiteUserInvitationContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -3510,12 +3608,12 @@ internal RequestUriBuilder CreateListStaticSiteFunctionAppSettingsRequestUri(str uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/listFunctionAppSettings", false); + uri.AppendPath("/createUserInvitation", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListStaticSiteFunctionAppSettingsRequest(string subscriptionId, string resourceGroupName, string name) + internal HttpMessage CreateCreateUserRolesInvitationLinkRequest(string subscriptionId, string resourceGroupName, string name, StaticSiteUserInvitationContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -3528,36 +3626,42 @@ internal HttpMessage CreateListStaticSiteFunctionAppSettingsRequest(string subsc uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/listFunctionAppSettings", false); + uri.AppendPath("/createUserInvitation", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; _userAgent.Apply(message); return message; } - /// Description for Gets the application settings of a static site. + /// Description for Creates an invitation link for a user with the role. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. + /// The to use. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListStaticSiteFunctionAppSettingsAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public async Task> CreateUserRolesInvitationLinkAsync(string subscriptionId, string resourceGroupName, string name, StaticSiteUserInvitationContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateListStaticSiteFunctionAppSettingsRequest(subscriptionId, resourceGroupName, name); + using var message = CreateCreateUserRolesInvitationLinkRequest(subscriptionId, resourceGroupName, name, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - AppServiceConfigurationDictionary value = default; + StaticSiteUserInvitationResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + value = StaticSiteUserInvitationResult.DeserializeStaticSiteUserInvitationResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -3565,28 +3669,30 @@ public async Task> ListStaticSiteFun } } - /// Description for Gets the application settings of a static site. + /// Description for Creates an invitation link for a user with the role. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. + /// The to use. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListStaticSiteFunctionAppSettings(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public Response CreateUserRolesInvitationLink(string subscriptionId, string resourceGroupName, string name, StaticSiteUserInvitationContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateListStaticSiteFunctionAppSettingsRequest(subscriptionId, resourceGroupName, name); + using var message = CreateCreateUserRolesInvitationLinkRequest(subscriptionId, resourceGroupName, name, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - AppServiceConfigurationDictionary value = default; + StaticSiteUserInvitationResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + value = StaticSiteUserInvitationResult.DeserializeStaticSiteUserInvitationResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -3594,7 +3700,7 @@ public Response ListStaticSiteFunctionAppSett } } - internal RequestUriBuilder CreateListStaticSiteSecretsRequestUri(string subscriptionId, string resourceGroupName, string name) + internal RequestUriBuilder CreateListStaticSiteCustomDomainsRequestUri(string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -3604,16 +3710,16 @@ internal RequestUriBuilder CreateListStaticSiteSecretsRequestUri(string subscrip uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/listSecrets", false); + uri.AppendPath("/customDomains", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListStaticSiteSecretsRequest(string subscriptionId, string resourceGroupName, string name) + internal HttpMessage CreateListStaticSiteCustomDomainsRequest(string subscriptionId, string resourceGroupName, string name) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -3622,7 +3728,7 @@ internal HttpMessage CreateListStaticSiteSecretsRequest(string subscriptionId, s uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/listSecrets", false); + uri.AppendPath("/customDomains", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -3630,28 +3736,28 @@ internal HttpMessage CreateListStaticSiteSecretsRequest(string subscriptionId, s return message; } - /// Description for Lists the secrets for an existing static site. + /// Description for Gets all static site custom domains for a particular static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. - /// Name of the static site. + /// Name of the static site resource to search in. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListStaticSiteSecretsAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public async Task> ListStaticSiteCustomDomainsAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListStaticSiteSecretsRequest(subscriptionId, resourceGroupName, name); + using var message = CreateListStaticSiteCustomDomainsRequest(subscriptionId, resourceGroupName, name); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - AppServiceConfigurationDictionary value = default; + StaticSiteCustomDomainOverviewListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + value = StaticSiteCustomDomainOverviewListResult.DeserializeStaticSiteCustomDomainOverviewListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -3659,28 +3765,28 @@ public async Task> ListStaticSiteSec } } - /// Description for Lists the secrets for an existing static site. + /// Description for Gets all static site custom domains for a particular static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. - /// Name of the static site. + /// Name of the static site resource to search in. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListStaticSiteSecrets(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public Response ListStaticSiteCustomDomains(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListStaticSiteSecretsRequest(subscriptionId, resourceGroupName, name); + using var message = CreateListStaticSiteCustomDomainsRequest(subscriptionId, resourceGroupName, name); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - AppServiceConfigurationDictionary value = default; + StaticSiteCustomDomainOverviewListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + value = StaticSiteCustomDomainOverviewListResult.DeserializeStaticSiteCustomDomainOverviewListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -3688,7 +3794,7 @@ public Response ListStaticSiteSecrets(string } } - internal RequestUriBuilder CreateGetPrivateEndpointConnectionListRequestUri(string subscriptionId, string resourceGroupName, string name) + internal RequestUriBuilder CreateGetStaticSiteCustomDomainRequestUri(string subscriptionId, string resourceGroupName, string name, string domainName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -3698,12 +3804,13 @@ internal RequestUriBuilder CreateGetPrivateEndpointConnectionListRequestUri(stri uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/privateEndpointConnections", false); + uri.AppendPath("/customDomains/", false); + uri.AppendPath(domainName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetPrivateEndpointConnectionListRequest(string subscriptionId, string resourceGroupName, string name) + internal HttpMessage CreateGetStaticSiteCustomDomainRequest(string subscriptionId, string resourceGroupName, string name, string domainName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -3716,7 +3823,8 @@ internal HttpMessage CreateGetPrivateEndpointConnectionListRequest(string subscr uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/privateEndpointConnections", false); + uri.AppendPath("/customDomains/", false); + uri.AppendPath(domainName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -3724,65 +3832,73 @@ internal HttpMessage CreateGetPrivateEndpointConnectionListRequest(string subscr return message; } - /// Description for Gets the list of private endpoint connections associated with a static site. + /// Description for Gets an existing custom domain for a particular static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. - /// Name of the static site. + /// Name of the static site resource to search in. + /// The custom domain name. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetPrivateEndpointConnectionListAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetStaticSiteCustomDomainAsync(string subscriptionId, string resourceGroupName, string name, string domainName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); - using var message = CreateGetPrivateEndpointConnectionListRequest(subscriptionId, resourceGroupName, name); + using var message = CreateGetStaticSiteCustomDomainRequest(subscriptionId, resourceGroupName, name, domainName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - RemotePrivateEndpointConnectionListResult value = default; + StaticSiteCustomDomainOverviewData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = RemotePrivateEndpointConnectionListResult.DeserializeRemotePrivateEndpointConnectionListResult(document.RootElement); + value = StaticSiteCustomDomainOverviewData.DeserializeStaticSiteCustomDomainOverviewData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((StaticSiteCustomDomainOverviewData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Description for Gets the list of private endpoint connections associated with a static site. + /// Description for Gets an existing custom domain for a particular static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. - /// Name of the static site. + /// Name of the static site resource to search in. + /// The custom domain name. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response GetPrivateEndpointConnectionList(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetStaticSiteCustomDomain(string subscriptionId, string resourceGroupName, string name, string domainName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); - using var message = CreateGetPrivateEndpointConnectionListRequest(subscriptionId, resourceGroupName, name); + using var message = CreateGetStaticSiteCustomDomainRequest(subscriptionId, resourceGroupName, name, domainName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - RemotePrivateEndpointConnectionListResult value = default; + StaticSiteCustomDomainOverviewData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = RemotePrivateEndpointConnectionListResult.DeserializeRemotePrivateEndpointConnectionListResult(document.RootElement); + value = StaticSiteCustomDomainOverviewData.DeserializeStaticSiteCustomDomainOverviewData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((StaticSiteCustomDomainOverviewData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetPrivateEndpointConnectionRequestUri(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName) + internal RequestUriBuilder CreateCreateOrUpdateStaticSiteCustomDomainRequestUri(string subscriptionId, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -3792,17 +3908,17 @@ internal RequestUriBuilder CreateGetPrivateEndpointConnectionRequestUri(string s uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/privateEndpointConnections/", false); - uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendPath("/customDomains/", false); + uri.AppendPath(domainName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetPrivateEndpointConnectionRequest(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName) + internal HttpMessage CreateCreateOrUpdateStaticSiteCustomDomainRequest(string subscriptionId, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -3811,82 +3927,78 @@ internal HttpMessage CreateGetPrivateEndpointConnectionRequest(string subscripti uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/privateEndpointConnections/", false); - uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendPath("/customDomains/", false); + uri.AppendPath(domainName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; _userAgent.Apply(message); return message; } - /// Description for Gets a private endpoint connection. + /// Description for Creates a new static site custom domain in an existing resource group and static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// Name of the private endpoint connection. + /// The custom domain to create. + /// A JSON representation of the static site custom domain request properties. See example. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetPrivateEndpointConnectionAsync(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateStaticSiteCustomDomainAsync(string subscriptionId, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateGetPrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName); + using var message = CreateCreateOrUpdateStaticSiteCustomDomainRequest(subscriptionId, resourceGroupName, name, domainName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - RemotePrivateEndpointConnectionARMResourceData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = RemotePrivateEndpointConnectionARMResourceData.DeserializeRemotePrivateEndpointConnectionARMResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((RemotePrivateEndpointConnectionARMResourceData)null, message.Response); + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Description for Gets a private endpoint connection. + /// Description for Creates a new static site custom domain in an existing resource group and static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// Name of the private endpoint connection. + /// The custom domain to create. + /// A JSON representation of the static site custom domain request properties. See example. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetPrivateEndpointConnection(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdateStaticSiteCustomDomain(string subscriptionId, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateGetPrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName); + using var message = CreateCreateOrUpdateStaticSiteCustomDomainRequest(subscriptionId, resourceGroupName, name, domainName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - RemotePrivateEndpointConnectionARMResourceData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = RemotePrivateEndpointConnectionARMResourceData.DeserializeRemotePrivateEndpointConnectionARMResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((RemotePrivateEndpointConnectionARMResourceData)null, message.Response); + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateApproveOrRejectPrivateEndpointConnectionRequestUri(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info) + internal RequestUriBuilder CreateDeleteStaticSiteCustomDomainRequestUri(string subscriptionId, string resourceGroupName, string name, string domainName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -3896,17 +4008,17 @@ internal RequestUriBuilder CreateApproveOrRejectPrivateEndpointConnectionRequest uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/privateEndpointConnections/", false); - uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendPath("/customDomains/", false); + uri.AppendPath(domainName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateApproveOrRejectPrivateEndpointConnectionRequest(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info) + internal HttpMessage CreateDeleteStaticSiteCustomDomainRequest(string subscriptionId, string resourceGroupName, string name, string domainName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -3915,37 +4027,31 @@ internal HttpMessage CreateApproveOrRejectPrivateEndpointConnectionRequest(strin uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/privateEndpointConnections/", false); - uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendPath("/customDomains/", false); + uri.AppendPath(domainName, true); 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(info, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Description for Approves or rejects a private endpoint connection. + /// Description for Deletes a custom domain. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// Name of the private endpoint connection. - /// Request body. + /// The custom domain to delete. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task ApproveOrRejectPrivateEndpointConnectionAsync(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteStaticSiteCustomDomainAsync(string subscriptionId, string resourceGroupName, string name, string domainName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); - using var message = CreateApproveOrRejectPrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName, info); + using var message = CreateDeleteStaticSiteCustomDomainRequest(subscriptionId, resourceGroupName, name, domainName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -3957,24 +4063,22 @@ public async Task ApproveOrRejectPrivateEndpointConnectionAsync(string } } - /// Description for Approves or rejects a private endpoint connection. + /// Description for Deletes a custom domain. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// Name of the private endpoint connection. - /// Request body. + /// The custom domain to delete. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response ApproveOrRejectPrivateEndpointConnection(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response DeleteStaticSiteCustomDomain(string subscriptionId, string resourceGroupName, string name, string domainName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); - using var message = CreateApproveOrRejectPrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName, info); + using var message = CreateDeleteStaticSiteCustomDomainRequest(subscriptionId, resourceGroupName, name, domainName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -3986,7 +4090,7 @@ public Response ApproveOrRejectPrivateEndpointConnection(string subscriptionId, } } - internal RequestUriBuilder CreateDeletePrivateEndpointConnectionRequestUri(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName) + internal RequestUriBuilder CreateValidateCustomDomainCanBeAddedToStaticSiteRequestUri(string subscriptionId, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -3996,17 +4100,18 @@ internal RequestUriBuilder CreateDeletePrivateEndpointConnectionRequestUri(strin uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/privateEndpointConnections/", false); - uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendPath("/customDomains/", false); + uri.AppendPath(domainName, true); + uri.AppendPath("/validate", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDeletePrivateEndpointConnectionRequest(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName) + internal HttpMessage CreateValidateCustomDomainCanBeAddedToStaticSiteRequest(string subscriptionId, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -4015,72 +4120,79 @@ internal HttpMessage CreateDeletePrivateEndpointConnectionRequest(string subscri uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/privateEndpointConnections/", false); - uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendPath("/customDomains/", false); + uri.AppendPath(domainName, true); + uri.AppendPath("/validate", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; _userAgent.Apply(message); return message; } - /// Description for Deletes a private endpoint connection. + /// Description for Validates a particular custom domain can be added to a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// Name of the private endpoint connection. + /// The custom domain to validate. + /// A JSON representation of the static site custom domain request properties. See example. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DeletePrivateEndpointConnectionAsync(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task ValidateCustomDomainCanBeAddedToStaticSiteAsync(string subscriptionId, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateDeletePrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName); + using var message = CreateValidateCustomDomainCanBeAddedToStaticSiteRequest(subscriptionId, resourceGroupName, name, domainName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Description for Deletes a private endpoint connection. + /// Description for Validates a particular custom domain can be added to a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// Name of the private endpoint connection. + /// The custom domain to validate. + /// A JSON representation of the static site custom domain request properties. See example. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response DeletePrivateEndpointConnection(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ValidateCustomDomainCanBeAddedToStaticSite(string subscriptionId, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + Argument.AssertNotNullOrEmpty(domainName, nameof(domainName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateDeletePrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName); + using var message = CreateValidateCustomDomainCanBeAddedToStaticSiteRequest(subscriptionId, resourceGroupName, name, domainName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetPrivateLinkResourcesRequestUri(string subscriptionId, string resourceGroupName, string name) + internal RequestUriBuilder CreateGetDatabaseConnectionsRequestUri(string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -4090,12 +4202,12 @@ internal RequestUriBuilder CreateGetPrivateLinkResourcesRequestUri(string subscr uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/privateLinkResources", false); + uri.AppendPath("/databaseConnections", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetPrivateLinkResourcesRequest(string subscriptionId, string resourceGroupName, string name) + internal HttpMessage CreateGetDatabaseConnectionsRequest(string subscriptionId, string resourceGroupName, string name) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -4108,7 +4220,7 @@ internal HttpMessage CreateGetPrivateLinkResourcesRequest(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/privateLinkResources", false); + uri.AppendPath("/databaseConnections", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -4116,28 +4228,28 @@ internal HttpMessage CreateGetPrivateLinkResourcesRequest(string subscriptionId, return message; } - /// Description for Gets the private link resources. + /// Returns overviews of database connections for a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. - /// Name of the site. + /// Name of the static site. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> GetPrivateLinkResourcesAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public async Task> GetDatabaseConnectionsAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateGetPrivateLinkResourcesRequest(subscriptionId, resourceGroupName, name); + using var message = CreateGetDatabaseConnectionsRequest(subscriptionId, resourceGroupName, name); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - PrivateLinkResourcesWrapper value = default; + DatabaseConnectionCollection value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = PrivateLinkResourcesWrapper.DeserializePrivateLinkResourcesWrapper(document.RootElement); + value = DatabaseConnectionCollection.DeserializeDatabaseConnectionCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -4145,28 +4257,28 @@ public async Task> GetPrivateLinkResources } } - /// Description for Gets the private link resources. + /// Returns overviews of database connections for a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. - /// Name of the site. + /// Name of the static site. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response GetPrivateLinkResources(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public Response GetDatabaseConnections(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateGetPrivateLinkResourcesRequest(subscriptionId, resourceGroupName, name); + using var message = CreateGetDatabaseConnectionsRequest(subscriptionId, resourceGroupName, name); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - PrivateLinkResourcesWrapper value = default; + DatabaseConnectionCollection value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = PrivateLinkResourcesWrapper.DeserializePrivateLinkResourcesWrapper(document.RootElement); + value = DatabaseConnectionCollection.DeserializeDatabaseConnectionCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -4174,7 +4286,7 @@ public Response GetPrivateLinkResources(string subs } } - internal RequestUriBuilder CreateResetStaticSiteApiKeyRequestUri(string subscriptionId, string resourceGroupName, string name, StaticSiteResetContent content) + internal RequestUriBuilder CreateGetDatabaseConnectionRequestUri(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -4184,16 +4296,17 @@ internal RequestUriBuilder CreateResetStaticSiteApiKeyRequestUri(string subscrip uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/resetapikey", false); + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateResetStaticSiteApiKeyRequest(string subscriptionId, string resourceGroupName, string name, StaticSiteResetContent content) + internal HttpMessage CreateGetDatabaseConnectionRequest(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -4202,71 +4315,82 @@ internal HttpMessage CreateResetStaticSiteApiKeyRequest(string subscriptionId, s uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/resetapikey", false); + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); - request.Content = content0; _userAgent.Apply(message); return message; } - /// Description for Resets the api key for an existing static site. + /// Returns overview of a database connection for a static site by name. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// The to use. + /// Name of the database connection. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task ResetStaticSiteApiKeyAsync(string subscriptionId, string resourceGroupName, string name, StaticSiteResetContent content, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetDatabaseConnectionAsync(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); - using var message = CreateResetStaticSiteApiKeyRequest(subscriptionId, resourceGroupName, name, content); + using var message = CreateGetDatabaseConnectionRequest(subscriptionId, resourceGroupName, name, databaseConnectionName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - return message.Response; + { + StaticSiteDatabaseConnectionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((StaticSiteDatabaseConnectionData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Description for Resets the api key for an existing static site. + /// Returns overview of a database connection for a static site by name. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// The to use. + /// Name of the database connection. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ResetStaticSiteApiKey(string subscriptionId, string resourceGroupName, string name, StaticSiteResetContent content, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetDatabaseConnection(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); - using var message = CreateResetStaticSiteApiKeyRequest(subscriptionId, resourceGroupName, name, content); + using var message = CreateGetDatabaseConnectionRequest(subscriptionId, resourceGroupName, name, databaseConnectionName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - return message.Response; + { + StaticSiteDatabaseConnectionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((StaticSiteDatabaseConnectionData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetUserProvidedFunctionAppsForStaticSiteRequestUri(string subscriptionId, string resourceGroupName, string name) + internal RequestUriBuilder CreateCreateOrUpdateDatabaseConnectionRequestUri(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName, StaticSiteDatabaseConnectionData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -4276,16 +4400,17 @@ internal RequestUriBuilder CreateGetUserProvidedFunctionAppsForStaticSiteRequest uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/userProvidedFunctionApps", false); + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetUserProvidedFunctionAppsForStaticSiteRequest(string subscriptionId, string resourceGroupName, string name) + internal HttpMessage CreateCreateOrUpdateDatabaseConnectionRequest(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName, StaticSiteDatabaseConnectionData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -4294,36 +4419,45 @@ internal HttpMessage CreateGetUserProvidedFunctionAppsForStaticSiteRequest(strin uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/userProvidedFunctionApps", false); + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); 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(data, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Description for Gets the details of the user provided function apps registered with a static site. + /// Description for Create or update a database connection for a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. + /// Name of the database connection. + /// A JSON representation of the database connection request properties. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetUserProvidedFunctionAppsForStaticSiteAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateDatabaseConnectionAsync(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName, StaticSiteDatabaseConnectionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetUserProvidedFunctionAppsForStaticSiteRequest(subscriptionId, resourceGroupName, name); + using var message = CreateCreateOrUpdateDatabaseConnectionRequest(subscriptionId, resourceGroupName, name, databaseConnectionName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - StaticSiteUserProvidedFunctionAppsListResult value = default; + StaticSiteDatabaseConnectionData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StaticSiteUserProvidedFunctionAppsListResult.DeserializeStaticSiteUserProvidedFunctionAppsListResult(document.RootElement); + value = StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -4331,28 +4465,32 @@ public async Task> GetUse } } - /// Description for Gets the details of the user provided function apps registered with a static site. + /// Description for Create or update a database connection for a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. + /// Name of the database connection. + /// A JSON representation of the database connection request properties. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response GetUserProvidedFunctionAppsForStaticSite(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdateDatabaseConnection(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName, StaticSiteDatabaseConnectionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetUserProvidedFunctionAppsForStaticSiteRequest(subscriptionId, resourceGroupName, name); + using var message = CreateCreateOrUpdateDatabaseConnectionRequest(subscriptionId, resourceGroupName, name, databaseConnectionName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - StaticSiteUserProvidedFunctionAppsListResult value = default; + StaticSiteDatabaseConnectionData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StaticSiteUserProvidedFunctionAppsListResult.DeserializeStaticSiteUserProvidedFunctionAppsListResult(document.RootElement); + value = StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -4360,7 +4498,7 @@ public Response GetUserProvidedFun } } - internal RequestUriBuilder CreateGetUserProvidedFunctionAppForStaticSiteRequestUri(string subscriptionId, string resourceGroupName, string name, string functionAppName) + internal RequestUriBuilder CreateDeleteDatabaseConnectionRequestUri(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -4370,17 +4508,17 @@ internal RequestUriBuilder CreateGetUserProvidedFunctionAppForStaticSiteRequestU uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/userProvidedFunctionApps/", false); - uri.AppendPath(functionAppName, true); + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetUserProvidedFunctionAppForStaticSiteRequest(string subscriptionId, string resourceGroupName, string name, string functionAppName) + internal HttpMessage CreateDeleteDatabaseConnectionRequest(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -4389,8 +4527,8 @@ internal HttpMessage CreateGetUserProvidedFunctionAppForStaticSiteRequest(string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/userProvidedFunctionApps/", false); - uri.AppendPath(functionAppName, true); + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -4398,73 +4536,61 @@ internal HttpMessage CreateGetUserProvidedFunctionAppForStaticSiteRequest(string return message; } - /// Description for Gets the details of the user provided function app registered with a static site. + /// Delete a database connection for a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// Name of the function app registered with the static site. + /// Name of the database connection. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetUserProvidedFunctionAppForStaticSiteAsync(string subscriptionId, string resourceGroupName, string name, string functionAppName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteDatabaseConnectionAsync(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); - using var message = CreateGetUserProvidedFunctionAppForStaticSiteRequest(subscriptionId, resourceGroupName, name, functionAppName); + using var message = CreateDeleteDatabaseConnectionRequest(subscriptionId, resourceGroupName, name, databaseConnectionName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - StaticSiteUserProvidedFunctionAppData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StaticSiteUserProvidedFunctionAppData.DeserializeStaticSiteUserProvidedFunctionAppData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((StaticSiteUserProvidedFunctionAppData)null, message.Response); + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Description for Gets the details of the user provided function app registered with a static site. + /// Delete a database connection for a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// Name of the function app registered with the static site. + /// Name of the database connection. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetUserProvidedFunctionAppForStaticSite(string subscriptionId, string resourceGroupName, string name, string functionAppName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response DeleteDatabaseConnection(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); - using var message = CreateGetUserProvidedFunctionAppForStaticSiteRequest(subscriptionId, resourceGroupName, name, functionAppName); + using var message = CreateDeleteDatabaseConnectionRequest(subscriptionId, resourceGroupName, name, databaseConnectionName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - StaticSiteUserProvidedFunctionAppData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StaticSiteUserProvidedFunctionAppData.DeserializeStaticSiteUserProvidedFunctionAppData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((StaticSiteUserProvidedFunctionAppData)null, message.Response); - default: + case 204: + return message.Response; + default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateRegisterUserProvidedFunctionAppWithStaticSiteRequestUri(string subscriptionId, string resourceGroupName, string name, string functionAppName, StaticSiteUserProvidedFunctionAppData data, bool? isForced) + internal RequestUriBuilder CreateUpdateDatabaseConnectionRequestUri(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName, StaticSiteDatabaseConnectionPatchContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -4474,21 +4600,17 @@ internal RequestUriBuilder CreateRegisterUserProvidedFunctionAppWithStaticSiteRe uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/userProvidedFunctionApps/", false); - uri.AppendPath(functionAppName, true); - if (isForced != null) - { - uri.AppendQuery("isForced", isForced.Value, true); - } + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateRegisterUserProvidedFunctionAppWithStaticSiteRequest(string subscriptionId, string resourceGroupName, string name, string functionAppName, StaticSiteUserProvidedFunctionAppData data, bool? isForced) + internal HttpMessage CreateUpdateDatabaseConnectionRequest(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName, StaticSiteDatabaseConnectionPatchContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -4497,84 +4619,86 @@ internal HttpMessage CreateRegisterUserProvidedFunctionAppWithStaticSiteRequest( uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/userProvidedFunctionApps/", false); - uri.AppendPath(functionAppName, true); - if (isForced != null) - { - uri.AppendQuery("isForced", isForced.Value, true); - } + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); 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(data, ModelSerializationExtensions.WireOptions); - request.Content = content; + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; _userAgent.Apply(message); return message; } - /// Description for Register a user provided function app with a static site. + /// Description for Create or update a database connection for a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// Name of the function app to register with the static site. - /// A JSON representation of the user provided function app properties. See example. - /// Specify <code>true</code> to force the update of the auth configuration on the function app even if an AzureStaticWebApps provider is already configured on the function app. The default is <code>false</code>. + /// Name of the database connection. + /// A JSON representation of the database connection request properties. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task RegisterUserProvidedFunctionAppWithStaticSiteAsync(string subscriptionId, string resourceGroupName, string name, string functionAppName, StaticSiteUserProvidedFunctionAppData data, bool? isForced = null, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> UpdateDatabaseConnectionAsync(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName, StaticSiteDatabaseConnectionPatchContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateRegisterUserProvidedFunctionAppWithStaticSiteRequest(subscriptionId, resourceGroupName, name, functionAppName, data, isForced); + using var message = CreateUpdateDatabaseConnectionRequest(subscriptionId, resourceGroupName, name, databaseConnectionName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + StaticSiteDatabaseConnectionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Description for Register a user provided function app with a static site. + /// Description for Create or update a database connection for a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// Name of the function app to register with the static site. - /// A JSON representation of the user provided function app properties. See example. - /// Specify <code>true</code> to force the update of the auth configuration on the function app even if an AzureStaticWebApps provider is already configured on the function app. The default is <code>false</code>. + /// Name of the database connection. + /// A JSON representation of the database connection request properties. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response RegisterUserProvidedFunctionAppWithStaticSite(string subscriptionId, string resourceGroupName, string name, string functionAppName, StaticSiteUserProvidedFunctionAppData data, bool? isForced = null, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response UpdateDatabaseConnection(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName, StaticSiteDatabaseConnectionPatchContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateRegisterUserProvidedFunctionAppWithStaticSiteRequest(subscriptionId, resourceGroupName, name, functionAppName, data, isForced); + using var message = CreateUpdateDatabaseConnectionRequest(subscriptionId, resourceGroupName, name, databaseConnectionName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + StaticSiteDatabaseConnectionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDetachUserProvidedFunctionAppFromStaticSiteRequestUri(string subscriptionId, string resourceGroupName, string name, string functionAppName) + internal RequestUriBuilder CreateGetDatabaseConnectionWithDetailsRequestUri(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -4584,17 +4708,18 @@ internal RequestUriBuilder CreateDetachUserProvidedFunctionAppFromStaticSiteRequ uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/userProvidedFunctionApps/", false); - uri.AppendPath(functionAppName, true); + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); + uri.AppendPath("/show", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDetachUserProvidedFunctionAppFromStaticSiteRequest(string subscriptionId, string resourceGroupName, string name, string functionAppName) + internal HttpMessage CreateGetDatabaseConnectionWithDetailsRequest(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -4603,8 +4728,9 @@ internal HttpMessage CreateDetachUserProvidedFunctionAppFromStaticSiteRequest(st uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/userProvidedFunctionApps/", false); - uri.AppendPath(functionAppName, true); + uri.AppendPath("/databaseConnections/", false); + uri.AppendPath(databaseConnectionName, true); + uri.AppendPath("/show", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -4612,61 +4738,69 @@ internal HttpMessage CreateDetachUserProvidedFunctionAppFromStaticSiteRequest(st return message; } - /// Description for Detach the user provided function app from the static site. + /// Returns details of a database connection for a static site by name. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// Name of the function app registered with the static site. + /// Name of the database connection. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DetachUserProvidedFunctionAppFromStaticSiteAsync(string subscriptionId, string resourceGroupName, string name, string functionAppName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetDatabaseConnectionWithDetailsAsync(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); - using var message = CreateDetachUserProvidedFunctionAppFromStaticSiteRequest(subscriptionId, resourceGroupName, name, functionAppName); + using var message = CreateGetDatabaseConnectionWithDetailsRequest(subscriptionId, resourceGroupName, name, databaseConnectionName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 204: - return message.Response; + { + StaticSiteDatabaseConnectionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Description for Detach the user provided function app from the static site. + /// Returns details of a database connection for a static site by name. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// Name of the function app registered with the static site. + /// Name of the database connection. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response DetachUserProvidedFunctionAppFromStaticSite(string subscriptionId, string resourceGroupName, string name, string functionAppName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetDatabaseConnectionWithDetails(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); - using var message = CreateDetachUserProvidedFunctionAppFromStaticSiteRequest(subscriptionId, resourceGroupName, name, functionAppName); + using var message = CreateGetDatabaseConnectionWithDetailsRequest(subscriptionId, resourceGroupName, name, databaseConnectionName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 204: - return message.Response; + { + StaticSiteDatabaseConnectionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateZipDeploymentForStaticSiteRequestUri(string subscriptionId, string resourceGroupName, string name, StaticSiteZipDeployment staticSiteZipDeploymentEnvelope) + internal RequestUriBuilder CreateDetachStaticSiteRequestUri(string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -4676,12 +4810,12 @@ internal RequestUriBuilder CreateCreateZipDeploymentForStaticSiteRequestUri(stri uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/zipdeploy", false); + uri.AppendPath("/detach", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateZipDeploymentForStaticSiteRequest(string subscriptionId, string resourceGroupName, string name, StaticSiteZipDeployment staticSiteZipDeploymentEnvelope) + internal HttpMessage CreateDetachStaticSiteRequest(string subscriptionId, string resourceGroupName, string name) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -4694,34 +4828,28 @@ internal HttpMessage CreateCreateZipDeploymentForStaticSiteRequest(string subscr uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); uri.AppendPath(name, true); - uri.AppendPath("/zipdeploy", false); + uri.AppendPath("/detach", 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(staticSiteZipDeploymentEnvelope, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Description for Deploys zipped content to a static site. + /// Description for Detaches a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. - /// Name of the static site. - /// A JSON representation of the StaticSiteZipDeployment properties. See example. + /// Name of the static site to detach. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task CreateZipDeploymentForStaticSiteAsync(string subscriptionId, string resourceGroupName, string name, StaticSiteZipDeployment staticSiteZipDeploymentEnvelope, CancellationToken cancellationToken = default) + public async Task DetachStaticSiteAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(staticSiteZipDeploymentEnvelope, nameof(staticSiteZipDeploymentEnvelope)); - using var message = CreateCreateZipDeploymentForStaticSiteRequest(subscriptionId, resourceGroupName, name, staticSiteZipDeploymentEnvelope); + using var message = CreateDetachStaticSiteRequest(subscriptionId, resourceGroupName, name); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -4733,22 +4861,20 @@ public async Task CreateZipDeploymentForStaticSiteAsync(string subscri } } - /// Description for Deploys zipped content to a static site. + /// Description for Detaches a static site. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. - /// Name of the static site. - /// A JSON representation of the StaticSiteZipDeployment properties. See example. + /// Name of the static site to detach. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response CreateZipDeploymentForStaticSite(string subscriptionId, string resourceGroupName, string name, StaticSiteZipDeployment staticSiteZipDeploymentEnvelope, CancellationToken cancellationToken = default) + public Response DetachStaticSite(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(staticSiteZipDeploymentEnvelope, nameof(staticSiteZipDeploymentEnvelope)); - using var message = CreateCreateZipDeploymentForStaticSiteRequest(subscriptionId, resourceGroupName, name, staticSiteZipDeploymentEnvelope); + using var message = CreateDetachStaticSiteRequest(subscriptionId, resourceGroupName, name); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -4760,15 +4886,3283 @@ public Response CreateZipDeploymentForStaticSite(string subscriptionId, string r } } - internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId) + internal RequestUriBuilder CreateListStaticSiteFunctionsRequestUri(string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/functions", false); + uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId) + internal HttpMessage CreateListStaticSiteFunctionsRequest(string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/functions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Gets the functions of a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListStaticSiteFunctionsAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListStaticSiteFunctionsRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + StaticSiteFunctionOverviewListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteFunctionOverviewListResult.DeserializeStaticSiteFunctionOverviewListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Gets the functions of a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListStaticSiteFunctions(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListStaticSiteFunctionsRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + StaticSiteFunctionOverviewListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteFunctionOverviewListResult.DeserializeStaticSiteFunctionOverviewListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListStaticSiteAppSettingsRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/listAppSettings", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListStaticSiteAppSettingsRequest(string subscriptionId, string resourceGroupName, string name) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/listAppSettings", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Gets the application settings of a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListStaticSiteAppSettingsAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListStaticSiteAppSettingsRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AppServiceConfigurationDictionary value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Gets the application settings of a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListStaticSiteAppSettings(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListStaticSiteAppSettingsRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AppServiceConfigurationDictionary value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListStaticSiteConfiguredRolesRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/listConfiguredRoles", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListStaticSiteConfiguredRolesRequest(string subscriptionId, string resourceGroupName, string name) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/listConfiguredRoles", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Lists the roles configured for the static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListStaticSiteConfiguredRolesAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListStaticSiteConfiguredRolesRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + StaticSiteStringList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteStringList.DeserializeStaticSiteStringList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Lists the roles configured for the static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListStaticSiteConfiguredRoles(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListStaticSiteConfiguredRolesRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + StaticSiteStringList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteStringList.DeserializeStaticSiteStringList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListStaticSiteFunctionAppSettingsRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/listFunctionAppSettings", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListStaticSiteFunctionAppSettingsRequest(string subscriptionId, string resourceGroupName, string name) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/listFunctionAppSettings", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Gets the application settings of a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListStaticSiteFunctionAppSettingsAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListStaticSiteFunctionAppSettingsRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AppServiceConfigurationDictionary value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Gets the application settings of a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListStaticSiteFunctionAppSettings(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListStaticSiteFunctionAppSettingsRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AppServiceConfigurationDictionary value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListStaticSiteSecretsRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/listSecrets", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListStaticSiteSecretsRequest(string subscriptionId, string resourceGroupName, string name) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/listSecrets", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Lists the secrets for an existing static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListStaticSiteSecretsAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListStaticSiteSecretsRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AppServiceConfigurationDictionary value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Lists the secrets for an existing static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListStaticSiteSecrets(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListStaticSiteSecretsRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AppServiceConfigurationDictionary value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AppServiceConfigurationDictionary.DeserializeAppServiceConfigurationDictionary(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetPrivateEndpointConnectionListRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/privateEndpointConnections", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetPrivateEndpointConnectionListRequest(string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/privateEndpointConnections", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Gets the list of private endpoint connections associated with a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetPrivateEndpointConnectionListAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetPrivateEndpointConnectionListRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RemotePrivateEndpointConnectionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = RemotePrivateEndpointConnectionListResult.DeserializeRemotePrivateEndpointConnectionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Gets the list of private endpoint connections associated with a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetPrivateEndpointConnectionList(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetPrivateEndpointConnectionListRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RemotePrivateEndpointConnectionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = RemotePrivateEndpointConnectionListResult.DeserializeRemotePrivateEndpointConnectionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetPrivateEndpointConnectionRequestUri(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/privateEndpointConnections/", false); + uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetPrivateEndpointConnectionRequest(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/privateEndpointConnections/", false); + uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Gets a private endpoint connection. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the private endpoint connection. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetPrivateEndpointConnectionAsync(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + + using var message = CreateGetPrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RemotePrivateEndpointConnectionARMResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = RemotePrivateEndpointConnectionARMResourceData.DeserializeRemotePrivateEndpointConnectionARMResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((RemotePrivateEndpointConnectionARMResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Gets a private endpoint connection. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the private endpoint connection. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetPrivateEndpointConnection(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + + using var message = CreateGetPrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RemotePrivateEndpointConnectionARMResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = RemotePrivateEndpointConnectionARMResourceData.DeserializeRemotePrivateEndpointConnectionARMResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((RemotePrivateEndpointConnectionARMResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateApproveOrRejectPrivateEndpointConnectionRequestUri(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/privateEndpointConnections/", false); + uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateApproveOrRejectPrivateEndpointConnectionRequest(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/privateEndpointConnections/", false); + uri.AppendPath(privateEndpointConnectionName, true); + 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(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Description for Approves or rejects a private endpoint connection. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the private endpoint connection. + /// Request body. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task ApproveOrRejectPrivateEndpointConnectionAsync(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateApproveOrRejectPrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Approves or rejects a private endpoint connection. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the private endpoint connection. + /// Request body. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ApproveOrRejectPrivateEndpointConnection(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateApproveOrRejectPrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeletePrivateEndpointConnectionRequestUri(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/privateEndpointConnections/", false); + uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeletePrivateEndpointConnectionRequest(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/privateEndpointConnections/", false); + uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Deletes a private endpoint connection. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the private endpoint connection. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeletePrivateEndpointConnectionAsync(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + + using var message = CreateDeletePrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Deletes a private endpoint connection. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the private endpoint connection. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response DeletePrivateEndpointConnection(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + + using var message = CreateDeletePrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetPrivateLinkResourcesRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/privateLinkResources", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetPrivateLinkResourcesRequest(string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/privateLinkResources", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Gets the private link resources. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetPrivateLinkResourcesAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetPrivateLinkResourcesRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PrivateLinkResourcesWrapper value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PrivateLinkResourcesWrapper.DeserializePrivateLinkResourcesWrapper(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Gets the private link resources. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetPrivateLinkResources(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetPrivateLinkResourcesRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PrivateLinkResourcesWrapper value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PrivateLinkResourcesWrapper.DeserializePrivateLinkResourcesWrapper(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateResetStaticSiteApiKeyRequestUri(string subscriptionId, string resourceGroupName, string name, StaticSiteResetContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/resetapikey", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateResetStaticSiteApiKeyRequest(string subscriptionId, string resourceGroupName, string name, StaticSiteResetContent content) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/resetapikey", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Description for Resets the api key for an existing static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The to use. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task ResetStaticSiteApiKeyAsync(string subscriptionId, string resourceGroupName, string name, StaticSiteResetContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateResetStaticSiteApiKeyRequest(subscriptionId, resourceGroupName, name, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Resets the api key for an existing static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The to use. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ResetStaticSiteApiKey(string subscriptionId, string resourceGroupName, string name, StaticSiteResetContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateResetStaticSiteApiKeyRequest(subscriptionId, resourceGroupName, name, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetDatabaseConnectionsWithDetailsRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/showDatabaseConnections", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetDatabaseConnectionsWithDetailsRequest(string subscriptionId, string resourceGroupName, string name) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/showDatabaseConnections", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Returns details of database connections for a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetDatabaseConnectionsWithDetailsAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetDatabaseConnectionsWithDetailsRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DatabaseConnectionCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DatabaseConnectionCollection.DeserializeDatabaseConnectionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Returns details of database connections for a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetDatabaseConnectionsWithDetails(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetDatabaseConnectionsWithDetailsRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DatabaseConnectionCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DatabaseConnectionCollection.DeserializeDatabaseConnectionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetUserProvidedFunctionAppsForStaticSiteRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/userProvidedFunctionApps", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetUserProvidedFunctionAppsForStaticSiteRequest(string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/userProvidedFunctionApps", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Gets the details of the user provided function apps registered with a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetUserProvidedFunctionAppsForStaticSiteAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetUserProvidedFunctionAppsForStaticSiteRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + StaticSiteUserProvidedFunctionAppsListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteUserProvidedFunctionAppsListResult.DeserializeStaticSiteUserProvidedFunctionAppsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Gets the details of the user provided function apps registered with a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetUserProvidedFunctionAppsForStaticSite(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetUserProvidedFunctionAppsForStaticSiteRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + StaticSiteUserProvidedFunctionAppsListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteUserProvidedFunctionAppsListResult.DeserializeStaticSiteUserProvidedFunctionAppsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetUserProvidedFunctionAppForStaticSiteRequestUri(string subscriptionId, string resourceGroupName, string name, string functionAppName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/userProvidedFunctionApps/", false); + uri.AppendPath(functionAppName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetUserProvidedFunctionAppForStaticSiteRequest(string subscriptionId, string resourceGroupName, string name, string functionAppName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/userProvidedFunctionApps/", false); + uri.AppendPath(functionAppName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Gets the details of the user provided function app registered with a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the function app registered with the static site. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetUserProvidedFunctionAppForStaticSiteAsync(string subscriptionId, string resourceGroupName, string name, string functionAppName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); + + using var message = CreateGetUserProvidedFunctionAppForStaticSiteRequest(subscriptionId, resourceGroupName, name, functionAppName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + StaticSiteUserProvidedFunctionAppData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteUserProvidedFunctionAppData.DeserializeStaticSiteUserProvidedFunctionAppData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((StaticSiteUserProvidedFunctionAppData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Gets the details of the user provided function app registered with a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the function app registered with the static site. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetUserProvidedFunctionAppForStaticSite(string subscriptionId, string resourceGroupName, string name, string functionAppName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); + + using var message = CreateGetUserProvidedFunctionAppForStaticSiteRequest(subscriptionId, resourceGroupName, name, functionAppName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + StaticSiteUserProvidedFunctionAppData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteUserProvidedFunctionAppData.DeserializeStaticSiteUserProvidedFunctionAppData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((StaticSiteUserProvidedFunctionAppData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateRegisterUserProvidedFunctionAppWithStaticSiteRequestUri(string subscriptionId, string resourceGroupName, string name, string functionAppName, StaticSiteUserProvidedFunctionAppData data, bool? isForced) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/userProvidedFunctionApps/", false); + uri.AppendPath(functionAppName, true); + if (isForced != null) + { + uri.AppendQuery("isForced", isForced.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateRegisterUserProvidedFunctionAppWithStaticSiteRequest(string subscriptionId, string resourceGroupName, string name, string functionAppName, StaticSiteUserProvidedFunctionAppData data, bool? isForced) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/userProvidedFunctionApps/", false); + uri.AppendPath(functionAppName, true); + if (isForced != null) + { + uri.AppendQuery("isForced", isForced.Value, true); + } + 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(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Description for Register a user provided function app with a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the function app to register with the static site. + /// A JSON representation of the user provided function app properties. See example. + /// Specify <code>true</code> to force the update of the auth configuration on the function app even if an AzureStaticWebApps provider is already configured on the function app. The default is <code>false</code>. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task RegisterUserProvidedFunctionAppWithStaticSiteAsync(string subscriptionId, string resourceGroupName, string name, string functionAppName, StaticSiteUserProvidedFunctionAppData data, bool? isForced = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateRegisterUserProvidedFunctionAppWithStaticSiteRequest(subscriptionId, resourceGroupName, name, functionAppName, data, isForced); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Register a user provided function app with a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the function app to register with the static site. + /// A JSON representation of the user provided function app properties. See example. + /// Specify <code>true</code> to force the update of the auth configuration on the function app even if an AzureStaticWebApps provider is already configured on the function app. The default is <code>false</code>. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response RegisterUserProvidedFunctionAppWithStaticSite(string subscriptionId, string resourceGroupName, string name, string functionAppName, StaticSiteUserProvidedFunctionAppData data, bool? isForced = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateRegisterUserProvidedFunctionAppWithStaticSiteRequest(subscriptionId, resourceGroupName, name, functionAppName, data, isForced); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDetachUserProvidedFunctionAppFromStaticSiteRequestUri(string subscriptionId, string resourceGroupName, string name, string functionAppName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/userProvidedFunctionApps/", false); + uri.AppendPath(functionAppName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDetachUserProvidedFunctionAppFromStaticSiteRequest(string subscriptionId, string resourceGroupName, string name, string functionAppName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/userProvidedFunctionApps/", false); + uri.AppendPath(functionAppName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Detach the user provided function app from the static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the function app registered with the static site. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DetachUserProvidedFunctionAppFromStaticSiteAsync(string subscriptionId, string resourceGroupName, string name, string functionAppName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); + + using var message = CreateDetachUserProvidedFunctionAppFromStaticSiteRequest(subscriptionId, resourceGroupName, name, functionAppName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Detach the user provided function app from the static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the function app registered with the static site. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response DetachUserProvidedFunctionAppFromStaticSite(string subscriptionId, string resourceGroupName, string name, string functionAppName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(functionAppName, nameof(functionAppName)); + + using var message = CreateDetachUserProvidedFunctionAppFromStaticSiteRequest(subscriptionId, resourceGroupName, name, functionAppName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateZipDeploymentForStaticSiteRequestUri(string subscriptionId, string resourceGroupName, string name, StaticSiteZipDeployment staticSiteZipDeploymentEnvelope) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/zipdeploy", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateZipDeploymentForStaticSiteRequest(string subscriptionId, string resourceGroupName, string name, StaticSiteZipDeployment staticSiteZipDeploymentEnvelope) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/zipdeploy", 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(staticSiteZipDeploymentEnvelope, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Description for Deploys zipped content to a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// A JSON representation of the StaticSiteZipDeployment properties. See example. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateZipDeploymentForStaticSiteAsync(string subscriptionId, string resourceGroupName, string name, StaticSiteZipDeployment staticSiteZipDeploymentEnvelope, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(staticSiteZipDeploymentEnvelope, nameof(staticSiteZipDeploymentEnvelope)); + + using var message = CreateCreateZipDeploymentForStaticSiteRequest(subscriptionId, resourceGroupName, name, staticSiteZipDeploymentEnvelope); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Deploys zipped content to a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// A JSON representation of the StaticSiteZipDeployment properties. See example. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CreateZipDeploymentForStaticSite(string subscriptionId, string resourceGroupName, string name, StaticSiteZipDeployment staticSiteZipDeploymentEnvelope, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(staticSiteZipDeploymentEnvelope, nameof(staticSiteZipDeploymentEnvelope)); + + using var message = CreateCreateZipDeploymentForStaticSiteRequest(subscriptionId, resourceGroupName, name, staticSiteZipDeploymentEnvelope); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateValidateBackendRequestUri(string subscriptionId, string resourceGroupName, string name, string linkedBackendName, StaticSiteLinkedBackendData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/linkedBackends/", false); + uri.AppendPath(linkedBackendName, true); + uri.AppendPath("/validate", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateValidateBackendRequest(string subscriptionId, string resourceGroupName, string name, string linkedBackendName, StaticSiteLinkedBackendData data) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/linkedBackends/", false); + uri.AppendPath(linkedBackendName, true); + uri.AppendPath("/validate", 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(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Validates that a backend can be linked to a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the linked backend that should be retrieved. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task ValidateBackendAsync(string subscriptionId, string resourceGroupName, string name, string linkedBackendName, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateValidateBackendRequest(subscriptionId, resourceGroupName, name, linkedBackendName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Validates that a backend can be linked to a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the linked backend that should be retrieved. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ValidateBackend(string subscriptionId, string resourceGroupName, string name, string linkedBackendName, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateValidateBackendRequest(subscriptionId, resourceGroupName, name, linkedBackendName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateValidateBackendForBuildRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName, string linkedBackendName, StaticSiteLinkedBackendData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/linkedBackends/", false); + uri.AppendPath(linkedBackendName, true); + uri.AppendPath("/validate", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateValidateBackendForBuildRequest(string subscriptionId, string resourceGroupName, string name, string environmentName, string linkedBackendName, StaticSiteLinkedBackendData data) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/linkedBackends/", false); + uri.AppendPath(linkedBackendName, true); + uri.AppendPath("/validate", 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(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Validates that a backend can be linked to a static site build. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The stage site identifier. + /// Name of the linked backend that should be retrieved. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task ValidateBackendForBuildAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, string linkedBackendName, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateValidateBackendForBuildRequest(subscriptionId, resourceGroupName, name, environmentName, linkedBackendName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Validates that a backend can be linked to a static site build. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The stage site identifier. + /// Name of the linked backend that should be retrieved. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ValidateBackendForBuild(string subscriptionId, string resourceGroupName, string name, string environmentName, string linkedBackendName, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateValidateBackendForBuildRequest(subscriptionId, resourceGroupName, name, environmentName, linkedBackendName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetLinkedBackendsRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/linkedBackends", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetLinkedBackendsRequest(string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/linkedBackends", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Returns details of all backends linked to a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetLinkedBackendsAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetLinkedBackendsRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + StaticSiteLinkedBackendsCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteLinkedBackendsCollection.DeserializeStaticSiteLinkedBackendsCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Returns details of all backends linked to a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetLinkedBackends(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetLinkedBackendsRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + StaticSiteLinkedBackendsCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteLinkedBackendsCollection.DeserializeStaticSiteLinkedBackendsCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetLinkedBackendsForBuildRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/linkedBackends", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetLinkedBackendsForBuildRequest(string subscriptionId, string resourceGroupName, string name, string environmentName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/linkedBackends", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Returns details of all backends linked to a static site build. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The stage site identifier. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetLinkedBackendsForBuildAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var message = CreateGetLinkedBackendsForBuildRequest(subscriptionId, resourceGroupName, name, environmentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + StaticSiteLinkedBackendsCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteLinkedBackendsCollection.DeserializeStaticSiteLinkedBackendsCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Returns details of all backends linked to a static site build. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The stage site identifier. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetLinkedBackendsForBuild(string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var message = CreateGetLinkedBackendsForBuildRequest(subscriptionId, resourceGroupName, name, environmentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + StaticSiteLinkedBackendsCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteLinkedBackendsCollection.DeserializeStaticSiteLinkedBackendsCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetLinkedBackendRequestUri(string subscriptionId, string resourceGroupName, string name, string linkedBackendName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/linkedBackends/", false); + uri.AppendPath(linkedBackendName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetLinkedBackendRequest(string subscriptionId, string resourceGroupName, string name, string linkedBackendName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/linkedBackends/", false); + uri.AppendPath(linkedBackendName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Returns the details of a linked backend linked to a static site by name. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetLinkedBackendAsync(string subscriptionId, string resourceGroupName, string name, string linkedBackendName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var message = CreateGetLinkedBackendRequest(subscriptionId, resourceGroupName, name, linkedBackendName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + StaticSiteLinkedBackendData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteLinkedBackendData.DeserializeStaticSiteLinkedBackendData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((StaticSiteLinkedBackendData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Returns the details of a linked backend linked to a static site by name. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetLinkedBackend(string subscriptionId, string resourceGroupName, string name, string linkedBackendName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var message = CreateGetLinkedBackendRequest(subscriptionId, resourceGroupName, name, linkedBackendName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + StaticSiteLinkedBackendData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteLinkedBackendData.DeserializeStaticSiteLinkedBackendData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((StaticSiteLinkedBackendData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateLinkBackendRequestUri(string subscriptionId, string resourceGroupName, string name, string linkedBackendName, StaticSiteLinkedBackendData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/linkedBackends/", false); + uri.AppendPath(linkedBackendName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateLinkBackendRequest(string subscriptionId, string resourceGroupName, string name, string linkedBackendName, StaticSiteLinkedBackendData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/linkedBackends/", false); + uri.AppendPath(linkedBackendName, true); + 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(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Link backend to a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the backend to link to the static site. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task LinkBackendAsync(string subscriptionId, string resourceGroupName, string name, string linkedBackendName, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateLinkBackendRequest(subscriptionId, resourceGroupName, name, linkedBackendName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Link backend to a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the backend to link to the static site. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response LinkBackend(string subscriptionId, string resourceGroupName, string name, string linkedBackendName, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateLinkBackendRequest(subscriptionId, resourceGroupName, name, linkedBackendName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUnlinkBackendRequestUri(string subscriptionId, string resourceGroupName, string name, string linkedBackendName, bool? isCleaningAuthConfig) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/linkedBackends/", false); + uri.AppendPath(linkedBackendName, true); + if (isCleaningAuthConfig != null) + { + uri.AppendQuery("isCleaningAuthConfig", isCleaningAuthConfig.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUnlinkBackendRequest(string subscriptionId, string resourceGroupName, string name, string linkedBackendName, bool? isCleaningAuthConfig) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/linkedBackends/", false); + uri.AppendPath(linkedBackendName, true); + if (isCleaningAuthConfig != null) + { + uri.AppendQuery("isCleaningAuthConfig", isCleaningAuthConfig.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Unlink a backend from a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the backend linked to the static site. + /// Decides if Easy Auth configuration will be removed from backend configuration. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UnlinkBackendAsync(string subscriptionId, string resourceGroupName, string name, string linkedBackendName, bool? isCleaningAuthConfig = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var message = CreateUnlinkBackendRequest(subscriptionId, resourceGroupName, name, linkedBackendName, isCleaningAuthConfig); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Unlink a backend from a static site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// Name of the backend linked to the static site. + /// Decides if Easy Auth configuration will be removed from backend configuration. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response UnlinkBackend(string subscriptionId, string resourceGroupName, string name, string linkedBackendName, bool? isCleaningAuthConfig = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var message = CreateUnlinkBackendRequest(subscriptionId, resourceGroupName, name, linkedBackendName, isCleaningAuthConfig); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetLinkedBackendForBuildRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName, string linkedBackendName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/linkedBackends/", false); + uri.AppendPath(linkedBackendName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetLinkedBackendForBuildRequest(string subscriptionId, string resourceGroupName, string name, string environmentName, string linkedBackendName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/linkedBackends/", false); + uri.AppendPath(linkedBackendName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Returns the details of a linked backend linked to a static site build by name. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The stage site identifier. + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetLinkedBackendForBuildAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, string linkedBackendName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var message = CreateGetLinkedBackendForBuildRequest(subscriptionId, resourceGroupName, name, environmentName, linkedBackendName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + StaticSiteLinkedBackendData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteLinkedBackendData.DeserializeStaticSiteLinkedBackendData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((StaticSiteLinkedBackendData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Returns the details of a linked backend linked to a static site build by name. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The stage site identifier. + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetLinkedBackendForBuild(string subscriptionId, string resourceGroupName, string name, string environmentName, string linkedBackendName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var message = CreateGetLinkedBackendForBuildRequest(subscriptionId, resourceGroupName, name, environmentName, linkedBackendName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + StaticSiteLinkedBackendData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteLinkedBackendData.DeserializeStaticSiteLinkedBackendData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((StaticSiteLinkedBackendData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateLinkBackendToBuildRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName, string linkedBackendName, StaticSiteLinkedBackendData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/linkedBackends/", false); + uri.AppendPath(linkedBackendName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateLinkBackendToBuildRequest(string subscriptionId, string resourceGroupName, string name, string environmentName, string linkedBackendName, StaticSiteLinkedBackendData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/linkedBackends/", false); + uri.AppendPath(linkedBackendName, true); + 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(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Link backend to a static site build. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The stage site identifier. + /// Name of the backend to link to the static site. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task LinkBackendToBuildAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, string linkedBackendName, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateLinkBackendToBuildRequest(subscriptionId, resourceGroupName, name, environmentName, linkedBackendName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Link backend to a static site build. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The stage site identifier. + /// Name of the backend to link to the static site. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response LinkBackendToBuild(string subscriptionId, string resourceGroupName, string name, string environmentName, string linkedBackendName, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateLinkBackendToBuildRequest(subscriptionId, resourceGroupName, name, environmentName, linkedBackendName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUnlinkBackendFromBuildRequestUri(string subscriptionId, string resourceGroupName, string name, string environmentName, string linkedBackendName, bool? isCleaningAuthConfig) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/linkedBackends/", false); + uri.AppendPath(linkedBackendName, true); + if (isCleaningAuthConfig != null) + { + uri.AppendQuery("isCleaningAuthConfig", isCleaningAuthConfig.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUnlinkBackendFromBuildRequest(string subscriptionId, string resourceGroupName, string name, string environmentName, string linkedBackendName, bool? isCleaningAuthConfig) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/staticSites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/builds/", false); + uri.AppendPath(environmentName, true); + uri.AppendPath("/linkedBackends/", false); + uri.AppendPath(linkedBackendName, true); + if (isCleaningAuthConfig != null) + { + uri.AppendQuery("isCleaningAuthConfig", isCleaningAuthConfig.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Unlink a backend from a static site build. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The stage site identifier. + /// Name of the backend linked to the static site. + /// Decides if auth will be removed from backend configuration. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task UnlinkBackendFromBuildAsync(string subscriptionId, string resourceGroupName, string name, string environmentName, string linkedBackendName, bool? isCleaningAuthConfig = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var message = CreateUnlinkBackendFromBuildRequest(subscriptionId, resourceGroupName, name, environmentName, linkedBackendName, isCleaningAuthConfig); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Unlink a backend from a static site build. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The stage site identifier. + /// Name of the backend linked to the static site. + /// Decides if auth will be removed from backend configuration. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response UnlinkBackendFromBuild(string subscriptionId, string resourceGroupName, string name, string environmentName, string linkedBackendName, bool? isCleaningAuthConfig = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var message = CreateUnlinkBackendFromBuildRequest(subscriptionId, resourceGroupName, name, environmentName, linkedBackendName, isCleaningAuthConfig); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Get all Static Sites for a subscription. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + StaticSiteListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteListResult.DeserializeStaticSiteListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Get all Static Sites for a subscription. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + StaticSiteListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteListResult.DeserializeStaticSiteListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetStaticSitesByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateGetStaticSitesByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Gets all static sites in the specified resource group. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GetStaticSitesByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateGetStaticSitesByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + StaticSiteListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteListResult.DeserializeStaticSiteListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Gets all static sites in the specified resource group. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response GetStaticSitesByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateGetStaticSitesByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + StaticSiteListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteListResult.DeserializeStaticSiteListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListStaticSiteUsersNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string authprovider) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListStaticSiteUsersNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string authprovider) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Gets the list of users of a static site. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The auth provider for the users. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListStaticSiteUsersNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string authprovider, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(authprovider, nameof(authprovider)); + + using var message = CreateListStaticSiteUsersNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, authprovider); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + StaticSiteUserListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteUserListResult.DeserializeStaticSiteUserListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Gets the list of users of a static site. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The auth provider for the users. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListStaticSiteUsersNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string authprovider, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(authprovider, nameof(authprovider)); + + using var message = CreateListStaticSiteUsersNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, authprovider); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + StaticSiteUserListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteUserListResult.DeserializeStaticSiteUserListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetStaticSiteBuildsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateGetStaticSiteBuildsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Gets all static site builds for a particular static site. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetStaticSiteBuildsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetStaticSiteBuildsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + StaticSiteBuildListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteBuildListResult.DeserializeStaticSiteBuildListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Gets all static site builds for a particular static site. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetStaticSiteBuildsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetStaticSiteBuildsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + StaticSiteBuildListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteBuildListResult.DeserializeStaticSiteBuildListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetBuildDatabaseConnectionsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateGetBuildDatabaseConnectionsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Returns overviews of database connections for a static site build. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The stage site identifier. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetBuildDatabaseConnectionsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var message = CreateGetBuildDatabaseConnectionsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, environmentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DatabaseConnectionCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DatabaseConnectionCollection.DeserializeDatabaseConnectionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Returns overviews of database connections for a static site build. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The stage site identifier. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetBuildDatabaseConnectionsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var message = CreateGetBuildDatabaseConnectionsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, environmentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DatabaseConnectionCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DatabaseConnectionCollection.DeserializeDatabaseConnectionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListStaticSiteBuildFunctionsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListStaticSiteBuildFunctionsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Gets the functions of a particular static site build. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The stage site identifier. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListStaticSiteBuildFunctionsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var message = CreateListStaticSiteBuildFunctionsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, environmentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + StaticSiteFunctionOverviewListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = StaticSiteFunctionOverviewListResult.DeserializeStaticSiteFunctionOverviewListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Gets the functions of a particular static site build. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The stage site identifier. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListStaticSiteBuildFunctionsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var message = CreateListStaticSiteBuildFunctionsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, environmentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + StaticSiteFunctionOverviewListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = StaticSiteFunctionOverviewListResult.DeserializeStaticSiteFunctionOverviewListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetBuildDatabaseConnectionsWithDetailsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateGetBuildDatabaseConnectionsWithDetailsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Returns details of database connections for a static site build. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The stage site identifier. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetBuildDatabaseConnectionsWithDetailsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var message = CreateGetBuildDatabaseConnectionsWithDetailsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, environmentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DatabaseConnectionCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = DatabaseConnectionCollection.DeserializeDatabaseConnectionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Returns details of database connections for a static site build. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The stage site identifier. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetBuildDatabaseConnectionsWithDetailsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); + + using var message = CreateGetBuildDatabaseConnectionsWithDetailsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, environmentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DatabaseConnectionCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = DatabaseConnectionCollection.DeserializeDatabaseConnectionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetUserProvidedFunctionAppsForStaticSiteBuildNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateGetUserProvidedFunctionAppsForStaticSiteBuildNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -4782,26 +8176,32 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript return message; } - /// Description for Get all Static Sites for a subscription. + /// Description for Gets the details of the user provided function apps registered with a static site build. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The stage site identifier. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetUserProvidedFunctionAppsForStaticSiteBuildNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId); + using var message = CreateGetUserProvidedFunctionAppsForStaticSiteBuildNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, environmentName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - StaticSiteListResult value = default; + StaticSiteUserProvidedFunctionAppsListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StaticSiteListResult.DeserializeStaticSiteListResult(document.RootElement); + value = StaticSiteUserProvidedFunctionAppsListResult.DeserializeStaticSiteUserProvidedFunctionAppsListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -4809,26 +8209,32 @@ public async Task> ListNextPageAsync(string nextL } } - /// Description for Get all Static Sites for a subscription. + /// Description for Gets the details of the user provided function apps registered with a static site build. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the static site. + /// The stage site identifier. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetUserProvidedFunctionAppsForStaticSiteBuildNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId); + using var message = CreateGetUserProvidedFunctionAppsForStaticSiteBuildNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, environmentName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - StaticSiteListResult value = default; + StaticSiteUserProvidedFunctionAppsListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StaticSiteListResult.DeserializeStaticSiteListResult(document.RootElement); + value = StaticSiteUserProvidedFunctionAppsListResult.DeserializeStaticSiteUserProvidedFunctionAppsListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -4836,7 +8242,7 @@ public Response ListNextPage(string nextLink, string subsc } } - internal RequestUriBuilder CreateGetStaticSitesByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + internal RequestUriBuilder CreateListBasicAuthNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -4844,7 +8250,7 @@ internal RequestUriBuilder CreateGetStaticSitesByResourceGroupNextPageRequestUri return uri; } - internal HttpMessage CreateGetStaticSitesByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + internal HttpMessage CreateListBasicAuthNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -4858,28 +8264,30 @@ internal HttpMessage CreateGetStaticSitesByResourceGroupNextPageRequest(string n return message; } - /// Description for Gets all static sites in the specified resource group. + /// Description for Gets the basic auth properties for a static site as a collection. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. + /// Name of the static site. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> GetStaticSitesByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListBasicAuthNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateGetStaticSitesByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + using var message = CreateListBasicAuthNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - StaticSiteListResult value = default; + StaticSiteBasicAuthPropertiesCollection value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StaticSiteListResult.DeserializeStaticSiteListResult(document.RootElement); + value = StaticSiteBasicAuthPropertiesCollection.DeserializeStaticSiteBasicAuthPropertiesCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -4887,28 +8295,30 @@ public async Task> GetStaticSitesByResourceGroupN } } - /// Description for Gets all static sites in the specified resource group. + /// Description for Gets the basic auth properties for a static site as a collection. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. + /// Name of the static site. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public Response GetStaticSitesByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListBasicAuthNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateGetStaticSitesByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + using var message = CreateListBasicAuthNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - StaticSiteListResult value = default; + StaticSiteBasicAuthPropertiesCollection value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StaticSiteListResult.DeserializeStaticSiteListResult(document.RootElement); + value = StaticSiteBasicAuthPropertiesCollection.DeserializeStaticSiteBasicAuthPropertiesCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -4916,7 +8326,7 @@ public Response GetStaticSitesByResourceGroupNextPage(stri } } - internal RequestUriBuilder CreateListStaticSiteUsersNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string authprovider) + internal RequestUriBuilder CreateListStaticSiteCustomDomainsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -4924,7 +8334,7 @@ internal RequestUriBuilder CreateListStaticSiteUsersNextPageRequestUri(string ne return uri; } - internal HttpMessage CreateListStaticSiteUsersNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string authprovider) + internal HttpMessage CreateListStaticSiteCustomDomainsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -4938,32 +8348,30 @@ internal HttpMessage CreateListStaticSiteUsersNextPageRequest(string nextLink, s return message; } - /// Description for Gets the list of users of a static site. + /// Description for Gets all static site custom domains for a particular static site. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. - /// Name of the static site. - /// The auth provider for the users. + /// Name of the static site resource to search in. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListStaticSiteUsersNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string authprovider, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListStaticSiteCustomDomainsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(authprovider, nameof(authprovider)); - using var message = CreateListStaticSiteUsersNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, authprovider); + using var message = CreateListStaticSiteCustomDomainsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - StaticSiteUserListResult value = default; + StaticSiteCustomDomainOverviewListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StaticSiteUserListResult.DeserializeStaticSiteUserListResult(document.RootElement); + value = StaticSiteCustomDomainOverviewListResult.DeserializeStaticSiteCustomDomainOverviewListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -4971,32 +8379,30 @@ public async Task> ListStaticSiteUsersNextPag } } - /// Description for Gets the list of users of a static site. + /// Description for Gets all static site custom domains for a particular static site. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. - /// Name of the static site. - /// The auth provider for the users. + /// Name of the static site resource to search in. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response ListStaticSiteUsersNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string authprovider, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListStaticSiteCustomDomainsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(authprovider, nameof(authprovider)); - using var message = CreateListStaticSiteUsersNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, authprovider); + using var message = CreateListStaticSiteCustomDomainsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - StaticSiteUserListResult value = default; + StaticSiteCustomDomainOverviewListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StaticSiteUserListResult.DeserializeStaticSiteUserListResult(document.RootElement); + value = StaticSiteCustomDomainOverviewListResult.DeserializeStaticSiteCustomDomainOverviewListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -5004,7 +8410,7 @@ public Response ListStaticSiteUsersNextPage(string nex } } - internal RequestUriBuilder CreateGetStaticSiteBuildsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) + internal RequestUriBuilder CreateGetDatabaseConnectionsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -5012,7 +8418,7 @@ internal RequestUriBuilder CreateGetStaticSiteBuildsNextPageRequestUri(string ne return uri; } - internal HttpMessage CreateGetStaticSiteBuildsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name) + internal HttpMessage CreateGetDatabaseConnectionsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -5026,7 +8432,7 @@ internal HttpMessage CreateGetStaticSiteBuildsNextPageRequest(string nextLink, s return message; } - /// Description for Gets all static site builds for a particular static site. + /// Returns overviews of database connections for a static site. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. @@ -5034,22 +8440,22 @@ internal HttpMessage CreateGetStaticSiteBuildsNextPageRequest(string nextLink, s /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> GetStaticSiteBuildsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public async Task> GetDatabaseConnectionsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateGetStaticSiteBuildsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); + using var message = CreateGetDatabaseConnectionsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - StaticSiteBuildListResult value = default; + DatabaseConnectionCollection value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StaticSiteBuildListResult.DeserializeStaticSiteBuildListResult(document.RootElement); + value = DatabaseConnectionCollection.DeserializeDatabaseConnectionCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -5057,7 +8463,7 @@ public async Task> GetStaticSiteBuildsNextPa } } - /// Description for Gets all static site builds for a particular static site. + /// Returns overviews of database connections for a static site. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. @@ -5065,22 +8471,22 @@ public async Task> GetStaticSiteBuildsNextPa /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response GetStaticSiteBuildsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public Response GetDatabaseConnectionsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateGetStaticSiteBuildsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); + using var message = CreateGetDatabaseConnectionsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - StaticSiteBuildListResult value = default; + DatabaseConnectionCollection value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StaticSiteBuildListResult.DeserializeStaticSiteBuildListResult(document.RootElement); + value = DatabaseConnectionCollection.DeserializeDatabaseConnectionCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -5088,7 +8494,7 @@ public Response GetStaticSiteBuildsNextPage(string ne } } - internal RequestUriBuilder CreateListStaticSiteBuildFunctionsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName) + internal RequestUriBuilder CreateListStaticSiteFunctionsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -5096,7 +8502,7 @@ internal RequestUriBuilder CreateListStaticSiteBuildFunctionsNextPageRequestUri( return uri; } - internal HttpMessage CreateListStaticSiteBuildFunctionsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName) + internal HttpMessage CreateListStaticSiteFunctionsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -5110,24 +8516,22 @@ internal HttpMessage CreateListStaticSiteBuildFunctionsNextPageRequest(string ne return message; } - /// Description for Gets the functions of a particular static site build. + /// Description for Gets the functions of a static site. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// The stage site identifier. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListStaticSiteBuildFunctionsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListStaticSiteFunctionsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - using var message = CreateListStaticSiteBuildFunctionsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, environmentName); + using var message = CreateListStaticSiteFunctionsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -5143,24 +8547,22 @@ public async Task> ListStaticSite } } - /// Description for Gets the functions of a particular static site build. + /// Description for Gets the functions of a static site. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// The stage site identifier. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response ListStaticSiteBuildFunctionsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListStaticSiteFunctionsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - using var message = CreateListStaticSiteBuildFunctionsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, environmentName); + using var message = CreateListStaticSiteFunctionsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -5176,7 +8578,7 @@ public Response ListStaticSiteBuildFunctio } } - internal RequestUriBuilder CreateGetUserProvidedFunctionAppsForStaticSiteBuildNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName) + internal RequestUriBuilder CreateGetPrivateEndpointConnectionListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -5184,7 +8586,7 @@ internal RequestUriBuilder CreateGetUserProvidedFunctionAppsForStaticSiteBuildNe return uri; } - internal HttpMessage CreateGetUserProvidedFunctionAppsForStaticSiteBuildNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName) + internal HttpMessage CreateGetPrivateEndpointConnectionListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -5198,32 +8600,30 @@ internal HttpMessage CreateGetUserProvidedFunctionAppsForStaticSiteBuildNextPage return message; } - /// Description for Gets the details of the user provided function apps registered with a static site build. + /// Description for Gets the list of private endpoint connections associated with a static site. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// The stage site identifier. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetUserProvidedFunctionAppsForStaticSiteBuildNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetPrivateEndpointConnectionListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - using var message = CreateGetUserProvidedFunctionAppsForStaticSiteBuildNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, environmentName); + using var message = CreateGetPrivateEndpointConnectionListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - StaticSiteUserProvidedFunctionAppsListResult value = default; + RemotePrivateEndpointConnectionListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StaticSiteUserProvidedFunctionAppsListResult.DeserializeStaticSiteUserProvidedFunctionAppsListResult(document.RootElement); + value = RemotePrivateEndpointConnectionListResult.DeserializeRemotePrivateEndpointConnectionListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -5231,32 +8631,30 @@ public async Task> GetUse } } - /// Description for Gets the details of the user provided function apps registered with a static site build. + /// Description for Gets the list of private endpoint connections associated with a static site. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. - /// The stage site identifier. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetUserProvidedFunctionAppsForStaticSiteBuildNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetPrivateEndpointConnectionListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - using var message = CreateGetUserProvidedFunctionAppsForStaticSiteBuildNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, environmentName); + using var message = CreateGetPrivateEndpointConnectionListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - StaticSiteUserProvidedFunctionAppsListResult value = default; + RemotePrivateEndpointConnectionListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StaticSiteUserProvidedFunctionAppsListResult.DeserializeStaticSiteUserProvidedFunctionAppsListResult(document.RootElement); + value = RemotePrivateEndpointConnectionListResult.DeserializeRemotePrivateEndpointConnectionListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -5264,7 +8662,7 @@ public Response GetUserProvidedFun } } - internal RequestUriBuilder CreateListStaticSiteCustomDomainsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) + internal RequestUriBuilder CreateGetDatabaseConnectionsWithDetailsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -5272,7 +8670,7 @@ internal RequestUriBuilder CreateListStaticSiteCustomDomainsNextPageRequestUri(s return uri; } - internal HttpMessage CreateListStaticSiteCustomDomainsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name) + internal HttpMessage CreateGetDatabaseConnectionsWithDetailsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -5286,30 +8684,30 @@ internal HttpMessage CreateListStaticSiteCustomDomainsNextPageRequest(string nex return message; } - /// Description for Gets all static site custom domains for a particular static site. + /// Returns details of database connections for a static site. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. - /// Name of the static site resource to search in. + /// Name of the static site. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListStaticSiteCustomDomainsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public async Task> GetDatabaseConnectionsWithDetailsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListStaticSiteCustomDomainsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); + using var message = CreateGetDatabaseConnectionsWithDetailsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - StaticSiteCustomDomainOverviewListResult value = default; + DatabaseConnectionCollection value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StaticSiteCustomDomainOverviewListResult.DeserializeStaticSiteCustomDomainOverviewListResult(document.RootElement); + value = DatabaseConnectionCollection.DeserializeDatabaseConnectionCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -5317,30 +8715,30 @@ public async Task> ListStatic } } - /// Description for Gets all static site custom domains for a particular static site. + /// Returns details of database connections for a static site. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. - /// Name of the static site resource to search in. + /// Name of the static site. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListStaticSiteCustomDomainsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public Response GetDatabaseConnectionsWithDetailsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListStaticSiteCustomDomainsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); + using var message = CreateGetDatabaseConnectionsWithDetailsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - StaticSiteCustomDomainOverviewListResult value = default; + DatabaseConnectionCollection value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StaticSiteCustomDomainOverviewListResult.DeserializeStaticSiteCustomDomainOverviewListResult(document.RootElement); + value = DatabaseConnectionCollection.DeserializeDatabaseConnectionCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -5348,7 +8746,7 @@ public Response ListStaticSiteCustomDo } } - internal RequestUriBuilder CreateListStaticSiteFunctionsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) + internal RequestUriBuilder CreateGetUserProvidedFunctionAppsForStaticSiteNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -5356,7 +8754,7 @@ internal RequestUriBuilder CreateListStaticSiteFunctionsNextPageRequestUri(strin return uri; } - internal HttpMessage CreateListStaticSiteFunctionsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name) + internal HttpMessage CreateGetUserProvidedFunctionAppsForStaticSiteNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -5370,7 +8768,7 @@ internal HttpMessage CreateListStaticSiteFunctionsNextPageRequest(string nextLin return message; } - /// Description for Gets the functions of a static site. + /// Description for Gets the details of the user provided function apps registered with a static site. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. @@ -5378,22 +8776,22 @@ internal HttpMessage CreateListStaticSiteFunctionsNextPageRequest(string nextLin /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListStaticSiteFunctionsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public async Task> GetUserProvidedFunctionAppsForStaticSiteNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListStaticSiteFunctionsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); + using var message = CreateGetUserProvidedFunctionAppsForStaticSiteNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - StaticSiteFunctionOverviewListResult value = default; + StaticSiteUserProvidedFunctionAppsListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StaticSiteFunctionOverviewListResult.DeserializeStaticSiteFunctionOverviewListResult(document.RootElement); + value = StaticSiteUserProvidedFunctionAppsListResult.DeserializeStaticSiteUserProvidedFunctionAppsListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -5401,7 +8799,7 @@ public async Task> ListStaticSite } } - /// Description for Gets the functions of a static site. + /// Description for Gets the details of the user provided function apps registered with a static site. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. @@ -5409,22 +8807,22 @@ public async Task> ListStaticSite /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListStaticSiteFunctionsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public Response GetUserProvidedFunctionAppsForStaticSiteNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListStaticSiteFunctionsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); + using var message = CreateGetUserProvidedFunctionAppsForStaticSiteNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - StaticSiteFunctionOverviewListResult value = default; + StaticSiteUserProvidedFunctionAppsListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StaticSiteFunctionOverviewListResult.DeserializeStaticSiteFunctionOverviewListResult(document.RootElement); + value = StaticSiteUserProvidedFunctionAppsListResult.DeserializeStaticSiteUserProvidedFunctionAppsListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -5432,7 +8830,7 @@ public Response ListStaticSiteFunctionsNex } } - internal RequestUriBuilder CreateGetPrivateEndpointConnectionListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) + internal RequestUriBuilder CreateGetLinkedBackendsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -5440,7 +8838,7 @@ internal RequestUriBuilder CreateGetPrivateEndpointConnectionListNextPageRequest return uri; } - internal HttpMessage CreateGetPrivateEndpointConnectionListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name) + internal HttpMessage CreateGetLinkedBackendsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -5454,7 +8852,7 @@ internal HttpMessage CreateGetPrivateEndpointConnectionListNextPageRequest(strin return message; } - /// Description for Gets the list of private endpoint connections associated with a static site. + /// Returns details of all backends linked to a static site. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. @@ -5462,22 +8860,22 @@ internal HttpMessage CreateGetPrivateEndpointConnectionListNextPageRequest(strin /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> GetPrivateEndpointConnectionListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public async Task> GetLinkedBackendsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateGetPrivateEndpointConnectionListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); + using var message = CreateGetLinkedBackendsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - RemotePrivateEndpointConnectionListResult value = default; + StaticSiteLinkedBackendsCollection value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = RemotePrivateEndpointConnectionListResult.DeserializeRemotePrivateEndpointConnectionListResult(document.RootElement); + value = StaticSiteLinkedBackendsCollection.DeserializeStaticSiteLinkedBackendsCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -5485,7 +8883,7 @@ public async Task> GetPrivat } } - /// Description for Gets the list of private endpoint connections associated with a static site. + /// Returns details of all backends linked to a static site. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. @@ -5493,22 +8891,22 @@ public async Task> GetPrivat /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response GetPrivateEndpointConnectionListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + public Response GetLinkedBackendsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateGetPrivateEndpointConnectionListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); + using var message = CreateGetLinkedBackendsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - RemotePrivateEndpointConnectionListResult value = default; + StaticSiteLinkedBackendsCollection value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = RemotePrivateEndpointConnectionListResult.DeserializeRemotePrivateEndpointConnectionListResult(document.RootElement); + value = StaticSiteLinkedBackendsCollection.DeserializeStaticSiteLinkedBackendsCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -5516,7 +8914,7 @@ public Response GetPrivateEndpointCon } } - internal RequestUriBuilder CreateGetUserProvidedFunctionAppsForStaticSiteNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) + internal RequestUriBuilder CreateGetLinkedBackendsForBuildNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -5524,7 +8922,7 @@ internal RequestUriBuilder CreateGetUserProvidedFunctionAppsForStaticSiteNextPag return uri; } - internal HttpMessage CreateGetUserProvidedFunctionAppsForStaticSiteNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name) + internal HttpMessage CreateGetLinkedBackendsForBuildNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -5538,30 +8936,32 @@ internal HttpMessage CreateGetUserProvidedFunctionAppsForStaticSiteNextPageReque return message; } - /// Description for Gets the details of the user provided function apps registered with a static site. + /// Returns details of all backends linked to a static site build. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. + /// The stage site identifier. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetUserProvidedFunctionAppsForStaticSiteNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetLinkedBackendsForBuildNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - using var message = CreateGetUserProvidedFunctionAppsForStaticSiteNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); + using var message = CreateGetLinkedBackendsForBuildNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, environmentName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - StaticSiteUserProvidedFunctionAppsListResult value = default; + StaticSiteLinkedBackendsCollection value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = StaticSiteUserProvidedFunctionAppsListResult.DeserializeStaticSiteUserProvidedFunctionAppsListResult(document.RootElement); + value = StaticSiteLinkedBackendsCollection.DeserializeStaticSiteLinkedBackendsCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -5569,30 +8969,32 @@ public async Task> GetUse } } - /// Description for Gets the details of the user provided function apps registered with a static site. + /// Returns details of all backends linked to a static site build. /// The URL to the next page of results. /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). /// Name of the resource group to which the resource belongs. /// Name of the static site. + /// The stage site identifier. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response GetUserProvidedFunctionAppsForStaticSiteNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetLinkedBackendsForBuildNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(environmentName, nameof(environmentName)); - using var message = CreateGetUserProvidedFunctionAppsForStaticSiteNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); + using var message = CreateGetLinkedBackendsForBuildNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, environmentName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - StaticSiteUserProvidedFunctionAppsListResult value = default; + StaticSiteLinkedBackendsCollection value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = StaticSiteUserProvidedFunctionAppsListResult.DeserializeStaticSiteUserProvidedFunctionAppsListResult(document.RootElement); + value = StaticSiteLinkedBackendsCollection.DeserializeStaticSiteLinkedBackendsCollection(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/TopLevelDomainsRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/TopLevelDomainsRestOperations.cs index d2a8058ab6a5a..b22565790e8a6 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/TopLevelDomainsRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/TopLevelDomainsRestOperations.cs @@ -32,7 +32,7 @@ public TopLevelDomainsRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WebAppsRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WebAppsRestOperations.cs index ab4f5df2008c8..1dafeced33d6b 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WebAppsRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WebAppsRestOperations.cs @@ -34,7 +34,7 @@ public WebAppsRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -2384,6 +2384,100 @@ public Response GetAuthSettings(string subscriptionId, string } } + internal RequestUriBuilder CreateGetAuthSettingsV2WithoutSecretsRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/config/authsettingsV2", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetAuthSettingsV2WithoutSecretsRequest(string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/config/authsettingsV2", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAuthSettingsV2WithoutSecretsAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetAuthSettingsV2WithoutSecretsRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SiteAuthSettingsV2 value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SiteAuthSettingsV2.DeserializeSiteAuthSettingsV2(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetAuthSettingsV2WithoutSecrets(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetAuthSettingsV2WithoutSecretsRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SiteAuthSettingsV2 value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SiteAuthSettingsV2.DeserializeSiteAuthSettingsV2(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateUpdateAuthSettingsV2RequestUri(string subscriptionId, string resourceGroupName, string name, SiteAuthSettingsV2 siteAuthSettingsV2) { var uri = new RawRequestUriBuilder(); @@ -5778,6 +5872,192 @@ public Response StopContinuousWebJob(string subscriptionId, string resourceGroup } } + internal RequestUriBuilder CreateListProductionSiteDeploymentStatusesRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/deploymentStatus", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListProductionSiteDeploymentStatusesRequest(string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/deploymentStatus", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List deployment statuses for an app (or deployment slot, if specified). + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListProductionSiteDeploymentStatusesAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListProductionSiteDeploymentStatusesRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CsmDeploymentStatusCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CsmDeploymentStatusCollection.DeserializeCsmDeploymentStatusCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List deployment statuses for an app (or deployment slot, if specified). + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListProductionSiteDeploymentStatuses(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListProductionSiteDeploymentStatusesRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CsmDeploymentStatusCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CsmDeploymentStatusCollection.DeserializeCsmDeploymentStatusCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetProductionSiteDeploymentStatusRequestUri(string subscriptionId, string resourceGroupName, string name, string deploymentStatusId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/deploymentStatus/", false); + uri.AppendPath(deploymentStatusId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetProductionSiteDeploymentStatusRequest(string subscriptionId, string resourceGroupName, string name, string deploymentStatusId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/deploymentStatus/", false); + uri.AppendPath(deploymentStatusId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the deployment status for an app (or deployment slot, if specified). + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// GUID of the deployment operation. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task GetProductionSiteDeploymentStatusAsync(string subscriptionId, string resourceGroupName, string name, string deploymentStatusId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(deploymentStatusId, nameof(deploymentStatusId)); + + using var message = CreateGetProductionSiteDeploymentStatusRequest(subscriptionId, resourceGroupName, name, deploymentStatusId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the deployment status for an app (or deployment slot, if specified). + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// GUID of the deployment operation. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetProductionSiteDeploymentStatus(string subscriptionId, string resourceGroupName, string name, string deploymentStatusId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(deploymentStatusId, nameof(deploymentStatusId)); + + using var message = CreateGetProductionSiteDeploymentStatusRequest(subscriptionId, resourceGroupName, name, deploymentStatusId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListDeploymentsRequestUri(string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); @@ -7170,6 +7450,190 @@ public Response GetMSDeployLog(string subscriptionId, string } } + internal RequestUriBuilder CreateGetOneDeployStatusRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/extensions/onedeploy", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetOneDeployStatusRequest(string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/extensions/onedeploy", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Invoke onedeploy status API /api/deployments and gets the deployment status for the site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of web app. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetOneDeployStatusAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetOneDeployStatusRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + BinaryData value = default; + value = await BinaryData.FromStreamAsync(message.Response.ContentStream).ConfigureAwait(false); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Invoke onedeploy status API /api/deployments and gets the deployment status for the site. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of web app. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetOneDeployStatus(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateGetOneDeployStatusRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + BinaryData value = default; + value = BinaryData.FromStream(message.Response.ContentStream); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOneDeployOperationRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/extensions/onedeploy", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOneDeployOperationRequest(string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/extensions/onedeploy", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for Invoke the OneDeploy publish web app extension. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of web app. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> CreateOneDeployOperationAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateCreateOneDeployOperationRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + BinaryData value = default; + value = await BinaryData.FromStreamAsync(message.Response.ContentStream).ConfigureAwait(false); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Invoke the OneDeploy publish web app extension. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of web app. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CreateOneDeployOperation(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateCreateOneDeployOperationRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + BinaryData value = default; + value = BinaryData.FromStream(message.Response.ContentStream); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListFunctionsRequestUri(string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); @@ -14208,7 +14672,7 @@ public Response GetPrivateEndpoi } } - internal RequestUriBuilder CreateApproveOrRejectPrivateEndpointConnectionRequestUri(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info) + internal RequestUriBuilder CreateApproveOrRejectPrivateEndpointConnectionRequestUri(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -14224,7 +14688,7 @@ internal RequestUriBuilder CreateApproveOrRejectPrivateEndpointConnectionRequest return uri; } - internal HttpMessage CreateApproveOrRejectPrivateEndpointConnectionRequest(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info) + internal HttpMessage CreateApproveOrRejectPrivateEndpointConnectionRequest(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -14244,7 +14708,7 @@ internal HttpMessage CreateApproveOrRejectPrivateEndpointConnectionRequest(strin request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(info, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); request.Content = content; _userAgent.Apply(message); return message; @@ -14255,19 +14719,19 @@ internal HttpMessage CreateApproveOrRejectPrivateEndpointConnectionRequest(strin /// Name of the resource group to which the resource belongs. /// Name of the site. /// The to use. - /// The to use. + /// The to use. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task ApproveOrRejectPrivateEndpointConnectionAsync(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + public async Task ApproveOrRejectPrivateEndpointConnectionAsync(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateApproveOrRejectPrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName, info); + using var message = CreateApproveOrRejectPrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -14284,19 +14748,19 @@ public async Task ApproveOrRejectPrivateEndpointConnectionAsync(string /// Name of the resource group to which the resource belongs. /// Name of the site. /// The to use. - /// The to use. + /// The to use. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response ApproveOrRejectPrivateEndpointConnection(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + public Response ApproveOrRejectPrivateEndpointConnection(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateApproveOrRejectPrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName, info); + using var message = CreateApproveOrRejectPrivateEndpointConnectionRequest(subscriptionId, resourceGroupName, name, privateEndpointConnectionName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -16164,6 +16628,406 @@ public Response RestoreSnapshot(string subscriptionId, string resourceGroupName, } } + internal RequestUriBuilder CreateListSiteContainersRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/sitecontainers", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListSiteContainersRequest(string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/sitecontainers", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists all the site containers of a site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListSiteContainersAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListSiteContainersRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.SiteContainerCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.SiteContainerCollection.DeserializeSiteContainerCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists all the site containers of a site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListSiteContainers(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListSiteContainersRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.SiteContainerCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.SiteContainerCollection.DeserializeSiteContainerCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetSiteContainerRequestUri(string subscriptionId, string resourceGroupName, string name, string containerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/sitecontainers/", false); + uri.AppendPath(containerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetSiteContainerRequest(string subscriptionId, string resourceGroupName, string name, string containerName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/sitecontainers/", false); + uri.AppendPath(containerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a site container of a site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Site Container Name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetSiteContainerAsync(string subscriptionId, string resourceGroupName, string name, string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var message = CreateGetSiteContainerRequest(subscriptionId, resourceGroupName, name, containerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SiteContainerData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SiteContainerData.DeserializeSiteContainerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SiteContainerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a site container of a site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Site Container Name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetSiteContainer(string subscriptionId, string resourceGroupName, string name, string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var message = CreateGetSiteContainerRequest(subscriptionId, resourceGroupName, name, containerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SiteContainerData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SiteContainerData.DeserializeSiteContainerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SiteContainerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateSiteContainerRequestUri(string subscriptionId, string resourceGroupName, string name, string containerName, SiteContainerData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/sitecontainers/", false); + uri.AppendPath(containerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateSiteContainerRequest(string subscriptionId, string resourceGroupName, string name, string containerName, SiteContainerData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/sitecontainers/", false); + uri.AppendPath(containerName, true); + 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(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or Updates a site container for a site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Site Container Name. + /// Container Entity. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateSiteContainerAsync(string subscriptionId, string resourceGroupName, string name, string containerName, SiteContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateSiteContainerRequest(subscriptionId, resourceGroupName, name, containerName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + SiteContainerData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SiteContainerData.DeserializeSiteContainerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or Updates a site container for a site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Site Container Name. + /// Container Entity. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdateSiteContainer(string subscriptionId, string resourceGroupName, string name, string containerName, SiteContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateSiteContainerRequest(subscriptionId, resourceGroupName, name, containerName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + SiteContainerData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SiteContainerData.DeserializeSiteContainerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteSiteContainerRequestUri(string subscriptionId, string resourceGroupName, string name, string containerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/sitecontainers/", false); + uri.AppendPath(containerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteSiteContainerRequest(string subscriptionId, string resourceGroupName, string name, string containerName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/sitecontainers/", false); + uri.AppendPath(containerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes a site container for a site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Site Container Name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteSiteContainerAsync(string subscriptionId, string resourceGroupName, string name, string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var message = CreateDeleteSiteContainerRequest(subscriptionId, resourceGroupName, name, containerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes a site container for a site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Site Container Name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response DeleteSiteContainer(string subscriptionId, string resourceGroupName, string name, string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var message = CreateDeleteSiteContainerRequest(subscriptionId, resourceGroupName, name, containerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListSiteExtensionsRequestUri(string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); @@ -18986,6 +19850,108 @@ public Response GetAuthSettingsSlot(string subscriptionId, str } } + internal RequestUriBuilder CreateGetAuthSettingsV2WithoutSecretsSlotRequestUri(string subscriptionId, string resourceGroupName, string name, string slot) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/config/authsettingsV2", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetAuthSettingsV2WithoutSecretsSlotRequest(string subscriptionId, string resourceGroupName, string name, string slot) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/config/authsettingsV2", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets site's Authentication / Authorization settings for apps via the V2 format. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Name of the deployment slot. If a slot is not specified, the API will get the settings for the production slot. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAuthSettingsV2WithoutSecretsSlotAsync(string subscriptionId, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + + using var message = CreateGetAuthSettingsV2WithoutSecretsSlotRequest(subscriptionId, resourceGroupName, name, slot); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SiteAuthSettingsV2 value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SiteAuthSettingsV2.DeserializeSiteAuthSettingsV2(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets site's Authentication / Authorization settings for apps via the V2 format. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Name of the deployment slot. If a slot is not specified, the API will get the settings for the production slot. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetAuthSettingsV2WithoutSecretsSlot(string subscriptionId, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + + using var message = CreateGetAuthSettingsV2WithoutSecretsSlotRequest(subscriptionId, resourceGroupName, name, slot); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SiteAuthSettingsV2 value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SiteAuthSettingsV2.DeserializeSiteAuthSettingsV2(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateUpdateAuthSettingsV2SlotRequestUri(string subscriptionId, string resourceGroupName, string name, string slot, SiteAuthSettingsV2 siteAuthSettingsV2) { var uri = new RawRequestUriBuilder(); @@ -22444,6 +23410,208 @@ public Response StopContinuousWebJobSlot(string subscriptionId, string resourceG } } + internal RequestUriBuilder CreateListSlotSiteDeploymentStatusesSlotRequestUri(string subscriptionId, string resourceGroupName, string name, string slot) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/deploymentStatus", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListSlotSiteDeploymentStatusesSlotRequest(string subscriptionId, string resourceGroupName, string name, string slot) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/deploymentStatus", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List deployment statuses for an app (or deployment slot, if specified). + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Name of the deployment slot. If a slot is not specified, the API will get the deployment status for the production slot. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListSlotSiteDeploymentStatusesSlotAsync(string subscriptionId, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + + using var message = CreateListSlotSiteDeploymentStatusesSlotRequest(subscriptionId, resourceGroupName, name, slot); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CsmDeploymentStatusCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CsmDeploymentStatusCollection.DeserializeCsmDeploymentStatusCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List deployment statuses for an app (or deployment slot, if specified). + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Name of the deployment slot. If a slot is not specified, the API will get the deployment status for the production slot. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListSlotSiteDeploymentStatusesSlot(string subscriptionId, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + + using var message = CreateListSlotSiteDeploymentStatusesSlotRequest(subscriptionId, resourceGroupName, name, slot); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CsmDeploymentStatusCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CsmDeploymentStatusCollection.DeserializeCsmDeploymentStatusCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetSlotSiteDeploymentStatusSlotRequestUri(string subscriptionId, string resourceGroupName, string name, string slot, string deploymentStatusId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/deploymentStatus/", false); + uri.AppendPath(deploymentStatusId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetSlotSiteDeploymentStatusSlotRequest(string subscriptionId, string resourceGroupName, string name, string slot, string deploymentStatusId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/deploymentStatus/", false); + uri.AppendPath(deploymentStatusId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the deployment status for an app (or deployment slot, if specified). + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Name of the deployment slot. If a slot is not specified, the API will get the deployment status for the production slot. + /// GUID of the deployment operation. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task GetSlotSiteDeploymentStatusSlotAsync(string subscriptionId, string resourceGroupName, string name, string slot, string deploymentStatusId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + Argument.AssertNotNullOrEmpty(deploymentStatusId, nameof(deploymentStatusId)); + + using var message = CreateGetSlotSiteDeploymentStatusSlotRequest(subscriptionId, resourceGroupName, name, slot, deploymentStatusId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the deployment status for an app (or deployment slot, if specified). + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Name of the deployment slot. If a slot is not specified, the API will get the deployment status for the production slot. + /// GUID of the deployment operation. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetSlotSiteDeploymentStatusSlot(string subscriptionId, string resourceGroupName, string name, string slot, string deploymentStatusId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + Argument.AssertNotNullOrEmpty(deploymentStatusId, nameof(deploymentStatusId)); + + using var message = CreateGetSlotSiteDeploymentStatusSlotRequest(subscriptionId, resourceGroupName, name, slot, deploymentStatusId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListDeploymentsSlotRequestUri(string subscriptionId, string resourceGroupName, string name, string slot) { var uri = new RawRequestUriBuilder(); @@ -31344,7 +32512,7 @@ public Response GetPrivateEndpoi } } - internal RequestUriBuilder CreateApproveOrRejectPrivateEndpointConnectionSlotRequestUri(string subscriptionId, string resourceGroupName, string name, string slot, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info) + internal RequestUriBuilder CreateApproveOrRejectPrivateEndpointConnectionSlotRequestUri(string subscriptionId, string resourceGroupName, string name, string slot, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -31362,7 +32530,7 @@ internal RequestUriBuilder CreateApproveOrRejectPrivateEndpointConnectionSlotReq return uri; } - internal HttpMessage CreateApproveOrRejectPrivateEndpointConnectionSlotRequest(string subscriptionId, string resourceGroupName, string name, string slot, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info) + internal HttpMessage CreateApproveOrRejectPrivateEndpointConnectionSlotRequest(string subscriptionId, string resourceGroupName, string name, string slot, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -31384,7 +32552,7 @@ internal HttpMessage CreateApproveOrRejectPrivateEndpointConnectionSlotRequest(s request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(info, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); request.Content = content; _userAgent.Apply(message); return message; @@ -31396,20 +32564,20 @@ internal HttpMessage CreateApproveOrRejectPrivateEndpointConnectionSlotRequest(s /// Name of the site. /// The to use. /// The to use. - /// The to use. + /// The to use. /// The cancellation token to use. - /// , , , , or is null. + /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public async Task ApproveOrRejectPrivateEndpointConnectionSlotAsync(string subscriptionId, string resourceGroupName, string name, string slot, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + public async Task ApproveOrRejectPrivateEndpointConnectionSlotAsync(string subscriptionId, string resourceGroupName, string name, string slot, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(slot, nameof(slot)); Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateApproveOrRejectPrivateEndpointConnectionSlotRequest(subscriptionId, resourceGroupName, name, slot, privateEndpointConnectionName, info); + using var message = CreateApproveOrRejectPrivateEndpointConnectionSlotRequest(subscriptionId, resourceGroupName, name, slot, privateEndpointConnectionName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -31427,20 +32595,20 @@ public async Task ApproveOrRejectPrivateEndpointConnectionSlotAsync(st /// Name of the site. /// The to use. /// The to use. - /// The to use. + /// The to use. /// The cancellation token to use. - /// , , , , or is null. + /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public Response ApproveOrRejectPrivateEndpointConnectionSlot(string subscriptionId, string resourceGroupName, string name, string slot, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + public Response ApproveOrRejectPrivateEndpointConnectionSlot(string subscriptionId, string resourceGroupName, string name, string slot, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNullOrEmpty(slot, nameof(slot)); Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateApproveOrRejectPrivateEndpointConnectionSlotRequest(subscriptionId, resourceGroupName, name, slot, privateEndpointConnectionName, info); + using var message = CreateApproveOrRejectPrivateEndpointConnectionSlotRequest(subscriptionId, resourceGroupName, name, slot, privateEndpointConnectionName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -33460,6 +34628,438 @@ public Response RestoreSnapshotSlot(string subscriptionId, string resourceGroupN } } + internal RequestUriBuilder CreateListSiteContainersSlotRequestUri(string subscriptionId, string resourceGroupName, string name, string slot) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/sitecontainers", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListSiteContainersSlotRequest(string subscriptionId, string resourceGroupName, string name, string slot) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/sitecontainers", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists all the site containers of a site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Name of the deployment slot. If a slot is not specified, the API will get a list of site containers for the production slot. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListSiteContainersSlotAsync(string subscriptionId, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + + using var message = CreateListSiteContainersSlotRequest(subscriptionId, resourceGroupName, name, slot); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.SiteContainerCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.SiteContainerCollection.DeserializeSiteContainerCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists all the site containers of a site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Name of the deployment slot. If a slot is not specified, the API will get a list of site containers for the production slot. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListSiteContainersSlot(string subscriptionId, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + + using var message = CreateListSiteContainersSlotRequest(subscriptionId, resourceGroupName, name, slot); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.SiteContainerCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.SiteContainerCollection.DeserializeSiteContainerCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetSiteContainerSlotRequestUri(string subscriptionId, string resourceGroupName, string name, string slot, string containerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/sitecontainers/", false); + uri.AppendPath(containerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetSiteContainerSlotRequest(string subscriptionId, string resourceGroupName, string name, string slot, string containerName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/sitecontainers/", false); + uri.AppendPath(containerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a site container of a site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Name of the deployment slot. If a slot is not specified, the API will get the Site Container for the production slot. + /// Site Container Name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetSiteContainerSlotAsync(string subscriptionId, string resourceGroupName, string name, string slot, string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var message = CreateGetSiteContainerSlotRequest(subscriptionId, resourceGroupName, name, slot, containerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SiteContainerData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SiteContainerData.DeserializeSiteContainerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SiteContainerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a site container of a site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Name of the deployment slot. If a slot is not specified, the API will get the Site Container for the production slot. + /// Site Container Name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetSiteContainerSlot(string subscriptionId, string resourceGroupName, string name, string slot, string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var message = CreateGetSiteContainerSlotRequest(subscriptionId, resourceGroupName, name, slot, containerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SiteContainerData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SiteContainerData.DeserializeSiteContainerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SiteContainerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateSiteContainerSlotRequestUri(string subscriptionId, string resourceGroupName, string name, string slot, string containerName, SiteContainerData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/sitecontainers/", false); + uri.AppendPath(containerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateSiteContainerSlotRequest(string subscriptionId, string resourceGroupName, string name, string slot, string containerName, SiteContainerData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/sitecontainers/", false); + uri.AppendPath(containerName, true); + 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(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or Updates a site container for a site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Name of the deployment slot. If a slot is not specified, the API will create the container for the production slot. + /// Site Container Name. + /// Container Entity. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateSiteContainerSlotAsync(string subscriptionId, string resourceGroupName, string name, string slot, string containerName, SiteContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateSiteContainerSlotRequest(subscriptionId, resourceGroupName, name, slot, containerName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + SiteContainerData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SiteContainerData.DeserializeSiteContainerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or Updates a site container for a site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Name of the deployment slot. If a slot is not specified, the API will create the container for the production slot. + /// Site Container Name. + /// Container Entity. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdateSiteContainerSlot(string subscriptionId, string resourceGroupName, string name, string slot, string containerName, SiteContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateSiteContainerSlotRequest(subscriptionId, resourceGroupName, name, slot, containerName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + SiteContainerData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SiteContainerData.DeserializeSiteContainerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteSiteContainerSlotRequestUri(string subscriptionId, string resourceGroupName, string name, string slot, string containerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/sitecontainers/", false); + uri.AppendPath(containerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteSiteContainerSlotRequest(string subscriptionId, string resourceGroupName, string name, string slot, string containerName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/sitecontainers/", false); + uri.AppendPath(containerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes a site container for a site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Name of the deployment slot. If a slot is not specified, the API will delete the container for the production slot. + /// Site Container Name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteSiteContainerSlotAsync(string subscriptionId, string resourceGroupName, string name, string slot, string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var message = CreateDeleteSiteContainerSlotRequest(subscriptionId, resourceGroupName, name, slot, containerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes a site container for a site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Name of the deployment slot. If a slot is not specified, the API will delete the container for the production slot. + /// Site Container Name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response DeleteSiteContainerSlot(string subscriptionId, string resourceGroupName, string name, string slot, string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var message = CreateDeleteSiteContainerSlotRequest(subscriptionId, resourceGroupName, name, slot, containerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListSiteExtensionsSlotRequestUri(string subscriptionId, string resourceGroupName, string name, string slot) { var uri = new RawRequestUriBuilder(); @@ -40278,6 +41878,808 @@ public Response GetWebJob(string subscriptionId, string resourceGrou } } + internal RequestUriBuilder CreateDeployWorkflowArtifactsRequestUri(string subscriptionId, string resourceGroupName, string name, WorkflowArtifacts workflowArtifacts) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/deployWorkflowArtifacts", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeployWorkflowArtifactsRequest(string subscriptionId, string resourceGroupName, string name, WorkflowArtifacts workflowArtifacts) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/deployWorkflowArtifacts", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (workflowArtifacts != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(workflowArtifacts, ModelSerializationExtensions.WireOptions); + request.Content = content; + } + _userAgent.Apply(message); + return message; + } + + /// Description for Creates the artifacts for web site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// Application settings and files of the workflow. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeployWorkflowArtifactsAsync(string subscriptionId, string resourceGroupName, string name, WorkflowArtifacts workflowArtifacts = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateDeployWorkflowArtifactsRequest(subscriptionId, resourceGroupName, name, workflowArtifacts); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Creates the artifacts for web site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// Application settings and files of the workflow. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response DeployWorkflowArtifacts(string subscriptionId, string resourceGroupName, string name, WorkflowArtifacts workflowArtifacts = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateDeployWorkflowArtifactsRequest(subscriptionId, resourceGroupName, name, workflowArtifacts); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeployWorkflowArtifactsSlotRequestUri(string subscriptionId, string resourceGroupName, string name, string slot, WorkflowArtifacts workflowArtifacts) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/deployWorkflowArtifacts", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeployWorkflowArtifactsSlotRequest(string subscriptionId, string resourceGroupName, string name, string slot, WorkflowArtifacts workflowArtifacts) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/deployWorkflowArtifacts", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (workflowArtifacts != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(workflowArtifacts, ModelSerializationExtensions.WireOptions); + request.Content = content; + } + _userAgent.Apply(message); + return message; + } + + /// Description for Creates the artifacts for web site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// Name of the deployment slot. + /// Application settings and files of the workflow. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeployWorkflowArtifactsSlotAsync(string subscriptionId, string resourceGroupName, string name, string slot, WorkflowArtifacts workflowArtifacts = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + + using var message = CreateDeployWorkflowArtifactsSlotRequest(subscriptionId, resourceGroupName, name, slot, workflowArtifacts); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for Creates the artifacts for web site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// Name of the deployment slot. + /// Application settings and files of the workflow. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response DeployWorkflowArtifactsSlot(string subscriptionId, string resourceGroupName, string name, string slot, WorkflowArtifacts workflowArtifacts = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + + using var message = CreateDeployWorkflowArtifactsSlotRequest(subscriptionId, resourceGroupName, name, slot, workflowArtifacts); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListInstanceWorkflowsSlotRequestUri(string subscriptionId, string resourceGroupName, string name, string slot) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/workflows", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListInstanceWorkflowsSlotRequest(string subscriptionId, string resourceGroupName, string name, string slot) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/workflows", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List the workflows for a web site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// Name of the deployment slot. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListInstanceWorkflowsSlotAsync(string subscriptionId, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + + using var message = CreateListInstanceWorkflowsSlotRequest(subscriptionId, resourceGroupName, name, slot); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowEnvelopeCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowEnvelopeCollection.DeserializeWorkflowEnvelopeCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List the workflows for a web site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// Name of the deployment slot. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListInstanceWorkflowsSlot(string subscriptionId, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + + using var message = CreateListInstanceWorkflowsSlotRequest(subscriptionId, resourceGroupName, name, slot); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowEnvelopeCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowEnvelopeCollection.DeserializeWorkflowEnvelopeCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetInstanceWorkflowSlotRequestUri(string subscriptionId, string resourceGroupName, string name, string slot, string workflowName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetInstanceWorkflowSlotRequest(string subscriptionId, string resourceGroupName, string name, string slot, string workflowName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get workflow information by its ID for web site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// Name of the deployment slot. + /// Workflow name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetInstanceWorkflowSlotAsync(string subscriptionId, string resourceGroupName, string name, string slot, string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateGetInstanceWorkflowSlotRequest(subscriptionId, resourceGroupName, name, slot, workflowName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowEnvelopeData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowEnvelopeData.DeserializeWorkflowEnvelopeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowEnvelopeData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get workflow information by its ID for web site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// Name of the deployment slot. + /// Workflow name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetInstanceWorkflowSlot(string subscriptionId, string resourceGroupName, string name, string slot, string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateGetInstanceWorkflowSlotRequest(subscriptionId, resourceGroupName, name, slot, workflowName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowEnvelopeData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowEnvelopeData.DeserializeWorkflowEnvelopeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowEnvelopeData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListWorkflowsConnectionsSlotRequestUri(string subscriptionId, string resourceGroupName, string name, string slot) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/listWorkflowsConnections", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListWorkflowsConnectionsSlotRequest(string subscriptionId, string resourceGroupName, string name, string slot) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/slots/", false); + uri.AppendPath(slot, true); + uri.AppendPath("/listWorkflowsConnections", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists logic app's connections for web site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// Name of the deployment slot. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListWorkflowsConnectionsSlotAsync(string subscriptionId, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + + using var message = CreateListWorkflowsConnectionsSlotRequest(subscriptionId, resourceGroupName, name, slot); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowEnvelopeData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowEnvelopeData.DeserializeWorkflowEnvelopeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists logic app's connections for web site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// Name of the deployment slot. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListWorkflowsConnectionsSlot(string subscriptionId, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + + using var message = CreateListWorkflowsConnectionsSlotRequest(subscriptionId, resourceGroupName, name, slot); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowEnvelopeData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowEnvelopeData.DeserializeWorkflowEnvelopeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListWorkflowsRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/workflows", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListWorkflowsRequest(string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/workflows", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List the workflows for a web site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListWorkflowsAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListWorkflowsRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowEnvelopeCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowEnvelopeCollection.DeserializeWorkflowEnvelopeCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List the workflows for a web site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListWorkflows(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListWorkflowsRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowEnvelopeCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowEnvelopeCollection.DeserializeWorkflowEnvelopeCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetWorkflowRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetWorkflowRequest(string subscriptionId, string resourceGroupName, string name, string workflowName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get workflow information by its ID for web site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// Workflow name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetWorkflowAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateGetWorkflowRequest(subscriptionId, resourceGroupName, name, workflowName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowEnvelopeData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowEnvelopeData.DeserializeWorkflowEnvelopeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowEnvelopeData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get workflow information by its ID for web site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// Workflow name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetWorkflow(string subscriptionId, string resourceGroupName, string name, string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateGetWorkflowRequest(subscriptionId, resourceGroupName, name, workflowName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowEnvelopeData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowEnvelopeData.DeserializeWorkflowEnvelopeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowEnvelopeData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListWorkflowsConnectionsRequestUri(string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/listWorkflowsConnections", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListWorkflowsConnectionsRequest(string subscriptionId, string resourceGroupName, string name) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/listWorkflowsConnections", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists logic app's connections for web site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListWorkflowsConnectionsAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListWorkflowsConnectionsRequest(subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowEnvelopeData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowEnvelopeData.DeserializeWorkflowEnvelopeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists logic app's connections for web site, or a deployment slot. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListWorkflowsConnections(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListWorkflowsConnectionsRequest(subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowEnvelopeData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowEnvelopeData.DeserializeWorkflowEnvelopeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId) { var uri = new RawRequestUriBuilder(); @@ -41024,6 +43426,90 @@ public Response ListContinuousWebJobsNextPage(string } } + internal RequestUriBuilder CreateListProductionSiteDeploymentStatusesNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListProductionSiteDeploymentStatusesNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List deployment statuses for an app (or deployment slot, if specified). + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListProductionSiteDeploymentStatusesNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListProductionSiteDeploymentStatusesNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CsmDeploymentStatusCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CsmDeploymentStatusCollection.DeserializeCsmDeploymentStatusCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List deployment statuses for an app (or deployment slot, if specified). + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListProductionSiteDeploymentStatusesNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListProductionSiteDeploymentStatusesNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CsmDeploymentStatusCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CsmDeploymentStatusCollection.DeserializeCsmDeploymentStatusCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListDeploymentsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); @@ -42314,6 +44800,90 @@ public Response ListPublicCertificatesNextPage(stri } } + internal RequestUriBuilder CreateListSiteContainersNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListSiteContainersNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists all the site containers of a site, or a deployment slot. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListSiteContainersNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListSiteContainersNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.SiteContainerCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.SiteContainerCollection.DeserializeSiteContainerCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists all the site containers of a site, or a deployment slot. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListSiteContainersNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListSiteContainersNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.SiteContainerCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.SiteContainerCollection.DeserializeSiteContainerCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListSiteExtensionsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) { var uri = new RawRequestUriBuilder(); @@ -43098,6 +45668,94 @@ public Response ListContinuousWebJobsSlotNextPage(st } } + internal RequestUriBuilder CreateListSlotSiteDeploymentStatusesSlotNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string slot) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListSlotSiteDeploymentStatusesSlotNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string slot) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List deployment statuses for an app (or deployment slot, if specified). + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Name of the deployment slot. If a slot is not specified, the API will get the deployment status for the production slot. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListSlotSiteDeploymentStatusesSlotNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + + using var message = CreateListSlotSiteDeploymentStatusesSlotNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, slot); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CsmDeploymentStatusCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CsmDeploymentStatusCollection.DeserializeCsmDeploymentStatusCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List deployment statuses for an app (or deployment slot, if specified). + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Name of the deployment slot. If a slot is not specified, the API will get the deployment status for the production slot. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListSlotSiteDeploymentStatusesSlotNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + + using var message = CreateListSlotSiteDeploymentStatusesSlotNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, slot); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CsmDeploymentStatusCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CsmDeploymentStatusCollection.DeserializeCsmDeploymentStatusCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListDeploymentsSlotNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string slot) { var uri = new RawRequestUriBuilder(); @@ -44448,6 +47106,94 @@ public Response ListPublicCertificatesSlotNextPage( } } + internal RequestUriBuilder CreateListSiteContainersSlotNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string slot) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListSiteContainersSlotNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string slot) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists all the site containers of a site, or a deployment slot. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Name of the deployment slot. If a slot is not specified, the API will get a list of site containers for the production slot. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListSiteContainersSlotNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + + using var message = CreateListSiteContainersSlotNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, slot); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + Models.SiteContainerCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = Models.SiteContainerCollection.DeserializeSiteContainerCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists all the site containers of a site, or a deployment slot. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Name of the app. + /// Name of the deployment slot. If a slot is not specified, the API will get a list of site containers for the production slot. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListSiteContainersSlotNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + + using var message = CreateListSiteContainersSlotNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, slot); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + Models.SiteContainerCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = Models.SiteContainerCollection.DeserializeSiteContainerCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListSiteExtensionsSlotNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string slot) { var uri = new RawRequestUriBuilder(); @@ -45759,5 +48505,177 @@ public Response ListWebJobsNextPage(string nextLink, string s throw new RequestFailedException(message.Response); } } + + internal RequestUriBuilder CreateListInstanceWorkflowsSlotNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string slot) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListInstanceWorkflowsSlotNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string slot) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List the workflows for a web site, or a deployment slot. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// Name of the deployment slot. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListInstanceWorkflowsSlotNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + + using var message = CreateListInstanceWorkflowsSlotNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, slot); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowEnvelopeCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowEnvelopeCollection.DeserializeWorkflowEnvelopeCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List the workflows for a web site, or a deployment slot. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// Name of the deployment slot. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListInstanceWorkflowsSlotNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(slot, nameof(slot)); + + using var message = CreateListInstanceWorkflowsSlotNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, slot); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowEnvelopeCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowEnvelopeCollection.DeserializeWorkflowEnvelopeCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListWorkflowsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListWorkflowsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List the workflows for a web site, or a deployment slot. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListWorkflowsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListWorkflowsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowEnvelopeCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowEnvelopeCollection.DeserializeWorkflowEnvelopeCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List the workflows for a web site, or a deployment slot. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListWorkflowsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var message = CreateListWorkflowsNextPageRequest(nextLink, subscriptionId, resourceGroupName, name); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowEnvelopeCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowEnvelopeCollection.DeserializeWorkflowEnvelopeCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WebSiteManagementRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WebSiteManagementRestOperations.cs index 3e6d4717f8326..16b1b4c18ff18 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WebSiteManagementRestOperations.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WebSiteManagementRestOperations.cs @@ -32,7 +32,7 @@ public WebSiteManagementRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-02-01"; + _apiVersion = apiVersion ?? "2023-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -592,6 +592,94 @@ public Response CheckNameAvailability(string subscript } } + internal RequestUriBuilder CreateListCustomHostNameSitesRequestUri(string subscriptionId, string hostname) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Web/customhostnameSites", false); + if (hostname != null) + { + uri.AppendQuery("hostname", hostname, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListCustomHostNameSitesRequest(string subscriptionId, string hostname) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Web/customhostnameSites", false); + if (hostname != null) + { + uri.AppendQuery("hostname", hostname, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get custom hostnames under this subscription. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Specific hostname. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListCustomHostNameSitesAsync(string subscriptionId, string hostname = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListCustomHostNameSitesRequest(subscriptionId, hostname); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CustomHostnameSitesCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CustomHostnameSitesCollection.DeserializeCustomHostnameSitesCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get custom hostnames under this subscription. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Specific hostname. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListCustomHostNameSites(string subscriptionId, string hostname = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListCustomHostNameSitesRequest(subscriptionId, hostname); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CustomHostnameSitesCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CustomHostnameSitesCollection.DeserializeCustomHostnameSitesCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateGetSubscriptionDeploymentLocationsRequestUri(string subscriptionId) { var uri = new RawRequestUriBuilder(); @@ -670,6 +758,84 @@ public Response GetSubscriptionDeploymentLocation } } + internal RequestUriBuilder CreateListAseRegionsRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Web/aseRegions", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListAseRegionsRequest(string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Web/aseRegions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for get a list of available ASE regions and its supported Skus. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListAseRegionsAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListAseRegionsRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AseRegionCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AseRegionCollection.DeserializeAseRegionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for get a list of available ASE regions and its supported Skus. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListAseRegions(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListAseRegionsRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AseRegionCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AseRegionCollection.DeserializeAseRegionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListGeoRegionsRequestUri(string subscriptionId, AppServiceSkuName? sku, bool? linuxWorkersEnabled, bool? xenonWorkersEnabled, bool? linuxDynamicWorkersEnabled) { var uri = new RawRequestUriBuilder(); @@ -1360,6 +1526,160 @@ public Response ListBillingMetersNextPage(stri } } + internal RequestUriBuilder CreateListCustomHostNameSitesNextPageRequestUri(string nextLink, string subscriptionId, string hostname) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListCustomHostNameSitesNextPageRequest(string nextLink, string subscriptionId, string hostname) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get custom hostnames under this subscription. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Specific hostname. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListCustomHostNameSitesNextPageAsync(string nextLink, string subscriptionId, string hostname = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListCustomHostNameSitesNextPageRequest(nextLink, subscriptionId, hostname); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CustomHostnameSitesCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CustomHostnameSitesCollection.DeserializeCustomHostnameSitesCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get custom hostnames under this subscription. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Specific hostname. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListCustomHostNameSitesNextPage(string nextLink, string subscriptionId, string hostname = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListCustomHostNameSitesNextPageRequest(nextLink, subscriptionId, hostname); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CustomHostnameSitesCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CustomHostnameSitesCollection.DeserializeCustomHostnameSitesCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListAseRegionsNextPageRequestUri(string nextLink, string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListAseRegionsNextPageRequest(string nextLink, string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Description for get a list of available ASE regions and its supported Skus. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListAseRegionsNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListAseRegionsNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AseRegionCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AseRegionCollection.DeserializeAseRegionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Description for get a list of available ASE regions and its supported Skus. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListAseRegionsNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListAseRegionsNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AseRegionCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AseRegionCollection.DeserializeAseRegionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListGeoRegionsNextPageRequestUri(string nextLink, string subscriptionId, AppServiceSkuName? sku, bool? linuxWorkersEnabled, bool? xenonWorkersEnabled, bool? linuxDynamicWorkersEnabled) { var uri = new RawRequestUriBuilder(); diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowRunActionRepetitionsRequestHistoriesRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowRunActionRepetitionsRequestHistoriesRestOperations.cs new file mode 100644 index 0000000000000..4ea3e131b5f9d --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowRunActionRepetitionsRequestHistoriesRestOperations.cs @@ -0,0 +1,401 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + internal partial class WorkflowRunActionRepetitionsRequestHistoriesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of WorkflowRunActionRepetitionsRequestHistoriesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public WorkflowRunActionRepetitionsRequestHistoriesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-12-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions/", false); + uri.AppendPath(actionName, true); + uri.AppendPath("/repetitions/", false); + uri.AppendPath(repetitionName, true); + uri.AppendPath("/requestHistories", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions/", false); + uri.AppendPath(actionName, true); + uri.AppendPath("/repetitions/", false); + uri.AppendPath(repetitionName, true); + uri.AppendPath("/requestHistories", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List a workflow run repetition request history. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The workflow repetition. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RequestHistoryListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = RequestHistoryListResult.DeserializeRequestHistoryListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List a workflow run repetition request history. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The workflow repetition. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RequestHistoryListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = RequestHistoryListResult.DeserializeRequestHistoryListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName, string requestHistoryName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions/", false); + uri.AppendPath(actionName, true); + uri.AppendPath("/repetitions/", false); + uri.AppendPath(repetitionName, true); + uri.AppendPath("/requestHistories/", false); + uri.AppendPath(requestHistoryName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName, string requestHistoryName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions/", false); + uri.AppendPath(actionName, true); + uri.AppendPath("/repetitions/", false); + uri.AppendPath(repetitionName, true); + uri.AppendPath("/requestHistories/", false); + uri.AppendPath(requestHistoryName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a workflow run repetition request history. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The workflow repetition. + /// The request history name. + /// The cancellation token to use. + /// , , , , , , or is null. + /// , , , , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName, string requestHistoryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + Argument.AssertNotNullOrEmpty(requestHistoryName, nameof(requestHistoryName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName, requestHistoryName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WebAppRequestHistoryData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WebAppRequestHistoryData.DeserializeWebAppRequestHistoryData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WebAppRequestHistoryData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a workflow run repetition request history. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The workflow repetition. + /// The request history name. + /// The cancellation token to use. + /// , , , , , , or is null. + /// , , , , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName, string requestHistoryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + Argument.AssertNotNullOrEmpty(requestHistoryName, nameof(requestHistoryName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName, requestHistoryName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WebAppRequestHistoryData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WebAppRequestHistoryData.DeserializeWebAppRequestHistoryData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WebAppRequestHistoryData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List a workflow run repetition request history. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The workflow repetition. + /// The cancellation token to use. + /// , , , , , , or is null. + /// , , , , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RequestHistoryListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = RequestHistoryListResult.DeserializeRequestHistoryListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List a workflow run repetition request history. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The workflow repetition. + /// The cancellation token to use. + /// , , , , , , or is null. + /// , , , , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RequestHistoryListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = RequestHistoryListResult.DeserializeRequestHistoryListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowRunActionRepetitionsRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowRunActionRepetitionsRestOperations.cs new file mode 100644 index 0000000000000..87d9d311e4daf --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowRunActionRepetitionsRestOperations.cs @@ -0,0 +1,607 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + internal partial class WorkflowRunActionRepetitionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of WorkflowRunActionRepetitionsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public WorkflowRunActionRepetitionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-12-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions/", false); + uri.AppendPath(actionName, true); + uri.AppendPath("/repetitions", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions/", false); + uri.AppendPath(actionName, true); + uri.AppendPath("/repetitions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get all of a workflow run action repetitions. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunActionRepetitionDefinitionCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowRunActionRepetitionDefinitionCollection.DeserializeWorkflowRunActionRepetitionDefinitionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get all of a workflow run action repetitions. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunActionRepetitionDefinitionCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowRunActionRepetitionDefinitionCollection.DeserializeWorkflowRunActionRepetitionDefinitionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions/", false); + uri.AppendPath(actionName, true); + uri.AppendPath("/repetitions/", false); + uri.AppendPath(repetitionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions/", false); + uri.AppendPath(actionName, true); + uri.AppendPath("/repetitions/", false); + uri.AppendPath(repetitionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a workflow run action repetition. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The workflow repetition. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunActionRepetitionDefinitionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowRunActionRepetitionDefinitionData.DeserializeWorkflowRunActionRepetitionDefinitionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowRunActionRepetitionDefinitionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a workflow run action repetition. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The workflow repetition. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunActionRepetitionDefinitionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowRunActionRepetitionDefinitionData.DeserializeWorkflowRunActionRepetitionDefinitionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowRunActionRepetitionDefinitionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListExpressionTracesRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions/", false); + uri.AppendPath(actionName, true); + uri.AppendPath("/repetitions/", false); + uri.AppendPath(repetitionName, true); + uri.AppendPath("/listExpressionTraces", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListExpressionTracesRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions/", false); + uri.AppendPath(actionName, true); + uri.AppendPath("/repetitions/", false); + uri.AppendPath(repetitionName, true); + uri.AppendPath("/listExpressionTraces", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists a workflow run expression trace. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The workflow repetition. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , , or is an empty string, and was expected to be non-empty. + public async Task> ListExpressionTracesAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var message = CreateListExpressionTracesRequest(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExpressionTraces value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ExpressionTraces.DeserializeExpressionTraces(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a workflow run expression trace. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The workflow repetition. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , , or is an empty string, and was expected to be non-empty. + public Response ListExpressionTraces(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var message = CreateListExpressionTracesRequest(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExpressionTraces value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ExpressionTraces.DeserializeExpressionTraces(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get all of a workflow run action repetitions. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunActionRepetitionDefinitionCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowRunActionRepetitionDefinitionCollection.DeserializeWorkflowRunActionRepetitionDefinitionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get all of a workflow run action repetitions. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunActionRepetitionDefinitionCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowRunActionRepetitionDefinitionCollection.DeserializeWorkflowRunActionRepetitionDefinitionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListExpressionTracesNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListExpressionTracesNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists a workflow run expression trace. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The workflow repetition. + /// The cancellation token to use. + /// , , , , , , or is null. + /// , , , , , or is an empty string, and was expected to be non-empty. + public async Task> ListExpressionTracesNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var message = CreateListExpressionTracesNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExpressionTraces value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ExpressionTraces.DeserializeExpressionTraces(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a workflow run expression trace. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The workflow repetition. + /// The cancellation token to use. + /// , , , , , , or is null. + /// , , , , , or is an empty string, and was expected to be non-empty. + public Response ListExpressionTracesNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var message = CreateListExpressionTracesNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExpressionTraces value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ExpressionTraces.DeserializeExpressionTraces(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowRunActionScopeRepetitionsRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowRunActionScopeRepetitionsRestOperations.cs new file mode 100644 index 0000000000000..8da5a5e8d8945 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowRunActionScopeRepetitionsRestOperations.cs @@ -0,0 +1,381 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + internal partial class WorkflowRunActionScopeRepetitionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of WorkflowRunActionScopeRepetitionsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public WorkflowRunActionScopeRepetitionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-12-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions/", false); + uri.AppendPath(actionName, true); + uri.AppendPath("/scopeRepetitions", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions/", false); + uri.AppendPath(actionName, true); + uri.AppendPath("/scopeRepetitions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List the workflow run action scoped repetitions. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunActionRepetitionDefinitionCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowRunActionRepetitionDefinitionCollection.DeserializeWorkflowRunActionRepetitionDefinitionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List the workflow run action scoped repetitions. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunActionRepetitionDefinitionCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowRunActionRepetitionDefinitionCollection.DeserializeWorkflowRunActionRepetitionDefinitionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions/", false); + uri.AppendPath(actionName, true); + uri.AppendPath("/scopeRepetitions/", false); + uri.AppendPath(repetitionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions/", false); + uri.AppendPath(actionName, true); + uri.AppendPath("/scopeRepetitions/", false); + uri.AppendPath(repetitionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a workflow run action scoped repetition. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The workflow repetition. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunActionRepetitionDefinitionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowRunActionRepetitionDefinitionData.DeserializeWorkflowRunActionRepetitionDefinitionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowRunActionRepetitionDefinitionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a workflow run action scoped repetition. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The workflow repetition. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunActionRepetitionDefinitionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowRunActionRepetitionDefinitionData.DeserializeWorkflowRunActionRepetitionDefinitionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowRunActionRepetitionDefinitionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List the workflow run action scoped repetitions. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunActionRepetitionDefinitionCollection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowRunActionRepetitionDefinitionCollection.DeserializeWorkflowRunActionRepetitionDefinitionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List the workflow run action scoped repetitions. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunActionRepetitionDefinitionCollection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowRunActionRepetitionDefinitionCollection.DeserializeWorkflowRunActionRepetitionDefinitionCollection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowRunActionsRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowRunActionsRestOperations.cs new file mode 100644 index 0000000000000..650c841db1ea5 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowRunActionsRestOperations.cs @@ -0,0 +1,599 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + internal partial class WorkflowRunActionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of WorkflowRunActionsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public WorkflowRunActionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-12-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, int? top, string filter) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, int? top, string filter) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a list of workflow run actions. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The number of items to be included in the result. + /// The filter to apply on the operation. Options for filters include: Status. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, name, workflowName, runName, top, filter); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunActionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowRunActionListResult.DeserializeWorkflowRunActionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a list of workflow run actions. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The number of items to be included in the result. + /// The filter to apply on the operation. Options for filters include: Status. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, name, workflowName, runName, top, filter); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunActionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowRunActionListResult.DeserializeWorkflowRunActionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions/", false); + uri.AppendPath(actionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions/", false); + uri.AppendPath(actionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a workflow run action. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunActionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowRunActionData.DeserializeWorkflowRunActionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowRunActionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a workflow run action. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunActionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowRunActionData.DeserializeWorkflowRunActionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowRunActionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListExpressionTracesRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions/", false); + uri.AppendPath(actionName, true); + uri.AppendPath("/listExpressionTraces", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListExpressionTracesRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/actions/", false); + uri.AppendPath(actionName, true); + uri.AppendPath("/listExpressionTraces", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists a workflow run expression trace. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> ListExpressionTracesAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var message = CreateListExpressionTracesRequest(subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExpressionTraces value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ExpressionTraces.DeserializeExpressionTraces(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a workflow run expression trace. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response ListExpressionTraces(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var message = CreateListExpressionTracesRequest(subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExpressionTraces value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ExpressionTraces.DeserializeExpressionTraces(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, int? top, string filter) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, int? top, string filter) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a list of workflow run actions. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The number of items to be included in the result. + /// The filter to apply on the operation. Options for filters include: Status. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, runName, top, filter); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunActionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowRunActionListResult.DeserializeWorkflowRunActionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a list of workflow run actions. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The number of items to be included in the result. + /// The filter to apply on the operation. Options for filters include: Status. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, runName, top, filter); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunActionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowRunActionListResult.DeserializeWorkflowRunActionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListExpressionTracesNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListExpressionTracesNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists a workflow run expression trace. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> ListExpressionTracesNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var message = CreateListExpressionTracesNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExpressionTraces value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ExpressionTraces.DeserializeExpressionTraces(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a workflow run expression trace. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The workflow action name. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response ListExpressionTracesNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var message = CreateListExpressionTracesNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, runName, actionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExpressionTraces value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ExpressionTraces.DeserializeExpressionTraces(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowRunsRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowRunsRestOperations.cs new file mode 100644 index 0000000000000..3d5b344a0b07f --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowRunsRestOperations.cs @@ -0,0 +1,465 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + internal partial class WorkflowRunsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of WorkflowRunsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public WorkflowRunsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-12-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, int? top, string filter) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, int? top, string filter) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a list of workflow runs. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The number of items to be included in the result. + /// The filter to apply on the operation. Options for filters include: Status, StartTime, and ClientTrackingId. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, name, workflowName, top, filter); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowRunListResult.DeserializeWorkflowRunListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a list of workflow runs. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The number of items to be included in the result. + /// The filter to apply on the operation. Options for filters include: Status, StartTime, and ClientTrackingId. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string name, string workflowName, int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, name, workflowName, top, filter); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowRunListResult.DeserializeWorkflowRunListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a workflow run. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name, workflowName, runName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowRunData.DeserializeWorkflowRunData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowRunData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a workflow run. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name, workflowName, runName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowRunData.DeserializeWorkflowRunData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowRunData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCancelRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/cancel", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCancelRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/runs/", false); + uri.AppendPath(runName, true); + uri.AppendPath("/cancel", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Cancels a workflow run. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task CancelAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + + using var message = CreateCancelRequest(subscriptionId, resourceGroupName, name, workflowName, runName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Cancels a workflow run. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow run name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Cancel(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + + using var message = CreateCancelRequest(subscriptionId, resourceGroupName, name, workflowName, runName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, int? top, string filter) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, int? top, string filter) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a list of workflow runs. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The number of items to be included in the result. + /// The filter to apply on the operation. Options for filters include: Status, StartTime, and ClientTrackingId. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, top, filter); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowRunListResult.DeserializeWorkflowRunListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a list of workflow runs. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The number of items to be included in the result. + /// The filter to apply on the operation. Options for filters include: Status, StartTime, and ClientTrackingId. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, top, filter); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowRunListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowRunListResult.DeserializeWorkflowRunListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowTriggerHistoriesRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowTriggerHistoriesRestOperations.cs new file mode 100644 index 0000000000000..5b011927774aa --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowTriggerHistoriesRestOperations.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + internal partial class WorkflowTriggerHistoriesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of WorkflowTriggerHistoriesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public WorkflowTriggerHistoriesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-12-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, int? top, string filter) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/triggers/", false); + uri.AppendPath(triggerName, true); + uri.AppendPath("/histories", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, int? top, string filter) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/triggers/", false); + uri.AppendPath(triggerName, true); + uri.AppendPath("/histories", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a list of workflow trigger histories. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow trigger name. + /// The number of items to be included in the result. + /// The filter to apply on the operation. Options for filters include: Status, StartTime, and ClientTrackingId. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, name, workflowName, triggerName, top, filter); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowTriggerHistoryListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowTriggerHistoryListResult.DeserializeWorkflowTriggerHistoryListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a list of workflow trigger histories. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow trigger name. + /// The number of items to be included in the result. + /// The filter to apply on the operation. Options for filters include: Status, StartTime, and ClientTrackingId. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, name, workflowName, triggerName, top, filter); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowTriggerHistoryListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowTriggerHistoryListResult.DeserializeWorkflowTriggerHistoryListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, string historyName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/triggers/", false); + uri.AppendPath(triggerName, true); + uri.AppendPath("/histories/", false); + uri.AppendPath(historyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, string historyName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/triggers/", false); + uri.AppendPath(triggerName, true); + uri.AppendPath("/histories/", false); + uri.AppendPath(historyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a workflow trigger history. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow trigger name. + /// The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, string historyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + Argument.AssertNotNullOrEmpty(historyName, nameof(historyName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name, workflowName, triggerName, historyName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowTriggerHistoryData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowTriggerHistoryData.DeserializeWorkflowTriggerHistoryData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowTriggerHistoryData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a workflow trigger history. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow trigger name. + /// The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, string historyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + Argument.AssertNotNullOrEmpty(historyName, nameof(historyName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name, workflowName, triggerName, historyName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowTriggerHistoryData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowTriggerHistoryData.DeserializeWorkflowTriggerHistoryData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowTriggerHistoryData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateResubmitRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, string historyName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/triggers/", false); + uri.AppendPath(triggerName, true); + uri.AppendPath("/histories/", false); + uri.AppendPath(historyName, true); + uri.AppendPath("/resubmit", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateResubmitRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, string historyName) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/triggers/", false); + uri.AppendPath(triggerName, true); + uri.AppendPath("/histories/", false); + uri.AppendPath(historyName, true); + uri.AppendPath("/resubmit", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Resubmits a workflow run based on the trigger history. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow trigger name. + /// The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task ResubmitAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, string historyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + Argument.AssertNotNullOrEmpty(historyName, nameof(historyName)); + + using var message = CreateResubmitRequest(subscriptionId, resourceGroupName, name, workflowName, triggerName, historyName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Resubmits a workflow run based on the trigger history. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow trigger name. + /// The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Resubmit(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, string historyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + Argument.AssertNotNullOrEmpty(historyName, nameof(historyName)); + + using var message = CreateResubmitRequest(subscriptionId, resourceGroupName, name, workflowName, triggerName, historyName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, int? top, string filter) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, int? top, string filter) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a list of workflow trigger histories. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow trigger name. + /// The number of items to be included in the result. + /// The filter to apply on the operation. Options for filters include: Status, StartTime, and ClientTrackingId. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, triggerName, top, filter); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowTriggerHistoryListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowTriggerHistoryListResult.DeserializeWorkflowTriggerHistoryListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a list of workflow trigger histories. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow trigger name. + /// The number of items to be included in the result. + /// The filter to apply on the operation. Options for filters include: Status, StartTime, and ClientTrackingId. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, triggerName, top, filter); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowTriggerHistoryListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowTriggerHistoryListResult.DeserializeWorkflowTriggerHistoryListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowTriggersRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowTriggersRestOperations.cs new file mode 100644 index 0000000000000..b31d20642004c --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowTriggersRestOperations.cs @@ -0,0 +1,687 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + internal partial class WorkflowTriggersRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of WorkflowTriggersRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public WorkflowTriggersRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-12-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, int? top, string filter) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/triggers", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, int? top, string filter) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/triggers", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a list of workflow triggers. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The number of items to be included in the result. + /// The filter to apply on the operation. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, name, workflowName, top, filter); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowTriggerListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowTriggerListResult.DeserializeWorkflowTriggerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a list of workflow triggers. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The number of items to be included in the result. + /// The filter to apply on the operation. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string name, string workflowName, int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, name, workflowName, top, filter); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowTriggerListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowTriggerListResult.DeserializeWorkflowTriggerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/triggers/", false); + uri.AppendPath(triggerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/triggers/", false); + uri.AppendPath(triggerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a workflow trigger. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow trigger name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name, workflowName, triggerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowTriggerData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowTriggerData.DeserializeWorkflowTriggerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowTriggerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a workflow trigger. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow trigger name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name, workflowName, triggerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowTriggerData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowTriggerData.DeserializeWorkflowTriggerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowTriggerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListCallbackUrlRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/triggers/", false); + uri.AppendPath(triggerName, true); + uri.AppendPath("/listCallbackUrl", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListCallbackUrlRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/triggers/", false); + uri.AppendPath(triggerName, true); + uri.AppendPath("/listCallbackUrl", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the callback URL for a workflow trigger. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow trigger name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListCallbackUrlAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + + using var message = CreateListCallbackUrlRequest(subscriptionId, resourceGroupName, name, workflowName, triggerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowTriggerCallbackUri value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowTriggerCallbackUri.DeserializeWorkflowTriggerCallbackUri(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the callback URL for a workflow trigger. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow trigger name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListCallbackUrl(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + + using var message = CreateListCallbackUrlRequest(subscriptionId, resourceGroupName, name, workflowName, triggerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowTriggerCallbackUri value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowTriggerCallbackUri.DeserializeWorkflowTriggerCallbackUri(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateRunRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/triggers/", false); + uri.AppendPath(triggerName, true); + uri.AppendPath("/run", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateRunRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/triggers/", false); + uri.AppendPath(triggerName, true); + uri.AppendPath("/run", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Runs a workflow trigger. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow trigger name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task RunAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + + using var message = CreateRunRequest(subscriptionId, resourceGroupName, name, workflowName, triggerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Runs a workflow trigger. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow trigger name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Run(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + + using var message = CreateRunRequest(subscriptionId, resourceGroupName, name, workflowName, triggerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetSchemaJsonRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/triggers/", false); + uri.AppendPath(triggerName, true); + uri.AppendPath("/schemas/json", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetSchemaJsonRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/triggers/", false); + uri.AppendPath(triggerName, true); + uri.AppendPath("/schemas/json", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the trigger schema as JSON. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow trigger name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetSchemaJsonAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + + using var message = CreateGetSchemaJsonRequest(subscriptionId, resourceGroupName, name, workflowName, triggerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WebAppJsonSchema value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WebAppJsonSchema.DeserializeWebAppJsonSchema(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the trigger schema as JSON. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow trigger name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetSchemaJson(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + + using var message = CreateGetSchemaJsonRequest(subscriptionId, resourceGroupName, name, workflowName, triggerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WebAppJsonSchema value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WebAppJsonSchema.DeserializeWebAppJsonSchema(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, int? top, string filter) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, int? top, string filter) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a list of workflow triggers. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The number of items to be included in the result. + /// The filter to apply on the operation. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, top, filter); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowTriggerListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowTriggerListResult.DeserializeWorkflowTriggerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a list of workflow triggers. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The number of items to be included in the result. + /// The filter to apply on the operation. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, top, filter); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowTriggerListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowTriggerListResult.DeserializeWorkflowTriggerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowVersionsRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowVersionsRestOperations.cs new file mode 100644 index 0000000000000..5931ea377155f --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowVersionsRestOperations.cs @@ -0,0 +1,353 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + internal partial class WorkflowVersionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of WorkflowVersionsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public WorkflowVersionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-12-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/versions", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/versions", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a list of workflow versions. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The number of items to be included in the result. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, name, workflowName, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowVersionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowVersionListResult.DeserializeWorkflowVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a list of workflow versions. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The number of items to be included in the result. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string name, string workflowName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, name, workflowName, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowVersionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowVersionListResult.DeserializeWorkflowVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, string versionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(versionId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, string versionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(versionId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a workflow version. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow versionId. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, string versionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(versionId, nameof(versionId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name, workflowName, versionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowVersionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowVersionData.DeserializeWorkflowVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a workflow version. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow versionId. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string name, string workflowName, string versionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNullOrEmpty(versionId, nameof(versionId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, name, workflowName, versionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowVersionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowVersionData.DeserializeWorkflowVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((WorkflowVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, int? top) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, int? top) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a list of workflow versions. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The number of items to be included in the result. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, top); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + WorkflowVersionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = WorkflowVersionListResult.DeserializeWorkflowVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a list of workflow versions. + /// The URL to the next page of results. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The number of items to be included in the result. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string name, string workflowName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, name, workflowName, top); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + WorkflowVersionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = WorkflowVersionListResult.DeserializeWorkflowVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowsRestOperations.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowsRestOperations.cs new file mode 100644 index 0000000000000..8400673c29430 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/RestOperations/WorkflowsRestOperations.cs @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + internal partial class WorkflowsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of WorkflowsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public WorkflowsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-12-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateRegenerateAccessKeyRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, WorkflowRegenerateActionContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/regenerateAccessKey", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateRegenerateAccessKeyRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, WorkflowRegenerateActionContent content) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/regenerateAccessKey", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Regenerates the callback URL access key for request triggers. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The access key type. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task RegenerateAccessKeyAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, WorkflowRegenerateActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateRegenerateAccessKeyRequest(subscriptionId, resourceGroupName, name, workflowName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Regenerates the callback URL access key for request triggers. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The access key type. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response RegenerateAccessKey(string subscriptionId, string resourceGroupName, string name, string workflowName, WorkflowRegenerateActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateRegenerateAccessKeyRequest(subscriptionId, resourceGroupName, name, workflowName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateValidateRequestUri(string subscriptionId, string resourceGroupName, string name, string workflowName, WorkflowData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/validate", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateValidateRequest(string subscriptionId, string resourceGroupName, string name, string workflowName, WorkflowData data) + { + 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("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Web/sites/", false); + uri.AppendPath(name, true); + uri.AppendPath("/hostruntime/runtime/webhooks/workflow/api/management/workflows/", false); + uri.AppendPath(workflowName, true); + uri.AppendPath("/validate", 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(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Validates the workflow definition. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task ValidateAsync(string subscriptionId, string resourceGroupName, string name, string workflowName, WorkflowData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateValidateRequest(subscriptionId, resourceGroupName, name, workflowName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Validates the workflow definition. + /// Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + /// Name of the resource group to which the resource belongs. + /// Site name. + /// The workflow name. + /// The workflow. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Validate(string subscriptionId, string resourceGroupName, string name, string workflowName, WorkflowData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateValidateRequest(subscriptionId, resourceGroupName, name, workflowName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ScmSiteBasicPublishingCredentialsPolicyResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ScmSiteBasicPublishingCredentialsPolicyResource.cs index ee99474e20f34..ef46aa536d198 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ScmSiteBasicPublishingCredentialsPolicyResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ScmSiteBasicPublishingCredentialsPolicyResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ScmSiteSlotBasicPublishingCredentialsPolicyResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ScmSiteSlotBasicPublishingCredentialsPolicyResource.cs index 187505840150c..380537f001f5e 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ScmSiteSlotBasicPublishingCredentialsPolicyResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ScmSiteSlotBasicPublishingCredentialsPolicyResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteBackupCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteBackupCollection.cs index 5356d13a11fcd..902a4c4ed6c73 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteBackupCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteBackupCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string backupId /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string backupId, CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken c /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string backupId, Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string backupId, CancellationToken cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExistsAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteBackupResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteBackupResource.cs index 3e2616558237c..ec0cca9815af1 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteBackupResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteBackupResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> GetBackupStatusSecretsAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -354,7 +354,7 @@ public virtual Response GetBackupStatusSecrets(WebAppBackupI /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual async Task RestoreAsync(WaitUntil waitUntil, Restor /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigAppsettingCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigAppsettingCollection.cs index cb9406825a5eb..b4878ddd70475 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigAppsettingCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigAppsettingCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string appSettingKey, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken c /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string appSettingKey, Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string appSettingKey, CancellationToken can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigAppsettingResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigAppsettingResource.cs index 9a67cd98ff0b6..a29f6e74e3300 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigAppsettingResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigAppsettingResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigData.Serialization.cs index 8b27aafabec1c..0653b1e4bb49c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigData.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigData.Serialization.cs @@ -307,6 +307,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WriteNull("appSettings"); } } + if (Optional.IsCollectionDefined(Metadata)) + { + if (Metadata != null) + { + writer.WritePropertyName("metadata"u8); + writer.WriteStartArray(); + foreach (var item in Metadata) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("metadata"); + } + } if (Optional.IsCollectionDefined(ConnectionStrings)) { if (ConnectionStrings != null) @@ -723,6 +740,18 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WriteNull("ipSecurityRestrictions"); } } + if (Optional.IsDefined(IPSecurityRestrictionsDefaultAction)) + { + if (IPSecurityRestrictionsDefaultAction != null) + { + writer.WritePropertyName("ipSecurityRestrictionsDefaultAction"u8); + writer.WriteStringValue(IPSecurityRestrictionsDefaultAction.Value.ToString()); + } + else + { + writer.WriteNull("ipSecurityRestrictionsDefaultAction"); + } + } if (Optional.IsCollectionDefined(ScmIPSecurityRestrictions)) { if (ScmIPSecurityRestrictions != null) @@ -740,6 +769,18 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WriteNull("scmIpSecurityRestrictions"); } } + if (Optional.IsDefined(ScmIPSecurityRestrictionsDefaultAction)) + { + if (ScmIPSecurityRestrictionsDefaultAction != null) + { + writer.WritePropertyName("scmIpSecurityRestrictionsDefaultAction"u8); + writer.WriteStringValue(ScmIPSecurityRestrictionsDefaultAction.Value.ToString()); + } + else + { + writer.WriteNull("scmIpSecurityRestrictionsDefaultAction"); + } + } if (Optional.IsDefined(AllowIPSecurityRestrictionsForScmToUseMain)) { if (AllowIPSecurityRestrictionsForScmToUseMain != null) @@ -776,6 +817,18 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WriteNull("minTlsVersion"); } } + if (Optional.IsDefined(MinTlsCipherSuite)) + { + if (MinTlsCipherSuite != null) + { + writer.WritePropertyName("minTlsCipherSuite"u8); + writer.WriteStringValue(MinTlsCipherSuite.Value.ToString()); + } + else + { + writer.WriteNull("minTlsCipherSuite"); + } + } if (Optional.IsDefined(ScmMinTlsVersion)) { if (ScmMinTlsVersion != null) @@ -824,6 +877,18 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WriteNull("functionAppScaleLimit"); } } + if (Optional.IsDefined(ElasticWebAppScaleLimit)) + { + if (ElasticWebAppScaleLimit != null) + { + writer.WritePropertyName("elasticWebAppScaleLimit"u8); + writer.WriteNumberValue(ElasticWebAppScaleLimit.Value); + } + else + { + writer.WriteNull("elasticWebAppScaleLimit"); + } + } if (Optional.IsDefined(HealthCheckPath)) { if (HealthCheckPath != null) @@ -966,6 +1031,7 @@ internal static SiteConfigData DeserializeSiteConfigData(JsonElement element, Mo bool? detailedErrorLoggingEnabled = default; string publishingUsername = default; IList appSettings = default; + IList metadata = default; IList connectionStrings = default; SiteMachineKey machineKey = default; IList handlerMappings = default; @@ -999,14 +1065,18 @@ internal static SiteConfigData DeserializeSiteConfigData(JsonElement element, Mo int? xManagedServiceIdentityId = default; string keyVaultReferenceIdentity = default; IList ipSecurityRestrictions = default; + SiteDefaultAction? ipSecurityRestrictionsDefaultAction = default; IList scmIPSecurityRestrictions = default; + SiteDefaultAction? scmIPSecurityRestrictionsDefaultAction = default; bool? scmIPSecurityRestrictionsUseMain = default; bool? http20Enabled = default; AppServiceSupportedTlsVersion? minTlsVersion = default; + AppServiceTlsCipherSuite? minTlsCipherSuite = default; AppServiceSupportedTlsVersion? scmMinTlsVersion = default; AppServiceFtpsState? ftpsState = default; int? preWarmedInstanceCount = default; int? functionAppScaleLimit = default; + int? elasticWebAppScaleLimit = default; string healthCheckPath = default; bool? functionsRuntimeScaleMonitoringEnabled = default; string websiteTimeZone = default; @@ -1265,6 +1335,21 @@ internal static SiteConfigData DeserializeSiteConfigData(JsonElement element, Mo appSettings = array; continue; } + if (property0.NameEquals("metadata"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + metadata = null; + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(AppServiceNameValuePair.DeserializeAppServiceNameValuePair(item, options)); + } + metadata = array; + continue; + } if (property0.NameEquals("connectionStrings"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -1615,6 +1700,16 @@ internal static SiteConfigData DeserializeSiteConfigData(JsonElement element, Mo ipSecurityRestrictions = array; continue; } + if (property0.NameEquals("ipSecurityRestrictionsDefaultAction"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + ipSecurityRestrictionsDefaultAction = null; + continue; + } + ipSecurityRestrictionsDefaultAction = new SiteDefaultAction(property0.Value.GetString()); + continue; + } if (property0.NameEquals("scmIpSecurityRestrictions"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -1630,6 +1725,16 @@ internal static SiteConfigData DeserializeSiteConfigData(JsonElement element, Mo scmIPSecurityRestrictions = array; continue; } + if (property0.NameEquals("scmIpSecurityRestrictionsDefaultAction"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + scmIPSecurityRestrictionsDefaultAction = null; + continue; + } + scmIPSecurityRestrictionsDefaultAction = new SiteDefaultAction(property0.Value.GetString()); + continue; + } if (property0.NameEquals("scmIpSecurityRestrictionsUseMain"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -1660,6 +1765,16 @@ internal static SiteConfigData DeserializeSiteConfigData(JsonElement element, Mo minTlsVersion = new AppServiceSupportedTlsVersion(property0.Value.GetString()); continue; } + if (property0.NameEquals("minTlsCipherSuite"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + minTlsCipherSuite = null; + continue; + } + minTlsCipherSuite = new AppServiceTlsCipherSuite(property0.Value.GetString()); + continue; + } if (property0.NameEquals("scmMinTlsVersion"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -1700,6 +1815,16 @@ internal static SiteConfigData DeserializeSiteConfigData(JsonElement element, Mo functionAppScaleLimit = property0.Value.GetInt32(); continue; } + if (property0.NameEquals("elasticWebAppScaleLimit"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + elasticWebAppScaleLimit = null; + continue; + } + elasticWebAppScaleLimit = property0.Value.GetInt32(); + continue; + } if (property0.NameEquals("healthCheckPath"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -1799,6 +1924,7 @@ internal static SiteConfigData DeserializeSiteConfigData(JsonElement element, Mo detailedErrorLoggingEnabled, publishingUsername, appSettings ?? new ChangeTrackingList(), + metadata ?? new ChangeTrackingList(), connectionStrings ?? new ChangeTrackingList(), machineKey, handlerMappings ?? new ChangeTrackingList(), @@ -1832,14 +1958,18 @@ internal static SiteConfigData DeserializeSiteConfigData(JsonElement element, Mo xManagedServiceIdentityId, keyVaultReferenceIdentity, ipSecurityRestrictions ?? new ChangeTrackingList(), + ipSecurityRestrictionsDefaultAction, scmIPSecurityRestrictions ?? new ChangeTrackingList(), + scmIPSecurityRestrictionsDefaultAction, scmIPSecurityRestrictionsUseMain, http20Enabled, minTlsVersion, + minTlsCipherSuite, scmMinTlsVersion, ftpsState, preWarmedInstanceCount, functionAppScaleLimit, + elasticWebAppScaleLimit, healthCheckPath, functionsRuntimeScaleMonitoringEnabled, websiteTimeZone, @@ -2354,6 +2484,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Metadata), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" metadata: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Metadata)) + { + if (Metadata.Any()) + { + builder.Append(" metadata: "); + builder.AppendLine("["); + foreach (var item in Metadata) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " metadata: "); + } + builder.AppendLine(" ]"); + } + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ConnectionStrings), out propertyOverride); if (hasPropertyOverride) { @@ -2974,6 +3127,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IPSecurityRestrictionsDefaultAction), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" ipSecurityRestrictionsDefaultAction: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IPSecurityRestrictionsDefaultAction)) + { + builder.Append(" ipSecurityRestrictionsDefaultAction: "); + builder.AppendLine($"'{IPSecurityRestrictionsDefaultAction.Value.ToString()}'"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScmIPSecurityRestrictions), out propertyOverride); if (hasPropertyOverride) { @@ -2997,6 +3165,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScmIPSecurityRestrictionsDefaultAction), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scmIpSecurityRestrictionsDefaultAction: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ScmIPSecurityRestrictionsDefaultAction)) + { + builder.Append(" scmIpSecurityRestrictionsDefaultAction: "); + builder.AppendLine($"'{ScmIPSecurityRestrictionsDefaultAction.Value.ToString()}'"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AllowIPSecurityRestrictionsForScmToUseMain), out propertyOverride); if (hasPropertyOverride) { @@ -3044,6 +3227,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MinTlsCipherSuite), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" minTlsCipherSuite: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MinTlsCipherSuite)) + { + builder.Append(" minTlsCipherSuite: "); + builder.AppendLine($"'{MinTlsCipherSuite.Value.ToString()}'"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScmMinTlsVersion), out propertyOverride); if (hasPropertyOverride) { @@ -3104,6 +3302,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ElasticWebAppScaleLimit), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" elasticWebAppScaleLimit: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ElasticWebAppScaleLimit)) + { + builder.Append(" elasticWebAppScaleLimit: "); + builder.AppendLine($"{ElasticWebAppScaleLimit.Value}"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(HealthCheckPath), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigData.cs index 49ee7cc15effb..053352629af5a 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigData.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigData.cs @@ -56,6 +56,7 @@ public SiteConfigData() { DefaultDocuments = new ChangeTrackingList(); AppSettings = new ChangeTrackingList(); + Metadata = new ChangeTrackingList(); ConnectionStrings = new ChangeTrackingList(); HandlerMappings = new ChangeTrackingList(); VirtualApplications = new ChangeTrackingList(); @@ -89,6 +90,7 @@ public SiteConfigData() /// <code>true</code> if detailed error logging is enabled; otherwise, <code>false</code>. /// Publishing user name. /// Application settings. + /// Application metadata. This property cannot be retrieved, since it may contain secrets. /// Connection strings. /// Site MachineKey. /// Handler mappings. @@ -122,10 +124,13 @@ public SiteConfigData() /// Explicit Managed Service Identity Id. /// Identity to use for Key Vault Reference authentication. /// IP security restrictions for main. + /// Default action for main access restriction if no rules are matched. /// IP security restrictions for scm. + /// Default action for scm access restriction if no rules are matched. /// 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. + /// The minimum strength TLS cipher suite allowed for an application. /// ScmMinTlsVersion: configures the minimum version of TLS required for SSL requests for SCM site. /// State of FTP / FTPS service. /// @@ -136,6 +141,10 @@ public SiteConfigData() /// Maximum number of workers that a site can scale out to. /// This setting only applies to the Consumption and Elastic Premium Plans /// + /// + /// Maximum number of workers that a site can scale out to. + /// This setting only applies to apps in plans where ElasticScaleEnabled is <code>true</code> + /// /// Health check path. /// /// Gets or sets a value indicating whether functions runtime scale monitoring is enabled. When enabled, @@ -151,7 +160,7 @@ public SiteConfigData() /// Property to allow or block all public traffic. /// Kind of resource. /// Keeps track of any properties unknown to the library. - internal SiteConfigData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, int? numberOfWorkers, IList defaultDocuments, string netFrameworkVersion, string phpVersion, string pythonVersion, string nodeVersion, string powerShellVersion, string linuxFxVersion, string windowsFxVersion, bool? isRequestTracingEnabled, DateTimeOffset? requestTracingExpirationOn, bool? isRemoteDebuggingEnabled, string remoteDebuggingVersion, bool? isHttpLoggingEnabled, bool? useManagedIdentityCreds, string acrUserManagedIdentityId, int? logsDirectorySizeLimit, bool? isDetailedErrorLoggingEnabled, string publishingUsername, IList appSettings, IList connectionStrings, SiteMachineKey machineKey, IList handlerMappings, string documentRoot, ScmType? scmType, bool? use32BitWorkerProcess, bool? isWebSocketsEnabled, bool? isAlwaysOn, string javaVersion, string javaContainer, string javaContainerVersion, string appCommandLine, ManagedPipelineMode? managedPipelineMode, IList virtualApplications, SiteLoadBalancing? loadBalancing, RoutingRuleExperiments experiments, SiteLimits limits, bool? isAutoHealEnabled, AutoHealRules autoHealRules, string tracingOptions, string vnetName, bool? isVnetRouteAllEnabled, int? vnetPrivatePortsCount, AppServiceCorsSettings cors, WebAppPushSettings push, AppServiceApiDefinitionInfo apiDefinition, ApiManagementConfig apiManagementConfig, string autoSwapSlotName, bool? isLocalMySqlEnabled, int? managedServiceIdentityId, int? xManagedServiceIdentityId, string keyVaultReferenceIdentity, IList ipSecurityRestrictions, IList scmIPSecurityRestrictions, bool? allowIPSecurityRestrictionsForScmToUseMain, bool? isHttp20Enabled, AppServiceSupportedTlsVersion? minTlsVersion, AppServiceSupportedTlsVersion? scmMinTlsVersion, AppServiceFtpsState? ftpsState, int? preWarmedInstanceCount, int? functionAppScaleLimit, string healthCheckPath, bool? isFunctionsRuntimeScaleMonitoringEnabled, string websiteTimeZone, int? minimumElasticInstanceCount, IDictionary azureStorageAccounts, string publicNetworkAccess, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal SiteConfigData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, int? numberOfWorkers, IList defaultDocuments, string netFrameworkVersion, string phpVersion, string pythonVersion, string nodeVersion, string powerShellVersion, string linuxFxVersion, string windowsFxVersion, bool? isRequestTracingEnabled, DateTimeOffset? requestTracingExpirationOn, bool? isRemoteDebuggingEnabled, string remoteDebuggingVersion, bool? isHttpLoggingEnabled, bool? useManagedIdentityCreds, string acrUserManagedIdentityId, int? logsDirectorySizeLimit, bool? isDetailedErrorLoggingEnabled, string publishingUsername, IList appSettings, IList metadata, IList connectionStrings, SiteMachineKey machineKey, IList handlerMappings, string documentRoot, ScmType? scmType, bool? use32BitWorkerProcess, bool? isWebSocketsEnabled, bool? isAlwaysOn, string javaVersion, string javaContainer, string javaContainerVersion, string appCommandLine, ManagedPipelineMode? managedPipelineMode, IList virtualApplications, SiteLoadBalancing? loadBalancing, RoutingRuleExperiments experiments, SiteLimits limits, bool? isAutoHealEnabled, AutoHealRules autoHealRules, string tracingOptions, string vnetName, bool? isVnetRouteAllEnabled, int? vnetPrivatePortsCount, AppServiceCorsSettings cors, WebAppPushSettings push, AppServiceApiDefinitionInfo apiDefinition, ApiManagementConfig apiManagementConfig, string autoSwapSlotName, bool? isLocalMySqlEnabled, int? managedServiceIdentityId, int? xManagedServiceIdentityId, string keyVaultReferenceIdentity, IList ipSecurityRestrictions, SiteDefaultAction? ipSecurityRestrictionsDefaultAction, IList scmIPSecurityRestrictions, SiteDefaultAction? scmIPSecurityRestrictionsDefaultAction, bool? allowIPSecurityRestrictionsForScmToUseMain, bool? isHttp20Enabled, AppServiceSupportedTlsVersion? minTlsVersion, AppServiceTlsCipherSuite? minTlsCipherSuite, AppServiceSupportedTlsVersion? scmMinTlsVersion, AppServiceFtpsState? ftpsState, int? preWarmedInstanceCount, int? functionAppScaleLimit, int? elasticWebAppScaleLimit, string healthCheckPath, bool? isFunctionsRuntimeScaleMonitoringEnabled, string websiteTimeZone, int? minimumElasticInstanceCount, IDictionary azureStorageAccounts, string publicNetworkAccess, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { NumberOfWorkers = numberOfWorkers; DefaultDocuments = defaultDocuments; @@ -173,6 +182,7 @@ internal SiteConfigData(ResourceIdentifier id, string name, ResourceType resourc IsDetailedErrorLoggingEnabled = isDetailedErrorLoggingEnabled; PublishingUsername = publishingUsername; AppSettings = appSettings; + Metadata = metadata; ConnectionStrings = connectionStrings; MachineKey = machineKey; HandlerMappings = handlerMappings; @@ -206,14 +216,18 @@ internal SiteConfigData(ResourceIdentifier id, string name, ResourceType resourc XManagedServiceIdentityId = xManagedServiceIdentityId; KeyVaultReferenceIdentity = keyVaultReferenceIdentity; IPSecurityRestrictions = ipSecurityRestrictions; + IPSecurityRestrictionsDefaultAction = ipSecurityRestrictionsDefaultAction; ScmIPSecurityRestrictions = scmIPSecurityRestrictions; + ScmIPSecurityRestrictionsDefaultAction = scmIPSecurityRestrictionsDefaultAction; AllowIPSecurityRestrictionsForScmToUseMain = allowIPSecurityRestrictionsForScmToUseMain; IsHttp20Enabled = isHttp20Enabled; MinTlsVersion = minTlsVersion; + MinTlsCipherSuite = minTlsCipherSuite; ScmMinTlsVersion = scmMinTlsVersion; FtpsState = ftpsState; PreWarmedInstanceCount = preWarmedInstanceCount; FunctionAppScaleLimit = functionAppScaleLimit; + ElasticWebAppScaleLimit = elasticWebAppScaleLimit; HealthCheckPath = healthCheckPath; IsFunctionsRuntimeScaleMonitoringEnabled = isFunctionsRuntimeScaleMonitoringEnabled; WebsiteTimeZone = websiteTimeZone; @@ -284,6 +298,9 @@ internal SiteConfigData(ResourceIdentifier id, string name, ResourceType resourc /// Application settings. [WirePath("properties.appSettings")] public IList AppSettings { get; set; } + /// Application metadata. This property cannot be retrieved, since it may contain secrets. + [WirePath("properties.metadata")] + public IList Metadata { get; set; } /// Connection strings. [WirePath("properties.connectionStrings")] public IList ConnectionStrings { get; set; } @@ -418,9 +435,15 @@ public string ApiManagementConfigId /// IP security restrictions for main. [WirePath("properties.ipSecurityRestrictions")] public IList IPSecurityRestrictions { get; set; } + /// Default action for main access restriction if no rules are matched. + [WirePath("properties.ipSecurityRestrictionsDefaultAction")] + public SiteDefaultAction? IPSecurityRestrictionsDefaultAction { get; set; } /// IP security restrictions for scm. [WirePath("properties.scmIpSecurityRestrictions")] public IList ScmIPSecurityRestrictions { get; set; } + /// Default action for scm access restriction if no rules are matched. + [WirePath("properties.scmIpSecurityRestrictionsDefaultAction")] + public SiteDefaultAction? ScmIPSecurityRestrictionsDefaultAction { get; set; } /// IP security restrictions for scm to use main. [WirePath("properties.scmIpSecurityRestrictionsUseMain")] public bool? AllowIPSecurityRestrictionsForScmToUseMain { get; set; } @@ -430,6 +453,9 @@ public string ApiManagementConfigId /// MinTlsVersion: configures the minimum version of TLS required for SSL requests. [WirePath("properties.minTlsVersion")] public AppServiceSupportedTlsVersion? MinTlsVersion { get; set; } + /// The minimum strength TLS cipher suite allowed for an application. + [WirePath("properties.minTlsCipherSuite")] + public AppServiceTlsCipherSuite? MinTlsCipherSuite { get; set; } /// ScmMinTlsVersion: configures the minimum version of TLS required for SSL requests for SCM site. [WirePath("properties.scmMinTlsVersion")] public AppServiceSupportedTlsVersion? ScmMinTlsVersion { get; set; } @@ -448,6 +474,12 @@ public string ApiManagementConfigId /// [WirePath("properties.functionAppScaleLimit")] public int? FunctionAppScaleLimit { get; set; } + /// + /// Maximum number of workers that a site can scale out to. + /// This setting only applies to apps in plans where ElasticScaleEnabled is <code>true</code> + /// + [WirePath("properties.elasticWebAppScaleLimit")] + public int? ElasticWebAppScaleLimit { get; set; } /// Health check path. [WirePath("properties.healthCheckPath")] public string HealthCheckPath { get; set; } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigSnapshotCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigSnapshotCollection.cs index a29f17e920c12..20c54dbc96db9 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigSnapshotCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigSnapshotCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -106,7 +106,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -151,7 +151,7 @@ public virtual Response Get(string snapshotId, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -194,7 +194,7 @@ public virtual async Task> ExistsAsync(string snapshotId, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -237,7 +237,7 @@ public virtual Response Exists(string snapshotId, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigSnapshotResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigSnapshotResource.cs index 2f10aaf57395e..eca7af0cdd0f9 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigSnapshotResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigSnapshotResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -219,7 +219,7 @@ public virtual async Task RecoverSiteConfigurationSnapshotAsync(Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerCollection.cs new file mode 100644 index 0000000000000..0d0be326b8b33 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerCollection.cs @@ -0,0 +1,497 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetSiteContainers method from an instance of . + /// + public partial class SiteContainerCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _siteContainerWebAppsClientDiagnostics; + private readonly WebAppsRestOperations _siteContainerWebAppsRestClient; + + /// Initializes a new instance of the class for mocking. + protected SiteContainerCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal SiteContainerCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _siteContainerWebAppsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", SiteContainerResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SiteContainerResource.ResourceType, out string siteContainerWebAppsApiVersion); + _siteContainerWebAppsRestClient = new WebAppsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, siteContainerWebAppsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != WebSiteResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WebSiteResource.ResourceType), nameof(id)); + } + + /// + /// Creates or Updates a site container for a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_CreateOrUpdateSiteContainer + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Site Container Name. + /// Container Entity. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string containerName, SiteContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _siteContainerWebAppsClientDiagnostics.CreateScope("SiteContainerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _siteContainerWebAppsRestClient.CreateOrUpdateSiteContainerAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerName, data, cancellationToken).ConfigureAwait(false); + var uri = _siteContainerWebAppsRestClient.CreateCreateOrUpdateSiteContainerRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(Response.FromValue(new SiteContainerResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or Updates a site container for a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_CreateOrUpdateSiteContainer + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Site Container Name. + /// Container Entity. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string containerName, SiteContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _siteContainerWebAppsClientDiagnostics.CreateScope("SiteContainerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _siteContainerWebAppsRestClient.CreateOrUpdateSiteContainer(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerName, data, cancellationToken); + var uri = _siteContainerWebAppsRestClient.CreateCreateOrUpdateSiteContainerRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(Response.FromValue(new SiteContainerResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a site container of a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainer + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Site Container Name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var scope = _siteContainerWebAppsClientDiagnostics.CreateScope("SiteContainerCollection.Get"); + scope.Start(); + try + { + var response = await _siteContainerWebAppsRestClient.GetSiteContainerAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SiteContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a site container of a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainer + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Site Container Name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var scope = _siteContainerWebAppsClientDiagnostics.CreateScope("SiteContainerCollection.Get"); + scope.Start(); + try + { + var response = _siteContainerWebAppsRestClient.GetSiteContainer(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SiteContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists all the site containers of a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers + /// + /// + /// Operation Id + /// WebApps_ListSiteContainers + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _siteContainerWebAppsRestClient.CreateListSiteContainersRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _siteContainerWebAppsRestClient.CreateListSiteContainersNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SiteContainerResource(Client, SiteContainerData.DeserializeSiteContainerData(e)), _siteContainerWebAppsClientDiagnostics, Pipeline, "SiteContainerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists all the site containers of a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers + /// + /// + /// Operation Id + /// WebApps_ListSiteContainers + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _siteContainerWebAppsRestClient.CreateListSiteContainersRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _siteContainerWebAppsRestClient.CreateListSiteContainersNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SiteContainerResource(Client, SiteContainerData.DeserializeSiteContainerData(e)), _siteContainerWebAppsClientDiagnostics, Pipeline, "SiteContainerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainer + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Site Container Name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var scope = _siteContainerWebAppsClientDiagnostics.CreateScope("SiteContainerCollection.Exists"); + scope.Start(); + try + { + var response = await _siteContainerWebAppsRestClient.GetSiteContainerAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainer + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Site Container Name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var scope = _siteContainerWebAppsClientDiagnostics.CreateScope("SiteContainerCollection.Exists"); + scope.Start(); + try + { + var response = _siteContainerWebAppsRestClient.GetSiteContainer(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainer + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Site Container Name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var scope = _siteContainerWebAppsClientDiagnostics.CreateScope("SiteContainerCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _siteContainerWebAppsRestClient.GetSiteContainerAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SiteContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainer + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Site Container Name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var scope = _siteContainerWebAppsClientDiagnostics.CreateScope("SiteContainerCollection.GetIfExists"); + scope.Start(); + try + { + var response = _siteContainerWebAppsRestClient.GetSiteContainer(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SiteContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerData.Serialization.cs new file mode 100644 index 0000000000000..762c05c96d975 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerData.Serialization.cs @@ -0,0 +1,726 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class SiteContainerData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SiteContainerData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); + } + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Image)) + { + writer.WritePropertyName("image"u8); + writer.WriteStringValue(Image); + } + if (Optional.IsDefined(TargetPort)) + { + writer.WritePropertyName("targetPort"u8); + writer.WriteStringValue(TargetPort); + } + if (Optional.IsDefined(IsMain)) + { + writer.WritePropertyName("isMain"u8); + writer.WriteBooleanValue(IsMain.Value); + } + if (Optional.IsDefined(StartUpCommand)) + { + writer.WritePropertyName("startUpCommand"u8); + writer.WriteStringValue(StartUpCommand); + } + if (Optional.IsDefined(AuthType)) + { + writer.WritePropertyName("authType"u8); + writer.WriteStringValue(AuthType.Value.ToSerialString()); + } + if (Optional.IsDefined(UserName)) + { + writer.WritePropertyName("userName"u8); + writer.WriteStringValue(UserName); + } + if (Optional.IsDefined(PasswordSecret)) + { + writer.WritePropertyName("passwordSecret"u8); + writer.WriteStringValue(PasswordSecret); + } + if (Optional.IsDefined(UserManagedIdentityClientId)) + { + writer.WritePropertyName("userManagedIdentityClientId"u8); + writer.WriteStringValue(UserManagedIdentityClientId); + } + if (options.Format != "W" && Optional.IsDefined(CreatedOn)) + { + writer.WritePropertyName("createdTime"u8); + writer.WriteStringValue(CreatedOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(LastModifiedOn)) + { + writer.WritePropertyName("lastModifiedTime"u8); + writer.WriteStringValue(LastModifiedOn.Value, "O"); + } + if (Optional.IsCollectionDefined(VolumeMounts)) + { + writer.WritePropertyName("volumeMounts"u8); + writer.WriteStartArray(); + foreach (var item in VolumeMounts) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(EnvironmentVariables)) + { + writer.WritePropertyName("environmentVariables"u8); + writer.WriteStartArray(); + foreach (var item in EnvironmentVariables) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + SiteContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SiteContainerData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSiteContainerData(document.RootElement, options); + } + + internal static SiteContainerData DeserializeSiteContainerData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string kind = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + string image = default; + string targetPort = default; + bool? isMain = default; + string startUpCommand = default; + SiteContainerAuthType? authType = default; + string userName = default; + string passwordSecret = default; + string userManagedIdentityClientId = default; + DateTimeOffset? createdTime = default; + DateTimeOffset? lastModifiedTime = default; + IList volumeMounts = default; + IList environmentVariables = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kind"u8)) + { + kind = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("image"u8)) + { + image = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("targetPort"u8)) + { + targetPort = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("isMain"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isMain = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("startUpCommand"u8)) + { + startUpCommand = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("authType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authType = property0.Value.GetString().ToSiteContainerAuthType(); + continue; + } + if (property0.NameEquals("userName"u8)) + { + userName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("passwordSecret"u8)) + { + passwordSecret = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("userManagedIdentityClientId"u8)) + { + userManagedIdentityClientId = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("createdTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createdTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("lastModifiedTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastModifiedTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("volumeMounts"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(SiteContainerVolumeMount.DeserializeSiteContainerVolumeMount(item, options)); + } + volumeMounts = array; + continue; + } + if (property0.NameEquals("environmentVariables"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(WebAppEnvironmentVariable.DeserializeWebAppEnvironmentVariable(item, options)); + } + environmentVariables = array; + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SiteContainerData( + id, + name, + type, + systemData, + image, + targetPort, + isMain, + startUpCommand, + authType, + userName, + passwordSecret, + userManagedIdentityClientId, + createdTime, + lastModifiedTime, + volumeMounts ?? new ChangeTrackingList(), + environmentVariables ?? new ChangeTrackingList(), + kind, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Kind), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" kind: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Kind)) + { + builder.Append(" kind: "); + if (Kind.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Kind}'''"); + } + else + { + builder.AppendLine($"'{Kind}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Image), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" image: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Image)) + { + builder.Append(" image: "); + if (Image.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Image}'''"); + } + else + { + builder.AppendLine($"'{Image}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TargetPort), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" targetPort: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TargetPort)) + { + builder.Append(" targetPort: "); + if (TargetPort.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TargetPort}'''"); + } + else + { + builder.AppendLine($"'{TargetPort}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsMain), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isMain: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsMain)) + { + builder.Append(" isMain: "); + var boolValue = IsMain.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StartUpCommand), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" startUpCommand: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StartUpCommand)) + { + builder.Append(" startUpCommand: "); + if (StartUpCommand.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{StartUpCommand}'''"); + } + else + { + builder.AppendLine($"'{StartUpCommand}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AuthType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" authType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AuthType)) + { + builder.Append(" authType: "); + builder.AppendLine($"'{AuthType.Value.ToSerialString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UserName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" userName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UserName)) + { + builder.Append(" userName: "); + if (UserName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{UserName}'''"); + } + else + { + builder.AppendLine($"'{UserName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PasswordSecret), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" passwordSecret: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PasswordSecret)) + { + builder.Append(" passwordSecret: "); + if (PasswordSecret.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PasswordSecret}'''"); + } + else + { + builder.AppendLine($"'{PasswordSecret}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UserManagedIdentityClientId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" userManagedIdentityClientId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UserManagedIdentityClientId)) + { + builder.Append(" userManagedIdentityClientId: "); + if (UserManagedIdentityClientId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{UserManagedIdentityClientId}'''"); + } + else + { + builder.AppendLine($"'{UserManagedIdentityClientId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CreatedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" createdTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CreatedOn)) + { + builder.Append(" createdTime: "); + var formattedDateTimeString = TypeFormatters.ToString(CreatedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastModifiedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastModifiedTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LastModifiedOn)) + { + builder.Append(" lastModifiedTime: "); + var formattedDateTimeString = TypeFormatters.ToString(LastModifiedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VolumeMounts), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" volumeMounts: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(VolumeMounts)) + { + if (VolumeMounts.Any()) + { + builder.Append(" volumeMounts: "); + builder.AppendLine("["); + foreach (var item in VolumeMounts) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " volumeMounts: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EnvironmentVariables), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" environmentVariables: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(EnvironmentVariables)) + { + if (EnvironmentVariables.Any()) + { + builder.Append(" environmentVariables: "); + builder.AppendLine("["); + foreach (var item in EnvironmentVariables) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " environmentVariables: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(SiteContainerData)} does not support writing '{options.Format}' format."); + } + } + + SiteContainerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeSiteContainerData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SiteContainerData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerData.cs new file mode 100644 index 0000000000000..dbb433d21f411 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerData.cs @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing the SiteContainer data model. + /// Container of a site + /// + public partial class SiteContainerData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SiteContainerData() + { + VolumeMounts = new ChangeTrackingList(); + EnvironmentVariables = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Image Name. + /// Target Port. + /// <code>true</code> if the container is the main site container; <code>false</code> otherwise. + /// StartUp Command. + /// Auth Type. + /// User Name. + /// Password Secret. + /// UserManagedIdentity ClientId. + /// Created Time. + /// Last Modified Time. + /// List of volume mounts. + /// List of environment variables. + /// Kind of resource. + /// Keeps track of any properties unknown to the library. + internal SiteContainerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string image, string targetPort, bool? isMain, string startUpCommand, SiteContainerAuthType? authType, string userName, string passwordSecret, string userManagedIdentityClientId, DateTimeOffset? createdOn, DateTimeOffset? lastModifiedOn, IList volumeMounts, IList environmentVariables, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Image = image; + TargetPort = targetPort; + IsMain = isMain; + StartUpCommand = startUpCommand; + AuthType = authType; + UserName = userName; + PasswordSecret = passwordSecret; + UserManagedIdentityClientId = userManagedIdentityClientId; + CreatedOn = createdOn; + LastModifiedOn = lastModifiedOn; + VolumeMounts = volumeMounts; + EnvironmentVariables = environmentVariables; + Kind = kind; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Image Name. + [WirePath("properties.image")] + public string Image { get; set; } + /// Target Port. + [WirePath("properties.targetPort")] + public string TargetPort { get; set; } + /// <code>true</code> if the container is the main site container; <code>false</code> otherwise. + [WirePath("properties.isMain")] + public bool? IsMain { get; set; } + /// StartUp Command. + [WirePath("properties.startUpCommand")] + public string StartUpCommand { get; set; } + /// Auth Type. + [WirePath("properties.authType")] + public SiteContainerAuthType? AuthType { get; set; } + /// User Name. + [WirePath("properties.userName")] + public string UserName { get; set; } + /// Password Secret. + [WirePath("properties.passwordSecret")] + public string PasswordSecret { get; set; } + /// UserManagedIdentity ClientId. + [WirePath("properties.userManagedIdentityClientId")] + public string UserManagedIdentityClientId { get; set; } + /// Created Time. + [WirePath("properties.createdTime")] + public DateTimeOffset? CreatedOn { get; } + /// Last Modified Time. + [WirePath("properties.lastModifiedTime")] + public DateTimeOffset? LastModifiedOn { get; } + /// List of volume mounts. + [WirePath("properties.volumeMounts")] + public IList VolumeMounts { get; } + /// List of environment variables. + [WirePath("properties.environmentVariables")] + public IList EnvironmentVariables { get; } + /// Kind of resource. + [WirePath("kind")] + public string Kind { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerResource.Serialization.cs new file mode 100644 index 0000000000000..3fce7f496c7b7 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppService +{ + public partial class SiteContainerResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + SiteContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + SiteContainerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerResource.cs new file mode 100644 index 0000000000000..f648a7bbe6857 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerResource.cs @@ -0,0 +1,355 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a SiteContainer along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetSiteContainerResource method. + /// Otherwise you can get one from its parent resource using the GetSiteContainer method. + /// + public partial class SiteContainerResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + /// The containerName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string containerName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _siteContainerWebAppsClientDiagnostics; + private readonly WebAppsRestOperations _siteContainerWebAppsRestClient; + private readonly SiteContainerData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Web/sites/sitecontainers"; + + /// Initializes a new instance of the class for mocking. + protected SiteContainerResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal SiteContainerResource(ArmClient client, SiteContainerData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal SiteContainerResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _siteContainerWebAppsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string siteContainerWebAppsApiVersion); + _siteContainerWebAppsRestClient = new WebAppsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, siteContainerWebAppsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual SiteContainerData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets a site container of a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainer + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _siteContainerWebAppsClientDiagnostics.CreateScope("SiteContainerResource.Get"); + scope.Start(); + try + { + var response = await _siteContainerWebAppsRestClient.GetSiteContainerAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SiteContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a site container of a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainer + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _siteContainerWebAppsClientDiagnostics.CreateScope("SiteContainerResource.Get"); + scope.Start(); + try + { + var response = _siteContainerWebAppsRestClient.GetSiteContainer(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SiteContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a site container for a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_DeleteSiteContainer + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _siteContainerWebAppsClientDiagnostics.CreateScope("SiteContainerResource.Delete"); + scope.Start(); + try + { + var response = await _siteContainerWebAppsRestClient.DeleteSiteContainerAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _siteContainerWebAppsRestClient.CreateDeleteSiteContainerRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a site container for a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_DeleteSiteContainer + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _siteContainerWebAppsClientDiagnostics.CreateScope("SiteContainerResource.Delete"); + scope.Start(); + try + { + var response = _siteContainerWebAppsRestClient.DeleteSiteContainer(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var uri = _siteContainerWebAppsRestClient.CreateDeleteSiteContainerRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or Updates a site container for a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_CreateOrUpdateSiteContainer + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Container Entity. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, SiteContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _siteContainerWebAppsClientDiagnostics.CreateScope("SiteContainerResource.Update"); + scope.Start(); + try + { + var response = await _siteContainerWebAppsRestClient.CreateOrUpdateSiteContainerAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var uri = _siteContainerWebAppsRestClient.CreateCreateOrUpdateSiteContainerRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(Response.FromValue(new SiteContainerResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or Updates a site container for a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_CreateOrUpdateSiteContainer + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Container Entity. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, SiteContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _siteContainerWebAppsClientDiagnostics.CreateScope("SiteContainerResource.Update"); + scope.Start(); + try + { + var response = _siteContainerWebAppsRestClient.CreateOrUpdateSiteContainer(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var uri = _siteContainerWebAppsRestClient.CreateCreateOrUpdateSiteContainerRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(Response.FromValue(new SiteContainerResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDeploymentCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDeploymentCollection.cs index 75d5e9d48960f..662779c1cf48b 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDeploymentCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDeploymentCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(string id, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string id, CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string id, CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string id, CancellationToken cancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDeploymentResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDeploymentResource.cs index 88acd4b00876d..97aeec1ceb82e 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDeploymentResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDeploymentResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task> UpdateAsync(Wait /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -365,7 +365,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual async Task> GetDeploymentLogAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDetectorCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDetectorCollection.cs index 3ec11408df5a8..0041f023fa47c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDetectorCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDetectorCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task> GetAsync(string detect /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -160,7 +160,7 @@ public virtual Response Get(string detectorName, DateTimeO /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -190,7 +190,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -220,7 +220,7 @@ public virtual Pageable GetAll(CancellationToken cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual async Task> ExistsAsync(string detectorName, DateT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Response Exists(string detectorName, DateTimeOffset? startT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDetectorResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDetectorResource.cs index 153df94418b41..d2c5b537b3e1b 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDetectorResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDetectorResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(DateTimeOffse /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticAnalysisCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticAnalysisCollection.cs index e0d8c2f07c439..19f1c23652039 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticAnalysisCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticAnalysisCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string analysisName, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string analysisName, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string analysisName, CancellationToken canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticAnalysisResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticAnalysisResource.cs index c967ab38256d9..e54943df052a4 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticAnalysisResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticAnalysisResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task> ExecuteAsync(DateTimeOff /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticCollection.cs index f4ac4284c978b..fd968b630aaec 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string diag /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string diagnosticCategory, C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string diagnosticCategory, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string diagnosticCategory, CancellationToke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticDetectorCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticDetectorCollection.cs index e019f319f353a..4ab8bf337c136 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticDetectorCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticDetectorCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string detectorName, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string detectorName, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string detectorName, CancellationToken canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticDetectorResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticDetectorResource.cs index b7bfa465a074a..72a36f80c32dc 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticDetectorResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticDetectorResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task> ExecuteAsync(Dat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticResource.cs index 48093c35a47fc..d9691691708e3 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticResource.cs @@ -108,7 +108,7 @@ public virtual SiteDiagnosticAnalysisCollection GetSiteDiagnosticAnalyses() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> GetSiteDiagn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -177,7 +177,7 @@ public virtual SiteDiagnosticDetectorCollection GetSiteDiagnosticDetectors() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetSiteDiagn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -239,7 +239,7 @@ public virtual Response GetSiteDiagnosticDetecto /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -279,7 +279,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDomainOwnershipIdentifierCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDomainOwnershipIdentifierCollection.cs index 81535e42f0163..614d4c3b370b7 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDomainOwnershipIdentifierCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDomainOwnershipIdentifierCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string domain /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(Cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string domainOwnershipIden /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string domainOwnershipIdentifierName, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDomainOwnershipIdentifierResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDomainOwnershipIdentifierResource.cs index 7ca983a9fb465..dca4c6c048c1a 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDomainOwnershipIdentifierResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDomainOwnershipIdentifierResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> Updat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteExtensionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteExtensionResource.cs index a21e49914ae5b..7699297361549 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteExtensionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteExtensionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -273,7 +273,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> GetMSDeployLogAsync(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteFunctionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteFunctionCollection.cs index d4d4f9c838d3f..a8212f10fd584 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteFunctionCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteFunctionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitU /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string functi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string functionName, Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string functionName, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string functionName, CancellationToken canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteFunctionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteFunctionResource.cs index 2e6ce018cc60e..eb3405b913933 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteFunctionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteFunctionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual async Task> UpdateAsync(WaitUn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -362,7 +362,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Fu /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -403,7 +403,7 @@ public virtual async Task> CreateOrUpdateFunctionSecretA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -444,7 +444,7 @@ public virtual Response CreateOrUpdateFunctionSecret(string keyNa /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -483,7 +483,7 @@ public virtual async Task DeleteFunctionSecretAsync(string keyName, Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -522,7 +522,7 @@ public virtual Response DeleteFunctionSecret(string keyName, CancellationToken c /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -560,7 +560,7 @@ public virtual async Task> GetFuncti /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -598,7 +598,7 @@ public virtual Response GetFunctionKeys(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -636,7 +636,7 @@ public virtual async Task> GetFunctionSecretsAsync(Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHostNameBindingCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHostNameBindingCollection.cs index 3a1f963f4b9cf..49b6aa77c4dee 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHostNameBindingCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHostNameBindingCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string hostName, Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string hostName, Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string hostName, CancellationToken cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHostNameBindingResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHostNameBindingResource.cs index 6c4fb624f2985..c4f4ed051b5cb 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHostNameBindingResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHostNameBindingResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHybridConnectionNamespaceRelayCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHybridConnectionNamespaceRelayCollection.cs index 60f08d9ba0502..c4a538d4165fc 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHybridConnectionNamespaceRelayCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHybridConnectionNamespaceRelayCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -261,7 +261,7 @@ public virtual Response Get(string n /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -306,7 +306,7 @@ public virtual async Task> ExistsAsync(string namespaceName, stri /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual Response Exists(string namespaceName, string relayName, Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHybridConnectionNamespaceRelayResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHybridConnectionNamespaceRelayResource.cs index 96a3e1867e39d..bdd52a0b74171 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHybridConnectionNamespaceRelayResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHybridConnectionNamespaceRelayResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceCollection.cs index 36dae2d6e411a..cb23aef21d262 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string instan /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string instanceId, Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string instanceId, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string instanceId, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceExtensionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceExtensionResource.cs index 937b99c605cfd..38e4291a38d5b 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceExtensionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceExtensionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -274,7 +274,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> GetInstanceMSDeployLogAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessCollection.cs index 90426f507a88a..f381ed42334ad 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string processId, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string processId, Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string processId, CancellationToken cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessModuleCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessModuleCollection.cs index 93bdb5fd3b465..0e1e23b7bd480 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessModuleCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessModuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string baseAddres /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string baseAddress, Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string baseAddress, CancellationToken cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessModuleResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessModuleResource.cs index 63b45f51d70dd..351bfd64cb72c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessModuleResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessModuleResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessResource.cs index ace56106a2472..5f1730a9cbd06 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessResource.cs @@ -112,7 +112,7 @@ public virtual SiteInstanceProcessModuleCollection GetSiteInstanceProcessModules /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetSiteIn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -174,7 +174,7 @@ public virtual Response GetSiteInstanceProces /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -254,7 +254,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -298,7 +298,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -342,7 +342,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -380,7 +380,7 @@ public virtual async Task> GetInstanceProcessDumpAsync(Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -418,7 +418,7 @@ public virtual Response GetInstanceProcessDump(CancellationToken cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -448,7 +448,7 @@ public virtual AsyncPageable GetInstanceProcessThreadsAsync(C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceResource.cs index 0b6690ef8eb2f..2726ddc09f756 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceResource.cs @@ -115,7 +115,7 @@ public virtual SiteInstanceProcessCollection GetSiteInstanceProcesses() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -146,7 +146,7 @@ public virtual async Task> GetSiteInstance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -177,7 +177,7 @@ public virtual Response GetSiteInstanceProcess(stri /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -217,7 +217,7 @@ public virtual async Task> GetAsync(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteNetworkConfigResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteNetworkConfigResource.cs index 91909fe6fb29c..a9311dbcd8e4b 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteNetworkConfigResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteNetworkConfigResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAsync(Swift /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual Response Update(SwiftVirtualNetworkDat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -404,7 +404,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePrivateEndpointConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePrivateEndpointConnectionCollection.cs index eb9b75b1ded7b..4945012317d16 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePrivateEndpointConnectionCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePrivateEndpointConnectionCollection.cs @@ -14,7 +14,6 @@ using Autorest.CSharp.Core; using Azure.Core; using Azure.Core.Pipeline; -using Azure.ResourceManager.AppService.Models; namespace Azure.ResourceManager.AppService { @@ -65,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -75,21 +74,21 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The to use. - /// The to use. + /// The to use. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); using var scope = _sitePrivateEndpointConnectionWebAppsClientDiagnostics.CreateScope("SitePrivateEndpointConnectionCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _sitePrivateEndpointConnectionWebAppsRestClient.ApproveOrRejectPrivateEndpointConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, info, cancellationToken).ConfigureAwait(false); - var operation = new AppServiceArmOperation(new SitePrivateEndpointConnectionOperationSource(Client), _sitePrivateEndpointConnectionWebAppsClientDiagnostics, Pipeline, _sitePrivateEndpointConnectionWebAppsRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, info).Request, response, OperationFinalStateVia.Location); + var response = await _sitePrivateEndpointConnectionWebAppsRestClient.ApproveOrRejectPrivateEndpointConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(new SitePrivateEndpointConnectionOperationSource(Client), _sitePrivateEndpointConnectionWebAppsClientDiagnostics, Pipeline, _sitePrivateEndpointConnectionWebAppsRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -114,7 +113,7 @@ public virtual async Task> C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -124,21 +123,21 @@ public virtual async Task> C /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The to use. - /// The to use. + /// The to use. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); using var scope = _sitePrivateEndpointConnectionWebAppsClientDiagnostics.CreateScope("SitePrivateEndpointConnectionCollection.CreateOrUpdate"); scope.Start(); try { - var response = _sitePrivateEndpointConnectionWebAppsRestClient.ApproveOrRejectPrivateEndpointConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, info, cancellationToken); - var operation = new AppServiceArmOperation(new SitePrivateEndpointConnectionOperationSource(Client), _sitePrivateEndpointConnectionWebAppsClientDiagnostics, Pipeline, _sitePrivateEndpointConnectionWebAppsRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, info).Request, response, OperationFinalStateVia.Location); + var response = _sitePrivateEndpointConnectionWebAppsRestClient.ApproveOrRejectPrivateEndpointConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data, cancellationToken); + var operation = new AppServiceArmOperation(new SitePrivateEndpointConnectionOperationSource(Client), _sitePrivateEndpointConnectionWebAppsClientDiagnostics, Pipeline, _sitePrivateEndpointConnectionWebAppsRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -163,7 +162,7 @@ public virtual ArmOperation CreateOrUpdat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +207,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +252,7 @@ public virtual Response Get(string privat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -283,7 +282,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -313,7 +312,7 @@ public virtual Pageable GetAll(Cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -356,7 +355,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -399,7 +398,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -444,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePrivateEndpointConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePrivateEndpointConnectionResource.cs index 6463cd63c008a..233e7f61a27f1 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePrivateEndpointConnectionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePrivateEndpointConnectionResource.cs @@ -11,7 +11,6 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Core.Pipeline; -using Azure.ResourceManager.AppService.Models; namespace Azure.ResourceManager.AppService { @@ -102,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +141,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +181,7 @@ public virtual Response Get(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -224,7 +223,7 @@ public virtual async Task> DeleteAsync(WaitUntil waitUn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -266,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -275,19 +274,19 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, Cancellation /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The to use. + /// The to use. /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); using var scope = _sitePrivateEndpointConnectionWebAppsClientDiagnostics.CreateScope("SitePrivateEndpointConnectionResource.Update"); scope.Start(); try { - var response = await _sitePrivateEndpointConnectionWebAppsRestClient.ApproveOrRejectPrivateEndpointConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, info, cancellationToken).ConfigureAwait(false); - var operation = new AppServiceArmOperation(new SitePrivateEndpointConnectionOperationSource(Client), _sitePrivateEndpointConnectionWebAppsClientDiagnostics, Pipeline, _sitePrivateEndpointConnectionWebAppsRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, info).Request, response, OperationFinalStateVia.Location); + var response = await _sitePrivateEndpointConnectionWebAppsRestClient.ApproveOrRejectPrivateEndpointConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(new SitePrivateEndpointConnectionOperationSource(Client), _sitePrivateEndpointConnectionWebAppsClientDiagnostics, Pipeline, _sitePrivateEndpointConnectionWebAppsRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -312,7 +311,7 @@ public virtual async Task> U /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -321,19 +320,19 @@ public virtual async Task> U /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The to use. + /// The to use. /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); using var scope = _sitePrivateEndpointConnectionWebAppsClientDiagnostics.CreateScope("SitePrivateEndpointConnectionResource.Update"); scope.Start(); try { - var response = _sitePrivateEndpointConnectionWebAppsRestClient.ApproveOrRejectPrivateEndpointConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, info, cancellationToken); - var operation = new AppServiceArmOperation(new SitePrivateEndpointConnectionOperationSource(Client), _sitePrivateEndpointConnectionWebAppsClientDiagnostics, Pipeline, _sitePrivateEndpointConnectionWebAppsRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, info).Request, response, OperationFinalStateVia.Location); + var response = _sitePrivateEndpointConnectionWebAppsRestClient.ApproveOrRejectPrivateEndpointConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppServiceArmOperation(new SitePrivateEndpointConnectionOperationSource(Client), _sitePrivateEndpointConnectionWebAppsClientDiagnostics, Pipeline, _sitePrivateEndpointConnectionWebAppsRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessCollection.cs index fea159cd7041c..682834cfab600 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string process /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string processId, CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string processId, Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string processId, CancellationToken cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExistsAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessModuleCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessModuleCollection.cs index f007ca4857efd..95c3525916034 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessModuleCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessModuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string b /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string baseAddress, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string baseAddress, Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string baseAddress, CancellationToken cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessModuleResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessModuleResource.cs index 91b5ed82c7a14..48aca1f155c6c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessModuleResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessModuleResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessResource.cs index ee0f8bf894bcb..ce5a4e394d380 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessResource.cs @@ -111,7 +111,7 @@ public virtual SiteProcessModuleCollection GetSiteProcessModules() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetSiteProcessMod /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -173,7 +173,7 @@ public virtual Response GetSiteProcessModule(string b /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(CancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(CancellationToken cancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -297,7 +297,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -341,7 +341,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -379,7 +379,7 @@ public virtual async Task> GetProcessDumpAsync(CancellationToke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -417,7 +417,7 @@ public virtual Response GetProcessDump(CancellationToken cancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual AsyncPageable GetProcessThreadsAsync(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePublicCertificateCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePublicCertificateCollection.cs index deaf5ea6db443..7aa98b72e5518 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePublicCertificateCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePublicCertificateCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string publicCertific /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string publicCertificateNa /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string publicCertificateName, CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePublicCertificateResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePublicCertificateResource.cs index 25ecf8380869c..586d5cb97097c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePublicCertificateResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePublicCertificateResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task> UpdateAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteRecommendationCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteRecommendationCollection.cs index 62270df19cab7..a4e83f2e17873 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteRecommendationCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteRecommendationCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -108,7 +108,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -155,7 +155,7 @@ public virtual Response Get(string name, bool? updat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -200,7 +200,7 @@ public virtual async Task> ExistsAsync(string name, bool? updateS /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -245,7 +245,7 @@ public virtual Response Exists(string name, bool? updateSeen = null, strin /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -292,7 +292,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteRecommendationResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteRecommendationResource.cs index acc217ec3b3f9..8c74cce78388f 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteRecommendationResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteRecommendationResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(bool? u /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -185,7 +185,7 @@ public virtual Response Get(bool? updateSeen = null, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DisableAsync(CancellationToken cancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotBackupCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotBackupCollection.cs index fbc015a9149e4..36de14a06a5f9 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotBackupCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotBackupCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string back /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string backupId, Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string backupId, Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string backupId, CancellationToken cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotBackupResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotBackupResource.cs index 85ed07c85d93f..f6db4dacdc436 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotBackupResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotBackupResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> GetBackupStatusSecre /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual Response GetBackupStatusSecretsSlot(WebAp /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -401,7 +401,7 @@ public virtual async Task RestoreSlotAsync(WaitUntil waitUntil, Re /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotConfigSnapshotCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotConfigSnapshotCollection.cs index 3e01fd36c4c1d..9a8aff8a81c77 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotConfigSnapshotCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotConfigSnapshotCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -106,7 +106,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -151,7 +151,7 @@ public virtual Response Get(string snapshotId, C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -194,7 +194,7 @@ public virtual async Task> ExistsAsync(string snapshotId, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -237,7 +237,7 @@ public virtual Response Exists(string snapshotId, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotConfigSnapshotResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotConfigSnapshotResource.cs index fc9ecc2c4d186..3e52c771ba59b 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotConfigSnapshotResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotConfigSnapshotResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -220,7 +220,7 @@ public virtual async Task RecoverSiteConfigurationSnapshotSlotAsync(Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDeploymentCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDeploymentCollection.cs index 1c3f413cabf10..bd31c0ea5a048 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDeploymentCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDeploymentCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string id, CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationToken can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string id, CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string id, CancellationToken cancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDeploymentResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDeploymentResource.cs index 78f2c15a21a7b..79afd50b4382f 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDeploymentResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDeploymentResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task> UpdateAsync( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -366,7 +366,7 @@ public virtual ArmOperation Update(WaitUntil waitUnt /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -404,7 +404,7 @@ public virtual async Task> GetDeploymentLog /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDetectorCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDetectorCollection.cs index b7a26d38af72e..37f0903e2f8ec 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDetectorCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDetectorCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task> GetAsync(string de /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -160,7 +160,7 @@ public virtual Response Get(string detectorName, DateT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -190,7 +190,7 @@ public virtual AsyncPageable GetAllAsync(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -220,7 +220,7 @@ public virtual Pageable GetAll(CancellationToken cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual async Task> ExistsAsync(string detectorName, DateT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Response Exists(string detectorName, DateTimeOffset? startT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDetectorResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDetectorResource.cs index 7ce4d805e818b..8c8c37ef83b53 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDetectorResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDetectorResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -145,7 +145,7 @@ public virtual async Task> GetAsync(DateTimeO /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticAnalysisCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticAnalysisCollection.cs index cb1318df2f599..7ebd6c3a289cc 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticAnalysisCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticAnalysisCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string analysisN /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string analysisName, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string analysisName, CancellationToken canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticAnalysisResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticAnalysisResource.cs index f5de947ec60d6..334a6f22c53a0 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticAnalysisResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticAnalysisResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task> ExecuteSiteAnalysisSlotA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticCollection.cs index 63968e104fce8..e8bd4afb5bb43 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string diagnosticCategor /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string diagnosticCategory, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string diagnosticCategory, CancellationToke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticDetectorCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticDetectorCollection.cs index 35a1b7ebba3e8..910f25ddf0953 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticDetectorCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticDetectorCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string detectorN /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string detectorName, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string detectorName, CancellationToken canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticDetectorResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticDetectorResource.cs index 2f60a012ae60d..d97f6617cb876 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticDetectorResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticDetectorResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task> ExecuteSiteDetec /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticResource.cs index 6acca75bb9e7f..177707511f25f 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticResource.cs @@ -109,7 +109,7 @@ public virtual SiteSlotDiagnosticAnalysisCollection GetSiteSlotDiagnosticAnalyse /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetSiteS /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -178,7 +178,7 @@ public virtual SiteSlotDiagnosticDetectorCollection GetSiteSlotDiagnosticDetecto /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetSiteS /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -240,7 +240,7 @@ public virtual Response GetSiteSlotDiagnosti /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -280,7 +280,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDomainOwnershipIdentifierCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDomainOwnershipIdentifierCollection.cs index c713176fe96c9..83e7a952dd34d 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDomainOwnershipIdentifierCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDomainOwnershipIdentifierCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrU /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string do /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string domainOwnershipIden /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string domainOwnershipIdentifierName, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDomainOwnershipIdentifierResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDomainOwnershipIdentifierResource.cs index e627ca854917c..412e9badc61f0 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDomainOwnershipIdentifierResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDomainOwnershipIdentifierResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> U /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotExtensionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotExtensionResource.cs index f0f711b939e9c..74f6941d8ad55 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotExtensionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotExtensionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -274,7 +274,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> GetMSDeployLogSlotAsync(C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotFunctionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotFunctionCollection.cs index 716aecd5cbc35..dbb31bf39052d 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotFunctionCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotFunctionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdate /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string fu /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string functionName, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string functionName, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string functionName, CancellationToken canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotFunctionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotFunctionResource.cs index 10dac1787745b..c17daa47a6265 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotFunctionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotFunctionResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task> UpdateAsync(Wa /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -404,7 +404,7 @@ public virtual async Task> CreateOrUpdateFunctionSecretS /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -445,7 +445,7 @@ public virtual Response CreateOrUpdateFunctionSecretSlot(string k /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -484,7 +484,7 @@ public virtual async Task DeleteFunctionSecretSlotAsync(string keyName /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -523,7 +523,7 @@ public virtual Response DeleteFunctionSecretSlot(string keyName, CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -561,7 +561,7 @@ public virtual async Task> GetFuncti /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -599,7 +599,7 @@ public virtual Response GetFunctionKeysSlot(C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -637,7 +637,7 @@ public virtual async Task> GetFunctionSecretsSlotAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHostNameBindingCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHostNameBindingCollection.cs index 15535cb32e00f..d1833f4f0bb7a 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHostNameBindingCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHostNameBindingCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string hostName, Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationToke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string hostName, Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string hostName, CancellationToken cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHostNameBindingResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHostNameBindingResource.cs index efecbf449f0fc..caf08333359b3 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHostNameBindingResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHostNameBindingResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task> UpdateA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHybridConnectionNamespaceRelayCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHybridConnectionNamespaceRelayCollection.cs index fb83c18eb9f2f..d45054ac32c95 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHybridConnectionNamespaceRelayCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHybridConnectionNamespaceRelayCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation Crea /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -261,7 +261,7 @@ public virtual Response Get(stri /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -306,7 +306,7 @@ public virtual async Task> ExistsAsync(string namespaceName, stri /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual Response Exists(string namespaceName, string relayName, Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHybridConnectionNamespaceRelayResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHybridConnectionNamespaceRelayResource.cs index 6ecaac3000514..bffe8f1385b4f 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHybridConnectionNamespaceRelayResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHybridConnectionNamespaceRelayResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceCollection.cs index 24976e8edf9fe..831b0e78cd071 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string in /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string instanceId, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string instanceId, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string instanceId, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceExtensionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceExtensionResource.cs index b51af8053fbf8..80a69726d4d17 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceExtensionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceExtensionResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task> Creat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -275,7 +275,7 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> GetInstanceMSDeployLogSlo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessCollection.cs index f7246a9095d98..f2d37089f0d2e 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string processId, C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string processId, Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string processId, CancellationToken cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessModuleCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessModuleCollection.cs index 5d3a836c36463..0caf71b75c4e6 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessModuleCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessModuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string baseAd /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(Cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string baseAddress, Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string baseAddress, CancellationToken cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessModuleResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessModuleResource.cs index 0ff7df93e8105..1c3a102ef0ba2 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessModuleResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessModuleResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessResource.cs index 75bece9420af0..a5910f651ca47 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessResource.cs @@ -113,7 +113,7 @@ public virtual SiteSlotInstanceProcessModuleCollection GetSiteSlotInstanceProces /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetSi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -175,7 +175,7 @@ public virtual Response GetSiteSlotInstan /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -215,7 +215,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -299,7 +299,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -343,7 +343,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -381,7 +381,7 @@ public virtual async Task> GetInstanceProcessDumpSlotAsync(Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -419,7 +419,7 @@ public virtual Response GetInstanceProcessDumpSlot(CancellationToken can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual AsyncPageable GetInstanceProcessThreadsSlotAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceResource.cs index 35b585dcbc9b9..e55cb542ddc65 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceResource.cs @@ -116,7 +116,7 @@ public virtual SiteSlotInstanceProcessCollection GetSiteSlotInstanceProcesses() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -147,7 +147,7 @@ public virtual async Task> GetSiteSlot /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -178,7 +178,7 @@ public virtual Response GetSiteSlotInstanceProc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -218,7 +218,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotNetworkConfigResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotNetworkConfigResource.cs index 303be6ffa5ccd..4faa7d6cfeb69 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotNetworkConfigResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotNetworkConfigResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsync(S /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual Response Update(SwiftVirtualNetwor /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -405,7 +405,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotPrivateEndpointConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotPrivateEndpointConnectionCollection.cs index 5ba9e28f1878d..25c2dc638e1d1 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotPrivateEndpointConnectionCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotPrivateEndpointConnectionCollection.cs @@ -14,7 +14,6 @@ using Autorest.CSharp.Core; using Azure.Core; using Azure.Core.Pipeline; -using Azure.ResourceManager.AppService.Models; namespace Azure.ResourceManager.AppService { @@ -65,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -75,21 +74,21 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The to use. - /// The to use. + /// The to use. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); using var scope = _siteSlotPrivateEndpointConnectionWebAppsClientDiagnostics.CreateScope("SiteSlotPrivateEndpointConnectionCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _siteSlotPrivateEndpointConnectionWebAppsRestClient.ApproveOrRejectPrivateEndpointConnectionSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, privateEndpointConnectionName, info, cancellationToken).ConfigureAwait(false); - var operation = new AppServiceArmOperation(new SiteSlotPrivateEndpointConnectionOperationSource(Client), _siteSlotPrivateEndpointConnectionWebAppsClientDiagnostics, Pipeline, _siteSlotPrivateEndpointConnectionWebAppsRestClient.CreateApproveOrRejectPrivateEndpointConnectionSlotRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, privateEndpointConnectionName, info).Request, response, OperationFinalStateVia.Location); + var response = await _siteSlotPrivateEndpointConnectionWebAppsRestClient.ApproveOrRejectPrivateEndpointConnectionSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, privateEndpointConnectionName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(new SiteSlotPrivateEndpointConnectionOperationSource(Client), _siteSlotPrivateEndpointConnectionWebAppsClientDiagnostics, Pipeline, _siteSlotPrivateEndpointConnectionWebAppsRestClient.CreateApproveOrRejectPrivateEndpointConnectionSlotRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, privateEndpointConnectionName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -114,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -124,21 +123,21 @@ public virtual async Task /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The to use. - /// The to use. + /// The to use. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); using var scope = _siteSlotPrivateEndpointConnectionWebAppsClientDiagnostics.CreateScope("SiteSlotPrivateEndpointConnectionCollection.CreateOrUpdate"); scope.Start(); try { - var response = _siteSlotPrivateEndpointConnectionWebAppsRestClient.ApproveOrRejectPrivateEndpointConnectionSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, privateEndpointConnectionName, info, cancellationToken); - var operation = new AppServiceArmOperation(new SiteSlotPrivateEndpointConnectionOperationSource(Client), _siteSlotPrivateEndpointConnectionWebAppsClientDiagnostics, Pipeline, _siteSlotPrivateEndpointConnectionWebAppsRestClient.CreateApproveOrRejectPrivateEndpointConnectionSlotRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, privateEndpointConnectionName, info).Request, response, OperationFinalStateVia.Location); + var response = _siteSlotPrivateEndpointConnectionWebAppsRestClient.ApproveOrRejectPrivateEndpointConnectionSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, privateEndpointConnectionName, data, cancellationToken); + var operation = new AppServiceArmOperation(new SiteSlotPrivateEndpointConnectionOperationSource(Client), _siteSlotPrivateEndpointConnectionWebAppsClientDiagnostics, Pipeline, _siteSlotPrivateEndpointConnectionWebAppsRestClient.CreateApproveOrRejectPrivateEndpointConnectionSlotRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, privateEndpointConnectionName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -163,7 +162,7 @@ public virtual ArmOperation CreateOrU /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +207,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +252,7 @@ public virtual Response Get(string pr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -283,7 +282,7 @@ public virtual AsyncPageable GetAllAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -313,7 +312,7 @@ public virtual Pageable GetAll(Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -356,7 +355,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -399,7 +398,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -444,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotPrivateEndpointConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotPrivateEndpointConnectionResource.cs index b864676e01aab..6b0395a103a66 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotPrivateEndpointConnectionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotPrivateEndpointConnectionResource.cs @@ -11,7 +11,6 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Core.Pipeline; -using Azure.ResourceManager.AppService.Models; namespace Azure.ResourceManager.AppService { @@ -103,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -143,7 +142,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -183,7 +182,7 @@ public virtual Response Get(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -225,7 +224,7 @@ public virtual async Task> DeleteAsync(WaitUntil waitUn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -267,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -276,19 +275,19 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, Cancellation /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The to use. + /// The to use. /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); using var scope = _siteSlotPrivateEndpointConnectionWebAppsClientDiagnostics.CreateScope("SiteSlotPrivateEndpointConnectionResource.Update"); scope.Start(); try { - var response = await _siteSlotPrivateEndpointConnectionWebAppsRestClient.ApproveOrRejectPrivateEndpointConnectionSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, info, cancellationToken).ConfigureAwait(false); - var operation = new AppServiceArmOperation(new SiteSlotPrivateEndpointConnectionOperationSource(Client), _siteSlotPrivateEndpointConnectionWebAppsClientDiagnostics, Pipeline, _siteSlotPrivateEndpointConnectionWebAppsRestClient.CreateApproveOrRejectPrivateEndpointConnectionSlotRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, info).Request, response, OperationFinalStateVia.Location); + var response = await _siteSlotPrivateEndpointConnectionWebAppsRestClient.ApproveOrRejectPrivateEndpointConnectionSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(new SiteSlotPrivateEndpointConnectionOperationSource(Client), _siteSlotPrivateEndpointConnectionWebAppsClientDiagnostics, Pipeline, _siteSlotPrivateEndpointConnectionWebAppsRestClient.CreateApproveOrRejectPrivateEndpointConnectionSlotRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -313,7 +312,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -322,19 +321,19 @@ public virtual async Task /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The to use. + /// The to use. /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); using var scope = _siteSlotPrivateEndpointConnectionWebAppsClientDiagnostics.CreateScope("SiteSlotPrivateEndpointConnectionResource.Update"); scope.Start(); try { - var response = _siteSlotPrivateEndpointConnectionWebAppsRestClient.ApproveOrRejectPrivateEndpointConnectionSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, info, cancellationToken); - var operation = new AppServiceArmOperation(new SiteSlotPrivateEndpointConnectionOperationSource(Client), _siteSlotPrivateEndpointConnectionWebAppsClientDiagnostics, Pipeline, _siteSlotPrivateEndpointConnectionWebAppsRestClient.CreateApproveOrRejectPrivateEndpointConnectionSlotRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, info).Request, response, OperationFinalStateVia.Location); + var response = _siteSlotPrivateEndpointConnectionWebAppsRestClient.ApproveOrRejectPrivateEndpointConnectionSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppServiceArmOperation(new SiteSlotPrivateEndpointConnectionOperationSource(Client), _siteSlotPrivateEndpointConnectionWebAppsClientDiagnostics, Pipeline, _siteSlotPrivateEndpointConnectionWebAppsRestClient.CreateApproveOrRejectPrivateEndpointConnectionSlotRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessCollection.cs index 78d514900b84d..f0fd85c62bfd4 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string pro /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string processId, Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string processId, Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string processId, CancellationToken cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessModuleCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessModuleCollection.cs index f6306d378e9ba..0025e8a89b4d0 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessModuleCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessModuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string baseAddress, C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string baseAddress, Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string baseAddress, CancellationToken cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessModuleResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessModuleResource.cs index f5c7eebd8b76f..af7bf2d647f65 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessModuleResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessModuleResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessResource.cs index 6fc69b1fd23ea..8e7d68abbabe0 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessResource.cs @@ -112,7 +112,7 @@ public virtual SiteSlotProcessModuleCollection GetSiteSlotProcessModules() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetSiteSlotPr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -174,7 +174,7 @@ public virtual Response GetSiteSlotProcessModule( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -254,7 +254,7 @@ public virtual Response Get(CancellationToken cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -298,7 +298,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -342,7 +342,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -380,7 +380,7 @@ public virtual async Task> GetProcessDumpSlotAsync(Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -418,7 +418,7 @@ public virtual Response GetProcessDumpSlot(CancellationToken cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -448,7 +448,7 @@ public virtual AsyncPageable GetProcessThreadsSlotAsync(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotSiteContainerCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotSiteContainerCollection.cs new file mode 100644 index 0000000000000..9d2c322ad1f97 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotSiteContainerCollection.cs @@ -0,0 +1,497 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetSiteSlotSiteContainers method from an instance of . + /// + public partial class SiteSlotSiteContainerCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _siteSlotSiteContainerWebAppsClientDiagnostics; + private readonly WebAppsRestOperations _siteSlotSiteContainerWebAppsRestClient; + + /// Initializes a new instance of the class for mocking. + protected SiteSlotSiteContainerCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal SiteSlotSiteContainerCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _siteSlotSiteContainerWebAppsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", SiteSlotSiteContainerResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SiteSlotSiteContainerResource.ResourceType, out string siteSlotSiteContainerWebAppsApiVersion); + _siteSlotSiteContainerWebAppsRestClient = new WebAppsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, siteSlotSiteContainerWebAppsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != WebSiteSlotResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WebSiteSlotResource.ResourceType), nameof(id)); + } + + /// + /// Creates or Updates a site container for a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_CreateOrUpdateSiteContainerSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Site Container Name. + /// Container Entity. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string containerName, SiteContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _siteSlotSiteContainerWebAppsClientDiagnostics.CreateScope("SiteSlotSiteContainerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _siteSlotSiteContainerWebAppsRestClient.CreateOrUpdateSiteContainerSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, containerName, data, cancellationToken).ConfigureAwait(false); + var uri = _siteSlotSiteContainerWebAppsRestClient.CreateCreateOrUpdateSiteContainerSlotRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, containerName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(Response.FromValue(new SiteSlotSiteContainerResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or Updates a site container for a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_CreateOrUpdateSiteContainerSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Site Container Name. + /// Container Entity. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string containerName, SiteContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _siteSlotSiteContainerWebAppsClientDiagnostics.CreateScope("SiteSlotSiteContainerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _siteSlotSiteContainerWebAppsRestClient.CreateOrUpdateSiteContainerSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, containerName, data, cancellationToken); + var uri = _siteSlotSiteContainerWebAppsRestClient.CreateCreateOrUpdateSiteContainerSlotRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, containerName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(Response.FromValue(new SiteSlotSiteContainerResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a site container of a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainerSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Site Container Name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var scope = _siteSlotSiteContainerWebAppsClientDiagnostics.CreateScope("SiteSlotSiteContainerCollection.Get"); + scope.Start(); + try + { + var response = await _siteSlotSiteContainerWebAppsRestClient.GetSiteContainerSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, containerName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SiteSlotSiteContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a site container of a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainerSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Site Container Name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var scope = _siteSlotSiteContainerWebAppsClientDiagnostics.CreateScope("SiteSlotSiteContainerCollection.Get"); + scope.Start(); + try + { + var response = _siteSlotSiteContainerWebAppsRestClient.GetSiteContainerSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, containerName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SiteSlotSiteContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists all the site containers of a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers + /// + /// + /// Operation Id + /// WebApps_ListSiteContainersSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _siteSlotSiteContainerWebAppsRestClient.CreateListSiteContainersSlotRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _siteSlotSiteContainerWebAppsRestClient.CreateListSiteContainersSlotNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SiteSlotSiteContainerResource(Client, SiteContainerData.DeserializeSiteContainerData(e)), _siteSlotSiteContainerWebAppsClientDiagnostics, Pipeline, "SiteSlotSiteContainerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists all the site containers of a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers + /// + /// + /// Operation Id + /// WebApps_ListSiteContainersSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _siteSlotSiteContainerWebAppsRestClient.CreateListSiteContainersSlotRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _siteSlotSiteContainerWebAppsRestClient.CreateListSiteContainersSlotNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SiteSlotSiteContainerResource(Client, SiteContainerData.DeserializeSiteContainerData(e)), _siteSlotSiteContainerWebAppsClientDiagnostics, Pipeline, "SiteSlotSiteContainerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainerSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Site Container Name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var scope = _siteSlotSiteContainerWebAppsClientDiagnostics.CreateScope("SiteSlotSiteContainerCollection.Exists"); + scope.Start(); + try + { + var response = await _siteSlotSiteContainerWebAppsRestClient.GetSiteContainerSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, containerName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainerSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Site Container Name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var scope = _siteSlotSiteContainerWebAppsClientDiagnostics.CreateScope("SiteSlotSiteContainerCollection.Exists"); + scope.Start(); + try + { + var response = _siteSlotSiteContainerWebAppsRestClient.GetSiteContainerSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, containerName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainerSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Site Container Name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var scope = _siteSlotSiteContainerWebAppsClientDiagnostics.CreateScope("SiteSlotSiteContainerCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _siteSlotSiteContainerWebAppsRestClient.GetSiteContainerSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, containerName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SiteSlotSiteContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainerSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Site Container Name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string containerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(containerName, nameof(containerName)); + + using var scope = _siteSlotSiteContainerWebAppsClientDiagnostics.CreateScope("SiteSlotSiteContainerCollection.GetIfExists"); + scope.Start(); + try + { + var response = _siteSlotSiteContainerWebAppsRestClient.GetSiteContainerSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, containerName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SiteSlotSiteContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotSiteContainerResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotSiteContainerResource.Serialization.cs new file mode 100644 index 0000000000000..5e7258284f263 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotSiteContainerResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppService +{ + public partial class SiteSlotSiteContainerResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + SiteContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + SiteContainerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotSiteContainerResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotSiteContainerResource.cs new file mode 100644 index 0000000000000..348f685a596b2 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotSiteContainerResource.cs @@ -0,0 +1,356 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a SiteSlotSiteContainer along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetSiteSlotSiteContainerResource method. + /// Otherwise you can get one from its parent resource using the GetSiteSlotSiteContainer method. + /// + public partial class SiteSlotSiteContainerResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + /// The slot. + /// The containerName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string slot, string containerName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _siteSlotSiteContainerWebAppsClientDiagnostics; + private readonly WebAppsRestOperations _siteSlotSiteContainerWebAppsRestClient; + private readonly SiteContainerData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Web/sites/slots/sitecontainers"; + + /// Initializes a new instance of the class for mocking. + protected SiteSlotSiteContainerResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal SiteSlotSiteContainerResource(ArmClient client, SiteContainerData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal SiteSlotSiteContainerResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _siteSlotSiteContainerWebAppsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string siteSlotSiteContainerWebAppsApiVersion); + _siteSlotSiteContainerWebAppsRestClient = new WebAppsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, siteSlotSiteContainerWebAppsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual SiteContainerData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets a site container of a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainerSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _siteSlotSiteContainerWebAppsClientDiagnostics.CreateScope("SiteSlotSiteContainerResource.Get"); + scope.Start(); + try + { + var response = await _siteSlotSiteContainerWebAppsRestClient.GetSiteContainerSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SiteSlotSiteContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a site container of a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainerSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _siteSlotSiteContainerWebAppsClientDiagnostics.CreateScope("SiteSlotSiteContainerResource.Get"); + scope.Start(); + try + { + var response = _siteSlotSiteContainerWebAppsRestClient.GetSiteContainerSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SiteSlotSiteContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a site container for a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_DeleteSiteContainerSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _siteSlotSiteContainerWebAppsClientDiagnostics.CreateScope("SiteSlotSiteContainerResource.Delete"); + scope.Start(); + try + { + var response = await _siteSlotSiteContainerWebAppsRestClient.DeleteSiteContainerSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _siteSlotSiteContainerWebAppsRestClient.CreateDeleteSiteContainerSlotRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a site container for a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_DeleteSiteContainerSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _siteSlotSiteContainerWebAppsClientDiagnostics.CreateScope("SiteSlotSiteContainerResource.Delete"); + scope.Start(); + try + { + var response = _siteSlotSiteContainerWebAppsRestClient.DeleteSiteContainerSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var uri = _siteSlotSiteContainerWebAppsRestClient.CreateDeleteSiteContainerSlotRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or Updates a site container for a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_CreateOrUpdateSiteContainerSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Container Entity. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, SiteContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _siteSlotSiteContainerWebAppsClientDiagnostics.CreateScope("SiteSlotSiteContainerResource.Update"); + scope.Start(); + try + { + var response = await _siteSlotSiteContainerWebAppsRestClient.CreateOrUpdateSiteContainerSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var uri = _siteSlotSiteContainerWebAppsRestClient.CreateCreateOrUpdateSiteContainerSlotRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(Response.FromValue(new SiteSlotSiteContainerResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or Updates a site container for a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_CreateOrUpdateSiteContainerSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Container Entity. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, SiteContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _siteSlotSiteContainerWebAppsClientDiagnostics.CreateScope("SiteSlotSiteContainerResource.Update"); + scope.Start(); + try + { + var response = _siteSlotSiteContainerWebAppsRestClient.CreateOrUpdateSiteContainerSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var uri = _siteSlotSiteContainerWebAppsRestClient.CreateCreateOrUpdateSiteContainerSlotRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(Response.FromValue(new SiteSlotSiteContainerResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionCollection.cs index fdb07f08c8d6a..52d0266b11022 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string vne /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string vnetName, Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response Exists(string vnetName, CancellationToken cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -445,7 +445,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionGatewayCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionGatewayCollection.cs index 369ddc77253ce..ac0016e07f55e 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionGatewayCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionGatewayCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation Cre /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(str /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -296,7 +296,7 @@ public virtual async Task> ExistsAsync(string gatewayName, Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -339,7 +339,7 @@ public virtual Response Exists(string gatewayName, CancellationToken cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -384,7 +384,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionGatewayResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionGatewayResource.cs index c475921495584..0d3ec0797cf40 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionGatewayResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionGatewayResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionResource.cs index cef5b34f08027..056cc3c8ffb2d 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionResource.cs @@ -109,7 +109,7 @@ public virtual SiteSlotVirtualNetworkConnectionGatewayCollection GetSiteSlotVirt /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -171,7 +171,7 @@ public virtual Response GetSite /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -251,7 +251,7 @@ public virtual Response Get(Cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -295,7 +295,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -339,7 +339,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -381,7 +381,7 @@ public virtual async Task> Up /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotWorkflowCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotWorkflowCollection.cs new file mode 100644 index 0000000000000..2d38dca174869 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotWorkflowCollection.cs @@ -0,0 +1,395 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetSiteSlotWorkflows method from an instance of . + /// + public partial class SiteSlotWorkflowCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _siteSlotWorkflowWebAppsClientDiagnostics; + private readonly WebAppsRestOperations _siteSlotWorkflowWebAppsRestClient; + + /// Initializes a new instance of the class for mocking. + protected SiteSlotWorkflowCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal SiteSlotWorkflowCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _siteSlotWorkflowWebAppsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", SiteSlotWorkflowResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SiteSlotWorkflowResource.ResourceType, out string siteSlotWorkflowWebAppsApiVersion); + _siteSlotWorkflowWebAppsRestClient = new WebAppsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, siteSlotWorkflowWebAppsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != WebSiteSlotResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WebSiteSlotResource.ResourceType), nameof(id)); + } + + /// + /// Get workflow information by its ID for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetInstanceWorkflowSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var scope = _siteSlotWorkflowWebAppsClientDiagnostics.CreateScope("SiteSlotWorkflowCollection.Get"); + scope.Start(); + try + { + var response = await _siteSlotWorkflowWebAppsRestClient.GetInstanceWorkflowSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, workflowName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SiteSlotWorkflowResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get workflow information by its ID for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetInstanceWorkflowSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var scope = _siteSlotWorkflowWebAppsClientDiagnostics.CreateScope("SiteSlotWorkflowCollection.Get"); + scope.Start(); + try + { + var response = _siteSlotWorkflowWebAppsRestClient.GetInstanceWorkflowSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, workflowName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SiteSlotWorkflowResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List the workflows for a web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/workflows + /// + /// + /// Operation Id + /// WebApps_ListInstanceWorkflowsSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _siteSlotWorkflowWebAppsRestClient.CreateListInstanceWorkflowsSlotRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _siteSlotWorkflowWebAppsRestClient.CreateListInstanceWorkflowsSlotNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SiteSlotWorkflowResource(Client, WorkflowEnvelopeData.DeserializeWorkflowEnvelopeData(e)), _siteSlotWorkflowWebAppsClientDiagnostics, Pipeline, "SiteSlotWorkflowCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List the workflows for a web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/workflows + /// + /// + /// Operation Id + /// WebApps_ListInstanceWorkflowsSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _siteSlotWorkflowWebAppsRestClient.CreateListInstanceWorkflowsSlotRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _siteSlotWorkflowWebAppsRestClient.CreateListInstanceWorkflowsSlotNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SiteSlotWorkflowResource(Client, WorkflowEnvelopeData.DeserializeWorkflowEnvelopeData(e)), _siteSlotWorkflowWebAppsClientDiagnostics, Pipeline, "SiteSlotWorkflowCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetInstanceWorkflowSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var scope = _siteSlotWorkflowWebAppsClientDiagnostics.CreateScope("SiteSlotWorkflowCollection.Exists"); + scope.Start(); + try + { + var response = await _siteSlotWorkflowWebAppsRestClient.GetInstanceWorkflowSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, workflowName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetInstanceWorkflowSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var scope = _siteSlotWorkflowWebAppsClientDiagnostics.CreateScope("SiteSlotWorkflowCollection.Exists"); + scope.Start(); + try + { + var response = _siteSlotWorkflowWebAppsRestClient.GetInstanceWorkflowSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, workflowName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetInstanceWorkflowSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var scope = _siteSlotWorkflowWebAppsClientDiagnostics.CreateScope("SiteSlotWorkflowCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _siteSlotWorkflowWebAppsRestClient.GetInstanceWorkflowSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, workflowName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SiteSlotWorkflowResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetInstanceWorkflowSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var scope = _siteSlotWorkflowWebAppsClientDiagnostics.CreateScope("SiteSlotWorkflowCollection.GetIfExists"); + scope.Start(); + try + { + var response = _siteSlotWorkflowWebAppsRestClient.GetInstanceWorkflowSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, workflowName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SiteSlotWorkflowResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotWorkflowResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotWorkflowResource.Serialization.cs new file mode 100644 index 0000000000000..4061c6ab3efc7 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotWorkflowResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppService +{ + public partial class SiteSlotWorkflowResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + WorkflowEnvelopeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + WorkflowEnvelopeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotWorkflowResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotWorkflowResource.cs new file mode 100644 index 0000000000000..dc7ccc097128c --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotWorkflowResource.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a SiteSlotWorkflow along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetSiteSlotWorkflowResource method. + /// Otherwise you can get one from its parent resource using the GetSiteSlotWorkflow method. + /// + public partial class SiteSlotWorkflowResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + /// The slot. + /// The workflowName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string slot, string workflowName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/workflows/{workflowName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _siteSlotWorkflowWebAppsClientDiagnostics; + private readonly WebAppsRestOperations _siteSlotWorkflowWebAppsRestClient; + private readonly WorkflowEnvelopeData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Web/sites/slots/workflows"; + + /// Initializes a new instance of the class for mocking. + protected SiteSlotWorkflowResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal SiteSlotWorkflowResource(ArmClient client, WorkflowEnvelopeData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal SiteSlotWorkflowResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _siteSlotWorkflowWebAppsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string siteSlotWorkflowWebAppsApiVersion); + _siteSlotWorkflowWebAppsRestClient = new WebAppsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, siteSlotWorkflowWebAppsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual WorkflowEnvelopeData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get workflow information by its ID for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetInstanceWorkflowSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _siteSlotWorkflowWebAppsClientDiagnostics.CreateScope("SiteSlotWorkflowResource.Get"); + scope.Start(); + try + { + var response = await _siteSlotWorkflowWebAppsRestClient.GetInstanceWorkflowSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SiteSlotWorkflowResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get workflow information by its ID for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetInstanceWorkflowSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _siteSlotWorkflowWebAppsClientDiagnostics.CreateScope("SiteSlotWorkflowResource.Get"); + scope.Start(); + try + { + var response = _siteSlotWorkflowWebAppsRestClient.GetInstanceWorkflowSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SiteSlotWorkflowResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionCollection.cs index c37dbeac36ba7..530e473232b42 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> Cr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string vnetNam /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string vnetName, Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response Exists(string vnetName, CancellationToken cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -445,7 +445,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionGatewayCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionGatewayCollection.cs index 787d6d709aa45..7f04de2d23247 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionGatewayCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionGatewayCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateO /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -296,7 +296,7 @@ public virtual async Task> ExistsAsync(string gatewayName, Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -339,7 +339,7 @@ public virtual Response Exists(string gatewayName, CancellationToken cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -384,7 +384,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionGatewayResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionGatewayResource.cs index 0009c44b06ff2..2a1da8c089784 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionGatewayResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionGatewayResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionResource.cs index e0dd8e389bf53..acac1753387a9 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionResource.cs @@ -108,7 +108,7 @@ public virtual SiteVirtualNetworkConnectionGatewayCollection GetSiteVirtualNetwo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response GetSiteVirt /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response Get(CancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -338,7 +338,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -380,7 +380,7 @@ public virtual async Task> Update /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteWorkflowCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteWorkflowCollection.cs new file mode 100644 index 0000000000000..13ae1f228c1e2 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteWorkflowCollection.cs @@ -0,0 +1,395 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetSiteWorkflows method from an instance of . + /// + public partial class SiteWorkflowCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _siteWorkflowWebAppsClientDiagnostics; + private readonly WebAppsRestOperations _siteWorkflowWebAppsRestClient; + + /// Initializes a new instance of the class for mocking. + protected SiteWorkflowCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal SiteWorkflowCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _siteWorkflowWebAppsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", SiteWorkflowResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SiteWorkflowResource.ResourceType, out string siteWorkflowWebAppsApiVersion); + _siteWorkflowWebAppsRestClient = new WebAppsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, siteWorkflowWebAppsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != WebSiteResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WebSiteResource.ResourceType), nameof(id)); + } + + /// + /// Get workflow information by its ID for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetWorkflow + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var scope = _siteWorkflowWebAppsClientDiagnostics.CreateScope("SiteWorkflowCollection.Get"); + scope.Start(); + try + { + var response = await _siteWorkflowWebAppsRestClient.GetWorkflowAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SiteWorkflowResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get workflow information by its ID for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetWorkflow + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var scope = _siteWorkflowWebAppsClientDiagnostics.CreateScope("SiteWorkflowCollection.Get"); + scope.Start(); + try + { + var response = _siteWorkflowWebAppsRestClient.GetWorkflow(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SiteWorkflowResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List the workflows for a web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/workflows + /// + /// + /// Operation Id + /// WebApps_ListWorkflows + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _siteWorkflowWebAppsRestClient.CreateListWorkflowsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _siteWorkflowWebAppsRestClient.CreateListWorkflowsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SiteWorkflowResource(Client, WorkflowEnvelopeData.DeserializeWorkflowEnvelopeData(e)), _siteWorkflowWebAppsClientDiagnostics, Pipeline, "SiteWorkflowCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List the workflows for a web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/workflows + /// + /// + /// Operation Id + /// WebApps_ListWorkflows + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _siteWorkflowWebAppsRestClient.CreateListWorkflowsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _siteWorkflowWebAppsRestClient.CreateListWorkflowsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SiteWorkflowResource(Client, WorkflowEnvelopeData.DeserializeWorkflowEnvelopeData(e)), _siteWorkflowWebAppsClientDiagnostics, Pipeline, "SiteWorkflowCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetWorkflow + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var scope = _siteWorkflowWebAppsClientDiagnostics.CreateScope("SiteWorkflowCollection.Exists"); + scope.Start(); + try + { + var response = await _siteWorkflowWebAppsRestClient.GetWorkflowAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetWorkflow + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var scope = _siteWorkflowWebAppsClientDiagnostics.CreateScope("SiteWorkflowCollection.Exists"); + scope.Start(); + try + { + var response = _siteWorkflowWebAppsRestClient.GetWorkflow(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetWorkflow + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var scope = _siteWorkflowWebAppsClientDiagnostics.CreateScope("SiteWorkflowCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _siteWorkflowWebAppsRestClient.GetWorkflowAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SiteWorkflowResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetWorkflow + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string workflowName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + + using var scope = _siteWorkflowWebAppsClientDiagnostics.CreateScope("SiteWorkflowCollection.GetIfExists"); + scope.Start(); + try + { + var response = _siteWorkflowWebAppsRestClient.GetWorkflow(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SiteWorkflowResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteWorkflowResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteWorkflowResource.Serialization.cs new file mode 100644 index 0000000000000..163dc096044b2 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteWorkflowResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppService +{ + public partial class SiteWorkflowResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + WorkflowEnvelopeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + WorkflowEnvelopeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteWorkflowResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteWorkflowResource.cs new file mode 100644 index 0000000000000..76e4ed1d66512 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteWorkflowResource.cs @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a SiteWorkflow along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetSiteWorkflowResource method. + /// Otherwise you can get one from its parent resource using the GetSiteWorkflow method. + /// + public partial class SiteWorkflowResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + /// The workflowName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string workflowName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/workflows/{workflowName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _siteWorkflowWebAppsClientDiagnostics; + private readonly WebAppsRestOperations _siteWorkflowWebAppsRestClient; + private readonly WorkflowEnvelopeData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Web/sites/workflows"; + + /// Initializes a new instance of the class for mocking. + protected SiteWorkflowResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal SiteWorkflowResource(ArmClient client, WorkflowEnvelopeData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal SiteWorkflowResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _siteWorkflowWebAppsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string siteWorkflowWebAppsApiVersion); + _siteWorkflowWebAppsRestClient = new WebAppsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, siteWorkflowWebAppsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual WorkflowEnvelopeData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get workflow information by its ID for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetWorkflow + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _siteWorkflowWebAppsClientDiagnostics.CreateScope("SiteWorkflowResource.Get"); + scope.Start(); + try + { + var response = await _siteWorkflowWebAppsRestClient.GetWorkflowAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SiteWorkflowResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get workflow information by its ID for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetWorkflow + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _siteWorkflowWebAppsClientDiagnostics.CreateScope("SiteWorkflowResource.Get"); + scope.Start(); + try + { + var response = _siteWorkflowWebAppsRestClient.GetWorkflow(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SiteWorkflowResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SlotConfigNamesResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SlotConfigNamesResource.cs index 195666eeb82bc..f7eb3625de2db 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SlotConfigNamesResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SlotConfigNamesResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(CancellationToken cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyCollection.cs new file mode 100644 index 0000000000000..56e7e04800d25 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyCollection.cs @@ -0,0 +1,470 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetStaticSiteBasicAuthProperties method from an instance of . + /// + public partial class StaticSiteBasicAuthPropertyCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _staticSiteBasicAuthPropertyStaticSitesClientDiagnostics; + private readonly StaticSitesRestOperations _staticSiteBasicAuthPropertyStaticSitesRestClient; + + /// Initializes a new instance of the class for mocking. + protected StaticSiteBasicAuthPropertyCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal StaticSiteBasicAuthPropertyCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _staticSiteBasicAuthPropertyStaticSitesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", StaticSiteBasicAuthPropertyResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(StaticSiteBasicAuthPropertyResource.ResourceType, out string staticSiteBasicAuthPropertyStaticSitesApiVersion); + _staticSiteBasicAuthPropertyStaticSitesRestClient = new StaticSitesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, staticSiteBasicAuthPropertyStaticSitesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != StaticSiteResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, StaticSiteResource.ResourceType), nameof(id)); + } + + /// + /// Description for Adds or updates basic auth for a static site. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName} + /// + /// + /// Operation Id + /// StaticSites_CreateOrUpdateBasicAuth + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// name of the basic auth entry. + /// A JSON representation of the basic auth properties. + /// The cancellation token to use. + /// is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, StaticSiteBasicAuthName basicAuthName, StaticSiteBasicAuthPropertyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteBasicAuthPropertyStaticSitesClientDiagnostics.CreateScope("StaticSiteBasicAuthPropertyCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _staticSiteBasicAuthPropertyStaticSitesRestClient.CreateOrUpdateBasicAuthAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, basicAuthName, data, cancellationToken).ConfigureAwait(false); + var uri = _staticSiteBasicAuthPropertyStaticSitesRestClient.CreateCreateOrUpdateBasicAuthRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, basicAuthName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(Response.FromValue(new StaticSiteBasicAuthPropertyResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Adds or updates basic auth for a static site. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName} + /// + /// + /// Operation Id + /// StaticSites_CreateOrUpdateBasicAuth + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// name of the basic auth entry. + /// A JSON representation of the basic auth properties. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, StaticSiteBasicAuthName basicAuthName, StaticSiteBasicAuthPropertyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteBasicAuthPropertyStaticSitesClientDiagnostics.CreateScope("StaticSiteBasicAuthPropertyCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _staticSiteBasicAuthPropertyStaticSitesRestClient.CreateOrUpdateBasicAuth(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, basicAuthName, data, cancellationToken); + var uri = _staticSiteBasicAuthPropertyStaticSitesRestClient.CreateCreateOrUpdateBasicAuthRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, basicAuthName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(Response.FromValue(new StaticSiteBasicAuthPropertyResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Gets the basic auth properties for a static site. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName} + /// + /// + /// Operation Id + /// StaticSites_GetBasicAuth + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// name of the basic auth entry. + /// The cancellation token to use. + public virtual async Task> GetAsync(StaticSiteBasicAuthName basicAuthName, CancellationToken cancellationToken = default) + { + using var scope = _staticSiteBasicAuthPropertyStaticSitesClientDiagnostics.CreateScope("StaticSiteBasicAuthPropertyCollection.Get"); + scope.Start(); + try + { + var response = await _staticSiteBasicAuthPropertyStaticSitesRestClient.GetBasicAuthAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, basicAuthName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteBasicAuthPropertyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Gets the basic auth properties for a static site. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName} + /// + /// + /// Operation Id + /// StaticSites_GetBasicAuth + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// name of the basic auth entry. + /// The cancellation token to use. + public virtual Response Get(StaticSiteBasicAuthName basicAuthName, CancellationToken cancellationToken = default) + { + using var scope = _staticSiteBasicAuthPropertyStaticSitesClientDiagnostics.CreateScope("StaticSiteBasicAuthPropertyCollection.Get"); + scope.Start(); + try + { + var response = _staticSiteBasicAuthPropertyStaticSitesRestClient.GetBasicAuth(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, basicAuthName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteBasicAuthPropertyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Gets the basic auth properties for a static site as a collection. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth + /// + /// + /// Operation Id + /// StaticSites_ListBasicAuth + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _staticSiteBasicAuthPropertyStaticSitesRestClient.CreateListBasicAuthRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _staticSiteBasicAuthPropertyStaticSitesRestClient.CreateListBasicAuthNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new StaticSiteBasicAuthPropertyResource(Client, StaticSiteBasicAuthPropertyData.DeserializeStaticSiteBasicAuthPropertyData(e)), _staticSiteBasicAuthPropertyStaticSitesClientDiagnostics, Pipeline, "StaticSiteBasicAuthPropertyCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Description for Gets the basic auth properties for a static site as a collection. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth + /// + /// + /// Operation Id + /// StaticSites_ListBasicAuth + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _staticSiteBasicAuthPropertyStaticSitesRestClient.CreateListBasicAuthRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _staticSiteBasicAuthPropertyStaticSitesRestClient.CreateListBasicAuthNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new StaticSiteBasicAuthPropertyResource(Client, StaticSiteBasicAuthPropertyData.DeserializeStaticSiteBasicAuthPropertyData(e)), _staticSiteBasicAuthPropertyStaticSitesClientDiagnostics, Pipeline, "StaticSiteBasicAuthPropertyCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName} + /// + /// + /// Operation Id + /// StaticSites_GetBasicAuth + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// name of the basic auth entry. + /// The cancellation token to use. + public virtual async Task> ExistsAsync(StaticSiteBasicAuthName basicAuthName, CancellationToken cancellationToken = default) + { + using var scope = _staticSiteBasicAuthPropertyStaticSitesClientDiagnostics.CreateScope("StaticSiteBasicAuthPropertyCollection.Exists"); + scope.Start(); + try + { + var response = await _staticSiteBasicAuthPropertyStaticSitesRestClient.GetBasicAuthAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, basicAuthName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName} + /// + /// + /// Operation Id + /// StaticSites_GetBasicAuth + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// name of the basic auth entry. + /// The cancellation token to use. + public virtual Response Exists(StaticSiteBasicAuthName basicAuthName, CancellationToken cancellationToken = default) + { + using var scope = _staticSiteBasicAuthPropertyStaticSitesClientDiagnostics.CreateScope("StaticSiteBasicAuthPropertyCollection.Exists"); + scope.Start(); + try + { + var response = _staticSiteBasicAuthPropertyStaticSitesRestClient.GetBasicAuth(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, basicAuthName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName} + /// + /// + /// Operation Id + /// StaticSites_GetBasicAuth + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// name of the basic auth entry. + /// The cancellation token to use. + public virtual async Task> GetIfExistsAsync(StaticSiteBasicAuthName basicAuthName, CancellationToken cancellationToken = default) + { + using var scope = _staticSiteBasicAuthPropertyStaticSitesClientDiagnostics.CreateScope("StaticSiteBasicAuthPropertyCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _staticSiteBasicAuthPropertyStaticSitesRestClient.GetBasicAuthAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, basicAuthName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new StaticSiteBasicAuthPropertyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName} + /// + /// + /// Operation Id + /// StaticSites_GetBasicAuth + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// name of the basic auth entry. + /// The cancellation token to use. + public virtual NullableResponse GetIfExists(StaticSiteBasicAuthName basicAuthName, CancellationToken cancellationToken = default) + { + using var scope = _staticSiteBasicAuthPropertyStaticSitesClientDiagnostics.CreateScope("StaticSiteBasicAuthPropertyCollection.GetIfExists"); + scope.Start(); + try + { + var response = _staticSiteBasicAuthPropertyStaticSitesRestClient.GetBasicAuth(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, basicAuthName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new StaticSiteBasicAuthPropertyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyData.Serialization.cs new file mode 100644 index 0000000000000..d0035dcef8cf9 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyData.Serialization.cs @@ -0,0 +1,488 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class StaticSiteBasicAuthPropertyData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StaticSiteBasicAuthPropertyData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); + } + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Password)) + { + writer.WritePropertyName("password"u8); + writer.WriteStringValue(Password); + } + if (Optional.IsDefined(SecretUri)) + { + writer.WritePropertyName("secretUrl"u8); + writer.WriteStringValue(SecretUri.AbsoluteUri); + } + if (Optional.IsDefined(ApplicableEnvironmentsMode)) + { + writer.WritePropertyName("applicableEnvironmentsMode"u8); + writer.WriteStringValue(ApplicableEnvironmentsMode); + } + if (Optional.IsCollectionDefined(Environments)) + { + writer.WritePropertyName("environments"u8); + writer.WriteStartArray(); + foreach (var item in Environments) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(SecretState)) + { + writer.WritePropertyName("secretState"u8); + writer.WriteStringValue(SecretState); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + StaticSiteBasicAuthPropertyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StaticSiteBasicAuthPropertyData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStaticSiteBasicAuthPropertyData(document.RootElement, options); + } + + internal static StaticSiteBasicAuthPropertyData DeserializeStaticSiteBasicAuthPropertyData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string kind = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + string password = default; + Uri secretUrl = default; + string applicableEnvironmentsMode = default; + IList environments = default; + string secretState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kind"u8)) + { + kind = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("password"u8)) + { + password = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("secretUrl"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + secretUrl = new Uri(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("applicableEnvironmentsMode"u8)) + { + applicableEnvironmentsMode = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("environments"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + environments = array; + continue; + } + if (property0.NameEquals("secretState"u8)) + { + secretState = property0.Value.GetString(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StaticSiteBasicAuthPropertyData( + id, + name, + type, + systemData, + password, + secretUrl, + applicableEnvironmentsMode, + environments ?? new ChangeTrackingList(), + secretState, + kind, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Kind), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" kind: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Kind)) + { + builder.Append(" kind: "); + if (Kind.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Kind}'''"); + } + else + { + builder.AppendLine($"'{Kind}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Password), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" password: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Password)) + { + builder.Append(" password: "); + if (Password.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Password}'''"); + } + else + { + builder.AppendLine($"'{Password}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SecretUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" secretUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SecretUri)) + { + builder.Append(" secretUrl: "); + builder.AppendLine($"'{SecretUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ApplicableEnvironmentsMode), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" applicableEnvironmentsMode: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ApplicableEnvironmentsMode)) + { + builder.Append(" applicableEnvironmentsMode: "); + if (ApplicableEnvironmentsMode.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ApplicableEnvironmentsMode}'''"); + } + else + { + builder.AppendLine($"'{ApplicableEnvironmentsMode}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Environments), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" environments: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Environments)) + { + if (Environments.Any()) + { + builder.Append(" environments: "); + builder.AppendLine("["); + foreach (var item in Environments) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SecretState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" secretState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SecretState)) + { + builder.Append(" secretState: "); + if (SecretState.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{SecretState}'''"); + } + else + { + builder.AppendLine($"'{SecretState}'"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(StaticSiteBasicAuthPropertyData)} does not support writing '{options.Format}' format."); + } + } + + StaticSiteBasicAuthPropertyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeStaticSiteBasicAuthPropertyData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StaticSiteBasicAuthPropertyData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyData.cs new file mode 100644 index 0000000000000..ef0cb84ab30cb --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyData.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing the StaticSiteBasicAuthProperty data model. + /// Static site basic auth properties ARM resource. + /// + public partial class StaticSiteBasicAuthPropertyData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public StaticSiteBasicAuthPropertyData() + { + Environments = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The password for basic auth. + /// Url to the secret in Key Vault. + /// State indicating if basic auth is enabled and for what environments it is active. + /// The list of enabled environments for Basic Auth if ApplicableEnvironmentsMode is set to SpecifiedEnvironments. + /// State indicating if basic auth has a secret and what type it is. + /// Kind of resource. + /// Keeps track of any properties unknown to the library. + internal StaticSiteBasicAuthPropertyData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string password, Uri secretUri, string applicableEnvironmentsMode, IList environments, string secretState, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Password = password; + SecretUri = secretUri; + ApplicableEnvironmentsMode = applicableEnvironmentsMode; + Environments = environments; + SecretState = secretState; + Kind = kind; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The password for basic auth. + [WirePath("properties.password")] + public string Password { get; set; } + /// Url to the secret in Key Vault. + [WirePath("properties.secretUrl")] + public Uri SecretUri { get; set; } + /// State indicating if basic auth is enabled and for what environments it is active. + [WirePath("properties.applicableEnvironmentsMode")] + public string ApplicableEnvironmentsMode { get; set; } + /// The list of enabled environments for Basic Auth if ApplicableEnvironmentsMode is set to SpecifiedEnvironments. + [WirePath("properties.environments")] + public IList Environments { get; } + /// State indicating if basic auth has a secret and what type it is. + [WirePath("properties.secretState")] + public string SecretState { get; } + /// Kind of resource. + [WirePath("kind")] + public string Kind { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyResource.Serialization.cs new file mode 100644 index 0000000000000..e538670865d8d --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppService +{ + public partial class StaticSiteBasicAuthPropertyResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + StaticSiteBasicAuthPropertyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + StaticSiteBasicAuthPropertyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyResource.cs new file mode 100644 index 0000000000000..b4c33e085bf67 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyResource.cs @@ -0,0 +1,268 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a StaticSiteBasicAuthProperty along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetStaticSiteBasicAuthPropertyResource method. + /// Otherwise you can get one from its parent resource using the GetStaticSiteBasicAuthProperty method. + /// + public partial class StaticSiteBasicAuthPropertyResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + /// The basicAuthName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, StaticSiteBasicAuthName basicAuthName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _staticSiteBasicAuthPropertyStaticSitesClientDiagnostics; + private readonly StaticSitesRestOperations _staticSiteBasicAuthPropertyStaticSitesRestClient; + private readonly StaticSiteBasicAuthPropertyData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Web/staticSites/basicAuth"; + + /// Initializes a new instance of the class for mocking. + protected StaticSiteBasicAuthPropertyResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal StaticSiteBasicAuthPropertyResource(ArmClient client, StaticSiteBasicAuthPropertyData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal StaticSiteBasicAuthPropertyResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _staticSiteBasicAuthPropertyStaticSitesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string staticSiteBasicAuthPropertyStaticSitesApiVersion); + _staticSiteBasicAuthPropertyStaticSitesRestClient = new StaticSitesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, staticSiteBasicAuthPropertyStaticSitesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual StaticSiteBasicAuthPropertyData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Description for Gets the basic auth properties for a static site. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName} + /// + /// + /// Operation Id + /// StaticSites_GetBasicAuth + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _staticSiteBasicAuthPropertyStaticSitesClientDiagnostics.CreateScope("StaticSiteBasicAuthPropertyResource.Get"); + scope.Start(); + try + { + var response = await _staticSiteBasicAuthPropertyStaticSitesRestClient.GetBasicAuthAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteBasicAuthPropertyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Gets the basic auth properties for a static site. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName} + /// + /// + /// Operation Id + /// StaticSites_GetBasicAuth + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _staticSiteBasicAuthPropertyStaticSitesClientDiagnostics.CreateScope("StaticSiteBasicAuthPropertyResource.Get"); + scope.Start(); + try + { + var response = _staticSiteBasicAuthPropertyStaticSitesRestClient.GetBasicAuth(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteBasicAuthPropertyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Adds or updates basic auth for a static site. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName} + /// + /// + /// Operation Id + /// StaticSites_CreateOrUpdateBasicAuth + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// A JSON representation of the basic auth properties. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, StaticSiteBasicAuthPropertyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteBasicAuthPropertyStaticSitesClientDiagnostics.CreateScope("StaticSiteBasicAuthPropertyResource.Update"); + scope.Start(); + try + { + var response = await _staticSiteBasicAuthPropertyStaticSitesRestClient.CreateOrUpdateBasicAuthAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var uri = _staticSiteBasicAuthPropertyStaticSitesRestClient.CreateCreateOrUpdateBasicAuthRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(Response.FromValue(new StaticSiteBasicAuthPropertyResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Adds or updates basic auth for a static site. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName} + /// + /// + /// Operation Id + /// StaticSites_CreateOrUpdateBasicAuth + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// A JSON representation of the basic auth properties. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, StaticSiteBasicAuthPropertyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteBasicAuthPropertyStaticSitesClientDiagnostics.CreateScope("StaticSiteBasicAuthPropertyResource.Update"); + scope.Start(); + try + { + var response = _staticSiteBasicAuthPropertyStaticSitesRestClient.CreateOrUpdateBasicAuth(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var uri = _staticSiteBasicAuthPropertyStaticSitesRestClient.CreateCreateOrUpdateBasicAuthRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(Response.FromValue(new StaticSiteBasicAuthPropertyResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildCollection.cs index c0f1e25c07e2a..251a5715b1267 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string env /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string environmentName, Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string environmentName, Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string environmentName, CancellationToken c /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildData.Serialization.cs index ef612433acc37..8455146808795 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildData.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildData.Serialization.cs @@ -102,6 +102,26 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } + if (options.Format != "W" && Optional.IsCollectionDefined(LinkedBackends)) + { + writer.WritePropertyName("linkedBackends"u8); + writer.WriteStartArray(); + foreach (var item in LinkedBackends) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsCollectionDefined(DatabaseConnections)) + { + writer.WritePropertyName("databaseConnections"u8); + writer.WriteStartArray(); + foreach (var item in DatabaseConnections) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -154,6 +174,8 @@ internal static StaticSiteBuildData DeserializeStaticSiteBuildData(JsonElement e DateTimeOffset? lastUpdatedOn = default; StaticSiteBuildStatus? status = default; IReadOnlyList userProvidedFunctionApps = default; + IReadOnlyList linkedBackends = default; + IReadOnlyList databaseConnections = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -257,6 +279,34 @@ internal static StaticSiteBuildData DeserializeStaticSiteBuildData(JsonElement e userProvidedFunctionApps = array; continue; } + if (property0.NameEquals("linkedBackends"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(StaticSiteLinkedBackendInfo.DeserializeStaticSiteLinkedBackendInfo(item, options)); + } + linkedBackends = array; + continue; + } + if (property0.NameEquals("databaseConnections"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(StaticSiteDatabaseConnectionOverview.DeserializeStaticSiteDatabaseConnectionOverview(item, options)); + } + databaseConnections = array; + continue; + } } continue; } @@ -279,6 +329,8 @@ internal static StaticSiteBuildData DeserializeStaticSiteBuildData(JsonElement e lastUpdatedOn, status, userProvidedFunctionApps ?? new ChangeTrackingList(), + linkedBackends ?? new ChangeTrackingList(), + databaseConnections ?? new ChangeTrackingList(), kind, serializedAdditionalRawData); } @@ -534,6 +586,52 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LinkedBackends), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" linkedBackends: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(LinkedBackends)) + { + if (LinkedBackends.Any()) + { + builder.Append(" linkedBackends: "); + builder.AppendLine("["); + foreach (var item in LinkedBackends) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " linkedBackends: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DatabaseConnections), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" databaseConnections: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(DatabaseConnections)) + { + if (DatabaseConnections.Any()) + { + builder.Append(" databaseConnections: "); + builder.AppendLine("["); + foreach (var item in DatabaseConnections) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " databaseConnections: "); + } + builder.AppendLine(" ]"); + } + } + } + builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildData.cs index eb73b6cda5e75..77e64989a4685 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildData.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildData.cs @@ -55,6 +55,8 @@ public partial class StaticSiteBuildData : ResourceData public StaticSiteBuildData() { UserProvidedFunctionApps = new ChangeTrackingList(); + LinkedBackends = new ChangeTrackingList(); + DatabaseConnections = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -70,9 +72,11 @@ public StaticSiteBuildData() /// When this build was updated. /// The status of the static site build. /// User provided function apps registered with the static site build. + /// Backends linked to the static side build. + /// Database connections for the static site build. /// Kind of resource. /// Keeps track of any properties unknown to the library. - internal StaticSiteBuildData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string buildId, string sourceBranch, string pullRequestTitle, string hostname, DateTimeOffset? createdOn, DateTimeOffset? lastUpdatedOn, StaticSiteBuildStatus? status, IReadOnlyList userProvidedFunctionApps, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal StaticSiteBuildData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string buildId, string sourceBranch, string pullRequestTitle, string hostname, DateTimeOffset? createdOn, DateTimeOffset? lastUpdatedOn, StaticSiteBuildStatus? status, IReadOnlyList userProvidedFunctionApps, IReadOnlyList linkedBackends, IReadOnlyList databaseConnections, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { BuildId = buildId; SourceBranch = sourceBranch; @@ -82,6 +86,8 @@ internal StaticSiteBuildData(ResourceIdentifier id, string name, ResourceType re LastUpdatedOn = lastUpdatedOn; Status = status; UserProvidedFunctionApps = userProvidedFunctionApps; + LinkedBackends = linkedBackends; + DatabaseConnections = databaseConnections; Kind = kind; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -110,6 +116,12 @@ internal StaticSiteBuildData(ResourceIdentifier id, string name, ResourceType re /// User provided function apps registered with the static site build. [WirePath("properties.userProvidedFunctionApps")] public IReadOnlyList UserProvidedFunctionApps { get; } + /// Backends linked to the static side build. + [WirePath("properties.linkedBackends")] + public IReadOnlyList LinkedBackends { get; } + /// Database connections for the static site build. + [WirePath("properties.databaseConnections")] + public IReadOnlyList DatabaseConnections { get; } /// Kind of resource. [WirePath("kind")] public string Kind { get; set; } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildDatabaseConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildDatabaseConnectionCollection.cs new file mode 100644 index 0000000000000..87f3bd8e814d2 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildDatabaseConnectionCollection.cs @@ -0,0 +1,497 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetStaticSiteBuildDatabaseConnections method from an instance of . + /// + public partial class StaticSiteBuildDatabaseConnectionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics; + private readonly StaticSitesRestOperations _staticSiteBuildDatabaseConnectionStaticSitesRestClient; + + /// Initializes a new instance of the class for mocking. + protected StaticSiteBuildDatabaseConnectionCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal StaticSiteBuildDatabaseConnectionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", StaticSiteBuildDatabaseConnectionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(StaticSiteBuildDatabaseConnectionResource.ResourceType, out string staticSiteBuildDatabaseConnectionStaticSitesApiVersion); + _staticSiteBuildDatabaseConnectionStaticSitesRestClient = new StaticSitesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, staticSiteBuildDatabaseConnectionStaticSitesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != StaticSiteBuildResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, StaticSiteBuildResource.ResourceType), nameof(id)); + } + + /// + /// Description for Create or update a database connection for a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_CreateOrUpdateBuildDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the database connection. + /// A JSON representation of the database connection request properties. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string databaseConnectionName, StaticSiteDatabaseConnectionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildDatabaseConnectionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _staticSiteBuildDatabaseConnectionStaticSitesRestClient.CreateOrUpdateBuildDatabaseConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, databaseConnectionName, data, cancellationToken).ConfigureAwait(false); + var uri = _staticSiteBuildDatabaseConnectionStaticSitesRestClient.CreateCreateOrUpdateBuildDatabaseConnectionRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, databaseConnectionName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(Response.FromValue(new StaticSiteBuildDatabaseConnectionResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Create or update a database connection for a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_CreateOrUpdateBuildDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the database connection. + /// A JSON representation of the database connection request properties. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string databaseConnectionName, StaticSiteDatabaseConnectionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildDatabaseConnectionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _staticSiteBuildDatabaseConnectionStaticSitesRestClient.CreateOrUpdateBuildDatabaseConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, databaseConnectionName, data, cancellationToken); + var uri = _staticSiteBuildDatabaseConnectionStaticSitesRestClient.CreateCreateOrUpdateBuildDatabaseConnectionRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, databaseConnectionName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(Response.FromValue(new StaticSiteBuildDatabaseConnectionResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns overview of a database connection for a static site build by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetBuildDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database connection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string databaseConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + + using var scope = _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildDatabaseConnectionCollection.Get"); + scope.Start(); + try + { + var response = await _staticSiteBuildDatabaseConnectionStaticSitesRestClient.GetBuildDatabaseConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, databaseConnectionName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteBuildDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns overview of a database connection for a static site build by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetBuildDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database connection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string databaseConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + + using var scope = _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildDatabaseConnectionCollection.Get"); + scope.Start(); + try + { + var response = _staticSiteBuildDatabaseConnectionStaticSitesRestClient.GetBuildDatabaseConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, databaseConnectionName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteBuildDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns overviews of database connections for a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections + /// + /// + /// Operation Id + /// StaticSites_GetBuildDatabaseConnections + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _staticSiteBuildDatabaseConnectionStaticSitesRestClient.CreateGetBuildDatabaseConnectionsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _staticSiteBuildDatabaseConnectionStaticSitesRestClient.CreateGetBuildDatabaseConnectionsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new StaticSiteBuildDatabaseConnectionResource(Client, StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(e)), _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics, Pipeline, "StaticSiteBuildDatabaseConnectionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Returns overviews of database connections for a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections + /// + /// + /// Operation Id + /// StaticSites_GetBuildDatabaseConnections + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _staticSiteBuildDatabaseConnectionStaticSitesRestClient.CreateGetBuildDatabaseConnectionsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _staticSiteBuildDatabaseConnectionStaticSitesRestClient.CreateGetBuildDatabaseConnectionsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new StaticSiteBuildDatabaseConnectionResource(Client, StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(e)), _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics, Pipeline, "StaticSiteBuildDatabaseConnectionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetBuildDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database connection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string databaseConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + + using var scope = _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildDatabaseConnectionCollection.Exists"); + scope.Start(); + try + { + var response = await _staticSiteBuildDatabaseConnectionStaticSitesRestClient.GetBuildDatabaseConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, databaseConnectionName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetBuildDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database connection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string databaseConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + + using var scope = _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildDatabaseConnectionCollection.Exists"); + scope.Start(); + try + { + var response = _staticSiteBuildDatabaseConnectionStaticSitesRestClient.GetBuildDatabaseConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, databaseConnectionName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetBuildDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database connection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string databaseConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + + using var scope = _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildDatabaseConnectionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _staticSiteBuildDatabaseConnectionStaticSitesRestClient.GetBuildDatabaseConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, databaseConnectionName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new StaticSiteBuildDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetBuildDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database connection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string databaseConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + + using var scope = _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildDatabaseConnectionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _staticSiteBuildDatabaseConnectionStaticSitesRestClient.GetBuildDatabaseConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, databaseConnectionName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new StaticSiteBuildDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildDatabaseConnectionResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildDatabaseConnectionResource.Serialization.cs new file mode 100644 index 0000000000000..70e8ca7593bf9 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildDatabaseConnectionResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppService +{ + public partial class StaticSiteBuildDatabaseConnectionResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + StaticSiteDatabaseConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + StaticSiteDatabaseConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildDatabaseConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildDatabaseConnectionResource.cs new file mode 100644 index 0000000000000..424c42768eb7c --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildDatabaseConnectionResource.cs @@ -0,0 +1,421 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a StaticSiteBuildDatabaseConnection along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetStaticSiteBuildDatabaseConnectionResource method. + /// Otherwise you can get one from its parent resource using the GetStaticSiteBuildDatabaseConnection method. + /// + public partial class StaticSiteBuildDatabaseConnectionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + /// The environmentName. + /// The databaseConnectionName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string environmentName, string databaseConnectionName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics; + private readonly StaticSitesRestOperations _staticSiteBuildDatabaseConnectionStaticSitesRestClient; + private readonly StaticSiteDatabaseConnectionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Web/staticSites/builds/databaseConnections"; + + /// Initializes a new instance of the class for mocking. + protected StaticSiteBuildDatabaseConnectionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal StaticSiteBuildDatabaseConnectionResource(ArmClient client, StaticSiteDatabaseConnectionData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal StaticSiteBuildDatabaseConnectionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string staticSiteBuildDatabaseConnectionStaticSitesApiVersion); + _staticSiteBuildDatabaseConnectionStaticSitesRestClient = new StaticSitesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, staticSiteBuildDatabaseConnectionStaticSitesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual StaticSiteDatabaseConnectionData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Returns overview of a database connection for a static site build by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetBuildDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildDatabaseConnectionResource.Get"); + scope.Start(); + try + { + var response = await _staticSiteBuildDatabaseConnectionStaticSitesRestClient.GetBuildDatabaseConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteBuildDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns overview of a database connection for a static site build by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetBuildDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildDatabaseConnectionResource.Get"); + scope.Start(); + try + { + var response = _staticSiteBuildDatabaseConnectionStaticSitesRestClient.GetBuildDatabaseConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteBuildDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a database connection for a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_DeleteBuildDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildDatabaseConnectionResource.Delete"); + scope.Start(); + try + { + var response = await _staticSiteBuildDatabaseConnectionStaticSitesRestClient.DeleteBuildDatabaseConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _staticSiteBuildDatabaseConnectionStaticSitesRestClient.CreateDeleteBuildDatabaseConnectionRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a database connection for a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_DeleteBuildDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildDatabaseConnectionResource.Delete"); + scope.Start(); + try + { + var response = _staticSiteBuildDatabaseConnectionStaticSitesRestClient.DeleteBuildDatabaseConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var uri = _staticSiteBuildDatabaseConnectionStaticSitesRestClient.CreateDeleteBuildDatabaseConnectionRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Create or update a database connection for a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_UpdateBuildDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// A JSON representation of the database connection request properties. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(StaticSiteDatabaseConnectionPatchContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildDatabaseConnectionResource.Update"); + scope.Start(); + try + { + var response = await _staticSiteBuildDatabaseConnectionStaticSitesRestClient.UpdateBuildDatabaseConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new StaticSiteBuildDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Create or update a database connection for a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_UpdateBuildDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// A JSON representation of the database connection request properties. + /// The cancellation token to use. + /// is null. + public virtual Response Update(StaticSiteDatabaseConnectionPatchContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildDatabaseConnectionResource.Update"); + scope.Start(); + try + { + var response = _staticSiteBuildDatabaseConnectionStaticSitesRestClient.UpdateBuildDatabaseConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken); + return Response.FromValue(new StaticSiteBuildDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns details of a database connection for a static site build by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName}/show + /// + /// + /// Operation Id + /// StaticSites_GetBuildDatabaseConnectionWithDetails + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetBuildDatabaseConnectionWithDetailsAsync(CancellationToken cancellationToken = default) + { + using var scope = _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildDatabaseConnectionResource.GetBuildDatabaseConnectionWithDetails"); + scope.Start(); + try + { + var response = await _staticSiteBuildDatabaseConnectionStaticSitesRestClient.GetBuildDatabaseConnectionWithDetailsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new StaticSiteBuildDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns details of a database connection for a static site build by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName}/show + /// + /// + /// Operation Id + /// StaticSites_GetBuildDatabaseConnectionWithDetails + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetBuildDatabaseConnectionWithDetails(CancellationToken cancellationToken = default) + { + using var scope = _staticSiteBuildDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildDatabaseConnectionResource.GetBuildDatabaseConnectionWithDetails"); + scope.Start(); + try + { + var response = _staticSiteBuildDatabaseConnectionStaticSitesRestClient.GetBuildDatabaseConnectionWithDetails(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new StaticSiteBuildDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildLinkedBackendCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildLinkedBackendCollection.cs new file mode 100644 index 0000000000000..d65a695516446 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildLinkedBackendCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetStaticSiteBuildLinkedBackends method from an instance of . + /// + public partial class StaticSiteBuildLinkedBackendCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics; + private readonly StaticSitesRestOperations _staticSiteBuildLinkedBackendStaticSitesRestClient; + + /// Initializes a new instance of the class for mocking. + protected StaticSiteBuildLinkedBackendCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal StaticSiteBuildLinkedBackendCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", StaticSiteBuildLinkedBackendResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(StaticSiteBuildLinkedBackendResource.ResourceType, out string staticSiteBuildLinkedBackendStaticSitesApiVersion); + _staticSiteBuildLinkedBackendStaticSitesRestClient = new StaticSitesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, staticSiteBuildLinkedBackendStaticSitesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != StaticSiteBuildResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, StaticSiteBuildResource.ResourceType), nameof(id)); + } + + /// + /// Link backend to a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_LinkBackendToBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the backend to link to the static site. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string linkedBackendName, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildLinkedBackendCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _staticSiteBuildLinkedBackendStaticSitesRestClient.LinkBackendToBuildAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, linkedBackendName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(new StaticSiteBuildLinkedBackendOperationSource(Client), _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics, Pipeline, _staticSiteBuildLinkedBackendStaticSitesRestClient.CreateLinkBackendToBuildRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, linkedBackendName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Link backend to a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_LinkBackendToBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the backend to link to the static site. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string linkedBackendName, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildLinkedBackendCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _staticSiteBuildLinkedBackendStaticSitesRestClient.LinkBackendToBuild(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, linkedBackendName, data, cancellationToken); + var operation = new AppServiceArmOperation(new StaticSiteBuildLinkedBackendOperationSource(Client), _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics, Pipeline, _staticSiteBuildLinkedBackendStaticSitesRestClient.CreateLinkBackendToBuildRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, linkedBackendName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns the details of a linked backend linked to a static site build by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackendForBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string linkedBackendName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var scope = _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildLinkedBackendCollection.Get"); + scope.Start(); + try + { + var response = await _staticSiteBuildLinkedBackendStaticSitesRestClient.GetLinkedBackendForBuildAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, linkedBackendName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteBuildLinkedBackendResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns the details of a linked backend linked to a static site build by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackendForBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string linkedBackendName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var scope = _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildLinkedBackendCollection.Get"); + scope.Start(); + try + { + var response = _staticSiteBuildLinkedBackendStaticSitesRestClient.GetLinkedBackendForBuild(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, linkedBackendName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteBuildLinkedBackendResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns details of all backends linked to a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackendsForBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _staticSiteBuildLinkedBackendStaticSitesRestClient.CreateGetLinkedBackendsForBuildRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _staticSiteBuildLinkedBackendStaticSitesRestClient.CreateGetLinkedBackendsForBuildNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new StaticSiteBuildLinkedBackendResource(Client, StaticSiteLinkedBackendData.DeserializeStaticSiteLinkedBackendData(e)), _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics, Pipeline, "StaticSiteBuildLinkedBackendCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Returns details of all backends linked to a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackendsForBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _staticSiteBuildLinkedBackendStaticSitesRestClient.CreateGetLinkedBackendsForBuildRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _staticSiteBuildLinkedBackendStaticSitesRestClient.CreateGetLinkedBackendsForBuildNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new StaticSiteBuildLinkedBackendResource(Client, StaticSiteLinkedBackendData.DeserializeStaticSiteLinkedBackendData(e)), _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics, Pipeline, "StaticSiteBuildLinkedBackendCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackendForBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string linkedBackendName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var scope = _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildLinkedBackendCollection.Exists"); + scope.Start(); + try + { + var response = await _staticSiteBuildLinkedBackendStaticSitesRestClient.GetLinkedBackendForBuildAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, linkedBackendName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackendForBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string linkedBackendName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var scope = _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildLinkedBackendCollection.Exists"); + scope.Start(); + try + { + var response = _staticSiteBuildLinkedBackendStaticSitesRestClient.GetLinkedBackendForBuild(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, linkedBackendName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackendForBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string linkedBackendName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var scope = _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildLinkedBackendCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _staticSiteBuildLinkedBackendStaticSitesRestClient.GetLinkedBackendForBuildAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, linkedBackendName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new StaticSiteBuildLinkedBackendResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackendForBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string linkedBackendName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var scope = _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildLinkedBackendCollection.GetIfExists"); + scope.Start(); + try + { + var response = _staticSiteBuildLinkedBackendStaticSitesRestClient.GetLinkedBackendForBuild(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, linkedBackendName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new StaticSiteBuildLinkedBackendResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildLinkedBackendResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildLinkedBackendResource.Serialization.cs new file mode 100644 index 0000000000000..c980b4cb4948b --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildLinkedBackendResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppService +{ + public partial class StaticSiteBuildLinkedBackendResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + StaticSiteLinkedBackendData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + StaticSiteLinkedBackendData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildLinkedBackendResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildLinkedBackendResource.cs new file mode 100644 index 0000000000000..84141b94bf063 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildLinkedBackendResource.cs @@ -0,0 +1,446 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a StaticSiteBuildLinkedBackend along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetStaticSiteBuildLinkedBackendResource method. + /// Otherwise you can get one from its parent resource using the GetStaticSiteBuildLinkedBackend method. + /// + public partial class StaticSiteBuildLinkedBackendResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + /// The environmentName. + /// The linkedBackendName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string environmentName, string linkedBackendName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics; + private readonly StaticSitesRestOperations _staticSiteBuildLinkedBackendStaticSitesRestClient; + private readonly StaticSiteLinkedBackendData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Web/staticSites/builds/linkedBackends"; + + /// Initializes a new instance of the class for mocking. + protected StaticSiteBuildLinkedBackendResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal StaticSiteBuildLinkedBackendResource(ArmClient client, StaticSiteLinkedBackendData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal StaticSiteBuildLinkedBackendResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string staticSiteBuildLinkedBackendStaticSitesApiVersion); + _staticSiteBuildLinkedBackendStaticSitesRestClient = new StaticSitesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, staticSiteBuildLinkedBackendStaticSitesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual StaticSiteLinkedBackendData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Returns the details of a linked backend linked to a static site build by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackendForBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildLinkedBackendResource.Get"); + scope.Start(); + try + { + var response = await _staticSiteBuildLinkedBackendStaticSitesRestClient.GetLinkedBackendForBuildAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteBuildLinkedBackendResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns the details of a linked backend linked to a static site build by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackendForBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildLinkedBackendResource.Get"); + scope.Start(); + try + { + var response = _staticSiteBuildLinkedBackendStaticSitesRestClient.GetLinkedBackendForBuild(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteBuildLinkedBackendResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Unlink a backend from a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_UnlinkBackendFromBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Decides if auth will be removed from backend configuration. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? isCleaningAuthConfig = null, CancellationToken cancellationToken = default) + { + using var scope = _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildLinkedBackendResource.Delete"); + scope.Start(); + try + { + var response = await _staticSiteBuildLinkedBackendStaticSitesRestClient.UnlinkBackendFromBuildAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, isCleaningAuthConfig, cancellationToken).ConfigureAwait(false); + var uri = _staticSiteBuildLinkedBackendStaticSitesRestClient.CreateUnlinkBackendFromBuildRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, isCleaningAuthConfig); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Unlink a backend from a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_UnlinkBackendFromBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Decides if auth will be removed from backend configuration. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, bool? isCleaningAuthConfig = null, CancellationToken cancellationToken = default) + { + using var scope = _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildLinkedBackendResource.Delete"); + scope.Start(); + try + { + var response = _staticSiteBuildLinkedBackendStaticSitesRestClient.UnlinkBackendFromBuild(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, isCleaningAuthConfig, cancellationToken); + var uri = _staticSiteBuildLinkedBackendStaticSitesRestClient.CreateUnlinkBackendFromBuildRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, isCleaningAuthConfig); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Link backend to a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_LinkBackendToBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildLinkedBackendResource.Update"); + scope.Start(); + try + { + var response = await _staticSiteBuildLinkedBackendStaticSitesRestClient.LinkBackendToBuildAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(new StaticSiteBuildLinkedBackendOperationSource(Client), _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics, Pipeline, _staticSiteBuildLinkedBackendStaticSitesRestClient.CreateLinkBackendToBuildRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Link backend to a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_LinkBackendToBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildLinkedBackendResource.Update"); + scope.Start(); + try + { + var response = _staticSiteBuildLinkedBackendStaticSitesRestClient.LinkBackendToBuild(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppServiceArmOperation(new StaticSiteBuildLinkedBackendOperationSource(Client), _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics, Pipeline, _staticSiteBuildLinkedBackendStaticSitesRestClient.CreateLinkBackendToBuildRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Validates that a backend can be linked to a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName}/validate + /// + /// + /// Operation Id + /// StaticSites_ValidateBackendForBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// is null. + public virtual async Task ValidateBackendForBuildAsync(WaitUntil waitUntil, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildLinkedBackendResource.ValidateBackendForBuild"); + scope.Start(); + try + { + var response = await _staticSiteBuildLinkedBackendStaticSitesRestClient.ValidateBackendForBuildAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(_staticSiteBuildLinkedBackendStaticSitesClientDiagnostics, Pipeline, _staticSiteBuildLinkedBackendStaticSitesRestClient.CreateValidateBackendForBuildRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Validates that a backend can be linked to a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName}/validate + /// + /// + /// Operation Id + /// StaticSites_ValidateBackendForBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation ValidateBackendForBuild(WaitUntil waitUntil, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteBuildLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildLinkedBackendResource.ValidateBackendForBuild"); + scope.Start(); + try + { + var response = _staticSiteBuildLinkedBackendStaticSitesRestClient.ValidateBackendForBuild(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppServiceArmOperation(_staticSiteBuildLinkedBackendStaticSitesClientDiagnostics, Pipeline, _staticSiteBuildLinkedBackendStaticSitesRestClient.CreateValidateBackendForBuildRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildResource.cs index aa6629f760655..6717adee0d127 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildResource.cs @@ -90,6 +90,75 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } + /// Gets a collection of StaticSiteBuildDatabaseConnectionResources in the StaticSiteBuild. + /// An object representing collection of StaticSiteBuildDatabaseConnectionResources and their operations over a StaticSiteBuildDatabaseConnectionResource. + public virtual StaticSiteBuildDatabaseConnectionCollection GetStaticSiteBuildDatabaseConnections() + { + return GetCachedClient(client => new StaticSiteBuildDatabaseConnectionCollection(client, Id)); + } + + /// + /// Returns overview of a database connection for a static site build by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetBuildDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database connection. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetStaticSiteBuildDatabaseConnectionAsync(string databaseConnectionName, CancellationToken cancellationToken = default) + { + return await GetStaticSiteBuildDatabaseConnections().GetAsync(databaseConnectionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Returns overview of a database connection for a static site build by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetBuildDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database connection. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetStaticSiteBuildDatabaseConnection(string databaseConnectionName, CancellationToken cancellationToken = default) + { + return GetStaticSiteBuildDatabaseConnections().Get(databaseConnectionName, cancellationToken); + } + /// Gets a collection of StaticSiteBuildUserProvidedFunctionAppResources in the StaticSiteBuild. /// An object representing collection of StaticSiteBuildUserProvidedFunctionAppResources and their operations over a StaticSiteBuildUserProvidedFunctionAppResource. public virtual StaticSiteBuildUserProvidedFunctionAppCollection GetStaticSiteBuildUserProvidedFunctionApps() @@ -110,7 +179,7 @@ public virtual StaticSiteBuildUserProvidedFunctionAppCollection GetStaticSiteBui /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +210,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -159,6 +228,75 @@ public virtual Response GetStati return GetStaticSiteBuildUserProvidedFunctionApps().Get(functionAppName, cancellationToken); } + /// Gets a collection of StaticSiteBuildLinkedBackendResources in the StaticSiteBuild. + /// An object representing collection of StaticSiteBuildLinkedBackendResources and their operations over a StaticSiteBuildLinkedBackendResource. + public virtual StaticSiteBuildLinkedBackendCollection GetStaticSiteBuildLinkedBackends() + { + return GetCachedClient(client => new StaticSiteBuildLinkedBackendCollection(client, Id)); + } + + /// + /// Returns the details of a linked backend linked to a static site build by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackendForBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetStaticSiteBuildLinkedBackendAsync(string linkedBackendName, CancellationToken cancellationToken = default) + { + return await GetStaticSiteBuildLinkedBackends().GetAsync(linkedBackendName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Returns the details of a linked backend linked to a static site build by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackendForBuild + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetStaticSiteBuildLinkedBackend(string linkedBackendName, CancellationToken cancellationToken = default) + { + return GetStaticSiteBuildLinkedBackends().Get(linkedBackendName, cancellationToken); + } + /// /// Description for Gets the details of a static site build. /// @@ -172,7 +310,7 @@ public virtual Response GetStati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -212,7 +350,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -252,7 +390,7 @@ public virtual Response Get(CancellationToken cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -294,7 +432,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -336,7 +474,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -374,7 +512,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -412,7 +550,7 @@ public virtual Response CreateOrUpdateAppSett /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -450,7 +588,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -488,7 +626,7 @@ public virtual Response CreateOrUpdateFunctio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -518,7 +656,7 @@ public virtual AsyncPageable GetFunctionsAsync(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -548,7 +686,7 @@ public virtual Pageable GetFunctions(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -586,7 +724,7 @@ public virtual async Task> GetStatic /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -624,7 +762,7 @@ public virtual Response GetStaticSiteBuildApp /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -662,7 +800,7 @@ public virtual async Task> GetFuncti /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -687,6 +825,66 @@ public virtual Response GetFunctionAppSetting } } + /// + /// Returns details of database connections for a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/showDatabaseConnections + /// + /// + /// Operation Id + /// StaticSites_GetBuildDatabaseConnectionsWithDetails + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetBuildDatabaseConnectionsWithDetailsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _staticSiteBuildStaticSitesRestClient.CreateGetBuildDatabaseConnectionsWithDetailsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _staticSiteBuildStaticSitesRestClient.CreateGetBuildDatabaseConnectionsWithDetailsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(e), _staticSiteBuildStaticSitesClientDiagnostics, Pipeline, "StaticSiteBuildResource.GetBuildDatabaseConnectionsWithDetails", "value", "nextLink", cancellationToken); + } + + /// + /// Returns details of database connections for a static site build + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/builds/{environmentName}/showDatabaseConnections + /// + /// + /// Operation Id + /// StaticSites_GetBuildDatabaseConnectionsWithDetails + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetBuildDatabaseConnectionsWithDetails(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _staticSiteBuildStaticSitesRestClient.CreateGetBuildDatabaseConnectionsWithDetailsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _staticSiteBuildStaticSitesRestClient.CreateGetBuildDatabaseConnectionsWithDetailsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(e), _staticSiteBuildStaticSitesClientDiagnostics, Pipeline, "StaticSiteBuildResource.GetBuildDatabaseConnectionsWithDetails", "value", "nextLink", cancellationToken); + } + /// /// Description for Deploys zipped content to a specific environment of a static site. /// @@ -700,7 +898,7 @@ public virtual Response GetFunctionAppSetting /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -746,7 +944,7 @@ public virtual async Task CreateZipDeploymentAsync(WaitUntil waitU /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildUserProvidedFunctionAppCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildUserProvidedFunctionAppCollection.cs index 623ffbe377bc4..18b176bddf38f 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildUserProvidedFunctionAppCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildUserProvidedFunctionAppCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -164,7 +164,7 @@ public virtual ArmOperation Crea /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -254,7 +254,7 @@ public virtual Response Get(stri /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -284,7 +284,7 @@ public virtual AsyncPageable Get /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string functionAppName, Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response Exists(string functionAppName, CancellationToken c /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -445,7 +445,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildUserProvidedFunctionAppResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildUserProvidedFunctionAppResource.cs index 71db582727bd3..2661319bb8516 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildUserProvidedFunctionAppResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildUserProvidedFunctionAppResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteCollection.cs index a44c270655e8f..416b8e91f296c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnt /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string name, Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string name, CancellationToken c /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken c /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteCustomDomainOverviewCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteCustomDomainOverviewCollection.cs index 252c0a55ebd26..3354aa819add8 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteCustomDomainOverviewCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteCustomDomainOverviewCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpda /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string domai /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string domainName, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string domainName, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteCustomDomainOverviewResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteCustomDomainOverviewResource.cs index d16e22b953695..166965853d5e4 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteCustomDomainOverviewResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteCustomDomainOverviewResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual ArmOperation Update(WaitU /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -404,7 +404,7 @@ public virtual async Task ValidateCustomDomainCanBeAddedToStaticSi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteData.Serialization.cs index 3d6cde41c1bbc..bf4a2fb984853 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteData.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteData.Serialization.cs @@ -160,11 +160,41 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsDefined(Provider)) + if (options.Format != "W" && Optional.IsCollectionDefined(LinkedBackends)) + { + writer.WritePropertyName("linkedBackends"u8); + writer.WriteStartArray(); + foreach (var item in LinkedBackends) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Provider)) { writer.WritePropertyName("provider"u8); writer.WriteStringValue(Provider); } + if (Optional.IsDefined(EnterpriseGradeCdnStatus)) + { + writer.WritePropertyName("enterpriseGradeCdnStatus"u8); + writer.WriteStringValue(EnterpriseGradeCdnStatus.Value.ToString()); + } + if (Optional.IsDefined(PublicNetworkAccess)) + { + writer.WritePropertyName("publicNetworkAccess"u8); + writer.WriteStringValue(PublicNetworkAccess); + } + if (options.Format != "W" && Optional.IsCollectionDefined(DatabaseConnections)) + { + writer.WritePropertyName("databaseConnections"u8); + writer.WriteStartArray(); + foreach (var item in DatabaseConnections) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -226,7 +256,11 @@ internal static StaticSiteData DeserializeStaticSiteData(JsonElement element, Mo string contentDistributionEndpoint = default; string keyVaultReferenceIdentity = default; IReadOnlyList userProvidedFunctionApps = default; + IReadOnlyList linkedBackends = default; string provider = default; + EnterpriseGradeCdnStatus? enterpriseGradeCdnStatus = default; + string publicNetworkAccess = default; + IReadOnlyList databaseConnections = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -418,11 +452,53 @@ internal static StaticSiteData DeserializeStaticSiteData(JsonElement element, Mo userProvidedFunctionApps = array; continue; } + if (property0.NameEquals("linkedBackends"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(StaticSiteLinkedBackendInfo.DeserializeStaticSiteLinkedBackendInfo(item, options)); + } + linkedBackends = array; + continue; + } if (property0.NameEquals("provider"u8)) { provider = property0.Value.GetString(); continue; } + if (property0.NameEquals("enterpriseGradeCdnStatus"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enterpriseGradeCdnStatus = new EnterpriseGradeCdnStatus(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("publicNetworkAccess"u8)) + { + publicNetworkAccess = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("databaseConnections"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(StaticSiteDatabaseConnectionOverview.DeserializeStaticSiteDatabaseConnectionOverview(item, options)); + } + databaseConnections = array; + continue; + } } continue; } @@ -454,7 +530,11 @@ internal static StaticSiteData DeserializeStaticSiteData(JsonElement element, Mo contentDistributionEndpoint, keyVaultReferenceIdentity, userProvidedFunctionApps ?? new ChangeTrackingList(), + linkedBackends ?? new ChangeTrackingList(), provider, + enterpriseGradeCdnStatus, + publicNetworkAccess, + databaseConnections ?? new ChangeTrackingList(), kind, serializedAdditionalRawData); } @@ -900,6 +980,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LinkedBackends), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" linkedBackends: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(LinkedBackends)) + { + if (LinkedBackends.Any()) + { + builder.Append(" linkedBackends: "); + builder.AppendLine("["); + foreach (var item in LinkedBackends) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " linkedBackends: "); + } + builder.AppendLine(" ]"); + } + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Provider), out propertyOverride); if (hasPropertyOverride) { @@ -923,6 +1026,67 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EnterpriseGradeCdnStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enterpriseGradeCdnStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EnterpriseGradeCdnStatus)) + { + builder.Append(" enterpriseGradeCdnStatus: "); + builder.AppendLine($"'{EnterpriseGradeCdnStatus.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublicNetworkAccess), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" publicNetworkAccess: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PublicNetworkAccess)) + { + builder.Append(" publicNetworkAccess: "); + if (PublicNetworkAccess.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PublicNetworkAccess}'''"); + } + else + { + builder.AppendLine($"'{PublicNetworkAccess}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DatabaseConnections), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" databaseConnections: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(DatabaseConnections)) + { + if (DatabaseConnections.Any()) + { + builder.Append(" databaseConnections: "); + builder.AppendLine("["); + foreach (var item in DatabaseConnections) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " databaseConnections: "); + } + builder.AppendLine(" ]"); + } + } + } + builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteData.cs index 770aec2210130..dc7ccbc11ce68 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteData.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteData.cs @@ -58,6 +58,8 @@ public StaticSiteData(AzureLocation location) : base(location) CustomDomains = new ChangeTrackingList(); PrivateEndpointConnections = new ChangeTrackingList(); UserProvidedFunctionApps = new ChangeTrackingList(); + LinkedBackends = new ChangeTrackingList(); + DatabaseConnections = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -82,10 +84,14 @@ public StaticSiteData(AzureLocation location) : base(location) /// The content distribution endpoint for the static site. /// Identity to use for Key Vault Reference authentication. /// User provided function apps registered with the static site. + /// Backends linked to the static side. /// The provider that submitted the last deployment to the primary environment of the static site. + /// State indicating the status of the enterprise grade CDN serving traffic to the static web app. + /// State indicating whether public traffic are allowed or not for a static web app. Allowed Values: 'Enabled', 'Disabled' or an empty string. + /// Database connections for the static site. /// Kind of resource. /// Keeps track of any properties unknown to the library. - 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, IDictionary serializedAdditionalRawData) : 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, IReadOnlyList linkedBackends, string provider, EnterpriseGradeCdnStatus? enterpriseGradeCdnStatus, string publicNetworkAccess, IReadOnlyList databaseConnections, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Sku = sku; Identity = identity; @@ -102,7 +108,11 @@ internal StaticSiteData(ResourceIdentifier id, string name, ResourceType resourc ContentDistributionEndpoint = contentDistributionEndpoint; KeyVaultReferenceIdentity = keyVaultReferenceIdentity; UserProvidedFunctionApps = userProvidedFunctionApps; + LinkedBackends = linkedBackends; Provider = provider; + EnterpriseGradeCdnStatus = enterpriseGradeCdnStatus; + PublicNetworkAccess = publicNetworkAccess; + DatabaseConnections = databaseConnections; Kind = kind; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -157,9 +167,21 @@ internal StaticSiteData() /// User provided function apps registered with the static site. [WirePath("properties.userProvidedFunctionApps")] public IReadOnlyList UserProvidedFunctionApps { get; } + /// Backends linked to the static side. + [WirePath("properties.linkedBackends")] + public IReadOnlyList LinkedBackends { get; } /// The provider that submitted the last deployment to the primary environment of the static site. [WirePath("properties.provider")] - public string Provider { get; } + public string Provider { get; set; } + /// State indicating the status of the enterprise grade CDN serving traffic to the static web app. + [WirePath("properties.enterpriseGradeCdnStatus")] + public EnterpriseGradeCdnStatus? EnterpriseGradeCdnStatus { get; set; } + /// State indicating whether public traffic are allowed or not for a static web app. Allowed Values: 'Enabled', 'Disabled' or an empty string. + [WirePath("properties.publicNetworkAccess")] + public string PublicNetworkAccess { get; set; } + /// Database connections for the static site. + [WirePath("properties.databaseConnections")] + public IReadOnlyList DatabaseConnections { get; } /// Kind of resource. [WirePath("kind")] public string Kind { get; set; } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionCollection.cs new file mode 100644 index 0000000000000..1520f3d4bb3e9 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionCollection.cs @@ -0,0 +1,497 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetStaticSiteDatabaseConnections method from an instance of . + /// + public partial class StaticSiteDatabaseConnectionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _staticSiteDatabaseConnectionStaticSitesClientDiagnostics; + private readonly StaticSitesRestOperations _staticSiteDatabaseConnectionStaticSitesRestClient; + + /// Initializes a new instance of the class for mocking. + protected StaticSiteDatabaseConnectionCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal StaticSiteDatabaseConnectionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _staticSiteDatabaseConnectionStaticSitesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", StaticSiteDatabaseConnectionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(StaticSiteDatabaseConnectionResource.ResourceType, out string staticSiteDatabaseConnectionStaticSitesApiVersion); + _staticSiteDatabaseConnectionStaticSitesRestClient = new StaticSitesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, staticSiteDatabaseConnectionStaticSitesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != StaticSiteResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, StaticSiteResource.ResourceType), nameof(id)); + } + + /// + /// Description for Create or update a database connection for a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_CreateOrUpdateDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the database connection. + /// A JSON representation of the database connection request properties. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string databaseConnectionName, StaticSiteDatabaseConnectionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteDatabaseConnectionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _staticSiteDatabaseConnectionStaticSitesRestClient.CreateOrUpdateDatabaseConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseConnectionName, data, cancellationToken).ConfigureAwait(false); + var uri = _staticSiteDatabaseConnectionStaticSitesRestClient.CreateCreateOrUpdateDatabaseConnectionRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseConnectionName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(Response.FromValue(new StaticSiteDatabaseConnectionResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Create or update a database connection for a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_CreateOrUpdateDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the database connection. + /// A JSON representation of the database connection request properties. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string databaseConnectionName, StaticSiteDatabaseConnectionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteDatabaseConnectionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _staticSiteDatabaseConnectionStaticSitesRestClient.CreateOrUpdateDatabaseConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseConnectionName, data, cancellationToken); + var uri = _staticSiteDatabaseConnectionStaticSitesRestClient.CreateCreateOrUpdateDatabaseConnectionRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseConnectionName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(Response.FromValue(new StaticSiteDatabaseConnectionResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns overview of a database connection for a static site by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database connection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string databaseConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + + using var scope = _staticSiteDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteDatabaseConnectionCollection.Get"); + scope.Start(); + try + { + var response = await _staticSiteDatabaseConnectionStaticSitesRestClient.GetDatabaseConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseConnectionName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns overview of a database connection for a static site by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database connection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string databaseConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + + using var scope = _staticSiteDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteDatabaseConnectionCollection.Get"); + scope.Start(); + try + { + var response = _staticSiteDatabaseConnectionStaticSitesRestClient.GetDatabaseConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseConnectionName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns overviews of database connections for a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections + /// + /// + /// Operation Id + /// StaticSites_GetDatabaseConnections + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _staticSiteDatabaseConnectionStaticSitesRestClient.CreateGetDatabaseConnectionsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _staticSiteDatabaseConnectionStaticSitesRestClient.CreateGetDatabaseConnectionsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new StaticSiteDatabaseConnectionResource(Client, StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(e)), _staticSiteDatabaseConnectionStaticSitesClientDiagnostics, Pipeline, "StaticSiteDatabaseConnectionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Returns overviews of database connections for a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections + /// + /// + /// Operation Id + /// StaticSites_GetDatabaseConnections + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _staticSiteDatabaseConnectionStaticSitesRestClient.CreateGetDatabaseConnectionsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _staticSiteDatabaseConnectionStaticSitesRestClient.CreateGetDatabaseConnectionsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new StaticSiteDatabaseConnectionResource(Client, StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(e)), _staticSiteDatabaseConnectionStaticSitesClientDiagnostics, Pipeline, "StaticSiteDatabaseConnectionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database connection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string databaseConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + + using var scope = _staticSiteDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteDatabaseConnectionCollection.Exists"); + scope.Start(); + try + { + var response = await _staticSiteDatabaseConnectionStaticSitesRestClient.GetDatabaseConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseConnectionName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database connection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string databaseConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + + using var scope = _staticSiteDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteDatabaseConnectionCollection.Exists"); + scope.Start(); + try + { + var response = _staticSiteDatabaseConnectionStaticSitesRestClient.GetDatabaseConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseConnectionName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database connection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string databaseConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + + using var scope = _staticSiteDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteDatabaseConnectionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _staticSiteDatabaseConnectionStaticSitesRestClient.GetDatabaseConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseConnectionName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new StaticSiteDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database connection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string databaseConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseConnectionName, nameof(databaseConnectionName)); + + using var scope = _staticSiteDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteDatabaseConnectionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _staticSiteDatabaseConnectionStaticSitesRestClient.GetDatabaseConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseConnectionName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new StaticSiteDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionData.Serialization.cs new file mode 100644 index 0000000000000..28809cad1df6d --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionData.Serialization.cs @@ -0,0 +1,476 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class StaticSiteDatabaseConnectionData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StaticSiteDatabaseConnectionData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); + } + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(ResourceId)) + { + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + } + if (Optional.IsDefined(ConnectionIdentity)) + { + writer.WritePropertyName("connectionIdentity"u8); + writer.WriteStringValue(ConnectionIdentity); + } + if (Optional.IsDefined(ConnectionString)) + { + writer.WritePropertyName("connectionString"u8); + writer.WriteStringValue(ConnectionString); + } + if (Optional.IsDefined(Region)) + { + writer.WritePropertyName("region"u8); + writer.WriteStringValue(Region); + } + if (options.Format != "W" && Optional.IsCollectionDefined(ConfigurationFiles)) + { + writer.WritePropertyName("configurationFiles"u8); + writer.WriteStartArray(); + foreach (var item in ConfigurationFiles) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + StaticSiteDatabaseConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StaticSiteDatabaseConnectionData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStaticSiteDatabaseConnectionData(document.RootElement, options); + } + + internal static StaticSiteDatabaseConnectionData DeserializeStaticSiteDatabaseConnectionData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string kind = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + ResourceIdentifier resourceId = default; + string connectionIdentity = default; + string connectionString = default; + string region = default; + IReadOnlyList configurationFiles = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kind"u8)) + { + kind = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("resourceId"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceId = new ResourceIdentifier(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("connectionIdentity"u8)) + { + connectionIdentity = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("connectionString"u8)) + { + connectionString = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("region"u8)) + { + region = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("configurationFiles"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(StaticSiteDatabaseConnectionConfigurationFileOverview.DeserializeStaticSiteDatabaseConnectionConfigurationFileOverview(item, options)); + } + configurationFiles = array; + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StaticSiteDatabaseConnectionData( + id, + name, + type, + systemData, + resourceId, + connectionIdentity, + connectionString, + region, + configurationFiles ?? new ChangeTrackingList(), + kind, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Kind), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" kind: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Kind)) + { + builder.Append(" kind: "); + if (Kind.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Kind}'''"); + } + else + { + builder.AppendLine($"'{Kind}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceId)) + { + builder.Append(" resourceId: "); + builder.AppendLine($"'{ResourceId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ConnectionIdentity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" connectionIdentity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ConnectionIdentity)) + { + builder.Append(" connectionIdentity: "); + if (ConnectionIdentity.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ConnectionIdentity}'''"); + } + else + { + builder.AppendLine($"'{ConnectionIdentity}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ConnectionString), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" connectionString: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ConnectionString)) + { + builder.Append(" connectionString: "); + if (ConnectionString.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ConnectionString}'''"); + } + else + { + builder.AppendLine($"'{ConnectionString}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Region), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" region: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Region)) + { + builder.Append(" region: "); + if (Region.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Region}'''"); + } + else + { + builder.AppendLine($"'{Region}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ConfigurationFiles), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" configurationFiles: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ConfigurationFiles)) + { + if (ConfigurationFiles.Any()) + { + builder.Append(" configurationFiles: "); + builder.AppendLine("["); + foreach (var item in ConfigurationFiles) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " configurationFiles: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(StaticSiteDatabaseConnectionData)} does not support writing '{options.Format}' format."); + } + } + + StaticSiteDatabaseConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeStaticSiteDatabaseConnectionData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StaticSiteDatabaseConnectionData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionData.cs new file mode 100644 index 0000000000000..7b90e93fb4045 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionData.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing the StaticSiteDatabaseConnection data model. + /// Static Site Database Connection resource. + /// + public partial class StaticSiteDatabaseConnectionData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public StaticSiteDatabaseConnectionData() + { + ConfigurationFiles = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource id of the database. + /// If present, the identity is used in conjunction with connection string to connect to the database. Use of the system-assigned managed identity is indicated with the string 'SystemAssigned', while use of a user-assigned managed identity is indicated with the resource id of the managed identity resource. + /// The connection string to use to connect to the database. + /// The region of the database resource. + /// A list of configuration files associated with this database connection. + /// Kind of resource. + /// Keeps track of any properties unknown to the library. + internal StaticSiteDatabaseConnectionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ResourceIdentifier resourceId, string connectionIdentity, string connectionString, string region, IReadOnlyList configurationFiles, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + ResourceId = resourceId; + ConnectionIdentity = connectionIdentity; + ConnectionString = connectionString; + Region = region; + ConfigurationFiles = configurationFiles; + Kind = kind; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource id of the database. + [WirePath("properties.resourceId")] + public ResourceIdentifier ResourceId { get; set; } + /// If present, the identity is used in conjunction with connection string to connect to the database. Use of the system-assigned managed identity is indicated with the string 'SystemAssigned', while use of a user-assigned managed identity is indicated with the resource id of the managed identity resource. + [WirePath("properties.connectionIdentity")] + public string ConnectionIdentity { get; set; } + /// The connection string to use to connect to the database. + [WirePath("properties.connectionString")] + public string ConnectionString { get; set; } + /// The region of the database resource. + [WirePath("properties.region")] + public string Region { get; set; } + /// A list of configuration files associated with this database connection. + [WirePath("properties.configurationFiles")] + public IReadOnlyList ConfigurationFiles { get; } + /// Kind of resource. + [WirePath("kind")] + public string Kind { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionResource.Serialization.cs new file mode 100644 index 0000000000000..8819cbd2df3a4 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppService +{ + public partial class StaticSiteDatabaseConnectionResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + StaticSiteDatabaseConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + StaticSiteDatabaseConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionResource.cs new file mode 100644 index 0000000000000..eb222840bd1ed --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionResource.cs @@ -0,0 +1,420 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a StaticSiteDatabaseConnection along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetStaticSiteDatabaseConnectionResource method. + /// Otherwise you can get one from its parent resource using the GetStaticSiteDatabaseConnection method. + /// + public partial class StaticSiteDatabaseConnectionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + /// The databaseConnectionName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string databaseConnectionName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _staticSiteDatabaseConnectionStaticSitesClientDiagnostics; + private readonly StaticSitesRestOperations _staticSiteDatabaseConnectionStaticSitesRestClient; + private readonly StaticSiteDatabaseConnectionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Web/staticSites/databaseConnections"; + + /// Initializes a new instance of the class for mocking. + protected StaticSiteDatabaseConnectionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal StaticSiteDatabaseConnectionResource(ArmClient client, StaticSiteDatabaseConnectionData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal StaticSiteDatabaseConnectionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _staticSiteDatabaseConnectionStaticSitesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string staticSiteDatabaseConnectionStaticSitesApiVersion); + _staticSiteDatabaseConnectionStaticSitesRestClient = new StaticSitesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, staticSiteDatabaseConnectionStaticSitesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual StaticSiteDatabaseConnectionData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Returns overview of a database connection for a static site by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _staticSiteDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteDatabaseConnectionResource.Get"); + scope.Start(); + try + { + var response = await _staticSiteDatabaseConnectionStaticSitesRestClient.GetDatabaseConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns overview of a database connection for a static site by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _staticSiteDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteDatabaseConnectionResource.Get"); + scope.Start(); + try + { + var response = _staticSiteDatabaseConnectionStaticSitesRestClient.GetDatabaseConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a database connection for a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_DeleteDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _staticSiteDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteDatabaseConnectionResource.Delete"); + scope.Start(); + try + { + var response = await _staticSiteDatabaseConnectionStaticSitesRestClient.DeleteDatabaseConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _staticSiteDatabaseConnectionStaticSitesRestClient.CreateDeleteDatabaseConnectionRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a database connection for a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_DeleteDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _staticSiteDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteDatabaseConnectionResource.Delete"); + scope.Start(); + try + { + var response = _staticSiteDatabaseConnectionStaticSitesRestClient.DeleteDatabaseConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var uri = _staticSiteDatabaseConnectionStaticSitesRestClient.CreateDeleteDatabaseConnectionRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Create or update a database connection for a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_UpdateDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// A JSON representation of the database connection request properties. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(StaticSiteDatabaseConnectionPatchContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _staticSiteDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteDatabaseConnectionResource.Update"); + scope.Start(); + try + { + var response = await _staticSiteDatabaseConnectionStaticSitesRestClient.UpdateDatabaseConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new StaticSiteDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Create or update a database connection for a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_UpdateDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// A JSON representation of the database connection request properties. + /// The cancellation token to use. + /// is null. + public virtual Response Update(StaticSiteDatabaseConnectionPatchContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _staticSiteDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteDatabaseConnectionResource.Update"); + scope.Start(); + try + { + var response = _staticSiteDatabaseConnectionStaticSitesRestClient.UpdateDatabaseConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + return Response.FromValue(new StaticSiteDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns details of a database connection for a static site by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName}/show + /// + /// + /// Operation Id + /// StaticSites_GetDatabaseConnectionWithDetails + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetDatabaseConnectionWithDetailsAsync(CancellationToken cancellationToken = default) + { + using var scope = _staticSiteDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteDatabaseConnectionResource.GetDatabaseConnectionWithDetails"); + scope.Start(); + try + { + var response = await _staticSiteDatabaseConnectionStaticSitesRestClient.GetDatabaseConnectionWithDetailsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new StaticSiteDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns details of a database connection for a static site by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName}/show + /// + /// + /// Operation Id + /// StaticSites_GetDatabaseConnectionWithDetails + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetDatabaseConnectionWithDetails(CancellationToken cancellationToken = default) + { + using var scope = _staticSiteDatabaseConnectionStaticSitesClientDiagnostics.CreateScope("StaticSiteDatabaseConnectionResource.GetDatabaseConnectionWithDetails"); + scope.Start(); + try + { + var response = _staticSiteDatabaseConnectionStaticSitesRestClient.GetDatabaseConnectionWithDetails(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new StaticSiteDatabaseConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendCollection.cs new file mode 100644 index 0000000000000..8cc2003c72ca0 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetStaticSiteLinkedBackends method from an instance of . + /// + public partial class StaticSiteLinkedBackendCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _staticSiteLinkedBackendStaticSitesClientDiagnostics; + private readonly StaticSitesRestOperations _staticSiteLinkedBackendStaticSitesRestClient; + + /// Initializes a new instance of the class for mocking. + protected StaticSiteLinkedBackendCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal StaticSiteLinkedBackendCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _staticSiteLinkedBackendStaticSitesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", StaticSiteLinkedBackendResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(StaticSiteLinkedBackendResource.ResourceType, out string staticSiteLinkedBackendStaticSitesApiVersion); + _staticSiteLinkedBackendStaticSitesRestClient = new StaticSitesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, staticSiteLinkedBackendStaticSitesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != StaticSiteResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, StaticSiteResource.ResourceType), nameof(id)); + } + + /// + /// Link backend to a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_LinkBackend + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the backend to link to the static site. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string linkedBackendName, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteLinkedBackendCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _staticSiteLinkedBackendStaticSitesRestClient.LinkBackendAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, linkedBackendName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(new StaticSiteLinkedBackendOperationSource(Client), _staticSiteLinkedBackendStaticSitesClientDiagnostics, Pipeline, _staticSiteLinkedBackendStaticSitesRestClient.CreateLinkBackendRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, linkedBackendName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Link backend to a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_LinkBackend + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the backend to link to the static site. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string linkedBackendName, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteLinkedBackendCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _staticSiteLinkedBackendStaticSitesRestClient.LinkBackend(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, linkedBackendName, data, cancellationToken); + var operation = new AppServiceArmOperation(new StaticSiteLinkedBackendOperationSource(Client), _staticSiteLinkedBackendStaticSitesClientDiagnostics, Pipeline, _staticSiteLinkedBackendStaticSitesRestClient.CreateLinkBackendRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, linkedBackendName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns the details of a linked backend linked to a static site by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackend + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string linkedBackendName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var scope = _staticSiteLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteLinkedBackendCollection.Get"); + scope.Start(); + try + { + var response = await _staticSiteLinkedBackendStaticSitesRestClient.GetLinkedBackendAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, linkedBackendName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteLinkedBackendResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns the details of a linked backend linked to a static site by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackend + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string linkedBackendName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var scope = _staticSiteLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteLinkedBackendCollection.Get"); + scope.Start(); + try + { + var response = _staticSiteLinkedBackendStaticSitesRestClient.GetLinkedBackend(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, linkedBackendName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteLinkedBackendResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns details of all backends linked to a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackends + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _staticSiteLinkedBackendStaticSitesRestClient.CreateGetLinkedBackendsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _staticSiteLinkedBackendStaticSitesRestClient.CreateGetLinkedBackendsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new StaticSiteLinkedBackendResource(Client, StaticSiteLinkedBackendData.DeserializeStaticSiteLinkedBackendData(e)), _staticSiteLinkedBackendStaticSitesClientDiagnostics, Pipeline, "StaticSiteLinkedBackendCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Returns details of all backends linked to a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackends + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _staticSiteLinkedBackendStaticSitesRestClient.CreateGetLinkedBackendsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _staticSiteLinkedBackendStaticSitesRestClient.CreateGetLinkedBackendsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new StaticSiteLinkedBackendResource(Client, StaticSiteLinkedBackendData.DeserializeStaticSiteLinkedBackendData(e)), _staticSiteLinkedBackendStaticSitesClientDiagnostics, Pipeline, "StaticSiteLinkedBackendCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackend + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string linkedBackendName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var scope = _staticSiteLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteLinkedBackendCollection.Exists"); + scope.Start(); + try + { + var response = await _staticSiteLinkedBackendStaticSitesRestClient.GetLinkedBackendAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, linkedBackendName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackend + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string linkedBackendName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var scope = _staticSiteLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteLinkedBackendCollection.Exists"); + scope.Start(); + try + { + var response = _staticSiteLinkedBackendStaticSitesRestClient.GetLinkedBackend(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, linkedBackendName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackend + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string linkedBackendName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var scope = _staticSiteLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteLinkedBackendCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _staticSiteLinkedBackendStaticSitesRestClient.GetLinkedBackendAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, linkedBackendName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new StaticSiteLinkedBackendResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackend + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string linkedBackendName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(linkedBackendName, nameof(linkedBackendName)); + + using var scope = _staticSiteLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteLinkedBackendCollection.GetIfExists"); + scope.Start(); + try + { + var response = _staticSiteLinkedBackendStaticSitesRestClient.GetLinkedBackend(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, linkedBackendName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new StaticSiteLinkedBackendResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendData.Serialization.cs new file mode 100644 index 0000000000000..36efe8cec5018 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendData.Serialization.cs @@ -0,0 +1,422 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class StaticSiteLinkedBackendData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StaticSiteLinkedBackendData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); + } + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(BackendResourceId)) + { + writer.WritePropertyName("backendResourceId"u8); + writer.WriteStringValue(BackendResourceId); + } + if (Optional.IsDefined(Region)) + { + writer.WritePropertyName("region"u8); + writer.WriteStringValue(Region); + } + if (options.Format != "W" && Optional.IsDefined(CreatedOn)) + { + writer.WritePropertyName("createdOn"u8); + writer.WriteStringValue(CreatedOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + StaticSiteLinkedBackendData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StaticSiteLinkedBackendData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStaticSiteLinkedBackendData(document.RootElement, options); + } + + internal static StaticSiteLinkedBackendData DeserializeStaticSiteLinkedBackendData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string kind = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + ResourceIdentifier backendResourceId = default; + string region = default; + DateTimeOffset? createdOn = default; + string provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kind"u8)) + { + kind = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("backendResourceId"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + backendResourceId = new ResourceIdentifier(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("region"u8)) + { + region = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("createdOn"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createdOn = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("provisioningState"u8)) + { + provisioningState = property0.Value.GetString(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StaticSiteLinkedBackendData( + id, + name, + type, + systemData, + backendResourceId, + region, + createdOn, + provisioningState, + kind, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Kind), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" kind: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Kind)) + { + builder.Append(" kind: "); + if (Kind.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Kind}'''"); + } + else + { + builder.AppendLine($"'{Kind}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(BackendResourceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" backendResourceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(BackendResourceId)) + { + builder.Append(" backendResourceId: "); + builder.AppendLine($"'{BackendResourceId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Region), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" region: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Region)) + { + builder.Append(" region: "); + if (Region.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Region}'''"); + } + else + { + builder.AppendLine($"'{Region}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CreatedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" createdOn: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CreatedOn)) + { + builder.Append(" createdOn: "); + var formattedDateTimeString = TypeFormatters.ToString(CreatedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + if (ProvisioningState.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ProvisioningState}'''"); + } + else + { + builder.AppendLine($"'{ProvisioningState}'"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(StaticSiteLinkedBackendData)} does not support writing '{options.Format}' format."); + } + } + + StaticSiteLinkedBackendData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeStaticSiteLinkedBackendData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StaticSiteLinkedBackendData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendData.cs new file mode 100644 index 0000000000000..3c51e800e072d --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendData.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing the StaticSiteLinkedBackend data model. + /// Static Site Linked Backend ARM resource. + /// + public partial class StaticSiteLinkedBackendData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public StaticSiteLinkedBackendData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource id of the backend linked to the static site. + /// The region of the backend linked to the static site. + /// The date and time on which the backend was linked to the static site. + /// The provisioning state of the linking process. + /// Kind of resource. + /// Keeps track of any properties unknown to the library. + internal StaticSiteLinkedBackendData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ResourceIdentifier backendResourceId, string region, DateTimeOffset? createdOn, string provisioningState, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + BackendResourceId = backendResourceId; + Region = region; + CreatedOn = createdOn; + ProvisioningState = provisioningState; + Kind = kind; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource id of the backend linked to the static site. + [WirePath("properties.backendResourceId")] + public ResourceIdentifier BackendResourceId { get; set; } + /// The region of the backend linked to the static site. + [WirePath("properties.region")] + public string Region { get; set; } + /// The date and time on which the backend was linked to the static site. + [WirePath("properties.createdOn")] + public DateTimeOffset? CreatedOn { get; } + /// The provisioning state of the linking process. + [WirePath("properties.provisioningState")] + public string ProvisioningState { get; } + /// Kind of resource. + [WirePath("kind")] + public string Kind { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendResource.Serialization.cs new file mode 100644 index 0000000000000..f51d3bf1249b7 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppService +{ + public partial class StaticSiteLinkedBackendResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + StaticSiteLinkedBackendData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + StaticSiteLinkedBackendData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendResource.cs new file mode 100644 index 0000000000000..cbea635353211 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendResource.cs @@ -0,0 +1,445 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a StaticSiteLinkedBackend along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetStaticSiteLinkedBackendResource method. + /// Otherwise you can get one from its parent resource using the GetStaticSiteLinkedBackend method. + /// + public partial class StaticSiteLinkedBackendResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + /// The linkedBackendName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string linkedBackendName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _staticSiteLinkedBackendStaticSitesClientDiagnostics; + private readonly StaticSitesRestOperations _staticSiteLinkedBackendStaticSitesRestClient; + private readonly StaticSiteLinkedBackendData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Web/staticSites/linkedBackends"; + + /// Initializes a new instance of the class for mocking. + protected StaticSiteLinkedBackendResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal StaticSiteLinkedBackendResource(ArmClient client, StaticSiteLinkedBackendData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal StaticSiteLinkedBackendResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _staticSiteLinkedBackendStaticSitesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string staticSiteLinkedBackendStaticSitesApiVersion); + _staticSiteLinkedBackendStaticSitesRestClient = new StaticSitesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, staticSiteLinkedBackendStaticSitesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual StaticSiteLinkedBackendData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Returns the details of a linked backend linked to a static site by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackend + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _staticSiteLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteLinkedBackendResource.Get"); + scope.Start(); + try + { + var response = await _staticSiteLinkedBackendStaticSitesRestClient.GetLinkedBackendAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteLinkedBackendResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns the details of a linked backend linked to a static site by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackend + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _staticSiteLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteLinkedBackendResource.Get"); + scope.Start(); + try + { + var response = _staticSiteLinkedBackendStaticSitesRestClient.GetLinkedBackend(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new StaticSiteLinkedBackendResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Unlink a backend from a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_UnlinkBackend + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Decides if Easy Auth configuration will be removed from backend configuration. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? isCleaningAuthConfig = null, CancellationToken cancellationToken = default) + { + using var scope = _staticSiteLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteLinkedBackendResource.Delete"); + scope.Start(); + try + { + var response = await _staticSiteLinkedBackendStaticSitesRestClient.UnlinkBackendAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, isCleaningAuthConfig, cancellationToken).ConfigureAwait(false); + var uri = _staticSiteLinkedBackendStaticSitesRestClient.CreateUnlinkBackendRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, isCleaningAuthConfig); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Unlink a backend from a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_UnlinkBackend + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Decides if Easy Auth configuration will be removed from backend configuration. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, bool? isCleaningAuthConfig = null, CancellationToken cancellationToken = default) + { + using var scope = _staticSiteLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteLinkedBackendResource.Delete"); + scope.Start(); + try + { + var response = _staticSiteLinkedBackendStaticSitesRestClient.UnlinkBackend(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, isCleaningAuthConfig, cancellationToken); + var uri = _staticSiteLinkedBackendStaticSitesRestClient.CreateUnlinkBackendRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, isCleaningAuthConfig); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new AppServiceArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Link backend to a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_LinkBackend + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteLinkedBackendResource.Update"); + scope.Start(); + try + { + var response = await _staticSiteLinkedBackendStaticSitesRestClient.LinkBackendAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(new StaticSiteLinkedBackendOperationSource(Client), _staticSiteLinkedBackendStaticSitesClientDiagnostics, Pipeline, _staticSiteLinkedBackendStaticSitesRestClient.CreateLinkBackendRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Link backend to a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_LinkBackend + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteLinkedBackendResource.Update"); + scope.Start(); + try + { + var response = _staticSiteLinkedBackendStaticSitesRestClient.LinkBackend(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppServiceArmOperation(new StaticSiteLinkedBackendOperationSource(Client), _staticSiteLinkedBackendStaticSitesClientDiagnostics, Pipeline, _staticSiteLinkedBackendStaticSitesRestClient.CreateLinkBackendRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Validates that a backend can be linked to a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName}/validate + /// + /// + /// Operation Id + /// StaticSites_ValidateBackend + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// is null. + public virtual async Task ValidateBackendAsync(WaitUntil waitUntil, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteLinkedBackendResource.ValidateBackend"); + scope.Start(); + try + { + var response = await _staticSiteLinkedBackendStaticSitesRestClient.ValidateBackendAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(_staticSiteLinkedBackendStaticSitesClientDiagnostics, Pipeline, _staticSiteLinkedBackendStaticSitesRestClient.CreateValidateBackendRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Validates that a backend can be linked to a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName}/validate + /// + /// + /// Operation Id + /// StaticSites_ValidateBackend + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// A JSON representation of the linked backend request properties. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation ValidateBackend(WaitUntil waitUntil, StaticSiteLinkedBackendData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _staticSiteLinkedBackendStaticSitesClientDiagnostics.CreateScope("StaticSiteLinkedBackendResource.ValidateBackend"); + scope.Start(); + try + { + var response = _staticSiteLinkedBackendStaticSitesRestClient.ValidateBackend(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppServiceArmOperation(_staticSiteLinkedBackendStaticSitesClientDiagnostics, Pipeline, _staticSiteLinkedBackendStaticSitesRestClient.CreateValidateBackendRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSitePrivateEndpointConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSitePrivateEndpointConnectionCollection.cs index d91a796851879..061e41c92a444 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSitePrivateEndpointConnectionCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSitePrivateEndpointConnectionCollection.cs @@ -14,7 +14,6 @@ using Autorest.CSharp.Core; using Azure.Core; using Azure.Core.Pipeline; -using Azure.ResourceManager.AppService.Models; namespace Azure.ResourceManager.AppService { @@ -65,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -75,21 +74,21 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// Name of the private endpoint connection. - /// Request body. + /// Request body. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); using var scope = _staticSitePrivateEndpointConnectionStaticSitesClientDiagnostics.CreateScope("StaticSitePrivateEndpointConnectionCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _staticSitePrivateEndpointConnectionStaticSitesRestClient.ApproveOrRejectPrivateEndpointConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, info, cancellationToken).ConfigureAwait(false); - var operation = new AppServiceArmOperation(new StaticSitePrivateEndpointConnectionOperationSource(Client), _staticSitePrivateEndpointConnectionStaticSitesClientDiagnostics, Pipeline, _staticSitePrivateEndpointConnectionStaticSitesRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, info).Request, response, OperationFinalStateVia.Location); + var response = await _staticSitePrivateEndpointConnectionStaticSitesRestClient.ApproveOrRejectPrivateEndpointConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(new StaticSitePrivateEndpointConnectionOperationSource(Client), _staticSitePrivateEndpointConnectionStaticSitesClientDiagnostics, Pipeline, _staticSitePrivateEndpointConnectionStaticSitesRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -114,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -124,21 +123,21 @@ public virtual async Task /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// Name of the private endpoint connection. - /// Request body. + /// Request body. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string privateEndpointConnectionName, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); using var scope = _staticSitePrivateEndpointConnectionStaticSitesClientDiagnostics.CreateScope("StaticSitePrivateEndpointConnectionCollection.CreateOrUpdate"); scope.Start(); try { - var response = _staticSitePrivateEndpointConnectionStaticSitesRestClient.ApproveOrRejectPrivateEndpointConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, info, cancellationToken); - var operation = new AppServiceArmOperation(new StaticSitePrivateEndpointConnectionOperationSource(Client), _staticSitePrivateEndpointConnectionStaticSitesClientDiagnostics, Pipeline, _staticSitePrivateEndpointConnectionStaticSitesRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, info).Request, response, OperationFinalStateVia.Location); + var response = _staticSitePrivateEndpointConnectionStaticSitesRestClient.ApproveOrRejectPrivateEndpointConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data, cancellationToken); + var operation = new AppServiceArmOperation(new StaticSitePrivateEndpointConnectionOperationSource(Client), _staticSitePrivateEndpointConnectionStaticSitesClientDiagnostics, Pipeline, _staticSitePrivateEndpointConnectionStaticSitesRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -163,7 +162,7 @@ public virtual ArmOperation CreateO /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +207,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +252,7 @@ public virtual Response Get(string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -283,7 +282,7 @@ public virtual AsyncPageable GetAll /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -313,7 +312,7 @@ public virtual Pageable GetAll(Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -356,7 +355,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -399,7 +398,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -444,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSitePrivateEndpointConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSitePrivateEndpointConnectionResource.cs index 1999eb0a968be..bd25186233960 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSitePrivateEndpointConnectionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSitePrivateEndpointConnectionResource.cs @@ -11,7 +11,6 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Core.Pipeline; -using Azure.ResourceManager.AppService.Models; namespace Azure.ResourceManager.AppService { @@ -102,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +141,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +181,7 @@ public virtual Response Get(Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -224,7 +223,7 @@ public virtual async Task> DeleteAsync(WaitUntil waitUn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -266,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -275,19 +274,19 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, Cancellation /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Request body. + /// Request body. /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); using var scope = _staticSitePrivateEndpointConnectionStaticSitesClientDiagnostics.CreateScope("StaticSitePrivateEndpointConnectionResource.Update"); scope.Start(); try { - var response = await _staticSitePrivateEndpointConnectionStaticSitesRestClient.ApproveOrRejectPrivateEndpointConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, info, cancellationToken).ConfigureAwait(false); - var operation = new AppServiceArmOperation(new StaticSitePrivateEndpointConnectionOperationSource(Client), _staticSitePrivateEndpointConnectionStaticSitesClientDiagnostics, Pipeline, _staticSitePrivateEndpointConnectionStaticSitesRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, info).Request, response, OperationFinalStateVia.Location); + var response = await _staticSitePrivateEndpointConnectionStaticSitesRestClient.ApproveOrRejectPrivateEndpointConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(new StaticSitePrivateEndpointConnectionOperationSource(Client), _staticSitePrivateEndpointConnectionStaticSitesClientDiagnostics, Pipeline, _staticSitePrivateEndpointConnectionStaticSitesRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -312,7 +311,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -321,19 +320,19 @@ public virtual async Task /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Request body. + /// Request body. /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, PrivateLinkConnectionApprovalRequestInfo info, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, RemotePrivateEndpointConnectionARMResourceData data, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(info, nameof(info)); + Argument.AssertNotNull(data, nameof(data)); using var scope = _staticSitePrivateEndpointConnectionStaticSitesClientDiagnostics.CreateScope("StaticSitePrivateEndpointConnectionResource.Update"); scope.Start(); try { - var response = _staticSitePrivateEndpointConnectionStaticSitesRestClient.ApproveOrRejectPrivateEndpointConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, info, cancellationToken); - var operation = new AppServiceArmOperation(new StaticSitePrivateEndpointConnectionOperationSource(Client), _staticSitePrivateEndpointConnectionStaticSitesClientDiagnostics, Pipeline, _staticSitePrivateEndpointConnectionStaticSitesRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, info).Request, response, OperationFinalStateVia.Location); + var response = _staticSitePrivateEndpointConnectionStaticSitesRestClient.ApproveOrRejectPrivateEndpointConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new AppServiceArmOperation(new StaticSitePrivateEndpointConnectionOperationSource(Client), _staticSitePrivateEndpointConnectionStaticSitesClientDiagnostics, Pipeline, _staticSitePrivateEndpointConnectionStaticSitesRestClient.CreateApproveOrRejectPrivateEndpointConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteResource.cs index 2dfc14574fbd9..a5183fdd24c8c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteResource.cs @@ -110,7 +110,7 @@ public virtual StaticSitePrivateEndpointConnectionCollection GetStaticSitePrivat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -179,7 +179,7 @@ public virtual StaticSiteBuildCollection GetStaticSiteBuilds() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetStaticSiteBuildA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -228,6 +228,75 @@ public virtual Response GetStaticSiteBuild(string envir return GetStaticSiteBuilds().Get(environmentName, cancellationToken); } + /// Gets a collection of StaticSiteDatabaseConnectionResources in the StaticSite. + /// An object representing collection of StaticSiteDatabaseConnectionResources and their operations over a StaticSiteDatabaseConnectionResource. + public virtual StaticSiteDatabaseConnectionCollection GetStaticSiteDatabaseConnections() + { + return GetCachedClient(client => new StaticSiteDatabaseConnectionCollection(client, Id)); + } + + /// + /// Returns overview of a database connection for a static site by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database connection. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetStaticSiteDatabaseConnectionAsync(string databaseConnectionName, CancellationToken cancellationToken = default) + { + return await GetStaticSiteDatabaseConnections().GetAsync(databaseConnectionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Returns overview of a database connection for a static site by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/databaseConnections/{databaseConnectionName} + /// + /// + /// Operation Id + /// StaticSites_GetDatabaseConnection + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database connection. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetStaticSiteDatabaseConnection(string databaseConnectionName, CancellationToken cancellationToken = default) + { + return GetStaticSiteDatabaseConnections().Get(databaseConnectionName, cancellationToken); + } + /// Gets a collection of StaticSiteUserProvidedFunctionAppResources in the StaticSite. /// An object representing collection of StaticSiteUserProvidedFunctionAppResources and their operations over a StaticSiteUserProvidedFunctionAppResource. public virtual StaticSiteUserProvidedFunctionAppCollection GetStaticSiteUserProvidedFunctionApps() @@ -248,7 +317,7 @@ public virtual StaticSiteUserProvidedFunctionAppCollection GetStaticSiteUserProv /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -279,7 +348,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -297,6 +366,71 @@ public virtual Response GetStaticSite return GetStaticSiteUserProvidedFunctionApps().Get(functionAppName, cancellationToken); } + /// Gets a collection of StaticSiteBasicAuthPropertyResources in the StaticSite. + /// An object representing collection of StaticSiteBasicAuthPropertyResources and their operations over a StaticSiteBasicAuthPropertyResource. + public virtual StaticSiteBasicAuthPropertyCollection GetStaticSiteBasicAuthProperties() + { + return GetCachedClient(client => new StaticSiteBasicAuthPropertyCollection(client, Id)); + } + + /// + /// Description for Gets the basic auth properties for a static site. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName} + /// + /// + /// Operation Id + /// StaticSites_GetBasicAuth + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// name of the basic auth entry. + /// The cancellation token to use. + [ForwardsClientCalls] + public virtual async Task> GetStaticSiteBasicAuthPropertyAsync(StaticSiteBasicAuthName basicAuthName, CancellationToken cancellationToken = default) + { + return await GetStaticSiteBasicAuthProperties().GetAsync(basicAuthName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Description for Gets the basic auth properties for a static site. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/basicAuth/{basicAuthName} + /// + /// + /// Operation Id + /// StaticSites_GetBasicAuth + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// name of the basic auth entry. + /// The cancellation token to use. + [ForwardsClientCalls] + public virtual Response GetStaticSiteBasicAuthProperty(StaticSiteBasicAuthName basicAuthName, CancellationToken cancellationToken = default) + { + return GetStaticSiteBasicAuthProperties().Get(basicAuthName, cancellationToken); + } + /// Gets a collection of StaticSiteCustomDomainOverviewResources in the StaticSite. /// An object representing collection of StaticSiteCustomDomainOverviewResources and their operations over a StaticSiteCustomDomainOverviewResource. public virtual StaticSiteCustomDomainOverviewCollection GetStaticSiteCustomDomainOverviews() @@ -317,7 +451,7 @@ public virtual StaticSiteCustomDomainOverviewCollection GetStaticSiteCustomDomai /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -348,7 +482,7 @@ public virtual async Task> GetS /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -366,6 +500,75 @@ public virtual Response GetStaticSiteCus return GetStaticSiteCustomDomainOverviews().Get(domainName, cancellationToken); } + /// Gets a collection of StaticSiteLinkedBackendResources in the StaticSite. + /// An object representing collection of StaticSiteLinkedBackendResources and their operations over a StaticSiteLinkedBackendResource. + public virtual StaticSiteLinkedBackendCollection GetStaticSiteLinkedBackends() + { + return GetCachedClient(client => new StaticSiteLinkedBackendCollection(client, Id)); + } + + /// + /// Returns the details of a linked backend linked to a static site by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackend + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetStaticSiteLinkedBackendAsync(string linkedBackendName, CancellationToken cancellationToken = default) + { + return await GetStaticSiteLinkedBackends().GetAsync(linkedBackendName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Returns the details of a linked backend linked to a static site by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/linkedBackends/{linkedBackendName} + /// + /// + /// Operation Id + /// StaticSites_GetLinkedBackend + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the linked backend that should be retrieved. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetStaticSiteLinkedBackend(string linkedBackendName, CancellationToken cancellationToken = default) + { + return GetStaticSiteLinkedBackends().Get(linkedBackendName, cancellationToken); + } + /// /// Description for Gets the details of a static site. /// @@ -379,7 +582,7 @@ public virtual Response GetStaticSiteCus /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -419,7 +622,7 @@ public virtual async Task> GetAsync(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -459,7 +662,7 @@ public virtual Response Get(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -501,7 +704,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -543,7 +746,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -585,7 +788,7 @@ public virtual async Task> UpdateAsync(StaticSitePa /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -627,7 +830,7 @@ public virtual Response Update(StaticSitePatch patch, Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -658,7 +861,7 @@ public virtual AsyncPageable GetUsersAsync(string authprovider, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -689,7 +892,7 @@ public virtual Pageable GetUsers(string authprovider, Cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -730,7 +933,7 @@ public virtual async Task DeleteUserAsync(string authprovider, string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -771,7 +974,7 @@ public virtual Response DeleteUser(string authprovider, string userid, Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -814,7 +1017,7 @@ public virtual async Task> UpdateUserAsync(string authp /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -857,7 +1060,7 @@ public virtual Response UpdateUser(string authprovider, string u /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -895,7 +1098,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -933,7 +1136,7 @@ public virtual Response CreateOrUpdateAppSett /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -971,7 +1174,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -1009,7 +1212,7 @@ public virtual Response CreateOrUpdateFunctio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1051,7 +1254,7 @@ public virtual async Task> CreateUserRo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1093,7 +1296,7 @@ public virtual Response CreateUserRolesInvitatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1135,7 +1338,7 @@ public virtual async Task DetachAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1177,7 +1380,7 @@ public virtual ArmOperation Detach(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1207,7 +1410,7 @@ public virtual AsyncPageable GetStaticSiteFunctionsA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1237,7 +1440,7 @@ public virtual Pageable GetStaticSiteFunctions(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1275,7 +1478,7 @@ public virtual async Task> GetAppSet /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1313,7 +1516,7 @@ public virtual Response GetAppSettings(Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1351,7 +1554,7 @@ public virtual async Task> GetConfiguredRolesAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1389,7 +1592,7 @@ public virtual Response GetConfiguredRoles(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1427,7 +1630,7 @@ public virtual async Task> GetFuncti /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1465,7 +1668,7 @@ public virtual Response GetFunctionAppSetting /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1503,7 +1706,7 @@ public virtual async Task> GetStatic /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1541,7 +1744,7 @@ public virtual Response GetStaticSiteSecrets( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1570,7 +1773,7 @@ public virtual AsyncPageable GetPrivateLinkRe /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1599,7 +1802,7 @@ public virtual Pageable GetPrivateLinkResourc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1641,7 +1844,7 @@ public virtual async Task ResetApiKeyAsync(StaticSiteResetContent cont /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1670,6 +1873,66 @@ public virtual Response ResetApiKey(StaticSiteResetContent content, Cancellation } } + /// + /// Returns details of database connections for a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/showDatabaseConnections + /// + /// + /// Operation Id + /// StaticSites_GetDatabaseConnectionsWithDetails + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDatabaseConnectionsWithDetailsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _staticSiteRestClient.CreateGetDatabaseConnectionsWithDetailsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _staticSiteRestClient.CreateGetDatabaseConnectionsWithDetailsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(e), _staticSiteClientDiagnostics, Pipeline, "StaticSiteResource.GetDatabaseConnectionsWithDetails", "value", "nextLink", cancellationToken); + } + + /// + /// Returns details of database connections for a static site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name}/showDatabaseConnections + /// + /// + /// Operation Id + /// StaticSites_GetDatabaseConnectionsWithDetails + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDatabaseConnectionsWithDetails(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _staticSiteRestClient.CreateGetDatabaseConnectionsWithDetailsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _staticSiteRestClient.CreateGetDatabaseConnectionsWithDetailsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => StaticSiteDatabaseConnectionData.DeserializeStaticSiteDatabaseConnectionData(e), _staticSiteClientDiagnostics, Pipeline, "StaticSiteResource.GetDatabaseConnectionsWithDetails", "value", "nextLink", cancellationToken); + } + /// /// Description for Deploys zipped content to a static site. /// @@ -1683,7 +1946,7 @@ public virtual Response ResetApiKey(StaticSiteResetContent content, Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1729,7 +1992,7 @@ public virtual async Task CreateZipDeploymentForStaticSiteAsync(Wa /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteUserProvidedFunctionAppCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteUserProvidedFunctionAppCollection.cs index 734fe35aa09b3..06a979147a288 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteUserProvidedFunctionAppCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteUserProvidedFunctionAppCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -164,7 +164,7 @@ public virtual ArmOperation CreateOrU /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -254,7 +254,7 @@ public virtual Response Get(string fu /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -284,7 +284,7 @@ public virtual AsyncPageable GetAllAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string functionAppName, Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response Exists(string functionAppName, CancellationToken c /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -445,7 +445,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteUserProvidedFunctionAppResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteUserProvidedFunctionAppResource.cs index cf1f8cda45df2..f7380a618deab 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteUserProvidedFunctionAppResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteUserProvidedFunctionAppResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/TopLevelDomainCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/TopLevelDomainCollection.cs index 1d155720e543b..379f3b0454ba1 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/TopLevelDomainCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/TopLevelDomainCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -110,7 +110,7 @@ public virtual async Task> GetAsync(string name /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -155,7 +155,7 @@ public virtual Response Get(string name, CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -185,7 +185,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -215,7 +215,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -346,7 +346,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/TopLevelDomainResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/TopLevelDomainResource.cs index a6527932822d8..b768c2e373ee5 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/TopLevelDomainResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/TopLevelDomainResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -216,7 +216,7 @@ public virtual AsyncPageable GetAgreementsAsync(TopLevelDomai /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/TriggeredWebJobData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/TriggeredWebJobData.Serialization.cs index 551321ebcb190..6d4478c616dbf 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/TriggeredWebJobData.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/TriggeredWebJobData.Serialization.cs @@ -102,6 +102,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("using_sdk"u8); writer.WriteBooleanValue(IsUsingSdk.Value); } + if (Optional.IsDefined(PublicNetworkAccess)) + { + writer.WritePropertyName("publicNetworkAccess"u8); + writer.WriteStringValue(PublicNetworkAccess); + } + if (Optional.IsDefined(IsStorageAccountRequired)) + { + writer.WritePropertyName("storageAccountRequired"u8); + writer.WriteBooleanValue(IsStorageAccountRequired.Value); + } if (Optional.IsCollectionDefined(Settings)) { writer.WritePropertyName("settings"u8); @@ -178,6 +188,8 @@ internal static TriggeredWebJobData DeserializeTriggeredWebJobData(JsonElement e WebJobType? webJobType = default; string error = default; bool? usingSdk = default; + string publicNetworkAccess = default; + bool? storageAccountRequired = default; IDictionary settings = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -294,6 +306,20 @@ internal static TriggeredWebJobData DeserializeTriggeredWebJobData(JsonElement e usingSdk = property0.Value.GetBoolean(); continue; } + if (property0.NameEquals("publicNetworkAccess"u8)) + { + publicNetworkAccess = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("storageAccountRequired"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + storageAccountRequired = property0.Value.GetBoolean(); + continue; + } if (property0.NameEquals("settings"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -338,6 +364,8 @@ internal static TriggeredWebJobData DeserializeTriggeredWebJobData(JsonElement e webJobType, error, usingSdk, + publicNetworkAccess, + storageAccountRequired, settings ?? new ChangeTrackingDictionary(), kind, serializedAdditionalRawData); @@ -584,6 +612,45 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublicNetworkAccess), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" publicNetworkAccess: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PublicNetworkAccess)) + { + builder.Append(" publicNetworkAccess: "); + if (PublicNetworkAccess.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PublicNetworkAccess}'''"); + } + else + { + builder.AppendLine($"'{PublicNetworkAccess}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsStorageAccountRequired), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" storageAccountRequired: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsStorageAccountRequired)) + { + builder.Append(" storageAccountRequired: "); + var boolValue = IsStorageAccountRequired.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Settings), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/TriggeredWebJobData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/TriggeredWebJobData.cs index 03717229c71ff..280d8b7d77f2f 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/TriggeredWebJobData.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/TriggeredWebJobData.cs @@ -71,10 +71,12 @@ public TriggeredWebJobData() /// Job type. /// Error information. /// Using SDK?. + /// Property to allow or block all public traffic. Allowed Values: 'Enabled', 'Disabled' or an empty string. + /// Checks if Customer provided storage account is required. /// Job settings. /// Kind of resource. /// Keeps track of any properties unknown to the library. - internal TriggeredWebJobData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, TriggeredJobRun latestRun, Uri historyUri, Uri schedulerLogsUri, string runCommand, Uri uri, Uri extraInfoUri, WebJobType? webJobType, string error, bool? isUsingSdk, IDictionary settings, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal TriggeredWebJobData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, TriggeredJobRun latestRun, Uri historyUri, Uri schedulerLogsUri, string runCommand, Uri uri, Uri extraInfoUri, WebJobType? webJobType, string error, bool? isUsingSdk, string publicNetworkAccess, bool? isStorageAccountRequired, IDictionary settings, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { LatestRun = latestRun; HistoryUri = historyUri; @@ -85,6 +87,8 @@ internal TriggeredWebJobData(ResourceIdentifier id, string name, ResourceType re WebJobType = webJobType; Error = error; IsUsingSdk = isUsingSdk; + PublicNetworkAccess = publicNetworkAccess; + IsStorageAccountRequired = isStorageAccountRequired; Settings = settings; Kind = kind; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -117,6 +121,12 @@ internal TriggeredWebJobData(ResourceIdentifier id, string name, ResourceType re /// Using SDK?. [WirePath("properties.using_sdk")] public bool? IsUsingSdk { get; set; } + /// Property to allow or block all public traffic. Allowed Values: 'Enabled', 'Disabled' or an empty string. + [WirePath("properties.publicNetworkAccess")] + public string PublicNetworkAccess { get; set; } + /// Checks if Customer provided storage account is required. + [WirePath("properties.storageAccountRequired")] + public bool? IsStorageAccountRequired { get; set; } /// /// Job settings. /// diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryCollection.cs new file mode 100644 index 0000000000000..2b5f9c0546af8 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryCollection.cs @@ -0,0 +1,395 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetWebAppRequestHistories method from an instance of . + /// + public partial class WebAppRequestHistoryCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesClientDiagnostics; + private readonly WorkflowRunActionRepetitionsRequestHistoriesRestOperations _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesRestClient; + + /// Initializes a new instance of the class for mocking. + protected WebAppRequestHistoryCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal WebAppRequestHistoryCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", WebAppRequestHistoryResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(WebAppRequestHistoryResource.ResourceType, out string webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesApiVersion); + _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesRestClient = new WorkflowRunActionRepetitionsRequestHistoriesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != WorkflowRunActionRepetitionResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WorkflowRunActionRepetitionResource.ResourceType), nameof(id)); + } + + /// + /// Gets a workflow run repetition request history. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitionsRequestHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The request history name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string requestHistoryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(requestHistoryName, nameof(requestHistoryName)); + + using var scope = _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesClientDiagnostics.CreateScope("WebAppRequestHistoryCollection.Get"); + scope.Start(); + try + { + var response = await _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, requestHistoryName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WebAppRequestHistoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a workflow run repetition request history. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitionsRequestHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The request history name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string requestHistoryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(requestHistoryName, nameof(requestHistoryName)); + + using var scope = _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesClientDiagnostics.CreateScope("WebAppRequestHistoryCollection.Get"); + scope.Start(); + try + { + var response = _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, requestHistoryName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WebAppRequestHistoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List a workflow run repetition request history. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitionsRequestHistories_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WebAppRequestHistoryResource(Client, WebAppRequestHistoryData.DeserializeWebAppRequestHistoryData(e)), _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesClientDiagnostics, Pipeline, "WebAppRequestHistoryCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List a workflow run repetition request history. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitionsRequestHistories_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WebAppRequestHistoryResource(Client, WebAppRequestHistoryData.DeserializeWebAppRequestHistoryData(e)), _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesClientDiagnostics, Pipeline, "WebAppRequestHistoryCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitionsRequestHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The request history name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string requestHistoryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(requestHistoryName, nameof(requestHistoryName)); + + using var scope = _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesClientDiagnostics.CreateScope("WebAppRequestHistoryCollection.Exists"); + scope.Start(); + try + { + var response = await _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, requestHistoryName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitionsRequestHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The request history name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string requestHistoryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(requestHistoryName, nameof(requestHistoryName)); + + using var scope = _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesClientDiagnostics.CreateScope("WebAppRequestHistoryCollection.Exists"); + scope.Start(); + try + { + var response = _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, requestHistoryName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitionsRequestHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The request history name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string requestHistoryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(requestHistoryName, nameof(requestHistoryName)); + + using var scope = _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesClientDiagnostics.CreateScope("WebAppRequestHistoryCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, requestHistoryName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WebAppRequestHistoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitionsRequestHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The request history name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string requestHistoryName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(requestHistoryName, nameof(requestHistoryName)); + + using var scope = _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesClientDiagnostics.CreateScope("WebAppRequestHistoryCollection.GetIfExists"); + scope.Start(); + try + { + var response = _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, requestHistoryName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WebAppRequestHistoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryData.Serialization.cs new file mode 100644 index 0000000000000..47750e624ec70 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryData.Serialization.cs @@ -0,0 +1,354 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class WebAppRequestHistoryData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppRequestHistoryData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WebAppRequestHistoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WebAppRequestHistoryData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWebAppRequestHistoryData(document.RootElement, options); + } + + internal static WebAppRequestHistoryData DeserializeWebAppRequestHistoryData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + WebAppRequestHistoryProperties properties = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = WebAppRequestHistoryProperties.DeserializeWebAppRequestHistoryProperties(property.Value, options); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WebAppRequestHistoryData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" location: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" location: "); + builder.AppendLine($"'{Location.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Tags), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tags: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags.Any()) + { + builder.Append(" tags: "); + builder.AppendLine("{"); + foreach (var item in Tags) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + if (item.Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{item.Value}'''"); + } + else + { + builder.AppendLine($"'{item.Value}'"); + } + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Properties), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" properties: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Properties)) + { + builder.Append(" properties: "); + BicepSerializationHelpers.AppendChildObject(builder, Properties, options, 2, false, " properties: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WebAppRequestHistoryData)} does not support writing '{options.Format}' format."); + } + } + + WebAppRequestHistoryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWebAppRequestHistoryData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WebAppRequestHistoryData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryData.cs new file mode 100644 index 0000000000000..1897092057948 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryData.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 Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing the WebAppRequestHistory data model. + /// The request history. + /// + public partial class WebAppRequestHistoryData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public WebAppRequestHistoryData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The request history properties. + /// Keeps track of any properties unknown to the library. + internal WebAppRequestHistoryData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, WebAppRequestHistoryProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal WebAppRequestHistoryData() + { + } + + /// The request history properties. + [WirePath("properties")] + public WebAppRequestHistoryProperties Properties { get; set; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryResource.Serialization.cs new file mode 100644 index 0000000000000..b209735115c68 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppService +{ + public partial class WebAppRequestHistoryResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + WebAppRequestHistoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + WebAppRequestHistoryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryResource.cs new file mode 100644 index 0000000000000..008f639e76287 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryResource.cs @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a WebAppRequestHistory along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetWebAppRequestHistoryResource method. + /// Otherwise you can get one from its parent resource using the GetWebAppRequestHistory method. + /// + public partial class WebAppRequestHistoryResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + /// The workflowName. + /// The runName. + /// The actionName. + /// The repetitionName. + /// The requestHistoryName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName, string requestHistoryName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesClientDiagnostics; + private readonly WorkflowRunActionRepetitionsRequestHistoriesRestOperations _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesRestClient; + private readonly WebAppRequestHistoryData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Web/sites/hostruntime/webhooks/api/workflows/runs/actions/repetitions/requestHistories"; + + /// Initializes a new instance of the class for mocking. + protected WebAppRequestHistoryResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal WebAppRequestHistoryResource(ArmClient client, WebAppRequestHistoryData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal WebAppRequestHistoryResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesApiVersion); + _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesRestClient = new WorkflowRunActionRepetitionsRequestHistoriesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual WebAppRequestHistoryData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets a workflow run repetition request history. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitionsRequestHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesClientDiagnostics.CreateScope("WebAppRequestHistoryResource.Get"); + scope.Start(); + try + { + var response = await _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WebAppRequestHistoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a workflow run repetition request history. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitionsRequestHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesClientDiagnostics.CreateScope("WebAppRequestHistoryResource.Get"); + scope.Start(); + try + { + var response = _webAppRequestHistoryWorkflowRunActionRepetitionsRequestHistoriesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WebAppRequestHistoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteCollection.cs index 34a8558c8bf8b..48474526310a2 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync(Wai /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string name, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string name, CancellationToken canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -284,7 +284,7 @@ public virtual AsyncPageable GetAllAsync(bool? includeSlots = n /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual Pageable GetAll(bool? includeSlots = null, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -401,7 +401,7 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -446,7 +446,7 @@ public virtual async Task> GetIfExistsAsync(st /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteConfigConnectionStringCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteConfigConnectionStringCollection.cs index e5619a8d39122..24ee1d0ca8e67 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteConfigConnectionStringCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteConfigConnectionStringCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string connec /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(Cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string connectionStringKey /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string connectionStringKey, CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteConfigConnectionStringResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteConfigConnectionStringResource.cs index 8dbf29c8f152a..dc163cf30324a 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteConfigConnectionStringResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteConfigConnectionStringResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteConfigResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteConfigResource.cs index 168f3284ab933..ff5cef9b6b0e7 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteConfigResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteConfigResource.cs @@ -114,7 +114,7 @@ public virtual SiteConfigSnapshotCollection GetSiteConfigSnapshots() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -145,7 +145,7 @@ public virtual async Task> GetSiteConfigSna /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -176,7 +176,7 @@ public virtual Response GetSiteConfigSnapshot(string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -216,7 +216,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -298,7 +298,7 @@ public virtual async Task> UpdateAsync(SiteConfi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -340,7 +340,7 @@ public virtual Response Update(SiteConfigData data, Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -388,7 +388,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -436,7 +436,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -466,7 +466,7 @@ public virtual AsyncPageable GetConfigurationSnap /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteContinuousWebJobCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteContinuousWebJobCollection.cs index 50ec32d032a35..262dae22f6788 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteContinuousWebJobCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteContinuousWebJobCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string webJobName, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string webJobName, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string webJobName, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteContinuousWebJobResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteContinuousWebJobResource.cs index f3a6561df8ed1..59b76cefaf8a8 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteContinuousWebJobResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteContinuousWebJobResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -307,7 +307,7 @@ public virtual async Task StartContinuousWebJobAsync(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual Response StartContinuousWebJob(CancellationToken cancellationToke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -383,7 +383,7 @@ public virtual async Task StopContinuousWebJobAsync(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteData.Serialization.cs index a7dc7999ee94c..06ce19c85b31b 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteData.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteData.Serialization.cs @@ -161,11 +161,56 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio writer.WritePropertyName("lastModifiedTimeUtc"u8); writer.WriteStringValue(LastModifiedTimeUtc.Value, "O"); } + if (Optional.IsDefined(DnsConfiguration)) + { + writer.WritePropertyName("dnsConfiguration"u8); + writer.WriteObjectValue(DnsConfiguration, options); + } + if (Optional.IsDefined(IsVnetRouteAllEnabled)) + { + writer.WritePropertyName("vnetRouteAllEnabled"u8); + writer.WriteBooleanValue(IsVnetRouteAllEnabled.Value); + } + if (Optional.IsDefined(IsVnetImagePullEnabled)) + { + writer.WritePropertyName("vnetImagePullEnabled"u8); + writer.WriteBooleanValue(IsVnetImagePullEnabled.Value); + } + if (Optional.IsDefined(IsVnetContentShareEnabled)) + { + writer.WritePropertyName("vnetContentShareEnabled"u8); + writer.WriteBooleanValue(IsVnetContentShareEnabled.Value); + } + if (Optional.IsDefined(IsVnetBackupRestoreEnabled)) + { + writer.WritePropertyName("vnetBackupRestoreEnabled"u8); + writer.WriteBooleanValue(IsVnetBackupRestoreEnabled.Value); + } if (Optional.IsDefined(SiteConfig)) { writer.WritePropertyName("siteConfig"u8); writer.WriteObjectValue(SiteConfig, options); } + if (Optional.IsDefined(FunctionAppConfig)) + { + writer.WritePropertyName("functionAppConfig"u8); + writer.WriteObjectValue(FunctionAppConfig, options); + } + if (Optional.IsDefined(DaprConfig)) + { + writer.WritePropertyName("daprConfig"u8); + writer.WriteObjectValue(DaprConfig, options); + } + if (Optional.IsDefined(WorkloadProfileName)) + { + writer.WritePropertyName("workloadProfileName"u8); + writer.WriteStringValue(WorkloadProfileName); + } + if (Optional.IsDefined(ResourceConfig)) + { + writer.WritePropertyName("resourceConfig"u8); + writer.WriteObjectValue(ResourceConfig, options); + } if (options.Format != "W" && Optional.IsCollectionDefined(TrafficManagerHostNames)) { if (TrafficManagerHostNames != null) @@ -340,6 +385,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio writer.WriteNull("inProgressOperationId"); } } + if (Optional.IsDefined(PublicNetworkAccess)) + { + writer.WritePropertyName("publicNetworkAccess"u8); + writer.WriteStringValue(PublicNetworkAccess); + } if (Optional.IsDefined(IsStorageAccountRequired)) { writer.WritePropertyName("storageAccountRequired"u8); @@ -355,6 +405,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio writer.WritePropertyName("virtualNetworkSubnetId"u8); writer.WriteStringValue(VirtualNetworkSubnetId); } + if (Optional.IsDefined(ManagedEnvironmentId)) + { + writer.WritePropertyName("managedEnvironmentId"u8); + writer.WriteStringValue(ManagedEnvironmentId); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -416,7 +471,16 @@ internal static WebSiteData DeserializeWebSiteData(JsonElement element, ModelRea bool? isXenon = default; bool? hyperV = default; DateTimeOffset? lastModifiedTimeUtc = default; + SiteDnsConfig dnsConfiguration = default; + bool? vnetRouteAllEnabled = default; + bool? vnetImagePullEnabled = default; + bool? vnetContentShareEnabled = default; + bool? vnetBackupRestoreEnabled = default; SiteConfigProperties siteConfig = default; + FunctionAppConfig functionAppConfig = default; + AppDaprConfig daprConfig = default; + string workloadProfileName = default; + FunctionAppResourceConfig resourceConfig = default; IReadOnlyList trafficManagerHostNames = default; bool? scmSiteAlsoStopped = default; string targetSwapSlot = default; @@ -441,9 +505,11 @@ internal static WebSiteData DeserializeWebSiteData(JsonElement element, ModelRea bool? httpsOnly = default; RedundancyMode? redundancyMode = default; Guid? inProgressOperationId = default; + string publicNetworkAccess = default; bool? storageAccountRequired = default; string keyVaultReferenceIdentity = default; ResourceIdentifier virtualNetworkSubnetId = default; + string managedEnvironmentId = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -647,6 +713,51 @@ internal static WebSiteData DeserializeWebSiteData(JsonElement element, ModelRea lastModifiedTimeUtc = property0.Value.GetDateTimeOffset("O"); continue; } + if (property0.NameEquals("dnsConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dnsConfiguration = SiteDnsConfig.DeserializeSiteDnsConfig(property0.Value, options); + continue; + } + if (property0.NameEquals("vnetRouteAllEnabled"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + vnetRouteAllEnabled = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("vnetImagePullEnabled"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + vnetImagePullEnabled = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("vnetContentShareEnabled"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + vnetContentShareEnabled = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("vnetBackupRestoreEnabled"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + vnetBackupRestoreEnabled = property0.Value.GetBoolean(); + continue; + } if (property0.NameEquals("siteConfig"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -656,6 +767,38 @@ internal static WebSiteData DeserializeWebSiteData(JsonElement element, ModelRea siteConfig = SiteConfigProperties.DeserializeSiteConfigProperties(property0.Value, options); continue; } + if (property0.NameEquals("functionAppConfig"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + functionAppConfig = FunctionAppConfig.DeserializeFunctionAppConfig(property0.Value, options); + continue; + } + if (property0.NameEquals("daprConfig"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + daprConfig = AppDaprConfig.DeserializeAppDaprConfig(property0.Value, options); + continue; + } + if (property0.NameEquals("workloadProfileName"u8)) + { + workloadProfileName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("resourceConfig"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceConfig = FunctionAppResourceConfig.DeserializeFunctionAppResourceConfig(property0.Value, options); + continue; + } if (property0.NameEquals("trafficManagerHostNames"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -856,6 +999,11 @@ internal static WebSiteData DeserializeWebSiteData(JsonElement element, ModelRea inProgressOperationId = property0.Value.GetGuid(); continue; } + if (property0.NameEquals("publicNetworkAccess"u8)) + { + publicNetworkAccess = property0.Value.GetString(); + continue; + } if (property0.NameEquals("storageAccountRequired"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -879,6 +1027,11 @@ internal static WebSiteData DeserializeWebSiteData(JsonElement element, ModelRea virtualNetworkSubnetId = new ResourceIdentifier(property0.Value.GetString()); continue; } + if (property0.NameEquals("managedEnvironmentId"u8)) + { + managedEnvironmentId = property0.Value.GetString(); + continue; + } } continue; } @@ -910,7 +1063,16 @@ internal static WebSiteData DeserializeWebSiteData(JsonElement element, ModelRea isXenon, hyperV, lastModifiedTimeUtc, + dnsConfiguration, + vnetRouteAllEnabled, + vnetImagePullEnabled, + vnetContentShareEnabled, + vnetBackupRestoreEnabled, siteConfig, + functionAppConfig, + daprConfig, + workloadProfileName, + resourceConfig, trafficManagerHostNames ?? new ChangeTrackingList(), scmSiteAlsoStopped, targetSwapSlot, @@ -935,9 +1097,11 @@ internal static WebSiteData DeserializeWebSiteData(JsonElement element, ModelRea httpsOnly, redundancyMode, inProgressOperationId, + publicNetworkAccess, storageAccountRequired, keyVaultReferenceIdentity, virtualNetworkSubnetId, + managedEnvironmentId, kind, serializedAdditionalRawData); } @@ -1376,6 +1540,85 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DnsConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" dnsConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DnsConfiguration)) + { + builder.Append(" dnsConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, DnsConfiguration, options, 4, false, " dnsConfiguration: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsVnetRouteAllEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" vnetRouteAllEnabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsVnetRouteAllEnabled)) + { + builder.Append(" vnetRouteAllEnabled: "); + var boolValue = IsVnetRouteAllEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsVnetImagePullEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" vnetImagePullEnabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsVnetImagePullEnabled)) + { + builder.Append(" vnetImagePullEnabled: "); + var boolValue = IsVnetImagePullEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsVnetContentShareEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" vnetContentShareEnabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsVnetContentShareEnabled)) + { + builder.Append(" vnetContentShareEnabled: "); + var boolValue = IsVnetContentShareEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsVnetBackupRestoreEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" vnetBackupRestoreEnabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsVnetBackupRestoreEnabled)) + { + builder.Append(" vnetBackupRestoreEnabled: "); + var boolValue = IsVnetBackupRestoreEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SiteConfig), out propertyOverride); if (hasPropertyOverride) { @@ -1391,6 +1634,74 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(FunctionAppConfig), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" functionAppConfig: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(FunctionAppConfig)) + { + builder.Append(" functionAppConfig: "); + BicepSerializationHelpers.AppendChildObject(builder, FunctionAppConfig, options, 4, false, " functionAppConfig: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DaprConfig), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" daprConfig: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DaprConfig)) + { + builder.Append(" daprConfig: "); + BicepSerializationHelpers.AppendChildObject(builder, DaprConfig, options, 4, false, " daprConfig: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(WorkloadProfileName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" workloadProfileName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(WorkloadProfileName)) + { + builder.Append(" workloadProfileName: "); + if (WorkloadProfileName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{WorkloadProfileName}'''"); + } + else + { + builder.AppendLine($"'{WorkloadProfileName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceConfig), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceConfig: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceConfig)) + { + builder.Append(" resourceConfig: "); + BicepSerializationHelpers.AppendChildObject(builder, ResourceConfig, options, 4, false, " resourceConfig: "); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TrafficManagerHostNames), out propertyOverride); if (hasPropertyOverride) { @@ -1835,6 +2146,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublicNetworkAccess), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" publicNetworkAccess: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PublicNetworkAccess)) + { + builder.Append(" publicNetworkAccess: "); + if (PublicNetworkAccess.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PublicNetworkAccess}'''"); + } + else + { + builder.AppendLine($"'{PublicNetworkAccess}'"); + } + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsStorageAccountRequired), out propertyOverride); if (hasPropertyOverride) { @@ -1889,6 +2223,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ManagedEnvironmentId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" managedEnvironmentId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ManagedEnvironmentId)) + { + builder.Append(" managedEnvironmentId: "); + if (ManagedEnvironmentId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ManagedEnvironmentId}'''"); + } + else + { + builder.AppendLine($"'{ManagedEnvironmentId}'"); + } + } + } + builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteData.cs index fb45542cca012..b8229ca4c4e86 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteData.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteData.cs @@ -87,7 +87,16 @@ public WebSiteData(AzureLocation location) : base(location) /// Obsolete: Hyper-V sandbox. /// Hyper-V sandbox. /// Last time the app was modified, in UTC. Read-only. + /// Property to configure various DNS related settings for a site. + /// Virtual Network Route All enabled. This causes all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied. + /// To enable pulling image over Virtual Network. + /// To enable accessing content over virtual network. + /// To enable Backup and Restore operations over virtual network. /// Configuration of the app. + /// Configuration specific of the Azure Function app. + /// Dapr configuration of the app. + /// Workload profile name for function app to execute on. + /// Function app resource requirements. /// Azure Traffic Manager hostnames associated with the app. Read-only. /// <code>true</code> to stop SCM (KUDU) site when the app is stopped; otherwise, <code>false</code>. The default is <code>false</code>. /// Specifies which deployment slot this app will swap into. Read-only. @@ -126,15 +135,17 @@ public WebSiteData(AzureLocation location) : base(location) /// /// Site redundancy mode. /// Specifies an operation id if this site has a pending operation. + /// Property to allow or block all public traffic. Allowed Values: 'Enabled', 'Disabled' or an empty string. /// Checks if Customer provided storage account is required. /// Identity to use for Key Vault Reference authentication. /// /// Azure Resource Manager ID of the Virtual network and subnet to be joined by Regional VNET Integration. /// This must be of the form /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} /// + /// Azure Resource Manager ID of the customer's selected Managed Environment on which to host this app. This must be of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}. /// Kind of resource. /// Keeps track of any properties unknown to the library. - 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, IDictionary serializedAdditionalRawData) : 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, SiteDnsConfig dnsConfiguration, bool? isVnetRouteAllEnabled, bool? isVnetImagePullEnabled, bool? isVnetContentShareEnabled, bool? isVnetBackupRestoreEnabled, SiteConfigProperties siteConfig, FunctionAppConfig functionAppConfig, AppDaprConfig daprConfig, string workloadProfileName, FunctionAppResourceConfig resourceConfig, 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, string publicNetworkAccess, bool? isStorageAccountRequired, string keyVaultReferenceIdentity, ResourceIdentifier virtualNetworkSubnetId, string managedEnvironmentId, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Identity = identity; ExtendedLocation = extendedLocation; @@ -151,7 +162,16 @@ internal WebSiteData(ResourceIdentifier id, string name, ResourceType resourceTy IsXenon = isXenon; IsHyperV = isHyperV; LastModifiedTimeUtc = lastModifiedTimeUtc; + DnsConfiguration = dnsConfiguration; + IsVnetRouteAllEnabled = isVnetRouteAllEnabled; + IsVnetImagePullEnabled = isVnetImagePullEnabled; + IsVnetContentShareEnabled = isVnetContentShareEnabled; + IsVnetBackupRestoreEnabled = isVnetBackupRestoreEnabled; SiteConfig = siteConfig; + FunctionAppConfig = functionAppConfig; + DaprConfig = daprConfig; + WorkloadProfileName = workloadProfileName; + ResourceConfig = resourceConfig; TrafficManagerHostNames = trafficManagerHostNames; IsScmSiteAlsoStopped = isScmSiteAlsoStopped; TargetSwapSlot = targetSwapSlot; @@ -176,9 +196,11 @@ internal WebSiteData(ResourceIdentifier id, string name, ResourceType resourceTy IsHttpsOnly = isHttpsOnly; RedundancyMode = redundancyMode; InProgressOperationId = inProgressOperationId; + PublicNetworkAccess = publicNetworkAccess; IsStorageAccountRequired = isStorageAccountRequired; KeyVaultReferenceIdentity = keyVaultReferenceIdentity; VirtualNetworkSubnetId = virtualNetworkSubnetId; + ManagedEnvironmentId = managedEnvironmentId; Kind = kind; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -236,9 +258,36 @@ internal WebSiteData() /// Last time the app was modified, in UTC. Read-only. [WirePath("properties.lastModifiedTimeUtc")] public DateTimeOffset? LastModifiedTimeUtc { get; } + /// Property to configure various DNS related settings for a site. + [WirePath("properties.dnsConfiguration")] + public SiteDnsConfig DnsConfiguration { get; set; } + /// Virtual Network Route All enabled. This causes all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied. + [WirePath("properties.vnetRouteAllEnabled")] + public bool? IsVnetRouteAllEnabled { get; set; } + /// To enable pulling image over Virtual Network. + [WirePath("properties.vnetImagePullEnabled")] + public bool? IsVnetImagePullEnabled { get; set; } + /// To enable accessing content over virtual network. + [WirePath("properties.vnetContentShareEnabled")] + public bool? IsVnetContentShareEnabled { get; set; } + /// To enable Backup and Restore operations over virtual network. + [WirePath("properties.vnetBackupRestoreEnabled")] + public bool? IsVnetBackupRestoreEnabled { get; set; } /// Configuration of the app. [WirePath("properties.siteConfig")] public SiteConfigProperties SiteConfig { get; set; } + /// Configuration specific of the Azure Function app. + [WirePath("properties.functionAppConfig")] + public FunctionAppConfig FunctionAppConfig { get; set; } + /// Dapr configuration of the app. + [WirePath("properties.daprConfig")] + public AppDaprConfig DaprConfig { get; set; } + /// Workload profile name for function app to execute on. + [WirePath("properties.workloadProfileName")] + public string WorkloadProfileName { get; set; } + /// Function app resource requirements. + [WirePath("properties.resourceConfig")] + public FunctionAppResourceConfig ResourceConfig { get; set; } /// Azure Traffic Manager hostnames associated with the app. Read-only. [WirePath("properties.trafficManagerHostNames")] public IReadOnlyList TrafficManagerHostNames { get; } @@ -325,6 +374,9 @@ internal WebSiteData() /// Specifies an operation id if this site has a pending operation. [WirePath("properties.inProgressOperationId")] public Guid? InProgressOperationId { get; } + /// Property to allow or block all public traffic. Allowed Values: 'Enabled', 'Disabled' or an empty string. + [WirePath("properties.publicNetworkAccess")] + public string PublicNetworkAccess { get; set; } /// Checks if Customer provided storage account is required. [WirePath("properties.storageAccountRequired")] public bool? IsStorageAccountRequired { get; set; } @@ -337,6 +389,9 @@ internal WebSiteData() /// [WirePath("properties.virtualNetworkSubnetId")] public ResourceIdentifier VirtualNetworkSubnetId { get; set; } + /// Azure Resource Manager ID of the customer's selected Managed Environment on which to host this app. This must be of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}. + [WirePath("properties.managedEnvironmentId")] + public string ManagedEnvironmentId { get; set; } /// Kind of resource. [WirePath("kind")] public string Kind { get; set; } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteExtensionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteExtensionCollection.cs index a815ad4751714..8df855cb0c5bd 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteExtensionCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteExtensionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -111,7 +111,7 @@ public virtual async Task> CreateOrUpdate /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -158,7 +158,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -203,7 +203,7 @@ public virtual async Task> GetAsync(string si /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -248,7 +248,7 @@ public virtual Response Get(string siteExtensionId, Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -278,7 +278,7 @@ public virtual AsyncPageable GetAllAsync(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -308,7 +308,7 @@ public virtual Pageable GetAll(CancellationToken cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual async Task> ExistsAsync(string siteExtensionId, Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -394,7 +394,7 @@ public virtual Response Exists(string siteExtensionId, CancellationToken c /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -439,7 +439,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteExtensionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteExtensionResource.cs index 7f8912c595e91..959a9d5bd305b 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteExtensionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteExtensionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(Wa /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteFtpPublishingCredentialsPolicyResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteFtpPublishingCredentialsPolicyResource.cs index 098b8e17a57b1..63f3f0d220c23 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteFtpPublishingCredentialsPolicyResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteFtpPublishingCredentialsPolicyResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteHybridConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteHybridConnectionCollection.cs index 6ac9ff59eb102..a8fe5b2e86040 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteHybridConnectionCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteHybridConnectionCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string entityName, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -296,7 +296,7 @@ public virtual async Task> ExistsAsync(string entityName, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -339,7 +339,7 @@ public virtual Response Exists(string entityName, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -384,7 +384,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteHybridConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteHybridConnectionResource.cs index b8732869abdfa..260822ecbaf8d 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteHybridConnectionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteHybridConnectionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSitePremierAddonCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSitePremierAddonCollection.cs index 102b8d6b146f8..a01acded6afea 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSitePremierAddonCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSitePremierAddonCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string premierAddOnName /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -296,7 +296,7 @@ public virtual async Task> ExistsAsync(string premierAddOnName, C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -339,7 +339,7 @@ public virtual Response Exists(string premierAddOnName, CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -384,7 +384,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSitePremierAddonResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSitePremierAddonResource.cs index fbb96d2e70246..10c93e058cb09 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSitePremierAddonResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSitePremierAddonResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAsync(Pre /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSitePrivateAccessResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSitePrivateAccessResource.cs index 73671bc8ff032..0d3a88595494d 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSitePrivateAccessResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSitePrivateAccessResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteResource.cs index 9deca7c3d854d..4be71701e5987 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteResource.cs @@ -43,6 +43,10 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly RecommendationsRestOperations _recommendationsRestClient; private readonly ClientDiagnostics _siteRecommendationRecommendationsClientDiagnostics; private readonly RecommendationsRestOperations _siteRecommendationRecommendationsRestClient; + private readonly ClientDiagnostics _siteExtensionWebAppsClientDiagnostics; + private readonly WebAppsRestOperations _siteExtensionWebAppsRestClient; + private readonly ClientDiagnostics _workflowsClientDiagnostics; + private readonly WorkflowsRestOperations _workflowsRestClient; private readonly WebSiteData _data; /// Gets the resource type for the operations. @@ -75,6 +79,11 @@ internal WebSiteResource(ArmClient client, ResourceIdentifier id) : base(client, _siteRecommendationRecommendationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", SiteRecommendationResource.ResourceType.Namespace, Diagnostics); TryGetApiVersion(SiteRecommendationResource.ResourceType, out string siteRecommendationRecommendationsApiVersion); _siteRecommendationRecommendationsRestClient = new RecommendationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, siteRecommendationRecommendationsApiVersion); + _siteExtensionWebAppsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", SiteExtensionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SiteExtensionResource.ResourceType, out string siteExtensionWebAppsApiVersion); + _siteExtensionWebAppsRestClient = new WebAppsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, siteExtensionWebAppsApiVersion); + _workflowsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _workflowsRestClient = new WorkflowsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); #if DEBUG ValidateResourceId(Id); #endif @@ -121,7 +130,7 @@ public virtual SiteDetectorCollection GetSiteDetectors() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -155,7 +164,7 @@ public virtual async Task> GetSiteDetectorAsync(s /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -196,7 +205,7 @@ public virtual SitePrivateEndpointConnectionCollection GetSitePrivateEndpointCon /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -227,7 +236,7 @@ public virtual async Task> GetSi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -265,7 +274,7 @@ public virtual SiteHybridConnectionNamespaceRelayCollection GetSiteHybridConnect /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -297,7 +306,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -336,7 +345,7 @@ public virtual SiteVirtualNetworkConnectionCollection GetSiteVirtualNetworkConne /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -367,7 +376,7 @@ public virtual async Task> GetSit /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -405,7 +414,7 @@ public virtual SiteDiagnosticCollection GetSiteDiagnostics() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -436,7 +445,7 @@ public virtual async Task> GetSiteDiagnosticAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -474,7 +483,7 @@ public virtual SiteRecommendationCollection GetSiteRecommendations() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -507,7 +516,7 @@ public virtual async Task> GetSiteRecommend /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -554,7 +563,7 @@ public virtual WebSiteSlotCollection GetWebSiteSlots() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -585,7 +594,7 @@ public virtual async Task> GetWebSiteSlotAsync(str /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -623,7 +632,7 @@ public virtual SiteBackupCollection GetSiteBackups() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -654,7 +663,7 @@ public virtual async Task> GetSiteBackupAsync(strin /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -706,7 +715,7 @@ public virtual SiteConfigAppsettingCollection GetSiteConfigAppsettings() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -737,7 +746,7 @@ public virtual async Task> GetSiteConfigA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -775,7 +784,7 @@ public virtual WebSiteConfigConnectionStringCollection GetWebSiteConfigConnectio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -806,7 +815,7 @@ public virtual async Task> GetWe /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -865,7 +874,7 @@ public virtual WebSiteContinuousWebJobCollection GetWebSiteContinuousWebJobs() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -896,7 +905,7 @@ public virtual async Task> GetWebSiteC /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -934,7 +943,7 @@ public virtual SiteDeploymentCollection GetSiteDeployments() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -965,7 +974,7 @@ public virtual async Task> GetSiteDeploymentAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1003,7 +1012,7 @@ public virtual SiteDomainOwnershipIdentifierCollection GetSiteDomainOwnershipIde /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1034,7 +1043,7 @@ public virtual async Task> GetSi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1079,7 +1088,7 @@ public virtual SiteFunctionCollection GetSiteFunctions() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1110,7 +1119,7 @@ public virtual async Task> GetSiteFunctionAsync(s /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1148,7 +1157,7 @@ public virtual SiteHostNameBindingCollection GetSiteHostNameBindings() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1179,7 +1188,7 @@ public virtual async Task> GetSiteHostName /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1217,7 +1226,7 @@ public virtual WebSiteHybridConnectionCollection GetWebSiteHybridConnections() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1248,7 +1257,7 @@ public virtual async Task> GetWebSiteH /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1286,7 +1295,7 @@ public virtual SiteInstanceCollection GetSiteInstances() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1317,7 +1326,7 @@ public virtual async Task> GetSiteInstanceAsync(s /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1355,7 +1364,7 @@ public virtual SiteProcessCollection GetSiteProcesses() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1386,7 +1395,7 @@ public virtual async Task> GetSiteProcessAsync(str /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1431,7 +1440,7 @@ public virtual WebSitePremierAddonCollection GetWebSitePremierAddons() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1462,7 +1471,7 @@ public virtual async Task> GetWebSitePremi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1507,7 +1516,7 @@ public virtual SitePublicCertificateCollection GetSitePublicCertificates() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1538,7 +1547,7 @@ public virtual async Task> GetSitePublic /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1556,6 +1565,75 @@ public virtual Response GetSitePublicCertificate( return GetSitePublicCertificates().Get(publicCertificateName, cancellationToken); } + /// Gets a collection of SiteContainerResources in the WebSite. + /// An object representing collection of SiteContainerResources and their operations over a SiteContainerResource. + public virtual SiteContainerCollection GetSiteContainers() + { + return GetCachedClient(client => new SiteContainerCollection(client, Id)); + } + + /// + /// Gets a site container of a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainer + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Site Container Name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetSiteContainerAsync(string containerName, CancellationToken cancellationToken = default) + { + return await GetSiteContainers().GetAsync(containerName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a site container of a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainer + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Site Container Name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetSiteContainer(string containerName, CancellationToken cancellationToken = default) + { + return GetSiteContainers().Get(containerName, cancellationToken); + } + /// Gets a collection of WebSiteExtensionResources in the WebSite. /// An object representing collection of WebSiteExtensionResources and their operations over a WebSiteExtensionResource. public virtual WebSiteExtensionCollection GetWebSiteExtensions() @@ -1576,7 +1654,7 @@ public virtual WebSiteExtensionCollection GetWebSiteExtensions() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1607,7 +1685,7 @@ public virtual async Task> GetWebSiteExtensio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1652,7 +1730,7 @@ public virtual WebSiteTriggeredwebJobCollection GetWebSiteTriggeredwebJobs() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1683,7 +1761,7 @@ public virtual async Task> GetWebSiteTr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1721,7 +1799,7 @@ public virtual WebSiteWebJobCollection GetWebSiteWebJobs() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1752,7 +1830,7 @@ public virtual async Task> GetWebSiteWebJobAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1770,6 +1848,297 @@ public virtual Response GetWebSiteWebJob(string webJobNam return GetWebSiteWebJobs().Get(webJobName, cancellationToken); } + /// Gets a collection of SiteWorkflowResources in the WebSite. + /// An object representing collection of SiteWorkflowResources and their operations over a SiteWorkflowResource. + public virtual SiteWorkflowCollection GetSiteWorkflows() + { + return GetCachedClient(client => new SiteWorkflowCollection(client, Id)); + } + + /// + /// Get workflow information by its ID for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetWorkflow + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetSiteWorkflowAsync(string workflowName, CancellationToken cancellationToken = default) + { + return await GetSiteWorkflows().GetAsync(workflowName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get workflow information by its ID for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetWorkflow + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetSiteWorkflow(string workflowName, CancellationToken cancellationToken = default) + { + return GetSiteWorkflows().Get(workflowName, cancellationToken); + } + + /// Gets a collection of WorkflowRunResources in the WebSite. + /// The workflow name. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// An object representing collection of WorkflowRunResources and their operations over a WorkflowRunResource. + public virtual WorkflowRunCollection GetWorkflowRuns(string workflowName) + { + return new WorkflowRunCollection(Client, Id, workflowName); + } + + /// + /// Gets a workflow run. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName} + /// + /// + /// Operation Id + /// WorkflowRuns_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow name. + /// The workflow run name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetWorkflowRunAsync(string workflowName, string runName, CancellationToken cancellationToken = default) + { + return await GetWorkflowRuns(workflowName).GetAsync(runName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a workflow run. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName} + /// + /// + /// Operation Id + /// WorkflowRuns_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow name. + /// The workflow run name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetWorkflowRun(string workflowName, string runName, CancellationToken cancellationToken = default) + { + return GetWorkflowRuns(workflowName).Get(runName, cancellationToken); + } + + /// Gets a collection of WorkflowTriggerResources in the WebSite. + /// The workflow name. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// An object representing collection of WorkflowTriggerResources and their operations over a WorkflowTriggerResource. + public virtual WorkflowTriggerCollection GetWorkflowTriggers(string workflowName) + { + return new WorkflowTriggerCollection(Client, Id, workflowName); + } + + /// + /// Gets a workflow trigger. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName} + /// + /// + /// Operation Id + /// WorkflowTriggers_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow name. + /// The workflow trigger name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetWorkflowTriggerAsync(string workflowName, string triggerName, CancellationToken cancellationToken = default) + { + return await GetWorkflowTriggers(workflowName).GetAsync(triggerName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a workflow trigger. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName} + /// + /// + /// Operation Id + /// WorkflowTriggers_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow name. + /// The workflow trigger name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetWorkflowTrigger(string workflowName, string triggerName, CancellationToken cancellationToken = default) + { + return GetWorkflowTriggers(workflowName).Get(triggerName, cancellationToken); + } + + /// Gets a collection of WorkflowVersionResources in the WebSite. + /// The workflow name. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// An object representing collection of WorkflowVersionResources and their operations over a WorkflowVersionResource. + public virtual WorkflowVersionCollection GetWorkflowVersions(string workflowName) + { + return new WorkflowVersionCollection(Client, Id, workflowName); + } + + /// + /// Gets a workflow version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/versions/{versionId} + /// + /// + /// Operation Id + /// WorkflowVersions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow name. + /// The workflow versionId. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetWorkflowVersionAsync(string workflowName, string versionId, CancellationToken cancellationToken = default) + { + return await GetWorkflowVersions(workflowName).GetAsync(versionId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a workflow version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/versions/{versionId} + /// + /// + /// Operation Id + /// WorkflowVersions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow name. + /// The workflow versionId. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetWorkflowVersion(string workflowName, string versionId, CancellationToken cancellationToken = default) + { + return GetWorkflowVersions(workflowName).Get(versionId, cancellationToken); + } + /// /// Description for Gets the details of a web, mobile, or API app. /// @@ -1783,7 +2152,7 @@ public virtual Response GetWebSiteWebJob(string webJobNam /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1823,7 +2192,7 @@ public virtual async Task> GetAsync(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1863,7 +2232,7 @@ public virtual Response Get(CancellationToken cancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1909,7 +2278,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? d /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1955,7 +2324,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? deleteMetrics = nu /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1997,7 +2366,7 @@ public virtual async Task> UpdateAsync(SitePatchInfo i /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2039,7 +2408,7 @@ public virtual Response Update(SitePatchInfo info, Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2067,7 +2436,7 @@ public virtual AsyncPageable GetHistoryForWebAppRecomm /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2095,7 +2464,7 @@ public virtual Pageable GetHistoryForWebAppRecommendat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2127,7 +2496,7 @@ public virtual AsyncPageable GetRecommendedRulesForWeb /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2159,7 +2528,7 @@ public virtual Pageable GetRecommendedRulesForWebAppRe /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2193,7 +2562,7 @@ public virtual async Task DisableAllForWebAppRecommendationAsync(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2227,7 +2596,7 @@ public virtual Response DisableAllForWebAppRecommendation(CancellationToken canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2261,7 +2630,7 @@ public virtual async Task ResetAllFiltersForWebAppRecommendationAsync( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2295,7 +2664,7 @@ public virtual Response ResetAllFiltersForWebAppRecommendation(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2334,7 +2703,7 @@ public virtual async Task> AnalyzeCustomH /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2373,7 +2742,7 @@ public virtual Response AnalyzeCustomHostname(stri /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2415,7 +2784,7 @@ public virtual async Task ApplySlotConfigToProductionAsync(CsmSlotEnti /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2457,7 +2826,7 @@ public virtual Response ApplySlotConfigToProduction(CsmSlotEntity slotSwapEntity /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2499,7 +2868,7 @@ public virtual async Task> BackupAsync(WebAppBackupIn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2541,7 +2910,7 @@ public virtual Response Backup(WebAppBackupInfo info, Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2583,7 +2952,7 @@ public virtual async Task> UpdateApp /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2625,7 +2994,7 @@ public virtual Response UpdateApplicationSett /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2659,7 +3028,7 @@ public virtual async Task> GetApplic /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2693,7 +3062,7 @@ public virtual Response GetApplicationSetting /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2735,7 +3104,7 @@ public virtual async Task> UpdateAuthSettingsAsync(Si /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2777,7 +3146,7 @@ public virtual Response UpdateAuthSettings(SiteAuthSettings si /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2811,7 +3180,7 @@ public virtual async Task> GetAuthSettingsAsync(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2833,7 +3202,7 @@ public virtual Response GetAuthSettings(CancellationToken canc } /// - /// Description for Updates site's Authentication / Authorization settings for apps via the V2 format + /// Description for Gets site's Authentication / Authorization settings for apps via the V2 format /// /// /// Request Path @@ -2841,30 +3210,22 @@ public virtual Response GetAuthSettings(CancellationToken canc /// /// /// Operation Id - /// WebApps_UpdateAuthSettingsV2 + /// WebApps_GetAuthSettingsV2WithoutSecrets /// /// /// Default Api Version - /// 2021-02-01 - /// - /// - /// Resource - /// + /// 2023-12-01 /// /// /// - /// Auth settings associated with web app. /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAuthSettingsV2Async(SiteAuthSettingsV2 siteAuthSettingsV2, CancellationToken cancellationToken = default) + public virtual async Task> GetAuthSettingsV2WithoutSecretsAsync(CancellationToken cancellationToken = default) { - Argument.AssertNotNull(siteAuthSettingsV2, nameof(siteAuthSettingsV2)); - - using var scope = _webSiteWebAppsClientDiagnostics.CreateScope("WebSiteResource.UpdateAuthSettingsV2"); + using var scope = _webSiteWebAppsClientDiagnostics.CreateScope("WebSiteResource.GetAuthSettingsV2WithoutSecrets"); scope.Start(); try { - var response = await _webSiteWebAppsRestClient.UpdateAuthSettingsV2Async(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, siteAuthSettingsV2, cancellationToken).ConfigureAwait(false); + var response = await _webSiteWebAppsRestClient.GetAuthSettingsV2WithoutSecretsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -2875,7 +3236,7 @@ public virtual async Task> UpdateAuthSettingsV2Asyn } /// - /// Description for Updates site's Authentication / Authorization settings for apps via the V2 format + /// Description for Gets site's Authentication / Authorization settings for apps via the V2 format /// /// /// Request Path @@ -2883,30 +3244,22 @@ public virtual async Task> UpdateAuthSettingsV2Asyn /// /// /// Operation Id - /// WebApps_UpdateAuthSettingsV2 + /// WebApps_GetAuthSettingsV2WithoutSecrets /// /// /// Default Api Version - /// 2021-02-01 - /// - /// - /// Resource - /// + /// 2023-12-01 /// /// /// - /// Auth settings associated with web app. /// The cancellation token to use. - /// is null. - public virtual Response UpdateAuthSettingsV2(SiteAuthSettingsV2 siteAuthSettingsV2, CancellationToken cancellationToken = default) + public virtual Response GetAuthSettingsV2WithoutSecrets(CancellationToken cancellationToken = default) { - Argument.AssertNotNull(siteAuthSettingsV2, nameof(siteAuthSettingsV2)); - - using var scope = _webSiteWebAppsClientDiagnostics.CreateScope("WebSiteResource.UpdateAuthSettingsV2"); + using var scope = _webSiteWebAppsClientDiagnostics.CreateScope("WebSiteResource.GetAuthSettingsV2WithoutSecrets"); scope.Start(); try { - var response = _webSiteWebAppsRestClient.UpdateAuthSettingsV2(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, siteAuthSettingsV2, cancellationToken); + var response = _webSiteWebAppsRestClient.GetAuthSettingsV2WithoutSecrets(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); return response; } catch (Exception e) @@ -2917,11 +3270,95 @@ public virtual Response UpdateAuthSettingsV2(SiteAuthSetting } /// - /// Description for Gets site's Authentication / Authorization settings for apps via the V2 format + /// Description for Updates site's Authentication / Authorization settings for apps via the V2 format /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2 + /// + /// + /// Operation Id + /// WebApps_UpdateAuthSettingsV2 + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Auth settings associated with web app. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAuthSettingsV2Async(SiteAuthSettingsV2 siteAuthSettingsV2, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(siteAuthSettingsV2, nameof(siteAuthSettingsV2)); + + using var scope = _webSiteWebAppsClientDiagnostics.CreateScope("WebSiteResource.UpdateAuthSettingsV2"); + scope.Start(); + try + { + var response = await _webSiteWebAppsRestClient.UpdateAuthSettingsV2Async(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, siteAuthSettingsV2, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Updates site's Authentication / Authorization settings for apps via the V2 format + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2 + /// + /// + /// Operation Id + /// WebApps_UpdateAuthSettingsV2 + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Auth settings associated with web app. + /// The cancellation token to use. + /// is null. + public virtual Response UpdateAuthSettingsV2(SiteAuthSettingsV2 siteAuthSettingsV2, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(siteAuthSettingsV2, nameof(siteAuthSettingsV2)); + + using var scope = _webSiteWebAppsClientDiagnostics.CreateScope("WebSiteResource.UpdateAuthSettingsV2"); + scope.Start(); + try + { + var response = _webSiteWebAppsRestClient.UpdateAuthSettingsV2(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, siteAuthSettingsV2, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Gets site's Authentication / Authorization settings for apps via the V2 format + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2/list /// /// /// Operation Id @@ -2929,7 +3366,7 @@ public virtual Response UpdateAuthSettingsV2(SiteAuthSetting /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2963,7 +3400,7 @@ public virtual async Task> GetAuthSettingsV2Async(C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2997,7 +3434,7 @@ public virtual Response GetAuthSettingsV2(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3039,7 +3476,7 @@ public virtual async Task> UpdateAzureS /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3081,7 +3518,7 @@ public virtual Response UpdateAzureStorageAccoun /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3115,7 +3552,7 @@ public virtual async Task> GetAzureStor /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3149,7 +3586,7 @@ public virtual Response GetAzureStorageAccounts( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3191,7 +3628,7 @@ public virtual async Task> UpdateBackupConfigurationA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3233,7 +3670,7 @@ public virtual Response UpdateBackupConfiguration(WebAppBackup /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3271,7 +3708,7 @@ public virtual async Task DeleteBackupConfigurationAsync(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3309,7 +3746,7 @@ public virtual Response DeleteBackupConfiguration(CancellationToken cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3343,7 +3780,7 @@ public virtual async Task> GetBackupConfigurationAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3377,7 +3814,7 @@ public virtual Response GetBackupConfiguration(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3419,7 +3856,7 @@ public virtual async Task> UpdateConnection /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3461,7 +3898,7 @@ public virtual Response UpdateConnectionStrings(Conn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3495,7 +3932,7 @@ public virtual async Task> GetConnectionStr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3529,7 +3966,7 @@ public virtual Response GetConnectionStrings(Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3571,7 +4008,7 @@ public virtual async Task> UpdateMet /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3613,7 +4050,7 @@ public virtual Response UpdateMetadata(AppSer /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3647,7 +4084,7 @@ public virtual async Task> GetMetada /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3681,7 +4118,7 @@ public virtual Response GetMetadata(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3719,7 +4156,7 @@ public virtual async Task> GetPublishingCre /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3757,7 +4194,7 @@ public virtual ArmOperation GetPublishingCredentials(Wai /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3799,7 +4236,7 @@ public virtual async Task> UpdateSitePushSettingsAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3841,7 +4278,7 @@ public virtual Response UpdateSitePushSettings(WebAppPushSet /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3875,7 +4312,7 @@ public virtual async Task> GetSitePushSettingsAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3909,7 +4346,7 @@ public virtual Response GetSitePushSettings(CancellationToke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3947,7 +4384,7 @@ public virtual async Task> GetWebSiteContainerLogsAsync(Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3985,7 +4422,7 @@ public virtual Response GetWebSiteContainerLogs(CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4019,7 +4456,7 @@ public virtual async Task> GetContainerLogsZipAsync(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4040,6 +4477,194 @@ public virtual Response GetContainerLogsZip(CancellationToken cancellati } } + /// + /// List deployment statuses for an app (or deployment slot, if specified). + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deploymentStatus + /// + /// + /// Operation Id + /// WebApps_ListProductionSiteDeploymentStatuses + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetProductionSiteDeploymentStatusesAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _webSiteWebAppsRestClient.CreateListProductionSiteDeploymentStatusesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _webSiteWebAppsRestClient.CreateListProductionSiteDeploymentStatusesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => CsmDeploymentStatus.DeserializeCsmDeploymentStatus(e), _webSiteWebAppsClientDiagnostics, Pipeline, "WebSiteResource.GetProductionSiteDeploymentStatuses", "value", "nextLink", cancellationToken); + } + + /// + /// List deployment statuses for an app (or deployment slot, if specified). + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deploymentStatus + /// + /// + /// Operation Id + /// WebApps_ListProductionSiteDeploymentStatuses + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetProductionSiteDeploymentStatuses(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _webSiteWebAppsRestClient.CreateListProductionSiteDeploymentStatusesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _webSiteWebAppsRestClient.CreateListProductionSiteDeploymentStatusesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => CsmDeploymentStatus.DeserializeCsmDeploymentStatus(e), _webSiteWebAppsClientDiagnostics, Pipeline, "WebSiteResource.GetProductionSiteDeploymentStatuses", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the deployment status for an app (or deployment slot, if specified). + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deploymentStatus/{deploymentStatusId} + /// + /// + /// Operation Id + /// WebApps_GetProductionSiteDeploymentStatus + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// GUID of the deployment operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetProductionSiteDeploymentStatusAsync(WaitUntil waitUntil, string deploymentStatusId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(deploymentStatusId, nameof(deploymentStatusId)); + + using var scope = _webSiteWebAppsClientDiagnostics.CreateScope("WebSiteResource.GetProductionSiteDeploymentStatus"); + scope.Start(); + try + { + var response = await _webSiteWebAppsRestClient.GetProductionSiteDeploymentStatusAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, deploymentStatusId, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(new CsmDeploymentStatusOperationSource(), _webSiteWebAppsClientDiagnostics, Pipeline, _webSiteWebAppsRestClient.CreateGetProductionSiteDeploymentStatusRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, deploymentStatusId).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the deployment status for an app (or deployment slot, if specified). + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deploymentStatus/{deploymentStatusId} + /// + /// + /// Operation Id + /// WebApps_GetProductionSiteDeploymentStatus + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// GUID of the deployment operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual ArmOperation GetProductionSiteDeploymentStatus(WaitUntil waitUntil, string deploymentStatusId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(deploymentStatusId, nameof(deploymentStatusId)); + + using var scope = _webSiteWebAppsClientDiagnostics.CreateScope("WebSiteResource.GetProductionSiteDeploymentStatus"); + scope.Start(); + try + { + var response = _webSiteWebAppsRestClient.GetProductionSiteDeploymentStatus(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, deploymentStatusId, cancellationToken); + var operation = new AppServiceArmOperation(new CsmDeploymentStatusOperationSource(), _webSiteWebAppsClientDiagnostics, Pipeline, _webSiteWebAppsRestClient.CreateGetProductionSiteDeploymentStatusRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, deploymentStatusId).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup + /// + /// + /// Operation Id + /// WebApps_DiscoverBackup + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. + /// The cancellation token to use. + /// is null. + public virtual async Task> DiscoverBackupAsync(RestoreRequestInfo info, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(info, nameof(info)); + + using var scope = _webSiteWebAppsClientDiagnostics.CreateScope("WebSiteResource.DiscoverBackup"); + scope.Start(); + try + { + var response = await _webSiteWebAppsRestClient.DiscoverBackupAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, info, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup. /// @@ -4053,7 +4678,7 @@ public virtual Response GetContainerLogsZip(CancellationToken cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4061,18 +4686,124 @@ public virtual Response GetContainerLogsZip(CancellationToken cancellati /// /// /// - /// A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. + /// A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. + /// The cancellation token to use. + /// is null. + public virtual Response DiscoverBackup(RestoreRequestInfo info, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(info, nameof(info)); + + using var scope = _webSiteWebAppsClientDiagnostics.CreateScope("WebSiteResource.DiscoverBackup"); + scope.Start(); + try + { + var response = _webSiteWebAppsRestClient.DiscoverBackup(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, info, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Invoke onedeploy status API /api/deployments and gets the deployment status for the site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/onedeploy + /// + /// + /// Operation Id + /// WebApps_GetOneDeployStatus + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetOneDeployStatusAsync(CancellationToken cancellationToken = default) + { + using var scope = _webSiteWebAppsClientDiagnostics.CreateScope("WebSiteResource.GetOneDeployStatus"); + scope.Start(); + try + { + var response = await _webSiteWebAppsRestClient.GetOneDeployStatusAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Invoke onedeploy status API /api/deployments and gets the deployment status for the site + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/onedeploy + /// + /// + /// Operation Id + /// WebApps_GetOneDeployStatus + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetOneDeployStatus(CancellationToken cancellationToken = default) + { + using var scope = _webSiteWebAppsClientDiagnostics.CreateScope("WebSiteResource.GetOneDeployStatus"); + scope.Start(); + try + { + var response = _webSiteWebAppsRestClient.GetOneDeployStatus(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Invoke the OneDeploy publish web app extension. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/onedeploy + /// + /// + /// Operation Id + /// WebApps_CreateOneDeployOperation + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// /// The cancellation token to use. - /// is null. - public virtual async Task> DiscoverBackupAsync(RestoreRequestInfo info, CancellationToken cancellationToken = default) + public virtual async Task> CreateOneDeployOperationAsync(CancellationToken cancellationToken = default) { - Argument.AssertNotNull(info, nameof(info)); - - using var scope = _webSiteWebAppsClientDiagnostics.CreateScope("WebSiteResource.DiscoverBackup"); + using var scope = _siteExtensionWebAppsClientDiagnostics.CreateScope("WebSiteResource.CreateOneDeployOperation"); scope.Start(); try { - var response = await _webSiteWebAppsRestClient.DiscoverBackupAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, info, cancellationToken).ConfigureAwait(false); + var response = await _siteExtensionWebAppsRestClient.CreateOneDeployOperationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -4083,38 +4814,34 @@ public virtual async Task> DiscoverBackupAsync(Rest } /// - /// Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup. + /// Description for Invoke the OneDeploy publish web app extension. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/onedeploy /// /// /// Operation Id - /// WebApps_DiscoverBackup + /// WebApps_CreateOneDeployOperation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource - /// + /// /// /// /// - /// A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. /// The cancellation token to use. - /// is null. - public virtual Response DiscoverBackup(RestoreRequestInfo info, CancellationToken cancellationToken = default) + public virtual Response CreateOneDeployOperation(CancellationToken cancellationToken = default) { - Argument.AssertNotNull(info, nameof(info)); - - using var scope = _webSiteWebAppsClientDiagnostics.CreateScope("WebSiteResource.DiscoverBackup"); + using var scope = _siteExtensionWebAppsClientDiagnostics.CreateScope("WebSiteResource.CreateOneDeployOperation"); scope.Start(); try { - var response = _webSiteWebAppsRestClient.DiscoverBackup(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, info, cancellationToken); + var response = _siteExtensionWebAppsRestClient.CreateOneDeployOperation(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); return response; } catch (Exception e) @@ -4137,7 +4864,7 @@ public virtual Response DiscoverBackup(RestoreRequestInfo in /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4171,7 +4898,7 @@ public virtual async Task> GetFunctionsAdminTokenAsync(Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4205,7 +4932,7 @@ public virtual Response GetFunctionsAdminToken(CancellationToken cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4239,7 +4966,7 @@ public virtual async Task> GetHostKeysAsync(Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4273,7 +5000,7 @@ public virtual Response GetHostKeys(CancellationToken cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4307,7 +5034,7 @@ public virtual async Task GetSyncStatusAsync(CancellationToken cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4341,7 +5068,7 @@ public virtual Response GetSyncStatus(CancellationToken cancellationToken = defa /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4375,7 +5102,7 @@ public virtual async Task SyncFunctionsAsync(CancellationToken cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4409,7 +5136,7 @@ public virtual Response SyncFunctions(CancellationToken cancellationToken = defa /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4452,7 +5179,7 @@ public virtual async Task> CreateOrUpdateHostSecretAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4495,7 +5222,7 @@ public virtual Response CreateOrUpdateHostSecret(string keyType, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4536,7 +5263,7 @@ public virtual async Task DeleteHostSecretAsync(string keyType, string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4577,7 +5304,7 @@ public virtual Response DeleteHostSecret(string keyType, string keyName, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4606,7 +5333,7 @@ public virtual AsyncPageable GetHybridConnectionsAsync(Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4635,7 +5362,7 @@ public virtual Pageable GetHybridConnections(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4673,7 +5400,7 @@ public virtual async Task> IsCloneableAsync(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4711,7 +5438,7 @@ public virtual Response IsCloneable(CancellationToken cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4749,7 +5476,7 @@ public virtual async Task> GetSyncFunctionTriggersAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4787,7 +5514,7 @@ public virtual Response GetSyncFunctionTriggers(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4835,7 +5562,7 @@ public virtual async Task> MigrateStorageAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4883,7 +5610,7 @@ public virtual ArmOperation MigrateStorage(WaitUntil wai /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4929,7 +5656,7 @@ public virtual async Task> MigrateMySqlAsync(W /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4975,7 +5702,7 @@ public virtual ArmOperation MigrateMySql(WaitUntil waitUnti /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5009,7 +5736,7 @@ public virtual async Task> GetMigrateMySqlS /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5043,7 +5770,7 @@ public virtual Response GetMigrateMySqlStatus(Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5082,7 +5809,7 @@ public virtual async Task> GetNetworkFeaturesAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5121,7 +5848,7 @@ public virtual Response GetNetworkFeatures(string view, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5151,7 +5878,7 @@ public virtual AsyncPageable GetNetworkTraceOperationAsync(s /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5181,7 +5908,7 @@ public virtual Pageable GetNetworkTraceOperation(string oper /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5218,7 +5945,7 @@ public virtual async Task> StartWebSiteNetworkTraceAsync(int? d /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5255,7 +5982,7 @@ public virtual Response StartWebSiteNetworkTrace(int? durationInSeconds /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5296,7 +6023,7 @@ public virtual async Task>> StartWebSiteN /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5337,7 +6064,7 @@ public virtual ArmOperation> StartWebSiteNetworkTraceO /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5371,7 +6098,7 @@ public virtual async Task StopWebSiteNetworkTraceAsync(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5405,7 +6132,7 @@ public virtual Response StopWebSiteNetworkTrace(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5435,7 +6162,7 @@ public virtual AsyncPageable GetNetworkTracesAsync(string op /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5465,7 +6192,7 @@ public virtual Pageable GetNetworkTraces(string operationId, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5495,7 +6222,7 @@ public virtual AsyncPageable GetNetworkTraceOperationV2Async /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5525,7 +6252,7 @@ public virtual Pageable GetNetworkTraceOperationV2(string op /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5555,7 +6282,7 @@ public virtual AsyncPageable GetNetworkTracesV2Async(string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -5585,7 +6312,7 @@ public virtual Pageable GetNetworkTracesV2(string operationI /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5623,7 +6350,7 @@ public virtual async Task GenerateNewSitePublishingPasswordAsync(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5661,7 +6388,7 @@ public virtual Response GenerateNewSitePublishingPassword(CancellationToken canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5692,7 +6419,7 @@ public virtual AsyncPageable GetPerfMonCountersAsync(string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5723,7 +6450,7 @@ public virtual Pageable GetPerfMonCounters(string filter = /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5761,7 +6488,7 @@ public virtual async Task> GetSitePhpErrorLogFlagA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5799,7 +6526,7 @@ public virtual Response GetSitePhpErrorLogFlag(Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5828,7 +6555,7 @@ public virtual AsyncPageable GetPrivateLinkRe /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5857,7 +6584,7 @@ public virtual Pageable GetPrivateLinkResourc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5899,7 +6626,7 @@ public virtual async Task> GetPublishingProfileXmlWithSecretsAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5941,7 +6668,7 @@ public virtual Response GetPublishingProfileXmlWithSecrets(CsmPublishing /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5979,7 +6706,7 @@ public virtual async Task ResetProductionSlotConfigAsync(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6017,7 +6744,7 @@ public virtual Response ResetProductionSlotConfig(CancellationToken cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6057,7 +6784,7 @@ public virtual async Task RestartAsync(bool? softRestart = null, bool? /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6097,7 +6824,7 @@ public virtual Response Restart(bool? softRestart = null, bool? synchronous = nu /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6143,7 +6870,7 @@ public virtual async Task RestoreFromBackupBlobAsync(WaitUntil wai /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6189,7 +6916,7 @@ public virtual ArmOperation RestoreFromBackupBlob(WaitUntil waitUntil, RestoreRe /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6235,7 +6962,7 @@ public virtual async Task RestoreFromDeletedAppAsync(WaitUntil wai /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6281,7 +7008,7 @@ public virtual ArmOperation RestoreFromDeletedApp(WaitUntil waitUntil, DeletedAp /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6327,7 +7054,7 @@ public virtual async Task RestoreSnapshotAsync(WaitUntil waitUntil /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6373,7 +7100,7 @@ public virtual ArmOperation RestoreSnapshot(WaitUntil waitUntil, SnapshotRestore /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6407,7 +7134,7 @@ public virtual AsyncPageable GetSlotDifferencesFromProductionAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6441,7 +7168,7 @@ public virtual Pageable GetSlotDifferencesFromProduction(CsmSlot /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6487,7 +7214,7 @@ public virtual async Task SwapSlotWithProductionAsync(WaitUntil wa /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6533,7 +7260,7 @@ public virtual ArmOperation SwapSlotWithProduction(WaitUntil waitUntil, CsmSlotE /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6563,7 +7290,7 @@ public virtual AsyncPageable GetSnapshotsAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6593,7 +7320,7 @@ public virtual Pageable GetSnapshots(CancellationToken cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6623,7 +7350,7 @@ public virtual AsyncPageable GetSnapshotsFromDRSecondaryAsync(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6653,7 +7380,7 @@ public virtual Pageable GetSnapshotsFromDRSecondary(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6691,7 +7418,7 @@ public virtual async Task StartAsync(CancellationToken cancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6729,7 +7456,7 @@ public virtual Response Start(CancellationToken cancellationToken = default) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6774,7 +7501,7 @@ public virtual async Task>> StartNetworkT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6819,7 +7546,7 @@ public virtual ArmOperation> StartNetworkTrace(WaitUnt /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6857,7 +7584,7 @@ public virtual async Task StopAsync(CancellationToken cancellationToke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6895,7 +7622,7 @@ public virtual Response Stop(CancellationToken cancellationToken = default) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6933,7 +7660,7 @@ public virtual async Task StopNetworkTraceAsync(CancellationToken canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6971,7 +7698,7 @@ public virtual Response StopNetworkTrace(CancellationToken cancellationToken = d /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -7009,7 +7736,7 @@ public virtual async Task SyncRepositoryAsync(CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -7047,7 +7774,7 @@ public virtual Response SyncRepository(CancellationToken cancellationToken = def /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -7085,7 +7812,7 @@ public virtual async Task SyncFunctionTriggersAsync(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -7123,7 +7850,7 @@ public virtual Response SyncFunctionTriggers(CancellationToken cancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -7154,7 +7881,7 @@ public virtual AsyncPageable GetUsagesAsync(string filter = null, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -7171,5 +7898,323 @@ public virtual Pageable GetUsages(string filter = null, Cancellat HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _webSiteWebAppsRestClient.CreateListUsagesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => CsmUsageQuota.DeserializeCsmUsageQuota(e), _webSiteWebAppsClientDiagnostics, Pipeline, "WebSiteResource.GetUsages", "value", "nextLink", cancellationToken); } + + /// + /// Description for Creates the artifacts for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployWorkflowArtifacts + /// + /// + /// Operation Id + /// WebApps_DeployWorkflowArtifacts + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Application settings and files of the workflow. + /// The cancellation token to use. + public virtual async Task DeployWorkflowArtifactsAsync(WorkflowArtifacts workflowArtifacts = null, CancellationToken cancellationToken = default) + { + using var scope = _webSiteWebAppsClientDiagnostics.CreateScope("WebSiteResource.DeployWorkflowArtifacts"); + scope.Start(); + try + { + var response = await _webSiteWebAppsRestClient.DeployWorkflowArtifactsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowArtifacts, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Creates the artifacts for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployWorkflowArtifacts + /// + /// + /// Operation Id + /// WebApps_DeployWorkflowArtifacts + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Application settings and files of the workflow. + /// The cancellation token to use. + public virtual Response DeployWorkflowArtifacts(WorkflowArtifacts workflowArtifacts = null, CancellationToken cancellationToken = default) + { + using var scope = _webSiteWebAppsClientDiagnostics.CreateScope("WebSiteResource.DeployWorkflowArtifacts"); + scope.Start(); + try + { + var response = _webSiteWebAppsRestClient.DeployWorkflowArtifacts(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowArtifacts, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists logic app's connections for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listWorkflowsConnections + /// + /// + /// Operation Id + /// WebApps_ListWorkflowsConnections + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetWorkflowsConnectionsAsync(CancellationToken cancellationToken = default) + { + using var scope = _webSiteWebAppsClientDiagnostics.CreateScope("WebSiteResource.GetWorkflowsConnections"); + scope.Start(); + try + { + var response = await _webSiteWebAppsRestClient.ListWorkflowsConnectionsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists logic app's connections for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listWorkflowsConnections + /// + /// + /// Operation Id + /// WebApps_ListWorkflowsConnections + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetWorkflowsConnections(CancellationToken cancellationToken = default) + { + using var scope = _webSiteWebAppsClientDiagnostics.CreateScope("WebSiteResource.GetWorkflowsConnections"); + scope.Start(); + try + { + var response = _webSiteWebAppsRestClient.ListWorkflowsConnections(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Regenerates the callback URL access key for request triggers. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/regenerateAccessKey + /// + /// + /// Operation Id + /// Workflows_RegenerateAccessKey + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// The workflow name. + /// The access key type. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task RegenerateAccessKeyWorkflowAsync(string workflowName, WorkflowRegenerateActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _workflowsClientDiagnostics.CreateScope("WebSiteResource.RegenerateAccessKeyWorkflow"); + scope.Start(); + try + { + var response = await _workflowsRestClient.RegenerateAccessKeyAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Regenerates the callback URL access key for request triggers. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/regenerateAccessKey + /// + /// + /// Operation Id + /// Workflows_RegenerateAccessKey + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// The workflow name. + /// The access key type. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual Response RegenerateAccessKeyWorkflow(string workflowName, WorkflowRegenerateActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _workflowsClientDiagnostics.CreateScope("WebSiteResource.RegenerateAccessKeyWorkflow"); + scope.Start(); + try + { + var response = _workflowsRestClient.RegenerateAccessKey(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Validates the workflow definition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/validate + /// + /// + /// Operation Id + /// Workflows_Validate + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// The workflow name. + /// The workflow. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task ValidateWorkflowAsync(string workflowName, WorkflowData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _workflowsClientDiagnostics.CreateScope("WebSiteResource.ValidateWorkflow"); + scope.Start(); + try + { + var response = await _workflowsRestClient.ValidateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, data, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Validates the workflow definition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/validate + /// + /// + /// Operation Id + /// Workflows_Validate + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// The workflow name. + /// The workflow. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual Response ValidateWorkflow(string workflowName, WorkflowData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workflowName, nameof(workflowName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _workflowsClientDiagnostics.CreateScope("WebSiteResource.ValidateWorkflow"); + scope.Start(); + try + { + var response = _workflowsRestClient.Validate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workflowName, data, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteResourceHealthMetadataResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteResourceHealthMetadataResource.cs index cbe9bb2ab4793..71234e52cbea8 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteResourceHealthMetadataResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteResourceHealthMetadataResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotCollection.cs index 1cfe819efb3b6..56169d1bf83f1 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string slot, C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string slot, CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string slot, CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string slot, CancellationToken cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigAppSettingCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigAppSettingCollection.cs index 42ee47c22561c..b5b7dce56e576 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigAppSettingCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigAppSettingCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string appSetti /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string appSettingKey, Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string appSettingKey, CancellationToken can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigAppSettingResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigAppSettingResource.cs index 2d7892495e519..e4f64b80d7ebd 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigAppSettingResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigAppSettingResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigConnectionStringCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigConnectionStringCollection.cs index 1eea86aafc791..e513f77349810 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigConnectionStringCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigConnectionStringCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string co /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string connectionStringKey /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string connectionStringKey, CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigConnectionStringResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigConnectionStringResource.cs index c8848401df843..82b8576f94cdd 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigConnectionStringResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigConnectionStringResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigResource.cs index 0a0481fa16a29..63f2757badc9f 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigResource.cs @@ -115,7 +115,7 @@ public virtual SiteSlotConfigSnapshotCollection GetSiteSlotConfigSnapshots() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -146,7 +146,7 @@ public virtual async Task> GetSiteSlotC /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -177,7 +177,7 @@ public virtual Response GetSiteSlotConfigSnapsho /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -217,7 +217,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -299,7 +299,7 @@ public virtual async Task> UpdateAsync(SiteC /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -341,7 +341,7 @@ public virtual Response Update(SiteConfigData data, C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -389,7 +389,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -437,7 +437,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -467,7 +467,7 @@ public virtual AsyncPageable GetConfigurationSnap /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotContinuousWebJobCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotContinuousWebJobCollection.cs index 28a5ac1195302..1333a42127f60 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotContinuousWebJobCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotContinuousWebJobCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string webJobNa /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string webJobName, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string webJobName, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotContinuousWebJobResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotContinuousWebJobResource.cs index 0e9760bbd99b5..0b6073fcfcd5b 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotContinuousWebJobResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotContinuousWebJobResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -308,7 +308,7 @@ public virtual async Task StartContinuousWebJobSlotAsync(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -346,7 +346,7 @@ public virtual Response StartContinuousWebJobSlot(CancellationToken cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -384,7 +384,7 @@ public virtual async Task StopContinuousWebJobSlotAsync(CancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotExtensionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotExtensionCollection.cs index b370bcbcb5699..c54e6b5dba8d1 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotExtensionCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotExtensionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -111,7 +111,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -158,7 +158,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -203,7 +203,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -248,7 +248,7 @@ public virtual Response Get(string siteExtensionId /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -278,7 +278,7 @@ public virtual AsyncPageable GetAllAsync(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -308,7 +308,7 @@ public virtual Pageable GetAll(CancellationToken c /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual async Task> ExistsAsync(string siteExtensionId, Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -394,7 +394,7 @@ public virtual Response Exists(string siteExtensionId, CancellationToken c /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -439,7 +439,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotExtensionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotExtensionResource.cs index a0511269092a4..c233f08d5552e 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotExtensionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotExtensionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotFtpPublishingCredentialsPolicyResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotFtpPublishingCredentialsPolicyResource.cs index 392c598307d4e..2bf5bc981c946 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotFtpPublishingCredentialsPolicyResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotFtpPublishingCredentialsPolicyResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotHybridConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotHybridConnectionCollection.cs index 12598197f5c49..29c858ba1161f 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotHybridConnectionCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotHybridConnectionCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task> Cre /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string entityNa /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -296,7 +296,7 @@ public virtual async Task> ExistsAsync(string entityName, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -339,7 +339,7 @@ public virtual Response Exists(string entityName, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -384,7 +384,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotHybridConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotHybridConnectionResource.cs index 4ca2c222671e6..d5338e77b6642 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotHybridConnectionResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotHybridConnectionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPremierAddOnCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPremierAddOnCollection.cs index 0053469719658..e153c9e213b97 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPremierAddOnCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPremierAddOnCollection.cs @@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string premierAddOn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -296,7 +296,7 @@ public virtual async Task> ExistsAsync(string premierAddOnName, C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -339,7 +339,7 @@ public virtual Response Exists(string premierAddOnName, CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -384,7 +384,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPremierAddOnResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPremierAddOnResource.cs index 838ba79a92f51..859402b962c46 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPremierAddOnResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPremierAddOnResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPrivateAccessResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPrivateAccessResource.cs index 4952b42e0618d..0cd66e680fc25 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPrivateAccessResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPrivateAccessResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task> Create /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPublicCertificateCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPublicCertificateCollection.cs index 74c80c3a66095..a2417a8c9eac5 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPublicCertificateCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPublicCertificateCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> Cr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string publicC /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string publicCertificateNa /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string publicCertificateName, CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPublicCertificateResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPublicCertificateResource.cs index c9b63a3eecc06..466e93446fad7 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPublicCertificateResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPublicCertificateResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task> Up /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotResource.cs index 1b4684cd83437..cc334f17b16b1 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotResource.cs @@ -112,7 +112,7 @@ public virtual SiteSlotDetectorCollection GetSiteSlotDetectors() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -146,7 +146,7 @@ public virtual async Task> GetSiteSlotDetecto /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -187,7 +187,7 @@ public virtual SiteSlotPrivateEndpointConnectionCollection GetSiteSlotPrivateEnd /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -218,7 +218,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual SiteSlotHybridConnectionNamespaceRelayCollection GetSiteSlotHybri /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -327,7 +327,7 @@ public virtual SiteSlotVirtualNetworkConnectionCollection GetSiteSlotVirtualNetw /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual SiteSlotDiagnosticCollection GetSiteSlotDiagnostics() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -427,7 +427,7 @@ public virtual async Task> GetSiteSlotDiagn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -472,7 +472,7 @@ public virtual SiteSlotBackupCollection GetSiteSlotBackups() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -503,7 +503,7 @@ public virtual async Task> GetSiteSlotBackupAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -555,7 +555,7 @@ public virtual WebSiteSlotConfigAppSettingCollection GetWebSiteSlotConfigAppSett /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -586,7 +586,7 @@ public virtual async Task> GetWebS /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -624,7 +624,7 @@ public virtual WebSiteSlotConfigConnectionStringCollection GetWebSiteSlotConfigC /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -655,7 +655,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -707,7 +707,7 @@ public virtual WebSiteSlotContinuousWebJobCollection GetWebSiteSlotContinuousWeb /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -738,7 +738,7 @@ public virtual async Task> GetWebS /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -776,7 +776,7 @@ public virtual SiteSlotDeploymentCollection GetSiteSlotDeployments() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -807,7 +807,7 @@ public virtual async Task> GetSiteSlotDeplo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -845,7 +845,7 @@ public virtual SiteSlotDomainOwnershipIdentifierCollection GetSiteSlotDomainOwne /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -876,7 +876,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -921,7 +921,7 @@ public virtual SiteSlotFunctionCollection GetSiteSlotFunctions() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -952,7 +952,7 @@ public virtual async Task> GetSiteSlotFunctio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -990,7 +990,7 @@ public virtual SiteSlotHostNameBindingCollection GetSiteSlotHostNameBindings() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1021,7 +1021,7 @@ public virtual async Task> GetSiteSlot /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1059,7 +1059,7 @@ public virtual WebSiteSlotHybridConnectionCollection GetWebSiteSlotHybridConnect /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1090,7 +1090,7 @@ public virtual async Task> GetWebS /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1128,7 +1128,7 @@ public virtual SiteSlotInstanceCollection GetSiteSlotInstances() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1159,7 +1159,7 @@ public virtual async Task> GetSiteSlotInstanc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1197,7 +1197,7 @@ public virtual SiteSlotProcessCollection GetSiteSlotProcesses() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1228,7 +1228,7 @@ public virtual async Task> GetSiteSlotProcessA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1273,7 +1273,7 @@ public virtual WebSiteSlotPremierAddOnCollection GetWebSiteSlotPremierAddOns() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1304,7 +1304,7 @@ public virtual async Task> GetWebSiteS /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1349,7 +1349,7 @@ public virtual WebSiteSlotPublicCertificateCollection GetWebSiteSlotPublicCertif /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1380,7 +1380,7 @@ public virtual async Task> GetWeb /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1398,6 +1398,75 @@ public virtual Response GetWebSiteSlotPubl return GetWebSiteSlotPublicCertificates().Get(publicCertificateName, cancellationToken); } + /// Gets a collection of SiteSlotSiteContainerResources in the WebSiteSlot. + /// An object representing collection of SiteSlotSiteContainerResources and their operations over a SiteSlotSiteContainerResource. + public virtual SiteSlotSiteContainerCollection GetSiteSlotSiteContainers() + { + return GetCachedClient(client => new SiteSlotSiteContainerCollection(client, Id)); + } + + /// + /// Gets a site container of a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainerSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Site Container Name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetSiteSlotSiteContainerAsync(string containerName, CancellationToken cancellationToken = default) + { + return await GetSiteSlotSiteContainers().GetAsync(containerName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a site container of a site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName} + /// + /// + /// Operation Id + /// WebApps_GetSiteContainerSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Site Container Name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetSiteSlotSiteContainer(string containerName, CancellationToken cancellationToken = default) + { + return GetSiteSlotSiteContainers().Get(containerName, cancellationToken); + } + /// Gets a collection of WebSiteSlotExtensionResources in the WebSiteSlot. /// An object representing collection of WebSiteSlotExtensionResources and their operations over a WebSiteSlotExtensionResource. public virtual WebSiteSlotExtensionCollection GetWebSiteSlotExtensions() @@ -1418,7 +1487,7 @@ public virtual WebSiteSlotExtensionCollection GetWebSiteSlotExtensions() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1449,7 +1518,7 @@ public virtual async Task> GetWebSiteSlot /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1494,7 +1563,7 @@ public virtual NetworkFeatureCollection GetNetworkFeatures() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1525,7 +1594,7 @@ public virtual async Task> GetNetworkFeatureAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1570,7 +1639,7 @@ public virtual WebSiteSlotTriggeredWebJobCollection GetWebSiteSlotTriggeredWebJo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1601,7 +1670,7 @@ public virtual async Task> GetWebSi /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1639,7 +1708,7 @@ public virtual WebSiteSlotWebJobCollection GetWebSiteSlotWebJobs() /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1670,7 +1739,7 @@ public virtual async Task> GetWebSiteSlotWeb /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1688,6 +1757,75 @@ public virtual Response GetWebSiteSlotWebJob(string w return GetWebSiteSlotWebJobs().Get(webJobName, cancellationToken); } + /// Gets a collection of SiteSlotWorkflowResources in the WebSiteSlot. + /// An object representing collection of SiteSlotWorkflowResources and their operations over a SiteSlotWorkflowResource. + public virtual SiteSlotWorkflowCollection GetSiteSlotWorkflows() + { + return GetCachedClient(client => new SiteSlotWorkflowCollection(client, Id)); + } + + /// + /// Get workflow information by its ID for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetInstanceWorkflowSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetSiteSlotWorkflowAsync(string workflowName, CancellationToken cancellationToken = default) + { + return await GetSiteSlotWorkflows().GetAsync(workflowName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get workflow information by its ID for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/workflows/{workflowName} + /// + /// + /// Operation Id + /// WebApps_GetInstanceWorkflowSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workflow name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetSiteSlotWorkflow(string workflowName, CancellationToken cancellationToken = default) + { + return GetSiteSlotWorkflows().Get(workflowName, cancellationToken); + } + /// /// Description for Gets the details of a web, mobile, or API app. /// @@ -1701,7 +1839,7 @@ public virtual Response GetWebSiteSlotWebJob(string w /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1741,7 +1879,7 @@ public virtual async Task> GetAsync(CancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1781,7 +1919,7 @@ public virtual Response Get(CancellationToken cancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1827,7 +1965,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? d /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1873,7 +2011,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? deleteMetrics = nu /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1915,7 +2053,7 @@ public virtual async Task> UpdateAsync(SitePatchIn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1957,7 +2095,7 @@ public virtual Response Update(SitePatchInfo info, Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -1996,7 +2134,7 @@ public virtual async Task> AnalyzeCustomH /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2035,7 +2173,7 @@ public virtual Response AnalyzeCustomHostnameSlot( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2077,7 +2215,7 @@ public virtual async Task ApplySlotConfigurationSlotAsync(CsmSlotEntit /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2119,7 +2257,7 @@ public virtual Response ApplySlotConfigurationSlot(CsmSlotEntity slotSwapEntity, /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2161,7 +2299,7 @@ public virtual async Task> BackupSlotAsync(WebAppBack /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2203,7 +2341,7 @@ public virtual Response BackupSlot(WebAppBackupInfo info, Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2245,7 +2383,7 @@ public virtual async Task> UpdateApp /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2287,7 +2425,7 @@ public virtual Response UpdateApplicationSett /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2321,7 +2459,7 @@ public virtual async Task> GetApplic /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2355,7 +2493,7 @@ public virtual Response GetApplicationSetting /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2397,7 +2535,7 @@ public virtual async Task> UpdateAuthSettingsSlotAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2439,7 +2577,7 @@ public virtual Response UpdateAuthSettingsSlot(SiteAuthSetting /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2473,7 +2611,7 @@ public virtual async Task> GetAuthSettingsSlotAsync(C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2494,6 +2632,74 @@ public virtual Response GetAuthSettingsSlot(CancellationToken } } + /// + /// Gets site's Authentication / Authorization settings for apps via the V2 format + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2 + /// + /// + /// Operation Id + /// WebApps_GetAuthSettingsV2WithoutSecretsSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAuthSettingsV2WithoutSecretsSlotAsync(CancellationToken cancellationToken = default) + { + using var scope = _webSiteSlotWebAppsClientDiagnostics.CreateScope("WebSiteSlotResource.GetAuthSettingsV2WithoutSecretsSlot"); + scope.Start(); + try + { + var response = await _webSiteSlotWebAppsRestClient.GetAuthSettingsV2WithoutSecretsSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets site's Authentication / Authorization settings for apps via the V2 format + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2 + /// + /// + /// Operation Id + /// WebApps_GetAuthSettingsV2WithoutSecretsSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetAuthSettingsV2WithoutSecretsSlot(CancellationToken cancellationToken = default) + { + using var scope = _webSiteSlotWebAppsClientDiagnostics.CreateScope("WebSiteSlotResource.GetAuthSettingsV2WithoutSecretsSlot"); + scope.Start(); + try + { + var response = _webSiteSlotWebAppsRestClient.GetAuthSettingsV2WithoutSecretsSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Description for Updates site's Authentication / Authorization settings for apps via the V2 format /// @@ -2507,7 +2713,7 @@ public virtual Response GetAuthSettingsSlot(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2549,7 +2755,7 @@ public virtual async Task> UpdateAuthSettingsV2Slot /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2591,7 +2797,7 @@ public virtual Response UpdateAuthSettingsV2Slot(SiteAuthSet /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2625,7 +2831,7 @@ public virtual async Task> GetAuthSettingsV2SlotAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2659,7 +2865,7 @@ public virtual Response GetAuthSettingsV2Slot(CancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2701,7 +2907,7 @@ public virtual async Task> UpdateAzureS /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2743,7 +2949,7 @@ public virtual Response UpdateAzureStorageAccoun /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2777,7 +2983,7 @@ public virtual async Task> GetAzureStor /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -2811,7 +3017,7 @@ public virtual Response GetAzureStorageAccountsS /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2853,7 +3059,7 @@ public virtual async Task> UpdateBackupConfigurationS /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2895,7 +3101,7 @@ public virtual Response UpdateBackupConfigurationSlot(WebAppBa /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2933,7 +3139,7 @@ public virtual async Task DeleteBackupConfigurationSlotAsync(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -2971,7 +3177,7 @@ public virtual Response DeleteBackupConfigurationSlot(CancellationToken cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3005,7 +3211,7 @@ public virtual async Task> GetBackupConfigurationSlot /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3039,7 +3245,7 @@ public virtual Response GetBackupConfigurationSlot(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3081,7 +3287,7 @@ public virtual async Task> UpdateConnection /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3123,7 +3329,7 @@ public virtual Response UpdateConnectionStringsSlot( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3157,7 +3363,7 @@ public virtual async Task> GetConnectionStr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3191,7 +3397,7 @@ public virtual Response GetConnectionStringsSlot(Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3233,7 +3439,7 @@ public virtual async Task> UpdateMet /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3275,7 +3481,7 @@ public virtual Response UpdateMetadataSlot(Ap /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3309,7 +3515,7 @@ public virtual async Task> GetMetada /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3343,7 +3549,7 @@ public virtual Response GetMetadataSlot(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3381,7 +3587,7 @@ public virtual async Task> GetPublishingCre /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3419,7 +3625,7 @@ public virtual ArmOperation GetPublishingCredentialsSlot /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3461,7 +3667,7 @@ public virtual async Task> UpdateSitePushSettingsSl /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3503,7 +3709,7 @@ public virtual Response UpdateSitePushSettingsSlot(WebAppPus /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3537,7 +3743,7 @@ public virtual async Task> GetSitePushSettingsSlotA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3571,7 +3777,7 @@ public virtual Response GetSitePushSettingsSlot(Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3609,7 +3815,7 @@ public virtual async Task> GetWebSiteContainerLogsSlotAsync(Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3647,7 +3853,7 @@ public virtual Response GetWebSiteContainerLogsSlot(CancellationToken ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3681,7 +3887,7 @@ public virtual async Task> GetContainerLogsZipSlotAsync(Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3702,6 +3908,152 @@ public virtual Response GetContainerLogsZipSlot(CancellationToken cancel } } + /// + /// List deployment statuses for an app (or deployment slot, if specified). + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deploymentStatus + /// + /// + /// Operation Id + /// WebApps_ListSlotSiteDeploymentStatusesSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetSlotSiteDeploymentStatusesSlotAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _webSiteSlotWebAppsRestClient.CreateListSlotSiteDeploymentStatusesSlotRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _webSiteSlotWebAppsRestClient.CreateListSlotSiteDeploymentStatusesSlotNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => CsmDeploymentStatus.DeserializeCsmDeploymentStatus(e), _webSiteSlotWebAppsClientDiagnostics, Pipeline, "WebSiteSlotResource.GetSlotSiteDeploymentStatusesSlot", "value", "nextLink", cancellationToken); + } + + /// + /// List deployment statuses for an app (or deployment slot, if specified). + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deploymentStatus + /// + /// + /// Operation Id + /// WebApps_ListSlotSiteDeploymentStatusesSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetSlotSiteDeploymentStatusesSlot(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _webSiteSlotWebAppsRestClient.CreateListSlotSiteDeploymentStatusesSlotRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _webSiteSlotWebAppsRestClient.CreateListSlotSiteDeploymentStatusesSlotNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => CsmDeploymentStatus.DeserializeCsmDeploymentStatus(e), _webSiteSlotWebAppsClientDiagnostics, Pipeline, "WebSiteSlotResource.GetSlotSiteDeploymentStatusesSlot", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the deployment status for an app (or deployment slot, if specified). + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deploymentStatus/{deploymentStatusId} + /// + /// + /// Operation Id + /// WebApps_GetSlotSiteDeploymentStatusSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// GUID of the deployment operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetSlotSiteDeploymentStatusSlotAsync(WaitUntil waitUntil, string deploymentStatusId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(deploymentStatusId, nameof(deploymentStatusId)); + + using var scope = _webSiteSlotWebAppsClientDiagnostics.CreateScope("WebSiteSlotResource.GetSlotSiteDeploymentStatusSlot"); + scope.Start(); + try + { + var response = await _webSiteSlotWebAppsRestClient.GetSlotSiteDeploymentStatusSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentStatusId, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(new CsmDeploymentStatusOperationSource(), _webSiteSlotWebAppsClientDiagnostics, Pipeline, _webSiteSlotWebAppsRestClient.CreateGetSlotSiteDeploymentStatusSlotRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentStatusId).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the deployment status for an app (or deployment slot, if specified). + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deploymentStatus/{deploymentStatusId} + /// + /// + /// Operation Id + /// WebApps_GetSlotSiteDeploymentStatusSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// GUID of the deployment operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual ArmOperation GetSlotSiteDeploymentStatusSlot(WaitUntil waitUntil, string deploymentStatusId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(deploymentStatusId, nameof(deploymentStatusId)); + + using var scope = _webSiteSlotWebAppsClientDiagnostics.CreateScope("WebSiteSlotResource.GetSlotSiteDeploymentStatusSlot"); + scope.Start(); + try + { + var response = _webSiteSlotWebAppsRestClient.GetSlotSiteDeploymentStatusSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentStatusId, cancellationToken); + var operation = new AppServiceArmOperation(new CsmDeploymentStatusOperationSource(), _webSiteSlotWebAppsClientDiagnostics, Pipeline, _webSiteSlotWebAppsRestClient.CreateGetSlotSiteDeploymentStatusSlotRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentStatusId).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to get information about the databases stored in a backup. /// @@ -3715,7 +4067,7 @@ public virtual Response GetContainerLogsZipSlot(CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3757,7 +4109,7 @@ public virtual async Task> DiscoverBackupSlotAsync( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -3799,7 +4151,7 @@ public virtual Response DiscoverBackupSlot(RestoreRequestInf /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3833,7 +4185,7 @@ public virtual async Task> GetFunctionsAdminTokenSlotAsync(Canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3867,7 +4219,7 @@ public virtual Response GetFunctionsAdminTokenSlot(CancellationToken can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3901,7 +4253,7 @@ public virtual async Task> GetHostKeysSlotAsync(Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3935,7 +4287,7 @@ public virtual Response GetHostKeysSlot(CancellationToken c /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -3969,7 +4321,7 @@ public virtual async Task GetSyncStatusSlotAsync(CancellationToken can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4003,7 +4355,7 @@ public virtual Response GetSyncStatusSlot(CancellationToken cancellationToken = /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4037,7 +4389,7 @@ public virtual async Task SyncFunctionsSlotAsync(CancellationToken can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4071,7 +4423,7 @@ public virtual Response SyncFunctionsSlot(CancellationToken cancellationToken = /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4114,7 +4466,7 @@ public virtual async Task> CreateOrUpdateHostSecretSlotA /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4157,7 +4509,7 @@ public virtual Response CreateOrUpdateHostSecretSlot(string keyTy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4198,7 +4550,7 @@ public virtual async Task DeleteHostSecretSlotAsync(string keyType, st /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4239,7 +4591,7 @@ public virtual Response DeleteHostSecretSlot(string keyType, string keyName, Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4268,7 +4620,7 @@ public virtual AsyncPageable GetHybridConnectionsSlotAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4297,7 +4649,7 @@ public virtual Pageable GetHybridConnectionsSlot(Cancellat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4335,7 +4687,7 @@ public virtual async Task> IsCloneableSlotAsync(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4373,7 +4725,7 @@ public virtual Response IsCloneableSlot(CancellationToken canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4411,7 +4763,7 @@ public virtual async Task> GetSyncFunctionTriggersSlot /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4449,7 +4801,7 @@ public virtual Response GetSyncFunctionTriggersSlot(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4479,7 +4831,7 @@ public virtual AsyncPageable GetNetworkTraceOperationSlotAsy /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4509,7 +4861,7 @@ public virtual Pageable GetNetworkTraceOperationSlot(string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4546,7 +4898,7 @@ public virtual async Task> StartWebSiteNetworkTraceSlotAsync(in /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4583,7 +4935,7 @@ public virtual Response StartWebSiteNetworkTraceSlot(int? durationInSeco /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4624,7 +4976,7 @@ public virtual async Task>> StartWebSiteN /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4665,7 +5017,7 @@ public virtual ArmOperation> StartWebSiteNetworkTraceO /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4699,7 +5051,7 @@ public virtual async Task StopWebSiteNetworkTraceSlotAsync(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4733,7 +5085,7 @@ public virtual Response StopWebSiteNetworkTraceSlot(CancellationToken cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4763,7 +5115,7 @@ public virtual AsyncPageable GetNetworkTracesSlotAsync(strin /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4793,7 +5145,7 @@ public virtual Pageable GetNetworkTracesSlot(string operatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4823,7 +5175,7 @@ public virtual AsyncPageable GetNetworkTraceOperationSlotV2A /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4853,7 +5205,7 @@ public virtual Pageable GetNetworkTraceOperationSlotV2(strin /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4883,7 +5235,7 @@ public virtual AsyncPageable GetNetworkTracesSlotV2Async(str /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// @@ -4913,7 +5265,7 @@ public virtual Pageable GetNetworkTracesSlotV2(string operat /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4951,7 +5303,7 @@ public virtual async Task GenerateNewSitePublishingPasswordSlotAsync(C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -4989,7 +5341,7 @@ public virtual Response GenerateNewSitePublishingPasswordSlot(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5020,7 +5372,7 @@ public virtual AsyncPageable GetPerfMonCountersSlotAsync(st /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5051,7 +5403,7 @@ public virtual Pageable GetPerfMonCountersSlot(string filte /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5089,7 +5441,7 @@ public virtual async Task> GetSitePhpErrorLogFlagS /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5127,7 +5479,7 @@ public virtual Response GetSitePhpErrorLogFlagSlot(Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5156,7 +5508,7 @@ public virtual AsyncPageable GetPrivateLinkRe /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5185,7 +5537,7 @@ public virtual Pageable GetPrivateLinkResourc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5227,7 +5579,7 @@ public virtual async Task> GetPublishingProfileXmlWithSecretsSl /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5269,7 +5621,7 @@ public virtual Response GetPublishingProfileXmlWithSecretsSlot(CsmPublis /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5307,7 +5659,7 @@ public virtual async Task ResetSlotConfigurationSlotAsync(Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5345,7 +5697,7 @@ public virtual Response ResetSlotConfigurationSlot(CancellationToken cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5385,7 +5737,7 @@ public virtual async Task RestartSlotAsync(bool? softRestart = null, b /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5425,7 +5777,7 @@ public virtual Response RestartSlot(bool? softRestart = null, bool? synchronous /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5471,7 +5823,7 @@ public virtual async Task RestoreFromBackupBlobSlotAsync(WaitUntil /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5517,7 +5869,7 @@ public virtual ArmOperation RestoreFromBackupBlobSlot(WaitUntil waitUntil, Resto /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5563,7 +5915,7 @@ public virtual async Task RestoreFromDeletedAppSlotAsync(WaitUntil /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5609,7 +5961,7 @@ public virtual ArmOperation RestoreFromDeletedAppSlot(WaitUntil waitUntil, Delet /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5655,7 +6007,7 @@ public virtual async Task RestoreSnapshotSlotAsync(WaitUntil waitU /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5701,7 +6053,7 @@ public virtual ArmOperation RestoreSnapshotSlot(WaitUntil waitUntil, SnapshotRes /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5735,7 +6087,7 @@ public virtual AsyncPageable GetSlotDifferencesSlotAsync(CsmSlot /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5769,7 +6121,7 @@ public virtual Pageable GetSlotDifferencesSlot(CsmSlotEntity slo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5815,7 +6167,7 @@ public virtual async Task SwapSlotAsync(WaitUntil waitUntil, CsmSl /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5861,7 +6213,7 @@ public virtual ArmOperation SwapSlot(WaitUntil waitUntil, CsmSlotEntity slotSwap /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5891,7 +6243,7 @@ public virtual AsyncPageable GetSlotSnapshotsAsync(CancellationToke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5921,7 +6273,7 @@ public virtual Pageable GetSlotSnapshots(CancellationToken cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5951,7 +6303,7 @@ public virtual AsyncPageable GetSlotSnapshotsFromDRSecondaryAsync(C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -5981,7 +6333,7 @@ public virtual Pageable GetSlotSnapshotsFromDRSecondary(Cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6019,7 +6371,7 @@ public virtual async Task StartSlotAsync(CancellationToken cancellatio /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6057,7 +6409,7 @@ public virtual Response StartSlot(CancellationToken cancellationToken = default) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6102,7 +6454,7 @@ public virtual async Task>> StartNetworkT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6147,7 +6499,7 @@ public virtual ArmOperation> StartNetworkTraceSlot(Wai /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6185,7 +6537,7 @@ public virtual async Task StopSlotAsync(CancellationToken cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6223,7 +6575,7 @@ public virtual Response StopSlot(CancellationToken cancellationToken = default) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6261,7 +6613,7 @@ public virtual async Task StopNetworkTraceSlotAsync(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6299,7 +6651,7 @@ public virtual Response StopNetworkTraceSlot(CancellationToken cancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6337,7 +6689,7 @@ public virtual async Task SyncRepositorySlotAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6375,7 +6727,7 @@ public virtual Response SyncRepositorySlot(CancellationToken cancellationToken = /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6413,7 +6765,7 @@ public virtual async Task SyncFunctionTriggersSlotAsync(CancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6451,7 +6803,7 @@ public virtual Response SyncFunctionTriggersSlot(CancellationToken cancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6482,7 +6834,7 @@ public virtual AsyncPageable GetUsagesSlotAsync(string filter = n /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -6499,5 +6851,159 @@ public virtual Pageable GetUsagesSlot(string filter = null, Cance HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _webSiteSlotWebAppsRestClient.CreateListUsagesSlotNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => CsmUsageQuota.DeserializeCsmUsageQuota(e), _webSiteSlotWebAppsClientDiagnostics, Pipeline, "WebSiteSlotResource.GetUsagesSlot", "value", "nextLink", cancellationToken); } + + /// + /// Description for Creates the artifacts for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployWorkflowArtifacts + /// + /// + /// Operation Id + /// WebApps_DeployWorkflowArtifactsSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Application settings and files of the workflow. + /// The cancellation token to use. + public virtual async Task DeployWorkflowArtifactsSlotAsync(WorkflowArtifacts workflowArtifacts = null, CancellationToken cancellationToken = default) + { + using var scope = _webSiteSlotWebAppsClientDiagnostics.CreateScope("WebSiteSlotResource.DeployWorkflowArtifactsSlot"); + scope.Start(); + try + { + var response = await _webSiteSlotWebAppsRestClient.DeployWorkflowArtifactsSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, workflowArtifacts, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Description for Creates the artifacts for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployWorkflowArtifacts + /// + /// + /// Operation Id + /// WebApps_DeployWorkflowArtifactsSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Application settings and files of the workflow. + /// The cancellation token to use. + public virtual Response DeployWorkflowArtifactsSlot(WorkflowArtifacts workflowArtifacts = null, CancellationToken cancellationToken = default) + { + using var scope = _webSiteSlotWebAppsClientDiagnostics.CreateScope("WebSiteSlotResource.DeployWorkflowArtifactsSlot"); + scope.Start(); + try + { + var response = _webSiteSlotWebAppsRestClient.DeployWorkflowArtifactsSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, workflowArtifacts, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists logic app's connections for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listWorkflowsConnections + /// + /// + /// Operation Id + /// WebApps_ListWorkflowsConnectionsSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetWorkflowsConnectionsSlotAsync(CancellationToken cancellationToken = default) + { + using var scope = _webSiteSlotWebAppsClientDiagnostics.CreateScope("WebSiteSlotResource.GetWorkflowsConnectionsSlot"); + scope.Start(); + try + { + var response = await _webSiteSlotWebAppsRestClient.ListWorkflowsConnectionsSlotAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists logic app's connections for web site, or a deployment slot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listWorkflowsConnections + /// + /// + /// Operation Id + /// WebApps_ListWorkflowsConnectionsSlot + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetWorkflowsConnectionsSlot(CancellationToken cancellationToken = default) + { + using var scope = _webSiteSlotWebAppsClientDiagnostics.CreateScope("WebSiteSlotResource.GetWorkflowsConnectionsSlot"); + scope.Start(); + try + { + var response = _webSiteSlotWebAppsRestClient.ListWorkflowsConnectionsSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotResourceHealthMetadataResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotResourceHealthMetadataResource.cs index 1922c942489c0..40a7d17291a8f 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotResourceHealthMetadataResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotResourceHealthMetadataResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotSourceControlResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotSourceControlResource.cs index f975ef9adfc33..b8ea88cccc4e8 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotSourceControlResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotSourceControlResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string additionalFlags = /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsyn /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual Response Update(SiteSourceContr /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -401,7 +401,7 @@ public virtual async Task> Create /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobCollection.cs index 7421fb44fda6f..cf1c7692ce349 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string webJobNam /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationT /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string webJobName, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string webJobName, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobHistoryCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobHistoryCollection.cs index 51f799bd4d927..4398e4f24590f 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobHistoryCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobHistoryCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string id /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string id, CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string id, CancellationToken cancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobHistoryResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobHistoryResource.cs index c8def7b07922e..12d4456c88c2e 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobHistoryResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobHistoryResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobResource.cs index ee4f39e4c96ff..ad707fe0a75d5 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobResource.cs @@ -109,7 +109,7 @@ public virtual WebSiteSlotTriggeredWebJobHistoryCollection GetWebSiteSlotTrigger /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -171,7 +171,7 @@ public virtual Response GetWebSiteSlo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -251,7 +251,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -295,7 +295,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -339,7 +339,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -377,7 +377,7 @@ public virtual async Task RunTriggeredWebJobSlotAsync(CancellationToke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotWebJobCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotWebJobCollection.cs index 767b019ea26a6..5edbe6003612c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotWebJobCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotWebJobCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string w /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string webJobName, Cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string webJobName, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string webJobName, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotWebJobResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotWebJobResource.cs index b08f6ef075f38..372a5a4757755 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotWebJobResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotWebJobResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSourceControlResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSourceControlResource.cs index a01f4e9db96c2..b04c9896f6231 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSourceControlResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSourceControlResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string additionalFlags = /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAsync(Si /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -354,7 +354,7 @@ public virtual Response Update(SiteSourceControlDa /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredWebJobHistoryCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredWebJobHistoryCollection.cs index e2a11c396ec1a..8ff71e9c34986 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredWebJobHistoryCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredWebJobHistoryCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string id, Ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(Cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string id, CancellationTok /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string id, CancellationToken cancellationTo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredWebJobHistoryResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredWebJobHistoryResource.cs index 2411ee2b53e0d..6a22f388702d0 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredWebJobHistoryResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredWebJobHistoryResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredwebJobCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredwebJobCollection.cs index 5aef21849da3e..04e8d7ff1e163 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredwebJobCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredwebJobCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string webJobName, C /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string webJobName, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string webJobName, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredwebJobResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredwebJobResource.cs index 8624781a2ed31..0cfeda7df51db 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredwebJobResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredwebJobResource.cs @@ -108,7 +108,7 @@ public virtual WebSiteTriggeredWebJobHistoryCollection GetWebSiteTriggeredWebJob /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> GetWe /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response GetWebSiteTrigger /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetAsync(Can /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response Get(CancellationToken ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -338,7 +338,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -376,7 +376,7 @@ public virtual async Task RunTriggeredWebJobAsync(CancellationToken ca /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteWebJobCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteWebJobCollection.cs index bf31deba70895..5ac83b4f590b5 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteWebJobCollection.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteWebJobCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string webJo /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string webJobName, Cancellati /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToke /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken cancella /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string webJobName, Cancell /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string webJobName, CancellationToken cancel /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteWebJobResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteWebJobResource.cs index d3331128b5faa..2d430b1729dcb 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteWebJobResource.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteWebJobResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2021-02-01 + /// 2023-12-01 /// /// /// Resource diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowEnvelopeData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowEnvelopeData.Serialization.cs new file mode 100644 index 0000000000000..2d66198a64844 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowEnvelopeData.Serialization.cs @@ -0,0 +1,334 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class WorkflowEnvelopeData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowEnvelopeData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location.Value); + } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowEnvelopeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowEnvelopeData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowEnvelopeData(document.RootElement, options); + } + + internal static WorkflowEnvelopeData DeserializeWorkflowEnvelopeData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string kind = default; + AzureLocation? location = default; + WorkflowEnvelopeProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kind"u8)) + { + kind = property.Value.GetString(); + continue; + } + if (property.NameEquals("location"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = WorkflowEnvelopeProperties.DeserializeWorkflowEnvelopeProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowEnvelopeData( + id, + name, + type, + systemData, + kind, + location, + properties, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" location: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Location)) + { + builder.Append(" location: "); + builder.AppendLine($"'{Location.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Kind), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" kind: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Kind)) + { + builder.Append(" kind: "); + if (Kind.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Kind}'''"); + } + else + { + builder.AppendLine($"'{Kind}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Properties), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" properties: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Properties)) + { + builder.Append(" properties: "); + BicepSerializationHelpers.AppendChildObject(builder, Properties, options, 2, false, " properties: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowEnvelopeData)} does not support writing '{options.Format}' format."); + } + } + + WorkflowEnvelopeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowEnvelopeData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowEnvelopeData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowEnvelopeData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowEnvelopeData.cs new file mode 100644 index 0000000000000..d11e693edeb20 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowEnvelopeData.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing the WorkflowEnvelope data model. + /// Workflow properties definition. + /// + public partial class WorkflowEnvelopeData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WorkflowEnvelopeData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource kind. + /// The resource location. + /// Additional workflow properties. + /// Keeps track of any properties unknown to the library. + internal WorkflowEnvelopeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string kind, AzureLocation? location, WorkflowEnvelopeProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Kind = kind; + Location = location; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource kind. + [WirePath("kind")] + public string Kind { get; } + /// The resource location. + [WirePath("location")] + public AzureLocation? Location { get; } + /// Additional workflow properties. + [WirePath("properties")] + public WorkflowEnvelopeProperties Properties { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionCollection.cs new file mode 100644 index 0000000000000..10eff88e0f77a --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionCollection.cs @@ -0,0 +1,399 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetWorkflowRunActions method from an instance of . + /// + public partial class WorkflowRunActionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _workflowRunActionClientDiagnostics; + private readonly WorkflowRunActionsRestOperations _workflowRunActionRestClient; + + /// Initializes a new instance of the class for mocking. + protected WorkflowRunActionCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal WorkflowRunActionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _workflowRunActionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", WorkflowRunActionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(WorkflowRunActionResource.ResourceType, out string workflowRunActionApiVersion); + _workflowRunActionRestClient = new WorkflowRunActionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workflowRunActionApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != WorkflowRunResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WorkflowRunResource.ResourceType), nameof(id)); + } + + /// + /// Gets a workflow run action. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName} + /// + /// + /// Operation Id + /// WorkflowRunActions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow action name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var scope = _workflowRunActionClientDiagnostics.CreateScope("WorkflowRunActionCollection.Get"); + scope.Start(); + try + { + var response = await _workflowRunActionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, actionName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunActionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a workflow run action. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName} + /// + /// + /// Operation Id + /// WorkflowRunActions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow action name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var scope = _workflowRunActionClientDiagnostics.CreateScope("WorkflowRunActionCollection.Get"); + scope.Start(); + try + { + var response = _workflowRunActionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, actionName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunActionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a list of workflow run actions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions + /// + /// + /// Operation Id + /// WorkflowRunActions_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The number of items to be included in the result. + /// The filter to apply on the operation. Options for filters include: Status. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowRunActionRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, top, filter); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowRunActionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, top, filter); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WorkflowRunActionResource(Client, WorkflowRunActionData.DeserializeWorkflowRunActionData(e)), _workflowRunActionClientDiagnostics, Pipeline, "WorkflowRunActionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets a list of workflow run actions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions + /// + /// + /// Operation Id + /// WorkflowRunActions_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The number of items to be included in the result. + /// The filter to apply on the operation. Options for filters include: Status. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowRunActionRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, top, filter); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowRunActionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, top, filter); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WorkflowRunActionResource(Client, WorkflowRunActionData.DeserializeWorkflowRunActionData(e)), _workflowRunActionClientDiagnostics, Pipeline, "WorkflowRunActionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName} + /// + /// + /// Operation Id + /// WorkflowRunActions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow action name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var scope = _workflowRunActionClientDiagnostics.CreateScope("WorkflowRunActionCollection.Exists"); + scope.Start(); + try + { + var response = await _workflowRunActionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, actionName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName} + /// + /// + /// Operation Id + /// WorkflowRunActions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow action name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var scope = _workflowRunActionClientDiagnostics.CreateScope("WorkflowRunActionCollection.Exists"); + scope.Start(); + try + { + var response = _workflowRunActionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, actionName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName} + /// + /// + /// Operation Id + /// WorkflowRunActions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow action name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var scope = _workflowRunActionClientDiagnostics.CreateScope("WorkflowRunActionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _workflowRunActionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, actionName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunActionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName} + /// + /// + /// Operation Id + /// WorkflowRunActions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow action name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string actionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(actionName, nameof(actionName)); + + using var scope = _workflowRunActionClientDiagnostics.CreateScope("WorkflowRunActionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _workflowRunActionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, actionName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunActionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionData.Serialization.cs new file mode 100644 index 0000000000000..1acfbaa887152 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionData.Serialization.cs @@ -0,0 +1,639 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class WorkflowRunActionData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRunActionData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(StartOn)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(EndOn)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + } + if (options.Format != "W" && Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Error); +#else + using (JsonDocument document = JsonDocument.Parse(Error)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (options.Format != "W" && Optional.IsDefined(TrackingId)) + { + writer.WritePropertyName("trackingId"u8); + writer.WriteStringValue(TrackingId); + } + if (Optional.IsDefined(Correlation)) + { + writer.WritePropertyName("correlation"u8); + writer.WriteObjectValue(Correlation, options); + } + if (options.Format != "W" && Optional.IsDefined(InputsLink)) + { + writer.WritePropertyName("inputsLink"u8); + writer.WriteObjectValue(InputsLink, options); + } + if (options.Format != "W" && Optional.IsDefined(OutputsLink)) + { + writer.WritePropertyName("outputsLink"u8); + writer.WriteObjectValue(OutputsLink, options); + } + if (options.Format != "W" && Optional.IsDefined(TrackedProperties)) + { + writer.WritePropertyName("trackedProperties"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(TrackedProperties); +#else + using (JsonDocument document = JsonDocument.Parse(TrackedProperties)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsCollectionDefined(RetryHistory)) + { + writer.WritePropertyName("retryHistory"u8); + writer.WriteStartArray(); + foreach (var item in RetryHistory) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowRunActionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRunActionData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowRunActionData(document.RootElement, options); + } + + internal static WorkflowRunActionData DeserializeWorkflowRunActionData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + DateTimeOffset? startTime = default; + DateTimeOffset? endTime = default; + WorkflowStatus? status = default; + string code = default; + BinaryData error = default; + string trackingId = default; + WebAppRunActionCorrelation correlation = default; + WebAppContentLink inputsLink = default; + WebAppContentLink outputsLink = default; + BinaryData trackedProperties = default; + IReadOnlyList retryHistory = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("startTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("endTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("status"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new WorkflowStatus(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("code"u8)) + { + code = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("error"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = BinaryData.FromString(property0.Value.GetRawText()); + continue; + } + if (property0.NameEquals("trackingId"u8)) + { + trackingId = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("correlation"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + correlation = WebAppRunActionCorrelation.DeserializeWebAppRunActionCorrelation(property0.Value, options); + continue; + } + if (property0.NameEquals("inputsLink"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inputsLink = WebAppContentLink.DeserializeWebAppContentLink(property0.Value, options); + continue; + } + if (property0.NameEquals("outputsLink"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + outputsLink = WebAppContentLink.DeserializeWebAppContentLink(property0.Value, options); + continue; + } + if (property0.NameEquals("trackedProperties"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + trackedProperties = BinaryData.FromString(property0.Value.GetRawText()); + continue; + } + if (property0.NameEquals("retryHistory"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(WebAppRetryHistory.DeserializeWebAppRetryHistory(item, options)); + } + retryHistory = array; + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowRunActionData( + id, + name, + type, + systemData, + startTime, + endTime, + status, + code, + error, + trackingId, + correlation, + inputsLink, + outputsLink, + trackedProperties, + retryHistory ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StartOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" startTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StartOn)) + { + builder.Append(" startTime: "); + var formattedDateTimeString = TypeFormatters.ToString(StartOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EndOn)) + { + builder.Append(" endTime: "); + var formattedDateTimeString = TypeFormatters.ToString(EndOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" status: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Status)) + { + builder.Append(" status: "); + builder.AppendLine($"'{Status.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Code), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" code: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Code)) + { + builder.Append(" code: "); + if (Code.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Code}'''"); + } + else + { + builder.AppendLine($"'{Code}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Error), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" error: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Error)) + { + builder.Append(" error: "); + builder.AppendLine($"'{Error.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TrackingId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" trackingId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TrackingId)) + { + builder.Append(" trackingId: "); + if (TrackingId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TrackingId}'''"); + } + else + { + builder.AppendLine($"'{TrackingId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Correlation), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" correlation: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Correlation)) + { + builder.Append(" correlation: "); + BicepSerializationHelpers.AppendChildObject(builder, Correlation, options, 4, false, " correlation: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(InputsLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" inputsLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(InputsLink)) + { + builder.Append(" inputsLink: "); + BicepSerializationHelpers.AppendChildObject(builder, InputsLink, options, 4, false, " inputsLink: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OutputsLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" outputsLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OutputsLink)) + { + builder.Append(" outputsLink: "); + BicepSerializationHelpers.AppendChildObject(builder, OutputsLink, options, 4, false, " outputsLink: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TrackedProperties), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" trackedProperties: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TrackedProperties)) + { + builder.Append(" trackedProperties: "); + builder.AppendLine($"'{TrackedProperties.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RetryHistory), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" retryHistory: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(RetryHistory)) + { + if (RetryHistory.Any()) + { + builder.Append(" retryHistory: "); + builder.AppendLine("["); + foreach (var item in RetryHistory) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " retryHistory: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowRunActionData)} does not support writing '{options.Format}' format."); + } + } + + WorkflowRunActionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowRunActionData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowRunActionData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionData.cs new file mode 100644 index 0000000000000..74652e8c8c93c --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionData.cs @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing the WorkflowRunAction data model. + /// The workflow run action. + /// + public partial class WorkflowRunActionData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WorkflowRunActionData() + { + RetryHistory = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Gets the start time. + /// Gets the end time. + /// Gets the status. + /// Gets the code. + /// Gets the error. + /// Gets the tracking id. + /// The correlation properties. + /// Gets the link to inputs. + /// Gets the link to outputs. + /// Gets the tracked properties. + /// Gets the retry histories. + /// Keeps track of any properties unknown to the library. + internal WorkflowRunActionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DateTimeOffset? startOn, DateTimeOffset? endOn, WorkflowStatus? status, string code, BinaryData error, string trackingId, WebAppRunActionCorrelation correlation, WebAppContentLink inputsLink, WebAppContentLink outputsLink, BinaryData trackedProperties, IReadOnlyList retryHistory, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + StartOn = startOn; + EndOn = endOn; + Status = status; + Code = code; + Error = error; + TrackingId = trackingId; + Correlation = correlation; + InputsLink = inputsLink; + OutputsLink = outputsLink; + TrackedProperties = trackedProperties; + RetryHistory = retryHistory; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets the start time. + [WirePath("properties.startTime")] + public DateTimeOffset? StartOn { get; } + /// Gets the end time. + [WirePath("properties.endTime")] + public DateTimeOffset? EndOn { get; } + /// Gets the status. + [WirePath("properties.status")] + public WorkflowStatus? Status { get; } + /// Gets the code. + [WirePath("properties.code")] + public string Code { get; } + /// + /// Gets the error. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("properties.error")] + public BinaryData Error { get; } + /// Gets the tracking id. + [WirePath("properties.trackingId")] + public string TrackingId { get; } + /// The correlation properties. + [WirePath("properties.correlation")] + public WebAppRunActionCorrelation Correlation { get; } + /// Gets the link to inputs. + [WirePath("properties.inputsLink")] + public WebAppContentLink InputsLink { get; } + /// Gets the link to outputs. + [WirePath("properties.outputsLink")] + public WebAppContentLink OutputsLink { get; } + /// + /// Gets the tracked properties. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("properties.trackedProperties")] + public BinaryData TrackedProperties { get; } + /// Gets the retry histories. + [WirePath("properties.retryHistory")] + public IReadOnlyList RetryHistory { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionCollection.cs new file mode 100644 index 0000000000000..26665e30a25ce --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionCollection.cs @@ -0,0 +1,395 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetWorkflowRunActionRepetitions method from an instance of . + /// + public partial class WorkflowRunActionRepetitionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _workflowRunActionRepetitionClientDiagnostics; + private readonly WorkflowRunActionRepetitionsRestOperations _workflowRunActionRepetitionRestClient; + + /// Initializes a new instance of the class for mocking. + protected WorkflowRunActionRepetitionCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal WorkflowRunActionRepetitionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _workflowRunActionRepetitionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", WorkflowRunActionRepetitionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(WorkflowRunActionRepetitionResource.ResourceType, out string workflowRunActionRepetitionApiVersion); + _workflowRunActionRepetitionRestClient = new WorkflowRunActionRepetitionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workflowRunActionRepetitionApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != WorkflowRunActionResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WorkflowRunActionResource.ResourceType), nameof(id)); + } + + /// + /// Get a workflow run action repetition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow repetition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var scope = _workflowRunActionRepetitionClientDiagnostics.CreateScope("WorkflowRunActionRepetitionCollection.Get"); + scope.Start(); + try + { + var response = await _workflowRunActionRepetitionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, repetitionName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunActionRepetitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a workflow run action repetition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow repetition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var scope = _workflowRunActionRepetitionClientDiagnostics.CreateScope("WorkflowRunActionRepetitionCollection.Get"); + scope.Start(); + try + { + var response = _workflowRunActionRepetitionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, repetitionName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunActionRepetitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get all of a workflow run action repetitions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitions_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowRunActionRepetitionRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowRunActionRepetitionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WorkflowRunActionRepetitionResource(Client, WorkflowRunActionRepetitionDefinitionData.DeserializeWorkflowRunActionRepetitionDefinitionData(e)), _workflowRunActionRepetitionClientDiagnostics, Pipeline, "WorkflowRunActionRepetitionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Get all of a workflow run action repetitions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitions_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowRunActionRepetitionRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowRunActionRepetitionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WorkflowRunActionRepetitionResource(Client, WorkflowRunActionRepetitionDefinitionData.DeserializeWorkflowRunActionRepetitionDefinitionData(e)), _workflowRunActionRepetitionClientDiagnostics, Pipeline, "WorkflowRunActionRepetitionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow repetition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var scope = _workflowRunActionRepetitionClientDiagnostics.CreateScope("WorkflowRunActionRepetitionCollection.Exists"); + scope.Start(); + try + { + var response = await _workflowRunActionRepetitionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, repetitionName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow repetition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var scope = _workflowRunActionRepetitionClientDiagnostics.CreateScope("WorkflowRunActionRepetitionCollection.Exists"); + scope.Start(); + try + { + var response = _workflowRunActionRepetitionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, repetitionName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow repetition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var scope = _workflowRunActionRepetitionClientDiagnostics.CreateScope("WorkflowRunActionRepetitionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _workflowRunActionRepetitionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, repetitionName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunActionRepetitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow repetition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var scope = _workflowRunActionRepetitionClientDiagnostics.CreateScope("WorkflowRunActionRepetitionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _workflowRunActionRepetitionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, repetitionName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunActionRepetitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionDefinitionData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionDefinitionData.Serialization.cs new file mode 100644 index 0000000000000..52521bba75e81 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionDefinitionData.Serialization.cs @@ -0,0 +1,880 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class WorkflowRunActionRepetitionDefinitionData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRunActionRepetitionDefinitionData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(StartOn)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartOn.Value, "O"); + } + if (Optional.IsDefined(EndOn)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndOn.Value, "O"); + } + if (Optional.IsDefined(Correlation)) + { + writer.WritePropertyName("correlation"u8); + writer.WriteObjectValue(Correlation, options); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + } + if (Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Error); +#else + using (JsonDocument document = JsonDocument.Parse(Error)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (options.Format != "W" && Optional.IsDefined(TrackingId)) + { + writer.WritePropertyName("trackingId"u8); + writer.WriteStringValue(TrackingId); + } + if (options.Format != "W" && Optional.IsDefined(Inputs)) + { + writer.WritePropertyName("inputs"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Inputs); +#else + using (JsonDocument document = JsonDocument.Parse(Inputs)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (options.Format != "W" && Optional.IsDefined(InputsLink)) + { + writer.WritePropertyName("inputsLink"u8); + writer.WriteObjectValue(InputsLink, options); + } + if (options.Format != "W" && Optional.IsDefined(Outputs)) + { + writer.WritePropertyName("outputs"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Outputs); +#else + using (JsonDocument document = JsonDocument.Parse(Outputs)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (options.Format != "W" && Optional.IsDefined(OutputsLink)) + { + writer.WritePropertyName("outputsLink"u8); + writer.WriteObjectValue(OutputsLink, options); + } + if (options.Format != "W" && Optional.IsDefined(TrackedProperties)) + { + writer.WritePropertyName("trackedProperties"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(TrackedProperties); +#else + using (JsonDocument document = JsonDocument.Parse(TrackedProperties)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsCollectionDefined(RetryHistory)) + { + writer.WritePropertyName("retryHistory"u8); + writer.WriteStartArray(); + foreach (var item in RetryHistory) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(IterationCount)) + { + writer.WritePropertyName("iterationCount"u8); + writer.WriteNumberValue(IterationCount.Value); + } + if (Optional.IsCollectionDefined(RepetitionIndexes)) + { + writer.WritePropertyName("repetitionIndexes"u8); + writer.WriteStartArray(); + foreach (var item in RepetitionIndexes) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowRunActionRepetitionDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRunActionRepetitionDefinitionData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowRunActionRepetitionDefinitionData(document.RootElement, options); + } + + internal static WorkflowRunActionRepetitionDefinitionData DeserializeWorkflowRunActionRepetitionDefinitionData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + DateTimeOffset? startTime = default; + DateTimeOffset? endTime = default; + WebAppRunActionCorrelation correlation = default; + WorkflowStatus? status = default; + string code = default; + BinaryData error = default; + string trackingId = default; + BinaryData inputs = default; + WebAppContentLink inputsLink = default; + BinaryData outputs = default; + WebAppContentLink outputsLink = default; + BinaryData trackedProperties = default; + IList retryHistory = default; + int? iterationCount = default; + IList repetitionIndexes = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("startTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("endTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("correlation"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + correlation = WebAppRunActionCorrelation.DeserializeWebAppRunActionCorrelation(property0.Value, options); + continue; + } + if (property0.NameEquals("status"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new WorkflowStatus(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("code"u8)) + { + code = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("error"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = BinaryData.FromString(property0.Value.GetRawText()); + continue; + } + if (property0.NameEquals("trackingId"u8)) + { + trackingId = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("inputs"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inputs = BinaryData.FromString(property0.Value.GetRawText()); + continue; + } + if (property0.NameEquals("inputsLink"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inputsLink = WebAppContentLink.DeserializeWebAppContentLink(property0.Value, options); + continue; + } + if (property0.NameEquals("outputs"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + outputs = BinaryData.FromString(property0.Value.GetRawText()); + continue; + } + if (property0.NameEquals("outputsLink"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + outputsLink = WebAppContentLink.DeserializeWebAppContentLink(property0.Value, options); + continue; + } + if (property0.NameEquals("trackedProperties"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + trackedProperties = BinaryData.FromString(property0.Value.GetRawText()); + continue; + } + if (property0.NameEquals("retryHistory"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(WebAppRetryHistory.DeserializeWebAppRetryHistory(item, options)); + } + retryHistory = array; + continue; + } + if (property0.NameEquals("iterationCount"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + iterationCount = property0.Value.GetInt32(); + continue; + } + if (property0.NameEquals("repetitionIndexes"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(WorkflowRunActionRepetitionIndex.DeserializeWorkflowRunActionRepetitionIndex(item, options)); + } + repetitionIndexes = array; + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowRunActionRepetitionDefinitionData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + startTime, + endTime, + correlation, + status, + code, + error, + trackingId, + inputs, + inputsLink, + outputs, + outputsLink, + trackedProperties, + retryHistory ?? new ChangeTrackingList(), + iterationCount, + repetitionIndexes ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" location: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" location: "); + builder.AppendLine($"'{Location.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Tags), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tags: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags.Any()) + { + builder.Append(" tags: "); + builder.AppendLine("{"); + foreach (var item in Tags) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + if (item.Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{item.Value}'''"); + } + else + { + builder.AppendLine($"'{item.Value}'"); + } + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StartOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" startTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StartOn)) + { + builder.Append(" startTime: "); + var formattedDateTimeString = TypeFormatters.ToString(StartOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EndOn)) + { + builder.Append(" endTime: "); + var formattedDateTimeString = TypeFormatters.ToString(EndOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Correlation), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" correlation: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Correlation)) + { + builder.Append(" correlation: "); + BicepSerializationHelpers.AppendChildObject(builder, Correlation, options, 4, false, " correlation: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" status: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Status)) + { + builder.Append(" status: "); + builder.AppendLine($"'{Status.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Code), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" code: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Code)) + { + builder.Append(" code: "); + if (Code.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Code}'''"); + } + else + { + builder.AppendLine($"'{Code}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Error), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" error: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Error)) + { + builder.Append(" error: "); + builder.AppendLine($"'{Error.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TrackingId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" trackingId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TrackingId)) + { + builder.Append(" trackingId: "); + if (TrackingId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TrackingId}'''"); + } + else + { + builder.AppendLine($"'{TrackingId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Inputs), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" inputs: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Inputs)) + { + builder.Append(" inputs: "); + builder.AppendLine($"'{Inputs.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(InputsLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" inputsLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(InputsLink)) + { + builder.Append(" inputsLink: "); + BicepSerializationHelpers.AppendChildObject(builder, InputsLink, options, 4, false, " inputsLink: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Outputs), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" outputs: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Outputs)) + { + builder.Append(" outputs: "); + builder.AppendLine($"'{Outputs.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OutputsLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" outputsLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OutputsLink)) + { + builder.Append(" outputsLink: "); + BicepSerializationHelpers.AppendChildObject(builder, OutputsLink, options, 4, false, " outputsLink: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TrackedProperties), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" trackedProperties: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TrackedProperties)) + { + builder.Append(" trackedProperties: "); + builder.AppendLine($"'{TrackedProperties.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RetryHistory), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" retryHistory: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(RetryHistory)) + { + if (RetryHistory.Any()) + { + builder.Append(" retryHistory: "); + builder.AppendLine("["); + foreach (var item in RetryHistory) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " retryHistory: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IterationCount), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" iterationCount: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IterationCount)) + { + builder.Append(" iterationCount: "); + builder.AppendLine($"{IterationCount.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RepetitionIndexes), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" repetitionIndexes: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(RepetitionIndexes)) + { + if (RepetitionIndexes.Any()) + { + builder.Append(" repetitionIndexes: "); + builder.AppendLine("["); + foreach (var item in RepetitionIndexes) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " repetitionIndexes: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowRunActionRepetitionDefinitionData)} does not support writing '{options.Format}' format."); + } + } + + WorkflowRunActionRepetitionDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowRunActionRepetitionDefinitionData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowRunActionRepetitionDefinitionData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionDefinitionData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionDefinitionData.cs new file mode 100644 index 0000000000000..0aa18c19e9b4e --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionDefinitionData.cs @@ -0,0 +1,272 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing the WorkflowRunActionRepetitionDefinition data model. + /// The workflow run action repetition definition. + /// + public partial class WorkflowRunActionRepetitionDefinitionData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public WorkflowRunActionRepetitionDefinitionData(AzureLocation location) : base(location) + { + RetryHistory = new ChangeTrackingList(); + RepetitionIndexes = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The start time of the workflow scope repetition. + /// The end time of the workflow scope repetition. + /// The correlation properties. + /// The status of the workflow scope repetition. + /// The workflow scope repetition code. + /// Anything. + /// Gets the tracking id. + /// Gets the inputs. + /// Gets the link to inputs. + /// Gets the outputs. + /// Gets the link to outputs. + /// Gets the tracked properties. + /// Gets the retry histories. + /// + /// The repetition indexes. + /// Keeps track of any properties unknown to the library. + internal WorkflowRunActionRepetitionDefinitionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, DateTimeOffset? startOn, DateTimeOffset? endOn, WebAppRunActionCorrelation correlation, WorkflowStatus? status, string code, BinaryData error, string trackingId, BinaryData inputs, WebAppContentLink inputsLink, BinaryData outputs, WebAppContentLink outputsLink, BinaryData trackedProperties, IList retryHistory, int? iterationCount, IList repetitionIndexes, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + StartOn = startOn; + EndOn = endOn; + Correlation = correlation; + Status = status; + Code = code; + Error = error; + TrackingId = trackingId; + Inputs = inputs; + InputsLink = inputsLink; + Outputs = outputs; + OutputsLink = outputsLink; + TrackedProperties = trackedProperties; + RetryHistory = retryHistory; + IterationCount = iterationCount; + RepetitionIndexes = repetitionIndexes; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal WorkflowRunActionRepetitionDefinitionData() + { + } + + /// The start time of the workflow scope repetition. + [WirePath("properties.startTime")] + public DateTimeOffset? StartOn { get; set; } + /// The end time of the workflow scope repetition. + [WirePath("properties.endTime")] + public DateTimeOffset? EndOn { get; set; } + /// The correlation properties. + [WirePath("properties.correlation")] + public WebAppRunActionCorrelation Correlation { get; set; } + /// The status of the workflow scope repetition. + [WirePath("properties.status")] + public WorkflowStatus? Status { get; set; } + /// The workflow scope repetition code. + [WirePath("properties.code")] + public string Code { get; set; } + /// + /// Anything + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("properties.error")] + public BinaryData Error { get; set; } + /// Gets the tracking id. + [WirePath("properties.trackingId")] + public string TrackingId { get; } + /// + /// Gets the inputs. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("properties.inputs")] + public BinaryData Inputs { get; } + /// Gets the link to inputs. + [WirePath("properties.inputsLink")] + public WebAppContentLink InputsLink { get; } + /// + /// Gets the outputs. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("properties.outputs")] + public BinaryData Outputs { get; } + /// Gets the link to outputs. + [WirePath("properties.outputsLink")] + public WebAppContentLink OutputsLink { get; } + /// + /// Gets the tracked properties. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("properties.trackedProperties")] + public BinaryData TrackedProperties { get; } + /// Gets the retry histories. + [WirePath("properties.retryHistory")] + public IList RetryHistory { get; } + /// Gets or sets the iteration count. + [WirePath("properties.iterationCount")] + public int? IterationCount { get; set; } + /// The repetition indexes. + [WirePath("properties.repetitionIndexes")] + public IList RepetitionIndexes { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionResource.Serialization.cs new file mode 100644 index 0000000000000..09a98f4062e39 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppService +{ + public partial class WorkflowRunActionRepetitionResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + WorkflowRunActionRepetitionDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + WorkflowRunActionRepetitionDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionResource.cs new file mode 100644 index 0000000000000..fff1f9170548c --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionResource.cs @@ -0,0 +1,305 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a WorkflowRunActionRepetition along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetWorkflowRunActionRepetitionResource method. + /// Otherwise you can get one from its parent resource using the GetWorkflowRunActionRepetition method. + /// + public partial class WorkflowRunActionRepetitionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + /// The workflowName. + /// The runName. + /// The actionName. + /// The repetitionName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _workflowRunActionRepetitionClientDiagnostics; + private readonly WorkflowRunActionRepetitionsRestOperations _workflowRunActionRepetitionRestClient; + private readonly WorkflowRunActionRepetitionDefinitionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Web/sites/hostruntime/webhooks/api/workflows/runs/actions/repetitions"; + + /// Initializes a new instance of the class for mocking. + protected WorkflowRunActionRepetitionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal WorkflowRunActionRepetitionResource(ArmClient client, WorkflowRunActionRepetitionDefinitionData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal WorkflowRunActionRepetitionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _workflowRunActionRepetitionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string workflowRunActionRepetitionApiVersion); + _workflowRunActionRepetitionRestClient = new WorkflowRunActionRepetitionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workflowRunActionRepetitionApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual WorkflowRunActionRepetitionDefinitionData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of WebAppRequestHistoryResources in the WorkflowRunActionRepetition. + /// An object representing collection of WebAppRequestHistoryResources and their operations over a WebAppRequestHistoryResource. + public virtual WebAppRequestHistoryCollection GetWebAppRequestHistories() + { + return GetCachedClient(client => new WebAppRequestHistoryCollection(client, Id)); + } + + /// + /// Gets a workflow run repetition request history. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitionsRequestHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The request history name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetWebAppRequestHistoryAsync(string requestHistoryName, CancellationToken cancellationToken = default) + { + return await GetWebAppRequestHistories().GetAsync(requestHistoryName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a workflow run repetition request history. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitionsRequestHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The request history name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetWebAppRequestHistory(string requestHistoryName, CancellationToken cancellationToken = default) + { + return GetWebAppRequestHistories().Get(requestHistoryName, cancellationToken); + } + + /// + /// Get a workflow run action repetition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _workflowRunActionRepetitionClientDiagnostics.CreateScope("WorkflowRunActionRepetitionResource.Get"); + scope.Start(); + try + { + var response = await _workflowRunActionRepetitionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunActionRepetitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a workflow run action repetition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _workflowRunActionRepetitionClientDiagnostics.CreateScope("WorkflowRunActionRepetitionResource.Get"); + scope.Start(); + try + { + var response = _workflowRunActionRepetitionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunActionRepetitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists a workflow run expression trace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/listExpressionTraces + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitions_ListExpressionTraces + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetExpressionTracesAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowRunActionRepetitionRestClient.CreateListExpressionTracesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowRunActionRepetitionRestClient.CreateListExpressionTracesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => WorkflowExpressionRoot.DeserializeWorkflowExpressionRoot(e), _workflowRunActionRepetitionClientDiagnostics, Pipeline, "WorkflowRunActionRepetitionResource.GetExpressionTraces", "inputs", "nextLink", cancellationToken); + } + + /// + /// Lists a workflow run expression trace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/listExpressionTraces + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitions_ListExpressionTraces + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetExpressionTraces(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowRunActionRepetitionRestClient.CreateListExpressionTracesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowRunActionRepetitionRestClient.CreateListExpressionTracesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => WorkflowExpressionRoot.DeserializeWorkflowExpressionRoot(e), _workflowRunActionRepetitionClientDiagnostics, Pipeline, "WorkflowRunActionRepetitionResource.GetExpressionTraces", "inputs", "nextLink", cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionResource.Serialization.cs new file mode 100644 index 0000000000000..28f422d0e80d5 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppService +{ + public partial class WorkflowRunActionResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + WorkflowRunActionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + WorkflowRunActionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionResource.cs new file mode 100644 index 0000000000000..fe5ae36f76fca --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionResource.cs @@ -0,0 +1,373 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a WorkflowRunAction along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetWorkflowRunActionResource method. + /// Otherwise you can get one from its parent resource using the GetWorkflowRunAction method. + /// + public partial class WorkflowRunActionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + /// The workflowName. + /// The runName. + /// The actionName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _workflowRunActionClientDiagnostics; + private readonly WorkflowRunActionsRestOperations _workflowRunActionRestClient; + private readonly WorkflowRunActionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Web/sites/hostruntime/webhooks/api/workflows/runs/actions"; + + /// Initializes a new instance of the class for mocking. + protected WorkflowRunActionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal WorkflowRunActionResource(ArmClient client, WorkflowRunActionData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal WorkflowRunActionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _workflowRunActionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string workflowRunActionApiVersion); + _workflowRunActionRestClient = new WorkflowRunActionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workflowRunActionApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual WorkflowRunActionData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of WorkflowRunActionRepetitionResources in the WorkflowRunAction. + /// An object representing collection of WorkflowRunActionRepetitionResources and their operations over a WorkflowRunActionRepetitionResource. + public virtual WorkflowRunActionRepetitionCollection GetWorkflowRunActionRepetitions() + { + return GetCachedClient(client => new WorkflowRunActionRepetitionCollection(client, Id)); + } + + /// + /// Get a workflow run action repetition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow repetition. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetWorkflowRunActionRepetitionAsync(string repetitionName, CancellationToken cancellationToken = default) + { + return await GetWorkflowRunActionRepetitions().GetAsync(repetitionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a workflow run action repetition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow repetition. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetWorkflowRunActionRepetition(string repetitionName, CancellationToken cancellationToken = default) + { + return GetWorkflowRunActionRepetitions().Get(repetitionName, cancellationToken); + } + + /// Gets a collection of WorkflowRunActionScopeRepetitionResources in the WorkflowRunAction. + /// An object representing collection of WorkflowRunActionScopeRepetitionResources and their operations over a WorkflowRunActionScopeRepetitionResource. + public virtual WorkflowRunActionScopeRepetitionCollection GetWorkflowRunActionScopeRepetitions() + { + return GetCachedClient(client => new WorkflowRunActionScopeRepetitionCollection(client, Id)); + } + + /// + /// Get a workflow run action scoped repetition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionScopeRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow repetition. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetWorkflowRunActionScopeRepetitionAsync(string repetitionName, CancellationToken cancellationToken = default) + { + return await GetWorkflowRunActionScopeRepetitions().GetAsync(repetitionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a workflow run action scoped repetition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionScopeRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow repetition. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetWorkflowRunActionScopeRepetition(string repetitionName, CancellationToken cancellationToken = default) + { + return GetWorkflowRunActionScopeRepetitions().Get(repetitionName, cancellationToken); + } + + /// + /// Gets a workflow run action. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName} + /// + /// + /// Operation Id + /// WorkflowRunActions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _workflowRunActionClientDiagnostics.CreateScope("WorkflowRunActionResource.Get"); + scope.Start(); + try + { + var response = await _workflowRunActionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunActionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a workflow run action. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName} + /// + /// + /// Operation Id + /// WorkflowRunActions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _workflowRunActionClientDiagnostics.CreateScope("WorkflowRunActionResource.Get"); + scope.Start(); + try + { + var response = _workflowRunActionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunActionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists a workflow run expression trace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/listExpressionTraces + /// + /// + /// Operation Id + /// WorkflowRunActions_ListExpressionTraces + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetExpressionTracesAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowRunActionRestClient.CreateListExpressionTracesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowRunActionRestClient.CreateListExpressionTracesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => WorkflowExpressionRoot.DeserializeWorkflowExpressionRoot(e), _workflowRunActionClientDiagnostics, Pipeline, "WorkflowRunActionResource.GetExpressionTraces", "inputs", "nextLink", cancellationToken); + } + + /// + /// Lists a workflow run expression trace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/listExpressionTraces + /// + /// + /// Operation Id + /// WorkflowRunActions_ListExpressionTraces + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetExpressionTraces(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowRunActionRestClient.CreateListExpressionTracesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowRunActionRestClient.CreateListExpressionTracesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => WorkflowExpressionRoot.DeserializeWorkflowExpressionRoot(e), _workflowRunActionClientDiagnostics, Pipeline, "WorkflowRunActionResource.GetExpressionTraces", "inputs", "nextLink", cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionScopeRepetitionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionScopeRepetitionCollection.cs new file mode 100644 index 0000000000000..9c864f66b4e6e --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionScopeRepetitionCollection.cs @@ -0,0 +1,395 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetWorkflowRunActionScopeRepetitions method from an instance of . + /// + public partial class WorkflowRunActionScopeRepetitionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _workflowRunActionScopeRepetitionClientDiagnostics; + private readonly WorkflowRunActionScopeRepetitionsRestOperations _workflowRunActionScopeRepetitionRestClient; + + /// Initializes a new instance of the class for mocking. + protected WorkflowRunActionScopeRepetitionCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal WorkflowRunActionScopeRepetitionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _workflowRunActionScopeRepetitionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", WorkflowRunActionScopeRepetitionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(WorkflowRunActionScopeRepetitionResource.ResourceType, out string workflowRunActionScopeRepetitionApiVersion); + _workflowRunActionScopeRepetitionRestClient = new WorkflowRunActionScopeRepetitionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workflowRunActionScopeRepetitionApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != WorkflowRunActionResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WorkflowRunActionResource.ResourceType), nameof(id)); + } + + /// + /// Get a workflow run action scoped repetition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionScopeRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow repetition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var scope = _workflowRunActionScopeRepetitionClientDiagnostics.CreateScope("WorkflowRunActionScopeRepetitionCollection.Get"); + scope.Start(); + try + { + var response = await _workflowRunActionScopeRepetitionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, repetitionName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunActionScopeRepetitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a workflow run action scoped repetition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionScopeRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow repetition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var scope = _workflowRunActionScopeRepetitionClientDiagnostics.CreateScope("WorkflowRunActionScopeRepetitionCollection.Get"); + scope.Start(); + try + { + var response = _workflowRunActionScopeRepetitionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, repetitionName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunActionScopeRepetitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List the workflow run action scoped repetitions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions + /// + /// + /// Operation Id + /// WorkflowRunActionScopeRepetitions_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowRunActionScopeRepetitionRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowRunActionScopeRepetitionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WorkflowRunActionScopeRepetitionResource(Client, WorkflowRunActionRepetitionDefinitionData.DeserializeWorkflowRunActionRepetitionDefinitionData(e)), _workflowRunActionScopeRepetitionClientDiagnostics, Pipeline, "WorkflowRunActionScopeRepetitionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List the workflow run action scoped repetitions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions + /// + /// + /// Operation Id + /// WorkflowRunActionScopeRepetitions_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowRunActionScopeRepetitionRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowRunActionScopeRepetitionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WorkflowRunActionScopeRepetitionResource(Client, WorkflowRunActionRepetitionDefinitionData.DeserializeWorkflowRunActionRepetitionDefinitionData(e)), _workflowRunActionScopeRepetitionClientDiagnostics, Pipeline, "WorkflowRunActionScopeRepetitionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionScopeRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow repetition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var scope = _workflowRunActionScopeRepetitionClientDiagnostics.CreateScope("WorkflowRunActionScopeRepetitionCollection.Exists"); + scope.Start(); + try + { + var response = await _workflowRunActionScopeRepetitionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, repetitionName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionScopeRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow repetition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var scope = _workflowRunActionScopeRepetitionClientDiagnostics.CreateScope("WorkflowRunActionScopeRepetitionCollection.Exists"); + scope.Start(); + try + { + var response = _workflowRunActionScopeRepetitionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, repetitionName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionScopeRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow repetition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var scope = _workflowRunActionScopeRepetitionClientDiagnostics.CreateScope("WorkflowRunActionScopeRepetitionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _workflowRunActionScopeRepetitionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, repetitionName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunActionScopeRepetitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionScopeRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow repetition. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string repetitionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(repetitionName, nameof(repetitionName)); + + using var scope = _workflowRunActionScopeRepetitionClientDiagnostics.CreateScope("WorkflowRunActionScopeRepetitionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _workflowRunActionScopeRepetitionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, repetitionName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunActionScopeRepetitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionScopeRepetitionResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionScopeRepetitionResource.Serialization.cs new file mode 100644 index 0000000000000..5341bc08a3c46 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionScopeRepetitionResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppService +{ + public partial class WorkflowRunActionScopeRepetitionResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + WorkflowRunActionRepetitionDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + WorkflowRunActionRepetitionDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionScopeRepetitionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionScopeRepetitionResource.cs new file mode 100644 index 0000000000000..3e18c122ddfcc --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionScopeRepetitionResource.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a WorkflowRunActionScopeRepetition along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetWorkflowRunActionScopeRepetitionResource method. + /// Otherwise you can get one from its parent resource using the GetWorkflowRunActionScopeRepetition method. + /// + public partial class WorkflowRunActionScopeRepetitionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + /// The workflowName. + /// The runName. + /// The actionName. + /// The repetitionName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName, string actionName, string repetitionName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _workflowRunActionScopeRepetitionClientDiagnostics; + private readonly WorkflowRunActionScopeRepetitionsRestOperations _workflowRunActionScopeRepetitionRestClient; + private readonly WorkflowRunActionRepetitionDefinitionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Web/sites/hostruntime/webhooks/api/workflows/runs/actions/scopeRepetitions"; + + /// Initializes a new instance of the class for mocking. + protected WorkflowRunActionScopeRepetitionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal WorkflowRunActionScopeRepetitionResource(ArmClient client, WorkflowRunActionRepetitionDefinitionData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal WorkflowRunActionScopeRepetitionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _workflowRunActionScopeRepetitionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string workflowRunActionScopeRepetitionApiVersion); + _workflowRunActionScopeRepetitionRestClient = new WorkflowRunActionScopeRepetitionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workflowRunActionScopeRepetitionApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual WorkflowRunActionRepetitionDefinitionData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a workflow run action scoped repetition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionScopeRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _workflowRunActionScopeRepetitionClientDiagnostics.CreateScope("WorkflowRunActionScopeRepetitionResource.Get"); + scope.Start(); + try + { + var response = await _workflowRunActionScopeRepetitionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunActionScopeRepetitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a workflow run action scoped repetition. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName} + /// + /// + /// Operation Id + /// WorkflowRunActionScopeRepetitions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _workflowRunActionScopeRepetitionClientDiagnostics.CreateScope("WorkflowRunActionScopeRepetitionResource.Get"); + scope.Start(); + try + { + var response = _workflowRunActionScopeRepetitionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunActionScopeRepetitionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunCollection.cs new file mode 100644 index 0000000000000..e3abf161a9422 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunCollection.cs @@ -0,0 +1,404 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetWorkflowRuns method from an instance of . + /// + public partial class WorkflowRunCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _workflowRunClientDiagnostics; + private readonly WorkflowRunsRestOperations _workflowRunRestClient; + private readonly string _workflowName; + + /// Initializes a new instance of the class for mocking. + protected WorkflowRunCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + /// The workflow name. + /// is null. + /// is an empty string, and was expected to be non-empty. + internal WorkflowRunCollection(ArmClient client, ResourceIdentifier id, string workflowName) : base(client, id) + { + _workflowName = workflowName; + _workflowRunClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", WorkflowRunResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(WorkflowRunResource.ResourceType, out string workflowRunApiVersion); + _workflowRunRestClient = new WorkflowRunsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workflowRunApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != WebSiteResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WebSiteResource.ResourceType), nameof(id)); + } + + /// + /// Gets a workflow run. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName} + /// + /// + /// Operation Id + /// WorkflowRuns_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow run name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string runName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + + using var scope = _workflowRunClientDiagnostics.CreateScope("WorkflowRunCollection.Get"); + scope.Start(); + try + { + var response = await _workflowRunRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, runName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a workflow run. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName} + /// + /// + /// Operation Id + /// WorkflowRuns_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow run name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string runName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + + using var scope = _workflowRunClientDiagnostics.CreateScope("WorkflowRunCollection.Get"); + scope.Start(); + try + { + var response = _workflowRunRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, runName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a list of workflow runs. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs + /// + /// + /// Operation Id + /// WorkflowRuns_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The number of items to be included in the result. + /// The filter to apply on the operation. Options for filters include: Status, StartTime, and ClientTrackingId. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowRunRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, top, filter); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowRunRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, top, filter); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WorkflowRunResource(Client, WorkflowRunData.DeserializeWorkflowRunData(e)), _workflowRunClientDiagnostics, Pipeline, "WorkflowRunCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets a list of workflow runs. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs + /// + /// + /// Operation Id + /// WorkflowRuns_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The number of items to be included in the result. + /// The filter to apply on the operation. Options for filters include: Status, StartTime, and ClientTrackingId. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowRunRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, top, filter); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowRunRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, top, filter); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WorkflowRunResource(Client, WorkflowRunData.DeserializeWorkflowRunData(e)), _workflowRunClientDiagnostics, Pipeline, "WorkflowRunCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName} + /// + /// + /// Operation Id + /// WorkflowRuns_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow run name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string runName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + + using var scope = _workflowRunClientDiagnostics.CreateScope("WorkflowRunCollection.Exists"); + scope.Start(); + try + { + var response = await _workflowRunRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, runName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName} + /// + /// + /// Operation Id + /// WorkflowRuns_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow run name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string runName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + + using var scope = _workflowRunClientDiagnostics.CreateScope("WorkflowRunCollection.Exists"); + scope.Start(); + try + { + var response = _workflowRunRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, runName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName} + /// + /// + /// Operation Id + /// WorkflowRuns_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow run name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string runName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + + using var scope = _workflowRunClientDiagnostics.CreateScope("WorkflowRunCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _workflowRunRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, runName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName} + /// + /// + /// Operation Id + /// WorkflowRuns_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow run name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string runName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(runName, nameof(runName)); + + using var scope = _workflowRunClientDiagnostics.CreateScope("WorkflowRunCollection.GetIfExists"); + scope.Start(); + try + { + var response = _workflowRunRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, runName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunData.Serialization.cs new file mode 100644 index 0000000000000..33bdf6e9035f0 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunData.Serialization.cs @@ -0,0 +1,671 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class WorkflowRunData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRunData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(WaitEndOn)) + { + writer.WritePropertyName("waitEndTime"u8); + writer.WriteStringValue(WaitEndOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(StartOn)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(EndOn)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + } + if (options.Format != "W" && Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Error); +#else + using (JsonDocument document = JsonDocument.Parse(Error)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (options.Format != "W" && Optional.IsDefined(CorrelationId)) + { + writer.WritePropertyName("correlationId"u8); + writer.WriteStringValue(CorrelationId); + } + if (Optional.IsDefined(Correlation)) + { + writer.WritePropertyName("correlation"u8); + writer.WriteObjectValue(Correlation, options); + } + if (options.Format != "W" && Optional.IsDefined(Workflow)) + { + writer.WritePropertyName("workflow"u8); + writer.WriteObjectValue(Workflow, options); + } + if (options.Format != "W" && Optional.IsDefined(Trigger)) + { + writer.WritePropertyName("trigger"u8); + writer.WriteObjectValue(Trigger, options); + } + if (options.Format != "W" && Optional.IsCollectionDefined(Outputs)) + { + writer.WritePropertyName("outputs"u8); + writer.WriteStartObject(); + foreach (var item in Outputs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && Optional.IsDefined(Response)) + { + writer.WritePropertyName("response"u8); + writer.WriteObjectValue(Response, options); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowRunData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowRunData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowRunData(document.RootElement, options); + } + + internal static WorkflowRunData DeserializeWorkflowRunData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + DateTimeOffset? waitEndTime = default; + DateTimeOffset? startTime = default; + DateTimeOffset? endTime = default; + WorkflowStatus? status = default; + string code = default; + BinaryData error = default; + string correlationId = default; + Correlation correlation = default; + WorkflowResourceReference workflow = default; + WorkflowRunTrigger trigger = default; + IReadOnlyDictionary outputs = default; + WorkflowRunTrigger response = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("waitEndTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + waitEndTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("startTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("endTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("status"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new WorkflowStatus(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("code"u8)) + { + code = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("error"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = BinaryData.FromString(property0.Value.GetRawText()); + continue; + } + if (property0.NameEquals("correlationId"u8)) + { + correlationId = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("correlation"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + correlation = Correlation.DeserializeCorrelation(property0.Value, options); + continue; + } + if (property0.NameEquals("workflow"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + workflow = WorkflowResourceReference.DeserializeWorkflowResourceReference(property0.Value, options); + continue; + } + if (property0.NameEquals("trigger"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + trigger = WorkflowRunTrigger.DeserializeWorkflowRunTrigger(property0.Value, options); + continue; + } + if (property0.NameEquals("outputs"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + dictionary.Add(property1.Name, WorkflowOutputContent.DeserializeWorkflowOutputContent(property1.Value, options)); + } + outputs = dictionary; + continue; + } + if (property0.NameEquals("response"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + response = WorkflowRunTrigger.DeserializeWorkflowRunTrigger(property0.Value, options); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowRunData( + id, + name, + type, + systemData, + waitEndTime, + startTime, + endTime, + status, + code, + error, + correlationId, + correlation, + workflow, + trigger, + outputs ?? new ChangeTrackingDictionary(), + response, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(WaitEndOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" waitEndTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(WaitEndOn)) + { + builder.Append(" waitEndTime: "); + var formattedDateTimeString = TypeFormatters.ToString(WaitEndOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StartOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" startTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StartOn)) + { + builder.Append(" startTime: "); + var formattedDateTimeString = TypeFormatters.ToString(StartOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EndOn)) + { + builder.Append(" endTime: "); + var formattedDateTimeString = TypeFormatters.ToString(EndOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" status: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Status)) + { + builder.Append(" status: "); + builder.AppendLine($"'{Status.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Code), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" code: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Code)) + { + builder.Append(" code: "); + if (Code.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Code}'''"); + } + else + { + builder.AppendLine($"'{Code}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Error), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" error: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Error)) + { + builder.Append(" error: "); + builder.AppendLine($"'{Error.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CorrelationId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" correlationId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CorrelationId)) + { + builder.Append(" correlationId: "); + if (CorrelationId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{CorrelationId}'''"); + } + else + { + builder.AppendLine($"'{CorrelationId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("CorrelationClientTrackingId", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" correlation: "); + builder.AppendLine("{"); + builder.AppendLine(" correlation: {"); + builder.Append(" clientTrackingId: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Correlation)) + { + builder.Append(" correlation: "); + BicepSerializationHelpers.AppendChildObject(builder, Correlation, options, 4, false, " correlation: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Workflow), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" workflow: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Workflow)) + { + builder.Append(" workflow: "); + BicepSerializationHelpers.AppendChildObject(builder, Workflow, options, 4, false, " workflow: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Trigger), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" trigger: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Trigger)) + { + builder.Append(" trigger: "); + BicepSerializationHelpers.AppendChildObject(builder, Trigger, options, 4, false, " trigger: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Outputs), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" outputs: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Outputs)) + { + if (Outputs.Any()) + { + builder.Append(" outputs: "); + builder.AppendLine("{"); + foreach (var item in Outputs) + { + builder.Append($" '{item.Key}': "); + BicepSerializationHelpers.AppendChildObject(builder, item.Value, options, 6, false, " outputs: "); + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Response), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" response: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Response)) + { + builder.Append(" response: "); + BicepSerializationHelpers.AppendChildObject(builder, Response, options, 4, false, " response: "); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowRunData)} does not support writing '{options.Format}' format."); + } + } + + WorkflowRunData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowRunData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowRunData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunData.cs new file mode 100644 index 0000000000000..5626e56b7fe8f --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunData.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing the WorkflowRun data model. + /// The workflow run. + /// + public partial class WorkflowRunData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WorkflowRunData() + { + Outputs = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Gets the wait end time. + /// Gets the start time. + /// Gets the end time. + /// Gets the status. + /// Gets the code. + /// Gets the error. + /// Gets the correlation id. + /// The run correlation. + /// Gets the reference to workflow version. + /// Gets the fired trigger. + /// Gets the outputs. + /// Gets the response of the flow run. + /// Keeps track of any properties unknown to the library. + internal WorkflowRunData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DateTimeOffset? waitEndOn, DateTimeOffset? startOn, DateTimeOffset? endOn, WorkflowStatus? status, string code, BinaryData error, string correlationId, Correlation correlation, WorkflowResourceReference workflow, WorkflowRunTrigger trigger, IReadOnlyDictionary outputs, WorkflowRunTrigger response, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + WaitEndOn = waitEndOn; + StartOn = startOn; + EndOn = endOn; + Status = status; + Code = code; + Error = error; + CorrelationId = correlationId; + Correlation = correlation; + Workflow = workflow; + Trigger = trigger; + Outputs = outputs; + Response = response; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets the wait end time. + [WirePath("properties.waitEndTime")] + public DateTimeOffset? WaitEndOn { get; } + /// Gets the start time. + [WirePath("properties.startTime")] + public DateTimeOffset? StartOn { get; } + /// Gets the end time. + [WirePath("properties.endTime")] + public DateTimeOffset? EndOn { get; } + /// Gets the status. + [WirePath("properties.status")] + public WorkflowStatus? Status { get; } + /// Gets the code. + [WirePath("properties.code")] + public string Code { get; } + /// + /// Gets the error. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("properties.error")] + public BinaryData Error { get; } + /// Gets the correlation id. + [WirePath("properties.correlationId")] + public string CorrelationId { get; } + /// The run correlation. + internal Correlation Correlation { get; } + /// The client tracking id. + [WirePath("properties.correlation.clientTrackingId")] + public string CorrelationClientTrackingId + { + get => Correlation?.ClientTrackingId; + } + + /// Gets the reference to workflow version. + [WirePath("properties.workflow")] + public WorkflowResourceReference Workflow { get; } + /// Gets the fired trigger. + [WirePath("properties.trigger")] + public WorkflowRunTrigger Trigger { get; } + /// Gets the outputs. + [WirePath("properties.outputs")] + public IReadOnlyDictionary Outputs { get; } + /// Gets the response of the flow run. + [WirePath("properties.response")] + public WorkflowRunTrigger Response { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunResource.Serialization.cs new file mode 100644 index 0000000000000..60b4967ae0adc --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppService +{ + public partial class WorkflowRunResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + WorkflowRunData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + WorkflowRunData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunResource.cs new file mode 100644 index 0000000000000..9b40ee2f0c27c --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunResource.cs @@ -0,0 +1,317 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a WorkflowRun along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetWorkflowRunResource method. + /// Otherwise you can get one from its parent resource using the GetWorkflowRun method. + /// + public partial class WorkflowRunResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + /// The workflowName. + /// The runName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string workflowName, string runName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _workflowRunClientDiagnostics; + private readonly WorkflowRunsRestOperations _workflowRunRestClient; + private readonly WorkflowRunData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Web/sites/hostruntime/webhooks/api/workflows/runs"; + + /// Initializes a new instance of the class for mocking. + protected WorkflowRunResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal WorkflowRunResource(ArmClient client, WorkflowRunData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal WorkflowRunResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _workflowRunClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string workflowRunApiVersion); + _workflowRunRestClient = new WorkflowRunsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workflowRunApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual WorkflowRunData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of WorkflowRunActionResources in the WorkflowRun. + /// An object representing collection of WorkflowRunActionResources and their operations over a WorkflowRunActionResource. + public virtual WorkflowRunActionCollection GetWorkflowRunActions() + { + return GetCachedClient(client => new WorkflowRunActionCollection(client, Id)); + } + + /// + /// Gets a workflow run action. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName} + /// + /// + /// Operation Id + /// WorkflowRunActions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow action name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetWorkflowRunActionAsync(string actionName, CancellationToken cancellationToken = default) + { + return await GetWorkflowRunActions().GetAsync(actionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a workflow run action. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName} + /// + /// + /// Operation Id + /// WorkflowRunActions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow action name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetWorkflowRunAction(string actionName, CancellationToken cancellationToken = default) + { + return GetWorkflowRunActions().Get(actionName, cancellationToken); + } + + /// + /// Gets a workflow run. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName} + /// + /// + /// Operation Id + /// WorkflowRuns_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _workflowRunClientDiagnostics.CreateScope("WorkflowRunResource.Get"); + scope.Start(); + try + { + var response = await _workflowRunRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a workflow run. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName} + /// + /// + /// Operation Id + /// WorkflowRuns_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _workflowRunClientDiagnostics.CreateScope("WorkflowRunResource.Get"); + scope.Start(); + try + { + var response = _workflowRunRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowRunResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Cancels a workflow run. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/cancel + /// + /// + /// Operation Id + /// WorkflowRuns_Cancel + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task CancelAsync(CancellationToken cancellationToken = default) + { + using var scope = _workflowRunClientDiagnostics.CreateScope("WorkflowRunResource.Cancel"); + scope.Start(); + try + { + var response = await _workflowRunRestClient.CancelAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Cancels a workflow run. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/cancel + /// + /// + /// Operation Id + /// WorkflowRuns_Cancel + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Cancel(CancellationToken cancellationToken = default) + { + using var scope = _workflowRunClientDiagnostics.CreateScope("WorkflowRunResource.Cancel"); + scope.Start(); + try + { + var response = _workflowRunRestClient.Cancel(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerCollection.cs new file mode 100644 index 0000000000000..ada54dff1f98b --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerCollection.cs @@ -0,0 +1,404 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetWorkflowTriggers method from an instance of . + /// + public partial class WorkflowTriggerCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _workflowTriggerClientDiagnostics; + private readonly WorkflowTriggersRestOperations _workflowTriggerRestClient; + private readonly string _workflowName; + + /// Initializes a new instance of the class for mocking. + protected WorkflowTriggerCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + /// The workflow name. + /// is null. + /// is an empty string, and was expected to be non-empty. + internal WorkflowTriggerCollection(ArmClient client, ResourceIdentifier id, string workflowName) : base(client, id) + { + _workflowName = workflowName; + _workflowTriggerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", WorkflowTriggerResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(WorkflowTriggerResource.ResourceType, out string workflowTriggerApiVersion); + _workflowTriggerRestClient = new WorkflowTriggersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workflowTriggerApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != WebSiteResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WebSiteResource.ResourceType), nameof(id)); + } + + /// + /// Gets a workflow trigger. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName} + /// + /// + /// Operation Id + /// WorkflowTriggers_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow trigger name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string triggerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + + using var scope = _workflowTriggerClientDiagnostics.CreateScope("WorkflowTriggerCollection.Get"); + scope.Start(); + try + { + var response = await _workflowTriggerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, triggerName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowTriggerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a workflow trigger. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName} + /// + /// + /// Operation Id + /// WorkflowTriggers_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow trigger name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string triggerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + + using var scope = _workflowTriggerClientDiagnostics.CreateScope("WorkflowTriggerCollection.Get"); + scope.Start(); + try + { + var response = _workflowTriggerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, triggerName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowTriggerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a list of workflow triggers. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers + /// + /// + /// Operation Id + /// WorkflowTriggers_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The number of items to be included in the result. + /// The filter to apply on the operation. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowTriggerRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, top, filter); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowTriggerRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, top, filter); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WorkflowTriggerResource(Client, WorkflowTriggerData.DeserializeWorkflowTriggerData(e)), _workflowTriggerClientDiagnostics, Pipeline, "WorkflowTriggerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets a list of workflow triggers. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers + /// + /// + /// Operation Id + /// WorkflowTriggers_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The number of items to be included in the result. + /// The filter to apply on the operation. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowTriggerRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, top, filter); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowTriggerRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, top, filter); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WorkflowTriggerResource(Client, WorkflowTriggerData.DeserializeWorkflowTriggerData(e)), _workflowTriggerClientDiagnostics, Pipeline, "WorkflowTriggerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName} + /// + /// + /// Operation Id + /// WorkflowTriggers_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow trigger name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string triggerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + + using var scope = _workflowTriggerClientDiagnostics.CreateScope("WorkflowTriggerCollection.Exists"); + scope.Start(); + try + { + var response = await _workflowTriggerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, triggerName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName} + /// + /// + /// Operation Id + /// WorkflowTriggers_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow trigger name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string triggerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + + using var scope = _workflowTriggerClientDiagnostics.CreateScope("WorkflowTriggerCollection.Exists"); + scope.Start(); + try + { + var response = _workflowTriggerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, triggerName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName} + /// + /// + /// Operation Id + /// WorkflowTriggers_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow trigger name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string triggerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + + using var scope = _workflowTriggerClientDiagnostics.CreateScope("WorkflowTriggerCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _workflowTriggerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, triggerName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WorkflowTriggerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName} + /// + /// + /// Operation Id + /// WorkflowTriggers_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow trigger name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string triggerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(triggerName, nameof(triggerName)); + + using var scope = _workflowTriggerClientDiagnostics.CreateScope("WorkflowTriggerCollection.GetIfExists"); + scope.Start(); + try + { + var response = _workflowTriggerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, triggerName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WorkflowTriggerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerData.Serialization.cs new file mode 100644 index 0000000000000..389d0863840b2 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerData.Serialization.cs @@ -0,0 +1,538 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class WorkflowTriggerData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowTriggerData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(CreatedOn)) + { + writer.WritePropertyName("createdTime"u8); + writer.WriteStringValue(CreatedOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(ChangedOn)) + { + writer.WritePropertyName("changedTime"u8); + writer.WriteStringValue(ChangedOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(LastExecutionOn)) + { + writer.WritePropertyName("lastExecutionTime"u8); + writer.WriteStringValue(LastExecutionOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(NextExecutionOn)) + { + writer.WritePropertyName("nextExecutionTime"u8); + writer.WriteStringValue(NextExecutionOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(Recurrence)) + { + writer.WritePropertyName("recurrence"u8); + writer.WriteObjectValue(Recurrence, options); + } + if (options.Format != "W" && Optional.IsDefined(Workflow)) + { + writer.WritePropertyName("workflow"u8); + writer.WriteObjectValue(Workflow, options); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowTriggerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowTriggerData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowTriggerData(document.RootElement, options); + } + + internal static WorkflowTriggerData DeserializeWorkflowTriggerData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + WorkflowTriggerProvisioningState? provisioningState = default; + DateTimeOffset? createdTime = default; + DateTimeOffset? changedTime = default; + WorkflowState? state = default; + WorkflowStatus? status = default; + DateTimeOffset? lastExecutionTime = default; + DateTimeOffset? nextExecutionTime = default; + WorkflowTriggerRecurrence recurrence = default; + WorkflowResourceReference workflow = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new WorkflowTriggerProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("createdTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createdTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("changedTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + changedTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("state"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new WorkflowState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("status"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new WorkflowStatus(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("lastExecutionTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastExecutionTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("nextExecutionTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextExecutionTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("recurrence"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recurrence = WorkflowTriggerRecurrence.DeserializeWorkflowTriggerRecurrence(property0.Value, options); + continue; + } + if (property0.NameEquals("workflow"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + workflow = WorkflowResourceReference.DeserializeWorkflowResourceReference(property0.Value, options); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowTriggerData( + id, + name, + type, + systemData, + provisioningState, + createdTime, + changedTime, + state, + status, + lastExecutionTime, + nextExecutionTime, + recurrence, + workflow, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + builder.AppendLine($"'{ProvisioningState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CreatedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" createdTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CreatedOn)) + { + builder.Append(" createdTime: "); + var formattedDateTimeString = TypeFormatters.ToString(CreatedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ChangedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" changedTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ChangedOn)) + { + builder.Append(" changedTime: "); + var formattedDateTimeString = TypeFormatters.ToString(ChangedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(State), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" state: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(State)) + { + builder.Append(" state: "); + builder.AppendLine($"'{State.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" status: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Status)) + { + builder.Append(" status: "); + builder.AppendLine($"'{Status.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastExecutionOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastExecutionTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LastExecutionOn)) + { + builder.Append(" lastExecutionTime: "); + var formattedDateTimeString = TypeFormatters.ToString(LastExecutionOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextExecutionOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextExecutionTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextExecutionOn)) + { + builder.Append(" nextExecutionTime: "); + var formattedDateTimeString = TypeFormatters.ToString(NextExecutionOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Recurrence), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" recurrence: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Recurrence)) + { + builder.Append(" recurrence: "); + BicepSerializationHelpers.AppendChildObject(builder, Recurrence, options, 4, false, " recurrence: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Workflow), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" workflow: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Workflow)) + { + builder.Append(" workflow: "); + BicepSerializationHelpers.AppendChildObject(builder, Workflow, options, 4, false, " workflow: "); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowTriggerData)} does not support writing '{options.Format}' format."); + } + } + + WorkflowTriggerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowTriggerData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowTriggerData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerData.cs new file mode 100644 index 0000000000000..7190ba888b7a7 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerData.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing the WorkflowTrigger data model. + /// The workflow trigger. + /// + public partial class WorkflowTriggerData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WorkflowTriggerData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Gets the provisioning state. + /// Gets the created time. + /// Gets the changed time. + /// Gets the state. + /// Gets the status. + /// Gets the last execution time. + /// Gets the next execution time. + /// Gets the workflow trigger recurrence. + /// Gets the reference to workflow. + /// Keeps track of any properties unknown to the library. + internal WorkflowTriggerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, WorkflowTriggerProvisioningState? provisioningState, DateTimeOffset? createdOn, DateTimeOffset? changedOn, WorkflowState? state, WorkflowStatus? status, DateTimeOffset? lastExecutionOn, DateTimeOffset? nextExecutionOn, WorkflowTriggerRecurrence recurrence, WorkflowResourceReference workflow, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + ProvisioningState = provisioningState; + CreatedOn = createdOn; + ChangedOn = changedOn; + State = state; + Status = status; + LastExecutionOn = lastExecutionOn; + NextExecutionOn = nextExecutionOn; + Recurrence = recurrence; + Workflow = workflow; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets the provisioning state. + [WirePath("properties.provisioningState")] + public WorkflowTriggerProvisioningState? ProvisioningState { get; } + /// Gets the created time. + [WirePath("properties.createdTime")] + public DateTimeOffset? CreatedOn { get; } + /// Gets the changed time. + [WirePath("properties.changedTime")] + public DateTimeOffset? ChangedOn { get; } + /// Gets the state. + [WirePath("properties.state")] + public WorkflowState? State { get; } + /// Gets the status. + [WirePath("properties.status")] + public WorkflowStatus? Status { get; } + /// Gets the last execution time. + [WirePath("properties.lastExecutionTime")] + public DateTimeOffset? LastExecutionOn { get; } + /// Gets the next execution time. + [WirePath("properties.nextExecutionTime")] + public DateTimeOffset? NextExecutionOn { get; } + /// Gets the workflow trigger recurrence. + [WirePath("properties.recurrence")] + public WorkflowTriggerRecurrence Recurrence { get; } + /// Gets the reference to workflow. + [WirePath("properties.workflow")] + public WorkflowResourceReference Workflow { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryCollection.cs new file mode 100644 index 0000000000000..240a1e91a3cdc --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryCollection.cs @@ -0,0 +1,399 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetWorkflowTriggerHistories method from an instance of . + /// + public partial class WorkflowTriggerHistoryCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _workflowTriggerHistoryClientDiagnostics; + private readonly WorkflowTriggerHistoriesRestOperations _workflowTriggerHistoryRestClient; + + /// Initializes a new instance of the class for mocking. + protected WorkflowTriggerHistoryCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal WorkflowTriggerHistoryCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _workflowTriggerHistoryClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", WorkflowTriggerHistoryResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(WorkflowTriggerHistoryResource.ResourceType, out string workflowTriggerHistoryApiVersion); + _workflowTriggerHistoryRestClient = new WorkflowTriggerHistoriesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workflowTriggerHistoryApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != WorkflowTriggerResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WorkflowTriggerResource.ResourceType), nameof(id)); + } + + /// + /// Gets a workflow trigger history. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName} + /// + /// + /// Operation Id + /// WorkflowTriggerHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string historyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(historyName, nameof(historyName)); + + using var scope = _workflowTriggerHistoryClientDiagnostics.CreateScope("WorkflowTriggerHistoryCollection.Get"); + scope.Start(); + try + { + var response = await _workflowTriggerHistoryRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, historyName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowTriggerHistoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a workflow trigger history. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName} + /// + /// + /// Operation Id + /// WorkflowTriggerHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string historyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(historyName, nameof(historyName)); + + using var scope = _workflowTriggerHistoryClientDiagnostics.CreateScope("WorkflowTriggerHistoryCollection.Get"); + scope.Start(); + try + { + var response = _workflowTriggerHistoryRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, historyName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowTriggerHistoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a list of workflow trigger histories. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories + /// + /// + /// Operation Id + /// WorkflowTriggerHistories_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The number of items to be included in the result. + /// The filter to apply on the operation. Options for filters include: Status, StartTime, and ClientTrackingId. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowTriggerHistoryRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, top, filter); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowTriggerHistoryRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, top, filter); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WorkflowTriggerHistoryResource(Client, WorkflowTriggerHistoryData.DeserializeWorkflowTriggerHistoryData(e)), _workflowTriggerHistoryClientDiagnostics, Pipeline, "WorkflowTriggerHistoryCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets a list of workflow trigger histories. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories + /// + /// + /// Operation Id + /// WorkflowTriggerHistories_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The number of items to be included in the result. + /// The filter to apply on the operation. Options for filters include: Status, StartTime, and ClientTrackingId. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(int? top = null, string filter = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowTriggerHistoryRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, top, filter); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowTriggerHistoryRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, top, filter); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WorkflowTriggerHistoryResource(Client, WorkflowTriggerHistoryData.DeserializeWorkflowTriggerHistoryData(e)), _workflowTriggerHistoryClientDiagnostics, Pipeline, "WorkflowTriggerHistoryCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName} + /// + /// + /// Operation Id + /// WorkflowTriggerHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string historyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(historyName, nameof(historyName)); + + using var scope = _workflowTriggerHistoryClientDiagnostics.CreateScope("WorkflowTriggerHistoryCollection.Exists"); + scope.Start(); + try + { + var response = await _workflowTriggerHistoryRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, historyName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName} + /// + /// + /// Operation Id + /// WorkflowTriggerHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string historyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(historyName, nameof(historyName)); + + using var scope = _workflowTriggerHistoryClientDiagnostics.CreateScope("WorkflowTriggerHistoryCollection.Exists"); + scope.Start(); + try + { + var response = _workflowTriggerHistoryRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, historyName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName} + /// + /// + /// Operation Id + /// WorkflowTriggerHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string historyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(historyName, nameof(historyName)); + + using var scope = _workflowTriggerHistoryClientDiagnostics.CreateScope("WorkflowTriggerHistoryCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _workflowTriggerHistoryRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, historyName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WorkflowTriggerHistoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName} + /// + /// + /// Operation Id + /// WorkflowTriggerHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string historyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(historyName, nameof(historyName)); + + using var scope = _workflowTriggerHistoryClientDiagnostics.CreateScope("WorkflowTriggerHistoryCollection.GetIfExists"); + scope.Start(); + try + { + var response = _workflowTriggerHistoryRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, historyName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WorkflowTriggerHistoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryData.Serialization.cs new file mode 100644 index 0000000000000..0ae8a6732f36b --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryData.Serialization.cs @@ -0,0 +1,651 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class WorkflowTriggerHistoryData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowTriggerHistoryData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(StartOn)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(EndOn)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(ScheduledOn)) + { + writer.WritePropertyName("scheduledTime"u8); + writer.WriteStringValue(ScheduledOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + } + if (options.Format != "W" && Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Error); +#else + using (JsonDocument document = JsonDocument.Parse(Error)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (options.Format != "W" && Optional.IsDefined(TrackingId)) + { + writer.WritePropertyName("trackingId"u8); + writer.WriteStringValue(TrackingId); + } + if (Optional.IsDefined(Correlation)) + { + writer.WritePropertyName("correlation"u8); + writer.WriteObjectValue(Correlation, options); + } + if (options.Format != "W" && Optional.IsDefined(InputsLink)) + { + writer.WritePropertyName("inputsLink"u8); + writer.WriteObjectValue(InputsLink, options); + } + if (options.Format != "W" && Optional.IsDefined(OutputsLink)) + { + writer.WritePropertyName("outputsLink"u8); + writer.WriteObjectValue(OutputsLink, options); + } + if (options.Format != "W" && Optional.IsDefined(IsFired)) + { + writer.WritePropertyName("fired"u8); + writer.WriteBooleanValue(IsFired.Value); + } + if (options.Format != "W" && Optional.IsDefined(Run)) + { + writer.WritePropertyName("run"u8); + writer.WriteObjectValue(Run, options); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowTriggerHistoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowTriggerHistoryData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowTriggerHistoryData(document.RootElement, options); + } + + internal static WorkflowTriggerHistoryData DeserializeWorkflowTriggerHistoryData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + DateTimeOffset? startTime = default; + DateTimeOffset? endTime = default; + DateTimeOffset? scheduledTime = default; + WorkflowStatus? status = default; + string code = default; + BinaryData error = default; + string trackingId = default; + Correlation correlation = default; + WebAppContentLink inputsLink = default; + WebAppContentLink outputsLink = default; + bool? fired = default; + WorkflowResourceReference run = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("startTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("endTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("scheduledTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scheduledTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("status"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new WorkflowStatus(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("code"u8)) + { + code = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("error"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = BinaryData.FromString(property0.Value.GetRawText()); + continue; + } + if (property0.NameEquals("trackingId"u8)) + { + trackingId = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("correlation"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + correlation = Correlation.DeserializeCorrelation(property0.Value, options); + continue; + } + if (property0.NameEquals("inputsLink"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inputsLink = WebAppContentLink.DeserializeWebAppContentLink(property0.Value, options); + continue; + } + if (property0.NameEquals("outputsLink"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + outputsLink = WebAppContentLink.DeserializeWebAppContentLink(property0.Value, options); + continue; + } + if (property0.NameEquals("fired"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + fired = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("run"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + run = WorkflowResourceReference.DeserializeWorkflowResourceReference(property0.Value, options); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowTriggerHistoryData( + id, + name, + type, + systemData, + startTime, + endTime, + scheduledTime, + status, + code, + error, + trackingId, + correlation, + inputsLink, + outputsLink, + fired, + run, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StartOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" startTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StartOn)) + { + builder.Append(" startTime: "); + var formattedDateTimeString = TypeFormatters.ToString(StartOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EndOn)) + { + builder.Append(" endTime: "); + var formattedDateTimeString = TypeFormatters.ToString(EndOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScheduledOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scheduledTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ScheduledOn)) + { + builder.Append(" scheduledTime: "); + var formattedDateTimeString = TypeFormatters.ToString(ScheduledOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" status: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Status)) + { + builder.Append(" status: "); + builder.AppendLine($"'{Status.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Code), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" code: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Code)) + { + builder.Append(" code: "); + if (Code.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Code}'''"); + } + else + { + builder.AppendLine($"'{Code}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Error), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" error: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Error)) + { + builder.Append(" error: "); + builder.AppendLine($"'{Error.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TrackingId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" trackingId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TrackingId)) + { + builder.Append(" trackingId: "); + if (TrackingId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TrackingId}'''"); + } + else + { + builder.AppendLine($"'{TrackingId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("CorrelationClientTrackingId", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" correlation: "); + builder.AppendLine("{"); + builder.AppendLine(" correlation: {"); + builder.Append(" clientTrackingId: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Correlation)) + { + builder.Append(" correlation: "); + BicepSerializationHelpers.AppendChildObject(builder, Correlation, options, 4, false, " correlation: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(InputsLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" inputsLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(InputsLink)) + { + builder.Append(" inputsLink: "); + BicepSerializationHelpers.AppendChildObject(builder, InputsLink, options, 4, false, " inputsLink: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OutputsLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" outputsLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OutputsLink)) + { + builder.Append(" outputsLink: "); + BicepSerializationHelpers.AppendChildObject(builder, OutputsLink, options, 4, false, " outputsLink: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsFired), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" fired: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsFired)) + { + builder.Append(" fired: "); + var boolValue = IsFired.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Run), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" run: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Run)) + { + builder.Append(" run: "); + BicepSerializationHelpers.AppendChildObject(builder, Run, options, 4, false, " run: "); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowTriggerHistoryData)} does not support writing '{options.Format}' format."); + } + } + + WorkflowTriggerHistoryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowTriggerHistoryData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowTriggerHistoryData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryData.cs new file mode 100644 index 0000000000000..9136530ceaa0a --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryData.cs @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing the WorkflowTriggerHistory data model. + /// The workflow trigger history. + /// + public partial class WorkflowTriggerHistoryData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal WorkflowTriggerHistoryData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Gets the start time. + /// Gets the end time. + /// The scheduled time. + /// Gets the status. + /// Gets the code. + /// Gets the error. + /// Gets the tracking id. + /// The run correlation. + /// Gets the link to input parameters. + /// Gets the link to output parameters. + /// The value indicating whether trigger was fired. + /// Gets the reference to workflow run. + /// Keeps track of any properties unknown to the library. + internal WorkflowTriggerHistoryData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DateTimeOffset? startOn, DateTimeOffset? endOn, DateTimeOffset? scheduledOn, WorkflowStatus? status, string code, BinaryData error, string trackingId, Correlation correlation, WebAppContentLink inputsLink, WebAppContentLink outputsLink, bool? isFired, WorkflowResourceReference run, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + StartOn = startOn; + EndOn = endOn; + ScheduledOn = scheduledOn; + Status = status; + Code = code; + Error = error; + TrackingId = trackingId; + Correlation = correlation; + InputsLink = inputsLink; + OutputsLink = outputsLink; + IsFired = isFired; + Run = run; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets the start time. + [WirePath("properties.startTime")] + public DateTimeOffset? StartOn { get; } + /// Gets the end time. + [WirePath("properties.endTime")] + public DateTimeOffset? EndOn { get; } + /// The scheduled time. + [WirePath("properties.scheduledTime")] + public DateTimeOffset? ScheduledOn { get; } + /// Gets the status. + [WirePath("properties.status")] + public WorkflowStatus? Status { get; } + /// Gets the code. + [WirePath("properties.code")] + public string Code { get; } + /// + /// Gets the error. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("properties.error")] + public BinaryData Error { get; } + /// Gets the tracking id. + [WirePath("properties.trackingId")] + public string TrackingId { get; } + /// The run correlation. + internal Correlation Correlation { get; } + /// The client tracking id. + [WirePath("properties.correlation.clientTrackingId")] + public string CorrelationClientTrackingId + { + get => Correlation?.ClientTrackingId; + } + + /// Gets the link to input parameters. + [WirePath("properties.inputsLink")] + public WebAppContentLink InputsLink { get; } + /// Gets the link to output parameters. + [WirePath("properties.outputsLink")] + public WebAppContentLink OutputsLink { get; } + /// The value indicating whether trigger was fired. + [WirePath("properties.fired")] + public bool? IsFired { get; } + /// Gets the reference to workflow run. + [WirePath("properties.run")] + public WorkflowResourceReference Run { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryResource.Serialization.cs new file mode 100644 index 0000000000000..b5fd4a7cc8141 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppService +{ + public partial class WorkflowTriggerHistoryResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + WorkflowTriggerHistoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + WorkflowTriggerHistoryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryResource.cs new file mode 100644 index 0000000000000..6c6e1e0d099d0 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryResource.cs @@ -0,0 +1,257 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a WorkflowTriggerHistory along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetWorkflowTriggerHistoryResource method. + /// Otherwise you can get one from its parent resource using the GetWorkflowTriggerHistory method. + /// + public partial class WorkflowTriggerHistoryResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + /// The workflowName. + /// The triggerName. + /// The historyName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName, string historyName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _workflowTriggerHistoryClientDiagnostics; + private readonly WorkflowTriggerHistoriesRestOperations _workflowTriggerHistoryRestClient; + private readonly WorkflowTriggerHistoryData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Web/sites/hostruntime/webhooks/api/workflows/triggers/histories"; + + /// Initializes a new instance of the class for mocking. + protected WorkflowTriggerHistoryResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal WorkflowTriggerHistoryResource(ArmClient client, WorkflowTriggerHistoryData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal WorkflowTriggerHistoryResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _workflowTriggerHistoryClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string workflowTriggerHistoryApiVersion); + _workflowTriggerHistoryRestClient = new WorkflowTriggerHistoriesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workflowTriggerHistoryApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual WorkflowTriggerHistoryData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets a workflow trigger history. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName} + /// + /// + /// Operation Id + /// WorkflowTriggerHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _workflowTriggerHistoryClientDiagnostics.CreateScope("WorkflowTriggerHistoryResource.Get"); + scope.Start(); + try + { + var response = await _workflowTriggerHistoryRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowTriggerHistoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a workflow trigger history. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName} + /// + /// + /// Operation Id + /// WorkflowTriggerHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _workflowTriggerHistoryClientDiagnostics.CreateScope("WorkflowTriggerHistoryResource.Get"); + scope.Start(); + try + { + var response = _workflowTriggerHistoryRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowTriggerHistoryResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Resubmits a workflow run based on the trigger history. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}/resubmit + /// + /// + /// Operation Id + /// WorkflowTriggerHistories_Resubmit + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task ResubmitAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _workflowTriggerHistoryClientDiagnostics.CreateScope("WorkflowTriggerHistoryResource.Resubmit"); + scope.Start(); + try + { + var response = await _workflowTriggerHistoryRestClient.ResubmitAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(_workflowTriggerHistoryClientDiagnostics, Pipeline, _workflowTriggerHistoryRestClient.CreateResubmitRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Resubmits a workflow run based on the trigger history. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}/resubmit + /// + /// + /// Operation Id + /// WorkflowTriggerHistories_Resubmit + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Resubmit(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _workflowTriggerHistoryClientDiagnostics.CreateScope("WorkflowTriggerHistoryResource.Resubmit"); + scope.Start(); + try + { + var response = _workflowTriggerHistoryRestClient.Resubmit(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppServiceArmOperation(_workflowTriggerHistoryClientDiagnostics, Pipeline, _workflowTriggerHistoryRestClient.CreateResubmitRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerResource.Serialization.cs new file mode 100644 index 0000000000000..ec3adee605fa2 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppService +{ + public partial class WorkflowTriggerResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + WorkflowTriggerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + WorkflowTriggerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerResource.cs new file mode 100644 index 0000000000000..ea142cf1f17f8 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerResource.cs @@ -0,0 +1,478 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.AppService.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a WorkflowTrigger along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetWorkflowTriggerResource method. + /// Otherwise you can get one from its parent resource using the GetWorkflowTrigger method. + /// + public partial class WorkflowTriggerResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + /// The workflowName. + /// The triggerName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string workflowName, string triggerName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _workflowTriggerClientDiagnostics; + private readonly WorkflowTriggersRestOperations _workflowTriggerRestClient; + private readonly WorkflowTriggerData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Web/sites/hostruntime/webhooks/api/workflows/triggers"; + + /// Initializes a new instance of the class for mocking. + protected WorkflowTriggerResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal WorkflowTriggerResource(ArmClient client, WorkflowTriggerData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal WorkflowTriggerResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _workflowTriggerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string workflowTriggerApiVersion); + _workflowTriggerRestClient = new WorkflowTriggersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workflowTriggerApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual WorkflowTriggerData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of WorkflowTriggerHistoryResources in the WorkflowTrigger. + /// An object representing collection of WorkflowTriggerHistoryResources and their operations over a WorkflowTriggerHistoryResource. + public virtual WorkflowTriggerHistoryCollection GetWorkflowTriggerHistories() + { + return GetCachedClient(client => new WorkflowTriggerHistoryCollection(client, Id)); + } + + /// + /// Gets a workflow trigger history. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName} + /// + /// + /// Operation Id + /// WorkflowTriggerHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetWorkflowTriggerHistoryAsync(string historyName, CancellationToken cancellationToken = default) + { + return await GetWorkflowTriggerHistories().GetAsync(historyName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a workflow trigger history. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName} + /// + /// + /// Operation Id + /// WorkflowTriggerHistories_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow trigger history name. Corresponds to the run name for triggers that resulted in a run. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetWorkflowTriggerHistory(string historyName, CancellationToken cancellationToken = default) + { + return GetWorkflowTriggerHistories().Get(historyName, cancellationToken); + } + + /// + /// Gets a workflow trigger. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName} + /// + /// + /// Operation Id + /// WorkflowTriggers_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _workflowTriggerClientDiagnostics.CreateScope("WorkflowTriggerResource.Get"); + scope.Start(); + try + { + var response = await _workflowTriggerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowTriggerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a workflow trigger. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName} + /// + /// + /// Operation Id + /// WorkflowTriggers_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _workflowTriggerClientDiagnostics.CreateScope("WorkflowTriggerResource.Get"); + scope.Start(); + try + { + var response = _workflowTriggerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowTriggerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the callback URL for a workflow trigger. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/listCallbackUrl + /// + /// + /// Operation Id + /// WorkflowTriggers_ListCallbackUrl + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetCallbackUrlAsync(CancellationToken cancellationToken = default) + { + using var scope = _workflowTriggerClientDiagnostics.CreateScope("WorkflowTriggerResource.GetCallbackUrl"); + scope.Start(); + try + { + var response = await _workflowTriggerRestClient.ListCallbackUrlAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the callback URL for a workflow trigger. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/listCallbackUrl + /// + /// + /// Operation Id + /// WorkflowTriggers_ListCallbackUrl + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetCallbackUrl(CancellationToken cancellationToken = default) + { + using var scope = _workflowTriggerClientDiagnostics.CreateScope("WorkflowTriggerResource.GetCallbackUrl"); + scope.Start(); + try + { + var response = _workflowTriggerRestClient.ListCallbackUrl(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Runs a workflow trigger. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/run + /// + /// + /// Operation Id + /// WorkflowTriggers_Run + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task RunAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _workflowTriggerClientDiagnostics.CreateScope("WorkflowTriggerResource.Run"); + scope.Start(); + try + { + var response = await _workflowTriggerRestClient.RunAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AppServiceArmOperation(_workflowTriggerClientDiagnostics, Pipeline, _workflowTriggerRestClient.CreateRunRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Runs a workflow trigger. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/run + /// + /// + /// Operation Id + /// WorkflowTriggers_Run + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Run(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _workflowTriggerClientDiagnostics.CreateScope("WorkflowTriggerResource.Run"); + scope.Start(); + try + { + var response = _workflowTriggerRestClient.Run(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AppServiceArmOperation(_workflowTriggerClientDiagnostics, Pipeline, _workflowTriggerRestClient.CreateRunRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the trigger schema as JSON. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/schemas/json + /// + /// + /// Operation Id + /// WorkflowTriggers_GetSchemaJson + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetSchemaJsonAsync(CancellationToken cancellationToken = default) + { + using var scope = _workflowTriggerClientDiagnostics.CreateScope("WorkflowTriggerResource.GetSchemaJson"); + scope.Start(); + try + { + var response = await _workflowTriggerRestClient.GetSchemaJsonAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the trigger schema as JSON. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/triggers/{triggerName}/schemas/json + /// + /// + /// Operation Id + /// WorkflowTriggers_GetSchemaJson + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetSchemaJson(CancellationToken cancellationToken = default) + { + using var scope = _workflowTriggerClientDiagnostics.CreateScope("WorkflowTriggerResource.GetSchemaJson"); + scope.Start(); + try + { + var response = _workflowTriggerRestClient.GetSchemaJson(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionCollection.cs new file mode 100644 index 0000000000000..5cad63b62f03f --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionCollection.cs @@ -0,0 +1,402 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetWorkflowVersions method from an instance of . + /// + public partial class WorkflowVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _workflowVersionClientDiagnostics; + private readonly WorkflowVersionsRestOperations _workflowVersionRestClient; + private readonly string _workflowName; + + /// Initializes a new instance of the class for mocking. + protected WorkflowVersionCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + /// The workflow name. + /// is null. + /// is an empty string, and was expected to be non-empty. + internal WorkflowVersionCollection(ArmClient client, ResourceIdentifier id, string workflowName) : base(client, id) + { + _workflowName = workflowName; + _workflowVersionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", WorkflowVersionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(WorkflowVersionResource.ResourceType, out string workflowVersionApiVersion); + _workflowVersionRestClient = new WorkflowVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workflowVersionApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != WebSiteResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WebSiteResource.ResourceType), nameof(id)); + } + + /// + /// Gets a workflow version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/versions/{versionId} + /// + /// + /// Operation Id + /// WorkflowVersions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow versionId. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string versionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(versionId, nameof(versionId)); + + using var scope = _workflowVersionClientDiagnostics.CreateScope("WorkflowVersionCollection.Get"); + scope.Start(); + try + { + var response = await _workflowVersionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, versionId, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a workflow version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/versions/{versionId} + /// + /// + /// Operation Id + /// WorkflowVersions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow versionId. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string versionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(versionId, nameof(versionId)); + + using var scope = _workflowVersionClientDiagnostics.CreateScope("WorkflowVersionCollection.Get"); + scope.Start(); + try + { + var response = _workflowVersionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, versionId, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a list of workflow versions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/versions + /// + /// + /// Operation Id + /// WorkflowVersions_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The number of items to be included in the result. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowVersionRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowVersionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WorkflowVersionResource(Client, WorkflowVersionData.DeserializeWorkflowVersionData(e)), _workflowVersionClientDiagnostics, Pipeline, "WorkflowVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets a list of workflow versions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/versions + /// + /// + /// Operation Id + /// WorkflowVersions_List + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The number of items to be included in the result. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workflowVersionRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workflowVersionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WorkflowVersionResource(Client, WorkflowVersionData.DeserializeWorkflowVersionData(e)), _workflowVersionClientDiagnostics, Pipeline, "WorkflowVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/versions/{versionId} + /// + /// + /// Operation Id + /// WorkflowVersions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow versionId. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string versionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(versionId, nameof(versionId)); + + using var scope = _workflowVersionClientDiagnostics.CreateScope("WorkflowVersionCollection.Exists"); + scope.Start(); + try + { + var response = await _workflowVersionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, versionId, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/versions/{versionId} + /// + /// + /// Operation Id + /// WorkflowVersions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow versionId. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string versionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(versionId, nameof(versionId)); + + using var scope = _workflowVersionClientDiagnostics.CreateScope("WorkflowVersionCollection.Exists"); + scope.Start(); + try + { + var response = _workflowVersionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, versionId, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/versions/{versionId} + /// + /// + /// Operation Id + /// WorkflowVersions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow versionId. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string versionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(versionId, nameof(versionId)); + + using var scope = _workflowVersionClientDiagnostics.CreateScope("WorkflowVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _workflowVersionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, versionId, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WorkflowVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/versions/{versionId} + /// + /// + /// Operation Id + /// WorkflowVersions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The workflow versionId. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string versionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(versionId, nameof(versionId)); + + using var scope = _workflowVersionClientDiagnostics.CreateScope("WorkflowVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _workflowVersionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, _workflowName, versionId, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new WorkflowVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionData.Serialization.cs new file mode 100644 index 0000000000000..496840b17dd06 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionData.Serialization.cs @@ -0,0 +1,750 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + public partial class WorkflowVersionData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowVersionData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(CreatedOn)) + { + writer.WritePropertyName("createdTime"u8); + writer.WriteStringValue(CreatedOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(ChangedOn)) + { + writer.WritePropertyName("changedTime"u8); + writer.WriteStringValue(ChangedOn.Value, "O"); + } + if (Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + } + if (options.Format != "W" && Optional.IsDefined(AccessEndpoint)) + { + writer.WritePropertyName("accessEndpoint"u8); + writer.WriteStringValue(AccessEndpoint); + } + if (Optional.IsDefined(EndpointsConfiguration)) + { + writer.WritePropertyName("endpointsConfiguration"u8); + writer.WriteObjectValue(EndpointsConfiguration, options); + } + if (Optional.IsDefined(AccessControl)) + { + writer.WritePropertyName("accessControl"u8); + writer.WriteObjectValue(AccessControl, options); + } + if (options.Format != "W" && Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku, options); + } + if (Optional.IsDefined(IntegrationAccount)) + { + writer.WritePropertyName("integrationAccount"u8); + writer.WriteObjectValue(IntegrationAccount, options); + } + if (Optional.IsDefined(Definition)) + { + writer.WritePropertyName("definition"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Definition); +#else + using (JsonDocument document = JsonDocument.Parse(Definition)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (Optional.IsCollectionDefined(Parameters)) + { + writer.WritePropertyName("parameters"u8); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + WorkflowVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WorkflowVersionData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWorkflowVersionData(document.RootElement, options); + } + + internal static WorkflowVersionData DeserializeWorkflowVersionData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + WorkflowProvisioningState? provisioningState = default; + DateTimeOffset? createdTime = default; + DateTimeOffset? changedTime = default; + WorkflowState? state = default; + string version = default; + string accessEndpoint = default; + FlowEndpointsConfiguration endpointsConfiguration = default; + FlowAccessControlConfiguration accessControl = default; + WorkflowSku sku = default; + WorkflowResourceReference integrationAccount = default; + BinaryData definition = default; + IDictionary parameters = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new WorkflowProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("createdTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createdTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("changedTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + changedTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("state"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new WorkflowState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("version"u8)) + { + version = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("accessEndpoint"u8)) + { + accessEndpoint = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("endpointsConfiguration"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endpointsConfiguration = FlowEndpointsConfiguration.DeserializeFlowEndpointsConfiguration(property0.Value, options); + continue; + } + if (property0.NameEquals("accessControl"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + accessControl = FlowAccessControlConfiguration.DeserializeFlowAccessControlConfiguration(property0.Value, options); + continue; + } + if (property0.NameEquals("sku"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sku = WorkflowSku.DeserializeWorkflowSku(property0.Value, options); + continue; + } + if (property0.NameEquals("integrationAccount"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + integrationAccount = WorkflowResourceReference.DeserializeWorkflowResourceReference(property0.Value, options); + continue; + } + if (property0.NameEquals("definition"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + definition = BinaryData.FromString(property0.Value.GetRawText()); + continue; + } + if (property0.NameEquals("parameters"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + dictionary.Add(property1.Name, WorkflowContent.DeserializeWorkflowContent(property1.Value, options)); + } + parameters = dictionary; + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WorkflowVersionData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + provisioningState, + createdTime, + changedTime, + state, + version, + accessEndpoint, + endpointsConfiguration, + accessControl, + sku, + integrationAccount, + definition, + parameters ?? new ChangeTrackingDictionary(), + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" location: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" location: "); + builder.AppendLine($"'{Location.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Tags), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tags: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags.Any()) + { + builder.Append(" tags: "); + builder.AppendLine("{"); + foreach (var item in Tags) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + if (item.Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{item.Value}'''"); + } + else + { + builder.AppendLine($"'{item.Value}'"); + } + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + builder.AppendLine($"'{ProvisioningState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CreatedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" createdTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CreatedOn)) + { + builder.Append(" createdTime: "); + var formattedDateTimeString = TypeFormatters.ToString(CreatedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ChangedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" changedTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ChangedOn)) + { + builder.Append(" changedTime: "); + var formattedDateTimeString = TypeFormatters.ToString(ChangedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(State), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" state: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(State)) + { + builder.Append(" state: "); + builder.AppendLine($"'{State.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Version), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" version: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Version)) + { + builder.Append(" version: "); + if (Version.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Version}'''"); + } + else + { + builder.AppendLine($"'{Version}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AccessEndpoint), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" accessEndpoint: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AccessEndpoint)) + { + builder.Append(" accessEndpoint: "); + if (AccessEndpoint.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AccessEndpoint}'''"); + } + else + { + builder.AppendLine($"'{AccessEndpoint}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndpointsConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endpointsConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EndpointsConfiguration)) + { + builder.Append(" endpointsConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, EndpointsConfiguration, options, 4, false, " endpointsConfiguration: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AccessControl), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" accessControl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AccessControl)) + { + builder.Append(" accessControl: "); + BicepSerializationHelpers.AppendChildObject(builder, AccessControl, options, 4, false, " accessControl: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Sku), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sku: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Sku)) + { + builder.Append(" sku: "); + BicepSerializationHelpers.AppendChildObject(builder, Sku, options, 4, false, " sku: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IntegrationAccount), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" integrationAccount: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IntegrationAccount)) + { + builder.Append(" integrationAccount: "); + BicepSerializationHelpers.AppendChildObject(builder, IntegrationAccount, options, 4, false, " integrationAccount: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Definition), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" definition: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Definition)) + { + builder.Append(" definition: "); + builder.AppendLine($"'{Definition.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Parameters), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" parameters: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Parameters)) + { + if (Parameters.Any()) + { + builder.Append(" parameters: "); + builder.AppendLine("{"); + foreach (var item in Parameters) + { + builder.Append($" '{item.Key}': "); + BicepSerializationHelpers.AppendChildObject(builder, item.Value, options, 6, false, " parameters: "); + } + builder.AppendLine(" }"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(WorkflowVersionData)} does not support writing '{options.Format}' format."); + } + } + + WorkflowVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeWorkflowVersionData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WorkflowVersionData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionData.cs new file mode 100644 index 0000000000000..8d16d27bc76c1 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionData.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.AppService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A class representing the WorkflowVersion data model. + /// The workflow version. + /// + public partial class WorkflowVersionData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public WorkflowVersionData(AzureLocation location) : base(location) + { + Parameters = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The provisioning state. + /// Gets the created time. + /// Gets the changed time. + /// The state. + /// Gets the version. + /// Gets the access endpoint. + /// The endpoints configuration. + /// The access control configuration. + /// The sku. + /// The integration account. + /// The definition. + /// The parameters. + /// Keeps track of any properties unknown to the library. + internal WorkflowVersionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, WorkflowProvisioningState? provisioningState, DateTimeOffset? createdOn, DateTimeOffset? changedOn, WorkflowState? state, string version, string accessEndpoint, FlowEndpointsConfiguration endpointsConfiguration, FlowAccessControlConfiguration accessControl, WorkflowSku sku, WorkflowResourceReference integrationAccount, BinaryData definition, IDictionary parameters, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + ProvisioningState = provisioningState; + CreatedOn = createdOn; + ChangedOn = changedOn; + State = state; + Version = version; + AccessEndpoint = accessEndpoint; + EndpointsConfiguration = endpointsConfiguration; + AccessControl = accessControl; + Sku = sku; + IntegrationAccount = integrationAccount; + Definition = definition; + Parameters = parameters; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal WorkflowVersionData() + { + } + + /// The provisioning state. + [WirePath("properties.provisioningState")] + public WorkflowProvisioningState? ProvisioningState { get; } + /// Gets the created time. + [WirePath("properties.createdTime")] + public DateTimeOffset? CreatedOn { get; } + /// Gets the changed time. + [WirePath("properties.changedTime")] + public DateTimeOffset? ChangedOn { get; } + /// The state. + [WirePath("properties.state")] + public WorkflowState? State { get; set; } + /// Gets the version. + [WirePath("properties.version")] + public string Version { get; } + /// Gets the access endpoint. + [WirePath("properties.accessEndpoint")] + public string AccessEndpoint { get; } + /// The endpoints configuration. + [WirePath("properties.endpointsConfiguration")] + public FlowEndpointsConfiguration EndpointsConfiguration { get; set; } + /// The access control configuration. + [WirePath("properties.accessControl")] + public FlowAccessControlConfiguration AccessControl { get; set; } + /// The sku. + [WirePath("properties.sku")] + public WorkflowSku Sku { get; } + /// The integration account. + [WirePath("properties.integrationAccount")] + public WorkflowResourceReference IntegrationAccount { get; set; } + /// + /// The definition. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + [WirePath("properties.definition")] + public BinaryData Definition { get; set; } + /// The parameters. + [WirePath("properties.parameters")] + public IDictionary Parameters { get; } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionResource.Serialization.cs new file mode 100644 index 0000000000000..4fa7073fafb45 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.AppService +{ + public partial class WorkflowVersionResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + WorkflowVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + WorkflowVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionResource.cs new file mode 100644 index 0000000000000..36f0d0cfde433 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionResource.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.AppService +{ + /// + /// A Class representing a WorkflowVersion along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetWorkflowVersionResource method. + /// Otherwise you can get one from its parent resource using the GetWorkflowVersion method. + /// + public partial class WorkflowVersionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The name. + /// The workflowName. + /// The versionId. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name, string workflowName, string versionId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/versions/{versionId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _workflowVersionClientDiagnostics; + private readonly WorkflowVersionsRestOperations _workflowVersionRestClient; + private readonly WorkflowVersionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Web/sites/hostruntime/webhooks/api/workflows/versions"; + + /// Initializes a new instance of the class for mocking. + protected WorkflowVersionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal WorkflowVersionResource(ArmClient client, WorkflowVersionData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal WorkflowVersionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _workflowVersionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.AppService", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string workflowVersionApiVersion); + _workflowVersionRestClient = new WorkflowVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workflowVersionApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual WorkflowVersionData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets a workflow version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/versions/{versionId} + /// + /// + /// Operation Id + /// WorkflowVersions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _workflowVersionClientDiagnostics.CreateScope("WorkflowVersionResource.Get"); + scope.Start(); + try + { + var response = await _workflowVersionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a workflow version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/versions/{versionId} + /// + /// + /// Operation Id + /// WorkflowVersions_Get + /// + /// + /// Default Api Version + /// 2023-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _workflowVersionClientDiagnostics.CreateScope("WorkflowVersionResource.Get"); + scope.Start(); + try + { + var response = _workflowVersionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new WorkflowVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/autorest.md b/sdk/websites/Azure.ResourceManager.AppService/src/autorest.md index 18fe5253d7f06..cda736552b495 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/autorest.md +++ b/sdk/websites/Azure.ResourceManager.AppService/src/autorest.md @@ -10,7 +10,8 @@ Run `dotnet build /t:GenerateCode` to generate code. azure-arm: true library-name: AppService namespace: Azure.ResourceManager.AppService -require: https://github.com/Azure/azure-rest-api-specs/blob/35f8a4df47aedc1ce185c854595cba6b83fa6c71/specification/web/resource-manager/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/928047803788f7377fa003a26ba2bdc2e0fcccc0/specification/web/resource-manager/readme.md +#tag: package-2023-12 output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: @@ -23,7 +24,7 @@ deserialize-null-collection-as-null-value: true use-model-reader-writer: true enable-bicep-serialization: true -# mgmt-debug: +#mgmt-debug: # show-serialized-names: true list-exception: @@ -48,6 +49,10 @@ request-path-is-non-resource: - /subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId} - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view} +- /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deploymentStatus/{deploymentStatusId} +- /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deploymentStatus/{deploymentStatusId} +- /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettingsV2 +- /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettingsV2 request-path-to-resource-name: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}: WebSite @@ -78,6 +83,10 @@ request-path-to-resource-name: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web: WebSiteSlotSourceControl /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}: WebSiteSlotHybridConnection /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}: WebSiteSlotExtension + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}: WorkflowRunActionRepetition + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostruntime/runtime/webhooks/workflow/api/management/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName}: WorkflowRunActionScopeRepetition + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sitecontainers/{containerName}: SiteContainer + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sitecontainers/{containerName}: SiteSlotSiteContainer /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}: AppServicePlanHybridConnectionNamespaceRelay /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}: AppServicePlanVirtualNetworkConnection /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}: AppServicePlanVirtualNetworkConnectionGateway @@ -98,7 +107,6 @@ override-operation-name: StaticSites_UpdateStaticSiteUser: UpdateUser CheckNameAvailability: CheckAppServiceNameAvailability AppServicePlans_ListHybridConnections: GetHybridConnectionRelays - AppServicePlans_GetHybridConnection: GetHybridConnectionRelays StaticSites_CreateOrUpdateStaticSiteBuildAppSettings: CreateOrUpdateAppSettings StaticSites_CreateOrUpdateStaticSiteBuildFunctionAppSettings: CreateOrUpdateFunctionAppSettings StaticSites_ListStaticSiteBuildFunctions: GetFunctions @@ -143,6 +151,9 @@ format-by-name-rules: keep-plural-enums: - StackPreferredOS +irregular-plural-words: + status: status + acronym-mapping: CPU: Cpu CPUs: Cpus @@ -226,7 +237,6 @@ rename-mapping: AddressResponse.properties.serviceIpAddress: -|ip-address EndpointDetail.ipAddress: -|ip-address IpSecurityRestriction.ipAddress: IPAddressOrCidr - Operation.idL -|arm-id: -|arm-id AseV3NetworkingConfiguration.properties.windowsOutboundIpAddresses: -|ip-address AseV3NetworkingConfiguration.properties.linuxOutboundIpAddresses: -|ip-address AseV3NetworkingConfiguration.properties.externalInboundIpAddresses: -|ip-address @@ -370,7 +380,112 @@ rename-mapping: CloningInfo.sourceWebAppLocation: -|azure-location AzureTableStorageApplicationLogsConfig.sasUrl: SasUriString WebSiteInstanceStatus.properties.healthCheckUrl: healthCheckUrlString - + # Ambiguity property name due to the faltten + OpenAuthenticationAccessPolicies.policies: OpenAuthenticationPolicyList + AseV3NetworkingConfiguration.properties.ftpEnabled: IsFtpEnabled + AseV3NetworkingConfiguration.properties.remoteDebugEnabled: IsRemoteDebugEnabled + TriggeredWebJob.properties.storageAccountRequired: IsStorageAccountRequired + Site.properties.vnetRouteAllEnabled: IsVnetRouteAllEnabled + Site.properties.vnetImagePullEnabled: IsVnetImagePullEnabled + Site.properties.vnetContentShareEnabled: IsVnetContentShareEnabled + Site.properties.vnetBackupRestoreEnabled: IsVnetBackupRestoreEnabled + WorkflowTriggerHistory.properties.fired: IsFired + IpAddress: WebAppIPAddress + IpAddressRange: WebAppIPAddressRange + JsonSchema: WebAppJsonSchema + Request: WebAppRequest + Response: WebAppResponse + Scale: ContainerAppScale + ScaleRule: ContainerAppScaleRule + ScaleRuleAuth: ContainerAppScaleRuleAuth + Template: ContainerAppTemplate + VolumeMount.readOnly: IsReadOnly + DatabaseConnection: StaticSiteDatabaseConnection + DatabaseConnection.properties.resourceId: -|arm-id + DatabaseConnectionOverview: StaticSiteDatabaseConnectionOverview + DatabaseConnectionOverview.resourceId: -|arm-id + DatabaseConnectionPatchRequest: StaticSiteDatabaseConnectionPatchContent + DatabaseConnectionPatchRequest.properties.resourceId: -|arm-id + RequestHistory: WebAppRequestHistory + RequestHistoryProperties: WebAppRequestHistoryProperties + StaticSiteBasicAuthPropertiesARMResource: StaticSiteBasicAuthProperties + StaticSiteLinkedBackend: StaticSiteLinkedBackendInfo + StaticSiteLinkedBackendARMResource: StaticSiteLinkedBackend + StaticSiteLinkedBackendARMResource.properties.backendResourceId: -|arm-id + AseRegion: AppServiceAseRegion + AseRegion.properties.dedicatedHost: IsDedicatedHostEnabled + AseRegion.properties.standard: IsStandard + AseRegion.properties.zoneRedundant: IsZoneRedundantEnabled + AuthenticationType: FunctionAppStorageAccountAuthenticationType + AuthType: SiteContainerAuthType + AzureResourceErrorInfo: WorkflowExpressionResourceErrorInfo + AzureStorageProtocol: AppServiceStorageProtocol + BasicAuthName: StaticSiteBasicAuthName + ContentHash: WebAppContentHash + ContentLink: WebAppContentLink + Dapr.enabled: IsEnabled + DaprConfig: AppDaprConfig + DaprConfig.enableApiLogging: IsApiLoggingEnabled + DaprConfig.enabled: IsEnabled + DaprLogLevel: AppDaprLogLevel + DayOfWeek: WebAppDayOfWeek + DefaultAction: SiteDefaultAction + EnvironmentVariable: WebAppEnvironmentVariable + ErrorInfo: WebAppErrorInfo + ErrorResponse: WebAppErrorResponse + ErrorResponse.error: ErrorInfo + ErrorProperties: WebAppErrorProperties + Expression: WorkflowExpression + ExpressionRoot: WorkflowExpressionRoot + FunctionsAlwaysReadyConfig: FunctionAppAlwaysReadyConfig + FunctionsDeploymentStorage: FunctionAppStorage + FunctionsDeploymentStorageAuthentication: FunctionAppStorageAuthentication + FunctionsRuntime: FunctionAppRuntime + FunctionsScaleAndConcurrency: FunctionAppScaleAndConcurrency + FunctionStorageType: FunctionAppStorageType + KeyType: WebAppKeyType + ParameterType: WebAppParameterType + RecurrenceFrequency: WorkflowRecurrenceFrequency + RecurrenceSchedule: WorkflowRecurrenceSchedule + RegenerateActionParameter: WorkflowRegenerateActionContent + RepetitionIndex: WorkflowRunActionRepetitionIndex + ResourceConfig: FunctionAppResourceConfig + ResourceReference: WorkflowResourceReference + ResourceReference.id: -|arm-id + ResourceReference.type: -|resource-type + RetryHistory: WebAppRetryHistory + RunActionCorrelation: WebAppRunActionCorrelation + RunCorrelation: WebAppRunCorrelation + RuntimeName: FunctionAppRuntimeName + TlsCipherSuites: AppServiceTlsCipherSuite + TlsCipherSuites.TLS_AES_256_GCM_SHA384: TlsAes256GcmSha384 + TlsCipherSuites.TLS_AES_128_GCM_SHA256: TlsAes128GcmSha256 + TlsCipherSuites.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: TlsECDiffieHellmanECDsaWithAes256GcmSha384 + TlsCipherSuites.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: TlsECDiffieHellmanECDsaWithAes128CbcSha256 + TlsCipherSuites.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: TlsECDiffieHellmanECDsaWithAes128GcmSha256 + TlsCipherSuites.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384: TlsECDiffieHellmanRsaWithAes256GcmSha384 + TlsCipherSuites.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256: TlsECDiffieHellmanRsaWithAes128GcmSha256 + TlsCipherSuites.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384: TlsECDiffieHellmanRsaWithAes256CbcSha384 + TlsCipherSuites.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256: TlsECDiffieHellmanRsaWithAes128CbcSha256 + TlsCipherSuites.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA: TlsECDiffieHellmanRsaWithAes256CbcSha + TlsCipherSuites.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA: TlsECDiffieHellmanRsaWithAes128CbcSha + TlsCipherSuites.TLS_RSA_WITH_AES_256_GCM_SHA384: TlsRsaWithAes256GcmSha384 + TlsCipherSuites.TLS_RSA_WITH_AES_128_GCM_SHA256: TlsRsaWithAes128GcmSha256 + TlsCipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA256: TlsRsaWithAes256CbcSha256 + TlsCipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA256: TlsRsaWithAes128CbcSha256 + TlsCipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA: TlsRsaWithAes256CbcSha + TlsCipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA: TlsRsaWithAes128CbcSha + UpgradeAvailability: AppServiceEnvironmentUpgradeAvailability + UpgradePreference: AppServiceEnvironmentUpgradePreference + VolumeMount: SiteContainerVolumeMount + Workflow: WorkflowData + WorkflowOutputParameter: WorkflowOutputContent + WorkflowParameter: WorkflowContent + WorkflowTriggerListCallbackUrlQueries: WorkflowTriggerListCallbackUriQueries + WorkflowTriggerListCallbackUrlQueries.sp: SasPermission + WorkflowTriggerListCallbackUrlQueries.sv: SasVersion + WorkflowTriggerListCallbackUrlQueries.sig: SasSignature + WorkflowTriggerListCallbackUrlQueries.se: SasTimestamp # rename resource AppServiceCertificate: AppServiceCertificateProperties AppServiceCertificateResource: AppServiceCertificate @@ -431,7 +546,6 @@ rename-mapping: AzureStaticWebApps: AppServiceStaticWebAppsProvider AzureStaticWebAppsRegistration: AppServiceStaticWebAppsRegistration AzureStorageInfoValue: AppServiceStorageAccessInfo - AzureStoragePropertyDictionary: AppServiceStorageDictionaryResourceData AzureStorageState: AppServiceStorageAccountState AzureStorageType: AppServiceStorageType AzureTableStorageApplicationLogsConfig: AppServiceTableStorageApplicationLogsConfig @@ -569,7 +683,6 @@ rename-mapping: prepend-rp-prefix: - ApiDefinitionInfo - - ApiKeyVaultReferenceData - ArmPlan - BillingMeter - BlobStorageTokenStore @@ -615,6 +728,8 @@ directive: - remove-operation: AppServiceEnvironments_ChangeVnet - remove-operation: AppServiceEnvironments_Resume - remove-operation: AppServiceEnvironments_Suspend + # - remove-operation: WebApps_GetAuthSettingsV2WithoutSecrets + # - remove-operation: WebApps_GetAuthSettingsV2WithoutSecretsSlot # these operations are apparently not operations in Microsoft.Web RP. Instead, their paths look like operations on resource groups - remove-operation: ValidateMove - remove-operation: Move @@ -857,4 +972,35 @@ directive: where: $.paths['/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays'].get transform: > $['responses']['200']['schema']['$ref'] = "./AppServicePlans.json#/definitions/HybridConnectionCollection"; + # The Enum name "StorageType" is shared by artifactsStorageType, cause the apicompat error + - from: CommonDefinitions.json + where: $.definitions.FunctionsDeployment.properties.storage.properties.type + transform: > + $["x-ms-enum"] = { + "name": "functionStorageType", + "modelAsString": true + }; + # Remove ContainerApps.json, ContainerAppsRevisions.json since Container Apps has been separated into another SDK + - from: ContainerApps.json + where: $.paths + transform: > + for (var path in $) + { + delete $[path]; + } + - from: ContainerAppsRevisions.json + where: $.paths + transform: > + for (var path in $) + { + delete $[path]; + } + # Reuse defined DayOfWeek + - from: WebApps.json + where: $.definitions.RecurrenceSchedule.properties.weekDays + transform: > + $.items = { + "$ref": "#/definitions/DayOfWeek", + "description": "The days of the week." + }; ``` From f23ba3aa507e4b72d25582a252a804fc665a643d Mon Sep 17 00:00:00 2001 From: Madalyn Redding <66138537+m-redding@users.noreply.github.com> Date: Thu, 18 Jul 2024 10:30:12 -0400 Subject: [PATCH 119/144] [Azure.Messaging.EventHubs] Prepare for release (#45061) * [Event Hubs] Prepare for release * update version number to be greater than the beta * update version --- sdk/eventhub/Azure.Messaging.EventHubs/CHANGELOG.md | 6 +----- .../src/Azure.Messaging.EventHubs.csproj | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/CHANGELOG.md b/sdk/eventhub/Azure.Messaging.EventHubs/CHANGELOG.md index 43da687bbd4cb..e1e1be887915b 100755 --- a/sdk/eventhub/Azure.Messaging.EventHubs/CHANGELOG.md +++ b/sdk/eventhub/Azure.Messaging.EventHubs/CHANGELOG.md @@ -1,10 +1,6 @@ # Release History -## 5.12.0-beta.2 (Unreleased) - -### Features Added - -### Breaking Changes +## 5.11.4 (2024-07-17) ### Bugs Fixed diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/src/Azure.Messaging.EventHubs.csproj b/sdk/eventhub/Azure.Messaging.EventHubs/src/Azure.Messaging.EventHubs.csproj index cbe1e776f31dc..d5cbb0fd5d9ee 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/src/Azure.Messaging.EventHubs.csproj +++ b/sdk/eventhub/Azure.Messaging.EventHubs/src/Azure.Messaging.EventHubs.csproj @@ -1,7 +1,7 @@ Azure Event Hubs is a highly scalable publish-subscribe service that can ingest millions of events per second and stream them to multiple consumers. This client library allows for both publishing and consuming events using Azure Event Hubs. For more information about Event Hubs, see https://azure.microsoft.com/en-us/services/event-hubs/ - 5.12.0-beta.2 + 5.11.4 5.11.3 Azure;Event Hubs;EventHubs;.NET;AMQP;IoT;$(PackageCommonTags) From 2b088b99cad8d97d74d419076eb26e5bed21adc7 Mon Sep 17 00:00:00 2001 From: Scott Addie <10702007+scottaddie@users.noreply.github.com> Date: Thu, 18 Jul 2024 11:03:20 -0500 Subject: [PATCH 120/144] Remove duplicate credential instantiation line in ACS Email README (#45076) --- sdk/communication/Azure.Communication.Email/README.md | 3 +-- .../tests/EmailClientLiveTestBase.cs | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/sdk/communication/Azure.Communication.Email/README.md b/sdk/communication/Azure.Communication.Email/README.md index 7f26c6a9074a0..eb9264ea49764 100644 --- a/sdk/communication/Azure.Communication.Email/README.md +++ b/sdk/communication/Azure.Communication.Email/README.md @@ -38,8 +38,7 @@ Alternatively, Email clients can also be authenticated using a valid token crede ```C# Snippet:Azure_Communication_Email_CreateEmailClientWithToken string endpoint = ""; -TokenCredential tokenCredential = new DefaultAzureCredential(); -tokenCredential = new DefaultAzureCredential(); +var tokenCredential = new DefaultAzureCredential(); EmailClient emailClient = new EmailClient(new Uri(endpoint), tokenCredential); ``` ## Examples diff --git a/sdk/communication/Azure.Communication.Email/tests/EmailClientLiveTestBase.cs b/sdk/communication/Azure.Communication.Email/tests/EmailClientLiveTestBase.cs index ceb67ac889dd7..cb376d333e279 100644 --- a/sdk/communication/Azure.Communication.Email/tests/EmailClientLiveTestBase.cs +++ b/sdk/communication/Azure.Communication.Email/tests/EmailClientLiveTestBase.cs @@ -46,11 +46,10 @@ public EmailClient CreateSmsClientWithToken() } else { + tokenCredential = new DefaultAzureCredential(); #region Snippet:Azure_Communication_Email_CreateEmailClientWithToken //@@ string endpoint = ""; - //@@ TokenCredential tokenCredential = new DefaultAzureCredential(); - /*@@*/ - tokenCredential = new DefaultAzureCredential(); + //@@ var tokenCredential = new DefaultAzureCredential(); //@@ EmailClient emailClient = new EmailClient(new Uri(endpoint), tokenCredential); #endregion Snippet:Azure_Communication_Email_CreateEmailClientWithToken } From 6874cc94987a1a50fa993c173570feaefceea91b Mon Sep 17 00:00:00 2001 From: Jesse Squire Date: Thu, 18 Jul 2024 12:14:02 -0400 Subject: [PATCH 121/144] [Service Bus] July 2024 release prep (#45075) * Preparation for the July 2024 release. --- sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md | 10 ++++------ .../api/Azure.Messaging.ServiceBus.netstandard2.0.cs | 2 -- .../src/Azure.Messaging.ServiceBus.csproj | 2 +- .../src/Receiver/ServiceBusReceiver.cs | 4 ++-- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md b/sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md index acde0cbc240fe..665bdf5fe03ab 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md @@ -1,16 +1,13 @@ # Release History -## 7.18.0-beta.2 (Unreleased) +## 7.18.0 (2024-07-18) ### Acknowledgments + Thank you to our developer community members who helped to make the Service Bus client library better with their contributions to this release: - Martin Costello _([GitHub](https://github.com/martincostello))_ -### Features Added - -### Breaking Changes - ### Bugs Fixed - Fixed an issue that caused connection strings using host names without a scheme to fail parsing and be considered invalid. @@ -21,6 +18,8 @@ Thank you to our developer community members who helped to make the Service Bus - Fixed an issue that caused `ServiceBusMessageBatch` to accept more than the allowed 1mb batch limit when sending to Service Bus entities with large message sizes enabled. +- Fixed issue where the `SupportOrdering` property was not being respected when set on `CreateTopicOptions`. + ### Other Changes - The client will now refresh the maximum message size each time a new AMQP link is opened; this is necessary for large message support, where the maximum message size for entities can be reconfigureed adjusted on the fly. Because the client had cached the value, it would not be aware of the change and would enforce the wrong size for batch creation. @@ -29,7 +28,6 @@ Thank you to our developer community members who helped to make the Service Bus - Improved efficiency of subclient creation, reducing allocations when no explicit options are passed. - Fixed deserialization of the lock token to take into account endianness. _(A community contribution, courtesy of [martincostello](https://github.com/martincostello))_ - ## 7.18.0-beta.1 (2024-05-08) ### Features Added diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/api/Azure.Messaging.ServiceBus.netstandard2.0.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/api/Azure.Messaging.ServiceBus.netstandard2.0.cs index 8434102ba331b..f36f843239854 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/api/Azure.Messaging.ServiceBus.netstandard2.0.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/api/Azure.Messaging.ServiceBus.netstandard2.0.cs @@ -364,7 +364,6 @@ protected ServiceBusReceiver(Azure.Messaging.ServiceBus.ServiceBusClient client, public virtual System.Threading.Tasks.Task DeadLetterMessageAsync(Azure.Messaging.ServiceBus.ServiceBusReceivedMessage message, System.Collections.Generic.IDictionary propertiesToModify = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeadLetterMessageAsync(Azure.Messaging.ServiceBus.ServiceBusReceivedMessage message, string deadLetterReason, string deadLetterErrorDescription = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeferMessageAsync(Azure.Messaging.ServiceBus.ServiceBusReceivedMessage message, System.Collections.Generic.IDictionary propertiesToModify = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteMessagesAsync(int messageCount, System.DateTimeOffset? beforeEnqueueTime = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.ValueTask DisposeAsync() { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } @@ -372,7 +371,6 @@ protected ServiceBusReceiver(Azure.Messaging.ServiceBus.ServiceBusClient client, public override int GetHashCode() { throw null; } public virtual System.Threading.Tasks.Task PeekMessageAsync(long? fromSequenceNumber = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> PeekMessagesAsync(int maxMessages, long? fromSequenceNumber = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task PurgeMessagesAsync(System.DateTimeOffset? beforeEnqueueTime = default(System.DateTimeOffset?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task ReceiveDeferredMessageAsync(long sequenceNumber, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ReceiveDeferredMessagesAsync(System.Collections.Generic.IEnumerable sequenceNumbers, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task ReceiveMessageAsync(System.TimeSpan? maxWaitTime = default(System.TimeSpan?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Azure.Messaging.ServiceBus.csproj b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Azure.Messaging.ServiceBus.csproj index 5b6c4fe78bf46..b926610fc361f 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Azure.Messaging.ServiceBus.csproj +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Azure.Messaging.ServiceBus.csproj @@ -1,7 +1,7 @@ Azure Service Bus is a fully managed enterprise integration message broker. Service Bus can decouple applications and services. Service Bus offers a reliable and secure platform for asynchronous transfer of data and state. This client library allows for both sending and receiving messages using Azure Service Bus. For more information about Service Bus, see https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-messaging-overview - 7.18.0-beta.2 + 7.18.0 7.17.5 Azure;Service Bus;ServiceBus;.NET;AMQP;$(PackageCommonTags) diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Receiver/ServiceBusReceiver.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Receiver/ServiceBusReceiver.cs index 845365faccc6a..012319cd4d6a6 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Receiver/ServiceBusReceiver.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Receiver/ServiceBusReceiver.cs @@ -691,7 +691,7 @@ await InnerReceiver.AbandonAsync( /// and throw the exception that was encountered. It is recommended to evaluate this exception and determine which messages may not have been deleted. /// /// The number of messages that were deleted. - public virtual async Task PurgeMessagesAsync( + internal virtual async Task PurgeMessagesAsync( DateTimeOffset? beforeEnqueueTime = null, CancellationToken cancellationToken = default) { @@ -753,7 +753,7 @@ public virtual async Task PurgeMessagesAsync( /// Occurs when the is less than 1 or exceeds the maximum allowed, as determined by the Service Bus service. /// For more information on service limits, see . /// - public virtual async Task DeleteMessagesAsync( + internal virtual async Task DeleteMessagesAsync( int messageCount, DateTimeOffset? beforeEnqueueTime = null, CancellationToken cancellationToken = default) From 1227ed17b56ab2aad316ad9f4b090da04776f339 Mon Sep 17 00:00:00 2001 From: James Suplizio Date: Thu, 18 Jul 2024 09:36:08 -0700 Subject: [PATCH 122/144] Nightly docs publish should honor skipPublishDocMs (#45077) --- doc/ApiDocGeneration/Generate-Api-Docs.ps1 | 4 ++-- eng/pipelines/templates/stages/archetype-net-release.yml | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/ApiDocGeneration/Generate-Api-Docs.ps1 b/doc/ApiDocGeneration/Generate-Api-Docs.ps1 index 57f4823b4b0ca..86f98eba4b1c2 100644 --- a/doc/ApiDocGeneration/Generate-Api-Docs.ps1 +++ b/doc/ApiDocGeneration/Generate-Api-Docs.ps1 @@ -50,7 +50,7 @@ Param ( ) function Log-Warning($message) { - Write-Host "##vso[task.logissue type=warning]$message" + Write-Host "##vso[task.logissue type=warning;]$message" } function UpdateDocIndexFiles([string]$docPath, [string] $mainJsPath) { @@ -140,7 +140,7 @@ if ($LibType -eq 'client') { } Write-Verbose "Remove all unneeded artifacts from build output directory" -Remove-Item –Path "${ApiDir}/*" -Include * -Exclude "${ArtifactName}.dll", "${ArtifactName}.xml" -Recurse -Force +Remove-Item -Path "${ApiDir}/*" -Include * -Exclude "${ArtifactName}.dll", "${ArtifactName}.xml" -Recurse -Force Write-Verbose "Initialize Frameworks File" & "${MDocTool}" fx-bootstrap "${FrameworkDir}" diff --git a/eng/pipelines/templates/stages/archetype-net-release.yml b/eng/pipelines/templates/stages/archetype-net-release.yml index 4465fb157c0ef..fbb4e076b5475 100644 --- a/eng/pipelines/templates/stages/archetype-net-release.yml +++ b/eng/pipelines/templates/stages/archetype-net-release.yml @@ -334,7 +334,8 @@ stages: parameters: PackageInfoLocations: - ${{ each artifact in parameters.Artifacts }}: - - $(Pipeline.Workspace)/${{parameters.ArtifactName}}/PackageInfo/${{artifact.name}}.json + - ${{if ne(artifact.skipPublishDocMs, 'true')}}: + - $(Pipeline.Workspace)/${{parameters.ArtifactName}}/PackageInfo/${{artifact.name}}.json WorkingDirectory: $(System.DefaultWorkingDirectory) TargetDocRepoOwner: ${{parameters.TargetDocRepoOwner}} TargetDocRepoName: ${{parameters.TargetDocRepoName}} From be6fb82c0f4e9734b957545bc5f7e1ed51492bea Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 18 Jul 2024 13:47:45 -0400 Subject: [PATCH 123/144] Increment package version after release of Azure.Messaging.EventHubs (#45079) --- sdk/eventhub/Azure.Messaging.EventHubs/CHANGELOG.md | 10 ++++++++++ .../src/Azure.Messaging.EventHubs.csproj | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/CHANGELOG.md b/sdk/eventhub/Azure.Messaging.EventHubs/CHANGELOG.md index e1e1be887915b..39f431237d21e 100755 --- a/sdk/eventhub/Azure.Messaging.EventHubs/CHANGELOG.md +++ b/sdk/eventhub/Azure.Messaging.EventHubs/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 5.12.0-beta.2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 5.11.4 (2024-07-17) ### Bugs Fixed diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/src/Azure.Messaging.EventHubs.csproj b/sdk/eventhub/Azure.Messaging.EventHubs/src/Azure.Messaging.EventHubs.csproj index d5cbb0fd5d9ee..b1757bfcae28d 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/src/Azure.Messaging.EventHubs.csproj +++ b/sdk/eventhub/Azure.Messaging.EventHubs/src/Azure.Messaging.EventHubs.csproj @@ -1,9 +1,9 @@ Azure Event Hubs is a highly scalable publish-subscribe service that can ingest millions of events per second and stream them to multiple consumers. This client library allows for both publishing and consuming events using Azure Event Hubs. For more information about Event Hubs, see https://azure.microsoft.com/en-us/services/event-hubs/ - 5.11.4 + 5.12.0-beta.2 - 5.11.3 + 5.11.4 Azure;Event Hubs;EventHubs;.NET;AMQP;IoT;$(PackageCommonTags) $(RequiredTargetFrameworks) true From 5caea73572fef655c54c1ab60628c1f2bba8da3d Mon Sep 17 00:00:00 2001 From: Jesse Squire Date: Thu, 18 Jul 2024 14:26:58 -0400 Subject: [PATCH 124/144] [Service Bus] Change log typo (#45082) The focus of these changes is to fix a typo that collapsed bullet points into one item. --- sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md b/sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md index 665bdf5fe03ab..60fb1a83f3a04 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md @@ -26,7 +26,9 @@ Thank you to our developer community members who helped to make the Service Bus - Updated the `Microsoft.Azure.Amqp` dependency to 2.6.7, which contains a fix for decoding messages with a null format code as the body. -- Improved efficiency of subclient creation, reducing allocations when no explicit options are passed. - Fixed deserialization of the lock token to take into account endianness. _(A community contribution, courtesy of [martincostello](https://github.com/martincostello))_ +- Improved efficiency of subclient creation, reducing allocations when no explicit options are passed. + +- Fixed deserialization of the lock token to take into account endianness. _(A community contribution, courtesy of [martincostello](https://github.com/martincostello))_ ## 7.18.0-beta.1 (2024-05-08) From 60e65bdcbc5ddfabf12f37d575406b087616e838 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 18 Jul 2024 14:44:47 -0400 Subject: [PATCH 125/144] Sync eng/common directory with azure-sdk-tools for PR 8602 (#45019) * add additional argument to Save-Package-Properties to allow for usage in pull request context --------- Co-authored-by: Scott Beddall (from Dev Box) Co-authored-by: Scott Beddall <45376673+scbedd@users.noreply.github.com> Co-authored-by: Wes Haggard --- eng/common/scripts/Generate-PR-Diff.ps1 | 2 +- eng/common/scripts/Package-Properties.ps1 | 24 +++++++++++++++++++ .../scripts/Save-Package-Properties.ps1 | 20 ++++++++++++---- 3 files changed, 41 insertions(+), 5 deletions(-) diff --git a/eng/common/scripts/Generate-PR-Diff.ps1 b/eng/common/scripts/Generate-PR-Diff.ps1 index 8239b219c3735..d84f9e15ca7c9 100644 --- a/eng/common/scripts/Generate-PR-Diff.ps1 +++ b/eng/common/scripts/Generate-PR-Diff.ps1 @@ -45,7 +45,7 @@ $changedServices = Get-ChangedServices -ChangedFiles $changedFiles $result = [PSCustomObject]@{ "ChangedFiles" = $changedFiles "ChangedServices" = $changedServices - "PRNumber" = $env:SYSTEM_PULLREQUEST_PULLREQUESTNUMBER + "PRNumber" = if ($env:SYSTEM_PULLREQUEST_PULLREQUESTNUMBER) { $env:SYSTEM_PULLREQUEST_PULLREQUESTNUMBER } else { "-1" } } $result | ConvertTo-Json | Out-File $ArtifactName diff --git a/eng/common/scripts/Package-Properties.ps1 b/eng/common/scripts/Package-Properties.ps1 index 606998c8ea3c0..0e703a9d43743 100644 --- a/eng/common/scripts/Package-Properties.ps1 +++ b/eng/common/scripts/Package-Properties.ps1 @@ -105,6 +105,30 @@ function Get-PkgProperties return $null } +function Get-PrPkgProperties([string]$InputDiffJson) { + $packagesWithChanges = @() + + $allPackageProperties = Get-AllPkgProperties + $diff = Get-Content $InputDiffJson | ConvertFrom-Json + $targetedFiles = $diff.ChangedFiles + + foreach($pkg in $allPackageProperties) + { + $pkgDirectory = Resolve-Path "$($pkg.DirectoryPath)" + + foreach($file in $targetedFiles) + { + $filePath = Resolve-Path (Join-Path $RepoRoot $file) + $shouldInclude = $filePath -like "$pkgDirectory*" + if ($shouldInclude) { + $packagesWithChanges += $pkg + } + } + } + + return $packagesWithChanges +} + # Takes ServiceName and Repo Root Directory # Returns important properties for each package in the specified service, or entire repo if the serviceName is not specified # Returns a Table of service key to array values of PS Object with properties @ { pkgName, pkgVersion, pkgDirectoryPath, pkgReadMePath, pkgChangeLogPath } diff --git a/eng/common/scripts/Save-Package-Properties.ps1 b/eng/common/scripts/Save-Package-Properties.ps1 index 0e8ce26aa654d..c234d8b28ede4 100644 --- a/eng/common/scripts/Save-Package-Properties.ps1 +++ b/eng/common/scripts/Save-Package-Properties.ps1 @@ -15,7 +15,10 @@ filename as track 1 packages (e.g. same artifact name or package name), the track 2 package properties will be written. .PARAMETER serviceDirectory -Service directory in which to search for packages +Service directory in which to search for packages. + +.PARAMETER prDiff +A file path leading to a file generated from Generate-PR-Diff.json. This parameter takes precedence over serviceDirectory, do not provide both. .PARAMETER outDirectory Output location (generally a package artifact directory in DevOps) for JSON @@ -32,10 +35,10 @@ Verison property in that file. [CmdletBinding()] Param ( - [Parameter(Mandatory=$True)] [string] $serviceDirectory, [Parameter(Mandatory=$True)] [string] $outDirectory, + [string] $prDiff, [switch] $addDevVersion ) @@ -92,7 +95,16 @@ function GetRelativePath($path) { } $exportedPaths = @{} -$allPackageProperties = Get-AllPkgProperties $serviceDirectory + +$allPackageProperties = @() + +if ($prDiff) { + $allPackageProperties = Get-PrPkgProperties $prDiff +} +else { + $allPackageProperties = Get-AllPkgProperties $serviceDirectory +} + if ($allPackageProperties) { if (-not (Test-Path -Path $outDirectory)) @@ -137,6 +149,6 @@ if ($allPackageProperties) } else { - Write-Error "Package properties are not available for service directory $($serviceDirectory)" + Write-Error "Package properties are not available for service directory $serviceDirectory or $prdiff" exit 1 } From 22af037c13a5d764e9b7f933d78da2f281559fb0 Mon Sep 17 00:00:00 2001 From: Madalyn Redding <66138537+m-redding@users.noreply.github.com> Date: Thu, 18 Jul 2024 15:05:48 -0400 Subject: [PATCH 126/144] [Azure.Messaging.EventHubs.Processor] Prepare for release (#45063) * updates * version * updates --- eng/Packages.Data.props | 2 +- .../Azure.Messaging.EventHubs.Processor/CHANGELOG.md | 6 +----- .../src/Azure.Messaging.EventHubs.Processor.csproj | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index bbc8f05f91064..02e831547cfdc 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -114,7 +114,7 @@ - + diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/CHANGELOG.md b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/CHANGELOG.md index b1bfd893dbc11..7e21e5fc401f9 100755 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/CHANGELOG.md +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/CHANGELOG.md @@ -1,10 +1,6 @@ # Release History -## 5.12.0-beta.2 (Unreleased) - -### Features Added - -### Breaking Changes +## 5.11.4 (2024-07-17) ### Bugs Fixed diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/src/Azure.Messaging.EventHubs.Processor.csproj b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/src/Azure.Messaging.EventHubs.Processor.csproj index 3db9100b0f8b1..daf59258cff11 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/src/Azure.Messaging.EventHubs.Processor.csproj +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/src/Azure.Messaging.EventHubs.Processor.csproj @@ -1,7 +1,7 @@ Azure Event Hubs is a highly scalable publish-subscribe service that can ingest millions of events per second and stream them to multiple consumers. This library extends its Event Processor with durable storage for checkpoint information using Azure Blob storage. For more information about Event Hubs, see https://azure.microsoft.com/en-us/services/event-hubs/ - 5.12.0-beta.2 + 5.11.4 5.11.3 Azure;Event Hubs;EventHubs;.NET;Event Processor;EventProcessor;$(PackageCommonTags) From fb8b11bbd5006fe4d9aed21b2deacdb5ad06a2b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20C=C3=A1rdenas?= Date: Thu, 18 Jul 2024 12:41:07 -0700 Subject: [PATCH 127/144] [Azure.Data.Tables] Update version for release (#45058) * Update release version in Changelog and project * Update release date --- sdk/tables/Azure.Data.Tables/CHANGELOG.md | 14 +------------- .../Azure.Data.Tables/src/Azure.Data.Tables.csproj | 2 +- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/sdk/tables/Azure.Data.Tables/CHANGELOG.md b/sdk/tables/Azure.Data.Tables/CHANGELOG.md index 8f987811ad61a..fa61a2cf40c0f 100644 --- a/sdk/tables/Azure.Data.Tables/CHANGELOG.md +++ b/sdk/tables/Azure.Data.Tables/CHANGELOG.md @@ -1,22 +1,10 @@ # Release History -## 12.8.4 +## 12.9.0 (2024-07-18) ### Features Added - Overload the `DeleteEntity` method to allow an `ITableEntity` object as parameter. -### Breaking Changes - -### Bugs Fixed - -### Other changes - -## 12.9.0-beta.1 (Unreleased) - -### Features Added - -### Breaking Changes - ### Bugs Fixed - Fixed an issue where custom models decorated with the `DataMemberAttribute` that didn't explicitly set a name caused the query filter to be malformed. diff --git a/sdk/tables/Azure.Data.Tables/src/Azure.Data.Tables.csproj b/sdk/tables/Azure.Data.Tables/src/Azure.Data.Tables.csproj index 14cc8a17fe82f..49516265fc57a 100644 --- a/sdk/tables/Azure.Data.Tables/src/Azure.Data.Tables.csproj +++ b/sdk/tables/Azure.Data.Tables/src/Azure.Data.Tables.csproj @@ -2,7 +2,7 @@ This client library enables working with the Microsoft Azure Table service Microsoft Azure.Data.Tables client library - 12.9.0-beta.1 + 12.9.0 12.8.3 TableSDK;$(DefineConstants) From 8a3fa5dd0d630572e89161d30be31d3470bfd3de Mon Sep 17 00:00:00 2001 From: Amanda Nguyen <48961492+amnguye@users.noreply.github.com> Date: Thu, 18 Jul 2024 13:34:32 -0700 Subject: [PATCH 128/144] [Storage] [Tests] Fix OAuth Storage Samples (#45083) * Fix storage samples * Update snippets --- sdk/storage/Azure.Storage.Blobs/README.md | 4 ++-- .../samples/Sample01b_HelloWorldAsync.cs | 6 +++--- .../samples/Sample02_Auth.cs | 7 +------ .../samples/Sample01b_HelloWorldAsync.cs | 21 +++---------------- .../samples/Sample01b_HelloWorldAsync.cs | 7 +------ .../samples/Sample02_Auth.cs | 7 +------ .../samples/Sample02_Auth.cs | 7 +------ 7 files changed, 12 insertions(+), 47 deletions(-) diff --git a/sdk/storage/Azure.Storage.Blobs/README.md b/sdk/storage/Azure.Storage.Blobs/README.md index ed1f8959d840b..ec4e7c45d26b6 100644 --- a/sdk/storage/Azure.Storage.Blobs/README.md +++ b/sdk/storage/Azure.Storage.Blobs/README.md @@ -149,8 +149,8 @@ We fully support both synchronous and asynchronous APIs. // Get a temporary path on disk where we can download the file string downloadPath = "hello.jpg"; -// Download the public blob at https://aka.ms/bloburl -await new BlobClient(new Uri("https://aka.ms/bloburl")).DownloadToAsync(downloadPath); +// Download the public MacBeth copy at https://www.gutenberg.org/cache/epub/1533/pg1533.txt +await new BlobClient(new Uri("https://www.gutenberg.org/cache/epub/1533/pg1533.txt")).DownloadToAsync(downloadPath); ``` ## Troubleshooting diff --git a/sdk/storage/Azure.Storage.Blobs/samples/Sample01b_HelloWorldAsync.cs b/sdk/storage/Azure.Storage.Blobs/samples/Sample01b_HelloWorldAsync.cs index a1fef2be9251d..3e0edef7bfc7c 100644 --- a/sdk/storage/Azure.Storage.Blobs/samples/Sample01b_HelloWorldAsync.cs +++ b/sdk/storage/Azure.Storage.Blobs/samples/Sample01b_HelloWorldAsync.cs @@ -109,12 +109,12 @@ public async Task DownloadImageAsync() // Get a temporary path on disk where we can download the file //@@ string downloadPath = "hello.jpg"; - // Download the public blob at https://aka.ms/bloburl - await new BlobClient(new Uri("https://aka.ms/bloburl")).DownloadToAsync(downloadPath); + // Download the public MacBeth copy at https://www.gutenberg.org/cache/epub/1533/pg1533.txt + await new BlobClient(new Uri("https://www.gutenberg.org/cache/epub/1533/pg1533.txt")).DownloadToAsync(downloadPath); #endregion Assert.IsTrue(File.ReadAllBytes(downloadPath).Length > 0); - File.Delete("hello.jpg"); + File.Delete(downloadPath); } /// diff --git a/sdk/storage/Azure.Storage.Blobs/samples/Sample02_Auth.cs b/sdk/storage/Azure.Storage.Blobs/samples/Sample02_Auth.cs index 86d9053c8e9d9..834b6eee82d38 100644 --- a/sdk/storage/Azure.Storage.Blobs/samples/Sample02_Auth.cs +++ b/sdk/storage/Azure.Storage.Blobs/samples/Sample02_Auth.cs @@ -192,12 +192,7 @@ public async Task ActiveDirectoryAuthAsync() { // Create a token credential that can use our Azure Active // Directory application to authenticate with Azure Storage - TokenCredential credential = - new ClientSecretCredential( - ActiveDirectoryTenantId, - ActiveDirectoryApplicationId, - ActiveDirectoryApplicationSecret, - new TokenCredentialOptions() { AuthorityHost = ActiveDirectoryAuthEndpoint }); + TokenCredential credential = new DefaultAzureCredential(); // Create a client that can authenticate using our token credential BlobServiceClient service = new BlobServiceClient(ActiveDirectoryBlobUri, credential); diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/samples/Sample01b_HelloWorldAsync.cs b/sdk/storage/Azure.Storage.DataMovement.Blobs/samples/Sample01b_HelloWorldAsync.cs index 4382b660885eb..db8b6c6fc8156 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/samples/Sample01b_HelloWorldAsync.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/samples/Sample01b_HelloWorldAsync.cs @@ -38,12 +38,7 @@ public async Task ResourceConstructionDemonstration() try { { - TokenCredential tokenCredential = - new ClientSecretCredential( - ActiveDirectoryTenantId, - ActiveDirectoryApplicationId, - ActiveDirectoryApplicationSecret, - new TokenCredentialOptions() { AuthorityHost = ActiveDirectoryAuthEndpoint }); + TokenCredential tokenCredential = new DefaultAzureCredential(); TransferManager transferManager = new TransferManager(); @@ -612,12 +607,7 @@ public async Task DownloadDirectory_EventHandler_ActiveDirectoryAuthAsync() // Create a token credential that can use our Azure Active // Directory application to authenticate with Azure Storage - TokenCredential credential = - new ClientSecretCredential( - ActiveDirectoryTenantId, - ActiveDirectoryApplicationId, - ActiveDirectoryApplicationSecret, - new TokenCredentialOptions() { AuthorityHost = ActiveDirectoryAuthEndpoint }); + TokenCredential credential = new DefaultAzureCredential(); // Create a client that can authenticate using our token credential BlobServiceClient service = new BlobServiceClient(ActiveDirectoryBlobUri, credential); @@ -882,12 +872,7 @@ public async Task PauseAndResumeAsync_ManagerId() // Create a token credential that can use our Azure Active // Directory application to authenticate with Azure Storage - TokenCredential tokenCredential = - new ClientSecretCredential( - ActiveDirectoryTenantId, - ActiveDirectoryApplicationId, - ActiveDirectoryApplicationSecret, - new TokenCredentialOptions() { AuthorityHost = ActiveDirectoryAuthEndpoint }); + TokenCredential tokenCredential = new DefaultAzureCredential(); // Create transfer manager #region Snippet:SetupTransferManagerForResume diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/samples/Sample01b_HelloWorldAsync.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/samples/Sample01b_HelloWorldAsync.cs index cc7a06273cd6f..77ffff12a88ce 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/samples/Sample01b_HelloWorldAsync.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/samples/Sample01b_HelloWorldAsync.cs @@ -37,12 +37,7 @@ public async Task ResourceConstructionDemonstration() try { { - TokenCredential tokenCredential = - new ClientSecretCredential( - ActiveDirectoryTenantId, - ActiveDirectoryApplicationId, - ActiveDirectoryApplicationSecret, - new TokenCredentialOptions() { AuthorityHost = ActiveDirectoryAuthEndpoint }); + TokenCredential tokenCredential = new DefaultAzureCredential(); TransferManager transferManager = new TransferManager(); diff --git a/sdk/storage/Azure.Storage.Files.DataLake/samples/Sample02_Auth.cs b/sdk/storage/Azure.Storage.Files.DataLake/samples/Sample02_Auth.cs index ab4d3fd906b67..4ef888503a9c6 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/samples/Sample02_Auth.cs +++ b/sdk/storage/Azure.Storage.Files.DataLake/samples/Sample02_Auth.cs @@ -182,12 +182,7 @@ public async Task ActiveDirectoryAuthAsync() { // Create a token credential that can use our Azure Active // Directory application to authenticate with Azure Storage - TokenCredential credential = - new ClientSecretCredential( - ActiveDirectoryTenantId, - ActiveDirectoryApplicationId, - ActiveDirectoryApplicationSecret, - new TokenCredentialOptions() { AuthorityHost = ActiveDirectoryAuthEndpoint }); + TokenCredential credential = new DefaultAzureCredential(); // Create a client that can authenticate using our token credential DataLakeServiceClient service = new DataLakeServiceClient(ActiveDirectoryBlobUri, credential); diff --git a/sdk/storage/Azure.Storage.Queues/samples/Sample02_Auth.cs b/sdk/storage/Azure.Storage.Queues/samples/Sample02_Auth.cs index bebf8f7331c14..fc9cb1a5f0cda 100644 --- a/sdk/storage/Azure.Storage.Queues/samples/Sample02_Auth.cs +++ b/sdk/storage/Azure.Storage.Queues/samples/Sample02_Auth.cs @@ -155,12 +155,7 @@ public async Task ActiveDirectoryAuthAsync() { // Create a token credential that can use our Azure Active // Directory application to authenticate with Azure Storage - TokenCredential credential = - new ClientSecretCredential( - ActiveDirectoryTenantId, - ActiveDirectoryApplicationId, - ActiveDirectoryApplicationSecret, - new TokenCredentialOptions() { AuthorityHost = ActiveDirectoryAuthEndpoint }); + TokenCredential credential = new DefaultAzureCredential(); // Create a client that can authenticate using our token credential QueueServiceClient service = new QueueServiceClient(ActiveDirectoryQueueUri, credential); From a536fd26e127043be337a58a8e9a18f2878a5670 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 18 Jul 2024 16:41:21 -0400 Subject: [PATCH 129/144] Increment version for eventhub releases (#45085) * Increment package version after release of Azure.Messaging.EventHubs.Processor * Update Azure.Messaging.EventHubs.Processor.csproj * Update CHANGELOG.md --------- Co-authored-by: Madalyn Redding <66138537+m-redding@users.noreply.github.com> --- .../Azure.Messaging.EventHubs.Processor/CHANGELOG.md | 10 ++++++++++ .../src/Azure.Messaging.EventHubs.Processor.csproj | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/CHANGELOG.md b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/CHANGELOG.md index 7e21e5fc401f9..2e1d4c3bb7e9c 100755 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/CHANGELOG.md +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 5.12.0-beta.2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 5.11.4 (2024-07-17) ### Bugs Fixed diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/src/Azure.Messaging.EventHubs.Processor.csproj b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/src/Azure.Messaging.EventHubs.Processor.csproj index daf59258cff11..463767003acce 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/src/Azure.Messaging.EventHubs.Processor.csproj +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/src/Azure.Messaging.EventHubs.Processor.csproj @@ -1,9 +1,9 @@ Azure Event Hubs is a highly scalable publish-subscribe service that can ingest millions of events per second and stream them to multiple consumers. This library extends its Event Processor with durable storage for checkpoint information using Azure Blob storage. For more information about Event Hubs, see https://azure.microsoft.com/en-us/services/event-hubs/ - 5.11.4 + 5.12.0-beta.2 - 5.11.3 + 5.11.4 Azure;Event Hubs;EventHubs;.NET;Event Processor;EventProcessor;$(PackageCommonTags) $(RequiredTargetFrameworks) true From b566fdfb5d4dd0c8f3fe17ba93634181fafcb68e Mon Sep 17 00:00:00 2001 From: Scott Addie <10702007+scottaddie@users.noreply.github.com> Date: Thu, 18 Jul 2024 16:58:21 -0500 Subject: [PATCH 130/144] Reformat DefaultAzureCredential flow chart (#45086) --- sdk/identity/Azure.Identity/README.md | 2 +- .../DefaultAzureCredentialAuthFlow.md | 23 +++++++++++++++---- .../DefaultAzureCredentialAuthFlow.svg | 2 +- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/sdk/identity/Azure.Identity/README.md b/sdk/identity/Azure.Identity/README.md index 854c8fc2653e5..edb3edc9242f6 100644 --- a/sdk/identity/Azure.Identity/README.md +++ b/sdk/identity/Azure.Identity/README.md @@ -89,7 +89,7 @@ The `DefaultAzureCredential` attempts to authenticate via the following mechanis 1. **Workload Identity** - If the application is deployed to an Azure host with Workload Identity enabled, the `DefaultAzureCredential` will authenticate with that account. 1. **Managed Identity** - If the application is deployed to an Azure host with Managed Identity enabled, the `DefaultAzureCredential` will authenticate with that account. 1. **Visual Studio** - If the developer has authenticated via Visual Studio, the `DefaultAzureCredential` will authenticate with that account. -1. **Visual Studio Code** - Currently excluded by default as SDK authentication via Visual Studio Code is broken due to issue [#27263](https://github.com/Azure/azure-sdk-for-net/issues/27263). The `VisualStudioCodeCredential` will be re-enabled in the `DefaultAzureCredential` flow once a fix is in place. Issue [#30525](https://github.com/Azure/azure-sdk-for-net/issues/30525) tracks this. In the meantime Visual Studio Code users can authenticate their development environment using the [Azure CLI](https://learn.microsoft.com/cli/azure/). +1. **Visual Studio Code** - Currently excluded by default, as library authentication via Visual Studio Code is broken due to issue [#27263](https://github.com/Azure/azure-sdk-for-net/issues/27263). `VisualStudioCodeCredential` will be re-enabled in the `DefaultAzureCredential` flow once a fix is in place. Issue [#30525](https://github.com/Azure/azure-sdk-for-net/issues/30525) tracks this. In the meantime, Visual Studio Code users can authenticate their development environment using the [Azure CLI](https://learn.microsoft.com/cli/azure/). 1. **Azure CLI** - If the developer has authenticated an account via the Azure CLI `az login` command, the `DefaultAzureCredential` will authenticate with that account. 1. **Azure PowerShell** - If the developer has authenticated an account via the Azure PowerShell `Connect-AzAccount` command, the `DefaultAzureCredential` will authenticate with that account. 1. **Azure Developer CLI** - If the developer has authenticated via the Azure Developer CLI `azd auth login` command, the `DefaultAzureCredential` will authenticate with that account. diff --git a/sdk/identity/Azure.Identity/images/mermaidjs/DefaultAzureCredentialAuthFlow.md b/sdk/identity/Azure.Identity/images/mermaidjs/DefaultAzureCredentialAuthFlow.md index 1c913d6628666..a5c605c115019 100644 --- a/sdk/identity/Azure.Identity/images/mermaidjs/DefaultAzureCredentialAuthFlow.md +++ b/sdk/identity/Azure.Identity/images/mermaidjs/DefaultAzureCredentialAuthFlow.md @@ -1,16 +1,29 @@ ```mermaid %% STEPS TO GENERATE IMAGE %% ======================= -%% 1. Install mermaid CLI (see https://github.com/mermaid-js/mermaid-cli/blob/master/README.md) -%% v10.1.0 is known good for our process. npm install -g @mermaid-js/mermaid-cli@10.1.0 +%% 1. Install mermaid CLI v10.9.1 (see https://github.com/mermaid-js/mermaid-cli/blob/master/README.md): +%% npm i -g @mermaid-js/mermaid-cli@10.9.1 %% 2. Run command: mmdc -i DefaultAzureCredentialAuthFlow.md -o DefaultAzureCredentialAuthFlow.svg -flowchart LR; - A(Environment):::deployed --> B(Workload Identity):::deployed --> C(Managed Identity):::deployed --> D(Visual Studio):::developer --> E(VS Code):::developer --> F(Azure CLI):::developer --> G(Azure PowerShell):::developer --> H(Azure Developer CLI):::developer --> I(Interactive browser):::interactive; +%%{ + init: { + 'theme': 'base', + 'themeVariables': { + 'tertiaryBorderColor': '#fff', + 'tertiaryColor': '#fff' + } + } +}%% +flowchart LR; subgraph CREDENTIAL TYPES; direction LR; - Deployed(Deployed service):::deployed ~~~ Developer(Developer):::developer ~~~ Interactive(Interactive developer):::interactive; + Deployed(Deployed service):::deployed ~~~ Developer(Developer):::developer ~~~ Interactive(Interactive):::interactive; + end; + + subgraph CREDENTIALS; + direction LR; + A(Environment):::deployed --> B(Workload Identity):::deployed --> C(Managed Identity):::deployed --> D(Visual Studio):::developer --> E(VS Code):::developer --> F(Azure CLI):::developer --> G(Azure PowerShell):::developer --> H(Azure Developer CLI):::developer --> I(Interactive browser):::interactive; end; %% Define styles for credential type boxes diff --git a/sdk/identity/Azure.Identity/images/mermaidjs/DefaultAzureCredentialAuthFlow.svg b/sdk/identity/Azure.Identity/images/mermaidjs/DefaultAzureCredentialAuthFlow.svg index 4ab16545f7578..e9b368336800f 100644 --- a/sdk/identity/Azure.Identity/images/mermaidjs/DefaultAzureCredentialAuthFlow.svg +++ b/sdk/identity/Azure.Identity/images/mermaidjs/DefaultAzureCredentialAuthFlow.svg @@ -1 +1 @@ -
CREDENTIAL TYPES
Interactive developer
Deployed service
Developer
Environment
Workload Identity
Managed Identity
Visual Studio
VS Code
Azure CLI
Azure PowerShell
Azure Developer CLI
Interactive browser
\ No newline at end of file +
CREDENTIALS
Interactive browser
Environment
Workload Identity
Managed Identity
Visual Studio
VS Code
Azure CLI
Azure PowerShell
Azure Developer CLI
CREDENTIAL TYPES
Interactive
Deployed service
Developer
\ No newline at end of file From 5c293a8a0ad0d0d4d80447ddce698b41efd18dda Mon Sep 17 00:00:00 2001 From: rajuanitha88 <106093972+rajuanitha88@users.noreply.github.com> Date: Fri, 19 Jul 2024 00:18:03 +0200 Subject: [PATCH 131/144] Using federated auth for ACS tests (#44886) * Using federated auth for ACS tests * Removing usage of secrets for Shortcodes * Removing PPE and INT Live tests * Addressing comments to maintain consistency across languages --- .../tests.yml | 11 +++++------ .../Azure.Communication.CallingServer/tests.yml | 11 +++++------ .../Azure.Communication.Chat/tests.yml | 17 ++++++----------- .../Azure.Communication.Identity/tests.yml | 15 +++++---------- .../Azure.Communication.JobRouter/tests.yml | 13 ++++++------- .../Azure.Communication.Rooms/tests.yml | 11 +++++------ .../Azure.Communication.ShortCodes/tests.yml | 13 ++++++------- 7 files changed, 38 insertions(+), 53 deletions(-) diff --git a/sdk/communication/Azure.Communication.CallAutomation/tests.yml b/sdk/communication/Azure.Communication.CallAutomation/tests.yml index 3779314d7f923..2628a9d6474fa 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/tests.yml +++ b/sdk/communication/Azure.Communication.CallAutomation/tests.yml @@ -5,19 +5,18 @@ extends: parameters: ServiceDirectory: communication Project: Azure.Communication.CallAutomation + UseFederatedAuth: true CloudConfig: Public: + ServiceConnection: azure-sdk-tests + SubscriptionConfigurationFilePaths: + - eng/common/TestResources/sub-config/AzurePublicMsft.json SubscriptionConfigurations: - - $(sub-config-azure-cloud-test-resources) - $(sub-config-communication-services-cloud-test-resources-common) - $(sub-config-communication-services-cloud-test-resources-net) - Int: - SubscriptionConfigurations: - - $(sub-config-communication-int-test-resources-common) - - $(sub-config-communication-int-test-resources-net) Clouds: Public TestResourceDirectories: - - communication/test-resources/ + - communication/ EnvVars: # SKIP_CALLAUTOMATION_INTERACTION_LIVE_TESTS skips certain CallAutomation tests that required human interactions SKIP_CALLAUTOMATION_INTERACTION_LIVE_TESTS: TRUE diff --git a/sdk/communication/Azure.Communication.CallingServer/tests.yml b/sdk/communication/Azure.Communication.CallingServer/tests.yml index 65a3e080806ac..c0ed92755f724 100644 --- a/sdk/communication/Azure.Communication.CallingServer/tests.yml +++ b/sdk/communication/Azure.Communication.CallingServer/tests.yml @@ -5,19 +5,18 @@ extends: parameters: ServiceDirectory: communication Project: Azure.Communication.CallingServer + UseFederatedAuth: true CloudConfig: Public: + ServiceConnection: azure-sdk-tests + SubscriptionConfigurationFilePaths: + - eng/common/TestResources/sub-config/AzurePublicMsft.json SubscriptionConfigurations: - - $(sub-config-azure-cloud-test-resources) - $(sub-config-communication-services-cloud-test-resources-common) - $(sub-config-communication-services-cloud-test-resources-net) - Int: - SubscriptionConfigurations: - - $(sub-config-communication-int-test-resources-common) - - $(sub-config-communication-int-test-resources-net) Clouds: Public TestResourceDirectories: - - communication/test-resources/ + - communication/ EnvVars: # SKIP_CALLINGSERVER_INTERACTION_LIVE_TESTS skips certain CallAutomation tests that required human interactions SKIP_CALLINGSERVER_INTERACTION_LIVE_TESTS: TRUE diff --git a/sdk/communication/Azure.Communication.Chat/tests.yml b/sdk/communication/Azure.Communication.Chat/tests.yml index bdd54f72ec1bc..5e68bf69c7e7a 100644 --- a/sdk/communication/Azure.Communication.Chat/tests.yml +++ b/sdk/communication/Azure.Communication.Chat/tests.yml @@ -5,20 +5,15 @@ extends: parameters: ServiceDirectory: communication Project: Azure.Communication.Chat + UseFederatedAuth: true CloudConfig: Public: + ServiceConnection: azure-sdk-tests + SubscriptionConfigurationFilePaths: + - eng/common/TestResources/sub-config/AzurePublicMsft.json SubscriptionConfigurations: - - $(sub-config-azure-cloud-test-resources) - $(sub-config-communication-services-cloud-test-resources-common) - $(sub-config-communication-services-cloud-test-resources-net) - PPE: - SubscriptionConfigurations: - - $(sub-config-communication-ppe-test-resources-common) - - $(sub-config-communication-ppe-test-resources-net) - Int: - SubscriptionConfigurations: - - $(sub-config-communication-int-test-resources-common) - - $(sub-config-communication-int-test-resources-net) - Clouds: Public,PPE,Int + Clouds: Public TestResourceDirectories: - - communication/test-resources/ + - communication/ diff --git a/sdk/communication/Azure.Communication.Identity/tests.yml b/sdk/communication/Azure.Communication.Identity/tests.yml index f5d0af456738e..ab2ebd9c0fc3a 100644 --- a/sdk/communication/Azure.Communication.Identity/tests.yml +++ b/sdk/communication/Azure.Communication.Identity/tests.yml @@ -5,20 +5,15 @@ extends: parameters: ServiceDirectory: communication Project: Azure.Communication.Identity + UseFederatedAuth: true CloudConfig: Public: + ServiceConnection: azure-sdk-tests + SubscriptionConfigurationFilePaths: + - eng/common/TestResources/sub-config/AzurePublicMsft.json SubscriptionConfigurations: - - $(sub-config-azure-cloud-test-resources) - $(sub-config-communication-services-cloud-test-resources-common) - $(sub-config-communication-services-cloud-test-resources-net) - PPE: - SubscriptionConfigurations: - - $(sub-config-communication-ppe-test-resources-common) - - $(sub-config-communication-ppe-test-resources-net) - Int: - SubscriptionConfigurations: - - $(sub-config-communication-int-test-resources-common) - - $(sub-config-communication-int-test-resources-net) - Clouds: Public,PPE,Int + Clouds: Public TestResourceDirectories: - communication/ diff --git a/sdk/communication/Azure.Communication.JobRouter/tests.yml b/sdk/communication/Azure.Communication.JobRouter/tests.yml index 4d83873fbd761..f01ab524377c3 100644 --- a/sdk/communication/Azure.Communication.JobRouter/tests.yml +++ b/sdk/communication/Azure.Communication.JobRouter/tests.yml @@ -5,16 +5,15 @@ extends: parameters: ServiceDirectory: communication Project: Azure.Communication.JobRouter + UseFederatedAuth: true CloudConfig: Public: + ServiceConnection: azure-sdk-tests + SubscriptionConfigurationFilePaths: + - eng/common/TestResources/sub-config/AzurePublicMsft.json SubscriptionConfigurations: - - $(sub-config-azure-cloud-test-resources) - $(sub-config-communication-services-cloud-test-resources-common) - $(sub-config-communication-services-cloud-test-resources-net) - Int: - SubscriptionConfigurations: - - $(sub-config-communication-int-test-resources-common) - - $(sub-config-communication-int-test-resources-net) - Clouds: Public,Int + Clouds: Public TestResourceDirectories: - - communication/test-resources/ + - communication/ diff --git a/sdk/communication/Azure.Communication.Rooms/tests.yml b/sdk/communication/Azure.Communication.Rooms/tests.yml index 8c31b8b8096e6..879b599266394 100644 --- a/sdk/communication/Azure.Communication.Rooms/tests.yml +++ b/sdk/communication/Azure.Communication.Rooms/tests.yml @@ -5,16 +5,15 @@ extends: parameters: ServiceDirectory: communication Project: Azure.Communication.Rooms + UseFederatedAuth: true CloudConfig: Public: + ServiceConnection: azure-sdk-tests + SubscriptionConfigurationFilePaths: + - eng/common/TestResources/sub-config/AzurePublicMsft.json SubscriptionConfigurations: - - $(sub-config-azure-cloud-test-resources) - $(sub-config-communication-services-cloud-test-resources-common) - $(sub-config-communication-services-cloud-test-resources-net) - PPE: - SubscriptionConfigurations: - - $(sub-config-communication-ppe-test-resources-common) - - $(sub-config-communication-ppe-test-resources-net) - Clouds: Public,PPE + Clouds: Public TestResourceDirectories: - communication/ diff --git a/sdk/communication/Azure.Communication.ShortCodes/tests.yml b/sdk/communication/Azure.Communication.ShortCodes/tests.yml index f7a1506037a06..6841a6955a171 100644 --- a/sdk/communication/Azure.Communication.ShortCodes/tests.yml +++ b/sdk/communication/Azure.Communication.ShortCodes/tests.yml @@ -5,16 +5,15 @@ extends: parameters: ServiceDirectory: communication Project: Azure.Communication.ShortCodes + UseFederatedAuth: true CloudConfig: Public: + ServiceConnection: azure-sdk-tests + SubscriptionConfigurationFilePaths: + - eng/common/TestResources/sub-config/AzurePublicMsft.json SubscriptionConfigurations: - - $(sub-config-azure-cloud-test-resources) - $(sub-config-communication-services-cloud-test-resources-common) - $(sub-config-communication-services-cloud-test-resources-net) - Int: - SubscriptionConfigurations: - - $(sub-config-communication-int-test-resources-common) - - $(sub-config-communication-int-test-resources-net) - Clouds: Public,Int + Clouds: Public TestResourceDirectories: - - communication/test-resources/ + - communication/ From 91186e5d378bf26502bbd40638c00662ae202167 Mon Sep 17 00:00:00 2001 From: Sean McCullough <44180881+seanmcc-msft@users.noreply.github.com> Date: Thu, 18 Jul 2024 18:58:22 -0500 Subject: [PATCH 132/144] Updated Storage codeowners (#45088) --- .github/CODEOWNERS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index b658a7c44eb49..4e035831c1436 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -844,13 +844,13 @@ # ServiceOwners: @azureSQLGitHub # PRLabel: %Storage -/sdk/storage*/ @seanmcc-msft @amnguye @jaschrep-msft @schaabs @tg-msft +/sdk/storage*/ @seanmcc-msft @amnguye @jaschrep-msft @schaabs @tg-msft @jalauzon-msft # PRLabel: %Storage -/sdk/storage/Azure.Storage.*/ @seanmcc-msft @amnguye @jaschrep-msft @schaabs @tg-msft +/sdk/storage/Azure.Storage.*/ @seanmcc-msft @amnguye @jaschrep-msft @schaabs @tg-msft @jalauzon-msft # PRLabel: %Storage -/sdk/storage/Microsoft.Azure.WebJobs.*/ @seanmcc-msft @amnguye @jaschrep-msft @tg-msft @fabiocav @mathewc +/sdk/storage/Microsoft.Azure.WebJobs.*/ @seanmcc-msft @amnguye @jaschrep-msft @tg-msft @fabiocav @mathewc @jalauzon-msft # ServiceLabel: %Storage # ServiceOwners: @xgithubtriage From c059e594b992aa4fa4feda1f3b68b6a3d0f33cdd Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Thu, 18 Jul 2024 22:19:13 -0500 Subject: [PATCH 133/144] Add exception information for all credential classes (#44633) --- .../Credentials/AuthorizationCodeCredential.cs | 2 ++ .../Credentials/AzureApplicationCredential.cs | 2 ++ .../src/Credentials/AzureCliCredential.cs | 14 ++++++++------ .../Credentials/AzureDeveloperCliCredential.cs | 14 ++++++++------ .../src/Credentials/AzurePipelinesCredential.cs | 16 ++++++++++++++-- .../src/Credentials/AzurePowerShellCredential.cs | 14 ++++++++------ .../src/Credentials/ChainedTokenCredential.cs | 2 ++ .../src/Credentials/ClientAssertionCredential.cs | 2 ++ .../Credentials/ClientCertificateCredential.cs | 2 ++ .../src/Credentials/ClientSecretCredential.cs | 2 ++ .../src/Credentials/DefaultAzureCredential.cs | 2 ++ .../src/Credentials/DeviceCodeCredential.cs | 6 ++++++ .../src/Credentials/EnvironmentCredential.cs | 4 ++++ .../Credentials/InteractiveBrowserCredential.cs | 6 ++++++ .../src/Credentials/ManagedIdentityCredential.cs | 2 ++ .../src/Credentials/OnBehalfOfCredential.cs | 2 ++ .../Credentials/SharedTokenCacheCredential.cs | 2 ++ .../Credentials/UsernamePasswordCredential.cs | 2 ++ .../Credentials/VisualStudioCodeCredential.cs | 16 ++++++++++++++-- .../src/Credentials/VisualStudioCredential.cs | 16 ++++++++++++++-- .../Credentials/WorkloadIdentityCredential.cs | 16 ++++++++++++++-- 21 files changed, 118 insertions(+), 26 deletions(-) diff --git a/sdk/identity/Azure.Identity/src/Credentials/AuthorizationCodeCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/AuthorizationCodeCredential.cs index 27b18bf2c1abd..8d12a0b9f7114 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/AuthorizationCodeCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/AuthorizationCodeCredential.cs @@ -115,6 +115,7 @@ internal AuthorizationCodeCredential(string tenantId, string clientId, string cl /// The details of the authentication request. /// A controlling the request lifetime. /// An which can be used to authenticate service client calls. + /// Thrown when the authentication failed. public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken = default) { return GetTokenImplAsync(false, requestContext, cancellationToken).EnsureCompleted(); @@ -128,6 +129,7 @@ public override AccessToken GetToken(TokenRequestContext requestContext, Cancell /// The details of the authentication request. /// A controlling the request lifetime. /// An which can be used to authenticate service client calls. + /// Thrown when the authentication failed. public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default) { return await GetTokenImplAsync(true, requestContext, cancellationToken).ConfigureAwait(false); diff --git a/sdk/identity/Azure.Identity/src/Credentials/AzureApplicationCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/AzureApplicationCredential.cs index 9bfb87b39b97a..4beab62212716 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/AzureApplicationCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/AzureApplicationCredential.cs @@ -51,6 +51,7 @@ internal AzureApplicationCredential(AzureApplicationCredentialOptions options, E /// The details of the authentication request. /// A controlling the request lifetime. /// The first returned by the specified sources. Any credential which raises a will be skipped. + /// Thrown when the authentication failed. public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken = default) => GetTokenImplAsync(false, requestContext, cancellationToken).EnsureCompleted(); @@ -62,6 +63,7 @@ public override AccessToken GetToken(TokenRequestContext requestContext, Cancell /// The details of the authentication request. /// A controlling the request lifetime. /// The first returned by the specified sources. Any credential which raises a will be skipped. + /// Thrown when the authentication failed. public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default) => await GetTokenImplAsync(true, requestContext, cancellationToken).ConfigureAwait(false); diff --git a/sdk/identity/Azure.Identity/src/Credentials/AzureCliCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/AzureCliCredential.cs index 477958dbde6c1..6ac687b003330 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/AzureCliCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/AzureCliCredential.cs @@ -84,9 +84,10 @@ internal AzureCliCredential(CredentialPipeline pipeline, IProcessService process /// /// Obtains a access token from Azure CLI credential, using this access token to authenticate. This method called by Azure SDK clients. /// - /// - /// - /// + /// The details of the authentication request. + /// A controlling the request lifetime. + /// An which can be used to authenticate service client calls. + /// Thrown when the authentication failed. public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken = default) { return GetTokenImplAsync(false, requestContext, cancellationToken).EnsureCompleted(); @@ -95,9 +96,10 @@ public override AccessToken GetToken(TokenRequestContext requestContext, Cancell /// /// Obtains a access token from Azure CLI service, using the access token to authenticate. This method id called by Azure SDK clients. /// - /// - /// - /// + /// The details of the authentication request. + /// A controlling the request lifetime. + /// An which can be used to authenticate service client calls. + /// Thrown when the authentication failed. public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default) { return await GetTokenImplAsync(true, requestContext, cancellationToken).ConfigureAwait(false); diff --git a/sdk/identity/Azure.Identity/src/Credentials/AzureDeveloperCliCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/AzureDeveloperCliCredential.cs index 2c80b4a121e29..c8bbb86b94487 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/AzureDeveloperCliCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/AzureDeveloperCliCredential.cs @@ -76,9 +76,10 @@ internal AzureDeveloperCliCredential(CredentialPipeline pipeline, IProcessServic /// /// Obtains an access token from Azure Developer CLI credential, using this access token to authenticate. This method called by Azure SDK clients. /// - /// - /// - /// AccessToken + /// The details of the authentication request. + /// A controlling the request lifetime. + /// An which can be used to authenticate service client calls. + /// Thrown when the authentication failed. public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken = default) { return GetTokenImplAsync(false, requestContext, cancellationToken).EnsureCompleted(); @@ -87,9 +88,10 @@ public override AccessToken GetToken(TokenRequestContext requestContext, Cancell /// /// Obtains an access token from Azure Developer CLI service, using the access token to authenticate. This method is called by Azure SDK clients. /// - /// - /// - /// + /// The details of the authentication request. + /// A controlling the request lifetime. + /// An which can be used to authenticate service client calls. + /// Thrown when the authentication failed. public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default) { return await GetTokenImplAsync(true, requestContext, cancellationToken).ConfigureAwait(false); diff --git a/sdk/identity/Azure.Identity/src/Credentials/AzurePipelinesCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/AzurePipelinesCredential.cs index 36cf15fba5f4f..1425f14a94fe8 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/AzurePipelinesCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/AzurePipelinesCredential.cs @@ -67,11 +67,23 @@ public AzurePipelinesCredential(string tenantId, string clientId, string service AdditionallyAllowedTenantIds = TenantIdResolver.ResolveAddionallyAllowedTenantIds((options as ISupportsAdditionallyAllowedTenants)?.AdditionallyAllowedTenants); } - /// + /// + /// Obtains an access token from within an Azure Pipelines environment. + /// + /// The details of the authentication request. + /// A controlling the request lifetime. + /// An which can be used to authenticate service client calls. + /// Thrown when the authentication failed. public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken) => GetTokenCoreAsync(false, requestContext, cancellationToken).EnsureCompleted(); - /// + /// + /// Obtains an access token from within an Azure Pipelines environment. + /// + /// The details of the authentication request. + /// A controlling the request lifetime. + /// An which can be used to authenticate service client calls. + /// Thrown when the authentication failed. public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken) => await GetTokenCoreAsync(true, requestContext, cancellationToken).ConfigureAwait(false); diff --git a/sdk/identity/Azure.Identity/src/Credentials/AzurePowerShellCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/AzurePowerShellCredential.cs index e9fb0041ae779..4528f541feff3 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/AzurePowerShellCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/AzurePowerShellCredential.cs @@ -76,9 +76,10 @@ internal AzurePowerShellCredential(AzurePowerShellCredentialOptions options, Cre /// /// Obtains a access token from Azure PowerShell, using the access token to authenticate. This method id called by Azure SDK clients. /// - /// - /// - /// + /// The details of the authentication request. + /// A controlling the request lifetime. + /// An which can be used to authenticate service client calls. + /// Thrown when the authentication failed. public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken) { return GetTokenImplAsync(false, requestContext, cancellationToken).EnsureCompleted(); @@ -87,9 +88,10 @@ public override AccessToken GetToken(TokenRequestContext requestContext, Cancell /// /// Obtains a access token from Azure PowerShell, using the access token to authenticate. This method id called by Azure SDK clients. /// - /// - /// - /// + /// The details of the authentication request. + /// A controlling the request lifetime. + /// An which can be used to authenticate service client calls. + /// Thrown when the authentication failed. public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default) { return await GetTokenImplAsync(true, requestContext, cancellationToken).ConfigureAwait(false); diff --git a/sdk/identity/Azure.Identity/src/Credentials/ChainedTokenCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/ChainedTokenCredential.cs index 9c9952ee56aa2..b20b595153548 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/ChainedTokenCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/ChainedTokenCredential.cs @@ -76,6 +76,7 @@ public ChainedTokenCredential(params TokenCredential[] sources) /// The details of the authentication request. /// A controlling the request lifetime. /// The first returned by the specified sources. Any credential which raises a will be skipped. + /// Thrown when the authentication failed. public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken = default) => GetTokenImplAsync(false, requestContext, cancellationToken).EnsureCompleted(); @@ -87,6 +88,7 @@ public override AccessToken GetToken(TokenRequestContext requestContext, Cancell /// The details of the authentication request. /// A controlling the request lifetime. /// The first returned by the specified sources. Any credential which raises a will be skipped. + /// Thrown when the authentication failed. public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default) => await GetTokenImplAsync(true, requestContext, cancellationToken).ConfigureAwait(false); diff --git a/sdk/identity/Azure.Identity/src/Credentials/ClientAssertionCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/ClientAssertionCredential.cs index 979f9737d2ca5..f552f69a3b61a 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/ClientAssertionCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/ClientAssertionCredential.cs @@ -76,6 +76,7 @@ public ClientAssertionCredential(string tenantId, string clientId, Func /// The details of the authentication request. /// A controlling the request lifetime. /// An which can be used to authenticate service client calls. + /// Thrown when the authentication failed. public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken = default) { using CredentialDiagnosticScope scope = Pipeline.StartGetTokenScope("ClientAssertionCredential.GetToken", requestContext); @@ -100,6 +101,7 @@ public override AccessToken GetToken(TokenRequestContext requestContext, Cancell /// The details of the authentication request. /// A controlling the request lifetime. /// An which can be used to authenticate service client calls. + /// Thrown when the authentication failed. public async override ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default) { using CredentialDiagnosticScope scope = Pipeline.StartGetTokenScope("ClientAssertionCredential.GetToken", requestContext); diff --git a/sdk/identity/Azure.Identity/src/Credentials/ClientCertificateCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/ClientCertificateCredential.cs index 294ea57676f83..bba259f194ba4 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/ClientCertificateCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/ClientCertificateCredential.cs @@ -180,6 +180,7 @@ internal ClientCertificateCredential( /// The details of the authentication request. /// A controlling the request lifetime. /// An which can be used to authenticate service client calls. + /// Thrown when the authentication failed. public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken = default) { using CredentialDiagnosticScope scope = _pipeline.StartGetTokenScope("ClientCertificateCredential.GetToken", requestContext); @@ -205,6 +206,7 @@ public override AccessToken GetToken(TokenRequestContext requestContext, Cancell /// The details of the authentication request. /// A controlling the request lifetime. /// An which can be used to authenticate service client calls. + /// Thrown when the authentication failed. public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default) { using CredentialDiagnosticScope scope = _pipeline.StartGetTokenScope("ClientCertificateCredential.GetToken", requestContext); diff --git a/sdk/identity/Azure.Identity/src/Credentials/ClientSecretCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/ClientSecretCredential.cs index 530099c75ab79..4e308905a064d 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/ClientSecretCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/ClientSecretCredential.cs @@ -109,6 +109,7 @@ internal ClientSecretCredential(string tenantId, string clientId, string clientS /// The details of the authentication request. /// A controlling the request lifetime. /// An which can be used to authenticate service client calls. + /// Thrown when the authentication failed. public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default) { using CredentialDiagnosticScope scope = _pipeline.StartGetTokenScope("ClientSecretCredential.GetToken", requestContext); @@ -132,6 +133,7 @@ public override async ValueTask GetTokenAsync(TokenRequestContext r /// The details of the authentication request. /// A controlling the request lifetime. /// An which can be used to authenticate service client calls. + /// Thrown when the authentication failed. public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken = default) { using CredentialDiagnosticScope scope = _pipeline.StartGetTokenScope("ClientSecretCredential.GetToken", requestContext); diff --git a/sdk/identity/Azure.Identity/src/Credentials/DefaultAzureCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/DefaultAzureCredential.cs index cfea7989d1b8a..5a30b98f63a4a 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/DefaultAzureCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/DefaultAzureCredential.cs @@ -109,6 +109,7 @@ internal DefaultAzureCredential(DefaultAzureCredentialFactory factory) /// The details of the authentication request. /// A controlling the request lifetime. /// The first returned by the specified sources. Any credential which raises a will be skipped. + /// Thrown when the authentication failed. public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken = default) { return GetTokenImplAsync(false, requestContext, cancellationToken).EnsureCompleted(); @@ -127,6 +128,7 @@ public override AccessToken GetToken(TokenRequestContext requestContext, Cancell /// The details of the authentication request. /// A controlling the request lifetime. /// The first returned by the specified sources. Any credential which raises a will be skipped. + /// Thrown when the authentication failed. public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default) { return await GetTokenImplAsync(true, requestContext, cancellationToken).ConfigureAwait(false); diff --git a/sdk/identity/Azure.Identity/src/Credentials/DeviceCodeCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/DeviceCodeCredential.cs index 1f282f5f15cc7..2203ccedd83c5 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/DeviceCodeCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/DeviceCodeCredential.cs @@ -104,6 +104,7 @@ internal DeviceCodeCredential(Func devi ///
/// A controlling the request lifetime. /// The result of the authentication request, containing the acquired , and the which can be used to silently authenticate the account. + /// Thrown when the authentication failed. public virtual AuthenticationRecord Authenticate(CancellationToken cancellationToken = default) { // throw if no default scope exists @@ -120,6 +121,7 @@ public virtual AuthenticationRecord Authenticate(CancellationToken cancellationT /// /// A controlling the request lifetime. /// The which can be used to silently authenticate the account on future execution of credentials using the same persisted token cache. + /// Thrown when the authentication failed. public virtual async Task AuthenticateAsync(CancellationToken cancellationToken = default) { // throw if no default scope exists @@ -137,6 +139,7 @@ public virtual async Task AuthenticateAsync(CancellationTo /// A controlling the request lifetime. /// The details of the authentication request. /// The of the authenticated account. + /// Thrown when the authentication failed. public virtual AuthenticationRecord Authenticate(TokenRequestContext requestContext, CancellationToken cancellationToken = default) { return AuthenticateImplAsync(false, requestContext, cancellationToken).EnsureCompleted(); @@ -148,6 +151,7 @@ public virtual AuthenticationRecord Authenticate(TokenRequestContext requestCont /// A controlling the request lifetime. /// The details of the authentication request. /// The of the authenticated account. + /// Thrown when the authentication failed. public virtual async Task AuthenticateAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default) { return await AuthenticateImplAsync(true, requestContext, cancellationToken).ConfigureAwait(false); @@ -161,6 +165,7 @@ public virtual async Task AuthenticateAsync(TokenRequestCo /// The details of the authentication request. /// A controlling the request lifetime. /// An which can be used to authenticate service client calls. + /// Thrown when the authentication failed. public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken = default) { return GetTokenImplAsync(false, requestContext, cancellationToken).EnsureCompleted(); @@ -174,6 +179,7 @@ public override AccessToken GetToken(TokenRequestContext requestContext, Cancell /// The details of the authentication request. /// A controlling the request lifetime. /// An which can be used to authenticate service client calls. + /// Thrown when the authentication failed. public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default) { return await GetTokenImplAsync(true, requestContext, cancellationToken).ConfigureAwait(false); diff --git a/sdk/identity/Azure.Identity/src/Credentials/EnvironmentCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/EnvironmentCredential.cs index 350e9be122a7a..64a408fd0fc8c 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/EnvironmentCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/EnvironmentCredential.cs @@ -137,6 +137,8 @@ internal EnvironmentCredential(CredentialPipeline pipeline, TokenCredential cred /// The details of the authentication request. /// A controlling the request lifetime. /// An which can be used to authenticate service client calls. + /// Thrown when the authentication failed. + /// Thrown when the credential is unavailable because the environment is not properly configured. public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken = default) { return GetTokenImplAsync(false, requestContext, cancellationToken).EnsureCompleted(); @@ -154,6 +156,8 @@ public override AccessToken GetToken(TokenRequestContext requestContext, Cancell /// The details of the authentication request. /// A controlling the request lifetime. /// An which can be used to authenticate service client calls, or a default . + /// Thrown when the authentication failed. + /// Thrown when the credential is unavailable because the environment is not properly configured. public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default) { return await GetTokenImplAsync(true, requestContext, cancellationToken).ConfigureAwait(false); diff --git a/sdk/identity/Azure.Identity/src/Credentials/InteractiveBrowserCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/InteractiveBrowserCredential.cs index a8ca1101081e9..8101b15c75a64 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/InteractiveBrowserCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/InteractiveBrowserCredential.cs @@ -167,6 +167,7 @@ public virtual async Task AuthenticateAsync(TokenRequestCo /// The details of the authentication request. /// A controlling the request lifetime. /// An which can be used to authenticate service client calls. + /// Thrown when the authentication failed. public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken = default) { #if PREVIEW_FEATURE_FLAG @@ -184,6 +185,7 @@ public override AccessToken GetToken(TokenRequestContext requestContext, Cancell /// The details of the authentication request. /// A controlling the request lifetime. /// An which can be used to authenticate service client calls. + /// Thrown when the authentication failed. public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default) { #if PREVIEW_FEATURE_FLAG @@ -202,6 +204,7 @@ public override async ValueTask GetTokenAsync(TokenRequestContext r /// The details of the authentication request. /// A controlling the request lifetime. /// An which can be used to authenticate service client calls. + /// Thrown when the authentication failed. public AccessToken GetToken(PopTokenRequestContext requestContext, CancellationToken cancellationToken = default) { return GetTokenImplAsync(false, requestContext, cancellationToken).EnsureCompleted(); @@ -215,6 +218,7 @@ public AccessToken GetToken(PopTokenRequestContext requestContext, CancellationT /// The details of the authentication request. /// A controlling the request lifetime. /// An which can be used to authenticate service client calls. + /// Thrown when the authentication failed. public async ValueTask GetTokenAsync(PopTokenRequestContext requestContext, CancellationToken cancellationToken = default) { return await GetTokenImplAsync(true, requestContext, cancellationToken).ConfigureAwait(false); @@ -226,6 +230,7 @@ public async ValueTask GetTokenAsync(PopTokenRequestContext request /// A controlling the request lifetime. /// The details of the authentication request. /// The of the authenticated account. + /// Thrown when the authentication failed. public virtual AuthenticationRecord Authenticate(PopTokenRequestContext requestContext, CancellationToken cancellationToken = default) { return AuthenticateImplAsync(false, requestContext, cancellationToken).EnsureCompleted(); @@ -237,6 +242,7 @@ public virtual AuthenticationRecord Authenticate(PopTokenRequestContext requestC /// A controlling the request lifetime. /// The details of the authentication request. /// The of the authenticated account. + /// Thrown when the authentication failed. public virtual async Task AuthenticateAsync(PopTokenRequestContext requestContext, CancellationToken cancellationToken = default) { return await AuthenticateImplAsync(true, requestContext, cancellationToken).ConfigureAwait(false); diff --git a/sdk/identity/Azure.Identity/src/Credentials/ManagedIdentityCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/ManagedIdentityCredential.cs index c5665314c25d1..ebc4e80dfaa34 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/ManagedIdentityCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/ManagedIdentityCredential.cs @@ -86,6 +86,7 @@ internal ManagedIdentityCredential(ManagedIdentityClient client) /// The details of the authentication request. /// A controlling the request lifetime. /// An which can be used to authenticate service client calls, or a default if no managed identity is available. + /// Thrown when the authentication failed. public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default) { return await GetTokenImplAsync(true, requestContext, cancellationToken).ConfigureAwait(false); @@ -99,6 +100,7 @@ public override async ValueTask GetTokenAsync(TokenRequestContext r /// The details of the authentication request. /// A controlling the request lifetime. /// An which can be used to authenticate service client calls, or a default if no managed identity is available. + /// Thrown when the authentication failed. public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken = default) { return GetTokenImplAsync(false, requestContext, cancellationToken).EnsureCompleted(); diff --git a/sdk/identity/Azure.Identity/src/Credentials/OnBehalfOfCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/OnBehalfOfCredential.cs index 298835e1be301..5f3ff5c026fa4 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/OnBehalfOfCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/OnBehalfOfCredential.cs @@ -218,6 +218,7 @@ internal OnBehalfOfCredential( /// The details of the authentication request. /// A controlling the request lifetime. /// An which can be used to authenticate service client calls. + /// Thrown when the authentication failed. public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken) => GetTokenInternalAsync(requestContext, false, cancellationToken).EnsureCompleted(); @@ -230,6 +231,7 @@ public override AccessToken GetToken(TokenRequestContext requestContext, Cancell /// The details of the authentication request. /// A controlling the request lifetime. /// An which can be used to authenticate service client calls. + /// Thrown when the authentication failed. public override ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken) => GetTokenInternalAsync(requestContext, true, cancellationToken); diff --git a/sdk/identity/Azure.Identity/src/Credentials/SharedTokenCacheCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/SharedTokenCacheCredential.cs index 3af25a60b05ba..b20e1556b45f6 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/SharedTokenCacheCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/SharedTokenCacheCredential.cs @@ -95,6 +95,7 @@ internal SharedTokenCacheCredential(string tenantId, string username, TokenCrede /// The details of the authentication request. /// A controlling the request lifetime /// An which can be used to authenticate service client calls + /// Thrown when the authentication failed. public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken = default) { return GetTokenImplAsync(false, requestContext, cancellationToken).EnsureCompleted(); @@ -108,6 +109,7 @@ public override AccessToken GetToken(TokenRequestContext requestContext, Cancell /// The details of the authentication request. /// A controlling the request lifetime /// An which can be used to authenticate service client calls + /// Thrown when the authentication failed. public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default) { return await GetTokenImplAsync(true, requestContext, cancellationToken).ConfigureAwait(false); diff --git a/sdk/identity/Azure.Identity/src/Credentials/UsernamePasswordCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/UsernamePasswordCredential.cs index 7d24abf6914fd..f2c5e5311868f 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/UsernamePasswordCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/UsernamePasswordCredential.cs @@ -170,6 +170,7 @@ public virtual async Task AuthenticateAsync(TokenRequestCo /// The details of the authentication request. /// A controlling the request lifetime. /// An which can be used to authenticate service client calls. + /// Thrown when the authentication failed. public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken = default) { return GetTokenImplAsync(false, requestContext, cancellationToken).EnsureCompleted(); @@ -184,6 +185,7 @@ public override AccessToken GetToken(TokenRequestContext requestContext, Cancell /// The details of the authentication request. /// A controlling the request lifetime. /// An which can be used to authenticate service client calls. + /// Thrown when the authentication failed. public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default) { return await GetTokenImplAsync(true, requestContext, cancellationToken).ConfigureAwait(false); diff --git a/sdk/identity/Azure.Identity/src/Credentials/VisualStudioCodeCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/VisualStudioCodeCredential.cs index 3a3275e704652..c3755995a5822 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/VisualStudioCodeCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/VisualStudioCodeCredential.cs @@ -60,11 +60,23 @@ internal VisualStudioCodeCredential(VisualStudioCodeCredentialOptions options, C AdditionallyAllowedTenantIds = TenantIdResolver.ResolveAddionallyAllowedTenantIds((options as ISupportsAdditionallyAllowedTenants)?.AdditionallyAllowedTenants); } - /// + /// + /// Obtains a access token from account signed in to Visual Studio Code. + /// + /// The details of the authentication request. + /// A controlling the request lifetime. + /// An which can be used to authenticate service client calls. + /// Thrown when the authentication failed. public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken) => await GetTokenImplAsync(requestContext, true, cancellationToken).ConfigureAwait(false); - /// + /// + /// Obtains a access token from account signed in to Visual Studio Code. + /// + /// The details of the authentication request. + /// A controlling the request lifetime. + /// An which can be used to authenticate service client calls. + /// Thrown when the authentication failed. public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken) => GetTokenImplAsync(requestContext, false, cancellationToken).EnsureCompleted(); diff --git a/sdk/identity/Azure.Identity/src/Credentials/VisualStudioCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/VisualStudioCredential.cs index 2293df746e54d..e72a2daa0c4f1 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/VisualStudioCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/VisualStudioCredential.cs @@ -65,11 +65,23 @@ internal VisualStudioCredential(string tenantId, CredentialPipeline pipeline, IF _isChainedCredential = options?.IsChainedCredential ?? false; } - /// + /// + /// Obtains a access token from account signed in to Visual Studio. + /// + /// The details of the authentication request. + /// A controlling the request lifetime. + /// An which can be used to authenticate service client calls. + /// Thrown when the authentication failed. public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken) => await GetTokenImplAsync(requestContext, true, cancellationToken).ConfigureAwait(false); - /// + /// + /// Obtains a access token from account signed in to Visual Studio. + /// + /// The details of the authentication request. + /// A controlling the request lifetime. + /// An which can be used to authenticate service client calls. + /// Thrown when the authentication failed. public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken) => GetTokenImplAsync(requestContext, false, cancellationToken).EnsureCompleted(); diff --git a/sdk/identity/Azure.Identity/src/Credentials/WorkloadIdentityCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/WorkloadIdentityCredential.cs index db4bd85fa26ed..d1ccf215e2c53 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/WorkloadIdentityCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/WorkloadIdentityCredential.cs @@ -52,13 +52,25 @@ public WorkloadIdentityCredential(WorkloadIdentityCredentialOptions options) _pipeline = _clientAssertionCredential?.Pipeline ?? CredentialPipeline.GetInstance(default); } - /// + /// + /// Obtains a access token for the specified set of scopes. + /// + /// The details of the authentication request. + /// A controlling the request lifetime. + /// An which can be used to authenticate service client calls. + /// Thrown when the authentication failed. public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken = default) { return GetTokenCoreAsync(false, requestContext, cancellationToken).EnsureCompleted(); } - /// + /// + /// Obtains a access token for the specified set of scopes. + /// + /// The details of the authentication request. + /// A controlling the request lifetime. + /// An which can be used to authenticate service client calls. + /// Thrown when the authentication failed. public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken = default) { return await GetTokenCoreAsync(true, requestContext, cancellationToken).ConfigureAwait(false); From 630dd50bee04cfa2442bbc2c133de729b6cc63f2 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 19 Jul 2024 04:04:42 -0400 Subject: [PATCH 134/144] Increment package version after release of Azure.Messaging.ServiceBus (#45087) --- sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md | 10 ++++++++++ .../src/Azure.Messaging.ServiceBus.csproj | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md b/sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md index 60fb1a83f3a04..91e14dc80ebe1 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 7.19.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 7.18.0 (2024-07-18) ### Acknowledgments diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Azure.Messaging.ServiceBus.csproj b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Azure.Messaging.ServiceBus.csproj index b926610fc361f..94bf50d4e7a7c 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Azure.Messaging.ServiceBus.csproj +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Azure.Messaging.ServiceBus.csproj @@ -1,9 +1,9 @@ Azure Service Bus is a fully managed enterprise integration message broker. Service Bus can decouple applications and services. Service Bus offers a reliable and secure platform for asynchronous transfer of data and state. This client library allows for both sending and receiving messages using Azure Service Bus. For more information about Service Bus, see https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-messaging-overview - 7.18.0 + 7.19.0-beta.1 - 7.17.5 + 7.18.0 Azure;Service Bus;ServiceBus;.NET;AMQP;$(PackageCommonTags) $(RequiredTargetFrameworks) false From c96151c20775b4e0eb53fdec86eb35a86ab9eec4 Mon Sep 17 00:00:00 2001 From: ameyaiam3 <141965277+ameyaiam3@users.noreply.github.com> Date: Fri, 19 Jul 2024 01:18:42 -0700 Subject: [PATCH 135/144] Adding a new field (#45012) --- .../CHANGELOG.md | 18 +- ...nager.GuestConfiguration.netstandard2.0.cs | 57 +- ...stConfigurationHcrpAssignmentCollection.cs | 12 +- ...uestConfigurationHcrpAssignmentResource.cs | 12 +- ...rationVMwarevSphereAssignmentCollection.cs | 220 ++++++++ ...gurationVMwarevSphereAssignmentResource.cs | 196 +++++++ ...uestConfigurationVmAssignmentCollection.cs | 13 +- ..._GuestConfigurationVmAssignmentResource.cs | 13 +- ...stConfigurationVmssAssignmentCollection.cs | 70 ++- ...uestConfigurationVmssAssignmentResource.cs | 67 ++- ....ResourceManager.GuestConfiguration.csproj | 2 +- .../ArmGuestConfigurationModelFactory.cs | 24 +- .../GuestConfigurationExtensions.cs | 127 ++++- .../MockableGuestConfigurationArmClient.cs | 100 +++- ...nfigurationAssignmentData.Serialization.cs | 101 ++++ .../GuestConfigurationAssignmentData.cs | 1 + ...stConfigurationHcrpAssignmentCollection.cs | 20 +- ...uestConfigurationHcrpAssignmentResource.cs | 20 +- ...rationVMwarevSphereAssignmentCollection.cs | 495 ++++++++++++++++++ ...vSphereAssignmentResource.Serialization.cs | 26 + ...gurationVMwarevSphereAssignmentResource.cs | 489 +++++++++++++++++ ...uestConfigurationVmAssignmentCollection.cs | 20 +- .../GuestConfigurationVmAssignmentResource.cs | 20 +- ...stConfigurationVmssAssignmentCollection.cs | 118 ++++- ...uestConfigurationVmssAssignmentResource.cs | 112 +++- .../Internal/BicepSerializationHelpers.cs | 58 ++ .../Generated/Internal/WirePathAttribute.cs | 27 + ...tResourceComplianceReason.Serialization.cs | 64 +++ ...ssignmentReportResourceComplianceReason.cs | 2 + ...ignmentReportResourceInfo.Serialization.cs | 95 ++++ .../Models/AssignmentReportResourceInfo.cs | 4 + ...nfigurationAssignmentInfo.Serialization.cs | 56 ++ .../GuestConfigurationAssignmentInfo.cs | 2 + ...nfigurationAssignmentList.Serialization.cs | 42 ++ ...ationAssignmentProperties.Serialization.cs | 248 +++++++++ .../GuestConfigurationAssignmentProperties.cs | 12 + ...igurationAssignmentReport.Serialization.cs | 71 +++ .../GuestConfigurationAssignmentReport.cs | 3 + ...onAssignmentReportDetails.Serialization.cs | 119 +++++ ...estConfigurationAssignmentReportDetails.cs | 6 + ...ationAssignmentReportInfo.Serialization.cs | 164 ++++++ .../GuestConfigurationAssignmentReportInfo.cs | 9 + ...ationAssignmentReportList.Serialization.cs | 42 ++ .../GuestConfigurationAssignmentReportList.cs | 1 + ...ssignmentReportProperties.Serialization.cs | 148 ++++++ ...ConfigurationAssignmentReportProperties.cs | 8 + .../GuestConfigurationInfo.Serialization.cs | 64 +++ .../Models/GuestConfigurationInfo.cs | 2 + ...stConfigurationNavigation.Serialization.cs | 275 ++++++++++ .../Models/GuestConfigurationNavigation.cs | 18 +- ...estConfigurationParameter.Serialization.cs | 64 +++ .../Models/GuestConfigurationParameter.cs | 2 + ...ConfigurationResourceData.Serialization.cs | 86 +++ .../Models/GuestConfigurationResourceData.cs | 5 + .../GuestConfigurationVmInfo.Serialization.cs | 48 ++ .../Models/GuestConfigurationVmInfo.cs | 2 + ...stConfigurationVmssVmInfo.Serialization.cs | 94 ++++ .../Models/GuestConfigurationVmssVmInfo.cs | 5 + .../LcmConfigurationSetting.Serialization.cs | 110 ++++ .../Models/LcmConfigurationSetting.cs | 6 + ...gurationAssignmentReportsRestOperations.cs | 2 +- ...tionAssignmentReportsVmssRestOperations.cs | 2 +- ...tConfigurationAssignmentsRestOperations.cs | 2 +- ...figurationAssignmentsVmssRestOperations.cs | 112 +++- ...vSphereAssignmentsReportsRestOperations.cs | 249 +++++++++ ...dVMwarevSphereAssignmentsRestOperations.cs | 439 ++++++++++++++++ ...tionHcrpAssignmentReportsRestOperations.cs | 2 +- ...figurationHcrpAssignmentsRestOperations.cs | 2 +- .../src/autorest.md | 13 +- .../GuestConfigurationManagementTestBase.cs | 17 +- 70 files changed, 5031 insertions(+), 124 deletions(-) create mode 100644 sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/samples/Generated/Samples/Sample_GuestConfigurationVMwarevSphereAssignmentCollection.cs create mode 100644 sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/samples/Generated/Samples/Sample_GuestConfigurationVMwarevSphereAssignmentResource.cs create mode 100644 sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVMwarevSphereAssignmentCollection.cs create mode 100644 sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVMwarevSphereAssignmentResource.Serialization.cs create mode 100644 sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVMwarevSphereAssignmentResource.cs create mode 100644 sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Internal/BicepSerializationHelpers.cs create mode 100644 sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Internal/WirePathAttribute.cs create mode 100644 sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/RestOperations/GuestConfigurationConnectedVMwarevSphereAssignmentsReportsRestOperations.cs create mode 100644 sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/RestOperations/GuestConfigurationConnectedVMwarevSphereAssignmentsRestOperations.cs diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/CHANGELOG.md b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/CHANGELOG.md index 93fd455b2ad6e..3d0c0f96a9d9b 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/CHANGELOG.md +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/CHANGELOG.md @@ -1,22 +1,24 @@ # Release History -## 1.2.0-beta.1 (Unreleased) +## 1.2.0 (2024-07-19) ### Features Added -- Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. - -### Breaking Changes - -### Bugs Fixed +- Upgraded api-version tag from 'package-2022-01-25' to 'package-2024-04-05'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/6dd7b1f0b4e62d1c2d78e1fa6ab3addd032d9920/specification/guestconfiguration/resource-manager/readme.md. +- Enabled the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. +- Added experimental Bicep serialization. +- Added `ArmOperation.Rehydrate` and `ArmOperation.Rehydrate` static methods to rehydrate a long-running operation. ### Other Changes +- Upgraded Azure.Core from 1.36.0 to 1.41.0 +- Upgraded Azure.ResourceManager from 1.9.0 to 1.12.0 + ## 1.1.0 (2023-11-29) ### Features Added -- Enable mocking for extension methods, refer this [document](https://aka.ms/azsdk/net/mocking) for more details. +- Enabled mocking for extension methods, refer this [document](https://aka.ms/azsdk/net/mocking) for more details. ### Other Changes @@ -26,7 +28,7 @@ ### Features Added -- Enable the model factory feature for model mocking, more information can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-mocking-factory-builder). +- Enabled the model factory feature for model mocking, more information can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-mocking-factory-builder). ### Other Changes diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/api/Azure.ResourceManager.GuestConfiguration.netstandard2.0.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/api/Azure.ResourceManager.GuestConfiguration.netstandard2.0.cs index 37d4b803e5ce6..07beaa7b0281e 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/api/Azure.ResourceManager.GuestConfiguration.netstandard2.0.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/api/Azure.ResourceManager.GuestConfiguration.netstandard2.0.cs @@ -28,6 +28,10 @@ public static partial class GuestConfigurationExtensions public static System.Threading.Tasks.Task> GetGuestConfigurationVmssAssignmentAsync(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.GuestConfiguration.GuestConfigurationVmssAssignmentResource GetGuestConfigurationVmssAssignmentResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.GuestConfiguration.GuestConfigurationVmssAssignmentCollection GetGuestConfigurationVmssAssignments(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope) { throw null; } + public static Azure.Response GetGuestConfigurationVMwarevSphereAssignment(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string guestConfigurationAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetGuestConfigurationVMwarevSphereAssignmentAsync(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string guestConfigurationAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.GuestConfiguration.GuestConfigurationVMwarevSphereAssignmentResource GetGuestConfigurationVMwarevSphereAssignmentResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.GuestConfiguration.GuestConfigurationVMwarevSphereAssignmentCollection GetGuestConfigurationVMwarevSphereAssignments(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope) { throw null; } } public partial class GuestConfigurationHcrpAssignmentCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -112,6 +116,8 @@ protected GuestConfigurationVmAssignmentResource() { } public partial class GuestConfigurationVmssAssignmentCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected GuestConfigurationVmssAssignmentCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.GuestConfiguration.GuestConfigurationAssignmentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.GuestConfiguration.GuestConfigurationAssignmentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -144,6 +150,48 @@ protected GuestConfigurationVmssAssignmentResource() { } Azure.ResourceManager.GuestConfiguration.GuestConfigurationAssignmentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.GuestConfiguration.GuestConfigurationAssignmentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.GuestConfiguration.GuestConfigurationAssignmentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class GuestConfigurationVMwarevSphereAssignmentCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected GuestConfigurationVMwarevSphereAssignmentCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string guestConfigurationAssignmentName, Azure.ResourceManager.GuestConfiguration.GuestConfigurationAssignmentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string guestConfigurationAssignmentName, Azure.ResourceManager.GuestConfiguration.GuestConfigurationAssignmentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string guestConfigurationAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string guestConfigurationAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string guestConfigurationAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string guestConfigurationAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string guestConfigurationAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string guestConfigurationAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class GuestConfigurationVMwarevSphereAssignmentResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected GuestConfigurationVMwarevSphereAssignmentResource() { } + public virtual Azure.ResourceManager.GuestConfiguration.GuestConfigurationAssignmentData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vmName, string guestConfigurationAssignmentName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetGuestConfigurationConnectedVMwarevSphereAssignmentsReport(string reportId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetGuestConfigurationConnectedVMwarevSphereAssignmentsReportAsync(string reportId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetGuestConfigurationConnectedVMwarevSphereAssignmentsReports(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetGuestConfigurationConnectedVMwarevSphereAssignmentsReportsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.GuestConfiguration.GuestConfigurationAssignmentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.GuestConfiguration.GuestConfigurationAssignmentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.GuestConfiguration.GuestConfigurationAssignmentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.GuestConfiguration.GuestConfigurationAssignmentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.GuestConfiguration.Mocking @@ -163,6 +211,10 @@ protected MockableGuestConfigurationArmClient() { } public virtual System.Threading.Tasks.Task> GetGuestConfigurationVmssAssignmentAsync(Azure.Core.ResourceIdentifier scope, string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.GuestConfiguration.GuestConfigurationVmssAssignmentResource GetGuestConfigurationVmssAssignmentResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.GuestConfiguration.GuestConfigurationVmssAssignmentCollection GetGuestConfigurationVmssAssignments(Azure.Core.ResourceIdentifier scope) { throw null; } + public virtual Azure.Response GetGuestConfigurationVMwarevSphereAssignment(Azure.Core.ResourceIdentifier scope, string guestConfigurationAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetGuestConfigurationVMwarevSphereAssignmentAsync(Azure.Core.ResourceIdentifier scope, string guestConfigurationAssignmentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.GuestConfiguration.GuestConfigurationVMwarevSphereAssignmentResource GetGuestConfigurationVMwarevSphereAssignmentResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.GuestConfiguration.GuestConfigurationVMwarevSphereAssignmentCollection GetGuestConfigurationVMwarevSphereAssignments(Azure.Core.ResourceIdentifier scope) { throw null; } } public partial class MockableGuestConfigurationResourceGroupResource : Azure.ResourceManager.ArmResource { @@ -209,7 +261,9 @@ public static partial class ArmGuestConfigurationModelFactory public static Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationAssignmentReportInfo GuestConfigurationAssignmentReportInfo(Azure.Core.ResourceIdentifier id = null, System.Guid? reportId = default(System.Guid?), Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationAssignmentInfo assignment = null, Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationVmInfo vm = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResourceManager.GuestConfiguration.Models.AssignedGuestConfigurationMachineComplianceStatus? complianceStatus = default(Azure.ResourceManager.GuestConfiguration.Models.AssignedGuestConfigurationMachineComplianceStatus?), Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationAssignmentReportType? operationType = default(Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationAssignmentReportType?), System.Collections.Generic.IEnumerable resources = null) { throw null; } public static Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationAssignmentReportProperties GuestConfigurationAssignmentReportProperties(Azure.ResourceManager.GuestConfiguration.Models.AssignedGuestConfigurationMachineComplianceStatus? complianceStatus = default(Azure.ResourceManager.GuestConfiguration.Models.AssignedGuestConfigurationMachineComplianceStatus?), System.Guid? reportId = default(System.Guid?), Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationAssignmentInfo assignment = null, Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationVmInfo vm = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationAssignmentReportDetails details = null, string vmssResourceId = null) { throw null; } public static Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationInfo GuestConfigurationInfo(string name = null, string version = null) { throw null; } - public static Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationNavigation GuestConfigurationNavigation(Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationKind? kind = default(Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationKind?), string name = null, string version = null, System.Uri contentUri = null, string contentHash = null, Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationAssignmentType? assignmentType = default(Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationAssignmentType?), string assignmentSource = null, string contentType = null, System.Collections.Generic.IEnumerable configurationParameters = null, System.Collections.Generic.IEnumerable configurationProtectedParameters = null, Azure.ResourceManager.GuestConfiguration.Models.LcmConfigurationSetting configurationSetting = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationNavigation GuestConfigurationNavigation(Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationKind? kind, string name, string version, System.Uri contentUri, string contentHash, Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationAssignmentType? assignmentType, string assignmentSource, string contentType, System.Collections.Generic.IEnumerable configurationParameters, System.Collections.Generic.IEnumerable configurationProtectedParameters, Azure.ResourceManager.GuestConfiguration.Models.LcmConfigurationSetting configurationSetting) { throw null; } + public static Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationNavigation GuestConfigurationNavigation(Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationKind? kind = default(Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationKind?), string name = null, string version = null, System.Uri contentUri = null, string contentHash = null, string contentManagedIdentity = null, Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationAssignmentType? assignmentType = default(Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationAssignmentType?), string assignmentSource = null, string contentType = null, System.Collections.Generic.IEnumerable configurationParameters = null, System.Collections.Generic.IEnumerable configurationProtectedParameters = null, Azure.ResourceManager.GuestConfiguration.Models.LcmConfigurationSetting configurationSetting = null) { throw null; } public static Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationResourceData GuestConfigurationResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), Azure.ResourceManager.Models.SystemData systemData = null) { throw null; } public static Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationVmInfo GuestConfigurationVmInfo(Azure.Core.ResourceIdentifier id = null, System.Guid? uuid = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationVmssVmInfo GuestConfigurationVmssVmInfo(System.Guid? vmId = default(System.Guid?), Azure.Core.ResourceIdentifier vmResourceId = null, Azure.ResourceManager.GuestConfiguration.Models.AssignedGuestConfigurationMachineComplianceStatus? complianceStatus = default(Azure.ResourceManager.GuestConfiguration.Models.AssignedGuestConfigurationMachineComplianceStatus?), System.Guid? latestReportId = default(System.Guid?), System.DateTimeOffset? lastComplianceCheckedOn = default(System.DateTimeOffset?)) { throw null; } @@ -427,6 +481,7 @@ public GuestConfigurationNavigation() { } public System.Collections.Generic.IList ConfigurationProtectedParameters { get { throw null; } } public Azure.ResourceManager.GuestConfiguration.Models.LcmConfigurationSetting ConfigurationSetting { get { throw null; } } public string ContentHash { get { throw null; } set { } } + public string ContentManagedIdentity { get { throw null; } set { } } public string ContentType { get { throw null; } } public System.Uri ContentUri { get { throw null; } set { } } public Azure.ResourceManager.GuestConfiguration.Models.GuestConfigurationKind? Kind { get { throw null; } set { } } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/samples/Generated/Samples/Sample_GuestConfigurationHcrpAssignmentCollection.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/samples/Generated/Samples/Sample_GuestConfigurationHcrpAssignmentCollection.cs index bb96c6d8d0ae2..e10a80f41ee65 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/samples/Generated/Samples/Sample_GuestConfigurationHcrpAssignmentCollection.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/samples/Generated/Samples/Sample_GuestConfigurationHcrpAssignmentCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_GuestConfigurationHcrpAssignmentCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateGuestConfigurationAssignment() { - // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/createOrUpdateGuestConfigurationHCRPAssignment.json + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/createOrUpdateGuestConfigurationHCRPAssignment.json // this example is just showing the usage of "GuestConfigurationHCRPAssignments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -47,7 +47,7 @@ public async Task CreateOrUpdate_CreateOrUpdateGuestConfigurationAssignment() GuestConfiguration = new GuestConfigurationNavigation() { Name = "NotInstalledApplicationForWindows", - Version = "1.*", + Version = "1.0.0.3", ContentUri = new Uri("https://thisisfake/pacakge"), ContentHash = "123contenthash", AssignmentType = GuestConfigurationAssignmentType.ApplyAndAutoCorrect, @@ -80,7 +80,7 @@ public async Task CreateOrUpdate_CreateOrUpdateGuestConfigurationAssignment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAGuestConfigurationAssignment() { - // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/getGuestConfigurationHCRPAssignment.json + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/getGuestConfigurationHCRPAssignment.json // this example is just showing the usage of "GuestConfigurationHCRPAssignments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -114,7 +114,7 @@ public async Task Get_GetAGuestConfigurationAssignment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAGuestConfigurationAssignment() { - // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/getGuestConfigurationHCRPAssignment.json + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/getGuestConfigurationHCRPAssignment.json // this example is just showing the usage of "GuestConfigurationHCRPAssignments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -144,7 +144,7 @@ public async Task Exists_GetAGuestConfigurationAssignment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAGuestConfigurationAssignment() { - // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/getGuestConfigurationHCRPAssignment.json + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/getGuestConfigurationHCRPAssignment.json // this example is just showing the usage of "GuestConfigurationHCRPAssignments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -186,7 +186,7 @@ public async Task GetIfExists_GetAGuestConfigurationAssignment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAllGuestConfigurationAssignmentsForAVirtualMachine() { - // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/listGuestConfigurationHCRPAssignments.json + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/listGuestConfigurationHCRPAssignments.json // this example is just showing the usage of "GuestConfigurationHCRPAssignments_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/samples/Generated/Samples/Sample_GuestConfigurationHcrpAssignmentResource.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/samples/Generated/Samples/Sample_GuestConfigurationHcrpAssignmentResource.cs index 3b7f30a5ec6da..f4ec42b25ea90 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/samples/Generated/Samples/Sample_GuestConfigurationHcrpAssignmentResource.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/samples/Generated/Samples/Sample_GuestConfigurationHcrpAssignmentResource.cs @@ -20,7 +20,7 @@ public partial class Sample_GuestConfigurationHcrpAssignmentResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateGuestConfigurationAssignment() { - // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/createOrUpdateGuestConfigurationHCRPAssignment.json + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/createOrUpdateGuestConfigurationHCRPAssignment.json // this example is just showing the usage of "GuestConfigurationHCRPAssignments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -45,7 +45,7 @@ public async Task Update_CreateOrUpdateGuestConfigurationAssignment() GuestConfiguration = new GuestConfigurationNavigation() { Name = "NotInstalledApplicationForWindows", - Version = "1.*", + Version = "1.0.0.3", ContentUri = new Uri("https://thisisfake/pacakge"), ContentHash = "123contenthash", AssignmentType = GuestConfigurationAssignmentType.ApplyAndAutoCorrect, @@ -78,7 +78,7 @@ public async Task Update_CreateOrUpdateGuestConfigurationAssignment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAGuestConfigurationAssignment() { - // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/getGuestConfigurationHCRPAssignment.json + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/getGuestConfigurationHCRPAssignment.json // this example is just showing the usage of "GuestConfigurationHCRPAssignments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -110,7 +110,7 @@ public async Task Get_GetAGuestConfigurationAssignment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAnGuestConfigurationAssignment() { - // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/deleteGuestConfigurationHCRPAssignment.json + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/deleteGuestConfigurationHCRPAssignment.json // this example is just showing the usage of "GuestConfigurationHCRPAssignments_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -138,7 +138,7 @@ public async Task Delete_DeleteAnGuestConfigurationAssignment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetReports_ListAllGuestConfigurationAssignmentsForAVirtualMachine() { - // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/listAllGuestConfigurationHCRPAssignmentReports.json + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/listAllGuestConfigurationHCRPAssignmentReports.json // this example is just showing the usage of "GuestConfigurationHCRPAssignmentReports_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -169,7 +169,7 @@ public async Task GetReports_ListAllGuestConfigurationAssignmentsForAVirtualMach [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetReport_GetAGuestConfigurationAssignmentReportByIdForAVirtualMachine() { - // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/getGuestConfigurationHCRPAssignmentReportById.json + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/getGuestConfigurationHCRPAssignmentReportById.json // this example is just showing the usage of "GuestConfigurationHCRPAssignmentReports_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/samples/Generated/Samples/Sample_GuestConfigurationVMwarevSphereAssignmentCollection.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/samples/Generated/Samples/Sample_GuestConfigurationVMwarevSphereAssignmentCollection.cs new file mode 100644 index 0000000000000..830d74f4085b6 --- /dev/null +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/samples/Generated/Samples/Sample_GuestConfigurationVMwarevSphereAssignmentCollection.cs @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.GuestConfiguration.Models; + +namespace Azure.ResourceManager.GuestConfiguration.Samples +{ + public partial class Sample_GuestConfigurationVMwarevSphereAssignmentCollection + { + // Create or update guest configuration assignment + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateGuestConfigurationAssignment() + { + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/createOrUpdateGuestConfigurationConnectedVMwarevSphereAssignment.json + // this example is just showing the usage of "GuestConfigurationConnectedVMwarevSphereAssignments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ArmResource created on azure + // for more information of creating ArmResource, please refer to the document of ArmResource + + // get the collection of this GuestConfigurationVMwarevSphereAssignmentResource + string subscriptionId = "mySubscriptionId"; + string resourceGroupName = "myResourceGroupName"; + string vmName = "myVMName"; + ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/{2}", subscriptionId, resourceGroupName, vmName)); + GuestConfigurationVMwarevSphereAssignmentCollection collection = client.GetGuestConfigurationVMwarevSphereAssignments(scopeId); + + // invoke the operation + string guestConfigurationAssignmentName = "NotInstalledApplicationForWindows"; + GuestConfigurationAssignmentData data = new GuestConfigurationAssignmentData() + { + Properties = new GuestConfigurationAssignmentProperties() + { + GuestConfiguration = new GuestConfigurationNavigation() + { + Name = "NotInstalledApplicationForWindows", + Version = "1.0.0.0", + ContentUri = new Uri("https://thisisfake/pacakge"), + ContentHash = "123contenthash", + AssignmentType = GuestConfigurationAssignmentType.ApplyAndAutoCorrect, + ConfigurationParameters = +{ +new GuestConfigurationParameter() +{ +Name = "[InstalledApplication]NotInstalledApplicationResource1;Name", +Value = "NotePad,sql", +} +}, + }, + Context = "Azure policy", + }, + Name = "NotInstalledApplicationForWindows", + Location = new AzureLocation("westcentralus"), + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, guestConfigurationAssignmentName, data); + GuestConfigurationVMwarevSphereAssignmentResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + GuestConfigurationAssignmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get a guest configuration assignment + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAGuestConfigurationAssignment() + { + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/getGuestConfigurationConnectedVMwarevSphereAssignment.json + // this example is just showing the usage of "GuestConfigurationConnectedVMwarevSphereAssignments_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ArmResource created on azure + // for more information of creating ArmResource, please refer to the document of ArmResource + + // get the collection of this GuestConfigurationVMwarevSphereAssignmentResource + string subscriptionId = "mySubscriptionId"; + string resourceGroupName = "myResourceGroupName"; + string vmName = "myVMName"; + ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/{2}", subscriptionId, resourceGroupName, vmName)); + GuestConfigurationVMwarevSphereAssignmentCollection collection = client.GetGuestConfigurationVMwarevSphereAssignments(scopeId); + + // invoke the operation + string guestConfigurationAssignmentName = "SecureProtocol"; + GuestConfigurationVMwarevSphereAssignmentResource result = await collection.GetAsync(guestConfigurationAssignmentName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + GuestConfigurationAssignmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get a guest configuration assignment + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetAGuestConfigurationAssignment() + { + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/getGuestConfigurationConnectedVMwarevSphereAssignment.json + // this example is just showing the usage of "GuestConfigurationConnectedVMwarevSphereAssignments_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ArmResource created on azure + // for more information of creating ArmResource, please refer to the document of ArmResource + + // get the collection of this GuestConfigurationVMwarevSphereAssignmentResource + string subscriptionId = "mySubscriptionId"; + string resourceGroupName = "myResourceGroupName"; + string vmName = "myVMName"; + ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/{2}", subscriptionId, resourceGroupName, vmName)); + GuestConfigurationVMwarevSphereAssignmentCollection collection = client.GetGuestConfigurationVMwarevSphereAssignments(scopeId); + + // invoke the operation + string guestConfigurationAssignmentName = "SecureProtocol"; + bool result = await collection.ExistsAsync(guestConfigurationAssignmentName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get a guest configuration assignment + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetAGuestConfigurationAssignment() + { + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/getGuestConfigurationConnectedVMwarevSphereAssignment.json + // this example is just showing the usage of "GuestConfigurationConnectedVMwarevSphereAssignments_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ArmResource created on azure + // for more information of creating ArmResource, please refer to the document of ArmResource + + // get the collection of this GuestConfigurationVMwarevSphereAssignmentResource + string subscriptionId = "mySubscriptionId"; + string resourceGroupName = "myResourceGroupName"; + string vmName = "myVMName"; + ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/{2}", subscriptionId, resourceGroupName, vmName)); + GuestConfigurationVMwarevSphereAssignmentCollection collection = client.GetGuestConfigurationVMwarevSphereAssignments(scopeId); + + // invoke the operation + string guestConfigurationAssignmentName = "SecureProtocol"; + NullableResponse response = await collection.GetIfExistsAsync(guestConfigurationAssignmentName); + GuestConfigurationVMwarevSphereAssignmentResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + GuestConfigurationAssignmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // List all guest configuration assignments for a virtual machine + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListAllGuestConfigurationAssignmentsForAVirtualMachine() + { + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/listGuestConfigurationConnectedVMwarevSphereAssignments.json + // this example is just showing the usage of "GuestConfigurationConnectedVMwarevSphereAssignments_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ArmResource created on azure + // for more information of creating ArmResource, please refer to the document of ArmResource + + // get the collection of this GuestConfigurationVMwarevSphereAssignmentResource + string subscriptionId = "mySubscriptionId"; + string resourceGroupName = "myResourceGroupName"; + string vmName = "myVMName"; + ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/{2}", subscriptionId, resourceGroupName, vmName)); + GuestConfigurationVMwarevSphereAssignmentCollection collection = client.GetGuestConfigurationVMwarevSphereAssignments(scopeId); + + // invoke the operation and iterate over the result + await foreach (GuestConfigurationVMwarevSphereAssignmentResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + GuestConfigurationAssignmentData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/samples/Generated/Samples/Sample_GuestConfigurationVMwarevSphereAssignmentResource.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/samples/Generated/Samples/Sample_GuestConfigurationVMwarevSphereAssignmentResource.cs new file mode 100644 index 0000000000000..377a18600a0ad --- /dev/null +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/samples/Generated/Samples/Sample_GuestConfigurationVMwarevSphereAssignmentResource.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.GuestConfiguration.Models; + +namespace Azure.ResourceManager.GuestConfiguration.Samples +{ + public partial class Sample_GuestConfigurationVMwarevSphereAssignmentResource + { + // Create or update guest configuration assignment + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_CreateOrUpdateGuestConfigurationAssignment() + { + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/createOrUpdateGuestConfigurationConnectedVMwarevSphereAssignment.json + // this example is just showing the usage of "GuestConfigurationConnectedVMwarevSphereAssignments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this GuestConfigurationVMwarevSphereAssignmentResource created on azure + // for more information of creating GuestConfigurationVMwarevSphereAssignmentResource, please refer to the document of GuestConfigurationVMwarevSphereAssignmentResource + string subscriptionId = "mySubscriptionId"; + string resourceGroupName = "myResourceGroupName"; + string vmName = "myVMName"; + string guestConfigurationAssignmentName = "NotInstalledApplicationForWindows"; + ResourceIdentifier guestConfigurationVMwarevSphereAssignmentResourceId = GuestConfigurationVMwarevSphereAssignmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vmName, guestConfigurationAssignmentName); + GuestConfigurationVMwarevSphereAssignmentResource guestConfigurationVMwarevSphereAssignment = client.GetGuestConfigurationVMwarevSphereAssignmentResource(guestConfigurationVMwarevSphereAssignmentResourceId); + + // invoke the operation + GuestConfigurationAssignmentData data = new GuestConfigurationAssignmentData() + { + Properties = new GuestConfigurationAssignmentProperties() + { + GuestConfiguration = new GuestConfigurationNavigation() + { + Name = "NotInstalledApplicationForWindows", + Version = "1.0.0.0", + ContentUri = new Uri("https://thisisfake/pacakge"), + ContentHash = "123contenthash", + AssignmentType = GuestConfigurationAssignmentType.ApplyAndAutoCorrect, + ConfigurationParameters = +{ +new GuestConfigurationParameter() +{ +Name = "[InstalledApplication]NotInstalledApplicationResource1;Name", +Value = "NotePad,sql", +} +}, + }, + Context = "Azure policy", + }, + Name = "NotInstalledApplicationForWindows", + Location = new AzureLocation("westcentralus"), + }; + ArmOperation lro = await guestConfigurationVMwarevSphereAssignment.UpdateAsync(WaitUntil.Completed, data); + GuestConfigurationVMwarevSphereAssignmentResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + GuestConfigurationAssignmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get a guest configuration assignment + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetAGuestConfigurationAssignment() + { + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/getGuestConfigurationConnectedVMwarevSphereAssignment.json + // this example is just showing the usage of "GuestConfigurationConnectedVMwarevSphereAssignments_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this GuestConfigurationVMwarevSphereAssignmentResource created on azure + // for more information of creating GuestConfigurationVMwarevSphereAssignmentResource, please refer to the document of GuestConfigurationVMwarevSphereAssignmentResource + string subscriptionId = "mySubscriptionId"; + string resourceGroupName = "myResourceGroupName"; + string vmName = "myVMName"; + string guestConfigurationAssignmentName = "SecureProtocol"; + ResourceIdentifier guestConfigurationVMwarevSphereAssignmentResourceId = GuestConfigurationVMwarevSphereAssignmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vmName, guestConfigurationAssignmentName); + GuestConfigurationVMwarevSphereAssignmentResource guestConfigurationVMwarevSphereAssignment = client.GetGuestConfigurationVMwarevSphereAssignmentResource(guestConfigurationVMwarevSphereAssignmentResourceId); + + // invoke the operation + GuestConfigurationVMwarevSphereAssignmentResource result = await guestConfigurationVMwarevSphereAssignment.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + GuestConfigurationAssignmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Delete an guest configuration assignment + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteAnGuestConfigurationAssignment() + { + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/deleteGuestConfigurationConnectedVMwarevSphereAssignment.json + // this example is just showing the usage of "GuestConfigurationConnectedVMwarevSphereAssignments_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this GuestConfigurationVMwarevSphereAssignmentResource created on azure + // for more information of creating GuestConfigurationVMwarevSphereAssignmentResource, please refer to the document of GuestConfigurationVMwarevSphereAssignmentResource + string subscriptionId = "mySubscriptionId"; + string resourceGroupName = "myResourceGroupName"; + string vmName = "myVMName"; + string guestConfigurationAssignmentName = "SecureProtocol"; + ResourceIdentifier guestConfigurationVMwarevSphereAssignmentResourceId = GuestConfigurationVMwarevSphereAssignmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vmName, guestConfigurationAssignmentName); + GuestConfigurationVMwarevSphereAssignmentResource guestConfigurationVMwarevSphereAssignment = client.GetGuestConfigurationVMwarevSphereAssignmentResource(guestConfigurationVMwarevSphereAssignmentResourceId); + + // invoke the operation + await guestConfigurationVMwarevSphereAssignment.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // List all guest configuration assignments for a virtual machine + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetGuestConfigurationConnectedVMwarevSphereAssignmentsReports_ListAllGuestConfigurationAssignmentsForAVirtualMachine() + { + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/listAllGuestConfigurationConnectedVMwarevSphereAssignmentsReports.json + // this example is just showing the usage of "GuestConfigurationConnectedVMwarevSphereAssignmentsReports_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this GuestConfigurationVMwarevSphereAssignmentResource created on azure + // for more information of creating GuestConfigurationVMwarevSphereAssignmentResource, please refer to the document of GuestConfigurationVMwarevSphereAssignmentResource + string subscriptionId = "mySubscriptionid"; + string resourceGroupName = "myResourceGroupName"; + string vmName = "myVMName"; + string guestConfigurationAssignmentName = "AuditSecureProtocol"; + ResourceIdentifier guestConfigurationVMwarevSphereAssignmentResourceId = GuestConfigurationVMwarevSphereAssignmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vmName, guestConfigurationAssignmentName); + GuestConfigurationVMwarevSphereAssignmentResource guestConfigurationVMwarevSphereAssignment = client.GetGuestConfigurationVMwarevSphereAssignmentResource(guestConfigurationVMwarevSphereAssignmentResourceId); + + // invoke the operation and iterate over the result + await foreach (GuestConfigurationAssignmentReport item in guestConfigurationVMwarevSphereAssignment.GetGuestConfigurationConnectedVMwarevSphereAssignmentsReportsAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } + + // Get a guest configuration assignment report by Id for a virtual machine + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetGuestConfigurationConnectedVMwarevSphereAssignmentsReport_GetAGuestConfigurationAssignmentReportByIdForAVirtualMachine() + { + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/getGuestConfigurationConnectedVMwarevSphereAssignmentReportById.json + // this example is just showing the usage of "GuestConfigurationConnectedVMwarevSphereAssignmentsReports_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this GuestConfigurationVMwarevSphereAssignmentResource created on azure + // for more information of creating GuestConfigurationVMwarevSphereAssignmentResource, please refer to the document of GuestConfigurationVMwarevSphereAssignmentResource + string subscriptionId = "mySubscriptionid"; + string resourceGroupName = "myResourceGroupName"; + string vmName = "myvm"; + string guestConfigurationAssignmentName = "AuditSecureProtocol"; + ResourceIdentifier guestConfigurationVMwarevSphereAssignmentResourceId = GuestConfigurationVMwarevSphereAssignmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vmName, guestConfigurationAssignmentName); + GuestConfigurationVMwarevSphereAssignmentResource guestConfigurationVMwarevSphereAssignment = client.GetGuestConfigurationVMwarevSphereAssignmentResource(guestConfigurationVMwarevSphereAssignmentResourceId); + + // invoke the operation + string reportId = "7367cbb8-ae99-47d0-a33b-a283564d2cb1"; + GuestConfigurationAssignmentReport result = await guestConfigurationVMwarevSphereAssignment.GetGuestConfigurationConnectedVMwarevSphereAssignmentsReportAsync(reportId); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/samples/Generated/Samples/Sample_GuestConfigurationVmAssignmentCollection.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/samples/Generated/Samples/Sample_GuestConfigurationVmAssignmentCollection.cs index a8981b0d45f9c..e0a2b6b9d247b 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/samples/Generated/Samples/Sample_GuestConfigurationVmAssignmentCollection.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/samples/Generated/Samples/Sample_GuestConfigurationVmAssignmentCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_GuestConfigurationVmAssignmentCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateGuestConfigurationAssignment() { - // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/createOrUpdateGuestConfigurationAssignment.json + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/createOrUpdateGuestConfigurationAssignment.json // this example is just showing the usage of "GuestConfigurationAssignments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -47,9 +47,10 @@ public async Task CreateOrUpdate_CreateOrUpdateGuestConfigurationAssignment() GuestConfiguration = new GuestConfigurationNavigation() { Name = "NotInstalledApplicationForWindows", - Version = "1.*", + Version = "1.0.0.3", ContentUri = new Uri("https://thisisfake/pacakge"), ContentHash = "123contenthash", + ContentManagedIdentity = "test_identity", AssignmentType = GuestConfigurationAssignmentType.ApplyAndAutoCorrect, ConfigurationParameters = { @@ -80,7 +81,7 @@ public async Task CreateOrUpdate_CreateOrUpdateGuestConfigurationAssignment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAGuestConfigurationAssignment() { - // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/getGuestConfigurationAssignment.json + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/getGuestConfigurationAssignment.json // this example is just showing the usage of "GuestConfigurationAssignments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -114,7 +115,7 @@ public async Task Get_GetAGuestConfigurationAssignment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAGuestConfigurationAssignment() { - // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/getGuestConfigurationAssignment.json + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/getGuestConfigurationAssignment.json // this example is just showing the usage of "GuestConfigurationAssignments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -144,7 +145,7 @@ public async Task Exists_GetAGuestConfigurationAssignment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAGuestConfigurationAssignment() { - // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/getGuestConfigurationAssignment.json + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/getGuestConfigurationAssignment.json // this example is just showing the usage of "GuestConfigurationAssignments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -186,7 +187,7 @@ public async Task GetIfExists_GetAGuestConfigurationAssignment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAllGuestConfigurationAssignmentsForAVirtualMachine() { - // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/listGuestConfigurationAssignments.json + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/listGuestConfigurationAssignments.json // this example is just showing the usage of "GuestConfigurationAssignments_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/samples/Generated/Samples/Sample_GuestConfigurationVmAssignmentResource.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/samples/Generated/Samples/Sample_GuestConfigurationVmAssignmentResource.cs index 74201ec1a65ba..831ac5342fef6 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/samples/Generated/Samples/Sample_GuestConfigurationVmAssignmentResource.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/samples/Generated/Samples/Sample_GuestConfigurationVmAssignmentResource.cs @@ -20,7 +20,7 @@ public partial class Sample_GuestConfigurationVmAssignmentResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateGuestConfigurationAssignment() { - // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/createOrUpdateGuestConfigurationAssignment.json + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/createOrUpdateGuestConfigurationAssignment.json // this example is just showing the usage of "GuestConfigurationAssignments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -45,9 +45,10 @@ public async Task Update_CreateOrUpdateGuestConfigurationAssignment() GuestConfiguration = new GuestConfigurationNavigation() { Name = "NotInstalledApplicationForWindows", - Version = "1.*", + Version = "1.0.0.3", ContentUri = new Uri("https://thisisfake/pacakge"), ContentHash = "123contenthash", + ContentManagedIdentity = "test_identity", AssignmentType = GuestConfigurationAssignmentType.ApplyAndAutoCorrect, ConfigurationParameters = { @@ -78,7 +79,7 @@ public async Task Update_CreateOrUpdateGuestConfigurationAssignment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAGuestConfigurationAssignment() { - // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/getGuestConfigurationAssignment.json + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/getGuestConfigurationAssignment.json // this example is just showing the usage of "GuestConfigurationAssignments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -110,7 +111,7 @@ public async Task Get_GetAGuestConfigurationAssignment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAnGuestConfigurationAssignment() { - // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/deleteGuestConfigurationAssignment.json + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/deleteGuestConfigurationAssignment.json // this example is just showing the usage of "GuestConfigurationAssignments_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -138,7 +139,7 @@ public async Task Delete_DeleteAnGuestConfigurationAssignment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetReports_ListAllGuestConfigurationAssignmentsForAVirtualMachine() { - // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/listAllGuestConfigurationAssignmentReports.json + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/listAllGuestConfigurationAssignmentReports.json // this example is just showing the usage of "GuestConfigurationAssignmentReports_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -169,7 +170,7 @@ public async Task GetReports_ListAllGuestConfigurationAssignmentsForAVirtualMach [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetReport_GetAGuestConfigurationAssignmentReportByIdForAVirtualMachine() { - // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/getGuestConfigurationAssignmentReportById.json + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/getGuestConfigurationAssignmentReportById.json // this example is just showing the usage of "GuestConfigurationAssignmentReports_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/samples/Generated/Samples/Sample_GuestConfigurationVmssAssignmentCollection.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/samples/Generated/Samples/Sample_GuestConfigurationVmssAssignmentCollection.cs index 8828233aea84c..14a0ab252a9a7 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/samples/Generated/Samples/Sample_GuestConfigurationVmssAssignmentCollection.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/samples/Generated/Samples/Sample_GuestConfigurationVmssAssignmentCollection.cs @@ -9,17 +9,79 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; +using Azure.ResourceManager.GuestConfiguration.Models; namespace Azure.ResourceManager.GuestConfiguration.Samples { public partial class Sample_GuestConfigurationVmssAssignmentCollection { + // Create or update guest configuration assignment + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateGuestConfigurationAssignment() + { + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/createOrUpdateGuestConfigurationVMSSAssignment.json + // this example is just showing the usage of "GuestConfigurationAssignmentsVMSS_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ArmResource created on azure + // for more information of creating ArmResource, please refer to the document of ArmResource + + // get the collection of this GuestConfigurationVmssAssignmentResource + string subscriptionId = "mySubscriptionId"; + string resourceGroupName = "myResourceGroupName"; + string vmssName = "myVMSSName"; + ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.Compute/virtualMachineScaleSets/{2}", subscriptionId, resourceGroupName, vmssName)); + GuestConfigurationVmssAssignmentCollection collection = client.GetGuestConfigurationVmssAssignments(scopeId); + + // invoke the operation + string name = "NotInstalledApplicationForWindows"; + GuestConfigurationAssignmentData data = new GuestConfigurationAssignmentData() + { + Properties = new GuestConfigurationAssignmentProperties() + { + GuestConfiguration = new GuestConfigurationNavigation() + { + Name = "NotInstalledApplicationForWindows", + Version = "1.0.0.3", + ContentUri = new Uri("https://thisisfake/pacakge"), + ContentHash = "123contenthash", + ContentManagedIdentity = "test_identity", + AssignmentType = GuestConfigurationAssignmentType.ApplyAndAutoCorrect, + ConfigurationParameters = +{ +new GuestConfigurationParameter() +{ +Name = "[InstalledApplication]NotInstalledApplicationResource1;Name", +Value = "NotePad,sql", +} +}, + }, + Context = "Azure policy", + }, + Name = "NotInstalledApplicationForWindows", + Location = new AzureLocation("westcentralus"), + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); + GuestConfigurationVmssAssignmentResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + GuestConfigurationAssignmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + // Get a VMSS guest configuration assignment [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAVMSSGuestConfigurationAssignment() { - // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/getVMSSGuestConfigurationAssignment.json + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/getVMSSGuestConfigurationAssignment.json // this example is just showing the usage of "GuestConfigurationAssignmentsVMSS_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +115,7 @@ public async Task Get_GetAVMSSGuestConfigurationAssignment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAVMSSGuestConfigurationAssignment() { - // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/getVMSSGuestConfigurationAssignment.json + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/getVMSSGuestConfigurationAssignment.json // this example is just showing the usage of "GuestConfigurationAssignmentsVMSS_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -83,7 +145,7 @@ public async Task Exists_GetAVMSSGuestConfigurationAssignment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAVMSSGuestConfigurationAssignment() { - // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/getVMSSGuestConfigurationAssignment.json + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/getVMSSGuestConfigurationAssignment.json // this example is just showing the usage of "GuestConfigurationAssignmentsVMSS_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -125,7 +187,7 @@ public async Task GetIfExists_GetAVMSSGuestConfigurationAssignment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAllGuestConfigurationAssignmentsForVMSS() { - // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/listVMSSGuestConfigurationAssignments.json + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/listVMSSGuestConfigurationAssignments.json // this example is just showing the usage of "GuestConfigurationAssignmentsVMSS_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/samples/Generated/Samples/Sample_GuestConfigurationVmssAssignmentResource.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/samples/Generated/Samples/Sample_GuestConfigurationVmssAssignmentResource.cs index 455f60d5aa444..b03706f6e4ee0 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/samples/Generated/Samples/Sample_GuestConfigurationVmssAssignmentResource.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/samples/Generated/Samples/Sample_GuestConfigurationVmssAssignmentResource.cs @@ -15,12 +15,71 @@ namespace Azure.ResourceManager.GuestConfiguration.Samples { public partial class Sample_GuestConfigurationVmssAssignmentResource { + // Create or update guest configuration assignment + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_CreateOrUpdateGuestConfigurationAssignment() + { + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/createOrUpdateGuestConfigurationVMSSAssignment.json + // this example is just showing the usage of "GuestConfigurationAssignmentsVMSS_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this GuestConfigurationVmssAssignmentResource created on azure + // for more information of creating GuestConfigurationVmssAssignmentResource, please refer to the document of GuestConfigurationVmssAssignmentResource + string subscriptionId = "mySubscriptionId"; + string resourceGroupName = "myResourceGroupName"; + string vmssName = "myVMSSName"; + string name = "NotInstalledApplicationForWindows"; + ResourceIdentifier guestConfigurationVmssAssignmentResourceId = GuestConfigurationVmssAssignmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vmssName, name); + GuestConfigurationVmssAssignmentResource guestConfigurationVmssAssignment = client.GetGuestConfigurationVmssAssignmentResource(guestConfigurationVmssAssignmentResourceId); + + // invoke the operation + GuestConfigurationAssignmentData data = new GuestConfigurationAssignmentData() + { + Properties = new GuestConfigurationAssignmentProperties() + { + GuestConfiguration = new GuestConfigurationNavigation() + { + Name = "NotInstalledApplicationForWindows", + Version = "1.0.0.3", + ContentUri = new Uri("https://thisisfake/pacakge"), + ContentHash = "123contenthash", + ContentManagedIdentity = "test_identity", + AssignmentType = GuestConfigurationAssignmentType.ApplyAndAutoCorrect, + ConfigurationParameters = +{ +new GuestConfigurationParameter() +{ +Name = "[InstalledApplication]NotInstalledApplicationResource1;Name", +Value = "NotePad,sql", +} +}, + }, + Context = "Azure policy", + }, + Name = "NotInstalledApplicationForWindows", + Location = new AzureLocation("westcentralus"), + }; + ArmOperation lro = await guestConfigurationVmssAssignment.UpdateAsync(WaitUntil.Completed, data); + GuestConfigurationVmssAssignmentResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + GuestConfigurationAssignmentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + // Get a VMSS guest configuration assignment [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAVMSSGuestConfigurationAssignment() { - // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/getVMSSGuestConfigurationAssignment.json + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/getVMSSGuestConfigurationAssignment.json // this example is just showing the usage of "GuestConfigurationAssignmentsVMSS_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +111,7 @@ public async Task Get_GetAVMSSGuestConfigurationAssignment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAnGuestConfigurationAssignmentForVMSS() { - // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/deleteGuestConfigurationVMSSAssignment.json + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/deleteGuestConfigurationVMSSAssignment.json // this example is just showing the usage of "GuestConfigurationAssignmentsVMSS_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +144,7 @@ public async Task Delete_DeleteAnGuestConfigurationAssignmentForVMSS() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetReports_ListAllReportsForTheVMSSGuestConfigurationAssignmentWithLatestReportFirst() { - // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/listAllVMSSGuestConfigurationAssignmentReports.json + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/listAllVMSSGuestConfigurationAssignmentReports.json // this example is just showing the usage of "GuestConfigurationAssignmentReportsVMSS_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -116,7 +175,7 @@ public async Task GetReports_ListAllReportsForTheVMSSGuestConfigurationAssignmen [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetReport_GetAGuestConfigurationAssignmentReportByIdForAVirtualMachineScaleSet() { - // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2022-01-25/examples/getVMSSGuestConfigurationAssignmentReportById.json + // Generated from example definition: specification/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/stable/2024-04-05/examples/getVMSSGuestConfigurationAssignmentReportById.json // this example is just showing the usage of "GuestConfigurationAssignmentReportsVMSS_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Azure.ResourceManager.GuestConfiguration.csproj b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Azure.ResourceManager.GuestConfiguration.csproj index 8230187e326b0..303e696e5d884 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Azure.ResourceManager.GuestConfiguration.csproj +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Azure.ResourceManager.GuestConfiguration.csproj @@ -1,6 +1,6 @@ - 1.2.0-beta.1 + 1.2.0 1.1.0 Azure.ResourceManager.GuestConfiguration diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/ArmGuestConfigurationModelFactory.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/ArmGuestConfigurationModelFactory.cs index 99da8494ca8d8..5eb97d4dbaf3f 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/ArmGuestConfigurationModelFactory.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/ArmGuestConfigurationModelFactory.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using Azure.Core; using Azure.ResourceManager.Models; @@ -76,6 +77,7 @@ public static GuestConfigurationAssignmentProperties GuestConfigurationAssignmen /// Version of the guest configuration. /// Uri of the storage where guest configuration package is uploaded. /// Combined hash of the guest configuration package and configuration parameters. + /// Managed identity with storage access of the guest configuration package and configuration parameters. /// Specifies the assignment type and execution of the configuration. Possible values are Audit, DeployAndAutoCorrect, ApplyAndAutoCorrect and ApplyAndMonitor. /// Specifies the origin of the configuration. /// Specifies the content type of the configuration. Possible values could be Builtin or Custom. @@ -83,7 +85,7 @@ public static GuestConfigurationAssignmentProperties GuestConfigurationAssignmen /// The protected configuration parameters for the guest configuration. /// The configuration setting for the guest configuration. /// A new instance for mocking. - public static GuestConfigurationNavigation GuestConfigurationNavigation(GuestConfigurationKind? kind = null, string name = null, string version = null, Uri contentUri = null, string contentHash = null, GuestConfigurationAssignmentType? assignmentType = null, string assignmentSource = null, string contentType = null, IEnumerable configurationParameters = null, IEnumerable configurationProtectedParameters = null, LcmConfigurationSetting configurationSetting = null) + public static GuestConfigurationNavigation GuestConfigurationNavigation(GuestConfigurationKind? kind = null, string name = null, string version = null, Uri contentUri = null, string contentHash = null, string contentManagedIdentity = null, GuestConfigurationAssignmentType? assignmentType = null, string assignmentSource = null, string contentType = null, IEnumerable configurationParameters = null, IEnumerable configurationProtectedParameters = null, LcmConfigurationSetting configurationSetting = null) { configurationParameters ??= new List(); configurationProtectedParameters ??= new List(); @@ -94,6 +96,7 @@ public static GuestConfigurationNavigation GuestConfigurationNavigation(GuestCon version, contentUri, contentHash, + contentManagedIdentity, assignmentType, assignmentSource, contentType, @@ -291,5 +294,24 @@ public static GuestConfigurationAssignmentReportDetails GuestConfigurationAssign resources?.ToList(), serializedAdditionalRawData: null); } + + /// Initializes a new instance of . + /// Kind of the guest configuration. For example:DSC. + /// Name of the guest configuration. + /// Version of the guest configuration. + /// Uri of the storage where guest configuration package is uploaded. + /// Combined hash of the guest configuration package and configuration parameters. + /// Specifies the assignment type and execution of the configuration. Possible values are Audit, DeployAndAutoCorrect, ApplyAndAutoCorrect and ApplyAndMonitor. + /// Specifies the origin of the configuration. + /// Specifies the content type of the configuration. Possible values could be Builtin or Custom. + /// The configuration parameters for the guest configuration. + /// The protected configuration parameters for the guest configuration. + /// The configuration setting for the guest configuration. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static GuestConfigurationNavigation GuestConfigurationNavigation(GuestConfigurationKind? kind, string name, string version, Uri contentUri, string contentHash, GuestConfigurationAssignmentType? assignmentType, string assignmentSource, string contentType, IEnumerable configurationParameters, IEnumerable configurationProtectedParameters, LcmConfigurationSetting configurationSetting) + { + return GuestConfigurationNavigation(kind: kind, name: name, version: version, contentUri: contentUri, contentHash: contentHash, contentManagedIdentity: default, assignmentType: assignmentType, assignmentSource: assignmentSource, contentType: contentType, configurationParameters: configurationParameters, configurationProtectedParameters: configurationProtectedParameters, configurationSetting: configurationSetting); + } } } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Extensions/GuestConfigurationExtensions.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Extensions/GuestConfigurationExtensions.cs index f08435cb3d879..35a0e7d6a58d7 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Extensions/GuestConfigurationExtensions.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Extensions/GuestConfigurationExtensions.cs @@ -63,7 +63,7 @@ public static GuestConfigurationVmAssignmentCollection GetGuestConfigurationVmAs ///
/// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -102,7 +102,7 @@ public static async Task> GetGu /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -159,7 +159,7 @@ public static GuestConfigurationHcrpAssignmentCollection GetGuestConfigurationHc /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -198,7 +198,7 @@ public static async Task> Get /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -255,7 +255,7 @@ public static GuestConfigurationVmssAssignmentCollection GetGuestConfigurationVm /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -294,7 +294,7 @@ public static async Task> Get /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -320,6 +320,102 @@ public static Response GetGuestConfigu return GetMockableGuestConfigurationArmClient(client).GetGuestConfigurationVmssAssignment(scope, name, cancellationToken); } + /// + /// Gets a collection of GuestConfigurationVMwarevSphereAssignmentResources in the ArmClient. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The scope that the resource will apply against. Expected resource type includes the following: Microsoft.ConnectedVMwarevSphere/virtualmachines. + /// is null. + /// An object representing collection of GuestConfigurationVMwarevSphereAssignmentResources and their operations over a GuestConfigurationVMwarevSphereAssignmentResource. + public static GuestConfigurationVMwarevSphereAssignmentCollection GetGuestConfigurationVMwarevSphereAssignments(this ArmClient client, ResourceIdentifier scope) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableGuestConfigurationArmClient(client).GetGuestConfigurationVMwarevSphereAssignments(scope); + } + + /// + /// Get information about a guest configuration assignment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName} + /// + /// + /// Operation Id + /// GuestConfigurationConnectedVMwarevSphereAssignments_Get + /// + /// + /// Default Api Version + /// 2024-04-05 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The scope that the resource will apply against. Expected resource type includes the following: Microsoft.ConnectedVMwarevSphere/virtualmachines. + /// The guest configuration assignment name. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetGuestConfigurationVMwarevSphereAssignmentAsync(this ArmClient client, ResourceIdentifier scope, string guestConfigurationAssignmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(client, nameof(client)); + + return await GetMockableGuestConfigurationArmClient(client).GetGuestConfigurationVMwarevSphereAssignmentAsync(scope, guestConfigurationAssignmentName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get information about a guest configuration assignment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName} + /// + /// + /// Operation Id + /// GuestConfigurationConnectedVMwarevSphereAssignments_Get + /// + /// + /// Default Api Version + /// 2024-04-05 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The scope that the resource will apply against. Expected resource type includes the following: Microsoft.ConnectedVMwarevSphere/virtualmachines. + /// The guest configuration assignment name. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetGuestConfigurationVMwarevSphereAssignment(this ArmClient client, ResourceIdentifier scope, string guestConfigurationAssignmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableGuestConfigurationArmClient(client).GetGuestConfigurationVMwarevSphereAssignment(scope, guestConfigurationAssignmentName, cancellationToken); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -376,5 +472,24 @@ public static GuestConfigurationVmssAssignmentResource GetGuestConfigurationVmss return GetMockableGuestConfigurationArmClient(client).GetGuestConfigurationVmssAssignmentResource(id); } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static GuestConfigurationVMwarevSphereAssignmentResource GetGuestConfigurationVMwarevSphereAssignmentResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableGuestConfigurationArmClient(client).GetGuestConfigurationVMwarevSphereAssignmentResource(id); + } } } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Extensions/MockableGuestConfigurationArmClient.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Extensions/MockableGuestConfigurationArmClient.cs index 17ea26b822810..a143b07978c27 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Extensions/MockableGuestConfigurationArmClient.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Extensions/MockableGuestConfigurationArmClient.cs @@ -62,7 +62,7 @@ public virtual GuestConfigurationVmAssignmentCollection GetGuestConfigurationVmA /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -94,7 +94,7 @@ public virtual async Task> GetG /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -138,7 +138,7 @@ public virtual GuestConfigurationHcrpAssignmentCollection GetGuestConfigurationH /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual GuestConfigurationVmssAssignmentCollection GetGuestConfigurationV /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -246,7 +246,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -265,6 +265,82 @@ public virtual Response GetGuestConfig return GetGuestConfigurationVmssAssignments(scope).Get(name, cancellationToken); } + /// Gets a collection of GuestConfigurationVMwarevSphereAssignmentResources in the ArmClient. + /// The scope that the resource will apply against. + /// An object representing collection of GuestConfigurationVMwarevSphereAssignmentResources and their operations over a GuestConfigurationVMwarevSphereAssignmentResource. + public virtual GuestConfigurationVMwarevSphereAssignmentCollection GetGuestConfigurationVMwarevSphereAssignments(ResourceIdentifier scope) + { + if (!scope.ResourceType.Equals("Microsoft.ConnectedVMwarevSphere/virtualmachines")) + { + throw new ArgumentException(string.Format("Invalid resource type {0}, expected Microsoft.ConnectedVMwarevSphere/virtualmachines", scope.ResourceType)); + } + return new GuestConfigurationVMwarevSphereAssignmentCollection(Client, scope); + } + + /// + /// Get information about a guest configuration assignment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName} + /// + /// + /// Operation Id + /// GuestConfigurationConnectedVMwarevSphereAssignments_Get + /// + /// + /// Default Api Version + /// 2024-04-05 + /// + /// + /// Resource + /// + /// + /// + /// + /// The scope that the resource will apply against. + /// The guest configuration assignment name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetGuestConfigurationVMwarevSphereAssignmentAsync(ResourceIdentifier scope, string guestConfigurationAssignmentName, CancellationToken cancellationToken = default) + { + return await GetGuestConfigurationVMwarevSphereAssignments(scope).GetAsync(guestConfigurationAssignmentName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get information about a guest configuration assignment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName} + /// + /// + /// Operation Id + /// GuestConfigurationConnectedVMwarevSphereAssignments_Get + /// + /// + /// Default Api Version + /// 2024-04-05 + /// + /// + /// Resource + /// + /// + /// + /// + /// The scope that the resource will apply against. + /// The guest configuration assignment name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetGuestConfigurationVMwarevSphereAssignment(ResourceIdentifier scope, string guestConfigurationAssignmentName, CancellationToken cancellationToken = default) + { + return GetGuestConfigurationVMwarevSphereAssignments(scope).Get(guestConfigurationAssignmentName, cancellationToken); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -300,5 +376,17 @@ public virtual GuestConfigurationVmssAssignmentResource GetGuestConfigurationVms GuestConfigurationVmssAssignmentResource.ValidateResourceId(id); return new GuestConfigurationVmssAssignmentResource(Client, id); } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual GuestConfigurationVMwarevSphereAssignmentResource GetGuestConfigurationVMwarevSphereAssignmentResource(ResourceIdentifier id) + { + GuestConfigurationVMwarevSphereAssignmentResource.ValidateResourceId(id); + return new GuestConfigurationVMwarevSphereAssignmentResource(Client, id); + } } } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationAssignmentData.Serialization.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationAssignmentData.Serialization.cs index 9ffcf2cfefb98..3001d3f8ad4b6 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationAssignmentData.Serialization.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationAssignmentData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.GuestConfiguration.Models; @@ -172,6 +173,104 @@ internal static GuestConfigurationAssignmentData DeserializeGuestConfigurationAs properties); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" location: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Location)) + { + builder.Append(" location: "); + builder.AppendLine($"'{Location.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Properties), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" properties: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Properties)) + { + builder.Append(" properties: "); + BicepSerializationHelpers.AppendChildObject(builder, Properties, options, 2, false, " properties: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + BicepSerializationHelpers.AppendChildObject(builder, SystemData, options, 2, false, " systemData: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -180,6 +279,8 @@ BinaryData IPersistableModel.Write(ModelReader { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(GuestConfigurationAssignmentData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationAssignmentData.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationAssignmentData.cs index de0545b6f889e..a077ff24137e8 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationAssignmentData.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationAssignmentData.cs @@ -38,6 +38,7 @@ internal GuestConfigurationAssignmentData(ResourceIdentifier id, string name, Az } /// Properties of the Guest configuration assignment. + [WirePath("properties")] public GuestConfigurationAssignmentProperties Properties { get; set; } } } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationHcrpAssignmentCollection.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationHcrpAssignmentCollection.cs index 6cca1cfce88c6..f25f6f735badc 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationHcrpAssignmentCollection.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationHcrpAssignmentCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string gue /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsy /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(Cancell /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string guestConfigurationA /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response Exists(string guestConfigurationAssignmentName, Ca /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -445,7 +445,7 @@ public virtual async Task /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationHcrpAssignmentResource.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationHcrpAssignmentResource.cs index 7b198a98b9593..f217c0daa5ae0 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationHcrpAssignmentResource.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationHcrpAssignmentResource.cs @@ -107,7 +107,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -147,7 +147,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -187,7 +187,7 @@ public virtual Response Get(Cancellati /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -231,7 +231,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -275,7 +275,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -323,7 +323,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -371,7 +371,7 @@ public virtual ArmOperation Update(Wai /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// @@ -396,7 +396,7 @@ public virtual AsyncPageable GetReportsAsync /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// @@ -421,7 +421,7 @@ public virtual Pageable GetReports(Cancellat /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// @@ -460,7 +460,7 @@ public virtual async Task> GetRepor ///
/// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVMwarevSphereAssignmentCollection.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVMwarevSphereAssignmentCollection.cs new file mode 100644 index 0000000000000..351136ab95eb0 --- /dev/null +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVMwarevSphereAssignmentCollection.cs @@ -0,0 +1,495 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.GuestConfiguration +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetGuestConfigurationVMwarevSphereAssignments method from an instance of . + /// + public partial class GuestConfigurationVMwarevSphereAssignmentCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsClientDiagnostics; + private readonly GuestConfigurationConnectedVMwarevSphereAssignmentsRestOperations _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsRestClient; + + /// Initializes a new instance of the class for mocking. + protected GuestConfigurationVMwarevSphereAssignmentCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal GuestConfigurationVMwarevSphereAssignmentCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.GuestConfiguration", GuestConfigurationVMwarevSphereAssignmentResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(GuestConfigurationVMwarevSphereAssignmentResource.ResourceType, out string guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsApiVersion); + _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsRestClient = new GuestConfigurationConnectedVMwarevSphereAssignmentsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != "Microsoft.ConnectedVMwarevSphere/virtualmachines") + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, "Microsoft.ConnectedVMwarevSphere/virtualmachines"), nameof(id)); + } + + /// + /// Creates an association between a Connected VM Sphere machine and guest configuration + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName} + /// + /// + /// Operation Id + /// GuestConfigurationConnectedVMwarevSphereAssignments_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-04-05 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the guest configuration assignment. + /// Parameters supplied to the create or update guest configuration assignment. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string guestConfigurationAssignmentName, GuestConfigurationAssignmentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guestConfigurationAssignmentName, nameof(guestConfigurationAssignmentName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsClientDiagnostics.CreateScope("GuestConfigurationVMwarevSphereAssignmentCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, guestConfigurationAssignmentName, data, cancellationToken).ConfigureAwait(false); + var uri = _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, guestConfigurationAssignmentName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new GuestConfigurationArmOperation(Response.FromValue(new GuestConfigurationVMwarevSphereAssignmentResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates an association between a Connected VM Sphere machine and guest configuration + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName} + /// + /// + /// Operation Id + /// GuestConfigurationConnectedVMwarevSphereAssignments_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-04-05 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the guest configuration assignment. + /// Parameters supplied to the create or update guest configuration assignment. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string guestConfigurationAssignmentName, GuestConfigurationAssignmentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guestConfigurationAssignmentName, nameof(guestConfigurationAssignmentName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsClientDiagnostics.CreateScope("GuestConfigurationVMwarevSphereAssignmentCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, guestConfigurationAssignmentName, data, cancellationToken); + var uri = _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, guestConfigurationAssignmentName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new GuestConfigurationArmOperation(Response.FromValue(new GuestConfigurationVMwarevSphereAssignmentResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get information about a guest configuration assignment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName} + /// + /// + /// Operation Id + /// GuestConfigurationConnectedVMwarevSphereAssignments_Get + /// + /// + /// Default Api Version + /// 2024-04-05 + /// + /// + /// Resource + /// + /// + /// + /// + /// The guest configuration assignment name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string guestConfigurationAssignmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guestConfigurationAssignmentName, nameof(guestConfigurationAssignmentName)); + + using var scope = _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsClientDiagnostics.CreateScope("GuestConfigurationVMwarevSphereAssignmentCollection.Get"); + scope.Start(); + try + { + var response = await _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, guestConfigurationAssignmentName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new GuestConfigurationVMwarevSphereAssignmentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get information about a guest configuration assignment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName} + /// + /// + /// Operation Id + /// GuestConfigurationConnectedVMwarevSphereAssignments_Get + /// + /// + /// Default Api Version + /// 2024-04-05 + /// + /// + /// Resource + /// + /// + /// + /// + /// The guest configuration assignment name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string guestConfigurationAssignmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guestConfigurationAssignmentName, nameof(guestConfigurationAssignmentName)); + + using var scope = _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsClientDiagnostics.CreateScope("GuestConfigurationVMwarevSphereAssignmentCollection.Get"); + scope.Start(); + try + { + var response = _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, guestConfigurationAssignmentName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new GuestConfigurationVMwarevSphereAssignmentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List all guest configuration assignments for an ARC machine. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments + /// + /// + /// Operation Id + /// GuestConfigurationConnectedVMwarevSphereAssignments_List + /// + /// + /// Default Api Version + /// 2024-04-05 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => new GuestConfigurationVMwarevSphereAssignmentResource(Client, GuestConfigurationAssignmentData.DeserializeGuestConfigurationAssignmentData(e)), _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsClientDiagnostics, Pipeline, "GuestConfigurationVMwarevSphereAssignmentCollection.GetAll", "value", null, cancellationToken); + } + + /// + /// List all guest configuration assignments for an ARC machine. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments + /// + /// + /// Operation Id + /// GuestConfigurationConnectedVMwarevSphereAssignments_List + /// + /// + /// Default Api Version + /// 2024-04-05 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => new GuestConfigurationVMwarevSphereAssignmentResource(Client, GuestConfigurationAssignmentData.DeserializeGuestConfigurationAssignmentData(e)), _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsClientDiagnostics, Pipeline, "GuestConfigurationVMwarevSphereAssignmentCollection.GetAll", "value", null, cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName} + /// + /// + /// Operation Id + /// GuestConfigurationConnectedVMwarevSphereAssignments_Get + /// + /// + /// Default Api Version + /// 2024-04-05 + /// + /// + /// Resource + /// + /// + /// + /// + /// The guest configuration assignment name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string guestConfigurationAssignmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guestConfigurationAssignmentName, nameof(guestConfigurationAssignmentName)); + + using var scope = _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsClientDiagnostics.CreateScope("GuestConfigurationVMwarevSphereAssignmentCollection.Exists"); + scope.Start(); + try + { + var response = await _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, guestConfigurationAssignmentName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName} + /// + /// + /// Operation Id + /// GuestConfigurationConnectedVMwarevSphereAssignments_Get + /// + /// + /// Default Api Version + /// 2024-04-05 + /// + /// + /// Resource + /// + /// + /// + /// + /// The guest configuration assignment name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string guestConfigurationAssignmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guestConfigurationAssignmentName, nameof(guestConfigurationAssignmentName)); + + using var scope = _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsClientDiagnostics.CreateScope("GuestConfigurationVMwarevSphereAssignmentCollection.Exists"); + scope.Start(); + try + { + var response = _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, guestConfigurationAssignmentName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName} + /// + /// + /// Operation Id + /// GuestConfigurationConnectedVMwarevSphereAssignments_Get + /// + /// + /// Default Api Version + /// 2024-04-05 + /// + /// + /// Resource + /// + /// + /// + /// + /// The guest configuration assignment name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string guestConfigurationAssignmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guestConfigurationAssignmentName, nameof(guestConfigurationAssignmentName)); + + using var scope = _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsClientDiagnostics.CreateScope("GuestConfigurationVMwarevSphereAssignmentCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, guestConfigurationAssignmentName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new GuestConfigurationVMwarevSphereAssignmentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName} + /// + /// + /// Operation Id + /// GuestConfigurationConnectedVMwarevSphereAssignments_Get + /// + /// + /// Default Api Version + /// 2024-04-05 + /// + /// + /// Resource + /// + /// + /// + /// + /// The guest configuration assignment name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string guestConfigurationAssignmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(guestConfigurationAssignmentName, nameof(guestConfigurationAssignmentName)); + + using var scope = _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsClientDiagnostics.CreateScope("GuestConfigurationVMwarevSphereAssignmentCollection.GetIfExists"); + scope.Start(); + try + { + var response = _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, guestConfigurationAssignmentName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new GuestConfigurationVMwarevSphereAssignmentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVMwarevSphereAssignmentResource.Serialization.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVMwarevSphereAssignmentResource.Serialization.cs new file mode 100644 index 0000000000000..4c0592578e68c --- /dev/null +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVMwarevSphereAssignmentResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.GuestConfiguration +{ + public partial class GuestConfigurationVMwarevSphereAssignmentResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + GuestConfigurationAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + GuestConfigurationAssignmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVMwarevSphereAssignmentResource.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVMwarevSphereAssignmentResource.cs new file mode 100644 index 0000000000000..39c1bf151c0f0 --- /dev/null +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVMwarevSphereAssignmentResource.cs @@ -0,0 +1,489 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.GuestConfiguration.Models; + +namespace Azure.ResourceManager.GuestConfiguration +{ + /// + /// A Class representing a GuestConfigurationVMwarevSphereAssignment along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetGuestConfigurationVMwarevSphereAssignmentResource method. + /// Otherwise you can get one from its parent resource using the GetGuestConfigurationVMwarevSphereAssignment method. + /// + public partial class GuestConfigurationVMwarevSphereAssignmentResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The vmName. + /// The guestConfigurationAssignmentName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vmName, string guestConfigurationAssignmentName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsClientDiagnostics; + private readonly GuestConfigurationConnectedVMwarevSphereAssignmentsRestOperations _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsRestClient; + private readonly ClientDiagnostics _guestConfigurationConnectedVMwarevSphereAssignmentsReportsClientDiagnostics; + private readonly GuestConfigurationConnectedVMwarevSphereAssignmentsReportsRestOperations _guestConfigurationConnectedVMwarevSphereAssignmentsReportsRestClient; + private readonly GuestConfigurationAssignmentData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.GuestConfiguration/guestConfigurationAssignments"; + + /// Initializes a new instance of the class for mocking. + protected GuestConfigurationVMwarevSphereAssignmentResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal GuestConfigurationVMwarevSphereAssignmentResource(ArmClient client, GuestConfigurationAssignmentData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal GuestConfigurationVMwarevSphereAssignmentResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.GuestConfiguration", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsApiVersion); + _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsRestClient = new GuestConfigurationConnectedVMwarevSphereAssignmentsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsApiVersion); + _guestConfigurationConnectedVMwarevSphereAssignmentsReportsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.GuestConfiguration", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _guestConfigurationConnectedVMwarevSphereAssignmentsReportsRestClient = new GuestConfigurationConnectedVMwarevSphereAssignmentsReportsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual GuestConfigurationAssignmentData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get information about a guest configuration assignment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName} + /// + /// + /// Operation Id + /// GuestConfigurationConnectedVMwarevSphereAssignments_Get + /// + /// + /// Default Api Version + /// 2024-04-05 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsClientDiagnostics.CreateScope("GuestConfigurationVMwarevSphereAssignmentResource.Get"); + scope.Start(); + try + { + var response = await _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new GuestConfigurationVMwarevSphereAssignmentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get information about a guest configuration assignment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName} + /// + /// + /// Operation Id + /// GuestConfigurationConnectedVMwarevSphereAssignments_Get + /// + /// + /// Default Api Version + /// 2024-04-05 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsClientDiagnostics.CreateScope("GuestConfigurationVMwarevSphereAssignmentResource.Get"); + scope.Start(); + try + { + var response = _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new GuestConfigurationVMwarevSphereAssignmentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a guest configuration assignment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName} + /// + /// + /// Operation Id + /// GuestConfigurationConnectedVMwarevSphereAssignments_Delete + /// + /// + /// Default Api Version + /// 2024-04-05 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsClientDiagnostics.CreateScope("GuestConfigurationVMwarevSphereAssignmentResource.Delete"); + scope.Start(); + try + { + var response = await _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new GuestConfigurationArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a guest configuration assignment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName} + /// + /// + /// Operation Id + /// GuestConfigurationConnectedVMwarevSphereAssignments_Delete + /// + /// + /// Default Api Version + /// 2024-04-05 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsClientDiagnostics.CreateScope("GuestConfigurationVMwarevSphereAssignmentResource.Delete"); + scope.Start(); + try + { + var response = _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var uri = _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new GuestConfigurationArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates an association between a Connected VM Sphere machine and guest configuration + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName} + /// + /// + /// Operation Id + /// GuestConfigurationConnectedVMwarevSphereAssignments_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-04-05 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Parameters supplied to the create or update guest configuration assignment. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, GuestConfigurationAssignmentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsClientDiagnostics.CreateScope("GuestConfigurationVMwarevSphereAssignmentResource.Update"); + scope.Start(); + try + { + var response = await _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var uri = _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new GuestConfigurationArmOperation(Response.FromValue(new GuestConfigurationVMwarevSphereAssignmentResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates an association between a Connected VM Sphere machine and guest configuration + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName} + /// + /// + /// Operation Id + /// GuestConfigurationConnectedVMwarevSphereAssignments_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-04-05 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Parameters supplied to the create or update guest configuration assignment. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, GuestConfigurationAssignmentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsClientDiagnostics.CreateScope("GuestConfigurationVMwarevSphereAssignmentResource.Update"); + scope.Start(); + try + { + var response = _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var uri = _guestConfigurationVMwarevSphereAssignmentGuestConfigurationConnectedVMwarevSphereAssignmentsRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new GuestConfigurationArmOperation(Response.FromValue(new GuestConfigurationVMwarevSphereAssignmentResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List all reports for the guest configuration assignment, latest report first. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}/reports + /// + /// + /// Operation Id + /// GuestConfigurationConnectedVMwarevSphereAssignmentsReports_List + /// + /// + /// Default Api Version + /// 2024-04-05 + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetGuestConfigurationConnectedVMwarevSphereAssignmentsReportsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _guestConfigurationConnectedVMwarevSphereAssignmentsReportsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => GuestConfigurationAssignmentReport.DeserializeGuestConfigurationAssignmentReport(e), _guestConfigurationConnectedVMwarevSphereAssignmentsReportsClientDiagnostics, Pipeline, "GuestConfigurationVMwarevSphereAssignmentResource.GetGuestConfigurationConnectedVMwarevSphereAssignmentsReports", "value", null, cancellationToken); + } + + /// + /// List all reports for the guest configuration assignment, latest report first. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}/reports + /// + /// + /// Operation Id + /// GuestConfigurationConnectedVMwarevSphereAssignmentsReports_List + /// + /// + /// Default Api Version + /// 2024-04-05 + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetGuestConfigurationConnectedVMwarevSphereAssignmentsReports(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _guestConfigurationConnectedVMwarevSphereAssignmentsReportsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => GuestConfigurationAssignmentReport.DeserializeGuestConfigurationAssignmentReport(e), _guestConfigurationConnectedVMwarevSphereAssignmentsReportsClientDiagnostics, Pipeline, "GuestConfigurationVMwarevSphereAssignmentResource.GetGuestConfigurationConnectedVMwarevSphereAssignmentsReports", "value", null, cancellationToken); + } + + /// + /// Get a report for the guest configuration assignment, by reportId. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}/reports/{reportId} + /// + /// + /// Operation Id + /// GuestConfigurationConnectedVMwarevSphereAssignmentsReports_Get + /// + /// + /// Default Api Version + /// 2024-04-05 + /// + /// + /// + /// The GUID for the guest configuration assignment report. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetGuestConfigurationConnectedVMwarevSphereAssignmentsReportAsync(string reportId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(reportId, nameof(reportId)); + + using var scope = _guestConfigurationConnectedVMwarevSphereAssignmentsReportsClientDiagnostics.CreateScope("GuestConfigurationVMwarevSphereAssignmentResource.GetGuestConfigurationConnectedVMwarevSphereAssignmentsReport"); + scope.Start(); + try + { + var response = await _guestConfigurationConnectedVMwarevSphereAssignmentsReportsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, reportId, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a report for the guest configuration assignment, by reportId. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}/reports/{reportId} + /// + /// + /// Operation Id + /// GuestConfigurationConnectedVMwarevSphereAssignmentsReports_Get + /// + /// + /// Default Api Version + /// 2024-04-05 + /// + /// + /// + /// The GUID for the guest configuration assignment report. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response GetGuestConfigurationConnectedVMwarevSphereAssignmentsReport(string reportId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(reportId, nameof(reportId)); + + using var scope = _guestConfigurationConnectedVMwarevSphereAssignmentsReportsClientDiagnostics.CreateScope("GuestConfigurationVMwarevSphereAssignmentResource.GetGuestConfigurationConnectedVMwarevSphereAssignmentsReport"); + scope.Start(); + try + { + var response = _guestConfigurationConnectedVMwarevSphereAssignmentsReportsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, reportId, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVmAssignmentCollection.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVmAssignmentCollection.cs index 4a419683a7547..193ba21eb28c7 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVmAssignmentCollection.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVmAssignmentCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) ///
/// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpda /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string guest /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(Cancellat /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string guestConfigurationA /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response Exists(string guestConfigurationAssignmentName, Ca /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -445,7 +445,7 @@ public virtual async Task /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVmAssignmentResource.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVmAssignmentResource.cs index 3d12cf199a3dc..1aab20d23fa0f 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVmAssignmentResource.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVmAssignmentResource.cs @@ -107,7 +107,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -147,7 +147,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -187,7 +187,7 @@ public virtual Response Get(Cancellation /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -231,7 +231,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -275,7 +275,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -323,7 +323,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -371,7 +371,7 @@ public virtual ArmOperation Update(WaitU /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// @@ -396,7 +396,7 @@ public virtual AsyncPageable GetReportsAsync /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// @@ -421,7 +421,7 @@ public virtual Pageable GetReports(Cancellat /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// @@ -460,7 +460,7 @@ public virtual async Task> GetRepor /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVmssAssignmentCollection.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVmssAssignmentCollection.cs index 7bf2e9e7b367e..bed21598547f1 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVmssAssignmentCollection.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVmssAssignmentCollection.cs @@ -51,6 +51,108 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, "Microsoft.Compute/virtualMachineScaleSets"), nameof(id)); } + /// + /// Creates an association between a VMSS and guest configuration + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{name} + /// + /// + /// Operation Id + /// GuestConfigurationAssignmentsVMSS_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-04-05 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the guest configuration assignment. + /// Parameters supplied to the create or update guest configuration assignment. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string name, GuestConfigurationAssignmentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _guestConfigurationVmssAssignmentGuestConfigurationAssignmentsVmSSClientDiagnostics.CreateScope("GuestConfigurationVmssAssignmentCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _guestConfigurationVmssAssignmentGuestConfigurationAssignmentsVmSSRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken).ConfigureAwait(false); + var uri = _guestConfigurationVmssAssignmentGuestConfigurationAssignmentsVmSSRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new GuestConfigurationArmOperation(Response.FromValue(new GuestConfigurationVmssAssignmentResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates an association between a VMSS and guest configuration + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{name} + /// + /// + /// Operation Id + /// GuestConfigurationAssignmentsVMSS_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-04-05 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of the guest configuration assignment. + /// Parameters supplied to the create or update guest configuration assignment. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string name, GuestConfigurationAssignmentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _guestConfigurationVmssAssignmentGuestConfigurationAssignmentsVmSSClientDiagnostics.CreateScope("GuestConfigurationVmssAssignmentCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _guestConfigurationVmssAssignmentGuestConfigurationAssignmentsVmSSRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken); + var uri = _guestConfigurationVmssAssignmentGuestConfigurationAssignmentsVmSSRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new GuestConfigurationArmOperation(Response.FromValue(new GuestConfigurationVmssAssignmentResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Get information about a guest configuration assignment for VMSS /// @@ -64,7 +166,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -109,7 +211,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -154,7 +256,7 @@ public virtual Response Get(string nam /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -183,7 +285,7 @@ public virtual AsyncPageable GetAllAsy /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -212,7 +314,7 @@ public virtual Pageable GetAll(Cancell /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -255,7 +357,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -298,7 +400,7 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -343,7 +445,7 @@ public virtual async Task /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVmssAssignmentResource.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVmssAssignmentResource.cs index 34d0be527e6f1..74d7d9ddf78cb 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVmssAssignmentResource.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVmssAssignmentResource.cs @@ -107,7 +107,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -147,7 +147,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -187,7 +187,7 @@ public virtual Response Get(Cancellati /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -231,7 +231,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// Resource @@ -262,6 +262,102 @@ public virtual ArmOperation Delete(Wai } } + /// + /// Creates an association between a VMSS and guest configuration + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{name} + /// + /// + /// Operation Id + /// GuestConfigurationAssignmentsVMSS_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-04-05 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Parameters supplied to the create or update guest configuration assignment. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, GuestConfigurationAssignmentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _guestConfigurationVmssAssignmentGuestConfigurationAssignmentsVmSSClientDiagnostics.CreateScope("GuestConfigurationVmssAssignmentResource.Update"); + scope.Start(); + try + { + var response = await _guestConfigurationVmssAssignmentGuestConfigurationAssignmentsVmSSRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var uri = _guestConfigurationVmssAssignmentGuestConfigurationAssignmentsVmSSRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new GuestConfigurationArmOperation(Response.FromValue(new GuestConfigurationVmssAssignmentResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates an association between a VMSS and guest configuration + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{name} + /// + /// + /// Operation Id + /// GuestConfigurationAssignmentsVMSS_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-04-05 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Parameters supplied to the create or update guest configuration assignment. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, GuestConfigurationAssignmentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _guestConfigurationVmssAssignmentGuestConfigurationAssignmentsVmSSClientDiagnostics.CreateScope("GuestConfigurationVmssAssignmentResource.Update"); + scope.Start(); + try + { + var response = _guestConfigurationVmssAssignmentGuestConfigurationAssignmentsVmSSRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var uri = _guestConfigurationVmssAssignmentGuestConfigurationAssignmentsVmSSRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new GuestConfigurationArmOperation(Response.FromValue(new GuestConfigurationVmssAssignmentResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// List all reports for the VMSS guest configuration assignment, latest report first. /// @@ -275,7 +371,7 @@ public virtual ArmOperation Delete(Wai /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// @@ -300,7 +396,7 @@ public virtual AsyncPageable GetReportsAsync /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// @@ -325,7 +421,7 @@ public virtual Pageable GetReports(Cancellat /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// @@ -364,7 +460,7 @@ public virtual async Task> GetRepor /// /// /// Default Api Version - /// 2022-01-25 + /// 2024-04-05 /// /// /// diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Internal/BicepSerializationHelpers.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Internal/BicepSerializationHelpers.cs new file mode 100644 index 0000000000000..d9ad6c3d4b4e6 --- /dev/null +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Internal/BicepSerializationHelpers.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text; + +namespace Azure.ResourceManager.GuestConfiguration +{ + internal static class BicepSerializationHelpers + { + public static void AppendChildObject(StringBuilder stringBuilder, object childObject, ModelReaderWriterOptions options, int spaces, bool indentFirstLine, string formattedPropertyName) + { + string indent = new string(' ', spaces); + int emptyObjectLength = 2 + spaces + Environment.NewLine.Length + Environment.NewLine.Length; + int length = stringBuilder.Length; + bool inMultilineString = false; + + BinaryData data = ModelReaderWriter.Write(childObject, options); + string[] lines = data.ToString().Split(Environment.NewLine.ToCharArray(), StringSplitOptions.RemoveEmptyEntries); + for (int i = 0; i < lines.Length; i++) + { + string line = lines[i]; + if (inMultilineString) + { + if (line.Contains("'''")) + { + inMultilineString = false; + } + stringBuilder.AppendLine(line); + continue; + } + if (line.Contains("'''")) + { + inMultilineString = true; + stringBuilder.AppendLine($"{indent}{line}"); + continue; + } + if (i == 0 && !indentFirstLine) + { + stringBuilder.AppendLine($"{line}"); + } + else + { + stringBuilder.AppendLine($"{indent}{line}"); + } + } + if (stringBuilder.Length == length + emptyObjectLength) + { + stringBuilder.Length = stringBuilder.Length - emptyObjectLength - formattedPropertyName.Length; + } + } + } +} diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Internal/WirePathAttribute.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Internal/WirePathAttribute.cs new file mode 100644 index 0000000000000..8ff9b7738996e --- /dev/null +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Internal/WirePathAttribute.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.GuestConfiguration +{ + [AttributeUsage(AttributeTargets.Property)] + internal class WirePathAttribute : Attribute + { + private string _wirePath; + + public WirePathAttribute(string wirePath) + { + _wirePath = wirePath; + } + + public override string ToString() + { + return _wirePath; + } + } +} diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/AssignmentReportResourceComplianceReason.Serialization.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/AssignmentReportResourceComplianceReason.Serialization.cs index 76bccbefe17cd..73befb8cb8a9e 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/AssignmentReportResourceComplianceReason.Serialization.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/AssignmentReportResourceComplianceReason.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -99,6 +100,67 @@ internal static AssignmentReportResourceComplianceReason DeserializeAssignmentRe return new AssignmentReportResourceComplianceReason(phrase, code, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Phrase), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" phrase: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Phrase)) + { + builder.Append(" phrase: "); + if (Phrase.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Phrase}'''"); + } + else + { + builder.AppendLine($"'{Phrase}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Code), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" code: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Code)) + { + builder.Append(" code: "); + if (Code.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Code}'''"); + } + else + { + builder.AppendLine($"'{Code}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -107,6 +169,8 @@ BinaryData IPersistableModel.Write(Mod { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(AssignmentReportResourceComplianceReason)} does not support writing '{options.Format}' format."); } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/AssignmentReportResourceComplianceReason.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/AssignmentReportResourceComplianceReason.cs index bd359d99313ce..5fbf64e085894 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/AssignmentReportResourceComplianceReason.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/AssignmentReportResourceComplianceReason.cs @@ -62,8 +62,10 @@ internal AssignmentReportResourceComplianceReason(string phrase, string code, ID } /// Reason for the compliance of the guest configuration assignment resource. + [WirePath("phrase")] public string Phrase { get; } /// Code for the compliance of the guest configuration assignment resource. + [WirePath("code")] public string Code { get; } } } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/AssignmentReportResourceInfo.Serialization.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/AssignmentReportResourceInfo.Serialization.cs index 28b2bd4748ba1..4df2f1e191d50 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/AssignmentReportResourceInfo.Serialization.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/AssignmentReportResourceInfo.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -150,6 +152,97 @@ internal static AssignmentReportResourceInfo DeserializeAssignmentReportResource return new AssignmentReportResourceInfo(complianceStatus, resourceId, reasons ?? new ChangeTrackingList(), properties, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ComplianceStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" complianceStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ComplianceStatus)) + { + builder.Append(" complianceStatus: "); + builder.AppendLine($"'{ComplianceStatus.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AssignmentResourceSettingName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AssignmentResourceSettingName)) + { + builder.Append(" resourceId: "); + if (AssignmentResourceSettingName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AssignmentResourceSettingName}'''"); + } + else + { + builder.AppendLine($"'{AssignmentResourceSettingName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Reasons), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" reasons: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Reasons)) + { + if (Reasons.Any()) + { + builder.Append(" reasons: "); + builder.AppendLine("["); + foreach (var item in Reasons) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " reasons: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Properties), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" properties: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Properties)) + { + builder.Append(" properties: "); + builder.AppendLine($"'{Properties.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -158,6 +251,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrit { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(AssignmentReportResourceInfo)} does not support writing '{options.Format}' format."); } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/AssignmentReportResourceInfo.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/AssignmentReportResourceInfo.cs index 86421f93f7c16..f82515acc53e7 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/AssignmentReportResourceInfo.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/AssignmentReportResourceInfo.cs @@ -67,10 +67,13 @@ internal AssignmentReportResourceInfo(AssignedGuestConfigurationMachineComplianc } /// A value indicating compliance status of the machine for the assigned guest configuration. + [WirePath("complianceStatus")] public AssignedGuestConfigurationMachineComplianceStatus? ComplianceStatus { get; } /// Name of the guest configuration assignment resource setting. + [WirePath("resourceId")] public string AssignmentResourceSettingName { get; } /// Compliance reason and reason code for a resource. + [WirePath("reasons")] public IList Reasons { get; } /// /// Properties of a guest configuration assignment resource. @@ -102,6 +105,7 @@ internal AssignmentReportResourceInfo(AssignedGuestConfigurationMachineComplianc /// /// /// + [WirePath("properties")] public BinaryData Properties { get; } } } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentInfo.Serialization.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentInfo.Serialization.cs index a0c707de21500..eb2f2fe8cc827 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentInfo.Serialization.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentInfo.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -103,6 +104,59 @@ internal static GuestConfigurationAssignmentInfo DeserializeGuestConfigurationAs return new GuestConfigurationAssignmentInfo(name, configuration, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Configuration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" configuration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Configuration)) + { + builder.Append(" configuration: "); + BicepSerializationHelpers.AppendChildObject(builder, Configuration, options, 2, false, " configuration: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -111,6 +165,8 @@ BinaryData IPersistableModel.Write(ModelReader { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(GuestConfigurationAssignmentInfo)} does not support writing '{options.Format}' format."); } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentInfo.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentInfo.cs index 26f9d3188e768..6ecec722faa7d 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentInfo.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentInfo.cs @@ -62,8 +62,10 @@ internal GuestConfigurationAssignmentInfo(string name, GuestConfigurationInfo co } /// Name of the guest configuration assignment. + [WirePath("name")] public string Name { get; } /// Information about the configuration. + [WirePath("configuration")] public GuestConfigurationInfo Configuration { get; set; } } } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentList.Serialization.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentList.Serialization.cs index 7663045a1a78d..a652d6461e9b8 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentList.Serialization.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentList.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -102,6 +104,44 @@ internal static GuestConfigurationAssignmentList DeserializeGuestConfigurationAs return new GuestConfigurationAssignmentList(value ?? new ChangeTrackingList(), serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -110,6 +150,8 @@ BinaryData IPersistableModel.Write(ModelReader { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(GuestConfigurationAssignmentList)} does not support writing '{options.Format}' format."); } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentProperties.Serialization.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentProperties.Serialization.cs index 4f71be3d4141a..0c25f6b3c454d 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentProperties.Serialization.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentProperties.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -340,6 +342,250 @@ internal static GuestConfigurationAssignmentProperties DeserializeGuestConfigura serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TargetResourceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" targetResourceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TargetResourceId)) + { + builder.Append(" targetResourceId: "); + if (TargetResourceId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TargetResourceId}'''"); + } + else + { + builder.AppendLine($"'{TargetResourceId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GuestConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" guestConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(GuestConfiguration)) + { + builder.Append(" guestConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, GuestConfiguration, options, 2, false, " guestConfiguration: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ComplianceStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" complianceStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ComplianceStatus)) + { + builder.Append(" complianceStatus: "); + builder.AppendLine($"'{ComplianceStatus.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastComplianceStatusCheckedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastComplianceStatusChecked: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LastComplianceStatusCheckedOn)) + { + builder.Append(" lastComplianceStatusChecked: "); + var formattedDateTimeString = TypeFormatters.ToString(LastComplianceStatusCheckedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LatestReportId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" latestReportId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LatestReportId)) + { + builder.Append(" latestReportId: "); + builder.AppendLine($"'{LatestReportId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ParameterHash), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" parameterHash: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ParameterHash)) + { + builder.Append(" parameterHash: "); + if (ParameterHash.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ParameterHash}'''"); + } + else + { + builder.AppendLine($"'{ParameterHash}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LatestAssignmentReport), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" latestAssignmentReport: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LatestAssignmentReport)) + { + builder.Append(" latestAssignmentReport: "); + BicepSerializationHelpers.AppendChildObject(builder, LatestAssignmentReport, options, 2, false, " latestAssignmentReport: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Context), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" context: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Context)) + { + builder.Append(" context: "); + if (Context.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Context}'''"); + } + else + { + builder.AppendLine($"'{Context}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AssignmentHash), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" assignmentHash: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AssignmentHash)) + { + builder.Append(" assignmentHash: "); + if (AssignmentHash.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AssignmentHash}'''"); + } + else + { + builder.AppendLine($"'{AssignmentHash}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + builder.AppendLine($"'{ProvisioningState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceType)) + { + builder.Append(" resourceType: "); + if (ResourceType.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ResourceType}'''"); + } + else + { + builder.AppendLine($"'{ResourceType}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VmssVmList), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" vmssVMList: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(VmssVmList)) + { + if (VmssVmList.Any()) + { + builder.Append(" vmssVMList: "); + builder.AppendLine("["); + foreach (var item in VmssVmList) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " vmssVMList: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -348,6 +594,8 @@ BinaryData IPersistableModel.Write(Model { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(GuestConfigurationAssignmentProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentProperties.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentProperties.cs index 0c8272941a938..c97ea36a43083 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentProperties.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentProperties.cs @@ -84,28 +84,40 @@ internal GuestConfigurationAssignmentProperties(string targetResourceId, GuestCo } /// VM resource Id. + [WirePath("targetResourceId")] public string TargetResourceId { get; } /// The guest configuration to assign. + [WirePath("guestConfiguration")] public GuestConfigurationNavigation GuestConfiguration { get; set; } /// A value indicating compliance status of the machine for the assigned guest configuration. + [WirePath("complianceStatus")] public AssignedGuestConfigurationMachineComplianceStatus? ComplianceStatus { get; } /// Date and time when last compliance status was checked. + [WirePath("lastComplianceStatusChecked")] public DateTimeOffset? LastComplianceStatusCheckedOn { get; } /// Id of the latest report for the guest configuration assignment. + [WirePath("latestReportId")] public ResourceIdentifier LatestReportId { get; } /// parameter hash for the guest configuration assignment. + [WirePath("parameterHash")] public string ParameterHash { get; } /// Last reported guest configuration assignment report. + [WirePath("latestAssignmentReport")] public GuestConfigurationAssignmentReportInfo LatestAssignmentReport { get; set; } /// The source which initiated the guest configuration assignment. Ex: Azure Policy. + [WirePath("context")] public string Context { get; set; } /// Combined hash of the configuration package and parameters. + [WirePath("assignmentHash")] public string AssignmentHash { get; } /// The provisioning state, which only appears in the response. + [WirePath("provisioningState")] public GuestConfigurationProvisioningState? ProvisioningState { get; } /// Type of the resource - VMSS / VM. + [WirePath("resourceType")] public string ResourceType { get; } /// The list of VM Compliance data for VMSS. + [WirePath("vmssVMList")] public IList VmssVmList { get; set; } } } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReport.Serialization.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReport.Serialization.cs index da2e6c00cb37c..2a9bd7a8a2084 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReport.Serialization.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReport.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -118,6 +119,74 @@ internal static GuestConfigurationAssignmentReport DeserializeGuestConfiguration return new GuestConfigurationAssignmentReport(id, name, properties, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Properties), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" properties: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Properties)) + { + builder.Append(" properties: "); + BicepSerializationHelpers.AppendChildObject(builder, Properties, options, 2, false, " properties: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -126,6 +195,8 @@ BinaryData IPersistableModel.Write(ModelRead { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(GuestConfigurationAssignmentReport)} does not support writing '{options.Format}' format."); } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReport.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReport.cs index 82cc6a5e3ca08..26f2dab5dc9e4 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReport.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReport.cs @@ -65,10 +65,13 @@ internal GuestConfigurationAssignmentReport(ResourceIdentifier id, string name, } /// ARM resource id of the report for the guest configuration assignment. + [WirePath("id")] public ResourceIdentifier Id { get; } /// GUID that identifies the guest configuration assignment report under a subscription, resource group. + [WirePath("name")] public string Name { get; } /// Properties of the guest configuration report. + [WirePath("properties")] public GuestConfigurationAssignmentReportProperties Properties { get; } } } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReportDetails.Serialization.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReportDetails.Serialization.cs index ac88a6146fc6c..adc6f5d5cf5ce 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReportDetails.Serialization.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReportDetails.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -184,6 +186,121 @@ internal static GuestConfigurationAssignmentReportDetails DeserializeGuestConfig serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ComplianceStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" complianceStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ComplianceStatus)) + { + builder.Append(" complianceStatus: "); + builder.AppendLine($"'{ComplianceStatus.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StartOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" startTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StartOn)) + { + builder.Append(" startTime: "); + var formattedDateTimeString = TypeFormatters.ToString(StartOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EndOn)) + { + builder.Append(" endTime: "); + var formattedDateTimeString = TypeFormatters.ToString(EndOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(JobId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" jobId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(JobId)) + { + builder.Append(" jobId: "); + builder.AppendLine($"'{JobId.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OperationType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" operationType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OperationType)) + { + builder.Append(" operationType: "); + builder.AppendLine($"'{OperationType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Resources), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resources: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Resources)) + { + if (Resources.Any()) + { + builder.Append(" resources: "); + builder.AppendLine("["); + foreach (var item in Resources) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " resources: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -192,6 +309,8 @@ BinaryData IPersistableModel.Write(Mo { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(GuestConfigurationAssignmentReportDetails)} does not support writing '{options.Format}' format."); } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReportDetails.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReportDetails.cs index 0a9ca7e20bc4a..395570a406c6b 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReportDetails.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReportDetails.cs @@ -71,16 +71,22 @@ internal GuestConfigurationAssignmentReportDetails(AssignedGuestConfigurationMac } /// A value indicating compliance status of the machine for the assigned guest configuration. + [WirePath("complianceStatus")] public AssignedGuestConfigurationMachineComplianceStatus? ComplianceStatus { get; } /// Start date and time of the guest configuration assignment compliance status check. + [WirePath("startTime")] public DateTimeOffset? StartOn { get; } /// End date and time of the guest configuration assignment compliance status check. + [WirePath("endTime")] public DateTimeOffset? EndOn { get; } /// GUID of the report. + [WirePath("jobId")] public Guid? JobId { get; } /// Type of report, Consistency or Initial. + [WirePath("operationType")] public GuestConfigurationAssignmentReportType? OperationType { get; } /// The list of resources for which guest configuration assignment compliance is checked. + [WirePath("resources")] public IReadOnlyList Resources { get; } } } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReportInfo.Serialization.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReportInfo.Serialization.cs index 09a4202ca9186..b7411e3cc7306 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReportInfo.Serialization.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReportInfo.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -232,6 +234,166 @@ internal static GuestConfigurationAssignmentReportInfo DeserializeGuestConfigura serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ReportId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" reportId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ReportId)) + { + builder.Append(" reportId: "); + builder.AppendLine($"'{ReportId.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Assignment), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" assignment: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Assignment)) + { + builder.Append(" assignment: "); + BicepSerializationHelpers.AppendChildObject(builder, Assignment, options, 2, false, " assignment: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Vm), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" vm: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Vm)) + { + builder.Append(" vm: "); + BicepSerializationHelpers.AppendChildObject(builder, Vm, options, 2, false, " vm: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StartOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" startTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StartOn)) + { + builder.Append(" startTime: "); + var formattedDateTimeString = TypeFormatters.ToString(StartOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EndOn)) + { + builder.Append(" endTime: "); + var formattedDateTimeString = TypeFormatters.ToString(EndOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ComplianceStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" complianceStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ComplianceStatus)) + { + builder.Append(" complianceStatus: "); + builder.AppendLine($"'{ComplianceStatus.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OperationType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" operationType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OperationType)) + { + builder.Append(" operationType: "); + builder.AppendLine($"'{OperationType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Resources), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resources: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Resources)) + { + if (Resources.Any()) + { + builder.Append(" resources: "); + builder.AppendLine("["); + foreach (var item in Resources) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " resources: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -240,6 +402,8 @@ BinaryData IPersistableModel.Write(Model { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(GuestConfigurationAssignmentReportInfo)} does not support writing '{options.Format}' format."); } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReportInfo.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReportInfo.cs index 1cfbdedd8cffe..10059f20f1578 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReportInfo.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReportInfo.cs @@ -78,22 +78,31 @@ internal GuestConfigurationAssignmentReportInfo(ResourceIdentifier id, Guid? rep } /// ARM resource id of the report for the guest configuration assignment. + [WirePath("id")] public ResourceIdentifier Id { get; } /// GUID that identifies the guest configuration assignment report under a subscription, resource group. + [WirePath("reportId")] public Guid? ReportId { get; } /// Configuration details of the guest configuration assignment. + [WirePath("assignment")] public GuestConfigurationAssignmentInfo Assignment { get; set; } /// Information about the VM. + [WirePath("vm")] public GuestConfigurationVmInfo Vm { get; set; } /// Start date and time of the guest configuration assignment compliance status check. + [WirePath("startTime")] public DateTimeOffset? StartOn { get; } /// End date and time of the guest configuration assignment compliance status check. + [WirePath("endTime")] public DateTimeOffset? EndOn { get; } /// A value indicating compliance status of the machine for the assigned guest configuration. + [WirePath("complianceStatus")] public AssignedGuestConfigurationMachineComplianceStatus? ComplianceStatus { get; } /// Type of report, Consistency or Initial. + [WirePath("operationType")] public GuestConfigurationAssignmentReportType? OperationType { get; } /// The list of resources for which guest configuration assignment compliance is checked. + [WirePath("resources")] public IList Resources { get; } } } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReportList.Serialization.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReportList.Serialization.cs index 4ce60f36b1fc5..dc2266108a663 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReportList.Serialization.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReportList.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -102,6 +104,44 @@ internal static GuestConfigurationAssignmentReportList DeserializeGuestConfigura return new GuestConfigurationAssignmentReportList(value ?? new ChangeTrackingList(), serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -110,6 +150,8 @@ BinaryData IPersistableModel.Write(Model { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(GuestConfigurationAssignmentReportList)} does not support writing '{options.Format}' format."); } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReportList.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReportList.cs index 07034cdaeada4..bfd93a7d39f68 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReportList.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReportList.cs @@ -61,6 +61,7 @@ internal GuestConfigurationAssignmentReportList(IReadOnlyList List of reports for the guest configuration. Report contains information such as compliance status, reason and more. + [WirePath("value")] public IReadOnlyList Value { get; } } } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReportProperties.Serialization.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReportProperties.Serialization.cs index 2d81de48bd084..62e8192bf2e74 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReportProperties.Serialization.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReportProperties.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -210,6 +211,151 @@ internal static GuestConfigurationAssignmentReportProperties DeserializeGuestCon serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ComplianceStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" complianceStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ComplianceStatus)) + { + builder.Append(" complianceStatus: "); + builder.AppendLine($"'{ComplianceStatus.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ReportId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" reportId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ReportId)) + { + builder.Append(" reportId: "); + builder.AppendLine($"'{ReportId.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Assignment), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" assignment: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Assignment)) + { + builder.Append(" assignment: "); + BicepSerializationHelpers.AppendChildObject(builder, Assignment, options, 2, false, " assignment: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Vm), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" vm: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Vm)) + { + builder.Append(" vm: "); + BicepSerializationHelpers.AppendChildObject(builder, Vm, options, 2, false, " vm: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StartOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" startTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StartOn)) + { + builder.Append(" startTime: "); + var formattedDateTimeString = TypeFormatters.ToString(StartOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EndOn)) + { + builder.Append(" endTime: "); + var formattedDateTimeString = TypeFormatters.ToString(EndOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Details), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" details: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Details)) + { + builder.Append(" details: "); + BicepSerializationHelpers.AppendChildObject(builder, Details, options, 2, false, " details: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VmssResourceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" vmssResourceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(VmssResourceId)) + { + builder.Append(" vmssResourceId: "); + if (VmssResourceId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{VmssResourceId}'''"); + } + else + { + builder.AppendLine($"'{VmssResourceId}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -218,6 +364,8 @@ BinaryData IPersistableModel.Write { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(GuestConfigurationAssignmentReportProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReportProperties.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReportProperties.cs index 0504781d5ce04..5d20fa2c4108a 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReportProperties.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationAssignmentReportProperties.cs @@ -74,20 +74,28 @@ internal GuestConfigurationAssignmentReportProperties(AssignedGuestConfiguration } /// A value indicating compliance status of the machine for the assigned guest configuration. + [WirePath("complianceStatus")] public AssignedGuestConfigurationMachineComplianceStatus? ComplianceStatus { get; } /// GUID that identifies the guest configuration assignment report under a subscription, resource group. + [WirePath("reportId")] public Guid? ReportId { get; } /// Configuration details of the guest configuration assignment. + [WirePath("assignment")] public GuestConfigurationAssignmentInfo Assignment { get; } /// Information about the VM. + [WirePath("vm")] public GuestConfigurationVmInfo Vm { get; } /// Start date and time of the guest configuration assignment compliance status check. + [WirePath("startTime")] public DateTimeOffset? StartOn { get; } /// End date and time of the guest configuration assignment compliance status check. + [WirePath("endTime")] public DateTimeOffset? EndOn { get; } /// Details of the assignment report. + [WirePath("details")] public GuestConfigurationAssignmentReportDetails Details { get; } /// Azure resource Id of the VMSS. + [WirePath("vmssResourceId")] public string VmssResourceId { get; } } } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationInfo.Serialization.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationInfo.Serialization.cs index 5a4d2db1438b0..8589a93eb41ef 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationInfo.Serialization.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationInfo.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -99,6 +100,67 @@ internal static GuestConfigurationInfo DeserializeGuestConfigurationInfo(JsonEle return new GuestConfigurationInfo(name, version, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Version), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" version: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Version)) + { + builder.Append(" version: "); + if (Version.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Version}'''"); + } + else + { + builder.AppendLine($"'{Version}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -107,6 +169,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(GuestConfigurationInfo)} does not support writing '{options.Format}' format."); } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationInfo.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationInfo.cs index 1aaa1e882e362..de2508e37be33 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationInfo.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationInfo.cs @@ -62,8 +62,10 @@ internal GuestConfigurationInfo(string name, string version, IDictionary Name of the configuration. + [WirePath("name")] public string Name { get; } /// Version of the configuration. + [WirePath("version")] public string Version { get; } } } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationNavigation.Serialization.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationNavigation.Serialization.cs index 0798f8ce28f4d..a54afc96521ec 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationNavigation.Serialization.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationNavigation.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -58,6 +60,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WritePropertyName("contentHash"u8); writer.WriteStringValue(ContentHash); } + if (Optional.IsDefined(ContentManagedIdentity)) + { + writer.WritePropertyName("contentManagedIdentity"u8); + writer.WriteStringValue(ContentManagedIdentity); + } if (Optional.IsDefined(AssignmentType)) { if (AssignmentType != null) @@ -169,6 +176,7 @@ internal static GuestConfigurationNavigation DeserializeGuestConfigurationNaviga string version = default; Uri contentUri = default; string contentHash = default; + string contentManagedIdentity = default; GuestConfigurationAssignmentType? assignmentType = default; string assignmentSource = default; string contentType = default; @@ -213,6 +221,11 @@ internal static GuestConfigurationNavigation DeserializeGuestConfigurationNaviga contentHash = property.Value.GetString(); continue; } + if (property.NameEquals("contentManagedIdentity"u8)) + { + contentManagedIdentity = property.Value.GetString(); + continue; + } if (property.NameEquals("assignmentType"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -293,6 +306,7 @@ internal static GuestConfigurationNavigation DeserializeGuestConfigurationNaviga version, contentUri, contentHash, + contentManagedIdentity, assignmentType, assignmentSource, contentType, @@ -302,6 +316,265 @@ internal static GuestConfigurationNavigation DeserializeGuestConfigurationNaviga serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Kind), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" kind: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Kind)) + { + builder.Append(" kind: "); + builder.AppendLine($"'{Kind.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Version), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" version: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Version)) + { + builder.Append(" version: "); + if (Version.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Version}'''"); + } + else + { + builder.AppendLine($"'{Version}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ContentUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" contentUri: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ContentUri)) + { + builder.Append(" contentUri: "); + builder.AppendLine($"'{ContentUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ContentHash), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" contentHash: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ContentHash)) + { + builder.Append(" contentHash: "); + if (ContentHash.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ContentHash}'''"); + } + else + { + builder.AppendLine($"'{ContentHash}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ContentManagedIdentity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" contentManagedIdentity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ContentManagedIdentity)) + { + builder.Append(" contentManagedIdentity: "); + if (ContentManagedIdentity.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ContentManagedIdentity}'''"); + } + else + { + builder.AppendLine($"'{ContentManagedIdentity}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AssignmentType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" assignmentType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AssignmentType)) + { + builder.Append(" assignmentType: "); + builder.AppendLine($"'{AssignmentType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AssignmentSource), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" assignmentSource: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AssignmentSource)) + { + builder.Append(" assignmentSource: "); + if (AssignmentSource.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AssignmentSource}'''"); + } + else + { + builder.AppendLine($"'{AssignmentSource}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ContentType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" contentType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ContentType)) + { + builder.Append(" contentType: "); + if (ContentType.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ContentType}'''"); + } + else + { + builder.AppendLine($"'{ContentType}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ConfigurationParameters), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" configurationParameter: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ConfigurationParameters)) + { + if (ConfigurationParameters.Any()) + { + builder.Append(" configurationParameter: "); + builder.AppendLine("["); + foreach (var item in ConfigurationParameters) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " configurationParameter: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ConfigurationProtectedParameters), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" configurationProtectedParameter: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ConfigurationProtectedParameters)) + { + if (ConfigurationProtectedParameters.Any()) + { + builder.Append(" configurationProtectedParameter: "); + builder.AppendLine("["); + foreach (var item in ConfigurationProtectedParameters) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " configurationProtectedParameter: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ConfigurationSetting), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" configurationSetting: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ConfigurationSetting)) + { + builder.Append(" configurationSetting: "); + BicepSerializationHelpers.AppendChildObject(builder, ConfigurationSetting, options, 2, false, " configurationSetting: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -310,6 +583,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrit { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(GuestConfigurationNavigation)} does not support writing '{options.Format}' format."); } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationNavigation.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationNavigation.cs index a12e41b991e50..faa6d04ef5391 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationNavigation.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationNavigation.cs @@ -58,6 +58,7 @@ public GuestConfigurationNavigation() /// Version of the guest configuration. /// Uri of the storage where guest configuration package is uploaded. /// Combined hash of the guest configuration package and configuration parameters. + /// Managed identity with storage access of the guest configuration package and configuration parameters. /// Specifies the assignment type and execution of the configuration. Possible values are Audit, DeployAndAutoCorrect, ApplyAndAutoCorrect and ApplyAndMonitor. /// Specifies the origin of the configuration. /// Specifies the content type of the configuration. Possible values could be Builtin or Custom. @@ -65,13 +66,14 @@ public GuestConfigurationNavigation() /// The protected configuration parameters for the guest configuration. /// The configuration setting for the guest configuration. /// Keeps track of any properties unknown to the library. - internal GuestConfigurationNavigation(GuestConfigurationKind? kind, string name, string version, Uri contentUri, string contentHash, GuestConfigurationAssignmentType? assignmentType, string assignmentSource, string contentType, IList configurationParameters, IList configurationProtectedParameters, LcmConfigurationSetting configurationSetting, IDictionary serializedAdditionalRawData) + internal GuestConfigurationNavigation(GuestConfigurationKind? kind, string name, string version, Uri contentUri, string contentHash, string contentManagedIdentity, GuestConfigurationAssignmentType? assignmentType, string assignmentSource, string contentType, IList configurationParameters, IList configurationProtectedParameters, LcmConfigurationSetting configurationSetting, IDictionary serializedAdditionalRawData) { Kind = kind; Name = name; Version = version; ContentUri = contentUri; ContentHash = contentHash; + ContentManagedIdentity = contentManagedIdentity; AssignmentType = assignmentType; AssignmentSource = assignmentSource; ContentType = contentType; @@ -82,26 +84,40 @@ internal GuestConfigurationNavigation(GuestConfigurationKind? kind, string name, } /// Kind of the guest configuration. For example:DSC. + [WirePath("kind")] public GuestConfigurationKind? Kind { get; set; } /// Name of the guest configuration. + [WirePath("name")] public string Name { get; set; } /// Version of the guest configuration. + [WirePath("version")] public string Version { get; set; } /// Uri of the storage where guest configuration package is uploaded. + [WirePath("contentUri")] public Uri ContentUri { get; set; } /// Combined hash of the guest configuration package and configuration parameters. + [WirePath("contentHash")] public string ContentHash { get; set; } + /// Managed identity with storage access of the guest configuration package and configuration parameters. + [WirePath("contentManagedIdentity")] + public string ContentManagedIdentity { get; set; } /// Specifies the assignment type and execution of the configuration. Possible values are Audit, DeployAndAutoCorrect, ApplyAndAutoCorrect and ApplyAndMonitor. + [WirePath("assignmentType")] public GuestConfigurationAssignmentType? AssignmentType { get; set; } /// Specifies the origin of the configuration. + [WirePath("assignmentSource")] public string AssignmentSource { get; } /// Specifies the content type of the configuration. Possible values could be Builtin or Custom. + [WirePath("contentType")] public string ContentType { get; } /// The configuration parameters for the guest configuration. + [WirePath("configurationParameter")] public IList ConfigurationParameters { get; } /// The protected configuration parameters for the guest configuration. + [WirePath("configurationProtectedParameter")] public IList ConfigurationProtectedParameters { get; } /// The configuration setting for the guest configuration. + [WirePath("configurationSetting")] public LcmConfigurationSetting ConfigurationSetting { get; } } } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationParameter.Serialization.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationParameter.Serialization.cs index 033cb40ae98b8..47b8b5ea96603 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationParameter.Serialization.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationParameter.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -99,6 +100,67 @@ internal static GuestConfigurationParameter DeserializeGuestConfigurationParamet return new GuestConfigurationParameter(name, value, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + if (Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Value}'''"); + } + else + { + builder.AppendLine($"'{Value}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -107,6 +169,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrite { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(GuestConfigurationParameter)} does not support writing '{options.Format}' format."); } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationParameter.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationParameter.cs index 73d169c1b6d3b..1316414db2f2f 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationParameter.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationParameter.cs @@ -62,8 +62,10 @@ internal GuestConfigurationParameter(string name, string value, IDictionary Name of the configuration parameter. + [WirePath("name")] public string Name { get; set; } /// Value of the configuration parameter. + [WirePath("value")] public string Value { get; set; } } } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationResourceData.Serialization.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationResourceData.Serialization.cs index 7a11088db8912..ba650f9577a2a 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationResourceData.Serialization.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationResourceData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -155,6 +156,89 @@ internal static GuestConfigurationResourceData DeserializeGuestConfigurationReso serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" location: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Location)) + { + builder.Append(" location: "); + builder.AppendLine($"'{Location.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + BicepSerializationHelpers.AppendChildObject(builder, SystemData, options, 2, false, " systemData: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -163,6 +247,8 @@ BinaryData IPersistableModel.Write(ModelReaderWr { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(GuestConfigurationResourceData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationResourceData.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationResourceData.cs index 5878af21edf51..4e9e9fb2a6f19 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationResourceData.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationResourceData.cs @@ -70,14 +70,19 @@ internal GuestConfigurationResourceData(ResourceIdentifier id, string name, Azur } /// ARM resource id of the guest configuration assignment. + [WirePath("id")] public ResourceIdentifier Id { get; } /// Name of the guest configuration assignment. + [WirePath("name")] public string Name { get; set; } /// Region where the VM is located. + [WirePath("location")] public AzureLocation? Location { get; set; } /// The type of the resource. + [WirePath("type")] public ResourceType? ResourceType { get; } /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + [WirePath("systemData")] public SystemData SystemData { get; } } } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationVmInfo.Serialization.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationVmInfo.Serialization.cs index 61e017e83a931..b1c7cbde15aa4 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationVmInfo.Serialization.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationVmInfo.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -107,6 +108,51 @@ internal static GuestConfigurationVmInfo DeserializeGuestConfigurationVmInfo(Jso return new GuestConfigurationVmInfo(id, uuid, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Uuid), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" uuid: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Uuid)) + { + builder.Append(" uuid: "); + builder.AppendLine($"'{Uuid.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -115,6 +161,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(GuestConfigurationVmInfo)} does not support writing '{options.Format}' format."); } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationVmInfo.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationVmInfo.cs index fd76783272001..622dd91cceed7 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationVmInfo.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationVmInfo.cs @@ -63,8 +63,10 @@ internal GuestConfigurationVmInfo(ResourceIdentifier id, Guid? uuid, IDictionary } /// Azure resource Id of the VM. + [WirePath("id")] public ResourceIdentifier Id { get; } /// UUID(Universally Unique Identifier) of the VM. + [WirePath("uuid")] public Guid? Uuid { get; } } } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationVmssVmInfo.Serialization.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationVmssVmInfo.Serialization.cs index 42ec04c5b5f25..671e300527270 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationVmssVmInfo.Serialization.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationVmssVmInfo.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -174,6 +175,97 @@ internal static GuestConfigurationVmssVmInfo DeserializeGuestConfigurationVmssVm serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VmId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" vmId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(VmId)) + { + builder.Append(" vmId: "); + builder.AppendLine($"'{VmId.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VmResourceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" vmResourceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(VmResourceId)) + { + builder.Append(" vmResourceId: "); + builder.AppendLine($"'{VmResourceId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ComplianceStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" complianceStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ComplianceStatus)) + { + builder.Append(" complianceStatus: "); + builder.AppendLine($"'{ComplianceStatus.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LatestReportId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" latestReportId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LatestReportId)) + { + builder.Append(" latestReportId: "); + builder.AppendLine($"'{LatestReportId.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastComplianceCheckedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastComplianceChecked: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LastComplianceCheckedOn)) + { + builder.Append(" lastComplianceChecked: "); + var formattedDateTimeString = TypeFormatters.ToString(LastComplianceCheckedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -182,6 +274,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrit { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(GuestConfigurationVmssVmInfo)} does not support writing '{options.Format}' format."); } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationVmssVmInfo.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationVmssVmInfo.cs index 92236b0e9c556..6ee01f863ed6a 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationVmssVmInfo.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/GuestConfigurationVmssVmInfo.cs @@ -69,14 +69,19 @@ internal GuestConfigurationVmssVmInfo(Guid? vmId, ResourceIdentifier vmResourceI } /// UUID of the VM. + [WirePath("vmId")] public Guid? VmId { get; } /// Azure resource Id of the VM. + [WirePath("vmResourceId")] public ResourceIdentifier VmResourceId { get; } /// A value indicating compliance status of the machine for the assigned guest configuration. + [WirePath("complianceStatus")] public AssignedGuestConfigurationMachineComplianceStatus? ComplianceStatus { get; } /// Id of the latest report for the guest configuration assignment. + [WirePath("latestReportId")] public Guid? LatestReportId { get; } /// Date and time when last compliance status was checked. + [WirePath("lastComplianceChecked")] public DateTimeOffset? LastComplianceCheckedOn { get; } } } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/LcmConfigurationSetting.Serialization.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/LcmConfigurationSetting.Serialization.cs index b5a7e6e9569d3..db55919db183c 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/LcmConfigurationSetting.Serialization.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/LcmConfigurationSetting.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -174,6 +175,113 @@ internal static LcmConfigurationSetting DeserializeLcmConfigurationSetting(JsonE serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ConfigurationMode), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" configurationMode: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ConfigurationMode)) + { + builder.Append(" configurationMode: "); + builder.AppendLine($"'{ConfigurationMode.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsModuleOverwriteAllowed), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" allowModuleOverwrite: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsModuleOverwriteAllowed)) + { + builder.Append(" allowModuleOverwrite: "); + var boolValue = IsModuleOverwriteAllowed.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ActionAfterReboot), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" actionAfterReboot: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ActionAfterReboot)) + { + builder.Append(" actionAfterReboot: "); + builder.AppendLine($"'{ActionAfterReboot.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RefreshFrequencyInMins), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" refreshFrequencyMins: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(RefreshFrequencyInMins)) + { + builder.Append(" refreshFrequencyMins: "); + builder.AppendLine($"'{RefreshFrequencyInMins.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RebootIfNeeded), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" rebootIfNeeded: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(RebootIfNeeded)) + { + builder.Append(" rebootIfNeeded: "); + var boolValue = RebootIfNeeded.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ConfigurationModeFrequencyInMins), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" configurationModeFrequencyMins: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ConfigurationModeFrequencyInMins)) + { + builder.Append(" configurationModeFrequencyMins: "); + builder.AppendLine($"'{ConfigurationModeFrequencyInMins.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -182,6 +290,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpt { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(LcmConfigurationSetting)} does not support writing '{options.Format}' format."); } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/LcmConfigurationSetting.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/LcmConfigurationSetting.cs index 735e23c19c013..e0ef1b01f68e9 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/LcmConfigurationSetting.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/Models/LcmConfigurationSetting.cs @@ -70,16 +70,22 @@ internal LcmConfigurationSetting(LcmConfigurationMode? configurationMode, bool? } /// Specifies how the LCM(Local Configuration Manager) actually applies the configuration to the target nodes. Possible values are ApplyOnly, ApplyAndMonitor, and ApplyAndAutoCorrect. + [WirePath("configurationMode")] public LcmConfigurationMode? ConfigurationMode { get; } /// If true - new configurations downloaded from the pull service are allowed to overwrite the old ones on the target node. Otherwise, false. + [WirePath("allowModuleOverwrite")] public bool? IsModuleOverwriteAllowed { get; } /// Specifies what happens after a reboot during the application of a configuration. The possible values are ContinueConfiguration and StopConfiguration. + [WirePath("actionAfterReboot")] public ActionAfterReboot? ActionAfterReboot { get; } /// The time interval, in minutes, at which the LCM checks a pull service to get updated configurations. This value is ignored if the LCM is not configured in pull mode. The default value is 30. + [WirePath("refreshFrequencyMins")] public float? RefreshFrequencyInMins { get; } /// Set this to true to automatically reboot the node after a configuration that requires reboot is applied. Otherwise, you will have to manually reboot the node for any configuration that requires it. The default value is false. To use this setting when a reboot condition is enacted by something other than DSC (such as Windows Installer), combine this setting with the xPendingReboot module. + [WirePath("rebootIfNeeded")] public bool? RebootIfNeeded { get; } /// How often, in minutes, the current configuration is checked and applied. This property is ignored if the ConfigurationMode property is set to ApplyOnly. The default value is 15. + [WirePath("configurationModeFrequencyMins")] public float? ConfigurationModeFrequencyInMins { get; } } } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/RestOperations/GuestConfigurationAssignmentReportsRestOperations.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/RestOperations/GuestConfigurationAssignmentReportsRestOperations.cs index d926121d3e139..affb54826b751 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/RestOperations/GuestConfigurationAssignmentReportsRestOperations.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/RestOperations/GuestConfigurationAssignmentReportsRestOperations.cs @@ -32,7 +32,7 @@ public GuestConfigurationAssignmentReportsRestOperations(HttpPipeline pipeline, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-01-25"; + _apiVersion = apiVersion ?? "2024-04-05"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/RestOperations/GuestConfigurationAssignmentReportsVmssRestOperations.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/RestOperations/GuestConfigurationAssignmentReportsVmssRestOperations.cs index 509ec42a6aa5b..54f514e2aebd6 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/RestOperations/GuestConfigurationAssignmentReportsVmssRestOperations.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/RestOperations/GuestConfigurationAssignmentReportsVmssRestOperations.cs @@ -32,7 +32,7 @@ public GuestConfigurationAssignmentReportsVmssRestOperations(HttpPipeline pipeli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-01-25"; + _apiVersion = apiVersion ?? "2024-04-05"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/RestOperations/GuestConfigurationAssignmentsRestOperations.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/RestOperations/GuestConfigurationAssignmentsRestOperations.cs index 21ea29cfd5f03..0c27f64ff8620 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/RestOperations/GuestConfigurationAssignmentsRestOperations.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/RestOperations/GuestConfigurationAssignmentsRestOperations.cs @@ -32,7 +32,7 @@ public GuestConfigurationAssignmentsRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-01-25"; + _apiVersion = apiVersion ?? "2024-04-05"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/RestOperations/GuestConfigurationAssignmentsVmssRestOperations.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/RestOperations/GuestConfigurationAssignmentsVmssRestOperations.cs index 3d344f879a8bd..89c999b6f4382 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/RestOperations/GuestConfigurationAssignmentsVmssRestOperations.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/RestOperations/GuestConfigurationAssignmentsVmssRestOperations.cs @@ -32,10 +32,120 @@ public GuestConfigurationAssignmentsVmssRestOperations(HttpPipeline pipeline, st { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-01-25"; + _apiVersion = apiVersion ?? "2024-04-05"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string vmssName, string name, GuestConfigurationAssignmentData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Compute/virtualMachineScaleSets/", false); + uri.AppendPath(vmssName, true); + uri.AppendPath("/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string vmssName, string name, GuestConfigurationAssignmentData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Compute/virtualMachineScaleSets/", false); + uri.AppendPath(vmssName, true); + uri.AppendPath("/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/", false); + uri.AppendPath(name, true); + 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(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates an association between a VMSS and guest configuration. + /// Subscription ID which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The resource group name. + /// The name of the virtual machine scale set. + /// Name of the guest configuration assignment. + /// Parameters supplied to the create or update guest configuration assignment. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string vmssName, string name, GuestConfigurationAssignmentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vmssName, nameof(vmssName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, vmssName, name, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + GuestConfigurationAssignmentData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = GuestConfigurationAssignmentData.DeserializeGuestConfigurationAssignmentData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates an association between a VMSS and guest configuration. + /// Subscription ID which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The resource group name. + /// The name of the virtual machine scale set. + /// Name of the guest configuration assignment. + /// Parameters supplied to the create or update guest configuration assignment. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string vmssName, string name, GuestConfigurationAssignmentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vmssName, nameof(vmssName)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, vmssName, name, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + GuestConfigurationAssignmentData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = GuestConfigurationAssignmentData.DeserializeGuestConfigurationAssignmentData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string vmssName, string name) { var uri = new RawRequestUriBuilder(); diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/RestOperations/GuestConfigurationConnectedVMwarevSphereAssignmentsReportsRestOperations.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/RestOperations/GuestConfigurationConnectedVMwarevSphereAssignmentsReportsRestOperations.cs new file mode 100644 index 0000000000000..4c62782b49ce6 --- /dev/null +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/RestOperations/GuestConfigurationConnectedVMwarevSphereAssignmentsReportsRestOperations.cs @@ -0,0 +1,249 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.GuestConfiguration.Models; + +namespace Azure.ResourceManager.GuestConfiguration +{ + internal partial class GuestConfigurationConnectedVMwarevSphereAssignmentsReportsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of GuestConfigurationConnectedVMwarevSphereAssignmentsReportsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public GuestConfigurationConnectedVMwarevSphereAssignmentsReportsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-04-05"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string vmName, string guestConfigurationAssignmentName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/", false); + uri.AppendPath(vmName, true); + uri.AppendPath("/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/", false); + uri.AppendPath(guestConfigurationAssignmentName, true); + uri.AppendPath("/reports", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string vmName, string guestConfigurationAssignmentName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/", false); + uri.AppendPath(vmName, true); + uri.AppendPath("/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/", false); + uri.AppendPath(guestConfigurationAssignmentName, true); + uri.AppendPath("/reports", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all reports for the guest configuration assignment, latest report first. + /// Subscription ID which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The resource group name. + /// The name of the virtual machine. + /// The guest configuration assignment name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string vmName, string guestConfigurationAssignmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vmName, nameof(vmName)); + Argument.AssertNotNullOrEmpty(guestConfigurationAssignmentName, nameof(guestConfigurationAssignmentName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vmName, guestConfigurationAssignmentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + GuestConfigurationAssignmentReportList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = GuestConfigurationAssignmentReportList.DeserializeGuestConfigurationAssignmentReportList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all reports for the guest configuration assignment, latest report first. + /// Subscription ID which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The resource group name. + /// The name of the virtual machine. + /// The guest configuration assignment name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string vmName, string guestConfigurationAssignmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vmName, nameof(vmName)); + Argument.AssertNotNullOrEmpty(guestConfigurationAssignmentName, nameof(guestConfigurationAssignmentName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vmName, guestConfigurationAssignmentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + GuestConfigurationAssignmentReportList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = GuestConfigurationAssignmentReportList.DeserializeGuestConfigurationAssignmentReportList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string vmName, string guestConfigurationAssignmentName, string reportId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/", false); + uri.AppendPath(vmName, true); + uri.AppendPath("/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/", false); + uri.AppendPath(guestConfigurationAssignmentName, true); + uri.AppendPath("/reports/", false); + uri.AppendPath(reportId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string vmName, string guestConfigurationAssignmentName, string reportId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/", false); + uri.AppendPath(vmName, true); + uri.AppendPath("/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/", false); + uri.AppendPath(guestConfigurationAssignmentName, true); + uri.AppendPath("/reports/", false); + uri.AppendPath(reportId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a report for the guest configuration assignment, by reportId. + /// Subscription ID which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The resource group name. + /// The name of the virtual machine. + /// The guest configuration assignment name. + /// The GUID for the guest configuration assignment report. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vmName, string guestConfigurationAssignmentName, string reportId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vmName, nameof(vmName)); + Argument.AssertNotNullOrEmpty(guestConfigurationAssignmentName, nameof(guestConfigurationAssignmentName)); + Argument.AssertNotNullOrEmpty(reportId, nameof(reportId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vmName, guestConfigurationAssignmentName, reportId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + GuestConfigurationAssignmentReport value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = GuestConfigurationAssignmentReport.DeserializeGuestConfigurationAssignmentReport(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a report for the guest configuration assignment, by reportId. + /// Subscription ID which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The resource group name. + /// The name of the virtual machine. + /// The guest configuration assignment name. + /// The GUID for the guest configuration assignment report. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string vmName, string guestConfigurationAssignmentName, string reportId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vmName, nameof(vmName)); + Argument.AssertNotNullOrEmpty(guestConfigurationAssignmentName, nameof(guestConfigurationAssignmentName)); + Argument.AssertNotNullOrEmpty(reportId, nameof(reportId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vmName, guestConfigurationAssignmentName, reportId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + GuestConfigurationAssignmentReport value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = GuestConfigurationAssignmentReport.DeserializeGuestConfigurationAssignmentReport(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/RestOperations/GuestConfigurationConnectedVMwarevSphereAssignmentsRestOperations.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/RestOperations/GuestConfigurationConnectedVMwarevSphereAssignmentsRestOperations.cs new file mode 100644 index 0000000000000..283ecb1f0d5f2 --- /dev/null +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/RestOperations/GuestConfigurationConnectedVMwarevSphereAssignmentsRestOperations.cs @@ -0,0 +1,439 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.GuestConfiguration.Models; + +namespace Azure.ResourceManager.GuestConfiguration +{ + internal partial class GuestConfigurationConnectedVMwarevSphereAssignmentsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of GuestConfigurationConnectedVMwarevSphereAssignmentsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public GuestConfigurationConnectedVMwarevSphereAssignmentsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-04-05"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string vmName, string guestConfigurationAssignmentName, GuestConfigurationAssignmentData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/", false); + uri.AppendPath(vmName, true); + uri.AppendPath("/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/", false); + uri.AppendPath(guestConfigurationAssignmentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string vmName, string guestConfigurationAssignmentName, GuestConfigurationAssignmentData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/", false); + uri.AppendPath(vmName, true); + uri.AppendPath("/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/", false); + uri.AppendPath(guestConfigurationAssignmentName, true); + 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(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates an association between a Connected VM Sphere machine and guest configuration. + /// Subscription ID which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The resource group name. + /// The name of the virtual machine. + /// Name of the guest configuration assignment. + /// Parameters supplied to the create or update guest configuration assignment. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string vmName, string guestConfigurationAssignmentName, GuestConfigurationAssignmentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vmName, nameof(vmName)); + Argument.AssertNotNullOrEmpty(guestConfigurationAssignmentName, nameof(guestConfigurationAssignmentName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, vmName, guestConfigurationAssignmentName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + GuestConfigurationAssignmentData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = GuestConfigurationAssignmentData.DeserializeGuestConfigurationAssignmentData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates an association between a Connected VM Sphere machine and guest configuration. + /// Subscription ID which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The resource group name. + /// The name of the virtual machine. + /// Name of the guest configuration assignment. + /// Parameters supplied to the create or update guest configuration assignment. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string vmName, string guestConfigurationAssignmentName, GuestConfigurationAssignmentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vmName, nameof(vmName)); + Argument.AssertNotNullOrEmpty(guestConfigurationAssignmentName, nameof(guestConfigurationAssignmentName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, vmName, guestConfigurationAssignmentName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + GuestConfigurationAssignmentData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = GuestConfigurationAssignmentData.DeserializeGuestConfigurationAssignmentData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string vmName, string guestConfigurationAssignmentName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/", false); + uri.AppendPath(vmName, true); + uri.AppendPath("/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/", false); + uri.AppendPath(guestConfigurationAssignmentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string vmName, string guestConfigurationAssignmentName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/", false); + uri.AppendPath(vmName, true); + uri.AppendPath("/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/", false); + uri.AppendPath(guestConfigurationAssignmentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get information about a guest configuration assignment. + /// Subscription ID which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The resource group name. + /// The name of the virtual machine. + /// The guest configuration assignment name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vmName, string guestConfigurationAssignmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vmName, nameof(vmName)); + Argument.AssertNotNullOrEmpty(guestConfigurationAssignmentName, nameof(guestConfigurationAssignmentName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vmName, guestConfigurationAssignmentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + GuestConfigurationAssignmentData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = GuestConfigurationAssignmentData.DeserializeGuestConfigurationAssignmentData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((GuestConfigurationAssignmentData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get information about a guest configuration assignment. + /// Subscription ID which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The resource group name. + /// The name of the virtual machine. + /// The guest configuration assignment name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string vmName, string guestConfigurationAssignmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vmName, nameof(vmName)); + Argument.AssertNotNullOrEmpty(guestConfigurationAssignmentName, nameof(guestConfigurationAssignmentName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vmName, guestConfigurationAssignmentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + GuestConfigurationAssignmentData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = GuestConfigurationAssignmentData.DeserializeGuestConfigurationAssignmentData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((GuestConfigurationAssignmentData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string vmName, string guestConfigurationAssignmentName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/", false); + uri.AppendPath(vmName, true); + uri.AppendPath("/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/", false); + uri.AppendPath(guestConfigurationAssignmentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string vmName, string guestConfigurationAssignmentName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/", false); + uri.AppendPath(vmName, true); + uri.AppendPath("/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/", false); + uri.AppendPath(guestConfigurationAssignmentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a guest configuration assignment. + /// Subscription ID which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The resource group name. + /// The name of the virtual machine. + /// Name of the guest configuration assignment. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string vmName, string guestConfigurationAssignmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vmName, nameof(vmName)); + Argument.AssertNotNullOrEmpty(guestConfigurationAssignmentName, nameof(guestConfigurationAssignmentName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, vmName, guestConfigurationAssignmentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a guest configuration assignment. + /// Subscription ID which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The resource group name. + /// The name of the virtual machine. + /// Name of the guest configuration assignment. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string vmName, string guestConfigurationAssignmentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vmName, nameof(vmName)); + Argument.AssertNotNullOrEmpty(guestConfigurationAssignmentName, nameof(guestConfigurationAssignmentName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, vmName, guestConfigurationAssignmentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string vmName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/", false); + uri.AppendPath(vmName, true); + uri.AppendPath("/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string vmName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/", false); + uri.AppendPath(vmName, true); + uri.AppendPath("/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all guest configuration assignments for an ARC machine. + /// Subscription ID which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The resource group name. + /// The name of the virtual machine. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string vmName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vmName, nameof(vmName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vmName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + GuestConfigurationAssignmentList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = GuestConfigurationAssignmentList.DeserializeGuestConfigurationAssignmentList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all guest configuration assignments for an ARC machine. + /// Subscription ID which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// The resource group name. + /// The name of the virtual machine. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string vmName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vmName, nameof(vmName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vmName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + GuestConfigurationAssignmentList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = GuestConfigurationAssignmentList.DeserializeGuestConfigurationAssignmentList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/RestOperations/GuestConfigurationHcrpAssignmentReportsRestOperations.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/RestOperations/GuestConfigurationHcrpAssignmentReportsRestOperations.cs index 0a211353196bf..73c34e0a7be80 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/RestOperations/GuestConfigurationHcrpAssignmentReportsRestOperations.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/RestOperations/GuestConfigurationHcrpAssignmentReportsRestOperations.cs @@ -32,7 +32,7 @@ public GuestConfigurationHcrpAssignmentReportsRestOperations(HttpPipeline pipeli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-01-25"; + _apiVersion = apiVersion ?? "2024-04-05"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/RestOperations/GuestConfigurationHcrpAssignmentsRestOperations.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/RestOperations/GuestConfigurationHcrpAssignmentsRestOperations.cs index 2bb5a6960da56..01f96bf86ee32 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/RestOperations/GuestConfigurationHcrpAssignmentsRestOperations.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/RestOperations/GuestConfigurationHcrpAssignmentsRestOperations.cs @@ -32,7 +32,7 @@ public GuestConfigurationHcrpAssignmentsRestOperations(HttpPipeline pipeline, st { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-01-25"; + _apiVersion = apiVersion ?? "2024-04-05"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/autorest.md b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/autorest.md index 03446b3505937..1f3c67933922c 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/autorest.md +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/autorest.md @@ -8,7 +8,8 @@ azure-arm: true csharp: true library-name: GuestConfiguration namespace: Azure.ResourceManager.GuestConfiguration -require: https://github.com/Azure/azure-rest-api-specs/blob/58a1320584b1d26bf7dab969a2593cd22b39caec/specification/guestconfiguration/resource-manager/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/6dd7b1f0b4e62d1c2d78e1fa6ab3addd032d9920/specification/guestconfiguration/resource-manager/readme.md +#tag: package-2024-04-05 output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: @@ -22,17 +23,23 @@ modelerfour: flatten-payloads: false deserialize-null-collection-as-null-value: true use-model-reader-writer: true +enable-bicep-serialization: true + +#mgmt-debug: +# show-serialized-names: true request-path-to-resource-name: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}: GuestConfigurationVmAssignment /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}: GuestConfigurationHcrpAssignment /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{name}: GuestConfigurationVmssAssignment - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}: GuestConfigurationVMwarevSphereAssignment + parameterized-scopes: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName} - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName} - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName} - +- /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualmachines/{vmName} + override-operation-name: GuestConfigurationAssignments_SubscriptionList: GetGuestConfigurationAssignments GuestConfigurationAssignments_RGList: GetGuestConfigurationAssignments diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/tests/GuestConfigurationManagementTestBase.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/tests/GuestConfigurationManagementTestBase.cs index c7a14c7ee4f82..d6c49ffee340d 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/tests/GuestConfigurationManagementTestBase.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/tests/GuestConfigurationManagementTestBase.cs @@ -81,9 +81,20 @@ protected static GuestConfigurationAssignmentProperties GetDefaultGuestConfigura var configurationParameter = new GuestConfigurationParameter(); var configurationParameterList = new List() { configurationParameter }; - GuestConfigurationNavigation guestConfigurationNavigation = new(GuestConfigurationManagementUtilities.DefaultKind, GuestConfigurationManagementUtilities.DefaultAssignmentName, - GuestConfigurationManagementUtilities.DefaultAssignmentVersion, null, null, GuestConfigurationManagementUtilities.DefaultAssignmentType, - null, GuestConfigurationManagementUtilities.Builtin, configurationParameterList, configurationParameterList, null, null); + GuestConfigurationNavigation guestConfigurationNavigation = new GuestConfigurationNavigation( + GuestConfigurationManagementUtilities.DefaultKind, + GuestConfigurationManagementUtilities.DefaultAssignmentName, + GuestConfigurationManagementUtilities.DefaultAssignmentVersion, + null, + null, + null, + GuestConfigurationManagementUtilities.DefaultAssignmentType, + null, + GuestConfigurationManagementUtilities.Builtin, + configurationParameterList, + configurationParameterList, + null, + null); return new GuestConfigurationAssignmentProperties() { From 786303e874202f04829d756c2eafec382f2aa22b Mon Sep 17 00:00:00 2001 From: yaotongms <137821665+yaotongms@users.noreply.github.com> Date: Fri, 19 Jul 2024 04:34:16 -0400 Subject: [PATCH 136/144] Release preview version 2024-05-20 of HybridCompute (#44654) --- .../CHANGELOG.md | 24 +- ...rceManager.HybridCompute.netstandard2.0.cs | 163 +++- ...e_HybridComputeExtensionValueCollection.cs | 8 +- ...ple_HybridComputeExtensionValueResource.cs | 2 +- .../Sample_HybridComputeGatewayCollection.cs | 204 +++++ .../Sample_HybridComputeGatewayResource.cs | 147 ++++ .../Sample_HybridComputeLicenseCollection.cs | 10 +- .../Sample_HybridComputeLicenseResource.cs | 8 +- .../Sample_HybridComputeMachineCollection.cs | 14 +- ...HybridComputeMachineExtensionCollection.cs | 10 +- ...e_HybridComputeMachineExtensionResource.cs | 6 +- .../Sample_HybridComputeMachineResource.cs | 23 +- ...putePrivateEndpointConnectionCollection.cs | 10 +- ...omputePrivateEndpointConnectionResource.cs | 6 +- ...Sample_HybridComputePrivateLinkResource.cs | 2 +- ...ridComputePrivateLinkResourceCollection.cs | 8 +- ...HybridComputePrivateLinkScopeCollection.cs | 12 +- ...e_HybridComputePrivateLinkScopeResource.cs | 10 +- .../Sample_MachineRunCommandCollection.cs | 10 +- .../Sample_MachineRunCommandResource.cs | 6 +- ...ecurityPerimeterConfigurationCollection.cs | 8 +- ...kSecurityPerimeterConfigurationResource.cs | 2 +- .../Sample_ResourceGroupResourceExtensions.cs | 53 ++ .../Generated/ArmHybridComputeModelFactory.cs | 104 ++- .../Extensions/HybridComputeExtensions.cs | 290 ++++++- .../MockableHybridComputeArmClient.cs | 12 + ...kableHybridComputeResourceGroupResource.cs | 183 +++- ...ckableHybridComputeSubscriptionResource.cs | 84 +- .../HybridComputeExtensionValueCollection.cs | 16 +- ...ComputeExtensionValueData.Serialization.cs | 143 ++++ .../HybridComputeExtensionValueData.cs | 5 +- .../HybridComputeExtensionValueResource.cs | 4 +- .../HybridComputeGatewayCollection.cs | 494 +++++++++++ .../HybridComputeGatewayData.Serialization.cs | 535 ++++++++++++ .../src/Generated/HybridComputeGatewayData.cs | 105 +++ ...ridComputeGatewayResource.Serialization.cs | 26 + .../Generated/HybridComputeGatewayResource.cs | 699 +++++++++++++++ .../HybridComputeLicenseCollection.cs | 20 +- .../HybridComputeLicenseData.Serialization.cs | 184 ++++ .../src/Generated/HybridComputeLicenseData.cs | 4 + .../Generated/HybridComputeLicenseResource.cs | 24 +- .../HybridComputeMachineCollection.cs | 16 +- .../HybridComputeMachineData.Serialization.cs | 803 ++++++++++++++++++ .../src/Generated/HybridComputeMachineData.cs | 34 + ...HybridComputeMachineExtensionCollection.cs | 20 +- ...mputeMachineExtensionData.Serialization.cs | 136 +++ .../HybridComputeMachineExtensionData.cs | 1 + .../HybridComputeMachineExtensionResource.cs | 24 +- .../Generated/HybridComputeMachineResource.cs | 52 +- ...putePrivateEndpointConnectionCollection.cs | 20 +- ...ateEndpointConnectionData.Serialization.cs | 86 ++ ...ridComputePrivateEndpointConnectionData.cs | 1 + ...omputePrivateEndpointConnectionResource.cs | 12 +- .../HybridComputePrivateLinkResource.cs | 4 +- ...ridComputePrivateLinkResourceCollection.cs | 16 +- ...tePrivateLinkResourceData.Serialization.cs | 86 ++ .../HybridComputePrivateLinkResourceData.cs | 1 + ...HybridComputePrivateLinkScopeCollection.cs | 20 +- ...mputePrivateLinkScopeData.Serialization.cs | 136 +++ .../HybridComputePrivateLinkScopeData.cs | 1 + .../HybridComputePrivateLinkScopeResource.cs | 36 +- .../Internal/BicepSerializationHelpers.cs | 58 ++ .../Generated/Internal/WirePathAttribute.cs | 27 + .../HybridComputeGatewayOperationSource.cs | 38 + .../Generated/MachineRunCommandCollection.cs | 20 +- .../MachineRunCommandData.Serialization.cs | 360 ++++++++ .../src/Generated/MachineRunCommandData.cs | 13 + .../Generated/MachineRunCommandResource.cs | 24 +- .../AgentConfiguration.Serialization.cs | 213 +++++ .../Generated/Models/AgentConfiguration.cs | 8 + .../Models/AgentUpgrade.Serialization.cs | 149 ++++ .../src/Generated/Models/AgentUpgrade.cs | 7 + ...atchCountByClassification.Serialization.cs | 153 ++++ .../AvailablePatchCountByClassification.cs | 9 + .../Generated/Models/EsuKey.Serialization.cs | 56 ++ .../src/Generated/Models/EsuKey.cs | 2 + .../Models/ExtensionTargetProperties.cs | 1 + .../ExtensionValueListResult.Serialization.cs | 42 + .../ExtensionsResourceStatus.Serialization.cs | 118 +++ .../Models/ExtensionsResourceStatus.cs | 5 + .../GatewaysListResult.Serialization.cs | 205 +++++ .../Generated/Models/GatewaysListResult.cs | 80 ++ .../Models/HotpatchEnablementStatus.cs | 60 ++ .../HybridComputeAccessRule.Serialization.cs | 96 +++ .../Models/HybridComputeAccessRule.cs | 3 + ...ybridComputeCloudMetadata.Serialization.cs | 41 + .../Models/HybridComputeCloudMetadata.cs | 1 + ...uteConfigurationExtension.Serialization.cs | 64 ++ .../HybridComputeConfigurationExtension.cs | 2 + ...idComputeConnectionDetail.Serialization.cs | 125 +++ .../Models/HybridComputeConnectionDetail.cs | 5 + ...HybridComputeGatewayPatch.Serialization.cs | 177 ++++ .../Models/HybridComputeGatewayPatch.cs | 35 + .../Models/HybridComputeGatewayType.cs | 48 ++ .../HybridComputeIPAddress.Serialization.cs | 82 ++ .../Models/HybridComputeIPAddress.cs | 3 + ...bridComputeLicenseDetails.Serialization.cs | 155 ++++ .../Models/HybridComputeLicenseDetails.cs | 8 + ...ComputeLinuxConfiguration.Serialization.cs | 114 ++- .../Models/HybridComputeLinuxConfiguration.cs | 14 +- .../Models/HybridComputeLinuxParameters.cs | 3 + .../HybridComputeLocation.Serialization.cs | 110 +++ .../Generated/Models/HybridComputeLocation.cs | 4 + .../HybridComputeMachineExtensionPatch.cs | 8 + .../Models/HybridComputeMachinePatch.cs | 8 + ...idComputeNetworkInterface.Serialization.cs | 42 + .../Models/HybridComputeNetworkInterface.cs | 1 + ...bridComputeNetworkProfile.Serialization.cs | 42 + .../Models/HybridComputeNetworkProfile.cs | 1 + .../HybridComputeOSProfile.Serialization.cs | 71 ++ .../Models/HybridComputeOSProfile.cs | 3 + ...omputePatchSettingsStatus.Serialization.cs | 189 +++++ .../HybridComputePatchSettingsStatus.cs | 71 ++ ...pointConnectionListResult.Serialization.cs | 65 ++ ...pointConnectionProperties.Serialization.cs | 111 +++ ...putePrivateEndpointConnectionProperties.cs | 4 + ...ateLinkResourceListResult.Serialization.cs | 65 ++ ...ateLinkResourceProperties.Serialization.cs | 114 +++ ...ridComputePrivateLinkResourceProperties.cs | 3 + ...rivateLinkScopeListResult.Serialization.cs | 65 ++ .../HybridComputePrivateLinkScopePatch.cs | 1 + ...rivateLinkScopeProperties.Serialization.cs | 103 +++ ...HybridComputePrivateLinkScopeProperties.cs | 4 + ...ceConnectionStateProperty.Serialization.cs | 87 ++ ...ivateLinkServiceConnectionStateProperty.cs | 3 + ...bridComputeProductFeature.Serialization.cs | 189 ++++- .../Models/HybridComputeProductFeature.cs | 25 +- ...dComputeProvisioningIssue.Serialization.cs | 157 ++++ .../Models/HybridComputeProvisioningIssue.cs | 6 + ...omputeResourceAssociation.Serialization.cs | 56 ++ .../HybridComputeResourceAssociation.cs | 2 + .../Models/HybridComputeResourceUpdate.cs | 1 + ...ybridComputeServiceStatus.Serialization.cs | 64 ++ .../Models/HybridComputeServiceStatus.cs | 2 + ...ridComputeServiceStatuses.Serialization.cs | 48 ++ .../Models/HybridComputeServiceStatuses.cs | 2 + .../HybridComputeSubnet.Serialization.cs | 41 + .../Generated/Models/HybridComputeSubnet.cs | 1 + ...uteTargetResourceSettings.Serialization.cs | 334 ++++++++ .../HybridComputeTargetResourceSettings.cs | 77 ++ ...mputeWindowsConfiguration.Serialization.cs | 114 ++- .../HybridComputeWindowsConfiguration.cs | 14 +- .../Models/HybridComputeWindowsParameters.cs | 5 + ...iesWithoutAssignedLicense.Serialization.cs | 102 +++ ...eArmEsuPropertiesWithoutAssignedLicense.cs | 3 + ...rofileMachineInstanceView.Serialization.cs | 280 +++++- .../LicenseProfileMachineInstanceView.cs | 30 +- ...InstanceViewEsuProperties.Serialization.cs | 132 +++ ...ProfileMachineInstanceViewEsuProperties.cs | 2 + ...StorageModelEsuProperties.Serialization.cs | 57 ++ ...LicenseProfileStorageModelEsuProperties.cs | 2 + .../LicenseProfileSubscriptionStatus.cs | 6 + .../LicensesListResult.Serialization.cs | 65 ++ ...achineAssessPatchesResult.Serialization.cs | 171 ++++ .../Models/MachineAssessPatchesResult.cs | 10 + ...hineExtensionInstanceView.Serialization.cs | 102 +++ .../Models/MachineExtensionInstanceView.cs | 4 + ...tensionInstanceViewStatus.Serialization.cs | 118 +++ .../MachineExtensionInstanceViewStatus.cs | 5 + ...achineExtensionProperties.Serialization.cs | 239 ++++++ .../Models/MachineExtensionProperties.cs | 10 + .../Models/MachineExtensionUpgrade.cs | 1 + ...chineExtensionsListResult.Serialization.cs | 65 ++ .../Models/MachineInstallPatchesContent.cs | 4 + ...chineInstallPatchesResult.Serialization.cs | 254 ++++++ .../Models/MachineInstallPatchesResult.cs | 15 + .../Models/MachineListResult.Serialization.cs | 65 ++ ...ineRunCommandInstanceView.Serialization.cs | 173 ++++ .../Models/MachineRunCommandInstanceView.cs | 8 + ...ineRunCommandScriptSource.Serialization.cs | 94 ++ .../Models/MachineRunCommandScriptSource.cs | 4 + ...hineRunCommandsListResult.Serialization.cs | 65 ++ .../NetworkSecurityPerimeter.Serialization.cs | 79 ++ .../Models/NetworkSecurityPerimeter.cs | 3 + ...erConfigurationListResult.Serialization.cs | 65 ++ ...kSecurityPerimeterProfile.Serialization.cs | 131 +++ .../Models/NetworkSecurityPerimeterProfile.cs | 5 + ...dpointConnectionDataModel.Serialization.cs | 86 ++ .../PrivateEndpointConnectionDataModel.cs | 1 + ...inkScopeValidationDetails.Serialization.cs | 72 ++ .../PrivateLinkScopeValidationDetails.cs | 3 + .../RunCommandInputParameter.Serialization.cs | 64 ++ .../Models/RunCommandInputParameter.cs | 2 + ...RunCommandManagedIdentity.Serialization.cs | 48 ++ .../Models/RunCommandManagedIdentity.cs | 2 + .../VolumeLicenseDetails.Serialization.cs | 56 ++ .../Generated/Models/VolumeLicenseDetails.cs | 2 + ...ecurityPerimeterConfigurationCollection.cs | 16 +- ...erimeterConfigurationData.Serialization.cs | 166 ++++ ...tworkSecurityPerimeterConfigurationData.cs | 5 + ...kSecurityPerimeterConfigurationResource.cs | 4 +- .../ExtensionMetadataRestOperations.cs | 2 +- .../RestOperations/GatewaysRestOperations.cs | 731 ++++++++++++++++ .../HybridComputeManagementRestOperations.cs | 2 +- .../RestOperations/LicensesRestOperations.cs | 2 +- .../MachineExtensionsRestOperations.cs | 2 +- .../MachineRunCommandsRestOperations.cs | 2 +- .../RestOperations/MachinesRestOperations.cs | 2 +- .../NetworkProfileRestOperations.cs | 2 +- ...tyPerimeterConfigurationsRestOperations.cs | 2 +- ...rivateEndpointConnectionsRestOperations.cs | 2 +- .../PrivateLinkResourcesRestOperations.cs | 2 +- .../PrivateLinkScopesRestOperations.cs | 2 +- .../RestOperations/SettingsRestOperations.cs | 165 ++++ .../src/autorest.md | 59 +- 205 files changed, 13601 insertions(+), 392 deletions(-) create mode 100644 sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeGatewayCollection.cs create mode 100644 sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeGatewayResource.cs create mode 100644 sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs create mode 100644 sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeGatewayCollection.cs create mode 100644 sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeGatewayData.Serialization.cs create mode 100644 sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeGatewayData.cs create mode 100644 sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeGatewayResource.Serialization.cs create mode 100644 sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeGatewayResource.cs create mode 100644 sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Internal/BicepSerializationHelpers.cs create mode 100644 sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Internal/WirePathAttribute.cs create mode 100644 sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/LongRunningOperation/HybridComputeGatewayOperationSource.cs create mode 100644 sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/GatewaysListResult.Serialization.cs create mode 100644 sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/GatewaysListResult.cs create mode 100644 sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HotpatchEnablementStatus.cs create mode 100644 sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeGatewayPatch.Serialization.cs create mode 100644 sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeGatewayPatch.cs create mode 100644 sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeGatewayType.cs create mode 100644 sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePatchSettingsStatus.Serialization.cs create mode 100644 sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePatchSettingsStatus.cs create mode 100644 sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeTargetResourceSettings.Serialization.cs create mode 100644 sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeTargetResourceSettings.cs create mode 100644 sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/GatewaysRestOperations.cs create mode 100644 sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/SettingsRestOperations.cs diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/CHANGELOG.md b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/CHANGELOG.md index 001e17ec5e39e..4b9c6f3b898f0 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/CHANGELOG.md +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/CHANGELOG.md @@ -1,33 +1,31 @@ # Release History -## 1.0.0-beta.10 (Unreleased) +## 1.0.0-beta.10 (2024-07-19) ### Features Added -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- Upgraded api-version tag from 'package-preview-2024-03' to 'package-preview-2024-05'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/b48d5d72073a296514d3d4db77887d8711526ccc/specification/hybridcompute/resource-manager/readme.md +- Added `ArmOperation.Rehydrate` and `ArmOperation.Rehydrate` static methods to rehydrate a long-running operation. +- Added experimental Bicep serialization. ## 1.0.0-beta.9 (2024-06-07) ### Features Added - Upgraded api-version tag to 'package-preview-2024-03'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/5f0ca7e524c788be5f2b7e7488076dadba7b26ce/specification/hybridcompute/resource-manager/readme.md. - - Add esu license operations for hybrid machine. - - Add network sevurity perimeter operations for hybrid machine. + - Added esu license operations for hybrid machine. + - Added network sevurity perimeter operations for hybrid machine. ## 1.0.0-beta.8 (2024-05-07) ### Features Added -- Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. -- Add `ArmOperation.Rehydrate` and `ArmOperation.Rehydrate` static methods to rehydrate a long-running operation. +- Enabled the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. +- Added `ArmOperation.Rehydrate` and `ArmOperation.Rehydrate` static methods to rehydrate a long-running operation. ### Bugs Fixed -- Fix format type of ESU license status +- Fixed format type of ESU license status ## 1.0.0-beta.7 (2024-01-03) @@ -40,7 +38,7 @@ ### Features Added -- Enable mocking for extension methods, refer this [document](https://aka.ms/azsdk/net/mocking) for more details. +- Enabled mocking for extension methods, refer this [document](https://aka.ms/azsdk/net/mocking) for more details. ### Other Changes @@ -57,7 +55,7 @@ ### Features Added -- Enable the model factory feature for model mocking, more information can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-mocking-factory-builder). +- Enabled the model factory feature for model mocking, more information can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-mocking-factory-builder). ### Other Changes diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/api/Azure.ResourceManager.HybridCompute.netstandard2.0.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/api/Azure.ResourceManager.HybridCompute.netstandard2.0.cs index e5f1b0a39e788..efe56ef0e09be 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/api/Azure.ResourceManager.HybridCompute.netstandard2.0.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/api/Azure.ResourceManager.HybridCompute.netstandard2.0.cs @@ -6,6 +6,12 @@ public static partial class HybridComputeExtensions public static System.Threading.Tasks.Task> GetHybridComputeExtensionValueAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, string publisher, string extensionType, string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.HybridCompute.HybridComputeExtensionValueResource GetHybridComputeExtensionValueResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.HybridCompute.HybridComputeExtensionValueCollection GetHybridComputeExtensionValues(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, string publisher, string extensionType) { throw null; } + public static Azure.Response GetHybridComputeGateway(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetHybridComputeGatewayAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.HybridCompute.HybridComputeGatewayResource GetHybridComputeGatewayResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.HybridCompute.HybridComputeGatewayCollection GetHybridComputeGateways(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetHybridComputeGateways(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetHybridComputeGatewaysAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response GetHybridComputeLicense(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string licenseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetHybridComputeLicenseAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string licenseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.HybridCompute.HybridComputeLicenseResource GetHybridComputeLicenseResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -31,6 +37,8 @@ public static partial class HybridComputeExtensions public static Azure.ResourceManager.HybridCompute.NetworkSecurityPerimeterConfigurationResource GetNetworkSecurityPerimeterConfigurationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetValidationDetailsPrivateLinkScope(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, string privateLinkScopeId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetValidationDetailsPrivateLinkScopeAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, string privateLinkScopeId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response UpdateTargetResourceSetting(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string baseProvider, string baseResourceType, string baseResourceName, string settingsResourceName, Azure.ResourceManager.HybridCompute.Models.HybridComputeTargetResourceSettings hybridComputeTargetResourceSettings, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> UpdateTargetResourceSettingAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string baseProvider, string baseResourceType, string baseResourceName, string settingsResourceName, Azure.ResourceManager.HybridCompute.Models.HybridComputeTargetResourceSettings hybridComputeTargetResourceSettings, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class HybridComputeExtensionValueCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -49,7 +57,7 @@ protected HybridComputeExtensionValueCollection() { } } public partial class HybridComputeExtensionValueData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal HybridComputeExtensionValueData() { } + public HybridComputeExtensionValueData() { } public string ExtensionType { get { throw null; } } public string Publisher { get { throw null; } } public string Version { get { throw null; } } @@ -74,6 +82,62 @@ protected HybridComputeExtensionValueResource() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class HybridComputeGatewayCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected HybridComputeGatewayCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string gatewayName, Azure.ResourceManager.HybridCompute.HybridComputeGatewayData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string gatewayName, Azure.ResourceManager.HybridCompute.HybridComputeGatewayData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class HybridComputeGatewayData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public HybridComputeGatewayData(Azure.Core.AzureLocation location) { } + public System.Collections.Generic.IList AllowedFeatures { get { throw null; } } + public string GatewayEndpoint { get { throw null; } } + public string GatewayId { get { throw null; } } + public Azure.ResourceManager.HybridCompute.Models.HybridComputeGatewayType? GatewayType { get { throw null; } set { } } + public Azure.ResourceManager.HybridCompute.Models.HybridComputeProvisioningState? ProvisioningState { get { throw null; } } + Azure.ResourceManager.HybridCompute.HybridComputeGatewayData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.HybridCompute.HybridComputeGatewayData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HybridComputeGatewayResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected HybridComputeGatewayResource() { } + public virtual Azure.ResourceManager.HybridCompute.HybridComputeGatewayData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string gatewayName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.HybridCompute.HybridComputeGatewayData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.HybridCompute.HybridComputeGatewayData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.HybridCompute.Models.HybridComputeGatewayPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.HybridCompute.Models.HybridComputeGatewayPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class HybridComputeLicenseCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected HybridComputeLicenseCollection() { } @@ -542,6 +606,7 @@ public partial class MockableHybridComputeArmClient : Azure.ResourceManager.ArmR { protected MockableHybridComputeArmClient() { } public virtual Azure.ResourceManager.HybridCompute.HybridComputeExtensionValueResource GetHybridComputeExtensionValueResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.HybridCompute.HybridComputeGatewayResource GetHybridComputeGatewayResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.HybridCompute.HybridComputeLicenseResource GetHybridComputeLicenseResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.HybridCompute.HybridComputeMachineExtensionResource GetHybridComputeMachineExtensionResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.HybridCompute.HybridComputeMachineResource GetHybridComputeMachineResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -554,6 +619,9 @@ protected MockableHybridComputeArmClient() { } public partial class MockableHybridComputeResourceGroupResource : Azure.ResourceManager.ArmResource { protected MockableHybridComputeResourceGroupResource() { } + public virtual Azure.Response GetHybridComputeGateway(string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetHybridComputeGatewayAsync(string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.HybridCompute.HybridComputeGatewayCollection GetHybridComputeGateways() { throw null; } public virtual Azure.Response GetHybridComputeLicense(string licenseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetHybridComputeLicenseAsync(string licenseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.HybridCompute.HybridComputeLicenseCollection GetHybridComputeLicenses() { throw null; } @@ -563,6 +631,8 @@ protected MockableHybridComputeResourceGroupResource() { } public virtual Azure.Response GetHybridComputePrivateLinkScope(string scopeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetHybridComputePrivateLinkScopeAsync(string scopeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.HybridCompute.HybridComputePrivateLinkScopeCollection GetHybridComputePrivateLinkScopes() { throw null; } + public virtual Azure.Response UpdateTargetResourceSetting(string baseProvider, string baseResourceType, string baseResourceName, string settingsResourceName, Azure.ResourceManager.HybridCompute.Models.HybridComputeTargetResourceSettings hybridComputeTargetResourceSettings, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateTargetResourceSettingAsync(string baseProvider, string baseResourceType, string baseResourceName, string settingsResourceName, Azure.ResourceManager.HybridCompute.Models.HybridComputeTargetResourceSettings hybridComputeTargetResourceSettings, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class MockableHybridComputeSubscriptionResource : Azure.ResourceManager.ArmResource { @@ -570,6 +640,8 @@ protected MockableHybridComputeSubscriptionResource() { } public virtual Azure.Response GetHybridComputeExtensionValue(Azure.Core.AzureLocation location, string publisher, string extensionType, string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetHybridComputeExtensionValueAsync(Azure.Core.AzureLocation location, string publisher, string extensionType, string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.HybridCompute.HybridComputeExtensionValueCollection GetHybridComputeExtensionValues(Azure.Core.AzureLocation location, string publisher, string extensionType) { throw null; } + public virtual Azure.Pageable GetHybridComputeGateways(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetHybridComputeGatewaysAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetHybridComputeLicenses(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetHybridComputeLicensesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetHybridComputeMachines(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -667,14 +739,17 @@ public static partial class ArmHybridComputeModelFactory public static Azure.ResourceManager.HybridCompute.Models.HybridComputeConfigurationExtension HybridComputeConfigurationExtension(string publisher = null, string configurationExtensionType = null) { throw null; } public static Azure.ResourceManager.HybridCompute.Models.HybridComputeConnectionDetail HybridComputeConnectionDetail(Azure.Core.ResourceIdentifier id = null, string privateIPAddress = null, string linkIdentifier = null, string groupId = null, string memberName = null) { throw null; } public static Azure.ResourceManager.HybridCompute.HybridComputeExtensionValueData HybridComputeExtensionValueData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string version = null, string extensionType = null, string publisher = null) { throw null; } + public static Azure.ResourceManager.HybridCompute.HybridComputeGatewayData HybridComputeGatewayData(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 tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.HybridCompute.Models.HybridComputeProvisioningState? provisioningState = default(Azure.ResourceManager.HybridCompute.Models.HybridComputeProvisioningState?), string gatewayId = null, Azure.ResourceManager.HybridCompute.Models.HybridComputeGatewayType? gatewayType = default(Azure.ResourceManager.HybridCompute.Models.HybridComputeGatewayType?), string gatewayEndpoint = null, System.Collections.Generic.IEnumerable allowedFeatures = null) { throw null; } public static Azure.ResourceManager.HybridCompute.Models.HybridComputeIPAddress HybridComputeIPAddress(string address = null, string ipAddressVersion = null, string subnetAddressPrefix = null) { throw null; } public static Azure.ResourceManager.HybridCompute.HybridComputeLicenseData HybridComputeLicenseData(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 tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.HybridCompute.Models.HybridComputeProvisioningState? provisioningState = default(Azure.ResourceManager.HybridCompute.Models.HybridComputeProvisioningState?), System.Guid? tenantId = default(System.Guid?), Azure.ResourceManager.HybridCompute.Models.HybridComputeLicenseType? licenseType = default(Azure.ResourceManager.HybridCompute.Models.HybridComputeLicenseType?), Azure.ResourceManager.HybridCompute.Models.HybridComputeLicenseDetails licenseDetails = null) { throw null; } public static Azure.ResourceManager.HybridCompute.Models.HybridComputeLicenseDetails HybridComputeLicenseDetails(Azure.ResourceManager.HybridCompute.Models.HybridComputeLicenseState? state = default(Azure.ResourceManager.HybridCompute.Models.HybridComputeLicenseState?), Azure.ResourceManager.HybridCompute.Models.HybridComputeLicenseTarget? target = default(Azure.ResourceManager.HybridCompute.Models.HybridComputeLicenseTarget?), Azure.ResourceManager.HybridCompute.Models.HybridComputeLicenseEdition? edition = default(Azure.ResourceManager.HybridCompute.Models.HybridComputeLicenseEdition?), Azure.ResourceManager.HybridCompute.Models.LicenseCoreType? licenseCoreType = default(Azure.ResourceManager.HybridCompute.Models.LicenseCoreType?), int? processors = default(int?), int? assignedLicenses = default(int?), string immutableId = null, System.Collections.Generic.IEnumerable volumeLicenseDetails = null) { throw null; } + public static Azure.ResourceManager.HybridCompute.Models.HybridComputeLinuxConfiguration HybridComputeLinuxConfiguration(Azure.ResourceManager.HybridCompute.Models.AssessmentModeType? assessmentMode = default(Azure.ResourceManager.HybridCompute.Models.AssessmentModeType?), Azure.ResourceManager.HybridCompute.Models.PatchModeType? patchMode = default(Azure.ResourceManager.HybridCompute.Models.PatchModeType?), bool? isHotpatchingEnabled = default(bool?), Azure.ResourceManager.HybridCompute.Models.HybridComputePatchSettingsStatus status = null) { throw null; } public static Azure.ResourceManager.HybridCompute.HybridComputeMachineData HybridComputeMachineData(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 tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), System.Collections.Generic.IEnumerable resources = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.HybridCompute.Models.ArcKindEnum? kind = default(Azure.ResourceManager.HybridCompute.Models.ArcKindEnum?), Azure.ResourceManager.HybridCompute.Models.HybridComputeLocation locationData = null, Azure.ResourceManager.HybridCompute.Models.AgentConfiguration agentConfiguration = null, Azure.ResourceManager.HybridCompute.Models.HybridComputeServiceStatuses serviceStatuses = null, string cloudMetadataProvider = null, Azure.ResourceManager.HybridCompute.Models.AgentUpgrade agentUpgrade = null, Azure.ResourceManager.HybridCompute.Models.HybridComputeOSProfile osProfile = null, Azure.ResourceManager.HybridCompute.Models.LicenseProfileMachineInstanceView licenseProfile = null, string provisioningState = null, Azure.ResourceManager.HybridCompute.Models.HybridComputeStatusType? status = default(Azure.ResourceManager.HybridCompute.Models.HybridComputeStatusType?), System.DateTimeOffset? lastStatusChange = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable errorDetails = null, string agentVersion = null, System.Guid? vmId = default(System.Guid?), string displayName = null, string machineFqdn = null, string clientPublicKey = null, string osName = null, string osVersion = null, string osType = null, System.Guid? vmUuid = default(System.Guid?), System.Collections.Generic.IEnumerable extensions = null, string osSku = null, string osEdition = null, string domainName = null, string adFqdn = null, string dnsFqdn = null, Azure.Core.ResourceIdentifier privateLinkScopeResourceId = null, Azure.Core.ResourceIdentifier parentClusterResourceId = null, string msSqlDiscovered = null, System.Collections.Generic.IReadOnlyDictionary detectedProperties = null, System.Collections.Generic.IEnumerable networkInterfaces = null) { throw null; } public static Azure.ResourceManager.HybridCompute.HybridComputeMachineExtensionData HybridComputeMachineExtensionData(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 tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.HybridCompute.Models.MachineExtensionProperties properties = null) { throw null; } public static Azure.ResourceManager.HybridCompute.Models.HybridComputeNetworkInterface HybridComputeNetworkInterface(System.Collections.Generic.IEnumerable ipAddresses = null) { throw null; } public static Azure.ResourceManager.HybridCompute.Models.HybridComputeNetworkProfile HybridComputeNetworkProfile(System.Collections.Generic.IEnumerable networkInterfaces = null) { throw null; } public static Azure.ResourceManager.HybridCompute.Models.HybridComputeOSProfile HybridComputeOSProfile(string computerName = null, Azure.ResourceManager.HybridCompute.Models.HybridComputeWindowsConfiguration windowsConfiguration = null, Azure.ResourceManager.HybridCompute.Models.HybridComputeLinuxConfiguration linuxConfiguration = null) { throw null; } + public static Azure.ResourceManager.HybridCompute.Models.HybridComputePatchSettingsStatus HybridComputePatchSettingsStatus(Azure.ResourceManager.HybridCompute.Models.HotpatchEnablementStatus? hotpatchEnablementStatus = default(Azure.ResourceManager.HybridCompute.Models.HotpatchEnablementStatus?), Azure.ResponseError error = null) { throw null; } public static Azure.ResourceManager.HybridCompute.HybridComputePrivateEndpointConnectionData HybridComputePrivateEndpointConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.HybridCompute.Models.HybridComputePrivateEndpointConnectionProperties properties = null) { throw null; } public static Azure.ResourceManager.HybridCompute.Models.HybridComputePrivateEndpointConnectionProperties HybridComputePrivateEndpointConnectionProperties(Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.HybridCompute.Models.HybridComputePrivateLinkServiceConnectionStateProperty connectionState = null, string provisioningState = null, System.Collections.Generic.IEnumerable groupIds = null) { throw null; } public static Azure.ResourceManager.HybridCompute.HybridComputePrivateLinkResourceData HybridComputePrivateLinkResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.HybridCompute.Models.HybridComputePrivateLinkResourceProperties properties = null) { throw null; } @@ -682,11 +757,13 @@ public static partial class ArmHybridComputeModelFactory public static Azure.ResourceManager.HybridCompute.HybridComputePrivateLinkScopeData HybridComputePrivateLinkScopeData(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 tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.HybridCompute.Models.HybridComputePrivateLinkScopeProperties properties = null) { throw null; } public static Azure.ResourceManager.HybridCompute.Models.HybridComputePrivateLinkScopeProperties HybridComputePrivateLinkScopeProperties(Azure.ResourceManager.HybridCompute.Models.HybridComputePublicNetworkAccessType? publicNetworkAccess = default(Azure.ResourceManager.HybridCompute.Models.HybridComputePublicNetworkAccessType?), string provisioningState = null, string privateLinkScopeId = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null) { throw null; } public static Azure.ResourceManager.HybridCompute.Models.HybridComputePrivateLinkServiceConnectionStateProperty HybridComputePrivateLinkServiceConnectionStateProperty(string status = null, string description = null, string actionsRequired = null) { throw null; } - public static Azure.ResourceManager.HybridCompute.Models.HybridComputeProductFeature HybridComputeProductFeature(string name = null, Azure.ResourceManager.HybridCompute.Models.LicenseProfileSubscriptionStatus? subscriptionStatus = default(Azure.ResourceManager.HybridCompute.Models.LicenseProfileSubscriptionStatus?), System.DateTimeOffset? billingStartOn = default(System.DateTimeOffset?), System.DateTimeOffset? enrollmentOn = default(System.DateTimeOffset?), System.DateTimeOffset? disenrollmentOn = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.HybridCompute.Models.HybridComputeProductFeature HybridComputeProductFeature(string name = null, Azure.ResourceManager.HybridCompute.Models.LicenseProfileSubscriptionStatus? subscriptionStatus = default(Azure.ResourceManager.HybridCompute.Models.LicenseProfileSubscriptionStatus?), System.DateTimeOffset? enrollmentOn = default(System.DateTimeOffset?), System.DateTimeOffset? billingStartOn = default(System.DateTimeOffset?), System.DateTimeOffset? disenrollmentOn = default(System.DateTimeOffset?), System.DateTimeOffset? billingEndOn = default(System.DateTimeOffset?), Azure.ResponseError error = null) { throw null; } public static Azure.ResourceManager.HybridCompute.Models.HybridComputeProvisioningIssue HybridComputeProvisioningIssue(string name = null, Azure.ResourceManager.HybridCompute.Models.HybridComputeProvisioningIssueType? issueType = default(Azure.ResourceManager.HybridCompute.Models.HybridComputeProvisioningIssueType?), Azure.ResourceManager.HybridCompute.Models.HybridComputeProvisioningIssueSeverity? severity = default(Azure.ResourceManager.HybridCompute.Models.HybridComputeProvisioningIssueSeverity?), string description = null, System.Collections.Generic.IEnumerable suggestedResourceIds = null, System.Collections.Generic.IEnumerable suggestedAccessRules = null) { throw null; } public static Azure.ResourceManager.HybridCompute.Models.HybridComputeResourceAssociation HybridComputeResourceAssociation(string name = null, Azure.ResourceManager.HybridCompute.Models.HybridComputeAccessMode? accessMode = default(Azure.ResourceManager.HybridCompute.Models.HybridComputeAccessMode?)) { throw null; } + public static Azure.ResourceManager.HybridCompute.Models.HybridComputeTargetResourceSettings HybridComputeTargetResourceSettings(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Guid? tenantId = default(System.Guid?), Azure.Core.ResourceIdentifier gatewayResourceId = null) { throw null; } + public static Azure.ResourceManager.HybridCompute.Models.HybridComputeWindowsConfiguration HybridComputeWindowsConfiguration(Azure.ResourceManager.HybridCompute.Models.AssessmentModeType? assessmentMode = default(Azure.ResourceManager.HybridCompute.Models.AssessmentModeType?), Azure.ResourceManager.HybridCompute.Models.PatchModeType? patchMode = default(Azure.ResourceManager.HybridCompute.Models.PatchModeType?), bool? isHotpatchingEnabled = default(bool?), Azure.ResourceManager.HybridCompute.Models.HybridComputePatchSettingsStatus status = null) { throw null; } public static Azure.ResourceManager.HybridCompute.Models.LicenseProfileArmEsuPropertiesWithoutAssignedLicense LicenseProfileArmEsuPropertiesWithoutAssignedLicense(System.Guid? assignedLicenseImmutableId = default(System.Guid?), System.Collections.Generic.IEnumerable esuKeys = null, Azure.ResourceManager.HybridCompute.Models.EsuServerType? serverType = default(Azure.ResourceManager.HybridCompute.Models.EsuServerType?), Azure.ResourceManager.HybridCompute.Models.EsuEligibility? esuEligibility = default(Azure.ResourceManager.HybridCompute.Models.EsuEligibility?), Azure.ResourceManager.HybridCompute.Models.EsuKeyState? esuKeyState = default(Azure.ResourceManager.HybridCompute.Models.EsuKeyState?)) { throw null; } - public static Azure.ResourceManager.HybridCompute.Models.LicenseProfileMachineInstanceView LicenseProfileMachineInstanceView(Azure.ResourceManager.HybridCompute.Models.HybridComputeLicenseStatus? licenseStatus = default(Azure.ResourceManager.HybridCompute.Models.HybridComputeLicenseStatus?), string licenseChannel = null, Azure.ResourceManager.HybridCompute.Models.LicenseProfileMachineInstanceViewEsuProperties esuProfile = null, Azure.ResourceManager.HybridCompute.Models.LicenseProfileSubscriptionStatus? subscriptionStatus = default(Azure.ResourceManager.HybridCompute.Models.LicenseProfileSubscriptionStatus?), Azure.ResourceManager.HybridCompute.Models.LicenseProfileProductType? productType = default(Azure.ResourceManager.HybridCompute.Models.LicenseProfileProductType?), System.DateTimeOffset? billingStartOn = default(System.DateTimeOffset?), System.DateTimeOffset? enrollmentOn = default(System.DateTimeOffset?), System.DateTimeOffset? disenrollmentOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable productFeatures = null, bool? isSoftwareAssuranceCustomer = default(bool?)) { throw null; } + public static Azure.ResourceManager.HybridCompute.Models.LicenseProfileMachineInstanceView LicenseProfileMachineInstanceView(Azure.ResourceManager.HybridCompute.Models.HybridComputeLicenseStatus? licenseStatus = default(Azure.ResourceManager.HybridCompute.Models.HybridComputeLicenseStatus?), string licenseChannel = null, Azure.ResourceManager.HybridCompute.Models.LicenseProfileMachineInstanceViewEsuProperties esuProfile = null, Azure.ResourceManager.HybridCompute.Models.LicenseProfileSubscriptionStatus? subscriptionStatus = default(Azure.ResourceManager.HybridCompute.Models.LicenseProfileSubscriptionStatus?), Azure.ResourceManager.HybridCompute.Models.LicenseProfileProductType? productType = default(Azure.ResourceManager.HybridCompute.Models.LicenseProfileProductType?), System.DateTimeOffset? enrollmentOn = default(System.DateTimeOffset?), System.DateTimeOffset? billingStartOn = default(System.DateTimeOffset?), System.DateTimeOffset? disenrollmentOn = default(System.DateTimeOffset?), System.DateTimeOffset? billingEndOn = default(System.DateTimeOffset?), Azure.ResponseError error = null, System.Collections.Generic.IEnumerable productFeatures = null, bool? isSoftwareAssuranceCustomer = default(bool?)) { throw null; } public static Azure.ResourceManager.HybridCompute.Models.LicenseProfileMachineInstanceViewEsuProperties LicenseProfileMachineInstanceViewEsuProperties(System.Guid? assignedLicenseImmutableId = default(System.Guid?), System.Collections.Generic.IEnumerable esuKeys = null, Azure.ResourceManager.HybridCompute.Models.EsuServerType? serverType = default(Azure.ResourceManager.HybridCompute.Models.EsuServerType?), Azure.ResourceManager.HybridCompute.Models.EsuEligibility? esuEligibility = default(Azure.ResourceManager.HybridCompute.Models.EsuEligibility?), Azure.ResourceManager.HybridCompute.Models.EsuKeyState? esuKeyState = default(Azure.ResourceManager.HybridCompute.Models.EsuKeyState?), Azure.ResourceManager.HybridCompute.HybridComputeLicenseData assignedLicense = null, Azure.ResourceManager.HybridCompute.Models.LicenseAssignmentState? licenseAssignmentState = default(Azure.ResourceManager.HybridCompute.Models.LicenseAssignmentState?)) { throw null; } public static Azure.ResourceManager.HybridCompute.Models.LicenseProfileStorageModelEsuProperties LicenseProfileStorageModelEsuProperties(System.Guid? assignedLicenseImmutableId = default(System.Guid?), System.Collections.Generic.IEnumerable esuKeys = null) { throw null; } public static Azure.ResourceManager.HybridCompute.Models.MachineAssessPatchesResult MachineAssessPatchesResult(Azure.ResourceManager.HybridCompute.Models.MachineOperationStatus? status = default(Azure.ResourceManager.HybridCompute.Models.MachineOperationStatus?), System.Guid? assessmentActivityId = default(System.Guid?), bool? isRebootPending = default(bool?), Azure.ResourceManager.HybridCompute.Models.AvailablePatchCountByClassification availablePatchCountByClassification = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastModifiedOn = default(System.DateTimeOffset?), Azure.ResourceManager.HybridCompute.Models.PatchOperationStartedBy? startedBy = default(Azure.ResourceManager.HybridCompute.Models.PatchOperationStartedBy?), Azure.ResourceManager.HybridCompute.Models.PatchServiceUsed? patchServiceUsed = default(Azure.ResourceManager.HybridCompute.Models.PatchServiceUsed?), Azure.ResourceManager.HybridCompute.Models.HybridComputeOSType? osType = default(Azure.ResourceManager.HybridCompute.Models.HybridComputeOSType?), Azure.ResponseError errorDetails = null) { throw null; } @@ -834,6 +911,27 @@ public ExtensionTargetProperties() { } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct HotpatchEnablementStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public HotpatchEnablementStatus(string value) { throw null; } + public static Azure.ResourceManager.HybridCompute.Models.HotpatchEnablementStatus ActionRequired { get { throw null; } } + public static Azure.ResourceManager.HybridCompute.Models.HotpatchEnablementStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.HybridCompute.Models.HotpatchEnablementStatus Enabled { get { throw null; } } + public static Azure.ResourceManager.HybridCompute.Models.HotpatchEnablementStatus PendingEvaluation { get { throw null; } } + public static Azure.ResourceManager.HybridCompute.Models.HotpatchEnablementStatus Unknown { get { throw null; } } + public bool Equals(Azure.ResourceManager.HybridCompute.Models.HotpatchEnablementStatus 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.HybridCompute.Models.HotpatchEnablementStatus left, Azure.ResourceManager.HybridCompute.Models.HotpatchEnablementStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.HybridCompute.Models.HotpatchEnablementStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.HybridCompute.Models.HotpatchEnablementStatus left, Azure.ResourceManager.HybridCompute.Models.HotpatchEnablementStatus right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct HybridComputeAccessMode : System.IEquatable { private readonly object _dummy; @@ -930,6 +1028,33 @@ internal HybridComputeConnectionDetail() { } public static bool operator !=(Azure.ResourceManager.HybridCompute.Models.HybridComputeExecutionState left, Azure.ResourceManager.HybridCompute.Models.HybridComputeExecutionState right) { throw null; } public override string ToString() { throw null; } } + public partial class HybridComputeGatewayPatch : Azure.ResourceManager.HybridCompute.Models.HybridComputeResourceUpdate, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public HybridComputeGatewayPatch() { } + public System.Collections.Generic.IList AllowedFeatures { get { throw null; } } + Azure.ResourceManager.HybridCompute.Models.HybridComputeGatewayPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.HybridCompute.Models.HybridComputeGatewayPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct HybridComputeGatewayType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public HybridComputeGatewayType(string value) { throw null; } + public static Azure.ResourceManager.HybridCompute.Models.HybridComputeGatewayType Public { get { throw null; } } + public bool Equals(Azure.ResourceManager.HybridCompute.Models.HybridComputeGatewayType 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.HybridCompute.Models.HybridComputeGatewayType left, Azure.ResourceManager.HybridCompute.Models.HybridComputeGatewayType right) { throw null; } + public static implicit operator Azure.ResourceManager.HybridCompute.Models.HybridComputeGatewayType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.HybridCompute.Models.HybridComputeGatewayType left, Azure.ResourceManager.HybridCompute.Models.HybridComputeGatewayType right) { throw null; } + public override string ToString() { throw null; } + } public partial class HybridComputeIPAddress : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal HybridComputeIPAddress() { } @@ -1057,7 +1182,9 @@ public partial class HybridComputeLinuxConfiguration : System.ClientModel.Primit { public HybridComputeLinuxConfiguration() { } public Azure.ResourceManager.HybridCompute.Models.AssessmentModeType? AssessmentMode { get { throw null; } set { } } + public bool? IsHotpatchingEnabled { get { throw null; } set { } } public Azure.ResourceManager.HybridCompute.Models.PatchModeType? PatchMode { get { throw null; } set { } } + public Azure.ResourceManager.HybridCompute.Models.HybridComputePatchSettingsStatus Status { get { throw null; } } Azure.ResourceManager.HybridCompute.Models.HybridComputeLinuxConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HybridCompute.Models.HybridComputeLinuxConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1173,6 +1300,17 @@ public HybridComputeOSProfile() { } public static bool operator !=(Azure.ResourceManager.HybridCompute.Models.HybridComputeOSType left, Azure.ResourceManager.HybridCompute.Models.HybridComputeOSType right) { throw null; } public override string ToString() { throw null; } } + public partial class HybridComputePatchSettingsStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal HybridComputePatchSettingsStatus() { } + public Azure.ResponseError Error { get { throw null; } } + public Azure.ResourceManager.HybridCompute.Models.HotpatchEnablementStatus? HotpatchEnablementStatus { get { throw null; } } + Azure.ResourceManager.HybridCompute.Models.HybridComputePatchSettingsStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.HybridCompute.Models.HybridComputePatchSettingsStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class HybridComputePrivateEndpointConnectionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public HybridComputePrivateEndpointConnectionProperties() { } @@ -1236,9 +1374,11 @@ public HybridComputePrivateLinkServiceConnectionStateProperty(string status, str public partial class HybridComputeProductFeature : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public HybridComputeProductFeature() { } + public System.DateTimeOffset? BillingEndOn { get { throw null; } } public System.DateTimeOffset? BillingStartOn { get { throw null; } } public System.DateTimeOffset? DisenrollmentOn { get { throw null; } } public System.DateTimeOffset? EnrollmentOn { get { throw null; } } + public Azure.ResponseError Error { get { throw null; } } public string Name { get { throw null; } set { } } public Azure.ResourceManager.HybridCompute.Models.LicenseProfileSubscriptionStatus? SubscriptionStatus { get { throw null; } set { } } Azure.ResourceManager.HybridCompute.Models.HybridComputeProductFeature System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1443,11 +1583,24 @@ public HybridComputeServiceStatuses() { } public static bool operator !=(Azure.ResourceManager.HybridCompute.Models.HybridComputeStatusType left, Azure.ResourceManager.HybridCompute.Models.HybridComputeStatusType right) { throw null; } public override string ToString() { throw null; } } + public partial class HybridComputeTargetResourceSettings : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public HybridComputeTargetResourceSettings() { } + public Azure.Core.ResourceIdentifier GatewayResourceId { get { throw null; } set { } } + public System.Guid? TenantId { get { throw null; } } + Azure.ResourceManager.HybridCompute.Models.HybridComputeTargetResourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.HybridCompute.Models.HybridComputeTargetResourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class HybridComputeWindowsConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public HybridComputeWindowsConfiguration() { } public Azure.ResourceManager.HybridCompute.Models.AssessmentModeType? AssessmentMode { get { throw null; } set { } } + public bool? IsHotpatchingEnabled { get { throw null; } set { } } public Azure.ResourceManager.HybridCompute.Models.PatchModeType? PatchMode { get { throw null; } set { } } + public Azure.ResourceManager.HybridCompute.Models.HybridComputePatchSettingsStatus Status { get { throw null; } } Azure.ResourceManager.HybridCompute.Models.HybridComputeWindowsConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.HybridCompute.Models.HybridComputeWindowsConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1537,9 +1690,11 @@ public LicenseProfileArmEsuPropertiesWithoutAssignedLicense() { } public partial class LicenseProfileMachineInstanceView : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public LicenseProfileMachineInstanceView() { } + public System.DateTimeOffset? BillingEndOn { get { throw null; } } public System.DateTimeOffset? BillingStartOn { get { throw null; } } public System.DateTimeOffset? DisenrollmentOn { get { throw null; } } public System.DateTimeOffset? EnrollmentOn { get { throw null; } } + public Azure.ResponseError Error { get { throw null; } } public Azure.ResourceManager.HybridCompute.Models.LicenseProfileMachineInstanceViewEsuProperties EsuProfile { get { throw null; } set { } } public bool? IsSoftwareAssuranceCustomer { get { throw null; } set { } } public string LicenseChannel { get { throw null; } } @@ -1600,8 +1755,10 @@ public LicenseProfileStorageModelEsuProperties() { } private readonly int _dummyPrimitive; public LicenseProfileSubscriptionStatus(string value) { throw null; } public static Azure.ResourceManager.HybridCompute.Models.LicenseProfileSubscriptionStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.HybridCompute.Models.LicenseProfileSubscriptionStatus Disabling { get { throw null; } } public static Azure.ResourceManager.HybridCompute.Models.LicenseProfileSubscriptionStatus Enabled { get { throw null; } } public static Azure.ResourceManager.HybridCompute.Models.LicenseProfileSubscriptionStatus Enabling { get { throw null; } } + public static Azure.ResourceManager.HybridCompute.Models.LicenseProfileSubscriptionStatus Failed { get { throw null; } } public static Azure.ResourceManager.HybridCompute.Models.LicenseProfileSubscriptionStatus Unknown { get { throw null; } } public bool Equals(Azure.ResourceManager.HybridCompute.Models.LicenseProfileSubscriptionStatus other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeExtensionValueCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeExtensionValueCollection.cs index 211d1c4b6ac8e..2908a212fe8e0 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeExtensionValueCollection.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeExtensionValueCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_HybridComputeExtensionValueCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GETAnExtensionsMetadata() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/extension/ExtensionMetadata_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/extension/ExtensionMetadata_Get.json // this example is just showing the usage of "ExtensionMetadata_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task Get_GETAnExtensionsMetadata() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GETAnExtensionsMetadata() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/extension/ExtensionMetadata_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/extension/ExtensionMetadata_Get.json // this example is just showing the usage of "ExtensionMetadata_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task Exists_GETAnExtensionsMetadata() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GETAnExtensionsMetadata() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/extension/ExtensionMetadata_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/extension/ExtensionMetadata_Get.json // this example is just showing the usage of "ExtensionMetadata_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -132,7 +132,7 @@ public async Task GetIfExists_GETAnExtensionsMetadata() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GETAListOfExtensions() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/extension/ExtensionMetadata_List.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/extension/ExtensionMetadata_List.json // this example is just showing the usage of "ExtensionMetadata_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeExtensionValueResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeExtensionValueResource.cs index 203dca7ca6a53..bef2169de97ce 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeExtensionValueResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeExtensionValueResource.cs @@ -19,7 +19,7 @@ public partial class Sample_HybridComputeExtensionValueResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GETAnExtensionsMetadata() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/extension/ExtensionMetadata_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/extension/ExtensionMetadata_Get.json // this example is just showing the usage of "ExtensionMetadata_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeGatewayCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeGatewayCollection.cs new file mode 100644 index 0000000000000..e254f518b504a --- /dev/null +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeGatewayCollection.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.HybridCompute.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.HybridCompute.Samples +{ + public partial class Sample_HybridComputeGatewayCollection + { + // Create or Update a Gateway + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CreateOrUpdate_CreateOrUpdateAGateway() + { + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/gateway/Gateway_CreateOrUpdate.json + // this example is just showing the usage of "Gateways_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "ffd506c8-3415-42d3-9612-fdb423fb17df"; + string resourceGroupName = "myResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this HybridComputeGatewayResource + HybridComputeGatewayCollection collection = resourceGroupResource.GetHybridComputeGateways(); + + // invoke the operation + string gatewayName = "{gatewayName}"; + HybridComputeGatewayData data = new HybridComputeGatewayData(new AzureLocation("eastus2euap")) + { + GatewayType = HybridComputeGatewayType.Public, + AllowedFeatures = +{ +"*" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, gatewayName, data); + HybridComputeGatewayResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + HybridComputeGatewayData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get Gateway + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetGateway() + { + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/gateway/Gateway_Get.json + // this example is just showing the usage of "Gateways_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "ffd506c8-3415-42d3-9612-fdb423fb17df"; + string resourceGroupName = "myResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this HybridComputeGatewayResource + HybridComputeGatewayCollection collection = resourceGroupResource.GetHybridComputeGateways(); + + // invoke the operation + string gatewayName = "{gatewayName}"; + HybridComputeGatewayResource result = await collection.GetAsync(gatewayName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + HybridComputeGatewayData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get Gateway + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetGateway() + { + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/gateway/Gateway_Get.json + // this example is just showing the usage of "Gateways_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "ffd506c8-3415-42d3-9612-fdb423fb17df"; + string resourceGroupName = "myResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this HybridComputeGatewayResource + HybridComputeGatewayCollection collection = resourceGroupResource.GetHybridComputeGateways(); + + // invoke the operation + string gatewayName = "{gatewayName}"; + bool result = await collection.ExistsAsync(gatewayName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get Gateway + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetGateway() + { + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/gateway/Gateway_Get.json + // this example is just showing the usage of "Gateways_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "ffd506c8-3415-42d3-9612-fdb423fb17df"; + string resourceGroupName = "myResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this HybridComputeGatewayResource + HybridComputeGatewayCollection collection = resourceGroupResource.GetHybridComputeGateways(); + + // invoke the operation + string gatewayName = "{gatewayName}"; + NullableResponse response = await collection.GetIfExistsAsync(gatewayName); + HybridComputeGatewayResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + HybridComputeGatewayData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // List Gateways by Resource Group + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListGatewaysByResourceGroup() + { + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/gateway/Gateway_ListByResourceGroup.json + // this example is just showing the usage of "Gateways_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "ffd506c8-3415-42d3-9612-fdb423fb17df"; + string resourceGroupName = "myResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this HybridComputeGatewayResource + HybridComputeGatewayCollection collection = resourceGroupResource.GetHybridComputeGateways(); + + // invoke the operation and iterate over the result + await foreach (HybridComputeGatewayResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + HybridComputeGatewayData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeGatewayResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeGatewayResource.cs new file mode 100644 index 0000000000000..ebb10583a0e10 --- /dev/null +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeGatewayResource.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.HybridCompute.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.HybridCompute.Samples +{ + public partial class Sample_HybridComputeGatewayResource + { + // Update a Gateway + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Update_UpdateAGateway() + { + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/gateway/Gateway_Update.json + // this example is just showing the usage of "Gateways_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HybridComputeGatewayResource created on azure + // for more information of creating HybridComputeGatewayResource, please refer to the document of HybridComputeGatewayResource + string subscriptionId = "ffd506c8-3415-42d3-9612-fdb423fb17df"; + string resourceGroupName = "myResourceGroup"; + string gatewayName = "{gatewayName}"; + ResourceIdentifier hybridComputeGatewayResourceId = HybridComputeGatewayResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, gatewayName); + HybridComputeGatewayResource hybridComputeGateway = client.GetHybridComputeGatewayResource(hybridComputeGatewayResourceId); + + // invoke the operation + HybridComputeGatewayPatch patch = new HybridComputeGatewayPatch() + { + AllowedFeatures = +{ +"*" +}, + }; + HybridComputeGatewayResource result = await hybridComputeGateway.UpdateAsync(patch); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + HybridComputeGatewayData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get Gateway + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetGateway() + { + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/gateway/Gateway_Get.json + // this example is just showing the usage of "Gateways_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HybridComputeGatewayResource created on azure + // for more information of creating HybridComputeGatewayResource, please refer to the document of HybridComputeGatewayResource + string subscriptionId = "ffd506c8-3415-42d3-9612-fdb423fb17df"; + string resourceGroupName = "myResourceGroup"; + string gatewayName = "{gatewayName}"; + ResourceIdentifier hybridComputeGatewayResourceId = HybridComputeGatewayResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, gatewayName); + HybridComputeGatewayResource hybridComputeGateway = client.GetHybridComputeGatewayResource(hybridComputeGatewayResourceId); + + // invoke the operation + HybridComputeGatewayResource result = await hybridComputeGateway.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + HybridComputeGatewayData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Delete a Gateway + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Delete_DeleteAGateway() + { + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/gateway/Gateway_Delete.json + // this example is just showing the usage of "Gateways_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this HybridComputeGatewayResource created on azure + // for more information of creating HybridComputeGatewayResource, please refer to the document of HybridComputeGatewayResource + string subscriptionId = "ffd506c8-3415-42d3-9612-fdb423fb17df"; + string resourceGroupName = "myResourceGroup"; + string gatewayName = "{gatewayName}"; + ResourceIdentifier hybridComputeGatewayResourceId = HybridComputeGatewayResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, gatewayName); + HybridComputeGatewayResource hybridComputeGateway = client.GetHybridComputeGatewayResource(hybridComputeGatewayResourceId); + + // invoke the operation + await hybridComputeGateway.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + + // List Gateways by Subscription + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetHybridComputeGateways_ListGatewaysBySubscription() + { + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/gateway/Gateway_ListBySubscription.json + // this example is just showing the usage of "Gateways_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "ffd506c8-3415-42d3-9612-fdb423fb17df"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (HybridComputeGatewayResource item in subscriptionResource.GetHybridComputeGatewaysAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + HybridComputeGatewayData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeLicenseCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeLicenseCollection.cs index b6194e08a9441..d7eef633c8c70 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeLicenseCollection.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeLicenseCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_HybridComputeLicenseCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateALicense() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/license/License_CreateOrUpdate.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/license/License_CreateOrUpdate.json // this example is just showing the usage of "Licenses_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -68,7 +68,7 @@ public async Task CreateOrUpdate_CreateOrUpdateALicense() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetLicense() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/license/License_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/license/License_Get.json // this example is just showing the usage of "Licenses_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -102,7 +102,7 @@ public async Task Get_GetLicense() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetLicense() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/license/License_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/license/License_Get.json // this example is just showing the usage of "Licenses_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -132,7 +132,7 @@ public async Task Exists_GetLicense() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetLicense() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/license/License_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/license/License_Get.json // this example is just showing the usage of "Licenses_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -174,7 +174,7 @@ public async Task GetIfExists_GetLicense() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GETAllMachineExtensions() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/license/License_ListByResourceGroup.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/license/License_ListByResourceGroup.json // this example is just showing the usage of "Licenses_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeLicenseResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeLicenseResource.cs index 5fc16c89a4ace..88669e9d01275 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeLicenseResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeLicenseResource.cs @@ -21,7 +21,7 @@ public partial class Sample_HybridComputeLicenseResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateALicense() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/license/License_CreateOrUpdate.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/license/License_CreateOrUpdate.json // this example is just showing the usage of "Licenses_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -65,7 +65,7 @@ public async Task Update_CreateOrUpdateALicense() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetLicense() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/license/License_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/license/License_Get.json // this example is just showing the usage of "Licenses_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -96,7 +96,7 @@ public async Task Get_GetLicense() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteALicense() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/license/License_Delete.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/license/License_Delete.json // this example is just showing the usage of "Licenses_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Delete_DeleteALicense() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetHybridComputeLicenses_ListLicensesBySubscription() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/license/License_ListBySubscription.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/license/License_ListBySubscription.json // this example is just showing the usage of "Licenses_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeMachineCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeMachineCollection.cs index 6d6e6f433b082..959fcb7422d54 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeMachineCollection.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeMachineCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_HybridComputeMachineCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetMachine() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/machine/Machines_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/machine/Machines_Get.json // this example is just showing the usage of "Machines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_GetMachine() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetMachine() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/machine/Machines_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/machine/Machines_Get.json // this example is just showing the usage of "Machines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Exists_GetMachine() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetMachine() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/machine/Machines_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/machine/Machines_Get.json // this example is just showing the usage of "Machines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task GetIfExists_GetMachine() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetMachineWithLicenseProfileInstanceView() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/machine/Machines_Get_LicenseProfileInstanceView.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/machine/Machines_Get_LicenseProfileInstanceView.json // this example is just showing the usage of "Machines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -161,7 +161,7 @@ public async Task Get_GetMachineWithLicenseProfileInstanceView() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetMachineWithLicenseProfileInstanceView() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/machine/Machines_Get_LicenseProfileInstanceView.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/machine/Machines_Get_LicenseProfileInstanceView.json // this example is just showing the usage of "Machines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -192,7 +192,7 @@ public async Task Exists_GetMachineWithLicenseProfileInstanceView() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetMachineWithLicenseProfileInstanceView() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/machine/Machines_Get_LicenseProfileInstanceView.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/machine/Machines_Get_LicenseProfileInstanceView.json // this example is just showing the usage of "Machines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -235,7 +235,7 @@ public async Task GetIfExists_GetMachineWithLicenseProfileInstanceView() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListMachinesByResourceGroup() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/machine/Machines_ListByResourceGroup.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/machine/Machines_ListByResourceGroup.json // this example is just showing the usage of "Machines_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeMachineExtensionCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeMachineExtensionCollection.cs index a306af6117467..5ce6c15a5c07d 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeMachineExtensionCollection.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeMachineExtensionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_HybridComputeMachineExtensionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateAMachineExtension() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/extension/Extension_CreateOrUpdate.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/extension/Extension_CreateOrUpdate.json // this example is just showing the usage of "MachineExtensions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -69,7 +69,7 @@ public async Task CreateOrUpdate_CreateOrUpdateAMachineExtension() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GETMachineExtension() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/extension/Extension_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/extension/Extension_Get.json // this example is just showing the usage of "MachineExtensions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -104,7 +104,7 @@ public async Task Get_GETMachineExtension() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GETMachineExtension() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/extension/Extension_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/extension/Extension_Get.json // this example is just showing the usage of "MachineExtensions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -135,7 +135,7 @@ public async Task Exists_GETMachineExtension() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GETMachineExtension() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/extension/Extension_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/extension/Extension_Get.json // this example is just showing the usage of "MachineExtensions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -178,7 +178,7 @@ public async Task GetIfExists_GETMachineExtension() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GETAllMachineExtensionsList() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/extension/Extension_List.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/extension/Extension_List.json // this example is just showing the usage of "MachineExtensions_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeMachineExtensionResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeMachineExtensionResource.cs index a11e1c1361469..e4cffeaa76b53 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeMachineExtensionResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeMachineExtensionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_HybridComputeMachineExtensionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateAMachineExtension() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/extension/Extension_Update.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/extension/Extension_Update.json // this example is just showing the usage of "MachineExtensions_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -64,7 +64,7 @@ public async Task Update_CreateOrUpdateAMachineExtension() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAMachineExtension() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/extension/Extension_Delete.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/extension/Extension_Delete.json // this example is just showing the usage of "MachineExtensions_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Delete_DeleteAMachineExtension() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GETMachineExtension() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/extension/Extension_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/extension/Extension_Get.json // this example is just showing the usage of "MachineExtensions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeMachineResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeMachineResource.cs index 0d6e2ca4e78ff..98371ee0cc594 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeMachineResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputeMachineResource.cs @@ -23,7 +23,7 @@ public partial class Sample_HybridComputeMachineResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateAMachine() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/machine/Machines_Update.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/machine/Machines_Update.json // this example is just showing the usage of "Machines_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -49,7 +49,8 @@ public async Task Update_UpdateAMachine() WindowsConfiguration = new HybridComputeWindowsConfiguration() { AssessmentMode = AssessmentModeType.ImageDefault, - PatchMode = PatchModeType.Manual, + PatchMode = PatchModeType.AutomaticByPlatform, + IsHotpatchingEnabled = true, }, LinuxConfiguration = new HybridComputeLinuxConfiguration() { @@ -74,7 +75,7 @@ public async Task Update_UpdateAMachine() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAMachine() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/machine/Machines_Delete.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/machine/Machines_Delete.json // this example is just showing the usage of "Machines_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -101,7 +102,7 @@ public async Task Delete_DeleteAMachine() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetMachine() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/machine/Machines_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/machine/Machines_Get.json // this example is just showing the usage of "Machines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -132,7 +133,7 @@ public async Task Get_GetMachine() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetMachineWithLicenseProfileInstanceView() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/machine/Machines_Get_LicenseProfileInstanceView.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/machine/Machines_Get_LicenseProfileInstanceView.json // this example is just showing the usage of "Machines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -164,7 +165,7 @@ public async Task Get_GetMachineWithLicenseProfileInstanceView() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task AssessPatches_AssessPatchStateOfAMachine() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/machine/Machine_AssessPatches.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/machine/Machine_AssessPatches.json // this example is just showing the usage of "Machines_AssessPatches" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -192,7 +193,7 @@ public async Task AssessPatches_AssessPatchStateOfAMachine() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task InstallPatches_InstallPatchStateOfAMachine() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/machine/Machine_InstallPatches.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/machine/Machine_InstallPatches.json // this example is just showing the usage of "Machines_InstallPatches" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -231,7 +232,7 @@ public async Task InstallPatches_InstallPatchStateOfAMachine() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetHybridComputeMachines_ListMachinesByResourceGroup() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/machine/Machines_ListBySubscription.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/machine/Machines_ListBySubscription.json // this example is just showing the usage of "Machines_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -263,7 +264,7 @@ public async Task GetHybridComputeMachines_ListMachinesByResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task UpgradeExtensions_UpgradeMachineExtensions() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/extension/Extensions_Upgrade.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/extension/Extensions_Upgrade.json // this example is just showing the usage of "UpgradeExtensions" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -304,7 +305,7 @@ public async Task UpgradeExtensions_UpgradeMachineExtensions() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNetworkProfile_GETNetworkProfile() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/NetworkProfile_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/NetworkProfile_Get.json // this example is just showing the usage of "NetworkProfile_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -331,7 +332,7 @@ public async Task GetNetworkProfile_GETNetworkProfile() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetValidationDetailsForMachinePrivateLinkScope_PrivateLinkScopeGet() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/privateLinkScope/PrivateLinkScopes_GetValidationForMachine.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateLinkScope/PrivateLinkScopes_GetValidationForMachine.json // this example is just showing the usage of "PrivateLinkScopes_GetValidationDetailsForMachine" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateEndpointConnectionCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateEndpointConnectionCollection.cs index 1287ee586e761..58f5c8ae798b6 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateEndpointConnectionCollection.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateEndpointConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_HybridComputePrivateEndpointConnectionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsPrivateEndpointConnection() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/privateEndpoint/PrivateEndpointConnection_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateEndpoint/PrivateEndpointConnection_Get.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_GetsPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetsPrivateEndpointConnection() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/privateEndpoint/PrivateEndpointConnection_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateEndpoint/PrivateEndpointConnection_Get.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +86,7 @@ public async Task Exists_GetsPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetsPrivateEndpointConnection() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/privateEndpoint/PrivateEndpointConnection_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateEndpoint/PrivateEndpointConnection_Get.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetIfExists_GetsPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ApproveOrRejectAPrivateEndpointConnectionWithAGivenName() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/privateEndpoint/PrivateEndpointConnection_Update.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateEndpoint/PrivateEndpointConnection_Update.json // this example is just showing the usage of "PrivateEndpointConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -172,7 +172,7 @@ public async Task CreateOrUpdate_ApproveOrRejectAPrivateEndpointConnectionWithAG [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetsListOfPrivateEndpointConnectionsOnAPrivateLinkScope() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/privateEndpoint/PrivateEndpointConnection_List.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateEndpoint/PrivateEndpointConnection_List.json // this example is just showing the usage of "PrivateEndpointConnections_ListByPrivateLinkScope" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateEndpointConnectionResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateEndpointConnectionResource.cs index 4b9fe12f0f55f..a7403d83761ac 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateEndpointConnectionResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateEndpointConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_HybridComputePrivateEndpointConnectionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsPrivateEndpointConnection() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/privateEndpoint/PrivateEndpointConnection_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateEndpoint/PrivateEndpointConnection_Get.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_GetsPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ApproveOrRejectAPrivateEndpointConnectionWithAGivenName() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/privateEndpoint/PrivateEndpointConnection_Update.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateEndpoint/PrivateEndpointConnection_Update.json // this example is just showing the usage of "PrivateEndpointConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Update_ApproveOrRejectAPrivateEndpointConnectionWithAGivenName [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeletesAPrivateEndpointConnectionWithAGivenName() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/privateEndpoint/PrivateEndpointConnection_Delete.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateEndpoint/PrivateEndpointConnection_Delete.json // this example is just showing the usage of "PrivateEndpointConnections_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateLinkResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateLinkResource.cs index 13d38ff2252db..96f9b52370d64 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateLinkResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateLinkResource.cs @@ -19,7 +19,7 @@ public partial class Sample_HybridComputePrivateLinkResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsPrivateEndpointConnection() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_Get.json // this example is just showing the usage of "PrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateLinkResourceCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateLinkResourceCollection.cs index 71eaedee61c42..60272471ecf9d 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateLinkResourceCollection.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateLinkResourceCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_HybridComputePrivateLinkResourceCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetsPrivateEndpointConnection() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_ListGet.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_ListGet.json // this example is just showing the usage of "PrivateLinkResources_ListByPrivateLinkScope" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_GetsPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsPrivateEndpointConnection() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_Get.json // this example is just showing the usage of "PrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,7 +91,7 @@ public async Task Get_GetsPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetsPrivateEndpointConnection() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_Get.json // this example is just showing the usage of "PrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Exists_GetsPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetsPrivateEndpointConnection() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_Get.json // this example is just showing the usage of "PrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateLinkScopeCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateLinkScopeCollection.cs index 414a2e8921179..161dd96e3778e 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateLinkScopeCollection.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateLinkScopeCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_HybridComputePrivateLinkScopeCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_PrivateLinkScopeListByResourceGroup() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/privateLinkScope/PrivateLinkScopes_ListByResourceGroup.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateLinkScope/PrivateLinkScopes_ListByResourceGroup.json // this example is just showing the usage of "PrivateLinkScopes_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetAll_PrivateLinkScopeListByResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_PrivateLinkScopeGet() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/privateLinkScope/PrivateLinkScopes_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateLinkScope/PrivateLinkScopes_Get.json // this example is just showing the usage of "PrivateLinkScopes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,7 +90,7 @@ public async Task Get_PrivateLinkScopeGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_PrivateLinkScopeGet() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/privateLinkScope/PrivateLinkScopes_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateLinkScope/PrivateLinkScopes_Get.json // this example is just showing the usage of "PrivateLinkScopes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -120,7 +120,7 @@ public async Task Exists_PrivateLinkScopeGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_PrivateLinkScopeGet() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/privateLinkScope/PrivateLinkScopes_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateLinkScope/PrivateLinkScopes_Get.json // this example is just showing the usage of "PrivateLinkScopes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -162,7 +162,7 @@ public async Task GetIfExists_PrivateLinkScopeGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_PrivateLinkScopeCreate() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/privateLinkScope/PrivateLinkScopes_Create.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateLinkScope/PrivateLinkScopes_Create.json // this example is just showing the usage of "PrivateLinkScopes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -198,7 +198,7 @@ public async Task CreateOrUpdate_PrivateLinkScopeCreate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_PrivateLinkScopeUpdate() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/privateLinkScope/PrivateLinkScopes_Update.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateLinkScope/PrivateLinkScopes_Update.json // this example is just showing the usage of "PrivateLinkScopes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateLinkScopeResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateLinkScopeResource.cs index f95e2984f7233..72268c0d432f2 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateLinkScopeResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_HybridComputePrivateLinkScopeResource.cs @@ -21,7 +21,7 @@ public partial class Sample_HybridComputePrivateLinkScopeResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetHybridComputePrivateLinkScopes_PrivateLinkScopesListJson() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/privateLinkScope/PrivateLinkScopes_List.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateLinkScope/PrivateLinkScopes_List.json // this example is just showing the usage of "PrivateLinkScopes_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task GetHybridComputePrivateLinkScopes_PrivateLinkScopesListJson() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_PrivateLinkScopesDelete() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/privateLinkScope/PrivateLinkScopes_Delete.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateLinkScope/PrivateLinkScopes_Delete.json // this example is just showing the usage of "PrivateLinkScopes_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Delete_PrivateLinkScopesDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_PrivateLinkScopeGet() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/privateLinkScope/PrivateLinkScopes_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateLinkScope/PrivateLinkScopes_Get.json // this example is just showing the usage of "PrivateLinkScopes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -111,7 +111,7 @@ public async Task Get_PrivateLinkScopeGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PrivateLinkScopeUpdateTagsOnly() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/privateLinkScope/PrivateLinkScopes_UpdateTagsOnly.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateLinkScope/PrivateLinkScopes_UpdateTagsOnly.json // this example is just showing the usage of "PrivateLinkScopes_UpdateTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -150,7 +150,7 @@ public async Task Update_PrivateLinkScopeUpdateTagsOnly() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetValidationDetailsPrivateLinkScope_PrivateLinkScopeGet() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/privateLinkScope/PrivateLinkScopes_GetValidation.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/privateLinkScope/PrivateLinkScopes_GetValidation.json // this example is just showing the usage of "PrivateLinkScopes_GetValidationDetails" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_MachineRunCommandCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_MachineRunCommandCollection.cs index 3a19e1859f6be..6a33a25bedc1d 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_MachineRunCommandCollection.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_MachineRunCommandCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineRunCommandCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateARunCommand() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/runCommand/RunCommands_CreateOrUpdate.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/runCommand/RunCommands_CreateOrUpdate.json // this example is just showing the usage of "MachineRunCommands_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -73,7 +73,7 @@ public async Task CreateOrUpdate_CreateOrUpdateARunCommand() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetARunCommand() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/runCommand/RunCommands_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/runCommand/RunCommands_Get.json // this example is just showing the usage of "MachineRunCommands_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -108,7 +108,7 @@ public async Task Get_GetARunCommand() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetARunCommand() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/runCommand/RunCommands_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/runCommand/RunCommands_Get.json // this example is just showing the usage of "MachineRunCommands_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -139,7 +139,7 @@ public async Task Exists_GetARunCommand() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetARunCommand() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/runCommand/RunCommands_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/runCommand/RunCommands_Get.json // this example is just showing the usage of "MachineRunCommands_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -182,7 +182,7 @@ public async Task GetIfExists_GetARunCommand() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GETAllMachineRunCommands() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/runCommand/RunCommands_List.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/runCommand/RunCommands_List.json // this example is just showing the usage of "MachineRunCommands_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_MachineRunCommandResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_MachineRunCommandResource.cs index 829f71c3ee33f..54a5b34be7461 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_MachineRunCommandResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_MachineRunCommandResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineRunCommandResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateARunCommand() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/runCommand/RunCommands_CreateOrUpdate.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/runCommand/RunCommands_CreateOrUpdate.json // this example is just showing the usage of "MachineRunCommands_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -70,7 +70,7 @@ public async Task Update_CreateOrUpdateARunCommand() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteAMachineRunCommand() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/runCommand/RunCommands_Delete.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/runCommand/RunCommands_Delete.json // this example is just showing the usage of "MachineRunCommands_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -98,7 +98,7 @@ public async Task Delete_DeleteAMachineRunCommand() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetARunCommand() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/runCommand/RunCommands_Get.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/runCommand/RunCommands_Get.json // this example is just showing the usage of "MachineRunCommands_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_NetworkSecurityPerimeterConfigurationCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_NetworkSecurityPerimeterConfigurationCollection.cs index 2b437207d744f..aaf9fa758c931 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_NetworkSecurityPerimeterConfigurationCollection.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_NetworkSecurityPerimeterConfigurationCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_NetworkSecurityPerimeterConfigurationCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsTheNetworkSecurityPerimeterConfigurationOfThePrivateLinkScope() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationGet.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationGet.json // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_GetByPrivateLinkScope" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_GetsTheNetworkSecurityPerimeterConfigurationOfThePrivateLi [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetsTheNetworkSecurityPerimeterConfigurationOfThePrivateLinkScope() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationGet.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationGet.json // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_GetByPrivateLinkScope" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Exists_GetsTheNetworkSecurityPerimeterConfigurationOfThePrivat [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetsTheNetworkSecurityPerimeterConfigurationOfThePrivateLinkScope() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationGet.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationGet.json // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_GetByPrivateLinkScope" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,7 +128,7 @@ public async Task GetIfExists_GetsTheNetworkSecurityPerimeterConfigurationOfTheP [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetsTheListOfNetworkSecurityPerimeterConfigurationsOfThePrivateLinkScope() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationList.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationList.json // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_ListByPrivateLinkScope" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_NetworkSecurityPerimeterConfigurationResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_NetworkSecurityPerimeterConfigurationResource.cs index d9f47f51b85c1..e33394f7fccc9 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_NetworkSecurityPerimeterConfigurationResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_NetworkSecurityPerimeterConfigurationResource.cs @@ -19,7 +19,7 @@ public partial class Sample_NetworkSecurityPerimeterConfigurationResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsTheNetworkSecurityPerimeterConfigurationOfThePrivateLinkScope() { - // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationGet.json + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationGet.json // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_GetByPrivateLinkScope" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs new file mode 100644 index 0000000000000..447dfa6793767 --- /dev/null +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.HybridCompute.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.HybridCompute.Samples +{ + public partial class Sample_ResourceGroupResourceExtensions + { + // SettingsUpdate + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task UpdateTargetResourceSetting_SettingsUpdate() + { + // Generated from example definition: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-05-20-preview/examples/settings/SettingsUpdate.json + // this example is just showing the usage of "Settings_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "hybridRG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // invoke the operation + string baseProvider = "Microsoft.HybridCompute"; + string baseResourceType = "machines"; + string baseResourceName = "testMachine"; + string settingsResourceName = "default"; + HybridComputeTargetResourceSettings hybridComputeTargetResourceSettings = new HybridComputeTargetResourceSettings() + { + GatewayResourceId = new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/gateways/newGateway"), + }; + HybridComputeTargetResourceSettings result = await resourceGroupResource.UpdateTargetResourceSettingAsync(baseProvider, baseResourceType, baseResourceName, settingsResourceName, hybridComputeTargetResourceSettings); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/ArmHybridComputeModelFactory.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/ArmHybridComputeModelFactory.cs index 062b3923a067b..474aa1f9274ba 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/ArmHybridComputeModelFactory.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/ArmHybridComputeModelFactory.cs @@ -82,6 +82,37 @@ public static HybridComputeOSProfile HybridComputeOSProfile(string computerName return new HybridComputeOSProfile(computerName, windowsConfiguration, linuxConfiguration, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// Specifies the assessment mode. + /// Specifies the patch mode. + /// Captures the hotpatch capability enrollment intent of the customers, which enables customers to patch their Windows machines without requiring a reboot. + /// Status of the hotpatch capability enrollment or disenrollment. + /// A new instance for mocking. + public static HybridComputeWindowsConfiguration HybridComputeWindowsConfiguration(AssessmentModeType? assessmentMode = null, PatchModeType? patchMode = null, bool? isHotpatchingEnabled = null, HybridComputePatchSettingsStatus status = null) + { + return new HybridComputeWindowsConfiguration(assessmentMode, patchMode, isHotpatchingEnabled, status, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Indicates the current status of the hotpatch being enabled or disabled. + /// The errors that were encountered during the hotpatch capability enrollment or disenrollment. + /// A new instance for mocking. + public static HybridComputePatchSettingsStatus HybridComputePatchSettingsStatus(HotpatchEnablementStatus? hotpatchEnablementStatus = null, ResponseError error = null) + { + return new HybridComputePatchSettingsStatus(hotpatchEnablementStatus, error, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Specifies the assessment mode. + /// Specifies the patch mode. + /// Captures the hotpatch capability enrollment intent of the customers, which enables customers to patch their Windows machines without requiring a reboot. + /// Status of the hotpatch capability enrollment or disenrollment. + /// A new instance for mocking. + public static HybridComputeLinuxConfiguration HybridComputeLinuxConfiguration(AssessmentModeType? assessmentMode = null, PatchModeType? patchMode = null, bool? isHotpatchingEnabled = null, HybridComputePatchSettingsStatus status = null) + { + return new HybridComputeLinuxConfiguration(assessmentMode, patchMode, isHotpatchingEnabled, status, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// Specifies the version info w.r.t AgentUpgrade for the machine. /// The correlation ID passed in from RSM per upgrade. @@ -243,13 +274,15 @@ public static HybridComputeConfigurationExtension HybridComputeConfigurationExte /// Properties for the Machine ESU profile. /// Indicates the subscription status of the product. /// Indicates the product type of the license. - /// The timestamp in UTC when the billing starts. /// The timestamp in UTC when the user enrolls the feature. + /// The timestamp in UTC when the billing starts. /// The timestamp in UTC when the user disenrolled the feature. + /// The timestamp in UTC when the billing ends. + /// The errors that were encountered during the feature enrollment or disenrollment. /// The list of product features. /// Specifies if this machine is licensed as part of a Software Assurance agreement. /// A new instance for mocking. - public static LicenseProfileMachineInstanceView LicenseProfileMachineInstanceView(HybridComputeLicenseStatus? licenseStatus = null, string licenseChannel = null, LicenseProfileMachineInstanceViewEsuProperties esuProfile = null, LicenseProfileSubscriptionStatus? subscriptionStatus = null, LicenseProfileProductType? productType = null, DateTimeOffset? billingStartOn = null, DateTimeOffset? enrollmentOn = null, DateTimeOffset? disenrollmentOn = null, IEnumerable productFeatures = null, bool? isSoftwareAssuranceCustomer = null) + public static LicenseProfileMachineInstanceView LicenseProfileMachineInstanceView(HybridComputeLicenseStatus? licenseStatus = null, string licenseChannel = null, LicenseProfileMachineInstanceViewEsuProperties esuProfile = null, LicenseProfileSubscriptionStatus? subscriptionStatus = null, LicenseProfileProductType? productType = null, DateTimeOffset? enrollmentOn = null, DateTimeOffset? billingStartOn = null, DateTimeOffset? disenrollmentOn = null, DateTimeOffset? billingEndOn = null, ResponseError error = null, IEnumerable productFeatures = null, bool? isSoftwareAssuranceCustomer = null) { productFeatures ??= new List(); @@ -259,9 +292,11 @@ public static LicenseProfileMachineInstanceView LicenseProfileMachineInstanceVie esuProfile, subscriptionStatus, productType, - billingStartOn, enrollmentOn, + billingStartOn, disenrollmentOn, + billingEndOn, + error, productFeatures?.ToList(), isSoftwareAssuranceCustomer, serializedAdditionalRawData: null); @@ -334,18 +369,22 @@ public static EsuKey EsuKey(string sku = null, int? licenseStatus = null) /// Initializes a new instance of . /// Product feature name. /// Indicates the current status of the product features. - /// The timestamp in UTC when the billing starts. /// The timestamp in UTC when the user enrolls the feature. + /// The timestamp in UTC when the billing starts. /// The timestamp in UTC when the user disenrolled the feature. + /// The timestamp in UTC when the billing ends. + /// The errors that were encountered during the feature enrollment or disenrollment. /// A new instance for mocking. - public static HybridComputeProductFeature HybridComputeProductFeature(string name = null, LicenseProfileSubscriptionStatus? subscriptionStatus = null, DateTimeOffset? billingStartOn = null, DateTimeOffset? enrollmentOn = null, DateTimeOffset? disenrollmentOn = null) + public static HybridComputeProductFeature HybridComputeProductFeature(string name = null, LicenseProfileSubscriptionStatus? subscriptionStatus = null, DateTimeOffset? enrollmentOn = null, DateTimeOffset? billingStartOn = null, DateTimeOffset? disenrollmentOn = null, DateTimeOffset? billingEndOn = null, ResponseError error = null) { return new HybridComputeProductFeature( name, subscriptionStatus, - billingStartOn, enrollmentOn, + billingStartOn, disenrollmentOn, + billingEndOn, + error, serializedAdditionalRawData: null); } @@ -653,6 +692,59 @@ public static ExtensionsResourceStatus ExtensionsResourceStatus(string code = nu serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The provisioning state, which only appears in the response. + /// A unique, immutable, identifier for the Gateway. + /// The type of the Gateway resource. + /// The endpoint fqdn for the Gateway. + /// Specifies the list of features that are enabled for this Gateway. + /// A new instance for mocking. + public static HybridComputeGatewayData HybridComputeGatewayData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, HybridComputeProvisioningState? provisioningState = null, string gatewayId = null, HybridComputeGatewayType? gatewayType = null, string gatewayEndpoint = null, IEnumerable allowedFeatures = null) + { + tags ??= new Dictionary(); + allowedFeatures ??= new List(); + + return new HybridComputeGatewayData( + id, + name, + resourceType, + systemData, + tags, + location, + provisioningState, + gatewayId, + gatewayType, + gatewayEndpoint, + allowedFeatures?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Azure resource tenant Id. + /// Associated Gateway Resource Id. + /// A new instance for mocking. + public static HybridComputeTargetResourceSettings HybridComputeTargetResourceSettings(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, Guid? tenantId = null, ResourceIdentifier gatewayResourceId = null) + { + return new HybridComputeTargetResourceSettings( + id, + name, + resourceType, + systemData, + tenantId, + gatewayResourceId, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Extensions/HybridComputeExtensions.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Extensions/HybridComputeExtensions.cs index 9180956cd60e5..ee672734bf273 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Extensions/HybridComputeExtensions.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Extensions/HybridComputeExtensions.cs @@ -128,6 +128,25 @@ public static MachineRunCommandResource GetMachineRunCommandResource(this ArmCli return GetMockableHybridComputeArmClient(client).GetMachineRunCommandResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static HybridComputeGatewayResource GetHybridComputeGatewayResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableHybridComputeArmClient(client).GetHybridComputeGatewayResource(id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -234,7 +253,7 @@ public static HybridComputeLicenseCollection GetHybridComputeLicenses(this Resou /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -272,7 +291,7 @@ public static async Task> GetHybridComput /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -327,7 +346,7 @@ public static HybridComputeMachineCollection GetHybridComputeMachines(this Resou /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -366,7 +385,7 @@ public static async Task> GetHybridComput /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -392,6 +411,99 @@ public static Response GetHybridComputeMachine(thi return GetMockableHybridComputeResourceGroupResource(resourceGroupResource).GetHybridComputeMachine(machineName, expand, cancellationToken); } + /// + /// Gets a collection of HybridComputeGatewayResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of HybridComputeGatewayResources and their operations over a HybridComputeGatewayResource. + public static HybridComputeGatewayCollection GetHybridComputeGateways(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableHybridComputeResourceGroupResource(resourceGroupResource).GetHybridComputeGateways(); + } + + /// + /// Retrieves information about the view of a gateway. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} + /// + /// + /// Operation Id + /// Gateways_Get + /// + /// + /// Default Api Version + /// 2024-05-20-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Gateway. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetHybridComputeGatewayAsync(this ResourceGroupResource resourceGroupResource, string gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableHybridComputeResourceGroupResource(resourceGroupResource).GetHybridComputeGatewayAsync(gatewayName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Retrieves information about the view of a gateway. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} + /// + /// + /// Operation Id + /// Gateways_Get + /// + /// + /// Default Api Version + /// 2024-05-20-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Gateway. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetHybridComputeGateway(this ResourceGroupResource resourceGroupResource, string gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableHybridComputeResourceGroupResource(resourceGroupResource).GetHybridComputeGateway(gatewayName, cancellationToken); + } + /// /// Gets a collection of HybridComputePrivateLinkScopeResources in the ResourceGroupResource. /// @@ -422,7 +534,7 @@ public static HybridComputePrivateLinkScopeCollection GetHybridComputePrivateLin /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -460,7 +572,7 @@ public static async Task> GetHyb /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -485,6 +597,80 @@ public static Response GetHybridComputePr return GetMockableHybridComputeResourceGroupResource(resourceGroupResource).GetHybridComputePrivateLinkScope(scopeName, cancellationToken); } + /// + /// Updates the base Settings of the target resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{baseProvider}/{baseResourceType}/{baseResourceName}/providers/Microsoft.HybridCompute/settings/{settingsResourceName} + /// + /// + /// Operation Id + /// Settings_Update + /// + /// + /// Default Api Version + /// 2024-05-20-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the base Resource Provider. + /// The name of the base Resource Type. + /// The name of the base resource. + /// The name of the settings resource. + /// Settings details. + /// The cancellation token to use. + /// , , or is an empty string, and was expected to be non-empty. + /// , , , , or is null. + public static async Task> UpdateTargetResourceSettingAsync(this ResourceGroupResource resourceGroupResource, string baseProvider, string baseResourceType, string baseResourceName, string settingsResourceName, HybridComputeTargetResourceSettings hybridComputeTargetResourceSettings, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableHybridComputeResourceGroupResource(resourceGroupResource).UpdateTargetResourceSettingAsync(baseProvider, baseResourceType, baseResourceName, settingsResourceName, hybridComputeTargetResourceSettings, cancellationToken).ConfigureAwait(false); + } + + /// + /// Updates the base Settings of the target resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{baseProvider}/{baseResourceType}/{baseResourceName}/providers/Microsoft.HybridCompute/settings/{settingsResourceName} + /// + /// + /// Operation Id + /// Settings_Update + /// + /// + /// Default Api Version + /// 2024-05-20-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the base Resource Provider. + /// The name of the base Resource Type. + /// The name of the base resource. + /// The name of the settings resource. + /// Settings details. + /// The cancellation token to use. + /// , , or is an empty string, and was expected to be non-empty. + /// , , , , or is null. + public static Response UpdateTargetResourceSetting(this ResourceGroupResource resourceGroupResource, string baseProvider, string baseResourceType, string baseResourceName, string settingsResourceName, HybridComputeTargetResourceSettings hybridComputeTargetResourceSettings, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableHybridComputeResourceGroupResource(resourceGroupResource).UpdateTargetResourceSetting(baseProvider, baseResourceType, baseResourceName, settingsResourceName, hybridComputeTargetResourceSettings, cancellationToken); + } + /// /// Gets a collection of HybridComputeExtensionValueResources in the SubscriptionResource. /// @@ -519,7 +705,7 @@ public static HybridComputeExtensionValueCollection GetHybridComputeExtensionVal /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -560,7 +746,7 @@ public static async Task> GetHybri /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -601,7 +787,7 @@ public static Response GetHybridComputeExte /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -637,7 +823,7 @@ public static AsyncPageable GetHybridComputeLicens /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -673,7 +859,7 @@ public static Pageable GetHybridComputeLicenses(th /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -709,7 +895,7 @@ public static AsyncPageable GetHybridComputeMachin /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -732,6 +918,78 @@ public static Pageable GetHybridComputeMachines(th return GetMockableHybridComputeSubscriptionResource(subscriptionResource).GetHybridComputeMachines(cancellationToken); } + /// + /// The operation to get all gateways of a non-Azure machine + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/gateways + /// + /// + /// Operation Id + /// Gateways_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-05-20-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetHybridComputeGatewaysAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableHybridComputeSubscriptionResource(subscriptionResource).GetHybridComputeGatewaysAsync(cancellationToken); + } + + /// + /// The operation to get all gateways of a non-Azure machine + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/gateways + /// + /// + /// Operation Id + /// Gateways_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-05-20-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetHybridComputeGateways(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableHybridComputeSubscriptionResource(subscriptionResource).GetHybridComputeGateways(cancellationToken); + } + /// /// Gets a list of all Azure Arc PrivateLinkScopes within a subscription. /// @@ -745,7 +1003,7 @@ public static Pageable GetHybridComputeMachines(th /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -781,7 +1039,7 @@ public static AsyncPageable GetHybridComp /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -817,7 +1075,7 @@ public static Pageable GetHybridComputePr /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -855,7 +1113,7 @@ public static async Task> GetValidat /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Extensions/MockableHybridComputeArmClient.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Extensions/MockableHybridComputeArmClient.cs index a5edff4a546b8..9c6cb94a5bdd3 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Extensions/MockableHybridComputeArmClient.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Extensions/MockableHybridComputeArmClient.cs @@ -94,6 +94,18 @@ public virtual MachineRunCommandResource GetMachineRunCommandResource(ResourceId return new MachineRunCommandResource(Client, id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual HybridComputeGatewayResource GetHybridComputeGatewayResource(ResourceIdentifier id) + { + HybridComputeGatewayResource.ValidateResourceId(id); + return new HybridComputeGatewayResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Extensions/MockableHybridComputeResourceGroupResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Extensions/MockableHybridComputeResourceGroupResource.cs index afa229eef6865..187e7f2205d96 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Extensions/MockableHybridComputeResourceGroupResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Extensions/MockableHybridComputeResourceGroupResource.cs @@ -9,12 +9,17 @@ using System.Threading; using System.Threading.Tasks; using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.HybridCompute.Models; namespace Azure.ResourceManager.HybridCompute.Mocking { /// A class to add extension methods to ResourceGroupResource. public partial class MockableHybridComputeResourceGroupResource : ArmResource { + private ClientDiagnostics _settingsClientDiagnostics; + private SettingsRestOperations _settingsRestClient; + /// Initializes a new instance of the class for mocking. protected MockableHybridComputeResourceGroupResource() { @@ -27,6 +32,9 @@ internal MockableHybridComputeResourceGroupResource(ArmClient client, ResourceId { } + private ClientDiagnostics SettingsClientDiagnostics => _settingsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.HybridCompute", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private SettingsRestOperations SettingsRestClient => _settingsRestClient ??= new SettingsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + private string GetApiVersionOrNull(ResourceType resourceType) { TryGetApiVersion(resourceType, out string apiVersion); @@ -53,7 +61,7 @@ public virtual HybridComputeLicenseCollection GetHybridComputeLicenses() /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -84,7 +92,7 @@ public virtual async Task> GetHybridCompu /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -122,7 +130,7 @@ public virtual HybridComputeMachineCollection GetHybridComputeMachines() /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -154,7 +162,7 @@ public virtual async Task> GetHybridCompu /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -173,6 +181,75 @@ public virtual Response GetHybridComputeMachine(st return GetHybridComputeMachines().Get(machineName, expand, cancellationToken); } + /// Gets a collection of HybridComputeGatewayResources in the ResourceGroupResource. + /// An object representing collection of HybridComputeGatewayResources and their operations over a HybridComputeGatewayResource. + public virtual HybridComputeGatewayCollection GetHybridComputeGateways() + { + return GetCachedClient(client => new HybridComputeGatewayCollection(client, Id)); + } + + /// + /// Retrieves information about the view of a gateway. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} + /// + /// + /// Operation Id + /// Gateways_Get + /// + /// + /// Default Api Version + /// 2024-05-20-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Gateway. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetHybridComputeGatewayAsync(string gatewayName, CancellationToken cancellationToken = default) + { + return await GetHybridComputeGateways().GetAsync(gatewayName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Retrieves information about the view of a gateway. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} + /// + /// + /// Operation Id + /// Gateways_Get + /// + /// + /// Default Api Version + /// 2024-05-20-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Gateway. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetHybridComputeGateway(string gatewayName, CancellationToken cancellationToken = default) + { + return GetHybridComputeGateways().Get(gatewayName, cancellationToken); + } + /// Gets a collection of HybridComputePrivateLinkScopeResources in the ResourceGroupResource. /// An object representing collection of HybridComputePrivateLinkScopeResources and their operations over a HybridComputePrivateLinkScopeResource. public virtual HybridComputePrivateLinkScopeCollection GetHybridComputePrivateLinkScopes() @@ -193,7 +270,7 @@ public virtual HybridComputePrivateLinkScopeCollection GetHybridComputePrivateLi /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -224,7 +301,7 @@ public virtual async Task> GetHy /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -241,5 +318,99 @@ public virtual Response GetHybridComputeP { return GetHybridComputePrivateLinkScopes().Get(scopeName, cancellationToken); } + + /// + /// Updates the base Settings of the target resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{baseProvider}/{baseResourceType}/{baseResourceName}/providers/Microsoft.HybridCompute/settings/{settingsResourceName} + /// + /// + /// Operation Id + /// Settings_Update + /// + /// + /// Default Api Version + /// 2024-05-20-preview + /// + /// + /// + /// The name of the base Resource Provider. + /// The name of the base Resource Type. + /// The name of the base resource. + /// The name of the settings resource. + /// Settings details. + /// The cancellation token to use. + /// , , or is an empty string, and was expected to be non-empty. + /// , , , or is null. + public virtual async Task> UpdateTargetResourceSettingAsync(string baseProvider, string baseResourceType, string baseResourceName, string settingsResourceName, HybridComputeTargetResourceSettings hybridComputeTargetResourceSettings, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(baseProvider, nameof(baseProvider)); + Argument.AssertNotNullOrEmpty(baseResourceType, nameof(baseResourceType)); + Argument.AssertNotNullOrEmpty(baseResourceName, nameof(baseResourceName)); + Argument.AssertNotNullOrEmpty(settingsResourceName, nameof(settingsResourceName)); + Argument.AssertNotNull(hybridComputeTargetResourceSettings, nameof(hybridComputeTargetResourceSettings)); + + using var scope = SettingsClientDiagnostics.CreateScope("MockableHybridComputeResourceGroupResource.UpdateTargetResourceSetting"); + scope.Start(); + try + { + var response = await SettingsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, baseProvider, baseResourceType, baseResourceName, settingsResourceName, hybridComputeTargetResourceSettings, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the base Settings of the target resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{baseProvider}/{baseResourceType}/{baseResourceName}/providers/Microsoft.HybridCompute/settings/{settingsResourceName} + /// + /// + /// Operation Id + /// Settings_Update + /// + /// + /// Default Api Version + /// 2024-05-20-preview + /// + /// + /// + /// The name of the base Resource Provider. + /// The name of the base Resource Type. + /// The name of the base resource. + /// The name of the settings resource. + /// Settings details. + /// The cancellation token to use. + /// , , or is an empty string, and was expected to be non-empty. + /// , , , or is null. + public virtual Response UpdateTargetResourceSetting(string baseProvider, string baseResourceType, string baseResourceName, string settingsResourceName, HybridComputeTargetResourceSettings hybridComputeTargetResourceSettings, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(baseProvider, nameof(baseProvider)); + Argument.AssertNotNullOrEmpty(baseResourceType, nameof(baseResourceType)); + Argument.AssertNotNullOrEmpty(baseResourceName, nameof(baseResourceName)); + Argument.AssertNotNullOrEmpty(settingsResourceName, nameof(settingsResourceName)); + Argument.AssertNotNull(hybridComputeTargetResourceSettings, nameof(hybridComputeTargetResourceSettings)); + + using var scope = SettingsClientDiagnostics.CreateScope("MockableHybridComputeResourceGroupResource.UpdateTargetResourceSetting"); + scope.Start(); + try + { + var response = SettingsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, baseProvider, baseResourceType, baseResourceName, settingsResourceName, hybridComputeTargetResourceSettings, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Extensions/MockableHybridComputeSubscriptionResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Extensions/MockableHybridComputeSubscriptionResource.cs index f15954a80e232..adeda6adbf35e 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Extensions/MockableHybridComputeSubscriptionResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Extensions/MockableHybridComputeSubscriptionResource.cs @@ -22,6 +22,8 @@ public partial class MockableHybridComputeSubscriptionResource : ArmResource private LicensesRestOperations _hybridComputeLicenseLicensesRestClient; private ClientDiagnostics _hybridComputeMachineMachinesClientDiagnostics; private MachinesRestOperations _hybridComputeMachineMachinesRestClient; + private ClientDiagnostics _hybridComputeGatewayGatewaysClientDiagnostics; + private GatewaysRestOperations _hybridComputeGatewayGatewaysRestClient; private ClientDiagnostics _hybridComputePrivateLinkScopePrivateLinkScopesClientDiagnostics; private PrivateLinkScopesRestOperations _hybridComputePrivateLinkScopePrivateLinkScopesRestClient; @@ -41,6 +43,8 @@ internal MockableHybridComputeSubscriptionResource(ArmClient client, ResourceIde private LicensesRestOperations HybridComputeLicenseLicensesRestClient => _hybridComputeLicenseLicensesRestClient ??= new LicensesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(HybridComputeLicenseResource.ResourceType)); private ClientDiagnostics HybridComputeMachineMachinesClientDiagnostics => _hybridComputeMachineMachinesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.HybridCompute", HybridComputeMachineResource.ResourceType.Namespace, Diagnostics); private MachinesRestOperations HybridComputeMachineMachinesRestClient => _hybridComputeMachineMachinesRestClient ??= new MachinesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(HybridComputeMachineResource.ResourceType)); + private ClientDiagnostics HybridComputeGatewayGatewaysClientDiagnostics => _hybridComputeGatewayGatewaysClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.HybridCompute", HybridComputeGatewayResource.ResourceType.Namespace, Diagnostics); + private GatewaysRestOperations HybridComputeGatewayGatewaysRestClient => _hybridComputeGatewayGatewaysRestClient ??= new GatewaysRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(HybridComputeGatewayResource.ResourceType)); private ClientDiagnostics HybridComputePrivateLinkScopePrivateLinkScopesClientDiagnostics => _hybridComputePrivateLinkScopePrivateLinkScopesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.HybridCompute", HybridComputePrivateLinkScopeResource.ResourceType.Namespace, Diagnostics); private PrivateLinkScopesRestOperations HybridComputePrivateLinkScopePrivateLinkScopesRestClient => _hybridComputePrivateLinkScopePrivateLinkScopesRestClient ??= new PrivateLinkScopesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(HybridComputePrivateLinkScopeResource.ResourceType)); @@ -75,7 +79,7 @@ public virtual HybridComputeExtensionValueCollection GetHybridComputeExtensionVa /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -109,7 +113,7 @@ public virtual async Task> GetHybr /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -143,7 +147,7 @@ public virtual Response GetHybridComputeExt /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -173,7 +177,7 @@ public virtual AsyncPageable GetHybridComputeLicen /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -203,7 +207,7 @@ public virtual Pageable GetHybridComputeLicenses(C /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -233,7 +237,7 @@ public virtual AsyncPageable GetHybridComputeMachi /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -250,6 +254,66 @@ public virtual Pageable GetHybridComputeMachines(C return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new HybridComputeMachineResource(Client, HybridComputeMachineData.DeserializeHybridComputeMachineData(e)), HybridComputeMachineMachinesClientDiagnostics, Pipeline, "MockableHybridComputeSubscriptionResource.GetHybridComputeMachines", "value", "nextLink", cancellationToken); } + /// + /// The operation to get all gateways of a non-Azure machine + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/gateways + /// + /// + /// Operation Id + /// Gateways_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-05-20-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetHybridComputeGatewaysAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => HybridComputeGatewayGatewaysRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => HybridComputeGatewayGatewaysRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new HybridComputeGatewayResource(Client, HybridComputeGatewayData.DeserializeHybridComputeGatewayData(e)), HybridComputeGatewayGatewaysClientDiagnostics, Pipeline, "MockableHybridComputeSubscriptionResource.GetHybridComputeGateways", "value", "nextLink", cancellationToken); + } + + /// + /// The operation to get all gateways of a non-Azure machine + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/gateways + /// + /// + /// Operation Id + /// Gateways_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-05-20-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetHybridComputeGateways(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => HybridComputeGatewayGatewaysRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => HybridComputeGatewayGatewaysRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new HybridComputeGatewayResource(Client, HybridComputeGatewayData.DeserializeHybridComputeGatewayData(e)), HybridComputeGatewayGatewaysClientDiagnostics, Pipeline, "MockableHybridComputeSubscriptionResource.GetHybridComputeGateways", "value", "nextLink", cancellationToken); + } + /// /// Gets a list of all Azure Arc PrivateLinkScopes within a subscription. /// @@ -263,7 +327,7 @@ public virtual Pageable GetHybridComputeMachines(C /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -293,7 +357,7 @@ public virtual AsyncPageable GetHybridCom /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -323,7 +387,7 @@ public virtual Pageable GetHybridComputeP /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -367,7 +431,7 @@ public virtual async Task> GetValida /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeExtensionValueCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeExtensionValueCollection.cs index 3865fb3af2ec0..805cb45af6ba4 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeExtensionValueCollection.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeExtensionValueCollection.cs @@ -76,7 +76,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -121,7 +121,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -166,7 +166,7 @@ public virtual Response Get(string version, /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -195,7 +195,7 @@ public virtual AsyncPageable GetAllAsync(Ca /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -224,7 +224,7 @@ public virtual Pageable GetAll(Cancellation /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -267,7 +267,7 @@ public virtual async Task> ExistsAsync(string version, Cancellati /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -310,7 +310,7 @@ public virtual Response Exists(string version, CancellationToken cancellat /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeExtensionValueData.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeExtensionValueData.Serialization.cs index 7ab655eebbe34..28cb1ed8a5db5 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeExtensionValueData.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeExtensionValueData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -182,6 +183,146 @@ internal static HybridComputeExtensionValueData DeserializeHybridComputeExtensio serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Version), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" version: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Version)) + { + builder.Append(" version: "); + if (Version.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Version}'''"); + } + else + { + builder.AppendLine($"'{Version}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExtensionType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" extensionType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ExtensionType)) + { + builder.Append(" extensionType: "); + if (ExtensionType.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ExtensionType}'''"); + } + else + { + builder.AppendLine($"'{ExtensionType}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Publisher), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" publisher: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Publisher)) + { + builder.Append(" publisher: "); + if (Publisher.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Publisher}'''"); + } + else + { + builder.AppendLine($"'{Publisher}'"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -190,6 +331,8 @@ BinaryData IPersistableModel.Write(ModelReaderW { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(HybridComputeExtensionValueData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeExtensionValueData.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeExtensionValueData.cs index f37407fdbb7c3..5e9928bfe1b59 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeExtensionValueData.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeExtensionValueData.cs @@ -51,7 +51,7 @@ public partial class HybridComputeExtensionValueData : ResourceData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal HybridComputeExtensionValueData() + public HybridComputeExtensionValueData() { } @@ -73,10 +73,13 @@ internal HybridComputeExtensionValueData(ResourceIdentifier id, string name, Res } /// The version of the Extension being received. + [WirePath("properties.version")] public string Version { get; } /// The type of the Extension being received. + [WirePath("properties.extensionType")] public string ExtensionType { get; } /// The publisher of the Extension being received. + [WirePath("properties.publisher")] public string Publisher { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeExtensionValueResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeExtensionValueResource.cs index c36c154dfc2dc..190328fd514ca 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeExtensionValueResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeExtensionValueResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeGatewayCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeGatewayCollection.cs new file mode 100644 index 0000000000000..9a0133660896f --- /dev/null +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeGatewayCollection.cs @@ -0,0 +1,494 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.HybridCompute +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetHybridComputeGateways method from an instance of . + /// + public partial class HybridComputeGatewayCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _hybridComputeGatewayGatewaysClientDiagnostics; + private readonly GatewaysRestOperations _hybridComputeGatewayGatewaysRestClient; + + /// Initializes a new instance of the class for mocking. + protected HybridComputeGatewayCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal HybridComputeGatewayCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _hybridComputeGatewayGatewaysClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.HybridCompute", HybridComputeGatewayResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(HybridComputeGatewayResource.ResourceType, out string hybridComputeGatewayGatewaysApiVersion); + _hybridComputeGatewayGatewaysRestClient = new GatewaysRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, hybridComputeGatewayGatewaysApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + } + + /// + /// The operation to create or update a gateway. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} + /// + /// + /// Operation Id + /// Gateways_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-05-20-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the Gateway. + /// Parameters supplied to the Create gateway operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string gatewayName, HybridComputeGatewayData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _hybridComputeGatewayGatewaysRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, gatewayName, data, cancellationToken).ConfigureAwait(false); + var operation = new HybridComputeArmOperation(new HybridComputeGatewayOperationSource(Client), _hybridComputeGatewayGatewaysClientDiagnostics, Pipeline, _hybridComputeGatewayGatewaysRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, gatewayName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// The operation to create or update a gateway. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} + /// + /// + /// Operation Id + /// Gateways_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-05-20-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the Gateway. + /// Parameters supplied to the Create gateway operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string gatewayName, HybridComputeGatewayData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _hybridComputeGatewayGatewaysRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, gatewayName, data, cancellationToken); + var operation = new HybridComputeArmOperation(new HybridComputeGatewayOperationSource(Client), _hybridComputeGatewayGatewaysClientDiagnostics, Pipeline, _hybridComputeGatewayGatewaysRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, gatewayName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Retrieves information about the view of a gateway. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} + /// + /// + /// Operation Id + /// Gateways_Get + /// + /// + /// Default Api Version + /// 2024-05-20-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Gateway. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + + using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayCollection.Get"); + scope.Start(); + try + { + var response = await _hybridComputeGatewayGatewaysRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, gatewayName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new HybridComputeGatewayResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Retrieves information about the view of a gateway. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} + /// + /// + /// Operation Id + /// Gateways_Get + /// + /// + /// Default Api Version + /// 2024-05-20-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Gateway. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + + using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayCollection.Get"); + scope.Start(); + try + { + var response = _hybridComputeGatewayGatewaysRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, gatewayName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new HybridComputeGatewayResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// The operation to get all gateways of a non-Azure machine + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways + /// + /// + /// Operation Id + /// Gateways_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2024-05-20-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _hybridComputeGatewayGatewaysRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _hybridComputeGatewayGatewaysRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new HybridComputeGatewayResource(Client, HybridComputeGatewayData.DeserializeHybridComputeGatewayData(e)), _hybridComputeGatewayGatewaysClientDiagnostics, Pipeline, "HybridComputeGatewayCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// The operation to get all gateways of a non-Azure machine + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways + /// + /// + /// Operation Id + /// Gateways_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2024-05-20-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _hybridComputeGatewayGatewaysRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _hybridComputeGatewayGatewaysRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new HybridComputeGatewayResource(Client, HybridComputeGatewayData.DeserializeHybridComputeGatewayData(e)), _hybridComputeGatewayGatewaysClientDiagnostics, Pipeline, "HybridComputeGatewayCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} + /// + /// + /// Operation Id + /// Gateways_Get + /// + /// + /// Default Api Version + /// 2024-05-20-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Gateway. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + + using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayCollection.Exists"); + scope.Start(); + try + { + var response = await _hybridComputeGatewayGatewaysRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, gatewayName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} + /// + /// + /// Operation Id + /// Gateways_Get + /// + /// + /// Default Api Version + /// 2024-05-20-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Gateway. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + + using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayCollection.Exists"); + scope.Start(); + try + { + var response = _hybridComputeGatewayGatewaysRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, gatewayName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} + /// + /// + /// Operation Id + /// Gateways_Get + /// + /// + /// Default Api Version + /// 2024-05-20-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Gateway. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + + using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _hybridComputeGatewayGatewaysRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, gatewayName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new HybridComputeGatewayResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} + /// + /// + /// Operation Id + /// Gateways_Get + /// + /// + /// Default Api Version + /// 2024-05-20-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Gateway. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + + using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayCollection.GetIfExists"); + scope.Start(); + try + { + var response = _hybridComputeGatewayGatewaysRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, gatewayName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new HybridComputeGatewayResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeGatewayData.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeGatewayData.Serialization.cs new file mode 100644 index 0000000000000..3227339456643 --- /dev/null +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeGatewayData.Serialization.cs @@ -0,0 +1,535 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.HybridCompute.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.HybridCompute +{ + public partial class HybridComputeGatewayData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HybridComputeGatewayData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(GatewayId)) + { + writer.WritePropertyName("gatewayId"u8); + writer.WriteStringValue(GatewayId); + } + if (Optional.IsDefined(GatewayType)) + { + writer.WritePropertyName("gatewayType"u8); + writer.WriteStringValue(GatewayType.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(GatewayEndpoint)) + { + writer.WritePropertyName("gatewayEndpoint"u8); + writer.WriteStringValue(GatewayEndpoint); + } + if (Optional.IsCollectionDefined(AllowedFeatures)) + { + writer.WritePropertyName("allowedFeatures"u8); + writer.WriteStartArray(); + foreach (var item in AllowedFeatures) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + HybridComputeGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HybridComputeGatewayData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeHybridComputeGatewayData(document.RootElement, options); + } + + internal static HybridComputeGatewayData DeserializeHybridComputeGatewayData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + HybridComputeProvisioningState? provisioningState = default; + string gatewayId = default; + HybridComputeGatewayType? gatewayType = default; + string gatewayEndpoint = default; + IList allowedFeatures = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new HybridComputeProvisioningState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("gatewayId"u8)) + { + gatewayId = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("gatewayType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + gatewayType = new HybridComputeGatewayType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("gatewayEndpoint"u8)) + { + gatewayEndpoint = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("allowedFeatures"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + allowedFeatures = array; + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new HybridComputeGatewayData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + provisioningState, + gatewayId, + gatewayType, + gatewayEndpoint, + allowedFeatures ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" location: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" location: "); + builder.AppendLine($"'{Location.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Tags), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tags: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags.Any()) + { + builder.Append(" tags: "); + builder.AppendLine("{"); + foreach (var item in Tags) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + if (item.Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{item.Value}'''"); + } + else + { + builder.AppendLine($"'{item.Value}'"); + } + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + builder.AppendLine($"'{ProvisioningState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GatewayId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" gatewayId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(GatewayId)) + { + builder.Append(" gatewayId: "); + if (GatewayId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{GatewayId}'''"); + } + else + { + builder.AppendLine($"'{GatewayId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GatewayType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" gatewayType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(GatewayType)) + { + builder.Append(" gatewayType: "); + builder.AppendLine($"'{GatewayType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GatewayEndpoint), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" gatewayEndpoint: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(GatewayEndpoint)) + { + builder.Append(" gatewayEndpoint: "); + if (GatewayEndpoint.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{GatewayEndpoint}'''"); + } + else + { + builder.AppendLine($"'{GatewayEndpoint}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AllowedFeatures), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" allowedFeatures: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(AllowedFeatures)) + { + if (AllowedFeatures.Any()) + { + builder.Append(" allowedFeatures: "); + builder.AppendLine("["); + foreach (var item in AllowedFeatures) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(HybridComputeGatewayData)} does not support writing '{options.Format}' format."); + } + } + + HybridComputeGatewayData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeHybridComputeGatewayData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(HybridComputeGatewayData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeGatewayData.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeGatewayData.cs new file mode 100644 index 0000000000000..f4d567d6c7ef3 --- /dev/null +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeGatewayData.cs @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.HybridCompute.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.HybridCompute +{ + /// + /// A class representing the HybridComputeGateway data model. + /// Describes an Arc Gateway. + /// + public partial class HybridComputeGatewayData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public HybridComputeGatewayData(AzureLocation location) : base(location) + { + AllowedFeatures = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The provisioning state, which only appears in the response. + /// A unique, immutable, identifier for the Gateway. + /// The type of the Gateway resource. + /// The endpoint fqdn for the Gateway. + /// Specifies the list of features that are enabled for this Gateway. + /// Keeps track of any properties unknown to the library. + internal HybridComputeGatewayData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, HybridComputeProvisioningState? provisioningState, string gatewayId, HybridComputeGatewayType? gatewayType, string gatewayEndpoint, IList allowedFeatures, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + ProvisioningState = provisioningState; + GatewayId = gatewayId; + GatewayType = gatewayType; + GatewayEndpoint = gatewayEndpoint; + AllowedFeatures = allowedFeatures; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal HybridComputeGatewayData() + { + } + + /// The provisioning state, which only appears in the response. + [WirePath("properties.provisioningState")] + public HybridComputeProvisioningState? ProvisioningState { get; } + /// A unique, immutable, identifier for the Gateway. + [WirePath("properties.gatewayId")] + public string GatewayId { get; } + /// The type of the Gateway resource. + [WirePath("properties.gatewayType")] + public HybridComputeGatewayType? GatewayType { get; set; } + /// The endpoint fqdn for the Gateway. + [WirePath("properties.gatewayEndpoint")] + public string GatewayEndpoint { get; } + /// Specifies the list of features that are enabled for this Gateway. + [WirePath("properties.allowedFeatures")] + public IList AllowedFeatures { get; } + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeGatewayResource.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeGatewayResource.Serialization.cs new file mode 100644 index 0000000000000..449a75c8fb2e6 --- /dev/null +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeGatewayResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.HybridCompute +{ + public partial class HybridComputeGatewayResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + HybridComputeGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + HybridComputeGatewayData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeGatewayResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeGatewayResource.cs new file mode 100644 index 0000000000000..341b964fe557b --- /dev/null +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeGatewayResource.cs @@ -0,0 +1,699 @@ +// 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.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.HybridCompute.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.HybridCompute +{ + /// + /// A Class representing a HybridComputeGateway along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetHybridComputeGatewayResource method. + /// Otherwise you can get one from its parent resource using the GetHybridComputeGateway method. + /// + public partial class HybridComputeGatewayResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The gatewayName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string gatewayName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _hybridComputeGatewayGatewaysClientDiagnostics; + private readonly GatewaysRestOperations _hybridComputeGatewayGatewaysRestClient; + private readonly HybridComputeGatewayData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.HybridCompute/gateways"; + + /// Initializes a new instance of the class for mocking. + protected HybridComputeGatewayResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal HybridComputeGatewayResource(ArmClient client, HybridComputeGatewayData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal HybridComputeGatewayResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _hybridComputeGatewayGatewaysClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.HybridCompute", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string hybridComputeGatewayGatewaysApiVersion); + _hybridComputeGatewayGatewaysRestClient = new GatewaysRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, hybridComputeGatewayGatewaysApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual HybridComputeGatewayData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Retrieves information about the view of a gateway. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} + /// + /// + /// Operation Id + /// Gateways_Get + /// + /// + /// Default Api Version + /// 2024-05-20-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayResource.Get"); + scope.Start(); + try + { + var response = await _hybridComputeGatewayGatewaysRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new HybridComputeGatewayResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Retrieves information about the view of a gateway. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} + /// + /// + /// Operation Id + /// Gateways_Get + /// + /// + /// Default Api Version + /// 2024-05-20-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayResource.Get"); + scope.Start(); + try + { + var response = _hybridComputeGatewayGatewaysRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new HybridComputeGatewayResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// The operation to delete a gateway. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} + /// + /// + /// Operation Id + /// Gateways_Delete + /// + /// + /// Default Api Version + /// 2024-05-20-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayResource.Delete"); + scope.Start(); + try + { + var response = await _hybridComputeGatewayGatewaysRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new HybridComputeArmOperation(_hybridComputeGatewayGatewaysClientDiagnostics, Pipeline, _hybridComputeGatewayGatewaysRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// The operation to delete a gateway. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} + /// + /// + /// Operation Id + /// Gateways_Delete + /// + /// + /// Default Api Version + /// 2024-05-20-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayResource.Delete"); + scope.Start(); + try + { + var response = _hybridComputeGatewayGatewaysRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new HybridComputeArmOperation(_hybridComputeGatewayGatewaysClientDiagnostics, Pipeline, _hybridComputeGatewayGatewaysRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// The operation to update a gateway. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} + /// + /// + /// Operation Id + /// Gateways_Update + /// + /// + /// Default Api Version + /// 2024-05-20-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Parameters supplied to the Update gateway operation. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(HybridComputeGatewayPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayResource.Update"); + scope.Start(); + try + { + var response = await _hybridComputeGatewayGatewaysRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new HybridComputeGatewayResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// The operation to update a gateway. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} + /// + /// + /// Operation Id + /// Gateways_Update + /// + /// + /// Default Api Version + /// 2024-05-20-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Parameters supplied to the Update gateway operation. + /// The cancellation token to use. + /// is null. + public virtual Response Update(HybridComputeGatewayPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayResource.Update"); + scope.Start(); + try + { + var response = _hybridComputeGatewayGatewaysRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + return Response.FromValue(new HybridComputeGatewayResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} + /// + /// + /// Operation Id + /// Gateways_Get + /// + /// + /// Default Api Version + /// 2024-05-20-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _hybridComputeGatewayGatewaysRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new HybridComputeGatewayResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new HybridComputeGatewayPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} + /// + /// + /// Operation Id + /// Gateways_Get + /// + /// + /// Default Api Version + /// 2024-05-20-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _hybridComputeGatewayGatewaysRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new HybridComputeGatewayResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new HybridComputeGatewayPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} + /// + /// + /// Operation Id + /// Gateways_Get + /// + /// + /// Default Api Version + /// 2024-05-20-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _hybridComputeGatewayGatewaysRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new HybridComputeGatewayResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new HybridComputeGatewayPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} + /// + /// + /// Operation Id + /// Gateways_Get + /// + /// + /// Default Api Version + /// 2024-05-20-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _hybridComputeGatewayGatewaysRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new HybridComputeGatewayResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new HybridComputeGatewayPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} + /// + /// + /// Operation Id + /// Gateways_Get + /// + /// + /// Default Api Version + /// 2024-05-20-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _hybridComputeGatewayGatewaysRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new HybridComputeGatewayResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new HybridComputeGatewayPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName} + /// + /// + /// Operation Id + /// Gateways_Get + /// + /// + /// Default Api Version + /// 2024-05-20-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _hybridComputeGatewayGatewaysClientDiagnostics.CreateScope("HybridComputeGatewayResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _hybridComputeGatewayGatewaysRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new HybridComputeGatewayResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new HybridComputeGatewayPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseCollection.cs index 28d3f3eea6511..0fc032155a028 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseCollection.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string licenseName, Ca /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancellat /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken c /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string licenseName, Cancel /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string licenseName, CancellationToken cance /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseData.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseData.Serialization.cs index cdad4590c0fff..da1844d0d2cef 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseData.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseData.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.HybridCompute.Models; @@ -247,6 +249,186 @@ internal static HybridComputeLicenseData DeserializeHybridComputeLicenseData(Jso serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" location: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" location: "); + builder.AppendLine($"'{Location.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Tags), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tags: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags.Any()) + { + builder.Append(" tags: "); + builder.AppendLine("{"); + foreach (var item in Tags) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + if (item.Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{item.Value}'''"); + } + else + { + builder.AppendLine($"'{item.Value}'"); + } + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + builder.AppendLine($"'{ProvisioningState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TenantId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tenantId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TenantId)) + { + builder.Append(" tenantId: "); + builder.AppendLine($"'{TenantId.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LicenseType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" licenseType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LicenseType)) + { + builder.Append(" licenseType: "); + builder.AppendLine($"'{LicenseType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LicenseDetails), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" licenseDetails: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LicenseDetails)) + { + builder.Append(" licenseDetails: "); + BicepSerializationHelpers.AppendChildObject(builder, LicenseDetails, options, 4, false, " licenseDetails: "); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -255,6 +437,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(HybridComputeLicenseData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseData.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseData.cs index 5a78ef315d790..0b10863c9a7a3 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseData.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseData.cs @@ -84,12 +84,16 @@ internal HybridComputeLicenseData() } /// The provisioning state, which only appears in the response. + [WirePath("properties.provisioningState")] public HybridComputeProvisioningState? ProvisioningState { get; } /// Describes the tenant id. + [WirePath("properties.tenantId")] public Guid? TenantId { get; set; } /// The type of the license resource. + [WirePath("properties.licenseType")] public HybridComputeLicenseType? LicenseType { get; set; } /// Describes the properties of a License. + [WirePath("properties.licenseDetails")] public HybridComputeLicenseDetails LicenseDetails { get; set; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseResource.cs index 278cf084c31a4..d9b03e64d433f 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAsyn /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -358,7 +358,7 @@ public virtual ArmOperation Update(WaitUntil waitU /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -415,7 +415,7 @@ public virtual async Task> AddTagAsync(st /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -472,7 +472,7 @@ public virtual Response AddTag(string key, string /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -528,7 +528,7 @@ public virtual async Task> SetTagsAsync(I /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -584,7 +584,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -639,7 +639,7 @@ public virtual async Task> RemoveTagAsync /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineCollection.cs index 4bb18ca0c7916..4773f96550d2f 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineCollection.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -111,7 +111,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -157,7 +157,7 @@ public virtual Response Get(string machineName, st /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -188,7 +188,7 @@ public virtual AsyncPageable GetAllAsync(string ex /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -219,7 +219,7 @@ public virtual Pageable GetAll(string expand = nul /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -263,7 +263,7 @@ public virtual async Task> ExistsAsync(string machineName, string /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -307,7 +307,7 @@ public virtual Response Exists(string machineName, string expand = null, C /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -353,7 +353,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineData.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineData.Serialization.cs index 61eb31e99a590..1029e43842ee1 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineData.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineData.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.HybridCompute.Models; @@ -712,6 +714,805 @@ internal static HybridComputeMachineData DeserializeHybridComputeMachineData(Jso serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" location: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" location: "); + builder.AppendLine($"'{Location.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Tags), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tags: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags.Any()) + { + builder.Append(" tags: "); + builder.AppendLine("{"); + foreach (var item in Tags) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + if (item.Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{item.Value}'''"); + } + else + { + builder.AppendLine($"'{item.Value}'"); + } + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Resources), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resources: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Resources)) + { + if (Resources.Any()) + { + builder.Append(" resources: "); + builder.AppendLine("["); + foreach (var item in Resources) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " resources: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Identity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" identity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Identity)) + { + builder.Append(" identity: "); + BicepSerializationHelpers.AppendChildObject(builder, Identity, options, 2, false, " identity: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Kind), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" kind: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Kind)) + { + builder.Append(" kind: "); + builder.AppendLine($"'{Kind.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LocationData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" locationData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LocationData)) + { + builder.Append(" locationData: "); + BicepSerializationHelpers.AppendChildObject(builder, LocationData, options, 4, false, " locationData: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AgentConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" agentConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AgentConfiguration)) + { + builder.Append(" agentConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, AgentConfiguration, options, 4, false, " agentConfiguration: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ServiceStatuses), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serviceStatuses: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ServiceStatuses)) + { + builder.Append(" serviceStatuses: "); + BicepSerializationHelpers.AppendChildObject(builder, ServiceStatuses, options, 4, false, " serviceStatuses: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("CloudMetadataProvider", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" cloudMetadata: "); + builder.AppendLine("{"); + builder.AppendLine(" cloudMetadata: {"); + builder.Append(" provider: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(CloudMetadata)) + { + builder.Append(" cloudMetadata: "); + BicepSerializationHelpers.AppendChildObject(builder, CloudMetadata, options, 4, false, " cloudMetadata: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AgentUpgrade), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" agentUpgrade: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AgentUpgrade)) + { + builder.Append(" agentUpgrade: "); + BicepSerializationHelpers.AppendChildObject(builder, AgentUpgrade, options, 4, false, " agentUpgrade: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OSProfile), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" osProfile: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OSProfile)) + { + builder.Append(" osProfile: "); + BicepSerializationHelpers.AppendChildObject(builder, OSProfile, options, 4, false, " osProfile: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LicenseProfile), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" licenseProfile: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LicenseProfile)) + { + builder.Append(" licenseProfile: "); + BicepSerializationHelpers.AppendChildObject(builder, LicenseProfile, options, 4, false, " licenseProfile: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + if (ProvisioningState.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ProvisioningState}'''"); + } + else + { + builder.AppendLine($"'{ProvisioningState}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" status: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Status)) + { + builder.Append(" status: "); + builder.AppendLine($"'{Status.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastStatusChange), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastStatusChange: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LastStatusChange)) + { + builder.Append(" lastStatusChange: "); + var formattedDateTimeString = TypeFormatters.ToString(LastStatusChange.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ErrorDetails), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" errorDetails: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ErrorDetails)) + { + if (ErrorDetails.Any()) + { + builder.Append(" errorDetails: "); + builder.AppendLine("["); + foreach (var item in ErrorDetails) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " errorDetails: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AgentVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" agentVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AgentVersion)) + { + builder.Append(" agentVersion: "); + if (AgentVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AgentVersion}'''"); + } + else + { + builder.AppendLine($"'{AgentVersion}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VmId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" vmId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(VmId)) + { + builder.Append(" vmId: "); + builder.AppendLine($"'{VmId.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DisplayName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" displayName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DisplayName)) + { + builder.Append(" displayName: "); + if (DisplayName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DisplayName}'''"); + } + else + { + builder.AppendLine($"'{DisplayName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MachineFqdn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" machineFqdn: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MachineFqdn)) + { + builder.Append(" machineFqdn: "); + if (MachineFqdn.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{MachineFqdn}'''"); + } + else + { + builder.AppendLine($"'{MachineFqdn}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientPublicKey), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientPublicKey: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientPublicKey)) + { + builder.Append(" clientPublicKey: "); + if (ClientPublicKey.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ClientPublicKey}'''"); + } + else + { + builder.AppendLine($"'{ClientPublicKey}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OSName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" osName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OSName)) + { + builder.Append(" osName: "); + if (OSName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{OSName}'''"); + } + else + { + builder.AppendLine($"'{OSName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OSVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" osVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OSVersion)) + { + builder.Append(" osVersion: "); + if (OSVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{OSVersion}'''"); + } + else + { + builder.AppendLine($"'{OSVersion}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OSType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" osType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OSType)) + { + builder.Append(" osType: "); + if (OSType.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{OSType}'''"); + } + else + { + builder.AppendLine($"'{OSType}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VmUuid), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" vmUuid: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(VmUuid)) + { + builder.Append(" vmUuid: "); + builder.AppendLine($"'{VmUuid.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Extensions), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" extensions: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Extensions)) + { + if (Extensions.Any()) + { + builder.Append(" extensions: "); + builder.AppendLine("["); + foreach (var item in Extensions) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " extensions: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OSSku), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" osSku: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OSSku)) + { + builder.Append(" osSku: "); + if (OSSku.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{OSSku}'''"); + } + else + { + builder.AppendLine($"'{OSSku}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OSEdition), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" osEdition: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OSEdition)) + { + builder.Append(" osEdition: "); + if (OSEdition.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{OSEdition}'''"); + } + else + { + builder.AppendLine($"'{OSEdition}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DomainName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" domainName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DomainName)) + { + builder.Append(" domainName: "); + if (DomainName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DomainName}'''"); + } + else + { + builder.AppendLine($"'{DomainName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ADFqdn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" adFqdn: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ADFqdn)) + { + builder.Append(" adFqdn: "); + if (ADFqdn.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ADFqdn}'''"); + } + else + { + builder.AppendLine($"'{ADFqdn}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DnsFqdn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" dnsFqdn: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DnsFqdn)) + { + builder.Append(" dnsFqdn: "); + if (DnsFqdn.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DnsFqdn}'''"); + } + else + { + builder.AppendLine($"'{DnsFqdn}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PrivateLinkScopeResourceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" privateLinkScopeResourceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PrivateLinkScopeResourceId)) + { + builder.Append(" privateLinkScopeResourceId: "); + builder.AppendLine($"'{PrivateLinkScopeResourceId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ParentClusterResourceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" parentClusterResourceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ParentClusterResourceId)) + { + builder.Append(" parentClusterResourceId: "); + builder.AppendLine($"'{ParentClusterResourceId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MSSqlDiscovered), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" mssqlDiscovered: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MSSqlDiscovered)) + { + builder.Append(" mssqlDiscovered: "); + if (MSSqlDiscovered.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{MSSqlDiscovered}'''"); + } + else + { + builder.AppendLine($"'{MSSqlDiscovered}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DetectedProperties), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" detectedProperties: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(DetectedProperties)) + { + if (DetectedProperties.Any()) + { + builder.Append(" detectedProperties: "); + builder.AppendLine("{"); + foreach (var item in DetectedProperties) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + if (item.Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{item.Value}'''"); + } + else + { + builder.AppendLine($"'{item.Value}'"); + } + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("NetworkInterfaces", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" networkProfile: "); + builder.AppendLine("{"); + builder.AppendLine(" networkProfile: {"); + builder.Append(" networkInterfaces: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(NetworkProfile)) + { + builder.Append(" networkProfile: "); + BicepSerializationHelpers.AppendChildObject(builder, NetworkProfile, options, 4, false, " networkProfile: "); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -720,6 +1521,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(HybridComputeMachineData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineData.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineData.cs index f110fbdfcce7f..2763ddd3a213f 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineData.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineData.cs @@ -148,80 +148,114 @@ internal HybridComputeMachineData() } /// The list of extensions affiliated to the machine. + [WirePath("resources")] public IReadOnlyList Resources { get; } /// Identity for the resource. Current supported identity types: SystemAssigned. + [WirePath("identity")] public ManagedServiceIdentity Identity { get; set; } /// Indicates which kind of Arc machine placement on-premises, such as HCI, SCVMM or VMware etc. + [WirePath("kind")] public ArcKindEnum? Kind { get; set; } /// Metadata pertaining to the geographic location of the resource. + [WirePath("properties.locationData")] public HybridComputeLocation LocationData { get; set; } /// Configurable properties that the user can set locally via the azcmagent config command, or remotely via ARM. + [WirePath("properties.agentConfiguration")] public AgentConfiguration AgentConfiguration { get; } /// Statuses of dependent services that are reported back to ARM. + [WirePath("properties.serviceStatuses")] public HybridComputeServiceStatuses ServiceStatuses { get; set; } /// The metadata of the cloud environment (Azure/GCP/AWS/OCI...). internal HybridComputeCloudMetadata CloudMetadata { get; set; } /// Specifies the cloud provider (Azure/AWS/GCP...). + [WirePath("properties.cloudMetadata.provider")] public string CloudMetadataProvider { get => CloudMetadata is null ? default : CloudMetadata.Provider; } /// The info of the machine w.r.t Agent Upgrade. + [WirePath("properties.agentUpgrade")] public AgentUpgrade AgentUpgrade { get; set; } /// Specifies the operating system settings for the hybrid machine. + [WirePath("properties.osProfile")] public HybridComputeOSProfile OSProfile { get; set; } /// Specifies the License related properties for a machine. + [WirePath("properties.licenseProfile")] public LicenseProfileMachineInstanceView LicenseProfile { get; set; } /// The provisioning state, which only appears in the response. + [WirePath("properties.provisioningState")] public string ProvisioningState { get; } /// The status of the hybrid machine agent. + [WirePath("properties.status")] public HybridComputeStatusType? Status { get; } /// The time of the last status change. + [WirePath("properties.lastStatusChange")] public DateTimeOffset? LastStatusChange { get; } /// Details about the error state. + [WirePath("properties.errorDetails")] public IReadOnlyList ErrorDetails { get; } /// The hybrid machine agent full version. + [WirePath("properties.agentVersion")] public string AgentVersion { get; } /// Specifies the hybrid machine unique ID. + [WirePath("properties.vmId")] public Guid? VmId { get; set; } /// Specifies the hybrid machine display name. + [WirePath("properties.displayName")] public string DisplayName { get; } /// Specifies the hybrid machine FQDN. + [WirePath("properties.machineFqdn")] public string MachineFqdn { get; } /// Public Key that the client provides to be used during initial resource onboarding. + [WirePath("properties.clientPublicKey")] public string ClientPublicKey { get; set; } /// The Operating System running on the hybrid machine. + [WirePath("properties.osName")] public string OSName { get; } /// The version of Operating System running on the hybrid machine. + [WirePath("properties.osVersion")] public string OSVersion { get; } /// The type of Operating System (windows/linux). + [WirePath("properties.osType")] public string OSType { get; set; } /// Specifies the Arc Machine's unique SMBIOS ID. + [WirePath("properties.vmUuid")] public Guid? VmUuid { get; } /// Machine Extensions information (deprecated field). + [WirePath("properties.extensions")] public IList Extensions { get; } /// Specifies the Operating System product SKU. + [WirePath("properties.osSku")] public string OSSku { get; } /// The edition of the Operating System. + [WirePath("properties.osEdition")] public string OSEdition { get; } /// Specifies the Windows domain name. + [WirePath("properties.domainName")] public string DomainName { get; } /// Specifies the AD fully qualified display name. + [WirePath("properties.adFqdn")] public string ADFqdn { get; } /// Specifies the DNS fully qualified display name. + [WirePath("properties.dnsFqdn")] public string DnsFqdn { get; } /// The resource id of the private link scope this machine is assigned to, if any. + [WirePath("properties.privateLinkScopeResourceId")] public ResourceIdentifier PrivateLinkScopeResourceId { get; set; } /// The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. + [WirePath("properties.parentClusterResourceId")] public ResourceIdentifier ParentClusterResourceId { get; set; } /// Specifies whether any MS SQL instance is discovered on the machine. + [WirePath("properties.mssqlDiscovered")] public string MSSqlDiscovered { get; set; } /// Detected properties from the machine. + [WirePath("properties.detectedProperties")] public IReadOnlyDictionary DetectedProperties { get; } /// Information about the network the machine is on. internal HybridComputeNetworkProfile NetworkProfile { get; } /// The list of network interfaces. + [WirePath("properties.networkProfile.networkInterfaces")] public IReadOnlyList NetworkInterfaces { get => NetworkProfile?.NetworkInterfaces; diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineExtensionCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineExtensionCollection.cs index c5ad44264d585..738c7626c5e6b 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineExtensionCollection.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineExtensionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> C /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdat /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string extens /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(string exp /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string extensionName, Canc /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response Exists(string extensionName, CancellationToken can /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -445,7 +445,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineExtensionData.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineExtensionData.Serialization.cs index 3e0974b31ff9b..925727dd71558 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineExtensionData.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineExtensionData.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.HybridCompute.Models; @@ -184,6 +186,138 @@ internal static HybridComputeMachineExtensionData DeserializeHybridComputeMachin serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" location: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" location: "); + builder.AppendLine($"'{Location.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Tags), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tags: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags.Any()) + { + builder.Append(" tags: "); + builder.AppendLine("{"); + foreach (var item in Tags) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + if (item.Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{item.Value}'''"); + } + else + { + builder.AppendLine($"'{item.Value}'"); + } + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Properties), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" properties: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Properties)) + { + builder.Append(" properties: "); + BicepSerializationHelpers.AppendChildObject(builder, Properties, options, 2, false, " properties: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -192,6 +326,8 @@ BinaryData IPersistableModel.Write(ModelReade { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(HybridComputeMachineExtensionData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineExtensionData.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineExtensionData.cs index c35c149d6b080..ac4de90f1cbc4 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineExtensionData.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineExtensionData.cs @@ -78,6 +78,7 @@ internal HybridComputeMachineExtensionData() } /// Describes Machine Extension Properties. + [WirePath("properties")] public MachineExtensionProperties Properties { get; set; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineExtensionResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineExtensionResource.cs index 91e520e451772..4eba82d0e25db 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineExtensionResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineExtensionResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationT /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> U /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual ArmOperation Update(WaitUn /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -421,7 +421,7 @@ public virtual async Task> AddTa /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -483,7 +483,7 @@ public virtual Response AddTag(string key /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -540,7 +540,7 @@ public virtual async Task> SetTa /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -597,7 +597,7 @@ public virtual Response SetTags(IDictiona /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -657,7 +657,7 @@ public virtual async Task> Remov /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineResource.cs index fb688a2502105..1ddc3b882e569 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineResource.cs @@ -123,7 +123,7 @@ public virtual HybridComputeMachineExtensionCollection GetHybridComputeMachineEx /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual async Task> GetHy /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -192,7 +192,7 @@ public virtual MachineRunCommandCollection GetMachineRunCommands() /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task> GetMachineRunComm /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -254,7 +254,7 @@ public virtual Response GetMachineRunCommand(string r /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -295,7 +295,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -336,7 +336,7 @@ public virtual Response Get(string expand = null, /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -380,7 +380,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -424,7 +424,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -466,7 +466,7 @@ public virtual async Task> UpdateAsync(Hy /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -508,7 +508,7 @@ public virtual Response Update(HybridComputeMachin /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -550,7 +550,7 @@ public virtual async Task> AssessPatche /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -592,7 +592,7 @@ public virtual ArmOperation AssessPatches(WaitUntil /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -638,7 +638,7 @@ public virtual async Task> InstallPatc /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -684,7 +684,7 @@ public virtual ArmOperation InstallPatches(WaitUnti /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// @@ -726,7 +726,7 @@ public virtual async Task UpgradeExtensionsAsync(WaitUntil waitUnt /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// @@ -768,7 +768,7 @@ public virtual ArmOperation UpgradeExtensions(WaitUntil waitUntil, MachineExtens /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// @@ -802,7 +802,7 @@ public virtual async Task> GetNetworkProfi /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// @@ -836,7 +836,7 @@ public virtual Response GetNetworkProfile(Cancellat /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -874,7 +874,7 @@ public virtual async Task> GetValida /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -912,7 +912,7 @@ public virtual Response GetValidationDetailsF /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -974,7 +974,7 @@ public virtual async Task> AddTagAsync(st /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -1036,7 +1036,7 @@ public virtual Response AddTag(string key, string /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -1093,7 +1093,7 @@ public virtual async Task> SetTagsAsync(I /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -1150,7 +1150,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -1210,7 +1210,7 @@ public virtual async Task> RemoveTagAsync /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateEndpointConnectionCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateEndpointConnectionCollection.cs index 048e7f9150d94..370f7dcad8318 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateEndpointConnectionCollection.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateEndpointConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation Crea /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(stri /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable Get /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(C /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateEndpointConnectionData.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateEndpointConnectionData.Serialization.cs index b0df828d1337f..a879df1bb4815 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateEndpointConnectionData.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateEndpointConnectionData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.HybridCompute.Models; @@ -148,6 +149,89 @@ internal static HybridComputePrivateEndpointConnectionData DeserializeHybridComp serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Properties), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" properties: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Properties)) + { + builder.Append(" properties: "); + BicepSerializationHelpers.AppendChildObject(builder, Properties, options, 2, false, " properties: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -156,6 +240,8 @@ BinaryData IPersistableModel.Write(M { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(HybridComputePrivateEndpointConnectionData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateEndpointConnectionData.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateEndpointConnectionData.cs index 7f6259f94a819..ab95f3cb83905 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateEndpointConnectionData.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateEndpointConnectionData.cs @@ -70,6 +70,7 @@ internal HybridComputePrivateEndpointConnectionData(ResourceIdentifier id, strin } /// Resource properties. + [WirePath("properties")] public HybridComputePrivateEndpointConnectionProperties Properties { get; set; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateEndpointConnectionResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateEndpointConnectionResource.cs index 8587835f92059..e59ef91495dc7 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateEndpointConnectionResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateEndpointConnectionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Canc /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkResource.cs index b31fb91d4cf59..ec6968ee77a3a 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkResourceCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkResourceCollection.cs index 9c645522efe8b..5a99b77da1fb7 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkResourceCollection.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkResourceCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(s /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string groupName, /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cance /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationTok /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string groupName, Cancella /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string groupName, CancellationToken cancell /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkResourceData.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkResourceData.Serialization.cs index f5a853ee45ca0..9b94597099cdd 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkResourceData.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkResourceData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.HybridCompute.Models; @@ -148,6 +149,89 @@ internal static HybridComputePrivateLinkResourceData DeserializeHybridComputePri serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Properties), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" properties: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Properties)) + { + builder.Append(" properties: "); + BicepSerializationHelpers.AppendChildObject(builder, Properties, options, 2, false, " properties: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -156,6 +240,8 @@ BinaryData IPersistableModel.Write(ModelRe { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(HybridComputePrivateLinkResourceData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkResourceData.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkResourceData.cs index 7b406a0f422a0..f27536b4c1f15 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkResourceData.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkResourceData.cs @@ -70,6 +70,7 @@ internal HybridComputePrivateLinkResourceData(ResourceIdentifier id, string name } /// Resource properties. + [WirePath("properties")] public HybridComputePrivateLinkResourceProperties Properties { get; set; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkScopeCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkScopeCollection.cs index 878c2a63e71d4..52628ca177e93 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkScopeCollection.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkScopeCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> C /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdat /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string scopeN /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll(Cancellati /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string scopeName, Cancella /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string scopeName, CancellationToken cancell /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkScopeData.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkScopeData.Serialization.cs index b04c76e8c0d31..aa81bafadc6b8 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkScopeData.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkScopeData.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.HybridCompute.Models; @@ -184,6 +186,138 @@ internal static HybridComputePrivateLinkScopeData DeserializeHybridComputePrivat serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" location: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" location: "); + builder.AppendLine($"'{Location.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Tags), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tags: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags.Any()) + { + builder.Append(" tags: "); + builder.AppendLine("{"); + foreach (var item in Tags) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + if (item.Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{item.Value}'''"); + } + else + { + builder.AppendLine($"'{item.Value}'"); + } + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Properties), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" properties: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Properties)) + { + builder.Append(" properties: "); + BicepSerializationHelpers.AppendChildObject(builder, Properties, options, 2, false, " properties: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -192,6 +326,8 @@ BinaryData IPersistableModel.Write(ModelReade { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(HybridComputePrivateLinkScopeData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkScopeData.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkScopeData.cs index b34be76d188ea..5730027e2bb39 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkScopeData.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkScopeData.cs @@ -78,6 +78,7 @@ internal HybridComputePrivateLinkScopeData() } /// Properties that define a Azure Arc PrivateLinkScope resource. + [WirePath("properties")] public HybridComputePrivateLinkScopeProperties Properties { get; set; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkScopeResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkScopeResource.cs index 95ca49c9539ee..e6bfb3145c90e 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkScopeResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkScopeResource.cs @@ -110,7 +110,7 @@ public virtual HybridComputePrivateLinkResourceCollection GetHybridComputePrivat /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetHybridC /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -179,7 +179,7 @@ public virtual HybridComputePrivateEndpointConnectionCollection GetHybridCompute /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -248,7 +248,7 @@ public virtual NetworkSecurityPerimeterConfigurationCollection GetNetworkSecurit /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -279,7 +279,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -310,7 +310,7 @@ public virtual Response GetNetwor /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -350,7 +350,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -390,7 +390,7 @@ public virtual Response Get(CancellationT /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -432,7 +432,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -474,7 +474,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -516,7 +516,7 @@ public virtual async Task> Updat /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -558,7 +558,7 @@ public virtual Response Update(HybridComp /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -620,7 +620,7 @@ public virtual async Task> AddTa /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -682,7 +682,7 @@ public virtual Response AddTag(string key /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -739,7 +739,7 @@ public virtual async Task> SetTa /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -796,7 +796,7 @@ public virtual Response SetTags(IDictiona /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -856,7 +856,7 @@ public virtual async Task> Remov /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Internal/BicepSerializationHelpers.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Internal/BicepSerializationHelpers.cs new file mode 100644 index 0000000000000..324d14e378cb2 --- /dev/null +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Internal/BicepSerializationHelpers.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text; + +namespace Azure.ResourceManager.HybridCompute +{ + internal static class BicepSerializationHelpers + { + public static void AppendChildObject(StringBuilder stringBuilder, object childObject, ModelReaderWriterOptions options, int spaces, bool indentFirstLine, string formattedPropertyName) + { + string indent = new string(' ', spaces); + int emptyObjectLength = 2 + spaces + Environment.NewLine.Length + Environment.NewLine.Length; + int length = stringBuilder.Length; + bool inMultilineString = false; + + BinaryData data = ModelReaderWriter.Write(childObject, options); + string[] lines = data.ToString().Split(Environment.NewLine.ToCharArray(), StringSplitOptions.RemoveEmptyEntries); + for (int i = 0; i < lines.Length; i++) + { + string line = lines[i]; + if (inMultilineString) + { + if (line.Contains("'''")) + { + inMultilineString = false; + } + stringBuilder.AppendLine(line); + continue; + } + if (line.Contains("'''")) + { + inMultilineString = true; + stringBuilder.AppendLine($"{indent}{line}"); + continue; + } + if (i == 0 && !indentFirstLine) + { + stringBuilder.AppendLine($"{line}"); + } + else + { + stringBuilder.AppendLine($"{indent}{line}"); + } + } + if (stringBuilder.Length == length + emptyObjectLength) + { + stringBuilder.Length = stringBuilder.Length - emptyObjectLength - formattedPropertyName.Length; + } + } + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Internal/WirePathAttribute.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Internal/WirePathAttribute.cs new file mode 100644 index 0000000000000..43099a0742f39 --- /dev/null +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Internal/WirePathAttribute.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.HybridCompute +{ + [AttributeUsage(AttributeTargets.Property)] + internal class WirePathAttribute : Attribute + { + private string _wirePath; + + public WirePathAttribute(string wirePath) + { + _wirePath = wirePath; + } + + public override string ToString() + { + return _wirePath; + } + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/LongRunningOperation/HybridComputeGatewayOperationSource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/LongRunningOperation/HybridComputeGatewayOperationSource.cs new file mode 100644 index 0000000000000..a8caa3bd0e2c9 --- /dev/null +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/LongRunningOperation/HybridComputeGatewayOperationSource.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.HybridCompute +{ + internal class HybridComputeGatewayOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal HybridComputeGatewayOperationSource(ArmClient client) + { + _client = client; + } + + HybridComputeGatewayResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = HybridComputeGatewayData.DeserializeHybridComputeGatewayData(document.RootElement); + return new HybridComputeGatewayResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = HybridComputeGatewayData.DeserializeHybridComputeGatewayData(document.RootElement); + return new HybridComputeGatewayResource(_client, data); + } + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/MachineRunCommandCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/MachineRunCommandCollection.cs index 8fce73c800cc3..ab8dee3bd73b1 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/MachineRunCommandCollection.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/MachineRunCommandCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string r /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string runCommandName, Ca /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(string expan /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(string expand = null, /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string runCommandName, Can /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response Exists(string runCommandName, CancellationToken ca /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -445,7 +445,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/MachineRunCommandData.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/MachineRunCommandData.Serialization.cs index 743cdc8b11285..acf7e1b52ea7a 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/MachineRunCommandData.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/MachineRunCommandData.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.HybridCompute.Models; @@ -399,6 +401,362 @@ internal static MachineRunCommandData DeserializeMachineRunCommandData(JsonEleme serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" location: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" location: "); + builder.AppendLine($"'{Location.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Tags), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tags: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags.Any()) + { + builder.Append(" tags: "); + builder.AppendLine("{"); + foreach (var item in Tags) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + if (item.Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{item.Value}'''"); + } + else + { + builder.AppendLine($"'{item.Value}'"); + } + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Source), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" source: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Source)) + { + builder.Append(" source: "); + BicepSerializationHelpers.AppendChildObject(builder, Source, options, 4, false, " source: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Parameters), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" parameters: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Parameters)) + { + if (Parameters.Any()) + { + builder.Append(" parameters: "); + builder.AppendLine("["); + foreach (var item in Parameters) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " parameters: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProtectedParameters), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" protectedParameters: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ProtectedParameters)) + { + if (ProtectedParameters.Any()) + { + builder.Append(" protectedParameters: "); + builder.AppendLine("["); + foreach (var item in ProtectedParameters) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " protectedParameters: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AsyncExecution), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" asyncExecution: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AsyncExecution)) + { + builder.Append(" asyncExecution: "); + var boolValue = AsyncExecution.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RunAsUser), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" runAsUser: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(RunAsUser)) + { + builder.Append(" runAsUser: "); + if (RunAsUser.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{RunAsUser}'''"); + } + else + { + builder.AppendLine($"'{RunAsUser}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RunAsPassword), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" runAsPassword: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(RunAsPassword)) + { + builder.Append(" runAsPassword: "); + if (RunAsPassword.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{RunAsPassword}'''"); + } + else + { + builder.AppendLine($"'{RunAsPassword}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TimeoutInSeconds), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" timeoutInSeconds: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TimeoutInSeconds)) + { + builder.Append(" timeoutInSeconds: "); + builder.AppendLine($"{TimeoutInSeconds.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OutputBlobUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" outputBlobUri: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OutputBlobUri)) + { + builder.Append(" outputBlobUri: "); + builder.AppendLine($"'{OutputBlobUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ErrorBlobUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" errorBlobUri: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ErrorBlobUri)) + { + builder.Append(" errorBlobUri: "); + builder.AppendLine($"'{ErrorBlobUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OutputBlobManagedIdentity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" outputBlobManagedIdentity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OutputBlobManagedIdentity)) + { + builder.Append(" outputBlobManagedIdentity: "); + BicepSerializationHelpers.AppendChildObject(builder, OutputBlobManagedIdentity, options, 4, false, " outputBlobManagedIdentity: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ErrorBlobManagedIdentity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" errorBlobManagedIdentity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ErrorBlobManagedIdentity)) + { + builder.Append(" errorBlobManagedIdentity: "); + BicepSerializationHelpers.AppendChildObject(builder, ErrorBlobManagedIdentity, options, 4, false, " errorBlobManagedIdentity: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + if (ProvisioningState.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ProvisioningState}'''"); + } + else + { + builder.AppendLine($"'{ProvisioningState}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(InstanceView), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" instanceView: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(InstanceView)) + { + builder.Append(" instanceView: "); + BicepSerializationHelpers.AppendChildObject(builder, InstanceView, options, 4, false, " instanceView: "); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -407,6 +765,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(MachineRunCommandData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/MachineRunCommandData.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/MachineRunCommandData.cs index fbc755f1f40f3..d6369c6d0fae5 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/MachineRunCommandData.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/MachineRunCommandData.cs @@ -104,30 +104,43 @@ internal MachineRunCommandData() } /// The source of the run command script. + [WirePath("properties.source")] public MachineRunCommandScriptSource Source { get; set; } /// The parameters used by the script. + [WirePath("properties.parameters")] public IList Parameters { get; } /// The parameters used by the script. + [WirePath("properties.protectedParameters")] public IList ProtectedParameters { get; } /// Optional. If set to true, provisioning will complete as soon as script starts and will not wait for script to complete. + [WirePath("properties.asyncExecution")] public bool? AsyncExecution { get; set; } /// Specifies the user account on the machine when executing the run command. + [WirePath("properties.runAsUser")] public string RunAsUser { get; set; } /// Specifies the user account password on the machine when executing the run command. + [WirePath("properties.runAsPassword")] public string RunAsPassword { get; set; } /// The timeout in seconds to execute the run command. + [WirePath("properties.timeoutInSeconds")] public int? TimeoutInSeconds { get; set; } /// Specifies the Azure storage blob where script output stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer outputBlobManagedIdentity parameter. + [WirePath("properties.outputBlobUri")] public Uri OutputBlobUri { get; set; } /// Specifies the Azure storage blob where script error stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer errorBlobManagedIdentity parameter. + [WirePath("properties.errorBlobUri")] public Uri ErrorBlobUri { get; set; } /// User-assigned managed identity that has access to outputBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. + [WirePath("properties.outputBlobManagedIdentity")] public RunCommandManagedIdentity OutputBlobManagedIdentity { get; set; } /// User-assigned managed identity that has access to errorBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. + [WirePath("properties.errorBlobManagedIdentity")] public RunCommandManagedIdentity ErrorBlobManagedIdentity { get; set; } /// The provisioning state, which only appears in the response. + [WirePath("properties.provisioningState")] public string ProvisioningState { get; } /// The machine run command instance view. + [WirePath("properties.instanceView")] public MachineRunCommandInstanceView InstanceView { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/MachineRunCommandResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/MachineRunCommandResource.cs index 10728e0489c7c..a2e72e8173a34 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/MachineRunCommandResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/MachineRunCommandResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAsync(W /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -358,7 +358,7 @@ public virtual ArmOperation Update(WaitUntil waitUnti /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -415,7 +415,7 @@ public virtual async Task> AddTagAsync(strin /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -472,7 +472,7 @@ public virtual Response AddTag(string key, string val /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -528,7 +528,7 @@ public virtual async Task> SetTagsAsync(IDic /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -584,7 +584,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -639,7 +639,7 @@ public virtual async Task> RemoveTagAsync(st /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/AgentConfiguration.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/AgentConfiguration.Serialization.cs index 68835ee985299..d0e96f335aacf 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/AgentConfiguration.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/AgentConfiguration.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -238,6 +240,215 @@ internal static AgentConfiguration DeserializeAgentConfiguration(JsonElement ele serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProxyUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" proxyUrl: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProxyUri)) + { + builder.Append(" proxyUrl: "); + builder.AppendLine($"'{ProxyUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IncomingConnectionsPorts), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" incomingConnectionsPorts: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(IncomingConnectionsPorts)) + { + if (IncomingConnectionsPorts.Any()) + { + builder.Append(" incomingConnectionsPorts: "); + builder.AppendLine("["); + foreach (var item in IncomingConnectionsPorts) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExtensionsAllowList), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" extensionsAllowList: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ExtensionsAllowList)) + { + if (ExtensionsAllowList.Any()) + { + builder.Append(" extensionsAllowList: "); + builder.AppendLine("["); + foreach (var item in ExtensionsAllowList) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " extensionsAllowList: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExtensionsBlockList), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" extensionsBlockList: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ExtensionsBlockList)) + { + if (ExtensionsBlockList.Any()) + { + builder.Append(" extensionsBlockList: "); + builder.AppendLine("["); + foreach (var item in ExtensionsBlockList) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " extensionsBlockList: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProxyBypass), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" proxyBypass: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ProxyBypass)) + { + if (ProxyBypass.Any()) + { + builder.Append(" proxyBypass: "); + builder.AppendLine("["); + foreach (var item in ProxyBypass) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExtensionsEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" extensionsEnabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ExtensionsEnabled)) + { + builder.Append(" extensionsEnabled: "); + if (ExtensionsEnabled.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ExtensionsEnabled}'''"); + } + else + { + builder.AppendLine($"'{ExtensionsEnabled}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GuestConfigurationEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" guestConfigurationEnabled: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(GuestConfigurationEnabled)) + { + builder.Append(" guestConfigurationEnabled: "); + if (GuestConfigurationEnabled.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{GuestConfigurationEnabled}'''"); + } + else + { + builder.AppendLine($"'{GuestConfigurationEnabled}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ConfigMode), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" configMode: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ConfigMode)) + { + builder.Append(" configMode: "); + builder.AppendLine($"'{ConfigMode.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -246,6 +457,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(AgentConfiguration)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/AgentConfiguration.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/AgentConfiguration.cs index 34498ca03eae9..fd68e12ab5ce1 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/AgentConfiguration.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/AgentConfiguration.cs @@ -78,20 +78,28 @@ internal AgentConfiguration(Uri proxyUri, IReadOnlyList incomingConnecti } /// Specifies the URL of the proxy to be used. + [WirePath("proxyUrl")] public Uri ProxyUri { get; } /// Specifies the list of ports that the agent will be able to listen on. + [WirePath("incomingConnectionsPorts")] public IReadOnlyList IncomingConnectionsPorts { get; } /// Array of extensions that are allowed to be installed or updated. + [WirePath("extensionsAllowList")] public IReadOnlyList ExtensionsAllowList { get; } /// Array of extensions that are blocked (cannot be installed or updated). + [WirePath("extensionsBlockList")] public IReadOnlyList ExtensionsBlockList { get; } /// List of service names which should not use the specified proxy server. + [WirePath("proxyBypass")] public IReadOnlyList ProxyBypass { get; } /// Specifies whether the extension service is enabled or disabled. + [WirePath("extensionsEnabled")] public string ExtensionsEnabled { get; } /// Specified whether the guest configuration service is enabled or disabled. + [WirePath("guestConfigurationEnabled")] public string GuestConfigurationEnabled { get; } /// Name of configuration mode to use. Modes are pre-defined configurations of security controls, extension allowlists and guest configuration, maintained by Microsoft. + [WirePath("configMode")] public AgentConfigurationMode? ConfigMode { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/AgentUpgrade.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/AgentUpgrade.Serialization.cs index 27519752306fd..92e41dad408a0 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/AgentUpgrade.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/AgentUpgrade.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -178,6 +179,152 @@ internal static AgentUpgrade DeserializeAgentUpgrade(JsonElement element, ModelR serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DesiredVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" desiredVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DesiredVersion)) + { + builder.Append(" desiredVersion: "); + if (DesiredVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DesiredVersion}'''"); + } + else + { + builder.AppendLine($"'{DesiredVersion}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CorrelationId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" correlationId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CorrelationId)) + { + builder.Append(" correlationId: "); + builder.AppendLine($"'{CorrelationId.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsAutomaticUpgradeEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enableAutomaticUpgrade: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsAutomaticUpgradeEnabled)) + { + builder.Append(" enableAutomaticUpgrade: "); + var boolValue = IsAutomaticUpgradeEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastAttemptDesiredVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastAttemptDesiredVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LastAttemptDesiredVersion)) + { + builder.Append(" lastAttemptDesiredVersion: "); + if (LastAttemptDesiredVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{LastAttemptDesiredVersion}'''"); + } + else + { + builder.AppendLine($"'{LastAttemptDesiredVersion}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastAttemptedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastAttemptTimestamp: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LastAttemptedOn)) + { + builder.Append(" lastAttemptTimestamp: "); + var formattedDateTimeString = TypeFormatters.ToString(LastAttemptedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastAttemptStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastAttemptStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LastAttemptStatus)) + { + builder.Append(" lastAttemptStatus: "); + builder.AppendLine($"'{LastAttemptStatus.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastAttemptMessage), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastAttemptMessage: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LastAttemptMessage)) + { + builder.Append(" lastAttemptMessage: "); + if (LastAttemptMessage.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{LastAttemptMessage}'''"); + } + else + { + builder.AppendLine($"'{LastAttemptMessage}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -186,6 +333,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions option { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(AgentUpgrade)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/AgentUpgrade.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/AgentUpgrade.cs index 93753b045d5d0..385ee381cf9ac 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/AgentUpgrade.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/AgentUpgrade.cs @@ -72,18 +72,25 @@ internal AgentUpgrade(string desiredVersion, Guid? correlationId, bool? isAutoma } /// Specifies the version info w.r.t AgentUpgrade for the machine. + [WirePath("desiredVersion")] public string DesiredVersion { get; set; } /// The correlation ID passed in from RSM per upgrade. + [WirePath("correlationId")] public Guid? CorrelationId { get; set; } /// Specifies if RSM should try to upgrade this machine. + [WirePath("enableAutomaticUpgrade")] public bool? IsAutomaticUpgradeEnabled { get; set; } /// Specifies the version of the last attempt. + [WirePath("lastAttemptDesiredVersion")] public string LastAttemptDesiredVersion { get; } /// Timestamp of last upgrade attempt. + [WirePath("lastAttemptTimestamp")] public DateTimeOffset? LastAttemptedOn { get; } /// Specifies the status of Agent Upgrade. + [WirePath("lastAttemptStatus")] public LastAttemptStatusEnum? LastAttemptStatus { get; } /// Failure message of last upgrade attempt if any. + [WirePath("lastAttemptMessage")] public string LastAttemptMessage { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/AvailablePatchCountByClassification.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/AvailablePatchCountByClassification.Serialization.cs index b501cda4104a0..5da02fd6ec1bd 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/AvailablePatchCountByClassification.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/AvailablePatchCountByClassification.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -222,6 +223,156 @@ internal static AvailablePatchCountByClassification DeserializeAvailablePatchCou serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Security), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" security: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Security)) + { + builder.Append(" security: "); + builder.AppendLine($"{Security.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Critical), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" critical: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Critical)) + { + builder.Append(" critical: "); + builder.AppendLine($"{Critical.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Definition), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" definition: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Definition)) + { + builder.Append(" definition: "); + builder.AppendLine($"{Definition.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UpdateRollup), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" updateRollup: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UpdateRollup)) + { + builder.Append(" updateRollup: "); + builder.AppendLine($"{UpdateRollup.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(FeaturePack), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" featurePack: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(FeaturePack)) + { + builder.Append(" featurePack: "); + builder.AppendLine($"{FeaturePack.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ServicePack), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" servicePack: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ServicePack)) + { + builder.Append(" servicePack: "); + builder.AppendLine($"{ServicePack.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Tools), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tools: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Tools)) + { + builder.Append(" tools: "); + builder.AppendLine($"{Tools.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Updates), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" updates: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Updates)) + { + builder.Append(" updates: "); + builder.AppendLine($"{Updates.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Other), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" other: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Other)) + { + builder.Append(" other: "); + builder.AppendLine($"{Other.Value}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -230,6 +381,8 @@ BinaryData IPersistableModel.Write(ModelRea { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(AvailablePatchCountByClassification)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/AvailablePatchCountByClassification.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/AvailablePatchCountByClassification.cs index 9ba89d886508a..959f4554e4cf8 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/AvailablePatchCountByClassification.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/AvailablePatchCountByClassification.cs @@ -76,22 +76,31 @@ internal AvailablePatchCountByClassification(int? security, int? critical, int? } /// Number of security patches available for installation. + [WirePath("security")] public int? Security { get; } /// Number of critical patches available for installation. + [WirePath("critical")] public int? Critical { get; } /// Number of definition patches available for installation. + [WirePath("definition")] public int? Definition { get; } /// Number of update Rollup patches available for installation. + [WirePath("updateRollup")] public int? UpdateRollup { get; } /// Number of feature pack patches available for installation. + [WirePath("featurePack")] public int? FeaturePack { get; } /// Number of service pack patches available for installation. + [WirePath("servicePack")] public int? ServicePack { get; } /// Number of tools patches available for installation. + [WirePath("tools")] public int? Tools { get; } /// Number of updates category patches available for installation. + [WirePath("updates")] public int? Updates { get; } /// Number of other patches available for installation. + [WirePath("other")] public int? Other { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/EsuKey.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/EsuKey.Serialization.cs index edabb894555db..fb43022c36859 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/EsuKey.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/EsuKey.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -103,6 +104,59 @@ internal static EsuKey DeserializeEsuKey(JsonElement element, ModelReaderWriterO return new EsuKey(sku, licenseStatus, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Sku), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sku: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Sku)) + { + builder.Append(" sku: "); + if (Sku.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Sku}'''"); + } + else + { + builder.AppendLine($"'{Sku}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LicenseStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" licenseStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LicenseStatus)) + { + builder.Append(" licenseStatus: "); + builder.AppendLine($"{LicenseStatus.Value}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -111,6 +165,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(EsuKey)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/EsuKey.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/EsuKey.cs index e838f14f76c2e..692913b12b54b 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/EsuKey.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/EsuKey.cs @@ -62,8 +62,10 @@ internal EsuKey(string sku, int? licenseStatus, IDictionary } /// SKU number. + [WirePath("sku")] public string Sku { get; } /// The current status of the license profile key. Represented by the same integer value that is presented on the machine itself when querying the license key status. + [WirePath("licenseStatus")] public int? LicenseStatus { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/ExtensionTargetProperties.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/ExtensionTargetProperties.cs index de180803fa92d..1a3de4f5e7b15 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/ExtensionTargetProperties.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/ExtensionTargetProperties.cs @@ -60,6 +60,7 @@ internal ExtensionTargetProperties(string targetVersion, IDictionary Properties for the specified Extension to Upgrade. + [WirePath("targetVersion")] public string TargetVersion { get; set; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/ExtensionValueListResult.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/ExtensionValueListResult.Serialization.cs index d24c19615249f..e9ceee6e5b1e7 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/ExtensionValueListResult.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/ExtensionValueListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -102,6 +104,44 @@ internal static ExtensionValueListResult DeserializeExtensionValueListResult(Jso return new ExtensionValueListResult(value ?? new ChangeTrackingList(), serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -110,6 +150,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ExtensionValueListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/ExtensionsResourceStatus.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/ExtensionsResourceStatus.Serialization.cs index 0b86ebd243224..f3319f866fa95 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/ExtensionsResourceStatus.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/ExtensionsResourceStatus.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -146,6 +147,121 @@ internal static ExtensionsResourceStatus DeserializeExtensionsResourceStatus(Jso serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Code), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" code: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Code)) + { + builder.Append(" code: "); + if (Code.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Code}'''"); + } + else + { + builder.AppendLine($"'{Code}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Level), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" level: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Level)) + { + builder.Append(" level: "); + builder.AppendLine($"'{Level.Value.ToSerialString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DisplayStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" displayStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DisplayStatus)) + { + builder.Append(" displayStatus: "); + if (DisplayStatus.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DisplayStatus}'''"); + } + else + { + builder.AppendLine($"'{DisplayStatus}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Message), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" message: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Message)) + { + builder.Append(" message: "); + if (Message.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Message}'''"); + } + else + { + builder.AppendLine($"'{Message}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Time), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" time: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Time)) + { + builder.Append(" time: "); + var formattedDateTimeString = TypeFormatters.ToString(Time.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -154,6 +270,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(ExtensionsResourceStatus)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/ExtensionsResourceStatus.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/ExtensionsResourceStatus.cs index 304e2658ca917..70e489109b5b6 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/ExtensionsResourceStatus.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/ExtensionsResourceStatus.cs @@ -68,14 +68,19 @@ internal ExtensionsResourceStatus(string code, ExtensionsStatusLevelType? level, } /// The status code. + [WirePath("code")] public string Code { get; } /// The level code. + [WirePath("level")] public ExtensionsStatusLevelType? Level { get; } /// The short localizable label for the status. + [WirePath("displayStatus")] public string DisplayStatus { get; } /// The detailed status message, including for alerts and error messages. + [WirePath("message")] public string Message { get; } /// The time of the status. + [WirePath("time")] public DateTimeOffset? Time { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/GatewaysListResult.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/GatewaysListResult.Serialization.cs new file mode 100644 index 0000000000000..0866e51fe917d --- /dev/null +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/GatewaysListResult.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HybridCompute.Models +{ + internal partial class GatewaysListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GatewaysListResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + GatewaysListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GatewaysListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGatewaysListResult(document.RootElement, options); + } + + internal static GatewaysListResult DeserializeGatewaysListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(HybridComputeGatewayData.DeserializeHybridComputeGatewayData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new GatewaysListResult(value, nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(GatewaysListResult)} does not support writing '{options.Format}' format."); + } + } + + GatewaysListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeGatewaysListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GatewaysListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/GatewaysListResult.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/GatewaysListResult.cs new file mode 100644 index 0000000000000..3107e4575849d --- /dev/null +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/GatewaysListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.HybridCompute.Models +{ + /// The List license operation response. + internal partial class GatewaysListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The list of Gateways. + /// is null. + internal GatewaysListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The list of Gateways. + /// The URI to fetch the next page of Gateways. Call ListNext() with this URI to fetch the next page of Gateways. + /// Keeps track of any properties unknown to the library. + internal GatewaysListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal GatewaysListResult() + { + } + + /// The list of Gateways. + public IReadOnlyList Value { get; } + /// The URI to fetch the next page of Gateways. Call ListNext() with this URI to fetch the next page of Gateways. + public string NextLink { get; } + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HotpatchEnablementStatus.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HotpatchEnablementStatus.cs new file mode 100644 index 0000000000000..341cc0dd4b54d --- /dev/null +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HotpatchEnablementStatus.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.HybridCompute.Models +{ + /// Status of hotpatch enablement or disablement. + public readonly partial struct HotpatchEnablementStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public HotpatchEnablementStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UnknownValue = "Unknown"; + private const string PendingEvaluationValue = "PendingEvaluation"; + private const string DisabledValue = "Disabled"; + private const string ActionRequiredValue = "ActionRequired"; + private const string EnabledValue = "Enabled"; + + /// Unknown. + public static HotpatchEnablementStatus Unknown { get; } = new HotpatchEnablementStatus(UnknownValue); + /// PendingEvaluation. + public static HotpatchEnablementStatus PendingEvaluation { get; } = new HotpatchEnablementStatus(PendingEvaluationValue); + /// Disabled. + public static HotpatchEnablementStatus Disabled { get; } = new HotpatchEnablementStatus(DisabledValue); + /// ActionRequired. + public static HotpatchEnablementStatus ActionRequired { get; } = new HotpatchEnablementStatus(ActionRequiredValue); + /// Enabled. + public static HotpatchEnablementStatus Enabled { get; } = new HotpatchEnablementStatus(EnabledValue); + /// Determines if two values are the same. + public static bool operator ==(HotpatchEnablementStatus left, HotpatchEnablementStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(HotpatchEnablementStatus left, HotpatchEnablementStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator HotpatchEnablementStatus(string value) => new HotpatchEnablementStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is HotpatchEnablementStatus other && Equals(other); + /// + public bool Equals(HotpatchEnablementStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeAccessRule.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeAccessRule.Serialization.cs index 6f702a661e5ef..cff9a4228c815 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeAccessRule.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeAccessRule.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -143,6 +145,98 @@ internal static HybridComputeAccessRule DeserializeHybridComputeAccessRule(JsonE return new HybridComputeAccessRule(name, direction, addressPrefixes ?? new ChangeTrackingList(), serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Direction), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" direction: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Direction)) + { + builder.Append(" direction: "); + builder.AppendLine($"'{Direction.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AddressPrefixes), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" addressPrefixes: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(AddressPrefixes)) + { + if (AddressPrefixes.Any()) + { + builder.Append(" addressPrefixes: "); + builder.AppendLine("["); + foreach (var item in AddressPrefixes) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -151,6 +245,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpt { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(HybridComputeAccessRule)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeAccessRule.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeAccessRule.cs index e4bbfdcaa8b44..cea6595d383f9 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeAccessRule.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeAccessRule.cs @@ -65,10 +65,13 @@ internal HybridComputeAccessRule(string name, HybridComputeAccessRuleDirection? } /// Name of the access rule. + [WirePath("name")] public string Name { get; } /// Direction of the access rule. + [WirePath("properties.direction")] public HybridComputeAccessRuleDirection? Direction { get; } /// Address prefixes that are allowed access. + [WirePath("properties.addressPrefixes")] public IReadOnlyList AddressPrefixes { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeCloudMetadata.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeCloudMetadata.Serialization.cs index 373910d77fa80..a922538bad964 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeCloudMetadata.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeCloudMetadata.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -88,6 +89,44 @@ internal static HybridComputeCloudMetadata DeserializeHybridComputeCloudMetadata return new HybridComputeCloudMetadata(provider, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Provider), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provider: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Provider)) + { + builder.Append(" provider: "); + if (Provider.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Provider}'''"); + } + else + { + builder.AppendLine($"'{Provider}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -96,6 +135,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriter { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(HybridComputeCloudMetadata)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeCloudMetadata.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeCloudMetadata.cs index 4a4f5cb1ea6b2..4023e24419058 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeCloudMetadata.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeCloudMetadata.cs @@ -60,6 +60,7 @@ internal HybridComputeCloudMetadata(string provider, IDictionary Specifies the cloud provider (Azure/AWS/GCP...). + [WirePath("provider")] public string Provider { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeConfigurationExtension.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeConfigurationExtension.Serialization.cs index 772b1983c8b90..2e9c06b69ade3 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeConfigurationExtension.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeConfigurationExtension.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -99,6 +100,67 @@ internal static HybridComputeConfigurationExtension DeserializeHybridComputeConf return new HybridComputeConfigurationExtension(publisher, type, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Publisher), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" publisher: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Publisher)) + { + builder.Append(" publisher: "); + if (Publisher.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Publisher}'''"); + } + else + { + builder.AppendLine($"'{Publisher}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ConfigurationExtensionType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ConfigurationExtensionType)) + { + builder.Append(" type: "); + if (ConfigurationExtensionType.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ConfigurationExtensionType}'''"); + } + else + { + builder.AppendLine($"'{ConfigurationExtensionType}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -107,6 +169,8 @@ BinaryData IPersistableModel.Write(ModelRea { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(HybridComputeConfigurationExtension)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeConfigurationExtension.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeConfigurationExtension.cs index 0a8f90a756630..34adde2d9e186 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeConfigurationExtension.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeConfigurationExtension.cs @@ -62,8 +62,10 @@ internal HybridComputeConfigurationExtension(string publisher, string configurat } /// Publisher of the extension. + [WirePath("publisher")] public string Publisher { get; } /// Type of the extension. + [WirePath("type")] public string ConfigurationExtensionType { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeConnectionDetail.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeConnectionDetail.Serialization.cs index 478856f62e89d..ca9ca16934411 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeConnectionDetail.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeConnectionDetail.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -142,6 +143,128 @@ internal static HybridComputeConnectionDetail DeserializeHybridComputeConnection serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PrivateIPAddress), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" privateIpAddress: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PrivateIPAddress)) + { + builder.Append(" privateIpAddress: "); + if (PrivateIPAddress.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PrivateIPAddress}'''"); + } + else + { + builder.AppendLine($"'{PrivateIPAddress}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LinkIdentifier), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" linkIdentifier: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LinkIdentifier)) + { + builder.Append(" linkIdentifier: "); + if (LinkIdentifier.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{LinkIdentifier}'''"); + } + else + { + builder.AppendLine($"'{LinkIdentifier}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GroupId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" groupId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(GroupId)) + { + builder.Append(" groupId: "); + if (GroupId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{GroupId}'''"); + } + else + { + builder.AppendLine($"'{GroupId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MemberName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" memberName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MemberName)) + { + builder.Append(" memberName: "); + if (MemberName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{MemberName}'''"); + } + else + { + builder.AppendLine($"'{MemberName}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -150,6 +273,8 @@ BinaryData IPersistableModel.Write(ModelReaderWri { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(HybridComputeConnectionDetail)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeConnectionDetail.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeConnectionDetail.cs index defda0c80bc76..fc17712617a82 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeConnectionDetail.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeConnectionDetail.cs @@ -69,14 +69,19 @@ internal HybridComputeConnectionDetail(ResourceIdentifier id, string privateIPAd } /// Azure resource Id. + [WirePath("id")] public ResourceIdentifier Id { get; } /// The private endpoint connection private ip address. + [WirePath("privateIpAddress")] public string PrivateIPAddress { get; } /// The private endpoint connection link identifier. + [WirePath("linkIdentifier")] public string LinkIdentifier { get; } /// The private endpoint connection group id. + [WirePath("groupId")] public string GroupId { get; } /// The private endpoint connection member name. + [WirePath("memberName")] public string MemberName { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeGatewayPatch.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeGatewayPatch.Serialization.cs new file mode 100644 index 0000000000000..97dcd7ef71034 --- /dev/null +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeGatewayPatch.Serialization.cs @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HybridCompute.Models +{ + public partial class HybridComputeGatewayPatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HybridComputeGatewayPatch)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(AllowedFeatures)) + { + writer.WritePropertyName("allowedFeatures"u8); + writer.WriteStartArray(); + foreach (var item in AllowedFeatures) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + HybridComputeGatewayPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HybridComputeGatewayPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeHybridComputeGatewayPatch(document.RootElement, options); + } + + internal static HybridComputeGatewayPatch DeserializeHybridComputeGatewayPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + IList allowedFeatures = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("allowedFeatures"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + allowedFeatures = array; + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new HybridComputeGatewayPatch(tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, allowedFeatures ?? new ChangeTrackingList()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(HybridComputeGatewayPatch)} does not support writing '{options.Format}' format."); + } + } + + HybridComputeGatewayPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeHybridComputeGatewayPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(HybridComputeGatewayPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeGatewayPatch.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeGatewayPatch.cs new file mode 100644 index 0000000000000..8912c0a329dd7 --- /dev/null +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeGatewayPatch.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.HybridCompute.Models +{ + /// Describes a License Update. + public partial class HybridComputeGatewayPatch : HybridComputeResourceUpdate + { + /// Initializes a new instance of . + public HybridComputeGatewayPatch() + { + AllowedFeatures = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Resource tags. + /// Keeps track of any properties unknown to the library. + /// Specifies the list of features that are enabled for this Gateway. + internal HybridComputeGatewayPatch(IDictionary tags, IDictionary serializedAdditionalRawData, IList allowedFeatures) : base(tags, serializedAdditionalRawData) + { + AllowedFeatures = allowedFeatures; + } + + /// Specifies the list of features that are enabled for this Gateway. + [WirePath("properties.allowedFeatures")] + public IList AllowedFeatures { get; } + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeGatewayType.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeGatewayType.cs new file mode 100644 index 0000000000000..5744d61890379 --- /dev/null +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeGatewayType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.HybridCompute.Models +{ + /// The type of the Gateway resource. + public readonly partial struct HybridComputeGatewayType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public HybridComputeGatewayType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PublicValue = "Public"; + + /// Public. + public static HybridComputeGatewayType Public { get; } = new HybridComputeGatewayType(PublicValue); + /// Determines if two values are the same. + public static bool operator ==(HybridComputeGatewayType left, HybridComputeGatewayType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(HybridComputeGatewayType left, HybridComputeGatewayType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator HybridComputeGatewayType(string value) => new HybridComputeGatewayType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is HybridComputeGatewayType other && Equals(other); + /// + public bool Equals(HybridComputeGatewayType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeIPAddress.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeIPAddress.Serialization.cs index 421d813a10d7b..8ea18f4a48a8f 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeIPAddress.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeIPAddress.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -114,6 +115,85 @@ internal static HybridComputeIPAddress DeserializeHybridComputeIPAddress(JsonEle return new HybridComputeIPAddress(address, ipAddressVersion, subnet, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Address), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" address: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Address)) + { + builder.Append(" address: "); + if (Address.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Address}'''"); + } + else + { + builder.AppendLine($"'{Address}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IPAddressVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" ipAddressVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IPAddressVersion)) + { + builder.Append(" ipAddressVersion: "); + if (IPAddressVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{IPAddressVersion}'''"); + } + else + { + builder.AppendLine($"'{IPAddressVersion}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("SubnetAddressPrefix", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subnet: "); + builder.AppendLine("{"); + builder.Append(" addressPrefix: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Subnet)) + { + builder.Append(" subnet: "); + BicepSerializationHelpers.AppendChildObject(builder, Subnet, options, 2, false, " subnet: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -122,6 +202,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(HybridComputeIPAddress)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeIPAddress.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeIPAddress.cs index b6923b8a08fbc..93f199eb8d310 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeIPAddress.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeIPAddress.cs @@ -64,12 +64,15 @@ internal HybridComputeIPAddress(string address, string ipAddressVersion, HybridC } /// Represents the IP Address. + [WirePath("address")] public string Address { get; } /// Represents the Ip Address Version. + [WirePath("ipAddressVersion")] public string IPAddressVersion { get; } /// The subnet to which this IP address belongs. internal HybridComputeSubnet Subnet { get; } /// Represents address prefix. + [WirePath("subnet.addressPrefix")] public string SubnetAddressPrefix { get => Subnet?.AddressPrefix; diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeLicenseDetails.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeLicenseDetails.Serialization.cs index 6e8c2fa9f43d5..b594e5b2a8d58 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeLicenseDetails.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeLicenseDetails.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -212,6 +214,157 @@ internal static HybridComputeLicenseDetails DeserializeHybridComputeLicenseDetai serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(State), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" state: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(State)) + { + builder.Append(" state: "); + builder.AppendLine($"'{State.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Target), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" target: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Target)) + { + builder.Append(" target: "); + builder.AppendLine($"'{Target.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Edition), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" edition: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Edition)) + { + builder.Append(" edition: "); + builder.AppendLine($"'{Edition.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LicenseCoreType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LicenseCoreType)) + { + builder.Append(" type: "); + builder.AppendLine($"'{LicenseCoreType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Processors), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" processors: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Processors)) + { + builder.Append(" processors: "); + builder.AppendLine($"{Processors.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AssignedLicenses), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" assignedLicenses: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AssignedLicenses)) + { + builder.Append(" assignedLicenses: "); + builder.AppendLine($"{AssignedLicenses.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ImmutableId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" immutableId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ImmutableId)) + { + builder.Append(" immutableId: "); + if (ImmutableId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ImmutableId}'''"); + } + else + { + builder.AppendLine($"'{ImmutableId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VolumeLicenseDetails), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" volumeLicenseDetails: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(VolumeLicenseDetails)) + { + if (VolumeLicenseDetails.Any()) + { + builder.Append(" volumeLicenseDetails: "); + builder.AppendLine("["); + foreach (var item in VolumeLicenseDetails) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " volumeLicenseDetails: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -220,6 +373,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrite { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(HybridComputeLicenseDetails)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeLicenseDetails.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeLicenseDetails.cs index 219ee734dc509..167440b82eb67 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeLicenseDetails.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeLicenseDetails.cs @@ -75,20 +75,28 @@ internal HybridComputeLicenseDetails(HybridComputeLicenseState? state, HybridCom } /// Describes the state of the license. + [WirePath("state")] public HybridComputeLicenseState? State { get; set; } /// Describes the license target server. + [WirePath("target")] public HybridComputeLicenseTarget? Target { get; set; } /// Describes the edition of the license. The values are either Standard or Datacenter. + [WirePath("edition")] public HybridComputeLicenseEdition? Edition { get; set; } /// Describes the license core type (pCore or vCore). + [WirePath("type")] public LicenseCoreType? LicenseCoreType { get; set; } /// Describes the number of processors. + [WirePath("processors")] public int? Processors { get; set; } /// Describes the number of assigned licenses. + [WirePath("assignedLicenses")] public int? AssignedLicenses { get; } /// Describes the immutable id. + [WirePath("immutableId")] public string ImmutableId { get; } /// A list of volume license details. + [WirePath("volumeLicenseDetails")] public IList VolumeLicenseDetails { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeLinuxConfiguration.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeLinuxConfiguration.Serialization.cs index 72803a088e087..00b33f09eaef9 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeLinuxConfiguration.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeLinuxConfiguration.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -38,6 +39,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WritePropertyName("patchMode"u8); writer.WriteStringValue(PatchMode.Value.ToString()); } + if (Optional.IsDefined(IsHotpatchingEnabled)) + { + writer.WritePropertyName("enableHotpatching"u8); + writer.WriteBooleanValue(IsHotpatchingEnabled.Value); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteObjectValue(Status, options); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -79,6 +90,8 @@ internal static HybridComputeLinuxConfiguration DeserializeHybridComputeLinuxCon } AssessmentModeType? assessmentMode = default; PatchModeType? patchMode = default; + bool? enableHotpatching = default; + HybridComputePatchSettingsStatus status = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -110,6 +123,24 @@ internal static HybridComputeLinuxConfiguration DeserializeHybridComputeLinuxCon patchMode = new PatchModeType(property0.Value.GetString()); continue; } + if (property0.NameEquals("enableHotpatching"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableHotpatching = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("status"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = HybridComputePatchSettingsStatus.DeserializeHybridComputePatchSettingsStatus(property0.Value, options); + continue; + } } continue; } @@ -119,7 +150,86 @@ internal static HybridComputeLinuxConfiguration DeserializeHybridComputeLinuxCon } } serializedAdditionalRawData = rawDataDictionary; - return new HybridComputeLinuxConfiguration(assessmentMode, patchMode, serializedAdditionalRawData); + return new HybridComputeLinuxConfiguration(assessmentMode, patchMode, enableHotpatching, status, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + builder.Append(" patchSettings:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AssessmentMode), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" assessmentMode: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AssessmentMode)) + { + builder.Append(" assessmentMode: "); + builder.AppendLine($"'{AssessmentMode.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PatchMode), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" patchMode: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PatchMode)) + { + builder.Append(" patchMode: "); + builder.AppendLine($"'{PatchMode.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsHotpatchingEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enableHotpatching: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsHotpatchingEnabled)) + { + builder.Append(" enableHotpatching: "); + var boolValue = IsHotpatchingEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" status: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Status)) + { + builder.Append(" status: "); + BicepSerializationHelpers.AppendChildObject(builder, Status, options, 4, false, " status: "); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) @@ -130,6 +240,8 @@ BinaryData IPersistableModel.Write(ModelReaderW { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(HybridComputeLinuxConfiguration)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeLinuxConfiguration.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeLinuxConfiguration.cs index 026b8de348ff0..db82aae1d2776 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeLinuxConfiguration.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeLinuxConfiguration.cs @@ -53,17 +53,29 @@ public HybridComputeLinuxConfiguration() /// Initializes a new instance of . /// Specifies the assessment mode. /// Specifies the patch mode. + /// Captures the hotpatch capability enrollment intent of the customers, which enables customers to patch their Windows machines without requiring a reboot. + /// Status of the hotpatch capability enrollment or disenrollment. /// Keeps track of any properties unknown to the library. - internal HybridComputeLinuxConfiguration(AssessmentModeType? assessmentMode, PatchModeType? patchMode, IDictionary serializedAdditionalRawData) + internal HybridComputeLinuxConfiguration(AssessmentModeType? assessmentMode, PatchModeType? patchMode, bool? isHotpatchingEnabled, HybridComputePatchSettingsStatus status, IDictionary serializedAdditionalRawData) { AssessmentMode = assessmentMode; PatchMode = patchMode; + IsHotpatchingEnabled = isHotpatchingEnabled; + Status = status; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Specifies the assessment mode. + [WirePath("patchSettings.assessmentMode")] public AssessmentModeType? AssessmentMode { get; set; } /// Specifies the patch mode. + [WirePath("patchSettings.patchMode")] public PatchModeType? PatchMode { get; set; } + /// Captures the hotpatch capability enrollment intent of the customers, which enables customers to patch their Windows machines without requiring a reboot. + [WirePath("patchSettings.enableHotpatching")] + public bool? IsHotpatchingEnabled { get; set; } + /// Status of the hotpatch capability enrollment or disenrollment. + [WirePath("patchSettings.status")] + public HybridComputePatchSettingsStatus Status { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeLinuxParameters.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeLinuxParameters.cs index d3321efcb4da6..ddcf82172b5a7 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeLinuxParameters.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeLinuxParameters.cs @@ -67,10 +67,13 @@ internal HybridComputeLinuxParameters(IList cla } /// The update classifications to select when installing patches for Linux. + [WirePath("classificationsToInclude")] public IList ClassificationsToInclude { get; } /// packages to include in the patch operation. Format: packageName_packageVersion. + [WirePath("packageNameMasksToInclude")] public IList PackageNameMasksToInclude { get; } /// packages to exclude in the patch operation. Format: packageName_packageVersion. + [WirePath("packageNameMasksToExclude")] public IList PackageNameMasksToExclude { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeLocation.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeLocation.Serialization.cs index 9b7ba79d0e12f..5ccfec744ac7a 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeLocation.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeLocation.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -118,6 +119,113 @@ internal static HybridComputeLocation DeserializeHybridComputeLocation(JsonEleme return new HybridComputeLocation(name, city, district, countryOrRegion, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(City), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" city: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(City)) + { + builder.Append(" city: "); + if (City.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{City}'''"); + } + else + { + builder.AppendLine($"'{City}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(District), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" district: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(District)) + { + builder.Append(" district: "); + if (District.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{District}'''"); + } + else + { + builder.AppendLine($"'{District}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CountryOrRegion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" countryOrRegion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CountryOrRegion)) + { + builder.Append(" countryOrRegion: "); + if (CountryOrRegion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{CountryOrRegion}'''"); + } + else + { + builder.AppendLine($"'{CountryOrRegion}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -126,6 +234,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptio { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(HybridComputeLocation)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeLocation.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeLocation.cs index b71dd36a80d1d..89fcec21a5f34 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeLocation.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeLocation.cs @@ -76,12 +76,16 @@ internal HybridComputeLocation() } /// A canonical name for the geographic or physical location. + [WirePath("name")] public string Name { get; set; } /// The city or locality where the resource is located. + [WirePath("city")] public string City { get; set; } /// The district, state, or province where the resource is located. + [WirePath("district")] public string District { get; set; } /// The country or region where the resource is located. + [WirePath("countryOrRegion")] public string CountryOrRegion { get; set; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeMachineExtensionPatch.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeMachineExtensionPatch.cs index 5cb6417566ed4..05890a0dbb78d 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeMachineExtensionPatch.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeMachineExtensionPatch.cs @@ -44,16 +44,22 @@ internal HybridComputeMachineExtensionPatch(IDictionary tags, ID } /// How the extension handler should be forced to update even if the extension configuration has not changed. + [WirePath("properties.forceUpdateTag")] public string ForceUpdateTag { get; set; } /// The name of the extension handler publisher. + [WirePath("properties.publisher")] public string Publisher { get; set; } /// Specifies the type of the extension; an example is "CustomScriptExtension". + [WirePath("properties.type")] public string MachineExtensionUpdatePropertiesType { get; set; } /// Specifies the version of the script handler. + [WirePath("properties.typeHandlerVersion")] public string TypeHandlerVersion { get; set; } /// Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. + [WirePath("properties.enableAutomaticUpgrade")] public bool? EnableAutomaticUpgrade { get; set; } /// Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. + [WirePath("properties.autoUpgradeMinorVersion")] public bool? AutoUpgradeMinorVersion { get; set; } /// /// Json formatted public settings for the extension. @@ -85,6 +91,7 @@ internal HybridComputeMachineExtensionPatch(IDictionary tags, ID /// /// /// + [WirePath("properties.settings")] public IDictionary Settings { get; } /// /// The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. @@ -116,6 +123,7 @@ internal HybridComputeMachineExtensionPatch(IDictionary tags, ID /// /// /// + [WirePath("properties.protectedSettings")] public IDictionary ProtectedSettings { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeMachinePatch.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeMachinePatch.cs index 6d125a87536fa..e7b6f3c6ad578 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeMachinePatch.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeMachinePatch.cs @@ -44,26 +44,34 @@ internal HybridComputeMachinePatch(IDictionary tags, IDictionary } /// Identity for the resource. Current supported identity types: SystemAssigned. + [WirePath("identity")] public ManagedServiceIdentity Identity { get; set; } /// Indicates which kind of Arc machine placement on-premises, such as HCI, SCVMM or VMware etc. + [WirePath("kind")] public ArcKindEnum? Kind { get; set; } /// Metadata pertaining to the geographic location of the resource. + [WirePath("properties.locationData")] public HybridComputeLocation LocationData { get; set; } /// Specifies the operating system settings for the hybrid machine. + [WirePath("properties.osProfile")] public HybridComputeOSProfile OSProfile { get; set; } /// The metadata of the cloud environment (Azure/GCP/AWS/OCI...). internal HybridComputeCloudMetadata CloudMetadata { get; set; } /// Specifies the cloud provider (Azure/AWS/GCP...). + [WirePath("properties.cloudMetadata.provider")] public string CloudMetadataProvider { get => CloudMetadata is null ? default : CloudMetadata.Provider; } /// The info of the machine w.r.t Agent Upgrade. + [WirePath("properties.agentUpgrade")] public AgentUpgrade AgentUpgrade { get; set; } /// The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. + [WirePath("properties.parentClusterResourceId")] public ResourceIdentifier ParentClusterResourceId { get; set; } /// The resource id of the private link scope this machine is assigned to, if any. + [WirePath("properties.privateLinkScopeResourceId")] public ResourceIdentifier PrivateLinkScopeResourceId { get; set; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeNetworkInterface.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeNetworkInterface.Serialization.cs index 84693d57ee586..d3c2e6b2ea9f7 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeNetworkInterface.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeNetworkInterface.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -102,6 +104,44 @@ internal static HybridComputeNetworkInterface DeserializeHybridComputeNetworkInt return new HybridComputeNetworkInterface(ipAddresses ?? new ChangeTrackingList(), serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IPAddresses), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" ipAddresses: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(IPAddresses)) + { + if (IPAddresses.Any()) + { + builder.Append(" ipAddresses: "); + builder.AppendLine("["); + foreach (var item in IPAddresses) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " ipAddresses: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -110,6 +150,8 @@ BinaryData IPersistableModel.Write(ModelReaderWri { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(HybridComputeNetworkInterface)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeNetworkInterface.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeNetworkInterface.cs index 5c084f994faee..6ab24bc2b696b 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeNetworkInterface.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeNetworkInterface.cs @@ -61,6 +61,7 @@ internal HybridComputeNetworkInterface(IReadOnlyList ipA } /// The list of IP addresses in this interface. + [WirePath("ipAddresses")] public IReadOnlyList IPAddresses { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeNetworkProfile.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeNetworkProfile.Serialization.cs index 5248aae574ce2..c97700e9f1654 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeNetworkProfile.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeNetworkProfile.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -102,6 +104,44 @@ internal static HybridComputeNetworkProfile DeserializeHybridComputeNetworkProfi return new HybridComputeNetworkProfile(networkInterfaces ?? new ChangeTrackingList(), serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NetworkInterfaces), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" networkInterfaces: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(NetworkInterfaces)) + { + if (NetworkInterfaces.Any()) + { + builder.Append(" networkInterfaces: "); + builder.AppendLine("["); + foreach (var item in NetworkInterfaces) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " networkInterfaces: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -110,6 +150,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrite { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(HybridComputeNetworkProfile)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeNetworkProfile.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeNetworkProfile.cs index 4cdea74052f1b..2b7746587767d 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeNetworkProfile.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeNetworkProfile.cs @@ -61,6 +61,7 @@ internal HybridComputeNetworkProfile(IReadOnlyList The list of network interfaces. + [WirePath("networkInterfaces")] public IReadOnlyList NetworkInterfaces { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeOSProfile.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeOSProfile.Serialization.cs index 904c3c0ad4be4..7533936242e94 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeOSProfile.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeOSProfile.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -118,6 +119,74 @@ internal static HybridComputeOSProfile DeserializeHybridComputeOSProfile(JsonEle return new HybridComputeOSProfile(computerName, windowsConfiguration, linuxConfiguration, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ComputerName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" computerName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ComputerName)) + { + builder.Append(" computerName: "); + if (ComputerName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ComputerName}'''"); + } + else + { + builder.AppendLine($"'{ComputerName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(WindowsConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" windowsConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(WindowsConfiguration)) + { + builder.Append(" windowsConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, WindowsConfiguration, options, 2, false, " windowsConfiguration: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LinuxConfiguration), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" linuxConfiguration: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LinuxConfiguration)) + { + builder.Append(" linuxConfiguration: "); + BicepSerializationHelpers.AppendChildObject(builder, LinuxConfiguration, options, 2, false, " linuxConfiguration: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -126,6 +195,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpti { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(HybridComputeOSProfile)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeOSProfile.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeOSProfile.cs index 02746d8221705..5fe9c1e4f1460 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeOSProfile.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeOSProfile.cs @@ -64,10 +64,13 @@ internal HybridComputeOSProfile(string computerName, HybridComputeWindowsConfigu } /// Specifies the host OS name of the hybrid machine. + [WirePath("computerName")] public string ComputerName { get; } /// Specifies the windows configuration for update management. + [WirePath("windowsConfiguration")] public HybridComputeWindowsConfiguration WindowsConfiguration { get; set; } /// Specifies the linux configuration for update management. + [WirePath("linuxConfiguration")] public HybridComputeLinuxConfiguration LinuxConfiguration { get; set; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePatchSettingsStatus.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePatchSettingsStatus.Serialization.cs new file mode 100644 index 0000000000000..0a96fc9b361f8 --- /dev/null +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePatchSettingsStatus.Serialization.cs @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.HybridCompute.Models +{ + public partial class HybridComputePatchSettingsStatus : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HybridComputePatchSettingsStatus)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(HotpatchEnablementStatus)) + { + writer.WritePropertyName("hotpatchEnablementStatus"u8); + writer.WriteStringValue(HotpatchEnablementStatus.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + JsonSerializer.Serialize(writer, Error); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + HybridComputePatchSettingsStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HybridComputePatchSettingsStatus)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeHybridComputePatchSettingsStatus(document.RootElement, options); + } + + internal static HybridComputePatchSettingsStatus DeserializeHybridComputePatchSettingsStatus(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + HotpatchEnablementStatus? hotpatchEnablementStatus = default; + ResponseError error = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("hotpatchEnablementStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + hotpatchEnablementStatus = new HotpatchEnablementStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new HybridComputePatchSettingsStatus(hotpatchEnablementStatus, error, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(HotpatchEnablementStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" hotpatchEnablementStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(HotpatchEnablementStatus)) + { + builder.Append(" hotpatchEnablementStatus: "); + builder.AppendLine($"'{HotpatchEnablementStatus.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Error), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" error: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Error)) + { + builder.Append(" error: "); + BicepSerializationHelpers.AppendChildObject(builder, Error, options, 2, false, " error: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(HybridComputePatchSettingsStatus)} does not support writing '{options.Format}' format."); + } + } + + HybridComputePatchSettingsStatus IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeHybridComputePatchSettingsStatus(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(HybridComputePatchSettingsStatus)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePatchSettingsStatus.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePatchSettingsStatus.cs new file mode 100644 index 0000000000000..5b722d4da27f4 --- /dev/null +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePatchSettingsStatus.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.HybridCompute.Models +{ + /// Status of the hotpatch capability enrollment or disenrollment. + public partial class HybridComputePatchSettingsStatus + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal HybridComputePatchSettingsStatus() + { + } + + /// Initializes a new instance of . + /// Indicates the current status of the hotpatch being enabled or disabled. + /// The errors that were encountered during the hotpatch capability enrollment or disenrollment. + /// Keeps track of any properties unknown to the library. + internal HybridComputePatchSettingsStatus(HotpatchEnablementStatus? hotpatchEnablementStatus, ResponseError error, IDictionary serializedAdditionalRawData) + { + HotpatchEnablementStatus = hotpatchEnablementStatus; + Error = error; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Indicates the current status of the hotpatch being enabled or disabled. + [WirePath("hotpatchEnablementStatus")] + public HotpatchEnablementStatus? HotpatchEnablementStatus { get; } + /// The errors that were encountered during the hotpatch capability enrollment or disenrollment. + [WirePath("error")] + public ResponseError Error { get; } + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateEndpointConnectionListResult.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateEndpointConnectionListResult.Serialization.cs index 71e26b693faf6..1a1a74ffcccf3 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateEndpointConnectionListResult.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateEndpointConnectionListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -113,6 +115,67 @@ internal static HybridComputePrivateEndpointConnectionListResult DeserializeHybr return new HybridComputePrivateEndpointConnectionListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -121,6 +184,8 @@ BinaryData IPersistableModel.W { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(HybridComputePrivateEndpointConnectionListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateEndpointConnectionProperties.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateEndpointConnectionProperties.Serialization.cs index 27a04002966a4..319ed3656678b 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateEndpointConnectionProperties.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateEndpointConnectionProperties.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Resources.Models; @@ -144,6 +146,113 @@ internal static HybridComputePrivateEndpointConnectionProperties DeserializeHybr return new HybridComputePrivateEndpointConnectionProperties(privateEndpoint, privateLinkServiceConnectionState, provisioningState, groupIds ?? new ChangeTrackingList(), serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("PrivateEndpointId", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" privateEndpoint: "); + builder.AppendLine("{"); + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(PrivateEndpoint)) + { + builder.Append(" privateEndpoint: "); + BicepSerializationHelpers.AppendChildObject(builder, PrivateEndpoint, options, 2, false, " privateEndpoint: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ConnectionState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" privateLinkServiceConnectionState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ConnectionState)) + { + builder.Append(" privateLinkServiceConnectionState: "); + BicepSerializationHelpers.AppendChildObject(builder, ConnectionState, options, 2, false, " privateLinkServiceConnectionState: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + if (ProvisioningState.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ProvisioningState}'''"); + } + else + { + builder.AppendLine($"'{ProvisioningState}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GroupIds), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" groupIds: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(GroupIds)) + { + if (GroupIds.Any()) + { + builder.Append(" groupIds: "); + builder.AppendLine("["); + foreach (var item in GroupIds) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -152,6 +261,8 @@ BinaryData IPersistableModel.W { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(HybridComputePrivateEndpointConnectionProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateEndpointConnectionProperties.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateEndpointConnectionProperties.cs index 832ce88beea15..1982643b3e35b 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateEndpointConnectionProperties.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateEndpointConnectionProperties.cs @@ -71,6 +71,7 @@ internal HybridComputePrivateEndpointConnectionProperties(WritableSubResource pr /// Private endpoint which the connection belongs to. internal WritableSubResource PrivateEndpoint { get; set; } /// Gets or sets Id. + [WirePath("privateEndpoint.id")] public ResourceIdentifier PrivateEndpointId { get => PrivateEndpoint is null ? default : PrivateEndpoint.Id; @@ -83,10 +84,13 @@ public ResourceIdentifier PrivateEndpointId } /// Connection state of the private endpoint connection. + [WirePath("privateLinkServiceConnectionState")] public HybridComputePrivateLinkServiceConnectionStateProperty ConnectionState { get; set; } /// State of the private endpoint connection. + [WirePath("provisioningState")] public string ProvisioningState { get; } /// List of group IDs. + [WirePath("groupIds")] public IReadOnlyList GroupIds { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateLinkResourceListResult.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateLinkResourceListResult.Serialization.cs index d8a7dafea0a98..af5794f314b40 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateLinkResourceListResult.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateLinkResourceListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -113,6 +115,67 @@ internal static HybridComputePrivateLinkResourceListResult DeserializeHybridComp return new HybridComputePrivateLinkResourceListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -121,6 +184,8 @@ BinaryData IPersistableModel.Write(M { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(HybridComputePrivateLinkResourceListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateLinkResourceProperties.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateLinkResourceProperties.Serialization.cs index 88fea252b2d16..2c719ee1c5eef 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateLinkResourceProperties.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateLinkResourceProperties.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -138,6 +140,116 @@ internal static HybridComputePrivateLinkResourceProperties DeserializeHybridComp return new HybridComputePrivateLinkResourceProperties(groupId, requiredMembers ?? new ChangeTrackingList(), requiredZoneNames ?? new ChangeTrackingList(), serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GroupId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" groupId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(GroupId)) + { + builder.Append(" groupId: "); + if (GroupId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{GroupId}'''"); + } + else + { + builder.AppendLine($"'{GroupId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RequiredMembers), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" requiredMembers: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(RequiredMembers)) + { + if (RequiredMembers.Any()) + { + builder.Append(" requiredMembers: "); + builder.AppendLine("["); + foreach (var item in RequiredMembers) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RequiredZoneNames), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" requiredZoneNames: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(RequiredZoneNames)) + { + if (RequiredZoneNames.Any()) + { + builder.Append(" requiredZoneNames: "); + builder.AppendLine("["); + foreach (var item in RequiredZoneNames) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -146,6 +258,8 @@ BinaryData IPersistableModel.Write(M { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(HybridComputePrivateLinkResourceProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateLinkResourceProperties.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateLinkResourceProperties.cs index 0a60f243e93ba..f74d18d420f66 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateLinkResourceProperties.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateLinkResourceProperties.cs @@ -66,10 +66,13 @@ internal HybridComputePrivateLinkResourceProperties(string groupId, IReadOnlyLis } /// The private link resource group id. + [WirePath("groupId")] public string GroupId { get; } /// The private link resource required member names. + [WirePath("requiredMembers")] public IReadOnlyList RequiredMembers { get; } /// Required DNS zone names of the the private link resource. + [WirePath("requiredZoneNames")] public IReadOnlyList RequiredZoneNames { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateLinkScopeListResult.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateLinkScopeListResult.Serialization.cs index 7b82a66b8b83d..c5714b12cc80a 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateLinkScopeListResult.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateLinkScopeListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -106,6 +108,67 @@ internal static HybridComputePrivateLinkScopeListResult DeserializeHybridCompute return new HybridComputePrivateLinkScopeListResult(value, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -114,6 +177,8 @@ BinaryData IPersistableModel.Write(Mode { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(HybridComputePrivateLinkScopeListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateLinkScopePatch.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateLinkScopePatch.cs index a70f93b52146a..48a2963173e1a 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateLinkScopePatch.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateLinkScopePatch.cs @@ -61,6 +61,7 @@ internal HybridComputePrivateLinkScopePatch(IDictionary tags, ID } /// Resource tags. + [WirePath("tags")] public IDictionary Tags { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateLinkScopeProperties.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateLinkScopeProperties.Serialization.cs index dd168f99a864c..b4836668e1b7d 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateLinkScopeProperties.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateLinkScopeProperties.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -139,6 +141,105 @@ internal static HybridComputePrivateLinkScopeProperties DeserializeHybridCompute return new HybridComputePrivateLinkScopeProperties(publicNetworkAccess, provisioningState, privateLinkScopeId, privateEndpointConnections ?? new ChangeTrackingList(), serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublicNetworkAccess), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" publicNetworkAccess: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PublicNetworkAccess)) + { + builder.Append(" publicNetworkAccess: "); + builder.AppendLine($"'{PublicNetworkAccess.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + if (ProvisioningState.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ProvisioningState}'''"); + } + else + { + builder.AppendLine($"'{ProvisioningState}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PrivateLinkScopeId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" privateLinkScopeId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PrivateLinkScopeId)) + { + builder.Append(" privateLinkScopeId: "); + if (PrivateLinkScopeId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PrivateLinkScopeId}'''"); + } + else + { + builder.AppendLine($"'{PrivateLinkScopeId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PrivateEndpointConnections), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" privateEndpointConnections: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(PrivateEndpointConnections)) + { + if (PrivateEndpointConnections.Any()) + { + builder.Append(" privateEndpointConnections: "); + builder.AppendLine("["); + foreach (var item in PrivateEndpointConnections) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " privateEndpointConnections: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -147,6 +248,8 @@ BinaryData IPersistableModel.Write(Mode { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(HybridComputePrivateLinkScopeProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateLinkScopeProperties.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateLinkScopeProperties.cs index 00d144c536cc3..3d42a352b199c 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateLinkScopeProperties.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateLinkScopeProperties.cs @@ -67,12 +67,16 @@ internal HybridComputePrivateLinkScopeProperties(HybridComputePublicNetworkAcces } /// Indicates whether machines associated with the private link scope can also use public Azure Arc service endpoints. + [WirePath("publicNetworkAccess")] public HybridComputePublicNetworkAccessType? PublicNetworkAccess { get; set; } /// Current state of this PrivateLinkScope: whether or not is has been provisioned within the resource group it is defined. Users cannot change this value but are able to read from it. Values will include Provisioning ,Succeeded, Canceled and Failed. + [WirePath("provisioningState")] public string ProvisioningState { get; } /// The Guid id of the private link scope. + [WirePath("privateLinkScopeId")] public string PrivateLinkScopeId { get; } /// The collection of associated Private Endpoint Connections. + [WirePath("privateEndpointConnections")] public IReadOnlyList PrivateEndpointConnections { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateLinkServiceConnectionStateProperty.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateLinkServiceConnectionStateProperty.Serialization.cs index 91b610f675aa1..da971e6220305 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateLinkServiceConnectionStateProperty.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputePrivateLinkServiceConnectionStateProperty.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -104,6 +105,90 @@ internal static HybridComputePrivateLinkServiceConnectionStateProperty Deseriali return new HybridComputePrivateLinkServiceConnectionStateProperty(status, description, actionsRequired, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" status: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Status)) + { + builder.Append(" status: "); + if (Status.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Status}'''"); + } + else + { + builder.AppendLine($"'{Status}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ActionsRequired), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" actionsRequired: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ActionsRequired)) + { + builder.Append(" actionsRequired: "); + if (ActionsRequired.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ActionsRequired}'''"); + } + else + { + builder.AppendLine($"'{ActionsRequired}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -112,6 +197,8 @@ BinaryData IPersistableModel The private link service connection status. + [WirePath("status")] public string Status { get; set; } /// The private link service connection description. + [WirePath("description")] public string Description { get; set; } /// The actions required for private link service connection. + [WirePath("actionsRequired")] public string ActionsRequired { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeProductFeature.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeProductFeature.Serialization.cs index 8a04e47182834..6c718f0621668 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeProductFeature.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeProductFeature.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -36,21 +37,31 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WritePropertyName("subscriptionStatus"u8); writer.WriteStringValue(SubscriptionStatus.Value.ToString()); } - if (options.Format != "W" && Optional.IsDefined(BillingStartOn)) - { - writer.WritePropertyName("billingStartDate"u8); - writer.WriteStringValue(BillingStartOn.Value, "O"); - } if (options.Format != "W" && Optional.IsDefined(EnrollmentOn)) { writer.WritePropertyName("enrollmentDate"u8); writer.WriteStringValue(EnrollmentOn.Value, "O"); } + if (options.Format != "W" && Optional.IsDefined(BillingStartOn)) + { + writer.WritePropertyName("billingStartDate"u8); + writer.WriteStringValue(BillingStartOn.Value, "O"); + } if (options.Format != "W" && Optional.IsDefined(DisenrollmentOn)) { writer.WritePropertyName("disenrollmentDate"u8); writer.WriteStringValue(DisenrollmentOn.Value, "O"); } + if (options.Format != "W" && Optional.IsDefined(BillingEndOn)) + { + writer.WritePropertyName("billingEndDate"u8); + writer.WriteStringValue(BillingEndOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + JsonSerializer.Serialize(writer, Error); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -91,9 +102,11 @@ internal static HybridComputeProductFeature DeserializeHybridComputeProductFeatu } string name = default; LicenseProfileSubscriptionStatus? subscriptionStatus = default; - DateTimeOffset? billingStartDate = default; DateTimeOffset? enrollmentDate = default; + DateTimeOffset? billingStartDate = default; DateTimeOffset? disenrollmentDate = default; + DateTimeOffset? billingEndDate = default; + ResponseError error = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -112,22 +125,22 @@ internal static HybridComputeProductFeature DeserializeHybridComputeProductFeatu subscriptionStatus = new LicenseProfileSubscriptionStatus(property.Value.GetString()); continue; } - if (property.NameEquals("billingStartDate"u8)) + if (property.NameEquals("enrollmentDate"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - billingStartDate = property.Value.GetDateTimeOffset("O"); + enrollmentDate = property.Value.GetDateTimeOffset("O"); continue; } - if (property.NameEquals("enrollmentDate"u8)) + if (property.NameEquals("billingStartDate"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - enrollmentDate = property.Value.GetDateTimeOffset("O"); + billingStartDate = property.Value.GetDateTimeOffset("O"); continue; } if (property.NameEquals("disenrollmentDate"u8)) @@ -139,6 +152,24 @@ internal static HybridComputeProductFeature DeserializeHybridComputeProductFeatu disenrollmentDate = property.Value.GetDateTimeOffset("O"); continue; } + if (property.NameEquals("billingEndDate"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + billingEndDate = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -148,12 +179,146 @@ internal static HybridComputeProductFeature DeserializeHybridComputeProductFeatu return new HybridComputeProductFeature( name, subscriptionStatus, - billingStartDate, enrollmentDate, + billingStartDate, disenrollmentDate, + billingEndDate, + error, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SubscriptionStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SubscriptionStatus)) + { + builder.Append(" subscriptionStatus: "); + builder.AppendLine($"'{SubscriptionStatus.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EnrollmentOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enrollmentDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EnrollmentOn)) + { + builder.Append(" enrollmentDate: "); + var formattedDateTimeString = TypeFormatters.ToString(EnrollmentOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(BillingStartOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" billingStartDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(BillingStartOn)) + { + builder.Append(" billingStartDate: "); + var formattedDateTimeString = TypeFormatters.ToString(BillingStartOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DisenrollmentOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" disenrollmentDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DisenrollmentOn)) + { + builder.Append(" disenrollmentDate: "); + var formattedDateTimeString = TypeFormatters.ToString(DisenrollmentOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(BillingEndOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" billingEndDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(BillingEndOn)) + { + builder.Append(" billingEndDate: "); + var formattedDateTimeString = TypeFormatters.ToString(BillingEndOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Error), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" error: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Error)) + { + builder.Append(" error: "); + BicepSerializationHelpers.AppendChildObject(builder, Error, options, 2, false, " error: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -162,6 +327,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrite { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(HybridComputeProductFeature)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeProductFeature.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeProductFeature.cs index 7d7e6ef0a2e93..6eb441c53cb0b 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeProductFeature.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeProductFeature.cs @@ -53,29 +53,44 @@ public HybridComputeProductFeature() /// Initializes a new instance of . /// Product feature name. /// Indicates the current status of the product features. - /// The timestamp in UTC when the billing starts. /// The timestamp in UTC when the user enrolls the feature. + /// The timestamp in UTC when the billing starts. /// The timestamp in UTC when the user disenrolled the feature. + /// The timestamp in UTC when the billing ends. + /// The errors that were encountered during the feature enrollment or disenrollment. /// Keeps track of any properties unknown to the library. - internal HybridComputeProductFeature(string name, LicenseProfileSubscriptionStatus? subscriptionStatus, DateTimeOffset? billingStartOn, DateTimeOffset? enrollmentOn, DateTimeOffset? disenrollmentOn, IDictionary serializedAdditionalRawData) + internal HybridComputeProductFeature(string name, LicenseProfileSubscriptionStatus? subscriptionStatus, DateTimeOffset? enrollmentOn, DateTimeOffset? billingStartOn, DateTimeOffset? disenrollmentOn, DateTimeOffset? billingEndOn, ResponseError error, IDictionary serializedAdditionalRawData) { Name = name; SubscriptionStatus = subscriptionStatus; - BillingStartOn = billingStartOn; EnrollmentOn = enrollmentOn; + BillingStartOn = billingStartOn; DisenrollmentOn = disenrollmentOn; + BillingEndOn = billingEndOn; + Error = error; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Product feature name. + [WirePath("name")] public string Name { get; set; } /// Indicates the current status of the product features. + [WirePath("subscriptionStatus")] public LicenseProfileSubscriptionStatus? SubscriptionStatus { get; set; } - /// The timestamp in UTC when the billing starts. - public DateTimeOffset? BillingStartOn { get; } /// The timestamp in UTC when the user enrolls the feature. + [WirePath("enrollmentDate")] public DateTimeOffset? EnrollmentOn { get; } + /// The timestamp in UTC when the billing starts. + [WirePath("billingStartDate")] + public DateTimeOffset? BillingStartOn { get; } /// The timestamp in UTC when the user disenrolled the feature. + [WirePath("disenrollmentDate")] public DateTimeOffset? DisenrollmentOn { get; } + /// The timestamp in UTC when the billing ends. + [WirePath("billingEndDate")] + public DateTimeOffset? BillingEndOn { get; } + /// The errors that were encountered during the feature enrollment or disenrollment. + [WirePath("error")] + public ResponseError Error { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeProvisioningIssue.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeProvisioningIssue.Serialization.cs index c24d188f75f53..72fdf20101f63 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeProvisioningIssue.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeProvisioningIssue.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -201,6 +203,159 @@ internal static HybridComputeProvisioningIssue DeserializeHybridComputeProvision serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IssueType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" issueType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IssueType)) + { + builder.Append(" issueType: "); + builder.AppendLine($"'{IssueType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Severity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" severity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Severity)) + { + builder.Append(" severity: "); + builder.AppendLine($"'{Severity.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SuggestedResourceIds), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" suggestedResourceIds: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(SuggestedResourceIds)) + { + if (SuggestedResourceIds.Any()) + { + builder.Append(" suggestedResourceIds: "); + builder.AppendLine("["); + foreach (var item in SuggestedResourceIds) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SuggestedAccessRules), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" suggestedAccessRules: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(SuggestedAccessRules)) + { + if (SuggestedAccessRules.Any()) + { + builder.Append(" suggestedAccessRules: "); + builder.AppendLine("["); + foreach (var item in SuggestedAccessRules) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " suggestedAccessRules: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -209,6 +364,8 @@ BinaryData IPersistableModel.Write(ModelReaderWr { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(HybridComputeProvisioningIssue)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeProvisioningIssue.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeProvisioningIssue.cs index c14ebaa953889..4bc079e4ea577 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeProvisioningIssue.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeProvisioningIssue.cs @@ -72,16 +72,22 @@ internal HybridComputeProvisioningIssue(string name, HybridComputeProvisioningIs } /// Name of the provisioning issue. + [WirePath("name")] public string Name { get; } /// Issue type. + [WirePath("properties.issueType")] public HybridComputeProvisioningIssueType? IssueType { get; } /// Severity of the provisioning issue. + [WirePath("properties.severity")] public HybridComputeProvisioningIssueSeverity? Severity { get; } /// Description of the provisioning issue. + [WirePath("properties.description")] public string Description { get; } /// ARM Ids of the resources that can be associated to the same perimeter to remediate the issue. + [WirePath("properties.suggestedResourceIds")] public IReadOnlyList SuggestedResourceIds { get; } /// Access rules that can be added to the perimeter to remediate the issue. + [WirePath("properties.suggestedAccessRules")] public IReadOnlyList SuggestedAccessRules { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeResourceAssociation.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeResourceAssociation.Serialization.cs index 4e9b656acb6ae..aa9c7c5192b93 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeResourceAssociation.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeResourceAssociation.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -103,6 +104,59 @@ internal static HybridComputeResourceAssociation DeserializeHybridComputeResourc return new HybridComputeResourceAssociation(name, accessMode, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AccessMode), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" accessMode: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AccessMode)) + { + builder.Append(" accessMode: "); + builder.AppendLine($"'{AccessMode.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -111,6 +165,8 @@ BinaryData IPersistableModel.Write(ModelReader { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(HybridComputeResourceAssociation)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeResourceAssociation.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeResourceAssociation.cs index 99d3df5f5bbf6..60c2b459dbc6c 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeResourceAssociation.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeResourceAssociation.cs @@ -62,8 +62,10 @@ internal HybridComputeResourceAssociation(string name, HybridComputeAccessMode? } /// Name of the Resource Association. + [WirePath("name")] public string Name { get; } /// The access mode. + [WirePath("accessMode")] public HybridComputeAccessMode? AccessMode { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeResourceUpdate.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeResourceUpdate.cs index 0e838d4eaa0e0..c890a1f912df8 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeResourceUpdate.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeResourceUpdate.cs @@ -61,6 +61,7 @@ internal HybridComputeResourceUpdate(IDictionary tags, IDictiona } /// Resource tags. + [WirePath("tags")] public IDictionary Tags { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeServiceStatus.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeServiceStatus.Serialization.cs index abf5330796ef5..475d871a5d7e3 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeServiceStatus.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeServiceStatus.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -99,6 +100,67 @@ internal static HybridComputeServiceStatus DeserializeHybridComputeServiceStatus return new HybridComputeServiceStatus(status, startupType, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" status: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Status)) + { + builder.Append(" status: "); + if (Status.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Status}'''"); + } + else + { + builder.AppendLine($"'{Status}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StartupType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" startupType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StartupType)) + { + builder.Append(" startupType: "); + if (StartupType.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{StartupType}'''"); + } + else + { + builder.AppendLine($"'{StartupType}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -107,6 +169,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriter { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(HybridComputeServiceStatus)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeServiceStatus.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeServiceStatus.cs index cf0c9f75e37bd..45aa47e133b2a 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeServiceStatus.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeServiceStatus.cs @@ -62,8 +62,10 @@ internal HybridComputeServiceStatus(string status, string startupType, IDictiona } /// The current status of the service. + [WirePath("status")] public string Status { get; set; } /// The behavior of the service when the Arc-enabled machine starts up. + [WirePath("startupType")] public string StartupType { get; set; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeServiceStatuses.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeServiceStatuses.Serialization.cs index 8d80210927ad2..bec649ac402ae 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeServiceStatuses.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeServiceStatuses.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -107,6 +108,51 @@ internal static HybridComputeServiceStatuses DeserializeHybridComputeServiceStat return new HybridComputeServiceStatuses(extensionService, guestConfigurationService, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExtensionService), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" extensionService: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ExtensionService)) + { + builder.Append(" extensionService: "); + BicepSerializationHelpers.AppendChildObject(builder, ExtensionService, options, 2, false, " extensionService: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GuestConfigurationService), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" guestConfigurationService: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(GuestConfigurationService)) + { + builder.Append(" guestConfigurationService: "); + BicepSerializationHelpers.AppendChildObject(builder, GuestConfigurationService, options, 2, false, " guestConfigurationService: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -115,6 +161,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrit { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(HybridComputeServiceStatuses)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeServiceStatuses.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeServiceStatuses.cs index c8c87ad25c2bd..4f293376312f4 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeServiceStatuses.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeServiceStatuses.cs @@ -62,8 +62,10 @@ internal HybridComputeServiceStatuses(HybridComputeServiceStatus extensionServic } /// The state of the extension service on the Arc-enabled machine. + [WirePath("extensionService")] public HybridComputeServiceStatus ExtensionService { get; set; } /// The state of the guest configuration service on the Arc-enabled machine. + [WirePath("guestConfigurationService")] public HybridComputeServiceStatus GuestConfigurationService { get; set; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeSubnet.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeSubnet.Serialization.cs index 257ede866f1cd..77e1169e399b6 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeSubnet.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeSubnet.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -88,6 +89,44 @@ internal static HybridComputeSubnet DeserializeHybridComputeSubnet(JsonElement e return new HybridComputeSubnet(addressPrefix, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AddressPrefix), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" addressPrefix: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AddressPrefix)) + { + builder.Append(" addressPrefix: "); + if (AddressPrefix.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{AddressPrefix}'''"); + } + else + { + builder.AppendLine($"'{AddressPrefix}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -96,6 +135,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(HybridComputeSubnet)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeSubnet.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeSubnet.cs index accf495ba3a53..b988251187c60 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeSubnet.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeSubnet.cs @@ -60,6 +60,7 @@ internal HybridComputeSubnet(string addressPrefix, IDictionary Represents address prefix. + [WirePath("addressPrefix")] public string AddressPrefix { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeTargetResourceSettings.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeTargetResourceSettings.Serialization.cs new file mode 100644 index 0000000000000..a72546c7483bb --- /dev/null +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeTargetResourceSettings.Serialization.cs @@ -0,0 +1,334 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.HybridCompute.Models +{ + public partial class HybridComputeTargetResourceSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HybridComputeTargetResourceSettings)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(TenantId)) + { + writer.WritePropertyName("tenantId"u8); + writer.WriteStringValue(TenantId.Value); + } + writer.WritePropertyName("gatewayProperties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(GatewayResourceId)) + { + writer.WritePropertyName("gatewayResourceId"u8); + writer.WriteStringValue(GatewayResourceId); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + HybridComputeTargetResourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HybridComputeTargetResourceSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeHybridComputeTargetResourceSettings(document.RootElement, options); + } + + internal static HybridComputeTargetResourceSettings DeserializeHybridComputeTargetResourceSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + Guid? tenantId = default; + ResourceIdentifier gatewayResourceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("tenantId"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tenantId = property0.Value.GetGuid(); + continue; + } + if (property0.NameEquals("gatewayProperties"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property1 in property0.Value.EnumerateObject()) + { + if (property1.NameEquals("gatewayResourceId"u8)) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + gatewayResourceId = new ResourceIdentifier(property1.Value.GetString()); + continue; + } + } + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new HybridComputeTargetResourceSettings( + id, + name, + type, + systemData, + tenantId, + gatewayResourceId, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TenantId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tenantId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TenantId)) + { + builder.Append(" tenantId: "); + builder.AppendLine($"'{TenantId.Value.ToString()}'"); + } + } + + builder.Append(" gatewayProperties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GatewayResourceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" gatewayResourceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(GatewayResourceId)) + { + builder.Append(" gatewayResourceId: "); + builder.AppendLine($"'{GatewayResourceId.ToString()}'"); + } + } + + builder.AppendLine(" }"); + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(HybridComputeTargetResourceSettings)} does not support writing '{options.Format}' format."); + } + } + + HybridComputeTargetResourceSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeHybridComputeTargetResourceSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(HybridComputeTargetResourceSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeTargetResourceSettings.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeTargetResourceSettings.cs new file mode 100644 index 0000000000000..d0cbb1bbf41c0 --- /dev/null +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeTargetResourceSettings.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.HybridCompute.Models +{ + /// The HybridComputeTargetResourceSettings. + public partial class HybridComputeTargetResourceSettings : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public HybridComputeTargetResourceSettings() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Azure resource tenant Id. + /// Associated Gateway Resource Id. + /// Keeps track of any properties unknown to the library. + internal HybridComputeTargetResourceSettings(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, Guid? tenantId, ResourceIdentifier gatewayResourceId, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + TenantId = tenantId; + GatewayResourceId = gatewayResourceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Azure resource tenant Id. + [WirePath("properties.tenantId")] + public Guid? TenantId { get; } + /// Associated Gateway Resource Id. + [WirePath("properties.gatewayResourceId")] + public ResourceIdentifier GatewayResourceId { get; set; } + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeWindowsConfiguration.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeWindowsConfiguration.Serialization.cs index 5bb59342c3587..217e9f992955f 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeWindowsConfiguration.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeWindowsConfiguration.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -38,6 +39,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WritePropertyName("patchMode"u8); writer.WriteStringValue(PatchMode.Value.ToString()); } + if (Optional.IsDefined(IsHotpatchingEnabled)) + { + writer.WritePropertyName("enableHotpatching"u8); + writer.WriteBooleanValue(IsHotpatchingEnabled.Value); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteObjectValue(Status, options); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -79,6 +90,8 @@ internal static HybridComputeWindowsConfiguration DeserializeHybridComputeWindow } AssessmentModeType? assessmentMode = default; PatchModeType? patchMode = default; + bool? enableHotpatching = default; + HybridComputePatchSettingsStatus status = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -110,6 +123,24 @@ internal static HybridComputeWindowsConfiguration DeserializeHybridComputeWindow patchMode = new PatchModeType(property0.Value.GetString()); continue; } + if (property0.NameEquals("enableHotpatching"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableHotpatching = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("status"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = HybridComputePatchSettingsStatus.DeserializeHybridComputePatchSettingsStatus(property0.Value, options); + continue; + } } continue; } @@ -119,7 +150,86 @@ internal static HybridComputeWindowsConfiguration DeserializeHybridComputeWindow } } serializedAdditionalRawData = rawDataDictionary; - return new HybridComputeWindowsConfiguration(assessmentMode, patchMode, serializedAdditionalRawData); + return new HybridComputeWindowsConfiguration(assessmentMode, patchMode, enableHotpatching, status, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + builder.Append(" patchSettings:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AssessmentMode), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" assessmentMode: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AssessmentMode)) + { + builder.Append(" assessmentMode: "); + builder.AppendLine($"'{AssessmentMode.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PatchMode), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" patchMode: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PatchMode)) + { + builder.Append(" patchMode: "); + builder.AppendLine($"'{PatchMode.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsHotpatchingEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enableHotpatching: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsHotpatchingEnabled)) + { + builder.Append(" enableHotpatching: "); + var boolValue = IsHotpatchingEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" status: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Status)) + { + builder.Append(" status: "); + BicepSerializationHelpers.AppendChildObject(builder, Status, options, 4, false, " status: "); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) @@ -130,6 +240,8 @@ BinaryData IPersistableModel.Write(ModelReade { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(HybridComputeWindowsConfiguration)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeWindowsConfiguration.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeWindowsConfiguration.cs index 7fc400344e3f6..034883506fb4d 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeWindowsConfiguration.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeWindowsConfiguration.cs @@ -53,17 +53,29 @@ public HybridComputeWindowsConfiguration() /// Initializes a new instance of . /// Specifies the assessment mode. /// Specifies the patch mode. + /// Captures the hotpatch capability enrollment intent of the customers, which enables customers to patch their Windows machines without requiring a reboot. + /// Status of the hotpatch capability enrollment or disenrollment. /// Keeps track of any properties unknown to the library. - internal HybridComputeWindowsConfiguration(AssessmentModeType? assessmentMode, PatchModeType? patchMode, IDictionary serializedAdditionalRawData) + internal HybridComputeWindowsConfiguration(AssessmentModeType? assessmentMode, PatchModeType? patchMode, bool? isHotpatchingEnabled, HybridComputePatchSettingsStatus status, IDictionary serializedAdditionalRawData) { AssessmentMode = assessmentMode; PatchMode = patchMode; + IsHotpatchingEnabled = isHotpatchingEnabled; + Status = status; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Specifies the assessment mode. + [WirePath("patchSettings.assessmentMode")] public AssessmentModeType? AssessmentMode { get; set; } /// Specifies the patch mode. + [WirePath("patchSettings.patchMode")] public PatchModeType? PatchMode { get; set; } + /// Captures the hotpatch capability enrollment intent of the customers, which enables customers to patch their Windows machines without requiring a reboot. + [WirePath("patchSettings.enableHotpatching")] + public bool? IsHotpatchingEnabled { get; set; } + /// Status of the hotpatch capability enrollment or disenrollment. + [WirePath("patchSettings.status")] + public HybridComputePatchSettingsStatus Status { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeWindowsParameters.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeWindowsParameters.cs index def6fdc27320b..db2f10995d707 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeWindowsParameters.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/HybridComputeWindowsParameters.cs @@ -71,14 +71,19 @@ internal HybridComputeWindowsParameters(IList } /// The update classifications to select when installing patches for Windows. + [WirePath("classificationsToInclude")] public IList ClassificationsToInclude { get; } /// Kbs to include in the patch operation. + [WirePath("kbNumbersToInclude")] public IList KbNumbersToInclude { get; } /// Kbs to exclude in the patch operation. + [WirePath("kbNumbersToExclude")] public IList KbNumbersToExclude { get; } /// Filters out Kbs that don't have an InstallationRebootBehavior of 'NeverReboots' when this is set to true. + [WirePath("excludeKbsRequiringReboot")] public bool? ExcludeKbsRequiringReboot { get; set; } /// This is used to install patches that were published on or before this given max published date. + [WirePath("maxPatchPublishDate")] public DateTimeOffset? MaxPatchPublishOn { get; set; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfileArmEsuPropertiesWithoutAssignedLicense.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfileArmEsuPropertiesWithoutAssignedLicense.Serialization.cs index eade8279a5152..10efb8f277f59 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfileArmEsuPropertiesWithoutAssignedLicense.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfileArmEsuPropertiesWithoutAssignedLicense.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -168,6 +170,104 @@ internal static LicenseProfileArmEsuPropertiesWithoutAssignedLicense Deserialize esuKeyState); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ServerType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serverType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ServerType)) + { + builder.Append(" serverType: "); + builder.AppendLine($"'{ServerType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EsuEligibility), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" esuEligibility: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EsuEligibility)) + { + builder.Append(" esuEligibility: "); + builder.AppendLine($"'{EsuEligibility.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EsuKeyState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" esuKeyState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EsuKeyState)) + { + builder.Append(" esuKeyState: "); + builder.AppendLine($"'{EsuKeyState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AssignedLicenseImmutableId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" assignedLicenseImmutableId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AssignedLicenseImmutableId)) + { + builder.Append(" assignedLicenseImmutableId: "); + builder.AppendLine($"'{AssignedLicenseImmutableId.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EsuKeys), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" esuKeys: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(EsuKeys)) + { + if (EsuKeys.Any()) + { + builder.Append(" esuKeys: "); + builder.AppendLine("["); + foreach (var item in EsuKeys) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " esuKeys: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -176,6 +276,8 @@ BinaryData IPersistableModel The type of the Esu servers. + [WirePath("serverType")] public EsuServerType? ServerType { get; } /// Indicates the eligibility state of Esu. + [WirePath("esuEligibility")] public EsuEligibility? EsuEligibility { get; } /// Indicates whether there is an ESU Key currently active for the machine. + [WirePath("esuKeyState")] public EsuKeyState? EsuKeyState { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfileMachineInstanceView.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfileMachineInstanceView.Serialization.cs index 24d428a63da0c..10b91a48ed935 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfileMachineInstanceView.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfileMachineInstanceView.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -53,21 +55,31 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WritePropertyName("productType"u8); writer.WriteStringValue(ProductType.Value.ToString()); } - if (options.Format != "W" && Optional.IsDefined(BillingStartOn)) - { - writer.WritePropertyName("billingStartDate"u8); - writer.WriteStringValue(BillingStartOn.Value, "O"); - } if (options.Format != "W" && Optional.IsDefined(EnrollmentOn)) { writer.WritePropertyName("enrollmentDate"u8); writer.WriteStringValue(EnrollmentOn.Value, "O"); } + if (options.Format != "W" && Optional.IsDefined(BillingStartOn)) + { + writer.WritePropertyName("billingStartDate"u8); + writer.WriteStringValue(BillingStartOn.Value, "O"); + } if (options.Format != "W" && Optional.IsDefined(DisenrollmentOn)) { writer.WritePropertyName("disenrollmentDate"u8); writer.WriteStringValue(DisenrollmentOn.Value, "O"); } + if (options.Format != "W" && Optional.IsDefined(BillingEndOn)) + { + writer.WritePropertyName("billingEndDate"u8); + writer.WriteStringValue(BillingEndOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + JsonSerializer.Serialize(writer, Error); + } if (Optional.IsCollectionDefined(ProductFeatures)) { writer.WritePropertyName("productFeatures"u8); @@ -130,9 +142,11 @@ internal static LicenseProfileMachineInstanceView DeserializeLicenseProfileMachi LicenseProfileMachineInstanceViewEsuProperties esuProfile = default; LicenseProfileSubscriptionStatus? subscriptionStatus = default; LicenseProfileProductType? productType = default; - DateTimeOffset? billingStartDate = default; DateTimeOffset? enrollmentDate = default; + DateTimeOffset? billingStartDate = default; DateTimeOffset? disenrollmentDate = default; + DateTimeOffset? billingEndDate = default; + ResponseError error = default; IList productFeatures = default; bool? softwareAssuranceCustomer = default; IDictionary serializedAdditionalRawData = default; @@ -189,22 +203,22 @@ internal static LicenseProfileMachineInstanceView DeserializeLicenseProfileMachi productType = new LicenseProfileProductType(property0.Value.GetString()); continue; } - if (property0.NameEquals("billingStartDate"u8)) + if (property0.NameEquals("enrollmentDate"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - billingStartDate = property0.Value.GetDateTimeOffset("O"); + enrollmentDate = property0.Value.GetDateTimeOffset("O"); continue; } - if (property0.NameEquals("enrollmentDate"u8)) + if (property0.NameEquals("billingStartDate"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - enrollmentDate = property0.Value.GetDateTimeOffset("O"); + billingStartDate = property0.Value.GetDateTimeOffset("O"); continue; } if (property0.NameEquals("disenrollmentDate"u8)) @@ -216,6 +230,24 @@ internal static LicenseProfileMachineInstanceView DeserializeLicenseProfileMachi disenrollmentDate = property0.Value.GetDateTimeOffset("O"); continue; } + if (property0.NameEquals("billingEndDate"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + billingEndDate = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("error"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = JsonSerializer.Deserialize(property0.Value.GetRawText()); + continue; + } if (property0.NameEquals("productFeatures"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -266,14 +298,238 @@ internal static LicenseProfileMachineInstanceView DeserializeLicenseProfileMachi esuProfile, subscriptionStatus, productType, - billingStartDate, enrollmentDate, + billingStartDate, disenrollmentDate, + billingEndDate, + error, productFeatures ?? new ChangeTrackingList(), softwareAssuranceCustomer, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LicenseStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" licenseStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LicenseStatus)) + { + builder.Append(" licenseStatus: "); + builder.AppendLine($"'{LicenseStatus.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LicenseChannel), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" licenseChannel: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LicenseChannel)) + { + builder.Append(" licenseChannel: "); + if (LicenseChannel.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{LicenseChannel}'''"); + } + else + { + builder.AppendLine($"'{LicenseChannel}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EsuProfile), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" esuProfile: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EsuProfile)) + { + builder.Append(" esuProfile: "); + BicepSerializationHelpers.AppendChildObject(builder, EsuProfile, options, 2, false, " esuProfile: "); + } + } + + builder.Append(" productProfile:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SubscriptionStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" subscriptionStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SubscriptionStatus)) + { + builder.Append(" subscriptionStatus: "); + builder.AppendLine($"'{SubscriptionStatus.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProductType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" productType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProductType)) + { + builder.Append(" productType: "); + builder.AppendLine($"'{ProductType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EnrollmentOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enrollmentDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EnrollmentOn)) + { + builder.Append(" enrollmentDate: "); + var formattedDateTimeString = TypeFormatters.ToString(EnrollmentOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(BillingStartOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" billingStartDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(BillingStartOn)) + { + builder.Append(" billingStartDate: "); + var formattedDateTimeString = TypeFormatters.ToString(BillingStartOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DisenrollmentOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" disenrollmentDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DisenrollmentOn)) + { + builder.Append(" disenrollmentDate: "); + var formattedDateTimeString = TypeFormatters.ToString(DisenrollmentOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(BillingEndOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" billingEndDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(BillingEndOn)) + { + builder.Append(" billingEndDate: "); + var formattedDateTimeString = TypeFormatters.ToString(BillingEndOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Error), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" error: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Error)) + { + builder.Append(" error: "); + BicepSerializationHelpers.AppendChildObject(builder, Error, options, 4, false, " error: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProductFeatures), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" productFeatures: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ProductFeatures)) + { + if (ProductFeatures.Any()) + { + builder.Append(" productFeatures: "); + builder.AppendLine("["); + foreach (var item in ProductFeatures) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " productFeatures: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine(" }"); + builder.Append(" softwareAssurance:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsSoftwareAssuranceCustomer), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" softwareAssuranceCustomer: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsSoftwareAssuranceCustomer)) + { + builder.Append(" softwareAssuranceCustomer: "); + var boolValue = IsSoftwareAssuranceCustomer.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -282,6 +538,8 @@ BinaryData IPersistableModel.Write(ModelReade { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(LicenseProfileMachineInstanceView)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfileMachineInstanceView.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfileMachineInstanceView.cs index 72f385447c3ec..9e26346bd0537 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfileMachineInstanceView.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfileMachineInstanceView.cs @@ -57,46 +57,66 @@ public LicenseProfileMachineInstanceView() /// Properties for the Machine ESU profile. /// Indicates the subscription status of the product. /// Indicates the product type of the license. - /// The timestamp in UTC when the billing starts. /// The timestamp in UTC when the user enrolls the feature. + /// The timestamp in UTC when the billing starts. /// The timestamp in UTC when the user disenrolled the feature. + /// The timestamp in UTC when the billing ends. + /// The errors that were encountered during the feature enrollment or disenrollment. /// The list of product features. /// Specifies if this machine is licensed as part of a Software Assurance agreement. /// Keeps track of any properties unknown to the library. - internal LicenseProfileMachineInstanceView(HybridComputeLicenseStatus? licenseStatus, string licenseChannel, LicenseProfileMachineInstanceViewEsuProperties esuProfile, LicenseProfileSubscriptionStatus? subscriptionStatus, LicenseProfileProductType? productType, DateTimeOffset? billingStartOn, DateTimeOffset? enrollmentOn, DateTimeOffset? disenrollmentOn, IList productFeatures, bool? isSoftwareAssuranceCustomer, IDictionary serializedAdditionalRawData) + internal LicenseProfileMachineInstanceView(HybridComputeLicenseStatus? licenseStatus, string licenseChannel, LicenseProfileMachineInstanceViewEsuProperties esuProfile, LicenseProfileSubscriptionStatus? subscriptionStatus, LicenseProfileProductType? productType, DateTimeOffset? enrollmentOn, DateTimeOffset? billingStartOn, DateTimeOffset? disenrollmentOn, DateTimeOffset? billingEndOn, ResponseError error, IList productFeatures, bool? isSoftwareAssuranceCustomer, IDictionary serializedAdditionalRawData) { LicenseStatus = licenseStatus; LicenseChannel = licenseChannel; EsuProfile = esuProfile; SubscriptionStatus = subscriptionStatus; ProductType = productType; - BillingStartOn = billingStartOn; EnrollmentOn = enrollmentOn; + BillingStartOn = billingStartOn; DisenrollmentOn = disenrollmentOn; + BillingEndOn = billingEndOn; + Error = error; ProductFeatures = productFeatures; IsSoftwareAssuranceCustomer = isSoftwareAssuranceCustomer; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Indicates the license status of the OS. + [WirePath("licenseStatus")] public HybridComputeLicenseStatus? LicenseStatus { get; } /// Indicates the license channel. + [WirePath("licenseChannel")] public string LicenseChannel { get; } /// Properties for the Machine ESU profile. + [WirePath("esuProfile")] public LicenseProfileMachineInstanceViewEsuProperties EsuProfile { get; set; } /// Indicates the subscription status of the product. + [WirePath("productProfile.subscriptionStatus")] public LicenseProfileSubscriptionStatus? SubscriptionStatus { get; set; } /// Indicates the product type of the license. + [WirePath("productProfile.productType")] public LicenseProfileProductType? ProductType { get; set; } - /// The timestamp in UTC when the billing starts. - public DateTimeOffset? BillingStartOn { get; } /// The timestamp in UTC when the user enrolls the feature. + [WirePath("productProfile.enrollmentDate")] public DateTimeOffset? EnrollmentOn { get; } + /// The timestamp in UTC when the billing starts. + [WirePath("productProfile.billingStartDate")] + public DateTimeOffset? BillingStartOn { get; } /// The timestamp in UTC when the user disenrolled the feature. + [WirePath("productProfile.disenrollmentDate")] public DateTimeOffset? DisenrollmentOn { get; } + /// The timestamp in UTC when the billing ends. + [WirePath("productProfile.billingEndDate")] + public DateTimeOffset? BillingEndOn { get; } + /// The errors that were encountered during the feature enrollment or disenrollment. + [WirePath("productProfile.error")] + public ResponseError Error { get; } /// The list of product features. + [WirePath("productProfile.productFeatures")] public IList ProductFeatures { get; } /// Specifies if this machine is licensed as part of a Software Assurance agreement. + [WirePath("softwareAssurance.softwareAssuranceCustomer")] public bool? IsSoftwareAssuranceCustomer { get; set; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfileMachineInstanceViewEsuProperties.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfileMachineInstanceViewEsuProperties.Serialization.cs index 33a235259f387..b6013e3509253 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfileMachineInstanceViewEsuProperties.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfileMachineInstanceViewEsuProperties.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -200,6 +202,134 @@ internal static LicenseProfileMachineInstanceViewEsuProperties DeserializeLicens licenseAssignmentState); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AssignedLicense), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" assignedLicense: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AssignedLicense)) + { + builder.Append(" assignedLicense: "); + BicepSerializationHelpers.AppendChildObject(builder, AssignedLicense, options, 2, false, " assignedLicense: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LicenseAssignmentState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" licenseAssignmentState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LicenseAssignmentState)) + { + builder.Append(" licenseAssignmentState: "); + builder.AppendLine($"'{LicenseAssignmentState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ServerType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serverType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ServerType)) + { + builder.Append(" serverType: "); + builder.AppendLine($"'{ServerType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EsuEligibility), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" esuEligibility: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EsuEligibility)) + { + builder.Append(" esuEligibility: "); + builder.AppendLine($"'{EsuEligibility.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EsuKeyState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" esuKeyState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EsuKeyState)) + { + builder.Append(" esuKeyState: "); + builder.AppendLine($"'{EsuKeyState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AssignedLicenseImmutableId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" assignedLicenseImmutableId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AssignedLicenseImmutableId)) + { + builder.Append(" assignedLicenseImmutableId: "); + builder.AppendLine($"'{AssignedLicenseImmutableId.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EsuKeys), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" esuKeys: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(EsuKeys)) + { + if (EsuKeys.Any()) + { + builder.Append(" esuKeys: "); + builder.AppendLine("["); + foreach (var item in EsuKeys) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " esuKeys: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -208,6 +338,8 @@ BinaryData IPersistableModel.Wri { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(LicenseProfileMachineInstanceViewEsuProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfileMachineInstanceViewEsuProperties.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfileMachineInstanceViewEsuProperties.cs index 251c3607f12e6..518796dfabd99 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfileMachineInstanceViewEsuProperties.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfileMachineInstanceViewEsuProperties.cs @@ -34,8 +34,10 @@ internal LicenseProfileMachineInstanceViewEsuProperties(Guid? assignedLicenseImm } /// The assigned license resource. + [WirePath("assignedLicense")] public HybridComputeLicenseData AssignedLicense { get; set; } /// Describes the license assignment state (Assigned or NotAssigned). + [WirePath("licenseAssignmentState")] public LicenseAssignmentState? LicenseAssignmentState { get; set; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfileStorageModelEsuProperties.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfileStorageModelEsuProperties.Serialization.cs index 2b963a5b5c798..1d57c5fbb4a97 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfileStorageModelEsuProperties.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfileStorageModelEsuProperties.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -117,6 +119,59 @@ internal static LicenseProfileStorageModelEsuProperties DeserializeLicenseProfil return new LicenseProfileStorageModelEsuProperties(assignedLicenseImmutableId, esuKeys ?? new ChangeTrackingList(), serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AssignedLicenseImmutableId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" assignedLicenseImmutableId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AssignedLicenseImmutableId)) + { + builder.Append(" assignedLicenseImmutableId: "); + builder.AppendLine($"'{AssignedLicenseImmutableId.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EsuKeys), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" esuKeys: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(EsuKeys)) + { + if (EsuKeys.Any()) + { + builder.Append(" esuKeys: "); + builder.AppendLine("["); + foreach (var item in EsuKeys) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " esuKeys: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -125,6 +180,8 @@ BinaryData IPersistableModel.Write(Mode { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(LicenseProfileStorageModelEsuProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfileStorageModelEsuProperties.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfileStorageModelEsuProperties.cs index aea1e876c5aed..3c2ddad37d10a 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfileStorageModelEsuProperties.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfileStorageModelEsuProperties.cs @@ -63,8 +63,10 @@ internal LicenseProfileStorageModelEsuProperties(Guid? assignedLicenseImmutableI } /// The guid id of the license. + [WirePath("assignedLicenseImmutableId")] public Guid? AssignedLicenseImmutableId { get; } /// The list of ESU keys. + [WirePath("esuKeys")] public IReadOnlyList EsuKeys { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfileSubscriptionStatus.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfileSubscriptionStatus.cs index ac3b45976a206..838f9d2940712 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfileSubscriptionStatus.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicenseProfileSubscriptionStatus.cs @@ -26,6 +26,8 @@ public LicenseProfileSubscriptionStatus(string value) private const string EnablingValue = "Enabling"; private const string EnabledValue = "Enabled"; private const string DisabledValue = "Disabled"; + private const string DisablingValue = "Disabling"; + private const string FailedValue = "Failed"; /// Unknown. public static LicenseProfileSubscriptionStatus Unknown { get; } = new LicenseProfileSubscriptionStatus(UnknownValue); @@ -35,6 +37,10 @@ public LicenseProfileSubscriptionStatus(string value) public static LicenseProfileSubscriptionStatus Enabled { get; } = new LicenseProfileSubscriptionStatus(EnabledValue); /// Disabled. public static LicenseProfileSubscriptionStatus Disabled { get; } = new LicenseProfileSubscriptionStatus(DisabledValue); + /// Disabling. + public static LicenseProfileSubscriptionStatus Disabling { get; } = new LicenseProfileSubscriptionStatus(DisablingValue); + /// Failed. + public static LicenseProfileSubscriptionStatus Failed { get; } = new LicenseProfileSubscriptionStatus(FailedValue); /// Determines if two values are the same. public static bool operator ==(LicenseProfileSubscriptionStatus left, LicenseProfileSubscriptionStatus right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicensesListResult.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicensesListResult.Serialization.cs index e1baae8756700..8e90fed80b94b 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicensesListResult.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/LicensesListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -106,6 +108,67 @@ internal static LicensesListResult DeserializeLicensesListResult(JsonElement ele return new LicensesListResult(value, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -114,6 +177,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(LicensesListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineAssessPatchesResult.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineAssessPatchesResult.Serialization.cs index a4d205278db65..eacd8f36d2495 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineAssessPatchesResult.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineAssessPatchesResult.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -238,6 +239,174 @@ internal static MachineAssessPatchesResult DeserializeMachineAssessPatchesResult serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" status: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Status)) + { + builder.Append(" status: "); + builder.AppendLine($"'{Status.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AssessmentActivityId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" assessmentActivityId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AssessmentActivityId)) + { + builder.Append(" assessmentActivityId: "); + builder.AppendLine($"'{AssessmentActivityId.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsRebootPending), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" rebootPending: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsRebootPending)) + { + builder.Append(" rebootPending: "); + var boolValue = IsRebootPending.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AvailablePatchCountByClassification), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" availablePatchCountByClassification: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AvailablePatchCountByClassification)) + { + builder.Append(" availablePatchCountByClassification: "); + BicepSerializationHelpers.AppendChildObject(builder, AvailablePatchCountByClassification, options, 2, false, " availablePatchCountByClassification: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StartOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" startDateTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StartOn)) + { + builder.Append(" startDateTime: "); + var formattedDateTimeString = TypeFormatters.ToString(StartOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastModifiedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastModifiedDateTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LastModifiedOn)) + { + builder.Append(" lastModifiedDateTime: "); + var formattedDateTimeString = TypeFormatters.ToString(LastModifiedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StartedBy), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" startedBy: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StartedBy)) + { + builder.Append(" startedBy: "); + builder.AppendLine($"'{StartedBy.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PatchServiceUsed), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" patchServiceUsed: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PatchServiceUsed)) + { + builder.Append(" patchServiceUsed: "); + builder.AppendLine($"'{PatchServiceUsed.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OSType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" osType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OSType)) + { + builder.Append(" osType: "); + builder.AppendLine($"'{OSType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ErrorDetails), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" errorDetails: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ErrorDetails)) + { + builder.Append(" errorDetails: "); + BicepSerializationHelpers.AppendChildObject(builder, ErrorDetails, options, 2, false, " errorDetails: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -246,6 +415,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriter { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(MachineAssessPatchesResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineAssessPatchesResult.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineAssessPatchesResult.cs index c7f5fff940169..076da06a5d7b2 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineAssessPatchesResult.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineAssessPatchesResult.cs @@ -78,24 +78,34 @@ internal MachineAssessPatchesResult(MachineOperationStatus? status, Guid? assess } /// The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Unknown", "Failed", "Succeeded", or "CompletedWithWarnings.". + [WirePath("status")] public MachineOperationStatus? Status { get; } /// The activity ID of the operation that produced this result. + [WirePath("assessmentActivityId")] public Guid? AssessmentActivityId { get; } /// The overall reboot status of the VM. It will be true when partially installed patches require a reboot to complete installation but the reboot has not yet occurred. + [WirePath("rebootPending")] public bool? IsRebootPending { get; } /// Summarization of patches available for installation on the machine by classification. + [WirePath("availablePatchCountByClassification")] public AvailablePatchCountByClassification AvailablePatchCountByClassification { get; } /// The UTC timestamp when the operation began. + [WirePath("startDateTime")] public DateTimeOffset? StartOn { get; } /// The UTC timestamp when the operation finished. + [WirePath("lastModifiedDateTime")] public DateTimeOffset? LastModifiedOn { get; } /// Indicates if operation was triggered by user or by platform. + [WirePath("startedBy")] public PatchOperationStartedBy? StartedBy { get; } /// Specifies the patch service used for the operation. + [WirePath("patchServiceUsed")] public PatchServiceUsed? PatchServiceUsed { get; } /// The operating system type of the machine. + [WirePath("osType")] public HybridComputeOSType? OSType { get; } /// The errors that were encountered during execution of the operation. The details array contains the list of them. + [WirePath("errorDetails")] public ResponseError ErrorDetails { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineExtensionInstanceView.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineExtensionInstanceView.Serialization.cs index 8a98a2499d1c9..c2e9eda4b2796 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineExtensionInstanceView.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineExtensionInstanceView.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -125,6 +126,105 @@ internal static MachineExtensionInstanceView DeserializeMachineExtensionInstance return new MachineExtensionInstanceView(name, type, typeHandlerVersion, status, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MachineExtensionInstanceViewType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MachineExtensionInstanceViewType)) + { + builder.Append(" type: "); + if (MachineExtensionInstanceViewType.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{MachineExtensionInstanceViewType}'''"); + } + else + { + builder.AppendLine($"'{MachineExtensionInstanceViewType}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TypeHandlerVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" typeHandlerVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TypeHandlerVersion)) + { + builder.Append(" typeHandlerVersion: "); + if (TypeHandlerVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TypeHandlerVersion}'''"); + } + else + { + builder.AppendLine($"'{TypeHandlerVersion}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" status: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Status)) + { + builder.Append(" status: "); + BicepSerializationHelpers.AppendChildObject(builder, Status, options, 2, false, " status: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -133,6 +233,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrit { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(MachineExtensionInstanceView)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineExtensionInstanceView.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineExtensionInstanceView.cs index 6962fd17e736b..463a5eda00484 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineExtensionInstanceView.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineExtensionInstanceView.cs @@ -66,12 +66,16 @@ internal MachineExtensionInstanceView(string name, string machineExtensionInstan } /// The machine extension name. + [WirePath("name")] public string Name { get; set; } /// Specifies the type of the extension; an example is "CustomScriptExtension". + [WirePath("type")] public string MachineExtensionInstanceViewType { get; set; } /// Specifies the version of the script handler. + [WirePath("typeHandlerVersion")] public string TypeHandlerVersion { get; set; } /// Instance view status. + [WirePath("status")] public MachineExtensionInstanceViewStatus Status { get; set; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineExtensionInstanceViewStatus.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineExtensionInstanceViewStatus.Serialization.cs index bca03cf4ea6f5..906cae44cdba2 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineExtensionInstanceViewStatus.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineExtensionInstanceViewStatus.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -146,6 +147,121 @@ internal static MachineExtensionInstanceViewStatus DeserializeMachineExtensionIn serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Code), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" code: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Code)) + { + builder.Append(" code: "); + if (Code.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Code}'''"); + } + else + { + builder.AppendLine($"'{Code}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Level), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" level: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Level)) + { + builder.Append(" level: "); + builder.AppendLine($"'{Level.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DisplayStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" displayStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DisplayStatus)) + { + builder.Append(" displayStatus: "); + if (DisplayStatus.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DisplayStatus}'''"); + } + else + { + builder.AppendLine($"'{DisplayStatus}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Message), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" message: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Message)) + { + builder.Append(" message: "); + if (Message.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Message}'''"); + } + else + { + builder.AppendLine($"'{Message}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Time), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" time: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Time)) + { + builder.Append(" time: "); + var formattedDateTimeString = TypeFormatters.ToString(Time.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -154,6 +270,8 @@ BinaryData IPersistableModel.Write(ModelRead { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(MachineExtensionInstanceViewStatus)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineExtensionInstanceViewStatus.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineExtensionInstanceViewStatus.cs index 3704c4c56d3b6..26f9c2f64fdd1 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineExtensionInstanceViewStatus.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineExtensionInstanceViewStatus.cs @@ -68,14 +68,19 @@ internal MachineExtensionInstanceViewStatus(string code, HybridComputeStatusLeve } /// The status code. + [WirePath("code")] public string Code { get; set; } /// The level code. + [WirePath("level")] public HybridComputeStatusLevelType? Level { get; set; } /// The short localizable label for the status. + [WirePath("displayStatus")] public string DisplayStatus { get; set; } /// The detailed status message, including for alerts and error messages. + [WirePath("message")] public string Message { get; set; } /// The time of the status. + [WirePath("time")] public DateTimeOffset? Time { get; set; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineExtensionProperties.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineExtensionProperties.Serialization.cs index 1d743f1cc8de5..faf55fd469bc8 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineExtensionProperties.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineExtensionProperties.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -278,6 +280,241 @@ internal static MachineExtensionProperties DeserializeMachineExtensionProperties serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ForceUpdateTag), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" forceUpdateTag: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ForceUpdateTag)) + { + builder.Append(" forceUpdateTag: "); + if (ForceUpdateTag.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ForceUpdateTag}'''"); + } + else + { + builder.AppendLine($"'{ForceUpdateTag}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Publisher), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" publisher: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Publisher)) + { + builder.Append(" publisher: "); + if (Publisher.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Publisher}'''"); + } + else + { + builder.AppendLine($"'{Publisher}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MachineExtensionPropertiesType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MachineExtensionPropertiesType)) + { + builder.Append(" type: "); + if (MachineExtensionPropertiesType.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{MachineExtensionPropertiesType}'''"); + } + else + { + builder.AppendLine($"'{MachineExtensionPropertiesType}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TypeHandlerVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" typeHandlerVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TypeHandlerVersion)) + { + builder.Append(" typeHandlerVersion: "); + if (TypeHandlerVersion.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TypeHandlerVersion}'''"); + } + else + { + builder.AppendLine($"'{TypeHandlerVersion}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EnableAutomaticUpgrade), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enableAutomaticUpgrade: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EnableAutomaticUpgrade)) + { + builder.Append(" enableAutomaticUpgrade: "); + var boolValue = EnableAutomaticUpgrade.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AutoUpgradeMinorVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" autoUpgradeMinorVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AutoUpgradeMinorVersion)) + { + builder.Append(" autoUpgradeMinorVersion: "); + var boolValue = AutoUpgradeMinorVersion.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Settings), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" settings: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Settings)) + { + if (Settings.Any()) + { + builder.Append(" settings: "); + builder.AppendLine("{"); + foreach (var item in Settings) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + builder.AppendLine($"'{item.Value.ToString()}'"); + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProtectedSettings), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" protectedSettings: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ProtectedSettings)) + { + if (ProtectedSettings.Any()) + { + builder.Append(" protectedSettings: "); + builder.AppendLine("{"); + foreach (var item in ProtectedSettings) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + builder.AppendLine($"'{item.Value.ToString()}'"); + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + if (ProvisioningState.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ProvisioningState}'''"); + } + else + { + builder.AppendLine($"'{ProvisioningState}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(InstanceView), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" instanceView: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(InstanceView)) + { + builder.Append(" instanceView: "); + BicepSerializationHelpers.AppendChildObject(builder, InstanceView, options, 2, false, " instanceView: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -286,6 +523,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriter { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(MachineExtensionProperties)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineExtensionProperties.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineExtensionProperties.cs index 9970d3e53359e..386969080b6af 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineExtensionProperties.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineExtensionProperties.cs @@ -80,16 +80,22 @@ internal MachineExtensionProperties(string forceUpdateTag, string publisher, str } /// How the extension handler should be forced to update even if the extension configuration has not changed. + [WirePath("forceUpdateTag")] public string ForceUpdateTag { get; set; } /// The name of the extension handler publisher. + [WirePath("publisher")] public string Publisher { get; set; } /// Specifies the type of the extension; an example is "CustomScriptExtension". + [WirePath("type")] public string MachineExtensionPropertiesType { get; set; } /// Specifies the version of the script handler. + [WirePath("typeHandlerVersion")] public string TypeHandlerVersion { get; set; } /// Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. + [WirePath("enableAutomaticUpgrade")] public bool? EnableAutomaticUpgrade { get; set; } /// Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. + [WirePath("autoUpgradeMinorVersion")] public bool? AutoUpgradeMinorVersion { get; set; } /// /// Json formatted public settings for the extension. @@ -121,6 +127,7 @@ internal MachineExtensionProperties(string forceUpdateTag, string publisher, str /// /// /// + [WirePath("settings")] public IDictionary Settings { get; } /// /// The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. @@ -152,10 +159,13 @@ internal MachineExtensionProperties(string forceUpdateTag, string publisher, str /// /// /// + [WirePath("protectedSettings")] public IDictionary ProtectedSettings { get; } /// The provisioning state, which only appears in the response. + [WirePath("provisioningState")] public string ProvisioningState { get; } /// The machine extension instance view. + [WirePath("instanceView")] public MachineExtensionInstanceView InstanceView { get; set; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineExtensionUpgrade.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineExtensionUpgrade.cs index aeb5b2cfc0b54..18bbdc44adaca 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineExtensionUpgrade.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineExtensionUpgrade.cs @@ -61,6 +61,7 @@ internal MachineExtensionUpgrade(IDictionary } /// Describes the Extension Target Properties. + [WirePath("extensionTargets")] public IDictionary ExtensionTargets { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineExtensionsListResult.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineExtensionsListResult.Serialization.cs index 1a3c8bdd99743..4caea9d71d486 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineExtensionsListResult.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineExtensionsListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -113,6 +115,67 @@ internal static MachineExtensionsListResult DeserializeMachineExtensionsListResu return new MachineExtensionsListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -121,6 +184,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrite { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(MachineExtensionsListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineInstallPatchesContent.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineInstallPatchesContent.cs index 81a440bba6b18..4b25fff83c332 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineInstallPatchesContent.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineInstallPatchesContent.cs @@ -75,12 +75,16 @@ internal MachineInstallPatchesContent() } /// Specifies the maximum amount of time that the operation will run. It must be an ISO 8601-compliant duration string such as PT4H (4 hours). + [WirePath("maximumDuration")] public TimeSpan MaximumDuration { get; } /// Defines when it is acceptable to reboot a VM during a software update operation. + [WirePath("rebootSetting")] public VmGuestPatchRebootSetting RebootSetting { get; } /// Input for InstallPatches on a Windows VM, as directly received by the API. + [WirePath("windowsParameters")] public HybridComputeWindowsParameters WindowsParameters { get; set; } /// Input for InstallPatches on a Linux VM, as directly received by the API. + [WirePath("linuxParameters")] public HybridComputeLinuxParameters LinuxParameters { get; set; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineInstallPatchesResult.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineInstallPatchesResult.Serialization.cs index c7a5638d5e357..84a9a6f3f01df 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineInstallPatchesResult.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineInstallPatchesResult.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -314,6 +315,257 @@ internal static MachineInstallPatchesResult DeserializeMachineInstallPatchesResu serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Status), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" status: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Status)) + { + builder.Append(" status: "); + builder.AppendLine($"'{Status.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(InstallationActivityId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" installationActivityId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(InstallationActivityId)) + { + builder.Append(" installationActivityId: "); + if (InstallationActivityId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{InstallationActivityId}'''"); + } + else + { + builder.AppendLine($"'{InstallationActivityId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RebootStatus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" rebootStatus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(RebootStatus)) + { + builder.Append(" rebootStatus: "); + builder.AppendLine($"'{RebootStatus.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(MaintenanceWindowExceeded), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" maintenanceWindowExceeded: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(MaintenanceWindowExceeded)) + { + builder.Append(" maintenanceWindowExceeded: "); + var boolValue = MaintenanceWindowExceeded.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExcludedPatchCount), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" excludedPatchCount: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ExcludedPatchCount)) + { + builder.Append(" excludedPatchCount: "); + builder.AppendLine($"{ExcludedPatchCount.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NotSelectedPatchCount), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" notSelectedPatchCount: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NotSelectedPatchCount)) + { + builder.Append(" notSelectedPatchCount: "); + builder.AppendLine($"{NotSelectedPatchCount.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PendingPatchCount), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" pendingPatchCount: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PendingPatchCount)) + { + builder.Append(" pendingPatchCount: "); + builder.AppendLine($"{PendingPatchCount.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(InstalledPatchCount), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" installedPatchCount: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(InstalledPatchCount)) + { + builder.Append(" installedPatchCount: "); + builder.AppendLine($"{InstalledPatchCount.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(FailedPatchCount), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" failedPatchCount: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(FailedPatchCount)) + { + builder.Append(" failedPatchCount: "); + builder.AppendLine($"{FailedPatchCount.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StartOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" startDateTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StartOn)) + { + builder.Append(" startDateTime: "); + var formattedDateTimeString = TypeFormatters.ToString(StartOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LastModifiedOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" lastModifiedDateTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LastModifiedOn)) + { + builder.Append(" lastModifiedDateTime: "); + var formattedDateTimeString = TypeFormatters.ToString(LastModifiedOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StartedBy), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" startedBy: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StartedBy)) + { + builder.Append(" startedBy: "); + builder.AppendLine($"'{StartedBy.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PatchServiceUsed), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" patchServiceUsed: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PatchServiceUsed)) + { + builder.Append(" patchServiceUsed: "); + builder.AppendLine($"'{PatchServiceUsed.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OSType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" osType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OSType)) + { + builder.Append(" osType: "); + builder.AppendLine($"'{OSType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ErrorDetails), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" errorDetails: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ErrorDetails)) + { + builder.Append(" errorDetails: "); + BicepSerializationHelpers.AppendChildObject(builder, ErrorDetails, options, 2, false, " errorDetails: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -322,6 +574,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrite { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(MachineInstallPatchesResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineInstallPatchesResult.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineInstallPatchesResult.cs index 9e103242d0625..93ea3cf210761 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineInstallPatchesResult.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineInstallPatchesResult.cs @@ -88,34 +88,49 @@ internal MachineInstallPatchesResult(MachineOperationStatus? status, string inst } /// The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Failed", "Succeeded", "Unknown" or "CompletedWithWarnings.". + [WirePath("status")] public MachineOperationStatus? Status { get; } /// The activity ID of the operation that produced this result. + [WirePath("installationActivityId")] public string InstallationActivityId { get; } /// The reboot state of the VM following completion of the operation. + [WirePath("rebootStatus")] public VmGuestPatchRebootStatus? RebootStatus { get; } /// Whether the operation ran out of time before it completed all its intended actions. + [WirePath("maintenanceWindowExceeded")] public bool? MaintenanceWindowExceeded { get; } /// The number of patches that were not installed due to the user blocking their installation. + [WirePath("excludedPatchCount")] public int? ExcludedPatchCount { get; } /// The number of patches that were detected as available for install, but did not meet the operation's criteria. + [WirePath("notSelectedPatchCount")] public int? NotSelectedPatchCount { get; } /// The number of patches that were identified as meeting the installation criteria, but were not able to be installed. Typically this happens when maintenanceWindowExceeded == true. + [WirePath("pendingPatchCount")] public int? PendingPatchCount { get; } /// The number of patches successfully installed. + [WirePath("installedPatchCount")] public int? InstalledPatchCount { get; } /// The number of patches that could not be installed due to some issue. See errors for details. + [WirePath("failedPatchCount")] public int? FailedPatchCount { get; } /// The UTC timestamp when the operation began. + [WirePath("startDateTime")] public DateTimeOffset? StartOn { get; } /// The UTC timestamp when the operation finished. + [WirePath("lastModifiedDateTime")] public DateTimeOffset? LastModifiedOn { get; } /// Indicates if operation was triggered by user or by platform. + [WirePath("startedBy")] public PatchOperationStartedBy? StartedBy { get; } /// Specifies the patch service used for the operation. + [WirePath("patchServiceUsed")] public PatchServiceUsed? PatchServiceUsed { get; } /// The operating system type of the machine. + [WirePath("osType")] public HybridComputeOSType? OSType { get; } /// The errors that were encountered during execution of the operation. The details array contains the list of them. + [WirePath("errorDetails")] public ResponseError ErrorDetails { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineListResult.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineListResult.Serialization.cs index c586f19745a40..5d6b793b0dc5d 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineListResult.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -106,6 +108,67 @@ internal static MachineListResult DeserializeMachineListResult(JsonElement eleme return new MachineListResult(value, nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -114,6 +177,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions o { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(MachineListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandInstanceView.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandInstanceView.Serialization.cs index 1140d85dcced6..377c9a8781715 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandInstanceView.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandInstanceView.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -204,6 +206,175 @@ internal static MachineRunCommandInstanceView DeserializeMachineRunCommandInstan serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExecutionState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" executionState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ExecutionState)) + { + builder.Append(" executionState: "); + builder.AppendLine($"'{ExecutionState.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExecutionMessage), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" executionMessage: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ExecutionMessage)) + { + builder.Append(" executionMessage: "); + if (ExecutionMessage.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ExecutionMessage}'''"); + } + else + { + builder.AppendLine($"'{ExecutionMessage}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ExitCode), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" exitCode: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ExitCode)) + { + builder.Append(" exitCode: "); + builder.AppendLine($"{ExitCode.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Output), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" output: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Output)) + { + builder.Append(" output: "); + if (Output.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Output}'''"); + } + else + { + builder.AppendLine($"'{Output}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Error), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" error: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Error)) + { + builder.Append(" error: "); + if (Error.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Error}'''"); + } + else + { + builder.AppendLine($"'{Error}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StartOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" startTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StartOn)) + { + builder.Append(" startTime: "); + var formattedDateTimeString = TypeFormatters.ToString(StartOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EndOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EndOn)) + { + builder.Append(" endTime: "); + var formattedDateTimeString = TypeFormatters.ToString(EndOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Statuses), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" statuses: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Statuses)) + { + if (Statuses.Any()) + { + builder.Append(" statuses: "); + builder.AppendLine("["); + foreach (var item in Statuses) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " statuses: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -212,6 +383,8 @@ BinaryData IPersistableModel.Write(ModelReaderWri { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(MachineRunCommandInstanceView)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandInstanceView.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandInstanceView.cs index 1df7bdc4569b5..7d4e909db720b 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandInstanceView.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandInstanceView.cs @@ -75,20 +75,28 @@ internal MachineRunCommandInstanceView(HybridComputeExecutionState? executionSta } /// Script execution status. + [WirePath("executionState")] public HybridComputeExecutionState? ExecutionState { get; } /// Communicate script configuration errors or execution messages. + [WirePath("executionMessage")] public string ExecutionMessage { get; } /// Exit code returned from script execution. + [WirePath("exitCode")] public int? ExitCode { get; } /// Script output stream. + [WirePath("output")] public string Output { get; } /// Script error stream. + [WirePath("error")] public string Error { get; } /// Script start time. + [WirePath("startTime")] public DateTimeOffset? StartOn { get; } /// Script end time. + [WirePath("endTime")] public DateTimeOffset? EndOn { get; } /// The status information. + [WirePath("statuses")] public IReadOnlyList Statuses { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandScriptSource.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandScriptSource.Serialization.cs index 37b1f7078df0f..104c559c665b7 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandScriptSource.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandScriptSource.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -129,6 +130,97 @@ internal static MachineRunCommandScriptSource DeserializeMachineRunCommandScript return new MachineRunCommandScriptSource(script, scriptUri, commandId, scriptUriManagedIdentity, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Script), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" script: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Script)) + { + builder.Append(" script: "); + if (Script.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Script}'''"); + } + else + { + builder.AppendLine($"'{Script}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScriptUri), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scriptUri: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ScriptUri)) + { + builder.Append(" scriptUri: "); + builder.AppendLine($"'{ScriptUri.AbsoluteUri}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CommandId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" commandId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CommandId)) + { + builder.Append(" commandId: "); + if (CommandId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{CommandId}'''"); + } + else + { + builder.AppendLine($"'{CommandId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScriptUriManagedIdentity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scriptUriManagedIdentity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ScriptUriManagedIdentity)) + { + builder.Append(" scriptUriManagedIdentity: "); + BicepSerializationHelpers.AppendChildObject(builder, ScriptUriManagedIdentity, options, 2, false, " scriptUriManagedIdentity: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -137,6 +229,8 @@ BinaryData IPersistableModel.Write(ModelReaderWri { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(MachineRunCommandScriptSource)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandScriptSource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandScriptSource.cs index c429b1afe4608..2e5fc9bf1ee37 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandScriptSource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandScriptSource.cs @@ -66,12 +66,16 @@ internal MachineRunCommandScriptSource(string script, Uri scriptUri, string comm } /// Specifies the script content to be executed on the machine. + [WirePath("script")] public string Script { get; set; } /// Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI. + [WirePath("scriptUri")] public Uri ScriptUri { get; set; } /// Specifies the commandId of predefined built-in script. + [WirePath("commandId")] public string CommandId { get; set; } /// User-assigned managed identity that has access to scriptUri in case of Azure storage blob. Use an empty object in case of system-assigned identity. Make sure the Azure storage blob exists, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. + [WirePath("scriptUriManagedIdentity")] public RunCommandManagedIdentity ScriptUriManagedIdentity { get; set; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandsListResult.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandsListResult.Serialization.cs index 3adaf2e616ef9..b78e09453f047 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandsListResult.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/MachineRunCommandsListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -113,6 +115,67 @@ internal static MachineRunCommandsListResult DeserializeMachineRunCommandsListRe return new MachineRunCommandsListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -121,6 +184,8 @@ BinaryData IPersistableModel.Write(ModelReaderWrit { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(MachineRunCommandsListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/NetworkSecurityPerimeter.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/NetworkSecurityPerimeter.Serialization.cs index 37d625a2950fa..3ec6230e5ab59 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/NetworkSecurityPerimeter.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/NetworkSecurityPerimeter.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -114,6 +115,82 @@ internal static NetworkSecurityPerimeter DeserializeNetworkSecurityPerimeter(Jso return new NetworkSecurityPerimeter(id, perimeterGuid, location, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + if (Id.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Id}'''"); + } + else + { + builder.AppendLine($"'{Id}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PerimeterGuid), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" perimeterGuid: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PerimeterGuid)) + { + builder.Append(" perimeterGuid: "); + if (PerimeterGuid.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{PerimeterGuid}'''"); + } + else + { + builder.AppendLine($"'{PerimeterGuid}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" location: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Location)) + { + builder.Append(" location: "); + builder.AppendLine($"'{Location.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -122,6 +199,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NetworkSecurityPerimeter)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/NetworkSecurityPerimeter.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/NetworkSecurityPerimeter.cs index 636baa09bb137..9ecbdfe9274a8 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/NetworkSecurityPerimeter.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/NetworkSecurityPerimeter.cs @@ -65,10 +65,13 @@ internal NetworkSecurityPerimeter(string id, string perimeterGuid, AzureLocation } /// Azure resource Id. + [WirePath("id")] public string Id { get; } /// Guid of the Network Security Perimeter. + [WirePath("perimeterGuid")] public string PerimeterGuid { get; } /// Regional location of the perimeter. + [WirePath("location")] public AzureLocation? Location { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/NetworkSecurityPerimeterConfigurationListResult.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/NetworkSecurityPerimeterConfigurationListResult.Serialization.cs index ee91e881d15c0..f98253786b1cb 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/NetworkSecurityPerimeterConfigurationListResult.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/NetworkSecurityPerimeterConfigurationListResult.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -113,6 +115,67 @@ internal static NetworkSecurityPerimeterConfigurationListResult DeserializeNetwo return new NetworkSecurityPerimeterConfigurationListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -121,6 +184,8 @@ BinaryData IPersistableModel.Wr { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationListResult)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/NetworkSecurityPerimeterProfile.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/NetworkSecurityPerimeterProfile.Serialization.cs index e50267def9619..ffc26591b60e0 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/NetworkSecurityPerimeterProfile.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/NetworkSecurityPerimeterProfile.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -174,6 +176,133 @@ internal static NetworkSecurityPerimeterProfile DeserializeNetworkSecurityPerime serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AccessRulesVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" accessRulesVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AccessRulesVersion)) + { + builder.Append(" accessRulesVersion: "); + builder.AppendLine($"{AccessRulesVersion.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AccessRules), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" accessRules: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(AccessRules)) + { + if (AccessRules.Any()) + { + builder.Append(" accessRules: "); + builder.AppendLine("["); + foreach (var item in AccessRules) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " accessRules: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DiagnosticSettingsVersion), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" diagnosticSettingsVersion: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DiagnosticSettingsVersion)) + { + builder.Append(" diagnosticSettingsVersion: "); + builder.AppendLine($"{DiagnosticSettingsVersion.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EnabledLogCategories), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" enabledLogCategories: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(EnabledLogCategories)) + { + if (EnabledLogCategories.Any()) + { + builder.Append(" enabledLogCategories: "); + builder.AppendLine("["); + foreach (var item in EnabledLogCategories) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -182,6 +311,8 @@ BinaryData IPersistableModel.Write(ModelReaderW { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NetworkSecurityPerimeterProfile)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/NetworkSecurityPerimeterProfile.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/NetworkSecurityPerimeterProfile.cs index 7a7dad5b14cb4..afdfbf86c6356 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/NetworkSecurityPerimeterProfile.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/NetworkSecurityPerimeterProfile.cs @@ -70,14 +70,19 @@ internal NetworkSecurityPerimeterProfile(string name, int? accessRulesVersion, I } /// Name of the resource. + [WirePath("name")] public string Name { get; } /// Access rules version number. + [WirePath("accessRulesVersion")] public int? AccessRulesVersion { get; } /// Collection of access rules for the profile. + [WirePath("accessRules")] public IReadOnlyList AccessRules { get; } /// Diagnostic settings version number. + [WirePath("diagnosticSettingsVersion")] public int? DiagnosticSettingsVersion { get; } /// Collection of enabled log categories for the profile. + [WirePath("enabledLogCategories")] public IReadOnlyList EnabledLogCategories { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/PrivateEndpointConnectionDataModel.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/PrivateEndpointConnectionDataModel.Serialization.cs index a5957c00cb45f..e7d774c86a5b5 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/PrivateEndpointConnectionDataModel.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/PrivateEndpointConnectionDataModel.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -147,6 +148,89 @@ internal static PrivateEndpointConnectionDataModel DeserializePrivateEndpointCon serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Properties), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" properties: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Properties)) + { + builder.Append(" properties: "); + BicepSerializationHelpers.AppendChildObject(builder, Properties, options, 2, false, " properties: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -155,6 +239,8 @@ BinaryData IPersistableModel.Write(ModelRead { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(PrivateEndpointConnectionDataModel)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/PrivateEndpointConnectionDataModel.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/PrivateEndpointConnectionDataModel.cs index aef19203946c6..85ba453fc2196 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/PrivateEndpointConnectionDataModel.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/PrivateEndpointConnectionDataModel.cs @@ -66,6 +66,7 @@ internal PrivateEndpointConnectionDataModel(ResourceIdentifier id, string name, } /// The Private Endpoint Connection properties. + [WirePath("properties")] public HybridComputePrivateEndpointConnectionProperties Properties { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/PrivateLinkScopeValidationDetails.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/PrivateLinkScopeValidationDetails.Serialization.cs index 632357a5b58f4..63e4bc6b694ca 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/PrivateLinkScopeValidationDetails.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/PrivateLinkScopeValidationDetails.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; @@ -132,6 +134,74 @@ internal static PrivateLinkScopeValidationDetails DeserializePrivateLinkScopeVal return new PrivateLinkScopeValidationDetails(id, publicNetworkAccess, connectionDetails ?? new ChangeTrackingList(), serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublicNetworkAccess), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" publicNetworkAccess: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PublicNetworkAccess)) + { + builder.Append(" publicNetworkAccess: "); + builder.AppendLine($"'{PublicNetworkAccess.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ConnectionDetails), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" connectionDetails: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ConnectionDetails)) + { + if (ConnectionDetails.Any()) + { + builder.Append(" connectionDetails: "); + builder.AppendLine("["); + foreach (var item in ConnectionDetails) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " connectionDetails: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -140,6 +210,8 @@ BinaryData IPersistableModel.Write(ModelReade { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(PrivateLinkScopeValidationDetails)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/PrivateLinkScopeValidationDetails.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/PrivateLinkScopeValidationDetails.cs index b02fe72283bca..7b1db693f3238 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/PrivateLinkScopeValidationDetails.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/PrivateLinkScopeValidationDetails.cs @@ -66,10 +66,13 @@ internal PrivateLinkScopeValidationDetails(ResourceIdentifier id, HybridComputeP } /// Azure resource Id. + [WirePath("id")] public ResourceIdentifier Id { get; } /// Indicates whether machines associated with the private link scope can also use public Azure Arc service endpoints. + [WirePath("publicNetworkAccess")] public HybridComputePublicNetworkAccessType? PublicNetworkAccess { get; } /// List of Private Endpoint Connection details. + [WirePath("connectionDetails")] public IReadOnlyList ConnectionDetails { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/RunCommandInputParameter.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/RunCommandInputParameter.Serialization.cs index 2d31d4b0d2a32..e252cbbca22d6 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/RunCommandInputParameter.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/RunCommandInputParameter.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -93,6 +94,67 @@ internal static RunCommandInputParameter DeserializeRunCommandInputParameter(Jso return new RunCommandInputParameter(name, value, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Value)) + { + builder.Append(" value: "); + if (Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Value}'''"); + } + else + { + builder.AppendLine($"'{Value}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -101,6 +163,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(RunCommandInputParameter)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/RunCommandInputParameter.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/RunCommandInputParameter.cs index e998aa0af3782..055d761f88858 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/RunCommandInputParameter.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/RunCommandInputParameter.cs @@ -75,8 +75,10 @@ internal RunCommandInputParameter() } /// The run command parameter name. + [WirePath("name")] public string Name { get; set; } /// The run command parameter value. + [WirePath("value")] public string Value { get; set; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/RunCommandManagedIdentity.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/RunCommandManagedIdentity.Serialization.cs index 13c163d0d5fbe..7a7799dc03e70 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/RunCommandManagedIdentity.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/RunCommandManagedIdentity.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -107,6 +108,51 @@ internal static RunCommandManagedIdentity DeserializeRunCommandManagedIdentity(J return new RunCommandManagedIdentity(clientId, objectId, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ClientId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" clientId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ClientId)) + { + builder.Append(" clientId: "); + builder.AppendLine($"'{ClientId.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ObjectId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" objectId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ObjectId)) + { + builder.Append(" objectId: "); + builder.AppendLine($"'{ObjectId.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -115,6 +161,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterO { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(RunCommandManagedIdentity)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/RunCommandManagedIdentity.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/RunCommandManagedIdentity.cs index 7a27ef53028d1..4bb36250f9c60 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/RunCommandManagedIdentity.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/RunCommandManagedIdentity.cs @@ -62,8 +62,10 @@ internal RunCommandManagedIdentity(Guid? clientId, Guid? objectId, IDictionary Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be used if this is provided. + [WirePath("clientId")] public Guid? ClientId { get; set; } /// Object Id (GUID value) of the user-assigned managed identity. ClientId should not be used if this is provided. + [WirePath("objectId")] public Guid? ObjectId { get; set; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/VolumeLicenseDetails.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/VolumeLicenseDetails.Serialization.cs index 111cc9865cec4..66332be78880e 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/VolumeLicenseDetails.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/VolumeLicenseDetails.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Text; using System.Text.Json; using Azure.Core; @@ -103,6 +104,59 @@ internal static VolumeLicenseDetails DeserializeVolumeLicenseDetails(JsonElement return new VolumeLicenseDetails(programYear, invoiceId, serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProgramYear), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" programYear: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProgramYear)) + { + builder.Append(" programYear: "); + builder.AppendLine($"'{ProgramYear.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(InvoiceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" invoiceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(InvoiceId)) + { + builder.Append(" invoiceId: "); + if (InvoiceId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{InvoiceId}'''"); + } + else + { + builder.AppendLine($"'{InvoiceId}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -111,6 +165,8 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOption { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(VolumeLicenseDetails)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/VolumeLicenseDetails.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/VolumeLicenseDetails.cs index 8462892f4cdf4..78514bbd99092 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/VolumeLicenseDetails.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/Models/VolumeLicenseDetails.cs @@ -62,8 +62,10 @@ internal VolumeLicenseDetails(HybridComputeProgramYear? programYear, string invo } /// Describes the program year the volume license is for. + [WirePath("programYear")] public HybridComputeProgramYear? ProgramYear { get; set; } /// The invoice id for the volume license. + [WirePath("invoiceId")] public string InvoiceId { get; set; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/NetworkSecurityPerimeterConfigurationCollection.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/NetworkSecurityPerimeterConfigurationCollection.cs index de14566ad3502..cf2f12cba90ca 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/NetworkSecurityPerimeterConfigurationCollection.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/NetworkSecurityPerimeterConfigurationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(strin /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetA /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(Ca /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string perimeterName, Canc /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string perimeterName, CancellationToken can /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/NetworkSecurityPerimeterConfigurationData.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/NetworkSecurityPerimeterConfigurationData.Serialization.cs index 461a0e1198135..429dcd86d739b 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/NetworkSecurityPerimeterConfigurationData.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/NetworkSecurityPerimeterConfigurationData.Serialization.cs @@ -8,6 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; +using System.Text; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.HybridCompute.Models; @@ -233,6 +235,168 @@ internal static NetworkSecurityPerimeterConfigurationData DeserializeNetworkSecu serializedAdditionalRawData); } + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + if (ProvisioningState.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ProvisioningState}'''"); + } + else + { + builder.AppendLine($"'{ProvisioningState}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningIssues), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningIssues: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(ProvisioningIssues)) + { + if (ProvisioningIssues.Any()) + { + builder.Append(" provisioningIssues: "); + builder.AppendLine("["); + foreach (var item in ProvisioningIssues) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " provisioningIssues: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NetworkSecurityPerimeter), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" networkSecurityPerimeter: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NetworkSecurityPerimeter)) + { + builder.Append(" networkSecurityPerimeter: "); + BicepSerializationHelpers.AppendChildObject(builder, NetworkSecurityPerimeter, options, 4, false, " networkSecurityPerimeter: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceAssociation), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceAssociation: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceAssociation)) + { + builder.Append(" resourceAssociation: "); + BicepSerializationHelpers.AppendChildObject(builder, ResourceAssociation, options, 4, false, " resourceAssociation: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Profile), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" profile: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Profile)) + { + builder.Append(" profile: "); + BicepSerializationHelpers.AppendChildObject(builder, Profile, options, 4, false, " profile: "); + } + } + + builder.AppendLine(" }"); + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; @@ -241,6 +405,8 @@ BinaryData IPersistableModel.Write(Mo { case "J": return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); default: throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationData)} does not support writing '{options.Format}' format."); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/NetworkSecurityPerimeterConfigurationData.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/NetworkSecurityPerimeterConfigurationData.cs index 1e2fad8775edb..5bc2ac2cf52c4 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/NetworkSecurityPerimeterConfigurationData.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/NetworkSecurityPerimeterConfigurationData.cs @@ -79,14 +79,19 @@ internal NetworkSecurityPerimeterConfigurationData(ResourceIdentifier id, string } /// Current state of this NetworkSecurityPerimeter: whether or not is has been provisioned within the resource group it is defined. Users cannot change this value but are able to read from it. Values will include Provisioning ,Succeeded, Canceled and Failed. + [WirePath("properties.provisioningState")] public string ProvisioningState { get; } /// Provisioning issues. + [WirePath("properties.provisioningIssues")] public IReadOnlyList ProvisioningIssues { get; } /// The Network Security Perimeter associated with this configuration. + [WirePath("properties.networkSecurityPerimeter")] public NetworkSecurityPerimeter NetworkSecurityPerimeter { get; } /// The Resource Association. + [WirePath("properties.resourceAssociation")] public HybridComputeResourceAssociation ResourceAssociation { get; } /// Network Security Perimeter profile. + [WirePath("properties.profile")] public NetworkSecurityPerimeterProfile Profile { get; } } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/NetworkSecurityPerimeterConfigurationResource.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/NetworkSecurityPerimeterConfigurationResource.cs index 7d2de29e1b311..a5531384c3cef 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/NetworkSecurityPerimeterConfigurationResource.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/NetworkSecurityPerimeterConfigurationResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-03-31-preview + /// 2024-05-20-preview /// /// /// Resource diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/ExtensionMetadataRestOperations.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/ExtensionMetadataRestOperations.cs index 791e837b4b2bd..535763209d97f 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/ExtensionMetadataRestOperations.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/ExtensionMetadataRestOperations.cs @@ -32,7 +32,7 @@ public ExtensionMetadataRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-03-31-preview"; + _apiVersion = apiVersion ?? "2024-05-20-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/GatewaysRestOperations.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/GatewaysRestOperations.cs new file mode 100644 index 0000000000000..4d34765a6e06a --- /dev/null +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/GatewaysRestOperations.cs @@ -0,0 +1,731 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.HybridCompute.Models; + +namespace Azure.ResourceManager.HybridCompute +{ + internal partial class GatewaysRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of GatewaysRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public GatewaysRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-05-20-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string gatewayName, HybridComputeGatewayData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.HybridCompute/gateways/", false); + uri.AppendPath(gatewayName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string gatewayName, HybridComputeGatewayData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.HybridCompute/gateways/", false); + uri.AppendPath(gatewayName, true); + 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(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// The operation to create or update a gateway. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Gateway. + /// Parameters supplied to the Create gateway operation. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string gatewayName, HybridComputeGatewayData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, gatewayName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// The operation to create or update a gateway. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Gateway. + /// Parameters supplied to the Create gateway operation. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string gatewayName, HybridComputeGatewayData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, gatewayName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string gatewayName, HybridComputeGatewayPatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.HybridCompute/gateways/", false); + uri.AppendPath(gatewayName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string gatewayName, HybridComputeGatewayPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.HybridCompute/gateways/", false); + uri.AppendPath(gatewayName, true); + 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(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// The operation to update a gateway. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Gateway. + /// Parameters supplied to the Update gateway operation. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string gatewayName, HybridComputeGatewayPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, gatewayName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + HybridComputeGatewayData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = HybridComputeGatewayData.DeserializeHybridComputeGatewayData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// The operation to update a gateway. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Gateway. + /// Parameters supplied to the Update gateway operation. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string gatewayName, HybridComputeGatewayPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, gatewayName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + HybridComputeGatewayData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = HybridComputeGatewayData.DeserializeHybridComputeGatewayData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string gatewayName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.HybridCompute/gateways/", false); + uri.AppendPath(gatewayName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string gatewayName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.HybridCompute/gateways/", false); + uri.AppendPath(gatewayName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Retrieves information about the view of a gateway. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Gateway. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, gatewayName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + HybridComputeGatewayData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = HybridComputeGatewayData.DeserializeHybridComputeGatewayData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((HybridComputeGatewayData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Retrieves information about the view of a gateway. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Gateway. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, gatewayName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + HybridComputeGatewayData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = HybridComputeGatewayData.DeserializeHybridComputeGatewayData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((HybridComputeGatewayData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string gatewayName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.HybridCompute/gateways/", false); + uri.AppendPath(gatewayName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string gatewayName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.HybridCompute/gateways/", false); + uri.AppendPath(gatewayName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// The operation to delete a gateway. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Gateway. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, gatewayName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// The operation to delete a gateway. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Gateway. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, gatewayName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.HybridCompute/gateways", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.HybridCompute/gateways", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// The operation to get all gateways of a non-Azure machine. + /// 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. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + GatewaysListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = GatewaysListResult.DeserializeGatewaysListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// The operation to get all gateways of a non-Azure machine. + /// 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. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + GatewaysListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = GatewaysListResult.DeserializeGatewaysListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.HybridCompute/gateways", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.HybridCompute/gateways", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// The operation to get all gateways of a non-Azure machine. + /// The ID of the target subscription. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + GatewaysListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = GatewaysListResult.DeserializeGatewaysListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// The operation to get all gateways of a non-Azure machine. + /// The ID of the target subscription. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + GatewaysListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = GatewaysListResult.DeserializeGatewaysListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// The operation to get all gateways of a non-Azure machine. + /// The URL to the next page of results. + /// 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. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + GatewaysListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = GatewaysListResult.DeserializeGatewaysListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// The operation to get all gateways of a non-Azure machine. + /// The URL to the next page of results. + /// 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. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + GatewaysListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = GatewaysListResult.DeserializeGatewaysListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// The operation to get all gateways of a non-Azure machine. + /// The URL to the next page of results. + /// 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. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + GatewaysListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = GatewaysListResult.DeserializeGatewaysListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// The operation to get all gateways of a non-Azure machine. + /// The URL to the next page of results. + /// 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. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + GatewaysListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = GatewaysListResult.DeserializeGatewaysListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/HybridComputeManagementRestOperations.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/HybridComputeManagementRestOperations.cs index b3d6987a89417..6bbbeb1f28980 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/HybridComputeManagementRestOperations.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/HybridComputeManagementRestOperations.cs @@ -31,7 +31,7 @@ public HybridComputeManagementRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-03-31-preview"; + _apiVersion = apiVersion ?? "2024-05-20-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/LicensesRestOperations.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/LicensesRestOperations.cs index d7754ce50a084..174bfb4dad683 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/LicensesRestOperations.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/LicensesRestOperations.cs @@ -32,7 +32,7 @@ public LicensesRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-03-31-preview"; + _apiVersion = apiVersion ?? "2024-05-20-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/MachineExtensionsRestOperations.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/MachineExtensionsRestOperations.cs index ba2d929698271..859dc15f190b8 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/MachineExtensionsRestOperations.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/MachineExtensionsRestOperations.cs @@ -32,7 +32,7 @@ public MachineExtensionsRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-03-31-preview"; + _apiVersion = apiVersion ?? "2024-05-20-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/MachineRunCommandsRestOperations.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/MachineRunCommandsRestOperations.cs index 5baabc84aeed3..6c4b4699cbafa 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/MachineRunCommandsRestOperations.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/MachineRunCommandsRestOperations.cs @@ -32,7 +32,7 @@ public MachineRunCommandsRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-03-31-preview"; + _apiVersion = apiVersion ?? "2024-05-20-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/MachinesRestOperations.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/MachinesRestOperations.cs index 8471e3125d021..41bc2768795c3 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/MachinesRestOperations.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/MachinesRestOperations.cs @@ -32,7 +32,7 @@ public MachinesRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-03-31-preview"; + _apiVersion = apiVersion ?? "2024-05-20-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/NetworkProfileRestOperations.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/NetworkProfileRestOperations.cs index ca5ccb732bcd4..3ea8898f3dd0d 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/NetworkProfileRestOperations.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/NetworkProfileRestOperations.cs @@ -32,7 +32,7 @@ public NetworkProfileRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-03-31-preview"; + _apiVersion = apiVersion ?? "2024-05-20-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/NetworkSecurityPerimeterConfigurationsRestOperations.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/NetworkSecurityPerimeterConfigurationsRestOperations.cs index c5f7208550d5e..a7759fbf7d493 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/NetworkSecurityPerimeterConfigurationsRestOperations.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/NetworkSecurityPerimeterConfigurationsRestOperations.cs @@ -32,7 +32,7 @@ public NetworkSecurityPerimeterConfigurationsRestOperations(HttpPipeline pipelin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-03-31-preview"; + _apiVersion = apiVersion ?? "2024-05-20-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs index 7dc11a05037fa..0fc03a5eb35fb 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public PrivateEndpointConnectionsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-03-31-preview"; + _apiVersion = apiVersion ?? "2024-05-20-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs index ed3af8e54dacc..54c36e60cd944 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs @@ -32,7 +32,7 @@ public PrivateLinkResourcesRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-03-31-preview"; + _apiVersion = apiVersion ?? "2024-05-20-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/PrivateLinkScopesRestOperations.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/PrivateLinkScopesRestOperations.cs index 7efa0b753b63d..157e2039387bd 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/PrivateLinkScopesRestOperations.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/PrivateLinkScopesRestOperations.cs @@ -32,7 +32,7 @@ public PrivateLinkScopesRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-03-31-preview"; + _apiVersion = apiVersion ?? "2024-05-20-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/SettingsRestOperations.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/SettingsRestOperations.cs new file mode 100644 index 0000000000000..705e6da3d6914 --- /dev/null +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/RestOperations/SettingsRestOperations.cs @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.HybridCompute.Models; + +namespace Azure.ResourceManager.HybridCompute +{ + internal partial class SettingsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of SettingsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public SettingsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-05-20-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string baseProvider, string baseResourceType, string baseResourceName, string settingsResourceName, HybridComputeTargetResourceSettings hybridComputeTargetResourceSettings) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/", false); + uri.AppendPath(baseProvider, true); + uri.AppendPath("/", false); + uri.AppendPath(baseResourceType, true); + uri.AppendPath("/", false); + uri.AppendPath(baseResourceName, true); + uri.AppendPath("/providers/Microsoft.HybridCompute/settings/", false); + uri.AppendPath(settingsResourceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string baseProvider, string baseResourceType, string baseResourceName, string settingsResourceName, HybridComputeTargetResourceSettings hybridComputeTargetResourceSettings) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/", false); + uri.AppendPath(baseProvider, true); + uri.AppendPath("/", false); + uri.AppendPath(baseResourceType, true); + uri.AppendPath("/", false); + uri.AppendPath(baseResourceName, true); + uri.AppendPath("/providers/Microsoft.HybridCompute/settings/", false); + uri.AppendPath(settingsResourceName, true); + 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(hybridComputeTargetResourceSettings, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates the base Settings of the target resource. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the base Resource Provider. + /// The name of the base Resource Type. + /// The name of the base resource. + /// The name of the settings resource. + /// Settings details. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string baseProvider, string baseResourceType, string baseResourceName, string settingsResourceName, HybridComputeTargetResourceSettings hybridComputeTargetResourceSettings, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(baseProvider, nameof(baseProvider)); + Argument.AssertNotNullOrEmpty(baseResourceType, nameof(baseResourceType)); + Argument.AssertNotNullOrEmpty(baseResourceName, nameof(baseResourceName)); + Argument.AssertNotNullOrEmpty(settingsResourceName, nameof(settingsResourceName)); + Argument.AssertNotNull(hybridComputeTargetResourceSettings, nameof(hybridComputeTargetResourceSettings)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, baseProvider, baseResourceType, baseResourceName, settingsResourceName, hybridComputeTargetResourceSettings); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + HybridComputeTargetResourceSettings value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = HybridComputeTargetResourceSettings.DeserializeHybridComputeTargetResourceSettings(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates the base Settings of the target resource. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the base Resource Provider. + /// The name of the base Resource Type. + /// The name of the base resource. + /// The name of the settings resource. + /// Settings details. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string baseProvider, string baseResourceType, string baseResourceName, string settingsResourceName, HybridComputeTargetResourceSettings hybridComputeTargetResourceSettings, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(baseProvider, nameof(baseProvider)); + Argument.AssertNotNullOrEmpty(baseResourceType, nameof(baseResourceType)); + Argument.AssertNotNullOrEmpty(baseResourceName, nameof(baseResourceName)); + Argument.AssertNotNullOrEmpty(settingsResourceName, nameof(settingsResourceName)); + Argument.AssertNotNull(hybridComputeTargetResourceSettings, nameof(hybridComputeTargetResourceSettings)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, baseProvider, baseResourceType, baseResourceName, settingsResourceName, hybridComputeTargetResourceSettings); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + HybridComputeTargetResourceSettings value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = HybridComputeTargetResourceSettings.DeserializeHybridComputeTargetResourceSettings(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/autorest.md b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/autorest.md index 540ed193ea88a..2e98e9065b1cf 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/autorest.md +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/autorest.md @@ -8,8 +8,8 @@ azure-arm: true csharp: true library-name: HybridCompute namespace: Azure.ResourceManager.HybridCompute -require: https://github.com/Azure/azure-rest-api-specs/blob/5f0ca7e524c788be5f2b7e7488076dadba7b26ce/specification/hybridcompute/resource-manager/readme.md -#tag: package-preview-2024-03 +require: https://github.com/Azure/azure-rest-api-specs/blob/b48d5d72073a296514d3d4db77887d8711526ccc/specification/hybridcompute/resource-manager/readme.md +#tag: package-preview-2024-05 output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: @@ -21,6 +21,7 @@ modelerfour: # Mitigate the duplication schema named 'ErrorDetail' lenient-model-deduplication: true use-model-reader-writer: true +enable-bicep-serialization: true #mgmt-debug: # show-serialized-names: true @@ -63,6 +64,9 @@ prepend-rp-prefix: - ProvisioningIssue - ProvisioningIssueSeverity - ProvisioningIssueType + - Gateway + - GatewayUpdate + - GatewayType list-exception: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{baseProvider}/{baseResourceType}/{baseResourceName}/providers/Microsoft.HybridCompute/settings/{settingsResourceName} @@ -99,6 +103,13 @@ rename-mapping: RunCommandManagedIdentity.objectId: -|uuid StatusLevelTypes: HybridComputeStatusLevelType StatusTypes: HybridComputeStatusType + OSProfileWindowsConfiguration.patchSettings.enableHotpatching: IsHotpatchingEnabled + PatchSettingsStatus: HybridComputePatchSettingsStatus + Settings: HybridComputeTargetResourceSettings + OSProfileLinuxConfiguration.patchSettings.enableHotpatching: IsHotpatchingEnabled + +override-operation-name: + Settings_Update: UpdateTargetResourceSetting format-by-name-rules: 'tenantId': 'uuid' @@ -244,48 +255,18 @@ directive: } } - # remove cmdlets - - where: - subject: NetworkProfile - remove: true - - where: - subject: MachineRunCommand - verb: Set - remove: true - - # remove operations - - remove-operation: Machines_CreateOrUpdate - - remove-operation: MachineRunCommands_Update + # we don't want user to interact with them / we don't support some operations + - remove-operation: MachineRunCommands_Update #PATCH + # internal operations - remove-operation: AgentVersion_List - remove-operation: AgentVersion_Get + # we don't use them, pending to remove in the future - remove-operation: HybridIdentityMetadata_Get - remove-operation: HybridIdentityMetadata_ListByMachines - - # add back when swagger change is checked in - - remove-operation: Licenses_ValidateLicense - - remove-operation: Licenses_Update #PATCH - - - remove-operation: LicenseProfiles_Get - - remove-operation: LicenseProfiles_Delete - - remove-operation: LicenseProfiles_Update - - remove-operation: LicenseProfiles_List - - remove-operation: LicenseProfiles_CreateOrUpdate - - - remove-operation: NetworkConfigurations_Get - - remove-operation: NetworkConfigurations_Update - - remove-operation: NetworkConfigurations_CreateOrUpdate - - - remove-operation: NetworkSecurityPerimeterConfigurations_ReconcileForPrivateLinkScope - - # we will generate a seperate SDK for them - - remove-operation: Gateways_CreateOrUpdate - - remove-operation: Gateways_Get - - remove-operation: Gateways_ListByResourceGroup - - remove-operation: Gateways_ListBySubscription - - remove-operation: Gateways_Delete - - remove-operation: Gateways_Update - - remove-operation: Settings_Update + # we don't want user to interact with them - remove-operation: Settings_Get - remove-operation: Settings_Patch + # adding it will remove HybridComputeLicenseData resource and create HybridComputeLicensePatch resouce and cause other ESU commands to fail + - remove-operation: Licenses_Update #PATCH ``` From f77b824ba719aa5a552df4b6a398edf4242ad648 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 19 Jul 2024 06:37:37 -0400 Subject: [PATCH 137/144] Update AutoRest C# version to 3.0.0-beta.20240719.2 (#45097) * Update Generator Version 3.0.0-beta.20240719.2 * Update SDK codes mi_pu_4 --- eng/Packages.Data.props | 2 +- eng/emitter-package-lock.json | 222 ++++++++++-------- eng/emitter-package.json | 24 +- .../src/Generated/Lineage.cs | 2 +- 4 files changed, 133 insertions(+), 117 deletions(-) diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index 02e831547cfdc..29385e84e9e7e 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -227,7 +227,7 @@ All should have PrivateAssets="All" set so they don't become package dependencies --> - + diff --git a/eng/emitter-package-lock.json b/eng/emitter-package-lock.json index cb550726ab329..b645c088e100a 100644 --- a/eng/emitter-package-lock.json +++ b/eng/emitter-package-lock.json @@ -5,64 +5,64 @@ "packages": { "": { "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20240716.2" + "@azure-tools/typespec-csharp": "0.2.0-beta.20240719.2" }, "devDependencies": { - "@azure-tools/typespec-autorest": "0.43.0", - "@azure-tools/typespec-azure-core": "0.43.0", - "@azure-tools/typespec-azure-resource-manager": "0.43.0", - "@azure-tools/typespec-azure-rulesets": "0.43.0", - "@azure-tools/typespec-client-generator-core": "0.43.2", - "@typespec/compiler": "0.57.0", - "@typespec/http": "0.57.0", - "@typespec/openapi": "0.57.0", - "@typespec/rest": "0.57.0", - "@typespec/versioning": "0.57.0", - "@typespec/xml": "0.57.0" + "@azure-tools/typespec-autorest": "0.44.0", + "@azure-tools/typespec-azure-core": "0.44.0", + "@azure-tools/typespec-azure-resource-manager": "0.44.0", + "@azure-tools/typespec-azure-rulesets": "0.44.0", + "@azure-tools/typespec-client-generator-core": "0.44.1", + "@typespec/compiler": "0.58.0", + "@typespec/http": "0.58.0", + "@typespec/openapi": "0.58.0", + "@typespec/rest": "0.58.0", + "@typespec/versioning": "0.58.0", + "@typespec/xml": "0.58.0" } }, "node_modules/@autorest/csharp": { - "version": "3.0.0-beta.20240716.2", - "resolved": "https://registry.npmjs.org/@autorest/csharp/-/csharp-3.0.0-beta.20240716.2.tgz", - "integrity": "sha512-41B3k1dYg/LX5QrdepgKH6TvmKK5LLW+u+a5fp4GmbJSMPWVkubmrq3u+7VlNOUex050/f+qRG5hjuCV+Ghhmw==" + "version": "3.0.0-beta.20240719.2", + "resolved": "https://registry.npmjs.org/@autorest/csharp/-/csharp-3.0.0-beta.20240719.2.tgz", + "integrity": "sha512-RtNW9RcwfUE7c1L/PyJMWu3Vi+Np13B0w+shagHpsEf8LwX2kfj30j1fWhA94ZHWDc89Bp6Z9E4GMEhsa04Oug==" }, "node_modules/@azure-tools/typespec-autorest": { - "version": "0.43.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-autorest/-/typespec-autorest-0.43.0.tgz", - "integrity": "sha512-tZ9uXXOdxu2y01W9n3mzXf+IEY2MQkP/JaQaKlcOx2+dbklHNQWSDU0Vm6Gmm6l//XiF9QiI8653BiuO97czyw==", + "version": "0.44.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-autorest/-/typespec-autorest-0.44.0.tgz", + "integrity": "sha512-GlIQayA6HfKndq1T2qHBXtL6n8gTiShUEhi30zncoBaIUnwumkXSnx18uCQl0EzFmvAqLYt3kbHqQNzZIdGaeQ==", "dev": true, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "~0.43.0", - "@azure-tools/typespec-azure-resource-manager": "~0.43.0", - "@azure-tools/typespec-client-generator-core": "~0.43.0", - "@typespec/compiler": "~0.57.0", - "@typespec/http": "~0.57.0", - "@typespec/openapi": "~0.57.0", - "@typespec/rest": "~0.57.0", - "@typespec/versioning": "~0.57.0" + "@azure-tools/typespec-azure-core": "~0.44.0", + "@azure-tools/typespec-azure-resource-manager": "~0.44.0", + "@azure-tools/typespec-client-generator-core": "~0.44.0", + "@typespec/compiler": "~0.58.0", + "@typespec/http": "~0.58.0", + "@typespec/openapi": "~0.58.0", + "@typespec/rest": "~0.58.0", + "@typespec/versioning": "~0.58.0" } }, "node_modules/@azure-tools/typespec-azure-core": { - "version": "0.43.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.43.0.tgz", - "integrity": "sha512-B1r0i3segJ7RuNXxcAMBy8H2t+jTkaf74dkyUWD0HIFPkhETN0uR59nuor+s+LoLU8yI4JypOFSNZt6e1rod8w==", + "version": "0.44.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.44.0.tgz", + "integrity": "sha512-d11QK2v5fOZH8YUqf42FsqHEirKCHzeKFq4Uo/51BXCXmJJahsTaFMAG2M0GoJe8tmTHeMijStnVMfzcGNqCAA==", "dev": true, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.57.0", - "@typespec/http": "~0.57.0", - "@typespec/rest": "~0.57.0" + "@typespec/compiler": "~0.58.0", + "@typespec/http": "~0.58.0", + "@typespec/rest": "~0.58.0" } }, "node_modules/@azure-tools/typespec-azure-resource-manager": { - "version": "0.43.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-resource-manager/-/typespec-azure-resource-manager-0.43.0.tgz", - "integrity": "sha512-0GQL+/o1u+PAB63FpYz3sy3ZgZvCtk5T4sDAnICnV23v2YWIONDMUfxxd0x40xJbY6PkcwwHDpBLNMqajf2H6A==", + "version": "0.44.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-resource-manager/-/typespec-azure-resource-manager-0.44.0.tgz", + "integrity": "sha512-m4dG41at6En1swbxlvCDl1v4Mvrfp17acDnRxEcd4SdKP2R9eVS2mBy1tSuFtMcJlOnoBZ5CxQgk+Osg/Q9nmA==", "dev": true, "dependencies": { "change-case": "~5.4.4", @@ -72,33 +72,33 @@ "node": ">=18.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "~0.43.0", - "@typespec/compiler": "~0.57.0", - "@typespec/http": "~0.57.0", - "@typespec/openapi": "~0.57.0", - "@typespec/rest": "~0.57.0", - "@typespec/versioning": "~0.57.0" + "@azure-tools/typespec-azure-core": "~0.44.0", + "@typespec/compiler": "~0.58.0", + "@typespec/http": "~0.58.0", + "@typespec/openapi": "~0.58.0", + "@typespec/rest": "~0.58.0", + "@typespec/versioning": "~0.58.0" } }, "node_modules/@azure-tools/typespec-azure-rulesets": { - "version": "0.43.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-rulesets/-/typespec-azure-rulesets-0.43.0.tgz", - "integrity": "sha512-yh0dNQIM4hRDWATh/tkONP991uMxFDHY8BkC0eWtIpfTjQTuR2PlGhrLgMxHT2Q5cCusfkNWeFvKDYlxKeoFLA==", + "version": "0.44.0", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-rulesets/-/typespec-azure-rulesets-0.44.0.tgz", + "integrity": "sha512-ZFiT+rtLIq3uP4uSr85i7w+3r02BEqERePaCtTyjexo2IBz0lwQ5Nn/5ujfuDDSy+3daoC2bQy8hw/BGWg9/Ng==", "dev": true, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "~0.43.0", - "@azure-tools/typespec-azure-resource-manager": "~0.43.0", - "@azure-tools/typespec-client-generator-core": "~0.43.0", - "@typespec/compiler": "~0.57.0" + "@azure-tools/typespec-azure-core": "~0.44.0", + "@azure-tools/typespec-azure-resource-manager": "~0.44.0", + "@azure-tools/typespec-client-generator-core": "~0.44.0", + "@typespec/compiler": "~0.58.0" } }, "node_modules/@azure-tools/typespec-client-generator-core": { - "version": "0.43.2", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.43.2.tgz", - "integrity": "sha512-UAVV30BtTQBiXmBoQ3SyvmiuBDYoqWFIn7G96hjojpwXpE6D5ba0y5LascMuF1b65eAhGnnf974DElJE9DGepQ==", + "version": "0.44.1", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.44.1.tgz", + "integrity": "sha512-hpDYS4J329kPnXMAndburITh81jgOloxLrv6QXJadurnFhxFHb8AycGO8VWgFYTf04cWd7yDx7HutzGSN9C7TQ==", "dev": true, "dependencies": { "change-case": "~5.4.4", @@ -108,20 +108,20 @@ "node": ">=18.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "~0.43.0", - "@typespec/compiler": "~0.57.0", - "@typespec/http": "~0.57.0", - "@typespec/rest": "~0.57.0", - "@typespec/versioning": "~0.57.0" + "@azure-tools/typespec-azure-core": "~0.44.0", + "@typespec/compiler": "~0.58.0", + "@typespec/http": "~0.58.0", + "@typespec/rest": "~0.58.0", + "@typespec/versioning": "~0.58.0" } }, "node_modules/@azure-tools/typespec-csharp": { - "version": "0.2.0-beta.20240716.2", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-csharp/-/typespec-csharp-0.2.0-beta.20240716.2.tgz", - "integrity": "sha512-7Oa7i0J2TmcP3BFMHMzjSfQbp1hFQkLTNn1FUxAv8vNJaYTtP3Y2d5JZ2vTTrpULHsF8T3CwdQ1pGTS6xVk5iQ==", + "version": "0.2.0-beta.20240719.2", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-csharp/-/typespec-csharp-0.2.0-beta.20240719.2.tgz", + "integrity": "sha512-6c+wVVNvMv8yr+8zmDlMyJHgpWOGNN9sOIUN7PD5RQctuxf65yKXJTEscOXRY8MBCCa4ctVE0UBYipP+bJph1w==", "dependencies": { - "@autorest/csharp": "3.0.0-beta.20240716.2", - "@typespec/http-client-csharp": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js-test-autorest/npm/registry/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20240712.1.tgz", + "@autorest/csharp": "3.0.0-beta.20240719.2", + "@typespec/http-client-csharp": "0.1.9-alpha.20240718.1", "json-serialize-refs": "0.1.0-0" }, "peerDependencies": { @@ -223,23 +223,24 @@ } }, "node_modules/@typespec/compiler": { - "version": "0.57.0", - "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-0.57.0.tgz", - "integrity": "sha512-Z5L7J90Ol21IbzU+rBD2wzKy2vJ2Yg2FIzi+yB5rtb7/c4oBea/CgEByMVHBtT7uw45ZXJpHOiepuGSPVXw2EA==", + "version": "0.58.0", + "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-0.58.0.tgz", + "integrity": "sha512-kyyXwjy9mLwOTYZyXbfPzGr2dpRwj2DASvUAKxax/BVKFLVxTfecIZKwWCLB42RxgraqYx2/t4RhviH+QbEtqA==", "dev": true, "dependencies": { - "@babel/code-frame": "~7.24.2", - "ajv": "~8.13.0", + "@babel/code-frame": "~7.24.7", + "ajv": "~8.16.0", "change-case": "~5.4.4", - "globby": "~14.0.1", + "globby": "~14.0.2", "mustache": "~4.2.0", "picocolors": "~1.0.1", - "prettier": "~3.2.5", + "prettier": "~3.3.2", "prompts": "~2.4.2", "semver": "^7.6.2", + "temporal-polyfill": "^0.2.5", "vscode-languageserver": "~9.0.1", "vscode-languageserver-textdocument": "~1.0.11", - "yaml": "~2.4.2", + "yaml": "~2.4.5", "yargs": "~17.7.2" }, "bin": { @@ -251,21 +252,21 @@ } }, "node_modules/@typespec/http": { - "version": "0.57.0", - "resolved": "https://registry.npmjs.org/@typespec/http/-/http-0.57.0.tgz", - "integrity": "sha512-k3bWOTPNqlRB3/TmrXVBtObmxj2J20l2FnhGXvs+tjdtbXLxCQWmvQz6xlne9nkLAtWVB/pQRUn+oMJfhWta3w==", + "version": "0.58.0", + "resolved": "https://registry.npmjs.org/@typespec/http/-/http-0.58.0.tgz", + "integrity": "sha512-jQpkugg9AZVrNDMkDIgZRpIoRkkU2b0LtKWqMGg33MItYj9/DYSgDtY7xb7oCBppRtFFZ/h138HyhYl3zQxZRg==", "dev": true, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.57.0" + "@typespec/compiler": "~0.58.0" } }, "node_modules/@typespec/http-client-csharp": { - "version": "0.1.9-alpha.20240712.1", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js-test-autorest/npm/registry/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20240712.1.tgz", - "integrity": "sha512-hmlnbLiP4XoNa46QRzQMXfFAf0G5KB32G4Ut0QTlkx7NYhWxKviNPiG0H6RcxM5FeuHqxWorX0kBEAYySHj95w==", + "version": "0.1.9-alpha.20240718.1", + "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20240718.1.tgz", + "integrity": "sha512-4bB2Q/ZJiQs63tLQKB4ao1DtbIhSipKM9zsHComz7N3p95rvVw2a2EnXCfqqgmJgHERgykcLB0X8CljuJGPHMA==", "dependencies": { "json-serialize-refs": "0.1.0-0" }, @@ -280,59 +281,59 @@ } }, "node_modules/@typespec/openapi": { - "version": "0.57.0", - "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-0.57.0.tgz", - "integrity": "sha512-35wK/BqjOXSlhWuGMwoYN3FSgIYFOKtw8ot4ErcgmxAGuKaS2GkUhZvtQJXUn2ByU0Fl4jqslPmTz8SEcz7rbw==", + "version": "0.58.0", + "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-0.58.0.tgz", + "integrity": "sha512-gu6nXfmpfZrfq8Etpgl1dpMfsXii7EzQyhZgsPhIy7ZwV5bDmFk1/oyhTqIpWrnr4pD3r151T2BQjzJefjf15A==", "dev": true, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.57.0", - "@typespec/http": "~0.57.0" + "@typespec/compiler": "~0.58.0", + "@typespec/http": "~0.58.0" } }, "node_modules/@typespec/rest": { - "version": "0.57.0", - "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.57.0.tgz", - "integrity": "sha512-mZj76Kf+cmH38pYA6LT8Zz7QjuR3fdQo5bc8pXhKMwLq9vRqNLz6Z9InbOeo8zY+xP0GfUwEU9kXczmCc8gyRA==", + "version": "0.58.0", + "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.58.0.tgz", + "integrity": "sha512-QBxkED0/KQKG22pwzis0n7BY+uLMSZZPSoVe/ESBFika9n5/yyeQ0l58xbFFwwfxAxe4xwuZ5PNwTdEXZbzr5g==", "dev": true, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.57.0", - "@typespec/http": "~0.57.0" + "@typespec/compiler": "~0.58.0", + "@typespec/http": "~0.58.0" } }, "node_modules/@typespec/versioning": { - "version": "0.57.0", - "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.57.0.tgz", - "integrity": "sha512-kk6zCNSwcqqYB9isNNagTy+Zv6wEIRA4NkcZ/X1riTj2zhJwKsIFNXQWm1yxpZn+BY4+1QtuaQHuBLo8HbgR/w==", + "version": "0.58.0", + "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.58.0.tgz", + "integrity": "sha512-brnQQ3wKWh4AbgqmnVLj+8zyOaDk9VPWg4QBecdQxzz7PrSrlAzIzRfeIyr67+hwi/0SvkTAB6GNH7YYTypKGA==", "dev": true, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.57.0" + "@typespec/compiler": "~0.58.0" } }, "node_modules/@typespec/xml": { - "version": "0.57.0", - "resolved": "https://registry.npmjs.org/@typespec/xml/-/xml-0.57.0.tgz", - "integrity": "sha512-itsFsahgBRNREoF4FXUgELmNGtOMmzNnhxT+NeAl4f7EXmz/mu1y/k9hWmDXWr+DB0Oq1r0Fc+D0TSl51szzlQ==", + "version": "0.58.0", + "resolved": "https://registry.npmjs.org/@typespec/xml/-/xml-0.58.0.tgz", + "integrity": "sha512-2OG2JXypMZR90nVoIVwxc+6Sc4lsggLPuh1yhw1BKiv2NBAuSdfcK4MuiIooqR206QJw9xM8qtNxlUeDb00DDw==", "dev": true, "engines": { "node": ">=18.0.0" }, "peerDependencies": { - "@typespec/compiler": "~0.57.0" + "@typespec/compiler": "~0.58.0" } }, "node_modules/ajv": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.13.0.tgz", - "integrity": "sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.16.0.tgz", + "integrity": "sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==", "dev": true, "dependencies": { "fast-deep-equal": "^3.1.3", @@ -689,9 +690,9 @@ } }, "node_modules/prettier": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", - "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" @@ -797,9 +798,9 @@ } }, "node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -864,6 +865,21 @@ "node": ">=4" } }, + "node_modules/temporal-polyfill": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/temporal-polyfill/-/temporal-polyfill-0.2.5.tgz", + "integrity": "sha512-ye47xp8Cb0nDguAhrrDS1JT1SzwEV9e26sSsrWzVu+yPZ7LzceEcH0i2gci9jWfOfSCCgM3Qv5nOYShVUUFUXA==", + "dev": true, + "dependencies": { + "temporal-spec": "^0.2.4" + } + }, + "node_modules/temporal-spec": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/temporal-spec/-/temporal-spec-0.2.4.tgz", + "integrity": "sha512-lDMFv4nKQrSjlkHKAlHVqKrBG4DyFfa9F74cmBZ3Iy3ed8yvWnlWSIdi4IKfSqwmazAohBNwiN64qGx4y5Q3IQ==", + "dev": true + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", diff --git a/eng/emitter-package.json b/eng/emitter-package.json index 76956d3f26eb6..1c4999761389c 100644 --- a/eng/emitter-package.json +++ b/eng/emitter-package.json @@ -1,19 +1,19 @@ { "main": "dist/src/index.js", "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20240716.2" + "@azure-tools/typespec-csharp": "0.2.0-beta.20240719.2" }, "devDependencies": { - "@azure-tools/typespec-autorest": "0.43.0", - "@azure-tools/typespec-azure-core": "0.43.0", - "@azure-tools/typespec-azure-resource-manager": "0.43.0", - "@azure-tools/typespec-azure-rulesets": "0.43.0", - "@azure-tools/typespec-client-generator-core": "0.43.2", - "@typespec/compiler": "0.57.0", - "@typespec/http": "0.57.0", - "@typespec/openapi": "0.57.0", - "@typespec/rest": "0.57.0", - "@typespec/versioning": "0.57.0", - "@typespec/xml": "0.57.0" + "@azure-tools/typespec-autorest": "0.44.0", + "@azure-tools/typespec-azure-core": "0.44.0", + "@azure-tools/typespec-azure-resource-manager": "0.44.0", + "@azure-tools/typespec-azure-rulesets": "0.44.0", + "@azure-tools/typespec-client-generator-core": "0.44.1", + "@typespec/compiler": "0.58.0", + "@typespec/http": "0.58.0", + "@typespec/openapi": "0.58.0", + "@typespec/rest": "0.58.0", + "@typespec/versioning": "0.58.0", + "@typespec/xml": "0.58.0" } } diff --git a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Lineage.cs b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Lineage.cs index a7a8e053873d1..ede25395c59f6 100644 --- a/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Lineage.cs +++ b/sdk/purview/Azure.Analytics.Purview.DataMap/src/Generated/Lineage.cs @@ -523,7 +523,7 @@ internal HttpMessage CreateGetNextPageRequest(string guid, string direction, int uri.AppendRaw("/datamap/api", false); uri.AppendPath("/lineage/", false); uri.AppendPath(guid, true); - uri.AppendPath("/next", false); + uri.AppendPath("/next/", false); uri.AppendQuery("direction", direction, true); uri.AppendQuery("api-version", _apiVersion, true); if (offset != null) From 37740941ad9bb9857f10ebc3a9c9b73024f56af0 Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Fri, 19 Jul 2024 07:35:19 -0500 Subject: [PATCH 138/144] Update DefaultAzureCredential, InteractiveBrowserCredential, and DeviceCodeCredential docs (#45009) --- sdk/identity/Azure.Identity/README.md | 6 +----- .../src/Credentials/DefaultAzureCredential.cs | 9 +++++++-- .../src/Credentials/DeviceCodeCredential.cs | 4 ++-- .../src/Credentials/DeviceCodeCredentialOptions.cs | 2 ++ .../src/Credentials/InteractiveBrowserCredential.cs | 4 ++-- .../Credentials/InteractiveBrowserCredentialOptions.cs | 3 ++- 6 files changed, 16 insertions(+), 12 deletions(-) diff --git a/sdk/identity/Azure.Identity/README.md b/sdk/identity/Azure.Identity/README.md index edb3edc9242f6..e221f19c0c59f 100644 --- a/sdk/identity/Azure.Identity/README.md +++ b/sdk/identity/Azure.Identity/README.md @@ -77,11 +77,7 @@ See [Credential Classes](#credential-classes) for a complete listing of availabl ### DefaultAzureCredential -The `DefaultAzureCredential` is appropriate for most scenarios where the application is intended to ultimately be run in Azure. This is because the `DefaultAzureCredential` combines credentials commonly used to authenticate when deployed, with credentials used to authenticate in a development environment. - -> Note: `DefaultAzureCredential` is intended to simplify getting started with the SDK by handling common scenarios with reasonable default behaviors. Developers who want more control or whose scenario isn't served by the default settings should use other credential types. - -The `DefaultAzureCredential` attempts to authenticate via the following mechanisms, in this order, stopping when one succeeds: +The `DefaultAzureCredential` simplifies authentication while developing applications that deploy to Azure by combining credentials used in Azure hosting environments and credentials used in local development. In production, it's better to use a specific credential type so authentication is more predictable and easier to debug. `DefaultAzureCredential` attempts to authenticate via the following mechanisms in this order, stopping when one succeeds: ![DefaultAzureCredential authentication flow][default_azure_credential_authflow_image] diff --git a/sdk/identity/Azure.Identity/src/Credentials/DefaultAzureCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/DefaultAzureCredential.cs index 5a30b98f63a4a..1c2ffb928f98a 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/DefaultAzureCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/DefaultAzureCredential.cs @@ -12,8 +12,13 @@ namespace Azure.Identity { /// - /// Provides a default authentication flow for applications that will be deployed to Azure. The following credential - /// types, if enabled, will be tried, in order: + /// simplifies authentication while developing applications that deploy to Azure by + /// combining credentials used in Azure hosting environments and credentials used in local development. In + /// production, it's better to use a specific credential type so authentication is more predictable and easier + /// to debug. + /// + /// attempts to authenticate with each of these credential types, in the following order, + /// stopping when one provides a token: /// /// /// diff --git a/sdk/identity/Azure.Identity/src/Credentials/DeviceCodeCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/DeviceCodeCredential.cs index 2203ccedd83c5..54641f202a7f4 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/DeviceCodeCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/DeviceCodeCredential.cs @@ -52,7 +52,7 @@ public DeviceCodeCredential(DeviceCodeCredentialOptions options) /// Creates a new DeviceCodeCredential with the specified options, which will authenticate users with the specified application. /// /// The callback to be executed to display the device code to the user - /// The client id of the application to which the users will authenticate + /// The client ID of the application to which the users will authenticate. It's recommended that developers register their applications and assign appropriate roles. For more information, visit . If not specified, users will authenticate to an Azure development application, which isn't recommended for production scenarios. /// The client options for the newly created DeviceCodeCredential [EditorBrowsable(EditorBrowsableState.Never)] public DeviceCodeCredential(Func deviceCodeCallback, string clientId, TokenCredentialOptions options = default) @@ -65,7 +65,7 @@ public DeviceCodeCredential(Func device /// /// The callback to be executed to display the device code to the user /// The tenant id of the application to which users will authenticate. This can be null for multi-tenanted applications. - /// The client id of the application to which the users will authenticate + /// The client id of the application to which the users will authenticate. It is recommended that developers register their applications and assign appropriate roles. For more information, visit . If not specified, users will authenticate to an Azure development application, which is not recommended for production scenarios. /// The client options for the newly created DeviceCodeCredential [EditorBrowsable(EditorBrowsableState.Never)] public DeviceCodeCredential(Func deviceCodeCallback, string tenantId, string clientId, TokenCredentialOptions options = default) diff --git a/sdk/identity/Azure.Identity/src/Credentials/DeviceCodeCredentialOptions.cs b/sdk/identity/Azure.Identity/src/Credentials/DeviceCodeCredentialOptions.cs index 0063eae24fd57..e23024f791d69 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/DeviceCodeCredentialOptions.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/DeviceCodeCredentialOptions.cs @@ -39,6 +39,8 @@ public string TenantId /// /// The client ID of the application used to authenticate the user. If not specified the user will be authenticated with an Azure development application. + /// It is recommended that developers register their applications and assign appropriate roles. For more information, visit . + /// If not specified, users will authenticate to an Azure development application, which is not recommended for production scenarios. /// public string ClientId { get; set; } = Constants.DeveloperSignOnClientId; diff --git a/sdk/identity/Azure.Identity/src/Credentials/InteractiveBrowserCredential.cs b/sdk/identity/Azure.Identity/src/Credentials/InteractiveBrowserCredential.cs index 8101b15c75a64..c9bd1faa717f3 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/InteractiveBrowserCredential.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/InteractiveBrowserCredential.cs @@ -57,7 +57,7 @@ public InteractiveBrowserCredential(InteractiveBrowserCredentialOptions options) /// /// Creates a new with the specified options, which will authenticate users with the specified application. /// - /// The client id of the application to which the users will authenticate + /// The client id of the application to which the users will authenticate. It is recommended that developers register their applications and assign appropriate roles. For more information, visit . If not specified, users will authenticate to an Azure development application, which is not recommended for production scenarios. [EditorBrowsable(EditorBrowsableState.Never)] public InteractiveBrowserCredential(string clientId) : this(null, clientId, null, null) @@ -67,7 +67,7 @@ public InteractiveBrowserCredential(string clientId) /// Creates a new with the specified options, which will authenticate users with the specified application. /// /// The tenant id of the application and the users to authenticate. Can be null in the case of multi-tenant applications. - /// The client id of the application to which the users will authenticate + /// The client id of the application to which the users will authenticate. It is recommended that developers register their applications and assign appropriate roles. For more information, visit . If not specified, users will authenticate to an Azure development application, which is not recommended for production scenarios. /// TODO: need to link to info on how the application has to be created to authenticate users, for multiple applications /// The client options for the newly created . [EditorBrowsable(EditorBrowsableState.Never)] diff --git a/sdk/identity/Azure.Identity/src/Credentials/InteractiveBrowserCredentialOptions.cs b/sdk/identity/Azure.Identity/src/Credentials/InteractiveBrowserCredentialOptions.cs index 70f2ebe6b150b..6fee96ac67f54 100644 --- a/sdk/identity/Azure.Identity/src/Credentials/InteractiveBrowserCredentialOptions.cs +++ b/sdk/identity/Azure.Identity/src/Credentials/InteractiveBrowserCredentialOptions.cs @@ -38,7 +38,8 @@ public string TenantId public IList AdditionallyAllowedTenants { get; internal set; } = new List(); /// - /// The client ID of the application used to authenticate the user. If not specified the user will be authenticated with an Azure development application. + /// The client ID of the application used to authenticate the user. It is recommended that developers register their applications and assign appropriate roles. For more information, visit . + /// If not specified, users will authenticate to an Azure development application, which is not recommended for production scenarios. /// public string ClientId { get; set; } = Constants.DeveloperSignOnClientId; From 1ca0038ceeb0f99ad5ead7656b81fccafa1438a2 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 19 Jul 2024 09:46:32 -0400 Subject: [PATCH 139/144] Increment package version after release of Azure.ResourceManager.HybridCompute (#45096) --- .../Azure.ResourceManager.HybridCompute/CHANGELOG.md | 10 ++++++++++ .../src/Azure.ResourceManager.HybridCompute.csproj | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/CHANGELOG.md b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/CHANGELOG.md index 4b9c6f3b898f0..b97b4a9947e02 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/CHANGELOG.md +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.0.0-beta.11 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.0.0-beta.10 (2024-07-19) ### Features Added diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Azure.ResourceManager.HybridCompute.csproj b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Azure.ResourceManager.HybridCompute.csproj index 9daa679cdcc01..be1444282e509 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Azure.ResourceManager.HybridCompute.csproj +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Azure.ResourceManager.HybridCompute.csproj @@ -1,6 +1,6 @@ - 1.0.0-beta.10 + 1.0.0-beta.11 Azure.ResourceManager.HybridCompute Microsoft Azure Resource Manager client SDK for Azure resource provider Microsoft.HybridCompute. azure;management;arm;resource manager;hybridcompute From 8ad44c55cbeefb6c2c271f6e0aabf17d6c4f8e7b Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 19 Jul 2024 09:46:46 -0400 Subject: [PATCH 140/144] Increment package version after release of Azure.ResourceManager.GuestConfiguration (#45094) --- .../CHANGELOG.md | 10 ++++++++++ .../Azure.ResourceManager.GuestConfiguration.csproj | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/CHANGELOG.md b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/CHANGELOG.md index 3d0c0f96a9d9b..358c10b6c4645 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/CHANGELOG.md +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.3.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.2.0 (2024-07-19) ### Features Added diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Azure.ResourceManager.GuestConfiguration.csproj b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Azure.ResourceManager.GuestConfiguration.csproj index 303e696e5d884..58654ee2b40d1 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Azure.ResourceManager.GuestConfiguration.csproj +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Azure.ResourceManager.GuestConfiguration.csproj @@ -1,8 +1,8 @@ - 1.2.0 + 1.3.0-beta.1 - 1.1.0 + 1.2.0 Azure.ResourceManager.GuestConfiguration Microsoft Azure Resource Manager client SDK for Azure resource provider Microsoft.GuestConfiguration. azure;management;arm;resource manager;guestconfiguration From 47fd179f04dcd691733f9d2d9bdf2ddc7f2bac15 Mon Sep 17 00:00:00 2001 From: James Suplizio Date: Fri, 19 Jul 2024 08:59:52 -0700 Subject: [PATCH 141/144] Unset the SDKType environment variable for API Docs Gen (#45080) * Unset the SDKType environment variable for API Docs Gen * Unsetting didn't work, try a different approach * set /p:BuildInParallel=false on the build commands * for the want of a quote, the kingdom fell * change the mgmt build commands, if those work the if statements will be consolidated * Remove libtype, everything is Taco Bell --- doc/ApiDocGeneration/Generate-Api-Docs.ps1 | 65 +++++-------------- .../templates/steps/archetype-sdk-docs.yml | 1 - 2 files changed, 18 insertions(+), 48 deletions(-) diff --git a/doc/ApiDocGeneration/Generate-Api-Docs.ps1 b/doc/ApiDocGeneration/Generate-Api-Docs.ps1 index 86f98eba4b1c2..f11f9118ffc68 100644 --- a/doc/ApiDocGeneration/Generate-Api-Docs.ps1 +++ b/doc/ApiDocGeneration/Generate-Api-Docs.ps1 @@ -14,9 +14,6 @@ The Name of the servicedirectory, usually the name of the service e.g. core .PARAMETER ArtifactsDirectoryName Used in the case where the package directory name is different from the package name. e.g in cognitiveservice packages -.PARAMETER LibType -Specifies if its a client or management library - .PARAMETER RepoRoot The root of the Azure-SDK-for-Net Repo @@ -32,7 +29,7 @@ Directory Name: PopImport: https://azuresdkartifacts.blob.core.windows.net/azure RepoRoot\doc\ApiDocGeneration #> - + [CmdletBinding()] Param ( [Parameter(Mandatory = $True)] @@ -40,8 +37,6 @@ Param ( [Parameter(Mandatory = $True)] $ServiceDirectory, $ArtifactsDirectoryName, - [ValidateSet('client', 'management')] - $LibType = "client", $RepoRoot = "${PSScriptRoot}/../..", [Parameter(Mandatory = $True)] $BinDirectory, @@ -68,7 +63,9 @@ function UpdateDocIndexFiles([string]$docPath, [string] $mainJsPath) { } Write-Verbose "Name Reccuring paths with variable names" -if ([System.String]::IsNullOrEmpty($ArtifactsDirectoryName)) {$ArtifactsDirectoryName = $ArtifactName} +if ([System.String]::IsNullOrEmpty($ArtifactsDirectoryName)) { + $ArtifactsDirectoryName = $ArtifactName +} $PackageLocation = "${ServiceDirectory}/${ArtifactsDirectoryName}" $FrameworkDir = "${BinDirectory}/${ArtifactsDirectoryName}/dll-docs" $ApiDir = "${FrameworkDir}/my-api" @@ -83,10 +80,6 @@ $DocFxTool = "${BinDirectory}/docfx/docfx.exe" $DocCommonGenDir = "${RepoRoot}/eng/common/docgeneration" $GACampaignId = "UA-62780441-41" -if ($LibType -eq 'management') { - $ArtifactName = $ArtifactName.Substring($ArtifactName.LastIndexOf('.Management') + 1) -} - Write-Verbose "Package Location ${PackageLocation}" Write-Verbose "Create Directories Required for Doc Generation" @@ -101,41 +94,19 @@ mkdir $YamlOutDir Write-Verbose "Creating DocOutDir '$DocOutDir'" mkdir $DocOutDir -if ($LibType -eq 'client') { - Write-Verbose "Build Packages for Doc Generation - Client" - Write-Verbose "dotnet build '${RepoRoot}/eng/service.proj' /p:ServiceDirectory=$PackageLocation /p:IncludeTests=false /p:IncludeSamples=false /p:IncludePerf=false /p:IncludeStress=false /p:OutputPath=$ApiDir" - dotnet build "${RepoRoot}/eng/service.proj" /p:ServiceDirectory=$PackageLocation /p:IncludeTests=false /p:IncludeSamples=false /p:IncludePerf=false /p:IncludeStress=false /p:OutputPath=$ApiDir - if ($LASTEXITCODE -ne 0) { - Log-Warning "Build Packages for Doc Generation - Client failed with $LASTEXITCODE please see output above" - exit 0 - } - - Write-Verbose "Include Client Dependencies" - Write-Verbose "'${RepoRoot}/eng/service.proj' /p:ServiceDirectory=$PackageLocation /p:IncludeTests=false /p:IncludeSamples=false /p:IncludePerf=false /p:IncludeStress=false /p:OutputPath=$ApiDependenciesDir /p:CopyLocalLockFileAssemblies=true" - dotnet build "${RepoRoot}/eng/service.proj" /p:ServiceDirectory=$PackageLocation /p:IncludeTests=false /p:IncludeSamples=false /p:IncludePerf=false /p:IncludeStress=false /p:OutputPath=$ApiDependenciesDir /p:CopyLocalLockFileAssemblies=true - if ($LASTEXITCODE -ne 0) { - Log-Warning "Include Client Dependencies build failed with $LASTEXITCODE please see output above" - exit 0 - } -} elseif ($LibType -eq 'management') { - # Management Package - Write-Verbose "Build Packages for Doc Generation - Management" - Write-Verbose "dotnet msbuild '${RepoRoot}/eng/mgmt.proj' /p:scope=$PackageLocation /p:OutputPath=$ApiDir -maxcpucount:1 -nodeReuse:false" - dotnet msbuild "${RepoRoot}/eng/mgmt.proj" /p:scope=$PackageLocation /p:OutputPath=$ApiDir -maxcpucount:1 -nodeReuse:false - if ($LASTEXITCODE -ne 0) { - Log-Warning "Build Packages for Doc Generation - Management failed with $LASTEXITCODE please see output above" - exit 0 - } - - Write-Verbose "Include Management Dependencies" - Write-Verbose "dotnet msbuild '${RepoRoot}/eng/mgmt.proj' /p:scope=$PackageLocation /p:OutputPath=$ApiDependenciesDir /p:CopyLocalLockFileAssemblies=true -maxcpucount:1 -nodeReuse:false" - dotnet msbuild "${RepoRoot}/eng/mgmt.proj" /p:scope=$PackageLocation /p:OutputPath=$ApiDependenciesDir /p:CopyLocalLockFileAssemblies=true -maxcpucount:1 -nodeReuse:false - if ($LASTEXITCODE -ne 0) { - Log-Warning "Include Management Dependencies build failed with $LASTEXITCODE please see output above" - exit 0 - } -} else { - Log-Warning "'$LibType' is not a supported library type at this time." +Write-Verbose "Build Packages for Doc Generation - Client" +Write-Verbose "dotnet build '${RepoRoot}/eng/service.proj' /p:ServiceDirectory=$ServiceDirectory /p:Project=$ArtifactsDirectoryName /p:IncludeTests=false /p:IncludeSamples=false /p:IncludePerf=false /p:IncludeStress=false /p:BuildInParallel=false /p:OutputPath=$ApiDir" +dotnet build "${RepoRoot}/eng/service.proj" /p:ServiceDirectory=$ServiceDirectory /p:Project=$ArtifactsDirectoryName /p:IncludeTests=false /p:IncludeSamples=false /p:IncludePerf=false /p:IncludeStress=false /p:BuildInParallel=false /p:OutputPath=$ApiDir +if ($LASTEXITCODE -ne 0) { + Log-Warning "Build Packages for Doc Generation - Client failed with $LASTEXITCODE please see output above" + exit 0 +} + +Write-Verbose "Include Client Dependencies" +Write-Verbose "'${RepoRoot}/eng/service.proj' /p:ServiceDirectory=$ServiceDirectory /p:Project=$ArtifactsDirectoryName /p:IncludeTests=false /p:IncludeSamples=false /p:IncludePerf=false /p:IncludeStress=false /p:BuildInParallel=false /p:OutputPath=$ApiDependenciesDir /p:CopyLocalLockFileAssemblies=true" +dotnet build "${RepoRoot}/eng/service.proj" /p:ServiceDirectory=$ServiceDirectory /p:Project=$ArtifactsDirectoryName /p:IncludeTests=false /p:IncludeSamples=false /p:IncludePerf=false /p:IncludeStress=false /p:BuildInParallel=false /p:OutputPath=$ApiDependenciesDir /p:CopyLocalLockFileAssemblies=true +if ($LASTEXITCODE -ne 0) { + Log-Warning "Include Client Dependencies build failed with $LASTEXITCODE please see output above" exit 0 } @@ -212,4 +183,4 @@ $mutatedContent = $mutatedContent -replace $hrefRegex, '"./$1"' Set-Content -Path $baseUrl -Value $mutatedContent -NoNewline Write-Verbose "Compress and copy HTML into the staging Area" -Compress-Archive -Path "${DocOutHtmlDir}/*" -DestinationPath "${ArtifactStagingDirectory}/${ArtifactName}/${ArtifactName}.docs.zip" -CompressionLevel Fastest \ No newline at end of file +Compress-Archive -Path "${DocOutHtmlDir}/*" -DestinationPath "${ArtifactStagingDirectory}/${ArtifactName}/${ArtifactName}.docs.zip" -CompressionLevel Fastest diff --git a/eng/pipelines/templates/steps/archetype-sdk-docs.yml b/eng/pipelines/templates/steps/archetype-sdk-docs.yml index dd16ff8d2f161..9a67b36e7d805 100644 --- a/eng/pipelines/templates/steps/archetype-sdk-docs.yml +++ b/eng/pipelines/templates/steps/archetype-sdk-docs.yml @@ -18,7 +18,6 @@ steps: -ArtifactName '${{artifact.name}}' -ServiceDirectory '${{parameters.ServiceDirectory}}' -ArtifactsDirectoryName '${{artifact.directoryName}}' - -LibType '${{parameters.LibType}}' -RepoRoot $(Build.SourcesDirectory) -BinDirectory $(Build.BinariesDirectory) -DocGenDir ${{parameters.DocGenerationDir}} From ec573dc56e902521dfd8eaed9a003029434d87a7 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 19 Jul 2024 13:41:06 -0700 Subject: [PATCH 142/144] Add Azure Health Data Service product slug (#45107) Co-authored-by: Scott Addie --- eng/common/scripts/Test-SampleMetadata.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/common/scripts/Test-SampleMetadata.ps1 b/eng/common/scripts/Test-SampleMetadata.ps1 index 9e50fa1dce03a..8499b70a4926e 100644 --- a/eng/common/scripts/Test-SampleMetadata.ps1 +++ b/eng/common/scripts/Test-SampleMetadata.ps1 @@ -203,6 +203,7 @@ begin { "azure-genomics", "azure-hdinsight", "azure-hdinsight-rserver", + "azure-health-data-services", "azure-health-insights", "azure-hpc-cache", "azure-immersive-reader", From c9fd7c63af190a42b22fb21919d214dec82377ff Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 19 Jul 2024 13:45:02 -0700 Subject: [PATCH 143/144] Sync eng/common directory with azure-sdk-tools for PR 8650 (#45057) * missed a condition passthrough --------- Co-authored-by: Scott Beddall Co-authored-by: Scott Beddall <45376673+scbedd@users.noreply.github.com> --- eng/common/pipelines/templates/steps/set-default-branch.yml | 2 ++ eng/common/pipelines/templates/steps/verify-links.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/eng/common/pipelines/templates/steps/set-default-branch.yml b/eng/common/pipelines/templates/steps/set-default-branch.yml index 31bf289361640..12ec1be317b46 100644 --- a/eng/common/pipelines/templates/steps/set-default-branch.yml +++ b/eng/common/pipelines/templates/steps/set-default-branch.yml @@ -2,6 +2,7 @@ parameters: WorkingDirectory: '$(System.DefaultWorkingDirectory)' RemoteRepo: 'origin' DefaultBranchVariableName: DefaultBranch + Condition: 'succeeded()' steps: - pwsh: | $setDefaultBranch = (git remote show ${{ parameters.RemoteRepo }} | Out-String) -replace "(?ms).*HEAD branch: (\w+).*", '$1' @@ -13,4 +14,5 @@ steps: Write-Host "##vso[task.setvariable variable=${{ parameters.DefaultBranchVariableName }}]$setDefaultBranch" displayName: "Setup Default Branch" workingDirectory: ${{ parameters.workingDirectory }} + condition: ${{ parameters.Condition }} ignoreLASTEXITCODE: true diff --git a/eng/common/pipelines/templates/steps/verify-links.yml b/eng/common/pipelines/templates/steps/verify-links.yml index 8a84f8d0ecf99..4d84e124a87fb 100644 --- a/eng/common/pipelines/templates/steps/verify-links.yml +++ b/eng/common/pipelines/templates/steps/verify-links.yml @@ -12,6 +12,8 @@ parameters: steps: - template: /eng/common/pipelines/templates/steps/set-default-branch.yml + parameters: + Condition: ${{ parameters.Condition }} - task: PowerShell@2 displayName: Link verification check condition: ${{ parameters.Condition }} From e1d67ba7056e66497a3696c39149b4d08fd4a097 Mon Sep 17 00:00:00 2001 From: Anne Thompson Date: Fri, 19 Jul 2024 15:48:26 -0700 Subject: [PATCH 144/144] SCM: Add support for Retry-After header to default ClientRetryPolicy (#45078) * Add support for Retry-After header to default ClientRetryPolicy * Add tests * updates * nits * support http-date format as well * update CHANGELOG * add header collection to mock --- sdk/core/System.ClientModel/CHANGELOG.md | 2 + .../src/Pipeline/ClientRetryPolicy.cs | 37 ++++++++++- .../tests/Pipeline/ClientRetryPolicyTests.cs | 64 ++++++++++++++++++- .../Mocks/MockPipelineResponse.cs | 5 +- .../Mocks/MockPipelineTransport.cs | 2 +- .../Mocks/MockResponseHeaders.cs | 3 + .../TestFramework/Mocks/MockRetryPolicy.cs | 3 + 7 files changed, 109 insertions(+), 7 deletions(-) diff --git a/sdk/core/System.ClientModel/CHANGELOG.md b/sdk/core/System.ClientModel/CHANGELOG.md index 51564926da757..9edc9c05f508b 100644 --- a/sdk/core/System.ClientModel/CHANGELOG.md +++ b/sdk/core/System.ClientModel/CHANGELOG.md @@ -8,6 +8,8 @@ ### Bugs Fixed +- Added support for delaying retrying a request until after the interval specified on a response `Retry-After` header. + ### Other Changes ## 1.1.0-beta.5 (2024-07-11) diff --git a/sdk/core/System.ClientModel/src/Pipeline/ClientRetryPolicy.cs b/sdk/core/System.ClientModel/src/Pipeline/ClientRetryPolicy.cs index 3d297f4c83dda..4ef13af4d451e 100644 --- a/sdk/core/System.ClientModel/src/Pipeline/ClientRetryPolicy.cs +++ b/sdk/core/System.ClientModel/src/Pipeline/ClientRetryPolicy.cs @@ -24,6 +24,7 @@ public class ClientRetryPolicy : PipelinePolicy private const int DefaultMaxRetries = 3; private static readonly TimeSpan DefaultInitialDelay = TimeSpan.FromSeconds(0.8); + private const string RetryAfterHeaderName = "Retry-After"; private readonly int _maxRetries; private readonly TimeSpan _initialDelay; @@ -270,8 +271,18 @@ protected virtual ValueTask ShouldRetryAsync(PipelineMessage message, Exce /// protected virtual TimeSpan GetNextDelay(PipelineMessage message, int tryCount) { - // Default implementation is exponential backoff - return TimeSpan.FromMilliseconds((1 << (tryCount - 1)) * _initialDelay.TotalMilliseconds); + // Default implementation is exponential backoff, unless the response + // has a retry-after header. + double nextDelayMilliseconds = (1 << (tryCount - 1)) * _initialDelay.TotalMilliseconds; + + if (message.Response is not null && + TryGetRetryAfter(message.Response, out TimeSpan retryAfter) && + retryAfter.TotalMilliseconds > nextDelayMilliseconds) + { + return retryAfter; + } + + return TimeSpan.FromMilliseconds(nextDelayMilliseconds); } /// @@ -308,4 +319,26 @@ protected virtual void Wait(TimeSpan time, CancellationToken cancellationToken) CancellationHelper.ThrowIfCancellationRequested(cancellationToken); } } + + private static bool TryGetRetryAfter(PipelineResponse response, out TimeSpan value) + { + // See: https://www.rfc-editor.org/rfc/rfc7231#section-7.1.3 + if (response.Headers.TryGetValue(RetryAfterHeaderName, out string? retryAfter)) + { + if (int.TryParse(retryAfter, out var delaySeconds)) + { + value = TimeSpan.FromSeconds(delaySeconds); + return true; + } + + if (DateTimeOffset.TryParse(retryAfter, out DateTimeOffset retryAfterDate)) + { + value = retryAfterDate - DateTimeOffset.Now; + return true; + } + } + + value = default; + return false; + } } diff --git a/sdk/core/System.ClientModel/tests/Pipeline/ClientRetryPolicyTests.cs b/sdk/core/System.ClientModel/tests/Pipeline/ClientRetryPolicyTests.cs index 6237dd911c60b..a6c893724a01e 100644 --- a/sdk/core/System.ClientModel/tests/Pipeline/ClientRetryPolicyTests.cs +++ b/sdk/core/System.ClientModel/tests/Pipeline/ClientRetryPolicyTests.cs @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using ClientModel.Tests; -using ClientModel.Tests.Mocks; -using NUnit.Framework; using System.ClientModel.Primitives; using System.Collections.Generic; using System.IO; using System.Threading; using System.Threading.Tasks; +using ClientModel.Tests; +using ClientModel.Tests.Mocks; +using NUnit.Framework; namespace System.ClientModel.Tests.Pipeline; @@ -129,6 +129,42 @@ public async Task OnlyRetriesRetriableCodes() Assert.AreEqual(501, message.Response!.Status); } + [Test] + [TestCaseSource(nameof(RetryAfterTestValues))] + public void RespectsRetryAfterHeader(string headerName, string headerValue, double expected) + { + MockRetryPolicy retryPolicy = new(); + MockPipelineMessage message = new(); + MockPipelineResponse response = new(); + response.SetHeader(headerName, headerValue); + message.SetResponse(response); + + // Default delay with exponential backoff for second try is 1600 ms. + double delayMillis = retryPolicy.GetNextDelayMilliseconds(message, 2); + Assert.AreEqual(expected, delayMillis); + } + + [Test] + public void RespectsRetryAfterDateHeader() + { + MockRetryPolicy retryPolicy = new(); + MockPipelineMessage message = new(); + MockPipelineResponse response = new(); + + // Retry after 100 seconds from now + response.SetHeader( + "Retry-After", + (DateTimeOffset.Now + TimeSpan.FromSeconds(100)).ToString("R")); + message.SetResponse(response); + + // Default delay with exponential backoff for second try is 1600 ms. + double delayMillis = retryPolicy.GetNextDelayMilliseconds(message, 2); + + // Retry-After header is larger - wait the Retry-After time, which + // should be approx 100s, so test for > 20s. + Assert.GreaterOrEqual(delayMillis, 20 * 1000); + } + [Test] public async Task ShouldRetryIsCalledOnlyForErrors() { @@ -356,4 +392,26 @@ public void WaitThrowsOnCancellation() Assert.ThrowsAsync(async () => await retryPolicy.WaitSyncOrAsync(delay, cts.Token, IsAsync)); } + + #region Helpers + public static IEnumerable RetryAfterTestValues() + { + // Retry-After header is larger - wait Retry-After time + yield return new object[] { "Retry-After", "5", 5000 }; + + // Retry-After header is smaller - wait exponential backoff time + yield return new object[] { "Retry-After", "1", 1600 }; + + // Not standard HTTP header - wait exponential backoff time + yield return new object[] { "retry-after-ms", "5", 1600 }; + + // No Retry-After header - wait exponential backoff time + yield return new object[] { "Content-Type", "application/json", 1600 }; + + // Retry-After header is smaller - wait exponential backoff + yield return new object[] { "Retry-After", + (DateTimeOffset.Now + TimeSpan.FromSeconds(1)).ToString("R"), + 1600 }; + } + #endregion } diff --git a/sdk/core/System.ClientModel/tests/TestFramework/Mocks/MockPipelineResponse.cs b/sdk/core/System.ClientModel/tests/TestFramework/Mocks/MockPipelineResponse.cs index d19ab2a9caac7..d04486feb6704 100644 --- a/sdk/core/System.ClientModel/tests/TestFramework/Mocks/MockPipelineResponse.cs +++ b/sdk/core/System.ClientModel/tests/TestFramework/Mocks/MockPipelineResponse.cs @@ -17,7 +17,7 @@ public class MockPipelineResponse : PipelineResponse private Stream? _contentStream; private BinaryData? _bufferedContent; - private readonly PipelineResponseHeaders _headers; + private readonly MockResponseHeaders _headers; private bool _disposed; @@ -36,6 +36,9 @@ public MockPipelineResponse(int status = 0, string reasonPhrase = "") public void SetReasonPhrase(string value) => _reasonPhrase = value; + public void SetHeader(string name, string value) + => _headers.SetHeader(name, value); + public void SetContent(byte[] content) { ContentStream = new MemoryStream(content, 0, content.Length, false, true); diff --git a/sdk/core/System.ClientModel/tests/TestFramework/Mocks/MockPipelineTransport.cs b/sdk/core/System.ClientModel/tests/TestFramework/Mocks/MockPipelineTransport.cs index cfa28349067b5..046edc105811a 100644 --- a/sdk/core/System.ClientModel/tests/TestFramework/Mocks/MockPipelineTransport.cs +++ b/sdk/core/System.ClientModel/tests/TestFramework/Mocks/MockPipelineTransport.cs @@ -172,7 +172,7 @@ public override Stream? ContentStream public override BinaryData Content => throw new NotImplementedException(); protected override PipelineResponseHeaders HeadersCore - => throw new NotImplementedException(); + => new MockResponseHeaders(); public override void Dispose() { } diff --git a/sdk/core/System.ClientModel/tests/TestFramework/Mocks/MockResponseHeaders.cs b/sdk/core/System.ClientModel/tests/TestFramework/Mocks/MockResponseHeaders.cs index 614997980beb4..f297bcd6334d3 100644 --- a/sdk/core/System.ClientModel/tests/TestFramework/Mocks/MockResponseHeaders.cs +++ b/sdk/core/System.ClientModel/tests/TestFramework/Mocks/MockResponseHeaders.cs @@ -16,6 +16,9 @@ public MockResponseHeaders() _headers = new Dictionary(); } + public void SetHeader(string name, string value) + => _headers[name] = value; + public override IEnumerator> GetEnumerator() { throw new NotImplementedException(); diff --git a/sdk/core/System.ClientModel/tests/TestFramework/Mocks/MockRetryPolicy.cs b/sdk/core/System.ClientModel/tests/TestFramework/Mocks/MockRetryPolicy.cs index 2d2b2036be5d2..7940a74852951 100644 --- a/sdk/core/System.ClientModel/tests/TestFramework/Mocks/MockRetryPolicy.cs +++ b/sdk/core/System.ClientModel/tests/TestFramework/Mocks/MockRetryPolicy.cs @@ -86,6 +86,9 @@ protected override ValueTask OnSendingRequestAsync(PipelineMessage message) return base.OnSendingRequestAsync(message); } + public double GetNextDelayMilliseconds(PipelineMessage message, int tryCount) + => GetNextDelay(message, tryCount).TotalMilliseconds; + protected override TimeSpan GetNextDelay(PipelineMessage message, int tryCount) { if (_delayFactory is not null)